@dxos/app-framework 0.3.10-main.a21ec31 → 0.3.10-main.dcfebef
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/index.mjs +166 -19
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +189 -47
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/plugins/PluginHost/PluginContext.d.ts +1 -8
- package/dist/types/src/plugins/PluginHost/PluginContext.d.ts.map +1 -1
- package/dist/types/src/plugins/PluginHost/PluginHost.d.ts.map +1 -1
- package/dist/types/src/plugins/PluginHost/plugin.d.ts +8 -0
- package/dist/types/src/plugins/PluginHost/plugin.d.ts.map +1 -1
- package/dist/types/src/plugins/common/index.d.ts +1 -0
- package/dist/types/src/plugins/common/index.d.ts.map +1 -1
- package/dist/types/src/plugins/common/layout.d.ts +7 -5
- package/dist/types/src/plugins/common/layout.d.ts.map +1 -1
- package/dist/types/src/plugins/common/settings.d.ts +8 -0
- package/dist/types/src/plugins/common/settings.d.ts.map +1 -0
- package/dist/types/src/plugins/components/SettingsDialog.d.ts +2 -0
- package/dist/types/src/plugins/components/SettingsDialog.d.ts.map +1 -0
- package/dist/types/src/plugins/components/SettingsValue.d.ts +8 -0
- package/dist/types/src/plugins/components/SettingsValue.d.ts.map +1 -0
- package/dist/types/src/plugins/components/ShortcutsDialog.d.ts +2 -0
- package/dist/types/src/plugins/components/ShortcutsDialog.d.ts.map +1 -0
- package/dist/types/src/plugins/components/index.d.ts +4 -0
- package/dist/types/src/plugins/components/index.d.ts.map +1 -0
- package/dist/types/src/plugins/index.d.ts +1 -0
- package/dist/types/src/plugins/index.d.ts.map +1 -1
- package/package.json +15 -9
- package/src/plugins/PluginHost/PluginContext.tsx +2 -11
- package/src/plugins/PluginHost/PluginHost.tsx +6 -5
- package/src/plugins/PluginHost/plugin.ts +5 -0
- package/src/plugins/common/index.ts +1 -0
- package/src/plugins/common/layout.ts +7 -3
- package/src/plugins/common/settings.ts +16 -0
- package/src/plugins/components/SettingsDialog.tsx +100 -0
- package/src/plugins/components/SettingsValue.tsx +36 -0
- package/src/plugins/components/ShortcutsDialog.tsx +61 -0
- package/src/plugins/components/index.ts +7 -0
- package/src/plugins/index.ts +1 -0
- package/tsconfig.json +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytes":2197,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytes":7754,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytes":2058,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3465,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":748,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/graph.ts","kind":"import-statement","original":"./graph"},{"path":"packages/sdk/app-framework/src/plugins/common/layout.ts","kind":"import-statement","original":"./layout"},{"path":"packages/sdk/app-framework/src/plugins/common/metadata.ts","kind":"import-statement","original":"./metadata"},{"path":"packages/sdk/app-framework/src/plugins/common/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytes":4017,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts":{"bytes":1706,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytes":1874,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytes":1616,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytes":678,"imports":[{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts","kind":"import-statement","original":"./intent"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts":{"bytes":5143,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytes":4312,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx":{"bytes":18413,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytes":678,"imports":[{"path":"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx","kind":"import-statement","original":"./PluginHost"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts":{"bytes":1765,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytes":1954,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytes":4120,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytes":2747,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytes":13254,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts":{"bytes":881,"imports":[{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx","kind":"import-statement","original":"./Surface"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/index.ts":{"bytes":854,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts","kind":"import-statement","original":"./IntentPlugin"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/index.ts","kind":"import-statement","original":"./PluginHost"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts","kind":"import-statement","original":"./SurfacePlugin"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytes":690,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytes":698,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytes":4010,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytes":7167,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/App.tsx":{"bytes":6903,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/index.ts","kind":"import-statement","original":"./plugins"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts","kind":"import-statement","original":"./plugins/IntentPlugin/meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts","kind":"import-statement","original":"./plugins/SurfacePlugin/meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx","kind":"dynamic-import","original":"./plugins/SurfacePlugin/plugin"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx","kind":"dynamic-import","original":"./plugins/IntentPlugin/plugin"}],"format":"esm"},"packages/sdk/app-framework/src/index.ts":{"bytes":544,"imports":[{"path":"packages/sdk/app-framework/src/plugins/index.ts","kind":"import-statement","original":"./plugins"},{"path":"packages/sdk/app-framework/src/App.tsx","kind":"import-statement","original":"./App"}],"format":"esm"}},"outputs":{"packages/sdk/app-framework/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":36579},"packages/sdk/app-framework/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs","kind":"dynamic-import"}],"exports":["ErrorBoundary","IntentProvider","Layout","LayoutAction","Plugin","PluginHost","PluginProvider","Resource","ResourceKey","ResourceLanguage","Surface","SurfaceProvider","createApp","filterPlugins","findPlugin","getPlugin","initializePlugin","isObject","parseGraphBuilderPlugin","parseGraphPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parsePluginHost","parseRootSurfacePlugin","parseSurfacePlugin","parseTranslationsPlugin","pluginMeta","resolvePlugin","useIntent","usePlugin","usePlugins","useResolvePlugin","useSurface"],"entryPoint":"packages/sdk/app-framework/src/index.ts","inputs":{"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytesInOutput":174},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytesInOutput":1724},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytesInOutput":357},"packages/sdk/app-framework/src/plugins/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts":{"bytesInOutput":241},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytesInOutput":545},"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx":{"bytesInOutput":4479},"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts":{"bytesInOutput":61},"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytesInOutput":676},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytesInOutput":2673},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1151}},"bytes":14096},"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2039},"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx","inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytesInOutput":680}},"bytes":985},"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3064},"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["SurfaceProvider","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","useSurface"],"inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytesInOutput":235},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytesInOutput":87}},"bytes":879},"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3442},"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx","inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytesInOutput":1348}},"bytes":1672},"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2163},"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","useIntent"],"inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytesInOutput":184},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytesInOutput":231},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytesInOutput":84}},"bytes":857},"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2110},"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs":{"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":525}},"bytes":695}}}
|
|
1
|
+
{"inputs":{"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytes":2197,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytes":8569,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytes":2058,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/settings.ts":{"bytes":944,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3465,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":836,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/graph.ts","kind":"import-statement","original":"./graph"},{"path":"packages/sdk/app-framework/src/plugins/common/layout.ts","kind":"import-statement","original":"./layout"},{"path":"packages/sdk/app-framework/src/plugins/common/metadata.ts","kind":"import-statement","original":"./metadata"},{"path":"packages/sdk/app-framework/src/plugins/common/settings.ts","kind":"import-statement","original":"./settings"},{"path":"packages/sdk/app-framework/src/plugins/common/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts":{"bytes":5235,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytes":4017,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytes":4030,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx":{"bytes":18487,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytes":678,"imports":[{"path":"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx","kind":"import-statement","original":"./PluginHost"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts":{"bytes":1765,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytes":1954,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytes":4120,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytes":2747,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytes":13254,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts":{"bytes":881,"imports":[{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx","kind":"import-statement","original":"./Surface"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/components/SettingsDialog.tsx":{"bytes":11442,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/index.ts","kind":"import-statement","original":"../PluginHost"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts","kind":"import-statement","original":"../SurfacePlugin"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/components/SettingsValue.tsx":{"bytes":3597,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/components/ShortcutsDialog.tsx":{"bytes":7004,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/components/index.ts":{"bytes":711,"imports":[{"path":"packages/sdk/app-framework/src/plugins/components/SettingsDialog.tsx","kind":"import-statement","original":"./SettingsDialog"},{"path":"packages/sdk/app-framework/src/plugins/components/SettingsValue.tsx","kind":"import-statement","original":"./SettingsValue"},{"path":"packages/sdk/app-framework/src/plugins/components/ShortcutsDialog.tsx","kind":"import-statement","original":"./ShortcutsDialog"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts":{"bytes":1706,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytes":1874,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytes":1616,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytes":678,"imports":[{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts","kind":"import-statement","original":"./intent"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/index.ts":{"bytes":948,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/sdk/app-framework/src/plugins/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts","kind":"import-statement","original":"./IntentPlugin"},{"path":"packages/sdk/app-framework/src/plugins/PluginHost/index.ts","kind":"import-statement","original":"./PluginHost"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts","kind":"import-statement","original":"./SurfacePlugin"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytes":690,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytes":698,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytes":4010,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytes":7167,"imports":[{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/helpers.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/sdk/app-framework/src/App.tsx":{"bytes":6903,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/index.ts","kind":"import-statement","original":"./plugins"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts","kind":"import-statement","original":"./plugins/IntentPlugin/meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts","kind":"import-statement","original":"./plugins/SurfacePlugin/meta"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx","kind":"dynamic-import","original":"./plugins/SurfacePlugin/plugin"},{"path":"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx","kind":"dynamic-import","original":"./plugins/IntentPlugin/plugin"}],"format":"esm"},"packages/sdk/app-framework/src/index.ts":{"bytes":544,"imports":[{"path":"packages/sdk/app-framework/src/plugins/index.ts","kind":"import-statement","original":"./plugins"},{"path":"packages/sdk/app-framework/src/App.tsx","kind":"import-statement","original":"./App"}],"format":"esm"}},"outputs":{"packages/sdk/app-framework/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":48626},"packages/sdk/app-framework/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs","kind":"dynamic-import"}],"exports":["ErrorBoundary","IntentProvider","Layout","LayoutAction","Plugin","PluginHost","PluginProvider","Resource","ResourceKey","ResourceLanguage","SettingsDialogContent","SettingsValue","ShortcutsDialogContent","Surface","SurfaceProvider","createApp","filterPlugins","findPlugin","getPlugin","initializePlugin","isObject","parseGraphBuilderPlugin","parseGraphPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parsePluginHost","parseRootSurfacePlugin","parseSurfacePlugin","parseTranslationsPlugin","pluginMeta","resolvePlugin","useIntent","usePlugin","usePlugins","useResolvePlugin","useSurface"],"entryPoint":"packages/sdk/app-framework/src/index.ts","inputs":{"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytesInOutput":174},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytesInOutput":1980},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytesInOutput":357},"packages/sdk/app-framework/src/plugins/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/components/SettingsDialog.tsx":{"bytesInOutput":3011},"packages/sdk/app-framework/src/plugins/PluginHost/plugin.ts":{"bytesInOutput":241},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytesInOutput":512},"packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx":{"bytesInOutput":4505},"packages/sdk/app-framework/src/plugins/SurfacePlugin/helpers.ts":{"bytesInOutput":61},"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytesInOutput":676},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytesInOutput":2673},"packages/sdk/app-framework/src/plugins/components/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/components/SettingsValue.tsx":{"bytesInOutput":919},"packages/sdk/app-framework/src/plugins/components/ShortcutsDialog.tsx":{"bytesInOutput":1915},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1151}},"bytes":20550},"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2039},"packages/sdk/app-framework/dist/lib/browser/plugin-JDIMDLDU.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx","inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytesInOutput":680}},"bytes":985},"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3064},"packages/sdk/app-framework/dist/lib/browser/chunk-MNFAM2GF.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["SurfaceProvider","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","useSurface"],"inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytesInOutput":235},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytesInOutput":87}},"bytes":879},"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3442},"packages/sdk/app-framework/dist/lib/browser/plugin-CBPJO5NB.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs","kind":"import-statement"},{"path":"deepsignal/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx","inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytesInOutput":1348}},"bytes":1672},"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2163},"packages/sdk/app-framework/dist/lib/browser/chunk-C2K6M6WC.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","useIntent"],"inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytesInOutput":184},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytesInOutput":231},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytesInOutput":84}},"bytes":857},"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2110},"packages/sdk/app-framework/dist/lib/browser/chunk-CFZ5JAJF.mjs":{"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":525}},"bytes":695}}}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -38,6 +38,9 @@ __export(node_exports, {
|
|
|
38
38
|
Resource: () => Resource,
|
|
39
39
|
ResourceKey: () => ResourceKey,
|
|
40
40
|
ResourceLanguage: () => ResourceLanguage,
|
|
41
|
+
SettingsDialogContent: () => SettingsDialogContent,
|
|
42
|
+
SettingsValue: () => SettingsValue,
|
|
43
|
+
ShortcutsDialogContent: () => ShortcutsDialogContent,
|
|
41
44
|
Surface: () => Surface,
|
|
42
45
|
SurfaceProvider: () => import_chunk_DC3GU6QR.SurfaceProvider,
|
|
43
46
|
createApp: () => createApp,
|
|
@@ -71,15 +74,24 @@ var import_chunk_BOQBLWMX = require("./chunk-BOQBLWMX.cjs");
|
|
|
71
74
|
var import_chunk_VDKZ7AAF = require("./chunk-VDKZ7AAF.cjs");
|
|
72
75
|
var import_zod = require("zod");
|
|
73
76
|
var import_zod2 = require("zod");
|
|
74
|
-
var import_react = require("react");
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
+
var import_react = __toESM(require("react"));
|
|
78
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
79
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
80
|
+
var import_react2 = require("react");
|
|
81
|
+
var import_react3 = require("deepsignal/react");
|
|
82
|
+
var import_react4 = __toESM(require("react"));
|
|
77
83
|
var import_local_storage = require("@dxos/local-storage");
|
|
78
84
|
var import_log = require("@dxos/log");
|
|
79
|
-
var import_react4 = __toESM(require("react"));
|
|
80
85
|
var import_react5 = __toESM(require("react"));
|
|
81
|
-
var import_react6 = require("react");
|
|
82
|
-
var import_react7 =
|
|
86
|
+
var import_react6 = __toESM(require("react"));
|
|
87
|
+
var import_react7 = require("react");
|
|
88
|
+
var import_react8 = __toESM(require("react"));
|
|
89
|
+
var import_react_ui2 = require("@dxos/react-ui");
|
|
90
|
+
var import_react9 = __toESM(require("react"));
|
|
91
|
+
var import_keyboard = require("@dxos/keyboard");
|
|
92
|
+
var import_react_ui3 = require("@dxos/react-ui");
|
|
93
|
+
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
94
|
+
var import_react10 = __toESM(require("react"));
|
|
83
95
|
var import_invariant = require("@dxos/invariant");
|
|
84
96
|
var parseGraphPlugin = (plugin) => plugin.provides.graph?.root ? plugin : void 0;
|
|
85
97
|
var parseGraphBuilderPlugin = (plugin) => plugin.provides.graph?.builder ? plugin : void 0;
|
|
@@ -87,11 +99,12 @@ var Layout = import_zod.z.object({
|
|
|
87
99
|
fullscreen: import_zod.z.boolean(),
|
|
88
100
|
sidebarOpen: import_zod.z.boolean(),
|
|
89
101
|
complementarySidebarOpen: import_zod.z.boolean(),
|
|
90
|
-
|
|
102
|
+
// TODO(burdon): Why do we have a single root?
|
|
91
103
|
dialogOpen: import_zod.z.boolean(),
|
|
92
|
-
|
|
93
|
-
popoverContent: import_zod.z.any().optional().describe("Data to be passed to the popover Surface."),
|
|
104
|
+
dialogContent: import_zod.z.any().optional().describe("Data to be passed to the dialog Surface."),
|
|
94
105
|
popoverOpen: import_zod.z.boolean(),
|
|
106
|
+
popoverContent: import_zod.z.any().optional().describe("Data to be passed to the popover Surface."),
|
|
107
|
+
popoverAnchorId: import_zod.z.string().optional(),
|
|
95
108
|
// TODO(wittjosiah): Array?
|
|
96
109
|
active: import_zod.z.string().optional().describe("Id of the currently active item."),
|
|
97
110
|
// TODO(wittjosiah): History?
|
|
@@ -111,6 +124,8 @@ var LayoutAction;
|
|
|
111
124
|
LayoutAction2[LayoutAction2["CLOSE_DIALOG"] = `${LAYOUT_ACTION}/close-dialog`] = "CLOSE_DIALOG";
|
|
112
125
|
LayoutAction2[LayoutAction2["OPEN_POPOVER"] = `${LAYOUT_ACTION}/open-popover`] = "OPEN_POPOVER";
|
|
113
126
|
LayoutAction2[LayoutAction2["CLOSE_POPOVER"] = `${LAYOUT_ACTION}/close-popover`] = "CLOSE_POPOVER";
|
|
127
|
+
LayoutAction2[LayoutAction2["OPEN_SETTINGS"] = `${LAYOUT_ACTION}/open-settings`] = "OPEN_SETTINGS";
|
|
128
|
+
LayoutAction2[LayoutAction2["OPEN_SHORTCUTS"] = `${LAYOUT_ACTION}/open-shortcuts`] = "OPEN_SHORTCUTS";
|
|
114
129
|
LayoutAction2[LayoutAction2["ACTIVATE"] = `${LAYOUT_ACTION}/activate`] = "ACTIVATE";
|
|
115
130
|
})(LayoutAction || (LayoutAction = {}));
|
|
116
131
|
var parseMetadataRecordsPlugin = (plugin) => {
|
|
@@ -138,17 +153,15 @@ var Plugin;
|
|
|
138
153
|
});
|
|
139
154
|
};
|
|
140
155
|
})(Plugin || (Plugin = {}));
|
|
141
|
-
var PluginContext = /* @__PURE__ */ (0,
|
|
156
|
+
var PluginContext = /* @__PURE__ */ (0, import_react2.createContext)({
|
|
142
157
|
ready: false,
|
|
143
158
|
enabled: [],
|
|
144
159
|
plugins: [],
|
|
145
160
|
available: [],
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
disablePlugin: () => {
|
|
161
|
+
setPlugin: () => {
|
|
149
162
|
}
|
|
150
163
|
});
|
|
151
|
-
var usePlugins = () => (0,
|
|
164
|
+
var usePlugins = () => (0, import_react2.useContext)(PluginContext);
|
|
152
165
|
var usePlugin = (id) => {
|
|
153
166
|
const { plugins } = usePlugins();
|
|
154
167
|
return (0, import_chunk_VDKZ7AAF.findPlugin)(plugins, id);
|
|
@@ -169,14 +182,15 @@ var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallb
|
|
|
169
182
|
],
|
|
170
183
|
plugins: [],
|
|
171
184
|
available: order.filter(({ id }) => !core.includes(id)),
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
setPlugin: (id, enabled) => {
|
|
186
|
+
if (enabled) {
|
|
187
|
+
state.values.enabled = [
|
|
188
|
+
...state.values.enabled,
|
|
189
|
+
id
|
|
190
|
+
];
|
|
191
|
+
} else {
|
|
192
|
+
state.values.enabled = state.values.enabled.filter((enabled2) => enabled2 !== id);
|
|
193
|
+
}
|
|
180
194
|
}
|
|
181
195
|
});
|
|
182
196
|
state.prop(state.values.$enabled, "enabled", import_local_storage.LocalStorageStore.json);
|
|
@@ -187,16 +201,16 @@ var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallb
|
|
|
187
201
|
},
|
|
188
202
|
provides: {
|
|
189
203
|
plugins: state.values,
|
|
190
|
-
context: ({ children }) => /* @__PURE__ */
|
|
204
|
+
context: ({ children }) => /* @__PURE__ */ import_react4.default.createElement(PluginProvider, {
|
|
191
205
|
value: state.values
|
|
192
206
|
}, children),
|
|
193
207
|
root: () => {
|
|
194
|
-
(0,
|
|
208
|
+
(0, import_react4.useEffect)(() => {
|
|
195
209
|
(0, import_log.log)("initializing plugins", {
|
|
196
210
|
enabled: state.values.enabled
|
|
197
211
|
}, {
|
|
198
212
|
F: __dxlog_file,
|
|
199
|
-
L:
|
|
213
|
+
L: 67,
|
|
200
214
|
S: void 0,
|
|
201
215
|
C: (f, a) => f(...a)
|
|
202
216
|
});
|
|
@@ -221,7 +235,7 @@ var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallb
|
|
|
221
235
|
plugins
|
|
222
236
|
}, {
|
|
223
237
|
F: __dxlog_file,
|
|
224
|
-
L:
|
|
238
|
+
L: 92,
|
|
225
239
|
S: void 0,
|
|
226
240
|
C: (f, a) => f(...a)
|
|
227
241
|
});
|
|
@@ -232,11 +246,11 @@ var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallb
|
|
|
232
246
|
plugins
|
|
233
247
|
}, {
|
|
234
248
|
F: __dxlog_file,
|
|
235
|
-
L:
|
|
249
|
+
L: 99,
|
|
236
250
|
S: void 0,
|
|
237
251
|
C: (f, a) => f(...a)
|
|
238
252
|
});
|
|
239
|
-
state.values.plugins = (0,
|
|
253
|
+
state.values.plugins = (0, import_react3.shallow)(plugins);
|
|
240
254
|
state.values.ready = true;
|
|
241
255
|
});
|
|
242
256
|
return () => {
|
|
@@ -245,10 +259,10 @@ var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallb
|
|
|
245
259
|
};
|
|
246
260
|
}, []);
|
|
247
261
|
if (!state.values.ready) {
|
|
248
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, fallback);
|
|
249
263
|
}
|
|
250
264
|
const ComposedContext = composeContext(state.values.plugins);
|
|
251
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ import_react4.default.createElement(ComposedContext, null, rootComponents(state.values.plugins));
|
|
252
266
|
}
|
|
253
267
|
}
|
|
254
268
|
};
|
|
@@ -267,7 +281,7 @@ var rootComponents = (plugins) => {
|
|
|
267
281
|
return plugins.map((plugin) => {
|
|
268
282
|
const Component2 = plugin.provides.root;
|
|
269
283
|
if (Component2) {
|
|
270
|
-
return /* @__PURE__ */
|
|
284
|
+
return /* @__PURE__ */ import_react4.default.createElement(Component2, {
|
|
271
285
|
key: plugin.meta.id
|
|
272
286
|
});
|
|
273
287
|
} else {
|
|
@@ -281,10 +295,10 @@ var composeContext = (plugins) => {
|
|
|
281
295
|
var compose = (contexts) => {
|
|
282
296
|
return [
|
|
283
297
|
...contexts
|
|
284
|
-
].reduce((Acc, Next) => ({ children }) => /* @__PURE__ */
|
|
298
|
+
].reduce((Acc, Next) => ({ children }) => /* @__PURE__ */ import_react4.default.createElement(Acc, null, /* @__PURE__ */ import_react4.default.createElement(Next, null, children)));
|
|
285
299
|
};
|
|
286
300
|
var isObject = (data) => !!data && typeof data === "object";
|
|
287
|
-
var ErrorBoundary = class extends
|
|
301
|
+
var ErrorBoundary = class extends import_react5.Component {
|
|
288
302
|
constructor(props) {
|
|
289
303
|
super(props);
|
|
290
304
|
this.state = {
|
|
@@ -303,7 +317,7 @@ var ErrorBoundary = class extends import_react4.Component {
|
|
|
303
317
|
}
|
|
304
318
|
render() {
|
|
305
319
|
if (this.state.error) {
|
|
306
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ import_react5.default.createElement(this.props.fallback, {
|
|
307
321
|
error: this.state.error,
|
|
308
322
|
reset: this.resetError
|
|
309
323
|
});
|
|
@@ -316,30 +330,30 @@ var ErrorBoundary = class extends import_react4.Component {
|
|
|
316
330
|
});
|
|
317
331
|
}
|
|
318
332
|
};
|
|
319
|
-
var Surface = /* @__PURE__ */ (0,
|
|
333
|
+
var Surface = /* @__PURE__ */ (0, import_react6.forwardRef)(({ role, name = role, fallback, ...rest }, forwardedRef) => {
|
|
320
334
|
const props = {
|
|
321
335
|
role,
|
|
322
336
|
name,
|
|
323
337
|
fallback,
|
|
324
338
|
...rest
|
|
325
339
|
};
|
|
326
|
-
const context = (0,
|
|
340
|
+
const context = (0, import_react7.useContext)(SurfaceContext);
|
|
327
341
|
const data = props.data ?? (name && context?.surfaces?.[name]?.data || {});
|
|
328
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, fallback ? /* @__PURE__ */ import_react6.default.createElement(ErrorBoundary, {
|
|
329
343
|
data,
|
|
330
344
|
fallback
|
|
331
|
-
}, /* @__PURE__ */
|
|
345
|
+
}, /* @__PURE__ */ import_react6.default.createElement(SurfaceResolver, {
|
|
332
346
|
...props,
|
|
333
347
|
ref: forwardedRef
|
|
334
|
-
})) : /* @__PURE__ */
|
|
348
|
+
})) : /* @__PURE__ */ import_react6.default.createElement(SurfaceResolver, {
|
|
335
349
|
...props,
|
|
336
350
|
ref: forwardedRef
|
|
337
351
|
}));
|
|
338
352
|
});
|
|
339
|
-
var SurfaceContext = /* @__PURE__ */ (0,
|
|
340
|
-
var SurfaceResolver = /* @__PURE__ */ (0,
|
|
353
|
+
var SurfaceContext = /* @__PURE__ */ (0, import_react7.createContext)(null);
|
|
354
|
+
var SurfaceResolver = /* @__PURE__ */ (0, import_react6.forwardRef)((props, forwardedRef) => {
|
|
341
355
|
const { components } = (0, import_chunk_DC3GU6QR.useSurface)();
|
|
342
|
-
const parent = (0,
|
|
356
|
+
const parent = (0, import_react7.useContext)(SurfaceContext);
|
|
343
357
|
const nodes = resolveNodes(components, props, parent, forwardedRef);
|
|
344
358
|
const currentContext = {
|
|
345
359
|
...props,
|
|
@@ -348,9 +362,9 @@ var SurfaceResolver = /* @__PURE__ */ (0, import_react5.forwardRef)((props, forw
|
|
|
348
362
|
...props.surfaces
|
|
349
363
|
}
|
|
350
364
|
};
|
|
351
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ import_react6.default.createElement(SurfaceContext.Provider, {
|
|
352
366
|
value: currentContext
|
|
353
|
-
}, nodes.length > 0 ? nodes : props.contentFallback ? /* @__PURE__ */
|
|
367
|
+
}, nodes.length > 0 ? nodes : props.contentFallback ? /* @__PURE__ */ import_react6.default.createElement(props.contentFallback, null) : null);
|
|
354
368
|
});
|
|
355
369
|
var resolveNodes = (components, props, context, forwardedRef) => {
|
|
356
370
|
const data = {
|
|
@@ -368,7 +382,7 @@ var resolveNodes = (components, props, context, forwardedRef) => {
|
|
|
368
382
|
return "node" in result ? [
|
|
369
383
|
key,
|
|
370
384
|
result
|
|
371
|
-
] : /* @__PURE__ */ (0,
|
|
385
|
+
] : /* @__PURE__ */ (0, import_react6.isValidElement)(result) ? [
|
|
372
386
|
key,
|
|
373
387
|
{
|
|
374
388
|
node: result
|
|
@@ -385,11 +399,136 @@ var resolveNodes = (components, props, context, forwardedRef) => {
|
|
|
385
399
|
return 1;
|
|
386
400
|
}
|
|
387
401
|
return 0;
|
|
388
|
-
}).map(([key, result]) => /* @__PURE__ */
|
|
402
|
+
}).map(([key, result]) => /* @__PURE__ */ import_react6.default.createElement(import_react6.Fragment, {
|
|
389
403
|
key
|
|
390
404
|
}, result.node));
|
|
391
405
|
return props.limit ? nodes.slice(0, props.limit) : nodes;
|
|
392
406
|
};
|
|
407
|
+
var SettingsDialogContent = () => {
|
|
408
|
+
const { t } = (0, import_react_ui.useTranslation)("os");
|
|
409
|
+
const [plugin, setPlugin] = (0, import_react.useState)("dxos.org/plugin/registry");
|
|
410
|
+
const { plugins, enabled } = usePlugins();
|
|
411
|
+
const core = [
|
|
412
|
+
"dxos.org/plugin/layout",
|
|
413
|
+
"dxos.org/plugin/client",
|
|
414
|
+
"dxos.org/plugin/space",
|
|
415
|
+
"dxos.org/plugin/registry"
|
|
416
|
+
];
|
|
417
|
+
const filteredPlugins = enabled.map((id) => plugins.find((plugin2) => plugin2.meta.id === id)).filter((plugin2) => plugin2?.provides?.settings).map((plugin2) => plugin2.meta).sort(({ name: a }, { name: b }) => a?.localeCompare(b ?? "") ?? 0);
|
|
418
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui.DensityProvider, {
|
|
419
|
+
density: "fine"
|
|
420
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Dialog.Content, {
|
|
421
|
+
classNames: [
|
|
422
|
+
"h-[90%] md:max-is-[40rem] overflow-hidden"
|
|
423
|
+
]
|
|
424
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Dialog.Title, null, t("settings dialog title", {
|
|
425
|
+
ns: "os"
|
|
426
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
427
|
+
className: "flex grow mlb-4 overflow-hidden"
|
|
428
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
429
|
+
className: (0, import_react_ui_theme.mx)("flex flex-col w-[200px] space-y-4 pr-4 border-r overflow-y-auto", import_react_ui_theme.groupBorder)
|
|
430
|
+
}, /* @__PURE__ */ import_react.default.createElement(PluginList, {
|
|
431
|
+
title: "Options",
|
|
432
|
+
plugins: core.map((id) => plugins.find((p) => p.meta.id === id).meta),
|
|
433
|
+
selected: plugin,
|
|
434
|
+
onSelect: (plugin2) => setPlugin(plugin2)
|
|
435
|
+
}), /* @__PURE__ */ import_react.default.createElement(PluginList, {
|
|
436
|
+
title: "Plugins",
|
|
437
|
+
plugins: filteredPlugins,
|
|
438
|
+
selected: plugin,
|
|
439
|
+
onSelect: (plugin2) => setPlugin(plugin2)
|
|
440
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
441
|
+
className: (0, import_react_ui_theme.mx)("flex flex-col w-full md:px-4 divide-y overflow-y-auto", import_react_ui_theme.groupBorder)
|
|
442
|
+
}, /* @__PURE__ */ import_react.default.createElement(Surface, {
|
|
443
|
+
role: "settings",
|
|
444
|
+
data: {
|
|
445
|
+
plugin
|
|
446
|
+
}
|
|
447
|
+
}))), /* @__PURE__ */ import_react.default.createElement(import_react_ui.Dialog.Close, {
|
|
448
|
+
asChild: true
|
|
449
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Button, {
|
|
450
|
+
variant: "primary",
|
|
451
|
+
classNames: "mbs-2"
|
|
452
|
+
}, t("done label", {
|
|
453
|
+
ns: "os"
|
|
454
|
+
})))));
|
|
455
|
+
};
|
|
456
|
+
var PluginList = ({ title, plugins, selected, onSelect }) => {
|
|
457
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
458
|
+
role: "none"
|
|
459
|
+
}, /* @__PURE__ */ import_react.default.createElement("h2", {
|
|
460
|
+
className: "my-1 px-2 text-sm text-neutral-500"
|
|
461
|
+
}, title), /* @__PURE__ */ import_react.default.createElement(import_react_ui.List, {
|
|
462
|
+
selectable: true
|
|
463
|
+
}, plugins.map((plugin) => /* @__PURE__ */ import_react.default.createElement(import_react_ui.ListItem.Root, {
|
|
464
|
+
key: plugin.id,
|
|
465
|
+
onClick: () => onSelect(plugin.id),
|
|
466
|
+
selected: plugin.id === selected,
|
|
467
|
+
classNames: [
|
|
468
|
+
"px-2 rounded",
|
|
469
|
+
plugin.id === selected && import_react_ui_theme.ghostSelected,
|
|
470
|
+
import_react_ui_theme.ghostHover
|
|
471
|
+
]
|
|
472
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.ListItem.Heading, {
|
|
473
|
+
classNames: [
|
|
474
|
+
"flex w-full items-center cursor-pointer"
|
|
475
|
+
]
|
|
476
|
+
}, plugin.name)))));
|
|
477
|
+
};
|
|
478
|
+
var SettingsValue = ({ label, description, children }) => {
|
|
479
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
480
|
+
role: "none",
|
|
481
|
+
className: "flex w-full gap-4 py-1"
|
|
482
|
+
}, /* @__PURE__ */ import_react8.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
483
|
+
role: "none",
|
|
484
|
+
className: "flex flex-col w-full"
|
|
485
|
+
}, /* @__PURE__ */ import_react8.default.createElement(import_react_ui2.Input.Label, {
|
|
486
|
+
classNames: "flex min-h-[40px] items-center"
|
|
487
|
+
}, label), description && /* @__PURE__ */ import_react8.default.createElement(import_react_ui2.Input.DescriptionAndValidation, {
|
|
488
|
+
classNames: "mbs-0.5"
|
|
489
|
+
}, /* @__PURE__ */ import_react8.default.createElement(import_react_ui2.Input.Description, null, description))), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
490
|
+
role: "none"
|
|
491
|
+
}, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
492
|
+
role: "none",
|
|
493
|
+
className: "flex min-h-[40px] items-center"
|
|
494
|
+
}, children))));
|
|
495
|
+
};
|
|
496
|
+
var ShortcutsDialogContent = () => {
|
|
497
|
+
const { t } = (0, import_react_ui3.useTranslation)("os");
|
|
498
|
+
const bindings = import_keyboard.Keyboard.singleton.getBindings();
|
|
499
|
+
const getLabel = (label) => Array.isArray(label) ? t(...label) : label;
|
|
500
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DensityProvider, {
|
|
501
|
+
density: "fine"
|
|
502
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Dialog.Content, {
|
|
503
|
+
classNames: [
|
|
504
|
+
"md:max-is-[30rem] overflow-hidden"
|
|
505
|
+
]
|
|
506
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Dialog.Title, null, t("shortcuts dialog title", {
|
|
507
|
+
ns: "os"
|
|
508
|
+
})), /* @__PURE__ */ import_react9.default.createElement("table", {
|
|
509
|
+
className: "table-fixed border-collapse my-4"
|
|
510
|
+
}, /* @__PURE__ */ import_react9.default.createElement("tbody", null, bindings.map((binding, i) => /* @__PURE__ */ import_react9.default.createElement("tr", {
|
|
511
|
+
key: i
|
|
512
|
+
}, /* @__PURE__ */ import_react9.default.createElement("td", {
|
|
513
|
+
className: "p-1 w-[120px]"
|
|
514
|
+
}, /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
515
|
+
className: "flex gap-1"
|
|
516
|
+
}, (0, import_keyboard.keySymbols)(binding.binding).map((c, i2) => /* @__PURE__ */ import_react9.default.createElement("span", {
|
|
517
|
+
key: i2,
|
|
518
|
+
className: (0, import_react_ui_theme2.mx)("inline-flex w-[24px] h-[24px] justify-center items-center text-xs", "rounded border border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-850")
|
|
519
|
+
}, c)))), /* @__PURE__ */ import_react9.default.createElement("td", {
|
|
520
|
+
className: "p-1"
|
|
521
|
+
}, /* @__PURE__ */ import_react9.default.createElement("span", {
|
|
522
|
+
className: "grow truncate"
|
|
523
|
+
}, getLabel(binding.data))))))), /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Dialog.Close, {
|
|
524
|
+
asChild: true
|
|
525
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Button, {
|
|
526
|
+
variant: "primary",
|
|
527
|
+
classNames: "mbs-2"
|
|
528
|
+
}, t("close label", {
|
|
529
|
+
ns: "os"
|
|
530
|
+
})))));
|
|
531
|
+
};
|
|
393
532
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/App.tsx";
|
|
394
533
|
var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }) => {
|
|
395
534
|
const host = PluginHost({
|
|
@@ -430,7 +569,7 @@ var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }
|
|
|
430
569
|
});
|
|
431
570
|
const Context = host.provides.context;
|
|
432
571
|
const Root = host.provides.root;
|
|
433
|
-
return () => /* @__PURE__ */
|
|
572
|
+
return () => /* @__PURE__ */ import_react10.default.createElement(Context, null, /* @__PURE__ */ import_react10.default.createElement(Root, null));
|
|
434
573
|
};
|
|
435
574
|
// Annotate the CommonJS export names for ESM import in node:
|
|
436
575
|
0 && (module.exports = {
|
|
@@ -444,6 +583,9 @@ var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }
|
|
|
444
583
|
Resource,
|
|
445
584
|
ResourceKey,
|
|
446
585
|
ResourceLanguage,
|
|
586
|
+
SettingsDialogContent,
|
|
587
|
+
SettingsValue,
|
|
588
|
+
ShortcutsDialogContent,
|
|
447
589
|
Surface,
|
|
448
590
|
SurfaceProvider,
|
|
449
591
|
createApp,
|