@dxos/react-ui-task 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 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.
Files changed (112) hide show
  1. package/dist/lib/index.mjs +2024 -572
  2. package/dist/lib/index.mjs.map +1 -1
  3. package/dist/lib/translations.mjs +31 -1
  4. package/dist/lib/translations.mjs.map +1 -1
  5. package/dist/types/src/components/TaskHistory/TaskHistory.d.ts +13 -0
  6. package/dist/types/src/components/TaskHistory/TaskHistory.d.ts.map +1 -0
  7. package/dist/types/src/components/TaskHistory/TaskHistory.stories.d.ts +68 -0
  8. package/dist/types/src/components/TaskHistory/TaskHistory.stories.d.ts.map +1 -0
  9. package/dist/types/src/components/TaskHistory/index.d.ts +2 -0
  10. package/dist/types/src/components/TaskHistory/index.d.ts.map +1 -0
  11. package/dist/types/src/components/TaskList/TaskDescription.d.ts +20 -0
  12. package/dist/types/src/components/TaskList/TaskDescription.d.ts.map +1 -0
  13. package/dist/types/src/components/TaskList/TaskList.d.ts +122 -57
  14. package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -1
  15. package/dist/types/src/components/TaskList/TaskList.stories.d.ts +163 -5
  16. package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/TaskList/TaskListContext.d.ts +53 -0
  18. package/dist/types/src/components/TaskList/TaskListContext.d.ts.map +1 -0
  19. package/dist/types/src/components/TaskList/TaskListEditor.d.ts +42 -0
  20. package/dist/types/src/components/TaskList/TaskListEditor.d.ts.map +1 -0
  21. package/dist/types/src/components/TaskList/TaskRowCells.d.ts +86 -0
  22. package/dist/types/src/components/TaskList/TaskRowCells.d.ts.map +1 -0
  23. package/dist/types/src/components/TaskList/TaskTreeNode.d.ts +65 -0
  24. package/dist/types/src/components/TaskList/TaskTreeNode.d.ts.map +1 -0
  25. package/dist/types/src/components/TaskList/anchor-hover.d.ts +21 -0
  26. package/dist/types/src/components/TaskList/anchor-hover.d.ts.map +1 -0
  27. package/dist/types/src/components/TaskList/anchor-hover.test.d.ts +2 -0
  28. package/dist/types/src/components/TaskList/anchor-hover.test.d.ts.map +1 -0
  29. package/dist/types/src/components/TaskList/hierarchy.d.ts +13 -26
  30. package/dist/types/src/components/TaskList/hierarchy.d.ts.map +1 -1
  31. package/dist/types/src/components/TaskList/index.d.ts +4 -2
  32. package/dist/types/src/components/TaskList/index.d.ts.map +1 -1
  33. package/dist/types/src/components/TaskList/tracks.d.ts +16 -0
  34. package/dist/types/src/components/TaskList/tracks.d.ts.map +1 -0
  35. package/dist/types/src/components/TaskList/tree-model.d.ts +107 -0
  36. package/dist/types/src/components/TaskList/tree-model.d.ts.map +1 -0
  37. package/dist/types/src/components/TaskList/tree-model.test.d.ts +2 -0
  38. package/dist/types/src/components/TaskList/tree-model.test.d.ts.map +1 -0
  39. package/dist/types/src/components/TaskList/usePreviewAnchor.d.ts +21 -0
  40. package/dist/types/src/components/TaskList/usePreviewAnchor.d.ts.map +1 -0
  41. package/dist/types/src/components/TaskProperties/TaskProperties.d.ts +23 -0
  42. package/dist/types/src/components/TaskProperties/TaskProperties.d.ts.map +1 -0
  43. package/dist/types/src/components/TaskProperties/TaskProperties.stories.d.ts +76 -0
  44. package/dist/types/src/components/TaskProperties/TaskProperties.stories.d.ts.map +1 -0
  45. package/dist/types/src/components/TaskProperties/index.d.ts +2 -0
  46. package/dist/types/src/components/TaskProperties/index.d.ts.map +1 -0
  47. package/dist/types/src/components/TaskQuestion/TaskQuestion.d.ts +22 -0
  48. package/dist/types/src/components/TaskQuestion/TaskQuestion.d.ts.map +1 -0
  49. package/dist/types/src/components/TaskQuestion/index.d.ts +2 -0
  50. package/dist/types/src/components/TaskQuestion/index.d.ts.map +1 -0
  51. package/dist/types/src/components/task-grid.d.ts +18 -0
  52. package/dist/types/src/components/task-grid.d.ts.map +1 -0
  53. package/dist/types/src/hooks/index.d.ts +2 -0
  54. package/dist/types/src/hooks/index.d.ts.map +1 -0
  55. package/dist/types/src/hooks/useAssigneeDisplay.d.ts +8 -0
  56. package/dist/types/src/hooks/useAssigneeDisplay.d.ts.map +1 -0
  57. package/dist/types/src/index.d.ts +6 -1
  58. package/dist/types/src/index.d.ts.map +1 -1
  59. package/dist/types/src/translations.d.ts +31 -1
  60. package/dist/types/src/translations.d.ts.map +1 -1
  61. package/dist/types/src/util/assignee.d.ts +34 -0
  62. package/dist/types/src/util/assignee.d.ts.map +1 -0
  63. package/dist/types/src/util/assignee.test.d.ts +2 -0
  64. package/dist/types/src/util/assignee.test.d.ts.map +1 -0
  65. package/dist/types/src/util/format-date.d.ts +18 -0
  66. package/dist/types/src/util/format-date.d.ts.map +1 -0
  67. package/dist/types/src/util/format-date.test.d.ts +2 -0
  68. package/dist/types/src/util/format-date.test.d.ts.map +1 -0
  69. package/dist/types/src/util/index.d.ts +3 -0
  70. package/dist/types/src/util/index.d.ts.map +1 -0
  71. package/dist/types/src/util/status-icons.d.ts +28 -0
  72. package/dist/types/src/util/status-icons.d.ts.map +1 -0
  73. package/dist/types/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +27 -20
  75. package/src/components/TaskHistory/TaskHistory.stories.tsx +103 -0
  76. package/src/components/TaskHistory/TaskHistory.tsx +169 -0
  77. package/src/components/TaskHistory/index.ts +5 -0
  78. package/src/components/TaskList/TaskDescription.tsx +39 -0
  79. package/src/components/TaskList/TaskList.stories.tsx +1882 -181
  80. package/src/components/TaskList/TaskList.tsx +670 -789
  81. package/src/components/TaskList/TaskListContext.ts +68 -0
  82. package/src/components/TaskList/TaskListEditor.tsx +510 -0
  83. package/src/components/TaskList/TaskRowCells.tsx +362 -0
  84. package/src/components/TaskList/TaskTreeNode.tsx +387 -0
  85. package/src/components/TaskList/anchor-hover.test.ts +84 -0
  86. package/src/components/TaskList/anchor-hover.ts +129 -0
  87. package/src/components/TaskList/hierarchy.test.ts +92 -51
  88. package/src/components/TaskList/hierarchy.ts +45 -63
  89. package/src/components/TaskList/index.ts +5 -2
  90. package/src/components/TaskList/tracks.ts +19 -0
  91. package/src/components/TaskList/tree-model.test.ts +233 -0
  92. package/src/components/TaskList/tree-model.ts +238 -0
  93. package/src/components/TaskList/usePreviewAnchor.ts +85 -0
  94. package/src/components/TaskProperties/TaskProperties.stories.tsx +121 -0
  95. package/src/components/TaskProperties/TaskProperties.tsx +281 -0
  96. package/src/components/TaskProperties/index.ts +5 -0
  97. package/src/components/TaskQuestion/TaskQuestion.tsx +223 -0
  98. package/src/components/TaskQuestion/index.ts +5 -0
  99. package/src/components/task-grid.ts +23 -0
  100. package/src/hooks/index.ts +5 -0
  101. package/src/hooks/useAssigneeDisplay.ts +26 -0
  102. package/src/index.ts +6 -1
  103. package/src/translations.ts +33 -3
  104. package/src/util/assignee.test.ts +73 -0
  105. package/src/util/assignee.ts +69 -0
  106. package/src/util/format-date.test.ts +36 -0
  107. package/src/util/format-date.ts +43 -0
  108. package/src/util/index.ts +6 -0
  109. package/src/util/status-icons.ts +54 -0
  110. package/dist/types/src/components/TaskList/dnd.d.ts +0 -27
  111. package/dist/types/src/components/TaskList/dnd.d.ts.map +0 -1
  112. package/src/components/TaskList/dnd.ts +0 -46
