@aswin.dev/editor 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
- package/dist/CloudEditor-CFldoCOb.js +1207 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
- package/dist/CommentsSidebar-BaD5F53-.js +436 -0
- package/dist/CountdownBlock-DaYGxKqo.js +92 -0
- package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
- package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
- package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
- package/dist/dist-C04s_fLA.js +563 -0
- package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
- package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +88 -11
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-34eUKPOZ.js +55 -0
- package/dist/styles-B4tjX5SP.js +5224 -0
- package/dist/templatical-editor.js +189 -126
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
- package/package.json +10 -10
- package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
- package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
- package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
- package/dist/cdn/editor.css +0 -2
- package/dist/cdn/editor.js +0 -250
- package/dist/cdn/editor.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
import { $ as e, F as t, H as n, N as r, P as i, S as a, _ as o, at as s, b as c, ct as l, d as u, g as d, h as f, j as ee, lt as p, m, n as h, p as g, r as _, st as v, u as te, w as y, y as b } from "./draggable-Bcb86AsV.js";
|
|
2
|
-
import { O as x, Ot as ne, St as re, w as S } from "./features-DEMb13KS.js";
|
|
3
|
-
import { A as ie, B as ae, R as oe, W as se, b as ce } from "./icons-CsLTcirh.js";
|
|
4
|
-
import { a as le, c as ue, d as C, f as w, h as T, i as E, l as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P } from "./media-library-CVaNvhpM.js";
|
|
5
|
-
//#region ../media-library/src/standalone/MediaLibrary.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var F = {
|
|
7
|
-
class: "tpl tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
|
|
8
|
-
style: {
|
|
9
|
-
width: "100%",
|
|
10
|
-
height: "100%",
|
|
11
|
-
"background-color": "var(--tpl-bg-elevated)",
|
|
12
|
-
border: "1px solid var(--tpl-border)"
|
|
13
|
-
}
|
|
14
|
-
}, I = {
|
|
15
|
-
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
|
|
16
|
-
style: { "border-color": "var(--tpl-border)" }
|
|
17
|
-
}, L = {
|
|
18
|
-
class: "tpl:text-sm tpl:font-semibold",
|
|
19
|
-
style: { color: "var(--tpl-text)" }
|
|
20
|
-
}, R = { class: "tpl:flex tpl:items-center tpl:gap-3" }, z = { class: "tpl:relative" }, B = ["value", "placeholder"], V = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, H = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
|
|
23
|
-
style: {
|
|
24
|
-
"border-color": "var(--tpl-border)",
|
|
25
|
-
"background-color": "var(--tpl-bg)"
|
|
26
|
-
}
|
|
27
|
-
}, U = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, de = {
|
|
28
|
-
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
|
|
29
|
-
style: { "border-color": "var(--tpl-border)" }
|
|
30
|
-
}, fe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, pe = ["title"], me = {
|
|
31
|
-
key: 1,
|
|
32
|
-
class: "tpl:text-xs tpl:font-medium",
|
|
33
|
-
style: { color: "var(--tpl-text)" }
|
|
34
|
-
}, he = {
|
|
35
|
-
class: "tpl:flex tpl:rounded-md tpl:p-0.5",
|
|
36
|
-
style: {
|
|
37
|
-
border: "1px solid var(--tpl-border)",
|
|
38
|
-
"background-color": "var(--tpl-bg)"
|
|
39
|
-
}
|
|
40
|
-
}, ge = ["title"], _e = ["title"], ve = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ye = ["value"], be = { value: "" }, xe = ["value"], Se = ["value"], Ce = { value: "newest" }, we = { value: "oldest" }, Te = { value: "name_asc" }, Ee = { value: "name_desc" }, De = { value: "size_asc" }, Oe = { value: "size_desc" }, ke = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ae = {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: "tpl:px-4 tpl:pt-3"
|
|
43
|
-
}, je = {
|
|
44
|
-
class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
45
|
-
style: {
|
|
46
|
-
"background-color": "var(--tpl-bg-elevated)",
|
|
47
|
-
"box-shadow": "var(--tpl-shadow-xl)"
|
|
48
|
-
}
|
|
49
|
-
}, Me = {
|
|
50
|
-
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
51
|
-
style: { color: "var(--tpl-text)" }
|
|
52
|
-
}, Ne = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "tpl:mb-4 tpl:text-xs",
|
|
55
|
-
style: { color: "var(--tpl-text-muted)" }
|
|
56
|
-
}, Pe = {
|
|
57
|
-
key: 1,
|
|
58
|
-
class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
|
|
59
|
-
style: { "border-color": "var(--tpl-border)" }
|
|
60
|
-
}, Fe = { class: "tpl:font-medium" }, Ie = { style: { color: "var(--tpl-text-muted)" } }, Le = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Re = {
|
|
61
|
-
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
|
|
62
|
-
style: { "border-color": "var(--tpl-border)" }
|
|
63
|
-
}, ze = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Be = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Ve = {
|
|
64
|
-
key: 0,
|
|
65
|
-
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
66
|
-
}, He = {
|
|
67
|
-
key: 1,
|
|
68
|
-
class: "tpl:relative"
|
|
69
|
-
}, Ue = { class: "tpl:flex tpl:items-center tpl:gap-2" }, W = ["disabled"], G = /* @__PURE__ */ a({
|
|
70
|
-
__name: "MediaLibrary",
|
|
71
|
-
props: {
|
|
72
|
-
authManager: {},
|
|
73
|
-
projectId: {},
|
|
74
|
-
planConfig: {},
|
|
75
|
-
translations: {},
|
|
76
|
-
onSelect: { type: Function },
|
|
77
|
-
onError: { type: Function }
|
|
78
|
-
},
|
|
79
|
-
emits: ["ready"],
|
|
80
|
-
setup(a, { emit: _ }) {
|
|
81
|
-
let y = a, x = _, S = g(() => y.translations);
|
|
82
|
-
i("translations", y.translations), i("authManager", y.authManager), i("projectId", g(() => y.projectId)), i("planConfig", {
|
|
83
|
-
config: e(y.planConfig),
|
|
84
|
-
isLoading: e(!1),
|
|
85
|
-
hasFeature: (e) => y.planConfig.features[e] ?? !1,
|
|
86
|
-
features: g(() => y.planConfig.features),
|
|
87
|
-
fetchConfig: async () => {}
|
|
88
|
-
});
|
|
89
|
-
let N = g(() => y.planConfig.features.media_folders ?? !1), G = g(() => y.planConfig.features.import_from_url ?? !1), K = g(() => y.planConfig.storage.used_bytes ?? 0), q = g(() => y.planConfig.storage.limit_bytes ?? 0), { availableCategories: J } = w(), Y = T({
|
|
90
|
-
projectId: y.projectId,
|
|
91
|
-
authManager: y.authManager,
|
|
92
|
-
onError: y.onError
|
|
93
|
-
}), X = O({
|
|
94
|
-
library: Y,
|
|
95
|
-
canUseMediaFolders: N,
|
|
96
|
-
translations: S
|
|
97
|
-
});
|
|
98
|
-
function Z() {
|
|
99
|
-
if (!Y.previewItem.value) return;
|
|
100
|
-
let e = Y.previewItem.value;
|
|
101
|
-
y.onSelect?.({
|
|
102
|
-
...e,
|
|
103
|
-
url: X.selectedUrl.value || e.url
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return ee(() => {
|
|
107
|
-
Y.loadItems(), Y.loadFrequentlyUsed(), x("ready");
|
|
108
|
-
}), (e, i) => (r(), o("div", F, [
|
|
109
|
-
m("div", I, [m("h2", L, p(S.value.mediaLibrary.title), 1), m("div", R, [c(j, {
|
|
110
|
-
"used-bytes": K.value,
|
|
111
|
-
"limit-bytes": q.value,
|
|
112
|
-
size: 22
|
|
113
|
-
}, null, 8, ["used-bytes", "limit-bytes"]), m("div", z, [m("input", {
|
|
114
|
-
value: s(X).searchInput.value,
|
|
115
|
-
type: "text",
|
|
116
|
-
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
|
|
117
|
-
style: {
|
|
118
|
-
"border-color": "var(--tpl-border)",
|
|
119
|
-
"background-color": "var(--tpl-bg)",
|
|
120
|
-
color: "var(--tpl-text)"
|
|
121
|
-
},
|
|
122
|
-
placeholder: S.value.mediaLibrary.searchPlaceholder,
|
|
123
|
-
onInput: i[0] ||= (e) => s(X).handleSearchInput(e.target.value)
|
|
124
|
-
}, null, 40, B), c(s(ce), {
|
|
125
|
-
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
126
|
-
size: 13,
|
|
127
|
-
"stroke-width": 2,
|
|
128
|
-
style: { color: "var(--tpl-text-dim)" }
|
|
129
|
-
})])])]),
|
|
130
|
-
m("div", V, [c(h, {
|
|
131
|
-
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
132
|
-
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
133
|
-
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
134
|
-
"leave-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-in",
|
|
135
|
-
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
136
|
-
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
137
|
-
}, {
|
|
138
|
-
default: n(() => [N.value && s(X).showSidebar.value ? (r(), o("div", H, [c(P, {
|
|
139
|
-
folders: s(Y).folders.value,
|
|
140
|
-
"current-folder-id": s(Y).currentFolderId.value,
|
|
141
|
-
"view-mode": s(Y).viewMode.value,
|
|
142
|
-
"has-frequently-used": s(X).hasFrequentlyUsed.value,
|
|
143
|
-
onNavigate: s(Y).navigateToFolder,
|
|
144
|
-
onCreateFolder: s(X).handleCreateFolder,
|
|
145
|
-
onRenameFolder: s(X).handleRenameFolder,
|
|
146
|
-
onDeleteFolder: s(X).handleDeleteFolder,
|
|
147
|
-
onShowFrequentlyUsed: s(Y).showFrequentlyUsed
|
|
148
|
-
}, null, 8, [
|
|
149
|
-
"folders",
|
|
150
|
-
"current-folder-id",
|
|
151
|
-
"view-mode",
|
|
152
|
-
"has-frequently-used",
|
|
153
|
-
"onNavigate",
|
|
154
|
-
"onCreateFolder",
|
|
155
|
-
"onRenameFolder",
|
|
156
|
-
"onDeleteFolder",
|
|
157
|
-
"onShowFrequentlyUsed"
|
|
158
|
-
])])) : d("", !0)]),
|
|
159
|
-
_: 1
|
|
160
|
-
}), m("div", U, [m("div", de, [m("div", fe, [
|
|
161
|
-
N.value ? (r(), o("button", {
|
|
162
|
-
key: 0,
|
|
163
|
-
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
164
|
-
style: l({
|
|
165
|
-
color: s(X).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
166
|
-
backgroundColor: s(X).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
167
|
-
border: s(X).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
168
|
-
}),
|
|
169
|
-
title: s(X).showSidebar.value ? S.value.mediaLibrary.hideFolders : S.value.mediaLibrary.showFolders,
|
|
170
|
-
onClick: i[1] ||= (e) => s(X).showSidebar.value = !s(X).showSidebar.value
|
|
171
|
-
}, [c(s(ie), {
|
|
172
|
-
size: 16,
|
|
173
|
-
"stroke-width": 2
|
|
174
|
-
})], 12, pe)) : d("", !0),
|
|
175
|
-
s(Y).viewMode.value === "frequently-used" ? (r(), o("span", me, p(S.value.mediaLibrary.frequentlyUsed), 1)) : (r(), f(A, {
|
|
176
|
-
key: 2,
|
|
177
|
-
folders: s(Y).folders.value,
|
|
178
|
-
"current-folder-id": s(Y).currentFolderId.value,
|
|
179
|
-
onNavigate: s(Y).navigateToFolder
|
|
180
|
-
}, null, 8, [
|
|
181
|
-
"folders",
|
|
182
|
-
"current-folder-id",
|
|
183
|
-
"onNavigate"
|
|
184
|
-
])),
|
|
185
|
-
m("div", he, [m("button", {
|
|
186
|
-
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
187
|
-
style: l({
|
|
188
|
-
color: s(X).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
189
|
-
backgroundColor: s(X).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
190
|
-
}),
|
|
191
|
-
title: S.value.mediaLibrary.viewGrid,
|
|
192
|
-
onClick: i[2] ||= (e) => s(X).layoutMode.value = "grid"
|
|
193
|
-
}, [c(s(se), {
|
|
194
|
-
size: 14,
|
|
195
|
-
"stroke-width": 2
|
|
196
|
-
})], 12, ge), m("button", {
|
|
197
|
-
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
198
|
-
style: l({
|
|
199
|
-
color: s(X).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
200
|
-
backgroundColor: s(X).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
201
|
-
}),
|
|
202
|
-
title: S.value.mediaLibrary.viewList,
|
|
203
|
-
onClick: i[3] ||= (e) => s(X).layoutMode.value = "list"
|
|
204
|
-
}, [c(s(oe), {
|
|
205
|
-
size: 14,
|
|
206
|
-
"stroke-width": 2
|
|
207
|
-
})], 12, _e)])
|
|
208
|
-
]), m("div", ve, [s(J).length > 1 ? (r(), o("select", {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
211
|
-
style: {
|
|
212
|
-
"border-color": "var(--tpl-border)",
|
|
213
|
-
"background-color": "var(--tpl-bg)",
|
|
214
|
-
color: "var(--tpl-text)"
|
|
215
|
-
},
|
|
216
|
-
value: s(Y).categoryFilter.value ?? "",
|
|
217
|
-
onChange: i[4] ||= (e) => s(Y).filterByCategory(e.target.value || null)
|
|
218
|
-
}, [m("option", be, p(S.value.mediaLibrary.filterAll), 1), (r(!0), o(u, null, t(s(J), (e) => (r(), o("option", {
|
|
219
|
-
key: e,
|
|
220
|
-
value: e
|
|
221
|
-
}, p(s(X).getCategoryLabel(e)), 9, xe))), 128))], 40, ye)) : d("", !0), m("select", {
|
|
222
|
-
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
223
|
-
style: {
|
|
224
|
-
"border-color": "var(--tpl-border)",
|
|
225
|
-
"background-color": "var(--tpl-bg)",
|
|
226
|
-
color: "var(--tpl-text)"
|
|
227
|
-
},
|
|
228
|
-
value: s(Y).sortOption.value,
|
|
229
|
-
onChange: i[5] ||= (e) => s(Y).sortBy(e.target.value)
|
|
230
|
-
}, [
|
|
231
|
-
m("option", Ce, p(S.value.mediaLibrary.sortNewest), 1),
|
|
232
|
-
m("option", we, p(S.value.mediaLibrary.sortOldest), 1),
|
|
233
|
-
m("option", Te, p(S.value.mediaLibrary.sortNameAsc), 1),
|
|
234
|
-
m("option", Ee, p(S.value.mediaLibrary.sortNameDesc), 1),
|
|
235
|
-
m("option", De, p(S.value.mediaLibrary.sortSizeAsc), 1),
|
|
236
|
-
m("option", Oe, p(S.value.mediaLibrary.sortSizeDesc), 1)
|
|
237
|
-
], 40, Se)])]), m("div", ke, [s(Y).viewMode.value === "files" ? (r(), o("div", Ae, [c(E, {
|
|
238
|
-
"is-uploading": s(Y).isUploading.value,
|
|
239
|
-
"upload-progress": s(Y).uploadProgress.value,
|
|
240
|
-
onUpload: s(X).handleUpload
|
|
241
|
-
}, null, 8, [
|
|
242
|
-
"is-uploading",
|
|
243
|
-
"upload-progress",
|
|
244
|
-
"onUpload"
|
|
245
|
-
]), G.value ? (r(), o("button", {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
248
|
-
style: {
|
|
249
|
-
"border-color": "var(--tpl-border)",
|
|
250
|
-
color: "var(--tpl-text-muted)",
|
|
251
|
-
"background-color": "var(--tpl-bg)"
|
|
252
|
-
},
|
|
253
|
-
onClick: i[6] ||= (e) => s(X).showImportUrlModal.value = !0
|
|
254
|
-
}, [c(s(ae), {
|
|
255
|
-
size: 14,
|
|
256
|
-
"stroke-width": 2
|
|
257
|
-
}), b(" " + p(S.value.mediaLibrary.importFromUrl), 1)])) : d("", !0)])) : d("", !0), c(D, {
|
|
258
|
-
items: s(X).displayItems.value,
|
|
259
|
-
"selected-ids": s(Y).selectedItems.value,
|
|
260
|
-
"is-loading": s(Y).isLoading.value,
|
|
261
|
-
"has-more": s(Y).viewMode.value === "files" && s(Y).hasMore.value,
|
|
262
|
-
layout: s(X).layoutMode.value,
|
|
263
|
-
onSelect: s(X).handleSelect,
|
|
264
|
-
onToggle: s(Y).toggleSelection,
|
|
265
|
-
onLoadMore: s(Y).loadMore,
|
|
266
|
-
onEdit: s(X).handleEditItem,
|
|
267
|
-
onReplace: s(X).handleReplaceItem
|
|
268
|
-
}, null, 8, [
|
|
269
|
-
"items",
|
|
270
|
-
"selected-ids",
|
|
271
|
-
"is-loading",
|
|
272
|
-
"has-more",
|
|
273
|
-
"layout",
|
|
274
|
-
"onSelect",
|
|
275
|
-
"onToggle",
|
|
276
|
-
"onLoadMore",
|
|
277
|
-
"onEdit",
|
|
278
|
-
"onReplace"
|
|
279
|
-
])])])]),
|
|
280
|
-
c(ue, {
|
|
281
|
-
visible: s(X).showImportUrlModal.value,
|
|
282
|
-
"is-importing": s(Y).isImportingFromUrl.value,
|
|
283
|
-
error: s(Y).importFromUrlError.value,
|
|
284
|
-
onImport: s(X).handleImportFromUrl,
|
|
285
|
-
onClose: i[7] ||= (e) => s(X).showImportUrlModal.value = !1
|
|
286
|
-
}, null, 8, [
|
|
287
|
-
"visible",
|
|
288
|
-
"is-importing",
|
|
289
|
-
"error",
|
|
290
|
-
"onImport"
|
|
291
|
-
]),
|
|
292
|
-
c(C, {
|
|
293
|
-
visible: !!s(X).editingItem.value,
|
|
294
|
-
item: s(X).editingItem.value,
|
|
295
|
-
onSave: s(X).handleEditSave,
|
|
296
|
-
onClose: i[8] ||= (e) => s(X).editingItem.value = null
|
|
297
|
-
}, null, 8, [
|
|
298
|
-
"visible",
|
|
299
|
-
"item",
|
|
300
|
-
"onSave"
|
|
301
|
-
]),
|
|
302
|
-
c(le, {
|
|
303
|
-
visible: s(Y).showReplaceWarning.value,
|
|
304
|
-
item: s(Y).pendingReplaceItem.value,
|
|
305
|
-
"usage-info": s(Y).replaceUsageInfo.value,
|
|
306
|
-
"is-replacing": s(Y).isReplacing.value,
|
|
307
|
-
error: s(Y).replaceError.value,
|
|
308
|
-
onReplace: s(X).handleReplaceFile,
|
|
309
|
-
onClose: s(Y).cancelReplace
|
|
310
|
-
}, null, 8, [
|
|
311
|
-
"visible",
|
|
312
|
-
"item",
|
|
313
|
-
"usage-info",
|
|
314
|
-
"is-replacing",
|
|
315
|
-
"error",
|
|
316
|
-
"onReplace",
|
|
317
|
-
"onClose"
|
|
318
|
-
]),
|
|
319
|
-
c(h, {
|
|
320
|
-
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
321
|
-
"enter-from-class": "tpl:opacity-0",
|
|
322
|
-
"enter-to-class": "tpl:opacity-100",
|
|
323
|
-
"leave-active-class": "tpl:transition tpl:ease-in tpl:duration-100",
|
|
324
|
-
"leave-from-class": "tpl:opacity-100",
|
|
325
|
-
"leave-to-class": "tpl:opacity-0"
|
|
326
|
-
}, {
|
|
327
|
-
default: n(() => [s(Y).showDeleteWarning.value ? (r(), o("div", {
|
|
328
|
-
key: 0,
|
|
329
|
-
class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
|
|
330
|
-
style: {
|
|
331
|
-
"background-color": "rgba(0, 0, 0, 0.5)",
|
|
332
|
-
"backdrop-filter": "blur(8px)",
|
|
333
|
-
"-webkit-backdrop-filter": "blur(8px)"
|
|
334
|
-
},
|
|
335
|
-
onClick: i[11] ||= te((...e) => s(Y).cancelDelete && s(Y).cancelDelete(...e), ["self"])
|
|
336
|
-
}, [m("div", je, [
|
|
337
|
-
m("h3", Me, p(S.value.mediaLibrary.deleteWarningTitle), 1),
|
|
338
|
-
m("p", {
|
|
339
|
-
class: v(["tpl:text-xs", s(X).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
340
|
-
style: { color: "var(--tpl-text-muted)" }
|
|
341
|
-
}, p(S.value.mediaLibrary.deleteWarningMessage), 3),
|
|
342
|
-
s(X).hasUsedFiles.value ? (r(), o("p", Ne, p(S.value.mediaLibrary.deleteWarningUsageNote), 1)) : d("", !0),
|
|
343
|
-
s(X).hasUsedFiles.value ? (r(), o("div", Pe, [(r(!0), o(u, null, t(s(Y).deleteUsageInfo.value, (e, t) => (r(), o("div", {
|
|
344
|
-
key: t,
|
|
345
|
-
class: "tpl:text-xs",
|
|
346
|
-
style: { color: "var(--tpl-text)" }
|
|
347
|
-
}, [e.template_count > 0 ? (r(), o(u, { key: 0 }, [m("span", Fe, p(s(X).displayItems.value.find((e) => e.id === t)?.filename || t), 1), m("span", Ie, " - " + p(S.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : d("", !0)]))), 128))])) : d("", !0),
|
|
348
|
-
m("div", Le, [m("button", {
|
|
349
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
350
|
-
style: {
|
|
351
|
-
"border-color": "var(--tpl-border)",
|
|
352
|
-
color: "var(--tpl-text)",
|
|
353
|
-
"background-color": "var(--tpl-bg)"
|
|
354
|
-
},
|
|
355
|
-
onClick: i[9] ||= (...e) => s(Y).cancelDelete && s(Y).cancelDelete(...e)
|
|
356
|
-
}, p(S.value.mediaLibrary.cancel), 1), m("button", {
|
|
357
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
358
|
-
style: {
|
|
359
|
-
"border-color": "var(--tpl-danger)",
|
|
360
|
-
color: "var(--tpl-danger)",
|
|
361
|
-
"background-color": "var(--tpl-danger-light)"
|
|
362
|
-
},
|
|
363
|
-
onClick: i[10] ||= (...e) => s(Y).confirmDelete && s(Y).confirmDelete(...e)
|
|
364
|
-
}, p(s(X).hasUsedFiles.value ? S.value.mediaLibrary.deleteAnyway : S.value.mediaLibrary.confirmDelete), 1)])
|
|
365
|
-
])])) : d("", !0)]),
|
|
366
|
-
_: 1
|
|
367
|
-
}),
|
|
368
|
-
m("div", Re, [m("div", ze, [s(Y).previewItem.value ? (r(), f(k, {
|
|
369
|
-
key: 0,
|
|
370
|
-
"selected-conversion": s(X).selectedConversion.value,
|
|
371
|
-
"onUpdate:selectedConversion": i[12] ||= (e) => s(X).selectedConversion.value = e,
|
|
372
|
-
item: s(Y).previewItem.value,
|
|
373
|
-
folders: s(Y).folders.value
|
|
374
|
-
}, null, 8, [
|
|
375
|
-
"selected-conversion",
|
|
376
|
-
"item",
|
|
377
|
-
"folders"
|
|
378
|
-
])) : d("", !0)]), m("div", Be, [s(Y).selectedItems.value.size > 0 ? (r(), o("div", Ve, [s(Y).previewItem.value ? (r(), o("button", {
|
|
379
|
-
key: 0,
|
|
380
|
-
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
381
|
-
style: l({
|
|
382
|
-
borderColor: s(X).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
383
|
-
color: s(X).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
384
|
-
backgroundColor: "var(--tpl-bg)"
|
|
385
|
-
}),
|
|
386
|
-
onClick: i[13] ||= (e) => s(X).copy(s(X).selectedUrl.value)
|
|
387
|
-
}, [s(X).copied.value ? (r(), f(s(ne), {
|
|
388
|
-
key: 1,
|
|
389
|
-
size: 12,
|
|
390
|
-
"stroke-width": 2
|
|
391
|
-
})) : (r(), f(s(re), {
|
|
392
|
-
key: 0,
|
|
393
|
-
size: 12,
|
|
394
|
-
"stroke-width": 2
|
|
395
|
-
})), b(" " + p(s(X).copied.value ? S.value.mediaLibrary.copied : S.value.mediaLibrary.copyUrl), 1)], 4)) : d("", !0), N.value ? (r(), o("div", He, [m("button", {
|
|
396
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
397
|
-
style: {
|
|
398
|
-
"border-color": "var(--tpl-border)",
|
|
399
|
-
color: "var(--tpl-text)",
|
|
400
|
-
"background-color": "var(--tpl-bg)"
|
|
401
|
-
},
|
|
402
|
-
onClick: i[14] ||= (e) => s(X).showMovePicker.value = !s(X).showMovePicker.value
|
|
403
|
-
}, p(S.value.mediaLibrary.moveSelected), 1), s(X).showMovePicker.value ? (r(), f(M, {
|
|
404
|
-
key: 0,
|
|
405
|
-
folders: s(Y).folders.value,
|
|
406
|
-
"current-folder-id": s(Y).currentFolderId.value,
|
|
407
|
-
onSelect: s(X).handleMoveToFolder,
|
|
408
|
-
onClose: i[15] ||= (e) => s(X).showMovePicker.value = !1
|
|
409
|
-
}, null, 8, [
|
|
410
|
-
"folders",
|
|
411
|
-
"current-folder-id",
|
|
412
|
-
"onSelect"
|
|
413
|
-
])) : d("", !0)])) : d("", !0)])) : d("", !0), m("div", Ue, [s(Y).selectedItems.value.size > 0 ? (r(), o("button", {
|
|
414
|
-
key: 0,
|
|
415
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
416
|
-
style: {
|
|
417
|
-
"border-color": "var(--tpl-danger)",
|
|
418
|
-
color: "var(--tpl-danger)",
|
|
419
|
-
"background-color": "var(--tpl-danger-light)"
|
|
420
|
-
},
|
|
421
|
-
onClick: i[16] ||= (...e) => s(X).handleDeleteClick && s(X).handleDeleteClick(...e)
|
|
422
|
-
}, p(S.value.mediaLibrary.deleteSelected), 1)) : d("", !0), a.onSelect ? (r(), o("button", {
|
|
423
|
-
key: 1,
|
|
424
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
425
|
-
style: {
|
|
426
|
-
"background-color": "var(--tpl-primary)",
|
|
427
|
-
color: "var(--tpl-bg)"
|
|
428
|
-
},
|
|
429
|
-
disabled: !s(Y).previewItem.value,
|
|
430
|
-
onClick: Z
|
|
431
|
-
}, p(S.value.mediaLibrary.selectFile), 9, W)) : d("", !0)])])])
|
|
432
|
-
]));
|
|
433
|
-
}
|
|
434
|
-
}), K = (e, t, n) => {
|
|
435
|
-
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
436
|
-
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
437
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
438
|
-
});
|
|
439
|
-
}, q = ["en", "de"];
|
|
440
|
-
function J(e) {
|
|
441
|
-
return e.split("-")[0].toLowerCase();
|
|
442
|
-
}
|
|
443
|
-
async function Y(e) {
|
|
444
|
-
let t = J(e), n = q.includes(t) ? t : "en";
|
|
445
|
-
return (await K(/* @__PURE__ */ Object.assign({
|
|
446
|
-
"./locales/de.ts": () => import("./de-Ce-LbJ2J.js"),
|
|
447
|
-
"./locales/en.ts": () => import("./en-DiCWK5fG.js")
|
|
448
|
-
}), `./locales/${n}.ts`, 3)).default;
|
|
449
|
-
}
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region ../media-library/src/standalone/visual.ts
|
|
452
|
-
var X = null, Z = e(null);
|
|
453
|
-
async function We(e) {
|
|
454
|
-
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
455
|
-
if (!t) throw Error(`Container element not found: ${e.container}`);
|
|
456
|
-
let n = x(e.auth, e.onError);
|
|
457
|
-
await n.initialize();
|
|
458
|
-
let r = await new S(n).fetchConfig(), i = await Y(e.locale ?? "en");
|
|
459
|
-
return $(t, e.theme), X && Q(), new Promise((a, o) => {
|
|
460
|
-
try {
|
|
461
|
-
X = _({ setup() {
|
|
462
|
-
let o = () => {
|
|
463
|
-
a({
|
|
464
|
-
setTheme: (e) => $(t, e),
|
|
465
|
-
unmount: Q
|
|
466
|
-
});
|
|
467
|
-
};
|
|
468
|
-
return () => y(G, {
|
|
469
|
-
authManager: n,
|
|
470
|
-
projectId: n.projectId,
|
|
471
|
-
planConfig: r,
|
|
472
|
-
translations: i,
|
|
473
|
-
onSelect: e.onSelect,
|
|
474
|
-
onError: e.onError,
|
|
475
|
-
ref: Z,
|
|
476
|
-
onReady: o
|
|
477
|
-
});
|
|
478
|
-
} }), X.mount(t);
|
|
479
|
-
} catch (e) {
|
|
480
|
-
o(e);
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
function Q() {
|
|
485
|
-
X && (X.unmount(), X = null, Z.value = null);
|
|
486
|
-
}
|
|
487
|
-
function $(e, t) {
|
|
488
|
-
t && (t.primaryColor && e.style.setProperty("--tpl-primary", t.primaryColor), t.borderRadius !== void 0 && (e.style.setProperty("--tpl-radius", `${t.borderRadius}px`), e.style.setProperty("--tpl-radius-sm", `${Math.max(0, t.borderRadius - 3)}px`), e.style.setProperty("--tpl-radius-lg", `${t.borderRadius + 4}px`)));
|
|
489
|
-
}
|
|
490
|
-
typeof window < "u" && (window.TemplaticalMedia = {
|
|
491
|
-
init: We,
|
|
492
|
-
unmount: Q
|
|
493
|
-
});
|
|
494
|
-
//#endregion
|
|
495
|
-
export { N as MediaLibraryModal };
|
|
496
|
-
|
|
497
|
-
//# sourceMappingURL=src-CRaqN-p8.js.map
|