@dxos/plugin-script 0.7.2-main.f1adc9f → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{AutomationPanel-ELXXAKW4.mjs → AutomationPanel-BZCRRLOQ.mjs} +9 -14
- package/dist/lib/browser/AutomationPanel-BZCRRLOQ.mjs.map +7 -0
- package/dist/lib/browser/{ScriptContainer-IC67ILI2.mjs → ScriptContainer-GQ2KJ5BM.mjs} +3 -3
- package/dist/lib/browser/{chunk-KSIPC365.mjs → chunk-5GGRYRS4.mjs} +6 -17
- package/dist/lib/browser/{chunk-KSIPC365.mjs.map → chunk-5GGRYRS4.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-K7KY6YMG.mjs → chunk-NCZUJKJE.mjs} +10 -14
- package/dist/lib/browser/chunk-NCZUJKJE.mjs.map +7 -0
- package/dist/lib/browser/edge/index.mjs +1 -1
- package/dist/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/{AutomationPanel-RCEBTDK7.cjs → AutomationPanel-VNLNP3EE.cjs} +13 -16
- package/dist/lib/node/AutomationPanel-VNLNP3EE.cjs.map +7 -0
- package/dist/lib/node/{ScriptContainer-MRZXOY42.cjs → ScriptContainer-K67ZWCKL.cjs} +14 -14
- package/dist/lib/node/{chunk-4INUJLXL.cjs → chunk-BJ4WIWCP.cjs} +12 -16
- package/dist/lib/node/chunk-BJ4WIWCP.cjs.map +7 -0
- package/dist/lib/node/{chunk-2WF3LLHC.cjs → chunk-XS6GEYYH.cjs} +9 -20
- package/dist/lib/node/{chunk-2WF3LLHC.cjs.map → chunk-XS6GEYYH.cjs.map} +3 -3
- package/dist/lib/node/edge/index.cjs +10 -10
- package/dist/lib/node/edge/index.cjs.map +1 -1
- package/dist/lib/node/index.cjs +5 -5
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/{AutomationPanel-QFKOZXLO.mjs → AutomationPanel-NWE2QCOE.mjs} +9 -14
- package/dist/lib/node-esm/AutomationPanel-NWE2QCOE.mjs.map +7 -0
- package/dist/lib/node-esm/{ScriptContainer-A4A663FM.mjs → ScriptContainer-BVDYLJZI.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-OFYGBUNI.mjs → chunk-DXWSRDEN.mjs} +10 -14
- package/dist/lib/node-esm/chunk-DXWSRDEN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4QWC64VN.mjs → chunk-V74XKPLC.mjs} +6 -17
- package/dist/lib/node-esm/{chunk-4QWC64VN.mjs.map → chunk-V74XKPLC.mjs.map} +3 -3
- package/dist/lib/node-esm/edge/index.mjs +1 -1
- package/dist/lib/node-esm/index.mjs +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +5 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/package.json +36 -35
- package/src/components/AutomationPanel/AutomationPanel.tsx +4 -7
- package/src/components/DebugPanel/DebugPanel.tsx +30 -41
- package/src/components/ScriptBlock/ScriptBlock.stories.tsx +25 -5
- package/src/components/ScriptBlock/ScriptBlock.tsx +8 -3
- package/src/edge/functions.ts +1 -12
- package/dist/lib/browser/AutomationPanel-ELXXAKW4.mjs.map +0 -7
- package/dist/lib/browser/chunk-K7KY6YMG.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-RCEBTDK7.cjs.map +0 -7
- package/dist/lib/node/chunk-4INUJLXL.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OFYGBUNI.mjs.map +0 -7
- /package/dist/lib/browser/{ScriptContainer-IC67ILI2.mjs.map → ScriptContainer-GQ2KJ5BM.mjs.map} +0 -0
- /package/dist/lib/node/{ScriptContainer-MRZXOY42.cjs.map → ScriptContainer-K67ZWCKL.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ScriptContainer-A4A663FM.mjs.map → ScriptContainer-BVDYLJZI.mjs.map} +0 -0
|
@@ -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":18372,"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":28533,"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":11839,"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/meta.ts","kind":"import-statement","original":"../../meta"},{"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-KSIPC365.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-KSIPC365.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-ELXXAKW4.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-IC67ILI2.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-ELXXAKW4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6557},"packages/plugins/experimental/plugin-script/dist/lib/browser/AutomationPanel-ELXXAKW4.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-K7KY6YMG.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-KSIPC365.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":2738},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":3363},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-IC67ILI2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26345},"packages/plugins/experimental/plugin-script/dist/lib/browser/ScriptContainer-IC67ILI2.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-K7KY6YMG.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-KSIPC365.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-K7KY6YMG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14457},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-K7KY6YMG.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":7771},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":7986},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-KSIPC365.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16818},"packages/plugins/experimental/plugin-script/dist/lib/browser/chunk-KSIPC365.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":4234},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7694},"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}}}
|
|
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}}}
|
|
@@ -26,14 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var AutomationPanel_VNLNP3EE_exports = {};
|
|
30
|
+
__export(AutomationPanel_VNLNP3EE_exports, {
|
|
31
31
|
AutomationPanel: () => AutomationPanel,
|
|
32
32
|
default: () => AutomationPanel_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(AutomationPanel_VNLNP3EE_exports);
|
|
35
|
+
var import_chunk_BJ4WIWCP = require("./chunk-BJ4WIWCP.cjs");
|
|
36
|
+
var import_chunk_XS6GEYYH = require("./chunk-XS6GEYYH.cjs");
|
|
37
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"));
|
|
@@ -42,35 +42,32 @@ var import_react_client = require("@dxos/react-client");
|
|
|
42
42
|
var import_echo = require("@dxos/react-client/echo");
|
|
43
43
|
var import_react_ui = require("@dxos/react-ui");
|
|
44
44
|
var AutomationPanel = ({ subject }) => {
|
|
45
|
-
const { t } = (0, import_react_ui.useTranslation)(import_chunk_6LYX73ZT.SCRIPT_PLUGIN);
|
|
46
45
|
const space = (0, import_echo.getSpace)(subject);
|
|
47
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), {}, [
|
|
48
47
|
subject
|
|
49
48
|
]);
|
|
50
49
|
const [selectedFunction, setSelectedFunction] = (0, import_react.useState)(null);
|
|
51
|
-
const
|
|
50
|
+
const functionToChatWith = subject instanceof import_chunk_T4PYTKIW.ScriptType ? functions[0] : selectedFunction;
|
|
52
51
|
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
53
52
|
className: "h-full flex flex-col"
|
|
54
53
|
}, !(subject instanceof import_chunk_T4PYTKIW.ScriptType) && /* @__PURE__ */ import_react.default.createElement(BindingSelect, {
|
|
55
54
|
selectedFunction,
|
|
56
55
|
setSelectedFunction,
|
|
57
56
|
functions
|
|
58
|
-
}),
|
|
59
|
-
fn:
|
|
57
|
+
}), functionToChatWith && /* @__PURE__ */ import_react.default.createElement(ChatPanel, {
|
|
58
|
+
fn: functionToChatWith,
|
|
60
59
|
subject
|
|
61
|
-
}), subject instanceof import_chunk_T4PYTKIW.ScriptType && functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("
|
|
62
|
-
className: "p-1"
|
|
63
|
-
}, t("not deployed")));
|
|
60
|
+
}), subject instanceof import_chunk_T4PYTKIW.ScriptType && functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("p", null, "Deploy function to interact with it."));
|
|
64
61
|
};
|
|
65
62
|
var ChatPanel = ({ fn, subject }) => {
|
|
66
63
|
const client = (0, import_react_client.useClient)();
|
|
67
64
|
const space = (0, import_echo.getSpace)(fn);
|
|
68
|
-
const existingFunctionUrl = (0,
|
|
65
|
+
const existingFunctionUrl = (0, import_chunk_XS6GEYYH.getUserFunctionUrlInMetadata)((0, import_echo.getMeta)(fn));
|
|
69
66
|
const functionUrl = (0, import_react.useMemo)(() => {
|
|
70
67
|
if (!existingFunctionUrl) {
|
|
71
68
|
return;
|
|
72
69
|
}
|
|
73
|
-
return (0,
|
|
70
|
+
return (0, import_chunk_XS6GEYYH.getInvocationUrl)(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? "", {
|
|
74
71
|
spaceId: space?.id,
|
|
75
72
|
subjectId: subject?.id
|
|
76
73
|
});
|
|
@@ -79,7 +76,7 @@ var ChatPanel = ({ fn, subject }) => {
|
|
|
79
76
|
space,
|
|
80
77
|
subject
|
|
81
78
|
]);
|
|
82
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(import_chunk_BJ4WIWCP.DebugPanel, {
|
|
83
80
|
functionUrl,
|
|
84
81
|
classNames: "flex-1"
|
|
85
82
|
});
|
|
@@ -100,4 +97,4 @@ var AutomationPanel_default = AutomationPanel;
|
|
|
100
97
|
0 && (module.exports = {
|
|
101
98
|
AutomationPanel
|
|
102
99
|
});
|
|
103
|
-
//# sourceMappingURL=AutomationPanel-
|
|
100
|
+
//# sourceMappingURL=AutomationPanel-VNLNP3EE.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 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
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAyC;AAGzC,mBAA8B;AAC9B,0BAA0B;AAC1B,kBAAoD;AACpD,sBAAuB;AAUhB,IAAMA,kBAAkB,CAAC,EAAEC,QAAO,MAAwB;AAC/D,QAAMC,YAAQC,sBAASF,OAAAA;AAGvB,QAAMG,gBAAYC,sBAChBH,SAASI,QACTC,mBAAOC,OAAOC,oCAAc,CAACC,OAAQT,mBAAmBU,mCAAaD,GAAGE,WAAWX,UAAUS,GAAGG,WAAW,IAAA,GAC3G,CAAC,GACD;IAACZ;GAAQ;AAEX,QAAM,CAACa,kBAAkBC,mBAAAA,QAAuBC,uBAA8B,IAAA;AAC9E,QAAMC,qBAAqBhB,mBAAmBU,mCAAaP,UAAU,CAAA,IAAKU;AAE1E,SACE,6BAAAI,QAAA,cAACC,OAAAA;IAAIC,WAAU;KACZ,EAAEnB,mBAAmBU,qCACpB,6BAAAO,QAAA,cAACG,eAAAA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EhB,IAAI3B,QAAO,MAC3B,6BAAAK,QAAA,cAAC0B,uBAAOa,QAAM;IAACC,KAAKlB;IAAIM,OAAON;KAC5B3B,OAAAA,CAAAA,CAAAA,GAIP,6BAAAK,QAAA,cAAC0B,uBAAOe,kBAAgB,IAAA,GACxB,6BAAAzC,QAAA,cAAC0B,uBAAOgB,OAAK,IAAA,CAAA,CAAA,CAAA;AAKvB;AC5FA,IAAA,0BAAe5D;",
|
|
6
|
+
"names": ["AutomationPanel", "subject", "space", "getSpace", "functions", "useQuery", "undefined", "Filter", "schema", "FunctionType", "fn", "ScriptType", "source", "binding", "selectedFunction", "setSelectedFunction", "useState", "functionToChatWith", "React", "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"]
|
|
7
|
+
}
|
|
@@ -26,14 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var ScriptContainer_K67ZWCKL_exports = {};
|
|
30
|
+
__export(ScriptContainer_K67ZWCKL_exports, {
|
|
31
31
|
default: () => ScriptContainer_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(ScriptContainer_K67ZWCKL_exports);
|
|
34
34
|
var import_chunk_WPP65EYS = require("./chunk-WPP65EYS.cjs");
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var import_chunk_BJ4WIWCP = require("./chunk-BJ4WIWCP.cjs");
|
|
36
|
+
var import_chunk_XS6GEYYH = require("./chunk-XS6GEYYH.cjs");
|
|
37
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"));
|
|
@@ -256,7 +256,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
256
256
|
identity
|
|
257
257
|
]);
|
|
258
258
|
const [view, setView] = (0, import_react2.useState)("editor");
|
|
259
|
-
const existingFunctionUrl = fn && (0,
|
|
259
|
+
const existingFunctionUrl = fn && (0, import_chunk_XS6GEYYH.getUserFunctionUrlInMetadata)((0, import_echo2.getMeta)(fn));
|
|
260
260
|
const [error, setError] = (0, import_react2.useState)();
|
|
261
261
|
const handleFormat = (0, import_react2.useCallback)(async () => {
|
|
262
262
|
if (!script.source) {
|
|
@@ -289,13 +289,13 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
289
289
|
script.name = template.name;
|
|
290
290
|
script.source.content = template.source;
|
|
291
291
|
const metaKeys = (0, import_echo2.getMeta)(script).keys;
|
|
292
|
-
const oldPresetIndex = metaKeys.findIndex((key) => key.source ===
|
|
292
|
+
const oldPresetIndex = metaKeys.findIndex((key) => key.source === import_chunk_XS6GEYYH.USERFUNCTIONS_PRESET_META_KEY);
|
|
293
293
|
if (oldPresetIndex >= 0) {
|
|
294
294
|
metaKeys.splice(oldPresetIndex, 1);
|
|
295
295
|
}
|
|
296
296
|
if (template.presetId) {
|
|
297
297
|
metaKeys.push({
|
|
298
|
-
source:
|
|
298
|
+
source: import_chunk_XS6GEYYH.USERFUNCTIONS_PRESET_META_KEY,
|
|
299
299
|
id: template.presetId
|
|
300
300
|
});
|
|
301
301
|
}
|
|
@@ -308,7 +308,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
308
308
|
setError(void 0);
|
|
309
309
|
try {
|
|
310
310
|
const existingFunctionId = existingFunctionUrl?.split("/").at(-1);
|
|
311
|
-
const ownerDid = existingFunctionUrl?.split("/").at(-2) ?? (0,
|
|
311
|
+
const ownerDid = existingFunctionUrl?.split("/").at(-2) ?? (0, import_chunk_XS6GEYYH.publicKeyToDid)(identity.identityKey);
|
|
312
312
|
const bundler = new import_chunk_WPP65EYS.Bundler({
|
|
313
313
|
platform: "browser",
|
|
314
314
|
sandboxedModules: [],
|
|
@@ -318,7 +318,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
318
318
|
if (buildResult.error || !buildResult.bundle) {
|
|
319
319
|
throw buildResult.error;
|
|
320
320
|
}
|
|
321
|
-
const { result, functionId, functionVersionNumber, errorMessage, meta } = await (0,
|
|
321
|
+
const { result, functionId, functionVersionNumber, errorMessage, meta } = await (0, import_chunk_XS6GEYYH.uploadWorkerFunction)({
|
|
322
322
|
clientConfig: client.config,
|
|
323
323
|
halo: client.halo,
|
|
324
324
|
ownerDid,
|
|
@@ -358,7 +358,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
358
358
|
C: (f, a) => f(...a)
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
(0,
|
|
361
|
+
(0, import_chunk_XS6GEYYH.setUserFunctionUrlInMetadata)((0, import_echo2.getMeta)(deployedFunction), `/${ownerDid}/${functionId}`);
|
|
362
362
|
setView("split");
|
|
363
363
|
} catch (err) {
|
|
364
364
|
import_log.log.catch(err, void 0, {
|
|
@@ -380,7 +380,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
380
380
|
if (!existingFunctionUrl) {
|
|
381
381
|
return;
|
|
382
382
|
}
|
|
383
|
-
return (0,
|
|
383
|
+
return (0, import_chunk_XS6GEYYH.getInvocationUrl)(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? "", {
|
|
384
384
|
spaceId: space?.id
|
|
385
385
|
});
|
|
386
386
|
}, [
|
|
@@ -406,7 +406,7 @@ var ScriptEditor = ({ classNames, script, env }) => {
|
|
|
406
406
|
initialValue: script.source?.content,
|
|
407
407
|
extensions,
|
|
408
408
|
className: "flex is-full bs-full overflow-hidden ch-focus-ring-inset-over-all"
|
|
409
|
-
}), view !== "editor" && /* @__PURE__ */ import_react2.default.createElement(
|
|
409
|
+
}), view !== "editor" && /* @__PURE__ */ import_react2.default.createElement(import_chunk_BJ4WIWCP.DebugPanel, {
|
|
410
410
|
functionUrl
|
|
411
411
|
}));
|
|
412
412
|
};
|
|
@@ -422,4 +422,4 @@ var ScriptContainer = ({ script, ...props }) => {
|
|
|
422
422
|
}));
|
|
423
423
|
};
|
|
424
424
|
var ScriptContainer_default = ScriptContainer;
|
|
425
|
-
//# sourceMappingURL=ScriptContainer-
|
|
425
|
+
//# sourceMappingURL=ScriptContainer-K67ZWCKL.cjs.map
|
|
@@ -26,11 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_BJ4WIWCP_exports = {};
|
|
30
|
+
__export(chunk_BJ4WIWCP_exports, {
|
|
31
31
|
DebugPanel: () => DebugPanel
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_BJ4WIWCP_exports);
|
|
34
34
|
var import_chunk_6LYX73ZT = require("./chunk-6LYX73ZT.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_log = require("@dxos/log");
|
|
@@ -179,13 +179,15 @@ var DebugPanel = ({ classNames, functionUrl }) => {
|
|
|
179
179
|
};
|
|
180
180
|
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
181
181
|
className: (0, import_react_ui_theme.mx)("flex flex-col h-full overflow-hidden", classNames)
|
|
182
|
-
}, /* @__PURE__ */ import_react.default.createElement(
|
|
182
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
183
183
|
ref: scrollerRef,
|
|
184
|
+
className: "flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto"
|
|
185
|
+
}, /* @__PURE__ */ import_react.default.createElement(MessageThread, {
|
|
184
186
|
state,
|
|
185
187
|
result,
|
|
186
188
|
history
|
|
187
|
-
}), /* @__PURE__ */ import_react.default.createElement(import_react_ui.Toolbar.Root, {
|
|
188
|
-
classNames: "p-
|
|
189
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_react_ui.Toolbar.Root, {
|
|
190
|
+
classNames: "p-2"
|
|
189
191
|
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.TextInput, {
|
|
190
192
|
ref: inputRef,
|
|
191
193
|
autoFocus: true,
|
|
@@ -205,14 +207,8 @@ var DebugPanel = ({ classNames, functionUrl }) => {
|
|
|
205
207
|
size: 4
|
|
206
208
|
}))));
|
|
207
209
|
};
|
|
208
|
-
var MessageThread =
|
|
209
|
-
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
213
|
-
ref: forwardedRef,
|
|
214
|
-
className: "flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto"
|
|
215
|
-
}, history.map((message, i) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
210
|
+
var MessageThread = ({ state, result, history }) => {
|
|
211
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, history.map((message, i) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
216
212
|
key: i,
|
|
217
213
|
className: "grid grid-cols-[2rem_1fr_2rem]"
|
|
218
214
|
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
@@ -241,7 +237,7 @@ var MessageThread = /* @__PURE__ */ (0, import_react.forwardRef)(({ state, histo
|
|
|
241
237
|
text: result
|
|
242
238
|
}
|
|
243
239
|
}))));
|
|
244
|
-
}
|
|
240
|
+
};
|
|
245
241
|
var MessageItem = ({ classNames, message }) => {
|
|
246
242
|
const { type, text, data, error } = message;
|
|
247
243
|
const wrapper = "p-1 px-2 rounded-lg bg-hoverSurface overflow-auto";
|
|
@@ -266,4 +262,4 @@ var RobotAvatar = () => /* @__PURE__ */ import_react.default.createElement(impor
|
|
|
266
262
|
0 && (module.exports = {
|
|
267
263
|
DebugPanel
|
|
268
264
|
});
|
|
269
|
-
//# sourceMappingURL=chunk-
|
|
265
|
+
//# sourceMappingURL=chunk-BJ4WIWCP.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/DebugPanel/DebugPanel.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Avatar, Icon, Input, type ThemedClassName, Toolbar, useTranslation } from '@dxos/react-ui';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { SCRIPT_PLUGIN } from '../../meta';\n\ntype State = 'pending' | 'responding';\n\n/**\n * Request or response.\n */\ntype Message = { type: 'request' | 'response'; text?: string; data?: any; error?: Error };\n\nexport type DebugPanelProps = ThemedClassName<{\n functionUrl?: string;\n}>;\n\nexport const DebugPanel = ({ classNames, functionUrl }: DebugPanelProps) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const [input, setInput] = useState('');\n const [result, setResult] = useState('');\n const [state, setState] = useState<State | null>(null);\n\n // TODO(burdon): Persistent history -- at least for session (non-space ECHO data?)\n const [history, setHistory] = useState<Message[]>([]);\n\n const scrollerRef = useRef<HTMLDivElement>(null);\n const handleScroll = () => {\n if (scrollerRef.current) {\n scrollerRef.current.scrollTop = scrollerRef.current.scrollHeight;\n }\n };\n\n const controller = useRef<AbortController>();\n useEffect(() => {\n return () => {\n handleStop();\n };\n }, []);\n\n const handleStop = () => {\n controller.current?.abort('stop');\n controller.current = undefined;\n };\n\n const handleClear = () => {\n handleStop();\n setInput('');\n setResult('');\n setHistory([]);\n inputRef.current?.focus();\n };\n\n const handleResponse = ({ text, data, error }: { text?: string; data?: any; error?: Error } = {}) => {\n controller.current = undefined;\n setHistory((history) => [...history, { type: 'response', text, data, error } satisfies Message]);\n setResult('');\n setState(null);\n handleScroll();\n };\n\n const handleRequest = async (input: string) => {\n // Returns a promise that resolves when a value has been received.\n try {\n setState('pending');\n\n let data = null;\n // Detect JSON input.\n if (input.charAt(0) === '{') {\n try {\n const validJsonString = input.replace(/'/g, '\"').replace(/([{,]\\s*)([a-zA-Z0-9_]+)(\\s*:)/g, '$1\"$2\"$3');\n data = JSON.parse(validJsonString);\n input = JSON.stringify(data, null, 2);\n } catch (err) {\n inputRef.current?.focus();\n return;\n }\n }\n\n setInput('');\n setResult('');\n setHistory((history) => [...history, { type: 'request', text: input }]);\n setTimeout(() => {\n handleScroll();\n });\n\n // Throws DOMException when aborted.\n controller.current = new AbortController();\n const response = await fetch(functionUrl!, {\n signal: controller.current.signal,\n method: 'POST',\n body: input,\n headers: {\n 'Content-Type': data ? 'application/json' : 'text/plain',\n },\n });\n\n // Check for error.\n if (!response.ok) {\n const text = await response.text();\n handleResponse({ error: new Error(text || response.statusText || String(response.status)) });\n return;\n }\n\n // Check for JSON.\n const contentType = response.headers.get('content-type');\n if (contentType === 'application/json') {\n const data = await response.json();\n handleResponse({ data });\n return;\n }\n\n // Text (including streaming).\n setState('responding');\n let text = '';\n const reader = response.body!.getReader();\n const pump = async ({ done, value }: ReadableStreamReadResult<Uint8Array>): Promise<void> => {\n text = text + new TextDecoder().decode(value);\n if (!controller.current || done) {\n handleResponse({ text });\n return;\n }\n\n setResult(text);\n setTimeout(() => {\n handleScroll();\n });\n\n return reader.read().then(pump);\n };\n\n void reader\n .read()\n .then(pump)\n .catch((err) => {\n if (err.name !== 'AbortError') {\n log.catch(err);\n }\n });\n } catch (err: any) {\n if (err !== 'stop') {\n const error = err instanceof Error ? err : new Error(err);\n handleResponse({ error });\n log.catch(err);\n } else {\n handleResponse();\n }\n }\n };\n\n return (\n <div className={mx('flex flex-col h-full overflow-hidden', classNames)}>\n {/* TODO(burdon): Replace with Thread? */}\n <div ref={scrollerRef} className='flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto'>\n <MessageThread state={state} result={result} history={history} />\n </div>\n\n <Toolbar.Root classNames='p-2'>\n <Input.Root>\n <Input.TextInput\n ref={inputRef}\n autoFocus\n placeholder={t('function request placeholder')}\n value={input}\n onChange={(ev) => setInput(ev.target.value)}\n onKeyDown={(ev) => ev.key === 'Enter' && handleRequest(input)}\n />\n </Input.Root>\n <Toolbar.Button onClick={() => handleRequest(input)}>\n <Icon icon='ph--play--regular' size={4} />\n </Toolbar.Button>\n <Toolbar.Button onClick={() => (state ? handleStop() : handleClear())}>\n <Icon icon={state ? 'ph--stop--regular' : 'ph--trash--regular'} size={4} />\n </Toolbar.Button>\n </Toolbar.Root>\n </div>\n );\n};\n\n// TODO(burdon): Replace with thread?\n// TODO(burdon): Button to delete individual messages.\n// TODO(burdon): Button to edit/re-run question.\nconst MessageThread = ({ state, result, history }: { state: State | null; result: string; history: Message[] }) => {\n return (\n <>\n {history.map((message, i) => (\n <div key={i} className='grid grid-cols-[2rem_1fr_2rem]'>\n <div className='p-1'>{message.type === 'response' && <RobotAvatar />}</div>\n <div className='overflow-auto'>\n <MessageItem message={message} />\n </div>\n </div>\n ))}\n {result?.length > 0 && (\n <div className='grid grid-cols-[2rem_1fr_2rem]'>\n <div className='p-1'>\n {(state === 'pending' && <Icon icon='ph--spinner--regular' size={6} classNames='animate-spin' />) || (\n <Icon icon='ph--robot--regular' size={6} classNames='animate-[pulse_1s_ease-in-out_infinite]' />\n )}\n </div>\n <div className='overflow-auto'>\n <MessageItem message={{ type: 'response', text: result }} />\n </div>\n </div>\n )}\n </>\n );\n};\n\nconst MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {\n const { type, text, data, error } = message;\n const wrapper = 'p-1 px-2 rounded-lg bg-hoverSurface overflow-auto';\n return (\n <div className={mx('flex', type === 'request' ? 'ml-[1rem] justify-end' : 'mr-[1rem]', classNames)}>\n {error && <div className={mx(wrapper, 'whitespace-pre text-error')}>{String(error)}</div>}\n\n {text !== undefined && (\n <div className={mx(wrapper, type === 'request' && 'bg-primary-400 dark:bg-primary-600')}>\n {text || '\\u00D8'}\n </div>\n )}\n\n {data && (\n <SyntaxHighlighter language='json' className={mx(wrapper, 'px-8 py-2 text-xs')}>\n {JSON.stringify(data, null, 2)}\n </SyntaxHighlighter>\n )}\n </div>\n );\n};\n\nconst RobotAvatar = () => (\n <Avatar.Root size={6} variant='circle'>\n <Avatar.Frame>\n <Avatar.Icon icon='ph--robot--regular' />\n </Avatar.Frame>\n </Avatar.Root>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAmD;AAEnD,iBAAoB;AACpB,sBAAmF;AACnF,yCAAkC;AAClC,4BAAmB;;AAeZ,IAAMA,aAAa,CAAC,EAAEC,YAAYC,YAAW,MAAmB;AACrE,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,mCAAAA;AAE7B,QAAMC,eAAWC,qBAAyB,IAAA;AAC1C,QAAM,CAACC,OAAOC,QAAAA,QAAYC,uBAAS,EAAA;AACnC,QAAM,CAACC,QAAQC,SAAAA,QAAaF,uBAAS,EAAA;AACrC,QAAM,CAACG,OAAOC,QAAAA,QAAYJ,uBAAuB,IAAA;AAGjD,QAAM,CAACK,SAASC,UAAAA,QAAcN,uBAAoB,CAAA,CAAE;AAEpD,QAAMO,kBAAcV,qBAAuB,IAAA;AAC3C,QAAMW,eAAe,MAAA;AACnB,QAAID,YAAYE,SAAS;AACvB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AAzB,QAAA,cAAC+B,uBAAOxB,MAAI;EAACc,MAAM;EAAGW,SAAQ;GAC5B,6BAAAhC,QAAA,cAAC+B,uBAAOE,OAAK,MACX,6BAAAjC,QAAA,cAAC+B,uBAAOZ,MAAI;EAACC,MAAK;;",
|
|
6
|
+
"names": ["DebugPanel", "classNames", "functionUrl", "t", "useTranslation", "SCRIPT_PLUGIN", "inputRef", "useRef", "input", "setInput", "useState", "result", "setResult", "state", "setState", "history", "setHistory", "scrollerRef", "handleScroll", "current", "scrollTop", "scrollHeight", "controller", "useEffect", "handleStop", "abort", "undefined", "handleClear", "focus", "handleResponse", "text", "data", "error", "type", "handleRequest", "charAt", "validJsonString", "replace", "JSON", "parse", "stringify", "err", "setTimeout", "AbortController", "response", "fetch", "signal", "method", "body", "headers", "ok", "Error", "statusText", "String", "status", "contentType", "get", "json", "reader", "getReader", "pump", "done", "value", "TextDecoder", "decode", "read", "then", "catch", "name", "log", "React", "div", "className", "mx", "ref", "MessageThread", "Toolbar", "Root", "Input", "TextInput", "autoFocus", "placeholder", "onChange", "ev", "target", "onKeyDown", "key", "Button", "onClick", "Icon", "icon", "size", "map", "message", "i", "RobotAvatar", "MessageItem", "length", "wrapper", "SyntaxHighlighter", "language", "Avatar", "variant", "Frame"]
|
|
7
|
+
}
|