@dxos/plugin-space 0.9.0 → 0.9.1-staging.ee54ba693a
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/neutral/{CollectionArticle-S3OF5KJ7.mjs → CollectionArticle-BMH7SZ7Q.mjs} +9 -12
- package/dist/lib/neutral/CollectionArticle-BMH7SZ7Q.mjs.map +7 -0
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs → CollectionSection-BLYTGOKH.mjs} +2 -2
- package/dist/lib/neutral/{CollectionSection-A5WRHE5Z.mjs.map → CollectionSection-BLYTGOKH.mjs.map} +3 -3
- package/dist/lib/neutral/{CreateObjectDialog-66R3K6I3.mjs → CreateObjectDialog-5454N3FJ.mjs} +29 -14
- package/dist/lib/neutral/CreateObjectDialog-5454N3FJ.mjs.map +7 -0
- package/dist/lib/neutral/{CreateSpaceDialog-CDGSEIJB.mjs → CreateSpaceDialog-WWNUTLVK.mjs} +6 -6
- package/dist/lib/neutral/CreateSpaceDialog-WWNUTLVK.mjs.map +7 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs +58 -0
- package/dist/lib/neutral/DefaultProperties-5SAWQC6I.mjs.map +7 -0
- package/dist/lib/neutral/{ImportSpaceDialog-7GKV4OTF.mjs → ImportSpaceDialog-CSSRTFAO.mjs} +4 -4
- package/dist/lib/neutral/ImportSpaceDialog-CSSRTFAO.mjs.map +7 -0
- package/dist/lib/neutral/{InlineSyncStatus-TBJKZCH7.mjs → InlineSyncStatus-UOUTAPCU.mjs} +4 -4
- package/dist/lib/neutral/InlineSyncStatus-UOUTAPCU.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-SSFKRFTJ.mjs → JoinDialog-ATNUCNL2.mjs} +13 -30
- package/dist/lib/neutral/JoinDialog-ATNUCNL2.mjs.map +7 -0
- package/dist/lib/neutral/{MembersContainer-KMCQDWCS.mjs → MembersContainer-C4ZTP6ZW.mjs} +13 -9
- package/dist/lib/neutral/MembersContainer-C4ZTP6ZW.mjs.map +7 -0
- package/dist/lib/neutral/{MenuFooter-5JT7V5FZ.mjs → MenuFooter-FWE5LFM4.mjs} +6 -6
- package/dist/lib/neutral/MenuFooter-FWE5LFM4.mjs.map +7 -0
- package/dist/lib/neutral/{ObjectCardStack-IXNU3HEN.mjs → ObjectCardStack-DHVDRNRK.mjs} +4 -4
- package/dist/lib/neutral/ObjectCardStack-DHVDRNRK.mjs.map +7 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs +102 -0
- package/dist/lib/neutral/RecordArticle-JSORXRAA.mjs.map +7 -0
- package/dist/lib/neutral/{RelatedArticle-YDNGUDAJ.mjs → RelatedArticle-Z777WVDW.mjs} +11 -10
- package/dist/lib/neutral/RelatedArticle-Z777WVDW.mjs.map +7 -0
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs +104 -0
- package/dist/lib/neutral/RenamePopover-AZT2KPOF.mjs.map +7 -0
- package/dist/lib/neutral/{SchemaContainer-Q4BP6X2M.mjs → SchemaContainer-4GJKQBXM.mjs} +9 -5
- package/dist/lib/neutral/SchemaContainer-4GJKQBXM.mjs.map +7 -0
- package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs → SmallPresenceLive-FW3AMEY5.mjs} +2 -2
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs +78 -0
- package/dist/lib/neutral/SpaceHomeArticle-Y47TLZ72.mjs.map +7 -0
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs +89 -0
- package/dist/lib/neutral/SpaceHomeRecent-S57AO3EV.mjs.map +7 -0
- package/dist/lib/neutral/SpacePlugin.mjs +1 -1
- package/dist/lib/neutral/SpacePlugin.node.mjs +4 -4
- package/dist/lib/neutral/SpacePlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs → SpacePresence-T37WH43Y.mjs} +2 -2
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs +60 -0
- package/dist/lib/neutral/SpaceSettings-6CZF7GEO.mjs.map +7 -0
- package/dist/lib/neutral/{SpaceSettingsContainer-IB34TEOB.mjs → SpaceSettingsContainer-72CJWELM.mjs} +44 -41
- package/dist/lib/neutral/SpaceSettingsContainer-72CJWELM.mjs.map +7 -0
- package/dist/lib/neutral/{SyncStatus-CWOXWDDZ.mjs → SyncStatus-J7CHLO5O.mjs} +3 -3
- package/dist/lib/neutral/SyncStatus-J7CHLO5O.mjs.map +7 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs +143 -0
- package/dist/lib/neutral/TypeCollectionArticle-W76ADS2G.mjs.map +7 -0
- package/dist/lib/neutral/{add-object-QYOMCBJA.mjs → add-object-H2N4AOQJ.mjs} +16 -16
- package/dist/lib/neutral/add-object-H2N4AOQJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs → add-relation-BGTLART5.mjs} +3 -3
- package/dist/lib/neutral/{add-type-CZVKSEIW.mjs → add-type-JIDLRANR.mjs} +3 -3
- package/dist/lib/neutral/{add-type-CZVKSEIW.mjs.map → add-type-JIDLRANR.mjs.map} +1 -1
- package/dist/lib/neutral/{app-graph-builder-SQGCUCDO.mjs → app-graph-builder-7H2KOD4B.mjs} +284 -203
- package/dist/lib/neutral/app-graph-builder-7H2KOD4B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +14 -16
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- package/dist/lib/neutral/{chunk-7WUJENBF.mjs → chunk-52ASDNRA.mjs} +5 -6
- package/dist/lib/neutral/chunk-52ASDNRA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs +46 -0
- package/dist/lib/neutral/chunk-5ZZS3KMK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-C2ULK22J.mjs +17 -0
- package/dist/lib/neutral/chunk-C2ULK22J.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-K34BPPQE.mjs → chunk-F5KLUP2P.mjs} +35 -18
- package/dist/lib/neutral/chunk-F5KLUP2P.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs → chunk-G2KHP7FX.mjs} +2 -2
- package/dist/lib/neutral/{chunk-JHZGRYGS.mjs.map → chunk-G2KHP7FX.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-YY62663T.mjs → chunk-LMUG6PEJ.mjs} +4 -5
- package/dist/lib/neutral/chunk-LMUG6PEJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EEXRKYOD.mjs → chunk-RAAHDTVF.mjs} +9 -5
- package/dist/lib/neutral/chunk-RAAHDTVF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BBQR23DW.mjs → chunk-SPWAMXNR.mjs} +105 -128
- package/dist/lib/neutral/chunk-SPWAMXNR.mjs.map +7 -0
- package/dist/lib/neutral/chunk-U5WTDOMV.mjs +8 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs +9 -0
- package/dist/lib/neutral/chunk-V7JALUM3.mjs.map +7 -0
- package/dist/lib/neutral/{close-FGQN37PK.mjs → close-5WEQZRNK.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +22 -23
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/constants.mjs +16 -0
- package/dist/lib/neutral/constants.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +29 -23
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-EPIFSRJA.mjs → create-QZ47FHQU.mjs} +7 -7
- package/dist/lib/neutral/create-QZ47FHQU.mjs.map +7 -0
- package/dist/lib/neutral/{create-object-22WUOWZQ.mjs → create-object-ZU6FZW5X.mjs} +1 -6
- package/dist/lib/neutral/create-object-ZU6FZW5X.mjs.map +7 -0
- package/dist/lib/neutral/{delete-LIA5M3WI.mjs → delete-SPCU2VFM.mjs} +3 -3
- package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs → delete-field-TAKJVEAD.mjs} +3 -3
- package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs → duplicate-object-BUPZOO6S.mjs} +3 -3
- package/dist/lib/neutral/{export-space-VWJHVXWF.mjs → export-space-S5SCAL4M.mjs} +3 -3
- package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs → get-share-link-CLM5IQRL.mjs} +4 -4
- package/dist/lib/neutral/hooks/index.mjs +16 -4
- package/dist/lib/neutral/hooks/index.mjs.map +3 -3
- package/dist/lib/neutral/{identity-created-57RML5XT.mjs → identity-created-BEYMLBK4.mjs} +5 -5
- package/dist/lib/neutral/identity-created-BEYMLBK4.mjs.map +7 -0
- package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs → import-space-LJQK3KT7.mjs} +3 -3
- package/dist/lib/neutral/index.mjs +16 -6
- package/dist/lib/neutral/join-FSODYIOC.mjs +54 -0
- package/dist/lib/neutral/join-FSODYIOC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{migrate-G7I52UKD.mjs → migrate-WHM6LU7L.mjs} +4 -4
- package/dist/lib/neutral/{migrate-G7I52UKD.mjs.map → migrate-WHM6LU7L.mjs.map} +3 -3
- package/dist/lib/neutral/{navigation-handler-QQJYEMAS.mjs → navigation-handler-ZF7MV2HL.mjs} +16 -10
- package/dist/lib/neutral/navigation-handler-ZF7MV2HL.mjs.map +7 -0
- package/dist/lib/neutral/{navigation-resolver-IFVQRCGU.mjs → navigation-resolver-KBESOSWU.mjs} +11 -11
- package/dist/lib/neutral/navigation-resolver-KBESOSWU.mjs.map +7 -0
- package/dist/lib/neutral/{open-CPWVZSI4.mjs → open-JCXTL3SK.mjs} +3 -3
- package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs → open-create-object-WAIAU7TA.mjs} +6 -6
- package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs → open-create-space-VU47FWPZ.mjs} +6 -6
- package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs → open-import-space-GUHIEWYB.mjs} +6 -6
- package/dist/lib/neutral/{open-members-BEXOSSBS.mjs → open-members-MLLBHKUU.mjs} +6 -6
- package/dist/lib/neutral/open-members-MLLBHKUU.mjs.map +7 -0
- package/dist/lib/neutral/{open-settings-RHDBW2K5.mjs → open-settings-DTPZF4U4.mjs} +6 -6
- package/dist/lib/neutral/open-settings-DTPZF4U4.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +3 -3
- package/dist/lib/neutral/plugin.mjs +4 -4
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs → react-root-YLYRCSAZ.mjs} +2 -2
- package/dist/lib/neutral/{react-root-2DJPZQT4.mjs.map → react-root-YLYRCSAZ.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-LYCTOQLY.mjs → react-surface-LRA7GIFN.mjs} +77 -80
- package/dist/lib/neutral/react-surface-LRA7GIFN.mjs.map +7 -0
- package/dist/lib/neutral/{remove-objects-OWDMA4IF.mjs → remove-objects-WEO66EDS.mjs} +5 -5
- package/dist/lib/neutral/remove-objects-WEO66EDS.mjs.map +7 -0
- package/dist/lib/neutral/{rename-SR6BBSPU.mjs → rename-Q6UNCBIM.mjs} +9 -8
- package/dist/lib/neutral/rename-Q6UNCBIM.mjs.map +7 -0
- package/dist/lib/neutral/{rename-object-5H6E5AOX.mjs → rename-object-2UCEGU7U.mjs} +9 -8
- package/dist/lib/neutral/rename-object-2UCEGU7U.mjs.map +7 -0
- package/dist/lib/neutral/{repair-PSYRVSJ6.mjs → repair-HMH476U3.mjs} +3 -3
- package/dist/lib/neutral/repair-HMH476U3.mjs.map +7 -0
- package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs → restore-field-6CQAFOXY.mjs} +3 -3
- package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs → restore-objects-3VINLP7C.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs → settings-5IBSYBVU.mjs} +3 -3
- package/dist/lib/neutral/{settings-Q32EQCHX.mjs.map → settings-5IBSYBVU.mjs.map} +3 -3
- package/dist/lib/neutral/{share-5Y4NZA75.mjs → share-A4WPILNF.mjs} +3 -3
- package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs → snapshot-HBYMAPA7.mjs} +3 -3
- package/dist/lib/neutral/{spaces-ready-GBF72QJH.mjs → spaces-ready-GWMSU72V.mjs} +12 -12
- package/dist/lib/neutral/spaces-ready-GWMSU72V.mjs.map +7 -0
- package/dist/lib/neutral/{state-DPBOZRAW.mjs → state-KMH2NUAL.mjs} +2 -2
- package/dist/lib/neutral/state-KMH2NUAL.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +18 -8
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +9 -3
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs → undo-mappings-P43EAUGI.mjs} +5 -5
- package/dist/lib/neutral/{undo-mappings-OBRQOYN4.mjs.map → undo-mappings-P43EAUGI.mjs.map} +3 -3
- package/dist/lib/neutral/{wait-for-object-3TAWUWTP.mjs → wait-for-object-U6P2NNWY.mjs} +3 -3
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts +19 -25
- package/dist/types/src/capabilities/app-graph-builder/extensions/collections.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/companions.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts +15 -33
- package/dist/types/src/capabilities/app-graph-builder/extensions/database.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts +3 -2
- package/dist/types/src/capabilities/app-graph-builder/extensions/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts +1 -5
- package/dist/types/src/capabilities/app-graph-builder/extensions/shared.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts +29 -4
- package/dist/types/src/capabilities/app-graph-builder/extensions/spaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -33
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +10 -54
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +3 -33
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +1 -2
- package/dist/types/src/capabilities/repair.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -13
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts +2 -3
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/commands/database/add.d.ts.map +1 -1
- package/dist/types/src/commands/queue/query.d.ts.map +1 -1
- package/dist/types/src/components/ForeignKeys/ForeignKeys.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +1 -2
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts +142 -52
- package/dist/types/src/containers/CreateObjectDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts +142 -52
- package/dist/types/src/containers/CreateSpaceDialog/CreateSpaceDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts +15 -0
- package/dist/types/src/containers/DefaultProperties/DefaultProperties.d.ts.map +1 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts +2 -0
- package/dist/types/src/containers/DefaultProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +142 -52
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RecordArticle/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RelatedArticle/RelatedArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts +16 -0
- package/dist/types/src/containers/RenamePopover/RenamePopover.d.ts.map +1 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts +3 -0
- package/dist/types/src/containers/RenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/containers/SchemaContainer/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts +15 -0
- package/dist/types/src/containers/SpaceHomeArticle/SpaceHomeArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeArticle/index.d.ts +2 -0
- package/dist/types/src/containers/{ObjectProperties → SpaceHomeArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts +22 -0
- package/dist/types/src/containers/SpaceHomeRecent/SpaceHomeRecent.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceHomeRecent/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts +142 -52
- package/dist/types/src/containers/SpacePresence/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts +1 -1
- package/dist/types/src/containers/SpacePresence/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts +11 -0
- package/dist/types/src/containers/SpaceSettings/SpaceSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts +143 -53
- package/dist/types/src/{components → containers}/SpaceSettings/SpaceSettings.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts +142 -52
- package/dist/types/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts +142 -52
- package/dist/types/src/containers/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts +16 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TypeCollectionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +33 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/useRelatedObjects.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-object.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -37
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/helpers.d.ts.map +1 -1
- package/dist/types/src/operations/join.d.ts.map +1 -1
- package/dist/types/src/operations/remove-objects.d.ts.map +1 -1
- package/dist/types/src/operations/rename-object.d.ts.map +1 -1
- package/dist/types/src/operations/rename.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +142 -52
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +3 -1
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/form.d.ts +7 -1
- package/dist/types/src/types/form.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/surface.d.ts +26 -0
- package/dist/types/src/types/surface.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +7 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +35 -0
- package/package.json +71 -59
- package/src/SpacePlugin.test.ts +1 -1
- package/src/SpacePlugin.ts +4 -10
- package/src/capabilities/app-graph-builder/extensions/collections.ts +82 -69
- package/src/capabilities/app-graph-builder/extensions/companions.ts +6 -5
- package/src/capabilities/app-graph-builder/extensions/database.ts +118 -91
- package/src/capabilities/app-graph-builder/extensions/settings.ts +17 -14
- package/src/capabilities/app-graph-builder/extensions/shared.test.ts +13 -9
- package/src/capabilities/app-graph-builder/extensions/shared.ts +5 -23
- package/src/capabilities/app-graph-builder/extensions/spaces.ts +78 -29
- package/src/capabilities/create-object.ts +0 -5
- package/src/capabilities/identity-created.ts +4 -4
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +14 -4
- package/src/capabilities/navigation-resolver.ts +13 -20
- package/src/capabilities/react-root.tsx +1 -1
- package/src/capabilities/react-surface.tsx +95 -99
- package/src/capabilities/repair.ts +4 -2
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/spaces-ready.ts +9 -16
- package/src/capabilities/state.ts +1 -1
- package/src/capabilities/undo-mappings.ts +3 -3
- package/src/commands/database/add.ts +4 -2
- package/src/commands/queue/query.ts +4 -3
- package/src/components/AwaitingObject/AwaitingObject.tsx +1 -1
- package/src/components/CreateObjectPanel/CreateObjectPanel.tsx +2 -2
- package/src/components/ForeignKeys/ForeignKeys.tsx +21 -20
- package/src/components/index.ts +3 -3
- package/src/constants.ts +5 -6
- package/src/containers/CollectionArticle/CollectionArticle.tsx +10 -6
- package/src/containers/CollectionSection/CollectionSection.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/containers/CreateObjectDialog/CreateObjectDialog.tsx +48 -10
- package/src/containers/CreateSpaceDialog/CreateSpaceDialog.tsx +5 -5
- package/src/containers/DefaultProperties/DefaultProperties.tsx +69 -0
- package/src/containers/DefaultProperties/index.ts +5 -0
- package/src/containers/ImportSpaceDialog/ImportSpaceDialog.tsx +3 -3
- package/src/containers/InlineSyncStatus/InlineSyncStatus.tsx +3 -3
- package/src/containers/JoinDialog/JoinDialog.tsx +14 -25
- package/src/containers/MembersContainer/MembersContainer.tsx +42 -38
- package/src/containers/MenuFooter/MenuFooter.tsx +3 -3
- package/src/containers/ObjectCardStack/ObjectCardStack.tsx +3 -3
- package/src/containers/RecordArticle/RecordArticle.tsx +67 -8
- package/src/containers/RelatedArticle/RelatedArticle.tsx +18 -15
- package/src/containers/RenamePopover/RenamePopover.tsx +125 -0
- package/src/containers/RenamePopover/index.ts +6 -0
- package/src/containers/SchemaContainer/SchemaContainer.tsx +22 -18
- package/src/containers/SpaceHomeArticle/SpaceHomeArticle.tsx +100 -0
- package/src/containers/SpaceHomeArticle/index.ts +5 -0
- package/src/containers/SpaceHomeRecent/SpaceHomeRecent.tsx +103 -0
- package/src/containers/SpaceHomeRecent/index.ts +5 -0
- package/src/containers/SpacePresence/SpacePresence.tsx +23 -21
- package/src/containers/SpacePresence/index.ts +1 -1
- package/src/{components → containers}/SpaceSettings/SpaceSettings.stories.tsx +1 -1
- package/src/containers/SpaceSettings/SpaceSettings.tsx +75 -0
- package/src/containers/SpaceSettingsContainer/SpaceSettingsContainer.tsx +120 -111
- package/src/containers/SyncStatus/SyncStatus.tsx +2 -2
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.stories.tsx +116 -0
- package/src/containers/TypeCollectionArticle/TypeCollectionArticle.tsx +162 -0
- package/src/containers/TypeCollectionArticle/index.ts +5 -0
- package/src/containers/index.ts +7 -3
- package/src/errors.ts +11 -0
- package/src/hooks/useInputSurfaceLookup.tsx +3 -2
- package/src/hooks/useRelatedObjects.ts +13 -1
- package/src/index.ts +1 -0
- package/src/meta.ts +2 -27
- package/src/operations/add-object.ts +12 -18
- package/src/operations/add-type.ts +1 -1
- package/src/operations/create.ts +4 -4
- package/src/operations/definitions.ts +2 -3
- package/src/operations/helpers.ts +1 -1
- package/src/operations/join.ts +19 -0
- package/src/operations/migrate.ts +1 -1
- package/src/operations/open-members.ts +3 -3
- package/src/operations/open-settings.ts +3 -3
- package/src/operations/remove-objects.ts +3 -2
- package/src/operations/rename-object.ts +3 -2
- package/src/operations/rename.ts +3 -2
- package/src/translations.ts +18 -7
- package/src/types/Settings.ts +10 -1
- package/src/types/capabilities.ts +9 -9
- package/src/types/events.ts +5 -5
- package/src/types/form.ts +5 -1
- package/src/types/index.ts +1 -0
- package/src/types/surface.ts +31 -0
- package/src/types/types.ts +9 -1
- package/src/util.ts +3 -4
- package/dist/lib/neutral/CollectionArticle-S3OF5KJ7.mjs.map +0 -7
- package/dist/lib/neutral/CreateObjectDialog-66R3K6I3.mjs.map +0 -7
- package/dist/lib/neutral/CreateSpaceDialog-CDGSEIJB.mjs.map +0 -7
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs +0 -59
- package/dist/lib/neutral/EntityRenamePopover-MYSW262F.mjs.map +0 -7
- package/dist/lib/neutral/ImportSpaceDialog-7GKV4OTF.mjs.map +0 -7
- package/dist/lib/neutral/InlineSyncStatus-TBJKZCH7.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-SSFKRFTJ.mjs.map +0 -7
- package/dist/lib/neutral/MembersContainer-KMCQDWCS.mjs.map +0 -7
- package/dist/lib/neutral/MenuFooter-5JT7V5FZ.mjs.map +0 -7
- package/dist/lib/neutral/ObjectCardStack-IXNU3HEN.mjs.map +0 -7
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs +0 -33
- package/dist/lib/neutral/ObjectProperties-BF6KGFFC.mjs.map +0 -7
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs +0 -51
- package/dist/lib/neutral/RecordArticle-QWGH25NT.mjs.map +0 -7
- package/dist/lib/neutral/RelatedArticle-YDNGUDAJ.mjs.map +0 -7
- package/dist/lib/neutral/SchemaContainer-Q4BP6X2M.mjs.map +0 -7
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs +0 -56
- package/dist/lib/neutral/SpaceRenamePopover-KFWL4CTJ.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettings-YAHBOY5T.mjs +0 -37
- package/dist/lib/neutral/SpaceSettings-YAHBOY5T.mjs.map +0 -7
- package/dist/lib/neutral/SpaceSettingsContainer-IB34TEOB.mjs.map +0 -7
- package/dist/lib/neutral/SyncStatus-CWOXWDDZ.mjs.map +0 -7
- package/dist/lib/neutral/add-object-QYOMCBJA.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-SQGCUCDO.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs +0 -81
- package/dist/lib/neutral/app-graph-serializer-IBPPU5VR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs +0 -37
- package/dist/lib/neutral/chunk-4RTSNTDC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7WUJENBF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B7DBIARR.mjs +0 -8
- package/dist/lib/neutral/chunk-BBQR23DW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EEXRKYOD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F5MESIRH.mjs +0 -19
- package/dist/lib/neutral/chunk-F5MESIRH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-K34BPPQE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YY62663T.mjs.map +0 -7
- package/dist/lib/neutral/create-EPIFSRJA.mjs.map +0 -7
- package/dist/lib/neutral/create-object-22WUOWZQ.mjs.map +0 -7
- package/dist/lib/neutral/identity-created-57RML5XT.mjs.map +0 -7
- package/dist/lib/neutral/join-Z5K4OAIG.mjs +0 -28
- package/dist/lib/neutral/join-Z5K4OAIG.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-QQJYEMAS.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-IFVQRCGU.mjs.map +0 -7
- package/dist/lib/neutral/open-members-BEXOSSBS.mjs.map +0 -7
- package/dist/lib/neutral/open-settings-RHDBW2K5.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-LYCTOQLY.mjs.map +0 -7
- package/dist/lib/neutral/remove-objects-OWDMA4IF.mjs.map +0 -7
- package/dist/lib/neutral/rename-SR6BBSPU.mjs.map +0 -7
- package/dist/lib/neutral/rename-object-5H6E5AOX.mjs.map +0 -7
- package/dist/lib/neutral/repair-PSYRVSJ6.mjs.map +0 -7
- package/dist/lib/neutral/spaces-ready-GBF72QJH.mjs.map +0 -7
- package/dist/lib/neutral/state-DPBOZRAW.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -5
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts +0 -8
- package/dist/types/src/components/SpaceSettings/SpaceSettings.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/EntityRenamePopover/EntityRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/EntityRenamePopover/index.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts +0 -10
- package/dist/types/src/containers/ObjectProperties/ObjectProperties.d.ts.map +0 -1
- package/dist/types/src/containers/ObjectProperties/index.d.ts +0 -2
- package/dist/types/src/containers/SpaceRenamePopover/SpaceRenamePopover.d.ts +0 -7
- package/dist/types/src/containers/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts +0 -2
- package/dist/types/src/containers/SpaceRenamePopover/index.d.ts.map +0 -1
- package/src/capabilities/app-graph-serializer.ts +0 -85
- package/src/components/SpaceSettings/SpaceSettings.tsx +0 -56
- package/src/containers/EntityRenamePopover/EntityRenamePopover.tsx +0 -52
- package/src/containers/EntityRenamePopover/index.ts +0 -5
- package/src/containers/ObjectProperties/ObjectProperties.tsx +0 -32
- package/src/containers/ObjectProperties/index.ts +0 -5
- package/src/containers/SpaceRenamePopover/SpaceRenamePopover.tsx +0 -54
- package/src/containers/SpaceRenamePopover/index.ts +0 -5
- /package/dist/lib/neutral/{SmallPresenceLive-GUF4WLUC.mjs.map → SmallPresenceLive-FW3AMEY5.mjs.map} +0 -0
- /package/dist/lib/neutral/{SpacePresence-ACEXUS3N.mjs.map → SpacePresence-T37WH43Y.mjs.map} +0 -0
- /package/dist/lib/neutral/{add-relation-HV3VCMJG.mjs.map → add-relation-BGTLART5.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-B7DBIARR.mjs.map → chunk-U5WTDOMV.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-FGQN37PK.mjs.map → close-5WEQZRNK.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-LIA5M3WI.mjs.map → delete-SPCU2VFM.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-field-ZIGFXFHY.mjs.map → delete-field-TAKJVEAD.mjs.map} +0 -0
- /package/dist/lib/neutral/{duplicate-object-X37FM6PW.mjs.map → duplicate-object-BUPZOO6S.mjs.map} +0 -0
- /package/dist/lib/neutral/{export-space-VWJHVXWF.mjs.map → export-space-S5SCAL4M.mjs.map} +0 -0
- /package/dist/lib/neutral/{get-share-link-3LEA5FSK.mjs.map → get-share-link-CLM5IQRL.mjs.map} +0 -0
- /package/dist/lib/neutral/{import-space-Y5L3QE3C.mjs.map → import-space-LJQK3KT7.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-CPWVZSI4.mjs.map → open-JCXTL3SK.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-object-4LN4PR6N.mjs.map → open-create-object-WAIAU7TA.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-create-space-VPAW3F2T.mjs.map → open-create-space-VU47FWPZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{open-import-space-VLQ5V55H.mjs.map → open-import-space-GUHIEWYB.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-field-UHDG2ZQM.mjs.map → restore-field-6CQAFOXY.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-objects-2UD5P6OC.mjs.map → restore-objects-3VINLP7C.mjs.map} +0 -0
- /package/dist/lib/neutral/{share-5Y4NZA75.mjs.map → share-A4WPILNF.mjs.map} +0 -0
- /package/dist/lib/neutral/{snapshot-H3HKOFVP.mjs.map → snapshot-HBYMAPA7.mjs.map} +0 -0
- /package/dist/lib/neutral/{wait-for-object-3TAWUWTP.mjs.map → wait-for-object-U6P2NNWY.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/SpaceSettings/index.d.ts +0 -0
- /package/src/{components → containers}/SpaceSettings/index.ts +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CREATE_OBJECT_DIALOG,
|
|
3
3
|
CREATE_SPACE_DIALOG,
|
|
4
|
-
ENTITY_RENAME_POPOVER,
|
|
5
4
|
IMPORT_SPACE_DIALOG,
|
|
6
5
|
JOIN_DIALOG,
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
RENAME_POPOVER
|
|
7
|
+
} from "./chunk-C2ULK22J.mjs";
|
|
9
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
10
9
|
|
|
11
10
|
// src/capabilities/react-surface.tsx
|
|
@@ -13,26 +12,42 @@ import * as Effect from "effect/Effect";
|
|
|
13
12
|
import * as Option from "effect/Option";
|
|
14
13
|
import React, { useCallback } from "react";
|
|
15
14
|
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
16
|
-
import { Surface, useAtomCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
17
|
-
import {
|
|
15
|
+
import { Surface, useAtomCapability, useOperationInvoker, useSettingsState } from "@dxos/app-framework/ui";
|
|
16
|
+
import { AppAnnotation } from "@dxos/app-toolkit";
|
|
18
17
|
import { AppSurface, useActiveSpace, useTypeOptions } from "@dxos/app-toolkit/ui";
|
|
19
|
-
import { Annotation, Collection, Database,
|
|
18
|
+
import { Annotation, Collection, Database, Obj, Type } from "@dxos/echo";
|
|
20
19
|
import { SchemaEx } from "@dxos/effect";
|
|
21
20
|
import { SpaceState, getSpace, isSpace, useSpaces } from "@dxos/react-client/echo";
|
|
22
21
|
import { Input } from "@dxos/react-ui";
|
|
23
22
|
import { SelectField } from "@dxos/react-ui-form";
|
|
24
23
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
25
24
|
import { ViewAnnotation } from "@dxos/schema";
|
|
26
|
-
import {
|
|
27
|
-
import { CollectionArticle, CollectionSection, CreateObjectDialog, CreateSpaceDialog, ImportSpaceDialog, InlineSyncStatus, JoinDialog, MembersContainer, MenuFooter,
|
|
25
|
+
import { Position } from "@dxos/util";
|
|
26
|
+
import { CollectionArticle, CollectionSection, CreateObjectDialog, CreateSpaceDialog, DefaultProperties, ImportSpaceDialog, InlineSyncStatus, JoinDialog, MembersContainer, MenuFooter, ObjectCardStack, RecordArticle, RelatedArticle, RenamePopover, SchemaContainer, SmallPresenceLive, SpaceHomeArticle, SpaceHomeRecent, SpacePresence, SpaceSettings, SpaceSettingsContainer, SyncStatus, TypeCollectionArticle, ViewEditor } from "#containers";
|
|
28
27
|
import { meta } from "#meta";
|
|
29
28
|
import { SpaceOperation } from "#operations";
|
|
30
|
-
import { HueAnnotationId, IconAnnotationId, SpaceCapabilities, TypeInputOptionsAnnotationId } from "#types";
|
|
29
|
+
import { HueAnnotationId, IconAnnotationId, SPACE_HOME_NODE_TYPE, SpaceCapabilities, SpaceHomeContent, TypeInputOptionsAnnotationId } from "#types";
|
|
31
30
|
var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({ createInvitationUrl }) {
|
|
32
31
|
return Capability.contributes(Capabilities.ReactSurface, [
|
|
32
|
+
Surface.create({
|
|
33
|
+
id: "spaceHome",
|
|
34
|
+
filter: AppSurface.literal(AppSurface.Article, SPACE_HOME_NODE_TYPE),
|
|
35
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(SpaceHomeArticle, {
|
|
36
|
+
role,
|
|
37
|
+
attendableId: data.attendableId,
|
|
38
|
+
space: data.properties?.space
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
Surface.create({
|
|
42
|
+
id: "spaceHomeRecent",
|
|
43
|
+
filter: Surface.makeFilter(SpaceHomeContent),
|
|
44
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(SpaceHomeRecent, {
|
|
45
|
+
space: data.space
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
33
48
|
Surface.create({
|
|
34
49
|
id: "collectionFallback",
|
|
35
|
-
position:
|
|
50
|
+
position: Position.last,
|
|
36
51
|
filter: AppSurface.object(AppSurface.Article, Collection.Collection),
|
|
37
52
|
component: ({ data }) => /* @__PURE__ */ React.createElement(CollectionArticle, {
|
|
38
53
|
attendableId: data.attendableId,
|
|
@@ -41,30 +56,49 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
41
56
|
}),
|
|
42
57
|
Surface.create({
|
|
43
58
|
id: "recordArticle",
|
|
44
|
-
position:
|
|
59
|
+
position: Position.last,
|
|
45
60
|
filter: AppSurface.subject(AppSurface.Article, Obj.isObject),
|
|
46
61
|
component: ({ data }) => /* @__PURE__ */ React.createElement(RecordArticle, {
|
|
47
62
|
subject: data.subject
|
|
48
63
|
})
|
|
49
64
|
}),
|
|
65
|
+
Surface.create({
|
|
66
|
+
id: "typeCollection",
|
|
67
|
+
filter: AppSurface.subject(AppSurface.Article, Type.isType),
|
|
68
|
+
component: ({ data, role }) => {
|
|
69
|
+
const space = isSpace(data.properties?.space) ? data.properties.space : void 0;
|
|
70
|
+
if (!space) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ React.createElement(TypeCollectionArticle, {
|
|
74
|
+
role,
|
|
75
|
+
space,
|
|
76
|
+
typeUri: Type.getURI(data.subject),
|
|
77
|
+
attendableId: data.attendableId
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}),
|
|
50
81
|
Surface.create({
|
|
51
82
|
id: "pluginSettings",
|
|
52
|
-
filter: AppSurface.settings(AppSurface.Article, meta.
|
|
53
|
-
component: () => {
|
|
83
|
+
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
84
|
+
component: ({ data: { subject } }) => {
|
|
54
85
|
const spaces = useSpaces();
|
|
55
86
|
const { invokePromise } = useOperationInvoker();
|
|
87
|
+
const { settings, updateSettings } = useSettingsState(subject.atom);
|
|
56
88
|
return /* @__PURE__ */ React.createElement(SpaceSettings, {
|
|
57
89
|
spaces,
|
|
58
90
|
onOpenSpaceSettings: (space) => invokePromise(SpaceOperation.OpenSettings, {
|
|
59
91
|
space
|
|
60
|
-
})
|
|
92
|
+
}),
|
|
93
|
+
settings,
|
|
94
|
+
onSettingsChange: updateSettings
|
|
61
95
|
});
|
|
62
96
|
}
|
|
63
97
|
}),
|
|
64
98
|
Surface.create({
|
|
65
99
|
id: "companion.objectProperties",
|
|
66
100
|
filter: AppSurface.allOf(AppSurface.literal(AppSurface.Article, "settings"), AppSurface.companion(AppSurface.Article)),
|
|
67
|
-
component: ({ ref, data, role }) => /* @__PURE__ */ React.createElement(
|
|
101
|
+
component: ({ ref, data, role }) => /* @__PURE__ */ React.createElement(DefaultProperties, {
|
|
68
102
|
role,
|
|
69
103
|
subject: data.companionTo,
|
|
70
104
|
ref
|
|
@@ -80,7 +114,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
80
114
|
}),
|
|
81
115
|
Surface.create({
|
|
82
116
|
id: "spaceSettingsProperties",
|
|
83
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
117
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.general`),
|
|
84
118
|
component: ({ ref }) => {
|
|
85
119
|
const space = useActiveSpace();
|
|
86
120
|
if (!space) {
|
|
@@ -93,8 +127,8 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
93
127
|
}),
|
|
94
128
|
Surface.create({
|
|
95
129
|
id: "spaceSettingsMembers",
|
|
96
|
-
position:
|
|
97
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
130
|
+
position: Position.first,
|
|
131
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.members`),
|
|
98
132
|
component: () => {
|
|
99
133
|
const space = useActiveSpace();
|
|
100
134
|
if (!space) {
|
|
@@ -108,7 +142,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
108
142
|
}),
|
|
109
143
|
Surface.create({
|
|
110
144
|
id: "spaceSettingsSchema",
|
|
111
|
-
filter: AppSurface.literal(AppSurface.Article, `${meta.
|
|
145
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.schema`),
|
|
112
146
|
component: () => {
|
|
113
147
|
const space = useActiveSpace();
|
|
114
148
|
if (!space) {
|
|
@@ -121,16 +155,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
121
155
|
}),
|
|
122
156
|
Surface.create({
|
|
123
157
|
id: "selectedObjects",
|
|
124
|
-
|
|
125
|
-
filter: (data) => {
|
|
126
|
-
if (data.subject !== "selected-objects" || !Obj.isObject(data.companionTo)) {
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
const type = Obj.getType(data.companionTo);
|
|
130
|
-
const path = type ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => []) : [];
|
|
131
|
-
const viewTarget = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.companionTo, path) : void 0;
|
|
132
|
-
return !!viewTarget;
|
|
133
|
-
},
|
|
158
|
+
filter: AppSurface.allOf(AppSurface.literal(AppSurface.Article, "selected-objects"), AppSurface.companion(AppSurface.Article, Obj.isObject)),
|
|
134
159
|
// TODO(burdon): Replace with mosaic.
|
|
135
160
|
component: ({ data, ref }) => {
|
|
136
161
|
const type = Obj.getType(data.companionTo);
|
|
@@ -169,11 +194,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
169
194
|
}),
|
|
170
195
|
Surface.create({
|
|
171
196
|
id: "createInitialSpaceFormHue",
|
|
172
|
-
|
|
173
|
-
filter: (data) => {
|
|
174
|
-
const annotation = SchemaEx.findAnnotation(data.schema.ast, HueAnnotationId);
|
|
175
|
-
return !!annotation;
|
|
176
|
-
},
|
|
197
|
+
filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation(ast, HueAnnotationId)),
|
|
177
198
|
component: ({ data, ...inputProps }) => {
|
|
178
199
|
const ast = data.fieldPropertyAst;
|
|
179
200
|
if (!ast) {
|
|
@@ -198,11 +219,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
198
219
|
}),
|
|
199
220
|
Surface.create({
|
|
200
221
|
id: "createInitialSpaceFormIcon",
|
|
201
|
-
|
|
202
|
-
filter: (data) => {
|
|
203
|
-
const annotation = SchemaEx.findAnnotation(data.schema.ast, IconAnnotationId);
|
|
204
|
-
return !!annotation;
|
|
205
|
-
},
|
|
222
|
+
filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation(ast, IconAnnotationId)),
|
|
206
223
|
component: ({ data, ...inputProps }) => {
|
|
207
224
|
const ast = data.fieldPropertyAst;
|
|
208
225
|
if (!ast) {
|
|
@@ -227,16 +244,9 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
227
244
|
}),
|
|
228
245
|
Surface.create({
|
|
229
246
|
id: "typenameFormInput",
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
const annotation = SchemaEx.findAnnotation(data.schema.ast, TypeInputOptionsAnnotationId);
|
|
236
|
-
return !!annotation;
|
|
237
|
-
},
|
|
238
|
-
component: ({ data: { schema, target, fieldPropertyAst }, ...inputProps }) => {
|
|
239
|
-
const ast = fieldPropertyAst;
|
|
247
|
+
filter: AppSurface.formInput((data) => data.prop === "typename" && !!SchemaEx.findAnnotation(data.schema.ast, TypeInputOptionsAnnotationId)),
|
|
248
|
+
component: ({ data, ...inputProps }) => {
|
|
249
|
+
const ast = data.fieldPropertyAst;
|
|
240
250
|
if (!ast) {
|
|
241
251
|
return null;
|
|
242
252
|
}
|
|
@@ -244,8 +254,9 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
244
254
|
...inputProps,
|
|
245
255
|
type: ast
|
|
246
256
|
};
|
|
247
|
-
const
|
|
248
|
-
const
|
|
257
|
+
const target = data.target;
|
|
258
|
+
const db = Database.isDatabase(target) ? target : Obj.isObject(target) ? Obj.getDatabase(target) : void 0;
|
|
259
|
+
const annotation = SchemaEx.findAnnotation(data.schema.ast, TypeInputOptionsAnnotationId);
|
|
249
260
|
const options = useTypeOptions({
|
|
250
261
|
db,
|
|
251
262
|
annotation
|
|
@@ -258,8 +269,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
258
269
|
}),
|
|
259
270
|
Surface.create({
|
|
260
271
|
id: "objectProperties",
|
|
261
|
-
|
|
262
|
-
filter: (data) => {
|
|
272
|
+
filter: Surface.makeFilter(AppSurface.ObjectProperties, (data) => {
|
|
263
273
|
if (!Obj.isObject(data.subject)) {
|
|
264
274
|
return false;
|
|
265
275
|
}
|
|
@@ -267,7 +277,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
267
277
|
const path = type ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => []) : [];
|
|
268
278
|
const viewTarget = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.subject, path) : void 0;
|
|
269
279
|
return !!viewTarget;
|
|
270
|
-
},
|
|
280
|
+
}),
|
|
271
281
|
component: ({ data }) => {
|
|
272
282
|
const type = Obj.getType(data.subject);
|
|
273
283
|
const path = type ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => []) : [];
|
|
@@ -281,19 +291,10 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
281
291
|
}
|
|
282
292
|
}),
|
|
283
293
|
Surface.create({
|
|
284
|
-
id:
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
space: data.props
|
|
289
|
-
})
|
|
290
|
-
}),
|
|
291
|
-
Surface.create({
|
|
292
|
-
id: ENTITY_RENAME_POPOVER,
|
|
293
|
-
role: "popover",
|
|
294
|
-
filter: (data) => data.component === ENTITY_RENAME_POPOVER && Entity.isEntity(data.props),
|
|
295
|
-
component: ({ data }) => /* @__PURE__ */ React.createElement(EntityRenamePopover, {
|
|
296
|
-
entity: data.props
|
|
294
|
+
id: RENAME_POPOVER,
|
|
295
|
+
filter: AppSurface.component(AppSurface.Popover, RENAME_POPOVER),
|
|
296
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(RenamePopover, {
|
|
297
|
+
subject: data.props
|
|
297
298
|
})
|
|
298
299
|
}),
|
|
299
300
|
Surface.create({
|
|
@@ -305,8 +306,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
305
306
|
}),
|
|
306
307
|
Surface.create({
|
|
307
308
|
id: "navtreePresence",
|
|
308
|
-
|
|
309
|
-
filter: (data) => typeof data.id === "string" && Obj.isObject(data.subject),
|
|
309
|
+
filter: AppSurface.subject(AppSurface.NavtreeItemEnd, Obj.isObject),
|
|
310
310
|
component: ({ data }) => {
|
|
311
311
|
const ephemeral = useAtomCapability(SpaceCapabilities.EphemeralState);
|
|
312
312
|
return /* @__PURE__ */ React.createElement(SmallPresenceLive, {
|
|
@@ -319,9 +319,8 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
319
319
|
// TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
|
|
320
320
|
Surface.create({
|
|
321
321
|
id: "navtreePresenceFallback",
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
filter: (data) => typeof data.id === "string",
|
|
322
|
+
position: Position.last,
|
|
323
|
+
filter: Surface.makeFilter(AppSurface.NavtreeItemEnd),
|
|
325
324
|
component: ({ data }) => /* @__PURE__ */ React.createElement(SmallPresenceLive, {
|
|
326
325
|
id: data.id,
|
|
327
326
|
open: data.open
|
|
@@ -330,8 +329,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
330
329
|
// TODO(wittjosiah): Broken?
|
|
331
330
|
Surface.create({
|
|
332
331
|
id: "navtreeSyncStatus",
|
|
333
|
-
|
|
334
|
-
filter: (data) => isSpace(data.subject),
|
|
332
|
+
filter: AppSurface.subject(AppSurface.NavtreeItemEnd, isSpace),
|
|
335
333
|
component: ({ data }) => /* @__PURE__ */ React.createElement(InlineSyncStatus, {
|
|
336
334
|
space: data.subject,
|
|
337
335
|
open: data.open
|
|
@@ -339,12 +337,11 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
339
337
|
}),
|
|
340
338
|
Surface.create({
|
|
341
339
|
id: "navbarPresence",
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
filter: (data) => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
340
|
+
position: Position.first,
|
|
341
|
+
filter: AppSurface.subject(AppSurface.NavbarEnd, (value) => isSpace(value) || Obj.isObject(value)),
|
|
345
342
|
component: ({ data }) => {
|
|
346
343
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
347
|
-
const object = isSpace(data.subject) ? data.subject.state.get() === SpaceState.SPACE_READY ? space && Annotation.get(space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target : void 0 : data.subject;
|
|
344
|
+
const object = isSpace(data.subject) ? data.subject.state.get() === SpaceState.SPACE_READY ? space && Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target : void 0 : data.subject;
|
|
348
345
|
return object ? /* @__PURE__ */ React.createElement(SpacePresence, {
|
|
349
346
|
object
|
|
350
347
|
}) : null;
|
|
@@ -359,7 +356,7 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
359
356
|
}),
|
|
360
357
|
Surface.create({
|
|
361
358
|
id: "syncStatus",
|
|
362
|
-
|
|
359
|
+
filter: Surface.makeFilter(AppSurface.StatusIndicator),
|
|
363
360
|
component: () => /* @__PURE__ */ React.createElement(SyncStatus, null)
|
|
364
361
|
})
|
|
365
362
|
]);
|
|
@@ -367,4 +364,4 @@ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({
|
|
|
367
364
|
export {
|
|
368
365
|
react_surface_default as default
|
|
369
366
|
};
|
|
370
|
-
//# sourceMappingURL=react-surface-
|
|
367
|
+
//# sourceMappingURL=react-surface-LRA7GIFN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport React, { type ComponentProps, useCallback } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface, useAtomCapability, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';\nimport { AppAnnotation } from '@dxos/app-toolkit';\nimport { AppSurface, useActiveSpace, useTypeOptions } from '@dxos/app-toolkit/ui';\nimport { Annotation, Collection, Database, Obj, Type } from '@dxos/echo';\nimport { SchemaEx } from '@dxos/effect';\nimport { type Space, SpaceState, getSpace, isSpace, useSpaces } from '@dxos/react-client/echo';\nimport { Input } from '@dxos/react-ui';\nimport { type FormFieldRendererProps, SelectField } from '@dxos/react-ui-form';\nimport { HuePicker, IconPicker } from '@dxos/react-ui-pickers';\nimport { ViewAnnotation } from '@dxos/schema';\nimport { Position } from '@dxos/util';\n\nimport {\n CollectionArticle,\n CollectionSection,\n CreateObjectDialog,\n CreateSpaceDialog,\n DefaultProperties,\n ImportSpaceDialog,\n InlineSyncStatus,\n JoinDialog,\n MembersContainer,\n MenuFooter,\n ObjectCardStack,\n RecordArticle,\n RelatedArticle,\n RenamePopover,\n type RenameSubject,\n SchemaContainer,\n SmallPresenceLive,\n SpaceHomeArticle,\n SpaceHomeRecent,\n SpacePresence,\n SpaceSettings,\n SpaceSettingsContainer,\n SyncStatus,\n TypeCollectionArticle,\n ViewEditor,\n} from '#containers';\nimport { meta } from '#meta';\nimport { SpaceOperation } from '#operations';\nimport {\n HueAnnotationId,\n IconAnnotationId,\n Settings,\n SPACE_HOME_NODE_TYPE,\n SpaceCapabilities,\n SpaceHomeContent,\n type TypeInputOptions,\n TypeInputOptionsAnnotationId,\n} from '#types';\n\nimport {\n CREATE_OBJECT_DIALOG,\n CREATE_SPACE_DIALOG,\n IMPORT_SPACE_DIALOG,\n JOIN_DIALOG,\n RENAME_POPOVER,\n} from '../constants';\n\ntype ReactSurfaceOptions = {\n createInvitationUrl: (invitationCode: string) => string;\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ createInvitationUrl }: ReactSurfaceOptions) {\n return Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'spaceHome',\n filter: AppSurface.literal(AppSurface.Article, SPACE_HOME_NODE_TYPE),\n component: ({ data, role }) => (\n <SpaceHomeArticle role={role} attendableId={data.attendableId} space={data.properties?.space} />\n ),\n }),\n Surface.create({\n id: 'spaceHomeRecent',\n filter: Surface.makeFilter(SpaceHomeContent),\n component: ({ data }) => <SpaceHomeRecent space={data.space} />,\n }),\n Surface.create({\n id: 'collectionFallback',\n position: Position.last,\n filter: AppSurface.object(AppSurface.Article, Collection.Collection),\n component: ({ data }) => <CollectionArticle attendableId={data.attendableId} subject={data.subject} />,\n }),\n Surface.create({\n id: 'recordArticle',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.Article, Obj.isObject),\n component: ({ data }) => <RecordArticle subject={data.subject} />,\n }),\n Surface.create({\n id: 'typeCollection',\n filter: AppSurface.subject(AppSurface.Article, Type.isType),\n component: ({ data, role }) => {\n const space = isSpace(data.properties?.space) ? data.properties.space : undefined;\n if (!space) {\n return null;\n }\n\n return (\n <TypeCollectionArticle\n role={role}\n space={space}\n typeUri={Type.getURI(data.subject)}\n attendableId={data.attendableId}\n />\n );\n },\n }),\n Surface.create({\n id: 'pluginSettings',\n filter: AppSurface.settings(AppSurface.Article, meta.profile.key),\n component: ({ data: { subject } }) => {\n const spaces = useSpaces();\n const { invokePromise } = useOperationInvoker();\n const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);\n return (\n <SpaceSettings\n spaces={spaces}\n onOpenSpaceSettings={(space: Space) => invokePromise(SpaceOperation.OpenSettings, { space })}\n settings={settings}\n onSettingsChange={updateSettings}\n />\n );\n },\n }),\n Surface.create({\n id: 'companion.objectProperties',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'settings'),\n AppSurface.companion(AppSurface.Article),\n ),\n component: ({ ref, data, role }) => <DefaultProperties role={role} subject={data.companionTo} ref={ref} />,\n }),\n Surface.create({\n id: 'companion.related',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'related'),\n AppSurface.companion(AppSurface.Article),\n ),\n component: ({ data, role }) => <RelatedArticle role={role} companionTo={data.companionTo} />,\n }),\n Surface.create({\n id: 'spaceSettingsProperties',\n filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.general`),\n component: ({ ref }) => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <SpaceSettingsContainer space={space} />;\n },\n }),\n Surface.create({\n id: 'spaceSettingsMembers',\n position: Position.first,\n filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.members`),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <MembersContainer space={space} createInvitationUrl={createInvitationUrl} />;\n },\n }),\n Surface.create({\n id: 'spaceSettingsSchema',\n filter: AppSurface.literal(AppSurface.Article, `${meta.profile.key}.schema`),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <SchemaContainer space={space} />;\n },\n }),\n Surface.create({\n id: 'selectedObjects',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'selected-objects'),\n AppSurface.companion(AppSurface.Article, Obj.isObject),\n ),\n // TODO(burdon): Replace with mosaic.\n component: ({ data, ref }) => {\n const type = Obj.getType(data.companionTo);\n const path = type\n ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])\n : [];\n const view = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.companionTo, path) : undefined;\n if (!view) {\n return null;\n }\n\n return (\n <ObjectCardStack\n key={Obj.getURI(data.companionTo)}\n objectId={Obj.getURI(data.companionTo)}\n view={view}\n ref={ref}\n />\n );\n },\n }),\n Surface.create({\n id: JOIN_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof JoinDialog>>(AppSurface.Dialog, JOIN_DIALOG),\n component: ({ data }) => <JoinDialog {...data.props} />,\n }),\n Surface.create({\n id: CREATE_SPACE_DIALOG,\n filter: AppSurface.component(AppSurface.Dialog, CREATE_SPACE_DIALOG),\n component: () => <CreateSpaceDialog />,\n }),\n Surface.create({\n id: IMPORT_SPACE_DIALOG,\n filter: AppSurface.component(AppSurface.Dialog, IMPORT_SPACE_DIALOG),\n component: () => <ImportSpaceDialog />,\n }),\n Surface.create({\n id: CREATE_OBJECT_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof CreateObjectDialog>>(\n AppSurface.Dialog,\n CREATE_OBJECT_DIALOG,\n ),\n component: ({ data }) => <CreateObjectDialog {...data.props} />,\n }),\n Surface.create({\n id: 'createInitialSpaceFormHue',\n filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation<boolean>(ast, HueAnnotationId)),\n component: ({ data, ...inputProps }) => {\n const ast = data.fieldPropertyAst;\n if (!ast) {\n return null;\n }\n\n const { label, readonly, getValue, onValueChange } = inputProps as any as FormFieldRendererProps;\n const handleChange = useCallback((nextHue: string) => onValueChange(ast, nextHue), [ast, onValueChange]);\n const handleReset = useCallback(() => onValueChange(ast, undefined), [ast, onValueChange]);\n return (\n <Input.Root>\n <Input.Label>{label}</Input.Label>\n <HuePicker disabled={!!readonly} value={getValue() ?? ''} onChange={handleChange} onReset={handleReset} />\n </Input.Root>\n );\n },\n }),\n Surface.create({\n id: 'createInitialSpaceFormIcon',\n filter: AppSurface.formInputBySchema((ast) => !!SchemaEx.findAnnotation<boolean>(ast, IconAnnotationId)),\n component: ({ data, ...inputProps }) => {\n const ast = data.fieldPropertyAst;\n if (!ast) {\n return null;\n }\n\n const { label, readonly, getValue, onValueChange } = inputProps as any as FormFieldRendererProps;\n const handleChange = useCallback((nextIcon: string) => onValueChange(ast, nextIcon), [ast, onValueChange]);\n const handleReset = useCallback(() => onValueChange(ast, undefined), [ast, onValueChange]);\n return (\n <Input.Root>\n <Input.Label>{label}</Input.Label>\n <IconPicker\n disabled={!!readonly}\n value={getValue() ?? ''}\n onChange={handleChange}\n onReset={handleReset}\n />\n </Input.Root>\n );\n },\n }),\n Surface.create({\n id: 'typenameFormInput',\n filter: AppSurface.formInput(\n (data) =>\n data.prop === 'typename' && !!SchemaEx.findAnnotation(data.schema.ast, TypeInputOptionsAnnotationId),\n ),\n component: ({ data, ...inputProps }) => {\n const ast = data.fieldPropertyAst;\n if (!ast) {\n return null;\n }\n\n const props = { ...inputProps, type: ast } as any as FormFieldRendererProps;\n const target = data.target;\n const db = Database.isDatabase(target) ? target : Obj.isObject(target) ? Obj.getDatabase(target) : undefined;\n const annotation = SchemaEx.findAnnotation<TypeInputOptions>(data.schema.ast, TypeInputOptionsAnnotationId)!;\n const options = useTypeOptions({ db, annotation });\n\n return <SelectField {...props} options={options} />;\n },\n }),\n Surface.create({\n id: 'objectProperties',\n filter: Surface.makeFilter(AppSurface.ObjectProperties, (data) => {\n if (!Obj.isObject(data.subject)) {\n return false;\n }\n const type = Obj.getType(data.subject);\n const path = type\n ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])\n : [];\n const viewTarget = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.subject, path) : undefined;\n return !!viewTarget;\n }),\n component: ({ data }) => {\n const type = Obj.getType(data.subject);\n const path = type\n ? Option.getOrElse(ViewAnnotation.get(Type.getSchema(type)), () => [] as readonly string[])\n : [];\n const view = path.length > 0 ? ViewAnnotation.tryGetTargetAlongPath(data.subject, path) : undefined;\n if (!view) {\n return null;\n }\n\n return <ViewEditor view={view} />;\n },\n }),\n Surface.create({\n id: RENAME_POPOVER,\n filter: AppSurface.component<RenameSubject>(AppSurface.Popover, RENAME_POPOVER),\n component: ({ data }) => <RenamePopover subject={data.props} />,\n }),\n Surface.create({\n id: 'menuFooter',\n filter: AppSurface.subject(AppSurface.MenuFooter, Obj.isObject),\n component: ({ data }) => <MenuFooter object={data.subject} />,\n }),\n Surface.create({\n id: 'navtreePresence',\n filter: AppSurface.subject(AppSurface.NavtreeItemEnd, Obj.isObject),\n component: ({ data }) => {\n const ephemeral = useAtomCapability(SpaceCapabilities.EphemeralState);\n return <SmallPresenceLive id={data.id} open={data.open} viewers={ephemeral.viewersByObject[data.id]} />;\n },\n }),\n // TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.\n Surface.create({\n id: 'navtreePresenceFallback',\n position: Position.last,\n filter: Surface.makeFilter(AppSurface.NavtreeItemEnd),\n component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,\n }),\n // TODO(wittjosiah): Broken?\n Surface.create({\n id: 'navtreeSyncStatus',\n filter: AppSurface.subject(AppSurface.NavtreeItemEnd, isSpace),\n component: ({ data }) => <InlineSyncStatus space={data.subject} open={data.open} />,\n }),\n Surface.create({\n id: 'navbarPresence',\n position: Position.first,\n filter: AppSurface.subject(\n AppSurface.NavbarEnd,\n (value): value is Space | Obj.Unknown => isSpace(value) || Obj.isObject(value),\n ),\n component: ({ data }) => {\n const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);\n const object = isSpace(data.subject)\n ? data.subject.state.get() === SpaceState.SPACE_READY\n ? space &&\n Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)\n ?.target\n : undefined\n : data.subject;\n\n return object ? <SpacePresence object={object} /> : null;\n },\n }),\n Surface.create({\n id: 'collectionSection',\n filter: AppSurface.object(AppSurface.Section, Collection.Collection),\n component: ({ data }) => <CollectionSection subject={data.subject} />,\n }),\n Surface.create({\n id: 'syncStatus',\n filter: Surface.makeFilter(AppSurface.StatusIndicator),\n component: () => <SyncStatus />,\n }),\n ]);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AACxB,OAAOC,SAA8BC,mBAAmB;AAExD,SAASC,cAAcC,kBAAkB;AACzC,SAASC,SAASC,mBAAmBC,qBAAqBC,wBAAwB;AAClF,SAASC,qBAAqB;AAC9B,SAASC,YAAYC,gBAAgBC,sBAAsB;AAC3D,SAASC,YAAYC,YAAYC,UAAUC,KAAKC,YAAY;AAC5D,SAASC,gBAAgB;AACzB,SAAqBC,YAAYC,UAAUC,SAASC,iBAAiB;AACrE,SAASC,aAAa;AACtB,SAAsCC,mBAAmB;AACzD,SAASC,WAAWC,kBAAkB;AACtC,SAASC,sBAAsB;AAC/B,SAASC,gBAAgB;AAEzB,SACEC,mBACAC,mBACAC,oBACAC,mBACAC,mBACAC,mBACAC,kBACAC,YACAC,kBACAC,YACAC,iBACAC,eACAC,gBACAC,eAEAC,iBACAC,mBACAC,kBACAC,iBACAC,eACAC,eACAC,wBACAC,YACAC,uBACAC,kBACK;AACP,SAASC,YAAY;AACrB,SAASC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+H;;IAC7E,CAAA;IACAxI,QAAQC,OAAO;MACbC,IAAI;MACJgB,UAAUC,SAASwC;MACnBxD,QAAQC,WAAWoB,QACjBpB,WAAWwI,WACX,CAACpC,UAAwC1E,QAAQ0E,KAAAA,KAAU/E,IAAIC,SAAS8E,KAAAA,CAAAA;MAE1EhG,WAAW,CAAC,EAAEC,KAAI,MAAE;AAClB,cAAMI,QAAQiB,QAAQrB,KAAKe,OAAO,IAAIf,KAAKe,UAAUqH,SAASpI,KAAKe,OAAO;AAC1E,cAAMH,SAASS,QAAQrB,KAAKe,OAAO,IAC/Bf,KAAKe,QAAQsH,MAAM3E,IAAG,MAAO4E,WAAWC,cACtCnI,SACAoI,WAAW9E,IAAItD,MAAMC,YAAYoI,cAAcC,wBAAwB,EAAEC,KAAYC,qBAAc,GAC/FnC,SACJnF,SACFtB,KAAKe;AAET,eAAOH,SAAS,sBAAA,cAACiI,eAAAA;UAAcjI;aAAqB;MACtD;IACF,CAAA;IACArB,QAAQC,OAAO;MACbC,IAAI;MACJC,QAAQC,WAAWiB,OAAOjB,WAAWmJ,SAASjI,WAAWA,UAAU;MACnEd,WAAW,CAAC,EAAEC,KAAI,MAAO,sBAAA,cAAC+I,mBAAAA;QAAkBhI,SAASf,KAAKe;;IAC5D,CAAA;IACAxB,QAAQC,OAAO;MACbC,IAAI;MACJC,QAAQH,QAAQe,WAAWX,WAAWqJ,eAAe;MACrDjJ,WAAW,MAAM,sBAAA,cAACkJ,YAAAA,IAAAA;IACpB,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Option", "React", "useCallback", "Capabilities", "Capability", "Surface", "useAtomCapability", "useOperationInvoker", "useSettingsState", "AppAnnotation", "AppSurface", "useActiveSpace", "useTypeOptions", "Annotation", "Collection", "Database", "Obj", "Type", "SchemaEx", "SpaceState", "getSpace", "isSpace", "useSpaces", "Input", "SelectField", "HuePicker", "IconPicker", "ViewAnnotation", "Position", "CollectionArticle", "CollectionSection", "CreateObjectDialog", "CreateSpaceDialog", "DefaultProperties", "ImportSpaceDialog", "InlineSyncStatus", "JoinDialog", "MembersContainer", "MenuFooter", "ObjectCardStack", "RecordArticle", "RelatedArticle", "RenamePopover", "SchemaContainer", "SmallPresenceLive", "SpaceHomeArticle", "SpaceHomeRecent", "SpacePresence", "SpaceSettings", "SpaceSettingsContainer", "SyncStatus", "TypeCollectionArticle", "ViewEditor", "meta", "SpaceOperation", "HueAnnotationId", "IconAnnotationId", "SPACE_HOME_NODE_TYPE", "SpaceCapabilities", "SpaceHomeContent", "TypeInputOptionsAnnotationId", "Capability", "makeModule", "fnUntraced", "createInvitationUrl", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "filter", "AppSurface", "literal", "Article", "SPACE_HOME_NODE_TYPE", "component", "data", "role", "SpaceHomeArticle", "attendableId", "space", "properties", "makeFilter", "SpaceHomeContent", "SpaceHomeRecent", "position", "Position", "last", "object", "Collection", "CollectionArticle", "subject", "Obj", "isObject", "RecordArticle", "Type", "isType", "isSpace", "undefined", "TypeCollectionArticle", "typeUri", "getURI", "settings", "meta", "profile", "key", "spaces", "useSpaces", "invokePromise", "useOperationInvoker", "updateSettings", "useSettingsState", "atom", "SpaceSettings", "onOpenSpaceSettings", "SpaceOperation", "OpenSettings", "onSettingsChange", "allOf", "companion", "ref", "DefaultProperties", "companionTo", "RelatedArticle", "useActiveSpace", "SpaceSettingsContainer", "first", "MembersContainer", "SchemaContainer", "type", "getType", "path", "getOrElse", "ViewAnnotation", "get", "getSchema", "view", "length", "tryGetTargetAlongPath", "ObjectCardStack", "objectId", "JOIN_DIALOG", "Dialog", "JoinDialog", "props", "CREATE_SPACE_DIALOG", "CreateSpaceDialog", "IMPORT_SPACE_DIALOG", "ImportSpaceDialog", "CREATE_OBJECT_DIALOG", "CreateObjectDialog", "formInputBySchema", "ast", "SchemaEx", "findAnnotation", "HueAnnotationId", "inputProps", "fieldPropertyAst", "label", "readonly", "getValue", "onValueChange", "handleChange", "useCallback", "nextHue", "handleReset", "Input", "Root", "Label", "HuePicker", "disabled", "value", "onChange", "onReset", "IconAnnotationId", "nextIcon", "IconPicker", "formInput", "prop", "schema", "TypeInputOptionsAnnotationId", "target", "db", "Database", "isDatabase", "getDatabase", "annotation", "options", "useTypeOptions", "SelectField", "ObjectProperties", "viewTarget", "ViewEditor", "RENAME_POPOVER", "Popover", "RenamePopover", "MenuFooter", "NavtreeItemEnd", "ephemeral", "useAtomCapability", "SpaceCapabilities", "EphemeralState", "SmallPresenceLive", "open", "viewers", "viewersByObject", "InlineSyncStatus", "NavbarEnd", "getSpace", "state", "SpaceState", "SPACE_READY", "Annotation", "AppAnnotation", "RootCollectionAnnotation", "pipe", "getOrUndefined", "SpacePresence", "Section", "CollectionSection", "StatusIndicator", "SyncStatus"]
|
|
7
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SpaceOperation
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMUG6PEJ.mjs";
|
|
4
|
+
import "./chunk-F5KLUP2P.mjs";
|
|
5
5
|
import "./chunk-J5LGTIGS.mjs";
|
|
6
6
|
|
|
7
7
|
// src/operations/remove-objects.ts
|
|
8
8
|
import * as Effect from "effect/Effect";
|
|
9
9
|
import * as Option from "effect/Option";
|
|
10
10
|
import { Capabilities } from "@dxos/app-framework";
|
|
11
|
-
import { AppCapabilities, LayoutOperation
|
|
11
|
+
import { AppAnnotation, AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
|
|
12
12
|
import { getSpace } from "@dxos/client/echo";
|
|
13
13
|
import { Operation } from "@dxos/compute";
|
|
14
14
|
import { Annotation, Collection, Entity, Obj } from "@dxos/echo";
|
|
@@ -20,7 +20,7 @@ var handler = SpaceOperation.RemoveObjects.pipe(Operation.withHandler(Effect.fnU
|
|
|
20
20
|
const entities = input.objects;
|
|
21
21
|
const space = getSpace(entities[0]);
|
|
22
22
|
invariant(space && entities.every((entity) => Entity.isEntity(entity) && getSpace(entity) === space), void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 16, S: this, A: ["space && entities.every((entity)=>Entity.isEntity(entity) && getSpace(entity) === space)", ""] });
|
|
23
|
-
const parentCollection = input.target ?? Annotation.get(space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target;
|
|
23
|
+
const parentCollection = input.target ?? Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target;
|
|
24
24
|
invariant(parentCollection, "No parent collection found for space \u2014 cannot remove objects.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 18, S: this, A: ["parentCollection", "'No parent collection found for space \u2014 cannot remove objects.'"] });
|
|
25
25
|
const indices = entities.map((entity) => Obj.instanceOf(Collection.Collection, parentCollection) ? parentCollection.objects.findIndex((ref) => ref.target === entity) : -1);
|
|
26
26
|
const wasActive = entities.map((entity) => layout.active.find((graphId) => graphId.endsWith(entity.id))).filter(isNonNullable);
|
|
@@ -52,4 +52,4 @@ var remove_objects_default = handler;
|
|
|
52
52
|
export {
|
|
53
53
|
remove_objects_default as default
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=remove-objects-
|
|
55
|
+
//# sourceMappingURL=remove-objects-WEO66EDS.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/remove-objects.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { AppAnnotation, AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { getSpace } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Annotation, Collection, Entity, Obj } from '@dxos/echo';\nimport { invariant } from '@dxos/invariant';\nimport { isNonNullable } from '@dxos/util';\n\nimport { SpaceOperation } from './definitions';\n\nconst handler: Operation.WithHandler<typeof SpaceOperation.RemoveObjects> = SpaceOperation.RemoveObjects.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);\n const entities = input.objects;\n\n const space = getSpace(entities[0] as Obj.Unknown);\n invariant(\n space && entities.every((entity) => Entity.isEntity(entity) && getSpace(entity as Obj.Unknown) === space),\n );\n\n const parentCollection =\n input.target ??\n Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target;\n invariant(parentCollection, 'No parent collection found for space — cannot remove objects.');\n\n // Type entities (persisted schemas) live outside collections — `findIndex` will\n // return -1 for them and the splice/active-tracking branches are skipped.\n const indices = entities.map((entity) =>\n Obj.instanceOf(Collection.Collection, parentCollection)\n ? parentCollection.objects.findIndex((ref) => ref.target === entity)\n : -1,\n );\n\n const wasActive = entities\n .map((entity) => layout.active.find((graphId) => graphId.endsWith(entity.id)))\n .filter(isNonNullable);\n\n for (const entity of entities) {\n if (Obj.instanceOf(Collection.Collection, parentCollection)) {\n const index = parentCollection.objects.findIndex((ref) => ref.target === entity);\n if (index !== -1) {\n Obj.update(parentCollection, (parentCollection) => {\n parentCollection.objects.splice(index, 1);\n });\n }\n }\n\n const db = Entity.getDatabase(entity);\n db?.remove(entity);\n }\n\n if (wasActive.length > 0) {\n yield* Operation.invoke(LayoutOperation.Close, { subject: wasActive });\n }\n\n return {\n objects: entities,\n parentCollection,\n indices,\n wasActive,\n };\n }),\n ),\n);\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAEA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,eAAeC,iBAAiBC,uBAAuB;AAChE,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,YAAYC,QAAQC,WAAW;AACpD,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAI9B,IAAA,eAA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GAAAA;AAAU,WAAA,UAAA,OAAA,gBAAA,OAAA;MACtE,SAAA;IAEA,CAAA;;SAEER;IACAW,SAAAA;IACAH;IACF;IACF;EAGJ;;;",
|
|
6
|
+
"names": ["Effect", "Option", "Capabilities", "AppAnnotation", "AppCapabilities", "LayoutOperation", "getSpace", "Operation", "Annotation", "Collection", "Entity", "Obj", "invariant", "isNonNullable", "SpaceOperation", "entities", "objects", "space", "getSpace", "invariant", "parentCollection", "target", "entity", "instanceOf", "Collection", "index", "Obj", "db", "wasActive", "length", "subject", "indices"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SPACE_RENAME_POPOVER
|
|
3
|
-
} from "./chunk-F5MESIRH.mjs";
|
|
4
1
|
import {
|
|
5
2
|
SpaceOperation
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMUG6PEJ.mjs";
|
|
4
|
+
import "./chunk-F5KLUP2P.mjs";
|
|
5
|
+
import {
|
|
6
|
+
RENAME_POPOVER
|
|
7
|
+
} from "./chunk-C2ULK22J.mjs";
|
|
8
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
9
9
|
|
|
10
10
|
// src/operations/rename.ts
|
|
@@ -13,13 +13,14 @@ import { LayoutOperation } from "@dxos/app-toolkit";
|
|
|
13
13
|
import { Operation } from "@dxos/compute";
|
|
14
14
|
var handler = SpaceOperation.Rename.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
15
15
|
yield* Operation.invoke(LayoutOperation.UpdatePopover, {
|
|
16
|
-
subject:
|
|
16
|
+
subject: RENAME_POPOVER,
|
|
17
17
|
anchorId: input.caller ?? "",
|
|
18
|
-
props: input.space
|
|
18
|
+
props: input.space,
|
|
19
|
+
kind: "rename"
|
|
19
20
|
});
|
|
20
21
|
})));
|
|
21
22
|
var rename_default = handler;
|
|
22
23
|
export {
|
|
23
24
|
rename_default as default
|
|
24
25
|
};
|
|
25
|
-
//# sourceMappingURL=rename-
|
|
26
|
+
//# sourceMappingURL=rename-Q6UNCBIM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/rename.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { RENAME_POPOVER } from '../constants';\nimport { SpaceOperation } from './definitions';\n\nconst handler: Operation.WithHandler<typeof SpaceOperation.Rename> = SpaceOperation.Rename.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n yield* Operation.invoke(LayoutOperation.UpdatePopover, {\n subject: RENAME_POPOVER,\n anchorId: input.caller ?? '',\n props: input.space,\n kind: 'rename',\n });\n }),\n ),\n);\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAK1B,IAAMC,UAA+DC,eAAeC,OAAOC,KACzFC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,SAAOH,UAAUI,OAAOC,gBAAgBC,eAAe;IACrDC,SAASC;IACTC,UAAUN,MAAMO,UAAU;IAC1BC,OAAOR,MAAMS;IACbC,MAAM;EACR,CAAA;AACF,CAAA,CAAA,CAAA;AAGJ,IAAA,iBAAejB;",
|
|
6
|
+
"names": ["Effect", "LayoutOperation", "Operation", "handler", "SpaceOperation", "Rename", "pipe", "Operation", "withHandler", "fnUntraced", "input", "invoke", "LayoutOperation", "UpdatePopover", "subject", "RENAME_POPOVER", "anchorId", "caller", "props", "space", "kind"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ENTITY_RENAME_POPOVER
|
|
3
|
-
} from "./chunk-F5MESIRH.mjs";
|
|
4
1
|
import {
|
|
5
2
|
SpaceOperation
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMUG6PEJ.mjs";
|
|
4
|
+
import "./chunk-F5KLUP2P.mjs";
|
|
5
|
+
import {
|
|
6
|
+
RENAME_POPOVER
|
|
7
|
+
} from "./chunk-C2ULK22J.mjs";
|
|
8
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
9
9
|
|
|
10
10
|
// src/operations/rename-object.ts
|
|
@@ -13,13 +13,14 @@ import { LayoutOperation } from "@dxos/app-toolkit";
|
|
|
13
13
|
import { Operation } from "@dxos/compute";
|
|
14
14
|
var handler = SpaceOperation.RenameObject.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
15
15
|
yield* Operation.invoke(LayoutOperation.UpdatePopover, {
|
|
16
|
-
subject:
|
|
16
|
+
subject: RENAME_POPOVER,
|
|
17
17
|
anchorId: input.caller ?? "",
|
|
18
|
-
props: input.object
|
|
18
|
+
props: input.object,
|
|
19
|
+
kind: "rename"
|
|
19
20
|
});
|
|
20
21
|
})));
|
|
21
22
|
var rename_object_default = handler;
|
|
22
23
|
export {
|
|
23
24
|
rename_object_default as default
|
|
24
25
|
};
|
|
25
|
-
//# sourceMappingURL=rename-object-
|
|
26
|
+
//# sourceMappingURL=rename-object-2UCEGU7U.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/rename-object.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { RENAME_POPOVER } from '../constants';\nimport { SpaceOperation } from './definitions';\n\nconst handler: Operation.WithHandler<typeof SpaceOperation.RenameObject> = SpaceOperation.RenameObject.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n yield* Operation.invoke(LayoutOperation.UpdatePopover, {\n subject: RENAME_POPOVER,\n anchorId: input.caller ?? '',\n props: input.object,\n kind: 'rename',\n });\n }),\n ),\n);\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAK1B,IAAMC,UAAqEC,eAAeC,aAAaC,KACrGC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,SAAOH,UAAUI,OAAOC,gBAAgBC,eAAe;IACrDC,SAASC;IACTC,UAAUN,MAAMO,UAAU;IAC1BC,OAAOR,MAAMS;IACbC,MAAM;EACR,CAAA;AACF,CAAA,CAAA,CAAA;AAGJ,IAAA,wBAAejB;",
|
|
6
|
+
"names": ["Effect", "LayoutOperation", "Operation", "handler", "SpaceOperation", "RenameObject", "pipe", "Operation", "withHandler", "fnUntraced", "input", "invoke", "LayoutOperation", "UpdatePopover", "subject", "RENAME_POPOVER", "anchorId", "caller", "props", "object", "kind"]
|
|
7
|
+
}
|
|
@@ -4,14 +4,14 @@ import "./chunk-J5LGTIGS.mjs";
|
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Option from "effect/Option";
|
|
6
6
|
import { Capability } from "@dxos/app-framework";
|
|
7
|
-
import {
|
|
7
|
+
import { AppAnnotation } from "@dxos/app-toolkit";
|
|
8
8
|
import { Annotation, Obj, Ref } from "@dxos/echo";
|
|
9
9
|
import { SpaceCapabilities } from "#types";
|
|
10
10
|
var repair_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(SpaceCapabilities.Repair, async ({ space }) => {
|
|
11
11
|
await removeQueryCollections(space);
|
|
12
12
|
})));
|
|
13
13
|
var removeQueryCollections = async (space) => {
|
|
14
|
-
const rootCollectionRef = Annotation.get(space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined);
|
|
14
|
+
const rootCollectionRef = Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined);
|
|
15
15
|
const rootCollection = await rootCollectionRef?.load();
|
|
16
16
|
if (!rootCollection) {
|
|
17
17
|
return;
|
|
@@ -29,4 +29,4 @@ var removeQueryCollections = async (space) => {
|
|
|
29
29
|
export {
|
|
30
30
|
repair_default as default
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=repair-
|
|
32
|
+
//# sourceMappingURL=repair-HMH476U3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/repair.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppAnnotation } from '@dxos/app-toolkit';\nimport { Annotation, Collection, Obj, Ref } from '@dxos/echo';\nimport { type Space } from '@dxos/react-client/echo';\n\nimport { SpaceCapabilities } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(SpaceCapabilities.Repair, async ({ space }: { space: Space }) => {\n await removeQueryCollections(space);\n }),\n ),\n);\n\n/**\n * Remove all existing query collections from the root collection.\n */\nconst removeQueryCollections = async (space: Space) => {\n const rootCollectionRef = Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(\n Option.getOrUndefined,\n );\n const rootCollection: Collection.Collection | undefined = await rootCollectionRef?.load();\n if (!rootCollection) {\n return;\n }\n\n const objects = await Promise.all(rootCollection.objects.map((ref) => ref.load()));\n const queryCollections = objects.filter((object) => Obj.getTypename(object) === 'org.dxos.type.queryCollection');\n if (queryCollections.length === 0) {\n return;\n }\n\n Obj.update(rootCollection, (rootCollection) => {\n rootCollection.objects = objects\n .filter((object) => Obj.getTypename(object) !== 'org.dxos.type.queryCollection')\n .map((object) => Ref.make(object));\n });\n queryCollections.forEach((object) => space.db.remove(object));\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,qBAAqB;AAC9B,SAASC,YAAwBC,KAAKC,WAAW;AAGjD,SAASC,yBAAyB;AAElC,IAAA,iBAAeL,WAAWM,WAAW,MAC5BC,eACLP,WAAWQ,YAAYH,kBAAkBI,QAAQ,OAAO,EAAEC,MAAK,MAAoB;AACjF,QAAMC,uBAAuBD,KAAAA;AAC/B,CAAA,CAAA,CAAA;AAOJ,IAAMC,yBAAyB,OAAOD,UAAAA;AACpC,QAAME,oBAAoBV,WAAWW,IAAIH,MAAMI,YAAYb,cAAcc,wBAAwB,EAAEC,KAC1FC,qBAAc;AAEvB,QAAMC,iBAAoD,MAAMN,mBAAmBO,KAAAA;AACnF,MAAI,CAACD,gBAAgB;AACnB;EACF;AAEA,QAAME,UAAU,MAAMC,QAAQC,IAAIJ,eAAeE,QAAQG,IAAI,CAACC,QAAQA,IAAIL,KAAI,CAAA,CAAA;AAC9E,QAAMM,mBAAmBL,QAAQM,OAAO,CAACC,WAAWxB,IAAIyB,YAAYD,MAAAA,MAAY,+BAAA;AAChF,MAAIF,iBAAiBI,WAAW,GAAG;AACjC;EACF;AAEA1B,MAAI2B,OAAOZ,gBAAgB,CAACA,oBAAAA;AAC1BA,IAAAA,gBAAeE,UAAUA,QACtBM,OAAO,CAACC,WAAWxB,IAAIyB,YAAYD,MAAAA,MAAY,+BAAA,EAC/CJ,IAAI,CAACI,WAAWvB,IAAI2B,KAAKJ,MAAAA,CAAAA;EAC9B,CAAA;AACAF,mBAAiBO,QAAQ,CAACL,WAAWjB,MAAMuB,GAAGC,OAAOP,MAAAA,CAAAA;AACvD;",
|
|
6
|
+
"names": ["Effect", "Option", "Capability", "AppAnnotation", "Annotation", "Obj", "Ref", "SpaceCapabilities", "makeModule", "succeed", "contributes", "Repair", "space", "removeQueryCollections", "rootCollectionRef", "get", "properties", "RootCollectionAnnotation", "pipe", "getOrUndefined", "rootCollection", "load", "objects", "Promise", "all", "map", "ref", "queryCollections", "filter", "object", "getTypename", "length", "update", "make", "forEach", "db", "remove"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SpaceOperation
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMUG6PEJ.mjs";
|
|
4
|
+
import "./chunk-F5KLUP2P.mjs";
|
|
5
5
|
import "./chunk-J5LGTIGS.mjs";
|
|
6
6
|
|
|
7
7
|
// src/operations/restore-field.ts
|
|
@@ -37,4 +37,4 @@ var restore_field_default = handler;
|
|
|
37
37
|
export {
|
|
38
38
|
restore_field_default as default
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=restore-field-
|
|
40
|
+
//# sourceMappingURL=restore-field-6CQAFOXY.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SpaceOperation
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMUG6PEJ.mjs";
|
|
4
|
+
import "./chunk-F5KLUP2P.mjs";
|
|
5
5
|
import "./chunk-J5LGTIGS.mjs";
|
|
6
6
|
|
|
7
7
|
// src/operations/restore-objects.ts
|
|
@@ -36,4 +36,4 @@ var restore_objects_default = handler;
|
|
|
36
36
|
export {
|
|
37
37
|
restore_objects_default as default
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=restore-objects-
|
|
39
|
+
//# sourceMappingURL=restore-objects-3VINLP7C.mjs.map
|
|
@@ -9,14 +9,14 @@ import { meta } from "#meta";
|
|
|
9
9
|
import { Settings, SpaceCapabilities } from "#types";
|
|
10
10
|
var settings_default = Capability.makeModule(() => Effect.sync(() => {
|
|
11
11
|
const settingsAtom = createKvsStore({
|
|
12
|
-
key: meta.
|
|
12
|
+
key: meta.profile.key,
|
|
13
13
|
schema: Settings.Settings,
|
|
14
14
|
defaultValue: () => ({})
|
|
15
15
|
});
|
|
16
16
|
return [
|
|
17
17
|
Capability.contributes(SpaceCapabilities.Settings, settingsAtom),
|
|
18
18
|
Capability.contributes(AppCapabilities.Settings, {
|
|
19
|
-
prefix: meta.
|
|
19
|
+
prefix: meta.profile.key,
|
|
20
20
|
schema: Settings.Settings,
|
|
21
21
|
atom: settingsAtom
|
|
22
22
|
})
|
|
@@ -25,4 +25,4 @@ var settings_default = Capability.makeModule(() => Effect.sync(() => {
|
|
|
25
25
|
export {
|
|
26
26
|
settings_default as default
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=settings-
|
|
28
|
+
//# sourceMappingURL=settings-5IBSYBVU.mjs.map
|