@dxos/plugin-script 0.7.1 → 0.7.2-staging.6d26b2a

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 (43) hide show
  1. package/dist/lib/browser/{AutomationPanel-RYJJQ5QX.mjs → AutomationPanel-BZCRRLOQ.mjs} +2 -2
  2. package/dist/lib/browser/{AutomationPanel-RYJJQ5QX.mjs.map → AutomationPanel-BZCRRLOQ.mjs.map} +1 -1
  3. package/dist/lib/browser/{ScriptContainer-RLBVHRCW.mjs → ScriptContainer-GQ2KJ5BM.mjs} +7 -10
  4. package/dist/lib/browser/ScriptContainer-GQ2KJ5BM.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-VEW5BERN.mjs → chunk-DTVOXLPP.mjs} +9 -9
  6. package/dist/lib/browser/chunk-DTVOXLPP.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +3 -3
  8. package/dist/lib/browser/meta.json +1 -1
  9. package/dist/lib/browser/types/index.mjs +1 -1
  10. package/dist/lib/node/{AutomationPanel-3B5AGQQV.cjs → AutomationPanel-VNLNP3EE.cjs} +9 -9
  11. package/dist/lib/node/{AutomationPanel-3B5AGQQV.cjs.map → AutomationPanel-VNLNP3EE.cjs.map} +1 -1
  12. package/dist/lib/node/{ScriptContainer-7VX44TH6.cjs → ScriptContainer-K67ZWCKL.cjs} +12 -15
  13. package/dist/lib/node/ScriptContainer-K67ZWCKL.cjs.map +7 -0
  14. package/dist/lib/node/{chunk-XJOH225K.cjs → chunk-T4PYTKIW.cjs} +12 -12
  15. package/dist/lib/node/chunk-T4PYTKIW.cjs.map +7 -0
  16. package/dist/lib/node/index.cjs +18 -18
  17. package/dist/lib/node/meta.json +1 -1
  18. package/dist/lib/node/types/index.cjs +4 -4
  19. package/dist/lib/node/types/index.cjs.map +1 -1
  20. package/dist/lib/node-esm/{AutomationPanel-EEGLOILM.mjs → AutomationPanel-NWE2QCOE.mjs} +2 -2
  21. package/dist/lib/node-esm/{AutomationPanel-EEGLOILM.mjs.map → AutomationPanel-NWE2QCOE.mjs.map} +1 -1
  22. package/dist/lib/node-esm/{ScriptContainer-NGYXDSLQ.mjs → ScriptContainer-BVDYLJZI.mjs} +7 -10
  23. package/dist/lib/node-esm/ScriptContainer-BVDYLJZI.mjs.map +7 -0
  24. package/dist/lib/node-esm/{chunk-P7ULFJ4T.mjs → chunk-2HYWFUEN.mjs} +9 -9
  25. package/dist/lib/node-esm/chunk-2HYWFUEN.mjs.map +7 -0
  26. package/dist/lib/node-esm/index.mjs +3 -3
  27. package/dist/lib/node-esm/meta.json +1 -1
  28. package/dist/lib/node-esm/types/index.mjs +1 -1
  29. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -3
  30. package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
  31. package/dist/types/src/types/schema.d.ts +8 -8
  32. package/dist/types/src/types/schema.d.ts.map +1 -1
  33. package/package.json +36 -36
  34. package/src/components/AutomationPanel/AutomationPanel.tsx +3 -3
  35. package/src/components/ScriptEditor.tsx +4 -3
  36. package/src/components/TypescriptEditor/TypescriptEditor.tsx +1 -1
  37. package/src/types/schema.ts +10 -6
  38. package/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs.map +0 -7
  39. package/dist/lib/browser/chunk-VEW5BERN.mjs.map +0 -7
  40. package/dist/lib/node/ScriptContainer-7VX44TH6.cjs.map +0 -7
  41. package/dist/lib/node/chunk-XJOH225K.cjs.map +0 -7
  42. package/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs.map +0 -7
  43. package/dist/lib/node-esm/chunk-P7ULFJ4T.mjs.map +0 -7
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  FunctionType,
10
10
  ScriptType
11
- } from "./chunk-VEW5BERN.mjs";
11
+ } from "./chunk-DTVOXLPP.mjs";
12
12
  import "./chunk-C7VBULMK.mjs";
13
13
 
14
14
  // packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx
@@ -75,4 +75,4 @@ export {
75
75
  AutomationPanel,
76
76
  AutomationPanel_default as default
77
77
  };
