@dxos/plugin-space 0.8.4-main.c1de068 → 0.8.4-main.c4373fc
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/{CollectionMain-D2B75XBS.mjs → CollectionMain-AX7KKXWP.mjs} +4 -4
- package/dist/lib/browser/CollectionMain-AX7KKXWP.mjs.map +7 -0
- package/dist/lib/browser/{ObjectDetailsPanel-YPTDQKMG.mjs → ObjectDetailsPanel-SJ4XUXXX.mjs} +11 -9
- package/dist/lib/browser/ObjectDetailsPanel-SJ4XUXXX.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-FHPCS6GM.mjs +68 -0
- package/dist/lib/browser/RecordMain-FHPCS6GM.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-7CZZJS3S.mjs → app-graph-builder-Y2LBZX2G.mjs} +102 -61
- package/dist/lib/browser/app-graph-builder-Y2LBZX2G.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-H6AW7KGS.mjs → app-graph-serializer-425OVRTW.mjs} +14 -14
- package/dist/lib/browser/app-graph-serializer-425OVRTW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-V7MJSSBQ.mjs → chunk-6KVKMOGQ.mjs} +148 -157
- package/dist/lib/browser/chunk-6KVKMOGQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VLBRSGJ2.mjs → chunk-CVZAZRW4.mjs} +4 -4
- package/dist/lib/browser/chunk-CVZAZRW4.mjs.map +7 -0
- package/dist/lib/browser/chunk-EIXZABXD.mjs +19 -0
- package/dist/lib/browser/chunk-EIXZABXD.mjs.map +7 -0
- package/dist/lib/browser/chunk-IRKDREHY.mjs +11 -0
- package/dist/lib/browser/chunk-IRKDREHY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SGTQ52SU.mjs → chunk-OYHC63NL.mjs} +16 -10
- package/dist/lib/browser/chunk-OYHC63NL.mjs.map +7 -0
- package/dist/lib/browser/chunk-PUF3B7XO.mjs +20 -0
- package/dist/lib/browser/chunk-PUF3B7XO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XUYKJUU7.mjs → chunk-X6COEDOD.mjs} +99 -44
- package/dist/lib/browser/chunk-X6COEDOD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QACNNDOT.mjs → chunk-YZJWWMNB.mjs} +11 -10
- package/dist/lib/browser/chunk-YZJWWMNB.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs → identity-created-PW2BA46S.mjs} +4 -4
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs.map → identity-created-PW2BA46S.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +20 -40
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-TIXVDYN7.mjs → intent-resolver-2TBYHOBA.mjs} +47 -42
- package/dist/lib/browser/intent-resolver-2TBYHOBA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-N2J7TDRX.mjs → react-root-KMJXJ5VX.mjs} +11 -11
- package/dist/lib/browser/react-root-KMJXJ5VX.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-TPNLWJJH.mjs → react-surface-YAJUAMER.mjs} +53 -42
- package/dist/lib/browser/react-surface-YAJUAMER.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-Z6FC4AHC.mjs → schema-defs-2OCPV7JF.mjs} +5 -5
- package/dist/lib/browser/schema-defs-2OCPV7JF.mjs.map +7 -0
- package/dist/lib/browser/{settings-4IMP5RYT.mjs → settings-UYYJ225A.mjs} +5 -5
- package/dist/lib/browser/{settings-4IMP5RYT.mjs.map → settings-UYYJ225A.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-TOPG6IV4.mjs → spaces-ready-YNZPWXA3.mjs} +18 -16
- package/dist/lib/browser/spaces-ready-YNZPWXA3.mjs.map +7 -0
- package/dist/lib/browser/{state-QYZAB45H.mjs → state-BPU73TYO.mjs} +7 -7
- package/dist/lib/browser/state-BPU73TYO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{CollectionMain-ZJIFCWKZ.mjs → CollectionMain-EU57SRYK.mjs} +4 -4
- package/dist/lib/node-esm/CollectionMain-EU57SRYK.mjs.map +7 -0
- package/dist/lib/node-esm/{ObjectDetailsPanel-QKZEDSZK.mjs → ObjectDetailsPanel-P7D727OV.mjs} +11 -9
- package/dist/lib/node-esm/ObjectDetailsPanel-P7D727OV.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-V73AEB6N.mjs +70 -0
- package/dist/lib/node-esm/RecordMain-V73AEB6N.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-KGIGWC72.mjs → app-graph-builder-DMNLDT7E.mjs} +102 -61
- package/dist/lib/node-esm/app-graph-builder-DMNLDT7E.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-2ICUGQQT.mjs → app-graph-serializer-ZEDSY77N.mjs} +14 -14
- package/dist/lib/node-esm/app-graph-serializer-ZEDSY77N.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-36TAYXV7.mjs +21 -0
- package/dist/lib/node-esm/chunk-36TAYXV7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-P442DOQ3.mjs → chunk-7UIEPBQJ.mjs} +11 -10
- package/dist/lib/node-esm/chunk-7UIEPBQJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JH6F4C3I.mjs → chunk-ADEZJQE3.mjs} +16 -10
- package/dist/lib/node-esm/chunk-ADEZJQE3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs → chunk-FLRC6XWU.mjs} +4 -4
- package/dist/lib/node-esm/chunk-FLRC6XWU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6X5DLJM5.mjs → chunk-L26ZIGHA.mjs} +148 -157
- package/dist/lib/node-esm/chunk-L26ZIGHA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HWNG4MEU.mjs → chunk-MWNATOXL.mjs} +2 -4
- package/dist/lib/node-esm/chunk-MWNATOXL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SVFKU7EW.mjs +20 -0
- package/dist/lib/node-esm/chunk-SVFKU7EW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4AOMYKDE.mjs → chunk-ZFCCFELA.mjs} +99 -44
- package/dist/lib/node-esm/chunk-ZFCCFELA.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs → identity-created-MWTLGQRU.mjs} +4 -4
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs.map → identity-created-MWTLGQRU.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +20 -40
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MHGHRGDT.mjs → intent-resolver-YOG27WOG.mjs} +47 -42
- package/dist/lib/node-esm/intent-resolver-YOG27WOG.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-KW3TGJGY.mjs → react-root-27QMJZD2.mjs} +11 -11
- package/dist/lib/node-esm/react-root-27QMJZD2.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-UUIUUD6P.mjs → react-surface-RC73GAN5.mjs} +53 -42
- package/dist/lib/node-esm/react-surface-RC73GAN5.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-WHJM7UZE.mjs → schema-defs-X2Z7F2EV.mjs} +5 -5
- package/dist/lib/node-esm/schema-defs-X2Z7F2EV.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs → settings-Q736OQRP.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs.map → settings-Q736OQRP.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-HIUKNDZK.mjs → spaces-ready-XZQD7Q65.mjs} +18 -16
- package/dist/lib/node-esm/spaces-ready-XZQD7Q65.mjs.map +7 -0
- package/dist/lib/node-esm/{state-ZVEHQ4BJ.mjs → state-BY75TM32.mjs} +7 -7
- package/dist/lib/node-esm/state-BY75TM32.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/SpacePlugin.d.ts +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 +4 -4
- 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 +3 -3
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1584 -4
- 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/CreateDialog/CreateSpaceDialog.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts +1 -1
- package/dist/types/src/components/JoinDialog.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 -5
- 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/ForeignKeys.d.ts +1 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.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 +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +1 -1
- package/dist/types/src/components/PopoverRenameSpace.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 +1412 -4
- 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 -4
- 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 -5
- 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/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +1 -1
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.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 +76 -96
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +10 -7
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +60 -58
- package/src/SpacePlugin.ts +204 -219
- package/src/capabilities/app-graph-builder.ts +127 -69
- package/src/capabilities/app-graph-serializer.ts +7 -7
- package/src/capabilities/capabilities.ts +12 -11
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +37 -25
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +52 -38
- package/src/capabilities/schema-defs.ts +3 -2
- package/src/capabilities/spaces-ready.ts +11 -8
- package/src/capabilities/state.ts +5 -4
- package/src/components/AwaitingObject.tsx +3 -3
- package/src/components/CollectionMain.tsx +2 -2
- package/src/components/CollectionSection.tsx +2 -2
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +11 -10
- package/src/components/CreateDialog/CreateObjectDialog.tsx +24 -13
- package/src/components/CreateDialog/CreateObjectPanel.tsx +22 -11
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +6 -5
- package/src/components/JoinDialog.tsx +7 -7
- package/src/components/MembersContainer.stories.tsx +36 -10
- package/src/components/MembersContainer.tsx +13 -14
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/ObjectDetailsPanel.tsx +7 -5
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +4 -3
- package/src/components/ObjectSettings/ForeignKeys.tsx +3 -3
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
- package/src/components/PersistenceStatus.tsx +2 -2
- package/src/components/PopoverRenameObject.tsx +9 -15
- package/src/components/PopoverRenameSpace.tsx +4 -4
- package/src/components/RecordMain.tsx +43 -0
- package/src/components/SchemaContainer.tsx +5 -5
- package/src/components/SpacePluginSettings.tsx +8 -9
- package/src/components/SpacePresence.stories.tsx +23 -22
- package/src/components/SpacePresence.tsx +10 -10
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +17 -9
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +19 -18
- package/src/components/SyncStatus/InlineSyncStatus.tsx +3 -3
- package/src/components/SyncStatus/SyncStatus.stories.tsx +6 -7
- package/src/components/SyncStatus/SyncStatus.tsx +4 -3
- package/src/components/ViewEditor.tsx +13 -18
- package/src/components/index.ts +1 -0
- package/src/events.ts +7 -7
- package/src/hooks/useActiveSpace.ts +2 -2
- package/src/hooks/useInputSurfaceLookup.tsx +2 -2
- package/src/hooks/usePath.ts +1 -1
- package/src/meta.ts +1 -3
- package/src/translations.ts +9 -8
- package/src/types/types.ts +17 -13
- package/src/util.tsx +97 -40
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +0 -7
- 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/app-graph-serializer-H6AW7KGS.mjs.map +0 -7
- package/dist/lib/browser/chunk-CEFHNVU7.mjs +0 -20
- package/dist/lib/browser/chunk-CEFHNVU7.mjs.map +0 -7
- package/dist/lib/browser/chunk-FBCGT5YY.mjs +0 -13
- package/dist/lib/browser/chunk-FBCGT5YY.mjs.map +0 -7
- package/dist/lib/browser/chunk-JS3MMC42.mjs +0 -19
- package/dist/lib/browser/chunk-JS3MMC42.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-VLBRSGJ2.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-root-N2J7TDRX.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/CollectionMain-ZJIFCWKZ.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/app-graph-serializer-2ICUGQQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4AOMYKDE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5HHYE264.mjs +0 -20
- package/dist/lib/node-esm/chunk-5HHYE264.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5T3ZH23B.mjs +0 -21
- package/dist/lib/node-esm/chunk-5T3ZH23B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6X5DLJM5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JH6F4C3I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P442DOQ3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SSLBYZEY.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MHGHRGDT.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-KW3TGJGY.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/lib/node-esm/state-ZVEHQ4BJ.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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
Capabilities,
|
|
@@ -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, getTypenameFromQuery } 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
|
-
import {
|
|
36
|
+
import { meta } 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,15 +88,15 @@ 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
|
|
|
94
95
|
// Allow other plugins to add default content.
|
|
95
96
|
await context.activatePromise(SpaceEvents.SpaceCreated);
|
|
96
|
-
const
|
|
97
|
-
const spaceCreatedIntents =
|
|
98
|
-
|
|
97
|
+
const onCreateSpaceCallbacks = context.getCapabilities(SpaceCapabilities.onCreateSpace);
|
|
98
|
+
const spaceCreatedIntents = onCreateSpaceCallbacks.map((onCreateSpace) =>
|
|
99
|
+
onCreateSpace({ space, rootCollection: collection }),
|
|
99
100
|
);
|
|
100
101
|
|
|
101
102
|
return {
|
|
@@ -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,15 +406,16 @@ 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 = getTypenameFromQuery(view.query.ast);
|
|
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) {
|
|
407
415
|
const { deleted, index } = projection.deleteFieldProjection(fieldId);
|
|
408
416
|
return {
|
|
409
417
|
undoable: {
|
|
410
|
-
message: ['field deleted label', { ns:
|
|
418
|
+
message: ['field deleted label', { ns: meta.id }],
|
|
411
419
|
data: { deletionData: { ...deleted, index } },
|
|
412
420
|
},
|
|
413
421
|
};
|
|
@@ -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) => {
|
|
@@ -460,13 +470,13 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
460
470
|
createIntent(LayoutAction.AddToast, {
|
|
461
471
|
part: 'toast',
|
|
462
472
|
subject: {
|
|
463
|
-
id: `${
|
|
464
|
-
title: ['space limit label', { ns:
|
|
465
|
-
description: ['space limit description', { ns:
|
|
473
|
+
id: `${meta.id}/space-limit`,
|
|
474
|
+
title: ['space limit label', { ns: meta.id }],
|
|
475
|
+
description: ['space limit description', { ns: meta.id }],
|
|
466
476
|
duration: 5_000,
|
|
467
477
|
icon: 'ph--warning--regular',
|
|
468
|
-
actionLabel: ['remove deleted objects label', { ns:
|
|
469
|
-
actionAlt: ['remove deleted objects alt', { ns:
|
|
478
|
+
actionLabel: ['remove deleted objects label', { ns: meta.id }],
|
|
479
|
+
actionAlt: ['remove deleted objects alt', { ns: meta.id }],
|
|
470
480
|
closeLabel: ['close label', { ns: 'os' }],
|
|
471
481
|
onAction: () => space.db.coreDatabase.unlinkDeletedObjects(),
|
|
472
482
|
},
|
|
@@ -595,7 +605,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
595
605
|
return {
|
|
596
606
|
undoable: {
|
|
597
607
|
// TODO(ZaymonFC): Pluralize if more than one object.
|
|
598
|
-
message: [undoMessageKey, { ns:
|
|
608
|
+
message: [undoMessageKey, { ns: meta.id }],
|
|
599
609
|
data: { deletionData },
|
|
600
610
|
},
|
|
601
611
|
intents:
|
|
@@ -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,13 +6,14 @@ 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
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
|
+
|
|
12
|
+
import { SpaceCapabilities } from './capabilities';
|
|
12
13
|
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactRoot, {
|
|
15
|
-
id:
|
|
16
|
+
id: meta.id,
|
|
16
17
|
root: () => {
|
|
17
18
|
const state = useCapability(SpaceCapabilities.State);
|
|
18
19
|
return state.awaiting ? <AwaitingObject id={state.awaiting} /> : null;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import type * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
+
Surface,
|
|
10
11
|
contributes,
|
|
11
12
|
createSurface,
|
|
12
|
-
Surface,
|
|
13
13
|
useCapabilities,
|
|
14
14
|
useCapability,
|
|
15
15
|
useLayout,
|
|
@@ -20,14 +20,14 @@ import { SettingsStore } from '@dxos/local-storage';
|
|
|
20
20
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
21
|
import { useClient } from '@dxos/react-client';
|
|
22
22
|
import {
|
|
23
|
+
type Space,
|
|
24
|
+
SpaceState,
|
|
23
25
|
fullyQualifiedId,
|
|
24
26
|
getSpace,
|
|
25
27
|
isLiveObject,
|
|
26
28
|
isSpace,
|
|
27
29
|
parseId,
|
|
28
|
-
SpaceState,
|
|
29
30
|
useSpace,
|
|
30
|
-
type Space,
|
|
31
31
|
} from '@dxos/react-client/echo';
|
|
32
32
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
33
33
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
@@ -35,13 +35,13 @@ import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
|
35
35
|
import { DataType, type TypenameAnnotation, TypenameAnnotationId } from '@dxos/schema';
|
|
36
36
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
37
37
|
|
|
38
|
-
import { SpaceCapabilities } from './capabilities';
|
|
39
38
|
import {
|
|
40
|
-
CollectionMain,
|
|
41
|
-
CollectionSection,
|
|
42
39
|
CREATE_OBJECT_DIALOG,
|
|
43
40
|
CREATE_SPACE_DIALOG,
|
|
41
|
+
CollectionMain,
|
|
42
|
+
CollectionSection,
|
|
44
43
|
CreateObjectDialog,
|
|
44
|
+
type CreateObjectDialogProps,
|
|
45
45
|
CreateSpaceDialog,
|
|
46
46
|
InlineSyncStatus,
|
|
47
47
|
JOIN_DIALOG,
|
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
POPOVER_RENAME_SPACE,
|
|
55
55
|
PopoverRenameObject,
|
|
56
56
|
PopoverRenameSpace,
|
|
57
|
+
RecordMain,
|
|
57
58
|
SchemaContainer,
|
|
58
59
|
SmallPresenceLive,
|
|
59
60
|
SpacePluginSettings,
|
|
@@ -61,21 +62,22 @@ import {
|
|
|
61
62
|
SpaceSettingsContainer,
|
|
62
63
|
SyncStatus,
|
|
63
64
|
ViewEditor,
|
|
64
|
-
type CreateObjectDialogProps,
|
|
65
65
|
} from '../components';
|
|
66
|
-
import {
|
|
66
|
+
import { meta } from '../meta';
|
|
67
67
|
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
68
68
|
|
|
69
|
+
import { SpaceCapabilities } from './capabilities';
|
|
70
|
+
|
|
69
71
|
type ReactSurfaceOptions = {
|
|
70
72
|
createInvitationUrl: (invitationCode: string) => string;
|
|
71
73
|
};
|
|
72
74
|
|
|
73
|
-
const OMIT = [DataType.Collection.typename, DataType.QueryCollection
|
|
75
|
+
const OMIT = [DataType.Collection.typename, Type.getTypename(DataType.QueryCollection)];
|
|
74
76
|
|
|
75
77
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
76
78
|
contributes(Capabilities.ReactSurface, [
|
|
77
79
|
createSurface({
|
|
78
|
-
id: `${
|
|
80
|
+
id: `${meta.id}/article`,
|
|
79
81
|
role: 'article',
|
|
80
82
|
filter: (data): data is { subject: Space } =>
|
|
81
83
|
// TODO(wittjosiah): Need to avoid shotgun parsing space state everywhere.
|
|
@@ -92,29 +94,36 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
92
94
|
),
|
|
93
95
|
}),
|
|
94
96
|
createSurface({
|
|
95
|
-
id: `${
|
|
97
|
+
id: `${meta.id}/record-article`,
|
|
98
|
+
role: 'article',
|
|
99
|
+
position: 'fallback',
|
|
100
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
101
|
+
component: ({ data }) => <RecordMain record={data.subject} />,
|
|
102
|
+
}),
|
|
103
|
+
createSurface({
|
|
104
|
+
id: `${meta.id}/collection-fallback`,
|
|
96
105
|
role: 'article',
|
|
97
106
|
position: 'fallback',
|
|
98
107
|
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
99
108
|
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
100
109
|
}),
|
|
101
110
|
createSurface({
|
|
102
|
-
id: `${
|
|
111
|
+
id: `${meta.id}/plugin-settings`,
|
|
103
112
|
role: 'article',
|
|
104
113
|
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
105
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
114
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
106
115
|
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
107
116
|
}),
|
|
108
117
|
createSurface({
|
|
109
|
-
id: `${
|
|
118
|
+
id: `${meta.id}/companion/object-settings`,
|
|
110
119
|
role: 'article',
|
|
111
120
|
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
112
121
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
113
122
|
}),
|
|
114
123
|
createSurface({
|
|
115
|
-
id: `${
|
|
124
|
+
id: `${meta.id}/space-settings-properties`,
|
|
116
125
|
role: 'article',
|
|
117
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
126
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/properties`,
|
|
118
127
|
component: () => {
|
|
119
128
|
const layout = useLayout();
|
|
120
129
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -127,10 +136,10 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
127
136
|
},
|
|
128
137
|
}),
|
|
129
138
|
createSurface({
|
|
130
|
-
id: `${
|
|
139
|
+
id: `${meta.id}/space-settings-members`,
|
|
131
140
|
role: 'article',
|
|
132
141
|
position: 'hoist',
|
|
133
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
142
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/members`,
|
|
134
143
|
component: () => {
|
|
135
144
|
const layout = useLayout();
|
|
136
145
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -143,9 +152,9 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
143
152
|
},
|
|
144
153
|
}),
|
|
145
154
|
createSurface({
|
|
146
|
-
id: `${
|
|
155
|
+
id: `${meta.id}/space-settings-schema`,
|
|
147
156
|
role: 'article',
|
|
148
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
157
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/schema`,
|
|
149
158
|
component: () => {
|
|
150
159
|
const layout = useLayout();
|
|
151
160
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -158,7 +167,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
158
167
|
},
|
|
159
168
|
}),
|
|
160
169
|
createSurface({
|
|
161
|
-
id: `${
|
|
170
|
+
id: `${meta.id}/selected-objects`,
|
|
162
171
|
role: 'article',
|
|
163
172
|
filter: (data): data is { companionTo: DataType.View; subject: 'selected-objects' } =>
|
|
164
173
|
Obj.instanceOf(DataType.View, data.companionTo) && data.subject === 'selected-objects',
|
|
@@ -189,45 +198,45 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
189
198
|
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
190
199
|
}),
|
|
191
200
|
createSurface({
|
|
192
|
-
id: `${
|
|
201
|
+
id: `${meta.id}/create-initial-space-form-[hue]`,
|
|
193
202
|
role: 'form-input',
|
|
194
203
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
195
204
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
196
205
|
return !!annotation;
|
|
197
206
|
},
|
|
198
207
|
component: ({ data: _, ...inputProps }) => {
|
|
199
|
-
const { label,
|
|
208
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
200
209
|
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
201
210
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
202
211
|
return (
|
|
203
212
|
<Input.Root>
|
|
204
213
|
<Input.Label>{label}</Input.Label>
|
|
205
|
-
<HuePicker disabled={
|
|
214
|
+
<HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
206
215
|
</Input.Root>
|
|
207
216
|
);
|
|
208
217
|
},
|
|
209
218
|
}),
|
|
210
219
|
createSurface({
|
|
211
|
-
id: `${
|
|
220
|
+
id: `${meta.id}/create-initial-space-form-[icon]`,
|
|
212
221
|
role: 'form-input',
|
|
213
222
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
214
223
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
215
224
|
return !!annotation;
|
|
216
225
|
},
|
|
217
226
|
component: ({ data: _, ...inputProps }) => {
|
|
218
|
-
const { label,
|
|
227
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
219
228
|
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
220
229
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
221
230
|
return (
|
|
222
231
|
<Input.Root>
|
|
223
232
|
<Input.Label>{label}</Input.Label>
|
|
224
|
-
<IconPicker disabled={
|
|
233
|
+
<IconPicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
225
234
|
</Input.Root>
|
|
226
235
|
);
|
|
227
236
|
},
|
|
228
237
|
}),
|
|
229
238
|
createSurface({
|
|
230
|
-
id: `${
|
|
239
|
+
id: `${meta.id}/typename-form-input`,
|
|
231
240
|
role: 'form-input',
|
|
232
241
|
filter: (
|
|
233
242
|
data,
|
|
@@ -275,14 +284,19 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
275
284
|
annotation.includes('unused-static') &&
|
|
276
285
|
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
277
286
|
!space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
287
|
+
const usedStatic =
|
|
288
|
+
annotation.includes('used-static') &&
|
|
289
|
+
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
290
|
+
space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
278
291
|
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
279
|
-
return annotation.includes('static') || limitedStatic || unusedStatic || objectForm;
|
|
292
|
+
return annotation.includes('static') || limitedStatic || unusedStatic || usedStatic || objectForm;
|
|
280
293
|
});
|
|
281
294
|
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
282
295
|
const typenames = Array.from(
|
|
283
296
|
new Set<string>([
|
|
284
297
|
...(annotation.includes('limited-static') ||
|
|
285
298
|
annotation.includes('unused-static') ||
|
|
299
|
+
annotation.includes('used-static') ||
|
|
286
300
|
annotation.includes('static') ||
|
|
287
301
|
annotation.includes('object-form')
|
|
288
302
|
? fixed.map((schema) => Type.getTypename(schema))
|
|
@@ -306,7 +320,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
306
320
|
},
|
|
307
321
|
}),
|
|
308
322
|
createSurface({
|
|
309
|
-
id: `${
|
|
323
|
+
id: `${meta.id}/object-settings`,
|
|
310
324
|
role: 'object-settings',
|
|
311
325
|
filter: (data): data is { subject: DataType.View } => Obj.instanceOf(DataType.View, data.subject),
|
|
312
326
|
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
@@ -325,13 +339,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
325
339
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
326
340
|
}),
|
|
327
341
|
createSurface({
|
|
328
|
-
id: `${
|
|
342
|
+
id: `${meta.id}/menu-footer`,
|
|
329
343
|
role: 'menu-footer',
|
|
330
344
|
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
331
345
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
332
346
|
}),
|
|
333
347
|
createSurface({
|
|
334
|
-
id: `${
|
|
348
|
+
id: `${meta.id}/navtree-presence`,
|
|
335
349
|
role: 'navtree-item-end',
|
|
336
350
|
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
337
351
|
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
@@ -343,7 +357,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
343
357
|
}),
|
|
344
358
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
345
359
|
createSurface({
|
|
346
|
-
id: `${
|
|
360
|
+
id: `${meta.id}/navtree-presence-fallback`,
|
|
347
361
|
role: 'navtree-item-end',
|
|
348
362
|
position: 'fallback',
|
|
349
363
|
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
@@ -351,13 +365,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
351
365
|
}),
|
|
352
366
|
// TODO(wittjosiah): Broken?
|
|
353
367
|
createSurface({
|
|
354
|
-
id: `${
|
|
368
|
+
id: `${meta.id}/navtree-sync-status`,
|
|
355
369
|
role: 'navtree-item-end',
|
|
356
370
|
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
357
371
|
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
358
372
|
}),
|
|
359
373
|
createSurface({
|
|
360
|
-
id: `${
|
|
374
|
+
id: `${meta.id}/navbar-presence`,
|
|
361
375
|
role: 'navbar-end',
|
|
362
376
|
position: 'hoist',
|
|
363
377
|
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
@@ -373,13 +387,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
373
387
|
},
|
|
374
388
|
}),
|
|
375
389
|
createSurface({
|
|
376
|
-
id: `${
|
|
390
|
+
id: `${meta.id}/collection-section`,
|
|
377
391
|
role: 'section',
|
|
378
392
|
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
379
393
|
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
380
394
|
}),
|
|
381
395
|
createSurface({
|
|
382
|
-
id: `${
|
|
396
|
+
id: `${meta.id}/status`,
|
|
383
397
|
role: 'status',
|
|
384
398
|
component: () => <SyncStatus />,
|
|
385
399
|
}),
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
|
|
8
|
-
import { SpaceCapabilities } from './capabilities';
|
|
9
8
|
import { type ObjectForm } from '../types';
|
|
10
9
|
|
|
10
|
+
import { SpaceCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
export default (context: PluginContext) => {
|
|
12
13
|
const registry = context.getCapability(Capabilities.RxRegistry);
|
|
13
14
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
8
|
import { SubscriptionList } from '@dxos/async';
|
|
9
9
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
@@ -14,13 +14,14 @@ import { ClientCapabilities } from '@dxos/plugin-client';
|
|
|
14
14
|
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
15
15
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
16
|
import { PublicKey } from '@dxos/react-client';
|
|
17
|
-
import { FQ_ID_LENGTH,
|
|
17
|
+
import { FQ_ID_LENGTH, SpaceState, parseFullyQualifiedId } from '@dxos/react-client/echo';
|
|
18
18
|
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
19
19
|
|
|
20
|
-
import { SpaceCapabilities } from './capabilities';
|
|
21
20
|
import { SpaceAction } from '../types';
|
|
22
21
|
import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
23
22
|
|
|
23
|
+
import { SpaceCapabilities } from './capabilities';
|
|
24
|
+
|
|
24
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
25
26
|
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
26
27
|
|
|
@@ -66,12 +67,14 @@ export default async (context: PluginContext) => {
|
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
const
|
|
70
|
-
|
|
70
|
+
const id = active[0];
|
|
71
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
72
|
+
if (!node && id.length === FQ_ID_LENGTH) {
|
|
73
|
+
void graph.initialize(id);
|
|
71
74
|
const timeout = setTimeout(async () => {
|
|
72
|
-
const node = graph.getNode(
|
|
75
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
73
76
|
if (!node) {
|
|
74
|
-
await dispatch(createIntent(SpaceAction.WaitForObject, { id
|
|
77
|
+
await dispatch(createIntent(SpaceAction.WaitForObject, { id }));
|
|
75
78
|
}
|
|
76
79
|
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
77
80
|
|
|
@@ -4,17 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import { effect } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
-
import { Capabilities,
|
|
7
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import { SPACE_PLUGIN } from '../meta';
|
|
12
|
+
import { meta } from '../meta';
|
|
14
13
|
import { type PluginState } from '../types';
|
|
15
14
|
|
|
15
|
+
import { SpaceCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default (context: PluginContext) => {
|
|
17
|
-
const state = new LocalStorageStore<PluginState>(
|
|
18
|
+
const state = new LocalStorageStore<PluginState>(meta.id, {
|
|
18
19
|
awaiting: undefined,
|
|
19
20
|
spaceNames: {},
|
|
20
21
|
viewersByObject: {},
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from '@dxos/app-framework';
|
|
8
8
|
import { useClient } from '@dxos/react-client';
|
|
9
9
|
import { Filter, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
10
10
|
import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
13
13
|
import { SpaceAction } from '../types';
|
|
14
14
|
|
|
15
15
|
const WAIT_FOR_OBJECT_TIMEOUT = 180e3; // 3 minutes
|
|
@@ -19,7 +19,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
19
19
|
const [open, setOpen] = useState(true);
|
|
20
20
|
const [waiting, setWaiting] = useState(true);
|
|
21
21
|
const [found, setFound] = useState(false);
|
|
22
|
-
const { t } = useTranslation(
|
|
22
|
+
const { t } = useTranslation(meta.id);
|
|
23
23
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
24
24
|
const layout = useLayout();
|
|
25
25
|
|
|
@@ -8,10 +8,10 @@ import { useTranslation } from '@dxos/react-ui';
|
|
|
8
8
|
import { baseSurface, descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
9
|
import { type DataType } from '@dxos/schema';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../meta';
|
|
12
12
|
|
|
13
13
|
export const CollectionMain = ({ collection }: { collection: DataType.Collection }) => {
|
|
14
|
-
const { t } = useTranslation(
|
|
14
|
+
const { t } = useTranslation(meta.id);
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div
|
|
@@ -7,10 +7,10 @@ import React from 'react';
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { type DataType } from '@dxos/schema';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
export const CollectionSection = ({ collection }: { collection: DataType.Collection }) => {
|
|
13
|
-
const { t } = useTranslation(
|
|
13
|
+
const { t } = useTranslation(meta.id);
|
|
14
14
|
// TODO(wittjosiah): Better placeholder.
|
|
15
15
|
return (
|
|
16
16
|
<div className='min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center'>
|