likec4 1.25.0 → 1.26.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.
@@ -2,26 +2,12 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { LikeC4ModelProvider, LikeC4View as LikeC4View$1 } from "likec4/react";
5
+ import { LikeC4View as LikeC4View$1 } from "likec4:react";
6
6
  import { createRoot } from "react-dom/client";
7
- import { Icons } from "virtual:likec4/icons";
8
- import { likeC4Model } from "virtual:likec4/model";
9
7
  const ComponentName = {
10
8
  View: WEBCOMPONENT_PREFIX + "-view",
11
9
  Browser: WEBCOMPONENT_PREFIX + "-browser"
12
- }, RenderIcon = ({ node }) => {
13
- const IconComponent = Icons[node.icon ?? ""];
14
- return IconComponent ? /* @__PURE__ */ jsx(IconComponent, {}) : null;
15
10
  };
16
- function ReactLikeC4View(props) {
17
- return /* @__PURE__ */ jsx(LikeC4ModelProvider, { likec4model: likeC4Model, children: /* @__PURE__ */ jsx(
18
- LikeC4View$1,
19
- {
20
- renderIcon: RenderIcon,
21
- ...props
22
- }
23
- ) });
24
- }
25
11
  class LikeC4View extends HTMLElement {
26
12
  constructor() {
27
13
  super();
@@ -72,7 +58,7 @@ class LikeC4View extends HTMLElement {
72
58
  render() {
73
59
  const viewId = this.getAttribute("view-id") ?? "index", browser = (this.getAttribute("browser") ?? "true") !== "false";
74
60
  this.updateHostCss(), this.root ?? (this.root = createRoot(this.shadow)), this.root.render(
75
- /* @__PURE__ */ jsx(ReactLikeC4View, { viewId, browser })
61
+ /* @__PURE__ */ jsx(LikeC4View$1, { viewId, browser })
76
62
  );
77
63
  }
78
64
  // openBrowser(viewId?: ViewId) {