vlite3 1.4.14 → 1.4.16
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/CategoryManager/CategoryManager.vue2.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +2 -2
- package/components/ThemeProvider/ThemeProvider.vue.js +23 -28
- package/components/ThemeProvider/themeVars.d.ts +9 -13
- package/components/ThemeProvider/themeVars.js +5 -3
- package/package.json +1 -1
- /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./RichTextToolbar.
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./RichTextLinkPopover.
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { buildThemeVariables as
|
|
3
|
-
import { THEME_STYLES_KEY as
|
|
4
|
-
import { isDarkColor as
|
|
5
|
-
const P = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as m, computed as o, provide as u, openBlock as a, createElementBlock as v, normalizeClass as c, createBlock as f, resolveDynamicComponent as p, withCtx as h, createTextVNode as C, toDisplayString as b, renderSlot as g } from "vue";
|
|
2
|
+
import { buildThemeVariables as S, buildThemeStyleBlock as y, buildCardOverrideStyles as T } from "./themeVars.js";
|
|
3
|
+
import { THEME_STYLES_KEY as k } from "../../composables/useThemeStyles.js";
|
|
4
|
+
import { isDarkColor as B } from "../../utils/colorUtils.js";
|
|
5
|
+
const P = /* @__PURE__ */ m({
|
|
6
6
|
__name: "ThemeProvider",
|
|
7
7
|
props: {
|
|
8
8
|
bgColor: { default: void 0 },
|
|
@@ -14,36 +14,31 @@ const P = /* @__PURE__ */ p({
|
|
|
14
14
|
maxWidth: { default: void 0 },
|
|
15
15
|
rootClass: { default: void 0 }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const e =
|
|
19
|
-
() =>
|
|
20
|
-
),
|
|
21
|
-
() => e.bgColor ?
|
|
17
|
+
setup(t) {
|
|
18
|
+
const e = t, r = o(() => e.bgColor ? B(e.bgColor) : !1), l = o(() => S(e)), i = o(
|
|
19
|
+
() => y(l.value, ".vlite-theme-provider")
|
|
20
|
+
), d = o(
|
|
21
|
+
() => e.bgColor ? T(e.bgColor, r.value, ".vlite-theme-provider") : ""
|
|
22
|
+
), s = o(
|
|
23
|
+
() => [i.value, d.value].filter(Boolean).join(`
|
|
24
|
+
`)
|
|
22
25
|
);
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
class: S([
|
|
26
|
+
return u(k, l), (n, _) => (a(), v("div", {
|
|
27
|
+
class: c([
|
|
26
28
|
"vlite-theme-provider",
|
|
27
|
-
|
|
29
|
+
t.rootClass,
|
|
28
30
|
"transition-colors duration-300",
|
|
29
|
-
{ dark:
|
|
30
|
-
])
|
|
31
|
-
style: b(l.value)
|
|
31
|
+
{ dark: r.value }
|
|
32
|
+
])
|
|
32
33
|
}, [
|
|
33
|
-
(
|
|
34
|
-
default:
|
|
35
|
-
|
|
34
|
+
(a(), f(p("style"), null, {
|
|
35
|
+
default: h(() => [
|
|
36
|
+
C(b(s.value), 1)
|
|
36
37
|
]),
|
|
37
38
|
_: 1
|
|
38
39
|
})),
|
|
39
|
-
(
|
|
40
|
-
|
|
41
|
-
u(m(v.value), 1)
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
})),
|
|
45
|
-
g(f.$slots, "default")
|
|
46
|
-
], 6));
|
|
40
|
+
g(n.$slots, "default")
|
|
41
|
+
], 2));
|
|
47
42
|
}
|
|
48
43
|
});
|
|
49
44
|
export {
|
|
@@ -11,7 +11,7 @@ export declare const DEFAULT_MAX_WIDTH = 1440;
|
|
|
11
11
|
export declare function buildCardOverrideStyles(bg: string, isDark: boolean, scope?: string): string;
|
|
12
12
|
/**
|
|
13
13
|
* Build a `<style>` text block that re-applies every generated CSS custom
|
|
14
|
-
* property with `!important`, scoped to a
|
|
14
|
+
* property with `!important`, scoped to a provider root selector.
|
|
15
15
|
*
|
|
16
16
|
* Why this exists:
|
|
17
17
|
*
|
|
@@ -25,11 +25,9 @@ export declare function buildCardOverrideStyles(bg: string, isDark: boolean, sco
|
|
|
25
25
|
* `[data-theme="dark"]` block. That silently nukes the provider's
|
|
26
26
|
* inline values and the brand color disappears.
|
|
27
27
|
*
|
|
28
|
-
* The fix is a redundant layer that has the
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* can override the theme — not Tailwind defaults, not ERP global
|
|
32
|
-
* styles, not third-party stylesheets.
|
|
28
|
+
* The fix is a redundant layer that has the same behavior as
|
|
29
|
+
* `ShopThemeProvider`: a generated style rule that writes every
|
|
30
|
+
* theme token with `!important` on the provider root.
|
|
33
31
|
*
|
|
34
32
|
* Pure: no DOM, no Vue. Returns a CSS string ready to be dropped
|
|
35
33
|
* inside a `<component :is="'style'">{{ block }}</component>` block.
|
|
@@ -38,20 +36,18 @@ export declare function buildCardOverrideStyles(bg: string, isDark: boolean, sco
|
|
|
38
36
|
* provider root `font-size` that drives the same inherited base-size behavior
|
|
39
37
|
* as `ShopThemeProvider`.
|
|
40
38
|
*/
|
|
41
|
-
export declare function buildThemeStyleBlock(vars: ThemeStyles,
|
|
39
|
+
export declare function buildThemeStyleBlock(vars: ThemeStyles, selector?: string): string;
|
|
42
40
|
/**
|
|
43
|
-
* Note: We
|
|
44
|
-
* in the theme variables object, so that Vue inline bindings (`:style="themeStyles"`)
|
|
45
|
-
* would carry the `!important` flag.
|
|
41
|
+
* Note: We keep `!important` out of the theme variables object itself.
|
|
46
42
|
*
|
|
47
43
|
* However, Vue's DOM patching (`style.setProperty(key, value)`) strictly rejects
|
|
48
44
|
* the `value` argument if it contains `!important`. Thus, any inline style
|
|
49
45
|
* object with `!important` silently fails and drops the styles entirely in SPA
|
|
50
46
|
* environments.
|
|
51
47
|
*
|
|
52
|
-
* Therefore, we provide
|
|
53
|
-
* consumers, and rely
|
|
54
|
-
*
|
|
48
|
+
* Therefore, we provide raw variables (without `!important`) to `useThemeStyles()`
|
|
49
|
+
* consumers, and rely on the `<style>` block generated by `buildThemeStyleBlock`
|
|
50
|
+
* to enforce `!important` overrides across the application.
|
|
55
51
|
*/
|
|
56
52
|
/**
|
|
57
53
|
* Compute the full theme-styles record from a {@link ThemeProviderProps}.
|
|
@@ -345,15 +345,17 @@ ${l} .bg-card-light .bg-card-light .bg-card-light {
|
|
|
345
345
|
`;
|
|
346
346
|
}
|
|
347
347
|
const O = (r) => r.replace(/[{};]/g, "");
|
|
348
|
-
function U(r, o) {
|
|
348
|
+
function U(r, o = ".vlite-theme-provider") {
|
|
349
349
|
if (!o) return "";
|
|
350
350
|
const l = [];
|
|
351
351
|
for (const [e, f] of Object.entries(r)) {
|
|
352
352
|
if (!e.startsWith("--") && e !== "font-size") continue;
|
|
353
353
|
const c = O(f);
|
|
354
|
-
c && l.push(
|
|
354
|
+
c && l.push(
|
|
355
|
+
c.includes("!important") ? ` ${e}: ${c};` : ` ${e}: ${c} !important;`
|
|
356
|
+
);
|
|
355
357
|
}
|
|
356
|
-
return l.length === 0 ? "" :
|
|
358
|
+
return l.length === 0 ? "" : `${o} {
|
|
357
359
|
${l.join(`
|
|
358
360
|
`)}
|
|
359
361
|
}
|
package/package.json
CHANGED
/package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js}
RENAMED
|
File without changes
|
|
File without changes
|