@dxos/plugin-space 0.8.3 → 0.8.4-main.1da679c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs +31 -0
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetailsPanel-J7KGPJJK.mjs +90 -0
- package/dist/lib/browser/ObjectDetailsPanel-J7KGPJJK.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +68 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-M2RH72VL.mjs → app-graph-builder-FC4D5PF6.mjs} +190 -36
- package/dist/lib/browser/app-graph-builder-FC4D5PF6.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-F7ISRRBV.mjs → app-graph-serializer-NI4BCIQO.mjs} +15 -15
- package/dist/lib/browser/app-graph-serializer-NI4BCIQO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YMCZR6EZ.mjs → chunk-CBYL62HG.mjs} +5 -4
- package/dist/lib/browser/chunk-CBYL62HG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7Y4M7GXO.mjs → chunk-ELJDGQTO.mjs} +6 -6
- package/dist/lib/browser/{chunk-7Y4M7GXO.mjs.map → chunk-ELJDGQTO.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-PTKYMZWO.mjs → chunk-FBCGT5YY.mjs} +2 -2
- package/dist/lib/browser/{chunk-NFUKCRGE.mjs → chunk-IIY4XVBZ.mjs} +440 -376
- package/dist/lib/browser/chunk-IIY4XVBZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-V24VASAJ.mjs → chunk-S33AYKSS.mjs} +189 -34
- package/dist/lib/browser/chunk-S33AYKSS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BXNL6SDI.mjs → chunk-TUQZO5P4.mjs} +4 -3
- package/dist/lib/browser/chunk-TUQZO5P4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TW7O2EPP.mjs → chunk-URST7EEN.mjs} +68 -8
- package/dist/lib/browser/chunk-URST7EEN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4ZKSFDXM.mjs → chunk-WZYRDFW7.mjs} +76 -14
- package/dist/lib/browser/chunk-WZYRDFW7.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-PI7TKANR.mjs → identity-created-PW2BA46S.mjs} +7 -7
- package/dist/lib/browser/identity-created-PW2BA46S.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +95 -24
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-RWU6ZE4H.mjs → intent-resolver-2RWP2F23.mjs} +183 -28
- package/dist/lib/browser/intent-resolver-2RWP2F23.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-QIKHSNT2.mjs → react-root-QUDHNVV5.mjs} +10 -10
- package/dist/lib/browser/{react-root-QIKHSNT2.mjs.map → react-root-QUDHNVV5.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-W56UD53I.mjs → react-surface-S47ZR44T.mjs} +59 -27
- package/dist/lib/browser/react-surface-S47ZR44T.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-WREJNMIC.mjs → schema-defs-ATNBAQEU.mjs} +6 -6
- package/dist/lib/browser/schema-defs-ATNBAQEU.mjs.map +7 -0
- package/dist/lib/browser/{settings-K54STC5A.mjs → settings-NTC766QW.mjs} +6 -6
- package/dist/lib/browser/{settings-K54STC5A.mjs.map → settings-NTC766QW.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-3PDRDHPC.mjs → spaces-ready-NX7NRVSB.mjs} +19 -17
- package/dist/lib/browser/spaces-ready-NX7NRVSB.mjs.map +7 -0
- package/dist/lib/browser/{state-HRZ4VRXU.mjs → state-LAGTPHDQ.mjs} +6 -6
- package/dist/lib/browser/state-LAGTPHDQ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs +32 -0
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-7ADOXZ5W.mjs +91 -0
- package/dist/lib/node-esm/ObjectDetailsPanel-7ADOXZ5W.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +70 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-BCHVZ4OM.mjs → app-graph-builder-KREU52XR.mjs} +190 -36
- package/dist/lib/node-esm/app-graph-builder-KREU52XR.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-TXRGGNP2.mjs → app-graph-serializer-L3IXSQ2I.mjs} +15 -15
- package/dist/lib/node-esm/app-graph-serializer-L3IXSQ2I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3CP67AYY.mjs → chunk-FJZNSJC4.mjs} +5 -4
- package/dist/lib/node-esm/chunk-FJZNSJC4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BSLREHIX.mjs → chunk-HC677WUJ.mjs} +4 -3
- package/dist/lib/node-esm/chunk-HC677WUJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MSWEFAPD.mjs → chunk-HWNG4MEU.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-JBQKU4K5.mjs → chunk-LGNPMOXU.mjs} +76 -14
- package/dist/lib/node-esm/chunk-LGNPMOXU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GH2FGJXH.mjs → chunk-Q6AAQLQG.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-GH2FGJXH.mjs.map → chunk-Q6AAQLQG.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-LA6AVVH6.mjs → chunk-QUPBTNWJ.mjs} +440 -376
- package/dist/lib/node-esm/chunk-QUPBTNWJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-D4QMPPS7.mjs → chunk-RXDT5LA5.mjs} +68 -8
- package/dist/lib/node-esm/chunk-RXDT5LA5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HO7AIKQS.mjs → chunk-TEUN2E4F.mjs} +189 -34
- package/dist/lib/node-esm/chunk-TEUN2E4F.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-35CTAQWI.mjs → identity-created-MWTLGQRU.mjs} +7 -7
- package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +95 -24
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-JO6L2VXC.mjs → intent-resolver-ORRPXJMN.mjs} +183 -28
- package/dist/lib/node-esm/intent-resolver-ORRPXJMN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-YFGL3B4J.mjs → react-root-2WBNW4VQ.mjs} +10 -10
- package/dist/lib/node-esm/{react-root-YFGL3B4J.mjs.map → react-root-2WBNW4VQ.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-CVAPDLEZ.mjs → react-surface-MI5G3TD6.mjs} +59 -27
- package/dist/lib/node-esm/react-surface-MI5G3TD6.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-4MEJETVX.mjs → schema-defs-7LEPK3R6.mjs} +6 -6
- package/dist/lib/node-esm/schema-defs-7LEPK3R6.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-TD76LTQS.mjs → settings-RWOW2SE5.mjs} +6 -6
- package/dist/lib/node-esm/{settings-TD76LTQS.mjs.map → settings-RWOW2SE5.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-FJMGPAVV.mjs → spaces-ready-KD57IOYI.mjs} +19 -17
- package/dist/lib/node-esm/spaces-ready-KD57IOYI.mjs.map +7 -0
- package/dist/lib/node-esm/{state-XQNDCN37.mjs → state-JKO4JKA2.mjs} +6 -6
- package/dist/lib/node-esm/state-JKO4JKA2.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- 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/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +9 -3
- 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/CollectionMain.d.ts +1 -0
- package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +4 -3
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1584 -3
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -3
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts +3 -2
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +1584 -4
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetailsPanel.d.ts +9 -0
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +1 -0
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/RecordMain.d.ts +7 -0
- package/dist/types/src/components/RecordMain.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +1411 -2
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1417 -3
- 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 +1418 -4
- 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 +8 -0
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +14 -1
- 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/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1402 -410
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +82 -22
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +32 -5
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +54 -53
- package/src/SpacePlugin.ts +81 -16
- package/src/capabilities/app-graph-builder.ts +232 -22
- package/src/capabilities/app-graph-serializer.ts +6 -6
- package/src/capabilities/capabilities.ts +9 -3
- package/src/capabilities/identity-created.ts +3 -5
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +136 -15
- package/src/capabilities/react-root.tsx +2 -1
- package/src/capabilities/react-surface.tsx +73 -22
- package/src/capabilities/schema-defs.ts +3 -2
- package/src/capabilities/spaces-ready.ts +10 -7
- package/src/capabilities/state.ts +3 -2
- package/src/components/AwaitingObject.tsx +5 -7
- package/src/components/CollectionMain.tsx +2 -0
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +9 -8
- package/src/components/CreateDialog/CreateObjectDialog.tsx +47 -33
- package/src/components/CreateDialog/CreateObjectPanel.tsx +18 -7
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +1 -1
- package/src/components/JoinDialog.tsx +1 -1
- package/src/components/MembersContainer.stories.tsx +35 -10
- package/src/components/MembersContainer.tsx +13 -13
- package/src/components/MenuFooter.tsx +2 -3
- package/src/components/ObjectDetailsPanel.tsx +79 -0
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +2 -1
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
- package/src/components/PersistenceStatus.tsx +5 -6
- package/src/components/PopoverRenameObject.tsx +7 -13
- package/src/components/PopoverRenameSpace.tsx +1 -1
- package/src/components/RecordMain.tsx +43 -0
- package/src/components/SchemaContainer.tsx +2 -2
- package/src/components/SpacePluginSettings.tsx +6 -7
- package/src/components/SpacePresence.stories.tsx +8 -5
- package/src/components/SpacePresence.tsx +7 -7
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +9 -6
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +8 -8
- package/src/components/SyncStatus/SyncStatus.stories.tsx +12 -18
- package/src/components/SyncStatus/SyncStatus.tsx +4 -3
- package/src/components/SyncStatus/save-tracker.ts +3 -3
- package/src/components/SyncStatus/status.ts +4 -4
- package/src/components/ViewEditor.tsx +59 -0
- package/src/components/index.ts +7 -1
- package/src/events.ts +2 -1
- package/src/hooks/useActiveSpace.ts +2 -2
- package/src/hooks/useInputSurfaceLookup.tsx +1 -1
- package/src/translations.ts +74 -9
- package/src/types/types.ts +66 -9
- package/src/util.tsx +177 -33
- package/dist/lib/browser/app-graph-builder-M2RH72VL.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-F7ISRRBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-4ZKSFDXM.mjs.map +0 -7
- package/dist/lib/browser/chunk-BXNL6SDI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NFUKCRGE.mjs.map +0 -7
- package/dist/lib/browser/chunk-TW7O2EPP.mjs.map +0 -7
- package/dist/lib/browser/chunk-V24VASAJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-YMCZR6EZ.mjs.map +0 -7
- package/dist/lib/browser/identity-created-PI7TKANR.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-RWU6ZE4H.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W56UD53I.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-WREJNMIC.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs +0 -124
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-3PDRDHPC.mjs.map +0 -7
- package/dist/lib/browser/state-HRZ4VRXU.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs +0 -364
- package/dist/lib/node/app-graph-builder-6LK5HLLE.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs +0 -89
- package/dist/lib/node/app-graph-serializer-HKHBNHA3.cjs.map +0 -7
- package/dist/lib/node/chunk-3X4EA4XL.cjs +0 -37
- package/dist/lib/node/chunk-3X4EA4XL.cjs.map +0 -7
- package/dist/lib/node/chunk-5WLAXYE3.cjs +0 -125
- package/dist/lib/node/chunk-5WLAXYE3.cjs.map +0 -7
- package/dist/lib/node/chunk-6P2DB4QQ.cjs +0 -36
- package/dist/lib/node/chunk-6P2DB4QQ.cjs.map +0 -7
- package/dist/lib/node/chunk-DOC5XEZ4.cjs +0 -184
- package/dist/lib/node/chunk-DOC5XEZ4.cjs.map +0 -7
- package/dist/lib/node/chunk-NCHF433F.cjs +0 -1921
- package/dist/lib/node/chunk-NCHF433F.cjs.map +0 -7
- package/dist/lib/node/chunk-NL5Y4EDX.cjs +0 -38
- package/dist/lib/node/chunk-NL5Y4EDX.cjs.map +0 -7
- package/dist/lib/node/chunk-ULJZPATP.cjs +0 -312
- package/dist/lib/node/chunk-ULJZPATP.cjs.map +0 -7
- package/dist/lib/node/chunk-XHWVT7LW.cjs +0 -572
- package/dist/lib/node/chunk-XHWVT7LW.cjs.map +0 -7
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs +0 -42
- package/dist/lib/node/identity-created-FF4WZ2WY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -278
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs +0 -609
- package/dist/lib/node/intent-resolver-AV4CMM3Z.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-root-RQUU3A45.cjs +0 -51
- package/dist/lib/node/react-root-RQUU3A45.cjs.map +0 -7
- package/dist/lib/node/react-surface-AZFJLE72.cjs +0 -351
- package/dist/lib/node/react-surface-AZFJLE72.cjs.map +0 -7
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs +0 -42
- package/dist/lib/node/schema-defs-OB2X2HBH.cjs.map +0 -7
- package/dist/lib/node/schema-tools-IYREN4IH.cjs +0 -147
- package/dist/lib/node/schema-tools-IYREN4IH.cjs.map +0 -7
- package/dist/lib/node/settings-P2EQ7VKQ.cjs +0 -38
- package/dist/lib/node/settings-P2EQ7VKQ.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs +0 -210
- package/dist/lib/node/spaces-ready-DXPOHYV7.cjs.map +0 -7
- package/dist/lib/node/state-M35DK75Z.cjs +0 -61
- package/dist/lib/node/state-M35DK75Z.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -48
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-BCHVZ4OM.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-TXRGGNP2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3CP67AYY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BSLREHIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D4QMPPS7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HO7AIKQS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JBQKU4K5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LA6AVVH6.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-35CTAQWI.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JO6L2VXC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-CVAPDLEZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4MEJETVX.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs +0 -126
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-FJMGPAVV.mjs.map +0 -7
- package/dist/lib/node-esm/state-XQNDCN37.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/src/capabilities/schema-tool.test.ts +0 -44
- package/src/capabilities/schema-tools.ts +0 -125
- /package/dist/lib/browser/{chunk-PTKYMZWO.mjs.map → chunk-FBCGT5YY.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-MSWEFAPD.mjs.map → chunk-HWNG4MEU.mjs.map} +0 -0
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Schema } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { type AnyIntentChain, type Label, defineCapability } from '@dxos/app-framework';
|
|
6
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
7
9
|
import { type DataType } from '@dxos/schema';
|
|
8
|
-
import { type
|
|
10
|
+
import { type DeepReadonly, type Position } from '@dxos/util';
|
|
9
11
|
|
|
10
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
11
13
|
import { type ObjectForm, type PluginState } from '../types';
|
|
@@ -17,8 +19,12 @@ export namespace SpaceCapabilities {
|
|
|
17
19
|
export type SettingsSection = { id: string; label: Label; position?: Position };
|
|
18
20
|
export const SettingsSection = defineCapability<SettingsSection>(`${SPACE_PLUGIN}/capability/settings-section`);
|
|
19
21
|
|
|
20
|
-
export type OnSpaceCreated = (params: { space: Space; rootCollection: DataType.Collection }) =>
|
|
22
|
+
export type OnSpaceCreated = (params: { space: Space; rootCollection: DataType.Collection }) => AnyIntentChain;
|
|
21
23
|
export const OnSpaceCreated = defineCapability<OnSpaceCreated>(`${SPACE_PLUGIN}/capability/on-space-created`);
|
|
22
24
|
|
|
25
|
+
export type OnSchemaAdded = (params: { space: Space; schema: Schema.Schema.AnyNoContext }) => AnyIntentChain;
|
|
26
|
+
export const OnSchemaAdded = defineCapability<OnSchemaAdded>(`${SPACE_PLUGIN}/capability/on-schema-added`);
|
|
27
|
+
|
|
28
|
+
// TODO(burdon): Should this be view? Forms are UI concepts? (associated with a View/schema).
|
|
23
29
|
export const ObjectForm = defineCapability<ObjectForm<any>>(`${SPACE_PLUGIN}/capability/object-form`);
|
|
24
30
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Obj, Ref
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
7
7
|
import { Migrations } from '@dxos/migrations';
|
|
8
8
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
9
|
import { DataType } from '@dxos/schema';
|
|
@@ -16,9 +16,7 @@ export default async (context: PluginContext) => {
|
|
|
16
16
|
await defaultSpace.waitUntilReady();
|
|
17
17
|
|
|
18
18
|
// Create root collection structure.
|
|
19
|
-
defaultSpace.properties[
|
|
20
|
-
Obj.make(DataType.Collection, { objects: [] }),
|
|
21
|
-
);
|
|
19
|
+
defaultSpace.properties[DataType.Collection.typename] = Ref.make(Obj.make(DataType.Collection, { objects: [] }));
|
|
22
20
|
if (Migrations.versionProperty) {
|
|
23
21
|
defaultSpace.properties[Migrations.versionProperty] = Migrations.targetVersion;
|
|
24
22
|
}
|
|
@@ -11,7 +11,6 @@ export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
|
11
11
|
export const ReactRoot = lazy(() => import('./react-root'));
|
|
12
12
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
13
13
|
export const SchemaDefs = lazy(() => import('./schema-defs'));
|
|
14
|
-
export const SchemaTools = lazy(() => import('./schema-tools'));
|
|
15
14
|
export const SpaceSettings = lazy(() => import('./settings'));
|
|
16
15
|
export const SpaceState = lazy(() => import('./state'));
|
|
17
16
|
export const SpacesReady = lazy(() => import('./spaces-ready'));
|
|
@@ -12,31 +12,32 @@ import {
|
|
|
12
12
|
createIntent,
|
|
13
13
|
createResolver,
|
|
14
14
|
} from '@dxos/app-framework';
|
|
15
|
-
import { Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
15
|
+
import { Filter, Obj, Query, Ref, Relation, Type } from '@dxos/echo';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
17
|
import { Migrations } from '@dxos/migrations';
|
|
18
18
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
19
19
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
20
20
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
21
|
-
import {
|
|
21
|
+
import { SpaceState, fullyQualifiedId, getSpace, isSpace } from '@dxos/react-client/echo';
|
|
22
22
|
import { Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
23
23
|
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
|
|
24
|
-
import { DataType } from '@dxos/schema';
|
|
24
|
+
import { DataType, ProjectionModel, typenameFromQuery } from '@dxos/schema';
|
|
25
25
|
|
|
26
|
-
import { SpaceCapabilities } from './capabilities';
|
|
27
26
|
import {
|
|
28
27
|
CREATE_OBJECT_DIALOG,
|
|
29
28
|
CREATE_SPACE_DIALOG,
|
|
29
|
+
type CreateObjectDialogProps,
|
|
30
30
|
JOIN_DIALOG,
|
|
31
|
+
type JoinDialogProps,
|
|
31
32
|
POPOVER_RENAME_OBJECT,
|
|
32
33
|
POPOVER_RENAME_SPACE,
|
|
33
|
-
type CreateObjectDialogProps,
|
|
34
|
-
type JoinDialogProps,
|
|
35
34
|
} from '../components';
|
|
36
35
|
import { SpaceEvents } from '../events';
|
|
37
36
|
import { SPACE_PLUGIN } from '../meta';
|
|
38
37
|
import { CollectionAction, SpaceAction } from '../types';
|
|
39
|
-
import {
|
|
38
|
+
import { COMPOSER_SPACE_LOCK, cloneObject, getNestedObjects } from '../util';
|
|
39
|
+
|
|
40
|
+
import { SpaceCapabilities } from './capabilities';
|
|
40
41
|
|
|
41
42
|
// TODO(wittjosiah): Remove.
|
|
42
43
|
const SPACE_MAX_OBJECTS = 500;
|
|
@@ -75,17 +76,27 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
75
76
|
await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);
|
|
76
77
|
}
|
|
77
78
|
await space.waitUntilReady();
|
|
79
|
+
|
|
80
|
+
// Create root collection.
|
|
78
81
|
const collection = Obj.make(DataType.Collection, { objects: [] });
|
|
79
|
-
space.properties[
|
|
82
|
+
space.properties[DataType.Collection.typename] = Ref.make(collection);
|
|
80
83
|
|
|
84
|
+
// Set current migration version.
|
|
81
85
|
if (Migrations.versionProperty) {
|
|
82
86
|
space.properties[Migrations.versionProperty] = Migrations.targetVersion;
|
|
83
87
|
}
|
|
84
88
|
|
|
89
|
+
// Create records smart collection.
|
|
90
|
+
const records = Obj.make(DataType.QueryCollection, {
|
|
91
|
+
query: Query.select(Filter.typename(DataType.StoredSchema.typename)).ast,
|
|
92
|
+
});
|
|
93
|
+
collection.objects.push(Ref.make(records));
|
|
94
|
+
|
|
95
|
+
// Allow other plugins to add default content.
|
|
85
96
|
await context.activatePromise(SpaceEvents.SpaceCreated);
|
|
86
97
|
const onSpaceCreatedCallbacks = context.getCapabilities(SpaceCapabilities.OnSpaceCreated);
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
const spaceCreatedIntents = onSpaceCreatedCallbacks.map((onSpaceCreated) =>
|
|
99
|
+
onSpaceCreated({ space, rootCollection: collection }),
|
|
89
100
|
);
|
|
90
101
|
|
|
91
102
|
return {
|
|
@@ -95,6 +106,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
95
106
|
space,
|
|
96
107
|
},
|
|
97
108
|
intents: [
|
|
109
|
+
...spaceCreatedIntents,
|
|
98
110
|
...(observability
|
|
99
111
|
? [
|
|
100
112
|
createIntent(ObservabilityAction.SendEvent, {
|
|
@@ -309,9 +321,113 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
309
321
|
};
|
|
310
322
|
},
|
|
311
323
|
}),
|
|
324
|
+
createResolver({
|
|
325
|
+
intent: SpaceAction.UseStaticSchema,
|
|
326
|
+
resolve: async ({ space, typename }) => {
|
|
327
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
328
|
+
const schema = client.graph.schemaRegistry.schemas.find((schema) => Type.getTypename(schema) === typename);
|
|
329
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
330
|
+
|
|
331
|
+
if (!space.properties.staticRecords) {
|
|
332
|
+
space.properties.staticRecords = [];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (!space.properties.staticRecords.includes(typename)) {
|
|
336
|
+
space.properties.staticRecords.push(typename);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
340
|
+
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
341
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
342
|
+
|
|
343
|
+
return {
|
|
344
|
+
data: {},
|
|
345
|
+
intents: [
|
|
346
|
+
...schemaAddedIntents,
|
|
347
|
+
...(observability
|
|
348
|
+
? [
|
|
349
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
350
|
+
name: 'space.schema.use',
|
|
351
|
+
properties: {
|
|
352
|
+
spaceId: space.id,
|
|
353
|
+
typename: Type.getTypename(schema),
|
|
354
|
+
},
|
|
355
|
+
}),
|
|
356
|
+
]
|
|
357
|
+
: []),
|
|
358
|
+
],
|
|
359
|
+
};
|
|
360
|
+
},
|
|
361
|
+
}),
|
|
362
|
+
createResolver({
|
|
363
|
+
intent: SpaceAction.AddSchema,
|
|
364
|
+
resolve: async ({ space, name, typename, version, schema: schemaInput }) => {
|
|
365
|
+
const [schema] = await space.db.schemaRegistry.register([schemaInput]);
|
|
366
|
+
if (name) {
|
|
367
|
+
schema.storedSchema.name = name;
|
|
368
|
+
}
|
|
369
|
+
if (typename) {
|
|
370
|
+
schema.storedSchema.typename = typename;
|
|
371
|
+
}
|
|
372
|
+
if (version) {
|
|
373
|
+
schema.storedSchema.version = version;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
await context.activatePromise(SpaceEvents.SchemaAdded);
|
|
377
|
+
const onSchemaAdded = context.getCapabilities(SpaceCapabilities.OnSchemaAdded);
|
|
378
|
+
const schemaAddedIntents = onSchemaAdded.map((onSchemaAdded) => onSchemaAdded({ space, schema }));
|
|
379
|
+
|
|
380
|
+
return {
|
|
381
|
+
data: {
|
|
382
|
+
id: schema.id,
|
|
383
|
+
object: schema.storedSchema,
|
|
384
|
+
schema,
|
|
385
|
+
},
|
|
386
|
+
intents: [
|
|
387
|
+
...schemaAddedIntents,
|
|
388
|
+
...(observability
|
|
389
|
+
? [
|
|
390
|
+
createIntent(ObservabilityAction.SendEvent, {
|
|
391
|
+
name: 'space.schema.add',
|
|
392
|
+
properties: {
|
|
393
|
+
spaceId: space.id,
|
|
394
|
+
objectId: schema.id,
|
|
395
|
+
typename: schema.typename,
|
|
396
|
+
},
|
|
397
|
+
}),
|
|
398
|
+
]
|
|
399
|
+
: []),
|
|
400
|
+
],
|
|
401
|
+
};
|
|
402
|
+
},
|
|
403
|
+
}),
|
|
404
|
+
createResolver({
|
|
405
|
+
intent: SpaceAction.DeleteField,
|
|
406
|
+
resolve: async ({ view, fieldId, deletionData }, undo) => {
|
|
407
|
+
const space = getSpace(view);
|
|
408
|
+
invariant(space);
|
|
409
|
+
const typename = typenameFromQuery(view.query);
|
|
410
|
+
invariant(typename);
|
|
411
|
+
const schema = await space.db.schemaRegistry.query({ typename }).firstOrUndefined();
|
|
412
|
+
invariant(schema);
|
|
413
|
+
const projection = new ProjectionModel(schema.jsonSchema, view.projection);
|
|
414
|
+
if (!undo) {
|
|
415
|
+
const { deleted, index } = projection.deleteFieldProjection(fieldId);
|
|
416
|
+
return {
|
|
417
|
+
undoable: {
|
|
418
|
+
message: ['field deleted label', { ns: SPACE_PLUGIN }],
|
|
419
|
+
data: { deletionData: { ...deleted, index } },
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
} else if (undo && deletionData) {
|
|
423
|
+
const { field, props, index } = deletionData;
|
|
424
|
+
projection.setFieldProjection({ field, props }, index);
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
}),
|
|
312
428
|
createResolver({
|
|
313
429
|
intent: SpaceAction.OpenCreateObject,
|
|
314
|
-
resolve: ({ target, typename, navigable = true }) => {
|
|
430
|
+
resolve: ({ target, views, typename, initialFormValues, navigable = true, onCreateObject }) => {
|
|
315
431
|
const state = context.getCapability(SpaceCapabilities.State);
|
|
316
432
|
|
|
317
433
|
return {
|
|
@@ -323,7 +439,10 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
323
439
|
blockAlign: 'start',
|
|
324
440
|
props: {
|
|
325
441
|
target,
|
|
442
|
+
views,
|
|
326
443
|
typename,
|
|
444
|
+
initialFormValues,
|
|
445
|
+
onCreateObject,
|
|
327
446
|
shouldNavigate: navigable
|
|
328
447
|
? (object: Obj.Any) => {
|
|
329
448
|
const isCollection = Obj.instanceOf(DataType.Collection, object);
|
|
@@ -381,13 +500,13 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
381
500
|
} else if (isSpace(target) && hidden) {
|
|
382
501
|
space.db.add(object);
|
|
383
502
|
} else if (isSpace(target)) {
|
|
384
|
-
const collection = space.properties[
|
|
503
|
+
const collection = space.properties[DataType.Collection.typename]?.target;
|
|
385
504
|
if (Obj.instanceOf(DataType.Collection, collection)) {
|
|
386
505
|
collection.objects.push(Ref.make(object));
|
|
387
506
|
} else {
|
|
388
507
|
// TODO(wittjosiah): Can't add non-echo objects by including in a collection because of types.
|
|
389
508
|
const collection = Obj.make(DataType.Collection, { objects: [Ref.make(object)] });
|
|
390
|
-
space.properties[
|
|
509
|
+
space.properties[DataType.Collection.typename] = Ref.make(collection);
|
|
391
510
|
}
|
|
392
511
|
}
|
|
393
512
|
|
|
@@ -444,7 +563,7 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
444
563
|
|
|
445
564
|
if (!undo) {
|
|
446
565
|
const parentCollection: DataType.Collection =
|
|
447
|
-
target ?? space.properties[
|
|
566
|
+
target ?? space.properties[DataType.Collection.typename]?.target;
|
|
448
567
|
const nestedObjectsList = await Promise.all(objects.map((obj) => getNestedObjects(obj, resolve)));
|
|
449
568
|
|
|
450
569
|
const deletionData = {
|
|
@@ -578,7 +697,9 @@ export default ({ context, observability, createInvitationUrl }: IntentResolverO
|
|
|
578
697
|
createResolver({
|
|
579
698
|
intent: CollectionAction.CreateQueryCollection,
|
|
580
699
|
resolve: async ({ name, typename }) => ({
|
|
581
|
-
data: {
|
|
700
|
+
data: {
|
|
701
|
+
object: Obj.make(DataType.QueryCollection, { name, query: Query.select(Filter.typename(typename)).ast }),
|
|
702
|
+
},
|
|
582
703
|
}),
|
|
583
704
|
}),
|
|
584
705
|
]);
|
|
@@ -6,10 +6,11 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { SpaceCapabilities } from './capabilities';
|
|
10
9
|
import { AwaitingObject } from '../components';
|
|
11
10
|
import { SPACE_PLUGIN } from '../meta';
|
|
12
11
|
|
|
12
|
+
import { SpaceCapabilities } from './capabilities';
|
|
13
|
+
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactRoot, {
|
|
15
16
|
id: SPACE_PLUGIN,
|
|
@@ -7,9 +7,9 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
+
Surface,
|
|
10
11
|
contributes,
|
|
11
12
|
createSurface,
|
|
12
|
-
Surface,
|
|
13
13
|
useCapabilities,
|
|
14
14
|
useCapability,
|
|
15
15
|
useLayout,
|
|
@@ -19,47 +19,60 @@ import { findAnnotation } from '@dxos/effect';
|
|
|
19
19
|
import { SettingsStore } from '@dxos/local-storage';
|
|
20
20
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
21
|
import { useClient } from '@dxos/react-client';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
type Space,
|
|
24
|
+
SpaceState,
|
|
25
|
+
fullyQualifiedId,
|
|
26
|
+
getSpace,
|
|
27
|
+
isLiveObject,
|
|
28
|
+
isSpace,
|
|
29
|
+
parseId,
|
|
30
|
+
useSpace,
|
|
31
|
+
} from '@dxos/react-client/echo';
|
|
23
32
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
24
33
|
import { type InputProps, SelectInput } from '@dxos/react-ui-form';
|
|
25
34
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
26
35
|
import { DataType, type TypenameAnnotation, TypenameAnnotationId } from '@dxos/schema';
|
|
27
36
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
28
37
|
|
|
29
|
-
import { SpaceCapabilities } from './capabilities';
|
|
30
38
|
import {
|
|
31
|
-
CollectionMain,
|
|
32
|
-
CollectionSection,
|
|
33
39
|
CREATE_OBJECT_DIALOG,
|
|
34
40
|
CREATE_SPACE_DIALOG,
|
|
41
|
+
CollectionMain,
|
|
42
|
+
CollectionSection,
|
|
35
43
|
CreateObjectDialog,
|
|
44
|
+
type CreateObjectDialogProps,
|
|
36
45
|
CreateSpaceDialog,
|
|
37
46
|
InlineSyncStatus,
|
|
38
47
|
JOIN_DIALOG,
|
|
39
48
|
JoinDialog,
|
|
40
49
|
MembersContainer,
|
|
41
50
|
MenuFooter,
|
|
51
|
+
ObjectDetailsPanel,
|
|
42
52
|
ObjectSettingsContainer,
|
|
43
53
|
POPOVER_RENAME_OBJECT,
|
|
44
54
|
POPOVER_RENAME_SPACE,
|
|
45
55
|
PopoverRenameObject,
|
|
46
56
|
PopoverRenameSpace,
|
|
57
|
+
RecordMain,
|
|
47
58
|
SchemaContainer,
|
|
48
59
|
SmallPresenceLive,
|
|
49
60
|
SpacePluginSettings,
|
|
50
61
|
SpacePresence,
|
|
51
62
|
SpaceSettingsContainer,
|
|
52
63
|
SyncStatus,
|
|
53
|
-
|
|
64
|
+
ViewEditor,
|
|
54
65
|
} from '../components';
|
|
55
66
|
import { SPACE_PLUGIN } from '../meta';
|
|
56
67
|
import { HueAnnotationId, IconAnnotationId, type SpaceSettingsProps } from '../types';
|
|
57
68
|
|
|
69
|
+
import { SpaceCapabilities } from './capabilities';
|
|
70
|
+
|
|
58
71
|
type ReactSurfaceOptions = {
|
|
59
72
|
createInvitationUrl: (invitationCode: string) => string;
|
|
60
73
|
};
|
|
61
74
|
|
|
62
|
-
const OMIT = [
|
|
75
|
+
const OMIT = [DataType.Collection.typename, Type.getTypename(DataType.QueryCollection)];
|
|
63
76
|
|
|
64
77
|
export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
65
78
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -73,13 +86,20 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
73
86
|
<Surface
|
|
74
87
|
data={{
|
|
75
88
|
id: data.subject.id,
|
|
76
|
-
subject: data.subject.properties[
|
|
89
|
+
subject: data.subject.properties[DataType.Collection.typename]?.target,
|
|
77
90
|
}}
|
|
78
91
|
role={role}
|
|
79
92
|
{...rest}
|
|
80
93
|
/>
|
|
81
94
|
),
|
|
82
95
|
}),
|
|
96
|
+
createSurface({
|
|
97
|
+
id: `${SPACE_PLUGIN}/record-article`,
|
|
98
|
+
role: 'article',
|
|
99
|
+
position: 'fallback',
|
|
100
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
101
|
+
component: ({ data }) => <RecordMain record={data.subject} />,
|
|
102
|
+
}),
|
|
83
103
|
createSurface({
|
|
84
104
|
id: `${SPACE_PLUGIN}/collection-fallback`,
|
|
85
105
|
role: 'article',
|
|
@@ -146,6 +166,19 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
146
166
|
return <SchemaContainer space={space} />;
|
|
147
167
|
},
|
|
148
168
|
}),
|
|
169
|
+
createSurface({
|
|
170
|
+
id: `${SPACE_PLUGIN}/selected-objects`,
|
|
171
|
+
role: 'article',
|
|
172
|
+
filter: (data): data is { companionTo: DataType.View; subject: 'selected-objects' } =>
|
|
173
|
+
Obj.instanceOf(DataType.View, data.companionTo) && data.subject === 'selected-objects',
|
|
174
|
+
component: ({ data }) => (
|
|
175
|
+
<ObjectDetailsPanel
|
|
176
|
+
key={fullyQualifiedId(data.companionTo)}
|
|
177
|
+
objectId={fullyQualifiedId(data.companionTo)}
|
|
178
|
+
view={data.companionTo}
|
|
179
|
+
/>
|
|
180
|
+
),
|
|
181
|
+
}),
|
|
149
182
|
createSurface({
|
|
150
183
|
id: JOIN_DIALOG,
|
|
151
184
|
role: 'dialog',
|
|
@@ -172,13 +205,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
172
205
|
return !!annotation;
|
|
173
206
|
},
|
|
174
207
|
component: ({ data: _, ...inputProps }) => {
|
|
175
|
-
const { label,
|
|
208
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
176
209
|
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange]);
|
|
177
210
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
178
211
|
return (
|
|
179
212
|
<Input.Root>
|
|
180
213
|
<Input.Label>{label}</Input.Label>
|
|
181
|
-
<HuePicker disabled={
|
|
214
|
+
<HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
182
215
|
</Input.Root>
|
|
183
216
|
);
|
|
184
217
|
},
|
|
@@ -191,13 +224,13 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
191
224
|
return !!annotation;
|
|
192
225
|
},
|
|
193
226
|
component: ({ data: _, ...inputProps }) => {
|
|
194
|
-
const { label,
|
|
227
|
+
const { label, readonly, type, getValue, onValueChange } = inputProps as any as InputProps;
|
|
195
228
|
const handleChange = useCallback((nextIcon: string) => onValueChange(type, nextIcon), [onValueChange]);
|
|
196
229
|
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange]);
|
|
197
230
|
return (
|
|
198
231
|
<Input.Root>
|
|
199
232
|
<Input.Label>{label}</Input.Label>
|
|
200
|
-
<IconPicker disabled={
|
|
233
|
+
<IconPicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />
|
|
201
234
|
</Input.Root>
|
|
202
235
|
);
|
|
203
236
|
},
|
|
@@ -228,7 +261,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
228
261
|
|
|
229
262
|
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
230
263
|
const whitelistedTypenames = useMemo(
|
|
231
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => type
|
|
264
|
+
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => Type.getTypename(type)))),
|
|
232
265
|
[schemaWhitelists],
|
|
233
266
|
);
|
|
234
267
|
|
|
@@ -239,7 +272,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
239
272
|
objectForms
|
|
240
273
|
.map((form) => Type.getTypename(form.objectSchema))
|
|
241
274
|
// TODO(wittjosiah): Remove.
|
|
242
|
-
.filter((typename) => !OMIT.includes(typename)),
|
|
275
|
+
.filter((typename) => !OMIT.includes(typename) && !typename.endsWith('View')),
|
|
243
276
|
),
|
|
244
277
|
[objectForms],
|
|
245
278
|
);
|
|
@@ -247,13 +280,23 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
247
280
|
const fixed = client.graph.schemaRegistry.schemas.filter((schema) => {
|
|
248
281
|
const limitedStatic =
|
|
249
282
|
annotation.includes('limited-static') && whitelistedTypenames.has(Type.getTypename(schema));
|
|
283
|
+
const unusedStatic =
|
|
284
|
+
annotation.includes('unused-static') &&
|
|
285
|
+
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
286
|
+
!space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
287
|
+
const usedStatic =
|
|
288
|
+
annotation.includes('used-static') &&
|
|
289
|
+
whitelistedTypenames.has(Type.getTypename(schema)) &&
|
|
290
|
+
space.properties.staticRecords?.includes(Type.getTypename(schema));
|
|
250
291
|
const objectForm = annotation.includes('object-form') && objectFormTypenames.has(Type.getTypename(schema));
|
|
251
|
-
return annotation.includes('static') || limitedStatic || objectForm;
|
|
292
|
+
return annotation.includes('static') || limitedStatic || unusedStatic || usedStatic || objectForm;
|
|
252
293
|
});
|
|
253
294
|
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
254
295
|
const typenames = Array.from(
|
|
255
296
|
new Set<string>([
|
|
256
297
|
...(annotation.includes('limited-static') ||
|
|
298
|
+
annotation.includes('unused-static') ||
|
|
299
|
+
annotation.includes('used-static') ||
|
|
257
300
|
annotation.includes('static') ||
|
|
258
301
|
annotation.includes('object-form')
|
|
259
302
|
? fixed.map((schema) => Type.getTypename(schema))
|
|
@@ -264,25 +307,33 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
264
307
|
|
|
265
308
|
const options = useMemo(
|
|
266
309
|
() =>
|
|
267
|
-
typenames
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
310
|
+
typenames
|
|
311
|
+
.map((typename) => ({
|
|
312
|
+
value: typename,
|
|
313
|
+
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
314
|
+
}))
|
|
315
|
+
.toSorted((a, b) => a.label.localeCompare(b.label)),
|
|
271
316
|
[t, typenames],
|
|
272
317
|
);
|
|
273
318
|
|
|
274
319
|
return <SelectInput {...props} options={options} />;
|
|
275
320
|
},
|
|
276
321
|
}),
|
|
322
|
+
createSurface({
|
|
323
|
+
id: `${SPACE_PLUGIN}/object-settings`,
|
|
324
|
+
role: 'object-settings',
|
|
325
|
+
filter: (data): data is { subject: DataType.View } => Obj.instanceOf(DataType.View, data.subject),
|
|
326
|
+
component: ({ data }) => <ViewEditor view={data.subject} />,
|
|
327
|
+
}),
|
|
277
328
|
createSurface({
|
|
278
329
|
id: POPOVER_RENAME_SPACE,
|
|
279
|
-
role: 'popover',
|
|
330
|
+
role: 'card--popover',
|
|
280
331
|
filter: (data): data is { props: Space } => data.component === POPOVER_RENAME_SPACE && isSpace(data.props),
|
|
281
332
|
component: ({ data }) => <PopoverRenameSpace space={data.props} />,
|
|
282
333
|
}),
|
|
283
334
|
createSurface({
|
|
284
335
|
id: POPOVER_RENAME_OBJECT,
|
|
285
|
-
role: 'popover',
|
|
336
|
+
role: 'card--popover',
|
|
286
337
|
filter: (data): data is { props: Obj.Any } =>
|
|
287
338
|
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
288
339
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
@@ -328,7 +379,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
328
379
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
329
380
|
const object = isSpace(data.subject)
|
|
330
381
|
? data.subject.state.get() === SpaceState.SPACE_READY
|
|
331
|
-
? (space?.properties[
|
|
382
|
+
? (space?.properties[DataType.Collection.typename]?.target as DataType.Collection)
|
|
332
383
|
: undefined
|
|
333
384
|
: data.subject;
|
|
334
385
|
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
|
|
8
|
-
import { SpaceCapabilities } from './capabilities';
|
|
9
8
|
import { type ObjectForm } from '../types';
|
|
10
9
|
|
|
10
|
+
import { SpaceCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
export default (context: PluginContext) => {
|
|
12
13
|
const registry = context.getCapability(Capabilities.RxRegistry);
|
|
13
14
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Option } from 'effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
8
|
import { SubscriptionList } from '@dxos/async';
|
|
9
9
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
@@ -14,13 +14,14 @@ import { ClientCapabilities } from '@dxos/plugin-client';
|
|
|
14
14
|
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
15
15
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
16
|
import { PublicKey } from '@dxos/react-client';
|
|
17
|
-
import { FQ_ID_LENGTH,
|
|
17
|
+
import { FQ_ID_LENGTH, SpaceState, parseFullyQualifiedId } from '@dxos/react-client/echo';
|
|
18
18
|
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
19
19
|
|
|
20
|
-
import { SpaceCapabilities } from './capabilities';
|
|
21
20
|
import { SpaceAction } from '../types';
|
|
22
21
|
import { COMPOSER_SPACE_LOCK, SHARED } from '../util';
|
|
23
22
|
|
|
23
|
+
import { SpaceCapabilities } from './capabilities';
|
|
24
|
+
|
|
24
25
|
const ACTIVE_NODE_BROADCAST_INTERVAL = 30_000;
|
|
25
26
|
const WAIT_FOR_OBJECT_TIMEOUT = 5_000;
|
|
26
27
|
|
|
@@ -66,12 +67,14 @@ export default async (context: PluginContext) => {
|
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
const
|
|
70
|
-
|
|
70
|
+
const id = active[0];
|
|
71
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
72
|
+
if (!node && id.length === FQ_ID_LENGTH) {
|
|
73
|
+
void graph.initialize(id);
|
|
71
74
|
const timeout = setTimeout(async () => {
|
|
72
|
-
const node = graph.getNode(
|
|
75
|
+
const node = graph.getNode(id).pipe(Option.getOrNull);
|
|
73
76
|
if (!node) {
|
|
74
|
-
await dispatch(createIntent(SpaceAction.WaitForObject, { id
|
|
77
|
+
await dispatch(createIntent(SpaceAction.WaitForObject, { id }));
|
|
75
78
|
}
|
|
76
79
|
}, WAIT_FOR_OBJECT_TIMEOUT);
|
|
77
80
|
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { effect } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
-
import { Capabilities,
|
|
7
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
9
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
10
10
|
import { ComplexMap } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import { SpaceCapabilities } from './capabilities';
|
|
13
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
13
|
import { type PluginState } from '../types';
|
|
15
14
|
|
|
15
|
+
import { SpaceCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default (context: PluginContext) => {
|
|
17
18
|
const state = new LocalStorageStore<PluginState>(SPACE_PLUGIN, {
|
|
18
19
|
awaiting: undefined,
|