@dxos/app-framework 0.6.5-staging.a07b6c7 → 0.6.6-main.e1a6e1f

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.
@@ -1 +1 @@
1
- {"inputs":{"packages/sdk/app-framework/src/plugins/common/file.ts":{"bytes":2950,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytes":2157,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytes":10186,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytes":2094,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytes":14776,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/settings.ts":{"bytes":2093,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3521,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":1046,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/file.ts","kind":"import-statement","original":"./file"},{"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/navigation.ts","kind":"import-statement","original":"./navigation"},{"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/helpers.ts":{"bytes":4410,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts":{"bytes":3845,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytes":2719,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytes":4090,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytes":710,"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":5480,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytes":4090,"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/SurfacePlugin/helpers.ts":{"bytes":1817,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytes":1970,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytes":4343,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytes":2803,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytes":13897,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","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":917,"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/PluginHost/PluginHost.tsx":{"bytes":21462,"imports":[{"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"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts","kind":"import-statement","original":"../SurfacePlugin"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytes":710,"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/index.ts":{"bytes":890,"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":726,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytes":734,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytes":3949,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/helpers.ts":{"bytes":1170,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytes":19387,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","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/helpers.ts","kind":"import-statement","original":"./helpers"},{"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":7027,"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":576,"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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":50550},"packages/sdk/app-framework/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"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":"@dxos/debug","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/node/plugin-WM3TAFFD.cjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs","kind":"dynamic-import"}],"exports":["ActiveParts","Attention","ErrorBoundary","IntentAction","IntentProvider","Layout","LayoutAction","Location","NavigationAction","Plugin","PluginHost","PluginProvider","Resource","ResourceKey","ResourceLanguage","SLUG_COLLECTION_INDICATOR","SLUG_ENTRY_SEPARATOR","SLUG_KEY_VALUE_SEPARATOR","SLUG_LIST_SEPARATOR","SLUG_PATH_SEPARATOR","SLUG_SOLO_INDICATOR","SettingsAction","Surface","SurfaceProvider","Toast","activeIds","createApp","defaultFileTypes","definePlugin","filterPlugins","findPlugin","firstMainId","getPlugin","initializePlugin","isActiveParts","isAdjustTransaction","isIdActive","isObject","parseFileManagerPlugin","parseGraphBuilderPlugin","parseGraphPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parseNavigationPlugin","parsePluginHost","parseRootSurfacePlugin","parseSettingsPlugin","parseSlug","parseSurfacePlugin","parseTranslationsPlugin","pluginMeta","resolvePlugin","useIntent","useIntentDispatcher","useIntentResolver","usePlugin","usePlugins","useResolvePlugin","useSurface","useSurfaceRoot"],"entryPoint":"packages/sdk/app-framework/src/index.ts","inputs":{"packages/sdk/app-framework/src/plugins/common/file.ts":{"bytesInOutput":288},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytesInOutput":174},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytesInOutput":1757},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytesInOutput":2645},"packages/sdk/app-framework/src/plugins/common/settings.ts":{"bytesInOutput":341},"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":230},"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":5192},"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":705},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytesInOutput":2735},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1153}},"bytes":19018},"packages/sdk/app-framework/dist/lib/node/plugin-WM3TAFFD.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1945},"packages/sdk/app-framework/dist/lib/node/plugin-WM3TAFFD.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":655}},"bytes":960},"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3074},"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["SurfaceProvider","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","useSurfaceRoot"],"inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytesInOutput":239},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytesInOutput":87}},"bytes":887},"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9484},"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","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":4605},"packages/sdk/app-framework/src/plugins/IntentPlugin/helpers.ts":{"bytesInOutput":94}},"bytes":5173},"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3904},"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["IntentAction","IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","useIntent","useIntentDispatcher","useIntentResolver"],"inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytesInOutput":406},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytesInOutput":637},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytesInOutput":84}},"bytes":1545},"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2286},"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs":{"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["definePlugin","filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":564}},"bytes":750}}}
1
+ {"inputs":{"packages/sdk/app-framework/src/plugins/common/file.ts":{"bytes":2950,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytes":3905,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytes":10186,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytes":2094,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytes":17809,"imports":[{"path":"zod","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/settings.ts":{"bytes":2093,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3521,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":1046,"imports":[{"path":"packages/sdk/app-framework/src/plugins/common/file.ts","kind":"import-statement","original":"./file"},{"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/navigation.ts","kind":"import-statement","original":"./navigation"},{"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/helpers.ts":{"bytes":4410,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/intent.ts":{"bytes":3845,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytes":2719,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytes":4090,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/index.ts":{"bytes":710,"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":5480,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/PluginContext.tsx":{"bytes":4238,"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/SurfacePlugin/helpers.ts":{"bytes":1817,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytes":1970,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/ErrorBoundary.tsx":{"bytes":4343,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytes":2803,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytes":13897,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","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":917,"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/PluginHost/PluginHost.tsx":{"bytes":21462,"imports":[{"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"},{"path":"packages/sdk/app-framework/src/plugins/SurfacePlugin/index.ts","kind":"import-statement","original":"../SurfacePlugin"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/PluginHost/index.ts":{"bytes":710,"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/index.ts":{"bytes":890,"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":726,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytes":734,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/SurfacePlugin/plugin.tsx":{"bytes":3949,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/helpers.ts":{"bytes":1170,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/IntentPlugin/plugin.tsx":{"bytes":19387,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","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/helpers.ts","kind":"import-statement","original":"./helpers"},{"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":7027,"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":576,"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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":53302},"packages/sdk/app-framework/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"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":"@dxos/debug","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/node/plugin-WM3TAFFD.cjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs","kind":"dynamic-import"}],"exports":["ActiveParts","Attention","ErrorBoundary","IntentAction","IntentProvider","Layout","LayoutAction","NavigationAction","Plugin","PluginHost","PluginProvider","Resource","ResourceKey","ResourceLanguage","SLUG_COLLECTION_INDICATOR","SLUG_ENTRY_SEPARATOR","SLUG_KEY_VALUE_SEPARATOR","SLUG_LIST_SEPARATOR","SLUG_PATH_SEPARATOR","SLUG_SOLO_INDICATOR","SettingsAction","Surface","SurfaceProvider","Toast","createApp","defaultFileTypes","definePlugin","filterPlugins","findPlugin","firstIdInPart","getPlugin","indexInPart","initializePlugin","isLayoutAdjustment","isLayoutParts","isObject","openIds","parseFileManagerPlugin","parseGraphBuilderPlugin","parseGraphPlugin","parseGraphSerializerPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parseNavigationPlugin","parsePluginHost","parseRootSurfacePlugin","parseSettingsPlugin","parseSurfacePlugin","parseTranslationsPlugin","partLength","pluginMeta","resolvePlugin","useIntent","useIntentDispatcher","useIntentResolver","usePlugin","usePlugins","useResolvePlugin","useSurface","useSurfaceRoot"],"entryPoint":"packages/sdk/app-framework/src/index.ts","inputs":{"packages/sdk/app-framework/src/plugins/common/file.ts":{"bytesInOutput":288},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/common/graph.ts":{"bytesInOutput":272},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytesInOutput":1757},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytesInOutput":3057},"packages/sdk/app-framework/src/plugins/common/settings.ts":{"bytesInOutput":341},"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":230},"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":5192},"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":705},"packages/sdk/app-framework/src/plugins/SurfacePlugin/Surface.tsx":{"bytesInOutput":2735},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1153}},"bytes":19547},"packages/sdk/app-framework/dist/lib/node/plugin-WM3TAFFD.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1945},"packages/sdk/app-framework/dist/lib/node/plugin-WM3TAFFD.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":655}},"bytes":960},"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3074},"packages/sdk/app-framework/dist/lib/node/chunk-BTZLKXA2.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true}],"exports":["SurfaceProvider","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","useSurfaceRoot"],"inputs":{"packages/sdk/app-framework/src/plugins/SurfacePlugin/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/SurfacePlugin/SurfaceRootContext.tsx":{"bytesInOutput":239},"packages/sdk/app-framework/src/plugins/SurfacePlugin/meta.ts":{"bytesInOutput":87}},"bytes":887},"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9484},"packages/sdk/app-framework/dist/lib/node/plugin-QV7ESETI.cjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","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":4605},"packages/sdk/app-framework/src/plugins/IntentPlugin/helpers.ts":{"bytesInOutput":94}},"bytes":5173},"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3904},"packages/sdk/app-framework/dist/lib/node/chunk-DFST5IG5.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["IntentAction","IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","useIntent","useIntentDispatcher","useIntentResolver"],"inputs":{"packages/sdk/app-framework/src/plugins/IntentPlugin/provides.ts":{"bytesInOutput":406},"packages/sdk/app-framework/src/plugins/IntentPlugin/IntentContext.tsx":{"bytesInOutput":637},"packages/sdk/app-framework/src/plugins/IntentPlugin/meta.ts":{"bytesInOutput":84}},"bytes":1545},"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2286},"packages/sdk/app-framework/dist/lib/node/chunk-62W6CMGM.cjs":{"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["definePlugin","filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":564}},"bytes":750}}}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginContext.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/PluginHost/PluginContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,QAAQ,EAA6B,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC,MA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IAAI,CAAC;CACnD,CAAC;AAUF;;GAEG;AACH,eAAO,MAAM,UAAU,QAAO,aAA0C,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,SAAS,UAAY,MAAM,KAAG,OAAO,CAAC,CAAC,GAAG,SAGtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,iBAAmB,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,KAAG,OAAO,CAAC,CAAC,GAAG,SAGvG,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,aAAa,CAA0B,CAAC"}
@@ -1,16 +1,41 @@
1
- import type { Graph, GraphBuilder } from '@dxos/app-graph';
1
+ import type { Graph, GraphBuilder, Node } from '@dxos/app-graph';
2
+ import { type MaybePromise } from '@dxos/util';
2
3
  import type { Plugin } from '../PluginHost';
4
+ export type SerializedNode = {
5
+ name: string;
6
+ data: string;
7
+ type?: string;
8
+ };
9
+ export type NodeSerializer<T = any> = {
10
+ inputType: string;
11
+ outputType: string;
12
+ disposition?: 'hoist' | 'fallback';
13
+ /**
14
+ * Takes a node and serializes it into a format that can be stored.
15
+ */
16
+ serialize: (node: Node<T>) => MaybePromise<SerializedNode>;
17
+ /**
18
+ * Takes a serialized node and deserializes it into the application.
19
+ */
20
+ deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;
21
+ };
3
22
  /**
4
23
  * Provides for a plugin that exposes the application graph.
5
24
  */
6
25
  export type GraphProvides = {
7
26
  graph: Graph;
27
+ explore: GraphBuilder['explore'];
8
28
  };
9
29
  export type GraphBuilderProvides = {
10
30
  graph: {
11
31
  builder: (plugins: Plugin[]) => Parameters<GraphBuilder['addExtension']>[0];
12
32
  };
13
33
  };
34
+ export type GraphSerializerProvides = {
35
+ graph: {
36
+ serializer: (plugins: Plugin[]) => NodeSerializer[];
37
+ };
38
+ };
14
39
  /**
15
40
  * Type guard for graph plugins.
16
41
  */
@@ -19,4 +44,8 @@ export declare const parseGraphPlugin: (plugin: Plugin) => Plugin<GraphProvides>
19
44
  * Type guard for graph builder plugins.
20
45
  */
21
46
  export declare const parseGraphBuilderPlugin: (plugin: Plugin) => Plugin<GraphBuilderProvides> | undefined;
47
+ /**
48
+ * Type guard for graph serializer plugins.
49
+ */
50
+ export declare const parseGraphSerializerPlugin: (plugin: Plugin) => Plugin<GraphSerializerProvides> | undefined;
22
51
  //# sourceMappingURL=graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7E,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM,sCACuC,CAAC;AAEvF;;GAEG;AACH,eAAO,MAAM,uBAAuB,WAAY,MAAM,6CAC0C,CAAC"}
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE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
  import type { IntentData } from '../IntentPlugin';
3
4
  import type { Plugin } from '../PluginHost';
4
5
  export declare const SLUG_LIST_SEPARATOR = "+";
@@ -7,25 +8,79 @@ export declare const SLUG_KEY_VALUE_SEPARATOR = "-";
7
8
  export declare const SLUG_PATH_SEPARATOR = "~";
8
9
  export declare const SLUG_COLLECTION_INDICATOR = "";
9
10
  export declare const SLUG_SOLO_INDICATOR = "$";
10
- export declare const parseSlug: (slug: string) => {
11
- id: string;
12
- path: string[];
13
- solo: boolean;
14
- };
11
+ declare const LayoutEntrySchema: S.mutable<S.Struct<{
12
+ id: typeof S.String;
13
+ solo: S.optional<typeof S.Boolean>;
14
+ path: S.optional<typeof S.String>;
15
+ }>>;
16
+ export type LayoutEntry = S.Schema.Type<typeof LayoutEntrySchema>;
17
+ declare const LayoutPartSchema: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
18
+ export type LayoutPart = S.Schema.Type<typeof LayoutPartSchema>;
19
+ declare const LayoutPartsSchema: S.SchemaClass<{
20
+ main?: {
21
+ path?: string | undefined;
22
+ id: string;
23
+ solo?: boolean | undefined;
24
+ }[] | undefined;
25
+ sidebar?: {
26
+ path?: string | undefined;
27
+ id: string;
28
+ solo?: boolean | undefined;
29
+ }[] | undefined;
30
+ complementary?: {
31
+ path?: string | undefined;
32
+ id: string;
33
+ solo?: boolean | undefined;
34
+ }[] | undefined;
35
+ fullScreen?: {
36
+ path?: string | undefined;
37
+ id: string;
38
+ solo?: boolean | undefined;
39
+ }[] | undefined;
40
+ }, {
41
+ main?: {
42
+ id: string;
43
+ path?: string | undefined;
44
+ solo?: boolean | undefined;
45
+ }[] | undefined;
46
+ sidebar?: {
47
+ id: string;
48
+ path?: string | undefined;
49
+ solo?: boolean | undefined;
50
+ }[] | undefined;
51
+ complementary?: {
52
+ id: string;
53
+ path?: string | undefined;
54
+ solo?: boolean | undefined;
55
+ }[] | undefined;
56
+ fullScreen?: {
57
+ id: string;
58
+ path?: string | undefined;
59
+ solo?: boolean | undefined;
60
+ }[] | undefined;
61
+ }, never>;
62
+ export type LayoutParts = S.Schema.Type<typeof LayoutPartsSchema>;
63
+ declare const LayoutCoordinateSchema: S.mutable<S.Struct<{
64
+ part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
65
+ entryId: typeof S.String;
66
+ }>>;
67
+ export type LayoutCoordinate = S.Schema.Type<typeof LayoutCoordinateSchema>;
68
+ declare const PartAdjustmentSchema: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["solo"]>]>;
69
+ export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;
70
+ declare const LayoutAdjustmentSchema: S.mutable<S.Struct<{
71
+ layoutCoordinate: S.mutable<S.Struct<{
72
+ part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
73
+ entryId: typeof S.String;
74
+ }>>;
75
+ type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["solo"]>]>;
76
+ }>>;
77
+ export type LayoutAdjustment = S.Schema.Type<typeof LayoutAdjustmentSchema>;
78
+ /** @deprecated */
15
79
  export declare const ActiveParts: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
80
+ export type ActiveParts = z.infer<typeof ActiveParts>;
16
81
  /**
17
82
  * Basic state provided by a navigation plugin.
18
83
  */
19
- export declare const Location: z.ZodObject<{
20
- active: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>]>>;
21
- closed: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
22
- }, "strip", z.ZodTypeAny, {
23
- active?: string | Record<string, string | string[]> | undefined;
24
- closed?: string | string[] | undefined;
25
- }, {
26
- active?: string | Record<string, string | string[]> | undefined;
27
- closed?: string | string[] | undefined;
28
- }>;
29
84
  export declare const Attention: z.ZodObject<{
30
85
  attended: z.ZodOptional<z.ZodSet<z.ZodString>>;
31
86
  }, "strip", z.ZodTypeAny, {
@@ -33,42 +88,107 @@ export declare const Attention: z.ZodObject<{
33
88
  }, {
34
89
  attended?: Set<string> | undefined;
35
90
  }>;
36
- export type ActiveParts = z.infer<typeof ActiveParts>;
37
- export type Location = z.infer<typeof Location>;
38
91
  export type Attention = z.infer<typeof Attention>;
39
- export type LayoutPart = 'sidebar' | 'main' | 'complementary';
40
- export type LayoutCoordinate = {
41
- part: LayoutPart;
42
- index: number;
43
- partSize: number;
44
- solo?: boolean;
45
- };
46
- export type NavigationAdjustmentType = `${'pin' | 'increment'}-${'start' | 'end'}`;
47
- export type NavigationAdjustment = {
48
- layoutCoordinate: LayoutCoordinate;
49
- type: NavigationAdjustmentType;
50
- };
51
- export declare const isActiveParts: (active: string | ActiveParts | undefined) => active is Record<string, string | string[]>;
52
- export declare const isAdjustTransaction: (data: IntentData | undefined) => data is NavigationAdjustment;
53
- export declare const firstMainId: (active: Location['active']) => string;
54
- export declare const activeIds: (active: string | ActiveParts | undefined) => Set<string>;
55
- export declare const isIdActive: (active: string | ActiveParts | undefined, id: string) => boolean;
56
92
  /**
57
93
  * Provides for a plugin that can manage the app navigation.
58
94
  */
59
- export type LocationProvides = {
60
- location: Readonly<Location>;
61
- };
95
+ declare const LocationProvidesSchema: S.mutable<S.Struct<{
96
+ location: S.Struct<{
97
+ active: S.SchemaClass<{
98
+ main?: {
99
+ path?: string | undefined;
100
+ id: string;
101
+ solo?: boolean | undefined;
102
+ }[] | undefined;
103
+ sidebar?: {
104
+ path?: string | undefined;
105
+ id: string;
106
+ solo?: boolean | undefined;
107
+ }[] | undefined;
108
+ complementary?: {
109
+ path?: string | undefined;
110
+ id: string;
111
+ solo?: boolean | undefined;
112
+ }[] | undefined;
113
+ fullScreen?: {
114
+ path?: string | undefined;
115
+ id: string;
116
+ solo?: boolean | undefined;
117
+ }[] | undefined;
118
+ }, {
119
+ main?: {
120
+ id: string;
121
+ path?: string | undefined;
122
+ solo?: boolean | undefined;
123
+ }[] | undefined;
124
+ sidebar?: {
125
+ id: string;
126
+ path?: string | undefined;
127
+ solo?: boolean | undefined;
128
+ }[] | undefined;
129
+ complementary?: {
130
+ id: string;
131
+ path?: string | undefined;
132
+ solo?: boolean | undefined;
133
+ }[] | undefined;
134
+ fullScreen?: {
135
+ id: string;
136
+ path?: string | undefined;
137
+ solo?: boolean | undefined;
138
+ }[] | undefined;
139
+ }, never>;
140
+ closed: S.Array$<typeof S.String>;
141
+ }>;
142
+ }>>;
143
+ export type LocationProvides = S.Schema.Type<typeof LocationProvidesSchema>;
62
144
  /**
63
145
  * Type guard for layout plugins.
64
146
  */
147
+ export declare const isLayoutParts: (value: unknown) => value is {
148
+ main?: {
149
+ path?: string | undefined;
150
+ id: string;
151
+ solo?: boolean | undefined;
152
+ }[] | undefined;
153
+ sidebar?: {
154
+ path?: string | undefined;
155
+ id: string;
156
+ solo?: boolean | undefined;
157
+ }[] | undefined;
158
+ complementary?: {
159
+ path?: string | undefined;
160
+ id: string;
161
+ solo?: boolean | undefined;
162
+ }[] | undefined;
163
+ fullScreen?: {
164
+ path?: string | undefined;
165
+ id: string;
166
+ solo?: boolean | undefined;
167
+ }[] | undefined;
168
+ };
169
+ export declare const isLayoutAdjustment: (value: unknown) => value is {
170
+ type: "solo" | "increment-start" | "increment-end";
171
+ layoutCoordinate: {
172
+ part: "main" | "sidebar" | "complementary" | "fullScreen";
173
+ entryId: string;
174
+ };
175
+ };
65
176
  export declare const parseNavigationPlugin: (plugin: Plugin) => Plugin<LocationProvides> | undefined;
177
+ /**
178
+ * Utilities.
179
+ */
180
+ /** Extracts all unique IDs from the layout parts. */
181
+ export declare const openIds: (layout: LayoutParts) => string[];
182
+ export declare const firstIdInPart: (layout: LayoutParts | undefined, part: LayoutPart) => string | undefined;
183
+ export declare const indexInPart: (layout: LayoutParts | undefined, layoutCoordinate: LayoutCoordinate | undefined) => number | undefined;
184
+ export declare const partLength: (layout: LayoutParts | undefined, part: LayoutPart | undefined) => number;
66
185
  export declare enum NavigationAction {
67
186
  OPEN = "dxos.org/plugin/navigation/open",
68
187
  ADD_TO_ACTIVE = "dxos.org/plugin/navigation/add-to-active",
69
188
  SET = "dxos.org/plugin/navigation/set",
70
189
  ADJUST = "dxos.org/plugin/navigation/adjust",
71
- CLOSE = "dxos.org/plugin/navigation/close"
190
+ CLOSE = "dxos.org/plugin/navigation/close",
191
+ EXPOSE = "dxos.org/plugin/navigation/expose"
72
192
  }
73
193
  /**
74
194
  * Expected payload for navigation actions.
@@ -84,12 +204,11 @@ export declare namespace NavigationAction {
84
204
  * Payload for adding an item to the active items.
85
205
  */
86
206
  type AddToActive = IntentData<{
207
+ part: LayoutPart;
87
208
  id: string;
88
209
  scrollIntoView?: boolean;
89
- pivot?: {
90
- id: string;
91
- position: 'add-before' | 'add-after';
92
- };
210
+ pivotId?: string;
211
+ positioning?: 'start' | 'end';
93
212
  }>;
94
213
  /**
95
214
  * A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)
@@ -106,6 +225,7 @@ export declare namespace NavigationAction {
106
225
  /**
107
226
  * An atomic transaction to apply to `location.active`, describing which element to (attempt to) move to which location.
108
227
  */
109
- type Adjust = IntentData<NavigationAdjustment>;
228
+ type Adjust = IntentData<LayoutAdjustment>;
110
229
  }
