@refrakt-md/cli 0.4.0 → 0.5.1

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 (87) hide show
  1. package/dist/bin.js +499 -9
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/contracts.d.ts +6 -0
  4. package/dist/commands/contracts.d.ts.map +1 -0
  5. package/dist/commands/contracts.js +41 -0
  6. package/dist/commands/contracts.js.map +1 -0
  7. package/dist/commands/edit.d.ts +8 -0
  8. package/dist/commands/edit.d.ts.map +1 -0
  9. package/dist/commands/edit.js +100 -0
  10. package/dist/commands/edit.js.map +1 -0
  11. package/dist/commands/extract.d.ts +10 -0
  12. package/dist/commands/extract.d.ts.map +1 -0
  13. package/dist/commands/extract.js +158 -0
  14. package/dist/commands/extract.js.map +1 -0
  15. package/dist/commands/inspect.d.ts +33 -0
  16. package/dist/commands/inspect.d.ts.map +1 -0
  17. package/dist/commands/inspect.js +269 -0
  18. package/dist/commands/inspect.js.map +1 -0
  19. package/dist/commands/scaffold-css.d.ts +6 -0
  20. package/dist/commands/scaffold-css.d.ts.map +1 -0
  21. package/dist/commands/scaffold-css.js +113 -0
  22. package/dist/commands/scaffold-css.js.map +1 -0
  23. package/dist/commands/theme.d.ts +10 -0
  24. package/dist/commands/theme.d.ts.map +1 -0
  25. package/dist/commands/theme.js +160 -0
  26. package/dist/commands/theme.js.map +1 -0
  27. package/dist/commands/validate.d.ts +6 -0
  28. package/dist/commands/validate.d.ts.map +1 -0
  29. package/dist/commands/validate.js +70 -0
  30. package/dist/commands/validate.js.map +1 -0
  31. package/dist/commands/write.d.ts +7 -0
  32. package/dist/commands/write.d.ts.map +1 -1
  33. package/dist/commands/write.js +66 -10
  34. package/dist/commands/write.js.map +1 -1
  35. package/dist/config-file.d.ts +15 -0
  36. package/dist/config-file.d.ts.map +1 -0
  37. package/dist/config-file.js +47 -0
  38. package/dist/config-file.js.map +1 -0
  39. package/dist/config.d.ts +2 -1
  40. package/dist/config.d.ts.map +1 -1
  41. package/dist/config.js +30 -2
  42. package/dist/config.js.map +1 -1
  43. package/dist/extractors/index.d.ts +3 -0
  44. package/dist/extractors/index.d.ts.map +1 -0
  45. package/dist/extractors/index.js +15 -0
  46. package/dist/extractors/index.js.map +1 -0
  47. package/dist/extractors/python.d.ts +6 -0
  48. package/dist/extractors/python.d.ts.map +1 -0
  49. package/dist/extractors/python.js +8 -0
  50. package/dist/extractors/python.js.map +1 -0
  51. package/dist/extractors/types.d.ts +55 -0
  52. package/dist/extractors/types.d.ts.map +1 -0
  53. package/dist/extractors/types.js +2 -0
  54. package/dist/extractors/types.js.map +1 -0
  55. package/dist/extractors/typescript.d.ts +28 -0
  56. package/dist/extractors/typescript.d.ts.map +1 -0
  57. package/dist/extractors/typescript.js +566 -0
  58. package/dist/extractors/typescript.js.map +1 -0
  59. package/dist/lib/css-audit.d.ts +23 -0
  60. package/dist/lib/css-audit.d.ts.map +1 -0
  61. package/dist/lib/css-audit.js +99 -0
  62. package/dist/lib/css-audit.js.map +1 -0
  63. package/dist/lib/css-resolve.d.ts +20 -0
  64. package/dist/lib/css-resolve.d.ts.map +1 -0
  65. package/dist/lib/css-resolve.js +57 -0
  66. package/dist/lib/css-resolve.js.map +1 -0
  67. package/dist/lib/fixtures.d.ts +10 -0
  68. package/dist/lib/fixtures.d.ts.map +1 -0
  69. package/dist/lib/fixtures.js +356 -0
  70. package/dist/lib/fixtures.js.map +1 -0
  71. package/dist/lib/format.d.ts +35 -0
  72. package/dist/lib/format.d.ts.map +1 -0
  73. package/dist/lib/format.js +215 -0
  74. package/dist/lib/format.js.map +1 -0
  75. package/dist/lib/layout-generator.d.ts +8 -0
  76. package/dist/lib/layout-generator.d.ts.map +1 -0
  77. package/dist/lib/layout-generator.js +22 -0
  78. package/dist/lib/layout-generator.js.map +1 -0
  79. package/dist/lib/symbol-generator.d.ts +14 -0
  80. package/dist/lib/symbol-generator.d.ts.map +1 -0
  81. package/dist/lib/symbol-generator.js +202 -0
  82. package/dist/lib/symbol-generator.js.map +1 -0
  83. package/dist/lib/variants.d.ts +17 -0
  84. package/dist/lib/variants.d.ts.map +1 -0
  85. package/dist/lib/variants.js +32 -0
  86. package/dist/lib/variants.js.map +1 -0
  87. package/package.json +9 -3
