@orangecheck/design 0.28.1 → 0.28.3
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 +53 -93
- 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
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* oc-sigil — the brand mark as a
|
|
2
|
+
* oc-sigil — the brand mark as a translucent 3D watermark (aurora depth R3).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* (
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* prefers-reduced-motion.
|
|
4
|
+
* A large, see-through extruded relief of the verb's mark, sitting behind the
|
|
5
|
+
* hero and bleeding off a corner. Many thin <use> layers under perspective +
|
|
6
|
+
* translateZ give real depth (a lit front face, shadowed walls, a back that
|
|
7
|
+
* dissolves into --background); the whole object is composited at a low
|
|
8
|
+
* `--oc-sigil-opacity` so the aurora reads through it — present, dimensional,
|
|
9
|
+
* but muted. The drift carries `.oc-ambient` (family oc_motion pause) and
|
|
10
|
+
* freezes under prefers-reduced-motion.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* Responsive by default: size is a clamp() so it scales with the viewport, and
|
|
13
|
+
* it stays visible (smaller, quieter) on phones. Position + size are tunable
|
|
14
|
+
* per-site via --oc-sigil-size / --oc-sigil-opacity / the corner classes.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* skins show the wireframe stack instead.
|
|
16
|
+
* PRESERVE-3D FOOTGUN: opacity/mask/filter/overflow live on the OUTER wrapper
|
|
17
|
+
* ONLY — never on .oc-sigil__drift / .oc-sigil__par, or the 3D stack flattens.
|
|
20
18
|
*/
|
|
21
19
|
|
|
22
20
|
.oc-sigil {
|
|
@@ -24,28 +22,38 @@
|
|
|
24
22
|
pointer-events: none;
|
|
25
23
|
contain: layout paint;
|
|
26
24
|
perspective: 1100px;
|
|
27
|
-
/*
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
25
|
+
/* responsive footprint — scales with the smaller viewport axis, clamped */
|
|
26
|
+
width: var(--oc-sigil-size, clamp(240px, 52vmin, 600px));
|
|
27
|
+
height: var(--oc-sigil-size, clamp(240px, 52vmin, 600px));
|
|
28
|
+
/* translucent: the whole relief composites at this alpha so the aurora and
|
|
29
|
+
page read through it (a watermark, not an opaque object) */
|
|
30
|
+
opacity: var(--oc-sigil-opacity, 0.42);
|
|
31
|
+
/* soft edge fade so the mark dissolves into the field rather than ending in
|
|
32
|
+
a hard box (on the wrapper, which is safe for preserve-3d) */
|
|
33
|
+
-webkit-mask-image: radial-gradient(125% 125% at 55% 45%, #000 42%, transparent 90%);
|
|
34
|
+
mask-image: radial-gradient(125% 125% at 55% 45%, #000 42%, transparent 90%);
|
|
35
|
+
}
|
|
36
|
+
:root.dark .oc-sigil {
|
|
37
|
+
opacity: var(--oc-sigil-opacity, 0.5);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
|
-
/* corner anchors — the bleed crops against the hero's overflow-hidden
|
|
40
|
+
/* corner anchors — the bleed crops against the hero's overflow-hidden. Offsets
|
|
41
|
+
are a share of the mark's own size so the crop is consistent at every width. */
|
|
34
42
|
.oc-sigil--bottom-left {
|
|
35
|
-
left: -
|
|
36
|
-
bottom: -
|
|
43
|
+
left: -14%;
|
|
44
|
+
bottom: -18%;
|
|
37
45
|
}
|
|
38
46
|
.oc-sigil--bottom-right {
|
|
39
|
-
right: -
|
|
40
|
-
bottom: -
|
|
47
|
+
right: -14%;
|
|
48
|
+
bottom: -18%;
|
|
41
49
|
}
|
|
42
50
|
.oc-sigil--top-left {
|
|
43
|
-
left: -
|
|
44
|
-
top: -
|
|
51
|
+
left: -14%;
|
|
52
|
+
top: -16%;
|
|
45
53
|
}
|
|
46
54
|
.oc-sigil--top-right {
|
|
47
|
-
right: -
|
|
48
|
-
top: -
|
|
55
|
+
right: -14%;
|
|
56
|
+
top: -16%;
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
.oc-sigil__drift {
|
|
@@ -65,85 +73,37 @@
|
|
|
65
73
|
@keyframes oc-sigil-drift {
|
|
66
74
|
0%,
|
|
67
75
|
100% {
|
|
68
|
-
transform: rotateX(
|
|
76
|
+
transform: rotateX(19deg) rotateY(calc(-24deg + var(--oc-sigil-seed, 0deg)));
|
|
69
77
|
}
|
|
70
78
|
50% {
|
|
71
|
-
transform: rotateX(
|
|
79
|
+
transform: rotateX(25deg) rotateY(calc(-14deg + var(--oc-sigil-seed, 0deg)));
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
|
|
83
|
+
/* Layers are absolutely stacked; their translateZ + color ramp (the 3D relief)
|
|
84
|
+
are computed per-layer in the component so depth is tunable in one place. The
|
|
85
|
+
mark is always the OUTLINE form (the tile drops away), extruded into a slab
|
|
86
|
+
that recolors per skin via currentColor. */
|
|
75
87
|
.oc-sigil__layer {
|
|
76
88
|
position: absolute;
|
|
77
89
|
inset: 0;
|
|
78
90
|
width: 100%;
|
|
79
91
|
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%);
|
|
92
|
+
backface-visibility: hidden;
|
|
111
93
|
}
|
|
112
94
|
|
|
113
|
-
/*
|
|
114
|
-
|
|
115
|
-
the
|
|
116
|
-
.
|
|
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;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* mobile = hidden, full stop — decoration never spends phone-fold real estate */
|
|
95
|
+
/* Phones: stay visible but quieter and pushed further into the corner, so it
|
|
96
|
+
reads as ambient texture behind single-column content, never a wall behind
|
|
97
|
+
the copy. (It does NOT vanish — decoration should account for the screen,
|
|
98
|
+
not abandon it.) */
|
|
144
99
|
@media (max-width: 640px) {
|
|
145
100
|
.oc-sigil {
|
|
146
|
-
|
|
101
|
+
width: var(--oc-sigil-size-sm, clamp(180px, 62vw, 320px));
|
|
102
|
+
height: var(--oc-sigil-size-sm, clamp(180px, 62vw, 320px));
|
|
103
|
+
opacity: var(--oc-sigil-opacity-sm, 0.28);
|
|
104
|
+
}
|
|
105
|
+
:root.dark .oc-sigil {
|
|
106
|
+
opacity: var(--oc-sigil-opacity-sm, 0.34);
|
|
147
107
|
}
|
|
148
108
|
}
|
|
149
109
|
|
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.14) {
|
|
965
|
+
color = `color-mix(in oklab, var(--primary), white ${Math.round((0.14 - t) * 26)}%)`;
|
|
966
|
+
} else if (t < 0.6) {
|
|
967
|
+
const k = (t - 0.14) / 0.46;
|
|
968
|
+
color = `color-mix(in oklab, var(--primary), black ${Math.round(k * 34)}%)`;
|
|
969
|
+
} else {
|
|
970
|
+
const k = (t - 0.6) / 0.4;
|
|
971
|
+
color = `color-mix(in oklab, color-mix(in oklab, var(--primary), black 34%), 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
|
);
|