Skip to content

Commit bdb98a5

Browse files
committed
Added: Set the priority theme color
1 parent 903d911 commit bdb98a5

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.changeset/famous-pets-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@plotday/twister": patch
3+
---
4+
5+
Added: Priority.color for setting the priority theme color

twister/src/plot.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ export { type JSONValue } from "./utils/types";
7878
*/
7979
export type ActorId = string & { readonly __brand: "ActorId" };
8080

81+
/**
82+
* Theme colors for priorities.
83+
*/
84+
export enum ThemeColor {
85+
/** Catalyst - Green */
86+
Catalyst = 0,
87+
/** Call to Adventure - Blue */
88+
CallToAdventure = 1,
89+
/** Rising Action - Purple */
90+
RisingAction = 2,
91+
/** Momentum - Pink-Purple */
92+
Momentum = 3,
93+
/** Turning Point - Pink */
94+
TurningPoint = 4,
95+
/** Breakthrough - Orange */
96+
Breakthrough = 5,
97+
/** Climax - Olive */
98+
Climax = 6,
99+
/** Resolution - Blue-Gray */
100+
Resolution = 7,
101+
}
102+
81103
/**
82104
* Represents a priority context within Plot.
83105
*
@@ -96,6 +118,8 @@ export type Priority = {
96118
* Keys are unique per priority tree (a user's personal priorities or the root of a shared priority).
97119
*/
98120
key: string | null;
121+
/** Optional theme color for the priority (0-7). If not set, inherits from parent or defaults to 7 (Resolution). */
122+
color: ThemeColor | null;
99123
};
100124

101125
/**

0 commit comments

Comments
 (0)