78
- //# sourceMappingURL=AutomationPanel-RYJJQ5QX.mjs.map
78
+ //# sourceMappingURL=AutomationPanel-BZCRRLOQ.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/AutomationPanel/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { type EchoReactiveObject } from '@dxos/client/echo';\nimport { failUndefined } from '@dxos/debug';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, getMeta, getSpace, useQuery } from '@dxos/react-client/echo';\nimport { Select } from '@dxos/react-ui';\n\nimport { getInvocationUrl, getUserFunctionUrlInMetadata } from '../../edge';\nimport { FunctionType, ScriptType } from '../../types';\nimport { DebugPanel } from '../DebugPanel';\n\nexport interface AutomationPanelProps {\n subject: EchoReactiveObject<any>;\n}\n\nexport const AutomationPanel = ({ subject }: AutomationPanelProps) => {\n const space = getSpace(subject);\n\n // TODO(dmaretskyi): Parametric query.\n const functions = useQuery(\n space ?? undefined,\n Filter.schema(FunctionType, (fn) => (subject instanceof ScriptType ? fn.source === subject : fn.binding != null)),\n {},\n [subject],\n );\n const [selectedFunction, setSelectedFunction] = useState<FunctionType | null>(null);\n const functionToChatWith = subject instanceof ScriptType ? functions[0] : selectedFunction;\n\n return (\n <div className='h-full flex flex-col'>\n {!(subject instanceof ScriptType) && (\n <BindingSelect\n selectedFunction={selectedFunction}\n setSelectedFunction={setSelectedFunction}\n functions={functions}\n />\n )}\n {functionToChatWith && <ChatPanel fn={functionToChatWith} subject={subject} />}\n {subject instanceof ScriptType && functions.length === 0 && <p>Deploy function to interact with it.</p>}\n </div>\n );\n};\n\nexport interface ChatPanelProps {\n fn: FunctionType;\n subject: EchoReactiveObject<any>;\n}\n\nconst ChatPanel = ({ fn, subject }: ChatPanelProps) => {\n const client = useClient();\n const space = getSpace(fn);\n const existingFunctionUrl = getUserFunctionUrlInMetadata(getMeta(fn));\n const functionUrl = useMemo(() => {\n if (!existingFunctionUrl) {\n return;\n }\n\n return getInvocationUrl(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? '', {\n spaceId: space?.id,\n subjectId: subject?.id,\n });\n }, [existingFunctionUrl, space, subject]);\n\n return <DebugPanel functionUrl={functionUrl} classNames='flex-1' />;\n};\n\nexport interface BindingSelectProps {\n selectedFunction: FunctionType | null;\n setSelectedFunction: (fn: FunctionType) => void;\n functions: FunctionType[];\n}\n\nconst BindingSelect = ({ selectedFunction, setSelectedFunction, functions }: BindingSelectProps) => {\n return (\n <Select.Root\n value={selectedFunction?.id}\n onValueChange={(id) => setSelectedFunction(functions.find((fn) => fn.id === id) ?? failUndefined())}\n >\n <Select.TriggerButton placeholder='Select value' />\n <Select.Portal>\n <Select.Content>\n <Select.ScrollUpButton />\n <Select.Viewport>\n {functions.map(({ id, binding }) => (\n <Select.Option key={id} value={id}>\n {binding}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.ScrollDownButton />\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport * from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { type ReactiveEchoObject } from '@dxos/client/echo';\nimport { failUndefined } from '@dxos/debug';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, getMeta, getSpace, useQuery } from '@dxos/react-client/echo';\nimport { Select } from '@dxos/react-ui';\n\nimport { getInvocationUrl, getUserFunctionUrlInMetadata } from '../../edge';\nimport { FunctionType, ScriptType } from '../../types';\nimport { DebugPanel } from '../DebugPanel';\n\nexport interface AutomationPanelProps {\n subject: ReactiveEchoObject<any>;\n}\n\nexport const AutomationPanel = ({ subject }: AutomationPanelProps) => {\n const space = getSpace(subject);\n\n // TODO(dmaretskyi): Parametric query.\n const functions = useQuery(\n space ?? undefined,\n Filter.schema(FunctionType, (fn) => (subject instanceof ScriptType ? fn.source === subject : fn.binding != null)),\n {},\n [subject],\n );\n const [selectedFunction, setSelectedFunction] = useState<FunctionType | null>(null);\n const functionToChatWith = subject instanceof ScriptType ? functions[0] : selectedFunction;\n\n return (\n <div className='h-full flex flex-col'>\n {!(subject instanceof ScriptType) && (\n <BindingSelect\n selectedFunction={selectedFunction}\n setSelectedFunction={setSelectedFunction}\n functions={functions}\n />\n )}\n {functionToChatWith && <ChatPanel fn={functionToChatWith} subject={subject} />}\n {subject instanceof ScriptType && functions.length === 0 && <p>Deploy function to interact with it.</p>}\n </div>\n );\n};\n\nexport interface ChatPanelProps {\n fn: FunctionType;\n subject: ReactiveEchoObject<any>;\n}\n\nconst ChatPanel = ({ fn, subject }: ChatPanelProps) => {\n const client = useClient();\n const space = getSpace(fn);\n const existingFunctionUrl = getUserFunctionUrlInMetadata(getMeta(fn));\n const functionUrl = useMemo(() => {\n if (!existingFunctionUrl) {\n return;\n }\n\n return getInvocationUrl(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? '', {\n spaceId: space?.id,\n subjectId: subject?.id,\n });\n }, [existingFunctionUrl, space, subject]);\n\n return <DebugPanel functionUrl={functionUrl} classNames='flex-1' />;\n};\n\nexport interface BindingSelectProps {\n selectedFunction: FunctionType | null;\n setSelectedFunction: (fn: FunctionType) => void;\n functions: FunctionType[];\n}\n\nconst BindingSelect = ({ selectedFunction, setSelectedFunction, functions }: BindingSelectProps) => {\n return (\n <Select.Root\n value={selectedFunction?.id}\n onValueChange={(id) => setSelectedFunction(functions.find((fn) => fn.id === id) ?? failUndefined())}\n >\n <Select.TriggerButton placeholder='Select value' />\n <Select.Portal>\n <Select.Content>\n <Select.ScrollUpButton />\n <Select.Viewport>\n {functions.map(({ id, binding }) => (\n <Select.Option key={id} value={id}>\n {binding}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.ScrollDownButton />\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport * from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,SAASC,SAASC,gBAAgB;AAGzC,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,SAASC,UAAUC,gBAAgB;AACpD,SAASC,cAAc;AAUhB,IAAMC,kBAAkB,CAAC,EAAEC,QAAO,MAAwB;AAC/D,QAAMC,QAAQC,SAASF,OAAAA;AAGvB,QAAMG,YAAYC,SAChBH,SAASI,QACTC,OAAOC,OAAOC,cAAc,CAACC,OAAQT,mBAAmBU,aAAaD,GAAGE,WAAWX,UAAUS,GAAGG,WAAW,IAAA,GAC3G,CAAC,GACD;IAACZ;GAAQ;AAEX,QAAM,CAACa,kBAAkBC,mBAAAA,IAAuBC,SAA8B,IAAA;AAC9E,QAAMC,qBAAqBhB,mBAAmBU,aAAaP,UAAU,CAAA,IAAKU;AAE1E,SACE,sBAAA,cAACI,OAAAA;IAAIC,WAAU;KACZ,EAAElB,mBAAmBU,eACpB,sBAAA,cAACS,eAAAA;IACCN;IACAC;IACAX;MAGHa,sBAAsB,sBAAA,cAACI,WAAAA;IAAUX,IAAIO;IAAoBhB;MACzDA,mBAAmBU,cAAcP,UAAUkB,WAAW,KAAK,sBAAA,cAACC,KAAAA,MAAE,sCAAA,CAAA;AAGrE;AAOA,IAAMF,YAAY,CAAC,EAAEX,IAAIT,QAAO,MAAkB;AAChD,QAAMuB,SAASC,UAAAA;AACf,QAAMvB,QAAQC,SAASO,EAAAA;AACvB,QAAMgB,sBAAsBC,6BAA6BC,QAAQlB,EAAAA,CAAAA;AACjE,QAAMmB,cAAcC,QAAQ,MAAA;AAC1B,QAAI,CAACJ,qBAAqB;AACxB;IACF;AAEA,WAAOK,iBAAiBL,qBAAqBF,OAAOQ,OAAOC,OAAOC,SAASC,UAAUC,MAAMC,OAAO,IAAI;MACpGC,SAASpC,OAAOqC;MAChBC,WAAWvC,SAASsC;IACtB,CAAA;EACF,GAAG;IAACb;IAAqBxB;IAAOD;GAAQ;AAExC,SAAO,sBAAA,cAACwC,YAAAA;IAAWZ;IAA0Ba,YAAW;;AAC1D;AAQA,IAAMtB,gBAAgB,CAAC,EAAEN,kBAAkBC,qBAAqBX,UAAS,MAAsB;AAC7F,SACE,sBAAA,cAACuC,OAAOC,MAAI;IACVC,OAAO/B,kBAAkByB;IACzBO,eAAe,CAACP,OAAOxB,oBAAoBX,UAAU2C,KAAK,CAACrC,OAAOA,GAAG6B,OAAOA,EAAAA,KAAOS,cAAAA,CAAAA;KAEnF,sBAAA,cAACL,OAAOM,eAAa;IAACC,aAAY;MAClC,sBAAA,cAACP,OAAOQ,QAAM,MACZ,sBAAA,cAACR,OAAOS,SAAO,MACb,sBAAA,cAACT,OAAOU,gBAAc,IAAA,GACtB,sBAAA,cAACV,OAAOW,UAAQ,MACblD,UAAUmD,IAAI,CAAC,EAAEhB,IAAI1B,QAAO,MAC3B,sBAAA,cAAC8B,OAAOa,QAAM;IAACC,KAAKlB;IAAIM,OAAON;KAC5B1B,OAAAA,CAAAA,CAAAA,GAIP,sBAAA,cAAC8B,OAAOe,kBAAgB,IAAA,GACxB,sBAAA,cAACf,OAAOgB,OAAK,IAAA,CAAA,CAAA,CAAA;AAKvB;;;AC5FA,IAAA,0BAAeC;",
6
6
  "names": ["React", "useMemo", "useState", "failUndefined", "useClient", "Filter", "getMeta", "getSpace", "useQuery", "Select", "AutomationPanel", "subject", "space", "getSpace", "functions", "useQuery", "undefined", "Filter", "schema", "FunctionType", "fn", "ScriptType", "source", "binding", "selectedFunction", "setSelectedFunction", "useState", "functionToChatWith", "div", "className", "BindingSelect", "ChatPanel", "length", "p", "client", "useClient", "existingFunctionUrl", "getUserFunctionUrlInMetadata", "getMeta", "functionUrl", "useMemo", "getInvocationUrl", "config", "values", "runtime", "services", "edge", "url", "spaceId", "id", "subjectId", "DebugPanel", "classNames", "Select", "Root", "value", "onValueChange", "find", "failUndefined", "TriggerButton", "placeholder", "Portal", "Content", "ScrollUpButton", "Viewport", "map", "Option", "key", "ScrollDownButton", "Arrow", "AutomationPanel"]
