@razorwind/core 0.0.20 → 0.0.22
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-niJpQJza.d.cts → config-CBGz3vxV.d.cts} +2 -2
- package/dist/{config-niJpQJza.d.cts.map → config-CBGz3vxV.d.cts.map} +1 -1
- package/dist/{config-BYknAq7g.d.mts → config-CaaK20wo.d.mts} +2 -2
- package/dist/config-CaaK20wo.d.mts.map +1 -0
- package/dist/{index--y-fo2Lr.d.mts → index-BhVvIILv.d.mts} +1 -1
- package/dist/index-BlIc4ofi.d.mts +169 -0
- package/dist/index-BlIc4ofi.d.mts.map +1 -0
- package/dist/index-CKJ5fZxo.d.cts +169 -0
- package/dist/index-CKJ5fZxo.d.cts.map +1 -0
- package/dist/{index-CjW7STaT.d.cts → index-DW51mcvl.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +19 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/tokens/index.d.cts +2 -169
- package/dist/lib/tokens/index.d.mts +2 -169
- package/dist/{plugin-CZz4yUV2.d.cts → plugin-C_nK-znA.d.cts} +2 -2
- package/dist/{plugin-CZz4yUV2.d.cts.map → plugin-C_nK-znA.d.cts.map} +1 -1
- package/dist/{plugin-CfYEjsU7.d.mts → plugin-Cbx7QH4X.d.mts} +2 -2
- package/dist/plugin-Cbx7QH4X.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-BNfl9Tsw.d.cts → schema-C6-umW1r.d.cts} +9 -9
- package/dist/{schema-BNfl9Tsw.d.cts.map → schema-C6-umW1r.d.cts.map} +1 -1
- package/dist/{schema-BNfl9Tsw.d.mts → schema-C6-umW1r.d.mts} +9 -9
- package/dist/schema-C6-umW1r.d.mts.map +1 -0
- package/dist/schema-CzpHs4s7.mjs +2 -0
- package/dist/schema-CzpHs4s7.mjs.map +1 -0
- package/dist/schema-DWEhLYz4.cjs +1 -0
- package/package.json +2 -2
- package/dist/config-BYknAq7g.d.mts.map +0 -1
- package/dist/lib/tokens/index.d.cts.map +0 -1
- package/dist/lib/tokens/index.d.mts.map +0 -1
- package/dist/plugin-CfYEjsU7.d.mts.map +0 -1
- package/dist/schema-BNfl9Tsw.d.mts.map +0 -1
- package/dist/schema-Bxzw_P4l.mjs +0 -2
- package/dist/schema-Bxzw_P4l.mjs.map +0 -1
- package/dist/schema-D7jRSrC_.cjs +0 -1
|
@@ -1,169 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
import { l as Plugin, t as Config } from "../../config-niJpQJza.cjs";
|
|
4
|
-
import { Tokens } from "@power-plant/dtcg-schema";
|
|
5
|
-
import { ExecutionContext } from "@power-plant/core";
|
|
6
|
-
import { Hooks, Parser, PreprocessedTokens } from "style-dictionary/types";
|
|
7
|
-
//#region src/lib/tokens/constants.d.ts
|
|
8
|
-
/** Style Dictionary parser hook names registered by Razorwind. */
|
|
9
|
-
declare const TOKEN_PARSER_NAMES: readonly ["razorwind-json", "razorwind-yaml", "razorwind-toml", "razorwind-css"];
|
|
10
|
-
type RazorwindParserName = (typeof TOKEN_PARSER_NAMES)[number];
|
|
11
|
-
/** File extensions treated as design-token sources. */
|
|
12
|
-
declare const TOKEN_FILE_EXTENSIONS: readonly ["json", "json5", "jsonc", "yaml", "yml", "toml", "css", "js", "mjs", "cjs", "ts", "mts", "cts"];
|
|
13
|
-
/**
|
|
14
|
-
* Candidate paths checked when `tokensPath` is omitted.
|
|
15
|
-
* First existing file or directory wins.
|
|
16
|
-
*/
|
|
17
|
-
declare const DEFAULT_TOKEN_PATH_CANDIDATES: readonly ["tokens.json", "tokens.json5", "tokens.jsonc", "tokens.yaml", "tokens.yml", "tokens.toml", "tokens.css", "design-tokens.json", "design-tokens.yaml", "design-tokens.yml", "tokens", "design-tokens", "src/tokens", "src/design-tokens", "packages/tokens", "style-dictionary.config.js", "style-dictionary.config.mjs", "style-dictionary.config.ts", "sd.config.js", "sd.config.mjs", "sd.config.ts"];
|
|
18
|
-
/** Glob appended when a tokens directory is resolved. */
|
|
19
|
-
declare const TOKEN_DIRECTORY_GLOB: string;
|
|
20
|
-
/** Theme-like basename patterns used to split multi-file sources into a record. */
|
|
21
|
-
declare const THEME_BASENAME_PATTERN: RegExp;
|
|
22
|
-
/** Path segment hints used when inferring `$type`. */
|
|
23
|
-
declare const TYPE_PATH_HINTS: Record<string, string>;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/lib/tokens/css.d.ts
|
|
26
|
-
/**
|
|
27
|
-
* Extract CSS custom properties from stylesheet text into a nested token tree.
|
|
28
|
-
* Handles `:root`, `[data-theme]`, and Tailwind v4 `@theme` blocks alike.
|
|
29
|
-
*/
|
|
30
|
-
declare function parseCssCustomProperties(contents: string): Record<string, unknown>;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/lib/tokens/infer.d.ts
|
|
33
|
-
type InferredTokenType = "color" | "dimension" | "duration" | "fontFamily" | "fontWeight" | "number" | "cubicBezier" | "shadow" | "gradient" | "typography" | "strokeStyle" | "border" | "transition";
|
|
34
|
-
/**
|
|
35
|
-
* Infer DTCG `$type` from a path segment chain (e.g. `color.primary`).
|
|
36
|
-
*/
|
|
37
|
-
declare function inferTypeFromPath(path: string[]): InferredTokenType | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Normalize a raw token value into DTCG-friendly shape + optional `$type`.
|
|
40
|
-
*/
|
|
41
|
-
declare function inferValue(raw: unknown, path?: string[]): {
|
|
42
|
-
value: unknown;
|
|
43
|
-
type?: InferredTokenType;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Walk a token tree: promote legacy keys to DTCG and infer `$type` / `$value` shapes.
|
|
47
|
-
*/
|
|
48
|
-
declare function normalizeTokenTree(input: unknown, path?: string[]): unknown;
|
|
49
|
-
/**
|
|
50
|
-
* Nest a flat map of dashed keys into a token tree.
|
|
51
|
-
* `--color-primary-500` / `color-primary-500` → `color.primary.500`.
|
|
52
|
-
*
|
|
53
|
-
* Scalar parents that also have children (e.g. `--radius` + `--radius-lg`) are
|
|
54
|
-
* preserved under `DEFAULT` so neither value is dropped.
|
|
55
|
-
*/
|
|
56
|
-
declare function nestFlatTokens(flat: Record<string, unknown>): Record<string, unknown>;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/lib/tokens/resolve-path.d.ts
|
|
59
|
-
interface ResolveTokensPathOptions {
|
|
60
|
-
/**
|
|
61
|
-
* Working directory used to resolve relative paths.
|
|
62
|
-
*/
|
|
63
|
-
cwd: string;
|
|
64
|
-
/**
|
|
65
|
-
* Explicit tokens file(s) or directory(ies) from config.
|
|
66
|
-
*/
|
|
67
|
-
tokensPath?: string | string[];
|
|
68
|
-
/**
|
|
69
|
-
* Extra fallback paths (e.g. registry `tailwind.css`).
|
|
70
|
-
*/
|
|
71
|
-
fallbackPaths?: Array<string | null | undefined>;
|
|
72
|
-
}
|
|
73
|
-
interface ResolvedTokensSource {
|
|
74
|
-
/**
|
|
75
|
-
* Absolute path to the resolved file or directory (if any).
|
|
76
|
-
*
|
|
77
|
-
* When multiple `tokensPath` entries are provided, this is the first
|
|
78
|
-
* resolved path (or the Style Dictionary config when that is the sole entry).
|
|
79
|
-
*/
|
|
80
|
-
resolvedPath?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Style Dictionary `source` globs.
|
|
83
|
-
*/
|
|
84
|
-
source: string[];
|
|
85
|
-
/**
|
|
86
|
-
* How the path was discovered.
|
|
87
|
-
*/
|
|
88
|
-
origin: "tokensPath" | "default" | "fallback" | "none";
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Resolve Style Dictionary source globs from `tokensPath` or common defaults.
|
|
92
|
-
*
|
|
93
|
-
* When `tokensPath` is an array, each entry is resolved and the resulting
|
|
94
|
-
* source globs are merged. A Style Dictionary config file may only be used as
|
|
95
|
-
* the sole `tokensPath` entry.
|
|
96
|
-
*/
|
|
97
|
-
declare function resolveTokensSource(options: ResolveTokensPathOptions): ResolvedTokensSource;
|
|
98
|
-
/**
|
|
99
|
-
* Detect theme-like basenames for splitting multi-file token sets.
|
|
100
|
-
*/
|
|
101
|
-
declare function themeKeyFromPath(filePath: string): string | undefined;
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/lib/tokens/load.d.ts
|
|
104
|
-
interface LoadTokensOptions extends ResolveTokensPathOptions {
|
|
105
|
-
/**
|
|
106
|
-
* When true, split theme-named files into a record keyed by theme.
|
|
107
|
-
*
|
|
108
|
-
* @defaultValue true
|
|
109
|
-
*/
|
|
110
|
-
splitThemes?: boolean;
|
|
111
|
-
}
|
|
112
|
-
type LoadedTokens = Tokens | Record<string, Tokens>;
|
|
113
|
-
/**
|
|
114
|
-
* Load design tokens via Style Dictionary parser hooks.
|
|
115
|
-
*
|
|
116
|
-
* Resolution order:
|
|
117
|
-
* 1. Explicit `tokensPath` (file, directory, array of those, or SD config)
|
|
118
|
-
* 2. Common default paths (`tokens.json`, `tokens/`, …)
|
|
119
|
-
* 3. Fallback paths (e.g. registry Tailwind CSS)
|
|
120
|
-
*/
|
|
121
|
-
declare function loadTokens(context: ExecutionContext<Schema, Config, void>): Promise<LoadedTokens>;
|
|
122
|
-
/**
|
|
123
|
-
* Convenience: load tokens or throw when nothing usable is found.
|
|
124
|
-
*
|
|
125
|
-
* @param config - The configuration object.
|
|
126
|
-
* @param options - The options for loading the tokens.
|
|
127
|
-
* @returns The loaded tokens.
|
|
128
|
-
* @throws An error if no design tokens are found.
|
|
129
|
-
* @throws An error if the tokens are not valid.
|
|
130
|
-
*/
|
|
131
|
-
declare function loadTokensOrThrow(context: ExecutionContext<Schema, Config, void>): Promise<LoadedTokens>;
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/lib/tokens/parsers.d.ts
|
|
134
|
-
/** Preprocessor name applied after all sources merge. */
|
|
135
|
-
declare const RAZORWIND_INFER_PREPROCESSOR = "razorwind-infer";
|
|
136
|
-
/** Target capable of registering Style Dictionary extraction hooks. */
|
|
137
|
-
interface StyleDictionaryRegisterTarget {
|
|
138
|
-
registerParser: (parser: Parser) => unknown;
|
|
139
|
-
registerPreprocessor: (preprocessor: {
|
|
140
|
-
name: string;
|
|
141
|
-
preprocessor: typeof razorwindInferPreprocessor;
|
|
142
|
-
}) => unknown;
|
|
143
|
-
}
|
|
144
|
-
/** Inline `hooks.parsers` map for Style Dictionary config. */
|
|
145
|
-
declare function getRazorwindParserHooks(): NonNullable<Hooks["parsers"]>;
|
|
146
|
-
/**
|
|
147
|
-
* Infer DTCG `$type` / normalize legacy keys after sources merge.
|
|
148
|
-
* Covers JS/TS modules that bypass custom file parsers.
|
|
149
|
-
*/
|
|
150
|
-
declare function razorwindInferPreprocessor(dictionary: PreprocessedTokens): PreprocessedTokens;
|
|
151
|
-
/** Inline `hooks.preprocessors` map for Style Dictionary config. */
|
|
152
|
-
declare function getRazorwindPreprocessorHooks(): NonNullable<Hooks["preprocessors"]>;
|
|
153
|
-
/**
|
|
154
|
-
* Register Razorwind parsers + infer preprocessor on Style Dictionary,
|
|
155
|
-
* then register any extraction hooks contributed by plugins.
|
|
156
|
-
*
|
|
157
|
-
* Platform generation hooks (transforms, formats, …) are registered by
|
|
158
|
-
* `@razorwind/style-dictionary` during generate.
|
|
159
|
-
*
|
|
160
|
-
* @see https://styledictionary.com/reference/api/
|
|
161
|
-
*/
|
|
162
|
-
declare function registerRazorwindHooks(plugins?: Plugin[], target?: StyleDictionaryRegisterTarget): void;
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated Use {@link registerRazorwindHooks} instead.
|
|
165
|
-
*/
|
|
166
|
-
declare const registerRazorwindParsers: typeof registerRazorwindHooks;
|
|
167
|
-
//#endregion
|
|
168
|
-
export { DEFAULT_TOKEN_PATH_CANDIDATES, 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, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, themeKeyFromPath };
|
|
169
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { C as RazorwindParserName, D as TOKEN_PARSER_NAMES, E as TOKEN_FILE_EXTENSIONS, O as TYPE_PATH_HINTS, S as DEFAULT_TOKEN_PATH_CANDIDATES, T as TOKEN_DIRECTORY_GLOB, _ as inferTypeFromPath, a as razorwindInferPreprocessor, b as normalizeTokenTree, c as LoadTokensOptions, d as loadTokensOrThrow, f as ResolveTokensPathOptions, g as InferredTokenType, h as themeKeyFromPath, i as getRazorwindPreprocessorHooks, l as LoadedTokens, m as resolveTokensSource, n as StyleDictionaryRegisterTarget, o as registerRazorwindHooks, p as ResolvedTokensSource, r as getRazorwindParserHooks, s as registerRazorwindParsers, t as RAZORWIND_INFER_PREPROCESSOR, u as loadTokens, v as inferValue, w as THEME_BASENAME_PATTERN, x as parseCssCustomProperties, y as nestFlatTokens } from "../../index-CKJ5fZxo.cjs";
|
|
2
|
+
export { DEFAULT_TOKEN_PATH_CANDIDATES, 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, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, themeKeyFromPath };
|
|
@@ -1,169 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
import { l as Plugin, t as Config } from "../../config-BYknAq7g.mjs";
|
|
4
|
-
import { ExecutionContext } from "@power-plant/core";
|
|
5
|
-
import { Tokens } from "@power-plant/dtcg-schema";
|
|
6
|
-
import { Hooks, Parser, PreprocessedTokens } from "style-dictionary/types";
|
|
7
|
-
//#region src/lib/tokens/constants.d.ts
|
|
8
|
-
/** Style Dictionary parser hook names registered by Razorwind. */
|
|
9
|
-
declare const TOKEN_PARSER_NAMES: readonly ["razorwind-json", "razorwind-yaml", "razorwind-toml", "razorwind-css"];
|
|
10
|
-
type RazorwindParserName = (typeof TOKEN_PARSER_NAMES)[number];
|
|
11
|
-
/** File extensions treated as design-token sources. */
|
|
12
|
-
declare const TOKEN_FILE_EXTENSIONS: readonly ["json", "json5", "jsonc", "yaml", "yml", "toml", "css", "js", "mjs", "cjs", "ts", "mts", "cts"];
|
|
13
|
-
/**
|
|
14
|
-
* Candidate paths checked when `tokensPath` is omitted.
|
|
15
|
-
* First existing file or directory wins.
|
|
16
|
-
*/
|
|
17
|
-
declare const DEFAULT_TOKEN_PATH_CANDIDATES: readonly ["tokens.json", "tokens.json5", "tokens.jsonc", "tokens.yaml", "tokens.yml", "tokens.toml", "tokens.css", "design-tokens.json", "design-tokens.yaml", "design-tokens.yml", "tokens", "design-tokens", "src/tokens", "src/design-tokens", "packages/tokens", "style-dictionary.config.js", "style-dictionary.config.mjs", "style-dictionary.config.ts", "sd.config.js", "sd.config.mjs", "sd.config.ts"];
|
|
18
|
-
/** Glob appended when a tokens directory is resolved. */
|
|
19
|
-
declare const TOKEN_DIRECTORY_GLOB: string;
|
|
20
|
-
/** Theme-like basename patterns used to split multi-file sources into a record. */
|
|
21
|
-
declare const THEME_BASENAME_PATTERN: RegExp;
|
|
22
|
-
/** Path segment hints used when inferring `$type`. */
|
|
23
|
-
declare const TYPE_PATH_HINTS: Record<string, string>;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/lib/tokens/css.d.ts
|
|
26
|
-
/**
|
|
27
|
-
* Extract CSS custom properties from stylesheet text into a nested token tree.
|
|
28
|
-
* Handles `:root`, `[data-theme]`, and Tailwind v4 `@theme` blocks alike.
|
|
29
|
-
*/
|
|
30
|
-
declare function parseCssCustomProperties(contents: string): Record<string, unknown>;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/lib/tokens/infer.d.ts
|
|
33
|
-
type InferredTokenType = "color" | "dimension" | "duration" | "fontFamily" | "fontWeight" | "number" | "cubicBezier" | "shadow" | "gradient" | "typography" | "strokeStyle" | "border" | "transition";
|
|
34
|
-
/**
|
|
35
|
-
* Infer DTCG `$type` from a path segment chain (e.g. `color.primary`).
|
|
36
|
-
*/
|
|
37
|
-
declare function inferTypeFromPath(path: string[]): InferredTokenType | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Normalize a raw token value into DTCG-friendly shape + optional `$type`.
|
|
40
|
-
*/
|
|
41
|
-
declare function inferValue(raw: unknown, path?: string[]): {
|
|
42
|
-
value: unknown;
|
|
43
|
-
type?: InferredTokenType;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Walk a token tree: promote legacy keys to DTCG and infer `$type` / `$value` shapes.
|
|
47
|
-
*/
|
|
48
|
-
declare function normalizeTokenTree(input: unknown, path?: string[]): unknown;
|
|
49
|
-
/**
|
|
50
|
-
* Nest a flat map of dashed keys into a token tree.
|
|
51
|
-
* `--color-primary-500` / `color-primary-500` → `color.primary.500`.
|
|
52
|
-
*
|
|
53
|
-
* Scalar parents that also have children (e.g. `--radius` + `--radius-lg`) are
|
|
54
|
-
* preserved under `DEFAULT` so neither value is dropped.
|
|
55
|
-
*/
|
|
56
|
-
declare function nestFlatTokens(flat: Record<string, unknown>): Record<string, unknown>;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/lib/tokens/resolve-path.d.ts
|
|
59
|
-
interface ResolveTokensPathOptions {
|
|
60
|
-
/**
|
|
61
|
-
* Working directory used to resolve relative paths.
|
|
62
|
-
*/
|
|
63
|
-
cwd: string;
|
|
64
|
-
/**
|
|
65
|
-
* Explicit tokens file(s) or directory(ies) from config.
|
|
66
|
-
*/
|
|
67
|
-
tokensPath?: string | string[];
|
|
68
|
-
/**
|
|
69
|
-
* Extra fallback paths (e.g. registry `tailwind.css`).
|
|
70
|
-
*/
|
|
71
|
-
fallbackPaths?: Array<string | null | undefined>;
|
|
72
|
-
}
|
|
73
|
-
interface ResolvedTokensSource {
|
|
74
|
-
/**
|
|
75
|
-
* Absolute path to the resolved file or directory (if any).
|
|
76
|
-
*
|
|
77
|
-
* When multiple `tokensPath` entries are provided, this is the first
|
|
78
|
-
* resolved path (or the Style Dictionary config when that is the sole entry).
|
|
79
|
-
*/
|
|
80
|
-
resolvedPath?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Style Dictionary `source` globs.
|
|
83
|
-
*/
|
|
84
|
-
source: string[];
|
|
85
|
-
/**
|
|
86
|
-
* How the path was discovered.
|
|
87
|
-
*/
|
|
88
|
-
origin: "tokensPath" | "default" | "fallback" | "none";
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Resolve Style Dictionary source globs from `tokensPath` or common defaults.
|
|
92
|
-
*
|
|
93
|
-
* When `tokensPath` is an array, each entry is resolved and the resulting
|
|
94
|
-
* source globs are merged. A Style Dictionary config file may only be used as
|
|
95
|
-
* the sole `tokensPath` entry.
|
|
96
|
-
*/
|
|
97
|
-
declare function resolveTokensSource(options: ResolveTokensPathOptions): ResolvedTokensSource;
|
|
98
|
-
/**
|
|
99
|
-
* Detect theme-like basenames for splitting multi-file token sets.
|
|
100
|
-
*/
|
|
101
|
-
declare function themeKeyFromPath(filePath: string): string | undefined;
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/lib/tokens/load.d.ts
|
|
104
|
-
interface LoadTokensOptions extends ResolveTokensPathOptions {
|
|
105
|
-
/**
|
|
106
|
-
* When true, split theme-named files into a record keyed by theme.
|
|
107
|
-
*
|
|
108
|
-
* @defaultValue true
|
|
109
|
-
*/
|
|
110
|
-
splitThemes?: boolean;
|
|
111
|
-
}
|
|
112
|
-
type LoadedTokens = Tokens | Record<string, Tokens>;
|
|
113
|
-
/**
|
|
114
|
-
* Load design tokens via Style Dictionary parser hooks.
|
|
115
|
-
*
|
|
116
|
-
* Resolution order:
|
|
117
|
-
* 1. Explicit `tokensPath` (file, directory, array of those, or SD config)
|
|
118
|
-
* 2. Common default paths (`tokens.json`, `tokens/`, …)
|
|
119
|
-
* 3. Fallback paths (e.g. registry Tailwind CSS)
|
|
120
|
-
*/
|
|
121
|
-
declare function loadTokens(context: ExecutionContext<Schema, Config, void>): Promise<LoadedTokens>;
|
|
122
|
-
/**
|
|
123
|
-
* Convenience: load tokens or throw when nothing usable is found.
|
|
124
|
-
*
|
|
125
|
-
* @param config - The configuration object.
|
|
126
|
-
* @param options - The options for loading the tokens.
|
|
127
|
-
* @returns The loaded tokens.
|
|
128
|
-
* @throws An error if no design tokens are found.
|
|
129
|
-
* @throws An error if the tokens are not valid.
|
|
130
|
-
*/
|
|
131
|
-
declare function loadTokensOrThrow(context: ExecutionContext<Schema, Config, void>): Promise<LoadedTokens>;
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/lib/tokens/parsers.d.ts
|
|
134
|
-
/** Preprocessor name applied after all sources merge. */
|
|
135
|
-
declare const RAZORWIND_INFER_PREPROCESSOR = "razorwind-infer";
|
|
136
|
-
/** Target capable of registering Style Dictionary extraction hooks. */
|
|
137
|
-
interface StyleDictionaryRegisterTarget {
|
|
138
|
-
registerParser: (parser: Parser) => unknown;
|
|
139
|
-
registerPreprocessor: (preprocessor: {
|
|
140
|
-
name: string;
|
|
141
|
-
preprocessor: typeof razorwindInferPreprocessor;
|
|
142
|
-
}) => unknown;
|
|
143
|
-
}
|
|
144
|
-
/** Inline `hooks.parsers` map for Style Dictionary config. */
|
|
145
|
-
declare function getRazorwindParserHooks(): NonNullable<Hooks["parsers"]>;
|
|
146
|
-
/**
|
|
147
|
-
* Infer DTCG `$type` / normalize legacy keys after sources merge.
|
|
148
|
-
* Covers JS/TS modules that bypass custom file parsers.
|
|
149
|
-
*/
|
|
150
|
-
declare function razorwindInferPreprocessor(dictionary: PreprocessedTokens): PreprocessedTokens;
|
|
151
|
-
/** Inline `hooks.preprocessors` map for Style Dictionary config. */
|
|
152
|
-
declare function getRazorwindPreprocessorHooks(): NonNullable<Hooks["preprocessors"]>;
|
|
153
|
-
/**
|
|
154
|
-
* Register Razorwind parsers + infer preprocessor on Style Dictionary,
|
|
155
|
-
* then register any extraction hooks contributed by plugins.
|
|
156
|
-
*
|
|
157
|
-
* Platform generation hooks (transforms, formats, …) are registered by
|
|
158
|
-
* `@razorwind/style-dictionary` during generate.
|
|
159
|
-
*
|
|
160
|
-
* @see https://styledictionary.com/reference/api/
|
|
161
|
-
*/
|
|
162
|
-
declare function registerRazorwindHooks(plugins?: Plugin[], target?: StyleDictionaryRegisterTarget): void;
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated Use {@link registerRazorwindHooks} instead.
|
|
165
|
-
*/
|
|
166
|
-
declare const registerRazorwindParsers: typeof registerRazorwindHooks;
|
|
167
|
-
//#endregion
|
|
168
|
-
export { DEFAULT_TOKEN_PATH_CANDIDATES, 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, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, themeKeyFromPath };
|
|
169
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { C as RazorwindParserName, D as TOKEN_PARSER_NAMES, E as TOKEN_FILE_EXTENSIONS, O as TYPE_PATH_HINTS, S as DEFAULT_TOKEN_PATH_CANDIDATES, T as TOKEN_DIRECTORY_GLOB, _ as inferTypeFromPath, a as razorwindInferPreprocessor, b as normalizeTokenTree, c as LoadTokensOptions, d as loadTokensOrThrow, f as ResolveTokensPathOptions, g as InferredTokenType, h as themeKeyFromPath, i as getRazorwindPreprocessorHooks, l as LoadedTokens, m as resolveTokensSource, n as StyleDictionaryRegisterTarget, o as registerRazorwindHooks, p as ResolvedTokensSource, r as getRazorwindParserHooks, s as registerRazorwindParsers, t as RAZORWIND_INFER_PREPROCESSOR, u as loadTokens, v as inferValue, w as THEME_BASENAME_PATTERN, x as parseCssCustomProperties, y as nestFlatTokens } from "../../index-BlIc4ofi.mjs";
|
|
2
|
+
export { DEFAULT_TOKEN_PATH_CANDIDATES, 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, getRazorwindParserHooks, getRazorwindPreprocessorHooks, inferTypeFromPath, inferValue, loadTokens, loadTokensOrThrow, nestFlatTokens, normalizeTokenTree, parseCssCustomProperties, razorwindInferPreprocessor, registerRazorwindHooks, registerRazorwindParsers, resolveTokensSource, themeKeyFromPath };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Plugin } from "./config-
|
|
1
|
+
import { l as Plugin } from "./config-CBGz3vxV.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-C_nK-znA.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-C_nK-znA.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-CaaK20wo.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-Cbx7QH4X.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-Cbx7QH4X.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-CBGz3vxV.cjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-C_nK-znA.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-CaaK20wo.mjs";
|
|
2
|
+
import { t as definePlugin } from "./plugin-Cbx7QH4X.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-DWEhLYz4.cjs");let t=require("@power-plant/dtcg-schema");exports.componentFileSchema=e.n,exports.componentSchema=e.r,exports.componentsSchema=e.i,exports.schema=e.t,Object.defineProperty(exports,"tokenSchema",{enumerable:!0,get:function(){return t.tokenSchema}}),Object.defineProperty(exports,"tokensSchema",{enumerable:!0,get:function(){return t.tokensSchema}});
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as Components, c as componentsSchema, i as ComponentFile, n as schema, o as componentFileSchema, r as Component, s as componentSchema, t as Schema } from "../schema-
|
|
2
|
-
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-
|
|
1
|
+
import { a as Components, c as componentsSchema, i as ComponentFile, n as schema, o as componentFileSchema, r as Component, s as componentSchema, t as Schema } from "../schema-C6-umW1r.cjs";
|
|
2
|
+
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-DW51mcvl.cjs";
|
|
3
3
|
export { type Component, type ComponentFile, type Components, type Schema, type Token, type Tokens, componentFileSchema, componentSchema, componentsSchema, schema, tokenSchema, tokensSchema };
|
package/dist/schema/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as Components, c as componentsSchema, i as ComponentFile, n as schema, o as componentFileSchema, r as Component, s as componentSchema, t as Schema } from "../schema-
|
|
2
|
-
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index
|
|
1
|
+
import { a as Components, c as componentsSchema, i as ComponentFile, n as schema, o as componentFileSchema, r as Component, s as componentSchema, t as Schema } from "../schema-C6-umW1r.mjs";
|
|
2
|
+
import { i as tokensSchema, n as Tokens, r as tokenSchema, t as Token } from "../index-BhVvIILv.mjs";
|
|
3
3
|
export { type Component, type ComponentFile, type Components, type Schema, type Token, type Tokens, componentFileSchema, componentSchema, componentsSchema, schema, tokenSchema, tokensSchema };
|
package/dist/schema/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,t as a}from"../schema-
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"../schema-CzpHs4s7.mjs";export{t as componentFileSchema,e as componentSchema,r as componentsSchema,i as schema,a as tokenSchema,n as tokensSchema};
|
|
@@ -3,7 +3,7 @@ import { Tokens } from "@power-plant/dtcg-schema";
|
|
|
3
3
|
//#region src/schema/components.d.ts
|
|
4
4
|
declare const componentFileSchema: z$1.ZodObject<{
|
|
5
5
|
path: z$1.ZodString;
|
|
6
|
-
type: z$1.ZodEnum<{
|
|
6
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
7
7
|
block: "block";
|
|
8
8
|
component: "component";
|
|
9
9
|
ui: "ui";
|
|
@@ -16,7 +16,7 @@ declare const componentFileSchema: z$1.ZodObject<{
|
|
|
16
16
|
base: "base";
|
|
17
17
|
font: "font";
|
|
18
18
|
item: "item";
|
|
19
|
-
}
|
|
19
|
+
}>>;
|
|
20
20
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
21
21
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
22
22
|
}, z$1.core.$strip>;
|
|
@@ -24,7 +24,7 @@ type ComponentFile = z$1.infer<typeof componentFileSchema>;
|
|
|
24
24
|
declare const componentSchema: z$1.ZodObject<{
|
|
25
25
|
name: z$1.ZodString;
|
|
26
26
|
title: z$1.ZodString;
|
|
27
|
-
type: z$1.
|
|
27
|
+
type: z$1.ZodDefault<z$1.ZodEnum<{
|
|
28
28
|
block: "block";
|
|
29
29
|
component: "component";
|
|
30
30
|
ui: "ui";
|
|
@@ -43,7 +43,7 @@ declare const componentSchema: z$1.ZodObject<{
|
|
|
43
43
|
registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
44
44
|
files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
45
45
|
path: z$1.ZodString;
|
|
46
|
-
type: z$1.ZodEnum<{
|
|
46
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
47
47
|
block: "block";
|
|
48
48
|
component: "component";
|
|
49
49
|
ui: "ui";
|
|
@@ -56,7 +56,7 @@ declare const componentSchema: z$1.ZodObject<{
|
|
|
56
56
|
base: "base";
|
|
57
57
|
font: "font";
|
|
58
58
|
item: "item";
|
|
59
|
-
}
|
|
59
|
+
}>>;
|
|
60
60
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
61
61
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
62
62
|
}, z$1.core.$strip>>>;
|
|
@@ -65,7 +65,7 @@ type Component = z$1.infer<typeof componentSchema>;
|
|
|
65
65
|
declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
66
66
|
name: z$1.ZodString;
|
|
67
67
|
title: z$1.ZodString;
|
|
68
|
-
type: z$1.
|
|
68
|
+
type: z$1.ZodDefault<z$1.ZodEnum<{
|
|
69
69
|
block: "block";
|
|
70
70
|
component: "component";
|
|
71
71
|
ui: "ui";
|
|
@@ -84,7 +84,7 @@ declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
|
84
84
|
registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
85
85
|
files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
86
86
|
path: z$1.ZodString;
|
|
87
|
-
type: z$1.ZodEnum<{
|
|
87
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
88
88
|
block: "block";
|
|
89
89
|
component: "component";
|
|
90
90
|
ui: "ui";
|
|
@@ -97,7 +97,7 @@ declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
|
97
97
|
base: "base";
|
|
98
98
|
font: "font";
|
|
99
99
|
item: "item";
|
|
100
|
-
}
|
|
100
|
+
}>>;
|
|
101
101
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
102
102
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
103
103
|
}, z$1.core.$strip>>>;
|
|
@@ -112,4 +112,4 @@ interface Schema {
|
|
|
112
112
|
declare const schema: z.ZodType<Schema>;
|
|
113
113
|
//#endregion
|
|
114
114
|
export { Components as a, componentsSchema as c, ComponentFile as i, schema as n, componentFileSchema as o, Component as r, componentSchema as s, Schema as t };
|
|
115
|
-
//# sourceMappingURL=schema-
|
|
115
|
+
//# sourceMappingURL=schema-C6-umW1r.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-
|
|
1
|
+
{"version":3,"file":"schema-C6-umW1r.d.cts","names":[],"sources":["../src/schema/components.ts","../src/schema/schema.ts"],"mappings":";;;cAoBa,qBAAmB,IAAA;;;;;;;;;;;;;;;;;;GAyB9B,IAAA,KAAA;KAEU,gBAAgB,IAAE,aAAa;cAE9B,iBAAe,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB1B,IAAA,KAAA;KAEU,YAAY,IAAE,aAAa;cAE1B,kBAAgB,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,IAAA,KAAA;KAEzD,aAAa,IAAE,aAAa;;;UC1CvB;EACf,YAAY;EACZ,QAAQ,SAAS,eAAe;;cAGrB,QAAQ,EAAE,QAAQ"}
|
|
@@ -3,7 +3,7 @@ import { Tokens } from "@power-plant/dtcg-schema";
|
|
|
3
3
|
//#region src/schema/components.d.ts
|
|
4
4
|
declare const componentFileSchema: z$1.ZodObject<{
|
|
5
5
|
path: z$1.ZodString;
|
|
6
|
-
type: z$1.ZodEnum<{
|
|
6
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
7
7
|
block: "block";
|
|
8
8
|
component: "component";
|
|
9
9
|
ui: "ui";
|
|
@@ -16,7 +16,7 @@ declare const componentFileSchema: z$1.ZodObject<{
|
|
|
16
16
|
base: "base";
|
|
17
17
|
font: "font";
|
|
18
18
|
item: "item";
|
|
19
|
-
}
|
|
19
|
+
}>>;
|
|
20
20
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
21
21
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
22
22
|
}, z$1.core.$strip>;
|
|
@@ -24,7 +24,7 @@ type ComponentFile = z$1.infer<typeof componentFileSchema>;
|
|
|
24
24
|
declare const componentSchema: z$1.ZodObject<{
|
|
25
25
|
name: z$1.ZodString;
|
|
26
26
|
title: z$1.ZodString;
|
|
27
|
-
type: z$1.
|
|
27
|
+
type: z$1.ZodDefault<z$1.ZodEnum<{
|
|
28
28
|
block: "block";
|
|
29
29
|
component: "component";
|
|
30
30
|
ui: "ui";
|
|
@@ -43,7 +43,7 @@ declare const componentSchema: z$1.ZodObject<{
|
|
|
43
43
|
registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
44
44
|
files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
45
45
|
path: z$1.ZodString;
|
|
46
|
-
type: z$1.ZodEnum<{
|
|
46
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
47
47
|
block: "block";
|
|
48
48
|
component: "component";
|
|
49
49
|
ui: "ui";
|
|
@@ -56,7 +56,7 @@ declare const componentSchema: z$1.ZodObject<{
|
|
|
56
56
|
base: "base";
|
|
57
57
|
font: "font";
|
|
58
58
|
item: "item";
|
|
59
|
-
}
|
|
59
|
+
}>>;
|
|
60
60
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
61
61
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
62
62
|
}, z$1.core.$strip>>>;
|
|
@@ -65,7 +65,7 @@ type Component = z$1.infer<typeof componentSchema>;
|
|
|
65
65
|
declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
66
66
|
name: z$1.ZodString;
|
|
67
67
|
title: z$1.ZodString;
|
|
68
|
-
type: z$1.
|
|
68
|
+
type: z$1.ZodDefault<z$1.ZodEnum<{
|
|
69
69
|
block: "block";
|
|
70
70
|
component: "component";
|
|
71
71
|
ui: "ui";
|
|
@@ -84,7 +84,7 @@ declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
|
84
84
|
registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
85
85
|
files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
86
86
|
path: z$1.ZodString;
|
|
87
|
-
type: z$1.ZodEnum<{
|
|
87
|
+
type: z$1.ZodOptional<z$1.ZodEnum<{
|
|
88
88
|
block: "block";
|
|
89
89
|
component: "component";
|
|
90
90
|
ui: "ui";
|
|
@@ -97,7 +97,7 @@ declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
|
97
97
|
base: "base";
|
|
98
98
|
font: "font";
|
|
99
99
|
item: "item";
|
|
100
|
-
}
|
|
100
|
+
}>>;
|
|
101
101
|
content: z$1.ZodOptional<z$1.ZodString>;
|
|
102
102
|
target: z$1.ZodOptional<z$1.ZodString>;
|
|
103
103
|
}, z$1.core.$strip>>>;
|
|
@@ -112,4 +112,4 @@ interface Schema {
|
|
|
112
112
|
declare const schema: z.ZodType<Schema>;
|
|
113
113
|
//#endregion
|
|
114
114
|
export { Components as a, componentsSchema as c, ComponentFile as i, schema as n, componentFileSchema as o, Component as r, componentSchema as s, Schema as t };
|
|
115
|
-
//# sourceMappingURL=schema-
|
|
115
|
+
//# sourceMappingURL=schema-C6-umW1r.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-C6-umW1r.d.mts","names":[],"sources":["../src/schema/components.ts","../src/schema/schema.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{z as t}from"zod";import{tokenSchema as n,tokensSchema as r,tokensSchema as i}from"@power-plant/dtcg-schema";const a=t.object({path:t.string(),type:t.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:t.string().optional(),target:t.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.`)}),o=t.object({name:t.string(),title:t.string(),type:t.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:t.string().optional(),description:t.string().optional(),tags:t.array(t.string()).optional(),related:t.array(t.string()).optional(),since:t.string().optional(),version:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),dependencies:t.record(t.string(),t.string()).optional(),devDependencies:t.record(t.string(),t.string()).optional(),registryDependencies:t.record(t.string(),t.string()).optional(),files:t.array(a).optional()}),s=t.record(t.string(),o),c=e.union([r,e.record(e.string(),r)]),l=e.object({tokens:c,components:s});export{o as a,a as i,i as n,s as o,l as r,n as t};
|
|
2
|
+
//# sourceMappingURL=schema-CzpHs4s7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-CzpHs4s7.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs");let t=require("zod");t=e.t(t,1);let n=require("@power-plant/dtcg-schema");const r=t.z.object({path:t.z.string(),type:t.z.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:t.z.string().optional(),target:t.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.`)}),i=t.z.object({name:t.z.string(),title:t.z.string(),type:t.z.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:t.z.string().optional(),description:t.z.string().optional(),tags:t.z.array(t.z.string()).optional(),related:t.z.array(t.z.string()).optional(),since:t.z.string().optional(),version:t.z.string().optional(),repository:t.z.string().optional(),homepage:t.z.string().optional(),dependencies:t.z.record(t.z.string(),t.z.string()).optional(),devDependencies:t.z.record(t.z.string(),t.z.string()).optional(),registryDependencies:t.z.record(t.z.string(),t.z.string()).optional(),files:t.z.array(r).optional()}),a=t.z.record(t.z.string(),i),o=t.default.union([n.tokensSchema,t.default.record(t.default.string(),n.tokensSchema)]),s=t.default.object({tokens:o,components:a});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorwind/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "💨 Razorwind is a unified set of tools that make creating design systems a breeze.",
|
|
6
6
|
"keywords": ["razorwind", "storm-software"],
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"typescript": "^6.0.3"
|
|
146
146
|
},
|
|
147
147
|
"publishConfig": { "access": "public" },
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "924975280684f987be67006f3d8055dfb713da8c"
|
|
149
149
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-BYknAq7g.d.mts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/lib/tokens/constants.ts","../../../src/lib/tokens/css.ts","../../../src/lib/tokens/infer.ts","../../../src/lib/tokens/resolve-path.ts","../../../src/lib/tokens/load.ts","../../../src/lib/tokens/parsers.ts"],"mappings":";;;;;;;;cAmBa;KAOD,8BAA8B;;cAG7B;;;;;cAsBA;;cAyBA;;cAGA,wBAAsB;;cAItB,iBAAiB;;;;;;;iBCvDd,yBACd,mBACC;;;KCgCS;;;;iBAmEI,kBACd,iBACC;;;;iBAiBa,WACd,cACA;EACG;EAAgB,OAAO;;;;;iBAsPZ,mBACd,gBACA;;;;;;;;iBA2Cc,eACd,MAAM,0BACL;;;UC9Zc;;;;EAIf;;;;EAKA;;;;EAKA,gBAAgB;;UAGD;;;;;;;EAOf;;;;EAKA;;;;EAKA;;;;;;;;;iBAyFc,oBACd,SAAS,2BACR;;;;iBAqFa,iBAAiB;;;UCzMhB,0BAA0B;;;;;;EAMzC;;KAGU,eAAe,SAAS,eAAe;;;;;;;;;iBA2I7B,WACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;;;;;iBAsCW,kBACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;cClME;;UAGI;EACf,iBAAiB,QAAQ;EACzB,uBAAuB;IACrB;IACA,qBAAqB;;;;iBAyET,2BAA2B,YAAY;;;;;iBAavC,2BACd,YAAY,qBACX;;iBAKa,iCAAiC,YAC/C;;;;;;;;;;iBAgBc,uBACd,UAAS,UACT,SAAQ;;;;cA6CG,iCAAwB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/lib/tokens/constants.ts","../../../src/lib/tokens/css.ts","../../../src/lib/tokens/infer.ts","../../../src/lib/tokens/resolve-path.ts","../../../src/lib/tokens/load.ts","../../../src/lib/tokens/parsers.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-CfYEjsU7.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-BNfl9Tsw.d.mts","names":[],"sources":["../src/schema/components.ts","../src/schema/schema.ts"],"mappings":""}
|
package/dist/schema-Bxzw_P4l.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{z as t}from"zod";import{tokenSchema as n,tokensSchema as r,tokensSchema as i}from"@power-plant/dtcg-schema";const a=t.object({path:t.string(),type:t.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]),content:t.string().optional(),target:t.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.`)}),o=t.object({name:t.string(),title:t.string(),type:t.enum([`block`,`component`,`ui`,`page`]).optional(),category:t.string().optional(),description:t.string().optional(),tags:t.array(t.string()).optional(),related:t.array(t.string()).optional(),since:t.string().optional(),version:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),dependencies:t.record(t.string(),t.string()).optional(),devDependencies:t.record(t.string(),t.string()).optional(),registryDependencies:t.record(t.string(),t.string()).optional(),files:t.array(a).optional()}),s=t.record(t.string(),o),c=e.union([r,e.record(e.string(),r)]),l=e.object({tokens:c,components:s});export{o as a,a as i,i as n,s as o,l as r,n as t};
|
|
2
|
-
//# sourceMappingURL=schema-Bxzw_P4l.mjs.map
|