230
+ export {};
111
231
  //# sourceMappingURL=navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/navigation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,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AM,GAAG,SAOX,CAAC;AAEF,eAAO,MAAM,UAAU,WAAY,WAAW,GAAG,SAAS,QAAQ,UAAU,GAAG,SAAS,KAAG,MAM1F,CAAC;AAOF,oBAAY,gBAAgB;IAC1B,IAAI,oCAA8B;IAClC,aAAa,6CAAuC;IACpD,GAAG,mCAA6B;IAChC,MAAM,sCAAgC;IACtC,KAAK,qCAA+B;IACpC,MAAM,sCAAgC;CACvC;AAED;;GAEG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACH,KAAY,IAAI,GAAG,UAAU,CAAC;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAC5D;;OAEG;IACH,KAAY,WAAW,GAAG,UAAU,CAAC;QACnC,IAAI,EAAE,UAAU,CAAC;QACjB,EAAE,EAAE,MAAM,CAAC;QACX,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;KAC/B,CAAC,CAAC;IACH;;OAEG;IACH,KAAY,KAAK,GAAG,UAAU,CAAC;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAC7D;;OAEG;IACH,KAAY,GAAG,GAAG,UAAU,CAAC;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAC3D;;OAEG;IACH,KAAY,MAAM,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;CACnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.6.5-staging.a07b6c7",
