css-typed-vars 0.6.0 → 0.8.0

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,5 +1,5 @@
1
1
  import * as unplugin from 'unplugin';
2
- import { N as NamingConvention } from './generator-C2AppeJL.js';
2
+ import { N as NamingConvention } from './generator-DJ9uOYBP.js';
3
3
 
4
4
  interface Options {
5
5
  input: string | string[];
@@ -10,16 +10,26 @@ interface Options {
10
10
  * - `false`: skip writing
11
11
  */
12
12
  dts?: string | false;
13
+ /** Also write a W3C design tokens (DTCG) JSON file to this path, relative to project root. */
14
+ tokens?: string;
13
15
  exclude?: string | string[];
14
16
  prefix?: string;
15
17
  naming?: NamingConvention;
16
18
  selectors?: string[];
19
+ /**
20
+ * Theme name -> selector (`'[data-theme="dark"]'`) or `@media` prelude
21
+ * (`'@media (prefers-color-scheme: dark)'`). Each theme's values are emitted as
22
+ * `@theme <name> <value>` JSDoc tags, and kept out of the default value.
23
+ */
24
+ themes?: Record<string, string>;
17
25
  group?: boolean;
18
- /** Prune generated vars with no detected `cssVars.<key>` usage. Requires `usage`, and can't be combined with `group`. */
26
+ /** Prune generated vars with no detected `cssVars.<key>` (or `cssVars.<group>.<key>`) usage. Requires `usage`. */
19
27
  prune?: boolean;
20
28
  /** Glob(s) of source files to scan for `cssVars` usage. Required when `prune` is true. */
21
29
  usage?: string | string[];
22
30
  usageExclude?: string | string[];
31
+ /** Also emit the `CssVarRef` type and `getCssVar`/`setCssVar` runtime helpers. */
32
+ helpers?: boolean;
23
33
  }
24
34
  declare const _default: unplugin.UnpluginInstance<Options, boolean>;
25
35
 
package/dist/unplugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin_default
3
- } from "./chunk-TD7SYMDA.js";
4
- import "./chunk-LH53WYFF.js";
3
+ } from "./chunk-32V3V6WT.js";
4
+ import "./chunk-5HPTHW7S.js";
5
5
  export {
6
6
  unplugin_default as default
7
7
  };