@venix-sistemas/jade 1.0.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.
Files changed (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +481 -0
  3. package/dist/module.d.mts +26 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +249 -0
  6. package/dist/runtime/components/VenixIcon.d.vue.ts +14 -0
  7. package/dist/runtime/components/VenixIcon.vue +37 -0
  8. package/dist/runtime/components/VenixIcon.vue.d.ts +14 -0
  9. package/dist/runtime/components/VenixThemeSwitcher.d.vue.ts +9 -0
  10. package/dist/runtime/components/VenixThemeSwitcher.vue +191 -0
  11. package/dist/runtime/components/VenixThemeSwitcher.vue.d.ts +9 -0
  12. package/dist/runtime/composables/useThemeColors.d.ts +10 -0
  13. package/dist/runtime/composables/useThemeColors.js +25 -0
  14. package/dist/runtime/composables/useThemeCookies.d.ts +7 -0
  15. package/dist/runtime/composables/useThemeCookies.js +33 -0
  16. package/dist/runtime/composables/useThemeLocale.d.ts +12 -0
  17. package/dist/runtime/composables/useThemeLocale.js +87 -0
  18. package/dist/runtime/composables/useThemeSeasonal.d.ts +4 -0
  19. package/dist/runtime/composables/useThemeSeasonal.js +7 -0
  20. package/dist/runtime/composables/useVenixIcon.d.ts +3 -0
  21. package/dist/runtime/composables/useVenixIcon.js +11 -0
  22. package/dist/runtime/composables/useVenixTheme.d.ts +33 -0
  23. package/dist/runtime/composables/useVenixTheme.js +186 -0
  24. package/dist/runtime/nitro/theme-init.d.ts +2 -0
  25. package/dist/runtime/nitro/theme-init.js +11 -0
  26. package/dist/runtime/plugin.d.ts +2 -0
  27. package/dist/runtime/plugin.js +3 -0
  28. package/dist/runtime/plugins/theme-init.server.d.ts +2 -0
  29. package/dist/runtime/plugins/theme-init.server.js +37 -0
  30. package/dist/runtime/plugins/vuetify-theme.d.ts +2 -0
  31. package/dist/runtime/plugins/vuetify-theme.js +42 -0
  32. package/dist/runtime/public/fonts/Iceberg/Iceberg-Regular.woff2 +0 -0
  33. package/dist/runtime/public/images/ui/cursor/cursor-hand.png +0 -0
  34. package/dist/runtime/public/images/ui/cursor/cursor-text.png +0 -0
  35. package/dist/runtime/public/images/ui/cursor/cursor.png +0 -0
  36. package/dist/runtime/scripts/theme-init.d.ts +27 -0
  37. package/dist/runtime/scripts/theme-init.js +89 -0
  38. package/dist/runtime/server/tsconfig.json +3 -0
  39. package/dist/shared/constants.d.ts +28 -0
  40. package/dist/shared/constants.js +40 -0
  41. package/dist/shared/css/colors.d.ts +2 -0
  42. package/dist/shared/css/colors.js +19 -0
  43. package/dist/shared/css/cursor.d.ts +2 -0
  44. package/dist/shared/css/cursor.js +74 -0
  45. package/dist/shared/css/index.d.ts +8 -0
  46. package/dist/shared/css/index.js +31 -0
  47. package/dist/shared/css/scrollbar.d.ts +2 -0
  48. package/dist/shared/css/scrollbar.js +51 -0
  49. package/dist/shared/css/transition.d.ts +2 -0
  50. package/dist/shared/css/transition.js +20 -0
  51. package/dist/shared/css/typography.d.ts +3 -0
  52. package/dist/shared/css/typography.js +62 -0
  53. package/dist/shared/theme.json +193 -0
  54. package/dist/shared/types/color-options.d.ts +14 -0
  55. package/dist/shared/types/color-options.js +0 -0
  56. package/dist/shared/types/colors.d.ts +38 -0
  57. package/dist/shared/types/colors.js +0 -0
  58. package/dist/shared/types/cursor.d.ts +7 -0
  59. package/dist/shared/types/cursor.js +0 -0
  60. package/dist/shared/types/icon.d.ts +7 -0
  61. package/dist/shared/types/icon.js +0 -0
  62. package/dist/shared/types/index.d.ts +10 -0
  63. package/dist/shared/types/index.js +1 -0
  64. package/dist/shared/types/runtime-config.d.ts +33 -0
  65. package/dist/shared/types/runtime-config.js +1 -0
  66. package/dist/shared/types/scrollbar.d.ts +12 -0
  67. package/dist/shared/types/scrollbar.js +0 -0
  68. package/dist/shared/types/theme.d.ts +11 -0
  69. package/dist/shared/types/theme.js +0 -0
  70. package/dist/shared/types/translation.d.ts +16 -0
  71. package/dist/shared/types/translation.js +0 -0
  72. package/dist/shared/types/typography.d.ts +15 -0
  73. package/dist/shared/types/typography.js +0 -0
  74. package/dist/shared/types/vuetify.d.ts +3 -0
  75. package/dist/shared/types/vuetify.js +0 -0
  76. package/dist/shared/unocss-preset.d.ts +32 -0
  77. package/dist/shared/unocss-preset.js +13 -0
  78. package/dist/shared/utils/consent.d.ts +8 -0
  79. package/dist/shared/utils/consent.js +12 -0
  80. package/dist/shared/utils/icon-refs.d.ts +10 -0
  81. package/dist/shared/utils/icon-refs.js +24 -0
  82. package/dist/shared/utils/icon.d.ts +27 -0
  83. package/dist/shared/utils/icon.js +20 -0
  84. package/dist/shared/utils/index.d.ts +9 -0
  85. package/dist/shared/utils/index.js +12 -0
  86. package/dist/shared/utils/load.d.ts +4 -0
  87. package/dist/shared/utils/load.js +24 -0
  88. package/dist/shared/utils/normalize.d.ts +20 -0
  89. package/dist/shared/utils/normalize.js +38 -0
  90. package/dist/shared/utils/options.d.ts +10 -0
  91. package/dist/shared/utils/options.js +12 -0
  92. package/dist/shared/utils/theme-config.d.ts +14 -0
  93. package/dist/shared/utils/theme-config.js +22 -0
  94. package/dist/shared/utils/theme-resolve.d.ts +24 -0
  95. package/dist/shared/utils/theme-resolve.js +45 -0
  96. package/dist/types.d.mts +3 -0
  97. package/package.json +100 -0
@@ -0,0 +1,19 @@
1
+ import { NON_COLOR_PROPERTIES } from "../constants.js";
2
+ export function generateThemeVars(mode, colors) {
3
+ const colorVars = Object.entries(colors).filter(([key]) => !NON_COLOR_PROPERTIES.includes(key)).filter(([, value]) => typeof value === "string" && value.startsWith("#")).map(([key, value]) => ` --color-${key}: ${value};`).join("\n");
4
+ const isDark = colors.dark === true;
5
+ const colorScheme = isDark ? "dark" : "light";
6
+ const inverseColor = isDark ? "#FFFFFF" : "#000000";
7
+ return `
8
+ /* ============================================ */
9
+ /* Colors - ${mode.charAt(0).toUpperCase() + mode.slice(1)} Theme */
10
+ /* ============================================ */
11
+
12
+ :root[data-theme='${mode}'] {
13
+ color-scheme: ${colorScheme};
14
+ --color-scheme: ${colorScheme === "dark" ? "#000000" : "#FFFFFF"};
15
+ --color-inverse: ${inverseColor};
16
+ ` + colorVars + `
17
+ }
18
+ `;
19
+ }
@@ -0,0 +1,2 @@
1
+ import type { ThemeConfig } from '../types/index.js';
2
+ export declare function generateCustomCursorCSS(theme: ThemeConfig): string;
@@ -0,0 +1,74 @@
1
+ export function generateCustomCursorCSS(theme) {
2
+ const cursor = theme.customCursor;
3
+ if (!cursor || !cursor.enabled || !cursor.cursors) return "";
4
+ const cursors = cursor.cursors;
5
+ let css = "\n/* ============================================ */\n";
6
+ css += "/* Custom Cursor */\n";
7
+ css += "/* ============================================ */\n";
8
+ const cursorValue = (type) => {
9
+ if (!cursors[type]) return null;
10
+ const { path, hotspot } = cursors[type];
11
+ const hotspotStr = hotspot ? ` ${hotspot}` : "";
12
+ return `url('${path}')${hotspotStr}, ${type}`;
13
+ };
14
+ if (cursors.default) {
15
+ const value = cursorValue("default");
16
+ css += "\n/* 1. Default cursor on everything */\n";
17
+ css += `body {
18
+ cursor: ${value};
19
+ }
20
+ `;
21
+ }
22
+ if (cursors.pointer) {
23
+ const value = cursorValue("pointer");
24
+ css += "\n/* 2. Pointer cursor for clickable elements */\n";
25
+ css += `a, a *,
26
+ button, button *,
27
+ [role="button"],
28
+ input[type="button"], input[type="submit"], input[type="reset"],
29
+ .v-btn:not(.v-btn--disabled),
30
+ .v-list-item,
31
+ .v-icon,
32
+ .v-tab,
33
+ .v-chip,
34
+ .v-card--link,
35
+ .v-breadcrumbs-item--link,
36
+ .v-pagination__item {
37
+ cursor: ${value} !important;
38
+ }
39
+ `;
40
+ }
41
+ if (cursors.text) {
42
+ const value = cursorValue("text");
43
+ css += "\n/* 3. Text cursor (i-beam) for editable fields only */\n";
44
+ css += `input[type="text"],
45
+ input[type="email"],
46
+ input[type="password"],
47
+ input[type="number"],
48
+ input[type="search"],
49
+ input[type="tel"],
50
+ input[type="url"],
51
+ input[type="date"],
52
+ input[type="datetime-local"],
53
+ input[type="month"],
54
+ input[type="week"],
55
+ input[type="time"],
56
+ textarea,
57
+ select,
58
+ [contenteditable="true"] {
59
+ cursor: ${value} !important;
60
+ }
61
+ `;
62
+ }
63
+ if (cursors.default) {
64
+ const value = cursorValue("default");
65
+ css += "\n/* 4. Disabled elements */\n";
66
+ css += `.v-btn--disabled,
67
+ [disabled],
68
+ .disabled {
69
+ cursor: ${value} !important;
70
+ }
71
+ `;
72
+ }
73
+ return css;
74
+ }
@@ -0,0 +1,8 @@
1
+ import type { ThemeConfig } from '../types/index.js';
2
+ export interface ProcessOptions {
3
+ typography?: boolean;
4
+ customScrollbar?: boolean;
5
+ customCursor?: boolean;
6
+ colors?: boolean;
7
+ }
8
+ export declare function processTheme(theme: ThemeConfig, options?: ProcessOptions): string;
@@ -0,0 +1,31 @@
1
+ import { generateFontFaces, generateRootVars } from "./typography.js";
2
+ import { generateThemeVars } from "./colors.js";
3
+ import { generateCustomScrollbarCSS } from "./scrollbar.js";
4
+ import { generateCustomCursorCSS } from "./cursor.js";
5
+ import { generateThemeTransitionCSS } from "./transition.js";
6
+ export function processTheme(theme, options = {}) {
7
+ const output = [];
8
+ if (options.typography !== false && theme.typography?.enabled !== false) {
9
+ output.push(generateFontFaces(theme));
10
+ output.push(generateRootVars(theme));
11
+ }
12
+ if (options.colors !== false && theme.colors?.enabled !== false) {
13
+ if (theme.colors?.themes) {
14
+ output.push(generateThemeTransitionCSS());
15
+ Object.entries(theme.colors.themes).forEach(([themeName, themeColors]) => {
16
+ if (themeName === "system") return;
17
+ if (!themeColors.primary && !themeColors.background) return;
18
+ output.push(generateThemeVars(themeName, themeColors));
19
+ });
20
+ }
21
+ }
22
+ if (options.customScrollbar !== false && theme.customScrollbar?.enabled !== false) {
23
+ const scrollbarCSS = generateCustomScrollbarCSS(theme);
24
+ if (scrollbarCSS) output.push(scrollbarCSS);
25
+ }
26
+ if (options.customCursor !== false && theme.customCursor?.enabled !== false) {
27
+ const cursorCSS = generateCustomCursorCSS(theme);
28
+ if (cursorCSS) output.push(cursorCSS);
29
+ }
30
+ return output.join("\n");
31
+ }
@@ -0,0 +1,2 @@
1
+ import type { ThemeConfig } from '../types/index.js';
2
+ export declare function generateCustomScrollbarCSS(theme: ThemeConfig): string;
@@ -0,0 +1,51 @@
1
+ export function generateCustomScrollbarCSS(theme) {
2
+ const scrollbar = theme.customScrollbar;
3
+ if (!scrollbar || !scrollbar.enabled) return "";
4
+ const width = scrollbar.width || "auto";
5
+ const borderRadius = scrollbar.borderRadius || "8px";
6
+ const borderWidth = scrollbar.borderWidth || "3px";
7
+ const colorVar = (key, fallback) => {
8
+ const value = scrollbar.colors?.[key] || fallback;
9
+ if (value.startsWith("var(--") || value.startsWith("#") || value.startsWith("rgb")) {
10
+ return value;
11
+ }
12
+ return `var(--color-${value})`;
13
+ };
14
+ const thumb = colorVar("thumb", "primary");
15
+ const thumbHover = colorVar("thumbHover", "secondary");
16
+ const track = colorVar("track", "background2");
17
+ const border = colorVar("border", "background3");
18
+ let css = "\n/* ============================================ */\n";
19
+ css += "/* Custom Scrollbar */\n";
20
+ css += "/* ============================================ */\n";
21
+ css += `
22
+ ::-webkit-scrollbar {
23
+ width: ${width};
24
+ height: ${width};
25
+ }
26
+ `;
27
+ css += `
28
+ ::-webkit-scrollbar-track {
29
+ background: ${track};
30
+ }
31
+ `;
32
+ css += `
33
+ ::-webkit-scrollbar-thumb {
34
+ background: ${thumb};
35
+ border-radius: ${borderRadius};
36
+ border: ${borderWidth} solid ${border};
37
+ }
38
+ `;
39
+ css += `
40
+ ::-webkit-scrollbar-thumb:hover {
41
+ background: ${thumbHover};
42
+ }
43
+ `;
44
+ css += `
45
+ html {
46
+ scrollbar-width: ${width === "auto" ? "auto" : "thin"};
47
+ scrollbar-color: ${thumb} ${track};
48
+ }
49
+ `;
50
+ return css;
51
+ }
@@ -0,0 +1,2 @@
1
+ /** Duration of the native cross-fade (View Transitions API) when switching themes. */
2
+ export declare function generateThemeTransitionCSS(): string;
@@ -0,0 +1,20 @@
1
+ export function generateThemeTransitionCSS() {
2
+ return `
3
+ /* ============================================ */
4
+ /* Theme transition */
5
+ /* ============================================ */
6
+
7
+ ::view-transition-old(root),
8
+ ::view-transition-new(root) {
9
+ animation-duration: 0.3s;
10
+ }
11
+
12
+ ::view-transition,
13
+ ::view-transition-group(*),
14
+ ::view-transition-image-pair(*),
15
+ ::view-transition-old(*),
16
+ ::view-transition-new(*) {
17
+ pointer-events: none !important;
18
+ }
19
+ `;
20
+ }
@@ -0,0 +1,3 @@
1
+ import type { ThemeConfig } from '../types/index.js';
2
+ export declare function generateFontFaces(theme: ThemeConfig): string;
3
+ export declare function generateRootVars(theme: ThemeConfig): string;
@@ -0,0 +1,62 @@
1
+ export function generateFontFaces(theme) {
2
+ if (!theme.typography?.customFonts) return "";
3
+ const uniqueFonts = /* @__PURE__ */ new Map();
4
+ theme.typography.customFonts.forEach((font) => {
5
+ if (!uniqueFonts.has(font.name)) {
6
+ uniqueFonts.set(font.name, []);
7
+ }
8
+ uniqueFonts.get(font.name).push(font);
9
+ });
10
+ let css = "\n/* ============================================ */\n";
11
+ css += "/* Typography - Font Faces */\n";
12
+ css += "/* ============================================ */\n\n";
13
+ uniqueFonts.forEach((weights) => {
14
+ weights.forEach((font) => {
15
+ const urls = Object.entries(font.sources).map(([format, url]) => `url('${url}') format('${format}')`).join(",\n ");
16
+ css += `@font-face {
17
+ font-family: '${font.name}';
18
+ src: ${urls};
19
+ font-weight: ${font.weight};
20
+ font-style: ${font.style || "normal"};
21
+ font-display: swap;
22
+ }
23
+
24
+ `;
25
+ });
26
+ });
27
+ return css;
28
+ }
29
+ function buildFontFamily(theme) {
30
+ const fontNames = [];
31
+ if (theme.typography?.customFonts) {
32
+ const uniqueNames = [...new Set(theme.typography.customFonts.map((font) => font.name))];
33
+ uniqueNames.forEach((name) => {
34
+ fontNames.push(`'${name}'`);
35
+ });
36
+ }
37
+ if (theme.typography?.defaultFonts) {
38
+ fontNames.push(theme.typography.defaultFonts);
39
+ }
40
+ return fontNames.join(", ");
41
+ }
42
+ export function generateRootVars(theme) {
43
+ let vars = "\n/* ============================================ */\n";
44
+ vars += "/* Typography - Root Variables */\n";
45
+ vars += "/* ============================================ */\n\n";
46
+ vars += ":root {\n";
47
+ const fontFamily = buildFontFamily(theme);
48
+ if (fontFamily) {
49
+ vars += ` --font-family-base: ${fontFamily};
50
+ `;
51
+ vars += ` --v-font-body: ${fontFamily};
52
+ `;
53
+ vars += ` --v-font-heading: ${fontFamily};
54
+ `;
55
+ }
56
+ if (theme.typography?.fontSize) {
57
+ vars += ` --font-size-base: ${theme.typography.fontSize};
58
+ `;
59
+ }
60
+ vars += "}\n";
61
+ return vars;
62
+ }
@@ -0,0 +1,193 @@
1
+ {
2
+ "name": "default",
3
+ "typography": {
4
+ "enabled": true,
5
+ "defaultFonts": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
6
+ "fontSize": "16px",
7
+ "customFonts": [
8
+ {
9
+ "name": "Iceberg",
10
+ "preload": true,
11
+ "sources": {
12
+ "woff2": "/fonts/Iceberg/Iceberg-Regular.woff2"
13
+ },
14
+ "weight": "normal",
15
+ "style": "normal"
16
+ }
17
+ ]
18
+ },
19
+ "customScrollbar": {
20
+ "enabled": true,
21
+ "width": "auto",
22
+ "borderRadius": "8px",
23
+ "borderWidth": "3px",
24
+ "colors": {
25
+ "thumb": "primary",
26
+ "thumbHover": "secondary",
27
+ "track": "background2",
28
+ "border": "background3"
29
+ }
30
+ },
31
+ "customCursor": {
32
+ "enabled": false,
33
+ "cursors": {
34
+ "default": {
35
+ "path": "/images/ui/cursor/cursor.png",
36
+ "hotspot": "0 0"
37
+ },
38
+ "pointer": {
39
+ "path": "/images/ui/cursor/cursor-hand.png",
40
+ "hotspot": "0 0"
41
+ },
42
+ "text": {
43
+ "path": "/images/ui/cursor/cursor-text.png",
44
+ "hotspot": "12 12"
45
+ }
46
+ },
47
+ "_comment": "default | pointer | text"
48
+ },
49
+ "colors": {
50
+ "enabled": true,
51
+ "defaults": true,
52
+ "defaultColor": "dark",
53
+ "themes": {
54
+ "system": {
55
+ "translations": {
56
+ "pt-BR": "Automático",
57
+ "en-US": "Automatic"
58
+ },
59
+ "icon": {
60
+ "emote": "🎨",
61
+ "css": "line-md:light-dark",
62
+ "svg": "line-md:light-dark-loop"
63
+ }
64
+ },
65
+ "dark": {
66
+ "dark": true,
67
+ "primary": "#FF6B6B",
68
+ "secondary": "#FFB96A",
69
+ "accent": "#82B1FF",
70
+ "error": "#FF5252",
71
+ "info": "#2196F3",
72
+ "success": "#4CAF50",
73
+ "warning": "#FCCF3D",
74
+ "background": "#0C0C0C",
75
+ "background2": "#191919",
76
+ "background3": "#282828",
77
+ "translations": {
78
+ "pt-BR": "Escuro",
79
+ "en-US": "Dark"
80
+ },
81
+ "icon": {
82
+ "emote": "🌙",
83
+ "css": "mdi:moon-and-stars",
84
+ "svg": "line-md:moon-filled-loop"
85
+ }
86
+ },
87
+ "light": {
88
+ "dark": false,
89
+ "primary": "#FF0000",
90
+ "secondary": "#FF8800",
91
+ "accent": "#82B1FF",
92
+ "error": "#FF5252",
93
+ "info": "#2196F3",
94
+ "success": "#4CAF50",
95
+ "warning": "#FCCF3D",
96
+ "background": "#FAFAFA",
97
+ "background2": "#F0F0F0",
98
+ "background3": "#E6E6E6",
99
+ "translations": {
100
+ "pt-BR": "Claro",
101
+ "en-US": "Light"
102
+ },
103
+ "icon": {
104
+ "emote": "☀️",
105
+ "css": "mdi:white-balance-sunny",
106
+ "svg": "line-md:sunny-filled-loop"
107
+ }
108
+ },
109
+ "carnaval": {
110
+ "dark": true,
111
+ "seasonal": true,
112
+ "dateRange": {
113
+ "start": "02-14",
114
+ "end": "03-05"
115
+ },
116
+ "primary": "#FF1493",
117
+ "secondary": "#FFD000",
118
+ "accent": "#00D4AA",
119
+ "error": "#FF0000",
120
+ "info": "#00BFFF",
121
+ "success": "#32CD32",
122
+ "warning": "#FF8C00",
123
+ "background": "#1A001A",
124
+ "background2": "#2D002D",
125
+ "background3": "#400040",
126
+ "translations": {
127
+ "pt-BR": "Carnaval",
128
+ "en-US": "Carnival"
129
+ },
130
+ "icon": {
131
+ "emote": "🎭",
132
+ "css": "mdi:emoticon-excited-outline",
133
+ "svg": "line-md:emoji-grin"
134
+ }
135
+ },
136
+ "natal": {
137
+ "dark": true,
138
+ "seasonal": true,
139
+ "dateRange": {
140
+ "start": "12-01",
141
+ "end": "12-26"
142
+ },
143
+ "primary": "#CA2A2A",
144
+ "secondary": "#3BA340",
145
+ "accent": "#FFD54F",
146
+ "error": "#FF1744",
147
+ "info": "#2979FF",
148
+ "success": "#00E676",
149
+ "warning": "#FFAB00",
150
+ "background": "#0F0F0F",
151
+ "background2": "#191919",
152
+ "background3": "#282828",
153
+ "translations": {
154
+ "pt-BR": "Natal",
155
+ "en-US": "Christmas"
156
+ },
157
+ "icon": {
158
+ "emote": "🎄",
159
+ "css": "mdi:pine-tree-variant",
160
+ "svg": "line-md:star-filled"
161
+ }
162
+ },
163
+ "halloween": {
164
+ "dark": true,
165
+ "seasonal": true,
166
+ "dateRange": {
167
+ "start": "10-15",
168
+ "end": "10-31"
169
+ },
170
+ "primary": "#FF6F00",
171
+ "secondary": "#A42BF0",
172
+ "accent": "#76FF03",
173
+ "error": "#FF0000",
174
+ "info": "#4A90D9",
175
+ "success": "#32CD32",
176
+ "warning": "#FF8C00",
177
+ "background": "#0D0D0D",
178
+ "background2": "#1A0A00",
179
+ "background3": "#2B1500",
180
+ "translations": {
181
+ "pt-BR": "Dia das Bruxas",
182
+ "en-US": "Halloween"
183
+ },
184
+ "icon": {
185
+ "emote": "🎃",
186
+ "css": "mdi:halloween",
187
+ "svg": "line-md:emoji-frown"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "_comment": "Use 'node app/utils/generate-theme-css.cjs' to generate CSS"
193
+ }
@@ -0,0 +1,14 @@
1
+ import type { ThemeColors } from './colors.js';
2
+ export interface ColorOptions {
3
+ enabled: boolean;
4
+ apply: boolean;
5
+ defaultColor: string;
6
+ themes: Record<string, Partial<ThemeColors>>;
7
+ /**
8
+ * Preferred variant for each theme's icon when `icon` is an object
9
+ * (`ThemeIconFormats`). Default: `'svg'`. Falls back to `'emote'` when the
10
+ * theme doesn't define the chosen format, or when `icon` is just a string
11
+ * (legacy format).
12
+ */
13
+ iconFormat: 'emote' | 'css' | 'svg';
14
+ }
File without changes
@@ -0,0 +1,38 @@
1
+ export interface ThemeTranslations {
2
+ [locale: string]: string;
3
+ }
4
+ export interface ThemeIconFormats {
5
+ /** Emoji, always present — fallback when the preferred format doesn't exist. */
6
+ emote: string;
7
+ /** Iconify icon name (e.g. 'mdi:sun-compass'), no animation (@nuxt/icon in CSS mode). */
8
+ css?: string;
9
+ /** Iconify icon name (e.g. 'line-md:sunny-filled-loop'), animated (@nuxt/icon in SVG mode). */
10
+ svg?: string;
11
+ }
12
+ export interface ThemeColors {
13
+ dark?: boolean;
14
+ seasonal?: boolean;
15
+ dateRange?: {
16
+ start: string;
17
+ end: string;
18
+ };
19
+ primary?: string;
20
+ secondary?: string;
21
+ accent?: string;
22
+ error?: string;
23
+ info?: string;
24
+ success?: string;
25
+ warning?: string;
26
+ background?: string;
27
+ background2?: string;
28
+ background3?: string;
29
+ translations?: ThemeTranslations;
30
+ /** A plain emoji ('🎨') or an object with per-format variants — see `ThemeIconFormats`. */
31
+ icon?: string | ThemeIconFormats;
32
+ }
33
+ export interface ColorsConfig {
34
+ enabled: boolean;
35
+ defaults: boolean;
36
+ defaultColor: string;
37
+ themes: Record<string, ThemeColors>;
38
+ }
File without changes
@@ -0,0 +1,7 @@
1
+ export interface CursorConfig {
2
+ enabled: boolean;
3
+ cursors: Record<string, {
4
+ path: string;
5
+ hotspot: string;
6
+ }>;
7
+ }
File without changes
@@ -0,0 +1,7 @@
1
+ export interface IconOptions {
2
+ enabled: boolean;
3
+ /** Iconify collections bundled locally (offline), e.g. 'line-md'. */
4
+ collections: string[];
5
+ /** Shortcuts: short name -> emoji, Iconify icon name ('line-md:home') or inline SVG. */
6
+ aliases: Record<string, string>;
7
+ }
File without changes
@@ -0,0 +1,10 @@
1
+ import './runtime-config.js';
2
+ export type { FontConfig, TypographyConfig } from './typography.js';
3
+ export type { ScrollbarConfig } from './scrollbar.js';
4
+ export type { CursorConfig } from './cursor.js';
5
+ export type { ThemeColors, ThemeTranslations, ColorsConfig, ThemeIconFormats } from './colors.js';
6
+ export type { ThemeConfig } from './theme.js';
7
+ export type { TranslationConfig } from './translation.js';
8
+ export type { ColorOptions } from './color-options.js';
9
+ export type { VuetifyOptions } from './vuetify.js';
10
+ export type { IconOptions } from './icon.js';
@@ -0,0 +1 @@
1
+ import "./runtime-config";
@@ -0,0 +1,33 @@
1
+ import type { ThemeColors } from './colors.js';
2
+ declare module '@nuxt/schema' {
3
+ interface PublicRuntimeConfig {
4
+ venixTheme?: {
5
+ defaultTheme: string;
6
+ colorThemes: Record<string, Partial<ThemeColors>>;
7
+ applyColors: boolean;
8
+ localeCookie: string;
9
+ defaultLocale: string;
10
+ locale: string;
11
+ iconFormat: 'emote' | 'css' | 'svg';
12
+ icon: {
13
+ aliases: Record<string, string>;
14
+ };
15
+ enabled: {
16
+ typography: boolean;
17
+ scrollbar: boolean;
18
+ cursor: boolean;
19
+ color: boolean;
20
+ translation: boolean;
21
+ manageHtmlLang: boolean;
22
+ vuetify: boolean;
23
+ icon: boolean;
24
+ };
25
+ };
26
+ }
27
+ }
28
+ declare global {
29
+ interface Window {
30
+ __VENIX_INITIAL_THEME__?: string;
31
+ }
32
+ }
33
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export interface ScrollbarConfig {
2
+ enabled: boolean;
3
+ width: string;
4
+ borderRadius: string;
5
+ borderWidth: string;
6
+ colors: {
7
+ thumb: string;
8
+ thumbHover: string;
9
+ track: string;
10
+ border: string;
11
+ };
12
+ }
File without changes
@@ -0,0 +1,11 @@
1
+ import type { TypographyConfig } from './typography.js';
2
+ import type { ScrollbarConfig } from './scrollbar.js';
3
+ import type { CursorConfig } from './cursor.js';
4
+ import type { ColorsConfig } from './colors.js';
5
+ export interface ThemeConfig {
6
+ name: string;
7
+ typography: TypographyConfig;
8
+ customScrollbar: ScrollbarConfig;
9
+ customCursor: CursorConfig;
10
+ colors: ColorsConfig;
11
+ }
File without changes
@@ -0,0 +1,16 @@
1
+ export interface TranslationConfig {
2
+ enabled: boolean;
3
+ locale: string;
4
+ defaultLocale: string;
5
+ cookieSync: string;
6
+ /**
7
+ * Keeps `<html lang>` in sync with the locale this module resolves
8
+ * (needed for screen readers to pronounce translated theme names correctly
9
+ * — WCAG 3.1.1). Off by default: if the project already uses a real i18n
10
+ * module (e.g. `@nuxtjs/i18n`), THAT should be the source of truth for
11
+ * `lang` — turning this on at the same time can make the two fight over
12
+ * the attribute. Only enable this in projects with no routing-based i18n,
13
+ * that only use this module's own theme-name translations.
14
+ */
15
+ manageHtmlLang: boolean;
16
+ }
File without changes