@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
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useInputSurfaceLookup,
|
|
3
|
-
usePath
|
|
4
|
-
|
|
3
|
+
usePath,
|
|
4
|
+
useTypeOptions
|
|
5
|
+
} from "./chunk-AFUOMLX6.mjs";
|
|
5
6
|
import {
|
|
6
7
|
SpaceCapabilities
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-K5J7ZB5P.mjs";
|
|
8
9
|
import {
|
|
9
10
|
COMPOSER_SPACE_LOCK,
|
|
10
11
|
getSpaceDisplayName
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KFUMADZF.mjs";
|
|
12
13
|
import {
|
|
13
14
|
SpaceAction,
|
|
14
15
|
SpaceForm
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZQMSGD5J.mjs";
|
|
16
17
|
import {
|
|
17
|
-
SPACE_PLUGIN,
|
|
18
18
|
meta
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VZBIIYFM.mjs";
|
|
20
20
|
|
|
21
21
|
// src/components/AwaitingObject.tsx
|
|
22
22
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
23
|
-
import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
|
|
24
23
|
import React, { useCallback, useEffect, useState } from "react";
|
|
25
|
-
import {
|
|
24
|
+
import { LayoutAction, createIntent } from "@dxos/app-framework";
|
|
25
|
+
import { useIntentDispatcher, useLayout } from "@dxos/app-framework/react";
|
|
26
|
+
import { Obj } from "@dxos/echo";
|
|
26
27
|
import { useClient } from "@dxos/react-client";
|
|
27
|
-
import { Filter,
|
|
28
|
-
import { Button, Toast, useTranslation } from "@dxos/react-ui";
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
var TOAST_TIMEOUT = 24e4;
|
|
28
|
+
import { Filter, useQuery } from "@dxos/react-client/echo";
|
|
29
|
+
import { Button, Icon, Toast, useTranslation } from "@dxos/react-ui";
|
|
30
|
+
var WAIT_FOR_OBJECT_TIMEOUT = 3 * 60 * 1e3;
|
|
31
|
+
var TOAST_TIMEOUT = 4 * 60 * 1e3;
|
|
32
32
|
var AwaitingObject = ({ id }) => {
|
|
33
33
|
var _effect = _useSignals();
|
|
34
34
|
try {
|
|
35
|
+
const { t } = useTranslation(meta.id);
|
|
36
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
35
37
|
const [open, setOpen] = useState(true);
|
|
36
38
|
const [waiting, setWaiting] = useState(true);
|
|
37
39
|
const [found, setFound] = useState(false);
|
|
38
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
39
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
40
40
|
const layout = useLayout();
|
|
41
41
|
const client = useClient();
|
|
42
42
|
const objects = useQuery(client.spaces, Filter.everything());
|
|
@@ -44,15 +44,13 @@ var AwaitingObject = ({ id }) => {
|
|
|
44
44
|
if (!id) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
const timeout = setTimeout(() =>
|
|
48
|
-
|
|
49
|
-
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
50
|
-
() => clearTimeout(timeout);
|
|
47
|
+
const timeout = setTimeout(() => setWaiting(false), WAIT_FOR_OBJECT_TIMEOUT);
|
|
48
|
+
return () => clearTimeout(timeout);
|
|
51
49
|
}, [
|
|
52
50
|
id
|
|
53
51
|
]);
|
|
54
52
|
useEffect(() => {
|
|
55
|
-
if (objects.findIndex((object) =>
|
|
53
|
+
if (objects.findIndex((object) => Obj.getDXN(object).toString() === id) > -1) {
|
|
56
54
|
setFound(true);
|
|
57
55
|
if (layout.active.includes(id)) {
|
|
58
56
|
setOpen(false);
|
|
@@ -87,12 +85,16 @@ var AwaitingObject = ({ id }) => {
|
|
|
87
85
|
onOpenChange: setOpen
|
|
88
86
|
}, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
|
|
89
87
|
classNames: "flex items-center gap-2"
|
|
90
|
-
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
}, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
89
|
+
icon: "ph--check-circle--regular",
|
|
90
|
+
size: 5
|
|
91
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
92
|
+
icon: "ph--circle-notch--regular",
|
|
93
|
+
size: 5,
|
|
94
|
+
classNames: "animate-spin"
|
|
95
|
+
}), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
96
|
+
icon: "ph--circle-dashed--regular",
|
|
97
|
+
size: 5
|
|
96
98
|
}), /* @__PURE__ */ React.createElement("span", null, t("object not found label")))), /* @__PURE__ */ React.createElement(Toast.Description, null, t(found ? "found object description" : waiting ? "waiting for object description" : "object not found description"))), /* @__PURE__ */ React.createElement(Toast.Actions, null, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Toast.Action, {
|
|
97
99
|
altText: t("go to object alt"),
|
|
98
100
|
asChild: true
|
|
@@ -119,34 +121,44 @@ var AwaitingObject = ({ id }) => {
|
|
|
119
121
|
|
|
120
122
|
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
121
123
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
122
|
-
import
|
|
124
|
+
import * as Effect from "effect/Effect";
|
|
125
|
+
import * as Function2 from "effect/Function";
|
|
123
126
|
import React3, { useCallback as useCallback3, useRef, useState as useState2 } from "react";
|
|
124
|
-
import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2
|
|
125
|
-
import {
|
|
127
|
+
import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2 } from "@dxos/app-framework";
|
|
128
|
+
import { useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework/react";
|
|
129
|
+
import { Obj as Obj2, Query, Type as Type2 } from "@dxos/echo";
|
|
126
130
|
import { invariant } from "@dxos/invariant";
|
|
127
131
|
import { useClient as useClient2 } from "@dxos/react-client";
|
|
128
132
|
import { getSpace, isLiveObject, isSpace, useQuery as useQuery2, useSpaces } from "@dxos/react-client/echo";
|
|
129
|
-
import {
|
|
133
|
+
import { Dialog, IconButton, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
130
134
|
import { cardDialogContent, cardDialogHeader } from "@dxos/react-ui-stack";
|
|
131
|
-
import {
|
|
135
|
+
import { Collection, StoredSchema, getTypenameFromQuery } from "@dxos/schema";
|
|
132
136
|
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
133
137
|
|
|
134
138
|
// src/components/CreateDialog/CreateObjectPanel.tsx
|
|
135
139
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
140
|
+
import * as Option from "effect/Option";
|
|
136
141
|
import React2, { useCallback as useCallback2 } from "react";
|
|
137
142
|
import { Type } from "@dxos/echo";
|
|
138
|
-
import { getTypeAnnotation } from "@dxos/echo
|
|
139
|
-
import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
143
|
+
import { ViewAnnotation, getTypeAnnotation } from "@dxos/echo/internal";
|
|
144
|
+
import { Icon as Icon2, toLocalizedString, useDefaultValue, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
140
145
|
import { Form } from "@dxos/react-ui-form";
|
|
141
146
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
142
147
|
import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
|
|
143
148
|
import { isNonNullable } from "@dxos/util";
|
|
144
|
-
var CreateObjectPanel = ({ forms, spaces, typename, target,
|
|
149
|
+
var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormValues: _initialFormValues, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
|
|
145
150
|
var _effect = _useSignals2();
|
|
146
151
|
try {
|
|
147
|
-
const { t } = useTranslation2(
|
|
152
|
+
const { t } = useTranslation2(meta.id);
|
|
153
|
+
const initialFormValues = useDefaultValue(_initialFormValues, () => ({}));
|
|
148
154
|
const form = forms.find((form2) => Type.getTypename(form2.objectSchema) === typename);
|
|
149
|
-
const options = forms.
|
|
155
|
+
const options = forms.filter((form2) => {
|
|
156
|
+
if (views == null) {
|
|
157
|
+
return true;
|
|
158
|
+
} else {
|
|
159
|
+
return views === ViewAnnotation.get(form2.objectSchema).pipe(Option.getOrElse(() => false));
|
|
160
|
+
}
|
|
161
|
+
}).map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
|
|
150
162
|
const nameA = t("typename label", {
|
|
151
163
|
ns: a.typename,
|
|
152
164
|
defaultValue: a.typename
|
|
@@ -198,9 +210,7 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, name: initialName, d
|
|
|
198
210
|
className: cardDialogOverflow
|
|
199
211
|
}, /* @__PURE__ */ React2.createElement(Form, {
|
|
200
212
|
autoFocus: true,
|
|
201
|
-
values:
|
|
202
|
-
name: initialName
|
|
203
|
-
},
|
|
213
|
+
values: initialFormValues,
|
|
204
214
|
schema: form.formSchema,
|
|
205
215
|
testId: "create-object-form",
|
|
206
216
|
onSave: handleCreateObject,
|
|
@@ -214,7 +224,7 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, name: initialName, d
|
|
|
214
224
|
var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
215
225
|
var _effect = _useSignals2();
|
|
216
226
|
try {
|
|
217
|
-
const { t } = useTranslation2(
|
|
227
|
+
const { t } = useTranslation2(meta.id);
|
|
218
228
|
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
219
229
|
label: t("space input label"),
|
|
220
230
|
classNames: cardDialogSearchListRoot
|
|
@@ -254,7 +264,7 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
|
254
264
|
var SelectSchema = ({ options, resolve, onChange }) => {
|
|
255
265
|
var _effect = _useSignals2();
|
|
256
266
|
try {
|
|
257
|
-
const { t } = useTranslation2(
|
|
267
|
+
const { t } = useTranslation2(meta.id);
|
|
258
268
|
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
259
269
|
label: t("schema input label"),
|
|
260
270
|
classNames: cardDialogSearchListRoot
|
|
@@ -274,7 +284,7 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
274
284
|
classNames: "flex items-center gap-2"
|
|
275
285
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
276
286
|
className: "flex gap-2 items-center grow truncate"
|
|
277
|
-
}, /* @__PURE__ */ React2.createElement(
|
|
287
|
+
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
278
288
|
icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
|
|
279
289
|
size: 5
|
|
280
290
|
}), t("typename label", {
|
|
@@ -286,42 +296,28 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
286
296
|
}
|
|
287
297
|
};
|
|
288
298
|
|
|
289
|
-
// src/capabilities/index.ts
|
|
290
|
-
import { lazy } from "@dxos/app-framework";
|
|
291
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-PMDF6PJV.mjs"));
|
|
292
|
-
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-UKYMBX4O.mjs"));
|
|
293
|
-
var IdentityCreated = lazy(() => import("./identity-created-23XJJV2N.mjs"));
|
|
294
|
-
var IntentResolver = lazy(() => import("./intent-resolver-WK5WYFH3.mjs"));
|
|
295
|
-
var ReactRoot = lazy(() => import("./react-root-7S6FIC5G.mjs"));
|
|
296
|
-
var ReactSurface = lazy(() => import("./react-surface-6C3YJNDK.mjs"));
|
|
297
|
-
var SchemaDefs = lazy(() => import("./schema-defs-K3B3OAH4.mjs"));
|
|
298
|
-
var SchemaTools = lazy(() => import("./schema-tools-BNP4JTD7.mjs"));
|
|
299
|
-
var SpaceSettings = lazy(() => import("./settings-XNWYRWNM.mjs"));
|
|
300
|
-
var SpaceState = lazy(() => import("./state-522XTUR4.mjs"));
|
|
301
|
-
var SpacesReady = lazy(() => import("./spaces-ready-K7NSNBHM.mjs"));
|
|
302
|
-
|
|
303
299
|
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
304
300
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
305
|
-
var CREATE_OBJECT_DIALOG = `${
|
|
306
|
-
var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename,
|
|
301
|
+
var CREATE_OBJECT_DIALOG = `${meta.id}/CreateObjectDialog`;
|
|
302
|
+
var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, views, initialFormValues, onCreateObject, shouldNavigate: _shouldNavigate }) => {
|
|
307
303
|
var _effect = _useSignals3();
|
|
308
304
|
try {
|
|
309
|
-
const closeRef = useRef(null);
|
|
310
305
|
const manager = usePluginManager();
|
|
311
|
-
const { t } = useTranslation3(
|
|
312
|
-
const
|
|
313
|
-
const spaces = useSpaces();
|
|
314
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
306
|
+
const { t } = useTranslation3(meta.id);
|
|
307
|
+
const { dispatch } = useIntentDispatcher2();
|
|
315
308
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
316
309
|
const [target, setTarget] = useState2(initialTarget);
|
|
317
310
|
const [typename, setTypename] = useState2(initialTypename);
|
|
311
|
+
const client = useClient2();
|
|
312
|
+
const spaces = useSpaces();
|
|
318
313
|
const space = isSpace(target) ? target : getSpace(target);
|
|
319
|
-
const queryCollections = useQuery2(space, Query.type(
|
|
320
|
-
const hiddenTypenames = queryCollections.map((collection) => collection.query
|
|
314
|
+
const queryCollections = useQuery2(space, Query.type(Collection.QueryCollection));
|
|
315
|
+
const hiddenTypenames = queryCollections.map((collection) => getTypenameFromQuery(collection.query)).filter(isNonNullable2);
|
|
316
|
+
const closeRef = useRef(null);
|
|
321
317
|
const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
|
|
322
318
|
manager
|
|
323
319
|
]);
|
|
324
|
-
const handleCreateObject = useCallback3(
|
|
320
|
+
const handleCreateObject = useCallback3(({ form, data = {} }) => Effect.gen(function* () {
|
|
325
321
|
if (!target) {
|
|
326
322
|
return;
|
|
327
323
|
}
|
|
@@ -329,18 +325,17 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
329
325
|
const space2 = isSpace(target) ? target : getSpace(target);
|
|
330
326
|
invariant(space2, "Missing space", {
|
|
331
327
|
F: __dxlog_file,
|
|
332
|
-
L:
|
|
333
|
-
S:
|
|
328
|
+
L: 77,
|
|
329
|
+
S: this,
|
|
334
330
|
A: [
|
|
335
331
|
"space",
|
|
336
332
|
"'Missing space'"
|
|
337
333
|
]
|
|
338
334
|
});
|
|
339
|
-
const
|
|
335
|
+
const { object } = yield* dispatch(form.getIntent(data, {
|
|
340
336
|
space: space2
|
|
341
337
|
}));
|
|
342
|
-
|
|
343
|
-
if (isLiveObject(object)) {
|
|
338
|
+
if (isLiveObject(object) && !Obj2.instanceOf(StoredSchema, object)) {
|
|
344
339
|
const hidden = form.hidden || hiddenTypenames.includes(Type2.getTypename(form.objectSchema));
|
|
345
340
|
const addObjectIntent = createIntent2(SpaceAction.AddObject, {
|
|
346
341
|
target,
|
|
@@ -349,14 +344,15 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
349
344
|
});
|
|
350
345
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
351
346
|
if (shouldNavigate(object)) {
|
|
352
|
-
|
|
347
|
+
yield* dispatch(Function2.pipe(addObjectIntent, chain(LayoutAction2.Open, {
|
|
353
348
|
part: "main"
|
|
354
349
|
})));
|
|
355
350
|
} else {
|
|
356
|
-
|
|
351
|
+
yield* dispatch(addObjectIntent);
|
|
357
352
|
}
|
|
353
|
+
onCreateObject?.(object);
|
|
358
354
|
}
|
|
359
|
-
}, [
|
|
355
|
+
}).pipe(Effect.runPromise), [
|
|
360
356
|
dispatch,
|
|
361
357
|
target,
|
|
362
358
|
resolve,
|
|
@@ -374,24 +370,26 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
374
370
|
}, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title", {
|
|
375
371
|
object: t("typename label", {
|
|
376
372
|
ns: typename,
|
|
377
|
-
defaultValue: "Item"
|
|
373
|
+
defaultValue: views ? "View" : "Item"
|
|
378
374
|
})
|
|
379
375
|
})), /* @__PURE__ */ React3.createElement(Dialog.Close, {
|
|
380
376
|
asChild: true
|
|
381
|
-
}, /* @__PURE__ */ React3.createElement(
|
|
377
|
+
}, /* @__PURE__ */ React3.createElement(IconButton, {
|
|
382
378
|
ref: closeRef,
|
|
379
|
+
icon: "ph--x--regular",
|
|
380
|
+
size: 4,
|
|
381
|
+
label: "Close",
|
|
382
|
+
iconOnly: true,
|
|
383
383
|
density: "fine",
|
|
384
384
|
variant: "ghost",
|
|
385
385
|
autoFocus: true
|
|
386
|
-
}, /* @__PURE__ */ React3.createElement(
|
|
387
|
-
icon: "ph--x--regular",
|
|
388
|
-
size: 4
|
|
389
|
-
})))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
386
|
+
}))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
390
387
|
forms,
|
|
391
388
|
spaces,
|
|
392
389
|
target,
|
|
390
|
+
views,
|
|
393
391
|
typename,
|
|
394
|
-
|
|
392
|
+
initialFormValues,
|
|
395
393
|
defaultSpaceId: client.spaces.default.id,
|
|
396
394
|
resolve,
|
|
397
395
|
onTargetChange: setTarget,
|
|
@@ -406,13 +404,14 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
|
|
|
406
404
|
|
|
407
405
|
// src/components/CreateDialog/CreateSpaceDialog.tsx
|
|
408
406
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
409
|
-
import
|
|
407
|
+
import * as Effect2 from "effect/Effect";
|
|
410
408
|
import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
|
|
411
|
-
import {
|
|
412
|
-
import {
|
|
409
|
+
import { LayoutAction as LayoutAction3, createIntent as createIntent3 } from "@dxos/app-framework";
|
|
410
|
+
import { useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework/react";
|
|
411
|
+
import { Dialog as Dialog2, IconButton as IconButton2, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
413
412
|
import { Form as Form2 } from "@dxos/react-ui-form";
|
|
414
413
|
import { cardDialogContent as cardDialogContent2, cardDialogHeader as cardDialogHeader2 } from "@dxos/react-ui-stack";
|
|
415
|
-
var CREATE_SPACE_DIALOG = `${
|
|
414
|
+
var CREATE_SPACE_DIALOG = `${meta.id}/CreateSpaceDialog`;
|
|
416
415
|
var initialValues = {
|
|
417
416
|
edgeReplication: true
|
|
418
417
|
};
|
|
@@ -420,11 +419,11 @@ var CreateSpaceDialog = () => {
|
|
|
420
419
|
var _effect = _useSignals4();
|
|
421
420
|
try {
|
|
422
421
|
const closeRef = useRef2(null);
|
|
423
|
-
const { t } = useTranslation4(
|
|
422
|
+
const { t } = useTranslation4(meta.id);
|
|
424
423
|
const { dispatch } = useIntentDispatcher3();
|
|
425
424
|
const inputSurfaceLookup = useInputSurfaceLookup();
|
|
426
425
|
const handleCreateSpace = useCallback4(async (data) => {
|
|
427
|
-
const program =
|
|
426
|
+
const program = Effect2.gen(function* () {
|
|
428
427
|
const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
|
|
429
428
|
yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
|
|
430
429
|
part: "workspace",
|
|
@@ -437,7 +436,7 @@ var CreateSpaceDialog = () => {
|
|
|
437
436
|
}
|
|
438
437
|
}));
|
|
439
438
|
});
|
|
440
|
-
await
|
|
439
|
+
await Effect2.runPromise(program);
|
|
441
440
|
}, [
|
|
442
441
|
dispatch
|
|
443
442
|
]);
|
|
@@ -451,15 +450,16 @@ var CreateSpaceDialog = () => {
|
|
|
451
450
|
className: cardDialogHeader2
|
|
452
451
|
}, /* @__PURE__ */ React4.createElement(Dialog2.Title, null, t("create space dialog title")), /* @__PURE__ */ React4.createElement(Dialog2.Close, {
|
|
453
452
|
asChild: true
|
|
454
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
453
|
+
}, /* @__PURE__ */ React4.createElement(IconButton2, {
|
|
455
454
|
ref: closeRef,
|
|
455
|
+
icon: "ph--x--regular",
|
|
456
|
+
size: 4,
|
|
457
|
+
label: "Close",
|
|
458
|
+
iconOnly: true,
|
|
456
459
|
density: "fine",
|
|
457
460
|
variant: "ghost",
|
|
458
461
|
autoFocus: true
|
|
459
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
460
|
-
icon: "ph--x--regular",
|
|
461
|
-
size: 4
|
|
462
|
-
})))), /* @__PURE__ */ React4.createElement("div", {
|
|
462
|
+
}))), /* @__PURE__ */ React4.createElement("div", {
|
|
463
463
|
role: "none",
|
|
464
464
|
className: "contents"
|
|
465
465
|
}, /* @__PURE__ */ React4.createElement(Form2, {
|
|
@@ -477,63 +477,43 @@ var CreateSpaceDialog = () => {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
|
|
480
|
-
// src/components/
|
|
480
|
+
// src/components/CollectionSection.tsx
|
|
481
481
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
482
482
|
import React5 from "react";
|
|
483
483
|
import { useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
484
|
-
|
|
485
|
-
var CollectionMain = ({ collection }) => {
|
|
484
|
+
var CollectionSection = ({ role, subject }) => {
|
|
486
485
|
var _effect = _useSignals5();
|
|
487
486
|
try {
|
|
488
|
-
const { t } = useTranslation5(
|
|
487
|
+
const { t } = useTranslation5(meta.id);
|
|
489
488
|
return /* @__PURE__ */ React5.createElement("div", {
|
|
490
|
-
role
|
|
491
|
-
className: mx2(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
|
|
492
|
-
"data-testid": "composer.firstRunMessage"
|
|
493
|
-
}, /* @__PURE__ */ React5.createElement("p", {
|
|
494
|
-
role: "alert",
|
|
495
|
-
className: mx2(descriptionMessage, "rounded-md p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
496
|
-
}, collection.name ?? t("unnamed collection label")));
|
|
497
|
-
} finally {
|
|
498
|
-
_effect.f();
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
// src/components/CollectionSection.tsx
|
|
503
|
-
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
504
|
-
import React6 from "react";
|
|
505
|
-
import { useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
506
|
-
var CollectionSection = ({ collection }) => {
|
|
507
|
-
var _effect = _useSignals6();
|
|
508
|
-
try {
|
|
509
|
-
const { t } = useTranslation6(SPACE_PLUGIN);
|
|
510
|
-
return /* @__PURE__ */ React6.createElement("div", {
|
|
489
|
+
role,
|
|
511
490
|
className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
|
|
512
|
-
}, /* @__PURE__ */
|
|
491
|
+
}, /* @__PURE__ */ React5.createElement("span", {
|
|
513
492
|
className: "truncate"
|
|
514
|
-
},
|
|
493
|
+
}, subject.name ?? t("unnamed collection label")));
|
|
515
494
|
} finally {
|
|
516
495
|
_effect.f();
|
|
517
496
|
}
|
|
518
497
|
};
|
|
519
498
|
|
|
520
|
-
// src/components/JoinDialog.tsx
|
|
521
|
-
import { useSignals as
|
|
522
|
-
import
|
|
523
|
-
import {
|
|
499
|
+
// src/components/JoinDialog/JoinDialog.tsx
|
|
500
|
+
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
501
|
+
import React6, { useCallback as useCallback5 } from "react";
|
|
502
|
+
import { LayoutAction as LayoutAction4, createIntent as createIntent4 } from "@dxos/app-framework";
|
|
503
|
+
import { useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework/react";
|
|
524
504
|
import { Trigger } from "@dxos/async";
|
|
525
505
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
526
506
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
527
|
-
import { Dialog as Dialog3, useTranslation as
|
|
507
|
+
import { Dialog as Dialog3, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
528
508
|
import { JoinPanel } from "@dxos/shell/react";
|
|
529
|
-
var JOIN_DIALOG = `${
|
|
509
|
+
var JOIN_DIALOG = `${meta.id}/JoinDialog`;
|
|
530
510
|
var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
531
|
-
var _effect =
|
|
511
|
+
var _effect = _useSignals6();
|
|
532
512
|
try {
|
|
533
513
|
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
534
514
|
const client = useClient3();
|
|
535
515
|
const { graph } = useAppGraph();
|
|
536
|
-
const { t } =
|
|
516
|
+
const { t } = useTranslation6(meta.id);
|
|
537
517
|
const handleDone = useCallback5(async (result) => {
|
|
538
518
|
const spaceKey = result?.spaceKey;
|
|
539
519
|
if (!spaceKey) {
|
|
@@ -543,18 +523,18 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
543
523
|
dispatch(createIntent4(LayoutAction4.AddToast, {
|
|
544
524
|
part: "toast",
|
|
545
525
|
subject: {
|
|
546
|
-
id: `${
|
|
526
|
+
id: `${meta.id}/join-success`,
|
|
547
527
|
duration: 5e3,
|
|
548
528
|
title: [
|
|
549
529
|
"join success label",
|
|
550
530
|
{
|
|
551
|
-
ns:
|
|
531
|
+
ns: meta.id
|
|
552
532
|
}
|
|
553
533
|
],
|
|
554
534
|
closeLabel: [
|
|
555
535
|
"dismiss label",
|
|
556
536
|
{
|
|
557
|
-
ns:
|
|
537
|
+
ns: meta.id
|
|
558
538
|
}
|
|
559
539
|
]
|
|
560
540
|
}
|
|
@@ -614,16 +594,16 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
614
594
|
client,
|
|
615
595
|
graph
|
|
616
596
|
]);
|
|
617
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ React6.createElement(Dialog3.Content, null, /* @__PURE__ */ React6.createElement(Dialog3.Title, {
|
|
618
598
|
classNames: "sr-only"
|
|
619
599
|
}, t("join space label", {
|
|
620
600
|
ns: "os"
|
|
621
|
-
})), /* @__PURE__ */
|
|
601
|
+
})), /* @__PURE__ */ React6.createElement(JoinPanel, {
|
|
622
602
|
...props,
|
|
623
|
-
exitActionParent: /* @__PURE__ */
|
|
603
|
+
exitActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
|
|
624
604
|
asChild: true
|
|
625
605
|
}),
|
|
626
|
-
doneActionParent: /* @__PURE__ */
|
|
606
|
+
doneActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
|
|
627
607
|
asChild: true
|
|
628
608
|
}),
|
|
629
609
|
onDone: handleDone
|
|
@@ -633,24 +613,24 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
633
613
|
}
|
|
634
614
|
};
|
|
635
615
|
|
|
636
|
-
// src/components/MembersContainer.tsx
|
|
637
|
-
import { useSignals as
|
|
638
|
-
import {
|
|
639
|
-
import React8, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
|
|
616
|
+
// src/components/MembersContainer/MembersContainer.tsx
|
|
617
|
+
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
618
|
+
import React7, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
|
|
640
619
|
import { QR } from "react-qr-rounded";
|
|
641
|
-
import { createIntent as createIntent5
|
|
620
|
+
import { createIntent as createIntent5 } from "@dxos/app-framework";
|
|
621
|
+
import { useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework/react";
|
|
622
|
+
import { Obj as Obj3 } from "@dxos/echo";
|
|
642
623
|
import { log } from "@dxos/log";
|
|
643
624
|
import { useConfig } from "@dxos/react-client";
|
|
644
|
-
import {
|
|
625
|
+
import { useSpaceInvitations } from "@dxos/react-client/echo";
|
|
645
626
|
import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
|
|
646
|
-
import { Button as
|
|
647
|
-
import {
|
|
627
|
+
import { Button as Button2, Clipboard, Icon as Icon3, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
628
|
+
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
648
629
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
649
|
-
import {
|
|
650
|
-
import { DataType as DataType2 } from "@dxos/schema";
|
|
630
|
+
import { Collection as Collection2 } from "@dxos/schema";
|
|
651
631
|
import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
|
|
652
632
|
import { hexToEmoji } from "@dxos/util";
|
|
653
|
-
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer.tsx";
|
|
633
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/MembersContainer/MembersContainer.tsx";
|
|
654
634
|
var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
655
635
|
var handleInvitationEvent = (invitation, subscription) => {
|
|
656
636
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
@@ -668,9 +648,9 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
668
648
|
}
|
|
669
649
|
};
|
|
670
650
|
var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
671
|
-
var _effect =
|
|
651
|
+
var _effect = _useSignals7();
|
|
672
652
|
try {
|
|
673
|
-
const { t } =
|
|
653
|
+
const { t } = useTranslation7(meta.id);
|
|
674
654
|
const config = useConfig();
|
|
675
655
|
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
676
656
|
const invitations = useSpaceInvitations(space.key);
|
|
@@ -682,7 +662,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
682
662
|
setInternalActiveAction(nextAction);
|
|
683
663
|
localStorage.setItem(activeActionKey, nextAction);
|
|
684
664
|
};
|
|
685
|
-
const target = space.properties[
|
|
665
|
+
const target = space.properties[Collection2.Collection.typename]?.target?.objects[0]?.target;
|
|
686
666
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
687
667
|
const handleChangeLocked = useCallback6(() => {
|
|
688
668
|
space.properties[COMPOSER_SPACE_LOCK] = !locked;
|
|
@@ -698,10 +678,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
698
678
|
description: t("invite one description", {
|
|
699
679
|
ns: "os"
|
|
700
680
|
}),
|
|
701
|
-
icon:
|
|
702
|
-
icon: "ph--user-plus--regular",
|
|
703
|
-
size: 5
|
|
704
|
-
}),
|
|
681
|
+
icon: "ph--user-plus--regular",
|
|
705
682
|
testId: "membersContainer.inviteOne",
|
|
706
683
|
onClick: async () => {
|
|
707
684
|
const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
|
|
@@ -709,7 +686,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
709
686
|
type: Invitation.Type.INTERACTIVE,
|
|
710
687
|
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
711
688
|
multiUse: false,
|
|
712
|
-
target: target &&
|
|
689
|
+
target: target && Obj3.getDXN(target).toString()
|
|
713
690
|
}));
|
|
714
691
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
715
692
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
@@ -723,10 +700,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
723
700
|
description: t("invite many description", {
|
|
724
701
|
ns: "os"
|
|
725
702
|
}),
|
|
726
|
-
icon:
|
|
727
|
-
icon: "ph--users-three--regular",
|
|
728
|
-
size: 5
|
|
729
|
-
}),
|
|
703
|
+
icon: "ph--users-three--regular",
|
|
730
704
|
testId: "membersContainer.inviteMany",
|
|
731
705
|
onClick: async () => {
|
|
732
706
|
const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
|
|
@@ -734,7 +708,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
734
708
|
type: Invitation.Type.DELEGATED,
|
|
735
709
|
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
736
710
|
multiUse: true,
|
|
737
|
-
target: target &&
|
|
711
|
+
target: target && Obj3.getDXN(target).toString()
|
|
738
712
|
}));
|
|
739
713
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
740
714
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
@@ -753,44 +727,44 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
753
727
|
const handleBack = () => {
|
|
754
728
|
setSelectedInvitation(null);
|
|
755
729
|
};
|
|
756
|
-
return /* @__PURE__ */
|
|
757
|
-
|
|
758
|
-
}, /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(StackItem.Content, {
|
|
731
|
+
scrollable: true
|
|
732
|
+
}, /* @__PURE__ */ React7.createElement(ControlPage, null, /* @__PURE__ */ React7.createElement(ControlSection, {
|
|
759
733
|
title: t("members verbose label"),
|
|
760
734
|
description: t("members description")
|
|
761
|
-
}, /* @__PURE__ */
|
|
735
|
+
}, /* @__PURE__ */ React7.createElement(ControlFrame, null, /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
762
736
|
title: t("members label")
|
|
763
|
-
}, /* @__PURE__ */
|
|
737
|
+
}, /* @__PURE__ */ React7.createElement(SpaceMemberList, {
|
|
764
738
|
spaceKey: space.key,
|
|
765
739
|
includeSelf: true
|
|
766
|
-
})), locked && /* @__PURE__ */
|
|
740
|
+
})), locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
767
741
|
title: t("invitations label")
|
|
768
|
-
}, /* @__PURE__ */
|
|
742
|
+
}, /* @__PURE__ */ React7.createElement("p", {
|
|
769
743
|
className: "text-description mbe-2"
|
|
770
|
-
}, t("locked space description"))), !locked && /* @__PURE__ */
|
|
744
|
+
}, t("locked space description"))), !locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
|
|
771
745
|
title: t("invitations label")
|
|
772
|
-
}, selectedInvitation && /* @__PURE__ */
|
|
746
|
+
}, selectedInvitation && /* @__PURE__ */ React7.createElement(InvitationSection, {
|
|
773
747
|
...selectedInvitation,
|
|
774
748
|
onBack: handleBack
|
|
775
|
-
}), !selectedInvitation && /* @__PURE__ */
|
|
749
|
+
}), !selectedInvitation && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
776
750
|
className: "text-description mbe-2"
|
|
777
|
-
}, t("space invitation description")), /* @__PURE__ */
|
|
751
|
+
}, t("space invitation description")), /* @__PURE__ */ React7.createElement(InvitationList, {
|
|
778
752
|
className: "mb-2",
|
|
779
753
|
send: handleSend,
|
|
780
754
|
invitations: visibleInvitations ?? [],
|
|
781
755
|
onClickRemove: (invitation) => invitation.cancel(),
|
|
782
756
|
createInvitationUrl
|
|
783
|
-
}), /* @__PURE__ */
|
|
757
|
+
}), /* @__PURE__ */ React7.createElement(BifurcatedAction, {
|
|
784
758
|
actions: inviteActions,
|
|
785
759
|
activeAction,
|
|
786
760
|
onChangeActiveAction: setActiveAction,
|
|
787
761
|
"data-testid": "membersContainer.createInvitation"
|
|
788
|
-
})))), /* @__PURE__ */
|
|
789
|
-
className: "justify-center
|
|
790
|
-
}, /* @__PURE__ */
|
|
762
|
+
})))), /* @__PURE__ */ React7.createElement("div", {
|
|
763
|
+
className: "justify-center p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
764
|
+
}, /* @__PURE__ */ React7.createElement(ControlItemInput, {
|
|
791
765
|
title: t("space locked label"),
|
|
792
766
|
description: t("space locked description")
|
|
793
|
-
}, /* @__PURE__ */
|
|
767
|
+
}, /* @__PURE__ */ React7.createElement(Input.Switch, {
|
|
794
768
|
checked: locked,
|
|
795
769
|
onCheckedChange: handleChangeLocked,
|
|
796
770
|
classNames: "justify-self-end"
|
|
@@ -800,26 +774,26 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
800
774
|
}
|
|
801
775
|
};
|
|
802
776
|
var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
|
|
803
|
-
var _effect =
|
|
777
|
+
var _effect = _useSignals7();
|
|
804
778
|
try {
|
|
805
779
|
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
806
|
-
return /* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ React7.createElement(Viewport.Root, {
|
|
807
781
|
activeView
|
|
808
|
-
}, /* @__PURE__ */
|
|
782
|
+
}, /* @__PURE__ */ React7.createElement(Viewport.Views, null, /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
809
783
|
id: "init"
|
|
810
|
-
}), /* @__PURE__ */
|
|
784
|
+
}), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
811
785
|
id: "complete"
|
|
812
|
-
}, /* @__PURE__ */
|
|
786
|
+
}, /* @__PURE__ */ React7.createElement(InvitationComplete, {
|
|
813
787
|
statusValue: state
|
|
814
|
-
})), /* @__PURE__ */
|
|
788
|
+
})), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
815
789
|
id: "auth-code"
|
|
816
|
-
}, /* @__PURE__ */
|
|
790
|
+
}, /* @__PURE__ */ React7.createElement(InvitationAuthCode, {
|
|
817
791
|
id: invitationId,
|
|
818
792
|
code: authCode ?? "never",
|
|
819
793
|
onCancel: onBack
|
|
820
|
-
})), /* @__PURE__ */
|
|
794
|
+
})), /* @__PURE__ */ React7.createElement(Viewport.View, {
|
|
821
795
|
id: "qr-code"
|
|
822
|
-
}, /* @__PURE__ */
|
|
796
|
+
}, /* @__PURE__ */ React7.createElement(InvitationQR, {
|
|
823
797
|
id: invitationId,
|
|
824
798
|
url,
|
|
825
799
|
onCancel: onBack
|
|
@@ -829,36 +803,36 @@ var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId
|
|
|
829
803
|
}
|
|
830
804
|
};
|
|
831
805
|
var InvitationQR = ({ id, url, onCancel }) => {
|
|
832
|
-
var _effect =
|
|
806
|
+
var _effect = _useSignals7();
|
|
833
807
|
try {
|
|
834
|
-
const { t } =
|
|
808
|
+
const { t } = useTranslation7("os");
|
|
835
809
|
const qrLabel = useId("members-container__qr-code");
|
|
836
810
|
const emoji = hexToEmoji(id);
|
|
837
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
838
812
|
className: "text-description"
|
|
839
813
|
}, t("qr code description", {
|
|
840
|
-
ns:
|
|
841
|
-
})), /* @__PURE__ */
|
|
814
|
+
ns: meta.id
|
|
815
|
+
})), /* @__PURE__ */ React7.createElement("div", {
|
|
842
816
|
role: "group",
|
|
843
817
|
className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
|
|
844
|
-
}, /* @__PURE__ */
|
|
818
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
845
819
|
role: "none",
|
|
846
820
|
className: "is-full aspect-square relative text-description"
|
|
847
|
-
}, /* @__PURE__ */
|
|
821
|
+
}, /* @__PURE__ */ React7.createElement(QR, {
|
|
848
822
|
rounding: 100,
|
|
849
823
|
backgroundColor: "transparent",
|
|
850
824
|
color: "currentColor",
|
|
851
825
|
"aria-labelledby": qrLabel,
|
|
852
826
|
errorCorrectionLevel: "Q",
|
|
853
827
|
cutout: true
|
|
854
|
-
}, url ?? "never"), /* @__PURE__ */
|
|
828
|
+
}, url ?? "never"), /* @__PURE__ */ React7.createElement(Centered, null, /* @__PURE__ */ React7.createElement(Emoji, {
|
|
855
829
|
text: emoji
|
|
856
|
-
}))), /* @__PURE__ */
|
|
830
|
+
}))), /* @__PURE__ */ React7.createElement("span", {
|
|
857
831
|
id: qrLabel,
|
|
858
832
|
className: "sr-only"
|
|
859
|
-
}, t("qr label")), /* @__PURE__ */
|
|
833
|
+
}, t("qr label")), /* @__PURE__ */ React7.createElement(Clipboard.Button, {
|
|
860
834
|
value: url ?? "never"
|
|
861
|
-
})), /* @__PURE__ */
|
|
835
|
+
})), /* @__PURE__ */ React7.createElement(Button2, {
|
|
862
836
|
variant: "ghost",
|
|
863
837
|
onClick: onCancel
|
|
864
838
|
}, t("cancel label")));
|
|
@@ -867,22 +841,22 @@ var InvitationQR = ({ id, url, onCancel }) => {
|
|
|
867
841
|
}
|
|
868
842
|
};
|
|
869
843
|
var InvitationAuthCode = ({ id, code, onCancel }) => {
|
|
870
|
-
var _effect =
|
|
844
|
+
var _effect = _useSignals7();
|
|
871
845
|
try {
|
|
872
|
-
const { t } =
|
|
846
|
+
const { t } = useTranslation7("os");
|
|
873
847
|
const emoji = hexToEmoji(id);
|
|
874
|
-
return /* @__PURE__ */
|
|
848
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
|
|
875
849
|
className: "text-description"
|
|
876
|
-
}, t("auth other device emoji message")), emoji && /* @__PURE__ */
|
|
850
|
+
}, t("auth other device emoji message")), emoji && /* @__PURE__ */ React7.createElement(Emoji, {
|
|
877
851
|
text: emoji,
|
|
878
852
|
className: "mli-auto mlb-2 text-center"
|
|
879
|
-
}), /* @__PURE__ */
|
|
853
|
+
}), /* @__PURE__ */ React7.createElement("p", {
|
|
880
854
|
className: "text-description"
|
|
881
|
-
}, t("auth code message")), /* @__PURE__ */
|
|
855
|
+
}, t("auth code message")), /* @__PURE__ */ React7.createElement(AuthCode, {
|
|
882
856
|
code,
|
|
883
857
|
large: true,
|
|
884
858
|
classNames: "mli-auto mlb-2 text-center grow"
|
|
885
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ React7.createElement(Button2, {
|
|
886
860
|
variant: "ghost",
|
|
887
861
|
onClick: onCancel
|
|
888
862
|
}, t("cancel label")));
|
|
@@ -891,12 +865,16 @@ var InvitationAuthCode = ({ id, code, onCancel }) => {
|
|
|
891
865
|
}
|
|
892
866
|
};
|
|
893
867
|
var InvitationComplete = ({ statusValue }) => {
|
|
894
|
-
var _effect =
|
|
868
|
+
var _effect = _useSignals7();
|
|
895
869
|
try {
|
|
896
|
-
return statusValue > 0 ? /* @__PURE__ */
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
870
|
+
return statusValue > 0 ? /* @__PURE__ */ React7.createElement(Icon3, {
|
|
871
|
+
icon: "ph--check--regular",
|
|
872
|
+
size: 6,
|
|
873
|
+
classNames: "m-1.5"
|
|
874
|
+
}) : /* @__PURE__ */ React7.createElement(Icon3, {
|
|
875
|
+
icon: "ph--x--regular",
|
|
876
|
+
size: 6,
|
|
877
|
+
classNames: "m-1.5"
|
|
900
878
|
});
|
|
901
879
|
} finally {
|
|
902
880
|
_effect.f();
|
|
@@ -904,190 +882,64 @@ var InvitationComplete = ({ statusValue }) => {
|
|
|
904
882
|
};
|
|
905
883
|
|
|
906
884
|
// src/components/MenuFooter.tsx
|
|
907
|
-
import { useSignals as
|
|
908
|
-
import
|
|
909
|
-
import React9 from "react";
|
|
885
|
+
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
886
|
+
import React8 from "react";
|
|
910
887
|
import { getSpace as getSpace2 } from "@dxos/client/echo";
|
|
911
888
|
import { useClient as useClient4 } from "@dxos/react-client";
|
|
912
|
-
import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as
|
|
889
|
+
import { DropdownMenu, Icon as Icon4, toLocalizedString as toLocalizedString2, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
913
890
|
var MenuFooter = ({ object }) => {
|
|
914
|
-
var _effect =
|
|
891
|
+
var _effect = _useSignals8();
|
|
915
892
|
try {
|
|
916
|
-
const { t } =
|
|
893
|
+
const { t } = useTranslation8(meta.id);
|
|
917
894
|
const client = useClient4();
|
|
918
895
|
const space = getSpace2(object);
|
|
919
896
|
const spaceName = space ? getSpaceDisplayName(space, {
|
|
920
897
|
personal: client.spaces.default === space
|
|
921
898
|
}) : "";
|
|
922
|
-
return space ? /* @__PURE__ */
|
|
899
|
+
return space ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React8.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React8.createElement("dl", {
|
|
923
900
|
className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
|
|
924
|
-
}, /* @__PURE__ */
|
|
901
|
+
}, /* @__PURE__ */ React8.createElement("dt", {
|
|
925
902
|
className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
|
|
926
|
-
}, t("location label")), /* @__PURE__ */
|
|
903
|
+
}, t("location label")), /* @__PURE__ */ React8.createElement("dd", {
|
|
927
904
|
className: "line-clamp-3"
|
|
928
|
-
}, /* @__PURE__ */
|
|
929
|
-
|
|
905
|
+
}, /* @__PURE__ */ React8.createElement(Icon4, {
|
|
906
|
+
icon: "ph--planet--regular",
|
|
907
|
+
classNames: "inline-block mie-1"
|
|
930
908
|
}), toLocalizedString2(spaceName, t)))) : null;
|
|
931
909
|
} finally {
|
|
932
910
|
_effect.f();
|
|
933
911
|
}
|
|
934
912
|
};
|
|
935
913
|
|
|
936
|
-
// src/components/
|
|
937
|
-
import { useSignals as
|
|
938
|
-
import
|
|
939
|
-
import {
|
|
940
|
-
import {
|
|
941
|
-
import {
|
|
942
|
-
|
|
943
|
-
// src/components/ObjectSettings/BaseObjectSettings.tsx
|
|
944
|
-
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
945
|
-
import React10, { useRef as useRef3 } from "react";
|
|
946
|
-
import { Input as Input2, useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
947
|
-
var BaseObjectSettings = ({ classNames, children, object }) => {
|
|
948
|
-
var _effect = _useSignals10();
|
|
949
|
-
try {
|
|
950
|
-
const { t } = useTranslation10(meta.id);
|
|
951
|
-
const inputRef = useRef3(null);
|
|
952
|
-
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Input2.Root, null, /* @__PURE__ */ React10.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React10.createElement(Input2.TextInput, {
|
|
953
|
-
ref: inputRef,
|
|
954
|
-
placeholder: t("name placeholder"),
|
|
955
|
-
// TODO(burdon): Use annotation to get the name field.
|
|
956
|
-
value: object.name ?? "",
|
|
957
|
-
onChange: (event) => {
|
|
958
|
-
object.name = event.target.value;
|
|
959
|
-
},
|
|
960
|
-
onKeyDown: (event) => {
|
|
961
|
-
if (event.key === "Enter") {
|
|
962
|
-
inputRef.current?.blur();
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
})), children);
|
|
966
|
-
} finally {
|
|
967
|
-
_effect.f();
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
|
|
971
|
-
// src/components/ObjectSettings/ObjectSettingsContainer.tsx
|
|
972
|
-
var ObjectSettingsContainer = ({ object, role }) => {
|
|
973
|
-
var _effect = _useSignals11();
|
|
974
|
-
try {
|
|
975
|
-
const data = useMemo2(() => ({
|
|
976
|
-
subject: object
|
|
977
|
-
}), [
|
|
978
|
-
object
|
|
979
|
-
]);
|
|
980
|
-
return /* @__PURE__ */ React11.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React11.createElement(StackItem2.Content, {
|
|
981
|
-
toolbar: false
|
|
982
|
-
}, /* @__PURE__ */ React11.createElement("div", {
|
|
983
|
-
role: "none",
|
|
984
|
-
className: "overflow-y-auto pli-cardSpacingInline plb-cardSpacingBlock"
|
|
985
|
-
}, /* @__PURE__ */ React11.createElement(BaseObjectSettings, {
|
|
986
|
-
object
|
|
987
|
-
}, /* @__PURE__ */ React11.createElement(Surface, {
|
|
988
|
-
role: "base-object-settings",
|
|
989
|
-
data
|
|
990
|
-
})), /* @__PURE__ */ React11.createElement(Surface, {
|
|
991
|
-
role: "object-settings",
|
|
992
|
-
data
|
|
993
|
-
}))));
|
|
994
|
-
} finally {
|
|
995
|
-
_effect.f();
|
|
996
|
-
}
|
|
997
|
-
};
|
|
998
|
-
|
|
999
|
-
// src/components/PersistenceStatus.tsx
|
|
1000
|
-
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
1001
|
-
import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
|
|
1002
|
-
import React12, { useEffect as useEffect2, useState as useState4 } from "react";
|
|
1003
|
-
import { debounce } from "@dxos/async";
|
|
1004
|
-
import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
1005
|
-
import { getSize as getSize3, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
|
|
1006
|
-
var PersistenceStatus = ({ db }) => {
|
|
1007
|
-
var _effect = _useSignals12();
|
|
1008
|
-
try {
|
|
1009
|
-
const { t } = useTranslation11(SPACE_PLUGIN);
|
|
1010
|
-
const [displayMessage, setDisplayMessage] = useState4(false);
|
|
1011
|
-
const [status, naturalSetStatus] = useState4(0);
|
|
1012
|
-
const [prevStatus, setPrevStatus] = useState4(0);
|
|
1013
|
-
const _setStatus = debounce(naturalSetStatus, 500);
|
|
1014
|
-
useEffect2(() => {
|
|
1015
|
-
setPrevStatus(status);
|
|
1016
|
-
if (prevStatus !== status && status === 0) {
|
|
1017
|
-
setDisplayMessage(true);
|
|
1018
|
-
const timeout = setTimeout(() => setDisplayMessage(false), 5e3);
|
|
1019
|
-
return () => clearTimeout(timeout);
|
|
1020
|
-
}
|
|
1021
|
-
}, [
|
|
1022
|
-
status
|
|
1023
|
-
]);
|
|
1024
|
-
switch (status) {
|
|
1025
|
-
case 2:
|
|
1026
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1027
|
-
className: "flex items-center"
|
|
1028
|
-
}, /* @__PURE__ */ React12.createElement(Warning, {
|
|
1029
|
-
className: mx4(getSize3(4), "me-1")
|
|
1030
|
-
}), /* @__PURE__ */ React12.createElement("span", {
|
|
1031
|
-
className: mx4("text-sm", warningText)
|
|
1032
|
-
}, t("persistence error label")));
|
|
1033
|
-
case 1:
|
|
1034
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1035
|
-
className: "flex items-center"
|
|
1036
|
-
}, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
|
|
1037
|
-
className: mx4(getSize3(4), "me-1")
|
|
1038
|
-
}), /* @__PURE__ */ React12.createElement("span", {
|
|
1039
|
-
className: mx4("text-sm", staticPlaceholderText)
|
|
1040
|
-
}, t("persistence pending label")));
|
|
1041
|
-
case 0:
|
|
1042
|
-
default:
|
|
1043
|
-
return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
|
|
1044
|
-
delayDuration: 400,
|
|
1045
|
-
role: "status",
|
|
1046
|
-
content: t("persisted locally message"),
|
|
1047
|
-
className: "flex items-center"
|
|
1048
|
-
}, /* @__PURE__ */ React12.createElement(CheckCircle2, {
|
|
1049
|
-
className: mx4(getSize3(4), "me-1")
|
|
1050
|
-
}), displayMessage && /* @__PURE__ */ React12.createElement("span", {
|
|
1051
|
-
className: mx4("text-sm", staticPlaceholderText)
|
|
1052
|
-
}, t("persisted locally label")));
|
|
1053
|
-
}
|
|
1054
|
-
} finally {
|
|
1055
|
-
_effect.f();
|
|
1056
|
-
}
|
|
1057
|
-
};
|
|
1058
|
-
|
|
1059
|
-
// src/components/PopoverRenameObject.tsx
|
|
1060
|
-
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1061
|
-
import React13, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
|
|
1062
|
-
import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
914
|
+
// src/components/ObjectRenamePopover/ObjectRenamePopover.tsx
|
|
915
|
+
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
916
|
+
import React9, { useCallback as useCallback7, useRef as useRef3, useState as useState4 } from "react";
|
|
917
|
+
import { LayoutAction as LayoutAction5, createIntent as createIntent6 } from "@dxos/app-framework";
|
|
918
|
+
import { useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework/react";
|
|
919
|
+
import { Obj as Obj4 } from "@dxos/echo";
|
|
1063
920
|
import { log as log2 } from "@dxos/log";
|
|
1064
|
-
import { Button as
|
|
1065
|
-
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/
|
|
1066
|
-
var
|
|
1067
|
-
var
|
|
1068
|
-
var _effect =
|
|
921
|
+
import { Button as Button3, Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
|
|
922
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx";
|
|
923
|
+
var OBJECT_RENAME_POPOVER = `${meta.id}/ObjectRenamePopover`;
|
|
924
|
+
var ObjectRenamePopover = ({ object }) => {
|
|
925
|
+
var _effect = _useSignals9();
|
|
1069
926
|
try {
|
|
1070
|
-
const { t } =
|
|
1071
|
-
const doneButton =
|
|
1072
|
-
const
|
|
1073
|
-
const [name, setName] = useState5(object.name || object.title || "");
|
|
927
|
+
const { t } = useTranslation9(meta.id);
|
|
928
|
+
const doneButton = useRef3(null);
|
|
929
|
+
const [name, setName] = useState4(Obj4.getLabel(object));
|
|
1074
930
|
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1075
931
|
const handleDone = useCallback7(() => {
|
|
1076
932
|
try {
|
|
1077
|
-
|
|
1078
|
-
} catch {
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
S: void 0,
|
|
1088
|
-
C: (f, a) => f(...a)
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
933
|
+
name && Obj4.setLabel(object, name);
|
|
934
|
+
} catch (err) {
|
|
935
|
+
log2.error("Failed to rename object", {
|
|
936
|
+
err
|
|
937
|
+
}, {
|
|
938
|
+
F: __dxlog_file3,
|
|
939
|
+
L: 27,
|
|
940
|
+
S: void 0,
|
|
941
|
+
C: (f, a) => f(...a)
|
|
942
|
+
});
|
|
1091
943
|
}
|
|
1092
944
|
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1093
945
|
part: "popover",
|
|
@@ -1101,21 +953,21 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1101
953
|
object,
|
|
1102
954
|
name
|
|
1103
955
|
]);
|
|
1104
|
-
return /* @__PURE__ */
|
|
956
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
1105
957
|
role: "none",
|
|
1106
958
|
className: "p-2 flex gap-2"
|
|
1107
|
-
}, /* @__PURE__ */
|
|
959
|
+
}, /* @__PURE__ */ React9.createElement("div", {
|
|
1108
960
|
role: "none",
|
|
1109
961
|
className: "flex-1"
|
|
1110
|
-
}, /* @__PURE__ */
|
|
962
|
+
}, /* @__PURE__ */ React9.createElement(Input2.Root, null, /* @__PURE__ */ React9.createElement(Input2.Label, {
|
|
1111
963
|
srOnly: true
|
|
1112
|
-
}, t("object name label")), /* @__PURE__ */
|
|
964
|
+
}, t("object name label")), /* @__PURE__ */ React9.createElement(Input2.TextInput, {
|
|
1113
965
|
placeholder: t("object placeholder"),
|
|
1114
966
|
value: name,
|
|
1115
967
|
"data-testid": "spacePlugin.renameObject.input",
|
|
1116
|
-
onChange: ({ target: { value } }) => setName(
|
|
968
|
+
onChange: ({ target: { value: value2 } }) => setName(value2),
|
|
1117
969
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1118
|
-
}))), /* @__PURE__ */
|
|
970
|
+
}))), /* @__PURE__ */ React9.createElement(Button3, {
|
|
1119
971
|
ref: doneButton,
|
|
1120
972
|
classNames: "self-stretch",
|
|
1121
973
|
onClick: handleDone
|
|
@@ -1127,18 +979,19 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1127
979
|
}
|
|
1128
980
|
};
|
|
1129
981
|
|
|
1130
|
-
// src/components/
|
|
1131
|
-
import { useSignals as
|
|
1132
|
-
import
|
|
1133
|
-
import {
|
|
1134
|
-
import {
|
|
1135
|
-
|
|
1136
|
-
var
|
|
1137
|
-
|
|
982
|
+
// src/components/SpaceRenamePopover/SpaceRenamePopover.tsx
|
|
983
|
+
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
984
|
+
import React10, { useCallback as useCallback8, useRef as useRef4, useState as useState5 } from "react";
|
|
985
|
+
import { LayoutAction as LayoutAction6, createIntent as createIntent7 } from "@dxos/app-framework";
|
|
986
|
+
import { useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework/react";
|
|
987
|
+
import { Button as Button4, Input as Input3, Popover, useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
988
|
+
var SPACE_RENAME_POPOVER = `${meta.id}/SpaceRenamePopover`;
|
|
989
|
+
var SpaceRenamePopover = ({ space }) => {
|
|
990
|
+
var _effect = _useSignals10();
|
|
1138
991
|
try {
|
|
1139
|
-
const { t } =
|
|
1140
|
-
const doneButton =
|
|
1141
|
-
const [name, setName] =
|
|
992
|
+
const { t } = useTranslation10(meta.id);
|
|
993
|
+
const doneButton = useRef4(null);
|
|
994
|
+
const [name, setName] = useState5(space.properties.name ?? "");
|
|
1142
995
|
const { dispatchPromise: dispatch } = useIntentDispatcher7();
|
|
1143
996
|
const handleDone = useCallback8(() => {
|
|
1144
997
|
space.properties.name = name;
|
|
@@ -1154,24 +1007,24 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1154
1007
|
space,
|
|
1155
1008
|
name
|
|
1156
1009
|
]);
|
|
1157
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
1158
1011
|
role: "none",
|
|
1159
1012
|
className: "p-2 flex gap-2"
|
|
1160
|
-
}, /* @__PURE__ */
|
|
1013
|
+
}, /* @__PURE__ */ React10.createElement("div", {
|
|
1161
1014
|
role: "none",
|
|
1162
1015
|
className: "flex-1"
|
|
1163
|
-
}, /* @__PURE__ */
|
|
1016
|
+
}, /* @__PURE__ */ React10.createElement(Input3.Root, null, /* @__PURE__ */ React10.createElement(Input3.Label, {
|
|
1164
1017
|
srOnly: true
|
|
1165
|
-
}, t("space name label")), /* @__PURE__ */
|
|
1018
|
+
}, t("space name label")), /* @__PURE__ */ React10.createElement(Input3.TextInput, {
|
|
1166
1019
|
defaultValue: space.properties.name ?? "",
|
|
1167
1020
|
placeholder: t("unnamed space label"),
|
|
1168
|
-
onChange: ({ target: { value } }) => setName(
|
|
1021
|
+
onChange: ({ target: { value: value2 } }) => setName(value2),
|
|
1169
1022
|
// TODO(wittjosiah): Ideally this should access the popover context to close the popover.
|
|
1170
1023
|
// Currently this is not possible because Radix does not expose the popover context.
|
|
1171
1024
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1172
|
-
}))), /* @__PURE__ */
|
|
1025
|
+
}))), /* @__PURE__ */ React10.createElement(Popover.Close, {
|
|
1173
1026
|
asChild: true
|
|
1174
|
-
}, /* @__PURE__ */
|
|
1027
|
+
}, /* @__PURE__ */ React10.createElement(Button4, {
|
|
1175
1028
|
ref: doneButton,
|
|
1176
1029
|
classNames: "self-stretch",
|
|
1177
1030
|
onClick: handleDone
|
|
@@ -1184,57 +1037,59 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1184
1037
|
};
|
|
1185
1038
|
|
|
1186
1039
|
// src/components/SchemaContainer.tsx
|
|
1187
|
-
import { useSignals as
|
|
1188
|
-
import
|
|
1189
|
-
import { useTranslation as
|
|
1190
|
-
import {
|
|
1191
|
-
import { StackItem as
|
|
1192
|
-
var useQuerySpaceSchemas = (space) => {
|
|
1193
|
-
const [schemas, setSchemas] = useState7([]);
|
|
1194
|
-
useEffect3(() => {
|
|
1195
|
-
const query = space.db.schemaRegistry.query();
|
|
1196
|
-
const initialResults = query.runSync();
|
|
1197
|
-
setSchemas(initialResults);
|
|
1198
|
-
const unsubscribe = query.subscribe(() => setSchemas(query.results));
|
|
1199
|
-
return () => unsubscribe();
|
|
1200
|
-
}, [
|
|
1201
|
-
space
|
|
1202
|
-
]);
|
|
1203
|
-
return schemas;
|
|
1204
|
-
};
|
|
1040
|
+
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
1041
|
+
import React11, { useEffect as useEffect2, useState as useState6 } from "react";
|
|
1042
|
+
import { useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
1043
|
+
import { ControlPage as ControlPage2, ControlSection as ControlSection2, controlItemClasses } from "@dxos/react-ui-form";
|
|
1044
|
+
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
1205
1045
|
var SchemaContainer = ({ space }) => {
|
|
1206
|
-
var _effect =
|
|
1046
|
+
var _effect = _useSignals11();
|
|
1207
1047
|
try {
|
|
1208
|
-
const { t } =
|
|
1048
|
+
const { t } = useTranslation11(meta.id);
|
|
1209
1049
|
const schemas = useQuerySpaceSchemas(space);
|
|
1210
|
-
return /* @__PURE__ */
|
|
1211
|
-
|
|
1212
|
-
}, /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ React11.createElement(StackItem2.Content, {
|
|
1051
|
+
scrollable: true
|
|
1052
|
+
}, /* @__PURE__ */ React11.createElement(ControlPage2, null, /* @__PURE__ */ React11.createElement(ControlSection2, {
|
|
1213
1053
|
title: t("schema verbose label"),
|
|
1214
1054
|
description: t("schema description")
|
|
1215
|
-
}, /* @__PURE__ */
|
|
1055
|
+
}, /* @__PURE__ */ React11.createElement("div", {
|
|
1216
1056
|
role: "none",
|
|
1217
1057
|
className: controlItemClasses
|
|
1218
|
-
}, schemas.length === 0 && /* @__PURE__ */
|
|
1058
|
+
}, schemas.length === 0 && /* @__PURE__ */ React11.createElement("div", {
|
|
1219
1059
|
className: "text-center plb-4"
|
|
1220
|
-
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */
|
|
1060
|
+
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React11.createElement("div", {
|
|
1061
|
+
role: "none",
|
|
1221
1062
|
key: schema.id
|
|
1222
|
-
},
|
|
1063
|
+
}, schema.typename))))));
|
|
1223
1064
|
} finally {
|
|
1224
1065
|
_effect.f();
|
|
1225
1066
|
}
|
|
1226
1067
|
};
|
|
1068
|
+
var useQuerySpaceSchemas = (space) => {
|
|
1069
|
+
const [schemas, setSchemas] = useState6([]);
|
|
1070
|
+
useEffect2(() => {
|
|
1071
|
+
const query = space.db.schemaRegistry.query();
|
|
1072
|
+
const initialResults = query.runSync();
|
|
1073
|
+
setSchemas(initialResults);
|
|
1074
|
+
const unsubscribe = query.subscribe(() => setSchemas(query.results));
|
|
1075
|
+
return () => unsubscribe();
|
|
1076
|
+
}, [
|
|
1077
|
+
space
|
|
1078
|
+
]);
|
|
1079
|
+
return schemas;
|
|
1080
|
+
};
|
|
1227
1081
|
|
|
1228
|
-
// src/components/SpacePresence.tsx
|
|
1229
|
-
import { useSignals as
|
|
1230
|
-
import
|
|
1231
|
-
import
|
|
1232
|
-
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
|
|
1082
|
+
// src/components/SpacePresence/SpacePresence.tsx
|
|
1083
|
+
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
1084
|
+
import * as Option2 from "effect/Option";
|
|
1085
|
+
import React12, { forwardRef, useCallback as useCallback9, useEffect as useEffect3, useState as useState7 } from "react";
|
|
1086
|
+
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework/react";
|
|
1233
1087
|
import { generateName } from "@dxos/display-name";
|
|
1088
|
+
import { Obj as Obj5 } from "@dxos/echo";
|
|
1234
1089
|
import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
|
|
1235
|
-
import { getSpace as getSpace3, useMembers
|
|
1090
|
+
import { getSpace as getSpace3, useMembers } from "@dxos/react-client/echo";
|
|
1236
1091
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
1237
|
-
import { Avatar,
|
|
1092
|
+
import { Avatar, List, ListItem, Popover as Popover2, Tooltip, useDefaultValue as useDefaultValue2, useTranslation as useTranslation12 } from "@dxos/react-ui";
|
|
1238
1093
|
import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
|
|
1239
1094
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
1240
1095
|
var REFRESH_INTERVAL = 5e3;
|
|
@@ -1242,15 +1097,15 @@ var ACTIVITY_DURATION = 3e4;
|
|
|
1242
1097
|
var noViewers = new ComplexMap(PublicKey.hash);
|
|
1243
1098
|
var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
1244
1099
|
var SpacePresence = ({ object, spaceKey }) => {
|
|
1245
|
-
var _effect =
|
|
1100
|
+
var _effect = _useSignals12();
|
|
1246
1101
|
try {
|
|
1247
1102
|
const spaceState = useCapability(SpaceCapabilities.MutableState);
|
|
1248
1103
|
const client = useClient5();
|
|
1249
1104
|
const identity = useIdentity();
|
|
1250
1105
|
const space = spaceKey ? client.spaces.get(spaceKey) : getSpace3(object);
|
|
1251
1106
|
const spaceMembers = useMembers(space?.key);
|
|
1252
|
-
const [_moment, setMoment] =
|
|
1253
|
-
|
|
1107
|
+
const [_moment, setMoment] = useState7(Date.now());
|
|
1108
|
+
useEffect3(() => {
|
|
1254
1109
|
const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
|
|
1255
1110
|
return () => clearInterval(interval);
|
|
1256
1111
|
}, []);
|
|
@@ -1261,7 +1116,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1261
1116
|
if (!identity || !spaceState || !space) {
|
|
1262
1117
|
return null;
|
|
1263
1118
|
}
|
|
1264
|
-
const currentObjectViewers = spaceState.viewersByObject[
|
|
1119
|
+
const currentObjectViewers = spaceState.viewersByObject[Obj5.getDXN(object).toString()] ?? noViewers;
|
|
1265
1120
|
const membersForObject = spaceMembers.filter((member) => memberOnline(member) && memberIsNotSelf(member)).filter((member) => currentObjectViewers.has(member.identity.identityKey)).map((member) => {
|
|
1266
1121
|
const objectView = currentObjectViewers.get(member.identity.identityKey);
|
|
1267
1122
|
const lastSeen = objectView?.lastSeen ?? -Infinity;
|
|
@@ -1272,7 +1127,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1272
1127
|
lastSeen
|
|
1273
1128
|
};
|
|
1274
1129
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1275
|
-
return /* @__PURE__ */
|
|
1130
|
+
return /* @__PURE__ */ React12.createElement(FullPresence, {
|
|
1276
1131
|
members: membersForObject
|
|
1277
1132
|
});
|
|
1278
1133
|
} finally {
|
|
@@ -1280,46 +1135,46 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1280
1135
|
}
|
|
1281
1136
|
};
|
|
1282
1137
|
var FullPresence = (props) => {
|
|
1283
|
-
var _effect =
|
|
1138
|
+
var _effect = _useSignals12();
|
|
1284
1139
|
try {
|
|
1285
1140
|
const { size = 9, onMemberClick } = props;
|
|
1286
|
-
const members =
|
|
1141
|
+
const members = useDefaultValue2(props.members, () => []);
|
|
1287
1142
|
if (members.length === 0) {
|
|
1288
1143
|
return null;
|
|
1289
1144
|
}
|
|
1290
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
1291
1146
|
className: "dx-avatar-group",
|
|
1292
1147
|
"data-testid": "spacePlugin.presence"
|
|
1293
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1148
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
|
|
1294
1149
|
key: member.identity.identityKey.toHex(),
|
|
1295
1150
|
side: "bottom",
|
|
1296
1151
|
content: getName(member.identity),
|
|
1297
1152
|
className: "grid focus:outline-none"
|
|
1298
|
-
}, /* @__PURE__ */
|
|
1153
|
+
}, /* @__PURE__ */ React12.createElement(PresenceAvatar, {
|
|
1299
1154
|
identity: member.identity,
|
|
1300
1155
|
match: member.currentlyAttended,
|
|
1301
1156
|
index: members.length - i,
|
|
1302
1157
|
onClick: () => onMemberClick?.(member),
|
|
1303
1158
|
size
|
|
1304
|
-
}))), members.length > 3 && /* @__PURE__ */
|
|
1159
|
+
}))), members.length > 3 && /* @__PURE__ */ React12.createElement(Popover2.Root, null, /* @__PURE__ */ React12.createElement(Popover2.Trigger, {
|
|
1305
1160
|
className: "grid focus:outline-none"
|
|
1306
|
-
}, /* @__PURE__ */
|
|
1161
|
+
}, /* @__PURE__ */ React12.createElement(Avatar.Root, null, /* @__PURE__ */ React12.createElement(Avatar.Content, {
|
|
1307
1162
|
status: "inactive",
|
|
1308
1163
|
style: {
|
|
1309
1164
|
zIndex: members.length - 4
|
|
1310
1165
|
},
|
|
1311
1166
|
fallback: `+${members.length - 3}`,
|
|
1312
1167
|
size
|
|
1313
|
-
}))), /* @__PURE__ */
|
|
1168
|
+
}))), /* @__PURE__ */ React12.createElement(Popover2.Portal, null, /* @__PURE__ */ React12.createElement(Popover2.Content, {
|
|
1314
1169
|
side: "bottom"
|
|
1315
|
-
}, /* @__PURE__ */
|
|
1170
|
+
}, /* @__PURE__ */ React12.createElement(Popover2.Arrow, null), /* @__PURE__ */ React12.createElement(Popover2.Viewport, {
|
|
1316
1171
|
classNames: "max-bs-56"
|
|
1317
|
-
}, /* @__PURE__ */
|
|
1172
|
+
}, /* @__PURE__ */ React12.createElement(List, null, members.map((member) => /* @__PURE__ */ React12.createElement(ListItem.Root, {
|
|
1318
1173
|
key: member.identity.identityKey.toHex(),
|
|
1319
1174
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1320
1175
|
onClick: () => onMemberClick?.(member),
|
|
1321
1176
|
"data-testid": "identity-list-item"
|
|
1322
|
-
}, /* @__PURE__ */
|
|
1177
|
+
}, /* @__PURE__ */ React12.createElement(PresenceAvatar, {
|
|
1323
1178
|
identity: member.identity,
|
|
1324
1179
|
size,
|
|
1325
1180
|
showName: true,
|
|
@@ -1329,12 +1184,12 @@ var FullPresence = (props) => {
|
|
|
1329
1184
|
_effect.f();
|
|
1330
1185
|
}
|
|
1331
1186
|
};
|
|
1332
|
-
var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
1333
|
-
var _effect =
|
|
1187
|
+
var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match: match2, index, onClick, size }, forwardedRef) => {
|
|
1188
|
+
var _effect = _useSignals12();
|
|
1334
1189
|
try {
|
|
1335
|
-
const status =
|
|
1190
|
+
const status = match2 ? "current" : "active";
|
|
1336
1191
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
1337
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ React12.createElement(Avatar.Root, null, /* @__PURE__ */ React12.createElement(Avatar.Content, {
|
|
1338
1193
|
status,
|
|
1339
1194
|
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1340
1195
|
"data-testid": "spacePlugin.presence.member",
|
|
@@ -1348,7 +1203,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1348
1203
|
onClick,
|
|
1349
1204
|
fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
|
|
1350
1205
|
ref: forwardedRef
|
|
1351
|
-
}), /* @__PURE__ */
|
|
1206
|
+
}), /* @__PURE__ */ React12.createElement(Avatar.Label, {
|
|
1352
1207
|
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1353
1208
|
}, getName(identity)));
|
|
1354
1209
|
} finally {
|
|
@@ -1356,7 +1211,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1356
1211
|
}
|
|
1357
1212
|
});
|
|
1358
1213
|
var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
1359
|
-
var _effect =
|
|
1214
|
+
var _effect = _useSignals12();
|
|
1360
1215
|
try {
|
|
1361
1216
|
const { hasAttention, isAncestor, isRelated } = useAttention(id);
|
|
1362
1217
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1364,13 +1219,13 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1364
1219
|
const attended = useAttended();
|
|
1365
1220
|
const startOfAttention = attended.at(-1);
|
|
1366
1221
|
const path = usePath(graph, startOfAttention);
|
|
1367
|
-
const containsAttended = !open && !isAttended && id &&
|
|
1222
|
+
const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
|
|
1368
1223
|
const getActiveViewers = (viewers2) => {
|
|
1369
1224
|
const moment = Date.now();
|
|
1370
1225
|
return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
|
|
1371
1226
|
};
|
|
1372
|
-
const [activeViewers, setActiveViewers] =
|
|
1373
|
-
|
|
1227
|
+
const [activeViewers, setActiveViewers] = useState7(viewers ? getActiveViewers(viewers) : []);
|
|
1228
|
+
useEffect3(() => {
|
|
1374
1229
|
if (viewers) {
|
|
1375
1230
|
setActiveViewers(getActiveViewers(viewers));
|
|
1376
1231
|
const interval = setInterval(() => {
|
|
@@ -1381,7 +1236,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1381
1236
|
}, [
|
|
1382
1237
|
viewers
|
|
1383
1238
|
]);
|
|
1384
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ React12.createElement(SmallPresence, {
|
|
1385
1240
|
count: activeViewers.length,
|
|
1386
1241
|
attended: isAttended,
|
|
1387
1242
|
containsAttended
|
|
@@ -1391,16 +1246,16 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1391
1246
|
}
|
|
1392
1247
|
};
|
|
1393
1248
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1394
|
-
var _effect =
|
|
1249
|
+
var _effect = _useSignals12();
|
|
1395
1250
|
try {
|
|
1396
|
-
const { t } =
|
|
1397
|
-
return /* @__PURE__ */
|
|
1251
|
+
const { t } = useTranslation12(meta.id);
|
|
1252
|
+
return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
|
|
1398
1253
|
asChild: true,
|
|
1399
1254
|
content: t("presence label", {
|
|
1400
1255
|
count
|
|
1401
1256
|
}),
|
|
1402
1257
|
side: "bottom"
|
|
1403
|
-
}, /* @__PURE__ */
|
|
1258
|
+
}, /* @__PURE__ */ React12.createElement(AttentionGlyph, {
|
|
1404
1259
|
attended,
|
|
1405
1260
|
containsAttended,
|
|
1406
1261
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
@@ -1412,45 +1267,44 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
|
1412
1267
|
};
|
|
1413
1268
|
|
|
1414
1269
|
// src/components/SpacePluginSettings.tsx
|
|
1415
|
-
import { useSignals as
|
|
1416
|
-
import
|
|
1417
|
-
import { createIntent as createIntent8
|
|
1270
|
+
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1271
|
+
import React13 from "react";
|
|
1272
|
+
import { createIntent as createIntent8 } from "@dxos/app-framework";
|
|
1273
|
+
import { useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework/react";
|
|
1418
1274
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1419
1275
|
import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
|
|
1420
|
-
import {
|
|
1421
|
-
import {
|
|
1276
|
+
import { IconButton as IconButton3, Input as Input4, List as List2, ListItem as ListItem2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation13 } from "@dxos/react-ui";
|
|
1277
|
+
import { ControlGroup, ControlItemInput as ControlItemInput2, ControlPage as ControlPage3, ControlSection as ControlSection3, controlItemClasses as controlItemClasses2 } from "@dxos/react-ui-form";
|
|
1422
1278
|
var SpacePluginSettings = ({ settings }) => {
|
|
1423
|
-
var _effect =
|
|
1279
|
+
var _effect = _useSignals13();
|
|
1424
1280
|
try {
|
|
1425
|
-
const { t } =
|
|
1281
|
+
const { t } = useTranslation13(meta.id);
|
|
1426
1282
|
const client = useClient6();
|
|
1427
1283
|
const spaces = useSpaces2({
|
|
1428
1284
|
all: settings.showHidden
|
|
1429
1285
|
});
|
|
1430
1286
|
const { dispatchPromise: dispatch } = useIntentDispatcher8();
|
|
1431
|
-
return /* @__PURE__ */
|
|
1287
|
+
return /* @__PURE__ */ React13.createElement(ControlPage3, null, /* @__PURE__ */ React13.createElement(ControlSection3, {
|
|
1432
1288
|
title: t("space settings label"),
|
|
1433
1289
|
description: t("space settings description")
|
|
1434
|
-
}, /* @__PURE__ */
|
|
1435
|
-
|
|
1436
|
-
}, /* @__PURE__ */
|
|
1437
|
-
label: t("show hidden spaces label")
|
|
1438
|
-
}, /* @__PURE__ */ React17.createElement(Input5.Switch, {
|
|
1290
|
+
}, /* @__PURE__ */ React13.createElement(ControlGroup, null, /* @__PURE__ */ React13.createElement(ControlItemInput2, {
|
|
1291
|
+
title: t("show hidden spaces label")
|
|
1292
|
+
}, /* @__PURE__ */ React13.createElement(Input4.Switch, {
|
|
1439
1293
|
checked: settings.showHidden,
|
|
1440
1294
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1441
|
-
}))), /* @__PURE__ */
|
|
1295
|
+
}))), /* @__PURE__ */ React13.createElement(List2, {
|
|
1442
1296
|
classNames: [
|
|
1443
1297
|
controlItemClasses2,
|
|
1444
1298
|
"flex flex-col gap-trimSm"
|
|
1445
1299
|
]
|
|
1446
|
-
}, spaces.map((space) => /* @__PURE__ */
|
|
1300
|
+
}, spaces.map((space) => /* @__PURE__ */ React13.createElement(ListItem2.Root, {
|
|
1447
1301
|
key: space.id,
|
|
1448
1302
|
classNames: "is-full items-center"
|
|
1449
|
-
}, /* @__PURE__ */
|
|
1303
|
+
}, /* @__PURE__ */ React13.createElement(ListItem2.Heading, {
|
|
1450
1304
|
classNames: "grow truncate !min-bs-0"
|
|
1451
1305
|
}, toLocalizedString3(getSpaceDisplayName(space, {
|
|
1452
1306
|
personal: space === client.spaces.default
|
|
1453
|
-
}), t)), /* @__PURE__ */
|
|
1307
|
+
}), t)), /* @__PURE__ */ React13.createElement(IconButton3, {
|
|
1454
1308
|
icon: "ph--faders--regular",
|
|
1455
1309
|
onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
|
|
1456
1310
|
space
|
|
@@ -1463,38 +1317,40 @@ var SpacePluginSettings = ({ settings }) => {
|
|
|
1463
1317
|
};
|
|
1464
1318
|
|
|
1465
1319
|
// src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1466
|
-
import { useSignals as
|
|
1467
|
-
import
|
|
1468
|
-
import
|
|
1469
|
-
import {
|
|
1320
|
+
import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
|
|
1321
|
+
import * as Function3 from "effect/Function";
|
|
1322
|
+
import * as Schema from "effect/Schema";
|
|
1323
|
+
import React14, { useCallback as useCallback10, useMemo as useMemo2, useState as useState8 } from "react";
|
|
1324
|
+
import { LayoutAction as LayoutAction7, chain as chain2, createIntent as createIntent9 } from "@dxos/app-framework";
|
|
1325
|
+
import { useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework/react";
|
|
1470
1326
|
import { log as log3 } from "@dxos/log";
|
|
1471
1327
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1472
1328
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
1473
|
-
import { SpaceState
|
|
1474
|
-
import { Button as
|
|
1475
|
-
import {
|
|
1329
|
+
import { SpaceState } from "@dxos/react-client/echo";
|
|
1330
|
+
import { Button as Button5, Input as Input5, useFileDownload, useMulticastObservable, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1331
|
+
import { ControlItem, ControlItemInput as ControlItemInput3, ControlPage as ControlPage4, ControlSection as ControlSection4, Form as Form3 } from "@dxos/react-ui-form";
|
|
1476
1332
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1477
|
-
import { StackItem as
|
|
1333
|
+
import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
|
|
1478
1334
|
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
|
|
1479
1335
|
var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
|
|
1480
1336
|
archived: Schema.Boolean.annotations({
|
|
1481
|
-
title: "Archive
|
|
1337
|
+
title: "Archive Space"
|
|
1482
1338
|
})
|
|
1483
1339
|
})));
|
|
1484
1340
|
var SpaceSettingsContainer = ({ space }) => {
|
|
1485
|
-
var _effect =
|
|
1341
|
+
var _effect = _useSignals14();
|
|
1486
1342
|
try {
|
|
1487
|
-
const { t } =
|
|
1343
|
+
const { t } = useTranslation14(meta.id);
|
|
1488
1344
|
const { dispatchPromise: dispatch } = useIntentDispatcher9();
|
|
1489
1345
|
const client = useClient7();
|
|
1490
|
-
const archived = useMulticastObservable(space.state) ===
|
|
1491
|
-
const [edgeReplication, setEdgeReplication] =
|
|
1346
|
+
const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
|
|
1347
|
+
const [edgeReplication, setEdgeReplication] = useState8(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
|
|
1492
1348
|
const toggleEdgeReplication = useCallback10(async (next) => {
|
|
1493
1349
|
setEdgeReplication(next);
|
|
1494
1350
|
await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
|
|
1495
1351
|
log3.catch(err, void 0, {
|
|
1496
1352
|
F: __dxlog_file4,
|
|
1497
|
-
L:
|
|
1353
|
+
L: 57,
|
|
1498
1354
|
S: void 0,
|
|
1499
1355
|
C: (f, a) => f(...a)
|
|
1500
1356
|
});
|
|
@@ -1515,7 +1371,7 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1515
1371
|
space.properties.hue = properties.hue;
|
|
1516
1372
|
}
|
|
1517
1373
|
if (properties.archived && !archived) {
|
|
1518
|
-
void dispatch(
|
|
1374
|
+
void dispatch(Function3.pipe(createIntent9(SpaceAction.Close, {
|
|
1519
1375
|
space
|
|
1520
1376
|
}), chain2(LayoutAction7.SwitchWorkspace, {
|
|
1521
1377
|
part: "workspace",
|
|
@@ -1531,7 +1387,7 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1531
1387
|
toggleEdgeReplication,
|
|
1532
1388
|
archived
|
|
1533
1389
|
]);
|
|
1534
|
-
const values =
|
|
1390
|
+
const values = useMemo2(() => ({
|
|
1535
1391
|
name: space.properties.name,
|
|
1536
1392
|
icon: space.properties.icon,
|
|
1537
1393
|
hue: space.properties.hue,
|
|
@@ -1544,16 +1400,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1544
1400
|
edgeReplication,
|
|
1545
1401
|
archived
|
|
1546
1402
|
]);
|
|
1547
|
-
const customElements =
|
|
1403
|
+
const customElements = useMemo2(() => ({
|
|
1548
1404
|
name: ({ type, label, getValue, onValueChange }) => {
|
|
1549
|
-
const handleChange = useCallback10(({ target: { value } }) => onValueChange(type,
|
|
1405
|
+
const handleChange = useCallback10(({ target: { value: value2 } }) => onValueChange(type, value2), [
|
|
1550
1406
|
onValueChange,
|
|
1551
1407
|
type
|
|
1552
1408
|
]);
|
|
1553
|
-
return /* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
|
|
1554
1410
|
title: label,
|
|
1555
1411
|
description: t("display name description")
|
|
1556
|
-
}, /* @__PURE__ */
|
|
1412
|
+
}, /* @__PURE__ */ React14.createElement(Input5.TextInput, {
|
|
1557
1413
|
value: getValue(),
|
|
1558
1414
|
onChange: handleChange,
|
|
1559
1415
|
placeholder: t("display name input placeholder"),
|
|
@@ -1561,23 +1417,22 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1561
1417
|
}));
|
|
1562
1418
|
},
|
|
1563
1419
|
icon: ({ type, label, getValue, onValueChange }) => {
|
|
1564
|
-
const handleChange = useCallback10((
|
|
1420
|
+
const handleChange = useCallback10((icon) => onValueChange(type, icon), [
|
|
1565
1421
|
onValueChange,
|
|
1566
1422
|
type
|
|
1567
1423
|
]);
|
|
1568
|
-
const
|
|
1424
|
+
const handleReset = useCallback10(() => onValueChange(type, void 0), [
|
|
1569
1425
|
onValueChange,
|
|
1570
1426
|
type
|
|
1571
1427
|
]);
|
|
1572
|
-
return /* @__PURE__ */
|
|
1428
|
+
return /* @__PURE__ */ React14.createElement(ControlItem, {
|
|
1573
1429
|
title: label,
|
|
1574
1430
|
description: t("icon description")
|
|
1575
|
-
}, /* @__PURE__ */
|
|
1431
|
+
}, /* @__PURE__ */ React14.createElement(IconPicker, {
|
|
1576
1432
|
value: getValue(),
|
|
1577
1433
|
onChange: handleChange,
|
|
1578
|
-
onReset:
|
|
1579
|
-
classNames: "justify-self-end"
|
|
1580
|
-
iconSize: 5
|
|
1434
|
+
onReset: handleReset,
|
|
1435
|
+
classNames: "justify-self-end"
|
|
1581
1436
|
}));
|
|
1582
1437
|
},
|
|
1583
1438
|
hue: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -1585,18 +1440,18 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1585
1440
|
onValueChange,
|
|
1586
1441
|
type
|
|
1587
1442
|
]);
|
|
1588
|
-
const
|
|
1443
|
+
const handleReset = useCallback10(() => onValueChange(type, void 0), [
|
|
1589
1444
|
onValueChange,
|
|
1590
1445
|
type
|
|
1591
1446
|
]);
|
|
1592
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ React14.createElement(ControlItem, {
|
|
1593
1448
|
title: label,
|
|
1594
1449
|
description: t("hue description")
|
|
1595
|
-
}, /* @__PURE__ */
|
|
1450
|
+
}, /* @__PURE__ */ React14.createElement(HuePicker, {
|
|
1596
1451
|
value: getValue(),
|
|
1597
1452
|
onChange: handleChange,
|
|
1598
|
-
onReset:
|
|
1599
|
-
classNames: "
|
|
1453
|
+
onReset: handleReset,
|
|
1454
|
+
classNames: "justify-self-end"
|
|
1600
1455
|
}));
|
|
1601
1456
|
},
|
|
1602
1457
|
edgeReplication: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -1604,10 +1459,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1604
1459
|
onValueChange,
|
|
1605
1460
|
type
|
|
1606
1461
|
]);
|
|
1607
|
-
return /* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
|
|
1608
1463
|
title: label,
|
|
1609
1464
|
description: t("edge replication description")
|
|
1610
|
-
}, /* @__PURE__ */
|
|
1465
|
+
}, /* @__PURE__ */ React14.createElement(Input5.Switch, {
|
|
1611
1466
|
checked: getValue(),
|
|
1612
1467
|
onCheckedChange: handleChange,
|
|
1613
1468
|
classNames: "justify-self-end"
|
|
@@ -1619,11 +1474,12 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1619
1474
|
type,
|
|
1620
1475
|
getValue
|
|
1621
1476
|
]);
|
|
1622
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ React14.createElement(ControlItemInput3, {
|
|
1623
1478
|
title: label,
|
|
1624
1479
|
description: t("archive space description")
|
|
1625
|
-
}, /* @__PURE__ */
|
|
1480
|
+
}, /* @__PURE__ */ React14.createElement(Button5, {
|
|
1626
1481
|
disabled: space === client.spaces.default,
|
|
1482
|
+
variant: getValue() ? "default" : "destructive",
|
|
1627
1483
|
onClick: handleChange
|
|
1628
1484
|
}, getValue() ? t("unarchive space label") : t("archive space label")));
|
|
1629
1485
|
}
|
|
@@ -1631,46 +1487,65 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1631
1487
|
t,
|
|
1632
1488
|
space
|
|
1633
1489
|
]);
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1490
|
+
const download = useFileDownload();
|
|
1491
|
+
const handleBackup = useCallback10(async () => {
|
|
1492
|
+
const archive = await space.internal.export();
|
|
1493
|
+
download(new Blob([
|
|
1494
|
+
archive.contents
|
|
1495
|
+
]), archive.filename);
|
|
1496
|
+
}, [
|
|
1497
|
+
space,
|
|
1498
|
+
download
|
|
1499
|
+
]);
|
|
1500
|
+
return /* @__PURE__ */ React14.createElement(StackItem3.Content, {
|
|
1501
|
+
scrollable: true
|
|
1502
|
+
}, /* @__PURE__ */ React14.createElement(ControlPage4, null, /* @__PURE__ */ React14.createElement(ControlSection4, {
|
|
1637
1503
|
title: t("space properties settings verbose label", {
|
|
1638
|
-
ns:
|
|
1504
|
+
ns: meta.id
|
|
1639
1505
|
}),
|
|
1640
1506
|
description: t("space properties settings description", {
|
|
1641
|
-
ns:
|
|
1507
|
+
ns: meta.id
|
|
1642
1508
|
})
|
|
1643
|
-
}, /* @__PURE__ */
|
|
1509
|
+
}, /* @__PURE__ */ React14.createElement(Form3, {
|
|
1644
1510
|
schema: FormSchema,
|
|
1645
1511
|
values,
|
|
1646
1512
|
autoSave: true,
|
|
1647
1513
|
onSave: handleSave,
|
|
1648
1514
|
Custom: customElements,
|
|
1649
1515
|
outerSpacing: false,
|
|
1650
|
-
classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]
|
|
1651
|
-
}))
|
|
1516
|
+
classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
1517
|
+
})), /* @__PURE__ */ React14.createElement(ControlItemInput3, {
|
|
1518
|
+
title: t("backup space label", {
|
|
1519
|
+
ns: meta.id
|
|
1520
|
+
}),
|
|
1521
|
+
description: t("backup space description", {
|
|
1522
|
+
ns: meta.id
|
|
1523
|
+
})
|
|
1524
|
+
}, /* @__PURE__ */ React14.createElement(Button5, {
|
|
1525
|
+
onClick: handleBackup
|
|
1526
|
+
}, t("download backup")))));
|
|
1652
1527
|
} finally {
|
|
1653
1528
|
_effect.f();
|
|
1654
1529
|
}
|
|
1655
1530
|
};
|
|
1656
1531
|
|
|
1657
1532
|
// src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1658
|
-
import { useSignals as
|
|
1659
|
-
import
|
|
1660
|
-
import
|
|
1661
|
-
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
1533
|
+
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1534
|
+
import * as Option3 from "effect/Option";
|
|
1535
|
+
import React15, { useEffect as useEffect4, useState as useState9 } from "react";
|
|
1536
|
+
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework/react";
|
|
1662
1537
|
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1663
1538
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1664
1539
|
import { useClient as useClient8 } from "@dxos/react-client";
|
|
1665
1540
|
import { useSpaceSyncState } from "@dxos/react-client/echo";
|
|
1666
|
-
import { Tooltip as
|
|
1541
|
+
import { Tooltip as Tooltip2, useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
1667
1542
|
import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
1668
1543
|
var useEdgeStatus = () => {
|
|
1669
|
-
const [status, setStatus] =
|
|
1544
|
+
const [status, setStatus] = useState9(EdgeStatus.ConnectionState.NOT_CONNECTED);
|
|
1670
1545
|
const client = useClient8();
|
|
1671
|
-
|
|
1546
|
+
useEffect4(() => {
|
|
1672
1547
|
client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
|
|
1673
|
-
setStatus(status2);
|
|
1548
|
+
setStatus(status2.state);
|
|
1674
1549
|
});
|
|
1675
1550
|
}, [
|
|
1676
1551
|
client
|
|
@@ -1678,9 +1553,9 @@ var useEdgeStatus = () => {
|
|
|
1678
1553
|
return status;
|
|
1679
1554
|
};
|
|
1680
1555
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1681
|
-
var _effect =
|
|
1556
|
+
var _effect = _useSignals15();
|
|
1682
1557
|
try {
|
|
1683
|
-
const { t } =
|
|
1558
|
+
const { t } = useTranslation15(meta.id);
|
|
1684
1559
|
const id = space.id;
|
|
1685
1560
|
const { hasAttention, isAncestor, isRelated } = useAttention2(id);
|
|
1686
1561
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1688,16 +1563,16 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1688
1563
|
const attended = useAttended2();
|
|
1689
1564
|
const startOfAttention = attended.at(-1);
|
|
1690
1565
|
const path = usePath(graph, startOfAttention);
|
|
1691
|
-
const containsAttended = !open && !isAttended && id &&
|
|
1692
|
-
const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
|
|
1566
|
+
const containsAttended = !open && !isAttended && id && Option3.isSome(path) ? path.value.includes(id) : false;
|
|
1567
|
+
const connectedToEdge = useEdgeStatus() === EdgeStatus.ConnectionState.CONNECTED;
|
|
1693
1568
|
const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
|
|
1694
1569
|
const syncState = useSpaceSyncState(space);
|
|
1695
1570
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1696
|
-
return /* @__PURE__ */
|
|
1571
|
+
return /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
|
|
1697
1572
|
asChild: true,
|
|
1698
1573
|
content: t("syncing label"),
|
|
1699
1574
|
side: "bottom"
|
|
1700
|
-
}, /* @__PURE__ */
|
|
1575
|
+
}, /* @__PURE__ */ React15.createElement(AttentionGlyph2, {
|
|
1701
1576
|
syncing,
|
|
1702
1577
|
attended: isAttended,
|
|
1703
1578
|
containsAttended,
|
|
@@ -1709,12 +1584,16 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1709
1584
|
};
|
|
1710
1585
|
|
|
1711
1586
|
// src/components/SyncStatus/SyncStatus.tsx
|
|
1712
|
-
import { useSignals as
|
|
1713
|
-
import
|
|
1587
|
+
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1588
|
+
import React16, { useEffect as useEffect5, useState as useState10 } from "react";
|
|
1714
1589
|
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1590
|
+
import { EdgeStatus as EdgeStatus2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
1715
1591
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1592
|
+
import { useStream } from "@dxos/react-client/devtools";
|
|
1716
1593
|
import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
|
|
1717
|
-
import { Icon as Icon5, useTranslation as
|
|
1594
|
+
import { Icon as Icon5, Popover as Popover3, useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
1595
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
1596
|
+
import { Unit } from "@dxos/util";
|
|
1718
1597
|
|
|
1719
1598
|
// src/components/SyncStatus/save-tracker.ts
|
|
1720
1599
|
import { Context } from "@dxos/context";
|
|
@@ -1810,17 +1689,13 @@ var getIcon = (status) => {
|
|
|
1810
1689
|
// src/components/SyncStatus/SyncStatus.tsx
|
|
1811
1690
|
var SYNC_STALLED_TIMEOUT = 5e3;
|
|
1812
1691
|
var SyncStatus = () => {
|
|
1813
|
-
var _effect =
|
|
1692
|
+
var _effect = _useSignals16();
|
|
1814
1693
|
try {
|
|
1815
1694
|
const client = useClient9();
|
|
1816
1695
|
const state = useSyncState();
|
|
1817
|
-
const [saved, setSaved] =
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
setSaved(state2 === "saved");
|
|
1821
|
-
});
|
|
1822
|
-
}, []);
|
|
1823
|
-
return /* @__PURE__ */ React20.createElement(SyncStatusIndicator, {
|
|
1696
|
+
const [saved, setSaved] = useState10(true);
|
|
1697
|
+
useEffect5(() => createClientSaveTracker(client, (state2) => setSaved(state2 === "saved")), []);
|
|
1698
|
+
return /* @__PURE__ */ React16.createElement(SyncStatusIndicator, {
|
|
1824
1699
|
state,
|
|
1825
1700
|
saved
|
|
1826
1701
|
});
|
|
@@ -1829,9 +1704,9 @@ var SyncStatus = () => {
|
|
|
1829
1704
|
}
|
|
1830
1705
|
};
|
|
1831
1706
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1832
|
-
var _effect =
|
|
1707
|
+
var _effect = _useSignals16();
|
|
1833
1708
|
try {
|
|
1834
|
-
const { t } =
|
|
1709
|
+
const { t } = useTranslation16(meta.id);
|
|
1835
1710
|
const summary = getSyncSummary(state);
|
|
1836
1711
|
const offline = Object.values(state).length === 0;
|
|
1837
1712
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1842,8 +1717,8 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1842
1717
|
needsToUpload,
|
|
1843
1718
|
needsToDownload
|
|
1844
1719
|
});
|
|
1845
|
-
const [classNames, setClassNames] =
|
|
1846
|
-
|
|
1720
|
+
const [classNames, setClassNames] = useState10();
|
|
1721
|
+
useEffect5(() => {
|
|
1847
1722
|
setClassNames(void 0);
|
|
1848
1723
|
if (offline || !needsToUpload && !needsToDownload) {
|
|
1849
1724
|
return;
|
|
@@ -1858,39 +1733,310 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1858
1733
|
needsToDownload
|
|
1859
1734
|
]);
|
|
1860
1735
|
const title = t(`${status} label`);
|
|
1861
|
-
const icon = /* @__PURE__ */
|
|
1736
|
+
const icon = /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1862
1737
|
icon: getIcon(status),
|
|
1863
|
-
size: 4,
|
|
1864
1738
|
classNames
|
|
1865
1739
|
});
|
|
1866
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ React16.createElement(Popover3.Root, null, /* @__PURE__ */ React16.createElement(Popover3.Trigger, {
|
|
1741
|
+
asChild: true
|
|
1742
|
+
}, /* @__PURE__ */ React16.createElement(StatusBar.Item, {
|
|
1867
1743
|
title
|
|
1868
|
-
}, icon);
|
|
1744
|
+
}, icon)), /* @__PURE__ */ React16.createElement(Popover3.Portal, null, /* @__PURE__ */ React16.createElement(Popover3.Content, null, /* @__PURE__ */ React16.createElement(EdgeConnectionPopover, null), /* @__PURE__ */ React16.createElement(Popover3.Arrow, null))));
|
|
1745
|
+
} finally {
|
|
1746
|
+
_effect.f();
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
var useEdgeStatus2 = () => {
|
|
1750
|
+
const client = useClient9();
|
|
1751
|
+
const { status } = useStream(() => client.services.services.EdgeAgentService.queryEdgeStatus(), {});
|
|
1752
|
+
return status;
|
|
1753
|
+
};
|
|
1754
|
+
var EdgeConnectionPopover = () => {
|
|
1755
|
+
var _effect = _useSignals16();
|
|
1756
|
+
try {
|
|
1757
|
+
const status = useEdgeStatus2();
|
|
1758
|
+
const { t } = useTranslation16(meta.id);
|
|
1759
|
+
const isConnected = status?.state === EdgeStatus2.ConnectionState.CONNECTED;
|
|
1760
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
1761
|
+
className: "min-is-[240px] p-2"
|
|
1762
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1763
|
+
className: "flex items-center gap-2 mbe-2"
|
|
1764
|
+
}, /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1765
|
+
icon: isConnected ? "ph--check-circle--regular" : "ph--warning-circle--regular",
|
|
1766
|
+
classNames: mx(isConnected ? "text-successText" : "text-errorText animate-pulse")
|
|
1767
|
+
}), /* @__PURE__ */ React16.createElement("span", {
|
|
1768
|
+
className: "font-medium text-sm"
|
|
1769
|
+
}, isConnected ? t("sync edge connected label") : t("sync edge disconnected label"))), status?.state === EdgeStatus2.ConnectionState.NOT_CONNECTED && /* @__PURE__ */ React16.createElement("div", {
|
|
1770
|
+
className: "flex items-center gap-2 text-sm text-description"
|
|
1771
|
+
}, /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1772
|
+
icon: "ph--cloud-x--regular"
|
|
1773
|
+
}), /* @__PURE__ */ React16.createElement("span", null, t("sync no connection label"))), status?.state === EdgeStatus2.ConnectionState.CONNECTED && /* @__PURE__ */ React16.createElement("div", {
|
|
1774
|
+
className: "space-y-2"
|
|
1775
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1776
|
+
className: "flex items-center justify-between text-sm"
|
|
1777
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1778
|
+
className: "flex items-center gap-2 text-description"
|
|
1779
|
+
}, /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1780
|
+
icon: "ph--timer--regular"
|
|
1781
|
+
}), /* @__PURE__ */ React16.createElement("span", null, t("sync latency label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
|
|
1782
|
+
value: status.rtt,
|
|
1783
|
+
format: Unit.Millisecond
|
|
1784
|
+
})), /* @__PURE__ */ React16.createElement("div", {
|
|
1785
|
+
className: "flex items-center justify-between text-sm"
|
|
1786
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1787
|
+
className: "flex items-center gap-2 text-description"
|
|
1788
|
+
}, /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1789
|
+
icon: "ph--arrow-up--regular"
|
|
1790
|
+
}), /* @__PURE__ */ React16.createElement("span", null, t("sync upload label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
|
|
1791
|
+
value: status.rateBytesUp,
|
|
1792
|
+
format: Unit.Kilobyte,
|
|
1793
|
+
suffix: "/s"
|
|
1794
|
+
})), /* @__PURE__ */ React16.createElement("div", {
|
|
1795
|
+
className: "flex items-center justify-between text-sm"
|
|
1796
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1797
|
+
className: "flex items-center gap-2 text-sm text-description"
|
|
1798
|
+
}, /* @__PURE__ */ React16.createElement(Icon5, {
|
|
1799
|
+
icon: "ph--arrow-down--regular"
|
|
1800
|
+
}), /* @__PURE__ */ React16.createElement("span", null, t("sync download label"))), /* @__PURE__ */ React16.createElement(UnitValue, {
|
|
1801
|
+
value: status.rateBytesDown,
|
|
1802
|
+
format: Unit.Kilobyte,
|
|
1803
|
+
suffix: "/s"
|
|
1804
|
+
}))));
|
|
1805
|
+
} finally {
|
|
1806
|
+
_effect.f();
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
var UnitValue = ({ value: input, format, suffix }) => {
|
|
1810
|
+
var _effect = _useSignals16();
|
|
1811
|
+
try {
|
|
1812
|
+
const { formattedValue, unit } = format(input);
|
|
1813
|
+
return /* @__PURE__ */ React16.createElement("span", {
|
|
1814
|
+
className: "font-mono"
|
|
1815
|
+
}, formattedValue, /* @__PURE__ */ React16.createElement("span", {
|
|
1816
|
+
className: "mis-1 text-subdued"
|
|
1817
|
+
}, unit.symbol, suffix));
|
|
1869
1818
|
} finally {
|
|
1870
1819
|
_effect.f();
|
|
1871
1820
|
}
|
|
1872
1821
|
};
|
|
1873
1822
|
|
|
1823
|
+
// src/helpers/query.ts
|
|
1824
|
+
import * as Array2 from "effect/Array";
|
|
1825
|
+
import * as Effect3 from "effect/Effect";
|
|
1826
|
+
import * as EffectFunction from "effect/Function";
|
|
1827
|
+
import * as Match from "effect/Match";
|
|
1828
|
+
import * as Option4 from "effect/Option";
|
|
1829
|
+
import * as SchemaAST from "effect/SchemaAST";
|
|
1830
|
+
import { DXN, Filter as Filter2, Query as Query2 } from "@dxos/echo";
|
|
1831
|
+
import { ReferenceAnnotationId, getTypeAnnotation as getTypeAnnotation2, unwrapOptional } from "@dxos/echo/internal";
|
|
1832
|
+
import { log as log4 } from "@dxos/log";
|
|
1833
|
+
import { Person } from "@dxos/types";
|
|
1834
|
+
var __dxlog_file6 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/helpers/query.ts";
|
|
1835
|
+
var evalQuery = (queryString) => {
|
|
1836
|
+
const globals = {
|
|
1837
|
+
Query: Query2,
|
|
1838
|
+
Filter: Filter2,
|
|
1839
|
+
Person
|
|
1840
|
+
};
|
|
1841
|
+
try {
|
|
1842
|
+
return new Function(...Object.keys(globals), `return ${queryString}`)(...Object.values(globals));
|
|
1843
|
+
} catch (err) {
|
|
1844
|
+
log4.catch(err, void 0, {
|
|
1845
|
+
F: __dxlog_file6,
|
|
1846
|
+
L: 33,
|
|
1847
|
+
S: void 0,
|
|
1848
|
+
C: (f, a) => f(...a)
|
|
1849
|
+
});
|
|
1850
|
+
return Query2.select(Filter2.nothing());
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
var resolveSchemaWithClientAndSpace = (client, space, query) => {
|
|
1854
|
+
const resolve = Effect3.fn(function* (dxn) {
|
|
1855
|
+
const typename = DXN.parse(dxn).asTypeDXN()?.type;
|
|
1856
|
+
if (!typename) {
|
|
1857
|
+
return Option4.none();
|
|
1858
|
+
}
|
|
1859
|
+
const staticSchema = client.graph.schemaRegistry.getSchema(typename);
|
|
1860
|
+
if (staticSchema) {
|
|
1861
|
+
return Option4.some(staticSchema);
|
|
1862
|
+
}
|
|
1863
|
+
const query2 = space.db.schemaRegistry.query({
|
|
1864
|
+
typename
|
|
1865
|
+
});
|
|
1866
|
+
const schemas = yield* Effect3.promise(() => query2.run());
|
|
1867
|
+
return Array2.head(schemas).pipe(Option4.map((schema) => schema.snapshot));
|
|
1868
|
+
});
|
|
1869
|
+
return resolveSchema(query, resolve).pipe(Effect3.map((schema) => Option4.getOrUndefined(schema)), Effect3.runPromise);
|
|
1870
|
+
};
|
|
1871
|
+
var resolveSchema = (query, resolve) => {
|
|
1872
|
+
return Match.value(query).pipe(
|
|
1873
|
+
Match.withReturnType(),
|
|
1874
|
+
// TODO(wittjosiah): Reconcile with filter match?
|
|
1875
|
+
Match.when({
|
|
1876
|
+
type: "select"
|
|
1877
|
+
}, ({ filter }) => typenameFromFilter(filter).pipe(Option4.map((typename) => resolve(typename)), Option4.getOrElse(() => Effect3.succeed(Option4.none())))),
|
|
1878
|
+
Match.when({
|
|
1879
|
+
type: "filter"
|
|
1880
|
+
}, ({ filter }) => typenameFromFilter(filter).pipe(Option4.map((typename) => resolve(typename)), Option4.getOrElse(() => Effect3.succeed(Option4.none())))),
|
|
1881
|
+
Match.when({
|
|
1882
|
+
type: "reference-traversal"
|
|
1883
|
+
}, ({ anchor, property }) => resolveSchema(anchor, resolve).pipe(Effect3.map((base) => base.pipe(Option4.map((schema) => SchemaAST.getPropertySignatures(schema.ast)), Option4.flatMap((properties) => Array2.findFirst(properties, (p) => p.name === property)), Option4.flatMap((property2) => SchemaAST.getAnnotation(ReferenceAnnotationId)(unwrapOptional(property2))), Option4.map((annotation) => annotation.typename))), Effect3.flatMap(Option4.match({
|
|
1884
|
+
onNone: () => Effect3.succeed(Option4.none()),
|
|
1885
|
+
onSome: (typename) => resolve(DXN.fromTypename(typename).toString())
|
|
1886
|
+
})))),
|
|
1887
|
+
Match.when({
|
|
1888
|
+
type: "relation",
|
|
1889
|
+
filter: Match.defined
|
|
1890
|
+
}, ({ filter }) => typenameFromFilter(filter).pipe(Option4.map((typename) => resolve(typename)), Option4.getOrElse(() => Effect3.succeed(Option4.none())))),
|
|
1891
|
+
Match.when({
|
|
1892
|
+
type: "relation-traversal"
|
|
1893
|
+
}, ({ anchor, direction }) => resolveSchema(anchor, resolve).pipe(Effect3.map((base) => base.pipe(Option4.map((schema) => getTypeAnnotation2(schema)), Option4.flatMap((annotation) => Option4.fromNullable(direction === "source" ? annotation?.sourceSchema : annotation?.targetSchema)))), Effect3.flatMap(Option4.match({
|
|
1894
|
+
onNone: () => Effect3.succeed(Option4.none()),
|
|
1895
|
+
onSome: (typename) => resolve(typename)
|
|
1896
|
+
})))),
|
|
1897
|
+
Match.when({
|
|
1898
|
+
type: "options"
|
|
1899
|
+
}, ({ query: query2 }) => resolveSchema(query2, resolve)),
|
|
1900
|
+
Match.orElse((_q) => {
|
|
1901
|
+
return Effect3.succeed(Option4.none());
|
|
1902
|
+
})
|
|
1903
|
+
);
|
|
1904
|
+
};
|
|
1905
|
+
var typenameFromFilter = (filter) => Match.value(filter).pipe(Match.withReturnType(), Match.when({
|
|
1906
|
+
type: "object"
|
|
1907
|
+
}, ({ typename }) => Option4.fromNullable(typename)), Match.when({
|
|
1908
|
+
type: "and"
|
|
1909
|
+
}, ({ filters }) => EffectFunction.pipe(filters, Array2.map(typenameFromFilter), Array2.findFirst(Option4.isSome), Option4.flatten)), Match.when({
|
|
1910
|
+
type: "or"
|
|
1911
|
+
}, ({ filters }) => EffectFunction.pipe(filters, Array2.map(typenameFromFilter), Array2.findFirst(Option4.isSome), Option4.flatten)), Match.orElse(() => Option4.none()));
|
|
1912
|
+
var getQueryTarget = (query, space) => {
|
|
1913
|
+
return Match.value(query).pipe(Match.when({
|
|
1914
|
+
type: "options"
|
|
1915
|
+
}, ({ options }) => {
|
|
1916
|
+
return Option4.fromNullable(options.queues).pipe(Option4.flatMap((queues) => Array2.head(queues)), Option4.flatMap((queueDxn) => Option4.fromNullable(DXN.tryParse(queueDxn))), Option4.flatMap((queueDxn) => Option4.fromNullable(space?.queues.get(queueDxn))), Option4.getOrElse(() => space));
|
|
1917
|
+
}), Match.orElse(() => space));
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1920
|
+
// src/components/ViewEditor.tsx
|
|
1921
|
+
import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
|
|
1922
|
+
import * as Schema2 from "effect/Schema";
|
|
1923
|
+
import React17, { useCallback as useCallback11, useState as useState11 } from "react";
|
|
1924
|
+
import { createIntent as createIntent10 } from "@dxos/app-framework";
|
|
1925
|
+
import { useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework/react";
|
|
1926
|
+
import { DXN as DXN2, Filter as Filter3, Obj as Obj6, Query as Query3, Tag, Type as Type3 } from "@dxos/echo";
|
|
1927
|
+
import { useClient as useClient10 } from "@dxos/react-client";
|
|
1928
|
+
import { getSpace as getSpace4, useQuery as useQuery3 } from "@dxos/react-client/echo";
|
|
1929
|
+
import { useAsyncEffect } from "@dxos/react-ui";
|
|
1930
|
+
import { ViewEditor as NaturalViewEditor } from "@dxos/react-ui-form";
|
|
1931
|
+
import { View } from "@dxos/schema";
|
|
1932
|
+
var ViewEditor = ({ view }) => {
|
|
1933
|
+
var _effect = _useSignals17();
|
|
1934
|
+
try {
|
|
1935
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher10();
|
|
1936
|
+
const client = useClient10();
|
|
1937
|
+
const space = getSpace4(view);
|
|
1938
|
+
const [schema, setSchema] = useState11(() => Schema2.Struct({}));
|
|
1939
|
+
const tags = useQuery3(space, Filter3.type(Tag.Tag));
|
|
1940
|
+
const types = useTypeOptions({
|
|
1941
|
+
space,
|
|
1942
|
+
annotation: [
|
|
1943
|
+
"dynamic",
|
|
1944
|
+
"limited-static",
|
|
1945
|
+
"object-form"
|
|
1946
|
+
]
|
|
1947
|
+
});
|
|
1948
|
+
useAsyncEffect(async () => {
|
|
1949
|
+
if (!view?.query || !space) {
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
const foundSchema = await resolveSchemaWithClientAndSpace(client, space, view.query.ast);
|
|
1953
|
+
if (foundSchema && foundSchema !== schema) {
|
|
1954
|
+
setSchema(() => foundSchema);
|
|
1955
|
+
}
|
|
1956
|
+
}, [
|
|
1957
|
+
client,
|
|
1958
|
+
space,
|
|
1959
|
+
view,
|
|
1960
|
+
schema
|
|
1961
|
+
]);
|
|
1962
|
+
const handleQueryChanged = useCallback11(async (newQuery, target) => {
|
|
1963
|
+
if (!view || !space) {
|
|
1964
|
+
return;
|
|
1965
|
+
}
|
|
1966
|
+
const queue = target && DXN2.tryParse(target) ? target : void 0;
|
|
1967
|
+
const query = queue ? Query3.fromAst(newQuery).options({
|
|
1968
|
+
queues: [
|
|
1969
|
+
queue
|
|
1970
|
+
]
|
|
1971
|
+
}) : Query3.fromAst(newQuery);
|
|
1972
|
+
view.query.ast = query.ast;
|
|
1973
|
+
const newSchema = await resolveSchemaWithClientAndSpace(client, space, query.ast);
|
|
1974
|
+
if (!newSchema) {
|
|
1975
|
+
return;
|
|
1976
|
+
}
|
|
1977
|
+
const newView = View.make({
|
|
1978
|
+
query,
|
|
1979
|
+
jsonSchema: Type3.toJsonSchema(newSchema),
|
|
1980
|
+
presentation: Obj6.make(Type3.Expando, {})
|
|
1981
|
+
});
|
|
1982
|
+
view.projection = Obj6.getSnapshot(newView).projection;
|
|
1983
|
+
setSchema(() => newSchema);
|
|
1984
|
+
}, [
|
|
1985
|
+
view,
|
|
1986
|
+
schema
|
|
1987
|
+
]);
|
|
1988
|
+
const handleDelete = useCallback11((fieldId) => {
|
|
1989
|
+
void dispatch(createIntent10(SpaceAction.DeleteField, {
|
|
1990
|
+
view,
|
|
1991
|
+
fieldId
|
|
1992
|
+
}));
|
|
1993
|
+
}, [
|
|
1994
|
+
dispatch,
|
|
1995
|
+
view
|
|
1996
|
+
]);
|
|
1997
|
+
if (!space || !schema) {
|
|
1998
|
+
return null;
|
|
1999
|
+
}
|
|
2000
|
+
return /* @__PURE__ */ React17.createElement(NaturalViewEditor, {
|
|
2001
|
+
registry: space.db.schemaRegistry,
|
|
2002
|
+
schema,
|
|
2003
|
+
view,
|
|
2004
|
+
mode: "query",
|
|
2005
|
+
outerSpacing: false,
|
|
2006
|
+
tags,
|
|
2007
|
+
types,
|
|
2008
|
+
onQueryChanged: handleQueryChanged,
|
|
2009
|
+
onDelete: Type3.isMutable(schema) ? handleDelete : void 0
|
|
2010
|
+
});
|
|
2011
|
+
} finally {
|
|
2012
|
+
_effect.f();
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
// src/components/index.ts
|
|
2017
|
+
import { lazy } from "react";
|
|
2018
|
+
var CollectionArticle = lazy(() => import("./CollectionArticle-WTHWY4YS.mjs"));
|
|
2019
|
+
var ObjectDetailsPanel = lazy(() => import("./ObjectDetailsPanel-2BRUBHP6.mjs"));
|
|
2020
|
+
var ObjectSettingsContainer = lazy(() => import("./ObjectSettings-5LLWCVEK.mjs"));
|
|
2021
|
+
var RecordArticle = lazy(() => import("./RecordArticle-SXDRWTTU.mjs"));
|
|
2022
|
+
|
|
1874
2023
|
export {
|
|
1875
2024
|
AwaitingObject,
|
|
1876
2025
|
CREATE_OBJECT_DIALOG,
|
|
1877
2026
|
CreateObjectDialog,
|
|
1878
2027
|
CREATE_SPACE_DIALOG,
|
|
1879
2028
|
CreateSpaceDialog,
|
|
1880
|
-
CollectionMain,
|
|
1881
2029
|
CollectionSection,
|
|
1882
2030
|
JOIN_DIALOG,
|
|
1883
2031
|
JoinDialog,
|
|
1884
2032
|
MembersContainer,
|
|
1885
2033
|
MenuFooter,
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
POPOVER_RENAME_SPACE,
|
|
1891
|
-
PopoverRenameSpace,
|
|
1892
|
-
useQuerySpaceSchemas,
|
|
2034
|
+
OBJECT_RENAME_POPOVER,
|
|
2035
|
+
ObjectRenamePopover,
|
|
2036
|
+
SPACE_RENAME_POPOVER,
|
|
2037
|
+
SpaceRenamePopover,
|
|
1893
2038
|
SchemaContainer,
|
|
2039
|
+
useQuerySpaceSchemas,
|
|
1894
2040
|
SpacePresence,
|
|
1895
2041
|
FullPresence,
|
|
1896
2042
|
SmallPresenceLive,
|
|
@@ -1900,16 +2046,13 @@ export {
|
|
|
1900
2046
|
InlineSyncStatus,
|
|
1901
2047
|
SyncStatus,
|
|
1902
2048
|
SyncStatusIndicator,
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
SpaceSettings,
|
|
1912
|
-
SpaceState,
|
|
1913
|
-
SpacesReady
|
|
2049
|
+
evalQuery,
|
|
2050
|
+
resolveSchemaWithClientAndSpace,
|
|
2051
|
+
getQueryTarget,
|
|
2052
|
+
ViewEditor,
|
|
2053
|
+
CollectionArticle,
|
|
2054
|
+
ObjectDetailsPanel,
|
|
2055
|
+
ObjectSettingsContainer,
|
|
2056
|
+
RecordArticle
|
|
1914
2057
|
};
|
|
1915
|
-
//# sourceMappingURL=chunk-
|
|
2058
|
+
//# sourceMappingURL=chunk-CKACGS7T.mjs.map
|