@dxos/plugin-script 0.7.5-main.b19bfc8 → 0.7.5-main.d9d2d4e
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/ScriptContainer-3RFMYKTV.mjs +258 -0
- package/dist/lib/browser/ScriptContainer-3RFMYKTV.mjs.map +7 -0
- package/dist/lib/browser/{artifact-definition-NAWYXFF5.mjs → artifact-definition-4LWPD3DH.mjs} +22 -14
- package/dist/lib/browser/artifact-definition-4LWPD3DH.mjs.map +7 -0
- package/dist/lib/browser/{ScriptContainer-U3BFT76B.mjs → chunk-G2FYNDU4.mjs} +15 -253
- package/dist/lib/browser/chunk-G2FYNDU4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HJNS3BBK.mjs → chunk-VTWBVFBK.mjs} +2 -4
- package/dist/lib/browser/{chunk-HJNS3BBK.mjs.map → chunk-VTWBVFBK.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +31 -15
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-DIXYM2HA.mjs → react-surface-G4C2PZ2K.mjs} +23 -7
- package/dist/lib/browser/react-surface-G4C2PZ2K.mjs.map +7 -0
- package/dist/lib/node/ScriptContainer-G6FZU4AM.cjs +274 -0
- package/dist/lib/node/ScriptContainer-G6FZU4AM.cjs.map +7 -0
- package/dist/lib/node/{artifact-definition-7AANUS3X.cjs → artifact-definition-BXQCFPAH.cjs} +22 -17
- package/dist/lib/node/artifact-definition-BXQCFPAH.cjs.map +7 -0
- package/dist/lib/node/{chunk-2UNNYU2C.cjs → chunk-TOXBGIEI.cjs} +5 -8
- package/dist/lib/node/{chunk-2UNNYU2C.cjs.map → chunk-TOXBGIEI.cjs.map} +3 -3
- package/dist/lib/node/{ScriptContainer-PSLB34RX.cjs → chunk-XKYJYY3T.cjs} +56 -277
- package/dist/lib/node/chunk-XKYJYY3T.cjs.map +7 -0
- package/dist/lib/node/index.cjs +31 -16
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-JOMWTFI2.cjs → react-surface-EGSE3FMN.cjs} +24 -12
- package/dist/lib/node/react-surface-EGSE3FMN.cjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-7FTCFIF3.mjs +259 -0
- package/dist/lib/node-esm/ScriptContainer-7FTCFIF3.mjs.map +7 -0
- package/dist/lib/node-esm/{artifact-definition-KBASPVMM.mjs → artifact-definition-KT4DK2LQ.mjs} +21 -14
- package/dist/lib/node-esm/artifact-definition-KT4DK2LQ.mjs.map +7 -0
- package/dist/lib/node-esm/{ScriptContainer-E4J6XXE6.mjs → chunk-NRICF4KE.mjs} +15 -253
- package/dist/lib/node-esm/chunk-NRICF4KE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4OCRARHP.mjs → chunk-S64WSJQK.mjs} +2 -4
- package/dist/lib/node-esm/{chunk-4OCRARHP.mjs.map → chunk-S64WSJQK.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +31 -15
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-OLH7N3DK.mjs → react-surface-7YSGHZQM.mjs} +23 -7
- package/dist/lib/node-esm/react-surface-7YSGHZQM.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/view.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +42 -41
- package/src/ScriptPlugin.tsx +16 -7
- package/src/capabilities/artifact-definition.ts +14 -9
- package/src/capabilities/react-surface.tsx +9 -3
- package/src/components/index.ts +1 -1
- package/src/hooks/view.ts +4 -1
- package/src/translations.ts +3 -0
- package/dist/lib/browser/AutomationPanel-6HFRNRWV.mjs +0 -78
- package/dist/lib/browser/AutomationPanel-6HFRNRWV.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-U3BFT76B.mjs.map +0 -7
- package/dist/lib/browser/artifact-definition-NAWYXFF5.mjs.map +0 -7
- package/dist/lib/browser/react-surface-DIXYM2HA.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-RBQ4DODN.cjs +0 -104
- package/dist/lib/node/AutomationPanel-RBQ4DODN.cjs.map +0 -7
- package/dist/lib/node/ScriptContainer-PSLB34RX.cjs.map +0 -7
- package/dist/lib/node/artifact-definition-7AANUS3X.cjs.map +0 -7
- package/dist/lib/node/react-surface-JOMWTFI2.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-WTVVVMRH.mjs +0 -79
- package/dist/lib/node-esm/AutomationPanel-WTVVVMRH.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-E4J6XXE6.mjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-KBASPVMM.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-OLH7N3DK.mjs.map +0 -7
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +0 -16
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +0 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts +0 -4
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +0 -1
- package/src/components/AutomationPanel/AutomationPanel.tsx +0 -104
- package/src/components/AutomationPanel/index.ts +0 -9
|
@@ -26,64 +26,45 @@ 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(
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
var chunk_XKYJYY3T_exports = {};
|
|
30
|
+
__export(chunk_XKYJYY3T_exports, {
|
|
31
|
+
createDeploy: () => createDeploy,
|
|
32
|
+
createFormat: () => createFormat,
|
|
33
|
+
createTemplateSelect: () => createTemplateSelect,
|
|
34
|
+
createView: () => createView,
|
|
35
|
+
useDeployState: () => useDeployState,
|
|
36
|
+
useToolbarAction: () => useToolbarAction,
|
|
37
|
+
useToolbarState: () => useToolbarState
|
|
33
38
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
39
|
+
module.exports = __toCommonJS(chunk_XKYJYY3T_exports);
|
|
35
40
|
var import_chunk_ITAJ3WRW = require("./chunk-ITAJ3WRW.cjs");
|
|
36
|
-
var import_chunk_K3ZZWVXS = require("./chunk-K3ZZWVXS.cjs");
|
|
37
41
|
var import_chunk_5UH3F7TA = require("./chunk-5UH3F7TA.cjs");
|
|
38
|
-
var import_react =
|
|
39
|
-
var import_echo = require("@dxos/react-client/echo");
|
|
40
|
-
var import_halo = require("@dxos/react-client/halo");
|
|
41
|
-
var import_react_ui_editor = require("@dxos/react-ui-editor");
|
|
42
|
-
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
43
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
44
|
-
var import_react2 = __toESM(require("react"));
|
|
45
|
-
var import_echo2 = require("@dxos/react-client/echo");
|
|
46
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
47
|
-
var import_react_ui_editor2 = require("@dxos/react-ui-editor");
|
|
48
|
-
var import_react_ui_menu = require("@dxos/react-ui-menu");
|
|
49
|
-
var import_react3 = require("react");
|
|
42
|
+
var import_react = require("react");
|
|
50
43
|
var import_functions = require("@dxos/functions");
|
|
51
44
|
var import_bundler = require("@dxos/functions/bundler");
|
|
52
45
|
var import_log = require("@dxos/log");
|
|
53
46
|
var import_react_client = require("@dxos/react-client");
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
47
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
48
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
49
|
+
var import_react_ui_menu = require("@dxos/react-ui-menu");
|
|
50
|
+
var import_react2 = require("react");
|
|
51
|
+
var import_live_object = require("@dxos/live-object");
|
|
57
52
|
var import_prettier = require("prettier");
|
|
58
53
|
var import_estree = __toESM(require("prettier/plugins/estree"));
|
|
59
54
|
var import_typescript = __toESM(require("prettier/plugins/typescript"));
|
|
60
|
-
var
|
|
55
|
+
var import_react3 = require("react");
|
|
61
56
|
var import_log2 = require("@dxos/log");
|
|
62
|
-
var
|
|
63
|
-
var
|
|
57
|
+
var import_react_ui_menu2 = require("@dxos/react-ui-menu");
|
|
58
|
+
var import_react4 = require("react");
|
|
64
59
|
var import_functions2 = require("@dxos/functions");
|
|
65
|
-
var
|
|
60
|
+
var import_live_object2 = require("@dxos/live-object");
|
|
61
|
+
var import_react_ui_menu3 = require("@dxos/react-ui-menu");
|
|
66
62
|
var import_react_ui_menu4 = require("@dxos/react-ui-menu");
|
|
67
|
-
var
|
|
68
|
-
var import_react6 = require("react");
|
|
63
|
+
var import_react5 = require("react");
|
|
69
64
|
var import_log3 = require("@dxos/log");
|
|
70
|
-
var import_react7 = require("react");
|
|
71
|
-
var import_live_object2 = require("@dxos/live-object");
|
|
72
|
-
var import_lang_javascript = require("@codemirror/lang-javascript");
|
|
73
|
-
var import_language = require("@codemirror/language");
|
|
74
|
-
var import_state = require("@codemirror/state");
|
|
75
|
-
var import_theme_one_dark = require("@codemirror/theme-one-dark");
|
|
76
|
-
var import_view = require("@codemirror/view");
|
|
77
|
-
var import_highlight = require("@lezer/highlight");
|
|
78
|
-
var import_codemirror_continue = require("@valtown/codemirror-continue");
|
|
79
|
-
var import_codemirror_ts = require("@valtown/codemirror-ts");
|
|
80
|
-
var import_react8 = __toESM(require("react"));
|
|
81
|
-
var import_react_ui3 = require("@dxos/react-ui");
|
|
82
|
-
var import_react_ui_editor3 = require("@dxos/react-ui-editor");
|
|
83
|
-
var import_util = require("@dxos/util");
|
|
84
65
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/hooks/deploy.ts";
|
|
85
66
|
var createDeploy = (state) => {
|
|
86
|
-
const errorItem = (0,
|
|
67
|
+
const errorItem = (0, import_react_ui_menu.createMenuAction)("error", {
|
|
87
68
|
label: state.error ?? [
|
|
88
69
|
"no error label",
|
|
89
70
|
{
|
|
@@ -93,7 +74,7 @@ var createDeploy = (state) => {
|
|
|
93
74
|
icon: "ph--warning-circle--regular",
|
|
94
75
|
hidden: !state.error
|
|
95
76
|
});
|
|
96
|
-
const deployAction = (0,
|
|
77
|
+
const deployAction = (0, import_react_ui_menu.createMenuAction)("deploy", {
|
|
97
78
|
type: "deploy",
|
|
98
79
|
label: [
|
|
99
80
|
state.deploying ? "pending label" : "deploy label",
|
|
@@ -105,7 +86,7 @@ var createDeploy = (state) => {
|
|
|
105
86
|
disabled: state.deploying,
|
|
106
87
|
classNames: state.deploying ? "[&_svg]:animate-spin" : ""
|
|
107
88
|
});
|
|
108
|
-
const copyAction = (0,
|
|
89
|
+
const copyAction = (0, import_react_ui_menu.createMenuAction)("copy", {
|
|
109
90
|
type: "copy",
|
|
110
91
|
label: [
|
|
111
92
|
"copy link label",
|
|
@@ -139,12 +120,12 @@ var createDeploy = (state) => {
|
|
|
139
120
|
};
|
|
140
121
|
};
|
|
141
122
|
var useDeployDeps = ({ state, script }) => {
|
|
142
|
-
const space = (0,
|
|
143
|
-
const [fn] = (0,
|
|
123
|
+
const space = (0, import_echo.getSpace)(script);
|
|
124
|
+
const [fn] = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions.FunctionType, {
|
|
144
125
|
source: script
|
|
145
126
|
}));
|
|
146
127
|
const client = (0, import_react_client.useClient)();
|
|
147
|
-
const existingFunctionUrl = (0,
|
|
128
|
+
const existingFunctionUrl = (0, import_react.useMemo)(() => fn && (0, import_functions.getUserFunctionUrlInMetadata)((0, import_echo.getMeta)(fn)), [
|
|
148
129
|
fn
|
|
149
130
|
]);
|
|
150
131
|
return {
|
|
@@ -159,7 +140,7 @@ var useDeployState = ({ state, script }) => {
|
|
|
159
140
|
state,
|
|
160
141
|
script
|
|
161
142
|
});
|
|
162
|
-
(0,
|
|
143
|
+
(0, import_react.useEffect)(() => {
|
|
163
144
|
if (!existingFunctionUrl) {
|
|
164
145
|
return;
|
|
165
146
|
}
|
|
@@ -170,7 +151,7 @@ var useDeployState = ({ state, script }) => {
|
|
|
170
151
|
existingFunctionUrl,
|
|
171
152
|
space
|
|
172
153
|
]);
|
|
173
|
-
(0,
|
|
154
|
+
(0, import_react.useEffect)(() => {
|
|
174
155
|
state.deployed = Boolean(existingFunctionUrl) && !script.changed;
|
|
175
156
|
}, [
|
|
176
157
|
script.changed,
|
|
@@ -182,8 +163,8 @@ var useDeployHandler = ({ state, script }) => {
|
|
|
182
163
|
state,
|
|
183
164
|
script
|
|
184
165
|
});
|
|
185
|
-
const { t } = (0,
|
|
186
|
-
return (0,
|
|
166
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_5UH3F7TA.SCRIPT_PLUGIN);
|
|
167
|
+
return (0, import_react.useCallback)(async () => {
|
|
187
168
|
if (!script.source || !space) {
|
|
188
169
|
return;
|
|
189
170
|
}
|
|
@@ -224,10 +205,10 @@ var useDeployHandler = ({ state, script }) => {
|
|
|
224
205
|
if (fn) {
|
|
225
206
|
fn.version = version;
|
|
226
207
|
}
|
|
227
|
-
const deployedFunction = fn ?? space.db.add((0,
|
|
208
|
+
const deployedFunction = fn ?? space.db.add((0, import_echo.create)(import_functions.FunctionType, {
|
|
228
209
|
name: functionId,
|
|
229
210
|
version,
|
|
230
|
-
source: (0,
|
|
211
|
+
source: (0, import_echo.makeRef)(script)
|
|
231
212
|
}));
|
|
232
213
|
script.changed = false;
|
|
233
214
|
if (script.description !== void 0 && script.description.trim() !== "") {
|
|
@@ -268,7 +249,7 @@ var useDeployHandler = ({ state, script }) => {
|
|
|
268
249
|
C: (f, a) => f(...a)
|
|
269
250
|
});
|
|
270
251
|
}
|
|
271
|
-
(0, import_functions.setUserFunctionUrlInMetadata)((0,
|
|
252
|
+
(0, import_functions.setUserFunctionUrlInMetadata)((0, import_echo.getMeta)(deployedFunction), `/${space.id}/${functionId}`);
|
|
272
253
|
state.view = "split";
|
|
273
254
|
} catch (err) {
|
|
274
255
|
import_log.log.catch(err, void 0, {
|
|
@@ -291,7 +272,7 @@ var useDeployHandler = ({ state, script }) => {
|
|
|
291
272
|
space?.id ?? null
|
|
292
273
|
]);
|
|
293
274
|
};
|
|
294
|
-
var useCopyHandler = ({ state }) => (0,
|
|
275
|
+
var useCopyHandler = ({ state }) => (0, import_react.useCallback)(async () => {
|
|
295
276
|
if (!state.functionUrl) {
|
|
296
277
|
return;
|
|
297
278
|
}
|
|
@@ -299,9 +280,12 @@ var useCopyHandler = ({ state }) => (0, import_react3.useCallback)(async () => {
|
|
|
299
280
|
}, [
|
|
300
281
|
state.functionUrl
|
|
301
282
|
]);
|
|
283
|
+
var useToolbarState = (initialState = {}) => {
|
|
284
|
+
return (0, import_react2.useMemo)(() => (0, import_live_object.create)(initialState), []);
|
|
285
|
+
};
|
|
302
286
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/hooks/format.ts";
|
|
303
287
|
var createFormat = () => {
|
|
304
|
-
const formatAction = (0,
|
|
288
|
+
const formatAction = (0, import_react_ui_menu2.createMenuAction)("format", {
|
|
305
289
|
label: [
|
|
306
290
|
"format label",
|
|
307
291
|
{
|
|
@@ -322,7 +306,7 @@ var createFormat = () => {
|
|
|
322
306
|
]
|
|
323
307
|
};
|
|
324
308
|
};
|
|
325
|
-
var useFormatHandler = ({ script }) => (0,
|
|
309
|
+
var useFormatHandler = ({ script }) => (0, import_react3.useCallback)(async () => {
|
|
326
310
|
if (!script.source) {
|
|
327
311
|
return;
|
|
328
312
|
}
|
|
@@ -348,7 +332,7 @@ var useFormatHandler = ({ script }) => (0, import_react4.useCallback)(async () =
|
|
|
348
332
|
script.source
|
|
349
333
|
]);
|
|
350
334
|
var createTemplateSelectGroup = () => {
|
|
351
|
-
return (0,
|
|
335
|
+
return (0, import_react_ui_menu3.createMenuItemGroup)("template-select", {
|
|
352
336
|
label: [
|
|
353
337
|
"template select group label",
|
|
354
338
|
{
|
|
@@ -360,7 +344,7 @@ var createTemplateSelectGroup = () => {
|
|
|
360
344
|
};
|
|
361
345
|
var createTemplateSelectActions = () => {
|
|
362
346
|
return import_chunk_ITAJ3WRW.templates.map((template) => {
|
|
363
|
-
return (0,
|
|
347
|
+
return (0, import_react_ui_menu3.createMenuAction)(`template--${template.id}`, {
|
|
364
348
|
label: template.name,
|
|
365
349
|
value: template.id,
|
|
366
350
|
type: "template"
|
|
@@ -388,12 +372,12 @@ var createTemplateSelect = () => {
|
|
|
388
372
|
};
|
|
389
373
|
};
|
|
390
374
|
var useTemplateSelectHandler = ({ script }) => {
|
|
391
|
-
return (0,
|
|
375
|
+
return (0, import_react4.useCallback)((templateId) => {
|
|
392
376
|
const template = import_chunk_ITAJ3WRW.templates.find((template2) => template2.id === templateId);
|
|
393
377
|
if (template) {
|
|
394
378
|
script.name = template.name;
|
|
395
379
|
script.source.target.content = template.source;
|
|
396
|
-
const metaKeys = (0,
|
|
380
|
+
const metaKeys = (0, import_live_object2.getMeta)(script).keys;
|
|
397
381
|
const oldPresetIndex = metaKeys.findIndex((key) => key.source === import_functions2.FUNCTIONS_PRESET_META_KEY);
|
|
398
382
|
if (oldPresetIndex >= 0) {
|
|
399
383
|
metaKeys.splice(oldPresetIndex, 1);
|
|
@@ -415,7 +399,7 @@ var views = {
|
|
|
415
399
|
debug: "ph--bug--regular"
|
|
416
400
|
};
|
|
417
401
|
var createViewGroupItem = (state) => {
|
|
418
|
-
return (0,
|
|
402
|
+
return (0, import_react_ui_menu4.createMenuItemGroup)("view", {
|
|
419
403
|
label: [
|
|
420
404
|
"view group label",
|
|
421
405
|
{
|
|
@@ -429,7 +413,7 @@ var createViewGroupItem = (state) => {
|
|
|
429
413
|
};
|
|
430
414
|
var createViewActions = (state) => {
|
|
431
415
|
return Object.entries(views).map(([viewType, icon]) => {
|
|
432
|
-
return (0,
|
|
416
|
+
return (0, import_react_ui_menu4.createMenuAction)(`view--${viewType}`, {
|
|
433
417
|
type: "view",
|
|
434
418
|
value: viewType,
|
|
435
419
|
label: [
|
|
@@ -469,7 +453,7 @@ var useToolbarAction = (props) => {
|
|
|
469
453
|
const handleFormat = useFormatHandler(props);
|
|
470
454
|
const handleDeploy = useDeployHandler(props);
|
|
471
455
|
const handleCopy = useCopyHandler(props);
|
|
472
|
-
return (0,
|
|
456
|
+
return (0, import_react5.useCallback)((action) => {
|
|
473
457
|
switch (action.properties.type) {
|
|
474
458
|
case "template":
|
|
475
459
|
handleTemplateSelect(action.properties.value);
|
|
@@ -501,219 +485,14 @@ var useToolbarAction = (props) => {
|
|
|
501
485
|
handleCopy
|
|
502
486
|
]);
|
|
503
487
|
};
|
|
504
|
-
var useToolbarState = (initialState = {}) => {
|
|
505
|
-
return (0, import_react7.useMemo)(() => (0, import_live_object2.create)(initialState), []);
|
|
506
|
-
};
|
|
507
|
-
var createToolbar = (state) => {
|
|
508
|
-
const templateSelect = createTemplateSelect();
|
|
509
|
-
const format2 = createFormat();
|
|
510
|
-
const gap = (0, import_react_ui_menu.createGapSeparator)();
|
|
511
|
-
const deploy = createDeploy(state);
|
|
512
|
-
const view = createView(state);
|
|
513
|
-
return {
|
|
514
|
-
nodes: [
|
|
515
|
-
...templateSelect.nodes,
|
|
516
|
-
...format2.nodes,
|
|
517
|
-
...gap.nodes,
|
|
518
|
-
...deploy.nodes,
|
|
519
|
-
...view.nodes
|
|
520
|
-
],
|
|
521
|
-
edges: [
|
|
522
|
-
...templateSelect.edges,
|
|
523
|
-
...format2.edges,
|
|
524
|
-
...gap.edges,
|
|
525
|
-
...deploy.edges,
|
|
526
|
-
...view.edges
|
|
527
|
-
]
|
|
528
|
-
};
|
|
529
|
-
};
|
|
530
|
-
var ScriptToolbar = ({ script, role, state, classNames }) => {
|
|
531
|
-
const handleAction = useToolbarAction({
|
|
532
|
-
state,
|
|
533
|
-
script
|
|
534
|
-
});
|
|
535
|
-
const toolbarCreator = (0, import_react2.useCallback)(() => createToolbar(state), [
|
|
536
|
-
state
|
|
537
|
-
]);
|
|
538
|
-
const menu = (0, import_react_ui_menu.useMenuActions)(toolbarCreator);
|
|
539
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
540
|
-
role: "none",
|
|
541
|
-
className: (0, import_react_ui_editor2.stackItemContentToolbarClassNames)(role)
|
|
542
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.ElevationProvider, {
|
|
543
|
-
elevation: role === "section" ? "positioned" : "base"
|
|
544
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_menu.MenuProvider, {
|
|
545
|
-
...menu,
|
|
546
|
-
onAction: handleAction,
|
|
547
|
-
attendableId: (0, import_echo2.fullyQualifiedId)(script)
|
|
548
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_menu.ToolbarMenu, {
|
|
549
|
-
classNames
|
|
550
|
-
}))));
|
|
551
|
-
};
|
|
552
|
-
var TypescriptEditor = ({ id, env, className, initialValue, extensions, scrollTo, selection, toolbar, inputMode = "vscode" }) => {
|
|
553
|
-
const { themeMode } = (0, import_react_ui3.useThemeContext)();
|
|
554
|
-
const { parentRef, focusAttributes } = (0, import_react_ui_editor3.useTextEditor)(() => ({
|
|
555
|
-
id,
|
|
556
|
-
initialValue,
|
|
557
|
-
extensions: [
|
|
558
|
-
extensions,
|
|
559
|
-
(0, import_react_ui_editor3.createBasicExtensions)({
|
|
560
|
-
highlightActiveLine: true,
|
|
561
|
-
indentWithTab: true,
|
|
562
|
-
lineNumbers: true,
|
|
563
|
-
lineWrapping: false,
|
|
564
|
-
scrollPastEnd: true
|
|
565
|
-
}),
|
|
566
|
-
(0, import_react_ui_editor3.createThemeExtensions)({
|
|
567
|
-
themeMode,
|
|
568
|
-
syntaxHighlighting: true,
|
|
569
|
-
slots: {
|
|
570
|
-
content: {
|
|
571
|
-
className: import_react_ui_editor3.editorFullWidth
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}),
|
|
575
|
-
// NOTE: Not using default editor gutter because folding for code works best right beside text.
|
|
576
|
-
import_react_ui_editor3.EditorView.theme({
|
|
577
|
-
".cm-gutters": {
|
|
578
|
-
// Match margin from content.
|
|
579
|
-
marginTop: "16px"
|
|
580
|
-
}
|
|
581
|
-
}),
|
|
582
|
-
import_react_ui_editor3.InputModeExtensions[inputMode],
|
|
583
|
-
(0, import_react_ui_editor3.folding)(),
|
|
584
|
-
// Continues block comments when you hit Enter.
|
|
585
|
-
import_state.Prec.high(import_view.keymap.of(import_codemirror_continue.continueKeymap)),
|
|
586
|
-
// TODO(burdon): Factor out.
|
|
587
|
-
[
|
|
588
|
-
import_react_ui_editor3.editorMonospace,
|
|
589
|
-
(0, import_lang_javascript.javascript)({
|
|
590
|
-
typescript: true
|
|
591
|
-
}),
|
|
592
|
-
// https://github.com/val-town/codemirror-ts
|
|
593
|
-
(0, import_react_ui_editor3.autocomplete)({
|
|
594
|
-
override: env ? [
|
|
595
|
-
(0, import_codemirror_ts.tsAutocomplete)()
|
|
596
|
-
] : []
|
|
597
|
-
}),
|
|
598
|
-
env ? [
|
|
599
|
-
import_codemirror_ts.tsFacet.of({
|
|
600
|
-
env,
|
|
601
|
-
path: `/src/${id}.ts`
|
|
602
|
-
}),
|
|
603
|
-
(0, import_codemirror_ts.tsSync)(),
|
|
604
|
-
(0, import_codemirror_ts.tsLinter)(),
|
|
605
|
-
(0, import_codemirror_ts.tsHover)({
|
|
606
|
-
renderTooltip: createTooltipRenderer(themeMode)
|
|
607
|
-
})
|
|
608
|
-
] : []
|
|
609
|
-
]
|
|
610
|
-
].filter(import_util.isNonNullable),
|
|
611
|
-
selection,
|
|
612
|
-
scrollTo
|
|
613
|
-
}), [
|
|
614
|
-
id,
|
|
615
|
-
extensions,
|
|
616
|
-
themeMode,
|
|
617
|
-
inputMode,
|
|
618
|
-
selection,
|
|
619
|
-
scrollTo
|
|
620
|
-
]);
|
|
621
|
-
return /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
622
|
-
ref: parentRef,
|
|
623
|
-
"data-toolbar": toolbar ? "enabled" : "disabled",
|
|
624
|
-
className,
|
|
625
|
-
...focusAttributes
|
|
626
|
-
});
|
|
627
|
-
};
|
|
628
|
-
var createTooltipRenderer = (themeMode) => {
|
|
629
|
-
const theme = themeMode === "dark" ? import_theme_one_dark.oneDarkHighlightStyle : import_language.defaultHighlightStyle;
|
|
630
|
-
const classFromKind = (_kind) => {
|
|
631
|
-
const kind = _kind.endsWith("Name") ? "name" : _kind;
|
|
632
|
-
const validTag = kind in import_highlight.tags;
|
|
633
|
-
if (!validTag) {
|
|
634
|
-
return "";
|
|
635
|
-
}
|
|
636
|
-
const tag = import_highlight.tags[kind];
|
|
637
|
-
if (typeof tag === "function") {
|
|
638
|
-
return "";
|
|
639
|
-
}
|
|
640
|
-
return theme.style([
|
|
641
|
-
tag
|
|
642
|
-
]) ?? "";
|
|
643
|
-
};
|
|
644
|
-
return (info) => {
|
|
645
|
-
const div = document.createElement("div");
|
|
646
|
-
div.className = "p-1 rounded border border-separator bg-baseSurface xs:max-w-80 max-w-lg";
|
|
647
|
-
if (info.quickInfo?.displayParts) {
|
|
648
|
-
for (const part of info.quickInfo.displayParts) {
|
|
649
|
-
const span = div.appendChild(document.createElement("span"));
|
|
650
|
-
span.className = classFromKind(part.kind);
|
|
651
|
-
span.innerText = part.text;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return {
|
|
655
|
-
dom: div
|
|
656
|
-
};
|
|
657
|
-
};
|
|
658
|
-
};
|
|
659
|
-
var ScriptContainer = ({ role, classNames, script, settings = {
|
|
660
|
-
editorInputMode: "vscode"
|
|
661
|
-
}, env }) => {
|
|
662
|
-
const identity = (0, import_halo.useIdentity)();
|
|
663
|
-
const space = (0, import_echo.getSpace)(script);
|
|
664
|
-
const extensions = (0, import_react.useMemo)(() => [
|
|
665
|
-
(0, import_react_ui_editor.listener)({
|
|
666
|
-
onChange: (text) => {
|
|
667
|
-
if (script.source.target && script.source.target.content !== text) {
|
|
668
|
-
script.changed = true;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}),
|
|
672
|
-
(0, import_react_ui_editor.createDataExtensions)({
|
|
673
|
-
id: script.id,
|
|
674
|
-
text: script.source.target && (0, import_echo.createDocAccessor)(script.source.target, [
|
|
675
|
-
"content"
|
|
676
|
-
]),
|
|
677
|
-
space,
|
|
678
|
-
identity
|
|
679
|
-
})
|
|
680
|
-
], [
|
|
681
|
-
script,
|
|
682
|
-
script.source.target,
|
|
683
|
-
space,
|
|
684
|
-
identity
|
|
685
|
-
]);
|
|
686
|
-
const state = useToolbarState({
|
|
687
|
-
view: "editor"
|
|
688
|
-
});
|
|
689
|
-
useDeployState({
|
|
690
|
-
state,
|
|
691
|
-
script
|
|
692
|
-
});
|
|
693
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
|
|
694
|
-
toolbar: true
|
|
695
|
-
}, /* @__PURE__ */ import_react.default.createElement(ScriptToolbar, {
|
|
696
|
-
state,
|
|
697
|
-
role,
|
|
698
|
-
script
|
|
699
|
-
}), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
700
|
-
role: "none",
|
|
701
|
-
className: (0, import_react_ui_theme.mx)("flex flex-col w-full overflow-hidden divide-y divide-separator", classNames)
|
|
702
|
-
}, state.view !== "debug" && /* @__PURE__ */ import_react.default.createElement(TypescriptEditor, {
|
|
703
|
-
id: script.id,
|
|
704
|
-
env,
|
|
705
|
-
initialValue: script.source?.target?.content,
|
|
706
|
-
extensions,
|
|
707
|
-
className: (0, import_react_ui_editor.stackItemContentEditorClassNames)(role),
|
|
708
|
-
inputMode: settings.editorInputMode,
|
|
709
|
-
toolbar: true
|
|
710
|
-
}), state.view !== "editor" && /* @__PURE__ */ import_react.default.createElement(import_chunk_K3ZZWVXS.DebugPanel, {
|
|
711
|
-
functionUrl: state.functionUrl
|
|
712
|
-
})));
|
|
713
|
-
};
|
|
714
|
-
var ScriptContainer_default = ScriptContainer;
|
|
715
488
|
// Annotate the CommonJS export names for ESM import in node:
|
|
716
489
|
0 && (module.exports = {
|
|
717
|
-
|
|
490
|
+
createDeploy,
|
|
491
|
+
createFormat,
|
|
492
|
+
createTemplateSelect,
|
|
493
|
+
createView,
|
|
494
|
+
useDeployState,
|
|
495
|
+
useToolbarAction,
|
|
496
|
+
useToolbarState
|
|
718
497
|
});
|
|
719
|
-
//# sourceMappingURL=
|
|
498
|
+
//# sourceMappingURL=chunk-XKYJYY3T.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/deploy.ts", "../../../src/hooks/useToolbarState.ts", "../../../src/hooks/format.ts", "../../../src/hooks/template.ts", "../../../src/hooks/view.ts", "../../../src/hooks/useToolbarAction.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo } from 'react';\n\nimport {\n FunctionType,\n type ScriptType,\n getInvocationUrl,\n getUserFunctionUrlInMetadata,\n incrementSemverPatch,\n setUserFunctionUrlInMetadata,\n uploadWorkerFunction,\n} from '@dxos/functions';\nimport { Bundler } from '@dxos/functions/bundler';\nimport { log } from '@dxos/log';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, create, getMeta, getSpace, makeRef, useQuery } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { createMenuAction } from '@dxos/react-ui-menu';\n\nimport { type ViewState } from './view';\nimport { SCRIPT_PLUGIN } from '../meta';\n\nexport type DeployActionProperties = { type: 'deploy' } | { type: 'copy' };\n\nexport type DeployState = ViewState & {\n deploying: boolean;\n deployed: boolean;\n functionUrl: string;\n error: string;\n};\n\nexport const createDeploy = (state: Partial<DeployState>) => {\n const errorItem = createMenuAction('error', {\n label: state.error ?? ['no error label', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--warning-circle--regular',\n hidden: !state.error,\n });\n\n const deployAction = createMenuAction<DeployActionProperties>('deploy', {\n type: 'deploy',\n label: [state.deploying ? 'pending label' : 'deploy label', { ns: SCRIPT_PLUGIN }],\n icon: state.deploying ? 'ph--spinner-gap--regular' : 'ph--cloud-arrow-up--regular',\n disabled: state.deploying,\n classNames: state.deploying ? '[&_svg]:animate-spin' : '',\n });\n\n const copyAction = createMenuAction<DeployActionProperties>('copy', {\n type: 'copy',\n label: ['copy link label', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--link--regular',\n disabled: !state.functionUrl,\n });\n\n return {\n nodes: [errorItem, deployAction, copyAction],\n edges: [\n { source: 'root', target: 'error' },\n { source: 'root', target: 'deploy' },\n { source: 'root', target: 'copy' },\n ],\n };\n};\n\nconst useDeployDeps = ({ state, script }: { state: Partial<DeployState>; script: ScriptType }) => {\n const space = getSpace(script);\n const [fn] = useQuery(space, Filter.schema(FunctionType, { source: script }));\n const client = useClient();\n const existingFunctionUrl = useMemo(() => fn && getUserFunctionUrlInMetadata(getMeta(fn)), [fn]);\n return { space, fn, client, existingFunctionUrl };\n};\n\nexport const useDeployState = ({ state, script }: { state: Partial<DeployState>; script: ScriptType }) => {\n const { space, client, existingFunctionUrl } = useDeployDeps({ state, script });\n useEffect(() => {\n if (!existingFunctionUrl) {\n return;\n }\n\n state.functionUrl = getInvocationUrl(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? '', {\n spaceId: space?.id,\n });\n }, [existingFunctionUrl, space]);\n\n useEffect(() => {\n state.deployed = Boolean(existingFunctionUrl) && !script.changed;\n }, [script.changed, existingFunctionUrl]);\n};\n\nexport const useDeployHandler = ({ state, script }: { state: Partial<DeployState>; script: ScriptType }) => {\n const { space, fn, client, existingFunctionUrl } = useDeployDeps({ state, script });\n const { t } = useTranslation(SCRIPT_PLUGIN);\n\n return useCallback(async () => {\n if (!script.source || !space) {\n return;\n }\n\n state.error = undefined;\n state.deploying = true;\n\n try {\n const existingFunctionId = existingFunctionUrl?.split('/').at(-1);\n\n const bundler = new Bundler({ platform: 'browser', sandboxedModules: [], remoteModules: {} });\n const buildResult = await bundler.bundle({ source: script.source.target!.content });\n if (buildResult.error || !buildResult.bundle) {\n throw buildResult.error;\n }\n\n const { functionId, version, meta } = await uploadWorkerFunction({\n client,\n spaceId: space.id,\n version: fn ? incrementSemverPatch(fn.version) : '0.0.1',\n functionId: existingFunctionId,\n source: buildResult.bundle,\n });\n if (functionId === undefined || version === undefined) {\n throw new Error(`Upload didn't return expected data: functionId=${functionId}, version=${version}`);\n }\n\n log.info('function uploaded', { functionId, version });\n if (fn) {\n fn.version = version;\n }\n\n const deployedFunction =\n fn ?? space.db.add(create(FunctionType, { name: functionId, version, source: makeRef(script) }));\n\n script.changed = false;\n if (script.description !== undefined && script.description.trim() !== '') {\n deployedFunction.description = script.description;\n } else if (meta.description) {\n deployedFunction.description = meta.description;\n } else {\n log.verbose('no description in function metadata', { functionId });\n }\n\n if (meta.inputSchema) {\n deployedFunction.inputSchema = meta.inputSchema;\n } else {\n log.verbose('no input schema in function metadata', { functionId });\n }\n if (meta.outputSchema) {\n deployedFunction.outputSchema = meta.outputSchema;\n } else {\n log.verbose('no output schema in function metadata', { functionId });\n }\n\n setUserFunctionUrlInMetadata(getMeta(deployedFunction), `/${space.id}/${functionId}`);\n\n state.view = 'split';\n } catch (err: any) {\n log.catch(err);\n state.error = t('upload failed label');\n }\n state.deploying = false;\n }, [fn, client, t, existingFunctionUrl, script, script.name, script.source, space?.id ?? null]);\n};\n\nexport const useCopyHandler = ({ state }: { state: Partial<DeployState> }) =>\n useCallback(async () => {\n if (!state.functionUrl) {\n return;\n }\n await navigator.clipboard.writeText(state.functionUrl);\n }, [state.functionUrl]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { create } from '@dxos/live-object';\n\nimport { type DeployState } from './deploy';\nimport { type ViewState } from './view';\n\nexport type ScriptToolbarState = Partial<DeployState & ViewState>;\n\nexport const useToolbarState = (initialState: ScriptToolbarState = {}) => {\n return useMemo(() => create<ScriptToolbarState>(initialState), []);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { format } from 'prettier';\nimport prettierPluginEstree from 'prettier/plugins/estree';\nimport prettierPluginTypescript from 'prettier/plugins/typescript';\nimport { useCallback } from 'react';\n\nimport { type ScriptType } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { createMenuAction } from '@dxos/react-ui-menu';\n\nimport { SCRIPT_PLUGIN } from '../meta';\n\nexport type FormatActionProperties = { type: 'format' };\n\nexport const createFormat = () => {\n const formatAction = createMenuAction('format', {\n label: ['format label', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n });\n\n return {\n nodes: [formatAction],\n edges: [{ source: 'root', target: 'format' }],\n };\n};\n\nexport const useFormatHandler = ({ script }: { script: ScriptType }) =>\n useCallback(async () => {\n if (!script.source) {\n return;\n }\n\n try {\n script.source.target!.content = await format(script.source.target!.content, {\n parser: 'typescript',\n plugins: [prettierPluginEstree, prettierPluginTypescript],\n semi: true,\n singleQuote: true,\n });\n } catch (err: any) {\n // TODO(wittjosiah): Show error in UI.\n log.catch(err);\n }\n }, [script.source]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { FUNCTIONS_PRESET_META_KEY, type ScriptType } from '@dxos/functions';\nimport { getMeta } from '@dxos/live-object';\nimport { createMenuItemGroup, createMenuAction } from '@dxos/react-ui-menu';\n\nimport { SCRIPT_PLUGIN } from '../meta';\nimport { templates } from '../templates';\n\nexport type TemplateActionProperties = { type: 'template'; value: string };\n\nconst createTemplateSelectGroup = () => {\n return createMenuItemGroup('template-select', {\n label: ['template select group label', { ns: SCRIPT_PLUGIN }],\n variant: 'dropdownMenu',\n });\n};\n\nconst createTemplateSelectActions = () => {\n return templates.map((template) => {\n return createMenuAction<TemplateActionProperties>(`template--${template.id}`, {\n label: template.name,\n value: template.id,\n type: 'template',\n });\n });\n};\n\nexport const createTemplateSelect = () => {\n const templateSelectGroup = createTemplateSelectGroup();\n const templateSelectActions = createTemplateSelectActions();\n return {\n nodes: [templateSelectGroup, ...templateSelectActions],\n edges: [\n { source: 'root', target: 'template-select' },\n ...templateSelectActions.map((action) => ({ source: 'template-select', target: action.id })),\n ],\n };\n};\n\nexport const useTemplateSelectHandler = ({ script }: { script: ScriptType }) => {\n return useCallback(\n (templateId: string) => {\n const template = templates.find((template) => template.id === templateId);\n if (template) {\n script.name = template.name;\n script.source!.target!.content = template.source;\n const metaKeys = getMeta(script).keys;\n const oldPresetIndex = metaKeys.findIndex((key) => key.source === FUNCTIONS_PRESET_META_KEY);\n if (oldPresetIndex >= 0) {\n metaKeys.splice(oldPresetIndex, 1);\n }\n if (template.presetId) {\n metaKeys.push({ source: FUNCTIONS_PRESET_META_KEY, id: template.presetId });\n }\n }\n },\n [script],\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createMenuAction, createMenuItemGroup } from '@dxos/react-ui-menu';\n\nimport { SCRIPT_PLUGIN } from '../meta';\n\n// TODO(wittjosiah): Replace debug with logs.\nexport type ViewType = 'editor' | 'split' | 'debug'; // 'logs';\n\nexport type ViewState = { view: ViewType };\n\nexport type ViewActionProperties = { type: 'view'; value: ViewType };\n\nconst views: Record<ViewType, string> = {\n editor: 'ph--code--regular',\n split: 'ph--square-split-vertical--regular',\n debug: 'ph--bug--regular',\n // TODO(wittjosiah): Replace debug with logs.\n // logs: 'ph--clock-counter-clockwise--regular',\n};\n\nconst createViewGroupItem = (state: Partial<ViewState>) => {\n return createMenuItemGroup('view', {\n label: ['view group label', { ns: SCRIPT_PLUGIN }],\n variant: 'dropdownMenu',\n applyActive: true,\n value: state.view,\n });\n};\n\nconst createViewActions = (state: Partial<ViewState>) => {\n return Object.entries(views).map(([viewType, icon]) => {\n return createMenuAction<ViewActionProperties>(`view--${viewType}`, {\n type: 'view',\n value: viewType as ViewType,\n label: [`view ${viewType} label`, { ns: SCRIPT_PLUGIN }],\n icon,\n checked: state.view === viewType,\n });\n });\n};\n\nexport const createView = (state: Partial<ViewState>) => {\n const viewGroupItem = createViewGroupItem(state);\n const viewActions = createViewActions(state);\n return {\n nodes: [viewGroupItem, ...viewActions],\n edges: [\n { source: 'root', target: 'view' },\n ...viewActions.map((action) => ({ source: 'view', target: action.id })),\n ],\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { type ScriptType } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { type MenuAction, type MenuActionHandler } from '@dxos/react-ui-menu';\n\nimport { type DeployActionProperties, useDeployHandler, useCopyHandler } from './deploy';\nimport { type FormatActionProperties, useFormatHandler } from './format';\nimport { type TemplateActionProperties, useTemplateSelectHandler } from './template';\nimport { type ScriptToolbarState } from './useToolbarState';\nimport { type ViewActionProperties } from './view';\n\nexport type ScriptToolbarActionProperties =\n | TemplateActionProperties\n | ViewActionProperties\n | FormatActionProperties\n | DeployActionProperties;\n\nexport type ScriptToolbarAction = MenuAction<ScriptToolbarActionProperties>;\n\nexport const useToolbarAction = (props: { state: ScriptToolbarState; script: ScriptType }) => {\n const handleTemplateSelect = useTemplateSelectHandler(props);\n const handleFormat = useFormatHandler(props);\n const handleDeploy = useDeployHandler(props);\n const handleCopy = useCopyHandler(props);\n return useCallback(\n ((action: ScriptToolbarAction) => {\n switch (action.properties.type) {\n case 'template':\n handleTemplateSelect(action.properties.value);\n break;\n case 'view':\n props.state.view = action.properties.value;\n break;\n case 'format':\n void handleFormat();\n break;\n case 'deploy':\n void handleDeploy();\n break;\n case 'copy':\n void handleCopy();\n break;\n default:\n log.error('Unknown action type', action);\n }\n }) as MenuActionHandler,\n [handleTemplateSelect, handleFormat, handleDeploy, handleCopy],\n );\n};\n"],
|
|
5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AAOtE;MAAG,EAAA;;EAExE;AACF;;AC9BO,IAAMgG,mBAAmB,CAACC,UAAAA;AAC/B,QAAMC,uBAAuB3B,yBAAyB0B,KAAAA;AACtD,QAAME,eAAehD,iBAAiB8C,KAAAA;AACtC,QAAMG,eAAehG,iBAAiB6F,KAAAA;AACtC,QAAMI,aAAa1D,eAAesD,KAAAA;AAClC,aAAO1F,cAAAA,aACJ,CAAC+D,WAAAA;AACA,YAAQA,OAAOgC,WAAWzI,MAAI;MAC5B,KAAK;AACHqI,6BAAqB5B,OAAOgC,WAAWpC,KAAK;AAC5C;MACF,KAAK;AACH+B,cAAM9I,MAAMqF,OAAO8B,OAAOgC,WAAWpC;AACrC;MACF,KAAK;AACH,aAAKiC,aAAAA;AACL;MACF,KAAK;AACH,aAAKC,aAAAA;AACL;MACF,KAAK;AACH,aAAKC,WAAAA;AACL;MACF;AACE3E,oBAAAA,IAAInE,MAAM,uBAAuB+G,QAAAA;;;;;;IACrC;EACF,GACA;IAAC4B;IAAsBC;IAAcC;IAAcC;GAAW;AAElE;",
|
|
6
|
+
"names": ["import_react", "import_log", "import_react_ui_menu", "import_functions", "import_live_object", "createDeploy", "state", "errorItem", "createMenuAction", "label", "error", "ns", "SCRIPT_PLUGIN", "icon", "hidden", "deployAction", "type", "deploying", "disabled", "classNames", "copyAction", "functionUrl", "nodes", "edges", "source", "target", "useDeployDeps", "script", "space", "getSpace", "fn", "useQuery", "Filter", "schema", "FunctionType", "client", "useClient", "existingFunctionUrl", "useMemo", "getUserFunctionUrlInMetadata", "getMeta", "useDeployState", "useEffect", "getInvocationUrl", "config", "values", "runtime", "services", "edge", "url", "spaceId", "id", "deployed", "Boolean", "changed", "useDeployHandler", "t", "useTranslation", "useCallback", "undefined", "existingFunctionId", "split", "at", "bundler", "Bundler", "platform", "sandboxedModules", "remoteModules", "buildResult", "bundle", "content", "functionId", "version", "meta", "uploadWorkerFunction", "incrementSemverPatch", "Error", "log", "info", "deployedFunction", "db", "add", "create", "name", "makeRef", "description", "trim", "verbose", "inputSchema", "outputSchema", "setUserFunctionUrlInMetadata", "view", "err", "catch", "useCopyHandler", "navigator", "clipboard", "writeText", "useToolbarState", "initialState", "createFormat", "formatAction", "useFormatHandler", "format", "parser", "plugins", "prettierPluginEstree", "prettierPluginTypescript", "semi", "singleQuote", "createTemplateSelectGroup", "createMenuItemGroup", "variant", "createTemplateSelectActions", "templates", "map", "template", "value", "createTemplateSelect", "templateSelectGroup", "templateSelectActions", "action", "useTemplateSelectHandler", "templateId", "find", "metaKeys", "keys", "oldPresetIndex", "findIndex", "key", "FUNCTIONS_PRESET_META_KEY", "splice", "presetId", "push", "views", "editor", "debug", "createViewGroupItem", "applyActive", "createViewActions", "Object", "entries", "viewType", "checked", "createView", "viewGroupItem", "viewActions", "useToolbarAction", "props", "handleTemplateSelect", "handleFormat", "handleDeploy", "handleCopy", "properties"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,18 +28,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
-
|
|
31
|
+
DebugPanel: () => import_chunk_K3ZZWVXS.DebugPanel,
|
|
32
32
|
SCRIPT_PLUGIN: () => import_chunk_5UH3F7TA.SCRIPT_PLUGIN,
|
|
33
33
|
ScriptCapabilities: () => import_chunk_ALY3N6PW.ScriptCapabilities,
|
|
34
|
-
ScriptContainer: () =>
|
|
34
|
+
ScriptContainer: () => import_chunk_TOXBGIEI.ScriptContainer,
|
|
35
35
|
ScriptPlugin: () => ScriptPlugin,
|
|
36
|
-
ScriptSettings: () =>
|
|
37
|
-
ScriptSettingsPanel: () =>
|
|
36
|
+
ScriptSettings: () => import_chunk_TOXBGIEI.ScriptSettings,
|
|
37
|
+
ScriptSettingsPanel: () => import_chunk_TOXBGIEI.ScriptSettingsPanel,
|
|
38
38
|
meta: () => import_chunk_5UH3F7TA.meta
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(node_exports);
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_TOXBGIEI = require("./chunk-TOXBGIEI.cjs");
|
|
42
42
|
var import_chunk_ALY3N6PW = require("./chunk-ALY3N6PW.cjs");
|
|
43
|
+
var import_chunk_K3ZZWVXS = require("./chunk-K3ZZWVXS.cjs");
|
|
43
44
|
var import_chunk_DJGLGRQV = require("./chunk-DJGLGRQV.cjs");
|
|
44
45
|
var import_chunk_5UH3F7TA = require("./chunk-5UH3F7TA.cjs");
|
|
45
46
|
var import_app_framework = require("@dxos/app-framework");
|
|
@@ -47,15 +48,17 @@ var import_app_framework2 = require("@dxos/app-framework");
|
|
|
47
48
|
var import_functions = require("@dxos/functions");
|
|
48
49
|
var import_live_object = require("@dxos/live-object");
|
|
49
50
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
51
|
+
var import_plugin_deck = require("@dxos/plugin-deck");
|
|
50
52
|
var import_plugin_space = require("@dxos/plugin-space");
|
|
51
53
|
var import_types = require("@dxos/plugin-space/types");
|
|
54
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
52
55
|
var import_app_framework3 = require("@dxos/app-framework");
|
|
53
56
|
var import_functions2 = require("@dxos/functions");
|
|
54
57
|
var Compiler = (0, import_app_framework.lazy)(() => import("./compiler-UIBLKJKG.cjs"));
|
|
55
58
|
var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-NYJFPD5B.cjs"));
|
|
56
|
-
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-
|
|
59
|
+
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-EGSE3FMN.cjs"));
|
|
57
60
|
var ScriptSettings2 = (0, import_app_framework.lazy)(() => import("./settings-SZFSMSKM.cjs"));
|
|
58
|
-
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-
|
|
61
|
+
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-BXQCFPAH.cjs"));
|
|
59
62
|
var ScriptEvents;
|
|
60
63
|
(function(ScriptEvents2) {
|
|
61
64
|
ScriptEvents2.SetupCompiler = (0, import_app_framework3.defineEvent)(`${import_chunk_5UH3F7TA.SCRIPT_PLUGIN}/event/setup-compiler`);
|
|
@@ -103,7 +106,10 @@ var translations_default = [
|
|
|
103
106
|
"view editor label": "Editor",
|
|
104
107
|
"view split label": "Split",
|
|
105
108
|
"view debug label": "Debug",
|
|
106
|
-
|
|
109
|
+
// TODO(wittjosiah): Replace debug with logs.
|
|
110
|
+
// 'view logs label': 'Logs',
|
|
111
|
+
"template select group label": "Select template",
|
|
112
|
+
"function panel label": "Debug Function"
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
}
|
|
@@ -144,6 +150,22 @@ var ScriptPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_5U
|
|
|
144
150
|
}
|
|
145
151
|
})
|
|
146
152
|
}),
|
|
153
|
+
(0, import_app_framework2.defineModule)({
|
|
154
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/complementary-panels`,
|
|
155
|
+
activatesOn: import_plugin_deck.DeckEvents.SetupComplementaryPanels,
|
|
156
|
+
activate: () => (0, import_app_framework2.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
|
|
157
|
+
id: "function",
|
|
158
|
+
label: [
|
|
159
|
+
"function panel label",
|
|
160
|
+
{
|
|
161
|
+
ns: import_chunk_5UH3F7TA.SCRIPT_PLUGIN
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
icon: "ph--terminal--regular",
|
|
165
|
+
fixed: true,
|
|
166
|
+
filter: (node) => node.data instanceof import_functions.ScriptType && !!(0, import_echo.getSpace)(node.data)
|
|
167
|
+
})
|
|
168
|
+
}),
|
|
147
169
|
(0, import_app_framework2.defineModule)({
|
|
148
170
|
id: `${import_chunk_5UH3F7TA.meta.id}/module/object-form`,
|
|
149
171
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
@@ -156,13 +178,6 @@ var ScriptPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_5U
|
|
|
156
178
|
})
|
|
157
179
|
}))
|
|
158
180
|
}),
|
|
159
|
-
(0, import_app_framework2.defineModule)({
|
|
160
|
-
id: `${import_chunk_5UH3F7TA.meta.id}/module/schema`,
|
|
161
|
-
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
162
|
-
activate: () => (0, import_app_framework2.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
163
|
-
import_functions.FunctionType
|
|
164
|
-
])
|
|
165
|
-
}),
|
|
166
181
|
(0, import_app_framework2.defineModule)({
|
|
167
182
|
id: `${import_chunk_5UH3F7TA.meta.id}/module/react-surface`,
|
|
168
183
|
activatesOn: import_app_framework2.Events.SetupReactSurface,
|
|
@@ -185,7 +200,7 @@ var ScriptPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_5U
|
|
|
185
200
|
]);
|
|
186
201
|
// Annotate the CommonJS export names for ESM import in node:
|
|
187
202
|
0 && (module.exports = {
|
|
188
|
-
|
|
203
|
+
DebugPanel,
|
|
189
204
|
SCRIPT_PLUGIN,
|
|
190
205
|
ScriptCapabilities,
|
|
191
206
|
ScriptContainer,
|