@nswds/app 1.126.2 → 1.126.4
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 +3798 -7712
- package/dist/index.cjs +333 -322
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +333 -322
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3900 -7782
- package/dist/styles.css.map +1 -1
- package/package.json +3 -5
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
|
{
|
|
@@ -8292,7 +8286,7 @@ function ChartTooltipContent({
|
|
|
8292
8286
|
)
|
|
8293
8287
|
] })
|
|
8294
8288
|
},
|
|
8295
|
-
|
|
8289
|
+
key
|
|
8296
8290
|
);
|
|
8297
8291
|
}) })
|
|
8298
8292
|
]
|
|
@@ -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
|
{
|
|
@@ -13422,24 +13413,6 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
|
|
|
13422
13413
|
}
|
|
13423
13414
|
return null;
|
|
13424
13415
|
};
|
|
13425
|
-
var renderInactiveShape = (props) => {
|
|
13426
|
-
const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, className } = props;
|
|
13427
|
-
return /* @__PURE__ */ jsx(
|
|
13428
|
-
Sector,
|
|
13429
|
-
{
|
|
13430
|
-
cx,
|
|
13431
|
-
cy,
|
|
13432
|
-
innerRadius,
|
|
13433
|
-
outerRadius,
|
|
13434
|
-
startAngle,
|
|
13435
|
-
endAngle,
|
|
13436
|
-
className,
|
|
13437
|
-
fill: "",
|
|
13438
|
-
opacity: 0.3,
|
|
13439
|
-
style: { outline: "none" }
|
|
13440
|
-
}
|
|
13441
|
-
);
|
|
13442
|
-
};
|
|
13443
13416
|
var DonutChart = React5__default.forwardRef(
|
|
13444
13417
|
({
|
|
13445
13418
|
data = [],
|
|
@@ -13480,6 +13453,10 @@ var DonutChart = React5__default.forwardRef(
|
|
|
13480
13453
|
});
|
|
13481
13454
|
}
|
|
13482
13455
|
};
|
|
13456
|
+
const renderShape3 = (props) => {
|
|
13457
|
+
const isInactive = activeIndex !== void 0 && props.index !== activeIndex;
|
|
13458
|
+
return /* @__PURE__ */ jsx(Sector, { ...props, opacity: isInactive ? 0.3 : 1, style: { outline: "none" } });
|
|
13459
|
+
};
|
|
13483
13460
|
return /* @__PURE__ */ jsx(
|
|
13484
13461
|
"div",
|
|
13485
13462
|
{
|
|
@@ -13527,8 +13504,7 @@ var DonutChart = React5__default.forwardRef(
|
|
|
13527
13504
|
nameKey: category,
|
|
13528
13505
|
isAnimationActive: false,
|
|
13529
13506
|
onClick: handleShapeClick,
|
|
13530
|
-
|
|
13531
|
-
inactiveShape: renderInactiveShape,
|
|
13507
|
+
shape: renderShape3,
|
|
13532
13508
|
style: { outline: "none" }
|
|
13533
13509
|
}
|
|
13534
13510
|
),
|
|
@@ -14439,7 +14415,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
14439
14415
|
|
|
14440
14416
|
// package.json
|
|
14441
14417
|
var package_default = {
|
|
14442
|
-
version: "1.126.
|
|
14418
|
+
version: "1.126.3"};
|
|
14443
14419
|
var SluggerContext = React5__default.createContext(null);
|
|
14444
14420
|
function flattenText(nodes) {
|
|
14445
14421
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -15094,12 +15070,9 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
|
|
|
15094
15070
|
}
|
|
15095
15071
|
return () => clearInterval(intervalRef.current);
|
|
15096
15072
|
}, [isPressed, onClick]);
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
setIsPressed(false);
|
|
15101
|
-
}
|
|
15102
|
-
}, [disabled]);
|
|
15073
|
+
if (disabled && isPressed) {
|
|
15074
|
+
setIsPressed(false);
|
|
15075
|
+
}
|
|
15103
15076
|
return /* @__PURE__ */ jsx(
|
|
15104
15077
|
"button",
|
|
15105
15078
|
{
|
|
@@ -16811,9 +16784,7 @@ var MotionGlobalConfig = {};
|
|
|
16811
16784
|
var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
|
|
16812
16785
|
|
|
16813
16786
|
// node_modules/motion-utils/dist/es/is-object.mjs
|
|
16814
|
-
|
|
16815
|
-
return typeof value === "object" && value !== null;
|
|
16816
|
-
}
|
|
16787
|
+
var isObject = (value) => typeof value === "object" && value !== null;
|
|
16817
16788
|
|
|
16818
16789
|
// node_modules/motion-utils/dist/es/is-zero-value-string.mjs
|
|
16819
16790
|
var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
|
|
@@ -16833,13 +16804,12 @@ function memo(callback) {
|
|
|
16833
16804
|
var noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
|
|
16834
16805
|
|
|
16835
16806
|
// node_modules/motion-utils/dist/es/pipe.mjs
|
|
16836
|
-
var
|
|
16837
|
-
var pipe = (...transformers) => transformers.reduce(combineFunctions);
|
|
16807
|
+
var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
|
|
16838
16808
|
|
|
16839
16809
|
// node_modules/motion-utils/dist/es/progress.mjs
|
|
16840
16810
|
var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
16841
|
-
const
|
|
16842
|
-
return
|
|
16811
|
+
const range = to - from;
|
|
16812
|
+
return range ? (value - from) / range : 1;
|
|
16843
16813
|
};
|
|
16844
16814
|
|
|
16845
16815
|
// node_modules/motion-utils/dist/es/subscription-manager.mjs
|
|
@@ -16877,9 +16847,7 @@ var secondsToMilliseconds = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e
|
|
|
16877
16847
|
var millisecondsToSeconds = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
|
|
16878
16848
|
|
|
16879
16849
|
// node_modules/motion-utils/dist/es/velocity-per-second.mjs
|
|
16880
|
-
|
|
16881
|
-
return frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
16882
|
-
}
|
|
16850
|
+
var velocityPerSecond = /* @__NO_SIDE_EFFECTS__ */ (velocity, frameDuration) => frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
16883
16851
|
|
|
16884
16852
|
// node_modules/motion-utils/dist/es/warn-once.mjs
|
|
16885
16853
|
var warned = /* @__PURE__ */ new Set();
|
|
@@ -16909,6 +16877,7 @@ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
|
16909
16877
|
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
|
|
16910
16878
|
return currentT;
|
|
16911
16879
|
}
|
|
16880
|
+
// @__NO_SIDE_EFFECTS__
|
|
16912
16881
|
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
16913
16882
|
if (mX1 === mY1 && mX2 === mY2)
|
|
16914
16883
|
return noop;
|
|
@@ -16917,10 +16886,10 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
|
16917
16886
|
}
|
|
16918
16887
|
|
|
16919
16888
|
// 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;
|
|
16889
|
+
var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
16921
16890
|
|
|
16922
16891
|
// node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs
|
|
16923
|
-
var reverseEasing = (easing) => (p) => 1 - easing(1 - p);
|
|
16892
|
+
var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
|
|
16924
16893
|
|
|
16925
16894
|
// node_modules/motion-utils/dist/es/easing/back.mjs
|
|
16926
16895
|
var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
|
@@ -16941,12 +16910,12 @@ var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
|
|
|
16941
16910
|
var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
|
|
16942
16911
|
|
|
16943
16912
|
// node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs
|
|
16944
|
-
var isEasingArray = (ease2) => {
|
|
16913
|
+
var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
|
|
16945
16914
|
return Array.isArray(ease2) && typeof ease2[0] !== "number";
|
|
16946
16915
|
};
|
|
16947
16916
|
|
|
16948
16917
|
// node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
|
|
16949
|
-
var isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
16918
|
+
var isBezierDefinition = /* @__NO_SIDE_EFFECTS__ */ (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
16950
16919
|
|
|
16951
16920
|
// node_modules/motion-utils/dist/es/easing/utils/map.mjs
|
|
16952
16921
|
var easingLookup = {
|
|
@@ -16998,7 +16967,7 @@ var stepsOrder = [
|
|
|
16998
16967
|
];
|
|
16999
16968
|
|
|
17000
16969
|
// node_modules/motion-dom/dist/es/frameloop/render-step.mjs
|
|
17001
|
-
function createRenderStep(runNextFrame
|
|
16970
|
+
function createRenderStep(runNextFrame) {
|
|
17002
16971
|
let thisFrame = /* @__PURE__ */ new Set();
|
|
17003
16972
|
let nextFrame = /* @__PURE__ */ new Set();
|
|
17004
16973
|
let isProcessing = false;
|
|
@@ -18450,7 +18419,7 @@ var transformPropOrder = [
|
|
|
18450
18419
|
"skewX",
|
|
18451
18420
|
"skewY"
|
|
18452
18421
|
];
|
|
18453
|
-
var transformProps = /* @__PURE__ */ (() => new Set(transformPropOrder))();
|
|
18422
|
+
var transformProps = /* @__PURE__ */ (() => /* @__PURE__ */ new Set([...transformPropOrder, "pathRotation"]))();
|
|
18454
18423
|
|
|
18455
18424
|
// node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs
|
|
18456
18425
|
var isNumOrPxType = (v) => v === number || v === px;
|
|
@@ -18695,8 +18664,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
18695
18664
|
};
|
|
18696
18665
|
if (pseudoElement)
|
|
18697
18666
|
options.pseudoElement = pseudoElement;
|
|
18698
|
-
|
|
18699
|
-
return animation;
|
|
18667
|
+
return element.animate(keyframeOptions, options);
|
|
18700
18668
|
}
|
|
18701
18669
|
|
|
18702
18670
|
// node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
|
|
@@ -19174,201 +19142,6 @@ function calcChildStagger(children, child, delayChildren, staggerChildren = 0, s
|
|
|
19174
19142
|
return delayIsFunction ? delayChildren(index, numChildren) : staggerDirection === 1 ? index * staggerChildren : maxStaggerDuration - index * staggerChildren;
|
|
19175
19143
|
}
|
|
19176
19144
|
|
|
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
19145
|
// node_modules/motion-dom/dist/es/value/index.mjs
|
|
19373
19146
|
var MAX_VELOCITY_DELTA = 30;
|
|
19374
19147
|
var isFloat = (value) => {
|
|
@@ -19648,6 +19421,201 @@ function motionValue(init, options) {
|
|
|
19648
19421
|
return new MotionValue(init, options);
|
|
19649
19422
|
}
|
|
19650
19423
|
|
|
19424
|
+
// node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
|
|
19425
|
+
function resolveTransition(transition, parentTransition) {
|
|
19426
|
+
if (transition?.inherit && parentTransition) {
|
|
19427
|
+
const { inherit: _, ...rest } = transition;
|
|
19428
|
+
return { ...parentTransition, ...rest };
|
|
19429
|
+
}
|
|
19430
|
+
return transition;
|
|
19431
|
+
}
|
|
19432
|
+
|
|
19433
|
+
// node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
|
|
19434
|
+
function getValueTransition(transition, key) {
|
|
19435
|
+
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
19436
|
+
if (valueTransition !== transition) {
|
|
19437
|
+
return resolveTransition(valueTransition, transition);
|
|
19438
|
+
}
|
|
19439
|
+
return valueTransition;
|
|
19440
|
+
}
|
|
19441
|
+
|
|
19442
|
+
// node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
|
|
19443
|
+
var underDampedSpring = {
|
|
19444
|
+
type: "spring",
|
|
19445
|
+
stiffness: 500,
|
|
19446
|
+
damping: 25,
|
|
19447
|
+
restSpeed: 10
|
|
19448
|
+
};
|
|
19449
|
+
var criticallyDampedSpring = (target) => ({
|
|
19450
|
+
type: "spring",
|
|
19451
|
+
stiffness: 550,
|
|
19452
|
+
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
19453
|
+
restSpeed: 10
|
|
19454
|
+
});
|
|
19455
|
+
var keyframesTransition = {
|
|
19456
|
+
type: "keyframes",
|
|
19457
|
+
duration: 0.8
|
|
19458
|
+
};
|
|
19459
|
+
var ease = {
|
|
19460
|
+
type: "keyframes",
|
|
19461
|
+
ease: [0.25, 0.1, 0.35, 1],
|
|
19462
|
+
duration: 0.3
|
|
19463
|
+
};
|
|
19464
|
+
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
19465
|
+
if (keyframes2.length > 2) {
|
|
19466
|
+
return keyframesTransition;
|
|
19467
|
+
} else if (transformProps.has(valueKey)) {
|
|
19468
|
+
return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
19469
|
+
}
|
|
19470
|
+
return ease;
|
|
19471
|
+
};
|
|
19472
|
+
|
|
19473
|
+
// node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
|
|
19474
|
+
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
19475
|
+
"when",
|
|
19476
|
+
"delay",
|
|
19477
|
+
"delayChildren",
|
|
19478
|
+
"staggerChildren",
|
|
19479
|
+
"staggerDirection",
|
|
19480
|
+
"repeat",
|
|
19481
|
+
"repeatType",
|
|
19482
|
+
"repeatDelay",
|
|
19483
|
+
"from",
|
|
19484
|
+
"elapsed"
|
|
19485
|
+
]);
|
|
19486
|
+
function isTransitionDefined(transition) {
|
|
19487
|
+
for (const key in transition) {
|
|
19488
|
+
if (!orchestrationKeys.has(key))
|
|
19489
|
+
return true;
|
|
19490
|
+
}
|
|
19491
|
+
return false;
|
|
19492
|
+
}
|
|
19493
|
+
|
|
19494
|
+
// node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
|
|
19495
|
+
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
19496
|
+
const valueTransition = getValueTransition(transition, name) || {};
|
|
19497
|
+
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
19498
|
+
let { elapsed = 0 } = transition;
|
|
19499
|
+
elapsed = elapsed - secondsToMilliseconds(delay2);
|
|
19500
|
+
const options = {
|
|
19501
|
+
keyframes: Array.isArray(target) ? target : [null, target],
|
|
19502
|
+
ease: "easeOut",
|
|
19503
|
+
velocity: value.getVelocity(),
|
|
19504
|
+
...valueTransition,
|
|
19505
|
+
delay: -elapsed,
|
|
19506
|
+
onUpdate: (v) => {
|
|
19507
|
+
value.set(v);
|
|
19508
|
+
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
19509
|
+
},
|
|
19510
|
+
onComplete: () => {
|
|
19511
|
+
onComplete();
|
|
19512
|
+
valueTransition.onComplete && valueTransition.onComplete();
|
|
19513
|
+
},
|
|
19514
|
+
name,
|
|
19515
|
+
motionValue: value,
|
|
19516
|
+
element: isHandoff ? void 0 : element
|
|
19517
|
+
};
|
|
19518
|
+
if (!isTransitionDefined(valueTransition)) {
|
|
19519
|
+
Object.assign(options, getDefaultTransition(name, options));
|
|
19520
|
+
}
|
|
19521
|
+
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
19522
|
+
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
19523
|
+
if (options.from !== void 0) {
|
|
19524
|
+
options.keyframes[0] = options.from;
|
|
19525
|
+
}
|
|
19526
|
+
let shouldSkip = false;
|
|
19527
|
+
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
19528
|
+
makeAnimationInstant(options);
|
|
19529
|
+
if (options.delay === 0) {
|
|
19530
|
+
shouldSkip = true;
|
|
19531
|
+
}
|
|
19532
|
+
}
|
|
19533
|
+
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
|
|
19534
|
+
shouldSkip = true;
|
|
19535
|
+
makeAnimationInstant(options);
|
|
19536
|
+
options.delay = 0;
|
|
19537
|
+
}
|
|
19538
|
+
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
19539
|
+
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
19540
|
+
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
19541
|
+
if (finalKeyframe !== void 0) {
|
|
19542
|
+
frame.update(() => {
|
|
19543
|
+
options.onUpdate(finalKeyframe);
|
|
19544
|
+
options.onComplete();
|
|
19545
|
+
});
|
|
19546
|
+
return;
|
|
19547
|
+
}
|
|
19548
|
+
}
|
|
19549
|
+
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
19550
|
+
};
|
|
19551
|
+
|
|
19552
|
+
// node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
|
|
19553
|
+
var splitCSSVariableRegex = (
|
|
19554
|
+
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
19555
|
+
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
19556
|
+
);
|
|
19557
|
+
function parseCSSVariable(current) {
|
|
19558
|
+
const match = splitCSSVariableRegex.exec(current);
|
|
19559
|
+
if (!match)
|
|
19560
|
+
return [,];
|
|
19561
|
+
const [, token1, token2, fallback] = match;
|
|
19562
|
+
return [`--${token1 ?? token2}`, fallback];
|
|
19563
|
+
}
|
|
19564
|
+
var maxDepth = 4;
|
|
19565
|
+
function getVariableValue(current, element, depth = 1) {
|
|
19566
|
+
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
19567
|
+
const [token, fallback] = parseCSSVariable(current);
|
|
19568
|
+
if (!token)
|
|
19569
|
+
return;
|
|
19570
|
+
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
19571
|
+
if (resolved) {
|
|
19572
|
+
const trimmed = resolved.trim();
|
|
19573
|
+
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
19574
|
+
}
|
|
19575
|
+
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
19576
|
+
}
|
|
19577
|
+
|
|
19578
|
+
// node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
|
|
19579
|
+
function getValueState(visualElement) {
|
|
19580
|
+
const state = [{}, {}];
|
|
19581
|
+
visualElement?.values.forEach((value, key) => {
|
|
19582
|
+
state[0][key] = value.get();
|
|
19583
|
+
state[1][key] = value.getVelocity();
|
|
19584
|
+
});
|
|
19585
|
+
return state;
|
|
19586
|
+
}
|
|
19587
|
+
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
|
19588
|
+
if (typeof definition === "function") {
|
|
19589
|
+
const [current, velocity] = getValueState(visualElement);
|
|
19590
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19591
|
+
}
|
|
19592
|
+
if (typeof definition === "string") {
|
|
19593
|
+
definition = props.variants && props.variants[definition];
|
|
19594
|
+
}
|
|
19595
|
+
if (typeof definition === "function") {
|
|
19596
|
+
const [current, velocity] = getValueState(visualElement);
|
|
19597
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
19598
|
+
}
|
|
19599
|
+
return definition;
|
|
19600
|
+
}
|
|
19601
|
+
|
|
19602
|
+
// node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
|
|
19603
|
+
function resolveVariant(visualElement, definition, custom) {
|
|
19604
|
+
const props = visualElement.getProps();
|
|
19605
|
+
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
19606
|
+
}
|
|
19607
|
+
|
|
19608
|
+
// node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
|
|
19609
|
+
var positionalKeys = /* @__PURE__ */ new Set([
|
|
19610
|
+
"width",
|
|
19611
|
+
"height",
|
|
19612
|
+
"top",
|
|
19613
|
+
"left",
|
|
19614
|
+
"right",
|
|
19615
|
+
"bottom",
|
|
19616
|
+
...transformPropOrder
|
|
19617
|
+
]);
|
|
19618
|
+
|
|
19651
19619
|
// node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs
|
|
19652
19620
|
var isKeyframesTarget = (v) => {
|
|
19653
19621
|
return Array.isArray(v);
|
|
@@ -19719,10 +19687,15 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
19719
19687
|
const defaultTransition = visualElement.getDefaultTransition();
|
|
19720
19688
|
transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
|
|
19721
19689
|
const reduceMotion = transition?.reduceMotion;
|
|
19690
|
+
const skipAnimations = transition?.skipAnimations;
|
|
19722
19691
|
if (transitionOverride)
|
|
19723
19692
|
transition = transitionOverride;
|
|
19724
19693
|
const animations2 = [];
|
|
19725
19694
|
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
|
|
19695
|
+
const path = transition?.path;
|
|
19696
|
+
if (path) {
|
|
19697
|
+
path.animateVisualElement(visualElement, target, transition, delay2, animations2);
|
|
19698
|
+
}
|
|
19726
19699
|
for (const key in target) {
|
|
19727
19700
|
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
|
|
19728
19701
|
const valueTarget = target[key];
|
|
@@ -19733,6 +19706,8 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
19733
19706
|
delay: delay2,
|
|
19734
19707
|
...getValueTransition(transition || {}, key)
|
|
19735
19708
|
};
|
|
19709
|
+
if (skipAnimations)
|
|
19710
|
+
valueTransition.skipAnimations = true;
|
|
19736
19711
|
const currentValue = value.get();
|
|
19737
19712
|
if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
|
|
19738
19713
|
frame.update(() => value.set(valueTarget));
|
|
@@ -19887,6 +19862,12 @@ var int = {
|
|
|
19887
19862
|
// node_modules/motion-dom/dist/es/value/types/maps/transform.mjs
|
|
19888
19863
|
var transformValueTypes = {
|
|
19889
19864
|
rotate: degrees,
|
|
19865
|
+
/**
|
|
19866
|
+
* Internal channel for `transition.path` orientToPath. Composed onto
|
|
19867
|
+
* `rotate` at the transform-build sites so the user's `rotate` is
|
|
19868
|
+
* never read or overwritten. Not part of `transformPropOrder`.
|
|
19869
|
+
*/
|
|
19870
|
+
pathRotation: degrees,
|
|
19890
19871
|
rotateX: degrees,
|
|
19891
19872
|
rotateY: degrees,
|
|
19892
19873
|
rotateZ: degrees,
|
|
@@ -20125,6 +20106,14 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
|
20125
20106
|
}
|
|
20126
20107
|
};
|
|
20127
20108
|
|
|
20109
|
+
// node_modules/motion-dom/dist/es/utils/border-radius.mjs
|
|
20110
|
+
var cornerRadiusProps = [
|
|
20111
|
+
"borderTopLeftRadius",
|
|
20112
|
+
"borderTopRightRadius",
|
|
20113
|
+
"borderBottomRightRadius",
|
|
20114
|
+
"borderBottomLeftRadius"
|
|
20115
|
+
];
|
|
20116
|
+
|
|
20128
20117
|
// node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
|
|
20129
20118
|
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
20130
20119
|
if (elementOrSelector == null) {
|
|
@@ -20344,9 +20333,10 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
20344
20333
|
claimedPointerDownEvents.add(startEvent);
|
|
20345
20334
|
}
|
|
20346
20335
|
const onPressEnd = onPressStart(target, startEvent);
|
|
20336
|
+
const endEventOptions = { ...eventOptions, capture: true };
|
|
20347
20337
|
const onPointerEnd = (endEvent, success) => {
|
|
20348
|
-
window.removeEventListener("pointerup", onPointerUp);
|
|
20349
|
-
window.removeEventListener("pointercancel", onPointerCancel);
|
|
20338
|
+
window.removeEventListener("pointerup", onPointerUp, endEventOptions);
|
|
20339
|
+
window.removeEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
20350
20340
|
if (isPressing.has(target)) {
|
|
20351
20341
|
isPressing.delete(target);
|
|
20352
20342
|
}
|
|
@@ -20363,8 +20353,8 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
20363
20353
|
const onPointerCancel = (cancelEvent) => {
|
|
20364
20354
|
onPointerEnd(cancelEvent, false);
|
|
20365
20355
|
};
|
|
20366
|
-
window.addEventListener("pointerup", onPointerUp,
|
|
20367
|
-
window.addEventListener("pointercancel", onPointerCancel,
|
|
20356
|
+
window.addEventListener("pointerup", onPointerUp, endEventOptions);
|
|
20357
|
+
window.addEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
20368
20358
|
};
|
|
20369
20359
|
targets.forEach((target) => {
|
|
20370
20360
|
const pointerDownTarget = options.useGlobalTarget ? window : target;
|
|
@@ -20775,8 +20765,6 @@ var VisualElement = class {
|
|
|
20775
20765
|
removeOnChange();
|
|
20776
20766
|
if (removeSyncCheck)
|
|
20777
20767
|
removeSyncCheck();
|
|
20778
|
-
if (value.owner)
|
|
20779
|
-
value.stop();
|
|
20780
20768
|
});
|
|
20781
20769
|
}
|
|
20782
20770
|
sortNodePosition(other) {
|
|
@@ -21195,6 +21183,11 @@ function buildTransform(latestValues, transform, transformTemplate) {
|
|
|
21195
21183
|
}
|
|
21196
21184
|
}
|
|
21197
21185
|
}
|
|
21186
|
+
const pathRotation = latestValues.pathRotation;
|
|
21187
|
+
if (pathRotation) {
|
|
21188
|
+
transformIsDefault = false;
|
|
21189
|
+
transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;
|
|
21190
|
+
}
|
|
21198
21191
|
transformString = transformString.trim();
|
|
21199
21192
|
if (transformTemplate) {
|
|
21200
21193
|
transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
|
|
@@ -21302,12 +21295,7 @@ var correctBoxShadow = {
|
|
|
21302
21295
|
var scaleCorrectors = {
|
|
21303
21296
|
borderRadius: {
|
|
21304
21297
|
...correctBorderRadius,
|
|
21305
|
-
applyTo: [
|
|
21306
|
-
"borderTopLeftRadius",
|
|
21307
|
-
"borderTopRightRadius",
|
|
21308
|
-
"borderBottomLeftRadius",
|
|
21309
|
-
"borderBottomRightRadius"
|
|
21310
|
-
]
|
|
21298
|
+
applyTo: [...cornerRadiusProps]
|
|
21311
21299
|
},
|
|
21312
21300
|
borderTopLeftRadius: correctBorderRadius,
|
|
21313
21301
|
borderTopRightRadius: correctBorderRadius,
|
|
@@ -21652,7 +21640,7 @@ function createAnimationState(visualElement) {
|
|
|
21652
21640
|
continue;
|
|
21653
21641
|
let valueHasChanged = false;
|
|
21654
21642
|
if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
|
|
21655
|
-
valueHasChanged = !shallowCompare(next, prev);
|
|
21643
|
+
valueHasChanged = !shallowCompare(next, prev) || variantDidChange;
|
|
21656
21644
|
} else {
|
|
21657
21645
|
valueHasChanged = next !== prev;
|
|
21658
21646
|
}
|
|
@@ -21912,11 +21900,13 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
21912
21900
|
transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
|
|
21913
21901
|
}
|
|
21914
21902
|
if (latestTransform) {
|
|
21915
|
-
const { transformPerspective, rotate: rotate2, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
21903
|
+
const { transformPerspective, rotate: rotate2, pathRotation, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
21916
21904
|
if (transformPerspective)
|
|
21917
21905
|
transform = `perspective(${transformPerspective}px) ${transform}`;
|
|
21918
21906
|
if (rotate2)
|
|
21919
21907
|
transform += `rotate(${rotate2}deg) `;
|
|
21908
|
+
if (pathRotation)
|
|
21909
|
+
transform += `rotate(${pathRotation}deg) `;
|
|
21920
21910
|
if (rotateX)
|
|
21921
21911
|
transform += `rotateX(${rotateX}deg) `;
|
|
21922
21912
|
if (rotateY)
|
|
@@ -21935,13 +21925,7 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
21935
21925
|
}
|
|
21936
21926
|
|
|
21937
21927
|
// 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;
|
|
21928
|
+
var numBorders = cornerRadiusProps.length;
|
|
21945
21929
|
var asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
|
|
21946
21930
|
var isPx = (value) => typeof value === "number" || px.test(value);
|
|
21947
21931
|
function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
|
|
@@ -21952,7 +21936,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
21952
21936
|
target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress2);
|
|
21953
21937
|
}
|
|
21954
21938
|
for (let i = 0; i < numBorders; i++) {
|
|
21955
|
-
const borderLabel =
|
|
21939
|
+
const borderLabel = cornerRadiusProps[i];
|
|
21956
21940
|
let followRadius = getRadius(follow, borderLabel);
|
|
21957
21941
|
let leadRadius = getRadius(lead, borderLabel);
|
|
21958
21942
|
if (followRadius === void 0 && leadRadius === void 0)
|
|
@@ -21998,7 +21982,7 @@ function animateSingleValue(value, keyframes2, options) {
|
|
|
21998
21982
|
// node_modules/motion-dom/dist/es/events/add-dom-event.mjs
|
|
21999
21983
|
function addDomEvent(target, eventName, handler, options = { passive: true }) {
|
|
22000
21984
|
target.addEventListener(eventName, handler, options);
|
|
22001
|
-
return () => target.removeEventListener(eventName, handler);
|
|
21985
|
+
return () => target.removeEventListener(eventName, handler, options);
|
|
22002
21986
|
}
|
|
22003
21987
|
|
|
22004
21988
|
// node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
|
|
@@ -22306,7 +22290,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22306
22290
|
animationOptions.type = false;
|
|
22307
22291
|
}
|
|
22308
22292
|
this.startAnimation(animationOptions);
|
|
22309
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
22293
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions.path);
|
|
22310
22294
|
} else {
|
|
22311
22295
|
if (!hasLayoutChanged) {
|
|
22312
22296
|
finishAnimation(this);
|
|
@@ -22778,7 +22762,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22778
22762
|
this.projectionDelta = createDelta();
|
|
22779
22763
|
this.projectionDeltaWithTransform = createDelta();
|
|
22780
22764
|
}
|
|
22781
|
-
setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
|
|
22765
|
+
setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) {
|
|
22782
22766
|
const snapshot = this.snapshot;
|
|
22783
22767
|
const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
|
|
22784
22768
|
const mixedValues = { ...this.latestValues };
|
|
@@ -22796,10 +22780,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22796
22780
|
const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
|
|
22797
22781
|
this.animationProgress = 0;
|
|
22798
22782
|
let prevRelativeTarget;
|
|
22783
|
+
const interpolate3 = pathFn?.interpolateProjection(delta);
|
|
22799
22784
|
this.mixTargetDelta = (latest) => {
|
|
22800
22785
|
const progress2 = latest / 1e3;
|
|
22801
|
-
|
|
22802
|
-
|
|
22786
|
+
const point = interpolate3?.(progress2);
|
|
22787
|
+
if (point) {
|
|
22788
|
+
targetDelta.x.translate = point.x;
|
|
22789
|
+
targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress2);
|
|
22790
|
+
targetDelta.x.origin = delta.x.origin;
|
|
22791
|
+
targetDelta.x.originPoint = delta.x.originPoint;
|
|
22792
|
+
targetDelta.y.translate = point.y;
|
|
22793
|
+
targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress2);
|
|
22794
|
+
targetDelta.y.origin = delta.y.origin;
|
|
22795
|
+
targetDelta.y.originPoint = delta.y.originPoint;
|
|
22796
|
+
} else {
|
|
22797
|
+
mixAxisDeltaLinear(targetDelta.x, delta.x, progress2);
|
|
22798
|
+
mixAxisDeltaLinear(targetDelta.y, delta.y, progress2);
|
|
22799
|
+
}
|
|
22803
22800
|
this.setTargetDelta(targetDelta);
|
|
22804
22801
|
if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {
|
|
22805
22802
|
calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0);
|
|
@@ -22815,6 +22812,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22815
22812
|
this.animationValues = mixedValues;
|
|
22816
22813
|
mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress2, shouldCrossfadeOpacity, isOnlyMember);
|
|
22817
22814
|
}
|
|
22815
|
+
if (point && point.rotate !== void 0) {
|
|
22816
|
+
if (!this.animationValues)
|
|
22817
|
+
this.animationValues = mixedValues;
|
|
22818
|
+
this.animationValues.pathRotation = point.rotate;
|
|
22819
|
+
}
|
|
22818
22820
|
this.root.scheduleUpdateProjection();
|
|
22819
22821
|
this.scheduleRender();
|
|
22820
22822
|
this.animationProgress = progress2;
|
|
@@ -22841,8 +22843,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
22841
22843
|
this.mixTargetDelta(latest);
|
|
22842
22844
|
options.onUpdate && options.onUpdate(latest);
|
|
22843
22845
|
},
|
|
22844
|
-
onStop: () => {
|
|
22845
|
-
},
|
|
22846
22846
|
onComplete: () => {
|
|
22847
22847
|
options.onComplete && options.onComplete();
|
|
22848
22848
|
this.completeAnimation();
|
|
@@ -23171,7 +23171,7 @@ function resetSkewAndRotation(node) {
|
|
|
23171
23171
|
function removeLeadSnapshots(stack) {
|
|
23172
23172
|
stack.removeLeadSnapshot();
|
|
23173
23173
|
}
|
|
23174
|
-
function
|
|
23174
|
+
function mixAxisDeltaLinear(output, delta, p) {
|
|
23175
23175
|
output.translate = mixNumber(delta.translate, 0, p);
|
|
23176
23176
|
output.scale = mixNumber(delta.scale, 1, p);
|
|
23177
23177
|
output.origin = delta.origin;
|
|
@@ -23687,6 +23687,9 @@ function useMotionRef(visualState, visualElement, externalRef) {
|
|
|
23687
23687
|
if (instance) {
|
|
23688
23688
|
visualState.onMount?.(instance);
|
|
23689
23689
|
}
|
|
23690
|
+
if (visualElement) {
|
|
23691
|
+
instance ? visualElement.mount(instance) : visualElement.unmount();
|
|
23692
|
+
}
|
|
23690
23693
|
const ref = externalRefContainer.current;
|
|
23691
23694
|
if (typeof ref === "function") {
|
|
23692
23695
|
if (instance) {
|
|
@@ -23703,9 +23706,6 @@ function useMotionRef(visualState, visualElement, externalRef) {
|
|
|
23703
23706
|
} else if (ref) {
|
|
23704
23707
|
ref.current = instance;
|
|
23705
23708
|
}
|
|
23706
|
-
if (visualElement) {
|
|
23707
|
-
instance ? visualElement.mount(instance) : visualElement.unmount();
|
|
23708
|
-
}
|
|
23709
23709
|
}, [visualElement]);
|
|
23710
23710
|
}
|
|
23711
23711
|
var SwitchLayoutGroupContext = createContext({});
|
|
@@ -23955,7 +23955,7 @@ var ExitAnimationFeature = class extends Feature {
|
|
|
23955
23955
|
if (isPresent && prevIsPresent === false) {
|
|
23956
23956
|
if (this.isExitComplete) {
|
|
23957
23957
|
const { initial, custom } = this.node.getProps();
|
|
23958
|
-
if (typeof initial === "string") {
|
|
23958
|
+
if (typeof initial === "string" || typeof initial === "object" && initial !== null && !Array.isArray(initial)) {
|
|
23959
23959
|
const resolved = resolveVariant(this.node, initial, custom);
|
|
23960
23960
|
if (resolved) {
|
|
23961
23961
|
const { transition, transitionEnd, ...target } = resolved;
|
|
@@ -24105,7 +24105,8 @@ var PanSession = class {
|
|
|
24105
24105
|
this.history = [{ ...point, timestamp }];
|
|
24106
24106
|
const { onSessionStart } = handlers;
|
|
24107
24107
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
24108
|
-
|
|
24108
|
+
const eventOptions = { passive: true, capture: true };
|
|
24109
|
+
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
24110
|
if (element) {
|
|
24110
24111
|
this.startScrollTracking(element);
|
|
24111
24112
|
}
|
|
@@ -24518,6 +24519,10 @@ var VisualElementDragControls = class {
|
|
|
24518
24519
|
const { projection } = this.visualElement;
|
|
24519
24520
|
if (!projection || !projection.layout)
|
|
24520
24521
|
return false;
|
|
24522
|
+
if (projection.root) {
|
|
24523
|
+
projection.root.scroll = void 0;
|
|
24524
|
+
projection.root.updateScroll();
|
|
24525
|
+
}
|
|
24521
24526
|
const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
|
|
24522
24527
|
let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
|
|
24523
24528
|
if (onMeasureDragConstraints) {
|
|
@@ -24574,7 +24579,7 @@ var VisualElementDragControls = class {
|
|
|
24574
24579
|
const dragKey = `_drag${axis.toUpperCase()}`;
|
|
24575
24580
|
const props = this.visualElement.getProps();
|
|
24576
24581
|
const externalMotionValue = props[dragKey];
|
|
24577
|
-
return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis,
|
|
24582
|
+
return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);
|
|
24578
24583
|
}
|
|
24579
24584
|
snapToCursor(point) {
|
|
24580
24585
|
eachAxis((axis) => {
|
|
@@ -26135,7 +26140,7 @@ function NSWCard({
|
|
|
26135
26140
|
{
|
|
26136
26141
|
className: cn(
|
|
26137
26142
|
"h-full rounded-[inherit] border border-(--nsw-card-border)",
|
|
26138
|
-
hasImage && "
|
|
26143
|
+
hasImage && "rounded-t-none border-t-0"
|
|
26139
26144
|
),
|
|
26140
26145
|
children: /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
|
|
26141
26146
|
}
|
|
@@ -26147,7 +26152,7 @@ function NSWCard({
|
|
|
26147
26152
|
{
|
|
26148
26153
|
className: cn(
|
|
26149
26154
|
"flex h-full flex-col rounded-[inherit] border border-(--nsw-card-border) p-8",
|
|
26150
|
-
hasImage && "
|
|
26155
|
+
hasImage && "rounded-t-none border-t-0"
|
|
26151
26156
|
),
|
|
26152
26157
|
children: bodyChildren
|
|
26153
26158
|
}
|
|
@@ -26820,18 +26825,18 @@ function Skeleton({ className, ...props }) {
|
|
|
26820
26825
|
);
|
|
26821
26826
|
}
|
|
26822
26827
|
var MOBILE_BREAKPOINT = 768;
|
|
26828
|
+
function subscribeToViewport(callback) {
|
|
26829
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
26830
|
+
mql.addEventListener("change", callback);
|
|
26831
|
+
return () => mql.removeEventListener("change", callback);
|
|
26832
|
+
}
|
|
26823
26833
|
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;
|
|
26834
|
+
return React5.useSyncExternalStore(
|
|
26835
|
+
subscribeToViewport,
|
|
26836
|
+
() => window.innerWidth < MOBILE_BREAKPOINT,
|
|
26837
|
+
// No viewport on the server — match the old `undefined → false` default.
|
|
26838
|
+
() => false
|
|
26839
|
+
);
|
|
26835
26840
|
}
|
|
26836
26841
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
26837
26842
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -27228,7 +27233,7 @@ var sidebarMenuButtonVariants = cva(
|
|
|
27228
27233
|
variants: {
|
|
27229
27234
|
variant: {
|
|
27230
27235
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
27231
|
-
outline: "bg-background shadow-[
|
|
27236
|
+
outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
|
|
27232
27237
|
},
|
|
27233
27238
|
size: {
|
|
27234
27239
|
default: "h-8 text-sm",
|
|
@@ -29504,12 +29509,12 @@ var CodeBlock = ({
|
|
|
29504
29509
|
margin: 0,
|
|
29505
29510
|
padding: "1rem",
|
|
29506
29511
|
fontSize: "0.875rem",
|
|
29507
|
-
background: "
|
|
29508
|
-
color: "
|
|
29512
|
+
background: "var(--background)",
|
|
29513
|
+
color: "var(--foreground)"
|
|
29509
29514
|
},
|
|
29510
29515
|
language,
|
|
29511
29516
|
lineNumberStyle: {
|
|
29512
|
-
color: "
|
|
29517
|
+
color: "var(--muted-foreground)",
|
|
29513
29518
|
paddingRight: "1rem",
|
|
29514
29519
|
minWidth: "2.5rem"
|
|
29515
29520
|
},
|
|
@@ -29529,12 +29534,12 @@ var CodeBlock = ({
|
|
|
29529
29534
|
margin: 0,
|
|
29530
29535
|
padding: "1rem",
|
|
29531
29536
|
fontSize: "0.875rem",
|
|
29532
|
-
background: "
|
|
29533
|
-
color: "
|
|
29537
|
+
background: "var(--background)",
|
|
29538
|
+
color: "var(--foreground)"
|
|
29534
29539
|
},
|
|
29535
29540
|
language,
|
|
29536
29541
|
lineNumberStyle: {
|
|
29537
|
-
color: "
|
|
29542
|
+
color: "var(--muted-foreground)",
|
|
29538
29543
|
paddingRight: "1rem",
|
|
29539
29544
|
minWidth: "2.5rem"
|
|
29540
29545
|
},
|
|
@@ -30570,13 +30575,19 @@ var POOL_SIZE_MULTIPLIER = 128;
|
|
|
30570
30575
|
var pool;
|
|
30571
30576
|
var poolOffset;
|
|
30572
30577
|
var fillPool = (bytes) => {
|
|
30573
|
-
if (
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
|
|
30579
|
-
poolOffset
|
|
30578
|
+
if (bytes < 0) throw new RangeError("Wrong ID size");
|
|
30579
|
+
try {
|
|
30580
|
+
if (!pool || pool.length < bytes) {
|
|
30581
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
30582
|
+
crypto.randomFillSync(pool);
|
|
30583
|
+
poolOffset = 0;
|
|
30584
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
30585
|
+
crypto.randomFillSync(pool);
|
|
30586
|
+
poolOffset = 0;
|
|
30587
|
+
}
|
|
30588
|
+
} catch (e) {
|
|
30589
|
+
pool = void 0;
|
|
30590
|
+
throw e;
|
|
30580
30591
|
}
|
|
30581
30592
|
poolOffset += bytes;
|
|
30582
30593
|
};
|