@venix-sistemas/jade 1.0.1 → 1.2.0
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 +350 -254
- package/dist/module.json +1 -1
- package/dist/module.mjs +32 -35
- package/dist/runtime/components/VenixThemeSwitcher.d.vue.ts +1 -1
- package/dist/runtime/components/VenixThemeSwitcher.vue +242 -99
- package/dist/runtime/components/VenixThemeSwitcher.vue.d.ts +1 -1
- package/dist/runtime/composables/useThemeColors.d.ts +6 -0
- package/dist/runtime/composables/useThemeColors.js +24 -9
- package/dist/runtime/composables/useThemeCookies.d.ts +9 -2
- package/dist/runtime/composables/useThemeCookies.js +24 -6
- package/dist/runtime/composables/useThemeLocale.d.ts +5 -0
- package/dist/runtime/composables/useThemeLocale.js +12 -18
- package/dist/runtime/composables/useThemeSeasonal.d.ts +2 -2
- package/dist/runtime/composables/useThemeSeasonal.js +1 -1
- package/dist/runtime/composables/useVenixTheme.d.ts +20 -0
- package/dist/runtime/composables/useVenixTheme.js +174 -112
- package/dist/runtime/nitro/theme-init.js +8 -5
- package/dist/runtime/plugins/theme-init.server.js +7 -12
- package/dist/runtime/plugins/vuetify-theme.js +8 -11
- package/dist/runtime/scripts/theme-init.d.ts +23 -10
- package/dist/runtime/scripts/theme-init.js +42 -62
- package/dist/shared/constants.d.ts +18 -3
- package/dist/shared/constants.js +6 -1
- package/dist/shared/css/colors.js +2 -2
- package/dist/shared/css/cursor.js +9 -2
- package/dist/shared/css/index.d.ts +1 -7
- package/dist/shared/css/index.js +9 -9
- package/dist/shared/css/transition.d.ts +1 -1
- package/dist/shared/theme.json +302 -192
- package/dist/shared/types/color-options.d.ts +26 -2
- package/dist/shared/types/colors.d.ts +64 -7
- package/dist/shared/types/index.d.ts +1 -1
- package/dist/shared/types/runtime-config.d.ts +4 -2
- package/dist/shared/utils/icon-refs.d.ts +7 -3
- package/dist/shared/utils/icon-refs.js +1 -1
- package/dist/shared/utils/icon.d.ts +6 -2
- package/dist/shared/utils/icon.js +8 -3
- package/dist/shared/utils/index.d.ts +5 -3
- package/dist/shared/utils/index.js +12 -5
- package/dist/shared/utils/inline-script.d.ts +6 -0
- package/dist/shared/utils/inline-script.js +3 -0
- package/dist/shared/utils/load.d.ts +0 -1
- package/dist/shared/utils/load.js +7 -16
- package/dist/shared/utils/merge-themes.d.ts +41 -0
- package/dist/shared/utils/merge-themes.js +106 -0
- package/dist/shared/utils/normalize.d.ts +0 -10
- package/dist/shared/utils/normalize.js +0 -12
- package/dist/shared/utils/theme-config.d.ts +13 -4
- package/dist/shared/utils/theme-config.js +28 -13
- package/dist/shared/utils/theme-resolve.d.ts +19 -19
- package/dist/shared/utils/theme-resolve.js +25 -42
- package/dist/shared/utils/theme-resolver.d.ts +46 -0
- package/dist/shared/utils/theme-resolver.js +139 -0
- package/package.json +13 -10
- package/README-default.md +0 -84
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -3
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import type { ThemeConfig } from '../../shared/types/index.js';
|
|
2
|
+
import type { ThemeResolver } from '../../shared/utils/theme-resolver.js';
|
|
2
3
|
declare global {
|
|
3
4
|
interface Window {
|
|
4
5
|
__VENIX_INITIAL_THEME__?: string;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
8
|
+
export interface InitThemeOptions {
|
|
9
|
+
/** See `color.requireConsent` — when `false`, the theme cookies are always written. */
|
|
10
|
+
requireConsent: boolean;
|
|
11
|
+
cookies: {
|
|
12
|
+
preference: string;
|
|
13
|
+
mode: string;
|
|
14
|
+
resolved: string;
|
|
15
|
+
};
|
|
16
|
+
/** In seconds. */
|
|
17
|
+
cookieMaxAge: number;
|
|
18
|
+
consentStorageKey: string;
|
|
19
|
+
}
|
|
7
20
|
/**
|
|
8
21
|
* Runs as an inline script in `<head>`, injected via Nitro's `render:html`
|
|
9
22
|
* hook by the `runtime/nitro/theme-init.ts` plugin (see
|
|
10
23
|
* `setup/register-plugins.ts`) — BEFORE the Vue bundle, to avoid a
|
|
11
24
|
* wrong-theme flash before hydration (SSR doesn't know the user's real
|
|
12
|
-
* light/dark preference when the
|
|
25
|
+
* light/dark preference when the mode is 'system', nor does it have
|
|
13
26
|
* `matchMedia`).
|
|
14
27
|
*
|
|
15
28
|
* Because it runs this way, this function (only this function — the rest of
|
|
16
29
|
* the file, including the type imports, is erased by TypeScript and never
|
|
17
30
|
* reaches the browser) has to be 100% self-contained: `initTheme.toString()`
|
|
18
|
-
* gets serialized and executed as a standalone IIFE, so
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* and the SSR plugin, lives in `shared/constants.ts` and
|
|
24
|
-
* `shared/utils/theme-resolve.ts`. Keep the two sides in sync when changing
|
|
25
|
-
* either one.
|
|
31
|
+
* gets serialized and executed as a standalone IIFE, so anything from another
|
|
32
|
+
* module would be a `ReferenceError` on the client. Everything it needs comes
|
|
33
|
+
* in as arguments instead: the theme-resolution rule as the (equally
|
|
34
|
+
* self-contained) `createThemeResolver` factory, and the cookie names and
|
|
35
|
+
* settings from `shared/constants.ts` in `options`.
|
|
26
36
|
*/
|
|
27
|
-
export default function initTheme(themeData: ThemeConfig): void;
|
|
37
|
+
export default function initTheme(createThemeResolver: () => ThemeResolver, themeData: ThemeConfig, options: InitThemeOptions): void;
|
|
38
|
+
export declare function createInitThemeOptions(requireConsent: boolean): InitThemeOptions;
|
|
39
|
+
/** The inline script's source: `initTheme` as an IIFE, with its arguments serialized. */
|
|
40
|
+
export declare function renderInitThemeScript(themeData: ThemeConfig, options: InitThemeOptions): string;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createThemeResolver } from "../../shared/utils/theme-resolver";
|
|
2
|
+
import { toInlineScriptJson } from "../../shared/utils/inline-script";
|
|
3
|
+
import {
|
|
4
|
+
THEME_PREFERENCE_COOKIE,
|
|
5
|
+
THEME_MODE_COOKIE,
|
|
6
|
+
THEME_RESOLVED_COOKIE,
|
|
7
|
+
THEME_COOKIE_MAX_AGE,
|
|
8
|
+
COOKIE_CONSENT_STORAGE_KEY
|
|
9
|
+
} from "../../shared/constants";
|
|
10
|
+
export default function initTheme(createThemeResolver2, themeData, options) {
|
|
11
|
+
const resolver = createThemeResolver2();
|
|
12
|
+
const { requireConsent, cookies, cookieMaxAge, consentStorageKey } = options;
|
|
5
13
|
function hasCookieConsent() {
|
|
6
14
|
if (typeof localStorage === "undefined") return false;
|
|
7
|
-
const consentData = localStorage.getItem(
|
|
15
|
+
const consentData = localStorage.getItem(consentStorageKey);
|
|
8
16
|
if (!consentData) return false;
|
|
9
17
|
try {
|
|
10
18
|
const consent = JSON.parse(consentData);
|
|
@@ -19,71 +27,43 @@ export default function initTheme(themeData) {
|
|
|
19
27
|
return cookieValue ? decodeURIComponent(cookieValue) : null;
|
|
20
28
|
}
|
|
21
29
|
function setCookieIfConsented(name, value) {
|
|
22
|
-
if (hasCookieConsent()) {
|
|
23
|
-
document.cookie = `${name}=${encodeURIComponent(value)}; path=/; max-age
|
|
30
|
+
if (!requireConsent || hasCookieConsent()) {
|
|
31
|
+
document.cookie = `${name}=${encodeURIComponent(value)}; path=/; max-age=${cookieMaxAge}; SameSite=Lax`;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (themeConfig.seasonal !== true || !themeConfig.dateRange) return false;
|
|
32
|
-
const startParts = themeConfig.dateRange.start.split("-").map(Number);
|
|
33
|
-
const endParts = themeConfig.dateRange.end.split("-").map(Number);
|
|
34
|
-
if (startParts.length !== 2 || endParts.length !== 2) return false;
|
|
35
|
-
const [startMonth, startDay] = startParts;
|
|
36
|
-
const [endMonth, endDay] = endParts;
|
|
37
|
-
if (startMonth === void 0 || startDay === void 0 || endMonth === void 0 || endDay === void 0) return false;
|
|
38
|
-
const current = (now.getMonth() + 1) * 100 + now.getDate();
|
|
39
|
-
const startNum = startMonth * 100 + startDay;
|
|
40
|
-
const endNum = endMonth * 100 + endDay;
|
|
41
|
-
return startNum <= endNum ? current >= startNum && current <= endNum : current >= startNum || current <= endNum;
|
|
42
|
-
}
|
|
43
|
-
function getActiveSeasonalTheme(themes2, prefersDark) {
|
|
44
|
-
const now = /* @__PURE__ */ new Date();
|
|
45
|
-
for (const [themeName, themeConfig] of Object.entries(themes2)) {
|
|
46
|
-
if (themeName === "system") continue;
|
|
47
|
-
if (!isColorTheme(themeConfig)) continue;
|
|
48
|
-
if (!isDateInSeasonalRange(themeConfig, now)) continue;
|
|
49
|
-
if (themeConfig.dark !== prefersDark) continue;
|
|
50
|
-
return themeName;
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
function resolveThemePreference(preference2, themes2, defaultTheme2, prefersDark) {
|
|
55
|
-
let resolved;
|
|
56
|
-
if (preference2 === "system") {
|
|
57
|
-
resolved = getActiveSeasonalTheme(themes2, prefersDark) || (prefersDark ? "dark" : "light");
|
|
58
|
-
} else if (preference2 && isColorTheme(themes2[preference2])) {
|
|
59
|
-
resolved = preference2;
|
|
60
|
-
} else {
|
|
61
|
-
resolved = defaultTheme2;
|
|
62
|
-
}
|
|
63
|
-
if (!isColorTheme(themes2[resolved])) {
|
|
64
|
-
resolved = isColorTheme(themes2[defaultTheme2]) ? defaultTheme2 : "dark";
|
|
65
|
-
}
|
|
66
|
-
return resolved;
|
|
67
|
-
}
|
|
34
|
+
const colors = {
|
|
35
|
+
themes: themeData.colors?.themes || {},
|
|
36
|
+
groups: themeData.colors?.groups || {},
|
|
37
|
+
defaultColor: themeData.colors?.defaultColor
|
|
38
|
+
};
|
|
68
39
|
const html = document.documentElement;
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const resolvedCookie = getCookie(THEME_RESOLVED_COOKIE);
|
|
40
|
+
const preference = getCookie(cookies.preference);
|
|
41
|
+
const modePreference = getCookie(cookies.mode);
|
|
42
|
+
const resolvedCookie = getCookie(cookies.resolved);
|
|
73
43
|
const systemPrefersDark = typeof window.matchMedia === "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
theme = resolvedCookie;
|
|
77
|
-
} else {
|
|
78
|
-
theme = resolveThemePreference(preference || void 0, themes, defaultTheme, systemPrefersDark);
|
|
79
|
-
}
|
|
44
|
+
const selection = resolver.normalizeThemeSelection(preference, modePreference, colors);
|
|
45
|
+
const theme = resolver.resolveThemeSelection(selection, colors, systemPrefersDark);
|
|
80
46
|
html.classList.add(theme);
|
|
81
47
|
html.setAttribute("data-theme", theme);
|
|
82
48
|
window.__VENIX_INITIAL_THEME__ = theme;
|
|
83
|
-
if (
|
|
84
|
-
setCookieIfConsented(
|
|
49
|
+
if (resolvedCookie !== theme) {
|
|
50
|
+
setCookieIfConsented(cookies.resolved, theme);
|
|
85
51
|
}
|
|
86
52
|
if (!preference) {
|
|
87
|
-
setCookieIfConsented(
|
|
53
|
+
setCookieIfConsented(cookies.preference, selection.theme);
|
|
54
|
+
}
|
|
55
|
+
if (!modePreference) {
|
|
56
|
+
setCookieIfConsented(cookies.mode, selection.mode);
|
|
88
57
|
}
|
|
89
58
|
}
|
|
59
|
+
export function createInitThemeOptions(requireConsent) {
|
|
60
|
+
return {
|
|
61
|
+
requireConsent,
|
|
62
|
+
cookies: { preference: THEME_PREFERENCE_COOKIE, mode: THEME_MODE_COOKIE, resolved: THEME_RESOLVED_COOKIE },
|
|
63
|
+
cookieMaxAge: THEME_COOKIE_MAX_AGE,
|
|
64
|
+
consentStorageKey: COOKIE_CONSENT_STORAGE_KEY
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function renderInitThemeScript(themeData, options) {
|
|
68
|
+
return `(${initTheme.toString()})(${createThemeResolver.toString()}, ${toInlineScriptJson(themeData)}, ${toInlineScriptJson(options)})`;
|
|
69
|
+
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
export declare const THEME_PREFERENCE_COOKIE = "venix-theme-preference";
|
|
2
2
|
export declare const THEME_RESOLVED_COOKIE = "venix-theme-resolved";
|
|
3
|
+
/** The user's mode choice (`'system'`, `'light'`, `'dark'`); the theme itself stays in `THEME_PREFERENCE_COOKIE`. */
|
|
4
|
+
export declare const THEME_MODE_COOKIE = "venix-theme-mode";
|
|
5
|
+
/**
|
|
6
|
+
* One year, in seconds. Without it `useCookie` writes session cookies, so a
|
|
7
|
+
* theme picked on the client was forgotten when the browser closed. The
|
|
8
|
+
* pre-hydration script (`runtime/scripts/theme-init.ts`) hardcodes the same
|
|
9
|
+
* value, since it can't import this.
|
|
10
|
+
*/
|
|
11
|
+
export declare const THEME_COOKIE_MAX_AGE: number;
|
|
12
|
+
/** Options for every `useCookie` of the theme cookies, so all writers agree. */
|
|
13
|
+
export declare const THEME_COOKIE_OPTIONS: {
|
|
14
|
+
readonly maxAge: number;
|
|
15
|
+
readonly path: "/";
|
|
16
|
+
readonly sameSite: "lax";
|
|
17
|
+
};
|
|
3
18
|
export declare const COOKIE_PREFERENCES_UPDATED_EVENT = "venix-cookie-preferences-updated";
|
|
4
19
|
/**
|
|
5
20
|
* Dispatched synchronously by `apply()` (useVenixTheme.ts), inside the same
|
|
@@ -16,13 +31,13 @@ export declare const COOKIE_PREFERENCES_UPDATED_EVENT = "venix-cookie-preference
|
|
|
16
31
|
* `data-theme` change, as part of the same transition.
|
|
17
32
|
*/
|
|
18
33
|
export declare const THEME_APPLIED_EVENT = "venix-theme-applied";
|
|
19
|
-
/**
|
|
34
|
+
/** Where functional-cookie consent is stored — written by `persistence.grant()/revoke()` or by the consumer app's own consent UI. */
|
|
20
35
|
export declare const COOKIE_CONSENT_STORAGE_KEY = "venix-cookie-consent";
|
|
21
36
|
export declare const DEFAULT_LOCALE = "en-US";
|
|
22
37
|
export declare const DEFAULT_LOCALE_COOKIE_NAME = "i18n_redirected";
|
|
23
38
|
export declare const LOCALE_MAP: Record<string, string>;
|
|
24
39
|
export declare const DEFAULT_THEME = "dark";
|
|
25
40
|
export declare const SYSTEM_THEME = "system";
|
|
41
|
+
export declare const THEME_MODES: readonly ["light", "dark"];
|
|
26
42
|
export declare const COLOR_PROPERTIES: readonly ["primary", "secondary", "accent", "error", "info", "success", "warning", "background", "background2", "background3"];
|
|
27
|
-
export declare const NON_COLOR_PROPERTIES: readonly ["dark", "seasonal", "dateRange", "translations", "icon"];
|
|
28
|
-
export declare const CSS_HEADER = "/* ============================================ */";
|
|
43
|
+
export declare const NON_COLOR_PROPERTIES: readonly ["id", "dark", "light", "seasonal", "dateRange", "translations", "icon"];
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export const THEME_PREFERENCE_COOKIE = "venix-theme-preference";
|
|
2
2
|
export const THEME_RESOLVED_COOKIE = "venix-theme-resolved";
|
|
3
|
+
export const THEME_MODE_COOKIE = "venix-theme-mode";
|
|
4
|
+
export const THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
5
|
+
export const THEME_COOKIE_OPTIONS = { maxAge: THEME_COOKIE_MAX_AGE, path: "/", sameSite: "lax" };
|
|
3
6
|
export const COOKIE_PREFERENCES_UPDATED_EVENT = "venix-cookie-preferences-updated";
|
|
4
7
|
export const THEME_APPLIED_EVENT = "venix-theme-applied";
|
|
5
8
|
export const COOKIE_CONSENT_STORAGE_KEY = "venix-cookie-consent";
|
|
@@ -18,6 +21,7 @@ export const LOCALE_MAP = {
|
|
|
18
21
|
};
|
|
19
22
|
export const DEFAULT_THEME = "dark";
|
|
20
23
|
export const SYSTEM_THEME = "system";
|
|
24
|
+
export const THEME_MODES = ["light", "dark"];
|
|
21
25
|
export const COLOR_PROPERTIES = [
|
|
22
26
|
"primary",
|
|
23
27
|
"secondary",
|
|
@@ -31,10 +35,11 @@ export const COLOR_PROPERTIES = [
|
|
|
31
35
|
"background3"
|
|
32
36
|
];
|
|
33
37
|
export const NON_COLOR_PROPERTIES = [
|
|
38
|
+
"id",
|
|
34
39
|
"dark",
|
|
40
|
+
"light",
|
|
35
41
|
"seasonal",
|
|
36
42
|
"dateRange",
|
|
37
43
|
"translations",
|
|
38
44
|
"icon"
|
|
39
45
|
];
|
|
40
|
-
export const CSS_HEADER = "/* ============================================ */";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getThemeHexColors } from "../utils/theme-resolve.js";
|
|
2
2
|
export function generateThemeVars(mode, colors) {
|
|
3
|
-
const colorVars =
|
|
3
|
+
const colorVars = getThemeHexColors(colors).map(([key, value]) => ` --color-${key}: ${value};`).join("\n");
|
|
4
4
|
const isDark = colors.dark === true;
|
|
5
5
|
const colorScheme = isDark ? "dark" : "light";
|
|
6
6
|
const inverseColor = isDark ? "#FFFFFF" : "#000000";
|
|
@@ -14,7 +14,15 @@ export function generateCustomCursorCSS(theme) {
|
|
|
14
14
|
if (cursors.default) {
|
|
15
15
|
const value = cursorValue("default");
|
|
16
16
|
css += "\n/* 1. Default cursor on everything */\n";
|
|
17
|
-
css += `
|
|
17
|
+
css += `html {
|
|
18
|
+
cursor: ${value};
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
css += "\n/* 1b. Elements the browser stylesheet sets to `cursor: default`, which would show the system arrow instead of inheriting */\n";
|
|
22
|
+
css += `label,
|
|
23
|
+
select,
|
|
24
|
+
input[type="checkbox"], input[type="radio"],
|
|
25
|
+
input[type="range"], input[type="color"], input[type="file"] {
|
|
18
26
|
cursor: ${value};
|
|
19
27
|
}
|
|
20
28
|
`;
|
|
@@ -54,7 +62,6 @@ input[type="month"],
|
|
|
54
62
|
input[type="week"],
|
|
55
63
|
input[type="time"],
|
|
56
64
|
textarea,
|
|
57
|
-
select,
|
|
58
65
|
[contenteditable="true"] {
|
|
59
66
|
cursor: ${value} !important;
|
|
60
67
|
}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
import type { ThemeConfig } from '../types/index.js';
|
|
2
|
-
export
|
|
3
|
-
typography?: boolean;
|
|
4
|
-
customScrollbar?: boolean;
|
|
5
|
-
customCursor?: boolean;
|
|
6
|
-
colors?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function processTheme(theme: ThemeConfig, options?: ProcessOptions): string;
|
|
2
|
+
export declare function processTheme(theme: ThemeConfig): string;
|
package/dist/shared/css/index.js
CHANGED
|
@@ -3,27 +3,27 @@ import { generateThemeVars } from "./colors.js";
|
|
|
3
3
|
import { generateCustomScrollbarCSS } from "./scrollbar.js";
|
|
4
4
|
import { generateCustomCursorCSS } from "./cursor.js";
|
|
5
5
|
import { generateThemeTransitionCSS } from "./transition.js";
|
|
6
|
-
|
|
6
|
+
import { isColorTheme } from "../utils/theme-resolve.js";
|
|
7
|
+
export function processTheme(theme) {
|
|
7
8
|
const output = [];
|
|
8
|
-
if (
|
|
9
|
+
if (theme.typography?.enabled !== false) {
|
|
9
10
|
output.push(generateFontFaces(theme));
|
|
10
11
|
output.push(generateRootVars(theme));
|
|
11
12
|
}
|
|
12
|
-
if (
|
|
13
|
+
if (theme.colors?.enabled !== false) {
|
|
13
14
|
if (theme.colors?.themes) {
|
|
14
15
|
output.push(generateThemeTransitionCSS());
|
|
15
|
-
Object.entries(theme.colors.themes)
|
|
16
|
-
if (themeName === "system")
|
|
17
|
-
if (!themeColors.primary && !themeColors.background) return;
|
|
16
|
+
for (const [themeName, themeColors] of Object.entries(theme.colors.themes)) {
|
|
17
|
+
if (themeName === "system" || !isColorTheme(themeColors)) continue;
|
|
18
18
|
output.push(generateThemeVars(themeName, themeColors));
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (theme.customScrollbar?.enabled !== false) {
|
|
23
23
|
const scrollbarCSS = generateCustomScrollbarCSS(theme);
|
|
24
24
|
if (scrollbarCSS) output.push(scrollbarCSS);
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
26
|
+
if (theme.customCursor?.enabled !== false) {
|
|
27
27
|
const cursorCSS = generateCustomCursorCSS(theme);
|
|
28
28
|
if (cursorCSS) output.push(cursorCSS);
|
|
29
29
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** CSS for the native cross-fade (View Transitions API) when switching themes: its duration and pointer pass-through. */
|
|
2
2
|
export declare function generateThemeTransitionCSS(): string;
|