@bamboocss/types 1.42.0 → 1.43.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 (2) hide show
  1. package/dist/config.d.ts +18 -2
  2. package/package.json +2 -2
package/dist/config.d.ts CHANGED
@@ -377,6 +377,8 @@ interface CssgenOptions {
377
377
  polyfill?: boolean
378
378
  }
379
379
 
380
+ export type UnresolvedTokenSeverity = 'off' | 'warn' | 'error'
381
+
380
382
  /** `'auto'` hashes in production and leaves names readable in development. */
381
383
  export type HashSetting = boolean | 'auto'
382
384
 
@@ -727,9 +729,23 @@ export interface Config
727
729
  * entrypoint's own export list rather than inferred, so there is no setting under which it
728
730
  * is what someone meant.
729
731
  *
730
- * @default 'warn'
732
+ * Two halves, graded apart, because they are not equally certain.
733
+ *
734
+ * A property that draws from a token category — `color` from `colors`, `top` from `spacing` —
735
+ * makes a name that is not a token bamboo's own bookkeeping, and there is no third party to be
736
+ * wrong about it. That half defaults to `'error'`.
737
+ *
738
+ * Everywhere else the judge is the CSS grammar, whose data lags the spec: `containerType:
739
+ * 'scroll-state'` is valid CSS that the grammar has not caught up with. Sweeping every keyword
740
+ * csstype enumerates through it found 8 such disagreements in 10,128 pairs — 0.08%, and all 8
741
+ * on properties with no token category. That half defaults to `'warn'`, so a build is never
742
+ * failed by how fresh a grammar is.
743
+ *
744
+ * A single severity applies to both.
745
+ *
746
+ * @default { token: 'error', grammar: 'warn' }
731
747
  */
732
- unresolvedToken?: 'off' | 'warn' | 'error'
748
+ unresolvedToken?: UnresolvedTokenSeverity | { token?: UnresolvedTokenSeverity; grammar?: UnresolvedTokenSeverity }
733
749
  }
734
750
 
735
751
  export interface Preset extends ExtendableOptions, PresetOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/types",
3
- "version": "1.42.0",
3
+ "version": "1.43.1",
4
4
  "description": "The types for css bamboo",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "ncp": "2.0.0",
33
33
  "pkg-types": "2.3.0",
34
34
  "ts-morph": "28.0.0",
35
- "@bamboocss/extractor": "1.42.0"
35
+ "@bamboocss/extractor": "1.43.1"
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "tsx scripts/watch.ts",