@dxos/plugin-kanban 0.8.4-main.f5c0578 → 0.8.4-main.fcfe5033a5

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 (218) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +27 -0
  2. package/dist/lib/browser/blueprints/index.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-A3PBV3S5.mjs +105 -0
  4. package/dist/lib/browser/chunk-A3PBV3S5.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  6. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  7. package/dist/lib/browser/delete-card-VPNVIWOA.mjs +32 -0
  8. package/dist/lib/browser/delete-card-VPNVIWOA.mjs.map +7 -0
  9. package/dist/lib/browser/delete-card-field-4HHF2GYX.mjs +50 -0
  10. package/dist/lib/browser/delete-card-field-4HHF2GYX.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +101 -79
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/operations/index.mjs +13 -0
  15. package/dist/lib/browser/operations/index.mjs.map +7 -0
  16. package/dist/lib/browser/restore-card-4GG2RYKR.mjs +29 -0
  17. package/dist/lib/browser/restore-card-4GG2RYKR.mjs.map +7 -0
  18. package/dist/lib/browser/restore-card-field-3T26ACYX.mjs +48 -0
  19. package/dist/lib/browser/restore-card-field-3T26ACYX.mjs.map +7 -0
  20. package/dist/lib/browser/types/index.mjs +94 -7
  21. package/dist/lib/browser/types/index.mjs.map +4 -4
  22. package/dist/lib/node-esm/blueprints/index.mjs +28 -0
  23. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  24. package/dist/lib/node-esm/chunk-6LELYA2G.mjs +106 -0
  25. package/dist/lib/node-esm/chunk-6LELYA2G.mjs.map +7 -0
  26. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  27. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  28. package/dist/lib/node-esm/delete-card-5PW5OMFN.mjs +33 -0
  29. package/dist/lib/node-esm/delete-card-5PW5OMFN.mjs.map +7 -0
  30. package/dist/lib/node-esm/delete-card-field-KPJU2AQ3.mjs +51 -0
  31. package/dist/lib/node-esm/delete-card-field-KPJU2AQ3.mjs.map +7 -0
  32. package/dist/lib/node-esm/index.mjs +101 -79
  33. package/dist/lib/node-esm/index.mjs.map +4 -4
  34. package/dist/lib/node-esm/meta.json +1 -1
  35. package/dist/lib/node-esm/operations/index.mjs +14 -0
  36. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  37. package/dist/lib/node-esm/restore-card-X2TKMU5A.mjs +30 -0
  38. package/dist/lib/node-esm/restore-card-X2TKMU5A.mjs.map +7 -0
  39. package/dist/lib/node-esm/restore-card-field-IUTL4RTR.mjs +49 -0
  40. package/dist/lib/node-esm/restore-card-field-IUTL4RTR.mjs.map +7 -0
  41. package/dist/lib/node-esm/types/index.mjs +94 -7
  42. package/dist/lib/node-esm/types/index.mjs.map +4 -4
  43. package/dist/types/src/KanbanPlugin.d.ts +2 -1
  44. package/dist/types/src/KanbanPlugin.d.ts.map +1 -1
  45. package/dist/types/src/blueprints/index.d.ts +2 -0
  46. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  47. package/dist/types/src/blueprints/kanban-blueprint.d.ts +4 -0
  48. package/dist/types/src/blueprints/kanban-blueprint.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/artifact-definition.d.ts +3 -2
  50. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  52. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  53. package/dist/types/src/capabilities/index.d.ts +6 -2
  54. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  56. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  57. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  58. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  59. package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
  60. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
  61. package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts +57 -0
  62. package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts.map +1 -0
  63. package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts +72 -0
  64. package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts.map +1 -0
  65. package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts +10 -0
  66. package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts.map +1 -0
  67. package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts +9 -0
  68. package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts.map +1 -0
  69. package/dist/types/src/components/KanbanBoard/index.d.ts +2 -0
  70. package/dist/types/src/components/KanbanBoard/index.d.ts.map +1 -0
  71. package/dist/types/src/components/index.d.ts +1 -2
  72. package/dist/types/src/components/index.d.ts.map +1 -1
  73. package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts +6 -0
  74. package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts.map +1 -0
  75. package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts +79 -0
  76. package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts.map +1 -0
  77. package/dist/types/src/containers/KanbanContainer/index.d.ts +2 -0
  78. package/dist/types/src/containers/KanbanContainer/index.d.ts.map +1 -0
  79. package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts +6 -0
  80. package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts.map +1 -0
  81. package/dist/types/src/containers/KanbanViewEditor/index.d.ts +2 -0
  82. package/dist/types/src/containers/KanbanViewEditor/index.d.ts.map +1 -0
  83. package/dist/types/src/containers/index.d.ts +4 -0
  84. package/dist/types/src/containers/index.d.ts.map +1 -0
  85. package/dist/types/src/hooks/index.d.ts +6 -0
  86. package/dist/types/src/hooks/index.d.ts.map +1 -0
  87. package/dist/types/src/hooks/useEchoChangeCallback.d.ts +13 -0
  88. package/dist/types/src/hooks/useEchoChangeCallback.d.ts.map +1 -0
  89. package/dist/types/src/hooks/useKanbanBoardModel.d.ts +16 -0
  90. package/dist/types/src/hooks/useKanbanBoardModel.d.ts.map +1 -0
  91. package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts +2 -0
  92. package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts.map +1 -0
  93. package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts +22 -0
  94. package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts.map +1 -0
  95. package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts +19 -0
  96. package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts.map +1 -0
  97. package/dist/types/src/hooks/useProjectionModel.d.ts +15 -0
  98. package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -0
  99. package/dist/types/src/meta.d.ts +2 -3
  100. package/dist/types/src/meta.d.ts.map +1 -1
  101. package/dist/types/src/operations/definitions.d.ts +52 -0
  102. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  103. package/dist/types/src/operations/delete-card-field.d.ts +5 -0
  104. package/dist/types/src/operations/delete-card-field.d.ts.map +1 -0
  105. package/dist/types/src/operations/delete-card.d.ts +5 -0
  106. package/dist/types/src/operations/delete-card.d.ts.map +1 -0
  107. package/dist/types/src/operations/index.d.ts +4 -0
  108. package/dist/types/src/operations/index.d.ts.map +1 -0
  109. package/dist/types/src/operations/restore-card-field.d.ts +5 -0
  110. package/dist/types/src/operations/restore-card-field.d.ts.map +1 -0
  111. package/dist/types/src/operations/restore-card.d.ts +5 -0
  112. package/dist/types/src/operations/restore-card.d.ts.map +1 -0
  113. package/dist/types/src/playwright/board-manager.d.ts +5 -0
  114. package/dist/types/src/playwright/board-manager.d.ts.map +1 -0
  115. package/dist/types/src/playwright/playwright.config.d.ts +3 -0
  116. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
  117. package/dist/types/src/playwright/smoke.spec.d.ts +2 -0
  118. package/dist/types/src/playwright/smoke.spec.d.ts.map +1 -0
  119. package/dist/types/src/testing/KanbanCardTileSimple.d.ts +7 -0
  120. package/dist/types/src/testing/KanbanCardTileSimple.d.ts.map +1 -0
  121. package/dist/types/src/testing/index.d.ts +2 -0
  122. package/dist/types/src/testing/index.d.ts.map +1 -0
  123. package/dist/types/src/translations.d.ts +50 -22
  124. package/dist/types/src/translations.d.ts.map +1 -1
  125. package/dist/types/src/types/Kanban.d.ts +37 -0
  126. package/dist/types/src/types/Kanban.d.ts.map +1 -0
  127. package/dist/types/src/types/constants.d.ts +6 -0
  128. package/dist/types/src/types/constants.d.ts.map +1 -0
  129. package/dist/types/src/types/index.d.ts +2 -1
  130. package/dist/types/src/types/index.d.ts.map +1 -1
  131. package/dist/types/src/types/schema.d.ts +4 -95
  132. package/dist/types/src/types/schema.d.ts.map +1 -1
  133. package/dist/types/src/types/types.d.ts +28 -0
  134. package/dist/types/src/types/types.d.ts.map +1 -1
  135. package/dist/types/src/util/arrangement.d.ts +68 -0
  136. package/dist/types/src/util/arrangement.d.ts.map +1 -0
  137. package/dist/types/src/util/arrangement.test.d.ts +2 -0
  138. package/dist/types/src/util/arrangement.test.d.ts.map +1 -0
  139. package/dist/types/src/util/index.d.ts +2 -0
  140. package/dist/types/src/util/index.d.ts.map +1 -0
  141. package/dist/types/tsconfig.tsbuildinfo +1 -1
  142. package/package.json +84 -46
  143. package/src/KanbanPlugin.tsx +50 -51
  144. package/src/blueprints/index.ts +5 -0
  145. package/src/blueprints/kanban-blueprint.ts +28 -0
  146. package/src/capabilities/artifact-definition.ts +116 -112
  147. package/src/capabilities/blueprint-definition.ts +17 -0
  148. package/src/capabilities/index.ts +9 -3
  149. package/src/capabilities/operation-handler.ts +14 -0
  150. package/src/capabilities/react-surface.tsx +73 -69
  151. package/src/capabilities/undo-mappings.ts +34 -0
  152. package/src/components/KanbanBoard/KanbanBoard.stories.tsx +142 -0
  153. package/src/components/KanbanBoard/KanbanBoard.tsx +193 -0
  154. package/src/components/KanbanBoard/KanbanCard.tsx +86 -0
  155. package/src/components/KanbanBoard/KanbanColumn.tsx +69 -0
  156. package/src/components/KanbanBoard/index.ts +5 -0
  157. package/src/components/index.ts +1 -2
  158. package/src/containers/KanbanContainer/KanbanContainer.stories.tsx +271 -0
  159. package/src/containers/KanbanContainer/KanbanContainer.tsx +96 -0
  160. package/src/containers/KanbanContainer/index.ts +5 -0
  161. package/src/containers/KanbanViewEditor/KanbanViewEditor.tsx +63 -0
  162. package/src/containers/KanbanViewEditor/index.ts +5 -0
  163. package/src/containers/index.ts +8 -0
  164. package/src/hooks/index.ts +9 -0
  165. package/src/hooks/useEchoChangeCallback.ts +30 -0
  166. package/src/hooks/useKanbanBoardModel.test.ts +235 -0
  167. package/src/hooks/useKanbanBoardModel.ts +144 -0
  168. package/src/hooks/useKanbanColumnEventHandler.ts +106 -0
  169. package/src/hooks/useKanbanItemEventHandler.ts +133 -0
  170. package/src/hooks/useProjectionModel.ts +58 -0
  171. package/src/meta.ts +9 -7
  172. package/src/operations/definitions.ts +63 -0
  173. package/src/operations/delete-card-field.ts +47 -0
  174. package/src/operations/delete-card.ts +23 -0
  175. package/src/operations/index.ts +12 -0
  176. package/src/operations/restore-card-field.ts +41 -0
  177. package/src/operations/restore-card.ts +21 -0
  178. package/src/playwright/board-manager.ts +13 -0
  179. package/src/playwright/playwright.config.ts +19 -0
  180. package/src/playwright/smoke.spec.ts +107 -0
  181. package/src/testing/KanbanCardTileSimple.tsx +82 -0
  182. package/src/testing/index.ts +5 -0
  183. package/src/translations.ts +28 -20
  184. package/src/types/Kanban.ts +71 -0
  185. package/src/types/constants.ts +9 -0
  186. package/src/types/index.ts +2 -1
  187. package/src/types/schema.ts +15 -45
  188. package/src/types/types.ts +35 -0
  189. package/src/util/arrangement.test.ts +208 -0
  190. package/src/util/arrangement.ts +167 -0
  191. package/src/util/index.ts +5 -0
  192. package/dist/lib/browser/chunk-5BR6HNHI.mjs +0 -108
  193. package/dist/lib/browser/chunk-5BR6HNHI.mjs.map +0 -7
  194. package/dist/lib/browser/intent-resolver-65UVYRI2.mjs +0 -111
  195. package/dist/lib/browser/intent-resolver-65UVYRI2.mjs.map +0 -7
  196. package/dist/lib/browser/react-surface-KX5U6PJ2.mjs +0 -256
  197. package/dist/lib/browser/react-surface-KX5U6PJ2.mjs.map +0 -7
  198. package/dist/lib/node-esm/chunk-WLFZKRIJ.mjs +0 -110
  199. package/dist/lib/node-esm/chunk-WLFZKRIJ.mjs.map +0 -7
  200. package/dist/lib/node-esm/intent-resolver-R3MYQATZ.mjs +0 -112
  201. package/dist/lib/node-esm/intent-resolver-R3MYQATZ.mjs.map +0 -7
  202. package/dist/lib/node-esm/react-surface-BAMERRU5.mjs +0 -257
  203. package/dist/lib/node-esm/react-surface-BAMERRU5.mjs.map +0 -7
  204. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  205. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  206. package/dist/types/src/components/KanbanContainer.d.ts +0 -7
  207. package/dist/types/src/components/KanbanContainer.d.ts.map +0 -1
  208. package/dist/types/src/components/KanbanContainer.stories.d.ts +0 -10
  209. package/dist/types/src/components/KanbanContainer.stories.d.ts.map +0 -1
  210. package/dist/types/src/components/KanbanViewEditor.d.ts +0 -8
  211. package/dist/types/src/components/KanbanViewEditor.d.ts.map +0 -1
  212. package/dist/types/src/types/kanban.d.ts +0 -11
  213. package/dist/types/src/types/kanban.d.ts.map +0 -1
  214. package/src/capabilities/intent-resolver.ts +0 -70
  215. package/src/components/KanbanContainer.stories.tsx +0 -189
  216. package/src/components/KanbanContainer.tsx +0 -95
  217. package/src/components/KanbanViewEditor.tsx +0 -60
  218. package/src/types/kanban.ts +0 -29
