@likec4/diagram 1.36.0 → 1.36.1

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.
@@ -16200,6 +16200,9 @@ function useIsPanning() {
16200
16200
  return useStore(usePanningAtom());
16201
16201
  }
16202
16202
  const LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
16203
+ function EnsureCurrentViewModel({ children: children2 }) {
16204
+ return useContext(CurrentViewModelContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
16205
+ }
16203
16206
  function useLikeC4Model() {
16204
16207
  const model = useContext(LikeC4ModelContext);
16205
16208
  if (!model)
@@ -20619,6 +20622,9 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
20619
20622
  }
20620
20623
  );
20621
20624
  }
20625
+ function useOptionalCurrentViewModel() {
20626
+ return useContext(CurrentViewModelContext);
20627
+ }
20622
20628
  function useCurrentViewModel() {
20623
20629
  const vm = useContext(CurrentViewModelContext);
20624
20630
  if (!vm)
@@ -21741,7 +21747,7 @@ export {
21741
21747
  bezierControlPoints as cy,
21742
21748
  bezierPath as cz,
21743
21749
  alpha$1 as d,
21744
- CurrentViewModelContext as d$,
21750
+ useCustomCompareEffect as d$,
21745
21751
  useActorRef as d0,
21746
21752
  useUpdateEffect$1 as d1,
21747
21753
  getBezierPath as d2,
@@ -21758,27 +21764,27 @@ export {
21758
21764
  IconOrShapeRenderer as dD,
21759
21765
  FocusTrap as dE,
21760
21766
  t$3 as dF,
21761
- ButtonGroup as dG,
21762
- useIsReducedGraphics as dH,
21763
- usePanningAtom as dI,
21764
- useTimeout as dJ,
21765
- useCustomCompareMemo as dK,
21766
- useLikeC4Specification as dL,
21767
- r as dM,
21768
- applyEdgeChanges as dN,
21769
- applyNodeChanges as dO,
21770
- getViewportForBounds as dP,
21771
- typedSystem as dQ,
21772
- centerXYInternalNode as dR,
21773
- getBoundsOfRects as dS,
21774
- boxToRect as dT,
21775
- and as dU,
21776
- AllDisabled as dV,
21777
- focusedBounds as dW,
21778
- or as dX,
21779
- nodeToRect as dY,
21780
- useCustomCompareEffect as dZ,
21781
- DiagramActorContextProvider as d_,
21767
+ useOptionalCurrentViewModel as dG,
21768
+ ButtonGroup as dH,
21769
+ EnsureCurrentViewModel as dI,
21770
+ useIsReducedGraphics as dJ,
21771
+ usePanningAtom as dK,
21772
+ useTimeout as dL,
21773
+ useCustomCompareMemo as dM,
21774
+ useLikeC4Specification as dN,
21775
+ r as dO,
21776
+ applyEdgeChanges as dP,
21777
+ applyNodeChanges as dQ,
21778
+ getViewportForBounds as dR,
21779
+ typedSystem as dS,
21780
+ centerXYInternalNode as dT,
21781
+ getBoundsOfRects as dU,
21782
+ boxToRect as dV,
21783
+ and as dW,
21784
+ AllDisabled as dX,
21785
+ focusedBounds as dY,
21786
+ or as dZ,
21787
+ nodeToRect as d_,
21782
21788
  ElementTitle as da,
21783
21789
  ElementTags as db,
21784
21790
  ElementDetailsButton as dc,
@@ -21805,30 +21811,32 @@ export {
21805
21811
  useReducedMotionConfig as dy,
21806
21812
  Overlay as dz,
21807
21813
  em as e,
21808
- IconRendererProvider as e0,
21809
- DiagramEventHandlers as e1,
21810
- ReduceGraphicsContext as e2,
21811
- RootContainer as e3,
21812
- useMutationObserver as e4,
21813
- shallowEqual$1 as e5,
21814
- useLikeC4ViewModel as e6,
21815
- useSetState as e7,
21816
- CompoundActionButton as e8,
21817
- CompoundDetailsButton as e9,
21818
- DefaultHandles as ea,
21819
- CompoundActions as eb,
21820
- CompoundDeploymentToolbar as ec,
21821
- CompoundDetailsButtonWithHandler as ed,
21822
- CompoundElementToolbar as ee,
21823
- DeploymentElementActions as ef,
21824
- DeploymentElementToolbar as eg,
21825
- ElementActions as eh,
21826
- ElementDetailsButtonWithHandler as ei,
21827
- ElementToolbar as ej,
21828
- Toolbar as ek,
21829
- IfNotEnabled as el,
21830
- IfNotReadOnly as em,
21831
- IfReadOnly as en,
21814
+ DiagramActorContextProvider as e0,
21815
+ CurrentViewModelContext as e1,
21816
+ IconRendererProvider as e2,
21817
+ DiagramEventHandlers as e3,
21818
+ ReduceGraphicsContext as e4,
21819
+ RootContainer as e5,
21820
+ useMutationObserver as e6,
21821
+ shallowEqual$1 as e7,
21822
+ useLikeC4ViewModel as e8,
21823
+ useSetState as e9,
21824
+ CompoundActionButton as ea,
21825
+ CompoundDetailsButton as eb,
21826
+ DefaultHandles as ec,
21827
+ CompoundActions as ed,
21828
+ CompoundDeploymentToolbar as ee,
21829
+ CompoundDetailsButtonWithHandler as ef,
21830
+ CompoundElementToolbar as eg,
21831
+ DeploymentElementActions as eh,
21832
+ DeploymentElementToolbar as ei,
21833
+ ElementActions as ej,
21834
+ ElementDetailsButtonWithHandler as ek,
21835
+ ElementToolbar as el,
21836
+ Toolbar as em,
21837
+ IfNotEnabled as en,
21838
+ IfNotReadOnly as eo,
21839
+ IfReadOnly as ep,
21832
21840
  getPrimaryContrastColor as f,
21833
21841
  getPrimaryShade as g,
21834
21842
  deepMerge as h,
package/bundle/custom.js CHANGED
@@ -1,5 +1,5 @@
1
- import { d5 as customNode, e6 as useLikeC4ViewModel } from "./chunk-7MPUJFHj.js";
2
- import { e8, eb, cB, ec, e9, ed, cC, ee, d6, d7, ea, ef, eg, cD, d3, eh, dc, ei, cE, d8, d9, cU, db, da, ej, dD, dr, e0, cq, el, em, en, cV, dz, ek, cA, cQ, c$, c3, c_, c2, cm, cl, cb, dL, c4, e7, be, cu, cw, dx, b8 } from "./chunk-7MPUJFHj.js";
1
+ import { d5 as customNode, e8 as useLikeC4ViewModel } from "./chunk-DHvr-RGh.js";
2
+ import { ea, ed, cB, ee, eb, ef, cC, eg, d6, d7, ec, eh, ei, cD, d3, ej, dc, ek, cE, d8, d9, cU, db, da, el, dD, dr, e2, cq, en, eo, ep, cV, dz, em, cA, cQ, c$, c3, c_, c2, cm, cl, cb, dN, c4, e9, be, cu, cw, dx, b8 } from "./chunk-DHvr-RGh.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  function customDiagramNode(Node) {
5
5
  return customNode((props) => {
@@ -12,41 +12,41 @@ function customDiagramNode(Node) {
12
12
  }
13
13
  const elementNode = customDiagramNode, deploymentNode = customDiagramNode, compoundElementNode = customDiagramNode, compoundDeploymentNode = customDiagramNode, viewGroupNode = customDiagramNode;
14
14
  export {
15
- e8 as CompoundActionButton,
16
- eb as CompoundActions,
15
+ ea as CompoundActionButton,
16
+ ed as CompoundActions,
17
17
  cB as CompoundDeploymentNode,
18
- ec as CompoundDeploymentToolbar,
19
- e9 as CompoundDetailsButton,
20
- ed as CompoundDetailsButtonWithHandler,
18
+ ee as CompoundDeploymentToolbar,
19
+ eb as CompoundDetailsButton,
20
+ ef as CompoundDetailsButtonWithHandler,
21
21
  cC as CompoundElementNode,
22
- ee as CompoundElementToolbar,
22
+ eg as CompoundElementToolbar,
23
23
  d6 as CompoundNodeContainer,
24
24
  d7 as CompoundTitle,
25
- ea as DefaultHandles,
26
- ef as DeploymentElementActions,
27
- eg as DeploymentElementToolbar,
25
+ ec as DefaultHandles,
26
+ eh as DeploymentElementActions,
27
+ ei as DeploymentElementToolbar,
28
28
  cD as DeploymentNode,
29
29
  d3 as ElementActionButtons,
30
- eh as ElementActions,
30
+ ej as ElementActions,
31
31
  dc as ElementDetailsButton,
32
- ei as ElementDetailsButtonWithHandler,
32
+ ek as ElementDetailsButtonWithHandler,
33
33
  cE as ElementNode,
34
34
  d8 as ElementNodeContainer,
35
35
  d9 as ElementShape,
36
36
  cU as ElementTag,
37
37
  db as ElementTags,
38
38
  da as ElementTitle,
39
- ej as ElementToolbar,
39
+ el as ElementToolbar,
40
40
  dD as IconOrShapeRenderer,
41
41
  dr as IconRenderer,
42
- e0 as IconRendererProvider,
42
+ e2 as IconRendererProvider,
43
43
  cq as IfEnabled,
44
- el as IfNotEnabled,
45
- em as IfNotReadOnly,
46
- en as IfReadOnly,
44
+ en as IfNotEnabled,
45
+ eo as IfNotReadOnly,
46
+ ep as IfReadOnly,
47
47
  cV as MarkdownBlock,
48
48
  dz as Overlay,
49
- ek as Toolbar,
49
+ em as Toolbar,
50
50
  cA as ViewGroupNode,
51
51
  compoundDeploymentNode,
52
52
  compoundElementNode,
@@ -60,10 +60,10 @@ export {
60
60
  cm as useDiagramEventHandlers,
61
61
  cl as useEnabledFeatures,
62
62
  cb as useLikeC4Model,
63
- dL as useLikeC4Specification,
63
+ dN as useLikeC4Specification,
64
64
  useLikeC4ViewModel,
65
65
  c4 as useMantinePortalProps,
66
- e7 as useSetState,
66
+ e9 as useSetState,
67
67
  be as useUpdateEffect,
68
68
  cu as useXYFlow,
69
69
  cw as useXYInternalNode,