@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.mjs
CHANGED
|
@@ -971,7 +971,26 @@ var OC_GLYPHS = {
|
|
|
971
971
|
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>`,
|
|
972
972
|
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)"/>`
|
|
973
973
|
};
|
|
974
|
-
var
|
|
974
|
+
var DEPTH = 22;
|
|
975
|
+
var Z_STEP = 3;
|
|
976
|
+
var LAYERS = Array.from({ length: DEPTH }, (_, i) => i);
|
|
977
|
+
function layerStyle(i) {
|
|
978
|
+
const t = i / (DEPTH - 1);
|
|
979
|
+
let color;
|
|
980
|
+
if (t < 0.12) {
|
|
981
|
+
color = `color-mix(in oklab, var(--primary), white ${Math.round((0.12 - t) * 60)}%)`;
|
|
982
|
+
} else if (t < 0.62) {
|
|
983
|
+
const k = (t - 0.12) / 0.5;
|
|
984
|
+
color = `color-mix(in oklab, var(--primary), black ${Math.round(k * 42)}%)`;
|
|
985
|
+
} else {
|
|
986
|
+
const k = (t - 0.62) / 0.38;
|
|
987
|
+
color = `color-mix(in oklab, color-mix(in oklab, var(--primary), black 42%), var(--background) ${Math.round(k * 100)}%)`;
|
|
988
|
+
}
|
|
989
|
+
return {
|
|
990
|
+
transform: `translateZ(${-i * Z_STEP}px)`,
|
|
991
|
+
color
|
|
992
|
+
};
|
|
993
|
+
}
|
|
975
994
|
function sub(markup, fg, ink) {
|
|
976
995
|
return markup.split("__FG__").join(fg).split("__INK__").join(ink).split("__BG__").join("none");
|
|
977
996
|
}
|
|
@@ -984,8 +1003,7 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
984
1003
|
for (const ch of glyph) h = h * 31 + ch.charCodeAt(0) | 0;
|
|
985
1004
|
return (h % 7 - 3) * 1.5;
|
|
986
1005
|
}, [glyph]);
|
|
987
|
-
const
|
|
988
|
-
const wire = useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
1006
|
+
const mark = useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
989
1007
|
useEffect(() => {
|
|
990
1008
|
if (!parallax) return;
|
|
991
1009
|
const el = parRef.current;
|
|
@@ -1033,14 +1051,17 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
1033
1051
|
className: cn("oc-sigil", `oc-sigil--${corner}`, className),
|
|
1034
1052
|
style: { "--oc-sigil-seed": `${seed}deg` },
|
|
1035
1053
|
children: [
|
|
1036
|
-
/* @__PURE__ */ jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, "aria-hidden": "true", children: /* @__PURE__ */
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1054
|
+
/* @__PURE__ */ jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("g", { id: `${id}-mark`, dangerouslySetInnerHTML: { __html: mark } }) }) }),
|
|
1055
|
+
/* @__PURE__ */ jsx("div", { className: "oc-sigil__drift oc-ambient", children: /* @__PURE__ */ jsx("div", { ref: parRef, className: "oc-sigil__par", children: LAYERS.map((n) => /* @__PURE__ */ jsx(
|
|
1056
|
+
"svg",
|
|
1057
|
+
{
|
|
1058
|
+
viewBox: "0 0 1024 1024",
|
|
1059
|
+
className: "oc-sigil__layer",
|
|
1060
|
+
style: layerStyle(n),
|
|
1061
|
+
children: /* @__PURE__ */ jsx("use", { href: `#${id}-mark` })
|
|
1062
|
+
},
|
|
1063
|
+
n
|
|
1064
|
+
)) }) })
|
|
1044
1065
|
]
|
|
1045
1066
|
}
|
|
1046
1067
|
);
|