@venix-sistemas/jade 1.2.0 → 1.3.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 (40) hide show
  1. package/README.md +367 -157
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +66 -4
  4. package/dist/runtime/components/VenixThemeSwitcher.d.vue.ts +2 -0
  5. package/dist/runtime/components/VenixThemeSwitcher.vue +413 -70
  6. package/dist/runtime/components/VenixThemeSwitcher.vue.d.ts +2 -0
  7. package/dist/runtime/composables/useThemeColors.d.ts +2 -2
  8. package/dist/runtime/composables/useThemeCookies.d.ts +8 -0
  9. package/dist/runtime/composables/useThemeCookies.js +20 -1
  10. package/dist/runtime/composables/useThemeLocale.d.ts +2 -2
  11. package/dist/runtime/composables/useThemeSeasonal.d.ts +2 -2
  12. package/dist/runtime/composables/useVenixTheme.d.ts +20 -0
  13. package/dist/runtime/composables/useVenixTheme.js +86 -9
  14. package/dist/runtime/plugins/overlay-scrollbars.client.d.ts +2 -0
  15. package/dist/runtime/plugins/overlay-scrollbars.client.js +89 -0
  16. package/dist/runtime/scripts/theme-init.d.ts +12 -3
  17. package/dist/runtime/scripts/theme-init.js +21 -4
  18. package/dist/shared/constants.d.ts +54 -0
  19. package/dist/shared/constants.js +20 -0
  20. package/dist/shared/css/cursor-svg.d.ts +10 -0
  21. package/dist/shared/css/cursor-svg.js +28 -0
  22. package/dist/shared/css/cursor.js +78 -33
  23. package/dist/shared/css/scrollbar.js +61 -7
  24. package/dist/shared/css/typography.js +13 -0
  25. package/dist/shared/theme.json +14 -8
  26. package/dist/shared/types/cursor.d.ts +34 -4
  27. package/dist/shared/types/index.d.ts +2 -2
  28. package/dist/shared/types/runtime-config.d.ts +1 -0
  29. package/dist/shared/types/scrollbar.d.ts +11 -0
  30. package/dist/shared/types/theme.d.ts +7 -0
  31. package/dist/shared/types/typography.d.ts +2 -1
  32. package/dist/shared/utils/load.d.ts +2 -2
  33. package/dist/shared/utils/load.js +2 -1
  34. package/dist/shared/utils/theme-config.d.ts +3 -3
  35. package/dist/shared/utils/theme-config.js +0 -1
  36. package/dist/shared/utils/theme-resolve.d.ts +11 -2
  37. package/dist/shared/utils/theme-resolve.js +18 -0
  38. package/dist/shared/utils/theme-resolver.d.ts +1 -0
  39. package/dist/shared/utils/theme-resolver.js +1 -0
  40. package/package.json +10 -1
package/README.md CHANGED
@@ -19,24 +19,25 @@
19
19
  </p>
20
20
 
21
21
  <p align="center">
22
- <img src="./docs/images/readme/theme-switcher.webp" alt="VenixThemeSwitcher going through the dark themes (Carnival, Easter, Christmas, Halloween, Ocean), then light mode and back" width="800">
22
+ <img src="./docs/images/readme/theme-switcher.webp" alt="VenixThemeSwitcher going through the dark themes (Venix, Carnival, Easter, Christmas, Halloween, Ocean), then Ocean in light and automatic mode, and its settings turning the custom scrollbar, cursor and font off and back on" width="800">
23
23
  </p>
24
24
 
25
25
  ## Features
26
26
 
27
+ * 🎨 **Color customization**, with dark and light themes included
28
+ * 🌗 **Theme and mode picked separately**: any theme (Venix, Carnival, Christmas…) in light or dark, each following the system or fixed
29
+ * 🎃 **Seasonal themes**: Carnival, Halloween, Christmas and more
27
30
  * 📝 **Typography and font faces customization**
28
- * 🖱️ **Cursor customization**
29
31
  * 📜 **Scrollbar customization**
30
- * 🎨 **Color customization**, with dark and light themes included
31
- * 🌗 **Theme and mode picked separately**: any theme (Venix Sistemas, Carnival, Christmas…) in light or dark, each following the system or fixed
32
+ * 🖱️ **Cursor customization**
33
+ * 🎛️ **Ready-made theme switcher**: accessible, phone-friendly, with no UI kit dependency
32
34
  * 🖥️ **System preference detection**, including seasonal themes by date
33
- * 🎃 **Seasonal themes**: Carnival, Halloween, Christmas and more
34
35
  * 💾 **Cookie-consent-aware persistence**: nothing is written until the user opts in
35
36
  * 🌐 **i18n**: internationalization and locale detection for theme names and your own strings
36
- * ⚡ **Nuxt-native integration**
37
+ * ✨ **Unified icons**: emoji, Iconify (animated `line-md`, `mdi`, both bundled and tree-shaken offline) or inline SVG through one component
37
38
  * 🎯 **UnoCSS preset** for the theme's color variables
38
39
  * 🎭 **Vuetify 4** theme auto-configuration, kept in sync with live theme changes
39
- * ✨ **Unified icons**: emoji, Iconify (animated `line-md`, `mdi`, both bundled and tree-shaken offline) or inline SVG through one component
40
+ * ⚡ **Nuxt-native integration**
40
41
 
41
42
  ## Installation
42
43
 
@@ -46,6 +47,8 @@ pnpm add @venix-sistemas/jade
46
47
  npm install @venix-sistemas/jade
47
48
  ```
48
49
 
50
+ <br>
51
+
49
52
  ## Quick Setup
50
53
 
51
54
  ### 1. Add the module
@@ -54,65 +57,31 @@ npm install @venix-sistemas/jade
54
57
  // nuxt.config.ts
55
58
  export default defineNuxtConfig({
56
59
  modules: ['@venix-sistemas/jade'],
57
-
58
- venixTheme: {
59
- color: {
60
- themes: {
61
- dark: {
62
- primary: '#FF6B6B',
63
- },
64
- },
65
- },
66
- },
67
60
  })
68
61
  ```
69
62
 
70
- Every module except Vuetify is on by default with built-in values, so you only configure what you want to change — the example above just swaps the dark theme's primary color. See [Modules](#modules) for what each one does.
71
-
72
- ### 2. Use the theme
63
+ No configuration is needed: every module except Vuetify is on by default with built-in values. Later, set only what you want to change under `venixTheme` — for example, the Venix theme's primary color in dark mode:
73
64
 
