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,68 +1,81 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
);
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
const t =
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
`link[rel="${
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
const f = "data-vlite3-seo", g = `script[type="application/ld+json"][${f}]`, d = () => typeof document < "u" && typeof document.head < "u", h = (i, o) => `${i}:${o}`, A = (i, o, s, t) => {
|
|
2
|
+
const r = `meta[${o}="${s}"]`, c = Array.from(i.head.querySelectorAll(r)), e = c.shift() ?? i.createElement("meta");
|
|
3
|
+
e.setAttribute(o, s), e.setAttribute(f, "meta"), e.setAttribute("content", t);
|
|
4
|
+
for (const n of c) n.remove();
|
|
5
|
+
return e.parentNode || i.head.appendChild(e), e;
|
|
6
|
+
}, u = (i, o, s) => {
|
|
7
|
+
const t = `meta[${o}="${s}"]`;
|
|
8
|
+
for (const r of i.head.querySelectorAll(t)) r.remove();
|
|
9
|
+
}, p = (i, o, s) => {
|
|
10
|
+
const t = Array.from(
|
|
11
|
+
i.head.querySelectorAll(`link[rel="${o}"]`)
|
|
12
|
+
), r = t.shift() ?? i.createElement("link");
|
|
13
|
+
r.setAttribute("rel", o), r.setAttribute(f, "link"), r.setAttribute("href", s);
|
|
14
|
+
for (const c of t) c.remove();
|
|
15
|
+
return r.parentNode || i.head.appendChild(r), r;
|
|
16
|
+
}, m = (i, o) => {
|
|
17
|
+
for (const s of i.head.querySelectorAll(`link[rel="${o}"]`))
|
|
18
|
+
s.remove();
|
|
19
|
+
}, w = (i) => {
|
|
20
|
+
const o = /* @__PURE__ */ new Set(), s = [];
|
|
21
|
+
return i.jsonLd.forEach((t, r) => {
|
|
22
|
+
try {
|
|
23
|
+
const c = typeof t["@id"] == "string" ? t["@id"] : "", e = c ? `id:${c}` : `index:${r}`;
|
|
24
|
+
let n = e, l = 1;
|
|
25
|
+
for (; o.has(n); )
|
|
26
|
+
n = `${e}:${l}`, l += 1;
|
|
27
|
+
o.add(n);
|
|
28
|
+
const a = JSON.stringify(t);
|
|
29
|
+
a && s.push({ key: n, value: a });
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}), s;
|
|
33
|
+
}, k = (i, o) => {
|
|
34
|
+
const s = Array.from(
|
|
35
|
+
i.head.querySelectorAll(g)
|
|
36
|
+
), t = /* @__PURE__ */ new Map();
|
|
37
|
+
for (const e of s) {
|
|
38
|
+
const n = e.getAttribute("data-vlite3-seo-key");
|
|
39
|
+
n && !t.has(n) && t.set(n, e);
|
|
40
|
+
}
|
|
41
|
+
const r = /* @__PURE__ */ new Set(), c = s.filter((e) => !e.hasAttribute("data-vlite3-seo-key"));
|
|
42
|
+
for (const e of w(o)) {
|
|
43
|
+
const n = t.get(e.key) ?? c.shift() ?? i.createElement("script");
|
|
44
|
+
n.setAttribute("type", "application/ld+json"), n.setAttribute(f, "json-ld"), n.setAttribute("data-vlite3-seo-key", e.key), n.textContent = e.value, n.parentNode || i.head.appendChild(n), r.add(n);
|
|
18
45
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const o = [], s = [];
|
|
46
|
+
for (const e of s)
|
|
47
|
+
r.has(e) || e.remove();
|
|
48
|
+
}, S = () => {
|
|
49
|
+
const i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
50
|
+
let s = null;
|
|
25
51
|
return {
|
|
26
|
-
apply(
|
|
27
|
-
if (!
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
52
|
+
apply(t) {
|
|
53
|
+
if (!d()) return;
|
|
54
|
+
const r = document;
|
|
55
|
+
s === null && (s = r.title);
|
|
56
|
+
const c = t.titleTemplate ? t.titleTemplate.includes("%s") ? t.titleTemplate.replace("%s", t.title) : `${t.title} · ${t.titleTemplate}` : t.title;
|
|
57
|
+
r.title = c;
|
|
58
|
+
const e = (n, l, a) => {
|
|
59
|
+
a ? (A(r, n, l, a), i.add(h(n, l))) : u(r, n, l);
|
|
32
60
|
};
|
|
33
|
-
|
|
34
|
-
let r = t.head.querySelector('link[rel="canonical"]');
|
|
35
|
-
r || (r = t.createElement("link"), r.setAttribute("rel", "canonical"), t.head.appendChild(r)), r.setAttribute("href", e.canonicalUrl), s.push({ rel: "canonical" });
|
|
36
|
-
} else
|
|
37
|
-
f(t, "canonical");
|
|
38
|
-
if (e.favicon && (g(t, "icon", e.favicon), s.push({ rel: "icon" })), e.jsonLd) {
|
|
39
|
-
let r = t.head.querySelector(
|
|
40
|
-
'script[type="application/ld+json"][data-vlite3-seo]'
|
|
41
|
-
);
|
|
42
|
-
r || (r = t.createElement("script"), r.setAttribute("type", "application/ld+json"), r.setAttribute("data-vlite3-seo", ""), t.head.appendChild(r)), r.textContent = JSON.stringify(e.jsonLd);
|
|
43
|
-
} else {
|
|
44
|
-
const r = t.head.querySelector(
|
|
45
|
-
'script[type="application/ld+json"][data-vlite3-seo]'
|
|
46
|
-
);
|
|
47
|
-
r && r.remove();
|
|
48
|
-
}
|
|
61
|
+
e("name", "description", t.description), e("name", "keywords", t.keywords), e("name", "robots", t.robots), e("property", "og:title", t.ogTitle), e("property", "og:description", t.ogDescription), e("property", "og:image", t.ogImage), e("property", "og:image:alt", t.ogImageAlt), e("property", "og:url", t.ogUrl), e("property", "og:type", t.ogType), e("property", "og:site_name", t.ogSiteName), e("property", "og:locale", t.ogLocale), e("name", "twitter:card", t.twitterCard), e("name", "twitter:title", t.twitterTitle), e("name", "twitter:description", t.twitterDescription), e("name", "twitter:image", t.twitterImage), e("name", "twitter:image:alt", t.twitterImageAlt), e("name", "twitter:site", t.twitterSite), e("name", "twitter:creator", t.twitterCreator), t.canonicalUrl ? (p(r, "canonical", t.canonicalUrl), o.add("canonical")) : m(r, "canonical"), t.favicon ? (p(r, "icon", t.favicon), o.add("icon")) : m(r, "icon"), k(r, t);
|
|
49
62
|
},
|
|
50
63
|
reset() {
|
|
51
|
-
if (!
|
|
52
|
-
const
|
|
53
|
-
for (const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
if (!d()) return;
|
|
65
|
+
const t = document;
|
|
66
|
+
for (const r of i) {
|
|
67
|
+
const c = r.indexOf(":"), e = r.slice(0, c);
|
|
68
|
+
u(t, e, r.slice(c + 1));
|
|
69
|
+
}
|
|
70
|
+
i.clear();
|
|
71
|
+
for (const r of o) m(t, r);
|
|
72
|
+
o.clear();
|
|
73
|
+
for (const r of t.head.querySelectorAll(g))
|
|
74
|
+
r.remove();
|
|
75
|
+
s !== null && (t.title = s), s = null;
|
|
63
76
|
}
|
|
64
77
|
};
|
|
65
78
|
};
|
|
66
79
|
export {
|
|
67
|
-
|
|
80
|
+
S as createDomSeoAdapter
|
|
68
81
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as SeoProvider } from './SeoProvider.vue';
|
|
2
|
-
export { normalizeSeo, noopSeoAdapter, replaceSeoTokens, type NormalizeSeoInput, type SeoReplacements, } from './normalizeSeo';
|
|
2
|
+
export { normalizeSeo, noopSeoAdapter, normalizeSeoJsonLd, normalizeSeoKeywords, normalizeSeoRobots, replaceSeoTokens, type NormalizeSeoInput, type SeoReplacements, } from './normalizeSeo';
|
|
3
3
|
export { createDomSeoAdapter } from './domAdapter';
|
|
4
|
-
export
|
|
4
|
+
export { htmlToPlainText, type HtmlToPlainTextOptions } from './plainText';
|
|
5
|
+
export { composeCanonicalUrl, composeSeoUrl, type ComposeSeoUrlOptions, type SeoUrlTrailingSlash, } from './seoUrl';
|
|
6
|
+
export * from './structuredData';
|
|
7
|
+
export type { SeoData, SeoPayload, SeoContextInput, SeoAdapter, SeoJsonLdInput, SeoKeywordsInput, SeoRobotsDirectives, SeoRobotsInput, } from './types';
|
|
@@ -1,61 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
* The two token replacement scopes. Global tokens are always
|
|
4
|
-
* applied (e.g. `{{storeName}}`); per-call tokens are supplied
|
|
5
|
-
* by the page (`useSeo({ replacements: { productName } })`).
|
|
6
|
-
*/
|
|
1
|
+
import { SeoStructuredData } from './structuredData';
|
|
2
|
+
import { SeoAdapter, SeoContextInput, SeoData, SeoJsonLdInput, SeoKeywordsInput, SeoPayload, SeoRobotsInput } from './types';
|
|
7
3
|
export type SeoReplacements = Record<string, string | number | null | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
* Replace `{{key}}` occurrences in `value` using the supplied
|
|
10
|
-
* replacements. Unknown / null / undefined keys collapse to an
|
|
11
|
-
* empty string (matches the existing `shop-data` behaviour so
|
|
12
|
-
* SEO strings with `{{productName}}` still resolve to a valid
|
|
13
|
-
* meta tag when the page is missing the data).
|
|
14
|
-
*/
|
|
15
4
|
export declare const replaceSeoTokens: (value: string | null | undefined, replacements?: SeoReplacements) => string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* `defaults` is the **store / site-level** baseline (logo,
|
|
20
|
-
* favicon, OG image, store name, …). `context` is the **page-
|
|
21
|
-
* level** overlay (`useSeo({ … })`). `resolveFallback` lets the
|
|
22
|
-
* caller plug in a domain-specific fallback (e.g. resolve
|
|
23
|
-
* `pagesSeo[pageType]` for the shop). `pageType` is the final
|
|
24
|
-
* string used in the payload (falls back to `'home'`).
|
|
25
|
-
*/
|
|
5
|
+
export declare const normalizeSeoKeywords: (value: SeoKeywordsInput | null | undefined, replacements?: SeoReplacements, sanitize?: boolean) => string;
|
|
6
|
+
export declare const normalizeSeoRobots: (value: SeoRobotsInput | null | undefined, replacements?: SeoReplacements) => string | null;
|
|
7
|
+
export declare const normalizeSeoJsonLd: (value: SeoJsonLdInput | null | undefined) => SeoStructuredData[];
|
|
26
8
|
export interface NormalizeSeoInput {
|
|
27
9
|
defaults?: Partial<SeoData> | null;
|
|
28
10
|
context?: SeoContextInput | null;
|
|
29
11
|
fallback?: Partial<SeoData> | null;
|
|
30
12
|
pageType?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Extra global replacements applied **before** per-context ones.
|
|
33
|
-
* Used by the shop layer to inject `{{storeName}}` automatically.
|
|
34
|
-
*/
|
|
35
13
|
globalReplacements?: SeoReplacements;
|
|
14
|
+
/** Sanitize textual fields after token replacement. */
|
|
15
|
+
sanitizeText?: boolean;
|
|
36
16
|
}
|
|
37
17
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* Precedence (highest wins):
|
|
41
|
-
*
|
|
42
|
-
* 1. `context.overrides` — raw, unrestricted fields from
|
|
43
|
-
* the page (`useSeo({ overrides })`).
|
|
44
|
-
* 2. `context.<field>` — per-page explicit value.
|
|
45
|
-
* 3. `fallback.<field>` — store / domain fallback
|
|
46
|
-
* (e.g. `pagesSeo[pageType]`).
|
|
47
|
-
* 4. `defaults.<field>` — site-level baseline (logo, OG
|
|
48
|
-
* image, site name, …).
|
|
49
|
-
*
|
|
50
|
-
* Empty strings are treated as "use the next layer", matching
|
|
51
|
-
* the existing `resolveStoreSeo` contract. `null` is treated as
|
|
52
|
-
* "explicitly clear" and forces `null` in the output. (Useful
|
|
53
|
-
* for `noindex` overrides etc.)
|
|
54
|
-
*/
|
|
55
|
-
export declare const normalizeSeo: ({ defaults, context, fallback, pageType, globalReplacements, }: NormalizeSeoInput) => SeoPayload;
|
|
56
|
-
/**
|
|
57
|
-
* No-op adapter. Useful as a fallback in tests / SSR-only
|
|
58
|
-
* contexts where SEO is already rendered by the host template
|
|
59
|
-
* and the generic provider should not touch the DOM.
|
|
18
|
+
* Precedence: context overrides → context fields → page fallback → defaults.
|
|
19
|
+
* Empty values fall through; `null` explicitly clears the inherited value.
|
|
60
20
|
*/
|
|
21
|
+
export declare const normalizeSeo: ({ defaults, context, fallback, pageType, globalReplacements, sanitizeText, }: NormalizeSeoInput) => SeoPayload;
|
|
61
22
|
export declare const noopSeoAdapter: SeoAdapter;
|