@likec4/diagram 1.39.4 → 1.40.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/bundle/{chunk-CW_KClZe.js → chunk-CDr-4Ymp.js} +936 -903
- package/bundle/custom.js +61 -60
- package/bundle/index.js +2667 -539
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +7 -4
- package/dist/LikeC4Diagram.props.d.ts +6 -1
- package/dist/base/const.d.ts +9 -0
- package/dist/base/const.js +10 -1
- package/dist/base/index.d.ts +1 -0
- package/dist/base/primitives/edge/EdgeLabel.js +2 -1
- package/dist/base/primitives/edge/EdgeLabelContainer.js +10 -4
- package/dist/base/primitives/edge/EdgePath.js +17 -8
- package/dist/base/primitives/edge/edge.css.d.ts +0 -1
- package/dist/base/primitives/edge/edge.css.js +6 -14
- package/dist/base/primitives/element/ElementActionButtons.js +1 -3
- package/dist/base/primitives/element/ElementNodeContainer.d.ts +0 -6
- package/dist/base/primitives/element/ElementNodeContainer.js +3 -26
- package/dist/base/primitives/element/ElementTitle.js +2 -2
- package/dist/base/types.d.ts +3 -3
- package/dist/bundle/LikeC4View.js +4 -12
- package/dist/bundle/LikeC4View.props.d.ts +12 -3
- package/dist/bundle/custom.js +1 -1
- package/dist/custom/customNodes.d.ts +6 -0
- package/dist/custom/customNodes.js +2 -1
- package/dist/custom/index.js +1 -1
- package/dist/hooks/useDiagram.d.ts +5 -1
- package/dist/hooks/useDiagram.js +3 -0
- package/dist/hooks/useXYFlow.d.ts +4 -439
- package/dist/likec4diagram/DiagramUI.js +1 -1
- package/dist/likec4diagram/DiagramXYFlow.js +8 -4
- package/dist/likec4diagram/convert-to-xyflow.d.ts +14 -0
- package/dist/likec4diagram/convert-to-xyflow.js +29 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +3 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +0 -1
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +71 -0
- package/dist/likec4diagram/custom/index.js +7 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +4 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +157 -0
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +31 -27
- package/dist/likec4diagram/types.d.ts +41 -7
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -0
- package/dist/likec4diagram/{useViewToNodesEdges.js → xyflow-diagram/diagram-view.js} +4 -13
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +41 -0
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +17 -0
- package/dist/likec4diagram/xyflow-sequence/const.js +16 -0
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +46 -0
- package/dist/likec4diagram/xyflow-sequence/layouter.js +408 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +7 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +273 -0
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +14 -0
- package/dist/likec4diagram/xyflow-sequence/utils.js +92 -0
- package/dist/navigationpanel/NavigationPanelControls.js +2 -2
- package/dist/navigationpanel/controls/ViewDetailsCard.js +5 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +53 -44
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +10 -41
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +292 -0
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +119 -0
- package/dist/navigationpanel/walkthrough/index.d.ts +2 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -1
- package/dist/state/DiagramActorProvider.d.ts +3 -2
- package/dist/state/DiagramActorProvider.js +19 -11
- package/dist/state/assign.js +11 -4
- package/dist/state/diagram-machine.d.ts +224 -194
- package/dist/state/diagram-machine.js +170 -63
- package/dist/state/utils.d.ts +7 -1
- package/dist/state/utils.js +67 -7
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/package.json +8 -7
- package/panda.buildinfo.json +30 -9
- package/src/LikeC4Diagram.props.ts +14 -1
- package/src/LikeC4Diagram.tsx +7 -4
- package/src/base/const.ts +12 -0
- package/src/base/index.ts +2 -0
- package/src/base/primitives/edge/EdgeLabel.tsx +23 -19
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +12 -7
- package/src/base/primitives/edge/EdgePath.tsx +25 -14
- package/src/base/primitives/edge/edge.css.ts +5 -14
- package/src/base/primitives/element/ElementActionButtons.tsx +1 -3
- package/src/base/primitives/element/ElementNodeContainer.tsx +3 -30
- package/src/base/primitives/element/ElementTitle.tsx +2 -3
- package/src/base/types.ts +7 -5
- package/src/bundle/LikeC4View.props.ts +14 -3
- package/src/bundle/LikeC4View.tsx +4 -14
- package/src/bundle/ReactLikeC4.tsx +1 -2
- package/src/custom/customNodes.ts +7 -0
- package/src/hooks/useDiagram.ts +10 -0
- package/src/likec4diagram/DiagramUI.tsx +1 -1
- package/src/likec4diagram/DiagramXYFlow.tsx +10 -5
- package/src/likec4diagram/convert-to-xyflow.ts +45 -0
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +0 -1
- package/src/likec4diagram/custom/edges/SequenceStepEdge.tsx +65 -0
- package/src/likec4diagram/custom/index.ts +7 -1
- package/src/likec4diagram/custom/nodes/ElementActions.tsx +4 -2
- package/src/likec4diagram/custom/nodes/SequenceActorNode.tsx +175 -0
- package/src/likec4diagram/custom/nodes/index.ts +1 -0
- package/src/likec4diagram/custom/nodes/nodes.tsx +1 -1
- package/src/likec4diagram/relationship-popover/RelationshipPopover.tsx +36 -30
- package/src/likec4diagram/types.ts +96 -13
- package/src/likec4diagram/{useViewToNodesEdges.ts → xyflow-diagram/diagram-view.ts} +7 -28
- package/src/likec4diagram/xyflow-sequence/_types.ts +45 -0
- package/src/likec4diagram/xyflow-sequence/const.ts +37 -0
- package/src/likec4diagram/xyflow-sequence/layouter.ts +567 -0
- package/src/likec4diagram/xyflow-sequence/sequence-view.ts +337 -0
- package/src/likec4diagram/xyflow-sequence/utils.ts +112 -0
- package/src/navigationpanel/NavigationPanelControls.tsx +2 -2
- package/src/navigationpanel/controls/ViewDetailsCard.tsx +5 -2
- package/src/navigationpanel/dropdown/ProjectsMenu.tsx +5 -1
- package/src/navigationpanel/walkthrough/ActiveWalkthroughControls.tsx +5 -40
- package/src/navigationpanel/walkthrough/DynamicViewControls.tsx +125 -0
- package/src/navigationpanel/walkthrough/index.tsx +2 -1
- package/src/overlays/relationship-details/RelationshipDetails.tsx +5 -2
- package/src/state/DiagramActorProvider.tsx +21 -10
- package/src/state/assign.ts +18 -5
- package/src/state/diagram-machine.ts +207 -75
- package/src/state/utils.ts +81 -7
- package/dist/likec4diagram/useViewToNodesEdges.d.ts +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useState, Fragment, createContext, useContext, useRef, useEffect, useMemo, useCallback, useLayoutEffect, useId as useId$2, forwardRef, cloneElement, Children, createElement, useInsertionEffect as useInsertionEffect$1, memo as memo$1, createRef } from "react";
|
|
3
3
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
4
|
+
import { BBox, ensureSizes } from "@likec4/core/types";
|
|
5
|
+
import { invariant, nonNullable } from "@likec4/core/utils";
|
|
4
6
|
import * as ReactDOM from "react-dom";
|
|
5
7
|
import ReactDOM__default, { createPortal } from "react-dom";
|
|
6
8
|
import { isTagColorSpecified, nonexhaustive, invariant as invariant$1, defaultTheme, ElementShapes } from "@likec4/core";
|
|
7
|
-
import { DefaultShapeSize, DefaultTextSize, DefaultPaddingSize } from "@likec4/core/types";
|
|
8
|
-
import { invariant } from "@likec4/core/utils";
|
|
9
9
|
function isObject$1(value) {
|
|
10
10
|
return typeof value == "object" && value != null && !Array.isArray(value);
|
|
11
11
|
}
|
|
@@ -203,7 +203,7 @@ function sortConditions(paths) {
|
|
|
203
203
|
return aa && !bb ? 1 : !aa && bb ? -1 : 0;
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle", classNameByProp = /* @__PURE__ */ new Map(), shorthands = /* @__PURE__ */ new Map();
|
|
206
|
+
const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle", classNameByProp = /* @__PURE__ */ new Map(), shorthands = /* @__PURE__ */ new Map();
|
|
207
207
|
utilities.split(",").forEach((utility) => {
|
|
208
208
|
const [prop, meta] = utility.split(":"), [className, ...shorthandList] = meta.split("/");
|
|
209
209
|
classNameByProp.set(prop, className), shorthandList.length && shorthandList.forEach((shorthand) => {
|
|
@@ -15827,37 +15827,6 @@ const useCustomCompareMemo = (factory2, deps, comparator) => {
|
|
|
15827
15827
|
function useDeepCompareMemo(factory2, deps) {
|
|
15828
15828
|
return useCustomCompareMemo(factory2, deps, isEqual);
|
|
15829
15829
|
}
|
|
15830
|
-
const HandlerNames = [
|
|
15831
|
-
"onBurgerMenuClick",
|
|
15832
|
-
"onNavigateTo",
|
|
15833
|
-
"onOpenSource",
|
|
15834
|
-
"onCanvasClick",
|
|
15835
|
-
"onCanvasContextMenu",
|
|
15836
|
-
"onEdgeClick",
|
|
15837
|
-
"onEdgeContextMenu",
|
|
15838
|
-
"onNodeClick",
|
|
15839
|
-
"onNodeContextMenu",
|
|
15840
|
-
"onChange",
|
|
15841
|
-
"onCanvasDblClick"
|
|
15842
|
-
], DiagramEventHandlersReactContext = createContext({
|
|
15843
|
-
...t$1(HandlerNames, (name) => [name, null]),
|
|
15844
|
-
handlersRef: {
|
|
15845
|
-
current: {}
|
|
15846
|
-
}
|
|
15847
|
-
});
|
|
15848
|
-
function DiagramEventHandlers({
|
|
15849
|
-
handlers,
|
|
15850
|
-
children: children2
|
|
15851
|
-
}) {
|
|
15852
|
-
const handlersRef = useSyncedRef(handlers), deps = HandlerNames.map((name) => e$2(handlers[name])), value = useMemo(() => ({
|
|
15853
|
-
...t$1(HandlerNames, (name) => handlersRef.current[name] ? [name, (...args) => handlersRef.current[name]?.(...args)] : [name, null]),
|
|
15854
|
-
handlersRef
|
|
15855
|
-
}), [handlersRef, ...deps]);
|
|
15856
|
-
return /* @__PURE__ */ jsx(DiagramEventHandlersReactContext.Provider, { value, children: children2 });
|
|
15857
|
-
}
|
|
15858
|
-
function useDiagramEventHandlers() {
|
|
15859
|
-
return useContext(DiagramEventHandlersReactContext);
|
|
15860
|
-
}
|
|
15861
15830
|
var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
15862
15831
|
function combineComparators(comparatorA, comparatorB) {
|
|
15863
15832
|
return function(a, b, state) {
|
|
@@ -16120,515 +16089,133 @@ function createCustomEqual(options) {
|
|
|
16120
16089
|
var _a = options.circular, circular = _a === void 0 ? !1 : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? !1 : _b, config = createEqualityComparatorConfig(options), comparator = createEqualityComparator(config), equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
|
|
16121
16090
|
return createIsEqual({ circular, comparator, createState, equals, strict });
|
|
16122
16091
|
}
|
|
16123
|
-
const
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
"Notations",
|
|
16134
|
-
"DynamicViewWalkthrough",
|
|
16135
|
-
"EdgeEditing",
|
|
16136
|
-
"ViewTitle",
|
|
16137
|
-
"FitView",
|
|
16138
|
-
/**
|
|
16139
|
-
* Running in VSCode
|
|
16140
|
-
*/
|
|
16141
|
-
"Vscode",
|
|
16142
|
-
"ElementTags"
|
|
16143
|
-
], AllDisabled = t$1(
|
|
16144
|
-
FeatureNames,
|
|
16145
|
-
(name) => [`enable${name}`, !1]
|
|
16146
|
-
), DiagramFeaturesContext = createContext(AllDisabled), validate = (features) => {
|
|
16147
|
-
let {
|
|
16148
|
-
enableReadOnly,
|
|
16149
|
-
enableEdgeEditing,
|
|
16150
|
-
...rest
|
|
16151
|
-
} = features;
|
|
16152
|
-
return enableReadOnly && (enableEdgeEditing = !1), {
|
|
16153
|
-
enableReadOnly,
|
|
16154
|
-
enableEdgeEditing,
|
|
16155
|
-
...rest
|
|
16156
|
-
};
|
|
16092
|
+
const noop = () => {
|
|
16093
|
+
}, depsShallowEqual = (d1, d2) => {
|
|
16094
|
+
if (d1 === d2)
|
|
16095
|
+
return !0;
|
|
16096
|
+
if (d1.length !== d2.length)
|
|
16097
|
+
return !1;
|
|
16098
|
+
for (const [i2, element] of d1.entries())
|
|
16099
|
+
if (element !== d2[i2] && !shallowEqual(element, d2[i2]))
|
|
16100
|
+
return !1;
|
|
16101
|
+
return !0;
|
|
16157
16102
|
};
|
|
16158
|
-
function
|
|
16159
|
-
|
|
16160
|
-
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
|
|
16166
|
-
setScope((current) => {
|
|
16167
|
-
const next = validate({
|
|
16168
|
-
...outerScope,
|
|
16169
|
-
...features,
|
|
16170
|
-
...overrides
|
|
16171
|
-
});
|
|
16172
|
-
return shallowEqual(current, next) ? current : next;
|
|
16173
|
-
});
|
|
16174
|
-
},
|
|
16175
|
-
[outerScope, features, overrides]
|
|
16176
|
-
), /* @__PURE__ */ jsx(DiagramFeaturesContext.Provider, { value: scope, children: children2 });
|
|
16103
|
+
function useUpdateEffect(callback, deps, equalityFn, effectHook) {
|
|
16104
|
+
const isFirstMount = useFirstMountState();
|
|
16105
|
+
useCustomCompareEffect(
|
|
16106
|
+
isFirstMount ? noop : callback,
|
|
16107
|
+
deps,
|
|
16108
|
+
equalityFn ?? depsShallowEqual,
|
|
16109
|
+
effectHook
|
|
16110
|
+
);
|
|
16177
16111
|
}
|
|
16178
|
-
|
|
16179
|
-
|
|
16180
|
-
|
|
16181
|
-
|
|
16182
|
-
|
|
16183
|
-
|
|
16184
|
-
enableEdgeEditing: !1
|
|
16185
|
-
},
|
|
16186
|
-
children: children2
|
|
16187
|
-
}
|
|
16188
|
-
);
|
|
16189
|
-
function useEnabledFeatures() {
|
|
16190
|
-
return useContext(DiagramFeaturesContext);
|
|
16112
|
+
const useXYFlow = useReactFlow;
|
|
16113
|
+
function useXYStore(selector2, equalityFn) {
|
|
16114
|
+
return useStore(
|
|
16115
|
+
useCallbackRef(selector2),
|
|
16116
|
+
equalityFn ?? shallowEqual
|
|
16117
|
+
);
|
|
16191
16118
|
}
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
and: and2 = !0
|
|
16196
|
-
}) {
|
|
16197
|
-
return useEnabledFeatures()[`enable${feature}`] === !0 && and2 ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
16119
|
+
const useXYStoreApi = useStoreApi, useXYInternalNode = useInternalNode, selectCurrentZoom = (state) => Math.round(state.transform[2] * 100) / 100;
|
|
16120
|
+
function useCurrentZoom() {
|
|
16121
|
+
return useStore(selectCurrentZoom);
|
|
16198
16122
|
}
|
|
16199
|
-
|
|
16200
|
-
|
|
16123
|
+
const selectZoom = (state) => state.transform[2] < 0.2;
|
|
16124
|
+
function useIsZoomTooSmall() {
|
|
16125
|
+
return useStore(selectZoom);
|
|
16201
16126
|
}
|
|
16202
|
-
function
|
|
16203
|
-
|
|
16127
|
+
function getDevicePixelRatio() {
|
|
16128
|
+
const dpr = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
|
|
16129
|
+
return t$9(Math.floor(dpr), {
|
|
16130
|
+
min: 1,
|
|
16131
|
+
max: 4
|
|
16132
|
+
});
|
|
16204
16133
|
}
|
|
16205
|
-
|
|
16206
|
-
|
|
16134
|
+
let knownDpr;
|
|
16135
|
+
function roundDpr(v) {
|
|
16136
|
+
return knownDpr ??= getDevicePixelRatio(), knownDpr < 2 ? Math.round(v) : Math.round(v * knownDpr) / knownDpr;
|
|
16207
16137
|
}
|
|
16208
|
-
const
|
|
16209
|
-
function
|
|
16210
|
-
|
|
16211
|
-
children: children2
|
|
16212
|
-
}) {
|
|
16213
|
-
return useContext(IconRendererContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : /* @__PURE__ */ jsx(IconRendererContext.Provider, { value, children: children2 });
|
|
16138
|
+
const { abs: abs$1, cos: cos$1, sin: sin$1, acos: acos$1, atan2, sqrt: sqrt$1, pow } = Math;
|
|
16139
|
+
function crt(v) {
|
|
16140
|
+
return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);
|
|
16214
16141
|
}
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16255
|
-
|
|
16256
|
-
|
|
16257
|
-
|
|
16258
|
-
|
|
16259
|
-
|
|
16260
|
-
|
|
16261
|
-
|
|
16262
|
-
|
|
16263
|
-
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
|
|
16290
|
-
|
|
16291
|
-
|
|
16292
|
-
}, combinedProps.children ?? children2);
|
|
16293
|
-
}), name = getDisplayName(__base__);
|
|
16294
|
-
return StyledComponent.displayName = `styled.${name}`, StyledComponent.__cva__ = __cvaFn__, StyledComponent.__base__ = __base__, StyledComponent.__shouldForwardProps__ = shouldForwardProp, StyledComponent;
|
|
16295
|
-
}
|
|
16296
|
-
function createJsxFactory() {
|
|
16297
|
-
const cache = /* @__PURE__ */ new Map();
|
|
16298
|
-
return new Proxy(styledFn, {
|
|
16299
|
-
apply(_, __, args) {
|
|
16300
|
-
return styledFn(...args);
|
|
16301
|
-
},
|
|
16302
|
-
get(_, el) {
|
|
16303
|
-
return cache.has(el) || cache.set(el, styledFn(el)), cache.get(el);
|
|
16304
|
-
}
|
|
16305
|
-
});
|
|
16306
|
-
}
|
|
16307
|
-
const styled = /* @__PURE__ */ createJsxFactory(), boxConfig = {
|
|
16308
|
-
transform(props) {
|
|
16309
|
-
return props;
|
|
16310
|
-
}
|
|
16311
|
-
}, getBoxStyle = (styles = {}) => {
|
|
16312
|
-
const _styles = getPatternStyles(boxConfig, styles);
|
|
16313
|
-
return boxConfig.transform(_styles, patternFns);
|
|
16314
|
-
}, Box = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
16315
|
-
const [patternProps, restProps] = splitProps(props, []), styleProps = getBoxStyle(patternProps), mergedProps = { ref, ...styleProps, ...restProps };
|
|
16316
|
-
return createElement(styled.div, mergedProps);
|
|
16317
|
-
}), hstackConfig = {
|
|
16318
|
-
transform(props) {
|
|
16319
|
-
const { justify, gap, ...rest } = props;
|
|
16320
|
-
return {
|
|
16321
|
-
display: "flex",
|
|
16322
|
-
alignItems: "center",
|
|
16323
|
-
justifyContent: justify,
|
|
16324
|
-
gap,
|
|
16325
|
-
flexDirection: "row",
|
|
16326
|
-
...rest
|
|
16327
|
-
};
|
|
16328
|
-
},
|
|
16329
|
-
defaultValues: { gap: "sm" }
|
|
16330
|
-
}, getHstackStyle = (styles = {}) => {
|
|
16331
|
-
const _styles = getPatternStyles(hstackConfig, styles);
|
|
16332
|
-
return hstackConfig.transform(_styles, patternFns);
|
|
16333
|
-
}, hstack = (styles) => css(getHstackStyle(styles));
|
|
16334
|
-
hstack.raw = getHstackStyle;
|
|
16335
|
-
const HStack = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
16336
|
-
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]), styleProps = getHstackStyle(patternProps), mergedProps = { ref, ...styleProps, ...restProps };
|
|
16337
|
-
return createElement(styled.div, mergedProps);
|
|
16338
|
-
});
|
|
16339
|
-
let listenerQueue = [], lqIndex = 0;
|
|
16340
|
-
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
16341
|
-
let atom = (initialValue) => {
|
|
16342
|
-
let listeners = [], $atom = {
|
|
16343
|
-
get() {
|
|
16344
|
-
return $atom.lc || $atom.listen(() => {
|
|
16345
|
-
})(), $atom.value;
|
|
16346
|
-
},
|
|
16347
|
-
lc: 0,
|
|
16348
|
-
listen(listener) {
|
|
16349
|
-
return $atom.lc = listeners.push(listener), () => {
|
|
16350
|
-
for (let i2 = lqIndex + QUEUE_ITEMS_PER_LISTENER; i2 < listenerQueue.length; )
|
|
16351
|
-
listenerQueue[i2] === listener ? listenerQueue.splice(i2, QUEUE_ITEMS_PER_LISTENER) : i2 += QUEUE_ITEMS_PER_LISTENER;
|
|
16352
|
-
let index2 = listeners.indexOf(listener);
|
|
16353
|
-
~index2 && (listeners.splice(index2, 1), --$atom.lc || $atom.off());
|
|
16354
|
-
};
|
|
16355
|
-
},
|
|
16356
|
-
notify(oldValue, changedKey) {
|
|
16357
|
-
let runListenerQueue = !listenerQueue.length;
|
|
16358
|
-
for (let listener of listeners)
|
|
16359
|
-
listenerQueue.push(listener, $atom.value, oldValue, changedKey);
|
|
16360
|
-
if (runListenerQueue) {
|
|
16361
|
-
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER)
|
|
16362
|
-
listenerQueue[lqIndex](
|
|
16363
|
-
listenerQueue[lqIndex + 1],
|
|
16364
|
-
listenerQueue[lqIndex + 2],
|
|
16365
|
-
listenerQueue[lqIndex + 3]
|
|
16366
|
-
);
|
|
16367
|
-
listenerQueue.length = 0;
|
|
16368
|
-
}
|
|
16369
|
-
},
|
|
16370
|
-
/* It will be called on last listener unsubscribing.
|
|
16371
|
-
We will redefine it in onMount and onStop. */
|
|
16372
|
-
off() {
|
|
16373
|
-
},
|
|
16374
|
-
set(newValue) {
|
|
16375
|
-
let oldValue = $atom.value;
|
|
16376
|
-
oldValue !== newValue && ($atom.value = newValue, $atom.notify(oldValue));
|
|
16377
|
-
},
|
|
16378
|
-
subscribe(listener) {
|
|
16379
|
-
let unbind = $atom.listen(listener);
|
|
16380
|
-
return listener($atom.value), unbind;
|
|
16381
|
-
},
|
|
16382
|
-
value: initialValue
|
|
16383
|
-
};
|
|
16384
|
-
return $atom;
|
|
16385
|
-
};
|
|
16386
|
-
const ReduceGraphicsModeCtx = createContext(null);
|
|
16387
|
-
function useIsReducedGraphics() {
|
|
16388
|
-
const isReduced = useContext(ReduceGraphicsModeCtx);
|
|
16389
|
-
return isReduced === null && console.warn("ReduceGraphicsMode is not provided"), isReduced ?? !1;
|
|
16390
|
-
}
|
|
16391
|
-
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
16392
|
-
"PanningAtomSafeCtx is not provided"
|
|
16393
|
-
);
|
|
16394
|
-
function ReduceGraphicsContext({ reduceGraphics, children: children2 }) {
|
|
16395
|
-
const $isPanningRef = useRef(null);
|
|
16396
|
-
return $isPanningRef.current || ($isPanningRef.current = atom(reduceGraphics)), /* @__PURE__ */ jsx(PanningAtomSafeCtx, { value: $isPanningRef.current, children: /* @__PURE__ */ jsx(ReduceGraphicsModeCtx.Provider, { value: reduceGraphics, children: children2 }) });
|
|
16397
|
-
}
|
|
16398
|
-
const LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
|
|
16399
|
-
function EnsureCurrentViewModel({ children: children2 }) {
|
|
16400
|
-
return useContext(CurrentViewModelContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
16401
|
-
}
|
|
16402
|
-
function useLikeC4Model() {
|
|
16403
|
-
const model = useContext(LikeC4ModelContext);
|
|
16404
|
-
if (!model)
|
|
16405
|
-
throw new Error("LikeC4Model not found. Make sure you have LikeC4ModelProvider.");
|
|
16406
|
-
return model;
|
|
16407
|
-
}
|
|
16408
|
-
function useLikeC4ViewModel(viewId) {
|
|
16409
|
-
return useLikeC4Model().view(viewId);
|
|
16410
|
-
}
|
|
16411
|
-
function useLikeC4Specification() {
|
|
16412
|
-
const model = useLikeC4Model(), [specification, setSpecification] = useState(model.$data.specification);
|
|
16413
|
-
return useEffect(() => {
|
|
16414
|
-
setSpecification((current) => deepEqual(current, model.$data.specification) ? current : model.$data.specification);
|
|
16415
|
-
}, [model]), specification;
|
|
16416
|
-
}
|
|
16417
|
-
const TagStylesContext = createContext({}), radixColors = [
|
|
16418
|
-
"yellow",
|
|
16419
|
-
"orange",
|
|
16420
|
-
"amber",
|
|
16421
|
-
"tomato",
|
|
16422
|
-
"red",
|
|
16423
|
-
"ruby",
|
|
16424
|
-
"crimson",
|
|
16425
|
-
"pink",
|
|
16426
|
-
"pink",
|
|
16427
|
-
"purple",
|
|
16428
|
-
"violet",
|
|
16429
|
-
"indigo",
|
|
16430
|
-
"blue",
|
|
16431
|
-
"teal",
|
|
16432
|
-
"grass",
|
|
16433
|
-
"lime"
|
|
16434
|
-
], generateColorVars = (spec) => {
|
|
16435
|
-
const color2 = spec.color;
|
|
16436
|
-
if (isTagColorSpecified(spec))
|
|
16437
|
-
return `
|
|
16438
|
-
--colors-likec4-tag-bg: ${color2};
|
|
16439
|
-
--colors-likec4-tag-bg-hover: color-mix(in srgb, ${color2}, var(--colors-likec4-mix-color) 20%);
|
|
16440
|
-
`;
|
|
16441
|
-
if (!radixColors.includes(color2))
|
|
16442
|
-
return "";
|
|
16443
|
-
let textcolor = "12";
|
|
16444
|
-
return ["mint", "grass", "lime", "yellow", "amber"].includes(color2) && (textcolor = "dark-2"), `
|
|
16445
|
-
--colors-likec4-tag-border: var(--colors-${color2}-8);
|
|
16446
|
-
--colors-likec4-tag-bg: var(--colors-${color2}-9);
|
|
16447
|
-
--colors-likec4-tag-bg-hover: var(--colors-${color2}-10);
|
|
16448
|
-
--colors-likec4-tag-text: var(--colors-${color2}-${textcolor});
|
|
16449
|
-
`;
|
|
16450
|
-
};
|
|
16451
|
-
function TagStylesProvider({ children: children2, rootSelector }) {
|
|
16452
|
-
const tags = useLikeC4Specification().tags, { specs, stylesheet } = useDeepCompareMemo(() => tags ? {
|
|
16453
|
-
specs: tags,
|
|
16454
|
-
stylesheet: t$7(
|
|
16455
|
-
t$5(tags),
|
|
16456
|
-
t$4(([tag, spec]) => [
|
|
16457
|
-
`:is(${rootSelector} [data-likec4-tag="${tag}"]) {`,
|
|
16458
|
-
generateColorVars(spec),
|
|
16459
|
-
"}"
|
|
16460
|
-
]),
|
|
16461
|
-
t$3(`
|
|
16462
|
-
`)
|
|
16463
|
-
)
|
|
16464
|
-
} : { specs: {}, stylesheet: "" }, [tags, rootSelector]);
|
|
16465
|
-
return /* @__PURE__ */ jsxs(TagStylesContext.Provider, { value: specs, children: [
|
|
16466
|
-
stylesheet !== "" && /* @__PURE__ */ jsx(TagStylesheet, { stylesheet }),
|
|
16467
|
-
children2
|
|
16468
|
-
] });
|
|
16469
|
-
}
|
|
16470
|
-
function TagStylesheet({ stylesheet }) {
|
|
16471
|
-
const nonce = useMantineStyleNonce()?.();
|
|
16472
|
-
return /* @__PURE__ */ jsx("style", { "data-likec4-tag-stylesheet": !0, type: "text/css", dangerouslySetInnerHTML: { __html: stylesheet }, nonce });
|
|
16473
|
-
}
|
|
16474
|
-
function useTagSpecification(tag) {
|
|
16475
|
-
return useContext(TagStylesContext)[tag] ?? {
|
|
16476
|
-
color: "tomato"
|
|
16477
|
-
};
|
|
16478
|
-
}
|
|
16479
|
-
const RootContainerContext = createContext(createRef());
|
|
16480
|
-
function RootContainer({
|
|
16481
|
-
id: id2,
|
|
16482
|
-
className,
|
|
16483
|
-
reduceGraphics = !1,
|
|
16484
|
-
children: children2
|
|
16485
|
-
}) {
|
|
16486
|
-
const ref = useRef(null), $isPanning = usePanningAtom();
|
|
16487
|
-
return useEffect(() => $isPanning.listen((isPanning) => {
|
|
16488
|
-
ref.current?.setAttribute("data-likec4-diagram-panning", isPanning ? "true" : "false");
|
|
16489
|
-
}), [$isPanning]), /* @__PURE__ */ jsx(
|
|
16490
|
-
Box,
|
|
16491
|
-
{
|
|
16492
|
-
id: id2,
|
|
16493
|
-
className: cx("likec4-root", className),
|
|
16494
|
-
ref,
|
|
16495
|
-
...reduceGraphics && {
|
|
16496
|
-
"data-likec4-reduced-graphics": !0
|
|
16497
|
-
},
|
|
16498
|
-
children: /* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id2}`, children: /* @__PURE__ */ jsx(RootContainerContext.Provider, { value: ref, children: children2 }) })
|
|
16499
|
-
}
|
|
16500
|
-
);
|
|
16501
|
-
}
|
|
16502
|
-
function useRootContainer() {
|
|
16503
|
-
return useContext(RootContainerContext).current;
|
|
16504
|
-
}
|
|
16505
|
-
const noop = () => {
|
|
16506
|
-
}, depsShallowEqual = (d1, d2) => {
|
|
16507
|
-
if (d1 === d2)
|
|
16508
|
-
return !0;
|
|
16509
|
-
if (d1.length !== d2.length)
|
|
16510
|
-
return !1;
|
|
16511
|
-
for (const [i2, element] of d1.entries())
|
|
16512
|
-
if (element !== d2[i2] && !shallowEqual(element, d2[i2]))
|
|
16513
|
-
return !1;
|
|
16514
|
-
return !0;
|
|
16515
|
-
};
|
|
16516
|
-
function useUpdateEffect(callback, deps, equalityFn, effectHook) {
|
|
16517
|
-
const isFirstMount = useFirstMountState();
|
|
16518
|
-
useCustomCompareEffect(
|
|
16519
|
-
isFirstMount ? noop : callback,
|
|
16520
|
-
deps,
|
|
16521
|
-
equalityFn ?? depsShallowEqual,
|
|
16522
|
-
effectHook
|
|
16523
|
-
);
|
|
16524
|
-
}
|
|
16525
|
-
const useXYFlow = useReactFlow;
|
|
16526
|
-
function useXYStore(selector2, equalityFn) {
|
|
16527
|
-
return useStore(
|
|
16528
|
-
useCallbackRef(selector2),
|
|
16529
|
-
equalityFn ?? shallowEqual
|
|
16530
|
-
);
|
|
16531
|
-
}
|
|
16532
|
-
const useXYStoreApi = useStoreApi, useXYInternalNode = useInternalNode, selectCurrentZoom = (state) => Math.round(state.transform[2] * 100) / 100;
|
|
16533
|
-
function useCurrentZoom() {
|
|
16534
|
-
return useStore(selectCurrentZoom);
|
|
16535
|
-
}
|
|
16536
|
-
const selectZoom = (state) => state.transform[2] < 0.2;
|
|
16537
|
-
function useIsZoomTooSmall() {
|
|
16538
|
-
return useStore(selectZoom);
|
|
16539
|
-
}
|
|
16540
|
-
function getDevicePixelRatio() {
|
|
16541
|
-
const dpr = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
|
|
16542
|
-
return t$9(Math.floor(dpr), {
|
|
16543
|
-
min: 1,
|
|
16544
|
-
max: 4
|
|
16545
|
-
});
|
|
16546
|
-
}
|
|
16547
|
-
let knownDpr;
|
|
16548
|
-
function roundDpr(v) {
|
|
16549
|
-
return knownDpr ??= getDevicePixelRatio(), knownDpr < 2 ? Math.round(v) : Math.round(v * knownDpr) / knownDpr;
|
|
16550
|
-
}
|
|
16551
|
-
const { abs: abs$1, cos: cos$1, sin: sin$1, acos: acos$1, atan2, sqrt: sqrt$1, pow } = Math;
|
|
16552
|
-
function crt(v) {
|
|
16553
|
-
return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);
|
|
16554
|
-
}
|
|
16555
|
-
const pi$1 = Math.PI, tau = 2 * pi$1, quart = pi$1 / 2, epsilon = 1e-6, nMax = Number.MAX_SAFE_INTEGER || 9007199254740991, nMin = Number.MIN_SAFE_INTEGER || -9007199254740991, ZERO = { x: 0, y: 0, z: 0 }, utils = {
|
|
16556
|
-
// Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))
|
|
16557
|
-
Tvalues: [
|
|
16558
|
-
-0.06405689286260563,
|
|
16559
|
-
0.06405689286260563,
|
|
16560
|
-
-0.1911188674736163,
|
|
16561
|
-
0.1911188674736163,
|
|
16562
|
-
-0.3150426796961634,
|
|
16563
|
-
0.3150426796961634,
|
|
16564
|
-
-0.4337935076260451,
|
|
16565
|
-
0.4337935076260451,
|
|
16566
|
-
-0.5454214713888396,
|
|
16567
|
-
0.5454214713888396,
|
|
16568
|
-
-0.6480936519369755,
|
|
16569
|
-
0.6480936519369755,
|
|
16570
|
-
-0.7401241915785544,
|
|
16571
|
-
0.7401241915785544,
|
|
16572
|
-
-0.820001985973903,
|
|
16573
|
-
0.820001985973903,
|
|
16574
|
-
-0.8864155270044011,
|
|
16575
|
-
0.8864155270044011,
|
|
16576
|
-
-0.9382745520027328,
|
|
16577
|
-
0.9382745520027328,
|
|
16578
|
-
-0.9747285559713095,
|
|
16579
|
-
0.9747285559713095,
|
|
16580
|
-
-0.9951872199970213,
|
|
16581
|
-
0.9951872199970213
|
|
16582
|
-
],
|
|
16583
|
-
// Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)
|
|
16584
|
-
Cvalues: [
|
|
16585
|
-
0.12793819534675216,
|
|
16586
|
-
0.12793819534675216,
|
|
16587
|
-
0.1258374563468283,
|
|
16588
|
-
0.1258374563468283,
|
|
16589
|
-
0.12167047292780339,
|
|
16590
|
-
0.12167047292780339,
|
|
16591
|
-
0.1155056680537256,
|
|
16592
|
-
0.1155056680537256,
|
|
16593
|
-
0.10744427011596563,
|
|
16594
|
-
0.10744427011596563,
|
|
16595
|
-
0.09761865210411388,
|
|
16596
|
-
0.09761865210411388,
|
|
16597
|
-
0.08619016153195327,
|
|
16598
|
-
0.08619016153195327,
|
|
16599
|
-
0.0733464814110803,
|
|
16600
|
-
0.0733464814110803,
|
|
16601
|
-
0.05929858491543678,
|
|
16602
|
-
0.05929858491543678,
|
|
16603
|
-
0.04427743881741981,
|
|
16604
|
-
0.04427743881741981,
|
|
16605
|
-
0.028531388628933663,
|
|
16606
|
-
0.028531388628933663,
|
|
16607
|
-
0.0123412297999872,
|
|
16608
|
-
0.0123412297999872
|
|
16609
|
-
],
|
|
16610
|
-
arcfn: function(t2, derivativeFn) {
|
|
16611
|
-
const d = derivativeFn(t2);
|
|
16612
|
-
let l = d.x * d.x + d.y * d.y;
|
|
16613
|
-
return typeof d.z < "u" && (l += d.z * d.z), sqrt$1(l);
|
|
16614
|
-
},
|
|
16615
|
-
compute: function(t2, points, _3d) {
|
|
16616
|
-
if (t2 === 0)
|
|
16617
|
-
return points[0].t = 0, points[0];
|
|
16618
|
-
const order = points.length - 1;
|
|
16619
|
-
if (t2 === 1)
|
|
16620
|
-
return points[order].t = 1, points[order];
|
|
16621
|
-
const mt = 1 - t2;
|
|
16622
|
-
let p = points;
|
|
16623
|
-
if (order === 0)
|
|
16624
|
-
return points[0].t = t2, points[0];
|
|
16625
|
-
if (order === 1) {
|
|
16626
|
-
const ret = {
|
|
16627
|
-
x: mt * p[0].x + t2 * p[1].x,
|
|
16628
|
-
y: mt * p[0].y + t2 * p[1].y,
|
|
16629
|
-
t: t2
|
|
16630
|
-
};
|
|
16631
|
-
return _3d && (ret.z = mt * p[0].z + t2 * p[1].z), ret;
|
|
16142
|
+
const pi$1 = Math.PI, tau = 2 * pi$1, quart = pi$1 / 2, epsilon = 1e-6, nMax = Number.MAX_SAFE_INTEGER || 9007199254740991, nMin = Number.MIN_SAFE_INTEGER || -9007199254740991, ZERO = { x: 0, y: 0, z: 0 }, utils = {
|
|
16143
|
+
// Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))
|
|
16144
|
+
Tvalues: [
|
|
16145
|
+
-0.06405689286260563,
|
|
16146
|
+
0.06405689286260563,
|
|
16147
|
+
-0.1911188674736163,
|
|
16148
|
+
0.1911188674736163,
|
|
16149
|
+
-0.3150426796961634,
|
|
16150
|
+
0.3150426796961634,
|
|
16151
|
+
-0.4337935076260451,
|
|
16152
|
+
0.4337935076260451,
|
|
16153
|
+
-0.5454214713888396,
|
|
16154
|
+
0.5454214713888396,
|
|
16155
|
+
-0.6480936519369755,
|
|
16156
|
+
0.6480936519369755,
|
|
16157
|
+
-0.7401241915785544,
|
|
16158
|
+
0.7401241915785544,
|
|
16159
|
+
-0.820001985973903,
|
|
16160
|
+
0.820001985973903,
|
|
16161
|
+
-0.8864155270044011,
|
|
16162
|
+
0.8864155270044011,
|
|
16163
|
+
-0.9382745520027328,
|
|
16164
|
+
0.9382745520027328,
|
|
16165
|
+
-0.9747285559713095,
|
|
16166
|
+
0.9747285559713095,
|
|
16167
|
+
-0.9951872199970213,
|
|
16168
|
+
0.9951872199970213
|
|
16169
|
+
],
|
|
16170
|
+
// Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)
|
|
16171
|
+
Cvalues: [
|
|
16172
|
+
0.12793819534675216,
|
|
16173
|
+
0.12793819534675216,
|
|
16174
|
+
0.1258374563468283,
|
|
16175
|
+
0.1258374563468283,
|
|
16176
|
+
0.12167047292780339,
|
|
16177
|
+
0.12167047292780339,
|
|
16178
|
+
0.1155056680537256,
|
|
16179
|
+
0.1155056680537256,
|
|
16180
|
+
0.10744427011596563,
|
|
16181
|
+
0.10744427011596563,
|
|
16182
|
+
0.09761865210411388,
|
|
16183
|
+
0.09761865210411388,
|
|
16184
|
+
0.08619016153195327,
|
|
16185
|
+
0.08619016153195327,
|
|
16186
|
+
0.0733464814110803,
|
|
16187
|
+
0.0733464814110803,
|
|
16188
|
+
0.05929858491543678,
|
|
16189
|
+
0.05929858491543678,
|
|
16190
|
+
0.04427743881741981,
|
|
16191
|
+
0.04427743881741981,
|
|
16192
|
+
0.028531388628933663,
|
|
16193
|
+
0.028531388628933663,
|
|
16194
|
+
0.0123412297999872,
|
|
16195
|
+
0.0123412297999872
|
|
16196
|
+
],
|
|
16197
|
+
arcfn: function(t2, derivativeFn) {
|
|
16198
|
+
const d = derivativeFn(t2);
|
|
16199
|
+
let l = d.x * d.x + d.y * d.y;
|
|
16200
|
+
return typeof d.z < "u" && (l += d.z * d.z), sqrt$1(l);
|
|
16201
|
+
},
|
|
16202
|
+
compute: function(t2, points, _3d) {
|
|
16203
|
+
if (t2 === 0)
|
|
16204
|
+
return points[0].t = 0, points[0];
|
|
16205
|
+
const order = points.length - 1;
|
|
16206
|
+
if (t2 === 1)
|
|
16207
|
+
return points[order].t = 1, points[order];
|
|
16208
|
+
const mt = 1 - t2;
|
|
16209
|
+
let p = points;
|
|
16210
|
+
if (order === 0)
|
|
16211
|
+
return points[0].t = t2, points[0];
|
|
16212
|
+
if (order === 1) {
|
|
16213
|
+
const ret = {
|
|
16214
|
+
x: mt * p[0].x + t2 * p[1].x,
|
|
16215
|
+
y: mt * p[0].y + t2 * p[1].y,
|
|
16216
|
+
t: t2
|
|
16217
|
+
};
|
|
16218
|
+
return _3d && (ret.z = mt * p[0].z + t2 * p[1].z), ret;
|
|
16632
16219
|
}
|
|
16633
16220
|
if (order < 4) {
|
|
16634
16221
|
let mt2 = mt * mt, t22 = t2 * t2, a, b, c, d = 0;
|
|
@@ -17361,168 +16948,587 @@ class Bezier {
|
|
|
17361
16948
|
np[t2 + 1] = utils.lli4(p, p2, o, points[t2 + 1]);
|
|
17362
16949
|
}), new Bezier(np));
|
|
17363
16950
|
}
|
|
17364
|
-
outline(d1, d2, d3, d4) {
|
|
17365
|
-
if (d2 = d2 === void 0 ? d1 : d2, this._linear) {
|
|
17366
|
-
const n2 = this.normal(0), start2 = this.points[0], end = this.points[this.points.length - 1];
|
|
17367
|
-
let s, mid, e2;
|
|
17368
|
-
d3 === void 0 && (d3 = d1, d4 = d2), s = { x: start2.x + n2.x * d1, y: start2.y + n2.y * d1 }, e2 = { x: end.x + n2.x * d3, y: end.y + n2.y * d3 }, mid = { x: (s.x + e2.x) / 2, y: (s.y + e2.y) / 2 };
|
|
17369
|
-
const fline = [s, mid, e2];
|
|
17370
|
-
s = { x: start2.x - n2.x * d2, y: start2.y - n2.y * d2 }, e2 = { x: end.x - n2.x * d4, y: end.y - n2.y * d4 }, mid = { x: (s.x + e2.x) / 2, y: (s.y + e2.y) / 2 };
|
|
17371
|
-
const bline = [e2, mid, s], ls2 = utils.makeline(bline[2], fline[0]), le2 = utils.makeline(fline[2], bline[0]), segments2 = [ls2, new Bezier(fline), le2, new Bezier(bline)];
|
|
17372
|
-
return new PolyBezier(segments2);
|
|
16951
|
+
outline(d1, d2, d3, d4) {
|
|
16952
|
+
if (d2 = d2 === void 0 ? d1 : d2, this._linear) {
|
|
16953
|
+
const n2 = this.normal(0), start2 = this.points[0], end = this.points[this.points.length - 1];
|
|
16954
|
+
let s, mid, e2;
|
|
16955
|
+
d3 === void 0 && (d3 = d1, d4 = d2), s = { x: start2.x + n2.x * d1, y: start2.y + n2.y * d1 }, e2 = { x: end.x + n2.x * d3, y: end.y + n2.y * d3 }, mid = { x: (s.x + e2.x) / 2, y: (s.y + e2.y) / 2 };
|
|
16956
|
+
const fline = [s, mid, e2];
|
|
16957
|
+
s = { x: start2.x - n2.x * d2, y: start2.y - n2.y * d2 }, e2 = { x: end.x - n2.x * d4, y: end.y - n2.y * d4 }, mid = { x: (s.x + e2.x) / 2, y: (s.y + e2.y) / 2 };
|
|
16958
|
+
const bline = [e2, mid, s], ls2 = utils.makeline(bline[2], fline[0]), le2 = utils.makeline(fline[2], bline[0]), segments2 = [ls2, new Bezier(fline), le2, new Bezier(bline)];
|
|
16959
|
+
return new PolyBezier(segments2);
|
|
16960
|
+
}
|
|
16961
|
+
const reduced = this.reduce(), len = reduced.length, fcurves = [];
|
|
16962
|
+
let bcurves = [], p, alen = 0, tlen = this.length();
|
|
16963
|
+
const graduated = typeof d3 < "u" && typeof d4 < "u";
|
|
16964
|
+
function linearDistanceFunction(s, e2, tlen2, alen2, slen) {
|
|
16965
|
+
return function(v) {
|
|
16966
|
+
const f1 = alen2 / tlen2, f2 = (alen2 + slen) / tlen2, d = e2 - s;
|
|
16967
|
+
return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);
|
|
16968
|
+
};
|
|
16969
|
+
}
|
|
16970
|
+
reduced.forEach(function(segment) {
|
|
16971
|
+
const slen = segment.length();
|
|
16972
|
+
graduated ? (fcurves.push(
|
|
16973
|
+
segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))
|
|
16974
|
+
), bcurves.push(
|
|
16975
|
+
segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))
|
|
16976
|
+
)) : (fcurves.push(segment.scale(d1)), bcurves.push(segment.scale(-d2))), alen += slen;
|
|
16977
|
+
}), bcurves = bcurves.map(function(s) {
|
|
16978
|
+
return p = s.points, p[3] ? s.points = [p[3], p[2], p[1], p[0]] : s.points = [p[2], p[1], p[0]], s;
|
|
16979
|
+
}).reverse();
|
|
16980
|
+
const fs = fcurves[0].points[0], fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1], bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1], be = bcurves[0].points[0], ls = utils.makeline(bs, fs), le = utils.makeline(fe, be), segments = [ls].concat(fcurves).concat([le]).concat(bcurves);
|
|
16981
|
+
return new PolyBezier(segments);
|
|
16982
|
+
}
|
|
16983
|
+
outlineshapes(d1, d2, curveIntersectionThreshold) {
|
|
16984
|
+
d2 = d2 || d1;
|
|
16985
|
+
const outline = this.outline(d1, d2).curves, shapes = [];
|
|
16986
|
+
for (let i2 = 1, len = outline.length; i2 < len / 2; i2++) {
|
|
16987
|
+
const shape = utils.makeshape(
|
|
16988
|
+
outline[i2],
|
|
16989
|
+
outline[len - i2],
|
|
16990
|
+
curveIntersectionThreshold
|
|
16991
|
+
);
|
|
16992
|
+
shape.startcap.virtual = i2 > 1, shape.endcap.virtual = i2 < len / 2 - 1, shapes.push(shape);
|
|
16993
|
+
}
|
|
16994
|
+
return shapes;
|
|
16995
|
+
}
|
|
16996
|
+
intersects(curve, curveIntersectionThreshold) {
|
|
16997
|
+
return curve ? curve.p1 && curve.p2 ? this.lineIntersects(curve) : (curve instanceof Bezier && (curve = curve.reduce()), this.curveintersects(
|
|
16998
|
+
this.reduce(),
|
|
16999
|
+
curve,
|
|
17000
|
+
curveIntersectionThreshold
|
|
17001
|
+
)) : this.selfintersects(curveIntersectionThreshold);
|
|
17002
|
+
}
|
|
17003
|
+
lineIntersects(line) {
|
|
17004
|
+
const mx = min(line.p1.x, line.p2.x), my = min(line.p1.y, line.p2.y), MX = max(line.p1.x, line.p2.x), MY = max(line.p1.y, line.p2.y);
|
|
17005
|
+
return utils.roots(this.points, line).filter((t2) => {
|
|
17006
|
+
var p = this.get(t2);
|
|
17007
|
+
return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);
|
|
17008
|
+
});
|
|
17009
|
+
}
|
|
17010
|
+
selfintersects(curveIntersectionThreshold) {
|
|
17011
|
+
const reduced = this.reduce(), len = reduced.length - 2, results = [];
|
|
17012
|
+
for (let i2 = 0, result, left, right; i2 < len; i2++)
|
|
17013
|
+
left = reduced.slice(i2, i2 + 1), right = reduced.slice(i2 + 2), result = this.curveintersects(left, right, curveIntersectionThreshold), results.push(...result);
|
|
17014
|
+
return results;
|
|
17015
|
+
}
|
|
17016
|
+
curveintersects(c1, c2, curveIntersectionThreshold) {
|
|
17017
|
+
const pairs = [];
|
|
17018
|
+
c1.forEach(function(l) {
|
|
17019
|
+
c2.forEach(function(r2) {
|
|
17020
|
+
l.overlaps(r2) && pairs.push({ left: l, right: r2 });
|
|
17021
|
+
});
|
|
17022
|
+
});
|
|
17023
|
+
let intersections = [];
|
|
17024
|
+
return pairs.forEach(function(pair) {
|
|
17025
|
+
const result = utils.pairiteration(
|
|
17026
|
+
pair.left,
|
|
17027
|
+
pair.right,
|
|
17028
|
+
curveIntersectionThreshold
|
|
17029
|
+
);
|
|
17030
|
+
result.length > 0 && (intersections = intersections.concat(result));
|
|
17031
|
+
}), intersections;
|
|
17032
|
+
}
|
|
17033
|
+
arcs(errorThreshold) {
|
|
17034
|
+
return errorThreshold = errorThreshold || 0.5, this._iterate(errorThreshold, []);
|
|
17035
|
+
}
|
|
17036
|
+
_error(pc, np1, s, e2) {
|
|
17037
|
+
const q = (e2 - s) / 4, c1 = this.get(s + q), c2 = this.get(e2 - q), ref = utils.dist(pc, np1), d1 = utils.dist(pc, c1), d2 = utils.dist(pc, c2);
|
|
17038
|
+
return abs(d1 - ref) + abs(d2 - ref);
|
|
17039
|
+
}
|
|
17040
|
+
_iterate(errorThreshold, circles) {
|
|
17041
|
+
let t_s = 0, t_e = 1, safety;
|
|
17042
|
+
do {
|
|
17043
|
+
safety = 0, t_e = 1;
|
|
17044
|
+
let np1 = this.get(t_s), np2, np3, arc, prev_arc, curr_good = !1, prev_good = !1, done, t_m = t_e, prev_e = 1;
|
|
17045
|
+
do
|
|
17046
|
+
if (prev_good = curr_good, prev_arc = arc, t_m = (t_s + t_e) / 2, np2 = this.get(t_m), np3 = this.get(t_e), arc = utils.getccenter(np1, np2, np3), arc.interval = {
|
|
17047
|
+
start: t_s,
|
|
17048
|
+
end: t_e
|
|
17049
|
+
}, curr_good = this._error(arc, np1, t_s, t_e) <= errorThreshold, done = prev_good && !curr_good, done || (prev_e = t_e), curr_good) {
|
|
17050
|
+
if (t_e >= 1) {
|
|
17051
|
+
if (arc.interval.end = prev_e = 1, prev_arc = arc, t_e > 1) {
|
|
17052
|
+
let d = {
|
|
17053
|
+
x: arc.x + arc.r * cos(arc.e),
|
|
17054
|
+
y: arc.y + arc.r * sin(arc.e)
|
|
17055
|
+
};
|
|
17056
|
+
arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));
|
|
17057
|
+
}
|
|
17058
|
+
break;
|
|
17059
|
+
}
|
|
17060
|
+
t_e = t_e + (t_e - t_s) / 2;
|
|
17061
|
+
} else
|
|
17062
|
+
t_e = t_m;
|
|
17063
|
+
while (!done && safety++ < 100);
|
|
17064
|
+
if (safety >= 100)
|
|
17065
|
+
break;
|
|
17066
|
+
prev_arc = prev_arc || arc, circles.push(prev_arc), t_s = prev_e;
|
|
17067
|
+
} while (t_e < 1);
|
|
17068
|
+
return circles;
|
|
17069
|
+
}
|
|
17070
|
+
}
|
|
17071
|
+
function bezierControlPoints(diagramEdge) {
|
|
17072
|
+
let [start2, ...bezierPoints] = diagramEdge.points;
|
|
17073
|
+
invariant(start2, "start should be defined");
|
|
17074
|
+
const handles = [
|
|
17075
|
+
// start
|
|
17076
|
+
];
|
|
17077
|
+
for (; t$6(bezierPoints, 3); ) {
|
|
17078
|
+
const [cp1, cp2, end, ...rest] = bezierPoints, bezier = new Bezier(start2[0], start2[1], cp1[0], cp1[1], cp2[0], cp2[1], end[0], end[1]), inflections = bezier.inflections();
|
|
17079
|
+
inflections.length === 0 && inflections.push(0.5), inflections.forEach((t2) => {
|
|
17080
|
+
const { x, y } = bezier.get(t2);
|
|
17081
|
+
handles.push({
|
|
17082
|
+
x: Math.round(x),
|
|
17083
|
+
y: Math.round(y)
|
|
17084
|
+
});
|
|
17085
|
+
}), bezierPoints = rest, start2 = end;
|
|
17086
|
+
}
|
|
17087
|
+
return invariant(bezierPoints.length === 0, "all points should be consumed"), handles;
|
|
17088
|
+
}
|
|
17089
|
+
const isClose = (a, b) => Math.abs(a - b) < 3.1;
|
|
17090
|
+
function isSamePoint(a, b) {
|
|
17091
|
+
const [ax, ay] = e$4(a) ? a : [a.x, a.y], [bx, by] = e$4(b) ? b : [b.x, b.y];
|
|
17092
|
+
return isClose(ax, bx) && isClose(ay, by);
|
|
17093
|
+
}
|
|
17094
|
+
function stopPropagation(e2) {
|
|
17095
|
+
return e2.stopPropagation();
|
|
17096
|
+
}
|
|
17097
|
+
function centerXYInternalNode(nd) {
|
|
17098
|
+
const { width, height } = getNodeDimensions(nd);
|
|
17099
|
+
return {
|
|
17100
|
+
x: nd.internals.positionAbsolute.x + width / 2,
|
|
17101
|
+
y: nd.internals.positionAbsolute.y + height / 2
|
|
17102
|
+
};
|
|
17103
|
+
}
|
|
17104
|
+
function bezierPath(bezierSpline) {
|
|
17105
|
+
let [start2, ...points] = bezierSpline;
|
|
17106
|
+
invariant(start2, "start should be defined");
|
|
17107
|
+
let path = `M ${start2[0]},${start2[1]}`;
|
|
17108
|
+
for (; t$6(points, 3); ) {
|
|
17109
|
+
const [cp1, cp2, end, ...rest] = points;
|
|
17110
|
+
path = path + ` C ${cp1[0]},${cp1[1]} ${cp2[0]},${cp2[1]} ${end[0]},${end[1]}`, points = rest;
|
|
17111
|
+
}
|
|
17112
|
+
return invariant(points.length === 0, "all points should be consumed"), path;
|
|
17113
|
+
}
|
|
17114
|
+
const HandlerNames = [
|
|
17115
|
+
"onBurgerMenuClick",
|
|
17116
|
+
"onNavigateTo",
|
|
17117
|
+
"onOpenSource",
|
|
17118
|
+
"onCanvasClick",
|
|
17119
|
+
"onCanvasContextMenu",
|
|
17120
|
+
"onEdgeClick",
|
|
17121
|
+
"onEdgeContextMenu",
|
|
17122
|
+
"onNodeClick",
|
|
17123
|
+
"onNodeContextMenu",
|
|
17124
|
+
"onChange",
|
|
17125
|
+
"onCanvasDblClick"
|
|
17126
|
+
], DiagramEventHandlersReactContext = createContext({
|
|
17127
|
+
...t$1(HandlerNames, (name) => [name, null]),
|
|
17128
|
+
handlersRef: {
|
|
17129
|
+
current: {}
|
|
17130
|
+
}
|
|
17131
|
+
});
|
|
17132
|
+
function DiagramEventHandlers({
|
|
17133
|
+
handlers,
|
|
17134
|
+
children: children2
|
|
17135
|
+
}) {
|
|
17136
|
+
const handlersRef = useSyncedRef(handlers), deps = HandlerNames.map((name) => e$2(handlers[name])), value = useMemo(() => ({
|
|
17137
|
+
...t$1(HandlerNames, (name) => handlersRef.current[name] ? [name, (...args) => handlersRef.current[name]?.(...args)] : [name, null]),
|
|
17138
|
+
handlersRef
|
|
17139
|
+
}), [handlersRef, ...deps]);
|
|
17140
|
+
return /* @__PURE__ */ jsx(DiagramEventHandlersReactContext.Provider, { value, children: children2 });
|
|
17141
|
+
}
|
|
17142
|
+
function useDiagramEventHandlers() {
|
|
17143
|
+
return useContext(DiagramEventHandlersReactContext);
|
|
17144
|
+
}
|
|
17145
|
+
const FeatureNames = [
|
|
17146
|
+
"Controls",
|
|
17147
|
+
"ReadOnly",
|
|
17148
|
+
"FocusMode",
|
|
17149
|
+
"NavigateTo",
|
|
17150
|
+
"ElementDetails",
|
|
17151
|
+
"RelationshipDetails",
|
|
17152
|
+
"RelationshipBrowser",
|
|
17153
|
+
"Search",
|
|
17154
|
+
"NavigationButtons",
|
|
17155
|
+
"Notations",
|
|
17156
|
+
"DynamicViewWalkthrough",
|
|
17157
|
+
"EdgeEditing",
|
|
17158
|
+
"ViewTitle",
|
|
17159
|
+
"FitView",
|
|
17160
|
+
/**
|
|
17161
|
+
* Running in VSCode
|
|
17162
|
+
*/
|
|
17163
|
+
"Vscode",
|
|
17164
|
+
"ElementTags"
|
|
17165
|
+
], AllDisabled = t$1(
|
|
17166
|
+
FeatureNames,
|
|
17167
|
+
(name) => [`enable${name}`, !1]
|
|
17168
|
+
), DiagramFeaturesContext = createContext(AllDisabled), validate = (features) => {
|
|
17169
|
+
let {
|
|
17170
|
+
enableReadOnly,
|
|
17171
|
+
enableEdgeEditing,
|
|
17172
|
+
...rest
|
|
17173
|
+
} = features;
|
|
17174
|
+
return enableReadOnly && (enableEdgeEditing = !1), {
|
|
17175
|
+
enableReadOnly,
|
|
17176
|
+
enableEdgeEditing,
|
|
17177
|
+
...rest
|
|
17178
|
+
};
|
|
17179
|
+
};
|
|
17180
|
+
function DiagramFeatures({
|
|
17181
|
+
children: children2,
|
|
17182
|
+
features,
|
|
17183
|
+
overrides
|
|
17184
|
+
}) {
|
|
17185
|
+
const outerScope = useContext(DiagramFeaturesContext), [scope, setScope] = useState(outerScope);
|
|
17186
|
+
return useEffect(
|
|
17187
|
+
() => {
|
|
17188
|
+
setScope((current) => {
|
|
17189
|
+
const next = validate({
|
|
17190
|
+
...outerScope,
|
|
17191
|
+
...features,
|
|
17192
|
+
...overrides
|
|
17193
|
+
});
|
|
17194
|
+
return shallowEqual(current, next) ? current : next;
|
|
17195
|
+
});
|
|
17196
|
+
},
|
|
17197
|
+
[outerScope, features, overrides]
|
|
17198
|
+
), /* @__PURE__ */ jsx(DiagramFeaturesContext.Provider, { value: scope, children: children2 });
|
|
17199
|
+
}
|
|
17200
|
+
DiagramFeatures.Overlays = ({ children: children2 }) => /* @__PURE__ */ jsx(
|
|
17201
|
+
DiagramFeatures,
|
|
17202
|
+
{
|
|
17203
|
+
overrides: {
|
|
17204
|
+
enableControls: !1,
|
|
17205
|
+
enableReadOnly: !0,
|
|
17206
|
+
enableEdgeEditing: !1
|
|
17207
|
+
},
|
|
17208
|
+
children: children2
|
|
17209
|
+
}
|
|
17210
|
+
);
|
|
17211
|
+
function useEnabledFeatures() {
|
|
17212
|
+
return useContext(DiagramFeaturesContext);
|
|
17213
|
+
}
|
|
17214
|
+
function IfEnabled({
|
|
17215
|
+
feature,
|
|
17216
|
+
children: children2,
|
|
17217
|
+
and: and2 = !0
|
|
17218
|
+
}) {
|
|
17219
|
+
return useEnabledFeatures()[`enable${feature}`] === !0 && and2 ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
17220
|
+
}
|
|
17221
|
+
function IfNotEnabled({ feature, children: children2 }) {
|
|
17222
|
+
return useEnabledFeatures()[`enable${feature}`] !== !0 ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
17223
|
+
}
|
|
17224
|
+
function IfReadOnly({ children: children2 }) {
|
|
17225
|
+
return useEnabledFeatures().enableReadOnly === !0 ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
17226
|
+
}
|
|
17227
|
+
function IfNotReadOnly({ children: children2 }) {
|
|
17228
|
+
return useEnabledFeatures().enableReadOnly === !0 ? null : /* @__PURE__ */ jsx(Fragment$1, { children: children2 });
|
|
17229
|
+
}
|
|
17230
|
+
const IconRendererContext = createContext(null);
|
|
17231
|
+
function IconRendererProvider({
|
|
17232
|
+
value,
|
|
17233
|
+
children: children2
|
|
17234
|
+
}) {
|
|
17235
|
+
return useContext(IconRendererContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : /* @__PURE__ */ jsx(IconRendererContext.Provider, { value, children: children2 });
|
|
17236
|
+
}
|
|
17237
|
+
function IconRenderer({
|
|
17238
|
+
element,
|
|
17239
|
+
className
|
|
17240
|
+
}) {
|
|
17241
|
+
const RenderIcon = useContext(IconRendererContext);
|
|
17242
|
+
if (!element || !element.icon || element.icon === "none")
|
|
17243
|
+
return null;
|
|
17244
|
+
let icon;
|
|
17245
|
+
return element.icon.startsWith("http://") || element.icon.startsWith("https://") ? icon = /* @__PURE__ */ jsx("img", { src: element.icon, alt: element.title }) : RenderIcon && (icon = /* @__PURE__ */ jsx(RenderIcon, { node: element })), icon ? /* @__PURE__ */ jsx(
|
|
17246
|
+
"div",
|
|
17247
|
+
{
|
|
17248
|
+
className: cx(
|
|
17249
|
+
className,
|
|
17250
|
+
"likec4-element-icon"
|
|
17251
|
+
),
|
|
17252
|
+
"data-likec4-icon": element.icon,
|
|
17253
|
+
children: icon
|
|
17373
17254
|
}
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17255
|
+
) : null;
|
|
17256
|
+
}
|
|
17257
|
+
const ShapeIcons = {
|
|
17258
|
+
browser: IconBrowser,
|
|
17259
|
+
cylinder: IconCylinder,
|
|
17260
|
+
mobile: IconDeviceMobile,
|
|
17261
|
+
person: IconUser,
|
|
17262
|
+
queue: IconReorder,
|
|
17263
|
+
rectangle: IconRectangularPrism,
|
|
17264
|
+
storage: IconCylinder
|
|
17265
|
+
};
|
|
17266
|
+
function IconOrShapeRenderer({
|
|
17267
|
+
element,
|
|
17268
|
+
className
|
|
17269
|
+
}) {
|
|
17270
|
+
const icon = /* @__PURE__ */ jsx(IconRenderer, { element, className });
|
|
17271
|
+
if (icon)
|
|
17272
|
+
return icon;
|
|
17273
|
+
const ShapeIcon = ShapeIcons[element.shape];
|
|
17274
|
+
return /* @__PURE__ */ jsx(
|
|
17275
|
+
"div",
|
|
17276
|
+
{
|
|
17277
|
+
className: cx(
|
|
17278
|
+
className,
|
|
17279
|
+
"likec4-shape-icon"
|
|
17280
|
+
),
|
|
17281
|
+
children: /* @__PURE__ */ jsx(ShapeIcon, {})
|
|
17382
17282
|
}
|
|
17383
|
-
|
|
17384
|
-
|
|
17385
|
-
graduated ? (fcurves.push(
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
const
|
|
17399
|
-
|
|
17400
|
-
const
|
|
17401
|
-
|
|
17402
|
-
outline[len - i2],
|
|
17403
|
-
curveIntersectionThreshold
|
|
17404
|
-
);
|
|
17405
|
-
shape.startcap.virtual = i2 > 1, shape.endcap.virtual = i2 < len / 2 - 1, shapes.push(shape);
|
|
17283
|
+
);
|
|
17284
|
+
}
|
|
17285
|
+
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
|
|
17286
|
+
const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop), composeShouldForwardProps = (tag, shouldForwardProp) => tag.__shouldForwardProps__ && shouldForwardProp ? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp(propName) : shouldForwardProp, composeCvaFn = (cvaA, cvaB) => {
|
|
17287
|
+
if (cvaA && !cvaB) return cvaA;
|
|
17288
|
+
if (!cvaA && cvaB) return cvaB;
|
|
17289
|
+
if (cvaA.__cva__ && cvaB.__cva__ || cvaA.__recipe__ && cvaB.__recipe__) return cvaA.merge(cvaB);
|
|
17290
|
+
const error = new TypeError("Cannot merge cva with recipe. Please use either cva or recipe.");
|
|
17291
|
+
throw TypeError.captureStackTrace?.(error), error;
|
|
17292
|
+
}, getDisplayName = (Component) => typeof Component == "string" ? Component : Component?.displayName || Component?.name || "Component";
|
|
17293
|
+
function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
17294
|
+
const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva), forwardFn = options.shouldForwardProp || defaultShouldForwardProp, shouldForwardProp = (prop) => options.forwardProps?.includes(prop) ? !0 : forwardFn(prop, cvaFn.variantKeys), defaultProps2 = Object.assign(
|
|
17295
|
+
options.dataAttr && configOrCva.__name__ ? { "data-recipe": configOrCva.__name__ } : {},
|
|
17296
|
+
options.defaultProps
|
|
17297
|
+
), __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn), __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp), __base__ = Dynamic.__base__ || Dynamic, StyledComponent = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
17298
|
+
const { as: Element2 = __base__, unstyled, children: children2, ...restProps } = props, combinedProps = useMemo(() => Object.assign({}, defaultProps2, restProps), [restProps]), [htmlProps2, forwardedProps, variantProps2, styleProps, elementProps] = useMemo(() => splitProps(combinedProps, normalizeHTMLProps.keys, __shouldForwardProps__, __cvaFn__.variantKeys, isCssProperty), [combinedProps]);
|
|
17299
|
+
function recipeClass() {
|
|
17300
|
+
const { css: cssStyles, ...propStyles } = styleProps, compoundVariantStyles = __cvaFn__.__getCompoundVariantCss__?.(variantProps2);
|
|
17301
|
+
return cx(__cvaFn__(variantProps2, !1), css(compoundVariantStyles, propStyles, cssStyles), combinedProps.className);
|
|
17406
17302
|
}
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
return
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
);
|
|
17443
|
-
result.length > 0 && (intersections = intersections.concat(result));
|
|
17444
|
-
}), intersections;
|
|
17445
|
-
}
|
|
17446
|
-
arcs(errorThreshold) {
|
|
17447
|
-
return errorThreshold = errorThreshold || 0.5, this._iterate(errorThreshold, []);
|
|
17448
|
-
}
|
|
17449
|
-
_error(pc, np1, s, e2) {
|
|
17450
|
-
const q = (e2 - s) / 4, c1 = this.get(s + q), c2 = this.get(e2 - q), ref = utils.dist(pc, np1), d1 = utils.dist(pc, c1), d2 = utils.dist(pc, c2);
|
|
17451
|
-
return abs(d1 - ref) + abs(d2 - ref);
|
|
17452
|
-
}
|
|
17453
|
-
_iterate(errorThreshold, circles) {
|
|
17454
|
-
let t_s = 0, t_e = 1, safety;
|
|
17455
|
-
do {
|
|
17456
|
-
safety = 0, t_e = 1;
|
|
17457
|
-
let np1 = this.get(t_s), np2, np3, arc, prev_arc, curr_good = !1, prev_good = !1, done, t_m = t_e, prev_e = 1;
|
|
17458
|
-
do
|
|
17459
|
-
if (prev_good = curr_good, prev_arc = arc, t_m = (t_s + t_e) / 2, np2 = this.get(t_m), np3 = this.get(t_e), arc = utils.getccenter(np1, np2, np3), arc.interval = {
|
|
17460
|
-
start: t_s,
|
|
17461
|
-
end: t_e
|
|
17462
|
-
}, curr_good = this._error(arc, np1, t_s, t_e) <= errorThreshold, done = prev_good && !curr_good, done || (prev_e = t_e), curr_good) {
|
|
17463
|
-
if (t_e >= 1) {
|
|
17464
|
-
if (arc.interval.end = prev_e = 1, prev_arc = arc, t_e > 1) {
|
|
17465
|
-
let d = {
|
|
17466
|
-
x: arc.x + arc.r * cos(arc.e),
|
|
17467
|
-
y: arc.y + arc.r * sin(arc.e)
|
|
17468
|
-
};
|
|
17469
|
-
arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));
|
|
17470
|
-
}
|
|
17471
|
-
break;
|
|
17472
|
-
}
|
|
17473
|
-
t_e = t_e + (t_e - t_s) / 2;
|
|
17474
|
-
} else
|
|
17475
|
-
t_e = t_m;
|
|
17476
|
-
while (!done && safety++ < 100);
|
|
17477
|
-
if (safety >= 100)
|
|
17478
|
-
break;
|
|
17479
|
-
prev_arc = prev_arc || arc, circles.push(prev_arc), t_s = prev_e;
|
|
17480
|
-
} while (t_e < 1);
|
|
17481
|
-
return circles;
|
|
17303
|
+
function cvaClass() {
|
|
17304
|
+
const { css: cssStyles, ...propStyles } = styleProps, cvaStyles = __cvaFn__.raw(variantProps2);
|
|
17305
|
+
return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className);
|
|
17306
|
+
}
|
|
17307
|
+
const classes2 = () => {
|
|
17308
|
+
if (unstyled) {
|
|
17309
|
+
const { css: cssStyles, ...propStyles } = styleProps;
|
|
17310
|
+
return cx(css(propStyles, cssStyles), combinedProps.className);
|
|
17311
|
+
}
|
|
17312
|
+
return configOrCva.__recipe__ ? recipeClass() : cvaClass();
|
|
17313
|
+
};
|
|
17314
|
+
return createElement(Element2, {
|
|
17315
|
+
ref,
|
|
17316
|
+
...forwardedProps,
|
|
17317
|
+
...elementProps,
|
|
17318
|
+
...normalizeHTMLProps(htmlProps2),
|
|
17319
|
+
className: classes2()
|
|
17320
|
+
}, children2 ?? combinedProps.children);
|
|
17321
|
+
}), name = getDisplayName(__base__);
|
|
17322
|
+
return StyledComponent.displayName = `styled.${name}`, StyledComponent.__cva__ = __cvaFn__, StyledComponent.__base__ = __base__, StyledComponent.__shouldForwardProps__ = shouldForwardProp, StyledComponent;
|
|
17323
|
+
}
|
|
17324
|
+
function createJsxFactory() {
|
|
17325
|
+
const cache = /* @__PURE__ */ new Map();
|
|
17326
|
+
return new Proxy(styledFn, {
|
|
17327
|
+
apply(_, __, args) {
|
|
17328
|
+
return styledFn(...args);
|
|
17329
|
+
},
|
|
17330
|
+
get(_, el) {
|
|
17331
|
+
return cache.has(el) || cache.set(el, styledFn(el)), cache.get(el);
|
|
17332
|
+
}
|
|
17333
|
+
});
|
|
17334
|
+
}
|
|
17335
|
+
const styled = /* @__PURE__ */ createJsxFactory(), boxConfig = {
|
|
17336
|
+
transform(props) {
|
|
17337
|
+
return props;
|
|
17482
17338
|
}
|
|
17339
|
+
}, getBoxStyle = (styles = {}) => {
|
|
17340
|
+
const _styles = getPatternStyles(boxConfig, styles);
|
|
17341
|
+
return boxConfig.transform(_styles, patternFns);
|
|
17342
|
+
}, Box = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
17343
|
+
const [patternProps, restProps] = splitProps(props, []), styleProps = getBoxStyle(patternProps), mergedProps = { ref, ...styleProps, ...restProps };
|
|
17344
|
+
return createElement(styled.div, mergedProps);
|
|
17345
|
+
}), hstackConfig = {
|
|
17346
|
+
transform(props) {
|
|
17347
|
+
const { justify, gap, ...rest } = props;
|
|
17348
|
+
return {
|
|
17349
|
+
display: "flex",
|
|
17350
|
+
alignItems: "center",
|
|
17351
|
+
justifyContent: justify,
|
|
17352
|
+
gap,
|
|
17353
|
+
flexDirection: "row",
|
|
17354
|
+
...rest
|
|
17355
|
+
};
|
|
17356
|
+
},
|
|
17357
|
+
defaultValues: { gap: "sm" }
|
|
17358
|
+
}, getHstackStyle = (styles = {}) => {
|
|
17359
|
+
const _styles = getPatternStyles(hstackConfig, styles);
|
|
17360
|
+
return hstackConfig.transform(_styles, patternFns);
|
|
17361
|
+
}, hstack = (styles) => css(getHstackStyle(styles));
|
|
17362
|
+
hstack.raw = getHstackStyle;
|
|
17363
|
+
const HStack = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
17364
|
+
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]), styleProps = getHstackStyle(patternProps), mergedProps = { ref, ...styleProps, ...restProps };
|
|
17365
|
+
return createElement(styled.div, mergedProps);
|
|
17366
|
+
});
|
|
17367
|
+
let listenerQueue = [], lqIndex = 0;
|
|
17368
|
+
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
17369
|
+
let atom = (initialValue) => {
|
|
17370
|
+
let listeners = [], $atom = {
|
|
17371
|
+
get() {
|
|
17372
|
+
return $atom.lc || $atom.listen(() => {
|
|
17373
|
+
})(), $atom.value;
|
|
17374
|
+
},
|
|
17375
|
+
lc: 0,
|
|
17376
|
+
listen(listener) {
|
|
17377
|
+
return $atom.lc = listeners.push(listener), () => {
|
|
17378
|
+
for (let i2 = lqIndex + QUEUE_ITEMS_PER_LISTENER; i2 < listenerQueue.length; )
|
|
17379
|
+
listenerQueue[i2] === listener ? listenerQueue.splice(i2, QUEUE_ITEMS_PER_LISTENER) : i2 += QUEUE_ITEMS_PER_LISTENER;
|
|
17380
|
+
let index2 = listeners.indexOf(listener);
|
|
17381
|
+
~index2 && (listeners.splice(index2, 1), --$atom.lc || $atom.off());
|
|
17382
|
+
};
|
|
17383
|
+
},
|
|
17384
|
+
notify(oldValue, changedKey) {
|
|
17385
|
+
let runListenerQueue = !listenerQueue.length;
|
|
17386
|
+
for (let listener of listeners)
|
|
17387
|
+
listenerQueue.push(listener, $atom.value, oldValue, changedKey);
|
|
17388
|
+
if (runListenerQueue) {
|
|
17389
|
+
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER)
|
|
17390
|
+
listenerQueue[lqIndex](
|
|
17391
|
+
listenerQueue[lqIndex + 1],
|
|
17392
|
+
listenerQueue[lqIndex + 2],
|
|
17393
|
+
listenerQueue[lqIndex + 3]
|
|
17394
|
+
);
|
|
17395
|
+
listenerQueue.length = 0;
|
|
17396
|
+
}
|
|
17397
|
+
},
|
|
17398
|
+
/* It will be called on last listener unsubscribing.
|
|
17399
|
+
We will redefine it in onMount and onStop. */
|
|
17400
|
+
off() {
|
|
17401
|
+
},
|
|
17402
|
+
set(newValue) {
|
|
17403
|
+
let oldValue = $atom.value;
|
|
17404
|
+
oldValue !== newValue && ($atom.value = newValue, $atom.notify(oldValue));
|
|
17405
|
+
},
|
|
17406
|
+
subscribe(listener) {
|
|
17407
|
+
let unbind = $atom.listen(listener);
|
|
17408
|
+
return listener($atom.value), unbind;
|
|
17409
|
+
},
|
|
17410
|
+
value: initialValue
|
|
17411
|
+
};
|
|
17412
|
+
return $atom;
|
|
17413
|
+
};
|
|
17414
|
+
const ReduceGraphicsModeCtx = createContext(null);
|
|
17415
|
+
function useIsReducedGraphics() {
|
|
17416
|
+
const isReduced = useContext(ReduceGraphicsModeCtx);
|
|
17417
|
+
return isReduced === null && console.warn("ReduceGraphicsMode is not provided"), isReduced ?? !1;
|
|
17483
17418
|
}
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
|
|
17487
|
-
|
|
17488
|
-
|
|
17489
|
-
|
|
17490
|
-
for (; t$6(bezierPoints, 3); ) {
|
|
17491
|
-
const [cp1, cp2, end, ...rest] = bezierPoints, bezier = new Bezier(start2[0], start2[1], cp1[0], cp1[1], cp2[0], cp2[1], end[0], end[1]), inflections = bezier.inflections();
|
|
17492
|
-
inflections.length === 0 && inflections.push(0.5), inflections.forEach((t2) => {
|
|
17493
|
-
const { x, y } = bezier.get(t2);
|
|
17494
|
-
handles.push({
|
|
17495
|
-
x: Math.round(x),
|
|
17496
|
-
y: Math.round(y)
|
|
17497
|
-
});
|
|
17498
|
-
}), bezierPoints = rest, start2 = end;
|
|
17499
|
-
}
|
|
17500
|
-
return invariant(bezierPoints.length === 0, "all points should be consumed"), handles;
|
|
17419
|
+
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
17420
|
+
"PanningAtomSafeCtx is not provided"
|
|
17421
|
+
);
|
|
17422
|
+
function ReduceGraphicsContext({ reduceGraphics, children: children2 }) {
|
|
17423
|
+
const $isPanningRef = useRef(null);
|
|
17424
|
+
return $isPanningRef.current || ($isPanningRef.current = atom(reduceGraphics)), /* @__PURE__ */ jsx(PanningAtomSafeCtx, { value: $isPanningRef.current, children: /* @__PURE__ */ jsx(ReduceGraphicsModeCtx.Provider, { value: reduceGraphics, children: children2 }) });
|
|
17501
17425
|
}
|
|
17502
|
-
const
|
|
17503
|
-
function
|
|
17504
|
-
|
|
17505
|
-
return isClose(ax, bx) && isClose(ay, by);
|
|
17426
|
+
const LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
|
|
17427
|
+
function EnsureCurrentViewModel({ children: children2 }) {
|
|
17428
|
+
return useContext(CurrentViewModelContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
|
|
17506
17429
|
}
|
|
17507
|
-
function
|
|
17508
|
-
|
|
17430
|
+
function useLikeC4Model() {
|
|
17431
|
+
const model = useContext(LikeC4ModelContext);
|
|
17432
|
+
if (!model)
|
|
17433
|
+
throw new Error("LikeC4Model not found. Make sure you have LikeC4ModelProvider.");
|
|
17434
|
+
return model;
|
|
17509
17435
|
}
|
|
17510
|
-
function
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
|
|
17514
|
-
|
|
17436
|
+
function useLikeC4ViewModel(viewId) {
|
|
17437
|
+
return useLikeC4Model().view(viewId);
|
|
17438
|
+
}
|
|
17439
|
+
function useLikeC4Specification() {
|
|
17440
|
+
const model = useLikeC4Model(), [specification, setSpecification] = useState(model.$data.specification);
|
|
17441
|
+
return useEffect(() => {
|
|
17442
|
+
setSpecification((current) => deepEqual(current, model.$data.specification) ? current : model.$data.specification);
|
|
17443
|
+
}, [model]), specification;
|
|
17444
|
+
}
|
|
17445
|
+
const TagStylesContext = createContext({}), radixColors = [
|
|
17446
|
+
"yellow",
|
|
17447
|
+
"orange",
|
|
17448
|
+
"amber",
|
|
17449
|
+
"tomato",
|
|
17450
|
+
"red",
|
|
17451
|
+
"ruby",
|
|
17452
|
+
"crimson",
|
|
17453
|
+
"pink",
|
|
17454
|
+
"pink",
|
|
17455
|
+
"purple",
|
|
17456
|
+
"violet",
|
|
17457
|
+
"indigo",
|
|
17458
|
+
"blue",
|
|
17459
|
+
"teal",
|
|
17460
|
+
"grass",
|
|
17461
|
+
"lime"
|
|
17462
|
+
], generateColorVars = (spec) => {
|
|
17463
|
+
const color2 = spec.color;
|
|
17464
|
+
if (isTagColorSpecified(spec))
|
|
17465
|
+
return `
|
|
17466
|
+
--colors-likec4-tag-bg: ${color2};
|
|
17467
|
+
--colors-likec4-tag-bg-hover: color-mix(in srgb, ${color2}, var(--colors-likec4-mix-color) 20%);
|
|
17468
|
+
`;
|
|
17469
|
+
if (!radixColors.includes(color2))
|
|
17470
|
+
return "";
|
|
17471
|
+
let textcolor = "12";
|
|
17472
|
+
return ["mint", "grass", "lime", "yellow", "amber"].includes(color2) && (textcolor = "dark-2"), `
|
|
17473
|
+
--colors-likec4-tag-border: var(--colors-${color2}-8);
|
|
17474
|
+
--colors-likec4-tag-bg: var(--colors-${color2}-9);
|
|
17475
|
+
--colors-likec4-tag-bg-hover: var(--colors-${color2}-10);
|
|
17476
|
+
--colors-likec4-tag-text: var(--colors-${color2}-${textcolor});
|
|
17477
|
+
`;
|
|
17478
|
+
};
|
|
17479
|
+
function TagStylesProvider({ children: children2, rootSelector }) {
|
|
17480
|
+
const tags = useLikeC4Specification().tags, { specs, stylesheet } = useDeepCompareMemo(() => tags ? {
|
|
17481
|
+
specs: tags,
|
|
17482
|
+
stylesheet: t$7(
|
|
17483
|
+
t$5(tags),
|
|
17484
|
+
t$4(([tag, spec]) => [
|
|
17485
|
+
`:is(${rootSelector} [data-likec4-tag="${tag}"]) {`,
|
|
17486
|
+
generateColorVars(spec),
|
|
17487
|
+
"}"
|
|
17488
|
+
]),
|
|
17489
|
+
t$3(`
|
|
17490
|
+
`)
|
|
17491
|
+
)
|
|
17492
|
+
} : { specs: {}, stylesheet: "" }, [tags, rootSelector]);
|
|
17493
|
+
return /* @__PURE__ */ jsxs(TagStylesContext.Provider, { value: specs, children: [
|
|
17494
|
+
stylesheet !== "" && /* @__PURE__ */ jsx(TagStylesheet, { stylesheet }),
|
|
17495
|
+
children2
|
|
17496
|
+
] });
|
|
17497
|
+
}
|
|
17498
|
+
function TagStylesheet({ stylesheet }) {
|
|
17499
|
+
const nonce = useMantineStyleNonce()?.();
|
|
17500
|
+
return /* @__PURE__ */ jsx("style", { "data-likec4-tag-stylesheet": !0, type: "text/css", dangerouslySetInnerHTML: { __html: stylesheet }, nonce });
|
|
17501
|
+
}
|
|
17502
|
+
function useTagSpecification(tag) {
|
|
17503
|
+
return useContext(TagStylesContext)[tag] ?? {
|
|
17504
|
+
color: "tomato"
|
|
17515
17505
|
};
|
|
17516
17506
|
}
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
|
|
17520
|
-
|
|
17521
|
-
|
|
17522
|
-
|
|
17523
|
-
|
|
17524
|
-
|
|
17525
|
-
return
|
|
17507
|
+
const RootContainerContext = createContext(createRef());
|
|
17508
|
+
function RootContainer({
|
|
17509
|
+
id: id2,
|
|
17510
|
+
className,
|
|
17511
|
+
reduceGraphics = !1,
|
|
17512
|
+
children: children2
|
|
17513
|
+
}) {
|
|
17514
|
+
const ref = useRef(null), $isPanning = usePanningAtom();
|
|
17515
|
+
return useEffect(() => $isPanning.listen((isPanning) => {
|
|
17516
|
+
ref.current?.setAttribute("data-likec4-diagram-panning", isPanning ? "true" : "false");
|
|
17517
|
+
}), [$isPanning]), /* @__PURE__ */ jsx(
|
|
17518
|
+
Box,
|
|
17519
|
+
{
|
|
17520
|
+
id: id2,
|
|
17521
|
+
className: cx("likec4-root", className),
|
|
17522
|
+
ref,
|
|
17523
|
+
...reduceGraphics && {
|
|
17524
|
+
"data-likec4-reduced-graphics": !0
|
|
17525
|
+
},
|
|
17526
|
+
children: /* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id2}`, children: /* @__PURE__ */ jsx(RootContainerContext.Provider, { value: ref, children: children2 }) })
|
|
17527
|
+
}
|
|
17528
|
+
);
|
|
17529
|
+
}
|
|
17530
|
+
function useRootContainer() {
|
|
17531
|
+
return useContext(RootContainerContext).current;
|
|
17526
17532
|
}
|
|
17527
17533
|
function useMantinePortalProps() {
|
|
17528
17534
|
const target = useRootContainer();
|
|
@@ -19299,12 +19305,7 @@ function focusedBounds(params) {
|
|
|
19299
19305
|
if (knownAbsolutes.set(node.id, position), node.hidden || node.data.dimmed)
|
|
19300
19306
|
return acc;
|
|
19301
19307
|
const width = node.measured?.width ?? node.width ?? node.initialWidth, height = node.measured?.height ?? node.height ?? node.initialHeight;
|
|
19302
|
-
return
|
|
19303
|
-
minX: Math.min(acc.minX, position.x),
|
|
19304
|
-
minY: Math.min(acc.minY, position.y),
|
|
19305
|
-
maxX: Math.max(acc.maxX, position.x + width),
|
|
19306
|
-
maxY: Math.max(acc.maxY, position.y + height)
|
|
19307
|
-
};
|
|
19308
|
+
return acc.minX = Math.min(acc.minX, position.x), acc.minY = Math.min(acc.minY, position.y), acc.maxX = Math.max(acc.maxX, position.x + width), acc.maxY = Math.max(acc.maxY, position.y + height), acc;
|
|
19308
19309
|
}, {
|
|
19309
19310
|
minX: 1 / 0,
|
|
19310
19311
|
minY: 1 / 0,
|
|
@@ -19323,6 +19324,45 @@ function focusedBounds(params) {
|
|
|
19323
19324
|
}
|
|
19324
19325
|
};
|
|
19325
19326
|
}
|
|
19327
|
+
const MARGIN = 32;
|
|
19328
|
+
function activeSequenceBounds(params) {
|
|
19329
|
+
const activeWalkthrough = nonNullable(params.context.activeWalkthrough), stepEdge = nonNullable(params.context.xyedges.find((e2) => e2.id === activeWalkthrough.stepId)), xystate = params.context.xystore.getState(), sourceNode = nonNullable(xystate.nodeLookup.get(stepEdge.source)), targetNode = nonNullable(xystate.nodeLookup.get(stepEdge.target)), actorsBounds = getNodesBounds([sourceNode, targetNode], xystate);
|
|
19330
|
+
let stepBounds;
|
|
19331
|
+
if (activeWalkthrough.parallelPrefix) {
|
|
19332
|
+
const parallelArea = params.context.xynodes.find(
|
|
19333
|
+
(n2) => n2.type === "seq-parallel" && n2.data.parallelPrefix === activeWalkthrough.parallelPrefix
|
|
19334
|
+
);
|
|
19335
|
+
parallelArea && (stepBounds = {
|
|
19336
|
+
x: parallelArea.position.x,
|
|
19337
|
+
y: parallelArea.position.y,
|
|
19338
|
+
...getNodeDimensions(parallelArea)
|
|
19339
|
+
});
|
|
19340
|
+
}
|
|
19341
|
+
return stepBounds ??= getEdgeBounds(stepEdge, xystate), stepBounds ? stepBounds = BBox.merge(stepBounds, actorsBounds) : stepBounds = actorsBounds, {
|
|
19342
|
+
duration: 350,
|
|
19343
|
+
bounds: BBox.expand(
|
|
19344
|
+
stepBounds,
|
|
19345
|
+
MARGIN
|
|
19346
|
+
)
|
|
19347
|
+
};
|
|
19348
|
+
}
|
|
19349
|
+
function getEdgeBounds(edge, store) {
|
|
19350
|
+
const sourceNode = store.nodeLookup.get(edge.source), targetNode = store.nodeLookup.get(edge.target);
|
|
19351
|
+
if (!sourceNode || !targetNode)
|
|
19352
|
+
return null;
|
|
19353
|
+
const edgePosition = getEdgePosition({
|
|
19354
|
+
id: edge.id,
|
|
19355
|
+
sourceNode,
|
|
19356
|
+
targetNode,
|
|
19357
|
+
sourceHandle: edge.sourceHandle || null,
|
|
19358
|
+
targetHandle: edge.targetHandle || null,
|
|
19359
|
+
connectionMode: store.connectionMode
|
|
19360
|
+
});
|
|
19361
|
+
return edgePosition ? BBox.fromPoints([
|
|
19362
|
+
[edgePosition.sourceX, edgePosition.sourceY],
|
|
19363
|
+
[edgePosition.targetX, edgePosition.targetY]
|
|
19364
|
+
]) : null;
|
|
19365
|
+
}
|
|
19326
19366
|
const DiagramActorSafeContext = createContext(null);
|
|
19327
19367
|
DiagramActorSafeContext.displayName = "DiagramActorSafeContext";
|
|
19328
19368
|
const DiagramActorContextProvider = DiagramActorSafeContext.Provider, useDiagramActorRef = () => {
|
|
@@ -19433,6 +19473,9 @@ function useDiagram() {
|
|
|
19433
19473
|
},
|
|
19434
19474
|
openSearch: (searchValue) => {
|
|
19435
19475
|
actor.send({ type: "open.search", ...searchValue && { search: searchValue } });
|
|
19476
|
+
},
|
|
19477
|
+
switchDynamicViewVariant: (variant) => {
|
|
19478
|
+
actor.send({ type: "switch.dynamicViewVariant", variant });
|
|
19436
19479
|
}
|
|
19437
19480
|
}), [actor]);
|
|
19438
19481
|
}
|
|
@@ -19909,8 +19952,8 @@ function ElementActionButtons({
|
|
|
19909
19952
|
},
|
|
19910
19953
|
buttons
|
|
19911
19954
|
}) {
|
|
19912
|
-
const id2 = useId$1()
|
|
19913
|
-
return
|
|
19955
|
+
const id2 = useId$1();
|
|
19956
|
+
return buttons.length ? /* @__PURE__ */ jsx(Box, { className: container$2, children: /* @__PURE__ */ jsx(
|
|
19914
19957
|
MotionDiv,
|
|
19915
19958
|
{
|
|
19916
19959
|
layoutRoot: !0,
|
|
@@ -19944,7 +19987,7 @@ function ElementActionButtons({
|
|
|
19944
19987
|
))
|
|
19945
19988
|
},
|
|
19946
19989
|
`${id2}-action-buttons`
|
|
19947
|
-
) });
|
|
19990
|
+
) }) : null;
|
|
19948
19991
|
}
|
|
19949
19992
|
const container$1 = css({
|
|
19950
19993
|
position: "absolute",
|
|
@@ -20052,19 +20095,7 @@ const container = css({
|
|
|
20052
20095
|
":where(.react-flow__node.selectable:not(.dragging)) &": {
|
|
20053
20096
|
cursor: "pointer"
|
|
20054
20097
|
}
|
|
20055
|
-
})
|
|
20056
|
-
function nodeSizes({
|
|
20057
|
-
size: size2,
|
|
20058
|
-
padding,
|
|
20059
|
-
textSize
|
|
20060
|
-
}) {
|
|
20061
|
-
return !size2 && textSize && (size2 = textSize), !textSize && size2 && (textSize = size2), !padding && size2 && (padding = size2), size2 ??= DefaultShapeSize, textSize ??= DefaultTextSize, padding ??= DefaultPaddingSize, {
|
|
20062
|
-
size: size2,
|
|
20063
|
-
padding,
|
|
20064
|
-
textSize
|
|
20065
|
-
};
|
|
20066
|
-
}
|
|
20067
|
-
const ElementNodeContainer = forwardRef(({
|
|
20098
|
+
}), ElementNodeContainer = forwardRef(({
|
|
20068
20099
|
nodeProps: {
|
|
20069
20100
|
selected: selected2 = !1,
|
|
20070
20101
|
selectable = !1,
|
|
@@ -20092,7 +20123,7 @@ const ElementNodeContainer = forwardRef(({
|
|
|
20092
20123
|
size: size2,
|
|
20093
20124
|
padding,
|
|
20094
20125
|
textSize
|
|
20095
|
-
} =
|
|
20126
|
+
} = ensureSizes(data.style ?? {});
|
|
20096
20127
|
return /* @__PURE__ */ jsx(
|
|
20097
20128
|
MotionDiv,
|
|
20098
20129
|
{
|
|
@@ -20502,7 +20533,7 @@ function ElementTitle({ id: id2, data, iconSize }) {
|
|
|
20502
20533
|
hasIcon: e(elementIcon),
|
|
20503
20534
|
hasDescription: !!data.description?.nonEmpty,
|
|
20504
20535
|
hasTechnology: !e$3(data.technology ?? "")
|
|
20505
|
-
}), size2 =
|
|
20536
|
+
}), { size: size2 } = ensureSizes(data.style), isSmOrXs = size2 === "sm" || size2 === "xs";
|
|
20506
20537
|
return /* @__PURE__ */ jsxs(
|
|
20507
20538
|
Box,
|
|
20508
20539
|
{
|
|
@@ -21219,20 +21250,6 @@ const ViewGroupNode = (props) => /* @__PURE__ */ jsxs(CompoundNodeContainer, { n
|
|
|
21219
21250
|
/* @__PURE__ */ jsx(DefaultHandles, {})
|
|
21220
21251
|
] });
|
|
21221
21252
|
ViewGroupNode.displayName = "ViewGroupNode";
|
|
21222
|
-
function useOptionalCurrentViewModel() {
|
|
21223
|
-
return useContext(CurrentViewModelContext);
|
|
21224
|
-
}
|
|
21225
|
-
function useCurrentViewModel() {
|
|
21226
|
-
const vm = useContext(CurrentViewModelContext);
|
|
21227
|
-
if (!vm)
|
|
21228
|
-
throw new Error("No LikeC4ViewModel in context found");
|
|
21229
|
-
return vm;
|
|
21230
|
-
}
|
|
21231
|
-
const selectViewId = (s) => s.context.view.id;
|
|
21232
|
-
function useCurrentViewId() {
|
|
21233
|
-
const actorRef = useDiagramActorRef();
|
|
21234
|
-
return useSelector(actorRef, selectViewId);
|
|
21235
|
-
}
|
|
21236
21253
|
const backdropBlur = "--_blur", backdropOpacity = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog = css.raw({
|
|
21237
21254
|
boxSizing: "border-box",
|
|
21238
21255
|
margin: "0",
|
|
@@ -21457,6 +21474,20 @@ const backdropBlur = "--_blur", backdropOpacity = "--_opacity", level = "--_leve
|
|
|
21457
21474
|
);
|
|
21458
21475
|
});
|
|
21459
21476
|
Overlay.displayName = "Overlay";
|
|
21477
|
+
const selectViewId = (s) => s.context.view.id;
|
|
21478
|
+
function useCurrentViewId() {
|
|
21479
|
+
const actorRef = useDiagramActorRef();
|
|
21480
|
+
return useSelector(actorRef, selectViewId);
|
|
21481
|
+
}
|
|
21482
|
+
function useOptionalCurrentViewModel() {
|
|
21483
|
+
return useContext(CurrentViewModelContext);
|
|
21484
|
+
}
|
|
21485
|
+
function useCurrentViewModel() {
|
|
21486
|
+
const vm = useContext(CurrentViewModelContext);
|
|
21487
|
+
if (!vm)
|
|
21488
|
+
throw new Error("No LikeC4ViewModel in context found");
|
|
21489
|
+
return vm;
|
|
21490
|
+
}
|
|
21460
21491
|
const LikeC4ProjectsContext = createContext(null), emptyProjects = [];
|
|
21461
21492
|
function useLikeC4Projects() {
|
|
21462
21493
|
const ctx = useContext(LikeC4ProjectsContext);
|
|
@@ -21577,15 +21608,15 @@ export {
|
|
|
21577
21608
|
useMantineTheme as b,
|
|
21578
21609
|
MotionDiv as b$,
|
|
21579
21610
|
isBrowser as b0,
|
|
21580
|
-
|
|
21581
|
-
|
|
21582
|
-
|
|
21583
|
-
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21611
|
+
Background as b1,
|
|
21612
|
+
BackgroundVariant as b2,
|
|
21613
|
+
useIsZoomTooSmall as b3,
|
|
21614
|
+
useXYStoreApi as b4,
|
|
21615
|
+
index as b5,
|
|
21616
|
+
stopPropagation as b6,
|
|
21617
|
+
cx as b7,
|
|
21618
|
+
roundDpr as b8,
|
|
21619
|
+
useStore as b9,
|
|
21589
21620
|
$$ACTOR_TYPE as bA,
|
|
21590
21621
|
STATE_DELIMITER as bB,
|
|
21591
21622
|
mapValues as bC,
|
|
@@ -21613,12 +21644,12 @@ export {
|
|
|
21613
21644
|
deepEqual as bY,
|
|
21614
21645
|
ActionIcon as bZ,
|
|
21615
21646
|
IconZoomScan as b_,
|
|
21616
|
-
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21647
|
+
useUpdateEffect as ba,
|
|
21648
|
+
css as bb,
|
|
21649
|
+
getPatternStyles as bc,
|
|
21650
|
+
patternFns as bd,
|
|
21651
|
+
splitProps as be,
|
|
21652
|
+
styled as bf,
|
|
21622
21653
|
XSTATE_STOP as bg,
|
|
21623
21654
|
cloneMachineSnapshot as bh,
|
|
21624
21655
|
ProcessingStatus as bi,
|
|
@@ -21640,171 +21671,173 @@ export {
|
|
|
21640
21671
|
getStateNodeByPath as by,
|
|
21641
21672
|
getPersistedSnapshot as bz,
|
|
21642
21673
|
useMantineStyleNonce as c,
|
|
21643
|
-
|
|
21644
|
-
|
|
21645
|
-
|
|
21646
|
-
|
|
21647
|
-
|
|
21648
|
-
|
|
21649
|
-
|
|
21650
|
-
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
|
|
21657
|
-
|
|
21658
|
-
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21672
|
-
|
|
21673
|
-
|
|
21674
|
-
|
|
21675
|
-
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21693
|
-
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21674
|
+
useOnDiagramEvent as c$,
|
|
21675
|
+
e as c0,
|
|
21676
|
+
Box as c1,
|
|
21677
|
+
useXYStore as c2,
|
|
21678
|
+
EdgeLabelRenderer as c3,
|
|
21679
|
+
e$1 as c4,
|
|
21680
|
+
getNodeDimensions as c5,
|
|
21681
|
+
useXYFlow as c6,
|
|
21682
|
+
useDiagram as c7,
|
|
21683
|
+
useEnabledFeatures as c8,
|
|
21684
|
+
useXYInternalNode as c9,
|
|
21685
|
+
Flex as cA,
|
|
21686
|
+
clampUseMovePosition as cB,
|
|
21687
|
+
useMove as cC,
|
|
21688
|
+
useMantinePortalProps as cD,
|
|
21689
|
+
hstack as cE,
|
|
21690
|
+
TooltipGroup as cF,
|
|
21691
|
+
shallowEqual as cG,
|
|
21692
|
+
useSelector as cH,
|
|
21693
|
+
useCurrentViewId as cI,
|
|
21694
|
+
IconFileSymlink as cJ,
|
|
21695
|
+
isMacOs as cK,
|
|
21696
|
+
IconCheck as cL,
|
|
21697
|
+
IconId as cM,
|
|
21698
|
+
HStack as cN,
|
|
21699
|
+
ElementTag as cO,
|
|
21700
|
+
MarkdownBlock as cP,
|
|
21701
|
+
cva as cQ,
|
|
21702
|
+
Button as cR,
|
|
21703
|
+
SegmentedControl as cS,
|
|
21704
|
+
MotionSpan as cT,
|
|
21705
|
+
Portal as cU,
|
|
21706
|
+
useLikeC4ProjectsContext as cV,
|
|
21707
|
+
useLikeC4ProjectId as cW,
|
|
21708
|
+
Menu as cX,
|
|
21709
|
+
MenuTarget as cY,
|
|
21710
|
+
MenuDropdown as cZ,
|
|
21711
|
+
MenuItem as c_,
|
|
21712
|
+
isSamePoint as ca,
|
|
21713
|
+
bezierControlPoints as cb,
|
|
21714
|
+
bezierPath as cc,
|
|
21715
|
+
getSmoothStepPath as cd,
|
|
21716
|
+
ElementNodeContainer as ce,
|
|
21717
|
+
ElementShape as cf,
|
|
21718
|
+
ElementTitle as cg,
|
|
21719
|
+
ElementActions as ch,
|
|
21720
|
+
ElementDetailsButtonWithHandler as ci,
|
|
21721
|
+
Handle as cj,
|
|
21722
|
+
Position as ck,
|
|
21723
|
+
ViewGroupNode as cl,
|
|
21724
|
+
CompoundDeploymentNode as cm,
|
|
21725
|
+
CompoundElementNode as cn,
|
|
21726
|
+
DeploymentNode as co,
|
|
21727
|
+
ElementNode as cp,
|
|
21728
|
+
useDiagramActorSnapshot as cq,
|
|
21729
|
+
e$3 as cr,
|
|
21730
|
+
MotionButton as cs,
|
|
21731
|
+
Tooltip$1 as ct,
|
|
21732
|
+
useDiagramEventHandlers as cu,
|
|
21733
|
+
useDiagramContext as cv,
|
|
21734
|
+
useHover$1 as cw,
|
|
21735
|
+
PopoverTarget as cx,
|
|
21736
|
+
PopoverDropdown as cy,
|
|
21737
|
+
FloatingIndicator as cz,
|
|
21707
21738
|
alpha$1 as d,
|
|
21708
|
-
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
-
|
|
21726
|
-
|
|
21727
|
-
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21734
|
-
|
|
21735
|
-
|
|
21736
|
-
|
|
21737
|
-
|
|
21738
|
-
|
|
21739
|
-
|
|
21740
|
-
|
|
21741
|
-
|
|
21742
|
-
|
|
21743
|
-
|
|
21744
|
-
|
|
21745
|
-
|
|
21746
|
-
|
|
21747
|
-
|
|
21748
|
-
|
|
21749
|
-
|
|
21750
|
-
|
|
21751
|
-
|
|
21752
|
-
|
|
21753
|
-
|
|
21754
|
-
|
|
21755
|
-
|
|
21756
|
-
|
|
21757
|
-
|
|
21758
|
-
|
|
21759
|
-
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21764
|
-
|
|
21765
|
-
|
|
21766
|
-
|
|
21767
|
-
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
|
|
21739
|
+
getViewportForBounds as d$,
|
|
21740
|
+
useLikeC4Model as d0,
|
|
21741
|
+
Divider as d1,
|
|
21742
|
+
e$4 as d2,
|
|
21743
|
+
useDiagramActorRef as d3,
|
|
21744
|
+
useCurrentViewModel as d4,
|
|
21745
|
+
useActorRef as d5,
|
|
21746
|
+
useUpdateEffect$1 as d6,
|
|
21747
|
+
Group as d7,
|
|
21748
|
+
getBezierPath as d8,
|
|
21749
|
+
ElementActionButtons as d9,
|
|
21750
|
+
useReducedMotionConfig as dA,
|
|
21751
|
+
Overlay as dB,
|
|
21752
|
+
sva as dC,
|
|
21753
|
+
e$2 as dD,
|
|
21754
|
+
VisuallyHidden as dE,
|
|
21755
|
+
IconOrShapeRenderer as dF,
|
|
21756
|
+
FocusTrap as dG,
|
|
21757
|
+
t$2 as dH,
|
|
21758
|
+
findDiagramEdge as dI,
|
|
21759
|
+
findDiagramNode as dJ,
|
|
21760
|
+
autoUpdate as dK,
|
|
21761
|
+
computePosition as dL,
|
|
21762
|
+
offset$2 as dM,
|
|
21763
|
+
autoPlacement as dN,
|
|
21764
|
+
size$1 as dO,
|
|
21765
|
+
hide$1 as dP,
|
|
21766
|
+
useOptionalCurrentViewModel as dQ,
|
|
21767
|
+
ButtonGroup as dR,
|
|
21768
|
+
EnsureCurrentViewModel as dS,
|
|
21769
|
+
useIsReducedGraphics as dT,
|
|
21770
|
+
usePanningAtom as dU,
|
|
21771
|
+
useTimeout as dV,
|
|
21772
|
+
useCustomCompareMemo as dW,
|
|
21773
|
+
useLikeC4Specification as dX,
|
|
21774
|
+
t$3 as dY,
|
|
21775
|
+
applyEdgeChanges as dZ,
|
|
21776
|
+
applyNodeChanges as d_,
|
|
21777
|
+
IconTransform as da,
|
|
21778
|
+
CompoundNodeContainer as db,
|
|
21779
|
+
CompoundTitle as dc,
|
|
21780
|
+
CompoundDetailsButton as dd,
|
|
21781
|
+
ElementTags as de,
|
|
21782
|
+
ElementDetailsButton as df,
|
|
21783
|
+
getDefaultExportFromCjs as dg,
|
|
21784
|
+
t$1 as dh,
|
|
21785
|
+
IconSelector as di,
|
|
21786
|
+
ReactFlowProvider as dj,
|
|
21787
|
+
useStoreApi as dk,
|
|
21788
|
+
useReactFlow as dl,
|
|
21789
|
+
Panel as dm,
|
|
21790
|
+
m as dn,
|
|
21791
|
+
Stack as dp,
|
|
21792
|
+
t$9 as dq,
|
|
21793
|
+
useSyncedRef as dr,
|
|
21794
|
+
IconRenderer as ds,
|
|
21795
|
+
useTimeoutEffect as dt,
|
|
21796
|
+
ReactRemoveScroll as du,
|
|
21797
|
+
ActionIconGroup as dv,
|
|
21798
|
+
IfEnabled as dw,
|
|
21799
|
+
DiagramFeatures as dx,
|
|
21800
|
+
t$5 as dy,
|
|
21801
|
+
customNode as dz,
|
|
21771
21802
|
em as e,
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21803
|
+
typedSystem as e0,
|
|
21804
|
+
centerXYInternalNode as e1,
|
|
21805
|
+
getBoundsOfRects as e2,
|
|
21806
|
+
boxToRect as e3,
|
|
21807
|
+
and as e4,
|
|
21808
|
+
AllDisabled as e5,
|
|
21809
|
+
nodeToRect as e6,
|
|
21810
|
+
activeSequenceBounds as e7,
|
|
21811
|
+
focusedBounds as e8,
|
|
21812
|
+
or as e9,
|
|
21813
|
+
IfNotReadOnly as eA,
|
|
21814
|
+
IfReadOnly as eB,
|
|
21815
|
+
useCustomCompareEffect as ea,
|
|
21816
|
+
DiagramActorContextProvider as eb,
|
|
21817
|
+
CurrentViewModelContext as ec,
|
|
21818
|
+
IconRendererProvider as ed,
|
|
21819
|
+
DiagramEventHandlers as ee,
|
|
21820
|
+
ReduceGraphicsContext as ef,
|
|
21821
|
+
RootContainer as eg,
|
|
21822
|
+
useMutationObserver as eh,
|
|
21823
|
+
shallowEqual$1 as ei,
|
|
21824
|
+
LikeC4ProjectsContext as ej,
|
|
21825
|
+
LikeC4ModelContext as ek,
|
|
21826
|
+
useLikeC4ViewModel as el,
|
|
21827
|
+
useHasProjects as em,
|
|
21828
|
+
useLikeC4Projects as en,
|
|
21829
|
+
useSetState as eo,
|
|
21830
|
+
CompoundActionButton as ep,
|
|
21831
|
+
DefaultHandles as eq,
|
|
21832
|
+
CompoundActions as er,
|
|
21833
|
+
CompoundDeploymentToolbar as es,
|
|
21834
|
+
CompoundDetailsButtonWithHandler as et,
|
|
21835
|
+
CompoundElementToolbar as eu,
|
|
21836
|
+
DeploymentElementActions as ev,
|
|
21837
|
+
DeploymentElementToolbar as ew,
|
|
21838
|
+
ElementToolbar as ex,
|
|
21839
|
+
Toolbar as ey,
|
|
21840
|
+
IfNotEnabled as ez,
|
|
21808
21841
|
getPrimaryContrastColor as f,
|
|
21809
21842
|
getPrimaryShade as g,
|
|
21810
21843
|
deepMerge as h,
|