vlite3 1.4.30 → 1.4.32
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/components/Accordion/Accordion.vue.js +19 -16
- package/components/Accordion/AccordionContent.vue.js +2 -2
- package/components/Accordion/AccordionItem.vue.js +38 -36
- package/components/CategoryManager/CategoryManager.vue2.js +3 -2
- package/components/Chart/GanttChart.vue.d.ts +13 -1
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +1185 -607
- package/components/Chart/GanttChartDateUtils.d.ts +38 -0
- package/components/Chart/GanttChartDateUtils.js +79 -0
- package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
- package/components/Chart/GanttChartDependencyUtils.js +113 -0
- package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
- package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
- package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
- package/components/Chart/GanttChartTooltipUtils.js +63 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +76 -1
- package/components/Chart/types.js +8 -0
- package/components/FilePicker/FilePickerDropzone.vue.js +1 -1
- package/components/FilePicker/index.vue.js +2 -4
- package/components/Form/AccordionView.vue2.js +5 -2
- package/components/Form/AccordionView.vue3.js +250 -0
- package/components/Form/Form.vue.d.ts +0 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +415 -354
- package/components/Form/FormField.vue.js +175 -196
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +60 -60
- package/components/Form/FormSkeleton.vue.js +50 -35
- package/components/Form/TableView.vue.js +59 -43
- package/components/Form/composables/useForm.js +159 -148
- package/components/Form/index.vue2.js +8 -8
- package/components/Form/utils/form.utils.d.ts +2 -0
- package/components/Form/utils/form.utils.js +17 -13
- package/components/GoogleMap.vue.d.ts +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
- package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
- package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
- package/components/PanZoomViewport/index.d.ts +2 -0
- package/components/PanZoomViewport/types.d.ts +121 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
- package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
- package/components/ScaleGenerator/types.d.ts +2 -0
- package/components/Screen/ScreenFilter.vue.js +18 -17
- package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
- package/components/SeoProvider/SeoProvider.vue.js +39 -33
- package/components/SeoProvider/domAdapter.d.ts +1 -4
- package/components/SeoProvider/domAdapter.js +71 -58
- package/components/SeoProvider/index.d.ts +5 -2
- package/components/SeoProvider/normalizeSeo.d.ts +10 -49
- package/components/SeoProvider/normalizeSeo.js +246 -182
- package/components/SeoProvider/plainText.d.ts +8 -0
- package/components/SeoProvider/plainText.js +117 -0
- package/components/SeoProvider/seoUrl.d.ts +13 -0
- package/components/SeoProvider/seoUrl.js +25 -0
- package/components/SeoProvider/structuredData.d.ts +100 -0
- package/components/SeoProvider/structuredData.js +33 -0
- package/components/SeoProvider/types.d.ts +47 -109
- package/components/Tabes/Tabes.vue.d.ts +10 -1
- package/components/Tabes/Tabes.vue.js +1 -1
- package/components/Tabes/Tabes.vue2.js +271 -170
- package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
- package/components/Tabes/TabesMarkerGeometry.js +21 -0
- package/components/Tabes/tabes.utils.d.ts +14 -0
- package/components/Tabes/tabes.utils.js +26 -0
- package/components/Tabes/types.d.ts +32 -0
- package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
- package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
- package/components/ThemeProvider/index.d.ts +1 -1
- package/components/ThemeProvider/themeVars.d.ts +9 -13
- package/components/ThemeProvider/themeVars.js +173 -125
- package/components/ThemeProvider/types.d.ts +10 -0
- package/components/index.d.ts +2 -1
- package/index.d.ts +1 -0
- package/index.js +415 -387
- package/package.json +3 -2
- package/style.css +1 -1
- package/components/Form/AccordionView.vue.js +0 -222
|
@@ -1,110 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
enabled: { type: Boolean, default: void 0 },
|
|
6
|
-
targetWidth: { default: void 0 },
|
|
7
|
-
maxWidth: { default: void 0 },
|
|
8
|
-
minScale: { default: 0.25 },
|
|
9
|
-
maxScale: { default: 1 },
|
|
10
|
-
scale: { default: null },
|
|
11
|
-
isEditMode: { type: Boolean, default: !1 },
|
|
12
|
-
horizontalAlign: { default: "center" },
|
|
13
|
-
contentClass: { default: "" }
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:scale", "update:containerWidth"],
|
|
16
|
-
setup(v, { emit: b }) {
|
|
17
|
-
const e = v, c = b, o = n(null), r = n(null), a = n(1), m = n(0), h = n(0);
|
|
18
|
-
let u = null, d = null;
|
|
19
|
-
const f = l(() => e.enabled ?? !!e.isEditMode), i = l(
|
|
20
|
-
() => Math.max(1, e.targetWidth ?? e.maxWidth ?? 1440)
|
|
21
|
-
), g = (t) => Math.min(e.maxScale, Math.max(e.minScale, t)), p = () => {
|
|
22
|
-
h.value = r.value?.scrollHeight ?? 0;
|
|
23
|
-
}, y = () => {
|
|
24
|
-
const t = o.value?.clientWidth ?? i.value;
|
|
25
|
-
if (m.value = t, c("update:containerWidth", t), !f.value) {
|
|
26
|
-
a.value = 1, p(), c("update:scale", 1);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const W = typeof e.scale == "number" ? g(e.scale) : g(t / i.value);
|
|
30
|
-
a.value = Number(W.toFixed(4)), p(), c("update:scale", a.value);
|
|
31
|
-
}, s = async () => {
|
|
32
|
-
await $(), y();
|
|
33
|
-
};
|
|
34
|
-
O(() => {
|
|
35
|
-
s(), !(typeof ResizeObserver > "u") && (u = new ResizeObserver(() => {
|
|
36
|
-
s();
|
|
37
|
-
}), d = new ResizeObserver(() => {
|
|
38
|
-
s();
|
|
39
|
-
}), o.value && u.observe(o.value), r.value && d.observe(r.value));
|
|
40
|
-
}), M(() => {
|
|
41
|
-
u?.disconnect(), d?.disconnect();
|
|
42
|
-
}), B(
|
|
43
|
-
() => [
|
|
44
|
-
e.enabled,
|
|
45
|
-
e.isEditMode,
|
|
46
|
-
e.targetWidth,
|
|
47
|
-
e.maxWidth,
|
|
48
|
-
e.minScale,
|
|
49
|
-
e.maxScale,
|
|
50
|
-
e.scale,
|
|
51
|
-
e.horizontalAlign
|
|
52
|
-
],
|
|
53
|
-
() => {
|
|
54
|
-
s();
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
const x = l(() => {
|
|
58
|
-
const t = e.horizontalAlign ?? "center";
|
|
59
|
-
return t === "left" ? {
|
|
60
|
-
marginLeft: "0",
|
|
61
|
-
marginRight: "auto",
|
|
62
|
-
transformOrigin: "top left"
|
|
63
|
-
} : t === "right" ? {
|
|
64
|
-
marginLeft: "auto",
|
|
65
|
-
marginRight: "0",
|
|
66
|
-
transformOrigin: "top right"
|
|
67
|
-
} : {
|
|
68
|
-
marginLeft: "auto",
|
|
69
|
-
marginRight: "auto",
|
|
70
|
-
transformOrigin: "top center"
|
|
71
|
-
};
|
|
72
|
-
}), R = l(() => {
|
|
73
|
-
if (!f.value) return;
|
|
74
|
-
const t = h.value * a.value;
|
|
75
|
-
return {
|
|
76
|
-
height: t > 0 ? `${t}px` : void 0
|
|
77
|
-
};
|
|
78
|
-
}), z = l(() => f.value ? {
|
|
79
|
-
width: `${i.value}px`,
|
|
80
|
-
transform: a.value !== 1 ? `scale(${a.value})` : "none",
|
|
81
|
-
...x.value
|
|
82
|
-
} : {
|
|
83
|
-
maxWidth: e.maxWidth ? `${e.maxWidth}px` : void 0,
|
|
84
|
-
width: "100%",
|
|
85
|
-
...x.value
|
|
86
|
-
});
|
|
87
|
-
return (t, W) => (E(), k("div", {
|
|
88
|
-
ref_key: "frameRef",
|
|
89
|
-
ref: o,
|
|
90
|
-
class: "vlite-scale-generator-frame relative w-full overflow-hidden",
|
|
91
|
-
style: S(R.value)
|
|
92
|
-
}, [
|
|
93
|
-
C("div", {
|
|
94
|
-
ref_key: "contentRef",
|
|
95
|
-
ref: r,
|
|
96
|
-
class: L(["vlite-scale-generator-content transition-transform duration-150 ease-out", v.contentClass]),
|
|
97
|
-
style: S(z.value)
|
|
98
|
-
}, [
|
|
99
|
-
_(t.$slots, "default", {
|
|
100
|
-
scale: a.value,
|
|
101
|
-
containerWidth: m.value,
|
|
102
|
-
targetWidth: i.value
|
|
103
|
-
})
|
|
104
|
-
], 6)
|
|
105
|
-
], 4));
|
|
106
|
-
}
|
|
107
|
-
});
|
|
1
|
+
import e from "./ScaleGenerator.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-eec3ef03"]]);
|
|
108
5
|
export {
|
|
109
|
-
|
|
6
|
+
c as default
|
|
110
7
|
};
|
|
@@ -1,4 +1,145 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as I, ref as r, computed as l, onMounted as T, onBeforeUnmount as j, watch as G, openBlock as Q, createElementBlock as U, normalizeStyle as k, createElementVNode as V, normalizeClass as D, renderSlot as J, nextTick as K } from "vue";
|
|
2
|
+
const X = /* @__PURE__ */ I({
|
|
3
|
+
__name: "ScaleGenerator",
|
|
4
|
+
props: {
|
|
5
|
+
enabled: { type: Boolean, default: void 0 },
|
|
6
|
+
targetWidth: { default: void 0 },
|
|
7
|
+
maxWidth: { default: void 0 },
|
|
8
|
+
minScale: { default: 0.25 },
|
|
9
|
+
maxScale: { default: 1 },
|
|
10
|
+
scale: { default: null },
|
|
11
|
+
isEditMode: { type: Boolean, default: !1 },
|
|
12
|
+
horizontalAlign: { default: "center" },
|
|
13
|
+
contentClass: { default: "" }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:scale", "update:containerWidth", "update:ready"],
|
|
16
|
+
setup(O, { emit: _ }) {
|
|
17
|
+
const t = O, o = _, u = r(null), f = r(null), i = r(1), s = r(0), c = r(0), n = r(!1);
|
|
18
|
+
let v = null, m = 0, g = 0, d = !1;
|
|
19
|
+
const B = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, p = l(() => t.enabled ?? !!t.isEditMode), y = l(
|
|
20
|
+
() => Math.max(1, t.targetWidth ?? t.maxWidth ?? 1440)
|
|
21
|
+
), E = l(() => [
|
|
22
|
+
"vlite-scale-generator-content",
|
|
23
|
+
n.value && !B ? "transition-transform duration-150 ease-out" : "",
|
|
24
|
+
t.contentClass
|
|
25
|
+
]), w = (e) => Math.min(t.maxScale, Math.max(t.minScale, e)), W = () => {
|
|
26
|
+
n.value || (n.value = !0, o("update:ready", !0));
|
|
27
|
+
}, L = (e) => {
|
|
28
|
+
if (!n.value) {
|
|
29
|
+
if (typeof window > "u") {
|
|
30
|
+
W();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
34
|
+
m = 0;
|
|
35
|
+
const a = u.value?.clientWidth ?? 0;
|
|
36
|
+
if (!(a <= 0)) {
|
|
37
|
+
if (a !== e) {
|
|
38
|
+
h();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
W();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, h = () => {
|
|
46
|
+
const e = u.value?.clientWidth ?? 0, a = f.value?.scrollHeight ?? 0;
|
|
47
|
+
if (!p.value) {
|
|
48
|
+
const A = s.value !== e, M = c.value !== a, z = i.value !== 1;
|
|
49
|
+
if (!A && !M && !z && n.value) return;
|
|
50
|
+
A && (s.value = e, o("update:containerWidth", e)), z && (i.value = 1, o("update:scale", 1)), M && (c.value = a), W();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (e <= 0) return;
|
|
54
|
+
const N = typeof t.scale == "number" ? w(t.scale) : w(e / y.value), x = Number(N.toFixed(4)), b = s.value !== e, C = i.value !== x, F = c.value !== a;
|
|
55
|
+
!b && !C && !F && n.value || (b && (s.value = e, o("update:containerWidth", e)), C && (i.value = x, o("update:scale", x)), F && (c.value = a), L(e));
|
|
56
|
+
}, S = async () => {
|
|
57
|
+
await K(), h();
|
|
58
|
+
}, $ = () => {
|
|
59
|
+
if (!d) {
|
|
60
|
+
if (d = !0, typeof window > "u") {
|
|
61
|
+
d = !1, h();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
65
|
+
d = !1, h();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
T(() => {
|
|
70
|
+
S(), !(typeof ResizeObserver > "u") && (v = new ResizeObserver($), u.value && v.observe(u.value), f.value && v.observe(f.value));
|
|
71
|
+
}), j(() => {
|
|
72
|
+
cancelAnimationFrame(m), cancelAnimationFrame(g), d = !1, v?.disconnect();
|
|
73
|
+
}), G(
|
|
74
|
+
() => [
|
|
75
|
+
t.enabled,
|
|
76
|
+
t.isEditMode,
|
|
77
|
+
t.targetWidth,
|
|
78
|
+
t.maxWidth,
|
|
79
|
+
t.minScale,
|
|
80
|
+
t.maxScale,
|
|
81
|
+
t.scale
|
|
82
|
+
],
|
|
83
|
+
() => {
|
|
84
|
+
S();
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
const R = l(() => {
|
|
88
|
+
const e = t.horizontalAlign ?? "center";
|
|
89
|
+
return e === "left" ? {
|
|
90
|
+
marginLeft: "0",
|
|
91
|
+
marginRight: "auto",
|
|
92
|
+
transformOrigin: "top left"
|
|
93
|
+
} : e === "right" ? {
|
|
94
|
+
marginLeft: "auto",
|
|
95
|
+
marginRight: "0",
|
|
96
|
+
transformOrigin: "top right"
|
|
97
|
+
} : {
|
|
98
|
+
marginLeft: "auto",
|
|
99
|
+
marginRight: "auto",
|
|
100
|
+
transformOrigin: "top center"
|
|
101
|
+
};
|
|
102
|
+
}), H = l(() => {
|
|
103
|
+
const e = {};
|
|
104
|
+
if (p.value) {
|
|
105
|
+
const a = c.value * i.value;
|
|
106
|
+
(a > 0 || !n.value) && (e.height = `${a}px`);
|
|
107
|
+
}
|
|
108
|
+
return n.value || (e.visibility = "hidden"), Object.keys(e).length ? e : void 0;
|
|
109
|
+
}), q = l(() => p.value ? {
|
|
110
|
+
width: `${y.value}px`,
|
|
111
|
+
transform: i.value !== 1 ? `scale(${i.value})` : "none",
|
|
112
|
+
// This inline guard wins over transition utilities supplied through
|
|
113
|
+
// contentClass. It is removed only after the fitted transform is committed.
|
|
114
|
+
transition: n.value ? void 0 : "none",
|
|
115
|
+
...R.value
|
|
116
|
+
} : {
|
|
117
|
+
maxWidth: t.maxWidth ? `${t.maxWidth}px` : void 0,
|
|
118
|
+
width: "100%",
|
|
119
|
+
...R.value
|
|
120
|
+
});
|
|
121
|
+
return (e, a) => (Q(), U("div", {
|
|
122
|
+
ref_key: "frameRef",
|
|
123
|
+
ref: u,
|
|
124
|
+
class: "vlite-scale-generator-frame relative w-full overflow-clip",
|
|
125
|
+
style: k(H.value)
|
|
126
|
+
}, [
|
|
127
|
+
V("div", {
|
|
128
|
+
ref_key: "contentRef",
|
|
129
|
+
ref: f,
|
|
130
|
+
class: D(E.value),
|
|
131
|
+
style: k(q.value)
|
|
132
|
+
}, [
|
|
133
|
+
J(e.$slots, "default", {
|
|
134
|
+
scale: i.value,
|
|
135
|
+
containerWidth: s.value,
|
|
136
|
+
targetWidth: y.value,
|
|
137
|
+
ready: n.value
|
|
138
|
+
}, void 0, !0)
|
|
139
|
+
], 6)
|
|
140
|
+
], 4));
|
|
141
|
+
}
|
|
142
|
+
});
|
|
2
143
|
export {
|
|
3
|
-
|
|
144
|
+
X as default
|
|
4
145
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as M, computed as d, openBlock as
|
|
1
|
+
import { defineComponent as B, ref as M, computed as d, openBlock as o, createBlock as n, withCtx as s, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
|
|
2
2
|
import f from "../Button.vue.js";
|
|
3
3
|
import j from "../Modal.vue.js";
|
|
4
4
|
import z from "../Dropdown/Dropdown.vue.js";
|
|
@@ -20,6 +20,7 @@ import "@vueuse/core";
|
|
|
20
20
|
import "iconify-icon-picker";
|
|
21
21
|
import "iconify-icon-picker/style.css";
|
|
22
22
|
/* empty css */
|
|
23
|
+
/* empty css */
|
|
23
24
|
/* empty css */
|
|
24
25
|
/* empty css */
|
|
25
26
|
/* empty css */
|
|
@@ -30,7 +31,7 @@ import "../../core/config.js";
|
|
|
30
31
|
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
31
32
|
class: "pt-2 px-2 min-w-[295px]",
|
|
32
33
|
style: { "will-change": "transform", contain: "layout style" }
|
|
33
|
-
},
|
|
34
|
+
}, pe = /* @__PURE__ */ B({
|
|
34
35
|
__name: "ScreenFilter",
|
|
35
36
|
props: {
|
|
36
37
|
schema: {},
|
|
@@ -55,21 +56,21 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
55
56
|
const e = y("vlite.screen.filter");
|
|
56
57
|
return e !== "vlite.screen.filter" ? e : "Filter";
|
|
57
58
|
});
|
|
58
|
-
return (e, t) => i.type === "modal" ? (
|
|
59
|
+
return (e, t) => i.type === "modal" ? (o(), n(j, {
|
|
59
60
|
key: 0,
|
|
60
61
|
title: g.value,
|
|
61
62
|
show: r.value,
|
|
62
63
|
"onUpdate:show": t[3] || (t[3] = (u) => r.value = u),
|
|
63
64
|
"max-width": "sm:max-w-md"
|
|
64
65
|
}, {
|
|
65
|
-
trigger:
|
|
66
|
-
p.value > 0 ? (
|
|
66
|
+
trigger: s(() => [
|
|
67
|
+
p.value > 0 ? (o(), n(f, {
|
|
67
68
|
key: 0,
|
|
68
69
|
variant: "secondary",
|
|
69
70
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
70
71
|
onClick: t[0] || (t[0] = (u) => r.value = !0)
|
|
71
72
|
}, {
|
|
72
|
-
default:
|
|
73
|
+
default: s(() => [
|
|
73
74
|
a(h, {
|
|
74
75
|
icon: "ci:filter",
|
|
75
76
|
class: "w-4 h-4"
|
|
@@ -86,7 +87,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
86
87
|
])
|
|
87
88
|
]),
|
|
88
89
|
_: 1
|
|
89
|
-
})) : (
|
|
90
|
+
})) : (o(), n(f, {
|
|
90
91
|
key: 1,
|
|
91
92
|
variant: "outline",
|
|
92
93
|
onClick: t[2] || (t[2] = (u) => r.value = !0),
|
|
@@ -95,9 +96,9 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
95
96
|
asIcon: "",
|
|
96
97
|
class: "shrink-0 h-9! w-9!"
|
|
97
98
|
}, {
|
|
98
|
-
default:
|
|
99
|
+
default: s(() => [
|
|
99
100
|
l("div", N, [
|
|
100
|
-
t[1] || (C(-1, !0), (t[1] = (
|
|
101
|
+
t[1] || (C(-1, !0), (t[1] = (o(), S("svg", {
|
|
101
102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
102
103
|
width: "1.132em",
|
|
103
104
|
height: "1.132em",
|
|
@@ -117,7 +118,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
117
118
|
_: 1
|
|
118
119
|
}, 8, ["title"]))
|
|
119
120
|
]),
|
|
120
|
-
default:
|
|
121
|
+
default: s(() => [
|
|
121
122
|
l("div", A, [
|
|
122
123
|
a(w(O), {
|
|
123
124
|
schema: i.schema,
|
|
@@ -128,7 +129,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
128
129
|
])
|
|
129
130
|
]),
|
|
130
131
|
_: 1
|
|
131
|
-
}, 8, ["title", "show"])) : (
|
|
132
|
+
}, 8, ["title", "show"])) : (o(), n(w(z), {
|
|
132
133
|
key: 1,
|
|
133
134
|
isOpen: r.value,
|
|
134
135
|
"onUpdate:isOpen": t[4] || (t[4] = (u) => r.value = u),
|
|
@@ -138,14 +139,14 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
138
139
|
"class-name": "pb-0! always-scroll",
|
|
139
140
|
class: "w-auto"
|
|
140
141
|
}, {
|
|
141
|
-
trigger:
|
|
142
|
-
p.value > 0 ? (
|
|
142
|
+
trigger: s(() => [
|
|
143
|
+
p.value > 0 ? (o(), n(f, {
|
|
143
144
|
key: 0,
|
|
144
145
|
variant: "secondary",
|
|
145
146
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
|
|
146
147
|
style: { "pointer-events": "auto" }
|
|
147
148
|
}, {
|
|
148
|
-
default:
|
|
149
|
+
default: s(() => [
|
|
149
150
|
a(h, {
|
|
150
151
|
icon: "ci:filter",
|
|
151
152
|
class: "w-4 h-4"
|
|
@@ -162,7 +163,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
162
163
|
])
|
|
163
164
|
]),
|
|
164
165
|
_: 1
|
|
165
|
-
})) : (
|
|
166
|
+
})) : (o(), n(f, {
|
|
166
167
|
key: 1,
|
|
167
168
|
variant: "outline",
|
|
168
169
|
icon: "hugeicons:filter-add",
|
|
@@ -171,7 +172,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
171
172
|
class: "shrink-0 h-9! w-9!"
|
|
172
173
|
}, null, 8, ["title"]))
|
|
173
174
|
]),
|
|
174
|
-
default:
|
|
175
|
+
default: s(() => [
|
|
175
176
|
l("div", E, [
|
|
176
177
|
a(w(O), {
|
|
177
178
|
schema: i.schema,
|
|
@@ -193,5 +194,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
193
194
|
}
|
|
194
195
|
});
|
|
195
196
|
export {
|
|
196
|
-
|
|
197
|
+
pe as default
|
|
197
198
|
};
|
|
@@ -25,6 +25,8 @@ type __VLS_Props = {
|
|
|
25
25
|
* The shop uses this to inject `{{storeName}}` once.
|
|
26
26
|
*/
|
|
27
27
|
globalReplacements?: Record<string, string | number | null | undefined>;
|
|
28
|
+
/** Sanitize resolved textual fields after token replacement. */
|
|
29
|
+
sanitizeText?: boolean;
|
|
28
30
|
/**
|
|
29
31
|
* The actual emitter. Defaults to the DOM adapter so
|
|
30
32
|
* non-Nuxt hosts get a working document head out of the
|
|
@@ -55,8 +57,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
55
57
|
onUpdate?: (payload: SeoPayload) => any;
|
|
56
58
|
}>, {
|
|
57
59
|
fallback: Partial<SeoData> | null;
|
|
58
|
-
defaults: Partial<SeoData> | null;
|
|
59
60
|
pageType: string;
|
|
61
|
+
sanitizeText: boolean;
|
|
62
|
+
defaults: Partial<SeoData> | null;
|
|
60
63
|
globalReplacements: Record<string, string | number | null | undefined>;
|
|
61
64
|
adapter: SeoAdapter | null;
|
|
62
65
|
pageFallbacks: Record<string, Partial<SeoData>> | null;
|
|
@@ -1,52 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { normalizeSeo as
|
|
3
|
-
import { createDomSeoAdapter as
|
|
4
|
-
import { SEO_CONTEXT_KEY as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as k, ref as x, provide as _, computed as o, watch as F, onBeforeUnmount as h, renderSlot as S } from "vue";
|
|
2
|
+
import { normalizeSeo as z } from "./normalizeSeo.js";
|
|
3
|
+
import { createDomSeoAdapter as A } from "./domAdapter.js";
|
|
4
|
+
import { SEO_CONTEXT_KEY as B } from "../../composables/useSeo.js";
|
|
5
|
+
const R = /* @__PURE__ */ k({
|
|
6
6
|
__name: "SeoProvider",
|
|
7
7
|
props: {
|
|
8
8
|
defaults: { default: null },
|
|
9
9
|
fallback: { default: null },
|
|
10
10
|
pageType: { default: void 0 },
|
|
11
11
|
globalReplacements: { default: void 0 },
|
|
12
|
+
sanitizeText: { type: Boolean, default: !1 },
|
|
12
13
|
adapter: { default: null },
|
|
13
14
|
pageFallbacks: { default: null }
|
|
14
15
|
},
|
|
15
16
|
emits: ["update"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
for (const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
setup(c, { emit: f }) {
|
|
18
|
+
const a = c, i = f, n = x(/* @__PURE__ */ new Map());
|
|
19
|
+
_(B, n);
|
|
20
|
+
const s = o(() => a.adapter ?? A()), r = o(() => {
|
|
21
|
+
const e = Array.from(n.value.values());
|
|
22
|
+
if (e.length === 0) return null;
|
|
23
|
+
const t = {}, l = t;
|
|
24
|
+
for (const y of e) {
|
|
25
|
+
const { replacements: p, overrides: d, ...b } = y;
|
|
26
|
+
for (const [T, u] of Object.entries(b))
|
|
27
|
+
u !== void 0 && (l[T] = u);
|
|
28
|
+
d && (t.overrides = { ...t.overrides ?? {}, ...d }), p && (t.replacements = { ...t.replacements ?? {}, ...p });
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
}), m = o(() => {
|
|
32
|
+
const e = r.value?.pageType ?? a.pageType ?? "home";
|
|
33
|
+
return a.pageFallbacks && a.pageFallbacks[e] ? a.pageFallbacks[e] : a.fallback ?? null;
|
|
34
|
+
}), v = o(
|
|
35
|
+
() => r.value?.pageType ?? a.pageType ?? "home"
|
|
36
|
+
), g = o(() => {
|
|
37
|
+
const e = {
|
|
38
|
+
defaults: a.defaults,
|
|
34
39
|
context: r.value,
|
|
35
|
-
fallback:
|
|
36
|
-
pageType:
|
|
37
|
-
globalReplacements:
|
|
40
|
+
fallback: m.value,
|
|
41
|
+
pageType: v.value,
|
|
42
|
+
globalReplacements: a.globalReplacements,
|
|
43
|
+
sanitizeText: a.sanitizeText
|
|
38
44
|
};
|
|
39
|
-
return
|
|
45
|
+
return z(e);
|
|
40
46
|
});
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
(t) => {
|
|
44
|
-
|
|
47
|
+
return F(
|
|
48
|
+
() => ({ adapter: s.value, payload: g.value }),
|
|
49
|
+
({ adapter: e, payload: t }, l) => {
|
|
50
|
+
l?.adapter && l.adapter !== e && l.adapter.reset?.(), e.apply(t), i("update", t);
|
|
45
51
|
},
|
|
46
52
|
{ immediate: !0, deep: !0 }
|
|
47
|
-
), (
|
|
53
|
+
), h(() => s.value.reset?.()), (e, t) => S(e.$slots, "default");
|
|
48
54
|
}
|
|
49
55
|
});
|
|
50
56
|
export {
|
|
51
|
-
|
|
57
|
+
R as default
|
|
52
58
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { SeoAdapter } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Build a DOM-mutating `SeoAdapter`. Idempotent — repeated
|
|
4
|
-
* calls just refresh the same set of tags.
|
|
5
|
-
*/
|
|
2
|
+
/** Default idempotent DOM adapter for client-rendered applications. */
|
|
6
3
|
export declare const createDomSeoAdapter: () => SeoAdapter;
|