@razorwind/core 0.0.47 → 0.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/{config-BjuUx31T.d.cts → config-B1rsPTVV.d.mts} +10 -5
  2. package/dist/config-B1rsPTVV.d.mts.map +1 -0
  3. package/dist/{config-CEPqgKnD.d.mts → config-jPfyBr8C.d.cts} +10 -5
  4. package/dist/{config-BjuUx31T.d.cts.map → config-jPfyBr8C.d.cts.map} +1 -1
  5. package/dist/flatten-tokens-DWbPW_3z.d.cts +64 -0
  6. package/dist/flatten-tokens-DWbPW_3z.d.cts.map +1 -0
  7. package/dist/flatten-tokens-Dz4e2IHx.d.mts +64 -0
  8. package/dist/flatten-tokens-Dz4e2IHx.d.mts.map +1 -0
  9. package/dist/{fonts-CUwsBEd5.mjs → fonts-BiuIJVev.mjs} +4 -4
  10. package/dist/fonts-BiuIJVev.mjs.map +1 -0
  11. package/dist/{fonts-75PPb25H.cjs → fonts-CkBPEFie.cjs} +2 -2
  12. package/dist/{index-DXx1b3vZ.d.cts → index-52XD5ztc.d.mts} +14 -6
  13. package/dist/{index-crrCGMN9.d.mts.map → index-52XD5ztc.d.mts.map} +1 -1
  14. package/dist/{index-DovYOOtL.d.cts → index-CwN0c1Q4.d.cts} +1 -1
  15. package/dist/{index-ktFi0nZL.d.mts → index-D5L2WXYk.d.mts} +1 -1
  16. package/dist/{index-crrCGMN9.d.mts → index-D6x2Pe2v.d.cts} +13 -5
  17. package/dist/index-D6x2Pe2v.d.cts.map +1 -0
  18. package/dist/{index-D7VrdiAn.d.mts → index-VmrytwDm.d.cts} +4 -4
  19. package/dist/{index-DNAWtBG8.d.cts.map → index-VmrytwDm.d.cts.map} +1 -1
  20. package/dist/{index-DNAWtBG8.d.cts → index-nRnX_NsH.d.mts} +4 -4
  21. package/dist/{index-D7VrdiAn.d.mts.map → index-nRnX_NsH.d.mts.map} +1 -1
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.d.cts +88 -16
  24. package/dist/index.d.cts.map +1 -1
  25. package/dist/index.d.mts +88 -16
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/lib/fonts/index.cjs +1 -1
  29. package/dist/lib/fonts/index.d.cts +1 -1
  30. package/dist/lib/fonts/index.d.mts +1 -1
  31. package/dist/lib/fonts/index.mjs +1 -1
  32. package/dist/lib/tokens/index.cjs +1 -1
  33. package/dist/lib/tokens/index.d.cts +2 -2
  34. package/dist/lib/tokens/index.d.mts +2 -2
  35. package/dist/lib/tokens/index.mjs +1 -1
  36. package/dist/{plugin-BocNoTkM.d.mts → plugin-CSC1jRVg.d.cts} +2 -2
  37. package/dist/{plugin-DMOM9PDs.d.cts.map → plugin-CSC1jRVg.d.cts.map} +1 -1
  38. package/dist/{plugin-DMOM9PDs.d.cts → plugin-DBrXhsY0.d.mts} +2 -2
  39. package/dist/plugin-DBrXhsY0.d.mts.map +1 -0
  40. package/dist/plugin.d.cts +2 -2
  41. package/dist/plugin.d.mts +2 -2
  42. package/dist/schema/index.cjs +1 -1
  43. package/dist/schema/index.d.cts +2 -2
  44. package/dist/schema/index.d.mts +2 -2
  45. package/dist/schema/index.mjs +1 -1
  46. package/dist/{schema-D0sXEBjV.cjs → schema-BCofDJWf.cjs} +1 -1
  47. package/dist/{schema-Crr8KMUY.d.cts → schema-BwOBgJIM.d.cts} +6 -1
  48. package/dist/{schema-Crr8KMUY.d.cts.map → schema-BwOBgJIM.d.cts.map} +1 -1
  49. package/dist/{schema-Crr8KMUY.d.mts → schema-BwOBgJIM.d.mts} +6 -1
  50. package/dist/schema-BwOBgJIM.d.mts.map +1 -0
  51. package/dist/{schema-Btk_-NEI.mjs → schema-CXK5pVmJ.mjs} +2 -2
  52. package/dist/schema-CXK5pVmJ.mjs.map +1 -0
  53. package/dist/tokens-BjB6F0P1.cjs +7 -0
  54. package/dist/tokens-C_RYVqap.mjs +8 -0
  55. package/dist/tokens-C_RYVqap.mjs.map +1 -0
  56. package/dist/utils/index.cjs +1 -1
  57. package/dist/utils/index.d.cts +95 -92
  58. package/dist/utils/index.d.cts.map +1 -1
  59. package/dist/utils/index.d.mts +95 -92
  60. package/dist/utils/index.d.mts.map +1 -1
  61. package/dist/utils/index.mjs +1 -1
  62. package/dist/utils-3eUdyRLZ.cjs +1 -0
  63. package/dist/utils-CMqr6G7v.mjs +2 -0
  64. package/dist/utils-CMqr6G7v.mjs.map +1 -0
  65. package/package.json +2 -2
  66. package/dist/config-CEPqgKnD.d.mts.map +0 -1
  67. package/dist/fonts-CUwsBEd5.mjs.map +0 -1
  68. package/dist/index-DXx1b3vZ.d.cts.map +0 -1
  69. package/dist/plugin-BocNoTkM.d.mts.map +0 -1
  70. package/dist/schema-Btk_-NEI.mjs.map +0 -1
  71. package/dist/schema-Crr8KMUY.d.mts.map +0 -1
  72. package/dist/tokens-BSuKch7x.cjs +0 -7
  73. package/dist/tokens-CsosSHvJ.mjs +0 -8
  74. package/dist/tokens-CsosSHvJ.mjs.map +0 -1
  75. package/dist/utils-B5uabOd5.mjs +0 -2
  76. package/dist/utils-B5uabOd5.mjs.map +0 -1
  77. package/dist/utils-BiL8zQzg.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { O as Components, a as Icons, m as Fonts, t as Schema } from "./schema-Crr8KMUY.cjs";
1
+ import { O as Components, a as Icons, m as Fonts, t as Schema } from "./schema-BwOBgJIM.mjs";
2
+ import { GeneratedDocument } from "@power-plant/core";
3
+ import { EnvPaths } from "@stryke/env/get-env-paths";
2
4
  import { PreprocessedTokens } from "style-dictionary";
3
5
  import { Tokens } from "@power-plant/dtcg-schema";
4
- import { EnvPaths } from "@stryke/env/get-env-paths";
5
6
  import { MaybePromise, RequiredKeys } from "@stryke/types/base";
6
- import { GeneratedDocument } from "@power-plant/core";
7
7
  import { DesignTokens } from "style-dictionary/types";
8
8
  //#region src/types/plugin.d.ts
9
9
  /**
@@ -179,7 +179,7 @@ interface Options {
179
179
  *
180
180
  * The basename is optionally followed by a suffix separated by `.`, `_`, or `-` (for example `light.json`, `dark-mode.tokens.json`, `theme.custom.yaml`).
181
181
  *
182
- * Files that match are grouped under that theme key. Non-theme files are merged into a shared `base` entry when at least two distinct themes are detected. If fewer than two themes are found, all sources are merged into a single {@link Tokens} object instead of a record.
182
+ * Files that match are grouped under that theme key. Non-theme files are merged into a shared `base` entry when at least two distinct themes are detected, and are also included when resolving each theme so references into shared primitives succeed. The shared `base` set (and color-variant expansions such as `baseDimmed`) is omitted from generated output. If fewer than two themes are found, all sources are merged into a single {@link Tokens} object instead of a record.
183
183
  *
184
184
  * When `false`, every source file is merged into one flat {@link Tokens} object regardless of filename.
185
185
  *
@@ -214,6 +214,11 @@ interface UserConfigParams {
214
214
  type UserConfigFnObject = (config: UserConfig) => UserConfig;
215
215
  type UserConfigFnPromise = (params: UserConfigParams) => Promise<UserConfig | UserConfig[]>;
216
216
  type UserConfigFn = (params: UserConfigParams) => UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]>;
217
+ /**
218
+ * Config file export. An array of {@link UserConfig} objects is treated as
219
+ * independent generation runs (load tokens, extract, validate, generate
220
+ * for each item).
221
+ */
217
222
  type UserConfigExport = UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
218
223
  type Config = RequiredKeys<UserConfig, "componentsPath" | "iconsPath" | "fontsPath" | "plugins"> & {
219
224
  cwd: string;
@@ -223,4 +228,4 @@ type Config = RequiredKeys<UserConfig, "componentsPath" | "iconsPath" | "fontsPa
223
228
  };
224
229
  //#endregion
225
230
  export { UserConfigFn as a, UserConfigParams as c, TokensPreprocessor as d, UserConfigExport as i, Plugin as l, Options as n, UserConfigFnObject as o, UserConfig as r, UserConfigFnPromise as s, Config as t, TokensParser as u };
226
- //# sourceMappingURL=config-BjuUx31T.d.cts.map
231
+ //# sourceMappingURL=config-B1rsPTVV.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-B1rsPTVV.d.mts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":""}
@@ -1,8 +1,8 @@
1
- import { O as Components, a as Icons, m as Fonts, t as Schema } from "./schema-Crr8KMUY.mjs";
2
- import { GeneratedDocument } from "@power-plant/core";
3
- import { EnvPaths } from "@stryke/env/get-env-paths";
1
+ import { O as Components, a as Icons, m as Fonts, t as Schema } from "./schema-BwOBgJIM.cjs";
4
2
  import { PreprocessedTokens } from "style-dictionary";
3
+ import { GeneratedDocument } from "@power-plant/core";
5
4
  import { Tokens } from "@power-plant/dtcg-schema";
5
+ import { EnvPaths } from "@stryke/env/get-env-paths";
6
6
  import { MaybePromise, RequiredKeys } from "@stryke/types/base";
7
7
  import { DesignTokens } from "style-dictionary/types";
8
8
  //#region src/types/plugin.d.ts
