@razorwind/design-md 0.0.12 → 0.0.13

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.
@@ -1,3 +1,4 @@
1
+ import { a as __exportAll, n as DesignMdExtractPluginOptions } from "./types-BNWqSKB5.cjs";
1
2
  import { DesignTokens } from "style-dictionary/types";
2
3
  declare namespace extract_d_exports {
3
4
  export { DESIGN_MD_FILE_PATTERN, DESIGN_MD_PATH_CANDIDATES, _default as default, designMdToTokens, extractDesignMdFrontMatter, isDesignMdFile, loadDesignMdTokens, parseDesignMdTokens, resolveDesignMdPath };
@@ -75,7 +76,7 @@ declare function loadDesignMdTokens(cwd: string): Promise<DesignTokens | undefin
75
76
  * });
76
77
  * ```
77
78
  */
78
- declare const _default: (options?: any) => import("@razorwind/core/plugin").Plugin;
79
+ declare const _default: (options?: DesignMdExtractPluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
79
80
  //#endregion
80
81
  export { DESIGN_MD_FILE_PATTERN, DESIGN_MD_PATH_CANDIDATES, _default as default, designMdToTokens, extractDesignMdFrontMatter, isDesignMdFile, loadDesignMdTokens, parseDesignMdTokens, resolveDesignMdPath, extract_d_exports as t };
81
82
  //# sourceMappingURL=extract.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.cts","names":[],"sources":["../src/extract.ts"],"mappings":";;;;;;;;cAkCa,wBAAsB;;cAGtB;;;;;;;;iBA6KG,2BACd,mBACC;;;;;;;;;;;;;;iBAgCa,iBACd,aAAa,0BACZ;;;;;;;;iBAwCa,oBAAoB,mBAAmB;;;;;;;iBAevC,eAAe;;;;;;;iBAUf,oBAAoB;;;;;;;iBAiBd,mBACpB,cACC,QAAQ"}
1
+ {"version":3,"file":"extract.d.cts","names":[],"sources":["../src/extract.ts"],"mappings":";;;;;;;;;cAkCa,wBAAsB;;cAGtB;;;;;;;;iBA6KG,2BACd,mBACC;;;;;;;;;;;;;;iBAgCa,iBACd,aAAa,0BACZ;;;;;;;;iBAwCa,oBAAoB,mBAAmB;;;;;;;iBAevC,eAAe;;;;;;;iBAUf,oBAAoB;;;;;;;iBAiBd,mBACpB,cACC,QAAQ"}
@@ -1,3 +1,4 @@
1
+ import { n as DesignMdExtractPluginOptions } from "./types-9TCb0Dqf.mjs";
1
2
  import { DesignTokens } from "style-dictionary/types";
2
3
  declare namespace extract_d_exports {
3
4
  export { DESIGN_MD_FILE_PATTERN, DESIGN_MD_PATH_CANDIDATES, _default as default, designMdToTokens, extractDesignMdFrontMatter, isDesignMdFile, loadDesignMdTokens, parseDesignMdTokens, resolveDesignMdPath };
@@ -75,7 +76,7 @@ declare function loadDesignMdTokens(cwd: string): Promise<DesignTokens | undefin
75
76
  * });
76
77
  * ```
77
78
  */
