artifactuse 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/state.d.ts +2 -0
- package/dist/{index-INYOxlcg.js → index-B4BEvWtI.js} +520 -504
- package/dist/index.js +1 -1
- package/dist/react/index.js +392 -389
- package/dist/svelte/index.d.ts +15 -0
- package/dist/svelte/index.js +1436 -1415
- package/dist/vue/index.d.ts +12 -0
- package/dist/vue/index.js +1143 -1129
- package/dist/vue2/composables.d.ts +12 -0
- package/dist/vue2/index.js +118 -29
- package/package.json +1 -1
package/dist/vue/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as M, computed as C, createElementBlock as s, openBlock as a, normalizeClass as
|
|
2
|
-
import { g as
|
|
3
|
-
import { J as
|
|
4
|
-
const
|
|
1
|
+
import { ref as M, computed as C, createElementBlock as s, openBlock as a, normalizeClass as j, createElementVNode as e, toDisplayString as l, withModifiers as he, onMounted as Me, watch as de, Fragment as R, createCommentVNode as v, renderList as ve, createTextVNode as K, h as se, normalizeStyle as He, createStaticVNode as Ot, createBlock as $e, resolveDynamicComponent as Ut, nextTick as xe, onUnmounted as We, Teleport as Dt, createVNode as ze, Transition as Ee, withCtx as Be, withKeys as Nt, onBeforeUnmount as jt, unref as y, withDirectives as lt, vShow as nt, reactive as rt, provide as Wt, inject as Jt } from "vue";
|
|
2
|
+
import { g as Se, f as ct, a as Ne, b as je, n as Xt, i as ot, c as Zt, D as Kt, d as ut } from "../index-B4BEvWtI.js";
|
|
3
|
+
import { J as Yt } from "../jszip.min-CdmYyw5L.js";
|
|
4
|
+
const Qt = { class: "artifactuse-card__icon" }, Gt = ["innerHTML"], ea = { class: "artifactuse-card__content" }, ta = { class: "artifactuse-card__title" }, aa = { class: "artifactuse-card__meta" }, sa = { class: "artifactuse-card__type" }, ia = { class: "artifactuse-card__size" }, la = { class: "artifactuse-card__actions" }, na = ["title"], oa = {
|
|
5
5
|
key: 0,
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
fill: "none",
|
|
8
8
|
stroke: "currentColor",
|
|
9
9
|
"stroke-width": "2"
|
|
10
|
-
},
|
|
10
|
+
}, ra = {
|
|
11
11
|
key: 1,
|
|
12
12
|
viewBox: "0 0 24 24",
|
|
13
13
|
fill: "none",
|
|
14
14
|
stroke: "currentColor",
|
|
15
15
|
"stroke-width": "2"
|
|
16
|
-
},
|
|
16
|
+
}, ca = {
|
|
17
17
|
__name: "ArtifactuseCard",
|
|
18
18
|
props: {
|
|
19
19
|
artifact: {
|
|
@@ -27,57 +27,57 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["open", "copy", "download"],
|
|
29
29
|
setup(H, { emit: c }) {
|
|
30
|
-
const
|
|
30
|
+
const _ = H, T = c, f = M(!1), o = C(() => Se(_.artifact.language)), q = C(() => {
|
|
31
31
|
var x;
|
|
32
|
-
return
|
|
33
|
-
}),
|
|
34
|
-
function
|
|
35
|
-
x.stopPropagation(), T("open",
|
|
32
|
+
return ct(_.artifact.size || ((x = _.artifact.code) == null ? void 0 : x.length) || 0);
|
|
33
|
+
}), E = C(() => Ne(_.artifact.language));
|
|
34
|
+
function g(x) {
|
|
35
|
+
x.stopPropagation(), T("open", _.artifact);
|
|
36
36
|
}
|
|
37
|
-
async function
|
|
37
|
+
async function n() {
|
|
38
38
|
try {
|
|
39
|
-
await navigator.clipboard.writeText(
|
|
40
|
-
|
|
41
|
-
}, 2e3), T("copy",
|
|
39
|
+
await navigator.clipboard.writeText(_.artifact.code), f.value = !0, setTimeout(() => {
|
|
40
|
+
f.value = !1;
|
|
41
|
+
}, 2e3), T("copy", _.artifact);
|
|
42
42
|
} catch (x) {
|
|
43
43
|
console.error("Failed to copy:", x);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function h() {
|
|
47
47
|
var W;
|
|
48
|
-
const x = new Blob([
|
|
49
|
-
$.href =
|
|
48
|
+
const x = new Blob([_.artifact.code], { type: "text/plain" }), I = URL.createObjectURL(x), $ = document.createElement("a"), N = je(_.artifact.language), O = ((W = _.artifact.title) == null ? void 0 : W.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
|
|
49
|
+
$.href = I, $.download = `${O}.${N}`, document.body.appendChild($), $.click(), document.body.removeChild($), URL.revokeObjectURL(I), T("download", _.artifact);
|
|
50
50
|
}
|
|
51
|
-
return (x,
|
|
52
|
-
class:
|
|
53
|
-
onClick:
|
|
51
|
+
return (x, I) => (a(), s("div", {
|
|
52
|
+
class: j(["artifactuse-card", { "artifactuse-card--active": H.isActive }]),
|
|
53
|
+
onClick: g
|
|
54
54
|
}, [
|
|
55
|
-
e("div",
|
|
55
|
+
e("div", Qt, [
|
|
56
56
|
(a(), s("svg", {
|
|
57
57
|
viewBox: "0 0 24 24",
|
|
58
58
|
fill: "none",
|
|
59
59
|
stroke: "currentColor",
|
|
60
60
|
"stroke-width": "1.5",
|
|
61
|
-
innerHTML:
|
|
62
|
-
}, null, 8,
|
|
61
|
+
innerHTML: E.value
|
|
62
|
+
}, null, 8, Gt))
|
|
63
63
|
]),
|
|
64
|
-
e("div",
|
|
65
|
-
e("div",
|
|
66
|
-
e("div",
|
|
67
|
-
e("span",
|
|
68
|
-
|
|
69
|
-
e("span",
|
|
64
|
+
e("div", ea, [
|
|
65
|
+
e("div", ta, l(H.artifact.title), 1),
|
|
66
|
+
e("div", aa, [
|
|
67
|
+
e("span", sa, l(o.value), 1),
|
|
68
|
+
I[0] || (I[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
|
|
69
|
+
e("span", ia, l(q.value), 1)
|
|
70
70
|
])
|
|
71
71
|
]),
|
|
72
|
-
e("div",
|
|
72
|
+
e("div", la, [
|
|
73
73
|
e("button", {
|
|
74
74
|
class: "artifactuse-card__action",
|
|
75
|
-
onClick: he(
|
|
76
|
-
title:
|
|
75
|
+
onClick: he(n, ["stop"]),
|
|
76
|
+
title: f.value ? "Copied!" : "Copy code"
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
f.value ? (a(), s("svg", ra, [...I[2] || (I[2] = [
|
|
79
79
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
80
|
-
])])) : (a(), s("svg",
|
|
80
|
+
])])) : (a(), s("svg", oa, [...I[1] || (I[1] = [
|
|
81
81
|
e("rect", {
|
|
82
82
|
x: "9",
|
|
83
83
|
y: "9",
|
|
@@ -88,12 +88,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
88
88
|
}, null, -1),
|
|
89
89
|
e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
|
|
90
90
|
])]))
|
|
91
|
-
], 8,
|
|
91
|
+
], 8, na),
|
|
92
92
|
e("button", {
|
|
93
93
|
class: "artifactuse-card__action",
|
|
94
|
-
onClick: he(
|
|
94
|
+
onClick: he(h, ["stop"]),
|
|
95
95
|
title: "Download file"
|
|
96
|
-
}, [...
|
|
96
|
+
}, [...I[3] || (I[3] = [
|
|
97
97
|
e("svg", {
|
|
98
98
|
viewBox: "0 0 24 24",
|
|
99
99
|
fill: "none",
|
|
@@ -111,7 +111,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
111
111
|
], -1)
|
|
112
112
|
])])
|
|
113
113
|
]),
|
|
114
|
-
|
|
114
|
+
I[4] || (I[4] = e("div", { class: "artifactuse-card__arrow" }, [
|
|
115
115
|
e("svg", {
|
|
116
116
|
viewBox: "0 0 24 24",
|
|
117
117
|
fill: "none",
|
|
@@ -123,10 +123,10 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
123
123
|
], -1))
|
|
124
124
|
], 2));
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, ua = ["data-artifactuse-theme"], da = {
|
|
127
127
|
key: 0,
|
|
128
128
|
class: "artifactuse-form-collapsed"
|
|
129
|
-
},
|
|
129
|
+
}, va = { class: "artifactuse-form-collapsed-icon" }, fa = {
|
|
130
130
|
key: 0,
|
|
131
131
|
viewBox: "0 0 24 24",
|
|
132
132
|
fill: "none",
|
|
@@ -134,7 +134,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
134
134
|
"stroke-width": "2.5",
|
|
135
135
|
"stroke-linecap": "round",
|
|
136
136
|
"stroke-linejoin": "round"
|
|
137
|
-
},
|
|
137
|
+
}, pa = {
|
|
138
138
|
key: 1,
|
|
139
139
|
viewBox: "0 0 24 24",
|
|
140
140
|
fill: "none",
|
|
@@ -142,7 +142,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
142
142
|
"stroke-width": "2.5",
|
|
143
143
|
"stroke-linecap": "round",
|
|
144
144
|
"stroke-linejoin": "round"
|
|
145
|
-
},
|
|
145
|
+
}, _a = {
|
|
146
146
|
key: 2,
|
|
147
147
|
viewBox: "0 0 24 24",
|
|
148
148
|
fill: "none",
|
|
@@ -150,64 +150,64 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
150
150
|
"stroke-width": "2.5",
|
|
151
151
|
"stroke-linecap": "round",
|
|
152
152
|
"stroke-linejoin": "round"
|
|
153
|
-
},
|
|
153
|
+
}, ha = { class: "artifactuse-form-collapsed-title" }, ma = {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: "artifactuse-form-header"
|
|
156
|
-
},
|
|
156
|
+
}, ya = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "artifactuse-form-title"
|
|
159
|
-
},
|
|
159
|
+
}, ga = {
|
|
160
160
|
key: 1,
|
|
161
161
|
class: "artifactuse-form-description"
|
|
162
|
-
},
|
|
162
|
+
}, ka = {
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "artifactuse-form-buttons"
|
|
165
|
-
},
|
|
165
|
+
}, wa = ["disabled", "onClick"], ba = ["innerHTML"], Ca = { class: "artifactuse-form-fields" }, xa = {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "artifactuse-form-buttons"
|
|
168
|
-
},
|
|
168
|
+
}, $a = ["type", "disabled", "onClick"], Ma = {
|
|
169
169
|
key: 0,
|
|
170
170
|
class: "artifactuse-form-btn-spinner"
|
|
171
|
-
},
|
|
171
|
+
}, Ta = ["innerHTML"], La = {
|
|
172
172
|
key: 1,
|
|
173
173
|
class: "artifactuse-form-divider"
|
|
174
|
-
},
|
|
174
|
+
}, Pa = {
|
|
175
175
|
key: 2,
|
|
176
176
|
class: "artifactuse-form-heading"
|
|
177
177
|
}, Aa = {
|
|
178
178
|
key: 3,
|
|
179
179
|
class: "artifactuse-form-field"
|
|
180
|
-
},
|
|
180
|
+
}, Ha = { class: "artifactuse-checkbox-label" }, Ea = ["checked", "disabled", "onChange"], Ba = { class: "artifactuse-checkbox-text" }, Sa = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "artifactuse-required"
|
|
183
|
-
},
|
|
183
|
+
}, za = {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "artifactuse-help-text"
|
|
186
|
-
},
|
|
186
|
+
}, Va = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "artifactuse-error-text"
|
|
189
189
|
}, Ia = {
|
|
190
190
|
key: 4,
|
|
191
191
|
class: "artifactuse-form-field"
|
|
192
|
-
}, Fa = ["for"],
|
|
192
|
+
}, Fa = ["for"], Ra = {
|
|
193
193
|
key: 0,
|
|
194
194
|
class: "artifactuse-required"
|
|
195
|
-
},
|
|
195
|
+
}, qa = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], Oa = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], Ua = ["id", "value", "disabled", "required", "onChange"], Da = { value: "" }, Na = ["value", "disabled"], ja = {
|
|
196
196
|
key: 3,
|
|
197
197
|
class: "artifactuse-radio-group"
|
|
198
|
-
},
|
|
198
|
+
}, Wa = ["name", "value", "checked", "disabled", "onChange"], Ja = {
|
|
199
199
|
key: 4,
|
|
200
200
|
class: "artifactuse-help-text"
|
|
201
|
-
},
|
|
201
|
+
}, Xa = {
|
|
202
202
|
key: 5,
|
|
203
203
|
class: "artifactuse-error-text"
|
|
204
|
-
},
|
|
204
|
+
}, Za = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "artifactuse-form-buttons artifactuse-form-buttons-default"
|
|
207
|
-
},
|
|
207
|
+
}, Ka = ["disabled"], Ya = {
|
|
208
208
|
key: 0,
|
|
209
209
|
class: "artifactuse-form-btn-spinner"
|
|
210
|
-
},
|
|
210
|
+
}, Qa = {
|
|
211
211
|
__name: "ArtifactuseInlineForm",
|
|
212
212
|
props: {
|
|
213
213
|
artifact: { type: Object, required: !0 },
|
|
@@ -221,22 +221,22 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
221
221
|
},
|
|
222
222
|
emits: ["submit", "cancel", "reset", "button-click"],
|
|
223
223
|
setup(H, { emit: c }) {
|
|
224
|
-
const
|
|
225
|
-
function
|
|
226
|
-
|
|
224
|
+
const _ = H, T = c, f = M(_.initialState), o = C(() => f.value !== "active"), q = C(() => f.value === "active" ? "" : `artifactuse-form--${f.value}`);
|
|
225
|
+
function E(w) {
|
|
226
|
+
f.value = w;
|
|
227
227
|
}
|
|
228
|
-
const
|
|
228
|
+
const g = C(() => {
|
|
229
229
|
try {
|
|
230
|
-
return JSON.parse(
|
|
230
|
+
return JSON.parse(_.artifact.code);
|
|
231
231
|
} catch {
|
|
232
232
|
return { title: "Invalid Form", variant: "fields", data: { fields: [] } };
|
|
233
233
|
}
|
|
234
|
-
}),
|
|
234
|
+
}), n = M(null), h = C(() => _.artifact.id || g.value.id || `form-${Date.now()}`), x = C(() => `artifactuse-form-${g.value.variant || "fields"}`), I = C(() => g.value.title || "Form"), $ = M({}), N = M({}), O = M(!1), W = C(() => {
|
|
235
235
|
var w;
|
|
236
|
-
return ((w =
|
|
236
|
+
return ((w = g.value.data) == null ? void 0 : w.fields) || [];
|
|
237
237
|
}), Y = C(() => {
|
|
238
238
|
var w;
|
|
239
|
-
return
|
|
239
|
+
return g.value.variant === "buttons" ? ((w = g.value.data) == null ? void 0 : w.fields) || [] : [];
|
|
240
240
|
}), S = C(() => W.value.some((w) => w.type === "buttons"));
|
|
241
241
|
function ie(w) {
|
|
242
242
|
if (!w) return null;
|
|
@@ -250,39 +250,39 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
250
250
|
}
|
|
251
251
|
const r = L.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
|
|
252
252
|
if (r) return `${r[1]}, ${r[2]}, ${r[3]}`;
|
|
253
|
-
const
|
|
254
|
-
return
|
|
253
|
+
const B = L.split(/[\s,]+/).map(Number).filter((u) => !isNaN(u));
|
|
254
|
+
return B.length >= 3 ? `${B[0]}, ${B[1]}, ${B[2]}` : null;
|
|
255
255
|
}
|
|
256
256
|
function Z() {
|
|
257
|
-
if (
|
|
258
|
-
const w = ie(
|
|
259
|
-
w &&
|
|
257
|
+
if (n.value && _.accent) {
|
|
258
|
+
const w = ie(_.accent);
|
|
259
|
+
w && n.value.style.setProperty("--artifactuse-primary", w);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
|
|
263
|
-
Z(),
|
|
264
|
-
}), de(() =>
|
|
265
|
-
|
|
262
|
+
Me(() => {
|
|
263
|
+
Z(), f.value = _.initialState;
|
|
264
|
+
}), de(() => _.accent, Z), de(() => _.initialState, (w) => {
|
|
265
|
+
f.value = w;
|
|
266
266
|
});
|
|
267
267
|
function X() {
|
|
268
268
|
var r;
|
|
269
269
|
const w = {};
|
|
270
|
-
W.value.forEach((
|
|
271
|
-
["buttons", "divider", "heading"].includes(
|
|
272
|
-
}), (r =
|
|
270
|
+
W.value.forEach((B) => {
|
|
271
|
+
["buttons", "divider", "heading"].includes(B.type) || (B.defaultValue !== void 0 ? w[B.name] = B.defaultValue : B.type === "checkbox" ? w[B.name] = !1 : w[B.name] = "");
|
|
272
|
+
}), (r = g.value.data) != null && r.defaults && Object.assign(w, g.value.data.defaults), $.value = w;
|
|
273
273
|
}
|
|
274
|
-
X(), de(() =>
|
|
274
|
+
X(), de(() => _.artifact.code, X);
|
|
275
275
|
function oe(w) {
|
|
276
276
|
return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(w);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function m(w) {
|
|
279
279
|
return w ? w.map((L) => typeof L == "string" ? { label: L, value: L } : L) : [];
|
|
280
280
|
}
|
|
281
281
|
function k(w, L) {
|
|
282
|
-
$.value[w] = L,
|
|
282
|
+
$.value[w] = L, N.value[w] && delete N.value[w];
|
|
283
283
|
}
|
|
284
284
|
function ee() {
|
|
285
|
-
var
|
|
285
|
+
var B;
|
|
286
286
|
const w = {};
|
|
287
287
|
W.value.forEach((u) => {
|
|
288
288
|
if (["buttons", "divider", "heading"].includes(u.type)) return;
|
|
@@ -308,45 +308,45 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
|
-
const r = (
|
|
311
|
+
const r = (B = g.value.data) == null ? void 0 : B.validation;
|
|
312
312
|
return r && Object.entries(r).forEach(([u, z]) => {
|
|
313
313
|
if (w[u]) return;
|
|
314
314
|
const le = $.value[u];
|
|
315
315
|
z.pattern && le && (new RegExp(z.pattern).test(le) || (w[u] = z.message || `${u} is invalid`));
|
|
316
|
-
}),
|
|
316
|
+
}), N.value = w, Object.keys(w).length === 0;
|
|
317
317
|
}
|
|
318
318
|
function re() {
|
|
319
|
-
X(),
|
|
319
|
+
X(), N.value = {};
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function P() {
|
|
322
322
|
ee() && (O.value = !0, T("submit", {
|
|
323
|
-
formId:
|
|
323
|
+
formId: h.value,
|
|
324
324
|
action: "submit",
|
|
325
325
|
values: { ...$.value },
|
|
326
326
|
timestamp: Date.now()
|
|
327
327
|
}), setTimeout(() => {
|
|
328
|
-
O.value = !1,
|
|
328
|
+
O.value = !1, E("submitted");
|
|
329
329
|
}, 300));
|
|
330
330
|
}
|
|
331
331
|
function Q(w) {
|
|
332
332
|
const L = w.action || "custom";
|
|
333
333
|
switch (L) {
|
|
334
334
|
case "submit":
|
|
335
|
-
|
|
335
|
+
P();
|
|
336
336
|
break;
|
|
337
337
|
case "cancel":
|
|
338
338
|
T("cancel", {
|
|
339
|
-
formId:
|
|
339
|
+
formId: h.value,
|
|
340
340
|
action: "cancel",
|
|
341
341
|
buttonName: w.name || "cancel",
|
|
342
342
|
timestamp: Date.now()
|
|
343
343
|
}), setTimeout(() => {
|
|
344
|
-
|
|
344
|
+
E("cancelled");
|
|
345
345
|
}, 150);
|
|
346
346
|
break;
|
|
347
347
|
case "reset":
|
|
348
348
|
re(), T("reset", {
|
|
349
|
-
formId:
|
|
349
|
+
formId: h.value,
|
|
350
350
|
action: "reset",
|
|
351
351
|
buttonName: w.name || "reset",
|
|
352
352
|
timestamp: Date.now()
|
|
@@ -355,33 +355,33 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
355
355
|
case "custom":
|
|
356
356
|
default:
|
|
357
357
|
T("button-click", {
|
|
358
|
-
formId:
|
|
358
|
+
formId: h.value,
|
|
359
359
|
action: L,
|
|
360
360
|
buttonName: w.name || w.label,
|
|
361
361
|
buttonLabel: w.label,
|
|
362
362
|
values: { ...$.value },
|
|
363
363
|
timestamp: Date.now()
|
|
364
364
|
}), setTimeout(() => {
|
|
365
|
-
|
|
365
|
+
E("submitted");
|
|
366
366
|
}, 150);
|
|
367
367
|
break;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
return (w, L) => (a(), s("div", {
|
|
371
371
|
ref_key: "containerRef",
|
|
372
|
-
ref:
|
|
373
|
-
class:
|
|
372
|
+
ref: n,
|
|
373
|
+
class: j([
|
|
374
374
|
"artifactuse-inline-form",
|
|
375
375
|
x.value,
|
|
376
376
|
q.value
|
|
377
377
|
]),
|
|
378
378
|
"data-artifactuse-theme": H.theme
|
|
379
379
|
}, [
|
|
380
|
-
o.value ? (a(), s("div",
|
|
381
|
-
e("div",
|
|
382
|
-
|
|
380
|
+
o.value ? (a(), s("div", da, [
|
|
381
|
+
e("div", va, [
|
|
382
|
+
f.value === "submitted" ? (a(), s("svg", fa, [...L[1] || (L[1] = [
|
|
383
383
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
384
|
-
])])) :
|
|
384
|
+
])])) : f.value === "cancelled" ? (a(), s("svg", pa, [...L[2] || (L[2] = [
|
|
385
385
|
e("line", {
|
|
386
386
|
x1: "18",
|
|
387
387
|
y1: "6",
|
|
@@ -394,7 +394,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
394
394
|
x2: "18",
|
|
395
395
|
y2: "18"
|
|
396
396
|
}, null, -1)
|
|
397
|
-
])])) : (a(), s("svg",
|
|
397
|
+
])])) : (a(), s("svg", _a, [...L[3] || (L[3] = [
|
|
398
398
|
e("line", {
|
|
399
399
|
x1: "5",
|
|
400
400
|
y1: "12",
|
|
@@ -403,78 +403,78 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
403
403
|
}, null, -1)
|
|
404
404
|
])]))
|
|
405
405
|
]),
|
|
406
|
-
e("span",
|
|
406
|
+
e("span", ha, l(I.value), 1)
|
|
407
407
|
])) : (a(), s(R, { key: 1 }, [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
g.value.title || g.value.description ? (a(), s("div", ma, [
|
|
409
|
+
g.value.title ? (a(), s("div", ya, l(g.value.title), 1)) : v("", !0),
|
|
410
|
+
g.value.description ? (a(), s("p", ga, l(g.value.description), 1)) : v("", !0)
|
|
411
411
|
])) : v("", !0),
|
|
412
|
-
|
|
412
|
+
g.value.variant === "buttons" ? (a(), s("div", ka, [
|
|
413
413
|
(a(!0), s(R, null, ve(Y.value, (r) => (a(), s("button", {
|
|
414
414
|
key: r.name || r.label,
|
|
415
415
|
type: "button",
|
|
416
|
-
class:
|
|
416
|
+
class: j(["artifactuse-form-btn", `artifactuse-form-btn-${r.variant || "secondary"}`]),
|
|
417
417
|
disabled: r.disabled || O.value,
|
|
418
|
-
onClick: (
|
|
418
|
+
onClick: (B) => Q(r)
|
|
419
419
|
}, [
|
|
420
420
|
r.icon ? (a(), s("span", {
|
|
421
421
|
key: 0,
|
|
422
422
|
class: "artifactuse-form-btn-icon",
|
|
423
423
|
innerHTML: r.icon
|
|
424
|
-
}, null, 8,
|
|
425
|
-
K(" " +
|
|
426
|
-
], 10,
|
|
424
|
+
}, null, 8, ba)) : v("", !0),
|
|
425
|
+
K(" " + l(r.label), 1)
|
|
426
|
+
], 10, wa))), 128))
|
|
427
427
|
])) : (a(), s("form", {
|
|
428
428
|
key: 2,
|
|
429
429
|
class: "artifactuse-form",
|
|
430
|
-
onSubmit: he(
|
|
430
|
+
onSubmit: he(P, ["prevent"])
|
|
431
431
|
}, [
|
|
432
|
-
e("div",
|
|
433
|
-
(a(!0), s(R, null, ve(W.value, (r,
|
|
434
|
-
key: r.name ||
|
|
432
|
+
e("div", Ca, [
|
|
433
|
+
(a(!0), s(R, null, ve(W.value, (r, B) => (a(), s(R, {
|
|
434
|
+
key: r.name || B
|
|
435
435
|
}, [
|
|
436
|
-
r.type === "buttons" ? (a(), s("div",
|
|
436
|
+
r.type === "buttons" ? (a(), s("div", xa, [
|
|
437
437
|
(a(!0), s(R, null, ve(r.fields || [], (u) => (a(), s("button", {
|
|
438
438
|
key: u.name || u.label,
|
|
439
439
|
type: u.action === "submit" ? "submit" : "button",
|
|
440
|
-
class:
|
|
440
|
+
class: j(["artifactuse-form-btn", `artifactuse-form-btn-${u.variant || "secondary"}`]),
|
|
441
441
|
disabled: u.disabled || u.action === "submit" && O.value,
|
|
442
442
|
onClick: (z) => u.action !== "submit" ? Q(u) : null
|
|
443
443
|
}, [
|
|
444
|
-
O.value && u.action === "submit" ? (a(), s("span",
|
|
444
|
+
O.value && u.action === "submit" ? (a(), s("span", Ma)) : u.icon ? (a(), s("span", {
|
|
445
445
|
key: 1,
|
|
446
446
|
class: "artifactuse-form-btn-icon",
|
|
447
447
|
innerHTML: u.icon
|
|
448
|
-
}, null, 8,
|
|
449
|
-
K(" " +
|
|
450
|
-
], 10,
|
|
451
|
-
])) : r.type === "divider" ? (a(), s("div",
|
|
452
|
-
e("label",
|
|
448
|
+
}, null, 8, Ta)) : v("", !0),
|
|
449
|
+
K(" " + l(O.value && u.action === "submit" ? "Submitting..." : u.label), 1)
|
|
450
|
+
], 10, $a))), 128))
|
|
451
|
+
])) : r.type === "divider" ? (a(), s("div", La)) : r.type === "heading" ? (a(), s("div", Pa, l(r.label), 1)) : r.type === "checkbox" ? (a(), s("div", Aa, [
|
|
452
|
+
e("label", Ha, [
|
|
453
453
|
e("input", {
|
|
454
454
|
type: "checkbox",
|
|
455
455
|
checked: $.value[r.name],
|
|
456
456
|
disabled: r.disabled,
|
|
457
457
|
class: "artifactuse-checkbox",
|
|
458
458
|
onChange: (u) => k(r.name, u.target.checked)
|
|
459
|
-
}, null, 40,
|
|
459
|
+
}, null, 40, Ea),
|
|
460
460
|
e("span", Ba, [
|
|
461
|
-
K(
|
|
462
|
-
r.required ? (a(), s("span",
|
|
461
|
+
K(l(r.label) + " ", 1),
|
|
462
|
+
r.required ? (a(), s("span", Sa, "*")) : v("", !0)
|
|
463
463
|
])
|
|
464
464
|
]),
|
|
465
|
-
r.helpText ? (a(), s("span",
|
|
466
|
-
|
|
465
|
+
r.helpText ? (a(), s("span", za, l(r.helpText), 1)) : v("", !0),
|
|
466
|
+
N.value[r.name] ? (a(), s("span", Va, l(N.value[r.name]), 1)) : v("", !0)
|
|
467
467
|
])) : (a(), s("div", Ia, [
|
|
468
468
|
e("label", {
|
|
469
|
-
for: `${
|
|
469
|
+
for: `${h.value}-${r.name}`,
|
|
470
470
|
class: "artifactuse-label"
|
|
471
471
|
}, [
|
|
472
|
-
K(
|
|
473
|
-
r.required ? (a(), s("span",
|
|
472
|
+
K(l(r.label) + " ", 1),
|
|
473
|
+
r.required ? (a(), s("span", Ra, "*")) : v("", !0)
|
|
474
474
|
], 8, Fa),
|
|
475
475
|
oe(r.type) ? (a(), s("input", {
|
|
476
476
|
key: 0,
|
|
477
|
-
id: `${
|
|
477
|
+
id: `${h.value}-${r.name}`,
|
|
478
478
|
type: r.type,
|
|
479
479
|
value: $.value[r.name],
|
|
480
480
|
placeholder: r.placeholder,
|
|
@@ -482,9 +482,9 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
482
482
|
required: r.required,
|
|
483
483
|
class: "artifactuse-input",
|
|
484
484
|
onInput: (u) => k(r.name, u.target.value)
|
|
485
|
-
}, null, 40,
|
|
485
|
+
}, null, 40, qa)) : r.type === "textarea" ? (a(), s("textarea", {
|
|
486
486
|
key: 1,
|
|
487
|
-
id: `${
|
|
487
|
+
id: `${h.value}-${r.name}`,
|
|
488
488
|
value: $.value[r.name],
|
|
489
489
|
placeholder: r.placeholder,
|
|
490
490
|
disabled: r.disabled,
|
|
@@ -492,23 +492,23 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
492
492
|
rows: r.rows || 3,
|
|
493
493
|
class: "artifactuse-textarea",
|
|
494
494
|
onInput: (u) => k(r.name, u.target.value)
|
|
495
|
-
}, null, 40,
|
|
495
|
+
}, null, 40, Oa)) : r.type === "select" ? (a(), s("select", {
|
|
496
496
|
key: 2,
|
|
497
|
-
id: `${
|
|
497
|
+
id: `${h.value}-${r.name}`,
|
|
498
498
|
value: $.value[r.name],
|
|
499
499
|
disabled: r.disabled,
|
|
500
500
|
required: r.required,
|
|
501
501
|
class: "artifactuse-select",
|
|
502
502
|
onChange: (u) => k(r.name, u.target.value)
|
|
503
503
|
}, [
|
|
504
|
-
e("option",
|
|
505
|
-
(a(!0), s(R, null, ve(
|
|
504
|
+
e("option", Da, l(r.placeholder || "Select..."), 1),
|
|
505
|
+
(a(!0), s(R, null, ve(m(r.options), (u) => (a(), s("option", {
|
|
506
506
|
key: u.value,
|
|
507
507
|
value: u.value,
|
|
508
508
|
disabled: u.disabled
|
|
509
|
-
},
|
|
510
|
-
], 40,
|
|
511
|
-
(a(!0), s(R, null, ve(
|
|
509
|
+
}, l(u.label), 9, Na))), 128))
|
|
510
|
+
], 40, Ua)) : r.type === "radio" ? (a(), s("div", ja, [
|
|
511
|
+
(a(!0), s(R, null, ve(m(r.options), (u) => (a(), s("label", {
|
|
512
512
|
key: u.value,
|
|
513
513
|
class: "artifactuse-radio-label"
|
|
514
514
|
}, [
|
|
@@ -520,16 +520,16 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
520
520
|
disabled: u.disabled || r.disabled,
|
|
521
521
|
class: "artifactuse-radio",
|
|
522
522
|
onChange: (z) => k(r.name, u.value)
|
|
523
|
-
}, null, 40,
|
|
524
|
-
e("span", null,
|
|
523
|
+
}, null, 40, Wa),
|
|
524
|
+
e("span", null, l(u.label), 1)
|
|
525
525
|
]))), 128))
|
|
526
526
|
])) : v("", !0),
|
|
527
|
-
r.helpText ? (a(), s("span",
|
|
528
|
-
|
|
527
|
+
r.helpText ? (a(), s("span", Ja, l(r.helpText), 1)) : v("", !0),
|
|
528
|
+
N.value[r.name] ? (a(), s("span", Xa, l(N.value[r.name]), 1)) : v("", !0)
|
|
529
529
|
]))
|
|
530
530
|
], 64))), 128))
|
|
531
531
|
]),
|
|
532
|
-
S.value ? v("", !0) : (a(), s("div",
|
|
532
|
+
S.value ? v("", !0) : (a(), s("div", Za, [
|
|
533
533
|
e("button", {
|
|
534
534
|
type: "button",
|
|
535
535
|
class: "artifactuse-form-btn artifactuse-form-btn-ghost",
|
|
@@ -540,79 +540,79 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
540
540
|
class: "artifactuse-form-btn artifactuse-form-btn-primary",
|
|
541
541
|
disabled: O.value
|
|
542
542
|
}, [
|
|
543
|
-
O.value ? (a(), s("span",
|
|
544
|
-
K(" " +
|
|
545
|
-
], 8,
|
|
543
|
+
O.value ? (a(), s("span", Ya)) : v("", !0),
|
|
544
|
+
K(" " + l(O.value ? "Submitting..." : "Submit"), 1)
|
|
545
|
+
], 8, Ka)
|
|
546
546
|
]))
|
|
547
547
|
], 32))
|
|
548
548
|
], 64))
|
|
549
|
-
], 10,
|
|
549
|
+
], 10, ua));
|
|
550
550
|
}
|
|
551
|
-
},
|
|
551
|
+
}, Ga = ["data-artifactuse-theme"], es = { class: "artifactuse-social-header" }, ts = ["src", "alt"], as = { class: "artifactuse-social-author" }, ss = { class: "artifactuse-social-author-name" }, is = { class: "artifactuse-social-author-meta" }, ls = { class: "artifactuse-social-author-handle" }, ns = { class: "artifactuse-social-timestamp" }, os = { class: "artifactuse-social-content" }, rs = ["innerHTML"], cs = {
|
|
552
552
|
key: 0,
|
|
553
553
|
class: "artifactuse-social-media"
|
|
554
|
-
},
|
|
554
|
+
}, us = ["data-count"], ds = ["src", "alt"], vs = {
|
|
555
555
|
key: 1,
|
|
556
556
|
class: "artifactuse-social-link-card"
|
|
557
|
-
},
|
|
557
|
+
}, fs = ["src", "alt"], ps = { class: "artifactuse-social-link-info" }, _s = { class: "artifactuse-social-link-domain" }, hs = { class: "artifactuse-social-link-title" }, ms = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "artifactuse-social-link-description"
|
|
560
|
-
},
|
|
560
|
+
}, ys = {
|
|
561
561
|
key: 2,
|
|
562
562
|
class: "artifactuse-social-poll"
|
|
563
|
-
},
|
|
563
|
+
}, gs = { class: "artifactuse-social-poll-label" }, ks = { class: "artifactuse-social-poll-label-percent" }, ws = { class: "artifactuse-social-poll-meta" }, bs = {
|
|
564
564
|
key: 3,
|
|
565
565
|
class: "artifactuse-social-quote"
|
|
566
|
-
},
|
|
566
|
+
}, Cs = { class: "artifactuse-social-quote-header" }, xs = ["src"], $s = { class: "artifactuse-social-quote-author" }, Ms = { class: "artifactuse-social-quote-handle" }, Ts = { class: "artifactuse-social-quote-text" }, Ls = {
|
|
567
567
|
key: 0,
|
|
568
568
|
class: "artifactuse-social-engagement"
|
|
569
|
-
},
|
|
569
|
+
}, Ps = { class: "artifactuse-social-stat" }, As = { class: "artifactuse-social-stat" }, Hs = { class: "artifactuse-social-stat" }, Es = { class: "artifactuse-social-stat" }, Bs = { class: "artifactuse-social-header" }, Ss = ["src", "alt"], zs = { class: "artifactuse-social-author-info" }, Vs = { class: "artifactuse-social-author-name" }, Is = {
|
|
570
570
|
key: 0,
|
|
571
571
|
class: "artifactuse-social-author-connection"
|
|
572
|
-
}, Fs = { class: "artifactuse-social-author-headline" },
|
|
572
|
+
}, Fs = { class: "artifactuse-social-author-headline" }, Rs = { class: "artifactuse-social-timestamp" }, qs = { class: "artifactuse-social-content" }, Os = ["innerHTML"], Us = {
|
|
573
573
|
key: 0,
|
|
574
574
|
class: "artifactuse-social-link-card"
|
|
575
|
-
},
|
|
575
|
+
}, Ds = ["src", "alt"], Ns = { class: "artifactuse-social-link-info" }, js = { class: "artifactuse-social-link-title" }, Ws = { class: "artifactuse-social-link-domain" }, Js = {
|
|
576
576
|
key: 0,
|
|
577
577
|
class: "artifactuse-social-engagement"
|
|
578
|
-
},
|
|
578
|
+
}, Xs = { class: "artifactuse-social-reactions" }, Zs = { class: "artifactuse-social-header" }, Ks = ["src", "alt"], Ys = { class: "artifactuse-social-author-name" }, Qs = {
|
|
579
579
|
key: 0,
|
|
580
580
|
class: "artifactuse-social-verified",
|
|
581
581
|
viewBox: "0 0 24 24",
|
|
582
582
|
fill: "currentColor"
|
|
583
|
-
},
|
|
583
|
+
}, Gs = {
|
|
584
584
|
key: 0,
|
|
585
585
|
class: "artifactuse-social-media"
|
|
586
|
-
},
|
|
586
|
+
}, ei = ["src", "alt"], ti = { class: "artifactuse-social-likes" }, ai = { class: "artifactuse-social-caption" }, si = { class: "artifactuse-social-caption-author" }, ii = ["innerHTML"], li = { class: "artifactuse-social-timestamp" }, ni = { class: "artifactuse-social-header" }, oi = ["src", "alt"], ri = { class: "artifactuse-social-author-info" }, ci = { class: "artifactuse-social-author-name" }, ui = { class: "artifactuse-social-timestamp" }, di = { class: "artifactuse-social-content" }, vi = ["innerHTML"], fi = {
|
|
587
587
|
key: 0,
|
|
588
588
|
class: "artifactuse-social-link-card"
|
|
589
|
-
},
|
|
589
|
+
}, pi = ["src", "alt"], _i = { class: "artifactuse-social-link-info" }, hi = { class: "artifactuse-social-link-domain" }, mi = { class: "artifactuse-social-link-title" }, yi = {
|
|
590
590
|
key: 0,
|
|
591
591
|
class: "artifactuse-social-link-description"
|
|
592
|
-
},
|
|
592
|
+
}, gi = {
|
|
593
593
|
key: 0,
|
|
594
594
|
class: "artifactuse-social-engagement"
|
|
595
|
-
},
|
|
595
|
+
}, ki = { class: "artifactuse-social-reactions" }, wi = { class: "artifactuse-social-reaction-count" }, bi = { class: "artifactuse-social-comments-shares" }, Ci = { class: "artifactuse-social-header" }, xi = ["src", "alt"], $i = { class: "artifactuse-social-author-info" }, Mi = { class: "artifactuse-social-author-name" }, Ti = {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "artifactuse-social-verified",
|
|
598
598
|
viewBox: "0 0 24 24",
|
|
599
599
|
fill: "currentColor"
|
|
600
|
-
},
|
|
600
|
+
}, Li = { class: "artifactuse-social-timestamp" }, Pi = { class: "artifactuse-social-content" }, Ai = ["innerHTML"], Hi = {
|
|
601
601
|
key: 0,
|
|
602
602
|
class: "artifactuse-social-engagement"
|
|
603
|
-
},
|
|
603
|
+
}, Ei = { class: "artifactuse-social-stat" }, Bi = { class: "artifactuse-social-stat" }, Si = { class: "artifactuse-social-stat" }, zi = { class: "artifactuse-social-thumbnail" }, Vi = ["src", "alt"], Ii = {
|
|
604
604
|
key: 1,
|
|
605
605
|
class: "artifactuse-social-duration"
|
|
606
|
-
}, Fi = { class: "artifactuse-social-info" },
|
|
606
|
+
}, Fi = { class: "artifactuse-social-info" }, Ri = { class: "artifactuse-social-header" }, qi = ["src", "alt"], Oi = { class: "artifactuse-social-author-name" }, Ui = ["innerHTML"], Di = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "artifactuse-social-sound"
|
|
609
|
-
},
|
|
609
|
+
}, Ni = {
|
|
610
610
|
key: 1,
|
|
611
611
|
class: "artifactuse-social-engagement"
|
|
612
|
-
}, ji = { class: "artifactuse-social-thumbnail" },
|
|
612
|
+
}, ji = { class: "artifactuse-social-thumbnail" }, Wi = ["src", "alt"], Ji = {
|
|
613
613
|
key: 1,
|
|
614
614
|
class: "artifactuse-social-duration"
|
|
615
|
-
},
|
|
615
|
+
}, Xi = { class: "artifactuse-social-info" }, Zi = ["src", "alt"], Ki = { class: "artifactuse-social-title" }, Yi = { class: "artifactuse-social-channel" }, Qi = { class: "artifactuse-social-meta" }, Gi = { class: "artifactuse-social-actions-bar" }, el = { class: "artifactuse-social-platform-badge" }, _e = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"><circle cx="12" cy="8" r="4"/><path d="M12 14c-6 0-8 3-8 6v2h16v-2c0-3-2-6-8-6z"/></svg>', tl = {
|
|
616
616
|
__name: "ArtifactuseSocialPreview",
|
|
617
617
|
props: {
|
|
618
618
|
artifact: {
|
|
@@ -626,36 +626,36 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
626
626
|
},
|
|
627
627
|
emits: ["copy", "edit"],
|
|
628
628
|
setup(H, { emit: c }) {
|
|
629
|
-
const
|
|
629
|
+
const _ = H, T = c, f = M(null), o = M("Copy"), q = C(() => {
|
|
630
630
|
try {
|
|
631
|
-
return JSON.parse(
|
|
631
|
+
return JSON.parse(_.artifact.code);
|
|
632
632
|
} catch {
|
|
633
633
|
return { platform: "twitter", data: {} };
|
|
634
634
|
}
|
|
635
|
-
}),
|
|
636
|
-
var
|
|
637
|
-
return ((
|
|
635
|
+
}), E = C(() => {
|
|
636
|
+
var m;
|
|
637
|
+
return ((m = q.value) == null ? void 0 : m.platform) || "twitter";
|
|
638
638
|
});
|
|
639
639
|
C(() => {
|
|
640
|
-
var
|
|
641
|
-
return ((
|
|
640
|
+
var m;
|
|
641
|
+
return ((m = q.value) == null ? void 0 : m.variant) || "post";
|
|
642
642
|
});
|
|
643
|
-
const
|
|
644
|
-
var
|
|
645
|
-
return ((k = (
|
|
646
|
-
}),
|
|
647
|
-
var
|
|
648
|
-
return ((k = (
|
|
649
|
-
}),
|
|
650
|
-
var
|
|
651
|
-
return ((k = (
|
|
643
|
+
const g = C(() => {
|
|
644
|
+
var m, k;
|
|
645
|
+
return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.author) || {};
|
|
646
|
+
}), n = C(() => {
|
|
647
|
+
var m, k;
|
|
648
|
+
return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.content) || {};
|
|
649
|
+
}), h = C(() => {
|
|
650
|
+
var m, k;
|
|
651
|
+
return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.engagement) || {};
|
|
652
652
|
}), x = C(() => {
|
|
653
|
-
var
|
|
654
|
-
return ((k = (
|
|
655
|
-
}),
|
|
656
|
-
const
|
|
657
|
-
return
|
|
658
|
-
}), $ = C(() => `artifactuse-social-verified-${
|
|
653
|
+
var m, k;
|
|
654
|
+
return ((k = (m = q.value) == null ? void 0 : m.data) == null ? void 0 : k.meta) || {};
|
|
655
|
+
}), I = C(() => {
|
|
656
|
+
const m = h.value;
|
|
657
|
+
return m.likes || m.comments || m.shares || m.retweets || m.replies || m.views;
|
|
658
|
+
}), $ = C(() => `artifactuse-social-verified-${g.value.verifiedType || "blue"}`), N = C(() => ({
|
|
659
659
|
twitter: "X",
|
|
660
660
|
linkedin: "LinkedIn",
|
|
661
661
|
instagram: "Instagram",
|
|
@@ -663,8 +663,8 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
663
663
|
threads: "Threads",
|
|
664
664
|
tiktok: "TikTok",
|
|
665
665
|
youtube: "YouTube"
|
|
666
|
-
})[
|
|
667
|
-
const
|
|
666
|
+
})[E.value] || E.value), O = C(() => {
|
|
667
|
+
const m = {
|
|
668
668
|
twitter: () => se("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
669
669
|
se("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
|
|
670
670
|
]),
|
|
@@ -687,103 +687,103 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
687
687
|
se("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
688
688
|
])
|
|
689
689
|
};
|
|
690
|
-
return
|
|
690
|
+
return m[E.value] || m.twitter;
|
|
691
691
|
}), W = C(() => {
|
|
692
|
-
let
|
|
693
|
-
return
|
|
692
|
+
let m = n.value.text || "";
|
|
693
|
+
return m = m.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), m = m.replace(/#(\w+)/g, '<span class="artifactuse-social-hashtag">#$1</span>'), m = m.replace(/@(\w+)/g, '<span class="artifactuse-social-mention">@$1</span>'), m = m.replace(
|
|
694
694
|
/(https?:\/\/[^\s]+)/g,
|
|
695
695
|
'<a href="$1" target="_blank" rel="noopener">$1</a>'
|
|
696
|
-
),
|
|
696
|
+
), m;
|
|
697
697
|
}), Y = C(() => {
|
|
698
|
-
const
|
|
699
|
-
return Object.values(
|
|
698
|
+
const m = h.value.reactions || {};
|
|
699
|
+
return Object.values(m).reduce((k, ee) => k + (ee || 0), 0) || h.value.likes || 0;
|
|
700
700
|
});
|
|
701
|
-
function S(
|
|
702
|
-
return
|
|
701
|
+
function S(m) {
|
|
702
|
+
return m ? m >= 1e6 ? `${(m / 1e6).toFixed(1)}M` : m >= 1e3 ? `${(m / 1e3).toFixed(1)}K` : m.toString() : "0";
|
|
703
703
|
}
|
|
704
|
-
function ie(
|
|
704
|
+
function ie(m) {
|
|
705
705
|
try {
|
|
706
|
-
return new URL(
|
|
706
|
+
return new URL(m).hostname.replace("www.", "");
|
|
707
707
|
} catch {
|
|
708
|
-
return
|
|
708
|
+
return m;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function Z(
|
|
712
|
-
|
|
711
|
+
function Z(m) {
|
|
712
|
+
m.target.src = _e;
|
|
713
713
|
}
|
|
714
|
-
function X(
|
|
715
|
-
|
|
714
|
+
function X(m) {
|
|
715
|
+
m.target.style.display = "none";
|
|
716
716
|
}
|
|
717
717
|
function oe() {
|
|
718
|
-
const
|
|
719
|
-
navigator.clipboard.writeText(
|
|
718
|
+
const m = n.value.text || "";
|
|
719
|
+
navigator.clipboard.writeText(m).then(() => {
|
|
720
720
|
o.value = "Copied!", setTimeout(() => {
|
|
721
721
|
o.value = "Copy";
|
|
722
|
-
}, 2e3), T("copy", { platform:
|
|
722
|
+
}, 2e3), T("copy", { platform: E.value, text: m });
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
return (
|
|
726
|
-
var ee, re,
|
|
725
|
+
return (m, k) => {
|
|
726
|
+
var ee, re, P, Q, w, L;
|
|
727
727
|
return a(), s("div", {
|
|
728
728
|
ref_key: "containerRef",
|
|
729
|
-
ref:
|
|
730
|
-
class:
|
|
729
|
+
ref: f,
|
|
730
|
+
class: j(["artifactuse-social", [`artifactuse-social-${E.value}`]]),
|
|
731
731
|
"data-artifactuse-theme": H.theme
|
|
732
732
|
}, [
|
|
733
|
-
|
|
734
|
-
e("div",
|
|
733
|
+
E.value === "twitter" ? (a(), s(R, { key: 0 }, [
|
|
734
|
+
e("div", es, [
|
|
735
735
|
e("img", {
|
|
736
|
-
src:
|
|
737
|
-
alt:
|
|
736
|
+
src: g.value.avatar || _e,
|
|
737
|
+
alt: g.value.name,
|
|
738
738
|
class: "artifactuse-social-avatar",
|
|
739
739
|
onError: Z
|
|
740
|
-
}, null, 40,
|
|
741
|
-
e("div",
|
|
742
|
-
e("div",
|
|
743
|
-
e("span", null,
|
|
744
|
-
|
|
740
|
+
}, null, 40, ts),
|
|
741
|
+
e("div", as, [
|
|
742
|
+
e("div", ss, [
|
|
743
|
+
e("span", null, l(g.value.name), 1),
|
|
744
|
+
g.value.verified ? (a(), s("svg", {
|
|
745
745
|
key: 0,
|
|
746
|
-
class:
|
|
746
|
+
class: j(["artifactuse-social-verified", $.value]),
|
|
747
747
|
viewBox: "0 0 24 24",
|
|
748
748
|
fill: "currentColor"
|
|
749
749
|
}, [...k[0] || (k[0] = [
|
|
750
750
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
751
751
|
])], 2)) : v("", !0)
|
|
752
752
|
]),
|
|
753
|
-
e("div",
|
|
754
|
-
e("span",
|
|
755
|
-
e("span",
|
|
753
|
+
e("div", is, [
|
|
754
|
+
e("span", ls, l(g.value.handle), 1),
|
|
755
|
+
e("span", ns, "· " + l(x.value.timestamp || "Just now"), 1)
|
|
756
756
|
])
|
|
757
757
|
])
|
|
758
758
|
]),
|
|
759
|
-
e("div",
|
|
759
|
+
e("div", os, [
|
|
760
760
|
e("p", {
|
|
761
761
|
class: "artifactuse-social-text",
|
|
762
762
|
innerHTML: W.value
|
|
763
|
-
}, null, 8,
|
|
764
|
-
(ee =
|
|
763
|
+
}, null, 8, rs),
|
|
764
|
+
(ee = n.value.media) != null && ee.length ? (a(), s("div", cs, [
|
|
765
765
|
e("div", {
|
|
766
|
-
class:
|
|
767
|
-
"data-count":
|
|
766
|
+
class: j(["artifactuse-social-media-grid", { "artifactuse-social-media-single": n.value.media.length === 1 }]),
|
|
767
|
+
"data-count": n.value.media.length
|
|
768
768
|
}, [
|
|
769
|
-
(a(!0), s(R, null, ve(
|
|
770
|
-
key:
|
|
769
|
+
(a(!0), s(R, null, ve(n.value.media.slice(0, 4), (r, B) => (a(), s("img", {
|
|
770
|
+
key: B,
|
|
771
771
|
src: r.url,
|
|
772
772
|
alt: r.alt || "",
|
|
773
773
|
onError: X
|
|
774
|
-
}, null, 40,
|
|
775
|
-
], 10,
|
|
774
|
+
}, null, 40, ds))), 128))
|
|
775
|
+
], 10, us)
|
|
776
776
|
])) : v("", !0),
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
n.value.link && !((re = n.value.media) != null && re.length) ? (a(), s("div", vs, [
|
|
778
|
+
n.value.link.image ? (a(), s("img", {
|
|
779
779
|
key: 0,
|
|
780
|
-
src:
|
|
781
|
-
alt:
|
|
780
|
+
src: n.value.link.image,
|
|
781
|
+
alt: n.value.link.title,
|
|
782
782
|
class: "artifactuse-social-link-image",
|
|
783
783
|
onError: X
|
|
784
|
-
}, null, 40,
|
|
785
|
-
e("div",
|
|
786
|
-
e("div",
|
|
784
|
+
}, null, 40, fs)) : v("", !0),
|
|
785
|
+
e("div", ps, [
|
|
786
|
+
e("div", _s, [
|
|
787
787
|
k[1] || (k[1] = e("svg", {
|
|
788
788
|
fill: "none",
|
|
789
789
|
viewBox: "0 0 24 24",
|
|
@@ -796,45 +796,45 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
796
796
|
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
797
797
|
})
|
|
798
798
|
], -1)),
|
|
799
|
-
K(" " + n
|
|
799
|
+
K(" " + l(n.value.link.domain || ie(n.value.link.url)), 1)
|
|
800
800
|
]),
|
|
801
|
-
e("div",
|
|
802
|
-
|
|
801
|
+
e("div", hs, l(n.value.link.title), 1),
|
|
802
|
+
n.value.link.description ? (a(), s("div", ms, l(n.value.link.description), 1)) : v("", !0)
|
|
803
803
|
])
|
|
804
804
|
])) : v("", !0),
|
|
805
|
-
|
|
806
|
-
(a(!0), s(R, null, ve(
|
|
805
|
+
n.value.poll ? (a(), s("div", ys, [
|
|
806
|
+
(a(!0), s(R, null, ve(n.value.poll.options, (r, B) => {
|
|
807
807
|
var u, z;
|
|
808
808
|
return a(), s("div", {
|
|
809
|
-
key:
|
|
809
|
+
key: B,
|
|
810
810
|
class: "artifactuse-social-poll-option"
|
|
811
811
|
}, [
|
|
812
812
|
e("div", {
|
|
813
813
|
class: "artifactuse-social-poll-bar",
|
|
814
|
-
style:
|
|
814
|
+
style: He({ width: `${((u = n.value.poll.votes) == null ? void 0 : u[B]) || 0}%` })
|
|
815
815
|
}, null, 4),
|
|
816
|
-
e("div",
|
|
817
|
-
e("span", null,
|
|
818
|
-
e("span",
|
|
816
|
+
e("div", gs, [
|
|
817
|
+
e("span", null, l(r), 1),
|
|
818
|
+
e("span", ks, l(((z = n.value.poll.votes) == null ? void 0 : z[B]) || 0) + "%", 1)
|
|
819
819
|
])
|
|
820
820
|
]);
|
|
821
821
|
}), 128)),
|
|
822
|
-
e("div",
|
|
822
|
+
e("div", ws, l(S(n.value.poll.totalVotes || 0)) + " votes · " + l(n.value.poll.duration || "Poll ended"), 1)
|
|
823
823
|
])) : v("", !0),
|
|
824
|
-
|
|
825
|
-
e("div",
|
|
824
|
+
n.value.quote ? (a(), s("div", bs, [
|
|
825
|
+
e("div", Cs, [
|
|
826
826
|
e("img", {
|
|
827
|
-
src: ((
|
|
827
|
+
src: ((P = n.value.quote.author) == null ? void 0 : P.avatar) || _e,
|
|
828
828
|
class: "artifactuse-social-quote-avatar"
|
|
829
|
-
}, null, 8,
|
|
830
|
-
e("span",
|
|
831
|
-
e("span",
|
|
829
|
+
}, null, 8, xs),
|
|
830
|
+
e("span", $s, l((Q = n.value.quote.author) == null ? void 0 : Q.name), 1),
|
|
831
|
+
e("span", Ms, l((w = n.value.quote.author) == null ? void 0 : w.handle), 1)
|
|
832
832
|
]),
|
|
833
|
-
e("p",
|
|
833
|
+
e("p", Ts, l(n.value.quote.text), 1)
|
|
834
834
|
])) : v("", !0)
|
|
835
835
|
]),
|
|
836
|
-
|
|
837
|
-
e("div",
|
|
836
|
+
I.value ? (a(), s("div", Ls, [
|
|
837
|
+
e("div", Ps, [
|
|
838
838
|
k[2] || (k[2] = e("svg", {
|
|
839
839
|
viewBox: "0 0 24 24",
|
|
840
840
|
fill: "none",
|
|
@@ -843,7 +843,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
843
843
|
}, [
|
|
844
844
|
e("path", { d: "M12 21C6.5 21 2 16.5 2 11V3l7 3 3-3 3 3 7-3v8c0 5.5-4.5 10-10 10z" })
|
|
845
845
|
], -1)),
|
|
846
|
-
e("span", null,
|
|
846
|
+
e("span", null, l(S(h.value.replies || 0)), 1)
|
|
847
847
|
]),
|
|
848
848
|
e("div", As, [
|
|
849
849
|
k[3] || (k[3] = e("svg", {
|
|
@@ -854,9 +854,9 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
854
854
|
}, [
|
|
855
855
|
e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
|
|
856
856
|
], -1)),
|
|
857
|
-
e("span", null,
|
|
857
|
+
e("span", null, l(S(h.value.retweets || 0)), 1)
|
|
858
858
|
]),
|
|
859
|
-
e("div",
|
|
859
|
+
e("div", Hs, [
|
|
860
860
|
k[4] || (k[4] = e("svg", {
|
|
861
861
|
viewBox: "0 0 24 24",
|
|
862
862
|
fill: "none",
|
|
@@ -865,9 +865,9 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
865
865
|
}, [
|
|
866
866
|
e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
|
|
867
867
|
], -1)),
|
|
868
|
-
e("span", null,
|
|
868
|
+
e("span", null, l(S(h.value.likes || 0)), 1)
|
|
869
869
|
]),
|
|
870
|
-
e("div",
|
|
870
|
+
e("div", Es, [
|
|
871
871
|
k[5] || (k[5] = e("svg", {
|
|
872
872
|
viewBox: "0 0 24 24",
|
|
873
873
|
fill: "none",
|
|
@@ -876,25 +876,25 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
876
876
|
}, [
|
|
877
877
|
e("path", { d: "M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l5-5-5-5M13.8 12H3" })
|
|
878
878
|
], -1)),
|
|
879
|
-
e("span", null,
|
|
879
|
+
e("span", null, l(S(h.value.views || 0)), 1)
|
|
880
880
|
])
|
|
881
881
|
])) : v("", !0)
|
|
882
|
-
], 64)) :
|
|
882
|
+
], 64)) : E.value === "linkedin" ? (a(), s(R, { key: 1 }, [
|
|
883
883
|
e("div", Bs, [
|
|
884
884
|
e("img", {
|
|
885
|
-
src:
|
|
886
|
-
alt:
|
|
885
|
+
src: g.value.avatar || _e,
|
|
886
|
+
alt: g.value.name,
|
|
887
887
|
class: "artifactuse-social-avatar",
|
|
888
888
|
onError: Z
|
|
889
|
-
}, null, 40,
|
|
890
|
-
e("div",
|
|
891
|
-
e("div", zs, [
|
|
892
|
-
K(n(y.value.name) + " ", 1),
|
|
893
|
-
y.value.connection ? (a(), s("span", Is, "· " + n(y.value.connection), 1)) : v("", !0)
|
|
894
|
-
]),
|
|
895
|
-
e("div", Fs, n(y.value.headline), 1),
|
|
889
|
+
}, null, 40, Ss),
|
|
890
|
+
e("div", zs, [
|
|
896
891
|
e("div", Vs, [
|
|
897
|
-
K(
|
|
892
|
+
K(l(g.value.name) + " ", 1),
|
|
893
|
+
g.value.connection ? (a(), s("span", Is, "· " + l(g.value.connection), 1)) : v("", !0)
|
|
894
|
+
]),
|
|
895
|
+
e("div", Fs, l(g.value.headline), 1),
|
|
896
|
+
e("div", Rs, [
|
|
897
|
+
K(l(x.value.timestamp || "Just now") + " · ", 1),
|
|
898
898
|
k[6] || (k[6] = e("svg", {
|
|
899
899
|
viewBox: "0 0 24 24",
|
|
900
900
|
fill: "currentColor"
|
|
@@ -904,80 +904,80 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
904
904
|
])
|
|
905
905
|
])
|
|
906
906
|
]),
|
|
907
|
-
e("div",
|
|
907
|
+
e("div", qs, [
|
|
908
908
|
e("p", {
|
|
909
909
|
class: "artifactuse-social-text",
|
|
910
910
|
innerHTML: W.value
|
|
911
|
-
}, null, 8,
|
|
912
|
-
|
|
913
|
-
|
|
911
|
+
}, null, 8, Os),
|
|
912
|
+
n.value.link ? (a(), s("div", Us, [
|
|
913
|
+
n.value.link.image ? (a(), s("img", {
|
|
914
914
|
key: 0,
|
|
915
|
-
src:
|
|
916
|
-
alt:
|
|
915
|
+
src: n.value.link.image,
|
|
916
|
+
alt: n.value.link.title,
|
|
917
917
|
class: "artifactuse-social-link-image",
|
|
918
918
|
onError: X
|
|
919
|
-
}, null, 40,
|
|
920
|
-
e("div",
|
|
921
|
-
e("div", js, n
|
|
922
|
-
e("div",
|
|
919
|
+
}, null, 40, Ds)) : v("", !0),
|
|
920
|
+
e("div", Ns, [
|
|
921
|
+
e("div", js, l(n.value.link.title), 1),
|
|
922
|
+
e("div", Ws, l(n.value.link.domain || ie(n.value.link.url)), 1)
|
|
923
923
|
])
|
|
924
924
|
])) : v("", !0)
|
|
925
925
|
]),
|
|
926
|
-
|
|
927
|
-
e("div",
|
|
926
|
+
I.value ? (a(), s("div", Js, [
|
|
927
|
+
e("div", Xs, [
|
|
928
928
|
k[7] || (k[7] = e("div", { class: "artifactuse-social-reaction-icons" }, [
|
|
929
929
|
e("span", { class: "artifactuse-social-reaction-icon" }, "👍"),
|
|
930
930
|
e("span", { class: "artifactuse-social-reaction-icon" }, "❤️"),
|
|
931
931
|
e("span", { class: "artifactuse-social-reaction-icon" }, "👏")
|
|
932
932
|
], -1)),
|
|
933
|
-
e("span", null,
|
|
933
|
+
e("span", null, l(S(h.value.likes || 0)), 1)
|
|
934
934
|
]),
|
|
935
|
-
e("span", null,
|
|
935
|
+
e("span", null, l(S(h.value.comments || 0)) + " comments · " + l(S(h.value.shares || 0)) + " shares", 1)
|
|
936
936
|
])) : v("", !0)
|
|
937
|
-
], 64)) :
|
|
938
|
-
e("div",
|
|
937
|
+
], 64)) : E.value === "instagram" ? (a(), s(R, { key: 2 }, [
|
|
938
|
+
e("div", Zs, [
|
|
939
939
|
e("img", {
|
|
940
|
-
src:
|
|
941
|
-
alt:
|
|
940
|
+
src: g.value.avatar || _e,
|
|
941
|
+
alt: g.value.name,
|
|
942
942
|
class: "artifactuse-social-avatar",
|
|
943
943
|
onError: Z
|
|
944
|
-
}, null, 40,
|
|
945
|
-
e("div",
|
|
946
|
-
K(
|
|
947
|
-
|
|
944
|
+
}, null, 40, Ks),
|
|
945
|
+
e("div", Ys, [
|
|
946
|
+
K(l(g.value.name) + " ", 1),
|
|
947
|
+
g.value.verified ? (a(), s("svg", Qs, [...k[8] || (k[8] = [
|
|
948
948
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
949
949
|
])])) : v("", !0)
|
|
950
950
|
])
|
|
951
951
|
]),
|
|
952
|
-
(L =
|
|
952
|
+
(L = n.value.media) != null && L.length ? (a(), s("div", Gs, [
|
|
953
953
|
e("img", {
|
|
954
|
-
src:
|
|
955
|
-
alt:
|
|
954
|
+
src: n.value.media[0].url,
|
|
955
|
+
alt: n.value.media[0].alt || "",
|
|
956
956
|
onError: X
|
|
957
|
-
}, null, 40,
|
|
957
|
+
}, null, 40, ei)
|
|
958
958
|
])) : v("", !0),
|
|
959
|
-
k[9] || (k[9] =
|
|
960
|
-
e("div",
|
|
961
|
-
e("div",
|
|
962
|
-
e("span",
|
|
959
|
+
k[9] || (k[9] = Ot('<div class="artifactuse-social-actions"><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"></path></svg></div></div>', 1)),
|
|
960
|
+
e("div", ti, l(S(h.value.likes || 0)) + " likes", 1),
|
|
961
|
+
e("div", ai, [
|
|
962
|
+
e("span", si, l(g.value.name), 1),
|
|
963
963
|
e("span", {
|
|
964
964
|
class: "artifactuse-social-caption-text",
|
|
965
965
|
innerHTML: W.value
|
|
966
|
-
}, null, 8,
|
|
966
|
+
}, null, 8, ii)
|
|
967
967
|
]),
|
|
968
|
-
e("div",
|
|
969
|
-
], 64)) :
|
|
970
|
-
e("div",
|
|
968
|
+
e("div", li, l(x.value.timestamp || "Just now"), 1)
|
|
969
|
+
], 64)) : E.value === "facebook" ? (a(), s(R, { key: 3 }, [
|
|
970
|
+
e("div", ni, [
|
|
971
971
|
e("img", {
|
|
972
|
-
src:
|
|
973
|
-
alt:
|
|
972
|
+
src: g.value.avatar || _e,
|
|
973
|
+
alt: g.value.name,
|
|
974
974
|
class: "artifactuse-social-avatar",
|
|
975
975
|
onError: Z
|
|
976
|
-
}, null, 40,
|
|
977
|
-
e("div",
|
|
978
|
-
e("div",
|
|
979
|
-
e("div",
|
|
980
|
-
K(
|
|
976
|
+
}, null, 40, oi),
|
|
977
|
+
e("div", ri, [
|
|
978
|
+
e("div", ci, l(g.value.name), 1),
|
|
979
|
+
e("div", ui, [
|
|
980
|
+
K(l(x.value.timestamp || "Just now") + " · ", 1),
|
|
981
981
|
k[10] || (k[10] = e("svg", {
|
|
982
982
|
viewBox: "0 0 24 24",
|
|
983
983
|
fill: "currentColor"
|
|
@@ -987,63 +987,63 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
987
987
|
])
|
|
988
988
|
])
|
|
989
989
|
]),
|
|
990
|
-
e("div",
|
|
990
|
+
e("div", di, [
|
|
991
991
|
e("p", {
|
|
992
992
|
class: "artifactuse-social-text",
|
|
993
993
|
innerHTML: W.value
|
|
994
|
-
}, null, 8,
|
|
995
|
-
|
|
996
|
-
|
|
994
|
+
}, null, 8, vi),
|
|
995
|
+
n.value.link ? (a(), s("div", fi, [
|
|
996
|
+
n.value.link.image ? (a(), s("img", {
|
|
997
997
|
key: 0,
|
|
998
|
-
src:
|
|
999
|
-
alt:
|
|
998
|
+
src: n.value.link.image,
|
|
999
|
+
alt: n.value.link.title,
|
|
1000
1000
|
class: "artifactuse-social-link-image",
|
|
1001
1001
|
onError: X
|
|
1002
|
-
}, null, 40,
|
|
1003
|
-
e("div",
|
|
1004
|
-
e("div",
|
|
1005
|
-
e("div",
|
|
1006
|
-
|
|
1002
|
+
}, null, 40, pi)) : v("", !0),
|
|
1003
|
+
e("div", _i, [
|
|
1004
|
+
e("div", hi, l(n.value.link.domain || ie(n.value.link.url)), 1),
|
|
1005
|
+
e("div", mi, l(n.value.link.title), 1),
|
|
1006
|
+
n.value.link.description ? (a(), s("div", yi, l(n.value.link.description), 1)) : v("", !0)
|
|
1007
1007
|
])
|
|
1008
1008
|
])) : v("", !0)
|
|
1009
1009
|
]),
|
|
1010
|
-
|
|
1011
|
-
e("div",
|
|
1010
|
+
I.value ? (a(), s("div", gi, [
|
|
1011
|
+
e("div", ki, [
|
|
1012
1012
|
k[11] || (k[11] = e("div", { class: "artifactuse-social-reaction-emojis" }, [
|
|
1013
1013
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "👍"),
|
|
1014
1014
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "❤️"),
|
|
1015
1015
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "😂")
|
|
1016
1016
|
], -1)),
|
|
1017
|
-
e("span",
|
|
1017
|
+
e("span", wi, l(S(Y.value)), 1)
|
|
1018
1018
|
]),
|
|
1019
|
-
e("span",
|
|
1019
|
+
e("span", bi, l(S(h.value.comments || 0)) + " comments · " + l(S(h.value.shares || 0)) + " shares", 1)
|
|
1020
1020
|
])) : v("", !0)
|
|
1021
|
-
], 64)) :
|
|
1022
|
-
e("div",
|
|
1021
|
+
], 64)) : E.value === "threads" ? (a(), s(R, { key: 4 }, [
|
|
1022
|
+
e("div", Ci, [
|
|
1023
1023
|
e("img", {
|
|
1024
|
-
src:
|
|
1025
|
-
alt:
|
|
1024
|
+
src: g.value.avatar || _e,
|
|
1025
|
+
alt: g.value.name,
|
|
1026
1026
|
class: "artifactuse-social-avatar",
|
|
1027
1027
|
onError: Z
|
|
1028
|
-
}, null, 40,
|
|
1029
|
-
e("div",
|
|
1030
|
-
e("div",
|
|
1031
|
-
K(
|
|
1032
|
-
|
|
1028
|
+
}, null, 40, xi),
|
|
1029
|
+
e("div", $i, [
|
|
1030
|
+
e("div", Mi, [
|
|
1031
|
+
K(l(g.value.name) + " ", 1),
|
|
1032
|
+
g.value.verified ? (a(), s("svg", Ti, [...k[12] || (k[12] = [
|
|
1033
1033
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
1034
1034
|
])])) : v("", !0)
|
|
1035
1035
|
]),
|
|
1036
|
-
e("span",
|
|
1036
|
+
e("span", Li, l(x.value.timestamp || "Just now"), 1)
|
|
1037
1037
|
])
|
|
1038
1038
|
]),
|
|
1039
|
-
e("div",
|
|
1039
|
+
e("div", Pi, [
|
|
1040
1040
|
e("p", {
|
|
1041
1041
|
class: "artifactuse-social-text",
|
|
1042
1042
|
innerHTML: W.value
|
|
1043
1043
|
}, null, 8, Ai)
|
|
1044
1044
|
]),
|
|
1045
|
-
|
|
1046
|
-
e("div",
|
|
1045
|
+
I.value ? (a(), s("div", Hi, [
|
|
1046
|
+
e("div", Ei, [
|
|
1047
1047
|
k[13] || (k[13] = e("svg", {
|
|
1048
1048
|
viewBox: "0 0 24 24",
|
|
1049
1049
|
fill: "none",
|
|
@@ -1052,7 +1052,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1052
1052
|
}, [
|
|
1053
1053
|
e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
|
|
1054
1054
|
], -1)),
|
|
1055
|
-
e("span", null,
|
|
1055
|
+
e("span", null, l(S(h.value.likes || 0)), 1)
|
|
1056
1056
|
]),
|
|
1057
1057
|
e("div", Bi, [
|
|
1058
1058
|
k[14] || (k[14] = e("svg", {
|
|
@@ -1063,9 +1063,9 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1063
1063
|
}, [
|
|
1064
1064
|
e("path", { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z" })
|
|
1065
1065
|
], -1)),
|
|
1066
|
-
e("span", null,
|
|
1066
|
+
e("span", null, l(S(h.value.comments || 0)), 1)
|
|
1067
1067
|
]),
|
|
1068
|
-
e("div",
|
|
1068
|
+
e("div", Si, [
|
|
1069
1069
|
k[15] || (k[15] = e("svg", {
|
|
1070
1070
|
viewBox: "0 0 24 24",
|
|
1071
1071
|
fill: "none",
|
|
@@ -1074,17 +1074,17 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1074
1074
|
}, [
|
|
1075
1075
|
e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
|
|
1076
1076
|
], -1)),
|
|
1077
|
-
e("span", null,
|
|
1077
|
+
e("span", null, l(S(h.value.shares || 0)), 1)
|
|
1078
1078
|
])
|
|
1079
1079
|
])) : v("", !0)
|
|
1080
|
-
], 64)) :
|
|
1081
|
-
e("div",
|
|
1082
|
-
|
|
1080
|
+
], 64)) : E.value === "tiktok" ? (a(), s(R, { key: 5 }, [
|
|
1081
|
+
e("div", zi, [
|
|
1082
|
+
n.value.thumbnail ? (a(), s("img", {
|
|
1083
1083
|
key: 0,
|
|
1084
|
-
src:
|
|
1085
|
-
alt:
|
|
1084
|
+
src: n.value.thumbnail,
|
|
1085
|
+
alt: n.value.text,
|
|
1086
1086
|
onError: X
|
|
1087
|
-
}, null, 40,
|
|
1087
|
+
}, null, 40, Vi)) : v("", !0),
|
|
1088
1088
|
k[16] || (k[16] = e("div", { class: "artifactuse-social-play-button" }, [
|
|
1089
1089
|
e("div", { class: "artifactuse-social-play-icon" }, [
|
|
1090
1090
|
e("svg", {
|
|
@@ -1095,65 +1095,65 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1095
1095
|
])
|
|
1096
1096
|
])
|
|
1097
1097
|
], -1)),
|
|
1098
|
-
|
|
1098
|
+
n.value.duration ? (a(), s("div", Ii, l(n.value.duration), 1)) : v("", !0)
|
|
1099
1099
|
]),
|
|
1100
1100
|
e("div", Fi, [
|
|
1101
|
-
e("div",
|
|
1101
|
+
e("div", Ri, [
|
|
1102
1102
|
e("img", {
|
|
1103
|
-
src:
|
|
1104
|
-
alt:
|
|
1103
|
+
src: g.value.avatar || _e,
|
|
1104
|
+
alt: g.value.name,
|
|
1105
1105
|
class: "artifactuse-social-avatar",
|
|
1106
1106
|
onError: Z
|
|
1107
|
-
}, null, 40,
|
|
1108
|
-
e("span",
|
|
1107
|
+
}, null, 40, qi),
|
|
1108
|
+
e("span", Oi, l(g.value.name), 1)
|
|
1109
1109
|
]),
|
|
1110
1110
|
e("p", {
|
|
1111
1111
|
class: "artifactuse-social-text",
|
|
1112
1112
|
innerHTML: W.value
|
|
1113
|
-
}, null, 8,
|
|
1114
|
-
|
|
1113
|
+
}, null, 8, Ui),
|
|
1114
|
+
n.value.sound ? (a(), s("div", Di, [
|
|
1115
1115
|
k[17] || (k[17] = e("svg", {
|
|
1116
1116
|
viewBox: "0 0 24 24",
|
|
1117
1117
|
fill: "currentColor"
|
|
1118
1118
|
}, [
|
|
1119
1119
|
e("path", { d: "M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z" })
|
|
1120
1120
|
], -1)),
|
|
1121
|
-
K(" " + n
|
|
1121
|
+
K(" " + l(n.value.sound), 1)
|
|
1122
1122
|
])) : v("", !0),
|
|
1123
|
-
|
|
1124
|
-
e("span", null,
|
|
1125
|
-
e("span", null,
|
|
1126
|
-
e("span", null,
|
|
1123
|
+
I.value ? (a(), s("div", Ni, [
|
|
1124
|
+
e("span", null, l(S(h.value.likes || 0)) + " likes", 1),
|
|
1125
|
+
e("span", null, l(S(h.value.comments || 0)) + " comments", 1),
|
|
1126
|
+
e("span", null, l(S(h.value.shares || 0)) + " shares", 1)
|
|
1127
1127
|
])) : v("", !0)
|
|
1128
1128
|
])
|
|
1129
|
-
], 64)) :
|
|
1129
|
+
], 64)) : E.value === "youtube" ? (a(), s(R, { key: 6 }, [
|
|
1130
1130
|
e("div", ji, [
|
|
1131
|
-
|
|
1131
|
+
n.value.thumbnail ? (a(), s("img", {
|
|
1132
1132
|
key: 0,
|
|
1133
|
-
src:
|
|
1134
|
-
alt:
|
|
1133
|
+
src: n.value.thumbnail,
|
|
1134
|
+
alt: n.value.title,
|
|
1135
1135
|
onError: X
|
|
1136
|
-
}, null, 40,
|
|
1137
|
-
|
|
1136
|
+
}, null, 40, Wi)) : v("", !0),
|
|
1137
|
+
n.value.duration ? (a(), s("div", Ji, l(n.value.duration), 1)) : v("", !0)
|
|
1138
1138
|
]),
|
|
1139
|
-
e("div",
|
|
1139
|
+
e("div", Xi, [
|
|
1140
1140
|
e("img", {
|
|
1141
|
-
src:
|
|
1142
|
-
alt:
|
|
1141
|
+
src: g.value.avatar || _e,
|
|
1142
|
+
alt: g.value.name,
|
|
1143
1143
|
class: "artifactuse-social-avatar",
|
|
1144
1144
|
onError: Z
|
|
1145
|
-
}, null, 40,
|
|
1145
|
+
}, null, 40, Zi),
|
|
1146
1146
|
e("div", null, [
|
|
1147
|
-
e("div",
|
|
1148
|
-
e("div",
|
|
1149
|
-
e("div",
|
|
1147
|
+
e("div", Ki, l(n.value.title || n.value.text), 1),
|
|
1148
|
+
e("div", Yi, l(g.value.name), 1),
|
|
1149
|
+
e("div", Qi, l(S(h.value.views || 0)) + " views · " + l(x.value.timestamp || "Just now"), 1)
|
|
1150
1150
|
])
|
|
1151
1151
|
])
|
|
1152
1152
|
], 64)) : v("", !0),
|
|
1153
|
-
e("div",
|
|
1154
|
-
e("div",
|
|
1155
|
-
(a(),
|
|
1156
|
-
e("span", null,
|
|
1153
|
+
e("div", Gi, [
|
|
1154
|
+
e("div", el, [
|
|
1155
|
+
(a(), $e(Ut(O.value))),
|
|
1156
|
+
e("span", null, l(N.value), 1)
|
|
1157
1157
|
]),
|
|
1158
1158
|
e("button", {
|
|
1159
1159
|
class: "artifactuse-social-copy-btn",
|
|
@@ -1175,31 +1175,31 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1175
1175
|
}),
|
|
1176
1176
|
e("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
1177
1177
|
], -1)),
|
|
1178
|
-
K(" " +
|
|
1178
|
+
K(" " + l(o.value), 1)
|
|
1179
1179
|
])
|
|
1180
1180
|
])
|
|
1181
|
-
], 10,
|
|
1181
|
+
], 10, Ga);
|
|
1182
1182
|
};
|
|
1183
1183
|
}
|
|
1184
|
-
},
|
|
1184
|
+
}, al = ["src", "alt"], sl = ["src"], il = {
|
|
1185
1185
|
key: 2,
|
|
1186
1186
|
class: "artifactuse-viewer-controls"
|
|
1187
|
-
},
|
|
1187
|
+
}, ll = ["title"], nl = {
|
|
1188
1188
|
key: 0,
|
|
1189
1189
|
viewBox: "0 0 24 24",
|
|
1190
1190
|
fill: "none",
|
|
1191
1191
|
stroke: "currentColor",
|
|
1192
1192
|
"stroke-width": "2"
|
|
1193
|
-
},
|
|
1193
|
+
}, ol = {
|
|
1194
1194
|
key: 1,
|
|
1195
1195
|
viewBox: "0 0 24 24",
|
|
1196
1196
|
fill: "none",
|
|
1197
1197
|
stroke: "currentColor",
|
|
1198
1198
|
"stroke-width": "2"
|
|
1199
|
-
},
|
|
1199
|
+
}, rl = {
|
|
1200
1200
|
key: 3,
|
|
1201
1201
|
class: "artifactuse-viewer-caption"
|
|
1202
|
-
},
|
|
1202
|
+
}, cl = {
|
|
1203
1203
|
__name: "ArtifactuseViewer",
|
|
1204
1204
|
props: {
|
|
1205
1205
|
// Whether the viewer is open
|
|
@@ -1230,40 +1230,40 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1230
1230
|
},
|
|
1231
1231
|
emits: ["close"],
|
|
1232
1232
|
setup(H, { emit: c }) {
|
|
1233
|
-
const
|
|
1233
|
+
const _ = H, T = c, f = M(null), o = M(!1);
|
|
1234
1234
|
function q() {
|
|
1235
1235
|
o.value = !1, T("close");
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1238
|
-
|
|
1237
|
+
function E() {
|
|
1238
|
+
_.type === "image" && (o.value = !o.value);
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1240
|
+
function g() {
|
|
1241
|
+
const h = document.createElement("a");
|
|
1242
|
+
h.href = _.src, h.download = _.alt || "download", document.body.appendChild(h), h.click(), document.body.removeChild(h);
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1244
|
+
function n(h) {
|
|
1245
|
+
h.key === "Escape" && _.isOpen && q();
|
|
1246
1246
|
}
|
|
1247
|
-
return de(() =>
|
|
1248
|
-
|
|
1247
|
+
return de(() => _.isOpen, (h) => {
|
|
1248
|
+
h ? (xe(() => {
|
|
1249
1249
|
var x;
|
|
1250
|
-
(x =
|
|
1250
|
+
(x = f.value) == null || x.focus();
|
|
1251
1251
|
}), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", o.value = !1);
|
|
1252
|
-
}),
|
|
1253
|
-
document.addEventListener("keydown",
|
|
1254
|
-
}),
|
|
1255
|
-
document.removeEventListener("keydown",
|
|
1256
|
-
}), (
|
|
1257
|
-
|
|
1252
|
+
}), Me(() => {
|
|
1253
|
+
document.addEventListener("keydown", n);
|
|
1254
|
+
}), We(() => {
|
|
1255
|
+
document.removeEventListener("keydown", n), document.body.style.overflow = "";
|
|
1256
|
+
}), (h, x) => (a(), $e(Dt, { to: "body" }, [
|
|
1257
|
+
ze(Ee, { name: "artifactuse-viewer" }, {
|
|
1258
1258
|
default: Be(() => [
|
|
1259
1259
|
H.isOpen ? (a(), s("div", {
|
|
1260
1260
|
key: 0,
|
|
1261
1261
|
class: "artifactuse-viewer-overlay",
|
|
1262
1262
|
onClick: q,
|
|
1263
|
-
onKeydown:
|
|
1263
|
+
onKeydown: Nt(q, ["escape"]),
|
|
1264
1264
|
tabindex: "-1",
|
|
1265
1265
|
ref_key: "overlayRef",
|
|
1266
|
-
ref:
|
|
1266
|
+
ref: f
|
|
1267
1267
|
}, [
|
|
1268
1268
|
e("div", {
|
|
1269
1269
|
class: "artifactuse-viewer-content",
|
|
@@ -1274,13 +1274,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1274
1274
|
key: 0,
|
|
1275
1275
|
src: H.src,
|
|
1276
1276
|
alt: H.alt,
|
|
1277
|
-
class:
|
|
1278
|
-
onClick:
|
|
1279
|
-
}, null, 10,
|
|
1277
|
+
class: j(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": o.value }]),
|
|
1278
|
+
onClick: E
|
|
1279
|
+
}, null, 10, al)) : H.type === "pdf" ? (a(), s("iframe", {
|
|
1280
1280
|
key: 1,
|
|
1281
1281
|
src: H.src,
|
|
1282
1282
|
class: "artifactuse-viewer-pdf"
|
|
1283
|
-
}, null, 8,
|
|
1283
|
+
}, null, 8, sl)) : v("", !0),
|
|
1284
1284
|
e("button", {
|
|
1285
1285
|
class: "artifactuse-viewer-close",
|
|
1286
1286
|
onClick: q,
|
|
@@ -1306,13 +1306,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1306
1306
|
})
|
|
1307
1307
|
], -1)
|
|
1308
1308
|
])]),
|
|
1309
|
-
H.type === "image" ? (a(), s("div",
|
|
1309
|
+
H.type === "image" ? (a(), s("div", il, [
|
|
1310
1310
|
e("button", {
|
|
1311
1311
|
class: "artifactuse-viewer-control",
|
|
1312
|
-
onClick: he(
|
|
1312
|
+
onClick: he(E, ["stop"]),
|
|
1313
1313
|
title: o.value ? "Zoom out" : "Zoom in"
|
|
1314
1314
|
}, [
|
|
1315
|
-
o.value ? (a(), s("svg",
|
|
1315
|
+
o.value ? (a(), s("svg", ol, [...x[3] || (x[3] = [
|
|
1316
1316
|
e("circle", {
|
|
1317
1317
|
cx: "11",
|
|
1318
1318
|
cy: "11",
|
|
@@ -1330,7 +1330,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1330
1330
|
x2: "14",
|
|
1331
1331
|
y2: "11"
|
|
1332
1332
|
}, null, -1)
|
|
1333
|
-
])])) : (a(), s("svg",
|
|
1333
|
+
])])) : (a(), s("svg", nl, [...x[2] || (x[2] = [
|
|
1334
1334
|
e("circle", {
|
|
1335
1335
|
cx: "11",
|
|
1336
1336
|
cy: "11",
|
|
@@ -1355,10 +1355,10 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1355
1355
|
y2: "11"
|
|
1356
1356
|
}, null, -1)
|
|
1357
1357
|
])]))
|
|
1358
|
-
], 8,
|
|
1358
|
+
], 8, ll),
|
|
1359
1359
|
e("button", {
|
|
1360
1360
|
class: "artifactuse-viewer-control",
|
|
1361
|
-
onClick: he(
|
|
1361
|
+
onClick: he(g, ["stop"]),
|
|
1362
1362
|
title: "Download"
|
|
1363
1363
|
}, [...x[4] || (x[4] = [
|
|
1364
1364
|
e("svg", {
|
|
@@ -1378,7 +1378,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1378
1378
|
], -1)
|
|
1379
1379
|
])])
|
|
1380
1380
|
])) : v("", !0),
|
|
1381
|
-
H.caption ? (a(), s("div",
|
|
1381
|
+
H.caption ? (a(), s("div", rl, l(H.caption), 1)) : v("", !0)
|
|
1382
1382
|
])
|
|
1383
1383
|
], 544)) : v("", !0)
|
|
1384
1384
|
]),
|
|
@@ -1386,7 +1386,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1386
1386
|
})
|
|
1387
1387
|
]));
|
|
1388
1388
|
}
|
|
1389
|
-
},
|
|
1389
|
+
}, ul = ["innerHTML"], co = {
|
|
1390
1390
|
__name: "ArtifactuseAgentMessage",
|
|
1391
1391
|
props: {
|
|
1392
1392
|
// The raw message content (markdown/HTML from AI)
|
|
@@ -1447,30 +1447,30 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1447
1447
|
"social-copy",
|
|
1448
1448
|
"media-open"
|
|
1449
1449
|
],
|
|
1450
|
-
setup(H, { expose: c, emit:
|
|
1451
|
-
const T = H,
|
|
1450
|
+
setup(H, { expose: c, emit: _ }) {
|
|
1451
|
+
const T = H, f = _, {
|
|
1452
1452
|
processMessage: o,
|
|
1453
1453
|
openArtifact: q,
|
|
1454
|
-
state:
|
|
1455
|
-
getTheme:
|
|
1456
|
-
instance:
|
|
1457
|
-
} =
|
|
1458
|
-
let
|
|
1459
|
-
const O = M(!1), W = M("image"), Y = M(""), S = M(""), ie = M(""), Z = C(() => (
|
|
1454
|
+
state: E,
|
|
1455
|
+
getTheme: g,
|
|
1456
|
+
instance: n
|
|
1457
|
+
} = Ve(), h = M(null), x = M(null), I = M(""), $ = M([]);
|
|
1458
|
+
let N = null;
|
|
1459
|
+
const O = M(!1), W = M("image"), Y = M(""), S = M(""), ie = M(""), Z = C(() => (g == null ? void 0 : g()) || "dark"), X = C(() => E.activeArtifactId), oe = C(() => {
|
|
1460
1460
|
var b;
|
|
1461
|
-
return T.inlineCards ?? ((b =
|
|
1462
|
-
}),
|
|
1463
|
-
|
|
1464
|
-
T.typing && (
|
|
1461
|
+
return T.inlineCards ?? ((b = n == null ? void 0 : n.config) == null ? void 0 : b.inlineCards) ?? !0;
|
|
1462
|
+
}), m = M(!1);
|
|
1463
|
+
Me(() => {
|
|
1464
|
+
T.typing && (m.value = !0);
|
|
1465
1465
|
}), de(() => T.typing, (b) => {
|
|
1466
|
-
b && (
|
|
1466
|
+
b && (m.value = !0);
|
|
1467
1467
|
});
|
|
1468
|
-
const k = C(() =>
|
|
1468
|
+
const k = C(() => m.value || T.isLastMessage ? "active" : "inactive");
|
|
1469
1469
|
function ee(b) {
|
|
1470
1470
|
if (!b) return null;
|
|
1471
1471
|
try {
|
|
1472
|
-
const
|
|
1473
|
-
return JSON.parse(
|
|
1472
|
+
const V = decodeURIComponent(escape(atob(b)));
|
|
1473
|
+
return JSON.parse(V);
|
|
1474
1474
|
} catch {
|
|
1475
1475
|
try {
|
|
1476
1476
|
const D = b.replace(/ /g, `
|
|
@@ -1482,26 +1482,26 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
const re = C(() => {
|
|
1485
|
-
const b = [],
|
|
1486
|
-
if (!
|
|
1485
|
+
const b = [], V = I.value;
|
|
1486
|
+
if (!V) return b;
|
|
1487
1487
|
const D = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
|
|
1488
|
-
let te = 0,
|
|
1489
|
-
for (; (
|
|
1490
|
-
if (
|
|
1491
|
-
const U =
|
|
1488
|
+
let te = 0, A;
|
|
1489
|
+
for (; (A = D.exec(V)) !== null; ) {
|
|
1490
|
+
if (A.index > te) {
|
|
1491
|
+
const U = V.slice(te, A.index);
|
|
1492
1492
|
U.trim() && b.push({ type: "html", content: U });
|
|
1493
1493
|
}
|
|
1494
|
-
const ae = ee(
|
|
1495
|
-
ae && (d === "form" && ae.isInline ? b.push({ type: "form", artifact: ae }) : d === "social" ? b.push({ type: "social", artifact: ae }) : b.push({ type: "panel", artifact: ae })), te =
|
|
1494
|
+
const ae = ee(A[3]), d = A[2];
|
|
1495
|
+
ae && (d === "form" && ae.isInline ? b.push({ type: "form", artifact: ae }) : d === "social" ? b.push({ type: "social", artifact: ae }) : b.push({ type: "panel", artifact: ae })), te = A.index + A[0].length;
|
|
1496
1496
|
}
|
|
1497
|
-
if (te <
|
|
1498
|
-
const ae =
|
|
1497
|
+
if (te < V.length) {
|
|
1498
|
+
const ae = V.slice(te);
|
|
1499
1499
|
ae.trim() && b.push({ type: "html", content: ae });
|
|
1500
1500
|
}
|
|
1501
|
-
return b.length === 0 &&
|
|
1501
|
+
return b.length === 0 && V.trim() && b.push({ type: "html", content: V }), b;
|
|
1502
1502
|
});
|
|
1503
|
-
function
|
|
1504
|
-
W.value = b.type || "image", Y.value = b.src || "", S.value = b.alt || "", ie.value = b.caption || "", O.value = !0,
|
|
1503
|
+
function P(b) {
|
|
1504
|
+
W.value = b.type || "image", Y.value = b.src || "", S.value = b.alt || "", ie.value = b.caption || "", O.value = !0, f("media-open", b);
|
|
1505
1505
|
}
|
|
1506
1506
|
function Q() {
|
|
1507
1507
|
O.value = !1, Y.value = "", S.value = "", ie.value = "";
|
|
@@ -1510,7 +1510,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1510
1510
|
if (!x.value) return;
|
|
1511
1511
|
x.value.querySelectorAll('img[data-lightbox="true"]').forEach((d) => {
|
|
1512
1512
|
d._lightboxHandler && d.removeEventListener("click", d._lightboxHandler), d._lightboxHandler = (U) => {
|
|
1513
|
-
U.preventDefault(), U.stopPropagation(),
|
|
1513
|
+
U.preventDefault(), U.stopPropagation(), P({
|
|
1514
1514
|
type: "image",
|
|
1515
1515
|
src: d.src,
|
|
1516
1516
|
alt: d.alt || "",
|
|
@@ -1521,7 +1521,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1521
1521
|
d._lightboxHandler || (d._lightboxHandler = (U) => {
|
|
1522
1522
|
U.preventDefault(), U.stopPropagation();
|
|
1523
1523
|
const G = d.closest(".artifactuse-image-container"), ce = G == null ? void 0 : G.querySelector(".artifactuse-image-caption"), ke = (ce == null ? void 0 : ce.textContent) || d.dataset.caption || d.alt || "";
|
|
1524
|
-
|
|
1524
|
+
P({
|
|
1525
1525
|
type: "image",
|
|
1526
1526
|
src: d.src,
|
|
1527
1527
|
alt: d.alt || "",
|
|
@@ -1532,7 +1532,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1532
1532
|
d._lightboxHandler || (d._lightboxHandler = (U) => {
|
|
1533
1533
|
U.preventDefault(), U.stopPropagation();
|
|
1534
1534
|
const G = d.closest(".artifactuse-gallery-item"), ce = G == null ? void 0 : G.querySelector(".artifactuse-gallery-caption"), ke = (ce == null ? void 0 : ce.textContent) || d.dataset.caption || d.alt || "";
|
|
1535
|
-
|
|
1535
|
+
P({
|
|
1536
1536
|
type: "image",
|
|
1537
1537
|
src: d.src,
|
|
1538
1538
|
alt: d.alt || "",
|
|
@@ -1541,7 +1541,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1541
1541
|
}, d.addEventListener("click", d._lightboxHandler), d.style.cursor = "zoom-in");
|
|
1542
1542
|
}), x.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((d) => {
|
|
1543
1543
|
d._pdfHandler && d.removeEventListener("click", d._pdfHandler), d._pdfHandler = (U) => {
|
|
1544
|
-
U.preventDefault(), U.stopPropagation(),
|
|
1544
|
+
U.preventDefault(), U.stopPropagation(), P({
|
|
1545
1545
|
type: "pdf",
|
|
1546
1546
|
src: d.href,
|
|
1547
1547
|
alt: d.textContent || "PDF Document",
|
|
@@ -1553,7 +1553,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1553
1553
|
d._pdfHandler && d.removeEventListener("click", d._pdfHandler);
|
|
1554
1554
|
const U = d.dataset.pdfSrc || ((G = d.querySelector("iframe")) == null ? void 0 : G.src) || "";
|
|
1555
1555
|
U && (d._pdfHandler = (ce) => {
|
|
1556
|
-
ce.preventDefault(), ce.stopPropagation(),
|
|
1556
|
+
ce.preventDefault(), ce.stopPropagation(), P({
|
|
1557
1557
|
type: "pdf",
|
|
1558
1558
|
src: U,
|
|
1559
1559
|
alt: "PDF Document",
|
|
@@ -1570,21 +1570,21 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function L() {
|
|
1572
1572
|
if (!x.value) return;
|
|
1573
|
-
x.value.querySelectorAll("img").forEach((
|
|
1574
|
-
|
|
1575
|
-
}), x.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((
|
|
1576
|
-
|
|
1577
|
-
}), x.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((
|
|
1578
|
-
|
|
1579
|
-
}), x.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((
|
|
1580
|
-
|
|
1573
|
+
x.value.querySelectorAll("img").forEach((A) => {
|
|
1574
|
+
A._lightboxHandler && (A.removeEventListener("click", A._lightboxHandler), delete A._lightboxHandler);
|
|
1575
|
+
}), x.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((A) => {
|
|
1576
|
+
A._pdfHandler && (A.removeEventListener("click", A._pdfHandler), delete A._pdfHandler);
|
|
1577
|
+
}), x.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((A) => {
|
|
1578
|
+
A._pdfHandler && (A.removeEventListener("click", A._pdfHandler), delete A._pdfHandler);
|
|
1579
|
+
}), x.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((A) => {
|
|
1580
|
+
A._clickHandler && (A.removeEventListener("click", A._clickHandler), delete A._clickHandler);
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
1583
1583
|
function r() {
|
|
1584
|
-
|
|
1585
|
-
if (await
|
|
1584
|
+
N && clearTimeout(N), N = setTimeout(async () => {
|
|
1585
|
+
if (await xe(), n != null && n.initializeContent && x.value)
|
|
1586
1586
|
try {
|
|
1587
|
-
await
|
|
1587
|
+
await n.initializeContent(x.value);
|
|
1588
1588
|
} catch (b) {
|
|
1589
1589
|
console.error("Failed to initialize content:", b);
|
|
1590
1590
|
}
|
|
@@ -1595,78 +1595,78 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1595
1595
|
() => T.content,
|
|
1596
1596
|
(b) => {
|
|
1597
1597
|
if (b) {
|
|
1598
|
-
const
|
|
1598
|
+
const V = o(b, T.messageId, {
|
|
1599
1599
|
inlinePreview: T.inlinePreview,
|
|
1600
1600
|
inlineCode: T.inlineCode,
|
|
1601
1601
|
tabs: T.tabs,
|
|
1602
1602
|
viewMode: T.viewMode
|
|
1603
1603
|
});
|
|
1604
|
-
|
|
1604
|
+
I.value = V.html, $.value = V.artifacts, V.artifacts.length > 0 && f("artifact-detected", V.artifacts), T.typing || r();
|
|
1605
1605
|
}
|
|
1606
1606
|
},
|
|
1607
1607
|
{ immediate: !0 }
|
|
1608
1608
|
), de(
|
|
1609
1609
|
() => T.typing,
|
|
1610
|
-
(b,
|
|
1611
|
-
|
|
1610
|
+
(b, V) => {
|
|
1611
|
+
V === !0 && b === !1 && r();
|
|
1612
1612
|
}
|
|
1613
|
-
),
|
|
1613
|
+
), Me(() => {
|
|
1614
1614
|
T.typing || r();
|
|
1615
1615
|
}), jt(() => {
|
|
1616
|
-
|
|
1616
|
+
N && clearTimeout(N), L();
|
|
1617
1617
|
});
|
|
1618
|
-
function
|
|
1619
|
-
const
|
|
1620
|
-
if (
|
|
1621
|
-
if (
|
|
1622
|
-
const D =
|
|
1618
|
+
function B(b) {
|
|
1619
|
+
const V = b.target.closest(".artifactuse-inline-preview");
|
|
1620
|
+
if (V) {
|
|
1621
|
+
if (V.dataset.nonClickable) return;
|
|
1622
|
+
const D = V.dataset.artifactId;
|
|
1623
1623
|
if (D) {
|
|
1624
|
-
const te =
|
|
1624
|
+
const te = E.artifacts.find((A) => A.id === D);
|
|
1625
1625
|
te && u(te);
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
1629
|
function u(b) {
|
|
1630
|
-
q(b),
|
|
1630
|
+
q(b), f("artifact-open", b);
|
|
1631
1631
|
}
|
|
1632
1632
|
function z(b) {
|
|
1633
|
-
|
|
1633
|
+
f("artifact-copy", b);
|
|
1634
1634
|
}
|
|
1635
1635
|
function le(b) {
|
|
1636
|
-
|
|
1636
|
+
f("artifact-download", b);
|
|
1637
1637
|
}
|
|
1638
1638
|
function pe(b) {
|
|
1639
|
-
|
|
1639
|
+
f("form-submit", b);
|
|
1640
1640
|
}
|
|
1641
1641
|
function ye(b) {
|
|
1642
|
-
|
|
1642
|
+
f("form-cancel", b);
|
|
1643
1643
|
}
|
|
1644
1644
|
function fe(b) {
|
|
1645
|
-
|
|
1645
|
+
f("form-button-click", b);
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1648
|
-
|
|
1647
|
+
function Pe(b) {
|
|
1648
|
+
f("social-copy", b);
|
|
1649
1649
|
}
|
|
1650
|
-
return C(() =>
|
|
1651
|
-
openViewer:
|
|
1650
|
+
return C(() => E.artifacts.filter((b) => b.messageId === T.messageId)), c({
|
|
1651
|
+
openViewer: P,
|
|
1652
1652
|
closeViewer: Q,
|
|
1653
1653
|
attachMediaListeners: w
|
|
1654
|
-
}), (b,
|
|
1654
|
+
}), (b, V) => (a(), s("div", {
|
|
1655
1655
|
class: "artifactuse-agent-message",
|
|
1656
1656
|
ref_key: "messageRef",
|
|
1657
|
-
ref:
|
|
1657
|
+
ref: h
|
|
1658
1658
|
}, [
|
|
1659
1659
|
e("div", {
|
|
1660
1660
|
class: "artifactuse-message-content",
|
|
1661
1661
|
ref_key: "contentRef",
|
|
1662
1662
|
ref: x,
|
|
1663
|
-
onClick:
|
|
1663
|
+
onClick: B
|
|
1664
1664
|
}, [
|
|
1665
1665
|
(a(!0), s(R, null, ve(re.value, (D, te) => (a(), s(R, { key: te }, [
|
|
1666
1666
|
D.type === "html" ? (a(), s("div", {
|
|
1667
1667
|
key: 0,
|
|
1668
1668
|
innerHTML: D.content
|
|
1669
|
-
}, null, 8,
|
|
1669
|
+
}, null, 8, ul)) : D.type === "form" && D.artifact.isInline ? (a(), $e(Qa, {
|
|
1670
1670
|
key: 1,
|
|
1671
1671
|
artifact: D.artifact,
|
|
1672
1672
|
theme: Z.value,
|
|
@@ -1674,12 +1674,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1674
1674
|
onSubmit: pe,
|
|
1675
1675
|
onCancel: ye,
|
|
1676
1676
|
onButtonClick: fe
|
|
1677
|
-
}, null, 8, ["artifact", "theme", "initial-state"])) : D.type === "social" ? (a(),
|
|
1677
|
+
}, null, 8, ["artifact", "theme", "initial-state"])) : D.type === "social" ? (a(), $e(tl, {
|
|
1678
1678
|
key: 2,
|
|
1679
1679
|
artifact: D.artifact,
|
|
1680
1680
|
theme: Z.value,
|
|
1681
|
-
onCopy:
|
|
1682
|
-
}, null, 8, ["artifact", "theme"])) : D.type === "panel" && oe.value ? (a(),
|
|
1681
|
+
onCopy: Pe
|
|
1682
|
+
}, null, 8, ["artifact", "theme"])) : D.type === "panel" && oe.value ? (a(), $e(ca, {
|
|
1683
1683
|
key: 3,
|
|
1684
1684
|
artifact: D.artifact,
|
|
1685
1685
|
"is-active": X.value === D.artifact.id,
|
|
@@ -1689,7 +1689,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1689
1689
|
}, null, 8, ["artifact", "is-active"])) : v("", !0)
|
|
1690
1690
|
], 64))), 128))
|
|
1691
1691
|
], 512),
|
|
1692
|
-
|
|
1692
|
+
ze(cl, {
|
|
1693
1693
|
"is-open": O.value,
|
|
1694
1694
|
type: W.value,
|
|
1695
1695
|
src: Y.value,
|
|
@@ -1699,113 +1699,125 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1699
1699
|
}, null, 8, ["is-open", "type", "src", "alt", "caption"])
|
|
1700
1700
|
], 512));
|
|
1701
1701
|
}
|
|
1702
|
-
},
|
|
1702
|
+
}, dl = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, vl = { class: "artifactuse-panel__title" }, fl = { class: "artifactuse-panel__icon" }, pl = {
|
|
1703
|
+
key: 0,
|
|
1704
|
+
viewBox: "0 0 24 24",
|
|
1705
|
+
fill: "none",
|
|
1706
|
+
stroke: "currentColor",
|
|
1707
|
+
"stroke-width": "2"
|
|
1708
|
+
}, _l = {
|
|
1709
|
+
key: 1,
|
|
1710
|
+
viewBox: "0 0 24 24",
|
|
1711
|
+
fill: "none",
|
|
1712
|
+
stroke: "currentColor",
|
|
1713
|
+
"stroke-width": "2"
|
|
1714
|
+
}, hl = { class: "artifactuse-panel__title-content" }, ml = { class: "artifactuse-panel__name" }, yl = { class: "artifactuse-panel__actions" }, gl = { class: "artifactuse-panel__empty" }, kl = { class: "artifactuse-panel__empty-title" }, wl = { class: "artifactuse-panel__empty-text" }, bl = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Cl = {
|
|
1703
1715
|
key: 0,
|
|
1704
1716
|
href: "https://artifactuse.com",
|
|
1705
1717
|
target: "_blank",
|
|
1706
1718
|
rel: "noopener noreferrer",
|
|
1707
1719
|
class: "artifactuse-panel__branding"
|
|
1708
|
-
},
|
|
1720
|
+
}, xl = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, $l = { class: "artifactuse-panel__title" }, Ml = { class: "artifactuse-panel__title-content" }, Tl = { class: "artifactuse-panel__meta" }, Ll = { class: "artifactuse-panel__actions" }, Pl = ["disabled"], Al = {
|
|
1709
1721
|
key: 0,
|
|
1710
1722
|
viewBox: "0 0 24 24",
|
|
1711
1723
|
fill: "none",
|
|
1712
1724
|
stroke: "currentColor",
|
|
1713
1725
|
"stroke-width": "2"
|
|
1714
|
-
},
|
|
1726
|
+
}, Hl = {
|
|
1715
1727
|
key: 1,
|
|
1716
1728
|
class: "artifactuse-panel__spinner-icon",
|
|
1717
1729
|
viewBox: "0 0 24 24",
|
|
1718
1730
|
fill: "none",
|
|
1719
1731
|
stroke: "currentColor",
|
|
1720
1732
|
"stroke-width": "2"
|
|
1721
|
-
},
|
|
1733
|
+
}, El = { class: "artifactuse-panel__list" }, Bl = { class: "artifactuse-panel__list-items" }, Sl = ["onClick"], zl = ["innerHTML"], Vl = { class: "artifactuse-panel__list-item-content" }, Il = { class: "artifactuse-panel__list-item-title" }, Fl = { class: "artifactuse-panel__list-item-meta" }, Rl = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, ql = {
|
|
1722
1734
|
key: 0,
|
|
1723
1735
|
href: "https://artifactuse.com",
|
|
1724
1736
|
target: "_blank",
|
|
1725
1737
|
rel: "noopener noreferrer",
|
|
1726
1738
|
class: "artifactuse-panel__branding"
|
|
1727
|
-
},
|
|
1739
|
+
}, Ol = { class: "artifactuse-panel__header" }, Ul = ["title"], Dl = { class: "artifactuse-panel__title" }, Nl = ["innerHTML"], jl = { class: "artifactuse-panel__title-content" }, Wl = { class: "artifactuse-panel__name" }, Jl = { class: "artifactuse-panel__meta" }, Xl = { class: "artifactuse-panel__tabs" }, Zl = ["disabled"], Kl = ["disabled"], Yl = { class: "artifactuse-panel__actions" }, Ql = ["title"], Gl = {
|
|
1728
1740
|
key: 0,
|
|
1729
1741
|
viewBox: "0 0 24 24",
|
|
1730
1742
|
fill: "none",
|
|
1731
1743
|
stroke: "currentColor",
|
|
1732
1744
|
"stroke-width": "2"
|
|
1733
|
-
},
|
|
1745
|
+
}, en = {
|
|
1734
1746
|
key: 1,
|
|
1735
1747
|
viewBox: "0 0 24 24",
|
|
1736
1748
|
fill: "none",
|
|
1737
1749
|
stroke: "currentColor",
|
|
1738
1750
|
"stroke-width": "2"
|
|
1739
|
-
},
|
|
1751
|
+
}, tn = {
|
|
1740
1752
|
key: 0,
|
|
1741
1753
|
class: "artifactuse-panel__file-tabs"
|
|
1742
|
-
},
|
|
1754
|
+
}, an = { class: "artifactuse-panel__file-tabs-scroll" }, sn = ["onClick"], ln = ["innerHTML"], nn = { class: "artifactuse-panel__file-tab-title" }, on = ["onClick"], rn = {
|
|
1743
1755
|
key: 0,
|
|
1744
1756
|
class: "artifactuse-panel__loading"
|
|
1745
|
-
},
|
|
1757
|
+
}, cn = {
|
|
1746
1758
|
key: 0,
|
|
1747
1759
|
class: "artifactuse-panel__loading"
|
|
1748
|
-
},
|
|
1760
|
+
}, un = ["src"], dn = {
|
|
1749
1761
|
key: 2,
|
|
1750
1762
|
class: "artifactuse-panel__no-preview"
|
|
1751
|
-
},
|
|
1763
|
+
}, vn = { class: "artifactuse-panel__edit" }, fn = { class: "artifactuse-panel__footer" }, pn = { class: "artifactuse-panel__footer-left" }, _n = {
|
|
1752
1764
|
key: 0,
|
|
1753
1765
|
href: "https://artifactuse.com",
|
|
1754
1766
|
target: "_blank",
|
|
1755
1767
|
rel: "noopener noreferrer",
|
|
1756
1768
|
class: "artifactuse-panel__branding"
|
|
1757
|
-
},
|
|
1769
|
+
}, hn = {
|
|
1758
1770
|
key: 1,
|
|
1759
1771
|
class: "artifactuse-panel__badge"
|
|
1760
|
-
},
|
|
1772
|
+
}, mn = { class: "artifactuse-panel__footer-right" }, yn = ["title"], gn = {
|
|
1761
1773
|
key: 0,
|
|
1762
1774
|
viewBox: "0 0 24 24",
|
|
1763
1775
|
fill: "none",
|
|
1764
1776
|
stroke: "currentColor",
|
|
1765
1777
|
"stroke-width": "2"
|
|
1766
|
-
},
|
|
1778
|
+
}, kn = {
|
|
1767
1779
|
key: 1,
|
|
1768
1780
|
viewBox: "0 0 24 24",
|
|
1769
1781
|
fill: "none",
|
|
1770
1782
|
stroke: "currentColor",
|
|
1771
1783
|
"stroke-width": "2"
|
|
1772
|
-
},
|
|
1784
|
+
}, wn = {
|
|
1773
1785
|
key: 0,
|
|
1774
1786
|
style: { position: "relative" }
|
|
1775
|
-
},
|
|
1787
|
+
}, bn = {
|
|
1776
1788
|
key: 0,
|
|
1777
1789
|
class: "artifactuse-share-popup"
|
|
1778
|
-
},
|
|
1790
|
+
}, Cn = { class: "artifactuse-share-popup__header" }, xn = { class: "artifactuse-share-popup__title" }, $n = { class: "artifactuse-share-popup__body" }, Mn = {
|
|
1779
1791
|
key: 0,
|
|
1780
1792
|
class: "artifactuse-share-popup__loading"
|
|
1781
|
-
},
|
|
1793
|
+
}, Tn = { key: 1 }, Ln = { class: "artifactuse-share-popup__error" }, Pn = { class: "artifactuse-share-popup__error-text" }, An = { class: "artifactuse-share-popup__actions" }, Hn = {
|
|
1782
1794
|
key: 2,
|
|
1783
1795
|
class: "artifactuse-share-popup__options"
|
|
1784
|
-
},
|
|
1796
|
+
}, En = { key: 3 }, Bn = {
|
|
1785
1797
|
key: 0,
|
|
1786
1798
|
class: "artifactuse-share-popup__loading"
|
|
1787
|
-
},
|
|
1799
|
+
}, Sn = {
|
|
1788
1800
|
key: 1,
|
|
1789
1801
|
class: "artifactuse-share-popup__empty"
|
|
1790
|
-
},
|
|
1802
|
+
}, zn = {
|
|
1791
1803
|
key: 2,
|
|
1792
1804
|
class: "artifactuse-share-popup__artifact-list"
|
|
1793
|
-
},
|
|
1805
|
+
}, Vn = ["onClick"], In = { class: "artifactuse-share-popup__artifact-name" }, Fn = { class: "artifactuse-share-popup__artifact-date" }, Rn = {
|
|
1794
1806
|
key: 4,
|
|
1795
1807
|
class: "artifactuse-share-popup__success"
|
|
1796
|
-
},
|
|
1808
|
+
}, qn = { class: "artifactuse-share-popup__link-wrapper" }, On = ["value"], Un = {
|
|
1797
1809
|
key: 0,
|
|
1798
1810
|
class: "artifactuse-share-popup__expiry"
|
|
1799
|
-
},
|
|
1811
|
+
}, Dn = { class: "artifactuse-share-popup__expiry-text" }, Nn = {
|
|
1800
1812
|
key: 1,
|
|
1801
1813
|
class: "artifactuse-share-popup__save-prompt"
|
|
1802
|
-
},
|
|
1814
|
+
}, jn = {
|
|
1803
1815
|
key: 2,
|
|
1804
1816
|
class: "artifactuse-panel__nav"
|
|
1805
|
-
},
|
|
1817
|
+
}, Wn = ["disabled"], Jn = ["disabled"], Xn = {
|
|
1806
1818
|
key: 0,
|
|
1807
1819
|
class: "artifactuse-panel__artifact-list"
|
|
1808
|
-
},
|
|
1820
|
+
}, Zn = { class: "artifactuse-panel__artifact-list-header" }, Kn = { class: "artifactuse-panel__artifact-list-items" }, Yn = ["onClick"], Qn = ["innerHTML"], Gn = { class: "artifactuse-panel__artifact-item-content" }, eo = { class: "artifactuse-panel__artifact-item-title" }, to = { class: "artifactuse-panel__artifact-item-meta" }, ao = { class: "artifactuse-panel__artifact-item-index" }, uo = {
|
|
1809
1821
|
__name: "ArtifactusePanel",
|
|
1810
1822
|
props: {
|
|
1811
1823
|
panelWidth: { type: Number, default: void 0 },
|
|
@@ -1813,34 +1825,34 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1813
1825
|
},
|
|
1814
1826
|
emits: ["close", "ai-request", "save", "export", "resize"],
|
|
1815
1827
|
setup(H, { emit: c }) {
|
|
1816
|
-
var
|
|
1817
|
-
const
|
|
1818
|
-
state:
|
|
1828
|
+
var st, it;
|
|
1829
|
+
const _ = c, T = H, {
|
|
1830
|
+
state: f,
|
|
1819
1831
|
activeArtifact: o,
|
|
1820
1832
|
artifactCount: q,
|
|
1821
|
-
hasArtifacts:
|
|
1822
|
-
closePanel:
|
|
1823
|
-
toggleFullscreen:
|
|
1824
|
-
setViewMode:
|
|
1833
|
+
hasArtifacts: E,
|
|
1834
|
+
closePanel: g,
|
|
1835
|
+
toggleFullscreen: n,
|
|
1836
|
+
setViewMode: h,
|
|
1825
1837
|
getPanelUrl: x,
|
|
1826
|
-
openArtifact:
|
|
1838
|
+
openArtifact: I,
|
|
1827
1839
|
instance: $
|
|
1828
|
-
} =
|
|
1840
|
+
} = Ve(), N = M(null), O = M(null), W = M(null), Y = M(null), S = M(null), ie = M(null), Z = M(!1), X = M(!1), oe = M(!0), m = M(!1), k = M(!1), ee = M(!1), re = M(!1), P = M("options"), Q = M(""), w = M(null), L = M(""), r = M(!1), B = M(!1), u = M([]), z = M(!1), le = M("");
|
|
1829
1841
|
let pe = null, ye = null, fe = null;
|
|
1830
|
-
const
|
|
1842
|
+
const Pe = C(() => {
|
|
1831
1843
|
var i;
|
|
1832
1844
|
return ((i = $.editor) == null ? void 0 : i.isAvailable()) || !1;
|
|
1833
1845
|
}), b = M(
|
|
1834
|
-
Math.min(Math.max(T.panelWidth ?? ((
|
|
1835
|
-
),
|
|
1836
|
-
Math.min(Math.max(T.splitPosition ?? ((
|
|
1837
|
-
), D = C(() => o.value ?
|
|
1846
|
+
Math.min(Math.max(T.panelWidth ?? ((st = $.config) == null ? void 0 : st.panelWidth) ?? 65, 25), 75)
|
|
1847
|
+
), V = M(
|
|
1848
|
+
Math.min(Math.max(T.splitPosition ?? ((it = $.config) == null ? void 0 : it.splitPosition) ?? 50, 20), 80)
|
|
1849
|
+
), D = C(() => o.value ? Se(o.value.language) : ""), te = C(() => o.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${Ne(o.value.language)}</svg>` : ""), A = C(() => {
|
|
1838
1850
|
if (!o.value) return null;
|
|
1839
1851
|
let i = x(o.value);
|
|
1840
1852
|
return i && o.value._refreshToken && (i += (i.includes("?") ? "&" : "?") + "_t=" + o.value._refreshToken), i;
|
|
1841
1853
|
});
|
|
1842
|
-
C(() => !o.value || !
|
|
1843
|
-
const ae = C(() => o.value ?
|
|
1854
|
+
C(() => !o.value || !f.artifacts.length ? -1 : f.artifacts.findIndex((i) => i.id === o.value.id));
|
|
1855
|
+
const ae = C(() => o.value ? Xt(o.value.language || "plaintext") : "plaintext"), d = C(() => f.artifacts.filter((i) => !i.isInline)), U = C(() => o.value ? d.value.findIndex((i) => i.id === o.value.id) : -1), G = C(() => {
|
|
1844
1856
|
var i;
|
|
1845
1857
|
return ((i = $.config) == null ? void 0 : i.branding) !== !1;
|
|
1846
1858
|
}), ce = C(() => {
|
|
@@ -1849,31 +1861,31 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1849
1861
|
}), ke = C(() => {
|
|
1850
1862
|
var i;
|
|
1851
1863
|
return ((i = $.share) == null ? void 0 : i.isAuthenticated()) || !1;
|
|
1852
|
-
}),
|
|
1864
|
+
}), ft = C(() => !o.value && !f.forceEmptyView ? Math.min(b.value, 30) : b.value), Te = C(() => {
|
|
1853
1865
|
var i;
|
|
1854
1866
|
return ((i = $.config) == null ? void 0 : i.multiTab) === !0;
|
|
1855
|
-
}),
|
|
1867
|
+
}), we = C(() => f.forceEmptyView), Je = C(() => Te.value ? f.openTabs.map((i) => f.artifacts.find((t) => t.id === i)).filter(Boolean) : []);
|
|
1856
1868
|
function Ie(i) {
|
|
1857
|
-
return `<svg viewBox="0 0 24 24" fill="currentColor">${
|
|
1858
|
-
}
|
|
1859
|
-
function ft(i) {
|
|
1860
|
-
F(i);
|
|
1869
|
+
return `<svg viewBox="0 0 24 24" fill="currentColor">${Ne(i)}</svg>`;
|
|
1861
1870
|
}
|
|
1862
1871
|
function pt(i) {
|
|
1863
|
-
|
|
1872
|
+
I(i);
|
|
1864
1873
|
}
|
|
1865
|
-
function _t() {
|
|
1874
|
+
function _t(i) {
|
|
1875
|
+
$.closeTab(i), f.openTabs.length === 0 && (k.value = !1);
|
|
1876
|
+
}
|
|
1877
|
+
function ht() {
|
|
1866
1878
|
k.value = !1, $.state.clearActiveArtifact();
|
|
1867
1879
|
}
|
|
1868
|
-
function
|
|
1880
|
+
function Xe(i) {
|
|
1869
1881
|
if (i.language !== "smartdiff") return null;
|
|
1870
1882
|
try {
|
|
1871
1883
|
const t = JSON.parse(i.code);
|
|
1872
1884
|
if (t.oldCode === void 0 || t.newCode === void 0) return null;
|
|
1873
|
-
const
|
|
1885
|
+
const p = t.language || "plaintext", F = ot() && window.Prism.languages[p], J = Zt(t.oldCode, t.newCode).split(`
|
|
1874
1886
|
`);
|
|
1875
1887
|
return { html: J.map((ue) => {
|
|
1876
|
-
const ne = ue[0],
|
|
1888
|
+
const ne = ue[0], Ce = ue.slice(1), ge = F ? window.Prism.highlight(Ce, F, p) : Ce;
|
|
1877
1889
|
return ne === "-" ? `<span class="token deleted">${ge}</span>` : ne === "+" ? `<span class="token inserted">${ge}</span>` : ge;
|
|
1878
1890
|
}).join(`
|
|
1879
1891
|
`), lineCount: J.length };
|
|
@@ -1881,51 +1893,51 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1881
1893
|
return null;
|
|
1882
1894
|
}
|
|
1883
1895
|
}
|
|
1884
|
-
function
|
|
1896
|
+
function mt() {
|
|
1885
1897
|
var i;
|
|
1886
1898
|
if (Y.value && ((i = o.value) != null && i.code)) {
|
|
1887
|
-
const t =
|
|
1899
|
+
const t = Xe(o.value), p = t ? t.lineCount : o.value.code.split(`
|
|
1888
1900
|
`).length;
|
|
1889
|
-
Y.value.innerHTML = Array.from({ length:
|
|
1901
|
+
Y.value.innerHTML = Array.from({ length: p }, (F, J) => `<div>${J + 1}</div>`).join("");
|
|
1890
1902
|
}
|
|
1891
1903
|
}
|
|
1892
|
-
function
|
|
1904
|
+
function yt() {
|
|
1893
1905
|
var i;
|
|
1894
|
-
if (O.value &&
|
|
1895
|
-
const t =
|
|
1906
|
+
if (O.value && ot() && ((i = o.value) != null && i.code)) {
|
|
1907
|
+
const t = Xe(o.value);
|
|
1896
1908
|
if (t)
|
|
1897
1909
|
O.value.innerHTML = t.html;
|
|
1898
1910
|
else {
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1911
|
+
const p = window.Prism.languages[ae.value];
|
|
1912
|
+
p ? O.value.innerHTML = window.Prism.highlight(
|
|
1901
1913
|
o.value.code,
|
|
1902
|
-
|
|
1914
|
+
p,
|
|
1903
1915
|
ae.value
|
|
1904
1916
|
) : O.value.textContent = o.value.code;
|
|
1905
1917
|
}
|
|
1906
|
-
O.value.dataset.highlighted = "true",
|
|
1907
|
-
|
|
1918
|
+
O.value.dataset.highlighted = "true", xe(() => {
|
|
1919
|
+
gt();
|
|
1908
1920
|
});
|
|
1909
1921
|
}
|
|
1910
1922
|
}
|
|
1911
|
-
function
|
|
1923
|
+
function gt() {
|
|
1912
1924
|
var t;
|
|
1913
1925
|
const i = (t = O.value) == null ? void 0 : t.closest("pre");
|
|
1914
1926
|
if (i && S.value && Y.value) {
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1927
|
+
const F = window.getComputedStyle(i).backgroundColor;
|
|
1928
|
+
F && F !== "rgba(0, 0, 0, 0)" && F !== "transparent" && (S.value.style.backgroundColor = F, Y.value.style.backgroundColor = F);
|
|
1917
1929
|
}
|
|
1918
1930
|
}
|
|
1919
|
-
function
|
|
1931
|
+
function kt() {
|
|
1920
1932
|
S.value && (S.value.style.backgroundColor = ""), Y.value && (Y.value.style.backgroundColor = "");
|
|
1921
1933
|
}
|
|
1922
1934
|
function Ae() {
|
|
1923
|
-
|
|
1924
|
-
|
|
1935
|
+
xe(() => {
|
|
1936
|
+
mt(), yt();
|
|
1925
1937
|
});
|
|
1926
1938
|
}
|
|
1927
|
-
function
|
|
1928
|
-
!
|
|
1939
|
+
function Ze() {
|
|
1940
|
+
!Pe.value || !ie.value || !o.value || (Fe(), fe = $.editor.create(ie.value, {
|
|
1929
1941
|
code: o.value.code || "",
|
|
1930
1942
|
language: o.value.editorLanguage || o.value.language || "plaintext",
|
|
1931
1943
|
sdkTheme: $.getTheme()
|
|
@@ -1934,7 +1946,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1934
1946
|
function Fe() {
|
|
1935
1947
|
fe && (fe.destroy(), fe = null);
|
|
1936
1948
|
}
|
|
1937
|
-
function
|
|
1949
|
+
function wt() {
|
|
1938
1950
|
if (!fe || !o.value) return;
|
|
1939
1951
|
const i = fe.getCode();
|
|
1940
1952
|
$.emit("edit:save", {
|
|
@@ -1943,18 +1955,18 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1943
1955
|
code: i
|
|
1944
1956
|
});
|
|
1945
1957
|
}
|
|
1946
|
-
function wt() {
|
|
1947
|
-
clearTimeout(ye), oe.value = !1, j.value && o.value && ($.bridge.setIframe(j.value), $.bridge.loadArtifact(o.value));
|
|
1948
|
-
}
|
|
1949
1958
|
function bt() {
|
|
1950
|
-
clearTimeout(ye), oe.value = !1;
|
|
1959
|
+
clearTimeout(ye), oe.value = !1, N.value && o.value && ($.bridge.setIframe(N.value), $.bridge.loadArtifact(o.value));
|
|
1951
1960
|
}
|
|
1952
1961
|
function Ct() {
|
|
1962
|
+
clearTimeout(ye), oe.value = !1;
|
|
1963
|
+
}
|
|
1964
|
+
function xt() {
|
|
1953
1965
|
clearTimeout(ye), ye = setTimeout(() => {
|
|
1954
1966
|
oe.value = !1;
|
|
1955
1967
|
}, 1e3);
|
|
1956
1968
|
}
|
|
1957
|
-
async function
|
|
1969
|
+
async function $t() {
|
|
1958
1970
|
if (o.value)
|
|
1959
1971
|
try {
|
|
1960
1972
|
await navigator.clipboard.writeText(o.value.code), Z.value = !0, setTimeout(() => {
|
|
@@ -1964,24 +1976,24 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1964
1976
|
console.error("Failed to copy:", i);
|
|
1965
1977
|
}
|
|
1966
1978
|
}
|
|
1967
|
-
function
|
|
1979
|
+
function Mt() {
|
|
1968
1980
|
if (!o.value) return;
|
|
1969
|
-
const { code: i, language: t, title:
|
|
1981
|
+
const { code: i, language: t, title: p } = o.value, F = je(t), J = `${p.toLowerCase().replace(/\s+/g, "-")}.${F}`, me = new Blob([i], { type: "text/plain" }), ue = URL.createObjectURL(me), ne = document.createElement("a");
|
|
1970
1982
|
ne.href = ue, ne.download = J, document.body.appendChild(ne), ne.click(), document.body.removeChild(ne), URL.revokeObjectURL(ue);
|
|
1971
1983
|
}
|
|
1972
|
-
async function
|
|
1984
|
+
async function Tt() {
|
|
1973
1985
|
if (!(ee.value || d.value.length === 0)) {
|
|
1974
1986
|
ee.value = !0;
|
|
1975
1987
|
try {
|
|
1976
|
-
const i = new
|
|
1988
|
+
const i = new Yt(), t = /* @__PURE__ */ new Map();
|
|
1977
1989
|
for (const ne of d.value) {
|
|
1978
1990
|
if (!ne.code) continue;
|
|
1979
|
-
const
|
|
1980
|
-
let ge = (ne.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""),
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1991
|
+
const Ce = je(ne.language);
|
|
1992
|
+
let ge = (ne.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Ue = `${ge}.${Ce}`;
|
|
1993
|
+
const De = t.get(Ue) || 0;
|
|
1994
|
+
De > 0 && (Ue = `${ge}-${De}.${Ce}`), t.set(`${ge}.${Ce}`, De + 1), i.file(Ue, ne.code);
|
|
1983
1995
|
}
|
|
1984
|
-
const
|
|
1996
|
+
const p = await i.generateAsync({ type: "blob" }), J = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, me = URL.createObjectURL(p), ue = document.createElement("a");
|
|
1985
1997
|
ue.href = me, ue.download = J, document.body.appendChild(ue), ue.click(), document.body.removeChild(ue), URL.revokeObjectURL(me);
|
|
1986
1998
|
} catch (i) {
|
|
1987
1999
|
console.error("Failed to create ZIP:", i);
|
|
@@ -1990,90 +2002,90 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
1990
2002
|
}
|
|
1991
2003
|
}
|
|
1992
2004
|
}
|
|
1993
|
-
function
|
|
2005
|
+
function Lt() {
|
|
1994
2006
|
if (re.value) {
|
|
1995
2007
|
re.value = !1;
|
|
1996
2008
|
return;
|
|
1997
2009
|
}
|
|
1998
|
-
o.value && (
|
|
2010
|
+
o.value && (P.value = "options", Q.value = "", w.value = null, L.value = "", r.value = !1, B.value = !1, u.value = [], z.value = !1, le.value = "", re.value = !0);
|
|
1999
2011
|
}
|
|
2000
|
-
function
|
|
2012
|
+
function Pt() {
|
|
2001
2013
|
re.value = !1;
|
|
2002
2014
|
}
|
|
2003
|
-
function
|
|
2015
|
+
function Ke(i) {
|
|
2004
2016
|
return i ? new Date(i).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "";
|
|
2005
2017
|
}
|
|
2006
|
-
async function
|
|
2018
|
+
async function Ye() {
|
|
2007
2019
|
if (!(!o.value || !$.share)) {
|
|
2008
|
-
|
|
2020
|
+
P.value = "loading", L.value = "";
|
|
2009
2021
|
try {
|
|
2010
2022
|
const i = await $.share.share(o.value);
|
|
2011
|
-
Q.value = i.url, w.value = i.expiresAt,
|
|
2023
|
+
Q.value = i.url, w.value = i.expiresAt, B.value = !1, P.value = "success";
|
|
2012
2024
|
} catch (i) {
|
|
2013
|
-
L.value = i.message || "Failed to create share link",
|
|
2025
|
+
L.value = i.message || "Failed to create share link", P.value = "error";
|
|
2014
2026
|
}
|
|
2015
2027
|
}
|
|
2016
2028
|
}
|
|
2017
|
-
async function
|
|
2029
|
+
async function Qe() {
|
|
2018
2030
|
if (ke.value)
|
|
2019
|
-
|
|
2031
|
+
Re();
|
|
2020
2032
|
else {
|
|
2021
|
-
|
|
2033
|
+
P.value = "loading";
|
|
2022
2034
|
try {
|
|
2023
|
-
await $.share.openAuthPopup(),
|
|
2035
|
+
await $.share.openAuthPopup(), Re();
|
|
2024
2036
|
} catch (i) {
|
|
2025
|
-
i.message === "Authentication cancelled" ?
|
|
2037
|
+
i.message === "Authentication cancelled" ? P.value = "options" : (L.value = i.message || "Authentication failed", P.value = "error");
|
|
2026
2038
|
}
|
|
2027
2039
|
}
|
|
2028
2040
|
}
|
|
2029
|
-
async function
|
|
2041
|
+
async function Re() {
|
|
2030
2042
|
if (!(!o.value || !$.share)) {
|
|
2031
|
-
|
|
2043
|
+
P.value = "loading", L.value = "";
|
|
2032
2044
|
try {
|
|
2033
2045
|
const i = await $.share.save(o.value);
|
|
2034
|
-
Q.value = i.url, w.value = null,
|
|
2046
|
+
Q.value = i.url, w.value = null, B.value = !0, P.value = "success";
|
|
2035
2047
|
} catch (i) {
|
|
2036
|
-
L.value = i.message || "Failed to save artifact",
|
|
2048
|
+
L.value = i.message || "Failed to save artifact", P.value = "error";
|
|
2037
2049
|
}
|
|
2038
2050
|
}
|
|
2039
2051
|
}
|
|
2040
2052
|
function At() {
|
|
2041
|
-
|
|
2053
|
+
B.value ? Re() : Ye();
|
|
2042
2054
|
}
|
|
2043
|
-
async function
|
|
2055
|
+
async function Ht() {
|
|
2044
2056
|
var i;
|
|
2045
2057
|
if ($.share) {
|
|
2046
2058
|
if (!ke.value) {
|
|
2047
|
-
|
|
2059
|
+
P.value = "loading";
|
|
2048
2060
|
try {
|
|
2049
2061
|
await $.share.openAuthPopup();
|
|
2050
2062
|
} catch (t) {
|
|
2051
|
-
t.message === "Authentication cancelled" ?
|
|
2063
|
+
t.message === "Authentication cancelled" ? P.value = "options" : (L.value = t.message || "Authentication failed", P.value = "error");
|
|
2052
2064
|
return;
|
|
2053
2065
|
}
|
|
2054
2066
|
}
|
|
2055
|
-
|
|
2067
|
+
P.value = "update-list", z.value = !0;
|
|
2056
2068
|
try {
|
|
2057
|
-
const t = ((i = o.value) == null ? void 0 : i.language) || null,
|
|
2058
|
-
u.value =
|
|
2069
|
+
const t = ((i = o.value) == null ? void 0 : i.language) || null, p = await $.share.listArtifacts(t);
|
|
2070
|
+
u.value = p.projects || [];
|
|
2059
2071
|
} catch (t) {
|
|
2060
|
-
L.value = t.message || "Failed to load artifacts",
|
|
2072
|
+
L.value = t.message || "Failed to load artifacts", P.value = "error";
|
|
2061
2073
|
} finally {
|
|
2062
2074
|
z.value = !1;
|
|
2063
2075
|
}
|
|
2064
2076
|
}
|
|
2065
2077
|
}
|
|
2066
|
-
async function
|
|
2067
|
-
var
|
|
2078
|
+
async function Et(i) {
|
|
2079
|
+
var p, F;
|
|
2068
2080
|
if (!o.value || !$.share) return;
|
|
2069
|
-
const t = (
|
|
2081
|
+
const t = (p = i.project) == null ? void 0 : p.uuid;
|
|
2070
2082
|
if (t) {
|
|
2071
|
-
|
|
2083
|
+
P.value = "loading", L.value = "";
|
|
2072
2084
|
try {
|
|
2073
2085
|
const J = await $.share.updateArtifact(t, o.value);
|
|
2074
|
-
Q.value = J.url || "", w.value = null,
|
|
2086
|
+
Q.value = J.url || "", w.value = null, B.value = !0, le.value = ((F = i.project) == null ? void 0 : F.name) || "Untitled", P.value = "success";
|
|
2075
2087
|
} catch (J) {
|
|
2076
|
-
L.value = J.message || "Failed to update artifact",
|
|
2088
|
+
L.value = J.message || "Failed to update artifact", P.value = "error";
|
|
2077
2089
|
}
|
|
2078
2090
|
}
|
|
2079
2091
|
}
|
|
@@ -2087,109 +2099,315 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2087
2099
|
console.error("Failed to copy link:", i);
|
|
2088
2100
|
}
|
|
2089
2101
|
}
|
|
2090
|
-
function Et() {
|
|
2091
|
-
P.value && window.open(P.value, "_blank");
|
|
2092
|
-
}
|
|
2093
2102
|
function St() {
|
|
2094
|
-
|
|
2103
|
+
A.value && window.open(A.value, "_blank");
|
|
2095
2104
|
}
|
|
2096
2105
|
function zt() {
|
|
2106
|
+
Y.value && S.value && (Y.value.style.transform = `translateY(-${S.value.scrollTop}px)`);
|
|
2107
|
+
}
|
|
2108
|
+
function Vt() {
|
|
2097
2109
|
X.value = !X.value;
|
|
2098
2110
|
}
|
|
2099
|
-
function
|
|
2100
|
-
k.value = !0,
|
|
2111
|
+
function Ge(i) {
|
|
2112
|
+
k.value = !0, I(i), X.value = !1;
|
|
2101
2113
|
}
|
|
2102
2114
|
function It() {
|
|
2103
2115
|
const i = U.value - 1;
|
|
2104
|
-
i >= 0 &&
|
|
2116
|
+
i >= 0 && I(d.value[i]);
|
|
2105
2117
|
}
|
|
2106
2118
|
function Ft() {
|
|
2107
2119
|
const i = U.value + 1;
|
|
2108
|
-
i < d.value.length &&
|
|
2120
|
+
i < d.value.length && I(d.value[i]);
|
|
2109
2121
|
}
|
|
2110
|
-
function
|
|
2122
|
+
function et(i) {
|
|
2111
2123
|
const t = document.querySelector(".artifactuse-panel__nav");
|
|
2112
2124
|
t && !t.contains(i.target) && (X.value = !1);
|
|
2113
2125
|
}
|
|
2114
|
-
let
|
|
2115
|
-
function
|
|
2116
|
-
|
|
2126
|
+
let be = null;
|
|
2127
|
+
function Rt(i) {
|
|
2128
|
+
be = {
|
|
2117
2129
|
startX: i.clientX,
|
|
2118
2130
|
startWidth: b.value
|
|
2119
|
-
}, document.addEventListener("mousemove",
|
|
2131
|
+
}, document.addEventListener("mousemove", tt), document.addEventListener("mouseup", qe), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((p) => p.style.pointerEvents = "none");
|
|
2120
2132
|
}
|
|
2121
|
-
function
|
|
2122
|
-
if (!
|
|
2123
|
-
const t = window.innerWidth,
|
|
2124
|
-
b.value = Math.min(Math.max(J, 25), 75),
|
|
2133
|
+
function tt(i) {
|
|
2134
|
+
if (!be) return;
|
|
2135
|
+
const t = window.innerWidth, F = (be.startX - i.clientX) / t * 100, J = be.startWidth + F;
|
|
2136
|
+
b.value = Math.min(Math.max(J, 25), 75), _("resize", { width: b.value });
|
|
2125
2137
|
}
|
|
2126
|
-
function
|
|
2127
|
-
const i =
|
|
2128
|
-
|
|
2138
|
+
function qe() {
|
|
2139
|
+
const i = be !== null;
|
|
2140
|
+
be = null, document.removeEventListener("mousemove", tt), document.removeEventListener("mouseup", qe), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((p) => p.style.pointerEvents = ""), i && _("resize", { width: b.value });
|
|
2129
2141
|
}
|
|
2130
|
-
let
|
|
2131
|
-
function
|
|
2142
|
+
let Le = null;
|
|
2143
|
+
function qt(i) {
|
|
2132
2144
|
if (!W.value) return;
|
|
2133
2145
|
const t = W.value.getBoundingClientRect();
|
|
2134
|
-
|
|
2146
|
+
Le = {
|
|
2135
2147
|
startX: i.clientX,
|
|
2136
|
-
startPosition:
|
|
2148
|
+
startPosition: V.value,
|
|
2137
2149
|
contentLeft: t.left,
|
|
2138
2150
|
contentWidth: t.width
|
|
2139
|
-
}, document.addEventListener("mousemove",
|
|
2151
|
+
}, document.addEventListener("mousemove", at), document.addEventListener("mouseup", Oe), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((F) => F.style.pointerEvents = "none");
|
|
2140
2152
|
}
|
|
2141
|
-
function
|
|
2142
|
-
if (!
|
|
2143
|
-
const
|
|
2144
|
-
|
|
2153
|
+
function at(i) {
|
|
2154
|
+
if (!Le) return;
|
|
2155
|
+
const p = (i.clientX - Le.contentLeft) / Le.contentWidth * 100;
|
|
2156
|
+
V.value = Math.min(Math.max(p, 20), 80);
|
|
2145
2157
|
}
|
|
2146
|
-
function
|
|
2147
|
-
|
|
2158
|
+
function Oe() {
|
|
2159
|
+
Le = null, document.removeEventListener("mousemove", at), document.removeEventListener("mouseup", Oe), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
|
|
2148
2160
|
}
|
|
2149
2161
|
return de(o, (i, t) => {
|
|
2150
|
-
i && (t && t.isPreviewable !== i.isPreviewable && (
|
|
2151
|
-
|
|
2152
|
-
}, 150)), (!t || i.id !== t.id) && (
|
|
2153
|
-
|
|
2162
|
+
i && (t && t.isPreviewable !== i.isPreviewable && (m.value = !0, setTimeout(() => {
|
|
2163
|
+
m.value = !1;
|
|
2164
|
+
}, 150)), (!t || i.id !== t.id) && (kt(), oe.value = !0, xt()), (!t || i.id !== t.id || i.code !== t.code) && (Ae(), f.viewMode === "edit" && (!t || i.id !== t.id ? xe(() => Ze()) : fe && fe.setCode(i.code || "")), clearTimeout(pe), pe = setTimeout(() => {
|
|
2165
|
+
N.value && i.isPreviewable && $.bridge.loadArtifact(i);
|
|
2154
2166
|
}, 500)));
|
|
2155
|
-
}, { deep: !0 }), de(() =>
|
|
2156
|
-
(i === "code" || i === "split") && Ae(), i === "edit" &&
|
|
2157
|
-
}), de(() =>
|
|
2167
|
+
}, { deep: !0 }), de(() => f.viewMode, (i) => {
|
|
2168
|
+
(i === "code" || i === "split") && Ae(), i === "edit" && xe(() => Ze());
|
|
2169
|
+
}), de(() => f.isPanelOpen, (i) => {
|
|
2158
2170
|
i && o.value && Ae(), i || Fe();
|
|
2159
2171
|
}), de(() => T.panelWidth, (i) => {
|
|
2160
2172
|
i !== void 0 && (b.value = Math.min(Math.max(i, 25), 75));
|
|
2161
2173
|
}), de(() => T.splitPosition, (i) => {
|
|
2162
|
-
i !== void 0 && (
|
|
2163
|
-
}),
|
|
2164
|
-
$.on("ai:request", (i) =>
|
|
2165
|
-
}),
|
|
2166
|
-
|
|
2167
|
-
}), (i, t) => (a(),
|
|
2174
|
+
i !== void 0 && (V.value = Math.min(Math.max(i, 20), 80));
|
|
2175
|
+
}), Me(() => {
|
|
2176
|
+
$.on("ai:request", (i) => _("ai-request", i)), $.on("save:request", (i) => _("save", i)), $.on("export:complete", (i) => _("export", i)), document.addEventListener("click", et), f.isPanelOpen && o.value && Ae();
|
|
2177
|
+
}), We(() => {
|
|
2178
|
+
qe(), Oe(), Fe(), document.removeEventListener("click", et), clearTimeout(pe), clearTimeout(ye);
|
|
2179
|
+
}), (i, t) => (a(), $e(Ee, { name: "artifactuse-panel" }, {
|
|
2168
2180
|
default: Be(() => [
|
|
2169
|
-
|
|
2181
|
+
y(f).isPanelOpen ? (a(), s("div", {
|
|
2170
2182
|
key: 0,
|
|
2171
|
-
class:
|
|
2172
|
-
"artifactuse-panel--fullscreen":
|
|
2173
|
-
"artifactuse-panel--list": !
|
|
2174
|
-
"artifactuse-panel--empty": !
|
|
2183
|
+
class: j(["artifactuse-panel", {
|
|
2184
|
+
"artifactuse-panel--fullscreen": y(f).isFullscreen,
|
|
2185
|
+
"artifactuse-panel--list": !y(o) && y(E) && !y(f).forceEmptyView,
|
|
2186
|
+
"artifactuse-panel--empty": !y(E) && !y(f).forceEmptyView
|
|
2175
2187
|
}]),
|
|
2176
|
-
style:
|
|
2188
|
+
style: He(y(f).isFullscreen ? void 0 : { width: `${ft.value}%` })
|
|
2177
2189
|
}, [
|
|
2178
|
-
|
|
2190
|
+
y(f).isFullscreen ? v("", !0) : (a(), s("div", {
|
|
2179
2191
|
key: 0,
|
|
2180
2192
|
class: "artifactuse-panel__resize-handle",
|
|
2181
|
-
onMousedown: he(
|
|
2193
|
+
onMousedown: he(Rt, ["prevent"])
|
|
2182
2194
|
}, [...t[12] || (t[12] = [
|
|
2183
2195
|
e("div", { class: "artifactuse-panel__resize-handle-line" }, null, -1)
|
|
2184
2196
|
])], 32)),
|
|
2185
|
-
|
|
2186
|
-
e("header",
|
|
2187
|
-
|
|
2197
|
+
!y(E) || we.value ? (a(), s(R, { key: 1 }, [
|
|
2198
|
+
e("header", dl, [
|
|
2199
|
+
e("div", vl, [
|
|
2200
|
+
e("span", fl, [
|
|
2201
|
+
we.value ? (a(), s("svg", pl, [...t[13] || (t[13] = [
|
|
2202
|
+
e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }, null, -1),
|
|
2203
|
+
e("polyline", { points: "14 2 14 8 20 8" }, null, -1)
|
|
2204
|
+
])])) : (a(), s("svg", _l, [...t[14] || (t[14] = [
|
|
2205
|
+
e("polyline", { points: "16 18 22 12 16 6" }, null, -1),
|
|
2206
|
+
e("polyline", { points: "8 6 2 12 8 18" }, null, -1)
|
|
2207
|
+
])]))
|
|
2208
|
+
]),
|
|
2209
|
+
e("div", hl, [
|
|
2210
|
+
e("span", ml, l(we.value ? "Artifact Viewer" : "Artifacts"), 1)
|
|
2211
|
+
])
|
|
2212
|
+
]),
|
|
2213
|
+
e("div", yl, [
|
|
2214
|
+
e("button", {
|
|
2215
|
+
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2216
|
+
title: "Close panel",
|
|
2217
|
+
onClick: t[0] || (t[0] = (...p) => y(g) && y(g)(...p))
|
|
2218
|
+
}, [...t[15] || (t[15] = [
|
|
2219
|
+
e("svg", {
|
|
2220
|
+
viewBox: "0 0 24 24",
|
|
2221
|
+
fill: "none",
|
|
2222
|
+
stroke: "currentColor",
|
|
2223
|
+
"stroke-width": "2"
|
|
2224
|
+
}, [
|
|
2225
|
+
e("line", {
|
|
2226
|
+
x1: "18",
|
|
2227
|
+
y1: "6",
|
|
2228
|
+
x2: "6",
|
|
2229
|
+
y2: "18"
|
|
2230
|
+
}),
|
|
2231
|
+
e("line", {
|
|
2232
|
+
x1: "6",
|
|
2233
|
+
y1: "6",
|
|
2234
|
+
x2: "18",
|
|
2235
|
+
y2: "18"
|
|
2236
|
+
})
|
|
2237
|
+
], -1)
|
|
2238
|
+
])])
|
|
2239
|
+
])
|
|
2240
|
+
]),
|
|
2241
|
+
e("div", gl, [
|
|
2242
|
+
t[16] || (t[16] = e("div", { class: "artifactuse-panel__empty-icon" }, [
|
|
2243
|
+
e("svg", {
|
|
2244
|
+
viewBox: "0 0 24 24",
|
|
2245
|
+
fill: "none",
|
|
2246
|
+
stroke: "currentColor",
|
|
2247
|
+
"stroke-width": "1.5"
|
|
2248
|
+
}, [
|
|
2249
|
+
e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
2250
|
+
e("polyline", { points: "14 2 14 8 20 8" })
|
|
2251
|
+
])
|
|
2252
|
+
], -1)),
|
|
2253
|
+
e("h3", kl, l(we.value ? "No artifact selected" : "No artifacts yet"), 1),
|
|
2254
|
+
e("p", wl, l(we.value ? "Open an artifact to have it appear here" : "Code blocks, forms, and other interactive content will appear here as the AI generates them."), 1)
|
|
2255
|
+
]),
|
|
2256
|
+
e("footer", bl, [
|
|
2257
|
+
G.value ? (a(), s("a", Cl, [...t[17] || (t[17] = [
|
|
2258
|
+
e("svg", {
|
|
2259
|
+
width: "16",
|
|
2260
|
+
height: "16",
|
|
2261
|
+
viewBox: "0 0 42 42",
|
|
2262
|
+
fill: "none",
|
|
2263
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2264
|
+
}, [
|
|
2265
|
+
e("path", {
|
|
2266
|
+
d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
|
|
2267
|
+
fill: "#5F51C8"
|
|
2268
|
+
}),
|
|
2269
|
+
e("path", {
|
|
2270
|
+
d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
|
|
2271
|
+
fill: "#695AE0"
|
|
2272
|
+
})
|
|
2273
|
+
], -1),
|
|
2274
|
+
e("span", null, "Artifactuse", -1)
|
|
2275
|
+
])])) : v("", !0)
|
|
2276
|
+
])
|
|
2277
|
+
], 64)) : !y(o) && !we.value ? (a(), s(R, { key: 2 }, [
|
|
2278
|
+
e("header", xl, [
|
|
2279
|
+
e("div", $l, [
|
|
2280
|
+
t[19] || (t[19] = e("span", { class: "artifactuse-panel__icon" }, [
|
|
2281
|
+
e("svg", {
|
|
2282
|
+
viewBox: "0 0 24 24",
|
|
2283
|
+
fill: "none",
|
|
2284
|
+
stroke: "currentColor",
|
|
2285
|
+
"stroke-width": "2"
|
|
2286
|
+
}, [
|
|
2287
|
+
e("polyline", { points: "16 18 22 12 16 6" }),
|
|
2288
|
+
e("polyline", { points: "8 6 2 12 8 18" })
|
|
2289
|
+
])
|
|
2290
|
+
], -1)),
|
|
2291
|
+
e("div", Ml, [
|
|
2292
|
+
t[18] || (t[18] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
|
|
2293
|
+
e("span", Tl, l(d.value.length) + " available", 1)
|
|
2294
|
+
])
|
|
2295
|
+
]),
|
|
2296
|
+
e("div", Ll, [
|
|
2297
|
+
e("button", {
|
|
2298
|
+
class: j(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ee.value }]),
|
|
2299
|
+
disabled: ee.value,
|
|
2300
|
+
title: "Download all as ZIP",
|
|
2301
|
+
onClick: Tt
|
|
2302
|
+
}, [
|
|
2303
|
+
ee.value ? (a(), s("svg", Hl, [...t[21] || (t[21] = [
|
|
2304
|
+
e("circle", {
|
|
2305
|
+
cx: "12",
|
|
2306
|
+
cy: "12",
|
|
2307
|
+
r: "10",
|
|
2308
|
+
"stroke-dasharray": "32",
|
|
2309
|
+
"stroke-dashoffset": "32"
|
|
2310
|
+
}, null, -1)
|
|
2311
|
+
])])) : (a(), s("svg", Al, [...t[20] || (t[20] = [
|
|
2312
|
+
e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
|
|
2313
|
+
e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
|
|
2314
|
+
e("line", {
|
|
2315
|
+
x1: "12",
|
|
2316
|
+
y1: "15",
|
|
2317
|
+
x2: "12",
|
|
2318
|
+
y2: "3"
|
|
2319
|
+
}, null, -1)
|
|
2320
|
+
])]))
|
|
2321
|
+
], 10, Pl),
|
|
2322
|
+
e("button", {
|
|
2323
|
+
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2324
|
+
title: "Close panel",
|
|
2325
|
+
onClick: t[1] || (t[1] = (...p) => y(g) && y(g)(...p))
|
|
2326
|
+
}, [...t[22] || (t[22] = [
|
|
2327
|
+
e("svg", {
|
|
2328
|
+
viewBox: "0 0 24 24",
|
|
2329
|
+
fill: "none",
|
|
2330
|
+
stroke: "currentColor",
|
|
2331
|
+
"stroke-width": "2"
|
|
2332
|
+
}, [
|
|
2333
|
+
e("line", {
|
|
2334
|
+
x1: "18",
|
|
2335
|
+
y1: "6",
|
|
2336
|
+
x2: "6",
|
|
2337
|
+
y2: "18"
|
|
2338
|
+
}),
|
|
2339
|
+
e("line", {
|
|
2340
|
+
x1: "6",
|
|
2341
|
+
y1: "6",
|
|
2342
|
+
x2: "18",
|
|
2343
|
+
y2: "18"
|
|
2344
|
+
})
|
|
2345
|
+
], -1)
|
|
2346
|
+
])])
|
|
2347
|
+
])
|
|
2348
|
+
]),
|
|
2349
|
+
e("div", El, [
|
|
2350
|
+
e("div", Bl, [
|
|
2351
|
+
(a(!0), s(R, null, ve(d.value, (p, F) => (a(), s("button", {
|
|
2352
|
+
key: p.id,
|
|
2353
|
+
class: "artifactuse-panel__list-item",
|
|
2354
|
+
onClick: (J) => Ge(p)
|
|
2355
|
+
}, [
|
|
2356
|
+
e("span", {
|
|
2357
|
+
class: "artifactuse-panel__list-item-icon",
|
|
2358
|
+
innerHTML: Ie(p.language)
|
|
2359
|
+
}, null, 8, zl),
|
|
2360
|
+
e("div", Vl, [
|
|
2361
|
+
e("span", Il, l(p.title || "Untitled"), 1),
|
|
2362
|
+
e("span", Fl, [
|
|
2363
|
+
K(l(y(Se)(p.language)) + " ", 1),
|
|
2364
|
+
p.lineCount ? (a(), s(R, { key: 0 }, [
|
|
2365
|
+
K(" • " + l(p.lineCount) + " lines ", 1)
|
|
2366
|
+
], 64)) : v("", !0)
|
|
2367
|
+
])
|
|
2368
|
+
]),
|
|
2369
|
+
t[23] || (t[23] = e("span", { class: "artifactuse-panel__list-item-arrow" }, [
|
|
2370
|
+
e("svg", {
|
|
2371
|
+
viewBox: "0 0 24 24",
|
|
2372
|
+
fill: "none",
|
|
2373
|
+
stroke: "currentColor",
|
|
2374
|
+
"stroke-width": "2"
|
|
2375
|
+
}, [
|
|
2376
|
+
e("polyline", { points: "9 18 15 12 9 6" })
|
|
2377
|
+
])
|
|
2378
|
+
], -1))
|
|
2379
|
+
], 8, Sl))), 128))
|
|
2380
|
+
])
|
|
2381
|
+
]),
|
|
2382
|
+
e("footer", Rl, [
|
|
2383
|
+
G.value ? (a(), s("a", ql, [...t[24] || (t[24] = [
|
|
2384
|
+
e("svg", {
|
|
2385
|
+
width: "16",
|
|
2386
|
+
height: "16",
|
|
2387
|
+
viewBox: "0 0 42 42",
|
|
2388
|
+
fill: "none",
|
|
2389
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2390
|
+
}, [
|
|
2391
|
+
e("path", {
|
|
2392
|
+
d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
|
|
2393
|
+
fill: "#5F51C8"
|
|
2394
|
+
}),
|
|
2395
|
+
e("path", {
|
|
2396
|
+
d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
|
|
2397
|
+
fill: "#695AE0"
|
|
2398
|
+
})
|
|
2399
|
+
], -1),
|
|
2400
|
+
e("span", null, "Artifactuse", -1)
|
|
2401
|
+
])])) : v("", !0)
|
|
2402
|
+
])
|
|
2403
|
+
], 64)) : (a(), s(R, { key: 3 }, [
|
|
2404
|
+
e("header", Ol, [
|
|
2405
|
+
Te.value || k.value ? (a(), s("button", {
|
|
2188
2406
|
key: 0,
|
|
2189
2407
|
class: "artifactuse-panel__back",
|
|
2190
|
-
title:
|
|
2191
|
-
onClick:
|
|
2192
|
-
}, [...t[
|
|
2408
|
+
title: Te.value ? "Browse artifacts" : "Back to list",
|
|
2409
|
+
onClick: ht
|
|
2410
|
+
}, [...t[25] || (t[25] = [
|
|
2193
2411
|
e("svg", {
|
|
2194
2412
|
viewBox: "0 0 24 24",
|
|
2195
2413
|
fill: "none",
|
|
@@ -2198,30 +2416,30 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2198
2416
|
}, [
|
|
2199
2417
|
e("polyline", { points: "15 18 9 12 15 6" })
|
|
2200
2418
|
], -1)
|
|
2201
|
-
])], 8,
|
|
2202
|
-
e("div",
|
|
2419
|
+
])], 8, Ul)) : v("", !0),
|
|
2420
|
+
e("div", Dl, [
|
|
2203
2421
|
e("span", {
|
|
2204
2422
|
class: "artifactuse-panel__icon",
|
|
2205
2423
|
innerHTML: te.value
|
|
2206
|
-
}, null, 8,
|
|
2207
|
-
e("div",
|
|
2208
|
-
e("span",
|
|
2209
|
-
e("span",
|
|
2210
|
-
K(
|
|
2211
|
-
|
|
2212
|
-
K(" • " +
|
|
2424
|
+
}, null, 8, Nl),
|
|
2425
|
+
e("div", jl, [
|
|
2426
|
+
e("span", Wl, l(y(o).title || "Untitled"), 1),
|
|
2427
|
+
e("span", Jl, [
|
|
2428
|
+
K(l(D.value) + " ", 1),
|
|
2429
|
+
y(o).lineCount ? (a(), s(R, { key: 0 }, [
|
|
2430
|
+
K(" • " + l(y(o).lineCount) + " lines ", 1)
|
|
2213
2431
|
], 64)) : v("", !0)
|
|
2214
2432
|
])
|
|
2215
2433
|
])
|
|
2216
2434
|
]),
|
|
2217
|
-
e("div",
|
|
2218
|
-
!
|
|
2435
|
+
e("div", Xl, [
|
|
2436
|
+
!y(o).tabs || y(o).tabs.includes("preview") ? (a(), s("button", {
|
|
2219
2437
|
key: 0,
|
|
2220
|
-
class:
|
|
2221
|
-
disabled: !
|
|
2438
|
+
class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "preview" }]),
|
|
2439
|
+
disabled: !y(o).isPreviewable,
|
|
2222
2440
|
title: "Preview",
|
|
2223
|
-
onClick: t[2] || (t[2] = (
|
|
2224
|
-
}, [...t[
|
|
2441
|
+
onClick: t[2] || (t[2] = (p) => y(h)("preview"))
|
|
2442
|
+
}, [...t[26] || (t[26] = [
|
|
2225
2443
|
e("svg", {
|
|
2226
2444
|
viewBox: "0 0 24 24",
|
|
2227
2445
|
fill: "none",
|
|
@@ -2235,13 +2453,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2235
2453
|
r: "3"
|
|
2236
2454
|
})
|
|
2237
2455
|
], -1)
|
|
2238
|
-
])], 10,
|
|
2239
|
-
!
|
|
2456
|
+
])], 10, Zl)) : v("", !0),
|
|
2457
|
+
!y(o).tabs || y(o).tabs.includes("code") ? (a(), s("button", {
|
|
2240
2458
|
key: 1,
|
|
2241
|
-
class:
|
|
2459
|
+
class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "code" }]),
|
|
2242
2460
|
title: "Code",
|
|
2243
|
-
onClick: t[3] || (t[3] = (
|
|
2244
|
-
}, [...t[
|
|
2461
|
+
onClick: t[3] || (t[3] = (p) => y(h)("code"))
|
|
2462
|
+
}, [...t[27] || (t[27] = [
|
|
2245
2463
|
e("svg", {
|
|
2246
2464
|
viewBox: "0 0 24 24",
|
|
2247
2465
|
fill: "none",
|
|
@@ -2252,13 +2470,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2252
2470
|
e("polyline", { points: "8 6 2 12 8 18" })
|
|
2253
2471
|
], -1)
|
|
2254
2472
|
])], 2)) : v("", !0),
|
|
2255
|
-
!
|
|
2473
|
+
!y(o).tabs || y(o).tabs.includes("split") ? (a(), s("button", {
|
|
2256
2474
|
key: 2,
|
|
2257
|
-
class:
|
|
2258
|
-
disabled: !
|
|
2475
|
+
class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "split" }]),
|
|
2476
|
+
disabled: !y(o).isPreviewable,
|
|
2259
2477
|
title: "Split view",
|
|
2260
|
-
onClick: t[4] || (t[4] = (
|
|
2261
|
-
}, [...t[
|
|
2478
|
+
onClick: t[4] || (t[4] = (p) => y(h)("split"))
|
|
2479
|
+
}, [...t[28] || (t[28] = [
|
|
2262
2480
|
e("svg", {
|
|
2263
2481
|
viewBox: "0 0 24 24",
|
|
2264
2482
|
fill: "none",
|
|
@@ -2280,13 +2498,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2280
2498
|
y2: "21"
|
|
2281
2499
|
})
|
|
2282
2500
|
], -1)
|
|
2283
|
-
])], 10,
|
|
2284
|
-
|
|
2501
|
+
])], 10, Kl)) : v("", !0),
|
|
2502
|
+
y(o).tabs && y(o).tabs.includes("edit") && Pe.value ? (a(), s("button", {
|
|
2285
2503
|
key: 3,
|
|
2286
|
-
class:
|
|
2504
|
+
class: j(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": y(f).viewMode === "edit" }]),
|
|
2287
2505
|
title: "Edit",
|
|
2288
|
-
onClick: t[5] || (t[5] = (
|
|
2289
|
-
}, [...t[
|
|
2506
|
+
onClick: t[5] || (t[5] = (p) => y(h)("edit"))
|
|
2507
|
+
}, [...t[29] || (t[29] = [
|
|
2290
2508
|
e("svg", {
|
|
2291
2509
|
viewBox: "0 0 24 24",
|
|
2292
2510
|
fill: "none",
|
|
@@ -2298,13 +2516,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2298
2516
|
], -1)
|
|
2299
2517
|
])], 2)) : v("", !0)
|
|
2300
2518
|
]),
|
|
2301
|
-
e("div",
|
|
2302
|
-
|
|
2519
|
+
e("div", Yl, [
|
|
2520
|
+
y(f).viewMode === "edit" ? (a(), s("button", {
|
|
2303
2521
|
key: 0,
|
|
2304
2522
|
class: "artifactuse-panel__action artifactuse-panel__action--save",
|
|
2305
2523
|
title: "Save",
|
|
2306
|
-
onClick:
|
|
2307
|
-
}, [...t[
|
|
2524
|
+
onClick: wt
|
|
2525
|
+
}, [...t[30] || (t[30] = [
|
|
2308
2526
|
e("svg", {
|
|
2309
2527
|
viewBox: "0 0 24 24",
|
|
2310
2528
|
fill: "none",
|
|
@@ -2318,10 +2536,10 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2318
2536
|
])])) : v("", !0),
|
|
2319
2537
|
e("button", {
|
|
2320
2538
|
class: "artifactuse-panel__action",
|
|
2321
|
-
title:
|
|
2322
|
-
onClick: t[6] || (t[6] = (...
|
|
2539
|
+
title: y(f).isFullscreen ? "Exit fullscreen" : "Fullscreen",
|
|
2540
|
+
onClick: t[6] || (t[6] = (...p) => y(n) && y(n)(...p))
|
|
2323
2541
|
}, [
|
|
2324
|
-
|
|
2542
|
+
y(f).isFullscreen ? (a(), s("svg", en, [...t[32] || (t[32] = [
|
|
2325
2543
|
e("polyline", { points: "4 14 10 14 10 20" }, null, -1),
|
|
2326
2544
|
e("polyline", { points: "20 10 14 10 14 4" }, null, -1),
|
|
2327
2545
|
e("line", {
|
|
@@ -2336,7 +2554,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2336
2554
|
x2: "10",
|
|
2337
2555
|
y2: "14"
|
|
2338
2556
|
}, null, -1)
|
|
2339
|
-
])])) : (a(), s("svg",
|
|
2557
|
+
])])) : (a(), s("svg", Gl, [...t[31] || (t[31] = [
|
|
2340
2558
|
e("polyline", { points: "15 3 21 3 21 9" }, null, -1),
|
|
2341
2559
|
e("polyline", { points: "9 21 3 21 3 15" }, null, -1),
|
|
2342
2560
|
e("line", {
|
|
@@ -2352,12 +2570,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2352
2570
|
y2: "14"
|
|
2353
2571
|
}, null, -1)
|
|
2354
2572
|
])]))
|
|
2355
|
-
], 8,
|
|
2573
|
+
], 8, Ql),
|
|
2356
2574
|
e("button", {
|
|
2357
2575
|
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2358
2576
|
title: "Close panel",
|
|
2359
|
-
onClick: t[7] || (t[7] = (...
|
|
2360
|
-
}, [...t[
|
|
2577
|
+
onClick: t[7] || (t[7] = (...p) => y(g) && y(g)(...p))
|
|
2578
|
+
}, [...t[33] || (t[33] = [
|
|
2361
2579
|
e("svg", {
|
|
2362
2580
|
viewBox: "0 0 24 24",
|
|
2363
2581
|
fill: "none",
|
|
@@ -2380,25 +2598,25 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2380
2598
|
])])
|
|
2381
2599
|
])
|
|
2382
2600
|
]),
|
|
2383
|
-
|
|
2384
|
-
e("div",
|
|
2385
|
-
(a(!0), s(R, null, ve(
|
|
2386
|
-
var
|
|
2601
|
+
Te.value && Je.value.length > 0 ? (a(), s("div", tn, [
|
|
2602
|
+
e("div", an, [
|
|
2603
|
+
(a(!0), s(R, null, ve(Je.value, (p) => {
|
|
2604
|
+
var F;
|
|
2387
2605
|
return a(), s("button", {
|
|
2388
|
-
key:
|
|
2389
|
-
class:
|
|
2390
|
-
onClick: (J) =>
|
|
2606
|
+
key: p.id,
|
|
2607
|
+
class: j(["artifactuse-panel__file-tab", { "artifactuse-panel__file-tab--active": p.id === ((F = y(o)) == null ? void 0 : F.id) }]),
|
|
2608
|
+
onClick: (J) => pt(p)
|
|
2391
2609
|
}, [
|
|
2392
2610
|
e("span", {
|
|
2393
2611
|
class: "artifactuse-panel__file-tab-icon",
|
|
2394
|
-
innerHTML: Ie(
|
|
2395
|
-
}, null, 8,
|
|
2396
|
-
e("span",
|
|
2612
|
+
innerHTML: Ie(p.language)
|
|
2613
|
+
}, null, 8, ln),
|
|
2614
|
+
e("span", nn, l(p.title || "Untitled"), 1),
|
|
2397
2615
|
e("button", {
|
|
2398
2616
|
class: "artifactuse-panel__file-tab-close",
|
|
2399
2617
|
title: "Close tab",
|
|
2400
|
-
onClick: he((J) =>
|
|
2401
|
-
}, [...t[
|
|
2618
|
+
onClick: he((J) => _t(p.id), ["stop"])
|
|
2619
|
+
}, [...t[34] || (t[34] = [
|
|
2402
2620
|
e("svg", {
|
|
2403
2621
|
viewBox: "0 0 24 24",
|
|
2404
2622
|
fill: "none",
|
|
@@ -2418,42 +2636,42 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2418
2636
|
y2: "18"
|
|
2419
2637
|
})
|
|
2420
2638
|
], -1)
|
|
2421
|
-
])], 8,
|
|
2422
|
-
], 10,
|
|
2639
|
+
])], 8, on)
|
|
2640
|
+
], 10, sn);
|
|
2423
2641
|
}), 128))
|
|
2424
2642
|
])
|
|
2425
2643
|
])) : v("", !0),
|
|
2426
2644
|
e("div", {
|
|
2427
2645
|
ref_key: "contentRef",
|
|
2428
2646
|
ref: W,
|
|
2429
|
-
class:
|
|
2430
|
-
`artifactuse-panel__content--${
|
|
2431
|
-
{ "artifactuse-panel__content--transitioning":
|
|
2647
|
+
class: j(["artifactuse-panel__content", [
|
|
2648
|
+
`artifactuse-panel__content--${y(f).viewMode}`,
|
|
2649
|
+
{ "artifactuse-panel__content--transitioning": m.value }
|
|
2432
2650
|
]])
|
|
2433
2651
|
}, [
|
|
2434
|
-
|
|
2652
|
+
m.value ? (a(), s("div", rn, [...t[35] || (t[35] = [
|
|
2435
2653
|
e("div", { class: "artifactuse-panel__spinner" }, null, -1)
|
|
2436
2654
|
])])) : v("", !0),
|
|
2437
|
-
|
|
2655
|
+
y(f).viewMode === "preview" || y(f).viewMode === "split" ? (a(), s("div", {
|
|
2438
2656
|
key: 1,
|
|
2439
2657
|
class: "artifactuse-panel__preview",
|
|
2440
|
-
style:
|
|
2658
|
+
style: He(y(f).viewMode === "split" ? { width: `${V.value}%` } : void 0)
|
|
2441
2659
|
}, [
|
|
2442
|
-
oe.value &&
|
|
2660
|
+
oe.value && A.value ? (a(), s("div", cn, [...t[36] || (t[36] = [
|
|
2443
2661
|
e("div", { class: "artifactuse-panel__spinner" }, null, -1)
|
|
2444
2662
|
])])) : v("", !0),
|
|
2445
|
-
|
|
2663
|
+
A.value ? (a(), s("iframe", {
|
|
2446
2664
|
key: 1,
|
|
2447
2665
|
ref_key: "iframeRef",
|
|
2448
|
-
ref:
|
|
2449
|
-
src:
|
|
2450
|
-
class:
|
|
2666
|
+
ref: N,
|
|
2667
|
+
src: A.value,
|
|
2668
|
+
class: j(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": oe.value }]),
|
|
2451
2669
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation",
|
|
2452
2670
|
allow: "camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write",
|
|
2453
|
-
onLoad:
|
|
2454
|
-
onError:
|
|
2455
|
-
}, null, 42,
|
|
2456
|
-
t[
|
|
2671
|
+
onLoad: bt,
|
|
2672
|
+
onError: Ct
|
|
2673
|
+
}, null, 42, un)) : (a(), s("div", dn, [
|
|
2674
|
+
t[37] || (t[37] = e("svg", {
|
|
2457
2675
|
viewBox: "0 0 24 24",
|
|
2458
2676
|
fill: "none",
|
|
2459
2677
|
stroke: "currentColor",
|
|
@@ -2468,25 +2686,25 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2468
2686
|
y2: "12"
|
|
2469
2687
|
})
|
|
2470
2688
|
], -1)),
|
|
2471
|
-
e("p", null, "Preview not available for " +
|
|
2689
|
+
e("p", null, "Preview not available for " + l(D.value), 1)
|
|
2472
2690
|
]))
|
|
2473
2691
|
], 4)) : v("", !0),
|
|
2474
|
-
|
|
2692
|
+
lt(e("div", {
|
|
2475
2693
|
class: "artifactuse-panel__code",
|
|
2476
|
-
style:
|
|
2694
|
+
style: He(y(f).viewMode === "split" ? { width: `${100 - V.value}%` } : void 0)
|
|
2477
2695
|
}, [
|
|
2478
|
-
|
|
2696
|
+
y(f).viewMode === "split" ? (a(), s("div", {
|
|
2479
2697
|
key: 0,
|
|
2480
2698
|
class: "artifactuse-panel__split-handle",
|
|
2481
|
-
onMousedown: he(
|
|
2482
|
-
}, [...t[
|
|
2699
|
+
onMousedown: he(qt, ["prevent"])
|
|
2700
|
+
}, [...t[38] || (t[38] = [
|
|
2483
2701
|
e("div", { class: "artifactuse-panel__split-handle-line" }, null, -1)
|
|
2484
2702
|
])], 32)) : v("", !0),
|
|
2485
2703
|
e("div", {
|
|
2486
2704
|
class: "artifactuse-panel__code-scroll",
|
|
2487
2705
|
ref_key: "codeScrollRef",
|
|
2488
2706
|
ref: S,
|
|
2489
|
-
onScroll:
|
|
2707
|
+
onScroll: zt
|
|
2490
2708
|
}, [
|
|
2491
2709
|
e("div", {
|
|
2492
2710
|
class: "artifactuse-panel__line-numbers",
|
|
@@ -2494,32 +2712,32 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2494
2712
|
ref: Y
|
|
2495
2713
|
}, null, 512),
|
|
2496
2714
|
e("pre", {
|
|
2497
|
-
class:
|
|
2715
|
+
class: j(["artifactuse-panel__code-block", `language-${ae.value}`])
|
|
2498
2716
|
}, [
|
|
2499
2717
|
(a(), s("code", {
|
|
2500
2718
|
ref_key: "codeRef",
|
|
2501
2719
|
ref: O,
|
|
2502
|
-
key:
|
|
2503
|
-
class:
|
|
2720
|
+
key: y(o).id,
|
|
2721
|
+
class: j(`language-${ae.value}`)
|
|
2504
2722
|
}, null, 2))
|
|
2505
2723
|
], 2)
|
|
2506
2724
|
], 544)
|
|
2507
2725
|
], 4), [
|
|
2508
|
-
[
|
|
2726
|
+
[nt, y(f).viewMode === "code" || y(f).viewMode === "split"]
|
|
2509
2727
|
]),
|
|
2510
|
-
|
|
2728
|
+
lt(e("div", vn, [
|
|
2511
2729
|
e("div", {
|
|
2512
2730
|
ref_key: "editorContainerRef",
|
|
2513
2731
|
ref: ie,
|
|
2514
2732
|
class: "artifactuse-panel__editor-container"
|
|
2515
2733
|
}, null, 512)
|
|
2516
2734
|
], 512), [
|
|
2517
|
-
[
|
|
2735
|
+
[nt, y(f).viewMode === "edit"]
|
|
2518
2736
|
])
|
|
2519
2737
|
], 2),
|
|
2520
|
-
e("footer",
|
|
2521
|
-
e("div",
|
|
2522
|
-
G.value ? (a(), s("a",
|
|
2738
|
+
e("footer", fn, [
|
|
2739
|
+
e("div", pn, [
|
|
2740
|
+
G.value ? (a(), s("a", _n, [...t[39] || (t[39] = [
|
|
2523
2741
|
e("svg", {
|
|
2524
2742
|
width: "16",
|
|
2525
2743
|
height: "16",
|
|
@@ -2538,17 +2756,17 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2538
2756
|
], -1),
|
|
2539
2757
|
e("span", null, "Artifactuse", -1)
|
|
2540
2758
|
])])) : v("", !0),
|
|
2541
|
-
|
|
2759
|
+
y(o).size ? (a(), s("span", hn, l(y(ct)(y(o).size)), 1)) : v("", !0)
|
|
2542
2760
|
]),
|
|
2543
|
-
e("div",
|
|
2761
|
+
e("div", mn, [
|
|
2544
2762
|
e("button", {
|
|
2545
|
-
class:
|
|
2763
|
+
class: j(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": Z.value }]),
|
|
2546
2764
|
title: Z.value ? "Copied!" : "Copy code",
|
|
2547
|
-
onClick:
|
|
2765
|
+
onClick: $t
|
|
2548
2766
|
}, [
|
|
2549
|
-
Z.value ? (a(), s("svg",
|
|
2767
|
+
Z.value ? (a(), s("svg", kn, [...t[41] || (t[41] = [
|
|
2550
2768
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
2551
|
-
])])) : (a(), s("svg",
|
|
2769
|
+
])])) : (a(), s("svg", gn, [...t[40] || (t[40] = [
|
|
2552
2770
|
e("rect", {
|
|
2553
2771
|
x: "9",
|
|
2554
2772
|
y: "9",
|
|
@@ -2559,12 +2777,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2559
2777
|
}, null, -1),
|
|
2560
2778
|
e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
|
|
2561
2779
|
])]))
|
|
2562
|
-
], 10,
|
|
2780
|
+
], 10, yn),
|
|
2563
2781
|
e("button", {
|
|
2564
2782
|
class: "artifactuse-panel__footer-action",
|
|
2565
2783
|
title: "Download file",
|
|
2566
|
-
onClick:
|
|
2567
|
-
}, [...t[
|
|
2784
|
+
onClick: Mt
|
|
2785
|
+
}, [...t[42] || (t[42] = [
|
|
2568
2786
|
e("svg", {
|
|
2569
2787
|
viewBox: "0 0 24 24",
|
|
2570
2788
|
fill: "none",
|
|
@@ -2581,12 +2799,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2581
2799
|
})
|
|
2582
2800
|
], -1)
|
|
2583
2801
|
])]),
|
|
2584
|
-
ce.value ? (a(), s("div",
|
|
2802
|
+
ce.value ? (a(), s("div", wn, [
|
|
2585
2803
|
e("button", {
|
|
2586
2804
|
class: "artifactuse-panel__footer-action",
|
|
2587
2805
|
title: "Share",
|
|
2588
|
-
onClick:
|
|
2589
|
-
}, [...t[
|
|
2806
|
+
onClick: Lt
|
|
2807
|
+
}, [...t[43] || (t[43] = [
|
|
2590
2808
|
e("svg", {
|
|
2591
2809
|
viewBox: "0 0 24 24",
|
|
2592
2810
|
fill: "none",
|
|
@@ -2622,15 +2840,15 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2622
2840
|
})
|
|
2623
2841
|
], -1)
|
|
2624
2842
|
])]),
|
|
2625
|
-
|
|
2843
|
+
ze(Ee, { name: "artifactuse-popup" }, {
|
|
2626
2844
|
default: Be(() => [
|
|
2627
|
-
re.value ? (a(), s("div",
|
|
2628
|
-
e("div",
|
|
2629
|
-
e("span",
|
|
2845
|
+
re.value ? (a(), s("div", bn, [
|
|
2846
|
+
e("div", Cn, [
|
|
2847
|
+
e("span", xn, l(P.value === "success" ? le.value ? "Artifact updated!" : "Link created!" : P.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
|
|
2630
2848
|
e("button", {
|
|
2631
2849
|
class: "artifactuse-share-popup__close",
|
|
2632
|
-
onClick:
|
|
2633
|
-
}, [...t[
|
|
2850
|
+
onClick: Pt
|
|
2851
|
+
}, [...t[44] || (t[44] = [
|
|
2634
2852
|
e("svg", {
|
|
2635
2853
|
viewBox: "0 0 24 24",
|
|
2636
2854
|
fill: "none",
|
|
@@ -2652,29 +2870,29 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2652
2870
|
], -1)
|
|
2653
2871
|
])])
|
|
2654
2872
|
]),
|
|
2655
|
-
e("div",
|
|
2656
|
-
|
|
2873
|
+
e("div", $n, [
|
|
2874
|
+
P.value === "loading" ? (a(), s("div", Mn, [...t[45] || (t[45] = [
|
|
2657
2875
|
e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
|
|
2658
2876
|
e("p", { class: "artifactuse-share-popup__loading-text" }, "Creating link...", -1)
|
|
2659
|
-
])])) :
|
|
2660
|
-
e("div",
|
|
2661
|
-
e("p",
|
|
2877
|
+
])])) : P.value === "error" ? (a(), s("div", Tn, [
|
|
2878
|
+
e("div", Ln, [
|
|
2879
|
+
e("p", Pn, l(L.value), 1)
|
|
2662
2880
|
]),
|
|
2663
|
-
e("div",
|
|
2881
|
+
e("div", An, [
|
|
2664
2882
|
e("button", {
|
|
2665
2883
|
class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary",
|
|
2666
|
-
onClick: t[8] || (t[8] = (
|
|
2884
|
+
onClick: t[8] || (t[8] = (p) => P.value = "options")
|
|
2667
2885
|
}, " Back "),
|
|
2668
2886
|
e("button", {
|
|
2669
2887
|
class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--primary",
|
|
2670
2888
|
onClick: At
|
|
2671
2889
|
}, " Retry ")
|
|
2672
2890
|
])
|
|
2673
|
-
])) :
|
|
2891
|
+
])) : P.value === "options" ? (a(), s("div", Hn, [
|
|
2674
2892
|
e("button", {
|
|
2675
2893
|
class: "artifactuse-share-popup__option",
|
|
2676
|
-
onClick:
|
|
2677
|
-
}, [...t[
|
|
2894
|
+
onClick: Ye
|
|
2895
|
+
}, [...t[46] || (t[46] = [
|
|
2678
2896
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
2679
2897
|
e("svg", {
|
|
2680
2898
|
viewBox: "0 0 24 24",
|
|
@@ -2693,8 +2911,8 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2693
2911
|
])]),
|
|
2694
2912
|
e("button", {
|
|
2695
2913
|
class: "artifactuse-share-popup__option",
|
|
2696
|
-
onClick:
|
|
2697
|
-
}, [...t[
|
|
2914
|
+
onClick: Qe
|
|
2915
|
+
}, [...t[47] || (t[47] = [
|
|
2698
2916
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
2699
2917
|
e("svg", {
|
|
2700
2918
|
viewBox: "0 0 24 24",
|
|
@@ -2714,8 +2932,8 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2714
2932
|
])]),
|
|
2715
2933
|
e("button", {
|
|
2716
2934
|
class: "artifactuse-share-popup__option",
|
|
2717
|
-
onClick:
|
|
2718
|
-
}, [...t[
|
|
2935
|
+
onClick: Ht
|
|
2936
|
+
}, [...t[48] || (t[48] = [
|
|
2719
2937
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
2720
2938
|
e("svg", {
|
|
2721
2939
|
viewBox: "0 0 24 24",
|
|
@@ -2733,29 +2951,29 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2733
2951
|
e("p", { class: "artifactuse-share-popup__option-desc" }, "Replace an existing artifact")
|
|
2734
2952
|
], -1)
|
|
2735
2953
|
])])
|
|
2736
|
-
])) :
|
|
2737
|
-
z.value ? (a(), s("div",
|
|
2954
|
+
])) : P.value === "update-list" ? (a(), s("div", En, [
|
|
2955
|
+
z.value ? (a(), s("div", Bn, [...t[49] || (t[49] = [
|
|
2738
2956
|
e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
|
|
2739
2957
|
e("p", { class: "artifactuse-share-popup__loading-text" }, "Loading artifacts...", -1)
|
|
2740
|
-
])])) : u.value.length === 0 ? (a(), s("div",
|
|
2741
|
-
(a(!0), s(R, null, ve(u.value, (
|
|
2742
|
-
var
|
|
2958
|
+
])])) : u.value.length === 0 ? (a(), s("div", Sn, " No saved artifacts of this type ")) : (a(), s("div", zn, [
|
|
2959
|
+
(a(!0), s(R, null, ve(u.value, (p) => {
|
|
2960
|
+
var F, J, me;
|
|
2743
2961
|
return a(), s("button", {
|
|
2744
|
-
key: ((
|
|
2962
|
+
key: ((F = p.project) == null ? void 0 : F.uuid) || p.id,
|
|
2745
2963
|
class: "artifactuse-share-popup__artifact-item",
|
|
2746
|
-
onClick: (ue) =>
|
|
2964
|
+
onClick: (ue) => Et(p)
|
|
2747
2965
|
}, [
|
|
2748
|
-
e("span",
|
|
2749
|
-
e("span",
|
|
2750
|
-
], 8,
|
|
2966
|
+
e("span", In, l(((J = p.project) == null ? void 0 : J.name) || "Untitled"), 1),
|
|
2967
|
+
e("span", Fn, l(Ke((me = p.project) == null ? void 0 : me.created_at)), 1)
|
|
2968
|
+
], 8, Vn);
|
|
2751
2969
|
}), 128))
|
|
2752
2970
|
])),
|
|
2753
2971
|
e("button", {
|
|
2754
2972
|
class: "artifactuse-share-popup__back-btn",
|
|
2755
|
-
onClick: t[9] || (t[9] = (
|
|
2973
|
+
onClick: t[9] || (t[9] = (p) => P.value = "options")
|
|
2756
2974
|
}, "Back")
|
|
2757
|
-
])) :
|
|
2758
|
-
t[
|
|
2975
|
+
])) : P.value === "success" ? (a(), s("div", Rn, [
|
|
2976
|
+
t[52] || (t[52] = e("div", { class: "artifactuse-share-popup__success-icon" }, [
|
|
2759
2977
|
e("svg", {
|
|
2760
2978
|
viewBox: "0 0 24 24",
|
|
2761
2979
|
fill: "none",
|
|
@@ -2765,21 +2983,21 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2765
2983
|
e("polyline", { points: "20 6 9 17 4 12" })
|
|
2766
2984
|
])
|
|
2767
2985
|
], -1)),
|
|
2768
|
-
e("div",
|
|
2986
|
+
e("div", qn, [
|
|
2769
2987
|
e("input", {
|
|
2770
2988
|
type: "text",
|
|
2771
2989
|
class: "artifactuse-share-popup__link",
|
|
2772
2990
|
value: Q.value,
|
|
2773
2991
|
readonly: "",
|
|
2774
|
-
onClick: t[10] || (t[10] = (
|
|
2775
|
-
}, null, 8,
|
|
2992
|
+
onClick: t[10] || (t[10] = (p) => p.target.select())
|
|
2993
|
+
}, null, 8, On),
|
|
2776
2994
|
e("button", {
|
|
2777
|
-
class:
|
|
2995
|
+
class: j(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": r.value }]),
|
|
2778
2996
|
onClick: Bt
|
|
2779
|
-
},
|
|
2997
|
+
}, l(r.value ? "Copied!" : "Copy"), 3)
|
|
2780
2998
|
]),
|
|
2781
|
-
w.value && !
|
|
2782
|
-
t[
|
|
2999
|
+
w.value && !B.value ? (a(), s("div", Un, [
|
|
3000
|
+
t[50] || (t[50] = e("span", { class: "artifactuse-share-popup__expiry-icon" }, [
|
|
2783
3001
|
e("svg", {
|
|
2784
3002
|
viewBox: "0 0 24 24",
|
|
2785
3003
|
fill: "none",
|
|
@@ -2805,18 +3023,18 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2805
3023
|
})
|
|
2806
3024
|
])
|
|
2807
3025
|
], -1)),
|
|
2808
|
-
e("span",
|
|
3026
|
+
e("span", Dn, " Expires " + l(Ke(w.value)), 1)
|
|
2809
3027
|
])) : v("", !0),
|
|
2810
|
-
|
|
2811
|
-
t[
|
|
3028
|
+
B.value ? v("", !0) : (a(), s("div", Nn, [
|
|
3029
|
+
t[51] || (t[51] = e("p", { class: "artifactuse-share-popup__save-prompt-text" }, "Keep it permanently?", -1)),
|
|
2812
3030
|
e("button", {
|
|
2813
3031
|
class: "artifactuse-share-popup__save-prompt-btn",
|
|
2814
|
-
onClick:
|
|
3032
|
+
onClick: Qe
|
|
2815
3033
|
}, " Save to account ")
|
|
2816
3034
|
]))
|
|
2817
3035
|
])) : v("", !0)
|
|
2818
3036
|
]),
|
|
2819
|
-
t[
|
|
3037
|
+
t[53] || (t[53] = e("div", { class: "artifactuse-share-popup__footer" }, [
|
|
2820
3038
|
e("a", {
|
|
2821
3039
|
href: "https://artifactuse.com",
|
|
2822
3040
|
target: "_blank",
|
|
@@ -2847,12 +3065,12 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2847
3065
|
_: 1
|
|
2848
3066
|
})
|
|
2849
3067
|
])) : v("", !0),
|
|
2850
|
-
|
|
3068
|
+
A.value ? (a(), s("button", {
|
|
2851
3069
|
key: 1,
|
|
2852
3070
|
class: "artifactuse-panel__footer-action",
|
|
2853
3071
|
title: "Open in new tab",
|
|
2854
|
-
onClick:
|
|
2855
|
-
}, [...t[
|
|
3072
|
+
onClick: St
|
|
3073
|
+
}, [...t[54] || (t[54] = [
|
|
2856
3074
|
e("svg", {
|
|
2857
3075
|
viewBox: "0 0 24 24",
|
|
2858
3076
|
fill: "none",
|
|
@@ -2869,13 +3087,13 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2869
3087
|
})
|
|
2870
3088
|
], -1)
|
|
2871
3089
|
])])) : v("", !0),
|
|
2872
|
-
!
|
|
3090
|
+
!Te.value && d.value.length > 1 ? (a(), s("div", jn, [
|
|
2873
3091
|
e("button", {
|
|
2874
3092
|
class: "artifactuse-panel__nav-btn",
|
|
2875
3093
|
disabled: U.value <= 0,
|
|
2876
3094
|
title: "Previous artifact",
|
|
2877
3095
|
onClick: It
|
|
2878
|
-
}, [...t[
|
|
3096
|
+
}, [...t[55] || (t[55] = [
|
|
2879
3097
|
e("svg", {
|
|
2880
3098
|
viewBox: "0 0 24 24",
|
|
2881
3099
|
fill: "none",
|
|
@@ -2884,14 +3102,14 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2884
3102
|
}, [
|
|
2885
3103
|
e("polyline", { points: "15 18 9 12 15 6" })
|
|
2886
3104
|
], -1)
|
|
2887
|
-
])], 8,
|
|
3105
|
+
])], 8, Wn),
|
|
2888
3106
|
e("button", {
|
|
2889
3107
|
class: "artifactuse-panel__nav-trigger",
|
|
2890
3108
|
title: "View all artifacts",
|
|
2891
|
-
onClick:
|
|
3109
|
+
onClick: Vt
|
|
2892
3110
|
}, [
|
|
2893
|
-
e("span", null,
|
|
2894
|
-
t[
|
|
3111
|
+
e("span", null, l(U.value + 1) + " / " + l(d.value.length), 1),
|
|
3112
|
+
t[56] || (t[56] = e("svg", {
|
|
2895
3113
|
viewBox: "0 0 24 24",
|
|
2896
3114
|
fill: "none",
|
|
2897
3115
|
stroke: "currentColor",
|
|
@@ -2905,7 +3123,7 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2905
3123
|
disabled: U.value >= d.value.length - 1,
|
|
2906
3124
|
title: "Next artifact",
|
|
2907
3125
|
onClick: Ft
|
|
2908
|
-
}, [...t[
|
|
3126
|
+
}, [...t[57] || (t[57] = [
|
|
2909
3127
|
e("svg", {
|
|
2910
3128
|
viewBox: "0 0 24 24",
|
|
2911
3129
|
fill: "none",
|
|
@@ -2914,16 +3132,16 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2914
3132
|
}, [
|
|
2915
3133
|
e("polyline", { points: "9 18 15 12 9 6" })
|
|
2916
3134
|
], -1)
|
|
2917
|
-
])], 8,
|
|
2918
|
-
|
|
3135
|
+
])], 8, Jn),
|
|
3136
|
+
ze(Ee, { name: "artifactuse-popup" }, {
|
|
2919
3137
|
default: Be(() => [
|
|
2920
|
-
X.value ? (a(), s("div",
|
|
2921
|
-
e("div",
|
|
2922
|
-
t[
|
|
3138
|
+
X.value ? (a(), s("div", Xn, [
|
|
3139
|
+
e("div", Zn, [
|
|
3140
|
+
t[59] || (t[59] = e("span", null, "Artifacts", -1)),
|
|
2923
3141
|
e("button", {
|
|
2924
3142
|
class: "artifactuse-panel__artifact-list-close",
|
|
2925
|
-
onClick: t[11] || (t[11] = (
|
|
2926
|
-
}, [...t[
|
|
3143
|
+
onClick: t[11] || (t[11] = (p) => X.value = !1)
|
|
3144
|
+
}, [...t[58] || (t[58] = [
|
|
2927
3145
|
e("svg", {
|
|
2928
3146
|
viewBox: "0 0 24 24",
|
|
2929
3147
|
fill: "none",
|
|
@@ -2945,27 +3163,27 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2945
3163
|
], -1)
|
|
2946
3164
|
])])
|
|
2947
3165
|
]),
|
|
2948
|
-
e("div",
|
|
2949
|
-
(a(!0), s(R, null, ve(d.value, (
|
|
2950
|
-
key:
|
|
2951
|
-
class:
|
|
2952
|
-
onClick: (J) =>
|
|
3166
|
+
e("div", Kn, [
|
|
3167
|
+
(a(!0), s(R, null, ve(d.value, (p, F) => (a(), s("button", {
|
|
3168
|
+
key: p.id,
|
|
3169
|
+
class: j(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": p.id === y(o).id }]),
|
|
3170
|
+
onClick: (J) => Ge(p)
|
|
2953
3171
|
}, [
|
|
2954
3172
|
e("span", {
|
|
2955
3173
|
class: "artifactuse-panel__artifact-item-icon",
|
|
2956
|
-
innerHTML: Ie(
|
|
2957
|
-
}, null, 8,
|
|
2958
|
-
e("div",
|
|
2959
|
-
e("span",
|
|
2960
|
-
e("span",
|
|
2961
|
-
K(
|
|
2962
|
-
|
|
2963
|
-
K(" • " +
|
|
3174
|
+
innerHTML: Ie(p.language)
|
|
3175
|
+
}, null, 8, Qn),
|
|
3176
|
+
e("div", Gn, [
|
|
3177
|
+
e("span", eo, l(p.title || "Untitled"), 1),
|
|
3178
|
+
e("span", to, [
|
|
3179
|
+
K(l(y(Se)(p.language)) + " ", 1),
|
|
3180
|
+
p.lineCount ? (a(), s(R, { key: 0 }, [
|
|
3181
|
+
K(" • " + l(p.lineCount) + " lines ", 1)
|
|
2964
3182
|
], 64)) : v("", !0)
|
|
2965
3183
|
])
|
|
2966
3184
|
]),
|
|
2967
|
-
e("span",
|
|
2968
|
-
], 10,
|
|
3185
|
+
e("span", ao, l(F + 1), 1)
|
|
3186
|
+
], 10, Yn))), 128))
|
|
2969
3187
|
])
|
|
2970
3188
|
])) : v("", !0)
|
|
2971
3189
|
]),
|
|
@@ -2974,234 +3192,26 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
2974
3192
|
])) : v("", !0)
|
|
2975
3193
|
])
|
|
2976
3194
|
])
|
|
2977
|
-
], 64)) : (a(), s(R, { key: 2 }, [
|
|
2978
|
-
e("header", pl, [
|
|
2979
|
-
e("div", _l, [
|
|
2980
|
-
t[18] || (t[18] = e("span", { class: "artifactuse-panel__icon" }, [
|
|
2981
|
-
e("svg", {
|
|
2982
|
-
viewBox: "0 0 24 24",
|
|
2983
|
-
fill: "none",
|
|
2984
|
-
stroke: "currentColor",
|
|
2985
|
-
"stroke-width": "2"
|
|
2986
|
-
}, [
|
|
2987
|
-
e("polyline", { points: "16 18 22 12 16 6" }),
|
|
2988
|
-
e("polyline", { points: "8 6 2 12 8 18" })
|
|
2989
|
-
])
|
|
2990
|
-
], -1)),
|
|
2991
|
-
e("div", hl, [
|
|
2992
|
-
t[17] || (t[17] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
|
|
2993
|
-
e("span", ml, n(d.value.length) + " available", 1)
|
|
2994
|
-
])
|
|
2995
|
-
]),
|
|
2996
|
-
e("div", yl, [
|
|
2997
|
-
e("button", {
|
|
2998
|
-
class: N(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ee.value }]),
|
|
2999
|
-
disabled: ee.value,
|
|
3000
|
-
title: "Download all as ZIP",
|
|
3001
|
-
onClick: Mt
|
|
3002
|
-
}, [
|
|
3003
|
-
ee.value ? (a(), s("svg", wl, [...t[20] || (t[20] = [
|
|
3004
|
-
e("circle", {
|
|
3005
|
-
cx: "12",
|
|
3006
|
-
cy: "12",
|
|
3007
|
-
r: "10",
|
|
3008
|
-
"stroke-dasharray": "32",
|
|
3009
|
-
"stroke-dashoffset": "32"
|
|
3010
|
-
}, null, -1)
|
|
3011
|
-
])])) : (a(), s("svg", kl, [...t[19] || (t[19] = [
|
|
3012
|
-
e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
|
|
3013
|
-
e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
|
|
3014
|
-
e("line", {
|
|
3015
|
-
x1: "12",
|
|
3016
|
-
y1: "15",
|
|
3017
|
-
x2: "12",
|
|
3018
|
-
y2: "3"
|
|
3019
|
-
}, null, -1)
|
|
3020
|
-
])]))
|
|
3021
|
-
], 10, gl),
|
|
3022
|
-
e("button", {
|
|
3023
|
-
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
3024
|
-
title: "Close panel",
|
|
3025
|
-
onClick: t[1] || (t[1] = (...f) => g(y) && g(y)(...f))
|
|
3026
|
-
}, [...t[21] || (t[21] = [
|
|
3027
|
-
e("svg", {
|
|
3028
|
-
viewBox: "0 0 24 24",
|
|
3029
|
-
fill: "none",
|
|
3030
|
-
stroke: "currentColor",
|
|
3031
|
-
"stroke-width": "2"
|
|
3032
|
-
}, [
|
|
3033
|
-
e("line", {
|
|
3034
|
-
x1: "18",
|
|
3035
|
-
y1: "6",
|
|
3036
|
-
x2: "6",
|
|
3037
|
-
y2: "18"
|
|
3038
|
-
}),
|
|
3039
|
-
e("line", {
|
|
3040
|
-
x1: "6",
|
|
3041
|
-
y1: "6",
|
|
3042
|
-
x2: "18",
|
|
3043
|
-
y2: "18"
|
|
3044
|
-
})
|
|
3045
|
-
], -1)
|
|
3046
|
-
])])
|
|
3047
|
-
])
|
|
3048
|
-
]),
|
|
3049
|
-
e("div", bl, [
|
|
3050
|
-
e("div", Cl, [
|
|
3051
|
-
(a(!0), s(R, null, ve(d.value, (f, V) => (a(), s("button", {
|
|
3052
|
-
key: f.id,
|
|
3053
|
-
class: "artifactuse-panel__list-item",
|
|
3054
|
-
onClick: (J) => Qe(f)
|
|
3055
|
-
}, [
|
|
3056
|
-
e("span", {
|
|
3057
|
-
class: "artifactuse-panel__list-item-icon",
|
|
3058
|
-
innerHTML: Ie(f.language)
|
|
3059
|
-
}, null, 8, $l),
|
|
3060
|
-
e("div", Ml, [
|
|
3061
|
-
e("span", Tl, n(f.title || "Untitled"), 1),
|
|
3062
|
-
e("span", Ll, [
|
|
3063
|
-
K(n(g(Ee)(f.language)) + " ", 1),
|
|
3064
|
-
f.lineCount ? (a(), s(R, { key: 0 }, [
|
|
3065
|
-
K(" • " + n(f.lineCount) + " lines ", 1)
|
|
3066
|
-
], 64)) : v("", !0)
|
|
3067
|
-
])
|
|
3068
|
-
]),
|
|
3069
|
-
t[22] || (t[22] = e("span", { class: "artifactuse-panel__list-item-arrow" }, [
|
|
3070
|
-
e("svg", {
|
|
3071
|
-
viewBox: "0 0 24 24",
|
|
3072
|
-
fill: "none",
|
|
3073
|
-
stroke: "currentColor",
|
|
3074
|
-
"stroke-width": "2"
|
|
3075
|
-
}, [
|
|
3076
|
-
e("polyline", { points: "9 18 15 12 9 6" })
|
|
3077
|
-
])
|
|
3078
|
-
], -1))
|
|
3079
|
-
], 8, xl))), 128))
|
|
3080
|
-
])
|
|
3081
|
-
]),
|
|
3082
|
-
e("footer", Al, [
|
|
3083
|
-
G.value ? (a(), s("a", Pl, [...t[23] || (t[23] = [
|
|
3084
|
-
e("svg", {
|
|
3085
|
-
width: "16",
|
|
3086
|
-
height: "16",
|
|
3087
|
-
viewBox: "0 0 42 42",
|
|
3088
|
-
fill: "none",
|
|
3089
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3090
|
-
}, [
|
|
3091
|
-
e("path", {
|
|
3092
|
-
d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
|
|
3093
|
-
fill: "#5F51C8"
|
|
3094
|
-
}),
|
|
3095
|
-
e("path", {
|
|
3096
|
-
d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
|
|
3097
|
-
fill: "#695AE0"
|
|
3098
|
-
})
|
|
3099
|
-
], -1),
|
|
3100
|
-
e("span", null, "Artifactuse", -1)
|
|
3101
|
-
])])) : v("", !0)
|
|
3102
|
-
])
|
|
3103
|
-
], 64)) : (a(), s(R, { key: 1 }, [
|
|
3104
|
-
e("header", ul, [
|
|
3105
|
-
t[14] || (t[14] = e("div", { class: "artifactuse-panel__title" }, [
|
|
3106
|
-
e("span", { class: "artifactuse-panel__icon" }, [
|
|
3107
|
-
e("svg", {
|
|
3108
|
-
viewBox: "0 0 24 24",
|
|
3109
|
-
fill: "none",
|
|
3110
|
-
stroke: "currentColor",
|
|
3111
|
-
"stroke-width": "2"
|
|
3112
|
-
}, [
|
|
3113
|
-
e("polyline", { points: "16 18 22 12 16 6" }),
|
|
3114
|
-
e("polyline", { points: "8 6 2 12 8 18" })
|
|
3115
|
-
])
|
|
3116
|
-
]),
|
|
3117
|
-
e("div", { class: "artifactuse-panel__title-content" }, [
|
|
3118
|
-
e("span", { class: "artifactuse-panel__name" }, "Artifacts")
|
|
3119
|
-
])
|
|
3120
|
-
], -1)),
|
|
3121
|
-
e("div", dl, [
|
|
3122
|
-
e("button", {
|
|
3123
|
-
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
3124
|
-
title: "Close panel",
|
|
3125
|
-
onClick: t[0] || (t[0] = (...f) => g(y) && g(y)(...f))
|
|
3126
|
-
}, [...t[13] || (t[13] = [
|
|
3127
|
-
e("svg", {
|
|
3128
|
-
viewBox: "0 0 24 24",
|
|
3129
|
-
fill: "none",
|
|
3130
|
-
stroke: "currentColor",
|
|
3131
|
-
"stroke-width": "2"
|
|
3132
|
-
}, [
|
|
3133
|
-
e("line", {
|
|
3134
|
-
x1: "18",
|
|
3135
|
-
y1: "6",
|
|
3136
|
-
x2: "6",
|
|
3137
|
-
y2: "18"
|
|
3138
|
-
}),
|
|
3139
|
-
e("line", {
|
|
3140
|
-
x1: "6",
|
|
3141
|
-
y1: "6",
|
|
3142
|
-
x2: "18",
|
|
3143
|
-
y2: "18"
|
|
3144
|
-
})
|
|
3145
|
-
], -1)
|
|
3146
|
-
])])
|
|
3147
|
-
])
|
|
3148
|
-
]),
|
|
3149
|
-
t[16] || (t[16] = e("div", { class: "artifactuse-panel__empty" }, [
|
|
3150
|
-
e("div", { class: "artifactuse-panel__empty-icon" }, [
|
|
3151
|
-
e("svg", {
|
|
3152
|
-
viewBox: "0 0 24 24",
|
|
3153
|
-
fill: "none",
|
|
3154
|
-
stroke: "currentColor",
|
|
3155
|
-
"stroke-width": "1.5"
|
|
3156
|
-
}, [
|
|
3157
|
-
e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }),
|
|
3158
|
-
e("polyline", { points: "14 2 14 8 20 8" })
|
|
3159
|
-
])
|
|
3160
|
-
]),
|
|
3161
|
-
e("h3", { class: "artifactuse-panel__empty-title" }, "No artifacts yet"),
|
|
3162
|
-
e("p", { class: "artifactuse-panel__empty-text" }, " Code blocks, forms, and other interactive content will appear here as the AI generates them. ")
|
|
3163
|
-
], -1)),
|
|
3164
|
-
e("footer", vl, [
|
|
3165
|
-
G.value ? (a(), s("a", fl, [...t[15] || (t[15] = [
|
|
3166
|
-
e("svg", {
|
|
3167
|
-
width: "16",
|
|
3168
|
-
height: "16",
|
|
3169
|
-
viewBox: "0 0 42 42",
|
|
3170
|
-
fill: "none",
|
|
3171
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3172
|
-
}, [
|
|
3173
|
-
e("path", {
|
|
3174
|
-
d: "M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0",
|
|
3175
|
-
fill: "#5F51C8"
|
|
3176
|
-
}),
|
|
3177
|
-
e("path", {
|
|
3178
|
-
d: "M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z",
|
|
3179
|
-
fill: "#695AE0"
|
|
3180
|
-
})
|
|
3181
|
-
], -1),
|
|
3182
|
-
e("span", null, "Artifactuse", -1)
|
|
3183
|
-
])])) : v("", !0)
|
|
3184
|
-
])
|
|
3185
3195
|
], 64))
|
|
3186
3196
|
], 6)) : v("", !0)
|
|
3187
3197
|
]),
|
|
3188
3198
|
_: 1
|
|
3189
3199
|
}));
|
|
3190
3200
|
}
|
|
3191
|
-
},
|
|
3201
|
+
}, so = ["title"], io = {
|
|
3192
3202
|
key: 0,
|
|
3193
3203
|
class: "artifactuse-panel-toggle-badge"
|
|
3194
|
-
},
|
|
3204
|
+
}, vo = {
|
|
3195
3205
|
__name: "ArtifactusePanelToggle",
|
|
3196
3206
|
setup(H) {
|
|
3197
|
-
const { state: c, artifactCount:
|
|
3207
|
+
const { state: c, artifactCount: _, hasArtifacts: T, togglePanel: f } = Ve();
|
|
3198
3208
|
return (o, q) => (a(), s("button", {
|
|
3199
|
-
class:
|
|
3200
|
-
"artifactuse-panel-toggle--active":
|
|
3201
|
-
"artifactuse-panel-toggle--has-artifacts":
|
|
3209
|
+
class: j(["artifactuse-panel-toggle", {
|
|
3210
|
+
"artifactuse-panel-toggle--active": y(c).isPanelOpen,
|
|
3211
|
+
"artifactuse-panel-toggle--has-artifacts": y(T)
|
|
3202
3212
|
}]),
|
|
3203
|
-
onClick: q[0] || (q[0] = (...
|
|
3204
|
-
title:
|
|
3213
|
+
onClick: q[0] || (q[0] = (...E) => y(f) && y(f)(...E)),
|
|
3214
|
+
title: y(c).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
|
|
3205
3215
|
}, [
|
|
3206
3216
|
q[1] || (q[1] = e("svg", {
|
|
3207
3217
|
viewBox: "0 0 24 24",
|
|
@@ -3214,40 +3224,41 @@ const Yt = { class: "artifactuse-card__icon" }, Qt = ["innerHTML"], Gt = { class
|
|
|
3214
3224
|
e("polyline", { points: "16 18 22 12 16 6" }),
|
|
3215
3225
|
e("polyline", { points: "8 6 2 12 8 18" })
|
|
3216
3226
|
], -1)),
|
|
3217
|
-
|
|
3218
|
-
], 10,
|
|
3227
|
+
y(_) > 0 ? (a(), s("span", io, l(y(_) > 99 ? "99+" : y(_)), 1)) : v("", !0)
|
|
3228
|
+
], 10, so));
|
|
3219
3229
|
}
|
|
3220
|
-
},
|
|
3221
|
-
function
|
|
3222
|
-
var
|
|
3223
|
-
const c =
|
|
3230
|
+
}, dt = Symbol("artifactuse");
|
|
3231
|
+
function vt(H = {}) {
|
|
3232
|
+
var n;
|
|
3233
|
+
const c = ut(H), _ = rt({
|
|
3224
3234
|
artifacts: [],
|
|
3225
3235
|
activeArtifactId: null,
|
|
3226
3236
|
isPanelOpen: !1,
|
|
3227
3237
|
viewMode: "preview",
|
|
3228
3238
|
isFullscreen: !1,
|
|
3229
3239
|
openTabs: [],
|
|
3230
|
-
tabViewModes: {}
|
|
3240
|
+
tabViewModes: {},
|
|
3241
|
+
forceEmptyView: !1
|
|
3231
3242
|
});
|
|
3232
|
-
c.state.subscribe((
|
|
3233
|
-
|
|
3243
|
+
c.state.subscribe((h) => {
|
|
3244
|
+
_.artifacts = h.artifacts, _.activeArtifactId = h.activeArtifactId, _.isPanelOpen = h.isPanelOpen, _.viewMode = h.viewMode, _.isFullscreen = h.isFullscreen, _.openTabs = h.openTabs, _.tabViewModes = h.tabViewModes, _.forceEmptyView = h.forceEmptyView;
|
|
3234
3245
|
});
|
|
3235
|
-
const T = C(() =>
|
|
3246
|
+
const T = C(() => _.activeArtifactId && _.artifacts.find((h) => h.id === _.activeArtifactId) || null), f = C(() => _.artifacts.filter((h) => !h.isInline).length), o = C(() => _.artifacts.some((h) => !h.isInline)), q = C(() => c.getPanelTypes()), E = C(() => T.value ? c.getPanelUrl(T.value) : null);
|
|
3236
3247
|
if (c.applyTheme(), H.theme === "auto" || !H.theme) {
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3248
|
+
const h = ((n = c.bridge) == null ? void 0 : n.theme) || c.theme;
|
|
3249
|
+
h != null && h.watchSystemTheme && h.watchSystemTheme(() => {
|
|
3239
3250
|
c.applyTheme();
|
|
3240
3251
|
});
|
|
3241
3252
|
}
|
|
3242
|
-
const
|
|
3253
|
+
const g = {
|
|
3243
3254
|
instance: c,
|
|
3244
|
-
state:
|
|
3255
|
+
state: _,
|
|
3245
3256
|
activeArtifact: T,
|
|
3246
|
-
artifactCount:
|
|
3257
|
+
artifactCount: f,
|
|
3247
3258
|
hasArtifacts: o,
|
|
3248
3259
|
// Panel computed
|
|
3249
3260
|
panelTypes: q,
|
|
3250
|
-
activePanelUrl:
|
|
3261
|
+
activePanelUrl: E,
|
|
3251
3262
|
// Methods
|
|
3252
3263
|
processMessage: c.processMessage,
|
|
3253
3264
|
initializeContent: c.initializeContent,
|
|
@@ -3255,6 +3266,7 @@ function dt(H = {}) {
|
|
|
3255
3266
|
openFile: c.openFile,
|
|
3256
3267
|
openCode: c.openCode,
|
|
3257
3268
|
updateFile: c.updateFile,
|
|
3269
|
+
openPanel: c.openPanel,
|
|
3258
3270
|
closePanel: c.closePanel,
|
|
3259
3271
|
togglePanel: c.togglePanel,
|
|
3260
3272
|
toggleFullscreen: c.toggleFullscreen,
|
|
@@ -3277,45 +3289,46 @@ function dt(H = {}) {
|
|
|
3277
3289
|
clearArtifacts: () => c.state.clear(),
|
|
3278
3290
|
// Theme - wrap setTheme to also apply
|
|
3279
3291
|
applyTheme: c.applyTheme,
|
|
3280
|
-
setTheme: (
|
|
3281
|
-
c.setTheme(
|
|
3292
|
+
setTheme: (h) => {
|
|
3293
|
+
c.setTheme(h), c.applyTheme();
|
|
3282
3294
|
},
|
|
3283
3295
|
getTheme: c.getTheme
|
|
3284
3296
|
};
|
|
3285
|
-
return
|
|
3297
|
+
return Wt(dt, g), g;
|
|
3286
3298
|
}
|
|
3287
|
-
function
|
|
3288
|
-
const H =
|
|
3289
|
-
return H || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."),
|
|
3299
|
+
function Ve() {
|
|
3300
|
+
const H = Jt(dt);
|
|
3301
|
+
return H || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), vt());
|
|
3290
3302
|
}
|
|
3291
|
-
function
|
|
3292
|
-
const c =
|
|
3303
|
+
function lo(H = {}) {
|
|
3304
|
+
const c = ut(H), _ = rt({
|
|
3293
3305
|
artifacts: [],
|
|
3294
3306
|
activeArtifactId: null,
|
|
3295
3307
|
isPanelOpen: !1,
|
|
3296
3308
|
viewMode: "preview",
|
|
3297
3309
|
isFullscreen: !1,
|
|
3298
3310
|
openTabs: [],
|
|
3299
|
-
tabViewModes: {}
|
|
3311
|
+
tabViewModes: {},
|
|
3312
|
+
forceEmptyView: !1
|
|
3300
3313
|
});
|
|
3301
3314
|
let T;
|
|
3302
|
-
|
|
3303
|
-
T = c.state.subscribe((
|
|
3304
|
-
|
|
3315
|
+
Me(() => {
|
|
3316
|
+
T = c.state.subscribe((n) => {
|
|
3317
|
+
_.artifacts = n.artifacts, _.activeArtifactId = n.activeArtifactId, _.isPanelOpen = n.isPanelOpen, _.viewMode = n.viewMode, _.isFullscreen = n.isFullscreen, _.openTabs = n.openTabs, _.tabViewModes = n.tabViewModes, _.forceEmptyView = n.forceEmptyView;
|
|
3305
3318
|
}), c.applyTheme();
|
|
3306
|
-
}),
|
|
3319
|
+
}), We(() => {
|
|
3307
3320
|
T && T(), c.destroy();
|
|
3308
3321
|
});
|
|
3309
|
-
const
|
|
3322
|
+
const f = C(() => _.activeArtifactId && _.artifacts.find((n) => n.id === _.activeArtifactId) || null), o = C(() => _.artifacts.filter((n) => !n.isInline).length), q = C(() => _.artifacts.some((n) => !n.isInline)), E = C(() => c.getPanelTypes()), g = C(() => f.value ? c.getPanelUrl(f.value) : null);
|
|
3310
3323
|
return {
|
|
3311
3324
|
instance: c,
|
|
3312
|
-
state:
|
|
3313
|
-
activeArtifact:
|
|
3325
|
+
state: _,
|
|
3326
|
+
activeArtifact: f,
|
|
3314
3327
|
artifactCount: o,
|
|
3315
3328
|
hasArtifacts: q,
|
|
3316
3329
|
// Panel computed
|
|
3317
|
-
panelTypes:
|
|
3318
|
-
activePanelUrl:
|
|
3330
|
+
panelTypes: E,
|
|
3331
|
+
activePanelUrl: g,
|
|
3319
3332
|
// Methods
|
|
3320
3333
|
processMessage: c.processMessage,
|
|
3321
3334
|
initializeContent: c.initializeContent,
|
|
@@ -3323,6 +3336,7 @@ function Zn(H = {}) {
|
|
|
3323
3336
|
openFile: c.openFile,
|
|
3324
3337
|
openCode: c.openCode,
|
|
3325
3338
|
updateFile: c.updateFile,
|
|
3339
|
+
openPanel: c.openPanel,
|
|
3326
3340
|
closePanel: c.closePanel,
|
|
3327
3341
|
togglePanel: c.togglePanel,
|
|
3328
3342
|
toggleFullscreen: c.toggleFullscreen,
|
|
@@ -3345,29 +3359,29 @@ function Zn(H = {}) {
|
|
|
3345
3359
|
clearArtifacts: () => c.state.clear(),
|
|
3346
3360
|
// Theme - wrap setTheme to also apply
|
|
3347
3361
|
applyTheme: c.applyTheme,
|
|
3348
|
-
setTheme: (
|
|
3349
|
-
c.setTheme(
|
|
3362
|
+
setTheme: (n) => {
|
|
3363
|
+
c.setTheme(n), c.applyTheme();
|
|
3350
3364
|
},
|
|
3351
3365
|
getTheme: c.getTheme
|
|
3352
3366
|
};
|
|
3353
3367
|
}
|
|
3354
|
-
const
|
|
3355
|
-
provideArtifactuse:
|
|
3356
|
-
useArtifactuse:
|
|
3357
|
-
createArtifactuseComposable:
|
|
3358
|
-
DEFAULT_PANELS:
|
|
3368
|
+
const fo = {
|
|
3369
|
+
provideArtifactuse: vt,
|
|
3370
|
+
useArtifactuse: Ve,
|
|
3371
|
+
createArtifactuseComposable: lo,
|
|
3372
|
+
DEFAULT_PANELS: Kt
|
|
3359
3373
|
};
|
|
3360
3374
|
export {
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3375
|
+
co as ArtifactuseAgentMessage,
|
|
3376
|
+
ca as ArtifactuseCard,
|
|
3377
|
+
Qa as ArtifactuseInlineForm,
|
|
3378
|
+
uo as ArtifactusePanel,
|
|
3379
|
+
vo as ArtifactusePanelToggle,
|
|
3380
|
+
tl as ArtifactuseSocialPreview,
|
|
3381
|
+
cl as ArtifactuseViewer,
|
|
3382
|
+
Kt as DEFAULT_PANELS,
|
|
3383
|
+
lo as createArtifactuseComposable,
|
|
3384
|
+
fo as default,
|
|
3385
|
+
vt as provideArtifactuse,
|
|
3386
|
+
Ve as useArtifactuse
|
|
3373
3387
|
};
|