likec4 1.15.1 → 1.16.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.
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useOverviewGraph } from "virtual:likec4/overview-graph";
3
- import { u, c as createReactComponent, I as IconFolderFilled, e, a as useUpdateEffect, n as nonexhaustive } from "./main-CDPsQgdJ.js";
3
+ import { u, c as createReactComponent, I as IconFolderFilled, e, a as useUpdateEffect, n as nonexhaustive } from "./main-DejpCNPJ.js";
4
4
  import { u as useRouter } from "./tanstack-router-CfO1HFS2.js";
5
5
  import { B as BaseEdge, H as Handle, P as Position, u as useNodesState, a as useEdgesState, i as index, b as Background, c as BackgroundVariant } from "./likec4-zEZHE7gJ.js";
6
6
  import { memo, useRef, useMemo } from "react";
7
- import { P as Paper, c as clsx, G as Group, T as ThemeIcon, a as Text, C as Card, b as CardSection, d as Center, I as Image, B as Box, u as useMantineColorScheme } from "./mantine-3sBuUgD1.js";
7
+ import { P as Paper, c as clsx, G as Group, T as ThemeIcon, a as Text, C as Card, b as CardSection, d as Center, I as Image, B as Box, u as useMantineColorScheme } from "./mantine-Dx0sIYv1.js";
8
8
  import { usePreviewUrl } from "virtual:likec4/previews";