74
- The auto-imported `useVenixTheme()` composable gives access to the theme. It isn't called `useTheme` to avoid colliding with UI libraries (like Vuetify) that auto-import a composable with that name.
75
-
76
- The **theme** (Venix Sistemas, Carnival, Christmas…) and the **mode** (light or dark) are chosen independently; the applied colors are the theme's variant for that mode. Either can be `'system'`: an automatic theme follows the calendar ([seasonal themes](#seasonal-themes)), an automatic mode follows the OS.
77
-
78
- ```vue
79
- <template>
80
- <button @click="mode.set('dark')">Dark</button>
81
- <button @click="mode.set('light')">Light</button>
82
- <button @click="theme.set('natal')">Christmas</button>
83
- </template>
84
-
85
- <script setup lang="ts">
86
- const { theme, mode } = useVenixTheme()
87
- </script>
65
+ ```typescript
66
+ venixTheme: {
67
+ color: {
68
+ themes: {
69
+ venix: { dark: { primary: '#FF6B6B' } },
70
+ },
71
+ },
72
+ }
88
73
  ```
89
74
 
90
- It returns:
91
-
92
- - `theme` — the theme choice:
93
- - `preference`: the chosen theme (`'system'`, `'venix'`, `'carnaval'`…)
94
- - `value`: the variant actually applied, as in `data-theme` (e.g. `'natal-light'`, or `'dark'` for Venix Sistemas in dark mode)
95
- - `data`: the chosen theme's `{ value, name, icon }`
96
- - `set(name)`: picks a theme, keeping the mode
97
- - `toggle(name?)`: kept for compatibility — without a name switches the mode; `'dark'`/`'light'` select Venix Sistemas in that mode; `'system'` makes both theme and mode automatic
98
- - `isSeasonalActive`, `activeSeasonalTheme`: whether a [seasonal theme](#seasonal-themes) is currently in effect, and which one
99
- - `shouldApplyColors`, `colors`: whether the module applies colors, and the resolved color config
100
- - `themes` — every selectable theme as `{ value, name, icon, custom }`, ready to render a picker (see [Theme icons](#theme-icons)); `custom` is `true` for themes your project added in `color.themes`.
101
- - `mode` — the mode choice: `preference` (`'system'`, `'light'`, `'dark'`), `value` (the mode applied, `'light'` or `'dark'`), `data`, `set(mode)` and `toggle()`.
102
- - `modes` — the three mode options with names and icons, ready to render.
103
- - `locale` — `current`, `set()` and `translate()` (see [Translation](#translation)).
104
- - `persistence` — cookie consent controls (see [Saving the theme](#saving-the-theme-cookie-consent)).
105
-
106
- The state is shared app-wide (via Nuxt's `useState`): every component calling `useVenixTheme()` reads and writes the same theme, so they never go out of sync.
75
+ See [Modules](#modules) for what each one does.
107
76
 
108
- ### 3. Ready-made component
77
+ ### 2. Add the theme switcher
109
78
 
110
- `<VenixThemeSwitcher>` is an auto-imported dropdown with a **Mode** section (Automatic, Dark, Light) and a **Theme** section (Automatic, Venix Sistemas and the seasonal themes), followed, below a divider, by the themes your project adds itself. It has no dependency on Vuetify or any other UI kit:
79
+ `<VenixThemeSwitcher>` is an auto-imported dropdown with a **Mode** section (Automatic, Dark, Light) and a **Theme** section (Automatic, Venix and the seasonal themes), followed, below a divider, by the themes your project adds itself. It has no dependency on Vuetify or any other UI kit:
111
80
 
112
81
  <p align="center">
113
82
  <picture>
114
83
  <source media="(prefers-color-scheme: light)" srcset="./docs/images/readme/switcher-light.png">
115
- <img src="./docs/images/readme/switcher-dark.png" alt="VenixThemeSwitcher open next to the page: Mode, Theme and Custom theme sections" width="800">
84
+ <img src="./docs/images/readme/switcher-dark.png" alt="VenixThemeSwitcher open next to the page: the settings gear, then the Mode, Theme (with each seasonal theme's dates) and Custom theme sections" width="800">
116
85
  </picture>
117
86
  </p>
118
87
 
@@ -122,17 +91,9 @@ The state is shared app-wide (via Nuxt's `useState`): every component calling `u
122
91
  </template>
123
92
  ```
124
93
 
125
- | Prop | Type | Default | Description |
126
- | ----------- | --------- | ----------------------- | --------------------------------------------------- |
127
- | `label` | `string` | translated, per locale | Accessible label for the button and the menu |
128
- | `showLabel` | `boolean` | `false` | Show the theme and mode names next to the icon |
129
-
130
- - **Accessible:** arrow keys, Home/End and Esc navigate the menu, focus returns to the button on close, and each change is announced to screen readers.
131
- - **Always legible:** the menu uses fixed neutral colors (dark surface, light text) instead of the active theme's, so every option stays readable whatever theme is applied. The button itself follows the active theme.
132
- - **Lively:** animated icons (e.g. `line-md`) replay on every switch, and the button fades in on mount. The button shows the mode's icon on the base theme, and the theme's own icon when a seasonal or other theme is in effect.
133
- - **Quick:** picking a mode keeps the menu open, so mode and theme can be set in one go; picking a theme closes it.
94
+ That's it: visitors can now pick a theme and a mode, and turn the custom scrollbar, cursor and font off. See [Theme switcher](#theme-switcher) for its props, settings and styling, or [`useVenixTheme()`](#usevenixtheme) to build your own controls.
134
95
 
135
- It ships with minimal CSS of its own. To restyle it, target `.venix-theme-switcher`, `.venix-theme-switcher__trigger`, `.venix-theme-switcher__menu`, `.venix-theme-switcher__subheading` and `.venix-theme-switcher__item` (`--mode` for the mode buttons) (see [`VenixThemeSwitcher.vue`](./src/runtime/components/VenixThemeSwitcher.vue)).
96
+ <br>
136
97
 
137
98
  ## Modules
138
99
 
@@ -141,19 +102,27 @@ Jade is a set of independent modules, each configured under its own key in `veni
141
102
  | Module | Key | Default | What it does |
142
103
  | --------------------------- | ------------- | ------- | --------------------------------------------------------------------- |
