@udixio/theme 1.3.0 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.3.1 (2025-09-04)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - the external colors must be coherent ([08cd685](https://github.com/Udixio/UI/commit/08cd685))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Joël VIGREUX
10
+
1
11
  ## 1.3.0 (2025-09-04)
2
12
 
3
13
  ### 🚀 Features
package/dist/bin.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  const commander = require("commander");
3
3
  const chokidar = require("chokidar");
4
4
  const chalk = require("chalk");
5
- const loadFromPath = require("./load-from-path-BuN8RpOs.cjs");
5
+ const loadFromPath = require("./load-from-path-DoZnR1-p.cjs");
6
6
  const program = new commander.Command();
7
7
  async function runOnce(configPath) {
8
8
  try {
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Command } from "commander";
2
2
  import chokidar from "chokidar";
3
3
  import chalk from "chalk";
4
- import { l as loadFromPath } from "./load-from-path-BSrT4DOj.js";
4
+ import { l as loadFromPath } from "./load-from-path-Bo1kCfh9.js";
5
5
  const program = new Command();
6
6
  async function runOnce(configPath) {
7
7
  try {
package/dist/browser.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const loader = require("./loader-YNN5hAF3.cjs");
4
- const defineConfig = require("./define-config-BGgVazsr.cjs");
3
+ const loader = require("./loader-R7hccp8_.cjs");
4
+ const defineConfig = require("./define-config-CKSsLMnc.cjs");
5
5
  exports.API = loader.API;
6
6
  exports.AppContainer = loader.AppContainer;
7
7
  exports.AppModule = loader.AppModule;
package/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b, A, a, C, c, d, e, i, D, j, P, m, S, n, T, V, q, g, f, o, p, h, l, r, k, t } from "./loader-Bc0bstAD.js";
2
- import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-B1QPKKY_.js";
1
+ import { b, A, a, C, c, d, e, i, D, j, P, m, S, n, T, V, q, g, f, o, p, h, l, r, k, t } from "./loader-C8_TyOuS.js";
2
+ import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-BasMdCqD.js";
3
3
  export {
4
4
  b as API,
5
5
  A as AppContainer,
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { p as getRotatedHue, o as getPiecewiseHue, H as Hct, k as tonalSpotVariant } from "./loader-Bc0bstAD.js";
4
+ import { p as getRotatedHue, o as getPiecewiseHue, H as Hct, k as tonalSpotVariant } from "./loader-C8_TyOuS.js";
5
5
  import { TonalPalette } from "@material/material-color-utilities";
6
6
  const getExpressiveNeutralHue = (sourceColorHct) => {
7
7
  const hue = getRotatedHue(
@@ -191,7 +191,7 @@ const fidelityVariant = {
191
191
  return TonalPalette.fromHueAndChroma(errorHue, 60);
192
192
  }
193
193
  },
194
- customPalettes: ({ colorHct }) => TonalPalette.fromHueAndChroma(colorHct.hue, colorHct.chroma)
194
+ customPalettes: ({ colorHct, sourceColorHct }) => TonalPalette.fromHueAndChroma(colorHct.hue, sourceColorHct.chroma)
195
195
  };
196
196
  const Variants = {
197
197
  Expressive: expressiveVariant,
@@ -2,7 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- const loader = require("./loader-YNN5hAF3.cjs");
5
+ const loader = require("./loader-R7hccp8_.cjs");
6
6
  const materialColorUtilities = require("@material/material-color-utilities");
7
7
  const getExpressiveNeutralHue = (sourceColorHct) => {
8
8
  const hue = loader.getRotatedHue(
@@ -192,7 +192,7 @@ const fidelityVariant = {
192
192
  return materialColorUtilities.TonalPalette.fromHueAndChroma(errorHue, 60);
193
193
  }
194
194
  },
195
- customPalettes: ({ colorHct }) => materialColorUtilities.TonalPalette.fromHueAndChroma(colorHct.hue, colorHct.chroma)
195
+ customPalettes: ({ colorHct, sourceColorHct }) => materialColorUtilities.TonalPalette.fromHueAndChroma(colorHct.hue, sourceColorHct.chroma)
196
196
  };
197
197
  const Variants = {
198
198
  Expressive: expressiveVariant,
@@ -1,4 +1,4 @@
1
- import { l as loader } from "./loader-Bc0bstAD.js";
1
+ import { l as loader } from "./loader-C8_TyOuS.js";
2
2
  import * as fs from "node:fs";
3
3
  async function resolveConfig(configPath = "./theme.config") {
4
4
  const { createJiti } = await import("jiti");
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
22
  mod
23
23
  ));
24
- const loader = require("./loader-YNN5hAF3.cjs");
24
+ const loader = require("./loader-R7hccp8_.cjs");
25
25
  const fs = require("node:fs");
26
26
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
27
27
  function _interopNamespaceDefault(e) {
@@ -44,7 +44,7 @@ const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
44
44
  async function resolveConfig(configPath = "./theme.config") {
45
45
  const { createJiti } = await import("jiti");
46
46
  const { resolve } = await import("pathe");
47
- const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-BuN8RpOs.cjs", document.baseURI).href, {
47
+ const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-DoZnR1-p.cjs", document.baseURI).href, {
48
48
  debug: process.env.NODE_ENV === "development",
49
49
  fsCache: true,
50
50
  interopDefault: true
@@ -1694,6 +1694,9 @@ class ThemeApi {
1694
1694
  // Object.assign(this.themeOptions, options);
1695
1695
  // return this.theme();
1696
1696
  // }
1697
+ get sourceColorHex() {
1698
+ return this.schemeManager.get().sourceColorHct;
1699
+ }
1697
1700
  create(options) {
1698
1701
  this.schemeManager.createOrUpdate({
1699
1702
  ...options,
@@ -1695,6 +1695,9 @@ class ThemeApi {
1695
1695
  // Object.assign(this.themeOptions, options);
1696
1696
  // return this.theme();
1697
1697
  // }
1698
+ get sourceColorHex() {
1699
+ return this.schemeManager.get().sourceColorHct;
1700
+ }
1698
1701
  create(options) {
1699
1702
  this.schemeManager.createOrUpdate({
1700
1703
  ...options,
package/dist/node.cjs CHANGED
@@ -22,9 +22,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
- const loader = require("./loader-YNN5hAF3.cjs");
26
- const defineConfig = require("./define-config-BGgVazsr.cjs");
27
- const loadFromPath = require("./load-from-path-BuN8RpOs.cjs");
25
+ const loader = require("./loader-R7hccp8_.cjs");
26
+ const defineConfig = require("./define-config-CKSsLMnc.cjs");
27
+ const loadFromPath = require("./load-from-path-DoZnR1-p.cjs");
28
28
  let unpluginInstance = null;
29
29
  const createUnpluginTheme = async () => {
30
30
  if (unpluginInstance) {
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
- import { b, A, a, C, c, d, e, i, D, j, P, m, S, n, T, V, q, g, f, o, p, h, l, r, k, t } from "./loader-Bc0bstAD.js";
2
- import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-B1QPKKY_.js";
3
- import { l as loadFromPath } from "./load-from-path-BSrT4DOj.js";
4
- import { r as r2 } from "./load-from-path-BSrT4DOj.js";
1
+ import { b, A, a, C, c, d, e, i, D, j, P, m, S, n, T, V, q, g, f, o, p, h, l, r, k, t } from "./loader-C8_TyOuS.js";
2
+ import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-BasMdCqD.js";
3
+ import { l as loadFromPath } from "./load-from-path-Bo1kCfh9.js";
4
+ import { r as r2 } from "./load-from-path-Bo1kCfh9.js";
5
5
  let unpluginInstance = null;
6
6
  const createUnpluginTheme = async () => {
7
7
  if (unpluginInstance) {
@@ -11,6 +11,7 @@ export declare class ThemeApi {
11
11
  schemeManager: SchemeManager;
12
12
  variantManager: VariantManager;
13
13
  });
14
+ get sourceColorHex(): import('../material-color-utilities/htc').Hct;
14
15
  create(options: ThemeOptions & {
15
16
  variant: Variant;
16
17
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"theme.api.d.ts","sourceRoot":"","sources":["../../src/theme/theme.api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,KAAK,YAAY,GAAG,IAAI,CACtB,oBAAoB,EACpB,UAAU,GAAG,iBAAiB,CAC/B,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAQ/B,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;gBAEpC,EACV,aAAa,EACb,cAAc,GACf,EAAE;QACD,aAAa,EAAE,aAAa,CAAC;QAC7B,cAAc,EAAE,cAAc,CAAC;KAChC;IA4BD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;IAQnD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;IAQ7D,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAO/C"}
1
+ {"version":3,"file":"theme.api.d.ts","sourceRoot":"","sources":["../../src/theme/theme.api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,KAAK,YAAY,GAAG,IAAI,CACtB,oBAAoB,EACpB,UAAU,GAAG,iBAAiB,CAC/B,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAQ/B,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;gBAEpC,EACV,aAAa,EACb,cAAc,GACf,EAAE;QACD,aAAa,EAAE,aAAa,CAAC;QAC7B,cAAc,EAAE,cAAc,CAAC;KAChC;IA4BD,IAAI,cAAc,kDAEjB;IAED,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;IAQnD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;IAQ7D,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAO/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/theme",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "main": "./dist/node.js",
6
6
  "module": "./dist/node.js",
@@ -52,6 +52,10 @@ export class ThemeApi {
52
52
  // return this.theme();
53
53
  // }
54
54
 
55
+ get sourceColorHex() {
56
+ return this.schemeManager.get().sourceColorHct;
57
+ }
58
+
55
59
  create(options: ThemeOptions & { variant: Variant }) {
56
60
  this.schemeManager.createOrUpdate({
57
61
  ...options,
@@ -33,6 +33,6 @@ export const fidelityVariant: Variant = {
33
33
  return TonalPalette.fromHueAndChroma(errorHue, 60);
34
34
  },
35
35
  },
36
- customPalettes: ({ colorHct }) =>
37
- TonalPalette.fromHueAndChroma(colorHct.hue, colorHct.chroma),
36
+ customPalettes: ({ colorHct , sourceColorHct}) =>
37
+ TonalPalette.fromHueAndChroma(colorHct.hue, sourceColorHct.chroma),
38
38
  };