9
9
  function i(...e2) {
10
10
  return u(y, e2);
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  import { createContext as createContext$1, useContext as useContext$1, useId as useId$1, useEffect as useEffect$1, useCallback as useCallback$1, Component, useLayoutEffect as useLayoutEffect$1, useRef as useRef$1, useInsertionEffect, useMemo as useMemo$1, forwardRef as forwardRef$1, Fragment, createElement as createElement$1, Children, isValidElement, useState as useState$1, memo as memo$1, Suspense, lazy, useSyncExternalStore, StrictMode } from "react";
4
4
  import { createRoot } from "react-dom/client";
5
5
  import { L as Link, c as createRootRouteWithContext, S as ScrollRestoration, O as Outlet, a as createFileRoute, u as useRouter, b as useParams, d as useRouterState, i as isNotFound, n as notFound, R as RouterProvider, e as createRouter$1, f as createHashHistory, g as createBrowserHistory } from "./tanstack-router-CfO1HFS2.js";
6
- import { e as Container, f as Title, a as Text$6, G as Group, g as Button, h as useMergedRef, t as themeToVars, i as useMantineStyleNonce, M as MantineContext, j as useComputedColorScheme, k as Popover, l as PopoverTarget, B as Box, T as ThemeIcon, m as PopoverDropdown, S as ScrollAreaAutosize, c as clsx, A as ActionIcon$1, n as Stack$1, o as useTree, p as Tree, q as useLocalStorage, r as useStateHistory, s as Space, v as SegmentedControl, w as useHotkeys, F as FocusTrap, x as Tooltip$3, y as Menu, z as MenuTarget, D as MenuDropdown, E as MenuLabel, H as MenuDivider, J as TooltipGroup, K as MenuItem, L as CloseButton, N as keys$1, O as ColorSwatch, Q as Divider, R as Flex, U as CheckIcon, V as rem, W as Slider, P as Paper, X as useDebouncedValue, Y as HoverCard, Z as HoverCardTarget, _ as UnstyledButton, $ as HoverCardDropdown, a0 as Anchor, a1 as CopyButton$1, C as Card, b as CardSection, a2 as Spoiler, a3 as Badge, a4 as ButtonGroup, a5 as Tabs, a6 as TabsList, a7 as TabsTab, a8 as TabsPanel, a9 as useHover, aa as FloatingIndicator, ab as useUncontrolled, ac as clampUseMovePosition, ad as useMove, ae as ActionIconGroup, af as Overlay, ag as Notification, ah as Code, ai as createTheme, aj as MantineProvider, ak as useInViewport, al as SimpleGrid, u as useMantineColorScheme, am as Drawer, an as ScrollArea, ao as Alert, ap as Select, aq as ModalRoot, ar as ModalOverlay, as as ModalContent, at as ModalBody, au as useMantineTheme, av as useMediaQuery, aw as useDisclosure, ax as LoadingOverlay, ay as useCallbackRef, az as Burger, aA as Loader } from "./mantine-3sBuUgD1.js";
6
+ import { e as Container, f as Title, a as Text$6, G as Group, g as Button, h as useMergedRef, t as themeToVars, i as useMantineStyleNonce, M as MantineContext, j as useComputedColorScheme, k as Popover, l as PopoverTarget, B as Box, T as ThemeIcon, m as PopoverDropdown, S as ScrollAreaAutosize, c as clsx, A as ActionIcon$1, n as Stack$1, o as useTree, p as Tree, q as useLocalStorage, r as useStateHistory, s as Space, v as SegmentedControl, w as useHotkeys, F as FocusTrap, x as Tooltip$3, y as Menu, z as MenuTarget, D as MenuDropdown, E as MenuLabel, H as MenuDivider, J as TooltipGroup, K as MenuItem, L as CloseButton, N as keys$1, O as ColorSwatch, Q as Divider, R as Flex, U as CheckIcon, V as rem, W as Slider, P as Paper, X as useDebouncedValue, Y as HoverCard, Z as HoverCardTarget, _ as UnstyledButton, $ as HoverCardDropdown, a0 as Anchor, a1 as CopyButton$1, C as Card, b as CardSection, a2 as Spoiler, a3 as Badge, a4 as ButtonGroup, a5 as Tabs, a6 as TabsList, a7 as TabsTab, a8 as TabsPanel, a9 as useHover, aa as FloatingIndicator, ab as useUncontrolled, ac as clampUseMovePosition, ad as useMove, ae as ActionIconGroup, af as Overlay, ag as Notification, ah as Code, ai as createTheme, aj as MantineProvider, ak as useInViewport, al as SimpleGrid, u as useMantineColorScheme, am as Drawer, an as ScrollArea, ao as Alert, ap as Select, aq as ModalRoot, ar as ModalOverlay, as as ModalContent, at as ModalBody, au as useMantineTheme, av as useMediaQuery, aw as useDisclosure, ax as LoadingOverlay, ay as useCallbackRef, az as Burger, aA as Loader } from "./mantine-Dx0sIYv1.js";
7
7
  import { withOverviewGraph, ComponentName, isDevelopment, krokiD2SvgUrl, basepath, useHashHistory } from "../const.js";
8
8
  import { useLikeC4ModelAtom } from "virtual:likec4/model";
9
9
  import { g as getDefaultExportFromCjs, d as useReactFlow, e as useStoreApi, f as useStore$1, h as useNodesData, j as getNodeDimensions, k as createWithEqualityFn, l as applyNodeChanges, m as applyEdgeChanges, n as getViewportForBounds, o as getBoundsOfRects, s as shallow$1, p as boxToRect, q as useStoreWithEqualityFn, M as MarkerType, H as Handle, P as Position, r as getBezierPath, B as BaseEdge, E as EdgeLabelRenderer, i as index, t as Panel$1, V as ViewportPortal, R as ReactFlowProvider, N as NodeToolbar, v as useOnViewportChange, b as Background, c as BackgroundVariant } from "./likec4-zEZHE7gJ.js";
@@ -1825,7 +1825,7 @@ class MotionValue {
1825
1825
  * @internal
1826
1826
  */
1827
1827
  constructor(init, options = {}) {
1828
- this.version = "11.11.9", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v, render = !0) => {
1828
+ this.version = "11.11.10", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v, render = !0) => {
1829
1829
  const currentTime = time$1.now();
1830
1830
  this.updatedAt !== currentTime && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(v), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), render && this.events.renderRequest && this.events.renderRequest.notify(this.current);
1831
1831
  }, this.hasAnimated = !1, this.setCurrent(init), this.owner = options.owner;
@@ -2033,8 +2033,6 @@ function isWillChangeMotionValue(value) {
2033
2033
  return !!(isMotionValue(value) && value.add);
2034
2034
  }
2035
2035
  function addValueToWillChange(visualElement, key) {
2036
- if (!visualElement.applyWillChange)
2037
- return;
2038
2036
  const willChange = visualElement.getValue("willChange");
2039
2037
  if (isWillChangeMotionValue(willChange))
2040
2038
  return willChange.add(key);
@@ -4208,7 +4206,7 @@ function scrapeMotionValuesFromProps$1(props2, prevProps, visualElement) {
4208
4206
  const { style } = props2, newValues = {};
4209
4207
  for (const key in style)
4210
4208
  (isMotionValue(style[key]) || prevProps.style && isMotionValue(prevProps.style[key]) || isForcedMotionValue(key, props2) || ((_a = visualElement?.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== void 0) && (newValues[key] = style[key]);
4211
- return visualElement && style && typeof style.willChange == "string" && (visualElement.applyWillChange = !1), newValues;
4209
+ return newValues;
4212
4210
  }
4213
4211
  function scrapeMotionValuesFromProps(props2, prevProps, visualElement) {
4214
4212
  const newValues = scrapeMotionValuesFromProps$1(props2, prevProps, visualElement);
@@ -4223,36 +4221,19 @@ function useConstant(init) {
4223
4221
  const ref = useRef$1(null);
4224
4222
  return ref.current === null && (ref.current = init()), ref.current;
4225
4223
  }
4226
- function getWillChangeName(name) {
4227
- if (transformProps.has(name))
4228
- return "transform";
4229
- if (acceleratedValues.has(name))
4230
- return camelToDash(name);
4231
- }
4232
- function makeState({ applyWillChange = !1, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount: onMount2 }, props2, context, presenceContext, isStatic) {
4224
+ function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount: onMount2 }, props2, context, presenceContext) {
4233
4225
  const state = {
4234
- latestValues: makeLatestValues(props2, context, presenceContext, isStatic ? !1 : applyWillChange, scrapeMotionValuesFromProps2),
4226
+ latestValues: makeLatestValues(props2, context, presenceContext, scrapeMotionValuesFromProps2),
4235
4227
  renderState: createRenderState()
4236
4228
  };
4237
4229
  return onMount2 && (state.mount = (instance) => onMount2(props2, instance, state)), state;
4238
4230
  }
4239
4231
  const makeUseVisualState = (config) => (props2, isStatic) => {
4240
- const context = useContext$1(MotionContext), presenceContext = useContext$1(PresenceContext), make = () => makeState(config, props2, context, presenceContext, isStatic);
4232
+ const context = useContext$1(MotionContext), presenceContext = useContext$1(PresenceContext), make = () => makeState(config, props2, context, presenceContext);
4241
4233
  return isStatic ? make() : useConstant(make);
4242
4234
  };
4243
- function forEachDefinition(props2, definition, callback) {
4244
- const list2 = Array.isArray(definition) ? definition : [definition];
4245
- for (let i2 = 0; i2 < list2.length; i2++) {
4246
- const resolved = resolveVariantFromProps(props2, list2[i2]);
4247
- if (resolved) {
4248
- const { transitionEnd, transition, ...target } = resolved;
4249
- callback(target, transitionEnd);
4250
- }
4251
- }
4252
- }
4253
- function makeLatestValues(props2, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {
4254
- var _a;
4255
- const values = {}, willChange = /* @__PURE__ */ new Set(), applyWillChange = shouldApplyWillChange && ((_a = props2.style) === null || _a === void 0 ? void 0 : _a.willChange) === void 0, motionValues = scrapeMotionValues(props2, {});
4235
+ function makeLatestValues(props2, context, presenceContext, scrapeMotionValues) {
4236
+ const values = {}, motionValues = scrapeMotionValues(props2, {});
4256
4237
  for (const key in motionValues)
4257
4238
  values[key] = resolveMotionValue(motionValues[key]);
4258
4239
  let { initial, animate } = props2;
@@ -4261,23 +4242,26 @@ function makeLatestValues(props2, context, presenceContext, shouldApplyWillChang
4261
4242
  let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === !1 : !1;
4262
4243
  isInitialAnimationBlocked = isInitialAnimationBlocked || initial === !1;
4263
4244
  const variantToSet = isInitialAnimationBlocked ? animate : initial;
4264
- return variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet) && forEachDefinition(props2, variantToSet, (target, transitionEnd) => {
4265
- for (const key in target) {
4266
- let valueTarget = target[key];
4267
- if (Array.isArray(valueTarget)) {
4268
- const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
4269
- valueTarget = valueTarget[index2];
4245
+ if (variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet)) {
4246
+ const list2 = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
4247
+ for (let i2 = 0; i2 < list2.length; i2++) {
4248
+ const resolved = resolveVariantFromProps(props2, list2[i2]);
4249
+ if (resolved) {
4250
+ const { transitionEnd, transition, ...target } = resolved;
4251
+ for (const key in target) {
4252
+ let valueTarget = target[key];
4253
+ if (Array.isArray(valueTarget)) {
4254
+ const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
4255
+ valueTarget = valueTarget[index2];
4256
+ }
4257
+ valueTarget !== null && (values[key] = valueTarget);
4258
+ }
4259
+ for (const key in transitionEnd)
4260
+ values[key] = transitionEnd[key];
4270
4261
  }
4271
- valueTarget !== null && (values[key] = valueTarget);
4272
4262
  }
4273
- for (const key in transitionEnd)
4274
- values[key] = transitionEnd[key];
4275
- }), applyWillChange && (animate && initial !== !1 && !isAnimationControls(animate) && forEachDefinition(props2, animate, (target) => {
4276
- for (const name in target) {
4277
- const memberName = getWillChangeName(name);
4278
- memberName && willChange.add(memberName);
4279
- }
4280
- }), willChange.size && (values.willChange = Array.from(willChange).join(","))), values;
4263
+ }
4264
+ return values;
4281
4265
  }
4282
4266
  const createHtmlRenderState = () => ({
4283
4267
  style: {},
@@ -4397,7 +4381,6 @@ const isSVGTag = (tag) => typeof tag == "string" && tag.toLowerCase() === "svg",
4397
4381
  })
4398
4382
  }, htmlMotionConfig = {
4399
4383
  useVisualState: makeUseVisualState({
4400
- applyWillChange: !0,
4401
4384
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
4402
4385
  createRenderState: createHtmlRenderState
4403
4386
  })
@@ -4552,7 +4535,7 @@ class VisualElement {
4552
4535
  return {};
4553
4536
  }
4554
4537
  constructor({ parent, props: props2, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState }, options = {}) {
4555
- this.applyWillChange = !1, this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4538
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4556
4539
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
4557
4540
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
4558
4541
  const now2 = time$1.now();
@@ -4752,7 +4735,7 @@ function getComputedStyle$1(element) {
4752
4735
  }
4753
4736
  class HTMLVisualElement extends DOMVisualElement {
4754
4737
  constructor() {
4755
- super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = renderHTML;
4738
+ super(...arguments), this.type = "html", this.renderInstance = renderHTML;
4756
4739
  }
4757
4740
  readValueFromInstance(instance, key) {
4758
4741
  if (transformProps.has(key)) {
@@ -19420,6 +19403,7 @@ function StaticLikeC4Diagram({
19420
19403
  view,
19421
19404
  fitView = !0,
19422
19405
  fitViewPadding = 0,
19406
+ showElementLinks = !0,
19423
19407
  background = "transparent",
19424
19408
  ...rest
19425
19409
  }) {
@@ -19434,7 +19418,7 @@ function StaticLikeC4Diagram({
19434
19418
  zoomable: !1,
19435
19419
  controls: !1,
19436
19420
  background,
19437
- showElementLinks: !0,
19421
+ showElementLinks,
19438
19422
  showDiagramTitle: !1,
19439
19423
  showNotations: !1,
19440
19424
  showRelationshipDetails: !1,
@@ -19555,7 +19539,7 @@ function DiagramPreview$1({ diagram }) {
19555
19539
  }
19556
19540
  ) });
19557
19541
  }
19558
- const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-3cvoLqZL.js"));
19542
+ const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-BRH5n7M1.js"));
19559
19543
  function WithOverviewGraph() {
19560
19544
  return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(OverviewGraph, {}) });
19561
19545
  }
@@ -19846,6 +19830,7 @@ function DiagramPreview({
19846
19830
  renderIcon: RenderIcon,
19847
19831
  fitView: !0,
19848
19832
  fitViewPadding: 0,
19833
+ showElementLinks: !1,
19849
19834
  initialWidth: width2,
19850
19835
  initialHeight: height
19851
19836
  }
@@ -21732,35 +21717,39 @@ function PanelGroupWithForwardedRef({
21732
21717
  eagerValues.layout = [];
21733
21718
  };
21734
21719
  }, []);
21735
- const registerResizeHandle2 = useCallback((dragHandleId) => function(event) {
21736
- event.preventDefault();
21720
+ const registerResizeHandle2 = useCallback((dragHandleId) => {
21721
+ let isRTL = !1;
21737
21722
  const panelGroupElement = panelGroupElementRef.current;
21738
- if (!panelGroupElement)
21739
- return () => null;
21740
- const {
21741
- direction: direction2,
21742
- dragState: dragState2,
21743
- id: groupId2,
21744
- keyboardResizeBy: keyboardResizeBy2,
21745
- onLayout: onLayout2
21746
- } = committedValuesRef.current, {
21747
- layout: prevLayout,
21748
- panelDataArray
21749
- } = eagerValuesRef.current, {
21750
- initialLayout
21751
- } = dragState2 ?? {}, pivotIndices = determinePivotIndices(groupId2, dragHandleId, panelGroupElement);
21752
- let delta = calculateDeltaPercentage(event, dragHandleId, direction2, dragState2, keyboardResizeBy2, panelGroupElement);
21753
- const isHorizontal = direction2 === "horizontal";
21754
- document.dir === "rtl" && isHorizontal && (delta = -delta);
21755
- const panelConstraints = panelDataArray.map((panelData) => panelData.constraints), nextLayout = adjustLayoutByDelta({
21756
- delta,
21757
- initialLayout: initialLayout ?? prevLayout,
21758
- panelConstraints,
21759
- pivotIndices,
21760
- prevLayout,
21761
- trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
21762
- }), layoutChanged = !compareLayouts(prevLayout, nextLayout);
21763
- (isPointerEvent(event) || isMouseEvent(event)) && prevDeltaRef.current != delta && (prevDeltaRef.current = delta, !layoutChanged && delta !== 0 ? isHorizontal ? reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(dragHandleId, 0)), layoutChanged && (setLayout(nextLayout), eagerValuesRef.current.layout = nextLayout, onLayout2 && onLayout2(nextLayout), callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current));
21723
+ return panelGroupElement && window.getComputedStyle(panelGroupElement, null).getPropertyValue("direction") === "rtl" && (isRTL = !0), function(event) {
21724
+ event.preventDefault();
21725
+ const panelGroupElement2 = panelGroupElementRef.current;
21726
+ if (!panelGroupElement2)
21727
+ return () => null;
21728
+ const {
21729
+ direction: direction2,
21730
+ dragState: dragState2,
21731
+ id: groupId2,
21732
+ keyboardResizeBy: keyboardResizeBy2,
21733
+ onLayout: onLayout2
21734
+ } = committedValuesRef.current, {
21735
+ layout: prevLayout,
21736
+ panelDataArray
21737
+ } = eagerValuesRef.current, {
21738
+ initialLayout
21739
+ } = dragState2 ?? {}, pivotIndices = determinePivotIndices(groupId2, dragHandleId, panelGroupElement2);
21740
+ let delta = calculateDeltaPercentage(event, dragHandleId, direction2, dragState2, keyboardResizeBy2, panelGroupElement2);
21741
+ const isHorizontal = direction2 === "horizontal";
21742
+ isHorizontal && isRTL && (delta = -delta);
21743
+ const panelConstraints = panelDataArray.map((panelData) => panelData.constraints), nextLayout = adjustLayoutByDelta({
21744
+ delta,
21745
+ initialLayout: initialLayout ?? prevLayout,
21746
+ panelConstraints,
21747
+ pivotIndices,
21748
+ prevLayout,
21749
+ trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
21750
+ }), layoutChanged = !compareLayouts(prevLayout, nextLayout);
21751
+ (isPointerEvent(event) || isMouseEvent(event)) && prevDeltaRef.current != delta && (prevDeltaRef.current = delta, !layoutChanged && delta !== 0 ? isHorizontal ? reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(dragHandleId, 0)), layoutChanged && (setLayout(nextLayout), eagerValuesRef.current.layout = nextLayout, onLayout2 && onLayout2(nextLayout), callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current));
21752
+ };
21764
21753
  }, []), resizePanel2 = useCallback((panelData, unsafePanelSize) => {
21765
21754
  const {
21766
21755
  onLayout: onLayout2
@@ -3,16 +3,16 @@ import React__default, { useState, Fragment, createContext, useContext, useRef,
3
3
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default, { createPortal } from "react-dom";
6
- var __assign$1 = function() {
7
- return __assign$1 = Object.assign || function(t) {
6
+ var __assign = function() {
7
+ return __assign = Object.assign || function(t) {
8
8
  for (var s, i = 1, n = arguments.length; i < n; i++) {
9
9
  s = arguments[i];
10
10
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
11
11
  }
12
12
  return t;
13
- }, __assign$1.apply(this, arguments);
13
+ }, __assign.apply(this, arguments);
14
14
  };
15
- function __rest$1(s, e) {
15
+ function __rest(s, e) {
16
16
  var t = {};
17
17
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
18
18
  if (s != null && typeof Object.getOwnPropertySymbols == "function")
@@ -70,23 +70,6 @@ function useMergeRefs(refs, defaultValue) {
70
70
  currentValues.set(callbackRef, refs);
71
71
  }, [refs]), callbackRef;
72
72
  }
73
- var __assign = function() {
74
- return __assign = Object.assign || function(t) {
75
- for (var s, i = 1, n = arguments.length; i < n; i++) {
76
- s = arguments[i];
77
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
78
- }
79
- return t;
80
- }, __assign.apply(this, arguments);
81
- };
82
- function __rest(s, e) {
83
- var t = {};
84
- for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
85
- if (s != null && typeof Object.getOwnPropertySymbols == "function")
86
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
87
- e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
88
- return t;
89
- }
90
73
  function ItoI(a) {
91
74
  return a;
92
75
  }
@@ -169,12 +152,12 @@ var effectCar = createSidecarMedium(), nothing = function() {
169
152
  onScrollCapture: nothing,
170
153
  onWheelCapture: nothing,
171
154
  onTouchMoveCapture: nothing
172
- }), callbacks = _a[0], setCallbacks = _a[1], forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container2 = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest$1(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), SideCar2 = sideCar, containerRef = useMergeRefs([ref, parentRef]), containerProps = __assign$1(__assign$1({}, rest), callbacks);
155
+ }), callbacks = _a[0], setCallbacks = _a[1], forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container2 = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), SideCar2 = sideCar, containerRef = useMergeRefs([ref, parentRef]), containerProps = __assign(__assign({}, rest), callbacks);
173
156
  return React.createElement(
174
157
  React.Fragment,
175
158
  null,
176
159
  enabled && React.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
177
- forwardProps ? React.cloneElement(React.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef })) : React.createElement(Container2, __assign$1({}, containerProps, { className, ref: containerRef }), children)
160
+ forwardProps ? React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React.createElement(Container2, __assign({}, containerProps, { className, ref: containerRef }), children)
178
161
  );
179
162
  });
180
163
  RemoveScroll$1.defaultProps = {
@@ -487,7 +470,7 @@ function getOutermostShadowParent(node) {
487
470
  }
488
471
  const SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
489
472
  var ReactRemoveScroll = React.forwardRef(function(props, ref) {
490
- return React.createElement(RemoveScroll$1, __assign$1({}, props, { ref, sideCar: SideCar }));
473
+ return React.createElement(RemoveScroll$1, __assign({}, props, { ref, sideCar: SideCar }));
491
474
  });
492
475
  ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
493
476
  const RemoveScroll = ReactRemoveScroll;
@@ -1,4 +1,4 @@
1
1
  import "react/jsx-runtime";
2
- import "./chunks/main-CDPsQgdJ.js";
2
+ import "./chunks/main-DejpCNPJ.js";
3
3
  import "react";
4
4
  import "react-dom/client";
@@ -8483,7 +8483,7 @@ class MotionValue {
8483
8483
  * @internal
8484
8484
  */
8485
8485
  constructor(init2, options = {}) {
8486
- this.version = "11.11.9", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
8486
+ this.version = "11.11.10", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
8487
8487
  const currentTime = time$1.now();
8488
8488
  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);
8489
8489
  }, this.hasAnimated = !1, this.setCurrent(init2), this.owner = options.owner;
@@ -8691,8 +8691,6 @@ function isWillChangeMotionValue(value) {
8691
8691
  return !!(isMotionValue(value) && value.add);
8692
8692
  }
8693
8693
  function addValueToWillChange(visualElement, key) {
8694
- if (!visualElement.applyWillChange)
8695
- return;
8696
8694
  const willChange = visualElement.getValue("willChange");
8697
8695
  if (isWillChangeMotionValue(willChange))
8698
8696
  return willChange.add(key);
@@ -10866,7 +10864,7 @@ function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) {
10866
10864
  const { style: style2 } = props, newValues = {};
10867
10865
  for (const key in style2)
10868
10866
  (isMotionValue(style2[key]) || prevProps.style && isMotionValue(prevProps.style[key]) || isForcedMotionValue(key, props) || ((_a2 = visualElement?.getValue(key)) === null || _a2 === void 0 ? void 0 : _a2.liveStyle) !== void 0) && (newValues[key] = style2[key]);
10869
- return visualElement && style2 && typeof style2.willChange == "string" && (visualElement.applyWillChange = !1), newValues;
10867
+ return newValues;
10870
10868
  }
10871
10869
  function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
10872
10870
  const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
@@ -10881,36 +10879,19 @@ function useConstant(init2) {
10881
10879
  const ref = useRef(null);
10882
10880
  return ref.current === null && (ref.current = init2()), ref.current;
10883
10881
  }
10884
- function getWillChangeName(name) {
10885
- if (transformProps.has(name))
10886
- return "transform";
10887
- if (acceleratedValues.has(name))
10888
- return camelToDash(name);
10889
- }
10890
- function makeState({ applyWillChange = !1, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount }, props, context, presenceContext, isStatic) {
10882
+ function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2, createRenderState, onMount }, props, context, presenceContext) {
10891
10883
  const state = {
10892
- latestValues: makeLatestValues(props, context, presenceContext, isStatic ? !1 : applyWillChange, scrapeMotionValuesFromProps2),
10884
+ latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps2),
10893
10885
  renderState: createRenderState()
10894
10886
  };
10895
10887
  return onMount && (state.mount = (instance) => onMount(props, instance, state)), state;
10896
10888
  }
10897
10889
  const makeUseVisualState = (config) => (props, isStatic) => {
10898
- const context = useContext(MotionContext), presenceContext = useContext(PresenceContext), make = () => makeState(config, props, context, presenceContext, isStatic);
10890
+ const context = useContext(MotionContext), presenceContext = useContext(PresenceContext), make = () => makeState(config, props, context, presenceContext);
10899
10891
  return isStatic ? make() : useConstant(make);
10900
10892
  };
10901
- function forEachDefinition(props, definition, callback) {
10902
- const list2 = Array.isArray(definition) ? definition : [definition];
10903
- for (let i2 = 0; i2 < list2.length; i2++) {
10904
- const resolved = resolveVariantFromProps(props, list2[i2]);
10905
- if (resolved) {
10906
- const { transitionEnd, transition, ...target } = resolved;
10907
- callback(target, transitionEnd);
10908
- }
10909
- }
10910
- }
10911
- function makeLatestValues(props, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {
10912
- var _a2;
10913
- const values2 = {}, willChange = /* @__PURE__ */ new Set(), applyWillChange = shouldApplyWillChange && ((_a2 = props.style) === null || _a2 === void 0 ? void 0 : _a2.willChange) === void 0, motionValues = scrapeMotionValues(props, {});
10893
+ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
10894
+ const values2 = {}, motionValues = scrapeMotionValues(props, {});
10914
10895
  for (const key in motionValues)
10915
10896
  values2[key] = resolveMotionValue(motionValues[key]);
10916
10897
  let { initial, animate } = props;
@@ -10919,23 +10900,26 @@ function makeLatestValues(props, context, presenceContext, shouldApplyWillChange
10919
10900
  let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === !1 : !1;
10920
10901
  isInitialAnimationBlocked = isInitialAnimationBlocked || initial === !1;
10921
10902
  const variantToSet = isInitialAnimationBlocked ? animate : initial;
10922
- return variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet) && forEachDefinition(props, variantToSet, (target, transitionEnd) => {
10923
- for (const key in target) {
10924
- let valueTarget = target[key];
10925
- if (Array.isArray(valueTarget)) {
10926
- const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
10927
- valueTarget = valueTarget[index2];
10903
+ if (variantToSet && typeof variantToSet != "boolean" && !isAnimationControls(variantToSet)) {
10904
+ const list2 = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
10905
+ for (let i2 = 0; i2 < list2.length; i2++) {
10906
+ const resolved = resolveVariantFromProps(props, list2[i2]);
10907
+ if (resolved) {
10908
+ const { transitionEnd, transition, ...target } = resolved;
10909
+ for (const key in target) {
10910
+ let valueTarget = target[key];
10911
+ if (Array.isArray(valueTarget)) {
10912
+ const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
10913
+ valueTarget = valueTarget[index2];
10914
+ }
10915
+ valueTarget !== null && (values2[key] = valueTarget);
10916
+ }
10917
+ for (const key in transitionEnd)
10918
+ values2[key] = transitionEnd[key];
10928
10919
  }
10929
- valueTarget !== null && (values2[key] = valueTarget);
10930
- }
10931
- for (const key in transitionEnd)
10932
- values2[key] = transitionEnd[key];
10933
- }), applyWillChange && (animate && initial !== !1 && !isAnimationControls(animate) && forEachDefinition(props, animate, (target) => {
10934
- for (const name in target) {
10935
- const memberName = getWillChangeName(name);
10936
- memberName && willChange.add(memberName);
10937
10920
  }
10938
- }), willChange.size && (values2.willChange = Array.from(willChange).join(","))), values2;
10921
+ }
10922
+ return values2;
10939
10923
  }
10940
10924
  const createHtmlRenderState = () => ({
10941
10925
  style: {},
@@ -11055,7 +11039,6 @@ const isSVGTag = (tag) => typeof tag == "string" && tag.toLowerCase() === "svg",
11055
11039
  })
11056
11040
  }, htmlMotionConfig = {
11057
11041
  useVisualState: makeUseVisualState({
11058
- applyWillChange: !0,
11059
11042
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
11060
11043
  createRenderState: createHtmlRenderState
11061
11044
  })
@@ -11210,7 +11193,7 @@ class VisualElement {
11210
11193
  return {};
11211
11194
  }
11212
11195
  constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState }, options = {}) {
11213
- this.applyWillChange = !1, this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
11196
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
11214
11197
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
11215
11198
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
11216
11199
  const now2 = time$1.now();
@@ -11410,7 +11393,7 @@ function getComputedStyle$2(element) {
11410
11393
  }
11411
11394
  class HTMLVisualElement extends DOMVisualElement {
11412
11395
  constructor() {
11413
- super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = renderHTML;
11396
+ super(...arguments), this.type = "html", this.renderInstance = renderHTML;
11414
11397
  }
11415
11398
  readValueFromInstance(instance, key) {
11416
11399
  if (transformProps.has(key)) {
@@ -14651,16 +14634,16 @@ function useDiagramStoreApi() {
14651
14634
  throw new Error("useDiagramStoreApi could be used only inside DiagramContext");
14652
14635
  return store;
14653
14636
  }
14654
- var __assign$2 = function() {
14655
- return __assign$2 = Object.assign || function(t2) {
14637
+ var __assign$1 = function() {
14638
+ return __assign$1 = Object.assign || function(t2) {
14656
14639
  for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
14657
14640
  s2 = arguments[i2];
14658
14641
  for (var p2 in s2) Object.prototype.hasOwnProperty.call(s2, p2) && (t2[p2] = s2[p2]);
14659
14642
  }
14660
14643
  return t2;
14661
- }, __assign$2.apply(this, arguments);
14644
+ }, __assign$1.apply(this, arguments);
14662
14645
  };
14663
- function __rest$2(s2, e2) {
14646
+ function __rest$1(s2, e2) {
14664
14647
  var t2 = {};
14665
14648
  for (var p2 in s2) Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0 && (t2[p2] = s2[p2]);
14666
14649
  if (s2 != null && typeof Object.getOwnPropertySymbols == "function")
@@ -14718,23 +14701,6 @@ function useMergeRefs(refs, defaultValue) {
14718
14701
  currentValues.set(callbackRef, refs);
14719
14702
  }, [refs]), callbackRef;
14720
14703
  }
14721
- var __assign$1 = function() {
14722
- return __assign$1 = Object.assign || function(t2) {
14723
- for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
14724
- s2 = arguments[i2];
14725
- for (var p2 in s2) Object.prototype.hasOwnProperty.call(s2, p2) && (t2[p2] = s2[p2]);
14726
- }
14727
- return t2;
14728
- }, __assign$1.apply(this, arguments);
14729
- };
14730
- function __rest$1(s2, e2) {
14731
- var t2 = {};
14732
- for (var p2 in s2) Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0 && (t2[p2] = s2[p2]);
14733
- if (s2 != null && typeof Object.getOwnPropertySymbols == "function")
14734
- for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++)
14735
- e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2]) && (t2[p2[i2]] = s2[p2[i2]]);
14736
- return t2;
14737
- }
14738
14704
  function ItoI(a2) {
14739
14705
  return a2;
14740
14706
  }
@@ -14817,12 +14783,12 @@ var effectCar = createSidecarMedium(), nothing = function() {
14817
14783
  onScrollCapture: nothing,
14818
14784
  onWheelCapture: nothing,
14819
14785
  onTouchMoveCapture: nothing
14820
- }), callbacks = _a2[0], setCallbacks = _a2[1], forwardProps = props.forwardProps, children2 = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b2 = props.as, Container = _b2 === void 0 ? "div" : _b2, gapMode = props.gapMode, rest = __rest$2(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), SideCar2 = sideCar, containerRef = useMergeRefs([ref, parentRef]), containerProps = __assign$2(__assign$2({}, rest), callbacks);
14786
+ }), callbacks = _a2[0], setCallbacks = _a2[1], forwardProps = props.forwardProps, children2 = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b2 = props.as, Container = _b2 === void 0 ? "div" : _b2, gapMode = props.gapMode, rest = __rest$1(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), SideCar2 = sideCar, containerRef = useMergeRefs([ref, parentRef]), containerProps = __assign$1(__assign$1({}, rest), callbacks);
14821
14787
  return React.createElement(
14822
14788
  React.Fragment,
14823
14789
  null,
14824
14790
  enabled && React.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
14825
- forwardProps ? React.cloneElement(React.Children.only(children2), __assign$2(__assign$2({}, containerProps), { ref: containerRef })) : React.createElement(Container, __assign$2({}, containerProps, { className, ref: containerRef }), children2)
14791
+ forwardProps ? React.cloneElement(React.Children.only(children2), __assign$1(__assign$1({}, containerProps), { ref: containerRef })) : React.createElement(Container, __assign$1({}, containerProps, { className, ref: containerRef }), children2)
14826
14792
  );
14827
14793
  });
14828
14794
  RemoveScroll$1.defaultProps = {
@@ -15135,7 +15101,7 @@ function getOutermostShadowParent(node2) {
15135
15101
  }
15136
15102
  const SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
15137
15103
  var ReactRemoveScroll = React.forwardRef(function(props, ref) {
15138
- return React.createElement(RemoveScroll$1, __assign$2({}, props, { ref, sideCar: SideCar }));
15104
+ return React.createElement(RemoveScroll$1, __assign$1({}, props, { ref, sideCar: SideCar }));
15139
15105
  });
15140
15106
  ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
15141
15107
  const RemoveScroll = ReactRemoveScroll;