package/package.json CHANGED
@@ -1,30 +1,60 @@
1
1
  {
2
2
  "name": "@dxos/plugin-kanban",
3
- "version": "0.8.4-main.f5c0578",
3
+ "version": "0.8.4-main.fcfe5033a5",
4
4
  "description": "Kanban DXOS Surface plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#blueprints": "./src/blueprints/index.ts",
17
+ "#capabilities": "./src/capabilities/index.ts",
18
+ "#components": "./src/components/index.ts",
19
+ "#containers": "./src/containers/index.ts",
20
+ "#hooks": "./src/hooks/index.ts",
21
+ "#meta": "./src/meta.ts",
22
+ "#operations": "./src/operations/index.ts",
23
+ "#testing": "./src/testing/index.ts",
24
+ "#types": "./src/types/index.ts"
25
+ },
11
26
  "exports": {
12
27
  ".": {
13
28
  "source": "./src/index.ts",
14
- "types": "./dist/types/src/index.d.ts",
15
29
  "browser": "./dist/lib/browser/index.mjs",
16
- "node": "./dist/lib/node-esm/index.mjs"
30
+ "node": "./dist/lib/node-esm/index.mjs",
31
+ "types": "./dist/types/src/index.d.ts"
32
+ },
33
+ "./blueprints": {
34
+ "source": "./src/blueprints/index.ts",
35
+ "browser": "./dist/lib/browser/blueprints/index.mjs",
36
+ "node": "./dist/lib/node-esm/blueprints/index.mjs",
37
+ "types": "./dist/types/src/blueprints/index.d.ts"
38
+ },
39
+ "./operations": {
40
+ "source": "./src/operations/index.ts",
41
+ "browser": "./dist/lib/browser/operations/index.mjs",
42
+ "node": "./dist/lib/node-esm/operations/index.mjs",
43
+ "types": "./dist/types/src/operations/index.d.ts"
17
44
  },
18
45
  "./types": {
19
46
  "source": "./src/types/index.ts",
20
- "types": "./dist/types/src/types/index.d.ts",
21
47
  "browser": "./dist/lib/browser/types/index.mjs",
22
- "node": "./dist/lib/node-esm/types/index.mjs"
48
+ "node": "./dist/lib/node-esm/types/index.mjs",
49
+ "types": "./dist/types/src/types/index.d.ts"
23
50
  }
24
51
  },
