@dxos/plugin-space 0.8.4-main.f9ba587 → 0.8.4-main.fffef41
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/CollectionArticle-WTHWY4YS.mjs +31 -0
- package/dist/lib/browser/CollectionArticle-WTHWY4YS.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetailsPanel-2BRUBHP6.mjs +141 -0
- package/dist/lib/browser/ObjectDetailsPanel-2BRUBHP6.mjs.map +7 -0
- package/dist/lib/browser/ObjectSettings-5LLWCVEK.mjs +144 -0
- package/dist/lib/browser/ObjectSettings-5LLWCVEK.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-SXDRWTTU.mjs +116 -0
- package/dist/lib/browser/RecordArticle-SXDRWTTU.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-DTM7BJ6D.mjs +528 -0
- package/dist/lib/browser/app-graph-builder-DTM7BJ6D.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-UKYMBX4O.mjs → app-graph-serializer-TIKXF43P.mjs} +19 -19
- package/dist/lib/browser/app-graph-serializer-TIKXF43P.mjs.map +7 -0
- package/dist/lib/browser/chunk-AFUOMLX6.mjs +167 -0
- package/dist/lib/browser/chunk-AFUOMLX6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GVTXQCIW.mjs → chunk-CKACGS7T.mjs} +714 -571
- package/dist/lib/browser/chunk-CKACGS7T.mjs.map +7 -0
- package/dist/lib/browser/chunk-K5J7ZB5P.mjs +20 -0
- package/dist/lib/browser/chunk-K5J7ZB5P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WBSEOLEM.mjs → chunk-KFUMADZF.mjs} +301 -73
- package/dist/lib/browser/chunk-KFUMADZF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6VLSHG4A.mjs → chunk-VGKOXAPE.mjs} +87 -12
- package/dist/lib/browser/chunk-VGKOXAPE.mjs.map +7 -0
- package/dist/lib/browser/chunk-VZBIIYFM.mjs +16 -0
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +7 -0
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +19 -0
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-S6NY637J.mjs → chunk-ZQMSGD5J.mjs} +95 -19
- package/dist/lib/browser/chunk-ZQMSGD5J.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs → identity-created-NAXTPQXE.mjs} +6 -6
- package/dist/lib/browser/identity-created-NAXTPQXE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +148 -59
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-WK5WYFH3.mjs → intent-resolver-3FNTO3VW.mjs} +236 -68
- package/dist/lib/browser/intent-resolver-3FNTO3VW.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-Q7VBWBES.mjs +30 -0
- package/dist/lib/browser/react-root-Q7VBWBES.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-6C3YJNDK.mjs → react-surface-TTHS332A.mjs} +98 -100
- package/dist/lib/browser/react-surface-TTHS332A.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-K3B3OAH4.mjs → schema-defs-QPI2JU3X.mjs} +6 -6
- package/dist/lib/browser/schema-defs-QPI2JU3X.mjs.map +7 -0
- package/dist/lib/browser/{settings-XNWYRWNM.mjs → settings-45PGPO2V.mjs} +5 -5
- package/dist/lib/browser/{settings-XNWYRWNM.mjs.map → settings-45PGPO2V.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-K7NSNBHM.mjs → spaces-ready-QCND4DVY.mjs} +21 -18
- package/dist/lib/browser/spaces-ready-QCND4DVY.mjs.map +7 -0
- package/dist/lib/browser/{state-522XTUR4.mjs → state-Q7YRE5KG.mjs} +7 -7
- package/dist/lib/browser/state-Q7YRE5KG.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs +32 -0
- package/dist/lib/node-esm/CollectionArticle-KHXYT3SH.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-6PZQIQG3.mjs +142 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-6PZQIQG3.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectSettings-OQSBOH7K.mjs +145 -0
- package/dist/lib/node-esm/ObjectSettings-OQSBOH7K.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-NACBH42P.mjs +117 -0
- package/dist/lib/node-esm/RecordArticle-NACBH42P.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-FBJFWI4H.mjs +529 -0
- package/dist/lib/node-esm/app-graph-builder-FBJFWI4H.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-LA3IZDXJ.mjs → app-graph-serializer-BESQZAYU.mjs} +19 -19
- package/dist/lib/node-esm/app-graph-serializer-BESQZAYU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2THX6G4C.mjs → chunk-6VEONPNZ.mjs} +95 -19
- package/dist/lib/node-esm/chunk-6VEONPNZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6ZQGZBEP.mjs +168 -0
- package/dist/lib/node-esm/chunk-6ZQGZBEP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs +18 -0
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +20 -0
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HJJHLWKY.mjs → chunk-OK2L7N2F.mjs} +301 -73
- package/dist/lib/node-esm/chunk-OK2L7N2F.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SXD6T2N4.mjs → chunk-QBRPYAEL.mjs} +87 -12
- package/dist/lib/node-esm/chunk-QBRPYAEL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OUBADVJE.mjs → chunk-XGAMJC5C.mjs} +714 -571
- package/dist/lib/node-esm/chunk-XGAMJC5C.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z7BB6HC2.mjs +21 -0
- package/dist/lib/node-esm/chunk-Z7BB6HC2.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs → identity-created-OXLKCJE3.mjs} +6 -6
- package/dist/lib/node-esm/identity-created-OXLKCJE3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +148 -59
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-HSR27ME4.mjs → intent-resolver-6O5FSB7Z.mjs} +236 -68
- package/dist/lib/node-esm/intent-resolver-6O5FSB7Z.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-HUK3ANLV.mjs → react-root-K66W3FMA.mjs} +13 -12
- package/dist/lib/node-esm/react-root-K66W3FMA.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-AGAWX7DD.mjs → react-surface-Y7FTEIDF.mjs} +98 -100
- package/dist/lib/node-esm/react-surface-Y7FTEIDF.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-4MCDG4DV.mjs → schema-defs-ZS2D47XW.mjs} +6 -6
- package/dist/lib/node-esm/schema-defs-ZS2D47XW.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-YGKHGFPH.mjs → settings-6FO65BA6.mjs} +5 -5
- package/dist/lib/node-esm/{settings-YGKHGFPH.mjs.map → settings-6FO65BA6.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-UM2P3DCR.mjs → spaces-ready-P7CKVXBE.mjs} +21 -18
- package/dist/lib/node-esm/spaces-ready-P7CKVXBE.mjs.map +7 -0
- package/dist/lib/node-esm/{state-C4IOXPZP.mjs → state-362I5BMK.mjs} +7 -7
- package/dist/lib/node-esm/state-362I5BMK.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 +14 -7
- 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/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +6 -0
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
- package/dist/types/src/components/CollectionSection.d.ts +3 -4
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +5 -4
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1704 -4
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +7 -5
- 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 → JoinDialog/JoinDialog.d.ts} +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +3 -2
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1707 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
- package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/MenuFooter.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/ObjectRenamePopover/ObjectRenamePopover.d.ts +7 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/ObjectRenamePopover/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 +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.stories.d.ts +1540 -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/RecordArticle.d.ts +5 -0
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
- package/dist/types/src/components/RecordArticle.stories.d.ts +1707 -0
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -0
- package/dist/types/src/components/SchemaContainer.d.ts +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/{SpacePresence.d.ts → SpacePresence/SpacePresence.d.ts} +4 -3
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts +1537 -0
- package/dist/types/src/components/SpacePresence/SpacePresence.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
- package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1537 -4
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1538 -5
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts +5 -5
- package/dist/types/src/components/ViewEditor.d.ts +7 -0
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +11 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/helpers/index.d.ts +2 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +8 -0
- package/dist/types/src/helpers/query.d.ts.map +1 -0
- package/dist/types/src/helpers/query.test.d.ts +2 -0
- package/dist/types/src/helpers/query.test.d.ts.map +1 -0
- 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/index.d.ts +1 -0
- package/dist/types/src/index.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 +1382 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +141 -66
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +40 -10
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +67 -61
- package/src/SpacePlugin.ts +232 -139
- package/src/capabilities/app-graph-builder.ts +335 -88
- package/src/capabilities/app-graph-serializer.ts +12 -12
- package/src/capabilities/capabilities.ts +21 -10
- package/src/capabilities/identity-created.ts +3 -3
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +191 -54
- package/src/capabilities/react-root.tsx +6 -4
- package/src/capabilities/react-surface.tsx +94 -119
- package/src/capabilities/schema-defs.ts +4 -3
- package/src/capabilities/spaces-ready.ts +16 -10
- package/src/capabilities/state.ts +5 -4
- package/src/components/AwaitingObject.tsx +16 -20
- package/src/components/{CollectionMain.tsx → CollectionArticle.tsx} +8 -5
- package/src/components/CollectionSection.tsx +8 -6
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +17 -16
- package/src/components/CreateDialog/CreateObjectDialog.tsx +76 -54
- package/src/components/CreateDialog/CreateObjectPanel.tsx +24 -13
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +30 -11
- package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -10
- package/src/components/JoinDialog/index.ts +5 -0
- package/src/components/MembersContainer/MembersContainer.stories.tsx +56 -0
- package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +27 -24
- package/src/components/MembersContainer/index.ts +5 -0
- package/src/components/MenuFooter.tsx +4 -5
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +51 -0
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +72 -0
- package/src/components/ObjectDetailsPanel/index.ts +7 -0
- package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +11 -17
- package/src/components/ObjectRenamePopover/index.ts +5 -0
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +4 -3
- package/src/components/ObjectSettings/BaseObjectSettings.stories.tsx +63 -0
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +90 -26
- package/src/components/ObjectSettings/ForeignKeys.tsx +4 -4
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +4 -3
- package/src/components/ObjectSettings/index.ts +3 -1
- package/src/components/RecordArticle.stories.tsx +115 -0
- package/src/components/RecordArticle.tsx +114 -0
- package/src/components/SchemaContainer.tsx +25 -28
- package/src/components/SpacePluginSettings.tsx +16 -11
- package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +24 -23
- package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +22 -17
- package/src/components/SpacePresence/index.ts +5 -0
- package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +7 -6
- package/src/components/SpaceRenamePopover/index.ts +5 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +17 -9
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +49 -28
- package/src/components/SyncStatus/InlineSyncStatus.tsx +8 -8
- package/src/components/SyncStatus/SyncStatus.stories.tsx +9 -9
- package/src/components/SyncStatus/SyncStatus.tsx +110 -13
- package/src/components/SyncStatus/status.ts +4 -4
- package/src/components/ViewEditor.tsx +92 -0
- package/src/components/index.ts +10 -5
- package/src/events.ts +7 -6
- package/src/helpers/index.ts +5 -0
- package/src/helpers/query.test.ts +24 -0
- package/src/helpers/query.ts +158 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveSpace.ts +3 -2
- package/src/hooks/useInputSurfaceLookup.tsx +8 -3
- package/src/hooks/usePath.ts +1 -1
- package/src/hooks/useTypeOptions.ts +59 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +6 -3
- package/src/translations.ts +85 -7
- package/src/types/types.ts +94 -22
- package/src/util.tsx +297 -75
- package/dist/lib/browser/app-graph-builder-PMDF6PJV.mjs +0 -363
- package/dist/lib/browser/app-graph-builder-PMDF6PJV.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-UKYMBX4O.mjs.map +0 -7
- package/dist/lib/browser/chunk-6VLSHG4A.mjs.map +0 -7
- package/dist/lib/browser/chunk-C7KGJTAL.mjs +0 -18
- package/dist/lib/browser/chunk-C7KGJTAL.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-GVTXQCIW.mjs.map +0 -7
- package/dist/lib/browser/chunk-S6NY637J.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-WBSEOLEM.mjs.map +0 -7
- package/dist/lib/browser/chunk-XXIPJLJF.mjs +0 -19
- package/dist/lib/browser/chunk-XXIPJLJF.mjs.map +0 -7
- package/dist/lib/browser/identity-created-23XJJV2N.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-WK5WYFH3.mjs.map +0 -7
- package/dist/lib/browser/react-root-7S6FIC5G.mjs +0 -29
- package/dist/lib/browser/react-root-7S6FIC5G.mjs.map +0 -7
- package/dist/lib/browser/react-surface-6C3YJNDK.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-K3B3OAH4.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-K7NSNBHM.mjs.map +0 -7
- package/dist/lib/browser/state-522XTUR4.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TO72W6MI.mjs +0 -364
- package/dist/lib/node-esm/app-graph-builder-TO72W6MI.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-LA3IZDXJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2THX6G4C.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-72QMMRKC.mjs +0 -19
- package/dist/lib/node-esm/chunk-72QMMRKC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AT7LGFER.mjs +0 -20
- package/dist/lib/node-esm/chunk-AT7LGFER.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HJJHLWKY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs +0 -15
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OUBADVJE.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/chunk-SXD6T2N4.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-IJQO6GCR.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-HSR27ME4.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-HUK3ANLV.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AGAWX7DD.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4MCDG4DV.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-UM2P3DCR.mjs.map +0 -7
- package/dist/lib/node-esm/state-C4IOXPZP.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/CollectionMain.d.ts +0 -6
- package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +0 -8
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
- package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +0 -9
- package/dist/types/src/components/SpacePresence.stories.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/MembersContainer.stories.tsx +0 -30
- package/src/components/PersistenceStatus.tsx +0 -84
|
@@ -2,69 +2,64 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
createSurface,
|
|
12
|
-
Surface,
|
|
13
|
-
useCapabilities,
|
|
14
|
-
useCapability,
|
|
15
|
-
useLayout,
|
|
16
|
-
} from '@dxos/app-framework';
|
|
17
|
-
import { Obj, Type } from '@dxos/echo';
|
|
8
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useCapability, useLayout } from '@dxos/app-framework/react';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
18
11
|
import { findAnnotation } from '@dxos/effect';
|
|
19
12
|
import { SettingsStore } from '@dxos/local-storage';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { getSpace, isLiveObject, isSpace, parseId, SpaceState, useSpace, type Space } from '@dxos/react-client/echo';
|
|
23
|
-
import { Input, useTranslation } from '@dxos/react-ui';
|
|
13
|
+
import { type Space, SpaceState, getSpace, isLiveObject, isSpace, parseId, useSpace } from '@dxos/react-client/echo';
|
|
14
|
+
import { Input } from '@dxos/react-ui';
|
|
24
15
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
25
16
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
26
|
-
import {
|
|
17
|
+
import { Collection, type TypenameAnnotation, TypenameAnnotationId, View } from '@dxos/schema';
|
|
27
18
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
28
19
|
|
|
29
|
-
|
|
20
|
+
// TODO(burdon): Component name standard: NounVerbComponent.
|
|
30
21
|
import {
|
|
31
|
-
CollectionMain,
|
|
32
|
-
CollectionSection,
|
|
33
22
|
CREATE_OBJECT_DIALOG,
|
|
34
23
|
CREATE_SPACE_DIALOG,
|
|
24
|
+
CollectionArticle,
|
|
25
|
+
CollectionSection,
|
|
35
26
|
CreateObjectDialog,
|
|
27
|
+
type CreateObjectDialogProps,
|
|
36
28
|
CreateSpaceDialog,
|
|
37
29
|
InlineSyncStatus,
|
|
38
30
|
JOIN_DIALOG,
|
|
39
31
|
JoinDialog,
|
|
40
32
|
MembersContainer,
|
|
41
33
|
MenuFooter,
|
|
34
|
+
OBJECT_RENAME_POPOVER,
|
|
35
|
+
ObjectDetailsPanel,
|
|
36
|
+
ObjectRenamePopover,
|
|
42
37
|
ObjectSettingsContainer,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
PopoverRenameObject,
|
|
46
|
-
PopoverRenameSpace,
|
|
38
|
+
RecordArticle,
|
|
39
|
+
SPACE_RENAME_POPOVER,
|
|
47
40
|
SchemaContainer,
|
|
48
41
|
SmallPresenceLive,
|
|
49
42
|
SpacePluginSettings,
|
|
50
43
|
SpacePresence,
|
|
44
|
+
SpaceRenamePopover,
|
|
51
45
|
SpaceSettingsContainer,
|
|
52
46
|
SyncStatus,
|
|
53
|
-
|
|
47
|
+
ViewEditor,
|
|
54
48
|
} from '../components';
|
|
55
|
-
import {
|
|
49
|
+
import { useTypeOptions } from '../hooks';
|
|
50
|
+
import { meta } from '../meta';
|
|
56
51
|
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
57
52
|
|
|
53
|
+
import { SpaceCapabilities } from './capabilities';
|
|
54
|
+
|
|
58
55
|
type ReactSurfaceOptions = {
|
|
59
56
|
createInvitationUrl: (invitationCode: string) => string;
|
|
60
57
|
};
|
|
61
58
|
|
|
62
|
-
const OMIT = [DataType.Collection.typename, DataType.QueryCollection.typename];
|
|
63
|
-
|
|
64
59
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
65
60
|
contributes(Capabilities.ReactSurface, [
|
|
66
61
|
createSurface({
|
|
67
|
-
id: `${
|
|
62
|
+
id: `${meta.id}/article`,
|
|
68
63
|
role: 'article',
|
|
69
64
|
filter: (data): data is { subject: Space } =>
|
|
70
65
|
// TODO(wittjosiah): Need to avoid shotgun parsing space state everywhere.
|
|
@@ -73,7 +68,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
73
68
|
<Surface
|
|
74
69
|
data={{
|
|
75
70
|
id: data.subject.id,
|
|
76
|
-
subject: data.subject.properties[
|
|
71
|
+
subject: data.subject.properties[Collection.Collection.typename]?.target,
|
|
77
72
|
}}
|
|
78
73
|
role={role}
|
|
79
74
|
{...rest}
|
|
@@ -81,29 +76,36 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
81
76
|
),
|
|
82
77
|
}),
|
|
83
78
|
createSurface({
|
|
84
|
-
id: `${
|
|
79
|
+
id: `${meta.id}/record-article`,
|
|
80
|
+
role: 'article',
|
|
81
|
+
position: 'fallback',
|
|
82
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
83
|
+
component: ({ data }) => <RecordArticle subject={data.subject} />,
|
|
84
|
+
}),
|
|
85
|
+
createSurface({
|
|
86
|
+
id: `${meta.id}/collection-fallback`,
|
|
85
87
|
role: 'article',
|
|
86
88
|
position: 'fallback',
|
|
87
|
-
filter: (data): data is { subject:
|
|
88
|
-
component: ({ data }) => <
|
|
89
|
+
filter: (data): data is { subject: Collection.Collection } => Obj.instanceOf(Collection.Collection, data.subject),
|
|
90
|
+
component: ({ data }) => <CollectionArticle subject={data.subject} />,
|
|
89
91
|
}),
|
|
90
92
|
createSurface({
|
|
91
|
-
id: `${
|
|
93
|
+
id: `${meta.id}/plugin-settings`,
|
|
92
94
|
role: 'article',
|
|
93
95
|
filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
|
|
94
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
96
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
95
97
|
component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
|
|
96
98
|
}),
|
|
97
99
|
createSurface({
|
|
98
|
-
id: `${
|
|
100
|
+
id: `${meta.id}/companion/object-settings`,
|
|
99
101
|
role: 'article',
|
|
100
102
|
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
101
103
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
102
104
|
}),
|
|
103
105
|
createSurface({
|
|
104
|
-
id: `${
|
|
106
|
+
id: `${meta.id}/space-settings-properties`,
|
|
105
107
|
role: 'article',
|
|
106
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
108
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/properties`,
|
|
107
109
|
component: () => {
|
|
108
110
|
const layout = useLayout();
|
|
109
111
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -116,10 +118,10 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
116
118
|
},
|
|
117
119
|
}),
|
|
118
120
|
createSurface({
|
|
119
|
-
id: `${
|
|
121
|
+
id: `${meta.id}/space-settings-members`,
|
|
120
122
|
role: 'article',
|
|
121
123
|
position: 'hoist',
|
|
122
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
124
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/members`,
|
|
123
125
|
component: () => {
|
|
124
126
|
const layout = useLayout();
|
|
125
127
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -132,9 +134,9 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
132
134
|
},
|
|
133
135
|
}),
|
|
134
136
|
createSurface({
|
|
135
|
-
id: `${
|
|
137
|
+
id: `${meta.id}/space-settings-schema`,
|
|
136
138
|
role: 'article',
|
|
137
|
-
filter: (data): data is { subject: string } => data.subject === `${
|
|
139
|
+
filter: (data): data is { subject: string } => data.subject === `${meta.id}/schema`,
|
|
138
140
|
component: () => {
|
|
139
141
|
const layout = useLayout();
|
|
140
142
|
const { spaceId } = parseId(layout.workspace);
|
|
@@ -146,6 +148,19 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
146
148
|
return <SchemaContainer space={space} />;
|
|
147
149
|
},
|
|
148
150
|
}),
|
|
151
|
+
createSurface({
|
|
152
|
+
id: `${meta.id}/selected-objects`,
|
|
153
|
+
role: 'article',
|
|
154
|
+
filter: (data): data is { companionTo: View.View; subject: 'selected-objects' } =>
|
|
155
|
+
Obj.instanceOf(View.View, data.companionTo) && data.subject === 'selected-objects',
|
|
156
|
+
component: ({ data }) => (
|
|
157
|
+
<ObjectDetailsPanel
|
|
158
|
+
key={Obj.getDXN(data.companionTo).toString()}
|
|
159
|
+
objectId={Obj.getDXN(data.companionTo).toString()}
|
|
160
|
+
view={data.companionTo}
|
|
161
|
+
/>
|
|
162
|
+
),
|
|
163
|
+
}),
|
|
149
164
|
createSurface({
|
|
150
165
|
id: JOIN_DIALOG,
|
|
151
166
|
role: 'dialog',
|
|
@@ -165,49 +180,53 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
165
180
|
component: ({ data }) => <CreateObjectDialog {...data.props} />,
|
|
166
181
|
}),
|
|
167
182
|
createSurface({
|
|
168
|
-
id: `${
|
|
183
|
+
id: `${meta.id}/create-initial-space-form-[hue]`,
|
|
169
184
|
role: 'form-input',
|
|
170
185
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
171
186
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, HueAnnotationId);
|
|
172
187
|
return !!annotation;
|
|
173
188
|
},
|
|
174
189
|
component: ({ data: _, ...inputProps }) => {
|
|
175
|
-
const { label,
|
|
190
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
176
191
|
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
177
192
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
178
193
|
return (
|
|
179
194
|
<Input.Root>
|
|
180
195
|
<Input.Label>{label}</Input.Label>
|
|
181
|
-
<HuePicker disabled={
|
|
196
|
+
<HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
182
197
|
</Input.Root>
|
|
183
198
|
);
|
|
184
199
|
},
|
|
185
200
|
}),
|
|
186
201
|
createSurface({
|
|
187
|
-
id: `${
|
|
202
|
+
id: `${meta.id}/create-initial-space-form-[icon]`,
|
|
188
203
|
role: 'form-input',
|
|
189
204
|
filter: (data): data is { prop: string; schema: Schema.Schema<any> } => {
|
|
190
205
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, IconAnnotationId);
|
|
191
206
|
return !!annotation;
|
|
192
207
|
},
|
|
193
208
|
component: ({ data: _, ...inputProps }) => {
|
|
194
|
-
const { label,
|
|
209
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
195
210
|
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
196
211
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
197
212
|
return (
|
|
198
213
|
<Input.Root>
|
|
199
214
|
<Input.Label>{label}</Input.Label>
|
|
200
|
-
<IconPicker disabled={
|
|
215
|
+
<IconPicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
201
216
|
</Input.Root>
|
|
202
217
|
);
|
|
203
218
|
},
|
|
204
219
|
}),
|
|
205
220
|
createSurface({
|
|
206
|
-
id: `${
|
|
221
|
+
id: `${meta.id}/typename-form-input`,
|
|
207
222
|
role: 'form-input',
|
|
208
223
|
filter: (
|
|
209
224
|
data,
|
|
210
|
-
): data is {
|
|
225
|
+
): data is {
|
|
226
|
+
prop: string;
|
|
227
|
+
schema: Schema.Schema<any>;
|
|
228
|
+
target: Space | Collection.Collection | undefined;
|
|
229
|
+
} => {
|
|
211
230
|
if (data.prop !== 'typename') {
|
|
212
231
|
return false;
|
|
213
232
|
}
|
|
@@ -216,85 +235,41 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
216
235
|
return !!annotation;
|
|
217
236
|
},
|
|
218
237
|
component: ({ data: { schema, target }, ...inputProps }) => {
|
|
219
|
-
const { t } = useTranslation();
|
|
220
|
-
const client = useClient();
|
|
221
238
|
const props = inputProps as any as InputProps;
|
|
222
239
|
const space = isSpace(target) ? target : getSpace(target);
|
|
223
|
-
if (!space) {
|
|
224
|
-
return null;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
240
|
const annotation = findAnnotation<TypenameAnnotation[]>(schema.ast, TypenameAnnotationId)!;
|
|
228
|
-
|
|
229
|
-
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
230
|
-
const whitelistedTypenames = useMemo(
|
|
231
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => type.typename))),
|
|
232
|
-
[schemaWhitelists],
|
|
233
|
-
);
|
|
234
|
-
|
|
235
|
-
const objectForms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
236
|
-
const objectFormTypenames = useMemo(
|
|
237
|
-
() =>
|
|
238
|
-
new Set(
|
|
239
|
-
objectForms
|
|
240
|
-
.map((form) => Type.getTypename(form.objectSchema))
|
|
241
|
-
// TODO(wittjosiah): Remove.
|
|
242
|
-
.filter((typename) => !OMIT.includes(typename)),
|
|
243
|
-
),
|
|
244
|
-
[objectForms],
|
|
245
|
-
);
|
|
246
|
-
|
|
247
|
-
const fixed = client.graph.schemaRegistry.schemas.filter((schema) => {
|
|
248
|
-
const limitedStatic =
|
|
249
|
-
annotation.includes('limited-static') && whitelistedTypenames.has(Type.getTypename(schema));
|
|
250
|
-
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
251
|
-
return annotation.includes('static') || limitedStatic || objectForm;
|
|
252
|
-
});
|
|
253
|
-
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
254
|
-
const typenames = Array.from(
|
|
255
|
-
new Set<string>([
|
|
256
|
-
...(annotation.includes('limited-static') ||
|
|
257
|
-
annotation.includes('static') ||
|
|
258
|
-
annotation.includes('object-form')
|
|
259
|
-
? fixed.map((schema) => Type.getTypename(schema))
|
|
260
|
-
: []),
|
|
261
|
-
...(annotation.includes('dynamic') ? dynamic.map((schema) => schema.typename) : []),
|
|
262
|
-
]),
|
|
263
|
-
).sort();
|
|
264
|
-
|
|
265
|
-
const options = useMemo(
|
|
266
|
-
() =>
|
|
267
|
-
typenames.map((typename) => ({
|
|
268
|
-
value: typename,
|
|
269
|
-
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
270
|
-
})),
|
|
271
|
-
[t, typenames],
|
|
272
|
-
);
|
|
241
|
+
const options = useTypeOptions({ space, annotation });
|
|
273
242
|
|
|
274
243
|
return <SelectInput {...props} options={options} />;
|
|
275
244
|
},
|
|
276
245
|
}),
|
|
277
246
|
createSurface({
|
|
278
|
-
id:
|
|
279
|
-
role: '
|
|
280
|
-
filter: (data): data is {
|
|
281
|
-
component: ({ data }) => <
|
|
247
|
+
id: `${meta.id}/object-settings`,
|
|
248
|
+
role: 'object-settings',
|
|
249
|
+
filter: (data): data is { subject: View.View } => Obj.instanceOf(View.View, data.subject),
|
|
250
|
+
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
251
|
+
}),
|
|
252
|
+
createSurface({
|
|
253
|
+
id: SPACE_RENAME_POPOVER,
|
|
254
|
+
role: 'card--popover',
|
|
255
|
+
filter: (data): data is { props: Space } => data.component === SPACE_RENAME_POPOVER && isSpace(data.props),
|
|
256
|
+
component: ({ data }) => <SpaceRenamePopover space={data.props} />,
|
|
282
257
|
}),
|
|
283
258
|
createSurface({
|
|
284
|
-
id:
|
|
285
|
-
role: 'popover',
|
|
259
|
+
id: OBJECT_RENAME_POPOVER,
|
|
260
|
+
role: 'card--popover',
|
|
286
261
|
filter: (data): data is { props: Obj.Any } =>
|
|
287
|
-
data.component ===
|
|
288
|
-
component: ({ data }) => <
|
|
262
|
+
data.component === OBJECT_RENAME_POPOVER && isLiveObject(data.props),
|
|
263
|
+
component: ({ data }) => <ObjectRenamePopover object={data.props} />,
|
|
289
264
|
}),
|
|
290
265
|
createSurface({
|
|
291
|
-
id: `${
|
|
266
|
+
id: `${meta.id}/menu-footer`,
|
|
292
267
|
role: 'menu-footer',
|
|
293
268
|
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
294
269
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
295
270
|
}),
|
|
296
271
|
createSurface({
|
|
297
|
-
id: `${
|
|
272
|
+
id: `${meta.id}/navtree-presence`,
|
|
298
273
|
role: 'navtree-item-end',
|
|
299
274
|
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
300
275
|
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
@@ -306,7 +281,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
306
281
|
}),
|
|
307
282
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
308
283
|
createSurface({
|
|
309
|
-
id: `${
|
|
284
|
+
id: `${meta.id}/navtree-presence-fallback`,
|
|
310
285
|
role: 'navtree-item-end',
|
|
311
286
|
position: 'fallback',
|
|
312
287
|
filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
|
|
@@ -314,13 +289,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
314
289
|
}),
|
|
315
290
|
// TODO(wittjosiah): Broken?
|
|
316
291
|
createSurface({
|
|
317
|
-
id: `${
|
|
292
|
+
id: `${meta.id}/navtree-sync-status`,
|
|
318
293
|
role: 'navtree-item-end',
|
|
319
294
|
filter: (data): data is { subject: Space; open?: boolean } => isSpace(data.subject),
|
|
320
295
|
component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,
|
|
321
296
|
}),
|
|
322
297
|
createSurface({
|
|
323
|
-
id: `${
|
|
298
|
+
id: `${meta.id}/navbar-presence`,
|
|
324
299
|
role: 'navbar-end',
|
|
325
300
|
position: 'hoist',
|
|
326
301
|
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
@@ -328,7 +303,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
328
303
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
329
304
|
const object = isSpace(data.subject)
|
|
330
305
|
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
331
|
-
? (space?.properties[
|
|
306
|
+
? (space?.properties[Collection.Collection.typename]?.target as Collection.Collection)
|
|
332
307
|
: undefined
|
|
333
308
|
: data.subject;
|
|
334
309
|
|
|
@@ -336,13 +311,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
336
311
|
},
|
|
337
312
|
}),
|
|
338
313
|
createSurface({
|
|
339
|
-
id: `${
|
|
314
|
+
id: `${meta.id}/collection-section`,
|
|
340
315
|
role: 'section',
|
|
341
|
-
filter: (data): data is { subject:
|
|
342
|
-
component: ({ data }) => <CollectionSection
|
|
316
|
+
filter: (data): data is { subject: Collection.Collection } => Obj.instanceOf(Collection.Collection, data.subject),
|
|
317
|
+
component: ({ data }) => <CollectionSection subject={data.subject} />,
|
|
343
318
|
}),
|
|
344
319
|
createSurface({
|
|
345
|
-
id: `${
|
|
320
|
+
id: `${meta.id}/status`,
|
|
346
321
|
role: 'status',
|
|
347
322
|
component: () => <SyncStatus />,
|
|
348
323
|
}),
|
|
@@ -2,14 +2,15 @@
|
|
|
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
|
-
const registry = context.getCapability(Capabilities.
|
|
13
|
+
const registry = context.getCapability(Capabilities.AtomRegistry);
|
|
13
14
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
14
15
|
|
|
15
16
|
// TODO(wittjosiah): Unregister schemas when they are disabled.
|
|
@@ -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,16 +14,20 @@ 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 {
|
|
17
|
+
import { SpaceState, parseId } 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
|
|
|
28
|
+
// E.g., dxn:echo:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
|
|
29
|
+
const ECHO_DXN_LENGTH = 3 + 1 + 4 + 1 + 33 + 1 + 26;
|
|
30
|
+
|
|
27
31
|
export default async (context: PluginContext) => {
|
|
28
32
|
const subscriptions = new SubscriptionList();
|
|
29
33
|
const spaceSubscriptions = new SubscriptionList();
|
|
@@ -66,12 +70,14 @@ export default async (context: PluginContext) => {
|
|
|
66
70
|
return;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
const
|
|
70
|
-
|
|
73
|
+
const id = active[0];
|
|
74
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
75
|
+
if (!node && id.length === ECHO_DXN_LENGTH) {
|
|
76
|
+
void graph.initialize(id);
|
|
71
77
|
const timeout = setTimeout(async () => {
|
|
72
|
-
const node = graph.getNode(
|
|
78
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
73
79
|
if (!node) {
|
|
74
|
-
await dispatch(createIntent(SpaceAction.WaitForObject, { id
|
|
80
|
+
await dispatch(createIntent(SpaceAction.WaitForObject, { id }));
|
|
75
81
|
}
|
|
76
82
|
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
77
83
|
|
|
@@ -114,7 +120,7 @@ export default async (context: PluginContext) => {
|
|
|
114
120
|
// Group parts by space for efficient messaging.
|
|
115
121
|
const idsBySpace = reduceGroupBy(active, (id) => {
|
|
116
122
|
try {
|
|
117
|
-
const
|
|
123
|
+
const { spaceId } = parseId(id);
|
|
118
124
|
return spaceId;
|
|
119
125
|
} catch {
|
|
120
126
|
return null;
|
|
@@ -123,7 +129,7 @@ export default async (context: PluginContext) => {
|
|
|
123
129
|
|
|
124
130
|
const removedBySpace = reduceGroupBy(inactive, (id) => {
|
|
125
131
|
try {
|
|
126
|
-
const
|
|
132
|
+
const { spaceId } = parseId(id);
|
|
127
133
|
return spaceId;
|
|
128
134
|
} catch {
|
|
129
135
|
return null;
|
|
@@ -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: {},
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { CheckCircle, CircleDashed, CircleNotch } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
+
import { useIntentDispatcher, useLayout } from '@dxos/app-framework/react';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
9
10
|
import { useClient } from '@dxos/react-client';
|
|
10
|
-
import { Filter,
|
|
11
|
-
import { Button, Toast, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
11
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { meta } from '../meta';
|
|
15
15
|
import { SpaceAction } from '../types';
|
|
16
16
|
|
|
17
|
-
const WAIT_FOR_OBJECT_TIMEOUT =
|
|
18
|
-
const TOAST_TIMEOUT =
|
|
17
|
+
const WAIT_FOR_OBJECT_TIMEOUT = 3 * 60 * 1_000;
|
|
18
|
+
const TOAST_TIMEOUT = 4 * 60 * 1_000;
|
|
19
19
|
|
|
20
20
|
export const AwaitingObject = ({ id }: { id: string }) => {
|
|
21
|
+
const { t } = useTranslation(meta.id);
|
|
22
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
21
23
|
const [open, setOpen] = useState(true);
|
|
22
24
|
const [waiting, setWaiting] = useState(true);
|
|
23
25
|
const [found, setFound] = useState(false);
|
|
24
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
25
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
26
26
|
const layout = useLayout();
|
|
27
27
|
|
|
28
28
|
const client = useClient();
|
|
@@ -33,17 +33,13 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const timeout = setTimeout(() =>
|
|
37
|
-
|
|
38
|
-
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
39
|
-
|
|
40
|
-
() => clearTimeout(timeout);
|
|
36
|
+
const timeout = setTimeout(() => setWaiting(false), WAIT_FOR_OBJECT_TIMEOUT);
|
|
37
|
+
return () => clearTimeout(timeout);
|
|
41
38
|
}, [id]);
|
|
42
39
|
|
|
43
40
|
useEffect(() => {
|
|
44
|
-
if (objects.findIndex((object) =>
|
|
41
|
+
if (objects.findIndex((object) => Obj.getDXN(object).toString() === id) > -1) {
|
|
45
42
|
setFound(true);
|
|
46
|
-
|
|
47
43
|
if (layout.active.includes(id)) {
|
|
48
44
|
setOpen(false);
|
|
49
45
|
}
|
|
@@ -66,17 +62,17 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
66
62
|
<Toast.Title classNames='flex items-center gap-2'>
|
|
67
63
|
{found ? (
|
|
68
64
|
<>
|
|
69
|
-
<
|
|
65
|
+
<Icon icon='ph--check-circle--regular' size={5} />
|
|
70
66
|
<span>{t('found object label')}</span>
|
|
71
67
|
</>
|
|
72
68
|
) : waiting ? (
|
|
73
69
|
<>
|
|
74
|
-
<
|
|
70
|
+
<Icon icon='ph--circle-notch--regular' size={5} classNames='animate-spin' />
|
|
75
71
|
<span>{t('waiting for object label')}</span>
|
|
76
72
|
</>
|
|
77
73
|
) : (
|
|
78
74
|
<>
|
|
79
|
-
<
|
|
75
|
+
<Icon icon='ph--circle-dashed--regular' size={5} />
|
|
80
76
|
<span>{t('object not found label')}</span>
|
|
81
77
|
</>
|
|
82
78
|
)}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
7
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
9
|
import { baseSurface, descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
|
-
import { type
|
|
10
|
+
import { type Collection } from '@dxos/schema';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
12
13
|
|
|
13
|
-
export const
|
|
14
|
-
const { t } = useTranslation(
|
|
14
|
+
export const CollectionArticle = ({ subject }: SurfaceComponentProps<Collection.Collection>) => {
|
|
15
|
+
const { t } = useTranslation(meta.id);
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
18
|
<div
|
|
@@ -23,8 +24,10 @@ export const CollectionMain = ({ collection }: { collection: DataType.Collection
|
|
|
23
24
|
role='alert'
|
|
24
25
|
className={mx(descriptionMessage, 'rounded-md p-8 font-normal text-lg max-is-[24rem] break-words')}
|
|
25
26
|
>
|
|
26
|
-
{
|
|
27
|
+
{subject.name ?? t('unnamed collection label')}
|
|
27
28
|
</p>
|
|
28
29
|
</div>
|
|
29
30
|
);
|
|
30
31
|
};
|
|
32
|
+
|
|
33
|
+
export default CollectionArticle;
|
|
@@ -4,17 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
7
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { type
|
|
9
|
+
import { type Collection } from '@dxos/schema';
|
|
9
10
|
|
|
10
|
-
import {
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
|
|
13
|
+
export const CollectionSection = ({ role, subject }: SurfaceComponentProps<Collection.Collection>) => {
|
|
14
|
+
const { t } = useTranslation(meta.id);
|
|
11
15
|
|
|
12
|
-
export const CollectionSection = ({ collection }: { collection: DataType.Collection }) => {
|
|
13
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
14
16
|
// TODO(wittjosiah): Better placeholder.
|
|
15
17
|
return (
|
|
16
|
-
<div className='min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center'>
|
|
17
|
-
<span className='truncate'>{
|
|
18
|
+
<div role={role} className='min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center'>
|
|
19
|
+
<span className='truncate'>{subject.name ?? t('unnamed collection label')}</span>
|
|
18
20
|
</div>
|
|
19
21
|
);
|
|
20
22
|
};
|