@razorwind/core 0.0.47 → 0.0.49
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/{config-BjuUx31T.d.cts → config-B1rsPTVV.d.mts} +10 -5
- package/dist/config-B1rsPTVV.d.mts.map +1 -0
- package/dist/{config-CEPqgKnD.d.mts → config-jPfyBr8C.d.cts} +10 -5
- package/dist/{config-BjuUx31T.d.cts.map → config-jPfyBr8C.d.cts.map} +1 -1
- package/dist/flatten-tokens-DWbPW_3z.d.cts +64 -0
- package/dist/flatten-tokens-DWbPW_3z.d.cts.map +1 -0
- package/dist/flatten-tokens-Dz4e2IHx.d.mts +64 -0
- package/dist/flatten-tokens-Dz4e2IHx.d.mts.map +1 -0
- package/dist/{fonts-CUwsBEd5.mjs → fonts-BiuIJVev.mjs} +4 -4
- package/dist/fonts-BiuIJVev.mjs.map +1 -0
- package/dist/{fonts-75PPb25H.cjs → fonts-CkBPEFie.cjs} +2 -2
- package/dist/{index-DXx1b3vZ.d.cts → index-52XD5ztc.d.mts} +14 -6
- package/dist/{index-crrCGMN9.d.mts.map → index-52XD5ztc.d.mts.map} +1 -1
- package/dist/{index-DovYOOtL.d.cts → index-CwN0c1Q4.d.cts} +1 -1
- package/dist/{index-ktFi0nZL.d.mts → index-D5L2WXYk.d.mts} +1 -1
- package/dist/{index-crrCGMN9.d.mts → index-D6x2Pe2v.d.cts} +13 -5
- package/dist/index-D6x2Pe2v.d.cts.map +1 -0
- package/dist/{index-D7VrdiAn.d.mts → index-VmrytwDm.d.cts} +4 -4
- package/dist/{index-DNAWtBG8.d.cts.map → index-VmrytwDm.d.cts.map} +1 -1
- package/dist/{index-DNAWtBG8.d.cts → index-nRnX_NsH.d.mts} +4 -4
- package/dist/{index-D7VrdiAn.d.mts.map → index-nRnX_NsH.d.mts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +88 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +88 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/fonts/index.cjs +1 -1
- package/dist/lib/fonts/index.d.cts +1 -1
- package/dist/lib/fonts/index.d.mts +1 -1
- package/dist/lib/fonts/index.mjs +1 -1
- package/dist/lib/tokens/index.cjs +1 -1
- package/dist/lib/tokens/index.d.cts +2 -2
- package/dist/lib/tokens/index.d.mts +2 -2
- package/dist/lib/tokens/index.mjs +1 -1
- package/dist/{plugin-BocNoTkM.d.mts → plugin-CSC1jRVg.d.cts} +2 -2
- package/dist/{plugin-DMOM9PDs.d.cts.map → plugin-CSC1jRVg.d.cts.map} +1 -1
- package/dist/{plugin-DMOM9PDs.d.cts → plugin-DBrXhsY0.d.mts} +2 -2
- package/dist/plugin-DBrXhsY0.d.mts.map +1 -0
- package/dist/plugin.d.cts +2 -2
- package/dist/plugin.d.mts +2 -2
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.cts +2 -2
- package/dist/schema/index.d.mts +2 -2
- package/dist/schema/index.mjs +1 -1
- package/dist/{schema-D0sXEBjV.cjs → schema-BCofDJWf.cjs} +1 -1
- package/dist/{schema-Crr8KMUY.d.cts → schema-BwOBgJIM.d.cts} +6 -1
- package/dist/{schema-Crr8KMUY.d.cts.map → schema-BwOBgJIM.d.cts.map} +1 -1
- package/dist/{schema-Crr8KMUY.d.mts → schema-BwOBgJIM.d.mts} +6 -1
- package/dist/schema-BwOBgJIM.d.mts.map +1 -0
- package/dist/{schema-Btk_-NEI.mjs → schema-CXK5pVmJ.mjs} +2 -2
- package/dist/schema-CXK5pVmJ.mjs.map +1 -0
- package/dist/tokens-BjB6F0P1.cjs +7 -0
- package/dist/tokens-C_RYVqap.mjs +8 -0
- package/dist/tokens-C_RYVqap.mjs.map +1 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +95 -92
- package/dist/utils/index.d.cts.map +1 -1
- package/dist/utils/index.d.mts +95 -92
- package/dist/utils/index.d.mts.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils-3eUdyRLZ.cjs +1 -0
- package/dist/utils-CMqr6G7v.mjs +2 -0
- package/dist/utils-CMqr6G7v.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/config-CEPqgKnD.d.mts.map +0 -1
- package/dist/fonts-CUwsBEd5.mjs.map +0 -1
- package/dist/index-DXx1b3vZ.d.cts.map +0 -1
- package/dist/plugin-BocNoTkM.d.mts.map +0 -1
- package/dist/schema-Btk_-NEI.mjs.map +0 -1
- package/dist/schema-Crr8KMUY.d.mts.map +0 -1
- package/dist/tokens-BSuKch7x.cjs +0 -7
- package/dist/tokens-CsosSHvJ.mjs +0 -8
- package/dist/tokens-CsosSHvJ.mjs.map +0 -1
- package/dist/utils-B5uabOd5.mjs +0 -2
- package/dist/utils-B5uabOd5.mjs.map +0 -1
- package/dist/utils-BiL8zQzg.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Plugin } from "./config-
|
|
1
|
+
import { l as Plugin } from "./config-jPfyBr8C.cjs";
|
|
2
2
|
//#region src/plugin.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Type helper for Razorwind plugins (`parsers` / `preprocessors` + `extract` / `validate` / `generate`).
|
|
@@ -46,4 +46,4 @@ declare function definePlugin<TOptions>(factory: (options: TOptions) => Plugin,
|
|
|
46
46
|
declare function definePlugin(plugin: Plugin, overrides?: Partial<Plugin>): Plugin;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { definePlugin as t };
|
|
49
|
-
//# sourceMappingURL=plugin-
|
|
49
|
+
//# sourceMappingURL=plugin-CSC1jRVg.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-CSC1jRVg.d.cts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiEgB,aAAa,UAC3B,UAAU,SAAS,aAAa,QAChC,YAAY,QAAQ,WAClB,UAAU,aAAa;iBACX,aACd,QAAQ,QACR,YAAY,QAAQ,UACnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Plugin } from "./config-
|
|
1
|
+
import { l as Plugin } from "./config-B1rsPTVV.mjs";
|
|
2
2
|
//#region src/plugin.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Type helper for Razorwind plugins (`parsers` / `preprocessors` + `extract` / `validate` / `generate`).
|
|
@@ -46,4 +46,4 @@ declare function definePlugin<TOptions>(factory: (options: TOptions) => Plugin,
|
|
|
46
46
|
declare function definePlugin(plugin: Plugin, overrides?: Partial<Plugin>): Plugin;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { definePlugin as t };
|
|
49
|
-
//# sourceMappingURL=plugin-
|
|
49
|
+
//# sourceMappingURL=plugin-DBrXhsY0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-DBrXhsY0.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":""}
|
package/dist/plugin.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as TokensPreprocessor, l as Plugin, u as TokensParser } from "./config-
|
|
2
|
-
import { t as definePlugin } from "./plugin-
|
|
1
|
+
import { d as TokensPreprocessor, l as Plugin, u as TokensParser } from "./config-jPfyBr8C.cjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-CSC1jRVg.cjs";
|
|
3
3
|
export { type Plugin, type TokensParser, type TokensPreprocessor, definePlugin };
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as TokensPreprocessor, l as Plugin, u as TokensParser } from "./config-
|
|
2
|
-
import { t as definePlugin } from "./plugin-
|
|
1
|
+
import { d as TokensPreprocessor, l as Plugin, u as TokensParser } from "./config-B1rsPTVV.mjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-DBrXhsY0.mjs";
|
|
3
3
|
export { type Plugin, type TokensParser, type TokensPreprocessor, definePlugin };
|
package/dist/schema/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../schema-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../schema-BCofDJWf.cjs"),t=require("../fonts-vhz5FAsy.cjs");let n=require("@power-plant/dtcg-schema");exports.componentFileSchema=e.a,exports.componentSchema=e.o,exports.componentUsageSchema=e.s,exports.componentsSchema=e.c,exports.fontDisplaySchema=t.t,exports.fontFileFormatSchema=t.n,exports.fontFileSchema=t.r,exports.fontRoleSchema=t.i,exports.fontSchema=t.a,exports.fontsSchema=t.o,exports.googleFontSchema=t.s,exports.iconFileSchema=e.n,exports.iconSchema=e.r,exports.iconsSchema=e.i,exports.localFontSchema=t.c,exports.schema=e.t,Object.defineProperty(exports,"tokenSchema",{enumerable:!0,get:function(){return n.tokenSchema}}),Object.defineProperty(exports,"tokensSchema",{enumerable:!0,get:function(){return n.tokensSchema}});
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as componentSchema, C as googleFontSchema, D as ComponentUsage, E as ComponentFile, M as componentsSchema, O as Components, S as fontsSchema, T as Component, _ as fontDisplaySchema, a as Icons, b as fontRoleSchema, c as iconsSchema, d as FontFile, f as FontFileFormat, g as LocalFont, h as GoogleFont, i as IconFile, j as componentUsageSchema, k as componentFileSchema, l as Font, m as Fonts, n as schema, o as iconFileSchema, p as FontRole, r as Icon, s as iconSchema, t as Schema, u as FontDisplay, v as fontFileFormatSchema, w as localFontSchema, x as fontSchema, y as fontFileSchema } from "../schema-
|
|
2
|
-
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-
|
|
1
|
+
import { A as componentSchema, C as googleFontSchema, D as ComponentUsage, E as ComponentFile, M as componentsSchema, O as Components, S as fontsSchema, T as Component, _ as fontDisplaySchema, a as Icons, b as fontRoleSchema, c as iconsSchema, d as FontFile, f as FontFileFormat, g as LocalFont, h as GoogleFont, i as IconFile, j as componentUsageSchema, k as componentFileSchema, l as Font, m as Fonts, n as schema, o as iconFileSchema, p as FontRole, r as Icon, s as iconSchema, t as Schema, u as FontDisplay, v as fontFileFormatSchema, w as localFontSchema, x as fontSchema, y as fontFileSchema } from "../schema-BwOBgJIM.cjs";
|
|
2
|
+
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-CwN0c1Q4.cjs";
|
|
3
3
|
export { type Component, type ComponentFile, type ComponentUsage, type Components, type Font, type FontDisplay, type FontFile, type FontFileFormat, type FontRole, type Fonts, type GoogleFont, type Icon, type IconFile, type Icons, type LocalFont, type Schema, type Token, type Tokens, componentFileSchema, componentSchema, componentUsageSchema, componentsSchema, fontDisplaySchema, fontFileFormatSchema, fontFileSchema, fontRoleSchema, fontSchema, fontsSchema, googleFontSchema, iconFileSchema, iconSchema, iconsSchema, localFontSchema, schema, tokenSchema, tokensSchema };
|
package/dist/schema/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as componentSchema, C as googleFontSchema, D as ComponentUsage, E as ComponentFile, M as componentsSchema, O as Components, S as fontsSchema, T as Component, _ as fontDisplaySchema, a as Icons, b as fontRoleSchema, c as iconsSchema, d as FontFile, f as FontFileFormat, g as LocalFont, h as GoogleFont, i as IconFile, j as componentUsageSchema, k as componentFileSchema, l as Font, m as Fonts, n as schema, o as iconFileSchema, p as FontRole, r as Icon, s as iconSchema, t as Schema, u as FontDisplay, v as fontFileFormatSchema, w as localFontSchema, x as fontSchema, y as fontFileSchema } from "../schema-
|
|
2
|
-
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-
|
|
1
|
+
import { A as componentSchema, C as googleFontSchema, D as ComponentUsage, E as ComponentFile, M as componentsSchema, O as Components, S as fontsSchema, T as Component, _ as fontDisplaySchema, a as Icons, b as fontRoleSchema, c as iconsSchema, d as FontFile, f as FontFileFormat, g as LocalFont, h as GoogleFont, i as IconFile, j as componentUsageSchema, k as componentFileSchema, l as Font, m as Fonts, n as schema, o as iconFileSchema, p as FontRole, r as Icon, s as iconSchema, t as Schema, u as FontDisplay, v as fontFileFormatSchema, w as localFontSchema, x as fontSchema, y as fontFileSchema } from "../schema-BwOBgJIM.mjs";
|
|
2
|
+
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-D5L2WXYk.mjs";
|
|
3
3
|
export { type Component, type ComponentFile, type ComponentUsage, type Components, type Font, type FontDisplay, type FontFile, type FontFileFormat, type FontRole, type Fonts, type GoogleFont, type Icon, type IconFile, type Icons, type LocalFont, type Schema, type Token, type Tokens, componentFileSchema, componentSchema, componentUsageSchema, componentsSchema, fontDisplaySchema, fontFileFormatSchema, fontFileSchema, fontRoleSchema, fontSchema, fontsSchema, googleFontSchema, iconFileSchema, iconSchema, iconsSchema, localFontSchema, schema, tokenSchema, tokensSchema };
|
package/dist/schema/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"../schema-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"../schema-CXK5pVmJ.mjs";import{a as u,c as d,i as f,n as p,o as m,r as h,s as g,t as _}from"../fonts-B0ESWBBC.mjs";export{s as componentFileSchema,t as componentSchema,r as componentUsageSchema,l as componentsSchema,_ as fontDisplaySchema,p as fontFileFormatSchema,h as fontFileSchema,f as fontRoleSchema,u as fontSchema,m as fontsSchema,g as googleFontSchema,n as iconFileSchema,e as iconSchema,a as iconsSchema,d as localFontSchema,o as schema,c as tokenSchema,i as tokensSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./fonts-vhz5FAsy.cjs");let n=require("zod");n=e.t(n,1);let r=require("@power-plant/dtcg-schema");const i=n.z.object({path:n.z.string(),type:n.z.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:n.z.string().optional(),target:n.z.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),a=n.z.object({name:n.z.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:n.z.string().optional(),description:n.z.string().optional(),path:n.z.string(),content:n.z.string().optional(),language:n.z.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),o=n.z.object({name:n.z.string(),title:n.z.string(),type:n.z.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:n.z.string().optional(),description:n.z.string().optional(),tags:n.z.array(n.z.string()).optional(),related:n.z.array(n.z.string()).optional(),since:n.z.string().optional(),version:n.z.string().optional(),repository:n.z.string().optional(),homepage:n.z.string().optional(),dependencies:n.z.record(n.z.string(),n.z.string()).optional(),devDependencies:n.z.record(n.z.string(),n.z.string()).optional(),registryDependencies:n.z.record(n.z.string(),n.z.string()).optional(),files:n.z.array(i).optional(),usage:n.z.array(a).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),s=n.z.record(n.z.string(),o),c=n.z.object({path:n.z.string(),type:n.z.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:n.z.string().optional(),theme:n.z.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:n.z.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),l=n.z.object({name:n.z.string(),title:n.z.string(),category:n.z.string().optional(),description:n.z.string().optional(),tags:n.z.array(n.z.string()).optional(),aliases:n.z.array(n.z.string()).optional(),related:n.z.array(n.z.string()).optional(),since:n.z.string().optional(),version:n.z.string().optional(),repository:n.z.string().optional(),homepage:n.z.string().optional(),files:n.z.array(c).optional()}),u=n.z.record(n.z.string(),l),d=n.default.union([r.tokensSchema,n.default.record(n.default.string(),r.tokensSchema)]),f=n.default.object({name:n.default.string().optional(),title:n.default.string().optional(),repository:n.default.string().optional(),homepage:n.default.string().optional(),description:n.default.string().optional(),logo:n.default.string().optional(),tokens:d,components:s,icons:u,fonts:t.o});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./fonts-vhz5FAsy.cjs");let n=require("zod");n=e.t(n,1);let r=require("@power-plant/dtcg-schema");const i=n.z.object({path:n.z.string(),type:n.z.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:n.z.string().optional(),target:n.z.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),a=n.z.object({name:n.z.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:n.z.string().optional(),description:n.z.string().optional(),path:n.z.string(),content:n.z.string().optional(),language:n.z.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),o=n.z.object({name:n.z.string(),title:n.z.string(),type:n.z.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:n.z.string().optional(),description:n.z.string().optional(),tags:n.z.array(n.z.string()).optional(),related:n.z.array(n.z.string()).optional(),since:n.z.string().optional(),version:n.z.string().optional(),repository:n.z.string().optional(),homepage:n.z.string().optional(),dependencies:n.z.record(n.z.string(),n.z.string()).optional(),devDependencies:n.z.record(n.z.string(),n.z.string()).optional(),registryDependencies:n.z.record(n.z.string(),n.z.string()).optional(),files:n.z.array(i).optional(),usage:n.z.array(a).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),s=n.z.record(n.z.string(),o),c=n.z.object({path:n.z.string(),type:n.z.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:n.z.string().optional(),theme:n.z.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:n.z.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),l=n.z.object({name:n.z.string(),title:n.z.string(),category:n.z.string().optional(),description:n.z.string().optional(),tags:n.z.array(n.z.string()).optional(),aliases:n.z.array(n.z.string()).optional(),related:n.z.array(n.z.string()).optional(),since:n.z.string().optional(),version:n.z.string().optional(),repository:n.z.string().optional(),homepage:n.z.string().optional(),files:n.z.array(c).optional()}),u=n.z.record(n.z.string(),l),d=n.default.union([r.tokensSchema,n.default.record(n.default.string(),r.tokensSchema)]),f=n.default.object({name:n.default.string().optional(),title:n.default.string().optional(),repository:n.default.string().optional(),homepage:n.default.string().optional(),description:n.default.string().optional(),logo:n.default.string().optional(),theme:n.default.string().optional(),tokens:d,components:s,icons:u,fonts:t.o});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -529,6 +529,11 @@ interface Schema {
|
|
|
529
529
|
homepage?: string;
|
|
530
530
|
description?: string;
|
|
531
531
|
logo?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Active theme id when generating a single theme from a multi-theme token
|
|
534
|
+
* record. Generators append this to titles and output file names.
|
|
535
|
+
*/
|
|
536
|
+
theme?: string;
|
|
532
537
|
components: Components;
|
|
533
538
|
icons: Icons;
|
|
534
539
|
fonts: Fonts;
|
|
@@ -537,4 +542,4 @@ interface Schema {
|
|
|
537
542
|
declare const schema: z.ZodType<Schema>;
|
|
538
543
|
//#endregion
|
|
539
544
|
export { componentSchema as A, googleFontSchema as C, ComponentUsage as D, ComponentFile as E, componentsSchema as M, Components as O, fontsSchema as S, Component as T, fontDisplaySchema as _, Icons as a, fontRoleSchema as b, iconsSchema as c, FontFile as d, FontFileFormat as f, LocalFont as g, GoogleFont as h, IconFile as i, componentUsageSchema as j, componentFileSchema as k, Font as l, Fonts as m, schema as n, iconFileSchema as o, FontRole as p, Icon as r, iconSchema as s, Schema as t, FontDisplay as u, fontFileFormatSchema as v, localFontSchema as w, fontSchema as x, fontFileSchema as y };
|
|
540
|
-
//# sourceMappingURL=schema-
|
|
545
|
+
//# sourceMappingURL=schema-BwOBgJIM.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-
|
|
1
|
+
{"version":3,"file":"schema-BwOBgJIM.d.cts","names":[],"sources":["../src/schema/components.ts","../src/schema/fonts.ts","../src/schema/icons.ts","../src/schema/schema.ts"],"mappings":";;;cAoBa,qBAAmB,IAAA;;;;;;;;;;;;;;;;;;GAyB9B,IAAA,KAAA;KAEU,gBAAgB,IAAE,aAAa;;;;;;;;cAS9B,sBAAoB,IAAA;;;;;;;;;;;;;;;;;GAiB/B,IAAA,KAAA;KAEU,iBAAiB,IAAE,aAAa;cAE/B,iBAAe,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsB1B,IAAA,KAAA;KAEU,YAAY,IAAE,aAAa;cAE1B,kBAAgB,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,IAAA,KAAA;KAEzD,aAAa,IAAE,aAAa;;;cCrF3B,gBAAc,IAAA;;;;;;;;;KAUf,WAAW,IAAE,aAAa;cAEzB,mBAAiB,IAAA;;;;;;;KAQlB,cAAc,IAAE,aAAa;cAE5B,sBAAoB,IAAA;;;;;;;KAQrB,iBAAiB,IAAE,aAAa;cAE/B,gBAAc,IAAA;;;;;;;;;;;;;;;;GAMzB,IAAA,KAAA;KAEU,WAAW,IAAE,aAAa;cAiBzB,kBAAgB,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM3B,IAAA,KAAA;KAEU,aAAa,IAAE,aAAa;cAE3B,iBAAe,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAG1B,IAAA,KAAA;KAEU,YAAY,IAAE,aAAa;cAE1B,YAAU,IAAA,uBAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGrB,IAAA,KAAA;KAEU,OAAO,IAAE,aAAa;cAErB,aAAW,IAAA,UAAA,IAAA,WAAA,IAAA,uBAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmC,IAAA,KAAA;KAE/C,QAAQ,IAAE,aAAa;;;cCnFtB,gBAAc,IAAA;;;;;;;;;;;;;;;GAkBzB,IAAA,KAAA;KAEU,WAAW,IAAE,aAAa;cAEzB,YAAU,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAarB,IAAA,KAAA;KAEU,OAAO,IAAE,aAAa;cAErB,aAAW,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmC,IAAA,KAAA;KAE/C,QAAQ,IAAE,aAAa;;;UC5BlB;EACf;EACA;EACA;EACA;EACA;EACA;;;;;EAKA;EACA,YAAY;EACZ,OAAO;EACP,OAAO;EACP,QAAQ,SAAS,eAAe;;cAGrB,QAAQ,EAAE,QAAQ"}
|
|
@@ -529,6 +529,11 @@ interface Schema {
|
|
|
529
529
|
homepage?: string;
|
|
530
530
|
description?: string;
|
|
531
531
|
logo?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Active theme id when generating a single theme from a multi-theme token
|
|
534
|
+
* record. Generators append this to titles and output file names.
|
|
535
|
+
*/
|
|
536
|
+
theme?: string;
|
|
532
537
|
components: Components;
|
|
533
538
|
icons: Icons;
|
|
534
539
|
fonts: Fonts;
|
|
@@ -537,4 +542,4 @@ interface Schema {
|
|
|
537
542
|
declare const schema: z.ZodType<Schema>;
|
|
538
543
|
//#endregion
|
|
539
544
|
export { componentSchema as A, googleFontSchema as C, ComponentUsage as D, ComponentFile as E, componentsSchema as M, Components as O, fontsSchema as S, Component as T, fontDisplaySchema as _, Icons as a, fontRoleSchema as b, iconsSchema as c, FontFile as d, FontFileFormat as f, LocalFont as g, GoogleFont as h, IconFile as i, componentUsageSchema as j, componentFileSchema as k, Font as l, Fonts as m, schema as n, iconFileSchema as o, FontRole as p, Icon as r, iconSchema as s, Schema as t, FontDisplay as u, fontFileFormatSchema as v, localFontSchema as w, fontSchema as x, fontFileSchema as y };
|
|
540
|
-
//# sourceMappingURL=schema-
|
|
545
|
+
//# sourceMappingURL=schema-BwOBgJIM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-BwOBgJIM.d.mts","names":[],"sources":["../src/schema/components.ts","../src/schema/fonts.ts","../src/schema/icons.ts","../src/schema/schema.ts"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./fonts-B0ESWBBC.mjs";import t,{z as n}from"zod";import{tokenSchema as r,tokensSchema as i,tokensSchema as a}from"@power-plant/dtcg-schema";const o=n.object({path:n.string(),type:n.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:n.string().optional(),target:n.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),s=n.object({name:n.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:n.string().optional(),description:n.string().optional(),path:n.string(),content:n.string().optional(),language:n.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),c=n.object({name:n.string(),title:n.string(),type:n.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:n.string().optional(),description:n.string().optional(),tags:n.array(n.string()).optional(),related:n.array(n.string()).optional(),since:n.string().optional(),version:n.string().optional(),repository:n.string().optional(),homepage:n.string().optional(),dependencies:n.record(n.string(),n.string()).optional(),devDependencies:n.record(n.string(),n.string()).optional(),registryDependencies:n.record(n.string(),n.string()).optional(),files:n.array(o).optional(),usage:n.array(s).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),l=n.record(n.string(),c),u=n.object({path:n.string(),type:n.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:n.string().optional(),theme:n.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:n.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),d=n.object({name:n.string(),title:n.string(),category:n.string().optional(),description:n.string().optional(),tags:n.array(n.string()).optional(),aliases:n.array(n.string()).optional(),related:n.array(n.string()).optional(),since:n.string().optional(),version:n.string().optional(),repository:n.string().optional(),homepage:n.string().optional(),files:n.array(u).optional()}),f=n.record(n.string(),d),p=t.union([i,t.record(t.string(),i)]),m=t.object({name:t.string().optional(),title:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),description:t.string().optional(),logo:t.string().optional(),tokens:p,components:l,icons:f,fonts:e});export{d as a,c,u as i,s as l,a as n,f as o,m as r,o as s,r as t,l as u};
|
|
2
|
-
//# sourceMappingURL=schema-
|
|
1
|
+
import{o as e}from"./fonts-B0ESWBBC.mjs";import t,{z as n}from"zod";import{tokenSchema as r,tokensSchema as i,tokensSchema as a}from"@power-plant/dtcg-schema";const o=n.object({path:n.string(),type:n.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:n.string().optional(),target:n.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),s=n.object({name:n.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:n.string().optional(),description:n.string().optional(),path:n.string(),content:n.string().optional(),language:n.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),c=n.object({name:n.string(),title:n.string(),type:n.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:n.string().optional(),description:n.string().optional(),tags:n.array(n.string()).optional(),related:n.array(n.string()).optional(),since:n.string().optional(),version:n.string().optional(),repository:n.string().optional(),homepage:n.string().optional(),dependencies:n.record(n.string(),n.string()).optional(),devDependencies:n.record(n.string(),n.string()).optional(),registryDependencies:n.record(n.string(),n.string()).optional(),files:n.array(o).optional(),usage:n.array(s).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),l=n.record(n.string(),c),u=n.object({path:n.string(),type:n.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:n.string().optional(),theme:n.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:n.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),d=n.object({name:n.string(),title:n.string(),category:n.string().optional(),description:n.string().optional(),tags:n.array(n.string()).optional(),aliases:n.array(n.string()).optional(),related:n.array(n.string()).optional(),since:n.string().optional(),version:n.string().optional(),repository:n.string().optional(),homepage:n.string().optional(),files:n.array(u).optional()}),f=n.record(n.string(),d),p=t.union([i,t.record(t.string(),i)]),m=t.object({name:t.string().optional(),title:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),description:t.string().optional(),logo:t.string().optional(),theme:t.string().optional(),tokens:p,components:l,icons:f,fonts:e});export{d as a,c,u as i,s as l,a as n,f as o,m as r,o as s,r as t,l as u};
|
|
2
|
+
//# sourceMappingURL=schema-CXK5pVmJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-CXK5pVmJ.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utils-3eUdyRLZ.cjs");let n=require("node:path"),r=require("@stryke/fs/exists"),i=require("@stryke/fs/is-file"),a=require("@stryke/path/join"),o=require("@stryke/type-checks/is-set-string"),s=require("@stryke/type-checks/is-function"),c=require("@stryke/fs/resolve"),l=require("fast-glob");l=e.t(l,1);let u=require("style-dictionary");u=e.t(u,1);let d=require("style-dictionary/enums"),f=require("json5");f=e.t(f,1);let ee=require("smol-toml"),te=require("yaml");const p=[`razorwind-json`,`razorwind-yaml`,`razorwind-toml`,`razorwind-css`],m=[`json`,`json5`,`jsonc`,`yaml`,`yml`,`toml`,`css`,`js`,`mjs`,`cjs`,`ts`,`mts`,`cts`],ne=m.join(`,`),h=[`tokens.json`,`tokens.json5`,`tokens.jsonc`,`tokens.yaml`,`tokens.yml`,`tokens.toml`,`tokens.css`,`design-tokens.json`,`design-tokens.yaml`,`design-tokens.yml`,`tokens`,`design-tokens`,`src/tokens`,`src/design-tokens`,`packages/tokens`,`style-dictionary.config.js`,`style-dictionary.config.mjs`,`style-dictionary.config.ts`,`sd.config.js`,`sd.config.mjs`,`sd.config.ts`],g=`**/*.{${ne}}`,_=/^(light|dark|dim|dimmed|high-contrast|hc|protanopia|deuteranopia|tritanopia|achromatopsia|achromatomaly|monochrome|monochromatic|grayscale|greyscale|bw|black-and-white|black-white|blackWhite|default|base|theme)([._-].+)?$/i,v={color:`color`,colours:`color`,colors:`color`,colour:`color`,palette:`color`,bg:`color`,background:`color`,foreground:`color`,fg:`color`,border:`color`,fill:`color`,stroke:`color`,spacing:`dimension`,space:`dimension`,size:`dimension`,sizes:`dimension`,sizing:`dimension`,gap:`dimension`,radius:`dimension`,radii:`dimension`,rounded:`dimension`,width:`dimension`,height:`dimension`,dimension:`dimension`,dimensions:`dimension`,duration:`duration`,durations:`duration`,time:`duration`,delay:`duration`,animation:`duration`,motion:`duration`,transition:`duration`,font:`fontFamily`,fonts:`fontFamily`,fontfamily:`fontFamily`,"font-family":`fontFamily`,typeface:`fontFamily`,fontweight:`fontWeight`,"font-weight":`fontWeight`,weight:`fontWeight`,opacity:`number`,opacities:`number`,zindex:`number`,"z-index":`number`,lineheight:`number`,"line-height":`number`,letterspacing:`dimension`,"letter-spacing":`dimension`,shadow:`shadow`,shadows:`shadow`,elevation:`shadow`,gradient:`gradient`,gradients:`gradient`,typography:`typography`,text:`typography`,cubicbezier:`cubicBezier`,easing:`cubicBezier`,ease:`cubicBezier`},y={size:`dimension`,sizes:`dimension`,sizing:`dimension`,space:`dimension`,spacing:`dimension`,radii:`dimension`,rounded:`dimension`,colour:`color`,colours:`color`,colors:`color`,fontweight:`fontWeight`,"font-weight":`fontWeight`,fontfamily:`fontFamily`,"font-family":`fontFamily`,typeface:`fontFamily`,cubicbezier:`cubicBezier`,easing:`cubicBezier`,ease:`cubicBezier`,opacities:`number`,zindex:`number`,"z-index":`number`,lineheight:`number`,"line-height":`number`,letterspacing:`dimension`,"letter-spacing":`dimension`,shadows:`shadow`,elevation:`shadow`,gradients:`gradient`,durations:`duration`,time:`duration`,delay:`duration`};function b(e){return y[e.toLowerCase()]??e}const re=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ie=/^rgba?\(\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,ae=/^hsla?\(\s*([+\d.]+)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,x=/^oklch\(\s*([+\d.]+%?|none)\s+([+\d.]+|none)\s+([+\d.]+|none)(?:\s*\/\s*([+\d.]+%?))?\s*\)$/i,oe=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(px|rem|em|%|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc)$/i,se=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(ms|s)$/i,ce=/^cubic-bezier\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*\)$/i,le=/^var\(\s*(--[\w-]+)\s*(?:,\s*(?:\S.*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))?\)\s*$/i,ue=/^\{[^{}]+\}$/,de={thin:100,hairline:100,extralight:200,"extra-light":200,ultralight:200,light:300,normal:400,regular:400,book:400,medium:500,semibold:600,"semi-bold":600,demibold:600,bold:700,extrabold:800,"extra-bold":800,ultrabold:800,black:900,heavy:900},S=new Set([`px`,`rem`]);function C(e){return Math.min(1,Math.max(0,e))}function w(e,t=100){let n=e.trim();if(n.endsWith(`%`))return C(Number.parseFloat(n)/t);let r=Number.parseFloat(n);return C(r>1?r/255:r)}function fe(e){let t=e.slice(1);return t.length===3||t.length===4?`#${[...t].map(e=>e+e).join(``)}`:(e.length===7||e.length,e)}function T(e){let t=fe(e.toLowerCase()).slice(1),n=Number.parseInt(t.slice(0,2),16)/255,r=Number.parseInt(t.slice(2,4),16)/255,i=Number.parseInt(t.slice(4,6),16)/255,a=t.length===8?Number.parseInt(t.slice(6,8),16)/255:void 0;return{colorSpace:`srgb`,components:[n,r,i],...a===void 0||a===1?{}:{alpha:a},hex:`#${t.slice(0,6)}`}}function pe(e){return`{${e.replace(/^--/,``).split(`-`).filter(Boolean).join(`.`)}}`}function E(e){for(let t=e.length-1;t>=0;t--){let n=e[t]?.toLowerCase();if(!n)continue;let r=v[n];if(r)return r}}function D(e,n=[]){let r=E(n);if(typeof e==`string`){let t=e.trim();if(ue.test(t))return{value:t,type:r};let i=t.match(le);if(i?.[1])return{value:pe(i[1]),type:r};if(re.test(t))return{value:T(t),type:`color`};let a=t.match(ie);if(a){let e=[w(a[1]),w(a[2]),w(a[3])],t=a[4]?a[4].endsWith(`%`)?C(Number.parseFloat(a[4])/100):C(Number.parseFloat(a[4])):void 0;return{value:{colorSpace:`srgb`,components:e,...t===void 0||Number.isNaN(t)?{}:{alpha:t}},type:`color`}}let o=t.match(ae);if(o)return{value:{colorSpace:`hsl`,components:[Number.parseFloat(o[1]),Number.parseFloat(o[2]),Number.parseFloat(o[3])],...o[4]?{alpha:o[4].endsWith(`%`)?C(Number.parseFloat(o[4])/100):C(Number.parseFloat(o[4]))}:{}},type:`color`};let s=t.match(x);if(s){let e=e=>e===`none`?`none`:e.endsWith(`%`)?Number.parseFloat(e)/100:Number.parseFloat(e);return{value:{colorSpace:`oklch`,components:[e(s[1]),e(s[2]),e(s[3])],...s[4]?{alpha:s[4].endsWith(`%`)?C(Number.parseFloat(s[4])/100):C(Number.parseFloat(s[4]))}:{}},type:`color`}}let c=t.match(oe);if(c){let e=c[2].toLowerCase(),n=Number.parseFloat(c[1]);return S.has(e)?{value:{value:n,unit:e},type:`dimension`}:{value:t,type:r===`dimension`?void 0:r}}let l=t.match(se);if(l)return{value:{value:Number.parseFloat(l[1]),unit:l[2].toLowerCase()},type:`duration`};let u=t.match(ce);if(u)return{value:[Number.parseFloat(u[1]),Number.parseFloat(u[2]),Number.parseFloat(u[3]),Number.parseFloat(u[4])],type:`cubicBezier`};let d=de[t.toLowerCase()];return d===void 0?r===`fontFamily`||/family|font|typeface/i.test(n.at(-1)??``)?t.includes(`,`)?{value:t.split(`,`).map(e=>e.trim().replace(/^["']|["']$/g,``)),type:`fontFamily`}:{value:t.replace(/^["']|["']$/g,``),type:`fontFamily`}:r===`color`&&!t.startsWith(`{`)?{value:t,type:void 0}:{value:t,type:r}:{value:d,type:`fontWeight`}}if(typeof e==`number`)return r===`fontWeight`?{value:e,type:`fontWeight`}:r===`duration`?{value:{value:e,unit:`ms`},type:`duration`}:r===`dimension`?{value:{value:e,unit:`px`},type:`dimension`}:{value:e,type:r??`number`};if(Array.isArray(e))return e.length===4&&e.every(e=>typeof e==`number`)&&(r===`cubicBezier`||n.some(e=>/ease|bezier/i.test(e)))?{value:e,type:`cubicBezier`}:e.every(e=>typeof e==`string`)?{value:e,type:r??`fontFamily`}:{value:e,type:r};if(t.n(e)){if(`colorSpace`in e&&`components`in e)return{value:e,type:`color`};if(`value`in e&&`unit`in e){let t=String(e.unit).toLowerCase();return t===`ms`||t===`s`?{value:e,type:`duration`}:S.has(t)?{value:e,type:`dimension`}:{value:e,type:r}}}return{value:e,type:r}}function me(e,t){let n={...e};if(`value`in n&&!(`$value`in n)&&(n.$value=n.value,delete n.value),`type`in n&&!(`$type`in n)&&(n.$type=n.type,delete n.type),`comment`in n&&!(`$description`in n)&&(n.$description=n.comment,delete n.comment),`description`in n&&!(`$description`in n)&&(n.$description=n.description,delete n.description),`ref`in n&&!(`$ref`in n)&&(n.$ref=n.ref,delete n.ref),typeof n.$type==`string`&&(n.$type=b(n.$type)),`$value`in n){let e=D(n.$value,t);n.$value=e.value,!(`$type`in n)&&e.type&&(n.$type=e.type)}return n}function O(e,n=[]){if(Array.isArray(e))return e.map((e,t)=>O(e,[...n,String(t)]));if(!t.n(e))return e;if(t.g(e))return me(e,n);let r={};for(let[t,i]of Object.entries(e)){if(t.startsWith(`$`)){r[t]=i;continue}r[t]=O(i,[...n,t])}if(typeof r.$type==`string`)r.$type=b(r.$type);else if(!(`$type`in r)){let e=E(n);e&&n.length>0&&(r.$type=e)}return r}function k(e){let n={};for(let[r,i]of Object.entries(e)){let e=r.replace(/^--/,``).split(/[-./]/).filter(Boolean);if(e.length===0)continue;let a=n;for(let n=0;n<e.length-1;n++){let r=e[n],i=a[r];t.n(i)?t.g(i)&&(a[r]={DEFAULT:i}):a[r]={},a=a[r]}let o=e.at(-1),s=D(i,e),c={$value:s.value,...s.type?{$type:s.type}:{}},l=a[o];t.n(l)&&!t.g(l)?l.DEFAULT=c:a[o]=c}return O(n)}const he=/(--[A-Z_][\w-]*)\s*:\s*([^;}{]+?)(?=\s*(?:;|\}|$))/gi;function A(e){let t={},n=e.split(` `).join(` `).replace(/\s*\{\s*/g,` {
|
|
2
|
+
`).replace(/;\s*/g,`;
|
|
3
|
+
`).replace(/,\s*/g,`, `).replace(/ *\}\s*/g,`}
|
|
4
|
+
`).replace(/\}\s*(.+)/g,`}
|
|
5
|
+
$1`).replace(/\n {4}([^:]+):\s*/g,`
|
|
6
|
+
$1: `).replace(/([a-z0-9-)])\}/gi,`$1;
|
|
7
|
+
}`).replace(/\/\*[\s\S]*?\*\//g,``);for(let e of n.matchAll(he)){let n=e[1],r=e[2]?.trim();!n||!r||(t[n]=r)}return k(t)}function j(e){return e?{verbosity:d.logVerbosityLevels.verbose}:{}}const M=`razorwind-infer`;function N(e){if(e==null)return{};if(typeof e!=`object`||Array.isArray(e))throw TypeError(`Token file must parse to a plain object.`);return O(e)}function P(e){try{return N(f.default.parse(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse JSON token file: ${t}`)}}function F(e){try{return N((0,te.parse)(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse YAML token file: ${t}`)}}function I(e){try{return N((0,ee.parse)(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse TOML token file: ${t}`)}}const L=[{name:`razorwind-json`,pattern:/\.json[c5]?$/i,parser:({contents:e})=>P(e)},{name:`razorwind-yaml`,pattern:/\.ya?ml$/i,parser:({contents:e})=>F(e)},{name:`razorwind-toml`,pattern:/\.toml$/i,parser:({contents:e})=>I(e)},{name:`razorwind-css`,pattern:/\.css$/i,parser:({contents:e})=>O(A(e))}];function R(){return Object.fromEntries(L.map(({name:e,pattern:t,parser:n})=>[e,{pattern:t,parser:n}]))}function z(e){return O(e)}function B(){return{[M]:z}}function V(e=[]){let t={...R()},n={...B()},r=[...p],i=[M],a=0,o=0;for(let c of e){for(let e of c.parsers??[]){let n=e.name??`${c.name}-parser-${a}`;t[n]={pattern:e.pattern,parser:({contents:t})=>e.parser(t)},r.push(n),a++}for(let e of c.preprocessors??[]){let t=(0,s.isFunction)(e)?{name:`${c.name}-preprocessor-${o}`,preprocessor:e}:{name:e.name??`${c.name}-preprocessor-${o}`,preprocessor:e.preprocessor};n[t.name]=t.preprocessor,i.push(t.name),o++}}return{parsers:t,preprocessors:n,parserNames:r,preprocessorNames:i}}function H(e=[],t=u.default){let n=V(e);if(typeof t.registerParser==`function`)for(let[e,r]of Object.entries(n.parsers))t.registerParser({name:e,...r});if(typeof t.registerPreprocessor==`function`)for(let[e,r]of Object.entries(n.preprocessors))t.registerPreprocessor({name:e,preprocessor:r});return n}const ge=H;function U(e,t){return(0,n.isAbsolute)(t)?t:(0,n.resolve)(e,t)}function W(e){return/\.([^.]+)$/.exec(e)?.[1]?.toLowerCase()??``}function G(e){return m.includes(W(e))}function K(e){let t=e.split(/[/\\]/).pop()?.toLowerCase()??``;return t.startsWith(`style-dictionary.config.`)||t.startsWith(`sd.config.`)}function q(e){return(0,a.joinPaths)(e,g)}function _e(e){return Array.isArray(e)?e.filter(o.isSetString):(0,o.isSetString)(e)?[e]:[]}const ve=/[*?[\]{}]/;function ye(e){return ve.test(e)}function be(e){let t=e.search(/[*?[{]/);if(t<=0)return;let n=e.slice(0,t).replace(/[/\\]+$/,``);return n.length>0?n:void 0}function xe(e,t){let n=U(e,t);if(ye(t)){let e=be(n);if(e&&!(0,r.existsSync)(e))throw Error(`tokensPath "${t}" does not exist (resolved: ${n}).`);return{resolvedPath:n,source:[n],isStyleDictionaryConfig:!1}}if(!(0,r.existsSync)(n))throw Error(`tokensPath "${t}" does not exist (resolved: ${n}).`);return(0,i.isDirectory)(n)?{resolvedPath:n,source:[q(n)],isStyleDictionaryConfig:!1}:K(n)?{resolvedPath:n,source:[],isStyleDictionaryConfig:!0}:{resolvedPath:n,source:[n],isStyleDictionaryConfig:!1}}function J(e){let{cwd:t,tokensPath:n,fallbackPaths:a=[]}=e,o=_e(n);if(o.length>0){let e=o.map(e=>xe(t,e)),n=e.filter(e=>e.isStyleDictionaryConfig);if(n.length>0){if(e.length>1)throw Error(`tokensPath cannot mix Style Dictionary config files with other token sources.`);return{resolvedPath:n[0].resolvedPath,source:[],origin:`tokensPath`}}return{resolvedPath:e[0]?.resolvedPath,source:e.flatMap(e=>e.source),origin:`tokensPath`}}for(let e of h){let n=U(t,e);if((0,r.existsSync)(n)){if((0,i.isDirectory)(n))return{resolvedPath:n,source:[q(n)],origin:`default`};if(K(n))return{resolvedPath:n,source:[],origin:`default`};if(G(n))return{resolvedPath:n,source:[n],origin:`default`}}}for(let e of a){if(!e)continue;let n=U(t,e);if(!(!(0,r.existsSync)(n)||(0,i.isDirectory)(n))&&(G(n)||W(n)===`css`))return{resolvedPath:n,source:[n],origin:`fallback`}}return{source:[],origin:`none`}}function Y(e){return(e.split(/[/\\]/).pop()??``).replace(/\.[^.]+$/,``).match(_)?.[1]?.toLowerCase()}function Se(e){let t=e,n=new Set;for(;t!=null&&!n.has(t);){if(n.add(t),typeof t==`function`)return t;if(typeof t==`object`&&`default`in t){t=t.default;continue}break}throw TypeError(`style-dictionary did not export a constructable StyleDictionary class.`)}const Ce=Se(u.default);function X(e){return!e||typeof e!=`object`||Object.keys(e).length===0}async function we(e){let t=await(0,c.importModule)(e);return t&&typeof t==`object`&&`default`in t&&t.default?t.default:t}async function Z(e,t){let n=V(e.plugins),r=new Ce({...t,parsers:[...n.parserNames,...t.parsers??[]],preprocessors:[...n.preprocessorNames,...t.preprocessors??[]],hooks:{...t.hooks,parsers:{...n.parsers,...t.hooks?.parsers},preprocessors:{...n.preprocessors,...t.hooks?.preprocessors}},usesDtcg:t.usesDtcg??!0,platforms:t.platforms??{}},j(e.verbose));return await r.hasInitialized,r}async function Q(e,t){return t.length===0?{}:(await Z(e,{source:t})).tokens}async function Te(e){return(await(0,l.default)(e,{absolute:!0,onlyFiles:!0,unique:!0})).sort()}async function Ee(e,t){let n=await Te(t);if(n.length===0)return{};let r=new Map,i=[];for(let e of n){let t=Y(e);if(t){let n=r.get(t)??[];n.push(e),r.set(t,n)}else i.push(e)}if(r.size<2)return Q(e,t);let a={};if(i.length>0){let t=await Q(e,i);X(t)||(a.base=t)}for(let[t,n]of r)a[t]=await Q(e,[...i,...n]);return a}async function $(e){let t=J(e.options);return t.resolvedPath&&(0,r.existsSync)(t.resolvedPath)&&/(?:^|[/\\])(?:style-dictionary|sd)\.config\./i.test((0,n.basename)(t.resolvedPath))?(e.sd=await Z(e.options,await we(t.resolvedPath)),e.sd.tokens):t.source.length===0?{}:e.options.splitThemes?Ee(e.options,t.source):Q(e.options,t.source)}async function De(e){let t=await $(e);if(X(t)){let{tokensPath:t}=e.options,n=Array.isArray(t)?t.length>0?`tokensPath=[${t.map(e=>`"${e}"`).join(`, `)}]`:`default token paths / CSS fallbacks`:(0,o.isSetString)(t)?`tokensPath="${t}"`:`default token paths / CSS fallbacks`;throw Error(`No design tokens found via ${n}. Provide tokensPath or add a tokens file.`)}return t}Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{g as e,n as t}from"./utils-CMqr6G7v.mjs";import{basename as n,isAbsolute as r,resolve as i}from"node:path";import{existsSync as a}from"@stryke/fs/exists";import{isDirectory as o}from"@stryke/fs/is-file";import{joinPaths as s}from"@stryke/path/join";import{isSetString as c}from"@stryke/type-checks/is-set-string";import{isFunction as l}from"@stryke/type-checks/is-function";import{importModule as u}from"@stryke/fs/resolve";import d from"fast-glob";import f from"style-dictionary";import{logVerbosityLevels as ee}from"style-dictionary/enums";import te from"json5";import{parse as ne}from"smol-toml";import{parse as re}from"yaml";const p=[`razorwind-json`,`razorwind-yaml`,`razorwind-toml`,`razorwind-css`],m=[`json`,`json5`,`jsonc`,`yaml`,`yml`,`toml`,`css`,`js`,`mjs`,`cjs`,`ts`,`mts`,`cts`],ie=m.join(`,`),h=[`tokens.json`,`tokens.json5`,`tokens.jsonc`,`tokens.yaml`,`tokens.yml`,`tokens.toml`,`tokens.css`,`design-tokens.json`,`design-tokens.yaml`,`design-tokens.yml`,`tokens`,`design-tokens`,`src/tokens`,`src/design-tokens`,`packages/tokens`,`style-dictionary.config.js`,`style-dictionary.config.mjs`,`style-dictionary.config.ts`,`sd.config.js`,`sd.config.mjs`,`sd.config.ts`],g=`**/*.{${ie}}`,_=/^(light|dark|dim|dimmed|high-contrast|hc|protanopia|deuteranopia|tritanopia|achromatopsia|achromatomaly|monochrome|monochromatic|grayscale|greyscale|bw|black-and-white|black-white|blackWhite|default|base|theme)([._-].+)?$/i,v={color:`color`,colours:`color`,colors:`color`,colour:`color`,palette:`color`,bg:`color`,background:`color`,foreground:`color`,fg:`color`,border:`color`,fill:`color`,stroke:`color`,spacing:`dimension`,space:`dimension`,size:`dimension`,sizes:`dimension`,sizing:`dimension`,gap:`dimension`,radius:`dimension`,radii:`dimension`,rounded:`dimension`,width:`dimension`,height:`dimension`,dimension:`dimension`,dimensions:`dimension`,duration:`duration`,durations:`duration`,time:`duration`,delay:`duration`,animation:`duration`,motion:`duration`,transition:`duration`,font:`fontFamily`,fonts:`fontFamily`,fontfamily:`fontFamily`,"font-family":`fontFamily`,typeface:`fontFamily`,fontweight:`fontWeight`,"font-weight":`fontWeight`,weight:`fontWeight`,opacity:`number`,opacities:`number`,zindex:`number`,"z-index":`number`,lineheight:`number`,"line-height":`number`,letterspacing:`dimension`,"letter-spacing":`dimension`,shadow:`shadow`,shadows:`shadow`,elevation:`shadow`,gradient:`gradient`,gradients:`gradient`,typography:`typography`,text:`typography`,cubicbezier:`cubicBezier`,easing:`cubicBezier`,ease:`cubicBezier`},y={size:`dimension`,sizes:`dimension`,sizing:`dimension`,space:`dimension`,spacing:`dimension`,radii:`dimension`,rounded:`dimension`,colour:`color`,colours:`color`,colors:`color`,fontweight:`fontWeight`,"font-weight":`fontWeight`,fontfamily:`fontFamily`,"font-family":`fontFamily`,typeface:`fontFamily`,cubicbezier:`cubicBezier`,easing:`cubicBezier`,ease:`cubicBezier`,opacities:`number`,zindex:`number`,"z-index":`number`,lineheight:`number`,"line-height":`number`,letterspacing:`dimension`,"letter-spacing":`dimension`,shadows:`shadow`,elevation:`shadow`,gradients:`gradient`,durations:`duration`,time:`duration`,delay:`duration`};function b(e){return y[e.toLowerCase()]??e}const ae=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,oe=/^rgba?\(\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,se=/^hsla?\(\s*([+\d.]+)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,ce=/^oklch\(\s*([+\d.]+%?|none)\s+([+\d.]+|none)\s+([+\d.]+|none)(?:\s*\/\s*([+\d.]+%?))?\s*\)$/i,x=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(px|rem|em|%|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc)$/i,S=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(ms|s)$/i,le=/^cubic-bezier\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*\)$/i,ue=/^var\(\s*(--[\w-]+)\s*(?:,\s*(?:\S.*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))?\)\s*$/i,de=/^\{[^{}]+\}$/,fe={thin:100,hairline:100,extralight:200,"extra-light":200,ultralight:200,light:300,normal:400,regular:400,book:400,medium:500,semibold:600,"semi-bold":600,demibold:600,bold:700,extrabold:800,"extra-bold":800,ultrabold:800,black:900,heavy:900},C=new Set([`px`,`rem`]);function w(e){return Math.min(1,Math.max(0,e))}function T(e,t=100){let n=e.trim();if(n.endsWith(`%`))return w(Number.parseFloat(n)/t);let r=Number.parseFloat(n);return w(r>1?r/255:r)}function pe(e){let t=e.slice(1);return t.length===3||t.length===4?`#${[...t].map(e=>e+e).join(``)}`:(e.length===7||e.length,e)}function me(e){let t=pe(e.toLowerCase()).slice(1),n=Number.parseInt(t.slice(0,2),16)/255,r=Number.parseInt(t.slice(2,4),16)/255,i=Number.parseInt(t.slice(4,6),16)/255,a=t.length===8?Number.parseInt(t.slice(6,8),16)/255:void 0;return{colorSpace:`srgb`,components:[n,r,i],...a===void 0||a===1?{}:{alpha:a},hex:`#${t.slice(0,6)}`}}function he(e){return`{${e.replace(/^--/,``).split(`-`).filter(Boolean).join(`.`)}}`}function E(e){for(let t=e.length-1;t>=0;t--){let n=e[t]?.toLowerCase();if(!n)continue;let r=v[n];if(r)return r}}function D(e,n=[]){let r=E(n);if(typeof e==`string`){let t=e.trim();if(de.test(t))return{value:t,type:r};let i=t.match(ue);if(i?.[1])return{value:he(i[1]),type:r};if(ae.test(t))return{value:me(t),type:`color`};let a=t.match(oe);if(a){let e=[T(a[1]),T(a[2]),T(a[3])],t=a[4]?a[4].endsWith(`%`)?w(Number.parseFloat(a[4])/100):w(Number.parseFloat(a[4])):void 0;return{value:{colorSpace:`srgb`,components:e,...t===void 0||Number.isNaN(t)?{}:{alpha:t}},type:`color`}}let o=t.match(se);if(o)return{value:{colorSpace:`hsl`,components:[Number.parseFloat(o[1]),Number.parseFloat(o[2]),Number.parseFloat(o[3])],...o[4]?{alpha:o[4].endsWith(`%`)?w(Number.parseFloat(o[4])/100):w(Number.parseFloat(o[4]))}:{}},type:`color`};let s=t.match(ce);if(s){let e=e=>e===`none`?`none`:e.endsWith(`%`)?Number.parseFloat(e)/100:Number.parseFloat(e);return{value:{colorSpace:`oklch`,components:[e(s[1]),e(s[2]),e(s[3])],...s[4]?{alpha:s[4].endsWith(`%`)?w(Number.parseFloat(s[4])/100):w(Number.parseFloat(s[4]))}:{}},type:`color`}}let c=t.match(x);if(c){let e=c[2].toLowerCase(),n=Number.parseFloat(c[1]);return C.has(e)?{value:{value:n,unit:e},type:`dimension`}:{value:t,type:r===`dimension`?void 0:r}}let l=t.match(S);if(l)return{value:{value:Number.parseFloat(l[1]),unit:l[2].toLowerCase()},type:`duration`};let u=t.match(le);if(u)return{value:[Number.parseFloat(u[1]),Number.parseFloat(u[2]),Number.parseFloat(u[3]),Number.parseFloat(u[4])],type:`cubicBezier`};let d=fe[t.toLowerCase()];return d===void 0?r===`fontFamily`||/family|font|typeface/i.test(n.at(-1)??``)?t.includes(`,`)?{value:t.split(`,`).map(e=>e.trim().replace(/^["']|["']$/g,``)),type:`fontFamily`}:{value:t.replace(/^["']|["']$/g,``),type:`fontFamily`}:r===`color`&&!t.startsWith(`{`)?{value:t,type:void 0}:{value:t,type:r}:{value:d,type:`fontWeight`}}if(typeof e==`number`)return r===`fontWeight`?{value:e,type:`fontWeight`}:r===`duration`?{value:{value:e,unit:`ms`},type:`duration`}:r===`dimension`?{value:{value:e,unit:`px`},type:`dimension`}:{value:e,type:r??`number`};if(Array.isArray(e))return e.length===4&&e.every(e=>typeof e==`number`)&&(r===`cubicBezier`||n.some(e=>/ease|bezier/i.test(e)))?{value:e,type:`cubicBezier`}:e.every(e=>typeof e==`string`)?{value:e,type:r??`fontFamily`}:{value:e,type:r};if(t(e)){if(`colorSpace`in e&&`components`in e)return{value:e,type:`color`};if(`value`in e&&`unit`in e){let t=String(e.unit).toLowerCase();return t===`ms`||t===`s`?{value:e,type:`duration`}:C.has(t)?{value:e,type:`dimension`}:{value:e,type:r}}}return{value:e,type:r}}function ge(e,t){let n={...e};if(`value`in n&&!(`$value`in n)&&(n.$value=n.value,delete n.value),`type`in n&&!(`$type`in n)&&(n.$type=n.type,delete n.type),`comment`in n&&!(`$description`in n)&&(n.$description=n.comment,delete n.comment),`description`in n&&!(`$description`in n)&&(n.$description=n.description,delete n.description),`ref`in n&&!(`$ref`in n)&&(n.$ref=n.ref,delete n.ref),typeof n.$type==`string`&&(n.$type=b(n.$type)),`$value`in n){let e=D(n.$value,t);n.$value=e.value,!(`$type`in n)&&e.type&&(n.$type=e.type)}return n}function O(n,r=[]){if(Array.isArray(n))return n.map((e,t)=>O(e,[...r,String(t)]));if(!t(n))return n;if(e(n))return ge(n,r);let i={};for(let[e,t]of Object.entries(n)){if(e.startsWith(`$`)){i[e]=t;continue}i[e]=O(t,[...r,e])}if(typeof i.$type==`string`)i.$type=b(i.$type);else if(!(`$type`in i)){let e=E(r);e&&r.length>0&&(i.$type=e)}return i}function k(n){let r={};for(let[i,a]of Object.entries(n)){let n=i.replace(/^--/,``).split(/[-./]/).filter(Boolean);if(n.length===0)continue;let o=r;for(let r=0;r<n.length-1;r++){let i=n[r],a=o[i];t(a)?e(a)&&(o[i]={DEFAULT:a}):o[i]={},o=o[i]}let s=n.at(-1),c=D(a,n),l={$value:c.value,...c.type?{$type:c.type}:{}},u=o[s];t(u)&&!e(u)?u.DEFAULT=l:o[s]=l}return O(r)}const _e=/(--[A-Z_][\w-]*)\s*:\s*([^;}{]+?)(?=\s*(?:;|\}|$))/gi;function A(e){let t={},n=e.split(` `).join(` `).replace(/\s*\{\s*/g,` {
|
|
2
|
+
`).replace(/;\s*/g,`;
|
|
3
|
+
`).replace(/,\s*/g,`, `).replace(/ *\}\s*/g,`}
|
|
4
|
+
`).replace(/\}\s*(.+)/g,`}
|
|
5
|
+
$1`).replace(/\n {4}([^:]+):\s*/g,`
|
|
6
|
+
$1: `).replace(/([a-z0-9-)])\}/gi,`$1;
|
|
7
|
+
}`).replace(/\/\*[\s\S]*?\*\//g,``);for(let e of n.matchAll(_e)){let n=e[1],r=e[2]?.trim();!n||!r||(t[n]=r)}return k(t)}function j(e){return e?{verbosity:ee.verbose}:{}}const M=`razorwind-infer`;function N(e){if(e==null)return{};if(typeof e!=`object`||Array.isArray(e))throw TypeError(`Token file must parse to a plain object.`);return O(e)}function P(e){try{return N(te.parse(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse JSON token file: ${t}`)}}function F(e){try{return N(re(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse YAML token file: ${t}`)}}function I(e){try{return N(ne(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse TOML token file: ${t}`)}}const ve=[{name:`razorwind-json`,pattern:/\.json[c5]?$/i,parser:({contents:e})=>P(e)},{name:`razorwind-yaml`,pattern:/\.ya?ml$/i,parser:({contents:e})=>F(e)},{name:`razorwind-toml`,pattern:/\.toml$/i,parser:({contents:e})=>I(e)},{name:`razorwind-css`,pattern:/\.css$/i,parser:({contents:e})=>O(A(e))}];function L(){return Object.fromEntries(ve.map(({name:e,pattern:t,parser:n})=>[e,{pattern:t,parser:n}]))}function R(e){return O(e)}function z(){return{[M]:R}}function B(e=[]){let t={...L()},n={...z()},r=[...p],i=[M],a=0,o=0;for(let s of e){for(let e of s.parsers??[]){let n=e.name??`${s.name}-parser-${a}`;t[n]={pattern:e.pattern,parser:({contents:t})=>e.parser(t)},r.push(n),a++}for(let e of s.preprocessors??[]){let t=l(e)?{name:`${s.name}-preprocessor-${o}`,preprocessor:e}:{name:e.name??`${s.name}-preprocessor-${o}`,preprocessor:e.preprocessor};n[t.name]=t.preprocessor,i.push(t.name),o++}}return{parsers:t,preprocessors:n,parserNames:r,preprocessorNames:i}}function V(e=[],t=f){let n=B(e);if(typeof t.registerParser==`function`)for(let[e,r]of Object.entries(n.parsers))t.registerParser({name:e,...r});if(typeof t.registerPreprocessor==`function`)for(let[e,r]of Object.entries(n.preprocessors))t.registerPreprocessor({name:e,preprocessor:r});return n}const ye=V;function H(e,t){return r(t)?t:i(e,t)}function U(e){return/\.([^.]+)$/.exec(e)?.[1]?.toLowerCase()??``}function W(e){return m.includes(U(e))}function G(e){let t=e.split(/[/\\]/).pop()?.toLowerCase()??``;return t.startsWith(`style-dictionary.config.`)||t.startsWith(`sd.config.`)}function K(e){return s(e,g)}function be(e){return Array.isArray(e)?e.filter(c):c(e)?[e]:[]}const xe=/[*?[\]{}]/;function Se(e){return xe.test(e)}function Ce(e){let t=e.search(/[*?[{]/);if(t<=0)return;let n=e.slice(0,t).replace(/[/\\]+$/,``);return n.length>0?n:void 0}function we(e,t){let n=H(e,t);if(Se(t)){let e=Ce(n);if(e&&!a(e))throw Error(`tokensPath "${t}" does not exist (resolved: ${n}).`);return{resolvedPath:n,source:[n],isStyleDictionaryConfig:!1}}if(!a(n))throw Error(`tokensPath "${t}" does not exist (resolved: ${n}).`);return o(n)?{resolvedPath:n,source:[K(n)],isStyleDictionaryConfig:!1}:G(n)?{resolvedPath:n,source:[],isStyleDictionaryConfig:!0}:{resolvedPath:n,source:[n],isStyleDictionaryConfig:!1}}function q(e){let{cwd:t,tokensPath:n,fallbackPaths:r=[]}=e,i=be(n);if(i.length>0){let e=i.map(e=>we(t,e)),n=e.filter(e=>e.isStyleDictionaryConfig);if(n.length>0){if(e.length>1)throw Error(`tokensPath cannot mix Style Dictionary config files with other token sources.`);return{resolvedPath:n[0].resolvedPath,source:[],origin:`tokensPath`}}return{resolvedPath:e[0]?.resolvedPath,source:e.flatMap(e=>e.source),origin:`tokensPath`}}for(let e of h){let n=H(t,e);if(a(n)){if(o(n))return{resolvedPath:n,source:[K(n)],origin:`default`};if(G(n))return{resolvedPath:n,source:[],origin:`default`};if(W(n))return{resolvedPath:n,source:[n],origin:`default`}}}for(let e of r){if(!e)continue;let n=H(t,e);if(!(!a(n)||o(n))&&(W(n)||U(n)===`css`))return{resolvedPath:n,source:[n],origin:`fallback`}}return{source:[],origin:`none`}}function J(e){return(e.split(/[/\\]/).pop()??``).replace(/\.[^.]+$/,``).match(_)?.[1]?.toLowerCase()}function Y(e){let t=e,n=new Set;for(;t!=null&&!n.has(t);){if(n.add(t),typeof t==`function`)return t;if(typeof t==`object`&&`default`in t){t=t.default;continue}break}throw TypeError(`style-dictionary did not export a constructable StyleDictionary class.`)}const Te=Y(f);function X(e){return!e||typeof e!=`object`||Object.keys(e).length===0}async function Ee(e){let t=await u(e);return t&&typeof t==`object`&&`default`in t&&t.default?t.default:t}async function Z(e,t){let n=B(e.plugins),r=new Te({...t,parsers:[...n.parserNames,...t.parsers??[]],preprocessors:[...n.preprocessorNames,...t.preprocessors??[]],hooks:{...t.hooks,parsers:{...n.parsers,...t.hooks?.parsers},preprocessors:{...n.preprocessors,...t.hooks?.preprocessors}},usesDtcg:t.usesDtcg??!0,platforms:t.platforms??{}},j(e.verbose));return await r.hasInitialized,r}async function Q(e,t){return t.length===0?{}:(await Z(e,{source:t})).tokens}async function De(e){return(await d(e,{absolute:!0,onlyFiles:!0,unique:!0})).sort()}async function Oe(e,t){let n=await De(t);if(n.length===0)return{};let r=new Map,i=[];for(let e of n){let t=J(e);if(t){let n=r.get(t)??[];n.push(e),r.set(t,n)}else i.push(e)}if(r.size<2)return Q(e,t);let a={};if(i.length>0){let t=await Q(e,i);X(t)||(a.base=t)}for(let[t,n]of r)a[t]=await Q(e,[...i,...n]);return a}async function $(e){let t=q(e.options);return t.resolvedPath&&a(t.resolvedPath)&&/(?:^|[/\\])(?:style-dictionary|sd)\.config\./i.test(n(t.resolvedPath))?(e.sd=await Z(e.options,await Ee(t.resolvedPath)),e.sd.tokens):t.source.length===0?{}:e.options.splitThemes?Oe(e.options,t.source):Q(e.options,t.source)}async function ke(e){let t=await $(e);if(X(t)){let{tokensPath:t}=e.options,n=Array.isArray(t)?t.length>0?`tokensPath=[${t.map(e=>`"${e}"`).join(`, `)}]`:`default token paths / CSS fallbacks`:c(t)?`tokensPath="${t}"`:`default token paths / CSS fallbacks`;throw Error(`No design tokens found via ${n}. Provide tokensPath or add a tokens file.`)}return t}export{p as C,b as E,m as S,v as T,k as _,J as a,_ as b,L as c,V as d,ye as f,D as g,E as h,q as i,z as l,A as m,$ as n,M as o,j as p,ke as r,B as s,X as t,R as u,O as v,y as w,g as x,h as y};
|
|
8
|
+
//# sourceMappingURL=tokens-C_RYVqap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens-C_RYVqap.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils-3eUdyRLZ.cjs");exports.SHARED_THEME_ID=e.f,exports.TOKEN_SET_THEME_PATTERN=e.p,exports.appendThemeToFilePath=e.o,exports.applyThemeToDocuments=e.s,exports.applyThemeToTitle=e.c,exports.createDocument=e.t,exports.flattenTokens=e.m,exports.formatColorValue=e.v,exports.formatCssAliasReferences=e.y,exports.formatDimensionValue=e.b,exports.formatShadowValue=e.x,exports.formatTokenValue=e.S,exports.isObject=e.n,exports.isSharedThemeId=e.h,exports.isTokenLeaf=e.g,exports.mergeTokenTrees=e.d,exports.resolveSchemaIdentity=e.a,exports.resolveTokenSets=e._,exports.slugifyThemeName=e.u,exports.themeDisplayName=e.i,exports.titleCase=e.l,exports.toCssVar=e.r,exports.toThemeCssVar=e.C;
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,79 +1,57 @@
|
|
|
1
|
-
import { t as Schema } from "../schema-
|
|
2
|
-
import { n as Tokens } from "../index-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Convert a DTCG color `$value` (string, hex/alpha object, or
|
|
7
|
-
* colorSpace/components object) into a CSS-friendly color string.
|
|
8
|
-
*/
|
|
9
|
-
declare function formatColorValue(value: unknown): string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Convert a DTCG dimension/duration `$value` (number, string, or
|
|
12
|
-
* value/unit object) into a CSS-friendly string.
|
|
13
|
-
*/
|
|
14
|
-
declare function formatDimensionValue(value: unknown): string | undefined;
|
|
1
|
+
import { t as Schema } from "../schema-BwOBgJIM.cjs";
|
|
2
|
+
import { n as Tokens } from "../index-CwN0c1Q4.cjs";
|
|
3
|
+
import { a as TokenSet, c as isTokenLeaf, i as TOKEN_SET_THEME_PATTERN, l as resolveTokenSets, n as FlattenTokensOptions, o as flattenTokens, r as SHARED_THEME_ID, s as isSharedThemeId, t as BaseFlatToken } from "../flatten-tokens-DWbPW_3z.cjs";
|
|
4
|
+
import { GeneratedDocument, GeneratorFunctionResult } from "@power-plant/core";
|
|
5
|
+
//#region src/utils/merge-tokens.d.ts
|
|
15
6
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
7
|
+
* Deep-merge token **groups**, replacing token leaves atomically.
|
|
8
|
+
*
|
|
9
|
+
* Unlike `defu`, this does not concatenate arrays inside `$value` (color
|
|
10
|
+
* `components`, cubicBezier lists, shadow layers). Theme `override` wins
|
|
11
|
+
* for leaves and `$`-prefixed group metadata.
|
|
18
12
|
*/
|
|
19
|
-
declare function
|
|
13
|
+
declare function mergeTokenTrees(override: Tokens, base: Tokens): Tokens;
|
|
20
14
|
//#endregion
|
|
21
|
-
//#region src/utils/
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/** Dot-separated token path (e.g. `color.primary`). */
|
|
27
|
-
path: string;
|
|
28
|
-
/** DTCG `$type`, when known. */
|
|
29
|
-
type?: string;
|
|
30
|
-
/** Raw `$value` from the token document. */
|
|
31
|
-
value: unknown;
|
|
32
|
-
/** CSS-friendly string form of {@link value}. */
|
|
33
|
-
cssValue: string;
|
|
34
|
-
/** Optional DTCG `$description`. */
|
|
15
|
+
//#region src/utils/schema-identity.d.ts
|
|
16
|
+
/** Design-system identity resolved for generated artifacts. */
|
|
17
|
+
interface SchemaIdentity {
|
|
18
|
+
name?: string;
|
|
19
|
+
title?: string;
|
|
35
20
|
description?: string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
interface TokenSet {
|
|
40
|
-
id: string;
|
|
41
|
-
tokens: Tokens;
|
|
21
|
+
repository?: string;
|
|
22
|
+
homepage?: string;
|
|
23
|
+
logo?: string;
|
|
42
24
|
}
|
|
43
25
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* Extends core {@link ../lib/tokens/constants#THEME_BASENAME_PATTERN} with
|
|
47
|
-
* camelCase suffixes from `@razorwind/color-variants` (e.g. `darkHighContrast`).
|
|
26
|
+
* Plugin / call-site overrides. `displayName` aliases `title`; `icon` aliases
|
|
27
|
+
* `logo` (VS Code / Cursor extension field names).
|
|
48
28
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/** When set, only tokens whose `$type` is listed are returned. */
|
|
59
|
-
includeTypes?: readonly string[];
|
|
60
|
-
/** Map each base row before it is appended (e.g. add `cssVar`). */
|
|
61
|
-
enrichToken?: (token: BaseFlatToken) => T;
|
|
29
|
+
interface SchemaIdentityOverrides {
|
|
30
|
+
name?: string;
|
|
31
|
+
title?: string;
|
|
32
|
+
displayName?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
repository?: string;
|
|
35
|
+
homepage?: string;
|
|
36
|
+
logo?: string;
|
|
37
|
+
icon?: string;
|
|
62
38
|
}
|
|
63
39
|
/**
|
|
64
|
-
*
|
|
40
|
+
* Resolve design-system identity for generators.
|
|
41
|
+
*
|
|
42
|
+
* Precedence: plugin overrides → {@link Schema} fields → title-cased name.
|
|
43
|
+
* When {@link Schema.theme} is set, titles gain a ` (<Theme>)` suffix.
|
|
65
44
|
*/
|
|
66
|
-
declare function
|
|
45
|
+
declare function resolveSchemaIdentity(spec: Pick<Schema, "name" | "title" | "description" | "repository" | "homepage" | "logo" | "theme">, overrides?: SchemaIdentityOverrides): SchemaIdentity;
|
|
67
46
|
//#endregion
|
|
68
|
-
//#region src/utils/
|
|
47
|
+
//#region src/utils/slugify-theme-name.d.ts
|
|
69
48
|
/**
|
|
70
|
-
* Convert a
|
|
49
|
+
* Convert a theme name into a filesystem-safe slug.
|
|
71
50
|
*
|
|
72
51
|
* @example
|
|
73
|
-
*
|
|
74
|
-
* titleCase("darkHighContrast") // "Dark High Contrast"
|
|
52
|
+
* slugifyThemeName("My Dark Theme") // "my-dark-theme"
|
|
75
53
|
*/
|
|
76
|
-
declare function
|
|
54
|
+
declare function slugifyThemeName(name: string): string;
|
|
77
55
|
//#endregion
|
|
78
56
|
//#region src/utils/theme-display-name.d.ts
|
|
79
57
|
/** Theme-like object with optional human-readable label. */
|
|
@@ -87,45 +65,70 @@ interface ThemeNamed {
|
|
|
87
65
|
*/
|
|
88
66
|
declare function themeDisplayName(theme: ThemeNamed): string;
|
|
89
67
|
//#endregion
|
|
90
|
-
//#region src/utils/
|
|
68
|
+
//#region src/utils/theme-output.d.ts
|
|
91
69
|
/**
|
|
92
|
-
*
|
|
70
|
+
* Append a title-cased theme label to a display title.
|
|
93
71
|
*
|
|
94
72
|
* @example
|
|
95
|
-
*
|
|
73
|
+
* applyThemeToTitle("My Theme", "dark") // "My Theme (Dark)"
|
|
96
74
|
*/
|
|
97
|
-
declare function
|
|
75
|
+
declare function applyThemeToTitle(title: string | undefined, theme: string | undefined): string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Insert `-<theme>` before a file path's extension.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* appendThemeToFilePath("tokens.css", "dark") // "tokens-dark.css"
|
|
81
|
+
*/
|
|
82
|
+
declare function appendThemeToFilePath(filePath: string, theme: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Rewrite document record keys and {@link GeneratedDocument.path} with a
|
|
85
|
+
* theme suffix so per-theme generator passes do not collide.
|
|
86
|
+
*/
|
|
87
|
+
declare function applyThemeToDocuments(documents: Record<string, GeneratedDocument>, theme: string): Record<string, GeneratedDocument>;
|
|
98
88
|
//#endregion
|
|
99
|
-
//#region src/utils/
|
|
100
|
-
/** Design-system identity resolved for generated artifacts. */
|
|
101
|
-
interface SchemaIdentity {
|
|
102
|
-
name?: string;
|
|
103
|
-
title?: string;
|
|
104
|
-
description?: string;
|
|
105
|
-
repository?: string;
|
|
106
|
-
homepage?: string;
|
|
107
|
-
logo?: string;
|
|
108
|
-
}
|
|
89
|
+
//#region src/utils/title-case.d.ts
|
|
109
90
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
91
|
+
* Convert a slug or identifier into title case for display labels.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* titleCase("my-dark-theme") // "My Dark Theme"
|
|
95
|
+
* titleCase("darkHighContrast") // "Dark High Contrast"
|
|
112
96
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
displayName?: string;
|
|
117
|
-
description?: string;
|
|
118
|
-
repository?: string;
|
|
119
|
-
homepage?: string;
|
|
120
|
-
logo?: string;
|
|
121
|
-
icon?: string;
|
|
122
|
-
}
|
|
97
|
+
declare function titleCase(value: string): string;
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/utils/token-format.d.ts
|
|
123
100
|
/**
|
|
124
|
-
*
|
|
101
|
+
* Convert a DTCG color `$value` (string, hex/alpha object, or
|
|
102
|
+
* colorSpace/components object) into a CSS-friendly color string.
|
|
103
|
+
*/
|
|
104
|
+
declare function formatColorValue(value: unknown): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Convert a DTCG dimension/duration `$value` (number, string, or
|
|
107
|
+
* value/unit object) into a CSS-friendly string.
|
|
108
|
+
*/
|
|
109
|
+
declare function formatDimensionValue(value: unknown): string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Convert a DTCG shadow `$value` (one layer or a list of layers) into a
|
|
112
|
+
* CSS `box-shadow` string.
|
|
113
|
+
*/
|
|
114
|
+
declare function formatShadowValue(value: unknown): string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Convert a DTCG token path into a Tailwind `@theme` custom property.
|
|
125
117
|
*
|
|
126
|
-
*
|
|
118
|
+
* `color.primary` → `--color-primary`; a trailing `DEFAULT` leaf is stripped
|
|
119
|
+
* (`radius.DEFAULT` → `--radius`).
|
|
127
120
|
*/
|
|
128
|
-
declare function
|
|
121
|
+
declare function toThemeCssVar(path: string): string;
|
|
122
|
+
/**
|
|
123
|
+
* Rewrite DTCG aliases in a CSS value to `var(--…)` references so reused
|
|
124
|
+
* tokens point at sibling custom properties instead of leaving `{path}` text.
|
|
125
|
+
*/
|
|
126
|
+
declare function formatCssAliasReferences(value: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* Convert a DTCG `$value` into a CSS-friendly string, dispatching on `type`
|
|
129
|
+
* (or, when `type` is omitted, on the shape of `value`).
|
|
130
|
+
*/
|
|
131
|
+
declare function formatTokenValue(value: unknown, type?: string): string;
|
|
129
132
|
//#endregion
|
|
130
133
|
//#region src/utils/index.d.ts
|
|
131
134
|
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
@@ -141,7 +144,7 @@ declare function toCssVar(path: string, prefix: string): string;
|
|
|
141
144
|
*/
|
|
142
145
|
declare function createDocument<TSchema, TOptions extends object>(path: string, content: string, meta: {
|
|
143
146
|
name: string;
|
|
144
|
-
}, language?: string): GeneratorFunctionResult<TSchema, TOptions>[string];
|
|
147
|
+
}, appendTheme?: false | ((path: string, theme: string) => string), language?: string): GeneratorFunctionResult<TSchema, TOptions>[string];
|
|
145
148
|
//#endregion
|
|
146
|
-
export { type BaseFlatToken, type FlattenTokensOptions, type SchemaIdentity, type SchemaIdentityOverrides, TOKEN_SET_THEME_PATTERN, type ThemeNamed, type TokenSet, createDocument, flattenTokens, formatColorValue, formatDimensionValue, formatTokenValue, isObject, resolveSchemaIdentity, resolveTokenSets, slugifyThemeName, themeDisplayName, titleCase, toCssVar };
|
|
149
|
+
export { type BaseFlatToken, type FlattenTokensOptions, SHARED_THEME_ID, type SchemaIdentity, type SchemaIdentityOverrides, TOKEN_SET_THEME_PATTERN, type ThemeNamed, type TokenSet, appendThemeToFilePath, applyThemeToDocuments, applyThemeToTitle, createDocument, flattenTokens, formatColorValue, formatCssAliasReferences, formatDimensionValue, formatShadowValue, formatTokenValue, isObject, isSharedThemeId, isTokenLeaf, mergeTokenTrees, resolveSchemaIdentity, resolveTokenSets, slugifyThemeName, themeDisplayName, titleCase, toCssVar, toThemeCssVar };
|
|
147
150
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/utils/
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/utils/merge-tokens.ts","../../src/utils/schema-identity.ts","../../src/utils/slugify-theme-name.ts","../../src/utils/theme-display-name.ts","../../src/utils/theme-output.ts","../../src/utils/title-case.ts","../../src/utils/token-format.ts","../../src/utils/index.ts"],"mappings":";;;;;;;;;;;;iBAiCgB,gBAAgB,UAAU,QAAQ,MAAM,SAAS;;;;UCVhD;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;UAOe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;iBAec,sBACd,MAAM,KACJ,0FASF,YAAW,0BACV;;;;;;;;;iBC7Ca,iBAAiB;;;;UCLhB;EACf;EACA;;;;;;iBAOc,iBAAiB,OAAO;;;;;;;;;iBCDxB,kBACd,2BACA;;;;;;;iBAoBc,sBAAsB,kBAAkB;;;;;iBAkBxC,sBACd,WAAW,eAAe,oBAC1B,gBACC,eAAe;;;;;;;;;;iBC7CF,UAAU;;;;;;;iBCCV,iBAAiB;;;;;iBAuDjB,qBAAqB;;;;;iBA+CrB,kBAAkB;;;;;;;iBAyBlB,cAAc;;;;;iBAgBd,yBAAyB;;;;;iBAWzB,iBAAiB,gBAAgB;;;iBClKjC,SAAS,iBAAiB,SAAS;;;;;;;iBA8CnC,SAAS,cAAc;;;;iBAavB,eAAe,SAAS,yBACtC,cACA,iBACA;EAAQ;GACR,wBAAwB,cAAc,2BACtC,oBACC,wBAAwB,SAAS"}
|