78
- declare const _default: (options?: any) => import("@razorwind/core/plugin").Plugin;
79
+ declare const _default: (options?: DesignMdExtractPluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
79
80
  //#endregion
80
81
  export { DESIGN_MD_FILE_PATTERN, DESIGN_MD_PATH_CANDIDATES, _default as default, designMdToTokens, extractDesignMdFrontMatter, isDesignMdFile, loadDesignMdTokens, parseDesignMdTokens, resolveDesignMdPath, extract_d_exports as t };
81
82
  //# sourceMappingURL=extract.d.mts.map
@@ -1,2 +1,54 @@
1
- import { a as renderDesignMd, n as extractDesignMd, o as selectPrimaryTheme, r as generateDesignMd, t as _default } from "./generate-seJLuo7M.cjs";
2
- export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
1
+ import { a as __exportAll, i as FlatToken, r as DesignMdGeneratePluginOptions, t as DesignMdDocument } from "./types-BNWqSKB5.cjs";
2
+ import { GeneratorFunctionResult } from "@power-plant/core";
3
+ import { Schema } from "@razorwind/core/schema";
4
+ declare namespace generate_d_exports {
5
+ export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
6
+ }
7
+ /**
8
+ * Select the token set used for the front matter when tokens are split into
9
+ * multiple themes: the un-themed set first, then `light`, then `default`,
10
+ * then whichever theme appears first.
11
+ */
12
+ declare function selectPrimaryTheme(flat: FlatToken[]): FlatToken[];
13
+ /**
14
+ * Extract a DESIGN.md document from the Razorwind schema.
15
+ *
16
+ * Colors, typography, rounded / spacing scales, and component tokens are
17
+ * derived from the DTCG token tree. DTCG aliases are re-emitted as DESIGN.md
18
+ * `{section.token}` references when the target token is part of the output,
19
+ * or resolved to their terminal CSS value otherwise.
20
+ */
21
+ declare function extractDesignMd(spec: Schema): DesignMdDocument;
22
+ /**
23
+ * Render a complete DESIGN.md file — YAML front matter followed by the
24
+ * markdown body.
25
+ *
26
+ * @see https://github.com/google-labs-code/design.md
27
+ */
28
+ declare function renderDesignMd(document: DesignMdDocument, options?: DesignMdGeneratePluginOptions): string;
29
+ /**
30
+ * Generate a DESIGN.md design-system specification file from a Razorwind
31
+ * schema.
32
+ *
33
+ * @see https://github.com/google-labs-code/design.md
34
+ */
35
+ declare function generateDesignMd(spec: Schema, options?: DesignMdGeneratePluginOptions): GeneratorFunctionResult<Schema, DesignMdGeneratePluginOptions>;
36
+ /**
37
+ * Generate a DESIGN.md design-system specification file from a Razorwind schema.
38
+ *
39
+ * @see https://github.com/google-labs-code/design.md
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { defineConfig } from "@razorwind/core";
44
+ * import designMd from "@razorwind/design-md/generate";
45
+ *
46
+ * export default defineConfig({
47
+ * plugins: [designMd()]
48
+ * });
49
+ * ```
50
+ */
51
+ declare const _default: (options?: DesignMdGeneratePluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
52
+ //#endregion
53
+ export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme, generate_d_exports as t };
54
+ //# sourceMappingURL=generate.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.cts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;;;;;;;iBAoFgB,mBAAmB,MAAM,cAAc;;;;;;;;;iBA6HvC,gBAAgB,MAAM,SAAS;;;;;;;iBAkR/B,eACd,UAAU,kBACV,UAAS;;;;;;;iBAWK,iBACd,MAAM,QACN,UAAS,gCACR,wBAAwB,QAAQ"}
@@ -1,2 +1,54 @@
1
- import { a as renderDesignMd, n as extractDesignMd, o as selectPrimaryTheme, r as generateDesignMd, t as _default } from "./generate-seJLuo7M.mjs";
2
- export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
1
+ import { i as FlatToken, r as DesignMdGeneratePluginOptions, t as DesignMdDocument } from "./types-9TCb0Dqf.mjs";
2
+ import { GeneratorFunctionResult } from "@power-plant/core";
3
+ import { Schema } from "@razorwind/core/schema";
4
+ declare namespace generate_d_exports {
5
+ export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
6
+ }
7
+ /**
8
+ * Select the token set used for the front matter when tokens are split into
9
+ * multiple themes: the un-themed set first, then `light`, then `default`,
10
+ * then whichever theme appears first.
11
+ */
12
+ declare function selectPrimaryTheme(flat: FlatToken[]): FlatToken[];
13
+ /**
14
+ * Extract a DESIGN.md document from the Razorwind schema.
15
+ *
16
+ * Colors, typography, rounded / spacing scales, and component tokens are
17
+ * derived from the DTCG token tree. DTCG aliases are re-emitted as DESIGN.md
18
+ * `{section.token}` references when the target token is part of the output,
19
+ * or resolved to their terminal CSS value otherwise.
20
+ */
21
+ declare function extractDesignMd(spec: Schema): DesignMdDocument;
22
+ /**
23
+ * Render a complete DESIGN.md file — YAML front matter followed by the
24
+ * markdown body.
25
+ *
26
+ * @see https://github.com/google-labs-code/design.md
27
+ */
28
+ declare function renderDesignMd(document: DesignMdDocument, options?: DesignMdGeneratePluginOptions): string;
29
+ /**
30
+ * Generate a DESIGN.md design-system specification file from a Razorwind
31
+ * schema.
32
+ *
33
+ * @see https://github.com/google-labs-code/design.md
34
+ */
35
+ declare function generateDesignMd(spec: Schema, options?: DesignMdGeneratePluginOptions): GeneratorFunctionResult<Schema, DesignMdGeneratePluginOptions>;
36
+ /**
37
+ * Generate a DESIGN.md design-system specification file from a Razorwind schema.
38
+ *
39
+ * @see https://github.com/google-labs-code/design.md
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { defineConfig } from "@razorwind/core";
44
+ * import designMd from "@razorwind/design-md/generate";
45
+ *
46
+ * export default defineConfig({
47
+ * plugins: [designMd()]
48
+ * });
49
+ * ```
50
+ */
51
+ declare const _default: (options?: DesignMdGeneratePluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
52
+ //#endregion
53
+ export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme, generate_d_exports as t };
54
+ //# sourceMappingURL=generate.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":""}
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as extract_d_exports } from "./extract.cjs";
2
- import { i as generate_d_exports } from "./generate-seJLuo7M.cjs";
2
+ import { t as generate_d_exports } from "./generate.cjs";
3
3
  export { extract_d_exports as extract, generate_d_exports as generate };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as extract_d_exports } from "./extract.mjs";
