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