@atme-lab/ui-kit 0.1.23 → 0.1.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/primitives/Term/Term.d.ts +1 -2
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs24.js.map +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs31.js +1 -1
- package/dist/index.cjs387.js +1 -1
- package/dist/index.cjs41.js +1 -1
- package/dist/index.cjs413.js +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs415.js +1 -1
- package/dist/index.cjs416.js +1 -1
- package/dist/index.cjs42.js +1 -1
- package/dist/index.cjs430.js +1 -1
- package/dist/index.cjs432.js +1 -1
- package/dist/index.cjs435.js +1 -1
- package/dist/index.cjs44.js +1 -1
- package/dist/index.cjs445.js +6 -1
- package/dist/index.cjs445.js.map +1 -1
- package/dist/index.cjs446.js +6 -1
- package/dist/index.cjs446.js.map +1 -1
- package/dist/index.cjs447.js +6 -1
- package/dist/index.cjs447.js.map +1 -1
- package/dist/index.cjs448.js +6 -1
- package/dist/index.cjs448.js.map +1 -1
- package/dist/index.cjs449.js +1 -1
- package/dist/index.cjs449.js.map +1 -1
- package/dist/index.cjs45.js +1 -1
- package/dist/index.cjs450.js +1 -1
- package/dist/index.cjs450.js.map +1 -1
- package/dist/index.cjs451.js +1 -6
- package/dist/index.cjs451.js.map +1 -1
- package/dist/index.cjs452.js +1 -6
- package/dist/index.cjs452.js.map +1 -1
- package/dist/index.cjs453.js +1 -6
- package/dist/index.cjs453.js.map +1 -1
- package/dist/index.cjs454.js +1 -6
- package/dist/index.cjs454.js.map +1 -1
- package/dist/index.cjs46.js +1 -1
- package/dist/index.cjs46.js.map +1 -1
- package/dist/index.cjs47.js +1 -1
- package/dist/index.cjs48.js +1 -1
- package/dist/index.cjs49.js +1 -1
- package/dist/index.cjs50.js +1 -1
- package/dist/index.cjs51.js +1 -1
- package/dist/index.cjs51.js.map +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs53.js +1 -1
- package/dist/index.cjs54.js +1 -1
- package/dist/index.cjs54.js.map +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs56.js.map +1 -1
- package/dist/index.cjs57.js +1 -1
- package/dist/index.cjs57.js.map +1 -1
- package/dist/index.cjs58.js +1 -1
- package/dist/index.cjs59.js +1 -1
- package/dist/index.cjs59.js.map +1 -1
- package/dist/index.cjs60.js +1 -1
- package/dist/index.cjs61.js +1 -1
- package/dist/index.cjs61.js.map +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs62.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs64.js.map +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs65.js.map +1 -1
- package/dist/index.cjs66.js +1 -1
- package/dist/index.cjs66.js.map +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs67.js.map +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs74.js +1 -1
- package/dist/index.cjs75.js +1 -1
- package/dist/index.cjs76.js +1 -1
- package/dist/index.cjs76.js.map +1 -1
- package/dist/index.cjs77.js +1 -1
- package/dist/index.cjs77.js.map +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs80.js.map +1 -1
- package/dist/index.cjs81.js +1 -1
- package/dist/index.cjs81.js.map +1 -1
- package/dist/index.cjs82.js +1 -2
- package/dist/index.cjs82.js.map +1 -1
- package/dist/index.cjs83.js +2 -1
- package/dist/index.cjs83.js.map +1 -1
- package/dist/index.cjs84.js +1 -1
- package/dist/index.cjs84.js.map +1 -1
- package/dist/index.cjs85.js +1 -1
- package/dist/index.cjs85.js.map +1 -1
- package/dist/index.cjs86.js +1 -1
- package/dist/index.cjs86.js.map +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.esm10.js +2 -2
- package/dist/index.esm11.js +1 -1
- package/dist/index.esm12.js +3 -3
- package/dist/index.esm13.js +1 -1
- package/dist/index.esm14.js +1 -1
- package/dist/index.esm15.js +1 -1
- package/dist/index.esm16.js +1 -1
- package/dist/index.esm18.js +1 -1
- package/dist/index.esm19.js +1 -1
- package/dist/index.esm20.js +1 -1
- package/dist/index.esm21.js +2 -2
- package/dist/index.esm22.js +2 -2
- package/dist/index.esm23.js +1 -1
- package/dist/index.esm24.js +8 -69
- package/dist/index.esm24.js.map +1 -1
- package/dist/index.esm25.js +2 -2
- package/dist/index.esm27.js +1 -1
- package/dist/index.esm28.js +1 -1
- package/dist/index.esm29.js +2 -2
- package/dist/index.esm30.js +1 -1
- package/dist/index.esm31.js +3 -3
- package/dist/index.esm387.js +1 -1
- package/dist/index.esm41.js +1 -1
- package/dist/index.esm413.js +1 -1
- package/dist/index.esm414.js +1 -1
- package/dist/index.esm415.js +1 -1
- package/dist/index.esm416.js +1 -1
- package/dist/index.esm42.js +1 -1
- package/dist/index.esm430.js +1 -1
- package/dist/index.esm432.js +6 -6
- package/dist/index.esm435.js +1 -1
- package/dist/index.esm44.js +32 -40
- package/dist/index.esm44.js.map +1 -1
- package/dist/index.esm445.js +21 -6
- package/dist/index.esm445.js.map +1 -1
- package/dist/index.esm446.js +9 -10
- package/dist/index.esm446.js.map +1 -1
- package/dist/index.esm447.js +38 -7
- package/dist/index.esm447.js.map +1 -1
- package/dist/index.esm448.js +18 -4
- package/dist/index.esm448.js.map +1 -1
- package/dist/index.esm449.js +5 -84
- package/dist/index.esm449.js.map +1 -1
- package/dist/index.esm45.js +11 -47
- package/dist/index.esm450.js +9 -37
- package/dist/index.esm450.js.map +1 -1
- package/dist/index.esm451.js +7 -21
- package/dist/index.esm451.js.map +1 -1
- package/dist/index.esm452.js +4 -9
- package/dist/index.esm452.js.map +1 -1
- package/dist/index.esm453.js +85 -38
- package/dist/index.esm453.js.map +1 -1
- package/dist/index.esm454.js +38 -18
- package/dist/index.esm454.js.map +1 -1
- package/dist/index.esm46.js +30 -11
- package/dist/index.esm46.js.map +1 -1
- package/dist/index.esm47.js +27 -40
- package/dist/index.esm47.js.map +1 -1
- package/dist/index.esm48.js +5 -4
- package/dist/index.esm48.js.map +1 -1
- package/dist/index.esm49.js +2 -6
- package/dist/index.esm49.js.map +1 -1
- package/dist/index.esm50.js +2 -9
- package/dist/index.esm50.js.map +1 -1
- package/dist/index.esm51.js +65 -28
- package/dist/index.esm51.js.map +1 -1
- package/dist/index.esm52.js +29 -2
- package/dist/index.esm52.js.map +1 -1
- package/dist/index.esm53.js +9 -2
- package/dist/index.esm53.js.map +1 -1
- package/dist/index.esm54.js +5 -88
- package/dist/index.esm54.js.map +1 -1
- package/dist/index.esm55.js +47 -35
- package/dist/index.esm55.js.map +1 -1
- package/dist/index.esm56.js +11 -127
- package/dist/index.esm56.js.map +1 -1
- package/dist/index.esm57.js +88 -29
- package/dist/index.esm57.js.map +1 -1
- package/dist/index.esm58.js +34 -64
- package/dist/index.esm58.js.map +1 -1
- package/dist/index.esm59.js +127 -41
- package/dist/index.esm59.js.map +1 -1
- package/dist/index.esm60.js +8 -10
- package/dist/index.esm60.js.map +1 -1
- package/dist/index.esm61.js +28 -17
- package/dist/index.esm61.js.map +1 -1
- package/dist/index.esm62.js +41 -16
- package/dist/index.esm62.js.map +1 -1
- package/dist/index.esm63.js +6 -15
- package/dist/index.esm63.js.map +1 -1
- package/dist/index.esm64.js +8 -96
- package/dist/index.esm64.js.map +1 -1
- package/dist/index.esm65.js +7 -7
- package/dist/index.esm65.js.map +1 -1
- package/dist/index.esm66.js +16 -9
- package/dist/index.esm66.js.map +1 -1
- package/dist/index.esm67.js +97 -7
- package/dist/index.esm67.js.map +1 -1
- package/dist/index.esm69.js +42 -39
- package/dist/index.esm69.js.map +1 -1
- package/dist/index.esm70.js +40 -32
- package/dist/index.esm70.js.map +1 -1
- package/dist/index.esm71.js +36 -8
- package/dist/index.esm71.js.map +1 -1
- package/dist/index.esm72.js +39 -32
- package/dist/index.esm72.js.map +1 -1
- package/dist/index.esm74.js +6 -36
- package/dist/index.esm74.js.map +1 -1
- package/dist/index.esm75.js +8 -10
- package/dist/index.esm75.js.map +1 -1
- package/dist/index.esm76.js +17 -30
- package/dist/index.esm76.js.map +1 -1
- package/dist/index.esm77.js +16 -9
- package/dist/index.esm77.js.map +1 -1
- package/dist/index.esm80.js +4 -55
- package/dist/index.esm80.js.map +1 -1
- package/dist/index.esm81.js +55 -257
- package/dist/index.esm81.js.map +1 -1
- package/dist/index.esm82.js +208 -1637
- package/dist/index.esm82.js.map +1 -1
- package/dist/index.esm83.js +1685 -1413
- package/dist/index.esm83.js.map +1 -1
- package/dist/index.esm84.js +1286 -260
- package/dist/index.esm84.js.map +1 -1
- package/dist/index.esm85.js +387 -5
- package/dist/index.esm85.js.map +1 -1
- package/dist/index.esm86.js +5 -3
- package/dist/index.esm86.js.map +1 -1
- package/dist/index.esm9.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui-kit.css +1 -1
- package/package.json +1 -1
package/dist/index.esm56.js
CHANGED
|
@@ -1,131 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
function I({ cell: i, colors: o }) {
|
|
10
|
-
const c = o[i.bgColorIndex] ?? o[0], t = o[i.shapeColorIndex] ?? o[1], a = Math.min(i.width, i.height), {
|
|
11
|
-
x,
|
|
12
|
-
y: C,
|
|
13
|
-
width: j,
|
|
14
|
-
height: b,
|
|
15
|
-
shapeType: l,
|
|
16
|
-
triangleIndex: d,
|
|
17
|
-
stripeDirection: h,
|
|
18
|
-
stripeCount: r = 4,
|
|
19
|
-
stripeMask: v,
|
|
20
|
-
animationDelay: N,
|
|
21
|
-
animationDuration: f,
|
|
22
|
-
animationScaleFrom: $ = 0.9,
|
|
23
|
-
dotScale: m = 0.45,
|
|
24
|
-
animationType: p,
|
|
25
|
-
animationPhase: k = 0
|
|
26
|
-
} = i, g = h === 1 ? a : a / (r * 2 - 1), u = h === 1 ? a / (r * 2 - 1) : a, P = v ?? Array(r).fill(!0), w = {
|
|
27
|
-
position: "absolute",
|
|
28
|
-
left: x,
|
|
29
|
-
top: C,
|
|
30
|
-
width: j,
|
|
31
|
-
height: b,
|
|
32
|
-
"--cell-delay": `${N}ms`,
|
|
33
|
-
"--cell-duration": `${f}ms`,
|
|
34
|
-
"--cell-scale-from": $,
|
|
35
|
-
"--cell-animation-phase": `${k}ms`
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ s.jsx("div", { className: e.cell, style: w, "aria-hidden": !0, children: /* @__PURE__ */ s.jsxs(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
className: T(
|
|
41
|
-
e.cellInner,
|
|
42
|
-
p === "breathe" && e.cellBreathes,
|
|
43
|
-
p === "pulse" && e.cellPulses,
|
|
44
|
-
p === "opacity" && e.cellOpacity
|
|
45
|
-
),
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ s.jsx("div", { className: e.bg, style: { backgroundColor: c } }),
|
|
48
|
-
l === "circle" && /* @__PURE__ */ s.jsx(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
className: e.shapeCircle,
|
|
52
|
-
style: { backgroundColor: t }
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
l === "dot" && /* @__PURE__ */ s.jsx(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
className: e.shapeDot,
|
|
59
|
-
style: {
|
|
60
|
-
backgroundColor: t,
|
|
61
|
-
width: `${m * 100}%`,
|
|
62
|
-
height: `${m * 100}%`
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
l === "triangle" && d !== void 0 && y[d] && /* @__PURE__ */ s.jsx(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
className: e.shapeTriangle,
|
|
70
|
-
style: {
|
|
71
|
-
backgroundColor: t,
|
|
72
|
-
clipPath: D(y[d])
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
l === "diamond" && /* @__PURE__ */ s.jsx(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: e.shapeDiamond,
|
|
80
|
-
style: { backgroundColor: t }
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
l === "cross" && /* @__PURE__ */ s.jsxs("div", { className: e.shapeCross, children: [
|
|
84
|
-
/* @__PURE__ */ s.jsx(
|
|
85
|
-
"div",
|
|
86
|
-
{
|
|
87
|
-
className: e.crossBar,
|
|
88
|
-
style: { backgroundColor: t }
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ s.jsx(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
className: e.crossBarVertical,
|
|
95
|
-
style: { backgroundColor: t }
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
] }),
|
|
99
|
-
l === "stripes" && /* @__PURE__ */ s.jsx("div", { className: e.stripes, children: Array.from(
|
|
100
|
-
{ length: r },
|
|
101
|
-
(S, n) => P[n] ? /* @__PURE__ */ s.jsx(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: e.stripe,
|
|
105
|
-
style: {
|
|
106
|
-
backgroundColor: t,
|
|
107
|
-
...h === 1 ? {
|
|
108
|
-
top: `${2 * n * u / a * 100}%`,
|
|
109
|
-
left: 0,
|
|
110
|
-
width: "100%",
|
|
111
|
-
height: `${u / a * 100}%`
|
|
112
|
-
} : {
|
|
113
|
-
left: `${2 * n * g / a * 100}%`,
|
|
114
|
-
top: 0,
|
|
115
|
-
width: `${g / a * 100}%`,
|
|
116
|
-
height: "100%"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
n
|
|
121
|
-
) : null
|
|
122
|
-
) })
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
) });
|
|
126
|
-
}
|
|
127
|
-
I.displayName = "PatternCell";
|
|
2
|
+
const e = "_root_yhe7w_1", o = "_filename_yhe7w_8", r = "_code_yhe7w_15", t = "_error_yhe7w_50", _ = {
|
|
3
|
+
root: e,
|
|
4
|
+
filename: o,
|
|
5
|
+
code: r,
|
|
6
|
+
error: t
|
|
7
|
+
};
|
|
128
8
|
export {
|
|
129
|
-
|
|
9
|
+
r as code,
|
|
10
|
+
_ as default,
|
|
11
|
+
t as error,
|
|
12
|
+
o as filename,
|
|
13
|
+
e as root
|
|
130
14
|
};
|
|
131
15
|
//# sourceMappingURL=index.esm56.js.map
|
package/dist/index.esm56.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm56.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.esm56.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/index.esm57.js
CHANGED
|
@@ -1,33 +1,92 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
const w = [
|
|
3
|
+
[[0, 0], [1, 0], [0, 1]],
|
|
4
|
+
[[0, 0], [1, 0], [1, 1]],
|
|
5
|
+
[[0, 0], [0, 1], [1, 1]],
|
|
6
|
+
[[0, 1], [1, 0], [1, 1]]
|
|
7
|
+
], F = 9301, X = 49297, R = 233280, k = 4, M = 1, b = 8, H = 0.12, Y = 0.3, E = { circle: 0.2, dot: 0.35, triangle: 0.5, diamond: 0.62, cross: 0.75 }, z = 0.3, V = 0.3, j = 450, v = 320, Z = 300, q = 0.8, J = 0.17, T = 0.25, d = 0.25, K = 0.25, Q = 7e3, $ = 2, W = 5, g = 0.75;
|
|
8
|
+
function _(t, o, s) {
|
|
9
|
+
return Math.floor(s() * (o - t + 1)) + t;
|
|
10
|
+
}
|
|
11
|
+
function et(t) {
|
|
12
|
+
return () => (t = (t * F + X) % R, t / R);
|
|
13
|
+
}
|
|
14
|
+
function at(t, o, s, I, r, c = "right", e = 2) {
|
|
15
|
+
return tt(t, o, s, I, r, c, e);
|
|
16
|
+
}
|
|
17
|
+
function tt(t, o, s, I, r, c, e) {
|
|
18
|
+
if (t <= 0 || o <= 0) return [];
|
|
19
|
+
const N = Math.max(k, s), A = Math.max(M, Math.floor(o / N)), i = Math.min(b, Math.max(M, e));
|
|
20
|
+
let a = 1;
|
|
21
|
+
for (; a < A && o / (a + 1) >= N; )
|
|
22
|
+
a++;
|
|
23
|
+
let n = o / a;
|
|
24
|
+
n > t && (n = t, a = Math.max(M, Math.floor(o / n)));
|
|
25
|
+
const y = t / i, L = o / i;
|
|
26
|
+
if (n = Math.min(n, y, L), n <= 0) return [];
|
|
27
|
+
a = Math.max(M, Math.floor(o / n));
|
|
28
|
+
const C = Math.max(M, Math.floor(t / n)), x = () => r() > H, P = (l) => _(Math.max(M, Math.floor(l * Y)), l, r), f = c === "right" || c === "left", O = f ? a : C, u = f ? C : a, p = c === "right" || c === "bottom", S = [];
|
|
29
|
+
for (let l = 0; l < O; l++) {
|
|
30
|
+
if (!x()) continue;
|
|
31
|
+
const m = P(u), D = p ? u - m : 0, U = p ? u : m;
|
|
32
|
+
for (let h = D; h < U; h++) {
|
|
33
|
+
const B = f ? h : l, G = f ? l : h;
|
|
34
|
+
nt(S, B * n, G * n, n, n, I, r);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return S;
|
|
38
|
+
}
|
|
39
|
+
function ot(t) {
|
|
40
|
+
const o = t();
|
|
41
|
+
if (o < E.circle) return { shapeType: "circle" };
|
|
42
|
+
if (o < E.dot)
|
|
43
|
+
return { shapeType: "dot", dotScale: z + t() * V };
|
|
44
|
+
if (o < E.triangle)
|
|
45
|
+
return {
|
|
46
|
+
shapeType: "triangle",
|
|
47
|
+
triangleIndex: _(0, w.length - 1, t)
|
|
48
|
+
};
|
|
49
|
+
if (o < E.diamond) return { shapeType: "diamond" };
|
|
50
|
+
if (o < E.cross) return { shapeType: "cross" };
|
|
51
|
+
const s = _($, W, t);
|
|
52
|
+
return {
|
|
53
|
+
shapeType: "stripes",
|
|
54
|
+
stripeDirection: t() > 0.35 ? 1 : 0,
|
|
55
|
+
stripeCount: s,
|
|
56
|
+
stripeMask: Array.from({ length: s }, () => t() > 1 - g)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function nt(t, o, s, I, r, c, e) {
|
|
60
|
+
const N = _(0, c - 1, e);
|
|
61
|
+
let A = _(0, c - 1, e);
|
|
62
|
+
for (; A === N; )
|
|
63
|
+
A = _(0, c - 1, e);
|
|
64
|
+
const i = ot(e), a = e();
|
|
65
|
+
let n;
|
|
66
|
+
a < T ? n = "breathe" : a < T + d ? n = "pulse" : a < T + d + K && (n = "opacity"), t.push({
|
|
67
|
+
x: o,
|
|
68
|
+
y: s,
|
|
69
|
+
width: I,
|
|
70
|
+
height: r,
|
|
71
|
+
bgColorIndex: N,
|
|
72
|
+
shapeColorIndex: A,
|
|
73
|
+
shapeType: i.shapeType,
|
|
74
|
+
triangleIndex: i.triangleIndex,
|
|
75
|
+
stripeDirection: i.stripeDirection,
|
|
76
|
+
stripeCount: i.stripeCount,
|
|
77
|
+
stripeMask: i.stripeMask,
|
|
78
|
+
animationDelay: Math.floor(e() * j),
|
|
79
|
+
animationDuration: v + Math.floor(e() * Z),
|
|
80
|
+
animationScaleFrom: q + e() * J,
|
|
81
|
+
dotScale: i.dotScale,
|
|
82
|
+
animationType: n,
|
|
83
|
+
animationPhase: n ? Math.floor(e() * Q) : void 0
|
|
84
|
+
});
|
|
85
|
+
}
|
|
20
86
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
r as wrapper,
|
|
26
|
-
_ as wrapperDisabled,
|
|
27
|
-
p as wrapperError,
|
|
28
|
-
s as wrapperFullWidth,
|
|
29
|
-
o as wrapperLg,
|
|
30
|
-
n as wrapperMd,
|
|
31
|
-
t as wrapperSm
|
|
87
|
+
w as TRIANGLE_TEMPLATES,
|
|
88
|
+
et as createSeededRandom,
|
|
89
|
+
at as generatePattern,
|
|
90
|
+
_ as getRandomInt
|
|
32
91
|
};
|
|
33
92
|
//# sourceMappingURL=index.esm57.js.map
|
package/dist/index.esm57.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm57.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm57.js","sources":["../src/components/content/DecorativeFrame/utils/patternGenerator.ts"],"sourcesContent":["export type Point2D = [number, number];\n\nexport const TRIANGLE_TEMPLATES: Point2D[][] = [\n [[0, 0], [1, 0], [0, 1]],\n [[0, 0], [1, 0], [1, 1]],\n [[0, 0], [0, 1], [1, 1]],\n [[0, 1], [1, 0], [1, 1]],\n];\n\nexport type ShapeType =\n | 'circle'\n | 'dot'\n | 'triangle'\n | 'diamond'\n | 'cross'\n | 'stripes'\n | null;\n\nexport interface CellConfig {\n x: number;\n y: number;\n width: number;\n height: number;\n bgColorIndex: number;\n shapeColorIndex: number;\n shapeType: ShapeType;\n triangleIndex?: number;\n stripeDirection?: 0 | 1;\n stripeCount?: number;\n stripeMask?: boolean[];\n animationDelay: number;\n animationDuration: number;\n animationScaleFrom?: number;\n dotScale?: number;\n animationType?: 'breathe' | 'pulse' | 'opacity';\n animationPhase?: number;\n}\n\nconst RNG_MULTIPLIER = 9301;\nconst RNG_INCREMENT = 49297;\nconst RNG_MODULUS = 233280;\n\nconst MIN_BOX_SIZE = 4;\nconst STRIP_LINES_MIN = 1;\nconst STRIP_LINES_MAX = 8;\nconst EMPTY_ROW_CHANCE = 0.12;\nconst FILL_COUNT_MIN_RATIO = 0.3;\n\nconst SHAPE_PROB = { circle: 0.2, dot: 0.35, triangle: 0.5, diamond: 0.62, cross: 0.75 } as const;\nconst DOT_SCALE_MIN = 0.3;\nconst DOT_SCALE_RANGE = 0.3;\nconst ANIM_DELAY_MAX = 450;\nconst ANIM_DURATION_MIN = 320;\nconst ANIM_DURATION_RANGE = 300;\nconst ANIM_SCALE_FROM_MIN = 0.8;\nconst ANIM_SCALE_FROM_RANGE = 0.17;\n// Animation\nconst ANIM_BREATHE_CHANCE = 0.25;\nconst ANIM_PULSE_CHANCE = 0.25;\nconst ANIM_OPACITY_CHANCE = 0.25;\nconst ANIM_PHASE_MAX = 7000;\nconst STRIPE_COUNT_MIN = 2;\nconst STRIPE_COUNT_MAX = 5;\nconst STRIPE_VISIBLE_CHANCE = 0.75;\n\nexport function getRandomInt(min: number, max: number, rng: () => number): number {\n return Math.floor(rng() * (max - min + 1)) + min;\n}\n\nexport function createSeededRandom(seed: number): () => number {\n return () => {\n seed = (seed * RNG_MULTIPLIER + RNG_INCREMENT) % RNG_MODULUS;\n return seed / RNG_MODULUS;\n };\n}\n\nexport type PatternEdge = 'top' | 'right' | 'bottom' | 'left';\n\nexport function generatePattern(\n stripWidth: number,\n stripHeight: number,\n boxSize: number,\n colorCount: number,\n rng: () => number,\n edge: PatternEdge = 'right',\n stripDensity: number = 2\n): CellConfig[] {\n return generateEdgePattern(stripWidth, stripHeight, boxSize, colorCount, rng, edge, stripDensity);\n}\n\nfunction generateEdgePattern(\n stripWidth: number,\n stripHeight: number,\n boxSize: number,\n colorCount: number,\n rng: () => number,\n edge: PatternEdge,\n stripDensity: number\n): CellConfig[] {\n if (stripWidth <= 0 || stripHeight <= 0) return [];\n\n const safeBoxSize = Math.max(MIN_BOX_SIZE, boxSize);\n const maxRows = Math.max(STRIP_LINES_MIN, Math.floor(stripHeight / safeBoxSize));\n const minLines = Math.min(STRIP_LINES_MAX, Math.max(STRIP_LINES_MIN, stripDensity));\n\n let rowCount = 1;\n while (rowCount < maxRows && stripHeight / (rowCount + 1) >= safeBoxSize) {\n rowCount++;\n }\n\n let cellSize = stripHeight / rowCount;\n if (cellSize > stripWidth) {\n cellSize = stripWidth;\n rowCount = Math.max(STRIP_LINES_MIN, Math.floor(stripHeight / cellSize));\n }\n\n const maxCellByWidth = stripWidth / minLines;\n const maxCellByHeight = stripHeight / minLines;\n cellSize = Math.min(cellSize, maxCellByWidth, maxCellByHeight);\n if (cellSize <= 0) return [];\n\n rowCount = Math.max(STRIP_LINES_MIN, Math.floor(stripHeight / cellSize));\n const colCount = Math.max(STRIP_LINES_MIN, Math.floor(stripWidth / cellSize));\n\n const shouldFill = () => rng() > EMPTY_ROW_CHANCE;\n const fillCount = (max: number) =>\n getRandomInt(Math.max(STRIP_LINES_MIN, Math.floor(max * FILL_COUNT_MIN_RATIO)), max, rng);\n\n const isVerticalStrip = edge === 'right' || edge === 'left';\n const primaryCount = isVerticalStrip ? rowCount : colCount;\n const secondaryCount = isVerticalStrip ? colCount : rowCount;\n const isEndEdge = edge === 'right' || edge === 'bottom';\n\n const cells: CellConfig[] = [];\n\n for (let i = 0; i < primaryCount; i++) {\n if (!shouldFill()) continue;\n\n const count = fillCount(secondaryCount);\n const start = isEndEdge ? secondaryCount - count : 0;\n const end = isEndEdge ? secondaryCount : count;\n\n for (let j = start; j < end; j++) {\n const col = isVerticalStrip ? j : i;\n const row = isVerticalStrip ? i : j;\n pushCell(cells, col * cellSize, row * cellSize, cellSize, cellSize, colorCount, rng);\n }\n }\n\n return cells;\n}\n\nfunction pickShapeType(rng: () => number): {\n shapeType: ShapeType;\n triangleIndex?: number;\n stripeDirection?: 0 | 1;\n stripeCount?: number;\n stripeMask?: boolean[];\n dotScale?: number;\n} {\n const roll = rng();\n\n if (roll < SHAPE_PROB.circle) return { shapeType: 'circle' };\n if (roll < SHAPE_PROB.dot) {\n return { shapeType: 'dot', dotScale: DOT_SCALE_MIN + rng() * DOT_SCALE_RANGE };\n }\n if (roll < SHAPE_PROB.triangle) {\n return {\n shapeType: 'triangle',\n triangleIndex: getRandomInt(0, TRIANGLE_TEMPLATES.length - 1, rng),\n };\n }\n if (roll < SHAPE_PROB.diamond) return { shapeType: 'diamond' };\n if (roll < SHAPE_PROB.cross) return { shapeType: 'cross' };\n\n const stripeCount = getRandomInt(STRIPE_COUNT_MIN, STRIPE_COUNT_MAX, rng);\n return {\n shapeType: 'stripes',\n stripeDirection: rng() > 0.35 ? 1 : 0,\n stripeCount,\n stripeMask: Array.from({ length: stripeCount }, () => rng() > 1 - STRIPE_VISIBLE_CHANCE),\n };\n}\n\nfunction pushCell(\n cells: CellConfig[],\n x: number,\n y: number,\n width: number,\n height: number,\n colorCount: number,\n rng: () => number\n): void {\n const bgColorIndex = getRandomInt(0, colorCount - 1, rng);\n let shapeColorIndex = getRandomInt(0, colorCount - 1, rng);\n while (shapeColorIndex === bgColorIndex) {\n shapeColorIndex = getRandomInt(0, colorCount - 1, rng);\n }\n\n const shape = pickShapeType(rng);\n\n const roll = rng();\n let animationType: 'breathe' | 'pulse' | 'opacity' | undefined;\n if (roll < ANIM_BREATHE_CHANCE) animationType = 'breathe';\n else if (roll < ANIM_BREATHE_CHANCE + ANIM_PULSE_CHANCE) animationType = 'pulse';\n else if (roll < ANIM_BREATHE_CHANCE + ANIM_PULSE_CHANCE + ANIM_OPACITY_CHANCE) animationType = 'opacity';\n\n cells.push({\n x,\n y,\n width,\n height,\n bgColorIndex,\n shapeColorIndex,\n shapeType: shape.shapeType,\n triangleIndex: shape.triangleIndex,\n stripeDirection: shape.stripeDirection,\n stripeCount: shape.stripeCount,\n stripeMask: shape.stripeMask,\n animationDelay: Math.floor(rng() * ANIM_DELAY_MAX),\n animationDuration: ANIM_DURATION_MIN + Math.floor(rng() * ANIM_DURATION_RANGE),\n animationScaleFrom: ANIM_SCALE_FROM_MIN + rng() * ANIM_SCALE_FROM_RANGE,\n dotScale: shape.dotScale,\n animationType,\n animationPhase: animationType ? Math.floor(rng() * ANIM_PHASE_MAX) : undefined,\n });\n}\n"],"names":["TRIANGLE_TEMPLATES","RNG_MULTIPLIER","RNG_INCREMENT","RNG_MODULUS","MIN_BOX_SIZE","STRIP_LINES_MIN","STRIP_LINES_MAX","EMPTY_ROW_CHANCE","FILL_COUNT_MIN_RATIO","SHAPE_PROB","DOT_SCALE_MIN","DOT_SCALE_RANGE","ANIM_DELAY_MAX","ANIM_DURATION_MIN","ANIM_DURATION_RANGE","ANIM_SCALE_FROM_MIN","ANIM_SCALE_FROM_RANGE","ANIM_BREATHE_CHANCE","ANIM_PULSE_CHANCE","ANIM_OPACITY_CHANCE","ANIM_PHASE_MAX","STRIPE_COUNT_MIN","STRIPE_COUNT_MAX","STRIPE_VISIBLE_CHANCE","getRandomInt","min","max","rng","createSeededRandom","seed","generatePattern","stripWidth","stripHeight","boxSize","colorCount","edge","stripDensity","generateEdgePattern","safeBoxSize","maxRows","minLines","rowCount","cellSize","maxCellByWidth","maxCellByHeight","colCount","shouldFill","fillCount","isVerticalStrip","primaryCount","secondaryCount","isEndEdge","cells","i","count","start","end","j","col","row","pushCell","pickShapeType","roll","stripeCount","x","y","width","height","bgColorIndex","shapeColorIndex","shape","animationType"],"mappings":";AAEO,MA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EAAA;AACb,MAAI4C;AACJ,EAAIT,IAAO7C,IAAqBsD,IAAgB,YACvCT,IAAO7C,IAAsBC,IAAmBqD,IAAgB,UAChET,IAAO7C,IAAsBC,IAAoBC,MAAqBoD,IAAgB,YAE/FnB,EAAM,KAAK;AAAA,IACT,GAAAY;AAAA,IACA,GAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,WAAWC,EAAM;AAAA,IACjB,eAAeA,EAAM;AAAA,IACrB,iBAAiBA,EAAM;AAAA,IACvB,aAAaA,EAAM;AAAA,IACnB,YAAYA,EAAM;AAAA,IAClB,gBAAgB,KAAK,MAAM3C,EAAA,IAAQf,CAAc;AAAA,IACjD,mBAAmBC,IAAoB,KAAK,MAAMc,EAAA,IAAQb,CAAmB;AAAA,IAC7E,oBAAoBC,IAAsBY,EAAA,IAAQX;AAAA,IAClD,UAAUsD,EAAM;AAAA,IAChB,eAAAC;AAAA,IACA,gBAAgBA,IAAgB,KAAK,MAAM5C,EAAA,IAAQP,CAAc,IAAI;AAAA,EAAA,CACtE;AACH;"}
|
package/dist/index.esm58.js
CHANGED
|
@@ -1,69 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
typographyXs: l,
|
|
24
|
-
"typography--sm": "_typography--sm_1c1gg_78",
|
|
25
|
-
typographySm: s,
|
|
26
|
-
"typography--base": "_typography--base_1c1gg_82",
|
|
27
|
-
typographyBase: n,
|
|
28
|
-
"typography--lg": "_typography--lg_1c1gg_86",
|
|
29
|
-
typographyLg: e,
|
|
30
|
-
"typography--xl": "_typography--xl_1c1gg_90",
|
|
31
|
-
typographyXl: i,
|
|
32
|
-
"typography--2xl": "_typography--2xl_1c1gg_94",
|
|
33
|
-
typography2Xl: d,
|
|
34
|
-
"typography--3xl": "_typography--3xl_1c1gg_98",
|
|
35
|
-
typography3Xl: x,
|
|
36
|
-
"typography--4xl": "_typography--4xl_1c1gg_102",
|
|
37
|
-
typography4Xl: H,
|
|
38
|
-
"typography--color-primary": "_typography--color-primary_1c1gg_107",
|
|
39
|
-
typographyColorPrimary: b,
|
|
40
|
-
"typography--color-secondary": "_typography--color-secondary_1c1gg_111",
|
|
41
|
-
typographyColorSecondary: m,
|
|
42
|
-
"typography--color-disabled": "_typography--color-disabled_1c1gg_115",
|
|
43
|
-
typographyColorDisabled: X
|
|
2
|
+
const t = "_root_mptdu_1", o = "_root--edge-top_mptdu_6", r = "_root--edge-bottom_mptdu_10", _ = "_root--edge-left_mptdu_14", p = "_root--edge-right_mptdu_18", e = "_content_mptdu_22", s = "_strip_mptdu_28", d = "_strip--top_mptdu_36", i = "_strip--bottom_mptdu_37", g = "_strip--left_mptdu_42", m = "_strip--right_mptdu_43", u = "_stripMirror_mptdu_48", n = {
|
|
3
|
+
root: t,
|
|
4
|
+
"root--edge-top": "_root--edge-top_mptdu_6",
|
|
5
|
+
rootEdgeTop: o,
|
|
6
|
+
"root--edge-bottom": "_root--edge-bottom_mptdu_10",
|
|
7
|
+
rootEdgeBottom: r,
|
|
8
|
+
"root--edge-left": "_root--edge-left_mptdu_14",
|
|
9
|
+
rootEdgeLeft: _,
|
|
10
|
+
"root--edge-right": "_root--edge-right_mptdu_18",
|
|
11
|
+
rootEdgeRight: p,
|
|
12
|
+
content: e,
|
|
13
|
+
strip: s,
|
|
14
|
+
"strip--top": "_strip--top_mptdu_36",
|
|
15
|
+
stripTop: d,
|
|
16
|
+
"strip--bottom": "_strip--bottom_mptdu_37",
|
|
17
|
+
stripBottom: i,
|
|
18
|
+
"strip--left": "_strip--left_mptdu_42",
|
|
19
|
+
stripLeft: g,
|
|
20
|
+
"strip--right": "_strip--right_mptdu_43",
|
|
21
|
+
stripRight: m,
|
|
22
|
+
stripMirror: u
|
|
44
23
|
};
|
|
45
24
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
o as typographyH3,
|
|
60
|
-
r as typographyH4,
|
|
61
|
-
t as typographyH5,
|
|
62
|
-
a as typographyH6,
|
|
63
|
-
e as typographyLg,
|
|
64
|
-
c as typographyOverline,
|
|
65
|
-
s as typographySm,
|
|
66
|
-
i as typographyXl,
|
|
67
|
-
l as typographyXs
|
|
25
|
+
e as content,
|
|
26
|
+
n as default,
|
|
27
|
+
t as root,
|
|
28
|
+
r as rootEdgeBottom,
|
|
29
|
+
_ as rootEdgeLeft,
|
|
30
|
+
p as rootEdgeRight,
|
|
31
|
+
o as rootEdgeTop,
|
|
32
|
+
s as strip,
|
|
33
|
+
i as stripBottom,
|
|
34
|
+
g as stripLeft,
|
|
35
|
+
u as stripMirror,
|
|
36
|
+
m as stripRight,
|
|
37
|
+
d as stripTop
|
|
68
38
|
};
|
|
69
39
|
//# sourceMappingURL=index.esm58.js.map
|
package/dist/index.esm58.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm58.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm58.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.esm59.js
CHANGED
|
@@ -1,45 +1,131 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
import { j as s } from "./index.esm37.js";
|
|
3
|
+
import T from "./index.esm43.js";
|
|
4
|
+
import { TRIANGLE_TEMPLATES as y } from "./index.esm57.js";
|
|
5
|
+
import e from "./index.esm388.js";
|
|
6
|
+
function D(i) {
|
|
7
|
+
return `polygon(${i.map(([c, t]) => `${c * 100}% ${t * 100}%`).join(", ")})`;
|
|
8
|
+
}
|
|
9
|
+
function I({ cell: i, colors: o }) {
|
|
10
|
+
const c = o[i.bgColorIndex] ?? o[0], t = o[i.shapeColorIndex] ?? o[1], a = Math.min(i.width, i.height), {
|
|
11
|
+
x,
|
|
12
|
+
y: C,
|
|
13
|
+
width: j,
|
|
14
|
+
height: b,
|
|
15
|
+
shapeType: l,
|
|
16
|
+
triangleIndex: d,
|
|
17
|
+
stripeDirection: h,
|
|
18
|
+
stripeCount: r = 4,
|
|
19
|
+
stripeMask: v,
|
|
20
|
+
animationDelay: N,
|
|
21
|
+
animationDuration: f,
|
|
22
|
+
animationScaleFrom: $ = 0.9,
|
|
23
|
+
dotScale: m = 0.45,
|
|
24
|
+
animationType: p,
|
|
25
|
+
animationPhase: k = 0
|
|
26
|
+
} = i, g = h === 1 ? a : a / (r * 2 - 1), u = h === 1 ? a / (r * 2 - 1) : a, P = v ?? Array(r).fill(!0), w = {
|
|
27
|
+
position: "absolute",
|
|
28
|
+
left: x,
|
|
29
|
+
top: C,
|
|
30
|
+
width: j,
|
|
31
|
+
height: b,
|
|
32
|
+
"--cell-delay": `${N}ms`,
|
|
33
|
+
"--cell-duration": `${f}ms`,
|
|
34
|
+
"--cell-scale-from": $,
|
|
35
|
+
"--cell-animation-phase": `${k}ms`
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ s.jsx("div", { className: e.cell, style: w, "aria-hidden": !0, children: /* @__PURE__ */ s.jsxs(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: T(
|
|
41
|
+
e.cellInner,
|
|
42
|
+
p === "breathe" && e.cellBreathes,
|
|
43
|
+
p === "pulse" && e.cellPulses,
|
|
44
|
+
p === "opacity" && e.cellOpacity
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ s.jsx("div", { className: e.bg, style: { backgroundColor: c } }),
|
|
48
|
+
l === "circle" && /* @__PURE__ */ s.jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: e.shapeCircle,
|
|
52
|
+
style: { backgroundColor: t }
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
l === "dot" && /* @__PURE__ */ s.jsx(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: e.shapeDot,
|
|
59
|
+
style: {
|
|
60
|
+
backgroundColor: t,
|
|
61
|
+
width: `${m * 100}%`,
|
|
62
|
+
height: `${m * 100}%`
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
l === "triangle" && d !== void 0 && y[d] && /* @__PURE__ */ s.jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: e.shapeTriangle,
|
|
70
|
+
style: {
|
|
71
|
+
backgroundColor: t,
|
|
72
|
+
clipPath: D(y[d])
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
l === "diamond" && /* @__PURE__ */ s.jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: e.shapeDiamond,
|
|
80
|
+
style: { backgroundColor: t }
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
l === "cross" && /* @__PURE__ */ s.jsxs("div", { className: e.shapeCross, children: [
|
|
84
|
+
/* @__PURE__ */ s.jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: e.crossBar,
|
|
88
|
+
style: { backgroundColor: t }
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ s.jsx(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: e.crossBarVertical,
|
|
95
|
+
style: { backgroundColor: t }
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] }),
|
|
99
|
+
l === "stripes" && /* @__PURE__ */ s.jsx("div", { className: e.stripes, children: Array.from(
|
|
100
|
+
{ length: r },
|
|
101
|
+
(S, n) => P[n] ? /* @__PURE__ */ s.jsx(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: e.stripe,
|
|
105
|
+
style: {
|
|
106
|
+
backgroundColor: t,
|
|
107
|
+
...h === 1 ? {
|
|
108
|
+
top: `${2 * n * u / a * 100}%`,
|
|
109
|
+
left: 0,
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: `${u / a * 100}%`
|
|
112
|
+
} : {
|
|
113
|
+
left: `${2 * n * g / a * 100}%`,
|
|
114
|
+
top: 0,
|
|
115
|
+
width: `${g / a * 100}%`,
|
|
116
|
+
height: "100%"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
n
|
|
121
|
+
) : null
|
|
122
|
+
) })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
) });
|
|
126
|
+
}
|
|
127
|
+
I.displayName = "PatternCell";
|
|
29
128
|
export {
|
|
30
|
-
|
|
31
|
-
a as island,
|
|
32
|
-
v as islandBordered,
|
|
33
|
-
o as islandElevationLg,
|
|
34
|
-
z as islandElevationMd,
|
|
35
|
-
_ as islandElevationNone,
|
|
36
|
-
t as islandElevationSm,
|
|
37
|
-
p as islandElevationXl,
|
|
38
|
-
l as islandSizeLg,
|
|
39
|
-
i as islandSizeMd,
|
|
40
|
-
n as islandSizeSm,
|
|
41
|
-
d as islandVariantAccent,
|
|
42
|
-
s as islandVariantDefault,
|
|
43
|
-
e as islandVariantPaper
|
|
129
|
+
I as PatternCell
|
|
44
130
|
};
|
|
45
131
|
//# sourceMappingURL=index.esm59.js.map
|
package/dist/index.esm59.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm59.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm59.js","sources":["../src/components/content/DecorativeFrame/components/PatternCell/PatternCell.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport type { CellConfig, Point2D } from '../../utils/patternGenerator';\nimport { TRIANGLE_TEMPLATES } from '../../utils/patternGenerator';\nimport styles from './PatternCell.module.pcss';\n\nexport interface PatternCellProps {\n cell: CellConfig;\n colors: string[];\n}\n\nfunction polygonClipPath(template: Point2D[]): string {\n const points = template.map(([px, py]) => `${px * 100}% ${py * 100}%`).join(', ');\n return `polygon(${points})`;\n}\n\nexport function PatternCell({ cell, colors }: PatternCellProps) {\n const bgColor = colors[cell.bgColorIndex] ?? colors[0];\n const shapeColor = colors[cell.shapeColorIndex] ?? colors[1];\n const size = Math.min(cell.width, cell.height);\n const {\n x,\n y,\n width: cellWidth,\n height: cellHeight,\n shapeType,\n triangleIndex,\n stripeDirection,\n stripeCount = 4,\n stripeMask,\n animationDelay,\n animationDuration,\n animationScaleFrom = 0.9,\n dotScale = 0.45,\n animationType,\n animationPhase = 0,\n } = cell;\n\n const stripeWidth =\n stripeDirection === 1 ? size : size / (stripeCount * 2 - 1);\n const stripeHeight =\n stripeDirection === 1 ? size / (stripeCount * 2 - 1) : size;\n const visibleStripes = stripeMask ?? Array(stripeCount).fill(true);\n\n const cellStyle: React.CSSProperties = {\n position: 'absolute',\n left: x,\n top: y,\n width: cellWidth,\n height: cellHeight,\n '--cell-delay': `${animationDelay}ms`,\n '--cell-duration': `${animationDuration}ms`,\n '--cell-scale-from': animationScaleFrom,\n '--cell-animation-phase': `${animationPhase}ms`,\n } as React.CSSProperties;\n\n return (\n <div className={styles.cell} style={cellStyle} aria-hidden>\n <div\n className={cn(\n styles.cellInner,\n animationType === 'breathe' && styles.cellBreathes,\n animationType === 'pulse' && styles.cellPulses,\n animationType === 'opacity' && styles.cellOpacity\n )}\n >\n <div className={styles.bg} style={{ backgroundColor: bgColor }} />\n\n {shapeType === 'circle' && (\n <div\n className={styles.shapeCircle}\n style={{ backgroundColor: shapeColor }}\n />\n )}\n\n {shapeType === 'dot' && (\n <div\n className={styles.shapeDot}\n style={{\n backgroundColor: shapeColor,\n width: `${dotScale * 100}%`,\n height: `${dotScale * 100}%`,\n }}\n />\n )}\n\n {shapeType === 'triangle' &&\n triangleIndex !== undefined &&\n TRIANGLE_TEMPLATES[triangleIndex] && (\n <div\n className={styles.shapeTriangle}\n style={{\n backgroundColor: shapeColor,\n clipPath: polygonClipPath(TRIANGLE_TEMPLATES[triangleIndex]!),\n }}\n />\n )}\n\n {shapeType === 'diamond' && (\n <div\n className={styles.shapeDiamond}\n style={{ backgroundColor: shapeColor }}\n />\n )}\n\n {shapeType === 'cross' && (\n <div className={styles.shapeCross}>\n <div\n className={styles.crossBar}\n style={{ backgroundColor: shapeColor }}\n />\n <div\n className={styles.crossBarVertical}\n style={{ backgroundColor: shapeColor }}\n />\n </div>\n )}\n\n {shapeType === 'stripes' && (\n <div className={styles.stripes}>\n {Array.from({ length: stripeCount }, (_, i) =>\n visibleStripes[i] ? (\n <div\n key={i}\n className={styles.stripe}\n style={{\n backgroundColor: shapeColor,\n ...(stripeDirection === 1\n ? {\n top: `${((2 * i * stripeHeight) / size) * 100}%`,\n left: 0,\n width: '100%',\n height: `${(stripeHeight / size) * 100}%`,\n }\n : {\n left: `${((2 * i * stripeWidth) / size) * 100}%`,\n top: 0,\n width: `${(stripeWidth / size) * 100}%`,\n height: '100%',\n }),\n }}\n />\n ) : null\n )}\n </div>\n )}\n </div>\n </div>\n );\n}\n\nPatternCell.displayName = 'PatternCell';\n"],"names":["polygonClipPath","template","px","py","PatternCell","cell","colors","bgColor","shapeColor","size","y","cellWidth","cellHeight","shapeType","triangleIndex","stripeDirection","stripeCount","stripeMask","animationDelay","animationDuration","animationScaleFrom","dotScale","animationType","animationPhase","stripeWidth","stripeHeight","visibleStripes","cellStyle","jsx","styles","jsxs","cn","TRIANGLE_TEMPLATES","_","i"],"mappings":";;;;;AAWA,SAASA,EAAgBC,GAA6B;AAEpD,SAAO,WADQA,EAAS,IAAI,CAAC,CAACC,GAAIC,CAAE,MAAM,GAAGD,IAAK,GAAG,KAAKC,IAAK,GAAG,GAAG,EAAE,KAAK,IAAI,CACxD;AAC1B;AAEO,SAASC,EAAY,EAAE,MAAAC,GAAM,QAAAC,KAA4B;AAC9D,QAAMC,IAAUD,EAAOD,EAAK,YAAY,KAAKC,EAAO,CAAC,GAC/CE,IAAaF,EAAOD,EAAK,eAAe,KAAKC,EAAO,CAAC,GACrDG,IAAO,KAAK,IAAIJ,EAAK,OAAOA,EAAK,MAAM,GACvC;AAAA,IACJ;AAAA,IACA,GAAAK;AAAA,IACA,OAAOC;AAAA,IACP,QAAQC;AAAA,IACR,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,UAAAC,IAAW;AAAA,IACX,eAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,EAAA,IACflB,GAEEmB,IACJT,MAAoB,IAAIN,IAAOA,KAAQO,IAAc,IAAI,IACrDS,IACJV,MAAoB,IAAIN,KAAQO,IAAc,IAAI,KAAKP,GACnDiB,IAAiBT,KAAc,MAAMD,CAAW,EAAE,KAAK,EAAI,GAE3DW,IAAiC;AAAA,IACrC,UAAU;AAAA,IACV,MAAM;AAAA,IACN,KAAKjB;AAAA,IACL,O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AA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGJ;AAEJ;AAEA9B,EAAY,cAAc;"}
|
package/dist/index.esm60.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tooltipMeasure: p
|
|
2
|
+
const n = "_link_10e20_1", l = "_linkText_10e20_33", e = "_linkIcon_10e20_38", t = {
|
|
3
|
+
link: n,
|
|
4
|
+
linkText: l,
|
|
5
|
+
linkIcon: e
|
|
7
6
|
};
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
e as
|
|
12
|
-
|
|
13
|
-
t as wrapper
|
|
8
|
+
t as default,
|
|
9
|
+
n as link,
|
|
10
|
+
e as linkIcon,
|
|
11
|
+
l as linkText
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=index.esm60.js.map
|