nuxt-glorious 2.0.0-develop-35 → 2.0.0-develop-36

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "nuxt-glorious",
3
3
  "configKey": "glorious",
4
- "version": "2.0.0-develop-35"
4
+ "version": "2.0.0-develop-36"
5
5
  }
@@ -0,0 +1 @@
1
+ export default function (color: string, state: any): any;
@@ -0,0 +1,15 @@
1
+ export default function(color, state) {
2
+ const domColor = state.ui.colors.dom["--color-" + color];
3
+ if (typeof domColor !== "undefined") {
4
+ return domColor;
5
+ }
6
+ const [colorName, range] = color.split("-");
7
+ const tailwindColor = state.ui.colors.tailwind;
8
+ const base = tailwindColor[colorName];
9
+ if (typeof base === "string") {
10
+ return base;
11
+ }
12
+ if (typeof base === "object" && base !== null && range in base) {
13
+ return base[range];
14
+ }
15
+ }
@@ -1,6 +1,6 @@
1
1
  import { defineStore } from "pinia";
2
2
  import { navigateTo, useCookie, useRuntimeConfig, useFetch } from "#imports";
3
- import { default as loadColor } from "../../scripts/store/tc";
3
+ import tc from "../scripts/store/tc.mjs";
4
4
  export const GloriousStore = defineStore("GloriousStore", {
5
5
  state: () => ({
6
6
  auth: {
@@ -30,7 +30,7 @@ export const GloriousStore = defineStore("GloriousStore", {
30
30
  },
31
31
  actions: {
32
32
  tc(color) {
33
- return loadColor(color, this);
33
+ return tc(color, this);
34
34
  },
35
35
  formCreate(key) {
36
36
  this.forms = {};
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-develop-35",
2
+ "version": "2.0.0-develop-36",
3
3
  "name": "nuxt-glorious",
4
4
  "description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
5
5
  "repository": "sajadhzj/nuxt-glorious",