@dxos/plugin-kanban 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/LICENSE +102 -5
- package/PLUGIN.mdl +398 -0
- package/README.md +1 -1
- package/dist/lib/neutral/KanbanArticle-V3UCZQB6.mjs +133 -0
- package/dist/lib/neutral/KanbanArticle-V3UCZQB6.mjs.map +7 -0
- package/dist/lib/neutral/KanbanPlugin.mjs +44 -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/neutral/KanbanPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/KanbanPlugin.workerd.mjs.map +7 -0
- package/dist/lib/{browser/KanbanViewEditor-IH5CJ6BW.mjs → neutral/KanbanSettings-Q2RJW4U4.mjs} +38 -21
- package/dist/lib/neutral/KanbanSettings-Q2RJW4U4.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 +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6ZHHQWO5.mjs +39 -0
- package/dist/lib/neutral/chunk-6ZHHQWO5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-PNGVV67W.mjs +246 -0
- package/dist/lib/neutral/chunk-PNGVV67W.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UWUD7L3O.mjs +8 -0
- package/dist/lib/neutral/chunk-UWUD7L3O.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} +81 -142
- 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-4QF3TKXO.mjs +24 -0
- package/dist/lib/neutral/delete-card-4QF3TKXO.mjs.map +7 -0
- package/dist/lib/neutral/delete-card-field-5M4ZHKLO.mjs +39 -0
- package/dist/lib/neutral/delete-card-field-5M4ZHKLO.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/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-MROAQQQ6.mjs} +30 -38
- package/dist/lib/neutral/react-surface-MROAQQQ6.mjs.map +7 -0
- package/dist/lib/neutral/restore-card-5NI7HMIJ.mjs +21 -0
- package/dist/lib/neutral/restore-card-5NI7HMIJ.mjs.map +7 -0
- package/dist/lib/neutral/restore-card-field-QM2R67J5.mjs +37 -0
- package/dist/lib/neutral/restore-card-field-QM2R67J5.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +62 -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/KanbanPlugin.workerd.d.ts +4 -0
- package/dist/types/src/KanbanPlugin.workerd.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 +12 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- 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/KanbanArticle/KanbanArticle.d.ts +6 -0
- package/dist/types/src/containers/KanbanArticle/KanbanArticle.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanArticle/KanbanArticle.stories.d.ts +79 -0
- package/dist/types/src/containers/KanbanArticle/KanbanArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanArticle/index.d.ts +2 -0
- package/dist/types/src/containers/KanbanArticle/index.d.ts.map +1 -0
- 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 +2 -2
- 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/meta.d.ts +1 -1
- package/dist/types/src/meta.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 +66 -9
- 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/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 +115 -63
- package/src/KanbanPlugin.node.ts +21 -0
- package/src/KanbanPlugin.test.ts +31 -0
- package/src/KanbanPlugin.tsx +15 -29
- package/src/KanbanPlugin.workerd.ts +18 -0
- package/src/blueprints/kanban-blueprint.ts +4 -8
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +12 -11
- 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 +12 -3
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +35 -19
- package/src/capabilities/undo-mappings.ts +34 -0
- package/src/components/KanbanBoard/KanbanBoard.stories.tsx +22 -19
- package/src/components/KanbanBoard/KanbanBoard.tsx +43 -63
- 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 → KanbanArticle/KanbanArticle.stories.tsx} +67 -53
- package/src/containers/KanbanArticle/KanbanArticle.tsx +180 -0
- package/src/containers/KanbanArticle/index.ts +5 -0
- package/src/containers/KanbanSettings/KanbanSettings.tsx +94 -0
- package/src/containers/KanbanSettings/index.ts +5 -0
- package/src/containers/index.ts +2 -2
- 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} +13 -19
- 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 +5 -5
- package/src/index.ts +3 -2
- package/src/meta.ts +22 -5
- package/src/operations/delete-card-field.ts +42 -0
- package/src/operations/delete-card.ts +23 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/restore-card-field.ts +36 -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 +29 -23
- package/src/translations.ts +26 -25
- package/src/types/Kanban.ts +85 -18
- package/src/types/KanbanOperation.ts +79 -0
- package/src/types/index.ts +3 -1
- package/src/types/schema.ts +20 -78
- package/src/types/types.ts +2 -2
- package/src/util/arrangement.test.ts +23 -14
- package/src/util/arrangement.ts +25 -15
- package/src/vite-env.d.ts +10 -0
- 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/KanbanContainer/KanbanContainer.d.ts +0 -6
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts.map +0 -1
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts +0 -77
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/KanbanContainer/index.d.ts +0 -3
- package/dist/types/src/containers/KanbanContainer/index.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/KanbanContainer/KanbanContainer.tsx +0 -87
- package/src/containers/KanbanContainer/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.d9fc60f731",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,99 +8,151 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
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
|
+
"workerd": "./src/KanbanPlugin.workerd.ts",
|
|
54
|
+
"node": "./src/KanbanPlugin.node.ts",
|
|
55
|
+
"default": "./src/KanbanPlugin.tsx"
|
|
56
|
+
},
|
|
57
|
+
"types": "./dist/types/src/KanbanPlugin.d.ts",
|
|
58
|
+
"workerd": "./dist/lib/neutral/KanbanPlugin.workerd.mjs",
|
|
59
|
+
"node": "./dist/lib/neutral/KanbanPlugin.node.mjs",
|
|
60
|
+
"default": "./dist/lib/neutral/KanbanPlugin.mjs"
|
|
61
|
+
},
|
|
62
|
+
"#testing": "./src/testing/index.ts",
|
|
63
|
+
"#translations": {
|
|
64
|
+
"source": "./src/translations.ts",
|
|
65
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
67
|
+
},
|
|
68
|
+
"#types": {
|
|
69
|
+
"source": "./src/types/index.ts",
|
|
70
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
15
74
|
"exports": {
|
|
16
75
|
".": {
|
|
17
76
|
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"types": "./dist/types/src/index.d.ts"
|
|
77
|
+
"types": "./dist/types/src/index.d.ts",
|
|
78
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
21
79
|
},
|
|
80
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
22
81
|
"./blueprints": {
|
|
23
82
|
"source": "./src/blueprints/index.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
83
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
84
|
+
"default": "./dist/lib/neutral/blueprints/index.mjs"
|
|
85
|
+
},
|
|
86
|
+
"./plugin": {
|
|
87
|
+
"source": "./src/plugin.ts",
|
|
88
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
89
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./translations": {
|
|
92
|
+
"source": "./src/translations.ts",
|
|
93
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
94
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
27
95
|
},
|
|
28
96
|
"./types": {
|
|
29
97
|
"source": "./src/types/index.ts",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"types": "./dist/types/src/types/index.d.ts"
|
|
98
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
99
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
33
100
|
}
|
|
34
101
|
},
|
|
35
102
|
"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
103
|
"files": [
|
|
47
104
|
"dist",
|
|
48
|
-
"src"
|
|
105
|
+
"src",
|
|
106
|
+
"PLUGIN.mdl"
|
|
49
107
|
],
|
|
50
108
|
"dependencies": {
|
|
51
109
|
"@effect-atom/atom-react": "^0.5.0",
|
|
52
110
|
"@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/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/invariant": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-ui-menu": "0.8.4-main.c85a9c8dae",
|
|
76
|
-
"@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
|
|
77
|
-
"@dxos/schema": "0.8.4-main.c85a9c8dae",
|
|
78
|
-
"@dxos/util": "0.8.4-main.c85a9c8dae",
|
|
79
|
-
"@dxos/types": "0.8.4-main.c85a9c8dae",
|
|
80
|
-
"@dxos/plugin-client": "0.8.4-main.c85a9c8dae"
|
|
111
|
+
"effect": "3.21.2",
|
|
112
|
+
"@dxos/ai": "0.8.4-main.d9fc60f731",
|
|
113
|
+
"@dxos/app-framework": "0.8.4-main.d9fc60f731",
|
|
114
|
+
"@dxos/app-toolkit": "0.8.4-main.d9fc60f731",
|
|
115
|
+
"@dxos/echo": "0.8.4-main.d9fc60f731",
|
|
116
|
+
"@dxos/assistant": "0.8.4-main.d9fc60f731",
|
|
117
|
+
"@dxos/compute": "0.8.4-main.d9fc60f731",
|
|
118
|
+
"@dxos/echo-atom": "0.8.4-main.d9fc60f731",
|
|
119
|
+
"@dxos/effect": "0.8.4-main.d9fc60f731",
|
|
120
|
+
"@dxos/log": "0.8.4-main.d9fc60f731",
|
|
121
|
+
"@dxos/invariant": "0.8.4-main.d9fc60f731",
|
|
122
|
+
"@dxos/plugin-client": "0.8.4-main.d9fc60f731",
|
|
123
|
+
"@dxos/plugin-space": "0.8.4-main.d9fc60f731",
|
|
124
|
+
"@dxos/random": "0.8.4-main.d9fc60f731",
|
|
125
|
+
"@dxos/react-client": "0.8.4-main.d9fc60f731",
|
|
126
|
+
"@dxos/react-ui-form": "0.8.4-main.d9fc60f731",
|
|
127
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
128
|
+
"@dxos/react-ui-menu": "0.8.4-main.d9fc60f731",
|
|
129
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.d9fc60f731",
|
|
130
|
+
"@dxos/schema": "0.8.4-main.d9fc60f731",
|
|
131
|
+
"@dxos/util": "0.8.4-main.d9fc60f731",
|
|
132
|
+
"@dxos/types": "0.8.4-main.d9fc60f731"
|
|
81
133
|
},
|
|
82
134
|
"devDependencies": {
|
|
83
135
|
"@types/react": "~19.2.7",
|
|
84
136
|
"@types/react-dom": "~19.2.3",
|
|
85
137
|
"react": "~19.2.3",
|
|
86
138
|
"react-dom": "~19.2.3",
|
|
87
|
-
"vite": "^
|
|
88
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
139
|
+
"vite": "^8.0.14",
|
|
140
|
+
"@dxos/echo-db": "0.8.4-main.d9fc60f731",
|
|
141
|
+
"@dxos/plugin-testing": "0.8.4-main.d9fc60f731",
|
|
142
|
+
"@dxos/keys": "0.8.4-main.d9fc60f731",
|
|
143
|
+
"@dxos/plugin-preview": "0.8.4-main.d9fc60f731",
|
|
144
|
+
"@dxos/plugin-theme": "0.8.4-main.d9fc60f731",
|
|
145
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.d9fc60f731",
|
|
146
|
+
"@dxos/storybook-utils": "0.8.4-main.d9fc60f731",
|
|
147
|
+
"@dxos/test-utils": "0.8.4-main.d9fc60f731",
|
|
148
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
97
149
|
},
|
|
98
150
|
"peerDependencies": {
|
|
99
|
-
"effect": "3.
|
|
151
|
+
"effect": "3.21.2",
|
|
100
152
|
"react": "~19.2.3",
|
|
101
153
|
"react-dom": "~19.2.3",
|
|
102
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
103
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
154
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
155
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
104
156
|
},
|
|
105
157
|
"publishConfig": {
|
|
106
158
|
"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 ProcessManagerPlugin.
|
|
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,29 @@
|
|
|
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 { Type } from '@dxos/echo';
|
|
10
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
|
-
import { ViewModel } from '@dxos/schema';
|
|
12
7
|
|
|
13
|
-
import { BlueprintDefinition,
|
|
14
|
-
import { meta } from '
|
|
15
|
-
import { translations } from '
|
|
16
|
-
import {
|
|
8
|
+
import { BlueprintDefinition, CreateObject, OperationHandler, UndoMappings, ReactSurface } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
import { Kanban } from '#types';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
14
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
17
15
|
|
|
18
16
|
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
19
17
|
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 }),
|
|
18
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
19
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
20
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
40
21
|
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
41
22
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
42
23
|
AppPlugin.addTranslationsModule({ translations }),
|
|
24
|
+
AppPlugin.addPluginAssetModule({
|
|
25
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
26
|
+
}),
|
|
43
27
|
Plugin.make,
|
|
44
28
|
);
|
|
29
|
+
|
|
30
|
+
export default KanbanPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { OperationHandler } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Kanban } from '#types';
|
|
11
|
+
|
|
12
|
+
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
15
|
+
Plugin.make,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
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,16 @@ 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/
|
|
15
|
-
import { Obj, Query } from '@dxos/echo';
|
|
16
|
-
import { View } from '@dxos/echo';
|
|
14
|
+
import { defineArtifact } from '@dxos/compute';
|
|
15
|
+
import { Filter, Obj, Query, Type, View } from '@dxos/echo';
|
|
17
16
|
import { invariant } from '@dxos/invariant';
|
|
18
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
19
|
-
import {
|
|
17
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
18
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
20
19
|
import { ViewModel } from '@dxos/schema';
|
|
21
20
|
import { isNonNullable } from '@dxos/util';
|
|
22
21
|
|
|
23
|
-
import { meta } from '
|
|
24
|
-
import { Kanban } from '
|
|
22
|
+
import { meta } from '#meta';
|
|
23
|
+
import { Kanban } from '#types';
|
|
25
24
|
|
|
26
25
|
const QualifiedId = Schema.String.annotations({
|
|
27
26
|
description: 'The fully qualified ID of the kanban `spaceID:objectID`',
|
|
@@ -64,8 +63,9 @@ export default Capability.makeModule(() =>
|
|
|
64
63
|
invariant(extensions?.space, 'No space');
|
|
65
64
|
invariant(extensions?.invoke, 'No operation invoker');
|
|
66
65
|
|
|
67
|
-
// Validate schema exists first
|
|
68
|
-
const
|
|
66
|
+
// Validate schema exists first.
|
|
67
|
+
const types = extensions.space.db.graph.registry.list().filter(Type.isType);
|
|
68
|
+
const schema = types.find((t) => Type.getTypename(t) === typename);
|
|
69
69
|
if (!schema) {
|
|
70
70
|
return ToolResult.Error(`Schema not found: ${typename}`);
|
|
71
71
|
}
|
|
@@ -106,7 +106,7 @@ export default Capability.makeModule(() =>
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
return {
|
|
109
|
-
id: Obj.
|
|
109
|
+
id: Obj.getURI(view),
|
|
110
110
|
name: view.name ?? 'Unnamed Kanban',
|
|
111
111
|
typename: view.query.typename,
|
|
112
112
|
};
|
|
@@ -133,7 +133,8 @@ export default Capability.makeModule(() =>
|
|
|
133
133
|
invariant(Obj.instanceOf(Kanban.Kanban, kanban));
|
|
134
134
|
|
|
135
135
|
const typename = view.query.typename;
|
|
136
|
-
const
|
|
136
|
+
const types = space.db.graph.registry.list().filter(Type.isType);
|
|
137
|
+
const schema = types.find((t) => Type.getTypename(t) === typename);
|
|
137
138
|
invariant(schema);
|
|
138
139
|
|
|
139
140
|
return ToolResult.Success({
|
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,15 @@
|
|
|
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 OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
12
|
+
'OperationHandler',
|
|
13
|
+
() => import('./operation-handler'),
|
|
14
|
+
);
|
|
15
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
16
|
+
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/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,39 @@
|
|
|
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';
|
|
11
|
-
import {
|
|
12
|
-
import { type Collection } from '@dxos/echo';
|
|
12
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
13
|
+
import { type Collection, Database, Obj, Type } from '@dxos/echo';
|
|
13
14
|
import { findAnnotation } from '@dxos/effect';
|
|
14
15
|
import { type FormFieldComponentProps, SelectField, useFormValues } from '@dxos/react-ui-form';
|
|
15
16
|
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Kanban, PivotColumnAnnotationId } from '../../types';
|
|
17
|
+
import { KanbanArticle, KanbanSettings } from '#containers';
|
|
18
|
+
import { Kanban, PivotColumnAnnotationId } from '#types';
|
|
19
19
|
|
|
20
20
|
export default Capability.makeModule(() =>
|
|
21
21
|
Effect.succeed(
|
|
22
22
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
23
23
|
Surface.create({
|
|
24
|
-
id:
|
|
25
|
-
|
|
26
|
-
filter:
|
|
27
|
-
|
|
24
|
+
id: 'root',
|
|
25
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
26
|
+
filter: AppSurface.oneOf(
|
|
27
|
+
AppSurface.object(AppSurface.Article, Kanban.Kanban),
|
|
28
|
+
AppSurface.object(AppSurface.Section, Kanban.Kanban),
|
|
29
|
+
),
|
|
30
|
+
component: ({ data, role }) => <KanbanArticle role={role} subject={data.subject} />,
|
|
28
31
|
}),
|
|
29
32
|
Surface.create({
|
|
30
|
-
id:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
component: ({ data }) => <KanbanViewEditor subject={data.subject} />,
|
|
33
|
+
id: 'objectProperties',
|
|
34
|
+
position: 'first',
|
|
35
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Kanban.Kanban),
|
|
36
|
+
component: ({ data }) => <KanbanSettings subject={data.subject} />,
|
|
35
37
|
}),
|
|
36
38
|
Surface.create({
|
|
37
|
-
id:
|
|
39
|
+
id: 'createInitialSchemaForm',
|
|
38
40
|
role: 'form-input',
|
|
39
41
|
filter: (
|
|
40
42
|
data,
|
|
@@ -42,12 +44,18 @@ export default Capability.makeModule(() =>
|
|
|
42
44
|
prop: string;
|
|
43
45
|
schema: Schema.Schema<any>;
|
|
44
46
|
target: Database.Database | Collection.Collection | undefined;
|
|
47
|
+
fieldPropertyAst?: SchemaAST.AST;
|
|
45
48
|
} => {
|
|
46
49
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, PivotColumnAnnotationId);
|
|
47
50
|
return !!annotation;
|
|
48
51
|
},
|
|
49
|
-
component: ({ data: { target }, ...inputProps }) => {
|
|
50
|
-
const
|
|
52
|
+
component: ({ data: { target, fieldPropertyAst }, ...inputProps }) => {
|
|
53
|
+
const ast = fieldPropertyAst;
|
|
54
|
+
if (!ast) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const props = { ...inputProps, type: ast } as any as FormFieldComponentProps;
|
|
51
59
|
const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);
|
|
52
60
|
if (!db) {
|
|
53
61
|
return null;
|
|
@@ -55,11 +63,19 @@ export default Capability.makeModule(() =>
|
|
|
55
63
|
|
|
56
64
|
const { typename } = useFormValues('KanbanForm');
|
|
57
65
|
const [selectedSchema] = useMemo(
|
|
58
|
-
() =>
|
|
66
|
+
() =>
|
|
67
|
+
db.graph.registry
|
|
68
|
+
.list()
|
|
69
|
+
.filter(Type.isType)
|
|
70
|
+
.filter((t) => Type.getTypename(t) === typename),
|
|
59
71
|
[db, typename],
|
|
60
72
|
);
|
|
61
73
|
const singleSelectColumns = useMemo(() => {
|
|
62
|
-
|
|
74
|
+
if (!selectedSchema) {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
const jsonSchema = selectedSchema.jsonSchema;
|
|
78
|
+
const properties = jsonSchema.properties;
|
|
63
79
|
if (!properties) {
|
|
64
80
|
return [];
|
|
65
81
|
}
|