@animus-ui/system 0.1.14 → 0.1.15

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,4 +1,4 @@
1
- import { a as borderShorthand, i as gridItemRatio, n as size, o as createScale, r as gridItem } from "../size-C6jqxiQy.js";
1
+ import { a as borderShorthand, i as gridItemRatio, n as size, o as createScale, r as gridItem } from "../size-C4gOY6lI.js";
2
2
  //#region src/groups/index.ts
3
3
  const color = {
4
4
  color: {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as createClassResolver } from "./createClassResolver-EpwTL9Sa.js";
2
2
  import { n as createComponent, t as createComposedFamily } from "./createComposedFamily-C4NovMcd.js";
3
3
  import { compose } from "./compose.js";
4
- import { a as borderShorthand, c as numericScale, d as createTransform, i as gridItemRatio, l as stringScale, n as size, o as createScale, r as gridItem, s as numericOrStringScale, t as percentageOrAbsolute, u as areTransformsEqual } from "./size-C6jqxiQy.js";
4
+ import { a as borderShorthand, c as numericScale, d as createTransform, i as gridItemRatio, l as stringScale, n as size, o as createScale, r as gridItem, s as numericOrStringScale, t as percentageOrAbsolute, u as areTransformsEqual } from "./size-C4gOY6lI.js";
5
5
  //#region src/utils/deepMerge.ts
6
6
  const isMergeable = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
7
7
  function deepMerge(target, source) {
@@ -87,8 +87,7 @@ const size = createTransform("size", (value) => {
87
87
  };
88
88
  if (typeof value === "number") return toSize(value);
89
89
  const strValue = value;
90
- if (strValue.includes("calc")) return strValue;
91
- const [match, number, unit] = /(-?\d*\.?\d+)(%|\w*)/.exec(strValue) || [];
90
+ const [match, number, unit] = /^\s*([+-]?\d*\.?\d+)(?:\.|(%|\w*))\s*$/.exec(strValue) || [];
92
91
  if (match === void 0) return strValue;
93
92
  const numericValue = parseFloat(number);
94
93
  return !unit ? toSize(numericValue) : `${numericValue}${unit}`;
@@ -1 +1 @@
1
- {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/transforms/size.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,eAAgB,MAAM,eAQtD,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,IAAI,4CA0Bf,CAAC"}
1
+ {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/transforms/size.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,eAAgB,MAAM,eAQtD,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,IAAI,4CAwBf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/system",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Animus design system builder — tokens, prop groups, global styles",
5
5
  "keywords": [
6
6
  "css",
@@ -76,7 +76,7 @@
76
76
  "compile": "tsc --noEmit"
77
77
  },
78
78
  "dependencies": {
79
- "@animus-ui/properties": "0.1.14",
79
+ "@animus-ui/properties": "0.1.15",
80
80
  "csstype": "^3.2.3"
81
81
  },
82
82
  "devDependencies": {