@nswds/app 1.126.1 → 1.126.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/globals.css +3799 -7709
- package/dist/index.cjs +325 -299
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4512 -4513
- package/dist/index.d.ts +4512 -4513
- package/dist/index.js +325 -299
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3859 -7737
- package/dist/styles.css.map +1 -1
- package/package.json +21 -14
package/dist/index.js
CHANGED
|
@@ -4809,12 +4809,9 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
|
|
|
4809
4809
|
}
|
|
4810
4810
|
return () => clearInterval(intervalRef.current);
|
|
4811
4811
|
}, [isPressed, onClick]);
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
setIsPressed(false);
|
|
4816
|
-
}
|
|
4817
|
-
}, [disabled]);
|
|
4812
|
+
if (disabled && isPressed) {
|
|
4813
|
+
setIsPressed(false);
|
|
4814
|
+
}
|
|
4818
4815
|
return /* @__PURE__ */ jsx(
|
|
4819
4816
|
"button",
|
|
4820
4817
|
{
|
|
@@ -6082,12 +6079,9 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
|
|
|
6082
6079
|
}
|
|
6083
6080
|
return () => clearInterval(intervalRef.current);
|
|
6084
6081
|
}, [isPressed, onClick]);
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
setIsPressed(false);
|
|
6089
|
-
}
|
|
6090
|
-
}, [disabled]);
|
|
6082
|
+
if (disabled && isPressed) {
|
|
6083
|
+
setIsPressed(false);
|
|
6084
|
+
}
|
|
6091
6085
|
return /* @__PURE__ */ jsx(
|
|
6092
6086
|
"button",
|
|
6093
6087
|
{
|
|
@@ -11685,12 +11679,9 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
|
|
|
11685
11679
|
}
|
|
11686
11680
|
return () => clearInterval(intervalRef.current);
|
|
11687
11681
|
}, [isPressed, onClick]);
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
setIsPressed(false);
|
|
11692
|
-
}
|
|
11693
|
-
}, [disabled]);
|
|
11682
|
+
if (disabled && isPressed) {
|
|
11683
|
+
setIsPressed(false);
|
|
11684
|
+
}
|
|
11694
11685
|
return /* @__PURE__ */ jsx(
|
|
11695
11686
|
"button",
|
|
11696
11687
|
{
|
|
@@ -12184,7 +12175,7 @@ var ComboChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
|
12184
12175
|
/* @__PURE__ */ jsx(
|
|
12185
12176
|
YAxis,
|
|
12186
12177
|
{
|
|
12187
|
-
yAxisId: enableBiaxial ? "left" :
|
|
12178
|
+
yAxisId: enableBiaxial ? "left" : 0,
|
|
12188
12179
|
width: mergedBarSeries.yAxisWidth,
|
|
12189
12180
|
hide: !mergedBarSeries.showYAxis,
|
|
12190
12181
|
axisLine: false,
|
|
@@ -12316,7 +12307,7 @@ var ComboChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
|
12316
12307
|
mergedBarSeries.categories.map((category) => /* @__PURE__ */ jsx(
|
|
12317
12308
|
Bar,
|
|
12318
12309
|
{
|
|
12319
|
-
yAxisId: enableBiaxial ? "left" :
|
|
12310
|
+
yAxisId: enableBiaxial ? "left" : 0,
|
|
12320
12311
|
className: cn(
|
|
12321
12312
|
getColorClassName(
|
|
12322
12313
|
barCategoryColors.get(category),
|
|
@@ -12338,7 +12329,7 @@ var ComboChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
|
12338
12329
|
onValueChange ? mergedLineSeries.categories.map((category) => /* @__PURE__ */ jsx(
|
|
12339
12330
|
Line,
|
|
12340
12331
|
{
|
|
12341
|
-
yAxisId: enableBiaxial ? "right" :
|
|
12332
|
+
yAxisId: enableBiaxial ? "right" : 0,
|
|
12342
12333
|
className: cn("cursor-pointer"),
|
|
12343
12334
|
strokeOpacity: 0,
|
|
12344
12335
|
name: category,
|
|
@@ -12361,7 +12352,7 @@ var ComboChart = React5__default.forwardRef((props, forwardedRef) => {
|
|
|
12361
12352
|
mergedLineSeries.categories.map((category) => /* @__PURE__ */ jsx(
|
|
12362
12353
|
Line,
|
|
12363
12354
|
{
|
|
12364
|
-
yAxisId: enableBiaxial ? "right" :
|
|
12355
|
+
yAxisId: enableBiaxial ? "right" : 0,
|
|
12365
12356
|
className: cn(
|
|
12366
12357
|
getColorClassName(
|
|
12367
12358
|
lineCategoryColors.get(category),
|
|
@@ -14439,7 +14430,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
14439
14430
|
|
|
14440
14431
|
// package.json
|
|
14441
14432
|
var package_default = {
|
|
14442
|
-
version: "1.126.
|
|
14433
|
+
version: "1.126.2"};
|
|
14443
14434
|
var SluggerContext = React5__default.createContext(null);
|
|
14444
14435
|
function flattenText(nodes) {
|
|
14445
14436
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -15094,12 +15085,9 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
15094
15085
|
}
|
|
15095
15086
|
return () => clearInterval(intervalRef.current);
|
|
15096
15087
|
}, [isPressed, onClick]);
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
setIsPressed(false);
|
|
15101
|
-
}
|
|
15102
|
-
}, [disabled]);
|
|
15088
|
+
if (disabled && isPressed) {
|
|
15089
|
+
setIsPressed(false);
|
|
15090
|
+
}
|
|
15103
15091
|
return /* @__PURE__ */ jsx(
|
|
15104
15092
|
"button",
|
|
15105
15093
|
{
|
|
@@ -16811,9 +16799,7 @@ var MotionGlobalConfig = {};
|
|
|
16811
16799
|
var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
|
|
16812
16800
|
|
|
16813
16801
|
// node_modules/motion-utils/dist/es/is-object.mjs
|
|
16814
|
-
|
|
16815
|
-
return typeof value === "object" && value !== null;
|
|
16816
|
-
}
|
|
16802
|
+
var isObject = (value) => typeof value === "object" && value !== null;
|
|
16817
16803
|
|
|
16818
16804
|
// node_modules/motion-utils/dist/es/is-zero-value-string.mjs
|
|
16819
16805
|
var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
|
|
@@ -16833,13 +16819,12 @@ function memo(callback) {
|
|
|
16833
16819
|
var noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
|
|
16834
16820
|
|
|
16835
16821
|
// node_modules/motion-utils/dist/es/pipe.mjs
|
|
16836
|
-
var
|
|
16837
|
-
var pipe = (...transformers) => transformers.reduce(combineFunctions);
|
|
16822
|
+
var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
|
|
16838
16823
|
|
|
16839
16824
|
// node_modules/motion-utils/dist/es/progress.mjs
|
|
16840
16825
|
var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
16841
|
-
const
|
|
16842
|
-
return
|
|
16826
|
+
const range = to - from;
|
|
16827
|
+
return range ? (value - from) / range : 1;
|
|
16843
16828
|
};
|
|
16844
16829
|
|
|
16845
16830
|
// node_modules/motion-utils/dist/es/subscription-manager.mjs
|
|
@@ -16877,9 +16862,7 @@ var secondsToMilliseconds = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e
|
|
|
16877
16862
|
var millisecondsToSeconds = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
|
|
16878
16863
|
|
|
16879
16864
|
// node_modules/motion-utils/dist/es/velocity-per-second.mjs
|
|
16880
|
-
|
|
16881
|
-
return frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
16882
|
-
}
|
|
16865
|
+
var velocityPerSecond = /* @__NO_SIDE_EFFECTS__ */ (velocity, frameDuration) => frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
16883
16866
|
|
|
16884
16867
|
// node_modules/motion-utils/dist/es/warn-once.mjs
|
|
16885
16868
|
var warned = /* @__PURE__ */ new Set();
|
|
@@ -16909,6 +16892,7 @@ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
|
16909
16892
|
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
|
|
16910
16893
|
return currentT;
|
|
16911
16894
|
}
|
|
16895
|
+
// @__NO_SIDE_EFFECTS__
|
|
16912
16896
|
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
16913
16897
|
if (mX1 === mY1 && mX2 === mY2)
|
|
16914
16898
|
return noop;
|
|
@@ -16917,10 +16901,10 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
|
16917
16901
|
}
|
|
16918
16902
|
|
|
16919
16903
|
// node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
|
|
16920
|
-
var mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
16904
|
+
var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
16921
16905
|
|
|
16922
16906
|
// node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs
|
|
16923
|
-
var reverseEasing = (easing) => (p) => 1 - easing(1 - p);
|
|
16907
|
+
var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
|
|
16924
16908
|
|
|
16925
16909
|
// node_modules/motion-utils/dist/es/easing/back.mjs
|
|
16926
16910
|
var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
|
@@ -16941,12 +16925,12 @@ var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
|
|
|
16941
16925
|
var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
|
|
16942
16926
|
|
|
16943
16927
|
// node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs
|
|
16944
|
-
var isEasingArray = (ease2) => {
|
|
16928
|
+
var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
|
|
16945
16929
|
return Array.isArray(ease2) && typeof ease2[0] !== "number";
|
|
16946
16930
|
};
|
|
16947
16931
|
|
|
16948
16932
|
// node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
|
|
16949
|
-
var isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
16933
|
+
var isBezierDefinition = /* @__NO_SIDE_EFFECTS__ */ (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
16950
16934
|
|
|
16951
16935
|
// node_modules/motion-utils/dist/es/easing/utils/map.mjs
|
|
16952
16936
|
var easingLookup = {
|
|
@@ -16998,7 +16982,7 @@ var stepsOrder = [
|
|
|
16998
16982
|
];
|
|
16999
16983
|
|
|
17000
16984
|
// node_modules/motion-dom/dist/es/frameloop/render-step.mjs
|
|
17001
|
-
function createRenderStep(runNextFrame
|
|
16985
|
+
function createRenderStep(runNextFrame) {
|
|
17002
16986
|
let thisFrame = /* @__PURE__ */ new Set();
|
|
17003
16987
|
let nextFrame = /* @__PURE__ */ new Set();
|
|
17004
16988
|
let isProcessing = false;
|
|
@@ -18450,7 +18434,7 @@ var transformPropOrder = [
|
|
|
18450
18434
|
"skewX",
|
|
18451
18435
|
"skewY"
|
|
18452
18436
|
];
|
|
18453
|
-
var transformProps = /* @__PURE__ */ (() => new Set(transformPropOrder))();
|
|
18437
|
+
var transformProps = /* @__PURE__ */ (() => /* @__PURE__ */ new Set([...transformPropOrder, "pathRotation"]))();
|
|
18454
18438
|
|
|
18455
18439
|
// node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs
|
|
18456
18440
|
var isNumOrPxType = (v) => v === number || v === px;
|
|
@@ -18695,8 +18679,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
18695
18679
|
};
|
|
18696
18680
|
if (pseudoElement)
|
|
18697
18681
|
options.pseudoElement = pseudoElement;
|
|
18698
|
-
|
|
18699
|
-
return animation;
|
|
18682
|
+
return element.animate(keyframeOptions, options);
|
|
18700
18683
|
}
|
|
18701
18684
|
|
|
18702
18685
|
// node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
|
|
@@ -19174,201 +19157,6 @@ function calcChildStagger(children, child, delayChildren, staggerChildren = 0, s
|
|
|
19174
19157
|
return delayIsFunction ? delayChildren(index, numChildren) : staggerDirection === 1 ? index * staggerChildren : maxStaggerDuration - index * staggerChildren;
|
|
19175
19158
|
}
|
|
19176
19159
|
|
|
19177
|
-
// node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
|
|
19178
|
-
var splitCSSVariableRegex = (
|
|
19179
|
-
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
19180
|
-
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
19181
|
-
);
|
|
19182
|
-
function parseCSSVariable(current) {
|
|
19183
|
-
const match = splitCSSVariableRegex.exec(current);
|
|
19184
|
-
if (!match)
|
|
19185
|
-
return [,];
|
|
19186
|
-
const [, token1, token2, fallback] = match;
|
|
19187
|
-
return [`--${token1 ?? token2}`, fallback];
|
|
19188
|
-
}
|
|
19189
|
-
var maxDepth = 4;
|
|
19190
|
-
function getVariableValue(current, element, depth = 1) {
|
|
19191
|
-
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
19192
|
-
const [token, fallback] = parseCSSVariable(current);
|
|
19193
|
-
if (!token)
|
|
19194
|
-
return;
|
|
19195
|
-
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
19196
|
-
if (resolved) {
|
|
19197
|
-
const trimmed = resolved.trim();
|
|
19198
|
-
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
19199
|
-
}
|
|
19200
|
-
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
19201
|
-
}
|
|
19202
|
-
|
|
19203
|
-
// node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
|
|
19204
|
-
var underDampedSpring = {
|
|
19205
|
-
type: "spring",
|
|
19206
|
-
stiffness: 500,
|
|
19207
|
-
damping: 25,
|
|
19208
|
-
restSpeed: 10
|
|
19209
|
-
};
|
|
19210
|
-
var criticallyDampedSpring = (target) => ({
|
|
19211
|
-
type: "spring",
|
|
19212
|
-
stiffness: 550,
|
|
19213
|
-
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
19214
|
-
restSpeed: 10
|
|
19215
|
-
});
|
|
19216
|
-
var keyframesTransition = {
|
|
19217
|
-
type: "keyframes",
|
|
19218
|
-
duration: 0.8
|
|
19219
|
-
};
|
|
19220
|
-
var ease = {
|
|
19221
|
-
type: "keyframes",
|
|
19222
|
-
ease: [0.25, 0.1, 0.35, 1],
|
|
19223
|
-
duration: 0.3
|
|
19224
|
-
};
|
|
19225
|
-
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
19226
|
-
if (keyframes2.length > 2) {
|
|
19227
|
-
return keyframesTransition;
|
|
19228
|
-
} else if (transformProps.has(valueKey)) {
|
|
19229
|
-
return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
19230
|
-
}
|
|
19231
|
-
return ease;
|
|
19232
|
-
};
|
|
19233
|
-
|
|
19234
|
-
// node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
|
|
19235
|
-
function resolveTransition(transition, parentTransition) {
|
|
19236
|
-
if (transition?.inherit && parentTransition) {
|
|
19237
|
-
const { inherit: _, ...rest } = transition;
|
|
19238
|
-
return { ...parentTransition, ...rest };
|
|
19239
|
-
}
|
|
19240
|
-
return transition;
|
|
19241
|
-
}
|
|
19242
|
-
|
|
19243
|
-
// node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
|
|
19244
|
-
function getValueTransition(transition, key) {
|
|
19245
|
-
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
19246
|
-
if (valueTransition !== transition) {
|
|
19247
|
-
return resolveTransition(valueTransition, transition);
|
|
19248
|
-
}
|
|
19249
|
-
return valueTransition;
|
|
19250
|
-
}
|
|
19251
|
-
|
|
19252
|
-
// node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
|
|
19253
|
-
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
19254
|
-
"when",
|
|
19255
|
-
"delay",
|
|
19256
|
-
"delayChildren",
|
|
19257
|
-
"staggerChildren",
|
|
19258
|
-
"staggerDirection",
|
|
19259
|
-
"repeat",
|
|
19260
|
-
"repeatType",
|
|
19261
|
-
"repeatDelay",
|
|
19262
|
-
"from",
|
|
19263
|
-
"elapsed"
|
|
19264
|
-
]);
|
|
19265
|
-
function isTransitionDefined(transition) {
|
|
19266
|
-
for (const key in transition) {
|
|
19267
|
-
if (!orchestrationKeys.has(key))
|
|
19268
|
-
return true;
|
|
19269
|
-
}
|
|
19270
|
-
return false;
|
|
19271
|
-
}
|
|
19272
|
-
|
|
19273
|
-
// node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
|
|
19274
|
-
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
19275
|
-
const valueTransition = getValueTransition(transition, name) || {};
|
|
19276
|
-
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
19277
|
-
let { elapsed = 0 } = transition;
|
|
19278
|
-
elapsed = elapsed - secondsToMilliseconds(delay2);
|
|
19279
|
-
const options = {
|
|
19280
|
-
keyframes: Array.isArray(target) ? target : [null, target],
|
|
19281
|
-
ease: "easeOut",
|
|
19282
|
-
velocity: value.getVelocity(),
|
|
19283
|
-
...valueTransition,
|
|
19284
|
-
delay: -elapsed,
|
|
19285
|
-
onUpdate: (v) => {
|
|
19286
|
-
value.set(v);
|
|
19287
|
-
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
19288
|
-
},
|
|
19289
|
-
onComplete: () => {
|
|
19290
|
-
onComplete();
|
|
19291
|
-
valueTransition.onComplete && valueTransition.onComplete();
|
|
19292
|
-
},
|
|
19293
|
-
name,
|
|
19294
|
-
motionValue: value,
|
|
19295
|
-
element: isHandoff ? void 0 : element
|
|
19296
|
-
};
|
|
19297
|
-
if (!isTransitionDefined(valueTransition)) {
|
|
19298
|
-
Object.assign(options, getDefaultTransition(name, options));
|
|
19299
|
-
}
|
|
19300
|
-
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
19301
|
-
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
19302
|
-
if (options.from !== void 0) {
|
|
19303
|
-
options.keyframes[0] = options.from;
|
|
19304
|
-
}
|
|
19305
|
-
let shouldSkip = false;
|
|
19306
|
-
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
19307
|
-
makeAnimationInstant(options);
|
|
19308
|
-
if (options.delay === 0) {
|
|
19309
|
-
shouldSkip = true;
|
|
19310
|
-
}
|
|
19311
|
-
}
|
|
19312
|
-
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations) {
|
|
19313
|
-
shouldSkip = true;
|
|
19314
|
-
makeAnimationInstant(options);
|
|
19315
|
-
options.delay = 0;
|
|
19316
|
-
}
|
|
19317
|
-
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
19318
|
-
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
19319
|
-
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
19320
|
-
if (finalKeyframe !== void 0) {
|
|
19321
|
-
frame.update(() => {
|
|
19322
|
-
options.onUpdate(finalKeyframe);
|
|
19323
|
-
options.onComplete();
|
|
19324
|
-
});
|
|
19325
|
-
return;
|
|
19326
|
-
}
|
|
19327
|
-
}
|
|
19328
|
-
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
19329
|
-
};
|
|
19330
|
-
|
|
19331
|
-
// node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
|
|
19332
|
-
function getValueState(visualElement) {
|
|
19333
|
-
const state = [{}, {}];
|
|
19334
|
-
visualElement?.values.forEach((value, key) => {
|
|
19335
|
-
state[0][key] = value.get();
|
|
19336
|
-
state[1][key] = value.getVelocity();
|
|
19337
|
-
});
|
|
19338
|
-
return state;
|
|
19339
|
-
}
|
|
19340
|
-
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
|
19341
|
-
if (typeof definition === "function") {
|
|
19342
|
-
const [current, velocity] = getValueState(visualElement);
|
|
19343
|
-
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19344
|
-
}
|
|
19345
|
-
if (typeof definition === "string") {
|
|
19346
|
-
definition = props.variants && props.variants[definition];
|
|
19347
|
-
}
|
|
19348
|
-
if (typeof definition === "function") {
|
|
19349
|
-
const [current, velocity] = getValueState(visualElement);
|
|
19350
|
-
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19351
|
-
}
|
|
19352
|
-
return definition;
|
|
19353
|
-
}
|
|
19354
|
-
|
|
19355
|
-
// node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
|
|
19356
|
-
function resolveVariant(visualElement, definition, custom) {
|
|
19357
|
-
const props = visualElement.getProps();
|
|
19358
|
-
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
19359
|
-
}
|
|
19360
|
-
|
|
19361
|
-
// node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
|
|
19362
|
-
var positionalKeys = /* @__PURE__ */ new Set([
|
|
19363
|
-
"width",
|
|
19364
|
-
"height",
|
|
19365
|
-
"top",
|
|
19366
|
-
"left",
|
|
19367
|
-
"right",
|
|
19368
|
-
"bottom",
|
|
19369
|
-
...transformPropOrder
|
|
19370
|
-
]);
|
|
19371
|
-
|
|
19372
19160
|
// node_modules/motion-dom/dist/es/value/index.mjs
|
|
19373
19161
|
var MAX_VELOCITY_DELTA = 30;
|
|
19374
19162
|
var isFloat = (value) => {
|
|
@@ -19648,6 +19436,201 @@ function motionValue(init, options) {
|
|
|
19648
19436
|
return new MotionValue(init, options);
|
|
19649
19437
|
}
|
|
19650
19438
|
|
|
19439
|
+
// node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
|
|
19440
|
+
function resolveTransition(transition, parentTransition) {
|
|
19441
|
+
if (transition?.inherit && parentTransition) {
|
|
19442
|
+
const { inherit: _, ...rest } = transition;
|
|
19443
|
+
return { ...parentTransition, ...rest };
|
|
19444
|
+
}
|
|
19445
|
+
return transition;
|
|
19446
|
+
}
|
|
19447
|
+
|
|
19448
|
+
// node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
|
|
19449
|
+
function getValueTransition(transition, key) {
|
|
19450
|
+
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
19451
|
+
if (valueTransition !== transition) {
|
|
19452
|
+
return resolveTransition(valueTransition, transition);
|
|
19453
|
+
}
|
|
19454
|
+
return valueTransition;
|
|
19455
|
+
}
|
|
19456
|
+
|
|
19457
|
+
// node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
|
|
19458
|
+
var underDampedSpring = {
|
|
19459
|
+
type: "spring",
|
|
19460
|
+
stiffness: 500,
|
|
19461
|
+
damping: 25,
|
|
19462
|
+
restSpeed: 10
|
|
19463
|
+
};
|
|
19464
|
+
var criticallyDampedSpring = (target) => ({
|
|
19465
|
+
type: "spring",
|
|
19466
|
+
stiffness: 550,
|
|
19467
|
+
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
19468
|
+
restSpeed: 10
|
|
19469
|
+
});
|
|
19470
|
+
var keyframesTransition = {
|
|
19471
|
+
type: "keyframes",
|
|
19472
|
+
duration: 0.8
|
|
19473
|
+
};
|
|
19474
|
+
var ease = {
|
|
19475
|
+
type: "keyframes",
|
|
19476
|
+
ease: [0.25, 0.1, 0.35, 1],
|
|
19477
|
+
duration: 0.3
|
|
19478
|
+
};
|
|
19479
|
+
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
19480
|
+
if (keyframes2.length > 2) {
|
|
19481
|
+
return keyframesTransition;
|
|
19482
|
+
} else if (transformProps.has(valueKey)) {
|
|
19483
|
+
return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
19484
|
+
}
|
|
19485
|
+
return ease;
|
|
19486
|
+
};
|
|
19487
|
+
|
|
19488
|
+
// node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
|
|
19489
|
+
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
19490
|
+
"when",
|
|
19491
|
+
"delay",
|
|
19492
|
+
"delayChildren",
|
|
19493
|
+
"staggerChildren",
|
|
19494
|
+
"staggerDirection",
|
|
19495
|
+
"repeat",
|
|
19496
|
+
"repeatType",
|
|
19497
|
+
"repeatDelay",
|
|
19498
|
+
"from",
|
|
19499
|
+
"elapsed"
|
|
19500
|
+
]);
|
|
19501
|
+
function isTransitionDefined(transition) {
|
|
19502
|
+
for (const key in transition) {
|
|
19503
|
+
if (!orchestrationKeys.has(key))
|
|
19504
|
+
return true;
|
|
19505
|
+
}
|
|
19506
|
+
return false;
|
|
19507
|
+
}
|
|
19508
|
+
|
|
19509
|
+
// node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
|
|
19510
|
+
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
19511
|
+
const valueTransition = getValueTransition(transition, name) || {};
|
|
19512
|
+
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
19513
|
+
let { elapsed = 0 } = transition;
|
|
19514
|
+
elapsed = elapsed - secondsToMilliseconds(delay2);
|
|
19515
|
+
const options = {
|
|
19516
|
+
keyframes: Array.isArray(target) ? target : [null, target],
|
|
19517
|
+
ease: "easeOut",
|
|
19518
|
+
velocity: value.getVelocity(),
|
|
19519
|
+
...valueTransition,
|
|
19520
|
+
delay: -elapsed,
|
|
19521
|
+
onUpdate: (v) => {
|
|
19522
|
+
value.set(v);
|
|
19523
|
+
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
19524
|
+
},
|
|
19525
|
+
onComplete: () => {
|
|
19526
|
+
onComplete();
|
|
19527
|
+
valueTransition.onComplete && valueTransition.onComplete();
|
|
19528
|
+
},
|
|
19529
|
+
name,
|
|
19530
|
+
motionValue: value,
|
|
19531
|
+
element: isHandoff ? void 0 : element
|
|
19532
|
+
};
|
|
19533
|
+
if (!isTransitionDefined(valueTransition)) {
|
|
19534
|
+
Object.assign(options, getDefaultTransition(name, options));
|
|
19535
|
+
}
|
|
19536
|
+
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
19537
|
+
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
19538
|
+
if (options.from !== void 0) {
|
|
19539
|
+
options.keyframes[0] = options.from;
|
|
19540
|
+
}
|
|
19541
|
+
let shouldSkip = false;
|
|
19542
|
+
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
19543
|
+
makeAnimationInstant(options);
|
|
19544
|
+
if (options.delay === 0) {
|
|
19545
|
+
shouldSkip = true;
|
|
19546
|
+
}
|
|
19547
|
+
}
|
|
19548
|
+
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
|
|
19549
|
+
shouldSkip = true;
|
|
19550
|
+
makeAnimationInstant(options);
|
|
19551
|
+
options.delay = 0;
|
|
19552
|
+
}
|
|
19553
|
+
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
19554
|
+
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
19555
|
+
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
19556
|
+
if (finalKeyframe !== void 0) {
|
|
19557
|
+
frame.update(() => {
|
|
19558
|
+
options.onUpdate(finalKeyframe);
|
|
19559
|
+
options.onComplete();
|
|
19560
|
+
});
|
|
19561
|
+
return;
|
|
19562
|
+
}
|
|
19563
|
+
}
|
|
19564
|
+
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
19565
|
+
};
|
|
19566
|
+
|
|
19567
|
+
// node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
|
|
19568
|
+
var splitCSSVariableRegex = (
|
|
19569
|
+
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
19570
|
+
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
19571
|
+
);
|
|
19572
|
+
function parseCSSVariable(current) {
|
|
19573
|
+
const match = splitCSSVariableRegex.exec(current);
|
|
19574
|
+
if (!match)
|
|
19575
|
+
return [,];
|
|
19576
|
+
const [, token1, token2, fallback] = match;
|
|
19577
|
+
return [`--${token1 ?? token2}`, fallback];
|
|
19578
|
+
}
|
|
19579
|
+
var maxDepth = 4;
|
|
19580
|
+
function getVariableValue(current, element, depth = 1) {
|
|
19581
|
+
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
19582
|
+
const [token, fallback] = parseCSSVariable(current);
|
|
19583
|
+
if (!token)
|
|
19584
|
+
return;
|
|
19585
|
+
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
19586
|
+
if (resolved) {
|
|
19587
|
+
const trimmed = resolved.trim();
|
|
19588
|
+
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
19589
|
+
}
|
|
19590
|
+
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
19591
|
+
}
|
|
19592
|
+
|
|
19593
|
+
// node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
|
|
19594
|
+
function getValueState(visualElement) {
|
|
19595
|
+
const state = [{}, {}];
|
|
19596
|
+
visualElement?.values.forEach((value, key) => {
|
|
19597
|
+
state[0][key] = value.get();
|
|
19598
|
+
state[1][key] = value.getVelocity();
|
|
19599
|
+
});
|
|
19600
|
+
return state;
|
|
19601
|
+
}
|
|
19602
|
+
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
|
19603
|
+
if (typeof definition === "function") {
|
|
19604
|
+
const [current, velocity] = getValueState(visualElement);
|
|
19605
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19606
|
+
}
|
|
19607
|
+
if (typeof definition === "string") {
|
|
19608
|
+
definition = props.variants && props.variants[definition];
|
|
19609
|
+
}
|
|
19610
|
+
if (typeof definition === "function") {
|
|
19611
|
+
const [current, velocity] = getValueState(visualElement);
|
|
19612
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19613
|
+
}
|
|
19614
|
+
return definition;
|
|
19615
|
+
}
|
|
19616
|
+
|
|
19617
|
+
// node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
|
|
19618
|
+
function resolveVariant(visualElement, definition, custom) {
|
|
19619
|
+
const props = visualElement.getProps();
|
|
19620
|
+
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
19621
|
+
}
|
|
19622
|
+
|
|
19623
|
+
// node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
|
|
19624
|
+
var positionalKeys = /* @__PURE__ */ new Set([
|
|
19625
|
+
"width",
|
|
19626
|
+
"height",
|
|
19627
|
+
"top",
|
|
19628
|
+
"left",
|
|
19629
|
+
"right",
|
|
19630
|
+
"bottom",
|
|
19631
|
+
...transformPropOrder
|
|
19632
|
+
]);
|
|
19633
|
+
|
|
19651
19634
|
// node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs
|
|
19652
19635
|
var isKeyframesTarget = (v) => {
|
|
19653
19636
|
return Array.isArray(v);
|
|
@@ -19719,10 +19702,15 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
19719
19702
|
const defaultTransition = visualElement.getDefaultTransition();
|
|
19720
19703
|
transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
|
|
19721
19704
|
const reduceMotion = transition?.reduceMotion;
|
|
19705
|
+
const skipAnimations = transition?.skipAnimations;
|
|
19722
19706
|
if (transitionOverride)
|
|
19723
19707
|
transition = transitionOverride;
|
|
19724
19708
|
const animations2 = [];
|
|
19725
19709
|
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
|
|
19710
|
+
const path = transition?.path;
|
|
19711
|
+
if (path) {
|
|
19712
|
+
path.animateVisualElement(visualElement, target, transition, delay2, animations2);
|
|
19713
|
+
}
|
|
19726
19714
|
for (const key in target) {
|
|
19727
19715
|
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
|
|
19728
19716
|
const valueTarget = target[key];
|
|
@@ -19733,6 +19721,8 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
19733
19721
|
delay: delay2,
|
|
19734
19722
|
...getValueTransition(transition || {}, key)
|
|
19735
19723
|
};
|
|
19724
|
+
if (skipAnimations)
|
|
19725
|
+
valueTransition.skipAnimations = true;
|
|
19736
19726
|
const currentValue = value.get();
|
|
19737
19727
|
if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
|
|
19738
19728
|
frame.update(() => value.set(valueTarget));
|
|
@@ -19887,6 +19877,12 @@ var int = {
|
|
|
19887
19877
|
// node_modules/motion-dom/dist/es/value/types/maps/transform.mjs
|
|
19888
19878
|
var transformValueTypes = {
|
|
19889
19879
|
rotate: degrees,
|
|
19880
|
+
/**
|
|
19881
|
+
* Internal channel for `transition.path` orientToPath. Composed onto
|
|
19882
|
+
* `rotate` at the transform-build sites so the user's `rotate` is
|
|
19883
|
+
* never read or overwritten. Not part of `transformPropOrder`.
|
|
19884
|
+
*/
|
|
19885
|
+
pathRotation: degrees,
|
|
19890
19886
|
rotateX: degrees,
|
|
19891
19887
|
rotateY: degrees,
|
|
19892
19888
|
rotateZ: degrees,
|
|
@@ -20125,6 +20121,14 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
|
20125
20121
|
}
|
|
20126
20122
|
};
|
|
20127
20123
|
|
|
20124
|
+
// node_modules/motion-dom/dist/es/utils/border-radius.mjs
|
|
20125
|
+
var cornerRadiusProps = [
|
|
20126
|
+
"borderTopLeftRadius",
|
|
20127
|
+
"borderTopRightRadius",
|
|
20128
|
+
"borderBottomRightRadius",
|
|
20129
|
+
"borderBottomLeftRadius"
|
|
20130
|
+
];
|
|
20131
|
+
|
|
20128
20132
|
// node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
|
|
20129
20133
|
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
20130
20134
|
if (elementOrSelector == null) {
|
|
@@ -20344,9 +20348,10 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
20344
20348
|
claimedPointerDownEvents.add(startEvent);
|
|
20345
20349
|
}
|
|
20346
20350
|
const onPressEnd = onPressStart(target, startEvent);
|
|
20351
|
+
const endEventOptions = { ...eventOptions, capture: true };
|
|
20347
20352
|
const onPointerEnd = (endEvent, success) => {
|
|
20348
|
-
window.removeEventListener("pointerup", onPointerUp);
|
|
20349
|
-
window.removeEventListener("pointercancel", onPointerCancel);
|
|
20353
|
+
window.removeEventListener("pointerup", onPointerUp, endEventOptions);
|
|
20354
|
+
window.removeEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
20350
20355
|
if (isPressing.has(target)) {
|
|
20351
20356
|
isPressing.delete(target);
|
|
20352
20357
|
}
|
|
@@ -20363,8 +20368,8 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
20363
20368
|
const onPointerCancel = (cancelEvent) => {
|
|
20364
20369
|
onPointerEnd(cancelEvent, false);
|
|
20365
20370
|
};
|
|
20366
|
-
window.addEventListener("pointerup", onPointerUp,
|
|
20367
|
-
window.addEventListener("pointercancel", onPointerCancel,
|
|
20371
|
+
window.addEventListener("pointerup", onPointerUp, endEventOptions);
|
|
20372
|
+
window.addEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
20368
20373
|
};
|
|
20369
20374
|
targets.forEach((target) => {
|
|
20370
20375
|
const pointerDownTarget = options.useGlobalTarget ? window : target;
|
|
@@ -20775,8 +20780,6 @@ var VisualElement = class {
|
|
|
20775
20780
|
removeOnChange();
|
|
20776
20781
|
if (removeSyncCheck)
|
|
20777
20782
|
removeSyncCheck();
|
|
20778
|
-
if (value.owner)
|
|
20779
|
-
value.stop();
|
|
20780
20783
|
});
|
|
20781
20784
|
}
|
|
20782
20785
|
sortNodePosition(other) {
|
|
@@ -21195,6 +21198,11 @@ function buildTransform(latestValues, transform, transformTemplate) {
|
|
|
21195
21198
|
}
|
|
21196
21199
|
}
|
|
21197
21200
|
}
|
|
21201
|
+
const pathRotation = latestValues.pathRotation;
|
|
21202
|
+
if (pathRotation) {
|
|
21203
|
+
transformIsDefault = false;
|
|
21204
|
+
transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;
|
|
21205
|
+
}
|
|
21198
21206
|
transformString = transformString.trim();
|
|
21199
21207
|
if (transformTemplate) {
|
|
21200
21208
|
transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
|
|
@@ -21302,12 +21310,7 @@ var correctBoxShadow = {
|
|
|
21302
21310
|
var scaleCorrectors = {
|
|
21303
21311
|
borderRadius: {
|
|
21304
21312
|
...correctBorderRadius,
|
|
21305
|
-
applyTo: [
|
|
21306
|
-
"borderTopLeftRadius",
|
|
21307
|
-
"borderTopRightRadius",
|
|
21308
|
-
"borderBottomLeftRadius",
|
|
21309
|
-
"borderBottomRightRadius"
|
|
21310
|
-
]
|
|
21313
|
+
applyTo: [...cornerRadiusProps]
|
|
21311
21314
|
},
|
|
21312
21315
|
borderTopLeftRadius: correctBorderRadius,
|
|
21313
21316
|
borderTopRightRadius: correctBorderRadius,
|
|
@@ -21652,7 +21655,7 @@ function createAnimationState(visualElement) {
|
|
|
21652
21655
|
continue;
|
|
21653
21656
|
let valueHasChanged = false;
|
|
21654
21657
|
if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
|
|
21655
|
-
valueHasChanged = !shallowCompare(next, prev);
|
|
21658
|
+
valueHasChanged = !shallowCompare(next, prev) || variantDidChange;
|
|
21656
21659
|
} else {
|
|
21657
21660
|
valueHasChanged = next !== prev;
|
|
21658
21661
|
}
|
|
@@ -21912,11 +21915,13 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
21912
21915
|
transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
|
|
21913
21916
|
}
|
|
21914
21917
|
if (latestTransform) {
|
|
21915
|
-
const { transformPerspective, rotate: rotate2, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
21918
|
+
const { transformPerspective, rotate: rotate2, pathRotation, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
21916
21919
|
if (transformPerspective)
|
|
21917
21920
|
transform = `perspective(${transformPerspective}px) ${transform}`;
|
|
21918
21921
|
if (rotate2)
|
|
21919
21922
|
transform += `rotate(${rotate2}deg) `;
|
|
21923
|
+
if (pathRotation)
|
|
21924
|
+
transform += `rotate(${pathRotation}deg) `;
|
|
21920
21925
|
if (rotateX)
|
|
21921
21926
|
transform += `rotateX(${rotateX}deg) `;
|
|
21922
21927
|
if (rotateY)
|
|
@@ -21935,13 +21940,7 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
21935
21940
|
}
|
|
21936
21941
|
|
|
21937
21942
|
// node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs
|
|
21938
|
-
var
|
|
21939
|
-
"borderTopLeftRadius",
|
|
21940
|
-
"borderTopRightRadius",
|
|
21941
|
-
"borderBottomLeftRadius",
|
|
21942
|
-
"borderBottomRightRadius"
|
|
21943
|
-
];
|
|
21944
|
-
var numBorders = borderLabels.length;
|
|
21943
|
+
var numBorders = cornerRadiusProps.length;
|
|
21945
21944
|
var asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
|
|
21946
21945
|
var isPx = (value) => typeof value === "number" || px.test(value);
|
|
21947
21946
|
function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
|
|
@@ -21952,7 +21951,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
21952
21951
|
target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress2);
|
|
21953
21952
|
}
|
|
21954
21953
|
for (let i = 0; i < numBorders; i++) {
|
|
21955
|
-
const borderLabel =
|
|
21954
|
+
const borderLabel = cornerRadiusProps[i];
|
|
21956
21955
|
let followRadius = getRadius(follow, borderLabel);
|
|
21957
21956
|
let leadRadius = getRadius(lead, borderLabel);
|
|
21958
21957
|
if (followRadius === void 0 && leadRadius === void 0)
|
|
@@ -21998,7 +21997,7 @@ function animateSingleValue(value, keyframes2, options) {
|
|
|
21998
21997
|
// node_modules/motion-dom/dist/es/events/add-dom-event.mjs
|
|
21999
21998
|
function addDomEvent(target, eventName, handler, options = { passive: true }) {
|
|
22000
21999
|
target.addEventListener(eventName, handler, options);
|
|
22001
|
-
return () => target.removeEventListener(eventName, handler);
|
|
22000
|
+
return () => target.removeEventListener(eventName, handler, options);
|
|
22002
22001
|
}
|
|
22003
22002
|
|
|
22004
22003
|
// node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
|
|
@@ -22306,7 +22305,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22306
22305
|
animationOptions.type = false;
|
|
22307
22306
|
}
|
|
22308
22307
|
this.startAnimation(animationOptions);
|
|
22309
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
22308
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions.path);
|
|
22310
22309
|
} else {
|
|
22311
22310
|
if (!hasLayoutChanged) {
|
|
22312
22311
|
finishAnimation(this);
|
|
@@ -22778,7 +22777,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22778
22777
|
this.projectionDelta = createDelta();
|
|
22779
22778
|
this.projectionDeltaWithTransform = createDelta();
|
|
22780
22779
|
}
|
|
22781
|
-
setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
|
|
22780
|
+
setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) {
|
|
22782
22781
|
const snapshot = this.snapshot;
|
|
22783
22782
|
const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
|
|
22784
22783
|
const mixedValues = { ...this.latestValues };
|
|
@@ -22796,10 +22795,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22796
22795
|
const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
|
|
22797
22796
|
this.animationProgress = 0;
|
|
22798
22797
|
let prevRelativeTarget;
|
|
22798
|
+
const interpolate3 = pathFn?.interpolateProjection(delta);
|
|
22799
22799
|
this.mixTargetDelta = (latest) => {
|
|
22800
22800
|
const progress2 = latest / 1e3;
|
|
22801
|
-
|
|
22802
|
-
|
|
22801
|
+
const point = interpolate3?.(progress2);
|
|
22802
|
+
if (point) {
|
|
22803
|
+
targetDelta.x.translate = point.x;
|
|
22804
|
+
targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress2);
|
|
22805
|
+
targetDelta.x.origin = delta.x.origin;
|
|
22806
|
+
targetDelta.x.originPoint = delta.x.originPoint;
|
|
22807
|
+
targetDelta.y.translate = point.y;
|
|
22808
|
+
targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress2);
|
|
22809
|
+
targetDelta.y.origin = delta.y.origin;
|
|
22810
|
+
targetDelta.y.originPoint = delta.y.originPoint;
|
|
22811
|
+
} else {
|
|
22812
|
+
mixAxisDeltaLinear(targetDelta.x, delta.x, progress2);
|
|
22813
|
+
mixAxisDeltaLinear(targetDelta.y, delta.y, progress2);
|
|
22814
|
+
}
|
|
22803
22815
|
this.setTargetDelta(targetDelta);
|
|
22804
22816
|
if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {
|
|
22805
22817
|
calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0);
|
|
@@ -22815,6 +22827,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22815
22827
|
this.animationValues = mixedValues;
|
|
22816
22828
|
mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress2, shouldCrossfadeOpacity, isOnlyMember);
|
|
22817
22829
|
}
|
|
22830
|
+
if (point && point.rotate !== void 0) {
|
|
22831
|
+
if (!this.animationValues)
|
|
22832
|
+
this.animationValues = mixedValues;
|
|
22833
|
+
this.animationValues.pathRotation = point.rotate;
|
|
22834
|
+
}
|
|
22818
22835
|
this.root.scheduleUpdateProjection();
|
|
22819
22836
|
this.scheduleRender();
|
|
22820
22837
|
this.animationProgress = progress2;
|
|
@@ -22841,8 +22858,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22841
22858
|
this.mixTargetDelta(latest);
|
|
22842
22859
|
options.onUpdate && options.onUpdate(latest);
|
|
22843
22860
|
},
|
|
22844
|
-
onStop: () => {
|
|
22845
|
-
},
|
|
22846
22861
|
onComplete: () => {
|
|
22847
22862
|
options.onComplete && options.onComplete();
|
|
22848
22863
|
this.completeAnimation();
|
|
@@ -23171,7 +23186,7 @@ function resetSkewAndRotation(node) {
|
|
|
23171
23186
|
function removeLeadSnapshots(stack) {
|
|
23172
23187
|
stack.removeLeadSnapshot();
|
|
23173
23188
|
}
|
|
23174
|
-
function
|
|
23189
|
+
function mixAxisDeltaLinear(output, delta, p) {
|
|
23175
23190
|
output.translate = mixNumber(delta.translate, 0, p);
|
|
23176
23191
|
output.scale = mixNumber(delta.scale, 1, p);
|
|
23177
23192
|
output.origin = delta.origin;
|
|
@@ -23676,7 +23691,7 @@ var useSVGVisualState = /* @__PURE__ */ makeUseVisualState({
|
|
|
23676
23691
|
});
|
|
23677
23692
|
|
|
23678
23693
|
// node_modules/framer-motion/dist/es/motion/utils/symbol.mjs
|
|
23679
|
-
var motionComponentSymbol = Symbol.for("motionComponentSymbol");
|
|
23694
|
+
var motionComponentSymbol = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
23680
23695
|
function useMotionRef(visualState, visualElement, externalRef) {
|
|
23681
23696
|
const externalRefContainer = useRef(externalRef);
|
|
23682
23697
|
useInsertionEffect(() => {
|
|
@@ -23687,6 +23702,9 @@ function useMotionRef(visualState, visualElement, externalRef) {
|
|
|
23687
23702
|
if (instance) {
|
|
23688
23703
|
visualState.onMount?.(instance);
|
|
23689
23704
|
}
|
|
23705
|
+
if (visualElement) {
|
|
23706
|
+
instance ? visualElement.mount(instance) : visualElement.unmount();
|
|
23707
|
+
}
|
|
23690
23708
|
const ref = externalRefContainer.current;
|
|
23691
23709
|
if (typeof ref === "function") {
|
|
23692
23710
|
if (instance) {
|
|
@@ -23703,9 +23721,6 @@ function useMotionRef(visualState, visualElement, externalRef) {
|
|
|
23703
23721
|
} else if (ref) {
|
|
23704
23722
|
ref.current = instance;
|
|
23705
23723
|
}
|
|
23706
|
-
if (visualElement) {
|
|
23707
|
-
instance ? visualElement.mount(instance) : visualElement.unmount();
|
|
23708
|
-
}
|
|
23709
23724
|
}, [visualElement]);
|
|
23710
23725
|
}
|
|
23711
23726
|
var SwitchLayoutGroupContext = createContext({});
|
|
@@ -23955,7 +23970,7 @@ var ExitAnimationFeature = class extends Feature {
|
|
|
23955
23970
|
if (isPresent && prevIsPresent === false) {
|
|
23956
23971
|
if (this.isExitComplete) {
|
|
23957
23972
|
const { initial, custom } = this.node.getProps();
|
|
23958
|
-
if (typeof initial === "string") {
|
|
23973
|
+
if (typeof initial === "string" || typeof initial === "object" && initial !== null && !Array.isArray(initial)) {
|
|
23959
23974
|
const resolved = resolveVariant(this.node, initial, custom);
|
|
23960
23975
|
if (resolved) {
|
|
23961
23976
|
const { transition, transitionEnd, ...target } = resolved;
|
|
@@ -24105,7 +24120,8 @@ var PanSession = class {
|
|
|
24105
24120
|
this.history = [{ ...point, timestamp }];
|
|
24106
24121
|
const { onSessionStart } = handlers;
|
|
24107
24122
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
24108
|
-
|
|
24123
|
+
const eventOptions = { passive: true, capture: true };
|
|
24124
|
+
this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove, eventOptions), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp, eventOptions), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp, eventOptions));
|
|
24109
24125
|
if (element) {
|
|
24110
24126
|
this.startScrollTracking(element);
|
|
24111
24127
|
}
|
|
@@ -24518,6 +24534,10 @@ var VisualElementDragControls = class {
|
|
|
24518
24534
|
const { projection } = this.visualElement;
|
|
24519
24535
|
if (!projection || !projection.layout)
|
|
24520
24536
|
return false;
|
|
24537
|
+
if (projection.root) {
|
|
24538
|
+
projection.root.scroll = void 0;
|
|
24539
|
+
projection.root.updateScroll();
|
|
24540
|
+
}
|
|
24521
24541
|
const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
|
|
24522
24542
|
let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
|
|
24523
24543
|
if (onMeasureDragConstraints) {
|
|
@@ -24574,7 +24594,7 @@ var VisualElementDragControls = class {
|
|
|
24574
24594
|
const dragKey = `_drag${axis.toUpperCase()}`;
|
|
24575
24595
|
const props = this.visualElement.getProps();
|
|
24576
24596
|
const externalMotionValue = props[dragKey];
|
|
24577
|
-
return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis,
|
|
24597
|
+
return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);
|
|
24578
24598
|
}
|
|
24579
24599
|
snapToCursor(point) {
|
|
24580
24600
|
eachAxis((axis) => {
|
|
@@ -26135,7 +26155,7 @@ function NSWCard({
|
|
|
26135
26155
|
{
|
|
26136
26156
|
className: cn(
|
|
26137
26157
|
"h-full rounded-[inherit] border border-(--nsw-card-border)",
|
|
26138
|
-
hasImage && "
|
|
26158
|
+
hasImage && "rounded-t-none border-t-0"
|
|
26139
26159
|
),
|
|
26140
26160
|
children: /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
|
|
26141
26161
|
}
|
|
@@ -26147,7 +26167,7 @@ function NSWCard({
|
|
|
26147
26167
|
{
|
|
26148
26168
|
className: cn(
|
|
26149
26169
|
"flex h-full flex-col rounded-[inherit] border border-(--nsw-card-border) p-8",
|
|
26150
|
-
hasImage && "
|
|
26170
|
+
hasImage && "rounded-t-none border-t-0"
|
|
26151
26171
|
),
|
|
26152
26172
|
children: bodyChildren
|
|
26153
26173
|
}
|
|
@@ -26820,18 +26840,18 @@ function Skeleton({ className, ...props }) {
|
|
|
26820
26840
|
);
|
|
26821
26841
|
}
|
|
26822
26842
|
var MOBILE_BREAKPOINT = 768;
|
|
26843
|
+
function subscribeToViewport(callback) {
|
|
26844
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
26845
|
+
mql.addEventListener("change", callback);
|
|
26846
|
+
return () => mql.removeEventListener("change", callback);
|
|
26847
|
+
}
|
|
26823
26848
|
function useIsMobile() {
|
|
26824
|
-
|
|
26825
|
-
|
|
26826
|
-
|
|
26827
|
-
|
|
26828
|
-
|
|
26829
|
-
|
|
26830
|
-
mql.addEventListener("change", onChange);
|
|
26831
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
26832
|
-
return () => mql.removeEventListener("change", onChange);
|
|
26833
|
-
}, []);
|
|
26834
|
-
return !!isMobile;
|
|
26849
|
+
return React5.useSyncExternalStore(
|
|
26850
|
+
subscribeToViewport,
|
|
26851
|
+
() => window.innerWidth < MOBILE_BREAKPOINT,
|
|
26852
|
+
// No viewport on the server — match the old `undefined → false` default.
|
|
26853
|
+
() => false
|
|
26854
|
+
);
|
|
26835
26855
|
}
|
|
26836
26856
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
26837
26857
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -30570,13 +30590,19 @@ var POOL_SIZE_MULTIPLIER = 128;
|
|
|
30570
30590
|
var pool;
|
|
30571
30591
|
var poolOffset;
|
|
30572
30592
|
var fillPool = (bytes) => {
|
|
30573
|
-
if (
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
|
|
30579
|
-
poolOffset
|
|
30593
|
+
if (bytes < 0) throw new RangeError("Wrong ID size");
|
|
30594
|
+
try {
|
|
30595
|
+
if (!pool || pool.length < bytes) {
|
|
30596
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
30597
|
+
crypto.randomFillSync(pool);
|
|
30598
|
+
poolOffset = 0;
|
|
30599
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
30600
|
+
crypto.randomFillSync(pool);
|
|
30601
|
+
poolOffset = 0;
|
|
30602
|
+
}
|
|
30603
|
+
} catch (e) {
|
|
30604
|
+
pool = void 0;
|
|
30605
|
+
throw e;
|
|
30580
30606
|
}
|
|
30581
30607
|
poolOffset += bytes;
|
|
30582
30608
|
};
|