@dxos/plugin-kanban 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
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/dist/lib/neutral/KanbanContainer-QK6LNCYT.mjs +132 -0
- package/dist/lib/neutral/KanbanContainer-QK6LNCYT.mjs.map +7 -0
- package/dist/lib/neutral/KanbanPlugin.mjs +36 -0
- package/dist/lib/neutral/KanbanPlugin.mjs.map +7 -0
- package/dist/lib/neutral/KanbanPlugin.node.mjs +27 -0
- package/dist/lib/neutral/KanbanPlugin.node.mjs.map +7 -0
- package/dist/lib/{browser/KanbanViewEditor-IH5CJ6BW.mjs → neutral/KanbanSettings-G6M47NSK.mjs} +36 -19
- package/dist/lib/neutral/KanbanSettings-G6M47NSK.mjs.map +7 -0
- package/dist/lib/{browser/blueprint-definition-HFEKGFJK.mjs → neutral/blueprint-definition-FHVIEKTQ.mjs} +4 -6
- package/dist/lib/neutral/blueprint-definition-FHVIEKTQ.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +19 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-E65AME5F.mjs +255 -0
- package/dist/lib/neutral/chunk-E65AME5F.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KDPM77BD.mjs +21 -0
- package/dist/lib/neutral/chunk-KDPM77BD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Z7O5CETK.mjs +8 -0
- package/dist/lib/neutral/chunk-Z7O5CETK.mjs.map +7 -0
- package/dist/lib/{browser/chunk-TLYZSC7O.mjs → neutral/chunk-ZTQW5KQS.mjs} +3 -6
- package/dist/lib/neutral/chunk-ZTQW5KQS.mjs.map +7 -0
- package/dist/lib/{browser/KanbanContainer-BCXSJ6KS.mjs → neutral/components/index.mjs} +78 -139
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +11 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-DKBSI46K.mjs +40 -0
- package/dist/lib/neutral/create-object-DKBSI46K.mjs.map +7 -0
- package/dist/lib/neutral/delete-card-QKT6OXGP.mjs +24 -0
- package/dist/lib/neutral/delete-card-QKT6OXGP.mjs.map +7 -0
- package/dist/lib/neutral/delete-card-field-XQKM7ZXE.mjs +42 -0
- package/dist/lib/neutral/delete-card-field-XQKM7ZXE.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-CSL3HF2X.mjs → neutral/hooks/index.mjs} +128 -82
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/migrations-4NS6H7U2.mjs +31 -0
- package/dist/lib/neutral/migrations-4NS6H7U2.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-B7IW6MXU.mjs +13 -0
- package/dist/lib/neutral/operation-handler-B7IW6MXU.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-FOMOGFVW.mjs → neutral/react-surface-6RVSCHMJ.mjs} +21 -27
- package/dist/lib/neutral/react-surface-6RVSCHMJ.mjs.map +7 -0
- package/dist/lib/neutral/restore-card-XW7AHMPO.mjs +21 -0
- package/dist/lib/neutral/restore-card-XW7AHMPO.mjs.map +7 -0
- package/dist/lib/neutral/restore-card-field-QOAUY3RJ.mjs +40 -0
- package/dist/lib/neutral/restore-card-field-QOAUY3RJ.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +60 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +44 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +7 -5
- package/dist/lib/neutral/undo-mappings-6CHW6BOF.mjs +42 -0
- package/dist/lib/neutral/undo-mappings-6CHW6BOF.mjs.map +7 -0
- package/dist/types/src/KanbanPlugin.d.ts +1 -0
- package/dist/types/src/KanbanPlugin.d.ts.map +1 -1
- package/dist/types/src/KanbanPlugin.node.d.ts +4 -0
- package/dist/types/src/KanbanPlugin.node.d.ts.map +1 -0
- package/dist/types/src/KanbanPlugin.test.d.ts +2 -0
- package/dist/types/src/KanbanPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/kanban-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/kanban-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +13 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts +17 -38
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts +48 -46
- package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts +2 -3
- package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts +2 -3
- package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/context.d.ts +38 -0
- package/dist/types/src/components/KanbanBoard/context.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts +4 -4
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts.map +1 -1
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts +48 -46
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/KanbanContainer/index.d.ts +1 -2
- package/dist/types/src/containers/KanbanContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/KanbanSettings/KanbanSettings.d.ts +13 -0
- package/dist/types/src/containers/KanbanSettings/KanbanSettings.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanSettings/index.d.ts +2 -0
- package/dist/types/src/containers/KanbanSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useEchoChangeCallback.d.ts +1 -1
- package/dist/types/src/hooks/useEchoChangeCallback.d.ts.map +1 -1
- package/dist/types/src/hooks/useItemsProjection.d.ts +10 -0
- package/dist/types/src/hooks/useItemsProjection.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanBoardModel.browser.test.d.ts +2 -0
- package/dist/types/src/hooks/useKanbanBoardModel.browser.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanBoardModel.d.ts +1 -1
- package/dist/types/src/hooks/useKanbanBoardModel.d.ts.map +1 -1
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts +2 -2
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts +2 -2
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useProjectionModel.d.ts +1 -1
- package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/delete-card-field.d.ts +5 -0
- package/dist/types/src/operations/delete-card-field.d.ts.map +1 -0
- package/dist/types/src/operations/delete-card.d.ts +5 -0
- package/dist/types/src/operations/delete-card.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/restore-card-field.d.ts +5 -0
- package/dist/types/src/operations/restore-card-field.d.ts.map +1 -0
- package/dist/types/src/operations/restore-card.d.ts +5 -0
- package/dist/types/src/operations/restore-card.d.ts.map +1 -0
- package/dist/types/src/playwright/board-manager.d.ts.map +1 -1
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/KanbanCardTileSimple.d.ts +4 -2
- package/dist/types/src/testing/KanbanCardTileSimple.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +48 -46
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Kanban.d.ts +78 -6
- package/dist/types/src/types/Kanban.d.ts.map +1 -1
- package/dist/types/src/types/KanbanOperation.d.ts +52 -0
- package/dist/types/src/types/KanbanOperation.d.ts.map +1 -0
- package/dist/types/src/types/constants.d.ts +3 -3
- package/dist/types/src/types/constants.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/migrations.test.d.ts +2 -0
- package/dist/types/src/types/migrations.test.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +15 -104
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -2
- package/dist/types/src/util/arrangement.d.ts +8 -4
- package/dist/types/src/util/arrangement.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +108 -65
- package/src/KanbanPlugin.node.ts +21 -0
- package/src/KanbanPlugin.test.ts +31 -0
- package/src/KanbanPlugin.tsx +21 -29
- package/src/blueprints/kanban-blueprint.ts +4 -8
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +4 -4
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
- package/src/capabilities/create-object.ts +40 -0
- package/src/capabilities/index.ts +13 -3
- package/src/capabilities/migrations.ts +35 -0
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +22 -13
- package/src/capabilities/undo-mappings.ts +34 -0
- package/src/components/KanbanBoard/KanbanBoard.stories.tsx +20 -16
- package/src/components/KanbanBoard/KanbanBoard.tsx +44 -64
- package/src/components/KanbanBoard/KanbanCard.tsx +77 -63
- package/src/components/KanbanBoard/KanbanColumn.tsx +19 -16
- package/src/components/KanbanBoard/context.ts +54 -0
- package/src/containers/KanbanContainer/KanbanContainer.stories.tsx +44 -30
- package/src/containers/KanbanContainer/KanbanContainer.tsx +118 -27
- package/src/containers/KanbanContainer/index.ts +1 -3
- package/src/containers/KanbanSettings/KanbanSettings.tsx +94 -0
- package/src/containers/KanbanSettings/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useEchoChangeCallback.ts +3 -3
- package/src/hooks/useItemsProjection.ts +44 -0
- package/src/hooks/{useKanbanBoardModel.test.ts → useKanbanBoardModel.browser.test.ts} +5 -5
- package/src/hooks/useKanbanBoardModel.ts +20 -6
- package/src/hooks/useKanbanColumnEventHandler.ts +1 -1
- package/src/hooks/useKanbanItemEventHandler.ts +1 -1
- package/src/hooks/useProjectionModel.ts +3 -3
- package/src/index.ts +3 -2
- package/src/meta.ts +1 -1
- package/src/operations/delete-card-field.ts +47 -0
- package/src/operations/delete-card.ts +23 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/restore-card-field.ts +41 -0
- package/src/operations/restore-card.ts +21 -0
- package/src/playwright/smoke.spec.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/testing/KanbanCardTileSimple.tsx +25 -19
- package/src/translations.ts +26 -25
- package/src/types/Kanban.ts +98 -14
- package/src/types/KanbanOperation.ts +67 -0
- package/src/types/index.ts +3 -1
- package/src/types/migrations.test.ts +83 -0
- package/src/types/schema.ts +20 -78
- package/src/types/types.ts +2 -2
- package/src/util/arrangement.test.ts +11 -1
- package/src/util/arrangement.ts +25 -15
- package/dist/lib/browser/KanbanContainer-BCXSJ6KS.mjs.map +0 -7
- package/dist/lib/browser/KanbanViewEditor-IH5CJ6BW.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-HFEKGFJK.mjs.map +0 -7
- package/dist/lib/browser/chunk-QSWCFMEB.mjs +0 -385
- package/dist/lib/browser/chunk-QSWCFMEB.mjs.map +0 -7
- package/dist/lib/browser/chunk-RNFIFE2P.mjs +0 -213
- package/dist/lib/browser/chunk-RNFIFE2P.mjs.map +0 -7
- package/dist/lib/browser/chunk-TLYZSC7O.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -101
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-BRA2OHUE.mjs +0 -162
- package/dist/lib/browser/operation-resolver-BRA2OHUE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FOMOGFVW.mjs.map +0 -7
- package/dist/lib/node-esm/KanbanContainer-EHRTLE7M.mjs +0 -305
- package/dist/lib/node-esm/KanbanContainer-EHRTLE7M.mjs.map +0 -7
- package/dist/lib/node-esm/KanbanViewEditor-WDACFC35.mjs +0 -67
- package/dist/lib/node-esm/KanbanViewEditor-WDACFC35.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-NARBX32U.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-NARBX32U.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-4AWDHQVY.mjs +0 -214
- package/dist/lib/node-esm/chunk-4AWDHQVY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CSL3HF2X.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-X3UJUQIV.mjs +0 -31
- package/dist/lib/node-esm/chunk-X3UJUQIV.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -102
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-UEQ64LCN.mjs +0 -163
- package/dist/lib/node-esm/operation-resolver-UEQ64LCN.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AITKFRBE.mjs +0 -100
- package/dist/lib/node-esm/react-surface-AITKFRBE.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -21
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts +0 -6
- package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts.map +0 -1
- package/dist/types/src/containers/KanbanViewEditor/index.d.ts +0 -3
- package/dist/types/src/containers/KanbanViewEditor/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts +0 -2
- package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts.map +0 -1
- package/src/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -133
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/containers/KanbanViewEditor/KanbanViewEditor.tsx +0 -63
- package/src/containers/KanbanViewEditor/index.ts +0 -7
- /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/blueprints/index.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/types/index.mjs.map} +0 -0
- /package/dist/types/src/capabilities/{artifact-definition/artifact-definition.d.ts → artifact-definition.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-kanban",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.dfabb4ec29",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,37 +12,81 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#blueprints": {
|
|
17
|
+
"source": "./src/blueprints/index.ts",
|
|
18
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/blueprints/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#capabilities": {
|
|
22
|
+
"source": "./src/capabilities/index.ts",
|
|
23
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#components": {
|
|
27
|
+
"source": "./src/components/index.ts",
|
|
28
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#containers": {
|
|
32
|
+
"source": "./src/containers/index.ts",
|
|
33
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#hooks": {
|
|
37
|
+
"source": "./src/hooks/index.ts",
|
|
38
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#meta": {
|
|
42
|
+
"source": "./src/meta.ts",
|
|
43
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#operations": {
|
|
47
|
+
"source": "./src/operations/index.ts",
|
|
48
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
50
|
+
},
|
|
51
|
+
"#plugin": {
|
|
52
|
+
"source": {
|
|
53
|
+
"node": "./src/KanbanPlugin.node.ts",
|
|
54
|
+
"default": "./src/KanbanPlugin.tsx"
|
|
55
|
+
},
|
|
56
|
+
"types": "./dist/types/src/KanbanPlugin.d.ts",
|
|
57
|
+
"node": "./dist/lib/neutral/KanbanPlugin.node.mjs",
|
|
58
|
+
"default": "./dist/lib/neutral/KanbanPlugin.mjs"
|
|
59
|
+
},
|
|
60
|
+
"#testing": "./src/testing/index.ts",
|
|
61
|
+
"#translations": {
|
|
62
|
+
"source": "./src/translations.ts",
|
|
63
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
64
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
65
|
+
},
|
|
66
|
+
"#types": {
|
|
67
|
+
"source": "./src/types/index.ts",
|
|
68
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
69
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
15
72
|
"exports": {
|
|
16
73
|
".": {
|
|
17
74
|
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"types": "./dist/types/src/index.d.ts"
|
|
75
|
+
"types": "./dist/types/src/index.d.ts",
|
|
76
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
21
77
|
},
|
|
22
|
-
"./
|
|
23
|
-
"source": "./src/
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
78
|
+
"./plugin": {
|
|
79
|
+
"source": "./src/plugin.ts",
|
|
80
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
81
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
27
82
|
},
|
|
28
|
-
"./
|
|
29
|
-
"source": "./src/
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"types": "./dist/types/src/types/index.d.ts"
|
|
83
|
+
"./translations": {
|
|
84
|
+
"source": "./src/translations.ts",
|
|
85
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
86
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
33
87
|
}
|
|
34
88
|
},
|
|
35
89
|
"types": "dist/types/src/index.d.ts",
|
|
36
|
-
"typesVersions": {
|
|
37
|
-
"*": {
|
|
38
|
-
"blueprints": [
|
|
39
|
-
"dist/types/src/blueprints/index.d.ts"
|
|
40
|
-
],
|
|
41
|
-
"types": [
|
|
42
|
-
"dist/types/src/types/index.d.ts"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
90
|
"files": [
|
|
47
91
|
"dist",
|
|
48
92
|
"src"
|
|
@@ -50,57 +94,56 @@
|
|
|
50
94
|
"dependencies": {
|
|
51
95
|
"@effect-atom/atom-react": "^0.5.0",
|
|
52
96
|
"@radix-ui/react-context": "1.1.1",
|
|
53
|
-
"effect": "3.
|
|
54
|
-
"@dxos/ai": "0.8.4-main.
|
|
55
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
56
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/echo
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/invariant": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/plugin-
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/random": "0.8.4-main.
|
|
71
|
-
"@dxos/react-
|
|
72
|
-
"@dxos/react-
|
|
73
|
-
"@dxos/react-ui
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/util": "0.8.4-main.
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/plugin-client": "0.8.4-main.c85a9c8dae"
|
|
97
|
+
"effect": "3.20.0",
|
|
98
|
+
"@dxos/ai": "0.8.4-main.dfabb4ec29",
|
|
99
|
+
"@dxos/app-framework": "0.8.4-main.dfabb4ec29",
|
|
100
|
+
"@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
|
|
101
|
+
"@dxos/async": "0.8.4-main.dfabb4ec29",
|
|
102
|
+
"@dxos/client": "0.8.4-main.dfabb4ec29",
|
|
103
|
+
"@dxos/echo": "0.8.4-main.dfabb4ec29",
|
|
104
|
+
"@dxos/effect": "0.8.4-main.dfabb4ec29",
|
|
105
|
+
"@dxos/compute": "0.8.4-main.dfabb4ec29",
|
|
106
|
+
"@dxos/echo-atom": "0.8.4-main.dfabb4ec29",
|
|
107
|
+
"@dxos/invariant": "0.8.4-main.dfabb4ec29",
|
|
108
|
+
"@dxos/assistant": "0.8.4-main.dfabb4ec29",
|
|
109
|
+
"@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
|
|
110
|
+
"@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
|
|
111
|
+
"@dxos/plugin-space": "0.8.4-main.dfabb4ec29",
|
|
112
|
+
"@dxos/plugin-search": "0.8.4-main.dfabb4ec29",
|
|
113
|
+
"@dxos/log": "0.8.4-main.dfabb4ec29",
|
|
114
|
+
"@dxos/random": "0.8.4-main.dfabb4ec29",
|
|
115
|
+
"@dxos/react-client": "0.8.4-main.dfabb4ec29",
|
|
116
|
+
"@dxos/react-ui-form": "0.8.4-main.dfabb4ec29",
|
|
117
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
118
|
+
"@dxos/react-ui-menu": "0.8.4-main.dfabb4ec29",
|
|
119
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
|
|
120
|
+
"@dxos/schema": "0.8.4-main.dfabb4ec29",
|
|
121
|
+
"@dxos/types": "0.8.4-main.dfabb4ec29",
|
|
122
|
+
"@dxos/util": "0.8.4-main.dfabb4ec29",
|
|
123
|
+
"@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29"
|
|
81
124
|
},
|
|
82
125
|
"devDependencies": {
|
|
83
126
|
"@types/react": "~19.2.7",
|
|
84
127
|
"@types/react-dom": "~19.2.3",
|
|
85
128
|
"react": "~19.2.3",
|
|
86
129
|
"react-dom": "~19.2.3",
|
|
87
|
-
"vite": "^
|
|
88
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
130
|
+
"vite": "^8.0.10",
|
|
131
|
+
"@dxos/echo-db": "0.8.4-main.dfabb4ec29",
|
|
132
|
+
"@dxos/keys": "0.8.4-main.dfabb4ec29",
|
|
133
|
+
"@dxos/plugin-preview": "0.8.4-main.dfabb4ec29",
|
|
134
|
+
"@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
|
|
135
|
+
"@dxos/plugin-theme": "0.8.4-main.dfabb4ec29",
|
|
136
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.dfabb4ec29",
|
|
137
|
+
"@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
|
|
138
|
+
"@dxos/test-utils": "0.8.4-main.dfabb4ec29",
|
|
139
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
97
140
|
},
|
|
98
141
|
"peerDependencies": {
|
|
99
|
-
"effect": "3.
|
|
142
|
+
"effect": "3.20.0",
|
|
100
143
|
"react": "~19.2.3",
|
|
101
144
|
"react-dom": "~19.2.3",
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/ui
|
|
145
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
|
|
146
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29"
|
|
104
147
|
},
|
|
105
148
|
"publishConfig": {
|
|
106
149
|
"access": "public"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { BlueprintDefinition, CreateObject, OperationHandler, UndoMappings } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Kanban } from '#types';
|
|
11
|
+
|
|
12
|
+
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
14
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
15
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
16
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
17
|
+
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
18
|
+
Plugin.make,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export default KanbanPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { KanbanPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('KanbanPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [KanbanPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// After autoStart: OperationHandler and UndoMappings auto-cascade from OperationPlugin.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// BlueprintDefinition fires when AssistantPlugin loads blueprint definitions.
|
|
28
|
+
await harness.fire(AppActivationEvents.SetupArtifactDefinition);
|
|
29
|
+
expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
|
|
30
|
+
});
|
|
31
|
+
});
|
package/src/KanbanPlugin.tsx
CHANGED
|
@@ -2,43 +2,35 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
5
|
import { Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import {
|
|
10
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
|
-
import { ViewModel } from '@dxos/schema';
|
|
7
|
+
import { ClientEvents } from '@dxos/plugin-client';
|
|
12
8
|
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import {
|
|
10
|
+
BlueprintDefinition,
|
|
11
|
+
CreateObject,
|
|
12
|
+
Migrations,
|
|
13
|
+
OperationHandler,
|
|
14
|
+
UndoMappings,
|
|
15
|
+
ReactSurface,
|
|
16
|
+
} from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { translations } from '#translations';
|
|
19
|
+
import { Kanban } from '#types';
|
|
17
20
|
|
|
18
21
|
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
19
22
|
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
20
|
-
AppPlugin.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
metadata: {
|
|
24
|
-
icon: 'ph--kanban--regular',
|
|
25
|
-
iconHue: 'green',
|
|
26
|
-
inputSchema: CreateKanbanSchema,
|
|
27
|
-
createObject: ((props, { db }) =>
|
|
28
|
-
Effect.promise(async () => {
|
|
29
|
-
const { view } = await ViewModel.makeFromDatabase({
|
|
30
|
-
db,
|
|
31
|
-
typename: props.typename,
|
|
32
|
-
pivotFieldName: props.initialPivotColumn,
|
|
33
|
-
});
|
|
34
|
-
return Kanban.make({ name: props.name, view });
|
|
35
|
-
})) satisfies CreateObject,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
}),
|
|
39
|
-
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
23
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
24
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
25
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
40
26
|
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
41
27
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
42
28
|
AppPlugin.addTranslationsModule({ translations }),
|
|
29
|
+
Plugin.addModule({
|
|
30
|
+
activatesOn: ClientEvents.SetupMigration,
|
|
31
|
+
activate: Migrations,
|
|
32
|
+
}),
|
|
43
33
|
Plugin.make,
|
|
44
34
|
);
|
|
35
|
+
|
|
36
|
+
export default KanbanPlugin;
|
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
7
6
|
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
|
-
const BLUEPRINT_KEY = 'dxos.
|
|
10
|
-
|
|
11
|
-
const functions: AppCapabilities.BlueprintDefinition['functions'] = [];
|
|
8
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.kanban';
|
|
12
9
|
|
|
13
10
|
const make = () =>
|
|
14
11
|
Blueprint.make({
|
|
15
12
|
key: BLUEPRINT_KEY,
|
|
16
13
|
name: 'Kanban',
|
|
17
|
-
tools: Blueprint.toolDefinitions({
|
|
14
|
+
tools: Blueprint.toolDefinitions({ tools: [] }),
|
|
18
15
|
instructions: Template.make({
|
|
19
16
|
source: trim`
|
|
20
17
|
You can create and update kanban boards to show data in sorted columns defined by schema.
|
|
@@ -22,9 +19,8 @@ const make = () =>
|
|
|
22
19
|
}),
|
|
23
20
|
});
|
|
24
21
|
|
|
25
|
-
const blueprint:
|
|
22
|
+
const blueprint: Blueprint.Definition = {
|
|
26
23
|
key: BLUEPRINT_KEY,
|
|
27
|
-
functions,
|
|
28
24
|
make,
|
|
29
25
|
};
|
|
30
26
|
|
package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts}
RENAMED
|
@@ -11,17 +11,17 @@ import * as Schema from 'effect/Schema';
|
|
|
11
11
|
import { ToolResult, createTool } from '@dxos/ai';
|
|
12
12
|
import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
13
13
|
import { createArtifactElement } from '@dxos/assistant';
|
|
14
|
-
import { defineArtifact } from '@dxos/
|
|
14
|
+
import { defineArtifact } from '@dxos/compute';
|
|
15
15
|
import { Obj, Query } from '@dxos/echo';
|
|
16
16
|
import { View } from '@dxos/echo';
|
|
17
17
|
import { invariant } from '@dxos/invariant';
|
|
18
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
18
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
19
19
|
import { Filter, type Space } from '@dxos/react-client/echo';
|
|
20
20
|
import { ViewModel } from '@dxos/schema';
|
|
21
21
|
import { isNonNullable } from '@dxos/util';
|
|
22
22
|
|
|
23
|
-
import { meta } from '
|
|
24
|
-
import { Kanban } from '
|
|
23
|
+
import { meta } from '#meta';
|
|
24
|
+
import { Kanban } from '#types';
|
|
25
25
|
|
|
26
26
|
const QualifiedId = Schema.String.annotations({
|
|
27
27
|
description: 'The fully qualified ID of the kanban `spaceID:objectID`',
|
package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts}
RENAMED
|
@@ -6,8 +6,10 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
|
+
import type { Blueprint } from '@dxos/compute';
|
|
9
11
|
|
|
10
|
-
import { KanbanBlueprint } from '
|
|
12
|
+
import { KanbanBlueprint } from '#blueprints';
|
|
11
13
|
|
|
12
14
|
const blueprintDefinition = Capability.makeModule<
|
|
13
15
|
[],
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
11
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
12
|
+
import { ViewModel } from '@dxos/schema';
|
|
13
|
+
|
|
14
|
+
import { CreateKanbanSchema, Kanban } from '#types';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(
|
|
17
|
+
Effect.fnUntraced(function* () {
|
|
18
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
19
|
+
id: Type.getTypename(Kanban.Kanban),
|
|
20
|
+
inputSchema: CreateKanbanSchema,
|
|
21
|
+
createObject: (props, options) =>
|
|
22
|
+
Effect.gen(function* () {
|
|
23
|
+
const object = yield* Effect.promise(async () => {
|
|
24
|
+
const { view } = await ViewModel.makeFromDatabase({
|
|
25
|
+
db: options.db,
|
|
26
|
+
typename: props.typename,
|
|
27
|
+
pivotFieldName: props.initialPivotColumn,
|
|
28
|
+
});
|
|
29
|
+
return Kanban.make({ name: props.name, view });
|
|
30
|
+
});
|
|
31
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
32
|
+
object,
|
|
33
|
+
target: options.target,
|
|
34
|
+
hidden: true,
|
|
35
|
+
targetNodeId: options.targetNodeId,
|
|
36
|
+
});
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
10
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
11
|
+
export const Migrations = Capability.lazy('Migrations', () => import('./migrations'));
|
|
12
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
'OperationHandler',
|
|
14
|
+
() => import('./operation-handler'),
|
|
15
|
+
);
|
|
16
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
17
|
+
export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { defineObjectMigration } from '@dxos/client/echo';
|
|
9
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
10
|
+
|
|
11
|
+
import { Kanban } from '#types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* v0.1.0 → v0.2.0: nests the existing `view` ref under a `spec: { kind: 'view', view }`
|
|
15
|
+
* discriminated union. v0.2.0 introduced an items-variant for externally-synced kanbans;
|
|
16
|
+
* pre-migration objects were all view-based by construction.
|
|
17
|
+
*/
|
|
18
|
+
const migrations = [
|
|
19
|
+
defineObjectMigration({
|
|
20
|
+
from: Kanban.KanbanV1,
|
|
21
|
+
to: Kanban.Kanban,
|
|
22
|
+
transform: async (from) => ({
|
|
23
|
+
name: from.name,
|
|
24
|
+
arrangement: from.arrangement,
|
|
25
|
+
spec: { kind: 'view' as const, view: from.view },
|
|
26
|
+
}),
|
|
27
|
+
onMigration: async () => {},
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export default Capability.makeModule(
|
|
32
|
+
Effect.fnUntraced(function* () {
|
|
33
|
+
return Capability.contributes(ClientCapabilities.Migration, migrations);
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
@@ -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/compute';
|
|
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
|
+
);
|
|
@@ -4,37 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import type * as Schema from 'effect/Schema';
|
|
7
|
+
import * as SchemaAST from 'effect/SchemaAST';
|
|
7
8
|
import React, { useMemo } from 'react';
|
|
8
9
|
|
|
9
10
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
11
|
import { Surface } from '@dxos/app-framework/ui';
|
|
12
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
13
|
import { Database, JsonSchema, Obj } from '@dxos/echo';
|
|
12
14
|
import { type Collection } from '@dxos/echo';
|
|
13
15
|
import { findAnnotation } from '@dxos/effect';
|
|
14
16
|
import { type FormFieldComponentProps, SelectField, useFormValues } from '@dxos/react-ui-form';
|
|
15
17
|
|
|
16
|
-
import { KanbanContainer,
|
|
17
|
-
import {
|
|
18
|
-
import { Kanban, PivotColumnAnnotationId } from '../../types';
|
|
18
|
+
import { KanbanContainer, KanbanSettings } from '#containers';
|
|
19
|
+
import { Kanban, PivotColumnAnnotationId } from '#types';
|
|
19
20
|
|
|
20
21
|
export default Capability.makeModule(() =>
|
|
21
22
|
Effect.succeed(
|
|
22
23
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
23
24
|
Surface.create({
|
|
24
|
-
id:
|
|
25
|
-
|
|
26
|
-
filter:
|
|
25
|
+
id: 'root',
|
|
26
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
27
|
+
filter: AppSurface.oneOf(
|
|
28
|
+
AppSurface.object(AppSurface.Article, Kanban.Kanban),
|
|
29
|
+
AppSurface.object(AppSurface.Section, Kanban.Kanban),
|
|
30
|
+
),
|
|
27
31
|
component: ({ data, role }) => <KanbanContainer role={role} subject={data.subject} />,
|
|
28
32
|
}),
|
|
29
33
|
Surface.create({
|
|
30
|
-
id:
|
|
31
|
-
role: 'object-settings',
|
|
34
|
+
id: 'object-properties',
|
|
32
35
|
position: 'hoist',
|
|
33
|
-
filter: (
|
|
34
|
-
component: ({ data }) => <
|
|
36
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Kanban.Kanban),
|
|
37
|
+
component: ({ data }) => <KanbanSettings subject={data.subject} />,
|
|
35
38
|
}),
|
|
36
39
|
Surface.create({
|
|
37
|
-
id:
|
|
40
|
+
id: 'create-initial-schema-form-[pivot-column]',
|
|
38
41
|
role: 'form-input',
|
|
39
42
|
filter: (
|
|
40
43
|
data,
|
|
@@ -42,12 +45,18 @@ export default Capability.makeModule(() =>
|
|
|
42
45
|
prop: string;
|
|
43
46
|
schema: Schema.Schema<any>;
|
|
44
47
|
target: Database.Database | Collection.Collection | undefined;
|
|
48
|
+
fieldPropertyAst?: SchemaAST.AST;
|
|
45
49
|
} => {
|
|
46
50
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, PivotColumnAnnotationId);
|
|
47
51
|
return !!annotation;
|
|
48
52
|
},
|
|
49
|
-
component: ({ data: { target }, ...inputProps }) => {
|
|
50
|
-
const
|
|
53
|
+
component: ({ data: { target, fieldPropertyAst }, ...inputProps }) => {
|
|
54
|
+
const ast = fieldPropertyAst;
|
|
55
|
+
if (!ast) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const props = { ...inputProps, type: ast } as any as FormFieldComponentProps;
|
|
51
60
|
const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);
|
|
52
61
|
if (!db) {
|
|
53
62
|
return null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright 2025 DXOS.org
|
|
2
|
+
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
|
|
5
|
+
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from '#meta';
|
|
8
|
+
import { KanbanOperation } from '#types';
|
|
9
|
+
|
|
10
|
+
export default Capability.makeModule(() =>
|
|
11
|
+
Effect.succeed(
|
|
12
|
+
Capability.contributes(Capabilities.UndoMapping, [
|
|
13
|
+
UndoMapping.make({
|
|
14
|
+
operation: KanbanOperation.DeleteCardField,
|
|
15
|
+
inverse: KanbanOperation.RestoreCardField,
|
|
16
|
+
deriveContext: (input, output) => ({
|
|
17
|
+
view: input.view,
|
|
18
|
+
field: output.field,
|
|
19
|
+
props: output.props,
|
|
20
|
+
index: output.index,
|
|
21
|
+
}),
|
|
22
|
+
message: ['card-field-deleted.label', { ns: meta.id }],
|
|
23
|
+
}),
|
|
24
|
+
UndoMapping.make({
|
|
25
|
+
operation: KanbanOperation.DeleteCard,
|
|
26
|
+
inverse: KanbanOperation.RestoreCard,
|
|
27
|
+
deriveContext: (_input, output) => ({
|
|
28
|
+
card: output.card,
|
|
29
|
+
}),
|
|
30
|
+
message: ['card-deleted.label', { ns: meta.id }],
|
|
31
|
+
}),
|
|
32
|
+
]),
|
|
33
|
+
),
|
|
34
|
+
);
|