@dxos/app-framework 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb
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/{capability-7PCNSWBT.mjs → capability-7LE5X2NH.mjs} +14 -10
- package/dist/lib/browser/capability-7LE5X2NH.mjs.map +7 -0
- package/dist/lib/browser/capability-DU35RXMD.mjs +34 -0
- package/dist/lib/browser/capability-DU35RXMD.mjs.map +7 -0
- package/dist/lib/browser/chunk-4DQMLMGU.mjs +44 -0
- package/dist/lib/browser/chunk-4DQMLMGU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XYNO72GQ.mjs → chunk-C46IKYBD.mjs} +626 -591
- package/dist/lib/browser/chunk-C46IKYBD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7IQHKD4U.mjs → chunk-EIFGKQSA.mjs} +2 -2
- package/dist/lib/browser/chunk-EIFGKQSA.mjs.map +7 -0
- package/dist/lib/browser/chunk-IGRQWMWW.mjs +80 -0
- package/dist/lib/browser/chunk-IGRQWMWW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TCLLRCS3.mjs → chunk-KWP6PKIU.mjs} +2 -2
- package/dist/lib/browser/chunk-NPUEVX42.mjs +34 -0
- package/dist/lib/browser/chunk-NPUEVX42.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FMZN33N4.mjs → chunk-WGWEEBUV.mjs} +3 -3
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +1 -0
- package/dist/lib/browser/{chunk-6Y7PZV72.mjs → chunk-ZQO3UZ4R.mjs} +1 -1
- package/dist/lib/browser/{chunk-6Y7PZV72.mjs.map → chunk-ZQO3UZ4R.mjs.map} +1 -1
- package/dist/lib/browser/cli/index.mjs +89 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/common/activation-events.mjs +23 -0
- package/dist/lib/browser/common/capabilities.mjs +45 -0
- package/dist/lib/browser/core/capability.mjs +1 -1
- package/dist/lib/browser/core/plugin-manager.mjs +3 -3
- package/dist/lib/browser/core/plugin.mjs +2 -2
- package/dist/lib/browser/index.mjs +34 -129
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{invoker-capability-SZRSTHEH.mjs → invoker-capability-7QW56NOM.mjs} +15 -11
- package/dist/lib/browser/invoker-capability-7QW56NOM.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +16 -12
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/{react → ui}/index.mjs +20 -17
- package/dist/lib/node-esm/{capability-CFLQ2QQU.mjs → capability-OSVYGK4X.mjs} +14 -10
- package/dist/lib/node-esm/capability-OSVYGK4X.mjs.map +7 -0
- package/dist/lib/node-esm/{capability-RCUNM2M7.mjs → capability-SR2EIZFP.mjs} +14 -11
- package/dist/lib/node-esm/capability-SR2EIZFP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-STMXUEPO.mjs → chunk-64IMLAS2.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-STMXUEPO.mjs.map → chunk-64IMLAS2.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-663A54LQ.mjs → chunk-DHSHRYIB.mjs} +2 -2
- package/dist/lib/node-esm/chunk-DHSHRYIB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GT6OKM5I.mjs → chunk-DZ2XLAGI.mjs} +2 -2
- package/dist/lib/node-esm/chunk-J2PHTRHC.mjs +45 -0
- package/dist/lib/node-esm/chunk-J2PHTRHC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs +35 -0
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OQYHRZYF.mjs +81 -0
- package/dist/lib/node-esm/chunk-OQYHRZYF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6WXBT3EC.mjs → chunk-PQOJE7NA.mjs} +626 -591
- package/dist/lib/node-esm/chunk-PQOJE7NA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XYQTBFPA.mjs → chunk-XHAKT6UD.mjs} +3 -3
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +2 -0
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +90 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/common/activation-events.mjs +24 -0
- package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
- package/dist/lib/node-esm/common/capabilities.mjs +46 -0
- package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
- package/dist/lib/node-esm/core/capability.mjs +1 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +3 -3
- package/dist/lib/node-esm/core/plugin.mjs +2 -2
- package/dist/lib/node-esm/index.mjs +34 -129
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{invoker-capability-PNMA5JOS.mjs → invoker-capability-CK4AMF2R.mjs} +15 -11
- package/dist/lib/node-esm/invoker-capability-CK4AMF2R.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +16 -12
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{react → ui}/index.mjs +20 -17
- package/dist/lib/node-esm/ui/index.mjs.map +7 -0
- package/dist/types/src/{cli.d.ts → cli/cli.d.ts} +2 -2
- package/dist/types/src/cli/cli.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/common/activation-events.d.ts +27 -0
- package/dist/types/src/common/activation-events.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +115 -0
- package/dist/types/src/common/capabilities.d.ts.map +1 -0
- package/dist/types/src/common/index.d.ts +4 -9
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +0 -347
- package/dist/types/src/common/operations.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +0 -9
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +11 -3
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts +2 -2
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/{react → ui/components}/App.d.ts +1 -1
- package/dist/types/src/ui/components/App.d.ts.map +1 -0
- package/dist/types/src/ui/components/App.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/DefaultFallback.d.ts.map +1 -0
- package/dist/types/src/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManagerContext.stories.d.ts.map +1 -0
- package/dist/types/src/{react → ui/components}/PluginManagerProvider.d.ts +1 -1
- package/dist/types/src/ui/components/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +5 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/surface/SurfaceComponent.d.ts +12 -0
- package/dist/types/src/ui/components/surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/{react/Surface.stories.d.ts → ui/components/surface/SurfaceComponent.stories.d.ts} +1 -1
- package/dist/types/src/ui/components/surface/SurfaceComponent.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/surface/SurfaceInfo.d.ts.map +1 -0
- package/dist/types/src/ui/components/surface/context.d.ts +5 -0
- package/dist/types/src/ui/components/surface/context.d.ts.map +1 -0
- package/dist/types/src/ui/components/surface/index.d.ts +5 -0
- package/dist/types/src/ui/components/surface/index.d.ts.map +1 -0
- package/dist/types/src/{common/surface.d.ts → ui/components/surface/types.d.ts} +16 -16
- package/dist/types/src/ui/components/surface/types.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/index.d.ts +7 -0
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
- package/dist/types/src/{react → ui/hooks}/useApp.d.ts +8 -3
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
- package/dist/types/src/{react → ui/hooks}/useCapabilities.d.ts +6 -1
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
- package/dist/types/src/{react → ui/hooks}/useOperationResolver.d.ts +2 -2
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +1 -0
- package/dist/types/src/{react/common.d.ts → ui/hooks/useSettingsState.d.ts} +1 -5
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
- package/dist/types/src/ui/index.d.ts +4 -0
- package/dist/types/src/ui/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +6 -3
- package/package.json +77 -70
- package/src/{cli.ts → cli/cli.ts} +8 -8
- package/src/{playground/debug → cli}/index.ts +1 -1
- package/src/common/activation-events.ts +44 -0
- package/src/common/capabilities.ts +178 -0
- package/src/common/index.ts +4 -9
- package/src/common/operations.ts +0 -374
- package/src/common/translations.ts +0 -12
- package/src/core/capability.ts +1 -1
- package/src/core/plugin-manager.test.ts +22 -22
- package/src/index.ts +1 -3
- package/src/plugin-operation/OperationPlugin.ts +5 -5
- package/src/plugin-operation/history/capability.ts +5 -5
- package/src/plugin-operation/history/undo-mapping.ts +6 -3
- package/src/plugin-operation/invoker-capability.ts +5 -5
- package/src/plugin-runtime/RuntimePlugin.ts +4 -4
- package/src/plugin-runtime/capability.ts +5 -5
- package/src/testing/service.ts +4 -4
- package/src/testing/withPluginManager.stories.tsx +6 -6
- package/src/testing/withPluginManager.tsx +4 -4
- package/src/{react → ui/components}/App.stories.tsx +6 -7
- package/src/{react → ui/components}/App.tsx +6 -9
- package/src/{react → ui/components}/PluginManagerContext.stories.tsx +7 -8
- package/src/{react → ui/components}/PluginManagerProvider.ts +1 -1
- package/src/ui/components/index.ts +8 -0
- package/src/{react/Surface.stories.tsx → ui/components/surface/SurfaceComponent.stories.tsx} +10 -9
- package/src/{react/Surface.tsx → ui/components/surface/SurfaceComponent.tsx} +34 -39
- package/src/{react → ui/components/surface}/SurfaceInfo.tsx +1 -1
- package/src/ui/components/surface/context.ts +12 -0
- package/src/ui/components/surface/index.ts +8 -0
- package/src/{common/surface.ts → ui/components/surface/types.ts} +21 -22
- package/src/ui/hooks/index.ts +10 -0
- package/src/{react → ui/hooks}/useApp.tsx +22 -16
- package/src/{react → ui/hooks}/useCapabilities.ts +9 -5
- package/src/{react → ui/hooks}/useOperationResolver.ts +5 -5
- package/src/{react/common.ts → ui/hooks/useSettingsState.ts} +0 -11
- package/src/ui/hooks/useSurface.ts +13 -0
- package/src/ui/index.ts +7 -0
- package/tsconfig.json +0 -30
- package/dist/lib/browser/app-graph-builder-M2VPYQC6.mjs +0 -149
- package/dist/lib/browser/app-graph-builder-M2VPYQC6.mjs.map +0 -7
- package/dist/lib/browser/capability-7PCNSWBT.mjs.map +0 -7
- package/dist/lib/browser/capability-KP3PFEXD.mjs +0 -31
- package/dist/lib/browser/capability-KP3PFEXD.mjs.map +0 -7
- package/dist/lib/browser/chunk-7IQHKD4U.mjs.map +0 -7
- package/dist/lib/browser/chunk-BLQJSGL3.mjs +0 -732
- package/dist/lib/browser/chunk-BLQJSGL3.mjs.map +0 -7
- package/dist/lib/browser/chunk-H4WPA7U7.mjs +0 -77
- package/dist/lib/browser/chunk-H4WPA7U7.mjs.map +0 -7
- package/dist/lib/browser/chunk-XYNO72GQ.mjs.map +0 -7
- package/dist/lib/browser/common/index.mjs +0 -38
- package/dist/lib/browser/invoker-capability-SZRSTHEH.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-6MP2MYOY.mjs +0 -64
- package/dist/lib/browser/operation-resolver-6MP2MYOY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-LROHGJEM.mjs +0 -150
- package/dist/lib/node-esm/app-graph-builder-LROHGJEM.mjs.map +0 -7
- package/dist/lib/node-esm/capability-CFLQ2QQU.mjs.map +0 -7
- package/dist/lib/node-esm/capability-RCUNM2M7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-663A54LQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6WXBT3EC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GQEBIGKD.mjs +0 -733
- package/dist/lib/node-esm/chunk-GQEBIGKD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XR6NMKEP.mjs +0 -78
- package/dist/lib/node-esm/chunk-XR6NMKEP.mjs.map +0 -7
- package/dist/lib/node-esm/common/index.mjs +0 -39
- package/dist/lib/node-esm/invoker-capability-PNMA5JOS.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-7YWDMTNU.mjs +0 -65
- package/dist/lib/node-esm/operation-resolver-7YWDMTNU.mjs.map +0 -7
- package/dist/types/src/cli.d.ts.map +0 -1
- package/dist/types/src/common/activation-event.d.ts +0 -66
- package/dist/types/src/common/activation-event.d.ts.map +0 -1
- package/dist/types/src/common/capability.d.ts +0 -265
- package/dist/types/src/common/capability.d.ts.map +0 -1
- package/dist/types/src/common/collaboration.d.ts +0 -26
- package/dist/types/src/common/collaboration.d.ts.map +0 -1
- package/dist/types/src/common/file.d.ts +0 -14
- package/dist/types/src/common/file.d.ts.map +0 -1
- package/dist/types/src/common/graph.d.ts +0 -21
- package/dist/types/src/common/graph.d.ts.map +0 -1
- package/dist/types/src/common/plugin.d.ts +0 -201
- package/dist/types/src/common/plugin.d.ts.map +0 -1
- package/dist/types/src/common/surface.d.ts.map +0 -1
- package/dist/types/src/playground/debug/Debug.d.ts +0 -8
- package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
- package/dist/types/src/playground/debug/index.d.ts +0 -2
- package/dist/types/src/playground/debug/index.d.ts.map +0 -1
- package/dist/types/src/playground/debug/plugin.d.ts +0 -3
- package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Main.d.ts +0 -8
- package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +0 -8
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/generator/generator.d.ts +0 -19
- package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
- package/dist/types/src/playground/generator/index.d.ts +0 -3
- package/dist/types/src/playground/generator/index.d.ts.map +0 -1
- package/dist/types/src/playground/generator/plugin.d.ts +0 -3
- package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/layout/Layout.d.ts +0 -10
- package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
- package/dist/types/src/playground/layout/index.d.ts +0 -2
- package/dist/types/src/playground/layout/index.d.ts.map +0 -1
- package/dist/types/src/playground/layout/plugin.d.ts +0 -3
- package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +0 -8
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/logger/index.d.ts +0 -2
- package/dist/types/src/playground/logger/index.d.ts.map +0 -1
- package/dist/types/src/playground/logger/plugin.d.ts +0 -3
- package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/schema.d.ts +0 -27
- package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
- package/dist/types/src/playground/playground.stories.d.ts +0 -11
- package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -3
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/actions.d.ts +0 -61
- package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -6
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/index.d.ts +0 -3
- package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/meta.d.ts +0 -3
- package/dist/types/src/plugin-settings/meta.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/operation-resolver.d.ts +0 -6
- package/dist/types/src/plugin-settings/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/translations.d.ts +0 -11
- package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
- package/dist/types/src/react/App.d.ts.map +0 -1
- package/dist/types/src/react/App.stories.d.ts.map +0 -1
- package/dist/types/src/react/DefaultFallback.d.ts.map +0 -1
- package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/react/PluginManagerContext.stories.d.ts.map +0 -1
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
- package/dist/types/src/react/Surface.d.ts +0 -14
- package/dist/types/src/react/Surface.d.ts.map +0 -1
- package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
- package/dist/types/src/react/SurfaceInfo.d.ts.map +0 -1
- package/dist/types/src/react/common.d.ts.map +0 -1
- package/dist/types/src/react/index.d.ts +0 -9
- package/dist/types/src/react/index.d.ts.map +0 -1
- package/dist/types/src/react/types.d.ts +0 -12
- package/dist/types/src/react/types.d.ts.map +0 -1
- package/dist/types/src/react/useApp.d.ts.map +0 -1
- package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
- package/dist/types/src/react/useLoading.d.ts.map +0 -1
- package/dist/types/src/react/useOperationResolver.d.ts.map +0 -1
- package/src/common/activation-event.ts +0 -99
- package/src/common/capability.ts +0 -343
- package/src/common/collaboration.ts +0 -31
- package/src/common/file.ts +0 -22
- package/src/common/graph.ts +0 -30
- package/src/common/plugin.ts +0 -364
- package/src/playground/debug/Debug.tsx +0 -49
- package/src/playground/debug/plugin.ts +0 -16
- package/src/playground/generator/Main.tsx +0 -80
- package/src/playground/generator/Toolbar.tsx +0 -57
- package/src/playground/generator/generator.ts +0 -48
- package/src/playground/generator/index.ts +0 -6
- package/src/playground/generator/plugin.ts +0 -21
- package/src/playground/layout/Layout.tsx +0 -37
- package/src/playground/layout/index.ts +0 -5
- package/src/playground/layout/plugin.ts +0 -18
- package/src/playground/logger/Toolbar.tsx +0 -33
- package/src/playground/logger/index.ts +0 -5
- package/src/playground/logger/plugin.ts +0 -42
- package/src/playground/logger/schema.ts +0 -22
- package/src/playground/playground.stories.tsx +0 -54
- package/src/plugin-settings/SettingsPlugin.ts +0 -19
- package/src/plugin-settings/actions.ts +0 -64
- package/src/plugin-settings/app-graph-builder.ts +0 -140
- package/src/plugin-settings/index.ts +0 -6
- package/src/plugin-settings/meta.ts +0 -10
- package/src/plugin-settings/operation-resolver.ts +0 -55
- package/src/plugin-settings/translations.ts +0 -19
- package/src/react/index.ts +0 -14
- package/src/react/types.ts +0 -27
- /package/dist/lib/browser/{chunk-TCLLRCS3.mjs.map → chunk-KWP6PKIU.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-FMZN33N4.mjs.map → chunk-WGWEEBUV.mjs.map} +0 -0
- /package/dist/lib/browser/{common/index.mjs.map → chunk-YAFEA4GV.mjs.map} +0 -0
- /package/dist/lib/browser/{react/index.mjs.map → common/activation-events.mjs.map} +0 -0
- /package/dist/lib/{node-esm/common/index.mjs.map → browser/common/capabilities.mjs.map} +0 -0
- /package/dist/lib/{node-esm/react → browser/ui}/index.mjs.map +0 -0
- /package/dist/lib/node-esm/{chunk-GT6OKM5I.mjs.map → chunk-DZ2XLAGI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-XYQTBFPA.mjs.map → chunk-XHAKT6UD.mjs.map} +0 -0
- /package/dist/types/src/{react → ui/components}/App.stories.d.ts +0 -0
- /package/dist/types/src/{react → ui/components}/DefaultFallback.d.ts +0 -0
- /package/dist/types/src/{react → ui/components}/ErrorBoundary.d.ts +0 -0
- /package/dist/types/src/{react → ui/components}/PluginManagerContext.stories.d.ts +0 -0
- /package/dist/types/src/{react → ui/components/surface}/SurfaceInfo.d.ts +0 -0
- /package/dist/types/src/{react → ui/hooks}/useLoading.d.ts +0 -0
- /package/src/{react → ui/components}/DefaultFallback.tsx +0 -0
- /package/src/{react → ui/components}/ErrorBoundary.tsx +0 -0
- /package/src/{react → ui/hooks}/useLoading.tsx +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/common/index.ts", "../../../src/common/capability.ts", "../../../src/common/activation-event.ts", "../../../src/common/collaboration.ts", "../../../src/common/file.ts", "../../../src/common/operations.ts", "../../../src/common/translations.ts", "../../../src/common/plugin.ts", "../../../src/common/surface.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport * from './activation-event';\nexport * from './capability';\nexport * from './collaboration';\nexport * from './file';\nexport * from './graph';\nexport * from './operations';\nexport * from './plugin';\nexport * from './surface';\nexport * from './translations';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Command$ from '@effect/cli/Command';\nimport { Atom, type Registry } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport type * as Layer$ from 'effect/Layer';\nimport type * as ManagedRuntime$ from 'effect/ManagedRuntime';\nimport type * as Schema$ from 'effect/Schema';\nimport type { FC, PropsWithChildren } from 'react';\n\nimport type { AiModelResolver as AiModelResolver$, AiService as AiService$ } from '@dxos/ai';\nimport type { BuilderExtensions, GraphBuilder } from '@dxos/app-graph';\nimport type { GenericToolkit } from '@dxos/assistant';\nimport type { Blueprint } from '@dxos/blueprints';\nimport type { Database, Type } from '@dxos/echo';\nimport type { FunctionDefinition } from '@dxos/functions';\nimport type { OperationInvoker as OperationInvoker$, OperationResolver as OperationResolver$ } from '@dxos/operation';\nimport type { AnchoredTo } from '@dxos/types';\n\nimport { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';\nimport type {\n HistoryTracker as HistoryTracker$,\n UndoMapping as UndoMapping$,\n UndoRegistry as UndoRegistry$,\n} from '../plugin-operation';\n\nimport type { FileInfo } from './file';\nimport type { NodeSerializer } from './graph';\nimport type { SurfaceDefinition } from './surface';\nimport type { Resource } from './translations';\n\nexport namespace Capability {\n // TODO(burdon): Sort.\n\n /**\n * @category Capability\n */\n export const Null = Capability$.make<null>('dxos.org/app-framework/capability/null');\n\n /**\n * @category Capability\n */\n export const PluginManager = Capability$.make<PluginManager$.PluginManager>(\n 'dxos.org/app-framework/capability/plugin-manager',\n );\n\n /**\n * @category Capability\n */\n export const AtomRegistry = Capability$.make<Registry.Registry>('dxos.org/app-framework/capability/atom-registry');\n\n export type ReactContext = Readonly<{\n id: string;\n dependsOn?: string[];\n context: FC<PropsWithChildren>;\n }>;\n\n /**\n * @category Capability\n */\n export const ReactContext = Capability$.make<ReactContext>('dxos.org/app-framework/capability/react-context');\n\n export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;\n\n /**\n * @category Capability\n */\n export const ReactRoot = Capability$.make<ReactRoot>('dxos.org/app-framework/capability/react-root');\n\n /**\n * Surface definitions that can be either React components or Web Components.\n */\n export type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];\n\n /**\n * @category Capability\n */\n export const ReactSurface = Capability$.make<ReactSurface>('dxos.org/app-framework/common/react-surface');\n\n export type Layout = Readonly<{\n mode: string;\n dialogOpen: boolean;\n sidebarOpen: boolean;\n complementarySidebarOpen: boolean;\n /**\n * The id of the active workspace, where a workspace is a set of active items.\n */\n workspace: string;\n /**\n * Identifiers of items which are currently active in the application.\n */\n active: string[];\n /**\n * Identifiers of items which were previously active in the application.\n */\n inactive: string[];\n /**\n * Identifier of the item which should be scrolled into view.\n */\n scrollIntoView: string | undefined;\n }>;\n\n /**\n * Layout capability - provides reactive access to the current layout state.\n * Use `useAtomValue(layoutAtom)` in React or `registry.get(layoutAtom)` in Effects.\n * @category Capability\n */\n export const Layout = Capability$.make<Atom.Atom<Layout>>('dxos.org/app-framework/capability/layout');\n\n /**\n * @category Capability\n */\n export const Translations = Capability$.make<Readonly<Resource[]>>('dxos.org/app-framework/capability/translations');\n\n export type AppGraph = Readonly<{\n graph: GraphBuilder.GraphBuilder['graph'];\n explore: typeof GraphBuilder.explore;\n }>;\n\n /**\n * @category Capability\n */\n export const AppGraph = Capability$.make<AppGraph>('dxos.org/app-framework/capability/app-graph');\n\n /**\n * @category Capability\n */\n export const AppGraphBuilder = Capability$.make<BuilderExtensions>(\n 'dxos.org/app-framework/capability/app-graph-builder',\n );\n\n /**\n * @category Capability\n */\n export const AppGraphSerializer = Capability$.make<NodeSerializer[]>(\n 'dxos.org/app-framework/capability/app-graph-serializer',\n );\n\n // TODO(wittjosiah): The generics caused type inference issues for schemas when contributing settings.\n // export type Settings = Parameters<RootSettingsStore['createStore']>[0];\n // export type Settings<T extends SettingsValue = SettingsValue> = SettingsProps<T>;\n export type Settings = {\n prefix: string;\n schema: Schema$.Schema.All;\n atom: Atom.Writable<any>;\n };\n\n /**\n * Type guard to check if a value is a Settings object.\n */\n export const isSettings = (value: unknown): value is Settings =>\n typeof value === 'object' &&\n value !== null &&\n 'prefix' in value &&\n typeof (value as Settings).prefix === 'string' &&\n 'atom' in value &&\n Atom.isAtom(value.atom) &&\n Atom.isWritable(value.atom);\n\n /**\n * @category Capability\n */\n export const Settings = Capability$.make<Settings>('dxos.org/app-framework/capability/settings');\n\n export type Metadata = Readonly<{\n id: string;\n metadata: Record<string, any>;\n }>;\n\n /**\n * @category Capability\n */\n export const Metadata = Capability$.make<Metadata>('dxos.org/app-framework/capability/metadata');\n\n export type Schema = ReadonlyArray<Type.Entity.Any>;\n\n /**\n * @category Capability\n */\n export const Schema = Capability$.make<Schema>('dxos.org/app-framework/capability/schema');\n\n export type Toolkit = GenericToolkit.GenericToolkit;\n\n /**\n * @category Capability\n */\n export const Toolkit = Capability$.make<Toolkit>('dxos.org/app-framework/capability/ai-toolkit');\n\n /**\n * @category Capability\n */\n export const BlueprintDefinition = Capability$.make<Blueprint.Blueprint>(\n 'dxos.org/app-framework/capability/blueprint-definition',\n );\n\n export type AiServiceLayer = Layer$.Layer<AiService$.AiService>;\n export const AiServiceLayer = Capability$.make<AiServiceLayer>(\n 'dxos.org/app-framework/capability/ai-service-factory',\n );\n\n /**\n * Plugins can contribute them to provide model resolvers.\n */\n export const AiModelResolver = Capability$.make<Layer$.Layer<AiModelResolver$.AiModelResolver>>(\n 'dxos.org/app-framework/capability/ai-model-resolver',\n );\n\n /**\n * @category Capability\n */\n export const Functions = Capability$.make<FunctionDefinition.Any[]>('dxos.org/app-framework/capability/functions');\n\n export type FileUploader = (db: Database.Database, file: File) => Promise<FileInfo | undefined>;\n\n /**\n * @category Capability\n */\n export const FileUploader = Capability$.make<FileUploader>('dxos.org/app-framework/capability/file-uploader');\n\n export type AnchorSort = {\n key: string;\n sort: (anchorA: AnchoredTo.AnchoredTo, anchorB: AnchoredTo.AnchoredTo) => number;\n };\n\n /**\n * @category Capability\n */\n export const AnchorSort = Capability$.make<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');\n\n export type AnyCommand = Command$.Command<any, any, any, any>;\n\n /**\n * @category Capability\n */\n export const Command = Capability$.make<AnyCommand>('dxos.org/app-framework/capability/command');\n\n /**\n * @category Capability\n */\n export const Layer = Capability$.make<Layer$.Layer<any, any, any>>('dxos.org/app-framework/capability/layer');\n\n export type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;\n\n /**\n * @category Capability\n */\n export const ManagedRuntime = Capability$.make<ManagedRuntime>('dxos.org/app-framework/capability/managed-runtime');\n\n //\n // Operation System Capabilities\n //\n\n export type OperationResolver = OperationResolver$.OperationResolver<any, any, any, any>;\n\n /**\n * Handler registration for operations - contributed by plugins.\n * @category Capability\n */\n export const OperationResolver = Capability$.make<OperationResolver[]>(\n 'dxos.org/app-framework/capability/operation-resolver',\n );\n\n export type UndoMapping = UndoMapping$.UndoMapping;\n\n /**\n * Undo mapping registration - contributed by plugins.\n * @category Capability\n */\n export const UndoMapping = Capability$.make<UndoMapping[]>('dxos.org/app-framework/capability/undo-mapping');\n\n export type OperationInvoker = OperationInvoker$.OperationInvoker;\n\n /**\n * Operation invoker - provided by OperationPlugin.\n * @category Capability\n */\n export const OperationInvoker = Capability$.make<OperationInvoker>(\n 'dxos.org/app-framework/capability/operation-invoker',\n );\n\n export type UndoRegistry = UndoRegistry$.UndoRegistry;\n\n /**\n * Undo registry - provided by OperationPlugin.\n * @category Capability\n */\n export const UndoRegistry = Capability$.make<UndoRegistry>('dxos.org/app-framework/capability/undo-registry');\n\n export type HistoryTracker = HistoryTracker$.HistoryTracker;\n\n /**\n * History tracker - provided by OperationPlugin.\n * @category Capability\n */\n export const HistoryTracker = Capability$.make<HistoryTracker>('dxos.org/app-framework/capability/history-tracker');\n\n //\n // Atom Capability Helpers\n //\n\n /**\n * Get the current value of an atom capability.\n * @example const settings = yield* Common.Capability.getAtomValue(ThreadCapabilities.Settings);\n */\n export const getAtomValue = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>,\n ): Effect.Effect<T, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n return registry.get(atom);\n });\n\n /**\n * Update an atom capability value (requires writable atom).\n * @example yield* Common.Capability.updateAtomValue(ThreadCapabilities.Settings, (s) => ({ ...s, foo: true }));\n */\n export const updateAtomValue = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Writable<T>>,\n fn: (current: T) => T,\n ): Effect.Effect<void, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n registry.set(atom, fn(registry.get(atom)));\n });\n\n /**\n * Subscribe to an atom capability.\n * @example const unsubscribe = yield* Common.Capability.subscribeAtom(ThreadCapabilities.Settings, (value) => ...);\n */\n export const subscribeAtom = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>,\n callback: (value: T) => void,\n ): Effect.Effect<() => void, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n return registry.subscribe(atom, () => callback(registry.get(atom)));\n });\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent as ActivationEvent$ } from '../core';\n\nimport { Capability } from './capability';\n\nexport namespace ActivationEvent {\n /**\n * Fired when the app is started.\n */\n export const Startup = ActivationEvent$.make('dxos.org/app-framework/event/startup');\n\n //\n // Dependent Events\n //\n\n /**\n * Fired to load any newly available surfaces.\n */\n export const SetupReactSurface = ActivationEvent$.make('dxos.org/app-framework/event/setup-react-surface');\n\n /**\n * Fired to load any newly available metadata.\n */\n export const SetupMetadata = ActivationEvent$.make('dxos.org/app-framework/event/setup-metadata');\n\n /**\n * Fired before the operation invoker is activated.\n */\n export const SetupOperationResolver = ActivationEvent$.make('dxos.org/app-framework/event/setup-operation-resolver');\n\n /**\n * Fired before the managed runtime is created.\n * Plugins should contribute their Layer capabilities before this event.\n */\n export const SetupLayer = ActivationEvent$.make('dxos.org/app-framework/event/setup-layer');\n\n /**\n * Fired before the settings store is activated.\n */\n export const SetupSettings = ActivationEvent$.make('dxos.org/app-framework/event/setup-settings');\n\n /**\n * Fired before the graph is created.\n */\n export const SetupAppGraph = ActivationEvent$.make('dxos.org/app-framework/event/setup-graph');\n\n /**\n * Fired before the translations provider is created.\n */\n export const SetupTranslations = ActivationEvent$.make('dxos.org/app-framework/event/setup-translations');\n\n /**\n * Fired before the schema is created.\n */\n export const SetupSchema = ActivationEvent$.make('dxos.org/app-framework/event/setup-schema');\n\n /**\n * Fired to load any newly available artifacts definitions.\n */\n // TODO(burdon): Rename.\n export const SetupArtifactDefinition = ActivationEvent$.make(\n 'dxos.org/app-framework/event/setup-artifact-definition',\n );\n\n //\n // Triggered Events\n //\n\n /**\n * Fired after the operation invoker is ready.\n */\n export const OperationInvokerReady = ActivationEvent$.make('dxos.org/app-framework/event/operation-invoker-ready');\n\n /**\n * Fired after the managed runtime is ready.\n */\n export const ManagedRuntimeReady = ActivationEvent$.make('dxos.org/app-framework/event/managed-runtime-ready');\n\n /**\n * Fired when the graph is ready.\n */\n export const AppGraphReady = ActivationEvent$.make('dxos.org/app-framework/event/graph-ready');\n\n /**\n * Fired when plugin state is ready.\n */\n export const createStateEvent = (specifier: string) =>\n ActivationEvent$.make('dxos.org/app-framework/event/state', specifier);\n export const LayoutReady = createStateEvent(Capability.Layout.identifier);\n\n /**\n * Fired when a specific settings capability is ready.\n */\n export const createSettingsEvent = (specifier: string) =>\n ActivationEvent$.make('dxos.org/app-framework/event/settings', specifier);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/operation';\nimport { ContentBlock } from '@dxos/types';\n\nimport { Capability } from '../core';\n\nconst COLLABORATION_OPERATION = 'dxos.org/app-framework/collaboration/operation';\n\nexport namespace CollaborationOperation {\n export const AcceptProposal = Operation.make({\n meta: {\n key: `${COLLABORATION_OPERATION}/accept-proposal`,\n name: 'Accept Proposal',\n description: 'Accept a proposal from a collaborator.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.Any,\n anchor: Schema.String,\n proposal: ContentBlock.Proposal,\n }),\n output: Schema.Void,\n },\n });\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n// TODO(burdon): See Accept attribute (uses MIME types).\n// E.g., 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\nexport const defaultFileTypes = {\n images: ['png', 'jpg', 'jpeg', 'gif'],\n media: ['mp3', 'mp4', 'mov', 'avi'],\n text: ['pdf', 'txt', 'md'],\n};\n\nexport const FileInfoSchema = Schema.Struct({\n name: Schema.String,\n type: Schema.String,\n url: Schema.optional(Schema.String),\n cid: Schema.optional(Schema.String), // TODO(burdon): Meta key? Or other common properties with other file management system? (e.g., WNFS).\n});\n\nexport type FileInfo = Schema.Schema.Type<typeof FileInfoSchema>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/operation';\n\nimport { Capability } from '../core';\n\nimport { Label } from './translations';\n\nconst LAYOUT_PLUGIN = 'dxos.org/plugin/layout';\n\n/**\n * Layout operations - Operation-based equivalents of LayoutAction intents.\n * These mirror the LayoutAction namespace but use the Operation pattern.\n */\nexport namespace LayoutOperation {\n //\n // Sidebar Operations\n //\n\n export const UpdateSidebar = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/update-sidebar`,\n name: 'Update Sidebar',\n description: 'Update the sidebar state.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.optional(\n Schema.String.annotations({ description: 'URI of the component to display in the sidebar.' }),\n ),\n state: Schema.optional(\n Schema.Literal('closed', 'collapsed', 'expanded').annotations({\n description: 'Whether the sidebar is closed, collapsed, or expanded.',\n }),\n ),\n }),\n output: Schema.Void,\n },\n });\n\n export const UpdateComplementary = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/update-complementary`,\n name: 'Update Complementary Sidebar',\n description: 'Update the complementary sidebar state.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.optional(\n Schema.String.annotations({ description: 'URI of the component to display in the complementary area.' }),\n ),\n state: Schema.optional(\n Schema.Literal('closed', 'collapsed', 'expanded').annotations({\n description: 'Whether the complementary sidebar is closed, collapsed, or expanded.',\n }),\n ),\n }),\n output: Schema.Void,\n },\n });\n\n //\n // Dialog Operations\n //\n\n export const UpdateDialog = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/update-dialog`,\n name: 'Update Dialog',\n description: 'Open, close, or update the dialog.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.optional(\n Schema.String.annotations({ description: 'URI of the component to display in the dialog.' }),\n ),\n state: Schema.optional(Schema.Boolean.annotations({ description: 'Whether the dialog is open or closed.' })),\n type: Schema.optional(Schema.Literal('default', 'alert').annotations({ description: 'The type of dialog.' })),\n blockAlign: Schema.optional(\n Schema.Literal('start', 'center', 'end').annotations({ description: 'The alignment of the dialog.' }),\n ),\n overlayClasses: Schema.optional(\n Schema.String.annotations({ description: 'Additional classes for the dialog overlay.' }),\n ),\n overlayStyle: Schema.optional(\n Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({\n description: 'Additional styles for the dialog overlay.',\n }),\n ),\n props: Schema.optional(\n Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({\n description: 'Additional props for the dialog.',\n }),\n ),\n }),\n output: Schema.Void,\n },\n });\n\n //\n // Popover Operations\n //\n\n const PopoverBaseInput = Schema.Struct({\n subject: Schema.optional(\n Schema.Any.annotations({\n description: 'URI of the component to display in the popover or data to pass to the popover.',\n }),\n ),\n side: Schema.optional(\n Schema.Literal('top', 'right', 'bottom', 'left').annotations({ description: 'The side of the anchor.' }),\n ),\n state: Schema.optional(Schema.Boolean.annotations({ description: 'Whether the popover is open or closed.' })),\n props: Schema.optional(\n Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({\n description: 'Additional props for the popover.',\n }),\n ),\n });\n\n const PopoverBaseWithKind = Schema.Union(\n PopoverBaseInput.pipe(\n Schema.extend(\n Schema.Struct({\n kind: Schema.Literal('base').pipe(Schema.optional),\n }),\n ),\n ),\n PopoverBaseInput.pipe(\n Schema.extend(\n Schema.Struct({\n kind: Schema.Literal('card'),\n title: Schema.optional(Label.annotations({ description: 'The title of the card.' })),\n }),\n ),\n ),\n );\n\n export const UpdatePopover = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/update-popover`,\n name: 'Update Popover',\n description: 'Open, close, or update a popover.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Union(\n PopoverBaseWithKind.pipe(\n Schema.extend(\n Schema.Struct({\n variant: Schema.Literal('virtual'),\n anchor: Schema.Any.annotations({ description: 'The DOM element to anchor the popover to.' }),\n }),\n ),\n ),\n PopoverBaseWithKind.pipe(\n Schema.extend(\n Schema.Struct({\n variant: Schema.optional(Schema.Literal('react')),\n anchorId: Schema.String.annotations({\n description: 'An id that can be used to determine whether to render the anchor subcomponent.',\n }),\n }),\n ),\n ),\n ),\n output: Schema.Void,\n },\n });\n\n //\n // Toast Operations\n //\n\n export const Toast = Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the toast.' }),\n title: Schema.optional(Label.annotations({ description: 'The title of the toast.' })),\n description: Schema.optional(Label.annotations({ description: 'The description of the toast.' })),\n icon: Schema.optional(Schema.String.annotations({ description: 'The icon of the toast.' })),\n duration: Schema.optional(Schema.Number.annotations({ description: 'The duration of the toast.' })),\n closeLabel: Schema.optional(Label.annotations({ description: 'The label of the close button.' })),\n actionLabel: Schema.optional(Label.annotations({ description: 'The label of the action button.' })),\n actionAlt: Schema.optional(Label.annotations({ description: 'The alt text of the action button.' })),\n onAction: Schema.optional(\n Schema.Any.annotations({ description: 'The action to perform when the action button is clicked.' }),\n ),\n });\n\n export interface Toast extends Omit<Schema.Schema.Type<typeof Toast>, 'onAction'> {\n onAction?: () => void;\n }\n\n export const AddToast = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/add-toast`,\n name: 'Add Toast',\n description: 'Add a toast notification.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Toast,\n output: Schema.Void,\n },\n });\n\n //\n // Layout Mode Operations\n //\n\n export const SetLayoutMode = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/set-layout-mode`,\n name: 'Set Layout Mode',\n description: 'Set the layout mode (solo, deck, fullscreen, etc.).',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Union(\n Schema.Struct({\n subject: Schema.optional(\n Schema.String.annotations({ description: 'Item which is the subject of the new layout mode.' }),\n ),\n mode: Schema.String.annotations({ description: 'The new layout mode.' }),\n }),\n Schema.Struct({\n revert: Schema.Boolean.annotations({ description: 'Revert to the previous layout mode.' }),\n }),\n ),\n output: Schema.Void,\n },\n });\n\n //\n // Workspace Operations\n //\n\n export const SwitchWorkspace = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/switch-workspace`,\n name: 'Switch Workspace',\n description: 'Switch to a different workspace.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.String.annotations({ description: 'The id of the workspace to switch to.' }),\n }),\n output: Schema.Void,\n },\n });\n\n export const RevertWorkspace = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/revert-workspace`,\n name: 'Revert Workspace',\n description: 'Revert to the previous workspace.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n //\n // Main Content Operations\n //\n\n export const Open = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/open`,\n name: 'Open',\n description: 'Open items in the main content area.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to open.' })),\n state: Schema.optional(Schema.Literal(true).annotations({ description: 'The items are being added.' })),\n variant: Schema.optional(Schema.String.annotations({ description: 'The variant of the item to open.' })),\n key: Schema.optional(\n Schema.String.annotations({\n description: 'If provided, will replace item with a matching key (id prefix).',\n }),\n ),\n workspace: Schema.optional(Schema.String.annotations({ description: 'The workspace to open the items in.' })),\n scrollIntoView: Schema.optional(Schema.Boolean.annotations({ description: 'Scroll the items into view.' })),\n pivotId: Schema.optional(\n Schema.String.annotations({ description: 'The id of the item to place new items next to.' }),\n ),\n positioning: Schema.optional(\n Schema.Union(\n Schema.Literal('start').annotations({ description: 'The items are being added before the pivot item.' }),\n Schema.Literal('end').annotations({ description: 'The items are being added after the pivot item.' }),\n ),\n ),\n }),\n output: Schema.Void,\n },\n });\n\n export const Close = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/close`,\n name: 'Close',\n description: 'Close items in the main content area.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to close.' })),\n }),\n output: Schema.Void,\n },\n });\n\n export const Set = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/set`,\n name: 'Set',\n description: 'Override items in the main content area.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to set.' })),\n }),\n output: Schema.Void,\n },\n });\n\n //\n // Navigation Operations\n //\n\n export const ScrollIntoView = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/scroll-into-view`,\n name: 'Scroll Into View',\n description: 'Scroll an item into view.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.optional(Schema.String.annotations({ description: 'The id of the item to scroll into view.' })),\n cursor: Schema.optional(Schema.String.annotations({ description: 'A cursor to scroll to within the item.' })),\n ref: Schema.optional(Schema.String.annotations({ description: 'A reference id for the scroll target.' })),\n }),\n output: Schema.Void,\n },\n });\n\n export const Expose = Operation.make({\n meta: {\n key: `${LAYOUT_PLUGIN}/operation/expose`,\n name: 'Expose',\n description: 'Expose an item in the navigation area.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n subject: Schema.String.annotations({ description: 'The id of the item to expose.' }),\n }),\n output: Schema.Void,\n },\n });\n}\n\nconst UNDO_NAMESPACE = 'dxos.org/app-framework/undo';\n\n/**\n * Operations related to undo/history functionality.\n */\nexport namespace UndoOperation {\n /**\n * Show an undo toast notification.\n * Fired by HistoryTracker when an undoable operation is tracked.\n */\n export const ShowUndo = Operation.make({\n meta: {\n key: `${UNDO_NAMESPACE}/operation/show-undo`,\n name: 'Show Undo',\n description: 'Show an undo toast notification.',\n },\n executionMode: 'sync',\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n message: Schema.optional(Label.annotations({ description: 'The message to display in the undo toast.' })),\n }),\n output: Schema.Void,\n },\n });\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n/**\n * A Label represents translatable text - either a simple string or a tuple of [key, options].\n */\nexport const Label = Schema.Union(\n Schema.String,\n Schema.mutable(\n Schema.Tuple(\n Schema.String,\n Schema.mutable(\n Schema.Struct({\n ns: Schema.String,\n count: Schema.optional(Schema.Number),\n defaultValue: Schema.optional(Schema.String),\n }),\n ),\n ),\n ),\n);\nexport type Label = Schema.Schema.Type<typeof Label>;\n\nexport const ResourceKey = Schema.Union(Schema.String, Schema.Record({ key: Schema.String, value: Schema.Any }));\nexport type ResourceKey = Schema.Schema.Type<typeof ResourceKey>;\n\nexport const ResourceLanguage = Schema.Record({ key: Schema.String, value: ResourceKey });\nexport type ResourceLanguage = Schema.Schema.Type<typeof ResourceLanguage>;\n\n/**\n * A resource is a collection of translations for a language.\n */\nexport const Resource = Schema.Record({ key: Schema.String, value: ResourceLanguage });\nexport type Resource = Schema.Schema.Type<typeof Resource>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Command$ from '@effect/cli/Command';\nimport * as Effect from 'effect/Effect';\n\nimport { type Type } from '@dxos/echo';\n\nimport { Capability as Capability$, Plugin as Plugin$ } from '../core';\n\nimport { ActivationEvent } from './activation-event';\nimport { Capability } from './capability';\nimport { type Resource } from './translations';\n\ntype PluginModuleOptions = Partial<\n Pick<Plugin$.PluginModuleOptions, 'id' | 'activatesOn' | 'activatesBefore' | 'activatesAfter'>\n> &\n Pick<Plugin$.PluginModuleOptions, 'activate'>;\n\n/**\n * Helper functions for creating common plugin module patterns.\n */\nexport namespace Plugin {\n // TODO(wittjosiah): Restrict type to only allow operation handlers.\n export type OperationResolverModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes operation handlers.\n *\n * @param options Module options including the activate function and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addOperationResolverModule({\n * activate: (context) =>\n * Capability.contributes(Common.Capability.OperationResolver, [{\n * operation: MyOperation,\n * handler: (input) => Effect.succeed(...)\n * }])\n * })\n * )\n * ```\n */\n export function addOperationResolverModule<T = void>(\n options: OperationResolverModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'operation-resolver',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupOperationResolver,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow surfaces.\n export type SurfaceModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes React surfaces.\n *\n * @param options Module options including the activate function and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addSurfaceModule({\n * activate: (context) =>\n * Capability.contributes(Common.Capability.ReactSurface, [\n * Common.createSurface({ id: `${meta.id}/my-surface`, ... })\n * ])\n * })\n * )\n * ```\n */\n export function addSurfaceModule<T = void>(\n options: SurfaceModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'surfaces',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupReactSurface,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow react roots.\n export type ReactRootModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes a React root.\n */\n export function addReactRootModule<T = void>(\n options: ReactRootModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'react-root',\n activatesOn: options.activatesOn ?? ActivationEvent.Startup,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow react contexts.\n export type ReactContextModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes a React context.\n */\n export function addReactContextModule<T = void>(\n options: ReactContextModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'react-context',\n activatesOn: options.activatesOn ?? ActivationEvent.Startup,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow app graph builders.\n export type AppGraphModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes app graph builder extensions.\n *\n * @param options Module options including the activate function and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addAppGraphModule({\n * activate: Effect.fnUntraced(function* () {\n * const extensions = yield* GraphBuilder.createExtension({\n * id: meta.id,\n * match: NodeMatcher.whenRoot,\n * // All callbacks must return Effects.\n * actions: () => Effect.succeed([{\n * id: 'my-action',\n * // Action data returns Effect for automatic context access.\n * data: Effect.fnUntraced(function* () {\n * yield* Operation.invoke(MyOperation, { ... });\n * }),\n * properties: { label: 'My Action', icon: 'ph--icon' },\n * }]),\n * connector: (node, get) => Effect.succeed([{ id: 'child', ... }]),\n * });\n * return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);\n * })\n * })\n * )\n * ```\n */\n export function addAppGraphModule<T = void>(\n options: AppGraphModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'app-graph-builder',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupAppGraph,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n export type TranslationsModuleOptions = Omit<PluginModuleOptions, 'activate'> & {\n translations: Resource | Resource[];\n };\n\n /**\n * Creates a module that contributes translations.\n *\n * @param options Module options including translations and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addTranslationsModule({\n * translations: translations\n * })\n * )\n * ```\n */\n export function addTranslationsModule<T = void>(\n options: TranslationsModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: options?.id ?? 'translations',\n activatesOn: options?.activatesOn ?? ActivationEvent.SetupTranslations,\n activatesBefore: options?.activatesBefore,\n activatesAfter: options?.activatesAfter,\n activate: Effect.fnUntraced(function* () {\n return Capability$.contributes(\n Capability.Translations,\n Array.isArray(options.translations) ? options.translations : ([options.translations] as Resource[]),\n );\n }),\n });\n }\n\n export type MetadataModuleOptions = Omit<PluginModuleOptions, 'activate'> & {\n metadata: Capability.Metadata | Capability.Metadata[];\n };\n\n /**\n * Creates a module that contributes metadata.\n *\n * @param options Module options including metadata and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addMetadataModule({\n * metadata: {\n * id: MyType.typename,\n * metadata: { icon: 'ph--icon', ... }\n * }\n * })\n * )\n * ```\n */\n export function addMetadataModule<T = void>(\n options: MetadataModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: options.id ?? 'metadata',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupMetadata,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: Effect.fnUntraced(function* () {\n return (Array.isArray(options.metadata) ? options.metadata : [options.metadata]).map((m) =>\n Capability$.contributes(Capability.Metadata, m),\n );\n }),\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow settings.\n export type SettingsModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes settings.\n */\n export function addSettingsModule<T = void>(\n options: SettingsModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'settings',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupSettings,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n // TODO(wittjosiah): Restrict type to only allow blueprint definitions.\n export type BlueprintDefinitionModuleOptions = PluginModuleOptions;\n\n /**\n * Creates a module that contributes blueprint definitions.\n *\n * @param options Module options including the activate function and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addBlueprintDefinitionModule({\n * activate: (context) =>\n * Capability.contributes(Common.Capability.BlueprintDefinition, [\n * BlueprintDefinition.make({ key: 'my-blueprint', ... })\n * ])\n * })\n * )\n * ```\n */\n export function addBlueprintDefinitionModule<T = void>(\n options: BlueprintDefinitionModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: Capability$.getModuleTag(options.activate) ?? options.id ?? 'blueprint-definition',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupArtifactDefinition,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: options.activate,\n });\n }\n\n export type SchemaModuleOptions = Omit<PluginModuleOptions, 'activate'> & {\n schema: ReadonlyArray<Type.Entity.Any>;\n };\n\n /**\n * Creates a module that contributes schemas.\n *\n * @param options Module options including schema array and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addSchemaModule({\n * schema: [MyType.Type, AnotherType.Type]\n * })\n * )\n * ```\n */\n export function addSchemaModule<T = void>(\n options: SchemaModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: options.id ?? 'schema',\n activatesOn: options.activatesOn ?? ActivationEvent.SetupSchema,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: Effect.fnUntraced(function* () {\n return Capability$.contributes(Capability.Schema, options.schema);\n }),\n });\n }\n\n export type CommandModuleOptions = Omit<PluginModuleOptions, 'activate'> & {\n commands: ReadonlyArray<Command$.Command<any, any, any, any>>;\n };\n\n /**\n * Creates a module that contributes CLI commands.\n *\n * @param options Module options including commands and optional configuration\n * @returns A function that can be used with Plugin.addModule() in a pipe chain\n *\n * @example\n * ```ts\n * Plugin.define(meta).pipe(\n * Common.Plugin.addCommandModule({\n * commands: [myCommand, anotherCommand]\n * })\n * )\n * ```\n */\n export function addCommandModule<T = void>(\n options: CommandModuleOptions,\n ): (builder: Plugin$.PluginBuilder<T>) => Plugin$.PluginBuilder<T> {\n return Plugin$.addModule({\n id: options.id ?? 'cli-commands',\n activatesOn: options.activatesOn ?? ActivationEvent.Startup,\n activatesBefore: options.activatesBefore,\n activatesAfter: options.activatesAfter,\n activate: Effect.fnUntraced(function* () {\n return options.commands.map((cmd) => Capability$.contributes(Capability.Command, cmd));\n }),\n });\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { PropsWithChildren, ReactNode, RefCallback } from 'react';\n\nimport type { MakeOptional, Position } from '@dxos/util';\n\nimport type { ErrorBoundary } from '../react';\n\n/**\n * SurfaceProps are the props that are passed to the Surface component.\n */\nexport type SurfaceProps<T extends Record<string, any> = Record<string, unknown>> = {\n /**\n * If specified, the Surface will be wrapped in an error boundary.\n * The fallback component will be rendered if an error occurs.\n */\n fallback?: ErrorBoundary['props']['fallback'];\n\n /**\n * If specified, the Surface will be wrapped in a suspense boundary.\n * The placeholder component will be rendered while the surface component is loading.\n */\n placeholder?: ReactNode;\n} & MakeOptional<CoreSurfaceProps<T>, 'id' | 'data'> &\n /**\n * Additional props to pass to the component.\n * These props are not used by Surface itself but may be used by components which resolve the surface.\n * Exclude known prop names to prevent overriding well-defined props.\n */\n {\n [K in keyof Record<string, any>]: K extends keyof CoreSurfaceProps<T> | 'fallback' | 'placeholder' ? never : any;\n };\n\n/**\n * NOTE: If `[key: string]: unknown` is included in shared types, when re-used other fields become unknown as well.\n */\nexport type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{\n /**\n * ID for debugging.\n */\n id: string;\n\n /**\n * Role defines how the data should be rendered.\n */\n role: string;\n\n /**\n * The data to be rendered by the surface.\n * NOTE: This must be a stable value.\n */\n data: T;\n\n /**\n * If more than one component is resolved, the limit determines how many are rendered.\n */\n limit?: number | undefined;\n}>;\n\nexport type SurfaceComponentProps<T extends Record<string, any> = Record<string, any>> = CoreSurfaceProps<T> & {\n ref?: RefCallback<HTMLElement>;\n} & Record<string, any>;\n\n/**\n * React component used to render a surface once is has matched.\n */\nexport type SurfaceComponent<T extends Record<string, any> = Record<string, any>> = (\n props: SurfaceComponentProps<T>,\n) => ReactNode;\n\n/**\n * Definition of when a React SurfaceComponent should be rendered.\n */\nexport type ReactSurfaceDefinition<T extends Record<string, any> = any> = Readonly<{\n kind: 'react';\n id: string;\n role: string | string[];\n position?: Position;\n component: SurfaceComponent<T>;\n filter?: (data: Record<string, unknown>) => data is T;\n}>;\n\n/**\n * Definition of when a Web Component surface should be rendered.\n */\nexport type WebComponentSurfaceDefinition<T extends Record<string, any> = any> = Readonly<{\n kind: 'web-component';\n id: string;\n role: string | string[];\n position?: Position;\n /**\n * The tag name of the Web Component to render.\n * The Web Component will receive the same props as React surfaces via properties/attributes.\n */\n tagName: string;\n filter?: (data: Record<string, unknown>) => data is T;\n}>;\n\n/**\n * Definition of when a surface (React or Web Component) should be rendered.\n */\nexport type SurfaceDefinition<T extends Record<string, any> = any> =\n | ReactSurfaceDefinition<T>\n | WebComponentSurfaceDefinition<T>;\n\n/**\n * Creates a React surface definition.\n */\nexport const createSurface = <T extends Record<string, any> = any>(\n definition: Omit<ReactSurfaceDefinition<T>, 'kind'>,\n): ReactSurfaceDefinition<T> => ({ ...definition, kind: 'react' });\n\n/**\n * Creates a Web Component surface definition.\n */\nexport const createWebSurface = <T extends Record<string, any> = any>(\n definition: Omit<WebComponentSurfaceDefinition<T>, 'kind'>,\n): WebComponentSurfaceDefinition<T> => ({ ...definition, kind: 'web-component' });\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;ACKA,SAASA,YAA2B;AACpC,YAAYC,YAAY;UA2BPC,aAAAA;cAMFC,OAAOC,mBAAYC,KAAW,wCAAA;cAK9BC,gBAAgBF,mBAAYC,KACvC,kDAAA;cAMWE,eAAeH,mBAAYC,KAAwB,iDAAA;cAWnDG,eAAeJ,mBAAYC,KAAmB,iDAAA;cAO9CI,YAAYL,mBAAYC,KAAgB,8CAAA;cAUxCK,eAAeN,mBAAYC,KAAmB,6CAAA;cA8B9CM,SAASP,mBAAYC,KAAwB,0CAAA;cAK7CO,eAAeR,mBAAYC,KAA2B,gDAAA;cAUtDQ,WAAWT,mBAAYC,KAAe,6CAAA;cAKtCS,kBAAkBV,mBAAYC,KACzC,qDAAA;cAMWU,qBAAqBX,mBAAYC,KAC5C,wDAAA;cAeWW,aAAa,CAACC,UACzB,OAAOA,UAAU,YACjBA,UAAU,QACV,YAAYA,SACZ,O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ACpB,CAAA;EACF;AAXC,EAAAR,QACesC,+BAAAA;AA+BT,WAASE,gBACdtC,SAA4B;AAE5B,WAAOC,eAAQC,UAAU;MACvBC,IAAIH,QAAQG,MAAM;MAClBI,aAAaP,QAAQO,eAAeC,gBAAgB+B;MACpD7B,iBAAiBV,QAAQU;MACzBC,gBAAgBX,QAAQW;MACxBL,UAAiBe,mBAAW,aAAA;AAC1B,eAAOjB,mBAAYkB,YAAYC,WAAWiB,QAAQxC,QAAQyC,MAAM;MAClE,CAAA;IACF,CAAA;EACF;AAbC,EAAA3C,QACewC,kBAAAA;AAiCT,WAASI,iBACd1C,SAA6B;AAE7B,WAAOC,eAAQC,UAAU;MACvBC,IAAIH,QAAQG,MAAM;MAClBI,aAAaP,QAAQO,eAAeC,gBAAgBO;MACpDL,iBAAiBV,QAAQU;MACzBC,gBAAgBX,QAAQW;MACxBL,UAAiBe,mBAAW,aAAA;AAC1B,eAAOrB,QAAQ2C,SAASZ,IAAI,CAACa,QAAQxC,mBAAYkB,YAAYC,WAAWsB,SAASD,GAAAA,CAAAA;MACnF,CAAA;IACF,CAAA;EACF;AAbC,EAAA9C,QACe4C,mBAAAA;AAalB,GApViB5C,WAAAA,SAAAA,CAAAA,EAAAA;;;;ACuFV,IAAMgD,gBAAgB,CAC3BC,gBAC+B;EAAE,GAAGA;EAAYC,MAAM;AAAQ;AAKzD,IAAMC,mBAAmB,CAC9BF,gBACsC;EAAE,GAAGA;EAAYC,MAAM;AAAgB;",
|
|
6
|
-
"names": ["Atom", "Effect", "Capability", "Null", "Capability$", "make", "PluginManager", "AtomRegistry", "ReactContext", "ReactRoot", "ReactSurface", "Layout", "Translations", "AppGraph", "AppGraphBuilder", "AppGraphSerializer", "isSettings", "value", "prefix", "Atom", "isAtom", "atom", "isWritable", "Settings", "Metadata", "Schema", "Toolkit", "BlueprintDefinition", "AiServiceLayer", "AiModelResolver", "Functions", "FileUploader", "AnchorSort", "Command", "Layer", "ManagedRuntime", "OperationResolver", "UndoMapping", "OperationInvoker", "UndoRegistry", "HistoryTracker", "getAtomValue", "atomCapability", "gen", "registry", "get", "updateAtomValue", "fn", "set", "subscribeAtom", "callback", "subscribe", "ActivationEvent", "Startup", "ActivationEvent$", "make", "SetupReactSurface", "SetupMetadata", "SetupOperationResolver", "SetupLayer", "SetupSettings", "SetupAppGraph", "SetupTranslations", "SetupSchema", "SetupArtifactDefinition", "OperationInvokerReady", "ManagedRuntimeReady", "AppGraphReady", "createStateEvent", "specifier", "LayoutReady", "Capability", "Layout", "identifier", "createSettingsEvent", "Schema", "Operation", "ContentBlock", "COLLABORATION_OPERATION", "CollaborationOperation", "AcceptProposal", "Operation", "make", "meta", "key", "name", "description", "services", "Capability", "Service", "schema", "input", "Struct", "subject", "Any", "anchor", "String", "proposal", "ContentBlock", "Proposal", "output", "Void", "Schema", "defaultFileTypes", "images", "media", "text", "FileInfoSchema", "Struct", "name", "String", "type", "url", "optional", "cid", "Schema", "Operation", "Schema", "Label", "Union", "String", "mutable", "Tuple", "Struct", "ns", "count", "optional", "Number", "defaultValue", "ResourceKey", "Record", "key", "value", "Any", "ResourceLanguage", "Resource", "LAYOUT_PLUGIN", "LayoutOperation", "UpdateSidebar", "Operation", "make", "meta", "key", "name", "description", "executionMode", "services", "Capability", "Service", "schema", "input", "Struct", "subject", "optional", "String", "annotations", "state", "Literal", "output", "Void", "UpdateComplementary", "UpdateDialog", "Boolean", "type", "blockAlign", "overlayClasses", "overlayStyle", "Record", "value", "Any", "props", "PopoverBaseInput", "side", "PopoverBaseWithKind", "Union", "pipe", "extend", "kind", "title", "Label", "UpdatePopover", "variant", "anchor", "anchorId", "Toast", "id", "icon", "duration", "Number", "closeLabel", "actionLabel", "actionAlt", "onAction", "AddToast", "SetLayoutMode", "mode", "revert", "SwitchWorkspace", "RevertWorkspace", "Open", "Array", "workspace", "scrollIntoView", "pivotId", "positioning", "Close", "Set", "ScrollIntoView", "cursor", "ref", "Expose", "UNDO_NAMESPACE", "UndoOperation", "ShowUndo", "message", "Effect", "Plugin", "addOperationResolverModule", "options", "Plugin$", "addModule", "id", "Capability$", "getModuleTag", "activate", "activatesOn", "ActivationEvent", "SetupOperationResolver", "activatesBefore", "activatesAfter", "addSurfaceModule", "SetupReactSurface", "addReactRootModule", "Startup", "addReactContextModule", "addAppGraphModule", "SetupAppGraph", "addTranslationsModule", "SetupTranslations", "fnUntraced", "contributes", "Capability", "Translations", "Array", "isArray", "translations", "addMetadataModule", "SetupMetadata", "metadata", "map", "m", "Metadata", "addSettingsModule", "SetupSettings", "addBlueprintDefinitionModule", "SetupArtifactDefinition", "addSchemaModule", "SetupSchema", "Schema", "schema", "addCommandModule", "commands", "cmd", "Command", "createSurface", "definition", "kind", "createWebSurface"]
|
|
7
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
capability_exports
|
|
3
|
-
} from "./chunk-6Y7PZV72.mjs";
|
|
4
|
-
|
|
5
|
-
// src/plugin-settings/meta.ts
|
|
6
|
-
var meta = {
|
|
7
|
-
id: "dxos.org/plugin/settings",
|
|
8
|
-
name: "Settings"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// src/plugin-settings/actions.ts
|
|
12
|
-
import * as Schema from "effect/Schema";
|
|
13
|
-
import { Operation } from "@dxos/operation";
|
|
14
|
-
var SETTINGS_ID = "!dxos:settings";
|
|
15
|
-
var SETTINGS_KEY = "settings";
|
|
16
|
-
(function(SettingsAction2) {
|
|
17
|
-
class Open extends Schema.TaggedClass()(`${meta.id}/open`, {
|
|
18
|
-
input: Schema.Struct({
|
|
19
|
-
plugin: Schema.optional(Schema.String)
|
|
20
|
-
}),
|
|
21
|
-
output: Schema.Void
|
|
22
|
-
}) {
|
|
23
|
-
}
|
|
24
|
-
SettingsAction2.Open = Open;
|
|
25
|
-
class OpenPluginRegistry extends Schema.TaggedClass()(`${meta.id}/open-plugin-registry`, {
|
|
26
|
-
input: Schema.Void,
|
|
27
|
-
output: Schema.Void
|
|
28
|
-
}) {
|
|
29
|
-
}
|
|
30
|
-
SettingsAction2.OpenPluginRegistry = OpenPluginRegistry;
|
|
31
|
-
})(SettingsAction || (SettingsAction = {}));
|
|
32
|
-
var SETTINGS_OPERATION = `${meta.id}/operation`;
|
|
33
|
-
(function(SettingsOperation2) {
|
|
34
|
-
SettingsOperation2.Open = Operation.make({
|
|
35
|
-
meta: {
|
|
36
|
-
key: `${SETTINGS_OPERATION}/open`,
|
|
37
|
-
name: "Open Settings",
|
|
38
|
-
description: "Open the settings panel."
|
|
39
|
-
},
|
|
40
|
-
services: [
|
|
41
|
-
capability_exports.Service
|
|
42
|
-
],
|
|
43
|
-
schema: {
|
|
44
|
-
input: Schema.Struct({
|
|
45
|
-
plugin: Schema.optional(Schema.String.annotations({
|
|
46
|
-
description: "The plugin to open settings for."
|
|
47
|
-
}))
|
|
48
|
-
}),
|
|
49
|
-
output: Schema.Void
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
SettingsOperation2.OpenPluginRegistry = Operation.make({
|
|
53
|
-
meta: {
|
|
54
|
-
key: `${SETTINGS_OPERATION}/open-plugin-registry`,
|
|
55
|
-
name: "Open Plugin Registry",
|
|
56
|
-
description: "Open the plugin registry."
|
|
57
|
-
},
|
|
58
|
-
services: [
|
|
59
|
-
capability_exports.Service
|
|
60
|
-
],
|
|
61
|
-
schema: {
|
|
62
|
-
input: Schema.Void,
|
|
63
|
-
output: Schema.Void
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
})(SettingsOperation || (SettingsOperation = {}));
|
|
67
|
-
var SettingsAction;
|
|
68
|
-
var SettingsOperation;
|
|
69
|
-
|
|
70
|
-
export {
|
|
71
|
-
meta,
|
|
72
|
-
SETTINGS_ID,
|
|
73
|
-
SETTINGS_KEY,
|
|
74
|
-
SettingsAction,
|
|
75
|
-
SettingsOperation
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=chunk-H4WPA7U7.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugin-settings/meta.ts", "../../../src/plugin-settings/actions.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/settings',\n name: 'Settings',\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/operation';\n\nimport { Capability } from '../core';\n\nimport { meta } from './meta';\n\n// TODO(burdon): Document.\nexport const SETTINGS_ID = '!dxos:settings';\nexport const SETTINGS_KEY = 'settings';\n\nexport namespace SettingsAction {\n export class Open extends Schema.TaggedClass<Open>()(`${meta.id}/open`, {\n input: Schema.Struct({\n plugin: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class OpenPluginRegistry extends Schema.TaggedClass<OpenPluginRegistry>()(`${meta.id}/open-plugin-registry`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n}\n\nconst SETTINGS_OPERATION = `${meta.id}/operation`;\n\n/**\n * Operations for the Settings plugin.\n */\nexport namespace SettingsOperation {\n export const Open = Operation.make({\n meta: {\n key: `${SETTINGS_OPERATION}/open`,\n name: 'Open Settings',\n description: 'Open the settings panel.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n plugin: Schema.optional(Schema.String.annotations({ description: 'The plugin to open settings for.' })),\n }),\n output: Schema.Void,\n },\n });\n\n export const OpenPluginRegistry = Operation.make({\n meta: {\n key: `${SETTINGS_OPERATION}/open-plugin-registry`,\n name: 'Open Plugin Registry',\n description: 'Open the plugin registry.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAMO,IAAMA,OAAoB;EAC/BC,IAAI;EACJC,MAAM;AACR;;;ACLA,YAAYC,YAAY;AAExB,SAASC,iBAAiB;AAOnB,IAAMC,cAAc;AACpB,IAAMC,eAAe;UAEXC,iBAAAA;EACR,MAAMC,aAAoBC,mBAAW,EAAS,GAAGC,KAAKC,EAAE,SAAS;IACtEC,OAAcC,cAAO;MACnBC,QAAeC,gBAAgBC,aAAM;IACvC,CAAA;IACAC,QAAeC;EACjB,CAAA,EAAA;EAAI;kBALSV,OAAAA;EAON,MAAMW,2BAAkCV,mBAAW,EAAuB,GAAGC,KAAKC,EAAE,yBAAyB;IAClHC,OAAcM;IACdD,QAAeC;EACjB,CAAA,EAAA;EAAI;kBAHSC,qBAAAA;AAIf,GAZiBZ,mBAAAA,iBAAAA,CAAAA,EAAAA;AAcjB,IAAMa,qBAAqB,GAAGV,KAAKC,EAAE;UAKpBU,oBAAAA;qBACFb,OAAOc,UAAUC,KAAK;IACjCb,MAAM;MACJc,KAAK,GAAGJ,kBAAAA;MACRK,MAAM;MACNC,aAAa;IACf;IACAC,UAAU;MAACC,mBAAWC;;IACtBC,QAAQ;MACNlB,OAAcC,cAAO;QACnBC,QAAeC,gBAAgBC,cAAOe,YAAY;UAAEL,aAAa;QAAmC,CAAA,CAAA;MACtG,CAAA;MACAT,QAAeC;IACjB;EACF,CAAA;qBAEaC,qBAAqBG,UAAUC,KAAK;IAC/Cb,MAAM;MACJc,KAAK,GAAGJ,kBAAAA;MACRK,MAAM;MACNC,aAAa;IACf;IACAC,UAAU;MAACC,mBAAWC;;IACtBC,QAAQ;MACNlB,OAAcM;MACdD,QAAeC;IACjB;EACF,CAAA;AACF,GA5BiBG,sBAAAA,oBAAAA,CAAAA,EAAAA;;;",
|
|
6
|
-
"names": ["meta", "id", "name", "Schema", "Operation", "SETTINGS_ID", "SETTINGS_KEY", "SettingsAction", "Open", "TaggedClass", "meta", "id", "input", "Struct", "plugin", "optional", "String", "output", "Void", "OpenPluginRegistry", "SETTINGS_OPERATION", "SettingsOperation", "Operation", "make", "key", "name", "description", "services", "Capability", "Service", "schema", "annotations"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/react/common.ts", "../../../src/react/useCapabilities.ts", "../../../src/react/PluginManagerProvider.ts", "../../../src/react/ErrorBoundary.tsx", "../../../src/react/Surface.tsx", "../../../src/react/SurfaceInfo.tsx", "../../../src/react/useApp.tsx", "../../../src/react/App.tsx", "../../../src/helpers.ts", "../../../src/react/useLoading.tsx", "../../../src/react/DefaultFallback.tsx", "../../../src/react/useOperationResolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom, RegistryContext, useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useContext } from 'react';\n\nimport * as Common from '../common';\n\nimport { useAtomCapability, useCapability } from './useCapabilities';\n\nexport const useOperationInvoker = (): Common.Capability.OperationInvoker =>\n useCapability(Common.Capability.OperationInvoker);\n\nexport const useAppGraph = (): Common.Capability.AppGraph => useCapability(Common.Capability.AppGraph);\n\nexport const useLayout = (): Common.Capability.Layout => useAtomCapability(Common.Capability.Layout);\n\n/**\n * Hook to read and update a settings atom.\n * Returns the current value and an update function.\n */\nexport const useSettingsState = <T>(\n atom: Atom.Writable<T>,\n): { settings: T; updateSettings: (fn: (current: T) => T) => void } => {\n const registry = useContext(RegistryContext);\n const settings = useAtomValue(atom);\n\n const updateSettings = useCallback(\n (fn: (current: T) => T) => {\n registry.set(atom, fn(registry.get(atom)));\n },\n [registry, atom],\n );\n\n return { settings, updateSettings };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom, useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback } from 'react';\n\nimport { invariant } from '@dxos/invariant';\n\nimport * as Common from '../common';\nimport { type Capability } from '../core';\n\nimport { usePluginManager } from './PluginManagerProvider';\n\n/**\n * Hook to request capabilities from the plugin context.\n * @returns An array of capabilities.\n */\nexport const useCapabilities = <T>(interfaceDef: Capability.InterfaceDef<T>) => {\n const manager = usePluginManager();\n return useAtomValue(manager.capabilities.atom(interfaceDef));\n};\n\n/**\n * Hook to request a capability from the plugin context.\n * @returns The capability.\n * @throws If no capability is found.\n */\nexport const useCapability = <T>(interfaceDef: Capability.InterfaceDef<T>) => {\n const capabilities = useCapabilities(interfaceDef);\n invariant(capabilities.length > 0, `No capability found for ${interfaceDef.identifier}`);\n return capabilities[0];\n};\n\n/**\n * Hook to get the current value of an atom capability.\n * Automatically subscribes to changes.\n * @example const settings = useAtomCapability(ThreadCapabilities.Settings);\n */\nexport const useAtomCapability = <T>(atomCapability: Capability.InterfaceDef<Atom.Atom<T>>): T => {\n const atom = useCapability(atomCapability);\n return useAtomValue(atom);\n};\n\n/**\n * Hook to get value and updater for an atom capability.\n * Returns [currentValue, updateFn] similar to useState.\n * @example const [settings, updateSettings] = useAtomCapabilityState(ThreadCapabilities.Settings);\n */\nexport const useAtomCapabilityState = <T>(\n atomCapability: Capability.InterfaceDef<Atom.Writable<T>>,\n): [T, (fn: (current: T) => T) => void] => {\n const registry = useCapability(Common.Capability.AtomRegistry);\n const atom = useCapability(atomCapability);\n const value = useAtomValue(atom);\n const update = useCallback(\n (fn: (current: T) => T) => {\n registry.set(atom, fn(registry.get(atom)));\n },\n [registry, atom],\n );\n return [value, update];\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { type PluginManager } from '../core';\n\nconst PluginManagerContext = createContext<PluginManager.PluginManager | undefined>(undefined);\n\n/**\n * Get the plugin manager.\n */\nexport const usePluginManager = (): PluginManager.PluginManager =>\n useContext(PluginManagerContext) ?? raise(new Error('Missing PluginManagerContext'));\n\n/**\n * Context provider for a plugin manager.\n */\nexport const PluginManagerProvider = PluginManagerContext.Provider;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { Component, type FC, type PropsWithChildren, type ReactNode } from 'react';\n\ntype State = {\n error: Error | undefined;\n};\n\nexport type ErrorBoundaryProps = PropsWithChildren<{\n data?: any;\n fallback?: FC<{ data?: any; error: Error }>;\n}>;\n\n/**\n * Surface error boundary.\n * For basic usage prefer providing a fallback component to `Surface`.\n *\n * Ref: https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n static getDerivedStateFromError(error: Error): { error: Error } {\n return { error };\n }\n\n override state = { error: undefined };\n\n override componentDidUpdate(prevProps: ErrorBoundaryProps): void {\n if (prevProps.data !== this.props.data) {\n this.resetError();\n }\n }\n\n override render(): ReactNode {\n if (this.state.error) {\n const Fallback = this.props.fallback ?? DefaultFallback;\n return <Fallback data={this.props.data} error={this.state.error} />;\n }\n\n return this.props.children;\n }\n\n private resetError(): void {\n this.setState({ error: undefined });\n }\n}\n\nconst DefaultFallback: NonNullable<ErrorBoundaryProps['fallback']> = ({ data, error }) => {\n return (\n <div className='flex flex-col gap-2 overflow-hidden border border-red-500 rounded-sm'>\n <h1 className='p-2'>ERROR: {error.message}</h1>\n <pre className='p-2 overflow-y-auto text-sm text-subdued'>{JSON.stringify(data, null, 2)}</pre>\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, {\n type Context,\n Fragment,\n type NamedExoticComponent,\n type RefAttributes,\n Suspense,\n createContext,\n forwardRef,\n memo,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { log } from '@dxos/log';\nimport { useDefaultValue } from '@dxos/react-hooks';\nimport { byPosition } from '@dxos/util';\n\nimport * as Common from '../common';\nimport { type CapabilityManager } from '../core';\n\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { SurfaceInfo } from './SurfaceInfo';\nimport { useCapabilities } from './useCapabilities';\n\nconst DEFAULT_PLACEHOLDER = <Fragment />;\n\nconst DEBUG = import.meta.env.VITE_DEBUG;\n\nexport type SurfaceContext = Pick<Common.SurfaceProps, 'id' | 'role' | 'data'>;\n\n// TODO(burdon): Use @radix-ui/react-context\nconst SurfaceContext: Context<SurfaceContext | undefined> = createContext<SurfaceContext | undefined>(undefined);\n\n/**\n * Wrapper component for rendering Web Component surfaces.\n * Handles creation, prop setting, and cleanup of Web Components.\n */\nconst WebComponentWrapper = memo(\n forwardRef<HTMLElement, Common.SurfaceProps & { definition: Common.WebComponentSurfaceDefinition }>(\n ({ id, role, data, limit, definition, ...rest }, forwardedRef) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const elementRef = useRef<HTMLElement | null>(null);\n const propsRef = useRef({ id, role, data, limit, ...rest });\n\n // Update props ref on every render\n propsRef.current = { id, role, data, limit, ...rest };\n\n // Create element only once\n useEffect(() => {\n if (!containerRef.current || elementRef.current) return;\n\n // Create the Web Component\n const element = document.createElement(definition.tagName);\n elementRef.current = element;\n\n // Set initial properties on the Web Component\n Object.assign(element, propsRef.current);\n\n // Append to container\n containerRef.current.appendChild(element);\n\n // Setup ref forwarding if provided\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n\n // Cleanup on unmount to prevent memory leaks\n return () => {\n if (elementRef.current && containerRef.current?.contains(elementRef.current)) {\n containerRef.current.removeChild(elementRef.current);\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(null);\n } else if (forwardedRef) {\n forwardedRef.current = null;\n }\n elementRef.current = null;\n };\n }, [definition.tagName, forwardedRef]);\n\n // Update props on existing element without recreating it\n // This runs on every render to ensure all props (including those in `rest`) are kept up to date\n useEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n\n // Update properties on the existing Web Component\n Object.assign(element, propsRef.current);\n });\n\n return <div ref={containerRef} />;\n },\n ),\n);\n\nWebComponentWrapper.displayName = 'WebComponentWrapper';\n\n/**\n * Wrapper component that provides context for a surface.\n */\nconst SurfaceContextProvider = memo(\n forwardRef<HTMLElement, Common.SurfaceProps & { definition: Common.SurfaceDefinition }>(\n ({ id, role, data, limit, fallback = DefaultFallback, definition, ...rest }, forwardedRef) => {\n const contextValue = useMemo(() => ({ id, role, data }), [id, role, data]);\n\n // Handle Web Component surfaces\n if (definition.kind === 'web-component') {\n return (\n <ErrorBoundary data={data} fallback={fallback}>\n <SurfaceContext.Provider value={contextValue}>\n <WebComponentWrapper\n id={id}\n role={role}\n data={data}\n limit={limit}\n definition={definition}\n ref={forwardedRef}\n {...rest}\n />\n </SurfaceContext.Provider>\n </ErrorBoundary>\n );\n }\n\n // Handle React component surfaces\n const Component = definition.component;\n\n // TODO(burdon): Remove from production build?\n const debug = DEBUG || '__DX_DEBUG__' in window;\n if (debug) {\n return (\n <ErrorBoundary data={data} fallback={fallback}>\n <div role='none' className='contents' data-id={id} data-role={role}>\n <SurfaceContext.Provider value={contextValue}>\n <SurfaceInfo ref={forwardedRef}>\n <Component id={id} role={role} data={data} limit={limit} {...rest} />\n </SurfaceInfo>\n </SurfaceContext.Provider>\n </div>\n </ErrorBoundary>\n );\n }\n\n return (\n <ErrorBoundary data={data} fallback={fallback}>\n <div role='none' className='contents' data-id={id} data-role={role}>\n <SurfaceContext.Provider value={contextValue}>\n <Component id={id} role={role} data={data} limit={limit} {...rest} ref={forwardedRef} />\n </SurfaceContext.Provider>\n </div>\n </ErrorBoundary>\n );\n },\n ),\n);\n\nSurfaceContextProvider.displayName = 'SurfaceContextProvider';\n\nexport const useSurface = (): SurfaceContext => {\n const context = useContext(SurfaceContext) ?? raise(new Error('Missing SurfaceContext'));\n return context;\n};\n\n/**\n * A surface is a named region of the screen that can be populated by plugins.\n */\nexport const Surface: NamedExoticComponent<Common.SurfaceProps & RefAttributes<HTMLElement>> = memo(\n forwardRef(({ id: _id, role, data: dataProp, limit, placeholder = DEFAULT_PLACEHOLDER, ...rest }, forwardedRef) => {\n const data = useDefaultValue(dataProp, () => ({}));\n\n // TODO(wittjosiah): This will make all surfaces depend on a single signal.\n // This isn't ideal because it means that any change to the data will cause all surfaces to re-render.\n // This effectively means that plugin modules which contribute surfaces need to all be activated at startup.\n // This should be fine for now because it's how it worked prior to capabilities api anyway.\n // In the future, it would be nice to be able to bucket the surface contributions by role.\n const surfaces = useSurfaces();\n\n // NOTE: Memoizing the candidates makes the surface not re-render based on reactivity within data.\n const definitions = findCandidates(surfaces, { role, data });\n const candidates = limit ? definitions.slice(0, limit) : definitions;\n if (DEBUG && candidates.length === 0) {\n log.warn('no candidates for surface', { role, data });\n return null;\n }\n\n return (\n <Suspense fallback={placeholder}>\n {candidates.map((definition) => (\n <SurfaceContextProvider\n key={definition.id}\n id={definition.id}\n role={role}\n data={data}\n limit={limit}\n definition={definition}\n ref={forwardedRef}\n {...rest}\n />\n ))}\n </Suspense>\n );\n }),\n);\n\nSurface.displayName = 'Surface';\n\nconst findCandidates = (\n surfaces: Common.SurfaceDefinition[],\n { role, data }: Pick<Common.SurfaceProps, 'role' | 'data'>,\n) => {\n return Object.values(surfaces)\n .filter((definition) =>\n Array.isArray(definition.role) ? definition.role.includes(role) : definition.role === role,\n )\n .filter(({ filter }) => (filter ? filter(data ?? {}) : true))\n .toSorted(byPosition);\n};\n\n// TODO(burdon): Make user facing, with telemetry.\n// TODO(burdon): Change based on dev/prod mode; infer subject type, id.\nconst DefaultFallback = ({ data, error, dev }: { data: any; error: Error; dev?: boolean }) => {\n if (dev) {\n return (\n <div className='flex flex-col gap-4 p-4 is-full overflow-y-auto'>\n <h1 className='flex gap-2 text-sm mbs-2'>{error.message}</h1>\n <pre className='overflow-auto text-xs text-description'>{JSON.stringify(data, null, 2)}</pre>\n </div>\n );\n }\n\n return (\n <div className='flex flex-col gap-4 p-4 is-full overflow-y-auto border border-roseFill'>\n <h1 className='flex gap-2 text-sm mbs-2 text-rose-500'>{error.message}</h1>\n <pre className='overflow-auto text-xs text-description'>{error.stack}</pre>\n <pre className='overflow-auto text-xs text-description'>{JSON.stringify(data, null, 2)}</pre>\n </div>\n );\n};\n\n/**\n * @internal\n */\nexport const useSurfaces = () => {\n const surfaces = useCapabilities(Common.Capability.ReactSurface);\n return useMemo(() => surfaces.flat(), [surfaces]);\n};\n\n/**\n * @returns `true` if there is a contributed surface which matches the specified role & data, `false` otherwise.\n */\nexport const isSurfaceAvailable = (\n capabilityManager: CapabilityManager.CapabilityManager,\n { role, data }: Pick<Common.SurfaceProps, 'role' | 'data'>,\n) => {\n const surfaces = capabilityManager.getAll(Common.Capability.ReactSurface);\n const candidates = findCandidates(surfaces.flat(), { role, data });\n return candidates.length > 0;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, {\n type ReactElement,\n type Ref,\n cloneElement,\n forwardRef,\n useCallback,\n useLayoutEffect,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { addEventListener, combine } from '@dxos/async';\nimport { useMergeRefs } from '@dxos/react-hooks';\n\nimport { useSurface } from './Surface';\n\nexport type SurfaceInfoProps = {\n children: ReactElement<{ ref?: Ref<HTMLElement> }>;\n};\n\n/**\n * Debug wrapper for surfaces.\n */\nexport const SurfaceInfo = forwardRef<HTMLElement, SurfaceInfoProps>(({ children }, forwardedRef) => {\n const [rect, setRect] = useState<DOMRect | null>(null);\n const [expand, setExpand] = useState(false);\n const info = useSurface();\n\n const [root, setRoot] = useState<HTMLElement | null>(null);\n const measureRef = useCallback((node: HTMLElement | null) => setRoot(node), []);\n const mergedRef = useMergeRefs([measureRef, forwardedRef]);\n const childWithRef = cloneElement(children, { ref: mergedRef });\n\n useLayoutEffect(() => {\n if (!root) {\n setRect(null);\n return;\n }\n\n const measure = () => {\n setRect(root.getBoundingClientRect());\n };\n\n const observer = new ResizeObserver(measure);\n observer.observe(root);\n measure();\n\n return combine(\n addEventListener(window, 'scroll', measure, true),\n addEventListener(window, 'resize', measure),\n () => {\n observer.disconnect();\n },\n );\n }, [root]);\n\n const padding = 0;\n return (\n <>\n {childWithRef}\n {rect &&\n createPortal(\n <div\n role='none'\n className='z-[100] fixed flex flex-col-reverse scrollbar-none overflow-auto pointer-events-none'\n style={{\n top: rect.top + padding,\n left: rect.left + padding,\n width: rect.width - padding * 2,\n height: rect.height - padding * 2,\n }}\n >\n {expand ? (\n <div\n className='absolute inset-0 bg-deckSurface border border-green-500 cursor-pointer pointer-events-auto overflow-auto'\n onPointerDown={(ev) => ev.stopPropagation()}\n onClick={(ev) => {\n ev.stopPropagation();\n setExpand(false);\n }}\n >\n <pre className='p-2 text-xs text-description font-mono'>{JSON.stringify({ info }, null, 2)}</pre>\n </div>\n ) : (\n <span\n className='absolute right-1 bottom-0 flex items-center p-1 text-green-500 opacity-80 hover:opacity-100 text-xl cursor-pointer pointer-events-auto'\n title={info.id}\n onPointerDown={(ev) => ev.stopPropagation()}\n onClick={(ev) => {\n ev.stopPropagation();\n setExpand(true);\n }}\n >\n ⓘ\n </span>\n )}\n </div>,\n // TODO(burdon): Create well-known element to gather all debug portals.\n document.body,\n )}\n </>\n );\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { RegistryContext } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport * as Fiber from 'effect/Fiber';\nimport * as PubSub from 'effect/PubSub';\nimport * as Queue from 'effect/Queue';\nimport React, { type FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\nimport { useAsyncEffect, useDefaultValue } from '@dxos/react-hooks';\nimport { ContextProtocolProvider } from '@dxos/web-context-react';\n\nimport * as Common from '../common';\nimport { PluginManagerContext } from '../context';\nimport { type Plugin, PluginManager } from '../core';\n\nimport { App } from './App';\nimport { DefaultFallback } from './DefaultFallback';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { PluginManagerProvider } from './PluginManagerProvider';\n\nconst ENABLED_KEY = 'dxos.org/app-framework/enabled';\n\nexport type UseAppOptions = {\n pluginManager?: PluginManager.PluginManager;\n pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];\n plugins?: Plugin.Plugin[];\n core?: string[];\n defaults?: string[];\n placeholder?: FC<{ stage: number }>;\n fallback?: ErrorBoundary['props']['fallback'];\n cacheEnabled?: boolean;\n safeMode?: boolean;\n debounce?: number;\n timeout?: number;\n};\n\n/**\n * Expected usage is for this to be the entrypoint of the application.\n * Initializes plugins and renders the root components.\n *\n * @example\n * const plugins = [LayoutPlugin(), MyPlugin()];\n * const core = [LayoutPluginId];\n * const default = [MyPluginId];\n * const fallback = <div>Initializing Plugins...</div>;\n * const App = useApp({ plugins, core, default, fallback });\n * createRoot(document.getElementById('root')!).render(\n * <StrictMode>\n * <App />\n * </StrictMode>,\n * );\n *\n * @param params.pluginLoader A function which loads new plugins.\n * @param params.plugins All plugins available to the application.\n * @param params.core Core plugins which will always be enabled.\n * @param params.defaults Default plugins are enabled by default but can be disabled by the user.\n * @param params.placeholder Placeholder component to render during startup.\n * @param params.fallback Fallback component to render if an error occurs during startup.\n * @param params.cacheEnabled Whether to cache enabled plugins in localStorage.\n * @param params.safeMode Whether to enable safe mode, which disables optional plugins.\n */\nexport const useApp = ({\n pluginManager,\n pluginLoader: pluginLoaderProp,\n plugins: pluginsProp,\n core: coreProp,\n defaults: defaultsProp,\n placeholder,\n fallback = DefaultFallback,\n cacheEnabled = false,\n safeMode = false,\n debounce = 0,\n timeout = 30_000,\n}: UseAppOptions) => {\n const plugins = useDefaultValue(pluginsProp, () => []);\n const core = useDefaultValue(coreProp, () => plugins.map(({ meta }) => meta.id));\n const defaults = useDefaultValue(defaultsProp, () => []);\n\n // TODO(wittjosiah): Provide a custom plugin loader which supports loading via url.\n const pluginLoader = useMemo(\n () =>\n pluginLoaderProp ??\n ((id: string) =>\n Effect.sync(() => {\n const plugin = plugins.find((plugin) => plugin.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n return plugin;\n })),\n [pluginLoaderProp, plugins],\n );\n\n const readyRef = useRef(false);\n const [ready, setReady] = useState(false);\n const errorRef = useRef<unknown>(null);\n const [error, setError] = useState<unknown>(null);\n // TODO(wittjosiah): Migrate to Atom.kvs for isomorphic storage.\n const cached: string[] = useMemo(() => JSON.parse(localStorage.getItem(ENABLED_KEY) ?? '[]'), []);\n const enabled = useMemo(\n () => (safeMode ? [] : cacheEnabled && cached.length > 0 ? cached : defaults),\n [safeMode, cacheEnabled, cached, defaults],\n );\n const manager = useMemo(\n () => pluginManager ?? PluginManager.make({ pluginLoader, plugins, core, enabled }),\n [pluginManager, pluginLoader, plugins, core, enabled],\n );\n\n useEffect(() => {\n if (!cacheEnabled) {\n return;\n }\n return manager.registry.subscribe(manager.enabled, (value) => {\n localStorage.setItem(ENABLED_KEY, JSON.stringify(value));\n });\n }, [cacheEnabled, manager]);\n\n useEffect(() => {\n setupDevtools(manager);\n }, [manager]);\n\n useAsyncEffect(async () => {\n manager.capabilities.contribute({\n interface: Common.Capability.PluginManager,\n implementation: manager,\n module: 'dxos.org/app-framework/plugin-manager',\n });\n\n manager.capabilities.contribute({\n interface: Common.Capability.AtomRegistry,\n implementation: manager.registry,\n module: 'dxos.org/app-framework/atom-registry',\n });\n\n const fiber = Effect.gen(function* () {\n const queue = yield* PubSub.subscribe(manager.activation);\n const listener = yield* Effect.forkDaemon(\n Queue.take(queue).pipe(\n Effect.tap(({ event, state, error: error$ }) =>\n Effect.sync(() => {\n if (event === Common.ActivationEvent.Startup.id && state === 'activated') {\n clearTimeout(timeoutId);\n setReady(true);\n readyRef.current = true;\n }\n if (error$ && !readyRef.current) {\n setError(error$);\n errorRef.current = error$;\n }\n }),\n ),\n Effect.forever,\n ),\n );\n\n yield* Effect.all([\n manager.activate(Common.ActivationEvent.SetupSettings),\n manager.activate(Common.ActivationEvent.SetupReactSurface),\n manager.activate(Common.ActivationEvent.Startup),\n ]);\n\n return yield* Fiber.join(listener);\n }).pipe(Effect.scoped, Effect.runFork);\n\n // Set up a timeout for startup.\n const timeoutId = setTimeout(() => {\n if (!readyRef.current && !errorRef.current) {\n log.warn('startup timeout diagnostic', {\n eventsFired: manager.getEventsFired(),\n activeModules: manager.getActive(),\n pendingReset: manager.getPendingReset(),\n });\n void runAndForwardErrors(Fiber.interrupt(fiber));\n setError(new Error(`Startup timed out after ${timeout}ms`));\n }\n }, timeout);\n\n return () => {\n clearTimeout(timeoutId);\n void runAndForwardErrors(Fiber.interrupt(fiber));\n manager.capabilities.remove(Common.Capability.PluginManager, manager);\n manager.capabilities.remove(Common.Capability.AtomRegistry, manager.registry);\n };\n }, [manager]);\n\n return useCallback(\n () => (\n <ErrorBoundary fallback={fallback}>\n <PluginManagerProvider value={manager}>\n <ContextProtocolProvider value={manager} context={PluginManagerContext}>\n <RegistryContext.Provider value={manager.registry}>\n <App placeholder={placeholder} ready={ready} error={error} debounce={debounce} />\n </RegistryContext.Provider>\n </ContextProtocolProvider>\n </PluginManagerProvider>\n </ErrorBoundary>\n ),\n [fallback, manager, placeholder, ready, error],\n );\n};\n\nconst setupDevtools = (manager: PluginManager.PluginManager) => {\n (globalThis as any).composer ??= {};\n (globalThis as any).composer.manager = manager;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type PropsWithChildren } from 'react';\n\nimport * as Common from '../common';\nimport { topologicalSort } from '../helpers';\n\nimport { type UseAppOptions } from './useApp';\nimport { useCapabilities } from './useCapabilities';\nimport { LoadingState, useLoading } from './useLoading';\n\nexport type AppProps = Pick<UseAppOptions, 'placeholder' | 'debounce'> & {\n ready: boolean;\n error: unknown;\n};\n\nexport const App = ({ placeholder: Placeholder, ready, error, debounce }: AppProps) => {\n const reactContexts = useCapabilities(Common.Capability.ReactContext);\n const reactRoots = useCapabilities(Common.Capability.ReactRoot);\n const stage = useLoading(ready, debounce);\n\n if (error) {\n // This triggers the error boundary to provide UI feedback for the startup error.\n throw error;\n }\n\n // TODO(wittjosiah): Consider using Suspense instead.\n if (stage < LoadingState.Done) {\n if (!Placeholder) {\n return null;\n }\n\n return <Placeholder stage={stage} />;\n }\n\n const ComposedContext = composeContexts(reactContexts);\n return (\n <ComposedContext>\n {reactRoots.map(({ id, root: Component }) => (\n <Component key={id} />\n ))}\n </ComposedContext>\n );\n};\n\nconst composeContexts = (contexts: Common.Capability.ReactContext[]) => {\n if (contexts.length === 0) {\n return ({ children }: PropsWithChildren) => <>{children}</>;\n }\n\n return topologicalSort(contexts)\n .map(({ context }) => context)\n .reduce((Acc, Next) => ({ children }) => (\n <Acc>\n <Next>{children}</Next>\n </Acc>\n ));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\ntype DependencyNode = {\n id: string;\n dependsOn?: string[];\n};\n\n/**\n * Topologically sorts a list of nodes based on their dependencies.\n */\n// TODO(wittjosiah): Factor out?\nexport const topologicalSort = <T extends DependencyNode>(nodes: T[]): T[] => {\n const getDependencies = (nodeId: string, seen = new Set<string>(), path = new Set<string>()): string[] => {\n if (path.has(nodeId)) {\n throw new Error(`Circular dependency detected involving ${nodeId}`);\n }\n if (seen.has(nodeId)) {\n return [];\n }\n\n const node = nodes.find((n) => n.id === nodeId);\n if (!node) {\n throw new Error(`Node ${nodeId} not found but is listed as a dependency`);\n }\n\n const newPath = new Set([...path, nodeId]);\n const newSeen = new Set([...seen, nodeId]);\n\n const dependsOn = node.dependsOn ?? [];\n return [...dependsOn.flatMap((depId) => getDependencies(depId, newSeen, newPath)), nodeId];\n };\n\n // Get all unique dependencies.\n const allDependencies = nodes\n .map((node) => node.id)\n .flatMap((id) => getDependencies(id))\n .filter((id, index, self) => self.indexOf(id) === index);\n\n // Map back to original nodes\n return allDependencies\n .map((id) => nodes.find((node) => node.id === id))\n .filter((node): node is T => node !== undefined);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nexport enum LoadingState {\n Loading = 0,\n FadeIn = 1,\n FadeOut = 2,\n Done = 3,\n}\n\n/**\n * To avoid \"flashing\" the placeholder, we wait a period of time before starting the loading animation.\n * If loading completes during this time the placehoder is not shown, otherwise is it displayed for a minimum period of time.\n *\n * States:\n * 0: Loading - Wait for a period of time before starting the loading animation.\n * 1: Fade-in - Display a loading animation.\n * 2: Fade-out - Fade out the loading animation.\n * 3: Done - Remove the placeholder.\n */\nexport const useLoading = (ready: boolean, debounce = 0) => {\n const [stage, setStage] = useState<LoadingState>(LoadingState.Loading);\n useEffect(() => {\n if (!debounce) {\n return;\n }\n\n const i = setInterval(() => {\n setStage((stage) => {\n switch (stage) {\n case LoadingState.Loading: {\n if (!ready) {\n return LoadingState.FadeIn;\n } else {\n clearInterval(i);\n return LoadingState.Done;\n }\n }\n\n case LoadingState.FadeIn: {\n if (ready) {\n return LoadingState.FadeOut;\n }\n break;\n }\n\n case LoadingState.FadeOut: {\n clearInterval(i);\n return LoadingState.Done;\n }\n }\n\n return stage;\n });\n }, debounce);\n\n return () => clearInterval(i);\n }, [debounce]);\n\n if (!debounce) {\n return ready ? LoadingState.Done : LoadingState.Loading;\n }\n\n return stage;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\n/**\n * NOTE: Default fallback should not use tailwind or theme.\n */\nexport const DefaultFallback = ({ error }: { error: Error }) => {\n return (\n <div\n style={{\n margin: '1rem',\n padding: '1rem',\n overflow: 'hidden',\n border: '4px solid teal',\n borderRadius: '1rem',\n }}\n >\n {/* TODO(wittjosiah): Link to docs for replacing default. */}\n <h1 style={{ margin: '0.5rem 0', fontSize: '1.2rem' }}>ERROR: {error.message}</h1>\n <pre style={{ overflow: 'auto', fontSize: '1rem', whiteSpace: 'pre-wrap', color: '#888888' }}>{error.stack}</pre>\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport * as Common from '../common';\nimport { usePluginManager } from '../react';\n\n/**\n * Hook to dynamically register an operation resolver (handler) within a React component.\n * The resolver is added when the component mounts and removed when it unmounts.\n *\n * @example\n * ```tsx\n * const scrollHandler = useMemo(() => OperationResolver.make({\n * operation: LayoutOperation.ScrollIntoView,\n * handler: (input) => Effect.sync(() => {\n * // Handle scroll\n * }),\n * }), [deps]);\n *\n * useOperationResolver(meta.id, scrollHandler);\n * ```\n */\nexport const useOperationResolver = (module: string, resolver: Common.Capability.OperationResolver) => {\n const manager = usePluginManager();\n // Wrap single resolver in array as the capability expects an array.\n const resolverArray = useMemo(() => [resolver], [resolver]);\n\n useEffect(() => {\n manager.capabilities.contribute({\n module,\n interface: Common.Capability.OperationResolver,\n implementation: resolverArray,\n });\n\n return () => manager.capabilities.remove(Common.Capability.OperationResolver, resolverArray);\n }, [module, resolverArray]);\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,SAAoBA,iBAAiBC,gBAAAA,qBAAoB;AACzD,SAASC,eAAAA,cAAaC,cAAAA,mBAAkB;;;ACDxC,SAAoBC,oBAAoB;AACxC,SAASC,mBAAmB;AAE5B,SAASC,iBAAiB;;;ACH1B,SAASC,eAAeC,kBAAkB;AAE1C,SAASC,aAAa;AAItB,IAAMC,wBAAuBC,cAAuDC,MAAAA;AAK7E,IAAMC,mBAAmB,MAC9BC,WAAWJ,qBAAAA,KAAyBK,MAAM,IAAIC,MAAM,8BAAA,CAAA;AAK/C,IAAMC,wBAAwBP,sBAAqBQ;;;;ADHnD,IAAMC,kBAAkB,CAAIC,iBAAAA;AACjC,QAAMC,UAAUC,iBAAAA;AAChB,SAAOC,aAAaF,QAAQG,aAAaC,KAAKL,YAAAA,CAAAA;AAChD;AAOO,IAAMM,gBAAgB,CAAIN,iBAAAA;AAC/B,QAAMI,eAAeL,gBAAgBC,YAAAA;AACrCO,YAAUH,aAAaI,SAAS,GAAG,2BAA2BR,aAAaS,UAAU,IAAE;;;;;;;;;AACvF,SAAOL,aAAa,CAAA;AACtB;AAOO,IAAMM,oBAAoB,CAAIC,mBAAAA;AACnC,QAAMN,OAAOC,cAAcK,cAAAA;AAC3B,SAAOR,aAAaE,IAAAA;AACtB;AAOO,IAAMO,yBAAyB,CACpCD,mBAAAA;AAEA,QAAME,WAAWP,cAAqBQ,WAAWC,YAAY;AAC7D,QAAMV,OAAOC,cAAcK,cAAAA;AAC3B,QAAMK,QAAQb,aAAaE,IAAAA;AAC3B,QAAMY,SAASC,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,OAAczC,WAAWG,cAAcjB,QAAQI,QAAQ;IAC9E;EACF,GAAG;IAACJ;GAAQ;AAEZ,SAAOwD,aACL,MACE,gBAAAC,OAAA,cAACC,eAAAA;IAAcxF;KACb,gBAAAuF,OAAA,cAACE,uBAAAA;IAAsBrD,OAAON;KAC5B,gBAAAyD,OAAA,cAACG,yBAAAA;IAAwBtD,OAAON;IAAS6D,SAASC;KAChD,gBAAAL,OAAA,cAACM,iBAAgBC,UAAQ;IAAC1D,OAAON,QAAQI;KACvC,gBAAAqD,OAAA,cAACQ,KAAAA;IAAIhG;IAA0BkB;IAAcI;IAAcjB;UAMrE;IAACJ;IAAU8B;IAAS/B;IAAakB;IAAOI;GAAM;AAElD;AAEA,IAAMkB,gBAAgB,CAACT,YAAAA;AACpBkE,aAAmBC,aAAa,CAAC;AACjCD,aAAmBC,SAASnE,UAAUA;AACzC;;;AK5MA,SAASoE,aAAAA,YAAWC,WAAAA,gBAAe;AAqB5B,IAAMC,uBAAuB,CAACC,QAAgBC,aAAAA;AACnD,QAAMC,UAAUC,iBAAAA;AAEhB,QAAMC,gBAAgBC,SAAQ,MAAM;IAACJ;KAAW;IAACA;GAAS;AAE1DK,EAAAA,WAAU,MAAA;AACRJ,YAAQK,aAAaC,WAAW;MAC9BR;MACAS,WAAkBC,WAAWC;MAC7BC,gBAAgBR;IAClB,CAAA;AAEA,WAAO,MAAMF,QAAQK,aAAaM,OAAcH,WAAWC,mBAAmBP,aAAAA;EAChF,GAAG;IAACJ;IAAQI;GAAc;AAC5B;",
|
|
6
|
-
"names": ["RegistryContext", "useAtomValue", "useCallback", "useContext", "useAtomValue", "useCallback", "invariant", "createContext", "useContext", "raise", "PluginManagerContext", "createContext", "undefined", "usePluginManager", "useContext", "raise", "Error", "PluginManagerProvider", "Provider", "useCapabilities", "interfaceDef", "manager", "usePluginManager", "useAtomValue", "capabilities", "atom", "useCapability", "invariant", "length", "identifier", "useAtomCapability", "atomCapability", "useAtomCapabilityState", "registry", "Capability", "AtomRegistry", "value", "update", "useCallback", "fn", "set", "get", "useOperationInvoker", "useCapability", "Capability", "OperationInvoker", "useAppGraph", "AppGraph", "useLayout", "useAtomCapability", "Layout", "useSettingsState", "atom", "registry", "useContext", "RegistryContext", "settings", "useAtomValue", "updateSettings", "useCallback", "fn", "set", "get", "React", "Component", "ErrorBoundary", "Component", "getDerivedStateFromError", "error", "state", "undefined", "componentDidUpdate", "prevProps", "data", "props", "resetError", "render", "Fallback", "fallback", "DefaultFallback", "children", "setState", "div", "className", "h1", "message", "pre", "JSON", "stringify", "React", "Fragment", "Suspense", "createContext", "forwardRef", "memo", "useContext", "useEffect", "useMemo", "useRef", "raise", "log", "useDefaultValue", "byPosition", "React", "cloneElement", "forwardRef", "useCallback", "useLayoutEffect", "useState", "createPortal", "addEventListener", "combine", "useMergeRefs", "SurfaceInfo", "forwardRef", "children", "forwardedRef", "rect", "setRect", "useState", "expand", "setExpand", "info", "useSurface", "root", "setRoot", "measureRef", "useCallback", "node", "mergedRef", "useMergeRefs", "childWithRef", "cloneElement", "ref", "useLayoutEffect", "measure", "getBoundingClientRect", "observer", "ResizeObserver", "observe", "combine", "addEventListener", "window", "disconnect", "padding", "React", "createPortal", "div", "role", "className", "style", "top", "left", "width", "height", "onPointerDown", "ev", "stopPropagation", "onClick", "pre", "JSON", "stringify", "span", "title", "id", "document", "body", "DEFAULT_PLACEHOLDER", "React", "Fragment", "DEBUG", "env", "VITE_DEBUG", "SurfaceContext", "createContext", "undefined", "WebComponentWrapper", "memo", "forwardRef", "id", "role", "data", "limit", "definition", "rest", "forwardedRef", "containerRef", "useRef", "elementRef", "propsRef", "current", "useEffect", "element", "document", "createElement", "tagName", "Object", "assign", "appendChild", "contains", "removeChild", "div", "ref", "displayName", "SurfaceContextProvider", "fallback", "DefaultFallback", "contextValue", "useMemo", "kind", "ErrorBoundary", "Provider", "value", "Component", "component", "debug", "window", "className", "data-id", "data-role", "SurfaceInfo", "useSurface", "context", "useContext", "raise", "Error", "Surface", "_id", "dataProp", "placeholder", "useDefaultValue", "surfaces", "useSurfaces", "definitions", "findCandidates", "candidates", "slice", "length", "log", "warn", "Suspense", "map", "key", "values", "filter", "Array", "isArray", "includes", "toSorted", "byPosition", "error", "dev", "h1", "message", "pre", "JSON", "stringify", "stack", "useCapabilities", "Capability", "ReactSurface", "flat", "isSurfaceAvailable", "capabilityManager", "getAll", "RegistryContext", "Effect", "Fiber", "PubSub", "Queue", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "runAndForwardErrors", "invariant", "log", "useAsyncEffect", "useDefaultValue", "ContextProtocolProvider", "React", "topologicalSort", "nodes", "getDependencies", "nodeId", "seen", "Set", "path", "has", "Error", "node", "find", "n", "id", "newPath", "newSeen", "dependsOn", "flatMap", "depId", "allDependencies", "map", "filter", "index", "self", "indexOf", "undefined", "useEffect", "useState", "LoadingState", "useLoading", "ready", "debounce", "stage", "setStage", "useState", "useEffect", "i", "setInterval", "clearInterval", "App", "placeholder", "Placeholder", "ready", "error", "debounce", "reactContexts", "useCapabilities", "Capability", "ReactContext", "reactRoots", "ReactRoot", "stage", "useLoading", "LoadingState", "Done", "React", "ComposedContext", "composeContexts", "map", "id", "root", "Component", "key", "contexts", "length", "children", "topologicalSort", "context", "reduce", "Acc", "Next", "React", "DefaultFallback", "error", "React", "div", "style", "margin", "padding", "overflow", "border", "borderRadius", "h1", "fontSize", "message", "pre", "whiteSpace", "color", "stack", "ENABLED_KEY", "useApp", "pluginManager", "pluginLoader", "pluginLoaderProp", "plugins", "pluginsProp", "core", "coreProp", "defaults", "defaultsProp", "placeholder", "fallback", "DefaultFallback", "cacheEnabled", "safeMode", "debounce", "timeout", "useDefaultValue", "map", "meta", "id", "useMemo", "sync", "plugin", "find", "invariant", "readyRef", "useRef", "ready", "setReady", "useState", "errorRef", "error", "setError", "cached", "JSON", "parse", "localStorage", "getItem", "enabled", "length", "manager", "PluginManager", "make", "useEffect", "registry", "subscribe", "value", "setItem", "stringify", "setupDevtools", "useAsyncEffect", "capabilities", "contribute", "interface", "Capability", "implementation", "module", "AtomRegistry", "fiber", "gen", "queue", "activation", "listener", "forkDaemon", "take", "pipe", "tap", "event", "state", "error$", "ActivationEvent", "Startup", "clearTimeout", "timeoutId", "current", "forever", "all", "activate", "SetupSettings", "SetupReactSurface", "join", "scoped", "runFork", "setTimeout", "log", "warn", "eventsFired", "getEventsFired", "activeModules", "getActive", "pendingReset", "getPendingReset", "runAndForwardErrors", "interrupt", "Error", "remove", "useCallback", "React", "ErrorBoundary", "PluginManagerProvider", "ContextProtocolProvider", "context", "PluginManagerContext", "RegistryContext", "Provider", "App", "globalThis", "composer", "useEffect", "useMemo", "useOperationResolver", "module", "resolver", "manager", "usePluginManager", "resolverArray", "useMemo", "useEffect", "capabilities", "contribute", "interface", "Capability", "OperationResolver", "implementation", "remove"]
|
|
7
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ActivationEvent,
|
|
3
|
-
Capability,
|
|
4
|
-
CollaborationOperation,
|
|
5
|
-
FileInfoSchema,
|
|
6
|
-
Label,
|
|
7
|
-
LayoutOperation,
|
|
8
|
-
Plugin,
|
|
9
|
-
Resource,
|
|
10
|
-
ResourceKey,
|
|
11
|
-
ResourceLanguage,
|
|
12
|
-
UndoOperation,
|
|
13
|
-
createSurface,
|
|
14
|
-
createWebSurface,
|
|
15
|
-
defaultFileTypes
|
|
16
|
-
} from "../chunk-BLQJSGL3.mjs";
|
|
17
|
-
import "../chunk-FMZN33N4.mjs";
|
|
18
|
-
import "../chunk-PKQT6C53.mjs";
|
|
19
|
-
import "../chunk-TCLLRCS3.mjs";
|
|
20
|
-
import "../chunk-6Y7PZV72.mjs";
|
|
21
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
22
|
-
export {
|
|
23
|
-
ActivationEvent,
|
|
24
|
-
Capability,
|
|
25
|
-
CollaborationOperation,
|
|
26
|
-
FileInfoSchema,
|
|
27
|
-
Label,
|
|
28
|
-
LayoutOperation,
|
|
29
|
-
Plugin,
|
|
30
|
-
Resource,
|
|
31
|
-
ResourceKey,
|
|
32
|
-
ResourceLanguage,
|
|
33
|
-
UndoOperation,
|
|
34
|
-
createSurface,
|
|
35
|
-
createWebSurface,
|
|
36
|
-
defaultFileTypes
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugin-operation/invoker-capability.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { OperationInvoker } from '@dxos/operation';\n\nimport * as Common from '../common';\nimport { Capability, Plugin } from '../core';\n\n//\n// Capability Module\n//\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n // Get the services for synchronous access in callbacks.\n const capabilityManager = yield* Capability.Service;\n const pluginManager = yield* Plugin.Service;\n\n // Get the ManagedRuntime capability (should be available since we activate after ManagedRuntimeReady).\n const managedRuntimes = yield* Capability.getAll(Common.Capability.ManagedRuntime);\n const managedRuntime = managedRuntimes.length > 0 ? managedRuntimes[0] : undefined;\n\n const invoker = OperationInvoker.make(\n () =>\n Effect.gen(function* () {\n yield* Plugin.activate(Common.ActivationEvent.SetupOperationResolver);\n return (yield* Capability.getAll(Common.Capability.OperationResolver)).flat();\n }).pipe(\n Effect.provideService(Capability.Service, capabilityManager),\n Effect.provideService(Plugin.Service, pluginManager),\n ),\n managedRuntime,\n );\n\n return Capability.contributes(Common.Capability.OperationInvoker, invoker);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,wBAAwB;AASjC,IAAA,6BAAeC,mBAAWC,WACjBC,kBAAW,aAAA;AAEhB,QAAMC,oBAAoB,OAAOH,mBAAWI;AAC5C,QAAMC,gBAAgB,OAAOC,eAAOF;AAGpC,QAAMG,kBAAkB,OAAOP,mBAAWQ,OAAcR,WAAWS,cAAc;AACjF,QAAMC,iBAAiBH,gBAAgBI,SAAS,IAAIJ,gBAAgB,CAAA,IAAKK;AAEzE,QAAMC,UAAUC,iBAAiBC,KAC/B,MACSC,WAAI,aAAA;AACT,WAAOV,eAAOW,SAAgBC,gBAAgBC,sBAAsB;AACpE,YAAQ,OAAOnB,mBAAWQ,OAAcR,WAAWoB,iBAAiB,GAAGC,KAAI;EAC7E,CAAA,EAAGC,KACMC,sBAAevB,mBAAWI,SAASD,iBAAAA,GACnCoB,sBAAejB,eAAOF,SAASC,aAAAA,CAAAA,GAE1CK,cAAAA;AAGF,SAAOV,mBAAWwB,YAAmBxB,WAAWc,kBAAkBD,OAAAA;AACpE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "OperationInvoker", "Capability", "makeModule", "fnUntraced", "capabilityManager", "Service", "pluginManager", "Plugin", "managedRuntimes", "getAll", "ManagedRuntime", "managedRuntime", "length", "undefined", "invoker", "OperationInvoker", "make", "gen", "activate", "ActivationEvent", "SetupOperationResolver", "OperationResolver", "flat", "pipe", "provideService", "contributes"]
|
|
7
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SETTINGS_ID,
|
|
3
|
-
SETTINGS_KEY,
|
|
4
|
-
SettingsOperation
|
|
5
|
-
} from "./chunk-H4WPA7U7.mjs";
|
|
6
|
-
import {
|
|
7
|
-
Capability,
|
|
8
|
-
LayoutOperation
|
|
9
|
-
} from "./chunk-BLQJSGL3.mjs";
|
|
10
|
-
import "./chunk-FMZN33N4.mjs";
|
|
11
|
-
import "./chunk-PKQT6C53.mjs";
|
|
12
|
-
import "./chunk-TCLLRCS3.mjs";
|
|
13
|
-
import {
|
|
14
|
-
capability_exports
|
|
15
|
-
} from "./chunk-6Y7PZV72.mjs";
|
|
16
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
17
|
-
|
|
18
|
-
// src/plugin-settings/operation-resolver.ts
|
|
19
|
-
import * as Effect from "effect/Effect";
|
|
20
|
-
import { OperationResolver } from "@dxos/operation";
|
|
21
|
-
var operation_resolver_default = capability_exports.makeModule(Effect.fnUntraced(function* () {
|
|
22
|
-
return capability_exports.contributes(Capability.OperationResolver, [
|
|
23
|
-
//
|
|
24
|
-
// Open Settings
|
|
25
|
-
//
|
|
26
|
-
OperationResolver.make({
|
|
27
|
-
operation: SettingsOperation.Open,
|
|
28
|
-
handler: (input) => Effect.gen(function* () {
|
|
29
|
-
const { invoke } = yield* capability_exports.get(Capability.OperationInvoker);
|
|
30
|
-
yield* invoke(LayoutOperation.SwitchWorkspace, {
|
|
31
|
-
subject: SETTINGS_ID
|
|
32
|
-
});
|
|
33
|
-
if (input.plugin) {
|
|
34
|
-
yield* Effect.fork(invoke(LayoutOperation.Open, {
|
|
35
|
-
subject: [
|
|
36
|
-
`${SETTINGS_KEY}:${input.plugin.replaceAll("/", ":")}`
|
|
37
|
-
]
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
}),
|
|
42
|
-
//
|
|
43
|
-
// Open Plugin Registry
|
|
44
|
-
//
|
|
45
|
-
OperationResolver.make({
|
|
46
|
-
operation: SettingsOperation.OpenPluginRegistry,
|
|
47
|
-
handler: () => Effect.gen(function* () {
|
|
48
|
-
const { invoke } = yield* capability_exports.get(Capability.OperationInvoker);
|
|
49
|
-
yield* invoke(LayoutOperation.SwitchWorkspace, {
|
|
50
|
-
subject: SETTINGS_ID
|
|
51
|
-
});
|
|
52
|
-
yield* Effect.fork(invoke(LayoutOperation.Open, {
|
|
53
|
-
subject: [
|
|
54
|
-
`${SETTINGS_KEY}:plugins`
|
|
55
|
-
]
|
|
56
|
-
}));
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
]);
|
|
60
|
-
}));
|
|
61
|
-
export {
|
|
62
|
-
operation_resolver_default as default
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=operation-resolver-6MP2MYOY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugin-settings/operation-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { OperationResolver } from '@dxos/operation';\n\nimport * as Common from '../common';\nimport { Capability } from '../core';\n\nimport { SETTINGS_ID, SETTINGS_KEY, SettingsOperation } from './actions';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Common.Capability.OperationResolver, [\n //\n // Open Settings\n //\n OperationResolver.make({\n operation: SettingsOperation.Open,\n handler: (input) =>\n Effect.gen(function* () {\n const { invoke } = yield* Capability.get(Common.Capability.OperationInvoker);\n yield* invoke(Common.LayoutOperation.SwitchWorkspace, { subject: SETTINGS_ID });\n if (input.plugin) {\n // Fire and forget the open operation.\n yield* Effect.fork(\n invoke(Common.LayoutOperation.Open, {\n subject: [`${SETTINGS_KEY}:${input.plugin.replaceAll('/', ':')}`],\n }),\n );\n }\n }),\n }),\n\n //\n // Open Plugin Registry\n //\n OperationResolver.make({\n operation: SettingsOperation.OpenPluginRegistry,\n handler: () =>\n Effect.gen(function* () {\n const { invoke } = yield* Capability.get(Common.Capability.OperationInvoker);\n yield* invoke(Common.LayoutOperation.SwitchWorkspace, { subject: SETTINGS_ID });\n yield* Effect.fork(\n invoke(Common.LayoutOperation.Open, {\n subject: [`${SETTINGS_KEY}:plugins`],\n }),\n );\n }),\n }),\n ]);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,yBAAyB;AAOlC,IAAA,6BAAeC,mBAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,mBAAWG,YAAmBH,WAAWI,mBAAmB;;;;IAIjEA,kBAAkBC,KAAK;MACrBC,WAAWC,kBAAkBC;MAC7BC,SAAS,CAACC,UACDC,WAAI,aAAA;AACT,cAAM,EAAEC,OAAM,IAAK,OAAOZ,mBAAWa,IAAWb,WAAWc,gBAAgB;AAC3E,eAAOF,OAAcG,gBAAgBC,iBAAiB;UAAEC,SAASC;QAAY,CAAA;AAC7E,YAAIR,MAAMS,QAAQ;AAEhB,iBAAcC,YACZR,OAAcG,gBAAgBP,MAAM;YAClCS,SAAS;cAAC,GAAGI,YAAAA,IAAgBX,MAAMS,OAAOG,WAAW,KAAK,GAAA,CAAA;;UAC5D,CAAA,CAAA;QAEJ;MACF,CAAA;IACJ,CAAA;;;;IAKAlB,kBAAkBC,KAAK;MACrBC,WAAWC,kBAAkBgB;MAC7Bd,SAAS,MACAE,WAAI,aAAA;AACT,cAAM,EAAEC,OAAM,IAAK,OAAOZ,mBAAWa,IAAWb,WAAWc,gBAAgB;AAC3E,eAAOF,OAAcG,gBAAgBC,iBAAiB;UAAEC,SAASC;QAAY,CAAA;AAC7E,eAAcE,YACZR,OAAcG,gBAAgBP,MAAM;UAClCS,SAAS;YAAC,GAAGI,YAAAA;;QACf,CAAA,CAAA;MAEJ,CAAA;IACJ,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "OperationResolver", "Capability", "makeModule", "fnUntraced", "contributes", "OperationResolver", "make", "operation", "SettingsOperation", "Open", "handler", "input", "gen", "invoke", "get", "OperationInvoker", "LayoutOperation", "SwitchWorkspace", "subject", "SETTINGS_ID", "plugin", "fork", "SETTINGS_KEY", "replaceAll", "OpenPluginRegistry"]
|
|
7
|
-
}
|