@maz-ui/themes 4.1.7-beta.0 → 4.1.7-beta.5

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 (43) hide show
  1. package/README.md +19 -15
  2. package/dist/build/index.js +48 -46
  3. package/dist/chunks/isServer.BAlEcRRr.js +6 -0
  4. package/dist/composables/index.js +3 -4
  5. package/dist/composables/useTheme.js +89 -147
  6. package/dist/define-preset.js +7 -7
  7. package/dist/index.js +33 -35
  8. package/dist/plugin/index.js +4 -2
  9. package/dist/plugin.js +114 -37
  10. package/dist/presets/index.js +8 -8
  11. package/dist/presets/mazUi.js +2 -2
  12. package/dist/presets/obsidian.js +2 -2
  13. package/dist/presets/ocean.js +2 -2
  14. package/dist/presets/pristine.js +2 -2
  15. package/dist/types/build/index.d.ts +7 -4
  16. package/dist/types/build/index.d.ts.map +1 -1
  17. package/dist/types/composables/useTheme.d.ts +49 -8
  18. package/dist/types/composables/useTheme.d.ts.map +1 -1
  19. package/dist/types/plugin.d.ts +7 -6
  20. package/dist/types/plugin.d.ts.map +1 -1
  21. package/dist/types/types/index.d.ts +41 -3
  22. package/dist/types/types/index.d.ts.map +1 -1
  23. package/dist/types/utils/cookie-storage.d.ts.map +1 -1
  24. package/dist/types/utils/css-generator.d.ts +12 -22
  25. package/dist/types/utils/css-generator.d.ts.map +1 -1
  26. package/dist/types/utils/get-color-mode.d.ts +2 -1
  27. package/dist/types/utils/get-color-mode.d.ts.map +1 -1
  28. package/dist/types/utils/index.d.ts +2 -0
  29. package/dist/types/utils/index.d.ts.map +1 -1
  30. package/dist/types/utils/no-transition.d.ts +2 -0
  31. package/dist/types/utils/no-transition.d.ts.map +1 -0
  32. package/dist/types/utils/update-document-class.d.ts +3 -0
  33. package/dist/types/utils/update-document-class.d.ts.map +1 -0
  34. package/dist/utils/color-utils.js +41 -41
  35. package/dist/utils/cookie-storage.js +9 -8
  36. package/dist/utils/css-generator.js +120 -143
  37. package/dist/utils/get-color-mode.js +17 -10
  38. package/dist/utils/get-preset.js +20 -20
  39. package/dist/utils/index.js +24 -21
  40. package/dist/utils/no-transition.js +18 -0
  41. package/dist/utils/preset-merger.js +21 -21
  42. package/dist/utils/update-document-class.js +9 -0
  43. package/package.json +6 -6
package/README.md CHANGED
@@ -23,14 +23,15 @@ npm install @maz-ui/themes
23
23
  ### 1. Plugin installation
24
24
 
25
25
  ```typescript
26
- import { MazUiTheme } from '@maz-ui/themes'
27
26
  // main.ts
27
+ import { MazUiTheme } from '@maz-ui/themes/plugin'
28
+ import { mazUi } from '@maz-ui/themes/presets/mazUi'
28
29
  import { createApp } from 'vue'
29
30
 
30
31
  const app = createApp(App)
31
32
 
32
33
  app.use(MazUiTheme, {
33
- preset: 'maz-ui',
34
+ preset: mazUi,
34
35
  strategy: 'hybrid',
35
36
  darkModeStrategy: 'class'
36
37
  })
@@ -40,9 +41,9 @@ app.use(MazUiTheme, {
40
41
 
41
42
  ```vue
42
43
  <script setup>
43
- import { useMazTheme } from '@maz-ui/themes'
44
+ import { useTheme } from '@maz-ui/themes'
44
45
 
45
- const { toggleDarkMode, isDark } = useMazTheme()
46
+ const { toggleDarkMode, isDark } = useTheme()
46
47
  </script>