25
52
  "types": "dist/types/src/index.d.ts",
26
53
  "typesVersions": {
27
54
  "*": {
55
+ "blueprints": [
56
+ "dist/types/src/blueprints/index.d.ts"
57
+ ],
28
58
  "types": [
29
59
  "dist/types/src/types/index.d.ts"
30
60
  ]
@@ -35,51 +65,59 @@
35
65
  "src"
36
66
  ],
37
67
  "dependencies": {
38
- "@preact-signals/safe-react": "^0.9.0",
39
- "@preact/signals-core": "^1.9.0",
40
- "effect": "3.17.7",
41
- "@dxos/ai": "0.8.4-main.f5c0578",
42
- "@dxos/async": "0.8.4-main.f5c0578",
43
- "@dxos/assistant": "0.8.4-main.f5c0578",
44
- "@dxos/echo": "0.8.4-main.f5c0578",
45
- "@dxos/blueprints": "0.8.4-main.f5c0578",
46
- "@dxos/echo-schema": "0.8.4-main.f5c0578",
47
- "@dxos/effect": "0.8.4-main.f5c0578",
48
- "@dxos/app-framework": "0.8.4-main.f5c0578",
49
- "@dxos/plugin-client": "0.8.4-main.f5c0578",
50
- "@dxos/log": "0.8.4-main.f5c0578",
51
- "@dxos/plugin-search": "0.8.4-main.f5c0578",
52
- "@dxos/plugin-space": "0.8.4-main.f5c0578",
53
- "@dxos/random": "0.8.4-main.f5c0578",
54
- "@dxos/react-client": "0.8.4-main.f5c0578",
55
- "@dxos/invariant": "0.8.4-main.f5c0578",
56
- "@dxos/react-ui-form": "0.8.4-main.f5c0578",
57
- "@dxos/react-ui-kanban": "0.8.4-main.f5c0578",
58
- "@dxos/react-ui": "0.8.4-main.f5c0578",
59
- "@dxos/react-ui-stack": "0.8.4-main.f5c0578",
60
- "@dxos/schema": "0.8.4-main.f5c0578",
61
- "@dxos/util": "0.8.4-main.f5c0578",
62
- "@dxos/plugin-graph": "0.8.4-main.f5c0578"
68
+ "@effect-atom/atom-react": "^0.5.0",
69
+ "@radix-ui/react-context": "1.1.1",
70
+ "effect": "3.20.0",
71
+ "@dxos/ai": "0.8.4-main.fcfe5033a5",
72
+ "@dxos/app-toolkit": "0.8.4-main.fcfe5033a5",
73
+ "@dxos/assistant": "0.8.4-main.fcfe5033a5",
74
+ "@dxos/async": "0.8.4-main.fcfe5033a5",
75
+ "@dxos/blueprints": "0.8.4-main.fcfe5033a5",
76
+ "@dxos/echo": "0.8.4-main.fcfe5033a5",
77
+ "@dxos/echo-atom": "0.8.4-main.fcfe5033a5",
78
+ "@dxos/effect": "0.8.4-main.fcfe5033a5",
79
+ "@dxos/functions": "0.8.4-main.fcfe5033a5",
80
+ "@dxos/invariant": "0.8.4-main.fcfe5033a5",
81
+ "@dxos/log": "0.8.4-main.fcfe5033a5",
82
+ "@dxos/operation": "0.8.4-main.fcfe5033a5",
83
+ "@dxos/plugin-client": "0.8.4-main.fcfe5033a5",
84
+ "@dxos/plugin-graph": "0.8.4-main.fcfe5033a5",
85
+ "@dxos/plugin-search": "0.8.4-main.fcfe5033a5",
86
+ "@dxos/app-framework": "0.8.4-main.fcfe5033a5",
87
+ "@dxos/plugin-space": "0.8.4-main.fcfe5033a5",
88
+ "@dxos/random": "0.8.4-main.fcfe5033a5",
89
+ "@dxos/react-ui": "0.8.4-main.fcfe5033a5",
90
+ "@dxos/react-ui-form": "0.8.4-main.fcfe5033a5",
91
+ "@dxos/react-client": "0.8.4-main.fcfe5033a5",
92
+ "@dxos/react-ui-menu": "0.8.4-main.fcfe5033a5",
93
+ "@dxos/react-ui-stack": "0.8.4-main.fcfe5033a5",
94
+ "@dxos/types": "0.8.4-main.fcfe5033a5",
95
+ "@dxos/util": "0.8.4-main.fcfe5033a5",
96
+ "@dxos/schema": "0.8.4-main.fcfe5033a5",
97
+ "@dxos/react-ui-mosaic": "0.8.4-main.fcfe5033a5"
63
98
  },
64
99
  "devDependencies": {
65
- "@types/react": "~18.2.0",
66
- "@types/react-dom": "~18.2.0",
67
- "react": "~18.2.0",
68
- "react-dom": "~18.2.0",
69
- "vite": "5.4.7",
70
- "@dxos/plugin-preview": "0.8.4-main.f5c0578",
71
- "@dxos/plugin-theme": "0.8.4-main.f5c0578",
72
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.f5c0578",
73
- "@dxos/react-ui-theme": "0.8.4-main.f5c0578",
74
- "@dxos/storybook-utils": "0.8.4-main.f5c0578",
75
- "@dxos/test-utils": "0.8.4-main.f5c0578"
100
+ "@types/react": "~19.2.7",
101
+ "@types/react-dom": "~19.2.3",
102
+ "react": "~19.2.3",
103
+ "react-dom": "~19.2.3",
104
+ "vite": "^7.1.11",
105
+ "@dxos/keys": "0.8.4-main.fcfe5033a5",
106
+ "@dxos/plugin-preview": "0.8.4-main.fcfe5033a5",
107
+ "@dxos/echo-db": "0.8.4-main.fcfe5033a5",
108
+ "@dxos/plugin-testing": "0.8.4-main.fcfe5033a5",
109
+ "@dxos/plugin-theme": "0.8.4-main.fcfe5033a5",
110
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.fcfe5033a5",
111
+ "@dxos/storybook-utils": "0.8.4-main.fcfe5033a5",
112
+ "@dxos/test-utils": "0.8.4-main.fcfe5033a5",
113
+ "@dxos/ui-theme": "0.8.4-main.fcfe5033a5"
76
114
  },
77
115
  "peerDependencies": {
78
- "effect": "^3.13.3",
79
- "react": "~18.2.0",
80
- "react-dom": "~18.2.0",
81
- "@dxos/react-ui": "0.8.4-main.f5c0578",
82
- "@dxos/react-ui-theme": "0.8.4-main.f5c0578"
116
+ "effect": "3.20.0",
117
+ "react": "~19.2.3",
118
+ "react-dom": "~19.2.3",
119
+ "@dxos/ui-theme": "0.8.4-main.fcfe5033a5",
120
+ "@dxos/react-ui": "0.8.4-main.fcfe5033a5"
83
121
  },
84
122
  "publishConfig": {
85
123
  "access": "public"
@@ -2,57 +2,56 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
6
- import { ClientEvents } from '@dxos/plugin-client';
7
- import { SpaceCapabilities } from '@dxos/plugin-space';
8
- import { defineObjectForm } from '@dxos/plugin-space/types';
9
- import { KanbanView, translations as kanbanTranslations } from '@dxos/react-ui-kanban';
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Option from 'effect/Option';
7
+
8
+ import { Plugin } from '@dxos/app-framework';
9
+ import { AppPlugin } from '@dxos/app-toolkit';
10
+ import { Annotation, Type } from '@dxos/echo';
11
+ import { Operation } from '@dxos/operation';
12
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
13
+ import { type CreateObject } from '@dxos/plugin-space/types';
14
+ import { ViewModel } from '@dxos/schema';
15
+
16
+ import { BlueprintDefinition, OperationHandler, UndoMappings, ReactSurface } from '#capabilities';
17
+ import { meta } from '#meta';
18
+ import { CreateKanbanSchema, Kanban } from '#types';
10
19
 
11
- import { IntentResolver, ReactSurface } from './capabilities';
12
- import { meta } from './meta';
13
20
  import { translations } from './translations';
14
- import { CreateKanbanSchema, KanbanAction } from './types';
15
21
 
16
- export const KanbanPlugin = () =>
17
- definePlugin(meta, [
18
- defineModule({
19
- id: `${meta.id}/module/translations`,
20
- activatesOn: Events.SetupTranslations,
21
- activate: () => contributes(Capabilities.Translations, [...translations, ...kanbanTranslations]),
22
- }),
23
- defineModule({
24
- id: `${meta.id}/module/metadata`,
25
- activatesOn: Events.SetupMetadata,
26
- activate: () =>
27
- contributes(Capabilities.Metadata, {
28
- id: KanbanView.typename,
29
- metadata: {
30
- icon: 'ph--kanban--regular',
31
- },
32
- }),
33
- }),
34
- defineModule({
35
- id: `${meta.id}/module/object-form`,
36
- activatesOn: ClientEvents.SetupSchema,
37
- activate: () =>
38
- contributes(
39
- SpaceCapabilities.ObjectForm,
40
- defineObjectForm({
41
- objectSchema: KanbanView,
42
- formSchema: CreateKanbanSchema,
43
- hidden: true,
44
- getIntent: (props, options) => createIntent(KanbanAction.Create, { ...props, space: options.space }),
45
- }),
46
- ),
47
- }),
48
- defineModule({
49
- id: `${meta.id}/module/react-surface`,
50
- activatesOn: Events.SetupReactSurface,
51
- activate: ReactSurface,
52
- }),
53
- defineModule({
54
- id: `${meta.id}/module/intent-resolver`,
55
- activatesOn: Events.SetupIntentResolver,
56
- activate: IntentResolver,
57
- }),
58
- ]);
22
+ export const KanbanPlugin = Plugin.define(meta).pipe(
23
+ AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
24
+ AppPlugin.addMetadataModule({
25
+ metadata: {
26
+ id: Type.getTypename(Kanban.Kanban),
27
+ metadata: {
28
+ icon: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).icon,
29
+ iconHue: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).hue ?? 'white',
30
+ inputSchema: CreateKanbanSchema,
31
+ createObject: ((props, options) =>
32
+ Effect.gen(function* () {
33
+ const object = yield* Effect.promise(async () => {
34
+ const { view } = await ViewModel.makeFromDatabase({
35
+ db: options.db,
36
+ typename: props.typename,
37
+ pivotFieldName: props.initialPivotColumn,
38
+ });
39
+ return Kanban.make({ name: props.name, view });
40
+ });
41
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
42
+ object,
43
+ target: options.target,
44
+ hidden: true,
45
+ targetNodeId: options.targetNodeId,
46
+ });
47
+ })) satisfies CreateObject,
48
+ },
49
+ },
50
+ }),
51
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
52
+ AppPlugin.addOperationHandlerModule({ id: 'undo-mappings', activate: UndoMappings }),
53
+ AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
54
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
55
+ AppPlugin.addTranslationsModule({ translations }),
56
+ Plugin.make,
57
+ );
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { default as KanbanBlueprint } from './kanban-blueprint';
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type AppCapabilities } from '@dxos/app-toolkit';
6
+ import { Blueprint, Template } from '@dxos/blueprints';
7
+ import { trim } from '@dxos/util';
8
+
9
+ const BLUEPRINT_KEY = 'org.dxos.blueprint.kanban';
10
+
11
+ const make = () =>
12
+ Blueprint.make({
13
+ key: BLUEPRINT_KEY,
14
+ name: 'Kanban',
15
+ tools: Blueprint.toolDefinitions({ tools: [] }),
16
+ instructions: Template.make({
17
+ source: trim`
18
+ You can create and update kanban boards to show data in sorted columns defined by schema.
19
+ `,
20
+ }),
21
+ });
22
+
23
+ const blueprint: AppCapabilities.BlueprintDefinition = {
24
+ key: BLUEPRINT_KEY,
25
+ make,
26
+ };
27
+
28
+ export default blueprint;
@@ -5,22 +5,23 @@
5
5
  // ISSUE(burdon): defineArtifact
