@stll/workspace-ui 0.12.7 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ import { LucideIcon } from "@stll/ui/icons";
2
+ //#region src/task-status.d.ts
3
+ /**
4
+ * How a task's status is drawn: one glyph and one colour per status.
5
+ *
6
+ * Owned here so every surface that draws a task (the app's boards and tables,
7
+ * the published feature previews) reads the same mapping. The status union
8
+ * itself belongs to the API contract; its consumer binds these maps to it with
9
+ * `satisfies Record<TaskStatus, …>`, so a status added there fails typecheck
10
+ * until it has a glyph here.
11
+ */
12
+ export declare const TASK_STATUS_ICONS: Readonly<Record<"open" | "in_progress" | "in_review" | "done" | "cancelled", LucideIcon>>;
13
+ export declare const TASK_STATUS_COLORS: {
14
+ readonly open: "text-muted-foreground";
15
+ readonly in_progress: "text-foreground dark:text-foreground-muted";
16
+ readonly in_review: "text-warning";
17
+ readonly done: "text-success dark:text-success";
18
+ readonly cancelled: "text-destructive dark:text-destructive";
19
+ };
20
+ export type TaskStatusGlyph = keyof typeof TASK_STATUS_ICONS;
21
+ //#endregion
@@ -0,0 +1,27 @@
1
+ import { CheckCircle2Icon, CircleDotIcon, CircleIcon, XCircleIcon } from "@stll/ui/icons";
2
+ //#region src/task-status.ts
3
+ /**
4
+ * How a task's status is drawn: one glyph and one colour per status.
5
+ *
6
+ * Owned here so every surface that draws a task (the app's boards and tables,
7
+ * the published feature previews) reads the same mapping. The status union
8
+ * itself belongs to the API contract; its consumer binds these maps to it with
9
+ * `satisfies Record<TaskStatus, …>`, so a status added there fails typecheck
10
+ * until it has a glyph here.
11
+ */
12
+ const TASK_STATUS_ICONS = {
13
+ open: CircleIcon,
14
+ in_progress: CircleDotIcon,
15
+ in_review: CircleDotIcon,
16
+ done: CheckCircle2Icon,
17
+ cancelled: XCircleIcon
18
+ };
19
+ const TASK_STATUS_COLORS = {
20
+ open: "text-muted-foreground",
21
+ in_progress: "text-foreground dark:text-foreground-muted",
22
+ in_review: "text-warning",
23
+ done: "text-success dark:text-success",
24
+ cancelled: "text-destructive dark:text-destructive"
25
+ };
26
+ //#endregion
27
+ export { TASK_STATUS_COLORS, TASK_STATUS_ICONS };
package/dist/types.d.ts CHANGED
@@ -95,7 +95,9 @@ export type FieldContent = {
95
95
  };
96
96
  /** Runtime names for every content arm the field renderer understands. */
97
97
  export declare const FIELD_CONTENT_TYPES: readonly ["error", "pending", "unsupported", "text", "single-select", "multi-select", "file", "date", "int", "money", "person", "clip"];
98
- export type WorkspaceFieldContent = FieldContent;
98
+ export type WorkspaceFieldContent = FieldContent & {
99
+ truncated?: true;
100
+ };
99
101
  /**
100
102
  * Minimal structural bound the display layer needs from a property: the cell
101
103
  * renderers only read `content.type` and, for selects, the `options` colors.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/workspace-ui",
3
- "version": "0.12.7",
3
+ "version": "0.13.0",
4
4
  "description": "Reusable workspace presentation components and view helpers for Stella.",
5
5
  "keywords": [
6
6
  "calculations",
@@ -51,6 +51,10 @@
51
51
  "types": "./dist/conditions/index.d.ts",
52
52
  "import": "./dist/conditions/index.js"
53
53
  },
54
+ "./feature-previews": {
55
+ "types": "./dist/feature-previews/index.d.ts",
56
+ "import": "./dist/feature-previews/index.js"
57
+ },
54
58
  "./field-value": {
55
59
  "types": "./dist/field-value.d.ts",
56
60
  "import": "./dist/field-value.js"
@@ -83,6 +87,10 @@
83
87
  "types": "./dist/table-skeleton-rows.d.ts",
84
88
  "import": "./dist/table-skeleton-rows.js"
85
89
  },
90
+ "./task-status": {
91
+ "types": "./dist/task-status.d.ts",
92
+ "import": "./dist/task-status.js"
93
+ },
86
94
  "./types": {
87
95
  "types": "./dist/types.d.ts",
88
96
  "import": "./dist/types.js"
@@ -114,7 +122,7 @@
114
122
  "@stll/calculations": "^0.1.3",
115
123
  "@stll/conditions": "^0.4.0",
116
124
  "@stll/money": "^0.3.1",
117
- "@stll/ui": "^0.50.0",
125
+ "@stll/ui": "^0.51.0",
118
126
  "better-result": "3.0.1",
119
127
  "temporal-polyfill": "1.0.5",
120
128
  "use-intl": "4.14.9"