7
7
  }
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-5GGRYRS4.mjs";
16
16
  import {
17
17
  FunctionType
18
- } from "./chunk-VEW5BERN.mjs";
18
+ } from "./chunk-DTVOXLPP.mjs";
19
19
  import {
20
20
  SCRIPT_PLUGIN
21
21
  } from "./chunk-C7VBULMK.mjs";
@@ -206,7 +206,6 @@ var TypescriptEditor = ({ id, env, className, initialValue, extensions, scrollTo
206
206
  scrollTo
207
207
  }), [
208
208
  id,
209
- initialValue,
210
209
  extensions,
211
210
  themeMode,
212
211
  selection,
@@ -250,9 +249,6 @@ var ScriptEditor = ({ classNames, script, env }) => {
250
249
  identity
251
250
  ]);
252
251
  const [view, setView] = useState2("editor");
253
- const initialValue = useMemo(() => script.source?.content, [
254
- script.source
255
- ]);
256
252
  const existingFunctionUrl = fn && getUserFunctionUrlInMetadata(getMeta(fn));
257
253
  const [error, setError] = useState2();
258
254
  const handleFormat = useCallback(async () => {
@@ -272,7 +268,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
272
268
  } catch (err) {
273
269
  log.catch(err, void 0, {
274
270
  F: __dxlog_file,
275
- L: 89,
271
+ L: 88,
276
272
  S: void 0,
277
273
  C: (f, a) => f(...a)
278
274
  });
@@ -330,7 +326,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
330
326
  functionVersionNumber
331
327
  }, {
332
328
  F: __dxlog_file,
333
- L: 137,
329
+ L: 136,
334
330
  S: void 0,
335
331
  C: (f, a) => f(...a)
336
332
  });
@@ -338,6 +334,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
338
334
  fn.version = functionVersionNumber;
339
335
  }
340
336
  const deployedFunction = fn ?? space.db.add(create(FunctionType, {
337
+ name: functionId,
341
338
  version: functionVersionNumber,
342
339
  source: script
343
340
  }));