@@ -1,15 +1,45 @@
1
1
  //#region src/translations.ts
2
2
  var translationKey = "@dxos/react-ui-task";
3
3
  var translations = [{ "en-US": { [translationKey]: {
4
+ "task-list.label": "Tasks",
4
5
  "mark-done.label": "Mark done",
5
6
  "mark-todo.label": "Mark todo",
7
+ "status-backlog.label": "Backlog",
6
8
  "status-todo.label": "To Do",
9
+ "status-blocked.label": "Blocked",
7
10
  "status-started.label": "Started",
11
+ "status-review.label": "In Review",
8
12
  "status-done.label": "Done",
9
13
  "status-failed.label": "Failed",
10
14
  "status-cancelled.label": "Cancelled",
15
+ "status-duplicate.label": "Duplicate",
16
+ "task-status.label": "Status",
11
17
  "task-blocked.label": "Blocked",
12
- "delete-task.label": "Delete task"
18
+ "task-priority.label": "Priority",
19
+ "priority-none.label": "None",
20
+ "task-estimate.label": "Estimate",
21
+ "task-properties.label": "Properties",
22
+ "set-priority.label": "Set priority",
23
+ "set-estimate.label": "Set estimate",
24
+ "set-assignee.label": "Set assignee",
25
+ "task-created.label": "Created {{date}}",
26
+ "assignee-none.label": "Unassigned",
27
+ "assignee-agent.label": "Agent",
28
+ "estimate-none.label": "None",
29
+ "priority-low.label": "Low",
30
+ "priority-medium.label": "Medium",
31
+ "priority-high.label": "High",
32
+ "priority-urgent.label": "Urgent",
33
+ "task-actions.label": "Task actions",
34
+ "task-check.label": "Select task",
35
+ "task-title.placeholder": "Task title",
36
+ "add-task.placeholder": "Task title",
37
+ "task-description.placeholder": "Task description",
38
+ "task-history.label": "Activity",
39
+ "question-answer.label": "Your answer",
40
+ "question-answer.placeholder": "Type an answer…",
41
+ "question-submit.label": "Answer",
42
+ "remove-file.label": "Remove {{name}}"
13
43
  } } }];
14
44
  //#endregion
15
45
  export { translationKey, translations };
