@dxos/plugin-space 0.8.3-staging.0fa589b → 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
|
@@ -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,
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { CheckCircle, CircleDashed, CircleNotch } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from '@dxos/app-framework';
|
|
9
8
|
import { useClient } from '@dxos/react-client';
|
|
10
9
|
import { Filter, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
11
|
-
import { Button, Toast, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
10
|
+
import { Button, Icon, Toast, useTranslation } from '@dxos/react-ui';
|
|
13
11
|
|
|
14
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
15
13
|
import { SpaceAction } from '../types';
|
|
@@ -66,17 +64,17 @@ export const AwaitingObject = ({ id }: { id: string }) => {
|
|
|
66
64
|
<Toast.Title classNames='flex items-center gap-2'>
|
|
67
65
|
{found ? (
|
|
68
66
|
<>
|
|
69
|
-
<
|
|
67
|
+
<Icon icon='ph--check-circle--regular' size={5} />
|
|
70
68
|
<span>{t('found object label')}</span>
|
|
71
69
|
</>
|
|
72
70
|
) : waiting ? (
|
|
73
71
|
<>
|
|
74
|
-
<
|
|
72
|
+
<Icon icon='ph--circle-notch--regular' size={5} classNames='animate-spin' />
|
|
75
73
|
<span>{t('waiting for object label')}</span>
|
|
76
74
|
</>
|
|
77
75
|
) : (
|
|
78
76
|
<>
|
|
79
|
-
<
|
|
77
|
+
<Icon icon='ph--circle-dashed--regular' size={5} />
|
|
80
78
|
<span>{t('object not found label')}</span>
|
|
81
79
|
</>
|
|
82
80
|
)}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { useEffect } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
@@ -12,24 +12,25 @@ import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
13
|
import { Dialog } from '@dxos/react-ui';
|
|
14
14
|
import { DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
15
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
16
16
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
17
17
|
|
|
18
|
+
import { translations } from '../../translations';
|
|
19
|
+
|
|
18
20
|
import { CreateObjectDialog, type CreateObjectDialogProps } from './CreateObjectDialog';
|
|
19
|
-
import translations from '../../translations';
|
|
20
21
|
|
|
21
|
-
const Story = (
|
|
22
|
+
const Story = (props: CreateObjectDialogProps) => {
|
|
22
23
|
return (
|
|
23
24
|
<Dialog.Root open>
|
|
24
25
|
<Dialog.Overlay blockAlign='start'>
|
|
25
|
-
<CreateObjectDialog {...
|
|
26
|
+
<CreateObjectDialog {...props} />
|
|
26
27
|
</Dialog.Overlay>
|
|
27
28
|
</Dialog.Root>
|
|
28
29
|
);
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
// TODO(wittjosiah): Story should be for CreateObjectPanel.
|
|
32
|
-
const meta
|
|
33
|
+
const meta = {
|
|
33
34
|
title: 'plugins/plugin-space/CreateObjectDialog',
|
|
34
35
|
component: CreateObjectDialog,
|
|
35
36
|
render: Story,
|
|
@@ -39,10 +40,10 @@ const meta: Meta<typeof CreateObjectDialog> = {
|
|
|
39
40
|
withLayout(),
|
|
40
41
|
],
|
|
41
42
|
parameters: {
|
|
42
|
-
translations: [...translations,
|
|
43
|
+
translations: [...translations, ...shellTranslations],
|
|
43
44
|
},
|
|
44
45
|
args: {},
|
|
45
|
-
}
|
|
46
|
+
} satisfies Meta<typeof CreateObjectDialog>;
|
|
46
47
|
|
|
47
48
|
export default meta;
|
|
48
49
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { pipe } from 'effect';
|
|
5
|
+
import { Effect, pipe } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import {
|
|
@@ -14,30 +14,37 @@ import {
|
|
|
14
14
|
useIntentDispatcher,
|
|
15
15
|
usePluginManager,
|
|
16
16
|
} from '@dxos/app-framework';
|
|
17
|
-
import { Query, Type
|
|
17
|
+
import { Obj, Query, Type } from '@dxos/echo';
|
|
18
18
|
import { invariant } from '@dxos/invariant';
|
|
19
19
|
import { useClient } from '@dxos/react-client';
|
|
20
|
-
import { getSpace, isLiveObject, isSpace,
|
|
20
|
+
import { type Space, getSpace, isLiveObject, isSpace, useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
21
21
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
22
22
|
import { cardDialogContent, cardDialogHeader } from '@dxos/react-ui-stack';
|
|
23
|
-
import { DataType } from '@dxos/schema';
|
|
23
|
+
import { DataType, typenameFromQuery } from '@dxos/schema';
|
|
24
24
|
import { isNonNullable } from '@dxos/util';
|
|
25
25
|
|
|
26
|
-
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
27
26
|
import { SpaceCapabilities } from '../../capabilities';
|
|
28
27
|
import { SPACE_PLUGIN } from '../../meta';
|
|
29
28
|
import { SpaceAction } from '../../types';
|
|
30
29
|
|
|
30
|
+
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
31
|
+
|
|
31
32
|
export const CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
32
33
|
|
|
33
|
-
export type CreateObjectDialogProps = Pick<
|
|
34
|
+
export type CreateObjectDialogProps = Pick<
|
|
35
|
+
CreateObjectPanelProps,
|
|
36
|
+
'target' | 'views' | 'typename' | 'initialFormValues'
|
|
37
|
+
> & {
|
|
38
|
+
onCreateObject?: (object: Obj.Any) => void;
|
|
34
39
|
shouldNavigate?: (object: Obj.Any) => boolean;
|
|
35
40
|
};
|
|
36
41
|
|
|
37
42
|
export const CreateObjectDialog = ({
|
|
38
43
|
target: initialTarget,
|
|
39
44
|
typename: initialTypename,
|
|
40
|
-
|
|
45
|
+
views,
|
|
46
|
+
initialFormValues,
|
|
47
|
+
onCreateObject,
|
|
41
48
|
shouldNavigate: _shouldNavigate,
|
|
42
49
|
}: CreateObjectDialogProps) => {
|
|
43
50
|
const closeRef = useRef<HTMLButtonElement | null>(null);
|
|
@@ -45,13 +52,15 @@ export const CreateObjectDialog = ({
|
|
|
45
52
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
46
53
|
const client = useClient();
|
|
47
54
|
const spaces = useSpaces();
|
|
48
|
-
const {
|
|
55
|
+
const { dispatch } = useIntentDispatcher();
|
|
49
56
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
50
57
|
const [target, setTarget] = useState<Space | DataType.Collection | undefined>(initialTarget);
|
|
51
58
|
const [typename, setTypename] = useState<string | undefined>(initialTypename);
|
|
52
59
|
const space = isSpace(target) ? target : getSpace(target);
|
|
53
60
|
const queryCollections = useQuery(space, Query.type(DataType.QueryCollection));
|
|
54
|
-
const hiddenTypenames = queryCollections
|
|
61
|
+
const hiddenTypenames = queryCollections
|
|
62
|
+
.map((collection) => typenameFromQuery(collection.query))
|
|
63
|
+
.filter(isNonNullable);
|
|
55
64
|
|
|
56
65
|
const resolve = useCallback<NonNullable<CreateObjectPanelProps['resolve']>>(
|
|
57
66
|
(typename) =>
|
|
@@ -60,31 +69,33 @@ export const CreateObjectDialog = ({
|
|
|
60
69
|
);
|
|
61
70
|
|
|
62
71
|
const handleCreateObject = useCallback<NonNullable<CreateObjectPanelProps['onCreateObject']>>(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
({ form, data = {} }) =>
|
|
73
|
+
Effect.gen(function* () {
|
|
74
|
+
if (!target) {
|
|
75
|
+
// TODO(wittjosiah): UI feedback.
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// NOTE: Must close before navigating or attention won't follow object.
|
|
80
|
+
closeRef.current?.click();
|
|
68
81
|
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
const space = isSpace(target) ? target : getSpace(target);
|
|
83
|
+
invariant(space, 'Missing space');
|
|
84
|
+
const { object } = yield* dispatch(form.getIntent(data, { space }));
|
|
85
|
+
if (isLiveObject(object) && !Obj.instanceOf(DataType.StoredSchema, object)) {
|
|
86
|
+
// TODO(wittjosiah): Selection in navtree isn't working as expected when hidden typenames evals to true.
|
|
87
|
+
const hidden = form.hidden || hiddenTypenames.includes(Type.getTypename(form.objectSchema));
|
|
88
|
+
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden });
|
|
89
|
+
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
90
|
+
if (shouldNavigate(object)) {
|
|
91
|
+
yield* dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
|
|
92
|
+
} else {
|
|
93
|
+
yield* dispatch(addObjectIntent);
|
|
94
|
+
}
|
|
71
95
|
|
|
72
|
-
|
|
73
|
-
invariant(space, 'Missing space');
|
|
74
|
-
const result = await dispatch(form.getIntent(data, { space }));
|
|
75
|
-
const object = result.data?.object;
|
|
76
|
-
if (isLiveObject(object)) {
|
|
77
|
-
// TODO(wittjosiah): Selection in navtree isn't working as expected when hidden typenames evals to true.
|
|
78
|
-
const hidden = form.hidden || hiddenTypenames.includes(Type.getTypename(form.objectSchema));
|
|
79
|
-
const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object, hidden });
|
|
80
|
-
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
81
|
-
if (shouldNavigate(object)) {
|
|
82
|
-
await dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
|
|
83
|
-
} else {
|
|
84
|
-
await dispatch(addObjectIntent);
|
|
96
|
+
onCreateObject?.(object);
|
|
85
97
|
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
98
|
+
}).pipe(Effect.runPromise),
|
|
88
99
|
[dispatch, target, resolve, hiddenTypenames, _shouldNavigate],
|
|
89
100
|
);
|
|
90
101
|
|
|
@@ -94,7 +105,9 @@ export const CreateObjectDialog = ({
|
|
|
94
105
|
<Dialog.Content classNames={cardDialogContent}>
|
|
95
106
|
<div role='none' className={cardDialogHeader}>
|
|
96
107
|
<Dialog.Title>
|
|
97
|
-
{t('create object dialog title', {
|
|
108
|
+
{t('create object dialog title', {
|
|
109
|
+
object: t('typename label', { ns: typename, defaultValue: views ? 'View' : 'Item' }),
|
|
110
|
+
})}
|
|
98
111
|
</Dialog.Title>
|
|
99
112
|
<Dialog.Close asChild>
|
|
100
113
|
<Button ref={closeRef} density='fine' variant='ghost' autoFocus>
|
|
@@ -107,8 +120,9 @@ export const CreateObjectDialog = ({
|
|
|
107
120
|
forms={forms}
|
|
108
121
|
spaces={spaces}
|
|
109
122
|
target={target}
|
|
123
|
+
views={views}
|
|
110
124
|
typename={typename}
|
|
111
|
-
|
|
125
|
+
initialFormValues={initialFormValues}
|
|
112
126
|
defaultSpaceId={client.spaces.default.id}
|
|
113
127
|
resolve={resolve}
|
|
114
128
|
onTargetChange={setTarget}
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Option } from 'effect';
|
|
5
6
|
import React, { useCallback } from 'react';
|
|
6
7
|
|
|
7
8
|
import { Type } from '@dxos/echo';
|
|
8
|
-
import {
|
|
9
|
-
import { type
|
|
10
|
-
import { Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { type BaseObject, type TypeAnnotation, ViewAnnotation, getTypeAnnotation } from '@dxos/echo-schema';
|
|
10
|
+
import { type Space, type SpaceId } from '@dxos/react-client/echo';
|
|
11
|
+
import { Icon, toLocalizedString, useDefaultValue, useTranslation } from '@dxos/react-ui';
|
|
11
12
|
import { Form } from '@dxos/react-ui-form';
|
|
12
13
|
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
13
14
|
import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from '@dxos/react-ui-stack';
|
|
14
15
|
import { type DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
16
|
+
import { type MaybePromise, isNonNullable } from '@dxos/util';
|
|
16
17
|
|
|
17
18
|
import { useInputSurfaceLookup } from '../../hooks';
|
|
18
19
|
import { SPACE_PLUGIN } from '../../meta';
|
|
@@ -24,7 +25,8 @@ export type CreateObjectPanelProps = {
|
|
|
24
25
|
spaces: Space[];
|
|
25
26
|
typename?: string;
|
|
26
27
|
target?: Space | DataType.Collection;
|
|
27
|
-
|
|
28
|
+
views?: boolean;
|
|
29
|
+
initialFormValues?: Partial<BaseObject>;
|
|
28
30
|
defaultSpaceId?: SpaceId;
|
|
29
31
|
resolve?: (typename: string) => Record<string, any>;
|
|
30
32
|
onTargetChange?: (target: Space) => void;
|
|
@@ -37,7 +39,8 @@ export const CreateObjectPanel = ({
|
|
|
37
39
|
spaces,
|
|
38
40
|
typename,
|
|
39
41
|
target,
|
|
40
|
-
|
|
42
|
+
views,
|
|
43
|
+
initialFormValues: _initialFormValues,
|
|
41
44
|
defaultSpaceId,
|
|
42
45
|
resolve,
|
|
43
46
|
onTargetChange,
|
|
@@ -45,8 +48,16 @@ export const CreateObjectPanel = ({
|
|
|
45
48
|
onCreateObject,
|
|
46
49
|
}: CreateObjectPanelProps) => {
|
|
47
50
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
51
|
+
const initialFormValues = useDefaultValue(_initialFormValues, () => ({}));
|
|
48
52
|
const form = forms.find((form) => Type.getTypename(form.objectSchema) === typename);
|
|
49
53
|
const options: TypeAnnotation[] = forms
|
|
54
|
+
.filter((form) => {
|
|
55
|
+
if (views == null) {
|
|
56
|
+
return true;
|
|
57
|
+
} else {
|
|
58
|
+
return views === ViewAnnotation.get(form.objectSchema).pipe(Option.getOrElse(() => false));
|
|
59
|
+
}
|
|
60
|
+
})
|
|
50
61
|
.map((form) => getTypeAnnotation(form.objectSchema))
|
|
51
62
|
.filter(isNonNullable)
|
|
52
63
|
.sort((a, b) => {
|
|
@@ -88,7 +99,7 @@ export const CreateObjectPanel = ({
|
|
|
88
99
|
<div role='none' className={cardDialogOverflow}>
|
|
89
100
|
<Form
|
|
90
101
|
autoFocus
|
|
91
|
-
values={
|
|
102
|
+
values={initialFormValues}
|
|
92
103
|
schema={form.formSchema}
|
|
93
104
|
testId='create-object-form'
|
|
94
105
|
onSave={handleCreateObject}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Effect, type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useRef } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
import { cardDialogContent, cardDialogHeader } from '@dxos/react-ui-stack';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { Trigger } from '@dxos/async';
|
|
9
9
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
10
10
|
import { useClient } from '@dxos/react-client';
|
|
@@ -4,27 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
|
+
import React from 'react';
|
|
8
9
|
|
|
10
|
+
import { useSpace } from '@dxos/react-client/echo';
|
|
9
11
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
13
|
+
import { render, withLayout, withTheme } from '@dxos/storybook-utils';
|
|
14
|
+
|
|
15
|
+
import { translations } from '../translations';
|
|
12
16
|
|
|
13
17
|
import { MembersContainer } from './MembersContainer';
|
|
14
|
-
import translations from '../translations';
|
|
15
18
|
|
|
16
|
-
const
|
|
19
|
+
const DefaultStory = () => {
|
|
20
|
+
const space = useSpace();
|
|
21
|
+
if (!space) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<MembersContainer
|
|
27
|
+
space={space}
|
|
28
|
+
createInvitationUrl={(invitationCode) => `https://dxos.org/invite/${invitationCode}`}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const meta = {
|
|
17
34
|
title: 'plugins/plugin-space/MembersContainer',
|
|
18
|
-
component: MembersContainer,
|
|
19
|
-
|
|
35
|
+
component: MembersContainer as any,
|
|
36
|
+
render: render(DefaultStory),
|
|
37
|
+
decorators: [
|
|
38
|
+
withClientProvider({
|
|
39
|
+
createIdentity: true,
|
|
40
|
+
createSpace: true,
|
|
41
|
+
}),
|
|
42
|
+
withTheme,
|
|
43
|
+
withLayout(),
|
|
44
|
+
],
|
|
20
45
|
parameters: {
|
|
21
46
|
layout: 'fullscreen',
|
|
22
|
-
translations: [...translations,
|
|
47
|
+
translations: [...translations, ...shellTranslations],
|
|
23
48
|
},
|
|
24
|
-
}
|
|
49
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
25
50
|
|
|
26
51
|
export default meta;
|
|
27
52
|
|
|
28
|
-
type Story = StoryObj<typeof
|
|
53
|
+
type Story = StoryObj<typeof meta>;
|
|
29
54
|
|
|
30
55
|
export const Default: Story = {};
|
|
@@ -2,20 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Check, X } from '@phosphor-icons/react';
|
|
6
5
|
import React, { type Dispatch, type SetStateAction, useCallback, useMemo, useState } from 'react';
|
|
7
6
|
import { QR } from 'react-qr-rounded';
|
|
8
7
|
|
|
9
8
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
10
|
-
import { Type } from '@dxos/echo';
|
|
11
9
|
import { log } from '@dxos/log';
|
|
12
10
|
import { useConfig } from '@dxos/react-client';
|
|
13
|
-
import { fullyQualifiedId, useSpaceInvitations
|
|
11
|
+
import { type Space, fullyQualifiedId, useSpaceInvitations } from '@dxos/react-client/echo';
|
|
14
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
15
13
|
import { Button, Clipboard, Icon, Input, useId, useTranslation } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
14
|
+
import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
17
15
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
18
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
19
16
|
import { DataType } from '@dxos/schema';
|
|
20
17
|
import {
|
|
21
18
|
type ActionMenuItem,
|
|
@@ -44,13 +41,12 @@ const handleInvitationEvent = (invitation: Invitation, subscription: ZenObservab
|
|
|
44
41
|
}
|
|
45
42
|
};
|
|
46
43
|
|
|
47
|
-
export
|
|
48
|
-
space,
|
|
49
|
-
createInvitationUrl,
|
|
50
|
-
}: {
|
|
44
|
+
export type MembersContainerProps = {
|
|
51
45
|
space: Space;
|
|
52
46
|
createInvitationUrl: (invitationCode: string) => string;
|
|
53
|
-
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const MembersContainer = ({ space, createInvitationUrl }: MembersContainerProps) => {
|
|
54
50
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
55
51
|
const config = useConfig();
|
|
56
52
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
@@ -67,7 +63,7 @@ export const MembersContainer = ({
|
|
|
67
63
|
};
|
|
68
64
|
|
|
69
65
|
// TODO(wittjosiah): Track which was the most recently viewed object.
|
|
70
|
-
const target = space.properties[
|
|
66
|
+
const target = space.properties[DataType.Collection.typename]?.target?.objects[0]?.target;
|
|
71
67
|
|
|
72
68
|
const locked = space.properties[COMPOSER_SPACE_LOCK];
|
|
73
69
|
const handleChangeLocked = useCallback(() => {
|
|
@@ -171,7 +167,7 @@ export const MembersContainer = ({
|
|
|
171
167
|
)}
|
|
172
168
|
</ControlFrame>
|
|
173
169
|
{/* TODO(wittjosiah): Make ControlItemInput & ControlFrame compatible. */}
|
|
174
|
-
<div className='justify-center
|
|
170
|
+
<div className='justify-center p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
|
|
175
171
|
<ControlItemInput title={t('space locked label')} description={t('space locked description')}>
|
|
176
172
|
<Input.Switch checked={locked} onCheckedChange={handleChangeLocked} classNames='justify-self-end' />
|
|
177
173
|
</ControlItemInput>
|
|
@@ -281,5 +277,9 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
|
|
|
281
277
|
};
|
|
282
278
|
|
|
283
279
|
const InvitationComplete = ({ statusValue }: { statusValue: number }) => {
|
|
284
|
-
return statusValue > 0 ?
|
|
280
|
+
return statusValue > 0 ? (
|
|
281
|
+
<Icon icon='ph--check--regular' size={6} classNames='m-1.5' />
|
|
282
|
+
) : (
|
|
283
|
+
<Icon icon='ph--x--regular' size={6} classNames='m-1.5' />
|
|
284
|
+
);
|
|
285
285
|
};
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Planet } from '@phosphor-icons/react';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import { getSpace } from '@dxos/client/echo';
|
|
9
8
|
import { type Obj } from '@dxos/echo';
|
|
10
9
|
import { useClient } from '@dxos/react-client';
|
|
11
|
-
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
12
11
|
|
|
13
12
|
import { SPACE_PLUGIN } from '../meta';
|
|
14
13
|
import { getSpaceDisplayName } from '../util';
|
|
@@ -25,7 +24,7 @@ export const MenuFooter = ({ object }: { object: Obj.Any }) => {
|
|
|
25
24
|
<dl className='pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2'>
|
|
26
25
|
<dt className='uppercase text-[.75em] tracking-wide font-medium mbs-px self-start'>{t('location label')}</dt>
|
|
27
26
|
<dd className='line-clamp-3'>
|
|
28
|
-
<
|
|
27
|
+
<Icon icon='ph--planet--regular' classNames='inline-block mie-1' />
|
|
29
28
|
{toLocalizedString(spaceName, t)}
|
|
30
29
|
</dd>
|
|
31
30
|
</dl>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type JsonPath, setValue } from '@dxos/echo-schema';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { useClient } from '@dxos/react-client';
|
|
10
|
+
import { Filter, getSpace, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
11
|
+
import { Callout, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { useSelected } from '@dxos/react-ui-attention';
|
|
13
|
+
import { Form, useRefQueryLookupHandler } from '@dxos/react-ui-form';
|
|
14
|
+
import { type DataType } from '@dxos/schema';
|
|
15
|
+
import { typenameFromQuery } from '@dxos/schema';
|
|
16
|
+
import { isNonNullable } from '@dxos/util';
|
|
17
|
+
|
|
18
|
+
import { SPACE_PLUGIN } from '../meta';
|
|
19
|
+
|
|
20
|
+
type RowDetailsPanelProps = { objectId: string; view: DataType.View };
|
|
21
|
+
|
|
22
|
+
const ObjectDetailsPanel = ({ objectId, view }: RowDetailsPanelProps) => {
|
|
23
|
+
const { t } = useTranslation(SPACE_PLUGIN);
|
|
24
|
+
const client = useClient();
|
|
25
|
+
const space = getSpace(view);
|
|
26
|
+
const typename = view.query ? typenameFromQuery(view.query) : undefined;
|
|
27
|
+
const schema = useSchema(client, space, typename);
|
|
28
|
+
|
|
29
|
+
const queriedObjects = useQuery(space, schema ? Filter.type(schema) : Filter.nothing());
|
|
30
|
+
const selectedRows = useSelected(objectId, 'multi');
|
|
31
|
+
const selectedObjects = selectedRows.map((id) => queriedObjects.find((obj) => obj.id === id)).filter(isNonNullable);
|
|
32
|
+
|
|
33
|
+
const handleRefQueryLookup = useRefQueryLookupHandler({ space });
|
|
34
|
+
|
|
35
|
+
const handleSave = useCallback(
|
|
36
|
+
(values: any, { changed }: { changed: Record<JsonPath, boolean> }) => {
|
|
37
|
+
const id = values.id;
|
|
38
|
+
invariant(typeof id === 'string');
|
|
39
|
+
const object = queriedObjects.find((obj) => obj.id === id);
|
|
40
|
+
invariant(object);
|
|
41
|
+
|
|
42
|
+
const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
|
|
43
|
+
for (const path of changedPaths) {
|
|
44
|
+
const value = values[path];
|
|
45
|
+
setValue(object, path, value);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[queriedObjects],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
if (selectedObjects.length === 0) {
|
|
52
|
+
return (
|
|
53
|
+
<div role='none' className='plb-cardSpacingBlock pli-cardSpacingInline'>
|
|
54
|
+
<Callout.Root classNames='is-full'>
|
|
55
|
+
<Callout.Title>{t('row details no selection label')}</Callout.Title>
|
|
56
|
+
</Callout.Root>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div role='none' className='bs-full is-full flex flex-col p-2 gap-1 overflow-y-auto'>
|
|
63
|
+
{schema &&
|
|
64
|
+
selectedObjects.map((object) => (
|
|
65
|
+
<div key={object.id} className='border border-separator rounded'>
|
|
66
|
+
<Form
|
|
67
|
+
autoSave
|
|
68
|
+
schema={schema}
|
|
69
|
+
values={object}
|
|
70
|
+
onSave={handleSave}
|
|
71
|
+
onQueryRefOptions={handleRefQueryLookup}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
))}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default ObjectDetailsPanel;
|
|
@@ -9,9 +9,10 @@ import { ForeignKey } from '@dxos/echo-schema';
|
|
|
9
9
|
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
12
|
-
import { ForeignKeys } from './ForeignKeys';
|
|
13
12
|
import { SPACE_PLUGIN } from '../../meta';
|
|
14
13
|
|
|
14
|
+
import { ForeignKeys } from './ForeignKeys';
|
|
15
|
+
|
|
15
16
|
const initialValues = {
|
|
16
17
|
source: '',
|
|
17
18
|
id: '',
|
|
@@ -6,7 +6,7 @@ import React, { useMemo } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework';
|
|
8
8
|
import { type Obj } from '@dxos/echo';
|
|
9
|
-
import { Clipboard } from '@dxos/react-ui';
|
|
9
|
+
import { Clipboard, Toolbar } from '@dxos/react-ui';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
12
12
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
@@ -21,7 +21,8 @@ export const ObjectSettingsContainer = ({ object, role }: ObjectSettingsContaine
|
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<Clipboard.Provider>
|
|
24
|
-
<StackItem.Content toolbar
|
|
24
|
+
<StackItem.Content toolbar>
|
|
25
|
+
<Toolbar.Root></Toolbar.Root>
|
|
25
26
|
<div role='none' className='overflow-y-auto pli-cardSpacingInline plb-cardSpacingBlock'>
|
|
26
27
|
<BaseObjectSettings object={object}>
|
|
27
28
|
<Surface role='base-object-settings' data={data} />
|