@vuetify/vue-repl 1.4.2 → 1.5.0
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/repl.d.ts +3 -0
- package/dist/style.css +30 -30
- package/dist/vue-repl.js +79 -50
- package/dist/vue-repl.js.map +1 -1
- package/package.json +1 -1
package/dist/repl.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export declare class ReplStore implements Store {
|
|
|
117
117
|
setFiles(newFiles: Record<string, string>, mainFile?: string): Promise<void>;
|
|
118
118
|
private forceSandboxReset;
|
|
119
119
|
private initImportMap;
|
|
120
|
+
private initLinks;
|
|
120
121
|
getImportMap(): any;
|
|
121
122
|
setImportMap(map: {
|
|
122
123
|
imports: Record<string, string>;
|
|
@@ -124,6 +125,7 @@ export declare class ReplStore implements Store {
|
|
|
124
125
|
}): void;
|
|
125
126
|
setVueVersion(version: string): Promise<void>;
|
|
126
127
|
resetVueVersion(): void;
|
|
128
|
+
getLinks(): any;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
export declare interface SFCOptions {
|
|
@@ -144,6 +146,7 @@ export declare interface Store {
|
|
|
144
146
|
getImportMap: () => any;
|
|
145
147
|
initialShowOutput: boolean;
|
|
146
148
|
initialOutputMode: OutputModes;
|
|
149
|
+
getLinks: () => any;
|
|
147
150
|
}
|
|
148
151
|
|
|
149
152
|
export declare interface StoreOptions {
|
package/dist/style.css
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
|
-
.split-pane[data-v-
|
|
2
|
+
.split-pane[data-v-09a71c4b] {
|
|
3
3
|
display: flex;
|
|
4
4
|
height: 100%;
|
|
5
5
|
position: relative;
|
|
6
6
|
}
|
|
7
|
-
.split-pane.dragging[data-v-
|
|
7
|
+
.split-pane.dragging[data-v-09a71c4b] {
|
|
8
8
|
cursor: ew-resize;
|
|
9
9
|
}
|
|
10
|
-
.dragging .left[data-v-
|
|
11
|
-
.dragging .right[data-v-
|
|
10
|
+
.dragging .left[data-v-09a71c4b],
|
|
11
|
+
.dragging .right[data-v-09a71c4b] {
|
|
12
12
|
pointer-events: none;
|
|
13
13
|
}
|
|
14
|
-
.left[data-v-
|
|
15
|
-
.right[data-v-
|
|
14
|
+
.left[data-v-09a71c4b],
|
|
15
|
+
.right[data-v-09a71c4b] {
|
|
16
16
|
position: relative;
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
|
-
.left[data-v-
|
|
19
|
+
.left[data-v-09a71c4b] {
|
|
20
20
|
border-right: 1px solid var(--border);
|
|
21
21
|
}
|
|
22
|
-
.dragger[data-v-
|
|
22
|
+
.dragger[data-v-09a71c4b] {
|
|
23
23
|
position: absolute;
|
|
24
24
|
z-index: 3;
|
|
25
25
|
top: 0;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
width: 10px;
|
|
29
29
|
cursor: ew-resize;
|
|
30
30
|
}
|
|
31
|
-
.toggler[data-v-
|
|
31
|
+
.toggler[data-v-09a71c4b] {
|
|
32
32
|
display: none;
|
|
33
33
|
z-index: 3;
|
|
34
34
|
font-family: var(--font-code);
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
|
|
46
46
|
/* vertical */
|
|
47
47
|
@media (min-width: 721px) {
|
|
48
|
-
.split-pane.vertical[data-v-
|
|
48
|
+
.split-pane.vertical[data-v-09a71c4b] {
|
|
49
49
|
display: block;
|
|
50
50
|
}
|
|
51
|
-
.split-pane.vertical.dragging[data-v-
|
|
51
|
+
.split-pane.vertical.dragging[data-v-09a71c4b] {
|
|
52
52
|
cursor: ns-resize;
|
|
53
53
|
}
|
|
54
|
-
.vertical .dragger[data-v-
|
|
54
|
+
.vertical .dragger[data-v-09a71c4b] {
|
|
55
55
|
top: auto;
|
|
56
56
|
height: 10px;
|
|
57
57
|
width: 100%;
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
bottom: -5px;
|
|
61
61
|
cursor: ns-resize;
|
|
62
62
|
}
|
|
63
|
-
.vertical .left[data-v-
|
|
64
|
-
.vertical .right[data-v-
|
|
63
|
+
.vertical .left[data-v-09a71c4b],
|
|
64
|
+
.vertical .right[data-v-09a71c4b] {
|
|
65
65
|
width: 100%;
|
|
66
66
|
}
|
|
67
|
-
.vertical .left[data-v-
|
|
67
|
+
.vertical .left[data-v-09a71c4b] {
|
|
68
68
|
border-right: none;
|
|
69
69
|
border-bottom: 1px solid var(--border);
|
|
70
70
|
}
|
|
@@ -72,38 +72,38 @@
|
|
|
72
72
|
|
|
73
73
|
/* mobile */
|
|
74
74
|
@media (max-width: 720px) {
|
|
75
|
-
.left[data-v-
|
|
76
|
-
.right[data-v-
|
|
75
|
+
.left[data-v-09a71c4b],
|
|
76
|
+
.right[data-v-09a71c4b] {
|
|
77
77
|
width: 100% !important;
|
|
78
78
|
height: 100% !important;
|
|
79
79
|
}
|
|
80
|
-
.dragger[data-v-
|
|
80
|
+
.dragger[data-v-09a71c4b] {
|
|
81
81
|
display: none;
|
|
82
82
|
}
|
|
83
|
-
.split-pane .toggler[data-v-
|
|
83
|
+
.split-pane .toggler[data-v-09a71c4b] {
|
|
84
84
|
display: block;
|
|
85
85
|
}
|
|
86
|
-
.split-pane .right[data-v-
|
|
86
|
+
.split-pane .right[data-v-09a71c4b] {
|
|
87
87
|
display: none;
|
|
88
88
|
}
|
|
89
|
-
.split-pane.show-output .right[data-v-
|
|
89
|
+
.split-pane.show-output .right[data-v-09a71c4b] {
|
|
90
90
|
display: block;
|
|
91
91
|
}
|
|
92
|
-
.split-pane.show-output .left[data-v-
|
|
92
|
+
.split-pane.show-output .left[data-v-09a71c4b] {
|
|
93
93
|
display: none;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
98
|
-
|
|
97
|
+
.remove[data-v-ca5e80cf] {
|
|
98
|
+
align-self: flex-end;
|
|
99
99
|
}
|
|
100
|
-
.file.import-map[data-v-
|
|
100
|
+
.file.import-map[data-v-ca5e80cf] {
|
|
101
101
|
/*position: sticky;*/
|
|
102
102
|
/*right: 0;*/
|
|
103
103
|
margin-left: auto;
|
|
104
104
|
background: rgb(var(--v-theme-background)) !important;
|
|
105
105
|
}
|
|
106
|
-
.file.pending input[data-v-
|
|
106
|
+
.file.pending input[data-v-ca5e80cf] {
|
|
107
107
|
width: 90px;
|
|
108
108
|
height: 30px;
|
|
109
109
|
line-height: 30px;
|
|
@@ -726,8 +726,8 @@ pre[data-v-92411507] {
|
|
|
726
726
|
position: relative;
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
.iframe-container[data-v-
|
|
730
|
-
.iframe-container[data-v-
|
|
729
|
+
.iframe-container[data-v-574b6cff],
|
|
730
|
+
.iframe-container[data-v-574b6cff] iframe {
|
|
731
731
|
width: 100%;
|
|
732
732
|
height: 100%;
|
|
733
733
|
border: none;
|
|
@@ -746,7 +746,7 @@ pre[data-v-92411507] {
|
|
|
746
746
|
text-transform: uppercase;
|
|
747
747
|
}
|
|
748
748
|
|
|
749
|
-
.vue-repl[data-v-
|
|
749
|
+
.vue-repl[data-v-ecf79494] {
|
|
750
750
|
--bg: rgb(var(--v-theme-background));
|
|
751
751
|
--bg-soft: rgb(var(--v-theme-surface));
|
|
752
752
|
--border: #383838;
|
|
@@ -754,7 +754,7 @@ pre[data-v-92411507] {
|
|
|
754
754
|
--color-branding: #42d392;
|
|
755
755
|
--color-branding-dark: #89ddff;
|
|
756
756
|
--font-code: Menlo, Monaco, Consolas, 'Courier New', monospace;
|
|
757
|
-
--header-height:
|
|
757
|
+
--header-height: 44px;
|
|
758
758
|
|
|
759
759
|
font-size: 13px;
|
|
760
760
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
package/dist/vue-repl.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, inject, reactive, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, withModifiers, toDisplayString, createBlock, isRef, withCtx, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, createVNode, createTextVNode,
|
|
1
|
+
import { defineComponent, computed, ref, inject, reactive, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, withModifiers, toDisplayString, createBlock, isRef, withCtx, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, createVNode, createTextVNode, onMounted, watchEffect, watch, Transition, onUnmounted, vShow, version, provide, toRef } from 'vue';
|
|
2
2
|
import { VBtn } from 'vuetify/lib/components/VBtn/index.mjs';
|
|
3
|
+
import { VIcon } from 'vuetify/lib/components/VIcon/index.mjs';
|
|
3
4
|
import { VTabs, VTab } from 'vuetify/lib/components/VTabs/index.mjs';
|
|
4
5
|
import * as defaultCompiler from 'vue/compiler-sfc';
|
|
5
6
|
import { MagicString, babelParse, extractIdentifiers, walkIdentifiers, isStaticProperty, isInDestructureAssignment, walk, shouldTransformRef, transformRef } from 'vue/compiler-sfc';
|
|
@@ -17,9 +18,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const container = ref();
|
|
18
19
|
const store = inject("store");
|
|
19
20
|
const showOutput = ref(store.initialShowOutput);
|
|
21
|
+
const savedSplit = parseFloat(localStorage.getItem("vue-repl:split") ?? "");
|
|
20
22
|
const state = reactive({
|
|
21
23
|
dragging: false,
|
|
22
|
-
split: 50
|
|
24
|
+
split: !isNaN(savedSplit) ? savedSplit : 50
|
|
23
25
|
});
|
|
24
26
|
const boundSplit = computed(() => {
|
|
25
27
|
const { split } = state;
|
|
@@ -42,6 +44,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
42
44
|
}
|
|
43
45
|
function dragEnd() {
|
|
44
46
|
state.dragging = false;
|
|
47
|
+
localStorage.setItem("vue-repl:split", state.split.toString());
|
|
45
48
|
}
|
|
46
49
|
return (_ctx, _cache) => {
|
|
47
50
|
return openBlock(), createElementBlock("div", {
|
|
@@ -81,7 +84,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
81
84
|
}
|
|
82
85
|
});
|
|
83
86
|
|
|
84
|
-
const
|
|
87
|
+
const SplitPane_vue_vue_type_style_index_0_scoped_09a71c4b_lang = '';
|
|
85
88
|
|
|
86
89
|
const _export_sfc = (sfc, props) => {
|
|
87
90
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -91,37 +94,11 @@ const _export_sfc = (sfc, props) => {
|
|
|
91
94
|
return target;
|
|
92
95
|
};
|
|
93
96
|
|
|
94
|
-
const SplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
class: "icon",
|
|
100
|
-
width: "12",
|
|
101
|
-
height: "12",
|
|
102
|
-
viewBox: "0 0 24 24"
|
|
103
|
-
}, [
|
|
104
|
-
/* @__PURE__ */ createElementVNode("line", {
|
|
105
|
-
stroke: "#999",
|
|
106
|
-
x1: "18",
|
|
107
|
-
y1: "6",
|
|
108
|
-
x2: "6",
|
|
109
|
-
y2: "18"
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ createElementVNode("line", {
|
|
112
|
-
stroke: "#999",
|
|
113
|
-
x1: "6",
|
|
114
|
-
y1: "6",
|
|
115
|
-
x2: "18",
|
|
116
|
-
y2: "18"
|
|
117
|
-
})
|
|
118
|
-
], -1));
|
|
119
|
-
const _hoisted_3 = [
|
|
120
|
-
_hoisted_2
|
|
121
|
-
];
|
|
122
|
-
const _hoisted_4 = ["onKeyup"];
|
|
123
|
-
const _hoisted_5 = /* @__PURE__ */ createTextVNode("+");
|
|
124
|
-
const _hoisted_6 = /* @__PURE__ */ createTextVNode(" Import Map ");
|
|
97
|
+
const SplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-09a71c4b"]]);
|
|
98
|
+
|
|
99
|
+
const _hoisted_1$2 = ["onKeyup"];
|
|
100
|
+
const _hoisted_2 = /* @__PURE__ */ createTextVNode(" Import Map ");
|
|
101
|
+
const _hoisted_3 = /* @__PURE__ */ createTextVNode(" Links ");
|
|
125
102
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
126
103
|
__name: "FileSelector",
|
|
127
104
|
setup(__props) {
|
|
@@ -129,9 +106,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
129
106
|
const pending = ref(false);
|
|
130
107
|
const pendingFilename = ref("Comp.vue");
|
|
131
108
|
const importMapFile = "import-map.json";
|
|
109
|
+
const linksFile = "links.json";
|
|
132
110
|
const showImportMap = inject("import-map");
|
|
133
111
|
const files = computed(
|
|
134
|
-
() => Object.entries(store.state.files).filter(([name, file]) => name
|
|
112
|
+
() => Object.entries(store.state.files).filter(([name, file]) => ![importMapFile, linksFile].includes(name) && !file.hidden).map(([name]) => name)
|
|
135
113
|
);
|
|
136
114
|
function startAddFile() {
|
|
137
115
|
let i = 0;
|
|
@@ -185,6 +163,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
185
163
|
}
|
|
186
164
|
});
|
|
187
165
|
return (_ctx, _cache) => {
|
|
166
|
+
|
|
188
167
|
|
|
189
168
|
|
|
190
169
|
|
|
@@ -208,11 +187,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
208
187
|
}, {
|
|
209
188
|
default: withCtx(() => [
|
|
210
189
|
createElementVNode("span", null, toDisplayString(file), 1),
|
|
211
|
-
i > 0 ? (openBlock(),
|
|
190
|
+
i > 0 ? (openBlock(), createBlock(VIcon, {
|
|
212
191
|
key: 0,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
192
|
+
onClick: withModifiers(($event) => unref(store).deleteFile(file), ["stop"]),
|
|
193
|
+
icon: "mdi-close",
|
|
194
|
+
class: "ms-2 remove"
|
|
195
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
216
196
|
]),
|
|
217
197
|
_: 2
|
|
218
198
|
}, 1032, ["value"]);
|
|
@@ -232,7 +212,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
232
212
|
withKeys(cancelAddFile, ["esc"])
|
|
233
213
|
],
|
|
234
214
|
onVnodeMounted: focus
|
|
235
|
-
}, null, 40,
|
|
215
|
+
}, null, 40, _hoisted_1$2), [
|
|
236
216
|
[vModelText, pendingFilename.value]
|
|
237
217
|
])
|
|
238
218
|
]),
|
|
@@ -244,7 +224,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
244
224
|
onClick: startAddFile
|
|
245
225
|
}, {
|
|
246
226
|
default: withCtx(() => [
|
|
247
|
-
|
|
227
|
+
createVNode(VIcon, { icon: "mdi-plus" })
|
|
248
228
|
]),
|
|
249
229
|
_: 1
|
|
250
230
|
}),
|
|
@@ -255,10 +235,20 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
255
235
|
value: importMapFile
|
|
256
236
|
}, {
|
|
257
237
|
default: withCtx(() => [
|
|
258
|
-
|
|
238
|
+
_hoisted_2
|
|
259
239
|
]),
|
|
260
240
|
_: 1
|
|
261
|
-
})) : createCommentVNode("", true)
|
|
241
|
+
})) : createCommentVNode("", true),
|
|
242
|
+
createVNode(VTab, {
|
|
243
|
+
class: "file",
|
|
244
|
+
size: "small",
|
|
245
|
+
value: linksFile
|
|
246
|
+
}, {
|
|
247
|
+
default: withCtx(() => [
|
|
248
|
+
_hoisted_3
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
})
|
|
262
252
|
]),
|
|
263
253
|
_: 1
|
|
264
254
|
}, 8, ["modelValue", "class"]);
|
|
@@ -266,9 +256,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
266
256
|
}
|
|
267
257
|
});
|
|
268
258
|
|
|
269
|
-
const
|
|
259
|
+
const FileSelector_vue_vue_type_style_index_0_scoped_ca5e80cf_lang = '';
|
|
270
260
|
|
|
271
|
-
const FileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
261
|
+
const FileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-ca5e80cf"]]);
|
|
272
262
|
|
|
273
263
|
// DEFLATE is a complex format; to read this code, you should probably check the RFC first:
|
|
274
264
|
|
|
@@ -14865,7 +14855,7 @@ const Editor_vue_vue_type_style_index_0_scoped_0384e940_lang = '';
|
|
|
14865
14855
|
|
|
14866
14856
|
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0384e940"]]);
|
|
14867
14857
|
|
|
14868
|
-
const srcdoc = "<!doctype html>\n<html>\n\t<head>\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n\t\t\t\tOxygen, Ubuntu, Cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t\t<style id=\"__sfc-styles\"></style>\n\t\t<script>\n\t\t\t(() => {\n\t\t\t\tlet scriptEls = []\n\n\t\t\t\twindow.process = { env: {} }\n\t\t\t\twindow.__modules__ = {}\n\n\t\t\t\twindow.__export__ = (mod, key, get) => {\n\t\t\t\t\tObject.defineProperty(mod, key, {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\tget\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\twindow.__dynamic_import__ = key => {\n\t\t\t\t\treturn Promise.resolve(window.__modules__[key])\n\t\t\t\t}\n\n\t\t\t\tasync function handle_message(ev) {\n\t\t\t\t\tlet { action, cmd_id } = ev.data;\n\t\t\t\t\tconst send_message = (payload) => parent.postMessage( { ...payload }, ev.origin);\n\t\t\t\t\tconst send_reply = (payload) => send_message({ ...payload, cmd_id });\n\t\t\t\t\tconst send_ok = () => send_reply({ action: 'cmd_ok' });\n\t\t\t\t\tconst send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack });\n\n\t\t\t\t\tif (action === 'eval') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (scriptEls.length) {\n\t\t\t\t\t\t\t\tscriptEls.forEach(el => {\n\t\t\t\t\t\t\t\t\tdocument.head.removeChild(el)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tscriptEls.length = 0\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet { script: scripts } = ev.data.args\n\t\t\t\t\t\t\tif (typeof scripts === 'string') scripts = [scripts]\n\n\t\t\t\t\t\t\tfor (const script of scripts) {\n\t\t\t\t\t\t\t\tconst scriptEl = document.createElement('script')\n\t\t\t\t\t\t\t\tscriptEl.setAttribute('type', 'module')\n\t\t\t\t\t\t\t\t// send ok in the module script to ensure sequential evaluation\n\t\t\t\t\t\t\t\t// of multiple proxy.eval() calls\n\t\t\t\t\t\t\t\tconst done = new Promise((resolve) => {\n\t\t\t\t\t\t\t\t\twindow.__next__ = resolve\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tscriptEl.innerHTML = script + `\\nwindow.__next__()`\n\t\t\t\t\t\t\t\tdocument.head.appendChild(scriptEl)\n\t\t\t\t\t\t\t\tscriptEl.onerror = err => send_error(err.message, err.stack)\n\t\t\t\t\t\t\t\tscriptEls.push(scriptEl)\n\t\t\t\t\t\t\t\tawait done\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsend_ok()\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tsend_error(e.message, e.stack);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (action === 'catch_clicks') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst top_origin = ev.origin;\n\t\t\t\t\t\t\tdocument.body.addEventListener('click', event => {\n\t\t\t\t\t\t\t\tif (event.which !== 1) return;\n\t\t\t\t\t\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey) return;\n\t\t\t\t\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\t\t\t\t\t// ensure target is a link\n\t\t\t\t\t\t\t\tlet el = event.target;\n\t\t\t\t\t\t\t\twhile (el && el.nodeName !== 'A') el = el.parentNode;\n\t\t\t\t\t\t\t\tif (!el || el.nodeName !== 'A') return;\n\n\t\t\t\t\t\t\t\tif (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return;\n\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\t\tif (el.href.startsWith(top_origin)) {\n\t\t\t\t\t\t\t\t\tconst url = new URL(el.href);\n\t\t\t\t\t\t\t\t\tif (url.hash[0] === '#') {\n\t\t\t\t\t\t\t\t\t\twindow.location.hash = url.hash;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\twindow.open(el.href, '_blank');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tsend_ok();\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\tsend_error(e.message, e.stack);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twindow.addEventListener('message', handle_message, false);\n\n\t\t\t\twindow.onerror = function (msg, url, lineNo, columnNo, error) {\n\t\t\t\t\tif (msg.includes('module specifier “vue”')) {\n\t\t\t\t\t\t// firefox only error, ignore\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparent.postMessage({ action: 'error', value: error }, '*');\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparent.postMessage({ action: 'error', value: msg }, '*');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twindow.addEventListener(\"unhandledrejection\", event => {\n\t\t\t\t\tif (event.reason.message.includes('Cross-origin')) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tlet previous = { level: null, args: null };\n\n\t\t\t\t['clear', 'log', 'info', 'dir', 'warn', 'error', 'table'].forEach((level) => {\n\t\t\t\t\tconst original = console[level];\n\t\t\t\t\tconsole[level] = (...args) => {\n\t\t\t\t\t\tconst msg = String(args[0])\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tmsg.includes('You are running a development build of Vue') ||\n\t\t\t\t\t\t\tmsg.includes('You are running the esm-bundler build of Vue')\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst stringifiedArgs = stringify(args);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tprevious.level === level &&\n\t\t\t\t\t\t\tprevious.args &&\n\t\t\t\t\t\t\tprevious.args === stringifiedArgs\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, duplicate: true }, '*');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprevious = { level, args: stringifiedArgs };\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, args }, '*');\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, args: args.map(a => {\n\t\t\t\t\t\t\t\t\treturn a instanceof Error ? a.message : String(a)\n\t\t\t\t\t\t\t\t}) }, '*');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\toriginal(...args);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t[\n\t\t\t\t\t{ method: 'group', action: 'console_group' },\n\t\t\t\t\t{ method: 'groupEnd', action: 'console_group_end' },\n\t\t\t\t\t{ method: 'groupCollapsed', action: 'console_group_collapsed' },\n\t\t\t\t].forEach((group_action) => {\n\t\t\t\t\tconst original = console[group_action.method];\n\t\t\t\t\tconsole[group_action.method] = (label) => {\n\t\t\t\t\t\tparent.postMessage({ action: group_action.action, label }, '*');\n\n\t\t\t\t\t\toriginal(label);\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst timers = new Map();\n\t\t\t\tconst original_time = console.time;\n\t\t\t\tconst original_timelog = console.timeLog;\n\t\t\t\tconst original_timeend = console.timeEnd;\n\n\t\t\t\tconsole.time = (label = 'default') => {\n\t\t\t\t\toriginal_time(label);\n\t\t\t\t\ttimers.set(label, performance.now());\n\t\t\t\t}\n\t\t\t\tconsole.timeLog = (label = 'default') => {\n\t\t\t\t\toriginal_timelog(label);\n\t\t\t\t\tconst now = performance.now();\n\t\t\t\t\tif (timers.has(label)) {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: [`${label}: ${now - timers.get(label)}ms`] }, '*');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: [`Timer '${label}' does not exist`] }, '*');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconsole.timeEnd = (label = 'default') => {\n\t\t\t\t\toriginal_timeend(label);\n\t\t\t\t\tconst now = performance.now();\n\t\t\t\t\tif (timers.has(label)) {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: [`${label}: ${now - timers.get(label)}ms`] }, '*');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: [`Timer '${label}' does not exist`] }, '*');\n\t\t\t\t\t}\n\t\t\t\t\ttimers.delete(label);\n\t\t\t\t};\n\n\t\t\t\tconst original_assert = console.assert;\n\t\t\t\tconsole.assert = (condition, ...args) => {\n\t\t\t\t\tif (condition) {\n\t\t\t\t\t\tconst stack = new Error().stack;\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'assert', args, stack }, '*');\n\t\t\t\t\t}\n\t\t\t\t\toriginal_assert(condition, ...args);\n\t\t\t\t};\n\n\t\t\t\tconst counter = new Map();\n\t\t\t\tconst original_count = console.count;\n\t\t\t\tconst original_countreset = console.countReset;\n\n\t\t\t\tconsole.count = (label = 'default') => {\n\t\t\t\t\tcounter.set(label, (counter.get(label) || 0) + 1);\n\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: `${label}: ${counter.get(label)}` }, '*');\n\t\t\t\t\toriginal_count(label);\n\t\t\t\t};\n\n\t\t\t\tconsole.countReset = (label = 'default') => {\n\t\t\t\t\tif (counter.has(label)) {\n\t\t\t\t\t\tcounter.set(label, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: `Count for '${label}' does not exist` }, '*');\n\t\t\t\t\t}\n\t\t\t\t\toriginal_countreset(label);\n\t\t\t\t};\n\n\t\t\t\tconst original_trace = console.trace;\n\n\t\t\t\tconsole.trace = (...args) => {\n\t\t\t\t\tconst stack = new Error().stack;\n\t\t\t\t\tparent.postMessage({ action: 'console', level: 'trace', args, stack }, '*');\n\t\t\t\t\toriginal_trace(...args);\n\t\t\t\t};\n\n\t\t\t\tfunction stringify(args) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn JSON.stringify(args);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})()\n\t\t</script>\n\n\t\t<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->\n\t\t<script async src=\"https://unpkg.com/es-module-shims@1.5.18/dist/es-module-shims.wasm.js\"></script>\n\t\t<script type=\"importmap\"><!--IMPORT_MAP--></script>\n\t</head>\n\t<body></body>\n</html>\n";
|
|
14858
|
+
const srcdoc = "<!doctype html>\n<html>\n\t<head>\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n\t\t\t\tOxygen, Ubuntu, Cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t\t<style id=\"__sfc-styles\"></style>\n\t\t<script>\n\t\t\t(() => {\n\t\t\t\tlet scriptEls = []\n\n\t\t\t\twindow.process = { env: {} }\n\t\t\t\twindow.__modules__ = {}\n\n\t\t\t\twindow.__export__ = (mod, key, get) => {\n\t\t\t\t\tObject.defineProperty(mod, key, {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\tget\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\twindow.__dynamic_import__ = key => {\n\t\t\t\t\treturn Promise.resolve(window.__modules__[key])\n\t\t\t\t}\n\n\t\t\t\tasync function handle_message(ev) {\n\t\t\t\t\tlet { action, cmd_id } = ev.data;\n\t\t\t\t\tconst send_message = (payload) => parent.postMessage( { ...payload }, ev.origin);\n\t\t\t\t\tconst send_reply = (payload) => send_message({ ...payload, cmd_id });\n\t\t\t\t\tconst send_ok = () => send_reply({ action: 'cmd_ok' });\n\t\t\t\t\tconst send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack });\n\n\t\t\t\t\tif (action === 'eval') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (scriptEls.length) {\n\t\t\t\t\t\t\t\tscriptEls.forEach(el => {\n\t\t\t\t\t\t\t\t\tdocument.head.removeChild(el)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tscriptEls.length = 0\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet { script: scripts } = ev.data.args\n\t\t\t\t\t\t\tif (typeof scripts === 'string') scripts = [scripts]\n\n\t\t\t\t\t\t\tfor (const script of scripts) {\n\t\t\t\t\t\t\t\tconst scriptEl = document.createElement('script')\n\t\t\t\t\t\t\t\tscriptEl.setAttribute('type', 'module')\n\t\t\t\t\t\t\t\t// send ok in the module script to ensure sequential evaluation\n\t\t\t\t\t\t\t\t// of multiple proxy.eval() calls\n\t\t\t\t\t\t\t\tconst done = new Promise((resolve) => {\n\t\t\t\t\t\t\t\t\twindow.__next__ = resolve\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tscriptEl.innerHTML = script + `\\nwindow.__next__()`\n\t\t\t\t\t\t\t\tdocument.head.appendChild(scriptEl)\n\t\t\t\t\t\t\t\tscriptEl.onerror = err => send_error(err.message, err.stack)\n\t\t\t\t\t\t\t\tscriptEls.push(scriptEl)\n\t\t\t\t\t\t\t\tawait done\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsend_ok()\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tsend_error(e.message, e.stack);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (action === 'catch_clicks') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst top_origin = ev.origin;\n\t\t\t\t\t\t\tdocument.body.addEventListener('click', event => {\n\t\t\t\t\t\t\t\tif (event.which !== 1) return;\n\t\t\t\t\t\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey) return;\n\t\t\t\t\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\t\t\t\t\t// ensure target is a link\n\t\t\t\t\t\t\t\tlet el = event.target;\n\t\t\t\t\t\t\t\twhile (el && el.nodeName !== 'A') el = el.parentNode;\n\t\t\t\t\t\t\t\tif (!el || el.nodeName !== 'A') return;\n\n\t\t\t\t\t\t\t\tif (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return;\n\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\t\tif (el.href.startsWith(top_origin)) {\n\t\t\t\t\t\t\t\t\tconst url = new URL(el.href);\n\t\t\t\t\t\t\t\t\tif (url.hash[0] === '#') {\n\t\t\t\t\t\t\t\t\t\twindow.location.hash = url.hash;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\twindow.open(el.href, '_blank');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tsend_ok();\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\tsend_error(e.message, e.stack);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twindow.addEventListener('message', handle_message, false);\n\n\t\t\t\twindow.onerror = function (msg, url, lineNo, columnNo, error) {\n\t\t\t\t\tif (msg.includes('module specifier “vue”')) {\n\t\t\t\t\t\t// firefox only error, ignore\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparent.postMessage({ action: 'error', value: error }, '*');\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparent.postMessage({ action: 'error', value: msg }, '*');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twindow.addEventListener(\"unhandledrejection\", event => {\n\t\t\t\t\tif (event.reason.message.includes('Cross-origin')) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tlet previous = { level: null, args: null };\n\n\t\t\t\t['clear', 'log', 'info', 'dir', 'warn', 'error', 'table'].forEach((level) => {\n\t\t\t\t\tconst original = console[level];\n\t\t\t\t\tconsole[level] = (...args) => {\n\t\t\t\t\t\tconst msg = String(args[0])\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tmsg.includes('You are running a development build of Vue') ||\n\t\t\t\t\t\t\tmsg.includes('You are running the esm-bundler build of Vue')\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst stringifiedArgs = stringify(args);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tprevious.level === level &&\n\t\t\t\t\t\t\tprevious.args &&\n\t\t\t\t\t\t\tprevious.args === stringifiedArgs\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, duplicate: true }, '*');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprevious = { level, args: stringifiedArgs };\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, args }, '*');\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tparent.postMessage({ action: 'console', level, args: args.map(a => {\n\t\t\t\t\t\t\t\t\treturn a instanceof Error ? a.message : String(a)\n\t\t\t\t\t\t\t\t}) }, '*');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\toriginal(...args);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t[\n\t\t\t\t\t{ method: 'group', action: 'console_group' },\n\t\t\t\t\t{ method: 'groupEnd', action: 'console_group_end' },\n\t\t\t\t\t{ method: 'groupCollapsed', action: 'console_group_collapsed' },\n\t\t\t\t].forEach((group_action) => {\n\t\t\t\t\tconst original = console[group_action.method];\n\t\t\t\t\tconsole[group_action.method] = (label) => {\n\t\t\t\t\t\tparent.postMessage({ action: group_action.action, label }, '*');\n\n\t\t\t\t\t\toriginal(label);\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst timers = new Map();\n\t\t\t\tconst original_time = console.time;\n\t\t\t\tconst original_timelog = console.timeLog;\n\t\t\t\tconst original_timeend = console.timeEnd;\n\n\t\t\t\tconsole.time = (label = 'default') => {\n\t\t\t\t\toriginal_time(label);\n\t\t\t\t\ttimers.set(label, performance.now());\n\t\t\t\t}\n\t\t\t\tconsole.timeLog = (label = 'default') => {\n\t\t\t\t\toriginal_timelog(label);\n\t\t\t\t\tconst now = performance.now();\n\t\t\t\t\tif (timers.has(label)) {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: [`${label}: ${now - timers.get(label)}ms`] }, '*');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: [`Timer '${label}' does not exist`] }, '*');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconsole.timeEnd = (label = 'default') => {\n\t\t\t\t\toriginal_timeend(label);\n\t\t\t\t\tconst now = performance.now();\n\t\t\t\t\tif (timers.has(label)) {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: [`${label}: ${now - timers.get(label)}ms`] }, '*');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: [`Timer '${label}' does not exist`] }, '*');\n\t\t\t\t\t}\n\t\t\t\t\ttimers.delete(label);\n\t\t\t\t};\n\n\t\t\t\tconst original_assert = console.assert;\n\t\t\t\tconsole.assert = (condition, ...args) => {\n\t\t\t\t\tif (condition) {\n\t\t\t\t\t\tconst stack = new Error().stack;\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'assert', args, stack }, '*');\n\t\t\t\t\t}\n\t\t\t\t\toriginal_assert(condition, ...args);\n\t\t\t\t};\n\n\t\t\t\tconst counter = new Map();\n\t\t\t\tconst original_count = console.count;\n\t\t\t\tconst original_countreset = console.countReset;\n\n\t\t\t\tconsole.count = (label = 'default') => {\n\t\t\t\t\tcounter.set(label, (counter.get(label) || 0) + 1);\n\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-log', args: `${label}: ${counter.get(label)}` }, '*');\n\t\t\t\t\toriginal_count(label);\n\t\t\t\t};\n\n\t\t\t\tconsole.countReset = (label = 'default') => {\n\t\t\t\t\tif (counter.has(label)) {\n\t\t\t\t\t\tcounter.set(label, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.postMessage({ action: 'console', level: 'system-warn', args: `Count for '${label}' does not exist` }, '*');\n\t\t\t\t\t}\n\t\t\t\t\toriginal_countreset(label);\n\t\t\t\t};\n\n\t\t\t\tconst original_trace = console.trace;\n\n\t\t\t\tconsole.trace = (...args) => {\n\t\t\t\t\tconst stack = new Error().stack;\n\t\t\t\t\tparent.postMessage({ action: 'console', level: 'trace', args, stack }, '*');\n\t\t\t\t\toriginal_trace(...args);\n\t\t\t\t};\n\n\t\t\t\tfunction stringify(args) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn JSON.stringify(args);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})()\n\t\t</script>\n\n\t\t<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->\n\t\t<script async src=\"https://unpkg.com/es-module-shims@1.5.18/dist/es-module-shims.wasm.js\"></script>\n\t\t<script type=\"importmap\"><!--IMPORT_MAP--></script>\n\t\t<!--CSS-->\n\t</head>\n\t<body></body>\n</html>\n";
|
|
14869
14859
|
|
|
14870
14860
|
let uid = 1;
|
|
14871
14861
|
class PreviewProxy {
|
|
@@ -15201,6 +15191,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
15201
15191
|
}
|
|
15202
15192
|
}
|
|
15203
15193
|
);
|
|
15194
|
+
watch(
|
|
15195
|
+
() => store.state.files["links.json"].code,
|
|
15196
|
+
() => {
|
|
15197
|
+
try {
|
|
15198
|
+
createSandbox();
|
|
15199
|
+
} catch (e) {
|
|
15200
|
+
store.state.errors = [e];
|
|
15201
|
+
}
|
|
15202
|
+
}
|
|
15203
|
+
);
|
|
15204
15204
|
watch(() => store.state.resetFlip, createSandbox);
|
|
15205
15205
|
onUnmounted(() => {
|
|
15206
15206
|
proxy.destroy();
|
|
@@ -15232,9 +15232,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
15232
15232
|
if (!importMap.imports.vue) {
|
|
15233
15233
|
importMap.imports.vue = store.state.vueRuntimeURL;
|
|
15234
15234
|
}
|
|
15235
|
+
const links = store.getLinks();
|
|
15236
|
+
if (!links.css) {
|
|
15237
|
+
links.css = [];
|
|
15238
|
+
}
|
|
15235
15239
|
const sandboxSrc = srcdoc.replace(
|
|
15236
15240
|
/<!--IMPORT_MAP-->/,
|
|
15237
15241
|
JSON.stringify(importMap)
|
|
15242
|
+
).replace(
|
|
15243
|
+
/<!--CSS-->/,
|
|
15244
|
+
links.css.map((link) => `<link rel="stylesheet" type="text/css" href="${link}" />`).join("\n")
|
|
15238
15245
|
);
|
|
15239
15246
|
sandbox.srcdoc = sandboxSrc;
|
|
15240
15247
|
container.value.appendChild(sandbox);
|
|
@@ -15380,9 +15387,9 @@ if (window.__app__) window.__app__.unmount()
|
|
|
15380
15387
|
}
|
|
15381
15388
|
});
|
|
15382
15389
|
|
|
15383
|
-
const
|
|
15390
|
+
const Preview_vue_vue_type_style_index_0_scoped_574b6cff_lang = '';
|
|
15384
15391
|
|
|
15385
|
-
const Preview = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
15392
|
+
const Preview = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-574b6cff"]]);
|
|
15386
15393
|
|
|
15387
15394
|
const _hoisted_1 = { class: "output-container" };
|
|
15388
15395
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -29007,6 +29014,7 @@ class ReplStore {
|
|
|
29007
29014
|
resetFlip: true
|
|
29008
29015
|
});
|
|
29009
29016
|
this.initImportMap();
|
|
29017
|
+
this.initLinks();
|
|
29010
29018
|
}
|
|
29011
29019
|
init() {
|
|
29012
29020
|
watchEffect(() => compileFile(this, this.state.activeFile));
|
|
@@ -29057,6 +29065,7 @@ class ReplStore {
|
|
|
29057
29065
|
this.state.mainFile = mainFile;
|
|
29058
29066
|
this.state.files = files;
|
|
29059
29067
|
this.initImportMap();
|
|
29068
|
+
this.initLinks();
|
|
29060
29069
|
this.setActive(mainFile);
|
|
29061
29070
|
this.forceSandboxReset();
|
|
29062
29071
|
}
|
|
@@ -29093,6 +29102,17 @@ class ReplStore {
|
|
|
29093
29102
|
}
|
|
29094
29103
|
}
|
|
29095
29104
|
}
|
|
29105
|
+
initLinks() {
|
|
29106
|
+
const links = this.state.files["links.json"];
|
|
29107
|
+
if (!links) {
|
|
29108
|
+
this.state.files["links.json"] = new File(
|
|
29109
|
+
"links.json",
|
|
29110
|
+
JSON.stringify({
|
|
29111
|
+
css: []
|
|
29112
|
+
}, null, 2)
|
|
29113
|
+
);
|
|
29114
|
+
}
|
|
29115
|
+
}
|
|
29096
29116
|
getImportMap() {
|
|
29097
29117
|
try {
|
|
29098
29118
|
return JSON.parse(this.state.files["import-map.json"].code);
|
|
@@ -29140,6 +29160,15 @@ class ReplStore {
|
|
|
29140
29160
|
this.forceSandboxReset();
|
|
29141
29161
|
console.info(`[@vue/repl] Now using default Vue version`);
|
|
29142
29162
|
}
|
|
29163
|
+
getLinks() {
|
|
29164
|
+
try {
|
|
29165
|
+
return JSON.parse(this.state.files["links.json"].code);
|
|
29166
|
+
} catch (e) {
|
|
29167
|
+
this.state.errors = [
|
|
29168
|
+
`Syntax error in links.json: ${e.message}`
|
|
29169
|
+
];
|
|
29170
|
+
}
|
|
29171
|
+
}
|
|
29143
29172
|
}
|
|
29144
29173
|
|
|
29145
29174
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -29188,9 +29217,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29188
29217
|
}
|
|
29189
29218
|
});
|
|
29190
29219
|
|
|
29191
|
-
const
|
|
29220
|
+
const Repl_vue_vue_type_style_index_0_scoped_ecf79494_lang = '';
|
|
29192
29221
|
|
|
29193
|
-
const Repl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
29222
|
+
const Repl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ecf79494"]]);
|
|
29194
29223
|
|
|
29195
29224
|
export { File, Preview, Repl, ReplStore, compileFile };
|
|
29196
29225
|
//# sourceMappingURL=vue-repl.js.map
|