@inf-monkeys-tech/monkeys-design 2.0.23 → 2.0.24
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/components/capabilities/index.js +7 -0
- package/dist/components/capabilities/index.js.map +1 -1
- package/dist/components/capabilities/index.mjs +7 -0
- package/dist/components/capabilities/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +7 -0
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +7 -0
- package/dist/components/runtime/index.mjs.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -35859,6 +35859,12 @@ var LAYOUT_MODE_CLASSES = {
|
|
|
35859
35859
|
};
|
|
35860
35860
|
var ALIGN_CLASSES = { start: "items-start", center: "items-center", end: "items-end", stretch: "items-stretch" };
|
|
35861
35861
|
var JUSTIFY_CLASSES = { start: "justify-start", center: "justify-center", end: "justify-end", between: "justify-between", around: "justify-around" };
|
|
35862
|
+
var tokenPathToCssVariable = (value) => {
|
|
35863
|
+
const path = value.slice(1).trim();
|
|
35864
|
+
if (!/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/i.test(path)) throw new TypeError(`Invalid Design Token path ${value}.`);
|
|
35865
|
+
return `var(--monkeys-${path.replace(/\./g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()})`;
|
|
35866
|
+
};
|
|
35867
|
+
var resolveRenderNodeStyle = (style) => style ? Object.fromEntries(Object.entries(style).map(([property, value]) => [property, typeof value === "string" && value.startsWith("$") ? tokenPathToCssVariable(value) : value])) : void 0;
|
|
35862
35868
|
var getRenderLayoutClassName = (layout) => cn(
|
|
35863
35869
|
LAYOUT_MODE_CLASSES[layout.mode],
|
|
35864
35870
|
layout.mode === "flex" && (layout.direction === "row" ? "flex-row" : "flex-col"),
|
|
@@ -36009,6 +36015,7 @@ var RenderNodeHost = forwardRef(function RenderNodeHost2({
|
|
|
36009
36015
|
className: cn((!unframed || resolvedLayout.mode !== "contents") && getRenderLayoutClassName(resolvedLayout), className),
|
|
36010
36016
|
style: {
|
|
36011
36017
|
...resolvedLayout.mode === "grid" && resolvedLayout.columns ? { gridTemplateColumns: `repeat(${resolvedLayout.columns}, minmax(0, 1fr))` } : {},
|
|
36018
|
+
...resolveRenderNodeStyle(node.style),
|
|
36012
36019
|
...props.style
|
|
36013
36020
|
},
|
|
36014
36021
|
hidden: hidden || !policyState.visible || void 0,
|