likec4 1.0.1 → 1.0.2
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/__app__/src/lib/webcomponent.mjs +84 -66
- package/dist/__app__/src/{main-DocCFjZN.js → main-DDd-kcC2.js} +83 -67
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/src/{view._viewId.d2.lazy-D9gktAvw.js → view._viewId.d2.lazy-DTd-VfOz.js} +2 -2
- package/dist/__app__/src/{view._viewId.dot.lazy-DDXp1Pjx.js → view._viewId.dot.lazy-DC6I8DnA.js} +2 -2
- package/dist/__app__/src/{view._viewId.mmd.lazy-AyTROblc.js → view._viewId.mmd.lazy-CkKTxoM5.js} +2 -2
- package/dist/__app__/src/{view._viewId.react-legacy.lazy-Cr471Itv.js → view._viewId.react-legacy.lazy-D82hW8RW.js} +1 -1
- package/dist/__app__/src/{view_viewId_.css-BK6d3HCZ.js → view_viewId_.css-Dhp7OfYa.js} +1 -1
- package/dist/cli/index.mjs +1 -1
- package/package.json +11 -11
- package/react/index.mjs +80 -64
|
@@ -10689,7 +10689,7 @@ function getStyle({
|
|
|
10689
10689
|
};
|
|
10690
10690
|
}
|
|
10691
10691
|
function useStylesTransform({ props, stylesCtx, themeName }) {
|
|
10692
|
-
const theme2 = useMantineTheme(), stylesTransform = useMantineStylesTransform();
|
|
10692
|
+
const theme2 = useMantineTheme(), stylesTransform = useMantineStylesTransform()?.();
|
|
10693
10693
|
return {
|
|
10694
10694
|
getTransformedStyles: (styles) => stylesTransform ? [
|
|
10695
10695
|
...styles.map(
|
|
@@ -10759,22 +10759,22 @@ function useStyles({
|
|
|
10759
10759
|
function getAutoContrastValue(autoContrast, theme2) {
|
|
10760
10760
|
return typeof autoContrast == "boolean" ? autoContrast : theme2.autoContrast;
|
|
10761
10761
|
}
|
|
10762
|
-
function disableTransition() {
|
|
10762
|
+
function disableTransition(nonce) {
|
|
10763
10763
|
const style2 = document.createElement("style");
|
|
10764
|
-
return style2.innerHTML = "*, *::before, *::after {transition: none !important;}", style2.setAttribute("data-mantine-disable-transition", "true"), document.head.appendChild(style2), () => document.querySelectorAll("[data-mantine-disable-transition]").forEach((element) => element.remove());
|
|
10764
|
+
return style2.setAttribute("data-mantine-styles", "inline"), style2.innerHTML = "*, *::before, *::after {transition: none !important;}", style2.setAttribute("data-mantine-disable-transition", "true"), nonce && style2.setAttribute("nonce", nonce), document.head.appendChild(style2), () => document.querySelectorAll("[data-mantine-disable-transition]").forEach((element) => element.remove());
|
|
10765
10765
|
}
|
|
10766
10766
|
function useMantineColorScheme({ keepTransitions } = {}) {
|
|
10767
|
-
const clearStylesRef = reactExports.useRef(), timeoutRef = reactExports.useRef(), ctx = reactExports.useContext(MantineContext);
|
|
10767
|
+
const clearStylesRef = reactExports.useRef(), timeoutRef = reactExports.useRef(), ctx = reactExports.useContext(MantineContext), nonce = useMantineStyleNonce(), nonceValue = reactExports.useRef(nonce?.());
|
|
10768
10768
|
if (!ctx)
|
|
10769
10769
|
throw new Error("[@mantine/core] MantineProvider was not found in tree");
|
|
10770
10770
|
const setColorScheme = (value) => {
|
|
10771
10771
|
ctx.setColorScheme(value), clearStylesRef.current = keepTransitions ? () => {
|
|
10772
|
-
} : disableTransition(), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
|
|
10772
|
+
} : disableTransition(nonceValue.current), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
|
|
10773
10773
|
clearStylesRef.current?.();
|
|
10774
10774
|
}, 10);
|
|
10775
10775
|
}, clearColorScheme = () => {
|
|
10776
10776
|
ctx.clearColorScheme(), clearStylesRef.current = keepTransitions ? () => {
|
|
10777
|
-
} : disableTransition(), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
|
|
10777
|
+
} : disableTransition(nonceValue.current), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
|
|
10778
10778
|
clearStylesRef.current?.();
|
|
10779
10779
|
}, 10);
|
|
10780
10780
|
}, osColorScheme = useColorScheme("light", { getInitialValueInEffect: !1 }), computedColorScheme = ctx.colorScheme === "auto" ? osColorScheme : ctx.colorScheme, toggleColorScheme = reactExports.useCallback(
|
|
@@ -11158,7 +11158,7 @@ const _Box = reactExports.forwardRef(
|
|
|
11158
11158
|
renderRoot,
|
|
11159
11159
|
...others
|
|
11160
11160
|
}, ref) => {
|
|
11161
|
-
const theme2 = useMantineTheme(), Element2 = component || "div", { styleProps, rest } = extractStyleProps(others), transformedSx = useMantineSxTransform()?.(styleProps.sx), responsiveClassName = useRandomClassName(), parsedStyleProps = parseStyleProps({
|
|
11161
|
+
const theme2 = useMantineTheme(), Element2 = component || "div", { styleProps, rest } = extractStyleProps(others), transformedSx = useMantineSxTransform()?.()?.(styleProps.sx), responsiveClassName = useRandomClassName(), parsedStyleProps = parseStyleProps({
|
|
11162
11162
|
styleProps,
|
|
11163
11163
|
theme: theme2,
|
|
11164
11164
|
data: STYlE_PROPS_DATA
|
|
@@ -15071,7 +15071,7 @@ function useModal({
|
|
|
15071
15071
|
return useWindowEvent(
|
|
15072
15072
|
"keydown",
|
|
15073
15073
|
(event) => {
|
|
15074
|
-
event.key === "Escape" && closeOnEscape2 && event.target?.getAttribute("data-mantine-stop-propagation") !== "true" && onClose();
|
|
15074
|
+
event.key === "Escape" && closeOnEscape2 && opened && event.target?.getAttribute("data-mantine-stop-propagation") !== "true" && onClose();
|
|
15075
15075
|
},
|
|
15076
15076
|
{ capture: !0 }
|
|
15077
15077
|
), useFocusReturn({ opened, shouldReturnFocus: trapFocus && returnFocus }), {
|
|
@@ -15483,8 +15483,8 @@ const defaultProps$$ = {}, InputPlaceholder = factory((_props, ref) => {
|
|
|
15483
15483
|
InputPlaceholder.classes = classes$k;
|
|
15484
15484
|
InputPlaceholder.displayName = "@mantine/core/InputPlaceholder";
|
|
15485
15485
|
function getInputOffsets(inputWrapperOrder, { hasDescription, hasError }) {
|
|
15486
|
-
const inputIndex = inputWrapperOrder.findIndex((part) => part === "input"), aboveInput = inputWrapperOrder
|
|
15487
|
-
return { offsetBottom: hasDescription && belowInput
|
|
15486
|
+
const inputIndex = inputWrapperOrder.findIndex((part) => part === "input"), aboveInput = inputWrapperOrder.slice(0, inputIndex), belowInput = inputWrapperOrder.slice(inputIndex + 1), offsetTop = hasDescription && aboveInput.includes("description") || hasError && aboveInput.includes("error");
|
|
15487
|
+
return { offsetBottom: hasDescription && belowInput.includes("description") || hasError && belowInput.includes("error"), offsetTop };
|
|
15488
15488
|
}
|
|
15489
15489
|
const defaultProps$_ = {
|
|
15490
15490
|
labelElement: "label",
|
|
@@ -16867,7 +16867,8 @@ function OptionsDropdown({
|
|
|
16867
16867
|
unstyled,
|
|
16868
16868
|
labelId,
|
|
16869
16869
|
renderOption,
|
|
16870
|
-
scrollAreaProps
|
|
16870
|
+
scrollAreaProps,
|
|
16871
|
+
"aria-label": ariaLabel
|
|
16871
16872
|
}) {
|
|
16872
16873
|
validateOptions(data);
|
|
16873
16874
|
const filteredData = typeof search == "string" ? (filter2 || defaultOptionsFilter)({
|
|
@@ -16886,7 +16887,7 @@ function OptionsDropdown({
|
|
|
16886
16887
|
},
|
|
16887
16888
|
isOptionsGroup(item) ? item.group : item.value
|
|
16888
16889
|
));
|
|
16889
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Combobox.Dropdown, { hidden: hidden2 || hiddenWhenEmpty && isEmpty2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Combobox.Options, { labelledBy: labelId, children: [
|
|
16890
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Combobox.Dropdown, { hidden: hidden2 || hiddenWhenEmpty && isEmpty2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Combobox.Options, { labelledBy: labelId, "aria-label": ariaLabel, children: [
|
|
16890
16891
|
withScrollArea ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
16891
16892
|
ScrollArea.Autosize,
|
|
16892
16893
|
{
|
|
@@ -18602,7 +18603,8 @@ const defaultProps$6 = {
|
|
|
18602
18603
|
withCheckIcon,
|
|
18603
18604
|
nothingFoundMessage,
|
|
18604
18605
|
unstyled,
|
|
18605
|
-
labelId: `${_id}-label
|
|
18606
|
+
labelId: others.label ? `${_id}-label` : void 0,
|
|
18607
|
+
"aria-label": others.label ? void 0 : others["aria-label"],
|
|
18606
18608
|
renderOption,
|
|
18607
18609
|
scrollAreaProps
|
|
18608
18610
|
}
|
|
@@ -29009,8 +29011,22 @@ function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
|
29009
29011
|
}
|
|
29010
29012
|
return newValues;
|
|
29011
29013
|
}
|
|
29012
|
-
function
|
|
29013
|
-
|
|
29014
|
+
function getValueState(visualElement) {
|
|
29015
|
+
const state = [{}, {}];
|
|
29016
|
+
return visualElement?.values.forEach((value, key) => {
|
|
29017
|
+
state[0][key] = value.get(), state[1][key] = value.getVelocity();
|
|
29018
|
+
}), state;
|
|
29019
|
+
}
|
|
29020
|
+
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
|
29021
|
+
if (typeof definition == "function") {
|
|
29022
|
+
const [current, velocity] = getValueState(visualElement);
|
|
29023
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
29024
|
+
}
|
|
29025
|
+
if (typeof definition == "string" && (definition = props.variants && props.variants[definition]), typeof definition == "function") {
|
|
29026
|
+
const [current, velocity] = getValueState(visualElement);
|
|
29027
|
+
definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
|
|
29028
|
+
}
|
|
29029
|
+
return definition;
|
|
29014
29030
|
}
|
|
29015
29031
|
function useConstant(init2) {
|
|
29016
29032
|
const ref = reactExports.useRef(null);
|
|
@@ -29154,7 +29170,7 @@ function addHoverEvent(node, isActive) {
|
|
|
29154
29170
|
const props = node.getProps();
|
|
29155
29171
|
node.animationState && props.whileHover && node.animationState.setActive("whileHover", isActive);
|
|
29156
29172
|
const callback = props[callbackName];
|
|
29157
|
-
callback && callback(event, info);
|
|
29173
|
+
callback && frame.postRender(() => callback(event, info));
|
|
29158
29174
|
};
|
|
29159
29175
|
return addPointerEvent(node.current, eventName, handleEvent, {
|
|
29160
29176
|
passive: !node.getProps()[callbackName]
|
|
@@ -29205,8 +29221,8 @@ class PressGesture extends Feature {
|
|
|
29205
29221
|
const props = this.node.getProps(), removePointerUpListener = addPointerEvent(window, "pointerup", (endEvent, endInfo) => {
|
|
29206
29222
|
if (!this.checkPressEnd())
|
|
29207
29223
|
return;
|
|
29208
|
-
const { onTap, onTapCancel, globalTapTarget } = this.node.getProps();
|
|
29209
|
-
|
|
29224
|
+
const { onTap, onTapCancel, globalTapTarget } = this.node.getProps(), handler = !globalTapTarget && !isNodeOrChild(this.node.current, endEvent.target) ? onTapCancel : onTap;
|
|
29225
|
+
handler && frame.update(() => handler(endEvent, endInfo));
|
|
29210
29226
|
}, {
|
|
29211
29227
|
passive: !(props.onTap || props.onPointerUp)
|
|
29212
29228
|
}), removePointerCancelListener = addPointerEvent(window, "pointercancel", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {
|
|
@@ -29220,7 +29236,7 @@ class PressGesture extends Feature {
|
|
|
29220
29236
|
const handleKeyup = (keyupEvent) => {
|
|
29221
29237
|
keyupEvent.key !== "Enter" || !this.checkPressEnd() || fireSyntheticPointerEvent("up", (event, info) => {
|
|
29222
29238
|
const { onTap } = this.node.getProps();
|
|
29223
|
-
onTap && onTap(event, info);
|
|
29239
|
+
onTap && frame.postRender(() => onTap(event, info));
|
|
29224
29240
|
});
|
|
29225
29241
|
};
|
|
29226
29242
|
this.removeEndListeners(), this.removeEndListeners = addDomEvent(this.node.current, "keyup", handleKeyup), fireSyntheticPointerEvent("down", (event, info) => {
|
|
@@ -29235,7 +29251,7 @@ class PressGesture extends Feature {
|
|
|
29235
29251
|
startPress(event, info) {
|
|
29236
29252
|
this.isPressing = !0;
|
|
29237
29253
|
const { onTapStart, whileTap } = this.node.getProps();
|
|
29238
|
-
whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !0), onTapStart && onTapStart(event, info);
|
|
29254
|
+
whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !0), onTapStart && frame.postRender(() => onTapStart(event, info));
|
|
29239
29255
|
}
|
|
29240
29256
|
checkPressEnd() {
|
|
29241
29257
|
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !isDragActive();
|
|
@@ -29244,7 +29260,7 @@ class PressGesture extends Feature {
|
|
|
29244
29260
|
if (!this.checkPressEnd())
|
|
29245
29261
|
return;
|
|
29246
29262
|
const { onTapCancel } = this.node.getProps();
|
|
29247
|
-
onTapCancel && onTapCancel(event, info);
|
|
29263
|
+
onTapCancel && frame.postRender(() => onTapCancel(event, info));
|
|
29248
29264
|
}
|
|
29249
29265
|
mount() {
|
|
29250
29266
|
const props = this.node.getProps(), removePointerListener = addPointerEvent(props.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, {
|
|
@@ -29338,17 +29354,9 @@ function shallowCompare(next, prev) {
|
|
|
29338
29354
|
return !1;
|
|
29339
29355
|
return !0;
|
|
29340
29356
|
}
|
|
29341
|
-
function getCurrent(visualElement) {
|
|
29342
|
-
const current = {};
|
|
29343
|
-
return visualElement.values.forEach((value, key) => current[key] = value.get()), current;
|
|
29344
|
-
}
|
|
29345
|
-
function getVelocity$1(visualElement) {
|
|
29346
|
-
const velocity = {};
|
|
29347
|
-
return visualElement.values.forEach((value, key) => velocity[key] = value.getVelocity()), velocity;
|
|
29348
|
-
}
|
|
29349
29357
|
function resolveVariant(visualElement, definition, custom) {
|
|
29350
29358
|
const props = visualElement.getProps();
|
|
29351
|
-
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom,
|
|
29359
|
+
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
29352
29360
|
}
|
|
29353
29361
|
const secondsToMilliseconds = (seconds) => seconds * 1e3, millisecondsToSeconds = (milliseconds) => milliseconds / 1e3, underDampedSpring = {
|
|
29354
29362
|
type: "spring",
|
|
@@ -29650,10 +29658,13 @@ function getAnimatableNone(key, value) {
|
|
|
29650
29658
|
let defaultValueType = getDefaultValueType(key);
|
|
29651
29659
|
return defaultValueType !== filter && (defaultValueType = complex), defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : void 0;
|
|
29652
29660
|
}
|
|
29661
|
+
const invalidTemplates = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
29653
29662
|
function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
|
|
29654
29663
|
let i2 = 0, animatableTemplate;
|
|
29655
|
-
for (; i2 < unresolvedKeyframes.length && !animatableTemplate; )
|
|
29656
|
-
|
|
29664
|
+
for (; i2 < unresolvedKeyframes.length && !animatableTemplate; ) {
|
|
29665
|
+
const keyframe = unresolvedKeyframes[i2];
|
|
29666
|
+
typeof keyframe == "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length && (animatableTemplate = unresolvedKeyframes[i2]), i2++;
|
|
29667
|
+
}
|
|
29657
29668
|
if (animatableTemplate && name)
|
|
29658
29669
|
for (const noneIndex of noneKeyframeIndexes)
|
|
29659
29670
|
unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
|
|
@@ -29674,8 +29685,8 @@ class DOMKeyframesResolver extends KeyframeResolver {
|
|
|
29674
29685
|
resolved !== void 0 && (unresolvedKeyframes[i2] = resolved), i2 === unresolvedKeyframes.length - 1 && (this.finalKeyframe = keyframe);
|
|
29675
29686
|
}
|
|
29676
29687
|
}
|
|
29677
|
-
if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2)
|
|
29678
|
-
return
|
|
29688
|
+
if (this.resolveNoneKeyframes(), !positionalKeys.has(name) || unresolvedKeyframes.length !== 2)
|
|
29689
|
+
return;
|
|
29679
29690
|
const [origin, target] = unresolvedKeyframes, originType = findDimensionValueType(origin), targetType = findDimensionValueType(target);
|
|
29680
29691
|
if (originType !== targetType)
|
|
29681
29692
|
if (isNumOrPxType(originType) && isNumOrPxType(targetType))
|
|
@@ -29732,6 +29743,8 @@ function canAnimate(keyframes2, name, type, velocity) {
|
|
|
29732
29743
|
const originKeyframe = keyframes2[0];
|
|
29733
29744
|
if (originKeyframe === null)
|
|
29734
29745
|
return !1;
|
|
29746
|
+
if (name === "display" || name === "visibility")
|
|
29747
|
+
return !0;
|
|
29735
29748
|
const targetKeyframe = keyframes2[keyframes2.length - 1], isOriginAnimatable = isAnimatable(originKeyframe, name), isTargetAnimatable = isAnimatable(targetKeyframe, name);
|
|
29736
29749
|
return !isOriginAnimatable || !isTargetAnimatable ? !1 : hasKeyframesChanged(keyframes2) || type === "spring" && velocity;
|
|
29737
29750
|
}
|
|
@@ -30005,7 +30018,10 @@ function asRGBA(color2) {
|
|
|
30005
30018
|
const mixColor = (from, to) => {
|
|
30006
30019
|
const fromRGBA = asRGBA(from), toRGBA = asRGBA(to), blended = { ...fromRGBA };
|
|
30007
30020
|
return (v2) => (blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v2), blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v2), blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v2), blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v2), rgba.transform(blended));
|
|
30008
|
-
};
|
|
30021
|
+
}, invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
30022
|
+
function mixVisibility(origin, target) {
|
|
30023
|
+
return invisibleValues.has(origin) ? (p2) => p2 <= 0 ? origin : target : (p2) => p2 >= 1 ? target : origin;
|
|
30024
|
+
}
|
|
30009
30025
|
function mixImmediate(a, b2) {
|
|
30010
30026
|
return (p2) => p2 > 0 ? b2 : a;
|
|
30011
30027
|
}
|
|
@@ -30044,7 +30060,7 @@ function matchOrder(origin, target) {
|
|
|
30044
30060
|
}
|
|
30045
30061
|
const mixComplex = (origin, target) => {
|
|
30046
30062
|
const template = complex.createTransformer(target), originStats = analyseComplexValue(origin), targetStats = analyseComplexValue(target);
|
|
30047
|
-
return originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length ? pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template) : mixImmediate(origin, target);
|
|
30063
|
+
return originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length ? invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length ? mixVisibility(origin, target) : pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template) : mixImmediate(origin, target);
|
|
30048
30064
|
};
|
|
30049
30065
|
function mix(from, to, p2) {
|
|
30050
30066
|
return typeof from == "number" && typeof to == "number" && typeof p2 == "number" ? mixNumber$1(from, to, p2) : getMixer(from)(from, to);
|
|
@@ -30550,13 +30566,13 @@ class MotionValue {
|
|
|
30550
30566
|
* @internal
|
|
30551
30567
|
*/
|
|
30552
30568
|
constructor(init2, options = {}) {
|
|
30553
|
-
this.version = "11.
|
|
30569
|
+
this.version = "11.2.4", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
|
|
30554
30570
|
const currentTime = time.now();
|
|
30555
30571
|
this.updatedAt !== currentTime && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(v2), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), render && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
30556
|
-
}, this.hasAnimated = !1, this.setCurrent(init2), this.
|
|
30572
|
+
}, this.hasAnimated = !1, this.setCurrent(init2), this.owner = options.owner;
|
|
30557
30573
|
}
|
|
30558
30574
|
setCurrent(current) {
|
|
30559
|
-
this.current = current, this.updatedAt = time.now();
|
|
30575
|
+
this.current = current, this.updatedAt = time.now(), this.canTrackVelocity === null && current !== void 0 && (this.canTrackVelocity = isFloat(this.current));
|
|
30560
30576
|
}
|
|
30561
30577
|
setPrevFrameValue(prevFrameValue = this.current) {
|
|
30562
30578
|
this.prevFrameValue = prevFrameValue, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -30772,7 +30788,7 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
30772
30788
|
if (window.HandoffAppearAnimations) {
|
|
30773
30789
|
const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
|
|
30774
30790
|
if (appearId) {
|
|
30775
|
-
const elapsed = window.HandoffAppearAnimations(appearId, key);
|
|
30791
|
+
const elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
|
|
30776
30792
|
elapsed !== null && (valueTransition.elapsed = elapsed, isHandoff = !0);
|
|
30777
30793
|
}
|
|
30778
30794
|
}
|
|
@@ -31274,7 +31290,7 @@ class VisualElementDragControls {
|
|
|
31274
31290
|
}
|
|
31275
31291
|
}
|
|
31276
31292
|
this.originPoint[axis] = current;
|
|
31277
|
-
}), onDragStart && onDragStart(event, info);
|
|
31293
|
+
}), onDragStart && frame.postRender(() => onDragStart(event, info));
|
|
31278
31294
|
const { animationState } = this.visualElement;
|
|
31279
31295
|
animationState && animationState.setActive("whileDrag", !0);
|
|
31280
31296
|
}, onMove = (event, info) => {
|
|
@@ -31310,7 +31326,7 @@ class VisualElementDragControls {
|
|
|
31310
31326
|
const { velocity } = info;
|
|
31311
31327
|
this.startAnimation(velocity);
|
|
31312
31328
|
const { onDragEnd } = this.getProps();
|
|
31313
|
-
onDragEnd && onDragEnd(event, info);
|
|
31329
|
+
onDragEnd && frame.postRender(() => onDragEnd(event, info));
|
|
31314
31330
|
}
|
|
31315
31331
|
cancel() {
|
|
31316
31332
|
this.isDragging = !1;
|
|
@@ -31492,7 +31508,7 @@ class DragGesture extends Feature {
|
|
|
31492
31508
|
}
|
|
31493
31509
|
}
|
|
31494
31510
|
const asyncHandler = (handler) => (event, info) => {
|
|
31495
|
-
handler && handler(event, info);
|
|
31511
|
+
handler && frame.postRender(() => handler(event, info));
|
|
31496
31512
|
};
|
|
31497
31513
|
class PanGesture extends Feature {
|
|
31498
31514
|
constructor() {
|
|
@@ -31511,7 +31527,7 @@ class PanGesture extends Feature {
|
|
|
31511
31527
|
onStart: asyncHandler(onPanStart),
|
|
31512
31528
|
onMove: onPan,
|
|
31513
31529
|
onEnd: (event, info) => {
|
|
31514
|
-
delete this.session, onPanEnd && onPanEnd(event, info);
|
|
31530
|
+
delete this.session, onPanEnd && frame.postRender(() => onPanEnd(event, info));
|
|
31515
31531
|
}
|
|
31516
31532
|
};
|
|
31517
31533
|
}
|
|
@@ -33235,7 +33251,9 @@ function toDomPrecision(v2) {
|
|
|
33235
33251
|
return v2 === null ? 0.01 : Math.round(v2 * 100) / 100;
|
|
33236
33252
|
}
|
|
33237
33253
|
const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object.is(a.parentId, b2.parentId), SyncWithDiagram = reactExports.memo(() => {
|
|
33238
|
-
const
|
|
33254
|
+
const _xyflow = useXYFlow(), xyflowRef = reactExports.useRef(_xyflow);
|
|
33255
|
+
xyflowRef.current = _xyflow;
|
|
33256
|
+
const xyflowApi = useXYStoreApi(), diagramStoreApi = useDiagramStoreApi();
|
|
33239
33257
|
return reactExports.useEffect(() => diagramStoreApi.subscribe(
|
|
33240
33258
|
// selector
|
|
33241
33259
|
(state) => ({
|
|
@@ -33248,7 +33266,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
|
|
|
33248
33266
|
// listener
|
|
33249
33267
|
({ viewId, nodes, edges, ...opts }) => {
|
|
33250
33268
|
const { lastOnNavigate } = diagramStoreApi.getState(), updates = diagramViewToXYFlowData({ nodes, edges }, opts);
|
|
33251
|
-
if (
|
|
33269
|
+
if (xyflowRef.current.setNodes(
|
|
33252
33270
|
(prev) => updates.nodes.map((update) => {
|
|
33253
33271
|
const existing = prev.find(isSameNode(update));
|
|
33254
33272
|
return existing ? deepEqual(existing.data.element, update.data.element) ? existing : {
|
|
@@ -33256,7 +33274,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
|
|
|
33256
33274
|
...update
|
|
33257
33275
|
} : update;
|
|
33258
33276
|
})
|
|
33259
|
-
),
|
|
33277
|
+
), xyflowRef.current.setEdges(
|
|
33260
33278
|
(prev) => updates.edges.map((update) => {
|
|
33261
33279
|
const existing = prev.find((e2) => e2.id === update.id);
|
|
33262
33280
|
return existing ? deepEqual(existing.data, update.data) ? existing : {
|
|
@@ -33269,22 +33287,20 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
|
|
|
33269
33287
|
if (elTo) {
|
|
33270
33288
|
const centerFrom = lastOnNavigate.elementCenterScreenPosition, nextZoom = Math.min(elFrom.width / elTo.width, elFrom.height / elTo.height);
|
|
33271
33289
|
requestAnimationFrame(() => {
|
|
33272
|
-
|
|
33273
|
-
|
|
33274
|
-
|
|
33275
|
-
|
|
33276
|
-
|
|
33277
|
-
zoom: nextZoom
|
|
33278
|
-
});
|
|
33279
|
-
const centerTo = xyflow.flowToScreenPosition({
|
|
33280
|
-
x: elTo.position[0] + elTo.width / 2,
|
|
33281
|
-
y: elTo.position[1] + elTo.height / 2
|
|
33282
|
-
}), diff = {
|
|
33283
|
-
x: toDomPrecision(centerFrom.x - centerTo.x),
|
|
33284
|
-
y: toDomPrecision(centerFrom.y - centerTo.y)
|
|
33285
|
-
};
|
|
33286
|
-
xyflowApi.getState().panBy(diff);
|
|
33290
|
+
const v2 = xyflowRef.current.getViewport();
|
|
33291
|
+
nextZoom < v2.zoom && xyflowRef.current.setViewport({
|
|
33292
|
+
x: v2.x,
|
|
33293
|
+
y: v2.y,
|
|
33294
|
+
zoom: nextZoom
|
|
33287
33295
|
});
|
|
33296
|
+
const centerTo = xyflowRef.current.flowToScreenPosition({
|
|
33297
|
+
x: elTo.position[0] + elTo.width / 2,
|
|
33298
|
+
y: elTo.position[1] + elTo.height / 2
|
|
33299
|
+
}), diff = {
|
|
33300
|
+
x: toDomPrecision(centerFrom.x - centerTo.x),
|
|
33301
|
+
y: toDomPrecision(centerFrom.y - centerTo.y)
|
|
33302
|
+
};
|
|
33303
|
+
xyflowApi.getState().panBy(diff);
|
|
33288
33304
|
});
|
|
33289
33305
|
}
|
|
33290
33306
|
diagramStoreApi.setState(
|
|
@@ -33302,7 +33318,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
|
|
|
33302
33318
|
{
|
|
33303
33319
|
equalityFn: shallowEqual
|
|
33304
33320
|
}
|
|
33305
|
-
), [
|
|
33321
|
+
), [xyflowApi, diagramStoreApi]), null;
|
|
33306
33322
|
});
|
|
33307
33323
|
function getVarName(variable) {
|
|
33308
33324
|
var matches = variable.match(/^var\((.*)\)$/);
|
|
@@ -37037,22 +37053,22 @@ const ViewViewIdReactLegacyLazyImport = createFileRoute(
|
|
|
37037
37053
|
path: "/react-legacy",
|
|
37038
37054
|
getParentRoute: () => ViewViewIdRoute
|
|
37039
37055
|
}).lazy(
|
|
37040
|
-
() => import("./view._viewId.react-legacy.lazy-
|
|
37056
|
+
() => import("./view._viewId.react-legacy.lazy-D82hW8RW.js").then((d2) => d2.Route)
|
|
37041
37057
|
), ViewViewIdMmdLazyRoute = ViewViewIdMmdLazyImport.update({
|
|
37042
37058
|
path: "/mmd",
|
|
37043
37059
|
getParentRoute: () => ViewViewIdRoute
|
|
37044
37060
|
}).lazy(
|
|
37045
|
-
() => import("./view._viewId.mmd.lazy-
|
|
37061
|
+
() => import("./view._viewId.mmd.lazy-CkKTxoM5.js").then((d2) => d2.Route)
|
|
37046
37062
|
), ViewViewIdDotLazyRoute = ViewViewIdDotLazyImport.update({
|
|
37047
37063
|
path: "/dot",
|
|
37048
37064
|
getParentRoute: () => ViewViewIdRoute
|
|
37049
37065
|
}).lazy(
|
|
37050
|
-
() => import("./view._viewId.dot.lazy-
|
|
37066
|
+
() => import("./view._viewId.dot.lazy-DC6I8DnA.js").then((d2) => d2.Route)
|
|
37051
37067
|
), ViewViewIdD2LazyRoute = ViewViewIdD2LazyImport.update({
|
|
37052
37068
|
path: "/d2",
|
|
37053
37069
|
getParentRoute: () => ViewViewIdRoute
|
|
37054
37070
|
}).lazy(
|
|
37055
|
-
() => import("./view._viewId.d2.lazy-
|
|
37071
|
+
() => import("./view._viewId.d2.lazy-DTd-VfOz.js").then((d2) => d2.Route)
|
|
37056
37072
|
), ViewViewIdEditorRoute = Route2.update({
|
|
37057
37073
|
path: "/editor",
|
|
37058
37074
|
getParentRoute: () => ViewViewIdRoute
|
package/dist/__app__/src/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./main-
|
|
1
|
+
import "./main-DDd-kcC2.js";
|