@spiracss/html-cli 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,10 +67,10 @@ Minimal example:
67
67
  ```js
68
68
  export default {
69
69
  htmlFormat: { classAttribute: 'class' },
70
+ jsxClassBindings: { memberAccessAllowlist: ['styles', 'classes'] },
70
71
  generator: {
71
72
  globalScssModule: '@styles/partials/global',
72
- childScssDir: 'scss',
73
- layoutMixins: ['@include breakpoint-up(md)']
73
+ childScssDir: 'scss'
74
74
  }
75
75
  }
76
76
  ```
@@ -80,7 +80,9 @@ Note: If your project is CommonJS (no `"type": "module"` in `package.json`), use
80
80
  ## Notes
81
81
 
82
82
  - Template syntax (EJS/Nunjucks/Astro) is skipped for formatting to avoid breaking markup.
83
- - JSX class/className is processed only when it is a string or template literal.
83
+ - `generator.layoutMixins` defaults to an empty array (disabled). Set it only if your project defines the referenced mixins.
84
+ - JSX class/className supports best-effort extraction when static class names are present (strings, template literals with static parts plus string literals or member access inside `${}`; string literals inside dynamic expressions may still be extracted, and member access like `styles.foo` or `styles["foo"]`). If `jsxClassBindings.memberAccessAllowlist` is set, only the listed base identifiers are treated as class sources (empty array disables member access extraction entirely). Chained member access (e.g. `styles.layout.hero`) is treated as dynamic and skipped.
85
+ - Placeholder formatting skips JSX bindings that include dynamic expressions (e.g. conditions, props, function calls, non-static `${}` segments). When formatting JSX/TSX, bindings are normalized to plain class strings for placeholders; treat the output as scaffolding (not CSS Modules-safe).
84
86
  - The conversion spec is shared with the VS Code HTML to SCSS extension.
85
87
 
86
88
  ## Docs