@orangecheck/design 0.28.1 → 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 -63
- 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/styles/sigil.css
CHANGED
|
@@ -65,79 +65,23 @@
|
|
|
65
65
|
@keyframes oc-sigil-drift {
|
|
66
66
|
0%,
|
|
67
67
|
100% {
|
|
68
|
-
transform: rotateX(
|
|
68
|
+
transform: rotateX(20deg) rotateY(calc(-26deg + var(--oc-sigil-seed, 0deg)));
|
|
69
69
|
}
|
|
70
70
|
50% {
|
|
71
|
-
transform: rotateX(
|
|
71
|
+
transform: rotateX(26deg) rotateY(calc(-16deg + var(--oc-sigil-seed, 0deg)));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/* Layers are absolutely stacked; their translateZ + color ramp (the 3D relief)
|
|
76
|
+
are computed per-layer in the component so depth is tunable in one place. The
|
|
77
|
+
mark is always the OUTLINE form (the tile drops away), extruded into a solid
|
|
78
|
+
slab that recolors per skin via currentColor. */
|
|
75
79
|
.oc-sigil__layer {
|
|
76
80
|
position: absolute;
|
|
77
81
|
inset: 0;
|
|
78
82
|
width: 100%;
|
|
79
83
|
height: 100%;
|
|
80
|
-
|
|
81
|
-
/* opaque relief ramp — the back layers are the extrusion wall dissolving into
|
|
82
|
-
the page background; the FRONT FACE (layer-5) is a defined --primary
|
|
83
|
-
silhouette so the mark reads even where it sits over a same-hue aurora bloom
|
|
84
|
-
(the ember-first minimum-visibility floor). The ramp endpoints ARE the
|
|
85
|
-
compiled-in visibility floor + contrast ceiling; because the layers are
|
|
86
|
-
opaque, the front face occludes the aurora within the glyph rather than
|
|
87
|
-
tinting through it, and only the perspective-spread bevel behind it fades. */
|
|
88
|
-
.oc-sigil__layer-0 {
|
|
89
|
-
transform: translateZ(0px);
|
|
90
|
-
color: color-mix(in oklab, var(--primary), var(--background) 92%);
|
|
91
|
-
}
|
|
92
|
-
.oc-sigil__layer-1 {
|
|
93
|
-
transform: translateZ(4px);
|
|
94
|
-
color: color-mix(in oklab, var(--primary), var(--background) 84%);
|
|
95
|
-
}
|
|
96
|
-
.oc-sigil__layer-2 {
|
|
97
|
-
transform: translateZ(8px);
|
|
98
|
-
color: color-mix(in oklab, var(--primary), var(--background) 72%);
|
|
99
|
-
}
|
|
100
|
-
.oc-sigil__layer-3 {
|
|
101
|
-
transform: translateZ(12px);
|
|
102
|
-
color: color-mix(in oklab, var(--primary), var(--background) 56%);
|
|
103
|
-
}
|
|
104
|
-
.oc-sigil__layer-4 {
|
|
105
|
-
transform: translateZ(16px);
|
|
106
|
-
color: color-mix(in oklab, var(--primary), var(--background) 40%);
|
|
107
|
-
}
|
|
108
|
-
.oc-sigil__layer-5 {
|
|
109
|
-
transform: translateZ(20px);
|
|
110
|
-
color: color-mix(in oklab, var(--primary), var(--background) 22%);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* register switch — filled letterpress under ember (the bare-root default),
|
|
114
|
-
wireframe under the four cypherpunk skins; both stacks are in the markup so
|
|
115
|
-
the swap is pure CSS (no hydration flash, no JS) */
|
|
116
|
-
.oc-sigil__use-wire {
|
|
117
|
-
display: none;
|
|
118
|
-
}
|
|
119
|
-
:root[data-oc-theme='orangecheck'] .oc-sigil__use-filled,
|
|
120
|
-
:root[data-oc-theme='phosphor'] .oc-sigil__use-filled,
|
|
121
|
-
:root[data-oc-theme='lightning'] .oc-sigil__use-filled,
|
|
122
|
-
:root[data-oc-theme='gold'] .oc-sigil__use-filled {
|
|
123
|
-
display: none;
|
|
124
|
-
}
|
|
125
|
-
:root[data-oc-theme='orangecheck'] .oc-sigil__use-wire,
|
|
126
|
-
:root[data-oc-theme='phosphor'] .oc-sigil__use-wire,
|
|
127
|
-
:root[data-oc-theme='lightning'] .oc-sigil__use-wire,
|
|
128
|
-
:root[data-oc-theme='gold'] .oc-sigil__use-wire {
|
|
129
|
-
display: inline;
|
|
130
|
-
}
|
|
131
|
-
/* wireframe stack thins to fewer visible planes — terminal register */
|
|
132
|
-
:root[data-oc-theme='orangecheck'] .oc-sigil__layer-1,
|
|
133
|
-
:root[data-oc-theme='orangecheck'] .oc-sigil__layer-3,
|
|
134
|
-
:root[data-oc-theme='phosphor'] .oc-sigil__layer-1,
|
|
135
|
-
:root[data-oc-theme='phosphor'] .oc-sigil__layer-3,
|
|
136
|
-
:root[data-oc-theme='lightning'] .oc-sigil__layer-1,
|
|
137
|
-
:root[data-oc-theme='lightning'] .oc-sigil__layer-3,
|
|
138
|
-
:root[data-oc-theme='gold'] .oc-sigil__layer-1,
|
|
139
|
-
:root[data-oc-theme='gold'] .oc-sigil__layer-3 {
|
|
140
|
-
display: none;
|
|
84
|
+
backface-visibility: hidden;
|
|
141
85
|
}
|
|
142
86
|
|
|
143
87
|
/* mobile = hidden, full stop — decoration never spends phone-fold real estate */
|
package/dist/tokens.js
CHANGED
|
@@ -955,7 +955,26 @@ var OC_GLYPHS = {
|
|
|
955
955
|
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>`,
|
|
956
956
|
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)"/>`
|
|
957
957
|
};
|
|
958
|
-
var
|
|
958
|
+
var DEPTH = 22;
|
|
959
|
+
var Z_STEP = 3;
|
|
960
|
+
var LAYERS = Array.from({ length: DEPTH }, (_, i) => i);
|
|
961
|
+
function layerStyle(i) {
|
|
962
|
+
const t = i / (DEPTH - 1);
|
|
963
|
+
let color;
|
|
964
|
+
if (t < 0.12) {
|
|
965
|
+
color = `color-mix(in oklab, var(--primary), white ${Math.round((0.12 - t) * 60)}%)`;
|
|
966
|
+
} else if (t < 0.62) {
|
|
967
|
+
const k = (t - 0.12) / 0.5;
|
|
968
|
+
color = `color-mix(in oklab, var(--primary), black ${Math.round(k * 42)}%)`;
|
|
969
|
+
} else {
|
|
970
|
+
const k = (t - 0.62) / 0.38;
|
|
971
|
+
color = `color-mix(in oklab, color-mix(in oklab, var(--primary), black 42%), var(--background) ${Math.round(k * 100)}%)`;
|
|
972
|
+
}
|
|
973
|
+
return {
|
|
974
|
+
transform: `translateZ(${-i * Z_STEP}px)`,
|
|
975
|
+
color
|
|
976
|
+
};
|
|
977
|
+
}
|
|
959
978
|
function sub(markup, fg, ink) {
|
|
960
979
|
return markup.split("__FG__").join(fg).split("__INK__").join(ink).split("__BG__").join("none");
|
|
961
980
|
}
|
|
@@ -968,8 +987,7 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
968
987
|
for (const ch of glyph) h = h * 31 + ch.charCodeAt(0) | 0;
|
|
969
988
|
return (h % 7 - 3) * 1.5;
|
|
970
989
|
}, [glyph]);
|
|
971
|
-
const
|
|
972
|
-
const wire = react.useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
990
|
+
const mark = react.useMemo(() => sub(OC_GLYPHS[glyph], "none", "currentColor"), [glyph]);
|
|
973
991
|
react.useEffect(() => {
|
|
974
992
|
if (!parallax) return;
|
|
975
993
|
const el = parRef.current;
|
|
@@ -1017,14 +1035,17 @@ function OcSigil({ glyph, corner = "bottom-left", parallax = true, className })
|
|
|
1017
1035
|
className: cn("oc-sigil", `oc-sigil--${corner}`, className),
|
|
1018
1036
|
style: { "--oc-sigil-seed": `${seed}deg` },
|
|
1019
1037
|
children: [
|
|
1020
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1038
|
+
/* @__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 } }) }) }),
|
|
1039
|
+
/* @__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(
|
|
1040
|
+
"svg",
|
|
1041
|
+
{
|
|
1042
|
+
viewBox: "0 0 1024 1024",
|
|
1043
|
+
className: "oc-sigil__layer",
|
|
1044
|
+
style: layerStyle(n),
|
|
1045
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("use", { href: `#${id}-mark` })
|
|
1046
|
+
},
|
|
1047
|
+
n
|
|
1048
|
+
)) }) })
|
|
1028
1049
|
]
|
|
1029
1050
|
}
|
|
1030
1051
|
);
|