@dxos/plugin-space 0.8.4-main.c1de068 → 0.8.4-main.e098934
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/browser/{ObjectDetailsPanel-YPTDQKMG.mjs → ObjectDetailsPanel-J7KGPJJK.mjs} +7 -5
- package/dist/lib/browser/ObjectDetailsPanel-J7KGPJJK.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +68 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-7CZZJS3S.mjs → app-graph-builder-AFC6PNAB.mjs} +57 -19
- package/dist/lib/browser/app-graph-builder-AFC6PNAB.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-H6AW7KGS.mjs → app-graph-serializer-Q7QG4EKW.mjs} +4 -4
- package/dist/lib/browser/{chunk-V7MJSSBQ.mjs → chunk-6GRF7NEF.mjs} +100 -104
- package/dist/lib/browser/chunk-6GRF7NEF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JS3MMC42.mjs → chunk-CBYL62HG.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-5HHYE264.mjs.map → browser/chunk-CBYL62HG.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-VLBRSGJ2.mjs → chunk-ELJDGQTO.mjs} +3 -3
- package/dist/lib/browser/{chunk-VLBRSGJ2.mjs.map → chunk-ELJDGQTO.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-XUYKJUU7.mjs → chunk-S33AYKSS.mjs} +68 -16
- package/dist/lib/browser/chunk-S33AYKSS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CEFHNVU7.mjs → chunk-TUQZO5P4.mjs} +1 -1
- package/dist/lib/browser/{chunk-CEFHNVU7.mjs.map → chunk-TUQZO5P4.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-SGTQ52SU.mjs → chunk-URST7EEN.mjs} +10 -4
- package/dist/lib/{node-esm/chunk-JH6F4C3I.mjs.map → browser/chunk-URST7EEN.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-QACNNDOT.mjs → chunk-WZYRDFW7.mjs} +9 -8
- package/dist/lib/browser/chunk-WZYRDFW7.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs → identity-created-T6ZNVE7S.mjs} +2 -2
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs.map → identity-created-T6ZNVE7S.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +14 -32
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-TIXVDYN7.mjs → intent-resolver-CO262Q44.mjs} +33 -28
- package/dist/lib/browser/intent-resolver-CO262Q44.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-N2J7TDRX.mjs → react-root-K4IVLFYZ.mjs} +6 -6
- package/dist/lib/browser/{react-root-N2J7TDRX.mjs.map → react-root-K4IVLFYZ.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-TPNLWJJH.mjs → react-surface-TPUOK2LC.mjs} +26 -15
- package/dist/lib/browser/react-surface-TPUOK2LC.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-Z6FC4AHC.mjs → schema-defs-YDPFZELA.mjs} +2 -2
- package/dist/lib/browser/schema-defs-YDPFZELA.mjs.map +7 -0
- package/dist/lib/browser/{settings-4IMP5RYT.mjs → settings-ZYH2JWNI.mjs} +2 -2
- package/dist/lib/browser/{spaces-ready-TOPG6IV4.mjs → spaces-ready-3I5LISH4.mjs} +14 -12
- package/dist/lib/browser/spaces-ready-3I5LISH4.mjs.map +7 -0
- package/dist/lib/browser/{state-QYZAB45H.mjs → state-2RGW7FQG.mjs} +2 -2
- package/dist/lib/{node-esm/state-ZVEHQ4BJ.mjs.map → browser/state-2RGW7FQG.mjs.map} +2 -2
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/{ObjectDetailsPanel-QKZEDSZK.mjs → ObjectDetailsPanel-7ADOXZ5W.mjs} +7 -5
- package/dist/lib/node-esm/ObjectDetailsPanel-7ADOXZ5W.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +70 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-KGIGWC72.mjs → app-graph-builder-OW2EBYRI.mjs} +57 -19
- package/dist/lib/node-esm/app-graph-builder-OW2EBYRI.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-2ICUGQQT.mjs → app-graph-serializer-6PGC5WR5.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-5HHYE264.mjs → chunk-FJZNSJC4.mjs} +2 -2
- package/dist/lib/{browser/chunk-JS3MMC42.mjs.map → node-esm/chunk-FJZNSJC4.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-5T3ZH23B.mjs → chunk-HC677WUJ.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-5T3ZH23B.mjs.map → chunk-HC677WUJ.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-P442DOQ3.mjs → chunk-LGNPMOXU.mjs} +9 -8
- package/dist/lib/node-esm/chunk-LGNPMOXU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6X5DLJM5.mjs → chunk-NMCD2PSG.mjs} +100 -104
- package/dist/lib/node-esm/chunk-NMCD2PSG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs → chunk-Q6AAQLQG.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs.map → chunk-Q6AAQLQG.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-JH6F4C3I.mjs → chunk-RXDT5LA5.mjs} +10 -4
- package/dist/lib/node-esm/chunk-RXDT5LA5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4AOMYKDE.mjs → chunk-TEUN2E4F.mjs} +68 -16
- package/dist/lib/node-esm/chunk-TEUN2E4F.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs → identity-created-AL7NNCKH.mjs} +2 -2
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs.map → identity-created-AL7NNCKH.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +14 -32
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MHGHRGDT.mjs → intent-resolver-EXPK4B76.mjs} +33 -28
- package/dist/lib/node-esm/intent-resolver-EXPK4B76.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-KW3TGJGY.mjs → react-root-4OQ7MPGW.mjs} +6 -6
- package/dist/lib/node-esm/{react-root-KW3TGJGY.mjs.map → react-root-4OQ7MPGW.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-UUIUUD6P.mjs → react-surface-WXEXIDB7.mjs} +26 -15
- package/dist/lib/node-esm/react-surface-WXEXIDB7.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-WHJM7UZE.mjs → schema-defs-OYBCWKAS.mjs} +2 -2
- package/dist/lib/node-esm/schema-defs-OYBCWKAS.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs → settings-2RYFMMTP.mjs} +2 -2
- package/dist/lib/node-esm/{spaces-ready-HIUKNDZK.mjs → spaces-ready-JAP22P57.mjs} +14 -12
- package/dist/lib/node-esm/spaces-ready-JAP22P57.mjs.map +7 -0
- package/dist/lib/node-esm/{state-ZVEHQ4BJ.mjs → state-7VBVBGNS.mjs} +2 -2
- package/dist/lib/node-esm/state-7VBVBGNS.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +11 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1584 -3
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -3
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts +3 -2
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +1584 -4
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/RecordMain.d.ts +7 -0
- package/dist/types/src/components/RecordMain.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +1411 -2
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1417 -3
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1418 -4
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts +1 -1
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +8 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1216 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +25 -45
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +6 -4
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +52 -49
- package/src/SpacePlugin.ts +6 -24
- package/src/capabilities/app-graph-builder.ts +83 -32
- package/src/capabilities/capabilities.ts +3 -2
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +25 -13
- package/src/capabilities/react-root.tsx +2 -1
- package/src/capabilities/react-surface.tsx +27 -13
- package/src/capabilities/schema-defs.ts +3 -2
- package/src/capabilities/spaces-ready.ts +10 -7
- package/src/capabilities/state.ts +3 -2
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +6 -5
- package/src/components/CreateDialog/CreateObjectDialog.tsx +18 -8
- package/src/components/CreateDialog/CreateObjectPanel.tsx +18 -7
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +1 -1
- package/src/components/JoinDialog.tsx +1 -1
- package/src/components/MembersContainer.stories.tsx +33 -8
- package/src/components/MembersContainer.tsx +7 -8
- package/src/components/ObjectDetailsPanel.tsx +4 -2
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -1
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
- package/src/components/PopoverRenameObject.tsx +6 -12
- package/src/components/PopoverRenameSpace.tsx +1 -1
- package/src/components/RecordMain.tsx +43 -0
- package/src/components/SchemaContainer.tsx +2 -2
- package/src/components/SpacePluginSettings.tsx +6 -7
- package/src/components/SpacePresence.stories.tsx +7 -4
- package/src/components/SpacePresence.tsx +7 -7
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +8 -5
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +8 -8
- package/src/components/SyncStatus/SyncStatus.stories.tsx +5 -4
- package/src/components/SyncStatus/SyncStatus.tsx +3 -2
- package/src/components/ViewEditor.tsx +13 -18
- package/src/components/index.ts +1 -0
- package/src/events.ts +1 -1
- package/src/hooks/useActiveSpace.ts +2 -2
- package/src/hooks/useInputSurfaceLookup.tsx +1 -1
- package/src/translations.ts +8 -7
- package/src/types/types.ts +11 -7
- package/src/util.tsx +62 -13
- package/dist/lib/browser/ObjectDetailsPanel-YPTDQKMG.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-7CZZJS3S.mjs.map +0 -7
- package/dist/lib/browser/chunk-QACNNDOT.mjs.map +0 -7
- package/dist/lib/browser/chunk-SGTQ52SU.mjs.map +0 -7
- package/dist/lib/browser/chunk-V7MJSSBQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XUYKJUU7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-TIXVDYN7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TPNLWJJH.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-Z6FC4AHC.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-BNP4JTD7.mjs +0 -124
- package/dist/lib/browser/schema-tools-BNP4JTD7.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-TOPG6IV4.mjs.map +0 -7
- package/dist/lib/browser/state-QYZAB45H.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-QKZEDSZK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-KGIGWC72.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4AOMYKDE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6X5DLJM5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P442DOQ3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MHGHRGDT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UUIUUD6P.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-WHJM7UZE.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs +0 -126
- package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-HIUKNDZK.mjs.map +0 -7
- package/dist/types/src/capabilities/schema-tool.test.d.ts +0 -2
- package/dist/types/src/capabilities/schema-tool.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-tools.d.ts +0 -13
- package/dist/types/src/capabilities/schema-tools.d.ts.map +0 -1
- package/src/capabilities/schema-tool.test.ts +0 -44
- package/src/capabilities/schema-tools.ts +0 -125
- /package/dist/lib/browser/{app-graph-serializer-H6AW7KGS.mjs.map → app-graph-serializer-Q7QG4EKW.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-4IMP5RYT.mjs.map → settings-ZYH2JWNI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-serializer-2ICUGQQT.mjs.map → app-graph-serializer-6PGC5WR5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-SAOBPND3.mjs.map → settings-2RYFMMTP.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-space",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.e098934",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS ECHO Spaces",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
18
20
|
"types": "./dist/types/src/types/index.d.ts",
|
|
19
21
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
20
22
|
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
@@ -33,67 +35,68 @@
|
|
|
33
35
|
"src"
|
|
34
36
|
],
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@automerge/automerge": "3.
|
|
38
|
+
"@automerge/automerge": "3.1.1",
|
|
37
39
|
"@preact-signals/safe-react": "^0.9.0",
|
|
38
40
|
"@preact/signals-core": "^1.9.0",
|
|
39
|
-
"effect": "3.17.
|
|
41
|
+
"effect": "3.17.7",
|
|
40
42
|
"jszip": "^3.10.1",
|
|
41
43
|
"localforage": "^1.10.0",
|
|
42
44
|
"react-drag-drop-files": "^2.3.8",
|
|
43
45
|
"react-is": "~18.2.0",
|
|
44
46
|
"react-qr-rounded": "^1.0.0",
|
|
45
|
-
"@dxos/ai": "0.8.4-main.
|
|
46
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/client": "0.8.4-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/echo-
|
|
54
|
-
"@dxos/echo
|
|
55
|
-
"@dxos/effect": "0.8.4-main.
|
|
56
|
-
"@dxos/invariant": "0.8.4-main.
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/migrations": "0.8.4-main.
|
|
62
|
-
"@dxos/plugin-
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/plugin-
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-status-bar": "0.8.4-main.
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/react-
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
78
|
-
"@dxos/react-ui-tabs": "0.8.4-main.
|
|
79
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
47
|
+
"@dxos/ai": "0.8.4-main.e098934",
|
|
48
|
+
"@dxos/app-framework": "0.8.4-main.e098934",
|
|
49
|
+
"@dxos/async": "0.8.4-main.e098934",
|
|
50
|
+
"@dxos/blueprints": "0.8.4-main.e098934",
|
|
51
|
+
"@dxos/context": "0.8.4-main.e098934",
|
|
52
|
+
"@dxos/client": "0.8.4-main.e098934",
|
|
53
|
+
"@dxos/display-name": "0.8.4-main.e098934",
|
|
54
|
+
"@dxos/echo-schema": "0.8.4-main.e098934",
|
|
55
|
+
"@dxos/echo-signals": "0.8.4-main.e098934",
|
|
56
|
+
"@dxos/echo": "0.8.4-main.e098934",
|
|
57
|
+
"@dxos/effect": "0.8.4-main.e098934",
|
|
58
|
+
"@dxos/invariant": "0.8.4-main.e098934",
|
|
59
|
+
"@dxos/local-storage": "0.8.4-main.e098934",
|
|
60
|
+
"@dxos/log": "0.8.4-main.e098934",
|
|
61
|
+
"@dxos/keys": "0.8.4-main.e098934",
|
|
62
|
+
"@dxos/live-object": "0.8.4-main.e098934",
|
|
63
|
+
"@dxos/migrations": "0.8.4-main.e098934",
|
|
64
|
+
"@dxos/plugin-attention": "0.8.4-main.e098934",
|
|
65
|
+
"@dxos/plugin-deck": "0.8.4-main.e098934",
|
|
66
|
+
"@dxos/plugin-graph": "0.8.4-main.e098934",
|
|
67
|
+
"@dxos/plugin-observability": "0.8.4-main.e098934",
|
|
68
|
+
"@dxos/plugin-status-bar": "0.8.4-main.e098934",
|
|
69
|
+
"@dxos/protocols": "0.8.4-main.e098934",
|
|
70
|
+
"@dxos/plugin-client": "0.8.4-main.e098934",
|
|
71
|
+
"@dxos/react-client": "0.8.4-main.e098934",
|
|
72
|
+
"@dxos/react-ui-editor": "0.8.4-main.e098934",
|
|
73
|
+
"@dxos/react-ui-components": "0.8.4-main.e098934",
|
|
74
|
+
"@dxos/react-ui-attention": "0.8.4-main.e098934",
|
|
75
|
+
"@dxos/react-ui-form": "0.8.4-main.e098934",
|
|
76
|
+
"@dxos/react-ui-pickers": "0.8.4-main.e098934",
|
|
77
|
+
"@dxos/react-ui-searchlist": "0.8.4-main.e098934",
|
|
78
|
+
"@dxos/react-ui-list": "0.8.4-main.e098934",
|
|
79
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.e098934",
|
|
80
|
+
"@dxos/react-ui-tabs": "0.8.4-main.e098934",
|
|
81
|
+
"@dxos/react-ui-theme": "0.8.4-main.e098934",
|
|
82
|
+
"@dxos/shell": "0.8.4-main.e098934",
|
|
83
|
+
"@dxos/schema": "0.8.4-main.e098934",
|
|
84
|
+
"@dxos/util": "0.8.4-main.e098934",
|
|
85
|
+
"@dxos/react-ui-stack": "0.8.4-main.e098934"
|
|
83
86
|
},
|
|
84
87
|
"devDependencies": {
|
|
85
88
|
"@babel/core": "^7.18.13",
|
|
86
89
|
"@effect-rx/rx-react": "0.38.0",
|
|
87
|
-
"@effect/platform": "0.
|
|
90
|
+
"@effect/platform": "0.90.2",
|
|
88
91
|
"@types/react": "~18.2.0",
|
|
89
92
|
"@types/react-dom": "~18.2.0",
|
|
90
93
|
"react": "~18.2.0",
|
|
91
94
|
"react-dom": "~18.2.0",
|
|
92
|
-
"vite": "
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
95
|
+
"vite": "7.1.1",
|
|
96
|
+
"@dxos/random": "0.8.4-main.e098934",
|
|
97
|
+
"@dxos/react-ui": "0.8.4-main.e098934",
|
|
98
|
+
"@dxos/storybook-utils": "0.8.4-main.e098934",
|
|
99
|
+
"@dxos/react-ui-theme": "0.8.4-main.e098934"
|
|
97
100
|
},
|
|
98
101
|
"peerDependencies": {
|
|
99
102
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -101,8 +104,8 @@
|
|
|
101
104
|
"effect": "^3.13.3",
|
|
102
105
|
"react": "~18.2.0",
|
|
103
106
|
"react-dom": "~18.2.0",
|
|
104
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
105
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
107
|
+
"@dxos/react-ui": "0.8.4-main.e098934",
|
|
108
|
+
"@dxos/react-ui-theme": "0.8.4-main.e098934"
|
|
106
109
|
},
|
|
107
110
|
"publishConfig": {
|
|
108
111
|
"access": "public"
|
package/src/SpacePlugin.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import { Ref, Type } from '@dxos/echo';
|
|
18
18
|
import { AttentionEvents } from '@dxos/plugin-attention';
|
|
19
19
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
20
|
-
import {
|
|
20
|
+
import { DataType, createDefaultSchema, typenameFromQuery } from '@dxos/schema';
|
|
21
21
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
22
22
|
|
|
23
23
|
import {
|
|
@@ -28,16 +28,15 @@ import {
|
|
|
28
28
|
ReactRoot,
|
|
29
29
|
ReactSurface,
|
|
30
30
|
SchemaDefs,
|
|
31
|
-
SchemaTools,
|
|
32
31
|
SpaceCapabilities,
|
|
33
32
|
SpaceSettings,
|
|
34
|
-
SpacesReady,
|
|
35
33
|
SpaceState,
|
|
34
|
+
SpacesReady,
|
|
36
35
|
} from './capabilities';
|
|
37
36
|
import { SpaceEvents } from './events';
|
|
38
37
|
import { meta } from './meta';
|
|
39
38
|
import { translations } from './translations';
|
|
40
|
-
import { CollectionAction,
|
|
39
|
+
import { CollectionAction, SpaceAction, defineObjectForm } from './types';
|
|
41
40
|
|
|
42
41
|
export type SpacePluginOptions = {
|
|
43
42
|
/**
|
|
@@ -104,7 +103,7 @@ export const SpacePlugin = ({
|
|
|
104
103
|
metadata: {
|
|
105
104
|
label: (object: DataType.QueryCollection) => [
|
|
106
105
|
'typename label',
|
|
107
|
-
{ ns: object.query
|
|
106
|
+
{ ns: typenameFromQuery(object.query), count: 2, defaultValue: 'New smart collection' },
|
|
108
107
|
],
|
|
109
108
|
icon: 'ph--funnel-simple--regular',
|
|
110
109
|
},
|
|
@@ -133,12 +132,6 @@ export const SpacePlugin = ({
|
|
|
133
132
|
icon: 'ph--user--regular',
|
|
134
133
|
},
|
|
135
134
|
}),
|
|
136
|
-
contributes(Capabilities.Metadata, {
|
|
137
|
-
id: Type.getTypename(DataType.Project),
|
|
138
|
-
metadata: {
|
|
139
|
-
icon: 'ph--check-square-offset--regular',
|
|
140
|
-
},
|
|
141
|
-
}),
|
|
142
135
|
contributes(Capabilities.Metadata, {
|
|
143
136
|
id: Type.getTypename(DataType.Task),
|
|
144
137
|
metadata: {
|
|
@@ -162,7 +155,8 @@ export const SpacePlugin = ({
|
|
|
162
155
|
contributes(
|
|
163
156
|
SpaceCapabilities.ObjectForm,
|
|
164
157
|
defineObjectForm({
|
|
165
|
-
|
|
158
|
+
// TODO(wittjosiah): Remove cast.
|
|
159
|
+
objectSchema: DataType.QueryCollection as any,
|
|
166
160
|
formSchema: CollectionAction.QueryCollectionForm,
|
|
167
161
|
getIntent: (props) => createIntent(CollectionAction.CreateQueryCollection, props),
|
|
168
162
|
}),
|
|
@@ -196,8 +190,6 @@ export const SpacePlugin = ({
|
|
|
196
190
|
activate: () =>
|
|
197
191
|
contributes(ClientCapabilities.Schema, [
|
|
198
192
|
DataType.View,
|
|
199
|
-
ViewTypeV1,
|
|
200
|
-
ViewTypeV2,
|
|
201
193
|
DataType.Event,
|
|
202
194
|
DataType.Organization,
|
|
203
195
|
DataType.Person,
|
|
@@ -205,11 +197,6 @@ export const SpacePlugin = ({
|
|
|
205
197
|
DataType.Task,
|
|
206
198
|
]),
|
|
207
199
|
}),
|
|
208
|
-
defineModule({
|
|
209
|
-
id: `${meta.id}/module/migration`,
|
|
210
|
-
activatesOn: ClientEvents.SetupMigration,
|
|
211
|
-
activate: () => contributes(ClientCapabilities.Migration, [ViewTypeV1ToV2]),
|
|
212
|
-
}),
|
|
213
200
|
defineModule({
|
|
214
201
|
id: `${meta.id}/module/whitelist-schema`,
|
|
215
202
|
activatesOn: ClientEvents.SetupSchema,
|
|
@@ -268,10 +255,5 @@ export const SpacePlugin = ({
|
|
|
268
255
|
),
|
|
269
256
|
activate: SpacesReady,
|
|
270
257
|
}),
|
|
271
|
-
defineModule({
|
|
272
|
-
id: `${meta.id}/module/tools`,
|
|
273
|
-
activatesOn: Events.SetupArtifactDefinition,
|
|
274
|
-
activate: SchemaTools,
|
|
275
|
-
}),
|
|
276
258
|
]);
|
|
277
259
|
};
|
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import { Array, Option,
|
|
6
|
+
import { Array, Option, Schema, pipe } from 'effect';
|
|
7
7
|
|
|
8
|
-
import { Capabilities, contributes, createIntent
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
|
+
import { type QueryResult, type Space, SpaceState, getSpace, isSpace, parseId } from '@dxos/client/echo';
|
|
10
10
|
import { Filter, Obj, Query, Type } from '@dxos/echo';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
|
-
import {
|
|
14
|
-
import { createExtension, rxFromObservable,
|
|
15
|
-
import { DataType } from '@dxos/schema';
|
|
13
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
14
|
+
import { ROOT_ID, createExtension, rxFromObservable, rxFromSignal } from '@dxos/plugin-graph';
|
|
15
|
+
import { DataType, typenameFromQuery } from '@dxos/schema';
|
|
16
16
|
import { isNonNullable } from '@dxos/util';
|
|
17
17
|
|
|
18
|
-
import { SpaceCapabilities } from './capabilities';
|
|
19
18
|
import { getActiveSpace } from '../hooks';
|
|
20
19
|
import { SPACE_PLUGIN } from '../meta';
|
|
21
20
|
import { SPACE_TYPE, SpaceAction, type SpaceSettingsProps } from '../types';
|
|
22
21
|
import {
|
|
22
|
+
SHARED,
|
|
23
|
+
SPACES,
|
|
23
24
|
constructObjectActions,
|
|
24
25
|
constructSpaceActions,
|
|
25
26
|
constructSpaceNode,
|
|
@@ -27,10 +28,10 @@ import {
|
|
|
27
28
|
createStaticSchemaActions,
|
|
28
29
|
createStaticSchemaNode,
|
|
29
30
|
rxFromQuery,
|
|
30
|
-
SHARED,
|
|
31
|
-
SPACES,
|
|
32
31
|
} from '../util';
|
|
33
32
|
|
|
33
|
+
import { SpaceCapabilities } from './capabilities';
|
|
34
|
+
|
|
34
35
|
export default (context: PluginContext) => {
|
|
35
36
|
// TODO(wittjosiah): Make reactive.
|
|
36
37
|
const resolve = (typename: string) =>
|
|
@@ -439,9 +440,8 @@ export default (context: PluginContext) => {
|
|
|
439
440
|
),
|
|
440
441
|
Option.flatMap((collection) => {
|
|
441
442
|
const space = getSpace(collection);
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
: Option.none();
|
|
443
|
+
const typename = typenameFromQuery(collection.query);
|
|
444
|
+
return typename && space ? Option.some({ typename, space }) : Option.none();
|
|
445
445
|
}),
|
|
446
446
|
Option.map(({ typename, space }) => {
|
|
447
447
|
const state = context.getCapability(SpaceCapabilities.State);
|
|
@@ -458,21 +458,25 @@ export default (context: PluginContext) => {
|
|
|
458
458
|
),
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
|
-
return
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
461
|
+
return (
|
|
462
|
+
get(rxFromQuery(query))
|
|
463
|
+
// TODO(wittjosiah): This should be the default sort order.
|
|
464
|
+
.toSorted((a, b) => a.id.localeCompare(b.id))
|
|
465
|
+
.map((object) =>
|
|
466
|
+
get(
|
|
467
|
+
rxFromSignal(() =>
|
|
468
|
+
createObjectNode({
|
|
469
|
+
object,
|
|
470
|
+
space,
|
|
471
|
+
resolve,
|
|
472
|
+
droppable: false, // Cannot rearrange query collections.
|
|
473
|
+
navigable: state.navigableCollections,
|
|
474
|
+
}),
|
|
475
|
+
),
|
|
472
476
|
),
|
|
473
|
-
)
|
|
474
|
-
|
|
475
|
-
|
|
477
|
+
)
|
|
478
|
+
.filter(isNonNullable)
|
|
479
|
+
);
|
|
476
480
|
}),
|
|
477
481
|
Option.getOrElse(() => []),
|
|
478
482
|
),
|
|
@@ -490,7 +494,7 @@ export default (context: PluginContext) => {
|
|
|
490
494
|
get(node),
|
|
491
495
|
Option.flatMap((node) =>
|
|
492
496
|
Obj.instanceOf(DataType.QueryCollection, node.data) &&
|
|
493
|
-
node.data.query
|
|
497
|
+
typenameFromQuery(node.data.query) === DataType.StoredSchema.typename
|
|
494
498
|
? Option.some(node.data)
|
|
495
499
|
: Option.none(),
|
|
496
500
|
),
|
|
@@ -534,13 +538,23 @@ export default (context: PluginContext) => {
|
|
|
534
538
|
const filteredViews = get(
|
|
535
539
|
rxFromSignal(() =>
|
|
536
540
|
// TODO(wittjosiah): Remove cast.
|
|
537
|
-
views.filter((view) => view.query
|
|
541
|
+
views.filter((view) => typenameFromQuery(view.query) === Type.getTypename(schema as Type.Obj.Any)),
|
|
538
542
|
),
|
|
539
543
|
);
|
|
540
544
|
const deletable = filteredViews.length === 0;
|
|
541
545
|
|
|
546
|
+
const [dispatcher] = get(context.capabilities(Capabilities.IntentDispatcher));
|
|
547
|
+
if (!dispatcher) {
|
|
548
|
+
return [];
|
|
549
|
+
}
|
|
550
|
+
|
|
542
551
|
// TODO(wittjosiah): Remove cast.
|
|
543
|
-
return createStaticSchemaActions({
|
|
552
|
+
return createStaticSchemaActions({
|
|
553
|
+
schema: schema as Type.Obj.Any,
|
|
554
|
+
space,
|
|
555
|
+
dispatch: dispatcher.dispatchPromise,
|
|
556
|
+
deletable,
|
|
557
|
+
});
|
|
544
558
|
}),
|
|
545
559
|
Option.getOrElse(() => []),
|
|
546
560
|
),
|
|
@@ -571,7 +585,7 @@ export default (context: PluginContext) => {
|
|
|
571
585
|
// TODO(wittjosiah): Remove cast.
|
|
572
586
|
const typename = Schema.isSchema(schema) ? Type.getTypename(schema as Type.Obj.Any) : schema.typename;
|
|
573
587
|
return get(rxFromQuery(query))
|
|
574
|
-
.filter((view) => view.query
|
|
588
|
+
.filter((view) => typenameFromQuery(view.query) === typename)
|
|
575
589
|
.map((view) =>
|
|
576
590
|
get(
|
|
577
591
|
rxFromSignal(() =>
|
|
@@ -592,6 +606,37 @@ export default (context: PluginContext) => {
|
|
|
592
606
|
},
|
|
593
607
|
}),
|
|
594
608
|
|
|
609
|
+
// Create record nodes.
|
|
610
|
+
createExtension({
|
|
611
|
+
id: `${SPACE_PLUGIN}/records`,
|
|
612
|
+
resolver: (id) => {
|
|
613
|
+
let query: QueryResult<Type.Expando> | undefined;
|
|
614
|
+
return Rx.make((get) => {
|
|
615
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
616
|
+
const { spaceId, objectId } = parseId(id);
|
|
617
|
+
if (!spaceId || !objectId) {
|
|
618
|
+
return null;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const space = client.spaces.get(spaceId);
|
|
622
|
+
if (!space) {
|
|
623
|
+
return null;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (!query) {
|
|
627
|
+
query = space.db.query(Filter.ids(objectId));
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const object = get(rxFromQuery(query)).at(0);
|
|
631
|
+
if (!object) {
|
|
632
|
+
return null;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return createObjectNode({ object, space, resolve, disposition: 'hidden' });
|
|
636
|
+
});
|
|
637
|
+
},
|
|
638
|
+
}),
|
|
639
|
+
|
|
595
640
|
// Create collection actions and action groups.
|
|
596
641
|
createExtension({
|
|
597
642
|
id: `${SPACE_PLUGIN}/object-actions`,
|
|
@@ -611,11 +656,17 @@ export default (context: PluginContext) => {
|
|
|
611
656
|
query = space.db.query(Filter.type(DataType.View));
|
|
612
657
|
}
|
|
613
658
|
|
|
614
|
-
let deletable =
|
|
659
|
+
let deletable =
|
|
660
|
+
!isSchema &&
|
|
661
|
+
// Don't allow the Records smart collection to be deleted.
|
|
662
|
+
!(
|
|
663
|
+
Obj.instanceOf(DataType.QueryCollection, object) &&
|
|
664
|
+
typenameFromQuery(object.query) === DataType.StoredSchema.typename
|
|
665
|
+
);
|
|
615
666
|
if (isSchema && query) {
|
|
616
667
|
const views = get(rxFromQuery(query));
|
|
617
668
|
const filteredViews = get(
|
|
618
|
-
rxFromSignal(() => views.filter((view) => view.query
|
|
669
|
+
rxFromSignal(() => views.filter((view) => typenameFromQuery(view.query) === object.typename)),
|
|
619
670
|
);
|
|
620
671
|
deletable = filteredViews.length === 0;
|
|
621
672
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Schema } from 'effect';
|
|
6
6
|
|
|
7
|
-
import { type AnyIntentChain,
|
|
7
|
+
import { type AnyIntentChain, type Label, defineCapability } from '@dxos/app-framework';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { type DataType } from '@dxos/schema';
|
|
10
|
-
import { type
|
|
10
|
+
import { type DeepReadonly, type Position } from '@dxos/util';
|
|
11
11
|
|
|
12
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
13
|
import { type ObjectForm, type PluginState } from '../types';
|
|
@@ -25,5 +25,6 @@ export namespace SpaceCapabilities {
|
|
|
25
25
|
export type OnSchemaAdded = (params: { space: Space; schema: Schema.Schema.AnyNoContext }) => AnyIntentChain;
|
|
26
26
|
export const OnSchemaAdded = defineCapability<OnSchemaAdded>(`${SPACE_PLUGIN}/capability/on-schema-added`);
|
|
27
27
|
|
|
28
|
+
// TODO(burdon): Should this be view? Forms are UI concepts? (associated with a View/schema).
|
|
28
29
|
export const ObjectForm = defineCapability<ObjectForm<any>>(`${SPACE_PLUGIN}/capability/object-form`);
|
|
29
30
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { Obj, Ref } from '@dxos/echo';
|
|
7
7
|
import { Migrations } from '@dxos/migrations';
|
|
8
8
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
@@ -11,7 +11,6 @@ export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
|
11
11
|
export const ReactRoot = lazy(() => import('./react-root'));
|
|
12
12
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
13
13
|
export const SchemaDefs = lazy(() => import('./schema-defs'));
|
|
14
|
-
export const SchemaTools = lazy(() => import('./schema-tools'));
|
|
15
14
|
export const SpaceSettings = lazy(() => import('./settings'));
|
|
16
15
|
export const SpaceState = lazy(() => import('./state'));
|
|
17
16
|
export const SpacesReady = lazy(() => import('./spaces-ready'));
|
|
@@ -12,31 +12,32 @@ import {
|
|
|
12
12
|
createIntent,
|
|
13
13
|
createResolver,
|
|
14
14
|
} from '@dxos/app-framework';
|
|
15
|
-
import { Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
15
|
+
import { Filter, Obj, Query, Ref, Relation, Type } from '@dxos/echo';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
17
|
import { Migrations } from '@dxos/migrations';
|
|
18
18
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
19
19
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
20
20
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
21
|
-
import {
|
|
21
|
+
import { SpaceState, fullyQualifiedId, getSpace, isSpace } from '@dxos/react-client/echo';
|
|
22
22
|
import { Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
23
23
|
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
|
|
24
|
-
import { DataType, ProjectionModel } from '@dxos/schema';
|
|
24
|
+
import { DataType, ProjectionModel, typenameFromQuery } from '@dxos/schema';
|
|
25
25
|
|
|
26
|
-
import { SpaceCapabilities } from './capabilities';
|
|
27
26
|
import {
|
|
28
27
|
CREATE_OBJECT_DIALOG,
|
|
29
28
|
CREATE_SPACE_DIALOG,
|
|
29
|
+
type CreateObjectDialogProps,
|
|
30
30
|
JOIN_DIALOG,
|
|
31
|
+
type JoinDialogProps,
|
|
31
32
|
POPOVER_RENAME_OBJECT,
|
|
32
33
|
POPOVER_RENAME_SPACE,
|
|
33
|
-
type CreateObjectDialogProps,
|
|
34
|
-
type JoinDialogProps,
|
|
35
34
|
} from '../components';
|
|
36
35
|
import { SpaceEvents } from '../events';
|
|
37
36
|
import { SPACE_PLUGIN } from '../meta';
|
|
38
37
|
import { CollectionAction, SpaceAction } from '../types';
|
|
39
|
-
import {
|
|
38
|
+
import { COMPOSER_SPACE_LOCK, cloneObject, getNestedObjects } from '../util';
|
|
39
|
+
|
|
40
|
+
import { SpaceCapabilities } from './capabilities';
|
|
40
41
|
|
|
41
42
|
// TODO(wittjosiah): Remove.
|
|
42
43
|
const SPACE_MAX_OBJECTS = 500;
|
|
@@ -87,7 +88,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
87
88
|
|
|
88
89
|
// Create records smart collection.
|
|
89
90
|
const records = Obj.make(DataType.QueryCollection, {
|
|
90
|
-
query:
|
|
91
|
+
query: Query.select(Filter.typename(DataType.StoredSchema.typename)).ast,
|
|
91
92
|
});
|
|
92
93
|
collection.objects.push(Ref.make(records));
|
|
93
94
|
|
|
@@ -360,11 +361,17 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
360
361
|
}),
|
|
361
362
|
createResolver({
|
|
362
363
|
intent: SpaceAction.AddSchema,
|
|
363
|
-
resolve: async ({ space, name, schema: schemaInput }) => {
|
|
364
|
+
resolve: async ({ space, name, typename, version, schema: schemaInput }) => {
|
|
364
365
|
const [schema] = await space.db.schemaRegistry.register([schemaInput]);
|
|
365
366
|
if (name) {
|
|
366
367
|
schema.storedSchema.name = name;
|
|
367
368
|
}
|
|
369
|
+
if (typename) {
|
|
370
|
+
schema.storedSchema.typename = typename;
|
|
371
|
+
}
|
|
372
|
+
if (version) {
|
|
373
|
+
schema.storedSchema.version = version;
|
|
374
|
+
}
|
|
368
375
|
|
|
369
376
|
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
370
377
|
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
@@ -399,8 +406,9 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
399
406
|
resolve: async ({ view, fieldId, deletionData }, undo) => {
|
|
400
407
|
const space = getSpace(view);
|
|
401
408
|
invariant(space);
|
|
402
|
-
|
|
403
|
-
|
|
409
|
+
const typename = typenameFromQuery(view.query);
|
|
410
|
+
invariant(typename);
|
|
411
|
+
const schema = await space.db.schemaRegistry.query({ typename }).firstOrUndefined();
|
|
404
412
|
invariant(schema);
|
|
405
413
|
const projection = new ProjectionModel(schema.jsonSchema, view.projection);
|
|
406
414
|
if (!undo) {
|
|
@@ -419,7 +427,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
419
427
|
}),
|
|
420
428
|
createResolver({
|
|
421
429
|
intent: SpaceAction.OpenCreateObject,
|
|
422
|
-
resolve: ({ target, typename, navigable = true, onCreateObject }) => {
|
|
430
|
+
resolve: ({ target, views, typename, initialFormValues, navigable = true, onCreateObject }) => {
|
|
423
431
|
const state = context.getCapability(SpaceCapabilities.State);
|
|
424
432
|
|
|
425
433
|
return {
|
|
@@ -431,7 +439,9 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
431
439
|
blockAlign: 'start',
|
|
432
440
|
props: {
|
|
433
441
|
target,
|
|
442
|
+
views,
|
|
434
443
|
typename,
|
|
444
|
+
initialFormValues,
|
|
435
445
|
onCreateObject,
|
|
436
446
|
shouldNavigate: navigable
|
|
437
447
|
? (object: Obj.Any) => {
|
|
@@ -687,7 +697,9 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
687
697
|
createResolver({
|
|
688
698
|
intent: CollectionAction.CreateQueryCollection,
|
|
689
699
|
resolve: async ({ name, typename }) => ({
|
|
690
|
-
data: {
|
|
700
|
+
data: {
|
|
701
|
+
object: Obj.make(DataType.QueryCollection, { name, query: Query.select(Filter.typename(typename)).ast }),
|
|
702
|
+
},
|
|
691
703
|
}),
|
|
692
704
|
}),
|
|
693
705
|
]);
|
|
@@ -6,10 +6,11 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { SpaceCapabilities } from './capabilities';
|
|
10
9
|
import { AwaitingObject } from '../components';
|
|
11
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
11
|
|
|
12
|
+
import { SpaceCapabilities } from './capabilities';
|
|
13
|
+
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactRoot, {
|
|
15
16
|
id: SPACE_PLUGIN,
|