@razorwind/core 0.0.47 → 0.0.48
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-BtscEr7S.d.cts} +9 -4
- package/dist/{config-BjuUx31T.d.cts.map → config-BtscEr7S.d.cts.map} +1 -1
- package/dist/{config-CEPqgKnD.d.mts → config-CNTGHrST.d.mts} +8 -3
- package/dist/config-CNTGHrST.d.mts.map +1 -0
- package/dist/flatten-tokens-CMlVe_J6.d.cts +54 -0
- package/dist/flatten-tokens-CMlVe_J6.d.cts.map +1 -0
- package/dist/flatten-tokens-DgTPHEhI.d.mts +54 -0
- package/dist/flatten-tokens-DgTPHEhI.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-B7MsziQp.d.cts} +5 -5
- package/dist/{index-DXx1b3vZ.d.cts.map → index-B7MsziQp.d.cts.map} +1 -1
- package/dist/{index-DovYOOtL.d.cts → index-CwN0c1Q4.d.cts} +1 -1
- package/dist/{index-D7VrdiAn.d.mts → index-CzbZzpnz.d.mts} +4 -4
- package/dist/{index-D7VrdiAn.d.mts.map → index-CzbZzpnz.d.mts.map} +1 -1
- package/dist/{index-crrCGMN9.d.mts → index-CzjDptav.d.mts} +4 -4
- package/dist/{index-crrCGMN9.d.mts.map → index-CzjDptav.d.mts.map} +1 -1
- package/dist/{index-ktFi0nZL.d.mts → index-D5L2WXYk.d.mts} +1 -1
- package/dist/{index-DNAWtBG8.d.cts → index-Di7vqmsi.d.cts} +4 -4
- package/dist/{index-DNAWtBG8.d.cts.map → index-Di7vqmsi.d.cts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +82 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +82 -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 +1 -1
- package/dist/lib/tokens/index.d.mts +1 -1
- package/dist/lib/tokens/index.mjs +1 -1
- package/dist/{plugin-BocNoTkM.d.mts → plugin-0UYp_yIy.d.cts} +2 -2
- package/dist/{plugin-DMOM9PDs.d.cts.map → plugin-0UYp_yIy.d.cts.map} +1 -1
- package/dist/{plugin-DMOM9PDs.d.cts → plugin-CH6vFnxu.d.mts} +2 -2
- package/dist/plugin-CH6vFnxu.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-By75va9Y.cjs +7 -0
- package/dist/tokens-DFYNBFFR.mjs +8 -0
- package/dist/tokens-DFYNBFFR.mjs.map +1 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +78 -92
- package/dist/utils/index.d.cts.map +1 -1
- package/dist/utils/index.d.mts +78 -92
- package/dist/utils/index.d.mts.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils-CDYdsyyW.mjs +2 -0
- package/dist/utils-CDYdsyyW.mjs.map +1 -0
- package/dist/utils-DyK4l_bT.cjs +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/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
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import { O as Components, a as Icons, t as Schema } from "./schema-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { a as UserConfigFn, c as UserConfigParams, d as TokensPreprocessor, i as UserConfigExport, l as Plugin, n as Options, o as UserConfigFnObject, r as UserConfig, s as UserConfigFnPromise, t as Config, u as TokensParser } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { O as Components, a as Icons, t as Schema } from "./schema-BwOBgJIM.cjs";
|
|
2
|
+
import "./index-CwN0c1Q4.cjs";
|
|
3
|
+
import { a as UserConfigFn, c as UserConfigParams, d as TokensPreprocessor, i as UserConfigExport, l as Plugin, n as Options, o as UserConfigFnObject, r as UserConfig, s as UserConfigFnPromise, t as Config, u as TokensParser } from "./config-BtscEr7S.cjs";
|
|
4
|
+
import { i as TokenSet } from "./flatten-tokens-CMlVe_J6.cjs";
|
|
5
|
+
import { t as definePlugin } from "./plugin-0UYp_yIy.cjs";
|
|
6
|
+
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "./index-Di7vqmsi.cjs";
|
|
7
|
+
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "./index-B7MsziQp.cjs";
|
|
7
8
|
import StyleDictionary from "style-dictionary";
|
|
8
9
|
import { ExecutionContext, GeneratedDocument, GeneratorConfig } from "@power-plant/core";
|
|
10
|
+
//#region src/lib/generate.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* One generation pass: a resolved {@link Schema} plus the {@link Config}
|
|
13
|
+
* that produced it.
|
|
14
|
+
*
|
|
15
|
+
* Array `defineConfig([...])` exports become one {@link GenerationRun} each.
|
|
16
|
+
*/
|
|
17
|
+
interface GenerationRun {
|
|
18
|
+
spec: Schema;
|
|
19
|
+
config: Config;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Theme sets that should each receive a dedicated generator pass.
|
|
23
|
+
*
|
|
24
|
+
* Returns an empty array when tokens are a single tree (or only one real
|
|
25
|
+
* theme), so callers run plugins once against the original spec.
|
|
26
|
+
*/
|
|
27
|
+
declare function themesForGeneration(tokens: Schema["tokens"]): TokenSet[];
|
|
28
|
+
/**
|
|
29
|
+
* Run configured plugin `generate` hooks.
|
|
30
|
+
*
|
|
31
|
+
* When {@link Schema.tokens} is a multi-theme record, each theme is generated
|
|
32
|
+
* separately: titles gain ` (<Theme>)`, and output file paths gain
|
|
33
|
+
* `-<theme>` before the extension (`tokens.css` → `tokens-dark.css`).
|
|
34
|
+
*/
|
|
35
|
+
declare function generatePluginDocuments(spec: Schema, config: Config): Promise<Record<string, GeneratedDocument>>;
|
|
36
|
+
/**
|
|
37
|
+
* Run plugin generators for each {@link GenerationRun} as a separate pass.
|
|
38
|
+
*
|
|
39
|
+
* Document records are shallow-merged in array order. Later runs replace
|
|
40
|
+
* earlier ones when output paths collide. Plugin `outputPath` values on each
|
|
41
|
+
* config should already be distinct (for example `generated/dark` vs
|
|
42
|
+
* `generated/light`).
|
|
43
|
+
*/
|
|
44
|
+
declare function generateAllPluginDocuments(runs: GenerationRun[]): Promise<Record<string, GeneratedDocument>>;
|
|
45
|
+
//#endregion
|
|
9
46
|
//#region src/lib/resolve-config.d.ts
|
|
10
47
|
/**
|
|
11
48
|
* Keep the first plugin for each {@link Plugin.name}.
|
|
@@ -17,15 +54,31 @@ declare function uniquePlugins(plugins: Plugin[]): Plugin[];
|
|
|
17
54
|
/**
|
|
18
55
|
* Loads the user configuration file for the project.
|
|
19
56
|
*
|
|
57
|
+
* Array exports (`defineConfig([...])`) resolve to one {@link Config} per
|
|
58
|
+
* item. Each item is a separate generation run.
|
|
59
|
+
*
|
|
20
60
|
* @param cwd - The current working directory.
|
|
21
61
|
* @param options - The options for the configuration.
|
|
22
|
-
* @returns
|
|
62
|
+
* @returns Resolved configurations, one per exported config object.
|
|
63
|
+
*/
|
|
64
|
+
declare function resolveConfigs(cwd: string, options: Options): Promise<Config[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Loads the user configuration file for the project.
|
|
67
|
+
*
|
|
68
|
+
* When the file exports an array of configs, this returns the first resolved
|
|
69
|
+
* {@link Config}. Use {@link resolveConfigs} to run every array item.
|
|
70
|
+
*
|
|
71
|
+
* @param cwd - The current working directory.
|
|
72
|
+
* @param options - The options for the configuration.
|
|
73
|
+
* @returns The first resolved configuration.
|
|
23
74
|
*/
|
|
24
75
|
declare function resolveConfig(cwd: string, options: Options): Promise<Config>;
|
|
25
76
|
//#endregion
|
|
26
77
|
//#region src/config.d.ts
|
|
27
78
|
/**
|
|
28
|
-
* Type helper to make it easier to use `razorwind.config.ts` files. Accepts a
|
|
79
|
+
* Type helper to make it easier to use `razorwind.config.ts` files. Accepts a
|
|
80
|
+
* {@link UserConfig} object, an array of those objects, or a function that
|
|
81
|
+
* returns either. Array items are independent generation runs.
|
|
29
82
|
*
|
|
30
83
|
* @example
|
|
31
84
|
* ```ts
|
|
@@ -35,13 +88,11 @@ declare function resolveConfig(cwd: string, options: Options): Promise<Config>;
|
|
|
35
88
|
* // Your configuration here
|
|
36
89
|
* });
|
|
37
90
|
*
|
|
38
|
-
* //
|
|
39
|
-
* export default defineConfig(
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* };
|
|
44
|
-
* });
|
|
91
|
+
* // Separate runs (e.g. dark vs light token sources and output paths)
|
|
92
|
+
* export default defineConfig([
|
|
93
|
+
* { name: "dark", tokensPath: "tokens/dark.json", plugins: [css()] },
|
|
94
|
+
* { name: "light", tokensPath: "tokens/light.json", plugins: [css()] }
|
|
95
|
+
* ]);
|
|
45
96
|
* ```
|
|
46
97
|
*/
|
|
47
98
|
declare function defineConfig(config: UserConfig): UserConfig;
|
|
@@ -104,6 +155,18 @@ declare function resolveSchemaMeta(cwd: string, config: UserConfig): Promise<Sch
|
|
|
104
155
|
*/
|
|
105
156
|
declare function normalizeUrl(value: unknown): string | undefined;
|
|
106
157
|
//#endregion
|
|
158
|
+
//#region src/lib/prepare.d.ts
|
|
159
|
+
/**
|
|
160
|
+
* Load tokens, extract, and validate for the current {@link Config} on
|
|
161
|
+
* `context.options`.
|
|
162
|
+
*/
|
|
163
|
+
declare function prepareSpec(context: ExecutionContext<Schema, Config, void>): Promise<Schema>;
|
|
164
|
+
/**
|
|
165
|
+
* Resolve config (including array exports) and prepare a {@link GenerationRun}
|
|
166
|
+
* per item. Each run loads tokens and runs extract/validate independently.
|
|
167
|
+
*/
|
|
168
|
+
declare function prepareGenerationRuns(context: ExecutionContext<Schema, Config, void>, options: Options): Promise<GenerationRun[]>;
|
|
169
|
+
//#endregion
|
|
107
170
|
//#region src/lib/write-documents.d.ts
|
|
108
171
|
/**
|
|
109
172
|
* Persist generator documents to disk.
|
|
@@ -133,6 +196,7 @@ type Generator<TOptions extends object = object> = GeneratorConfig<Schema, TOpti
|
|
|
133
196
|
declare module "@power-plant/core" {
|
|
134
197
|
interface Context {
|
|
135
198
|
sd: StyleDictionary;
|
|
199
|
+
generationRuns?: GenerationRun[];
|
|
136
200
|
}
|
|
137
201
|
}
|
|
138
202
|
/**
|
|
@@ -140,8 +204,10 @@ declare module "@power-plant/core" {
|
|
|
140
204
|
*
|
|
141
205
|
* Orchestrates configured {@link Plugin}s: extraction hooks, then
|
|
142
206
|
* `extract` → `validate` on input, then `generate`.
|
|
207
|
+
*
|
|
208
|
+
* Array `defineConfig([...])` exports run that pipeline once per item.
|
|
143
209
|
*/
|
|
144
210
|
declare const generator: import("@power-plant/core").GeneratorConfigObject<Schema, Options, any>;
|
|
145
211
|
//#endregion
|
|
146
|
-
export { type Config, DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, type Generator, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, MONO_ROLES, type Options, type ParsedFontFilename, type Plugin, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type RenderFontCssOptions, type ResolveTokensPathOptions, type ResolvedTokensSource, SANS_ROLES, type SchemaMeta, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, type TokensParser, type TokensPreprocessor, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, WEIGHT_FROM_SUFFIX, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, copyFontFiles, cssFontFamily, defineConfig, definePlugin, fontFamilyName, generator, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyFonts, isEmptyTokens, loadComponents, loadFonts, loadIcons, loadSchemaMetaFromPackageJson, loadTokens, loadTokensOrThrow, mergeFonts, nestFlatTokens, normalizeUrl as normalizeRepository, normalizeTokenTree, parseCssCustomProperties, parseCssFonts, parseFontFilename, pickFontByRole, prependFontCss, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, resolveConfig, resolveSchemaMeta, resolveTokensSource, schemaMetaFromConfig, schemaMetaFromPackageJson, styleDictionaryLogOptions, themeKeyFromPath, toGoogleFontsCssUrl, uniquePlugins, writeGeneratedDocuments };
|
|
212
|
+
export { type Config, DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, GenerationRun, type Generator, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, MONO_ROLES, type Options, type ParsedFontFilename, type Plugin, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type RenderFontCssOptions, type ResolveTokensPathOptions, type ResolvedTokensSource, SANS_ROLES, type SchemaMeta, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, type TokensParser, type TokensPreprocessor, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, WEIGHT_FROM_SUFFIX, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, copyFontFiles, cssFontFamily, defineConfig, definePlugin, fontFamilyName, generateAllPluginDocuments, generatePluginDocuments, generator, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyFonts, isEmptyTokens, loadComponents, loadFonts, loadIcons, loadSchemaMetaFromPackageJson, loadTokens, loadTokensOrThrow, mergeFonts, nestFlatTokens, normalizeUrl as normalizeRepository, normalizeTokenTree, parseCssCustomProperties, parseCssFonts, parseFontFilename, pickFontByRole, prepareGenerationRuns, prepareSpec, prependFontCss, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, resolveConfig, resolveConfigs, resolveSchemaMeta, resolveTokensSource, schemaMetaFromConfig, schemaMetaFromPackageJson, styleDictionaryLogOptions, themeKeyFromPath, themesForGeneration, toGoogleFontsCssUrl, uniquePlugins, writeGeneratedDocuments };
|
|
147
213
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/lib/resolve-config.ts","../src/config.ts","../src/lib/components/load.ts","../src/lib/icons/load.ts","../src/lib/meta/load.ts","../src/lib/meta/normalize-url.ts","../src/lib/write-documents.ts","../src/types/base.ts","../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/lib/generate.ts","../src/lib/resolve-config.ts","../src/config.ts","../src/lib/components/load.ts","../src/lib/icons/load.ts","../src/lib/meta/load.ts","../src/lib/meta/normalize-url.ts","../src/lib/prepare.ts","../src/lib/write-documents.ts","../src/types/base.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;UAoCiB;EACf,MAAM;EACN,QAAQ;;;;;;;;iBAeM,oBAAoB,QAAQ,mBAAmB;;;;;;;;iBAqDzC,wBACpB,MAAM,QACN,QAAQ,SACP,QAAQ,eAAe;;;;;;;;;iBA6BJ,2BACpB,MAAM,kBACL,QAAQ,eAAe;;;;;;;;;iBC/FV,cAAc,SAAS,WAAW;;;;;;;;;;;iBAsJ5B,eACpB,aACA,SAAS,UACR,QAAQ;;;;;;;;;;;iBA6MW,cACpB,aACA,SAAS,UACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;iBCnWK,aAAa,QAAQ,aAAa;iBAClC,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,QAAQ,cAAc,QAAQ;iBACnD,aACd,QAAQ,QAAQ,gBACf,QAAQ;iBACK,aAAa,QAAQ,qBAAqB;iBAC1C,aAAa,QAAQ,sBAAsB;iBAC3C,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,mBAAmB;;;;;;;;;;;;;iBCqalC,eACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;;;;;;iBCjGW,UACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;KCtWC,aAAa,KACvB;;;;;iBAgBc,0BACd,KAAK,0BACJ;;;;iBAqFa,qBAAqB,QAAQ,aAAa;;;;iBA4BpC,8BACpB,cACC,QAAQ;;;;iBAmBW,kBACpB,aACA,QAAQ,aACP,QAAQ;;;;;;iBCtJK,aAAa;;;;;;;iBCIP,YACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;iBA+CW,sBACpB,SAAS,iBAAiB,QAAQ,eAClC,SAAS,UACR,QAAQ;;;;;;;;;;;;;iBC5DW,wBACpB,WAAW,eAAe,gCAC1B,cACC;;;KCdS,UAAU,oCAAoC,gBACxD,QACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;YCDU;IACR,IAAI;IACJ,iBAAiB;;;;;;;;;;;cAgBR,uCAAS,sBAAA,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import { O as Components, a as Icons, t as Schema } from "./schema-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { a as UserConfigFn, c as UserConfigParams, d as TokensPreprocessor, i as UserConfigExport, l as Plugin, n as Options, o as UserConfigFnObject, r as UserConfig, s as UserConfigFnPromise, t as Config, u as TokensParser } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { O as Components, a as Icons, t as Schema } from "./schema-BwOBgJIM.mjs";
|
|
2
|
+
import "./index-D5L2WXYk.mjs";
|
|
3
|
+
import { a as UserConfigFn, c as UserConfigParams, d as TokensPreprocessor, i as UserConfigExport, l as Plugin, n as Options, o as UserConfigFnObject, r as UserConfig, s as UserConfigFnPromise, t as Config, u as TokensParser } from "./config-CNTGHrST.mjs";
|
|
4
|
+
import { i as TokenSet } from "./flatten-tokens-DgTPHEhI.mjs";
|
|
5
|
+
import { t as definePlugin } from "./plugin-CH6vFnxu.mjs";
|
|
6
|
+
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "./index-CzbZzpnz.mjs";
|
|
7
|
+
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "./index-CzjDptav.mjs";
|
|
7
8
|
import { ExecutionContext, GeneratedDocument, GeneratorConfig } from "@power-plant/core";
|
|
8
9
|
import StyleDictionary from "style-dictionary";
|
|
10
|
+
//#region src/lib/generate.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* One generation pass: a resolved {@link Schema} plus the {@link Config}
|
|
13
|
+
* that produced it.
|
|
14
|
+
*
|
|
15
|
+
* Array `defineConfig([...])` exports become one {@link GenerationRun} each.
|
|
16
|
+
*/
|
|
17
|
+
interface GenerationRun {
|
|
18
|
+
spec: Schema;
|
|
19
|
+
config: Config;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Theme sets that should each receive a dedicated generator pass.
|
|
23
|
+
*
|
|
24
|
+
* Returns an empty array when tokens are a single tree (or only one real
|
|
25
|
+
* theme), so callers run plugins once against the original spec.
|
|
26
|
+
*/
|
|
27
|
+
declare function themesForGeneration(tokens: Schema["tokens"]): TokenSet[];
|
|
28
|
+
/**
|
|
29
|
+
* Run configured plugin `generate` hooks.
|
|
30
|
+
*
|
|
31
|
+
* When {@link Schema.tokens} is a multi-theme record, each theme is generated
|
|
32
|
+
* separately: titles gain ` (<Theme>)`, and output file paths gain
|
|
33
|
+
* `-<theme>` before the extension (`tokens.css` → `tokens-dark.css`).
|
|
34
|
+
*/
|
|
35
|
+
declare function generatePluginDocuments(spec: Schema, config: Config): Promise<Record<string, GeneratedDocument>>;
|
|
36
|
+
/**
|
|
37
|
+
* Run plugin generators for each {@link GenerationRun} as a separate pass.
|
|
38
|
+
*
|
|
39
|
+
* Document records are shallow-merged in array order. Later runs replace
|
|
40
|
+
* earlier ones when output paths collide. Plugin `outputPath` values on each
|
|
41
|
+
* config should already be distinct (for example `generated/dark` vs
|
|
42
|
+
* `generated/light`).
|
|
43
|
+
*/
|
|
44
|
+
declare function generateAllPluginDocuments(runs: GenerationRun[]): Promise<Record<string, GeneratedDocument>>;
|
|
45
|
+
//#endregion
|
|
9
46
|
//#region src/lib/resolve-config.d.ts
|
|
10
47
|
/**
|
|
11
48
|
* Keep the first plugin for each {@link Plugin.name}.
|
|
@@ -17,15 +54,31 @@ declare function uniquePlugins(plugins: Plugin[]): Plugin[];
|
|
|
17
54
|
/**
|
|
18
55
|
* Loads the user configuration file for the project.
|
|
19
56
|
*
|
|
57
|
+
* Array exports (`defineConfig([...])`) resolve to one {@link Config} per
|
|
58
|
+
* item. Each item is a separate generation run.
|
|
59
|
+
*
|
|
20
60
|
* @param cwd - The current working directory.
|
|
21
61
|
* @param options - The options for the configuration.
|
|
22
|
-
* @returns
|
|
62
|
+
* @returns Resolved configurations, one per exported config object.
|
|
63
|
+
*/
|
|
64
|
+
declare function resolveConfigs(cwd: string, options: Options): Promise<Config[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Loads the user configuration file for the project.
|
|
67
|
+
*
|
|
68
|
+
* When the file exports an array of configs, this returns the first resolved
|
|
69
|
+
* {@link Config}. Use {@link resolveConfigs} to run every array item.
|
|
70
|
+
*
|
|
71
|
+
* @param cwd - The current working directory.
|
|
72
|
+
* @param options - The options for the configuration.
|
|
73
|
+
* @returns The first resolved configuration.
|
|
23
74
|
*/
|
|
24
75
|
declare function resolveConfig(cwd: string, options: Options): Promise<Config>;
|
|
25
76
|
//#endregion
|
|
26
77
|
//#region src/config.d.ts
|
|
27
78
|
/**
|
|
28
|
-
* Type helper to make it easier to use `razorwind.config.ts` files. Accepts a
|
|
79
|
+
* Type helper to make it easier to use `razorwind.config.ts` files. Accepts a
|
|
80
|
+
* {@link UserConfig} object, an array of those objects, or a function that
|
|
81
|
+
* returns either. Array items are independent generation runs.
|
|
29
82
|
*
|
|
30
83
|
* @example
|
|
31
84
|
* ```ts
|
|
@@ -35,13 +88,11 @@ declare function resolveConfig(cwd: string, options: Options): Promise<Config>;
|
|
|
35
88
|
* // Your configuration here
|
|
36
89
|
* });
|
|
37
90
|
*
|
|
38
|
-
* //
|
|
39
|
-
* export default defineConfig(
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* };
|
|
44
|
-
* });
|
|
91
|
+
* // Separate runs (e.g. dark vs light token sources and output paths)
|
|
92
|
+
* export default defineConfig([
|
|
93
|
+
* { name: "dark", tokensPath: "tokens/dark.json", plugins: [css()] },
|
|
94
|
+
* { name: "light", tokensPath: "tokens/light.json", plugins: [css()] }
|
|
95
|
+
* ]);
|
|
45
96
|
* ```
|
|
46
97
|
*/
|
|
47
98
|
declare function defineConfig(config: UserConfig): UserConfig;
|
|
@@ -104,6 +155,18 @@ declare function resolveSchemaMeta(cwd: string, config: UserConfig): Promise<Sch
|
|
|
104
155
|
*/
|
|
105
156
|
declare function normalizeUrl(value: unknown): string | undefined;
|
|
106
157
|
//#endregion
|
|
158
|
+
//#region src/lib/prepare.d.ts
|
|
159
|
+
/**
|
|
160
|
+
* Load tokens, extract, and validate for the current {@link Config} on
|
|
161
|
+
* `context.options`.
|
|
162
|
+
*/
|
|
163
|
+
declare function prepareSpec(context: ExecutionContext<Schema, Config, void>): Promise<Schema>;
|
|
164
|
+
/**
|
|
165
|
+
* Resolve config (including array exports) and prepare a {@link GenerationRun}
|
|
166
|
+
* per item. Each run loads tokens and runs extract/validate independently.
|
|
167
|
+
*/
|
|
168
|
+
declare function prepareGenerationRuns(context: ExecutionContext<Schema, Config, void>, options: Options): Promise<GenerationRun[]>;
|
|
169
|
+
//#endregion
|
|
107
170
|
//#region src/lib/write-documents.d.ts
|
|
108
171
|
/**
|
|
109
172
|
* Persist generator documents to disk.
|
|
@@ -133,6 +196,7 @@ type Generator<TOptions extends object = object> = GeneratorConfig<Schema, TOpti
|
|
|
133
196
|
declare module "@power-plant/core" {
|
|
134
197
|
interface Context {
|
|
135
198
|
sd: StyleDictionary;
|
|
199
|
+
generationRuns?: GenerationRun[];
|
|
136
200
|
}
|
|
137
201
|
}
|
|
138
202
|
/**
|
|
@@ -140,8 +204,10 @@ declare module "@power-plant/core" {
|
|
|
140
204
|
*
|
|
141
205
|
* Orchestrates configured {@link Plugin}s: extraction hooks, then
|
|
142
206
|
* `extract` → `validate` on input, then `generate`.
|
|
207
|
+
*
|
|
208
|
+
* Array `defineConfig([...])` exports run that pipeline once per item.
|
|
143
209
|
*/
|
|
144
210
|
declare const generator: import("@power-plant/core").GeneratorConfigObject<Schema, Options, any>;
|
|
145
211
|
//#endregion
|
|
146
|
-
export { type Config, DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, type Generator, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, MONO_ROLES, type Options, type ParsedFontFilename, type Plugin, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type RenderFontCssOptions, type ResolveTokensPathOptions, type ResolvedTokensSource, SANS_ROLES, type SchemaMeta, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, type TokensParser, type TokensPreprocessor, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, WEIGHT_FROM_SUFFIX, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, copyFontFiles, cssFontFamily, defineConfig, definePlugin, fontFamilyName, generator, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyFonts, isEmptyTokens, loadComponents, loadFonts, loadIcons, loadSchemaMetaFromPackageJson, loadTokens, loadTokensOrThrow, mergeFonts, nestFlatTokens, normalizeUrl as normalizeRepository, normalizeTokenTree, parseCssCustomProperties, parseCssFonts, parseFontFilename, pickFontByRole, prependFontCss, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, resolveConfig, resolveSchemaMeta, resolveTokensSource, schemaMetaFromConfig, schemaMetaFromPackageJson, styleDictionaryLogOptions, themeKeyFromPath, toGoogleFontsCssUrl, uniquePlugins, writeGeneratedDocuments };
|
|
212
|
+
export { type Config, DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, GenerationRun, type Generator, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, MONO_ROLES, type Options, type ParsedFontFilename, type Plugin, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type RenderFontCssOptions, type ResolveTokensPathOptions, type ResolvedTokensSource, SANS_ROLES, type SchemaMeta, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, type TokensParser, type TokensPreprocessor, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, WEIGHT_FROM_SUFFIX, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, copyFontFiles, cssFontFamily, defineConfig, definePlugin, fontFamilyName, generateAllPluginDocuments, generatePluginDocuments, generator, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyFonts, isEmptyTokens, loadComponents, loadFonts, loadIcons, loadSchemaMetaFromPackageJson, loadTokens, loadTokensOrThrow, mergeFonts, nestFlatTokens, normalizeUrl as normalizeRepository, normalizeTokenTree, parseCssCustomProperties, parseCssFonts, parseFontFilename, pickFontByRole, prepareGenerationRuns, prepareSpec, prependFontCss, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, resolveConfig, resolveConfigs, resolveSchemaMeta, resolveTokensSource, schemaMetaFromConfig, schemaMetaFromPackageJson, styleDictionaryLogOptions, themeKeyFromPath, themesForGeneration, toGoogleFontsCssUrl, uniquePlugins, writeGeneratedDocuments };
|
|
147
213
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/lib/resolve-config.ts","../src/config.ts","../src/lib/components/load.ts","../src/lib/icons/load.ts","../src/lib/meta/load.ts","../src/lib/meta/normalize-url.ts","../src/lib/write-documents.ts","../src/types/base.ts","../src/index.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/lib/generate.ts","../src/lib/resolve-config.ts","../src/config.ts","../src/lib/components/load.ts","../src/lib/icons/load.ts","../src/lib/meta/load.ts","../src/lib/meta/normalize-url.ts","../src/lib/prepare.ts","../src/lib/write-documents.ts","../src/types/base.ts","../src/index.ts"],"mappings":""}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,r as i,s as a}from"./schema-Btk_-NEI.mjs";import{_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as ee,l as te,m as ne,n as re,o as ie,p as ae,r as oe,s as se,t as ce,u as le,v as ue,y as de}from"./fonts-CUwsBEd5.mjs";import{C as m,S as fe,_ as pe,a as me,b as h,c as he,d as ge,f as _e,g as ve,h as ye,i as be,l as xe,m as Se,n as Ce,o as we,p as Te,r as Ee,s as De,t as g,u as Oe,v as ke,w as Ae,x as je,y as Me}from"./tokens-CsosSHvJ.mjs";import{definePlugin as Ne}from"./plugin.mjs";import{defineGenerator as Pe,defineSchema as Fe,useExecution as _}from"@power-plant/core";import{createDefu as v,defu as y}from"defu";import{existsSync as b}from"@stryke/fs/exists";import{isDirectory as x}from"@stryke/fs/is-file";import{readJsonFile as S}from"@stryke/fs/json";import{listFiles as Ie}from"@stryke/fs/list-files";import{appendPath as C}from"@stryke/path/append";import{findFileExtensionSafe as w,findFileName as T,findFolderName as E}from"@stryke/path/file-path-fns";import{joinPaths as D}from"@stryke/path/join";import{titleCase as O}from"@stryke/string-format/title-case";import{isSetObject as k}from"@stryke/type-checks/is-set-object";import{isSetString as A}from"@stryke/type-checks/is-set-string";import{mkdir as Le,readFile as j,readdir as M,writeFile as Re}from"node:fs/promises";import{dirname as ze,isAbsolute as N,resolve as P}from"node:path";import{getEnvPaths as Be}from"@stryke/env/get-env-paths";import{findFilePath as F}from"@stryke/path/find";import{replacePath as I}from"@stryke/path/replace";import{isFunction as Ve}from"@stryke/type-checks/is-function";import{loadConfig as L}from"c12";import{createJiti as He}from"jiti";import{existsSync as R}from"node:fs";import Ue from"node:os";var We=`0.0.47`;function z(e){return!!(A(e)||k(e)&&`url`in e&&A(e.url))}function B(e){if(A(e))return e;if(k(e)&&`url`in e&&A(e.url))return e.url}const Ge=t.partial(),V=new Set([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]),H=v((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function Ke(e,t){return N(t)?t:P(e,t)}function qe(e){return Array.isArray(e)?e.filter(A):A(e)?[e]:[]}function U(e){let t=e.toLowerCase();if(V.has(t))return t}function Je(e){let t=w(e)?.toLowerCase();return!!(t&&V.has(t))}function W(e){if(!e)return;let t=a.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let n=[];for(let t of e){let e=a.safeParse(t);e.success&&n.push(e.data)}return n.length>0?n:void 0}function G(e){if(!e)return;let t=r.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let n=[];for(let t of e){if(A(t)){let e=T(t,{withExtension:!1})||t,i=r.safeParse({name:e,path:t});i.success&&n.push(i.data);continue}let e=r.safeParse(t);e.success&&n.push(e.data)}return n.length>0?n:void 0}function K(e){if(!k(e))return;let{files:t,usage:n,...r}=e,i=Ge.safeParse(r);if(i.success)return Object.keys(i.data).length>0?i.data:void 0}function Ye(e){return k(e)&&`path`in e}async function Xe(e){let t=D(e,`package.json`);if(!b(t))return;let n;try{n=await S(t)}catch{return}let r={};A(n.name)&&(r.name=n.name,r.title=n.name),A(n.description)&&(r.description=n.description),A(n.version)&&(r.version=n.version),A(n.homepage)&&(r.homepage=n.homepage);let i=B(n.repository);if(i&&(r.repository=i),k(n.dependencies)&&(r.dependencies=n.dependencies),k(n.devDependencies)&&(r.devDependencies=n.devDependencies),Array.isArray(n.keywords)){let e=n.keywords.filter(A);e.length>0&&(r.tags=e)}let a=n.razorwind,o,s,c;Ye(a)?s=W(a):k(a)&&(o=K(a),`files`in a&&(s=W(a.files)),`usage`in a&&(c=G(a.usage)));let l=H(o??{},r);return s?.length&&(l.files=s),c?.length&&(l.usage=c),Object.keys(l).length>0?l:void 0}async function Ze(e){let t=D(e,`component.json`);if(!b(t))return;let n;try{n=await S(t)}catch{return}if(Ye(n)||Array.isArray(n)){let e=W(n);if(e)return{files:e}}if(!k(n))return;let r=K(n)??{},i=`files`in n?W(n.files):void 0,a=`usage`in n?G(n.usage):void 0;return i?.length&&(r.files=i),a?.length&&(r.usage=a),Object.keys(r).length>0?r:void 0}async function Qe(e){try{return(await M(e,{withFileTypes:!0})).filter(e=>e.isFile()&&!e.name.startsWith(`.`)&&Je(e.name)).map(e=>e.name).toSorted((e,t)=>e.localeCompare(t))}catch{return[]}}async function $e(e,t){if(t?.length)return Promise.all(t.map(async t=>{let n=C(t.path,e),r=w(t.path)??``,i=t.language??U(r),a=t.name||T(t.path,{withExtension:!1})||t.path,o=t.content===void 0?b(n)?await j(n,`utf8`):void 0:t.content;return{...t,name:a,path:n,...i?{language:i}:{},...o===void 0?{}:{content:o}}}));let n=D(e,`usage`);if(!b(n)||!x(n))return;let r=await Qe(n);if(r.length!==0)return Promise.all(r.map(async e=>{let t=D(n,e),r=U(w(e)??``),i=T(e,{withExtension:!1})||e;return{name:i,title:O(i),path:t,content:await j(t,`utf8`),...r?{language:r}:{}}}))}async function et(e,t){let n=t??(await Ie(e)).filter(e=>T(e,{withExtension:!1})===`index`);return Promise.all(n.filter(Boolean).map(async t=>typeof t==`string`?{type:/[tj]sx$/.test(w(t))?`component`:`file`,path:t,content:await j(C(t,e),`utf8`)}:{type:/[tj]sx$/.test(w(t.path))?`component`:`file`,...t,content:t.content?t.content:t.path?await j(C(t.path,e),`utf8`):void 0,path:C(t.path,e)}))}async function tt(e){let n=await Xe(e),r=await Ze(e);if(!n&&!r)return;let i=H(r??{},n??{}),a=A(i.name)?i.name:E(e),o=A(i.title)?i.title:O(a),s=t.safeParse({...i,name:a,title:o});if(!s.success)return;let c=await $e(e,s.data.usage);return{...s.data,files:await et(e,s.data.files),...c?.length?{usage:c}:{}}}async function nt(e){let t={},n=qe(e.options.componentsPath);for(let r of n){let n=Ke(e.cwd,r);if(!(!b(n)||!x(n)))try{let e=await M(n,{withFileTypes:!0});for(let r of e){if(!r.isDirectory()||r.name.startsWith(`.`))continue;let e=await tt(D(n,r.name));e&&(t[e.name]=e)}}catch{continue}}return t}const rt=e.partial(),it=new Set([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`]),q=v((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function at(e,t){return N(t)?t:P(e,t)}function ot(e){return Array.isArray(e)?e.filter(A):A(e)?[e]:[]}function st(e){let t=e.toLowerCase();if(it.has(t))return t}function ct(e){let t=w(e)?.toLowerCase();return!!(t&&it.has(t))}function lt(e){return h.test(e)}async function J(e){try{return(await M(e,{withFileTypes:!0})).filter(e=>e.isFile()&&ct(e.name)).map(e=>e.name)}catch{return[]}}function Y(e){if(!e)return;let t=n.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let r=[];for(let t of e){let e=n.safeParse(t);e.success&&r.push(e.data)}return r.length>0?r:void 0}function ut(e){if(!k(e))return;let t=rt.safeParse(e);if(t.success)return Object.keys(t.data).length>0?t.data:void 0}function dt(e){return k(e)&&`path`in e}async function X(e,t,n){let r=C(e,t),i=st(w(e)??``)??`file`,a=i===`svg`?await j(r,`utf8`):void 0;return{path:r,type:i,...n?{theme:n}:{},...a===void 0?{}:{content:a}}}async function ft(e){let t=D(e,`package.json`);if(!b(t))return;let n;try{n=await S(t)}catch{return}let r={};A(n.name)&&(r.name=n.name,r.title=n.name),A(n.description)&&(r.description=n.description),A(n.version)&&(r.version=n.version),A(n.homepage)&&(r.homepage=n.homepage);let i=B(n.repository);if(i&&(r.repository=i),Array.isArray(n.keywords)){let e=n.keywords.filter(A);e.length>0&&(r.tags=e)}let a=n.razorwind,o,s;dt(a)?s=Y(a):k(a)&&(o=ut(a),`files`in a&&(s=Y(a.files)));let c=q(o??{},r);return s?.length&&(c.files=s),Object.keys(c).length>0?c:void 0}async function pt(e){let t=D(e,`icon.json`);if(!b(t))return;let n;try{n=await S(t)}catch{return}if(dt(n)||Array.isArray(n)){let e=Y(n);if(e)return{files:e}}return ut(n)}async function mt(e,t){if(t?.length)return Promise.all(t.map(async t=>{let n=C(t.path,e),r=w(t.path)??``,i=t.type??st(r)??`file`,a=t.content===void 0?i===`svg`?await j(n,`utf8`):void 0:t.content;return{...t,type:i,path:n,...a===void 0?{}:{content:a}}}));let n=await J(e);return Promise.all(n.map(t=>X(t,e)))}async function ht(t){let n=await ft(t),r=await pt(t),i=await J(t);if(!n&&!r&&i.length===0)return;let a=q(r??{},n??{}),o=A(a.name)?a.name:E(t),s=A(a.title)?a.title:O(o),c=e.safeParse({...a,name:o,title:s});if(c.success)return{...c.data,files:await mt(t,c.data.files)}}function gt(e,t,n){let r=e[t];if(!r){e[t]={name:t,title:O(t),files:[n]};return}let i=[...r.files??[]],a=i.findIndex(e=>e.path===n.path&&e.theme===n.theme);a>=0?i[a]=n:i.push(n),e[t]={...r,files:i}}async function _t(e,t,n){let r=await J(e);for(let i of r){let r=T(i,{withExtension:!1});r&>(n,r,await X(i,e,t))}}async function vt(e){let t={},n=ot(e.options.iconsPath);for(let r of n){let n=at(e.cwd,r);if(!(!b(n)||!x(n)))try{let e=await M(n,{withFileTypes:!0});for(let r of e){if(r.name.startsWith(`.`))continue;let e=D(n,r.name);if(r.isDirectory()){if(lt(r.name)){await _t(e,r.name,t);continue}let n=await ht(e);if(n){let e=t[n.name];t[n.name]=e?q(n,e):n}continue}if(r.isFile()&&ct(r.name)){let e=T(r.name,{withExtension:!1});if(!e)continue;gt(t,e,await X(r.name,n))}}}catch{continue}}return t}function Z(e,t){let n=e[t];return A(n)?n:void 0}function yt(e){let t={};A(e.name)&&(t.name=e.name),A(e.description)&&(t.description=e.description),A(e.homepage)&&(t.homepage=e.homepage);let n=B(e.repository);n&&(t.repository=n),A(e.logo)&&(t.logo=e.logo);let r=e.razorwind,i={};if(k(r)){let t=r,n=Z(t,`title`),a=Z(t,`name`),o=Z(t,`description`),s=Z(t,`homepage`),c=Z(t,`logo`),l=B(t.repository);a?i.name=a:A(e.name)&&(i.name=e.name),n?i.title=n:A(i.name)&&(i.title=O(i.name)),o?i.description=o:A(e.description)&&(i.description=e.description),s?i.homepage=s:z(e.homepage)?i.homepage=B(e.homepage):z(e.author)?i.homepage=B(e.author):e.maintainers&&Array.isArray(e.maintainers)&&e.maintainers.length>0&&z(e.maintainers[0])?i.homepage=B(e.maintainers[0]):e.contributors&&Array.isArray(e.contributors)&&e.contributors.length>0&&z(e.contributors[0])?i.homepage=B(e.contributors[0]):z(e.bugs)&&(i.homepage=B(e.bugs)),c&&(i.logo=c),l?i.repository=l:z(e.repository)&&(i.repository=B(e.repository))}return y(i,t)}function Q(e){let t={};return A(e.name)&&(t.name=e.name),A(e.title)&&(t.title=e.title),A(e.description)&&(t.description=e.description),A(e.repository)&&(t.repository=e.repository),A(e.homepage)&&(t.homepage=e.homepage),A(e.logo)&&(t.logo=e.logo),t}async function bt(e){let t=D(e,`package.json`);if(!b(t))return{};let n;try{n=await S(t)}catch{return{}}return yt(n)}async function xt(e,t){let n=await bt(e),r=Q(t);return y(r,n)}function St(e){let t=new Set;return e.filter(e=>!e?.name||!t.has(e.name)&&(t.add(e.name),!0))}const Ct=Ue.homedir();async function wt(e,t){let n=t.configFile&&R(I(t.configFile,e))?I(t.configFile,e):t.configFile&&R(t.configFile)?t.configFile:R(D(e,`razorwind.${t.mode}.ts`))?D(e,`razorwind.${t.mode}.ts`):R(D(e,`razorwind.${t.mode}.js`))?D(e,`razorwind.${t.mode}.js`):R(D(e,`razorwind.${t.mode}.mts`))?D(e,`razorwind.${t.mode}.mts`):R(D(e,`razorwind.${t.mode}.mjs`))?D(e,`razorwind.${t.mode}.mjs`):R(D(e,`razorwind.${t.mode}.cjs`))?D(e,`razorwind.${t.mode}.cjs`):R(D(e,`razorwind.${t.mode}.cts`))?D(e,`razorwind.${t.mode}.cts`):R(D(e,`razorwind.${t.mode}.json`))?D(e,`razorwind.${t.mode}.json`):R(D(e,`razorwind.${t.mode}.yaml`))?D(e,`razorwind.${t.mode}.yaml`):R(D(e,`razorwind.${t.mode}.yml`))?D(e,`razorwind.${t.mode}.yml`):R(D(e,`razorwind.config.ts`))?D(e,`razorwind.config.ts`):R(D(e,`razorwind.config.js`))?D(e,`razorwind.config.js`):R(D(e,`razorwind.config.mts`))?D(e,`razorwind.config.mts`):R(D(e,`razorwind.config.mjs`))?D(e,`razorwind.config.mjs`):R(D(e,`razorwind.config.cjs`))?D(e,`razorwind.config.cjs`):R(D(e,`razorwind.config.cts`))?D(e,`razorwind.config.cts`):R(D(e,`razorwind.config.json`))?D(e,`razorwind.config.json`):R(D(e,`razorwind.config.yaml`))?D(e,`razorwind.config.yaml`):R(D(e,`razorwind.config.yml`))?D(e,`razorwind.config.yml`):void 0,r=Be({orgId:`storm-software`,appId:`razorwind`,workspaceRoot:e}),i={fsCache:r.cache},a=He(e,i),o={};if(n){let r=N(n)?n:P(e,n),i=await a.import(r,{default:!0});if(i){let r={};Ve(i)?r=await Promise.resolve(i({cwd:e,mode:t.mode??`development`})):(k(i)||Array.isArray(i))&&(r=i),(k(r)||Array.isArray(r))&&(o={...r,configFile:n})}}let[s,c,l]=await Promise.all([L({cwd:e,name:`razorwind`,envName:t.mode,globalRc:!0,packageJson:`razorwind`,dotenv:!0,jitiOptions:i}),L({cwd:r.config,name:`razorwind`,envName:t.mode,dotenv:!0,jitiOptions:i}),L({cwd:Ct,name:`razorwind`,envName:t.mode,dotenv:!0,jitiOptions:i})]),u=k(s?.config)?{...s.config}:{},d=n?N(n)?n:P(e,n):void 0,f=typeof s?.configFile==`string`?s.configFile:void 0;d&&f&&P(e,f)===d&&delete u.plugins;let p=y({cwd:e,envPaths:{...r,home:Ct}},t,o,u,k(c?.config)?{...c.config}:{},k(l?.config)?{...l.config}:{},{componentsPath:e,iconsPath:D(e,`assets/icons`),fontsPath:D(e,`assets/fonts`),plugins:[]});if(Array.isArray(p.componentsPath)){let t=p.componentsPath.filter(A).map(e=>F(e));p.componentsPath=t.length>0?t:e}else p.componentsPath=A(p.componentsPath)?F(p.componentsPath):e;if(Array.isArray(p.iconsPath)){let t=p.iconsPath.filter(A).map(e=>F(e));p.iconsPath=t.length>0?t:D(e,`assets/icons`)}else p.iconsPath=A(p.iconsPath)?F(p.iconsPath):D(e,`assets/icons`);if(Array.isArray(p.fontsPath)){let t=p.fontsPath.filter(A).map(e=>F(e));p.fontsPath=t.length>0?t:D(e,`assets/fonts`)}else p.fontsPath=A(p.fontsPath)?F(p.fontsPath):D(e,`assets/fonts`);return p.plugins=St(Array.isArray(p.plugins)?p.plugins:[]),p.verbose=t.verbose===!0||o.verbose===!0,p}async function $(e,t){let n=[];for(let[r,i]of Object.entries(e??{})){let e=i?.path||r;if(!e)continue;let a=N(e)?e:P(t,e),o=(i?.chunks??[]).map(e=>e.content??``).join(``);await Le(ze(a),{recursive:!0}),await Re(a,o,`utf8`),n.push(a)}return n}function Tt(e){return e}const Et=Pe({meta:{name:`razorwind`,title:`Razorwind`,description:`A generator that uses Razorwind to generate design system code from design tokens, components, icons, and fonts.`,version:We,tags:[`razorwind`,`dtcg`]},schema:Fe({schema:i}),input:async e=>{let t=_();if(t.options=await wt(t.cwd,e),t.options.plugins.length===0)throw Error(`Razorwind will not generate any code - no plugins configured. Please add at least one plugin to the configuration.`);let n=t.options.tokens;(!n||g(n))&&(n=await Ce(t));let r={...await xt(t.cwd,t.options),tokens:n??{},components:y(t.options.components??{},await nt(t)??{}),icons:y(t.options.icons??{},await vt(t)??{}),fonts:y(t.options.fonts??{},await s(t)??{})};for(let e of t.options.plugins.filter(e=>e.extract))r=await e.extract(r,t.options);if(!r.tokens||g(r.tokens))throw Error(`Unable to load design tokens for the current workspace. Please ensure that Razorwind is configured correctly and that the tokens are available.`);for(let e of t.options.plugins.filter(e=>e.validate))await e.validate(r,t.options);return r},output:async(e,t,n)=>{await $(n,_().cwd)},generator:async e=>{let t=_(),n={};for(let r of t.options.plugins.filter(e=>e.generate)){let i=await r.generate(e,t.options);n=y(i,n)}return n}});export{Me as DEFAULT_TOKEN_PATH_CANDIDATES,p as FONT_EXTENSIONS,f as FONT_FORMAT_FROM_EXTENSION,o as GENERIC_FALLBACK_FROM_ROLE,ue as MONO_ROLES,we as RAZORWIND_INFER_PREPROCESSOR,de as SANS_ROLES,h as THEME_BASENAME_PATTERN,je as TOKEN_DIRECTORY_GLOB,fe as TOKEN_FILE_EXTENSIONS,Ae as TYPE_PATH_HINTS,c as WEIGHT_FROM_SUFFIX,m as WINDIE_PARSERS,m as razorwindParsers,ne as copyFontFiles,se as cssFontFamily,Tt as defineConfig,Ne as definePlugin,l as fontFamilyName,Et as generator,De as getExtractionHooks,he as getRazorwindParserHooks,xe as getRazorwindPreprocessorHooks,ye as inferTypeFromPath,ve as inferValue,ce as isEmptyFonts,g as isEmptyTokens,nt as loadComponents,s as loadFonts,vt as loadIcons,bt as loadSchemaMetaFromPackageJson,Ce as loadTokens,Ee as loadTokensOrThrow,re as mergeFonts,pe as nestFlatTokens,B as normalizeRepository,ke as normalizeTokenTree,Se as parseCssCustomProperties,oe as parseCssFonts,ie as parseFontFilename,ee as pickFontByRole,te as prependFontCss,Oe as razorwindInferPreprocessor,ge as registerRazorwindHooks,_e as registerRazorwindParsers,le as renderFontCss,u as renderGoogleFontImports,d as renderLocalFontFaces,wt as resolveConfig,xt as resolveSchemaMeta,be as resolveTokensSource,Q as schemaMetaFromConfig,yt as schemaMetaFromPackageJson,Te as styleDictionaryLogOptions,me as themeKeyFromPath,ae as toGoogleFontsCssUrl,St as uniquePlugins,$ as writeGeneratedDocuments};
|
|
1
|
+
import{c as e,d as t,h as n,s as r}from"./utils-CDYdsyyW.mjs";import{a as i,c as a,i as o,l as s,r as c,s as l}from"./schema-CXK5pVmJ.mjs";import{_ as u,a as d,b as f,c as p,d as ee,f as te,g as ne,h as re,i as ie,l as ae,m as oe,n as se,o as ce,p as le,r as ue,s as de,t as fe,u as pe,v as me,y as he}from"./fonts-BiuIJVev.mjs";import{C as m,S as ge,_ as _e,a as ve,b as ye,c as be,d as xe,f as Se,g as Ce,h as we,i as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,r as je,s as Me,t as h,u as Ne,v as Pe,w as Fe,x as Ie,y as Le}from"./tokens-DFYNBFFR.mjs";import{definePlugin as Re}from"./plugin.mjs";import{defineGenerator as ze,defineSchema as Be,useExecution as g}from"@power-plant/core";import{createDefu as _,defu as v}from"defu";import{dirname as Ve,isAbsolute as y,resolve as b}from"node:path";import{titleCase as x}from"@stryke/string-format/title-case";import{existsSync as S}from"@stryke/fs/exists";import{isDirectory as C}from"@stryke/fs/is-file";import{readJsonFile as w}from"@stryke/fs/json";import{listFiles as He}from"@stryke/fs/list-files";import{appendPath as T}from"@stryke/path/append";import{findFileExtensionSafe as E,findFileName as D,findFolderName as O}from"@stryke/path/file-path-fns";import{joinPaths as k}from"@stryke/path/join";import{isSetObject as A}from"@stryke/type-checks/is-set-object";import{isSetString as j}from"@stryke/type-checks/is-set-string";import{mkdir as Ue,readFile as M,readdir as N,writeFile as We}from"node:fs/promises";import{getEnvPaths as Ge}from"@stryke/env/get-env-paths";import{findFilePath as P}from"@stryke/path/find";import{replacePath as F}from"@stryke/path/replace";import{isFunction as Ke}from"@stryke/type-checks/is-function";import{loadConfig as I}from"c12";import{createJiti as qe}from"jiti";import{existsSync as L}from"node:fs";import Je from"node:os";var Ye=`0.0.48`;const R=`base`;function z(e){let t=n(e).filter(e=>e.id!==R);return t.length>1?t:[]}function Xe(e,n){let r=e.find(e=>e.id===R);return!r||n.id===R?n.tokens:t(n.tokens,r.tokens)}function Ze(t,n,r){return{...t,theme:n.id,title:e(t.title,n.id)??t.title,tokens:Xe(r,n)}}function Qe(t,n){let r=e(t.title,n.id);return r?{...t,title:r}:t}async function B(e,t){let n={};for(let r of t.plugins.filter(e=>e.generate)){let i=await r.generate(e,t);n=v(i,n)}return n}async function V(e,t){let i=n(e.tokens),a=z(e.tokens);if(a.length===0)return B(e,t);let o={};for(let n of a){let a=await B(Ze(e,n,i),Qe(t,n));o=v(r(a,n.id),o)}return o}async function H(e){let t={};for(let n of e)Object.assign(t,await V(n.spec,n.config));return t}function U(e){return!!(j(e)||A(e)&&`url`in e&&j(e.url))}function W(e){if(j(e))return e;if(A(e)&&`url`in e&&j(e.url))return e.url}const $e=a.partial(),et=new Set([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]),tt=_((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function nt(e,t){return y(t)?t:b(e,t)}function rt(e){return Array.isArray(e)?e.filter(j):j(e)?[e]:[]}function it(e){let t=e.toLowerCase();if(et.has(t))return t}function at(e){let t=E(e)?.toLowerCase();return!!(t&&et.has(t))}function G(e){if(!e)return;let t=l.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let n=[];for(let t of e){let e=l.safeParse(t);e.success&&n.push(e.data)}return n.length>0?n:void 0}function ot(e){if(!e)return;let t=s.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let n=[];for(let t of e){if(j(t)){let e=D(t,{withExtension:!1})||t,r=s.safeParse({name:e,path:t});r.success&&n.push(r.data);continue}let e=s.safeParse(t);e.success&&n.push(e.data)}return n.length>0?n:void 0}function st(e){if(!A(e))return;let{files:t,usage:n,...r}=e,i=$e.safeParse(r);if(i.success)return Object.keys(i.data).length>0?i.data:void 0}function ct(e){return A(e)&&`path`in e}async function lt(e){let t=k(e,`package.json`);if(!S(t))return;let n;try{n=await w(t)}catch{return}let r={};j(n.name)&&(r.name=n.name,r.title=n.name),j(n.description)&&(r.description=n.description),j(n.version)&&(r.version=n.version),j(n.homepage)&&(r.homepage=n.homepage);let i=W(n.repository);if(i&&(r.repository=i),A(n.dependencies)&&(r.dependencies=n.dependencies),A(n.devDependencies)&&(r.devDependencies=n.devDependencies),Array.isArray(n.keywords)){let e=n.keywords.filter(j);e.length>0&&(r.tags=e)}let a=n.razorwind,o,s,c;ct(a)?s=G(a):A(a)&&(o=st(a),`files`in a&&(s=G(a.files)),`usage`in a&&(c=ot(a.usage)));let l=tt(o??{},r);return s?.length&&(l.files=s),c?.length&&(l.usage=c),Object.keys(l).length>0?l:void 0}async function ut(e){let t=k(e,`component.json`);if(!S(t))return;let n;try{n=await w(t)}catch{return}if(ct(n)||Array.isArray(n)){let e=G(n);if(e)return{files:e}}if(!A(n))return;let r=st(n)??{},i=`files`in n?G(n.files):void 0,a=`usage`in n?ot(n.usage):void 0;return i?.length&&(r.files=i),a?.length&&(r.usage=a),Object.keys(r).length>0?r:void 0}async function dt(e){try{return(await N(e,{withFileTypes:!0})).filter(e=>e.isFile()&&!e.name.startsWith(`.`)&&at(e.name)).map(e=>e.name).toSorted((e,t)=>e.localeCompare(t))}catch{return[]}}async function ft(e,t){if(t?.length)return Promise.all(t.map(async t=>{let n=T(t.path,e),r=E(t.path)??``,i=t.language??it(r),a=t.name||D(t.path,{withExtension:!1})||t.path,o=t.content===void 0?S(n)?await M(n,`utf8`):void 0:t.content;return{...t,name:a,path:n,...i?{language:i}:{},...o===void 0?{}:{content:o}}}));let n=k(e,`usage`);if(!S(n)||!C(n))return;let r=await dt(n);if(r.length!==0)return Promise.all(r.map(async e=>{let t=k(n,e),r=it(E(e)??``),i=D(e,{withExtension:!1})||e;return{name:i,title:x(i),path:t,content:await M(t,`utf8`),...r?{language:r}:{}}}))}async function pt(e,t){let n=t??(await He(e)).filter(e=>D(e,{withExtension:!1})===`index`);return Promise.all(n.filter(Boolean).map(async t=>typeof t==`string`?{type:/[tj]sx$/.test(E(t))?`component`:`file`,path:t,content:await M(T(t,e),`utf8`)}:{type:/[tj]sx$/.test(E(t.path))?`component`:`file`,...t,content:t.content?t.content:t.path?await M(T(t.path,e),`utf8`):void 0,path:T(t.path,e)}))}async function mt(e){let t=await lt(e),n=await ut(e);if(!t&&!n)return;let r=tt(n??{},t??{}),i=j(r.name)?r.name:O(e),o=j(r.title)?r.title:x(i),s=a.safeParse({...r,name:i,title:o});if(!s.success)return;let c=await ft(e,s.data.usage);return{...s.data,files:await pt(e,s.data.files),...c?.length?{usage:c}:{}}}async function ht(e){let t={},n=rt(e.options.componentsPath);for(let r of n){let n=nt(e.cwd,r);if(!(!S(n)||!C(n)))try{let e=await N(n,{withFileTypes:!0});for(let r of e){if(!r.isDirectory()||r.name.startsWith(`.`))continue;let e=await mt(k(n,r.name));e&&(t[e.name]=e)}}catch{continue}}return t}const gt=i.partial(),_t=new Set([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`]),K=_((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function vt(e,t){return y(t)?t:b(e,t)}function yt(e){return Array.isArray(e)?e.filter(j):j(e)?[e]:[]}function bt(e){let t=e.toLowerCase();if(_t.has(t))return t}function xt(e){let t=E(e)?.toLowerCase();return!!(t&&_t.has(t))}function St(e){return ye.test(e)}async function q(e){try{return(await N(e,{withFileTypes:!0})).filter(e=>e.isFile()&&xt(e.name)).map(e=>e.name)}catch{return[]}}function J(e){if(!e)return;let t=o.safeParse(e);if(t.success)return[t.data];if(!Array.isArray(e))return;let n=[];for(let t of e){let e=o.safeParse(t);e.success&&n.push(e.data)}return n.length>0?n:void 0}function Ct(e){if(!A(e))return;let t=gt.safeParse(e);if(t.success)return Object.keys(t.data).length>0?t.data:void 0}function wt(e){return A(e)&&`path`in e}async function Y(e,t,n){let r=T(e,t),i=bt(E(e)??``)??`file`,a=i===`svg`?await M(r,`utf8`):void 0;return{path:r,type:i,...n?{theme:n}:{},...a===void 0?{}:{content:a}}}async function Tt(e){let t=k(e,`package.json`);if(!S(t))return;let n;try{n=await w(t)}catch{return}let r={};j(n.name)&&(r.name=n.name,r.title=n.name),j(n.description)&&(r.description=n.description),j(n.version)&&(r.version=n.version),j(n.homepage)&&(r.homepage=n.homepage);let i=W(n.repository);if(i&&(r.repository=i),Array.isArray(n.keywords)){let e=n.keywords.filter(j);e.length>0&&(r.tags=e)}let a=n.razorwind,o,s;wt(a)?s=J(a):A(a)&&(o=Ct(a),`files`in a&&(s=J(a.files)));let c=K(o??{},r);return s?.length&&(c.files=s),Object.keys(c).length>0?c:void 0}async function Et(e){let t=k(e,`icon.json`);if(!S(t))return;let n;try{n=await w(t)}catch{return}if(wt(n)||Array.isArray(n)){let e=J(n);if(e)return{files:e}}return Ct(n)}async function Dt(e,t){if(t?.length)return Promise.all(t.map(async t=>{let n=T(t.path,e),r=E(t.path)??``,i=t.type??bt(r)??`file`,a=t.content===void 0?i===`svg`?await M(n,`utf8`):void 0:t.content;return{...t,type:i,path:n,...a===void 0?{}:{content:a}}}));let n=await q(e);return Promise.all(n.map(t=>Y(t,e)))}async function Ot(e){let t=await Tt(e),n=await Et(e),r=await q(e);if(!t&&!n&&r.length===0)return;let a=K(n??{},t??{}),o=j(a.name)?a.name:O(e),s=j(a.title)?a.title:x(o),c=i.safeParse({...a,name:o,title:s});if(c.success)return{...c.data,files:await Dt(e,c.data.files)}}function X(e,t,n){let r=e[t];if(!r){e[t]={name:t,title:x(t),files:[n]};return}let i=[...r.files??[]],a=i.findIndex(e=>e.path===n.path&&e.theme===n.theme);a>=0?i[a]=n:i.push(n),e[t]={...r,files:i}}async function kt(e,t,n){let r=await q(e);for(let i of r){let r=D(i,{withExtension:!1});r&&X(n,r,await Y(i,e,t))}}async function At(e){let t={},n=yt(e.options.iconsPath);for(let r of n){let n=vt(e.cwd,r);if(!(!S(n)||!C(n)))try{let e=await N(n,{withFileTypes:!0});for(let r of e){if(r.name.startsWith(`.`))continue;let e=k(n,r.name);if(r.isDirectory()){if(St(r.name)){await kt(e,r.name,t);continue}let n=await Ot(e);if(n){let e=t[n.name];t[n.name]=e?K(n,e):n}continue}if(r.isFile()&&xt(r.name)){let e=D(r.name,{withExtension:!1});if(!e)continue;X(t,e,await Y(r.name,n))}}}catch{continue}}return t}function Z(e,t){let n=e[t];return j(n)?n:void 0}function jt(e){let t={};j(e.name)&&(t.name=e.name),j(e.description)&&(t.description=e.description),j(e.homepage)&&(t.homepage=e.homepage);let n=W(e.repository);n&&(t.repository=n),j(e.logo)&&(t.logo=e.logo);let r=e.razorwind,i={};if(A(r)){let t=r,n=Z(t,`title`),a=Z(t,`name`),o=Z(t,`description`),s=Z(t,`homepage`),c=Z(t,`logo`),l=W(t.repository);a?i.name=a:j(e.name)&&(i.name=e.name),n?i.title=n:j(i.name)&&(i.title=x(i.name)),o?i.description=o:j(e.description)&&(i.description=e.description),s?i.homepage=s:U(e.homepage)?i.homepage=W(e.homepage):U(e.author)?i.homepage=W(e.author):e.maintainers&&Array.isArray(e.maintainers)&&e.maintainers.length>0&&U(e.maintainers[0])?i.homepage=W(e.maintainers[0]):e.contributors&&Array.isArray(e.contributors)&&e.contributors.length>0&&U(e.contributors[0])?i.homepage=W(e.contributors[0]):U(e.bugs)&&(i.homepage=W(e.bugs)),c&&(i.logo=c),l?i.repository=l:U(e.repository)&&(i.repository=W(e.repository))}return v(i,t)}function Mt(e){let t={};return j(e.name)&&(t.name=e.name),j(e.title)&&(t.title=e.title),j(e.description)&&(t.description=e.description),j(e.repository)&&(t.repository=e.repository),j(e.homepage)&&(t.homepage=e.homepage),j(e.logo)&&(t.logo=e.logo),t}async function Nt(e){let t=k(e,`package.json`);if(!S(t))return{};let n;try{n=await w(t)}catch{return{}}return jt(n)}async function Pt(e,t){let n=await Nt(e),r=Mt(t);return v(r,n)}function Ft(e){let t=new Set;return e.filter(e=>!e?.name||!t.has(e.name)&&(t.add(e.name),!0))}const It=Je.homedir();function Lt(e){return Array.isArray(e)?e.filter(e=>A(e)):[]}function Q(e){return Array.isArray(e)||!A(e)?{}:{...e}}const Rt=[`tokensPath`,`componentsPath`,`iconsPath`,`fontsPath`];function zt(e,t){let n={...e};for(let e of Rt)t[e]!=null&&delete n[e];return n}function Bt(e,t,n,r){let i=v({cwd:e,envPaths:r.envPaths},zt(t,n),n,r.workspaceLayer,r.environmentLayer,r.homeLayer,{componentsPath:e,iconsPath:k(e,`assets/icons`),fontsPath:k(e,`assets/fonts`),plugins:[]});if(Array.isArray(i.componentsPath)){let t=i.componentsPath.filter(j).map(e=>P(e));i.componentsPath=t.length>0?t:e}else i.componentsPath=j(i.componentsPath)?P(i.componentsPath):e;if(Array.isArray(i.iconsPath)){let t=i.iconsPath.filter(j).map(e=>P(e));i.iconsPath=t.length>0?t:k(e,`assets/icons`)}else i.iconsPath=j(i.iconsPath)?P(i.iconsPath):k(e,`assets/icons`);if(Array.isArray(i.fontsPath)){let t=i.fontsPath.filter(j).map(e=>P(e));i.fontsPath=t.length>0?t:k(e,`assets/fonts`)}else i.fontsPath=j(i.fontsPath)?P(i.fontsPath):k(e,`assets/fonts`);return i.plugins=Ft(Array.isArray(i.plugins)?i.plugins:[]),i.verbose=t.verbose===!0||n.verbose===!0,i}async function $(e,t){let n=t.configFile&&L(F(t.configFile,e))?F(t.configFile,e):t.configFile&&L(t.configFile)?t.configFile:L(k(e,`razorwind.${t.mode}.ts`))?k(e,`razorwind.${t.mode}.ts`):L(k(e,`razorwind.${t.mode}.js`))?k(e,`razorwind.${t.mode}.js`):L(k(e,`razorwind.${t.mode}.mts`))?k(e,`razorwind.${t.mode}.mts`):L(k(e,`razorwind.${t.mode}.mjs`))?k(e,`razorwind.${t.mode}.mjs`):L(k(e,`razorwind.${t.mode}.cjs`))?k(e,`razorwind.${t.mode}.cjs`):L(k(e,`razorwind.${t.mode}.cts`))?k(e,`razorwind.${t.mode}.cts`):L(k(e,`razorwind.${t.mode}.json`))?k(e,`razorwind.${t.mode}.json`):L(k(e,`razorwind.${t.mode}.yaml`))?k(e,`razorwind.${t.mode}.yaml`):L(k(e,`razorwind.${t.mode}.yml`))?k(e,`razorwind.${t.mode}.yml`):L(k(e,`razorwind.config.ts`))?k(e,`razorwind.config.ts`):L(k(e,`razorwind.config.js`))?k(e,`razorwind.config.js`):L(k(e,`razorwind.config.mts`))?k(e,`razorwind.config.mts`):L(k(e,`razorwind.config.mjs`))?k(e,`razorwind.config.mjs`):L(k(e,`razorwind.config.cjs`))?k(e,`razorwind.config.cjs`):L(k(e,`razorwind.config.cts`))?k(e,`razorwind.config.cts`):L(k(e,`razorwind.config.json`))?k(e,`razorwind.config.json`):L(k(e,`razorwind.config.yaml`))?k(e,`razorwind.config.yaml`):L(k(e,`razorwind.config.yml`))?k(e,`razorwind.config.yml`):void 0,r=Ge({orgId:`storm-software`,appId:`razorwind`,workspaceRoot:e}),i={fsCache:r.cache},a=qe(e,i),o=[{}];if(n){let r=y(n)?n:b(e,n),i=await a.import(r,{default:!0});if(i){let r=i;if(r=Ke(i)?await Promise.resolve(i({cwd:e,mode:t.mode??`development`})):await Promise.resolve(i),Array.isArray(r)){let e=Lt(r);if(e.length===0)throw Error(`Razorwind config array is empty. Provide at least one configuration object.`);o=e.map(e=>({...e,configFile:n}))}else A(r)&&(o=[{...r,configFile:n}])}}let[s,c,l]=await Promise.all([I({cwd:e,name:`razorwind`,envName:t.mode,globalRc:!0,packageJson:`razorwind`,dotenv:!0,jitiOptions:i}),I({cwd:r.config,name:`razorwind`,envName:t.mode,dotenv:!0,jitiOptions:i}),I({cwd:It,name:`razorwind`,envName:t.mode,dotenv:!0,jitiOptions:i})]),u=Q(s?.config),d=n?y(n)?n:b(e,n):void 0,f=typeof s?.configFile==`string`?s.configFile:void 0;d&&f&&b(e,f)===d&&delete u.plugins;let p={envPaths:{...r,home:It},workspaceLayer:u,environmentLayer:Q(c?.config),homeLayer:Q(l?.config)};return o.map(n=>Bt(e,t,n,p))}async function Vt(e,t){let n=(await $(e,t))[0];if(!n)throw Error(`Unable to resolve Razorwind configuration.`);return n}async function Ht(e){if(e.options.plugins.length===0)throw Error(`Razorwind will not generate any code - no plugins configured. Please add at least one plugin to the configuration.`);let t=e.options.tokens;(!t||h(t))&&(t=await Oe(e));let n={...await Pt(e.cwd,e.options),tokens:t??{},components:v(e.options.components??{},await ht(e)??{}),icons:v(e.options.icons??{},await At(e)??{}),fonts:v(e.options.fonts??{},await d(e)??{})};for(let t of e.options.plugins.filter(e=>e.extract))n=await t.extract(n,e.options);if(!n.tokens||h(n.tokens))throw Error(`Unable to load design tokens for the current workspace. Please ensure that Razorwind is configured correctly and that the tokens are available.`);for(let t of e.options.plugins.filter(e=>e.validate))await t.validate(n,e.options);return n}async function Ut(e,t){let n=await $(e.cwd,t),r=[];for(let t of n)e.options=t,r.push({spec:await Ht(e),config:t});return r}async function Wt(e,t){let n=[];for(let[r,i]of Object.entries(e??{})){let e=i?.path||r;if(!e)continue;let a=y(e)?e:b(t,e),o=(i?.chunks??[]).map(e=>e.content??``).join(``);await Ue(Ve(a),{recursive:!0}),await We(a,o,`utf8`),n.push(a)}return n}function Gt(e){return e}const Kt=ze({meta:{name:`razorwind`,title:`Razorwind`,description:`A generator that uses Razorwind to generate design system code from design tokens, components, icons, and fonts.`,version:Ye,tags:[`razorwind`,`dtcg`]},schema:Be({schema:c}),input:async e=>{let t=g(),n=await Ut(t,e),r=n[0];if(!r)throw Error(`Unable to resolve Razorwind configuration.`);return t.generationRuns=n,t.options=r.config,r.spec},output:async(e,t,n)=>{await Wt(n,g().cwd)},generator:async e=>{let t=g();return H(t.generationRuns&&t.generationRuns.length>0?t.generationRuns:[{spec:e,config:t.options}])}});export{Le as DEFAULT_TOKEN_PATH_CANDIDATES,re as FONT_EXTENSIONS,ne as FONT_FORMAT_FROM_EXTENSION,u as GENERIC_FALLBACK_FROM_ROLE,me as MONO_ROLES,ke as RAZORWIND_INFER_PREPROCESSOR,he as SANS_ROLES,ye as THEME_BASENAME_PATTERN,Ie as TOKEN_DIRECTORY_GLOB,ge as TOKEN_FILE_EXTENSIONS,Fe as TYPE_PATH_HINTS,f as WEIGHT_FROM_SUFFIX,m as WINDIE_PARSERS,m as razorwindParsers,oe as copyFontFiles,de as cssFontFamily,Gt as defineConfig,Re as definePlugin,p as fontFamilyName,H as generateAllPluginDocuments,V as generatePluginDocuments,Kt as generator,Me as getExtractionHooks,be as getRazorwindParserHooks,Ee as getRazorwindPreprocessorHooks,we as inferTypeFromPath,Ce as inferValue,fe as isEmptyFonts,h as isEmptyTokens,ht as loadComponents,d as loadFonts,At as loadIcons,Nt as loadSchemaMetaFromPackageJson,Oe as loadTokens,je as loadTokensOrThrow,se as mergeFonts,_e as nestFlatTokens,W as normalizeRepository,Pe as normalizeTokenTree,De as parseCssCustomProperties,ue as parseCssFonts,ce as parseFontFilename,ie as pickFontByRole,Ut as prepareGenerationRuns,Ht as prepareSpec,ae as prependFontCss,Ne as razorwindInferPreprocessor,xe as registerRazorwindHooks,Se as registerRazorwindParsers,pe as renderFontCss,ee as renderGoogleFontImports,te as renderLocalFontFaces,Vt as resolveConfig,$ as resolveConfigs,Pt as resolveSchemaMeta,Te as resolveTokensSource,Mt as schemaMetaFromConfig,jt as schemaMetaFromPackageJson,Ae as styleDictionaryLogOptions,ve as themeKeyFromPath,z as themesForGeneration,le as toGoogleFontsCssUrl,Ft as uniquePlugins,Wt as writeGeneratedDocuments};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/lib/fonts/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../fonts-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../fonts-CkBPEFie.cjs");exports.FONT_EXTENSIONS=e.h,exports.FONT_FORMAT_FROM_EXTENSION=e.g,exports.GENERIC_FALLBACK_FROM_ROLE=e._,exports.MONO_ROLES=e.v,exports.SANS_ROLES=e.y,exports.WEIGHT_FROM_SUFFIX=e.b,exports.copyFontFiles=e.m,exports.cssFontFamily=e.s,exports.fontFamilyName=e.c,exports.isEmptyFonts=e.t,exports.loadFonts=e.a,exports.mergeFonts=e.n,exports.parseCssFonts=e.r,exports.parseFontFilename=e.o,exports.pickFontByRole=e.i,exports.prependFontCss=e.l,exports.renderFontCss=e.u,exports.renderGoogleFontImports=e.d,exports.renderLocalFontFaces=e.f,exports.toGoogleFontsCssUrl=e.p;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "../../index-
|
|
1
|
+
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "../../index-Di7vqmsi.cjs";
|
|
2
2
|
export { FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, MONO_ROLES, type ParsedFontFilename, type RenderFontCssOptions, SANS_ROLES, WEIGHT_FROM_SUFFIX, copyFontFiles, cssFontFamily, fontFamilyName, isEmptyFonts, loadFonts, mergeFonts, parseCssFonts, parseFontFilename, pickFontByRole, prependFontCss, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, toGoogleFontsCssUrl };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "../../index-
|
|
1
|
+
import { S as WEIGHT_FROM_SUFFIX, _ as FONT_EXTENSIONS, a as ParsedFontFilename, b as MONO_ROLES, c as RenderFontCssOptions, d as prependFontCss, f as renderFontCss, g as copyFontFiles, h as toGoogleFontsCssUrl, i as pickFontByRole, l as cssFontFamily, m as renderLocalFontFaces, n as mergeFonts, o as loadFonts, p as renderGoogleFontImports, r as parseCssFonts, s as parseFontFilename, t as isEmptyFonts, u as fontFamilyName, v as FONT_FORMAT_FROM_EXTENSION, x as SANS_ROLES, y as GENERIC_FALLBACK_FROM_ROLE } from "../../index-CzbZzpnz.mjs";
|
|
2
2
|
export { FONT_EXTENSIONS, FONT_FORMAT_FROM_EXTENSION, GENERIC_FALLBACK_FROM_ROLE, MONO_ROLES, type ParsedFontFilename, type RenderFontCssOptions, SANS_ROLES, WEIGHT_FROM_SUFFIX, copyFontFiles, cssFontFamily, fontFamilyName, isEmptyFonts, loadFonts, mergeFonts, parseCssFonts, parseFontFilename, pickFontByRole, prependFontCss, renderFontCss, renderGoogleFontImports, renderLocalFontFaces, toGoogleFontsCssUrl };
|
package/dist/lib/fonts/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v,y}from"../../fonts-
|
|
1
|
+
import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v,y}from"../../fonts-BiuIJVev.mjs";export{s as FONT_EXTENSIONS,o as FONT_FORMAT_FROM_EXTENSION,e as GENERIC_FALLBACK_FROM_ROLE,v as MONO_ROLES,y as SANS_ROLES,n as WEIGHT_FROM_SUFFIX,u as copyFontFiles,h as cssFontFamily,r as fontFamilyName,g as isEmptyFonts,t as loadFonts,d as mergeFonts,m as parseCssFonts,f as parseFontFilename,c as pickFontByRole,l as prependFontCss,_ as renderFontCss,i as renderGoogleFontImports,a as renderLocalFontFaces,p as toGoogleFontsCssUrl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../tokens-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../tokens-By75va9Y.cjs");exports.DEFAULT_TOKEN_PATH_CANDIDATES=e.y,exports.RAZORWIND_INFER_PREPROCESSOR=e.o,exports.THEME_BASENAME_PATTERN=e.b,exports.TOKEN_DIRECTORY_GLOB=e.x,exports.TOKEN_FILE_EXTENSIONS=e.S,exports.TYPE_PATH_HINTS=e.w,exports.WINDIE_PARSERS=e.C,exports.razorwindParsers=e.C,exports.getExtractionHooks=e.s,exports.getRazorwindParserHooks=e.c,exports.getRazorwindPreprocessorHooks=e.l,exports.inferTypeFromPath=e.h,exports.inferValue=e.g,exports.isEmptyTokens=e.t,exports.loadTokens=e.n,exports.loadTokensOrThrow=e.r,exports.nestFlatTokens=e._,exports.normalizeTokenTree=e.v,exports.parseCssCustomProperties=e.m,exports.razorwindInferPreprocessor=e.u,exports.registerRazorwindHooks=e.d,exports.registerRazorwindParsers=e.f,exports.resolveTokensSource=e.i,exports.styleDictionaryLogOptions=e.p,exports.themeKeyFromPath=e.a;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "../../index-
|
|
1
|
+
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "../../index-B7MsziQp.cjs";
|
|
2
2
|
export { DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type ResolveTokensPathOptions, type ResolvedTokensSource, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyTokens, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, styleDictionaryLogOptions, themeKeyFromPath };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "../../index-
|
|
1
|
+
import { A as TOKEN_FILE_EXTENSIONS, C as nestFlatTokens, D as RazorwindParserName, E as DEFAULT_TOKEN_PATH_CANDIDATES, M as TYPE_PATH_HINTS, O as THEME_BASENAME_PATTERN, S as inferValue, T as parseCssCustomProperties, _ as ResolvedTokensSource, a as getRazorwindParserHooks, b as InferredTokenType, c as registerRazorwindHooks, d as LoadTokensOptions, f as LoadedTokens, g as ResolveTokensPathOptions, h as loadTokensOrThrow, i as getExtractionHooks, j as TOKEN_PARSER_NAMES, k as TOKEN_DIRECTORY_GLOB, l as registerRazorwindParsers, m as loadTokens, n as RAZORWIND_INFER_PREPROCESSOR, o as getRazorwindPreprocessorHooks, p as isEmptyTokens, r as StyleDictionaryRegisterTarget, s as razorwindInferPreprocessor, t as ExtractionHooks, u as styleDictionaryLogOptions, v as resolveTokensSource, w as normalizeTokenTree, x as inferTypeFromPath, y as themeKeyFromPath } from "../../index-CzjDptav.mjs";
|
|
2
2
|
export { DEFAULT_TOKEN_PATH_CANDIDATES, type ExtractionHooks, type InferredTokenType, type LoadTokensOptions, type LoadedTokens, RAZORWIND_INFER_PREPROCESSOR, type RazorwindParserName, type ResolveTokensPathOptions, type ResolvedTokensSource, type StyleDictionaryRegisterTarget, THEME_BASENAME_PATTERN, TOKEN_DIRECTORY_GLOB, TOKEN_FILE_EXTENSIONS, TYPE_PATH_HINTS, TOKEN_PARSER_NAMES as WINDIE_PARSERS, TOKEN_PARSER_NAMES as razorwindParsers, getExtractionHooks, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, isEmptyTokens, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, styleDictionaryLogOptions, themeKeyFromPath };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"../../tokens-
|
|
1
|
+
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"../../tokens-DFYNBFFR.mjs";export{C as DEFAULT_TOKEN_PATH_CANDIDATES,m as RAZORWIND_INFER_PREPROCESSOR,i as THEME_BASENAME_PATTERN,S as TOKEN_DIRECTORY_GLOB,t as TOKEN_FILE_EXTENSIONS,x as TYPE_PATH_HINTS,e as WINDIE_PARSERS,e as razorwindParsers,_ as getExtractionHooks,a as getRazorwindParserHooks,d as getRazorwindPreprocessorHooks,l as inferTypeFromPath,c as inferValue,v as isEmptyTokens,p as loadTokens,g as loadTokensOrThrow,n as nestFlatTokens,b as normalizeTokenTree,f as parseCssCustomProperties,y as razorwindInferPreprocessor,o as registerRazorwindHooks,s as registerRazorwindParsers,u as resolveTokensSource,h as styleDictionaryLogOptions,r as themeKeyFromPath};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Plugin } from "./config-
|
|
1
|
+
import { l as Plugin } from "./config-BtscEr7S.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-0UYp_yIy.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-0UYp_yIy.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-CNTGHrST.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-CH6vFnxu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-CH6vFnxu.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-BtscEr7S.cjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-0UYp_yIy.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-CNTGHrST.mjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-CH6vFnxu.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
|