@likec4/diagram 1.28.1 → 1.29.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.
Files changed (30) hide show
  1. package/bundle/index.js +292 -258
  2. package/dist/_virtual/index.js +1 -1
  3. package/dist/base/primitives/customEdge.js +1 -1
  4. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +3 -0
  5. package/dist/base/primitives/edge/EdgeLabel.css.js +3 -0
  6. package/dist/base/primitives/edge/EdgeLabel.d.ts +1 -1
  7. package/dist/base/primitives/edge/EdgeLabel.js +2 -1
  8. package/dist/components/SearchControl.css.js +8 -2
  9. package/dist/hooks/safeContext.d.ts +2 -5
  10. package/dist/hooks/safeContext.js +2 -1
  11. package/dist/hooks/useDiagram.d.ts +711 -146
  12. package/dist/likec4diagram/ui/controls/Controls.js +3 -3
  13. package/dist/node_modules/.pnpm/{react@19.0.0 → react@19.1.0}/node_modules/react/cjs/react.production.js +14 -6
  14. package/dist/overlays/element-details/ElementDetails.js +1 -1
  15. package/dist/state/DiagramActorProvider.js +2 -2
  16. package/dist/state/diagram-machine.d.ts +715 -142
  17. package/dist/state/diagram-machine.js +48 -6
  18. package/dist/styles.css.js +1 -1
  19. package/package.json +15 -15
  20. package/src/LikeC4Diagram.tsx +0 -1
  21. package/src/base/primitives/customEdge.ts +1 -0
  22. package/src/base/primitives/edge/EdgeLabel.css.ts +3 -0
  23. package/src/base/primitives/edge/EdgeLabel.tsx +2 -1
  24. package/src/components/SearchControl.css.ts +7 -1
  25. package/src/hooks/safeContext.tsx +3 -1
  26. package/src/likec4diagram/ui/controls/Controls.tsx +3 -3
  27. package/src/overlays/element-details/ElementDetails.tsx +2 -2
  28. package/src/state/DiagramActorProvider.tsx +3 -3
  29. package/src/state/diagram-machine.ts +48 -5
  30. /package/dist/node_modules/.pnpm/{react@19.0.0 → react@19.1.0}/node_modules/react/index.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { cx } from '@likec4/styles/css';
2
3
  import { ActionIconGroup, Group, Stack, Box, Badge, Loader } from '@mantine/core';
3
4
  import { IconFileSymlink, IconFocusCentered, IconMenu2 } from '@tabler/icons-react';
4
- import { clsx } from 'clsx';
5
5
  import { m, LayoutGroup } from 'motion/react';
6
6
  import { r as reactExports } from '../../../_virtual/index.js';
7
7
  import { useControlsCustomLayout } from '../../../context/ControlsCustomLayout.js';
@@ -44,7 +44,7 @@ const ControlsDefaultLayout = ({
44
44
  translateY: -10
45
45
  },
46
46
  align: "flex-start",
47
- className: clsx(
47
+ className: cx(
48
48
  "react-flow__panel",
49
49
  panel,
50
50
  "likec4-top-left-panel"
@@ -56,7 +56,7 @@ const ControlsDefaultLayout = ({
56
56
  /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsxs(
57
57
  Group,
58
58
  {
59
- className: clsx(navigationButtons, "likec4-navigation-webview"),
59
+ className: cx(navigationButtons, "likec4-navigation-webview"),
60
60
  gap: "xs",
61
61
  children: [
62
62
  burgerMenu,
@@ -78,7 +78,7 @@ function requireReact_production () {
78
78
  assign(pureComponentPrototype, Component.prototype);
79
79
  pureComponentPrototype.isPureReactComponent = true;
80
80
  var isArrayImpl = Array.isArray,
81
- ReactSharedInternals = { H: null, A: null, T: null, S: null },
81
+ ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null },
82
82
  hasOwnProperty = Object.prototype.hasOwnProperty;
83
83
  function ReactElement(type, key, self, source, owner, props) {
84
84
  self = props.ref;
@@ -363,8 +363,11 @@ function requireReact_production () {
363
363
  react_production.Suspense = REACT_SUSPENSE_TYPE;
364
364
  react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
365
365
  ReactSharedInternals;
366
- react_production.act = function () {
367
- throw Error("act(...) is not supported in production builds of React.");
366
+ react_production.__COMPILER_RUNTIME = {
367
+ __proto__: null,
368
+ c: function (size) {
369
+ return ReactSharedInternals.H.useMemoCache(size);
370
+ }
368
371
  };
369
372
  react_production.cache = function (fn) {
370
373
  return function () {
@@ -497,8 +500,13 @@ function requireReact_production () {
497
500
  react_production.useDeferredValue = function (value, initialValue) {
498
501
  return ReactSharedInternals.H.useDeferredValue(value, initialValue);
499
502
  };
500
- react_production.useEffect = function (create, deps) {
501
- return ReactSharedInternals.H.useEffect(create, deps);
503
+ react_production.useEffect = function (create, createDeps, update) {
504
+ var dispatcher = ReactSharedInternals.H;
505
+ if ("function" === typeof update)
506
+ throw Error(
507
+ "useEffect CRUD overload is not enabled in this build of React."
508
+ );
509
+ return dispatcher.useEffect(create, createDeps);
502
510
  };
503
511
  react_production.useId = function () {
504
512
  return ReactSharedInternals.H.useId();
@@ -541,7 +549,7 @@ function requireReact_production () {
541
549
  react_production.useTransition = function () {
542
550
  return ReactSharedInternals.H.useTransition();
543
551
  };
544
- react_production.version = "19.0.0";
552
+ react_production.version = "19.1.0";
545
553
  return react_production;
546
554
  }
547
555
 
@@ -19,7 +19,7 @@ function ElementDetails({
19
19
  })),
20
20
  shallowEqual
21
21
  );
22
- return /* @__PURE__ */ jsx(ElementDetailsActorContext, { value: actorRef, children: /* @__PURE__ */ jsx(
22
+ return /* @__PURE__ */ jsx(ElementDetailsActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsx(
23
23
  ElementDetailsCard,
24
24
  {
25
25
  onClose,
@@ -6,7 +6,7 @@ import { shallowEqual } from 'fast-equals';
6
6
  import { r as reactExports } from '../_virtual/index.js';
7
7
  import { useDiagramEventHandlersRef } from '../context/DiagramEventHandlers.js';
8
8
  import { useEnabledFeatures, DiagramFeatures } from '../context/DiagramFeatures.js';
9
- import { DiagramActorSafeContext } from '../hooks/safeContext.js';
9
+ import { DiagramActorContextProvider } from '../hooks/safeContext.js';
10
10
  import { useUpdateEffect } from '../hooks/useUpdateEffect.js';
11
11
  import { useViewToNodesEdges } from '../likec4diagram/useViewToNodesEdges.js';
12
12
  import { diagramMachine } from './diagram-machine.js';
@@ -75,7 +75,7 @@ function DiagramActorProvider({
75
75
  actorRef.send({ type: "update.view", view, xyedges, xynodes });
76
76
  }, [view, xyedges, xynodes]);
77
77
  const toggledFeatures = useSelector(actorRef, selectToggledFeatures, shallowEqual);
78
- return /* @__PURE__ */ jsx(DiagramActorSafeContext, { value: actorRef, children: /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children }) });
78
+ return /* @__PURE__ */ jsx(DiagramActorContextProvider, { value: actorRef, children: /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children }) });
79
79
  }
80
80
 
81
81
  export { DiagramActorProvider };