@@ -1 +1 @@
1
- {"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-task';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'mark-done.label': 'Mark done',\n 'mark-todo.label': 'Mark todo',\n 'status-todo.label': 'To Do',\n 'status-started.label': 'Started',\n 'status-done.label': 'Done',\n 'status-failed.label': 'Failed',\n 'status-cancelled.label': 'Cancelled',\n 'task-blocked.label': 'Blocked',\n 'delete-task.label': 'Delete task',\n },\n },\n },\n] as const satisfies Resource[];\n"],"mappings":";AAMA,IAAa,iBAAiB;AAE9B,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,iBAAiB;CAChB,mBAAmB;CACnB,mBAAmB;CACnB,qBAAqB;CACrB,wBAAwB;CACxB,qBAAqB;CACrB,uBAAuB;CACvB,0BAA0B;CAC1B,sBAAsB;CACtB,qBAAqB;AACvB,EACF,EACF,CACF"}
1
+ {"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport type * as Theme from '@dxos/react-ui/Theme';\n\nexport const translationKey = '@dxos/react-ui-task';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'task-list.label': 'Tasks',\n 'mark-done.label': 'Mark done',\n 'mark-todo.label': 'Mark todo',\n 'status-backlog.label': 'Backlog',\n 'status-todo.label': 'To Do',\n 'status-blocked.label': 'Blocked',\n 'status-started.label': 'Started',\n 'status-review.label': 'In Review',\n 'status-done.label': 'Done',\n 'status-failed.label': 'Failed',\n 'status-cancelled.label': 'Cancelled',\n 'status-duplicate.label': 'Duplicate',\n 'task-status.label': 'Status',\n 'task-blocked.label': 'Blocked',\n 'task-priority.label': 'Priority',\n 'priority-none.label': 'None',\n 'task-estimate.label': 'Estimate',\n 'task-properties.label': 'Properties',\n 'set-priority.label': 'Set priority',\n 'set-estimate.label': 'Set estimate',\n 'set-assignee.label': 'Set assignee',\n 'task-created.label': 'Created {{date}}',\n 'assignee-none.label': 'Unassigned',\n 'assignee-agent.label': 'Agent',\n 'estimate-none.label': 'None',\n 'priority-low.label': 'Low',\n 'priority-medium.label': 'Medium',\n 'priority-high.label': 'High',\n 'priority-urgent.label': 'Urgent',\n 'task-actions.label': 'Task actions',\n 'task-check.label': 'Select task',\n 'task-title.placeholder': 'Task title',\n 'add-task.placeholder': 'Task title',\n 'task-description.placeholder': 'Task description',\n 'task-history.label': 'Activity',\n 'question-answer.label': 'Your answer',\n 'question-answer.placeholder': 'Type an answer…',\n 'question-submit.label': 'Answer',\n 'remove-file.label': 'Remove {{name}}',\n },\n },\n },\n] as const satisfies Theme.Resource[];\n"],"mappings":";AAMA,IAAa,iBAAiB;AAE9B,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,iBAAiB;CAChB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,wBAAwB;CACxB,qBAAqB;CACrB,wBAAwB;CACxB,wBAAwB;CACxB,uBAAuB;CACvB,qBAAqB;CACrB,uBAAuB;CACvB,0BAA0B;CAC1B,0BAA0B;CAC1B,qBAAqB;CACrB,sBAAsB;CACtB,uBAAuB;CACvB,uBAAuB;CACvB,uBAAuB;CACvB,yBAAyB;CACzB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,uBAAuB;CACvB,wBAAwB;CACxB,uBAAuB;CACvB,sBAAsB;CACtB,yBAAyB;CACzB,uBAAuB;CACvB,yBAAyB;CACzB,sBAAsB;CACtB,oBAAoB;CACpB,0BAA0B;CAC1B,wBAAwB;CACxB,gCAAgC;CAChC,sBAAsB;CACtB,yBAAyB;CACzB,+BAA+B;CAC/B,yBAAyB;CACzB,qBAAqB;AACvB,EACF,EACF,CACF"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type * as Util from '@dxos/react-ui/Util';
3
+ import { Task } from '@dxos/types';
4
+ export type TaskHistoryProps = Util.ThemedClassName<{
5
+ entries: readonly Task.HistoryEntry[];
6
+ /** Entries to show, newest first; the rest are left to a surface with room for them. */
7
+ limit?: number;
8
+ }>;
9
+ export declare function TaskHistory({ entries, limit, classNames }: TaskHistoryProps): React.JSX.Element | null;
10
+ export declare namespace TaskHistory {
11
+ var displayName: string;
12
+ }
13
+ //# sourceMappingURL=TaskHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskHistory.d.ts","sourceRoot":"","sources":["../../../../../src/components/TaskHistory/TaskHistory.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAgCnC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;IAClD,OAAO,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,CAAC;IACtC,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;oCA6DyB,EAAE,OAAO,EAAE,KAAS,EAAE,UAAU,EAAE,EAAE,gBAAgB"}
@@ -0,0 +1,68 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ import { Task } from '@dxos/types';
4
+ declare const DefaultStory: ({ seed }: {
5
+ seed?: () => Task.Task;
6
+ }) => React.JSX.Element;
7
+ declare const meta: {
8
+ title: string;
9
+ render: typeof DefaultStory;
10
+ decorators: import("@storybook/react").Decorator[];
11
+ parameters: {
12
+ translations: [{
13
+ readonly 'en-US': {
14
+ readonly "@dxos/react-ui-task": {
15
+ readonly 'task-list.label': 'Tasks';
16
+ readonly 'mark-done.label': 'Mark done';
17
+ readonly 'mark-todo.label': 'Mark todo';
18
+ readonly 'status-backlog.label': 'Backlog';
19
+ readonly 'status-todo.label': 'To Do';
20
+ readonly 'status-blocked.label': 'Blocked';
21
+ readonly 'status-started.label': 'Started';
22
+ readonly 'status-review.label': 'In Review';
23
+ readonly 'status-done.label': 'Done';
24
+ readonly 'status-failed.label': 'Failed';
25
+ readonly 'status-cancelled.label': 'Cancelled';
26
+ readonly 'status-duplicate.label': 'Duplicate';
27
+ readonly 'task-status.label': 'Status';
28
+ readonly 'task-blocked.label': 'Blocked';
29
+ readonly 'task-priority.label': 'Priority';
30
+ readonly 'priority-none.label': 'None';
31
+ readonly 'task-estimate.label': 'Estimate';
32
+ readonly 'task-properties.label': 'Properties';
33
+ readonly 'set-priority.label': 'Set priority';
34
+ readonly 'set-estimate.label': 'Set estimate';
35
+ readonly 'set-assignee.label': 'Set assignee';
36
+ readonly 'task-created.label': 'Created {{date}}';
37
+ readonly 'assignee-none.label': 'Unassigned';
38
+ readonly 'assignee-agent.label': 'Agent';
39
+ readonly 'estimate-none.label': 'None';
40
+ readonly 'priority-low.label': 'Low';
41
+ readonly 'priority-medium.label': 'Medium';
42
+ readonly 'priority-high.label': 'High';
43
+ readonly 'priority-urgent.label': 'Urgent';
44
+ readonly 'task-actions.label': 'Task actions';
45
+ readonly 'task-check.label': 'Select task';
46
+ readonly 'task-title.placeholder': 'Task title';
47
+ readonly 'add-task.placeholder': 'Task title';
48
+ readonly 'task-description.placeholder': 'Task description';
49
+ readonly 'task-history.label': 'Activity';
50
+ readonly 'question-answer.label': 'Your answer';
51
+ readonly 'question-answer.placeholder': 'Type an answer…';
52
+ readonly 'question-submit.label': 'Answer';
53
+ readonly 'remove-file.label': 'Remove {{name}}';
54
+ };
55
+ };
56
+ }];
57
+ };
58
+ };
59
+ export default meta;
60
+ type Story = StoryObj<typeof meta>;
61
+ export declare const Default: Story;
62
+ /**
63
+ * An answered question is one entry — the question with its answer under it — dated when it was
64
+ * answered; an open question is not in the log, since it is waiting on the reader rather than a
65
+ * record of what happened.
66
+ */
67
+ export declare const TestQuestionsInActivity: Story;
68
+ //# sourceMappingURL=TaskHistory.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskHistory.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TaskHistory/TaskHistory.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAyCnC,QAAA,MAAM,YAAY,aAAyB;IAAE,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,CAAA;CAAE,sBAWpE,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAmBrC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './TaskHistory.tsx';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TaskHistory/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type MarkdownViewProps } from '@dxos/react-ui-markdown';
3
+ import type * as Util from '@dxos/react-ui/Util';
4
+ /** A description is a line in a row, not a document: no paragraph block, no heading scale. */
5
+ export declare const DESCRIPTION_COMPONENTS: {
6
+ p: ({ children }: PropsWithChildren) => React.JSX.Element;
7
+ };
8
+ export type TaskDescriptionProps = Util.ThemedClassName<{
9
+ content: string;
10
+ /** Renderers beyond the row's own — a host's link anchor, say. */
11
+ components?: MarkdownViewProps['components'];
12
+ }>;
13
+ /**
14
+ * A task's description as it appears in a row. Shared by the flat list and the tree so the two
15
+ * paths cannot drift on type scale or clamping; only the placement differs, which is the caller's
16
+ * to supply — the flat row puts it in its own subgrid cell, the tree stacks it under the title
17
+ * inside the heading.
18
+ */
19
+ export declare const TaskDescription: ({ content, components, classNames }: TaskDescriptionProps) => React.JSX.Element;
20
+ //# sourceMappingURL=TaskDescription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../../../../src/components/TaskList/TaskDescription.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAGjD,8FAA8F;AAC9F,eAAO,MAAM,sBAAsB;IACjC,CAAC,iBAAiB,iBAAiB;CACpC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAC9C,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,sBAWxF,CAAC"}
@@ -1,38 +1,96 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type Actor, type Task } from '@dxos/types';
2
+ import { type MenuItem } from '@dxos/react-ui-menu';
3
+ import { type Actor, Task } from '@dxos/types';
3
4
  import { type ComposableProps } from '@dxos/ui-types';
