@duxweb/dvha-pro 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/editor/aiEditor.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +33 -13
- package/dist/esm/components/editor/aiEditor.js +187 -59
- package/dist/esm/components/layout/table.js +1 -1
- package/dist/esm/components/upload/file.js +19 -20
- package/dist/esm/components/upload/image.js +4 -4
- package/dist/esm/components/upload/manager.js +3 -3
- package/dist/esm/theme/uno.css.js +33 -13
- package/dist/types/components/editor/aiEditor.d.ts +27 -0
- package/dist/types/components/table/table.d.ts +674 -52
- package/dist/types/components/widget/image.d.ts +90 -12
- package/package.json +5 -5
|
@@ -1,16 +1,88 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as E, useManage as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import { AiEditor as
|
|
5
|
-
import { useMessage as
|
|
6
|
-
|
|
1
|
+
import { defineComponent as T, ref as x, computed as U, watch as w, onMounted as L, onUnmounted as V, createVNode as $ } from "vue";
|
|
2
|
+
import { useTheme as E, useManage as A, useGetAuth as j, useI18n as D, useUpload as F } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as z } from "@vueuse/core";
|
|
4
|
+
import { AiEditor as B } from "aieditor";
|
|
5
|
+
import { useMessage as N } from "naive-ui";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
import "@overlastic/vue";
|
|
8
|
+
import "clsx";
|
|
9
|
+
import "vue-echarts";
|
|
10
|
+
import "vue3-ace-editor";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
15
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
17
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
19
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
21
|
+
import "vue-cropper";
|
|
22
|
+
import "jinrishici";
|
|
23
|
+
import "lodash-es";
|
|
24
|
+
import "vue-draggable-plus";
|
|
25
|
+
import "@vee-validate/i18n";
|
|
26
|
+
import "colorizr";
|
|
27
|
+
import "echarts";
|
|
28
|
+
import "highlight.js/lib/core";
|
|
29
|
+
import "highlight.js/lib/languages/bash";
|
|
30
|
+
import "highlight.js/lib/languages/css";
|
|
31
|
+
import "highlight.js/lib/languages/go";
|
|
32
|
+
import "highlight.js/lib/languages/java";
|
|
33
|
+
import "highlight.js/lib/languages/javascript";
|
|
34
|
+
import "highlight.js/lib/languages/json";
|
|
35
|
+
import "highlight.js/lib/languages/markdown";
|
|
36
|
+
import "highlight.js/lib/languages/php";
|
|
37
|
+
import "highlight.js/lib/languages/python";
|
|
38
|
+
import "highlight.js/lib/languages/shell";
|
|
39
|
+
import "highlight.js/lib/languages/sql";
|
|
40
|
+
import "highlight.js/lib/languages/typescript";
|
|
41
|
+
import "highlight.js/lib/languages/xml";
|
|
42
|
+
import "@ant-design/colors";
|
|
43
|
+
import "@unocss/preset-icons/browser";
|
|
44
|
+
import "@unocss/preset-typography";
|
|
45
|
+
import "unocss/preset-wind4";
|
|
46
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
|
+
import "vee-validate";
|
|
49
|
+
import "vue-command-palette";
|
|
50
|
+
import "@duxweb/dvha-naiveui";
|
|
51
|
+
import "../../pages/page404.js";
|
|
52
|
+
import "short-unique-id";
|
|
53
|
+
import { useUploadConfig as O } from "../upload/config.js";
|
|
54
|
+
import "@vue-flow/core";
|
|
55
|
+
import "@vue-flow/background";
|
|
56
|
+
/* empty css */
|
|
57
|
+
import { useModal as Z } from "../../hooks/modal.js";
|
|
58
|
+
import "mime";
|
|
59
|
+
import "@iconify-json/tabler/icons.json";
|
|
60
|
+
import "../posterEditor/elements/index.js";
|
|
61
|
+
import "fabric";
|
|
62
|
+
import "dayjs";
|
|
63
|
+
import "@tanstack/vue-query";
|
|
64
|
+
import "pinia";
|
|
65
|
+
const Ye = /* @__PURE__ */ T({
|
|
7
66
|
name: "DuxAiEditor",
|
|
8
67
|
props: {
|
|
9
68
|
value: String,
|
|
10
69
|
defaultValue: String,
|
|
11
70
|
uploadPath: String,
|
|
12
71
|
uploadHeaders: Object,
|
|
72
|
+
// 编辑器类型:富文本 或 Markdown
|
|
73
|
+
editorType: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: "richtext"
|
|
76
|
+
},
|
|
13
77
|
aiPath: String,
|
|
78
|
+
fileManager: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: !0
|
|
81
|
+
},
|
|
82
|
+
fileManagerType: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "all"
|
|
85
|
+
},
|
|
14
86
|
height: {
|
|
15
87
|
type: String,
|
|
16
88
|
default: "500px"
|
|
@@ -18,107 +90,163 @@ const B = /* @__PURE__ */ S({
|
|
|
18
90
|
onUpdateValue: Function
|
|
19
91
|
},
|
|
20
92
|
setup(t, {
|
|
21
|
-
emit:
|
|
93
|
+
emit: y
|
|
22
94
|
}) {
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
config:
|
|
27
|
-
} =
|
|
28
|
-
t:
|
|
29
|
-
} = D(),
|
|
95
|
+
const n = x();
|
|
96
|
+
let r = null, s = !1;
|
|
97
|
+
const f = E(), {
|
|
98
|
+
config: g
|
|
99
|
+
} = A(), k = j(), {
|
|
100
|
+
t: p
|
|
101
|
+
} = D(), M = N(), C = Z(), H = t.value ?? t.defaultValue ?? "", l = z(t, "value", y, {
|
|
30
102
|
passive: !0
|
|
31
|
-
}),
|
|
32
|
-
path:
|
|
103
|
+
}), d = U(() => t.uploadPath || g.apiPath?.upload || "upload"), u = F({
|
|
104
|
+
path: d.value,
|
|
33
105
|
autoUpload: !1
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
106
|
+
}), {
|
|
107
|
+
managePath: b,
|
|
108
|
+
method: P
|
|
109
|
+
} = O();
|
|
110
|
+
w(l, (e) => {
|
|
111
|
+
!r || s || (t.editorType === "markdown" ? r.setMarkdownContent(e || "") : r.setContent(e || ""));
|
|
37
112
|
}, {
|
|
38
113
|
immediate: !0,
|
|
39
114
|
flush: "post"
|
|
40
115
|
});
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
116
|
+
const c = (e) => new Promise((o, a) => {
|
|
117
|
+
u.addFiles([e], "file").then(() => {
|
|
118
|
+
u.trigger().then((i) => {
|
|
119
|
+
i.forEach((m) => {
|
|
120
|
+
const h = m?.data?.data;
|
|
121
|
+
o({
|
|
47
122
|
errorCode: 0,
|
|
48
123
|
data: {
|
|
49
|
-
src:
|
|
50
|
-
alt:
|
|
124
|
+
src: h?.url,
|
|
125
|
+
alt: m?.filename
|
|
51
126
|
}
|
|
52
127
|
});
|
|
53
128
|
});
|
|
54
|
-
}).catch((
|
|
55
|
-
|
|
129
|
+
}).catch((i) => {
|
|
130
|
+
M.error(i.message), a(i);
|
|
56
131
|
}).finally(() => {
|
|
57
|
-
|
|
132
|
+
u.clearFiles();
|
|
58
133
|
});
|
|
59
134
|
});
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
o
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
135
|
+
}), S = (e) => {
|
|
136
|
+
const o = String(e?.filetype || ""), a = String(e?.url || "");
|
|
137
|
+
return /^image\//i.test(o) || /\.(?:png|jpe?g|gif|bmp|webp|svg)$/i.test(a) ? "image" : /^video\//i.test(o) || /\.(?:mp4|webm|ogg|mov|m4v)$/i.test(a) ? "video" : "attachment";
|
|
138
|
+
};
|
|
139
|
+
return L(() => {
|
|
140
|
+
r = new B({
|
|
141
|
+
theme: f.isDark.value ? "dark" : "light",
|
|
142
|
+
element: n.value,
|
|
143
|
+
placeholder: p("components.editor.placeholder"),
|
|
144
|
+
content: H,
|
|
145
|
+
contentIsMarkdown: t.editorType === "markdown",
|
|
67
146
|
onBlur: (e) => {
|
|
68
|
-
|
|
147
|
+
s = !0, l.value = t.editorType === "markdown" ? e.getMarkdown() : e.getHtml(), s = !1;
|
|
69
148
|
},
|
|
70
149
|
image: {
|
|
71
|
-
uploadUrl:
|
|
150
|
+
uploadUrl: d.value,
|
|
72
151
|
uploadHeaders: t.uploadHeaders || {},
|
|
73
|
-
uploader:
|
|
152
|
+
uploader: c,
|
|
153
|
+
defaultSize: "auto"
|
|
74
154
|
},
|
|
75
155
|
video: {
|
|
76
|
-
uploadUrl:
|
|
156
|
+
uploadUrl: d.value,
|
|
77
157
|
uploadHeaders: t.uploadHeaders || {},
|
|
78
|
-
uploader:
|
|
158
|
+
uploader: c
|
|
79
159
|
},
|
|
80
160
|
attachment: {
|
|
81
|
-
uploadUrl:
|
|
161
|
+
uploadUrl: d.value,
|
|
82
162
|
uploadHeaders: t.uploadHeaders || {},
|
|
83
|
-
uploader:
|
|
163
|
+
uploader: c
|
|
84
164
|
},
|
|
85
165
|
ai: {
|
|
86
166
|
models: {
|
|
87
167
|
custom: {
|
|
88
|
-
url: t.aiPath ||
|
|
168
|
+
url: t.aiPath || g.apiPath?.ai || "ai",
|
|
89
169
|
headers: () => ({
|
|
90
170
|
"Content-Type": "application/json",
|
|
91
|
-
Authorization:
|
|
171
|
+
Authorization: k.token
|
|
92
172
|
}),
|
|
93
173
|
wrapPayload: (e) => JSON.stringify({
|
|
94
174
|
prompt: e
|
|
95
175
|
}),
|
|
96
176
|
parseMessage: (e) => {
|
|
97
|
-
const
|
|
177
|
+
const o = JSON.parse(e);
|
|
98
178
|
return {
|
|
99
179
|
role: "assistant",
|
|
100
|
-
content:
|
|
101
|
-
index:
|
|
102
|
-
status:
|
|
180
|
+
content: o.message,
|
|
181
|
+
index: o.number,
|
|
182
|
+
status: o.status
|
|
103
183
|
};
|
|
104
184
|
},
|
|
105
185
|
protocol: "sse"
|
|
106
186
|
}
|
|
107
187
|
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
188
|
+
},
|
|
189
|
+
toolbarKeys: ["undo", "redo", "brush", "eraser", "divider", "heading", "font-family", "font-size", "divider", "bold", "italic", "underline", "strike", "link", "code", "subscript", "superscript", "hr", "todo", "emoji", "divider", "highlight", "font-color", "divider", "align", "line-height", "divider", "bullet-list", "ordered-list", "indent-decrease", "indent-increase", "break", "divider", ...t.fileManager ? [{
|
|
190
|
+
id: "dux-file-manager-image",
|
|
191
|
+
tip: p("components.upload.fileManager"),
|
|
192
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3.08697 9H20.9134C21.4657 9 21.9134 9.44772 21.9134 10C21.9134 10.0277 21.9122 10.0554 21.9099 10.083L21.0766 20.083C21.0334 20.6013 20.6001 21 20.08 21H3.9203C3.40021 21 2.96695 20.6013 2.92376 20.083L2.09042 10.083C2.04456 9.53267 2.45355 9.04932 3.00392 9.00345C3.03155 9.00115 3.05925 9 3.08697 9ZM4.84044 19H19.1599L19.8266 11H4.17377L4.84044 19ZM13.4144 5H20.0002C20.5525 5 21.0002 5.44772 21.0002 6V7H3.00017V4C3.00017 3.44772 3.44789 3 4.00017 3H11.4144L13.4144 5Z"></path></svg>',
|
|
193
|
+
onClick: (e, o) => {
|
|
194
|
+
C.show({
|
|
195
|
+
title: p("components.uploadManage.title") || p("components.upload.fileManager"),
|
|
196
|
+
width: "800px",
|
|
197
|
+
component: () => import("../upload/manager.js"),
|
|
198
|
+
componentProps: {
|
|
199
|
+
path: b.value,
|
|
200
|
+
type: t.fileManagerType || "all",
|
|
201
|
+
multiple: !0,
|
|
202
|
+
uploadParams: {
|
|
203
|
+
path: d.value,
|
|
204
|
+
accept: "*/*",
|
|
205
|
+
method: P.value
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}).then((a) => {
|
|
209
|
+
a?.forEach?.((i) => {
|
|
210
|
+
const m = S(i), h = i?.filename || "";
|
|
211
|
+
if (m === "image")
|
|
212
|
+
o.insert({
|
|
213
|
+
type: "image",
|
|
214
|
+
attrs: {
|
|
215
|
+
src: i.url,
|
|
216
|
+
alt: h,
|
|
217
|
+
width: "auto"
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
else if (m === "video")
|
|
221
|
+
o.insert({
|
|
222
|
+
type: "video",
|
|
223
|
+
attrs: {
|
|
224
|
+
src: i.url,
|
|
225
|
+
controls: "true",
|
|
226
|
+
width: 350
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
else {
|
|
230
|
+
const v = i?.filename || i?.name || "file";
|
|
231
|
+
t.editorType === "markdown" ? o.insertMarkdown(`[${v}](${i.url})`) : o.insert(`<a href="${i.url}" target="_blank">${v}</a>`);
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}] : [], "image", "video", "attachment", "quote", "container", "code-block", "table", "divider", "printer", "fullscreen", "ai"]
|
|
237
|
+
}), l.value != null && (t.editorType === "markdown" ? r.setMarkdownContent(l.value || "") : r.setContent(l.value || ""));
|
|
238
|
+
}), V(() => {
|
|
239
|
+
r?.destroy();
|
|
240
|
+
}), w(f.isDark, (e) => {
|
|
241
|
+
n.value && (n.value.classList.remove("aie-theme-dark", "aie-theme-light"), n.value.classList.add(e ? "aie-theme-dark" : "aie-theme-light"));
|
|
114
242
|
}, {
|
|
115
243
|
immediate: !0
|
|
116
|
-
}), () =>
|
|
117
|
-
ref:
|
|
244
|
+
}), () => $("div", {
|
|
245
|
+
ref: n,
|
|
118
246
|
style: `height: ${t.height}; width:100%`
|
|
119
247
|
}, null);
|
|
120
248
|
}
|
|
121
249
|
});
|
|
122
250
|
export {
|
|
123
|
-
|
|
251
|
+
Ye as DuxAiEditor
|
|
124
252
|
};
|
|
@@ -52,11 +52,11 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../pages/page404.js";
|
|
53
53
|
import "short-unique-id";
|
|
54
54
|
import "aieditor";
|
|
55
|
+
import { useUploadConfig as J } from "./config.js";
|
|
55
56
|
import "@vue-flow/core";
|
|
56
57
|
import "@vue-flow/background";
|
|
57
58
|
/* empty css */
|
|
58
|
-
import { useModal as
|
|
59
|
-
import { useUploadConfig as H } from "./config.js";
|
|
59
|
+
import { useModal as H } from "../../hooks/modal.js";
|
|
60
60
|
import "@iconify-json/tabler/icons.json";
|
|
61
61
|
import "../posterEditor/elements/index.js";
|
|
62
62
|
import "fabric";
|
|
@@ -130,26 +130,25 @@ const d = {
|
|
|
130
130
|
setup(t, {
|
|
131
131
|
emit: S
|
|
132
132
|
}) {
|
|
133
|
-
console.log("props", t);
|
|
134
133
|
const u = X(t, "value", S, {
|
|
135
134
|
passive: !0,
|
|
136
135
|
deep: !0,
|
|
137
136
|
defaultValue: t.defaultValue
|
|
138
137
|
}), C = I(), {
|
|
139
138
|
t: a
|
|
140
|
-
} = B(), f = c(), m = s(() => t.maxSize || 5), N =
|
|
139
|
+
} = B(), f = c(), m = s(() => t.maxSize || 5), N = H(), {
|
|
141
140
|
uploadPath: g,
|
|
142
141
|
managePath: V,
|
|
143
142
|
driver: k,
|
|
144
143
|
method: v
|
|
145
|
-
} =
|
|
144
|
+
} = J({
|
|
146
145
|
driver: t?.driver,
|
|
147
146
|
signPath: t?.signPath,
|
|
148
147
|
signCallback: t?.signCallback,
|
|
149
148
|
uploadPath: t?.path,
|
|
150
149
|
managePath: t?.managePath,
|
|
151
150
|
method: t?.method
|
|
152
|
-
}),
|
|
151
|
+
}), n = T({
|
|
153
152
|
path: g.value,
|
|
154
153
|
multiple: t.multiple,
|
|
155
154
|
maxFileCount: t.maxNum,
|
|
@@ -163,10 +162,10 @@ const d = {
|
|
|
163
162
|
isOverDropZone: h
|
|
164
163
|
} = L(f, {
|
|
165
164
|
onDrop: (e) => {
|
|
166
|
-
e && e.length > 0 &&
|
|
165
|
+
e && e.length > 0 && n.addFiles(Array.from(e), "file");
|
|
167
166
|
}
|
|
168
167
|
}), p = c(!1);
|
|
169
|
-
b(
|
|
168
|
+
b(n.dataFiles, (e) => {
|
|
170
169
|
const i = t.multiple ? e : e[0];
|
|
171
170
|
p.value = !0, u.value = i, t.onUpdateValue?.(i), w(() => {
|
|
172
171
|
p.value = !1;
|
|
@@ -179,8 +178,8 @@ const d = {
|
|
|
179
178
|
const A = i.split("/")[0];
|
|
180
179
|
return d[i] || A.toUpperCase();
|
|
181
180
|
}
|
|
182
|
-
const
|
|
183
|
-
return
|
|
181
|
+
const l = E.getExtension(i);
|
|
182
|
+
return l ? l.toUpperCase() : i;
|
|
184
183
|
}).filter(Boolean).join(", ") : ""), z = s(() => ({
|
|
185
184
|
pending: o("div", {
|
|
186
185
|
class: "text-info"
|
|
@@ -194,13 +193,13 @@ const d = {
|
|
|
194
193
|
error: o("div", {
|
|
195
194
|
class: "text-error"
|
|
196
195
|
}, [a("components.upload.status.error")])
|
|
197
|
-
})), D = s(() => [r.dropZone.base, h.value ? r.dropZone.active : r.dropZone.hover]), M = s(() => [
|
|
196
|
+
})), D = s(() => [r.dropZone.base, h.value ? r.dropZone.active : r.dropZone.hover]), M = s(() => [n.uploadFiles.value.length === 0 && "border-b border-muted"]), y = c(!1);
|
|
198
197
|
return b(u, (e) => {
|
|
199
198
|
if (p.value || !e || !e?.length || y.value)
|
|
200
199
|
return;
|
|
201
200
|
y.value = !0;
|
|
202
201
|
const i = Array.isArray(e) ? e : [e];
|
|
203
|
-
|
|
202
|
+
n.addDataFiles(i);
|
|
204
203
|
}, {
|
|
205
204
|
immediate: !0
|
|
206
205
|
}), () => o("div", {
|
|
@@ -208,7 +207,7 @@ const d = {
|
|
|
208
207
|
}, [o("div", {
|
|
209
208
|
ref: f,
|
|
210
209
|
class: D.value,
|
|
211
|
-
onClick: () =>
|
|
210
|
+
onClick: () => n.open()
|
|
212
211
|
}, [o("div", {
|
|
213
212
|
class: r.content
|
|
214
213
|
}, [o("div", {
|
|
@@ -230,7 +229,7 @@ const d = {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
}).then((i) => {
|
|
233
|
-
|
|
232
|
+
n.addDataFiles(i);
|
|
234
233
|
}));
|
|
235
234
|
}
|
|
236
235
|
}, [o("div", {
|
|
@@ -283,7 +282,7 @@ const d = {
|
|
|
283
282
|
title: a("components.upload.actions"),
|
|
284
283
|
width: 120,
|
|
285
284
|
render: (e) => {
|
|
286
|
-
let i,
|
|
285
|
+
let i, l;
|
|
287
286
|
return o("div", {
|
|
288
287
|
class: r.table.actions
|
|
289
288
|
}, [o(F, {
|
|
@@ -291,20 +290,20 @@ const d = {
|
|
|
291
290
|
size: "small",
|
|
292
291
|
text: !0,
|
|
293
292
|
disabled: ["success", "error", "cancelled"].includes(e.status),
|
|
294
|
-
onClick: () =>
|
|
293
|
+
onClick: () => n.cancelFiles([e.id])
|
|
295
294
|
}, P(i = a("components.upload.cancel")) ? i : {
|
|
296
295
|
default: () => [i]
|
|
297
296
|
}), o(F, {
|
|
298
297
|
type: "error",
|
|
299
298
|
size: "small",
|
|
300
299
|
text: !0,
|
|
301
|
-
onClick: () =>
|
|
302
|
-
}, P(
|
|
303
|
-
default: () => [
|
|
300
|
+
onClick: () => n.removeFiles([e.id])
|
|
301
|
+
}, P(l = a("components.upload.delete")) ? l : {
|
|
302
|
+
default: () => [l]
|
|
304
303
|
})]);
|
|
305
304
|
}
|
|
306
305
|
}],
|
|
307
|
-
data:
|
|
306
|
+
data: n.uploadFiles.value
|
|
308
307
|
}, {
|
|
309
308
|
empty: () => o("div", {
|
|
310
309
|
class: r.table.empty
|
|
@@ -50,12 +50,12 @@ import "@duxweb/dvha-naiveui";
|
|
|
50
50
|
import "../../pages/page404.js";
|
|
51
51
|
import "short-unique-id";
|
|
52
52
|
import "aieditor";
|
|
53
|
+
import { useUploadConfig as L } from "./config.js";
|
|
53
54
|
import "@vue-flow/core";
|
|
54
55
|
import "@vue-flow/background";
|
|
55
56
|
/* empty css */
|
|
56
|
-
import { useModal as
|
|
57
|
+
import { useModal as O } from "../../hooks/modal.js";
|
|
57
58
|
import "mime";
|
|
58
|
-
import { useUploadConfig as O } from "./config.js";
|
|
59
59
|
import "@iconify-json/tabler/icons.json";
|
|
60
60
|
import "../posterEditor/elements/index.js";
|
|
61
61
|
import "fabric";
|
|
@@ -116,7 +116,7 @@ const Ze = /* @__PURE__ */ k({
|
|
|
116
116
|
managePath: y,
|
|
117
117
|
driver: z,
|
|
118
118
|
method: p
|
|
119
|
-
} =
|
|
119
|
+
} = L({
|
|
120
120
|
driver: t?.driver,
|
|
121
121
|
signPath: t?.signPath,
|
|
122
122
|
signCallback: t?.signCallback,
|
|
@@ -142,7 +142,7 @@ const Ze = /* @__PURE__ */ k({
|
|
|
142
142
|
});
|
|
143
143
|
const F = n(() => a.progress.value.totalPercent), P = n(() => a.isUploading.value), C = async () => {
|
|
144
144
|
a.open();
|
|
145
|
-
}, S = n(() => t.multiple ? t.maxNum && a.uploadFiles.value.length >= t.maxNum : !0), N = n(() => a.dataFiles.value?.map((e) => e.url)), U =
|
|
145
|
+
}, S = n(() => t.multiple ? t.maxNum && a.uploadFiles.value.length >= t.maxNum : !0), N = n(() => a.dataFiles.value?.map((e) => e.url)), U = O();
|
|
146
146
|
return g(u, (e) => {
|
|
147
147
|
if (!e || !(Array.isArray(e) ? e.length : String(e).length)) return;
|
|
148
148
|
const o = typeof e == "string" ? [e] : Array.isArray(e) ? e : [], l = (a.dataFiles.value || []).map((m) => m.url).filter(Boolean), c = o.filter((m) => !l.includes(m));
|
|
@@ -52,11 +52,11 @@ import "@duxweb/dvha-naiveui";
|
|
|
52
52
|
import "../../pages/page404.js";
|
|
53
53
|
import "short-unique-id";
|
|
54
54
|
import "aieditor";
|
|
55
|
+
import { useUploadConfig as ae } from "./config.js";
|
|
55
56
|
import "@vue-flow/core";
|
|
56
57
|
import "@vue-flow/background";
|
|
57
58
|
/* empty css */
|
|
58
59
|
import "mime";
|
|
59
|
-
import { useUploadConfig as ae } from "./config.js";
|
|
60
60
|
import "@iconify-json/tabler/icons.json";
|
|
61
61
|
import "../posterEditor/elements/index.js";
|
|
62
62
|
import "fabric";
|
|
@@ -262,7 +262,7 @@ const va = /* @__PURE__ */ z({
|
|
|
262
262
|
class: "i-tabler:x"
|
|
263
263
|
}, null)
|
|
264
264
|
}, null)])]), e("div", {
|
|
265
|
-
class: "flex-1 min-h-1"
|
|
265
|
+
class: "flex-1 min-h-1 relative"
|
|
266
266
|
}, [n.data?.value?.data?.length > 0 && e(J, {
|
|
267
267
|
distance: 10,
|
|
268
268
|
onLoad: () => {
|
|
@@ -311,7 +311,7 @@ const va = /* @__PURE__ */ z({
|
|
|
311
311
|
}, null)
|
|
312
312
|
}))])]
|
|
313
313
|
}), n.isLoading.value ? e(Q, {
|
|
314
|
-
class: "h-full absolute w-full bg-gray-1/50"
|
|
314
|
+
class: "h-full absolute w-full inset-0 bg-gray-1/50"
|
|
315
315
|
}, null) : !n.data.value?.data?.length && e("div", {
|
|
316
316
|
class: "size-full flex justify-center items-center text-sm text-gray-6"
|
|
317
317
|
}, [e("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const r = `/* layer: properties */
|
|
2
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-
|
|
2
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-ease:initial;--un-to-opacity:100%;--un-outline-style:solid;--un-fill-opacity:100%;--un-space-y-reverse:initial;}}
|
|
3
3
|
@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
4
4
|
@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
|
|
5
5
|
@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
@@ -882,6 +882,14 @@ textarea {
|
|
|
882
882
|
padding-block: 0;
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
+
/*
|
|
886
|
+
Center dropdown marker shown on inputs with paired \`<datalist>\`s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499)
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
::-webkit-calendar-picker-indicator {
|
|
890
|
+
line-height: 1;
|
|
891
|
+
}
|
|
892
|
+
|
|
885
893
|
/*
|
|
886
894
|
Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
887
895
|
*/
|
|
@@ -913,7 +921,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
913
921
|
Make elements with the HTML hidden attribute stay hidden by default.
|
|
914
922
|
*/
|
|
915
923
|
|
|
916
|
-
[hidden]:where(:not([hidden
|
|
924
|
+
[hidden]:where(:not([hidden~='until-found'])) {
|
|
917
925
|
display: none !important;
|
|
918
926
|
}
|
|
919
927
|
/* layer: icons */
|
|
@@ -973,7 +981,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
973
981
|
.i-tabler\\:hexagons{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 18v-5l4-2l4 2v5l-4 2zm4-7V6l4-2l4 2v5m-4 2l4-2l4 2v5l-4 2l-4-2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
974
982
|
.i-tabler\\:info-circle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01'/%3E%3Cpath d='M11 12h1v4h1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
975
983
|
.i-tabler\\:info-circle-filled{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1-19.995.324L2 12l.004-.28C2.152 6.327 6.57 2 12 2m0 9h-1l-.117.007a1 1 0 0 0 0 1.986L11 13v3l.007.117a1 1 0 0 0 .876.876L12 17h1l.117-.007a1 1 0 0 0 .876-.876L14 16l-.007-.117a1 1 0 0 0-.764-.857l-.112-.02L13 15v-3l-.007-.117a1 1 0 0 0-.876-.876zm.01-3l-.127.007a1 1 0 0 0 0 1.986L12 10l.127-.007a1 1 0 0 0 0-1.986z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
976
|
-
.i-tabler\\:language{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='
|
|
984
|
+
.i-tabler\\:language{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 6.371C9 10.789 6.761 13 4 13m0-6.629h7'/%3E%3Cpath d='M5 9c0 2.144 2.252 3.908 6 4m1 7l4-9l4 9m-.9-2h-6.2M6.694 3l.793.582'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
977
985
|
.i-tabler\\:layout{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm0 9a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm10-9a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
978
986
|
.i-tabler\\:layout-align-bottom{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 20h16M9 6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
979
987
|
.i-tabler\\:layout-align-center{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v5m0 6v5m-6-9a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
@@ -1353,7 +1361,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1353
1361
|
.translate-x-0{--un-translate-x:calc(var(--spacing) * 0);translate:var(--un-translate-x) var(--un-translate-y);}
|
|
1354
1362
|
.translate-y-0{--un-translate-y:calc(var(--spacing) * 0);translate:var(--un-translate-x) var(--un-translate-y);}
|
|
1355
1363
|
.translate-y-full{--un-translate-y:100%;translate:var(--un-translate-x) var(--un-translate-y);}
|
|
1356
|
-
.rotate-0{rotate:
|
|
1364
|
+
.rotate-0{rotate:0deg;}
|
|
1357
1365
|
.rotate-180{rotate:180deg;}
|
|
1358
1366
|
.rotate-45{rotate:45deg;}
|
|
1359
1367
|
.transform{transform:var(--un-rotate-x) var(--un-rotate-y) var(--un-rotate-z) var(--un-skew-x) var(--un-skew-y);}
|
|
@@ -1438,12 +1446,6 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1438
1446
|
.table{display:table;}
|
|
1439
1447
|
.border-collapse{border-collapse:collapse;}
|
|
1440
1448
|
.table-fixed{table-layout:fixed;}
|
|
1441
|
-
.space-y-2>:not(:last-child){--un-space-y-reverse:0;margin-block-start: calc(calc(var(--spacing) * 2) * var(--un-space-y-reverse));margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--un-space-y-reverse)));}
|
|
1442
|
-
.space-y-4>:not(:last-child){--un-space-y-reverse:0;margin-block-start: calc(calc(var(--spacing) * 4) * var(--un-space-y-reverse));margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--un-space-y-reverse)));}
|
|
1443
|
-
.dark .dark\\:divide-gray-800>:not(:last-child){border-color:color-mix(in srgb, var(--colors-gray-800) var(--un-divide-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-800)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1444
|
-
.divide-white\\/20>:not(:last-child){border-color:color-mix(in srgb, var(--colors-white-DEFAULT) 20%, transparent) /* rgb(var(--ui-color-white)) */;}
|
|
1445
|
-
.divide-x>:not(:last-child){--un-divide-x-reverse:0;border-left-width:calc(1px * var(--un-divide-x-reverse));border-left-style:var(--un-border-style);border-right-width:calc(1px * calc(1 - var(--un-divide-x-reverse)));border-right-style:var(--un-border-style);}
|
|
1446
|
-
.divide-y>:not(:last-child){--un-divide-y-reverse:0;border-top-width:calc(1px * var(--un-divide-y-reverse));border-top-style:var(--un-border-style);border-bottom-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-style:var(--un-border-style);}
|
|
1447
1449
|
.text-default{color:color-mix(in oklab, rgb(var(--ui-text)) var(--un-text-opacity, 100%), transparent);--un-text-opacity:100%;}
|
|
1448
1450
|
.text-dimmed{color:color-mix(in oklab, rgb(var(--ui-text-dimmed)) var(--un-text-opacity, 100%), transparent);--un-text-opacity:100%;}
|
|
1449
1451
|
.placeholder\\:text-dimmed::placeholder{color:color-mix(in oklab, rgb(var(--ui-text-dimmed)) var(--un-text-opacity, 100%), transparent);--un-text-opacity:100%;}
|
|
@@ -1484,6 +1486,24 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1484
1486
|
border-color: color-mix(in oklab, rgb(var(--ui-border-muted)) var(--un-border-opacity, 100%), transparent);
|
|
1485
1487
|
--un-border-opacity: 100%;
|
|
1486
1488
|
}
|
|
1489
|
+
.dark\\:divide-gray-800{
|
|
1490
|
+
.dark :where(&>:not(:last-child)){border-color:color-mix(in srgb, var(--colors-gray-800) var(--un-divide-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-800)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1491
|
+
}
|
|
1492
|
+
.divide-white\\/20{
|
|
1493
|
+
:where(&>:not(:last-child)){border-color:color-mix(in srgb, var(--colors-white-DEFAULT) 20%, transparent) /* rgb(var(--ui-color-white)) */;}
|
|
1494
|
+
}
|
|
1495
|
+
.divide-x{
|
|
1496
|
+
:where(&>:not(:last-child)){--un-divide-x-reverse:0;border-left-width:calc(1px * var(--un-divide-x-reverse));border-left-style:var(--un-border-style);border-right-width:calc(1px * calc(1 - var(--un-divide-x-reverse)));border-right-style:var(--un-border-style);}
|
|
1497
|
+
}
|
|
1498
|
+
.divide-y{
|
|
1499
|
+
:where(&>:not(:last-child)){--un-divide-y-reverse:0;border-top-width:calc(1px * var(--un-divide-y-reverse));border-top-style:var(--un-border-style);border-bottom-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-style:var(--un-border-style);}
|
|
1500
|
+
}
|
|
1501
|
+
.space-y-2{
|
|
1502
|
+
:where(&>:not(:last-child)){--un-space-y-reverse:0;margin-block-start: calc(calc(var(--spacing) * 2) * var(--un-space-y-reverse));margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--un-space-y-reverse)));}
|
|
1503
|
+
}
|
|
1504
|
+
.space-y-4{
|
|
1505
|
+
:where(&>:not(:last-child)){--un-space-y-reverse:0;margin-block-start: calc(calc(var(--spacing) * 4) * var(--un-space-y-reverse));margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--un-space-y-reverse)));}
|
|
1506
|
+
}
|
|
1487
1507
|
@supports (color: color-mix(in lab, red, red)){
|
|
1488
1508
|
.text-blue-600{color:color-mix(in oklab, var(--colors-blue-600) var(--un-text-opacity), transparent) /* rgb(var(--base-color-blue-600)) */;}
|
|
1489
1509
|
.text-error{color:color-mix(in oklab, var(--colors-error-DEFAULT) var(--un-text-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-error)) var(--un-text-opacity, 100%), transparent) */;}
|
|
@@ -1537,10 +1557,10 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1537
1557
|
.hover\\:bg-primary-hover:hover{background-color:color-mix(in oklab, var(--colors-primary-hover) var(--un-bg-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-primary-hover)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1538
1558
|
.hover\\:bg-primary\\/10:hover{background-color:color-mix(in oklab, var(--colors-primary-DEFAULT) 10%, transparent) /* color-mix(in oklab, rgb(var(--ui-color-primary)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1539
1559
|
.hover\\:bg-primary\\/5:hover{background-color:color-mix(in oklab, var(--colors-primary-DEFAULT) 5%, transparent) /* color-mix(in oklab, rgb(var(--ui-color-primary)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1540
|
-
.dark .dark\\:shadow-gray-950\\/20{--un-shadow-color:color-mix(in oklab, var(--colors-gray-950) 20%, transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1541
|
-
.dark .dark\\:shadow-gray-950\\/80{--un-shadow-color:color-mix(in oklab, var(--colors-gray-950) 80%, transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1560
|
+
.dark .dark\\:shadow-gray-950\\/20{--un-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--colors-gray-950) 20%, transparent) var(--un-shadow-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1561
|
+
.dark .dark\\:shadow-gray-950\\/80{--un-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--colors-gray-950) 80%, transparent) var(--un-shadow-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1542
1562
|
.shadow-gray-100{--un-shadow-color:color-mix(in oklab, var(--colors-gray-100) var(--un-shadow-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-100)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1543
|
-
.shadow-gray-950\\/10{--un-shadow-color:color-mix(in oklab, var(--colors-gray-950) 10%, transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1563
|
+
.shadow-gray-950\\/10{--un-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--colors-gray-950) 10%, transparent) var(--un-shadow-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-gray-950)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1544
1564
|
.fill-primary{fill:color-mix(in oklab, var(--colors-primary-DEFAULT) var(--un-fill-opacity), transparent) /* color-mix(in oklab, rgb(var(--ui-color-primary)) var(--un-text-opacity, 100%), transparent) */;}
|
|
1545
1565
|
}
|
|
1546
1566
|
@media (min-width: 40rem){
|