143
104
  | [Colors](#colors) | `color` | `true` | Color themes (built-in, seasonal, custom) in light and dark mode, saved per user, as CSS variables and a UnoCSS preset |
144
- | [Translation](#translation) | `translation` | `true` | Detects the user's locale and translates theme names and your own strings |
145
- | [Icons](#icons) | `icon` | `true` | `<VenixIcon>`: emoji, Iconify (bundled offline) or inline SVG through one component |
146
105
  | [Typography](#typography) | `typography` | `true` | Base font family, font size and `@font-face` rules |
147
106
  | [Scrollbar](#scrollbar) | `scrollbar` | `true` | A custom scrollbar that follows the active theme |
148
107
  | [Cursor](#cursor) | `cursor` | `true` | Custom cursor images |
108
+ | [Translation](#translation) | `translation` | `true` | Detects the user's locale and translates theme names and your own strings |
109
+ | [Icons](#icons) | `icon` | `true` | `<VenixIcon>`: emoji, Iconify (bundled offline) or inline SVG through one component |
149
110
  | [Vuetify](#vuetify) | `vuetify` | `false` | Registers the color themes with Vuetify and keeps it in sync |
150
111
 
112
+ <br>
113
+
151
114
  ## Colors
152
115
 
116
+ <p align="center">
117
+ <img alt="venixTheme: color" src="https://img.shields.io/badge/venixTheme-color-00A86B?style=for-the-badge">
118
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
119
+ <img alt="third-party: none" src="https://img.shields.io/badge/third--party-none-6E7781?style=for-the-badge">
120
+ </p>
121
+
153
122
  Every theme has a light and a dark palette, exposed as CSS variables (`--color-primary`, `--color-background2`…):
154
123
 
155
124
  <p align="center">
156
- <img src="./docs/images/readme/palettes.png" alt="Color palettes: Venix Sistemas dark and light, Halloween dark, Christmas light" width="800">
125
+ <img src="./docs/images/readme/palettes.png" alt="Color palettes: Venix dark and light, Halloween dark, Christmas light" width="800">
157
126
  </p>
158
127
 
159
128
  | Option | Type | Default | Description |
@@ -162,12 +131,12 @@ Every theme has a light and a dark palette, exposed as CSS variables (`--color-p
162
131
  | `defaultColor` | `string` | `'dark'` | Initial choice with no saved preference: a theme (mode follows the OS), a variant id like `'dark'` (that theme in that mode) or `'system'` |
163
132
  | `themes` | `object` | `{}` | Override or add themes — see [Themes](#themes) |
164
133
  | `iconFormat` | `'emote' \| 'css' \| 'svg'` | `'svg'` | Preferred theme icon variant — see [Theme icons](#theme-icons) |
165
- | `requireConsent` | `boolean` | `true` | Only save the chosen theme after cookie consent — see [Saving the theme](#saving-the-theme-cookie-consent) |
134
+ | `requireConsent` | `boolean` | `true` | Only save the chosen theme after cookie consent — see [Saving preferences](#saving-preferences-cookie-consent) |
166
135
  | `seasonal` | `boolean` | `true` | Seasonal themes — `false` removes them entirely, see [Seasonal themes](#seasonal-themes) |
167
136
 
168
137
  ### Themes
169
138
 
170
- Each theme has a `light` and a `dark` variant, plus a name (`translations`) and an `icon` shared by both. The module ships with **Venix Sistemas** (`venix`) and the [seasonal themes](#seasonal-themes), all in both modes. `color.themes` extends that set:
139
+ Each theme has a `light` and a `dark` variant, plus a name (`translations`) and an `icon` shared by both. The module ships with **Venix** (`venix`) and the [seasonal themes](#seasonal-themes), all in both modes. `color.themes` extends that set:
171
140
 
172
141
  - An **existing** name overrides only the properties you set; the rest of the theme (the other variant, other colors, translations, icon) stays as shipped.
173
142
  - A **new** name adds a theme that works like a built-in one: its own CSS variables, an entry in `useVenixTheme().themes` (so it appears in `<VenixThemeSwitcher>`), and UnoCSS/Vuetify support when enabled. A theme with only one variant uses it in both modes.
@@ -193,11 +162,7 @@ color: {
193
162
 
194
163
  Available colors: `primary`, `secondary`, `accent`, `error`, `info`, `success`, `warning`, `background`, `background2`, `background3`. Each becomes a `--color-<name>` CSS variable, plus `--color-inverse` (white on dark variants, black on light ones).
195
164
 
196
- Each variant is applied as `<html data-theme="<id>">`, and the id is also its Vuetify theme name. It defaults to `<theme>-<mode>` (`summerSale-light`); set `id` on a variant to choose it. The built-in themes keep the ids they had before light/dark became separate: `dark` and `light` for Venix Sistemas, `carnaval`, `natal` and `halloween` for the dark seasonal variants (their light ones are `carnaval-light` and so on). Easter, added later, uses the default `pascoa-light` and `pascoa-dark`.
197
-
198
- #### Flat format (deprecated)
199
-
200
- Before themes had two variants, each one was a single flat set of colors with a `dark` flag (`summerSale: { dark: false, primary: '#FF8A00' }`), and built-in themes were overridden by variant name (`dark: { primary: '#FF6B6B' }`). Both still work: a flat theme becomes a theme with only that variant (same `data-theme` id as before), and an override by variant name lands on that variant. Each one logs a `[jade]` warning at build time pointing at the new format; the flat format will be removed in 2.0.
165
+ Each variant is applied as `<html data-theme="<id>">`, and the id is also its Vuetify theme name. It defaults to `<theme>-<mode>` (`summerSale-light`); set `id` on a variant to choose it. The built-in themes keep the ids they had before light/dark became separate: `dark` and `light` for Venix, `carnaval`, `natal` and `halloween` for the dark seasonal variants (their light ones are `carnaval-light` and so on). Easter, added later, uses the default `pascoa-light` and `pascoa-dark`.
201
166
 
202
167
  ### Seasonal themes
203
168
 
@@ -234,15 +199,270 @@ The built-in Carnival theme uses `easter-65` to `easter-46`: 20 days, from the p
234
199
 
235
200
  Every theme switch — manual, through the switcher, or an automatic system/seasonal change — cross-fades using the browser's native [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API), with no setup. Browsers without support switch instantly, and the animation is skipped for users with `prefers-reduced-motion: reduce`.
236
201
 
237
- ### Saving the theme (cookie consent)
202
+ ### Flat format (deprecated)
203
+
204
+ Before themes had two variants, each one was a single flat set of colors with a `dark` flag (`summerSale: { dark: false, primary: '#FF8A00' }`), and built-in themes were overridden by variant name (`dark: { primary: '#FF6B6B' }`). Both still work: a flat theme becomes a theme with only that variant (same `data-theme` id as before), and an override by variant name lands on that variant. Each one logs a `[jade]` warning at build time pointing at the new format; the flat format will be removed in 2.0.
205
+
206
+ <br>
207
+
208
+ ## Typography
209
+
210
+ <p align="center">
211
+ <img alt="venixTheme: typography" src="https://img.shields.io/badge/venixTheme-typography-00A86B?style=for-the-badge">
212
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
213
+ <a href="https://fonts.google.com/specimen/Iceberg"><img alt="font: Iceberg" src="https://img.shields.io/badge/font-Iceberg-1F6FEB?style=for-the-badge"></a>
214
+ </p>
215
+
216
+ Sets the base font for the whole app: `--font-family-base` and `--font-size-base` on `:root`, plus an `@font-face` rule for each custom font.
217
+
218
+ <p align="center">
219
+ <img src="./docs/images/readme/typography.png" alt="The Iceberg font at several sizes" width="800">
220
+ </p>
221
+
222
+ ```typescript
223
+ venixTheme: {
224
+ typography: {
225
+ defaultFonts: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", // default
226
+ fontSize: '16px', // default
227
+ customFonts: [
228
+ { name: 'MyFont', sources: { woff2: '/fonts/MyFont.woff2' }, weight: 'normal', style: 'normal', preload: true },
229
+ ],
230
+ },
231
+ }
232
+ ```
233
+
234
+ `preload: true` adds a `<link rel="preload">` for the font's first source to the page `<head>`, so it downloads with the page instead of after the CSS, avoiding a flash of the fallback font. The module's own Iceberg font is preloaded.
235
+
236
+ Custom fonts come first in `--font-family-base`, with `defaultFonts` as the fallback. The same font list also goes to Vuetify's `--v-font-body`/`--v-font-heading`, since Vuetify components don't inherit `font-family` from the page.
237
+
238
+ Visitors can turn the custom fonts off in the [switcher's settings](#theme-switcher), or you can with `font.set(false)`: the module sets `data-venix-font="off"` on `<html>`, and those three variables keep only the `defaultFonts` (or become unset without them, so your `var(--font-family-base, …)` fallback applies).
239
+
240
+ <br>
241
+
242
+ ## Scrollbar
243
+
244
+ <p align="center">
245
+ <img alt="venixTheme: scrollbar" src="https://img.shields.io/badge/venixTheme-scrollbar-00A86B?style=for-the-badge">
246
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
247
+ <img alt="third-party: OverlayScrollbars (optional)" src="https://img.shields.io/badge/third--party-OverlayScrollbars_(optional)-6E7781?style=for-the-badge">
248
+ </p>
249
+
250
+ A custom scrollbar whose colors follow the active theme. The values below are the defaults:
251
+
252
+ <p align="center">
253
+ <img src="./docs/images/readme/scrollbar.png" alt="Vertical and horizontal scrollbars in the theme colors" width="800">
254
+ </p>
255
+
256
+ ```typescript
257
+ venixTheme: {
258
+ scrollbar: {
259
+ // Draws the scrollbars with OverlayScrollbars, so the custom cursor shows over them (see below)
260
+ overlay: false,
261
+ width: 'auto', // 10px for the overlay scrollbar
262
+ borderRadius: '8px',
263
+ borderWidth: '3px', // native scrollbar only
264
+ // A theme color name (follows the active theme) or any CSS color; `border` is native only
265
+ colors: { thumb: 'primary', thumbHover: 'secondary', track: 'background2', border: 'background3' },
266
+ },
267
+ }
268
+ ```
269
+
270
+ The scrollbars are the browser's own, styled with CSS. The CSS-styled scrollbar uses `::-webkit-scrollbar` in Chromium-based browsers and Safari, and `scrollbar-color` in Firefox, which only takes the colors (no border, radius or hover color). Chromium-based browsers (Chrome, Edge, Brave, Opera) draw a scrollbar styled this way as part of the page, so the [custom cursor](#cursor) shows over it too, the pointer over the thumb.
271
+
272
+ Visitors can turn it off in the [switcher's settings](#theme-switcher), or you can with `scrollbar.set(false)` from `useVenixTheme()`: the module then sets `data-venix-scrollbar="off"` on `<html>` and the browser's own scrollbar comes back.
273
+
274
+ ### Overlay scrollbar (optional)
275
+
276
+ Firefox draws its scrollbar outside the page, and so does every browser for an unstyled one: those ignore the CSS `cursor`, so hovering them shows the system cursor even with the [custom cursor](#cursor) on. With `overlay: true` the scrollbars are drawn by [OverlayScrollbars](https://github.com/KingSora/OverlayScrollbars) instead, as page elements, which the custom cursor applies to (the pointer, since they can be dragged and clicked). It's off by default while it gets tried out in more sites and on phones.
277
+
278
+ OverlayScrollbars doesn't come with the module (it's an optional peer dependency): add it to your project, then turn the option on. With the option on and the package missing, the build warns and keeps the CSS-styled scrollbar.
279
+
280
+ ```bash
281
+ pnpm add overlayscrollbars
282
+ ```
283
+
284
+ ```typescript
285
+ venixTheme: {
286
+ scrollbar: { overlay: true },
287
+ }
288
+ ```
289
+
290
+ It covers:
291
+
292
+ - the page itself (`window.scrollTo` and the like keep working);
293
+ - Vuetify's scroll containers: navigation drawers, scrollable dialogs, `v-select` menus and tables, including the page and containers behind an open dialog staying locked;
294
+ - any element of yours that scrolls, marked with `data-venix-scroll`:
295
+
296
+ ```html
297
+ <div data-venix-scroll style="height: 300px; overflow: auto">…</div>
298
+ ```
299
+
300
+ Everything else keeps the browser's scrollbar, styled with CSS. Scrolling itself stays the browser's own, so smooth scrolling (`scroll-behavior: smooth`, `scrollTo({ behavior: 'smooth' })`), GSAP's ScrollTrigger, ScrollToPlugin and ScrollSmoother, and Lenis keep working. With `overlay: false` OverlayScrollbars isn't added to the bundle at all.
301
+
302
+ <br>
303
+
304
+ ## Cursor
305
+
306
+ <p align="center">
307
+ <img alt="venixTheme: cursor" src="https://img.shields.io/badge/venixTheme-cursor-00A86B?style=for-the-badge">
308
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
309
+ <img alt="third-party: none" src="https://img.shields.io/badge/third--party-none-6E7781?style=for-the-badge">
310
+ </p>
311
+
312
+ Replaces the default, pointer and text cursors. On by default; set `cursor: false` to keep the system's cursors. Visitors can also turn it off for themselves in the [switcher's settings](#theme-switcher) (or you with `cursor.set(false)`), which sets `data-venix-cursor="off"` on `<html>`:
313
+
314
+ <p align="center">
315
+ <img src="./docs/images/readme/cursor.png" alt="The default, pointer and text cursors" width="800">
316
+ </p>
317
+
318
+ - **`defaultCursors`**: the default cursors, the module's fire images unless you set your own. They show with `themed: false`, in browsers that can't load the drawn cursors and for themes without a `primary`.
319
+ - **`themed`** (on by default): draws each cursor as an SVG in the active color theme's `primary`, so it changes along with the theme. Custom themes get one too, with nothing to draw.
320
+ - **`themeCursors`**: the cursor of a single color theme, by theme name (both modes) or variant id (just that one, which wins over the theme name). It is merged with the module's own entry, `venix: 'base'`, which keeps the Venix theme on the default cursors.
321
+
322
+ <p align="center">
323
+ <img src="./docs/images/readme/cursor-themes.png" alt="The cursors of each built-in theme, dark and light: Venix on the fire images ('base'), Carnival, Easter, Christmas and Halloween drawn in their own color ('themed')" width="800">
324
+ </p>
325
+
326
+ | `themeCursors` value | Cursor shown |
327
+ | --- | --- |
328
+ | `'base'` | the `defaultCursors` (the module's fire cursors, unless you set your own) |
329
+ | `'themed'` | drawn in the theme's `primary` |
330
+ | `'none'` | no custom cursor: the operating system's own |
331
+ | `{ pointer: { path, hotspot } }` | its own images; the cursors left out show as if the theme had no entry |
332
+
333
+ ```typescript
334
+ venixTheme: {
335
+ cursor: {
336
+ // `false` shows the default cursors in every theme without an entry in `themeCursors`
337
+ themed: true,
338
+ // Images served from `public/`; `hotspot` is the click point ("x y")
339
+ defaultCursors: {
340
+ default: { path: '/cursors/default.png', hotspot: '0 0' },
341
+ pointer: { path: '/cursors/pointer.png', hotspot: '0 0' },
342
+ text: { path: '/cursors/text.png', hotspot: '0 0' },
343
+ },
344
+ themeCursors: {
345
+ // Its own pointer; default and text are still drawn in its color
346
+ 'halloween': { pointer: { path: '/cursors/pumpkin.png', hotspot: '8 0' } },
347
+ 'natal': 'none',
348
+ // Drawn in its color, instead of the default cursors
349
+ 'venix': 'themed',
350
+ // Only the light variant of Carnival
351
+ 'carnaval-light': 'base',
352
+ },
353
+ },
354
+ }
355
+ ```
356
+
357
+ > [!NOTE]
358
+ > `defaultCursors` was called `cursors` up to 1.2. The old name still works, with a warning, until 2.0.
359
+
360
+ > [!NOTE]
361
+ > Keep cursor images at **32×32 pixels or smaller**. Browsers accept larger cursors (Chromium up to 128×128), but Chromium falls back to the system cursor whenever a cursor larger than 32×32 would overlap the browser UI, so it flickers near the edges of the window.
362
+ >
363
+ > Browser-drawn UI ignores the CSS `cursor` property and always shows the system cursor. That includes native scrollbars, `<select>` dropdowns, date and color pickers, and the `<textarea>` resize handle.
364
+
365
+ <br>
366
+
367
+ ## Theme switcher
368
+
369
+ <p align="center">
370
+ <img alt="component: &lt;VenixThemeSwitcher&gt;" src="https://img.shields.io/badge/component-%3CVenixThemeSwitcher%3E-00A86B?style=for-the-badge">
371
+ <img alt="UI kit: none needed" src="https://img.shields.io/badge/UI_kit-none_needed-2EA44F?style=for-the-badge">
372
+ </p>
373
+
374
+ `<VenixThemeSwitcher>` (see [Quick Setup](#2-add-the-theme-switcher)) takes these props:
375
+
376
+ | Prop | Type | Default | Description |
377
+ | ----------- | --------- | ----------------------- | --------------------------------------------------- |
378
+ | `label` | `string` | translated, per locale | Accessible label for the button and the menu |
379
+ | `showLabel` | `boolean` | `false` | Show the theme and mode names next to the icon |
380
+ | `hideConsent` | `boolean` | `false` | Leave "Save changes" out of the settings, when your own cookie banner already asks |
381
+
382
+ The gear next to the title opens the **settings**, a few switches for the visitor:
383
+
384
+ <p align="center">
385
+ <picture>
386
+ <source media="(prefers-color-scheme: light)" srcset="./docs/images/readme/switcher-settings-light.png">
387
+ <img src="./docs/images/readme/switcher-settings-dark.png" alt="VenixThemeSwitcher settings: Save changes, Custom scrollbar, Custom cursor and Custom font switches" width="800">
388
+ </picture>
389
+ </p>
390
+
391
+ - **Save changes** — whether their choices are remembered on the next visit: it grants or revokes [cookie consent](#saving-preferences-cookie-consent) (`persistence.grant()`/`revoke()`). Shown only while `color.requireConsent` is on, and not with `hideConsent`.
392
+ - **Custom scrollbar**, **Custom cursor** and **Custom font** — turn the module's [scrollbar](#scrollbar), [cursor](#cursor) or [custom fonts](#typography) off and back on (`scrollbar.set()`/`cursor.set()`/`font.set()`). Each shown only when the project has it on (for the font: `typography` with at least one `customFonts` entry).
393
+
394
+ Without any of them, the gear isn't shown. At the bottom, in small faint print, the settings credit the module with a link to its repository.
395
+
396
+ - **Accessible:** arrow keys, Home/End and Esc navigate the menu, focus returns to the button on close, and each change is announced to screen readers.
397
+ - **Always legible:** the menu uses fixed neutral colors (dark surface, light text) instead of the active theme's, so every option stays readable whatever theme is applied. The button itself follows the active theme.
398
+ - **Seasons at a glance:** each seasonal theme shows its dates in small faint print beside its name (e.g. `01/10 a 31/10` in Portuguese, `10/01 – 10/31` in English) — the running occurrence, or the next one once this year's is over, so themes relative to Easter show the right year's dates.
399
+ - **Lively:** animated icons (e.g. `line-md`) replay on every switch, and the button fades in on mount. The button shows the mode's icon on the base theme, and the theme's own icon when a seasonal or other theme is in effect.
400
+ - **Quick:** picking a mode or a theme keeps the menu open, so both can be set in one go; it closes on the button, a click or tap outside, or Esc.
401
+ - **Fits on phones:** the menu always stays on screen: it opens upward when there's more room above the button, shifts sideways near an edge, and scrolls inside itself when it's taller than the space left (refitted when the screen rotates). On touch screens its targets are bigger, hover highlights are off, and the custom cursor's switch is hidden, since there's no cursor to show.
402
+
403
+ It ships with minimal CSS of its own. To restyle it, target `.venix-theme-switcher`, `.venix-theme-switcher__trigger`, `.venix-theme-switcher__menu`, `.venix-theme-switcher__subheading`, `.venix-theme-switcher__item` (`--mode` for the mode buttons, `--toggle` for the settings), `.venix-theme-switcher__icon-button` (the gear and back buttons) and `.venix-theme-switcher__switch` (see [`VenixThemeSwitcher.vue`](./src/runtime/components/VenixThemeSwitcher.vue)).
404
+
405
+ <br>
406
+
407
+ ## `useVenixTheme()`
408
+
409
+ <p align="center">
410
+ <img alt="composable: useVenixTheme()" src="https://img.shields.io/badge/composable-useVenixTheme()-00A86B?style=for-the-badge">
411
+ <img alt="auto-imported: yes" src="https://img.shields.io/badge/auto--imported-yes-2EA44F?style=for-the-badge">
412
+ </p>
413
+
414
+ The auto-imported `useVenixTheme()` composable gives access to the theme. It isn't called `useTheme` to avoid colliding with UI libraries (like Vuetify) that auto-import a composable with that name.
415
+
416
+ The **theme** (Venix, Carnival, Christmas…) and the **mode** (light or dark) are chosen independently; the applied colors are the theme's variant for that mode. Either can be `'system'`: an automatic theme follows the calendar ([seasonal themes](#seasonal-themes)), an automatic mode follows the OS.
417
+
418
+ ```vue
419
+ <template>
420
+ <button @click="mode.set('dark')">Dark</button>
421
+ <button @click="mode.set('light')">Light</button>
422
+ <button @click="theme.set('natal')">Christmas</button>
423
+ </template>
424
+
425
+ <script setup lang="ts">
426
+ const { theme, mode } = useVenixTheme()
427
+ </script>
428
+ ```
429
+
430
+ It returns:
431
+
432
+ - `theme` — the theme choice:
433
+ - `preference`: the chosen theme (`'system'`, `'venix'`, `'carnaval'`…)
434
+ - `value`: the variant actually applied, as in `data-theme` (e.g. `'natal-light'`, or `'dark'` for Venix in dark mode)
435
+ - `data`: the chosen theme's `{ value, name, icon }`
436
+ - `set(name)`: picks a theme, keeping the mode
437
+ - `toggle(name?)`: kept for compatibility — without a name switches the mode; `'dark'`/`'light'` select Venix in that mode; `'system'` makes both theme and mode automatic
438
+ - `isSeasonalActive`, `activeSeasonalTheme`: whether a [seasonal theme](#seasonal-themes) is currently in effect, and which one
439
+ - `shouldApplyColors`, `colors`: whether the module applies colors, and the resolved color config
440
+ - `themes` — every selectable theme as `{ value, name, icon, custom }`, ready to render a picker (see [Theme icons](#theme-icons)); `custom` is `true` for themes your project added in `color.themes`.
441
+ - `mode` — the mode choice: `preference` (`'system'`, `'light'`, `'dark'`), `value` (the mode applied, `'light'` or `'dark'`), `data`, `set(mode)` and `toggle()`.
442
+ - `modes` — the three mode options with names and icons, ready to render.
443
+ - `scrollbar` / `cursor` / `font` — the visitor's switch for the custom [scrollbar](#scrollbar), [cursor](#cursor) and [font](#typography): `available` (the project has it on), `enabled` (a `Ref<boolean>`, `true` unless the visitor turned it off) and `set(enabled)`.
444
+ - `locale` — `current`, `set()` and `translate()` (see [Translation](#translation)).
445
+ - `persistence` — cookie consent controls (see [Saving preferences](#saving-preferences-cookie-consent)).
446
+
447
+ The state is shared app-wide (via Nuxt's `useState`): every component calling `useVenixTheme()` reads and writes the same theme, so they never go out of sync.
448
+
449
+ <br>
238
450
 
239
- Three cookies remember the user's choice between visits, for a year:
451
+ ## Saving preferences (cookie consent)
452
+
453
+ <p align="center">
454
+ <img alt="venixTheme: color.requireConsent" src="https://img.shields.io/badge/venixTheme-color.requireConsent-00A86B?style=for-the-badge">
455
+ <img alt="default: waits for consent" src="https://img.shields.io/badge/default-waits_for_consent-2EA44F?style=for-the-badge">
456
+ </p>
457
+
458
+ These cookies remember the visitor's choices between visits, for a year:
240
459
 
241
460
  | Cookie | Stores |
242
461
  | ------------------------ | ------------------------------------------------------------------------------------------------------- |
243
462
  | `venix-theme-preference` | The chosen theme (`'system'`, `'venix'`, a custom theme…) |
244
463
  | `venix-theme-mode` | The chosen mode (`'system'`, `'light'`, `'dark'`) |
245
464
  | `venix-theme-resolved` | The variant last applied (e.g. `'natal-light'`) — lets SSR guess light or dark when the mode is `'system'` |
465
+ | `venix-scrollbar`, `venix-cursor`, `venix-font` | `'off'` when the visitor turned the custom scrollbar, cursor or font off, `'on'` otherwise |
246
466
 
247
467
  The theme itself is always recomputed from the first two (with `'system'`, by today's date and the OS color scheme), so a saved seasonal theme never outlives its season.
248
468
 
@@ -264,6 +484,7 @@ const { persistence } = useVenixTheme()
264
484
  </template>
265
485
  ```
266
486
 
487
+ - `persistence.required` — `color.requireConsent`: whether anything waits for consent at all.
267
488
  - `persistence.hasConsent` — reactive `Ref<boolean>`, shared app-wide.
268
489
  - `persistence.grant()` — records consent and saves the current theme to the cookies right away.
269
490
  - `persistence.revoke()` — records the refusal and deletes the theme cookies right away.
@@ -288,33 +509,16 @@ venixTheme: {
288
509
 
289
510
  Consent is then ignored for the theme cookies and for the locale cookie written by `locale.set()` (see [Translation](#translation)): `persistence.revoke()` no longer deletes them. Whether that's acceptable is a decision for each app.
290
511
 
291
- ### Content-Security-Policy
292
-
293
- To avoid a wrong-theme flash, a small inline script in `<head>` applies the theme before the page renders. Under a strict CSP that blocks inline scripts, it needs the request's nonce: with [`nuxt-security`](https://nuxt-security.vercel.app) and nonces enabled, the module adds it automatically (from `event.context.security.nonce`).
294
-
295
- ### UnoCSS preset
296
-
297
- Add the preset to your `uno.config.ts` to use the theme colors as utilities (`text-primary`, `bg-background2`, `border-accent`, …):
298
-
299
- ```typescript
300
- // uno.config.ts
301
- import { defineConfig } from 'unocss'
302
- import { venixUnoPreset } from '@venix-sistemas/jade/unocss'
303
-
304
- export default defineConfig({
305
- presets: [
306
- venixUnoPreset(),
307
- // ...your other presets
308
- ],
309
- })
310
- ```
311
-
312
- It maps every [theme color](#themes), plus `inverse`, to its CSS variable (`primary: 'var(--color-primary)'`, …), so utilities follow the active theme. Colors you define yourself in `uno.config.ts` take precedence.
313
-
314
- The preset has to be added by hand: `@unocss/nuxt` re-reads `uno.config.ts` from disk and discards a `theme` injected by other modules whenever your file declares its own `theme` key. As a preset in your own file, the colors survive that.
512
+ <br>
315
513
 
316
514
  ## Translation
317
515
 
516
+ <p align="center">
517
+ <img alt="venixTheme: translation" src="https://img.shields.io/badge/venixTheme-translation-00A86B?style=for-the-badge">
518
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
519
+ <a href="https://i18n.nuxtjs.org"><img alt="works with: @nuxtjs/i18n" src="https://img.shields.io/badge/works_with-%40nuxtjs%2Fi18n-1F6FEB?style=for-the-badge"></a>
520
+ </p>
521
+
318
522
  Detects the user's locale to translate the theme names (each theme's `translations`), `<VenixThemeSwitcher>`'s own strings and, optionally, your own strings.
319
523
 
320
524
  | Option | Type | Default | Description |
@@ -332,7 +536,7 @@ The locale is detected in this order:
332
536
  4. The `Accept-Language` header (SSR) or `navigator.language` (client)
333
537
  5. `translation.defaultLocale`
334
538
 
335
- With `translation: false`, detection is off: theme names and the switcher's strings always use `defaultLocale`, and `locale.set()` never writes the cookie. When it's on, `locale.set()` only writes the cookie after [cookie consent](#saving-the-theme-cookie-consent), unless `color.requireConsent` is `false`.
539
+ With `translation: false`, detection is off: theme names and the switcher's strings always use `defaultLocale`, and `locale.set()` never writes the cookie. When it's on, `locale.set()` only writes the cookie after [cookie consent](#saving-preferences-cookie-consent), unless `color.requireConsent` is `false`.
336
540
 
337
541
  ### Using your own translations
338
542
 
@@ -360,8 +564,17 @@ venixTheme: {
360
564
 
361
565
  Keep it off with `@nuxtjs/i18n` or similar: that module follows the current route and should own `lang`, while this module's detection can briefly disagree with it (e.g. right after navigating to a localized route) and the two would fight over the attribute.
362
566
 
567
+ <br>
568
+
363
569
  ## Icons
364
570
 
571
+ <p align="center">
572
+ <img alt="venixTheme: icon" src="https://img.shields.io/badge/venixTheme-icon-00A86B?style=for-the-badge">
573
+ <img alt="default: on" src="https://img.shields.io/badge/default-on-2EA44F?style=for-the-badge">
574
+ <a href="https://github.com/nuxt/icon"><img alt="uses: @nuxt/icon" src="https://img.shields.io/badge/uses-%40nuxt%2Ficon-1F6FEB?style=for-the-badge"></a>
575
+ <a href="https://icon-sets.iconify.design/"><img alt="icons: Iconify" src="https://img.shields.io/badge/icons-Iconify-1F6FEB?style=for-the-badge"></a>
576
+ </p>
577
+
365
578
  <p align="center">
366
579
  <img src="./docs/images/readme/icons.png" alt="VenixIcon rendering an animated Iconify icon, an emoji, inline SVG and aliases" width="800">
367
580
  </p>
@@ -464,76 +677,44 @@ A theme's `icon` (shown by pickers such as `<VenixThemeSwitcher>`) is either a p
464
677
  />
465
678
  ```
466
679
 
467
- ## Typography
468
-
469
- Sets the base font for the whole app: `--font-family-base` and `--font-size-base` on `:root`, plus an `@font-face` rule for each custom font.
680
+ <br>
470
681
 
471
- <p align="center">
472
- <img src="./docs/images/readme/typography.png" alt="The Iceberg font at several sizes" width="800">
473
- </p>
682
+ ## Integrations
474
683
 
475
- ```typescript
476
- venixTheme: {
477
- typography: {
478
- defaultFonts: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", // default
479
- fontSize: '16px', // default
480
- customFonts: [
481
- { name: 'MyFont', sources: { woff2: '/fonts/MyFont.woff2' }, weight: 'normal', style: 'normal' },
482
- ],
483
- },
484
- }
485
- ```
486
-
487
- Custom fonts come first in `--font-family-base`, with `defaultFonts` as the fallback. The same font list also goes to Vuetify's `--v-font-body`/`--v-font-heading`, since Vuetify components don't inherit `font-family` from the page.
488
-
489
- ## Scrollbar
490
-
491
- A custom scrollbar whose colors follow the active theme. The values below are the defaults:
684
+ ### UnoCSS preset
492
685
 
493
686
  <p align="center">
494
- <img src="./docs/images/readme/scrollbar.png" alt="Vertical and horizontal scrollbars in the theme colors" width="800">
687
+ <img alt="import: @venix-sistemas/jade/unocss" src="https://img.shields.io/badge/import-%40venix--sistemas%2Fjade%2Funocss-00A86B?style=for-the-badge">
688
+ <a href="https://unocss.dev"><img alt="requires: UnoCSS" src="https://img.shields.io/badge/requires-UnoCSS-1F6FEB?style=for-the-badge"></a>
495
689
  </p>
496
690
 
691
+ Add the preset to your `uno.config.ts` to use the theme colors as utilities (`text-primary`, `bg-background2`, `border-accent`, …):
692
+
497
693
  ```typescript
498
- venixTheme: {
499
- scrollbar: {
500
- width: 'auto',
501
- borderRadius: '8px',
502
- borderWidth: '3px',
503
- // A theme color name (follows the active theme) or any CSS color
504
- colors: { thumb: 'primary', thumbHover: 'secondary', track: 'background2', border: 'background3' },
505
- },
506
- }
694
+ // uno.config.ts
695
+ import { defineConfig } from 'unocss'
696
+ import { venixUnoPreset } from '@venix-sistemas/jade/unocss'
697
+
698
+ export default defineConfig({
699
+ presets: [
700
+ venixUnoPreset(),
701
+ // ...your other presets
702
+ ],
703
+ })
507
704
  ```
508
705
 
509
- ## Cursor
706
+ It maps every [theme color](#themes), plus `inverse`, to its CSS variable (`primary: 'var(--color-primary)'`, …), so utilities follow the active theme. Colors you define yourself in `uno.config.ts` take precedence.
707
+
708
+ The preset has to be added by hand: `@unocss/nuxt` re-reads `uno.config.ts` from disk and discards a `theme` injected by other modules whenever your file declares its own `theme` key. As a preset in your own file, the colors survive that.
510
709
 
511
- Replaces the default, pointer and text cursors with images. On by default, using the module's own cursor images; point it at yours to customize, or set `cursor: false` to keep the browser's cursors:
710
+ ### Vuetify
512
711
 
513
712
  <p align="center">
514
- <img src="./docs/images/readme/cursor.png" alt="The default, pointer and text cursors" width="800">
713
+ <img alt="venixTheme: vuetify" src="https://img.shields.io/badge/venixTheme-vuetify-00A86B?style=for-the-badge">
714
+ <img alt="default: off" src="https://img.shields.io/badge/default-off-6E7781?style=for-the-badge">
715
+ <a href="https://nuxt.vuetifyjs.com"><img alt="requires: vuetify-nuxt-module" src="https://img.shields.io/badge/requires-vuetify--nuxt--module-1F6FEB?style=for-the-badge"></a>
515
716
  </p>
516
717
 
517
- ```typescript
518
- venixTheme: {
519
- cursor: {
520
- // Images served from `public/`; `hotspot` is the click point ("x y")
521
- cursors: {
522
- default: { path: '/cursors/default.png', hotspot: '0 0' },
523
- pointer: { path: '/cursors/pointer.png', hotspot: '0 0' },
524
- text: { path: '/cursors/text.png', hotspot: '0 0' },
525
- },
526
- },
527
- }
528
- ```
529
-
530
- > [!NOTE]
531
- > Keep cursor images at **32×32 pixels or smaller**. Browsers accept larger cursors (Chromium up to 128×128), but Chromium falls back to the system cursor whenever a cursor larger than 32×32 would overlap the browser UI, so it flickers near the edges of the window.
532
- >
533
- > Browser-drawn UI ignores the CSS `cursor` property and always shows the system cursor. That includes native scrollbars, `<select>` dropdowns, date and color pickers, and the `<textarea>` resize handle.
534
-
535
- ## Vuetify
536
-
537
718
  With [`vuetify-nuxt-module`](https://nuxt.vuetifyjs.com) installed, `vuetify: true` registers every color theme with Vuetify and keeps its active theme in sync — no hand-written `theme.themes` mapping:
538
719
 
539
720
  ```typescript
@@ -556,6 +737,35 @@ export default defineNuxtConfig({
556
737
 
557
738
  It's opt-in because it adds a runtime plugin, and it does nothing if `vuetify-nuxt-module` isn't installed. Tested with Vuetify `^4.2.1` and `vuetify-nuxt-module@1.0.0-rc.6`; that module is still pre-1.0, so its hooks may change.
558
739
 
740
+ ### Content-Security-Policy
741
+
742
+ <p align="center">
743
+ <a href="https://nuxt-security.vercel.app"><img alt="works with: nuxt-security" src="https://img.shields.io/badge/works_with-nuxt--security-1F6FEB?style=for-the-badge"></a>
744
+ </p>
745
+
746
+ To avoid a wrong-theme flash, a small inline script in `<head>` applies the theme before the page renders. Under a strict CSP that blocks inline scripts, it needs the request's nonce: with [`nuxt-security`](https://nuxt-security.vercel.app) and nonces enabled, the module adds it automatically (from `event.context.security.nonce`).
747
+
748
+ <br>
749
+
750
+ ## Third-party packages
751
+
752
+ Colors, typography, scrollbar, cursor, translation and the switcher are Jade's own code, with no package behind them (the overlay scrollbar aside). These come from third parties:
753
+
754
+ | Package | Used for | How it's included | License |
755
+ | ------- | -------- | ----------------- | ------- |
756
+ | [`@nuxt/icon`](https://github.com/nuxt/icon) | Renders Iconify icons for `<Icon>` and `<VenixIcon>` ([Icons](#icons)) | Installed with Jade; skipped with `icon: false` | MIT |
757
+ | [`@iconify/utils`](https://github.com/iconify/iconify) | Picks the icons to bundle offline ([Offline icon collections](#offline-icon-collections)) | Installed with Jade | MIT |
758
+ | [`@iconify-json/line-md`](https://github.com/cyberalien/line-md) | Animated Material Line Icons, by Vjacheslav Trushkin | Installed with Jade, bundled by default | MIT |
759
+ | [`@iconify-json/mdi`](https://github.com/Templarian/MaterialDesign) | Material Design Icons, by Pictogrammers, used by the built-in themes | Installed with Jade, only the icons used are bundled | Apache 2.0 |
760
+ | [Iceberg](https://fonts.google.com/specimen/Iceberg) | The module's default custom font ([Typography](#typography)) | Shipped in the package | SIL OFL 1.1 |
761
+ | [OverlayScrollbars](https://github.com/KingSora/OverlayScrollbars) | Scrollbars the custom cursor shows over ([Overlay scrollbar](#overlay-scrollbar-optional)) | Optional, installed by you | MIT |
762
+ | [UnoCSS](https://unocss.dev) | Theme colors as utilities ([UnoCSS preset](#unocss-preset)) | Optional, installed by you | MIT |
763
+ | [Vuetify](https://vuetifyjs.com) + [`vuetify-nuxt-module`](https://nuxt.vuetifyjs.com) | Theme sync with Vuetify ([Vuetify](#vuetify)) | Optional, installed by you | MIT |
764
+ | [`nuxt-security`](https://nuxt-security.vercel.app) | Nonce for the theme script under a strict CSP ([Content-Security-Policy](#content-security-policy)) | Optional, installed by you | MIT |
765
+ | [`@nuxtjs/i18n`](https://i18n.nuxtjs.org) | Shares its locale cookie with [Translation](#translation) | Optional, installed by you | MIT |
766
+
767
+ <br>
768
+
559
769
  ## Development
560
770
 
561
771
  | Command | Description |