3
+ "version": "0.6.6-main.e1a6e1f",
4
4
  "description": "A framework for building applications from composible plugins.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -23,22 +23,22 @@
23
23
  "@phosphor-icons/react": "^2.1.5",
24
24
  "@preact/signals-core": "^1.6.0",
25
25
  "zod": "^3.22.4",
26
- "@dxos/async": "0.6.5-staging.a07b6c7",
27
- "@dxos/debug": "0.6.5-staging.a07b6c7",
28
- "@dxos/client-protocol": "0.6.5-staging.a07b6c7",
29
- "@dxos/invariant": "0.6.5-staging.a07b6c7",
30
- "@dxos/app-graph": "0.6.5-staging.a07b6c7",
31
- "@dxos/echo-schema": "0.6.5-staging.a07b6c7",
32
- "@dxos/local-storage": "0.6.5-staging.a07b6c7",
33
- "@dxos/log": "0.6.5-staging.a07b6c7",
34
- "@dxos/util": "0.6.5-staging.a07b6c7"
26
+ "@dxos/async": "0.6.6-main.e1a6e1f",
27
+ "@dxos/client-protocol": "0.6.6-main.e1a6e1f",
28
+ "@dxos/app-graph": "0.6.6-main.e1a6e1f",
29
+ "@dxos/local-storage": "0.6.6-main.e1a6e1f",
30
+ "@dxos/invariant": "0.6.6-main.e1a6e1f",
31
+ "@dxos/echo-schema": "0.6.6-main.e1a6e1f",
32
+ "@dxos/log": "0.6.6-main.e1a6e1f",
33
+ "@dxos/debug": "0.6.6-main.e1a6e1f",
34
+ "@dxos/util": "0.6.6-main.e1a6e1f"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react": "^18.0.21",
38
38
  "react": "~18.2.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "react": "*"