6
6
  // @ts-nocheck
7
7
 
8
- import { Schema, pipe } from 'effect';
8
+ import * as Effect from 'effect/Effect';
9
+ import * as Schema from 'effect/Schema';
9
10
 
10
11
  import { ToolResult, createTool } from '@dxos/ai';
11
- import { Capabilities, type PromiseIntentDispatcher, chain, contributes, createIntent } from '@dxos/app-framework';
12
+ import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/app-framework';
12
13
  import { createArtifactElement } from '@dxos/assistant';
13
14
  import { defineArtifact } from '@dxos/blueprints';
14
15
  import { Obj, Query } from '@dxos/echo';
16
+ import { View } from '@dxos/echo';
15
17
  import { invariant } from '@dxos/invariant';
16
- import { SpaceAction } from '@dxos/plugin-space/types';
17
- import { Filter, type Space, fullyQualifiedId } from '@dxos/react-client/echo';
18
- import { KanbanView } from '@dxos/react-ui-kanban';
19
- import { DataType } from '@dxos/schema';
18
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
19
+ import { Filter, type Space } from '@dxos/react-client/echo';
20
+ import { ViewModel } from '@dxos/schema';
20
21
  import { isNonNullable } from '@dxos/util';
21
22
 
22
- import { meta } from '../meta';
23
- import { KanbanAction } from '../types';
23
+ import { meta } from '#meta';
24
+ import { Kanban } from '#types';
24
25
 
