@rinova/playground 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +173 -2
- package/dist/App-CFmSt4WP.js +11980 -0
- package/dist/assets/editor.worker-G4Kxf7Y6.js +15827 -0
- package/dist/assets/ts.worker-Dee0cZZb.js +164076 -0
- package/dist/css-CZhy9mCC.js +2 -0
- package/dist/dist-mV5k43A9.js +151 -0
- package/dist/editor.api-oO_3X9N5.js +126730 -0
- package/dist/editor.worker-VDFPHiZj.js +5 -0
- package/dist/index.js +22 -0
- package/dist/javascript-drpK16Ry.js +2 -0
- package/dist/json-BRBnC4S4.js +2 -0
- package/dist/monaco.contribution-HbKWJEpF.js +220 -0
- package/dist/output-Dx3ubog9.js +51 -0
- package/dist/style.css +9248 -0
- package/dist/ts.worker-CpQm_d0w.js +5 -0
- package/dist/tsMode-GTz-HPrN.js +52173 -0
- package/dist/types/app/App.vue.d.ts +4 -0
- package/dist/types/app/PlaygroundParamsPanel.vue.d.ts +6 -0
- package/dist/types/app/PlaygroundSidebar.vue.d.ts +19 -0
- package/dist/types/app/PlaygroundSourcePanel.vue.d.ts +12 -0
- package/dist/types/app/PlaygroundStage.vue.d.ts +8 -0
- package/dist/types/app/PlaygroundToolbar.vue.d.ts +22 -0
- package/dist/types/code/CodeBlock.vue.d.ts +9 -0
- package/dist/types/code/CodeEditor.vue.d.ts +18 -0
- package/dist/types/code/highlighter.d.ts +4 -0
- package/dist/types/code/monaco.d.ts +6 -0
- package/dist/types/components/PwButton.vue.d.ts +29 -0
- package/dist/types/components/PwInput.vue.d.ts +43 -0
- package/dist/types/components/PwPortal.vue.d.ts +20 -0
- package/dist/types/components/PwSwitch.vue.d.ts +11 -0
- package/dist/types/components/PwToastHost.vue.d.ts +3 -0
- package/dist/types/components/toast.d.ts +9 -0
- package/dist/types/composables/useFocusTrap.d.ts +5 -0
- package/dist/types/config.d.ts +30 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/payload/args.d.ts +19 -0
- package/dist/types/payload/output.d.ts +4 -0
- package/dist/types/scene-meta.d.ts +23 -0
- package/dist/types/shims.d.ts +15 -0
- package/dist/types/types.d.ts +37 -0
- package/dist/typescript-CqzjXQdw.js +2 -0
- package/dist/vitesse-dark-B9O9KI0c.js +3 -0
- package/dist/vitesse-light-Cs2DYTIe.js +3 -0
- package/dist/vue-tjAT-6a9.js +36 -0
- package/package.json +43 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var json_default = [Object.freeze(JSON.parse("{\"displayName\":\"JSON\",\"name\":\"json\",\"patterns\":[{\"include\":\"#value\"}],\"repository\":{\"array\":{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.array.begin.json\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.array.end.json\"}},\"name\":\"meta.structure.array.json\",\"patterns\":[{\"include\":\"#value\"},{\"match\":\",\",\"name\":\"punctuation.separator.array.json\"},{\"match\":\"[^]\\\\s]\",\"name\":\"invalid.illegal.expected-array-separator.json\"}]},\"comments\":{\"patterns\":[{\"begin\":\"/\\\\*\\\\*(?!/)\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.json\"}},\"end\":\"\\\\*/\",\"name\":\"comment.block.documentation.json\"},{\"begin\":\"/\\\\*\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.json\"}},\"end\":\"\\\\*/\",\"name\":\"comment.block.json\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.comment.json\"}},\"match\":\"(//).*$\\\\n?\",\"name\":\"comment.line.double-slash.js\"}]},\"constant\":{\"match\":\"\\\\b(?:true|false|null)\\\\b\",\"name\":\"constant.language.json\"},\"number\":{\"match\":\"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?\",\"name\":\"constant.numeric.json\"},\"object\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.dictionary.begin.json\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.dictionary.end.json\"}},\"name\":\"meta.structure.dictionary.json\",\"patterns\":[{\"include\":\"#objectkey\"},{\"include\":\"#comments\"},{\"begin\":\":\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.separator.dictionary.key-value.json\"}},\"end\":\"(,)|(?=})\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.separator.dictionary.pair.json\"}},\"name\":\"meta.structure.dictionary.value.json\",\"patterns\":[{\"include\":\"#value\"},{\"match\":\"[^,\\\\s]\",\"name\":\"invalid.illegal.expected-dictionary-separator.json\"}]},{\"match\":\"[^}\\\\s]\",\"name\":\"invalid.illegal.expected-dictionary-separator.json\"}]},\"objectkey\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.support.type.property-name.begin.json\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.support.type.property-name.end.json\"}},\"name\":\"string.json support.type.property-name.json\",\"patterns\":[{\"include\":\"#stringcontent\"}]},\"string\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.json\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.json\"}},\"name\":\"string.quoted.double.json\",\"patterns\":[{\"include\":\"#stringcontent\"}]},\"stringcontent\":{\"patterns\":[{\"match\":\"\\\\\\\\(?:[\\\"/\\\\\\\\bfnrt]|u\\\\h{4})\",\"name\":\"constant.character.escape.json\"},{\"match\":\"\\\\\\\\.\",\"name\":\"invalid.illegal.unrecognized-string-escape.json\"}]},\"value\":{\"patterns\":[{\"include\":\"#constant\"},{\"include\":\"#number\"},{\"include\":\"#string\"},{\"include\":\"#array\"},{\"include\":\"#object\"},{\"include\":\"#comments\"}]}},\"scopeName\":\"source.json\"}"))];
|
|
2
|
+
export { json_default as default };
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { c as languages, t as Emitter } from "./editor.api-oO_3X9N5.js";
|
|
2
|
+
import { i as __exportAll } from "./App-CFmSt4WP.js";
|
|
3
|
+
// ../../node_modules/.pnpm/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/languages/features/typescript/lib/typescriptServicesMetadata.js
|
|
4
|
+
var typescriptVersion$1 = "5.9.3";
|
|
5
|
+
// ../../node_modules/.pnpm/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/languages/features/typescript/register.js
|
|
6
|
+
var ModuleKind = /* @__PURE__ */ ((ModuleKind2) => {
|
|
7
|
+
ModuleKind2[ModuleKind2["None"] = 0] = "None";
|
|
8
|
+
ModuleKind2[ModuleKind2["CommonJS"] = 1] = "CommonJS";
|
|
9
|
+
ModuleKind2[ModuleKind2["AMD"] = 2] = "AMD";
|
|
10
|
+
ModuleKind2[ModuleKind2["UMD"] = 3] = "UMD";
|
|
11
|
+
ModuleKind2[ModuleKind2["System"] = 4] = "System";
|
|
12
|
+
ModuleKind2[ModuleKind2["ES2015"] = 5] = "ES2015";
|
|
13
|
+
ModuleKind2[ModuleKind2["ESNext"] = 99] = "ESNext";
|
|
14
|
+
return ModuleKind2;
|
|
15
|
+
})(ModuleKind || {});
|
|
16
|
+
var JsxEmit = /* @__PURE__ */ ((JsxEmit2) => {
|
|
17
|
+
JsxEmit2[JsxEmit2["None"] = 0] = "None";
|
|
18
|
+
JsxEmit2[JsxEmit2["Preserve"] = 1] = "Preserve";
|
|
19
|
+
JsxEmit2[JsxEmit2["React"] = 2] = "React";
|
|
20
|
+
JsxEmit2[JsxEmit2["ReactNative"] = 3] = "ReactNative";
|
|
21
|
+
JsxEmit2[JsxEmit2["ReactJSX"] = 4] = "ReactJSX";
|
|
22
|
+
JsxEmit2[JsxEmit2["ReactJSXDev"] = 5] = "ReactJSXDev";
|
|
23
|
+
return JsxEmit2;
|
|
24
|
+
})(JsxEmit || {});
|
|
25
|
+
var NewLineKind = /* @__PURE__ */ ((NewLineKind2) => {
|
|
26
|
+
NewLineKind2[NewLineKind2["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed";
|
|
27
|
+
NewLineKind2[NewLineKind2["LineFeed"] = 1] = "LineFeed";
|
|
28
|
+
return NewLineKind2;
|
|
29
|
+
})(NewLineKind || {});
|
|
30
|
+
var ScriptTarget = /* @__PURE__ */ ((ScriptTarget2) => {
|
|
31
|
+
ScriptTarget2[ScriptTarget2["ES3"] = 0] = "ES3";
|
|
32
|
+
ScriptTarget2[ScriptTarget2["ES5"] = 1] = "ES5";
|
|
33
|
+
ScriptTarget2[ScriptTarget2["ES2015"] = 2] = "ES2015";
|
|
34
|
+
ScriptTarget2[ScriptTarget2["ES2016"] = 3] = "ES2016";
|
|
35
|
+
ScriptTarget2[ScriptTarget2["ES2017"] = 4] = "ES2017";
|
|
36
|
+
ScriptTarget2[ScriptTarget2["ES2018"] = 5] = "ES2018";
|
|
37
|
+
ScriptTarget2[ScriptTarget2["ES2019"] = 6] = "ES2019";
|
|
38
|
+
ScriptTarget2[ScriptTarget2["ES2020"] = 7] = "ES2020";
|
|
39
|
+
ScriptTarget2[ScriptTarget2["ESNext"] = 99] = "ESNext";
|
|
40
|
+
ScriptTarget2[ScriptTarget2["JSON"] = 100] = "JSON";
|
|
41
|
+
ScriptTarget2[ScriptTarget2["Latest"] = 99] = "Latest";
|
|
42
|
+
return ScriptTarget2;
|
|
43
|
+
})(ScriptTarget || {});
|
|
44
|
+
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
|
|
45
|
+
ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic";
|
|
46
|
+
ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs";
|
|
47
|
+
return ModuleResolutionKind2;
|
|
48
|
+
})(ModuleResolutionKind || {});
|
|
49
|
+
var LanguageServiceDefaultsImpl = class {
|
|
50
|
+
constructor(compilerOptions, diagnosticsOptions, workerOptions, inlayHintsOptions, modeConfiguration) {
|
|
51
|
+
this._onDidChange = new Emitter();
|
|
52
|
+
this._onDidExtraLibsChange = new Emitter();
|
|
53
|
+
this._extraLibs = /* @__PURE__ */ Object.create(null);
|
|
54
|
+
this._removedExtraLibs = /* @__PURE__ */ Object.create(null);
|
|
55
|
+
this._eagerModelSync = false;
|
|
56
|
+
this.setCompilerOptions(compilerOptions);
|
|
57
|
+
this.setDiagnosticsOptions(diagnosticsOptions);
|
|
58
|
+
this.setWorkerOptions(workerOptions);
|
|
59
|
+
this.setInlayHintsOptions(inlayHintsOptions);
|
|
60
|
+
this.setModeConfiguration(modeConfiguration);
|
|
61
|
+
this._onDidExtraLibsChangeTimeout = -1;
|
|
62
|
+
}
|
|
63
|
+
get onDidChange() {
|
|
64
|
+
return this._onDidChange.event;
|
|
65
|
+
}
|
|
66
|
+
get onDidExtraLibsChange() {
|
|
67
|
+
return this._onDidExtraLibsChange.event;
|
|
68
|
+
}
|
|
69
|
+
get modeConfiguration() {
|
|
70
|
+
return this._modeConfiguration;
|
|
71
|
+
}
|
|
72
|
+
get workerOptions() {
|
|
73
|
+
return this._workerOptions;
|
|
74
|
+
}
|
|
75
|
+
get inlayHintsOptions() {
|
|
76
|
+
return this._inlayHintsOptions;
|
|
77
|
+
}
|
|
78
|
+
getExtraLibs() {
|
|
79
|
+
return this._extraLibs;
|
|
80
|
+
}
|
|
81
|
+
addExtraLib(content, _filePath) {
|
|
82
|
+
let filePath;
|
|
83
|
+
if (typeof _filePath === "undefined") filePath = `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;
|
|
84
|
+
else filePath = _filePath;
|
|
85
|
+
if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) return { dispose: () => {} };
|
|
86
|
+
let myVersion = 1;
|
|
87
|
+
if (this._removedExtraLibs[filePath]) myVersion = this._removedExtraLibs[filePath] + 1;
|
|
88
|
+
if (this._extraLibs[filePath]) myVersion = this._extraLibs[filePath].version + 1;
|
|
89
|
+
this._extraLibs[filePath] = {
|
|
90
|
+
content,
|
|
91
|
+
version: myVersion
|
|
92
|
+
};
|
|
93
|
+
this._fireOnDidExtraLibsChangeSoon();
|
|
94
|
+
return { dispose: () => {
|
|
95
|
+
let extraLib = this._extraLibs[filePath];
|
|
96
|
+
if (!extraLib) return;
|
|
97
|
+
if (extraLib.version !== myVersion) return;
|
|
98
|
+
delete this._extraLibs[filePath];
|
|
99
|
+
this._removedExtraLibs[filePath] = myVersion;
|
|
100
|
+
this._fireOnDidExtraLibsChangeSoon();
|
|
101
|
+
} };
|
|
102
|
+
}
|
|
103
|
+
setExtraLibs(libs) {
|
|
104
|
+
for (const filePath in this._extraLibs) this._removedExtraLibs[filePath] = this._extraLibs[filePath].version;
|
|
105
|
+
this._extraLibs = /* @__PURE__ */ Object.create(null);
|
|
106
|
+
if (libs && libs.length > 0) for (const lib of libs) {
|
|
107
|
+
const filePath = lib.filePath || `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;
|
|
108
|
+
const content = lib.content;
|
|
109
|
+
let myVersion = 1;
|
|
110
|
+
if (this._removedExtraLibs[filePath]) myVersion = this._removedExtraLibs[filePath] + 1;
|
|
111
|
+
this._extraLibs[filePath] = {
|
|
112
|
+
content,
|
|
113
|
+
version: myVersion
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
this._fireOnDidExtraLibsChangeSoon();
|
|
117
|
+
}
|
|
118
|
+
_fireOnDidExtraLibsChangeSoon() {
|
|
119
|
+
if (this._onDidExtraLibsChangeTimeout !== -1) return;
|
|
120
|
+
this._onDidExtraLibsChangeTimeout = window.setTimeout(() => {
|
|
121
|
+
this._onDidExtraLibsChangeTimeout = -1;
|
|
122
|
+
this._onDidExtraLibsChange.fire(void 0);
|
|
123
|
+
}, 0);
|
|
124
|
+
}
|
|
125
|
+
getCompilerOptions() {
|
|
126
|
+
return this._compilerOptions;
|
|
127
|
+
}
|
|
128
|
+
setCompilerOptions(options) {
|
|
129
|
+
this._compilerOptions = options || /* @__PURE__ */ Object.create(null);
|
|
130
|
+
this._onDidChange.fire(void 0);
|
|
131
|
+
}
|
|
132
|
+
getDiagnosticsOptions() {
|
|
133
|
+
return this._diagnosticsOptions;
|
|
134
|
+
}
|
|
135
|
+
setDiagnosticsOptions(options) {
|
|
136
|
+
this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);
|
|
137
|
+
this._onDidChange.fire(void 0);
|
|
138
|
+
}
|
|
139
|
+
setWorkerOptions(options) {
|
|
140
|
+
this._workerOptions = options || /* @__PURE__ */ Object.create(null);
|
|
141
|
+
this._onDidChange.fire(void 0);
|
|
142
|
+
}
|
|
143
|
+
setInlayHintsOptions(options) {
|
|
144
|
+
this._inlayHintsOptions = options || /* @__PURE__ */ Object.create(null);
|
|
145
|
+
this._onDidChange.fire(void 0);
|
|
146
|
+
}
|
|
147
|
+
setMaximumWorkerIdleTime(value) {}
|
|
148
|
+
setEagerModelSync(value) {
|
|
149
|
+
this._eagerModelSync = value;
|
|
150
|
+
}
|
|
151
|
+
getEagerModelSync() {
|
|
152
|
+
return this._eagerModelSync;
|
|
153
|
+
}
|
|
154
|
+
setModeConfiguration(modeConfiguration) {
|
|
155
|
+
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
|
|
156
|
+
this._onDidChange.fire(void 0);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
var typescriptVersion = typescriptVersion$1;
|
|
160
|
+
var modeConfigurationDefault = {
|
|
161
|
+
completionItems: true,
|
|
162
|
+
hovers: true,
|
|
163
|
+
documentSymbols: true,
|
|
164
|
+
definitions: true,
|
|
165
|
+
references: true,
|
|
166
|
+
documentHighlights: true,
|
|
167
|
+
rename: true,
|
|
168
|
+
diagnostics: true,
|
|
169
|
+
documentRangeFormattingEdits: true,
|
|
170
|
+
signatureHelp: true,
|
|
171
|
+
onTypeFormattingEdits: true,
|
|
172
|
+
codeActions: true,
|
|
173
|
+
inlayHints: true
|
|
174
|
+
};
|
|
175
|
+
var typescriptDefaults = new LanguageServiceDefaultsImpl({
|
|
176
|
+
allowNonTsExtensions: true,
|
|
177
|
+
target: 99
|
|
178
|
+
}, {
|
|
179
|
+
noSemanticValidation: false,
|
|
180
|
+
noSyntaxValidation: false,
|
|
181
|
+
onlyVisible: false
|
|
182
|
+
}, {}, {}, modeConfigurationDefault);
|
|
183
|
+
var javascriptDefaults = new LanguageServiceDefaultsImpl({
|
|
184
|
+
allowNonTsExtensions: true,
|
|
185
|
+
allowJs: true,
|
|
186
|
+
target: 99
|
|
187
|
+
}, {
|
|
188
|
+
noSemanticValidation: true,
|
|
189
|
+
noSyntaxValidation: false,
|
|
190
|
+
onlyVisible: false
|
|
191
|
+
}, {}, {}, modeConfigurationDefault);
|
|
192
|
+
var getTypeScriptWorker = () => {
|
|
193
|
+
return getMode().then((mode) => mode.getTypeScriptWorker());
|
|
194
|
+
};
|
|
195
|
+
var getJavaScriptWorker = () => {
|
|
196
|
+
return getMode().then((mode) => mode.getJavaScriptWorker());
|
|
197
|
+
};
|
|
198
|
+
function getMode() {
|
|
199
|
+
return import("./tsMode-GTz-HPrN.js");
|
|
200
|
+
}
|
|
201
|
+
languages.onLanguage("typescript", () => {
|
|
202
|
+
return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
|
|
203
|
+
});
|
|
204
|
+
languages.onLanguage("javascript", () => {
|
|
205
|
+
return getMode().then((mode) => mode.setupJavaScript(javascriptDefaults));
|
|
206
|
+
});
|
|
207
|
+
// ../../node_modules/.pnpm/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js
|
|
208
|
+
var monaco_contribution_exports = /* @__PURE__ */ __exportAll({
|
|
209
|
+
JsxEmit: () => JsxEmit,
|
|
210
|
+
ModuleKind: () => ModuleKind,
|
|
211
|
+
ModuleResolutionKind: () => ModuleResolutionKind,
|
|
212
|
+
NewLineKind: () => NewLineKind,
|
|
213
|
+
ScriptTarget: () => ScriptTarget,
|
|
214
|
+
getJavaScriptWorker: () => getJavaScriptWorker,
|
|
215
|
+
getTypeScriptWorker: () => getTypeScriptWorker,
|
|
216
|
+
javascriptDefaults: () => javascriptDefaults,
|
|
217
|
+
typescriptDefaults: () => typescriptDefaults,
|
|
218
|
+
typescriptVersion: () => typescriptVersion
|
|
219
|
+
});
|
|
220
|
+
export { JsxEmit, ModuleKind, ModuleResolutionKind, NewLineKind, ScriptTarget, getJavaScriptWorker, getTypeScriptWorker, javascriptDefaults, monaco_contribution_exports as t, typescriptDefaults, typescriptVersion };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { onBeforeUnmount, onMounted, reactive, shallowRef } from "vue";
|
|
2
|
+
// src/components/toast.ts
|
|
3
|
+
var toastState = reactive([]);
|
|
4
|
+
var seed = 0;
|
|
5
|
+
/** 轻提示。用法:toast('已复制'), toast('保存失败', 'error') */
|
|
6
|
+
var toast = (text, type = "info", duration = 2400) => {
|
|
7
|
+
const id = ++seed;
|
|
8
|
+
toastState.push({
|
|
9
|
+
id,
|
|
10
|
+
text,
|
|
11
|
+
type
|
|
12
|
+
});
|
|
13
|
+
window.setTimeout(() => {
|
|
14
|
+
const index = toastState.findIndex((item) => item.id === id);
|
|
15
|
+
if (index > -1) toastState.splice(index, 1);
|
|
16
|
+
}, duration);
|
|
17
|
+
};
|
|
18
|
+
// src/payload/args.ts
|
|
19
|
+
/** 同一时刻只有一个场景挂载,所以只需要一个"当前入参"槽位 */
|
|
20
|
+
var currentArgs = shallowRef(null);
|
|
21
|
+
/**
|
|
22
|
+
* 在场景的 `<script setup>` 里声明可变入参,返回响应式对象:
|
|
23
|
+
* 面板改表单 → 这里同步变化 → 组件跟着重渲染。纯浏览器能力,生产环境同样可用。
|
|
24
|
+
*/
|
|
25
|
+
var useSceneArgs = (defaults, options = {}) => {
|
|
26
|
+
const values = reactive({ ...defaults });
|
|
27
|
+
const binding = {
|
|
28
|
+
values,
|
|
29
|
+
defaults: { ...defaults },
|
|
30
|
+
options
|
|
31
|
+
};
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
currentArgs.value = binding;
|
|
34
|
+
});
|
|
35
|
+
onBeforeUnmount(() => {
|
|
36
|
+
if (currentArgs.value === binding) currentArgs.value = null;
|
|
37
|
+
});
|
|
38
|
+
return values;
|
|
39
|
+
};
|
|
40
|
+
// src/payload/output.ts
|
|
41
|
+
/** 出参快照:由面板轮询调用,纯前端实现 */
|
|
42
|
+
var currentOutput = shallowRef(null);
|
|
43
|
+
var useSceneOutput = (getter) => {
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
currentOutput.value = getter;
|
|
46
|
+
});
|
|
47
|
+
onBeforeUnmount(() => {
|
|
48
|
+
if (currentOutput.value === getter) currentOutput.value = null;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
export { toast as a, useSceneArgs as i, useSceneOutput as n, toastState as o, currentArgs as r, currentOutput as t };
|