4
- import { type TaskPlacement, type TaskTreeRow } from './hierarchy';
5
- /** Linear-style status groups, most active first. */
6
- export declare const STATUS_ORDER: Task.Status[];
7
- export type TaskPatch = Partial<Pick<Task.Task, 'title' | 'status' | 'priority' | 'estimate' | 'assignee'>>;
5
+ import { type TaskPlacement } from './hierarchy.ts';
6
+ import { type TaskDescriptionProps } from './TaskDescription.tsx';
7
+ import { type TaskListEditorProps } from './TaskListEditor.tsx';
8
+ import { type TaskSelectModifiers } from './TaskTreeNode.tsx';
9
+ import { type TaskGroup } from './tree-model.ts';
8
10
  type TaskListRootProps = PropsWithChildren<{
9
11
  tasks: readonly Task.Task[];
10
- /** Group rows into status sections (Linear order); flat list otherwise. */
12
+ /**
13
+ * Group rows into status sections (Linear order); flat list otherwise.
14
+ */
11
15
  groupByStatus?: boolean;
16
+ /**
17
+ * Partition the rows under collapsible group headers, each with its count — the host decides the
18
+ * partition (by status, priority, assignee, milestone…) and the order, of groups and within each.
19
+ * Supersedes `groupByStatus`. With `hierarchical`, sub-tasks still nest under a parent in the same
20
+ * group. A group's collapsed state lives in `collapsed` beside the branches', under the group's
21
+ * node id (`taskGroupNodeId`).
22
+ */
23
+ groups?: readonly TaskGroup[];
24
+ /**
25
+ * Render the set as the tree it stores (`Task.subtasks`), not as status groups — the two are
26
+ * mutually exclusive, since a tree regrouped by status is no longer a tree.
27
+ */
28
+ hierarchical?: boolean;
29
+ /**
30
+ * Ids of the branches whose sub-tasks are hidden (controlled). Collapsed rather than expanded
31
+ * ids, because a branch is open by default: tracking the expanded set would render a task's new
32
+ * first sub-task hidden, the moment adding it made its parent a branch. Per viewer and per list —
33
+ * a collapsed branch is not a property of the work — so this is state, not stored on the object.
34
+ */
35
+ collapsed?: ReadonlySet<string>;
36
+ /**
37
+ * Selected task id (controlled); omit to let the list track the last row clicked.
38
+ */
39
+ selected?: string;
40
+ /**
41
+ * Makes the list selectable without a controlled `selected` or an `onTaskSelect` — for a host
42
+ * whose selection consumers (e.g. `Edit`) live inside the list's own context.
43
+ */
44
+ selectable?: boolean;
45
+ /**
46
+ * Ids of the checked rows (controlled, and only meaningful with `onTaskCheck`). Deliberately
47
+ * separate from `selected`: the current row is where the reader is, the checked set is what an
48
+ * action will act on, and a row is routinely both.
49
+ */
50
+ checked?: ReadonlySet<string>;
12
51
  /** Render the status heading above each group; grouping order is kept either way. */
13
52
  showGroupLabels?: boolean;
14
- /** Number rows by their position in `tasks` (set order), so tasks can be referenced by ordinal. */
53
+ /** Number rows 1..N down the list as rendered, so tasks can be referenced by ordinal. */
15
54
  showOrdinals?: boolean;
16
- /** Render each task's description under its title; rows grow to fit. Off by default, so a
17
- * single-line list (e.g. the chat strip) keeps one row per task. */
18
- showDescriptions?: boolean;
19
- /** i18n hook for group headings; defaults to English labels. */
20
- statusLabel?: (status: Task.Status) => string;
21
- /** Enables `Create`; called with the trimmed title. */
22
- onTaskCreate?: (title: string) => void;
23
- /** Enables the done toggle. Every mutation is delegated — the list never writes. */
24
- onTaskUpdate?: (task: Task.Task, patch: TaskPatch) => void;
25
- /** Enables the per-row delete affordance. */
26
- onTaskDelete?: (task: Task.Task) => void;
27
- /** Row click. Wiring it (or `selected`) makes the list selectable, so the row shows as selected. */
28
- onTaskSelect?: (task: Task.Task) => void;
29
- /** Selected task id (controlled); omit to let the list track the last row clicked. */
30
- selected?: string;
55
+ /** Render each task's estimate beside the priority control. Off by default. */
56
+ showEstimates?: boolean;
57
+ /** Render who holds each task; off collapses the assignee track. On by default. */
58
+ showAssignees?: boolean;
59
+ /** Render each task's mnemonic before its title. On by default. */
60
+ showMnemonics?: boolean;
61
+ /** Rows and the edit pane run to the host's edges, with no inline inset (a list inside a framed host). */
62
+ flush?: boolean;
31
63
  /**
32
- * Render the set as the tree it stores (`Task.parentTask`), not as status groups — the two are
33
- * mutually exclusive, since a tree regrouped by status is no longer a tree.
64
+ * Render each task's description under its title; rows grow to fit. Off by default, so a
65
+ * single-line list (e.g. the chat strip) keeps one row per task.
34
66
  */
35
- hierarchical?: boolean;
67
+ showDescription?: boolean;
68
+ /** Renderers for a row's description beyond its own — a host's link anchor, say. */
69
+ descriptionComponents?: TaskDescriptionProps['components'];
70
+ /**
71
+ * Trailing menu for a row. One item renders as a plain icon button, several as a `…` menu, none as
72
+ * nothing — so delete is an ordinary contributed action rather than a special case of its own.
73
+ */
74
+ getTaskActions?: (task: Task.Task) => MenuItem[];
75
+ /**
76
+ * Enables `Create`; called with a draft carrying at least the trimmed title, and the files dropped
77
+ * on the create pane (`Editor`'s `acceptFiles`) for the host to store and attach once it exists.
78
+ */
79
+ onTaskCreate?: TaskCreateHandler;
80
+ /**
81
+ * Enables the row's edit controls. Every mutation is delegated.
82
+ */
83
+ onTaskUpdate?: (task: Task.Task, patch: Task.Edit) => void;
84
+ /**
85
+ * Row click, and `Escape` — which passes `undefined`, since a reader needs a way back out of a
86
+ * selection. Wiring it (or `selected`) makes the list selectable, so the row shows as selected.
87
+ */
88
+ onTaskSelect?: (task: Task.Task | undefined, modifiers?: TaskSelectModifiers) => void;
89
+ /**
90
+ * Enables the gutter checkbox, called with the row toggled. The host owns the set — this list is
91
+ * embedded in surfaces whose toolbars read the same selection — so nothing is tracked here.
92
+ */
93
+ onTaskCheck?: (task: Task.Task) => void;
36
94
  /**
37
95
  * Enables restructuring by drag and by keyboard; called with the one move the gesture means.
38
96
  * `MoveTask` takes exactly this pair, so a drop is a single mutation rather than a re-parent
@@ -40,58 +98,65 @@ type TaskListRootProps = PropsWithChildren<{
40
98
  */
41
99
  onTaskMove?: (task: Task.Task, placement: TaskPlacement) => void;
42
100
  /**
43
- * Ids of the branches whose sub-tasks are hidden (controlled). Collapsed rather than expanded
44
- * ids, because a branch is open by default: tracking the expanded set would render a task's new
45
- * first sub-task hidden, the moment adding it made its parent a branch. Per viewer and per list —
46
- * a collapsed branch is not a property of the work — so this is state, not stored on the object.
101
+ * Enables collapsing/expanding a task's sub-tasks; called with the new set of collapsed ids.
47
102
  */
48
- collapsed?: ReadonlySet<string>;
49
103
  onCollapsedChange?: (collapsed: ReadonlySet<string>) => void;
50
104
  }>;