41
+ "react": "~18.2.0"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
package/project.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "compile": {
12
12
  "options": {
13
13
  "entryPoints": [
14
- "packages/sdk/app-framework/src/index.ts"
14
+ "{projectRoot}/src/index.ts"
15
15
  ]
16
16
  }
17
17
  },
@@ -26,6 +26,7 @@ export type PluginContext = {
26
26
  /**
27
27
  * All available plugins.
28
28
  */
29
+ // This is metadata rather then just ids because it includes plugins which have not been fully loaded yet.
29
30
  available: Plugin['meta'][];
30
31
 
31
32
  /**
@@ -2,15 +2,41 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import type { Graph, GraphBuilder } from '@dxos/app-graph';
5
+ import type { Graph, GraphBuilder, Node } from '@dxos/app-graph';
6
+ import { type MaybePromise } from '@dxos/util';
6
7
 
7
8
  import type { Plugin } from '../PluginHost';
8
9
 
10
+ // TODO(wittjosiah): Factor out.
11
+ export type SerializedNode = {
12
+ name: string;
13
+ data: string;
14
+ type?: string;
15
+ };
16
+
17
+ // TODO(wittjosiah): Factor out.
18
+ export type NodeSerializer<T = any> = {
19
+ inputType: string;
20
+ outputType: string;
21
+ disposition?: 'hoist' | 'fallback';
22
+
23
+ /**
24
+ * Takes a node and serializes it into a format that can be stored.
25
+ */
26
+ serialize: (node: Node<T>) => MaybePromise<SerializedNode>;
27
+
28
+ /**
29
+ * Takes a serialized node and deserializes it into the application.
30
+ */
31
+ deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;
32
+ };
33
+
9
34
  /**
10
35
  * Provides for a plugin that exposes the application graph.
11
36
  */
12
37
  export type GraphProvides = {
13
38
  graph: Graph;
39
+ explore: GraphBuilder['explore'];
14
40
  };
15
41
 
16
42
  export type GraphBuilderProvides = {
@@ -19,6 +45,12 @@ export type GraphBuilderProvides = {
19
45
  };
20
46
  };
21
47
 
48
+ export type GraphSerializerProvides = {
49
+ graph: {
50
+ serializer: (plugins: Plugin[]) => NodeSerializer[];
51
+ };
52
+ };
53
+
22
54
  /**
23
55
  * Type guard for graph plugins.
24
56
  */
@@ -30,3 +62,9 @@ export const parseGraphPlugin = (plugin: Plugin) =>
30
62
  */
31
63
  export const parseGraphBuilderPlugin = (plugin: Plugin) =>
32
64
  (plugin.provides as any).graph?.builder ? (plugin as Plugin<GraphBuilderProvides>) : undefined;
65
+
66
+ /**
67
+ * Type guard for graph serializer plugins.
68
+ */
69
+ export const parseGraphSerializerPlugin = (plugin: Plugin) =>
70
+ (plugin.provides as any).graph?.serializer ? (plugin as Plugin<GraphSerializerProvides>) : undefined;