@uniweb/theming 0.1.7 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/theming",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Theming utilities for the Uniweb platform — shade generation, CSS generation, theme processing",
5
5
  "type": "module",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -34,6 +34,7 @@ export {
34
34
  processTheme,
35
35
  extractFoundationVars,
36
36
  foundationHasVars,
37
+ isFontVar,
37
38
  } from './processor.js'
38
39
 
39
40
  // Value normalization
package/src/processor.js CHANGED
@@ -83,10 +83,11 @@ const NON_FAMILY_FONT_VARS = new Set([
83
83
 
84
84
  /**
85
85
  * A foundation var is a themeable typeface (font role) when it declares
86
- * `type: 'font'`. Deprecated fallback: a `font-*`-prefixed name that isn't a
87
- * known CSS longhand — kept so foundations predating the convention still work.
86
+ * `type: 'font'`, or — the inferred case — its name is `font-*` and not a known
87
+ * CSS longhand. Exported so the build can persist the inferred `type: 'font'`
88
+ * into schema.json (the runtime relies on the same predicate).
88
89
  */
89
- function isFontVar(name, config) {
90
+ export function isFontVar(name, config) {
90
91
  const type = typeof config === 'object' ? config?.type : undefined
91
92
  if (type === 'font') return true
92
93
  return name.startsWith('font-') && !NON_FAMILY_FONT_VARS.has(name)