@@ -179,7 +179,7 @@ interface Options {
179
179
  *
180
180
  * The basename is optionally followed by a suffix separated by `.`, `_`, or `-` (for example `light.json`, `dark-mode.tokens.json`, `theme.custom.yaml`).
181
181
  *
182
- * Files that match are grouped under that theme key. Non-theme files are merged into a shared `base` entry when at least two distinct themes are detected. If fewer than two themes are found, all sources are merged into a single {@link Tokens} object instead of a record.
182
+ * Files that match are grouped under that theme key. Non-theme files are merged into a shared `base` entry when at least two distinct themes are detected, and are also included when resolving each theme so references into shared primitives succeed. The shared `base` set (and color-variant expansions such as `baseDimmed`) is omitted from generated output. If fewer than two themes are found, all sources are merged into a single {@link Tokens} object instead of a record.
183
183
  *
184
184
  * When `false`, every source file is merged into one flat {@link Tokens} object regardless of filename.
185
185
  *
@@ -214,6 +214,11 @@ interface UserConfigParams {
214
214
  type UserConfigFnObject = (config: UserConfig) => UserConfig;
215
215
  type UserConfigFnPromise = (params: UserConfigParams) => Promise<UserConfig | UserConfig[]>;
216
216
  type UserConfigFn = (params: UserConfigParams) => UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]>;
217
+ /**
218
+ * Config file export. An array of {@link UserConfig} objects is treated as
219
+ * independent generation runs (load tokens, extract, validate, generate
220
+ * for each item).
221
+ */
217
222
  type UserConfigExport = UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
218
223
  type Config = RequiredKeys<UserConfig, "componentsPath" | "iconsPath" | "fontsPath" | "plugins"> & {
219
224
  cwd: string;
@@ -223,4 +228,4 @@ type Config = RequiredKeys<UserConfig, "componentsPath" | "iconsPath" | "fontsPa
223
228
  };
224
229
  //#endregion
225
230
  export { UserConfigFn as a, UserConfigParams as c, TokensPreprocessor as d, UserConfigExport as i, Plugin as l, Options as n, UserConfigFnObject as o, UserConfig as r, UserConfigFnPromise as s, Config as t, TokensParser as u };
226
- //# sourceMappingURL=config-CEPqgKnD.d.mts.map
231
+ //# sourceMappingURL=config-jPfyBr8C.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-BjuUx31T.d.cts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;UAgCiB;EACf;EACA,SAAS;EACT,SAAS,qBAAqB;;;;;;;;;KAUpB;EAEN;EACA,eAAe,YAAY,uBAAuB;MAElD,YAAY,uBAAuB;;;;;;;;;UAUxB;;;;;;;EAOf;;;;;;EAOA,UAAU;;;;;;EAOV,gBAAgB;;;;;;;;EAShB,WAAW,MAAM,QAAQ,QAAQ,WAAW,aAAa;;;;;;;;EASzD,YACE,MAAM,QACN,QAAQ,WACL,aAAa,eAAe;;;;;;;;EASjC,YAAY,MAAM,QAAQ,QAAQ,WAAW;;;;UCrF9B;;;;;;;;;;;;;;;;;;EAkBf;;;;EAKA;;;;;;EAOA;;;;;;EAOA;;;;;;;;;;;EAYA;;;;;;EAOA;;;;;;;;;;;;EAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA;;UAGe,mBAAmB;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA,SAAS,SAAS,eAAe;EACjC,aAAa;EACb,QAAQ;EACR,QAAQ;EACR,UAAU;;UAGK;EACf;EACA;;KAGU,sBAAsB,QAAQ,eAAe;KAC7C,uBACV,QAAQ,qBACL,QAAQ,aAAa;KACd,gBACV,QAAQ,qBACL,aAAa,eAAe,QAAQ,aAAa;KAC1C,mBACR,aACA,eACA,QAAQ,aAAa,gBACrB,qBACA,sBACA;KAEQ,SAAS,aACnB;EAGA;EACA,UAAU;IACR"}
1
+ {"version":3,"file":"config-jPfyBr8C.d.cts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;UAgCiB;EACf;EACA,SAAS;EACT,SAAS,qBAAqB;;;;;;;;;KAUpB;EAEN;EACA,eAAe,YAAY,uBAAuB;MAElD,YAAY,uBAAuB;;;;;;;;;UAUxB;;;;;;;EAOf;;;;;;EAOA,UAAU;;;;;;EAOV,gBAAgB;;;;;;;;EAShB,WAAW,MAAM,QAAQ,QAAQ,WAAW,aAAa;;;;;;;;EASzD,YACE,MAAM,QACN,QAAQ,WACL,aAAa,eAAe;;;;;;;;EASjC,YAAY,MAAM,QAAQ,QAAQ,WAAW;;;;UCrF9B;;;;;;;;;;;;;;;;;;EAkBf;;;;EAKA;;;;;;EAOA;;;;;;EAOA;;;;;;;;;;;EAYA;;;;;;EAOA;;;;;;;;;;;;EAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA;;UAGe,mBAAmB;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA,SAAS,SAAS,eAAe;EACjC,aAAa;EACb,QAAQ;EACR,QAAQ;EACR,UAAU;;UAGK;EACf;EACA;;KAGU,sBAAsB,QAAQ,eAAe;KAC7C,uBACV,QAAQ,qBACL,QAAQ,aAAa;KACd,gBACV,QAAQ,qBACL,aAAa,eAAe,QAAQ,aAAa;;;;;;KAM1C,mBACR,aACA,eACA,QAAQ,aAAa,gBACrB,qBACA,sBACA;KAEQ,SAAS,aACnB;EAGA;EACA,UAAU;IACR"}
@@ -0,0 +1,64 @@
1
+ import { n as Tokens } from "./index-CwN0c1Q4.cjs";
2
+ //#region src/utils/flatten-tokens.d.ts
3
+ /**
4
+ * A flattened design token row produced by {@link flattenTokens}.
5
+ */
6
+ interface BaseFlatToken {
7
+ /** Dot-separated token path (e.g. `color.primary`). */
8
+ path: string;
9
+ /** DTCG `$type`, when known. */
10
+ type?: string;
11
+ /** Raw `$value` from the token document. */
12
+ value: unknown;
13
+ /** CSS-friendly string form of {@link value}. */
14
+ cssValue: string;
15
+ /** Optional DTCG `$description`. */
16
+ description?: string;
17
+ /** Theme / set id when tokens are a `Record<string, Tokens>`. */
18
+ theme?: string;
19
+ }
20
+ interface TokenSet {
21
+ id: string;
22
+ tokens: Tokens;
23
+ }
24
+ /**
25
+ * Theme-like keys for splitting multi-theme token records.
26
+ *
27
+ * Extends core {@link ../lib/tokens/constants#THEME_BASENAME_PATTERN} with
28
+ * camelCase suffixes from `@razorwind/color-variants` (e.g. `darkHighContrast`).
29
+ */
30
+ declare const TOKEN_SET_THEME_PATTERN: RegExp;
31
+ /**
32
+ * Shared primitive set produced by token loading. Already merged into each
33
+ * real theme, so it is not generated as its own output pass.
34
+ */
35
+ declare const SHARED_THEME_ID = "base";
36
+ /**
37
+ * True when `id` is the shared primitive set (`base`) or a color-variant
38
+ * expansion of it (`baseDimmed`, `base-high-contrast`, …).
39
+ */
40
+ declare function isSharedThemeId(id: string): boolean;
41
+ /**
42
+ * True when `node` is a DTCG token leaf rather than a nested group.
43
+ */
44
+ declare function isTokenLeaf(node: Record<string, unknown>): boolean;
45
+ /**
46
+ * Split `Schema.tokens` into one or more named token sets.
47
+ *
48
+ * A record whose keys all look like themes (`light`, `dark`, …) is treated as
49
+ * multi-theme input; otherwise the whole document is a single set.
50
+ */
51
+ declare function resolveTokenSets(tokens: Tokens | Record<string, Tokens>): TokenSet[];
52
+ interface FlattenTokensOptions<T extends BaseFlatToken = BaseFlatToken> {
53
+ /** When set, only tokens whose `$type` is listed are returned. */
54
+ includeTypes?: readonly string[];
55
+ /** Map each base row before it is appended (e.g. add `cssVar`). */
56
+ enrichToken?: (token: BaseFlatToken) => T;
57
+ }
58
+ /**
59
+ * Flatten DTCG token trees into rows for theme mapping or documentation.
60
+ */
61
+ declare function flattenTokens<T extends BaseFlatToken = BaseFlatToken>(tokens: Tokens | Record<string, Tokens>, options?: FlattenTokensOptions<T>): T[];
62
+ //#endregion
63
+ export { TokenSet as a, isTokenLeaf as c, TOKEN_SET_THEME_PATTERN as i, resolveTokenSets as l, FlattenTokensOptions as n, flattenTokens as o, SHARED_THEME_ID as r, isSharedThemeId as s, BaseFlatToken as t };
64
+ //# sourceMappingURL=flatten-tokens-DWbPW_3z.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-tokens-DWbPW_3z.d.cts","names":[],"sources":["../src/utils/flatten-tokens.ts"],"mappings":";;;;;UA6BiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA,QAAQ;;;;;;;;cASG,yBAAuB;;;;;cAOvB;;;;;iBAQG,gBAAgB;;;;iBAOhB,YAAY,MAAM;;;;;;;iBAqFlB,iBACd,QAAQ,SAAS,eAAe,UAC/B;UAqBc,qBAAqB,UAAU,gBAAgB;;EAE9D;;EAEA,eAAe,OAAO,kBAAkB;;;;;iBAM1B,cAAc,UAAU,gBAAgB,eACtD,QAAQ,SAAS,eAAe,SAChC,UAAS,qBAAqB,KAC7B"}
@@ -0,0 +1,64 @@
1
+ import { n as Tokens } from "./index-D5L2WXYk.mjs";
2
+ //#region src/utils/flatten-tokens.d.ts
3
+ /**
4
+ * A flattened design token row produced by {@link flattenTokens}.
5
+ */
6
+ interface BaseFlatToken {
7
+ /** Dot-separated token path (e.g. `color.primary`). */
8
+ path: string;
9
+ /** DTCG `$type`, when known. */
10
+ type?: string;
11
+ /** Raw `$value` from the token document. */
12
+ value: unknown;
13
+ /** CSS-friendly string form of {@link value}. */
14
+ cssValue: string;
15
+ /** Optional DTCG `$description`. */
16
+ description?: string;
17
+ /** Theme / set id when tokens are a `Record<string, Tokens>`. */
18
+ theme?: string;
19
+ }
20
+ interface TokenSet {
21
+ id: string;
22
+ tokens: Tokens;
23
+ }
24
+ /**
25
+ * Theme-like keys for splitting multi-theme token records.
26
+ *
27
+ * Extends core {@link ../lib/tokens/constants#THEME_BASENAME_PATTERN} with
28
+ * camelCase suffixes from `@razorwind/color-variants` (e.g. `darkHighContrast`).
29
+ */
30
+ declare const TOKEN_SET_THEME_PATTERN: RegExp;
31
+ /**
32
+ * Shared primitive set produced by token loading. Already merged into each
33
+ * real theme, so it is not generated as its own output pass.
34
+ */
35
+ declare const SHARED_THEME_ID = "base";
36
+ /**
37
+ * True when `id` is the shared primitive set (`base`) or a color-variant
38
+ * expansion of it (`baseDimmed`, `base-high-contrast`, …).
39
+ */
40
+ declare function isSharedThemeId(id: string): boolean;
41
+ /**
42
+ * True when `node` is a DTCG token leaf rather than a nested group.
43
+ */
44
+ declare function isTokenLeaf(node: Record<string, unknown>): boolean;
45
+ /**
46
+ * Split `Schema.tokens` into one or more named token sets.
47
+ *
48
+ * A record whose keys all look like themes (`light`, `dark`, …) is treated as
49
+ * multi-theme input; otherwise the whole document is a single set.
50
+ */
51
+ declare function resolveTokenSets(tokens: Tokens | Record<string, Tokens>): TokenSet[];
52
+ interface FlattenTokensOptions<T extends BaseFlatToken = BaseFlatToken> {
53
+ /** When set, only tokens whose `$type` is listed are returned. */
54
+ includeTypes?: readonly string[];
55
+ /** Map each base row before it is appended (e.g. add `cssVar`). */
56
+ enrichToken?: (token: BaseFlatToken) => T;
57
+ }
58
+ /**
59
+ * Flatten DTCG token trees into rows for theme mapping or documentation.
60
+ */
61
+ declare function flattenTokens<T extends BaseFlatToken = BaseFlatToken>(tokens: Tokens | Record<string, Tokens>, options?: FlattenTokensOptions<T>): T[];
62
+ //#endregion
63
+ export { TokenSet as a, isTokenLeaf as c, TOKEN_SET_THEME_PATTERN as i, resolveTokenSets as l, FlattenTokensOptions as n, flattenTokens as o, SHARED_THEME_ID as r, isSharedThemeId as s, BaseFlatToken as t };
64
+ //# sourceMappingURL=flatten-tokens-Dz4e2IHx.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten-tokens-Dz4e2IHx.d.mts","names":[],"sources":["../src/utils/flatten-tokens.ts"],"mappings":""}
@@ -1,10 +1,10 @@
1
- import{a as e,c as t,r as n,s as r}from"./fonts-B0ESWBBC.mjs";import{createDefu as i}from"defu";import{existsSync as a}from"@stryke/fs/exists";import{isDirectory as o}from"@stryke/fs/is-file";import{readJsonFile as s}from"@stryke/fs/json";import{appendPath as c}from"@stryke/path/append";import{findFileExtensionSafe as l,findFileName as u,findFolderName as ee}from"@stryke/path/file-path-fns";import{joinPaths as d}from"@stryke/path/join";import{titleCase as f}from"@stryke/string-format/title-case";import{isSetObject as p}from"@stryke/type-checks/is-set-object";import{isSetString as m}from"@stryke/type-checks/is-set-string";import{copyFile as h,mkdir as g,readdir as _}from"node:fs/promises";import{basename as v,isAbsolute as y,join as b,resolve as x}from"node:path";const S=new Set([`woff2`,`woff`,`ttf`,`otf`,`otc`,`svg`]),C={woff2:`woff2`,woff:`woff`,ttf:`truetype`,otf:`opentype`,otc:`opentype`,svg:`svg`},w={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,book:400,roman:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900},T={sans:`sans-serif`,serif:`serif`,mono:`monospace`,display:`sans-serif`,heading:`sans-serif`,body:`sans-serif`,code:`monospace`},E=[`sans`,`body`,`heading`,`display`],D=[`mono`,`code`];async function O(e,t){if(!e)return[];let n=[];for(let r of Object.values(e))if(r.source===`local`){await g(t,{recursive:!0});for(let e of r.files){if(!e.path||!a(e.path))continue;let r=b(t,v(e.path));await h(e.path,r),n.push(r)}}return n}function k(e){let t=e.trim();return!t||/^[a-z-]+$/i.test(t)&&!/\s/.test(t)?t:`"${t.replaceAll(`"`,`\\"`)}"`}function A(e){return e.family?.trim()||e.title?.trim()||e.name}function j(e){let t=[k(A(e))];for(let n of e.fallbacks??[]){let e=k(n);e&&!t.includes(e)&&t.push(e)}if(e.role){let n=T[e.role];n&&!t.includes(n)&&t.push(n)}return t.filter(Boolean).join(`, `)}function M(e){let t=A(e).replaceAll(` `,`+`),n=e.display??`swap`,r=(e.weights??[]).map(String),i=(e.styles??[`normal`]).includes(`italic`),a=t;if(e.variable){let e=r.length===2?`${r[0]}..${r[1]}`:`100..900`;a=i?`${t}:ital,wght@0,${e};1,${e}`:`${t}:wght@${e}`}else if(r.length>0){if(i){let e=[];for(let t of r)e.push(`0,${t}`);for(let t of r)e.push(`1,${t}`);a=`${t}:ital,wght@${e.join(`;`)}`}else a=`${t}:wght@${r.join(`;`)}`}return`https://fonts.googleapis.com/css2?family=${a}&display=${n}`}function te(e){return e.format}function ne(e,t){let n=v(e.path),r=`${t.endsWith(`/`)?t:`${t}/`}${n}`,i=te(e);return i?`url("${r}") format("${i}")`:`url("${r}")`}function re(e,t){let n=A(e),r=e.display??`swap`;return e.files.map(e=>{let i=[`@font-face {`,` font-family: ${k(n)};`,` src: ${ne(e,t)};`];return e.weight!==void 0&&i.push(` font-weight: ${e.weight};`),e.style&&i.push(` font-style: ${e.style};`),e.unicodeRange&&i.push(` unicode-range: ${e.unicodeRange};`),i.push(` font-display: ${r};`,`}`),i.join(`
1
+ import{a as e,c as t,r as n,s as r}from"./fonts-B0ESWBBC.mjs";import{createDefu as i}from"defu";import{basename as a,isAbsolute as o,join as s,resolve as c}from"node:path";import{titleCase as l}from"@stryke/string-format/title-case";import{existsSync as u}from"@stryke/fs/exists";import{isDirectory as d}from"@stryke/fs/is-file";import{readJsonFile as f}from"@stryke/fs/json";import{appendPath as p}from"@stryke/path/append";import{findFileExtensionSafe as m,findFileName as h,findFolderName as ee}from"@stryke/path/file-path-fns";import{joinPaths as g}from"@stryke/path/join";import{isSetObject as _}from"@stryke/type-checks/is-set-object";import{isSetString as v}from"@stryke/type-checks/is-set-string";import{copyFile as y,mkdir as b,readdir as x}from"node:fs/promises";const S=new Set([`woff2`,`woff`,`ttf`,`otf`,`otc`,`svg`]),C={woff2:`woff2`,woff:`woff`,ttf:`truetype`,otf:`opentype`,otc:`opentype`,svg:`svg`},w={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,book:400,roman:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900},T={sans:`sans-serif`,serif:`serif`,mono:`monospace`,display:`sans-serif`,heading:`sans-serif`,body:`sans-serif`,code:`monospace`},te=[`sans`,`body`,`heading`,`display`],ne=[`mono`,`code`];async function E(e,t){if(!e)return[];let n=[];for(let r of Object.values(e))if(r.source===`local`){await b(t,{recursive:!0});for(let e of r.files){if(!e.path||!u(e.path))continue;let r=s(t,a(e.path));await y(e.path,r),n.push(r)}}return n}function D(e){let t=e.trim();return!t||/^[a-z-]+$/i.test(t)&&!/\s/.test(t)?t:`"${t.replaceAll(`"`,`\\"`)}"`}function O(e){return e.family?.trim()||e.title?.trim()||e.name}function k(e){let t=[D(O(e))];for(let n of e.fallbacks??[]){let e=D(n);e&&!t.includes(e)&&t.push(e)}if(e.role){let n=T[e.role];n&&!t.includes(n)&&t.push(n)}return t.filter(Boolean).join(`, `)}function A(e){let t=O(e).replaceAll(` `,`+`),n=e.display??`swap`,r=(e.weights??[]).map(String),i=(e.styles??[`normal`]).includes(`italic`),a=t;if(e.variable){let e=r.length===2?`${r[0]}..${r[1]}`:`100..900`;a=i?`${t}:ital,wght@0,${e};1,${e}`:`${t}:wght@${e}`}else if(r.length>0){if(i){let e=[];for(let t of r)e.push(`0,${t}`);for(let t of r)e.push(`1,${t}`);a=`${t}:ital,wght@${e.join(`;`)}`}else a=`${t}:wght@${r.join(`;`)}`}return`https://fonts.googleapis.com/css2?family=${a}&display=${n}`}function j(e){return e.format}function M(e,t){let n=a(e.path),r=`${t.endsWith(`/`)?t:`${t}/`}${n}`,i=j(e);return i?`url("${r}") format("${i}")`:`url("${r}")`}function re(e,t){let n=O(e),r=e.display??`swap`;return e.files.map(e=>{let i=[`@font-face {`,` font-family: ${D(n)};`,` src: ${M(e,t)};`];return e.weight!==void 0&&i.push(` font-weight: ${e.weight};`),e.style&&i.push(` font-style: ${e.style};`),e.unicodeRange&&i.push(` unicode-range: ${e.unicodeRange};`),i.push(` font-display: ${r};`,`}`),i.join(`
2
2
  `)}).join(`
3
3
 
4
- `)}function N(e){return Object.values(e).filter(e=>e.source===`google`).map(e=>`@import url("${M(e)}");`).join(`
4
+ `)}function N(e){return Object.values(e).filter(e=>e.source===`google`).map(e=>`@import url("${A(e)}");`).join(`
5
5
  `)}function P(e,t={}){let n=t.urlPrefix??`./fonts/`;return Object.values(e).filter(e=>e.source===`local`).map(e=>re(e,n)).join(`
6
6
 
7
7
  `)}function F(e,t={}){return[N(e),P(e,t)].filter(Boolean).join(`
8
8
 
9
- `)}function I(e,t,n={}){if(!t||Object.keys(t).length===0)return e;let r=F(t,n);return r?e?`${r}\n\n${e}`:`${r}\n`:e}const L=i((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function R(e,t){return y(t)?t:x(e,t)}function z(e){return Array.isArray(e)?e.filter(m):m(e)?[e]:[]}function B(e){let t=l(e)?.toLowerCase();return!!(t&&S.has(t))}function V(e){let t=l(e)?.toLowerCase();return t?C[t]:void 0}async function H(e){try{return(await _(e,{withFileTypes:!0})).filter(e=>e.isFile()&&B(e.name)).map(e=>e.name)}catch{return[]}}const U=Object.keys(w).sort((e,t)=>t.length-e.length);function W(e){let t=V(e),n=u(e,{withExtension:!1})??e,r,i=/(?:[-_ ](italic|oblique|it)|Italic|Oblique)$/.exec(n);i&&(r=(i[1]??i[0]).toLowerCase()===`oblique`?`oblique`:`italic`,n=n.slice(0,i.index));let a,o=/[-_ ]([^_-]+)$/.exec(n),s=(o?.[1]??n).toLowerCase().replaceAll(/[\s_]/g,``);for(let e of U)if(s===e||s.endsWith(e)){if(a=w[e],o)n=n.slice(0,o.index);else{let t=n.toLowerCase().lastIndexOf(e);n=t>0?n.slice(0,t):n}break}return{family:n.replaceAll(/[-_]+$/g,``).trim()||n,...a===void 0?{}:{weight:a},...r?{style:r}:{},...t?{format:t}:{}}}function G(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function K(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 q(e,t){if(e.source===`google`||e.source===`local`)return e.source;if(t&&t.length>0)return`local`;if(`weights`in e||`subsets`in e||`variable`in e||`styles`in e||m(e.family)&&!t)return`google`}function J(n){if(!p(n))return;let i=`files`in n?K(n.files):void 0,a=q(n,i);if(!a){let t=e.safeParse(n);return t.success?t.data:void 0}let o={...n,source:a,...i?{files:i}:{}},s=a===`google`?r.partial().safeParse({...o,source:`google`}):t.partial().safeParse({...o,source:`local`});if(s.success)return Object.keys(s.data).length>0?s.data:void 0}function Y(e){return p(e)&&`path`in e}async function X(e){let t=d(e,`package.json`);if(!a(t))return;let n;try{n=await s(t)}catch{return}let r={};if(m(n.name)&&(r.name=n.name,r.title=n.name),m(n.description)&&(r.description=n.description),Array.isArray(n.keywords)){let e=n.keywords.filter(m);e.length>0&&(r.tags=e)}let i=n.razorwind,o;if(Y(i)||Array.isArray(i)){let e=K(i);e&&(o={source:`local`,files:e})}else p(i)&&(o=J(i));let c=L(o??{},r);return Object.keys(c).length>0?c:void 0}async function ie(e){let t=d(e,`font.json`);if(!a(t))return;let n;try{n=await s(t)}catch{return}if(Y(n)||Array.isArray(n)){let e=K(n);if(e)return{source:`local`,files:e}}return J(n)}function ae(e,t,n){return t?.length?t.map(t=>{let n=c(t.path,e);return{...t,path:n,format:t.format??V(t.path)}}):n.map(t=>{let n=W(t);return{path:c(t,e),format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}}})}async function oe(t){let n=await X(t),r=await ie(t),i=await H(t);if(!n&&!r&&i.length===0)return;let a=L(r??{},n??{}),o=ee(t),s=m(a.name)?a.name:o,c=m(a.title)?a.title:f(s),l=ae(t,a.source===`local`?a.files:void 0,i),u=(a.source??(l.length>0?`local`:`google`))===`google`?{...a,source:`google`,name:s,title:c,family:a.family??c}:{...a,source:`local`,name:s,title:c,family:a.family??c,files:l.length>0?l:a.source===`local`?a.files:l},d=e.safeParse(u);return d.success?d.data:void 0}function se(e,t,n){let r=G(t)||`font`,i=e[r];if(i?.source===`local`){let t=[...i.files],a=t.findIndex(e=>e.path===n.path);a>=0?t[a]=n:t.push(n),e[r]={...i,files:t};return}i||(e[r]={source:`local`,name:r,title:f(t),family:t,files:[n]})}async function ce(e){let t={},n=z(e.options.fontsPath);for(let r of n){let n=R(e.cwd,r);if(!(!a(n)||!o(n)))try{let e=await _(n,{withFileTypes:!0});for(let r of e){if(r.name.startsWith(`.`))continue;let e=d(n,r.name);if(r.isDirectory()){let n=await oe(e);if(n){let e=t[n.name];t[n.name]=e?L(n,e):n}continue}if(r.isFile()&&B(r.name)){let n=W(r.name);se(t,n.family,{path:e,format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}})}}}catch{continue}}return t}const le=/@font-face\s*\{([^{}]*)\}/gi,ue=/@import\s+(?:url\()?['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\)?\s*;/gi,de=/url\(\s*['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\s*\)/gi,fe=/font-family\s*:\s*([^;]+);/i,pe=/font-weight\s*:\s*([^;]+);/i,me=/font-style\s*:\s*(normal|italic|oblique)/i,he=/font-display\s*:\s*(auto|block|swap|fallback|optional)/i,ge=/unicode-range\s*:\s*([^;]+);/i,_e=/url\(\s*['"]?([^)'"]+)['"]?\s*\)(?:\s*format\(\s*['"]?([\w-]+)['"]?\s*\))?/i;function Z(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function ve(e){return e.trim().replaceAll(/^['"]|['"]$/g,``).trim()}function Q(e){if(!e)return;let t=e.trim(),n=Number.parseInt(t,10);return Number.isNaN(n)?t||void 0:n}function ye(e,t){if(e){let t=e.toLowerCase();if(t===`woff2`||t===`woff`||t===`truetype`||t===`opentype`||t===`svg`)return t}let n=t.split(`.`).pop()?.split(`?`)[0]?.toLowerCase();return n?C[n]:void 0}function be(e,t,n,r){let i=Z(t)||`font`,a=e[i];if(a?.source===`local`){let t=[...a.files],r=t.findIndex(e=>e.path===n.path);r>=0?t[r]=n:t.push(n),e[i]={...a,files:t};return}a||(e[i]={source:`local`,name:i,title:f(t),family:t,...r?{display:r}:{},files:[n]})}function $(e){let t;try{t=new URL(e)}catch{return[]}let n=t.searchParams.get(`display`),r=n===`auto`||n===`block`||n===`swap`||n===`fallback`||n===`optional`?n:void 0,i=t.searchParams.getAll(`family`),a=[];for(let e of i){let[t,n]=e.split(`:`),i=(t??``).replaceAll(`+`,` `).trim();if(!i)continue;let o=Z(i),s=[],c=new Set,l=!1;if(n){let[e,t]=n.split(`@`),r=(e??``).split(`,`),i=r.indexOf(`ital`),a=r.indexOf(`wght`),o=(t??``).split(`;`).filter(Boolean);for(let e of o){let t=e.split(`,`);i>=0&&t[i]===`1`?c.add(`italic`):c.add(`normal`);let n=a>=0?t[a]:t[0];if(n?.includes(`..`)){l=!0;let[e,t]=n.split(`..`);e&&s.push(e),t&&s.push(t)}else{let e=Q(n);e!==void 0&&!s.includes(e)&&s.push(e)}}}a.push({source:`google`,name:o||`font`,title:f(i),family:i,...r?{display:r}:{},...s.length>0?{weights:s}:{},...c.size>0?{styles:[...c]}:{},...l?{variable:!0}:{}})}return a}function xe(e){let t=new Set;for(let n of e.matchAll(ue))n[1]&&t.add(n[1]);for(let n of e.matchAll(de))n[1]&&t.add(n[1]);return[...t]}function Se(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``),n={};for(let e of xe(t))for(let t of $(e))n[t.name]??=t;for(let e of t.matchAll(le)){let t=e[1]??``,r=ve(fe.exec(t)?.[1]??``);if(!r)continue;let i=_e.exec(t),a=i?.[1];if(!a||a.includes(`fonts.googleapis.com`))continue;let o={path:a,format:ye(i?.[2],a),weight:Q(pe.exec(t)?.[1]),style:me.exec(t)?.[1],unicodeRange:ge.exec(t)?.[1]?.trim()},s=he.exec(t)?.[1];be(n,r,o,s)}return n}function Ce(e){return!e||Object.keys(e).length===0}function we(e,t){let n={...e??{}};for(let[e,r]of Object.entries(t??{}))n[e]??=r;return n}function Te(e,t){if(!e)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=Object.values(e).find(e=>e.role===t);if(n)return n}}export{T as _,ce as a,w as b,A as c,N as d,P as f,C as g,S as h,Te as i,I as l,O as m,we as n,W as o,M as p,Se as r,j as s,Ce as t,F as u,D as v,E as y};
10
- //# sourceMappingURL=fonts-CUwsBEd5.mjs.map
9
+ `)}function I(e,t,n={}){if(!t||Object.keys(t).length===0)return e;let r=F(t,n);return r?e?`${r}\n\n${e}`:`${r}\n`:e}const L=i((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function R(e,t){return o(t)?t:c(e,t)}function z(e){return Array.isArray(e)?e.filter(v):v(e)?[e]:[]}function B(e){let t=m(e)?.toLowerCase();return!!(t&&S.has(t))}function V(e){let t=m(e)?.toLowerCase();return t?C[t]:void 0}async function H(e){try{return(await x(e,{withFileTypes:!0})).filter(e=>e.isFile()&&B(e.name)).map(e=>e.name)}catch{return[]}}const U=Object.keys(w).sort((e,t)=>t.length-e.length);function W(e){let t=V(e),n=h(e,{withExtension:!1})??e,r,i=/(?:[-_ ](italic|oblique|it)|Italic|Oblique)$/.exec(n);i&&(r=(i[1]??i[0]).toLowerCase()===`oblique`?`oblique`:`italic`,n=n.slice(0,i.index));let a,o=/[-_ ]([^_-]+)$/.exec(n),s=(o?.[1]??n).toLowerCase().replaceAll(/[\s_]/g,``);for(let e of U)if(s===e||s.endsWith(e)){if(a=w[e],o)n=n.slice(0,o.index);else{let t=n.toLowerCase().lastIndexOf(e);n=t>0?n.slice(0,t):n}break}return{family:n.replaceAll(/[-_]+$/g,``).trim()||n,...a===void 0?{}:{weight:a},...r?{style:r}:{},...t?{format:t}:{}}}function G(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function K(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 q(e,t){if(e.source===`google`||e.source===`local`)return e.source;if(t&&t.length>0)return`local`;if(`weights`in e||`subsets`in e||`variable`in e||`styles`in e||v(e.family)&&!t)return`google`}function J(n){if(!_(n))return;let i=`files`in n?K(n.files):void 0,a=q(n,i);if(!a){let t=e.safeParse(n);return t.success?t.data:void 0}let o={...n,source:a,...i?{files:i}:{}},s=a===`google`?r.partial().safeParse({...o,source:`google`}):t.partial().safeParse({...o,source:`local`});if(s.success)return Object.keys(s.data).length>0?s.data:void 0}function Y(e){return _(e)&&`path`in e}async function X(e){let t=g(e,`package.json`);if(!u(t))return;let n;try{n=await f(t)}catch{return}let r={};if(v(n.name)&&(r.name=n.name,r.title=n.name),v(n.description)&&(r.description=n.description),Array.isArray(n.keywords)){let e=n.keywords.filter(v);e.length>0&&(r.tags=e)}let i=n.razorwind,a;if(Y(i)||Array.isArray(i)){let e=K(i);e&&(a={source:`local`,files:e})}else _(i)&&(a=J(i));let o=L(a??{},r);return Object.keys(o).length>0?o:void 0}async function ie(e){let t=g(e,`font.json`);if(!u(t))return;let n;try{n=await f(t)}catch{return}if(Y(n)||Array.isArray(n)){let e=K(n);if(e)return{source:`local`,files:e}}return J(n)}function ae(e,t,n){return t?.length?t.map(t=>{let n=p(t.path,e);return{...t,path:n,format:t.format??V(t.path)}}):n.map(t=>{let n=W(t);return{path:p(t,e),format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}}})}async function oe(t){let n=await X(t),r=await ie(t),i=await H(t);if(!n&&!r&&i.length===0)return;let a=L(r??{},n??{}),o=ee(t),s=v(a.name)?a.name:o,c=v(a.title)?a.title:l(s),u=ae(t,a.source===`local`?a.files:void 0,i),d=(a.source??(u.length>0?`local`:`google`))===`google`?{...a,source:`google`,name:s,title:c,family:a.family??c}:{...a,source:`local`,name:s,title:c,family:a.family??c,files:u.length>0?u:a.source===`local`?a.files:u},f=e.safeParse(d);return f.success?f.data:void 0}function se(e,t,n){let r=G(t)||`font`,i=e[r];if(i?.source===`local`){let t=[...i.files],a=t.findIndex(e=>e.path===n.path);a>=0?t[a]=n:t.push(n),e[r]={...i,files:t};return}i||(e[r]={source:`local`,name:r,title:l(t),family:t,files:[n]})}async function ce(e){let t={},n=z(e.options.fontsPath);for(let r of n){let n=R(e.cwd,r);if(!(!u(n)||!d(n)))try{let e=await x(n,{withFileTypes:!0});for(let r of e){if(r.name.startsWith(`.`))continue;let e=g(n,r.name);if(r.isDirectory()){let n=await oe(e);if(n){let e=t[n.name];t[n.name]=e?L(n,e):n}continue}if(r.isFile()&&B(r.name)){let n=W(r.name);se(t,n.family,{path:e,format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}})}}}catch{continue}}return t}const le=/@font-face\s*\{([^{}]*)\}/gi,ue=/@import\s+(?:url\()?['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\)?\s*;/gi,de=/url\(\s*['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\s*\)/gi,fe=/font-family\s*:\s*([^;]+);/i,pe=/font-weight\s*:\s*([^;]+);/i,me=/font-style\s*:\s*(normal|italic|oblique)/i,he=/font-display\s*:\s*(auto|block|swap|fallback|optional)/i,ge=/unicode-range\s*:\s*([^;]+);/i,_e=/url\(\s*['"]?([^)'"]+)['"]?\s*\)(?:\s*format\(\s*['"]?([\w-]+)['"]?\s*\))?/i;function Z(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function ve(e){return e.trim().replaceAll(/^['"]|['"]$/g,``).trim()}function Q(e){if(!e)return;let t=e.trim(),n=Number.parseInt(t,10);return Number.isNaN(n)?t||void 0:n}function ye(e,t){if(e){let t=e.toLowerCase();if(t===`woff2`||t===`woff`||t===`truetype`||t===`opentype`||t===`svg`)return t}let n=t.split(`.`).pop()?.split(`?`)[0]?.toLowerCase();return n?C[n]:void 0}function be(e,t,n,r){let i=Z(t)||`font`,a=e[i];if(a?.source===`local`){let t=[...a.files],r=t.findIndex(e=>e.path===n.path);r>=0?t[r]=n:t.push(n),e[i]={...a,files:t};return}a||(e[i]={source:`local`,name:i,title:l(t),family:t,...r?{display:r}:{},files:[n]})}function $(e){let t;try{t=new URL(e)}catch{return[]}let n=t.searchParams.get(`display`),r=n===`auto`||n===`block`||n===`swap`||n===`fallback`||n===`optional`?n:void 0,i=t.searchParams.getAll(`family`),a=[];for(let e of i){let[t,n]=e.split(`:`),i=(t??``).replaceAll(`+`,` `).trim();if(!i)continue;let o=Z(i),s=[],c=new Set,u=!1;if(n){let[e,t]=n.split(`@`),r=(e??``).split(`,`),i=r.indexOf(`ital`),a=r.indexOf(`wght`),o=(t??``).split(`;`).filter(Boolean);for(let e of o){let t=e.split(`,`);i>=0&&t[i]===`1`?c.add(`italic`):c.add(`normal`);let n=a>=0?t[a]:t[0];if(n?.includes(`..`)){u=!0;let[e,t]=n.split(`..`);e&&s.push(e),t&&s.push(t)}else{let e=Q(n);e!==void 0&&!s.includes(e)&&s.push(e)}}}a.push({source:`google`,name:o||`font`,title:l(i),family:i,...r?{display:r}:{},...s.length>0?{weights:s}:{},...c.size>0?{styles:[...c]}:{},...u?{variable:!0}:{}})}return a}function xe(e){let t=new Set;for(let n of e.matchAll(ue))n[1]&&t.add(n[1]);for(let n of e.matchAll(de))n[1]&&t.add(n[1]);return[...t]}function Se(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``),n={};for(let e of xe(t))for(let t of $(e))n[t.name]??=t;for(let e of t.matchAll(le)){let t=e[1]??``,r=ve(fe.exec(t)?.[1]??``);if(!r)continue;let i=_e.exec(t),a=i?.[1];if(!a||a.includes(`fonts.googleapis.com`))continue;let o={path:a,format:ye(i?.[2],a),weight:Q(pe.exec(t)?.[1]),style:me.exec(t)?.[1],unicodeRange:ge.exec(t)?.[1]?.trim()},s=he.exec(t)?.[1];be(n,r,o,s)}return n}function Ce(e){return!e||Object.keys(e).length===0}function we(e,t){let n={...e??{}};for(let[e,r]of Object.entries(t??{}))n[e]??=r;return n}function Te(e,t){if(!e)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=Object.values(e).find(e=>e.role===t);if(n)return n}}export{T as _,ce as a,w as b,O as c,N as d,P as f,C as g,S as h,Te as i,I as l,E as m,we as n,W as o,A as p,Se as r,k as s,Ce as t,F as u,ne as v,te as y};
10
+ //# sourceMappingURL=fonts-BiuIJVev.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts-BiuIJVev.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- const e=require("./fonts-vhz5FAsy.cjs");let t=require("defu"),n=require("@stryke/fs/exists"),r=require("@stryke/fs/is-file"),i=require("@stryke/fs/json"),a=require("@stryke/path/append"),o=require("@stryke/path/file-path-fns"),s=require("@stryke/path/join"),c=require("@stryke/string-format/title-case"),l=require("@stryke/type-checks/is-set-object"),u=require("@stryke/type-checks/is-set-string"),d=require("node:fs/promises"),f=require("node:path");const p=new Set([`woff2`,`woff`,`ttf`,`otf`,`otc`,`svg`]),m={woff2:`woff2`,woff:`woff`,ttf:`truetype`,otf:`opentype`,otc:`opentype`,svg:`svg`},h={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,book:400,roman:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900},g={sans:`sans-serif`,serif:`serif`,mono:`monospace`,display:`sans-serif`,heading:`sans-serif`,body:`sans-serif`,code:`monospace`},_=[`sans`,`body`,`heading`,`display`],v=[`mono`,`code`];async function ee(e,t){if(!e)return[];let r=[];for(let i of Object.values(e))if(i.source===`local`){await(0,d.mkdir)(t,{recursive:!0});for(let e of i.files){if(!e.path||!(0,n.existsSync)(e.path))continue;let i=(0,f.join)(t,(0,f.basename)(e.path));await(0,d.copyFile)(e.path,i),r.push(i)}}return r}function y(e){let t=e.trim();return!t||/^[a-z-]+$/i.test(t)&&!/\s/.test(t)?t:`"${t.replaceAll(`"`,`\\"`)}"`}function b(e){return e.family?.trim()||e.title?.trim()||e.name}function x(e){let t=[y(b(e))];for(let n of e.fallbacks??[]){let e=y(n);e&&!t.includes(e)&&t.push(e)}if(e.role){let n=g[e.role];n&&!t.includes(n)&&t.push(n)}return t.filter(Boolean).join(`, `)}function S(e){let t=b(e).replaceAll(` `,`+`),n=e.display??`swap`,r=(e.weights??[]).map(String),i=(e.styles??[`normal`]).includes(`italic`),a=t;if(e.variable){let e=r.length===2?`${r[0]}..${r[1]}`:`100..900`;a=i?`${t}:ital,wght@0,${e};1,${e}`:`${t}:wght@${e}`}else if(r.length>0){if(i){let e=[];for(let t of r)e.push(`0,${t}`);for(let t of r)e.push(`1,${t}`);a=`${t}:ital,wght@${e.join(`;`)}`}else a=`${t}:wght@${r.join(`;`)}`}return`https://fonts.googleapis.com/css2?family=${a}&display=${n}`}function C(e){return e.format}function w(e,t){let n=(0,f.basename)(e.path),r=`${t.endsWith(`/`)?t:`${t}/`}${n}`,i=C(e);return i?`url("${r}") format("${i}")`:`url("${r}")`}function T(e,t){let n=b(e),r=e.display??`swap`;return e.files.map(e=>{let i=[`@font-face {`,` font-family: ${y(n)};`,` src: ${w(e,t)};`];return e.weight!==void 0&&i.push(` font-weight: ${e.weight};`),e.style&&i.push(` font-style: ${e.style};`),e.unicodeRange&&i.push(` unicode-range: ${e.unicodeRange};`),i.push(` font-display: ${r};`,`}`),i.join(`
1
+ const e=require("./fonts-vhz5FAsy.cjs");let t=require("defu"),n=require("node:path"),r=require("@stryke/string-format/title-case"),i=require("@stryke/fs/exists"),a=require("@stryke/fs/is-file"),o=require("@stryke/fs/json"),s=require("@stryke/path/append"),c=require("@stryke/path/file-path-fns"),l=require("@stryke/path/join"),u=require("@stryke/type-checks/is-set-object"),d=require("@stryke/type-checks/is-set-string"),f=require("node:fs/promises");const p=new Set([`woff2`,`woff`,`ttf`,`otf`,`otc`,`svg`]),m={woff2:`woff2`,woff:`woff`,ttf:`truetype`,otf:`opentype`,otc:`opentype`,svg:`svg`},h={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,book:400,roman:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900},g={sans:`sans-serif`,serif:`serif`,mono:`monospace`,display:`sans-serif`,heading:`sans-serif`,body:`sans-serif`,code:`monospace`},_=[`sans`,`body`,`heading`,`display`],v=[`mono`,`code`];async function ee(e,t){if(!e)return[];let r=[];for(let a of Object.values(e))if(a.source===`local`){await(0,f.mkdir)(t,{recursive:!0});for(let e of a.files){if(!e.path||!(0,i.existsSync)(e.path))continue;let a=(0,n.join)(t,(0,n.basename)(e.path));await(0,f.copyFile)(e.path,a),r.push(a)}}return r}function y(e){let t=e.trim();return!t||/^[a-z-]+$/i.test(t)&&!/\s/.test(t)?t:`"${t.replaceAll(`"`,`\\"`)}"`}function b(e){return e.family?.trim()||e.title?.trim()||e.name}function x(e){let t=[y(b(e))];for(let n of e.fallbacks??[]){let e=y(n);e&&!t.includes(e)&&t.push(e)}if(e.role){let n=g[e.role];n&&!t.includes(n)&&t.push(n)}return t.filter(Boolean).join(`, `)}function S(e){let t=b(e).replaceAll(` `,`+`),n=e.display??`swap`,r=(e.weights??[]).map(String),i=(e.styles??[`normal`]).includes(`italic`),a=t;if(e.variable){let e=r.length===2?`${r[0]}..${r[1]}`:`100..900`;a=i?`${t}:ital,wght@0,${e};1,${e}`:`${t}:wght@${e}`}else if(r.length>0){if(i){let e=[];for(let t of r)e.push(`0,${t}`);for(let t of r)e.push(`1,${t}`);a=`${t}:ital,wght@${e.join(`;`)}`}else a=`${t}:wght@${r.join(`;`)}`}return`https://fonts.googleapis.com/css2?family=${a}&display=${n}`}function C(e){return e.format}function w(e,t){let r=(0,n.basename)(e.path),i=`${t.endsWith(`/`)?t:`${t}/`}${r}`,a=C(e);return a?`url("${i}") format("${a}")`:`url("${i}")`}function T(e,t){let n=b(e),r=e.display??`swap`;return e.files.map(e=>{let i=[`@font-face {`,` font-family: ${y(n)};`,` src: ${w(e,t)};`];return e.weight!==void 0&&i.push(` font-weight: ${e.weight};`),e.style&&i.push(` font-style: ${e.style};`),e.unicodeRange&&i.push(` unicode-range: ${e.unicodeRange};`),i.push(` font-display: ${r};`,`}`),i.join(`
2
2
  `)}).join(`
3
3
 
4
4
  `)}function E(e){return Object.values(e).filter(e=>e.source===`google`).map(e=>`@import url("${S(e)}");`).join(`
@@ -6,4 +6,4 @@ const e=require("./fonts-vhz5FAsy.cjs");let t=require("defu"),n=require("@stryke
6
6
 
7
7
  `)}function O(e,t={}){return[E(e),D(e,t)].filter(Boolean).join(`
8
8
 
9
- `)}function te(e,t,n={}){if(!t||Object.keys(t).length===0)return e;let r=O(t,n);return r?e?`${r}\n\n${e}`:`${r}\n`:e}const k=(0,t.createDefu)((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function ne(e,t){return(0,f.isAbsolute)(t)?t:(0,f.resolve)(e,t)}function A(e){return Array.isArray(e)?e.filter(u.isSetString):(0,u.isSetString)(e)?[e]:[]}function j(e){let t=(0,o.findFileExtensionSafe)(e)?.toLowerCase();return!!(t&&p.has(t))}function M(e){let t=(0,o.findFileExtensionSafe)(e)?.toLowerCase();return t?m[t]:void 0}async function N(e){try{return(await(0,d.readdir)(e,{withFileTypes:!0})).filter(e=>e.isFile()&&j(e.name)).map(e=>e.name)}catch{return[]}}const P=Object.keys(h).sort((e,t)=>t.length-e.length);function F(e){let t=M(e),n=(0,o.findFileName)(e,{withExtension:!1})??e,r,i=/(?:[-_ ](italic|oblique|it)|Italic|Oblique)$/.exec(n);i&&(r=(i[1]??i[0]).toLowerCase()===`oblique`?`oblique`:`italic`,n=n.slice(0,i.index));let a,s=/[-_ ]([^_-]+)$/.exec(n),c=(s?.[1]??n).toLowerCase().replaceAll(/[\s_]/g,``);for(let e of P)if(c===e||c.endsWith(e)){if(a=h[e],s)n=n.slice(0,s.index);else{let t=n.toLowerCase().lastIndexOf(e);n=t>0?n.slice(0,t):n}break}return{family:n.replaceAll(/[-_]+$/g,``).trim()||n,...a===void 0?{}:{weight:a},...r?{style:r}:{},...t?{format:t}:{}}}function I(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function L(t){if(!t)return;let n=e.r.safeParse(t);if(n.success)return[n.data];if(!Array.isArray(t))return;let r=[];for(let n of t){let t=e.r.safeParse(n);t.success&&r.push(t.data)}return r.length>0?r:void 0}function R(e,t){if(e.source===`google`||e.source===`local`)return e.source;if(t&&t.length>0)return`local`;if(`weights`in e||`subsets`in e||`variable`in e||`styles`in e||(0,u.isSetString)(e.family)&&!t)return`google`}function z(t){if(!(0,l.isSetObject)(t))return;let n=`files`in t?L(t.files):void 0,r=R(t,n);if(!r){let n=e.a.safeParse(t);return n.success?n.data:void 0}let i={...t,source:r,...n?{files:n}:{}},a=r===`google`?e.s.partial().safeParse({...i,source:`google`}):e.c.partial().safeParse({...i,source:`local`});if(a.success)return Object.keys(a.data).length>0?a.data:void 0}function B(e){return(0,l.isSetObject)(e)&&`path`in e}async function V(e){let t=(0,s.joinPaths)(e,`package.json`);if(!(0,n.existsSync)(t))return;let r;try{r=await(0,i.readJsonFile)(t)}catch{return}let a={};if((0,u.isSetString)(r.name)&&(a.name=r.name,a.title=r.name),(0,u.isSetString)(r.description)&&(a.description=r.description),Array.isArray(r.keywords)){let e=r.keywords.filter(u.isSetString);e.length>0&&(a.tags=e)}let o=r.razorwind,c;if(B(o)||Array.isArray(o)){let e=L(o);e&&(c={source:`local`,files:e})}else(0,l.isSetObject)(o)&&(c=z(o));let d=k(c??{},a);return Object.keys(d).length>0?d:void 0}async function H(e){let t=(0,s.joinPaths)(e,`font.json`);if(!(0,n.existsSync)(t))return;let r;try{r=await(0,i.readJsonFile)(t)}catch{return}if(B(r)||Array.isArray(r)){let e=L(r);if(e)return{source:`local`,files:e}}return z(r)}function U(e,t,n){return t?.length?t.map(t=>{let n=(0,a.appendPath)(t.path,e);return{...t,path:n,format:t.format??M(t.path)}}):n.map(t=>{let n=F(t);return{path:(0,a.appendPath)(t,e),format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}}})}async function W(t){let n=await V(t),r=await H(t),i=await N(t);if(!n&&!r&&i.length===0)return;let a=k(r??{},n??{}),s=(0,o.findFolderName)(t),l=(0,u.isSetString)(a.name)?a.name:s,d=(0,u.isSetString)(a.title)?a.title:(0,c.titleCase)(l),f=U(t,a.source===`local`?a.files:void 0,i),p=(a.source??(f.length>0?`local`:`google`))===`google`?{...a,source:`google`,name:l,title:d,family:a.family??d}:{...a,source:`local`,name:l,title:d,family:a.family??d,files:f.length>0?f:a.source===`local`?a.files:f},m=e.a.safeParse(p);return m.success?m.data:void 0}function G(e,t,n){let r=I(t)||`font`,i=e[r];if(i?.source===`local`){let t=[...i.files],a=t.findIndex(e=>e.path===n.path);a>=0?t[a]=n:t.push(n),e[r]={...i,files:t};return}i||(e[r]={source:`local`,name:r,title:(0,c.titleCase)(t),family:t,files:[n]})}async function re(e){let t={},i=A(e.options.fontsPath);for(let a of i){let i=ne(e.cwd,a);if(!(!(0,n.existsSync)(i)||!(0,r.isDirectory)(i)))try{let e=await(0,d.readdir)(i,{withFileTypes:!0});for(let n of e){if(n.name.startsWith(`.`))continue;let e=(0,s.joinPaths)(i,n.name);if(n.isDirectory()){let n=await W(e);if(n){let e=t[n.name];t[n.name]=e?k(n,e):n}continue}if(n.isFile()&&j(n.name)){let r=F(n.name);G(t,r.family,{path:e,format:r.format,...r.weight===void 0?{}:{weight:r.weight},...r.style?{style:r.style}:{}})}}}catch{continue}}return t}const K=/@font-face\s*\{([^{}]*)\}/gi,q=/@import\s+(?:url\()?['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\)?\s*;/gi,J=/url\(\s*['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\s*\)/gi,Y=/font-family\s*:\s*([^;]+);/i,X=/font-weight\s*:\s*([^;]+);/i,ie=/font-style\s*:\s*(normal|italic|oblique)/i,ae=/font-display\s*:\s*(auto|block|swap|fallback|optional)/i,oe=/unicode-range\s*:\s*([^;]+);/i,se=/url\(\s*['"]?([^)'"]+)['"]?\s*\)(?:\s*format\(\s*['"]?([\w-]+)['"]?\s*\))?/i;function Z(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function Q(e){return e.trim().replaceAll(/^['"]|['"]$/g,``).trim()}function $(e){if(!e)return;let t=e.trim(),n=Number.parseInt(t,10);return Number.isNaN(n)?t||void 0:n}function ce(e,t){if(e){let t=e.toLowerCase();if(t===`woff2`||t===`woff`||t===`truetype`||t===`opentype`||t===`svg`)return t}let n=t.split(`.`).pop()?.split(`?`)[0]?.toLowerCase();return n?m[n]:void 0}function le(e,t,n,r){let i=Z(t)||`font`,a=e[i];if(a?.source===`local`){let t=[...a.files],r=t.findIndex(e=>e.path===n.path);r>=0?t[r]=n:t.push(n),e[i]={...a,files:t};return}a||(e[i]={source:`local`,name:i,title:(0,c.titleCase)(t),family:t,...r?{display:r}:{},files:[n]})}function ue(e){let t;try{t=new URL(e)}catch{return[]}let n=t.searchParams.get(`display`),r=n===`auto`||n===`block`||n===`swap`||n===`fallback`||n===`optional`?n:void 0,i=t.searchParams.getAll(`family`),a=[];for(let e of i){let[t,n]=e.split(`:`),i=(t??``).replaceAll(`+`,` `).trim();if(!i)continue;let o=Z(i),s=[],l=new Set,u=!1;if(n){let[e,t]=n.split(`@`),r=(e??``).split(`,`),i=r.indexOf(`ital`),a=r.indexOf(`wght`),o=(t??``).split(`;`).filter(Boolean);for(let e of o){let t=e.split(`,`);i>=0&&t[i]===`1`?l.add(`italic`):l.add(`normal`);let n=a>=0?t[a]:t[0];if(n?.includes(`..`)){u=!0;let[e,t]=n.split(`..`);e&&s.push(e),t&&s.push(t)}else{let e=$(n);e!==void 0&&!s.includes(e)&&s.push(e)}}}a.push({source:`google`,name:o||`font`,title:(0,c.titleCase)(i),family:i,...r?{display:r}:{},...s.length>0?{weights:s}:{},...l.size>0?{styles:[...l]}:{},...u?{variable:!0}:{}})}return a}function de(e){let t=new Set;for(let n of e.matchAll(q))n[1]&&t.add(n[1]);for(let n of e.matchAll(J))n[1]&&t.add(n[1]);return[...t]}function fe(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``),n={};for(let e of de(t))for(let t of ue(e))n[t.name]??=t;for(let e of t.matchAll(K)){let t=e[1]??``,r=Q(Y.exec(t)?.[1]??``);if(!r)continue;let i=se.exec(t),a=i?.[1];if(!a||a.includes(`fonts.googleapis.com`))continue;let o={path:a,format:ce(i?.[2],a),weight:$(X.exec(t)?.[1]),style:ie.exec(t)?.[1],unicodeRange:oe.exec(t)?.[1]?.trim()},s=ae.exec(t)?.[1];le(n,r,o,s)}return n}function pe(e){return!e||Object.keys(e).length===0}function me(e,t){let n={...e??{}};for(let[e,r]of Object.entries(t??{}))n[e]??=r;return n}function he(e,t){if(!e)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=Object.values(e).find(e=>e.role===t);if(n)return n}}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return _}});
9
+ `)}function te(e,t,n={}){if(!t||Object.keys(t).length===0)return e;let r=O(t,n);return r?e?`${r}\n\n${e}`:`${r}\n`:e}const k=(0,t.createDefu)((e,t,n)=>Array.isArray(n)?(e[t]=n,!0):!1);function ne(e,t){return(0,n.isAbsolute)(t)?t:(0,n.resolve)(e,t)}function A(e){return Array.isArray(e)?e.filter(d.isSetString):(0,d.isSetString)(e)?[e]:[]}function j(e){let t=(0,c.findFileExtensionSafe)(e)?.toLowerCase();return!!(t&&p.has(t))}function M(e){let t=(0,c.findFileExtensionSafe)(e)?.toLowerCase();return t?m[t]:void 0}async function N(e){try{return(await(0,f.readdir)(e,{withFileTypes:!0})).filter(e=>e.isFile()&&j(e.name)).map(e=>e.name)}catch{return[]}}const P=Object.keys(h).sort((e,t)=>t.length-e.length);function F(e){let t=M(e),n=(0,c.findFileName)(e,{withExtension:!1})??e,r,i=/(?:[-_ ](italic|oblique|it)|Italic|Oblique)$/.exec(n);i&&(r=(i[1]??i[0]).toLowerCase()===`oblique`?`oblique`:`italic`,n=n.slice(0,i.index));let a,o=/[-_ ]([^_-]+)$/.exec(n),s=(o?.[1]??n).toLowerCase().replaceAll(/[\s_]/g,``);for(let e of P)if(s===e||s.endsWith(e)){if(a=h[e],o)n=n.slice(0,o.index);else{let t=n.toLowerCase().lastIndexOf(e);n=t>0?n.slice(0,t):n}break}return{family:n.replaceAll(/[-_]+$/g,``).trim()||n,...a===void 0?{}:{weight:a},...r?{style:r}:{},...t?{format:t}:{}}}function I(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function L(t){if(!t)return;let n=e.r.safeParse(t);if(n.success)return[n.data];if(!Array.isArray(t))return;let r=[];for(let n of t){let t=e.r.safeParse(n);t.success&&r.push(t.data)}return r.length>0?r:void 0}function R(e,t){if(e.source===`google`||e.source===`local`)return e.source;if(t&&t.length>0)return`local`;if(`weights`in e||`subsets`in e||`variable`in e||`styles`in e||(0,d.isSetString)(e.family)&&!t)return`google`}function z(t){if(!(0,u.isSetObject)(t))return;let n=`files`in t?L(t.files):void 0,r=R(t,n);if(!r){let n=e.a.safeParse(t);return n.success?n.data:void 0}let i={...t,source:r,...n?{files:n}:{}},a=r===`google`?e.s.partial().safeParse({...i,source:`google`}):e.c.partial().safeParse({...i,source:`local`});if(a.success)return Object.keys(a.data).length>0?a.data:void 0}function B(e){return(0,u.isSetObject)(e)&&`path`in e}async function V(e){let t=(0,l.joinPaths)(e,`package.json`);if(!(0,i.existsSync)(t))return;let n;try{n=await(0,o.readJsonFile)(t)}catch{return}let r={};if((0,d.isSetString)(n.name)&&(r.name=n.name,r.title=n.name),(0,d.isSetString)(n.description)&&(r.description=n.description),Array.isArray(n.keywords)){let e=n.keywords.filter(d.isSetString);e.length>0&&(r.tags=e)}let a=n.razorwind,s;if(B(a)||Array.isArray(a)){let e=L(a);e&&(s={source:`local`,files:e})}else(0,u.isSetObject)(a)&&(s=z(a));let c=k(s??{},r);return Object.keys(c).length>0?c:void 0}async function H(e){let t=(0,l.joinPaths)(e,`font.json`);if(!(0,i.existsSync)(t))return;let n;try{n=await(0,o.readJsonFile)(t)}catch{return}if(B(n)||Array.isArray(n)){let e=L(n);if(e)return{source:`local`,files:e}}return z(n)}function U(e,t,n){return t?.length?t.map(t=>{let n=(0,s.appendPath)(t.path,e);return{...t,path:n,format:t.format??M(t.path)}}):n.map(t=>{let n=F(t);return{path:(0,s.appendPath)(t,e),format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}}})}async function W(t){let n=await V(t),i=await H(t),a=await N(t);if(!n&&!i&&a.length===0)return;let o=k(i??{},n??{}),s=(0,c.findFolderName)(t),l=(0,d.isSetString)(o.name)?o.name:s,u=(0,d.isSetString)(o.title)?o.title:(0,r.titleCase)(l),f=U(t,o.source===`local`?o.files:void 0,a),p=(o.source??(f.length>0?`local`:`google`))===`google`?{...o,source:`google`,name:l,title:u,family:o.family??u}:{...o,source:`local`,name:l,title:u,family:o.family??u,files:f.length>0?f:o.source===`local`?o.files:f},m=e.a.safeParse(p);return m.success?m.data:void 0}function G(e,t,n){let i=I(t)||`font`,a=e[i];if(a?.source===`local`){let t=[...a.files],r=t.findIndex(e=>e.path===n.path);r>=0?t[r]=n:t.push(n),e[i]={...a,files:t};return}a||(e[i]={source:`local`,name:i,title:(0,r.titleCase)(t),family:t,files:[n]})}async function re(e){let t={},n=A(e.options.fontsPath);for(let r of n){let n=ne(e.cwd,r);if(!(!(0,i.existsSync)(n)||!(0,a.isDirectory)(n)))try{let e=await(0,f.readdir)(n,{withFileTypes:!0});for(let r of e){if(r.name.startsWith(`.`))continue;let e=(0,l.joinPaths)(n,r.name);if(r.isDirectory()){let n=await W(e);if(n){let e=t[n.name];t[n.name]=e?k(n,e):n}continue}if(r.isFile()&&j(r.name)){let n=F(r.name);G(t,n.family,{path:e,format:n.format,...n.weight===void 0?{}:{weight:n.weight},...n.style?{style:n.style}:{}})}}}catch{continue}}return t}const K=/@font-face\s*\{([^{}]*)\}/gi,q=/@import\s+(?:url\()?['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\)?\s*;/gi,J=/url\(\s*['"]?(https:\/\/fonts\.googleapis\.com\/css2?\?[^)'"\s]+)['"]?\s*\)/gi,Y=/font-family\s*:\s*([^;]+);/i,X=/font-weight\s*:\s*([^;]+);/i,ie=/font-style\s*:\s*(normal|italic|oblique)/i,ae=/font-display\s*:\s*(auto|block|swap|fallback|optional)/i,oe=/unicode-range\s*:\s*([^;]+);/i,se=/url\(\s*['"]?([^)'"]+)['"]?\s*\)(?:\s*format\(\s*['"]?([\w-]+)['"]?\s*\))?/i;function Z(e){return e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function Q(e){return e.trim().replaceAll(/^['"]|['"]$/g,``).trim()}function $(e){if(!e)return;let t=e.trim(),n=Number.parseInt(t,10);return Number.isNaN(n)?t||void 0:n}function ce(e,t){if(e){let t=e.toLowerCase();if(t===`woff2`||t===`woff`||t===`truetype`||t===`opentype`||t===`svg`)return t}let n=t.split(`.`).pop()?.split(`?`)[0]?.toLowerCase();return n?m[n]:void 0}function le(e,t,n,i){let a=Z(t)||`font`,o=e[a];if(o?.source===`local`){let t=[...o.files],r=t.findIndex(e=>e.path===n.path);r>=0?t[r]=n:t.push(n),e[a]={...o,files:t};return}o||(e[a]={source:`local`,name:a,title:(0,r.titleCase)(t),family:t,...i?{display:i}:{},files:[n]})}function ue(e){let t;try{t=new URL(e)}catch{return[]}let n=t.searchParams.get(`display`),i=n===`auto`||n===`block`||n===`swap`||n===`fallback`||n===`optional`?n:void 0,a=t.searchParams.getAll(`family`),o=[];for(let e of a){let[t,n]=e.split(`:`),a=(t??``).replaceAll(`+`,` `).trim();if(!a)continue;let s=Z(a),c=[],l=new Set,u=!1;if(n){let[e,t]=n.split(`@`),r=(e??``).split(`,`),i=r.indexOf(`ital`),a=r.indexOf(`wght`),o=(t??``).split(`;`).filter(Boolean);for(let e of o){let t=e.split(`,`);i>=0&&t[i]===`1`?l.add(`italic`):l.add(`normal`);let n=a>=0?t[a]:t[0];if(n?.includes(`..`)){u=!0;let[e,t]=n.split(`..`);e&&c.push(e),t&&c.push(t)}else{let e=$(n);e!==void 0&&!c.includes(e)&&c.push(e)}}}o.push({source:`google`,name:s||`font`,title:(0,r.titleCase)(a),family:a,...i?{display:i}:{},...c.length>0?{weights:c}:{},...l.size>0?{styles:[...l]}:{},...u?{variable:!0}:{}})}return o}function de(e){let t=new Set;for(let n of e.matchAll(q))n[1]&&t.add(n[1]);for(let n of e.matchAll(J))n[1]&&t.add(n[1]);return[...t]}function fe(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``),n={};for(let e of de(t))for(let t of ue(e))n[t.name]??=t;for(let e of t.matchAll(K)){let t=e[1]??``,r=Q(Y.exec(t)?.[1]??``);if(!r)continue;let i=se.exec(t),a=i?.[1];if(!a||a.includes(`fonts.googleapis.com`))continue;let o={path:a,format:ce(i?.[2],a),weight:$(X.exec(t)?.[1]),style:ie.exec(t)?.[1],unicodeRange:oe.exec(t)?.[1]?.trim()},s=ae.exec(t)?.[1];le(n,r,o,s)}return n}function pe(e){return!e||Object.keys(e).length===0}function me(e,t){let n={...e??{}};for(let[e,r]of Object.entries(t??{}))n[e]??=r;return n}function he(e,t){if(!e)return;let n=Array.isArray(t)?t:[t];for(let t of n){let n=Object.values(e).find(e=>e.role===t);if(n)return n}}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return _}});
@@ -1,8 +1,8 @@
1
- import { t as Schema } from "./schema-Crr8KMUY.cjs";
2
- import "./index-DovYOOtL.cjs";
3
- import { l as Plugin, t as Config } from "./config-BjuUx31T.cjs";
4
- import { Tokens } from "@power-plant/dtcg-schema";
1
+ import { t as Schema } from "./schema-BwOBgJIM.mjs";
2
+ import "./index-D5L2WXYk.mjs";
3
+ import { l as Plugin, t as Config } from "./config-B1rsPTVV.mjs";
5
4
  import { ExecutionContext } from "@power-plant/core";
5
+ import { Tokens } from "@power-plant/dtcg-schema";
6
6
  import { Hooks, LogConfig, Parser, PreprocessedTokens } from "style-dictionary/types";
7
7
  //#region src/lib/tokens/constants.d.ts
8
8
  /** Style Dictionary parser hook names registered by Razorwind. */
@@ -21,6 +21,14 @@ declare const TOKEN_DIRECTORY_GLOB: string;
21
21
  declare const THEME_BASENAME_PATTERN: RegExp;
22
22
  /** Path segment hints used when inferring `$type`. */
23
23
  declare const TYPE_PATH_HINTS: Record<string, string>;
24
+ /**
25
+ * Non-DTCG `$type` aliases rewritten to canonical types during normalize.
26
+ * Distinct from {@link TYPE_PATH_HINTS}: path hints must not remap valid DTCG
27
+ * types such as `border` or `transition`.
28
+ */
29
+ declare const TYPE_ALIASES: Record<string, string>;
30
+ /** Map a token `$type` alias onto its canonical DTCG type. */
31
+ declare function canonicalizeTokenType(type: string): string;
24
32
  //#endregion
25
33
  //#region src/lib/tokens/css.d.ts
26
34
  /**
@@ -199,5 +207,5 @@ declare function registerRazorwindHooks(plugins?: Plugin[], target?: StyleDictio
199
207
  */
200
208
  declare const registerRazorwindParsers: typeof registerRazorwindHooks;
201
209
  //#endregion
202
- export { TOKEN_FILE_EXTENSIONS as A, nestFlatTokens as C, RazorwindParserName as D, DEFAULT_TOKEN_PATH_CANDIDATES as E, TYPE_PATH_HINTS as M, THEME_BASENAME_PATTERN as O, inferValue as S, parseCssCustomProperties as T, ResolvedTokensSource as _, getRazorwindParserHooks as a, InferredTokenType as b, registerRazorwindHooks as c, LoadTokensOptions as d, LoadedTokens as f, ResolveTokensPathOptions as g, loadTokensOrThrow as h, getExtractionHooks as i, TOKEN_PARSER_NAMES as j, TOKEN_DIRECTORY_GLOB as k, registerRazorwindParsers as l, loadTokens as m, RAZORWIND_INFER_PREPROCESSOR as n, getRazorwindPreprocessorHooks as o, isEmptyTokens as p, StyleDictionaryRegisterTarget as r, razorwindInferPreprocessor as s, ExtractionHooks as t, styleDictionaryLogOptions as u, resolveTokensSource as v, normalizeTokenTree as w, inferTypeFromPath as x, themeKeyFromPath as y };
203
- //# sourceMappingURL=index-DXx1b3vZ.d.cts.map
210
+ export { TOKEN_FILE_EXTENSIONS as A, nestFlatTokens as C, RazorwindParserName as D, DEFAULT_TOKEN_PATH_CANDIDATES as E, TYPE_ALIASES as M, TYPE_PATH_HINTS as N, THEME_BASENAME_PATTERN as O, canonicalizeTokenType as P, inferValue as S, parseCssCustomProperties as T, ResolvedTokensSource as _, getRazorwindParserHooks as a, InferredTokenType as b, registerRazorwindHooks as c, LoadTokensOptions as d, LoadedTokens as f, ResolveTokensPathOptions as g, loadTokensOrThrow as h, getExtractionHooks as i, TOKEN_PARSER_NAMES as j, TOKEN_DIRECTORY_GLOB as k, registerRazorwindParsers as l, loadTokens as m, RAZORWIND_INFER_PREPROCESSOR as n, getRazorwindPreprocessorHooks as o, isEmptyTokens as p, StyleDictionaryRegisterTarget as r, razorwindInferPreprocessor as s, ExtractionHooks as t, styleDictionaryLogOptions as u, resolveTokensSource as v, normalizeTokenTree as w, inferTypeFromPath as x, themeKeyFromPath as y };
211
+ //# sourceMappingURL=index-52XD5ztc.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-crrCGMN9.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/logging.ts","../src/lib/tokens/parsers.ts"],"mappings":""}
1
+ {"version":3,"file":"index-52XD5ztc.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/logging.ts","../src/lib/tokens/parsers.ts"],"mappings":""}
@@ -1,3 +1,3 @@
1
- import "./schema-Crr8KMUY.cjs";
1
+ import "./schema-BwOBgJIM.cjs";
2
2
  import { Token, Tokens as Tokens$1, tokenSchema, tokensSchema } from "@power-plant/dtcg-schema";
3
3
  export { tokensSchema as i, Tokens$1 as n, tokenSchema as r, Token as t };
@@ -1,3 +1,3 @@
1
- import "./schema-Crr8KMUY.mjs";
1
+ import "./schema-BwOBgJIM.mjs";
2
2
  import { Token, Tokens as Tokens$1, tokenSchema, tokensSchema as tokensSchema$1 } from "@power-plant/dtcg-schema";
3
3
  export { tokensSchema$1 as i, Tokens$1 as n, tokenSchema as r, Token as t };
@@ -1,6 +1,6 @@
1
- import { t as Schema } from "./schema-Crr8KMUY.mjs";
2
- import "./index-ktFi0nZL.mjs";
3
- import { l as Plugin, t as Config } from "./config-CEPqgKnD.mjs";
1
+ import { t as Schema } from "./schema-BwOBgJIM.cjs";
2
+ import "./index-CwN0c1Q4.cjs";
3
+ import { l as Plugin, t as Config } from "./config-jPfyBr8C.cjs";
4
4
  import { ExecutionContext } from "@power-plant/core";
5
5
  import { Tokens } from "@power-plant/dtcg-schema";
6
6
  import { Hooks, LogConfig, Parser, PreprocessedTokens } from "style-dictionary/types";
@@ -21,6 +21,14 @@ declare const TOKEN_DIRECTORY_GLOB: string;
21
21
  declare const THEME_BASENAME_PATTERN: RegExp;
22
22
  /** Path segment hints used when inferring `$type`. */
23
23
  declare const TYPE_PATH_HINTS: Record<string, string>;
24
+ /**
25
+ * Non-DTCG `$type` aliases rewritten to canonical types during normalize.
26
+ * Distinct from {@link TYPE_PATH_HINTS}: path hints must not remap valid DTCG
27
+ * types such as `border` or `transition`.
28
+ */
29
+ declare const TYPE_ALIASES: Record<string, string>;
30
+ /** Map a token `$type` alias onto its canonical DTCG type. */
31
+ declare function canonicalizeTokenType(type: string): string;
24
32
  //#endregion
25
33
  //#region src/lib/tokens/css.d.ts
26
34
  /**
@@ -199,5 +207,5 @@ declare function registerRazorwindHooks(plugins?: Plugin[], target?: StyleDictio
199
207
  */
200
208
  declare const registerRazorwindParsers: typeof registerRazorwindHooks;
201
209
  //#endregion
202
- export { TOKEN_FILE_EXTENSIONS as A, nestFlatTokens as C, RazorwindParserName as D, DEFAULT_TOKEN_PATH_CANDIDATES as E, TYPE_PATH_HINTS as M, THEME_BASENAME_PATTERN as O, inferValue as S, parseCssCustomProperties as T, ResolvedTokensSource as _, getRazorwindParserHooks as a, InferredTokenType as b, registerRazorwindHooks as c, LoadTokensOptions as d, LoadedTokens as f, ResolveTokensPathOptions as g, loadTokensOrThrow as h, getExtractionHooks as i, TOKEN_PARSER_NAMES as j, TOKEN_DIRECTORY_GLOB as k, registerRazorwindParsers as l, loadTokens as m, RAZORWIND_INFER_PREPROCESSOR as n, getRazorwindPreprocessorHooks as o, isEmptyTokens as p, StyleDictionaryRegisterTarget as r, razorwindInferPreprocessor as s, ExtractionHooks as t, styleDictionaryLogOptions as u, resolveTokensSource as v, normalizeTokenTree as w, inferTypeFromPath as x, themeKeyFromPath as y };
203
- //# sourceMappingURL=index-crrCGMN9.d.mts.map
210
+ export { TOKEN_FILE_EXTENSIONS as A, nestFlatTokens as C, RazorwindParserName as D, DEFAULT_TOKEN_PATH_CANDIDATES as E, TYPE_ALIASES as M, TYPE_PATH_HINTS as N, THEME_BASENAME_PATTERN as O, canonicalizeTokenType as P, inferValue as S, parseCssCustomProperties as T, ResolvedTokensSource as _, getRazorwindParserHooks as a, InferredTokenType as b, registerRazorwindHooks as c, LoadTokensOptions as d, LoadedTokens as f, ResolveTokensPathOptions as g, loadTokensOrThrow as h, getExtractionHooks as i, TOKEN_PARSER_NAMES as j, TOKEN_DIRECTORY_GLOB as k, registerRazorwindParsers as l, loadTokens as m, RAZORWIND_INFER_PREPROCESSOR as n, getRazorwindPreprocessorHooks as o, isEmptyTokens as p, StyleDictionaryRegisterTarget as r, razorwindInferPreprocessor as s, ExtractionHooks as t, styleDictionaryLogOptions as u, resolveTokensSource as v, normalizeTokenTree as w, inferTypeFromPath as x, themeKeyFromPath as y };
211
+ //# sourceMappingURL=index-D6x2Pe2v.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D6x2Pe2v.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/logging.ts","../src/lib/tokens/parsers.ts"],"mappings":";;;;;;;;cAmBa;KAOD,8BAA8B;;cAG7B;;;;;cAsBA;;cAyBA;;cAGA,wBAAsB;;cAItB,iBAAiB;;;;;;cAkEjB,cAAc;;iBAmCX,sBAAsB;;;;;;;iBC5JtB,yBACd,mBACC;;;KCgCS;;;;iBA+DI,kBACd,iBACC;;;;iBAiBa,WACd,cACA;EACG;EAAgB,OAAO;;;;;iBA0PZ,mBACd,gBACA;;;;;;;;iBA6Cc,eACd,MAAM,0BACL;;;UChac;;;;EAIf;;;;EAKA;;;;EAKA,gBAAgB;;UAGD;;;;;;;EAOf;;;;EAKA;;;;EAKA;;;;;;;;;iBAyHc,oBACd,SAAS,2BACR;;;;iBAqFa,iBAAiB;;;UCrNhB,0BAA0B;;;;;;EAMzC;;KAGU,eAAe,SAAS,eAAe;iBAEnC,cAAc;;;;;;;;;iBA6IR,WACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;;;;;iBAsCW,kBACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;;;;;;;;iBC9NK,0BAA0B;EACxC,YAAY;;;;;cCGD;;UAGI;EACf,kBAAkB,QAAQ;EAC1B,wBAAwB;IACtB;IACA,cAAc,YAAY;;;;UAKb;EACf,SAAS,YAAY;EACrB,eAAe,YAAY;EAC3B;EACA;;;iBAwEc,2BAA2B,YAAY;;;;;iBAavC,2BACd,YAAY,qBACX;;iBAKa,iCAAiC,YAC/C;;;;;;;iBAac,mBAAmB,UAAS,WAAgB;;;;;;;;;;;;;;iBA0D5C,uBACd,UAAS,UACT,SAAQ,gCACP;;;;cAqBU,iCAAwB"}
@@ -1,6 +1,6 @@
1
- import { d as FontFile, f as FontFileFormat, h as GoogleFont, l as Font, m as Fonts, p as FontRole, t as Schema } from "./schema-Crr8KMUY.mjs";
2
- import "./index-ktFi0nZL.mjs";
3
- import { t as Config } from "./config-CEPqgKnD.mjs";
1
+ import { d as FontFile, f as FontFileFormat, h as GoogleFont, l as Font, m as Fonts, p as FontRole, t as Schema } from "./schema-BwOBgJIM.cjs";
2
+ import "./index-CwN0c1Q4.cjs";
3
+ import { t as Config } from "./config-jPfyBr8C.cjs";
4
4
  import { ExecutionContext } from "@power-plant/core";
5
5
  //#region src/lib/fonts/constants.d.ts
6
6
  declare const FONT_EXTENSIONS: Set<string>;
@@ -97,4 +97,4 @@ declare function mergeFonts(base: Fonts | undefined, extra: Fonts | undefined):
97
97
  declare function pickFontByRole(fonts: Fonts | undefined, roles: Font["role"] | Array<NonNullable<Font["role"]>>): Font | undefined;
98
98
  //#endregion
99
99
  export { WEIGHT_FROM_SUFFIX as S, FONT_EXTENSIONS as _, ParsedFontFilename as a, MONO_ROLES as b, RenderFontCssOptions as c, prependFontCss as d, renderFontCss as f, copyFontFiles as g, toGoogleFontsCssUrl as h, pickFontByRole as i, cssFontFamily as l, renderLocalFontFaces as m, mergeFonts as n, loadFonts as o, renderGoogleFontImports as p, parseCssFonts as r, parseFontFilename as s, isEmptyFonts as t, fontFamilyName as u, FONT_FORMAT_FROM_EXTENSION as v, SANS_ROLES as x, GENERIC_FALLBACK_FROM_ROLE as y };
100
- //# sourceMappingURL=index-D7VrdiAn.d.mts.map
100
+ //# sourceMappingURL=index-VmrytwDm.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DNAWtBG8.d.cts","names":[],"sources":["../src/lib/fonts/constants.ts","../src/lib/fonts/copy.ts","../src/lib/fonts/css.ts","../src/lib/fonts/load.ts","../src/lib/fonts/parse.ts"],"mappings":";;;;;cAoBa,iBAAe;cASf,4BAA4B,eAAe;cAS3C,oBAAoB;cAoBpB,4BAA4B,OAAO;cAUnC,YAAY;cACZ,YAAY;;;;;;;;iBCzCH,cACpB,OAAO,mBACP,kBACC;;;UCDc;;;;;;EAMf;;;;;iBAmBc,eAAe,MAAM;;;;;iBAQrB,cAAc,MAAM;;;;;;;iBA0BpB,oBAAoB,MAAM;;;;iBAmF1B,wBAAwB,OAAO;;;;iBAU/B,qBACd,OAAO,OACP,UAAS;;;;iBAaK,cACd,OAAO,OACP,UAAS;;;;iBAUK,eACd,aACA,OAAO,mBACP,UAAS;;;UCxGM;EACf;EACA;EACA,QAAQ;EACR,SAAS;;;;;;iBAOK,kBAAkB,mBAAmB;;;;;;;;iBA0U/B,UACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;iBCnNK,cAAc,mBAAmB;iBAuCjC,aAAa,OAAO;;;;iBAOpB,WACd,MAAM,mBACN,OAAO,oBACN;;;;iBAaa,eACd,OAAO,mBACP,OAAO,eAAe,MAAM,YAAY,iBACvC"}
1
+ {"version":3,"file":"index-VmrytwDm.d.cts","names":[],"sources":["../src/lib/fonts/constants.ts","../src/lib/fonts/copy.ts","../src/lib/fonts/css.ts","../src/lib/fonts/load.ts","../src/lib/fonts/parse.ts"],"mappings":";;;;;cAoBa,iBAAe;cASf,4BAA4B,eAAe;cAS3C,oBAAoB;cAoBpB,4BAA4B,OAAO;cAUnC,YAAY;cACZ,YAAY;;;;;;;;iBCzCH,cACpB,OAAO,mBACP,kBACC;;;UCDc;;;;;;EAMf;;;;;iBAmBc,eAAe,MAAM;;;;;iBAQrB,cAAc,MAAM;;;;;;;iBA0BpB,oBAAoB,MAAM;;;;iBAmF1B,wBAAwB,OAAO;;;;iBAU/B,qBACd,OAAO,OACP,UAAS;;;;iBAaK,cACd,OAAO,OACP,UAAS;;;;iBAUK,eACd,aACA,OAAO,mBACP,UAAS;;;UCxGM;EACf;EACA;EACA,QAAQ;EACR,SAAS;;;;;;iBAOK,kBAAkB,mBAAmB;;;;;;;;iBA0U/B,UACpB,SAAS,iBAAiB,QAAQ,gBACjC,QAAQ;;;;;;iBCnNK,cAAc,mBAAmB;iBAuCjC,aAAa,OAAO;;;;iBAOpB,WACd,MAAM,mBACN,OAAO,oBACN;;;;iBAaa,eACd,OAAO,mBACP,OAAO,eAAe,MAAM,YAAY,iBACvC"}
@@ -1,6 +1,6 @@
1
- import { d as FontFile, f as FontFileFormat, h as GoogleFont, l as Font, m as Fonts, p as FontRole, t as Schema } from "./schema-Crr8KMUY.cjs";
2
- import "./index-DovYOOtL.cjs";
3
- import { t as Config } from "./config-BjuUx31T.cjs";
1
+ import { d as FontFile, f as FontFileFormat, h as GoogleFont, l as Font, m as Fonts, p as FontRole, t as Schema } from "./schema-BwOBgJIM.mjs";
2
+ import "./index-D5L2WXYk.mjs";
3
+ import { t as Config } from "./config-B1rsPTVV.mjs";
4
4
  import { ExecutionContext } from "@power-plant/core";
5
5
  //#region src/lib/fonts/constants.d.ts
6
6
  declare const FONT_EXTENSIONS: Set<string>;
@@ -97,4 +97,4 @@ declare function mergeFonts(base: Fonts | undefined, extra: Fonts | undefined):
97
97
  declare function pickFontByRole(fonts: Fonts | undefined, roles: Font["role"] | Array<NonNullable<Font["role"]>>): Font | undefined;
98
98
  //#endregion
99
99
  export { WEIGHT_FROM_SUFFIX as S, FONT_EXTENSIONS as _, ParsedFontFilename as a, MONO_ROLES as b, RenderFontCssOptions as c, prependFontCss as d, renderFontCss as f, copyFontFiles as g, toGoogleFontsCssUrl as h, pickFontByRole as i, cssFontFamily as l, renderLocalFontFaces as m, mergeFonts as n, loadFonts as o, renderGoogleFontImports as p, parseCssFonts as r, parseFontFilename as s, isEmptyFonts as t, fontFamilyName as u, FONT_FORMAT_FROM_EXTENSION as v, SANS_ROLES as x, GENERIC_FALLBACK_FROM_ROLE as y };
100
- //# sourceMappingURL=index-DNAWtBG8.d.cts.map
100
+ //# sourceMappingURL=index-nRnX_NsH.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D7VrdiAn.d.mts","names":[],"sources":["../src/lib/fonts/constants.ts","../src/lib/fonts/copy.ts","../src/lib/fonts/css.ts","../src/lib/fonts/load.ts","../src/lib/fonts/parse.ts"],"mappings":""}
1
+ {"version":3,"file":"index-nRnX_NsH.d.mts","names":[],"sources":["../src/lib/fonts/constants.ts","../src/lib/fonts/copy.ts","../src/lib/fonts/css.ts","../src/lib/fonts/load.ts","../src/lib/fonts/parse.ts"],"mappings":""}