105
+ /**
106
+ * What a create came to. `error` means no task was created, so the pane keeps the whole draft;
107
+ * `rejectedFiles` are files the task was created without, which the pane keeps to retry. Nothing
108
+ * (or neither field) means the task and every file were taken.
109
+ */
110
+ export type TaskCreateResult = {
111
+ error?: unknown;
112
+ rejectedFiles?: readonly File[];
113
+ };
114
+ /** Creates a task from the pane's draft; see {@link TaskCreateResult} for what it may report back. */
115
+ export type TaskCreateHandler = (task: Task.Draft, files?: readonly File[]) => void | TaskCreateResult | Promise<void | TaskCreateResult>;
51
116
  declare const TaskListRoot: {
52
- ({ children, tasks, groupByStatus, showGroupLabels, showOrdinals, showDescriptions, statusLabel, onTaskCreate, onTaskUpdate, onTaskDelete, onTaskSelect, onTaskMove, selected: selectedProp, hierarchical, collapsed, onCollapsedChange, }: TaskListRootProps): React.JSX.Element;
117
+ ({ children, tasks, groupByStatus, groups, showGroupLabels, showOrdinals, showDescription, descriptionComponents, showEstimates, showAssignees, showMnemonics, flush, hierarchical, collapsed, selected: selectedProp, selectable: selectableProp, checked, getTaskActions, onTaskCreate, onTaskUpdate, onTaskSelect, onTaskCheck, onTaskMove, onCollapsedChange, }: TaskListRootProps): React.JSX.Element;
118
+ displayName: string;
119
+ };
120
+ type TaskListViewportProps = ComposableProps<{
121
+ /** Caps the height at exactly this many rows, so a longer list scrolls without showing a partial row. */
122
+ rows?: number;
123
+ }>;
124
+ /**
125
+ * No props: the part renders no element of its own — it is the tree, which takes neither a class
126
+ * list nor a ref, so anything accepted here would be dropped silently.
127
+ */
128
+ type TaskListContentProps = {};
129
+ declare const TaskListContent: {
130
+ (_props: TaskListContentProps): React.JSX.Element;
53
131
  displayName: string;
54
132
  };