25
26
  const QualifiedId = Schema.String.annotations({
26
27
  description: 'The fully qualified ID of the kanban `spaceID:objectID`',
@@ -33,115 +34,118 @@ declare global {
33
34
  }
34
35
  }
35
36
 
36
- export default () => {
37
- const definition = defineArtifact({
38
- id: `artifact:${meta.id}`,
39
- name: meta.name,
40
- instructions: `
37
+ export default Capability.makeModule(() =>
38
+ Effect.sync(() => {
39
+ const definition = defineArtifact({
40
+ id: `artifact:${meta.id}`,
41
+ name: meta.name,
42
+ instructions: `
41
43
  - Before adding items to a kanban board, inspect the board to see its schema
42
44
  - When adding items, you must not include the 'id' field -- it is automatically generated
43
45
  - BEFORE adding items, always make sure the board has been shown to the user!
44
46
  `,
45
- schema: KanbanView,
46
- tools: [
47
- createTool(meta.id, {
48
- name: 'create',
49
- description: `
47
+ schema: Kanban.Kanban,
48
+ tools: [
49
+ createTool(meta.id, {
50
+ name: 'create',
51
+ description: `
50
52
  Create a new kanban board using an existing schema.
51
53
  Use schema_create first to create a schema, or schema_list to choose an existing one.`,
52
- caption: 'Creating kanban board...',
53
- schema: Schema.Struct({
54
- typename: Schema.String.annotations({
55
- description: 'The fully qualified name of the record type to use for the kanban cards.',
56
- }),
57
- pivotColumn: Schema.optional(Schema.String).annotations({
58
- description: 'Optional field name to use as the column pivot.',
59
- }),
60
- }),
61
- execute: async ({ typename, pivotColumn }, { extensions }) => {
62
- invariant(extensions?.space, 'No space');
63
- invariant(extensions?.dispatch, 'No intent dispatcher');
64
-
65
- // Validate schema exists first
66
- const schema = await extensions.space.db.schemaRegistry.query({ typename }).firstOrUndefined();
67
- if (!schema) {
68
- return ToolResult.Error(`Schema not found: ${typename}`);
69
- }
70
-
71
- const intent = pipe(
72
- createIntent(KanbanAction.Create, {
73
- space: extensions.space,
74
- typename,
75
- initialPivotColumn: pivotColumn,
54
+ caption: 'Creating kanban board...',
55
+ schema: Schema.Struct({
56
+ typename: Schema.String.annotations({
57
+ description: 'The fully qualified name of the record type to use for the kanban cards.',
76
58
  }),
77
- chain(SpaceAction.AddObject, { target: extensions.space }),
78
- );
79
-
80
- const { data, error } = await extensions.dispatch(intent);
81
- if (!data || error) {
82
- return ToolResult.Error(error?.message ?? 'Failed to create kanban board');
83
- }
84
-
85
- return ToolResult.Success(createArtifactElement(data.id));
86
- },
87
- }),
88
- createTool(meta.id, {
89
- name: 'list',
90
- description: 'List all kanban boards in the current space.',
91
- caption: 'Listing kanban boards...',
92
- schema: Schema.Struct({}),
93
- execute: async (_input, { extensions }) => {
94
- invariant(extensions?.space, 'No space');
95
- const space = extensions.space;
96
- const { objects } = await space.db.query(Filter.type(DataType.View)).run();
97
-
98
- const boardInfo = await Promise.all(
99
- objects.map(async (view) => {
100
- const kanban = await view.presentation.load();
101
- if (!Obj.instanceOf(KanbanView, kanban)) {
102
- return null;
103
- }
104
-
105
- return {
106
- id: fullyQualifiedId(view),
107
- name: view.name ?? 'Unnamed Kanban',
108
- typename: view.query.typename,
109
- };
59
+ pivotColumn: Schema.optional(Schema.String).annotations({
60
+ description: 'Optional field name to use as the column pivot.',
110
61
  }),
111
- );
112
-
113
- return ToolResult.Success(boardInfo.filter(isNonNullable));
114
- },
115
- }),
116
- createTool(meta.id, {
117
- name: 'inspect',
118
- description: 'Get details about a specific kanban board.',
119
- caption: 'Inspecting kanban board...',
120
- schema: Schema.Struct({ id: QualifiedId }),
121
- execute: async ({ id }, { extensions }) => {
122
- invariant(extensions?.space, 'No space');
123
- const space = extensions.space;
124
- const view = (await space.db
125
- // TODO(wittjosiah): Filter.and should aggregate type
126
- .query(Query.select(Filter.and(Filter.type(DataType.View), Filter.ids(id))))
127
- .first()) as DataType.View;
128
-
129
- const kanban = await view.presentation.load();
130
- invariant(Obj.instanceOf(KanbanView, kanban));
131
-
132
- const typename = view.query.typename;
133
- const schema = await space.db.schemaRegistry.query({ typename }).firstOrUndefined();
134
- invariant(schema);
135
-
136
- return ToolResult.Success({
137
- schema,
138
- columnField: kanban.columnFieldId,
139
- viewFields: view.projection.fields,
140
- });
141
- },
142
- }),
143
- ],
144
- });
145
-
146
- return contributes(Capabilities.ArtifactDefinition, definition);
147
- };
62
+ }),
63
+ execute: async ({ typename, pivotColumn }, { extensions }) => {
64
+ invariant(extensions?.space, 'No space');
65
+ invariant(extensions?.invoke, 'No operation invoker');
66
+
67
+ // Validate schema exists first
68
+ const schema = await extensions.space.db.schemaRegistry.query({ typename }).firstOrUndefined();
69
+ if (!schema) {
70
+ return ToolResult.Error(`Schema not found: ${typename}`);
71
+ }
72
+
73
+ const { view } = await ViewModel.makeFromDatabase({
74
+ db: extensions.space.db,
75
+ typename,
76
+ pivotFieldName: pivotColumn,
77
+ });
78
+ const kanban = Kanban.make({ view });
79
+
80
+ const { error } = await extensions.invoke(SpaceOperation.AddObject, {
81
+ target: extensions.space,
82
+ object: kanban,
83
+ });
84
+ if (error) {
85
+ return ToolResult.Error(error?.message ?? 'Failed to add kanban board to space');
86
+ }
87
+
88
+ return ToolResult.Success(createArtifactElement(kanban.id));
89
+ },
90
+ }),
91
+ createTool(meta.id, {
92
+ name: 'list',
93
+ description: 'List all kanban boards in the current space.',
94
+ caption: 'Listing kanban boards...',
95
+ schema: Schema.Struct({}),
96
+ execute: async (_input, { extensions }) => {
97
+ invariant(extensions?.space, 'No space');
98
+ const space = extensions.space;
99
+ const { objects } = await space.db.query(Filter.type(View.View)).run();
100
+
101
+ const boardInfo = await Promise.all(
102
+ objects.map(async (view) => {
103
+ const kanban = await view.presentation.load();
104
+ if (!Obj.instanceOf(Kanban.Kanban, kanban)) {
105
+ return null;
106
+ }
107
+
108
+ return {
109
+ id: Obj.getDXN(view).toString(),
110
+ name: view.name ?? 'Unnamed Kanban',
111
+ typename: view.query.typename,
112
+ };
113
+ }),
114
+ );
115
+
116
+ return ToolResult.Success(boardInfo.filter(isNonNullable));
117
+ },
118
+ }),
119
+ createTool(meta.id, {
120
+ name: 'inspect',
121
+ description: 'Get details about a specific kanban board.',
122
+ caption: 'Inspecting kanban board...',
123
+ schema: Schema.Struct({ id: QualifiedId }),
124
+ execute: async ({ id }, { extensions }) => {
125
+ invariant(extensions?.space, 'No space');
126
+ const space = extensions.space;
127
+ const view = (await space.db
128
+ // TODO(wittjosiah): Filter.and should aggregate type
129
+ .query(Query.select(Filter.and(Filter.type(View.View), Filter.id(id))))
130
+ .first()) as View.View;
131
+
132
+ const kanban = await view.presentation.load();
133
+ invariant(Obj.instanceOf(Kanban.Kanban, kanban));
134
+
135
+ const typename = view.query.typename;
136
+ const schema = await space.db.schemaRegistry.query({ typename }).firstOrUndefined();
137
+ invariant(schema);
138
+
139
+ return ToolResult.Success({
140
+ schema,
141
+ columnField: view.projection.pivotFieldId,
142
+ viewFields: view.projection.fields,
143
+ });
144
+ },
145
+ }),
146
+ ],
147
+ });
148
+
149
+ return Capability.contributes(Capabilities.ArtifactDefinition, definition);
150
+ }),
151
+ );
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+
10
+ import { KanbanBlueprint } from '#blueprints';
11
+
12
+ const blueprintDefinition = Capability.makeModule<
13
+ [],
14
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
15
+ >(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, KanbanBlueprint)]));
16
+
17
+ export default blueprintDefinition;
@@ -2,7 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/operation';
6
7
 
7
- export const IntentResolver = lazy(() => import('./intent-resolver'));
8
- export const ReactSurface = lazy(() => import('./react-surface'));
8
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
9
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
10
+ 'OperationHandler',
11
+ () => import('./operation-handler'),
12
+ );
13
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
14
+ export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
@@ -0,0 +1,14 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { Capabilities, Capability } from '@dxos/app-framework';
6
+ import type { OperationHandlerSet } from '@dxos/operation';
7
+
8
+ import { KanbanOperationHandlerSet } from '#operations';
9
+
10
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
11
+ Effect.fnUntraced(function* () {
12
+ return Capability.contributes(Capabilities.OperationHandler, KanbanOperationHandlerSet);
13
+ }),
14
+ );