@orangecheck/design 0.28.0 → 0.28.2
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 +32 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -11
- package/dist/index.mjs.map +1 -1
- package/dist/styles/sigil.css +7 -58
- package/dist/tokens.js +32 -11
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +32 -11
- package/dist/tokens.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1006,7 +1006,26 @@ var OC_GLYPHS = {
|
|
|
1006
1006
|
analytics: `<g transform="scale(42.666667 42.666667)"><rect x="3" y="3" width="18" height="18" fill="__FG__"/><path d="M6 17 L10 12 L14 15 L18 8" fill="none" stroke="__INK__" stroke-width="1.8" stroke-linecap="square" stroke-linejoin="miter"/><rect x="16.6" y="6.6" width="2.8" height="2.8" fill="__INK__"/></g>`,
|
|
1007
1007
|
btc: `<path d="M373 1414V1676H531V1414ZM670 1414V1676H829V1414ZM373 -186V76H531V-186ZM670 -186V76H829V-186ZM129 0V1490H705Q863 1490 972.50 1441Q1082 1392 1139 1305.50Q1196 1219 1196 1103Q1196 1016 1164 951Q1132 886 1074 843Q1016 800 937 779V774Q1024 765 1095.50 721Q1167 677 1210 600.50Q1253 524 1253 416Q1253 293 1194.50 199Q1136 105 1020 52.50Q904 0 731 0ZM391 217H700Q838 217 910.50 272.50Q983 328 983 428Q983 497 950 547.50Q917 598 855.50 626Q794 654 707 654H391ZM391 858H688Q762 858 817 883.50Q872 909 902 956Q932 1003 932 1068Q932 1161 868 1217.50Q804 1274 689 1274H391Z" fill="__FG__" transform="translate(238.3907 806.9912) scale(0.395961 -0.395961)"/>`
|
|
1008
1008
|
};
|
|
1009
|
-
var
|
|
1009
|
+
var DEPTH = 22;
|
|
1010
|
+
var Z_STEP = 3;
|
|
1011
|
+
var LAYERS = Array.from({ length: DEPTH }, (_, i) => i);
|
|
1012
|
+
function layerStyle(i) {
|
|
1013
|
+
const t = i / (DEPTH - 1);
|
|
1014
|
+
let color;
|
|
1015
|
+
if (t < 0.12) {
|
|
1016
|
+
color = `color-mix(in oklab, var(--primary), white ${Math.round((0.12 - t) * 60)}%)`;
|
|
1017
|
+
} else if (t < 0.62) {
|
|
1018
|
+
const k = (t - 0.12) / 0.5;
|
|
1019
|
+
color = `color-mix(in oklab, var(--primary), black ${Math.round(k * 42)}%)`;
|
|
1020
|
+
} else {
|
|
1021
|
+
const k = (t - 0.62) / 0.38;
|
|
1022
|
+
color = `color-mix(in oklab, color-mix(in oklab, var(--primary), black 42%), var(--background) ${Math.round(k * 100)}%)`;
|
|
1023
|
+
}
|
|
1024
|
+
return {
|
|
1025
|
+
transform: `translateZ(${-i * Z_STEP}px)`,
|
|
1026
|
+
color
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1010
1029
|
function sub(markup, fg, ink) {
|
|
1011
1030
|
return markup.split("__FG__").join(fg).split("__INK__").join(ink).split("__BG__").join("none");
|
|
1012
1031
|
}
|
|
@@ -1019,8 +1038,7 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
1019
1038
|
for (const ch of glyph) h = h * 31 + ch.charCodeAt(0) | 0;
|
|
1020
1039
|
return (h % 7 - 3) * 1.5;
|
|
1021
1040
|
}, [glyph]);
|
|
1022
|
-
const
|
|
1023
|
-
const wire = React2.useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
1041
|
+
const mark = React2.useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
1024
1042
|
React2.useEffect(() => {
|
|
1025
1043
|
if (!parallax) return;
|
|
1026
1044
|
const el = parRef.current;
|
|
@@ -1068,14 +1086,17 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
1068
1086
|
className: cn("oc-sigil", `oc-sigil--${corner}`, className),
|
|
1069
1087
|
style: { "--oc-sigil-seed": `${seed}deg` },
|
|
1070
1088
|
children: [
|
|
1071
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1089
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: `${id}-mark`, dangerouslySetInnerHTML: { __html: mark } }) }) }),
|
|
1090
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oc-sigil__drift oc-ambient", children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: parRef, className: "oc-sigil__par", children: LAYERS.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1091
|
+
"svg",
|
|
1092
|
+
{
|
|
1093
|
+
viewBox: "0 0 1024 1024",
|
|
1094
|
+
className: "oc-sigil__layer",
|
|
1095
|
+
style: layerStyle(n),
|
|
1096
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("use", { href: `#${id}-mark` })
|
|
1097
|
+
},
|
|
1098
|
+
n
|
|
1099
|
+
)) }) })
|
|
1079
1100
|
]
|
|
1080
1101
|
}
|
|
1081
1102
|
);
|