@dxos/plugin-script 0.6.13 → 0.6.14-main.69511f5
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/README.md +1 -1
- package/dist/lib/browser/AutomationPanel-MDPZ5WAC.mjs +78 -0
- package/dist/lib/browser/AutomationPanel-MDPZ5WAC.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-B3CPWXRE.mjs +423 -0
- package/dist/lib/browser/ScriptContainer-B3CPWXRE.mjs.map +7 -0
- package/dist/lib/browser/chunk-G66MXS4T.mjs +248 -0
- package/dist/lib/browser/chunk-G66MXS4T.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHEZ5LUU.mjs → chunk-G6H56WFS.mjs} +51 -2
- package/dist/lib/browser/{chunk-RHEZ5LUU.mjs.map → chunk-G6H56WFS.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-DL5XQRQM.mjs → chunk-KHNN3F7J.mjs} +18 -6
- package/dist/lib/browser/chunk-KHNN3F7J.mjs.map +7 -0
- package/dist/lib/browser/{chunk-O4LWBX6A.mjs → chunk-KXVQPS4Y.mjs} +2 -2
- package/dist/lib/browser/{chunk-O4LWBX6A.mjs.map → chunk-KXVQPS4Y.mjs.map} +2 -2
- package/dist/lib/browser/chunk-SGQHRB4P.mjs +17 -0
- package/dist/lib/browser/chunk-SGQHRB4P.mjs.map +7 -0
- package/dist/lib/browser/edge/index.mjs +5 -1
- package/dist/lib/browser/index.mjs +91 -61
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node/AutomationPanel-SANUE5X4.cjs +100 -0
- package/dist/lib/node/AutomationPanel-SANUE5X4.cjs.map +7 -0
- package/dist/lib/node/ScriptContainer-BV7HMUY5.cjs +425 -0
- package/dist/lib/node/ScriptContainer-BV7HMUY5.cjs.map +7 -0
- package/dist/lib/node/{chunk-5RBVXKXT.cjs → chunk-25PQE7FL.cjs} +6 -6
- package/dist/lib/node/{chunk-5RBVXKXT.cjs.map → chunk-25PQE7FL.cjs.map} +2 -2
- package/dist/lib/node/{chunk-4GTXIELQ.cjs → chunk-ACLCRWDB.cjs} +44 -6
- package/dist/lib/node/chunk-ACLCRWDB.cjs.map +7 -0
- package/dist/lib/node/{TypescriptEditor-M3WWFIP2.cjs → chunk-EJC55SDD.cjs} +18 -8
- package/dist/lib/node/chunk-EJC55SDD.cjs.map +7 -0
- package/dist/lib/node/{chunk-PFH3ROEH.cjs → chunk-FY5KKL5N.cjs} +22 -8
- package/dist/lib/node/chunk-FY5KKL5N.cjs.map +7 -0
- package/dist/lib/node/chunk-JWKMTYYH.cjs +277 -0
- package/dist/lib/node/chunk-JWKMTYYH.cjs.map +7 -0
- package/dist/lib/node/edge/index.cjs +12 -8
- package/dist/lib/node/edge/index.cjs.map +2 -2
- package/dist/lib/node/index.cjs +107 -81
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +3 -3
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/AutomationPanel-H2IKE53E.mjs +79 -0
- package/dist/lib/node-esm/AutomationPanel-H2IKE53E.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-HSIOGVP3.mjs +424 -0
- package/dist/lib/node-esm/ScriptContainer-HSIOGVP3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3QHVR4VV.mjs +249 -0
- package/dist/lib/node-esm/chunk-3QHVR4VV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7EDYDVQH.mjs +47 -0
- package/dist/lib/node-esm/chunk-7EDYDVQH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GO7HYFM5.mjs +19 -0
- package/dist/lib/node-esm/chunk-GO7HYFM5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LDLNTVAK.mjs +280 -0
- package/dist/lib/node-esm/chunk-LDLNTVAK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QMTTZYLF.mjs +255 -0
- package/dist/lib/node-esm/chunk-QMTTZYLF.mjs.map +7 -0
- package/dist/lib/node-esm/edge/index.mjs +24 -0
- package/dist/lib/node-esm/index.mjs +322 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +10 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +13 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +17 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/index.d.ts +4 -0
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/{DebugPanel.d.ts → DebugPanel/DebugPanel.d.ts} +2 -1
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -0
- package/dist/types/src/components/DebugPanel/index.d.ts +2 -0
- package/dist/types/src/components/DebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/FrameContainer.d.ts +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/frame.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +1 -3
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts +3 -8
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptContainer.d.ts +5 -0
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/components/ScriptEditor.d.ts +4 -5
- package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts +6 -0
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts.map +1 -0
- package/dist/types/src/components/ScriptSettings/index.d.ts +2 -0
- package/dist/types/src/components/ScriptSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +23 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +14 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/{TypescriptEditor.d.ts → TypescriptEditor/TypescriptEditor.d.ts} +1 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -0
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +6 -0
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TypescriptEditor/index.d.ts +2 -0
- package/dist/types/src/components/TypescriptEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts +7 -0
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/templates/chat.d.ts +6 -0
- package/dist/types/src/templates/chat.d.ts.map +1 -0
- package/dist/types/src/templates/chess.d.ts +6 -0
- package/dist/types/src/templates/chess.d.ts.map +1 -0
- package/dist/types/src/templates/echo.d.ts +6 -0
- package/dist/types/src/templates/echo.d.ts.map +1 -0
- package/dist/types/src/templates/email.d.ts +6 -0
- package/dist/types/src/templates/email.d.ts.map +1 -0
- package/dist/types/src/templates/forex.d.ts +6 -0
- package/dist/types/src/templates/forex.d.ts.map +1 -0
- package/dist/types/src/templates.d.ts +8 -0
- package/dist/types/src/templates.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/script.d.ts +4 -4
- package/dist/types/src/types/types.d.ts +4 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +59 -64
- package/src/ScriptPlugin.tsx +39 -41
- package/src/bundler/bundler.test.ts +12 -2
- package/src/components/AutomationPanel/AutomationPanel.tsx +101 -0
- package/src/components/AutomationPanel/index.ts +9 -0
- package/src/components/{DebugPanel.tsx → DebugPanel/DebugPanel.tsx} +83 -78
- package/src/components/DebugPanel/index.ts +5 -0
- package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/FrameContainer.tsx +1 -1
- package/src/components/ScriptBlock/ScriptBlock.stories.tsx +15 -14
- package/src/components/ScriptBlock/ScriptBlock.tsx +23 -51
- package/src/components/ScriptContainer.tsx +22 -0
- package/src/components/ScriptEditor.tsx +58 -55
- package/src/components/ScriptSettings/ScriptSettings.tsx +47 -0
- package/src/components/ScriptSettings/index.ts +5 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +30 -0
- package/src/components/Toolbar/Toolbar.tsx +177 -0
- package/src/components/{ScriptBlock/Splitter → Toolbar}/index.ts +1 -1
- package/src/components/{TypescriptEditor.stories.tsx → TypescriptEditor/TypescriptEditor.stories.tsx} +17 -35
- package/src/components/{TypescriptEditor.tsx → TypescriptEditor/TypescriptEditor.tsx} +1 -3
- package/src/components/TypescriptEditor/index.ts +5 -0
- package/src/components/index.ts +5 -3
- package/src/edge/functions.ts +19 -0
- package/src/meta.ts +15 -0
- package/src/templates/chat.ts +102 -0
- package/src/templates/chess.ts +41 -0
- package/src/templates/echo.ts +15 -0
- package/src/templates/email.ts +38 -0
- package/src/templates/forex.ts +21 -0
- package/src/templates.ts +54 -0
- package/src/translations.ts +2 -0
- package/src/types/types.ts +9 -5
- package/dist/lib/browser/ScriptEditor-5Y3EROG3.mjs +0 -513
- package/dist/lib/browser/ScriptEditor-5Y3EROG3.mjs.map +0 -7
- package/dist/lib/browser/TypescriptEditor-GPE72Y6I.mjs +0 -9
- package/dist/lib/browser/chunk-DL5XQRQM.mjs.map +0 -7
- package/dist/lib/browser/chunk-JBACGDOJ.mjs +0 -21
- package/dist/lib/browser/chunk-JBACGDOJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-MRGOT5RF.mjs +0 -78
- package/dist/lib/browser/chunk-MRGOT5RF.mjs.map +0 -7
- package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs +0 -526
- package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs.map +0 -7
- package/dist/lib/node/TypescriptEditor-M3WWFIP2.cjs.map +0 -7
- package/dist/lib/node/chunk-4GTXIELQ.cjs.map +0 -7
- package/dist/lib/node/chunk-4VMNBXWU.cjs +0 -54
- package/dist/lib/node/chunk-4VMNBXWU.cjs.map +0 -7
- package/dist/lib/node/chunk-IMLDKD5Y.cjs +0 -111
- package/dist/lib/node/chunk-IMLDKD5Y.cjs.map +0 -7
- package/dist/lib/node/chunk-PFH3ROEH.cjs.map +0 -7
- package/dist/types/src/components/DebugPanel.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/frame.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts +0 -15
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts +0 -13
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts +0 -2
- package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar.d.ts +0 -13
- package/dist/types/src/components/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar.stories.d.ts +0 -14
- package/dist/types/src/components/Toolbar.stories.d.ts.map +0 -1
- package/dist/types/src/components/TypescriptEditor.d.ts.map +0 -1
- package/dist/types/src/components/TypescriptEditor.stories.d.ts +0 -10
- package/dist/types/src/components/TypescriptEditor.stories.d.ts.map +0 -1
- package/src/components/ScriptBlock/Splitter/Splitter.stories.tsx +0 -37
- package/src/components/ScriptBlock/Splitter/Splitter.tsx +0 -52
- package/src/components/Toolbar.stories.tsx +0 -17
- package/src/components/Toolbar.tsx +0 -147
- package/src/meta.tsx +0 -19
- /package/dist/lib/{browser/TypescriptEditor-GPE72Y6I.mjs.map → node-esm/edge/index.mjs.map} +0 -0
- /package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.d.ts +0 -0
- /package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/index.d.ts +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.html +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.tsx +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/index.ts +0 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
Bundler,
|
|
4
|
+
initializeBundler,
|
|
5
|
+
templates
|
|
6
|
+
} from "./chunk-LDLNTVAK.mjs";
|
|
7
|
+
import {
|
|
8
|
+
FunctionType,
|
|
9
|
+
ScriptAction,
|
|
10
|
+
ScriptType
|
|
11
|
+
} from "./chunk-7EDYDVQH.mjs";
|
|
12
|
+
import {
|
|
13
|
+
SCRIPT_PLUGIN,
|
|
14
|
+
meta_default
|
|
15
|
+
} from "./chunk-GO7HYFM5.mjs";
|
|
16
|
+
|
|
17
|
+
// packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx
|
|
18
|
+
import wasmUrl from "esbuild-wasm/esbuild.wasm?url";
|
|
19
|
+
import React2 from "react";
|
|
20
|
+
import { NavigationAction, parseIntentPlugin, resolvePlugin } from "@dxos/app-framework";
|
|
21
|
+
import { create } from "@dxos/echo-schema";
|
|
22
|
+
import { parseClientPlugin } from "@dxos/plugin-client";
|
|
23
|
+
import { createExtension, isActionGroup } from "@dxos/plugin-graph";
|
|
24
|
+
import { TextType } from "@dxos/plugin-markdown/types";
|
|
25
|
+
import { SpaceAction } from "@dxos/plugin-space";
|
|
26
|
+
import { loadObjectReferences } from "@dxos/react-client/echo";
|
|
27
|
+
|
|
28
|
+
// packages/plugins/experimental/plugin-script/src/compiler/compiler.ts
|
|
29
|
+
import { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
|
|
30
|
+
import ts from "typescript";
|
|
31
|
+
import { invariant } from "@dxos/invariant";
|
|
32
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
|
|
33
|
+
var defaultOptions = {
|
|
34
|
+
lib: [
|
|
35
|
+
"DOM",
|
|
36
|
+
"es2022"
|
|
37
|
+
],
|
|
38
|
+
target: ts.ScriptTarget.ES2022
|
|
39
|
+
};
|
|
40
|
+
var Compiler = class {
|
|
41
|
+
constructor(_options = defaultOptions) {
|
|
42
|
+
this._options = _options;
|
|
43
|
+
}
|
|
44
|
+
async initialize() {
|
|
45
|
+
if (this._env) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this._fsMap = await createDefaultMapFromCDN(this._options, "5.5.4", true, ts);
|
|
49
|
+
const system = createSystem(this._fsMap);
|
|
50
|
+
this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);
|
|
51
|
+
}
|
|
52
|
+
get environment() {
|
|
53
|
+
invariant(this._env, "Compiler environment not initialized.", {
|
|
54
|
+
F: __dxlog_file,
|
|
55
|
+
L: 39,
|
|
56
|
+
S: this,
|
|
57
|
+
A: [
|
|
58
|
+
"this._env",
|
|
59
|
+
"'Compiler environment not initialized.'"
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
return this._env;
|
|
63
|
+
}
|
|
64
|
+
setFile(fileName, content) {
|
|
65
|
+
invariant(this._fsMap, "File system map not initialized.", {
|
|
66
|
+
F: __dxlog_file,
|
|
67
|
+
L: 44,
|
|
68
|
+
S: this,
|
|
69
|
+
A: [
|
|
70
|
+
"this._fsMap",
|
|
71
|
+
"'File system map not initialized.'"
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
this.environment.createFile(fileName, content);
|
|
75
|
+
}
|
|
76
|
+
compile(fileName) {
|
|
77
|
+
return this.environment.languageService.getEmitOutput(fileName);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// packages/plugins/experimental/plugin-script/src/components/index.ts
|
|
82
|
+
import { lazy } from "react";
|
|
83
|
+
|
|
84
|
+
// packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx
|
|
85
|
+
import React from "react";
|
|
86
|
+
import { useClient } from "@dxos/react-client";
|
|
87
|
+
import { Button, useTranslation } from "@dxos/react-ui";
|
|
88
|
+
import { FormInput } from "@dxos/react-ui-data";
|
|
89
|
+
var ScriptSettings = ({ settings }) => {
|
|
90
|
+
const { t } = useTranslation(SCRIPT_PLUGIN);
|
|
91
|
+
const client = useClient();
|
|
92
|
+
const handleAuthenticate = async () => {
|
|
93
|
+
const { identityKey } = client.halo.identity.get();
|
|
94
|
+
await client.halo.writeCredentials([
|
|
95
|
+
{
|
|
96
|
+
issuer: identityKey,
|
|
97
|
+
issuanceDate: /* @__PURE__ */ new Date(),
|
|
98
|
+
subject: {
|
|
99
|
+
id: identityKey,
|
|
100
|
+
assertion: {
|
|
101
|
+
"@type": "dxos.halo.credentials.ServiceAccess",
|
|
102
|
+
serverName: "hub.dxos.network",
|
|
103
|
+
serverKey: identityKey,
|
|
104
|
+
identityKey,
|
|
105
|
+
capabilities: [
|
|
106
|
+
"composer:beta"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]);
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormInput, {
|
|
114
|
+
label: t("authenticate action label")
|
|
115
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
116
|
+
onClick: handleAuthenticate
|
|
117
|
+
}, t("authenticate button label"))));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// packages/plugins/experimental/plugin-script/src/components/index.ts
|
|
121
|
+
var AutomationPanel = lazy(() => import("./AutomationPanel-H2IKE53E.mjs"));
|
|
122
|
+
var ScriptContainer = lazy(() => import("./ScriptContainer-HSIOGVP3.mjs"));
|
|
123
|
+
|
|
124
|
+
// packages/plugins/experimental/plugin-script/src/translations.ts
|
|
125
|
+
var translations_default = [
|
|
126
|
+
{
|
|
127
|
+
"en-US": {
|
|
128
|
+
[SCRIPT_PLUGIN]: {
|
|
129
|
+
"plugin name": "Scripts",
|
|
130
|
+
"object title placeholder": "New script",
|
|
131
|
+
"create object label": "Create script",
|
|
132
|
+
"create stack section label": "Create script",
|
|
133
|
+
"binding placeholder": "Function name",
|
|
134
|
+
"function request placeholder": "Function request",
|
|
135
|
+
"deploy label": "Deploy",
|
|
136
|
+
"deployed label": "Current version of the script is deployed",
|
|
137
|
+
"upload failed label": "Upload failed",
|
|
138
|
+
"copy link label": "Copy function link",
|
|
139
|
+
"format label": "Format",
|
|
140
|
+
"toggle details label": "Toggle details panel",
|
|
141
|
+
"authenticate action label": "Authenticate functions service",
|
|
142
|
+
"authenticate button label": "Authenticate"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
// packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx
|
|
149
|
+
var ScriptPlugin = () => {
|
|
150
|
+
const compiler = new Compiler();
|
|
151
|
+
return {
|
|
152
|
+
meta: meta_default,
|
|
153
|
+
initialize: async () => {
|
|
154
|
+
await compiler.initialize();
|
|
155
|
+
compiler.setFile("/src/typings.d.ts", "declare module 'https://*';");
|
|
156
|
+
compiler.setFile("/src/runtime.ts", `
|
|
157
|
+
export const Filter: any = {};
|
|
158
|
+
export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
|
|
159
|
+
export const functionHandler = (handler: FunctionHandler) => handler;
|
|
160
|
+
`);
|
|
161
|
+
await initializeBundler({
|
|
162
|
+
wasmUrl
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
provides: {
|
|
166
|
+
settings: {},
|
|
167
|
+
metadata: {
|
|
168
|
+
records: {
|
|
169
|
+
[ScriptType.typename]: {
|
|
170
|
+
placeholder: [
|
|
171
|
+
"object title placeholder",
|
|
172
|
+
{
|
|
173
|
+
ns: SCRIPT_PLUGIN
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
icon: "ph--code--regular",
|
|
177
|
+
// TODO(wittjosiah): Move out of metadata.
|
|
178
|
+
loadReferences: (script) => loadObjectReferences(script, (script2) => [
|
|
179
|
+
script2.source
|
|
180
|
+
])
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
translations: translations_default,
|
|
185
|
+
echo: {
|
|
186
|
+
schema: [
|
|
187
|
+
ScriptType,
|
|
188
|
+
FunctionType
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
space: {
|
|
192
|
+
onSpaceCreate: {
|
|
193
|
+
label: [
|
|
194
|
+
"create object label",
|
|
195
|
+
{
|
|
196
|
+
ns: SCRIPT_PLUGIN
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
action: ScriptAction.CREATE
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
graph: {
|
|
203
|
+
builder: (plugins) => {
|
|
204
|
+
const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;
|
|
205
|
+
const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;
|
|
206
|
+
if (!client || !dispatch) {
|
|
207
|
+
return [];
|
|
208
|
+
}
|
|
209
|
+
return createExtension({
|
|
210
|
+
id: ScriptAction.CREATE,
|
|
211
|
+
filter: (node) => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),
|
|
212
|
+
actions: ({ node }) => {
|
|
213
|
+
const id = node.id.split("/").at(-1);
|
|
214
|
+
const [spaceId, objectId] = id?.split(":") ?? [];
|
|
215
|
+
const space = client.spaces.get().find((space2) => space2.id === spaceId);
|
|
216
|
+
const object = objectId && space?.db.getObjectById(objectId);
|
|
217
|
+
const target = objectId ? object : space;
|
|
218
|
+
if (!target) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
return [
|
|
222
|
+
{
|
|
223
|
+
id: `${SCRIPT_PLUGIN}/create/${node.id}`,
|
|
224
|
+
data: async () => {
|
|
225
|
+
await dispatch([
|
|
226
|
+
{
|
|
227
|
+
plugin: SCRIPT_PLUGIN,
|
|
228
|
+
action: ScriptAction.CREATE
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
action: SpaceAction.ADD_OBJECT,
|
|
232
|
+
data: {
|
|
233
|
+
target
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
action: NavigationAction.OPEN
|
|
238
|
+
}
|
|
239
|
+
]);
|
|
240
|
+
},
|
|
241
|
+
properties: {
|
|
242
|
+
label: [
|
|
243
|
+
"create object label",
|
|
244
|
+
{
|
|
245
|
+
ns: SCRIPT_PLUGIN
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
icon: "ph--code--regular",
|
|
249
|
+
testId: "scriptPlugin.createObject"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
];
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
surface: {
|
|
258
|
+
component: ({ data, role }) => {
|
|
259
|
+
switch (role) {
|
|
260
|
+
case "settings": {
|
|
261
|
+
return data.plugin === meta_default.id ? /* @__PURE__ */ React2.createElement(ScriptSettings, {
|
|
262
|
+
settings: {}
|
|
263
|
+
}) : null;
|
|
264
|
+
}
|
|
265
|
+
case "article": {
|
|
266
|
+
if (data.object instanceof ScriptType) {
|
|
267
|
+
return /* @__PURE__ */ React2.createElement(ScriptContainer, {
|
|
268
|
+
script: data.object,
|
|
269
|
+
env: compiler.environment
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
case "complementary--automation": {
|
|
275
|
+
if (data.object instanceof ScriptType) {
|
|
276
|
+
return {
|
|
277
|
+
node: /* @__PURE__ */ React2.createElement(AutomationPanel, {
|
|
278
|
+
subject: data.subject
|
|
279
|
+
}),
|
|
280
|
+
disposition: "hoist"
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
intent: {
|
|
289
|
+
resolver: (intent) => {
|
|
290
|
+
switch (intent.action) {
|
|
291
|
+
case ScriptAction.CREATE: {
|
|
292
|
+
return {
|
|
293
|
+
data: create(ScriptType, {
|
|
294
|
+
source: create(TextType, {
|
|
295
|
+
content: templates[0].source
|
|
296
|
+
})
|
|
297
|
+
})
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
// packages/plugins/experimental/plugin-script/src/index.ts
|
|
308
|
+
var src_default = ScriptPlugin;
|
|
309
|
+
export {
|
|
310
|
+
AutomationPanel,
|
|
311
|
+
Bundler,
|
|
312
|
+
Compiler,
|
|
313
|
+
FunctionType,
|
|
314
|
+
ScriptAction,
|
|
315
|
+
ScriptContainer,
|
|
316
|
+
ScriptPlugin,
|
|
317
|
+
ScriptSettings,
|
|
318
|
+
ScriptType,
|
|
319
|
+
src_default as default,
|
|
320
|
+
initializeBundler
|
|
321
|
+
};
|
|
322
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/ScriptPlugin.tsx", "../../../src/compiler/compiler.ts", "../../../src/components/index.ts", "../../../src/components/ScriptSettings/ScriptSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\n// @ts-ignore\nimport wasmUrl from 'esbuild-wasm/esbuild.wasm?url';\nimport React from 'react';\n\nimport { NavigationAction, parseIntentPlugin, type PluginDefinition, resolvePlugin } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup } from '@dxos/plugin-graph';\nimport { TextType } from '@dxos/plugin-markdown/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { initializeBundler } from './bundler';\nimport { Compiler } from './compiler';\nimport { AutomationPanel, ScriptContainer, ScriptSettings } from './components';\nimport meta, { SCRIPT_PLUGIN } from './meta';\nimport { templates } from './templates';\nimport translations from './translations';\nimport { FunctionType, ScriptAction, type ScriptPluginProvides, ScriptType } from './types';\n\nexport const ScriptPlugin = (): PluginDefinition<ScriptPluginProvides> => {\n const compiler = new Compiler();\n\n return {\n meta,\n initialize: async () => {\n await compiler.initialize();\n // TODO(wittjosiah): Fetch types for https modules.\n compiler.setFile('/src/typings.d.ts', \"declare module 'https://*';\");\n // TODO(wittjosiah): Proper function handler types.\n // TODO(wittjosiah): Remove.\n compiler.setFile(\n '/src/runtime.ts',\n `\n export const Filter: any = {};\n export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;\n export const functionHandler = (handler: FunctionHandler) => handler;\n `,\n );\n await initializeBundler({ wasmUrl });\n },\n provides: {\n settings: {},\n metadata: {\n records: {\n [ScriptType.typename]: {\n placeholder: ['object title placeholder', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--code--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (script: ScriptType) => loadObjectReferences(script, (script) => [script.source]),\n },\n },\n },\n translations,\n echo: {\n schema: [ScriptType, FunctionType],\n },\n space: {\n onSpaceCreate: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n action: ScriptAction.CREATE,\n },\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: ScriptAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SCRIPT_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--code--regular',\n testId: 'scriptPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'settings': {\n return data.plugin === meta.id ? <ScriptSettings settings={{}} /> : null;\n }\n\n case 'article': {\n if (data.object instanceof ScriptType) {\n return <ScriptContainer script={data.object} env={compiler.environment} />;\n }\n break;\n }\n\n case 'complementary--automation': {\n if (data.object instanceof ScriptType) {\n return {\n node: <AutomationPanel subject={data.subject as any} />,\n disposition: 'hoist',\n };\n }\n }\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case ScriptAction.CREATE: {\n return {\n data: create(ScriptType, {\n source: create(TextType, {\n content: templates[0].source,\n }),\n }),\n };\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n createDefaultMapFromCDN,\n createSystem,\n createVirtualTypeScriptEnvironment,\n type VirtualTypeScriptEnvironment,\n} from '@typescript/vfs';\nimport ts from 'typescript';\n\nimport { invariant } from '@dxos/invariant';\n\nconst defaultOptions: ts.CompilerOptions = {\n lib: ['DOM', 'es2022'],\n target: ts.ScriptTarget.ES2022,\n};\n\nexport class Compiler {\n private _env: VirtualTypeScriptEnvironment | undefined;\n private _fsMap: Map<string, string> | undefined;\n\n constructor(private readonly _options: ts.CompilerOptions = defaultOptions) {}\n\n async initialize() {\n if (this._env) {\n return;\n }\n\n // TODO(wittjosiah): Figure out how to get workers working in plugin packages.\n // https://github.com/val-town/codemirror-ts?tab=readme-ov-file#setup-worker\n this._fsMap = await createDefaultMapFromCDN(this._options, '5.5.4', true, ts);\n const system = createSystem(this._fsMap);\n this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);\n }\n\n get environment() {\n invariant(this._env, 'Compiler environment not initialized.');\n return this._env;\n }\n\n setFile(fileName: string, content: string) {\n invariant(this._fsMap, 'File system map not initialized.');\n this.environment.createFile(fileName, content);\n }\n\n compile(fileName: string) {\n return this.environment.languageService.getEmitOutput(fileName);\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './ScriptSettings';\n\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const ScriptContainer = lazy(() => import('./ScriptContainer'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\nimport { useClient } from '@dxos/react-client';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { FormInput } from '@dxos/react-ui-data';\n\nimport { SCRIPT_PLUGIN } from '../../meta';\nimport { type ScriptSettingsProps } from '../../types';\n\nexport const ScriptSettings = ({ settings }: { settings: ScriptSettingsProps }) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n const client = useClient();\n\n // TODO(burdon): Check token.\n const handleAuthenticate = async () => {\n const { identityKey } = client.halo.identity.get()!;\n await client.halo.writeCredentials([\n {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n serverName: 'hub.dxos.network',\n serverKey: identityKey,\n identityKey,\n capabilities: ['composer:beta'],\n },\n },\n } satisfies Credential,\n ]);\n };\n\n return (\n <>\n <FormInput label={t('authenticate action label')}>\n <Button onClick={handleAuthenticate}>{t('authenticate button label')}</Button>\n </FormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SCRIPT_PLUGIN]: {\n 'plugin name': 'Scripts',\n 'object title placeholder': 'New script',\n 'create object label': 'Create script',\n 'create stack section label': 'Create script',\n 'binding placeholder': 'Function name',\n 'function request placeholder': 'Function request',\n 'deploy label': 'Deploy',\n 'deployed label': 'Current version of the script is deployed',\n 'upload failed label': 'Upload failed',\n 'copy link label': 'Copy function link',\n 'format label': 'Format',\n 'toggle details label': 'Toggle details panel',\n 'authenticate action label': 'Authenticate functions service',\n 'authenticate button label': 'Authenticate',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPlugin } from './ScriptPlugin';\n\nexport default ScriptPlugin;\n\nexport * from './bundler';\nexport * from './compiler';\nexport * from './components';\nexport * from './types';\n\nexport * from './ScriptPlugin';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["wasmUrl", "React", "NavigationAction", "parseIntentPlugin", "resolvePlugin", "create", "parseClientPlugin", "createExtension", "isActionGroup", "TextType", "SpaceAction", "loadObjectReferences", "createDefaultMapFromCDN", "createSystem", "createVirtualTypeScriptEnvironment", "ts", "invariant", "defaultOptions", "lib", "target", "ScriptTarget", "ES2022", "Compiler", "constructor", "_options", "initialize", "_env", "_fsMap", "system", "environment", "setFile", "fileName", "content", "createFile", "compile", "languageService", "getEmitOutput", "lazy", "React", "useClient", "Button", "useTranslation", "FormInput", "ScriptSettings", "settings", "t", "useTranslation", "SCRIPT_PLUGIN", "client", "useClient", "handleAuthenticate", "identityKey", "halo", "identity", "get", "writeCredentials", "issuer", "issuanceDate", "Date", "subject", "id", "assertion", "serverName", "serverKey", "capabilities", "FormInput", "label", "Button", "onClick", "AutomationPanel", "lazy", "ScriptContainer", "SCRIPT_PLUGIN", "ScriptPlugin", "compiler", "Compiler", "meta", "initialize", "setFile", "initializeBundler", "wasmUrl", "provides", "settings", "metadata", "records", "ScriptType", "typename", "placeholder", "ns", "SCRIPT_PLUGIN", "icon", "loadReferences", "script", "loadObjectReferences", "source", "translations", "echo", "schema", "FunctionType", "space", "onSpaceCreate", "label", "action", "ScriptAction", "CREATE", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "dispatch", "parseIntentPlugin", "intent", "createExtension", "id", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "spaces", "get", "find", "object", "db", "getObjectById", "target", "data", "plugin", "NavigationAction", "OPEN", "properties", "testId", "surface", "component", "role", "React", "ScriptSettings", "ScriptContainer", "env", "environment", "AutomationPanel", "subject", "disposition", "resolver", "create", "TextType", "content", "templates", "ScriptPlugin"]
|
|
7
|
+
}
|
|
@@ -0,0 +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":17354,"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":28987,"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":1304,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5029,"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-data","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/script.ts":{"bytes":3930,"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/script.ts","kind":"import-statement","original":"./script"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":30520,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":11439,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../../edge"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"../DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytes":858,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8497,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":25000,"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":1190,"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/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":2998,"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":21356,"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/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-QMTTZYLF.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":596},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16364},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.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-data","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-H2IKE53E.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-HSIOGVP3.mjs","kind":"dynamic-import"}],"exports":["AutomationPanel","Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5396},"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":1159},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":804},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":10161},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.ts","inputs":{},"bytes":253},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":302},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-H2IKE53E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6345},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-H2IKE53E.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-3QHVR4VV.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-QMTTZYLF.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.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":3382},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-HSIOGVP3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26628},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-HSIOGVP3.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-3QHVR4VV.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-QMTTZYLF.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.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":6131},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4490},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1915},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":14315},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21091},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.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":6790},"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":13556},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-3QHVR4VV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15439},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-3QHVR4VV.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.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":8290},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":8597},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-QMTTZYLF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16337},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-QMTTZYLF.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":7533},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2817},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7EDYDVQH.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.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/script.ts":{"bytesInOutput":875},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1427},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":619},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-GO7HYFM5.mjs":{"imports":[],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytesInOutput":213}},"bytes":454}}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
SCRIPT_PLUGIN,
|
|
4
|
+
meta_default
|
|
5
|
+
} from "./chunk-GO7HYFM5.mjs";
|
|
6
|
+
export {
|
|
7
|
+
SCRIPT_PLUGIN,
|
|
8
|
+
meta_default as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
FunctionType,
|
|
4
|
+
ScriptAction,
|
|
5
|
+
ScriptType
|
|
6
|
+
} from "../chunk-7EDYDVQH.mjs";
|
|
7
|
+
import "../chunk-GO7HYFM5.mjs";
|
|
8
|
+
export {
|
|
9
|
+
FunctionType,
|
|
10
|
+
ScriptAction,
|
|
11
|
+
ScriptType
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScriptPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptPlugin.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAuC,KAAK,gBAAgB,EAAiB,MAAM,qBAAqB,CAAC;AAchH,OAAO,EAA8B,KAAK,oBAAoB,EAAc,MAAM,SAAS,CAAC;AAE5F,eAAO,MAAM,YAAY,QAAO,gBAAgB,CAAC,oBAAoB,CAiIpE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type EchoReactiveObject } from '@dxos/client/echo';
|
|
3
|
+
import { FunctionType } from '../../types';
|
|
4
|
+
export interface AutomationPanelProps {
|
|
5
|
+
subject: EchoReactiveObject<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const AutomationPanel: ({ subject }: AutomationPanelProps) => React.JSX.Element;
|
|
8
|
+
export interface ChatPanelProps {
|
|
9
|
+
fn: FunctionType;
|
|
10
|
+
subject: EchoReactiveObject<any>;
|
|
11
|
+
}
|
|
12
|
+
export interface BindingSelectProps {
|
|
13
|
+
selectedFunction: FunctionType | null;
|
|
14
|
+
setSelectedFunction: (fn: FunctionType) => void;
|
|
15
|
+
functions: FunctionType[];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=AutomationPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/AutomationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAO5D,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAGvD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,gBAAiB,oBAAoB,sBA0BhE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,YAAY,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAoBD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,mBAAmB,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,cAAc,mBAAmB,CAAC;AAElC,eAAe,eAAe,CAAC"}
|
|
@@ -4,6 +4,7 @@ export type DebugPanelProps = ThemedClassName<{
|
|
|
4
4
|
functionUrl?: string;
|
|
5
5
|
binding?: string;
|
|
6
6
|
onBindingChange?: (binding: string) => void;
|
|
7
|
+
showBindingConfig?: boolean;
|
|
7
8
|
}>;
|
|
8
|
-
export declare const DebugPanel: ({ classNames, functionUrl, binding: _binding, onBindingChange }: DebugPanelProps) => React.JSX.Element;
|
|
9
|
+
export declare const DebugPanel: ({ classNames, functionUrl, binding: _binding, onBindingChange, showBindingConfig, }: DebugPanelProps) => React.JSX.Element;
|
|
9
10
|
//# sourceMappingURL=DebugPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/DebugPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAuB,KAAK,eAAe,EAA+C,MAAM,gBAAgB,CAAC;AAaxH,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,wFAMpB,eAAe,sBAoLjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/FrameContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,oCAA4C,mBAAmB,sBAyDzF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/frame.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type View } from './Splitter';
|
|
3
2
|
import { type ScriptType } from '../../types';
|
|
4
3
|
export type ScriptBlockProps = {
|
|
5
4
|
script: ScriptType;
|
|
6
|
-
view?: View;
|
|
7
5
|
hideSelector?: boolean;
|
|
8
6
|
classes?: {
|
|
9
7
|
root?: string;
|
|
@@ -14,5 +12,5 @@ export type ScriptBlockProps = {
|
|
|
14
12
|
/**
|
|
15
13
|
* @deprecated
|
|
16
14
|
*/
|
|
17
|
-
export declare const ScriptBlock: ({ script,
|
|
15
|
+
export declare const ScriptBlock: ({ script, hideSelector, classes, containerUrl }: ScriptBlockProps) => React.JSX.Element;
|
|
18
16
|
//# sourceMappingURL=ScriptBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScriptBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAGF,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,WAAW,oDAAqD,gBAAgB,sBA+D5F,CAAC"}
|