47
48
 
48
49
  <template>
@@ -59,28 +60,28 @@ const { toggleDarkMode, isDark } = useMazTheme()
59
60
 
60
61
  ## Available presets
61
62
 
62
- ### Default (Shadcn-like)
63
+ ### Default
63
64
 
64
65
  ```typescript
65
- import { mazUi } from '@maz-ui/themes'
66
+ import { mazUi } from '@maz-ui/themes/presets/mazUi'
66
67
  ```
67
68
 
68
- ### Dark
69
+ ### Pristine
69
70
 
70
71
  ```typescript
71
- import { dark } from '@maz-ui/themes'
72
+ import { pristine } from '@maz-ui/themes/presets/pristine'
72
73
  ```
73
74
 
74
75
  ### Ocean
75
76
 
76
77
  ```typescript
77
- import { ocean } from '@maz-ui/themes'
78
+ import { ocean } from '@maz-ui/themes/presets/ocean'
78
79
  ```
79
80
 
80
81
  ### Obsidian
81
82
 
82
83
  ```typescript
83
- import { obsidian } from '@maz-ui/themes'
84
+ import { obsidian } from '@maz-ui/themes/presets/obsidian'
84
85
  ```
85
86
 
86
87
  ## Creating custom presets
@@ -110,15 +111,18 @@ const myPreset = definePreset({
110
111
  ## Composable API
111
112
 
112
113
  ```typescript
114
+ import { useTheme } from '@maz-ui/themes'
115
+
113
116
  const {
114
- currentPreset, // Ref<ThemePreset>
117
+ preset, // ComputedRef<ThemePreset>
118
+ presetName, // ComputedRef<string>
115
119
  colorMode, // Ref<'light' | 'dark' | 'auto'>
116
- isDark, // Ref<boolean>
117
- strategy, // Ref<'runtime' | 'build' | 'hybrid'>
120
+ isDark, // ComputedRef<boolean>
121
+ strategy, // ComputedRef<'runtime' | 'build' | 'hybrid'>
118
122
  updateTheme, // (preset: ThemePreset | ThemePresetName | ThemePresetOverrides) => void
119
123
  setColorMode, // (mode: 'light' | 'dark' | 'auto') => void
120
- toggleDarkMode // () => void
121
- } = useMazTheme()
124
+ toggleDarkMode, // () => void
125
+ } = useTheme()
122
126
  ```
123
127
 
124
128
  ## Strategies
@@ -1,56 +1,58 @@
1
- import { generateCriticalCSS as o, generateFullCSS as d } from "../utils/css-generator.js";
2
- function s(t) {
1
+ import { generateCSS } from "../utils/css-generator.js";
2
+ function buildThemeCSS(options) {
3
3
  const {
4
- preset: e,
5
- mode: a = "both",
6
- darkSelector: l = "class",
7
- prefix: r = "maz",
8
- criticalOnly: i = !1
9
- } = t, c = {
10
- mode: a,
11
- darkSelectorStrategy: l,
12
- prefix: r
13
- };
14
- if (i)
15
- return o(e, c);
16
- const n = o(e, c), m = d(e, c);
17
- return `${n}
18
- ${m}`;
4
+ preset,
5
+ mode = "both",
6
+ darkSelector = "class",
7
+ prefix = "maz",
8
+ darkClass = "dark",
9
+ criticalOnly = !1
10
+ } = options, cssOptions = {
11
+ mode,
12
+ darkSelectorStrategy: darkSelector,
13
+ prefix,
14
+ darkClass
15
+ }, criticalCSS = generateCSS(preset, { ...cssOptions, onlyCritical: !0 });
16
+ if (criticalOnly)
17
+ return criticalCSS;
18
+ const fullCSS = generateCSS(preset, cssOptions);
19
+ return `${criticalCSS}
20
+ ${fullCSS}`;
19
21
  }
20
- function u(t, e = {}) {
22
+ function generateThemeBundle(presets, options = {}) {
21
23
  const {
22
- mode: a = "both",
23
- darkSelector: l = "class",
24
- prefix: r = "maz",
25
- criticalOnly: i = !1
26
- } = e;
27
- return t.reduce((c, n) => (c[n.name] = s({
28
- preset: n,
29
- mode: a,
30
- darkSelector: l,
31
- prefix: r,
32
- criticalOnly: i
33
- }), c), {});
24
+ mode = "both",
25
+ darkSelector = "class",
26
+ prefix = "maz",
27
+ criticalOnly = !1
28
+ } = options;
29
+ return presets.reduce((bundle, preset) => (bundle[preset.name] = buildThemeCSS({
30
+ preset,
31
+ mode,
32
+ darkSelector,
33
+ prefix,
34
+ criticalOnly
35
+ }), bundle), {});
34
36
  }
35
- function f(t, e = {}) {
36
- const { id: a = "maz-theme", media: l } = e;
37
- let r = `<style id="${a}"`;
38
- return l && (r += ` media="${l}"`), r += `>
39
- ${t}
40
- </style>`, r;
37
+ function createThemeStylesheet(css, options = {}) {
38
+ const { id = "maz-theme", media } = options;
39
+ let styleTag = `<style id="${id}"`;
40
+ return media && (styleTag += ` media="${media}"`), styleTag += `>
41
+ ${css}
42
+ </style>`, styleTag;
41
43
  }
42
- function h(t, e = {}) {
43
- const { prefix: a = "maz", darkSelector: l = "class" } = e, r = { prefix: a, darkSelectorStrategy: l };
44
+ function buildSeparateThemeFiles(preset, options = {}) {
45
+ const { prefix = "maz", darkSelector = "class", darkClass = "dark" } = options, baseOptions = { prefix, darkSelectorStrategy: darkSelector, darkClass };
44
46
  return {
45
- critical: o(t, { ...r, mode: "both" }),
46
- full: d(t, { ...r, mode: "both" }),
47
- lightOnly: s({ preset: t, mode: "light", ...e }),
48
- darkOnly: s({ preset: t, mode: "dark", ...e })
47
+ critical: generateCSS(preset, { ...baseOptions, mode: "both", onlyCritical: !0 }),
48
+ full: generateCSS(preset, { ...baseOptions, mode: "both" }),
49
+ lightOnly: buildThemeCSS({ preset, mode: "light", ...options }),
50
+ darkOnly: buildThemeCSS({ preset, mode: "dark", ...options })
49
51
  };
50
52
  }
51
53
  export {
52
- h as buildSeparateThemeFiles,
53
- s as buildThemeCSS,
54
- f as createThemeStylesheet,
55
- u as generateThemeBundle
54
+ buildSeparateThemeFiles,
55
+ buildThemeCSS,
56
+ createThemeStylesheet,
57
+ generateThemeBundle
56
58
  };
@@ -0,0 +1,6 @@
1
+ function isServer() {
2
+ return typeof document > "u" || typeof globalThis.window > "u";
3
+ }
4
+ export {
5
+ isServer as i
6
+ };
@@ -1,11 +1,10 @@
1
- import { initThemeState as T, useTheme as a } from "./useTheme.js";
1
+ import "../chunks/isServer.BAlEcRRr.js";
2
2
  import "vue";
3
3
  import "../utils/cookie-storage.js";
4
4
  import "../utils/css-generator.js";
5
- import "../utils/get-color-mode.js";
6
5
  import "../utils/get-preset.js";
7
6
  import "../utils/preset-merger.js";
7
+ import { useTheme } from "./useTheme.js";
8
8
  export {
9
- T as initThemeState,
10
- a as useTheme
9
+ useTheme
11
10
  };
@@ -1,165 +1,107 @@
1
- import { ref as f, onMounted as k, computed as s, toValue as w, watch as y, watchEffect as T, inject as C, getCurrentInstance as M } from "vue";
2
- import { setCookie as z } from "../utils/cookie-storage.js";
3
- import { generateCriticalCSS as E, generateFullCSS as L, injectCSS as p, CSS_IDS as v } from "../utils/css-generator.js";
4
- import { getColorMode as x, isSystemPrefersDark as I } from "../utils/get-color-mode.js";
5
- import { getPreset as O } from "../utils/get-preset.js";
6
- import { mergePresets as $ } from "../utils/preset-merger.js";
7
- function D() {
8
- return typeof document > "u" || typeof globalThis.window > "u";
9
- }
10
- function F() {
11
- return typeof document < "u";
12
- }
13
- function R(e) {
14
- return !!e;
15
- }
16
- function U(e, o, r = {}) {
17
- const {
18
- internalWindow: u = F() ? globalThis : void 0,
19
- ...c
20
- } = r;
21
- let n;
22
- const d = f(!1);
23
- k(() => {
24
- d.value = (u && "MutationObserver" in u) ?? !1;
25
- });
26
- const m = () => {
27
- n && (n.disconnect(), n = void 0);
28
- }, b = s(() => {
29
- const a = w(e);
30
- let i;
31
- return a && "$el" in a ? i = a.$el : a && (i = a), new Set([i].filter(R));
32
- }), P = y(
33
- b,
34
- (a) => {
35
- m(), d.value && a.size && (n = new MutationObserver(o), a.forEach((i) => n.observe(i, c)));
36
- },
37
- { immediate: !0, flush: "post" }
38
- );
39
- return {
40
- isSupported: d,
41
- stop: () => {
42
- P(), m();
43
- },
44
- takeRecords: () => n?.takeRecords()
45
- };
46
- }
47
- const t = f();
48
- function S(e) {
49
- typeof document > "u" || !e || e.darkModeStrategy === "media" || e.mode === "light" || (e.isDark ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"));
50
- }
51
- function j() {
52
- const e = M()?.appContext.app;
53
- e && t.value && (e.config.globalProperties.$mazThemeState = t.value);
54
- }
55
- function N(e) {
56
- if (e.currentPreset && e.colorMode !== void 0) {
57
- g({
58
- currentPreset: e.currentPreset,
59
- colorMode: e.colorMode,
60
- mode: e.mode,
61
- isDark: e.isDark,
62
- strategy: e.strategy,
63
- darkModeStrategy: e.darkModeStrategy
64
- });
1
+ import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
2
+ import { ref, computed, inject, getCurrentInstance } from "vue";
3
+ import { setCookie } from "../utils/cookie-storage.js";
4
+ import { generateCSS, injectCSS, CSS_ID } from "../utils/css-generator.js";
5
+ import { getPreset } from "../utils/get-preset.js";
6
+ import { mergePresets } from "../utils/preset-merger.js";
7
+ const themeState = ref(), colorMode = computed({
8
+ get: () => themeState.value?.colorMode,
9
+ set: (mode2) => setColorMode(mode2)
10
+ }), isDark = computed(() => themeState.value?.isDark || !1), strategy = computed(() => themeState.value?.strategy), mode = computed(() => themeState.value?.mode), darkModeStrategy = computed(() => themeState.value?.darkModeStrategy), preset = computed(() => themeState.value?.preset), presetName = computed(() => preset.value?.name);
11
+ async function updateTheme(preset2) {
12
+ if (!themeState.value)
65
13
  return;
66
- }
67
- const o = x(e.colorMode), r = o === "auto" ? I() : o === "dark";
68
- g({
69
- currentPreset: e.currentPreset,
70
- colorMode: o,
71
- mode: e.mode,
72
- isDark: r,
73
- strategy: e.strategy,
74
- darkModeStrategy: e.darkModeStrategy
75
- });
76
- }
77
- function g(e) {
78
- if (t.value = e, typeof globalThis.window < "u" && t.value.colorMode === "auto") {
79
- const o = globalThis.matchMedia("(prefers-color-scheme: dark)"), r = () => {
80
- t.value && t.value.colorMode === "auto" && (t.value.isDark = o.matches);
81
- };
82
- o.addEventListener("change", r), r();
83
- }
84
- T(() => {
85
- t.value && (S(t.value), j());
86
- });
87
- }
88
- const W = s({
89
- get: () => t.value?.colorMode,
90
- set: (e) => l(e)
91
- }), _ = s(() => t.value?.isDark ?? !1), A = s(() => t.value?.strategy), G = s(() => t.value?.mode), Q = s(() => t.value?.darkModeStrategy), h = s(() => t.value?.currentPreset), V = s(() => h.value?.name);
92
- async function Y(e) {
93
- if (!t.value)
94
- return;
95
- const o = typeof e == "string" ? await O(e) : e;
96
- if (!o || !t.value.currentPreset) {
14
+ const _preset = typeof preset2 == "string" ? await getPreset(preset2) : preset2;
15
+ if (!_preset || !themeState.value.preset) {
97
16
  console.error("[@maz-ui/themes] No preset found - If you are using the buildtime strategy, you must provide a complete preset");
98
17
  return;
99
18
  }
100
- const r = "name" in o && o.name !== t.value.currentPreset.name ? o : $(t.value.currentPreset, o);
101
- if (t.value.currentPreset = r, t.value.strategy === "runtime" || t.value.strategy === "hybrid") {
102
- const u = {
103
- mode: t.value.mode,
104
- darkSelectorStrategy: t.value.darkModeStrategy,
105
- prefix: "maz"
106
- }, c = E(r, u), n = L(r, u);
107
- p(v.CRITICAL, c), p(v.FULL, n);
19
+ const newPreset = "name" in _preset && _preset.name !== themeState.value.preset.name ? _preset : mergePresets(themeState.value.preset, _preset);
20
+ if (themeState.value.preset = newPreset, themeState.value.strategy === "runtime" || themeState.value.strategy === "hybrid") {
21
+ const cssOptions = {
22
+ mode: themeState.value.mode,
23
+ darkSelectorStrategy: themeState.value.darkModeStrategy,
24
+ prefix: "maz",
25
+ darkClass: themeState.value.darkClass
26
+ }, fullCSS = generateCSS(newPreset, cssOptions);
27
+ injectCSS(CSS_ID, fullCSS);
108
28
  }
109
29
  }
110
- function l(e, o = !0) {
111
- t.value && (t.value.colorMode = e, e === "auto" ? t.value.isDark = typeof globalThis.window < "u" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches : t.value.isDark = e === "dark", o && S(t.value), z("maz-color-mode", e));
30
+ function setColorMode(colorMode2) {
31
+ themeState.value && (themeState.value.colorMode = colorMode2, setCookie("maz-color-mode", colorMode2));
112
32
  }
113
- function q() {
114
- t.value && l(t.value.isDark ? "light" : "dark");
33
+ function toggleDarkMode() {
34
+ setColorMode(isDark.value ? "light" : "dark");
115
35
  }
116
- function oe() {
117
- const e = f();
118
- k(() => {
119
- e.value = document.documentElement;
120
- }), U(
121
- e,
122
- () => {
123
- if (D() || !t.value)
124
- return;
125
- const r = document.documentElement.classList.contains("dark") ? "dark" : "light";
126
- t.value.colorMode !== r && l(r, !1);
127
- },
128
- {
129
- attributes: !0
130
- }
131
- );
132
- let o;
36
+ function setThemeStateFromGlobalProperties() {
37
+ themeState.value = void 0;
133
38
  try {
134
- if (o = C("mazThemeState", void 0), !o)
39
+ const injectedState = inject("mazThemeState", void 0);
40
+ if (themeState.value = injectedState?.value, !themeState.value)
135
41
  throw new Error("mazThemeState not found");
136
42
  } catch {
137
- const r = M();
138
- r?.appContext?.app?.config?.globalProperties && (o = r.appContext.app.config.globalProperties.$mazThemeState);
43
+ const instance = getCurrentInstance();
44
+ instance?.appContext?.app?.config?.globalProperties && (themeState.value = instance.appContext.app.config.globalProperties.$mazThemeState.value);
139
45
  }
140
- if (o && (t.value ? (typeof document > "u" || typeof globalThis.window > "u") && (t.value = {
141
- ...t.value,
142
- ...o
143
- }) : N(o)), y(() => o?.currentPreset, (r) => {
144
- t.value && r && (t.value.currentPreset = r);
145
- }, {
146
- once: !0
147
- }), !t.value)
46
+ }
47
+ function useTheme() {
48
+ if (isServer() && (themeState.value = void 0), themeState.value || setThemeStateFromGlobalProperties(), !themeState.value)
148
49
  throw new Error("[@maz-ui/themes] You must install the MazUi or MazUiTheme plugin before using useTheme composable");
149
50
  return {
150
- presetName: V,
151
- colorMode: W,
152
- isDark: _,
153
- strategy: A,
154
- updateTheme: Y,
155
- setColorMode: l,
156
- toggleDarkMode: q,
157
- mode: G,
158
- darkModeStrategy: Q,
159
- currentPreset: h
51
+ /**
52
+ * Current theme preset
53
+ */
54
+ preset,
55
+ /**
56
+ * Current theme name
57
+ */
58
+ presetName,
59
+ /**
60
+ * Current color mode
61
+ * @description The color mode - Can be 'auto', 'dark' or 'light'
62
+ */
63
+ colorMode,
64
+ /**
65
+ * Whether the current color mode is dark
66
+ */
67
+ isDark,
68
+ /**
69
+ * Strategy used to apply the theme
70
+ */
71
+ strategy,
72
+ /**
73
+ * Update the theme
74
+ * @param preset The new theme preset
75
+ * @description Update the theme with a new preset or override some tokens
76
+ */
77
+ updateTheme,
78
+ /**
79
+ * Set the color mode
80
+ * @description Set the color mode - Can be 'auto', 'dark' or 'light'
81
+ * @param colorMode The new color mode
82
+ */
83
+ setColorMode,
84
+ /**
85
+ * Toggle the dark mode
86
+ * @description Toggle the dark mode
87
+ */
88
+ toggleDarkMode,
89
+ /**
90
+ * Mode
91
+ * @description Supported themes - Can be 'both', 'light' or 'dark'
92
+ */
93
+ mode,
94
+ /**
95
+ * Dark mode strategy
96
+ * @description Strategy used to apply the dark mode - Can be 'class' or 'media'
97
+ */
98
+ darkModeStrategy,
99
+ /**
100
+ * @deprecated use `preset` instead
101
+ */
102
+ currentPreset: preset
160
103
  };
161
104
  }
162
105
  export {
163
- g as initThemeState,
164
- oe as useTheme
106
+ useTheme
165
107
  };
@@ -1,11 +1,11 @@
1
- import { mergePresets as r } from "./utils/preset-merger.js";
2
- import { getPreset as f } from "./utils/get-preset.js";
3
- function o({
4
- base: e = "maz-ui",
5
- overrides: t = {}
1
+ import { mergePresets } from "./utils/preset-merger.js";
2
+ import { getPreset } from "./utils/get-preset.js";
3
+ function definePreset({
4
+ base = "maz-ui",
5
+ overrides = {}
6
6
  }) {
7
- return typeof e == "string" ? f(e).then((n) => r(n, t)) : r(e, t);
7
+ return typeof base == "string" ? getPreset(base).then((basePreset) => mergePresets(basePreset, overrides)) : mergePresets(base, overrides);
8
8
  }
9
9
  export {
10
- o as definePreset
10
+ definePreset
11
11
  };
package/dist/index.js CHANGED
@@ -1,37 +1,35 @@
1
- import { buildSeparateThemeFiles as o, buildThemeCSS as t, createThemeStylesheet as m, generateThemeBundle as S } from "./build/index.js";
2
- import { initThemeState as i, useTheme as p } from "./composables/useTheme.js";
3
- import { definePreset as n } from "./define-preset.js";
4
- import { MazUiTheme as l } from "./plugin.js";
5
- import { adjustColorLightness as C, formatHSL as h, generateColorScale as g, getContrastColor as d, parseHSL as T } from "./utils/color-utils.js";
6
- import { CSS_IDS as c, generateCriticalCSS as b, generateFullCSS as L, injectCSS as j, removeCSS as z } from "./utils/css-generator.js";
7
- import { deepMerge as H, mergePresets as M } from "./utils/preset-merger.js";
8
- import { mazUi as U } from "./presets/mazUi.js";
9
- import { obsidian as y } from "./presets/obsidian.js";
10
- import { ocean as D } from "./presets/ocean.js";
11
- import { pristine as _ } from "./presets/pristine.js";
1
+ import { buildSeparateThemeFiles, buildThemeCSS, createThemeStylesheet, generateThemeBundle } from "./build/index.js";
2
+ import { useTheme } from "./composables/useTheme.js";
3
+ import { definePreset } from "./define-preset.js";
4
+ import { MazUiTheme } from "./plugin.js";
5
+ import { adjustColorLightness, formatHSL, generateColorScale, getContrastColor, parseHSL } from "./utils/color-utils.js";
6
+ import { CSS_ID, generateCSS, injectCSS, removeCSS } from "./utils/css-generator.js";
7
+ import { deepMerge, mergePresets } from "./utils/preset-merger.js";
8
+ import { mazUi } from "./presets/mazUi.js";
9
+ import { obsidian } from "./presets/obsidian.js";
10
+ import { ocean } from "./presets/ocean.js";
11
+ import { pristine } from "./presets/pristine.js";
12
12
  export {
13
- c as CSS_IDS,
14
- l as MazUiTheme,
15
- C as adjustColorLightness,
16
- o as buildSeparateThemeFiles,
17
- t as buildThemeCSS,
18
- m as createThemeStylesheet,
19
- H as deepMerge,
20
- n as definePreset,
21
- h as formatHSL,
22
- g as generateColorScale,
23
- b as generateCriticalCSS,
24
- L as generateFullCSS,
25
- S as generateThemeBundle,
26
- d as getContrastColor,
27
- i as initThemeState,
28
- j as injectCSS,
29
- U as mazUi,
30
- M as mergePresets,
31
- y as obsidian,
32
- D as ocean,
33
- T as parseHSL,
34
- _ as pristine,
35
- z as removeCSS,
36
- p as useTheme
13
+ CSS_ID,
14
+ MazUiTheme,
15
+ adjustColorLightness,
16
+ buildSeparateThemeFiles,
17
+ buildThemeCSS,
18
+ createThemeStylesheet,
19
+ deepMerge,
20
+ definePreset,
21
+ formatHSL,
22
+ generateCSS,
23
+ generateColorScale,
24
+ generateThemeBundle,
25
+ getContrastColor,
26
+ injectCSS,
27
+ mazUi,
28
+ mergePresets,
29
+ obsidian,
30
+ ocean,
31
+ parseHSL,
32
+ pristine,
33
+ removeCSS,
34
+ useTheme
37
35
  };
@@ -1,9 +1,11 @@
1
+ import "../chunks/isServer.BAlEcRRr.js";
1
2
  import "vue";
3
+ import { MazUiTheme } from "../plugin.js";
2
4
  import "../utils/css-generator.js";
3
5
  import "../utils/get-color-mode.js";
6
+ import "../utils/update-document-class.js";
4
7
  import "../utils/get-preset.js";
5
8
  import "../utils/preset-merger.js";
6
- import { MazUiTheme as a } from "../plugin.js";
7
9
  export {
8
- a as MazUiTheme
10
+ MazUiTheme
9
11
  };