@dxos/plugin-kanban 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8
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-T4CPKAZH.mjs +132 -0
- package/dist/lib/neutral/KanbanArticle-T4CPKAZH.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/neutral/KanbanSettings-5WOS4CUE.mjs +83 -0
- package/dist/lib/neutral/KanbanSettings-5WOS4CUE.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-6DV3Q5MC.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-6DV3Q5MC.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- 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-DAKIZO46.mjs +246 -0
- package/dist/lib/neutral/chunk-DAKIZO46.mjs.map +7 -0
- package/dist/lib/neutral/chunk-M5ISZWZU.mjs +8 -0
- package/dist/lib/neutral/chunk-M5ISZWZU.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-ZTQW5KQS.mjs} +4 -5
- package/dist/lib/neutral/chunk-ZTQW5KQS.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +243 -0
- 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/{browser/delete-card-VPNVIWOA.mjs → neutral/delete-card-VNAV3CZV.mjs} +6 -14
- package/dist/lib/neutral/delete-card-VNAV3CZV.mjs.map +7 -0
- package/dist/lib/neutral/delete-card-field-XHOLGS6L.mjs +39 -0
- package/dist/lib/neutral/delete-card-field-XHOLGS6L.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +431 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.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/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-VZEVEJL5.mjs +91 -0
- package/dist/lib/neutral/react-surface-VZEVEJL5.mjs.map +7 -0
- package/dist/lib/{browser/restore-card-4GG2RYKR.mjs → neutral/restore-card-EKVEPATL.mjs} +6 -14
- package/dist/lib/neutral/restore-card-EKVEPATL.mjs.map +7 -0
- package/dist/lib/neutral/restore-card-field-TQCTGGNO.mjs +37 -0
- package/dist/lib/neutral/restore-card-field-TQCTGGNO.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/neutral/types/index.mjs +22 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- 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 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- 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 +9 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts +9 -29
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts +24 -24
- 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/{KanbanContainer/KanbanContainer.stories.d.ts → KanbanArticle/KanbanArticle.stories.d.ts} +26 -26
- 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.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.map +1 -1
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts +1 -1
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts +1 -1
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts.map +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 +3 -3
- package/dist/types/src/operations/delete-card-field.d.ts.map +1 -1
- package/dist/types/src/operations/delete-card.d.ts +3 -3
- package/dist/types/src/operations/delete-card.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/restore-card-field.d.ts +3 -3
- package/dist/types/src/operations/restore-card-field.d.ts.map +1 -1
- package/dist/types/src/operations/restore-card.d.ts +3 -3
- package/dist/types/src/operations/restore-card.d.ts.map +1 -1
- 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/translations.d.ts +24 -24
- 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/{operations/definitions.d.ts → types/KanbanOperation.d.ts} +4 -4
- 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 -1
- 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 +110 -76
- package/src/KanbanPlugin.node.ts +21 -0
- package/src/KanbanPlugin.test.ts +31 -0
- package/src/KanbanPlugin.tsx +12 -39
- package/src/KanbanPlugin.workerd.ts +18 -0
- package/src/blueprints/kanban-blueprint.ts +2 -3
- package/src/capabilities/artifact-definition.ts +10 -9
- package/src/capabilities/blueprint-definition.ts +6 -4
- package/src/capabilities/create-object.ts +40 -0
- package/src/capabilities/index.ts +9 -2
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +31 -14
- package/src/capabilities/undo-mappings.ts +1 -1
- package/src/components/KanbanBoard/KanbanBoard.stories.tsx +9 -6
- package/src/components/KanbanBoard/KanbanBoard.tsx +22 -51
- package/src/components/KanbanBoard/KanbanCard.tsx +75 -60
- package/src/components/KanbanBoard/KanbanColumn.tsx +16 -13
- package/src/components/KanbanBoard/context.ts +54 -0
- package/src/containers/{KanbanContainer/KanbanContainer.stories.tsx → KanbanArticle/KanbanArticle.stories.tsx} +48 -42
- package/src/containers/KanbanArticle/KanbanArticle.tsx +179 -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 +2 -2
- package/src/hooks/useItemsProjection.ts +44 -0
- package/src/hooks/{useKanbanBoardModel.test.ts → useKanbanBoardModel.browser.test.ts} +14 -19
- package/src/hooks/useKanbanBoardModel.ts +19 -7
- package/src/hooks/useProjectionModel.ts +4 -4
- package/src/index.ts +3 -2
- package/src/meta.ts +22 -5
- package/src/operations/delete-card-field.ts +11 -16
- package/src/operations/delete-card.ts +3 -3
- package/src/operations/index.ts +1 -3
- package/src/operations/restore-card-field.ts +11 -16
- package/src/operations/restore-card.ts +3 -3
- package/src/playwright/smoke.spec.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/testing/KanbanCardTileSimple.tsx +6 -6
- package/src/types/Kanban.ts +86 -23
- package/src/{operations/definitions.ts → types/KanbanOperation.ts} +25 -9
- package/src/types/index.ts +3 -1
- package/src/types/schema.ts +20 -2
- package/src/types/types.ts +2 -2
- package/src/util/arrangement.test.ts +22 -13
- package/src/util/arrangement.ts +25 -15
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-A3PBV3S5.mjs +0 -105
- package/dist/lib/browser/chunk-A3PBV3S5.mjs.map +0 -7
- package/dist/lib/browser/delete-card-VPNVIWOA.mjs.map +0 -7
- package/dist/lib/browser/delete-card-field-4HHF2GYX.mjs +0 -50
- package/dist/lib/browser/delete-card-field-4HHF2GYX.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -121
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/restore-card-4GG2RYKR.mjs.map +0 -7
- package/dist/lib/browser/restore-card-field-3T26ACYX.mjs +0 -48
- package/dist/lib/browser/restore-card-field-3T26ACYX.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -100
- package/dist/lib/browser/types/index.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -28
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6LELYA2G.mjs +0 -106
- package/dist/lib/node-esm/chunk-6LELYA2G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/delete-card-5PW5OMFN.mjs +0 -33
- package/dist/lib/node-esm/delete-card-5PW5OMFN.mjs.map +0 -7
- package/dist/lib/node-esm/delete-card-field-KPJU2AQ3.mjs +0 -51
- package/dist/lib/node-esm/delete-card-field-KPJU2AQ3.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -122
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/restore-card-X2TKMU5A.mjs +0 -30
- package/dist/lib/node-esm/restore-card-X2TKMU5A.mjs.map +0 -7
- package/dist/lib/node-esm/restore-card-field-IUTL4RTR.mjs +0 -49
- package/dist/lib/node-esm/restore-card-field-IUTL4RTR.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -101
- package/dist/lib/node-esm/types/index.mjs.map +0 -7
- 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.map +0 -1
- package/dist/types/src/containers/KanbanContainer/index.d.ts +0 -2
- 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 -2
- 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/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/src/containers/KanbanContainer/KanbanContainer.tsx +0 -96
- package/src/containers/KanbanContainer/index.ts +0 -5
- package/src/containers/KanbanViewEditor/KanbanViewEditor.tsx +0 -63
- package/src/containers/KanbanViewEditor/index.ts +0 -5
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-kanban",
|
|
3
|
-
"version": "0.8.4-
|
|
3
|
+
"version": "0.8.4-staging.60fe92afc8",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,116 +8,150 @@
|
|
|
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
15
|
"imports": {
|
|
16
|
-
"#blueprints":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"#
|
|
22
|
-
|
|
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
|
+
},
|
|
23
62
|
"#testing": "./src/testing/index.ts",
|
|
24
|
-
"#
|
|
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
|
+
}
|
|
25
73
|
},
|
|
26
74
|
"exports": {
|
|
27
75
|
".": {
|
|
28
76
|
"source": "./src/index.ts",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"types": "./dist/types/src/index.d.ts"
|
|
77
|
+
"types": "./dist/types/src/index.d.ts",
|
|
78
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
32
79
|
},
|
|
80
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
33
81
|
"./blueprints": {
|
|
34
82
|
"source": "./src/blueprints/index.ts",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
83
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
84
|
+
"default": "./dist/lib/neutral/blueprints/index.mjs"
|
|
38
85
|
},
|
|
39
|
-
"./
|
|
40
|
-
"source": "./src/
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
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"
|
|
44
95
|
},
|
|
45
96
|
"./types": {
|
|
46
97
|
"source": "./src/types/index.ts",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"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"
|
|
50
100
|
}
|
|
51
101
|
},
|
|
52
102
|
"types": "dist/types/src/index.d.ts",
|
|
53
|
-
"typesVersions": {
|
|
54
|
-
"*": {
|
|
55
|
-
"blueprints": [
|
|
56
|
-
"dist/types/src/blueprints/index.d.ts"
|
|
57
|
-
],
|
|
58
|
-
"types": [
|
|
59
|
-
"dist/types/src/types/index.d.ts"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
103
|
"files": [
|
|
64
104
|
"dist",
|
|
65
|
-
"src"
|
|
105
|
+
"src",
|
|
106
|
+
"PLUGIN.mdl"
|
|
66
107
|
],
|
|
67
108
|
"dependencies": {
|
|
68
109
|
"@effect-atom/atom-react": "^0.5.0",
|
|
69
110
|
"@radix-ui/react-context": "1.1.1",
|
|
70
|
-
"effect": "3.
|
|
71
|
-
"@dxos/ai": "0.8.4-
|
|
72
|
-
"@dxos/app-
|
|
73
|
-
"@dxos/assistant": "0.8.4-
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/react-ui": "0.8.4-
|
|
90
|
-
"@dxos/
|
|
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"
|
|
111
|
+
"effect": "3.21.3",
|
|
112
|
+
"@dxos/ai": "0.8.4-staging.60fe92afc8",
|
|
113
|
+
"@dxos/app-framework": "0.8.4-staging.60fe92afc8",
|
|
114
|
+
"@dxos/assistant": "0.8.4-staging.60fe92afc8",
|
|
115
|
+
"@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
|
|
116
|
+
"@dxos/echo": "0.8.4-staging.60fe92afc8",
|
|
117
|
+
"@dxos/effect": "0.8.4-staging.60fe92afc8",
|
|
118
|
+
"@dxos/compute": "0.8.4-staging.60fe92afc8",
|
|
119
|
+
"@dxos/invariant": "0.8.4-staging.60fe92afc8",
|
|
120
|
+
"@dxos/log": "0.8.4-staging.60fe92afc8",
|
|
121
|
+
"@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
|
|
122
|
+
"@dxos/random": "0.8.4-staging.60fe92afc8",
|
|
123
|
+
"@dxos/plugin-space": "0.8.4-staging.60fe92afc8",
|
|
124
|
+
"@dxos/react-client": "0.8.4-staging.60fe92afc8",
|
|
125
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8",
|
|
126
|
+
"@dxos/react-ui-form": "0.8.4-staging.60fe92afc8",
|
|
127
|
+
"@dxos/react-ui-menu": "0.8.4-staging.60fe92afc8",
|
|
128
|
+
"@dxos/schema": "0.8.4-staging.60fe92afc8",
|
|
129
|
+
"@dxos/types": "0.8.4-staging.60fe92afc8",
|
|
130
|
+
"@dxos/react-ui-mosaic": "0.8.4-staging.60fe92afc8",
|
|
131
|
+
"@dxos/util": "0.8.4-staging.60fe92afc8"
|
|
98
132
|
},
|
|
99
133
|
"devDependencies": {
|
|
100
134
|
"@types/react": "~19.2.7",
|
|
101
135
|
"@types/react-dom": "~19.2.3",
|
|
102
136
|
"react": "~19.2.3",
|
|
103
137
|
"react-dom": "~19.2.3",
|
|
104
|
-
"vite": "^
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/plugin-testing": "0.8.4-
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/storybook-utils": "0.8.4-
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/ui-theme": "0.8.4-
|
|
138
|
+
"vite": "^8.0.16",
|
|
139
|
+
"@dxos/echo-client": "0.8.4-staging.60fe92afc8",
|
|
140
|
+
"@dxos/keys": "0.8.4-staging.60fe92afc8",
|
|
141
|
+
"@dxos/plugin-preview": "0.8.4-staging.60fe92afc8",
|
|
142
|
+
"@dxos/plugin-testing": "0.8.4-staging.60fe92afc8",
|
|
143
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-staging.60fe92afc8",
|
|
144
|
+
"@dxos/test-utils": "0.8.4-staging.60fe92afc8",
|
|
145
|
+
"@dxos/storybook-utils": "0.8.4-staging.60fe92afc8",
|
|
146
|
+
"@dxos/plugin-theme": "0.8.4-staging.60fe92afc8",
|
|
147
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
|
|
114
148
|
},
|
|
115
149
|
"peerDependencies": {
|
|
116
|
-
"effect": "3.
|
|
150
|
+
"effect": "3.21.3",
|
|
117
151
|
"react": "~19.2.3",
|
|
118
152
|
"react-dom": "~19.2.3",
|
|
119
|
-
"@dxos/ui
|
|
120
|
-
"@dxos/
|
|
153
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8",
|
|
154
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
|
|
121
155
|
},
|
|
122
156
|
"publishConfig": {
|
|
123
157
|
"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,56 +2,29 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Option from 'effect/Option';
|
|
7
|
-
|
|
8
5
|
import { Plugin } from '@dxos/app-framework';
|
|
9
6
|
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
7
|
|
|
16
|
-
import { BlueprintDefinition, OperationHandler, UndoMappings, ReactSurface } from '#capabilities';
|
|
8
|
+
import { BlueprintDefinition, CreateObject, OperationHandler, UndoMappings, ReactSurface } from '#capabilities';
|
|
17
9
|
import { meta } from '#meta';
|
|
18
|
-
import {
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
import { Kanban } from '#types';
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
14
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
21
15
|
|
|
22
16
|
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
23
17
|
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
24
|
-
AppPlugin.
|
|
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
|
-
}),
|
|
18
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
51
19
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
52
|
-
AppPlugin.
|
|
20
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
53
21
|
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
54
22
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
55
23
|
AppPlugin.addTranslationsModule({ translations }),
|
|
24
|
+
AppPlugin.addPluginAssetModule({
|
|
25
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
26
|
+
}),
|
|
56
27
|
Plugin.make,
|
|
57
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,8 +2,7 @@
|
|
|
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
8
|
const BLUEPRINT_KEY = 'org.dxos.blueprint.kanban';
|
|
@@ -20,7 +19,7 @@ const make = () =>
|
|
|
20
19
|
}),
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
const blueprint:
|
|
22
|
+
const blueprint: Blueprint.Definition = {
|
|
24
23
|
key: BLUEPRINT_KEY,
|
|
25
24
|
make,
|
|
26
25
|
};
|
|
@@ -11,12 +11,11 @@ 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
|
|
|
@@ -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({
|
|
@@ -9,9 +9,11 @@ import { AppCapabilities } from '@dxos/app-toolkit';
|
|
|
9
9
|
|
|
10
10
|
import { KanbanBlueprint } from '#blueprints';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
-
|
|
12
|
+
// NOTE: Explicit annotation required: d.ts emit cannot portably name the inferred @dxos/compute types (TS2883).
|
|
13
|
+
const blueprintDefinition: () => Effect.Effect<
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[],
|
|
15
|
+
never,
|
|
16
|
+
Capability.Service
|
|
17
|
+
> = () => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, KanbanBlueprint)]);
|
|
16
18
|
|
|
17
19
|
export default blueprintDefinition;
|
|
@@ -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
|
+
);
|
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
7
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
// The contributed capability type references Blueprint types from @dxos/compute, so the lazy
|
|
10
|
+
// wrapper needs an explicit annotation to keep the inferred type portable (TS2883).
|
|
11
|
+
export const BlueprintDefinition: Capability.LazyCapability<
|
|
12
|
+
void,
|
|
13
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
14
|
+
> = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
15
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
9
16
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
10
17
|
'OperationHandler',
|
|
11
18
|
() => import('./operation-handler'),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
6
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
6
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
import { KanbanOperationHandlerSet } from '#operations';
|
|
9
9
|
|
|
@@ -4,17 +4,17 @@
|
|
|
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
12
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { findAnnotation } from '@dxos/effect';
|
|
13
|
+
import { type Collection, Database, Obj, Type } from '@dxos/echo';
|
|
14
|
+
import { SchemaEx } from '@dxos/effect';
|
|
15
15
|
import { type FormFieldComponentProps, SelectField, useFormValues } from '@dxos/react-ui-form';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { KanbanArticle, KanbanSettings } from '#containers';
|
|
18
18
|
import { Kanban, PivotColumnAnnotationId } from '#types';
|
|
19
19
|
|
|
20
20
|
export default Capability.makeModule(() =>
|
|
@@ -27,16 +27,16 @@ export default Capability.makeModule(() =>
|
|
|
27
27
|
AppSurface.object(AppSurface.Article, Kanban.Kanban),
|
|
28
28
|
AppSurface.object(AppSurface.Section, Kanban.Kanban),
|
|
29
29
|
),
|
|
30
|
-
component: ({ data, role }) => <
|
|
30
|
+
component: ({ data, role }) => <KanbanArticle role={role} subject={data.subject} />,
|
|
31
31
|
}),
|
|
32
32
|
Surface.create({
|
|
33
|
-
id: '
|
|
34
|
-
position: '
|
|
33
|
+
id: 'objectProperties',
|
|
34
|
+
position: 'first',
|
|
35
35
|
filter: AppSurface.object(AppSurface.ObjectProperties, Kanban.Kanban),
|
|
36
|
-
component: ({ data }) => <
|
|
36
|
+
component: ({ data }) => <KanbanSettings subject={data.subject} />,
|
|
37
37
|
}),
|
|
38
38
|
Surface.create({
|
|
39
|
-
id: '
|
|
39
|
+
id: 'createInitialSchemaForm',
|
|
40
40
|
role: 'form-input',
|
|
41
41
|
filter: (
|
|
42
42
|
data,
|
|
@@ -44,12 +44,21 @@ export default Capability.makeModule(() =>
|
|
|
44
44
|
prop: string;
|
|
45
45
|
schema: Schema.Schema<any>;
|
|
46
46
|
target: Database.Database | Collection.Collection | undefined;
|
|
47
|
+
fieldPropertyAst?: SchemaAST.AST;
|
|
47
48
|
} => {
|
|
48
|
-
const annotation = findAnnotation<boolean>(
|
|
49
|
+
const annotation = SchemaEx.findAnnotation<boolean>(
|
|
50
|
+
(data.schema as Schema.Schema.All).ast,
|
|
51
|
+
PivotColumnAnnotationId,
|
|
52
|
+
);
|
|
49
53
|
return !!annotation;
|
|
50
54
|
},
|
|
51
|
-
component: ({ data: { target }, ...inputProps }) => {
|
|
52
|
-
const
|
|
55
|
+
component: ({ data: { target, fieldPropertyAst }, ...inputProps }) => {
|
|
56
|
+
const ast = fieldPropertyAst;
|
|
57
|
+
if (!ast) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const props = { ...inputProps, type: ast } as any as FormFieldComponentProps;
|
|
53
62
|
const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);
|
|
54
63
|
if (!db) {
|
|
55
64
|
return null;
|
|
@@ -57,11 +66,19 @@ export default Capability.makeModule(() =>
|
|
|
57
66
|
|
|
58
67
|
const { typename } = useFormValues('KanbanForm');
|
|
59
68
|
const [selectedSchema] = useMemo(
|
|
60
|
-
() =>
|
|
69
|
+
() =>
|
|
70
|
+
db.graph.registry
|
|
71
|
+
.list()
|
|
72
|
+
.filter(Type.isType)
|
|
73
|
+
.filter((t) => Type.getTypename(t) === typename),
|
|
61
74
|
[db, typename],
|
|
62
75
|
);
|
|
63
76
|
const singleSelectColumns = useMemo(() => {
|
|
64
|
-
|
|
77
|
+
if (!selectedSchema) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
const jsonSchema = selectedSchema.jsonSchema;
|
|
81
|
+
const properties = jsonSchema.properties;
|
|
65
82
|
if (!properties) {
|
|
66
83
|
return [];
|
|
67
84
|
}
|
|
@@ -5,7 +5,7 @@ import * as Effect from 'effect/Effect';
|
|
|
5
5
|
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
import { meta } from '#meta';
|
|
8
|
-
import { KanbanOperation } from '#
|
|
8
|
+
import { KanbanOperation } from '#types';
|
|
9
9
|
|
|
10
10
|
export default Capability.makeModule(() =>
|
|
11
11
|
Effect.succeed(
|