@animus-ui/properties 0.1.11 → 0.1.13

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/dist/index.js CHANGED
@@ -1,13 +1,6 @@
1
1
  //#region src/shorthands.ts
2
2
  /**
3
- * CSS shorthand properties registered in the prop config, used for
4
- * declaration ordering (shorthands before longhands).
5
- *
6
- * Entries use **camelCase** (prop config convention) because consumers
7
- * check against JS prop config keys, not CSS declaration names.
8
- * See unitless.ts for kebab-case convention rationale.
9
- *
10
- * Scoped to shorthands registered in the prop system — not all CSS shorthands.
3
+ * Covers only shorthands registered in the prop system, not all CSS shorthands.
11
4
  */
12
5
  const SHORTHAND_PROPERTIES = [
13
6
  "border",
@@ -33,15 +26,7 @@ const SHORTHAND_PROPERTIES = [
33
26
  ];
34
27
  //#endregion
35
28
  //#region src/unitless.ts
36
- /**
37
- * CSS properties that accept unitless numeric values.
38
- * Bare numerics on properties NOT in this set receive automatic `px` suffix.
39
- *
40
- * Entries use **kebab-case** (CSS declaration convention) because consumers
41
- * check against CSS property names in post-processed output.
42
- * See shorthands.ts for camelCase convention rationale.
43
- */
44
- const UNITLESS_PROPERTIES = new Set([
29
+ const UNITLESS_PROPERTIES = /* @__PURE__ */ new Set([
45
30
  "animation-name",
46
31
  "animation-iteration-count",
47
32
  "aspect-ratio",
@@ -88,25 +73,12 @@ const UNITLESS_PROPERTIES = new Set([
88
73
  "z-index",
89
74
  "zoom"
90
75
  ]);
91
- /**
92
- * Both spellings of every unitless property, precomputed at module load.
93
- *
94
- * Callers arrive from two directions — CSS declaration text (kebab-case) and
95
- * prop configs (camelCase) — and the lookup sits on the runtime's dynamic-prop
96
- * hot path, so the conversion happens once here rather than per call.
97
- * Single-word entries convert to themselves and collapse into one member.
98
- */
99
76
  const UNITLESS_PROPERTY_SPELLINGS = /* @__PURE__ */ new Set();
100
77
  for (const property of UNITLESS_PROPERTIES) {
101
78
  UNITLESS_PROPERTY_SPELLINGS.add(property);
102
79
  UNITLESS_PROPERTY_SPELLINGS.add(property.replace(/-([a-z])/g, (_, char) => char.toUpperCase()));
103
80
  }
104
- /**
105
- * Whether bare numeric values on this CSS property render without a unit.
106
- * Accepts either spelling (`line-height` or `lineHeight`) — the single home
107
- * for the unitless decision, so no caller has to pair a case conversion with
108
- * a set lookup of its own.
109
- */
81
+ /** Accepts either spelling: `line-height` or `lineHeight`. */
110
82
  function isUnitlessProperty(property) {
111
83
  return UNITLESS_PROPERTY_SPELLINGS.has(property);
112
84
  }
@@ -1,12 +1,5 @@
1
1
  /**
2
- * CSS shorthand properties registered in the prop config, used for
3
- * declaration ordering (shorthands before longhands).
4
- *
5
- * Entries use **camelCase** (prop config convention) because consumers
6
- * check against JS prop config keys, not CSS declaration names.
7
- * See unitless.ts for kebab-case convention rationale.
8
- *
9
- * Scoped to shorthands registered in the prop system — not all CSS shorthands.
2
+ * Covers only shorthands registered in the prop system, not all CSS shorthands.
10
3
  */
11
4
  export declare const SHORTHAND_PROPERTIES: readonly ['border', 'borderTop', 'borderBottom', 'borderLeft', 'borderRight', 'borderWidth', 'borderStyle', 'borderColor', 'background', 'flex', 'margin', 'padding', 'transition', 'gap', 'grid', 'gridArea', 'gridColumn', 'gridRow', 'gridTemplate', 'overflow'];
12
5
  //# sourceMappingURL=shorthands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shorthands.d.ts","sourceRoot":"","sources":["../src/shorthands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,YAC/B,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EACN,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,UAAU,CACF,CAAC"}
1
+ {"version":3,"file":"shorthands.d.ts","sourceRoot":"","sources":["../src/shorthands.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAC/B,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EACN,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,UAAU,CACF,CAAC"}
@@ -1,17 +1,4 @@
1
- /**
2
- * CSS properties that accept unitless numeric values.
3
- * Bare numerics on properties NOT in this set receive automatic `px` suffix.
4
- *
5
- * Entries use **kebab-case** (CSS declaration convention) because consumers
6
- * check against CSS property names in post-processed output.
7
- * See shorthands.ts for camelCase convention rationale.
8
- */
9
1
  export declare const UNITLESS_PROPERTIES: Set<string>;
10
- /**
11
- * Whether bare numeric values on this CSS property render without a unit.
12
- * Accepts either spelling (`line-height` or `lineHeight`) — the single home
13
- * for the unitless decision, so no caller has to pair a case conversion with
14
- * a set lookup of its own.
15
- */
2
+ /** Accepts either spelling: `line-height` or `lineHeight`. */
16
3
  export declare function isUnitlessProperty(property: string): boolean;
17
4
  //# sourceMappingURL=unitless.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unitless.d.ts","sourceRoot":"","sources":["../src/unitless.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,aAkD9B,CAAC;AAkBH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE5D"}
1
+ {"version":3,"file":"unitless.d.ts","sourceRoot":"","sources":["../src/unitless.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,aAgD9B,CAAC;AAUH,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/properties",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "CSS property classification data — unitless set, shorthand list, type re-exports",
5
5
  "keywords": [
6
6
  "animus",