@dxos/plugin-space 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446
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/app-graph-builder-GMFCSOLG.mjs +315 -0
- package/dist/lib/browser/app-graph-builder-GMFCSOLG.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-VRU57AEZ.mjs → app-graph-serializer-DSF2U3A5.mjs} +10 -10
- package/dist/lib/browser/app-graph-serializer-DSF2U3A5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UBSVH2NQ.mjs → chunk-5BDV575R.mjs} +10 -21
- package/dist/lib/browser/chunk-5BDV575R.mjs.map +7 -0
- package/dist/lib/browser/chunk-AYW4IDRT.mjs +275 -0
- package/dist/lib/browser/chunk-AYW4IDRT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-43UQWMD3.mjs → chunk-JZXWPMLA.mjs} +740 -390
- package/dist/lib/browser/chunk-JZXWPMLA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IQFFOAWD.mjs → chunk-LO5UL6RU.mjs} +173 -78
- package/dist/lib/browser/chunk-LO5UL6RU.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-ANRJHNMQ.mjs → identity-created-JR7BNXFH.mjs} +5 -5
- package/dist/lib/browser/identity-created-JR7BNXFH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +47 -30
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-KRINV5QI.mjs → intent-resolver-RKYILWWQ.mjs} +106 -98
- package/dist/lib/browser/intent-resolver-RKYILWWQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-J3SP2HVW.mjs → react-root-6H7NX2M2.mjs} +4 -5
- package/dist/lib/{node-esm/react-root-S2LW4FS7.mjs.map → browser/react-root-6H7NX2M2.mjs.map} +1 -1
- package/dist/lib/browser/{react-surface-J7T2IMH4.mjs → react-surface-7AGLOVMK.mjs} +53 -120
- package/dist/lib/browser/react-surface-7AGLOVMK.mjs.map +7 -0
- package/dist/lib/browser/schema-FHTA26SW.mjs +24 -0
- package/dist/lib/browser/schema-FHTA26SW.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-MYC4LTQD.mjs → schema-tools-YAXPRIXP.mjs} +22 -22
- package/dist/lib/browser/schema-tools-YAXPRIXP.mjs.map +7 -0
- package/dist/lib/browser/{settings-G24447B7.mjs → settings-PJPTJUPE.mjs} +4 -4
- package/dist/lib/browser/settings-PJPTJUPE.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-5I3RKYTT.mjs → spaces-ready-BSSP7HHG.mjs} +17 -18
- package/dist/lib/browser/spaces-ready-BSSP7HHG.mjs.map +7 -0
- package/dist/lib/browser/{state-SI4B5GHC.mjs → state-X7VLCC6E.mjs} +4 -2
- package/dist/lib/browser/state-X7VLCC6E.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -7
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs +318 -0
- package/dist/lib/node/app-graph-builder-DPY7AUZE.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-VLBCR3IX.cjs → app-graph-serializer-JELGJUAY.cjs} +22 -22
- package/dist/lib/node/app-graph-serializer-JELGJUAY.cjs.map +7 -0
- package/dist/lib/node/{chunk-MXBE2VET.cjs → chunk-3GKCNADA.cjs} +751 -412
- package/dist/lib/node/chunk-3GKCNADA.cjs.map +7 -0
- package/dist/lib/node/{chunk-5YHUQJVB.cjs → chunk-PU2EYH4E.cjs} +14 -25
- package/dist/lib/node/chunk-PU2EYH4E.cjs.map +7 -0
- package/dist/lib/node/{chunk-SCATWJKX.cjs → chunk-TUZWEPGX.cjs} +198 -100
- package/dist/lib/node/chunk-TUZWEPGX.cjs.map +7 -0
- package/dist/lib/node/chunk-WDEIFDTX.cjs +300 -0
- package/dist/lib/node/chunk-WDEIFDTX.cjs.map +7 -0
- package/dist/lib/node/{identity-created-NIPYGVG3.cjs → identity-created-XU4HFV2T.cjs} +7 -7
- package/dist/lib/node/identity-created-XU4HFV2T.cjs.map +7 -0
- package/dist/lib/node/index.cjs +97 -79
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-MJVRY6YE.cjs → intent-resolver-VJ7YV74L.cjs} +151 -144
- package/dist/lib/node/intent-resolver-VJ7YV74L.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-M4BZ6VXB.cjs → react-root-TEL5RW3N.cjs} +8 -9
- package/dist/lib/node/{react-root-M4BZ6VXB.cjs.map → react-root-TEL5RW3N.cjs.map} +1 -1
- package/dist/lib/node/{react-surface-RYKSYYKM.cjs → react-surface-2H3S5TY5.cjs} +75 -142
- package/dist/lib/node/react-surface-2H3S5TY5.cjs.map +7 -0
- package/dist/lib/node/{schema-defs-2HJLXSNK.cjs → schema-PPJ5BZ3A.cjs} +11 -13
- package/dist/lib/node/schema-PPJ5BZ3A.cjs.map +7 -0
- package/dist/lib/node/{schema-tools-OE3MFYYH.cjs → schema-tools-BLIMOZYY.cjs} +24 -24
- package/dist/lib/node/schema-tools-BLIMOZYY.cjs.map +7 -0
- package/dist/lib/node/{settings-AFWO4AWK.cjs → settings-WVFP2UEP.cjs} +7 -7
- package/dist/lib/node/settings-WVFP2UEP.cjs.map +7 -0
- package/dist/lib/node/{spaces-ready-BMPXSFHF.cjs → spaces-ready-7DNZSUOG.cjs} +24 -25
- package/dist/lib/node/spaces-ready-7DNZSUOG.cjs.map +7 -0
- package/dist/lib/node/{state-L2ZSDKLS.cjs → state-5KX6WBJH.cjs} +7 -5
- package/dist/lib/node/state-5KX6WBJH.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +12 -18
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs +316 -0
- package/dist/lib/node-esm/app-graph-builder-42IGWRPL.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-GEUYYXKD.mjs → app-graph-serializer-FXONFKOE.mjs} +10 -10
- package/dist/lib/node-esm/app-graph-serializer-FXONFKOE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-5NIBYPVF.mjs → chunk-3ZOUV4DF.mjs} +10 -21
- package/dist/lib/node-esm/chunk-3ZOUV4DF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FI3WV22Y.mjs → chunk-BEWBZ4Q4.mjs} +740 -390
- package/dist/lib/node-esm/chunk-BEWBZ4Q4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs +276 -0
- package/dist/lib/node-esm/chunk-FC4UHDPL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-S2W6HS4A.mjs → chunk-ZGLK25WQ.mjs} +173 -78
- package/dist/lib/node-esm/chunk-ZGLK25WQ.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-O5X2FFWU.mjs → identity-created-WJKAS2PV.mjs} +5 -5
- package/dist/lib/node-esm/identity-created-WJKAS2PV.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +47 -30
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-JT6EB47M.mjs → intent-resolver-ZFNSA4CM.mjs} +106 -98
- package/dist/lib/node-esm/intent-resolver-ZFNSA4CM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-S2LW4FS7.mjs → react-root-PRBJMWLQ.mjs} +4 -5
- package/dist/lib/node-esm/{react-surface-ZNNMO7QQ.mjs → react-surface-RCZG2PNF.mjs} +53 -120
- package/dist/lib/node-esm/react-surface-RCZG2PNF.mjs.map +7 -0
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs +25 -0
- package/dist/lib/node-esm/schema-OUZKVYM5.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-YTJLA3NQ.mjs → schema-tools-IU7EX5A5.mjs} +22 -22
- package/dist/lib/node-esm/schema-tools-IU7EX5A5.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-MJVSCOI4.mjs → settings-FJZPC2TV.mjs} +4 -4
- package/dist/lib/node-esm/settings-FJZPC2TV.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-XKG57SL5.mjs → spaces-ready-7X5PGB2V.mjs} +17 -18
- package/dist/lib/node-esm/spaces-ready-7X5PGB2V.mjs.map +7 -0
- package/dist/lib/node-esm/{state-QUDYGEU6.mjs → state-Z6E2YTNC.mjs} +4 -2
- package/dist/lib/node-esm/state-Z6E2YTNC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -7
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +179 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts +2 -2
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +184 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +3 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-tools.d.ts +2 -2
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema.d.ts +4 -0
- package/dist/types/src/capabilities/schema.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready.d.ts +2 -2
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- 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/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +2 -2
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettingsContainer/AdvancedObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettingsContainer/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettingsContainer/ObjectSettingsContainer.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettingsContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverAddSpace.d.ts +4 -0
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +1 -0
- package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/ShareSpaceButton.d.ts +9 -0
- package/dist/types/src/components/ShareSpaceButton.d.ts.map +1 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +10 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts +7 -0
- package/dist/types/src/components/SpaceSettings/SpacePropertiesForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +2 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/index.d.ts +1 -0
- package/dist/types/src/components/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/Space.d.ts +13 -0
- package/dist/types/src/components/SyncStatus/Space.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +8 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts +9 -0
- package/dist/types/src/components/SyncStatus/SyncStatusDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/save-tracker.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/status.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/sync-state.d.ts +18 -0
- package/dist/types/src/components/SyncStatus/sync-state.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -3
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +242 -17
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +8 -9
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +110 -205
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +146 -157
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +20 -36
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -51
- package/src/SpacePlugin.tsx +20 -11
- package/src/capabilities/app-graph-builder.ts +230 -377
- package/src/capabilities/app-graph-serializer.ts +8 -8
- package/src/capabilities/identity-created.ts +5 -5
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/intent-resolver.ts +110 -94
- package/src/capabilities/react-surface.tsx +50 -111
- package/src/capabilities/schema-tool.test.ts +3 -2
- package/src/capabilities/schema-tools.ts +25 -25
- package/src/capabilities/schema.ts +27 -0
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +14 -16
- package/src/capabilities/state.ts +5 -3
- package/src/components/AwaitingObject.tsx +1 -1
- package/src/components/CollectionMain.tsx +5 -2
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectDialog.tsx +4 -4
- package/src/components/CreateDialog/CreateObjectPanel.tsx +25 -3
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +3 -6
- package/src/components/MembersContainer.stories.tsx +5 -1
- package/src/components/MembersContainer.tsx +54 -80
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/AdvancedObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/BaseObjectSettings.tsx +2 -2
- package/src/components/{ObjectSettings → ObjectSettingsContainer}/ObjectSettingsContainer.tsx +4 -4
- package/src/components/PersistenceStatus.tsx +14 -11
- package/src/components/PopoverAddSpace.tsx +46 -0
- package/src/components/PopoverRenameObject.tsx +8 -14
- package/src/components/PopoverRenameSpace.tsx +0 -8
- package/src/components/ShareSpaceButton.stories.tsx +27 -0
- package/src/components/ShareSpaceButton.tsx +32 -0
- package/src/components/SpacePluginSettings.tsx +2 -27
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +65 -60
- package/src/components/SpaceSettings/{SpaceSettingsContainer.stories.tsx → SpacePropertiesForm.stories.tsx} +6 -6
- package/src/components/SpaceSettings/SpacePropertiesForm.tsx +136 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +39 -159
- package/src/components/SpaceSettings/index.ts +1 -0
- package/src/components/SyncStatus/InlineSyncStatus.tsx +24 -15
- package/src/components/SyncStatus/Space.tsx +133 -0
- package/src/components/SyncStatus/SyncStatus.tsx +69 -6
- package/src/components/SyncStatus/SyncStatusDetail.stories.tsx +89 -0
- package/src/components/SyncStatus/sync-state.ts +101 -0
- package/src/components/index.ts +3 -2
- package/src/hooks/index.ts +0 -2
- package/src/hooks/usePath.ts +6 -9
- package/src/index.ts +0 -1
- package/src/translations.ts +7 -19
- package/src/types/collection.ts +4 -6
- package/src/types/thread.ts +8 -14
- package/src/types/types.ts +101 -115
- package/src/util.tsx +172 -75
- package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs +0 -328
- package/dist/lib/browser/app-graph-builder-7X3SIPCD.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-VRU57AEZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-43UQWMD3.mjs.map +0 -7
- package/dist/lib/browser/chunk-AR5R2F6B.mjs +0 -88
- package/dist/lib/browser/chunk-AR5R2F6B.mjs.map +0 -7
- package/dist/lib/browser/chunk-CY35NLWL.mjs +0 -296
- package/dist/lib/browser/chunk-CY35NLWL.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQFFOAWD.mjs.map +0 -7
- package/dist/lib/browser/chunk-UBSVH2NQ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-ANRJHNMQ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-KRINV5QI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-J7T2IMH4.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs +0 -26
- package/dist/lib/browser/schema-defs-OCBY7APN.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-MYC4LTQD.mjs.map +0 -7
- package/dist/lib/browser/settings-G24447B7.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-5I3RKYTT.mjs.map +0 -7
- package/dist/lib/browser/state-SI4B5GHC.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs +0 -328
- package/dist/lib/node/app-graph-builder-C2ISDMSL.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-VLBCR3IX.cjs.map +0 -7
- package/dist/lib/node/chunk-5YHUQJVB.cjs.map +0 -7
- package/dist/lib/node/chunk-DQN4ZQDW.cjs +0 -119
- package/dist/lib/node/chunk-DQN4ZQDW.cjs.map +0 -7
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs +0 -324
- package/dist/lib/node/chunk-K6ZO4WDJ.cjs.map +0 -7
- package/dist/lib/node/chunk-MXBE2VET.cjs.map +0 -7
- package/dist/lib/node/chunk-SCATWJKX.cjs.map +0 -7
- package/dist/lib/node/identity-created-NIPYGVG3.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-MJVRY6YE.cjs.map +0 -7
- package/dist/lib/node/react-surface-RYKSYYKM.cjs.map +0 -7
- package/dist/lib/node/schema-defs-2HJLXSNK.cjs.map +0 -7
- package/dist/lib/node/schema-tools-OE3MFYYH.cjs.map +0 -7
- package/dist/lib/node/settings-AFWO4AWK.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-BMPXSFHF.cjs.map +0 -7
- package/dist/lib/node/state-L2ZSDKLS.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs +0 -329
- package/dist/lib/node-esm/app-graph-builder-WVCQZ324.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-GEUYYXKD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5NIBYPVF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs +0 -297
- package/dist/lib/node-esm/chunk-CLRCW6PU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FI3WV22Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs +0 -90
- package/dist/lib/node-esm/chunk-HNKAG5CX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-S2W6HS4A.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-O5X2FFWU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JT6EB47M.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ZNNMO7QQ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-B74N3GQ5.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-YTJLA3NQ.mjs.map +0 -7
- package/dist/lib/node-esm/settings-MJVSCOI4.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-XKG57SL5.mjs.map +0 -7
- package/dist/lib/node-esm/state-QUDYGEU6.mjs.map +0 -7
- package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/SchemaContainer.d.ts +0 -13
- package/dist/types/src/components/SchemaContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +0 -7
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts +0 -4
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +0 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +0 -14
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +0 -1
- package/src/capabilities/schema-defs.ts +0 -30
- package/src/components/SchemaContainer.tsx +0 -59
- package/src/hooks/useActiveSpace.ts +0 -20
- package/src/hooks/useInputSurfaceLookup.tsx +0 -31
- /package/dist/lib/{browser/react-root-J3SP2HVW.mjs.map → node-esm/react-root-PRBJMWLQ.mjs.map} +0 -0
- /package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/ForeignKeys.d.ts +0 -0
- /package/dist/types/src/components/{ObjectSettings → ObjectSettingsContainer}/index.d.ts +0 -0
- /package/src/components/{ObjectSettings → ObjectSettingsContainer}/ForeignKeys.tsx +0 -0
- /package/src/components/{ObjectSettings → ObjectSettingsContainer}/index.ts +0 -0
|
@@ -2,43 +2,43 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Array, Option, pipe } from 'effect';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, contributes, createIntent, type PluginContext } from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, type PluginsContext } from '@dxos/app-framework';
|
|
9
6
|
import {
|
|
10
7
|
Expando,
|
|
11
8
|
Filter,
|
|
9
|
+
FQ_ID_LENGTH,
|
|
12
10
|
getSpace,
|
|
13
11
|
isEchoObject,
|
|
12
|
+
isSpace,
|
|
13
|
+
OBJECT_ID_LENGTH,
|
|
14
|
+
type ReactiveEchoObject,
|
|
15
|
+
SPACE_ID_LENGTH,
|
|
14
16
|
SpaceState,
|
|
15
17
|
type Space,
|
|
16
|
-
isSpace,
|
|
17
|
-
type QueryResult,
|
|
18
18
|
} from '@dxos/client/echo';
|
|
19
|
+
import { isDeleted } from '@dxos/live-object';
|
|
19
20
|
import { log } from '@dxos/log';
|
|
20
21
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
22
|
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
22
|
-
import { createExtension,
|
|
23
|
+
import { createExtension, toSignal, type Node, type InvokeParams } from '@dxos/plugin-graph';
|
|
23
24
|
import { isNonNullable } from '@dxos/util';
|
|
24
25
|
|
|
25
26
|
import { SpaceCapabilities } from './capabilities';
|
|
26
|
-
import { getActiveSpace } from '../hooks';
|
|
27
27
|
import { SPACE_PLUGIN } from '../meta';
|
|
28
|
-
import { CollectionType,
|
|
28
|
+
import { CollectionType, SpaceAction, type SpaceSettingsProps } from '../types';
|
|
29
29
|
import {
|
|
30
30
|
constructObjectActions,
|
|
31
31
|
constructSpaceActions,
|
|
32
32
|
constructSpaceNode,
|
|
33
33
|
createObjectNode,
|
|
34
|
-
|
|
34
|
+
memoizeQuery,
|
|
35
35
|
SHARED,
|
|
36
36
|
SPACES,
|
|
37
37
|
} from '../util';
|
|
38
38
|
|
|
39
|
-
export default (context:
|
|
39
|
+
export default (context: PluginsContext) => {
|
|
40
40
|
const resolve = (typename: string) =>
|
|
41
|
-
context.
|
|
41
|
+
context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
42
42
|
|
|
43
43
|
const spacesNode = {
|
|
44
44
|
id: SPACES,
|
|
@@ -53,13 +53,13 @@ export default (context: PluginContext) => {
|
|
|
53
53
|
disabled: true,
|
|
54
54
|
childrenPersistenceClass: 'echo',
|
|
55
55
|
onRearrangeChildren: async (nextOrder: Space[]) => {
|
|
56
|
-
const { graph } = context.
|
|
57
|
-
const client = context.
|
|
56
|
+
const { graph } = context.requestCapability(Capabilities.AppGraph);
|
|
57
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
58
58
|
|
|
59
59
|
// NOTE: This is needed to ensure order is updated by next animation frame.
|
|
60
60
|
// TODO(wittjosiah): Is there a better way to do this?
|
|
61
61
|
// If not, graph should be passed as an argument to the extension.
|
|
62
|
-
graph.
|
|
62
|
+
graph._sortEdges(
|
|
63
63
|
SPACES,
|
|
64
64
|
'outbound',
|
|
65
65
|
nextOrder.map(({ id }) => id),
|
|
@@ -67,7 +67,7 @@ export default (context: PluginContext) => {
|
|
|
67
67
|
|
|
68
68
|
const {
|
|
69
69
|
objects: [spacesOrder],
|
|
70
|
-
} = await client.spaces.default.db.query(Filter.
|
|
70
|
+
} = await client.spaces.default.db.query(Filter.schema(Expando, { key: SHARED })).run();
|
|
71
71
|
if (spacesOrder) {
|
|
72
72
|
spacesOrder.order = nextOrder.map(({ id }) => id);
|
|
73
73
|
} else {
|
|
@@ -82,405 +82,258 @@ export default (context: PluginContext) => {
|
|
|
82
82
|
createExtension({
|
|
83
83
|
id: `${SPACE_PLUGIN}/primary-actions`,
|
|
84
84
|
position: 'hoist',
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: SpaceAction.Join._tag,
|
|
106
|
-
data: async () => {
|
|
107
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
108
|
-
await dispatch(createIntent(SpaceAction.Join));
|
|
109
|
-
},
|
|
110
|
-
properties: {
|
|
111
|
-
label: ['join space label', { ns: SPACE_PLUGIN }],
|
|
112
|
-
icon: 'ph--sign-in--regular',
|
|
113
|
-
testId: 'spacePlugin.joinSpace',
|
|
114
|
-
disposition: 'menu',
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: SpaceAction.OpenMembers._tag,
|
|
119
|
-
data: async () => {
|
|
120
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
121
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
122
|
-
const space = getActiveSpace(context) ?? client.spaces.default;
|
|
123
|
-
await dispatch(createIntent(SpaceAction.OpenMembers, { space }));
|
|
124
|
-
},
|
|
125
|
-
properties: {
|
|
126
|
-
label: ['share space label', { ns: SPACE_PLUGIN }],
|
|
127
|
-
icon: 'ph--users--regular',
|
|
128
|
-
testId: 'spacePlugin.shareSpace',
|
|
129
|
-
keyBinding: {
|
|
130
|
-
macos: 'meta+.',
|
|
131
|
-
windows: 'alt+.',
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: SpaceAction.OpenSettings._tag,
|
|
137
|
-
data: async () => {
|
|
138
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
139
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
140
|
-
const space = getActiveSpace(context) ?? client.spaces.default;
|
|
141
|
-
await dispatch(createIntent(SpaceAction.OpenSettings, { space }));
|
|
142
|
-
},
|
|
143
|
-
properties: {
|
|
144
|
-
label: ['open current space settings label', { ns: SPACE_PLUGIN }],
|
|
145
|
-
icon: 'ph--faders--regular',
|
|
146
|
-
keyBinding: {
|
|
147
|
-
macos: 'meta+shift+,',
|
|
148
|
-
windows: 'ctrl+shift+,',
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
]),
|
|
153
|
-
Option.getOrElse(() => []),
|
|
154
|
-
),
|
|
155
|
-
),
|
|
85
|
+
filter: (node): node is Node<null> => node.id === 'root',
|
|
86
|
+
actions: () => [
|
|
87
|
+
{
|
|
88
|
+
id: SpaceAction.AddSpace._tag,
|
|
89
|
+
data: async (params: InvokeParams) => {
|
|
90
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
91
|
+
await dispatch(createIntent(SpaceAction.AddSpace));
|
|
92
|
+
},
|
|
93
|
+
properties: {
|
|
94
|
+
label: ['add space label', { ns: SPACE_PLUGIN }],
|
|
95
|
+
icon: 'ph--plus--regular',
|
|
96
|
+
testId: 'spacePlugin.addSpace',
|
|
97
|
+
disposition: 'item',
|
|
98
|
+
position: 'fallback',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
156
102
|
}),
|
|
157
103
|
|
|
158
104
|
// Create spaces group node.
|
|
159
105
|
createExtension({
|
|
160
106
|
id: `${SPACE_PLUGIN}/root`,
|
|
161
107
|
position: 'hoist',
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
get(node),
|
|
166
|
-
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
167
|
-
Option.map(() => [spacesNode]),
|
|
168
|
-
Option.getOrElse(() => []),
|
|
169
|
-
),
|
|
170
|
-
),
|
|
171
|
-
// resolver: ({ id }) => (id === SPACES ? spacesNode : undefined),
|
|
108
|
+
filter: (node): node is Node<null> => node.id === 'root',
|
|
109
|
+
connector: () => [spacesNode],
|
|
110
|
+
resolver: ({ id }) => (id === SPACES ? spacesNode : undefined),
|
|
172
111
|
}),
|
|
173
112
|
|
|
174
113
|
// Create space nodes.
|
|
175
114
|
createExtension({
|
|
176
115
|
id: SPACES,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return [];
|
|
232
|
-
}
|
|
233
|
-
}),
|
|
234
|
-
Option.getOrElse(() => []),
|
|
235
|
-
),
|
|
116
|
+
filter: (node): node is Node<null> => node.id === SPACES,
|
|
117
|
+
connector: () => {
|
|
118
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
119
|
+
const spaces = toSignal(
|
|
120
|
+
(onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
|
|
121
|
+
() => client.spaces.get(),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const isReady = toSignal(
|
|
125
|
+
(onChange) => client.spaces.isReady.subscribe(() => onChange()).unsubscribe,
|
|
126
|
+
() => client.spaces.isReady.get(),
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
if (!spaces || !isReady) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
134
|
+
const settings = context
|
|
135
|
+
.requestCapabilities(Capabilities.SettingsStore)[0]
|
|
136
|
+
?.getStore<SpaceSettingsProps>(SPACE_PLUGIN)?.value;
|
|
137
|
+
|
|
138
|
+
// TODO(wittjosiah): During client reset, accessing default space throws.
|
|
139
|
+
try {
|
|
140
|
+
const [spacesOrder] = memoizeQuery(client.spaces.default, Filter.schema(Expando, { key: SHARED }));
|
|
141
|
+
const order: string[] = spacesOrder?.order ?? [];
|
|
142
|
+
const orderMap = new Map(order.map((id, index) => [id, index]));
|
|
143
|
+
return [
|
|
144
|
+
...spaces
|
|
145
|
+
.filter((space) => orderMap.has(space.id))
|
|
146
|
+
.sort((a, b) => orderMap.get(a.id)! - orderMap.get(b.id)!),
|
|
147
|
+
...spaces.filter((space) => !orderMap.has(space.id)),
|
|
148
|
+
]
|
|
149
|
+
.filter((space) => (settings?.showHidden ? true : space.state.get() !== SpaceState.SPACE_INACTIVE))
|
|
150
|
+
.map((space) =>
|
|
151
|
+
constructSpaceNode({
|
|
152
|
+
space,
|
|
153
|
+
navigable: state.navigableCollections,
|
|
154
|
+
personal: space === client.spaces.default,
|
|
155
|
+
namesCache: state.spaceNames,
|
|
156
|
+
resolve,
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
} catch {}
|
|
160
|
+
},
|
|
161
|
+
resolver: ({ id }) => {
|
|
162
|
+
if (id.length !== SPACE_ID_LENGTH) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
167
|
+
const spaces = toSignal(
|
|
168
|
+
(onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
|
|
169
|
+
() => client.spaces.get(),
|
|
236
170
|
);
|
|
171
|
+
|
|
172
|
+
const isReady = toSignal(
|
|
173
|
+
(onChange) => client.spaces.isReady.subscribe(() => onChange()).unsubscribe,
|
|
174
|
+
() => client.spaces.isReady.get(),
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
if (!spaces || !isReady) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const space = spaces.find((space) => space.id === id);
|
|
182
|
+
if (!space) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (space.state.get() === SpaceState.SPACE_INACTIVE) {
|
|
187
|
+
return false;
|
|
188
|
+
} else if (space.state.get() !== SpaceState.SPACE_READY) {
|
|
189
|
+
return undefined;
|
|
190
|
+
} else {
|
|
191
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
192
|
+
return constructSpaceNode({
|
|
193
|
+
space,
|
|
194
|
+
navigable: state.navigableCollections,
|
|
195
|
+
personal: space === client.spaces.default,
|
|
196
|
+
namesCache: state.spaceNames,
|
|
197
|
+
resolve,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
237
200
|
},
|
|
238
|
-
// resolver: ({ id }) => {
|
|
239
|
-
// if (id.length !== SPACE_ID_LENGTH) {
|
|
240
|
-
// return;
|
|
241
|
-
// }
|
|
242
|
-
|
|
243
|
-
// const client = context.requestCapability(ClientCapabilities.Client);
|
|
244
|
-
// const spaces = toSignal(
|
|
245
|
-
// (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
|
|
246
|
-
// () => client.spaces.get(),
|
|
247
|
-
// );
|
|
248
|
-
|
|
249
|
-
// const isReady = toSignal(
|
|
250
|
-
// (onChange) => client.spaces.isReady.subscribe(() => onChange()).unsubscribe,
|
|
251
|
-
// () => client.spaces.isReady.get(),
|
|
252
|
-
// );
|
|
253
|
-
|
|
254
|
-
// if (!spaces || !isReady) {
|
|
255
|
-
// return;
|
|
256
|
-
// }
|
|
257
|
-
|
|
258
|
-
// const space = spaces.find((space) => space.id === id);
|
|
259
|
-
// if (!space) {
|
|
260
|
-
// return;
|
|
261
|
-
// }
|
|
262
|
-
|
|
263
|
-
// if (space.state.get() === SpaceState.SPACE_INACTIVE) {
|
|
264
|
-
// return false;
|
|
265
|
-
// } else if (space.state.get() !== SpaceState.SPACE_READY) {
|
|
266
|
-
// return undefined;
|
|
267
|
-
// } else {
|
|
268
|
-
// const state = context.requestCapability(SpaceCapabilities.State);
|
|
269
|
-
// return constructSpaceNode({
|
|
270
|
-
// space,
|
|
271
|
-
// navigable: state.navigableCollections,
|
|
272
|
-
// personal: space === client.spaces.default,
|
|
273
|
-
// namesCache: state.spaceNames,
|
|
274
|
-
// resolve,
|
|
275
|
-
// });
|
|
276
|
-
// }
|
|
277
|
-
// },
|
|
278
201
|
}),
|
|
279
202
|
|
|
280
203
|
// Create space actions.
|
|
281
204
|
createExtension({
|
|
282
205
|
id: `${SPACE_PLUGIN}/actions`,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return Option.none();
|
|
297
|
-
} else {
|
|
298
|
-
return Option.some({
|
|
299
|
-
space,
|
|
300
|
-
dispatch: dispatcher.dispatchPromise,
|
|
301
|
-
personal: space === client.spaces.default,
|
|
302
|
-
migrating: state.sdkMigrationRunning[space.id],
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
}),
|
|
306
|
-
Option.map((params) => constructSpaceActions(params)),
|
|
307
|
-
Option.getOrElse(() => []),
|
|
308
|
-
),
|
|
309
|
-
),
|
|
206
|
+
filter: (node): node is Node<Space> => isSpace(node.data),
|
|
207
|
+
actions: ({ node }) => {
|
|
208
|
+
const space = node.data;
|
|
209
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
210
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
211
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
212
|
+
return constructSpaceActions({
|
|
213
|
+
space,
|
|
214
|
+
dispatch,
|
|
215
|
+
personal: space === client.spaces.default,
|
|
216
|
+
migrating: state.sdkMigrationRunning[space.id],
|
|
217
|
+
});
|
|
218
|
+
},
|
|
310
219
|
}),
|
|
311
220
|
|
|
312
221
|
// Create nodes for objects in the root collection of a space.
|
|
313
222
|
createExtension({
|
|
314
223
|
id: `${SPACE_PLUGIN}/root-collection`,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
collection.objects,
|
|
341
|
-
Array.map((object) => object.target),
|
|
342
|
-
Array.filter(isNonNullable),
|
|
343
|
-
Array.map((object) =>
|
|
344
|
-
createObjectNode({
|
|
345
|
-
object,
|
|
346
|
-
space,
|
|
347
|
-
resolve,
|
|
348
|
-
navigable: state.navigableCollections,
|
|
349
|
-
}),
|
|
350
|
-
),
|
|
351
|
-
Array.filter(isNonNullable),
|
|
352
|
-
),
|
|
353
|
-
),
|
|
354
|
-
);
|
|
355
|
-
}),
|
|
356
|
-
Option.getOrElse(() => []),
|
|
357
|
-
),
|
|
358
|
-
),
|
|
224
|
+
filter: (node): node is Node<Space> => isSpace(node.data),
|
|
225
|
+
connector: ({ node }) => {
|
|
226
|
+
const space = node.data;
|
|
227
|
+
const spaceState = toSignal(
|
|
228
|
+
(onChange) => space.state.subscribe(() => onChange()).unsubscribe,
|
|
229
|
+
() => space.state.get(),
|
|
230
|
+
space.id,
|
|
231
|
+
);
|
|
232
|
+
if (spaceState !== SpaceState.SPACE_READY) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const collection = space.properties[CollectionType.typename]?.target as CollectionType | undefined;
|
|
237
|
+
if (!collection) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
242
|
+
|
|
243
|
+
return collection.objects
|
|
244
|
+
.map((object) => object.target)
|
|
245
|
+
.filter(isNonNullable)
|
|
246
|
+
.map((object) => createObjectNode({ object, space, resolve, navigable: state.navigableCollections }))
|
|
247
|
+
.filter(isNonNullable);
|
|
248
|
+
},
|
|
359
249
|
}),
|
|
360
250
|
|
|
361
251
|
// Create nodes for objects in a collection or by its fully qualified id.
|
|
362
252
|
createExtension({
|
|
363
253
|
id: `${SPACE_PLUGIN}/objects`,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
// if (!object) {
|
|
418
|
-
// return;
|
|
419
|
-
// }
|
|
420
|
-
|
|
421
|
-
// if (isDeleted(object)) {
|
|
422
|
-
// return false;
|
|
423
|
-
// } else {
|
|
424
|
-
// const state = context.requestCapability(SpaceCapabilities.State);
|
|
425
|
-
// return createObjectNode({ object, space, resolve, navigable: state.navigableCollections });
|
|
426
|
-
// }
|
|
427
|
-
// },
|
|
254
|
+
filter: (node): node is Node<CollectionType> => node.data instanceof CollectionType,
|
|
255
|
+
connector: ({ node }) => {
|
|
256
|
+
const collection = node.data;
|
|
257
|
+
const space = getSpace(collection);
|
|
258
|
+
if (!space) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
263
|
+
|
|
264
|
+
return collection.objects
|
|
265
|
+
.map((object) => object.target)
|
|
266
|
+
.filter(isNonNullable)
|
|
267
|
+
.map((object) => createObjectNode({ object, space, resolve, navigable: state.navigableCollections }))
|
|
268
|
+
.filter(isNonNullable);
|
|
269
|
+
},
|
|
270
|
+
resolver: ({ id }) => {
|
|
271
|
+
if (id.length !== FQ_ID_LENGTH) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const [spaceId, objectId] = id.split(':');
|
|
276
|
+
if (spaceId.length !== SPACE_ID_LENGTH && objectId.length !== OBJECT_ID_LENGTH) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
281
|
+
const space = client.spaces.get().find((space) => space.id === spaceId);
|
|
282
|
+
if (!space) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const spaceState = toSignal(
|
|
287
|
+
(onChange) => space.state.subscribe(() => onChange()).unsubscribe,
|
|
288
|
+
() => space.state.get(),
|
|
289
|
+
space.id,
|
|
290
|
+
);
|
|
291
|
+
if (spaceState !== SpaceState.SPACE_READY) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const [object] = memoizeQuery(space, { id: objectId });
|
|
296
|
+
if (!object) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (isDeleted(object)) {
|
|
301
|
+
return false;
|
|
302
|
+
} else {
|
|
303
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
304
|
+
return createObjectNode({ object, space, resolve, navigable: state.navigableCollections });
|
|
305
|
+
}
|
|
306
|
+
},
|
|
428
307
|
}),
|
|
429
308
|
|
|
430
309
|
// Create collection actions and action groups.
|
|
431
310
|
createExtension({
|
|
432
311
|
id: `${SPACE_PLUGIN}/object-actions`,
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const [dispatcher] = get(context.capabilities(Capabilities.IntentDispatcher));
|
|
440
|
-
const [appGraph] = get(context.capabilities(Capabilities.AppGraph));
|
|
441
|
-
const [state] = get(context.capabilities(SpaceCapabilities.State));
|
|
442
|
-
|
|
443
|
-
if (!dispatcher || !appGraph || !state) {
|
|
444
|
-
return Option.none();
|
|
445
|
-
} else {
|
|
446
|
-
return Option.some({
|
|
447
|
-
object,
|
|
448
|
-
graph: appGraph.graph,
|
|
449
|
-
dispatch: dispatcher.dispatchPromise,
|
|
450
|
-
navigable: get(rxFromSignal(() => state.navigableCollections)),
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
}),
|
|
454
|
-
Option.map((params) => constructObjectActions(params)),
|
|
455
|
-
Option.getOrElse(() => []),
|
|
456
|
-
),
|
|
457
|
-
),
|
|
312
|
+
filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
|
|
313
|
+
actions: ({ node }) => {
|
|
314
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
315
|
+
const state = context.requestCapability(SpaceCapabilities.State);
|
|
316
|
+
return constructObjectActions({ node, dispatch, navigable: state.navigableCollections });
|
|
317
|
+
},
|
|
458
318
|
}),
|
|
459
319
|
|
|
460
320
|
// Object settings plank companion.
|
|
461
321
|
createExtension({
|
|
462
322
|
id: `${SPACE_PLUGIN}/settings`,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
position: 'fallback',
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
]),
|
|
481
|
-
Option.getOrElse(() => []),
|
|
482
|
-
),
|
|
483
|
-
),
|
|
323
|
+
filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
|
|
324
|
+
connector: ({ node }) => [
|
|
325
|
+
{
|
|
326
|
+
id: [node.id, 'settings'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
327
|
+
type: PLANK_COMPANION_TYPE,
|
|
328
|
+
data: 'settings',
|
|
329
|
+
properties: {
|
|
330
|
+
label: ['object settings label', { ns: SPACE_PLUGIN }],
|
|
331
|
+
icon: 'ph--sliders--regular',
|
|
332
|
+
disposition: 'hidden',
|
|
333
|
+
position: 'hoist',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
],
|
|
484
337
|
}),
|
|
485
338
|
]);
|
|
486
339
|
};
|