@maz-ui/themes 4.4.0 → 4.6.1

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.
@@ -1,4 +1,4 @@
1
- import "../chunks/isServer.BAlEcRRr.js";
1
+ import "@maz-ui/utils/helpers/isServer";
2
2
  import "vue";
3
3
  import "../utils/cookie-storage.js";
4
4
  import "../utils/css-generator.js";
@@ -1,4 +1,4 @@
1
- import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils/helpers/isServer";
2
2
  import { ref, computed, inject, getCurrentInstance } from "vue";
3
3
  import { setCookie } from "../utils/cookie-storage.js";
4
4
  import { generateCSS, injectCSS, CSS_ID } from "../utils/css-generator.js";
@@ -1,4 +1,4 @@
1
- import "../chunks/isServer.BAlEcRRr.js";
1
+ import "@maz-ui/utils/helpers/isServer";
2
2
  import "vue";
3
3
  import { MazUiTheme } from "../plugin.js";
4
4
  import "../utils/css-generator.js";
package/dist/plugin.js CHANGED
@@ -1,16 +1,12 @@
1
- import { i as isServer } from "./chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils/helpers/isServer";
2
2
  import { ref, onMounted, computed, toValue, watch, nextTick } from "vue";
3
+ import { isClient } from "@maz-ui/utils/helpers/isClient";
4
+ import { truthyFilter } from "@maz-ui/utils/helpers/truthyFilter";
3
5
  import { generateCSS, injectCSS, CSS_ID } from "./utils/css-generator.js";
4
6
  import { getSavedColorMode, getSystemColorMode, getColorMode } from "./utils/get-color-mode.js";
5
7
  import { updateDocumentClass } from "./utils/update-document-class.js";
6
8
  import { getPreset } from "./utils/get-preset.js";
7
9
  import { mergePresets } from "./utils/preset-merger.js";
8
- function isClient() {
9
- return typeof document < "u";
10
- }
11
- function truthyFilter(value) {
12
- return !!value;
13
- }
14
10
  function useMutationObserver(target, callback, options = {}) {
15
11
  const {
16
12
  internalWindow = isClient() ? globalThis : void 0,
@@ -1,4 +1,4 @@
1
- import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils/helpers/isServer";
2
2
  function getCookie(key) {
3
3
  if (isServer())
4
4
  return null;
@@ -1,4 +1,4 @@
1
- import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils/helpers/isServer";
2
2
  import { generateColorScale } from "./color-utils.js";
3
3
  const DEFAULT_CRITICAL_COLORS = [
4
4
  "background",
@@ -1,4 +1,4 @@
1
- import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils/helpers/isServer";
2
2
  import { getCookie } from "./cookie-storage.js";
3
3
  function getSavedColorMode() {
4
4
  const savedMode = getCookie("maz-color-mode");
@@ -1,4 +1,4 @@
1
- import { i as isServer } from "../chunks/isServer.BAlEcRRr.js";
1
+ import { isServer } from "@maz-ui/utils";
2
2
  function noTransition(fn) {
3
3
  if (isServer()) {
4
4
  fn();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/themes",
3
3
  "type": "module",
4
- "version": "4.4.0",
4
+ "version": "4.6.1",
5
5
  "description": "Theme system for Maz-UI with TypeScript support and CSS variables",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -75,15 +75,13 @@
75
75
  "node": ">=18.0.0"
76
76
  },
77
77
  "peerDependencies": {
78
- "vue": "^3.5.0"
78
+ "vue": ">=3.5.0 <4.0.0"
79
79
  },
80
80
  "dependencies": {
81
- "@maz-ui/utils": "4.3.0"
81
+ "@maz-ui/utils": "4.6.1"
82
82
  },
83
83
  "devDependencies": {
84
- "glob": "^13.0.0",
85
- "vue": "^3.5.27",
86
- "vue-tsc": "^3.2.1"
84
+ "vite": "^7.3.0"
87
85
  },
88
86
  "lint-staged": {
89
87
  "*.{js,ts,vue,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
@@ -1,6 +0,0 @@
1
- function isServer() {
2
- return typeof document > "u" || typeof globalThis.window > "u";
3
- }
4
- export {
5
- isServer as i
6
- };