@@ -359,7 +356,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
359
356
  } catch (err) {
360
357
  log.catch(err, void 0, {
361
358
  F: __dxlog_file,
362
- L: 155,
359
+ L: 156,
363
360
  S: void 0,
364
361
  C: (f, a) => f(...a)
365
362
  });
@@ -399,7 +396,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
399
396
  }), view !== "preview" && /* @__PURE__ */ React3.createElement(TypescriptEditor, {
400
397
  id: script.id,
401
398
  env,
402
- initialValue,
399
+ initialValue: script.source?.content,
403
400
  extensions,
404
401
  className: "flex is-full bs-full overflow-hidden ch-focus-ring-inset-over-all"
405
402
  }), view !== "editor" && /* @__PURE__ */ React3.createElement(DebugPanel, {
@@ -423,4 +420,4 @@ var ScriptContainer_default = ScriptContainer;
423
420
  export {
424
421
  ScriptContainer_default as default
425
422
  };
426
- //# sourceMappingURL=ScriptContainer-RLBVHRCW.mjs.map
423
+ //# sourceMappingURL=ScriptContainer-GQ2KJ5BM.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ScriptContainer.tsx", "../../../src/components/ScriptEditor.tsx", "../../../src/components/Toolbar/Toolbar.tsx", "../../../src/components/TypescriptEditor/TypescriptEditor.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { ScriptEditor, type ScriptEditorProps } from './ScriptEditor';\n\nconst ScriptContainer = ({ script, ...props }: ScriptEditorProps) => {\n const attendableAttrs = useAttendableAttributes(fullyQualifiedId(script));\n return (\n <div role='none' className={mx('flex row-span-2 w-full overflow-hidden attention-surface')} {...attendableAttrs}>\n <ScriptEditor {...props} script={script} />\n </div>\n );\n};\n\nexport default ScriptContainer;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type DID } from 'iso-did/types';\nimport { format } from 'prettier';\nimport prettierPluginEstree from 'prettier/plugins/estree';\nimport prettierPluginTypescript from 'prettier/plugins/typescript';\nimport React, { useCallback, useMemo, useState } from 'react';\n\nimport { log } from '@dxos/log';\nimport { useClient } from '@dxos/react-client';\nimport { create, createDocAccessor, Filter, getMeta, getSpace, useQuery } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport { useTranslation, type ThemedClassName } from '@dxos/react-ui';\nimport { createDataExtensions, listener } from '@dxos/react-ui-editor';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { DebugPanel } from './DebugPanel';\nimport { type TemplateSelectProps, Toolbar, type ViewType } from './Toolbar';\nimport { TypescriptEditor, type TypescriptEditorProps } from './TypescriptEditor';\nimport { Bundler } from '../bundler';\nimport {\n getInvocationUrl,\n getUserFunctionUrlInMetadata,\n publicKeyToDid,\n setUserFunctionUrlInMetadata,\n uploadWorkerFunction,\n USERFUNCTIONS_PRESET_META_KEY,\n} from '../edge';\nimport { SCRIPT_PLUGIN } from '../meta';\nimport { templates } from '../templates';\nimport { FunctionType, type ScriptType } from '../types';\n\nexport type ScriptEditorProps = ThemedClassName<{\n script: ScriptType;\n}> &\n Pick<TypescriptEditorProps, 'env'>;\n\nexport const ScriptEditor = ({ classNames, script, env }: ScriptEditorProps) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n const client = useClient();\n const identity = useIdentity();\n const space = getSpace(script);\n // TODO(dmaretskyi): Parametric query.\n const [fn] = useQuery(\n space,\n Filter.schema(FunctionType, (fn) => fn.source === script),\n );\n\n const extensions = useMemo(\n () => [\n listener({\n onChange: (text) => {\n if (script.source && script.source?.content !== text) {\n script.changed = true;\n }\n },\n }),\n createDataExtensions({\n id: script.id,\n text: script.source && createDocAccessor(script.source, ['content']),\n space,\n identity,\n }),\n ],\n [script, script.source, space, identity],\n );\n\n const [view, setView] = useState<ViewType>('editor');\n const existingFunctionUrl = fn && getUserFunctionUrlInMetadata(getMeta(fn));\n const [error, setError] = useState<string>();\n\n const handleFormat = useCallback(async () => {\n if (!script.source) {\n return;\n }\n\n try {\n script.source.content = await format(script.source.content, {\n parser: 'typescript',\n plugins: [prettierPluginEstree, prettierPluginTypescript],\n semi: true,\n singleQuote: true,\n });\n } catch (err: any) {\n // TODO(wittjosiah): Show error in UI.\n log.catch(err);\n }\n }, [script.source]);\n\n const handleTemplateChange: TemplateSelectProps['onTemplateSelect'] = (id) => {\n const template = templates.find((template) => template.id === id);\n if (template) {\n script.name = template.name;\n script.source!.content = template.source;\n const metaKeys = getMeta(script).keys;\n const oldPresetIndex = metaKeys.findIndex((key) => key.source === USERFUNCTIONS_PRESET_META_KEY);\n if (oldPresetIndex >= 0) {\n metaKeys.splice(oldPresetIndex, 1);\n }\n if (template.presetId) {\n metaKeys.push({ source: USERFUNCTIONS_PRESET_META_KEY, id: template.presetId });\n }\n }\n };\n\n const handleDeploy = useCallback(async () => {\n if (!script.source || !identity || !space) {\n return;\n }\n\n setError(undefined);\n\n try {\n const existingFunctionId = existingFunctionUrl?.split('/').at(-1);\n const ownerDid = (existingFunctionUrl?.split('/').at(-2) as DID) ?? publicKeyToDid(identity.identityKey);\n\n const bundler = new Bundler({ platform: 'browser', sandboxedModules: [], remoteModules: {} });\n const buildResult = await bundler.bundle(script.source.content);\n if (buildResult.error || !buildResult.bundle) {\n throw buildResult.error;\n }\n\n const { result, functionId, functionVersionNumber, errorMessage, meta } = await uploadWorkerFunction({\n clientConfig: client.config,\n halo: client.halo,\n ownerDid,\n functionId: existingFunctionId,\n source: buildResult.bundle,\n });\n if (result !== 'success' || functionId === undefined || functionVersionNumber === undefined) {\n throw new Error(errorMessage);\n }\n\n log.info('function uploaded', { functionId, functionVersionNumber });\n if (fn) {\n fn.version = functionVersionNumber;\n }\n\n const deployedFunction =\n fn ?? space.db.add(create(FunctionType, { name: functionId, version: functionVersionNumber, source: script }));\n\n script.changed = false;\n\n if (meta.inputSchema) {\n deployedFunction.inputSchema = meta.inputSchema;\n } else {\n log.verbose('no input schema in function metadata', { functionId });\n }\n\n setUserFunctionUrlInMetadata(getMeta(deployedFunction), `/${ownerDid}/${functionId}`);\n\n setView('split');\n } catch (err: any) {\n log.catch(err);\n setError(t('upload failed label'));\n }\n }, [fn, existingFunctionUrl, script, script.name, script.source]);\n\n const functionUrl = useMemo(() => {\n if (!existingFunctionUrl) {\n return;\n }\n\n return getInvocationUrl(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? '', {\n spaceId: space?.id,\n });\n }, [existingFunctionUrl, space]);\n\n return (\n <div role='none' className={mx('flex flex-col w-full overflow-hidden divide-y divide-separator', classNames)}>\n <Toolbar\n deployed={Boolean(existingFunctionUrl) && !script.changed}\n functionUrl={functionUrl}\n error={error}\n view={view}\n templates={templates}\n onDeploy={handleDeploy}\n onFormat={handleFormat}\n onViewChange={setView}\n onTemplateSelect={handleTemplateChange}\n />\n\n {view !== 'preview' && (\n <TypescriptEditor\n id={script.id}\n env={env}\n initialValue={script.source?.content}\n extensions={extensions}\n className='flex is-full bs-full overflow-hidden ch-focus-ring-inset-over-all'\n />\n )}\n\n {view !== 'editor' && <DebugPanel functionUrl={functionUrl} />}\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport {\n ElevationProvider,\n Icon,\n Select,\n type ThemedClassName,\n ToggleGroup,\n ToggleGroupItem,\n type ToolbarButtonProps,\n Toolbar as NaturalToolbar,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { SCRIPT_PLUGIN } from '../../meta';\nimport { type Template } from '../../templates';\n\nexport type ToolbarProps = ThemedClassName<\n {\n deployed?: boolean;\n error?: string;\n functionUrl?: string;\n onDeploy?: () => Promise<void>;\n onFormat?: () => Promise<void>;\n } & TemplateSelectProps &\n ViewSelectorProps\n>;\n\nexport const Toolbar = ({\n classNames,\n deployed,\n error,\n functionUrl,\n view,\n templates,\n onDeploy,\n onFormat,\n onViewChange,\n onTemplateSelect,\n}: ToolbarProps) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n const [pending, setPending] = useState(false);\n\n const handleCopyLink = async () => {\n if (!functionUrl) {\n return;\n }\n\n await navigator.clipboard.writeText(functionUrl);\n };\n\n const handleDeploy = async () => {\n if (!pending) {\n setPending(true);\n await onDeploy?.();\n setPending(false);\n }\n };\n\n // TODO(burdon): Factor out common toolbar components with sheet/editor?\n return (\n <ElevationProvider elevation='chrome'>\n <NaturalToolbar.Root classNames={['p-1', classNames]} style={{ contain: 'layout' }}>\n {templates && <TemplateSelect templates={templates} onTemplateSelect={onTemplateSelect} />}\n {onFormat && <ToolbarIconButton icon='ph--magic-wand--regular' text={t('format label')} onClick={onFormat} />}\n\n <div role='separator' className='grow' />\n\n {error ? (\n <Tooltip.Root>\n <Tooltip.Trigger>\n <Icon icon='ph--warning-circle--regular' size={4} />\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content>\n <Tooltip.Arrow />\n {error}\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n ) : null}\n\n {functionUrl && deployed && (\n <ToolbarIconButton icon='ph--link--regular' text={t('copy link label')} onClick={handleCopyLink} />\n )}\n\n {onDeploy && (\n <ToolbarIconButton\n icon={pending ? 'ph--spinner-gap--regular' : 'ph--cloud-arrow-up--regular'}\n classNames={[pending && 'animate-spin']}\n text={pending ? t('pending label') : t('deploy label')}\n onClick={handleDeploy}\n />\n )}\n\n <ViewSelector view={view} onViewChange={onViewChange} />\n </NaturalToolbar.Root>\n </ElevationProvider>\n );\n};\n\nconst ToolbarIconButton = ({\n icon,\n text,\n classNames,\n disabled,\n onClick,\n}: { icon: string; text: string } & Pick<ToolbarButtonProps, 'classNames' | 'disabled' | 'onClick'>) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <NaturalToolbar.Button variant='ghost' disabled={disabled} onClick={onClick}>\n <Icon icon={icon} size={4} classNames={classNames} />\n </NaturalToolbar.Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content>\n <Tooltip.Arrow />\n {text}\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport type ViewType = 'editor' | 'split' | 'preview';\n\nexport type TemplateSelectProps = {\n templates?: Template[];\n onTemplateSelect?: (id: string) => void;\n};\n\nexport const TemplateSelect = ({ templates = [], onTemplateSelect }: TemplateSelectProps) => {\n return (\n <Select.Root value={''} onValueChange={onTemplateSelect}>\n <Select.TriggerButton />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n <Select.Option value={''}>Template</Select.Option>\n {templates.map(({ id, name }) => (\n <Select.Option key={id} value={id}>\n {name}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n );\n};\n\nexport type ViewSelectorProps = {\n view?: ViewType;\n onViewChange?: (view: ViewType) => void;\n};\n\nexport const ViewSelector = ({ view, onViewChange }: ViewSelectorProps) => {\n return (\n <ToggleGroup type='single' value={view} onValueChange={(value) => onViewChange?.(value as ViewType)}>\n <ToggleGroupItem value='editor' classNames='bg-transparent text-subdued'>\n <Icon icon='ph--code--regular' size={4} />\n </ToggleGroupItem>\n <ToggleGroupItem value='split' classNames='bg-transparent text-subdued'>\n <Icon icon='ph--square-split-vertical--regular' size={4} />\n </ToggleGroupItem>\n <ToggleGroupItem value='preview' classNames='bg-transparent text-subdued'>\n <Icon icon='ph--eye--regular' size={4} />\n </ToggleGroupItem>\n </ToggleGroup>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { javascript } from '@codemirror/lang-javascript';\nimport { type VirtualTypeScriptEnvironment } from '@typescript/vfs';\nimport { tsSync, tsFacet, tsLinter, tsAutocomplete, tsHover } from '@valtown/codemirror-ts';\nimport React from 'react';\n\nimport { useThemeContext } from '@dxos/react-ui';\nimport {\n autocomplete,\n createBasicExtensions,\n createThemeExtensions,\n editorFullWidth,\n editorGutter,\n editorMonospace,\n InputModeExtensions,\n useTextEditor,\n type UseTextEditorProps,\n} from '@dxos/react-ui-editor';\nimport { nonNullable } from '@dxos/util';\n\nexport type TypescriptEditorProps = {\n id: string;\n env?: VirtualTypeScriptEnvironment;\n} & Pick<UseTextEditorProps, 'className' | 'initialValue' | 'extensions' | 'scrollTo' | 'selection'>;\n\nexport const TypescriptEditor = ({\n id,\n env,\n className,\n initialValue,\n extensions,\n scrollTo,\n selection,\n}: TypescriptEditorProps) => {\n const { themeMode } = useThemeContext();\n const { parentRef, focusAttributes } = useTextEditor(\n () => ({\n id,\n initialValue,\n extensions: [\n extensions,\n createBasicExtensions({\n highlightActiveLine: true,\n indentWithTab: true,\n lineNumbers: true,\n lineWrapping: false,\n scrollPastEnd: true,\n }),\n createThemeExtensions({\n themeMode,\n syntaxHighlighting: true,\n slots: {\n content: { className: editorFullWidth },\n },\n }),\n editorGutter,\n // TODO(burdon): Factor out.\n [\n editorMonospace,\n javascript({ typescript: true }),\n // https://github.com/val-town/codemirror-ts\n autocomplete({ override: env ? [tsAutocomplete()] : [] }),\n env ? [tsFacet.of({ env, path: `/src/${id}.ts` }), tsSync(), tsLinter(), tsHover()] : [],\n InputModeExtensions.vscode,\n ],\n ].filter(nonNullable),\n selection,\n scrollTo,\n }),\n [id, extensions, themeMode, selection, scrollTo],\n );\n\n return <div ref={parentRef} className={className} {...focusAttributes} />;\n};\n\nexport default TypescriptEditor;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,wBAAwB;AACjC,SAASC,+BAA+B;AACxC,SAASC,MAAAA,WAAU;;;ACHnB,SAASC,cAAc;AACvB,OAAOC,0BAA0B;AACjC,OAAOC,8BAA8B;AACrC,OAAOC,UAASC,aAAaC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hE,QAAM+E,cAAc7E,QAAQ,MAAA;AAC1B,QAAI,CAACY,qBAAqB;AACxB;IACF;AAEA,WAAOkE,iBAAiBlE,qBAAqBzB,OAAO8E,OAAOc,OAAOC,SAASC,UAAUC,MAAMC,OAAO,IAAI;MACpGC,SAAS7F,OAAOgB;IAClB,CAAA;EACF,GAAG;IAACK;IAAqBrB;GAAM;AAE/B,SACE,gBAAA8F,OAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAWC,GAAG,kEAAkE5G,UAAAA;KAC/F,gBAAAwG,OAAA,cAACK,SAAAA;IACCC,UAAUC,QAAQhF,mBAAAA,KAAwB,CAAC9B,OAAOuB;IAClDwE;IACA9D;IACAN;IACAsB;IACA8D,UAAUlD;IACVmD,UAAU7E;IACV8E,cAAcrF;IACdsF,kBAAkBnE;MAGnBpB,SAAS,aACR,gBAAA4E,OAAA,cAACY,kBAAAA;IACC1F,IAAIzB,OAAOyB;IACXxB;IACAmH,cAAcpH,OAAOgB,QAAQM;IAC7BL;IACAyF,WAAU;MAIb/E,SAAS,YAAY,gBAAA4E,OAAA,cAACc,YAAAA;IAAWtB;;AAGxC;;;ADzLA,IAAMuB,kBAAkB,CAAC,EAAEC,QAAQ,GAAGC,MAAAA,MAA0B;AAC9D,QAAMC,kBAAkBC,wBAAwBC,iBAAiBJ,MAAAA,CAAAA;AACjE,SACE,gBAAAK,OAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAWC,IAAG,0DAAA;IAA8D,GAAGP;KAC9F,gBAAAG,OAAA,cAACK,cAAAA;IAAc,GAAGT;IAAOD;;AAG/B;AAEA,IAAA,0BAAeD;",
6
+ "names": ["React", "fullyQualifiedId", "useAttendableAttributes", "mx", "format", "prettierPluginEstree", "prettierPluginTypescript", "React", "useCallback", "useMemo", "useState", "log", "useClient", "create", "createDocAccessor", "Filter", "getMeta", "getSpace", "useQuery", "useIdentity", "useTranslation", "createDataExtensions", "listener", "mx", "React", "useState", "ElevationProvider", "Icon", "Select", "ToggleGroup", "ToggleGroupItem", "Toolbar", "NaturalToolbar", "Tooltip", "useTranslation", "Toolbar", "classNames", "deployed", "error", "functionUrl", "view", "templates", "onDeploy", "onFormat", "onViewChange", "onTemplateSelect", "t", "useTranslation", "SCRIPT_PLUGIN", "pending", "setPending", "useState", "handleCopyLink", "navigator", "clipboard", "writeText", "handleDeploy", "ElevationProvider", "elevation", "NaturalToolbar", "Root", "style", "contain", "TemplateSelect", "ToolbarIconButton", "icon", "text", "onClick", "div", "role", "className", "Tooltip", "Trigger", "Icon", "size", "Portal", "Content", "Arrow", "ViewSelector", "disabled", "asChild", "Button", "variant", "Select", "value", "onValueChange", "TriggerButton", "Viewport", "Option", "map", "id", "name", "key", "ToggleGroup", "type", "ToggleGroupItem", "javascript", "tsSync", "tsFacet", "tsLinter", "tsAutocomplete", "tsHover", "React", "useThemeContext", "autocomplete", "createBasicExtensions", "createThemeExtensions", "editorFullWidth", "editorGutter", "editorMonospace", "InputModeExtensions", "useTextEditor", "nonNullable", "TypescriptEditor", "id", "env", "className", "initialValue", "extensions", "scrollTo", "selection", "themeMode", "useThemeContext", "parentRef", "focusAttributes", "useTextEditor", "createBasicExtensions", "highlightActiveLine", "indentWithTab", "lineNumbers", "lineWrapping", "scrollPastEnd", "createThemeExtensions", "syntaxHighlighting", "slots", "content", "editorFullWidth", "editorGutter", "editorMonospace", "javascript", "typescript", "autocomplete", "override", "tsAutocomplete", "tsFacet", "of", "path", "tsSync", "tsLinter", "tsHover", "InputModeExtensions", "vscode", "filter", "nonNullable", "React", "div", "ref", "ScriptEditor", "classNames", "script", "env", "t", "useTranslation", "SCRIPT_PLUGIN", "client", "useClient", "identity", "useIdentity", "space", "getSpace", "fn", "useQuery", "Filter", "schema", "FunctionType", "source", "extensions", "useMemo", "listener", "onChange", "text", "content", "changed", "createDataExtensions", "id", "createDocAccessor", "view", "setView", "useState", "existingFunctionUrl", "getUserFunctionUrlInMetadata", "getMeta", "error", "setError", "handleFormat", "useCallback", "format", "parser", "plugins", "prettierPluginEstree", "prettierPluginTypescript", "semi", "singleQuote", "err", "log", "catch", "handleTemplateChange", "template", "templates", "find", "name", "metaKeys", "keys", "oldPresetIndex", "findIndex", "key", "USERFUNCTIONS_PRESET_META_KEY", "splice", "presetId", "push", "handleDeploy", "undefined", "existingFunctionId", "split", "at", "ownerDid", "publicKeyToDid", "identityKey", "bundler", "Bundler", "platform", "sandboxedModules", "remoteModules", "buildResult", "bundle", "result", "functionId", "functionVersionNumber", "errorMessage", "meta", "uploadWorkerFunction", "clientConfig", "config", "halo", "Error", "info", "version", "deployedFunction", "db", "add", "create", "inputSchema", "verbose", "setUserFunctionUrlInMetadata", "functionUrl", "getInvocationUrl", "values", "runtime", "services", "edge", "url", "spaceId", "React", "div", "role", "className", "mx", "Toolbar", "deployed", "Boolean", "onDeploy", "onFormat", "onViewChange", "onTemplateSelect", "TypescriptEditor", "initialValue", "DebugPanel", "ScriptContainer", "script", "props", "attendableAttrs", "useAttendableAttributes", "fullyQualifiedId", "React", "div", "role", "className", "mx", "ScriptEditor"]
7
+ }
@@ -12,25 +12,25 @@ var ScriptType = class extends TypedObject({
12
12
  // TODO(burdon): Change to URI?
13
13
  name: S.optional(S.String),
14
14
  description: S.optional(S.String),
15
- source: ref(TextType),
16
15
  // TODO(burdon): Change to hash of deployed content.
17
16
  // Whether source has changed since last deploy.
18
- changed: S.optional(S.Boolean)
17
+ changed: S.optional(S.Boolean),
18
+ source: ref(TextType)
19
19
  }) {
20
20
  };
21
21
  var FunctionType = class extends TypedObject({
22
22
  typename: "dxos.org/type/Function",
23
23
  version: "0.1.0"
24
24
  })({
25
- // TODO(burdon): Change to id?
26
- name: S.optional(S.String),
25
+ // TODO(burdon): Rename to id/uri?
26
+ name: S.NonEmptyString,
27
27
  version: S.Number,
28
- // Local binding to a function name.
29
- // TODO(burdon): Move binding to inner type.
30
- binding: S.optional(S.String),
31
28
  // Reference to a source script if it exists within ECHO.
29
+ // TODO(burdon): Don't ref ScriptType directly (core).
32
30
  source: S.optional(ref(ScriptType)),
33
- inputSchema: S.optional(JsonSchemaType)
31
+ inputSchema: S.optional(JsonSchemaType),
32
+ // Local binding to a function name.
33
+ binding: S.optional(S.String)
34
34
  }) {
35
35
  };
36
36
 
@@ -45,4 +45,4 @@ export {
45
45
  FunctionType,
46
46
  ScriptAction
47
47
  };
48
- //# sourceMappingURL=chunk-VEW5BERN.mjs.map
48
+ //# sourceMappingURL=chunk-DTVOXLPP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { JsonSchemaType, ref, S, TypedObject } from '@dxos/echo-schema';\nimport { TextType } from '@dxos/plugin-markdown/types';\n\n/**\n * Source script.\n */\nexport class ScriptType extends TypedObject({\n typename: 'dxos.org/type/Script',\n version: '0.1.0',\n})({\n // TODO(burdon): Change to URI?\n name: S.optional(S.String),\n description: S.optional(S.String),\n // TODO(burdon): Change to hash of deployed content.\n // Whether source has changed since last deploy.\n changed: S.optional(S.Boolean),\n source: ref(TextType),\n}) {}\n\n/**\n * Function deployment.\n */\n// TODO(burdon): Move to core/functions.\nexport class FunctionType extends TypedObject({\n typename: 'dxos.org/type/Function',\n version: '0.1.0',\n})({\n // TODO(burdon): Rename to id/uri?\n name: S.NonEmptyString,\n version: S.Number,\n\n // Reference to a source script if it exists within ECHO.\n // TODO(burdon): Don't ref ScriptType directly (core).\n source: S.optional(ref(ScriptType)),\n\n inputSchema: S.optional(JsonSchemaType),\n\n // Local binding to a function name.\n binding: S.optional(S.String),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type SpaceInitProvides } from '@dxos/plugin-space';\n\nimport { SCRIPT_PLUGIN } from '../meta';\n\nexport enum ScriptAction {\n CREATE = `${SCRIPT_PLUGIN}/create`,\n}\n\nexport type ScriptSettingsProps = {};\n\nexport type ScriptPluginProvides = GraphBuilderProvides &\n IntentResolverProvides &\n MetadataRecordsProvides &\n SchemaProvides &\n SettingsProvides<ScriptSettingsProps> &\n SpaceInitProvides &\n SurfaceProvides &\n TranslationsProvides;\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,gBAAgBC,KAAKC,GAAGC,mBAAmB;AACpD,SAASC,gBAAgB;AAKlB,IAAMC,aAAN,cAAyBC,YAAY;EAC1CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;;EAEDC,MAAMC,EAAEC,SAASD,EAAEE,MAAM;EACzBC,aAAaH,EAAEC,SAASD,EAAEE,MAAM;;;EAGhCE,SAASJ,EAAEC,SAASD,EAAEK,OAAO;EAC7BC,QAAQC,IAAIC,QAAAA;AACd,CAAA,EAAA;AAAI;AAMG,IAAMC,eAAN,cAA2Bb,YAAY;EAC5CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;;EAEDC,MAAMC,EAAEU;EACRZ,SAASE,EAAEW;;;EAIXL,QAAQN,EAAEC,SAASM,IAAIZ,UAAAA,CAAAA;EAEvBiB,aAAaZ,EAAEC,SAASY,cAAAA;;EAGxBC,SAASd,EAAEC,SAASD,EAAEE,MAAM;AAC9B,CAAA,EAAA;AAAI;;;;UC1BQa,eAAAA;0CACD,GAAGC,aAAAA,SAAsB,IAAA;GADxBD,iBAAAA,eAAAA,CAAAA,EAAAA;",
6
+ "names": ["JsonSchemaType", "ref", "S", "TypedObject", "TextType", "ScriptType", "TypedObject", "typename", "version", "name", "S", "optional", "String", "description", "changed", "Boolean", "source", "ref", "TextType", "FunctionType", "NonEmptyString", "Number", "inputSchema", "JsonSchemaType", "binding", "ScriptAction", "SCRIPT_PLUGIN"]
7
+ }
@@ -11,7 +11,7 @@ import {
11
11
  FunctionType,
12
12
  ScriptAction,
13
13
  ScriptType
14
- } from "./chunk-VEW5BERN.mjs";
14
+ } from "./chunk-DTVOXLPP.mjs";
15
15
  import {
16
16
  SCRIPT_PLUGIN,
17
17
  meta_default
@@ -195,8 +195,8 @@ var ScriptSettingsPanel = ({ script }) => {
195
195
  };
196
196
 
197
197
  // packages/plugins/experimental/plugin-script/src/components/index.ts
198
- var AutomationPanel = lazy(() => import("./AutomationPanel-RYJJQ5QX.mjs"));
199
- var ScriptContainer = lazy(() => import("./ScriptContainer-RLBVHRCW.mjs"));
198
+ var AutomationPanel = lazy(() => import("./AutomationPanel-BZCRRLOQ.mjs"));
199
+ var ScriptContainer = lazy(() => import("./ScriptContainer-GQ2KJ5BM.mjs"));
200
200
 
201
201
  // packages/plugins/experimental/plugin-script/src/translations.ts
202
202
  var translations_default = [
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":17454,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":29746,"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},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytes":1564,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5105,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytes":559,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx","kind":"import-statement","original":"./ScriptSettings"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytes":4120,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytes":1763,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytes":12290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":28101,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":11439,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../../edge"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"../DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytes":858,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8497,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":24950,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"./DebugPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"../templates"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytes":2763,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1305,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts","kind":"import-statement","original":"./ScriptSettings"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx","kind":"import-statement","original":"./ScriptSettingsPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","kind":"dynamic-import","original":"./ScriptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":3716,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":22477,"imports":[{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","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/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"./templates"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/browser/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":504},"packages/plugins/experimental/plugin-script/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23731},"packages/plugins/experimental/plugin-script/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","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/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-RYJJQ5QX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs","kind":"dynamic-import"}],"exports":["AutomationPanel","Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptSettingsPanel","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5713},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":182},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytesInOutput":1179},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytesInOutput":3235},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":1050},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":14088},"packages/plugins/experimental/plugin-script/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.ts","inputs":{},"bytes":161},"packages/plugins/experimental/plugin-script/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-RYJJQ5QX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6344},"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-RYJJQ5QX.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["AutomationPanel","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":2690},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":3290},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26447},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytesInOutput":649},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":6227},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4490},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1915},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":14319},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21378},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs":{"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},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler","templates"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":7034},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0},"raw-loader:./templates/chat.ts?raw":{"bytesInOutput":2921},"raw-loader:./templates/chess.ts?raw":{"bytesInOutput":952},"raw-loader:./templates/echo.ts?raw":{"bytesInOutput":327},"raw-loader:./templates/email.ts?raw":{"bytesInOutput":855},"raw-loader:./templates/forex.ts?raw":{"bytesInOutput":481},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytesInOutput":703}},"bytes":13707},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14068},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DebugPanel"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytesInOutput":7689},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":7904},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16408},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3980},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7440},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2950},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-VEW5BERN.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytesInOutput":968},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1428},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":737},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs":{"imports":[],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytesInOutput":311}},"bytes":459}}}
1
+ {"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":17454,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":29746,"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},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytes":1564,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5105,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytes":559,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx","kind":"import-statement","original":"./ScriptSettings"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytes":4271,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytes":1763,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytes":12290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":28101,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":11439,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../../edge"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"../DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytes":858,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8447,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":24777,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"./DebugPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"../templates"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytes":2763,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1305,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts","kind":"import-statement","original":"./ScriptSettings"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx","kind":"import-statement","original":"./ScriptSettingsPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","kind":"dynamic-import","original":"./ScriptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":3716,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":22477,"imports":[{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","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/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"./templates"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/browser/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":504},"packages/plugins/experimental/plugin-script/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23731},"packages/plugins/experimental/plugin-script/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","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/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","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":"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-BZCRRLOQ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-GQ2KJ5BM.mjs","kind":"dynamic-import"}],"exports":["AutomationPanel","Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptSettingsPanel","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5713},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":182},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytesInOutput":1179},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytesInOutput":3235},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":1050},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":14088},"packages/plugins/experimental/plugin-script/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.ts","inputs":{},"bytes":161},"packages/plugins/experimental/plugin-script/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-BZCRRLOQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6344},"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-BZCRRLOQ.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["AutomationPanel","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":2690},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":3290},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-GQ2KJ5BM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26345},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-GQ2KJ5BM.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytesInOutput":649},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":6190},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4490},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1897},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":14264},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21378},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-4UTRJLQ3.mjs":{"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},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler","templates"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":7034},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0},"raw-loader:./templates/chat.ts?raw":{"bytesInOutput":2921},"raw-loader:./templates/chess.ts?raw":{"bytesInOutput":952},"raw-loader:./templates/echo.ts?raw":{"bytesInOutput":327},"raw-loader:./templates/email.ts?raw":{"bytesInOutput":855},"raw-loader:./templates/forex.ts?raw":{"bytesInOutput":481},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytesInOutput":703}},"bytes":13707},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14068},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-NCZUJKJE.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DebugPanel"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytesInOutput":7689},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":7904},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16408},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-5GGRYRS4.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3980},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7440},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3008},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-DTVOXLPP.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytesInOutput":978},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1438},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":737},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-C7VBULMK.mjs":{"imports":[],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytesInOutput":311}},"bytes":459}}}
@@ -2,7 +2,7 @@ import {
2
2
  FunctionType,
3
3
  ScriptAction,
4
4
  ScriptType
5
- } from "../chunk-VEW5BERN.mjs";
5
+ } from "../chunk-DTVOXLPP.mjs";
6
6
  import "../chunk-C7VBULMK.mjs";