2
- import { i as generate_d_exports } from "./generate-seJLuo7M.mjs";
2
+ import { t as generate_d_exports } from "./generate.mjs";
3
3
  export { extract_d_exports as extract, generate_d_exports as generate };
@@ -1,7 +1,13 @@
1
- import { GeneratorFunctionResult } from "@power-plant/core";
2
- import { Schema } from "@razorwind/core/schema";
3
1
  import { TokenType } from "@power-plant/dtcg-schema";
4
2
  //#region src/types.d.ts
3
+ interface DesignMdExtractPluginOptions {
4
+ /**
5
+ * The path to the DESIGN.md file.
6
+ *
7
+ * @default "DESIGN.md"
8
+ */
9
+ path?: string;
10
+ }
5
11
  interface DesignMdGeneratePluginOptions {
6
12
  /**
7
13
  * Output file path (relative to the execution cwd).
@@ -81,54 +87,6 @@ interface DesignMdDocument {
81
87
  spacing: Record<string, string>;
82
88
  components: Record<string, ComponentToken>;
83
89
  }
84
- declare namespace generate_d_exports {
85
- export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
86
- }
87
- /**
88
- * Select the token set used for the front matter when tokens are split into
89
- * multiple themes: the un-themed set first, then `light`, then `default`,
90
- * then whichever theme appears first.
91
- */
92
- declare function selectPrimaryTheme(flat: FlatToken[]): FlatToken[];
93
- /**
94
- * Extract a DESIGN.md document from the Razorwind schema.
95
- *
96
- * Colors, typography, rounded / spacing scales, and component tokens are
97
- * derived from the DTCG token tree. DTCG aliases are re-emitted as DESIGN.md
98
- * `{section.token}` references when the target token is part of the output,
99
- * or resolved to their terminal CSS value otherwise.
100
- */
101
- declare function extractDesignMd(spec: Schema): DesignMdDocument;
102
- /**
103
- * Render a complete DESIGN.md file — YAML front matter followed by the
104
- * markdown body.
105
- *
106
- * @see https://github.com/google-labs-code/design.md
107
- */
108
- declare function renderDesignMd(document: DesignMdDocument, options?: DesignMdGeneratePluginOptions): string;
109
- /**
110
- * Generate a DESIGN.md design-system specification file from a Razorwind
111
- * schema.
112
- *
113
- * @see https://github.com/google-labs-code/design.md
114
- */
115
- declare function generateDesignMd(spec: Schema, options?: DesignMdGeneratePluginOptions): GeneratorFunctionResult<Schema, DesignMdGeneratePluginOptions>;
116
- /**
117
- * Generate a DESIGN.md design-system specification file from a Razorwind schema.
118
- *
119
- * @see https://github.com/google-labs-code/design.md
120
- *
121
- * @example
122
- * ```ts
123
- * import { defineConfig } from "@razorwind/core";
124
- * import designMd from "@razorwind/design-md/generate";
125
- *
126
- * export default defineConfig({
127
- * plugins: [designMd()]
128
- * });
129
- * ```
130
- */
131
- declare const _default: (options?: any) => import("@razorwind/core/plugin").Plugin;
132
90
  //#endregion
133
- export { renderDesignMd as a, generate_d_exports as i, extractDesignMd as n, selectPrimaryTheme as o, generateDesignMd as r, _default as t };
134
- //# sourceMappingURL=generate-seJLuo7M.d.cts.map
91
+ export { FlatToken as i, DesignMdExtractPluginOptions as n, DesignMdGeneratePluginOptions as r, DesignMdDocument as t };
92
+ //# sourceMappingURL=types-9TCb0Dqf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-9TCb0Dqf.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
@@ -1,7 +1,14 @@
1
- import { GeneratorFunctionResult } from "@power-plant/core";
2
- import { Schema } from "@razorwind/core/schema";
3
1
  import { TokenType } from "@power-plant/dtcg-schema";
2
+ //#endregion
4
3
  //#region src/types.d.ts
4
+ interface DesignMdExtractPluginOptions {
5
+ /**
6
+ * The path to the DESIGN.md file.
7
+ *
8
+ * @default "DESIGN.md"
9
+ */
10
+ path?: string;
11
+ }
5
12
  interface DesignMdGeneratePluginOptions {
6
13
  /**
7
14
  * Output file path (relative to the execution cwd).
@@ -81,54 +88,6 @@ interface DesignMdDocument {
81
88
  spacing: Record<string, string>;
82
89
  components: Record<string, ComponentToken>;
83
90
  }
84
- declare namespace generate_d_exports {
85
- export { _default as default, extractDesignMd, generateDesignMd, renderDesignMd, selectPrimaryTheme };
86
- }
87
- /**
88
- * Select the token set used for the front matter when tokens are split into
89
- * multiple themes: the un-themed set first, then `light`, then `default`,
90
- * then whichever theme appears first.
91
- */
92
- declare function selectPrimaryTheme(flat: FlatToken[]): FlatToken[];
93
- /**
94
- * Extract a DESIGN.md document from the Razorwind schema.
95
- *
96
- * Colors, typography, rounded / spacing scales, and component tokens are
97
- * derived from the DTCG token tree. DTCG aliases are re-emitted as DESIGN.md
98
- * `{section.token}` references when the target token is part of the output,
99
- * or resolved to their terminal CSS value otherwise.
100
- */
101
- declare function extractDesignMd(spec: Schema): DesignMdDocument;
102
- /**
103
- * Render a complete DESIGN.md file — YAML front matter followed by the
104
- * markdown body.
105
- *
106
- * @see https://github.com/google-labs-code/design.md
107
- */
108
- declare function renderDesignMd(document: DesignMdDocument, options?: DesignMdGeneratePluginOptions): string;
109
- /**
110
- * Generate a DESIGN.md design-system specification file from a Razorwind
111
- * schema.
112
- *
113
- * @see https://github.com/google-labs-code/design.md
114
- */
115
- declare function generateDesignMd(spec: Schema, options?: DesignMdGeneratePluginOptions): GeneratorFunctionResult<Schema, DesignMdGeneratePluginOptions>;
116
- /**
117
- * Generate a DESIGN.md design-system specification file from a Razorwind schema.
118
- *
119
- * @see https://github.com/google-labs-code/design.md
120
- *
121
- * @example
122
- * ```ts
123
- * import { defineConfig } from "@razorwind/core";
124
- * import designMd from "@razorwind/design-md/generate";
125
- *
126
- * export default defineConfig({
127
- * plugins: [designMd()]
128
- * });
129
- * ```
130
- */
131
- declare const _default: (options?: any) => import("@razorwind/core/plugin").Plugin;
132
91
  //#endregion
133
- export { renderDesignMd as a, generate_d_exports as i, extractDesignMd as n, selectPrimaryTheme as o, generateDesignMd as r, _default as t };
134
- //# sourceMappingURL=generate-seJLuo7M.d.mts.map
92
+ export { __exportAll as a, FlatToken as i, DesignMdExtractPluginOptions as n, DesignMdGeneratePluginOptions as r, DesignMdDocument as t };
93
+ //# sourceMappingURL=types-BNWqSKB5.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BNWqSKB5.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;UAoBiB;;;;;;EAMf;;UAGe;;;;;;EAMf;;;;;;EAOA;;;;EAKA;;;;;;EAOA;;;;;EAMA;;;;;UAMe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;;;;;UAOe;EACf;EACA;EACA;EACA;EACA;;;;;;;KAQU,iBAAiB;;;;;UAMZ;EACf;EACA;EACA;EACA,QAAQ;;EAER,mBAAmB;EACnB,YAAY,eAAe;EAC3B,SAAS;EACT,SAAS;EACT,YAAY,eAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razorwind/design-md",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "description": "Razorwind DESIGN.md plugin that can create a DESIGN.md design-system specification file from design tokens or read a DESIGN.md file and return the design-system specification.",
6
6
  "repository": {
@@ -80,7 +80,7 @@
80
80
  "dependencies": {
81
81
  "@power-plant/core": "^0.0.61",
82
82
  "@power-plant/dtcg-schema": "^0.0.1",
83
- "@razorwind/core": "^0.0.16",
83
+ "@razorwind/core": "^0.0.17",
84
84
  "@stryke/fs": "^0.33.100",
85
85
  "@stryke/path": "^0.29.26",
86
86
  "@stryke/type-checks": "^0.6.32",
@@ -93,5 +93,5 @@
93
93
  "typescript": "^6.0.3"
94
94
  },
95
95
  "publishConfig": { "access": "public" },
96
- "gitHead": "6055ce9d20a4488ee965a471c76c51380e2e85af"
96
+ "gitHead": "3cc5b85aebb2434cd4395b99e9cab9b9223ff6db"
97
97
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-seJLuo7M.d.cts","names":[],"sources":["../src/types.ts","../src/generate.ts"],"mappings":";;;;UA6BiB;;;;;;EAMf;;;;;;EAOA;;;;EAKA;;;;;;EAOA;;;;;EAMA;;;;;UAMe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;;;;;UAOe;EACf;EACA;EACA;EACA;EACA;;;;;;;KAQU,iBAAiB;;;;;UAMZ;EACf;EACA;EACA;EACA,QAAQ;;EAER,mBAAmB;EACnB,YAAY,eAAe;EAC3B,SAAS;EACT,SAAS;EACT,YAAY,eAAe;;;;;;;;;;iBC9Bb,mBAAmB,MAAM,cAAc;;;;;;;;;iBA6HvC,gBAAgB,MAAM,SAAS;;;;;;;iBAkR/B,eACd,UAAU,kBACV,UAAS;;;;;;;iBAWK,iBACd,MAAM,QACN,UAAS,gCACR,wBAAwB,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-seJLuo7M.d.mts","names":[],"sources":["../src/types.ts","../src/generate.ts"],"mappings":""}