@@ -0,0 +1,99 @@
1
+ import postcss from 'postcss';
2
+ const RF_CLASS_RE = /\.rf-[\w-]+/g;
3
+ const DATA_ATTR_RE = /\[data-[\w-]+(?:="[^"]*")?\]/g;
4
+ /** Parse a CSS file and extract all .rf-* class selectors and [data-*] attribute selectors */
5
+ export function parseCssFile(content, filePath) {
6
+ const matches = [];
7
+ const fileName = filePath.split('/').pop() ?? filePath;
8
+ const root = postcss.parse(content, { from: filePath });
9
+ root.walkRules((rule) => {
10
+ const line = rule.source?.start?.line ?? 0;
11
+ // Extract .rf-* class selectors
12
+ for (const m of rule.selector.matchAll(RF_CLASS_RE)) {
13
+ matches.push({ selector: m[0], file: fileName, line });
14
+ }
15
+ // Extract [data-*] attribute selectors
16
+ for (const m of rule.selector.matchAll(DATA_ATTR_RE)) {
17
+ matches.push({ selector: m[0], file: fileName, line });
18
+ }
19
+ });
20
+ return matches;
21
+ }
22
+ /** Match generated selectors against CSS selectors and produce an audit result */
23
+ export function auditSelectors(rune, generated, cssMatches) {
24
+ // Build a lookup: selector → first CSS match
25
+ const cssLookup = new Map();
26
+ for (const match of cssMatches) {
27
+ if (!cssLookup.has(match.selector)) {
28
+ cssLookup.set(match.selector, { file: match.file, line: match.line });
29
+ }
30
+ }
31
+ const selectors = {};
32
+ let styled = 0;
33
+ for (const sel of generated) {
34
+ const match = cssLookup.get(sel);
35
+ if (match) {
36
+ selectors[sel] = { styled: true, file: match.file, line: match.line };
37
+ styled++;
38
+ }
39
+ else {
40
+ selectors[sel] = { styled: false };
41
+ }
42
+ }
43
+ const total = generated.length;
44
+ const status = styled === 0 ? 'not-started' : styled === total ? 'complete' : 'partial';
45
+ return { rune, total, styled, status, selectors };
46
+ }
47
+ /** Collect all possible selectors for a rune by running all modifier variants */
48
+ export function collectAllSelectors(runeName, block, prefix, schemaVariants, contextModifiers, staticModifiers, runVariant) {
49
+ const allSelectors = new Set();
50
+ // If the rune has variant modifiers, run each combination
51
+ const variantKeys = Object.keys(schemaVariants);
52
+ if (variantKeys.length > 0) {
53
+ // Run each variant value for the first attribute with variants
54
+ // (most runes have a single modifier attribute)
55
+ for (const [attr, values] of Object.entries(schemaVariants)) {
56
+ for (const value of values) {
57
+ const selectors = runVariant({ [attr]: value });
58
+ for (const s of selectors)
59
+ allSelectors.add(s);
60
+ }
61
+ }
62
+ }
63
+ else {
64
+ // No variants — run with empty flags
65
+ const selectors = runVariant({});
66
+ for (const s of selectors)
67
+ allSelectors.add(s);
68
+ }
69
+ // Add synthetic context modifier selectors
70
+ if (contextModifiers) {
71
+ for (const suffix of Object.values(contextModifiers)) {
72
+ allSelectors.add(`.${prefix}-${block}--${suffix}`);
73
+ }
74
+ }
75
+ // Add synthetic static modifier selectors
76
+ if (staticModifiers) {
77
+ for (const suffix of staticModifiers) {
78
+ allSelectors.add(`.${prefix}-${block}--${suffix}`);
79
+ }
80
+ }
81
+ return [...allSelectors].sort(selectorSort);
82
+ }
83
+ function selectorSort(a, b) {
84
+ const typeA = selectorType(a);
85
+ const typeB = selectorType(b);
86
+ if (typeA !== typeB)
87
+ return typeA - typeB;
88
+ return a.localeCompare(b);
89
+ }
90
+ function selectorType(s) {
91
+ if (s.startsWith('['))
92
+ return 3;
93
+ if (s.includes('__'))
94
+ return 2;
95
+ if (s.includes('--'))
96
+ return 1;
97
+ return 0;
98
+ }
99
+ //# sourceMappingURL=css-audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-audit.js","sourceRoot":"","sources":["../../src/lib/css-audit.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAgB9B,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAErD,8FAA8F;A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G,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,GAAG,KAAK,CAAC;IAC1C,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC9B,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,CAAC;AACV,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Resolve the CSS directory for rune styles.
3
+ *
4
+ * Discovery order:
5
+ * 1. Explicit --css flag
6
+ * 2. Resolve @refrakt-md/lumina package → styles/runes/
7
+ * 3. Monorepo fallback: packages/lumina/styles/runes/
8
+ */
9
+ export declare function resolveCssDir(explicitDir?: string): string | null;
10
+ /** Read a single CSS file for a BEM block name (e.g., "hint" → hint.css) */
11
+ export declare function readCssForBlock(cssDir: string, block: string): {
12
+ content: string;
13
+ path: string;
14
+ } | null;
15
+ /** Read all CSS files from the directory */
16
+ export declare function readAllCss(cssDir: string): Array<{
17
+ content: string;
18
+ path: string;
19
+ }>;
20
+ //# sourceMappingURL=css-resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-resolve.d.ts","sourceRoot":"","sources":["../../src/lib/css-resolve.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6BjE;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAIvG;AAED,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CASnF"}
@@ -0,0 +1,57 @@
1
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
2
+ import { join, resolve, dirname } from 'node:path';
3
+ import { createRequire } from 'node:module';
4
+ /**
5
+ * Resolve the CSS directory for rune styles.
6
+ *
7
+ * Discovery order:
8
+ * 1. Explicit --css flag
9
+ * 2. Resolve @refrakt-md/lumina package → styles/runes/
10
+ * 3. Monorepo fallback: packages/lumina/styles/runes/
11
+ */
12
+ export function resolveCssDir(explicitDir) {
13
+ if (explicitDir) {
14
+ const abs = resolve(explicitDir);
15
+ if (!existsSync(abs)) {
16
+ throw new Error(`CSS directory not found: ${abs}`);
17
+ }
18
+ return abs;
19
+ }
20
+ // Try resolving from @refrakt-md/lumina package
21
+ try {
22
+ const require = createRequire(import.meta.url);
23
+ const luminaPkg = require.resolve('@refrakt-md/lumina/package.json');
24
+ const luminaDir = dirname(luminaPkg);
25
+ const runesDir = join(luminaDir, 'styles', 'runes');
26
+ if (existsSync(runesDir)) {
27
+ return runesDir;
28
+ }
29
+ }
30
+ catch {
31
+ // Package not found, try monorepo fallback
32
+ }
33
+ // Monorepo fallback
34
+ const monoRepo = resolve('packages/lumina/styles/runes');
35
+ if (existsSync(monoRepo)) {
36
+ return monoRepo;
37
+ }
38
+ return null;
39
+ }
40
+ /** Read a single CSS file for a BEM block name (e.g., "hint" → hint.css) */
41
+ export function readCssForBlock(cssDir, block) {
42
+ const filePath = join(cssDir, `${block}.css`);
43
+ if (!existsSync(filePath))
44
+ return null;
45
+ return { content: readFileSync(filePath, 'utf-8'), path: filePath };
46
+ }
47
+ /** Read all CSS files from the directory */
48
+ export function readAllCss(cssDir) {
49
+ const files = readdirSync(cssDir)
50
+ .filter(f => f.endsWith('.css'))
51
+ .sort();
52
+ return files.map(f => {
53
+ const filePath = join(cssDir, f);
54
+ return { content: readFileSync(filePath, 'utf-8'), path: filePath };
55
+ });
56
+ }
57
+ //# sourceMappingURL=css-resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-resolve.js","sourceRoot":"","sources":["../../src/lib/css-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,WAAoB;IACjD,IAAI,WAAW,EAAE,CAAC;QACjB,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QACjC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,gDAAgD;IAChD,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,OAAO,QAAQ,CAAC;QACjB,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,2CAA2C;IAC5C,CAAC;IAED,oBAAoB;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACzD,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,eAAe,CAAC,MAAc,EAAE,KAAa;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACrE,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,UAAU,CAAC,MAAc;IACxC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC;SAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC/B,IAAI,EAAE,CAAC;IAET,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACrE,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Built-in Markdoc fixture strings for the inspect command.
3
+ *
4
+ * Each fixture exercises the rune's full structure with realistic content.
5
+ * The key is the primary rune tag name (as used in Markdoc).
6
+ */
7
+ export declare const fixtures: Record<string, string>;
8
+ /** Get a fixture for a rune, with optional attribute overrides applied to the source */
9
+ export declare function getFixture(runeName: string, attrOverrides?: Record<string, string>): string;
10
+ //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/lib/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmV3C,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAc3F"}
@@ -0,0 +1,356 @@
1
+ /**
2
+ * Built-in Markdoc fixture strings for the inspect command.
3
+ *
4
+ * Each fixture exercises the rune's full structure with realistic content.
5
+ * The key is the primary rune tag name (as used in Markdoc).
6
+ */
7
+ export const fixtures = {
8
+ hint: `{% hint type="note" %}
9
+ The identity transform runs after the rune schema transform and before rendering. It applies BEM classes, injects structural elements, and resolves design tokens.
10
+ {% /hint %}`,
11
+ accordion: `{% accordion %}
12
+ ## Getting Started
13
+ Follow these steps to set up your development environment and build your first theme.
14
+
15
+ ## Configuration
16
+ Theme configuration is defined in a TypeScript file that exports a ThemeConfig object.
17
+
18
+ ## Deployment
19
+ Once your theme is ready, publish it to npm and register it in the theme marketplace.
20
+ {% /accordion %}`,
21
+ details: `{% details %}
22
+ ## Implementation Notes
23
+ This section contains additional technical details about how the transform pipeline processes rune content. The identity transform reads meta tags, applies BEM classes, and injects structural elements before the content reaches the renderer.
24
+ {% /details %}`,
25
+ api: `{% api method="GET" path="/api/users/:id" auth="Bearer" %}
26
+ Retrieve a single user by their unique identifier.
27
+
28
+ | Parameter | Type | Description |
29
+ |-----------|------|-------------|
30
+ | id | string | The user's unique ID |
31
+
32
+ \`\`\`json
33
+ {
34
+ "id": "usr_123",
35
+ "name": "Alice",
36
+ "email": "alice@example.com"
37
+ }
38
+ \`\`\`
39
+ {% /api %}`,
40
+ recipe: `{% recipe prepTime="PT15M" cookTime="PT30M" servings="4" difficulty="medium" %}
41
+ # Classic Margherita Pizza
42
+
43
+ - 500g bread flour
44
+ - 7g dried yeast
45
+ - 1 tsp salt
46
+ - 300ml warm water
47
+ - San Marzano tomatoes
48
+ - Fresh mozzarella
49
+ - Fresh basil leaves
50
+
51
+ 1. Mix flour, yeast, and salt in a large bowl
52
+ 2. Add warm water and knead for 10 minutes until smooth
53
+ 3. Let the dough rise for 1 hour at room temperature
54
+ 4. Shape into rounds and add toppings
55
+ 5. Bake at 250°C for 8-10 minutes
56
+
57
+ > For the best crust, preheat your oven with a pizza stone for at least 30 minutes before baking.
58
+ {% /recipe %}`,
59
+ symbol: `{% symbol kind="function" lang="typescript" since="1.2.0" %}
60
+ # createTransform
61
+
62
+ \`\`\`typescript
63
+ function createTransform(config: ThemeConfig): (tree: RendererNode) => RendererNode
64
+ \`\`\`
65
+
66
+ - config — The theme configuration object defining BEM mappings and structural rules
67
+ - Returns a pure transform function that enhances serialized tag trees
68
+
69
+ > Returns a function that walks the serialized tag tree and applies BEM classes, reads meta tags, injects structural elements, and recurses into children.
70
+ {% /symbol %}`,
71
+ event: `{% event date="2026-03-15" endDate="2026-03-17" location="Stockholm, Sweden" url="https://example.com/register" %}
72
+ # Nordic Developer Summit
73
+
74
+ A three-day conference bringing together developers, designers, and product engineers from across the Nordics.
75
+
76
+ - Keynote: The Future of Web Components
77
+ - Workshop: Building Design Systems at Scale
78
+ - Panel: Open Source in Enterprise
79
+ {% /event %}`,
80
+ howto: `{% howto estimatedTime="PT45M" difficulty="easy" %}
81
+ # Set Up a Refrakt Theme
82
+
83
+ - Node.js 20+
84
+ - A code editor
85
+ - Basic CSS knowledge
86
+
87
+ 1. Create a new directory for your theme
88
+ 2. Run \`npm init\` and add the theme-base dependency
89
+ 3. Create your \`theme.config.ts\` extending baseConfig
90
+ 4. Write CSS targeting the BEM selectors from \`refrakt inspect\`
91
+ 5. Test with \`refrakt inspect --serve\`
92
+ {% /howto %}`,
93
+ hero: `{% hero align="center" %}
94
+ # Build Beautiful Documentation
95
+ From Markdown to pixel-perfect pages in minutes.
96
+
97
+ - [Get Started](/docs)
98
+ - [View on GitHub](https://github.com)
99
+ {% /hero %}`,
100
+ feature: `{% feature %}
101
+ # Why Refrakt
102
+
103
+ Runes reinterpret standard Markdown — same syntax, richer meaning.
104
+
105
+ - **Fast** — Static generation, zero runtime JavaScript
106
+ - **Flexible** — 43+ runes, infinite combinations
107
+ - **Themeable** — Full control over every element
108
+ {% /feature %}`,
109
+ grid: `{% grid %}
110
+ First column content with enough text to demonstrate layout behavior.
111
+
112
+ ---
113
+
114
+ Second column content showing how grid cells are separated by horizontal rules.
115
+
116
+ ---
117
+
118
+ Third column content completing the three-column grid layout example.
119
+ {% /grid %}`,
120
+ figure: `{% figure size="large" align="center" %}
121
+ ![Mountain landscape](/images/mountain.jpg)
122
+
123
+ A panoramic view of the Norwegian fjords at sunset, captured from the summit of Trolltunga.
124
+ {% /figure %}`,
125
+ steps: `{% steps %}
126
+ # Install dependencies
127
+ Run \`npm install @refrakt-md/cli\` to add the CLI to your project.
128
+
129
+ # Create content
130
+ Write your first Markdown file using rune tags for rich components.
131
+
132
+ # Build and preview
133
+ Run \`npm run dev\` to start the development server and see your content rendered.
134
+ {% /steps %}`,
135
+ tabs: `{% tabs %}
136
+ # JavaScript
137
+ \`\`\`js
138
+ const greeting = "Hello, world!";
139
+ console.log(greeting);
140
+ \`\`\`
141
+
142
+ # TypeScript
143
+ \`\`\`ts
144
+ const greeting: string = "Hello, world!";
145
+ console.log(greeting);
146
+ \`\`\`
147
+
148
+ # Python
149
+ \`\`\`python
150
+ greeting = "Hello, world!"
151
+ print(greeting)
152
+ \`\`\`
153
+ {% /tabs %}`,
154
+ pricing: `{% pricing %}
155
+ # Choose Your Plan
156
+ Select the plan that best fits your needs.
157
+
158
+ {% tier name="Starter" price="Free" %}
159
+ - Up to 3 projects
160
+ - Community support
161
+ - Basic themes
162
+ {% /tier %}
163
+
164
+ {% tier name="Pro" price="$29/mo" featured="true" %}
165
+ - Unlimited projects
166
+ - Priority support
167
+ - All themes
168
+ - Custom domains
169
+ {% /tier %}
170
+
171
+ {% tier name="Enterprise" price="Custom" %}
172
+ - Everything in Pro
173
+ - SSO & SAML
174
+ - Dedicated support
175
+ - SLA guarantee
176
+ {% /tier %}
177
+ {% /pricing %}`,
178
+ changelog: `{% changelog %}
179
+ ## 1.2.0 — 2026-02-15
180
+ - **Added** Inspect command for theme developers
181
+ - **Added** Selector extraction from transformed trees
182
+ - **Fixed** BEM class ordering for nested runes
183
+
184
+ ## 1.1.0 — 2026-01-20
185
+ - **Added** Context-aware modifiers
186
+ - **Changed** Improved meta tag consumption logic
187
+ {% /changelog %}`,
188
+ testimonial: `{% testimonial %}
189
+ > Refrakt transformed how we write documentation. The rune system means our content authors write Markdown while our designers have full control over the output.
190
+
191
+ **Sarah Chen** — Head of Developer Experience at Acme Corp
192
+
193
+ ![](/avatars/sarah.jpg)
194
+ {% /testimonial %}`,
195
+ timeline: `{% timeline %}
196
+ ## 2024 — Project Inception
197
+ Initial prototype exploring Markdoc extensions for component-rich content.
198
+
199
+ ## 2025 — Open Source Launch
200
+ First public release with 20 runes and the Lumina theme.
201
+
202
+ ## 2026 — Theme Ecosystem
203
+ Launch of the theme marketplace and inspect tooling for developers.
204
+ {% /timeline %}`,
205
+ conversation: `{% conversation %}
206
+ > **Alice** — Have you tried the new inspect command?
207
+
208
+ > **Bob** — Yes! It shows exactly what HTML the identity transform produces. No more guessing which selectors to target.
209
+
210
+ > **Alice** — The variant expansion is my favorite part. You can see every modifier value at once.
211
+ {% /conversation %}`,
212
+ comparison: `{% comparison %}
213
+ # React
214
+ - **Learning Curve** — Moderate
215
+ - **Bundle Size** — ~40kb
216
+ - **Reactivity** — Virtual DOM
217
+ - ~~Server Components~~ — Experimental
218
+
219
+ # Svelte
220
+ - **Learning Curve** — Easy
221
+ - **Bundle Size** — ~5kb
222
+ - **Reactivity** — Compile-time
223
+ - **Server Components** — Native
224
+ {% /comparison %}`,
225
+ storyboard: `{% storyboard style="clean" columns="3" %}
226
+ ![Panel 1](/images/panel1.jpg)
227
+ The hero surveys the landscape from atop the hill.
228
+
229
+ ![Panel 2](/images/panel2.jpg)
230
+ A distant rumble echoes across the valley.
231
+
232
+ ![Panel 3](/images/panel3.jpg)
233
+ The journey begins.
234
+ {% /storyboard %}`,
235
+ sidenote: `{% sidenote style="sidenote" %}
236
+ This is a margin note that appears alongside the main content, providing additional context without interrupting the reading flow.
237
+ {% /sidenote %}`,
238
+ diff: `{% diff mode="unified" %}
239
+ \`\`\`ts
240
+ const config = {
241
+ prefix: 'rf',
242
+ runes: {}
243
+ };
244
+ \`\`\`
245
+
246
+ \`\`\`ts
247
+ const config = {
248
+ prefix: 'rf',
249
+ tokenPrefix: '--rf',
250
+ icons: {},
251
+ runes: {}
252
+ };
253
+ \`\`\`
254
+ {% /diff %}`,
255
+ datatable: `{% datatable %}
256
+ | Name | Role | Department | Status |
257
+ |------|------|------------|--------|
258
+ | Alice | Engineer | Platform | Active |
259
+ | Bob | Designer | Product | Active |
260
+ | Carol | Manager | Engineering | On Leave |
261
+ {% /datatable %}`,
262
+ form: `{% form method="POST" style="stacked" %}
263
+ - Name
264
+ - Email
265
+ - Message (textarea)
266
+
267
+ > How did you hear about us?
268
+ - Search engine
269
+ - Social media
270
+ - Friend referral
271
+ - Other
272
+
273
+ **Submit**
274
+ {% /form %}`,
275
+ cast: `{% cast %}
276
+ - **Alice Chen** — Lead Engineer
277
+ - **Bob Martinez** — Product Designer
278
+ - **Carol Kim** — Engineering Manager
279
+ {% /cast %}`,
280
+ bento: `{% bento %}
281
+ # Main Feature
282
+ The primary showcase area with plenty of room for a detailed description.
283
+
284
+ ## Secondary Feature
285
+ A supporting feature with moderate space.
286
+
287
+ ## Another Feature
288
+ More supporting content.
289
+
290
+ ### Small Detail
291
+ A compact cell.
292
+
293
+ ### Small Detail
294
+ Another compact cell.
295
+ {% /bento %}`,
296
+ palette: `{% palette title="Brand Colors" %}
297
+ - Primary: #2563EB
298
+ - Secondary: #7C3AED
299
+ - Accent: #F59E0B
300
+ - Success: #10B981
301
+ - Error: #EF4444
302
+ {% /palette %}`,
303
+ typography: `{% typography title="Type Scale" %}
304
+ - Display: Inter (400, 600, 700)
305
+ - Body: Inter (400, 500)
306
+ - Mono: JetBrains Mono (400, 500)
307
+ {% /typography %}`,
308
+ spacing: `{% spacing title="Spacing Scale" %}
309
+ # Spacing
310
+ - xs: 4px
311
+ - sm: 8px
312
+ - md: 16px
313
+ - lg: 24px
314
+ - xl: 32px
315
+ - 2xl: 48px
316
+ {% /spacing %}`,
317
+ };
318
+ /** Get a fixture for a rune, with optional attribute overrides applied to the source */
319
+ export function getFixture(runeName, attrOverrides) {
320
+ // Look up by primary name or try as-is
321
+ const source = fixtures[runeName];
322
+ if (!source) {
323
+ // Generate a minimal fixture for unknown runes
324
+ return `{% ${runeName} %}\nSample content for the ${runeName} rune.\n{% /${runeName} %}`;
325
+ }
326
+ if (!attrOverrides || Object.keys(attrOverrides).length === 0) {
327
+ return source;
328
+ }
329
+ // Apply attribute overrides by modifying the opening tag
330
+ return applyOverrides(source, runeName, attrOverrides);
331
+ }
332
+ /** Replace or add attributes in the opening tag of a fixture */
333
+ function applyOverrides(source, tagName, overrides) {
334
+ // Match the opening tag: {% tagName ... %}
335
+ const openTagPattern = new RegExp(`(\\{%\\s*${escapeRegex(tagName)})([^%]*?)(%\\})`);
336
+ const match = source.match(openTagPattern);
337
+ if (!match)
338
+ return source;
339
+ let attrString = match[2];
340
+ for (const [key, value] of Object.entries(overrides)) {
341
+ // Try to replace existing attribute
342
+ const attrPattern = new RegExp(`${escapeRegex(key)}="[^"]*"`);
343
+ if (attrPattern.test(attrString)) {
344
+ attrString = attrString.replace(attrPattern, `${key}="${value}"`);
345
+ }
346
+ else {
347
+ // Add new attribute
348
+ attrString = attrString.trimEnd() + ` ${key}="${value}" `;
349
+ }
350
+ }
351
+ return source.replace(openTagPattern, `${match[1]}${attrString}${match[3]}`);
352
+ }
353
+ function escapeRegex(s) {
354
+ return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
355
+ }
356
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/lib/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC/C,IAAI,EAAE;;YAEK;IAEX,SAAS,EAAE;;;;;;;;;iBASK;IAEhB,OAAO,EAAE;;;eAGK;IAEd,GAAG,EAAE;;;;;;;;;;;;;;WAcK;IAEV,MAAM,EAAE;;;;;;;;;;;;;;;;;;cAkBK;IAEb,MAAM,EAAE;;;;;;;;;;;cAWK;IAEb,KAAK,EAAE;;;;;;;;aAQK;IAEZ,KAAK,EAAE;;;;;;;;;;;;aAYK;IAEZ,IAAI,EAAE;;;;;;YAMK;IAEX,OAAO,EAAE;;;;;;;;eAQK;IAEd,IAAI,EAAE;;;;;;;;;;YAUK;IAEX,MAAM,EAAE;;;;cAIK;IAEb,KAAK,EAAE;;;;;;;;;aASK;IAEZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;YAkBK;IAEX,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;eAuBK;IAEd,SAAS,EAAE;;;;;;;;;iBASK;IAEhB,WAAW,EAAE;;;;;;mBAMK;IAElB,QAAQ,EAAE;;;;;;;;;gBASK;IAEf,YAAY,EAAE;;;;;;oBAMK;IAEnB,UAAU,EAAE;;;;;;;;;;;;kBAYK;IAEjB,UAAU,EAAE;;;;;;;;;kBASK;IAEjB,QAAQ,EAAE;;gBAEK;IAEf,IAAI,EAAE;;;;;;;;;;;;;;;;YAgBK;IAEX,SAAS,EAAE;;;;;;iBAMK;IAEhB,IAAI,EAAE;;;;;;;;;;;;YAYK;IAEX,IAAI,EAAE;;;;YAIK;IAEX,KAAK,EAAE;;;;;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AC;YAClC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACP,oBAAoB;YACpB,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,KAAK,KAAK,IAAI,CAAC;QAC3D,CAAC;IACF,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { RuneConfig, ThemeConfig } from '@refrakt-md/transform';
2
+ import type { AuditResult } from './css-audit.js';
3
+ /** Format the "Config Applied" section showing what the identity transform does */
4
+ export declare function formatConfig(runeTypeof: string, config: ThemeConfig): string;
5
+ /** Format the selector list with visual grouping */
6
+ export declare function formatSelectors(selectors: string[]): string;
7
+ /** Format a section heading */
8
+ export declare function heading(text: string): string;
9
+ /** Format the input Markdoc source (indented) */
10
+ export declare function formatInput(source: string): string;
11
+ /** Format the HTML output (indented, already pretty-printed) */
12
+ export declare function formatHtml(html: string): string;
13
+ /** Format the rune list for --list mode */
14
+ export declare function formatRuneList(runes: Array<{
15
+ name: string;
16
+ aliases: string[];
17
+ description: string;
18
+ variants: Record<string, string[]>;
19
+ }>): string;
20
+ /** Build JSON output matching the spec format */
21
+ export declare function buildJsonOutput(opts: {
22
+ rune: string;
23
+ theme: string;
24
+ input: string;
25
+ config: RuneConfig | undefined;
26
+ html: string;
27
+ selectors: string[];
28
+ }): object;
29
+ /** Format a single-rune audit result */
30
+ export declare function formatAuditResult(result: AuditResult, theme: string): string;
31
+ /** Format the full-theme audit summary */
32
+ export declare function formatAuditSummary(results: AuditResult[], theme: string): string;
33
+ /** Build JSON output for an audit */
34
+ export declare function buildAuditJson(results: AuditResult[], theme: string): object;
35
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUlD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CA2E5E;AAED,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAO3D;AAED,+BAA+B;AAC/B,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,iDAAiD;AACjD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,gEAAgE;AAChE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAE,CAAC,GAAG,MAAM,CAqBjJ;AAED,iDAAiD;AACjD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb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