@dxos/plugin-script 0.7.5-main.499c70c → 0.7.5-main.5ae2ba8
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-4LWPD3DH.mjs +251 -0
- package/dist/lib/browser/artifact-definition-4LWPD3DH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-K7KY6YMG.mjs → chunk-5SXOHNAK.mjs} +4 -4
- package/dist/lib/browser/chunk-5SXOHNAK.mjs.map +7 -0
- package/dist/lib/browser/chunk-6MOQ4BP3.mjs +15 -0
- package/dist/lib/browser/chunk-6MOQ4BP3.mjs.map +7 -0
- package/dist/lib/browser/chunk-FVVCAWNP.mjs +21 -0
- package/dist/lib/browser/chunk-FVVCAWNP.mjs.map +7 -0
- package/dist/lib/browser/chunk-G2FYNDU4.mjs +475 -0
- package/dist/lib/browser/chunk-G2FYNDU4.mjs.map +7 -0
- package/dist/lib/browser/chunk-N46LE7FS.mjs +40 -0
- package/dist/lib/browser/chunk-N46LE7FS.mjs.map +7 -0
- package/dist/lib/browser/chunk-PZPYF7M4.mjs +69 -0
- package/dist/lib/browser/chunk-PZPYF7M4.mjs.map +7 -0
- package/dist/lib/browser/chunk-VTWBVFBK.mjs +234 -0
- package/dist/lib/browser/chunk-VTWBVFBK.mjs.map +7 -0
- package/dist/lib/browser/compiler-YY2XSKHQ.mjs +82 -0
- package/dist/lib/browser/compiler-YY2XSKHQ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +146 -289
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-D6FPY5ZA.mjs +45 -0
- package/dist/lib/browser/intent-resolver-D6FPY5ZA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-G4C2PZ2K.mjs +81 -0
- package/dist/lib/browser/react-surface-G4C2PZ2K.mjs.map +7 -0
- package/dist/lib/browser/settings-SZCDKHWO.mjs +24 -0
- package/dist/lib/browser/settings-SZCDKHWO.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +6 -4
- 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-BXQCFPAH.cjs +267 -0
- package/dist/lib/node/artifact-definition-BXQCFPAH.cjs.map +7 -0
- package/dist/lib/node/{chunk-6LYX73ZT.cjs → chunk-5UH3F7TA.cjs} +11 -8
- package/dist/lib/node/chunk-5UH3F7TA.cjs.map +7 -0
- package/dist/lib/node/{meta.cjs → chunk-ALY3N6PW.cjs} +12 -8
- package/dist/lib/node/chunk-ALY3N6PW.cjs.map +7 -0
- package/dist/lib/node/{chunk-PK3OQP5L.cjs → chunk-DJGLGRQV.cjs} +26 -11
- package/dist/lib/node/chunk-DJGLGRQV.cjs.map +7 -0
- package/dist/lib/node/chunk-ITAJ3WRW.cjs +77 -0
- package/dist/lib/node/chunk-ITAJ3WRW.cjs.map +7 -0
- package/dist/lib/node/{chunk-4INUJLXL.cjs → chunk-K3ZZWVXS.cjs} +7 -7
- package/dist/lib/node/chunk-K3ZZWVXS.cjs.map +7 -0
- package/dist/lib/node/chunk-TOXBGIEI.cjs +261 -0
- package/dist/lib/node/chunk-TOXBGIEI.cjs.map +7 -0
- package/dist/lib/node/chunk-XKYJYY3T.cjs +498 -0
- package/dist/lib/node/chunk-XKYJYY3T.cjs.map +7 -0
- package/dist/lib/node/compiler-UIBLKJKG.cjs +104 -0
- package/dist/lib/node/compiler-UIBLKJKG.cjs.map +7 -0
- package/dist/lib/node/index.cjs +138 -278
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/intent-resolver-NYJFPD5B.cjs +59 -0
- package/dist/lib/node/intent-resolver-NYJFPD5B.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-EGSE3FMN.cjs +96 -0
- package/dist/lib/node/react-surface-EGSE3FMN.cjs.map +7 -0
- package/dist/lib/node/settings-SZFSMSKM.cjs +38 -0
- package/dist/lib/node/settings-SZFSMSKM.cjs.map +7 -0
- package/dist/lib/node/types.cjs +6 -4
- package/dist/lib/node/types.cjs.map +2 -2
- 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-KT4DK2LQ.mjs +252 -0
- package/dist/lib/node-esm/artifact-definition-KT4DK2LQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OFYGBUNI.mjs → chunk-2AFXX34U.mjs} +4 -4
- package/dist/lib/node-esm/chunk-2AFXX34U.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CP5LXTK5.mjs +16 -0
- package/dist/lib/node-esm/chunk-CP5LXTK5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NRICF4KE.mjs +476 -0
- package/dist/lib/node-esm/chunk-NRICF4KE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SLTZMY34.mjs → chunk-P2V2Y5LV.mjs} +7 -4
- package/dist/lib/node-esm/chunk-P2V2Y5LV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-S64WSJQK.mjs +235 -0
- package/dist/lib/node-esm/chunk-S64WSJQK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UNQFIERE.mjs +41 -0
- package/dist/lib/node-esm/chunk-UNQFIERE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YIWRJ25J.mjs +71 -0
- package/dist/lib/node-esm/chunk-YIWRJ25J.mjs.map +7 -0
- package/dist/lib/node-esm/compiler-XTXFGZJM.mjs +83 -0
- package/dist/lib/node-esm/compiler-XTXFGZJM.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +146 -289
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-KLBHSMW4.mjs +46 -0
- package/dist/lib/node-esm/intent-resolver-KLBHSMW4.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-7YSGHZQM.mjs +82 -0
- package/dist/lib/node-esm/react-surface-7YSGHZQM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-GR4O2WHZ.mjs +25 -0
- package/dist/lib/node-esm/settings-GR4O2WHZ.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +6 -4
- package/dist/types/src/ScriptPlugin.d.ts +1 -3
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +11 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +5 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler.d.ts +4 -0
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts +1 -2
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +3 -4
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptContainer.d.ts +10 -3
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts +1 -2
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts.map +1 -1
- package/dist/types/src/components/ScriptSettingsPanel.d.ts +1 -2
- package/dist/types/src/components/ScriptSettingsPanel.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +10 -0
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -0
- package/dist/types/src/components/{Toolbar/Toolbar.stories.d.ts → ScriptToolbar/ScriptToolbar.stories.d.ts} +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScriptToolbar/index.d.ts +2 -0
- package/dist/types/src/components/ScriptToolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +4 -3
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +4 -0
- package/dist/types/src/events.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +48 -0
- package/dist/types/src/hooks/deploy.d.ts.map +1 -0
- package/dist/types/src/hooks/format.d.ts +25 -0
- package/dist/types/src/hooks/format.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +7 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/template.d.ts +31 -0
- package/dist/types/src/hooks/template.d.ts.map +1 -0
- package/dist/types/src/hooks/useToolbarAction.d.ts +14 -0
- package/dist/types/src/hooks/useToolbarAction.d.ts.map +1 -0
- package/dist/types/src/hooks/useToolbarState.d.ts +10 -0
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -0
- package/dist/types/src/hooks/view.d.ts +33 -0
- package/dist/types/src/hooks/view.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/templates/chess.d.ts +1 -4
- package/dist/types/src/templates/chess.d.ts.map +1 -1
- package/dist/types/src/templates/discord.d.ts +3 -0
- package/dist/types/src/templates/discord.d.ts.map +1 -0
- package/dist/types/src/templates/echo.d.ts.map +1 -1
- package/dist/types/src/templates/email.d.ts +2 -1
- package/dist/types/src/templates/email.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts +3 -0
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -0
- package/dist/types/src/templates/forex.d.ts +1 -4
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/{templates.d.ts → templates/index.d.ts} +1 -1
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +100 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +14 -6
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -46
- package/src/ScriptPlugin.tsx +80 -91
- package/src/capabilities/artifact-definition.ts +224 -0
- package/src/capabilities/capabilities.ts +12 -0
- package/src/capabilities/compiler.ts +33 -0
- package/src/capabilities/index.ts +13 -0
- package/src/capabilities/intent-resolver.ts +46 -0
- package/src/capabilities/react-surface.tsx +60 -0
- package/src/capabilities/settings.ts +14 -0
- package/src/compiler/compiler.browser.test.ts +1 -1
- package/src/components/DebugPanel/DebugPanel.tsx +2 -2
- package/src/components/FrameContainer/FrameContainer.tsx +5 -4
- package/src/components/ScriptContainer.tsx +69 -9
- package/src/components/ScriptSettings/ScriptSettings.tsx +28 -4
- package/src/components/ScriptSettingsPanel.tsx +139 -51
- package/src/components/{Toolbar/Toolbar.stories.tsx → ScriptToolbar/ScriptToolbar.stories.tsx} +2 -2
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +53 -0
- package/src/{bundler → components/ScriptToolbar}/index.ts +1 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +2 -0
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +75 -10
- package/src/components/index.ts +1 -1
- package/src/events.ts +11 -0
- package/src/hooks/deploy.ts +169 -0
- package/src/hooks/format.ts +47 -0
- package/src/hooks/index.ts +11 -0
- package/src/hooks/template.ts +64 -0
- package/src/hooks/useToolbarAction.ts +54 -0
- package/src/hooks/useToolbarState.ts +16 -0
- package/src/hooks/view.ts +55 -0
- package/src/index.ts +2 -7
- package/src/meta.ts +4 -2
- package/src/templates/chat.ts +4 -4
- package/src/templates/chess.ts +42 -35
- package/src/templates/discord.ts +103 -0
- package/src/templates/echo.ts +5 -1
- package/src/templates/email.ts +26 -23
- package/src/templates/forex-effect.ts +41 -0
- package/src/templates/forex.ts +23 -16
- package/src/{templates.ts → templates/index.ts} +20 -5
- package/src/translations.ts +26 -0
- package/src/types.ts +19 -18
- package/dist/lib/browser/AutomationPanel-RFQAQ7NF.mjs +0 -78
- package/dist/lib/browser/AutomationPanel-RFQAQ7NF.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-IJNY7NHA.mjs +0 -415
- package/dist/lib/browser/ScriptContainer-IJNY7NHA.mjs.map +0 -7
- package/dist/lib/browser/chunk-4UTRJLQ3.mjs +0 -286
- package/dist/lib/browser/chunk-4UTRJLQ3.mjs.map +0 -7
- package/dist/lib/browser/chunk-C7VBULMK.mjs +0 -18
- package/dist/lib/browser/chunk-C7VBULMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-K7KY6YMG.mjs.map +0 -7
- package/dist/lib/browser/chunk-RQA3EB5K.mjs +0 -26
- package/dist/lib/browser/chunk-RQA3EB5K.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-5CJEF4MI.cjs +0 -104
- package/dist/lib/node/AutomationPanel-5CJEF4MI.cjs.map +0 -7
- package/dist/lib/node/ScriptContainer-D7CCLTCJ.cjs +0 -426
- package/dist/lib/node/ScriptContainer-D7CCLTCJ.cjs.map +0 -7
- package/dist/lib/node/chunk-4INUJLXL.cjs.map +0 -7
- package/dist/lib/node/chunk-6LYX73ZT.cjs.map +0 -7
- package/dist/lib/node/chunk-PK3OQP5L.cjs.map +0 -7
- package/dist/lib/node/chunk-WPP65EYS.cjs +0 -298
- package/dist/lib/node/chunk-WPP65EYS.cjs.map +0 -7
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-7Y6REBNJ.mjs +0 -79
- package/dist/lib/node-esm/AutomationPanel-7Y6REBNJ.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-FURREOFW.mjs +0 -416
- package/dist/lib/node-esm/ScriptContainer-FURREOFW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4SRPREUK.mjs +0 -288
- package/dist/lib/node-esm/chunk-4SRPREUK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H6BBLQ5Q.mjs +0 -27
- package/dist/lib/node-esm/chunk-H6BBLQ5Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OFYGBUNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SLTZMY34.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/types/src/bundler/bundler.d.ts +0 -39
- package/dist/types/src/bundler/bundler.d.ts.map +0 -1
- package/dist/types/src/bundler/bundler.test.d.ts +0 -2
- package/dist/types/src/bundler/bundler.test.d.ts.map +0 -1
- package/dist/types/src/bundler/index.d.ts +0 -2
- package/dist/types/src/bundler/index.d.ts.map +0 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +0 -17
- 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/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +0 -12
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts +0 -6
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/index.d.ts +0 -2
- package/dist/types/src/components/ScriptBlock/index.d.ts.map +0 -1
- package/dist/types/src/components/ScriptEditor.d.ts +0 -9
- package/dist/types/src/components/ScriptEditor.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -23
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/index.d.ts +0 -2
- package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
- package/dist/types/src/templates.d.ts.map +0 -1
- package/src/bundler/bundler.test.ts +0 -54
- package/src/bundler/bundler.ts +0 -250
- package/src/components/AutomationPanel/AutomationPanel.tsx +0 -104
- package/src/components/AutomationPanel/index.ts +0 -9
- package/src/components/ScriptBlock/ScriptBlock.stories.tsx +0 -55
- package/src/components/ScriptBlock/ScriptBlock.tsx +0 -102
- package/src/components/ScriptBlock/index.ts +0 -5
- package/src/components/ScriptEditor.tsx +0 -193
- package/src/components/Toolbar/Toolbar.tsx +0 -177
- package/src/components/Toolbar/index.ts +0 -5
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var compiler_UIBLKJKG_exports = {};
|
|
30
|
+
__export(compiler_UIBLKJKG_exports, {
|
|
31
|
+
default: () => compiler_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(compiler_UIBLKJKG_exports);
|
|
34
|
+
var import_chunk_ALY3N6PW = require("./chunk-ALY3N6PW.cjs");
|
|
35
|
+
var import_chunk_5UH3F7TA = require("./chunk-5UH3F7TA.cjs");
|
|
36
|
+
var import_esbuild = __toESM(require("esbuild-wasm/esbuild.wasm?url"));
|
|
37
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
38
|
+
var import_bundler = require("@dxos/functions/bundler");
|
|
39
|
+
var import_vfs = require("@typescript/vfs");
|
|
40
|
+
var import_typescript = __toESM(require("typescript"));
|
|
41
|
+
var import_invariant = require("@dxos/invariant");
|
|
42
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
|
|
43
|
+
var defaultOptions = {
|
|
44
|
+
lib: [
|
|
45
|
+
"DOM",
|
|
46
|
+
"es2022"
|
|
47
|
+
],
|
|
48
|
+
target: import_typescript.default.ScriptTarget.ES2022
|
|
49
|
+
};
|
|
50
|
+
var Compiler = class {
|
|
51
|
+
constructor(_options = defaultOptions) {
|
|
52
|
+
this._options = _options;
|
|
53
|
+
}
|
|
54
|
+
async initialize() {
|
|
55
|
+
if (this._env) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this._fsMap = await (0, import_vfs.createDefaultMapFromCDN)(this._options, "5.5.4", true, import_typescript.default);
|
|
59
|
+
const system = (0, import_vfs.createSystem)(this._fsMap);
|
|
60
|
+
this._env = (0, import_vfs.createVirtualTypeScriptEnvironment)(system, [], import_typescript.default, this._options);
|
|
61
|
+
}
|
|
62
|
+
get environment() {
|
|
63
|
+
(0, import_invariant.invariant)(this._env, "Compiler environment not initialized.", {
|
|
64
|
+
F: __dxlog_file,
|
|
65
|
+
L: 39,
|
|
66
|
+
S: this,
|
|
67
|
+
A: [
|
|
68
|
+
"this._env",
|
|
69
|
+
"'Compiler environment not initialized.'"
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
return this._env;
|
|
73
|
+
}
|
|
74
|
+
setFile(fileName, content) {
|
|
75
|
+
(0, import_invariant.invariant)(this._fsMap, "File system map not initialized.", {
|
|
76
|
+
F: __dxlog_file,
|
|
77
|
+
L: 44,
|
|
78
|
+
S: this,
|
|
79
|
+
A: [
|
|
80
|
+
"this._fsMap",
|
|
81
|
+
"'File system map not initialized.'"
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
this.environment.createFile(fileName, content);
|
|
85
|
+
}
|
|
86
|
+
compile(fileName) {
|
|
87
|
+
return this.environment.languageService.getEmitOutput(fileName);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var compiler_default = async () => {
|
|
91
|
+
const compiler = new Compiler();
|
|
92
|
+
await compiler.initialize();
|
|
93
|
+
compiler.setFile("/src/typings.d.ts", "declare module 'https://*';");
|
|
94
|
+
compiler.setFile("/src/runtime.ts", `
|
|
95
|
+
export const Filter: any = {};
|
|
96
|
+
export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
|
|
97
|
+
export const functionHandler = (handler: FunctionHandler) => handler;
|
|
98
|
+
`);
|
|
99
|
+
await (0, import_bundler.initializeBundler)({
|
|
100
|
+
wasmUrl: import_esbuild.default
|
|
101
|
+
});
|
|
102
|
+
return (0, import_app_framework.contributes)(import_chunk_ALY3N6PW.ScriptCapabilities.Compiler, compiler);
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=compiler-UIBLKJKG.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/compiler.ts", "../../../src/compiler/compiler.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @ts-ignore\nimport wasmUrl from 'esbuild-wasm/esbuild.wasm?url';\n\nimport { contributes } from '@dxos/app-framework';\nimport { initializeBundler } from '@dxos/functions/bundler';\n\nimport { ScriptCapabilities } from './capabilities';\nimport { Compiler } from '../compiler';\n\nexport default async () => {\n const compiler = new Compiler();\n\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 return contributes(ScriptCapabilities.Compiler, compiler);\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,qBAAoB;AAEpB,2BAA4B;AAC5B,qBAAkC;ACJlC,iBAKO;AACP,wBAAe;AAEf,uBAA0B;;AAE1B,IAAMA,iBAAqC;EACzCC,KAAK;IAAC;IAAO;;EACbC,QAAQC,kBAAAA,QAAGC,aAAaC;AAC1B;AAEO,IAAMC,WAAN,MAAMA;EAIXC,YAA6BC,WAA+BR,gBAAgB;SAA/CQ,WAAAA;EAAgD;EAE7E,MAAMC,aAAa;AACjB,QAAI,KAAKC,MAAM;AACb;IACF;AAIA,SAAKC,SAAS,UAAMC,oCAAwB,KAAKJ,UAAU,SAAS,MAAML,kBAAAA,OAAAA;AAC1E,UAAMU,aAASC,yBAAa,KAAKH,MAAM;AACvC,SAAKD,WAAOK,+CAAmCF,QAAQ,CAAA,GAAIV,kBAAAA,SAAI,KAAKK,QAAQ;EAC9E;EAEA,IAAIQ,cAAc;AAChBC,oCAAU,KAAKP,MAAM,yCAAA;;;;;;;;;AACrB,WAAO,KAAKA;EACd;EAEAQ,QAAQC,UAAkBC,SAAiB;AACzCH,oCAAU,KAAKN,QAAQ,oCAAA;;;;;;;;;AACvB,SAAKK,YAAYK,WAAWF,UAAUC,OAAAA;EACxC;EAEAE,QAAQH,UAAkB;AACxB,WAAO,KAAKH,YAAYO,gBAAgBC,cAAcL,QAAAA;EACxD;AACF;ADrCA,IAAA,mBAAe,YAAA;AACb,QAAMM,WAAW,IAAInB,SAAAA;AAErB,QAAMmB,SAAShB,WAAU;AAEzBgB,WAASP,QAAQ,qBAAqB,6BAAA;AAGtCO,WAASP,QACP,mBACA;;;;OAIG;AAEL,YAAMQ,kCAAkB;IAAEC,wBAAAA;EAAQ,CAAA;AAElC,aAAOC,kCAAYC,yCAAmBvB,UAAUmB,QAAAA;AAClD;",
|
|
6
|
+
"names": ["defaultOptions", "lib", "target", "ts", "ScriptTarget", "ES2022", "Compiler", "constructor", "_options", "initialize", "_env", "_fsMap", "createDefaultMapFromCDN", "system", "createSystem", "createVirtualTypeScriptEnvironment", "environment", "invariant", "setFile", "fileName", "content", "createFile", "compile", "languageService", "getEmitOutput", "compiler", "initializeBundler", "wasmUrl", "contributes", "ScriptCapabilities"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,198 +28,54 @@ 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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
ScriptContainer: () => ScriptContainer,
|
|
31
|
+
DebugPanel: () => import_chunk_K3ZZWVXS.DebugPanel,
|
|
32
|
+
SCRIPT_PLUGIN: () => import_chunk_5UH3F7TA.SCRIPT_PLUGIN,
|
|
33
|
+
ScriptCapabilities: () => import_chunk_ALY3N6PW.ScriptCapabilities,
|
|
34
|
+
ScriptContainer: () => import_chunk_TOXBGIEI.ScriptContainer,
|
|
36
35
|
ScriptPlugin: () => ScriptPlugin,
|
|
37
|
-
ScriptSettings: () => ScriptSettings,
|
|
38
|
-
ScriptSettingsPanel: () => ScriptSettingsPanel,
|
|
39
|
-
|
|
40
|
-
initializeBundler: () => import_chunk_WPP65EYS.initializeBundler
|
|
36
|
+
ScriptSettings: () => import_chunk_TOXBGIEI.ScriptSettings,
|
|
37
|
+
ScriptSettingsPanel: () => import_chunk_TOXBGIEI.ScriptSettingsPanel,
|
|
38
|
+
meta: () => import_chunk_5UH3F7TA.meta
|
|
41
39
|
});
|
|
42
40
|
module.exports = __toCommonJS(node_exports);
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
41
|
+
var import_chunk_TOXBGIEI = require("./chunk-TOXBGIEI.cjs");
|
|
42
|
+
var import_chunk_ALY3N6PW = require("./chunk-ALY3N6PW.cjs");
|
|
43
|
+
var import_chunk_K3ZZWVXS = require("./chunk-K3ZZWVXS.cjs");
|
|
44
|
+
var import_chunk_DJGLGRQV = require("./chunk-DJGLGRQV.cjs");
|
|
45
|
+
var import_chunk_5UH3F7TA = require("./chunk-5UH3F7TA.cjs");
|
|
48
46
|
var import_app_framework = require("@dxos/app-framework");
|
|
47
|
+
var import_app_framework2 = require("@dxos/app-framework");
|
|
49
48
|
var import_functions = require("@dxos/functions");
|
|
50
49
|
var import_live_object = require("@dxos/live-object");
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var import_react2 = require("react");
|
|
56
|
-
var import_react3 = __toESM(require("react"));
|
|
57
|
-
var import_react_client = require("@dxos/react-client");
|
|
58
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
59
|
-
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
60
|
-
var import_react4 = __toESM(require("react"));
|
|
61
|
-
var import_functions2 = require("@dxos/functions");
|
|
62
|
-
var import_react_client2 = require("@dxos/react-client");
|
|
50
|
+
var import_plugin_client = require("@dxos/plugin-client");
|
|
51
|
+
var import_plugin_deck = require("@dxos/plugin-deck");
|
|
52
|
+
var import_plugin_space = require("@dxos/plugin-space");
|
|
53
|
+
var import_types = require("@dxos/plugin-space/types");
|
|
63
54
|
var import_echo = require("@dxos/react-client/echo");
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this._options = _options;
|
|
76
|
-
}
|
|
77
|
-
async initialize() {
|
|
78
|
-
if (this._env) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
this._fsMap = await (0, import_vfs.createDefaultMapFromCDN)(this._options, "5.5.4", true, import_typescript.default);
|
|
82
|
-
const system = (0, import_vfs.createSystem)(this._fsMap);
|
|
83
|
-
this._env = (0, import_vfs.createVirtualTypeScriptEnvironment)(system, [], import_typescript.default, this._options);
|
|
84
|
-
}
|
|
85
|
-
get environment() {
|
|
86
|
-
(0, import_invariant.invariant)(this._env, "Compiler environment not initialized.", {
|
|
87
|
-
F: __dxlog_file,
|
|
88
|
-
L: 39,
|
|
89
|
-
S: this,
|
|
90
|
-
A: [
|
|
91
|
-
"this._env",
|
|
92
|
-
"'Compiler environment not initialized.'"
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
return this._env;
|
|
96
|
-
}
|
|
97
|
-
setFile(fileName, content) {
|
|
98
|
-
(0, import_invariant.invariant)(this._fsMap, "File system map not initialized.", {
|
|
99
|
-
F: __dxlog_file,
|
|
100
|
-
L: 44,
|
|
101
|
-
S: this,
|
|
102
|
-
A: [
|
|
103
|
-
"this._fsMap",
|
|
104
|
-
"'File system map not initialized.'"
|
|
105
|
-
]
|
|
106
|
-
});
|
|
107
|
-
this.environment.createFile(fileName, content);
|
|
108
|
-
}
|
|
109
|
-
compile(fileName) {
|
|
110
|
-
return this.environment.languageService.getEmitOutput(fileName);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
var ScriptSettings = ({ settings }) => {
|
|
114
|
-
const { t } = (0, import_react_ui.useTranslation)(import_chunk_6LYX73ZT.SCRIPT_PLUGIN);
|
|
115
|
-
const client = (0, import_react_client.useClient)();
|
|
116
|
-
const handleAuthenticate = async () => {
|
|
117
|
-
const { identityKey } = client.halo.identity.get();
|
|
118
|
-
await client.halo.writeCredentials([
|
|
119
|
-
{
|
|
120
|
-
issuer: identityKey,
|
|
121
|
-
issuanceDate: /* @__PURE__ */ new Date(),
|
|
122
|
-
subject: {
|
|
123
|
-
id: identityKey,
|
|
124
|
-
assertion: {
|
|
125
|
-
"@type": "dxos.halo.credentials.ServiceAccess",
|
|
126
|
-
serverName: "hub.dxos.network",
|
|
127
|
-
serverKey: identityKey,
|
|
128
|
-
identityKey,
|
|
129
|
-
capabilities: [
|
|
130
|
-
"composer:beta"
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
]);
|
|
136
|
-
};
|
|
137
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
138
|
-
label: t("authenticate action label")
|
|
139
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Button, {
|
|
140
|
-
onClick: handleAuthenticate
|
|
141
|
-
}, t("authenticate button label"))));
|
|
142
|
-
};
|
|
143
|
-
var ScriptSettingsPanel = ({ script }) => {
|
|
144
|
-
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_6LYX73ZT.SCRIPT_PLUGIN);
|
|
145
|
-
const client = (0, import_react_client2.useClient)();
|
|
146
|
-
const space = (0, import_echo.getSpace)(script);
|
|
147
|
-
const [fn] = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions2.FunctionType, {
|
|
148
|
-
source: script
|
|
149
|
-
}));
|
|
150
|
-
const handleNameChange = (0, import_react4.useCallback)((event) => {
|
|
151
|
-
script.name = event.target.value;
|
|
152
|
-
}, [
|
|
153
|
-
script
|
|
154
|
-
]);
|
|
155
|
-
const [binding, setBinding] = (0, import_react_ui2.useControlledValue)(fn?.binding ?? "");
|
|
156
|
-
const handleBindingChange = (0, import_react4.useCallback)((event) => {
|
|
157
|
-
setBinding(event.target.value);
|
|
158
|
-
}, [
|
|
159
|
-
setBinding
|
|
160
|
-
]);
|
|
161
|
-
const handleBindingBlur = (0, import_react4.useCallback)(() => {
|
|
162
|
-
fn.binding = binding;
|
|
163
|
-
}, [
|
|
164
|
-
fn,
|
|
165
|
-
binding
|
|
166
|
-
]);
|
|
167
|
-
const functionPath = fn && (0, import_functions2.getUserFunctionUrlInMetadata)((0, import_echo.getMeta)(fn));
|
|
168
|
-
const functionUrl = functionPath && (0, import_functions2.getInvocationUrl)(functionPath, client.config.values.runtime?.services?.edge?.url ?? "", {
|
|
169
|
-
spaceId: space?.id
|
|
170
|
-
});
|
|
171
|
-
const handleCopy = (0, import_react4.useCallback)(() => functionUrl && navigator.clipboard.writeText(functionUrl), [
|
|
172
|
-
functionUrl
|
|
173
|
-
]);
|
|
174
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
175
|
-
role: "form",
|
|
176
|
-
className: "flex flex-col w-full p-2 gap-4"
|
|
177
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
178
|
-
role: "none",
|
|
179
|
-
className: "flex flex-col gap-1"
|
|
180
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, t("name label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
|
|
181
|
-
placeholder: t("object title placeholder"),
|
|
182
|
-
value: script.name ?? "",
|
|
183
|
-
onChange: handleNameChange
|
|
184
|
-
}))), fn && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("hr", {
|
|
185
|
-
className: "border-separator"
|
|
186
|
-
}), /* @__PURE__ */ import_react4.default.createElement("h2", null, t("remote function settings heading")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
187
|
-
role: "none",
|
|
188
|
-
className: "flex flex-col gap-1"
|
|
189
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, t("function url label")), /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
190
|
-
role: "none",
|
|
191
|
-
className: "flex gap-1"
|
|
192
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
|
|
193
|
-
disabled: true,
|
|
194
|
-
value: functionUrl,
|
|
195
|
-
onChange: (event) => {
|
|
196
|
-
fn.name = event.target.value;
|
|
197
|
-
}
|
|
198
|
-
}), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Button, {
|
|
199
|
-
onClick: handleCopy
|
|
200
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
201
|
-
icon: "ph--copy--regular",
|
|
202
|
-
size: 4
|
|
203
|
-
}))))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
204
|
-
role: "none",
|
|
205
|
-
className: "flex flex-col gap-1"
|
|
206
|
-
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, t("function binding label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
|
|
207
|
-
placeholder: t("function binding placeholder"),
|
|
208
|
-
value: binding,
|
|
209
|
-
onChange: handleBindingChange,
|
|
210
|
-
onBlur: handleBindingBlur
|
|
211
|
-
})))));
|
|
212
|
-
};
|
|
213
|
-
var AutomationPanel = (0, import_react2.lazy)(() => import("./AutomationPanel-5CJEF4MI.cjs"));
|
|
214
|
-
var ScriptContainer = (0, import_react2.lazy)(() => import("./ScriptContainer-D7CCLTCJ.cjs"));
|
|
55
|
+
var import_app_framework3 = require("@dxos/app-framework");
|
|
56
|
+
var import_functions2 = require("@dxos/functions");
|
|
57
|
+
var Compiler = (0, import_app_framework.lazy)(() => import("./compiler-UIBLKJKG.cjs"));
|
|
58
|
+
var IntentResolver = (0, import_app_framework.lazy)(() => import("./intent-resolver-NYJFPD5B.cjs"));
|
|
59
|
+
var ReactSurface = (0, import_app_framework.lazy)(() => import("./react-surface-EGSE3FMN.cjs"));
|
|
60
|
+
var ScriptSettings2 = (0, import_app_framework.lazy)(() => import("./settings-SZFSMSKM.cjs"));
|
|
61
|
+
var ArtifactDefinition = (0, import_app_framework.lazy)(() => import("./artifact-definition-BXQCFPAH.cjs"));
|
|
62
|
+
var ScriptEvents;
|
|
63
|
+
(function(ScriptEvents2) {
|
|
64
|
+
ScriptEvents2.SetupCompiler = (0, import_app_framework3.defineEvent)(`${import_chunk_5UH3F7TA.SCRIPT_PLUGIN}/event/setup-compiler`);
|
|
65
|
+
})(ScriptEvents || (ScriptEvents = {}));
|
|
215
66
|
var translations_default = [
|
|
216
67
|
{
|
|
217
68
|
"en-US": {
|
|
218
|
-
[
|
|
69
|
+
[import_functions2.ScriptType.typename]: {
|
|
70
|
+
"typename label": "Script"
|
|
71
|
+
},
|
|
72
|
+
[import_chunk_5UH3F7TA.SCRIPT_PLUGIN]: {
|
|
219
73
|
"plugin name": "Scripts",
|
|
220
74
|
"object title placeholder": "New script",
|
|
221
75
|
"create object label": "Create script",
|
|
222
76
|
"create stack section label": "Create script",
|
|
77
|
+
"description label": "Description",
|
|
78
|
+
"description placeholder": "Describe what the script does.",
|
|
223
79
|
"binding placeholder": "Function name",
|
|
224
80
|
"function request placeholder": "Function request",
|
|
225
81
|
"deploy label": "Deploy",
|
|
@@ -234,119 +90,123 @@ var translations_default = [
|
|
|
234
90
|
"remote function settings heading": "Remote Function",
|
|
235
91
|
"function url label": "Invocation URL",
|
|
236
92
|
"function binding label": "Function binding",
|
|
237
|
-
"function binding placeholder": "BINDING"
|
|
93
|
+
"function binding placeholder": "BINDING",
|
|
94
|
+
"script publish settings label": "Publishing",
|
|
95
|
+
"script publish settings description": "Scripts can be shared publicly as Github gists.",
|
|
96
|
+
"no github token label": "This space has no Github access token available.",
|
|
97
|
+
"open token manager label": "Open Token Manager",
|
|
98
|
+
"publish label": "Publish",
|
|
99
|
+
"publishing label": "Publishing",
|
|
100
|
+
"editor input mode label": "Editor input mode",
|
|
101
|
+
"select editor input mode placeholder": "Select editor input mode\u2026",
|
|
102
|
+
"settings editor input mode default label": "Default",
|
|
103
|
+
"settings editor input mode vim label": "Vim",
|
|
104
|
+
"settings editor input mode vscode label": "VS Code",
|
|
105
|
+
"view group label": "View",
|
|
106
|
+
"view editor label": "Editor",
|
|
107
|
+
"view split label": "Split",
|
|
108
|
+
"view debug label": "Debug",
|
|
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"
|
|
238
113
|
}
|
|
239
114
|
}
|
|
240
115
|
}
|
|
241
116
|
];
|
|
242
|
-
var ScriptPlugin = () =>
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
117
|
+
var ScriptPlugin = () => (0, import_app_framework2.definePlugin)(import_chunk_5UH3F7TA.meta, [
|
|
118
|
+
(0, import_app_framework2.defineModule)({
|
|
119
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/settings`,
|
|
120
|
+
activatesOn: import_app_framework2.Events.SetupSettings,
|
|
121
|
+
activate: ScriptSettings2
|
|
122
|
+
}),
|
|
123
|
+
(0, import_app_framework2.defineModule)({
|
|
124
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/compiler`,
|
|
125
|
+
activatesOn: ScriptEvents.SetupCompiler,
|
|
126
|
+
activate: Compiler
|
|
127
|
+
}),
|
|
128
|
+
(0, import_app_framework2.defineModule)({
|
|
129
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/translations`,
|
|
130
|
+
activatesOn: import_app_framework2.Events.SetupTranslations,
|
|
131
|
+
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Translations, translations_default)
|
|
132
|
+
}),
|
|
133
|
+
(0, import_app_framework2.defineModule)({
|
|
134
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/metadata`,
|
|
135
|
+
activatesOn: import_app_framework2.Events.SetupMetadata,
|
|
136
|
+
activate: () => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.Metadata, {
|
|
137
|
+
id: import_functions.ScriptType.typename,
|
|
260
138
|
metadata: {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
"object title placeholder",
|
|
266
|
-
{
|
|
267
|
-
ns: import_chunk_6LYX73ZT.SCRIPT_PLUGIN
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
icon: "ph--code--regular",
|
|
271
|
-
// TODO(wittjosiah): Move out of metadata.
|
|
272
|
-
loadReferences: async (script) => await import_live_object.RefArray.loadAll([
|
|
273
|
-
script.source
|
|
274
|
-
])
|
|
139
|
+
placeholder: [
|
|
140
|
+
"object title placeholder",
|
|
141
|
+
{
|
|
142
|
+
ns: import_chunk_5UH3F7TA.SCRIPT_PLUGIN
|
|
275
143
|
}
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
translations: translations_default,
|
|
279
|
-
echo: {
|
|
280
|
-
schema: [
|
|
281
|
-
import_functions.ScriptType
|
|
282
144
|
],
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
definitions: () => [
|
|
289
|
-
(0, import_app_framework.createSurface)({
|
|
290
|
-
id: `${import_chunk_6LYX73ZT.SCRIPT_PLUGIN}/settings`,
|
|
291
|
-
role: "settings",
|
|
292
|
-
filter: (data) => data.subject === import_chunk_6LYX73ZT.SCRIPT_PLUGIN,
|
|
293
|
-
component: () => /* @__PURE__ */ import_react.default.createElement(ScriptSettings, {
|
|
294
|
-
settings: {}
|
|
295
|
-
})
|
|
296
|
-
}),
|
|
297
|
-
(0, import_app_framework.createSurface)({
|
|
298
|
-
id: `${import_chunk_6LYX73ZT.SCRIPT_PLUGIN}/article`,
|
|
299
|
-
role: "article",
|
|
300
|
-
filter: (data) => data.subject instanceof import_functions.ScriptType,
|
|
301
|
-
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(ScriptContainer, {
|
|
302
|
-
script: data.subject,
|
|
303
|
-
env: compiler.environment
|
|
304
|
-
})
|
|
305
|
-
}),
|
|
306
|
-
(0, import_app_framework.createSurface)({
|
|
307
|
-
id: `${import_chunk_6LYX73ZT.SCRIPT_PLUGIN}/automation`,
|
|
308
|
-
role: "complementary--automation",
|
|
309
|
-
disposition: "hoist",
|
|
310
|
-
filter: (data) => data.subject instanceof import_functions.ScriptType,
|
|
311
|
-
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(AutomationPanel, {
|
|
312
|
-
subject: data.subject
|
|
313
|
-
})
|
|
314
|
-
}),
|
|
315
|
-
(0, import_app_framework.createSurface)({
|
|
316
|
-
id: `${import_chunk_6LYX73ZT.SCRIPT_PLUGIN}/settings-panel`,
|
|
317
|
-
role: "complementary--settings",
|
|
318
|
-
filter: (data) => data.subject instanceof import_functions.ScriptType,
|
|
319
|
-
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(ScriptSettingsPanel, {
|
|
320
|
-
script: data.subject
|
|
321
|
-
})
|
|
322
|
-
})
|
|
323
|
-
]
|
|
324
|
-
},
|
|
325
|
-
intent: {
|
|
326
|
-
resolvers: () => (0, import_app_framework.createResolver)(import_chunk_PK3OQP5L.ScriptAction.Create, ({ name }) => ({
|
|
327
|
-
data: {
|
|
328
|
-
object: (0, import_live_object.create)(import_functions.ScriptType, {
|
|
329
|
-
source: (0, import_live_object.makeRef)((0, import_live_object.create)(import_types.TextType, {
|
|
330
|
-
content: import_chunk_WPP65EYS.templates[0].source
|
|
331
|
-
}))
|
|
332
|
-
})
|
|
333
|
-
}
|
|
334
|
-
}))
|
|
145
|
+
icon: "ph--code--regular",
|
|
146
|
+
// TODO(wittjosiah): Move out of metadata.
|
|
147
|
+
loadReferences: async (script) => await import_live_object.RefArray.loadAll([
|
|
148
|
+
script.source
|
|
149
|
+
])
|
|
335
150
|
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
151
|
+
})
|
|
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
|
+
}),
|
|
169
|
+
(0, import_app_framework2.defineModule)({
|
|
170
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/object-form`,
|
|
171
|
+
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
172
|
+
activate: () => (0, import_app_framework2.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types.defineObjectForm)({
|
|
173
|
+
objectSchema: import_functions.ScriptType,
|
|
174
|
+
formSchema: import_chunk_DJGLGRQV.ScriptAction.CreateScriptSchema,
|
|
175
|
+
getIntent: (props, options) => (0, import_app_framework2.createIntent)(import_chunk_DJGLGRQV.ScriptAction.Create, {
|
|
176
|
+
...props,
|
|
177
|
+
space: options.space
|
|
178
|
+
})
|
|
179
|
+
}))
|
|
180
|
+
}),
|
|
181
|
+
(0, import_app_framework2.defineModule)({
|
|
182
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/react-surface`,
|
|
183
|
+
activatesOn: import_app_framework2.Events.SetupReactSurface,
|
|
184
|
+
// TODO(wittjosiah): Should occur before the script editor is loaded when surfaces activation is more granular.
|
|
185
|
+
activatesBefore: [
|
|
186
|
+
ScriptEvents.SetupCompiler
|
|
187
|
+
],
|
|
188
|
+
activate: ReactSurface
|
|
189
|
+
}),
|
|
190
|
+
(0, import_app_framework2.defineModule)({
|
|
191
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/intent-resolver`,
|
|
192
|
+
activatesOn: import_app_framework2.Events.SetupIntentResolver,
|
|
193
|
+
activate: IntentResolver
|
|
194
|
+
}),
|
|
195
|
+
(0, import_app_framework2.defineModule)({
|
|
196
|
+
id: `${import_chunk_5UH3F7TA.meta.id}/module/artifact-definition`,
|
|
197
|
+
activatesOn: import_app_framework2.Events.SetupArtifactDefinition,
|
|
198
|
+
activate: ArtifactDefinition
|
|
199
|
+
})
|
|
200
|
+
]);
|
|
340
201
|
// Annotate the CommonJS export names for ESM import in node:
|
|
341
202
|
0 && (module.exports = {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
ScriptAction,
|
|
203
|
+
DebugPanel,
|
|
204
|
+
SCRIPT_PLUGIN,
|
|
205
|
+
ScriptCapabilities,
|
|
346
206
|
ScriptContainer,
|
|
347
207
|
ScriptPlugin,
|
|
348
208
|
ScriptSettings,
|
|
349
209
|
ScriptSettingsPanel,
|
|
350
|
-
|
|
210
|
+
meta
|
|
351
211
|
});
|
|
352
212
|
//# sourceMappingURL=index.cjs.map
|