@stll/workspace-ui 0.12.6 → 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.
- package/README.md +139 -0
- package/dist/feature-previews/billing-preview.d.ts +38 -0
- package/dist/feature-previews/billing-preview.js +160 -0
- package/dist/feature-previews/contacts-preview.d.ts +35 -0
- package/dist/feature-previews/contacts-preview.js +109 -0
- package/dist/feature-previews/documents-preview.d.ts +44 -0
- package/dist/feature-previews/documents-preview.js +105 -0
- package/dist/feature-previews/format.d.ts +16 -0
- package/dist/feature-previews/format.js +20 -0
- package/dist/feature-previews/index.d.ts +9 -0
- package/dist/feature-previews/index.js +7 -0
- package/dist/feature-previews/matters-preview.d.ts +30 -0
- package/dist/feature-previews/matters-preview.js +153 -0
- package/dist/feature-previews/mock-data.d.ts +41 -0
- package/dist/feature-previews/mock-data.js +25 -0
- package/dist/feature-previews/research-preview.d.ts +33 -0
- package/dist/feature-previews/research-preview.js +115 -0
- package/dist/feature-previews/surface.d.ts +34 -0
- package/dist/feature-previews/surface.js +42 -0
- package/dist/feature-previews/time-tracking-preview.d.ts +35 -0
- package/dist/feature-previews/time-tracking-preview.js +135 -0
- package/dist/task-status.d.ts +21 -0
- package/dist/task-status.js +27 -0
- package/dist/types.d.ts +29 -1
- package/package.json +12 -5
|
@@ -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
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { OptionColor, OptionColor as OptionColor$1 } from "@stll/ui/option-color";
|
|
2
2
|
import { KanbanColumnBand } from "@stll/ui/kanban";
|
|
3
3
|
//#region src/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Why a document could not be converted. Mirrors the API contract type; the
|
|
6
|
+
* web app asserts both declarations stay equal.
|
|
7
|
+
*/
|
|
8
|
+
export type FileConversionRefusal = {
|
|
9
|
+
kind: "unsupported_encoding";
|
|
10
|
+
encoding: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "unsupported_reference";
|
|
13
|
+
format: string;
|
|
14
|
+
element: string;
|
|
15
|
+
attribute: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "unsupported_field";
|
|
18
|
+
fieldType: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "legacy_format";
|
|
21
|
+
replacementExtension: ".xlsx" | ".pptx";
|
|
22
|
+
};
|
|
4
23
|
export type FieldContent = {
|
|
5
24
|
type: "error";
|
|
6
25
|
version: 1;
|
|
@@ -32,6 +51,13 @@ export type FieldContent = {
|
|
|
32
51
|
encrypted: boolean;
|
|
33
52
|
sha256Hex: string;
|
|
34
53
|
pdfFileId: string | null;
|
|
54
|
+
pdfDerivative?: {
|
|
55
|
+
status: "not-required" | "pending" | "ready";
|
|
56
|
+
} | {
|
|
57
|
+
status: "failed";
|
|
58
|
+
reason?: "enqueue" | "processing" | "too-large" | undefined;
|
|
59
|
+
conversionRefusal?: FileConversionRefusal | undefined;
|
|
60
|
+
} | undefined;
|
|
35
61
|
} | {
|
|
36
62
|
type: "date";
|
|
37
63
|
version: 1;
|
|
@@ -69,7 +95,9 @@ export type FieldContent = {
|
|
|
69
95
|
};
|
|
70
96
|
/** Runtime names for every content arm the field renderer understands. */
|
|
71
97
|
export declare const FIELD_CONTENT_TYPES: readonly ["error", "pending", "unsupported", "text", "single-select", "multi-select", "file", "date", "int", "money", "person", "clip"];
|
|
72
|
-
export type WorkspaceFieldContent = FieldContent
|
|
98
|
+
export type WorkspaceFieldContent = FieldContent & {
|
|
99
|
+
truncated?: true;
|
|
100
|
+
};
|
|
73
101
|
/**
|
|
74
102
|
* Minimal structural bound the display layer needs from a property: the cell
|
|
75
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.
|
|
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"
|
|
@@ -107,15 +115,14 @@
|
|
|
107
115
|
"typecheck": "bun check --no-pretty --all --project=tsconfig.json",
|
|
108
116
|
"lint": "cd ../.. && bun --bun oxlint -c oxlint.config.ts --report-unused-disable-directives-severity=error --type-aware --type-check packages/workspace-ui",
|
|
109
117
|
"lint:fix": "cd ../.. && bun --bun oxlint -c oxlint.config.ts --type-aware --fix packages/workspace-ui",
|
|
110
|
-
"format": "bun ../../scripts/run-oxfmt.ts .",
|
|
111
118
|
"prepack": "bun run build",
|
|
112
119
|
"test:property": "bun test --preload @stll/property-testing/preload $(grep -rlE 'fc\\.assert|assertProperty' src --include='*.test.ts')"
|
|
113
120
|
},
|
|
114
121
|
"dependencies": {
|
|
115
|
-
"@stll/calculations": "^0.1.
|
|
122
|
+
"@stll/calculations": "^0.1.3",
|
|
116
123
|
"@stll/conditions": "^0.4.0",
|
|
117
124
|
"@stll/money": "^0.3.1",
|
|
118
|
-
"@stll/ui": "^0.
|
|
125
|
+
"@stll/ui": "^0.51.0",
|
|
119
126
|
"better-result": "3.0.1",
|
|
120
127
|
"temporal-polyfill": "1.0.5",
|
|
121
128
|
"use-intl": "4.14.9"
|
|
@@ -129,7 +136,7 @@
|
|
|
129
136
|
"@tanstack/react-table": "9.2.6",
|
|
130
137
|
"@types/react": "^19.3.0",
|
|
131
138
|
"@types/react-dom": "^19.3.0",
|
|
132
|
-
"bun-types": "1.4.
|
|
139
|
+
"bun-types": "1.4.4",
|
|
133
140
|
"fast-check": "^4.10.2",
|
|
134
141
|
"react": "^19.3.0",
|
|
135
142
|
"react-dom": "^19.3.0",
|