7
7
  export {
8
8
  FunctionType,
@@ -26,15 +26,15 @@ 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 AutomationPanel_3B5AGQQV_exports = {};
30
- __export(AutomationPanel_3B5AGQQV_exports, {
29
+ var AutomationPanel_VNLNP3EE_exports = {};
30
+ __export(AutomationPanel_VNLNP3EE_exports, {
31
31
  AutomationPanel: () => AutomationPanel,
32
32
  default: () => AutomationPanel_default
33
33
  });
34
- module.exports = __toCommonJS(AutomationPanel_3B5AGQQV_exports);
34
+ module.exports = __toCommonJS(AutomationPanel_VNLNP3EE_exports);
35
35
  var import_chunk_BJ4WIWCP = require("./chunk-BJ4WIWCP.cjs");
36
36
  var import_chunk_XS6GEYYH = require("./chunk-XS6GEYYH.cjs");
37
- var import_chunk_XJOH225K = require("./chunk-XJOH225K.cjs");
37
+ var import_chunk_T4PYTKIW = require("./chunk-T4PYTKIW.cjs");
38
38
  var import_chunk_6LYX73ZT = require("./chunk-6LYX73ZT.cjs");
39
39
  var import_react = __toESM(require("react"));
40
40
  var import_debug = require("@dxos/debug");
@@ -43,21 +43,21 @@ var import_echo = require("@dxos/react-client/echo");
43
43
  var import_react_ui = require("@dxos/react-ui");
44
44
  var AutomationPanel = ({ subject }) => {
45
45
  const space = (0, import_echo.getSpace)(subject);
46
- const functions = (0, import_echo.useQuery)(space ?? void 0, import_echo.Filter.schema(import_chunk_XJOH225K.FunctionType, (fn) => subject instanceof import_chunk_XJOH225K.ScriptType ? fn.source === subject : fn.binding != null), {}, [
46
+ const functions = (0, import_echo.useQuery)(space ?? void 0, import_echo.Filter.schema(import_chunk_T4PYTKIW.FunctionType, (fn) => subject instanceof import_chunk_T4PYTKIW.ScriptType ? fn.source === subject : fn.binding != null), {}, [
47
47
  subject
48
48
  ]);
49
49
  const [selectedFunction, setSelectedFunction] = (0, import_react.useState)(null);
50
- const functionToChatWith = subject instanceof import_chunk_XJOH225K.ScriptType ? functions[0] : selectedFunction;
50
+ const functionToChatWith = subject instanceof import_chunk_T4PYTKIW.ScriptType ? functions[0] : selectedFunction;
51
51
  return /* @__PURE__ */ import_react.default.createElement("div", {
52
52
  className: "h-full flex flex-col"
53
- }, !(subject instanceof import_chunk_XJOH225K.ScriptType) && /* @__PURE__ */ import_react.default.createElement(BindingSelect, {
53
+ }, !(subject instanceof import_chunk_T4PYTKIW.ScriptType) && /* @__PURE__ */ import_react.default.createElement(BindingSelect, {
54
54
  selectedFunction,
55
55
  setSelectedFunction,
56
56
  functions
57
57
  }), functionToChatWith && /* @__PURE__ */ import_react.default.createElement(ChatPanel, {
58
58
  fn: functionToChatWith,
59
59
  subject
60
- }), subject instanceof import_chunk_XJOH225K.ScriptType && functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("p", null, "Deploy function to interact with it."));
60
+ }), subject instanceof import_chunk_T4PYTKIW.ScriptType && functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("p", null, "Deploy function to interact with it."));
61
61
  };
62
62
  var ChatPanel = ({ fn, subject }) => {
63
63
  const client = (0, import_react_client.useClient)();
@@ -97,4 +97,4 @@ var AutomationPanel_default = AutomationPanel;
97
97
  0 && (module.exports = {
98
98
  AutomationPanel
99
99
  });
100
- //# sourceMappingURL=AutomationPanel-3B5AGQQV.cjs.map
100
+ //# sourceMappingURL=AutomationPanel-VNLNP3EE.cjs.map