55
- type TaskListViewportProps = ComposableProps;
56
- type TaskListContentProps = ComposableProps;
57
133
  type TaskListGroupLabelProps = ComposableProps;
58
- type TaskListItemProps = ComposableProps<{
134
+ export declare function TaskTags({ task }: {
59
135
  task: Task.Task;
60
- ordinal?: number;
61
- row?: TaskTreeRow;
62
- }>;
63
- type TaskListCreateProps = ComposableProps<{
64
- placeholder?: string;
65
- }>;
136
+ }): React.JSX.Element;
137
+ export declare namespace TaskTags {
138
+ var displayName: string;
139
+ }
66
140
  type TaskListAssigneeProps = {
67
141
  assignee: Actor.Actor;
142
+ /** Shows the glyph alone, naming the assignee on hover — for a row where the name crowds the title. */
143
+ iconOnly?: boolean;
68
144
  };
69
145
  export declare const TaskList: {
70
146
  Root: typeof TaskListRoot;
71
- Viewport: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
147
+ Viewport: React.ForwardRefExoticComponent<Omit<TaskListViewportProps, "className"> & {
72
148
  classNames?: import("@dxos/ui-types").ClassNameValue;
73
149
  } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
74
- Content: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
75
- classNames?: import("@dxos/ui-types").ClassNameValue;
76
- } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLUListElement>>;
150
+ Content: typeof TaskListContent;
77
151
  GroupLabel: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
78
152
  classNames?: import("@dxos/ui-types").ClassNameValue;
79
153
  } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
80
- Item: React.ForwardRefExoticComponent<Omit<{
81
- task: Task.Task;
82
- ordinal?: number;
83
- row?: TaskTreeRow;
84
- }, "className"> & {
85
- classNames?: import("@dxos/ui-types").ClassNameValue;
86
- } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLLIElement>>;
87
- Create: React.ForwardRefExoticComponent<Omit<{
88
- placeholder?: string;
89
- }, "className"> & {
90
- classNames?: import("@dxos/ui-types").ClassNameValue;
91
- } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
92
154
  Assignee: React.ForwardRefExoticComponent<Omit<TaskListAssigneeProps, "className"> & {
93
155
  classNames?: import("@dxos/ui-types").ClassNameValue;
94
156
  } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLSpanElement>>;
157
+ Editor: React.ForwardRefExoticComponent<Omit<TaskListEditorProps, "className"> & {
158
+ classNames?: import("@dxos/ui-types").ClassNameValue;
159
+ } & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
95
160
  };
96
- export type { TaskListAssigneeProps, TaskListContentProps, TaskListCreateProps, TaskListGroupLabelProps, TaskListItemProps, TaskListRootProps, TaskListViewportProps, };
161
+ export type { TaskListAssigneeProps, TaskListContentProps, TaskListEditorProps, TaskListGroupLabelProps, TaskListRootProps, TaskListViewportProps, };
97
162
  //# sourceMappingURL=TaskList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../../../../../src/components/TaskList/TaskList.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,EAIZ,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAef,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAW,MAAM,aAAa,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,OAAO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I,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,GAAG,gBAAgB,CAAC,CAAC;AAEhE,QAAA,MAAM,YAAY;yWAyBf,iBAAiB;;CA+FnB,CAAC;AASF,KAAK,qBAAqB,GAAG,eAAe,CAAC;IAC3C,yGAAyG;IACzG,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AA4EH;;;GAGG;AACH,KAAK,oBAAoB,GAAG,EAAE,CAAC;AAE/B,QAAA,MAAM,eAAe;aAAY,oBAAoB;;CA0EpD,CAAC;AAQF,KAAK,uBAAuB,GAAG,eAAe,CAAC;iCAiNtB,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAA;CAAE;;;;AA+FtD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAyDF,eAAO,MAAM,QAAQ;IACnB,IAAI;IACJ,QAAQ;;;IACR,OAAO;IACP,UAAU;;;IACV,QAAQ;;;IACR,MAAM;;;CACP,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,GACtB,CAAC"}
