baseline-kit 2.0.0 → 2.0.1
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/README.md +1 -3
- package/dist/README.md +1 -3
- package/dist/components/Baseline/Baseline.d.ts +2 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Config/Config.d.ts +1 -1
- package/dist/components/Guide/Guide.d.ts +2 -1
- package/dist/components/Layout/Layout.d.ts +1 -1
- package/dist/components/Spacer/Spacer.d.ts +0 -36
- package/dist/components/Stack/Stack.d.ts +3 -3
- package/dist/hooks/useBaseline.d.ts +40 -52
- package/dist/hooks/useMeasure.d.ts +6 -20
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1208 -1052
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/timing.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import oe, { useMemo as ot, useCallback as kt, useState as re, useLayoutEffect as Jt, useRef as se } from "react";
|
|
3
|
+
var ut = { exports: {} }, at = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var ae = { exports: {} }, re = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return
|
|
26
|
-
$$typeof:
|
|
27
|
-
type:
|
|
28
|
-
key:
|
|
29
|
-
ref:
|
|
30
|
-
props:
|
|
13
|
+
var zt;
|
|
14
|
+
function ae() {
|
|
15
|
+
if (zt) return at;
|
|
16
|
+
zt = 1;
|
|
17
|
+
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
18
|
+
function o(a, s, r) {
|
|
19
|
+
var i = null;
|
|
20
|
+
if (r !== void 0 && (i = "" + r), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
21
|
+
r = {};
|
|
22
|
+
for (var d in s)
|
|
23
|
+
d !== "key" && (r[d] = s[d]);
|
|
24
|
+
} else r = s;
|
|
25
|
+
return s = r.ref, {
|
|
26
|
+
$$typeof: e,
|
|
27
|
+
type: a,
|
|
28
|
+
key: i,
|
|
29
|
+
ref: s !== void 0 ? s : null,
|
|
30
|
+
props: r
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return at.Fragment = n, at.jsx = o, at.jsxs = o, at;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var it = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,421 +42,421 @@ var oe = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
function t
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (
|
|
54
|
-
case
|
|
45
|
+
var Ut;
|
|
46
|
+
function ie() {
|
|
47
|
+
return Ut || (Ut = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
|
+
function e(t) {
|
|
49
|
+
if (t == null) return null;
|
|
50
|
+
if (typeof t == "function")
|
|
51
|
+
return t.$$typeof === te ? null : t.displayName || t.name || null;
|
|
52
|
+
if (typeof t == "string") return t;
|
|
53
|
+
switch (t) {
|
|
54
|
+
case V:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case E:
|
|
57
57
|
return "Portal";
|
|
58
|
-
case
|
|
58
|
+
case R:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case O:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case T:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case L:
|
|
65
65
|
return "SuspenseList";
|
|
66
66
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
switch (typeof
|
|
67
|
+
if (typeof t == "object")
|
|
68
|
+
switch (typeof t.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
|
-
),
|
|
71
|
-
case
|
|
72
|
-
return (
|
|
70
|
+
), t.$$typeof) {
|
|
71
|
+
case j:
|
|
72
|
+
return (t.displayName || "Context") + ".Provider";
|
|
73
|
+
case w:
|
|
74
|
+
return (t._context.displayName || "Context") + ".Consumer";
|
|
75
|
+
case y:
|
|
76
|
+
var l = t.render;
|
|
77
|
+
return t = t.displayName, t || (t = l.displayName || l.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
78
|
+
case B:
|
|
79
|
+
return l = t.displayName || null, l !== null ? l : e(t.type) || "Memo";
|
|
73
80
|
case W:
|
|
74
|
-
|
|
75
|
-
case N:
|
|
76
|
-
var c = e.render;
|
|
77
|
-
return e = e.displayName, e || (e = c.displayName || c.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
78
|
-
case L:
|
|
79
|
-
return c = e.displayName || null, c !== null ? c : t(e.type) || "Memo";
|
|
80
|
-
case de:
|
|
81
|
-
c = e._payload, e = e._init;
|
|
81
|
+
l = t._payload, t = t._init;
|
|
82
82
|
try {
|
|
83
|
-
return t(
|
|
83
|
+
return e(t(l));
|
|
84
84
|
} catch {
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
|
-
function n(
|
|
90
|
-
return "" +
|
|
89
|
+
function n(t) {
|
|
90
|
+
return "" + t;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function o(t) {
|
|
93
93
|
try {
|
|
94
|
-
n(
|
|
95
|
-
var
|
|
94
|
+
n(t);
|
|
95
|
+
var l = !1;
|
|
96
96
|
} catch {
|
|
97
|
-
|
|
97
|
+
l = !0;
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
var u =
|
|
99
|
+
if (l) {
|
|
100
|
+
l = console;
|
|
101
|
+
var u = l.error, S = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
102
102
|
return u.call(
|
|
103
|
-
|
|
103
|
+
l,
|
|
104
104
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
105
|
-
|
|
106
|
-
), n(
|
|
105
|
+
S
|
|
106
|
+
), n(t);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function a() {
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
var
|
|
111
|
+
function s() {
|
|
112
|
+
if (rt === 0) {
|
|
113
|
+
jt = console.log, Ot = console.info, Tt = console.warn, At = console.error, $t = console.group, Mt = console.groupCollapsed, Nt = console.groupEnd;
|
|
114
|
+
var t = {
|
|
115
115
|
configurable: !0,
|
|
116
116
|
enumerable: !0,
|
|
117
|
-
value:
|
|
117
|
+
value: a,
|
|
118
118
|
writable: !0
|
|
119
119
|
};
|
|
120
120
|
Object.defineProperties(console, {
|
|
121
|
-
info:
|
|
122
|
-
log:
|
|
123
|
-
warn:
|
|
124
|
-
error:
|
|
125
|
-
group:
|
|
126
|
-
groupCollapsed:
|
|
127
|
-
groupEnd:
|
|
121
|
+
info: t,
|
|
122
|
+
log: t,
|
|
123
|
+
warn: t,
|
|
124
|
+
error: t,
|
|
125
|
+
group: t,
|
|
126
|
+
groupCollapsed: t,
|
|
127
|
+
groupEnd: t
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
rt++;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
134
|
-
var
|
|
132
|
+
function r() {
|
|
133
|
+
if (rt--, rt === 0) {
|
|
134
|
+
var t = { configurable: !0, enumerable: !0, writable: !0 };
|
|
135
135
|
Object.defineProperties(console, {
|
|
136
|
-
log:
|
|
137
|
-
info:
|
|
138
|
-
warn:
|
|
139
|
-
error:
|
|
140
|
-
group:
|
|
141
|
-
groupCollapsed:
|
|
142
|
-
groupEnd:
|
|
136
|
+
log: K({}, t, { value: jt }),
|
|
137
|
+
info: K({}, t, { value: Ot }),
|
|
138
|
+
warn: K({}, t, { value: Tt }),
|
|
139
|
+
error: K({}, t, { value: At }),
|
|
140
|
+
group: K({}, t, { value: $t }),
|
|
141
|
+
groupCollapsed: K({}, t, { value: Mt }),
|
|
142
|
+
groupEnd: K({}, t, { value: Nt })
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
0 >
|
|
145
|
+
0 > rt && console.error(
|
|
146
146
|
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
if (
|
|
149
|
+
function i(t) {
|
|
150
|
+
if (ht === void 0)
|
|
151
151
|
try {
|
|
152
152
|
throw Error();
|
|
153
153
|
} catch (u) {
|
|
154
|
-
var
|
|
155
|
-
|
|
154
|
+
var l = u.stack.trim().match(/\n( *(at )?)/);
|
|
155
|
+
ht = l && l[1] || "", Vt = -1 < u.stack.indexOf(`
|
|
156
156
|
at`) ? " (<anonymous>)" : -1 < u.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
157
157
|
}
|
|
158
158
|
return `
|
|
159
|
-
` +
|
|
159
|
+
` + ht + t + Vt;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
if (!
|
|
163
|
-
var u =
|
|
161
|
+
function d(t, l) {
|
|
162
|
+
if (!t || pt) return "";
|
|
163
|
+
var u = vt.get(t);
|
|
164
164
|
if (u !== void 0) return u;
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
|
|
165
|
+
pt = !0, u = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
166
|
+
var S = null;
|
|
167
|
+
S = Z.H, Z.H = null, s();
|
|
168
168
|
try {
|
|
169
|
-
var
|
|
169
|
+
var z = {
|
|
170
170
|
DetermineComponentFrameRoot: function() {
|
|
171
171
|
try {
|
|
172
|
-
if (
|
|
173
|
-
var
|
|
172
|
+
if (l) {
|
|
173
|
+
var q = function() {
|
|
174
174
|
throw Error();
|
|
175
175
|
};
|
|
176
|
-
if (Object.defineProperty(
|
|
176
|
+
if (Object.defineProperty(q.prototype, "props", {
|
|
177
177
|
set: function() {
|
|
178
178
|
throw Error();
|
|
179
179
|
}
|
|
180
180
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
181
181
|
try {
|
|
182
|
-
Reflect.construct(
|
|
183
|
-
} catch (
|
|
184
|
-
var
|
|
182
|
+
Reflect.construct(q, []);
|
|
183
|
+
} catch (H) {
|
|
184
|
+
var lt = H;
|
|
185
185
|
}
|
|
186
|
-
Reflect.construct(
|
|
186
|
+
Reflect.construct(t, [], q);
|
|
187
187
|
} else {
|
|
188
188
|
try {
|
|
189
|
-
|
|
190
|
-
} catch (
|
|
191
|
-
|
|
189
|
+
q.call();
|
|
190
|
+
} catch (H) {
|
|
191
|
+
lt = H;
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
t.call(q.prototype);
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
|
|
198
|
+
} catch (H) {
|
|
199
|
+
lt = H;
|
|
200
200
|
}
|
|
201
|
-
(
|
|
201
|
+
(q = t()) && typeof q.catch == "function" && q.catch(function() {
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
} catch (
|
|
205
|
-
if (
|
|
206
|
-
return [
|
|
204
|
+
} catch (H) {
|
|
205
|
+
if (H && lt && typeof H.stack == "string")
|
|
206
|
+
return [H.stack, lt.stack];
|
|
207
207
|
}
|
|
208
208
|
return [null, null];
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
|
|
212
|
-
var
|
|
213
|
-
|
|
211
|
+
z.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
212
|
+
var G = Object.getOwnPropertyDescriptor(
|
|
213
|
+
z.DetermineComponentFrameRoot,
|
|
214
214
|
"name"
|
|
215
215
|
);
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
G && G.configurable && Object.defineProperty(
|
|
217
|
+
z.DetermineComponentFrameRoot,
|
|
218
218
|
"name",
|
|
219
219
|
{ value: "DetermineComponentFrameRoot" }
|
|
220
220
|
);
|
|
221
|
-
var
|
|
222
|
-
if (
|
|
223
|
-
var
|
|
224
|
-
`),
|
|
221
|
+
var p = z.DetermineComponentFrameRoot(), F = p[0], et = p[1];
|
|
222
|
+
if (F && et) {
|
|
223
|
+
var Y = F.split(`
|
|
224
|
+
`), Q = et.split(`
|
|
225
225
|
`);
|
|
226
|
-
for (
|
|
226
|
+
for (p = G = 0; G < Y.length && !Y[G].includes(
|
|
227
227
|
"DetermineComponentFrameRoot"
|
|
228
228
|
); )
|
|
229
|
-
|
|
230
|
-
for (;
|
|
229
|
+
G++;
|
|
230
|
+
for (; p < Q.length && !Q[p].includes(
|
|
231
231
|
"DetermineComponentFrameRoot"
|
|
232
232
|
); )
|
|
233
|
-
|
|
234
|
-
if (
|
|
235
|
-
for (
|
|
236
|
-
|
|
237
|
-
for (; 1 <=
|
|
238
|
-
if (
|
|
239
|
-
if (
|
|
233
|
+
p++;
|
|
234
|
+
if (G === Y.length || p === Q.length)
|
|
235
|
+
for (G = Y.length - 1, p = Q.length - 1; 1 <= G && 0 <= p && Y[G] !== Q[p]; )
|
|
236
|
+
p--;
|
|
237
|
+
for (; 1 <= G && 0 <= p; G--, p--)
|
|
238
|
+
if (Y[G] !== Q[p]) {
|
|
239
|
+
if (G !== 1 || p !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (
|
|
242
|
-
var
|
|
243
|
-
` +
|
|
241
|
+
if (G--, p--, 0 > p || Y[G] !== Q[p]) {
|
|
242
|
+
var st = `
|
|
243
|
+
` + Y[G].replace(
|
|
244
244
|
" at new ",
|
|
245
245
|
" at "
|
|
246
246
|
);
|
|
247
|
-
return
|
|
247
|
+
return t.displayName && st.includes("<anonymous>") && (st = st.replace("<anonymous>", t.displayName)), typeof t == "function" && vt.set(t, st), st;
|
|
248
248
|
}
|
|
249
|
-
while (1 <=
|
|
249
|
+
while (1 <= G && 0 <= p);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
} finally {
|
|
254
|
-
|
|
254
|
+
pt = !1, Z.H = S, r(), Error.prepareStackTrace = u;
|
|
255
255
|
}
|
|
256
|
-
return
|
|
256
|
+
return Y = (Y = t ? t.displayName || t.name : "") ? i(Y) : "", typeof t == "function" && vt.set(t, Y), Y;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
if (
|
|
260
|
-
if (typeof
|
|
261
|
-
var
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
!(!
|
|
258
|
+
function g(t) {
|
|
259
|
+
if (t == null) return "";
|
|
260
|
+
if (typeof t == "function") {
|
|
261
|
+
var l = t.prototype;
|
|
262
|
+
return d(
|
|
263
|
+
t,
|
|
264
|
+
!(!l || !l.isReactComponent)
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
if (typeof
|
|
268
|
-
switch (
|
|
269
|
-
case
|
|
270
|
-
return
|
|
271
|
-
case
|
|
272
|
-
return
|
|
267
|
+
if (typeof t == "string") return i(t);
|
|
268
|
+
switch (t) {
|
|
269
|
+
case T:
|
|
270
|
+
return i("Suspense");
|
|
271
|
+
case L:
|
|
272
|
+
return i("SuspenseList");
|
|
273
273
|
}
|
|
274
|
-
if (typeof
|
|
275
|
-
switch (
|
|
276
|
-
case
|
|
277
|
-
return
|
|
278
|
-
case
|
|
279
|
-
return
|
|
280
|
-
case
|
|
281
|
-
|
|
274
|
+
if (typeof t == "object")
|
|
275
|
+
switch (t.$$typeof) {
|
|
276
|
+
case y:
|
|
277
|
+
return t = d(t.render, !1), t;
|
|
278
|
+
case B:
|
|
279
|
+
return g(t.type);
|
|
280
|
+
case W:
|
|
281
|
+
l = t._payload, t = t._init;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return g(t(l));
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return "";
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
var
|
|
291
|
-
return
|
|
289
|
+
function c() {
|
|
290
|
+
var t = Z.A;
|
|
291
|
+
return t === null ? null : t.getOwner();
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
295
|
-
var
|
|
296
|
-
if (
|
|
293
|
+
function m(t) {
|
|
294
|
+
if (_t.call(t, "key")) {
|
|
295
|
+
var l = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
296
|
+
if (l && l.isReactWarning) return !1;
|
|
297
297
|
}
|
|
298
|
-
return
|
|
298
|
+
return t.key !== void 0;
|
|
299
299
|
}
|
|
300
|
-
function x(
|
|
300
|
+
function x(t, l) {
|
|
301
301
|
function u() {
|
|
302
|
-
|
|
302
|
+
Gt || (Gt = !0, console.error(
|
|
303
303
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
304
|
-
|
|
304
|
+
l
|
|
305
305
|
));
|
|
306
306
|
}
|
|
307
|
-
u.isReactWarning = !0, Object.defineProperty(
|
|
307
|
+
u.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
308
308
|
get: u,
|
|
309
309
|
configurable: !0
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
function b() {
|
|
313
|
-
var
|
|
314
|
-
return
|
|
313
|
+
var t = e(this.type);
|
|
314
|
+
return Wt[t] || (Wt[t] = !0, console.error(
|
|
315
315
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
316
|
-
)),
|
|
316
|
+
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return u =
|
|
320
|
-
$$typeof:
|
|
321
|
-
type:
|
|
322
|
-
key:
|
|
323
|
-
props:
|
|
324
|
-
_owner:
|
|
325
|
-
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(
|
|
318
|
+
function v(t, l, u, S, z, G) {
|
|
319
|
+
return u = G.ref, t = {
|
|
320
|
+
$$typeof: C,
|
|
321
|
+
type: t,
|
|
322
|
+
key: l,
|
|
323
|
+
props: G,
|
|
324
|
+
_owner: z
|
|
325
|
+
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(t, "ref", {
|
|
326
326
|
enumerable: !1,
|
|
327
327
|
get: b
|
|
328
|
-
}) : Object.defineProperty(
|
|
328
|
+
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
329
329
|
configurable: !1,
|
|
330
330
|
enumerable: !1,
|
|
331
331
|
writable: !0,
|
|
332
332
|
value: 0
|
|
333
|
-
}), Object.defineProperty(
|
|
333
|
+
}), Object.defineProperty(t, "_debugInfo", {
|
|
334
334
|
configurable: !1,
|
|
335
335
|
enumerable: !1,
|
|
336
336
|
writable: !0,
|
|
337
337
|
value: null
|
|
338
|
-
}), Object.freeze && (Object.freeze(
|
|
338
|
+
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
if (typeof
|
|
342
|
-
var
|
|
343
|
-
if (
|
|
344
|
-
if (
|
|
345
|
-
if (
|
|
346
|
-
for (
|
|
347
|
-
|
|
348
|
-
Object.freeze && Object.freeze(
|
|
340
|
+
function A(t, l, u, S, z, G) {
|
|
341
|
+
if (typeof t == "string" || typeof t == "function" || t === V || t === R || t === O || t === T || t === L || t === P || typeof t == "object" && t !== null && (t.$$typeof === W || t.$$typeof === B || t.$$typeof === j || t.$$typeof === w || t.$$typeof === y || t.$$typeof === ee || t.getModuleId !== void 0)) {
|
|
342
|
+
var p = l.children;
|
|
343
|
+
if (p !== void 0)
|
|
344
|
+
if (S)
|
|
345
|
+
if (gt(p)) {
|
|
346
|
+
for (S = 0; S < p.length; S++)
|
|
347
|
+
M(p[S], t);
|
|
348
|
+
Object.freeze && Object.freeze(p);
|
|
349
349
|
} else
|
|
350
350
|
console.error(
|
|
351
351
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
352
352
|
);
|
|
353
|
-
else
|
|
353
|
+
else M(p, t);
|
|
354
354
|
} else
|
|
355
|
-
|
|
355
|
+
p = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? S = "null" : gt(t) ? S = "array" : t !== void 0 && t.$$typeof === C ? (S = "<" + (e(t.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : S = typeof t, console.error(
|
|
356
356
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
S,
|
|
358
|
+
p
|
|
359
359
|
);
|
|
360
|
-
if (
|
|
361
|
-
|
|
362
|
-
var
|
|
363
|
-
return
|
|
360
|
+
if (_t.call(l, "key")) {
|
|
361
|
+
p = e(t);
|
|
362
|
+
var F = Object.keys(l).filter(function(Y) {
|
|
363
|
+
return Y !== "key";
|
|
364
364
|
});
|
|
365
|
-
|
|
365
|
+
S = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", Bt[p + S] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
366
366
|
`A props object containing a "key" prop is being spread into JSX:
|
|
367
367
|
let props = %s;
|
|
368
368
|
<%s {...props} />
|
|
369
369
|
React keys must be passed directly to JSX without using spread:
|
|
370
370
|
let props = %s;
|
|
371
371
|
<%s key={someKey} {...props} />`,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
),
|
|
372
|
+
S,
|
|
373
|
+
p,
|
|
374
|
+
F,
|
|
375
|
+
p
|
|
376
|
+
), Bt[p + S] = !0);
|
|
377
377
|
}
|
|
378
|
-
if (
|
|
378
|
+
if (p = null, u !== void 0 && (o(u), p = "" + u), m(l) && (o(l.key), p = "" + l.key), "key" in l) {
|
|
379
379
|
u = {};
|
|
380
|
-
for (var
|
|
381
|
-
|
|
382
|
-
} else u =
|
|
383
|
-
return
|
|
380
|
+
for (var et in l)
|
|
381
|
+
et !== "key" && (u[et] = l[et]);
|
|
382
|
+
} else u = l;
|
|
383
|
+
return p && x(
|
|
384
384
|
u,
|
|
385
|
-
typeof
|
|
386
|
-
),
|
|
385
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
386
|
+
), v(t, p, G, z, c(), u);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
if (typeof
|
|
390
|
-
if (
|
|
391
|
-
for (var u = 0; u <
|
|
392
|
-
var
|
|
393
|
-
|
|
388
|
+
function M(t, l) {
|
|
389
|
+
if (typeof t == "object" && t && t.$$typeof !== ne) {
|
|
390
|
+
if (gt(t))
|
|
391
|
+
for (var u = 0; u < t.length; u++) {
|
|
392
|
+
var S = t[u];
|
|
393
|
+
h(S) && $(S, l);
|
|
394
394
|
}
|
|
395
|
-
else if (
|
|
396
|
-
|
|
397
|
-
else if (
|
|
398
|
-
for (; !(
|
|
399
|
-
|
|
395
|
+
else if (h(t))
|
|
396
|
+
t._store && (t._store.validated = 1);
|
|
397
|
+
else if (t === null || typeof t != "object" ? u = null : (u = ct && t[ct] || t["@@iterator"], u = typeof u == "function" ? u : null), typeof u == "function" && u !== t.entries && (u = u.call(t), u !== t))
|
|
398
|
+
for (; !(t = u.next()).done; )
|
|
399
|
+
h(t.value) && $(t.value, l);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
return typeof
|
|
402
|
+
function h(t) {
|
|
403
|
+
return typeof t == "object" && t !== null && t.$$typeof === C;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
if (
|
|
407
|
-
|
|
405
|
+
function $(t, l) {
|
|
406
|
+
if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, l = N(l), !Lt[l])) {
|
|
407
|
+
Lt[l] = !0;
|
|
408
408
|
var u = "";
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
var
|
|
413
|
-
return
|
|
409
|
+
t && t._owner != null && t._owner !== c() && (u = null, typeof t._owner.tag == "number" ? u = e(t._owner.type) : typeof t._owner.name == "string" && (u = t._owner.name), u = " It was passed a child from " + u + ".");
|
|
410
|
+
var S = Z.getCurrentStack;
|
|
411
|
+
Z.getCurrentStack = function() {
|
|
412
|
+
var z = g(t.type);
|
|
413
|
+
return S && (z += S() || ""), z;
|
|
414
414
|
}, console.error(
|
|
415
415
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
416
|
-
|
|
416
|
+
l,
|
|
417
417
|
u
|
|
418
|
-
),
|
|
418
|
+
), Z.getCurrentStack = S;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
var
|
|
423
|
-
return u && (u =
|
|
421
|
+
function N(t) {
|
|
422
|
+
var l = "", u = c();
|
|
423
|
+
return u && (u = e(u.type)) && (l = `
|
|
424
424
|
|
|
425
|
-
Check the render method of \`` + u + "`."),
|
|
425
|
+
Check the render method of \`` + u + "`."), l || (t = e(t)) && (l = `
|
|
426
426
|
|
|
427
|
-
Check the top-level render call using <` +
|
|
427
|
+
Check the top-level render call using <` + t + ">."), l;
|
|
428
428
|
}
|
|
429
|
-
var k =
|
|
430
|
-
|
|
431
|
-
var
|
|
432
|
-
|
|
433
|
-
return
|
|
434
|
-
},
|
|
435
|
-
return
|
|
429
|
+
var k = oe, C = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), V = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), j = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), ct = Symbol.iterator, te = Symbol.for("react.client.reference"), Z = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _t = Object.prototype.hasOwnProperty, K = Object.assign, ee = Symbol.for("react.client.reference"), gt = Array.isArray, rt = 0, jt, Ot, Tt, At, $t, Mt, Nt;
|
|
430
|
+
a.__reactDisabledLog = !0;
|
|
431
|
+
var ht, Vt, pt = !1, vt = new (typeof WeakMap == "function" ? WeakMap : Map)(), ne = Symbol.for("react.client.reference"), Gt, Wt = {}, Bt = {}, Lt = {};
|
|
432
|
+
it.Fragment = V, it.jsx = function(t, l, u, S, z) {
|
|
433
|
+
return A(t, l, u, !1, S, z);
|
|
434
|
+
}, it.jsxs = function(t, l, u, S, z) {
|
|
435
|
+
return A(t, l, u, !0, S, z);
|
|
436
436
|
};
|
|
437
|
-
}()),
|
|
437
|
+
}()), it;
|
|
438
438
|
}
|
|
439
|
-
var
|
|
440
|
-
function
|
|
441
|
-
return
|
|
439
|
+
var Yt;
|
|
440
|
+
function ce() {
|
|
441
|
+
return Yt || (Yt = 1, process.env.NODE_ENV === "production" ? ut.exports = ae() : ut.exports = ie()), ut.exports;
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
445
|
-
const n =
|
|
443
|
+
var _ = ce();
|
|
444
|
+
function le(e) {
|
|
445
|
+
const n = e.trim().match(/^([+-]?[\d.]+)([a-zA-Z%]+)$/);
|
|
446
446
|
if (!n) return null;
|
|
447
|
-
const
|
|
448
|
-
return { value:
|
|
447
|
+
const o = parseFloat(n[1]), a = n[2];
|
|
448
|
+
return { value: o, unit: a };
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
return
|
|
450
|
+
function U(e, n) {
|
|
451
|
+
return e === void 0 && n !== void 0 ? `${n}px` : e === "auto" || typeof e == "string" && /^(auto|100%|0|.*(fr|vh|vw|vmin|vmax|rem))$/.test(e) ? String(e) : typeof e == "number" ? `${e}px` : e ?? "";
|
|
452
452
|
}
|
|
453
|
-
const
|
|
453
|
+
const ue = {
|
|
454
454
|
parentSize: 0,
|
|
455
455
|
viewportWidth: typeof window < "u" ? window.innerWidth : 1920,
|
|
456
456
|
viewportHeight: typeof window < "u" ? window.innerHeight : 1080,
|
|
457
457
|
rootFontSize: 16,
|
|
458
458
|
parentFontSize: 16
|
|
459
|
-
},
|
|
459
|
+
}, wt = {
|
|
460
460
|
px: 1,
|
|
461
461
|
in: 96,
|
|
462
462
|
// 1in = 96px
|
|
@@ -468,276 +468,295 @@ const ft = {
|
|
|
468
468
|
// 1pt = 1.33px
|
|
469
469
|
pc: 16
|
|
470
470
|
// 1pc = 16px
|
|
471
|
-
},
|
|
472
|
-
function
|
|
473
|
-
if (typeof
|
|
474
|
-
if (typeof
|
|
475
|
-
const
|
|
476
|
-
if (!
|
|
477
|
-
const { value:
|
|
478
|
-
if (
|
|
479
|
-
return
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
switch (
|
|
471
|
+
}, Xt = ["em", "rem", "vh", "vw", "vmin", "vmax", "%"];
|
|
472
|
+
function yt(e, n) {
|
|
473
|
+
if (typeof e == "number") return e;
|
|
474
|
+
if (typeof e != "string") return null;
|
|
475
|
+
const o = le(e);
|
|
476
|
+
if (!o) return null;
|
|
477
|
+
const { value: a, unit: s } = o;
|
|
478
|
+
if (s in wt)
|
|
479
|
+
return a * wt[s];
|
|
480
|
+
if (s === "auto") return null;
|
|
481
|
+
if (Xt.includes(s)) {
|
|
482
|
+
const r = { ...ue, ...n };
|
|
483
|
+
switch (s) {
|
|
484
484
|
case "em":
|
|
485
|
-
return
|
|
485
|
+
return a * r.parentFontSize;
|
|
486
486
|
case "rem":
|
|
487
|
-
return
|
|
487
|
+
return a * r.rootFontSize;
|
|
488
488
|
case "vh":
|
|
489
|
-
return
|
|
489
|
+
return a / 100 * r.viewportHeight;
|
|
490
490
|
case "vw":
|
|
491
|
-
return
|
|
491
|
+
return a / 100 * r.viewportWidth;
|
|
492
492
|
case "vmin":
|
|
493
|
-
return
|
|
493
|
+
return a / 100 * Math.min(r.viewportWidth, r.viewportHeight);
|
|
494
494
|
case "vmax":
|
|
495
|
-
return
|
|
495
|
+
return a / 100 * Math.max(r.viewportWidth, r.viewportHeight);
|
|
496
496
|
case "%":
|
|
497
|
-
return
|
|
497
|
+
return a / 100 * r.parentSize;
|
|
498
498
|
default:
|
|
499
499
|
return null;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
return null;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
return `${(
|
|
504
|
+
function Ke(e, n, o) {
|
|
505
|
+
const a = (o == null ? void 0 : o.round) ?? !0, s = e === void 0 ? 0 : typeof e == "number" ? e : yt(e) ?? 0;
|
|
506
|
+
return `${(a ? Math.round(s) : s) % n}px`;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return Math.min(Math.max(
|
|
508
|
+
function fe(e, n, o) {
|
|
509
|
+
return Math.min(Math.max(e, n), o);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Qe(e, n = 0) {
|
|
512
512
|
if (n >= 0)
|
|
513
|
-
return Number((Math.round(
|
|
513
|
+
return Number((Math.round(e * 10 ** n) / 10 ** n).toFixed(n));
|
|
514
514
|
{
|
|
515
|
-
const
|
|
516
|
-
return Math.round(
|
|
515
|
+
const o = 10 ** Math.abs(n);
|
|
516
|
+
return Math.round(e / o) * o;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function dt(e, n = {}) {
|
|
520
520
|
const {
|
|
521
|
-
base:
|
|
522
|
-
round:
|
|
523
|
-
clamp:
|
|
524
|
-
suppressWarnings:
|
|
521
|
+
base: o = 8,
|
|
522
|
+
round: a = !0,
|
|
523
|
+
clamp: s,
|
|
524
|
+
suppressWarnings: r = !1
|
|
525
525
|
} = n;
|
|
526
|
-
if (
|
|
527
|
-
let
|
|
528
|
-
if (typeof
|
|
529
|
-
|
|
530
|
-
else if (typeof
|
|
531
|
-
const
|
|
532
|
-
|
|
526
|
+
if (e === "auto") return o;
|
|
527
|
+
let i = null;
|
|
528
|
+
if (typeof e == "number")
|
|
529
|
+
i = e;
|
|
530
|
+
else if (typeof e == "string") {
|
|
531
|
+
const c = yt(e);
|
|
532
|
+
c === null ? (r || console.error(
|
|
533
|
+
`Failed to convert "${e}" to pixels. Falling back to base ${o}.`
|
|
534
|
+
), i = o) : i = c;
|
|
533
535
|
}
|
|
534
|
-
|
|
535
|
-
const
|
|
536
|
-
|
|
536
|
+
i === null && (i = o);
|
|
537
|
+
const d = a ? Math.round(i / o) * o : i, g = s !== void 0 ? fe(
|
|
538
|
+
d,
|
|
539
|
+
s.min ?? -1 / 0,
|
|
540
|
+
s.max ?? 1 / 0
|
|
541
|
+
) : d;
|
|
542
|
+
return !r && g !== i && console.warn(`Normalized ${i} to ${g} to match base ${o}px.`), g;
|
|
537
543
|
}
|
|
538
|
-
function
|
|
539
|
-
if (!
|
|
540
|
-
|
|
541
|
-
|
|
544
|
+
function Dt(e, n, o) {
|
|
545
|
+
if (!e || e[0] === void 0 && e[1] === void 0)
|
|
546
|
+
return n;
|
|
547
|
+
const a = e[0] !== void 0 ? dt(e[0], o) : n[0], s = e[1] !== void 0 ? dt(e[1], o) : n[1];
|
|
548
|
+
return [a, s];
|
|
542
549
|
}
|
|
543
|
-
function
|
|
544
|
-
if ("padding" in
|
|
545
|
-
return
|
|
546
|
-
const n = "block" in
|
|
550
|
+
function D(e) {
|
|
551
|
+
if ("padding" in e && e.padding != null)
|
|
552
|
+
return de(e.padding);
|
|
553
|
+
const n = "block" in e && e.block != null ? be(e.block) : { top: 0, bottom: 0 }, o = "inline" in e && e.inline != null ? me(e.inline) : { left: 0, right: 0 };
|
|
547
554
|
return {
|
|
548
555
|
top: n.top,
|
|
549
|
-
right:
|
|
556
|
+
right: o.right,
|
|
550
557
|
bottom: n.bottom,
|
|
551
|
-
left:
|
|
558
|
+
left: o.left
|
|
552
559
|
};
|
|
553
560
|
}
|
|
554
|
-
function
|
|
555
|
-
if (typeof
|
|
556
|
-
return { top:
|
|
557
|
-
if (Array.isArray(
|
|
558
|
-
if (
|
|
559
|
-
const [n,
|
|
560
|
-
return { top: n, right:
|
|
561
|
+
function de(e) {
|
|
562
|
+
if (typeof e == "number")
|
|
563
|
+
return { top: e, right: e, bottom: e, left: e };
|
|
564
|
+
if (Array.isArray(e)) {
|
|
565
|
+
if (e.length === 2) {
|
|
566
|
+
const [n, o] = e;
|
|
567
|
+
return { top: n, right: o, bottom: n, left: o };
|
|
561
568
|
}
|
|
562
|
-
if (
|
|
563
|
-
const [n,
|
|
569
|
+
if (e.length >= 4) {
|
|
570
|
+
const [n, o, a, s] = e;
|
|
564
571
|
return {
|
|
565
572
|
top: n ?? 0,
|
|
566
|
-
right:
|
|
567
|
-
bottom:
|
|
568
|
-
left:
|
|
573
|
+
right: o ?? 0,
|
|
574
|
+
bottom: a ?? 0,
|
|
575
|
+
left: s ?? 0
|
|
569
576
|
};
|
|
570
577
|
}
|
|
571
578
|
}
|
|
572
|
-
if (typeof
|
|
573
|
-
const n =
|
|
574
|
-
return { top: n, right:
|
|
579
|
+
if (typeof e == "object" && !Array.isArray(e)) {
|
|
580
|
+
const n = e.top ?? 0, o = e.bottom ?? 0, a = e.left ?? 0, s = e.right ?? 0;
|
|
581
|
+
return { top: n, right: s, bottom: o, left: a };
|
|
575
582
|
}
|
|
576
583
|
return { top: 0, right: 0, bottom: 0, left: 0 };
|
|
577
584
|
}
|
|
578
|
-
function
|
|
579
|
-
if (typeof
|
|
580
|
-
return { top:
|
|
581
|
-
if (Array.isArray(
|
|
582
|
-
const [n,
|
|
585
|
+
function be(e) {
|
|
586
|
+
if (typeof e == "number")
|
|
587
|
+
return { top: e, bottom: e };
|
|
588
|
+
if (Array.isArray(e)) {
|
|
589
|
+
const [n, o] = e;
|
|
583
590
|
return {
|
|
584
591
|
top: n ?? 0,
|
|
585
|
-
bottom:
|
|
592
|
+
bottom: o ?? 0
|
|
586
593
|
};
|
|
587
594
|
}
|
|
588
|
-
return typeof
|
|
589
|
-
top:
|
|
590
|
-
bottom:
|
|
595
|
+
return typeof e == "object" ? {
|
|
596
|
+
top: e.start ?? 0,
|
|
597
|
+
bottom: e.end ?? 0
|
|
591
598
|
} : { top: 0, bottom: 0 };
|
|
592
599
|
}
|
|
593
|
-
function
|
|
594
|
-
if (typeof
|
|
595
|
-
return { left:
|
|
596
|
-
if (Array.isArray(
|
|
597
|
-
const [n,
|
|
600
|
+
function me(e) {
|
|
601
|
+
if (typeof e == "number")
|
|
602
|
+
return { left: e, right: e };
|
|
603
|
+
if (Array.isArray(e)) {
|
|
604
|
+
const [n, o] = e;
|
|
598
605
|
return {
|
|
599
606
|
left: n ?? 0,
|
|
600
|
-
right:
|
|
607
|
+
right: o ?? 0
|
|
601
608
|
};
|
|
602
609
|
}
|
|
603
|
-
return typeof
|
|
604
|
-
left:
|
|
605
|
-
right:
|
|
610
|
+
return typeof e == "object" ? {
|
|
611
|
+
left: e.start ?? 0,
|
|
612
|
+
right: e.end ?? 0
|
|
606
613
|
} : { left: 0, right: 0 };
|
|
607
614
|
}
|
|
608
|
-
function
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
+
function ge(e, n, o, a) {
|
|
616
|
+
const s = D({ padding: o });
|
|
617
|
+
if (a === "none")
|
|
618
|
+
return s;
|
|
619
|
+
if (a === "height") {
|
|
620
|
+
const r = e % n;
|
|
621
|
+
r !== 0 && (s.bottom += n - r);
|
|
615
622
|
}
|
|
616
|
-
if (
|
|
617
|
-
|
|
618
|
-
const
|
|
619
|
-
|
|
623
|
+
if (a === "clamp") {
|
|
624
|
+
s.top = s.top % n;
|
|
625
|
+
const r = e % n;
|
|
626
|
+
r !== 0 && (s.bottom += n - r), s.bottom = s.bottom % n;
|
|
620
627
|
}
|
|
621
|
-
return
|
|
628
|
+
return s;
|
|
622
629
|
}
|
|
623
|
-
const
|
|
624
|
-
function
|
|
625
|
-
if (
|
|
626
|
-
if (typeof
|
|
627
|
-
|
|
630
|
+
const J = (...e) => e.filter(Boolean).join(" ").trim(), I = (...e) => Object.assign({}, ...e.filter((n) => n !== void 0));
|
|
631
|
+
function he(e, n) {
|
|
632
|
+
if (e)
|
|
633
|
+
if (typeof e == "function")
|
|
634
|
+
e(n);
|
|
628
635
|
else
|
|
629
636
|
try {
|
|
630
|
-
Object.assign(
|
|
631
|
-
} catch (
|
|
632
|
-
console.error("Error assigning ref:",
|
|
637
|
+
Object.assign(e, { current: n });
|
|
638
|
+
} catch (o) {
|
|
639
|
+
console.error("Error assigning ref:", o);
|
|
633
640
|
}
|
|
634
641
|
}
|
|
635
|
-
function
|
|
642
|
+
function Zt(...e) {
|
|
636
643
|
return (n) => {
|
|
637
|
-
|
|
638
|
-
|
|
644
|
+
e.forEach((o) => {
|
|
645
|
+
he(o, n);
|
|
639
646
|
});
|
|
640
647
|
};
|
|
641
648
|
}
|
|
642
|
-
const
|
|
643
|
-
let
|
|
644
|
-
|
|
645
|
-
|
|
649
|
+
const tn = (e, n) => {
|
|
650
|
+
let o = null;
|
|
651
|
+
const a = () => {
|
|
652
|
+
o && (clearTimeout(o), o = null);
|
|
646
653
|
};
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
654
|
+
return [(...r) => {
|
|
655
|
+
a(), o = setTimeout(() => e(...r), n);
|
|
656
|
+
}, a];
|
|
657
|
+
}, Kt = (e) => {
|
|
658
|
+
let n = null, o = null;
|
|
659
|
+
return (...s) => {
|
|
660
|
+
o = s, n !== null && cancelAnimationFrame(n), n = requestAnimationFrame(() => {
|
|
661
|
+
e(...o), n = null, o = null;
|
|
662
|
+
});
|
|
653
663
|
};
|
|
654
664
|
};
|
|
655
|
-
function
|
|
656
|
-
const [n,
|
|
657
|
-
if (
|
|
665
|
+
function bt(e) {
|
|
666
|
+
const [n, o] = f.useState({ width: 0, height: 0 }), a = f.useCallback(() => {
|
|
667
|
+
if (e.current)
|
|
658
668
|
try {
|
|
659
|
-
const
|
|
660
|
-
width: Math.round(
|
|
661
|
-
height: Math.round(
|
|
669
|
+
const r = e.current.getBoundingClientRect(), i = {
|
|
670
|
+
width: r ? Math.round(r.width) : 0,
|
|
671
|
+
height: r ? Math.round(r.height) : 0
|
|
662
672
|
};
|
|
663
|
-
(
|
|
664
|
-
|
|
665
|
-
|
|
673
|
+
o(
|
|
674
|
+
(d) => d.width === i.width && d.height === i.height ? d : i
|
|
675
|
+
);
|
|
676
|
+
} catch {
|
|
677
|
+
o({ width: 0, height: 0 });
|
|
666
678
|
}
|
|
667
|
-
}, [
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
679
|
+
}, [e]), s = f.useMemo(() => Kt(a), [a]);
|
|
680
|
+
return f.useLayoutEffect(() => {
|
|
681
|
+
a();
|
|
682
|
+
}, [a]), f.useLayoutEffect(() => {
|
|
683
|
+
if (!e.current) return;
|
|
684
|
+
const r = new ResizeObserver(() => {
|
|
685
|
+
s();
|
|
672
686
|
});
|
|
673
|
-
return
|
|
674
|
-
|
|
687
|
+
return r.observe(e.current), () => {
|
|
688
|
+
r.disconnect();
|
|
675
689
|
};
|
|
676
|
-
}, [
|
|
677
|
-
const f = le(() => {
|
|
678
|
-
i.current = !1, o();
|
|
679
|
-
}, [o]);
|
|
680
|
-
return { ...n, refresh: f };
|
|
690
|
+
}, [e, s]), { ...n, refresh: s };
|
|
681
691
|
}
|
|
682
|
-
function
|
|
683
|
-
totalLines:
|
|
692
|
+
function pe({
|
|
693
|
+
totalLines: e,
|
|
684
694
|
lineHeight: n,
|
|
685
|
-
containerRef:
|
|
686
|
-
buffer:
|
|
695
|
+
containerRef: o,
|
|
696
|
+
buffer: a = 0
|
|
687
697
|
}) {
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
+
const s = ot(
|
|
699
|
+
() => typeof a == "number" ? a : parseInt(a, 10) || 0,
|
|
700
|
+
[a]
|
|
701
|
+
), r = kt(() => {
|
|
702
|
+
const m = o.current;
|
|
703
|
+
if (!m) return { start: 0, end: e };
|
|
704
|
+
if (m.closest(".block"))
|
|
705
|
+
return { start: 0, end: e };
|
|
706
|
+
const b = m.getBoundingClientRect().top + window.scrollY, v = Math.max(0, window.scrollY - b - s), A = v + window.innerHeight + s * 2, M = Math.max(0, Math.floor(v / n)), h = Math.min(e, Math.ceil(A / n));
|
|
707
|
+
return { start: M, end: h };
|
|
708
|
+
}, [e, n, o, s]), [i, d] = re(r);
|
|
709
|
+
ve(["scroll", "resize"], () => {
|
|
710
|
+
c();
|
|
698
711
|
});
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
712
|
+
const g = kt(() => {
|
|
713
|
+
d((m) => {
|
|
714
|
+
const x = r();
|
|
715
|
+
return m.start !== x.start || m.end !== x.end ? x : m;
|
|
716
|
+
});
|
|
717
|
+
}, [r]), c = ot(() => Kt(g), [g]);
|
|
718
|
+
return Jt(() => {
|
|
719
|
+
const m = o.current;
|
|
720
|
+
if (!m) return;
|
|
721
|
+
const x = new IntersectionObserver(c, { threshold: 0 });
|
|
722
|
+
return x.observe(m), c(), () => {
|
|
723
|
+
x.disconnect();
|
|
706
724
|
};
|
|
707
|
-
}, [
|
|
725
|
+
}, [o, r, c]), i;
|
|
708
726
|
}
|
|
709
|
-
function
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
727
|
+
function ve(e, n) {
|
|
728
|
+
const o = kt(n, [n]);
|
|
729
|
+
Jt(() => {
|
|
730
|
+
const a = () => o();
|
|
731
|
+
return e.forEach((s) => window.addEventListener(s, a)), () => e.forEach((s) => window.removeEventListener(s, a));
|
|
732
|
+
}, [e, o]);
|
|
713
733
|
}
|
|
714
|
-
function
|
|
734
|
+
function mt(e, {
|
|
715
735
|
base: n = 8,
|
|
716
|
-
snapping:
|
|
717
|
-
spacing:
|
|
718
|
-
warnOnMisalignment:
|
|
736
|
+
snapping: o = "none",
|
|
737
|
+
spacing: a = {},
|
|
738
|
+
warnOnMisalignment: s = !1
|
|
719
739
|
} = {}) {
|
|
720
740
|
if (n < 1)
|
|
721
741
|
throw new Error("Base must be >= 1 for baseline alignment.");
|
|
722
|
-
const { height:
|
|
723
|
-
return
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}, [n, r, s, o, i]);
|
|
742
|
+
const { height: r } = bt(e), i = se(!1);
|
|
743
|
+
return ot(() => {
|
|
744
|
+
const d = D({ padding: a }), g = r % n === 0;
|
|
745
|
+
if (!g && s && process.env.NODE_ENV === "development" && console.warn(
|
|
746
|
+
`[useBaseline] Element height (${r}px) is not aligned with base (${n}px).`
|
|
747
|
+
), o === "none")
|
|
748
|
+
return { padding: d, isAligned: g, height: r };
|
|
749
|
+
if (i.current)
|
|
750
|
+
return { padding: d, isAligned: g, height: r };
|
|
751
|
+
const c = ge(r, n, d, o);
|
|
752
|
+
return i.current = !0, { padding: c, isAligned: g, height: r };
|
|
753
|
+
}, [n, o, a, s, r]);
|
|
735
754
|
}
|
|
736
|
-
function
|
|
737
|
-
const { width:
|
|
738
|
-
return
|
|
739
|
-
const
|
|
740
|
-
if (!
|
|
755
|
+
function xe(e, n) {
|
|
756
|
+
const { width: o } = bt(e);
|
|
757
|
+
return ot(() => {
|
|
758
|
+
const a = n.variant ?? "line", s = dt(n.gap ?? 0, { base: 1 });
|
|
759
|
+
if (!o)
|
|
741
760
|
return {
|
|
742
761
|
template: "none",
|
|
743
762
|
columnsCount: 0,
|
|
@@ -745,103 +764,103 @@ function yt(t, n) {
|
|
|
745
764
|
isValid: !1
|
|
746
765
|
};
|
|
747
766
|
try {
|
|
748
|
-
switch (
|
|
767
|
+
switch (a) {
|
|
749
768
|
case "line": {
|
|
750
|
-
const
|
|
769
|
+
const r = Math.max(1, Math.floor(o / (s + 1)) + 1);
|
|
751
770
|
return {
|
|
752
|
-
template: `repeat(${
|
|
753
|
-
columnsCount:
|
|
754
|
-
calculatedGap:
|
|
771
|
+
template: `repeat(${r}, 1px)`,
|
|
772
|
+
columnsCount: r,
|
|
773
|
+
calculatedGap: s,
|
|
755
774
|
isValid: !0
|
|
756
775
|
};
|
|
757
776
|
}
|
|
758
777
|
case "pattern": {
|
|
759
|
-
if (!
|
|
778
|
+
if (!qe(n.columns))
|
|
760
779
|
throw new Error('Invalid "pattern" columns array');
|
|
761
|
-
const
|
|
762
|
-
return
|
|
780
|
+
const r = n.columns.map((i) => typeof i == "number" ? `${i}px` : i);
|
|
781
|
+
return r.some((i) => i === "0" || i === "0px") ? {
|
|
763
782
|
template: "none",
|
|
764
783
|
columnsCount: 0,
|
|
765
784
|
calculatedGap: 0,
|
|
766
785
|
isValid: !1
|
|
767
786
|
} : {
|
|
768
|
-
template:
|
|
769
|
-
columnsCount:
|
|
770
|
-
calculatedGap:
|
|
787
|
+
template: r.join(" "),
|
|
788
|
+
columnsCount: r.length,
|
|
789
|
+
calculatedGap: s,
|
|
771
790
|
isValid: !0
|
|
772
791
|
};
|
|
773
792
|
}
|
|
774
793
|
case "fixed": {
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
throw new Error(`Invalid columns count: ${
|
|
778
|
-
const
|
|
794
|
+
const r = typeof n.columns == "number" ? n.columns : 0;
|
|
795
|
+
if (r < 1)
|
|
796
|
+
throw new Error(`Invalid columns count: ${r}`);
|
|
797
|
+
const i = n.columnWidth ? U(n.columnWidth) : "1fr";
|
|
779
798
|
return {
|
|
780
|
-
template: `repeat(${
|
|
781
|
-
columnsCount:
|
|
782
|
-
calculatedGap:
|
|
799
|
+
template: `repeat(${r}, ${i})`,
|
|
800
|
+
columnsCount: r,
|
|
801
|
+
calculatedGap: s,
|
|
783
802
|
isValid: !0
|
|
784
803
|
};
|
|
785
804
|
}
|
|
786
805
|
case "auto": {
|
|
787
|
-
const
|
|
788
|
-
if (
|
|
806
|
+
const r = n.columnWidth ?? "auto";
|
|
807
|
+
if (r === "auto")
|
|
789
808
|
return {
|
|
790
809
|
template: "repeat(auto-fit, minmax(0, 1fr))",
|
|
791
810
|
columnsCount: 1,
|
|
792
|
-
calculatedGap:
|
|
811
|
+
calculatedGap: s,
|
|
793
812
|
isValid: !0
|
|
794
813
|
};
|
|
795
|
-
const
|
|
814
|
+
const i = typeof r == "number" ? `${r}px` : r.toString(), d = yt(i) ?? 0, g = d > 0 ? Math.max(1, Math.floor((o + s) / (d + s))) : 1;
|
|
796
815
|
return {
|
|
797
|
-
template: `repeat(auto-fit, minmax(${
|
|
798
|
-
columnsCount:
|
|
799
|
-
calculatedGap:
|
|
816
|
+
template: `repeat(auto-fit, minmax(${i}, 1fr))`,
|
|
817
|
+
columnsCount: g,
|
|
818
|
+
calculatedGap: s,
|
|
800
819
|
isValid: !0
|
|
801
820
|
};
|
|
802
821
|
}
|
|
803
822
|
default: {
|
|
804
823
|
console.warn(
|
|
805
|
-
`[useGuide] Unknown variant "${
|
|
824
|
+
`[useGuide] Unknown variant "${a}". Falling back to "line".`
|
|
806
825
|
);
|
|
807
|
-
const
|
|
826
|
+
const r = Math.max(1, Math.floor(o / (s + 1)) + 1);
|
|
808
827
|
return {
|
|
809
|
-
template: `repeat(${
|
|
810
|
-
columnsCount:
|
|
811
|
-
calculatedGap:
|
|
828
|
+
template: `repeat(${r}, 1px)`,
|
|
829
|
+
columnsCount: r,
|
|
830
|
+
calculatedGap: s,
|
|
812
831
|
isValid: !0
|
|
813
832
|
};
|
|
814
833
|
}
|
|
815
834
|
}
|
|
816
|
-
} catch (
|
|
817
|
-
return console.warn("Error in useGuide:",
|
|
835
|
+
} catch (r) {
|
|
836
|
+
return console.warn("Error in useGuide:", r), {
|
|
818
837
|
template: "none",
|
|
819
838
|
columnsCount: 0,
|
|
820
839
|
calculatedGap: 0,
|
|
821
840
|
isValid: !1
|
|
822
841
|
};
|
|
823
842
|
}
|
|
824
|
-
}, [n,
|
|
843
|
+
}, [n, o]);
|
|
825
844
|
}
|
|
826
|
-
function
|
|
827
|
-
const n =
|
|
828
|
-
return
|
|
845
|
+
function X(e) {
|
|
846
|
+
const n = Qt();
|
|
847
|
+
return ot(() => Object.assign(
|
|
829
848
|
{ base: n.base },
|
|
830
|
-
n[
|
|
831
|
-
), [n,
|
|
849
|
+
n[e]
|
|
850
|
+
), [n, e]);
|
|
832
851
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
835
|
-
const
|
|
852
|
+
function tt(e, n) {
|
|
853
|
+
return ot(() => {
|
|
854
|
+
const o = e ?? n;
|
|
836
855
|
return {
|
|
837
|
-
isShown:
|
|
838
|
-
isHidden:
|
|
839
|
-
isNone:
|
|
840
|
-
debugging:
|
|
856
|
+
isShown: o === "visible",
|
|
857
|
+
isHidden: o === "hidden",
|
|
858
|
+
isNone: o === "none",
|
|
859
|
+
debugging: o
|
|
841
860
|
};
|
|
842
|
-
}, [
|
|
861
|
+
}, [e, n]);
|
|
843
862
|
}
|
|
844
|
-
const
|
|
863
|
+
const ke = {
|
|
845
864
|
/** Color for single-line guides */
|
|
846
865
|
line: "var(--bk-guide-color-line-theme)",
|
|
847
866
|
/** Color for pattern-based guides */
|
|
@@ -850,439 +869,522 @@ const kt = {
|
|
|
850
869
|
auto: "var(--bk-guide-color-auto-theme)",
|
|
851
870
|
/** Color for fixed-column guides */
|
|
852
871
|
fixed: "var(--bk-guide-color-fixed-theme)"
|
|
853
|
-
},
|
|
872
|
+
}, we = {
|
|
854
873
|
/** Color for line variant */
|
|
855
874
|
line: "var(--bk-baseline-color-line-theme)",
|
|
856
875
|
/** Color for flat/block variant */
|
|
857
876
|
flat: "var(--bk-baseline-color-flat-theme)"
|
|
858
|
-
},
|
|
877
|
+
}, ye = {
|
|
859
878
|
/** Color for line-style spacers */
|
|
860
879
|
line: "var(--bk-spacer-color-line-theme)",
|
|
861
880
|
/** Color for flat/block spacers */
|
|
862
881
|
flat: "var(--bk-spacer-color-flat-theme)",
|
|
863
882
|
/** Color for measurement indicators */
|
|
864
|
-
|
|
865
|
-
},
|
|
883
|
+
text: "var(--bk-spacer-color-text-theme)"
|
|
884
|
+
}, Ee = {
|
|
866
885
|
/** Border color for debug outline */
|
|
867
886
|
line: "var(--bk-box-color-line-theme)",
|
|
868
887
|
/** Background color for debug mode */
|
|
869
888
|
flat: "var(--bk-box-color-flat-theme)",
|
|
870
889
|
/** Color for measurement indicators */
|
|
871
|
-
|
|
872
|
-
},
|
|
890
|
+
text: "var(--bk-box-color-text-theme)"
|
|
891
|
+
}, Se = {
|
|
873
892
|
/** Border color for debug outline */
|
|
874
893
|
line: "var(--bk-stack-color-line-theme)",
|
|
875
894
|
/** Background color for debug mode */
|
|
876
895
|
flat: "var(--bk-stack-color-flat-theme)",
|
|
877
896
|
/** Color for measurement indicators */
|
|
878
|
-
|
|
879
|
-
},
|
|
897
|
+
text: "var(--bk-stack-color-text-theme)"
|
|
898
|
+
}, Ce = {
|
|
880
899
|
/** Border color for debug outline */
|
|
881
900
|
line: "var(--bk-layout-color-line-theme)",
|
|
882
901
|
/** Background color for debug mode */
|
|
883
902
|
flat: "var(--bk-layout-color-flat-theme)",
|
|
884
903
|
/** Color for measurement indicators */
|
|
885
|
-
|
|
886
|
-
},
|
|
904
|
+
text: "var(--bk-layout-color-text-theme)"
|
|
905
|
+
}, Re = "var(--bk-padder-color-theme)", _e = {
|
|
887
906
|
/** Base unit for spacing calculations (in pixels) */
|
|
888
907
|
base: 8,
|
|
889
908
|
/** Baseline grid configuration */
|
|
890
909
|
baseline: {
|
|
891
910
|
variant: "line",
|
|
892
911
|
debugging: "hidden",
|
|
893
|
-
colors:
|
|
912
|
+
colors: we
|
|
894
913
|
},
|
|
895
914
|
/** Guide overlay configuration */
|
|
896
915
|
guide: {
|
|
897
916
|
variant: "line",
|
|
898
917
|
debugging: "hidden",
|
|
899
|
-
colors:
|
|
918
|
+
colors: ke
|
|
900
919
|
},
|
|
901
920
|
/** Spacer component configuration */
|
|
902
921
|
spacer: {
|
|
903
922
|
variant: "line",
|
|
904
923
|
debugging: "hidden",
|
|
905
|
-
colors:
|
|
924
|
+
colors: ye
|
|
906
925
|
},
|
|
907
926
|
/** Box component configuration */
|
|
908
927
|
box: {
|
|
909
928
|
debugging: "hidden",
|
|
910
|
-
colors:
|
|
929
|
+
colors: Ee
|
|
911
930
|
},
|
|
912
931
|
/** Stack/Flex component configuration */
|
|
913
932
|
stack: {
|
|
914
933
|
debugging: "hidden",
|
|
915
|
-
colors:
|
|
934
|
+
colors: Se
|
|
916
935
|
},
|
|
917
936
|
/** Layout component configuration */
|
|
918
937
|
layout: {
|
|
919
938
|
debugging: "hidden",
|
|
920
|
-
colors:
|
|
939
|
+
colors: Ce
|
|
921
940
|
},
|
|
922
941
|
/** Padder component configuration */
|
|
923
942
|
padder: {
|
|
924
943
|
debugging: "hidden",
|
|
925
|
-
color:
|
|
944
|
+
color: Re
|
|
926
945
|
}
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
const
|
|
930
|
-
base:
|
|
946
|
+
}, Et = f.createContext(null);
|
|
947
|
+
Et.displayName = "ConfigContext";
|
|
948
|
+
const Qt = () => f.use(Et) ?? _e, je = ({
|
|
949
|
+
base: e,
|
|
931
950
|
baseline: n,
|
|
932
|
-
guide:
|
|
933
|
-
stack:
|
|
934
|
-
spacer:
|
|
935
|
-
layout:
|
|
936
|
-
box:
|
|
937
|
-
padder:
|
|
951
|
+
guide: o,
|
|
952
|
+
stack: a,
|
|
953
|
+
spacer: s,
|
|
954
|
+
layout: r,
|
|
955
|
+
box: i,
|
|
956
|
+
padder: d
|
|
938
957
|
}) => ({
|
|
939
|
-
"--
|
|
958
|
+
"--bkb": `${e}px`,
|
|
940
959
|
// Baseline Colors
|
|
941
|
-
"--
|
|
942
|
-
"--
|
|
960
|
+
"--bkbcl": n.colors.line,
|
|
961
|
+
"--bkbcf": n.colors.flat,
|
|
943
962
|
// Guide Colors
|
|
944
|
-
"--
|
|
945
|
-
"--
|
|
946
|
-
"--
|
|
947
|
-
"--
|
|
963
|
+
"--bkgcl": o.colors.line,
|
|
964
|
+
"--bkgcp": o.colors.pattern,
|
|
965
|
+
"--bkgca": o.colors.auto,
|
|
966
|
+
"--bkgcf": o.colors.fixed,
|
|
948
967
|
// Spacer Colors
|
|
949
|
-
"--
|
|
950
|
-
"--
|
|
951
|
-
"--
|
|
968
|
+
"--bkscl": s.colors.line,
|
|
969
|
+
"--bkscf": s.colors.flat,
|
|
970
|
+
"--bksci": s.colors.text,
|
|
952
971
|
// Box Colors
|
|
953
|
-
"--
|
|
954
|
-
"--
|
|
955
|
-
"--
|
|
972
|
+
"--bkxcl": i.colors.line,
|
|
973
|
+
"--bkxcf": i.colors.flat,
|
|
974
|
+
"--bkxci": i.colors.text,
|
|
956
975
|
// Flex Colors
|
|
957
|
-
"--
|
|
958
|
-
"--
|
|
959
|
-
"--
|
|
976
|
+
"--bkkcl": a.colors.line,
|
|
977
|
+
"--bkkcf": a.colors.flat,
|
|
978
|
+
"--bkkci": a.colors.text,
|
|
960
979
|
// Layout Colors
|
|
961
|
-
"--
|
|
962
|
-
"--
|
|
963
|
-
"--
|
|
980
|
+
"--bklcl": r.colors.line,
|
|
981
|
+
"--bklcf": r.colors.flat,
|
|
982
|
+
"--bklci": r.colors.text,
|
|
964
983
|
// Padder Color
|
|
965
|
-
"--
|
|
984
|
+
"--bkpc": d.color
|
|
966
985
|
});
|
|
967
|
-
function
|
|
968
|
-
children:
|
|
986
|
+
function St({
|
|
987
|
+
children: e,
|
|
969
988
|
base: n,
|
|
970
|
-
stack:
|
|
971
|
-
baseline:
|
|
972
|
-
guide:
|
|
973
|
-
layout:
|
|
974
|
-
spacer:
|
|
975
|
-
box:
|
|
976
|
-
padder:
|
|
989
|
+
stack: o,
|
|
990
|
+
baseline: a,
|
|
991
|
+
guide: s,
|
|
992
|
+
layout: r,
|
|
993
|
+
spacer: i,
|
|
994
|
+
box: d,
|
|
995
|
+
padder: g
|
|
977
996
|
}) {
|
|
978
|
-
const
|
|
997
|
+
const c = Qt(), m = f.useMemo(() => {
|
|
979
998
|
const x = {
|
|
980
|
-
base: n ??
|
|
981
|
-
baseline: { ...
|
|
982
|
-
guide: { ...
|
|
983
|
-
spacer: { ...
|
|
984
|
-
box: { ...
|
|
985
|
-
stack: { ...
|
|
986
|
-
layout: { ...
|
|
987
|
-
padder: { ...
|
|
999
|
+
base: n ?? c.base,
|
|
1000
|
+
baseline: { ...c.baseline, ...a },
|
|
1001
|
+
guide: { ...c.guide, ...s },
|
|
1002
|
+
spacer: { ...c.spacer, ...i },
|
|
1003
|
+
box: { ...c.box, ...d },
|
|
1004
|
+
stack: { ...c.stack, ...o },
|
|
1005
|
+
layout: { ...c.layout, ...r },
|
|
1006
|
+
padder: { ...c.padder, ...g }
|
|
988
1007
|
};
|
|
989
1008
|
return {
|
|
990
1009
|
...x,
|
|
991
|
-
cssVariables:
|
|
1010
|
+
cssVariables: je(x)
|
|
992
1011
|
};
|
|
993
1012
|
}, [
|
|
994
1013
|
n,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1014
|
+
c.base,
|
|
1015
|
+
c.baseline,
|
|
1016
|
+
c.guide,
|
|
1017
|
+
c.spacer,
|
|
1018
|
+
c.box,
|
|
1019
|
+
c.stack,
|
|
1020
|
+
c.layout,
|
|
1021
|
+
c.padder,
|
|
1022
|
+
a,
|
|
1003
1023
|
s,
|
|
1004
1024
|
i,
|
|
1005
|
-
|
|
1006
|
-
f,
|
|
1007
|
-
r,
|
|
1025
|
+
d,
|
|
1008
1026
|
o,
|
|
1009
|
-
|
|
1027
|
+
r,
|
|
1028
|
+
g
|
|
1010
1029
|
]);
|
|
1011
|
-
return /* @__PURE__ */
|
|
1030
|
+
return /* @__PURE__ */ _.jsx(Et, { value: m, children: e });
|
|
1012
1031
|
}
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
line:
|
|
1016
|
-
flat:
|
|
1017
|
-
},
|
|
1032
|
+
const Oe = "spr_4aLVm", Te = "line_lUa33", Ae = "flat_zXVQF", Pt = {
|
|
1033
|
+
spr: Oe,
|
|
1034
|
+
line: Te,
|
|
1035
|
+
flat: Ae
|
|
1036
|
+
}, $e = f.memo(function({
|
|
1018
1037
|
height: n,
|
|
1019
|
-
width:
|
|
1020
|
-
indicatorNode:
|
|
1021
|
-
debugging:
|
|
1022
|
-
variant:
|
|
1023
|
-
base:
|
|
1024
|
-
color:
|
|
1025
|
-
className:
|
|
1026
|
-
style:
|
|
1027
|
-
...
|
|
1038
|
+
width: o,
|
|
1039
|
+
indicatorNode: a,
|
|
1040
|
+
debugging: s,
|
|
1041
|
+
variant: r,
|
|
1042
|
+
base: i,
|
|
1043
|
+
color: d,
|
|
1044
|
+
className: g,
|
|
1045
|
+
style: c,
|
|
1046
|
+
...m
|
|
1028
1047
|
}) {
|
|
1029
|
-
const x =
|
|
1030
|
-
[
|
|
1048
|
+
const x = f.useRef(null), b = X("spacer"), { isShown: v } = tt(s, b.debugging), A = r ?? b.variant, M = i ?? b.base, [h, $] = Dt(
|
|
1049
|
+
[o, n],
|
|
1031
1050
|
[0, 0],
|
|
1032
|
-
{ base:
|
|
1033
|
-
),
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
].filter(Boolean), [
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1051
|
+
{ base: M, suppressWarnings: !0 }
|
|
1052
|
+
), N = f.useMemo(() => !v || !a ? null : [
|
|
1053
|
+
$ !== 0 && /* @__PURE__ */ _.jsx("span", { children: a($, "height") }, "height"),
|
|
1054
|
+
h !== 0 && /* @__PURE__ */ _.jsx("span", { children: a(h, "width") }, "width")
|
|
1055
|
+
].filter(Boolean), [v, a, $, h]), k = f.useMemo(() => ({
|
|
1056
|
+
"--bksh": "100%",
|
|
1057
|
+
"--bksw": "100%",
|
|
1058
|
+
"--bksb": `${b.base}px`,
|
|
1059
|
+
"--bksci": "var(--bk-spacer-color-text-theme)",
|
|
1060
|
+
"--bkscl": "var(--bk-spacer-color-line-theme)",
|
|
1061
|
+
"--bkscf": "var(--bk-spacer-color-flat-theme)"
|
|
1062
|
+
}), [b.base]), C = f.useCallback(
|
|
1063
|
+
(V, O) => (V === "--bksw" || V === "--bksh") && O === "100%" ? {} : O !== k[V] ? { [V]: O } : {},
|
|
1064
|
+
[k]
|
|
1065
|
+
), E = f.useMemo(() => {
|
|
1066
|
+
const V = U($ || "100%"), O = U(h || "100%"), R = `${i || b.base}px`, w = {
|
|
1067
|
+
...C("--bksh", V),
|
|
1068
|
+
...C("--bksw", O),
|
|
1069
|
+
...C("--bksb", R),
|
|
1070
|
+
...C(
|
|
1071
|
+
"--bksci",
|
|
1072
|
+
d ?? b.colors.text
|
|
1073
|
+
),
|
|
1074
|
+
...C(
|
|
1075
|
+
"--bkscl",
|
|
1076
|
+
d ?? b.colors.line
|
|
1077
|
+
),
|
|
1078
|
+
...C(
|
|
1079
|
+
"--bkscf",
|
|
1080
|
+
d ?? b.colors.flat
|
|
1081
|
+
)
|
|
1044
1082
|
};
|
|
1045
|
-
return
|
|
1046
|
-
}, [
|
|
1047
|
-
|
|
1083
|
+
return I(w, c);
|
|
1084
|
+
}, [
|
|
1085
|
+
C,
|
|
1086
|
+
$,
|
|
1087
|
+
h,
|
|
1088
|
+
b.base,
|
|
1089
|
+
d,
|
|
1090
|
+
b.colors.text,
|
|
1091
|
+
b.colors.line,
|
|
1092
|
+
b.colors.flat,
|
|
1093
|
+
c
|
|
1094
|
+
]);
|
|
1095
|
+
return /* @__PURE__ */ _.jsx(
|
|
1048
1096
|
"div",
|
|
1049
1097
|
{
|
|
1050
1098
|
ref: x,
|
|
1051
|
-
className: D(
|
|
1052
|
-
Ie.spacer,
|
|
1053
|
-
h && Ie[T],
|
|
1054
|
-
d
|
|
1055
|
-
),
|
|
1056
1099
|
"data-testid": "spacer",
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1100
|
+
className: J(Pt.spr, v && Pt[A], g),
|
|
1101
|
+
"data-variant": A,
|
|
1102
|
+
style: E,
|
|
1103
|
+
...m,
|
|
1104
|
+
children: N
|
|
1061
1105
|
}
|
|
1062
1106
|
);
|
|
1063
|
-
}),
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1107
|
+
}), Me = "pad_I0i9S", Ne = "v_E0FRN", xt = {
|
|
1108
|
+
pad: Me,
|
|
1109
|
+
v: Ne
|
|
1110
|
+
}, Ct = f.memo(
|
|
1111
|
+
f.forwardRef(function({
|
|
1068
1112
|
children: n,
|
|
1069
|
-
className:
|
|
1070
|
-
debugging:
|
|
1071
|
-
height:
|
|
1072
|
-
indicatorNode:
|
|
1073
|
-
style:
|
|
1074
|
-
width:
|
|
1075
|
-
...
|
|
1076
|
-
},
|
|
1077
|
-
const
|
|
1078
|
-
() =>
|
|
1079
|
-
[
|
|
1080
|
-
), { isShown:
|
|
1081
|
-
|
|
1113
|
+
className: o,
|
|
1114
|
+
debugging: a,
|
|
1115
|
+
height: s,
|
|
1116
|
+
indicatorNode: r,
|
|
1117
|
+
style: i,
|
|
1118
|
+
width: d,
|
|
1119
|
+
...g
|
|
1120
|
+
}, c) {
|
|
1121
|
+
const m = X("padder"), { variant: x } = X("spacer"), b = f.useMemo(
|
|
1122
|
+
() => D(g),
|
|
1123
|
+
[g]
|
|
1124
|
+
), { isShown: v, isNone: A, debugging: M } = tt(
|
|
1125
|
+
a,
|
|
1126
|
+
m.debugging
|
|
1127
|
+
), h = !A, $ = f.useRef(null), {
|
|
1128
|
+
padding: { top: N, left: k, bottom: C, right: E }
|
|
1129
|
+
} = mt($, {
|
|
1130
|
+
base: m.base,
|
|
1082
1131
|
snapping: "height",
|
|
1083
|
-
spacing:
|
|
1084
|
-
warnOnMisalignment: !
|
|
1085
|
-
}),
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
Nt,
|
|
1132
|
+
spacing: b,
|
|
1133
|
+
warnOnMisalignment: !A
|
|
1134
|
+
}), V = Zt(c, $), O = f.useMemo(() => {
|
|
1135
|
+
const w = {};
|
|
1136
|
+
return d !== "fit-content" && (w["--bkpw"] = U(d || "fit-content")), s !== "fit-content" && (w["--bkph"] = U(s || "fit-content")), m.base !== 8 && (w["--bkpb"] = `${m.base}px`), m.color !== "var(--bk-padder-color-theme)" && (w["--bkpc"] = m.color), h || ((N > 0 || C > 0) && (w.paddingBlock = `${N}px ${C}px`), (k > 0 || E > 0) && (w.paddingInline = `${k}px ${E}px`)), I(w, i);
|
|
1137
|
+
}, [
|
|
1138
|
+
d,
|
|
1139
|
+
s,
|
|
1140
|
+
m.base,
|
|
1141
|
+
m.color,
|
|
1142
|
+
h,
|
|
1143
|
+
N,
|
|
1144
|
+
E,
|
|
1145
|
+
C,
|
|
1146
|
+
k,
|
|
1147
|
+
i
|
|
1148
|
+
]), R = (w, j) => /* @__PURE__ */ _.jsx(
|
|
1149
|
+
$e,
|
|
1102
1150
|
{
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1151
|
+
variant: x,
|
|
1152
|
+
debugging: M,
|
|
1153
|
+
indicatorNode: r,
|
|
1154
|
+
height: j !== "100%" ? j : void 0,
|
|
1155
|
+
width: w !== "100%" ? w : void 0
|
|
1107
1156
|
}
|
|
1108
1157
|
);
|
|
1109
|
-
return /* @__PURE__ */
|
|
1158
|
+
return h ? /* @__PURE__ */ _.jsxs(
|
|
1110
1159
|
"div",
|
|
1111
1160
|
{
|
|
1112
|
-
ref:
|
|
1113
|
-
className: D(
|
|
1114
|
-
Fe.padder,
|
|
1115
|
-
b && Fe.visible,
|
|
1116
|
-
r
|
|
1117
|
-
),
|
|
1161
|
+
ref: V,
|
|
1118
1162
|
"data-testid": "padder",
|
|
1163
|
+
className: J(xt.pad, v && xt.v, o),
|
|
1119
1164
|
style: O,
|
|
1120
1165
|
children: [
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1166
|
+
/* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
1167
|
+
N > 0 && /* @__PURE__ */ _.jsx("div", { style: { gridColumn: "1 / -1" }, children: R("100%", N) }),
|
|
1168
|
+
k > 0 && /* @__PURE__ */ _.jsx("div", { style: { gridRow: "2 / 3" }, children: R(k, "100%") })
|
|
1124
1169
|
] }),
|
|
1125
|
-
n,
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1170
|
+
/* @__PURE__ */ _.jsx("div", { style: { gridRow: "2 / 3", gridColumn: "2 / 3" }, children: n }),
|
|
1171
|
+
/* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
1172
|
+
E > 0 && /* @__PURE__ */ _.jsx("div", { style: { gridRow: "2 / 3" }, children: R(E, "100%") }),
|
|
1173
|
+
C > 0 && /* @__PURE__ */ _.jsx("div", { style: { gridColumn: "1 / -1" }, children: R("100%", C) })
|
|
1129
1174
|
] })
|
|
1130
1175
|
]
|
|
1131
1176
|
}
|
|
1177
|
+
) : /* @__PURE__ */ _.jsx(
|
|
1178
|
+
"div",
|
|
1179
|
+
{
|
|
1180
|
+
ref: V,
|
|
1181
|
+
"data-testid": "padder",
|
|
1182
|
+
className: J(xt.pad, o),
|
|
1183
|
+
style: O,
|
|
1184
|
+
children: n
|
|
1185
|
+
}
|
|
1132
1186
|
);
|
|
1133
1187
|
})
|
|
1134
|
-
),
|
|
1135
|
-
|
|
1136
|
-
|
|
1188
|
+
), Ve = "lay_yGGkG", Ge = "v_uVoBP", Ft = {
|
|
1189
|
+
lay: Ve,
|
|
1190
|
+
v: Ge
|
|
1137
1191
|
};
|
|
1138
|
-
function
|
|
1139
|
-
return typeof
|
|
1192
|
+
function Ht(e) {
|
|
1193
|
+
return typeof e == "number" ? `repeat(${e}, 1fr)` : typeof e == "string" ? e : Array.isArray(e) ? e.map((n) => typeof n == "number" ? `${n}px` : n).join(" ") : "repeat(auto-fit, minmax(100px, 1fr))";
|
|
1140
1194
|
}
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
})
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
)
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1195
|
+
const en = f.memo(function({
|
|
1196
|
+
children: n,
|
|
1197
|
+
columns: o,
|
|
1198
|
+
rows: a,
|
|
1199
|
+
rowGap: s,
|
|
1200
|
+
columnGap: r,
|
|
1201
|
+
gap: i,
|
|
1202
|
+
height: d,
|
|
1203
|
+
width: g,
|
|
1204
|
+
indicatorNode: c,
|
|
1205
|
+
justifyItems: m,
|
|
1206
|
+
alignItems: x,
|
|
1207
|
+
justifyContent: b,
|
|
1208
|
+
alignContent: v,
|
|
1209
|
+
className: A,
|
|
1210
|
+
variant: M,
|
|
1211
|
+
style: h,
|
|
1212
|
+
debugging: $,
|
|
1213
|
+
...N
|
|
1214
|
+
}) {
|
|
1215
|
+
const k = X("layout"), { isShown: C } = tt($, k.debugging), E = f.useRef(null), V = f.useMemo(
|
|
1216
|
+
() => D(N),
|
|
1217
|
+
[N]
|
|
1218
|
+
), { padding: O } = mt(E, {
|
|
1219
|
+
base: k.base,
|
|
1220
|
+
snapping: "height",
|
|
1221
|
+
spacing: V,
|
|
1222
|
+
warnOnMisalignment: !0
|
|
1223
|
+
}), R = f.useMemo(
|
|
1224
|
+
() => Ht(o),
|
|
1225
|
+
[o]
|
|
1226
|
+
), w = f.useMemo(
|
|
1227
|
+
() => a ? Ht(a) : "auto",
|
|
1228
|
+
[a]
|
|
1229
|
+
), j = f.useMemo(
|
|
1230
|
+
() => ({
|
|
1231
|
+
"--bklw": "auto",
|
|
1232
|
+
"--bklh": "auto",
|
|
1233
|
+
"--bklcl": k.colors.line,
|
|
1234
|
+
"--bklcf": k.colors.flat,
|
|
1235
|
+
"--bklci": k.colors.text
|
|
1236
|
+
}),
|
|
1237
|
+
[k.colors.line, k.colors.flat, k.colors.text]
|
|
1238
|
+
), y = f.useCallback(
|
|
1239
|
+
(B, W) => (B === "--bklw" || B === "--bklh") && W === "auto" ? {} : W !== j[B] ? { [B]: W } : {},
|
|
1240
|
+
[j]
|
|
1241
|
+
), T = f.useMemo(
|
|
1242
|
+
() => ({
|
|
1243
|
+
...i !== void 0 && { gap: U(i) },
|
|
1244
|
+
...s !== void 0 && { rowGap: U(s) },
|
|
1245
|
+
...r !== void 0 && { columnGap: U(r) }
|
|
1246
|
+
}),
|
|
1247
|
+
[i, s, r]
|
|
1248
|
+
), L = f.useMemo(() => {
|
|
1249
|
+
const B = U(g || "auto"), W = U(d || "auto");
|
|
1250
|
+
return I(
|
|
1181
1251
|
{
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
"--
|
|
1194
|
-
"--
|
|
1195
|
-
"--
|
|
1252
|
+
// Theme overrides
|
|
1253
|
+
...y("--bklw", B),
|
|
1254
|
+
...y("--bklh", W),
|
|
1255
|
+
...y("--bklcl", k.colors.line),
|
|
1256
|
+
...y("--bklcf", k.colors.flat),
|
|
1257
|
+
...y("--bklci", k.colors.text),
|
|
1258
|
+
// Grid properties - only inject if different from defaults
|
|
1259
|
+
...R !== "repeat(auto-fit, minmax(100px, 1fr))" && {
|
|
1260
|
+
"--bklgtc": R
|
|
1261
|
+
},
|
|
1262
|
+
...w !== "auto" && { "--bklgtr": w },
|
|
1263
|
+
...m && { "--bklji": m },
|
|
1264
|
+
...x && { "--bklai": x },
|
|
1265
|
+
...b && { "--bkljc": b },
|
|
1266
|
+
...v && { "--bklac": v },
|
|
1267
|
+
// Include gap styles
|
|
1268
|
+
...T
|
|
1196
1269
|
},
|
|
1197
|
-
|
|
1198
|
-
)
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1270
|
+
h
|
|
1271
|
+
);
|
|
1272
|
+
}, [
|
|
1273
|
+
R,
|
|
1274
|
+
w,
|
|
1275
|
+
m,
|
|
1276
|
+
x,
|
|
1277
|
+
b,
|
|
1278
|
+
v,
|
|
1279
|
+
g,
|
|
1280
|
+
d,
|
|
1281
|
+
k.colors.line,
|
|
1282
|
+
k.colors.flat,
|
|
1283
|
+
k.colors.text,
|
|
1284
|
+
y,
|
|
1285
|
+
h,
|
|
1286
|
+
T
|
|
1287
|
+
]);
|
|
1288
|
+
return /* @__PURE__ */ _.jsx(
|
|
1289
|
+
St,
|
|
1290
|
+
{
|
|
1291
|
+
spacer: { variant: M ?? "line" },
|
|
1292
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1293
|
+
Ct,
|
|
1294
|
+
{
|
|
1295
|
+
ref: E,
|
|
1296
|
+
className: C ? Ft.v : "",
|
|
1297
|
+
block: [O.top, O.bottom],
|
|
1298
|
+
indicatorNode: c,
|
|
1299
|
+
inline: [O.left, O.right],
|
|
1300
|
+
debugging: $,
|
|
1301
|
+
width: g,
|
|
1302
|
+
height: d,
|
|
1303
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1304
|
+
"div",
|
|
1305
|
+
{
|
|
1306
|
+
"data-testid": "layout",
|
|
1307
|
+
className: J(A, Ft.lay),
|
|
1308
|
+
style: L,
|
|
1309
|
+
children: n
|
|
1310
|
+
}
|
|
1311
|
+
)
|
|
1312
|
+
}
|
|
1313
|
+
)
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
}), We = "box_LHy8B", Be = "v_q3Ozc", It = {
|
|
1317
|
+
box: We,
|
|
1318
|
+
v: Be
|
|
1319
|
+
}, nn = f.memo(
|
|
1320
|
+
f.forwardRef(function({
|
|
1230
1321
|
children: n,
|
|
1231
|
-
snapping:
|
|
1232
|
-
debugging:
|
|
1233
|
-
className:
|
|
1234
|
-
colSpan:
|
|
1235
|
-
rowSpan:
|
|
1236
|
-
span:
|
|
1237
|
-
width:
|
|
1238
|
-
height:
|
|
1239
|
-
style:
|
|
1322
|
+
snapping: o = "clamp",
|
|
1323
|
+
debugging: a,
|
|
1324
|
+
className: s,
|
|
1325
|
+
colSpan: r,
|
|
1326
|
+
rowSpan: i,
|
|
1327
|
+
span: d,
|
|
1328
|
+
width: g,
|
|
1329
|
+
height: c,
|
|
1330
|
+
style: m,
|
|
1240
1331
|
...x
|
|
1241
1332
|
}, b) {
|
|
1242
|
-
const
|
|
1243
|
-
base:
|
|
1244
|
-
snapping:
|
|
1245
|
-
spacing: { top:
|
|
1246
|
-
warnOnMisalignment:
|
|
1247
|
-
}),
|
|
1248
|
-
const
|
|
1249
|
-
return
|
|
1250
|
-
}, [
|
|
1251
|
-
() =>
|
|
1252
|
-
"--
|
|
1253
|
-
"--
|
|
1254
|
-
"--
|
|
1255
|
-
"--
|
|
1256
|
-
}
|
|
1257
|
-
[
|
|
1258
|
-
)
|
|
1259
|
-
|
|
1333
|
+
const v = X("box"), { isShown: A, debugging: M } = tt(a, v.debugging), h = f.useRef(null), { top: $, bottom: N, left: k, right: C } = D(x), { padding: E } = mt(h, {
|
|
1334
|
+
base: v.base,
|
|
1335
|
+
snapping: o,
|
|
1336
|
+
spacing: { top: $, bottom: N, left: k, right: C },
|
|
1337
|
+
warnOnMisalignment: M !== "none"
|
|
1338
|
+
}), V = f.useMemo(() => {
|
|
1339
|
+
const j = {};
|
|
1340
|
+
return d !== void 0 ? (j.gridColumn = `span ${d}`, j.gridRow = `span ${d}`) : (r !== void 0 && (j.gridColumn = `span ${r}`), i !== void 0 && (j.gridRow = `span ${i}`)), j;
|
|
1341
|
+
}, [r, i, d]), O = f.useMemo(
|
|
1342
|
+
() => ({
|
|
1343
|
+
"--bkxw": "fit-content",
|
|
1344
|
+
"--bkxh": "fit-content",
|
|
1345
|
+
"--bkxb": `${v.base}px`,
|
|
1346
|
+
"--bkxcl": v.colors.line
|
|
1347
|
+
}),
|
|
1348
|
+
[v.base, v.colors.line]
|
|
1349
|
+
), R = f.useCallback(
|
|
1350
|
+
(j, y) => (j === "--bkxw" || j === "--bkxh") && y === "fit-content" ? {} : y !== O[j] ? { [j]: y } : {},
|
|
1351
|
+
[O]
|
|
1352
|
+
), w = f.useMemo(() => {
|
|
1353
|
+
const j = U(g || "fit-content"), y = U(c || "fit-content"), T = {
|
|
1354
|
+
...R("--bkxw", j),
|
|
1355
|
+
...R("--bkxh", y),
|
|
1356
|
+
...R("--bkxb", `${v.base}px`),
|
|
1357
|
+
...R("--bkxcl", v.colors.line)
|
|
1358
|
+
};
|
|
1359
|
+
return I(T, m);
|
|
1360
|
+
}, [
|
|
1361
|
+
v.base,
|
|
1362
|
+
v.colors.line,
|
|
1363
|
+
g,
|
|
1364
|
+
c,
|
|
1365
|
+
R,
|
|
1366
|
+
m
|
|
1367
|
+
]);
|
|
1368
|
+
return /* @__PURE__ */ _.jsx(
|
|
1260
1369
|
"div",
|
|
1261
1370
|
{
|
|
1262
|
-
ref:
|
|
1371
|
+
ref: Zt(b, h),
|
|
1263
1372
|
"data-testid": "box",
|
|
1264
|
-
className:
|
|
1265
|
-
style:
|
|
1266
|
-
children: /* @__PURE__ */
|
|
1267
|
-
|
|
1373
|
+
className: J(It.box, A && It.v, s),
|
|
1374
|
+
style: I(w, V),
|
|
1375
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1376
|
+
St,
|
|
1268
1377
|
{
|
|
1269
1378
|
base: 1,
|
|
1270
|
-
spacer: {
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
flat: "var(--bk-box-color-flat-theme)",
|
|
1274
|
-
line: "var(--bk-box-color-line-theme)",
|
|
1275
|
-
indice: "var(--bk-box-color-indice-theme)"
|
|
1276
|
-
}
|
|
1277
|
-
},
|
|
1278
|
-
children: /* @__PURE__ */ R.jsx(
|
|
1279
|
-
Se,
|
|
1379
|
+
spacer: { variant: "flat" },
|
|
1380
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1381
|
+
Ct,
|
|
1280
1382
|
{
|
|
1281
|
-
block: [
|
|
1282
|
-
inline: [
|
|
1283
|
-
width:
|
|
1284
|
-
height:
|
|
1285
|
-
debugging:
|
|
1383
|
+
block: [E.top, E.bottom],
|
|
1384
|
+
inline: [E.left, E.right],
|
|
1385
|
+
width: "fit-content",
|
|
1386
|
+
height: c,
|
|
1387
|
+
debugging: M,
|
|
1286
1388
|
children: n
|
|
1287
1389
|
}
|
|
1288
1390
|
)
|
|
@@ -1291,302 +1393,356 @@ const tn = E.memo(
|
|
|
1291
1393
|
}
|
|
1292
1394
|
);
|
|
1293
1395
|
})
|
|
1294
|
-
),
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
},
|
|
1298
|
-
align: n = "
|
|
1299
|
-
children:
|
|
1300
|
-
className:
|
|
1301
|
-
columnGap:
|
|
1302
|
-
debugging:
|
|
1303
|
-
direction:
|
|
1304
|
-
gap:
|
|
1305
|
-
height:
|
|
1306
|
-
indicatorNode:
|
|
1307
|
-
justify:
|
|
1396
|
+
), Le = "stk_4t2AU", ze = "v_Uwir6", qt = {
|
|
1397
|
+
stk: Le,
|
|
1398
|
+
v: ze
|
|
1399
|
+
}, on = f.memo(function({
|
|
1400
|
+
align: n = "flex-start",
|
|
1401
|
+
children: o,
|
|
1402
|
+
className: a,
|
|
1403
|
+
columnGap: s,
|
|
1404
|
+
debugging: r,
|
|
1405
|
+
direction: i = "row",
|
|
1406
|
+
gap: d,
|
|
1407
|
+
height: g,
|
|
1408
|
+
indicatorNode: c,
|
|
1409
|
+
justify: m = "flex-start",
|
|
1308
1410
|
rowGap: x,
|
|
1309
1411
|
style: b,
|
|
1310
|
-
variant:
|
|
1311
|
-
width:
|
|
1312
|
-
...
|
|
1412
|
+
variant: v,
|
|
1413
|
+
width: A,
|
|
1414
|
+
...M
|
|
1313
1415
|
}) {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1416
|
+
const h = X("stack"), { isShown: $, debugging: N } = tt(r, h.debugging), k = f.useRef(null), C = f.useMemo(
|
|
1417
|
+
() => D(M),
|
|
1418
|
+
[M]
|
|
1419
|
+
), { padding: E } = mt(k, {
|
|
1420
|
+
base: h.base,
|
|
1316
1421
|
snapping: "height",
|
|
1317
|
-
spacing:
|
|
1422
|
+
spacing: C,
|
|
1318
1423
|
warnOnMisalignment: !0
|
|
1319
|
-
}),
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1424
|
+
}), V = f.useMemo(
|
|
1425
|
+
() => ({
|
|
1426
|
+
rowGap: x,
|
|
1427
|
+
columnGap: s,
|
|
1428
|
+
...d !== void 0 && { gap: d }
|
|
1429
|
+
}),
|
|
1430
|
+
[x, s, d]
|
|
1431
|
+
), O = f.useMemo(
|
|
1432
|
+
() => ({
|
|
1433
|
+
"--bkkw": "auto",
|
|
1434
|
+
"--bkkh": "auto",
|
|
1435
|
+
"--bkkcl": h.colors.line,
|
|
1436
|
+
"--bkkcf": h.colors.flat,
|
|
1437
|
+
"--bkkci": h.colors.text
|
|
1438
|
+
}),
|
|
1439
|
+
[h.colors.line, h.colors.flat, h.colors.text]
|
|
1440
|
+
), R = f.useCallback(
|
|
1441
|
+
(y, T) => y === "--bkkw" && T === "auto" ? {} : y === "--bkkh" && T === "auto" ? {} : T !== O[y] ? { [y]: T } : {},
|
|
1442
|
+
[O]
|
|
1443
|
+
), w = f.useMemo(() => {
|
|
1444
|
+
const y = U(A || "auto"), T = U(g || "auto"), L = {
|
|
1445
|
+
...R("--bkkw", y),
|
|
1446
|
+
...R("--bkkh", T),
|
|
1447
|
+
...R("--bkkcl", h.colors.line),
|
|
1448
|
+
...R("--bkkcf", h.colors.flat),
|
|
1449
|
+
...R("--bkkci", h.colors.text)
|
|
1450
|
+
};
|
|
1451
|
+
return I({
|
|
1452
|
+
flexDirection: i,
|
|
1453
|
+
justifyContent: m,
|
|
1328
1454
|
alignItems: n,
|
|
1329
|
-
width:
|
|
1330
|
-
height:
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1455
|
+
width: A,
|
|
1456
|
+
height: g
|
|
1457
|
+
}, V, L, b);
|
|
1458
|
+
}, [
|
|
1459
|
+
i,
|
|
1460
|
+
m,
|
|
1461
|
+
n,
|
|
1462
|
+
A,
|
|
1463
|
+
g,
|
|
1464
|
+
h.colors.line,
|
|
1465
|
+
h.colors.flat,
|
|
1466
|
+
h.colors.text,
|
|
1467
|
+
R,
|
|
1468
|
+
V,
|
|
1336
1469
|
b
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
paddingBlock: `${
|
|
1340
|
-
paddingInline: `${
|
|
1341
|
-
} :
|
|
1342
|
-
return /* @__PURE__ */
|
|
1343
|
-
|
|
1470
|
+
]), j = N === "none" ? {
|
|
1471
|
+
...w,
|
|
1472
|
+
paddingBlock: `${E.top}px ${E.bottom}px`,
|
|
1473
|
+
paddingInline: `${E.left}px ${E.right}px`
|
|
1474
|
+
} : w;
|
|
1475
|
+
return /* @__PURE__ */ _.jsx(
|
|
1476
|
+
St,
|
|
1344
1477
|
{
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
inline: [w.left, w.right],
|
|
1349
|
-
debugging: C,
|
|
1350
|
-
indicatorNode: l,
|
|
1351
|
-
width: T,
|
|
1352
|
-
height: d,
|
|
1353
|
-
children: /* @__PURE__ */ R.jsx(
|
|
1354
|
-
"div",
|
|
1478
|
+
spacer: { variant: v ?? "line" },
|
|
1479
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1480
|
+
Ct,
|
|
1355
1481
|
{
|
|
1356
|
-
|
|
1357
|
-
className:
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
children:
|
|
1482
|
+
ref: k,
|
|
1483
|
+
className: $ ? qt.v : "",
|
|
1484
|
+
block: [E.top, E.bottom],
|
|
1485
|
+
inline: [E.left, E.right],
|
|
1486
|
+
debugging: N,
|
|
1487
|
+
indicatorNode: c,
|
|
1488
|
+
width: A,
|
|
1489
|
+
height: g,
|
|
1490
|
+
children: /* @__PURE__ */ _.jsx(
|
|
1491
|
+
"div",
|
|
1492
|
+
{
|
|
1493
|
+
"data-testid": "stack",
|
|
1494
|
+
className: J(a, qt.stk),
|
|
1495
|
+
style: j,
|
|
1496
|
+
...M,
|
|
1497
|
+
children: o
|
|
1498
|
+
}
|
|
1499
|
+
)
|
|
1365
1500
|
}
|
|
1366
1501
|
)
|
|
1367
1502
|
}
|
|
1368
|
-
)
|
|
1369
|
-
}),
|
|
1370
|
-
|
|
1371
|
-
line:
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
},
|
|
1503
|
+
);
|
|
1504
|
+
}), Ue = "gde_eT-MH", Ye = "line_xcGxq", Pe = "cols_LoPVp", Fe = "col_ZgTMC", nt = {
|
|
1505
|
+
gde: Ue,
|
|
1506
|
+
line: Ye,
|
|
1507
|
+
cols: Pe,
|
|
1508
|
+
col: Fe
|
|
1509
|
+
}, rn = f.memo(function({
|
|
1375
1510
|
className: n,
|
|
1376
|
-
debugging:
|
|
1377
|
-
style:
|
|
1378
|
-
variant:
|
|
1379
|
-
align:
|
|
1380
|
-
gap:
|
|
1381
|
-
height:
|
|
1382
|
-
width:
|
|
1383
|
-
columns:
|
|
1384
|
-
columnWidth:
|
|
1511
|
+
debugging: o,
|
|
1512
|
+
style: a,
|
|
1513
|
+
variant: s,
|
|
1514
|
+
align: r = "start",
|
|
1515
|
+
gap: i,
|
|
1516
|
+
height: d,
|
|
1517
|
+
width: g,
|
|
1518
|
+
columns: c,
|
|
1519
|
+
columnWidth: m,
|
|
1385
1520
|
...x
|
|
1386
1521
|
}) {
|
|
1387
|
-
const b =
|
|
1388
|
-
const
|
|
1522
|
+
const b = X("guide"), v = s ?? b.variant, { isShown: A } = tt(o, b.debugging), M = f.useRef(null), { width: h, height: $ } = bt(M), { top: N, right: k, bottom: C, left: E } = f.useMemo(() => D(x), [x]), V = f.useMemo(() => {
|
|
1523
|
+
const W = dt(i);
|
|
1389
1524
|
return {
|
|
1390
1525
|
line: {
|
|
1391
1526
|
variant: "line",
|
|
1392
|
-
gap:
|
|
1527
|
+
gap: W - 1,
|
|
1393
1528
|
base: b.base
|
|
1394
1529
|
},
|
|
1395
|
-
auto:
|
|
1530
|
+
auto: m ? {
|
|
1396
1531
|
variant: "auto",
|
|
1397
|
-
columnWidth:
|
|
1398
|
-
gap:
|
|
1532
|
+
columnWidth: m,
|
|
1533
|
+
gap: W,
|
|
1399
1534
|
base: b.base
|
|
1400
1535
|
} : null,
|
|
1401
|
-
pattern: Array.isArray(
|
|
1536
|
+
pattern: Array.isArray(c) ? {
|
|
1402
1537
|
variant: "pattern",
|
|
1403
|
-
columns:
|
|
1404
|
-
gap:
|
|
1538
|
+
columns: c,
|
|
1539
|
+
gap: W,
|
|
1405
1540
|
base: b.base
|
|
1406
1541
|
} : null,
|
|
1407
|
-
fixed: typeof
|
|
1542
|
+
fixed: typeof c == "number" ? {
|
|
1408
1543
|
variant: "fixed",
|
|
1409
|
-
columns:
|
|
1410
|
-
columnWidth:
|
|
1411
|
-
gap:
|
|
1544
|
+
columns: c,
|
|
1545
|
+
columnWidth: m,
|
|
1546
|
+
gap: W,
|
|
1412
1547
|
base: b.base
|
|
1413
1548
|
} : null
|
|
1414
|
-
}[
|
|
1549
|
+
}[v] ?? {
|
|
1415
1550
|
variant: "line",
|
|
1416
|
-
gap:
|
|
1551
|
+
gap: W - 1,
|
|
1417
1552
|
base: b.base
|
|
1418
1553
|
};
|
|
1419
|
-
}, [
|
|
1420
|
-
template:
|
|
1421
|
-
columnsCount:
|
|
1422
|
-
calculatedGap:
|
|
1423
|
-
} =
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
return /* @__PURE__ */ R.jsx(
|
|
1554
|
+
}, [i, b.base, m, c, v]), {
|
|
1555
|
+
template: O,
|
|
1556
|
+
columnsCount: R,
|
|
1557
|
+
calculatedGap: w
|
|
1558
|
+
} = xe(M, V), j = f.useMemo(() => ({
|
|
1559
|
+
"--bkgg": `${w}px`,
|
|
1560
|
+
"--bkgj": "start",
|
|
1561
|
+
"--bkgcl": b.colors.line,
|
|
1562
|
+
"--bkgcp": b.colors.pattern,
|
|
1563
|
+
"--bkgw": "100vw",
|
|
1564
|
+
"--bkgh": "100vh"
|
|
1565
|
+
}), [w, b.colors.line, b.colors.pattern]), y = f.useCallback(
|
|
1566
|
+
(W, P) => W === "--bkgw" && P === "100vw" || W === "--bkgh" && P === "100vh" ? {} : P !== j[W] ? { [W]: P } : {},
|
|
1567
|
+
[j]
|
|
1568
|
+
), T = {
|
|
1569
|
+
"--bkgg": `${w}px`,
|
|
1570
|
+
"--bkgj": r,
|
|
1571
|
+
"--bkgcl": b.colors.line,
|
|
1572
|
+
"--bkgcp": b.colors.pattern,
|
|
1573
|
+
"--bkgpb": `${N}px ${C}px`,
|
|
1574
|
+
"--bkgpi": `${E}px ${k}px`,
|
|
1575
|
+
"--bkgt": O,
|
|
1576
|
+
"--bkgw": U(g ?? h, 0) || "100vw",
|
|
1577
|
+
"--bkgh": U(d ?? $, 0) || "100vh"
|
|
1578
|
+
}, L = {
|
|
1579
|
+
...y("--bkgw", T["--bkgw"]),
|
|
1580
|
+
...y("--bkgh", T["--bkgh"]),
|
|
1581
|
+
...y("--bkgj", r),
|
|
1582
|
+
...y("--bkgcl", b.colors.line),
|
|
1583
|
+
...y("--bkgcp", b.colors.pattern),
|
|
1584
|
+
...y("--bkgg", `${w}px`)
|
|
1585
|
+
}, B = I(T, L, a);
|
|
1586
|
+
return /* @__PURE__ */ _.jsx(
|
|
1453
1587
|
"div",
|
|
1454
1588
|
{
|
|
1455
|
-
ref:
|
|
1456
|
-
|
|
1457
|
-
|
|
1589
|
+
ref: M,
|
|
1590
|
+
"data-testid": "guide",
|
|
1591
|
+
className: J(
|
|
1592
|
+
nt.gde,
|
|
1458
1593
|
n,
|
|
1459
|
-
|
|
1460
|
-
|
|
1594
|
+
A ? nt.v : nt.h,
|
|
1595
|
+
v === "line" && nt.line
|
|
1461
1596
|
),
|
|
1462
|
-
"data-
|
|
1463
|
-
|
|
1464
|
-
style: z,
|
|
1597
|
+
"data-variant": v,
|
|
1598
|
+
style: B,
|
|
1465
1599
|
...x,
|
|
1466
|
-
children:
|
|
1467
|
-
const
|
|
1468
|
-
return /* @__PURE__ */
|
|
1600
|
+
children: A && /* @__PURE__ */ _.jsx("div", { className: nt.cols, "data-variant": v, children: Array.from({ length: R }, (W, P) => {
|
|
1601
|
+
const ct = b.colors[v] ?? b.colors.line;
|
|
1602
|
+
return /* @__PURE__ */ _.jsx(
|
|
1469
1603
|
"div",
|
|
1470
1604
|
{
|
|
1471
|
-
className:
|
|
1472
|
-
"data-column-index":
|
|
1473
|
-
"data-variant":
|
|
1474
|
-
style: { backgroundColor:
|
|
1605
|
+
className: nt.col,
|
|
1606
|
+
"data-column-index": P,
|
|
1607
|
+
"data-variant": v,
|
|
1608
|
+
style: { backgroundColor: ct }
|
|
1475
1609
|
},
|
|
1476
|
-
|
|
1610
|
+
P
|
|
1477
1611
|
);
|
|
1478
1612
|
}) })
|
|
1479
1613
|
}
|
|
1480
1614
|
);
|
|
1481
|
-
}),
|
|
1482
|
-
const n = [...Object.keys(
|
|
1483
|
-
return typeof
|
|
1484
|
-
}, an = (
|
|
1485
|
-
|
|
1486
|
-
|
|
1615
|
+
}), He = /^\d*\.?\d+(?:fr|px|%|em|rem|vh|vw|vmin|vmax|pt|pc|in|cm|mm)$/, Ie = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 : typeof e != "string" ? !1 : e === "auto" || e === "100%" || He.test(e), qe = (e) => Array.isArray(e) && e.length > 0 && e.every(Ie), sn = (e) => {
|
|
1616
|
+
const n = [...Object.keys(wt), ...Xt];
|
|
1617
|
+
return typeof e == "number" || typeof e == "string" && n.some((o) => e.endsWith(o));
|
|
1618
|
+
}, an = (e) => typeof e == "string" && De.includes(e), Rt = (e) => typeof e == "object" && e !== null, cn = (e) => Rt(e) && e.variant === "line", ln = (e) => Rt(e) && "columns" in e && !("variant" in e), un = (e) => Rt(e) && "columnWidth" in e && !("variant" in e) && !("columns" in e), Je = "bas_qAJSK", Xe = "row_y6My5", ft = {
|
|
1619
|
+
bas: Je,
|
|
1620
|
+
row: Xe
|
|
1621
|
+
}, fn = f.memo(function({
|
|
1487
1622
|
className: n,
|
|
1488
|
-
debugging:
|
|
1489
|
-
style:
|
|
1490
|
-
variant:
|
|
1491
|
-
height:
|
|
1492
|
-
width:
|
|
1493
|
-
base:
|
|
1494
|
-
...
|
|
1623
|
+
debugging: o,
|
|
1624
|
+
style: a,
|
|
1625
|
+
variant: s,
|
|
1626
|
+
height: r,
|
|
1627
|
+
width: i,
|
|
1628
|
+
base: d,
|
|
1629
|
+
...g
|
|
1495
1630
|
}) {
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
[
|
|
1499
|
-
), { top:
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1631
|
+
const c = X("baseline"), m = s ?? c.variant, x = d ?? c.base, { isShown: b } = tt(o, c.debugging), v = f.useRef(null), { width: A, height: M } = bt(v), [h, $] = f.useMemo(() => Dt(
|
|
1632
|
+
[i, r],
|
|
1633
|
+
[A, M]
|
|
1634
|
+
), [i, r, A, M]), { top: N, right: k, bottom: C, left: E } = f.useMemo(
|
|
1635
|
+
() => D(g),
|
|
1636
|
+
[g]
|
|
1637
|
+
), V = f.useMemo(() => {
|
|
1638
|
+
const T = ($ ?? 0) - (N + C);
|
|
1639
|
+
return Math.max(1, Math.floor(T / x));
|
|
1640
|
+
}, [$, N, C, x]), { start: O, end: R } = pe({
|
|
1641
|
+
totalLines: V,
|
|
1504
1642
|
lineHeight: x,
|
|
1505
|
-
containerRef:
|
|
1643
|
+
containerRef: v,
|
|
1506
1644
|
buffer: 160
|
|
1507
|
-
}),
|
|
1508
|
-
() =>
|
|
1645
|
+
}), w = m === "line" ? c.colors.line : c.colors.flat, j = f.useMemo(() => {
|
|
1646
|
+
const T = [N, k, C, E].map((L) => L ? `${L}px` : "0").join(" ");
|
|
1647
|
+
return I(
|
|
1509
1648
|
{
|
|
1510
|
-
"--
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
inset: 0,
|
|
1514
|
-
pointerEvents: "none",
|
|
1515
|
-
overflow: "hidden",
|
|
1516
|
-
height: `${S}px`
|
|
1649
|
+
"--bkbw": i ? `${h}px` : "100%",
|
|
1650
|
+
"--bkbh": r ? `${$}px` : "100%",
|
|
1651
|
+
...T !== "0 0 0 0" && { padding: T }
|
|
1517
1652
|
},
|
|
1518
|
-
|
|
1519
|
-
)
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1653
|
+
a
|
|
1654
|
+
);
|
|
1655
|
+
}, [
|
|
1656
|
+
N,
|
|
1657
|
+
k,
|
|
1658
|
+
C,
|
|
1659
|
+
E,
|
|
1660
|
+
i,
|
|
1661
|
+
h,
|
|
1662
|
+
r,
|
|
1663
|
+
$,
|
|
1664
|
+
a
|
|
1665
|
+
]), y = f.useCallback(
|
|
1666
|
+
(T) => {
|
|
1667
|
+
const L = m === "line" ? "1px" : `${x}px`, B = m === "line" ? c.colors.line : c.colors.flat;
|
|
1668
|
+
return I({
|
|
1669
|
+
"--bkrt": `${T * x}px`,
|
|
1670
|
+
...L !== "1px" && { "--bkrh": L },
|
|
1671
|
+
...w !== B && { "--bkbcl": w }
|
|
1672
|
+
});
|
|
1673
|
+
},
|
|
1674
|
+
[x, m, w, c.colors.line, c.colors.flat]
|
|
1531
1675
|
);
|
|
1532
|
-
return /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ _.jsx(
|
|
1533
1677
|
"div",
|
|
1534
1678
|
{
|
|
1535
|
-
ref:
|
|
1679
|
+
ref: v,
|
|
1536
1680
|
"data-testid": "baseline",
|
|
1537
|
-
className:
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1681
|
+
className: J(
|
|
1682
|
+
ft.bas,
|
|
1683
|
+
b ? ft.v : ft.h,
|
|
1684
|
+
n
|
|
1685
|
+
),
|
|
1686
|
+
style: j,
|
|
1687
|
+
...g,
|
|
1688
|
+
children: b && Array.from({ length: R - O }, (T, L) => {
|
|
1689
|
+
const B = L + O;
|
|
1690
|
+
return /* @__PURE__ */ _.jsx(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
className: ft.row,
|
|
1694
|
+
"data-row-index": B,
|
|
1695
|
+
style: y(B)
|
|
1696
|
+
},
|
|
1697
|
+
B
|
|
1698
|
+
);
|
|
1543
1699
|
})
|
|
1544
1700
|
}
|
|
1545
1701
|
);
|
|
1546
|
-
}),
|
|
1702
|
+
}), De = ["start", "center", "end"], dn = ["line", "flat"];
|
|
1547
1703
|
export {
|
|
1548
|
-
|
|
1704
|
+
wt as ABSOLUTE_UNIT_CONVERSIONS,
|
|
1549
1705
|
fn as Baseline,
|
|
1550
1706
|
nn as Box,
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1707
|
+
St as Config,
|
|
1708
|
+
_e as DEFAULT_CONFIG,
|
|
1709
|
+
De as GRID_ALIGNMENTS,
|
|
1710
|
+
rn as Guide,
|
|
1711
|
+
en as Layout,
|
|
1556
1712
|
dn as PADD_VARIANTS,
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1713
|
+
Ct as Padder,
|
|
1714
|
+
Xt as RELATIVE_UNITS,
|
|
1715
|
+
$e as Spacer,
|
|
1716
|
+
on as Stack,
|
|
1717
|
+
ge as calculateSnappedSpacing,
|
|
1718
|
+
fe as clamp,
|
|
1719
|
+
yt as convertValue,
|
|
1720
|
+
je as createCSSVariables,
|
|
1721
|
+
tn as debounce,
|
|
1722
|
+
U as formatValue,
|
|
1567
1723
|
un as isAutoCalculatedGuide,
|
|
1568
1724
|
an as isGuideAlignment,
|
|
1569
|
-
|
|
1570
|
-
|
|
1725
|
+
ln as isGuideColumnConfig,
|
|
1726
|
+
cn as isGuideLineConfig,
|
|
1571
1727
|
sn as isGuideValue,
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1728
|
+
Ie as isValidGuideColumnValue,
|
|
1729
|
+
qe as isValidGuidePattern,
|
|
1730
|
+
J as mergeClasses,
|
|
1731
|
+
Zt as mergeRefs,
|
|
1732
|
+
I as mergeStyles,
|
|
1733
|
+
Ke as moduloize,
|
|
1734
|
+
dt as normalizeValue,
|
|
1735
|
+
Dt as normalizeValuePair,
|
|
1736
|
+
D as parsePadding,
|
|
1737
|
+
le as parseUnit,
|
|
1738
|
+
Kt as rafThrottle,
|
|
1739
|
+
Qe as round,
|
|
1740
|
+
mt as useBaseline,
|
|
1741
|
+
X as useConfig,
|
|
1742
|
+
tt as useDebug,
|
|
1743
|
+
Qt as useDefaultConfig,
|
|
1744
|
+
xe as useGuide,
|
|
1745
|
+
bt as useMeasure,
|
|
1746
|
+
pe as useVirtual
|
|
1591
1747
|
};
|
|
1592
1748
|
//# sourceMappingURL=index.mjs.map
|