@ohos-ports/braneframe-plugin-script 0.0.0-stage → 0.6.7-beta.0

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.
Files changed (73) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +3 -2
  3. package/dist/lib/browser/chunk-HAIUBDFW.mjs +21 -0
  4. package/dist/lib/browser/chunk-HAIUBDFW.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +670 -0
  6. package/dist/lib/browser/index.mjs.map +7 -0
  7. package/dist/lib/browser/meta.json +1 -0
  8. package/dist/lib/browser/meta.mjs +9 -0
  9. package/dist/lib/browser/meta.mjs.map +7 -0
  10. package/dist/types/src/ScriptPlugin.d.ts +7 -0
  11. package/dist/types/src/ScriptPlugin.d.ts.map +1 -0
  12. package/dist/types/src/compiler/compiler.d.ts +39 -0
  13. package/dist/types/src/compiler/compiler.d.ts.map +1 -0
  14. package/dist/types/src/compiler/compiler.test.d.ts +2 -0
  15. package/dist/types/src/compiler/compiler.test.d.ts.map +1 -0
  16. package/dist/types/src/compiler/index.d.ts +2 -0
  17. package/dist/types/src/compiler/index.d.ts.map +1 -0
  18. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +12 -0
  19. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -0
  20. package/dist/types/src/components/FrameContainer/frame.d.ts +2 -0
  21. package/dist/types/src/components/FrameContainer/frame.d.ts.map +1 -0
  22. package/dist/types/src/components/FrameContainer/index.d.ts +2 -0
  23. package/dist/types/src/components/FrameContainer/index.d.ts.map +1 -0
  24. package/dist/types/src/components/ScriptBlock.d.ts +16 -0
  25. package/dist/types/src/components/ScriptBlock.d.ts.map +1 -0
  26. package/dist/types/src/components/ScriptBlock.stories.d.ts +14 -0
  27. package/dist/types/src/components/ScriptBlock.stories.d.ts.map +1 -0
  28. package/dist/types/src/components/ScriptEditor/ScriptEditor.d.ts +10 -0
  29. package/dist/types/src/components/ScriptEditor/ScriptEditor.d.ts.map +1 -0
  30. package/dist/types/src/components/ScriptEditor/ScriptEditor.stories.d.ts +13 -0
  31. package/dist/types/src/components/ScriptEditor/ScriptEditor.stories.d.ts.map +1 -0
  32. package/dist/types/src/components/ScriptEditor/index.d.ts +2 -0
  33. package/dist/types/src/components/ScriptEditor/index.d.ts.map +1 -0
  34. package/dist/types/src/components/Splitter/Splitter.d.ts +15 -0
  35. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -0
  36. package/dist/types/src/components/Splitter/Splitter.stories.d.ts +13 -0
  37. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -0
  38. package/dist/types/src/components/Splitter/index.d.ts +2 -0
  39. package/dist/types/src/components/Splitter/index.d.ts.map +1 -0
  40. package/dist/types/src/components/index.d.ts +5 -0
  41. package/dist/types/src/components/index.d.ts.map +1 -0
  42. package/dist/types/src/index.d.ts +7 -0
  43. package/dist/types/src/index.d.ts.map +1 -0
  44. package/dist/types/src/meta.d.ts +15 -0
  45. package/dist/types/src/meta.d.ts.map +1 -0
  46. package/dist/types/src/translations.d.ts +12 -0
  47. package/dist/types/src/translations.d.ts.map +1 -0
  48. package/dist/types/src/types.d.ts +8 -0
  49. package/dist/types/src/types.d.ts.map +1 -0
  50. package/package.json +97 -4
  51. package/src/ScriptPlugin.tsx +176 -0
  52. package/src/compiler/compiler.test.ts +17 -0
  53. package/src/compiler/compiler.ts +210 -0
  54. package/src/compiler/index.ts +5 -0
  55. package/src/components/FrameContainer/FrameContainer.tsx +82 -0
  56. package/src/components/FrameContainer/frame.html +25 -0
  57. package/src/components/FrameContainer/frame.tsx +51 -0
  58. package/src/components/FrameContainer/index.ts +5 -0
  59. package/src/components/ScriptBlock.stories.tsx +61 -0
  60. package/src/components/ScriptBlock.tsx +129 -0
  61. package/src/components/ScriptEditor/ScriptEditor.stories.tsx +65 -0
  62. package/src/components/ScriptEditor/ScriptEditor.tsx +52 -0
  63. package/src/components/ScriptEditor/index.ts +5 -0
  64. package/src/components/ScriptEditor/themes/GitHubLight.json +348 -0
  65. package/src/components/ScriptEditor/themes/XCode.json +98 -0
  66. package/src/components/Splitter/Splitter.stories.tsx +37 -0
  67. package/src/components/Splitter/Splitter.tsx +52 -0
  68. package/src/components/Splitter/index.ts +5 -0
  69. package/src/components/index.ts +8 -0
  70. package/src/index.ts +13 -0
  71. package/src/meta.tsx +19 -0
  72. package/src/translations.ts +18 -0
  73. package/src/types.tsx +27 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ScriptPlugin.tsx", "../../../src/components/FrameContainer/FrameContainer.tsx", "../../../src/components/ScriptBlock.tsx", "../../../src/components/ScriptEditor/ScriptEditor.tsx", "../../../src/components/Splitter/Splitter.tsx", "../../../src/compiler/compiler.ts", "../../../src/translations.ts", "../../../src/types.tsx", "../../../src/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Code, type IconProps } from '@phosphor-icons/react';\nimport React, { useMemo } from 'react';\n\nimport { parseClientPlugin } from '@ohos-ports/braneframe-plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup } from '@braneframe/plugin-graph';\nimport { SpaceAction } from '@ohos-ports/braneframe-plugin-space';\nimport { ScriptType, TextType } from '@ohos-ports/braneframe-types';\nimport { parseIntentPlugin, type PluginDefinition, resolvePlugin, NavigationAction } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { createDocAccessor } from '@dxos/react-client/echo';\nimport { Main } from '@dxos/react-ui';\nimport {\n baseSurface,\n bottombarBlockPaddingEnd,\n fixedInsetFlexLayout,\n topbarBlockPaddingStart,\n} from '@ohos-ports/dxos-react-ui-theme';\n\nimport { ScriptBlock, type ScriptBlockProps } from './components';\nimport meta, { SCRIPT_PLUGIN } from './meta';\nimport translations from './translations';\nimport { ScriptAction, type ScriptPluginProvides } from './types';\n\nexport type ScriptPluginProps = {\n containerUrl: string;\n};\n\nexport const ScriptPlugin = ({ containerUrl }: ScriptPluginProps): PluginDefinition<ScriptPluginProvides> => {\n return {\n meta,\n provides: {\n metadata: {\n records: {\n [ScriptType.typename]: {\n placeholder: ['object title placeholder', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n },\n },\n },\n translations,\n echo: {\n schema: [ScriptType],\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: ScriptAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SCRIPT_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n testId: 'scriptPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n stack: {\n creators: [\n {\n id: 'create-stack-section-script',\n testId: 'scriptPlugin.createSectionSpaceScript',\n label: ['create stack section label', { ns: SCRIPT_PLUGIN }],\n icon: (props: any) => <Code {...props} />,\n intent: {\n plugin: SCRIPT_PLUGIN,\n action: ScriptAction.CREATE,\n },\n },\n ],\n },\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'main':\n return data.active instanceof ScriptType ? (\n <Main.Content\n classNames={[baseSurface, fixedInsetFlexLayout, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}\n >\n <ScriptBlockWrapper\n // prettier-ignore\n script={data.active}\n containerUrl={containerUrl}\n classes={{ toolbar: 'px-1' }}\n />\n </Main.Content>\n ) : null;\n case 'slide':\n return data.slide instanceof ScriptType ? (\n <ScriptBlockWrapper\n // prettier-ignore\n script={data.slide}\n containerUrl={containerUrl}\n classes={{ toolbar: 'p-24' }}\n view='preview'\n hideSelector\n />\n ) : null;\n case 'section':\n return data.object instanceof ScriptType ? (\n <ScriptBlockWrapper\n // prettier-ignore\n script={data.object}\n containerUrl={containerUrl}\n classes={{ root: 'h-[400px] py-2' }}\n />\n ) : null;\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent, plugins) => {\n switch (intent.action) {\n case ScriptAction.CREATE: {\n return { data: create(ScriptType, { source: create(TextType, { content: example }) }) };\n }\n }\n },\n },\n },\n };\n};\n\nconst ScriptBlockWrapper = ({ script, ...props }: { script: ScriptType } & Omit<ScriptBlockProps, 'id' | 'source'>) => {\n const source = useMemo(() => script.source && createDocAccessor(script.source, ['content']), [script.source]);\n return source ? <ScriptBlock id={script.id} source={source} {...props} /> : null;\n};\n\n// TODO(burdon): Import.\nconst example = [\n \"import { Filter, useQuery, useSpaces} from '@dxos/react-client/echo';\",\n \"import { Chart } from '@ohos-ports/braneframe-plugin-explorer';\",\n '',\n 'export default () => {',\n ' const spaces = useSpaces();',\n ' const space = spaces[1];',\n \" const objects = useQuery(space, Filter.typename('example.com/type/contact'));\",\n ' return <Chart items={objects} accessor={object => ({ x: object.lat, y: object.lng })} />',\n '}',\n].join('\\n');\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect, useRef } from 'react';\n\nimport { clientServiceBundle } from '@dxos/client-protocol';\nimport { log } from '@dxos/log';\nimport { useClient } from '@dxos/react-client';\nimport { baseSurface, mx } from '@ohos-ports/dxos-react-ui-theme';\nimport { createProtoRpcPeer } from '@dxos/rpc';\nimport { createIFramePort } from '@dxos/rpc-tunnel';\n\nimport { type CompilerResult } from '../../compiler';\n\nexport type FrameContainerProps = {\n containerUrl: string;\n result: CompilerResult;\n debug?: boolean;\n};\n\n/**\n * IFrame container for the compiled script.\n */\nexport const FrameContainer = ({ containerUrl, result, debug = true }: FrameContainerProps) => {\n const client = useClient();\n const iframeRef = useRef<HTMLIFrameElement>(null);\n useEffect(() => {\n if (iframeRef.current) {\n // Connect iframe to client.\n const rpc = createProtoRpcPeer({\n exposed: clientServiceBundle,\n handlers: (client as any)._services.services, // TODO(burdon): Remove cast?\n port: createIFramePort({\n channel: 'frame',\n iframe: iframeRef.current,\n origin: '*',\n }),\n });\n\n rpc.open().catch((e) => log.catch(e));\n return () => {\n rpc.close().catch((e) => log.catch(e));\n };\n }\n }, [iframeRef]);\n\n // Encodes compiled code via URL.\n const sourceHash = Buffer.from(result.sourceHash).toString('hex');\n const src = result.bundle && `${containerUrl}?ts=${sourceHash}#code=${encodeURIComponent(result.bundle)}`;\n\n return (\n <>\n <iframe ref={iframeRef} sandbox='allow-scripts' src={src} style={{ width: '100%', height: '100%' }} />\n\n {debug && (\n <div className='relative'>\n <div\n className={mx(\n baseSurface,\n 'flex absolute right-2 bottom-2 w-[400px] h-[200px] ring rounded',\n 'z-[100] overflow-x-hidden overflow-y-auto',\n )}\n >\n <pre className='text-xs whitespace-break-spaces break-all p-2'>\n {JSON.stringify(\n {\n timestamp: result.timestamp,\n sourceHash,\n error: result.error,\n src,\n },\n undefined,\n 2,\n )}\n </pre>\n </div>\n </div>\n )}\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Check, Play, Warning } from '@phosphor-icons/react';\n// @ts-ignore\nimport esbuildWasmURL from 'esbuild-wasm/esbuild.wasm?url';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { DocAccessor } from '@dxos/react-client/echo';\nimport { DensityProvider, useThemeContext, Toolbar, Button } from '@dxos/react-ui';\nimport { mx, getSize } from '@ohos-ports/dxos-react-ui-theme';\n\nimport { FrameContainer } from './FrameContainer';\nimport { ScriptEditor } from './ScriptEditor';\nimport { Splitter, SplitterSelector, type View } from './Splitter';\nimport { Compiler, type CompilerResult, initializeCompiler } from '../compiler';\n\n// Keep in sync with packages/apps/composer-app/script-frame/main.tsx .\nconst PROVIDED_MODULES = [\n 'react',\n 'react-dom/client',\n '@dxos/client',\n '@dxos/react-client',\n '@dxos/react-client/echo',\n '@ohos-ports/braneframe-plugin-explorer',\n '@ohos-ports/braneframe-types',\n];\n\nexport type ScriptBlockProps = {\n id: string;\n source: DocAccessor;\n view?: View;\n hideSelector?: boolean;\n classes?: {\n root?: string;\n toolbar?: string;\n };\n\n // Url to the page used to host the script in the iframe.\n containerUrl: string;\n};\n\n// TODO(burdon): Cache compiled results in context.\nexport const ScriptBlock = ({\n id,\n source,\n view: controlledView,\n hideSelector,\n classes,\n containerUrl,\n}: ScriptBlockProps) => {\n const { themeMode } = useThemeContext();\n const [view, setView] = useState<View>(controlledView ?? 'editor');\n useEffect(() => handleSetView(controlledView ?? 'editor'), [controlledView]);\n\n const [result, setResult] = useState<CompilerResult>();\n const compiler = useMemo(() => new Compiler({ platform: 'browser', providedModules: PROVIDED_MODULES }), []);\n useEffect(() => {\n // TODO(burdon): Create useCompiler hook (with initialization).\n void initializeCompiler({ wasmURL: esbuildWasmURL });\n }, []);\n\n useEffect(() => {\n // TODO(burdon): Throttle and listen for update.\n const t = setTimeout(async () => {\n const result = await compiler.compile(DocAccessor.getValue(source));\n setResult(result);\n });\n\n return () => clearTimeout(t);\n }, [source, id]);\n\n const handleSetView = useCallback(\n (view: View) => {\n setView(view);\n if (!result && view !== 'editor') {\n void handleExec(false);\n }\n },\n [result],\n );\n\n const handleExec = useCallback(\n async (auto = true) => {\n const result = await compiler.compile(DocAccessor.getValue(source));\n setResult(result);\n if (auto && view === 'editor') {\n setView('preview');\n }\n },\n [source, view],\n );\n\n if (!source) {\n return null;\n }\n\n return (\n <div className={mx('flex flex-col grow overflow-hidden', classes?.root)}>\n {!hideSelector && (\n <DensityProvider density='fine'>\n <Toolbar.Root classNames={mx('mb-2', classes?.toolbar)}>\n <SplitterSelector view={view} onChange={handleSetView} />\n <div className='grow' />\n {result?.bundle && !result?.error && (\n <div title={String(result.error)}>\n <Check className={mx(getSize(5), 'text-green-500')} />\n </div>\n )}\n {result?.error && (\n <div title={String(result.error)}>\n <Warning className={mx(getSize(5), 'text-orange-500')} />\n </div>\n )}\n <Button variant='ghost' onClick={() => handleExec()}>\n <Play className={getSize(5)} />\n </Button>\n </Toolbar.Root>\n </DensityProvider>\n )}\n\n <Splitter view={view}>\n <ScriptEditor source={source} themeMode={themeMode} />\n {result && <FrameContainer key={id} result={result} containerUrl={containerUrl} />}\n </Splitter>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { autocompletion, completionKeymap } from '@codemirror/autocomplete';\nimport { javascript } from '@codemirror/lang-javascript';\nimport { EditorView, keymap, lineNumbers } from '@codemirror/view';\nimport { minimalSetup } from 'codemirror';\nimport React from 'react';\n\nimport { DocAccessor } from '@dxos/react-client/echo';\nimport { type ThemeMode } from '@dxos/react-ui';\nimport { automerge, defaultTheme, useTextEditor } from '@dxos/react-ui-editor';\nimport { focusRing, mx } from '@ohos-ports/dxos-react-ui-theme';\n\nexport type ScriptEditorProps = {\n source: DocAccessor;\n themeMode?: ThemeMode;\n className?: string;\n};\n\n// TODO(burdon): https://davidmyers.dev/blog/how-to-build-a-code-editor-with-codemirror-6-and-typescript/introduction\n\nexport const ScriptEditor = ({ source, themeMode, className }: ScriptEditorProps) => {\n const { parentRef, focusAttributes } = useTextEditor(\n () => ({\n initialValue: DocAccessor.getValue(source),\n extensions: [\n // TODO(burdon): Use basic set-up (e.g., bracket matching).\n // TODO(burdon): Use this in text editor (cancels highlight current line)\n // basicSetup,\n minimalSetup,\n\n lineNumbers(),\n // TODO(burdon): Syntax highlighting theme.\n javascript({ typescript: true }),\n autocompletion({ activateOnTyping: false }),\n keymap.of([...completionKeymap]),\n\n EditorView.baseTheme(defaultTheme),\n EditorView.darkTheme.of(themeMode === 'dark'),\n EditorView.contentAttributes.of({ class: '!px-2' }),\n\n // TODO(burdon): Presence.\n automerge(source),\n ],\n }),\n [source, themeMode],\n );\n\n return <div {...focusAttributes} ref={parentRef} className={mx('flex grow rounded-sm', focusRing, className)} />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Code, SquareSplitHorizontal, Eye } from '@phosphor-icons/react';\nimport React, { type ReactNode } from 'react';\n\nimport { ToggleGroup, ToggleGroupItem, Toolbar } from '@dxos/react-ui';\nimport { getSize, mx } from '@ohos-ports/dxos-react-ui-theme';\n\nexport type View = 'editor' | 'preview' | 'split';\n\nexport type SplitterProps = {\n view?: View;\n className?: string;\n children?: ReactNode[];\n};\n\n// TODO(burdon): Surfaces?\nexport const Splitter = ({ view = 'split', className, children = [] }: SplitterProps) => {\n const [left, right] = children;\n return (\n <div className={mx('flex overflow-hidden grow', className)}>\n {left && view !== 'preview' && <div className='flex flex-1 shrink-0 overflow-hidden'>{left}</div>}\n {right && view !== 'editor' && <div className='flex flex-1 shrink-0 overflow-hidden'>{right}</div>}\n </div>\n );\n};\n\nexport type SplitterSelectorProps = {\n view?: View;\n onChange?: (view: View) => void;\n className?: string;\n};\n\nexport const SplitterSelector = ({ view, onChange, className }: SplitterSelectorProps) => {\n return (\n <Toolbar.Root classNames={className}>\n <ToggleGroup type='single' value={view} onValueChange={(value) => onChange?.(value as View)}>\n <ToggleGroupItem value='editor'>\n <Code className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value='split'>\n <SquareSplitHorizontal className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value='preview'>\n <Eye className={getSize(5)} />\n </ToggleGroupItem>\n </ToggleGroup>\n </Toolbar.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type BuildOptions } from 'esbuild';\nimport { build, initialize, type BuildResult } from 'esbuild-wasm';\n\nimport { subtleCrypto } from '@dxos/crypto';\nimport { invariant } from '@dxos/invariant';\n\nexport type Import = {\n moduleUrl: string;\n defaultImport: boolean;\n namedImports: string[];\n};\n\nexport type CompilerResult = {\n timestamp: number;\n sourceHash: Buffer;\n imports?: Import[];\n bundle?: string;\n error?: any;\n};\n\nexport type CompilerOptions = {\n platform: BuildOptions['platform'];\n providedModules: string[];\n};\n\nlet initialized: Promise<void>;\nexport const initializeCompiler = async (options: { wasmURL: string }) => {\n await (initialized ??= initialize({\n wasmURL: options.wasmURL,\n }));\n};\n\n/**\n * ESBuild compiler.\n */\nexport class Compiler {\n constructor(private readonly _options: CompilerOptions) {}\n\n async compile(source: string): Promise<CompilerResult> {\n const { providedModules, ...options } = this._options;\n\n const createResult = async (result?: Partial<CompilerResult>) => {\n return {\n timestamp: Date.now(),\n sourceHash: Buffer.from(await subtleCrypto.digest('SHA-256', Buffer.from(source))),\n ...result,\n };\n };\n\n if (this._options.platform === 'browser') {\n invariant(initialized, 'Compiler not initialized.');\n await initialized;\n }\n\n const imports = analyzeSourceFileImports(source);\n\n // https://esbuild.github.io/api/#build\n try {\n const result = await build({\n ...options,\n metafile: true,\n write: false,\n entryPoints: ['memory:main.tsx'],\n bundle: true,\n format: 'esm',\n plugins: [\n {\n name: 'memory',\n setup: (build) => {\n build.onResolve({ filter: /^memory:/ }, ({ path }) => {\n return { path: path.split(':')[1], namespace: 'memory' };\n });\n\n build.onLoad({ filter: /.*/, namespace: 'memory' }, ({ path }) => {\n const imports = [\"import React from 'react';\"];\n if (path === 'main.tsx') {\n return {\n contents: [...imports, source].join('\\n'),\n loader: 'tsx',\n };\n }\n });\n\n for (const module of providedModules) {\n build.onResolve({ filter: new RegExp(`^${module}$`) }, ({ path }) => {\n return { path, namespace: 'injected-module' };\n });\n }\n\n build.onLoad({ filter: /.*/, namespace: 'injected-module' }, ({ path }) => {\n const namedImports = imports.find((entry) => entry.moduleIdentifier === path)?.namedImports ?? [];\n return {\n contents: `\n const { ${namedImports.join(',')} } = window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}];\n export { ${namedImports.join(',')} };\n export default window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}].default;\n `,\n loader: 'tsx',\n };\n });\n },\n },\n ],\n });\n\n return await createResult({\n imports: this.analyzeImports(result),\n bundle: result.outputFiles![0].text,\n });\n } catch (err) {\n return await createResult({ error: err });\n }\n }\n\n // TODO(dmaretskyi): In the future we can replace the compiler with SWC with plugins running in WASM.\n analyzeImports(result: BuildResult): Import[] {\n invariant(result.outputFiles);\n\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, result.outputFiles[0].text);\n return Object.values(result.metafile!.outputs)[0].imports.map((entry): Import => {\n const namedImports: string[] = [];\n\n const parsedImport = parsedImports.find((capture) => capture?.[4] === entry.path);\n if (parsedImport?.[2]) {\n NAMED_IMPORTS_REGEX.lastIndex = 0;\n const namedImportsMatch = NAMED_IMPORTS_REGEX.exec(parsedImport[2]);\n if (namedImportsMatch) {\n namedImportsMatch[1].split(',').forEach((importName) => {\n namedImports.push(importName.trim());\n });\n }\n }\n\n return {\n moduleUrl: entry.path,\n defaultImport: !!parsedImport?.[1],\n namedImports,\n };\n });\n }\n\n analyzeSourceFileImports(code: string) {\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, code);\n return parsedImports.map((capture) => {\n return {\n defaultImportName: capture[1],\n namedImports: capture[2]?.split(',').map((importName) => importName.trim()),\n wildcardImportName: capture[3],\n moduleIdentifier: capture[4],\n quotes: capture[5],\n };\n });\n }\n}\n\n// https://regex101.com/r/FEN5ks/1\n// https://stackoverflow.com/a/73265022\n// $1 = default import name (can be non-existent)\n// $2 = destructured exports (can be non-existent)\n// $3 = wildcard import name (can be non-existent)\n// $4 = module identifier\n// $5 = quotes used (either ' or \")\nconst IMPORT_REGEX =\n /import(?:(?:(?:[ \\n\\t]+([^ *\\n\\t{},]+)[ \\n\\t]*(?:,|[ \\n\\t]+))?([ \\n\\t]*{(?:[ \\n\\t]*[^ \\n\\t\"'{}]+[ \\n\\t]*,?)+})?[ \\n\\t]*)|[ \\n\\t]*\\*[ \\n\\t]*as[ \\n\\t]+([^ \\n\\t{}]+)[ \\n\\t]+)from[ \\n\\t]*(?:['\"])([^'\"\\n]+)(['\"])/gm;\n\nconst NAMED_IMPORTS_REGEX = /[ \\n\\t]*{((?:[ \\n\\t]*[^ \\n\\t\"'{}]+[ \\n\\t]*,?)+)}[ \\n\\t]*/gm;\n\nconst allMatches = (regex: RegExp, str: string) => {\n regex.lastIndex = 0;\n\n let match;\n const matches = [];\n while ((match = regex.exec(str))) {\n matches.push(match);\n }\n\n return matches;\n};\n\ntype ParsedImport = {\n defaultImportName?: string;\n namedImports: string[];\n wildcardImportName?: string;\n moduleIdentifier: string;\n quotes: string;\n};\n\nconst analyzeSourceFileImports = (code: string): ParsedImport[] => {\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, code);\n return parsedImports.map((capture) => {\n return {\n defaultImportName: capture[1],\n namedImports: capture[2]\n ?.trim()\n .slice(1, -1)\n .split(',')\n .map((importName) => importName.trim()),\n wildcardImportName: capture[3],\n moduleIdentifier: capture[4],\n quotes: capture[5],\n };\n });\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SCRIPT_PLUGIN]: {\n 'plugin name': 'Scripts',\n 'object title placeholder': 'New script',\n 'create object label': 'Create script',\n 'create stack section label': 'Create script',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type SchemaProvides } from '@ohos-ports/braneframe-plugin-client';\nimport type { StackProvides } from '@braneframe/plugin-stack';\nimport type {\n GraphBuilderProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport enum ScriptAction {\n CREATE = `${SCRIPT_PLUGIN}/create`,\n}\n\nexport type ScriptPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n MetadataRecordsProvides &\n TranslationsProvides &\n SchemaProvides &\n StackProvides;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPlugin } from './ScriptPlugin';\n\nexport default ScriptPlugin;\n\nexport * from './compiler';\nexport * from './components';\nexport * from './types';\n\nexport * from './ScriptPlugin';\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,QAAAA,aAA4B;AACrC,OAAOC,UAASC,WAAAA,gBAAe;AAE/B,SAASC,yBAAyB;AAClC,SAA2BC,iBAAiBC,qBAAqB;AACjE,SAASC,mBAAmB;AAC5B,SAASC,YAAYC,gBAAgB;AACrC,SAASC,mBAA0CC,eAAeC,wBAAwB;AAC1F,SAASC,cAAc;AACvB,SAASC,yBAAyB;AAClC,SAASC,YAAY;AACrB,SACEC,eAAAA,cACAC,0BACAC,sBACAC,+BACK;;;AChBP,OAAOC,SAASC,WAAWC,cAAc;AAEzC,SAASC,2BAA2B;AACpC,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B,SAASC,aAAaC,UAAU;AAChC,SAASC,0BAA0B;AACnC,SAASC,wBAAwB;;AAa1B,IAAMC,iBAAiB,CAAC,EAAEC,cAAcC,QAAQC,QAAQ,KAAI,MAAuB;AACxF,QAAMC,SAAST,UAAAA;AACf,QAAMU,YAAYb,OAA0B,IAAA;AAC5CD,YAAU,MAAA;AACR,QAAIc,UAAUC,SAAS;AAErB,YAAMC,MAAMT,mBAAmB;QAC7BU,SAASf;QACTgB,UAAWL,OAAeM,UAAUC;QACpCC,MAAMb,iBAAiB;UACrBc,SAAS;UACTC,QAAQT,UAAUC;UAClBS,QAAQ;QACV,CAAA;MACF,CAAA;AAEAR,UAAIS,KAAI,EAAGC,MAAM,CAACC,MAAMxB,IAAIuB,MAAMC,GAAAA,QAAAA;;;;;;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AAY3D,IAAI4C,OAAO5C;IAAIqD;IAAiB,GAAGtE;OAAY;AAC9E;AAGA,IAAMyE,UAAU;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACAI,KAAK,IAAA;;;AQzKP,IAAA,cAAeC;",
6
+ "names": ["Code", "React", "useMemo", "parseClientPlugin", "createExtension", "isActionGroup", "SpaceAction", "ScriptType", "TextType", "parseIntentPlugin", "resolvePlugin", "NavigationAction", "create", "createDocAccessor", "Main", "baseSurface", "bottombarBlockPaddingEnd", "fixedInsetFlexLayout", "topbarBlockPaddingStart", "React", "useEffect", "useRef", "clientServiceBundle", "log", "useClient", "baseSurface", "mx", "createProtoRpcPeer", "createIFramePort", "FrameContainer", "containerUrl", "result", "debug", "client", "iframeRef", "current", "rpc", "exposed", "handlers", "_services", "services", "port", "channel", "iframe", "origin", "open", "catch", "e", "close", "sourceHash", "Buffer", "from", "toString", "src", "bundle", "encodeURIComponent", "ref", "sandbox", "style", "width", "height", "div", "className", "pre", "JSON", "stringify", "timestamp", "error", "undefined", "Check", "Play", "Warning", "esbuildWasmURL", "React", "useCallback", "useEffect", "useMemo", "useState", "DocAccessor", "DensityProvider", "useThemeContext", "Toolbar", "Button", "mx", "getSize", "autocompletion", "completionKeymap", "javascript", "EditorView", "keymap", "lineNumbers", "minimalSetup", "React", "DocAccessor", "automerge", "defaultTheme", "useTextEditor", "focusRing", "mx", "ScriptEditor", "source", "themeMode", "className", "parentRef", "focusAttributes", "useTextEditor", "initialValue", "DocAccessor", "getValue", "extensions", "minimalSetup", "lineNumbers", "javascript", "typescript", "autocompletion", "activateOnTyping", "keymap", "of", "completionKeymap", "EditorView", "baseTheme", "defaultTheme", "darkTheme", "contentAttributes", "class", "automerge", "React", "div", "ref", "mx", "focusRing", "Code", "SquareSplitHorizontal", "Eye", "React", "ToggleGroup", "ToggleGroupItem", "Toolbar", "getSize", "mx", "Splitter", "view", "className", "children", "left", "right", "React", "div", "mx", "SplitterSelector", "onChange", "Toolbar", "Root", "classNames", "ToggleGroup", "type", "value", "onValueChange", "ToggleGroupItem", "Code", "getSize", "SquareSplitHorizontal", "Eye", "build", "initialize", "subtleCrypto", "invariant", "initialized", "initializeCompiler", "options", "wasmURL", "Compiler", "constructor", "_options", "compile", "source", "providedModules", "createResult", "result", "timestamp", "Date", "now", "sourceHash", "Buffer", "from", "digest", "platform", "imports", "analyzeSourceFileImports", "metafile", "write", "entryPoints", "bundle", "format", "plugins", "name", "setup", "onResolve", "filter", "path", "split", "namespace", "onLoad", "contents", "join", "loader", "module", "RegExp", "namedImports", "find", "entry", "moduleIdentifier", "JSON", "stringify", "analyzeImports", "outputFiles", "text", "err", "error", "parsedImports", "allMatches", "IMPORT_REGEX", "Object", "values", "outputs", "map", "parsedImport", "capture", "NAMED_IMPORTS_REGEX", "lastIndex", "namedImportsMatch", "exec", "forEach", "importName", "push", "trim", "moduleUrl", "defaultImport", "code", "defaultImportName", "wildcardImportName", "quotes", "regex", "str", "match", "matches", "slice", "PROVIDED_MODULES", "ScriptBlock", "id", "source", "view", "controlledView", "hideSelector", "classes", "containerUrl", "themeMode", "useThemeContext", "setView", "useState", "useEffect", "handleSetView", "result", "setResult", "compiler", "useMemo", "Compiler", "platform", "providedModules", "initializeCompiler", "wasmURL", "esbuildWasmURL", "t", "setTimeout", "compile", "DocAccessor", "getValue", "clearTimeout", "useCallback", "handleExec", "auto", "React", "div", "className", "mx", "root", "DensityProvider", "density", "Toolbar", "Root", "classNames", "toolbar", "SplitterSelector", "onChange", "bundle", "error", "title", "String", "Check", "getSize", "Warning", "Button", "variant", "onClick", "Play", "Splitter", "ScriptEditor", "FrameContainer", "key", "SCRIPT_PLUGIN", "ScriptAction", "SCRIPT_PLUGIN", "ScriptPlugin", "containerUrl", "meta", "provides", "metadata", "records", "ScriptType", "typename", "placeholder", "ns", "SCRIPT_PLUGIN", "icon", "props", "React", "Code", "iconSymbol", "translations", "echo", "schema", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "dispatch", "parseIntentPlugin", "intent", "createExtension", "id", "ScriptAction", "CREATE", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "space", "spaces", "get", "find", "object", "db", "getObjectById", "target", "data", "plugin", "action", "NavigationAction", "OPEN", "properties", "label", "testId", "stack", "creators", "surface", "component", "role", "active", "Main", "Content", "classNames", "baseSurface", "fixedInsetFlexLayout", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "ScriptBlockWrapper", "script", "classes", "toolbar", "slide", "view", "hideSelector", "root", "resolver", "create", "source", "TextType", "content", "example", "useMemo", "createDocAccessor", "ScriptBlock", "join", "ScriptPlugin"]
7
+ }
@@ -0,0 +1 @@
1
+ {"inputs":{"packages/apps/plugins/plugin-script/src/components/FrameContainer/FrameContainer.tsx":{"bytes":8685,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/rpc-tunnel","kind":"import-statement","external":true}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/FrameContainer/index.ts":{"bytes":551,"imports":[{"path":"packages/apps/plugins/plugin-script/src/components/FrameContainer/FrameContainer.tsx","kind":"import-statement","original":"./FrameContainer"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/ScriptEditor/ScriptEditor.tsx":{"bytes":6640,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"codemirror","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/ScriptEditor/index.ts":{"bytes":543,"imports":[{"path":"packages/apps/plugins/plugin-script/src/components/ScriptEditor/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/Splitter/Splitter.tsx":{"bytes":5723,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/Splitter/index.ts":{"bytes":527,"imports":[{"path":"packages/apps/plugins/plugin-script/src/components/Splitter/Splitter.tsx","kind":"import-statement","original":"./Splitter"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/compiler/compiler.ts":{"bytes":23516,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/apps/plugins/plugin-script/src/compiler/index.ts":{"bytes":516,"imports":[{"path":"packages/apps/plugins/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/ScriptBlock.tsx":{"bytes":13571,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"packages/apps/plugins/plugin-script/src/components/FrameContainer/index.ts","kind":"import-statement","original":"./FrameContainer"},{"path":"packages/apps/plugins/plugin-script/src/components/ScriptEditor/index.ts","kind":"import-statement","original":"./ScriptEditor"},{"path":"packages/apps/plugins/plugin-script/src/components/Splitter/index.ts","kind":"import-statement","original":"./Splitter"},{"path":"packages/apps/plugins/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"../compiler"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/components/index.ts":{"bytes":823,"imports":[{"path":"packages/apps/plugins/plugin-script/src/components/FrameContainer/index.ts","kind":"import-statement","original":"./FrameContainer"},{"path":"packages/apps/plugins/plugin-script/src/components/ScriptBlock.tsx","kind":"import-statement","original":"./ScriptBlock"},{"path":"packages/apps/plugins/plugin-script/src/components/ScriptEditor/index.ts","kind":"import-statement","original":"./ScriptEditor"},{"path":"packages/apps/plugins/plugin-script/src/components/Splitter/index.ts","kind":"import-statement","original":"./Splitter"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/meta.tsx":{"bytes":1956,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/apps/plugins/plugin-script/src/translations.ts":{"bytes":1474,"imports":[{"path":"packages/apps/plugins/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/types.tsx":{"bytes":1613,"imports":[{"path":"packages/apps/plugins/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/ScriptPlugin.tsx":{"bytes":24276,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-plugin-client","kind":"import-statement","external":true},{"path":"@braneframe/plugin-graph","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-plugin-space","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-types","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"packages/apps/plugins/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/apps/plugins/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/apps/plugins/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/apps/plugins/plugin-script/src/types.tsx","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/apps/plugins/plugin-script/src/index.ts":{"bytes":1054,"imports":[{"path":"packages/apps/plugins/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/apps/plugins/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/apps/plugins/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/apps/plugins/plugin-script/src/types.tsx","kind":"import-statement","original":"./types"},{"path":"packages/apps/plugins/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/apps/plugins/plugin-script/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":41483},"packages/apps/plugins/plugin-script/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/apps/plugins/plugin-script/dist/lib/browser/chunk-HAIUBDFW.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-plugin-client","kind":"import-statement","external":true},{"path":"@braneframe/plugin-graph","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-plugin-space","kind":"import-statement","external":true},{"path":"@ohos-ports/braneframe-types","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/rpc-tunnel","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"codemirror","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@ohos-ports/dxos-react-ui-theme","kind":"import-statement","external":true},{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["Compiler","FrameContainer","ScriptAction","ScriptBlock","ScriptEditor","ScriptPlugin","Splitter","SplitterSelector","default","initializeCompiler"],"entryPoint":"packages/apps/plugins/plugin-script/src/index.ts","inputs":{"packages/apps/plugins/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":6641},"packages/apps/plugins/plugin-script/src/components/FrameContainer/FrameContainer.tsx":{"bytesInOutput":2240},"packages/apps/plugins/plugin-script/src/components/FrameContainer/index.ts":{"bytesInOutput":0},"packages/apps/plugins/plugin-script/src/components/index.ts":{"bytesInOutput":0},"packages/apps/plugins/plugin-script/src/components/ScriptBlock.tsx":{"bytesInOutput":3290},"packages/apps/plugins/plugin-script/src/components/ScriptEditor/ScriptEditor.tsx":{"bytesInOutput":1536},"packages/apps/plugins/plugin-script/src/components/ScriptEditor/index.ts":{"bytesInOutput":0},"packages/apps/plugins/plugin-script/src/components/Splitter/Splitter.tsx":{"bytesInOutput":1535},"packages/apps/plugins/plugin-script/src/components/Splitter/index.ts":{"bytesInOutput":0},"packages/apps/plugins/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":5827},"packages/apps/plugins/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/apps/plugins/plugin-script/src/translations.ts":{"bytesInOutput":280},"packages/apps/plugins/plugin-script/src/types.tsx":{"bytesInOutput":167},"packages/apps/plugins/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":22586},"packages/apps/plugins/plugin-script/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/apps/plugins/plugin-script/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/apps/plugins/plugin-script/dist/lib/browser/chunk-HAIUBDFW.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/apps/plugins/plugin-script/src/meta.tsx","inputs":{},"bytes":161},"packages/apps/plugins/plugin-script/dist/lib/browser/chunk-HAIUBDFW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":961},"packages/apps/plugins/plugin-script/dist/lib/browser/chunk-HAIUBDFW.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/apps/plugins/plugin-script/src/meta.tsx":{"bytesInOutput":430}},"bytes":571}}}
@@ -0,0 +1,9 @@
1
+ import {
2
+ SCRIPT_PLUGIN,
3
+ meta_default
4
+ } from "./chunk-HAIUBDFW.mjs";
5
+ export {
6
+ SCRIPT_PLUGIN,
7
+ meta_default as default
8
+ };
9
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import { type PluginDefinition } from '@dxos/app-framework';
2
+ import { type ScriptPluginProvides } from './types';
3
+ export type ScriptPluginProps = {
4
+ containerUrl: string;
5
+ };
6
+ export declare const ScriptPlugin: ({ containerUrl }: ScriptPluginProps) => PluginDefinition<ScriptPluginProvides>;
7
+ //# sourceMappingURL=ScriptPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptPlugin.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAqB,KAAK,gBAAgB,EAAmC,MAAM,qBAAqB,CAAC;AAchH,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,YAAY,qBAAsB,iBAAiB,KAAG,iBAAiB,oBAAoB,CA8HvG,CAAC"}
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { type BuildOptions } from 'esbuild';
3
+ import { type BuildResult } from 'esbuild-wasm';
4
+ export type Import = {
5
+ moduleUrl: string;
6
+ defaultImport: boolean;
7
+ namedImports: string[];
8
+ };
9
+ export type CompilerResult = {
10
+ timestamp: number;
11
+ sourceHash: Buffer;
12
+ imports?: Import[];
13
+ bundle?: string;
14
+ error?: any;
15
+ };
16
+ export type CompilerOptions = {
17
+ platform: BuildOptions['platform'];
18
+ providedModules: string[];
19
+ };
20
+ export declare const initializeCompiler: (options: {
21
+ wasmURL: string;
22
+ }) => Promise<void>;
23
+ /**
24
+ * ESBuild compiler.
25
+ */
26
+ export declare class Compiler {
27
+ private readonly _options;
28
+ constructor(_options: CompilerOptions);
29
+ compile(source: string): Promise<CompilerResult>;
30
+ analyzeImports(result: BuildResult): Import[];
31
+ analyzeSourceFileImports(code: string): {
32
+ defaultImportName: string;
33
+ namedImports: string[];
34
+ wildcardImportName: string;
35
+ moduleIdentifier: string;
36
+ quotes: string;
37
+ }[];
38
+ }
39
+ //# sourceMappingURL=compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../../../src/compiler/compiler.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAKnE,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAGF,eAAO,MAAM,kBAAkB,YAAmB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,kBAIpE,CAAC;AAEF;;GAEG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IA6EtD,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE;IA2B7C,wBAAwB,CAAC,IAAI,EAAE,MAAM;;;;;;;CAatC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=compiler.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler.test.d.ts","sourceRoot":"","sources":["../../../../src/compiler/compiler.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './compiler';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/compiler/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { type CompilerResult } from '../../compiler';
3
+ export type FrameContainerProps = {
4
+ containerUrl: string;
5
+ result: CompilerResult;
6
+ debug?: boolean;
7
+ };
8
+ /**
9
+ * IFrame container for the compiled script.
10
+ */
11
+ export declare const FrameContainer: ({ containerUrl, result, debug }: FrameContainerProps) => JSX.Element;
12
+ //# sourceMappingURL=FrameContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FrameContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/FrameContainer.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,oCAA4C,mBAAmB,gBAyDzF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/frame.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './FrameContainer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { DocAccessor } from '@dxos/react-client/echo';
3
+ import { type View } from './Splitter';
4
+ export type ScriptBlockProps = {
5
+ id: string;
6
+ source: DocAccessor;
7
+ view?: View;
8
+ hideSelector?: boolean;
9
+ classes?: {
10
+ root?: string;
11
+ toolbar?: string;
12
+ };
13
+ containerUrl: string;
14
+ };
15
+ export declare const ScriptBlock: ({ id, source, view: controlledView, hideSelector, classes, containerUrl, }: ScriptBlockProps) => JSX.Element | null;
16
+ //# sourceMappingURL=ScriptBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/ScriptBlock.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAA8B,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAcnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAGF,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAGF,eAAO,MAAM,WAAW,+EAOrB,gBAAgB,uBA6ElB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import '@dxosTheme';
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ id, source, view: controlledView, hideSelector, classes, containerUrl, }: import("./ScriptBlock").ScriptBlockProps) => JSX.Element | null;
6
+ render: () => JSX.Element;
7
+ decorators: import("@storybook/react/*").Decorator[];
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ };
12
+ export default _default;
13
+ export declare const Default: {};
14
+ //# sourceMappingURL=ScriptBlock.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptBlock.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ScriptBlock.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;;;;;;;;;;AA8CpB,wBAQE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { DocAccessor } from '@dxos/react-client/echo';
3
+ import { type ThemeMode } from '@dxos/react-ui';
4
+ export type ScriptEditorProps = {
5
+ source: DocAccessor;
6
+ themeMode?: ThemeMode;
7
+ className?: string;
8
+ };
9
+ export declare const ScriptEditor: ({ source, themeMode, className }: ScriptEditorProps) => JSX.Element;
10
+ //# sourceMappingURL=ScriptEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptEditor/ScriptEditor.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,YAAY,qCAAsC,iBAAiB,gBA4B/E,CAAC"}
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import '@dxosTheme';
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ source, themeMode, className }: import("./ScriptEditor").ScriptEditorProps) => JSX.Element;
6
+ render: () => JSX.Element;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const Default: {};
13
+ //# sourceMappingURL=ScriptEditor.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScriptEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptEditor/ScriptEditor.stories.tsx"],"names":[],"mappings":";AAeA,OAAO,YAAY,CAAC;;;;;;;;;AAwCpB,wBAOE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ScriptEditor';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptEditor/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from 'react';
2
+ export type View = 'editor' | 'preview' | 'split';
3
+ export type SplitterProps = {
4
+ view?: View;
5
+ className?: string;
6
+ children?: ReactNode[];
7
+ };
8
+ export declare const Splitter: ({ view, className, children }: SplitterProps) => JSX.Element;
9
+ export type SplitterSelectorProps = {
10
+ view?: View;
11
+ onChange?: (view: View) => void;
12
+ className?: string;
13
+ };
14
+ export declare const SplitterSelector: ({ view, onChange, className }: SplitterSelectorProps) => JSX.Element;
15
+ //# sourceMappingURL=Splitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Splitter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Splitter/Splitter.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9C,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,QAAQ,kCAAkD,aAAa,gBAQnF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,kCAAmC,qBAAqB,gBAgBpF,CAAC"}
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import '@dxosTheme';
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ view, className, children }: import("./Splitter").SplitterProps) => JSX.Element;
6
+ render: () => JSX.Element;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const Default: {};
13
+ //# sourceMappingURL=Splitter.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Splitter.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Splitter/Splitter.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;;;;;;;;;AAuBpB,wBAOE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Splitter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Splitter/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './FrameContainer';
2
+ export * from './ScriptBlock';
3
+ export * from './ScriptEditor';
4
+ export * from './Splitter';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ScriptPlugin } from './ScriptPlugin';
2
+ export default ScriptPlugin;
3
+ export * from './compiler';
4
+ export * from './components';
5
+ export * from './types';
6
+ export * from './ScriptPlugin';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAe,YAAY,CAAC;AAE5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type IconProps } from '@phosphor-icons/react';
2
+ import React from 'react';
3
+ export declare const SCRIPT_PLUGIN = "dxos.org/plugin/script";
4
+ declare const _default: {
5
+ id: string;
6
+ shortId?: string | undefined;
7
+ name?: string | undefined;
8
+ description?: string | undefined;
9
+ homePage?: string | undefined;
10
+ tags?: string[] | undefined;
11
+ iconComponent?: React.FC<IconProps> | undefined;
12
+ iconSymbol?: string | undefined;
13
+ };
14
+ export default _default;
15
+ //# sourceMappingURL=meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,aAAa,2BAA2B,CAAC;;;;;;;;;;;AAEtD,wBAOG"}
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ 'en-US': {
3
+ "dxos.org/plugin/script": {
4
+ 'plugin name': string;
5
+ 'object title placeholder': string;
6
+ 'create object label': string;
7
+ 'create stack section label': string;
8
+ };
9
+ };
10
+ }[];
11
+ export default _default;
12
+ //# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;AAMA,wBAWE"}
@@ -0,0 +1,8 @@
1
+ import { type SchemaProvides } from '@ohos-ports/braneframe-plugin-client';
2
+ import type { StackProvides } from '@braneframe/plugin-stack';
3
+ import type { GraphBuilderProvides, IntentResolverProvides, MetadataRecordsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
4
+ export declare enum ScriptAction {
5
+ CREATE = "dxos.org/plugin/script/create"
6
+ }
7
+ export type ScriptPluginProvides = SurfaceProvides & IntentResolverProvides & GraphBuilderProvides & MetadataRecordsProvides & TranslationsProvides & SchemaProvides & StackProvides;
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAI7B,oBAAY,YAAY;IACtB,MAAM,kCAA4B;CACnC;AAED,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAChD,sBAAsB,GACtB,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,cAAc,GACd,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,99 @@
1
1
  {
2
2
  "name": "@ohos-ports/braneframe-plugin-script",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.6.7-beta.0",
4
+ "description": "Braneframe notebook plugin",
5
+ "homepage": "https://github.com/ohos-ports/ohos-ports/tree/main/ports/braneframe-plugin-script/0.6.7",
6
+ "bugs": "https://github.com/ohos-ports/ohos-ports/issues",
7
+ "license": "MIT",
8
+ "author": "DXOS.org",
9
+ "exports": {
10
+ ".": {
11
+ "browser": "./dist/lib/browser/index.mjs",
12
+ "types": "./dist/types/src/index.d.ts"
13
+ },
14
+ "./meta": {
15
+ "browser": "./dist/lib/browser/meta.mjs",
16
+ "types": "./dist/types/src/meta.d.ts"
17
+ }
18
+ },
19
+ "types": "dist/types/src/index.d.ts",
20
+ "typesVersions": {
21
+ "*": {
22
+ "meta": [
23
+ "dist/types/src/meta.d.ts"
24
+ ]
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "src"
30
+ ],
31
+ "dependencies": {
32
+ "@codemirror/autocomplete": "^6.18.0",
33
+ "@codemirror/lang-javascript": "^6.2.2",
34
+ "@codemirror/language": "^6.10.2",
35
+ "@codemirror/state": "^6.4.1",
36
+ "@codemirror/view": "^6.29.1",
37
+ "@lezer/common": "^1.2.1",
38
+ "@preact/signals-core": "^1.6.0",
39
+ "codemirror": "^6.0.1",
40
+ "esbuild-wasm": "^0.16.14",
41
+ "lodash.get": "^4.4.2",
42
+ "@ohos-ports/braneframe-plugin-explorer": "^0.6.7-beta.0",
43
+ "@ohos-ports/braneframe-plugin-space": "^0.6.7-beta.0",
44
+ "@braneframe/plugin-stack": "0.6.7",
45
+ "@ohos-ports/braneframe-types": "^0.6.7-beta.1",
46
+ "@dxos/async": "0.6.7",
47
+ "@dxos/client": "0.6.7",
48
+ "@dxos/client-protocol": "0.6.7",
49
+ "@dxos/crypto": "0.6.7",
50
+ "@dxos/echo-schema": "0.6.7",
51
+ "@dxos/debug": "0.6.7",
52
+ "@dxos/invariant": "0.6.7",
53
+ "@ohos-ports/dxos-protocols": "^0.6.7-beta.1",
54
+ "@dxos/log": "0.6.7",
55
+ "@dxos/react-ui-editor": "0.6.7",
56
+ "@dxos/react-client": "0.6.7",
57
+ "@dxos/rpc": "0.6.7",
58
+ "@dxos/rpc-tunnel": "0.6.7"
59
+ },
60
+ "devDependencies": {
61
+ "@phosphor-icons/react": "^2.1.5",
62
+ "@types/lodash.get": "^4.4.7",
63
+ "@types/react": "^18.0.21",
64
+ "@types/react-dom": "^18.0.6",
65
+ "react": "~18.2.0",
66
+ "react-dom": "~18.2.0",
67
+ "vite": "^5.3.4",
68
+ "@ohos-ports/braneframe-plugin-client": "^0.6.7-beta.0",
69
+ "@braneframe/plugin-graph": "0.6.7",
70
+ "@dxos/echo-generator": "0.6.7",
71
+ "@braneframe/plugin-theme": "0.6.7",
72
+ "@dxos/app-framework": "0.6.7",
73
+ "@dxos/react-ui": "0.6.7",
74
+ "@dxos/react-ui-mosaic": "0.6.7",
75
+ "@dxos/random": "0.6.7",
76
+ "@ohos-ports/dxos-react-ui-theme": "^0.6.7-beta.1",
77
+ "@dxos/storybook-utils": "0.6.7"
78
+ },
79
+ "peerDependencies": {
80
+ "@phosphor-icons/react": "^2.1.5",
81
+ "react": "^18.0.0",
82
+ "react-dom": "^18.0.0",
83
+ "@ohos-ports/braneframe-plugin-client": "^0.6.7-beta.0",
84
+ "@braneframe/plugin-graph": "0.6.7",
85
+ "@ohos-ports/braneframe-types": "^0.6.7-beta.1",
86
+ "@dxos/react-ui": "0.6.7",
87
+ "@dxos/app-framework": "0.6.7",
88
+ "@dxos/react-ui-mosaic": "0.6.7",
89
+ "@ohos-ports/dxos-react-ui-theme": "^0.6.7-beta.1"
90
+ },
91
+ "publishConfig": {
92
+ "access": "public"
93
+ },
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "https://github.com/ohos-ports/ohos-ports.git",
97
+ "directory": "ports/braneframe-plugin-script/0.6.7"
98
+ }
99
+ }