@@ -1,11 +1,27 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- declare const DefaultStory: ({ readonly, showGroupLabels, showOrdinals, showDescriptions, hierarchical, }: {
3
+ import { Task } from '@dxos/types';
4
+ declare const DefaultStory: ({ seed, readonly, draggable, checkable, hierarchical, groupByStatus, showGroupLabels, showOrdinals, showDescription, showEstimates, acceptFiles, }: {
5
+ /**
6
+ * The tasks to start from. A factory rather than a named fixture, so a story can compose its own
7
+ * (`() => seedMany(100)`) without a union to extend — and because `useState` reads its initial
8
+ * value once, which is what made the booleans this replaces useless as live controls.
9
+ */
10
+ seed?: () => Task.Task[];
4
11
  readonly?: boolean;
12
+ /** Wire `onTaskMove`, which is what turns rows into drag sources. Off unless a story asks. */
13
+ draggable?: boolean;
14
+ /** Wire `onTaskCheck`, which puts a checkbox in the gutter where the ordinal would sit. */
15
+ checkable?: boolean;
16
+ hierarchical?: boolean;
17
+ /** Group tasks under status headers. */
18
+ groupByStatus?: boolean;
5
19
  showGroupLabels?: boolean;
6
20
  showOrdinals?: boolean;
7
- showDescriptions?: boolean;
8
- hierarchical?: boolean;
21
+ showDescription?: boolean;
22
+ showEstimates?: boolean;
23
+ /** Let the create pane take dropped files, recording what each create was handed. */
24
+ acceptFiles?: boolean;
9
25
  }) => React.JSX.Element;
10
26
  declare const meta: {
11
27
  title: string;
@@ -15,15 +31,45 @@ declare const meta: {
15
31
  translations: [{
16
32
  readonly 'en-US': {
17
33
  readonly "@dxos/react-ui-task": {
34
+ readonly 'task-list.label': 'Tasks';
18
35
  readonly 'mark-done.label': 'Mark done';
19
36
  readonly 'mark-todo.label': 'Mark todo';
37
+ readonly 'status-backlog.label': 'Backlog';
20
38
  readonly 'status-todo.label': 'To Do';
39
+ readonly 'status-blocked.label': 'Blocked';
21
40
  readonly 'status-started.label': 'Started';
41
+ readonly 'status-review.label': 'In Review';
22
42
  readonly 'status-done.label': 'Done';
23
43
  readonly 'status-failed.label': 'Failed';
24
44
  readonly 'status-cancelled.label': 'Cancelled';
45
+ readonly 'status-duplicate.label': 'Duplicate';
46
+ readonly 'task-status.label': 'Status';
25
47
  readonly 'task-blocked.label': 'Blocked';
26
- readonly 'delete-task.label': 'Delete task';
48
+ readonly 'task-priority.label': 'Priority';
49
+ readonly 'priority-none.label': 'None';
50
+ readonly 'task-estimate.label': 'Estimate';
51
+ readonly 'task-properties.label': 'Properties';
52
+ readonly 'set-priority.label': 'Set priority';
53
+ readonly 'set-estimate.label': 'Set estimate';
54
+ readonly 'set-assignee.label': 'Set assignee';
55
+ readonly 'task-created.label': 'Created {{date}}';
56
+ readonly 'assignee-none.label': 'Unassigned';
57
+ readonly 'assignee-agent.label': 'Agent';
58
+ readonly 'estimate-none.label': 'None';
59
+ readonly 'priority-low.label': 'Low';
60
+ readonly 'priority-medium.label': 'Medium';
61
+ readonly 'priority-high.label': 'High';
62
+ readonly 'priority-urgent.label': 'Urgent';
63
+ readonly 'task-actions.label': 'Task actions';
64
+ readonly 'task-check.label': 'Select task';
65
+ readonly 'task-title.placeholder': 'Task title';
66
+ readonly 'add-task.placeholder': 'Task title';
67
+ readonly 'task-description.placeholder': 'Task description';
68
+ readonly 'task-history.label': 'Activity';
69
+ readonly 'question-answer.label': 'Your answer';
70
+ readonly 'question-answer.placeholder': 'Type an answer…';
71
+ readonly 'question-submit.label': 'Answer';
72
+ readonly 'remove-file.label': 'Remove {{name}}';
27
73
  };
28
74
  };
29
75
  }];
@@ -32,11 +78,123 @@ declare const meta: {
32
78
  export default meta;
33
79
  type Story = StoryObj<typeof meta>;
34
80
  export declare const Default: Story;
81
+ /** No description line, as the chat's checklist shows it: the add row is exactly one task row tall. */
82
+ export declare const WithoutDescription: Story;
83
+ /** A list long enough to scroll, group and number into double digits. */
84
+ export declare const ManyTasks: Story;
35
85
  export declare const Readonly: Story;
36
86
  export declare const WithoutGroupLabels: Story;
37
87
  export declare const WithOrdinals: Story;
88
+ /** The gutter's checkbox: the set an action acts on, in place of the ordinal that would sit there. */
89
+ export declare const WithCheckboxes: Story;
38
90
  export declare const WithDescriptions: Story;
91
+ export declare const WithQuestions: Story;
92
+ /**
93
+ * A task's questions live on the detail surface, not in the list: a row carries its title and its
94
+ * description, and the strip below carries the fields. Answering is `TaskArticle`'s, and is covered
95
+ * where it happens — plugin-projects' `ProjectArticle` › Task Detail story.
96
+ */
97
+ export declare const TestNoQuestionsInList: Story;
98
+ export declare const TestListAndDetail: Story;
99
+ /** Every block the default renderer pads or rescales — heading, code, quote, list — inside the clamp. */
100
+ export declare const TestDescriptionClamp: Story;
101
+ /** A paragraph run into a list, so the clamp falls between two list items. */
102
+ export declare const TestDescriptionClampList: Story;
39
103
  export declare const Hierarchical: Story;
104
+ /** Three levels of three: indentation past the second level, and the columns holding at every depth. */
105
+ export declare const DeepHierarchy: Story;
106
+ /** Rows are drag sources: `onTaskMove` is wired, so the tree publishes each row to pragmatic-dnd. */
107
+ export declare const HierarchicalDraggable: Story;
108
+ /**
109
+ * The minimal `A > B, C` shape TREE.md reasons the six landing places about. Small enough that every zone is reachable without scrolling, which is what makes it the fixture to
110
+ * check a hitbox change against.
111
+ */
112
+ export declare const DropZones: Story;
113
+ /**
114
+ * Status groups rendered through the tree: headers are `disposition: 'group'` nodes, spliced out of
115
+ * the collection's topology so the keyboard never lands on one.
116
+ */
117
+ export declare const GroupedTree: Story;
118
+ /**
119
+ * The status glyph spins for a task an agent has taken and started — and only then.
120
+ *
121
+ * Both halves matter: `started` alone is a person working, and an agent assignee alone is work that
122
+ * is queued. The seed carries one of each, so a rule that dropped either half fails here.
123
+ */
124
+ export declare const TestAgentSpinner: Story;
125
+ /**
126
+ * A row shows no artifact other than a pull request: a task whose only artifact is a document holds
127
+ * no chips line, and its title keeps the row's width.
128
+ */
129
+ export declare const TestArtifactsHiddenInRow: Story;
130
+ /**
131
+ * Tasks whose artifacts are a GitHub pull request, an image and a video (each a `File` owning a
132
+ * `Blob`), beside a task blocked on a question in its history. The row shows only the pull request,
133
+ * whose pill opens its preview.
134
+ */
135
+ export declare const WithArtifacts: Story;
136
+ /**
137
+ * Tags render as chips with the task's artifacts — a line of their own under the title, starting
138
+ * where the title cell does and above the description — while the assignee stays on the title line,
139
+ * right-aligned before the trailing controls.
140
+ */
141
+ export declare const WithTags: Story;
142
+ /** A pull request, the one artifact a row shows, shows its summary on hover and opens on click. */
143
+ export declare const TestArtifactPreviews: Story;
144
+ /**
145
+ * Checking is selection, not a status write, and it is not the current row either: the box toggles
146
+ * independently of which row the reader is on, and leaves the task's status alone.
147
+ */
148
+ export declare const TestCheckboxSelection: Story;
149
+ export declare const TestEdit: Story;
150
+ /**
151
+ * Creating with a description: the pane's description field is present with nothing selected, and
152
+ * what is typed into it reaches `onTaskCreate` as part of the same draft as the title.
153
+ */
154
+ /**
155
+ * A create the host refuses keeps the draft, so nothing typed is lost; one that lands late does not
156
+ * clear text typed while it was pending.
157
+ */
158
+ export declare const TestCreateFailureKeepsDraft: Story;
159
+ /**
160
+ * Files dropped on the create pane are held there, one chip each, until the task is created — then
161
+ * they are handed over with it, for the host to store and attach. A chip can be taken back first.
162
+ */
163
+ export declare const TestCreateWithAttachments: Story;
164
+ export declare const TestCreateWithDescription: Story;
165
+ /**
166
+ * A description typed while creating, then abandoned by selecting a row, must not ride along into
167
+ * the NEXT task created. The field remounts empty on the way back, but committing an already-empty
168
+ * field never calls back — so the mirror the create reads has to be cleared with the selection.
169
+ */
170
+ export declare const TestAbandonedDescriptionDoesNotLeak: Story;
171
+ /**
172
+ * Cmd/Ctrl-Enter in the description saves, as the Save button does: for an edit it writes the
173
+ * pending text and leaves, and for a create it adds the task — without CodeMirror inserting a line
174
+ * first. With no title to create from, the key does nothing.
175
+ */
176
+ export declare const TestSaveDescriptionWithModEnter: Story;
177
+ /**
178
+ * With `showDescription` off the pane is title-only, even for a selected task the list can update —
179
+ * which is what a host with no room for a markdown field (the chat strip) renders.
180
+ */
181
+ export declare const TestEditWithoutDescription: Story;
182
+ /**
183
+ * `Tab` indents the focused task under its previous sibling and `Shift+Tab` outdents it to follow its
184
+ * parent — the outliner keys — and `Shift+ArrowUp`/`Down` move it among its siblings. `Tab` from a
185
+ * control inside the row still moves focus, and a `Tab` that cannot indent leaves focus to travel.
186
+ */
187
+ export declare const TestTabIndent: Story;
188
+ /**
189
+ * Status grouping reorders rows against the set's array, so the gutter has to number what is on
190
+ * screen: 1..N from the top, with no gaps and nothing out of sequence.
191
+ */
192
+ export declare const TestOrdinalsAreLinear: Story;
40
193
  export declare const TestHierarchy: Story;
41
- export declare const Test: Story;
194
+ /**
195
+ * A row's status picker builds its menu on the first click rather than with the row, so a list of
196
+ * 200 rows does not build 200 menu machines for menus nobody opens. The gesture has to survive that:
197
+ * nothing exists until the click, the click offers every status, and picking one writes it.
198
+ */
199
+ export declare const TestStatusPickerBuildsOnFirstClick: Story;
42
200
  //# sourceMappingURL=TaskList.stories.d.ts.map