@dxos/plugin-space 0.8.4-main.3f58842 → 0.8.4-main.406dc2a
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-MQBHG666.mjs +145 -0
- package/dist/lib/browser/ObjectDetailsPanel-MQBHG666.mjs.map +7 -0
- package/dist/lib/browser/ObjectSettings-KNUZFCGS.mjs +151 -0
- package/dist/lib/browser/ObjectSettings-KNUZFCGS.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-H4DVHICS.mjs +116 -0
- package/dist/lib/browser/RecordMain-H4DVHICS.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-7CZZJS3S.mjs → app-graph-builder-3R5GGT46.mjs} +102 -61
- package/dist/lib/browser/app-graph-builder-3R5GGT46.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-H6AW7KGS.mjs → app-graph-serializer-25Z5BG22.mjs} +14 -14
- package/dist/lib/browser/app-graph-serializer-25Z5BG22.mjs.map +7 -0
- package/dist/lib/browser/{chunk-V7MJSSBQ.mjs → chunk-522KZGQF.mjs} +310 -342
- package/dist/lib/browser/chunk-522KZGQF.mjs.map +7 -0
- package/dist/lib/browser/chunk-7XOTWRZ3.mjs +166 -0
- package/dist/lib/browser/chunk-7XOTWRZ3.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-XUYKJUU7.mjs → chunk-OV6D543A.mjs} +99 -44
- package/dist/lib/browser/chunk-OV6D543A.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QACNNDOT.mjs → chunk-PTGRQQ6J.mjs} +13 -10
- package/dist/lib/browser/chunk-PTGRQQ6J.mjs.map +7 -0
- package/dist/lib/browser/chunk-RLI2IAHK.mjs +20 -0
- package/dist/lib/browser/chunk-RLI2IAHK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SGTQ52SU.mjs → chunk-WS2PJDES.mjs} +22 -12
- package/dist/lib/browser/chunk-WS2PJDES.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 +36 -53
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-TIXVDYN7.mjs → intent-resolver-ICGUSVH6.mjs} +52 -45
- package/dist/lib/browser/intent-resolver-ICGUSVH6.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-N2J7TDRX.mjs → react-root-H56QN474.mjs} +11 -11
- package/dist/lib/browser/react-root-H56QN474.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-TPNLWJJH.mjs → react-surface-VOE2ILKO.mjs} +57 -77
- package/dist/lib/browser/react-surface-VOE2ILKO.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-Z6FC4AHC.mjs → schema-defs-7R7RKCAE.mjs} +5 -5
- package/dist/lib/browser/schema-defs-7R7RKCAE.mjs.map +7 -0
- package/dist/lib/browser/{settings-4IMP5RYT.mjs → settings-OBFJ67ZG.mjs} +5 -5
- package/dist/lib/browser/{settings-4IMP5RYT.mjs.map → settings-OBFJ67ZG.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-TOPG6IV4.mjs → spaces-ready-MFIVK6I6.mjs} +18 -16
- package/dist/lib/browser/spaces-ready-MFIVK6I6.mjs.map +7 -0
- package/dist/lib/browser/{state-QYZAB45H.mjs → state-LSPRFIRO.mjs} +7 -7
- package/dist/lib/browser/state-LSPRFIRO.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-NABA2S56.mjs +146 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-NABA2S56.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectSettings-GXGTITF5.mjs +152 -0
- package/dist/lib/node-esm/ObjectSettings-GXGTITF5.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-MYFTAQ2U.mjs +117 -0
- package/dist/lib/node-esm/RecordMain-MYFTAQ2U.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-KGIGWC72.mjs → app-graph-builder-VGRMD5TP.mjs} +102 -61
- package/dist/lib/node-esm/app-graph-builder-VGRMD5TP.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-2ICUGQQT.mjs → app-graph-serializer-U4GHXWRG.mjs} +14 -14
- package/dist/lib/node-esm/app-graph-serializer-U4GHXWRG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JH6F4C3I.mjs → chunk-4F25JKVT.mjs} +22 -12
- package/dist/lib/node-esm/chunk-4F25JKVT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6X5DLJM5.mjs → chunk-DG5YEEPZ.mjs} +310 -342
- package/dist/lib/node-esm/chunk-DG5YEEPZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-H5UPFRRH.mjs +21 -0
- package/dist/lib/node-esm/chunk-H5UPFRRH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-P442DOQ3.mjs → chunk-HAKW2RFD.mjs} +13 -10
- package/dist/lib/node-esm/chunk-HAKW2RFD.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-PAAWJ4RE.mjs +167 -0
- package/dist/lib/node-esm/chunk-PAAWJ4RE.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-TNUWML33.mjs} +99 -44
- package/dist/lib/node-esm/chunk-TNUWML33.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 +36 -53
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MHGHRGDT.mjs → intent-resolver-KVB2A4YC.mjs} +52 -45
- package/dist/lib/node-esm/intent-resolver-KVB2A4YC.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-KW3TGJGY.mjs → react-root-56PGW5PH.mjs} +11 -11
- package/dist/lib/node-esm/react-root-56PGW5PH.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-UUIUUD6P.mjs → react-surface-NYEQ23A4.mjs} +57 -77
- package/dist/lib/node-esm/react-surface-NYEQ23A4.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-WHJM7UZE.mjs → schema-defs-RYG5DSUE.mjs} +5 -5
- package/dist/lib/node-esm/schema-defs-RYG5DSUE.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs → settings-QGWWNMMZ.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs.map → settings-QGWWNMMZ.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-HIUKNDZK.mjs → spaces-ready-TC27M7MP.mjs} +18 -16
- package/dist/lib/node-esm/spaces-ready-TC27M7MP.mjs.map +7 -0
- package/dist/lib/node-esm/{state-ZVEHQ4BJ.mjs → state-TCGOPLRO.mjs} +7 -7
- package/dist/lib/node-esm/state-TCGOPLRO.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 +5 -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 +1604 -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 +1604 -5
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +9 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts +10 -0
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts +1440 -0
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts.map +1 -0
- 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/ObjectSettings/index.d.ts +2 -1
- package/dist/types/src/components/ObjectSettings/index.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 +1432 -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 +1437 -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 +1438 -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 +9 -3
- 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/index.d.ts +1 -0
- package/dist/types/src/hooks/index.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/hooks/useTypeOptions.d.ts +10 -0
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -0
- 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 +1236 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +78 -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 +63 -58
- package/src/SpacePlugin.ts +206 -220
- package/src/capabilities/app-graph-builder.ts +127 -69
- package/src/capabilities/app-graph-serializer.ts +7 -7
- package/src/capabilities/capabilities.ts +18 -12
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +40 -28
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +50 -107
- 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/ObjectDetailsPanel.tsx +52 -0
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +75 -0
- package/src/components/ObjectDetailsPanel/index.ts +7 -0
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +4 -3
- package/src/components/ObjectSettings/BaseObjectSettings.stories.tsx +63 -0
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +96 -26
- package/src/components/ObjectSettings/ForeignKeys.tsx +3 -3
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
- package/src/components/ObjectSettings/index.ts +3 -1
- 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 +87 -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 +7 -7
- package/src/components/SyncStatus/SyncStatus.stories.tsx +6 -7
- package/src/components/SyncStatus/SyncStatus.tsx +93 -5
- package/src/components/ViewEditor.tsx +14 -20
- package/src/components/index.ts +2 -1
- package/src/events.ts +7 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +2 -2
- package/src/hooks/useInputSurfaceLookup.tsx +2 -2
- package/src/hooks/usePath.ts +1 -1
- package/src/hooks/useTypeOptions.ts +59 -0
- package/src/meta.ts +1 -3
- package/src/translations.ts +11 -8
- package/src/types/types.ts +21 -13
- package/src/util.tsx +97 -40
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-YPTDQKMG.mjs +0 -88
- 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 +0 -94
- 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 +0 -89
- 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 +0 -96
- 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/dist/types/src/components/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +0 -1
- package/src/capabilities/schema-tool.test.ts +0 -44
- package/src/capabilities/schema-tools.ts +0 -125
- package/src/components/ObjectDetailsPanel.tsx +0 -77
|
@@ -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.type(DataType.StoredSchema)).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 {
|
|
@@ -322,7 +323,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
322
323
|
}),
|
|
323
324
|
createResolver({
|
|
324
325
|
intent: SpaceAction.UseStaticSchema,
|
|
325
|
-
resolve: async ({ space, typename }) => {
|
|
326
|
+
resolve: async ({ space, typename, show }) => {
|
|
326
327
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
327
328
|
const schema = client.graph.schemaRegistry.schemas.find((schema) => Type.getTypename(schema) === typename);
|
|
328
329
|
invariant(schema, `Schema not found: ${typename}`);
|
|
@@ -337,7 +338,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
337
338
|
|
|
338
339
|
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
339
340
|
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
340
|
-
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
341
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema, show }));
|
|
341
342
|
|
|
342
343
|
return {
|
|
343
344
|
data: {},
|
|
@@ -360,15 +361,21 @@ 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, show }) => {
|
|
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);
|
|
371
|
-
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
378
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema, show }));
|
|
372
379
|
|
|
373
380
|
return {
|
|
374
381
|
data: {
|
|
@@ -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,46 +2,36 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import React, { useCallback
|
|
5
|
+
import type * as Schema from 'effect/Schema';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
Capabilities,
|
|
10
|
-
contributes,
|
|
11
|
-
createSurface,
|
|
12
|
-
Surface,
|
|
13
|
-
useCapabilities,
|
|
14
|
-
useCapability,
|
|
15
|
-
useLayout,
|
|
16
|
-
} from '@dxos/app-framework';
|
|
8
|
+
import { Capabilities, Surface, contributes, createSurface, useCapability, useLayout } from '@dxos/app-framework';
|
|
17
9
|
import { Obj, Type } from '@dxos/echo';
|
|
18
10
|
import { findAnnotation } from '@dxos/effect';
|
|
19
11
|
import { SettingsStore } from '@dxos/local-storage';
|
|
20
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
|
-
import { useClient } from '@dxos/react-client';
|
|
22
12
|
import {
|
|
13
|
+
type Space,
|
|
14
|
+
SpaceState,
|
|
23
15
|
fullyQualifiedId,
|
|
24
16
|
getSpace,
|
|
25
17
|
isLiveObject,
|
|
26
18
|
isSpace,
|
|
27
19
|
parseId,
|
|
28
|
-
SpaceState,
|
|
29
20
|
useSpace,
|
|
30
|
-
type Space,
|
|
31
21
|
} from '@dxos/react-client/echo';
|
|
32
|
-
import { Input
|
|
22
|
+
import { Input } from '@dxos/react-ui';
|
|
33
23
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
34
24
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
35
25
|
import { DataType, type TypenameAnnotation, TypenameAnnotationId } from '@dxos/schema';
|
|
36
26
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
37
27
|
|
|
38
|
-
import { SpaceCapabilities } from './capabilities';
|
|
39
28
|
import {
|
|
40
|
-
CollectionMain,
|
|
41
|
-
CollectionSection,
|
|
42
29
|
CREATE_OBJECT_DIALOG,
|
|
43
30
|
CREATE_SPACE_DIALOG,
|
|
31
|
+
CollectionMain,
|
|
32
|
+
CollectionSection,
|
|
44
33
|
CreateObjectDialog,
|
|
34
|
+
type CreateObjectDialogProps,
|
|
45
35
|
CreateSpaceDialog,
|
|
46
36
|
InlineSyncStatus,
|
|
47
37
|
JOIN_DIALOG,
|
|
@@ -54,6 +44,7 @@ import {
|
|
|
54
44
|
POPOVER_RENAME_SPACE,
|
|
55
45
|
PopoverRenameObject,
|
|
56
46
|
PopoverRenameSpace,
|
|
47
|
+
RecordMain,
|
|
57
48
|
SchemaContainer,
|
|
58
49
|
SmallPresenceLive,
|
|
59
50
|
SpacePluginSettings,
|
|
@@ -61,21 +52,23 @@ import {
|
|
|
61
52
|
SpaceSettingsContainer,
|
|
62
53
|
SyncStatus,
|
|
63
54
|
ViewEditor,
|
|
64
|
-
type CreateObjectDialogProps,
|
|
65
55
|
} from '../components';
|
|
66
|
-
import {
|
|
56
|
+
import { useTypeOptions } from '../hooks';
|
|
57
|
+
import { meta } from '../meta';
|
|
67
58
|
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
68
59
|
|
|
60
|
+
import { SpaceCapabilities } from './capabilities';
|
|
61
|
+
|
|
69
62
|
type ReactSurfaceOptions = {
|
|
70
63
|
createInvitationUrl: (invitationCode: string) => string;
|
|
71
64
|
};
|
|
72
65
|
|
|
73
|
-
const OMIT = [DataType.Collection.typename, DataType.QueryCollection
|
|
66
|
+
const OMIT = [DataType.Collection.typename, Type.getTypename(DataType.QueryCollection)];
|
|
74
67
|
|
|
75
68
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
76
69
|
contributes(Capabilities.ReactSurface, [
|
|
77
70
|
createSurface({
|
|
78
|
-
id: `${
|
|
71
|
+
id: `${meta.id}/article`,
|
|
79
72
|
role: 'article',
|
|
80
73
|
filter: (data): data is { subject: Space } =>
|
|
81
74
|
// TODO(wittjosiah): Need to avoid shotgun parsing space state everywhere.
|
|
@@ -92,29 +85,36 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
92
85
|
),
|
|
93
86
|
}),
|
|
94
87
|
createSurface({
|
|
95
|
-
id: `${
|
|
88
|
+
id: `${meta.id}/record-article`,
|
|
89
|
+
role: 'article',
|
|
90
|
+
position: 'fallback',
|
|
91
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
92
|
+
component: ({ data }) => <RecordMain record={data.subject} />,
|
|
93
|
+
}),
|
|
94
|
+
createSurface({
|
|
95
|
+
id: `${meta.id}/collection-fallback`,
|
|
96
96
|
role: 'article',
|
|
97
97
|
position: 'fallback',
|
|
98
98
|
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
99
99
|
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
100
100
|
}),
|
|
101
101
|
createSurface({
|
|
102
|
-
id: `${
|
|
102
|
+
id: `${meta.id}/plugin-settings`,
|
|
103
103
|
role: 'article',
|
|
104
104
|
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
105
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
105
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
106
106
|
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
107
107
|
}),
|
|
108
108
|
createSurface({
|
|
109
|
-
id: `${
|
|
109
|
+
id: `${meta.id}/companion/object-settings`,
|
|
110
110
|
role: 'article',
|
|
111
111
|
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
112
112
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
113
113
|
}),
|
|
114
114
|
createSurface({
|
|
115
|
-
id: `${
|
|
115
|
+
id: `${meta.id}/space-settings-properties`,
|
|
116
116
|
role: 'article',
|
|
117
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
117
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/properties`,
|
|
118
118
|
component: () => {
|
|
119
119
|
const layout = useLayout();
|
|
120
120
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -127,10 +127,10 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
127
127
|
},
|
|
128
128
|
}),
|
|
129
129
|
createSurface({
|
|
130
|
-
id: `${
|
|
130
|
+
id: `${meta.id}/space-settings-members`,
|
|
131
131
|
role: 'article',
|
|
132
132
|
position: 'hoist',
|
|
133
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
133
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/members`,
|
|
134
134
|
component: () => {
|
|
135
135
|
const layout = useLayout();
|
|
136
136
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -143,9 +143,9 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
143
143
|
},
|
|
144
144
|
}),
|
|
145
145
|
createSurface({
|
|
146
|
-
id: `${
|
|
146
|
+
id: `${meta.id}/space-settings-schema`,
|
|
147
147
|
role: 'article',
|
|
148
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
148
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/schema`,
|
|
149
149
|
component: () => {
|
|
150
150
|
const layout = useLayout();
|
|
151
151
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -158,7 +158,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
158
158
|
},
|
|
159
159
|
}),
|
|
160
160
|
createSurface({
|
|
161
|
-
id: `${
|
|
161
|
+
id: `${meta.id}/selected-objects`,
|
|
162
162
|
role: 'article',
|
|
163
163
|
filter: (data): data is { companionTo: DataType.View; subject: 'selected-objects' } =>
|
|
164
164
|
Obj.instanceOf(DataType.View, data.companionTo) && data.subject === 'selected-objects',
|
|
@@ -189,45 +189,45 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
189
189
|
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
190
190
|
}),
|
|
191
191
|
createSurface({
|
|
192
|
-
id: `${
|
|
192
|
+
id: `${meta.id}/create-initial-space-form-[hue]`,
|
|
193
193
|
role: 'form-input',
|
|
194
194
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
195
195
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
196
196
|
return !!annotation;
|
|
197
197
|
},
|
|
198
198
|
component: ({ data: _, ...inputProps }) => {
|
|
199
|
-
const { label,
|
|
199
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
200
200
|
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
201
201
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
202
202
|
return (
|
|
203
203
|
<Input.Root>
|
|
204
204
|
<Input.Label>{label}</Input.Label>
|
|
205
|
-
<HuePicker disabled={
|
|
205
|
+
<HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
206
206
|
</Input.Root>
|
|
207
207
|
);
|
|
208
208
|
},
|
|
209
209
|
}),
|
|
210
210
|
createSurface({
|
|
211
|
-
id: `${
|
|
211
|
+
id: `${meta.id}/create-initial-space-form-[icon]`,
|
|
212
212
|
role: 'form-input',
|
|
213
213
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
214
214
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
215
215
|
return !!annotation;
|
|
216
216
|
},
|
|
217
217
|
component: ({ data: _, ...inputProps }) => {
|
|
218
|
-
const { label,
|
|
218
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
219
219
|
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
220
220
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
221
221
|
return (
|
|
222
222
|
<Input.Root>
|
|
223
223
|
<Input.Label>{label}</Input.Label>
|
|
224
|
-
<IconPicker disabled={
|
|
224
|
+
<IconPicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
225
225
|
</Input.Root>
|
|
226
226
|
);
|
|
227
227
|
},
|
|
228
228
|
}),
|
|
229
229
|
createSurface({
|
|
230
|
-
id: `${
|
|
230
|
+
id: `${meta.id}/typename-form-input`,
|
|
231
231
|
role: 'form-input',
|
|
232
232
|
filter: (
|
|
233
233
|
data,
|
|
@@ -240,73 +240,16 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
240
240
|
return !!annotation;
|
|
241
241
|
},
|
|
242
242
|
component: ({ data: { schema, target }, ...inputProps }) => {
|
|
243
|
-
const { t } = useTranslation();
|
|
244
|
-
const client = useClient();
|
|
245
243
|
const props = inputProps as any as InputProps;
|
|
246
244
|
const space = isSpace(target) ? target : getSpace(target);
|
|
247
|
-
if (!space) {
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
245
|
const annotation = findAnnotation<TypenameAnnotation[]>(schema.ast, TypenameAnnotationId)!;
|
|
252
|
-
|
|
253
|
-
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
254
|
-
const whitelistedTypenames = useMemo(
|
|
255
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => Type.getTypename(type)))),
|
|
256
|
-
[schemaWhitelists],
|
|
257
|
-
);
|
|
258
|
-
|
|
259
|
-
const objectForms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
260
|
-
const objectFormTypenames = useMemo(
|
|
261
|
-
() =>
|
|
262
|
-
new Set(
|
|
263
|
-
objectForms
|
|
264
|
-
.map((form) => Type.getTypename(form.objectSchema))
|
|
265
|
-
// TODO(wittjosiah): Remove.
|
|
266
|
-
.filter((typename) => !OMIT.includes(typename) && !typename.endsWith('View')),
|
|
267
|
-
),
|
|
268
|
-
[objectForms],
|
|
269
|
-
);
|
|
270
|
-
|
|
271
|
-
const fixed = client.graph.schemaRegistry.schemas.filter((schema) => {
|
|
272
|
-
const limitedStatic =
|
|
273
|
-
annotation.includes('limited-static') && whitelistedTypenames.has(Type.getTypename(schema));
|
|
274
|
-
const unusedStatic =
|
|
275
|
-
annotation.includes('unused-static') &&
|
|
276
|
-
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
277
|
-
!space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
278
|
-
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
279
|
-
return annotation.includes('static') || limitedStatic || unusedStatic || objectForm;
|
|
280
|
-
});
|
|
281
|
-
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
282
|
-
const typenames = Array.from(
|
|
283
|
-
new Set<string>([
|
|
284
|
-
...(annotation.includes('limited-static') ||
|
|
285
|
-
annotation.includes('unused-static') ||
|
|
286
|
-
annotation.includes('static') ||
|
|
287
|
-
annotation.includes('object-form')
|
|
288
|
-
? fixed.map((schema) => Type.getTypename(schema))
|
|
289
|
-
: []),
|
|
290
|
-
...(annotation.includes('dynamic') ? dynamic.map((schema) => schema.typename) : []),
|
|
291
|
-
]),
|
|
292
|
-
).sort();
|
|
293
|
-
|
|
294
|
-
const options = useMemo(
|
|
295
|
-
() =>
|
|
296
|
-
typenames
|
|
297
|
-
.map((typename) => ({
|
|
298
|
-
value: typename,
|
|
299
|
-
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
300
|
-
}))
|
|
301
|
-
.toSorted((a, b) => a.label.localeCompare(b.label)),
|
|
302
|
-
[t, typenames],
|
|
303
|
-
);
|
|
246
|
+
const options = useTypeOptions({ space, annotation });
|
|
304
247
|
|
|
305
248
|
return <SelectInput {...props} options={options} />;
|
|
306
249
|
},
|
|
307
250
|
}),
|
|
308
251
|
createSurface({
|
|
309
|
-
id: `${
|
|
252
|
+
id: `${meta.id}/object-settings`,
|
|
310
253
|
role: 'object-settings',
|
|
311
254
|
filter: (data): data is { subject: DataType.View } => Obj.instanceOf(DataType.View, data.subject),
|
|
312
255
|
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
@@ -325,13 +268,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
325
268
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
326
269
|
}),
|
|
327
270
|
createSurface({
|
|
328
|
-
id: `${
|
|
271
|
+
id: `${meta.id}/menu-footer`,
|
|
329
272
|
role: 'menu-footer',
|
|
330
273
|
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
331
274
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
332
275
|
}),
|
|
333
276
|
createSurface({
|
|
334
|
-
id: `${
|
|
277
|
+
id: `${meta.id}/navtree-presence`,
|
|
335
278
|
role: 'navtree-item-end',
|
|
336
279
|
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
337
280
|
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
@@ -343,7 +286,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
343
286
|
}),
|
|
344
287
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
345
288
|
createSurface({
|
|
346
|
-
id: `${
|
|
289
|
+
id: `${meta.id}/navtree-presence-fallback`,
|
|
347
290
|
role: 'navtree-item-end',
|
|
348
291
|
position: 'fallback',
|
|
349
292
|
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
@@ -351,13 +294,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
351
294
|
}),
|
|
352
295
|
// TODO(wittjosiah): Broken?
|
|
353
296
|
createSurface({
|
|
354
|
-
id: `${
|
|
297
|
+
id: `${meta.id}/navtree-sync-status`,
|
|
355
298
|
role: 'navtree-item-end',
|
|
356
299
|
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
357
300
|
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
358
301
|
}),
|
|
359
302
|
createSurface({
|
|
360
|
-
id: `${
|
|
303
|
+
id: `${meta.id}/navbar-presence`,
|
|
361
304
|
role: 'navbar-end',
|
|
362
305
|
position: 'hoist',
|
|
363
306
|
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
@@ -373,13 +316,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
373
316
|
},
|
|
374
317
|
}),
|
|
375
318
|
createSurface({
|
|
376
|
-
id: `${
|
|
319
|
+
id: `${meta.id}/collection-section`,
|
|
377
320
|
role: 'section',
|
|
378
321
|
filter: (data): data is { subject: DataType.Collection } => Obj.instanceOf(DataType.Collection, data.subject),
|
|
379
322
|
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
380
323
|
}),
|
|
381
324
|
createSurface({
|
|
382
|
-
id: `${
|
|
325
|
+
id: `${meta.id}/status`,
|
|
383
326
|
role: 'status',
|
|
384
327
|
component: () => <SyncStatus />,
|
|
385
328
|
}),
|
|
@@ -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: {},
|