@dxos/app-framework 0.7.2-main.f1adc9f → 0.7.2
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/{chunk-J6LU5GIH.mjs → chunk-EQTQGGE6.mjs} +1 -1
- package/dist/lib/browser/chunk-EQTQGGE6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +4 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{plugin-surface-5XSGJ6BG.mjs → plugin-surface-ZQXFAL46.mjs} +2 -2
- package/dist/lib/node/{chunk-3Q7I5MBZ.cjs → chunk-EF67TRWJ.cjs} +4 -4
- package/dist/lib/node/chunk-EF67TRWJ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +17 -18
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{plugin-surface-ISDV3KI5.cjs → plugin-surface-B5NHOBSW.cjs} +14 -14
- package/dist/lib/node/{plugin-surface-ISDV3KI5.cjs.map → plugin-surface-B5NHOBSW.cjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-BUMQC7VR.mjs → chunk-3FCLBEOX.mjs} +1 -1
- package/dist/lib/node-esm/chunk-3FCLBEOX.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +4 -5
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{plugin-surface-NJNGLW3P.mjs → plugin-surface-QXQRR534.mjs} +2 -2
- package/dist/types/src/plugins/common/navigation.d.ts +1 -1
- package/dist/types/src/plugins/common/navigation.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts +2 -1
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/plugins/common/navigation.ts +2 -4
- package/src/plugins/plugin-surface/SurfaceRootContext.tsx +2 -1
- package/dist/lib/browser/chunk-J6LU5GIH.mjs.map +0 -7
- package/dist/lib/node/chunk-3Q7I5MBZ.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-BUMQC7VR.mjs.map +0 -7
- /package/dist/lib/browser/{plugin-surface-5XSGJ6BG.mjs.map → plugin-surface-ZQXFAL46.mjs.map} +0 -0
- /package/dist/lib/node-esm/{plugin-surface-NJNGLW3P.mjs.map → plugin-surface-QXQRR534.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugins/plugin-surface/SurfacePlugin.tsx", "../../../src/plugins/plugin-surface/SurfaceRootContext.tsx", "../../../src/plugins/plugin-surface/meta.ts", "../../../src/plugins/plugin-surface/provides.ts", "../../../src/plugins/plugin-surface/helpers.ts", "../../../src/plugins/plugin-surface/ErrorBoundary.tsx", "../../../src/plugins/plugin-surface/Surface.tsx", "../../../src/plugins/plugin-surface/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { create } from '@dxos/echo-schema';\n\nimport { SurfaceProvider, type SurfaceRootContext } from './SurfaceRootContext';\nimport SurfaceMeta from './meta';\nimport { parseSurfacePlugin, type SurfacePluginProvides } from './provides';\nimport { filterPlugins } from '../helpers';\nimport { type PluginDefinition } from '../plugin-host';\n\n/**\n * Provides a registry of surface components.\n */\nexport const SurfacePlugin = (): PluginDefinition<SurfacePluginProvides> => {\n const state = create<SurfaceRootContext>({ components: {}, debugInfo: new Map() });\n\n return {\n meta: SurfaceMeta,\n ready: async (plugins) => {\n state.components = filterPlugins(plugins, parseSurfacePlugin).reduce((acc, plugin) => {\n return { ...acc, [plugin.meta.id]: plugin.provides.surface.component };\n }, {});\n },\n provides: {\n surface: state,\n context: ({ children }) => <SurfaceProvider value={state}>{children}</SurfaceProvider>,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext, useContext, type JSX, type ForwardedRef } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { type SurfaceProps } from './Surface';\n\n// TODO(wittjosiah): Factor out.\ntype WithRequiredProperty<Type, Key extends keyof Type> = Type & {\n [Property in Key]-?: Type[Property];\n};\n\ntype SurfaceComponentProps = WithRequiredProperty<SurfaceProps, 'data'>;\n\n/**\n * Determines the priority of the surface when multiple components are resolved.\n */\nexport type SurfaceDisposition = 'hoist' | 'fallback';\n\n/**\n * Surface debug info.\n * NOTE: Short-term measure to track perf issues.\n */\nexport type DebugInfo = {\n id: string;\n created: number;\n renderCount: number;\n} & Pick<SurfaceProps, 'role' | 'name'>;\n\nexport type SurfaceResult = {\n node: JSX.Element;\n disposition?: SurfaceDisposition;\n};\n\n/**\n * Function which resolves a Surface.\n *\n * If a null value is returned, the rendering is deferred to other plugins.\n */\nexport type SurfaceComponent = (\n props: SurfaceComponentProps,\n forwardedRef: ForwardedRef<HTMLElement>,\n) => JSX.Element | SurfaceResult | null;\n\nexport type SurfaceRootContext = {\n components: Record<string, SurfaceComponent>;\n\n /**\n * Debug info.\n */\n debugInfo?: Map<string, DebugInfo>;\n};\n\nconst SurfaceRootContext = createContext<SurfaceRootContext | undefined>(undefined);\n\nexport const useSurfaceRoot = () => useContext(SurfaceRootContext) ?? raise(new Error('Missing SurfaceRootContext'));\n\nexport const SurfaceProvider = SurfaceRootContext.Provider;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nconst SurfaceMeta = {\n id: 'dxos.org/plugin/surface',\n};\n\nexport default SurfaceMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type SurfaceComponent, type SurfaceRootContext } from './SurfaceRootContext';\nimport { type Plugin } from '../plugin-host';\n\n// TODO(burdon): Predicate based providers?\nexport type SurfaceProvides = {\n surface: {\n /**\n * Used by the `Surface` resolver to find a component to render.\n */\n component: SurfaceComponent;\n };\n};\n\nexport type SurfacePluginProvides = {\n surface: SurfaceRootContext;\n};\n\nexport const parseRootSurfacePlugin = (plugin?: Plugin) =>\n (plugin?.provides as any)?.surface?.components ? (plugin as Plugin<SurfacePluginProvides>) : undefined;\n\nexport const parseSurfacePlugin = (plugin?: Plugin) =>\n (plugin?.provides as any)?.surface?.component ? (plugin as Plugin<SurfaceProvides>) : undefined;\n", "//\n// Copyright 2023 DXOS.org\n//\n\n/**\n * Checks if the given data is an object and not null.\n *\n * Useful inside surface component resolvers as a type guard.\n *\n * @example\n * ```ts\n * const old =\n * data.content &&\n * typeof data.content === 'object' &&\n * 'id' in data.content &&\n * typeof data.content.id === 'string';\n *\n * // becomes\n * const new = isObject(data.content) && typeof data.content.id === 'string';\n * ```\n */\nexport const isObject = (data: unknown): data is { [key: string]: unknown } => !!data && typeof data === 'object';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { Component, type FC, type PropsWithChildren } from 'react';\n\ntype Props = PropsWithChildren<{ data?: any; fallback: FC<{ data?: any; error: Error; reset: () => void }> }>;\ntype State = { error: Error | undefined };\n\n/**\n * Surface error boundary.\n *\n * For basic usage prefer providing a fallback component to `Surface`.\n *\n * For more information on error boundaries, see:\n * https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary\n */\nexport class ErrorBoundary extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { error: undefined };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error };\n }\n\n override componentDidUpdate(prevProps: Props): void {\n if (prevProps.data !== this.props.data) {\n this.resetError();\n }\n }\n\n override render() {\n if (this.state.error) {\n return <this.props.fallback data={this.props.data} error={this.state.error} reset={this.resetError} />;\n }\n\n return this.props.children;\n }\n\n private resetError() {\n this.setState({ error: undefined });\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport React, {\n Fragment,\n type ForwardedRef,\n type PropsWithChildren,\n type ReactNode,\n Suspense,\n createContext,\n forwardRef,\n isValidElement,\n memo,\n useContext,\n useEffect,\n useState,\n} from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { log } from '@dxos/log';\n\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { type SurfaceComponent, type SurfaceResult, useSurfaceRoot } from './SurfaceRootContext';\n\n/**\n * Direction determines how multiple components are laid out.\n */\nexport type Direction = 'inline' | 'inline-reverse' | 'block' | 'block-reverse';\n\n/**\n * SurfaceProps are the props that are passed to the Surface component.\n */\nexport type SurfaceProps = PropsWithChildren<{\n /**\n * Optional ID for debugging.\n */\n id?: string;\n\n /**\n * Role defines how the data should be rendered.\n */\n role?: string;\n\n /**\n * Names allow nested surfaces to be specified in the parent context, similar to a slot.\n * Defaults to the value of `role` if not specified.\n */\n name?: string;\n\n /**\n * The data to be rendered by the surface.\n */\n data?: Record<string, unknown>;\n\n /**\n * Configure nested surfaces (indexed by the surface's `name`).\n */\n surfaces?: Record<string, Pick<SurfaceProps, 'data' | 'surfaces'>>;\n\n /**\n * If specified, the Surface will be wrapped in an error boundary.\n * The fallback component will be rendered if an error occurs.\n */\n fallback?: ErrorBoundary['props']['fallback'];\n\n /**\n * If specified, the Surface will be wrapped in a suspense boundary.\n * The placeholder component will be rendered while the surface component is loading.\n */\n placeholder?: ReactNode;\n\n /**\n * If more than one component is resolved, the limit determines how many are rendered.\n */\n limit?: number | undefined;\n\n /**\n * If more than one component is resolved, the direction determines how they are laid out.\n * NOTE: This is not yet implemented.\n */\n direction?: Direction;\n\n /**\n * Additional props to pass to the component.\n * These props are not used by Surface itself but may be used by components which resolve the surface.\n */\n [key: string]: unknown;\n}>;\n\nlet count = 0;\n\n/**\n * A surface is a named region of the screen that can be populated by plugins.\n */\nexport const Surface = memo(\n forwardRef<HTMLElement, SurfaceProps>(\n ({ id: _id, role, name = role, fallback, placeholder, ...rest }, forwardedRef) => {\n const props = { role, name, fallback, ...rest };\n const { debugInfo } = useSurfaceRoot();\n\n // Track debug info.\n const [id] = useState<string>(() => _id ?? `surface-${++count}`);\n useEffect(() => {\n debugInfo?.set(id, { id, created: Date.now(), name, role, renderCount: 0 });\n return () => {\n debugInfo?.delete(id);\n };\n }, [id]);\n\n if (debugInfo?.get(id)) {\n debugInfo.get(id)!.renderCount++;\n }\n\n const context = useContext(SurfaceContext);\n const data = props.data ?? ((name && context?.surfaces?.[name]?.data) || {});\n\n const resolver = <SurfaceResolver {...props} id={id} ref={forwardedRef} />;\n const suspense = placeholder ? <Suspense fallback={placeholder}>{resolver}</Suspense> : resolver;\n\n return fallback ? (\n <ErrorBoundary data={data} fallback={fallback}>\n {suspense}\n </ErrorBoundary>\n ) : (\n suspense\n );\n },\n ),\n);\n\nconst SurfaceContext = createContext<SurfaceProps | undefined>(undefined);\n\nexport const useSurface = (): SurfaceProps =>\n useContext(SurfaceContext) ?? raise(new Error('Surface context not found'));\n\n/**\n * Root surface component.\n */\nconst SurfaceResolver = forwardRef<HTMLElement, SurfaceProps>((props, forwardedRef) => {\n const { components } = useSurfaceRoot();\n const parent = useContext(SurfaceContext);\n const nodes = resolveNodes(components, props, parent, forwardedRef);\n const currentContext: SurfaceProps = {\n ...props,\n surfaces: {\n ...((props.name && parent?.surfaces?.[props.name]?.surfaces) || {}),\n ...props.surfaces,\n },\n };\n\n return <SurfaceContext.Provider value={currentContext}>{nodes}</SurfaceContext.Provider>;\n});\n\n/**\n * Resolve surface nodes from across all component.\n */\nconst resolveNodes = (\n components: Record<string, SurfaceComponent>,\n props: SurfaceProps,\n context: SurfaceProps | undefined,\n forwardedRef: ForwardedRef<HTMLElement>,\n): ReactNode[] => {\n const data = {\n ...((props.name && context?.surfaces?.[props.name]?.data) || {}),\n ...props.data,\n };\n\n const candidates = Object.entries(components)\n .map(([key, component]): [string, SurfaceResult] | undefined => {\n // TODO(burdon): Avoid variable return types in plugin contract.\n const result = component({ ...props, data }, forwardedRef);\n if (!result || typeof result !== 'object') {\n return undefined;\n }\n\n // Normalize tuple.\n if ('node' in result) {\n return [key, result];\n } else if (isValidElement(result)) {\n return [key, { node: result }];\n } else {\n log.warn('invalid result', { result });\n return undefined;\n }\n })\n .filter((result): result is [string, SurfaceResult] => Boolean(result))\n .sort(([, { disposition: a = 'default' }], [, { disposition: b = 'default' }]) => {\n return a === b ? 0 : a === 'hoist' || b === 'fallback' ? -1 : b === 'hoist' || a === 'fallback' ? 1 : 0;\n });\n\n // TODO(burdon): Does this prematurely process the node?\n const nodes = candidates.map(([key, result]) => <Fragment key={key}>{result.node}</Fragment>);\n return props.limit ? nodes.slice(0, props.limit) : nodes;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SurfacePlugin } from './SurfacePlugin';\n\nexport * from './helpers';\nexport * from './provides';\n\nexport * from './ErrorBoundary';\nexport * from './Surface';\nexport * from './SurfaceRootContext';\n\nexport default SurfacePlugin;\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAc;;;ACFvB,SAASC,eAAeC,kBAA+C;AAEvE,SAASC,aAAa;AAkDtB,IAAMC,qBAAqBC,8BAA8CC,MAAAA;AAElE,IAAMC,iBAAiB,MAAMC,WAAWJ,kBAAAA,KAAuBK,MAAM,IAAIC,MAAM,4BAAA,CAAA;AAE/E,IAAMC,kBAAkBP,mBAAmBQ;;;ACxDlD,IAAMC,cAAc;EAClBC,IAAI;AACN;AAEA,IAAA,eAAeD;;;ACaR,IAAME,yBAAyB,CAACC,WACpCA,QAAQC,UAAkBC,SAASC,aAAcH,SAA2CI;AAExF,IAAMC,qBAAqB,CAACL,WAChCA,QAAQC,UAAkBC,SAASI,YAAaN,SAAqCI;;;AHRjF,IAAMG,gBAAgB,MAAA;AAC3B,QAAMC,QAAQC,OAA2B;IAAEC,YAAY,CAAC;IAAGC,WAAW,oBAAIC,IAAAA;EAAM,CAAA;AAEhF,SAAO;IACLC,MAAMC;IACNC,OAAO,OAAOC,YAAAA;AACZR,YAAME,aAAaO,cAAcD,SAASE,kBAAAA,EAAoBC,OAAO,CAACC,KAAKC,WAAAA;AACzE,eAAO;UAAE,GAAGD;UAAK,CAACC,OAAOR,KAAKS,EAA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MwB,MAAM,GAAGvD,MAAMsD,KAAK,IAAIvB;AACrD;;;ACrLA,IAAA,yBAAeyB;",
|
|
6
|
+
"names": ["React", "create", "createContext", "useContext", "raise", "SurfaceRootContext", "createContext", "undefined", "useSurfaceRoot", "useContext", "raise", "Error", "SurfaceProvider", "Provider", "SurfaceMeta", "id", "parseRootSurfacePlugin", "plugin", "provides", "surface", "components", "undefined", "parseSurfacePlugin", "component", "SurfacePlugin", "state", "create", "components", "debugInfo", "Map", "meta", "SurfaceMeta", "ready", "plugins", "filterPlugins", "parseSurfacePlugin", "reduce", "acc", "plugin", "id", "provides", "surface", "component", "context", "children", "SurfaceProvider", "value", "isObject", "data", "React", "Component", "ErrorBoundary", "Component", "constructor", "props", "state", "error", "undefined", "getDerivedStateFromError", "componentDidUpdate", "prevProps", "data", "resetError", "render", "React", "this", "fallback", "reset", "children", "setState", "React", "Fragment", "Suspense", "createContext", "forwardRef", "isValidElement", "memo", "useContext", "useEffect", "useState", "raise", "log", "count", "Surface", "memo", "forwardRef", "id", "_id", "role", "name", "fallback", "placeholder", "rest", "forwardedRef", "props", "debugInfo", "useSurfaceRoot", "useState", "useEffect", "set", "created", "Date", "now", "renderCount", "delete", "get", "context", "useContext", "SurfaceContext", "data", "surfaces", "resolver", "React", "SurfaceResolver", "ref", "suspense", "Suspense", "ErrorBoundary", "createContext", "undefined", "useSurface", "raise", "Error", "components", "parent", "nodes", "resolveNodes", "currentContext", "Provider", "value", "candidates", "Object", "entries", "map", "key", "component", "result", "isValidElement", "node", "log", "warn", "filter", "Boolean", "sort", "disposition", "a", "b", "Fragment", "limit", "slice", "SurfacePlugin"]
|
|
7
|
+
}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseSurfacePlugin,
|
|
19
19
|
useSurface,
|
|
20
20
|
useSurfaceRoot
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EQTQGGE6.mjs";
|
|
22
22
|
import {
|
|
23
23
|
definePlugin,
|
|
24
24
|
filterPlugins,
|
|
@@ -131,7 +131,6 @@ var parseMetadataResolverPlugin = (plugin) => {
|
|
|
131
131
|
// packages/sdk/app-framework/src/plugins/common/navigation.ts
|
|
132
132
|
import { Schema as S } from "@effect/schema";
|
|
133
133
|
import { z as z2 } from "zod";
|
|
134
|
-
import { pick } from "@dxos/util";
|
|
135
134
|
var SLUG_LIST_SEPARATOR = "+";
|
|
136
135
|
var SLUG_ENTRY_SEPARATOR = "_";
|
|
137
136
|
var SLUG_KEY_VALUE_SEPARATOR = "-";
|
|
@@ -183,8 +182,8 @@ var parseNavigationPlugin = (plugin) => {
|
|
|
183
182
|
}
|
|
184
183
|
return void 0;
|
|
185
184
|
};
|
|
186
|
-
var openIds = (layout
|
|
187
|
-
return Object.values(
|
|
185
|
+
var openIds = (layout) => {
|
|
186
|
+
return Object.values(layout).flatMap((part) => part?.map((entry) => entry.id) ?? []).filter((id) => id !== void 0);
|
|
188
187
|
};
|
|
189
188
|
var firstIdInPart = (layout, part) => {
|
|
190
189
|
if (!layout) {
|
|
@@ -455,7 +454,7 @@ var createApp = ({ meta, plugins, core, ...params }) => {
|
|
|
455
454
|
...plugins,
|
|
456
455
|
[meta_default.id]: Plugin.lazy(() => import("./plugin-intent-Q5KFPKFA.mjs")),
|
|
457
456
|
[meta_default3.id]: Plugin.lazy(() => import("./plugin-settings-OM3G2QFY.mjs")),
|
|
458
|
-
[meta_default2.id]: Plugin.lazy(() => import("./plugin-surface-
|
|
457
|
+
[meta_default2.id]: Plugin.lazy(() => import("./plugin-surface-ZQXFAL46.mjs"))
|
|
459
458
|
},
|
|
460
459
|
meta: [
|
|
461
460
|
meta_default,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/plugins/common/file.ts", "../../../src/plugins/common/graph.ts", "../../../src/plugins/common/layout.ts", "../../../src/plugins/common/metadata.ts", "../../../src/plugins/common/navigation.ts", "../../../src/plugins/common/translations.ts", "../../../src/plugins/plugin-host/plugin.ts", "../../../src/plugins/plugin-host/HostPlugin.tsx", "../../../src/plugins/plugin-host/PluginContainer.tsx", "../../../src/plugins/plugin-host/PluginContext.tsx", "../../../src/App.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Space } from '@dxos/client-protocol';\n\nimport { type Plugin } from '../plugin-host';\n\n// TODO(burdon): See Accept attribute (uses MIME types).\n// E.g., 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\nexport const defaultFileTypes = {\n images: ['png', 'jpg', 'jpeg', 'gif'],\n media: ['mp3', 'mp4', 'mov', 'avi'],\n text: ['pdf', 'txt', 'md'],\n};\n\nexport type FileInfo = {\n url?: string;\n cid?: string; // TODO(burdon): Meta key? Or other common properties with other file management system? (e.g., WNFS).\n};\n\nexport type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;\n\n/**\n * Generic interface provided by file plugins (e.g., IPFS, WNFS).\n */\nexport type FileManagerProvides = {\n file: {\n upload?: FileUploader;\n };\n};\n\n// TODO(burdon): Better match against interface? and Return provided service type. What if multiple?\nexport const parseFileManagerPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).file ? (plugin as Plugin<FileManagerProvides>) : undefined;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { Graph, GraphBuilder, Node } from '@dxos/app-graph';\nimport { type MaybePromise } from '@dxos/util';\n\nimport type { Plugin } from '../plugin-host';\n\n// TODO(wittjosiah): Factor out.\nexport type SerializedNode = {\n name: string;\n data: string;\n type?: string;\n};\n\n// TODO(wittjosiah): Factor out.\nexport type NodeSerializer<T = any> = {\n inputType: string;\n outputType: string;\n disposition?: 'hoist' | 'fallback';\n\n /**\n * Takes a node and serializes it into a format that can be stored.\n */\n serialize: (node: Node<T>) => MaybePromise<SerializedNode>;\n\n /**\n * Takes a serialized node and deserializes it into the application.\n */\n deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;\n};\n\n/**\n * Provides for a plugin that exposes the application graph.\n */\nexport type GraphProvides = {\n graph: Graph;\n explore: GraphBuilder['explore'];\n};\n\nexport type GraphBuilderProvides = {\n graph: {\n builder: (plugins: Plugin[]) => Parameters<GraphBuilder['addExtension']>[0];\n };\n};\n\nexport type GraphSerializerProvides = {\n graph: {\n serializer: (plugins: Plugin[]) => NodeSerializer[];\n };\n};\n\n/**\n * Type guard for graph plugins.\n */\nexport const parseGraphPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.root ? (plugin as Plugin<GraphProvides>) : undefined;\n\n/**\n * Type guard for graph builder plugins.\n */\nexport const parseGraphBuilderPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.builder ? (plugin as Plugin<GraphBuilderProvides>) : undefined;\n\n/**\n * Type guard for graph serializer plugins.\n */\nexport const parseGraphSerializerPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.serializer ? (plugin as Plugin<GraphSerializerProvides>) : undefined;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { z } from 'zod';\n\nimport { type Plugin } from '../plugin-host';\nimport { type IntentData } from '../plugin-intent';\n\n//\n// Provides\n//\n\nexport const Toast = z.object({\n id: z.string(),\n title: z.string().optional(),\n description: z.string().optional(),\n // TODO(wittjosiah): `icon` should be string to be parsed by an `Icon` component.\n icon: z.any().optional(),\n duration: z.number().optional(),\n closeLabel: z.string().optional(),\n actionLabel: z.string().optional(),\n actionAlt: z.string().optional(),\n onAction: z.function().optional(),\n});\n\nexport type Toast = z.infer<typeof Toast>;\n\n/**\n * Basic state provided by a layout plugin.\n *\n * Layout provides the state of global UI landmarks, such as the sidebar, dialog, and popover.\n * Generally only one dialog or popover should be open at a time, a layout plugin should manage this.\n * For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.\n */\n\nconst LayoutMode = z.union([z.literal('deck'), z.literal('solo'), z.literal('fullscreen')]);\nexport const isLayoutMode = (value: any): value is LayoutMode => LayoutMode.safeParse(value).success;\nexport type LayoutMode = z.infer<typeof LayoutMode>;\n\n// TODO(wittjosiah): Replace Zod w/ Effect Schema to align with ECHO.\nexport const Layout = z.object({\n layoutMode: z.union([z.literal('deck'), z.literal('solo'), z.literal('fullscreen')]),\n\n sidebarOpen: z.boolean(),\n complementarySidebarOpen: z.boolean(),\n /**\n * @deprecated\n */\n complementarySidebarContent: z\n .any()\n .optional()\n .describe('DEPRECATED. Data to be passed to the complementary sidebar Surface.'),\n\n dialogOpen: z.boolean(),\n dialogContent: z.any().optional().describe('Data to be passed to the dialog Surface.'),\n // TODO(wittjosiah): Custom properties?\n dialogBlockAlign: z.union([z.literal('start'), z.literal('center')]).optional(),\n\n popoverOpen: z.boolean(),\n popoverContent: z.any().optional().describe('Data to be passed to the popover Surface.'),\n popoverAnchorId: z.string().optional(),\n\n toasts: z.array(Toast),\n\n scrollIntoView: z\n .string()\n .optional()\n .describe('The identifier of a component to scroll into view when it is mounted.'),\n});\n\nexport type Layout = z.infer<typeof Layout>;\n\n/**\n * Provides for a plugin that can manage the app layout.\n */\nexport type LayoutProvides = {\n layout: Readonly<Layout>;\n};\n\n/**\n * Type guard for layout plugins.\n */\nexport const parseLayoutPlugin = (plugin: Plugin) => {\n const { success } = Layout.safeParse((plugin.provides as any).layout);\n return success ? (plugin as Plugin<LayoutProvides>) : undefined;\n};\n\n//\n// Intents\n//\n\nconst LAYOUT_PLUGIN = 'dxos.org/plugin/layout';\n\nconst LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;\n\nexport enum LayoutAction {\n SET_LAYOUT = `${LAYOUT_ACTION}/set-layout`,\n SET_LAYOUT_MODE = `${LAYOUT_ACTION}/set-layout-mode`,\n SCROLL_INTO_VIEW = `${LAYOUT_ACTION}/scroll-into-view`,\n UPDATE_PLANK_SIZE = `${LAYOUT_ACTION}/update-plank-size`,\n}\n\n/**\n * Expected payload for layout actions.\n */\nexport namespace LayoutAction {\n export type SetLayoutMode = IntentData<{\n layoutMode?: LayoutMode;\n revert?: boolean;\n }>;\n\n export type SetLayout = IntentData<{\n /**\n * Element to set the state of.\n */\n element: 'fullscreen' | 'sidebar' | 'complementary' | 'dialog' | 'popover' | 'toast';\n\n /**\n * Whether the element is on or off.\n *\n * If omitted, the element's state will be toggled or set based on other provided data.\n * For example, if `component` is provided, the state will be set to `true`.\n */\n state?: boolean;\n\n /**\n * Component to render in the dialog or popover.\n */\n component?: string;\n\n /**\n * Data to be passed to the dialog or popover Surface.\n */\n subject?: any;\n\n /**\n * Anchor ID for the popover.\n */\n anchorId?: string;\n\n // TODO(wittjosiah): Custom properties?\n\n /**\n * Block alignment for the dialog.\n */\n dialogBlockAlign?: 'start' | 'center';\n }>;\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '../plugin-host';\n\nexport type Metadata = Record<string, any>;\n\nexport type MetadataRecordsProvides = {\n metadata: {\n records: Record<string, Metadata>;\n };\n};\n\nexport type MetadataResolver = (type: string) => Metadata;\n\nexport type MetadataResolverProvides = {\n metadata: {\n resolver: MetadataResolver;\n };\n};\n\nexport const parseMetadataRecordsPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).metadata?.records ? (plugin as Plugin<MetadataRecordsProvides>) : undefined;\n};\n\nexport const parseMetadataResolverPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).metadata?.resolver ? (plugin as Plugin<MetadataResolverProvides>) : undefined;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema as S } from '@effect/schema';\nimport { z } from 'zod';\n\nimport { pick } from '@dxos/util';\n\nimport { type Plugin } from '../plugin-host';\nimport { type IntentData } from '../plugin-intent';\n\n// NOTE(thure): These are chosen from RFC 1738’s `safe` characters: http://www.faqs.org/rfcs/rfc1738.html\nexport const SLUG_LIST_SEPARATOR = '+';\nexport const SLUG_ENTRY_SEPARATOR = '_';\nexport const SLUG_KEY_VALUE_SEPARATOR = '-';\nexport const SLUG_PATH_SEPARATOR = '~';\nexport const SLUG_COLLECTION_INDICATOR = '';\n\nconst LayoutEntrySchema = S.mutable(S.Struct({ id: S.String, path: S.optional(S.String) }));\nexport type LayoutEntry = S.Schema.Type<typeof LayoutEntrySchema>;\n\n// TODO(Zan): Consider renaming the 'main' part to 'deck' part now that we are throwing out the old layout plugin.\n// TODO(Zan): Extend to all strings?\nconst LayoutPartSchema = S.Union(\n S.Literal('sidebar'),\n S.Literal('main'),\n S.Literal('solo'),\n S.Literal('complementary'),\n S.Literal('fullScreen'),\n);\nexport type LayoutPart = S.Schema.Type<typeof LayoutPartSchema>;\n\nconst LayoutPartsSchema = S.partial(\n S.mutable(S.Record({ key: LayoutPartSchema, value: S.mutable(S.Array(LayoutEntrySchema)) })),\n);\nexport type LayoutParts = S.Schema.Type<typeof LayoutPartsSchema>;\n\nconst LayoutCoordinateSchema = S.mutable(S.Struct({ part: LayoutPartSchema, entryId: S.String }));\nexport type LayoutCoordinate = S.Schema.Type<typeof LayoutCoordinateSchema>;\n\nconst PartAdjustmentSchema = S.Union(S.Literal('increment-start'), S.Literal('increment-end'), S.Literal('solo'));\nexport type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;\n\nconst LayoutAdjustmentSchema = S.mutable(\n S.Struct({ layoutCoordinate: LayoutCoordinateSchema, type: PartAdjustmentSchema }),\n);\nexport type LayoutAdjustment = S.Schema.Type<typeof LayoutAdjustmentSchema>;\n\n/** @deprecated */\nexport const ActiveParts = z.record(z.string(), z.union([z.string(), z.array(z.string())]));\nexport type ActiveParts = z.infer<typeof ActiveParts>;\n\n// TODO(burdon): Where should this go?\nexport type LayoutContainerProps<T> = T & { role?: string; coordinate?: LayoutCoordinate };\n\n/**\n * Provides for a plugin that can manage the app navigation.\n */\nconst LocationProvidesSchema = S.mutable(\n S.Struct({\n location: S.Struct({\n active: LayoutPartsSchema,\n closed: S.Array(S.String),\n }),\n }),\n);\nexport type LocationProvides = S.Schema.Type<typeof LocationProvidesSchema>;\n\n/**\n * Type guard for layout plugins.\n */\nexport const isLayoutParts = (value: unknown): value is LayoutParts => {\n return S.is(LayoutPartsSchema)(value);\n};\n\n// Type guard for PartAdjustment.\nexport const isLayoutAdjustment = (value: unknown): value is LayoutAdjustment => {\n return S.is(LayoutAdjustmentSchema)(value);\n};\n\nexport const parseNavigationPlugin = (plugin: Plugin): Plugin<LocationProvides> | undefined => {\n const location = (plugin.provides as any)?.location;\n if (!location) {\n return undefined;\n }\n\n if (S.is(LocationProvidesSchema)({ location })) {\n return plugin as Plugin<LocationProvides>;\n }\n\n return undefined;\n};\n\n/**\n * Utilities.\n */\n\n/** Extracts all unique IDs from the layout parts. */\nexport const openIds = (layout: LayoutParts, parts?: LayoutPart[]): string[] => {\n return Object.values(parts ? pick(layout, parts) : layout)\n .flatMap((part) => part?.map((entry) => entry.id) ?? [])\n .filter((id): id is string => id !== undefined);\n};\n\nexport const firstIdInPart = (layout: LayoutParts | undefined, part: LayoutPart): string | undefined => {\n if (!layout) {\n return undefined;\n }\n\n return layout[part]?.at(0)?.id;\n};\n\nexport const indexInPart = (\n layout: LayoutParts | undefined,\n layoutCoordinate: LayoutCoordinate | undefined,\n): number | undefined => {\n if (!layout || !layoutCoordinate) {\n return undefined;\n }\n\n const { part, entryId } = layoutCoordinate;\n return layout[part]?.findIndex((entry) => entry.id === entryId);\n};\n\nexport const partLength = (layout: LayoutParts | undefined, part: LayoutPart | undefined): number => {\n if (!layout || !part) {\n return 0;\n }\n\n return layout[part]?.length ?? 0;\n};\n\n//\n// Intents\n//\n\nconst NAVIGATION_PLUGIN = 'dxos.org/plugin/navigation';\n\nconst NAVIGATION_ACTION = `${NAVIGATION_PLUGIN}/action`;\n\nexport enum NavigationAction {\n OPEN = `${NAVIGATION_ACTION}/open`,\n ADD_TO_ACTIVE = `${NAVIGATION_ACTION}/add-to-active`,\n SET = `${NAVIGATION_ACTION}/set`,\n ADJUST = `${NAVIGATION_ACTION}/adjust`,\n CLOSE = `${NAVIGATION_ACTION}/close`,\n EXPOSE = `${NAVIGATION_ACTION}/expose`,\n}\n\n/**\n * Expected payload for navigation actions.\n */\nexport namespace NavigationAction {\n /**\n * An additive overlay to apply to `location.active` (i.e. the result is a union of previous active and the argument)\n */\n export type Open = IntentData<{ activeParts: ActiveParts }>;\n\n /**\n * Payload for adding an item to the active items.\n */\n export type AddToActive = IntentData<{\n part: LayoutPart;\n id: string;\n scrollIntoView?: boolean;\n pivotId?: string;\n positioning?: 'start' | 'end';\n }>;\n\n /**\n * A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)\n */\n export type Close = IntentData<{ activeParts: ActiveParts; noToggle?: boolean }>;\n\n /**\n * The active parts to directly set, to be used when working with URLs or restoring a specific state.\n */\n export type Set = IntentData<{ activeParts: ActiveParts }>;\n\n /**\n * An atomic transaction to apply to `location.active`, describing which element to (attempt to) move to which location.\n */\n export type Adjust = IntentData<LayoutAdjustment>;\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { z } from 'zod';\n\nimport { type Plugin } from '../plugin-host';\n\n// TODO(burdon): Replace zed with effect.\nexport const ResourceKey = z.union([z.string(), z.record(z.any())]);\nexport type ResourceKey = z.infer<typeof ResourceKey>;\n\nexport const ResourceLanguage = z.record(ResourceKey);\nexport type ResourceLanguage = z.infer<typeof ResourceLanguage>;\n\n/**\n * A resource is a collection of translations for a language.\n */\nexport const Resource = z.record(ResourceLanguage);\nexport type Resource = z.infer<typeof Resource>;\n\n/**\n * Provides for a plugin that exposes translations.\n */\n// TODO(wittjosiah): Rename to TranslationResourcesProvides.\nexport type TranslationsProvides = {\n translations: Readonly<Resource[]>;\n};\n\n/**\n * Type guard for translation plugins.\n */\nexport const parseTranslationsPlugin = (plugin: Plugin) => {\n const { success } = z.array(Resource).safeParse((plugin.provides as any).translations);\n return success ? (plugin as Plugin<TranslationsProvides>) : undefined;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { FC, PropsWithChildren } from 'react';\n\n/**\n * Capabilities provided by a plugin.\n * The base surface capabilities are always included.\n */\nexport type PluginProvides<TProvides> = TProvides & {\n /**\n * React Context which is wrapped around the application to enable any hooks the plugin may provide.\n */\n context?: FC<PropsWithChildren>;\n\n /*\n * React component which is rendered at the root of the application.\n */\n root?: FC<PropsWithChildren>;\n};\n\nexport type PluginMeta = {\n /**\n * Globally unique ID.\n *\n * Expected to be in the form of a valid URL.\n *\n * @example dxos.org/plugin/example\n */\n id: string;\n\n /**\n * Short ID for use in URLs.\n *\n * NOTE: This is especially experimental and likely to change.\n */\n // TODO(wittjosiah): How should these be managed?\n shortId?: string;\n\n /**\n * Human-readable name.\n */\n name?: string;\n\n /**\n * Short description of plugin functionality.\n */\n description?: string;\n\n /**\n * URL of home page.\n */\n homePage?: string;\n\n /**\n * URL of source code.\n */\n source?: string;\n\n /**\n * Tags to help categorize the plugin.\n */\n tags?: string[];\n\n /**\n * A grep-able symbol string which can be resolved to an icon asset by @ch-ui/icons, via @ch-ui/vite-plugin-icons.\n */\n icon?: string;\n};\n\n/**\n * A unit of containment of modular functionality that can be provided to an application.\n * Plugins provide things like components, state, actions, etc. to the application.\n */\nexport type Plugin<TProvides = {}> = {\n meta: PluginMeta;\n\n /**\n * Capabilities provided by the plugin.\n */\n provides: PluginProvides<TProvides>;\n};\n\n/**\n * Plugin definitions extend the base `Plugin` interface with additional lifecycle methods.\n */\nexport type PluginDefinition<TProvides = {}, TInitializeProvides = {}> = Omit<Plugin, 'provides'> & {\n /**\n * Capabilities provided by the plugin.\n */\n provides?: Plugin<TProvides>['provides'];\n\n /**\n * Initialize any async behavior required by the plugin.\n *\n * @return Capabilities provided by the plugin which are merged with base capabilities.\n */\n initialize?: () => Promise<PluginProvides<TInitializeProvides> | void>;\n\n /**\n * Called once all plugins have been initialized.\n * This is the place to do any initialization which requires other plugins to be ready.\n *\n * @param plugins All plugins which successfully initialized.\n */\n // TODO(wittjosiah): Rename `ready` to a verb?\n ready?: (plugins: Plugin[]) => Promise<void>;\n\n /**\n * Called when the plugin is unloaded.\n * This is the place to do any cleanup required by the plugin.\n */\n unload?: () => Promise<void>;\n};\n\ntype LazyPlugin<T> = () => Promise<{ default: (props: T) => PluginDefinition }>;\n\nexport namespace Plugin {\n export const lazy = <T>(p: LazyPlugin<T>, props?: T) => {\n return () =>\n p().then(({ default: definition }) => {\n return definition(props as T);\n });\n };\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport { PluginContainer } from './PluginContainer';\nimport { type PluginContext, PluginProvider } from './PluginContext';\nimport { type Plugin, type PluginDefinition, type PluginMeta } from './plugin';\nimport { ErrorBoundary } from '../plugin-surface';\n\nexport type HostPluginParams = {\n plugins: Record<string, () => Promise<PluginDefinition>>;\n // Ordered list of plugins.\n meta: PluginMeta[];\n core: string[];\n defaults?: string[];\n fallback?: ErrorBoundary['props']['fallback'];\n placeholder?: ReactNode;\n};\n\nexport type HostPluginProvides = {\n plugins: PluginContext;\n};\n\nexport const parsePluginHost = (plugin: Plugin) =>\n (plugin.provides as HostPluginProvides).plugins ? (plugin as Plugin<HostPluginProvides>) : undefined;\n\nconst HOST_PLUGIN = 'dxos.org/plugin/host';\n\n/**\n * Bootstraps an application by initializing plugins and rendering root components.\n */\nexport const HostPlugin = ({\n plugins,\n meta,\n core,\n defaults = [],\n fallback = DefaultFallback,\n placeholder = null,\n}: HostPluginParams): PluginDefinition<HostPluginProvides> => {\n const state = new LocalStorageStore<PluginContext>(HOST_PLUGIN, {\n ready: false,\n core,\n enabled: [...defaults],\n plugins: [],\n available: meta.filter(({ id }) => !core.includes(id)),\n // TODO(burdon): Functions should not be part of the settings type.\n setPlugin: (id: string, enabled: boolean) => {\n if (enabled) {\n state.values.enabled.push(id);\n } else {\n const index = state.values.enabled.findIndex((enabled) => enabled === id);\n index !== -1 && state.values.enabled.splice(index, 1);\n }\n },\n });\n\n // Register and load values.\n state.prop({ key: 'enabled', type: LocalStorageStore.json<string[]>() });\n\n return {\n meta: {\n id: HOST_PLUGIN,\n name: 'Plugin host',\n },\n provides: {\n plugins: state.values,\n context: ({ children }) => {\n return <PluginProvider value={state.values}>{children}</PluginProvider>;\n },\n root: () => {\n return (\n <ErrorBoundary fallback={fallback}>\n <PluginContainer plugins={plugins} core={core} state={state.values} placeholder={placeholder} />\n </ErrorBoundary>\n );\n },\n },\n };\n};\n\n/**\n * Fallback does not use tailwind or theme.\n */\nconst DefaultFallback = ({ error }: { error: Error }) => {\n return (\n <div style={{ padding: '1rem' }}>\n {/* TODO(wittjosiah): Link to docs for replacing default. */}\n <h1 style={{ fontSize: '1.2rem', fontWeight: 700, margin: '0.5rem 0' }}>{error.message}</h1>\n <pre>{error.stack}</pre>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type JSX, type FC, type PropsWithChildren, type ReactNode, useEffect, useState } from 'react';\n\nimport { log } from '@dxos/log';\n\nimport { type HostPluginParams } from './HostPlugin';\nimport { type PluginContext } from './PluginContext';\nimport { type Plugin, type PluginDefinition, type PluginProvides } from './plugin';\n\nexport type PluginContainerProps = Pick<HostPluginParams, 'core'> & {\n plugins: Record<string, () => Promise<PluginDefinition>>;\n state: PluginContext;\n placeholder: ReactNode;\n};\n\n/**\n * Root component initializes plugins.\n */\nexport const PluginContainer = ({ plugins: definitions, core, state, placeholder }: PluginContainerProps) => {\n const [error, setError] = useState<unknown>();\n\n useEffect(() => {\n log('initializing plugins', { enabled: state.enabled });\n const t = setTimeout(async () => {\n try {\n const enabledIds = [...core, ...state.enabled];\n const enabled = await Promise.all(\n enabledIds\n .map((id) => definitions[id])\n // If local storage indicates a plugin is enabled, but it is not available, ignore it.\n .filter((definition): definition is () => Promise<PluginDefinition> => Boolean(definition))\n .map((definition) => definition()),\n );\n\n const plugins = await Promise.all(\n enabled.map(async (definition) => {\n const plugin = await initializePlugin(definition).catch((err) => {\n log.error('Failed to initialize plugin:', { id: definition.meta.id, err });\n });\n\n log('initialized', { plugin: definition.meta.id });\n return plugin;\n }),\n );\n\n const initialized = plugins.filter((plugin): plugin is Plugin => Boolean(plugin));\n log('plugins initialized', { plugins: initialized });\n\n await Promise.all(enabled.map((plugin) => plugin.ready?.(initialized)));\n log('plugins ready', { plugins: initialized });\n\n state.plugins = initialized;\n state.ready = true;\n } catch (err) {\n setError(err);\n }\n });\n\n return () => {\n clearTimeout(t);\n state.ready = false;\n // TODO(wittjosiah): Does this ever need to be called prior to having dynamic plugins?\n // void Promise.all(enabled.map((definition) => definition.unload?.()));\n };\n }, []);\n\n if (error) {\n throw error;\n }\n\n if (!state.ready) {\n return <>{placeholder}</>;\n }\n\n const ComposedContext = composeContext(state.plugins);\n\n return <ComposedContext>{rootComponents(state.plugins)}</ComposedContext>;\n};\n\n/**\n * Resolve a `PluginDefinition` into a fully initialized `Plugin`.\n */\nconst initializePlugin = async <T, U>(pluginDefinition: PluginDefinition<T, U>): Promise<Plugin<T & U>> => {\n const provides = await pluginDefinition.initialize?.();\n return {\n ...pluginDefinition,\n provides: {\n ...pluginDefinition.provides,\n ...provides,\n } as PluginProvides<T & U>,\n };\n};\n\nconst rootComponents = (plugins: Plugin[]) => {\n return plugins\n .map((plugin) => {\n const Component = plugin.provides.root;\n if (Component) {\n return <Component key={plugin.meta.id} />;\n } else {\n return null;\n }\n })\n .filter((node): node is JSX.Element => Boolean(node));\n};\n\nconst composeContext = (plugins: Plugin[]) => {\n return compose(plugins.map((p) => p.provides.context!).filter(Boolean));\n};\n\nconst compose = (contexts: FC<PropsWithChildren>[]) => {\n return [...contexts].reduce((Acc, Next) => ({ children }) => (\n <Acc>\n <Next>{children}</Next>\n </Acc>\n ));\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext, useMemo } from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { nonNullable } from '@dxos/util';\n\nimport { type Plugin, type PluginMeta } from './plugin';\nimport { findPlugin, resolvePlugin } from '../helpers';\n\nexport type PluginContext = {\n /**\n * All plugins are ready.\n */\n ready: boolean;\n\n /**\n * Core plugins.\n */\n core: string[];\n\n /**\n * Ids of plugins which are enabled on this device.\n */\n enabled: string[];\n\n /**\n * Initialized and ready plugins.\n */\n plugins: Plugin[];\n\n /**\n * All available plugins.\n * NOTE: This is metadata rather than just ids because it includes plugins which have not been fully loaded yet.\n */\n available: PluginMeta[];\n\n /**\n * Mark plugin as enabled.\n * Requires reload to take effect.\n */\n // TODO(burdon): Functions should not be part of the settings type.\n setPlugin: (id: string, enabled: boolean) => void;\n};\n\nconst PluginContext = createContext<PluginContext | undefined>(undefined);\n\n/**\n * Get all plugins.\n */\nexport const usePlugins = (): PluginContext => useContext(PluginContext) ?? raise(new Error('Missing PluginContext'));\n\n/**\n * Get a plugin by ID.\n */\nexport const usePlugin = <T,>(id: string): Plugin<T> | undefined => {\n const { plugins } = usePlugins();\n return findPlugin<T>(plugins, id);\n};\n\n/**\n * Resolve a plugin by predicate.\n */\nexport const useResolvePlugin = <T,>(predicate: (plugin: Plugin) => Plugin<T> | undefined): Plugin<T> | undefined => {\n const { plugins } = usePlugins();\n return resolvePlugin(plugins, predicate);\n};\n\n/**\n * Resolve a collection of plugins by predicate.\n */\nexport const useResolvePlugins = <T,>(predicate: (plugin: Plugin) => Plugin<T> | undefined): Plugin<T>[] => {\n const { plugins } = usePlugins();\n return useMemo(() => plugins.map(predicate).filter(nonNullable), [plugins, predicate]);\n};\n\nexport const PluginProvider = PluginContext.Provider;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { invariant } from '@dxos/invariant';\n\nimport { type HostPluginParams, Plugin, HostPlugin } from './plugins';\nimport IntentMeta from './plugins/plugin-intent/meta';\nimport SettingsMeta from './plugins/plugin-settings/meta';\nimport SurfaceMeta from './plugins/plugin-surface/meta';\n\n/**\n * Expected usage is for this to be the entrypoint of the application.\n * Initializes plugins and renders the root components.\n *\n * @example\n * const meta = [LayoutMeta, MyPluginMeta];\n * const plugins = {\n * [LayoutMeta.id]: Plugin.lazy(() => import('./plugins/LayoutPlugin/plugin')),\n * [MyPluginMeta.id]: Plugin.lazy(() => import('./plugins/MyPlugin/plugin')),\n * };\n * const core = [LayoutMeta.id];\n * const default = [MyPluginMeta.id];\n * const fallback = <div>Initializing Plugins...</div>;\n * const App = createApp({ order, plugins, core, default, fallback });\n * createRoot(document.getElementById('root')!).render(\n * <StrictMode>\n * <App />\n * </StrictMode>,\n * );\n *\n * @param params.plugins All plugins available to the application.\n * @param params.meta All plugin metadata.\n * @param params.core Core plugins which will always be enabled.\n * @param params.defaults Default plugins are enabled by default but can be disabled by the user.\n * @param params.fallback Fallback component to render while plugins are initializing.\n */\nexport const createApp = ({ meta, plugins, core, ...params }: HostPluginParams) => {\n const hostPlugin = HostPlugin({\n plugins: {\n ...plugins,\n [IntentMeta.id]: Plugin.lazy(() => import('./plugins/plugin-intent')),\n [SettingsMeta.id]: Plugin.lazy(() => import('./plugins/plugin-settings')),\n [SurfaceMeta.id]: Plugin.lazy(() => import('./plugins/plugin-surface')),\n },\n meta: [IntentMeta, SettingsMeta, SurfaceMeta, ...meta],\n core: [IntentMeta.id, SettingsMeta.id, SurfaceMeta.id, ...core],\n ...params,\n });\n\n invariant(hostPlugin.provides);\n const { context: Context, root: Root } = hostPlugin.provides;\n invariant(Context);\n invariant(Root);\n\n return () => (\n <Context>\n <Root />\n </Context>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,IAAMA,mBAAmB;EAC9BC,QAAQ;IAAC;IAAO;IAAO;IAAQ;;EAC/BC,OAAO;IAAC;IAAO;IAAO;IAAO;;EAC7BC,MAAM;IAAC;IAAO;IAAO;;AACvB;AAmBO,IAAMC,yBAAyB,CAACC,WAAAA;AACrC,SAAQA,OAAOC,SAAiBC,OAAQF,SAAyCG;AACnF;;;ACqBO,IAAMC,mBAAmB,CAACC,WAC9BA,OAAOC,SAAiBC,OAAOC,OAAQH,SAAmCI;AAKtE,IAAMC,0BAA0B,CAACL,WACrCA,OAAOC,SAAiBC,OAAOI,UAAW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B,aAAajC,EAAE0B,QAAO;EACtBQ,gBAAgBlC,EAAEQ,IAAG,EAAGH,SAAQ,EAAGwB,SAAS,2CAAA;EAC5CM,iBAAiBnC,EAAEG,OAAM,EAAGE,SAAQ;EAEpC+B,QAAQpC,EAAEqC,MAAMtC,KAAAA;EAEhBuC,gBAAgBtC,EACbG,OAAM,EACNE,SAAQ,EACRwB,SAAS,uEAAA;AACd,CAAA;AAcO,IAAMU,oBAAoB,CAACC,WAAAA;AAChC,QAAM,EAAElB,QAAO,IAAKC,OAAOF,UAAWmB,OAAOC,SAAiBC,MAAM;AACpE,SAAOpB,UAAWkB,SAAoCG;AACxD;AAMA,IAAMC,gBAAgB;AAEtB,IAAMC,gBAAgB,GAAGD,aAAAA;;UAEbE,eAAAA;8CACG,GAAGD,aAAAA,aAA0B,IAAA;mDACxB,GAAGA,aAAAA,kBAA+B,IAAA;oDACjC,GAAGA,aAAAA,mBAAgC,IAAA;qDAClC,GAAGA,aAAAA,oBAAiC,IAAA;GAJ9CC,iBAAAA,eAAAA,CAAAA,EAAAA;;;AC1EL,IAAMC,6BAA6B,CAACC,WAAAA;AACzC,SAAQA,OAAOC,SAAiBC,UAAUC,UAAWH,SAA6CI;AACpG;AAEO,IAAMC,8BAA8B,CAACL,WAAAA;AAC1C,SAAQA,OAAOC,SAAiBC,UAAUI,WAAYN,SAA8CI;AACtG;;;ACxBA,SAASG,UAAUC,SAAS;AAC5B,SAASC,KAAAA,UAAS;
|
|
6
|
-
"names": ["defaultFileTypes", "images", "media", "text", "parseFileManagerPlugin", "plugin", "provides", "file", "undefined", "parseGraphPlugin", "plugin", "provides", "graph", "root", "undefined", "parseGraphBuilderPlugin", "builder", "parseGraphSerializerPlugin", "serializer", "z", "Toast", "z", "object", "id", "string", "title", "optional", "description", "icon", "any", "duration", "number", "closeLabel", "actionLabel", "actionAlt", "onAction", "function", "LayoutMode", "union", "literal", "isLayoutMode", "value", "safeParse", "success", "Layout", "layoutMode", "sidebarOpen", "boolean", "complementarySidebarOpen", "complementarySidebarContent", "describe", "dialogOpen", "dialogContent", "dialogBlockAlign", "popoverOpen", "popoverContent", "popoverAnchorId", "toasts", "array", "scrollIntoView", "parseLayoutPlugin", "plugin", "provides", "layout", "undefined", "LAYOUT_PLUGIN", "LAYOUT_ACTION", "LayoutAction", "parseMetadataRecordsPlugin", "plugin", "provides", "metadata", "records", "undefined", "parseMetadataResolverPlugin", "resolver", "Schema", "S", "z", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Space } from '@dxos/client-protocol';\n\nimport { type Plugin } from '../plugin-host';\n\n// TODO(burdon): See Accept attribute (uses MIME types).\n// E.g., 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\nexport const defaultFileTypes = {\n images: ['png', 'jpg', 'jpeg', 'gif'],\n media: ['mp3', 'mp4', 'mov', 'avi'],\n text: ['pdf', 'txt', 'md'],\n};\n\nexport type FileInfo = {\n url?: string;\n cid?: string; // TODO(burdon): Meta key? Or other common properties with other file management system? (e.g., WNFS).\n};\n\nexport type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;\n\n/**\n * Generic interface provided by file plugins (e.g., IPFS, WNFS).\n */\nexport type FileManagerProvides = {\n file: {\n upload?: FileUploader;\n };\n};\n\n// TODO(burdon): Better match against interface? and Return provided service type. What if multiple?\nexport const parseFileManagerPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).file ? (plugin as Plugin<FileManagerProvides>) : undefined;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { Graph, GraphBuilder, Node } from '@dxos/app-graph';\nimport { type MaybePromise } from '@dxos/util';\n\nimport type { Plugin } from '../plugin-host';\n\n// TODO(wittjosiah): Factor out.\nexport type SerializedNode = {\n name: string;\n data: string;\n type?: string;\n};\n\n// TODO(wittjosiah): Factor out.\nexport type NodeSerializer<T = any> = {\n inputType: string;\n outputType: string;\n disposition?: 'hoist' | 'fallback';\n\n /**\n * Takes a node and serializes it into a format that can be stored.\n */\n serialize: (node: Node<T>) => MaybePromise<SerializedNode>;\n\n /**\n * Takes a serialized node and deserializes it into the application.\n */\n deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;\n};\n\n/**\n * Provides for a plugin that exposes the application graph.\n */\nexport type GraphProvides = {\n graph: Graph;\n explore: GraphBuilder['explore'];\n};\n\nexport type GraphBuilderProvides = {\n graph: {\n builder: (plugins: Plugin[]) => Parameters<GraphBuilder['addExtension']>[0];\n };\n};\n\nexport type GraphSerializerProvides = {\n graph: {\n serializer: (plugins: Plugin[]) => NodeSerializer[];\n };\n};\n\n/**\n * Type guard for graph plugins.\n */\nexport const parseGraphPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.root ? (plugin as Plugin<GraphProvides>) : undefined;\n\n/**\n * Type guard for graph builder plugins.\n */\nexport const parseGraphBuilderPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.builder ? (plugin as Plugin<GraphBuilderProvides>) : undefined;\n\n/**\n * Type guard for graph serializer plugins.\n */\nexport const parseGraphSerializerPlugin = (plugin: Plugin) =>\n (plugin.provides as any).graph?.serializer ? (plugin as Plugin<GraphSerializerProvides>) : undefined;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { z } from 'zod';\n\nimport { type Plugin } from '../plugin-host';\nimport { type IntentData } from '../plugin-intent';\n\n//\n// Provides\n//\n\nexport const Toast = z.object({\n id: z.string(),\n title: z.string().optional(),\n description: z.string().optional(),\n // TODO(wittjosiah): `icon` should be string to be parsed by an `Icon` component.\n icon: z.any().optional(),\n duration: z.number().optional(),\n closeLabel: z.string().optional(),\n actionLabel: z.string().optional(),\n actionAlt: z.string().optional(),\n onAction: z.function().optional(),\n});\n\nexport type Toast = z.infer<typeof Toast>;\n\n/**\n * Basic state provided by a layout plugin.\n *\n * Layout provides the state of global UI landmarks, such as the sidebar, dialog, and popover.\n * Generally only one dialog or popover should be open at a time, a layout plugin should manage this.\n * For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.\n */\n\nconst LayoutMode = z.union([z.literal('deck'), z.literal('solo'), z.literal('fullscreen')]);\nexport const isLayoutMode = (value: any): value is LayoutMode => LayoutMode.safeParse(value).success;\nexport type LayoutMode = z.infer<typeof LayoutMode>;\n\n// TODO(wittjosiah): Replace Zod w/ Effect Schema to align with ECHO.\nexport const Layout = z.object({\n layoutMode: z.union([z.literal('deck'), z.literal('solo'), z.literal('fullscreen')]),\n\n sidebarOpen: z.boolean(),\n complementarySidebarOpen: z.boolean(),\n /**\n * @deprecated\n */\n complementarySidebarContent: z\n .any()\n .optional()\n .describe('DEPRECATED. Data to be passed to the complementary sidebar Surface.'),\n\n dialogOpen: z.boolean(),\n dialogContent: z.any().optional().describe('Data to be passed to the dialog Surface.'),\n // TODO(wittjosiah): Custom properties?\n dialogBlockAlign: z.union([z.literal('start'), z.literal('center')]).optional(),\n\n popoverOpen: z.boolean(),\n popoverContent: z.any().optional().describe('Data to be passed to the popover Surface.'),\n popoverAnchorId: z.string().optional(),\n\n toasts: z.array(Toast),\n\n scrollIntoView: z\n .string()\n .optional()\n .describe('The identifier of a component to scroll into view when it is mounted.'),\n});\n\nexport type Layout = z.infer<typeof Layout>;\n\n/**\n * Provides for a plugin that can manage the app layout.\n */\nexport type LayoutProvides = {\n layout: Readonly<Layout>;\n};\n\n/**\n * Type guard for layout plugins.\n */\nexport const parseLayoutPlugin = (plugin: Plugin) => {\n const { success } = Layout.safeParse((plugin.provides as any).layout);\n return success ? (plugin as Plugin<LayoutProvides>) : undefined;\n};\n\n//\n// Intents\n//\n\nconst LAYOUT_PLUGIN = 'dxos.org/plugin/layout';\n\nconst LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;\n\nexport enum LayoutAction {\n SET_LAYOUT = `${LAYOUT_ACTION}/set-layout`,\n SET_LAYOUT_MODE = `${LAYOUT_ACTION}/set-layout-mode`,\n SCROLL_INTO_VIEW = `${LAYOUT_ACTION}/scroll-into-view`,\n UPDATE_PLANK_SIZE = `${LAYOUT_ACTION}/update-plank-size`,\n}\n\n/**\n * Expected payload for layout actions.\n */\nexport namespace LayoutAction {\n export type SetLayoutMode = IntentData<{\n layoutMode?: LayoutMode;\n revert?: boolean;\n }>;\n\n export type SetLayout = IntentData<{\n /**\n * Element to set the state of.\n */\n element: 'fullscreen' | 'sidebar' | 'complementary' | 'dialog' | 'popover' | 'toast';\n\n /**\n * Whether the element is on or off.\n *\n * If omitted, the element's state will be toggled or set based on other provided data.\n * For example, if `component` is provided, the state will be set to `true`.\n */\n state?: boolean;\n\n /**\n * Component to render in the dialog or popover.\n */\n component?: string;\n\n /**\n * Data to be passed to the dialog or popover Surface.\n */\n subject?: any;\n\n /**\n * Anchor ID for the popover.\n */\n anchorId?: string;\n\n // TODO(wittjosiah): Custom properties?\n\n /**\n * Block alignment for the dialog.\n */\n dialogBlockAlign?: 'start' | 'center';\n }>;\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '../plugin-host';\n\nexport type Metadata = Record<string, any>;\n\nexport type MetadataRecordsProvides = {\n metadata: {\n records: Record<string, Metadata>;\n };\n};\n\nexport type MetadataResolver = (type: string) => Metadata;\n\nexport type MetadataResolverProvides = {\n metadata: {\n resolver: MetadataResolver;\n };\n};\n\nexport const parseMetadataRecordsPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).metadata?.records ? (plugin as Plugin<MetadataRecordsProvides>) : undefined;\n};\n\nexport const parseMetadataResolverPlugin = (plugin: Plugin) => {\n return (plugin.provides as any).metadata?.resolver ? (plugin as Plugin<MetadataResolverProvides>) : undefined;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema as S } from '@effect/schema';\nimport { z } from 'zod';\n\nimport { type Plugin } from '../plugin-host';\nimport { type IntentData } from '../plugin-intent';\n\n// NOTE(thure): These are chosen from RFC 1738’s `safe` characters: http://www.faqs.org/rfcs/rfc1738.html\nexport const SLUG_LIST_SEPARATOR = '+';\nexport const SLUG_ENTRY_SEPARATOR = '_';\nexport const SLUG_KEY_VALUE_SEPARATOR = '-';\nexport const SLUG_PATH_SEPARATOR = '~';\nexport const SLUG_COLLECTION_INDICATOR = '';\n\nconst LayoutEntrySchema = S.mutable(S.Struct({ id: S.String, path: S.optional(S.String) }));\nexport type LayoutEntry = S.Schema.Type<typeof LayoutEntrySchema>;\n\n// TODO(Zan): Consider renaming the 'main' part to 'deck' part now that we are throwing out the old layout plugin.\n// TODO(Zan): Extend to all strings?\nconst LayoutPartSchema = S.Union(\n S.Literal('sidebar'),\n S.Literal('main'),\n S.Literal('solo'),\n S.Literal('complementary'),\n S.Literal('fullScreen'),\n);\nexport type LayoutPart = S.Schema.Type<typeof LayoutPartSchema>;\n\nconst LayoutPartsSchema = S.partial(\n S.mutable(S.Record({ key: LayoutPartSchema, value: S.mutable(S.Array(LayoutEntrySchema)) })),\n);\nexport type LayoutParts = S.Schema.Type<typeof LayoutPartsSchema>;\n\nconst LayoutCoordinateSchema = S.mutable(S.Struct({ part: LayoutPartSchema, entryId: S.String }));\nexport type LayoutCoordinate = S.Schema.Type<typeof LayoutCoordinateSchema>;\n\nconst PartAdjustmentSchema = S.Union(S.Literal('increment-start'), S.Literal('increment-end'), S.Literal('solo'));\nexport type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;\n\nconst LayoutAdjustmentSchema = S.mutable(\n S.Struct({ layoutCoordinate: LayoutCoordinateSchema, type: PartAdjustmentSchema }),\n);\nexport type LayoutAdjustment = S.Schema.Type<typeof LayoutAdjustmentSchema>;\n\n/** @deprecated */\nexport const ActiveParts = z.record(z.string(), z.union([z.string(), z.array(z.string())]));\nexport type ActiveParts = z.infer<typeof ActiveParts>;\n\n// TODO(burdon): Where should this go?\nexport type LayoutContainerProps<T> = T & { role?: string; coordinate?: LayoutCoordinate };\n\n/**\n * Provides for a plugin that can manage the app navigation.\n */\nconst LocationProvidesSchema = S.mutable(\n S.Struct({\n location: S.Struct({\n active: LayoutPartsSchema,\n closed: S.Array(S.String),\n }),\n }),\n);\nexport type LocationProvides = S.Schema.Type<typeof LocationProvidesSchema>;\n\n/**\n * Type guard for layout plugins.\n */\nexport const isLayoutParts = (value: unknown): value is LayoutParts => {\n return S.is(LayoutPartsSchema)(value);\n};\n\n// Type guard for PartAdjustment.\nexport const isLayoutAdjustment = (value: unknown): value is LayoutAdjustment => {\n return S.is(LayoutAdjustmentSchema)(value);\n};\n\nexport const parseNavigationPlugin = (plugin: Plugin): Plugin<LocationProvides> | undefined => {\n const location = (plugin.provides as any)?.location;\n if (!location) {\n return undefined;\n }\n\n if (S.is(LocationProvidesSchema)({ location })) {\n return plugin as Plugin<LocationProvides>;\n }\n\n return undefined;\n};\n\n/**\n * Utilities.\n */\n\n/** Extracts all unique IDs from the layout parts. */\nexport const openIds = (layout: LayoutParts): string[] => {\n return Object.values(layout)\n .flatMap((part) => part?.map((entry) => entry.id) ?? [])\n .filter((id): id is string => id !== undefined);\n};\n\nexport const firstIdInPart = (layout: LayoutParts | undefined, part: LayoutPart): string | undefined => {\n if (!layout) {\n return undefined;\n }\n\n return layout[part]?.at(0)?.id;\n};\n\nexport const indexInPart = (\n layout: LayoutParts | undefined,\n layoutCoordinate: LayoutCoordinate | undefined,\n): number | undefined => {\n if (!layout || !layoutCoordinate) {\n return undefined;\n }\n\n const { part, entryId } = layoutCoordinate;\n return layout[part]?.findIndex((entry) => entry.id === entryId);\n};\n\nexport const partLength = (layout: LayoutParts | undefined, part: LayoutPart | undefined): number => {\n if (!layout || !part) {\n return 0;\n }\n\n return layout[part]?.length ?? 0;\n};\n\n//\n// Intents\n//\n\nconst NAVIGATION_PLUGIN = 'dxos.org/plugin/navigation';\n\nconst NAVIGATION_ACTION = `${NAVIGATION_PLUGIN}/action`;\n\nexport enum NavigationAction {\n OPEN = `${NAVIGATION_ACTION}/open`,\n ADD_TO_ACTIVE = `${NAVIGATION_ACTION}/add-to-active`,\n SET = `${NAVIGATION_ACTION}/set`,\n ADJUST = `${NAVIGATION_ACTION}/adjust`,\n CLOSE = `${NAVIGATION_ACTION}/close`,\n EXPOSE = `${NAVIGATION_ACTION}/expose`,\n}\n\n/**\n * Expected payload for navigation actions.\n */\nexport namespace NavigationAction {\n /**\n * An additive overlay to apply to `location.active` (i.e. the result is a union of previous active and the argument)\n */\n export type Open = IntentData<{ activeParts: ActiveParts }>;\n\n /**\n * Payload for adding an item to the active items.\n */\n export type AddToActive = IntentData<{\n part: LayoutPart;\n id: string;\n scrollIntoView?: boolean;\n pivotId?: string;\n positioning?: 'start' | 'end';\n }>;\n\n /**\n * A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)\n */\n export type Close = IntentData<{ activeParts: ActiveParts; noToggle?: boolean }>;\n\n /**\n * The active parts to directly set, to be used when working with URLs or restoring a specific state.\n */\n export type Set = IntentData<{ activeParts: ActiveParts }>;\n\n /**\n * An atomic transaction to apply to `location.active`, describing which element to (attempt to) move to which location.\n */\n export type Adjust = IntentData<LayoutAdjustment>;\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { z } from 'zod';\n\nimport { type Plugin } from '../plugin-host';\n\n// TODO(burdon): Replace zed with effect.\nexport const ResourceKey = z.union([z.string(), z.record(z.any())]);\nexport type ResourceKey = z.infer<typeof ResourceKey>;\n\nexport const ResourceLanguage = z.record(ResourceKey);\nexport type ResourceLanguage = z.infer<typeof ResourceLanguage>;\n\n/**\n * A resource is a collection of translations for a language.\n */\nexport const Resource = z.record(ResourceLanguage);\nexport type Resource = z.infer<typeof Resource>;\n\n/**\n * Provides for a plugin that exposes translations.\n */\n// TODO(wittjosiah): Rename to TranslationResourcesProvides.\nexport type TranslationsProvides = {\n translations: Readonly<Resource[]>;\n};\n\n/**\n * Type guard for translation plugins.\n */\nexport const parseTranslationsPlugin = (plugin: Plugin) => {\n const { success } = z.array(Resource).safeParse((plugin.provides as any).translations);\n return success ? (plugin as Plugin<TranslationsProvides>) : undefined;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { FC, PropsWithChildren } from 'react';\n\n/**\n * Capabilities provided by a plugin.\n * The base surface capabilities are always included.\n */\nexport type PluginProvides<TProvides> = TProvides & {\n /**\n * React Context which is wrapped around the application to enable any hooks the plugin may provide.\n */\n context?: FC<PropsWithChildren>;\n\n /*\n * React component which is rendered at the root of the application.\n */\n root?: FC<PropsWithChildren>;\n};\n\nexport type PluginMeta = {\n /**\n * Globally unique ID.\n *\n * Expected to be in the form of a valid URL.\n *\n * @example dxos.org/plugin/example\n */\n id: string;\n\n /**\n * Short ID for use in URLs.\n *\n * NOTE: This is especially experimental and likely to change.\n */\n // TODO(wittjosiah): How should these be managed?\n shortId?: string;\n\n /**\n * Human-readable name.\n */\n name?: string;\n\n /**\n * Short description of plugin functionality.\n */\n description?: string;\n\n /**\n * URL of home page.\n */\n homePage?: string;\n\n /**\n * URL of source code.\n */\n source?: string;\n\n /**\n * Tags to help categorize the plugin.\n */\n tags?: string[];\n\n /**\n * A grep-able symbol string which can be resolved to an icon asset by @ch-ui/icons, via @ch-ui/vite-plugin-icons.\n */\n icon?: string;\n};\n\n/**\n * A unit of containment of modular functionality that can be provided to an application.\n * Plugins provide things like components, state, actions, etc. to the application.\n */\nexport type Plugin<TProvides = {}> = {\n meta: PluginMeta;\n\n /**\n * Capabilities provided by the plugin.\n */\n provides: PluginProvides<TProvides>;\n};\n\n/**\n * Plugin definitions extend the base `Plugin` interface with additional lifecycle methods.\n */\nexport type PluginDefinition<TProvides = {}, TInitializeProvides = {}> = Omit<Plugin, 'provides'> & {\n /**\n * Capabilities provided by the plugin.\n */\n provides?: Plugin<TProvides>['provides'];\n\n /**\n * Initialize any async behavior required by the plugin.\n *\n * @return Capabilities provided by the plugin which are merged with base capabilities.\n */\n initialize?: () => Promise<PluginProvides<TInitializeProvides> | void>;\n\n /**\n * Called once all plugins have been initialized.\n * This is the place to do any initialization which requires other plugins to be ready.\n *\n * @param plugins All plugins which successfully initialized.\n */\n // TODO(wittjosiah): Rename `ready` to a verb?\n ready?: (plugins: Plugin[]) => Promise<void>;\n\n /**\n * Called when the plugin is unloaded.\n * This is the place to do any cleanup required by the plugin.\n */\n unload?: () => Promise<void>;\n};\n\ntype LazyPlugin<T> = () => Promise<{ default: (props: T) => PluginDefinition }>;\n\nexport namespace Plugin {\n export const lazy = <T>(p: LazyPlugin<T>, props?: T) => {\n return () =>\n p().then(({ default: definition }) => {\n return definition(props as T);\n });\n };\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport { PluginContainer } from './PluginContainer';\nimport { type PluginContext, PluginProvider } from './PluginContext';\nimport { type Plugin, type PluginDefinition, type PluginMeta } from './plugin';\nimport { ErrorBoundary } from '../plugin-surface';\n\nexport type HostPluginParams = {\n plugins: Record<string, () => Promise<PluginDefinition>>;\n // Ordered list of plugins.\n meta: PluginMeta[];\n core: string[];\n defaults?: string[];\n fallback?: ErrorBoundary['props']['fallback'];\n placeholder?: ReactNode;\n};\n\nexport type HostPluginProvides = {\n plugins: PluginContext;\n};\n\nexport const parsePluginHost = (plugin: Plugin) =>\n (plugin.provides as HostPluginProvides).plugins ? (plugin as Plugin<HostPluginProvides>) : undefined;\n\nconst HOST_PLUGIN = 'dxos.org/plugin/host';\n\n/**\n * Bootstraps an application by initializing plugins and rendering root components.\n */\nexport const HostPlugin = ({\n plugins,\n meta,\n core,\n defaults = [],\n fallback = DefaultFallback,\n placeholder = null,\n}: HostPluginParams): PluginDefinition<HostPluginProvides> => {\n const state = new LocalStorageStore<PluginContext>(HOST_PLUGIN, {\n ready: false,\n core,\n enabled: [...defaults],\n plugins: [],\n available: meta.filter(({ id }) => !core.includes(id)),\n // TODO(burdon): Functions should not be part of the settings type.\n setPlugin: (id: string, enabled: boolean) => {\n if (enabled) {\n state.values.enabled.push(id);\n } else {\n const index = state.values.enabled.findIndex((enabled) => enabled === id);\n index !== -1 && state.values.enabled.splice(index, 1);\n }\n },\n });\n\n // Register and load values.\n state.prop({ key: 'enabled', type: LocalStorageStore.json<string[]>() });\n\n return {\n meta: {\n id: HOST_PLUGIN,\n name: 'Plugin host',\n },\n provides: {\n plugins: state.values,\n context: ({ children }) => {\n return <PluginProvider value={state.values}>{children}</PluginProvider>;\n },\n root: () => {\n return (\n <ErrorBoundary fallback={fallback}>\n <PluginContainer plugins={plugins} core={core} state={state.values} placeholder={placeholder} />\n </ErrorBoundary>\n );\n },\n },\n };\n};\n\n/**\n * Fallback does not use tailwind or theme.\n */\nconst DefaultFallback = ({ error }: { error: Error }) => {\n return (\n <div style={{ padding: '1rem' }}>\n {/* TODO(wittjosiah): Link to docs for replacing default. */}\n <h1 style={{ fontSize: '1.2rem', fontWeight: 700, margin: '0.5rem 0' }}>{error.message}</h1>\n <pre>{error.stack}</pre>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type JSX, type FC, type PropsWithChildren, type ReactNode, useEffect, useState } from 'react';\n\nimport { log } from '@dxos/log';\n\nimport { type HostPluginParams } from './HostPlugin';\nimport { type PluginContext } from './PluginContext';\nimport { type Plugin, type PluginDefinition, type PluginProvides } from './plugin';\n\nexport type PluginContainerProps = Pick<HostPluginParams, 'core'> & {\n plugins: Record<string, () => Promise<PluginDefinition>>;\n state: PluginContext;\n placeholder: ReactNode;\n};\n\n/**\n * Root component initializes plugins.\n */\nexport const PluginContainer = ({ plugins: definitions, core, state, placeholder }: PluginContainerProps) => {\n const [error, setError] = useState<unknown>();\n\n useEffect(() => {\n log('initializing plugins', { enabled: state.enabled });\n const t = setTimeout(async () => {\n try {\n const enabledIds = [...core, ...state.enabled];\n const enabled = await Promise.all(\n enabledIds\n .map((id) => definitions[id])\n // If local storage indicates a plugin is enabled, but it is not available, ignore it.\n .filter((definition): definition is () => Promise<PluginDefinition> => Boolean(definition))\n .map((definition) => definition()),\n );\n\n const plugins = await Promise.all(\n enabled.map(async (definition) => {\n const plugin = await initializePlugin(definition).catch((err) => {\n log.error('Failed to initialize plugin:', { id: definition.meta.id, err });\n });\n\n log('initialized', { plugin: definition.meta.id });\n return plugin;\n }),\n );\n\n const initialized = plugins.filter((plugin): plugin is Plugin => Boolean(plugin));\n log('plugins initialized', { plugins: initialized });\n\n await Promise.all(enabled.map((plugin) => plugin.ready?.(initialized)));\n log('plugins ready', { plugins: initialized });\n\n state.plugins = initialized;\n state.ready = true;\n } catch (err) {\n setError(err);\n }\n });\n\n return () => {\n clearTimeout(t);\n state.ready = false;\n // TODO(wittjosiah): Does this ever need to be called prior to having dynamic plugins?\n // void Promise.all(enabled.map((definition) => definition.unload?.()));\n };\n }, []);\n\n if (error) {\n throw error;\n }\n\n if (!state.ready) {\n return <>{placeholder}</>;\n }\n\n const ComposedContext = composeContext(state.plugins);\n\n return <ComposedContext>{rootComponents(state.plugins)}</ComposedContext>;\n};\n\n/**\n * Resolve a `PluginDefinition` into a fully initialized `Plugin`.\n */\nconst initializePlugin = async <T, U>(pluginDefinition: PluginDefinition<T, U>): Promise<Plugin<T & U>> => {\n const provides = await pluginDefinition.initialize?.();\n return {\n ...pluginDefinition,\n provides: {\n ...pluginDefinition.provides,\n ...provides,\n } as PluginProvides<T & U>,\n };\n};\n\nconst rootComponents = (plugins: Plugin[]) => {\n return plugins\n .map((plugin) => {\n const Component = plugin.provides.root;\n if (Component) {\n return <Component key={plugin.meta.id} />;\n } else {\n return null;\n }\n })\n .filter((node): node is JSX.Element => Boolean(node));\n};\n\nconst composeContext = (plugins: Plugin[]) => {\n return compose(plugins.map((p) => p.provides.context!).filter(Boolean));\n};\n\nconst compose = (contexts: FC<PropsWithChildren>[]) => {\n return [...contexts].reduce((Acc, Next) => ({ children }) => (\n <Acc>\n <Next>{children}</Next>\n </Acc>\n ));\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext, useMemo } from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { nonNullable } from '@dxos/util';\n\nimport { type Plugin, type PluginMeta } from './plugin';\nimport { findPlugin, resolvePlugin } from '../helpers';\n\nexport type PluginContext = {\n /**\n * All plugins are ready.\n */\n ready: boolean;\n\n /**\n * Core plugins.\n */\n core: string[];\n\n /**\n * Ids of plugins which are enabled on this device.\n */\n enabled: string[];\n\n /**\n * Initialized and ready plugins.\n */\n plugins: Plugin[];\n\n /**\n * All available plugins.\n * NOTE: This is metadata rather than just ids because it includes plugins which have not been fully loaded yet.\n */\n available: PluginMeta[];\n\n /**\n * Mark plugin as enabled.\n * Requires reload to take effect.\n */\n // TODO(burdon): Functions should not be part of the settings type.\n setPlugin: (id: string, enabled: boolean) => void;\n};\n\nconst PluginContext = createContext<PluginContext | undefined>(undefined);\n\n/**\n * Get all plugins.\n */\nexport const usePlugins = (): PluginContext => useContext(PluginContext) ?? raise(new Error('Missing PluginContext'));\n\n/**\n * Get a plugin by ID.\n */\nexport const usePlugin = <T,>(id: string): Plugin<T> | undefined => {\n const { plugins } = usePlugins();\n return findPlugin<T>(plugins, id);\n};\n\n/**\n * Resolve a plugin by predicate.\n */\nexport const useResolvePlugin = <T,>(predicate: (plugin: Plugin) => Plugin<T> | undefined): Plugin<T> | undefined => {\n const { plugins } = usePlugins();\n return resolvePlugin(plugins, predicate);\n};\n\n/**\n * Resolve a collection of plugins by predicate.\n */\nexport const useResolvePlugins = <T,>(predicate: (plugin: Plugin) => Plugin<T> | undefined): Plugin<T>[] => {\n const { plugins } = usePlugins();\n return useMemo(() => plugins.map(predicate).filter(nonNullable), [plugins, predicate]);\n};\n\nexport const PluginProvider = PluginContext.Provider;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { invariant } from '@dxos/invariant';\n\nimport { type HostPluginParams, Plugin, HostPlugin } from './plugins';\nimport IntentMeta from './plugins/plugin-intent/meta';\nimport SettingsMeta from './plugins/plugin-settings/meta';\nimport SurfaceMeta from './plugins/plugin-surface/meta';\n\n/**\n * Expected usage is for this to be the entrypoint of the application.\n * Initializes plugins and renders the root components.\n *\n * @example\n * const meta = [LayoutMeta, MyPluginMeta];\n * const plugins = {\n * [LayoutMeta.id]: Plugin.lazy(() => import('./plugins/LayoutPlugin/plugin')),\n * [MyPluginMeta.id]: Plugin.lazy(() => import('./plugins/MyPlugin/plugin')),\n * };\n * const core = [LayoutMeta.id];\n * const default = [MyPluginMeta.id];\n * const fallback = <div>Initializing Plugins...</div>;\n * const App = createApp({ order, plugins, core, default, fallback });\n * createRoot(document.getElementById('root')!).render(\n * <StrictMode>\n * <App />\n * </StrictMode>,\n * );\n *\n * @param params.plugins All plugins available to the application.\n * @param params.meta All plugin metadata.\n * @param params.core Core plugins which will always be enabled.\n * @param params.defaults Default plugins are enabled by default but can be disabled by the user.\n * @param params.fallback Fallback component to render while plugins are initializing.\n */\nexport const createApp = ({ meta, plugins, core, ...params }: HostPluginParams) => {\n const hostPlugin = HostPlugin({\n plugins: {\n ...plugins,\n [IntentMeta.id]: Plugin.lazy(() => import('./plugins/plugin-intent')),\n [SettingsMeta.id]: Plugin.lazy(() => import('./plugins/plugin-settings')),\n [SurfaceMeta.id]: Plugin.lazy(() => import('./plugins/plugin-surface')),\n },\n meta: [IntentMeta, SettingsMeta, SurfaceMeta, ...meta],\n core: [IntentMeta.id, SettingsMeta.id, SurfaceMeta.id, ...core],\n ...params,\n });\n\n invariant(hostPlugin.provides);\n const { context: Context, root: Root } = hostPlugin.provides;\n invariant(Context);\n invariant(Root);\n\n return () => (\n <Context>\n <Root />\n </Context>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,IAAMA,mBAAmB;EAC9BC,QAAQ;IAAC;IAAO;IAAO;IAAQ;;EAC/BC,OAAO;IAAC;IAAO;IAAO;IAAO;;EAC7BC,MAAM;IAAC;IAAO;IAAO;;AACvB;AAmBO,IAAMC,yBAAyB,CAACC,WAAAA;AACrC,SAAQA,OAAOC,SAAiBC,OAAQF,SAAyCG;AACnF;;;ACqBO,IAAMC,mBAAmB,CAACC,WAC9BA,OAAOC,SAAiBC,OAAOC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BAAAT,OAAA,cAACU,MAAAA;IAAGF,OAAO;MAAEG,UAAU;MAAUC,YAAY;MAAKC,QAAQ;IAAW;KAAIP,MAAMQ,OAAO,GACtF,gBAAAd,OAAA,cAACe,OAAAA,MAAKT,MAAMU,KAAK,CAAA;AAGvB;;;AG3FA,OAAOC,YAAW;AAElB,SAASC,iBAAiB;;AAiCnB,IAAMC,YAAY,CAAC,EAAEC,MAAMC,SAASC,MAAM,GAAGC,OAAAA,MAA0B;AAC5E,QAAMC,aAAaC,WAAW;IAC5BJ,SAAS;MACP,GAAGA;MACH,CAACK,aAAWC,EAAE,GAAGC,OAAOC,KAAK,MAAM,OAAO,8BAAA,CAAA;MAC1C,CAACC,cAAaH,EAAE,GAAGC,OAAOC,KAAK,MAAM,OAAO,gCAAA,CAAA;MAC5C,CAACE,cAAYJ,EAAE,GAAGC,OAAOC,KAAK,MAAM,OAAO,+BAAA,CAAA;IAC7C;IACAT,MAAM;MAACM;MAAYI;MAAcC;SAAgBX;;IACjDE,MAAM;MAACI,aAAWC;MAAIG,cAAaH;MAAII,cAAYJ;SAAOL;;IAC1D,GAAGC;EACL,CAAA;AAEAS,YAAUR,WAAWS,UAAQ,QAAA;;;;;;;;;AAC7B,QAAM,EAAEC,SAASC,SAASC,MAAMC,KAAI,IAAKb,WAAWS;AACpDD,YAAUG,SAAAA,QAAAA;;;;;;;;;AACVH,YAAUK,MAAAA,QAAAA;;;;;;;;;AAEV,SAAO,MACL,gBAAAC,OAAA,cAACH,SAAAA,MACC,gBAAAG,OAAA,cAACD,MAAAA,IAAAA,CAAAA;AAGP;",
|
|
6
|
+
"names": ["defaultFileTypes", "images", "media", "text", "parseFileManagerPlugin", "plugin", "provides", "file", "undefined", "parseGraphPlugin", "plugin", "provides", "graph", "root", "undefined", "parseGraphBuilderPlugin", "builder", "parseGraphSerializerPlugin", "serializer", "z", "Toast", "z", "object", "id", "string", "title", "optional", "description", "icon", "any", "duration", "number", "closeLabel", "actionLabel", "actionAlt", "onAction", "function", "LayoutMode", "union", "literal", "isLayoutMode", "value", "safeParse", "success", "Layout", "layoutMode", "sidebarOpen", "boolean", "complementarySidebarOpen", "complementarySidebarContent", "describe", "dialogOpen", "dialogContent", "dialogBlockAlign", "popoverOpen", "popoverContent", "popoverAnchorId", "toasts", "array", "scrollIntoView", "parseLayoutPlugin", "plugin", "provides", "layout", "undefined", "LAYOUT_PLUGIN", "LAYOUT_ACTION", "LayoutAction", "parseMetadataRecordsPlugin", "plugin", "provides", "metadata", "records", "undefined", "parseMetadataResolverPlugin", "resolver", "Schema", "S", "z", "SLUG_LIST_SEPARATOR", "SLUG_ENTRY_SEPARATOR", "SLUG_KEY_VALUE_SEPARATOR", "SLUG_PATH_SEPARATOR", "SLUG_COLLECTION_INDICATOR", "LayoutEntrySchema", "S", "mutable", "Struct", "id", "String", "path", "optional", "LayoutPartSchema", "Union", "Literal", "LayoutPartsSchema", "partial", "Record", "key", "value", "Array", "LayoutCoordinateSchema", "part", "entryId", "PartAdjustmentSchema", "LayoutAdjustmentSchema", "layoutCoordinate", "type", "ActiveParts", "z", "record", "string", "union", "array", "LocationProvidesSchema", "location", "active", "closed", "isLayoutParts", "is", "isLayoutAdjustment", "parseNavigationPlugin", "plugin", "provides", "undefined", "openIds", "layout", "Object", "values", "flatMap", "map", "entry", "filter", "firstIdInPart", "at", "indexInPart", "findIndex", "partLength", "length", "NAVIGATION_PLUGIN", "NAVIGATION_ACTION", "NavigationAction", "z", "ResourceKey", "z", "union", "string", "record", "any", "ResourceLanguage", "Resource", "parseTranslationsPlugin", "plugin", "success", "array", "safeParse", "provides", "translations", "undefined", "Plugin", "lazy", "p", "props", "then", "default", "definition", "React", "LocalStorageStore", "React", "useEffect", "useState", "log", "PluginContainer", "plugins", "definitions", "core", "state", "placeholder", "error", "setError", "enabled", "t", "setTimeout", "enabledIds", "Promise", "all", "map", "id", "filter", "definition", "Boolean", "plugin", "initializePlugin", "catch", "err", "meta", "initialized", "ready", "clearTimeout", "ComposedContext", "composeContext", "rootComponents", "pluginDefinition", "provides", "initialize", "Component", "root", "key", "node", "compose", "p", "context", "contexts", "reduce", "Acc", "Next", "children", "createContext", "useContext", "useMemo", "raise", "nonNullable", "PluginContext", "createContext", "undefined", "usePlugins", "useContext", "raise", "Error", "usePlugin", "id", "plugins", "findPlugin", "useResolvePlugin", "predicate", "resolvePlugin", "useResolvePlugins", "useMemo", "map", "filter", "nonNullable", "PluginProvider", "Provider", "parsePluginHost", "plugin", "provides", "plugins", "undefined", "HOST_PLUGIN", "HostPlugin", "meta", "core", "defaults", "fallback", "DefaultFallback", "placeholder", "state", "LocalStorageStore", "ready", "enabled", "available", "filter", "id", "includes", "setPlugin", "values", "push", "index", "findIndex", "splice", "prop", "key", "type", "json", "name", "context", "children", "React", "PluginProvider", "value", "root", "ErrorBoundary", "PluginContainer", "error", "div", "style", "padding", "h1", "fontSize", "fontWeight", "margin", "message", "pre", "stack", "React", "invariant", "createApp", "meta", "plugins", "core", "params", "hostPlugin", "HostPlugin", "IntentMeta", "id", "Plugin", "lazy", "SettingsMeta", "SurfaceMeta", "invariant", "provides", "context", "Context", "root", "Root", "React"]
|
|
7
7
|
}
|
|
@@ -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":3905,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/layout.ts":{"bytes":12113,"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":16951,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3192,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":954,"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/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytes":8632,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx":{"bytes":4091,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts":{"bytes":1171,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts":{"bytes":727,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts":{"bytes":2925,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx":{"bytes":19225,"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/plugin-intent/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/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/plugin-intent/intent.ts":{"bytes":4142,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts":{"bytes":979,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx","kind":"import-statement","original":"./IntentPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/intent.ts","kind":"import-statement","original":"./intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/plugin.ts":{"bytes":5033,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx":{"bytes":13322,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx":{"bytes":5419,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/util","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/plugin-surface/SurfaceRootContext.tsx":{"bytes":3334,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts":{"bytes":735,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts":{"bytes":2035,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx":{"bytes":4012,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/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/plugin-surface/helpers.ts":{"bytes":1818,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx":{"bytes":4344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx":{"bytes":16952,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts":{"bytes":1193,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx","kind":"import-statement","original":"./SurfacePlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx","kind":"import-statement","original":"./Surface"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx":{"bytes":9462,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx","kind":"import-statement","original":"./PluginContainer"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"import-statement","original":"../plugin-surface"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/index.ts":{"bytes":715,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-host/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx","kind":"import-statement","original":"./HostPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts":{"bytes":743,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx":{"bytes":2052,"imports":[{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts":{"bytes":2244,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts":{"bytes":808,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx","kind":"import-statement","original":"./SettingsPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts","kind":"import-statement","original":"./provides"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/index.ts":{"bytes":1008,"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/plugin-intent/index.ts","kind":"import-statement","original":"./plugin-intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/index.ts","kind":"import-statement","original":"./plugin-host"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","kind":"import-statement","original":"./plugin-settings"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"import-statement","original":"./plugin-surface"}],"format":"esm"},"packages/sdk/app-framework/src/App.tsx":{"bytes":7547,"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/plugin-intent/meta.ts","kind":"import-statement","original":"./plugins/plugin-intent/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts","kind":"import-statement","original":"./plugins/plugin-settings/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts","kind":"import-statement","original":"./plugins/plugin-surface/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts","kind":"dynamic-import","original":"./plugins/plugin-intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","kind":"dynamic-import","original":"./plugins/plugin-settings"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"dynamic-import","original":"./plugins/plugin-surface"}],"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":43154},"packages/sdk/app-framework/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-J6LU5GIH.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/util","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-intent-Q5KFPKFA.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-surface-5XSGJ6BG.mjs","kind":"dynamic-import"}],"exports":["ActiveParts","ErrorBoundary","HostPlugin","IntentAction","IntentProvider","Layout","LayoutAction","NavigationAction","Plugin","PluginProvider","Resource","ResourceKey","ResourceLanguage","SLUG_COLLECTION_INDICATOR","SLUG_ENTRY_SEPARATOR","SLUG_KEY_VALUE_SEPARATOR","SLUG_LIST_SEPARATOR","SLUG_PATH_SEPARATOR","SettingsAction","Surface","SurfaceProvider","Toast","createApp","defaultFileTypes","definePlugin","filterPlugins","findPlugin","firstIdInPart","getPlugin","indexInPart","isLayoutAdjustment","isLayoutMode","isLayoutParts","isObject","openIds","parseFileManagerPlugin","parseGraphBuilderPlugin","parseGraphPlugin","parseGraphSerializerPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parseNavigationPlugin","parsePluginHost","parseRootSurfacePlugin","parseSettingsPlugin","parseSurfacePlugin","parseTranslationsPlugin","partLength","resolvePlugin","useIntent","useIntentDispatcher","useIntentResolver","usePlugin","usePlugins","useResolvePlugin","useResolvePlugins","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":2269},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytesInOutput":3050},"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/plugin-host/plugin.ts":{"bytesInOutput":197},"packages/sdk/app-framework/src/plugins/plugin-host/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx":{"bytesInOutput":1893},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx":{"bytesInOutput":3386},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx":{"bytesInOutput":742},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1351}},"bytes":16631},"packages/sdk/app-framework/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"}],"exports":["IntentAction","IntentProvider","default","parseIntentPlugin","parseIntentResolverPlugin","useIntent","useIntentDispatcher","useIntentResolver"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts","inputs":{},"bytes":476},"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13613},"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","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},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["IntentAction","IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","plugin_intent_default","useIntent","useIntentDispatcher","useIntentResolver"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx":{"bytesInOutput":4541},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx":{"bytesInOutput":637},"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts":{"bytesInOutput":94},"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts":{"bytesInOutput":84},"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts":{"bytesInOutput":453},"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts":{"bytesInOutput":42}},"bytes":6650},"packages/sdk/app-framework/dist/lib/browser/plugin-surface-5XSGJ6BG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-surface-5XSGJ6BG.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-J6LU5GIH.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Surface","SurfaceProvider","default","isObject","parseRootSurfacePlugin","parseSurfacePlugin","useSurface","useSurfaceRoot"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","inputs":{},"bytes":475},"packages/sdk/app-framework/dist/lib/browser/chunk-J6LU5GIH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17812},"packages/sdk/app-framework/dist/lib/browser/chunk-J6LU5GIH.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["ErrorBoundary","Surface","SurfaceProvider","isObject","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","plugin_surface_default","useSurface","useSurfaceRoot"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx":{"bytesInOutput":661},"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx":{"bytesInOutput":312},"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts":{"bytesInOutput":87},"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/plugin-surface/helpers.ts":{"bytesInOutput":61},"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts":{"bytesInOutput":44},"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx":{"bytesInOutput":707},"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx":{"bytesInOutput":3417}},"bytes":6424},"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4320},"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs":{"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["definePlugin","filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":1756}},"bytes":1942},"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs","kind":"import-statement"}],"exports":["SettingsAction","default","parseSettingsPlugin"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","inputs":{},"bytes":251},"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2645},"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs":{"imports":[{"path":"@dxos/local-storage","kind":"import-statement","external":true}],"exports":["SettingsAction","meta_default","parseSettingsPlugin","plugin_settings_default"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx":{"bytesInOutput":220},"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts":{"bytesInOutput":90},"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts":{"bytesInOutput":397},"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts":{"bytesInOutput":46}},"bytes":1254}}}
|
|
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":12113,"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":16655,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/translations.ts":{"bytes":3192,"imports":[{"path":"zod","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/common/index.ts":{"bytes":954,"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/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytes":8632,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx":{"bytes":4091,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts":{"bytes":1171,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts":{"bytes":727,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts":{"bytes":2925,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx":{"bytes":19225,"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/plugin-intent/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/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/plugin-intent/intent.ts":{"bytes":4142,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts":{"bytes":979,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx","kind":"import-statement","original":"./IntentPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/intent.ts","kind":"import-statement","original":"./intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx","kind":"import-statement","original":"./IntentContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/plugin.ts":{"bytes":5033,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx":{"bytes":13322,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx":{"bytes":5419,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/util","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/plugin-surface/SurfaceRootContext.tsx":{"bytes":3342,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts":{"bytes":735,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts":{"bytes":2035,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx":{"bytes":4012,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/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/plugin-surface/helpers.ts":{"bytes":1818,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx":{"bytes":4344,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx":{"bytes":16952,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts":{"bytes":1193,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx","kind":"import-statement","original":"./SurfacePlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts","kind":"import-statement","original":"./provides"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx","kind":"import-statement","original":"./ErrorBoundary"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx","kind":"import-statement","original":"./Surface"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx","kind":"import-statement","original":"./SurfaceRootContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx":{"bytes":9462,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx","kind":"import-statement","original":"./PluginContainer"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"import-statement","original":"../plugin-surface"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-host/index.ts":{"bytes":715,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-host/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx","kind":"import-statement","original":"./HostPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx","kind":"import-statement","original":"./PluginContext"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts":{"bytes":743,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx":{"bytes":2052,"imports":[{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts":{"bytes":2244,"imports":[],"format":"esm"},"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts":{"bytes":808,"imports":[{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx","kind":"import-statement","original":"./SettingsPlugin"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts","kind":"import-statement","original":"./provides"}],"format":"esm"},"packages/sdk/app-framework/src/plugins/index.ts":{"bytes":1008,"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/plugin-intent/index.ts","kind":"import-statement","original":"./plugin-intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-host/index.ts","kind":"import-statement","original":"./plugin-host"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","kind":"import-statement","original":"./plugin-settings"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"import-statement","original":"./plugin-surface"}],"format":"esm"},"packages/sdk/app-framework/src/App.tsx":{"bytes":7547,"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/plugin-intent/meta.ts","kind":"import-statement","original":"./plugins/plugin-intent/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts","kind":"import-statement","original":"./plugins/plugin-settings/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts","kind":"import-statement","original":"./plugins/plugin-surface/meta"},{"path":"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts","kind":"dynamic-import","original":"./plugins/plugin-intent"},{"path":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","kind":"dynamic-import","original":"./plugins/plugin-settings"},{"path":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","kind":"dynamic-import","original":"./plugins/plugin-surface"}],"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":42985},"packages/sdk/app-framework/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-EQTQGGE6.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs","kind":"import-statement"},{"path":"zod","kind":"import-statement","external":true},{"path":"@effect/schema","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":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/util","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-intent-Q5KFPKFA.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs","kind":"dynamic-import"},{"path":"packages/sdk/app-framework/dist/lib/browser/plugin-surface-ZQXFAL46.mjs","kind":"dynamic-import"}],"exports":["ActiveParts","ErrorBoundary","HostPlugin","IntentAction","IntentProvider","Layout","LayoutAction","NavigationAction","Plugin","PluginProvider","Resource","ResourceKey","ResourceLanguage","SLUG_COLLECTION_INDICATOR","SLUG_ENTRY_SEPARATOR","SLUG_KEY_VALUE_SEPARATOR","SLUG_LIST_SEPARATOR","SLUG_PATH_SEPARATOR","SettingsAction","Surface","SurfaceProvider","Toast","createApp","defaultFileTypes","definePlugin","filterPlugins","findPlugin","firstIdInPart","getPlugin","indexInPart","isLayoutAdjustment","isLayoutMode","isLayoutParts","isObject","openIds","parseFileManagerPlugin","parseGraphBuilderPlugin","parseGraphPlugin","parseGraphSerializerPlugin","parseIntentPlugin","parseIntentResolverPlugin","parseLayoutPlugin","parseMetadataRecordsPlugin","parseMetadataResolverPlugin","parseNavigationPlugin","parsePluginHost","parseRootSurfacePlugin","parseSettingsPlugin","parseSurfacePlugin","parseTranslationsPlugin","partLength","resolvePlugin","useIntent","useIntentDispatcher","useIntentResolver","usePlugin","usePlugins","useResolvePlugin","useResolvePlugins","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":2269},"packages/sdk/app-framework/src/plugins/common/metadata.ts":{"bytesInOutput":226},"packages/sdk/app-framework/src/plugins/common/navigation.ts":{"bytesInOutput":2978},"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/plugin-host/plugin.ts":{"bytesInOutput":197},"packages/sdk/app-framework/src/plugins/plugin-host/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx":{"bytesInOutput":1893},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx":{"bytesInOutput":3386},"packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx":{"bytesInOutput":742},"packages/sdk/app-framework/src/index.ts":{"bytesInOutput":0},"packages/sdk/app-framework/src/App.tsx":{"bytesInOutput":1351}},"bytes":16559},"packages/sdk/app-framework/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"}],"exports":["IntentAction","IntentProvider","default","parseIntentPlugin","parseIntentResolverPlugin","useIntent","useIntentDispatcher","useIntentResolver"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts","inputs":{},"bytes":476},"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13613},"packages/sdk/app-framework/dist/lib/browser/chunk-CDLQO5K2.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","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},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["IntentAction","IntentProvider","meta_default","parseIntentPlugin","parseIntentResolverPlugin","plugin_intent_default","useIntent","useIntentDispatcher","useIntentResolver"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx":{"bytesInOutput":4541},"packages/sdk/app-framework/src/plugins/plugin-intent/IntentContext.tsx":{"bytesInOutput":637},"packages/sdk/app-framework/src/plugins/plugin-intent/helpers.ts":{"bytesInOutput":94},"packages/sdk/app-framework/src/plugins/plugin-intent/meta.ts":{"bytesInOutput":84},"packages/sdk/app-framework/src/plugins/plugin-intent/provides.ts":{"bytesInOutput":453},"packages/sdk/app-framework/src/plugins/plugin-intent/index.ts":{"bytesInOutput":42}},"bytes":6650},"packages/sdk/app-framework/dist/lib/browser/plugin-surface-ZQXFAL46.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-surface-ZQXFAL46.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-EQTQGGE6.mjs","kind":"import-statement"},{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"}],"exports":["ErrorBoundary","Surface","SurfaceProvider","default","isObject","parseRootSurfacePlugin","parseSurfacePlugin","useSurface","useSurfaceRoot"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts","inputs":{},"bytes":475},"packages/sdk/app-framework/dist/lib/browser/chunk-EQTQGGE6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17817},"packages/sdk/app-framework/dist/lib/browser/chunk-EQTQGGE6.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["ErrorBoundary","Surface","SurfaceProvider","isObject","meta_default","parseRootSurfacePlugin","parseSurfacePlugin","plugin_surface_default","useSurface","useSurfaceRoot"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-surface/SurfacePlugin.tsx":{"bytesInOutput":661},"packages/sdk/app-framework/src/plugins/plugin-surface/SurfaceRootContext.tsx":{"bytesInOutput":312},"packages/sdk/app-framework/src/plugins/plugin-surface/meta.ts":{"bytesInOutput":87},"packages/sdk/app-framework/src/plugins/plugin-surface/provides.ts":{"bytesInOutput":191},"packages/sdk/app-framework/src/plugins/plugin-surface/helpers.ts":{"bytesInOutput":61},"packages/sdk/app-framework/src/plugins/plugin-surface/index.ts":{"bytesInOutput":44},"packages/sdk/app-framework/src/plugins/plugin-surface/ErrorBoundary.tsx":{"bytesInOutput":707},"packages/sdk/app-framework/src/plugins/plugin-surface/Surface.tsx":{"bytesInOutput":3417}},"bytes":6424},"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4320},"packages/sdk/app-framework/dist/lib/browser/chunk-3E7RY3CE.mjs":{"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["definePlugin","filterPlugins","findPlugin","getPlugin","resolvePlugin"],"inputs":{"packages/sdk/app-framework/src/plugins/helpers.ts":{"bytesInOutput":1756}},"bytes":1942},"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/app-framework/dist/lib/browser/plugin-settings-OM3G2QFY.mjs":{"imports":[{"path":"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs","kind":"import-statement"}],"exports":["SettingsAction","default","parseSettingsPlugin"],"entryPoint":"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts","inputs":{},"bytes":251},"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2645},"packages/sdk/app-framework/dist/lib/browser/chunk-653Y45CL.mjs":{"imports":[{"path":"@dxos/local-storage","kind":"import-statement","external":true}],"exports":["SettingsAction","meta_default","parseSettingsPlugin","plugin_settings_default"],"inputs":{"packages/sdk/app-framework/src/plugins/plugin-settings/SettingsPlugin.tsx":{"bytesInOutput":220},"packages/sdk/app-framework/src/plugins/plugin-settings/meta.ts":{"bytesInOutput":90},"packages/sdk/app-framework/src/plugins/plugin-settings/provides.ts":{"bytesInOutput":397},"packages/sdk/app-framework/src/plugins/plugin-settings/index.ts":{"bytesInOutput":46}},"bytes":1254}}}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
plugin_surface_default,
|
|
9
9
|
useSurface,
|
|
10
10
|
useSurfaceRoot
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EQTQGGE6.mjs";
|
|
12
12
|
import "./chunk-3E7RY3CE.mjs";
|
|
13
13
|
export {
|
|
14
14
|
ErrorBoundary,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
useSurface,
|
|
22
22
|
useSurfaceRoot
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=plugin-surface-
|
|
24
|
+
//# sourceMappingURL=plugin-surface-ZQXFAL46.mjs.map
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_EF67TRWJ_exports = {};
|
|
30
|
+
__export(chunk_EF67TRWJ_exports, {
|
|
31
31
|
ErrorBoundary: () => ErrorBoundary,
|
|
32
32
|
Surface: () => Surface,
|
|
33
33
|
SurfaceProvider: () => SurfaceProvider,
|
|
@@ -39,7 +39,7 @@ __export(chunk_3Q7I5MBZ_exports, {
|
|
|
39
39
|
useSurface: () => useSurface,
|
|
40
40
|
useSurfaceRoot: () => useSurfaceRoot
|
|
41
41
|
});
|
|
42
|
-
module.exports = __toCommonJS(
|
|
42
|
+
module.exports = __toCommonJS(chunk_EF67TRWJ_exports);
|
|
43
43
|
var import_chunk_QBM42OQ6 = require("./chunk-QBM42OQ6.cjs");
|
|
44
44
|
var import_react = __toESM(require("react"));
|
|
45
45
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
@@ -233,4 +233,4 @@ var plugin_surface_default = SurfacePlugin;
|
|
|
233
233
|
useSurface,
|
|
234
234
|
useSurfaceRoot
|
|
235
235
|
});
|
|
236
|
-
//# sourceMappingURL=chunk-
|
|
236
|
+
//# sourceMappingURL=chunk-EF67TRWJ.cjs.map
|