likec4 1.3.0 → 1.4.0
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__/react/likec4.tsx +11 -13
- package/dist/__app__/src/lib/webcomponent.mjs +522 -275
- package/dist/__app__/src/main.mjs +844 -726
- package/dist/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +169 -169
- package/package.json +15 -15
- package/react/LikeC4Browser.css.d.ts +1 -2
- package/react/LikeC4Browser.d.ts +1 -1
- package/react/LikeC4ViewElement.d.ts +1 -1
- package/react/ShadowRoot.d.ts +1 -3
- package/react/ShadowRootMantineProvider.d.ts +7 -0
- package/react/index.mjs +1050 -1623
- package/react/styles.d.ts +3 -2
- package/react/types.d.ts +0 -4
|
@@ -5692,9 +5692,9 @@ function createHistory(opts) {
|
|
|
5692
5692
|
let blockers = [];
|
|
5693
5693
|
const notify = () => {
|
|
5694
5694
|
location = opts.getLocation(), subscribers.forEach((subscriber) => subscriber());
|
|
5695
|
-
}, tryNavigation = async (task) => {
|
|
5695
|
+
}, tryNavigation = async (task, navigateOpts) => {
|
|
5696
5696
|
var _a;
|
|
5697
|
-
if (typeof document < "u" && blockers.length) {
|
|
5697
|
+
if (!(navigateOpts?.ignoreBlocker ?? !1) && typeof document < "u" && blockers.length) {
|
|
5698
5698
|
for (const blocker of blockers)
|
|
5699
5699
|
if (!await blocker()) {
|
|
5700
5700
|
(_a = opts.onBlocked) == null || _a.call(opts, notify);
|
|
@@ -5710,30 +5710,30 @@ function createHistory(opts) {
|
|
|
5710
5710
|
subscribe: (cb2) => (subscribers.add(cb2), () => {
|
|
5711
5711
|
subscribers.delete(cb2);
|
|
5712
5712
|
}),
|
|
5713
|
-
push: (path, state) => {
|
|
5713
|
+
push: (path, state, navigateOpts) => {
|
|
5714
5714
|
state = assignKey(state), tryNavigation(() => {
|
|
5715
5715
|
opts.pushState(path, state), notify();
|
|
5716
|
-
});
|
|
5716
|
+
}, navigateOpts);
|
|
5717
5717
|
},
|
|
5718
|
-
replace: (path, state) => {
|
|
5718
|
+
replace: (path, state, navigateOpts) => {
|
|
5719
5719
|
state = assignKey(state), tryNavigation(() => {
|
|
5720
5720
|
opts.replaceState(path, state), notify();
|
|
5721
|
-
});
|
|
5721
|
+
}, navigateOpts);
|
|
5722
5722
|
},
|
|
5723
|
-
go: (index2) => {
|
|
5723
|
+
go: (index2, navigateOpts) => {
|
|
5724
5724
|
tryNavigation(() => {
|
|
5725
5725
|
opts.go(index2), notify();
|
|
5726
|
-
});
|
|
5726
|
+
}, navigateOpts);
|
|
5727
5727
|
},
|
|
5728
|
-
back: () => {
|
|
5728
|
+
back: (navigateOpts) => {
|
|
5729
5729
|
tryNavigation(() => {
|
|
5730
5730
|
opts.back(), notify();
|
|
5731
|
-
});
|
|
5731
|
+
}, navigateOpts);
|
|
5732
5732
|
},
|
|
5733
|
-
forward: () => {
|
|
5733
|
+
forward: (navigateOpts) => {
|
|
5734
5734
|
tryNavigation(() => {
|
|
5735
5735
|
opts.forward(), notify();
|
|
5736
|
-
});
|
|
5736
|
+
}, navigateOpts);
|
|
5737
5737
|
},
|
|
5738
5738
|
createHref: (str) => opts.createHref(str),
|
|
5739
5739
|
block: (blocker) => (blockers.push(blocker), blockers.length === 1 && addEventListener(beforeUnloadEvent, beforeUnloadListener, {
|
|
@@ -5759,9 +5759,9 @@ function assignKey(state) {
|
|
|
5759
5759
|
};
|
|
5760
5760
|
}
|
|
5761
5761
|
function createBrowserHistory(opts) {
|
|
5762
|
-
const
|
|
5763
|
-
`${
|
|
5764
|
-
|
|
5762
|
+
const win2 = opts?.window ?? (typeof document < "u" ? window : void 0), originalPushState = win2.history.pushState, originalReplaceState = win2.history.replaceState, createHref = opts?.createHref ?? ((path) => path), parseLocation = opts?.parseLocation ?? (() => parseHref(
|
|
5763
|
+
`${win2.location.pathname}${win2.location.search}${win2.location.hash}`,
|
|
5764
|
+
win2.history.state
|
|
5765
5765
|
));
|
|
5766
5766
|
let currentLocation = parseLocation(), rollbackLocation;
|
|
5767
5767
|
const getLocation = () => currentLocation;
|
|
@@ -5769,7 +5769,7 @@ function createBrowserHistory(opts) {
|
|
|
5769
5769
|
const flush = () => {
|
|
5770
5770
|
if (!next)
|
|
5771
5771
|
return;
|
|
5772
|
-
(next.isPush ? originalPushState : originalReplaceState).call(
|
|
5772
|
+
(next.isPush ? originalPushState : originalReplaceState).call(win2.history, next.state, "", next.href), next = void 0, scheduled = void 0, rollbackLocation = void 0;
|
|
5773
5773
|
}, queueHistoryAction = (type, destHref, state) => {
|
|
5774
5774
|
const href = createHref(destHref);
|
|
5775
5775
|
scheduled || (rollbackLocation = currentLocation), currentLocation = parseHref(destHref, state), next = {
|
|
@@ -5783,35 +5783,35 @@ function createBrowserHistory(opts) {
|
|
|
5783
5783
|
getLocation,
|
|
5784
5784
|
pushState: (href, state) => queueHistoryAction("push", href, state),
|
|
5785
5785
|
replaceState: (href, state) => queueHistoryAction("replace", href, state),
|
|
5786
|
-
back: () =>
|
|
5787
|
-
forward: () =>
|
|
5788
|
-
go: (n2) =>
|
|
5786
|
+
back: () => win2.history.back(),
|
|
5787
|
+
forward: () => win2.history.forward(),
|
|
5788
|
+
go: (n2) => win2.history.go(n2),
|
|
5789
5789
|
createHref: (href) => createHref(href),
|
|
5790
5790
|
flush,
|
|
5791
5791
|
destroy: () => {
|
|
5792
|
-
|
|
5792
|
+
win2.history.pushState = originalPushState, win2.history.replaceState = originalReplaceState, win2.removeEventListener(pushStateEvent, onPushPop), win2.removeEventListener(popStateEvent, onPushPop);
|
|
5793
5793
|
},
|
|
5794
5794
|
onBlocked: (onUpdate) => {
|
|
5795
5795
|
rollbackLocation && currentLocation !== rollbackLocation && (currentLocation = rollbackLocation, onUpdate());
|
|
5796
5796
|
}
|
|
5797
5797
|
});
|
|
5798
|
-
return
|
|
5799
|
-
const res = originalPushState.apply(
|
|
5798
|
+
return win2.addEventListener(pushStateEvent, onPushPop), win2.addEventListener(popStateEvent, onPushPop), win2.history.pushState = function(...args) {
|
|
5799
|
+
const res = originalPushState.apply(win2.history, args);
|
|
5800
5800
|
return onPushPop(), res;
|
|
5801
|
-
},
|
|
5802
|
-
const res = originalReplaceState.apply(
|
|
5801
|
+
}, win2.history.replaceState = function(...args) {
|
|
5802
|
+
const res = originalReplaceState.apply(win2.history, args);
|
|
5803
5803
|
return onPushPop(), res;
|
|
5804
5804
|
}, history;
|
|
5805
5805
|
}
|
|
5806
5806
|
function createHashHistory(opts) {
|
|
5807
|
-
const
|
|
5807
|
+
const win2 = opts?.window ?? (typeof document < "u" ? window : void 0);
|
|
5808
5808
|
return createBrowserHistory({
|
|
5809
|
-
window:
|
|
5809
|
+
window: win2,
|
|
5810
5810
|
parseLocation: () => {
|
|
5811
|
-
const hashHref =
|
|
5812
|
-
return parseHref(hashHref,
|
|
5811
|
+
const hashHref = win2.location.hash.split("#").slice(1).join("#") ?? "/";
|
|
5812
|
+
return parseHref(hashHref, win2.history.state);
|
|
5813
5813
|
},
|
|
5814
|
-
createHref: (href) => `${
|
|
5814
|
+
createHref: (href) => `${win2.location.pathname}${win2.location.search}#${href}`
|
|
5815
5815
|
});
|
|
5816
5816
|
}
|
|
5817
5817
|
function createMemoryHistory(opts = {
|
|
@@ -6008,8 +6008,7 @@ function encode(obj, pfx) {
|
|
|
6008
6008
|
return (pfx || "") + str;
|
|
6009
6009
|
}
|
|
6010
6010
|
function toValue(mix2) {
|
|
6011
|
-
if (!mix2)
|
|
6012
|
-
return "";
|
|
6011
|
+
if (!mix2) return "";
|
|
6013
6012
|
const str = decodeURIComponent(mix2);
|
|
6014
6013
|
return str === "false" ? !1 : str === "true" ? !0 : +str * 0 === 0 && +str + "" === str ? +str : str;
|
|
6015
6014
|
}
|
|
@@ -6233,8 +6232,7 @@ function useRouterState(opts) {
|
|
|
6233
6232
|
return useStore$2((opts?.router || contextRouter).__store, opts?.select);
|
|
6234
6233
|
}
|
|
6235
6234
|
function notFound(options = {}) {
|
|
6236
|
-
if (options.isNotFound = !0, options.throw)
|
|
6237
|
-
throw options;
|
|
6235
|
+
if (options.isNotFound = !0, options.throw) throw options;
|
|
6238
6236
|
return options;
|
|
6239
6237
|
}
|
|
6240
6238
|
function isNotFound(obj) {
|
|
@@ -6387,8 +6385,7 @@ function Match({ matchId }) {
|
|
|
6387
6385
|
getResetKey: () => resetKey,
|
|
6388
6386
|
errorComponent: routeErrorComponent || ErrorComponent,
|
|
6389
6387
|
onCatch: (error, errorInfo) => {
|
|
6390
|
-
if (isNotFound(error))
|
|
6391
|
-
throw error;
|
|
6388
|
+
if (isNotFound(error)) throw error;
|
|
6392
6389
|
routeOnCatch?.(error, errorInfo);
|
|
6393
6390
|
},
|
|
6394
6391
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -6610,19 +6607,23 @@ function interpolatePath({
|
|
|
6610
6607
|
leaveWildcards,
|
|
6611
6608
|
leaveParams
|
|
6612
6609
|
}) {
|
|
6613
|
-
const interpolatedPathSegments = parsePathname(path);
|
|
6610
|
+
const interpolatedPathSegments = parsePathname(path), encodedParams = {};
|
|
6611
|
+
for (const [key, value] of Object.entries(params)) {
|
|
6612
|
+
const isValueString = typeof value == "string";
|
|
6613
|
+
["*", "_splat"].includes(key) ? encodedParams[key] = isValueString ? encodeURI(value) : value : encodedParams[key] = isValueString ? encodeURIComponent(value) : value;
|
|
6614
|
+
}
|
|
6614
6615
|
return joinPaths(
|
|
6615
6616
|
interpolatedPathSegments.map((segment) => {
|
|
6616
6617
|
if (segment.type === "wildcard") {
|
|
6617
|
-
const value =
|
|
6618
|
+
const value = encodedParams._splat;
|
|
6618
6619
|
return leaveWildcards ? `${segment.value}${value ?? ""}` : value;
|
|
6619
6620
|
}
|
|
6620
6621
|
if (segment.type === "param") {
|
|
6621
6622
|
if (leaveParams) {
|
|
6622
|
-
const value =
|
|
6623
|
+
const value = encodedParams[segment.value];
|
|
6623
6624
|
return `${segment.value}${value ?? ""}`;
|
|
6624
6625
|
}
|
|
6625
|
-
return
|
|
6626
|
+
return encodedParams[segment.value.substring(1)] ?? "undefined";
|
|
6626
6627
|
}
|
|
6627
6628
|
return segment.value;
|
|
6628
6629
|
})
|
|
@@ -6634,7 +6635,20 @@ function matchPathname(basepath2, currentPathname, matchLocation) {
|
|
|
6634
6635
|
return pathParams ?? {};
|
|
6635
6636
|
}
|
|
6636
6637
|
function removeBasepath(basepath2, pathname) {
|
|
6637
|
-
|
|
6638
|
+
switch (!0) {
|
|
6639
|
+
case basepath2 === "/":
|
|
6640
|
+
return pathname;
|
|
6641
|
+
case pathname === basepath2:
|
|
6642
|
+
return "";
|
|
6643
|
+
case pathname.length < basepath2.length:
|
|
6644
|
+
return pathname;
|
|
6645
|
+
case pathname[basepath2.length] !== "/":
|
|
6646
|
+
return pathname;
|
|
6647
|
+
case pathname.startsWith(basepath2):
|
|
6648
|
+
return pathname.slice(basepath2.length);
|
|
6649
|
+
default:
|
|
6650
|
+
return pathname;
|
|
6651
|
+
}
|
|
6638
6652
|
}
|
|
6639
6653
|
function matchByPath(basepath2, from, matchLocation) {
|
|
6640
6654
|
from = removeBasepath(basepath2, from);
|
|
@@ -6968,8 +6982,6 @@ class Router {
|
|
|
6968
6982
|
let nextParams = (dest.params ?? !0) === !0 ? prevParams : { ...prevParams, ...functionalUpdate(dest.params, prevParams) };
|
|
6969
6983
|
Object.keys(nextParams).length > 0 && matches?.map((d) => this.looseRoutesById[d.routeId].options.stringifyParams).filter(Boolean).forEach((fn) => {
|
|
6970
6984
|
nextParams = { ...nextParams, ...fn(nextParams) };
|
|
6971
|
-
}), Object.keys(nextParams).forEach((key) => {
|
|
6972
|
-
["*", "_splat"].includes(key) ? nextParams[key] = encodeURI(nextParams[key]) : nextParams[key] = encodeURIComponent(nextParams[key]);
|
|
6973
6985
|
}), pathname = interpolatePath({
|
|
6974
6986
|
path: pathname,
|
|
6975
6987
|
params: nextParams ?? {},
|
|
@@ -7024,6 +7036,7 @@ class Router {
|
|
|
7024
7036
|
}, this.commitLocation = async ({
|
|
7025
7037
|
startTransition,
|
|
7026
7038
|
viewTransition,
|
|
7039
|
+
ignoreBlocker,
|
|
7027
7040
|
...next
|
|
7028
7041
|
}) => {
|
|
7029
7042
|
const isSameState = () => {
|
|
@@ -7053,7 +7066,8 @@ class Router {
|
|
|
7053
7066
|
}
|
|
7054
7067
|
}, (nextHistory.unmaskOnReload ?? this.options.unmaskOnReload ?? !1) && (nextHistory.state.__tempKey = this.tempLocationKey)), this.shouldViewTransition = viewTransition, this.history[next.replace ? "replace" : "push"](
|
|
7055
7068
|
nextHistory.href,
|
|
7056
|
-
nextHistory.state
|
|
7069
|
+
nextHistory.state,
|
|
7070
|
+
{ ignoreBlocker }
|
|
7057
7071
|
);
|
|
7058
7072
|
}
|
|
7059
7073
|
return this.resetNextScroll = next.resetScroll ?? !0, this.latestLoadPromise;
|
|
@@ -7062,6 +7076,7 @@ class Router {
|
|
|
7062
7076
|
resetScroll,
|
|
7063
7077
|
startTransition,
|
|
7064
7078
|
viewTransition,
|
|
7079
|
+
ignoreBlocker,
|
|
7065
7080
|
...rest
|
|
7066
7081
|
} = {}) => {
|
|
7067
7082
|
const location = this.buildLocation(rest);
|
|
@@ -7070,7 +7085,8 @@ class Router {
|
|
|
7070
7085
|
startTransition,
|
|
7071
7086
|
viewTransition,
|
|
7072
7087
|
replace,
|
|
7073
|
-
resetScroll
|
|
7088
|
+
resetScroll,
|
|
7089
|
+
ignoreBlocker
|
|
7074
7090
|
});
|
|
7075
7091
|
}, this.navigate = ({ from, to, __isRedirect, ...rest }) => {
|
|
7076
7092
|
const toString = String(to);
|
|
@@ -7197,8 +7213,7 @@ class Router {
|
|
|
7197
7213
|
};
|
|
7198
7214
|
}), updated;
|
|
7199
7215
|
}, handleRedirectAndNotFound = (match, err) => {
|
|
7200
|
-
if (isResolvedRedirect(err))
|
|
7201
|
-
throw err;
|
|
7216
|
+
if (isResolvedRedirect(err)) throw err;
|
|
7202
7217
|
if (isRedirect(err) || isNotFound(err)) {
|
|
7203
7218
|
if (updateMatch(match.id, (prev) => ({
|
|
7204
7219
|
...prev,
|
|
@@ -7206,7 +7221,7 @@ class Router {
|
|
|
7206
7221
|
isFetching: !1,
|
|
7207
7222
|
error: err
|
|
7208
7223
|
})), err.routeId || (err.routeId = match.routeId), isRedirect(err))
|
|
7209
|
-
throw rendered = !0, err = this.resolveRedirect(err), err;
|
|
7224
|
+
throw rendered = !0, err = this.resolveRedirect({ ...err, _fromLocation: location }), err;
|
|
7210
7225
|
if (isNotFound(err))
|
|
7211
7226
|
throw this.handleNotFound(matches, err), err;
|
|
7212
7227
|
}
|
|
@@ -7494,7 +7509,7 @@ class Router {
|
|
|
7494
7509
|
}, next = this.buildLocation(matchLocation);
|
|
7495
7510
|
if (opts?.pending && this.state.status !== "pending")
|
|
7496
7511
|
return !1;
|
|
7497
|
-
const baseLocation = opts?.pending ? this.latestLocation : this.state.resolvedLocation, match = matchPathname(this.basepath, baseLocation.pathname, {
|
|
7512
|
+
const baseLocation = (opts?.pending === void 0 ? !this.state.isLoading : opts.pending) ? this.latestLocation : this.state.resolvedLocation, match = matchPathname(this.basepath, baseLocation.pathname, {
|
|
7498
7513
|
...opts,
|
|
7499
7514
|
to: next.pathname
|
|
7500
7515
|
});
|
|
@@ -7763,6 +7778,7 @@ function useLinkProps(options) {
|
|
|
7763
7778
|
onMouseEnter,
|
|
7764
7779
|
onMouseLeave,
|
|
7765
7780
|
onTouchStart,
|
|
7781
|
+
ignoreBlocker,
|
|
7766
7782
|
...rest
|
|
7767
7783
|
} = options;
|
|
7768
7784
|
let type = "internal";
|
|
@@ -7813,7 +7829,8 @@ function useLinkProps(options) {
|
|
|
7813
7829
|
replace,
|
|
7814
7830
|
resetScroll,
|
|
7815
7831
|
startTransition,
|
|
7816
|
-
viewTransition
|
|
7832
|
+
viewTransition,
|
|
7833
|
+
ignoreBlocker
|
|
7817
7834
|
});
|
|
7818
7835
|
}
|
|
7819
7836
|
}, doPreload = () => {
|
|
@@ -7823,8 +7840,7 @@ function useLinkProps(options) {
|
|
|
7823
7840
|
}, handleFocus = (e2) => {
|
|
7824
7841
|
disabled || preload && doPreload();
|
|
7825
7842
|
}, handleTouchStart = handleFocus, handleEnter = (e2) => {
|
|
7826
|
-
if (disabled)
|
|
7827
|
-
return;
|
|
7843
|
+
if (disabled) return;
|
|
7828
7844
|
const eventTarget = e2.target || {};
|
|
7829
7845
|
if (preload) {
|
|
7830
7846
|
if (eventTarget.preloadTimeout)
|
|
@@ -7834,8 +7850,7 @@ function useLinkProps(options) {
|
|
|
7834
7850
|
}, preloadDelay);
|
|
7835
7851
|
}
|
|
7836
7852
|
}, handleLeave = (e2) => {
|
|
7837
|
-
if (disabled)
|
|
7838
|
-
return;
|
|
7853
|
+
if (disabled) return;
|
|
7839
7854
|
const eventTarget = e2.target || {};
|
|
7840
7855
|
eventTarget.preloadTimeout && (clearTimeout(eventTarget.preloadTimeout), eventTarget.preloadTimeout = null);
|
|
7841
7856
|
}, composeHandlers = (handlers) => (e2) => {
|
|
@@ -7909,8 +7924,7 @@ function useScrollRestoration(options) {
|
|
|
7909
7924
|
const getKey = options?.getKey || defaultGetKey, { history } = window;
|
|
7910
7925
|
history.scrollRestoration = "manual";
|
|
7911
7926
|
const onScroll = (event) => {
|
|
7912
|
-
if (weakScrolledElements.has(event.target))
|
|
7913
|
-
return;
|
|
7927
|
+
if (weakScrolledElements.has(event.target)) return;
|
|
7914
7928
|
weakScrolledElements.add(event.target);
|
|
7915
7929
|
let elementSelector = "";
|
|
7916
7930
|
if (event.target === document || event.target === window)
|
|
@@ -9152,6 +9166,34 @@ function useMounted() {
|
|
|
9152
9166
|
const [mounted, setMounted] = reactExports.useState(!1);
|
|
9153
9167
|
return reactExports.useEffect(() => setMounted(!0), []), mounted;
|
|
9154
9168
|
}
|
|
9169
|
+
function useStateHistory(initialValue) {
|
|
9170
|
+
const [state, setState] = reactExports.useState({
|
|
9171
|
+
history: [initialValue],
|
|
9172
|
+
current: 0
|
|
9173
|
+
}), set2 = reactExports.useCallback(
|
|
9174
|
+
(val) => setState((currentState) => {
|
|
9175
|
+
const nextState = [...currentState.history.slice(0, currentState.current + 1), val];
|
|
9176
|
+
return {
|
|
9177
|
+
history: nextState,
|
|
9178
|
+
current: nextState.length - 1
|
|
9179
|
+
};
|
|
9180
|
+
}),
|
|
9181
|
+
[]
|
|
9182
|
+
), back = reactExports.useCallback(
|
|
9183
|
+
(steps2 = 1) => setState((currentState) => ({
|
|
9184
|
+
history: currentState.history,
|
|
9185
|
+
current: Math.max(0, currentState.current - steps2)
|
|
9186
|
+
})),
|
|
9187
|
+
[]
|
|
9188
|
+
), forward = reactExports.useCallback(
|
|
9189
|
+
(steps2 = 1) => setState((currentState) => ({
|
|
9190
|
+
history: currentState.history,
|
|
9191
|
+
current: Math.min(currentState.history.length - 1, currentState.current + steps2)
|
|
9192
|
+
})),
|
|
9193
|
+
[]
|
|
9194
|
+
), handlers = reactExports.useMemo(() => ({ set: set2, forward, back }), []);
|
|
9195
|
+
return [state.history[state.current], handlers, state];
|
|
9196
|
+
}
|
|
9155
9197
|
function getEnv() {
|
|
9156
9198
|
return typeof process < "u" && process.env ? "production" : "development";
|
|
9157
9199
|
}
|
|
@@ -10990,11 +11032,11 @@ const Corner = reactExports.forwardRef((props2, ref) => {
|
|
|
10990
11032
|
}), ScrollAreaCorner = reactExports.forwardRef((props2, ref) => {
|
|
10991
11033
|
const ctx = useScrollAreaContext(), hasBothScrollbarsVisible = !!(ctx.scrollbarX && ctx.scrollbarY);
|
|
10992
11034
|
return ctx.type !== "scroll" && hasBothScrollbarsVisible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Corner, { ...props2, ref }) : null;
|
|
10993
|
-
}), defaultProps$
|
|
11035
|
+
}), defaultProps$1l = {
|
|
10994
11036
|
scrollHideDelay: 1e3,
|
|
10995
11037
|
type: "hover"
|
|
10996
11038
|
}, ScrollAreaRoot = reactExports.forwardRef((_props, ref) => {
|
|
10997
|
-
const props2 = useProps("ScrollAreaRoot", defaultProps$
|
|
11039
|
+
const props2 = useProps("ScrollAreaRoot", defaultProps$1l, _props), { type, scrollHideDelay, scrollbars, ...others } = props2, [scrollArea, setScrollArea] = reactExports.useState(null), [viewport, setViewport] = reactExports.useState(null), [content2, setContent] = reactExports.useState(null), [scrollbarX, setScrollbarX] = reactExports.useState(null), [scrollbarY, setScrollbarY] = reactExports.useState(null), [cornerWidth, setCornerWidth] = reactExports.useState(0), [cornerHeight, setCornerHeight] = reactExports.useState(0), [scrollbarXEnabled, setScrollbarXEnabled] = reactExports.useState(!1), [scrollbarYEnabled, setScrollbarYEnabled] = reactExports.useState(!1), rootRef = useMergedRef(ref, (node) => setScrollArea(node));
|
|
10998
11040
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10999
11041
|
ScrollAreaProvider,
|
|
11000
11042
|
{
|
|
@@ -11403,17 +11445,17 @@ const Thumb$1 = reactExports.forwardRef((props2, forwardedRef) => {
|
|
|
11403
11445
|
}
|
|
11404
11446
|
);
|
|
11405
11447
|
ScrollAreaViewport.displayName = "@mantine/core/ScrollAreaViewport";
|
|
11406
|
-
var __default__$
|
|
11407
|
-
const classes$
|
|
11448
|
+
var __default__$A = { root: "m_d57069b5", viewport: "m_c0783ff9", viewportInner: "m_f8f631dd", scrollbar: "m_c44ba933", thumb: "m_d8b5e363", corner: "m_21657268" };
|
|
11449
|
+
const classes$y = __default__$A, defaultProps$1k = {
|
|
11408
11450
|
scrollHideDelay: 1e3,
|
|
11409
11451
|
type: "hover",
|
|
11410
11452
|
scrollbars: "xy"
|
|
11411
|
-
}, varsResolver$
|
|
11453
|
+
}, varsResolver$B = (_, { scrollbarSize }) => ({
|
|
11412
11454
|
root: {
|
|
11413
11455
|
"--scrollarea-scrollbar-size": rem(scrollbarSize)
|
|
11414
11456
|
}
|
|
11415
11457
|
}), ScrollArea = factory((_props, ref) => {
|
|
11416
|
-
const props2 = useProps("ScrollArea", defaultProps$
|
|
11458
|
+
const props2 = useProps("ScrollArea", defaultProps$1k, _props), {
|
|
11417
11459
|
classNames,
|
|
11418
11460
|
className,
|
|
11419
11461
|
style: style2,
|
|
@@ -11433,14 +11475,14 @@ const classes$A = __default__$C, defaultProps$1m = {
|
|
|
11433
11475
|
} = props2, [scrollbarHovered, setScrollbarHovered] = reactExports.useState(!1), getStyles2 = useStyles({
|
|
11434
11476
|
name: "ScrollArea",
|
|
11435
11477
|
props: props2,
|
|
11436
|
-
classes: classes$
|
|
11478
|
+
classes: classes$y,
|
|
11437
11479
|
className,
|
|
11438
11480
|
style: style2,
|
|
11439
11481
|
classNames,
|
|
11440
11482
|
styles,
|
|
11441
11483
|
unstyled,
|
|
11442
11484
|
vars,
|
|
11443
|
-
varsResolver: varsResolver$
|
|
11485
|
+
varsResolver: varsResolver$B
|
|
11444
11486
|
});
|
|
11445
11487
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11446
11488
|
ScrollAreaRoot,
|
|
@@ -11522,7 +11564,7 @@ const ScrollAreaAutosize = factory((props2, ref) => {
|
|
|
11522
11564
|
style: style2,
|
|
11523
11565
|
vars,
|
|
11524
11566
|
...others
|
|
11525
|
-
} = useProps("ScrollAreaAutosize", defaultProps$
|
|
11567
|
+
} = useProps("ScrollAreaAutosize", defaultProps$1k, props2);
|
|
11526
11568
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ...others, ref, style: [{ display: "flex", overflow: "auto" }, style2], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { style: { display: "flex", flexDirection: "column", flex: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11527
11569
|
ScrollArea,
|
|
11528
11570
|
{
|
|
@@ -11544,16 +11586,16 @@ const ScrollAreaAutosize = factory((props2, ref) => {
|
|
|
11544
11586
|
}
|
|
11545
11587
|
) }) });
|
|
11546
11588
|
});
|
|
11547
|
-
ScrollArea.classes = classes$
|
|
11589
|
+
ScrollArea.classes = classes$y;
|
|
11548
11590
|
ScrollAreaAutosize.displayName = "@mantine/core/ScrollAreaAutosize";
|
|
11549
|
-
ScrollAreaAutosize.classes = classes$
|
|
11591
|
+
ScrollAreaAutosize.classes = classes$y;
|
|
11550
11592
|
ScrollArea.Autosize = ScrollAreaAutosize;
|
|
11551
|
-
var __default__$
|
|
11552
|
-
const classes$
|
|
11593
|
+
var __default__$z = { root: "m_87cf2631" };
|
|
11594
|
+
const classes$x = __default__$z, defaultProps$1j = {
|
|
11553
11595
|
__staticSelector: "UnstyledButton"
|
|
11554
11596
|
}, UnstyledButton = polymorphicFactory(
|
|
11555
11597
|
(_props, ref) => {
|
|
11556
|
-
const props2 = useProps("UnstyledButton", defaultProps$
|
|
11598
|
+
const props2 = useProps("UnstyledButton", defaultProps$1j, _props), {
|
|
11557
11599
|
className,
|
|
11558
11600
|
component = "button",
|
|
11559
11601
|
__staticSelector,
|
|
@@ -11565,7 +11607,7 @@ const classes$z = __default__$B, defaultProps$1l = {
|
|
|
11565
11607
|
} = props2, getStyles2 = useStyles({
|
|
11566
11608
|
name: __staticSelector,
|
|
11567
11609
|
props: props2,
|
|
11568
|
-
classes: classes$
|
|
11610
|
+
classes: classes$x,
|
|
11569
11611
|
className,
|
|
11570
11612
|
style: style2,
|
|
11571
11613
|
classNames,
|
|
@@ -11584,13 +11626,13 @@ const classes$z = __default__$B, defaultProps$1l = {
|
|
|
11584
11626
|
);
|
|
11585
11627
|
}
|
|
11586
11628
|
);
|
|
11587
|
-
UnstyledButton.classes = classes$
|
|
11629
|
+
UnstyledButton.classes = classes$x;
|
|
11588
11630
|
UnstyledButton.displayName = "@mantine/core/UnstyledButton";
|
|
11589
|
-
var __default__$
|
|
11590
|
-
const classes$
|
|
11591
|
-
const props2 = useProps("VisuallyHidden", defaultProps$
|
|
11631
|
+
var __default__$y = { root: "m_515a97f8" };
|
|
11632
|
+
const classes$w = __default__$y, defaultProps$1i = {}, VisuallyHidden = factory((_props, ref) => {
|
|
11633
|
+
const props2 = useProps("VisuallyHidden", defaultProps$1i, _props), { classNames, className, style: style2, styles, unstyled, vars, ...others } = props2, getStyles2 = useStyles({
|
|
11592
11634
|
name: "VisuallyHidden",
|
|
11593
|
-
classes: classes$
|
|
11635
|
+
classes: classes$w,
|
|
11594
11636
|
props: props2,
|
|
11595
11637
|
className,
|
|
11596
11638
|
style: style2,
|
|
@@ -11600,16 +11642,16 @@ const classes$y = __default__$A, defaultProps$1k = {}, VisuallyHidden = factory(
|
|
|
11600
11642
|
});
|
|
11601
11643
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "span", ref, ...getStyles2("root"), ...others });
|
|
11602
11644
|
});
|
|
11603
|
-
VisuallyHidden.classes = classes$
|
|
11645
|
+
VisuallyHidden.classes = classes$w;
|
|
11604
11646
|
VisuallyHidden.displayName = "@mantine/core/VisuallyHidden";
|
|
11605
|
-
var __default__$
|
|
11606
|
-
const classes$
|
|
11647
|
+
var __default__$x = { root: "m_1b7284a3" };
|
|
11648
|
+
const classes$v = __default__$x, defaultProps$1h = {}, varsResolver$A = (_, { radius, shadow }) => ({
|
|
11607
11649
|
root: {
|
|
11608
11650
|
"--paper-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
11609
11651
|
"--paper-shadow": getShadow(shadow)
|
|
11610
11652
|
}
|
|
11611
11653
|
}), Paper = polymorphicFactory((_props, ref) => {
|
|
11612
|
-
const props2 = useProps("Paper", defaultProps$
|
|
11654
|
+
const props2 = useProps("Paper", defaultProps$1h, _props), {
|
|
11613
11655
|
classNames,
|
|
11614
11656
|
className,
|
|
11615
11657
|
style: style2,
|
|
@@ -11625,14 +11667,14 @@ const classes$x = __default__$z, defaultProps$1j = {}, varsResolver$B = (_, { ra
|
|
|
11625
11667
|
} = props2, getStyles2 = useStyles({
|
|
11626
11668
|
name: "Paper",
|
|
11627
11669
|
props: props2,
|
|
11628
|
-
classes: classes$
|
|
11670
|
+
classes: classes$v,
|
|
11629
11671
|
className,
|
|
11630
11672
|
style: style2,
|
|
11631
11673
|
classNames,
|
|
11632
11674
|
styles,
|
|
11633
11675
|
unstyled,
|
|
11634
11676
|
vars,
|
|
11635
|
-
varsResolver: varsResolver$
|
|
11677
|
+
varsResolver: varsResolver$A
|
|
11636
11678
|
});
|
|
11637
11679
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11638
11680
|
Box,
|
|
@@ -11645,7 +11687,7 @@ const classes$x = __default__$z, defaultProps$1j = {}, varsResolver$B = (_, { ra
|
|
|
11645
11687
|
}
|
|
11646
11688
|
);
|
|
11647
11689
|
});
|
|
11648
|
-
Paper.classes = classes$
|
|
11690
|
+
Paper.classes = classes$v;
|
|
11649
11691
|
Paper.displayName = "@mantine/core/Paper";
|
|
11650
11692
|
function getNodeName(node) {
|
|
11651
11693
|
return isNode$1(node) ? (node.nodeName || "").toLowerCase() : "#document";
|
|
@@ -11732,8 +11774,8 @@ function getNearestOverflowAncestor(node) {
|
|
|
11732
11774
|
function getOverflowAncestors(node, list, traverseIframes) {
|
|
11733
11775
|
var _node$ownerDocument2;
|
|
11734
11776
|
list === void 0 && (list = []), traverseIframes === void 0 && (traverseIframes = !0);
|
|
11735
|
-
const scrollableAncestor = getNearestOverflowAncestor(node), isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body),
|
|
11736
|
-
return isBody ? list.concat(
|
|
11777
|
+
const scrollableAncestor = getNearestOverflowAncestor(node), isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body), win2 = getWindow(scrollableAncestor);
|
|
11778
|
+
return isBody ? list.concat(win2, win2.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win2.frameElement && traverseIframes ? getOverflowAncestors(win2.frameElement) : []) : list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
11737
11779
|
}
|
|
11738
11780
|
function activeElement(doc) {
|
|
11739
11781
|
let activeElement2 = doc.activeElement;
|
|
@@ -12477,10 +12519,10 @@ function getScale(element2) {
|
|
|
12477
12519
|
}
|
|
12478
12520
|
const noOffsets = /* @__PURE__ */ createCoords(0);
|
|
12479
12521
|
function getVisualOffsets(element2) {
|
|
12480
|
-
const
|
|
12481
|
-
return !isWebKit() || !
|
|
12482
|
-
x:
|
|
12483
|
-
y:
|
|
12522
|
+
const win2 = getWindow(element2);
|
|
12523
|
+
return !isWebKit() || !win2.visualViewport ? noOffsets : {
|
|
12524
|
+
x: win2.visualViewport.offsetLeft,
|
|
12525
|
+
y: win2.visualViewport.offsetTop
|
|
12484
12526
|
};
|
|
12485
12527
|
}
|
|
12486
12528
|
function shouldAddVisualOffsets(element2, isFixed, floatingOffsetParent) {
|
|
@@ -12494,8 +12536,8 @@ function getBoundingClientRect(element2, includeScale, isFixedStrategy, offsetPa
|
|
|
12494
12536
|
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
12495
12537
|
let x2 = (clientRect.left + visualOffsets.x) / scale2.x, y2 = (clientRect.top + visualOffsets.y) / scale2.y, width = clientRect.width / scale2.x, height = clientRect.height / scale2.y;
|
|
12496
12538
|
if (domElement) {
|
|
12497
|
-
const
|
|
12498
|
-
let currentWin =
|
|
12539
|
+
const win2 = getWindow(domElement), offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
12540
|
+
let currentWin = win2, currentIFrame = currentWin.frameElement;
|
|
12499
12541
|
for (; currentIFrame && offsetParent && offsetWin !== currentWin; ) {
|
|
12500
12542
|
const iframeScale = getScale(currentIFrame), iframeRect = currentIFrame.getBoundingClientRect(), css = getComputedStyle$2(currentIFrame), left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x, top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
12501
12543
|
x2 *= iframeScale.x, y2 *= iframeScale.y, width *= iframeScale.x, height *= iframeScale.y, x2 += left, y2 += top, currentWin = getWindow(currentIFrame), currentIFrame = currentWin.frameElement;
|
|
@@ -12562,7 +12604,7 @@ function getDocumentRect(element2) {
|
|
|
12562
12604
|
};
|
|
12563
12605
|
}
|
|
12564
12606
|
function getViewportRect(element2, strategy) {
|
|
12565
|
-
const
|
|
12607
|
+
const win2 = getWindow(element2), html = getDocumentElement(element2), visualViewport = win2.visualViewport;
|
|
12566
12608
|
let width = html.clientWidth, height = html.clientHeight, x2 = 0, y2 = 0;
|
|
12567
12609
|
if (visualViewport) {
|
|
12568
12610
|
width = visualViewport.width, height = visualViewport.height;
|
|
@@ -13513,15 +13555,15 @@ function useFocus(context, props2) {
|
|
|
13513
13555
|
return reactExports.useEffect(() => {
|
|
13514
13556
|
if (!enabled)
|
|
13515
13557
|
return;
|
|
13516
|
-
const
|
|
13558
|
+
const win2 = getWindow(domReference);
|
|
13517
13559
|
function onBlur() {
|
|
13518
13560
|
!open && isHTMLElement(domReference) && domReference === activeElement(getDocument(domReference)) && (blockFocusRef.current = !0);
|
|
13519
13561
|
}
|
|
13520
13562
|
function onKeyDown() {
|
|
13521
13563
|
keyboardModalityRef.current = !0;
|
|
13522
13564
|
}
|
|
13523
|
-
return
|
|
13524
|
-
|
|
13565
|
+
return win2.addEventListener("blur", onBlur), win2.addEventListener("keydown", onKeyDown, !0), () => {
|
|
13566
|
+
win2.removeEventListener("blur", onBlur), win2.removeEventListener("keydown", onKeyDown, !0);
|
|
13525
13567
|
};
|
|
13526
13568
|
}, [domReference, open, enabled]), reactExports.useEffect(() => {
|
|
13527
13569
|
if (!enabled)
|
|
@@ -13823,8 +13865,8 @@ function createPortalNode(props2) {
|
|
|
13823
13865
|
const node = document.createElement("div");
|
|
13824
13866
|
return node.setAttribute("data-portal", "true"), typeof props2.className == "string" && node.classList.add(...props2.className.split(" ").filter(Boolean)), typeof props2.style == "object" && Object.assign(node.style, props2.style), typeof props2.id == "string" && node.setAttribute("id", props2.id), node;
|
|
13825
13867
|
}
|
|
13826
|
-
const defaultProps$
|
|
13827
|
-
const { children: children2, target, ...others } = useProps("Portal", defaultProps$
|
|
13868
|
+
const defaultProps$1g = {}, Portal = reactExports.forwardRef((props2, ref) => {
|
|
13869
|
+
const { children: children2, target, ...others } = useProps("Portal", defaultProps$1g, props2), [mounted, setMounted] = reactExports.useState(!1), nodeRef = reactExports.useRef(null);
|
|
13828
13870
|
return useIsomorphicEffect(() => (setMounted(!0), nodeRef.current = target ? typeof target == "string" ? document.querySelector(target) : target : createPortalNode(others), assignRef(ref, nodeRef.current), !target && nodeRef.current && document.body.appendChild(nodeRef.current), () => {
|
|
13829
13871
|
!target && nodeRef.current && document.body.removeChild(nodeRef.current);
|
|
13830
13872
|
}), [target]), !mounted || !nodeRef.current ? null : reactDomExports.createPortal(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 }), nodeRef.current);
|
|
@@ -14050,9 +14092,9 @@ function Transition$1({
|
|
|
14050
14092
|
) });
|
|
14051
14093
|
}
|
|
14052
14094
|
Transition$1.displayName = "@mantine/core/Transition";
|
|
14053
|
-
var __default__$
|
|
14054
|
-
const classes$
|
|
14055
|
-
const props2 = useProps("PopoverDropdown", defaultProps$
|
|
14095
|
+
var __default__$w = { dropdown: "m_38a85659", arrow: "m_a31dc6c1" };
|
|
14096
|
+
const classes$u = __default__$w, defaultProps$1f = {}, PopoverDropdown = factory((_props, ref) => {
|
|
14097
|
+
const props2 = useProps("PopoverDropdown", defaultProps$1f, _props), {
|
|
14056
14098
|
className,
|
|
14057
14099
|
style: style2,
|
|
14058
14100
|
vars,
|
|
@@ -14136,15 +14178,15 @@ const classes$w = __default__$y, defaultProps$1h = {}, PopoverDropdown = factory
|
|
|
14136
14178
|
}
|
|
14137
14179
|
) });
|
|
14138
14180
|
});
|
|
14139
|
-
PopoverDropdown.classes = classes$
|
|
14181
|
+
PopoverDropdown.classes = classes$u;
|
|
14140
14182
|
PopoverDropdown.displayName = "@mantine/core/PopoverDropdown";
|
|
14141
|
-
const defaultProps$
|
|
14183
|
+
const defaultProps$1e = {
|
|
14142
14184
|
refProp: "ref",
|
|
14143
14185
|
popupType: "dialog"
|
|
14144
14186
|
}, PopoverTarget = factory((props2, ref) => {
|
|
14145
14187
|
const { children: children2, refProp, popupType, ...others } = useProps(
|
|
14146
14188
|
"PopoverTarget",
|
|
14147
|
-
defaultProps$
|
|
14189
|
+
defaultProps$1e,
|
|
14148
14190
|
props2
|
|
14149
14191
|
);
|
|
14150
14192
|
if (!isElement$1(children2))
|
|
@@ -14256,7 +14298,7 @@ function usePopover(options) {
|
|
|
14256
14298
|
onToggle
|
|
14257
14299
|
};
|
|
14258
14300
|
}
|
|
14259
|
-
const defaultProps$
|
|
14301
|
+
const defaultProps$1d = {
|
|
14260
14302
|
position: "bottom",
|
|
14261
14303
|
offset: 8,
|
|
14262
14304
|
positionDependencies: [],
|
|
@@ -14276,14 +14318,14 @@ const defaultProps$1f = {
|
|
|
14276
14318
|
zIndex: getDefaultZIndex("popover"),
|
|
14277
14319
|
__staticSelector: "Popover",
|
|
14278
14320
|
width: "max-content"
|
|
14279
|
-
}, varsResolver$
|
|
14321
|
+
}, varsResolver$z = (_, { radius, shadow }) => ({
|
|
14280
14322
|
dropdown: {
|
|
14281
14323
|
"--popover-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
14282
14324
|
"--popover-shadow": getShadow(shadow)
|
|
14283
14325
|
}
|
|
14284
14326
|
});
|
|
14285
14327
|
function Popover(_props) {
|
|
14286
|
-
const props2 = useProps("Popover", defaultProps$
|
|
14328
|
+
const props2 = useProps("Popover", defaultProps$1d, _props), {
|
|
14287
14329
|
children: children2,
|
|
14288
14330
|
position,
|
|
14289
14331
|
offset: offset2,
|
|
@@ -14327,13 +14369,13 @@ function Popover(_props) {
|
|
|
14327
14369
|
} = props2, getStyles2 = useStyles({
|
|
14328
14370
|
name: __staticSelector,
|
|
14329
14371
|
props: props2,
|
|
14330
|
-
classes: classes$
|
|
14372
|
+
classes: classes$u,
|
|
14331
14373
|
classNames,
|
|
14332
14374
|
styles,
|
|
14333
14375
|
unstyled,
|
|
14334
14376
|
rootSelector: "dropdown",
|
|
14335
14377
|
vars,
|
|
14336
|
-
varsResolver: varsResolver$
|
|
14378
|
+
varsResolver: varsResolver$z
|
|
14337
14379
|
}), arrowRef = reactExports.useRef(null), [targetNode, setTargetNode] = reactExports.useState(null), [dropdownNode, setDropdownNode] = reactExports.useState(null), { dir } = useDirection(), uid = useId$2(id2), popover = usePopover({
|
|
14338
14380
|
middlewares,
|
|
14339
14381
|
width,
|
|
@@ -14417,29 +14459,29 @@ Popover.Target = PopoverTarget;
|
|
|
14417
14459
|
Popover.Dropdown = PopoverDropdown;
|
|
14418
14460
|
Popover.displayName = "@mantine/core/Popover";
|
|
14419
14461
|
Popover.extend = (input) => input;
|
|
14420
|
-
var __default__$
|
|
14421
|
-
const classes$
|
|
14422
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14423
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14424
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14425
|
-
] })), Dots = reactExports.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { component: "span", className: clsx(classes$
|
|
14426
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14427
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14428
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$
|
|
14429
|
-
] })), Oval = reactExports.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "span", className: clsx(classes$
|
|
14462
|
+
var __default__$v = { root: "m_5ae2e3c", barsLoader: "m_7a2bd4cd", bar: "m_870bb79", "bars-loader-animation": "m_5d2b3b9d", dotsLoader: "m_4e3f22d7", dot: "m_870c4af", "loader-dots-animation": "m_aac34a1", ovalLoader: "m_b34414df", "oval-loader-animation": "m_f8e89c4b" };
|
|
14463
|
+
const classes$t = __default__$v, Bars = reactExports.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { component: "span", className: clsx(classes$t.barsLoader, className), ...others, ref, children: [
|
|
14464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.bar }),
|
|
14465
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.bar }),
|
|
14466
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.bar })
|
|
14467
|
+
] })), Dots = reactExports.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { component: "span", className: clsx(classes$t.dotsLoader, className), ...others, ref, children: [
|
|
14468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.dot }),
|
|
14469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.dot }),
|
|
14470
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes$t.dot })
|
|
14471
|
+
] })), Oval = reactExports.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "span", className: clsx(classes$t.ovalLoader, className), ...others, ref })), defaultLoaders = {
|
|
14430
14472
|
bars: Bars,
|
|
14431
14473
|
oval: Oval,
|
|
14432
14474
|
dots: Dots
|
|
14433
|
-
}, defaultProps$
|
|
14475
|
+
}, defaultProps$1c = {
|
|
14434
14476
|
loaders: defaultLoaders,
|
|
14435
14477
|
type: "oval"
|
|
14436
|
-
}, varsResolver$
|
|
14478
|
+
}, varsResolver$y = (theme2, { size: size2, color: color2 }) => ({
|
|
14437
14479
|
root: {
|
|
14438
14480
|
"--loader-size": getSize(size2, "loader-size"),
|
|
14439
14481
|
"--loader-color": color2 ? getThemeColor(color2, theme2) : void 0
|
|
14440
14482
|
}
|
|
14441
14483
|
}), Loader = factory((_props, ref) => {
|
|
14442
|
-
const props2 = useProps("Loader", defaultProps$
|
|
14484
|
+
const props2 = useProps("Loader", defaultProps$1c, _props), {
|
|
14443
14485
|
size: size2,
|
|
14444
14486
|
color: color2,
|
|
14445
14487
|
type,
|
|
@@ -14456,14 +14498,14 @@ const classes$v = __default__$x, Bars = reactExports.forwardRef(({ className, ..
|
|
|
14456
14498
|
} = props2, getStyles2 = useStyles({
|
|
14457
14499
|
name: "Loader",
|
|
14458
14500
|
props: props2,
|
|
14459
|
-
classes: classes$
|
|
14501
|
+
classes: classes$t,
|
|
14460
14502
|
className,
|
|
14461
14503
|
style: style2,
|
|
14462
14504
|
classNames,
|
|
14463
14505
|
styles,
|
|
14464
14506
|
unstyled,
|
|
14465
14507
|
vars,
|
|
14466
|
-
varsResolver: varsResolver$
|
|
14508
|
+
varsResolver: varsResolver$y
|
|
14467
14509
|
});
|
|
14468
14510
|
return children2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ...getStyles2("root"), ref, ...others, children: children2 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14469
14511
|
Box,
|
|
@@ -14478,15 +14520,15 @@ const classes$v = __default__$x, Bars = reactExports.forwardRef(({ className, ..
|
|
|
14478
14520
|
);
|
|
14479
14521
|
});
|
|
14480
14522
|
Loader.defaultLoaders = defaultLoaders;
|
|
14481
|
-
Loader.classes = classes$
|
|
14523
|
+
Loader.classes = classes$t;
|
|
14482
14524
|
Loader.displayName = "@mantine/core/Loader";
|
|
14483
|
-
var __default__$
|
|
14484
|
-
const classes$
|
|
14525
|
+
var __default__$u = { root: "m_8d3f4000", icon: "m_8d3afb97", loader: "m_302b9fb1", group: "m_1a0f1b21" };
|
|
14526
|
+
const classes$s = __default__$u, defaultProps$1b = {
|
|
14485
14527
|
orientation: "horizontal"
|
|
14486
|
-
}, varsResolver$
|
|
14528
|
+
}, varsResolver$x = (_, { borderWidth }) => ({
|
|
14487
14529
|
group: { "--ai-border-width": rem(borderWidth) }
|
|
14488
14530
|
}), ActionIconGroup = factory((_props, ref) => {
|
|
14489
|
-
const props2 = useProps("ActionIconGroup", defaultProps$
|
|
14531
|
+
const props2 = useProps("ActionIconGroup", defaultProps$1b, _props), {
|
|
14490
14532
|
className,
|
|
14491
14533
|
style: style2,
|
|
14492
14534
|
classNames,
|
|
@@ -14498,17 +14540,17 @@ const classes$u = __default__$w, defaultProps$1d = {
|
|
|
14498
14540
|
variant,
|
|
14499
14541
|
mod,
|
|
14500
14542
|
...others
|
|
14501
|
-
} = useProps("ActionIconGroup", defaultProps$
|
|
14543
|
+
} = useProps("ActionIconGroup", defaultProps$1b, _props), getStyles2 = useStyles({
|
|
14502
14544
|
name: "ActionIconGroup",
|
|
14503
14545
|
props: props2,
|
|
14504
|
-
classes: classes$
|
|
14546
|
+
classes: classes$s,
|
|
14505
14547
|
className,
|
|
14506
14548
|
style: style2,
|
|
14507
14549
|
classNames,
|
|
14508
14550
|
styles,
|
|
14509
14551
|
unstyled,
|
|
14510
14552
|
vars,
|
|
14511
|
-
varsResolver: varsResolver$
|
|
14553
|
+
varsResolver: varsResolver$x,
|
|
14512
14554
|
rootSelector: "group"
|
|
14513
14555
|
});
|
|
14514
14556
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -14523,9 +14565,9 @@ const classes$u = __default__$w, defaultProps$1d = {
|
|
|
14523
14565
|
}
|
|
14524
14566
|
);
|
|
14525
14567
|
});
|
|
14526
|
-
ActionIconGroup.classes = classes$
|
|
14568
|
+
ActionIconGroup.classes = classes$s;
|
|
14527
14569
|
ActionIconGroup.displayName = "@mantine/core/ActionIconGroup";
|
|
14528
|
-
const defaultProps$
|
|
14570
|
+
const defaultProps$1a = {}, varsResolver$w = (theme2, { size: size2, radius, variant, gradient, color: color2, autoContrast }) => {
|
|
14529
14571
|
const colors2 = theme2.variantColorResolver({
|
|
14530
14572
|
color: color2 || theme2.primaryColor,
|
|
14531
14573
|
theme: theme2,
|
|
@@ -14545,7 +14587,7 @@ const defaultProps$1c = {}, varsResolver$x = (theme2, { size: size2, radius, var
|
|
|
14545
14587
|
}
|
|
14546
14588
|
};
|
|
14547
14589
|
}, ActionIcon = polymorphicFactory((_props, ref) => {
|
|
14548
|
-
const props2 = useProps("ActionIcon", defaultProps$
|
|
14590
|
+
const props2 = useProps("ActionIcon", defaultProps$1a, _props), {
|
|
14549
14591
|
className,
|
|
14550
14592
|
unstyled,
|
|
14551
14593
|
variant,
|
|
@@ -14571,12 +14613,12 @@ const defaultProps$1c = {}, varsResolver$x = (theme2, { size: size2, radius, var
|
|
|
14571
14613
|
props: props2,
|
|
14572
14614
|
className,
|
|
14573
14615
|
style: style2,
|
|
14574
|
-
classes: classes$
|
|
14616
|
+
classes: classes$s,
|
|
14575
14617
|
classNames,
|
|
14576
14618
|
styles,
|
|
14577
14619
|
unstyled,
|
|
14578
14620
|
vars,
|
|
14579
|
-
varsResolver: varsResolver$
|
|
14621
|
+
varsResolver: varsResolver$w
|
|
14580
14622
|
});
|
|
14581
14623
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
14582
14624
|
UnstyledButton,
|
|
@@ -14596,7 +14638,7 @@ const defaultProps$1c = {}, varsResolver$x = (theme2, { size: size2, radius, var
|
|
|
14596
14638
|
}
|
|
14597
14639
|
);
|
|
14598
14640
|
});
|
|
14599
|
-
ActionIcon.classes = classes$
|
|
14641
|
+
ActionIcon.classes = classes$s;
|
|
14600
14642
|
ActionIcon.displayName = "@mantine/core/ActionIcon";
|
|
14601
14643
|
ActionIcon.Group = ActionIconGroup;
|
|
14602
14644
|
const CloseIcon = reactExports.forwardRef(
|
|
@@ -14622,17 +14664,17 @@ const CloseIcon = reactExports.forwardRef(
|
|
|
14622
14664
|
)
|
|
14623
14665
|
);
|
|
14624
14666
|
CloseIcon.displayName = "@mantine/core/CloseIcon";
|
|
14625
|
-
var __default__$
|
|
14626
|
-
const classes$
|
|
14667
|
+
var __default__$t = { root: "m_86a44da5", "root--subtle": "m_220c80f2" };
|
|
14668
|
+
const classes$r = __default__$t, defaultProps$19 = {
|
|
14627
14669
|
variant: "subtle"
|
|
14628
|
-
}, varsResolver$
|
|
14670
|
+
}, varsResolver$v = (_, { size: size2, radius, iconSize }) => ({
|
|
14629
14671
|
root: {
|
|
14630
14672
|
"--cb-size": getSize(size2, "cb-size"),
|
|
14631
14673
|
"--cb-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
14632
14674
|
"--cb-icon-size": rem(iconSize)
|
|
14633
14675
|
}
|
|
14634
14676
|
}), CloseButton = polymorphicFactory((_props, ref) => {
|
|
14635
|
-
const props2 = useProps("CloseButton", defaultProps$
|
|
14677
|
+
const props2 = useProps("CloseButton", defaultProps$19, _props), {
|
|
14636
14678
|
iconSize,
|
|
14637
14679
|
children: children2,
|
|
14638
14680
|
vars,
|
|
@@ -14653,12 +14695,12 @@ const classes$t = __default__$v, defaultProps$1b = {
|
|
|
14653
14695
|
props: props2,
|
|
14654
14696
|
className,
|
|
14655
14697
|
style: style2,
|
|
14656
|
-
classes: classes$
|
|
14698
|
+
classes: classes$r,
|
|
14657
14699
|
classNames,
|
|
14658
14700
|
styles,
|
|
14659
14701
|
unstyled,
|
|
14660
14702
|
vars,
|
|
14661
|
-
varsResolver: varsResolver$
|
|
14703
|
+
varsResolver: varsResolver$v
|
|
14662
14704
|
});
|
|
14663
14705
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
14664
14706
|
UnstyledButton,
|
|
@@ -14677,19 +14719,19 @@ const classes$t = __default__$v, defaultProps$1b = {
|
|
|
14677
14719
|
}
|
|
14678
14720
|
);
|
|
14679
14721
|
});
|
|
14680
|
-
CloseButton.classes = classes$
|
|
14722
|
+
CloseButton.classes = classes$r;
|
|
14681
14723
|
CloseButton.displayName = "@mantine/core/CloseButton";
|
|
14682
14724
|
function filterFalsyChildren(children2) {
|
|
14683
14725
|
return reactExports.Children.toArray(children2).filter(Boolean);
|
|
14684
14726
|
}
|
|
14685
|
-
var __default__$
|
|
14686
|
-
const classes$
|
|
14727
|
+
var __default__$s = { root: "m_4081bf90" };
|
|
14728
|
+
const classes$q = __default__$s, defaultProps$18 = {
|
|
14687
14729
|
preventGrowOverflow: !0,
|
|
14688
14730
|
gap: "md",
|
|
14689
14731
|
align: "center",
|
|
14690
14732
|
justify: "flex-start",
|
|
14691
14733
|
wrap: "wrap"
|
|
14692
|
-
}, varsResolver$
|
|
14734
|
+
}, varsResolver$u = (_, { grow, preventGrowOverflow, gap, align, justify, wrap }, { childWidth }) => ({
|
|
14693
14735
|
root: {
|
|
14694
14736
|
"--group-child-width": grow && preventGrowOverflow ? childWidth : void 0,
|
|
14695
14737
|
"--group-gap": getSpacing(gap),
|
|
@@ -14698,7 +14740,7 @@ const classes$s = __default__$u, defaultProps$1a = {
|
|
|
14698
14740
|
"--group-wrap": wrap
|
|
14699
14741
|
}
|
|
14700
14742
|
}), Group = factory((_props, ref) => {
|
|
14701
|
-
const props2 = useProps("Group", defaultProps$
|
|
14743
|
+
const props2 = useProps("Group", defaultProps$18, _props), {
|
|
14702
14744
|
classNames,
|
|
14703
14745
|
className,
|
|
14704
14746
|
style: style2,
|
|
@@ -14722,12 +14764,12 @@ const classes$s = __default__$u, defaultProps$1a = {
|
|
|
14722
14764
|
stylesCtx,
|
|
14723
14765
|
className,
|
|
14724
14766
|
style: style2,
|
|
14725
|
-
classes: classes$
|
|
14767
|
+
classes: classes$q,
|
|
14726
14768
|
classNames,
|
|
14727
14769
|
styles,
|
|
14728
14770
|
unstyled,
|
|
14729
14771
|
vars,
|
|
14730
|
-
varsResolver: varsResolver$
|
|
14772
|
+
varsResolver: varsResolver$u
|
|
14731
14773
|
});
|
|
14732
14774
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14733
14775
|
Box,
|
|
@@ -14742,12 +14784,12 @@ const classes$s = __default__$u, defaultProps$1a = {
|
|
|
14742
14784
|
}
|
|
14743
14785
|
);
|
|
14744
14786
|
});
|
|
14745
|
-
Group.classes = classes$
|
|
14787
|
+
Group.classes = classes$q;
|
|
14746
14788
|
Group.displayName = "@mantine/core/Group";
|
|
14747
|
-
var __default__$
|
|
14748
|
-
const classes$
|
|
14789
|
+
var __default__$r = { root: "m_9814e45f" };
|
|
14790
|
+
const classes$p = __default__$r, defaultProps$17 = {
|
|
14749
14791
|
zIndex: getDefaultZIndex("modal")
|
|
14750
|
-
}, varsResolver$
|
|
14792
|
+
}, varsResolver$t = (_, { gradient, color: color2, backgroundOpacity, blur, radius, zIndex }) => ({
|
|
14751
14793
|
root: {
|
|
14752
14794
|
"--overlay-bg": gradient || (color2 !== void 0 || backgroundOpacity !== void 0) && rgba$2(color2 || "#000", backgroundOpacity ?? 0.6) || void 0,
|
|
14753
14795
|
"--overlay-filter": blur ? `blur(${rem(blur)})` : void 0,
|
|
@@ -14755,7 +14797,7 @@ const classes$r = __default__$t, defaultProps$19 = {
|
|
|
14755
14797
|
"--overlay-z-index": zIndex?.toString()
|
|
14756
14798
|
}
|
|
14757
14799
|
}), Overlay = polymorphicFactory((_props, ref) => {
|
|
14758
|
-
const props2 = useProps("Overlay", defaultProps$
|
|
14800
|
+
const props2 = useProps("Overlay", defaultProps$17, _props), {
|
|
14759
14801
|
classNames,
|
|
14760
14802
|
className,
|
|
14761
14803
|
style: style2,
|
|
@@ -14776,18 +14818,18 @@ const classes$r = __default__$t, defaultProps$19 = {
|
|
|
14776
14818
|
} = props2, getStyles2 = useStyles({
|
|
14777
14819
|
name: "Overlay",
|
|
14778
14820
|
props: props2,
|
|
14779
|
-
classes: classes$
|
|
14821
|
+
classes: classes$p,
|
|
14780
14822
|
className,
|
|
14781
14823
|
style: style2,
|
|
14782
14824
|
classNames,
|
|
14783
14825
|
styles,
|
|
14784
14826
|
unstyled,
|
|
14785
14827
|
vars,
|
|
14786
|
-
varsResolver: varsResolver$
|
|
14828
|
+
varsResolver: varsResolver$t
|
|
14787
14829
|
});
|
|
14788
14830
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ref, ...getStyles2("root"), mod: [{ center, fixed }, mod], ...others, children: children2 });
|
|
14789
14831
|
});
|
|
14790
|
-
Overlay.classes = classes$
|
|
14832
|
+
Overlay.classes = classes$p;
|
|
14791
14833
|
Overlay.displayName = "@mantine/core/Overlay";
|
|
14792
14834
|
const [ModalBaseProvider, useModalBaseContext] = createSafeContext(
|
|
14793
14835
|
"ModalBase component was not found in tree"
|
|
@@ -14886,7 +14928,7 @@ function useModalBodyId() {
|
|
|
14886
14928
|
const ctx = useModalBaseContext();
|
|
14887
14929
|
return reactExports.useEffect(() => (ctx.setBodyMounted(!0), () => ctx.setBodyMounted(!1)), []), ctx.getBodyId();
|
|
14888
14930
|
}
|
|
14889
|
-
var __default__$
|
|
14931
|
+
var __default__$q = { title: "m_615af6c9", header: "m_b5489c3c", inner: "m_60c222c7", content: "m_fd1ab0aa", close: "m_606cb269", body: "m_5df29311" };
|
|
14890
14932
|
const ModalBaseBody = reactExports.forwardRef(
|
|
14891
14933
|
({ className, ...others }, ref) => {
|
|
14892
14934
|
const bodyId = useModalBodyId(), ctx = useModalBaseContext();
|
|
@@ -14896,7 +14938,7 @@ const ModalBaseBody = reactExports.forwardRef(
|
|
|
14896
14938
|
ref,
|
|
14897
14939
|
...others,
|
|
14898
14940
|
id: bodyId,
|
|
14899
|
-
className: clsx({ [__default__$
|
|
14941
|
+
className: clsx({ [__default__$q.body]: !ctx.unstyled }, className)
|
|
14900
14942
|
}
|
|
14901
14943
|
);
|
|
14902
14944
|
}
|
|
@@ -14913,7 +14955,7 @@ const ModalBaseCloseButton = reactExports.forwardRef(
|
|
|
14913
14955
|
onClick: (event) => {
|
|
14914
14956
|
ctx.onClose(), onClick?.(event);
|
|
14915
14957
|
},
|
|
14916
|
-
className: clsx({ [__default__$
|
|
14958
|
+
className: clsx({ [__default__$q.close]: !ctx.unstyled }, className),
|
|
14917
14959
|
unstyled: ctx.unstyled
|
|
14918
14960
|
}
|
|
14919
14961
|
);
|
|
@@ -14934,7 +14976,7 @@ const ModalBaseContent = reactExports.forwardRef(
|
|
|
14934
14976
|
"div",
|
|
14935
14977
|
{
|
|
14936
14978
|
...innerProps,
|
|
14937
|
-
className: clsx({ [__default__$
|
|
14979
|
+
className: clsx({ [__default__$q.inner]: !ctx.unstyled }, innerProps.className),
|
|
14938
14980
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FocusTrap, { active: ctx.opened && ctx.trapFocus, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14939
14981
|
Paper,
|
|
14940
14982
|
{
|
|
@@ -14947,7 +14989,7 @@ const ModalBaseContent = reactExports.forwardRef(
|
|
|
14947
14989
|
"aria-labelledby": ctx.titleMounted ? ctx.getTitleId() : void 0,
|
|
14948
14990
|
ref,
|
|
14949
14991
|
style: [style2, transitionStyles],
|
|
14950
|
-
className: clsx({ [__default__$
|
|
14992
|
+
className: clsx({ [__default__$q.content]: !ctx.unstyled }, className),
|
|
14951
14993
|
unstyled: ctx.unstyled,
|
|
14952
14994
|
children: others.children
|
|
14953
14995
|
}
|
|
@@ -14965,7 +15007,7 @@ const ModalBaseContent = reactExports.forwardRef(
|
|
|
14965
15007
|
{
|
|
14966
15008
|
component: "header",
|
|
14967
15009
|
ref,
|
|
14968
|
-
className: clsx({ [__default__$
|
|
15010
|
+
className: clsx({ [__default__$q.header]: !ctx.unstyled }, className),
|
|
14969
15011
|
...others
|
|
14970
15012
|
}
|
|
14971
15013
|
);
|
|
@@ -15013,7 +15055,7 @@ const ModalBaseTitle = reactExports.forwardRef(
|
|
|
15013
15055
|
{
|
|
15014
15056
|
component: "h2",
|
|
15015
15057
|
ref,
|
|
15016
|
-
className: clsx({ [__default__$
|
|
15058
|
+
className: clsx({ [__default__$q.title]: !ctx.unstyled }, className),
|
|
15017
15059
|
...others,
|
|
15018
15060
|
id: id2
|
|
15019
15061
|
}
|
|
@@ -15032,13 +15074,13 @@ const [InputWrapperProvider, useInputWrapperContext] = createOptionalContext({
|
|
|
15032
15074
|
inputId: void 0,
|
|
15033
15075
|
labelId: void 0
|
|
15034
15076
|
});
|
|
15035
|
-
var __default__$
|
|
15036
|
-
const classes$
|
|
15077
|
+
var __default__$p = { wrapper: "m_6c018570", input: "m_8fb7ebe7", section: "m_82577fc2", placeholder: "m_88bacfd0", root: "m_46b77525", label: "m_8fdc1311", required: "m_78a94662", error: "m_8f816625", description: "m_fe47ce59" };
|
|
15078
|
+
const classes$o = __default__$p, defaultProps$16 = {}, varsResolver$s = (_, { size: size2 }) => ({
|
|
15037
15079
|
description: {
|
|
15038
15080
|
"--input-description-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
|
|
15039
15081
|
}
|
|
15040
15082
|
}), InputDescription = factory((_props, ref) => {
|
|
15041
|
-
const props2 = useProps("InputDescription", defaultProps$
|
|
15083
|
+
const props2 = useProps("InputDescription", defaultProps$16, _props), {
|
|
15042
15084
|
classNames,
|
|
15043
15085
|
className,
|
|
15044
15086
|
style: style2,
|
|
@@ -15050,10 +15092,10 @@ const classes$q = __default__$r, defaultProps$18 = {}, varsResolver$t = (_, { si
|
|
|
15050
15092
|
__inheritStyles = !0,
|
|
15051
15093
|
variant,
|
|
15052
15094
|
...others
|
|
15053
|
-
} = useProps("InputDescription", defaultProps$
|
|
15095
|
+
} = useProps("InputDescription", defaultProps$16, props2), ctx = useInputWrapperContext(), _getStyles = useStyles({
|
|
15054
15096
|
name: ["InputWrapper", __staticSelector],
|
|
15055
15097
|
props: props2,
|
|
15056
|
-
classes: classes$
|
|
15098
|
+
classes: classes$o,
|
|
15057
15099
|
className,
|
|
15058
15100
|
style: style2,
|
|
15059
15101
|
classNames,
|
|
@@ -15061,7 +15103,7 @@ const classes$q = __default__$r, defaultProps$18 = {}, varsResolver$t = (_, { si
|
|
|
15061
15103
|
unstyled,
|
|
15062
15104
|
rootSelector: "description",
|
|
15063
15105
|
vars,
|
|
15064
|
-
varsResolver: varsResolver$
|
|
15106
|
+
varsResolver: varsResolver$s
|
|
15065
15107
|
}), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
|
|
15066
15108
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15067
15109
|
Box,
|
|
@@ -15075,14 +15117,14 @@ const classes$q = __default__$r, defaultProps$18 = {}, varsResolver$t = (_, { si
|
|
|
15075
15117
|
}
|
|
15076
15118
|
);
|
|
15077
15119
|
});
|
|
15078
|
-
InputDescription.classes = classes$
|
|
15120
|
+
InputDescription.classes = classes$o;
|
|
15079
15121
|
InputDescription.displayName = "@mantine/core/InputDescription";
|
|
15080
|
-
const defaultProps$
|
|
15122
|
+
const defaultProps$15 = {}, varsResolver$r = (_, { size: size2 }) => ({
|
|
15081
15123
|
error: {
|
|
15082
15124
|
"--input-error-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
|
|
15083
15125
|
}
|
|
15084
15126
|
}), InputError = factory((_props, ref) => {
|
|
15085
|
-
const props2 = useProps("InputError", defaultProps$
|
|
15127
|
+
const props2 = useProps("InputError", defaultProps$15, _props), {
|
|
15086
15128
|
classNames,
|
|
15087
15129
|
className,
|
|
15088
15130
|
style: style2,
|
|
@@ -15097,7 +15139,7 @@ const defaultProps$17 = {}, varsResolver$s = (_, { size: size2 }) => ({
|
|
|
15097
15139
|
} = props2, _getStyles = useStyles({
|
|
15098
15140
|
name: ["InputWrapper", __staticSelector],
|
|
15099
15141
|
props: props2,
|
|
15100
|
-
classes: classes$
|
|
15142
|
+
classes: classes$o,
|
|
15101
15143
|
className,
|
|
15102
15144
|
style: style2,
|
|
15103
15145
|
classNames,
|
|
@@ -15105,7 +15147,7 @@ const defaultProps$17 = {}, varsResolver$s = (_, { size: size2 }) => ({
|
|
|
15105
15147
|
unstyled,
|
|
15106
15148
|
rootSelector: "error",
|
|
15107
15149
|
vars,
|
|
15108
|
-
varsResolver: varsResolver$
|
|
15150
|
+
varsResolver: varsResolver$r
|
|
15109
15151
|
}), ctx = useInputWrapperContext(), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
|
|
15110
15152
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15111
15153
|
Box,
|
|
@@ -15119,17 +15161,17 @@ const defaultProps$17 = {}, varsResolver$s = (_, { size: size2 }) => ({
|
|
|
15119
15161
|
}
|
|
15120
15162
|
);
|
|
15121
15163
|
});
|
|
15122
|
-
InputError.classes = classes$
|
|
15164
|
+
InputError.classes = classes$o;
|
|
15123
15165
|
InputError.displayName = "@mantine/core/InputError";
|
|
15124
|
-
const defaultProps$
|
|
15166
|
+
const defaultProps$14 = {
|
|
15125
15167
|
labelElement: "label"
|
|
15126
|
-
}, varsResolver$
|
|
15168
|
+
}, varsResolver$q = (_, { size: size2 }) => ({
|
|
15127
15169
|
label: {
|
|
15128
15170
|
"--input-label-size": getFontSize(size2),
|
|
15129
15171
|
"--input-asterisk-color": void 0
|
|
15130
15172
|
}
|
|
15131
15173
|
}), InputLabel = factory((_props, ref) => {
|
|
15132
|
-
const props2 = useProps("InputLabel", defaultProps$
|
|
15174
|
+
const props2 = useProps("InputLabel", defaultProps$14, _props), {
|
|
15133
15175
|
classNames,
|
|
15134
15176
|
className,
|
|
15135
15177
|
style: style2,
|
|
@@ -15146,10 +15188,10 @@ const defaultProps$16 = {
|
|
|
15146
15188
|
variant,
|
|
15147
15189
|
mod,
|
|
15148
15190
|
...others
|
|
15149
|
-
} = useProps("InputLabel", defaultProps$
|
|
15191
|
+
} = useProps("InputLabel", defaultProps$14, props2), _getStyles = useStyles({
|
|
15150
15192
|
name: ["InputWrapper", __staticSelector],
|
|
15151
15193
|
props: props2,
|
|
15152
|
-
classes: classes$
|
|
15194
|
+
classes: classes$o,
|
|
15153
15195
|
className,
|
|
15154
15196
|
style: style2,
|
|
15155
15197
|
classNames,
|
|
@@ -15157,7 +15199,7 @@ const defaultProps$16 = {
|
|
|
15157
15199
|
unstyled,
|
|
15158
15200
|
rootSelector: "label",
|
|
15159
15201
|
vars,
|
|
15160
|
-
varsResolver: varsResolver$
|
|
15202
|
+
varsResolver: varsResolver$q
|
|
15161
15203
|
}), ctx = useInputWrapperContext(), getStyles2 = ctx?.getStyles || _getStyles;
|
|
15162
15204
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
15163
15205
|
Box,
|
|
@@ -15180,10 +15222,10 @@ const defaultProps$16 = {
|
|
|
15180
15222
|
}
|
|
15181
15223
|
);
|
|
15182
15224
|
});
|
|
15183
|
-
InputLabel.classes = classes$
|
|
15225
|
+
InputLabel.classes = classes$o;
|
|
15184
15226
|
InputLabel.displayName = "@mantine/core/InputLabel";
|
|
15185
|
-
const defaultProps$
|
|
15186
|
-
const props2 = useProps("InputPlaceholder", defaultProps$
|
|
15227
|
+
const defaultProps$13 = {}, InputPlaceholder = factory((_props, ref) => {
|
|
15228
|
+
const props2 = useProps("InputPlaceholder", defaultProps$13, _props), {
|
|
15187
15229
|
classNames,
|
|
15188
15230
|
className,
|
|
15189
15231
|
style: style2,
|
|
@@ -15195,10 +15237,10 @@ const defaultProps$15 = {}, InputPlaceholder = factory((_props, ref) => {
|
|
|
15195
15237
|
error,
|
|
15196
15238
|
mod,
|
|
15197
15239
|
...others
|
|
15198
|
-
} = useProps("InputPlaceholder", defaultProps$
|
|
15240
|
+
} = useProps("InputPlaceholder", defaultProps$13, props2), getStyles2 = useStyles({
|
|
15199
15241
|
name: ["InputPlaceholder", __staticSelector],
|
|
15200
15242
|
props: props2,
|
|
15201
|
-
classes: classes$
|
|
15243
|
+
classes: classes$o,
|
|
15202
15244
|
className,
|
|
15203
15245
|
style: style2,
|
|
15204
15246
|
classNames,
|
|
@@ -15218,17 +15260,17 @@ const defaultProps$15 = {}, InputPlaceholder = factory((_props, ref) => {
|
|
|
15218
15260
|
}
|
|
15219
15261
|
);
|
|
15220
15262
|
});
|
|
15221
|
-
InputPlaceholder.classes = classes$
|
|
15263
|
+
InputPlaceholder.classes = classes$o;
|
|
15222
15264
|
InputPlaceholder.displayName = "@mantine/core/InputPlaceholder";
|
|
15223
15265
|
function getInputOffsets(inputWrapperOrder, { hasDescription, hasError }) {
|
|
15224
15266
|
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");
|
|
15225
15267
|
return { offsetBottom: hasDescription && belowInput.includes("description") || hasError && belowInput.includes("error"), offsetTop };
|
|
15226
15268
|
}
|
|
15227
|
-
const defaultProps$
|
|
15269
|
+
const defaultProps$12 = {
|
|
15228
15270
|
labelElement: "label",
|
|
15229
15271
|
inputContainer: (children2) => children2,
|
|
15230
15272
|
inputWrapperOrder: ["label", "description", "input", "error"]
|
|
15231
|
-
}, varsResolver$
|
|
15273
|
+
}, varsResolver$p = (_, { size: size2 }) => ({
|
|
15232
15274
|
label: {
|
|
15233
15275
|
"--input-label-size": getFontSize(size2),
|
|
15234
15276
|
"--input-asterisk-color": void 0
|
|
@@ -15240,7 +15282,7 @@ const defaultProps$14 = {
|
|
|
15240
15282
|
"--input-description-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
|
|
15241
15283
|
}
|
|
15242
15284
|
}), InputWrapper = factory((_props, ref) => {
|
|
15243
|
-
const props2 = useProps("InputWrapper", defaultProps$
|
|
15285
|
+
const props2 = useProps("InputWrapper", defaultProps$12, _props), {
|
|
15244
15286
|
classNames,
|
|
15245
15287
|
className,
|
|
15246
15288
|
style: style2,
|
|
@@ -15269,14 +15311,14 @@ const defaultProps$14 = {
|
|
|
15269
15311
|
} = props2, getStyles2 = useStyles({
|
|
15270
15312
|
name: ["InputWrapper", __staticSelector],
|
|
15271
15313
|
props: __stylesApiProps || props2,
|
|
15272
|
-
classes: classes$
|
|
15314
|
+
classes: classes$o,
|
|
15273
15315
|
className,
|
|
15274
15316
|
style: style2,
|
|
15275
15317
|
classNames,
|
|
15276
15318
|
styles,
|
|
15277
15319
|
unstyled,
|
|
15278
15320
|
vars,
|
|
15279
|
-
varsResolver: varsResolver$
|
|
15321
|
+
varsResolver: varsResolver$p
|
|
15280
15322
|
}), sharedProps = {
|
|
15281
15323
|
size: size2,
|
|
15282
15324
|
variant,
|
|
@@ -15352,15 +15394,15 @@ const defaultProps$14 = {
|
|
|
15352
15394
|
}
|
|
15353
15395
|
);
|
|
15354
15396
|
});
|
|
15355
|
-
InputWrapper.classes = classes$
|
|
15397
|
+
InputWrapper.classes = classes$o;
|
|
15356
15398
|
InputWrapper.displayName = "@mantine/core/InputWrapper";
|
|
15357
|
-
const defaultProps$
|
|
15399
|
+
const defaultProps$11 = {
|
|
15358
15400
|
variant: "default",
|
|
15359
15401
|
leftSectionPointerEvents: "none",
|
|
15360
15402
|
rightSectionPointerEvents: "none",
|
|
15361
15403
|
withAria: !0,
|
|
15362
15404
|
withErrorStyles: !0
|
|
15363
|
-
}, varsResolver$
|
|
15405
|
+
}, varsResolver$o = (_, props2, ctx) => ({
|
|
15364
15406
|
wrapper: {
|
|
15365
15407
|
"--input-margin-top": ctx.offsetTop ? "calc(var(--mantine-spacing-xs) / 2)" : void 0,
|
|
15366
15408
|
"--input-margin-bottom": ctx.offsetBottom ? "calc(var(--mantine-spacing-xs) / 2)" : void 0,
|
|
@@ -15374,7 +15416,7 @@ const defaultProps$13 = {
|
|
|
15374
15416
|
"--input-right-section-pointer-events": props2.rightSectionPointerEvents
|
|
15375
15417
|
}
|
|
15376
15418
|
}), Input = polymorphicFactory((_props, ref) => {
|
|
15377
|
-
const props2 = useProps("Input", defaultProps$
|
|
15419
|
+
const props2 = useProps("Input", defaultProps$11, _props), {
|
|
15378
15420
|
classNames,
|
|
15379
15421
|
className,
|
|
15380
15422
|
style: style2,
|
|
@@ -15409,7 +15451,7 @@ const defaultProps$13 = {
|
|
|
15409
15451
|
} = props2, { styleProps, rest } = extractStyleProps(others), ctx = useInputWrapperContext(), stylesCtx = { offsetBottom: ctx?.offsetBottom, offsetTop: ctx?.offsetTop }, getStyles2 = useStyles({
|
|
15410
15452
|
name: ["Input", __staticSelector],
|
|
15411
15453
|
props: __stylesApiProps || props2,
|
|
15412
|
-
classes: classes$
|
|
15454
|
+
classes: classes$o,
|
|
15413
15455
|
className,
|
|
15414
15456
|
style: style2,
|
|
15415
15457
|
classNames,
|
|
@@ -15418,7 +15460,7 @@ const defaultProps$13 = {
|
|
|
15418
15460
|
stylesCtx,
|
|
15419
15461
|
rootSelector: "wrapper",
|
|
15420
15462
|
vars,
|
|
15421
|
-
varsResolver: varsResolver$
|
|
15463
|
+
varsResolver: varsResolver$o
|
|
15422
15464
|
}), ariaAttributes = withAria ? {
|
|
15423
15465
|
required,
|
|
15424
15466
|
disabled,
|
|
@@ -15488,7 +15530,7 @@ const defaultProps$13 = {
|
|
|
15488
15530
|
}
|
|
15489
15531
|
);
|
|
15490
15532
|
});
|
|
15491
|
-
Input.classes = classes$
|
|
15533
|
+
Input.classes = classes$o;
|
|
15492
15534
|
Input.Wrapper = InputWrapper;
|
|
15493
15535
|
Input.Label = InputLabel;
|
|
15494
15536
|
Input.Error = InputError;
|
|
@@ -15565,11 +15607,11 @@ function useInputProps(component, defaultProps2, _props) {
|
|
|
15565
15607
|
}
|
|
15566
15608
|
};
|
|
15567
15609
|
}
|
|
15568
|
-
const defaultProps$
|
|
15610
|
+
const defaultProps$10 = {
|
|
15569
15611
|
__staticSelector: "InputBase",
|
|
15570
15612
|
withAria: !0
|
|
15571
15613
|
}, InputBase = polymorphicFactory((props2, ref) => {
|
|
15572
|
-
const { inputProps, wrapperProps, ...others } = useInputProps("InputBase", defaultProps$
|
|
15614
|
+
const { inputProps, wrapperProps, ...others } = useInputProps("InputBase", defaultProps$10, props2);
|
|
15573
15615
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Input.Wrapper, { ...wrapperProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { ...inputProps, ...others, ref }) });
|
|
15574
15616
|
});
|
|
15575
15617
|
InputBase.classes = { ...Input.classes, ...Input.Wrapper.classes };
|
|
@@ -15583,9 +15625,9 @@ const FLEX_STYLE_PROPS_DATA = {
|
|
|
15583
15625
|
wrap: { type: "identity", property: "flexWrap" },
|
|
15584
15626
|
direction: { type: "identity", property: "flexDirection" }
|
|
15585
15627
|
};
|
|
15586
|
-
var __default__$
|
|
15587
|
-
const classes$
|
|
15588
|
-
const props2 = useProps("Flex", defaultProps
|
|
15628
|
+
var __default__$o = { root: "m_8bffd616" };
|
|
15629
|
+
const classes$n = __default__$o, defaultProps$$ = {}, Flex = polymorphicFactory((_props, ref) => {
|
|
15630
|
+
const props2 = useProps("Flex", defaultProps$$, _props), {
|
|
15589
15631
|
classNames,
|
|
15590
15632
|
className,
|
|
15591
15633
|
style: style2,
|
|
@@ -15602,7 +15644,7 @@ const classes$p = __default__$q, defaultProps$11 = {}, Flex = polymorphicFactory
|
|
|
15602
15644
|
...others
|
|
15603
15645
|
} = props2, getStyles2 = useStyles({
|
|
15604
15646
|
name: "Flex",
|
|
15605
|
-
classes: classes$
|
|
15647
|
+
classes: classes$n,
|
|
15606
15648
|
props: props2,
|
|
15607
15649
|
className,
|
|
15608
15650
|
style: style2,
|
|
@@ -15637,7 +15679,7 @@ const classes$p = __default__$q, defaultProps$11 = {}, Flex = polymorphicFactory
|
|
|
15637
15679
|
)
|
|
15638
15680
|
] });
|
|
15639
15681
|
});
|
|
15640
|
-
Flex.classes = classes$
|
|
15682
|
+
Flex.classes = classes$n;
|
|
15641
15683
|
Flex.displayName = "@mantine/core/Flex";
|
|
15642
15684
|
function isParent(parentElement, childElement) {
|
|
15643
15685
|
if (!childElement || !parentElement)
|
|
@@ -15703,13 +15745,13 @@ function useFloatingIndicator({
|
|
|
15703
15745
|
() => document.documentElement
|
|
15704
15746
|
), { initialized, hidden: hidden2 };
|
|
15705
15747
|
}
|
|
15706
|
-
var __default__$
|
|
15707
|
-
const classes$
|
|
15748
|
+
var __default__$n = { root: "m_96b553a6" };
|
|
15749
|
+
const classes$m = __default__$n, defaultProps$_ = {}, varsResolver$n = (_theme, { transitionDuration }) => ({
|
|
15708
15750
|
root: {
|
|
15709
15751
|
"--transition-duration": typeof transitionDuration == "number" ? `${transitionDuration}ms` : transitionDuration
|
|
15710
15752
|
}
|
|
15711
15753
|
}), FloatingIndicator = factory((_props, ref) => {
|
|
15712
|
-
const props2 = useProps("FloatingIndicator", defaultProps$
|
|
15754
|
+
const props2 = useProps("FloatingIndicator", defaultProps$_, _props), {
|
|
15713
15755
|
classNames,
|
|
15714
15756
|
className,
|
|
15715
15757
|
style: style2,
|
|
@@ -15724,7 +15766,7 @@ const classes$o = __default__$p, defaultProps$10 = {}, varsResolver$o = (_theme,
|
|
|
15724
15766
|
...others
|
|
15725
15767
|
} = props2, getStyles2 = useStyles({
|
|
15726
15768
|
name: "FloatingIndicator",
|
|
15727
|
-
classes: classes$
|
|
15769
|
+
classes: classes$m,
|
|
15728
15770
|
props: props2,
|
|
15729
15771
|
className,
|
|
15730
15772
|
style: style2,
|
|
@@ -15732,7 +15774,7 @@ const classes$o = __default__$p, defaultProps$10 = {}, varsResolver$o = (_theme,
|
|
|
15732
15774
|
styles,
|
|
15733
15775
|
unstyled,
|
|
15734
15776
|
vars,
|
|
15735
|
-
varsResolver: varsResolver$
|
|
15777
|
+
varsResolver: varsResolver$n
|
|
15736
15778
|
}), innerRef = reactExports.useRef(null), { initialized, hidden: hidden2 } = useFloatingIndicator({
|
|
15737
15779
|
target,
|
|
15738
15780
|
parent,
|
|
@@ -15742,9 +15784,9 @@ const classes$o = __default__$p, defaultProps$10 = {}, varsResolver$o = (_theme,
|
|
|
15742
15784
|
return !target || !parent ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ref: mergedRef, mod: [{ initialized, hidden: hidden2 }, mod], ...getStyles2("root"), ...others });
|
|
15743
15785
|
});
|
|
15744
15786
|
FloatingIndicator.displayName = "@mantine/core/FloatingIndicator";
|
|
15745
|
-
FloatingIndicator.classes = classes$
|
|
15746
|
-
var __default__$
|
|
15747
|
-
const classes$
|
|
15787
|
+
FloatingIndicator.classes = classes$m;
|
|
15788
|
+
var __default__$m = { root: "m_66836ed3", wrapper: "m_a5d60502", body: "m_667c2793", title: "m_6a03f287", label: "m_698f4f23", icon: "m_667f2a6a", message: "m_7fa78076", closeButton: "m_87f54839" };
|
|
15789
|
+
const classes$l = __default__$m, defaultProps$Z = {}, varsResolver$m = (theme2, { radius, color: color2, variant, autoContrast }) => {
|
|
15748
15790
|
const colors2 = theme2.variantColorResolver({
|
|
15749
15791
|
color: color2 || theme2.primaryColor,
|
|
15750
15792
|
theme: theme2,
|
|
@@ -15760,7 +15802,7 @@ const classes$n = __default__$o, defaultProps$$ = {}, varsResolver$n = (theme2,
|
|
|
15760
15802
|
}
|
|
15761
15803
|
};
|
|
15762
15804
|
}, Alert = factory((_props, ref) => {
|
|
15763
|
-
const props2 = useProps("Alert", defaultProps
|
|
15805
|
+
const props2 = useProps("Alert", defaultProps$Z, _props), {
|
|
15764
15806
|
classNames,
|
|
15765
15807
|
className,
|
|
15766
15808
|
style: style2,
|
|
@@ -15781,7 +15823,7 @@ const classes$n = __default__$o, defaultProps$$ = {}, varsResolver$n = (theme2,
|
|
|
15781
15823
|
...others
|
|
15782
15824
|
} = props2, getStyles2 = useStyles({
|
|
15783
15825
|
name: "Alert",
|
|
15784
|
-
classes: classes$
|
|
15826
|
+
classes: classes$l,
|
|
15785
15827
|
props: props2,
|
|
15786
15828
|
className,
|
|
15787
15829
|
style: style2,
|
|
@@ -15789,7 +15831,7 @@ const classes$n = __default__$o, defaultProps$$ = {}, varsResolver$n = (theme2,
|
|
|
15789
15831
|
styles,
|
|
15790
15832
|
unstyled,
|
|
15791
15833
|
vars,
|
|
15792
|
-
varsResolver: varsResolver$
|
|
15834
|
+
varsResolver: varsResolver$m
|
|
15793
15835
|
}), rootId = useId$2(id2), titleId = title2 && `${rootId}-title` || void 0, bodyId = `${rootId}-body`;
|
|
15794
15836
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15795
15837
|
Box,
|
|
@@ -15824,19 +15866,19 @@ const classes$n = __default__$o, defaultProps$$ = {}, varsResolver$n = (theme2,
|
|
|
15824
15866
|
}
|
|
15825
15867
|
);
|
|
15826
15868
|
});
|
|
15827
|
-
Alert.classes = classes$
|
|
15869
|
+
Alert.classes = classes$l;
|
|
15828
15870
|
Alert.displayName = "@mantine/core/Alert";
|
|
15829
|
-
var __default__$
|
|
15830
|
-
const classes$
|
|
15871
|
+
var __default__$l = { root: "m_b6d8b162" };
|
|
15872
|
+
const classes$k = __default__$l;
|
|
15831
15873
|
function getTextTruncate(truncate) {
|
|
15832
15874
|
if (truncate === "start")
|
|
15833
15875
|
return "start";
|
|
15834
15876
|
if (truncate === "end" || truncate)
|
|
15835
15877
|
return "end";
|
|
15836
15878
|
}
|
|
15837
|
-
const defaultProps$
|
|
15879
|
+
const defaultProps$Y = {
|
|
15838
15880
|
inherit: !1
|
|
15839
|
-
}, varsResolver$
|
|
15881
|
+
}, varsResolver$l = (theme2, { variant, lineClamp, gradient, size: size2, color: color2 }) => ({
|
|
15840
15882
|
root: {
|
|
15841
15883
|
"--text-fz": getFontSize(size2),
|
|
15842
15884
|
"--text-lh": getLineHeight(size2),
|
|
@@ -15845,7 +15887,7 @@ const defaultProps$_ = {
|
|
|
15845
15887
|
"--text-color": color2 ? getThemeColor(color2, theme2) : void 0
|
|
15846
15888
|
}
|
|
15847
15889
|
}), Text = polymorphicFactory((_props, ref) => {
|
|
15848
|
-
const props2 = useProps("Text", defaultProps$
|
|
15890
|
+
const props2 = useProps("Text", defaultProps$Y, _props), {
|
|
15849
15891
|
lineClamp,
|
|
15850
15892
|
truncate,
|
|
15851
15893
|
inline: inline2,
|
|
@@ -15866,14 +15908,14 @@ const defaultProps$_ = {
|
|
|
15866
15908
|
} = props2, getStyles2 = useStyles({
|
|
15867
15909
|
name: ["Text", __staticSelector],
|
|
15868
15910
|
props: props2,
|
|
15869
|
-
classes: classes$
|
|
15911
|
+
classes: classes$k,
|
|
15870
15912
|
className,
|
|
15871
15913
|
style: style2,
|
|
15872
15914
|
classNames,
|
|
15873
15915
|
styles,
|
|
15874
15916
|
unstyled,
|
|
15875
15917
|
vars,
|
|
15876
|
-
varsResolver: varsResolver$
|
|
15918
|
+
varsResolver: varsResolver$l
|
|
15877
15919
|
});
|
|
15878
15920
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15879
15921
|
Box,
|
|
@@ -15896,15 +15938,15 @@ const defaultProps$_ = {
|
|
|
15896
15938
|
}
|
|
15897
15939
|
);
|
|
15898
15940
|
});
|
|
15899
|
-
Text.classes = classes$
|
|
15941
|
+
Text.classes = classes$k;
|
|
15900
15942
|
Text.displayName = "@mantine/core/Text";
|
|
15901
|
-
var __default__$
|
|
15902
|
-
const defaultProps$
|
|
15943
|
+
var __default__$k = { root: "m_849cf0da" };
|
|
15944
|
+
const defaultProps$X = {
|
|
15903
15945
|
underline: "hover"
|
|
15904
15946
|
}, Anchor = polymorphicFactory((props2, ref) => {
|
|
15905
15947
|
const { underline, className, unstyled, mod, ...others } = useProps(
|
|
15906
15948
|
"Anchor",
|
|
15907
|
-
defaultProps$
|
|
15949
|
+
defaultProps$X,
|
|
15908
15950
|
props2
|
|
15909
15951
|
);
|
|
15910
15952
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -15912,7 +15954,7 @@ const defaultProps$Z = {
|
|
|
15912
15954
|
{
|
|
15913
15955
|
component: "a",
|
|
15914
15956
|
ref,
|
|
15915
|
-
className: clsx({ [__default__$
|
|
15957
|
+
className: clsx({ [__default__$k.root]: !unstyled }, className),
|
|
15916
15958
|
...others,
|
|
15917
15959
|
mod: [{ underline }, mod],
|
|
15918
15960
|
__staticSelector: "Anchor",
|
|
@@ -15920,7 +15962,7 @@ const defaultProps$Z = {
|
|
|
15920
15962
|
}
|
|
15921
15963
|
);
|
|
15922
15964
|
});
|
|
15923
|
-
Anchor.classes = __default__$
|
|
15965
|
+
Anchor.classes = __default__$k;
|
|
15924
15966
|
Anchor.displayName = "@mantine/core/Anchor";
|
|
15925
15967
|
function parseItem(item) {
|
|
15926
15968
|
return typeof item == "string" ? { value: item, label: item } : "value" in item && !("label" in item) ? { value: item.value, label: item.value, disabled: item.disabled } : typeof item == "number" ? { value: item.toString(), label: item.toString() } : "group" in item ? {
|
|
@@ -15934,17 +15976,17 @@ function getParsedComboboxData(data) {
|
|
|
15934
15976
|
function getOptionsLockup(options) {
|
|
15935
15977
|
return options.reduce((acc, item) => "group" in item ? { ...acc, ...getOptionsLockup(item.items) } : (acc[item.value] = item, acc), {});
|
|
15936
15978
|
}
|
|
15937
|
-
var __default__$
|
|
15938
|
-
const classes$
|
|
15979
|
+
var __default__$j = { dropdown: "m_88b62a41", options: "m_b2821a6e", option: "m_92253aa5", search: "m_985517d8", empty: "m_2530cd1d", header: "m_858f94bd", footer: "m_82b967cb", group: "m_254f3e4f", groupLabel: "m_2bb2e9e5", chevron: "m_2943220b", optionsDropdownOption: "m_390b5f4", optionsDropdownCheckIcon: "m_8ee53fc2" };
|
|
15980
|
+
const classes$j = __default__$j, defaultProps$W = {
|
|
15939
15981
|
error: null
|
|
15940
|
-
}, varsResolver$
|
|
15982
|
+
}, varsResolver$k = (_, { size: size2 }) => ({
|
|
15941
15983
|
chevron: {
|
|
15942
15984
|
"--combobox-chevron-size": getSize(size2, "combobox-chevron-size")
|
|
15943
15985
|
}
|
|
15944
15986
|
}), ComboboxChevron = factory((_props, ref) => {
|
|
15945
|
-
const props2 = useProps("ComboboxChevron", defaultProps$
|
|
15987
|
+
const props2 = useProps("ComboboxChevron", defaultProps$W, _props), { size: size2, error, style: style2, className, classNames, styles, unstyled, vars, mod, ...others } = props2, getStyles2 = useStyles({
|
|
15946
15988
|
name: "ComboboxChevron",
|
|
15947
|
-
classes: classes$
|
|
15989
|
+
classes: classes$j,
|
|
15948
15990
|
props: props2,
|
|
15949
15991
|
style: style2,
|
|
15950
15992
|
className,
|
|
@@ -15952,7 +15994,7 @@ const classes$l = __default__$l, defaultProps$Y = {
|
|
|
15952
15994
|
styles,
|
|
15953
15995
|
unstyled,
|
|
15954
15996
|
vars,
|
|
15955
|
-
varsResolver: varsResolver$
|
|
15997
|
+
varsResolver: varsResolver$k,
|
|
15956
15998
|
rootSelector: "chevron"
|
|
15957
15999
|
});
|
|
15958
16000
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -15979,7 +16021,7 @@ const classes$l = __default__$l, defaultProps$Y = {
|
|
|
15979
16021
|
}
|
|
15980
16022
|
);
|
|
15981
16023
|
});
|
|
15982
|
-
ComboboxChevron.classes = classes$
|
|
16024
|
+
ComboboxChevron.classes = classes$j;
|
|
15983
16025
|
ComboboxChevron.displayName = "@mantine/core/ComboboxChevron";
|
|
15984
16026
|
const [ComboboxProvider, useComboboxContext] = createSafeContext(
|
|
15985
16027
|
"Combobox component was not found in tree"
|
|
@@ -16003,10 +16045,10 @@ const [ComboboxProvider, useComboboxContext] = createSafeContext(
|
|
|
16003
16045
|
)
|
|
16004
16046
|
);
|
|
16005
16047
|
ComboboxClearButton.displayName = "@mantine/core/ComboboxClearButton";
|
|
16006
|
-
const defaultProps$
|
|
16048
|
+
const defaultProps$V = {}, ComboboxDropdown = factory((props2, ref) => {
|
|
16007
16049
|
const { classNames, styles, className, style: style2, hidden: hidden2, ...others } = useProps(
|
|
16008
16050
|
"ComboboxDropdown",
|
|
16009
|
-
defaultProps$
|
|
16051
|
+
defaultProps$V,
|
|
16010
16052
|
props2
|
|
16011
16053
|
), ctx = useComboboxContext();
|
|
16012
16054
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16020,12 +16062,12 @@ const defaultProps$X = {}, ComboboxDropdown = factory((props2, ref) => {
|
|
|
16020
16062
|
}
|
|
16021
16063
|
);
|
|
16022
16064
|
});
|
|
16023
|
-
ComboboxDropdown.classes = classes$
|
|
16065
|
+
ComboboxDropdown.classes = classes$j;
|
|
16024
16066
|
ComboboxDropdown.displayName = "@mantine/core/ComboboxDropdown";
|
|
16025
|
-
const defaultProps$
|
|
16067
|
+
const defaultProps$U = {
|
|
16026
16068
|
refProp: "ref"
|
|
16027
16069
|
}, ComboboxDropdownTarget = factory((props2, ref) => {
|
|
16028
|
-
const { children: children2, refProp } = useProps("ComboboxDropdownTarget", defaultProps$
|
|
16070
|
+
const { children: children2, refProp } = useProps("ComboboxDropdownTarget", defaultProps$U, props2);
|
|
16029
16071
|
if (useComboboxContext(), !isElement$1(children2))
|
|
16030
16072
|
throw new Error(
|
|
16031
16073
|
"Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
|
|
@@ -16033,10 +16075,10 @@ const defaultProps$W = {
|
|
|
16033
16075
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover.Target, { ref, refProp, children: children2 });
|
|
16034
16076
|
});
|
|
16035
16077
|
ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
|
|
16036
|
-
const defaultProps$
|
|
16078
|
+
const defaultProps$T = {}, ComboboxEmpty = factory((props2, ref) => {
|
|
16037
16079
|
const { classNames, className, style: style2, styles, vars, ...others } = useProps(
|
|
16038
16080
|
"ComboboxEmpty",
|
|
16039
|
-
defaultProps$
|
|
16081
|
+
defaultProps$T,
|
|
16040
16082
|
props2
|
|
16041
16083
|
), ctx = useComboboxContext();
|
|
16042
16084
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16048,7 +16090,7 @@ const defaultProps$V = {}, ComboboxEmpty = factory((props2, ref) => {
|
|
|
16048
16090
|
}
|
|
16049
16091
|
);
|
|
16050
16092
|
});
|
|
16051
|
-
ComboboxEmpty.classes = classes$
|
|
16093
|
+
ComboboxEmpty.classes = classes$j;
|
|
16052
16094
|
ComboboxEmpty.displayName = "@mantine/core/ComboboxEmpty";
|
|
16053
16095
|
function useComboboxTargetProps({
|
|
16054
16096
|
onKeyDown,
|
|
@@ -16084,7 +16126,7 @@ function useComboboxTargetProps({
|
|
|
16084
16126
|
onKeyDown: handleKeyDown
|
|
16085
16127
|
};
|
|
16086
16128
|
}
|
|
16087
|
-
const defaultProps$
|
|
16129
|
+
const defaultProps$S = {
|
|
16088
16130
|
refProp: "ref",
|
|
16089
16131
|
targetType: "input",
|
|
16090
16132
|
withKeyboardNavigation: !0,
|
|
@@ -16101,7 +16143,7 @@ const defaultProps$U = {
|
|
|
16101
16143
|
targetType,
|
|
16102
16144
|
autoComplete,
|
|
16103
16145
|
...others
|
|
16104
|
-
} = useProps("ComboboxEventsTarget", defaultProps$
|
|
16146
|
+
} = useProps("ComboboxEventsTarget", defaultProps$S, props2);
|
|
16105
16147
|
if (!isElement$1(children2))
|
|
16106
16148
|
throw new Error(
|
|
16107
16149
|
"Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
|
|
@@ -16121,10 +16163,10 @@ const defaultProps$U = {
|
|
|
16121
16163
|
});
|
|
16122
16164
|
});
|
|
16123
16165
|
ComboboxEventsTarget.displayName = "@mantine/core/ComboboxEventsTarget";
|
|
16124
|
-
const defaultProps$
|
|
16166
|
+
const defaultProps$R = {}, ComboboxFooter = factory((props2, ref) => {
|
|
16125
16167
|
const { classNames, className, style: style2, styles, vars, ...others } = useProps(
|
|
16126
16168
|
"ComboboxFooter",
|
|
16127
|
-
defaultProps$
|
|
16169
|
+
defaultProps$R,
|
|
16128
16170
|
props2
|
|
16129
16171
|
), ctx = useComboboxContext();
|
|
16130
16172
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16139,12 +16181,12 @@ const defaultProps$T = {}, ComboboxFooter = factory((props2, ref) => {
|
|
|
16139
16181
|
}
|
|
16140
16182
|
);
|
|
16141
16183
|
});
|
|
16142
|
-
ComboboxFooter.classes = classes$
|
|
16184
|
+
ComboboxFooter.classes = classes$j;
|
|
16143
16185
|
ComboboxFooter.displayName = "@mantine/core/ComboboxFooter";
|
|
16144
|
-
const defaultProps$
|
|
16186
|
+
const defaultProps$Q = {}, ComboboxGroup = factory((props2, ref) => {
|
|
16145
16187
|
const { classNames, className, style: style2, styles, vars, children: children2, label, ...others } = useProps(
|
|
16146
16188
|
"ComboboxGroup",
|
|
16147
|
-
defaultProps$
|
|
16189
|
+
defaultProps$Q,
|
|
16148
16190
|
props2
|
|
16149
16191
|
), ctx = useComboboxContext();
|
|
16150
16192
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -16160,12 +16202,12 @@ const defaultProps$S = {}, ComboboxGroup = factory((props2, ref) => {
|
|
|
16160
16202
|
}
|
|
16161
16203
|
);
|
|
16162
16204
|
});
|
|
16163
|
-
ComboboxGroup.classes = classes$
|
|
16205
|
+
ComboboxGroup.classes = classes$j;
|
|
16164
16206
|
ComboboxGroup.displayName = "@mantine/core/ComboboxGroup";
|
|
16165
|
-
const defaultProps$
|
|
16207
|
+
const defaultProps$P = {}, ComboboxHeader = factory((props2, ref) => {
|
|
16166
16208
|
const { classNames, className, style: style2, styles, vars, ...others } = useProps(
|
|
16167
16209
|
"ComboboxHeader",
|
|
16168
|
-
defaultProps$
|
|
16210
|
+
defaultProps$P,
|
|
16169
16211
|
props2
|
|
16170
16212
|
), ctx = useComboboxContext();
|
|
16171
16213
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16180,7 +16222,7 @@ const defaultProps$R = {}, ComboboxHeader = factory((props2, ref) => {
|
|
|
16180
16222
|
}
|
|
16181
16223
|
);
|
|
16182
16224
|
});
|
|
16183
|
-
ComboboxHeader.classes = classes$
|
|
16225
|
+
ComboboxHeader.classes = classes$j;
|
|
16184
16226
|
ComboboxHeader.displayName = "@mantine/core/ComboboxHeader";
|
|
16185
16227
|
function ComboboxHiddenInput({
|
|
16186
16228
|
value,
|
|
@@ -16197,8 +16239,8 @@ function ComboboxHiddenInput({
|
|
|
16197
16239
|
);
|
|
16198
16240
|
}
|
|
16199
16241
|
ComboboxHiddenInput.displayName = "@mantine/core/ComboboxHiddenInput";
|
|
16200
|
-
const defaultProps$
|
|
16201
|
-
const props2 = useProps("ComboboxOption", defaultProps$
|
|
16242
|
+
const defaultProps$O = {}, ComboboxOption = factory((_props, ref) => {
|
|
16243
|
+
const props2 = useProps("ComboboxOption", defaultProps$O, _props), {
|
|
16202
16244
|
classNames,
|
|
16203
16245
|
className,
|
|
16204
16246
|
style: style2,
|
|
@@ -16239,10 +16281,10 @@ const defaultProps$Q = {}, ComboboxOption = factory((_props, ref) => {
|
|
|
16239
16281
|
}
|
|
16240
16282
|
);
|
|
16241
16283
|
});
|
|
16242
|
-
ComboboxOption.classes = classes$
|
|
16284
|
+
ComboboxOption.classes = classes$j;
|
|
16243
16285
|
ComboboxOption.displayName = "@mantine/core/ComboboxOption";
|
|
16244
|
-
const defaultProps$
|
|
16245
|
-
const props2 = useProps("ComboboxOptions", defaultProps$
|
|
16286
|
+
const defaultProps$N = {}, ComboboxOptions = factory((_props, ref) => {
|
|
16287
|
+
const props2 = useProps("ComboboxOptions", defaultProps$N, _props), { classNames, className, style: style2, styles, id: id2, onMouseDown, labelledBy, ...others } = props2, ctx = useComboboxContext(), _id = useId$2(id2);
|
|
16246
16288
|
return reactExports.useEffect(() => {
|
|
16247
16289
|
ctx.store.setListId(_id);
|
|
16248
16290
|
}, [_id]), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16260,13 +16302,13 @@ const defaultProps$P = {}, ComboboxOptions = factory((_props, ref) => {
|
|
|
16260
16302
|
}
|
|
16261
16303
|
);
|
|
16262
16304
|
});
|
|
16263
|
-
ComboboxOptions.classes = classes$
|
|
16305
|
+
ComboboxOptions.classes = classes$j;
|
|
16264
16306
|
ComboboxOptions.displayName = "@mantine/core/ComboboxOptions";
|
|
16265
|
-
const defaultProps$
|
|
16307
|
+
const defaultProps$M = {
|
|
16266
16308
|
withAriaAttributes: !0,
|
|
16267
16309
|
withKeyboardNavigation: !0
|
|
16268
16310
|
}, ComboboxSearch = factory((_props, ref) => {
|
|
16269
|
-
const props2 = useProps("ComboboxSearch", defaultProps$
|
|
16311
|
+
const props2 = useProps("ComboboxSearch", defaultProps$M, _props), {
|
|
16270
16312
|
classNames,
|
|
16271
16313
|
styles,
|
|
16272
16314
|
unstyled,
|
|
@@ -16297,9 +16339,9 @@ const defaultProps$O = {
|
|
|
16297
16339
|
}
|
|
16298
16340
|
);
|
|
16299
16341
|
});
|
|
16300
|
-
ComboboxSearch.classes = classes$
|
|
16342
|
+
ComboboxSearch.classes = classes$j;
|
|
16301
16343
|
ComboboxSearch.displayName = "@mantine/core/ComboboxSearch";
|
|
16302
|
-
const defaultProps$
|
|
16344
|
+
const defaultProps$L = {
|
|
16303
16345
|
refProp: "ref",
|
|
16304
16346
|
targetType: "input",
|
|
16305
16347
|
withKeyboardNavigation: !0,
|
|
@@ -16316,7 +16358,7 @@ const defaultProps$N = {
|
|
|
16316
16358
|
targetType,
|
|
16317
16359
|
autoComplete,
|
|
16318
16360
|
...others
|
|
16319
|
-
} = useProps("ComboboxTarget", defaultProps$
|
|
16361
|
+
} = useProps("ComboboxTarget", defaultProps$L, props2);
|
|
16320
16362
|
if (!isElement$1(children2))
|
|
16321
16363
|
throw new Error(
|
|
16322
16364
|
"Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
|
|
@@ -16493,13 +16535,13 @@ function useCombobox({
|
|
|
16493
16535
|
focusTarget
|
|
16494
16536
|
};
|
|
16495
16537
|
}
|
|
16496
|
-
const defaultProps$
|
|
16538
|
+
const defaultProps$K = {
|
|
16497
16539
|
keepMounted: !0,
|
|
16498
16540
|
withinPortal: !0,
|
|
16499
16541
|
resetSelectionOnOptionHover: !1,
|
|
16500
16542
|
width: "target",
|
|
16501
16543
|
transitionProps: { transition: "fade", duration: 0 }
|
|
16502
|
-
}, varsResolver$
|
|
16544
|
+
}, varsResolver$j = (_, { size: size2, dropdownPadding }) => ({
|
|
16503
16545
|
options: {
|
|
16504
16546
|
"--combobox-option-fz": getFontSize(size2),
|
|
16505
16547
|
"--combobox-option-padding": getSize(size2, "combobox-option-padding")
|
|
@@ -16511,7 +16553,7 @@ const defaultProps$M = {
|
|
|
16511
16553
|
}
|
|
16512
16554
|
});
|
|
16513
16555
|
function Combobox(_props) {
|
|
16514
|
-
const props2 = useProps("Combobox", defaultProps$
|
|
16556
|
+
const props2 = useProps("Combobox", defaultProps$K, _props), {
|
|
16515
16557
|
classNames,
|
|
16516
16558
|
styles,
|
|
16517
16559
|
unstyled,
|
|
@@ -16528,13 +16570,13 @@ function Combobox(_props) {
|
|
|
16528
16570
|
...others
|
|
16529
16571
|
} = props2, uncontrolledStore = useCombobox(), store = controlledStore || uncontrolledStore, getStyles2 = useStyles({
|
|
16530
16572
|
name: __staticSelector || "Combobox",
|
|
16531
|
-
classes: classes$
|
|
16573
|
+
classes: classes$j,
|
|
16532
16574
|
props: props2,
|
|
16533
16575
|
classNames,
|
|
16534
16576
|
styles,
|
|
16535
16577
|
unstyled,
|
|
16536
16578
|
vars,
|
|
16537
|
-
varsResolver: varsResolver$
|
|
16579
|
+
varsResolver: varsResolver$j
|
|
16538
16580
|
}), onDropdownClose = () => {
|
|
16539
16581
|
onClose?.(), store.closeDropdown();
|
|
16540
16582
|
};
|
|
@@ -16565,7 +16607,7 @@ function Combobox(_props) {
|
|
|
16565
16607
|
}
|
|
16566
16608
|
const extendCombobox = (c) => c;
|
|
16567
16609
|
Combobox.extend = extendCombobox;
|
|
16568
|
-
Combobox.classes = classes$
|
|
16610
|
+
Combobox.classes = classes$j;
|
|
16569
16611
|
Combobox.displayName = "@mantine/core/Combobox";
|
|
16570
16612
|
Combobox.Target = ComboboxTarget;
|
|
16571
16613
|
Combobox.Dropdown = ComboboxDropdown;
|
|
@@ -16667,7 +16709,7 @@ function Option({
|
|
|
16667
16709
|
renderOption
|
|
16668
16710
|
}) {
|
|
16669
16711
|
if (!isOptionsGroup(data)) {
|
|
16670
|
-
const checked = isValueChecked(value, data.value), check = withCheckIcon && checked && /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: classes$
|
|
16712
|
+
const checked = isValueChecked(value, data.value), check = withCheckIcon && checked && /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: classes$j.optionsDropdownCheckIcon }), defaultContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
16671
16713
|
checkIconPosition === "left" && check,
|
|
16672
16714
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: data.label }),
|
|
16673
16715
|
checkIconPosition === "right" && check
|
|
@@ -16677,7 +16719,7 @@ function Option({
|
|
|
16677
16719
|
{
|
|
16678
16720
|
value: data.value,
|
|
16679
16721
|
disabled: data.disabled,
|
|
16680
|
-
className: clsx({ [classes$
|
|
16722
|
+
className: clsx({ [classes$j.optionsDropdownOption]: !unstyled }),
|
|
16681
16723
|
"data-reverse": checkIconPosition === "right" || void 0,
|
|
16682
16724
|
"data-checked": checked || void 0,
|
|
16683
16725
|
"aria-selected": checked,
|
|
@@ -16752,79 +16794,8 @@ function OptionsDropdown({
|
|
|
16752
16794
|
isEmpty2 && nothingFoundMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(Combobox.Empty, { children: nothingFoundMessage })
|
|
16753
16795
|
] }) });
|
|
16754
16796
|
}
|
|
16755
|
-
var __default__$
|
|
16756
|
-
const classes$
|
|
16757
|
-
const colors2 = theme2.variantColorResolver({
|
|
16758
|
-
color: color2 || theme2.primaryColor,
|
|
16759
|
-
theme: theme2,
|
|
16760
|
-
gradient,
|
|
16761
|
-
variant: variant || "filled",
|
|
16762
|
-
autoContrast
|
|
16763
|
-
});
|
|
16764
|
-
return {
|
|
16765
|
-
root: {
|
|
16766
|
-
"--badge-height": getSize(size2, "badge-height"),
|
|
16767
|
-
"--badge-padding-x": getSize(size2, "badge-padding-x"),
|
|
16768
|
-
"--badge-fz": getSize(size2, "badge-fz"),
|
|
16769
|
-
"--badge-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
16770
|
-
"--badge-bg": color2 || variant ? colors2.background : void 0,
|
|
16771
|
-
"--badge-color": color2 || variant ? colors2.color : void 0,
|
|
16772
|
-
"--badge-bd": color2 || variant ? colors2.border : void 0,
|
|
16773
|
-
"--badge-dot-color": variant === "dot" ? getThemeColor(color2, theme2) : void 0
|
|
16774
|
-
}
|
|
16775
|
-
};
|
|
16776
|
-
}, Badge = polymorphicFactory((_props, ref) => {
|
|
16777
|
-
const props2 = useProps("Badge", defaultProps$L, _props), {
|
|
16778
|
-
classNames,
|
|
16779
|
-
className,
|
|
16780
|
-
style: style2,
|
|
16781
|
-
styles,
|
|
16782
|
-
unstyled,
|
|
16783
|
-
vars,
|
|
16784
|
-
radius,
|
|
16785
|
-
color: color2,
|
|
16786
|
-
gradient,
|
|
16787
|
-
leftSection,
|
|
16788
|
-
rightSection,
|
|
16789
|
-
children: children2,
|
|
16790
|
-
variant,
|
|
16791
|
-
fullWidth,
|
|
16792
|
-
autoContrast,
|
|
16793
|
-
circle,
|
|
16794
|
-
mod,
|
|
16795
|
-
...others
|
|
16796
|
-
} = props2, getStyles2 = useStyles({
|
|
16797
|
-
name: "Badge",
|
|
16798
|
-
props: props2,
|
|
16799
|
-
classes: classes$k,
|
|
16800
|
-
className,
|
|
16801
|
-
style: style2,
|
|
16802
|
-
classNames,
|
|
16803
|
-
styles,
|
|
16804
|
-
unstyled,
|
|
16805
|
-
vars,
|
|
16806
|
-
varsResolver: varsResolver$j
|
|
16807
|
-
});
|
|
16808
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
16809
|
-
Box,
|
|
16810
|
-
{
|
|
16811
|
-
variant,
|
|
16812
|
-
mod: [{ block: fullWidth, circle }, mod],
|
|
16813
|
-
...getStyles2("root", { variant }),
|
|
16814
|
-
ref,
|
|
16815
|
-
...others,
|
|
16816
|
-
children: [
|
|
16817
|
-
leftSection && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { ...getStyles2("section"), "data-position": "left", children: leftSection }),
|
|
16818
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { ...getStyles2("label"), children: children2 }),
|
|
16819
|
-
rightSection && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { ...getStyles2("section"), "data-position": "right", children: rightSection })
|
|
16820
|
-
]
|
|
16821
|
-
}
|
|
16822
|
-
);
|
|
16823
|
-
});
|
|
16824
|
-
Badge.classes = classes$k;
|
|
16825
|
-
Badge.displayName = "@mantine/core/Badge";
|
|
16826
|
-
var __default__$j = { root: "m_fea6bf1a", burger: "m_d4fb9cad" };
|
|
16827
|
-
const classes$j = __default__$j, defaultProps$K = {}, varsResolver$i = (theme2, { color: color2, size: size2, transitionDuration, transitionTimingFunction }) => ({
|
|
16797
|
+
var __default__$i = { root: "m_fea6bf1a", burger: "m_d4fb9cad" };
|
|
16798
|
+
const classes$i = __default__$i, defaultProps$J = {}, varsResolver$i = (theme2, { color: color2, size: size2, transitionDuration, transitionTimingFunction }) => ({
|
|
16828
16799
|
root: {
|
|
16829
16800
|
"--burger-color": color2 ? getThemeColor(color2, theme2) : void 0,
|
|
16830
16801
|
"--burger-size": getSize(size2, "burger-size"),
|
|
@@ -16832,7 +16803,7 @@ const classes$j = __default__$j, defaultProps$K = {}, varsResolver$i = (theme2,
|
|
|
16832
16803
|
"--burger-transition-timing-function": transitionTimingFunction
|
|
16833
16804
|
}
|
|
16834
16805
|
}), Burger = factory((_props, ref) => {
|
|
16835
|
-
const props2 = useProps("Burger", defaultProps$
|
|
16806
|
+
const props2 = useProps("Burger", defaultProps$J, _props), {
|
|
16836
16807
|
classNames,
|
|
16837
16808
|
className,
|
|
16838
16809
|
style: style2,
|
|
@@ -16846,7 +16817,7 @@ const classes$j = __default__$j, defaultProps$K = {}, varsResolver$i = (theme2,
|
|
|
16846
16817
|
...others
|
|
16847
16818
|
} = props2, getStyles2 = useStyles({
|
|
16848
16819
|
name: "Burger",
|
|
16849
|
-
classes: classes$
|
|
16820
|
+
classes: classes$i,
|
|
16850
16821
|
props: props2,
|
|
16851
16822
|
className,
|
|
16852
16823
|
style: style2,
|
|
@@ -16861,15 +16832,15 @@ const classes$j = __default__$j, defaultProps$K = {}, varsResolver$i = (theme2,
|
|
|
16861
16832
|
children2
|
|
16862
16833
|
] });
|
|
16863
16834
|
});
|
|
16864
|
-
Burger.classes = classes$
|
|
16835
|
+
Burger.classes = classes$i;
|
|
16865
16836
|
Burger.displayName = "@mantine/core/Burger";
|
|
16866
|
-
var __default__$
|
|
16867
|
-
const classes$
|
|
16837
|
+
var __default__$h = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844" };
|
|
16838
|
+
const classes$h = __default__$h, defaultProps$I = {
|
|
16868
16839
|
orientation: "horizontal"
|
|
16869
16840
|
}, varsResolver$h = (_, { borderWidth }) => ({
|
|
16870
16841
|
group: { "--button-border-width": rem(borderWidth) }
|
|
16871
16842
|
}), ButtonGroup = factory((_props, ref) => {
|
|
16872
|
-
const props2 = useProps("ButtonGroup", defaultProps$
|
|
16843
|
+
const props2 = useProps("ButtonGroup", defaultProps$I, _props), {
|
|
16873
16844
|
className,
|
|
16874
16845
|
style: style2,
|
|
16875
16846
|
classNames,
|
|
@@ -16881,10 +16852,10 @@ const classes$i = __default__$i, defaultProps$J = {
|
|
|
16881
16852
|
variant,
|
|
16882
16853
|
mod,
|
|
16883
16854
|
...others
|
|
16884
|
-
} = useProps("ButtonGroup", defaultProps$
|
|
16855
|
+
} = useProps("ButtonGroup", defaultProps$I, _props), getStyles2 = useStyles({
|
|
16885
16856
|
name: "ButtonGroup",
|
|
16886
16857
|
props: props2,
|
|
16887
|
-
classes: classes$
|
|
16858
|
+
classes: classes$h,
|
|
16888
16859
|
className,
|
|
16889
16860
|
style: style2,
|
|
16890
16861
|
classNames,
|
|
@@ -16906,14 +16877,14 @@ const classes$i = __default__$i, defaultProps$J = {
|
|
|
16906
16877
|
}
|
|
16907
16878
|
);
|
|
16908
16879
|
});
|
|
16909
|
-
ButtonGroup.classes = classes$
|
|
16880
|
+
ButtonGroup.classes = classes$h;
|
|
16910
16881
|
ButtonGroup.displayName = "@mantine/core/ButtonGroup";
|
|
16911
16882
|
const loaderTransition = {
|
|
16912
16883
|
in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },
|
|
16913
16884
|
out: { opacity: 0, transform: "translate(-50%, -200%)" },
|
|
16914
16885
|
common: { transformOrigin: "center" },
|
|
16915
16886
|
transitionProperty: "transform, opacity"
|
|
16916
|
-
}, defaultProps$
|
|
16887
|
+
}, defaultProps$H = {}, varsResolver$g = (theme2, { radius, color: color2, gradient, variant, size: size2, justify, autoContrast }) => {
|
|
16917
16888
|
const colors2 = theme2.variantColorResolver({
|
|
16918
16889
|
color: color2 || theme2.primaryColor,
|
|
16919
16890
|
theme: theme2,
|
|
@@ -16936,7 +16907,7 @@ const loaderTransition = {
|
|
|
16936
16907
|
}
|
|
16937
16908
|
};
|
|
16938
16909
|
}, Button = polymorphicFactory((_props, ref) => {
|
|
16939
|
-
const props2 = useProps("Button", defaultProps$
|
|
16910
|
+
const props2 = useProps("Button", defaultProps$H, _props), {
|
|
16940
16911
|
style: style2,
|
|
16941
16912
|
vars,
|
|
16942
16913
|
className,
|
|
@@ -16961,7 +16932,7 @@ const loaderTransition = {
|
|
|
16961
16932
|
} = props2, getStyles2 = useStyles({
|
|
16962
16933
|
name: "Button",
|
|
16963
16934
|
props: props2,
|
|
16964
|
-
classes: classes$
|
|
16935
|
+
classes: classes$h,
|
|
16965
16936
|
className,
|
|
16966
16937
|
style: style2,
|
|
16967
16938
|
classNames,
|
|
@@ -17007,15 +16978,15 @@ const loaderTransition = {
|
|
|
17007
16978
|
}
|
|
17008
16979
|
);
|
|
17009
16980
|
});
|
|
17010
|
-
Button.classes = classes$
|
|
16981
|
+
Button.classes = classes$h;
|
|
17011
16982
|
Button.displayName = "@mantine/core/Button";
|
|
17012
16983
|
Button.Group = ButtonGroup;
|
|
17013
16984
|
const [CardProvider, useCardContext] = createSafeContext(
|
|
17014
16985
|
"Card component was not found in tree"
|
|
17015
16986
|
);
|
|
17016
|
-
var __default__$
|
|
17017
|
-
const classes$
|
|
17018
|
-
const props2 = useProps("CardSection", defaultProps$
|
|
16987
|
+
var __default__$g = { root: "m_e615b15f", section: "m_599a2148" };
|
|
16988
|
+
const classes$g = __default__$g, defaultProps$G = {}, CardSection = polymorphicFactory((_props, ref) => {
|
|
16989
|
+
const props2 = useProps("CardSection", defaultProps$G, _props), { classNames, className, style: style2, styles, vars, withBorder, inheritPadding, mod, ...others } = props2, ctx = useCardContext();
|
|
17019
16990
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17020
16991
|
Box,
|
|
17021
16992
|
{
|
|
@@ -17026,17 +16997,17 @@ const classes$h = __default__$h, defaultProps$H = {}, CardSection = polymorphicF
|
|
|
17026
16997
|
}
|
|
17027
16998
|
);
|
|
17028
16999
|
});
|
|
17029
|
-
CardSection.classes = classes$
|
|
17000
|
+
CardSection.classes = classes$g;
|
|
17030
17001
|
CardSection.displayName = "@mantine/core/CardSection";
|
|
17031
|
-
const defaultProps$
|
|
17002
|
+
const defaultProps$F = {}, varsResolver$f = (_, { padding }) => ({
|
|
17032
17003
|
root: {
|
|
17033
17004
|
"--card-padding": getSpacing(padding)
|
|
17034
17005
|
}
|
|
17035
17006
|
}), Card = polymorphicFactory((_props, ref) => {
|
|
17036
|
-
const props2 = useProps("Card", defaultProps$
|
|
17007
|
+
const props2 = useProps("Card", defaultProps$F, _props), { classNames, className, style: style2, styles, unstyled, vars, children: children2, padding, ...others } = props2, getStyles2 = useStyles({
|
|
17037
17008
|
name: "Card",
|
|
17038
17009
|
props: props2,
|
|
17039
|
-
classes: classes$
|
|
17010
|
+
classes: classes$g,
|
|
17040
17011
|
className,
|
|
17041
17012
|
style: style2,
|
|
17042
17013
|
classNames,
|
|
@@ -17050,26 +17021,9 @@ const defaultProps$G = {}, varsResolver$f = (_, { padding }) => ({
|
|
|
17050
17021
|
}) : child);
|
|
17051
17022
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CardProvider, { value: { getStyles: getStyles2 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { ref, unstyled, ...getStyles2("root"), ...others, children: content2 }) });
|
|
17052
17023
|
});
|
|
17053
|
-
Card.classes = classes$
|
|
17024
|
+
Card.classes = classes$g;
|
|
17054
17025
|
Card.displayName = "@mantine/core/Card";
|
|
17055
17026
|
Card.Section = CardSection;
|
|
17056
|
-
var __default__$g = { root: "m_4451eb3a" };
|
|
17057
|
-
const classes$g = __default__$g, defaultProps$F = {}, Center = polymorphicFactory((_props, ref) => {
|
|
17058
|
-
const props2 = useProps("Center", defaultProps$F, _props), { classNames, className, style: style2, styles, unstyled, vars, inline: inline2, mod, ...others } = props2, getStyles2 = useStyles({
|
|
17059
|
-
name: "Center",
|
|
17060
|
-
props: props2,
|
|
17061
|
-
classes: classes$g,
|
|
17062
|
-
className,
|
|
17063
|
-
style: style2,
|
|
17064
|
-
classNames,
|
|
17065
|
-
styles,
|
|
17066
|
-
unstyled,
|
|
17067
|
-
vars
|
|
17068
|
-
});
|
|
17069
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { ref, mod: [{ inline: inline2 }, mod], ...getStyles2("root"), ...others });
|
|
17070
|
-
});
|
|
17071
|
-
Center.classes = classes$g;
|
|
17072
|
-
Center.displayName = "@mantine/core/Center";
|
|
17073
17027
|
var __default__$f = { root: "m_b183c0a2" };
|
|
17074
17028
|
const classes$f = __default__$f, defaultProps$E = {}, varsResolver$e = (theme2, { color: color2 }) => ({
|
|
17075
17029
|
root: {
|
|
@@ -22391,14 +22345,14 @@ function getEdgePosition(params) {
|
|
|
22391
22345
|
// when connection type is loose we can define all handles as sources and connect source -> source
|
|
22392
22346
|
params.connectionMode === ConnectionMode.Strict ? targetHandleBounds?.target ?? [] : (targetHandleBounds?.target ?? []).concat(targetHandleBounds?.source ?? []),
|
|
22393
22347
|
params.targetHandle
|
|
22394
|
-
)
|
|
22348
|
+
);
|
|
22395
22349
|
if (!sourceHandle || !targetHandle)
|
|
22396
22350
|
return params.onError?.("008", errorMessages.error008(sourceHandle ? "target" : "source", {
|
|
22397
22351
|
id: params.id,
|
|
22398
22352
|
sourceHandle: params.sourceHandle,
|
|
22399
22353
|
targetHandle: params.targetHandle
|
|
22400
22354
|
})), null;
|
|
22401
|
-
const [sourceX, sourceY] = getHandlePosition(
|
|
22355
|
+
const sourcePosition = sourceHandle?.position || Position.Bottom, targetPosition = targetHandle?.position || Position.Top, [sourceX, sourceY] = getHandlePosition(sourceNode, sourceHandle, sourcePosition), [targetX, targetY] = getHandlePosition(targetNode, targetHandle, targetPosition);
|
|
22402
22356
|
return {
|
|
22403
22357
|
sourceX,
|
|
22404
22358
|
sourceY,
|
|
@@ -22419,9 +22373,9 @@ function toHandleBounds(handles) {
|
|
|
22419
22373
|
target
|
|
22420
22374
|
};
|
|
22421
22375
|
}
|
|
22422
|
-
function getHandlePosition(
|
|
22376
|
+
function getHandlePosition(node, handle, fallbackPosition = Position.Left) {
|
|
22423
22377
|
const x2 = (handle?.x ?? 0) + node.internals.positionAbsolute.x, y2 = (handle?.y ?? 0) + node.internals.positionAbsolute.y, { width, height } = handle ?? getNodeDimensions(node);
|
|
22424
|
-
switch (position) {
|
|
22378
|
+
switch (handle?.position ?? fallbackPosition) {
|
|
22425
22379
|
case Position.Top:
|
|
22426
22380
|
return [x2 + width / 2, y2];
|
|
22427
22381
|
case Position.Right:
|
|
@@ -22790,13 +22744,19 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
|
|
|
22790
22744
|
};
|
|
22791
22745
|
}
|
|
22792
22746
|
function getHandles(node, handleBounds, type, currentHandle) {
|
|
22793
|
-
return (handleBounds[type] || []).reduce((res,
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22747
|
+
return (handleBounds[type] || []).reduce((res, handle) => {
|
|
22748
|
+
if (`${node.id}-${handle.id}-${type}` !== currentHandle) {
|
|
22749
|
+
const [x2, y2] = getHandlePosition(node, handle);
|
|
22750
|
+
res.push({
|
|
22751
|
+
id: handle.id || null,
|
|
22752
|
+
type,
|
|
22753
|
+
nodeId: node.id,
|
|
22754
|
+
x: x2,
|
|
22755
|
+
y: y2
|
|
22756
|
+
});
|
|
22757
|
+
}
|
|
22758
|
+
return res;
|
|
22759
|
+
}, []);
|
|
22800
22760
|
}
|
|
22801
22761
|
function getClosestHandle(pos, connectionRadius, handles) {
|
|
22802
22762
|
let closestHandles = [], minDistance = 1 / 0;
|
|
@@ -22827,7 +22787,7 @@ function getConnectionStatus(isInsideConnectionRadius, isHandleValid) {
|
|
|
22827
22787
|
}
|
|
22828
22788
|
const alwaysValid = () => !0;
|
|
22829
22789
|
let connectionStartHandle = null;
|
|
22830
|
-
function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid,
|
|
22790
|
+
function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform, getConnectionStartHandle }) {
|
|
22831
22791
|
const doc = getHostForElement(event.target);
|
|
22832
22792
|
let autoPanId = 0, closestHandle;
|
|
22833
22793
|
const { x: x2, y: y2 } = getEventPosition(event), clickedHandle = doc?.elementFromPoint(x2, y2), handleType = getHandleType(edgeUpdaterType, clickedHandle), containerBounds = domNode?.getBoundingClientRect();
|
|
@@ -22849,11 +22809,11 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
|
|
|
22849
22809
|
connectionStartHandle = {
|
|
22850
22810
|
nodeId,
|
|
22851
22811
|
handleId,
|
|
22852
|
-
type: handleType
|
|
22812
|
+
type: handleType,
|
|
22813
|
+
position: clickedHandle?.getAttribute("data-handlepos") || Position.Top
|
|
22853
22814
|
}, updateConnection({
|
|
22854
22815
|
connectionPosition,
|
|
22855
22816
|
connectionStatus: null,
|
|
22856
|
-
// connectionNodeId etc will be removed in the next major in favor of connectionStartHandle
|
|
22857
22817
|
connectionStartHandle,
|
|
22858
22818
|
connectionEndHandle: null
|
|
22859
22819
|
}), onConnectStart?.(event, { nodeId, handleId, handleType });
|
|
@@ -22883,7 +22843,7 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
|
|
|
22883
22843
|
});
|
|
22884
22844
|
}
|
|
22885
22845
|
function onPointerUp(event2) {
|
|
22886
|
-
(closestHandle || handleDomNode) && connection && isValid && onConnect?.(connection), onConnectEnd?.(event2), edgeUpdaterType &&
|
|
22846
|
+
(closestHandle || handleDomNode) && connection && isValid && onConnect?.(connection), onConnectEnd?.(event2), edgeUpdaterType && onReconnectEnd?.(event2), cancelConnection(), cancelAnimationFrame(autoPanId), autoPanStarted = !1, isValid = !1, connection = null, handleDomNode = null, connectionStartHandle = null, doc.removeEventListener("mousemove", onPointerMove), doc.removeEventListener("mouseup", onPointerUp), doc.removeEventListener("touchmove", onPointerMove), doc.removeEventListener("touchend", onPointerUp);
|
|
22887
22847
|
}
|
|
22888
22848
|
doc.addEventListener("mousemove", onPointerMove), doc.addEventListener("mouseup", onPointerUp), doc.addEventListener("touchmove", onPointerMove), doc.addEventListener("touchend", onPointerUp);
|
|
22889
22849
|
}
|
|
@@ -22904,11 +22864,14 @@ function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId
|
|
|
22904
22864
|
target: isTarget ? fromNodeId : handleNodeId,
|
|
22905
22865
|
targetHandle: isTarget ? fromHandleId : handleId
|
|
22906
22866
|
};
|
|
22907
|
-
result.connection = connection
|
|
22867
|
+
result.connection = connection;
|
|
22868
|
+
const isValid = connectable && connectableEnd && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType === "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId);
|
|
22869
|
+
result.isValid = isValid && isValidConnection(connection), result.endHandle = {
|
|
22908
22870
|
nodeId: handleNodeId,
|
|
22909
22871
|
handleId,
|
|
22910
|
-
type: handleType
|
|
22911
|
-
|
|
22872
|
+
type: handleType,
|
|
22873
|
+
position: handleToCheck.getAttribute("data-handlepos")
|
|
22874
|
+
};
|
|
22912
22875
|
}
|
|
22913
22876
|
return result;
|
|
22914
22877
|
}
|
|
@@ -23378,16 +23341,14 @@ function shallow$1(objA, objB) {
|
|
|
23378
23341
|
if (typeof objA != "object" || objA === null || typeof objB != "object" || objB === null)
|
|
23379
23342
|
return !1;
|
|
23380
23343
|
if (objA instanceof Map && objB instanceof Map) {
|
|
23381
|
-
if (objA.size !== objB.size)
|
|
23382
|
-
return !1;
|
|
23344
|
+
if (objA.size !== objB.size) return !1;
|
|
23383
23345
|
for (const [key, value] of objA)
|
|
23384
23346
|
if (!Object.is(value, objB.get(key)))
|
|
23385
23347
|
return !1;
|
|
23386
23348
|
return !0;
|
|
23387
23349
|
}
|
|
23388
23350
|
if (objA instanceof Set && objB instanceof Set) {
|
|
23389
|
-
if (objA.size !== objB.size)
|
|
23390
|
-
return !1;
|
|
23351
|
+
if (objA.size !== objB.size) return !1;
|
|
23391
23352
|
for (const value of objA)
|
|
23392
23353
|
if (!objB.has(value))
|
|
23393
23354
|
return !1;
|
|
@@ -23481,7 +23442,7 @@ const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, rea
|
|
|
23481
23442
|
"nodesConnectable",
|
|
23482
23443
|
"nodesFocusable",
|
|
23483
23444
|
"edgesFocusable",
|
|
23484
|
-
"
|
|
23445
|
+
"edgesReconnectable",
|
|
23485
23446
|
"elevateNodesOnSelect",
|
|
23486
23447
|
"elevateEdgesOnSelect",
|
|
23487
23448
|
"minZoom",
|
|
@@ -23843,7 +23804,7 @@ function useReactFlow() {
|
|
|
23843
23804
|
}
|
|
23844
23805
|
return node;
|
|
23845
23806
|
}));
|
|
23846
|
-
},
|
|
23807
|
+
}, updateEdge = (id2, edgeUpdate, options = { replace: !1 }) => {
|
|
23847
23808
|
setEdges((prevEdges) => prevEdges.map((edge) => {
|
|
23848
23809
|
if (edge.id === id2) {
|
|
23849
23810
|
const nextEdge = typeof edgeUpdate == "function" ? edgeUpdate(edge) : edgeUpdate;
|
|
@@ -23925,9 +23886,9 @@ function useReactFlow() {
|
|
|
23925
23886
|
return options.replace ? { ...node, data: nextData } : { ...node, data: { ...node.data, ...nextData } };
|
|
23926
23887
|
}, options);
|
|
23927
23888
|
},
|
|
23928
|
-
updateEdge
|
|
23889
|
+
updateEdge,
|
|
23929
23890
|
updateEdgeData: (id2, dataUpdate, options = { replace: !1 }) => {
|
|
23930
|
-
|
|
23891
|
+
updateEdge(id2, (edge) => {
|
|
23931
23892
|
const nextData = typeof dataUpdate == "function" ? dataUpdate(edge) : dataUpdate;
|
|
23932
23893
|
return options.replace ? { ...edge, data: nextData } : { ...edge, data: { ...edge.data, ...nextData } };
|
|
23933
23894
|
}, options);
|
|
@@ -23940,9 +23901,9 @@ function useReactFlow() {
|
|
|
23940
23901
|
viewportInitialized
|
|
23941
23902
|
}), [viewportInitialized]);
|
|
23942
23903
|
}
|
|
23943
|
-
const selected = (item) => item.selected, deleteKeyOptions = { actInsideInputWithModifier: !1 };
|
|
23904
|
+
const selected = (item) => item.selected, deleteKeyOptions = { actInsideInputWithModifier: !1 }, win$1 = typeof window < "u" ? window : void 0;
|
|
23944
23905
|
function useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }) {
|
|
23945
|
-
const store = useStoreApi(), { deleteElements } = useReactFlow(), deleteKeyPressed = useKeyPress(deleteKeyCode, deleteKeyOptions), multiSelectionKeyPressed = useKeyPress(multiSelectionKeyCode);
|
|
23906
|
+
const store = useStoreApi(), { deleteElements } = useReactFlow(), deleteKeyPressed = useKeyPress(deleteKeyCode, deleteKeyOptions), multiSelectionKeyPressed = useKeyPress(multiSelectionKeyCode, { target: win$1 });
|
|
23946
23907
|
reactExports.useEffect(() => {
|
|
23947
23908
|
if (deleteKeyPressed) {
|
|
23948
23909
|
const { edges, nodes } = store.getState();
|
|
@@ -24069,10 +24030,14 @@ const wrapHandler = (handler, containerRef) => (event) => {
|
|
|
24069
24030
|
elementsSelectable: s.elementsSelectable,
|
|
24070
24031
|
dragging: s.paneDragging
|
|
24071
24032
|
});
|
|
24072
|
-
function Pane({ isSelecting, selectionMode = SelectionMode.Full, panOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children: children2 }) {
|
|
24073
|
-
const container2 = reactExports.useRef(null), store = useStoreApi(), prevSelectedNodesCount = reactExports.useRef(0), prevSelectedEdgesCount = reactExports.useRef(0), containerBounds = reactExports.useRef(), edgeIdLookup = reactExports.useRef(/* @__PURE__ */ new Map()), { userSelectionActive, elementsSelectable, dragging } = useStore$1(selector$j, shallow$1), resetUserSelection = () => {
|
|
24033
|
+
function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children: children2 }) {
|
|
24034
|
+
const container2 = reactExports.useRef(null), store = useStoreApi(), prevSelectedNodesCount = reactExports.useRef(0), prevSelectedEdgesCount = reactExports.useRef(0), containerBounds = reactExports.useRef(), edgeIdLookup = reactExports.useRef(/* @__PURE__ */ new Map()), { userSelectionActive, elementsSelectable, dragging } = useStore$1(selector$j, shallow$1), hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive), selectionInProgress = reactExports.useRef(!1), resetUserSelection = () => {
|
|
24074
24035
|
store.setState({ userSelectionActive: !1, userSelectionRect: null }), prevSelectedNodesCount.current = 0, prevSelectedEdgesCount.current = 0;
|
|
24075
24036
|
}, onClick = (event) => {
|
|
24037
|
+
if (selectionInProgress.current) {
|
|
24038
|
+
selectionInProgress.current = !1;
|
|
24039
|
+
return;
|
|
24040
|
+
}
|
|
24076
24041
|
onPaneClick?.(event), store.getState().resetSelectedElements(), store.setState({ nodesSelectionActive: !1 });
|
|
24077
24042
|
}, onContextMenu = (event) => {
|
|
24078
24043
|
if (Array.isArray(panOnDrag) && panOnDrag?.includes(2)) {
|
|
@@ -24080,9 +24045,9 @@ function Pane({ isSelecting, selectionMode = SelectionMode.Full, panOnDrag, onSe
|
|
|
24080
24045
|
return;
|
|
24081
24046
|
}
|
|
24082
24047
|
onPaneContextMenu?.(event);
|
|
24083
|
-
}, onWheel = onPaneScroll ? (event) => onPaneScroll(event) : void 0,
|
|
24048
|
+
}, onWheel = onPaneScroll ? (event) => onPaneScroll(event) : void 0, onPointerDown2 = (event) => {
|
|
24084
24049
|
const { resetSelectedElements, domNode, edgeLookup } = store.getState();
|
|
24085
|
-
if (containerBounds.current = domNode?.getBoundingClientRect(), !elementsSelectable || !isSelecting || event.button !== 0 || event.target !== container2.current || !containerBounds.current)
|
|
24050
|
+
if (containerBounds.current = domNode?.getBoundingClientRect(), container2.current?.setPointerCapture(event.pointerId), !elementsSelectable || !isSelecting || event.button !== 0 || event.target !== container2.current || !containerBounds.current)
|
|
24086
24051
|
return;
|
|
24087
24052
|
edgeIdLookup.current = /* @__PURE__ */ new Map();
|
|
24088
24053
|
for (const [id2, edge] of edgeLookup)
|
|
@@ -24098,10 +24063,11 @@ function Pane({ isSelecting, selectionMode = SelectionMode.Full, panOnDrag, onSe
|
|
|
24098
24063
|
y: y2
|
|
24099
24064
|
}
|
|
24100
24065
|
}), onSelectionStart?.(event);
|
|
24101
|
-
},
|
|
24066
|
+
}, onPointerMove = (event) => {
|
|
24102
24067
|
const { userSelectionRect, edgeLookup, transform: transform2, nodeOrigin, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = store.getState();
|
|
24103
|
-
if (!
|
|
24068
|
+
if (!containerBounds.current || !userSelectionRect)
|
|
24104
24069
|
return;
|
|
24070
|
+
selectionInProgress.current = !0;
|
|
24105
24071
|
const { x: mouseX, y: mouseY } = getEventPosition(event.nativeEvent, containerBounds.current), { startX, startY } = userSelectionRect, nextUserSelectRect = {
|
|
24106
24072
|
startX,
|
|
24107
24073
|
startY,
|
|
@@ -24132,15 +24098,14 @@ function Pane({ isSelecting, selectionMode = SelectionMode.Full, panOnDrag, onSe
|
|
|
24132
24098
|
userSelectionActive: !0,
|
|
24133
24099
|
nodesSelectionActive: !1
|
|
24134
24100
|
});
|
|
24135
|
-
},
|
|
24101
|
+
}, onPointerUp = (event) => {
|
|
24136
24102
|
if (event.button !== 0)
|
|
24137
24103
|
return;
|
|
24104
|
+
container2.current?.releasePointerCapture(event.pointerId);
|
|
24138
24105
|
const { userSelectionRect } = store.getState();
|
|
24139
|
-
!userSelectionActive && userSelectionRect && event.target === container2.current && onClick?.(event), store.setState({ nodesSelectionActive: prevSelectedNodesCount.current > 0 }), resetUserSelection(), onSelectionEnd?.(event);
|
|
24140
|
-
}
|
|
24141
|
-
|
|
24142
|
-
}, hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive);
|
|
24143
|
-
return jsxRuntimeExports.jsxs("div", { className: cc(["react-flow__pane", { draggable: panOnDrag, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 : wrapHandler(onClick, container2), onContextMenu: wrapHandler(onContextMenu, container2), onWheel: wrapHandler(onWheel, container2), onMouseEnter: hasActiveSelection ? void 0 : onPaneMouseEnter, onMouseDown: hasActiveSelection ? onMouseDown : void 0, onMouseMove: hasActiveSelection ? onMouseMove : onPaneMouseMove, onMouseUp: hasActiveSelection ? onMouseUp : void 0, onMouseLeave: hasActiveSelection ? onMouseLeave : onPaneMouseLeave, ref: container2, style: containerStyle, children: [children2, jsxRuntimeExports.jsx(UserSelection, {})] });
|
|
24106
|
+
!userSelectionActive && userSelectionRect && event.target === container2.current && onClick?.(event), store.setState({ nodesSelectionActive: prevSelectedNodesCount.current > 0 }), resetUserSelection(), onSelectionEnd?.(event), selectionKeyPressed && (selectionInProgress.current = !1);
|
|
24107
|
+
};
|
|
24108
|
+
return jsxRuntimeExports.jsxs("div", { className: cc(["react-flow__pane", { draggable: panOnDrag, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 : wrapHandler(onClick, container2), onContextMenu: wrapHandler(onContextMenu, container2), onWheel: wrapHandler(onWheel, container2), onPointerEnter: hasActiveSelection ? void 0 : onPaneMouseEnter, onPointerDown: hasActiveSelection ? onPointerDown2 : onPaneMouseMove, onPointerMove: hasActiveSelection ? onPointerMove : onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : void 0, onPointerLeave: onPaneMouseLeave, ref: container2, style: containerStyle, children: [children2, jsxRuntimeExports.jsx(UserSelection, {})] });
|
|
24144
24109
|
}
|
|
24145
24110
|
function handleNodeClick({ id: id2, store, unselect = !1, nodeRef }) {
|
|
24146
24111
|
const { addSelectedNodes, unselectNodesAndEdges, multiSelectionActive, nodeLookup, onError } = store.getState(), node = nodeLookup.get(id2);
|
|
@@ -24387,10 +24352,10 @@ function NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboar
|
|
|
24387
24352
|
height
|
|
24388
24353
|
} }) });
|
|
24389
24354
|
}
|
|
24390
|
-
const selector$g = (s) => ({ nodesSelectionActive: s.nodesSelectionActive, userSelectionActive: s.userSelectionActive });
|
|
24355
|
+
const win = typeof window < "u" ? window : void 0, selector$g = (s) => ({ nodesSelectionActive: s.nodesSelectionActive, userSelectionActive: s.userSelectionActive });
|
|
24391
24356
|
function FlowRendererComponent({ children: children2, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport }) {
|
|
24392
|
-
const { nodesSelectionActive, userSelectionActive } = useStore$1(selector$g), selectionKeyPressed = useKeyPress(selectionKeyCode), panActivationKeyPressed = useKeyPress(panActivationKeyCode), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, isSelecting = selectionKeyPressed || userSelectionActive || selectionOnDrag && panOnDrag !== !0;
|
|
24393
|
-
return useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }), jsxRuntimeExports.jsx(ZoomPane, { onPaneContextMenu, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, children: jsxRuntimeExports.jsxs(Pane, { onSelectionStart, onSelectionEnd, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, panOnDrag, isSelecting: !!isSelecting, selectionMode, children: [children2, nodesSelectionActive && jsxRuntimeExports.jsx(NodesSelection, { onSelectionContextMenu, noPanClassName, disableKeyboardA11y })] }) });
|
|
24357
|
+
const { nodesSelectionActive, userSelectionActive } = useStore$1(selector$g), selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win }), panActivationKeyPressed = useKeyPress(panActivationKeyCode, { target: win }), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, isSelecting = selectionKeyPressed || userSelectionActive || selectionOnDrag && panOnDrag !== !0;
|
|
24358
|
+
return useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }), jsxRuntimeExports.jsx(ZoomPane, { onPaneContextMenu, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, children: jsxRuntimeExports.jsxs(Pane, { onSelectionStart, onSelectionEnd, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, panOnDrag, isSelecting: !!isSelecting, selectionMode, selectionKeyPressed, children: [children2, nodesSelectionActive && jsxRuntimeExports.jsx(NodesSelection, { onSelectionContextMenu, noPanClassName, disableKeyboardA11y })] }) });
|
|
24394
24359
|
}
|
|
24395
24360
|
FlowRendererComponent.displayName = "FlowRenderer";
|
|
24396
24361
|
const FlowRenderer = reactExports.memo(FlowRendererComponent), selector$f = (onlyRenderVisible) => (s) => onlyRenderVisible ? getNodesInside(s.nodeLookup, { x: 0, y: 0, width: s.width, height: s.height }, s.transform, !0).map((node) => node.id) : Array.from(s.nodeLookup.keys());
|
|
@@ -24725,15 +24690,15 @@ const builtinEdgeTypes = {
|
|
|
24725
24690
|
function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMouseEnter, onMouseOut, type }) {
|
|
24726
24691
|
return jsxRuntimeExports.jsx("circle", { onMouseDown, onMouseEnter, onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" });
|
|
24727
24692
|
}
|
|
24728
|
-
function EdgeUpdateAnchors({
|
|
24693
|
+
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandleId, sourceHandleId, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover }) {
|
|
24729
24694
|
const store = useStoreApi(), handleEdgeUpdater = (event, isSourceHandle) => {
|
|
24730
24695
|
if (event.button !== 0)
|
|
24731
24696
|
return;
|
|
24732
24697
|
const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy: panBy2, updateConnection } = store.getState(), nodeId = isSourceHandle ? edge.target : edge.source, handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null, handleType = isSourceHandle ? "target" : "source", isTarget = isSourceHandle;
|
|
24733
|
-
|
|
24734
|
-
const
|
|
24735
|
-
|
|
24736
|
-
}, onConnectEdge = (connection) =>
|
|
24698
|
+
setReconnecting(!0), onReconnectStart?.(event, edge, handleType);
|
|
24699
|
+
const _onReconnectEnd = (evt) => {
|
|
24700
|
+
setReconnecting(!1), onReconnectEnd?.(evt, edge, handleType);
|
|
24701
|
+
}, onConnectEdge = (connection) => onReconnect?.(edge, connection);
|
|
24737
24702
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
24738
24703
|
autoPanOnConnect,
|
|
24739
24704
|
connectionMode,
|
|
@@ -24752,21 +24717,21 @@ function EdgeUpdateAnchors({ isUpdatable, edgeUpdaterRadius, edge, targetHandleI
|
|
|
24752
24717
|
onConnect: onConnectEdge,
|
|
24753
24718
|
onConnectStart,
|
|
24754
24719
|
onConnectEnd,
|
|
24755
|
-
|
|
24720
|
+
onReconnectEnd: _onReconnectEnd,
|
|
24756
24721
|
updateConnection,
|
|
24757
24722
|
getTransform: () => store.getState().transform,
|
|
24758
24723
|
getConnectionStartHandle: () => store.getState().connectionStartHandle
|
|
24759
24724
|
});
|
|
24760
|
-
},
|
|
24761
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [(
|
|
24725
|
+
}, onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, !0), onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, !1), onReconnectMouseEnter = () => setUpdateHover(!0), onReconnectMouseOut = () => setUpdateHover(!1);
|
|
24726
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [(isReconnectable === "source" || isReconnectable === !0) && jsxRuntimeExports.jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "source" }), (isReconnectable === "target" || isReconnectable === !0) && jsxRuntimeExports.jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "target" })] });
|
|
24762
24727
|
}
|
|
24763
|
-
function EdgeWrapper({ id: id2, edgesFocusable,
|
|
24728
|
+
function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes: edgeTypes2, noPanClassName, onError, disableKeyboardA11y }) {
|
|
24764
24729
|
let edge = useStore$1((s) => s.edgeLookup.get(id2));
|
|
24765
24730
|
const defaultEdgeOptions = useStore$1((s) => s.defaultEdgeOptions);
|
|
24766
24731
|
edge = defaultEdgeOptions ? { ...defaultEdgeOptions, ...edge } : edge;
|
|
24767
24732
|
let edgeType = edge.type || "default", EdgeComponent = edgeTypes2?.[edgeType] || builtinEdgeTypes[edgeType];
|
|
24768
24733
|
EdgeComponent === void 0 && (onError?.("011", errorMessages.error011(edgeType)), edgeType = "default", EdgeComponent = builtinEdgeTypes.default);
|
|
24769
|
-
const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"),
|
|
24734
|
+
const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"), isReconnectable = typeof onReconnect < "u" && (edge.reconnectable || edgesReconnectable && typeof edge.reconnectable > "u"), isSelectable = !!(edge.selectable || elementsSelectable && typeof edge.selectable > "u"), edgeRef = reactExports.useRef(null), [updateHover, setUpdateHover] = reactExports.useState(!1), [reconnecting, setReconnecting] = reactExports.useState(!1), store = useStoreApi(), { zIndex, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = useStore$1(reactExports.useCallback((store2) => {
|
|
24770
24735
|
const sourceNode = store2.nodeLookup.get(edge.source), targetNode = store2.nodeLookup.get(edge.target);
|
|
24771
24736
|
if (!sourceNode || !targetNode)
|
|
24772
24737
|
return {
|
|
@@ -24826,20 +24791,20 @@ function EdgeWrapper({ id: id2, edgesFocusable, edgesUpdatable, elementsSelectab
|
|
|
24826
24791
|
updating: updateHover,
|
|
24827
24792
|
selectable: isSelectable
|
|
24828
24793
|
}
|
|
24829
|
-
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : "img", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, children: [!
|
|
24794
|
+
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : "img", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, children: [!reconnecting && jsxRuntimeExports.jsx(EdgeComponent, { id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pathOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsxRuntimeExports.jsx(EdgeUpdateAnchors, { edge, isReconnectable, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle })] }) });
|
|
24830
24795
|
}
|
|
24831
24796
|
const selector$c = (s) => ({
|
|
24832
24797
|
width: s.width,
|
|
24833
24798
|
height: s.height,
|
|
24834
24799
|
edgesFocusable: s.edgesFocusable,
|
|
24835
|
-
|
|
24800
|
+
edgesReconnectable: s.edgesReconnectable,
|
|
24836
24801
|
elementsSelectable: s.elementsSelectable,
|
|
24837
24802
|
connectionMode: s.connectionMode,
|
|
24838
24803
|
onError: s.onError
|
|
24839
24804
|
});
|
|
24840
|
-
function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes: edgeTypes2, noPanClassName,
|
|
24841
|
-
const { edgesFocusable,
|
|
24842
|
-
return jsxRuntimeExports.jsxs("div", { className: "react-flow__edges", children: [jsxRuntimeExports.jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsxRuntimeExports.jsx(EdgeWrapper, { id: id2, edgesFocusable,
|
|
24805
|
+
function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes: edgeTypes2, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y }) {
|
|
24806
|
+
const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore$1(selector$c, shallow$1), edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
|
|
24807
|
+
return jsxRuntimeExports.jsxs("div", { className: "react-flow__edges", children: [jsxRuntimeExports.jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsxRuntimeExports.jsx(EdgeWrapper, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart, onReconnectEnd, rfId, onError, edgeTypes: edgeTypes2, disableKeyboardA11y }, id2))] });
|
|
24843
24808
|
}
|
|
24844
24809
|
EdgeRendererComponent.displayName = "EdgeRenderer";
|
|
24845
24810
|
const EdgeRenderer = reactExports.memo(EdgeRendererComponent), selector$b = (s) => `translate(${s.transform[0]}px,${s.transform[1]}px) scale(${s.transform[2]})`;
|
|
@@ -24866,17 +24831,19 @@ const oppositePosition = {
|
|
|
24866
24831
|
[Position.Top]: Position.Bottom,
|
|
24867
24832
|
[Position.Bottom]: Position.Top
|
|
24868
24833
|
}, ConnectionLine = ({ nodeId, handleType, style: style2, type = ConnectionLineType.Bezier, CustomComponent, connectionStatus }) => {
|
|
24869
|
-
const { fromNode, handleId, toX, toY, connectionMode } = useStore$1(reactExports.useCallback((s) => ({
|
|
24834
|
+
const { fromNode, handleId, toX, toY, connectionMode, endPosition, isValid } = useStore$1(reactExports.useCallback((s) => ({
|
|
24870
24835
|
fromNode: s.nodeLookup.get(nodeId),
|
|
24871
24836
|
handleId: s.connectionStartHandle?.handleId,
|
|
24872
24837
|
toX: (s.connectionPosition.x - s.transform[0]) / s.transform[2],
|
|
24873
24838
|
toY: (s.connectionPosition.y - s.transform[1]) / s.transform[2],
|
|
24874
|
-
connectionMode: s.connectionMode
|
|
24839
|
+
connectionMode: s.connectionMode,
|
|
24840
|
+
endPosition: s.connectionEndHandle?.position,
|
|
24841
|
+
isValid: s.connectionStatus === "valid"
|
|
24875
24842
|
}), [nodeId]), shallow$1), fromHandleBounds = fromNode?.internals.handleBounds;
|
|
24876
24843
|
let handleBounds = fromHandleBounds?.[handleType];
|
|
24877
24844
|
if (connectionMode === ConnectionMode.Loose && (handleBounds = handleBounds || fromHandleBounds?.[handleType === "source" ? "target" : "source"]), !fromNode || !handleBounds)
|
|
24878
24845
|
return null;
|
|
24879
|
-
const fromHandle = handleId ? handleBounds.find((d) => d.id === handleId) : handleBounds[0], fromHandleX = fromHandle ? fromHandle.x + fromHandle.width / 2 : (fromNode.measured.width ?? 0) / 2, fromHandleY = fromHandle ? fromHandle.y + fromHandle.height / 2 : fromNode.measured.height ?? 0, fromX = fromNode.internals.positionAbsolute.x + fromHandleX, fromY = fromNode.internals.positionAbsolute.y + fromHandleY, fromPosition = fromHandle?.position, toPosition = fromPosition ? oppositePosition[fromPosition] : null;
|
|
24846
|
+
const fromHandle = handleId ? handleBounds.find((d) => d.id === handleId) : handleBounds[0], fromHandleX = fromHandle ? fromHandle.x + fromHandle.width / 2 : (fromNode.measured.width ?? 0) / 2, fromHandleY = fromHandle ? fromHandle.y + fromHandle.height / 2 : fromNode.measured.height ?? 0, fromX = fromNode.internals.positionAbsolute.x + fromHandleX, fromY = fromNode.internals.positionAbsolute.y + fromHandleY, fromPosition = fromHandle?.position, toPosition = isValid && endPosition ? endPosition : fromPosition ? oppositePosition[fromPosition] : null;
|
|
24880
24847
|
if (!fromPosition || !toPosition)
|
|
24881
24848
|
return null;
|
|
24882
24849
|
if (CustomComponent)
|
|
@@ -24917,8 +24884,8 @@ function useStylesLoadedWarning() {
|
|
|
24917
24884
|
useStoreApi(), reactExports.useRef(!1), reactExports.useEffect(() => {
|
|
24918
24885
|
}, []);
|
|
24919
24886
|
}
|
|
24920
|
-
function GraphViewComponent({ nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onInit, onNodeClick, onEdgeClick, onNodeDoubleClick, onEdgeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, deleteKeyCode, onlyRenderVisibleElements, elementsSelectable, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, defaultMarkerColor, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu,
|
|
24921
|
-
return useNodeOrEdgeTypesWarning(nodeTypes2), useNodeOrEdgeTypesWarning(edgeTypes2), useStylesLoadedWarning(), useOnInitHandler(onInit), useViewportSync(viewport), jsxRuntimeExports.jsx(FlowRenderer, { onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, onSelectionContextMenu, preventScrolling, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport: !!viewport, children: jsxRuntimeExports.jsxs(Viewport, { children: [jsxRuntimeExports.jsx(EdgeRenderer, { edgeTypes: edgeTypes2, onEdgeClick, onEdgeDoubleClick,
|
|
24887
|
+
function GraphViewComponent({ nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onInit, onNodeClick, onEdgeClick, onNodeDoubleClick, onEdgeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, deleteKeyCode, onlyRenderVisibleElements, elementsSelectable, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, defaultMarkerColor, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, nodeOrigin, nodeExtent, rfId, viewport, onViewportChange }) {
|
|
24888
|
+
return useNodeOrEdgeTypesWarning(nodeTypes2), useNodeOrEdgeTypesWarning(edgeTypes2), useStylesLoadedWarning(), useOnInitHandler(onInit), useViewportSync(viewport), jsxRuntimeExports.jsx(FlowRenderer, { onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, onSelectionContextMenu, preventScrolling, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport: !!viewport, children: jsxRuntimeExports.jsxs(Viewport, { children: [jsxRuntimeExports.jsx(EdgeRenderer, { edgeTypes: edgeTypes2, onEdgeClick, onEdgeDoubleClick, onReconnect, onReconnectStart, onReconnectEnd, onlyRenderVisibleElements, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noPanClassName, disableKeyboardA11y, rfId }), jsxRuntimeExports.jsx(ConnectionLineWrapper, { style: connectionLineStyle, type: connectionLineType, component: connectionLineComponent, containerStyle: connectionLineContainerStyle }), jsxRuntimeExports.jsx("div", { className: "react-flow__edgelabel-renderer" }), jsxRuntimeExports.jsx(NodeRenderer, { nodeTypes: nodeTypes2, onNodeClick, onNodeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onlyRenderVisibleElements, noPanClassName, noDragClassName, disableKeyboardA11y, nodeOrigin, nodeExtent, rfId }), jsxRuntimeExports.jsx("div", { className: "react-flow__viewport-portal" })] }) });
|
|
24922
24889
|
}
|
|
24923
24890
|
GraphViewComponent.displayName = "GraphView";
|
|
24924
24891
|
const GraphView = reactExports.memo(GraphViewComponent), getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView: fitView2 } = {}) => {
|
|
@@ -24972,7 +24939,7 @@ const GraphView = reactExports.memo(GraphViewComponent), getInitialState = ({ no
|
|
|
24972
24939
|
nodesConnectable: !0,
|
|
24973
24940
|
nodesFocusable: !0,
|
|
24974
24941
|
edgesFocusable: !0,
|
|
24975
|
-
|
|
24942
|
+
edgesReconnectable: !0,
|
|
24976
24943
|
elementsSelectable: !0,
|
|
24977
24944
|
elevateNodesOnSelect: !0,
|
|
24978
24945
|
elevateEdgesOnSelect: !1,
|
|
@@ -25179,9 +25146,9 @@ const wrapperStyle = {
|
|
|
25179
25146
|
position: "relative",
|
|
25180
25147
|
zIndex: 0
|
|
25181
25148
|
};
|
|
25182
|
-
function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1, selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ? "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable,
|
|
25149
|
+
function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1, selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ? "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable, edgesReconnectable, elementsSelectable = !0, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent, preventScrolling = !0, nodeExtent, defaultMarkerColor = "#b1b1b7", zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, children: children2, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = "nodrag", noWheelClassName = "nowheel", noPanClassName = "nopan", fitView: fitView2, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect, elevateEdgesOnSelect, disableKeyboardA11y = !1, autoPanOnConnect, autoPanOnNodeDrag, connectionRadius, isValidConnection, onError, style: style2, id: id2, nodeDragThreshold, viewport, onViewportChange, width, height, colorMode = "light", debug, ...rest }, ref) {
|
|
25183
25150
|
const rfId = id2 || "1", colorModeClassName = useColorModeClass(colorMode);
|
|
25184
|
-
return jsxRuntimeExports.jsx("div", { ...rest, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), "data-testid": "rf__wrapper", id: id2, children: jsxRuntimeExports.jsxs(Wrapper, { nodes, edges, width, height, fitView: fitView2, children: [jsxRuntimeExports.jsx(GraphView, { onInit, onNodeClick, onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd,
|
|
25151
|
+
return jsxRuntimeExports.jsx("div", { ...rest, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), "data-testid": "rf__wrapper", id: id2, children: jsxRuntimeExports.jsxs(Wrapper, { nodes, edges, width, height, fitView: fitView2, children: [jsxRuntimeExports.jsx(GraphView, { onInit, onNodeClick, onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noDragClassName, noWheelClassName, noPanClassName, rfId, disableKeyboardA11y, nodeOrigin, nodeExtent, viewport, onViewportChange }), jsxRuntimeExports.jsx(StoreUpdater, { nodes, edges, defaultNodes, defaultEdges, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, nodesDraggable, nodesConnectable, nodesFocusable, edgesFocusable, edgesReconnectable, elementsSelectable, elevateNodesOnSelect, elevateEdgesOnSelect, minZoom, maxZoom, nodeExtent, onNodesChange, onEdgesChange, snapToGrid, snapGrid, connectionMode, translateExtent, connectOnClick, defaultEdgeOptions, fitView: fitView2, fitViewOptions, onNodesDelete, onEdgesDelete, onDelete, onNodeDragStart, onNodeDrag, onNodeDragStop, onSelectionDrag, onSelectionDragStart, onSelectionDragStop, onMove, onMoveStart, onMoveEnd, noPanClassName, nodeOrigin, rfId, autoPanOnConnect, autoPanOnNodeDrag, onError, connectionRadius, isValidConnection, selectNodesOnDrag, nodeDragThreshold, onBeforeDelete, debug }), jsxRuntimeExports.jsx(SelectionListener, { onSelectionChange }), children2, jsxRuntimeExports.jsx(Attribution, { proOptions, position: attributionPosition }), jsxRuntimeExports.jsx(A11yDescriptions, { rfId, disableKeyboardA11y })] }) });
|
|
25185
25152
|
}
|
|
25186
25153
|
var index = fixedForwardRef(ReactFlow);
|
|
25187
25154
|
const selector$8 = (s) => s.domNode?.querySelector(".react-flow__edgelabel-renderer");
|
|
@@ -25199,16 +25166,6 @@ function useOnViewportChange({ onStart, onChange, onEnd }) {
|
|
|
25199
25166
|
store.setState({ onViewportChangeEnd: onEnd });
|
|
25200
25167
|
}, [onEnd]);
|
|
25201
25168
|
}
|
|
25202
|
-
function useOnSelectionChange({ onChange }) {
|
|
25203
|
-
const store = useStoreApi();
|
|
25204
|
-
reactExports.useEffect(() => {
|
|
25205
|
-
const nextOnSelectionChangeHandlers = [...store.getState().onSelectionChangeHandlers, onChange];
|
|
25206
|
-
return store.setState({ onSelectionChangeHandlers: nextOnSelectionChangeHandlers }), () => {
|
|
25207
|
-
const nextHandlers = store.getState().onSelectionChangeHandlers.filter((fn) => fn !== onChange);
|
|
25208
|
-
store.setState({ onSelectionChangeHandlers: nextHandlers });
|
|
25209
|
-
};
|
|
25210
|
-
}, [onChange]);
|
|
25211
|
-
}
|
|
25212
25169
|
function useNodesData(nodeIds) {
|
|
25213
25170
|
return useStore$1(reactExports.useCallback((s) => {
|
|
25214
25171
|
const data = [], isArrayOfIds = Array.isArray(nodeIds), _nodeIds = isArrayOfIds ? nodeIds : [nodeIds];
|
|
@@ -25854,7 +25811,12 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
25854
25811
|
}, {}), cancel: (process2) => stepsOrder.forEach((key) => steps2[key].cancel(process2)), state, steps: steps2 };
|
|
25855
25812
|
}
|
|
25856
25813
|
const { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, !1);
|
|
25857
|
-
function
|
|
25814
|
+
function isRefObject(ref) {
|
|
25815
|
+
return ref && typeof ref == "object" && Object.prototype.hasOwnProperty.call(ref, "current");
|
|
25816
|
+
}
|
|
25817
|
+
const SwitchLayoutGroupContext = reactExports.createContext({});
|
|
25818
|
+
let scheduleHandoffComplete = !1;
|
|
25819
|
+
function useVisualElement(Component, visualState, props2, createVisualElement, ProjectionNodeConstructor) {
|
|
25858
25820
|
const { visualElement: parent } = reactExports.useContext(MotionContext), lazyContext = reactExports.useContext(LazyContext), presenceContext = reactExports.useContext(PresenceContext), reducedMotionConfig = reactExports.useContext(MotionConfigContext).reducedMotion, visualElementRef = reactExports.useRef();
|
|
25859
25821
|
createVisualElement = createVisualElement || lazyContext.renderer, !visualElementRef.current && createVisualElement && (visualElementRef.current = createVisualElement(Component, {
|
|
25860
25822
|
visualState,
|
|
@@ -25864,19 +25826,44 @@ function useVisualElement(Component, visualState, props2, createVisualElement) {
|
|
|
25864
25826
|
blockInitialAnimation: presenceContext ? presenceContext.initial === !1 : !1,
|
|
25865
25827
|
reducedMotionConfig
|
|
25866
25828
|
}));
|
|
25867
|
-
const visualElement = visualElementRef.current;
|
|
25868
|
-
reactExports.useInsertionEffect(() => {
|
|
25829
|
+
const visualElement = visualElementRef.current, initialLayoutGroupConfig = reactExports.useContext(SwitchLayoutGroupContext);
|
|
25830
|
+
visualElement && !visualElement.projection && ProjectionNodeConstructor && (visualElement.type === "html" || visualElement.type === "svg") && createProjectionNode(visualElementRef.current, props2, ProjectionNodeConstructor, initialLayoutGroupConfig), reactExports.useInsertionEffect(() => {
|
|
25869
25831
|
visualElement && visualElement.update(props2, presenceContext);
|
|
25870
25832
|
});
|
|
25871
25833
|
const wantsHandoff = reactExports.useRef(!!(props2[optimizedAppearDataAttribute] && !window.HandoffComplete));
|
|
25872
25834
|
return useIsomorphicLayoutEffect$2(() => {
|
|
25873
|
-
visualElement && (microtask.
|
|
25835
|
+
visualElement && (visualElement.updateFeatures(), microtask.render(visualElement.render), wantsHandoff.current && visualElement.animationState && visualElement.animationState.animateChanges());
|
|
25874
25836
|
}), reactExports.useEffect(() => {
|
|
25875
|
-
visualElement && (
|
|
25837
|
+
visualElement && (!wantsHandoff.current && visualElement.animationState && visualElement.animationState.animateChanges(), wantsHandoff.current && (wantsHandoff.current = !1, scheduleHandoffComplete || (scheduleHandoffComplete = !0, queueMicrotask(completeHandoff))));
|
|
25876
25838
|
}), visualElement;
|
|
25877
25839
|
}
|
|
25878
|
-
function
|
|
25879
|
-
|
|
25840
|
+
function completeHandoff() {
|
|
25841
|
+
window.HandoffComplete = !0;
|
|
25842
|
+
}
|
|
25843
|
+
function createProjectionNode(visualElement, props2, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
25844
|
+
const { layoutId, layout, drag: drag2, dragConstraints, layoutScroll, layoutRoot } = props2;
|
|
25845
|
+
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props2["data-framer-portal-id"] ? void 0 : getClosestProjectingNode(visualElement.parent)), visualElement.projection.setOptions({
|
|
25846
|
+
layoutId,
|
|
25847
|
+
layout,
|
|
25848
|
+
alwaysMeasureLayout: !!drag2 || dragConstraints && isRefObject(dragConstraints),
|
|
25849
|
+
visualElement,
|
|
25850
|
+
scheduleRender: () => visualElement.scheduleRender(),
|
|
25851
|
+
/**
|
|
25852
|
+
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
25853
|
+
* to update by the time layout animations run.
|
|
25854
|
+
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
25855
|
+
* ensuring it gets called if there's no potential layout animations.
|
|
25856
|
+
*
|
|
25857
|
+
*/
|
|
25858
|
+
animationType: typeof layout == "string" ? layout : "both",
|
|
25859
|
+
initialPromotionConfig,
|
|
25860
|
+
layoutScroll,
|
|
25861
|
+
layoutRoot
|
|
25862
|
+
});
|
|
25863
|
+
}
|
|
25864
|
+
function getClosestProjectingNode(visualElement) {
|
|
25865
|
+
if (visualElement)
|
|
25866
|
+
return visualElement.options.allowProjection !== !1 ? visualElement.projection : getClosestProjectingNode(visualElement.parent);
|
|
25880
25867
|
}
|
|
25881
25868
|
function useMotionRef(visualState, visualElement, externalRef) {
|
|
25882
25869
|
return reactExports.useCallback(
|
|
@@ -25960,7 +25947,8 @@ function loadFeatures(features) {
|
|
|
25960
25947
|
...features[key]
|
|
25961
25948
|
};
|
|
25962
25949
|
}
|
|
25963
|
-
const LayoutGroupContext = reactExports.createContext({}),
|
|
25950
|
+
const LayoutGroupContext = reactExports.createContext({}), motionComponentSymbol = Symbol.for("motionComponentSymbol"), noop$2 = (any) => any;
|
|
25951
|
+
let invariant$1 = noop$2;
|
|
25964
25952
|
function createMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component }) {
|
|
25965
25953
|
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
25966
25954
|
function MotionComponent(props2, externalRef) {
|
|
@@ -25971,15 +25959,9 @@ function createMotionComponent({ preloadedFeatures, createVisualElement, useRend
|
|
|
25971
25959
|
layoutId: useLayoutId(props2)
|
|
25972
25960
|
}, { isStatic } = configAndProps, context = useCreateMotionContext(props2), visualState = useVisualState(props2, isStatic);
|
|
25973
25961
|
if (!isStatic && isBrowser$1) {
|
|
25974
|
-
|
|
25975
|
-
const
|
|
25976
|
-
context.visualElement
|
|
25977
|
-
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
25978
|
-
configAndProps,
|
|
25979
|
-
isStrict,
|
|
25980
|
-
preloadedFeatures,
|
|
25981
|
-
initialLayoutGroupConfig
|
|
25982
|
-
));
|
|
25962
|
+
useStrictMode();
|
|
25963
|
+
const layoutProjection = getProjectionFunctionality(configAndProps);
|
|
25964
|
+
MeasureLayout = layoutProjection.MeasureLayout, context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);
|
|
25983
25965
|
}
|
|
25984
25966
|
return jsxRuntimeExports.jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? jsxRuntimeExports.jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component, props2, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });
|
|
25985
25967
|
}
|
|
@@ -25990,6 +25972,19 @@ function useLayoutId({ layoutId }) {
|
|
|
25990
25972
|
const layoutGroupId = reactExports.useContext(LayoutGroupContext).id;
|
|
25991
25973
|
return layoutGroupId && layoutId !== void 0 ? layoutGroupId + "-" + layoutId : layoutId;
|
|
25992
25974
|
}
|
|
25975
|
+
function useStrictMode(configAndProps, preloadedFeatures) {
|
|
25976
|
+
reactExports.useContext(LazyContext).strict;
|
|
25977
|
+
}
|
|
25978
|
+
function getProjectionFunctionality(props2) {
|
|
25979
|
+
const { drag: drag2, layout } = featureDefinitions;
|
|
25980
|
+
if (!drag2 && !layout)
|
|
25981
|
+
return {};
|
|
25982
|
+
const combined = { ...drag2, ...layout };
|
|
25983
|
+
return {
|
|
25984
|
+
MeasureLayout: drag2?.isEnabled(props2) || layout?.isEnabled(props2) ? combined.MeasureLayout : void 0,
|
|
25985
|
+
ProjectionNode: combined.ProjectionNode
|
|
25986
|
+
};
|
|
25987
|
+
}
|
|
25993
25988
|
function createMotionProxy(createConfig) {
|
|
25994
25989
|
function custom5(Component, customMotionComponentConfig = {}) {
|
|
25995
25990
|
return createMotionComponent(createConfig(Component, customMotionComponentConfig));
|
|
@@ -26463,7 +26458,7 @@ function makeLatestValues(props2, context, presenceContext, scrapeMotionValues)
|
|
|
26463
26458
|
values2[key] = transitionEnd[key];
|
|
26464
26459
|
}), values2;
|
|
26465
26460
|
}
|
|
26466
|
-
const
|
|
26461
|
+
const { schedule: frame, cancel: cancelFrame, state: frameData, steps } = createRenderBatcher(typeof requestAnimationFrame < "u" ? requestAnimationFrame : noop$2, !0), svgMotionConfig = {
|
|
26467
26462
|
useVisualState: makeUseVisualState({
|
|
26468
26463
|
scrapeMotionValuesFromProps,
|
|
26469
26464
|
createRenderState: createSvgRenderState,
|
|
@@ -26788,7 +26783,6 @@ const time = {
|
|
|
26788
26783
|
function isNone(value) {
|
|
26789
26784
|
return typeof value == "number" ? value === 0 : value !== null ? value === "none" || value === "0" || isZeroValueString(value) : !0;
|
|
26790
26785
|
}
|
|
26791
|
-
let invariant$1 = noop$2;
|
|
26792
26786
|
const isNumericalString = (v2) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v2), splitCSSVariableRegex = (
|
|
26793
26787
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
26794
26788
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
@@ -27067,8 +27061,8 @@ class DOMKeyframesResolver extends KeyframeResolver {
|
|
|
27067
27061
|
return;
|
|
27068
27062
|
super.readKeyframes();
|
|
27069
27063
|
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
27070
|
-
|
|
27071
|
-
if (typeof keyframe == "string" && isCSSVariableToken(keyframe)) {
|
|
27064
|
+
let keyframe = unresolvedKeyframes[i];
|
|
27065
|
+
if (typeof keyframe == "string" && (keyframe = keyframe.trim(), isCSSVariableToken(keyframe))) {
|
|
27072
27066
|
const resolved = getVariableValue(keyframe, element2.current);
|
|
27073
27067
|
resolved !== void 0 && (unresolvedKeyframes[i] = resolved), i === unresolvedKeyframes.length - 1 && (this.finalKeyframe = keyframe);
|
|
27074
27068
|
}
|
|
@@ -27394,25 +27388,30 @@ function hslaToRgba({ hue, saturation, lightness, alpha: alpha2 }) {
|
|
|
27394
27388
|
alpha: alpha2
|
|
27395
27389
|
};
|
|
27396
27390
|
}
|
|
27391
|
+
function mixImmediate(a, b) {
|
|
27392
|
+
return (p2) => p2 > 0 ? b : a;
|
|
27393
|
+
}
|
|
27397
27394
|
const mixLinearColor = (from, to, v2) => {
|
|
27398
27395
|
const fromExpo = from * from, expo = v2 * (to * to - fromExpo) + fromExpo;
|
|
27399
27396
|
return expo < 0 ? 0 : Math.sqrt(expo);
|
|
27400
27397
|
}, colorTypes = [hex, rgba, hsla], getColorType = (v2) => colorTypes.find((type) => type.test(v2));
|
|
27401
27398
|
function asRGBA(color2) {
|
|
27402
27399
|
const type = getColorType(color2);
|
|
27400
|
+
if (!type)
|
|
27401
|
+
return !1;
|
|
27403
27402
|
let model = type.parse(color2);
|
|
27404
27403
|
return type === hsla && (model = hslaToRgba(model)), model;
|
|
27405
27404
|
}
|
|
27406
27405
|
const mixColor = (from, to) => {
|
|
27407
|
-
const fromRGBA = asRGBA(from), toRGBA = asRGBA(to)
|
|
27406
|
+
const fromRGBA = asRGBA(from), toRGBA = asRGBA(to);
|
|
27407
|
+
if (!fromRGBA || !toRGBA)
|
|
27408
|
+
return mixImmediate(from, to);
|
|
27409
|
+
const blended = { ...fromRGBA };
|
|
27408
27410
|
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));
|
|
27409
27411
|
}, invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
27410
27412
|
function mixVisibility(origin, target) {
|
|
27411
27413
|
return invisibleValues.has(origin) ? (p2) => p2 <= 0 ? origin : target : (p2) => p2 >= 1 ? target : origin;
|
|
27412
27414
|
}
|
|
27413
|
-
function mixImmediate(a, b) {
|
|
27414
|
-
return (p2) => p2 > 0 ? b : a;
|
|
27415
|
-
}
|
|
27416
27415
|
function mixNumber(a, b) {
|
|
27417
27416
|
return (p2) => mixNumber$1(a, b, p2);
|
|
27418
27417
|
}
|
|
@@ -27872,6 +27871,81 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
27872
27871
|
!motionValue2.owner.getProps().onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
27873
27872
|
}
|
|
27874
27873
|
}
|
|
27874
|
+
function observeTimeline(update, timeline) {
|
|
27875
|
+
let prevProgress;
|
|
27876
|
+
const onFrame = () => {
|
|
27877
|
+
const { currentTime } = timeline, progress2 = (currentTime === null ? 0 : currentTime.value) / 100;
|
|
27878
|
+
prevProgress !== progress2 && update(progress2), prevProgress = progress2;
|
|
27879
|
+
};
|
|
27880
|
+
return frame.update(onFrame, !0), () => cancelFrame(onFrame);
|
|
27881
|
+
}
|
|
27882
|
+
const supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
27883
|
+
class GroupPlaybackControls {
|
|
27884
|
+
constructor(animations2) {
|
|
27885
|
+
this.stop = () => this.runAll("stop"), this.animations = animations2.filter(Boolean);
|
|
27886
|
+
}
|
|
27887
|
+
then(onResolve, onReject) {
|
|
27888
|
+
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
27889
|
+
}
|
|
27890
|
+
/**
|
|
27891
|
+
* TODO: Filter out cancelled or stopped animations before returning
|
|
27892
|
+
*/
|
|
27893
|
+
getAll(propName) {
|
|
27894
|
+
return this.animations[0][propName];
|
|
27895
|
+
}
|
|
27896
|
+
setAll(propName, newValue) {
|
|
27897
|
+
for (let i = 0; i < this.animations.length; i++)
|
|
27898
|
+
this.animations[i][propName] = newValue;
|
|
27899
|
+
}
|
|
27900
|
+
attachTimeline(timeline) {
|
|
27901
|
+
const cancelAll = this.animations.map((animation) => {
|
|
27902
|
+
if (supportsScrollTimeline() && animation.attachTimeline)
|
|
27903
|
+
animation.attachTimeline(timeline);
|
|
27904
|
+
else
|
|
27905
|
+
return animation.pause(), observeTimeline((progress2) => {
|
|
27906
|
+
animation.time = animation.duration * progress2;
|
|
27907
|
+
}, timeline);
|
|
27908
|
+
});
|
|
27909
|
+
return () => {
|
|
27910
|
+
cancelAll.forEach((cancelTimeline, i) => {
|
|
27911
|
+
cancelTimeline && cancelTimeline(), this.animations[i].stop();
|
|
27912
|
+
});
|
|
27913
|
+
};
|
|
27914
|
+
}
|
|
27915
|
+
get time() {
|
|
27916
|
+
return this.getAll("time");
|
|
27917
|
+
}
|
|
27918
|
+
set time(time2) {
|
|
27919
|
+
this.setAll("time", time2);
|
|
27920
|
+
}
|
|
27921
|
+
get speed() {
|
|
27922
|
+
return this.getAll("speed");
|
|
27923
|
+
}
|
|
27924
|
+
set speed(speed) {
|
|
27925
|
+
this.setAll("speed", speed);
|
|
27926
|
+
}
|
|
27927
|
+
get duration() {
|
|
27928
|
+
let max2 = 0;
|
|
27929
|
+
for (let i = 0; i < this.animations.length; i++)
|
|
27930
|
+
max2 = Math.max(max2, this.animations[i].duration);
|
|
27931
|
+
return max2;
|
|
27932
|
+
}
|
|
27933
|
+
runAll(methodName) {
|
|
27934
|
+
this.animations.forEach((controls) => controls[methodName]());
|
|
27935
|
+
}
|
|
27936
|
+
play() {
|
|
27937
|
+
this.runAll("play");
|
|
27938
|
+
}
|
|
27939
|
+
pause() {
|
|
27940
|
+
this.runAll("pause");
|
|
27941
|
+
}
|
|
27942
|
+
cancel() {
|
|
27943
|
+
this.runAll("cancel");
|
|
27944
|
+
}
|
|
27945
|
+
complete() {
|
|
27946
|
+
this.runAll("complete");
|
|
27947
|
+
}
|
|
27948
|
+
}
|
|
27875
27949
|
const animateMotionValue = (name, value, target, transition = {}, element2, isHandoff) => (onComplete) => {
|
|
27876
27950
|
const valueTransition = getValueTransition(transition, name) || {}, delay = valueTransition.delay || transition.delay || 0;
|
|
27877
27951
|
let { elapsed = 0 } = transition;
|
|
@@ -27899,12 +27973,10 @@ const animateMotionValue = (name, value, target, transition = {}, element2, isHa
|
|
|
27899
27973
|
let shouldSkip = !1;
|
|
27900
27974
|
if ((options.type === !1 || options.duration === 0 && !options.repeatDelay) && (options.duration = 0, options.delay === 0 && (shouldSkip = !0)), shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
27901
27975
|
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
27902
|
-
if (finalKeyframe !== void 0)
|
|
27903
|
-
frame.update(() => {
|
|
27976
|
+
if (finalKeyframe !== void 0)
|
|
27977
|
+
return frame.update(() => {
|
|
27904
27978
|
options.onUpdate(finalKeyframe), options.onComplete();
|
|
27905
|
-
});
|
|
27906
|
-
return;
|
|
27907
|
-
}
|
|
27979
|
+
}), new GroupPlaybackControls([]);
|
|
27908
27980
|
}
|
|
27909
27981
|
return !isHandoff && AcceleratedAnimation.supports(options) ? new AcceleratedAnimation(options) : new MainThreadAnimation(options);
|
|
27910
27982
|
};
|
|
@@ -27954,7 +28026,7 @@ class MotionValue {
|
|
|
27954
28026
|
* @internal
|
|
27955
28027
|
*/
|
|
27956
28028
|
constructor(init2, options = {}) {
|
|
27957
|
-
this.version = "11.2.
|
|
28029
|
+
this.version = "11.2.12", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
|
|
27958
28030
|
const currentTime = time.now();
|
|
27959
28031
|
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);
|
|
27960
28032
|
}, this.hasAnimated = !1, this.setCurrent(init2), this.owner = options.owner;
|
|
@@ -28153,6 +28225,9 @@ function setTarget(visualElement, definition) {
|
|
|
28153
28225
|
setMotionValue(visualElement, key, value);
|
|
28154
28226
|
}
|
|
28155
28227
|
}
|
|
28228
|
+
function getOptimisedAppearId(visualElement) {
|
|
28229
|
+
return visualElement.getProps()[optimizedAppearDataAttribute];
|
|
28230
|
+
}
|
|
28156
28231
|
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
|
|
28157
28232
|
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== !0;
|
|
28158
28233
|
return needsAnimating[key] = !1, shouldBlock;
|
|
@@ -28174,7 +28249,7 @@ function animateTarget(visualElement, targetAndTransition, { delay = 0, transiti
|
|
|
28174
28249
|
};
|
|
28175
28250
|
let isHandoff = !1;
|
|
28176
28251
|
if (window.HandoffAppearAnimations) {
|
|
28177
|
-
const appearId = visualElement
|
|
28252
|
+
const appearId = getOptimisedAppearId(visualElement);
|
|
28178
28253
|
if (appearId) {
|
|
28179
28254
|
const elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
|
|
28180
28255
|
elapsed !== null && (valueTransition.elapsed = elapsed, isHandoff = !0);
|
|
@@ -28240,9 +28315,7 @@ function animateList(visualElement) {
|
|
|
28240
28315
|
return (animations2) => Promise.all(animations2.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));
|
|
28241
28316
|
}
|
|
28242
28317
|
function createAnimationState(visualElement) {
|
|
28243
|
-
let animate = animateList(visualElement);
|
|
28244
|
-
const state = createState();
|
|
28245
|
-
let isInitialRender = !0;
|
|
28318
|
+
let animate = animateList(visualElement), state = createState(), isInitialRender = !0;
|
|
28246
28319
|
const buildResolvedTypeValues = (type) => (acc, definition) => {
|
|
28247
28320
|
var _a;
|
|
28248
28321
|
const resolved = resolveVariant(visualElement, definition, type === "exit" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);
|
|
@@ -28320,7 +28393,10 @@ function createAnimationState(visualElement) {
|
|
|
28320
28393
|
animateChanges,
|
|
28321
28394
|
setActive,
|
|
28322
28395
|
setAnimateFunction,
|
|
28323
|
-
getState: () => state
|
|
28396
|
+
getState: () => state,
|
|
28397
|
+
reset: () => {
|
|
28398
|
+
state = createState(), isInitialRender = !0;
|
|
28399
|
+
}
|
|
28324
28400
|
};
|
|
28325
28401
|
}
|
|
28326
28402
|
function checkVariantsDidChange(prev, next) {
|
|
@@ -28356,7 +28432,7 @@ class AnimationFeature extends Feature {
|
|
|
28356
28432
|
}
|
|
28357
28433
|
updateAnimationControlsSubscription() {
|
|
28358
28434
|
const { animate } = this.node.getProps();
|
|
28359
|
-
|
|
28435
|
+
isAnimationControls(animate) && (this.unmountControls = animate.subscribe(this.node));
|
|
28360
28436
|
}
|
|
28361
28437
|
/**
|
|
28362
28438
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -28369,6 +28445,8 @@ class AnimationFeature extends Feature {
|
|
|
28369
28445
|
animate !== prevAnimate && this.updateAnimationControlsSubscription();
|
|
28370
28446
|
}
|
|
28371
28447
|
unmount() {
|
|
28448
|
+
var _a;
|
|
28449
|
+
this.node.animationState.reset(), (_a = this.unmountControls) === null || _a === void 0 || _a.call(this);
|
|
28372
28450
|
}
|
|
28373
28451
|
}
|
|
28374
28452
|
let id = 0;
|
|
@@ -28453,7 +28531,7 @@ function updateMotionValuesFromProps(element2, next, prev) {
|
|
|
28453
28531
|
next[key] === void 0 && element2.removeValue(key);
|
|
28454
28532
|
return next;
|
|
28455
28533
|
}
|
|
28456
|
-
const visualElementStore = /* @__PURE__ */ new WeakMap(), valueTypes = [...dimensionValueTypes, color, complex], findValueType = (v2) => valueTypes.find(testValueType(v2)),
|
|
28534
|
+
const visualElementStore = /* @__PURE__ */ new WeakMap(), valueTypes = [...dimensionValueTypes, color, complex], findValueType = (v2) => valueTypes.find(testValueType(v2)), propEventHandlers = [
|
|
28457
28535
|
"AnimationStart",
|
|
28458
28536
|
"AnimationComplete",
|
|
28459
28537
|
"Update",
|
|
@@ -28462,10 +28540,6 @@ const visualElementStore = /* @__PURE__ */ new WeakMap(), valueTypes = [...dimen
|
|
|
28462
28540
|
"LayoutAnimationStart",
|
|
28463
28541
|
"LayoutAnimationComplete"
|
|
28464
28542
|
], numVariantProps = variantProps.length;
|
|
28465
|
-
function getClosestProjectingNode(visualElement) {
|
|
28466
|
-
if (visualElement)
|
|
28467
|
-
return visualElement.options.allowProjection !== !1 ? visualElement.projection : getClosestProjectingNode(visualElement.parent);
|
|
28468
|
-
}
|
|
28469
28543
|
class VisualElement {
|
|
28470
28544
|
/**
|
|
28471
28545
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
@@ -28493,12 +28567,13 @@ class VisualElement {
|
|
|
28493
28567
|
this.current = instance, visualElementStore.set(instance, this), this.projection && !this.projection.instance && this.projection.mount(instance), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((value, key) => this.bindToMotionValue(key, value)), hasReducedMotionListener.current || initPrefersReducedMotion(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : prefersReducedMotion.current, this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
28494
28568
|
}
|
|
28495
28569
|
unmount() {
|
|
28496
|
-
var _a;
|
|
28497
28570
|
visualElementStore.delete(this.current), this.projection && this.projection.unmount(), cancelFrame(this.notifyUpdate), cancelFrame(this.render), this.valueSubscriptions.forEach((remove2) => remove2()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
28498
28571
|
for (const key in this.events)
|
|
28499
28572
|
this.events[key].clear();
|
|
28500
|
-
for (const key in this.features)
|
|
28501
|
-
|
|
28573
|
+
for (const key in this.features) {
|
|
28574
|
+
const feature = this.features[key];
|
|
28575
|
+
feature && (feature.unmount(), feature.isMounted = !1);
|
|
28576
|
+
}
|
|
28502
28577
|
this.current = null;
|
|
28503
28578
|
}
|
|
28504
28579
|
bindToMotionValue(key, value) {
|
|
@@ -28512,40 +28587,17 @@ class VisualElement {
|
|
|
28512
28587
|
sortNodePosition(other) {
|
|
28513
28588
|
return !this.current || !this.sortInstanceNodePosition || this.type !== other.type ? 0 : this.sortInstanceNodePosition(this.current, other.current);
|
|
28514
28589
|
}
|
|
28515
|
-
loadFeatures({ children: children2, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {
|
|
28516
|
-
let ProjectionNodeConstructor, MeasureLayout;
|
|
28517
|
-
for (let i = 0; i < numFeatures; i++) {
|
|
28518
|
-
const name = featureNames[i], { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent } = featureDefinitions[name];
|
|
28519
|
-
ProjectionNode && (ProjectionNodeConstructor = ProjectionNode), isEnabled(renderedProps) && (!this.features[name] && FeatureConstructor && (this.features[name] = new FeatureConstructor(this)), MeasureLayoutComponent && (MeasureLayout = MeasureLayoutComponent));
|
|
28520
|
-
}
|
|
28521
|
-
if ((this.type === "html" || this.type === "svg") && !this.projection && ProjectionNodeConstructor) {
|
|
28522
|
-
this.projection = new ProjectionNodeConstructor(this.latestValues, getClosestProjectingNode(this.parent));
|
|
28523
|
-
const { layoutId, layout, drag: drag2, dragConstraints, layoutScroll, layoutRoot } = renderedProps;
|
|
28524
|
-
this.projection.setOptions({
|
|
28525
|
-
layoutId,
|
|
28526
|
-
layout,
|
|
28527
|
-
alwaysMeasureLayout: !!drag2 || dragConstraints && isRefObject(dragConstraints),
|
|
28528
|
-
visualElement: this,
|
|
28529
|
-
scheduleRender: () => this.scheduleRender(),
|
|
28530
|
-
/**
|
|
28531
|
-
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
28532
|
-
* to update by the time layout animations run.
|
|
28533
|
-
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
28534
|
-
* ensuring it gets called if there's no potential layout animations.
|
|
28535
|
-
*
|
|
28536
|
-
*/
|
|
28537
|
-
animationType: typeof layout == "string" ? layout : "both",
|
|
28538
|
-
initialPromotionConfig: initialLayoutGroupConfig,
|
|
28539
|
-
layoutScroll,
|
|
28540
|
-
layoutRoot
|
|
28541
|
-
});
|
|
28542
|
-
}
|
|
28543
|
-
return MeasureLayout;
|
|
28544
|
-
}
|
|
28545
28590
|
updateFeatures() {
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
|
|
28591
|
+
let key = "animation";
|
|
28592
|
+
for (key in featureDefinitions) {
|
|
28593
|
+
const featureDefinition = featureDefinitions[key];
|
|
28594
|
+
if (!featureDefinition)
|
|
28595
|
+
continue;
|
|
28596
|
+
const { isEnabled, Feature: FeatureConstructor } = featureDefinition;
|
|
28597
|
+
if (!this.features[key] && FeatureConstructor && isEnabled(this.props) && (this.features[key] = new FeatureConstructor(this)), this.features[key]) {
|
|
28598
|
+
const feature = this.features[key];
|
|
28599
|
+
feature.isMounted ? feature.update() : (feature.mount(), feature.isMounted = !0);
|
|
28600
|
+
}
|
|
28549
28601
|
}
|
|
28550
28602
|
}
|
|
28551
28603
|
triggerBuild() {
|
|
@@ -30720,24 +30772,7 @@ function useDiagramStoreApi() {
|
|
|
30720
30772
|
const store = reactExports.useContext(DiagramContext);
|
|
30721
30773
|
if (store === null)
|
|
30722
30774
|
throw new Error("useDiagramStoreApi could be used only inside DiagramContext");
|
|
30723
|
-
return
|
|
30724
|
-
() => ({
|
|
30725
|
-
getState: store.getState,
|
|
30726
|
-
setState: store.setState,
|
|
30727
|
-
subscribe: store.subscribe
|
|
30728
|
-
}),
|
|
30729
|
-
[store]
|
|
30730
|
-
);
|
|
30731
|
-
}
|
|
30732
|
-
function WhenInitialized({ children: children2 }) {
|
|
30733
|
-
const diagramApi = useDiagramStoreApi(), [isInitialized, setIsInitialized] = reactExports.useState(diagramApi.getState().initialized);
|
|
30734
|
-
return reactExports.useEffect(() => {
|
|
30735
|
-
if (!isInitialized)
|
|
30736
|
-
return diagramApi.subscribe(
|
|
30737
|
-
(s) => s.initialized,
|
|
30738
|
-
setIsInitialized
|
|
30739
|
-
);
|
|
30740
|
-
}, [isInitialized]), isInitialized ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 }) : null;
|
|
30775
|
+
return store;
|
|
30741
30776
|
}
|
|
30742
30777
|
const { abs: abs$1, cos: cos$1, sin: sin$1, acos: acos$1, atan2, sqrt: sqrt$1, pow } = Math;
|
|
30743
30778
|
function crt(v2) {
|
|
@@ -31850,8 +31885,8 @@ function useLayoutConstraints() {
|
|
|
31850
31885
|
x: event.clientX,
|
|
31851
31886
|
y: event.clientY
|
|
31852
31887
|
};
|
|
31853
|
-
const { xyflow } = diagramApi.getState();
|
|
31854
|
-
solverRef.current = createLayoutConstraints(xyflow, xyflowApi, xynode.id);
|
|
31888
|
+
const { xyflow, cancelSaveManualLayout } = diagramApi.getState();
|
|
31889
|
+
cancelSaveManualLayout(), solverRef.current = createLayoutConstraints(xyflow, xyflowApi, xynode.id);
|
|
31855
31890
|
},
|
|
31856
31891
|
onNodeDrag: (_event, xynode) => {
|
|
31857
31892
|
invariant(solverRef.current, "solverRef.current should be defined"), solverRef.current?.onNodeDrag(xynode);
|
|
@@ -31896,8 +31931,7 @@ const trackedConnections = /* @__PURE__ */ new Map(), getTrackedConnectionState
|
|
|
31896
31931
|
let isRecording = !0;
|
|
31897
31932
|
api.setState = (state, replace, nameOrAction) => {
|
|
31898
31933
|
const r2 = set2(state, replace);
|
|
31899
|
-
if (!isRecording)
|
|
31900
|
-
return r2;
|
|
31934
|
+
if (!isRecording) return r2;
|
|
31901
31935
|
const action = nameOrAction === void 0 ? { type: anonymousActionType || "anonymous" } : typeof nameOrAction == "string" ? { type: nameOrAction } : nameOrAction;
|
|
31902
31936
|
return store === void 0 ? (connection?.send(action, get2()), r2) : (connection?.send(
|
|
31903
31937
|
{
|
|
@@ -31993,8 +32027,7 @@ const trackedConnections = /* @__PURE__ */ new Map(), getTrackedConnectionState
|
|
|
31993
32027
|
});
|
|
31994
32028
|
case "IMPORT_STATE": {
|
|
31995
32029
|
const { nextLiftedState } = message.payload, lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;
|
|
31996
|
-
if (!lastComputedState)
|
|
31997
|
-
return;
|
|
32030
|
+
if (!lastComputedState) return;
|
|
31998
32031
|
setStateFromDevtools(store === void 0 ? lastComputedState : lastComputedState[store]), connection?.send(
|
|
31999
32032
|
null,
|
|
32000
32033
|
// FIXME no-any
|
|
@@ -32041,7 +32074,6 @@ const trackedConnections = /* @__PURE__ */ new Map(), getTrackedConnectionState
|
|
|
32041
32074
|
Edge: 2,
|
|
32042
32075
|
Element: 3
|
|
32043
32076
|
}, MinZoom = 0.1, StringSet = Set, DEFAULT_PROPS = {
|
|
32044
|
-
viewSyncState: "synced",
|
|
32045
32077
|
viewSyncDebounceTimeout: null,
|
|
32046
32078
|
initialized: !1,
|
|
32047
32079
|
xyflowSynced: !1,
|
|
@@ -32078,7 +32110,6 @@ function createDiagramStore(props2) {
|
|
|
32078
32110
|
updateView: (nextView) => {
|
|
32079
32111
|
let {
|
|
32080
32112
|
viewSyncDebounceTimeout,
|
|
32081
|
-
viewSyncState,
|
|
32082
32113
|
xyflow,
|
|
32083
32114
|
dimmed: dimmed2,
|
|
32084
32115
|
xyflowSynced,
|
|
@@ -32092,17 +32123,8 @@ function createDiagramStore(props2) {
|
|
|
32092
32123
|
hoveredEdgeId,
|
|
32093
32124
|
hoveredNodeId
|
|
32094
32125
|
} = get2();
|
|
32095
|
-
if (viewSyncDebounceTimeout && (clearTimeout(viewSyncDebounceTimeout), viewSyncDebounceTimeout = null), shallowEqual(current, nextView))
|
|
32096
|
-
(!xyflowSynced || viewSyncState === "changed") && set2(
|
|
32097
|
-
{
|
|
32098
|
-
viewSyncState: "synced",
|
|
32099
|
-
xyflowSynced: !0
|
|
32100
|
-
},
|
|
32101
|
-
noReplace,
|
|
32102
|
-
"updateView: xyflow synced"
|
|
32103
|
-
);
|
|
32126
|
+
if (viewSyncDebounceTimeout !== null && (clearTimeout(viewSyncDebounceTimeout), viewSyncDebounceTimeout = null), shallowEqual(current, nextView))
|
|
32104
32127
|
return;
|
|
32105
|
-
}
|
|
32106
32128
|
if (current.id === nextView.id) {
|
|
32107
32129
|
const nodeIds = new StringSet(nextView.nodes.map((n2) => n2.id)), edgeIds = new StringSet(nextView.edges.map((e2) => e2.id));
|
|
32108
32130
|
if (lastClickedNodeId && !nodeIds.has(lastClickedNodeId) && (lastClickedNodeId = null), hoveredNodeId && !nodeIds.has(hoveredNodeId) && (hoveredNodeId = null), focusedNodeId && !nodeIds.has(focusedNodeId) && (focusedNodeId = null), lastClickedEdgeId && !edgeIds.has(lastClickedEdgeId) && (lastClickedEdgeId = null), hoveredEdgeId && !edgeIds.has(hoveredEdgeId) && (hoveredEdgeId = null), activeDynamicViewStep && !edgeIds.has(StepEdgeId(activeDynamicViewStep)) && (activeDynamicViewStep = null), xyflowSynced = deepEqual([current.nodes, current.edges], [nextView.nodes, nextView.edges]), dimmed2.size > 0) {
|
|
@@ -32121,7 +32143,6 @@ function createDiagramStore(props2) {
|
|
|
32121
32143
|
}
|
|
32122
32144
|
set2(
|
|
32123
32145
|
{
|
|
32124
|
-
viewSyncState: "synced",
|
|
32125
32146
|
viewSyncDebounceTimeout,
|
|
32126
32147
|
view: nextView,
|
|
32127
32148
|
activeDynamicViewStep,
|
|
@@ -32159,16 +32180,16 @@ function createDiagramStore(props2) {
|
|
|
32159
32180
|
}
|
|
32160
32181
|
},
|
|
32161
32182
|
setHoveredNode: (nodeId) => {
|
|
32162
|
-
nodeId !== get2().hoveredNodeId && set2({ hoveredNodeId: nodeId }
|
|
32183
|
+
nodeId !== get2().hoveredNodeId && set2({ hoveredNodeId: nodeId });
|
|
32163
32184
|
},
|
|
32164
32185
|
setHoveredEdge: (edgeId) => {
|
|
32165
|
-
edgeId !== get2().hoveredEdgeId && set2({ hoveredEdgeId: edgeId }
|
|
32186
|
+
edgeId !== get2().hoveredEdgeId && set2({ hoveredEdgeId: edgeId });
|
|
32166
32187
|
},
|
|
32167
32188
|
setLastClickedNode: (nodeId) => {
|
|
32168
|
-
nodeId !== get2().lastClickedNodeId && set2({ lastClickedNodeId: nodeId }
|
|
32189
|
+
nodeId !== get2().lastClickedNodeId && set2({ lastClickedNodeId: nodeId });
|
|
32169
32190
|
},
|
|
32170
32191
|
setLastClickedEdge: (edgeId) => {
|
|
32171
|
-
edgeId !== get2().lastClickedEdgeId && set2({ lastClickedEdgeId: edgeId }
|
|
32192
|
+
edgeId !== get2().lastClickedEdgeId && set2({ lastClickedEdgeId: edgeId });
|
|
32172
32193
|
},
|
|
32173
32194
|
resetLastClicked: () => {
|
|
32174
32195
|
let {
|
|
@@ -32237,15 +32258,21 @@ function createDiagramStore(props2) {
|
|
|
32237
32258
|
}
|
|
32238
32259
|
return element2 !== origin ? (hasChanges = !0, element2) : origin;
|
|
32239
32260
|
});
|
|
32240
|
-
hasChanges &&
|
|
32261
|
+
hasChanges && updateView({
|
|
32241
32262
|
...view,
|
|
32242
32263
|
nodes
|
|
32243
|
-
}), onChange
|
|
32264
|
+
}), onChange?.({ change });
|
|
32265
|
+
},
|
|
32266
|
+
cancelSaveManualLayout: () => {
|
|
32267
|
+
let { viewSyncDebounceTimeout } = get2();
|
|
32268
|
+
viewSyncDebounceTimeout !== null && (clearTimeout(viewSyncDebounceTimeout), set2({ viewSyncDebounceTimeout: null }));
|
|
32244
32269
|
},
|
|
32245
32270
|
triggerSaveManualLayout: (xystore) => {
|
|
32246
32271
|
let { viewSyncDebounceTimeout: debounced, onChange } = get2();
|
|
32247
32272
|
onChange && (debounced && clearTimeout(debounced), debounced = setTimeout(() => {
|
|
32248
|
-
const { nodeLookup } = xystore.getState(), { xyflow, onChange: onChange2 } = get2()
|
|
32273
|
+
const { nodeLookup } = xystore.getState(), { xyflow, onChange: onChange2 } = get2();
|
|
32274
|
+
set2({ viewSyncDebounceTimeout: null });
|
|
32275
|
+
const movedNodes = new StringSet(), nodes = reduce([...nodeLookup.values()], (acc, node) => {
|
|
32249
32276
|
const dimensions = getNodeDimensions(node);
|
|
32250
32277
|
return isSamePoint$1(node.internals.positionAbsolute, node.data.element.position) || movedNodes.add(node.id), acc[node.data.fqn] = {
|
|
32251
32278
|
x: node.internals.positionAbsolute.x,
|
|
@@ -32258,19 +32285,20 @@ function createDiagramStore(props2) {
|
|
|
32258
32285
|
return !controlPoints && (movedNodes.has(source) || movedNodes.has(target)) && (controlPoints = bezierControlPoints(data.edge)), controlPoints && (acc[data.edge.id] = {
|
|
32259
32286
|
controlPoints
|
|
32260
32287
|
}), acc;
|
|
32261
|
-
}, {})
|
|
32288
|
+
}, {});
|
|
32289
|
+
if (movedNodes.size === 0 && isEmpty(edges))
|
|
32290
|
+
return;
|
|
32291
|
+
onChange2?.({ change: {
|
|
32262
32292
|
op: "save-manual-layout",
|
|
32263
32293
|
nodes,
|
|
32264
32294
|
edges
|
|
32265
|
-
};
|
|
32266
|
-
|
|
32267
|
-
}, 5e3), set2(
|
|
32295
|
+
} });
|
|
32296
|
+
}, 2e3), set2(
|
|
32268
32297
|
{
|
|
32269
|
-
viewSyncDebounceTimeout: debounced
|
|
32270
|
-
viewSyncState: "changed"
|
|
32298
|
+
viewSyncDebounceTimeout: debounced
|
|
32271
32299
|
},
|
|
32272
32300
|
noReplace,
|
|
32273
|
-
"
|
|
32301
|
+
"debounce sync state"
|
|
32274
32302
|
));
|
|
32275
32303
|
},
|
|
32276
32304
|
triggerOnNavigateTo: (xynodeId, event) => {
|
|
@@ -33130,7 +33158,7 @@ const isSame = (a, b) => Math.abs(a - b) < 3.1, isSamePoint = (a, b) => {
|
|
|
33130
33158
|
let hasMoved = !1, pointer2 = { x: e2.clientX, y: e2.clientY };
|
|
33131
33159
|
const onPointerMove = (e22) => {
|
|
33132
33160
|
if (!isSamePoint(pointer2, [e22.clientX, e22.clientY])) {
|
|
33133
|
-
hasMoved = !0, pointer2 = { x: e22.clientX, y: e22.clientY };
|
|
33161
|
+
hasMoved || diagramStore.getState().cancelSaveManualLayout(), hasMoved = !0, pointer2 = { x: e22.clientX, y: e22.clientY };
|
|
33134
33162
|
const { x: x2, y: y2 } = xyflow.screenToFlowPosition(pointer2, { snapToGrid: !1 }), newControlPoints = controlPoints.slice();
|
|
33135
33163
|
newControlPoints[index2] = {
|
|
33136
33164
|
x: toDomPrecision(x2),
|
|
@@ -33155,6 +33183,16 @@ const isSame = (a, b) => Math.abs(a - b) < 3.1, isSamePoint = (a, b) => {
|
|
|
33155
33183
|
"data-edge-active": isActive,
|
|
33156
33184
|
"data-edge-hovered": isHovered,
|
|
33157
33185
|
children: [
|
|
33186
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33187
|
+
"path",
|
|
33188
|
+
{
|
|
33189
|
+
className: clsx("react-flow__edge-interaction"),
|
|
33190
|
+
d: edgePath,
|
|
33191
|
+
fill: "none",
|
|
33192
|
+
stroke: "transparent",
|
|
33193
|
+
strokeWidth: interactionWidth ?? 10
|
|
33194
|
+
}
|
|
33195
|
+
),
|
|
33158
33196
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("g", { className: markerContext, children: [
|
|
33159
33197
|
/* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33160
33198
|
"marker",
|
|
@@ -33194,16 +33232,6 @@ const isSame = (a, b) => Math.abs(a - b) < 3.1, isSamePoint = (a, b) => {
|
|
|
33194
33232
|
}
|
|
33195
33233
|
)
|
|
33196
33234
|
] }),
|
|
33197
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33198
|
-
"path",
|
|
33199
|
-
{
|
|
33200
|
-
className: clsx("react-flow__edge-interaction"),
|
|
33201
|
-
d: edgePath,
|
|
33202
|
-
fill: "none",
|
|
33203
|
-
strokeOpacity: 0,
|
|
33204
|
-
strokeWidth: interactionWidth ?? 10
|
|
33205
|
-
}
|
|
33206
|
-
),
|
|
33207
33235
|
isEdgePathEditable && controlPoints.map((p2, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33208
33236
|
"circle",
|
|
33209
33237
|
{
|
|
@@ -33274,7 +33302,7 @@ var defaultAttributes = {
|
|
|
33274
33302
|
};
|
|
33275
33303
|
const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
33276
33304
|
const Component = reactExports.forwardRef(
|
|
33277
|
-
({ color: color2 = "currentColor", size: size2 = 24, stroke = 2, className, children: children2, ...rest }, ref) => reactExports.createElement(
|
|
33305
|
+
({ color: color2 = "currentColor", size: size2 = 24, stroke = 2, title: title2, className, children: children2, ...rest }, ref) => reactExports.createElement(
|
|
33278
33306
|
"svg",
|
|
33279
33307
|
{
|
|
33280
33308
|
ref,
|
|
@@ -33291,6 +33319,7 @@ const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
|
33291
33319
|
...rest
|
|
33292
33320
|
},
|
|
33293
33321
|
[
|
|
33322
|
+
title2 && reactExports.createElement("title", { key: "svg-title" }, title2),
|
|
33294
33323
|
...iconNode.map(([tag, attrs]) => reactExports.createElement(tag, attrs)),
|
|
33295
33324
|
...Array.isArray(children2) ? children2 : [children2]
|
|
33296
33325
|
]
|
|
@@ -33303,11 +33332,14 @@ var IconArrowLeft = createReactComponent("outline", "arrow-left", "IconArrowLeft
|
|
|
33303
33332
|
var IconBrandReact = createReactComponent("outline", "brand-react", "IconBrandReact", [["path", { d: "M6.306 8.711c-2.602 .723 -4.306 1.926 -4.306 3.289c0 2.21 4.477 4 10 4c.773 0 1.526 -.035 2.248 -.102", key: "svg-0" }], ["path", { d: "M17.692 15.289c2.603 -.722 4.308 -1.926 4.308 -3.289c0 -2.21 -4.477 -4 -10 -4c-.773 0 -1.526 .035 -2.25 .102", key: "svg-1" }], ["path", { d: "M6.305 15.287c-.676 2.615 -.485 4.693 .695 5.373c1.913 1.105 5.703 -1.877 8.464 -6.66c.387 -.67 .733 -1.339 1.036 -2", key: "svg-2" }], ["path", { d: "M17.694 8.716c.677 -2.616 .487 -4.696 -.694 -5.376c-1.913 -1.105 -5.703 1.877 -8.464 6.66c-.387 .67 -.733 1.34 -1.037 2", key: "svg-3" }], ["path", { d: "M12 5.424c-1.925 -1.892 -3.82 -2.766 -5 -2.084c-1.913 1.104 -1.226 5.877 1.536 10.66c.386 .67 .793 1.304 1.212 1.896", key: "svg-4" }], ["path", { d: "M12 18.574c1.926 1.893 3.821 2.768 5 2.086c1.913 -1.104 1.226 -5.877 -1.536 -10.66c-.375 -.65 -.78 -1.283 -1.212 -1.897", key: "svg-5" }], ["path", { d: "M11.5 12.866a1 1 0 1 0 1 -1.732a1 1 0 0 0 -1 1.732z", key: "svg-6" }]]);
|
|
33304
33333
|
var IconCheck = createReactComponent("outline", "check", "IconCheck", [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]]);
|
|
33305
33334
|
var IconChevronDown = createReactComponent("outline", "chevron-down", "IconChevronDown", [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]]);
|
|
33335
|
+
var IconChevronLeft = createReactComponent("outline", "chevron-left", "IconChevronLeft", [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]]);
|
|
33336
|
+
var IconChevronRight = createReactComponent("outline", "chevron-right", "IconChevronRight", [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]]);
|
|
33306
33337
|
var IconCopy = createReactComponent("outline", "copy", "IconCopy", [["path", { d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", key: "svg-0" }], ["path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", key: "svg-1" }]]);
|
|
33307
33338
|
var IconExternalLink = createReactComponent("outline", "external-link", "IconExternalLink", [["path", { d: "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6", key: "svg-0" }], ["path", { d: "M11 13l9 -9", key: "svg-1" }], ["path", { d: "M15 4h5v5", key: "svg-2" }]]);
|
|
33308
33339
|
var IconFile = createReactComponent("outline", "file", "IconFile", [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", key: "svg-1" }]]);
|
|
33309
33340
|
var IconFolderOpen = createReactComponent("outline", "folder-open", "IconFolderOpen", [["path", { d: "M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2", key: "svg-0" }]]);
|
|
33310
33341
|
var IconLayoutDashboard = createReactComponent("outline", "layout-dashboard", "IconLayoutDashboard", [["path", { d: "M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-0" }], ["path", { d: "M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-1" }], ["path", { d: "M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-2" }], ["path", { d: "M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-3" }]]);
|
|
33342
|
+
var IconMenu = createReactComponent("outline", "menu", "IconMenu", [["path", { d: "M4 8l16 0", key: "svg-0" }], ["path", { d: "M4 16l16 0", key: "svg-1" }]]);
|
|
33311
33343
|
var IconMoonStars = createReactComponent("outline", "moon-stars", "IconMoonStars", [["path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", key: "svg-0" }], ["path", { d: "M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2", key: "svg-1" }], ["path", { d: "M19 11h2m-1 -1v2", key: "svg-2" }]]);
|
|
33312
33344
|
var IconShare = createReactComponent("outline", "share", "IconShare", [["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }], ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }], ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }], ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }], ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]]);
|
|
33313
33345
|
var IconSun = createReactComponent("outline", "sun", "IconSun", [["path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", key: "svg-1" }]]);
|
|
@@ -33434,7 +33466,7 @@ const isEqualProps$1 = (prev, next) => prev.id === next.id && deepEqual(prev.dat
|
|
|
33434
33466
|
}
|
|
33435
33467
|
);
|
|
33436
33468
|
}, isEqualProps$1);
|
|
33437
|
-
var container$2 = "_14ylloj2",
|
|
33469
|
+
var container$2 = "_14ylloj2", containerAnimated = "_14ylloj3", dimmed = "_14ylloj4", indicator = "_14ylloj6", fillElementFill = "_14ylloj7", fillMixStroke = "_14ylloj9", title$1 = "_14ylloja", description$1 = "_14yllojb", technology = "_14yllojc", element = "_14yllojd", iconMaxH = "var(--_14ylloje)", elementIcon = "_14yllojf", cssShapeSvg = "_14ylloji", cssNavigateBtn = "_14yllojj";
|
|
33438
33470
|
function ElementIcon({
|
|
33439
33471
|
node,
|
|
33440
33472
|
paddingY = 32
|
|
@@ -33703,13 +33735,13 @@ const selectedScale = 1.015, variants = {
|
|
|
33703
33735
|
idle: (_, { scale: scale2 }) => ({
|
|
33704
33736
|
scale: 1,
|
|
33705
33737
|
transition: {
|
|
33706
|
-
delay: isNumber(scale2) && scale2 > selectedScale ? 0.
|
|
33738
|
+
delay: isNumber(scale2) && scale2 > selectedScale ? 0.09 : 0
|
|
33707
33739
|
}
|
|
33708
33740
|
}),
|
|
33709
33741
|
selected: (_, { scale: scale2 }) => ({
|
|
33710
33742
|
scale: selectedScale,
|
|
33711
33743
|
transition: {
|
|
33712
|
-
delay: isNumber(scale2) && scale2 > selectedScale ? 0.
|
|
33744
|
+
delay: isNumber(scale2) && scale2 > selectedScale ? 0.09 : 0
|
|
33713
33745
|
}
|
|
33714
33746
|
}),
|
|
33715
33747
|
// dimmed: {
|
|
@@ -33733,12 +33765,9 @@ const selectedScale = 1.015, variants = {
|
|
|
33733
33765
|
// delay: 1
|
|
33734
33766
|
// }
|
|
33735
33767
|
// }),
|
|
33736
|
-
hovered:
|
|
33737
|
-
scale: 1.06
|
|
33738
|
-
|
|
33739
|
-
delay: isNumber(scale2) && scale2 !== 1 && scale2 !== selectedScale ? 0 : 0.15
|
|
33740
|
-
}
|
|
33741
|
-
}),
|
|
33768
|
+
hovered: {
|
|
33769
|
+
scale: 1.06
|
|
33770
|
+
},
|
|
33742
33771
|
tap: {
|
|
33743
33772
|
scale: 0.975
|
|
33744
33773
|
}
|
|
@@ -33784,8 +33813,10 @@ const selectedScale = 1.015, variants = {
|
|
|
33784
33813
|
className: clsx([
|
|
33785
33814
|
container$2,
|
|
33786
33815
|
isDimmed && dimmed,
|
|
33816
|
+
animate !== "idle" && containerAnimated,
|
|
33787
33817
|
"likec4-element-node"
|
|
33788
33818
|
]),
|
|
33819
|
+
"data-hovered": !dragging && isHovered,
|
|
33789
33820
|
"data-likec4-color": element$1.color,
|
|
33790
33821
|
"data-likec4-shape": element$1.shape,
|
|
33791
33822
|
variants,
|
|
@@ -34098,7 +34129,87 @@ function XYFlow({
|
|
|
34098
34129
|
}
|
|
34099
34130
|
);
|
|
34100
34131
|
}
|
|
34101
|
-
|
|
34132
|
+
function useNavigationHistory() {
|
|
34133
|
+
const store = useDiagramStoreApi(), viewId = useDiagramState((s) => s.view.id), [historyViewId, historyOps, {
|
|
34134
|
+
history,
|
|
34135
|
+
current: historyIndex
|
|
34136
|
+
}] = useStateHistory(viewId), hasBack = historyIndex > 0, hasForward = historyIndex < history.length - 1;
|
|
34137
|
+
return useUpdateEffect(() => {
|
|
34138
|
+
viewId !== historyViewId && historyOps.set(viewId);
|
|
34139
|
+
}, [viewId]), useUpdateEffect(() => {
|
|
34140
|
+
viewId !== historyViewId && store.getState().onNavigateTo?.(historyViewId);
|
|
34141
|
+
}, [historyViewId]), reactExports.useMemo(() => ({
|
|
34142
|
+
hasBack,
|
|
34143
|
+
hasForward,
|
|
34144
|
+
ops: historyOps
|
|
34145
|
+
}), [
|
|
34146
|
+
hasBack,
|
|
34147
|
+
hasForward,
|
|
34148
|
+
historyOps
|
|
34149
|
+
]);
|
|
34150
|
+
}
|
|
34151
|
+
var panel$1 = "ufby1u0";
|
|
34152
|
+
function BackwardForwardPanel() {
|
|
34153
|
+
const { hasBack, hasForward, ops } = useNavigationHistory();
|
|
34154
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34155
|
+
Group,
|
|
34156
|
+
{
|
|
34157
|
+
className: clsx(
|
|
34158
|
+
"react-flow__panel",
|
|
34159
|
+
panel$1,
|
|
34160
|
+
"likec4-navigation-panel"
|
|
34161
|
+
),
|
|
34162
|
+
gap: "xs",
|
|
34163
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AnimatePresence, { children: [
|
|
34164
|
+
hasBack && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34165
|
+
m.div,
|
|
34166
|
+
{
|
|
34167
|
+
layout: !0,
|
|
34168
|
+
initial: { opacity: 0.05, transform: "translateX(-10px)" },
|
|
34169
|
+
animate: { opacity: 1, transform: "translateX(0)" },
|
|
34170
|
+
exit: {
|
|
34171
|
+
opacity: 0.05,
|
|
34172
|
+
transform: "translateX(-10px)"
|
|
34173
|
+
},
|
|
34174
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34175
|
+
ActionIcon,
|
|
34176
|
+
{
|
|
34177
|
+
variant: "light",
|
|
34178
|
+
color: "gray",
|
|
34179
|
+
onClick: () => ops.back(),
|
|
34180
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconChevronLeft, {})
|
|
34181
|
+
}
|
|
34182
|
+
)
|
|
34183
|
+
},
|
|
34184
|
+
"back"
|
|
34185
|
+
),
|
|
34186
|
+
hasForward && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34187
|
+
m.div,
|
|
34188
|
+
{
|
|
34189
|
+
layout: !0,
|
|
34190
|
+
initial: { opacity: 0.05, transform: "translateX(10px)" },
|
|
34191
|
+
animate: { opacity: 1, transform: "translateX(0)" },
|
|
34192
|
+
exit: {
|
|
34193
|
+
opacity: 0,
|
|
34194
|
+
transform: "translateX(10px)"
|
|
34195
|
+
},
|
|
34196
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34197
|
+
ActionIcon,
|
|
34198
|
+
{
|
|
34199
|
+
variant: "light",
|
|
34200
|
+
color: "gray",
|
|
34201
|
+
onClick: () => ops.forward(),
|
|
34202
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconChevronRight, {})
|
|
34203
|
+
}
|
|
34204
|
+
)
|
|
34205
|
+
},
|
|
34206
|
+
"forward"
|
|
34207
|
+
)
|
|
34208
|
+
] })
|
|
34209
|
+
}
|
|
34210
|
+
);
|
|
34211
|
+
}
|
|
34212
|
+
var container$1 = "_19ci0hj0", card = "_19ci0hj1", title = "_19ci0hj2", description = "_19ci0hj3";
|
|
34102
34213
|
const selector = (s) => ({
|
|
34103
34214
|
id: s.view.id,
|
|
34104
34215
|
title: s.view.title ?? "untitled",
|
|
@@ -34123,16 +34234,29 @@ function DiagramTitlePanel() {
|
|
|
34123
34234
|
style: {
|
|
34124
34235
|
transformOrigin: "left center"
|
|
34125
34236
|
},
|
|
34126
|
-
children: /* @__PURE__ */ jsxRuntimeExports.
|
|
34127
|
-
|
|
34237
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34238
|
+
Card,
|
|
34128
34239
|
{
|
|
34129
34240
|
radius: "sm",
|
|
34130
|
-
|
|
34131
|
-
|
|
34132
|
-
p: isCollapsed ? "xs" : "lg",
|
|
34241
|
+
className: card,
|
|
34242
|
+
p: "md",
|
|
34133
34243
|
onDoubleClick: (e2) => e2.stopPropagation(),
|
|
34134
|
-
children:
|
|
34135
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
34244
|
+
children: [
|
|
34245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CardSection, { mb: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34246
|
+
Button,
|
|
34247
|
+
{
|
|
34248
|
+
fullWidth: !0,
|
|
34249
|
+
size: "xs",
|
|
34250
|
+
h: "sm",
|
|
34251
|
+
py: 2,
|
|
34252
|
+
radius: "0",
|
|
34253
|
+
variant: "subtle",
|
|
34254
|
+
color: "gray",
|
|
34255
|
+
onClick: toggle,
|
|
34256
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconMenu, { size: 11, opacity: 0.7 })
|
|
34257
|
+
}
|
|
34258
|
+
) }),
|
|
34259
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "stretch", wrap: "nowrap", mb: isCollapsed ? 0 : "sm", children: [
|
|
34136
34260
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34137
34261
|
Text,
|
|
34138
34262
|
{
|
|
@@ -34230,7 +34354,7 @@ function DiagramTitlePanel() {
|
|
|
34230
34354
|
}
|
|
34231
34355
|
)
|
|
34232
34356
|
] })
|
|
34233
|
-
]
|
|
34357
|
+
]
|
|
34234
34358
|
}
|
|
34235
34359
|
)
|
|
34236
34360
|
},
|
|
@@ -34546,14 +34670,16 @@ function BorderStyleOption({
|
|
|
34546
34670
|
) });
|
|
34547
34671
|
}
|
|
34548
34672
|
var panel = "_12rmdgk0";
|
|
34549
|
-
const
|
|
34550
|
-
|
|
34551
|
-
|
|
34552
|
-
|
|
34553
|
-
|
|
34554
|
-
|
|
34555
|
-
|
|
34556
|
-
|
|
34673
|
+
const Empty = [];
|
|
34674
|
+
function OptionsPanel() {
|
|
34675
|
+
const { isFocusDisabled, viewId } = useDiagramState((s) => ({
|
|
34676
|
+
viewId: s.view.id,
|
|
34677
|
+
isFocusDisabled: s.focusedNodeId === null && s.activeDynamicViewStep === null
|
|
34678
|
+
})), selectedNodes = useXYStore(
|
|
34679
|
+
reactExports.useCallback((s) => s.elementsSelectable && isFocusDisabled ? reduce(s.nodes, (acc, n2) => (n2.selected && acc.push(n2.id), acc), []) : Empty, [isFocusDisabled]),
|
|
34680
|
+
shallowEqual
|
|
34681
|
+
);
|
|
34682
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatePresence, { mode: "wait", children: selectedNodes.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34557
34683
|
m.div,
|
|
34558
34684
|
{
|
|
34559
34685
|
initial: { opacity: 0, scale: 0.85 },
|
|
@@ -34568,9 +34694,10 @@ const OptionsPanelMemo = reactExports.memo(function() {
|
|
|
34568
34694
|
transformOrigin: "center right"
|
|
34569
34695
|
},
|
|
34570
34696
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { shadow: "sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(NodeOptions, { selectedNodeIds: selectedNodes }) })
|
|
34571
|
-
}
|
|
34697
|
+
},
|
|
34698
|
+
viewId
|
|
34572
34699
|
) });
|
|
34573
|
-
}
|
|
34700
|
+
}
|
|
34574
34701
|
function literalToEnum(value) {
|
|
34575
34702
|
switch (value) {
|
|
34576
34703
|
case "dots":
|
|
@@ -34594,10 +34721,11 @@ const XYFlowInner = reactExports.memo(function({
|
|
|
34594
34721
|
background,
|
|
34595
34722
|
controls,
|
|
34596
34723
|
showDiagramTitle,
|
|
34724
|
+
showNavigationButtons,
|
|
34597
34725
|
enableDynamicViewWalkthrough
|
|
34598
34726
|
}) {
|
|
34599
34727
|
const {
|
|
34600
|
-
isDynamicView
|
|
34728
|
+
isDynamicView,
|
|
34601
34729
|
isDynamicViewActive,
|
|
34602
34730
|
readonly
|
|
34603
34731
|
} = useDiagramState((s) => ({
|
|
@@ -34608,9 +34736,10 @@ const XYFlowInner = reactExports.memo(function({
|
|
|
34608
34736
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
34609
34737
|
isBgWithPattern && /* @__PURE__ */ jsxRuntimeExports.jsx(XYFlowBackground, { background }),
|
|
34610
34738
|
controls && /* @__PURE__ */ jsxRuntimeExports.jsx(Controls, { position: "bottom-right" }),
|
|
34611
|
-
readonly === !1 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34739
|
+
readonly === !1 && /* @__PURE__ */ jsxRuntimeExports.jsx(OptionsPanel, {}),
|
|
34612
34740
|
isDiagramTitleVisible && /* @__PURE__ */ jsxRuntimeExports.jsx(DiagramTitlePanel, {}),
|
|
34613
|
-
|
|
34741
|
+
isDynamicView && enableDynamicViewWalkthrough && /* @__PURE__ */ jsxRuntimeExports.jsx(DynamicViewWalkthrough, {}),
|
|
34742
|
+
showNavigationButtons && /* @__PURE__ */ jsxRuntimeExports.jsx(BackwardForwardPanel, {}),
|
|
34614
34743
|
children2
|
|
34615
34744
|
] });
|
|
34616
34745
|
}, shallowEqual);
|
|
@@ -34628,6 +34757,7 @@ function LikeC4Diagram({
|
|
|
34628
34757
|
controls = !1,
|
|
34629
34758
|
showElementLinks = !0,
|
|
34630
34759
|
showDiagramTitle = !0,
|
|
34760
|
+
showNavigationButtons = !1,
|
|
34631
34761
|
enableDynamicViewWalkthrough = !0,
|
|
34632
34762
|
initialWidth,
|
|
34633
34763
|
initialHeight,
|
|
@@ -34701,6 +34831,7 @@ function LikeC4Diagram({
|
|
|
34701
34831
|
controls,
|
|
34702
34832
|
pannable,
|
|
34703
34833
|
showDiagramTitle,
|
|
34834
|
+
showNavigationButtons,
|
|
34704
34835
|
enableDynamicViewWalkthrough
|
|
34705
34836
|
}
|
|
34706
34837
|
)
|
|
@@ -34720,9 +34851,20 @@ const LikeC4DiagramInnerMemo = reactExports.memo(function({
|
|
|
34720
34851
|
defaultNodes,
|
|
34721
34852
|
defaultEdges,
|
|
34722
34853
|
showDiagramTitle,
|
|
34854
|
+
showNavigationButtons,
|
|
34723
34855
|
enableDynamicViewWalkthrough
|
|
34724
34856
|
}) {
|
|
34725
|
-
|
|
34857
|
+
const diagramApi = useDiagramStoreApi(), [isInitialized, setIsInitialized] = reactExports.useState(diagramApi.getState().initialized);
|
|
34858
|
+
return reactExports.useEffect(() => {
|
|
34859
|
+
if (!isInitialized)
|
|
34860
|
+
return diagramApi.subscribe(
|
|
34861
|
+
(s) => s.initialized,
|
|
34862
|
+
setIsInitialized,
|
|
34863
|
+
{
|
|
34864
|
+
fireImmediately: !0
|
|
34865
|
+
}
|
|
34866
|
+
);
|
|
34867
|
+
}, [isInitialized]), /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
34726
34868
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34727
34869
|
XYFlow,
|
|
34728
34870
|
{
|
|
@@ -34738,6 +34880,7 @@ const LikeC4DiagramInnerMemo = reactExports.memo(function({
|
|
|
34738
34880
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34739
34881
|
XYFlowInner,
|
|
34740
34882
|
{
|
|
34883
|
+
showNavigationButtons,
|
|
34741
34884
|
showDiagramTitle,
|
|
34742
34885
|
enableDynamicViewWalkthrough,
|
|
34743
34886
|
background,
|
|
@@ -34746,7 +34889,7 @@ const LikeC4DiagramInnerMemo = reactExports.memo(function({
|
|
|
34746
34889
|
)
|
|
34747
34890
|
}
|
|
34748
34891
|
),
|
|
34749
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34892
|
+
isInitialized && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
34750
34893
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SyncWithDiagram, {}),
|
|
34751
34894
|
fitView2 && /* @__PURE__ */ jsxRuntimeExports.jsx(FitViewOnDiagramChange, {}),
|
|
34752
34895
|
fitView2 && zoomable && /* @__PURE__ */ jsxRuntimeExports.jsx(SelectEdgesOnNodeFocus, {})
|
|
@@ -34907,7 +35050,7 @@ function useLikeC4View(id2) {
|
|
|
34907
35050
|
keys: [id2]
|
|
34908
35051
|
})[id2] ?? null;
|
|
34909
35052
|
}
|
|
34910
|
-
var previewBg = "_15b5f732", svgContainer = "_1dn84dq1", cssViewOutlet = "
|
|
35053
|
+
var previewBg = "_15b5f732", svgContainer = "_1dn84dq1", cssViewOutlet = "_1dn84dq3", cssCaptureGesturesLayer = "_1dn84dq4", cssExportView = "_1dn84dq5", cssExportBox = "_1dn84dq6", cssWebcomponentView = "_1dn84dq7", cssWebcomponentIframeContainer = "_1dn84dq8";
|
|
34911
35054
|
const Route$9 = createFileRoute("/")({
|
|
34912
35055
|
component: IndexPage
|
|
34913
35056
|
});
|
|
@@ -35233,7 +35376,7 @@ function ColorSchemeToggle() {
|
|
|
35233
35376
|
}
|
|
35234
35377
|
);
|
|
35235
35378
|
}
|
|
35236
|
-
var cssHeader = "
|
|
35379
|
+
var cssHeader = "yr9aef0";
|
|
35237
35380
|
const AlertLocalhost = () => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35238
35381
|
Alert,
|
|
35239
35382
|
{
|
|
@@ -35406,24 +35549,36 @@ function ShareModal({
|
|
|
35406
35549
|
}
|
|
35407
35550
|
function Header({ diagram }) {
|
|
35408
35551
|
const { breakpoints } = useMantineTheme(), isTablet = useMediaQuery(`(min-width: ${breakpoints.md})`) ?? !1, [opened, { open, close }] = useDisclosure(!1);
|
|
35409
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35410
|
-
|
|
35411
|
-
|
|
35412
|
-
|
|
35413
|
-
|
|
35414
|
-
|
|
35415
|
-
|
|
35416
|
-
|
|
35417
|
-
|
|
35418
|
-
|
|
35419
|
-
|
|
35420
|
-
|
|
35421
|
-
|
|
35422
|
-
|
|
35423
|
-
|
|
35424
|
-
|
|
35425
|
-
|
|
35426
|
-
|
|
35552
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35553
|
+
Paper,
|
|
35554
|
+
{
|
|
35555
|
+
className: cssHeader,
|
|
35556
|
+
pos: "fixed",
|
|
35557
|
+
top: "0.5rem",
|
|
35558
|
+
right: "0.5rem",
|
|
35559
|
+
py: 5,
|
|
35560
|
+
px: "md",
|
|
35561
|
+
radius: "sm",
|
|
35562
|
+
shadow: "xl",
|
|
35563
|
+
children: [
|
|
35564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: isTablet ? "xs" : 4, wrap: "nowrap", children: [
|
|
35565
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ViewPageButton, { isTablet }),
|
|
35566
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ColorSchemeToggle, {}),
|
|
35567
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical" }),
|
|
35568
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ml: "xs", size: isTablet ? "sm" : "xs", leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(IconShare, { size: 14 }), onClick: open, children: "Share" }),
|
|
35569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ExportButton, { diagram })
|
|
35570
|
+
] }),
|
|
35571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35572
|
+
ShareModal,
|
|
35573
|
+
{
|
|
35574
|
+
opened,
|
|
35575
|
+
onClose: close,
|
|
35576
|
+
diagram
|
|
35577
|
+
}
|
|
35578
|
+
)
|
|
35579
|
+
]
|
|
35580
|
+
}
|
|
35581
|
+
);
|
|
35427
35582
|
}
|
|
35428
35583
|
const viewPages = [
|
|
35429
35584
|
{
|
|
@@ -35461,58 +35616,35 @@ function ViewPageButton({
|
|
|
35461
35616
|
const { viewId } = useParams({
|
|
35462
35617
|
from: "/view/$viewId"
|
|
35463
35618
|
}), routerState = useRouterState(), matchedRoute = findLast(routerState.matches, ({ routeId }) => routeIds.includes(routeId)), matched = (matchedRoute && viewPages.find(({ route }) => route === matchedRoute.routeId)) ?? viewPages[0];
|
|
35464
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
35465
|
-
|
|
35466
|
-
|
|
35619
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu, { shadow: "md", width: 200, trigger: "click-hover", openDelay: 100, children: [
|
|
35620
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MenuTarget, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35621
|
+
Button,
|
|
35467
35622
|
{
|
|
35468
|
-
|
|
35469
|
-
|
|
35470
|
-
|
|
35471
|
-
|
|
35472
|
-
|
|
35473
|
-
|
|
35474
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35475
|
-
Badge,
|
|
35476
|
-
{
|
|
35477
|
-
size: "xs",
|
|
35478
|
-
radius: "xs",
|
|
35479
|
-
variant: "gradient",
|
|
35480
|
-
gradient: { from: "pink", to: "violet", deg: 90 },
|
|
35481
|
-
children: "editor preview"
|
|
35482
|
-
}
|
|
35483
|
-
)
|
|
35623
|
+
leftSection: matched.icon,
|
|
35624
|
+
variant: "subtle",
|
|
35625
|
+
size: isTablet ? "sm" : "xs",
|
|
35626
|
+
color: "gray",
|
|
35627
|
+
rightSection: /* @__PURE__ */ jsxRuntimeExports.jsx(IconChevronDown, { opacity: 0.5, size: 14 }),
|
|
35628
|
+
children: matched.title
|
|
35484
35629
|
}
|
|
35485
35630
|
) }),
|
|
35486
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
35487
|
-
|
|
35488
|
-
|
|
35489
|
-
|
|
35490
|
-
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
|
|
35494
|
-
|
|
35495
|
-
|
|
35496
|
-
|
|
35497
|
-
) }),
|
|
35498
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(MenuDropdown, { children: viewPages.map(({ route, icon, title: title2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35499
|
-
MenuItem,
|
|
35500
|
-
{
|
|
35501
|
-
component: Link$1,
|
|
35502
|
-
to: route,
|
|
35503
|
-
search: !0,
|
|
35504
|
-
params: { viewId },
|
|
35505
|
-
leftSection: icon,
|
|
35506
|
-
...route === matched.route ? { bg: "gray" } : {},
|
|
35507
|
-
style: {
|
|
35508
|
-
whiteSpace: "nowrap"
|
|
35509
|
-
},
|
|
35510
|
-
children: title2
|
|
35631
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MenuDropdown, { children: viewPages.map(({ route, icon, title: title2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35632
|
+
MenuItem,
|
|
35633
|
+
{
|
|
35634
|
+
component: Link$1,
|
|
35635
|
+
to: route,
|
|
35636
|
+
search: !0,
|
|
35637
|
+
params: { viewId },
|
|
35638
|
+
leftSection: icon,
|
|
35639
|
+
...route === matched.route ? { bg: "gray" } : {},
|
|
35640
|
+
style: {
|
|
35641
|
+
whiteSpace: "nowrap"
|
|
35511
35642
|
},
|
|
35512
|
-
|
|
35513
|
-
|
|
35514
|
-
|
|
35515
|
-
|
|
35643
|
+
children: title2
|
|
35644
|
+
},
|
|
35645
|
+
route
|
|
35646
|
+
)) })
|
|
35647
|
+
] }) });
|
|
35516
35648
|
}
|
|
35517
35649
|
function downloadImage(name, dataUrl) {
|
|
35518
35650
|
const a = document.createElement("a");
|
|
@@ -35562,22 +35694,6 @@ function ExportButton({ diagram }) {
|
|
|
35562
35694
|
] })
|
|
35563
35695
|
] });
|
|
35564
35696
|
}
|
|
35565
|
-
function DiagramTitle({ diagram }) {
|
|
35566
|
-
const hasDescription = !isEmpty(diagram.description?.trim());
|
|
35567
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(HoverCard, { closeDelay: 500, position: "bottom-start", children: [
|
|
35568
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(HoverCardTarget, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: cssDiagramTitle, children: diagram.title || "Untitled" }) }),
|
|
35569
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(HoverCardDropdown, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { direction: "column", gap: "xs", children: [
|
|
35570
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(HoverCardItem, { title: "view id", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Code, { color: "gray", children: diagram.id }) }),
|
|
35571
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(HoverCardItem, { title: "description", children: hasDescription ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { component: "p", style: { whiteSpace: "pre-line" }, children: diagram.description?.trim() }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", fz: "xs", children: "no description" }) })
|
|
35572
|
-
] }) })
|
|
35573
|
-
] });
|
|
35574
|
-
}
|
|
35575
|
-
function HoverCardItem({ title: title2, children: children2 }) {
|
|
35576
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
35577
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "xs", c: "dimmed", children: title2 }),
|
|
35578
|
-
children2
|
|
35579
|
-
] });
|
|
35580
|
-
}
|
|
35581
35697
|
const Route$7 = createFileRoute("/view/$viewId")({
|
|
35582
35698
|
component: ViewLayout
|
|
35583
35699
|
});
|
|
@@ -35748,6 +35864,7 @@ function ViewReact() {
|
|
|
35748
35864
|
readonly: !0,
|
|
35749
35865
|
controls: !1,
|
|
35750
35866
|
fitViewPadding: 0.08,
|
|
35867
|
+
showNavigationButtons: !0,
|
|
35751
35868
|
onNavigateTo: (viewId2) => {
|
|
35752
35869
|
router.navigate({
|
|
35753
35870
|
to: "/view/$viewId",
|
|
@@ -37218,7 +37335,7 @@ function CopyButton({ text }) {
|
|
|
37218
37335
|
function CopyToClipboard({ text }) {
|
|
37219
37336
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { pos: "absolute", top: "0", right: "0", p: "4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, { text }) });
|
|
37220
37337
|
}
|
|
37221
|
-
var cssScrollArea = "_5k2wbq0", cssCodeBlock = "_5k2wbq1";
|
|
37338
|
+
var cssScrollArea = "_5k2wbq0", cssCodeBlock = "_5k2wbq1", viewWithTopPadding = "_5k2wbq2";
|
|
37222
37339
|
const Route$3 = createFileRoute("/view/$viewId/mmd")({
|
|
37223
37340
|
component: ViewAsMmd
|
|
37224
37341
|
}), renderSvg = async (viewId, diagram) => {
|
|
@@ -37240,7 +37357,7 @@ function ViewAsMmd() {
|
|
|
37240
37357
|
const { viewId } = Route$3.useParams(), source = useData$1(), [mmdSvg, { execute }] = useAsync(renderSvg, null);
|
|
37241
37358
|
return reactExports.useEffect(() => {
|
|
37242
37359
|
execute(viewId, source);
|
|
37243
|
-
}, [source]), /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { direction: "horizontal", autoSaveId: "viewAsMmd", children: [
|
|
37360
|
+
}, [source]), /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { className: viewWithTopPadding, direction: "horizontal", autoSaveId: "viewAsMmd", children: [
|
|
37244
37361
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37245
37362
|
ScrollArea,
|
|
37246
37363
|
{
|
|
@@ -37282,6 +37399,7 @@ function ViewEditor() {
|
|
|
37282
37399
|
readonly: !1,
|
|
37283
37400
|
nodesDraggable: !0,
|
|
37284
37401
|
experimentalEdgeEditing: !0,
|
|
37402
|
+
showNavigationButtons: !0,
|
|
37285
37403
|
fitViewPadding: 0.08,
|
|
37286
37404
|
onNavigateTo: (viewId2) => {
|
|
37287
37405
|
router.navigate({
|
|
@@ -37312,7 +37430,7 @@ const Route$1 = createFileRoute("/view/$viewId/dot")({
|
|
|
37312
37430
|
});
|
|
37313
37431
|
function ViewAsDot() {
|
|
37314
37432
|
const { dot, dotSvg } = Route$1.useLoaderData();
|
|
37315
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { direction: "horizontal", autoSaveId: "viewAsDot", children: [
|
|
37433
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { className: viewWithTopPadding, direction: "horizontal", autoSaveId: "viewAsDot", children: [
|
|
37316
37434
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37317
37435
|
ScrollArea,
|
|
37318
37436
|
{
|
|
@@ -37352,7 +37470,7 @@ const Route2 = createFileRoute("/view/$viewId/d2")({
|
|
|
37352
37470
|
};
|
|
37353
37471
|
function ViewAsD2() {
|
|
37354
37472
|
const source = useData();
|
|
37355
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { direction: "horizontal", autoSaveId: "viewAsD2", children: [
|
|
37473
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(PanelGroup, { className: viewWithTopPadding, direction: "horizontal", autoSaveId: "viewAsD2", children: [
|
|
37356
37474
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37357
37475
|
ScrollArea,
|
|
37358
37476
|
{
|