integration-modules 0.0.7 → 0.0.9

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/dist/index.mjs CHANGED
@@ -19310,7 +19310,7 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19310
19310
  ) })
19311
19311
  }
19312
19312
  ) });
19313
- }), Ln = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), hm = () => {
19313
+ }), Ln = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), mm = () => {
19314
19314
  const e = $((s) => s.addSticker), r = $((s) => s.setStickers), n = he(null), [t, i] = Ce(() => Ln);
19315
19315
  return re(() => {
19316
19316
  (async () => {
@@ -19441,73 +19441,122 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19441
19441
  )) })
19442
19442
  ] }) })
19443
19443
  ] });
19444
- }, Nn = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), mm = ({ nodeTypes: e }) => {
19445
- const r = $((s) => s.setStickers), n = he(null), [t, i] = Ce(() => Nn);
19446
- async function a(s) {
19447
- if (W2 && W2[s])
19448
- return W2[s];
19444
+ }, Jh = (e) => {
19445
+ const { id: r, selected: n } = e, t = $(
19446
+ (o) => o.stickers.find((s) => String(s.id) === String(r))
19447
+ ), i = $((o) => o.bringToFront), a = $((o) => o.updateSticker);
19448
+ return !t || !t.imageUrl ? null : /* @__PURE__ */ Q(f2, { children: [
19449
+ /* @__PURE__ */ x(
19450
+ ln,
19451
+ {
19452
+ isVisible: n,
19453
+ minWidth: 30,
19454
+ minHeight: 30,
19455
+ onResizeEnd: async (o, s) => {
19456
+ const l = Math.max(1, Math.round(s.width)), c = Math.max(1, Math.round(s.height));
19457
+ a(r, { width: l, height: c });
19458
+ try {
19459
+ await G2.updateTransform(r, l, c);
19460
+ } catch (u) {
19461
+ console.warn("Не удалось сохранить размер эмодзи", u);
19462
+ }
19463
+ }
19464
+ }
19465
+ ),
19466
+ /* @__PURE__ */ x(pt, { type: "target", position: ht.Left }),
19467
+ /* @__PURE__ */ x(pt, { type: "source", position: ht.Right }),
19468
+ /* @__PURE__ */ x(
19469
+ "div",
19470
+ {
19471
+ className: "dragHandle__custom",
19472
+ style: { width: t.width, height: t.height, position: "relative" },
19473
+ onPointerDown: () => {
19474
+ i(r);
19475
+ },
19476
+ children: /* @__PURE__ */ x(
19477
+ "img",
19478
+ {
19479
+ src: t.imageUrl,
19480
+ draggable: !1,
19481
+ style: { width: "100%", height: "100%" }
19482
+ }
19483
+ )
19484
+ }
19485
+ )
19486
+ ] });
19487
+ }, em = {
19488
+ emoji: Jh
19489
+ }, Nn = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), gm = ({ nodeTypes: e }) => {
19490
+ const r = $((l) => l.setStickers), n = he(null), [t, i] = Ce(() => Nn), a = {
19491
+ ...em,
19492
+ ...e || {}
19493
+ };
19494
+ async function o(l) {
19495
+ if (W2 && W2[l])
19496
+ return W2[l];
19449
19497
  try {
19450
- const l = await G2.getById(s);
19451
- if (l?.name) {
19452
- const c = fo.find((u) => u.name === l.name);
19453
- if (c)
19454
- return c.url;
19498
+ const c = await G2.getById(l);
19499
+ if (c?.name) {
19500
+ const u = fo.find((d) => d.name === c.name);
19501
+ if (u)
19502
+ return u.url;
19455
19503
  }
19456
- } catch (l) {
19457
- console.warn("getEmojiUrlForStickerId: backend lookup failed", l);
19504
+ } catch (c) {
19505
+ console.warn("getEmojiUrlForStickerId: backend lookup failed", c);
19458
19506
  }
19459
19507
  return "";
19460
19508
  }
19461
19509
  return re(() => {
19462
19510
  (async () => {
19463
19511
  try {
19464
- const l = await G2.getBoard();
19465
- let c = 30, u = 30;
19466
- const d = [];
19467
- for (const p of l) {
19468
- const f = p.width ?? K0, h = p.height ?? X0;
19469
- let C = W2?.[String(p.stickerId)] ?? "";
19470
- if (!C)
19512
+ const c = await G2.getBoard();
19513
+ let u = 30, d = 30;
19514
+ const p = [];
19515
+ for (const f of c) {
19516
+ const h = f.width ?? K0, C = f.height ?? X0;
19517
+ let m = W2?.[String(f.stickerId)] ?? "";
19518
+ if (!m)
19471
19519
  try {
19472
- C = await a(p.stickerId);
19473
- } catch (m) {
19474
- console.warn("Ошибка при получении локального url для stickerId", p.stickerId, m), C = "";
19520
+ m = await o(f.stickerId);
19521
+ } catch (g) {
19522
+ console.warn("Ошибка при получении локального url для stickerId", f.stickerId, g), m = "";
19475
19523
  }
19476
- d.push({
19477
- id: p.id,
19478
- x: c,
19479
- y: u,
19524
+ p.push({
19525
+ id: f.id,
19526
+ x: u,
19527
+ y: d,
19480
19528
  color: "transparent",
19481
- width: f,
19482
- height: h,
19529
+ width: h,
19530
+ height: C,
19483
19531
  text: "",
19484
19532
  zIndex: 1,
19485
- stickerId: p.stickerId,
19486
- imageUrl: C
19487
- }), c += 24, u += 24;
19533
+ stickerId: f.stickerId,
19534
+ imageUrl: m,
19535
+ type: "emoji"
19536
+ }), u += 24, d += 24;
19488
19537
  }
19489
- r(d);
19490
- } catch (l) {
19491
- console.warn("Не удалось загрузить доску для эмодзи:", l);
19538
+ r(p);
19539
+ } catch (c) {
19540
+ console.warn("Не удалось загрузить доску для эмодзи:", c);
19492
19541
  }
19493
19542
  })();
19494
19543
  }, [r]), re(() => {
19495
- let s = !0;
19496
- return import("@xyflow/react").then((l) => {
19497
- if (!s)
19544
+ let l = !0;
19545
+ return import("@xyflow/react").then((c) => {
19546
+ if (!l)
19498
19547
  return;
19499
- const c = (l && (l.Widget || l.default || l?.widget || l?.XyflowWidget)) ?? null;
19500
- typeof c == "function" || E.isValidElement(c) ? i(() => c) : i(() => Nn);
19548
+ const u = (c && (c.Widget || c.default || c?.widget || c?.XyflowWidget)) ?? null;
19549
+ typeof u == "function" || E.isValidElement(u) ? i(() => u) : i(() => Nn);
19501
19550
  }).catch(() => {
19502
- s && i(() => Nn);
19551
+ l && i(() => Nn);
19503
19552
  }), () => {
19504
- s = !1;
19553
+ l = !1;
19505
19554
  };
19506
19555
  }, []), /* @__PURE__ */ x(t || Nn, { children: /* @__PURE__ */ Q("div", { className: "relative flex h-screen w-screen bg-gray-100", children: [
19507
19556
  /* @__PURE__ */ x(Xh, {}),
19508
- /* @__PURE__ */ x(gn, { ref: n, nodeTypes: e })
19557
+ /* @__PURE__ */ x(gn, { ref: n, nodeTypes: a })
19509
19558
  ] }) });
19510
- }, Jh = {
19559
+ }, tm = {
19511
19560
  square: /* @__PURE__ */ x("svg", { width: "40", height: "40", children: /* @__PURE__ */ x("rect", { x: "4", y: "4", width: "32", height: "32", stroke: "black", fill: "none", strokeWidth: "2" }) }),
19512
19561
  circle: /* @__PURE__ */ x("svg", { width: "40", height: "40", children: /* @__PURE__ */ x("circle", { cx: "20", cy: "20", r: "14", stroke: "black", fill: "none", strokeWidth: "2" }) }),
19513
19562
  triangle: /* @__PURE__ */ x("svg", { width: "40", height: "40", children: /* @__PURE__ */ x("polygon", { points: "20,6 34,34 6,34", stroke: "black", fill: "none", strokeWidth: "2" }) }),
@@ -19569,7 +19618,7 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19569
19618
  /* @__PURE__ */ x("line", { x1: "14", y1: "16", x2: "36", y2: "16", stroke: "black", strokeWidth: "2" }),
19570
19619
  /* @__PURE__ */ x("line", { x1: "14", y1: "28", x2: "36", y2: "28", stroke: "black", strokeWidth: "2" })
19571
19620
  ] })
19572
- }, em = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", tm = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", nm = () => {
19621
+ }, nm = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", rm = "data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%201.5H47C47.8284%201.5%2048.5%202.17157%2048.5%203V47C48.5%2047.8284%2047.8284%2048.5%2047%2048.5H3C2.17157%2048.5%201.5%2047.8284%201.5%2047V3C1.5%202.17157%202.17157%201.5%203%201.5Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", im = () => {
19573
19622
  const [e, r] = Ce(!1), n = he(null), t = (a) => {
19574
19623
  a.stopPropagation(), r((o) => !o);
19575
19624
  };
@@ -19584,7 +19633,7 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19584
19633
  o.stopPropagation(), o.dataTransfer.setData(l0, JSON.stringify({ shapeId: a.id })), o.dataTransfer.effectAllowed = "copy";
19585
19634
  };
19586
19635
  return /* @__PURE__ */ Q("div", { className: "left-toolbar-container dragHandle__custom", ref: n, onClick: (a) => a.stopPropagation(), children: [
19587
- /* @__PURE__ */ x("div", { className: `toolbar-card ${e ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ x("button", { onClick: t, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${e ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ x("div", { className: `toolbar-shape-plate ${e ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ x("img", { src: e ? tm : em, alt: "Фигуры", draggable: !1 }) }) }) }),
19636
+ /* @__PURE__ */ x("div", { className: `toolbar-card ${e ? "toolbar-card--open" : ""}`, children: /* @__PURE__ */ x("button", { onClick: t, className: `toolbar-btn toolbar-btn--icon toolbar-btn--shape ${e ? "toolbar-btn--active" : ""}`, children: /* @__PURE__ */ x("div", { className: `toolbar-shape-plate ${e ? "toolbar-shape-plate--active" : ""}`, children: /* @__PURE__ */ x("img", { src: e ? rm : nm, alt: "Фигуры", draggable: !1 }) }) }) }),
19588
19637
  e && /* @__PURE__ */ x("div", { className: "palette-wrapper", onClick: (a) => a.stopPropagation(), children: /* @__PURE__ */ x("div", { className: "shape-panel", children: /* @__PURE__ */ x("div", { className: "shape-grid", children: po.map((a) => /* @__PURE__ */ x(
19589
19638
  "button",
19590
19639
  {
@@ -19592,12 +19641,12 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19592
19641
  draggable: !0,
19593
19642
  onDragStart: i(a),
19594
19643
  title: a.name,
19595
- children: Jh[a.id]
19644
+ children: tm[a.id]
19596
19645
  },
19597
19646
  a.id
19598
19647
  )) }) }) })
19599
19648
  ] });
19600
- }, Fn = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), gm = () => {
19649
+ }, Fn = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), Cm = () => {
19601
19650
  const e = $((a) => a.setStickers), r = he(null), [n, t] = Ce(() => Fn);
19602
19651
  return re(() => {
19603
19652
  (async () => {
@@ -19643,10 +19692,10 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19643
19692
  a = !1;
19644
19693
  };
19645
19694
  }, []), /* @__PURE__ */ x(n || Fn, { children: /* @__PURE__ */ Q("div", { className: "relative flex h-screen w-screen bg-gray-100", children: [
19646
- /* @__PURE__ */ x(nm, {}),
19695
+ /* @__PURE__ */ x(im, {}),
19647
19696
  /* @__PURE__ */ x(gn, { ref: r })
19648
19697
  ] }) });
19649
- }, rm = "data:image/svg+xml,%3csvg%20width='52'%20height='51'%20viewBox='0%200%2052%2051'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%2049.0548V1.50049'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M14.0801%2034.3356L1.5%201.50049'%20stroke='black'%20stroke-width='3'/%3e%3cpath%20d='M14.0801%2034.3356L26.6602%201.50049'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M26.6602%201.50049V49.0548'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M50%2025.2776C50%2031.5634%2047.7786%2037.5611%2043.8701%2041.9583C40.3263%2045.945%2035.6696%2048.3122%2030.7773%2048.7151L30.7773%201.84009C35.6696%202.243%2040.3263%204.61018%2043.8701%208.59692C47.7786%2012.9941%2050%2018.9918%2050%2025.2776Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", im = "data:image/svg+xml,%3csvg%20width='52'%20height='51'%20viewBox='0%200%2052%2051'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%2049.0548V1.50049'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M14.0801%2034.3356L1.5%201.50049'%20stroke='%230000FF'%20stroke-width='3'/%3e%3cpath%20d='M14.0801%2034.3356L26.6602%201.50049'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M26.6602%201.50049V49.0548'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M50%2025.2776C50%2031.5634%2047.7786%2037.5611%2043.8701%2041.9583C40.3263%2045.945%2035.6696%2048.3122%2030.7773%2048.7151L30.7773%201.84009C35.6696%202.243%2040.3263%204.61018%2043.8701%208.59692C47.7786%2012.9941%2050%2018.9918%2050%2025.2776Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", am = () => {
19698
+ }, am = "data:image/svg+xml,%3csvg%20width='52'%20height='51'%20viewBox='0%200%2052%2051'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%2049.0548V1.50049'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M14.0801%2034.3356L1.5%201.50049'%20stroke='black'%20stroke-width='3'/%3e%3cpath%20d='M14.0801%2034.3356L26.6602%201.50049'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M26.6602%201.50049V49.0548'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M50%2025.2776C50%2031.5634%2047.7786%2037.5611%2043.8701%2041.9583C40.3263%2045.945%2035.6696%2048.3122%2030.7773%2048.7151L30.7773%201.84009C35.6696%202.243%2040.3263%204.61018%2043.8701%208.59692C47.7786%2012.9941%2050%2018.9918%2050%2025.2776Z'%20stroke='black'%20stroke-width='3'/%3e%3c/svg%3e", om = "data:image/svg+xml,%3csvg%20width='52'%20height='51'%20viewBox='0%200%2052%2051'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%2049.0548V1.50049'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M14.0801%2034.3356L1.5%201.50049'%20stroke='%230000FF'%20stroke-width='3'/%3e%3cpath%20d='M14.0801%2034.3356L26.6602%201.50049'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M26.6602%201.50049V49.0548'%20stroke='%230000FF'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M50%2025.2776C50%2031.5634%2047.7786%2037.5611%2043.8701%2041.9583C40.3263%2045.945%2035.6696%2048.3122%2030.7773%2048.7151L30.7773%201.84009C35.6696%202.243%2040.3263%204.61018%2043.8701%208.59692C47.7786%2012.9941%2050%2018.9918%2050%2025.2776Z'%20stroke='%230000FF'%20stroke-width='3'/%3e%3c/svg%3e", sm = () => {
19650
19699
  const [e, r] = Ce(!1), n = $((a) => a.addSticker), t = $((a) => a.topZ);
19651
19700
  return /* @__PURE__ */ x("div", { className: "left-toolbar-container", onClick: (a) => a.stopPropagation(), children: /* @__PURE__ */ x("div", { className: "toolbar-card", children: /* @__PURE__ */ x(
19652
19701
  "button",
@@ -19688,14 +19737,14 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19688
19737
  children: /* @__PURE__ */ x("div", { className: `toolbar-markdown-plate ${e ? "toolbar-markdown-plate--active" : ""}`, children: /* @__PURE__ */ x(
19689
19738
  "img",
19690
19739
  {
19691
- src: e ? im : rm,
19740
+ src: e ? om : am,
19692
19741
  alt: "Markdown",
19693
19742
  draggable: !1
19694
19743
  }
19695
19744
  ) })
19696
19745
  }
19697
19746
  ) }) });
19698
- }, On = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), Cm = () => {
19747
+ }, On = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), wm = () => {
19699
19748
  const e = $((a) => a.setStickers), r = he(null), [n, t] = Ce(() => On);
19700
19749
  return re(() => {
19701
19750
  (async () => {
@@ -19735,10 +19784,10 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19735
19784
  a = !1;
19736
19785
  };
19737
19786
  }, []), /* @__PURE__ */ x(n || On, { children: /* @__PURE__ */ Q("div", { className: "relative flex h-screen w-screen bg-gray-100", children: [
19738
- /* @__PURE__ */ x(am, { createInCenter: () => ({ x: 300, y: 200 }) }),
19787
+ /* @__PURE__ */ x(sm, { createInCenter: () => ({ x: 300, y: 200 }) }),
19739
19788
  /* @__PURE__ */ x(gn, { ref: r })
19740
19789
  ] }) });
19741
- }, om = "data:image/svg+xml,%3csvg%20width='57'%20height='45'%20viewBox='0%200%2057%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.1%2023.36H1V44H49.06L55%2033.1067L49.06%2023.36H41.5M9.1%2023.36V18.2M9.1%2023.36H25.3M25.3%2023.36V14.76M25.3%2023.36H41.5M41.5%2023.36V11.32M41.5%2011.32V1H55L51.22%206.16L55%2011.32H41.5Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M22.5999%2033.6799L16.6599%2043.9999H32.8599L38.7999%2033.6799L32.8599%2023.3599H16.6599L22.5999%2033.6799Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e", sm = "data:image/svg+xml,%3csvg%20width='57'%20height='45'%20viewBox='0%200%2057%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.1%2023.36H1V44H49.06L55%2033.1067L49.06%2023.36H41.5M9.1%2023.36V18.2M9.1%2023.36H25.3M25.3%2023.36V14.76M25.3%2023.36H41.5M41.5%2023.36V11.32M41.5%2011.32V1H55L51.22%206.16L55%2011.32H41.5Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M22.5999%2033.6799L16.6599%2043.9999H32.8599L38.7999%2033.6799L32.8599%2023.3599H16.6599L22.5999%2033.6799Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e", lm = () => {
19790
+ }, lm = "data:image/svg+xml,%3csvg%20width='57'%20height='45'%20viewBox='0%200%2057%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.1%2023.36H1V44H49.06L55%2033.1067L49.06%2023.36H41.5M9.1%2023.36V18.2M9.1%2023.36H25.3M25.3%2023.36V14.76M25.3%2023.36H41.5M41.5%2023.36V11.32M41.5%2011.32V1H55L51.22%206.16L55%2011.32H41.5Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M22.5999%2033.6799L16.6599%2043.9999H32.8599L38.7999%2033.6799L32.8599%2023.3599H16.6599L22.5999%2033.6799Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e", cm = "data:image/svg+xml,%3csvg%20width='57'%20height='45'%20viewBox='0%200%2057%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.1%2023.36H1V44H49.06L55%2033.1067L49.06%2023.36H41.5M9.1%2023.36V18.2M9.1%2023.36H25.3M25.3%2023.36V14.76M25.3%2023.36H41.5M41.5%2023.36V11.32M41.5%2011.32V1H55L51.22%206.16L55%2011.32H41.5Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M22.5999%2033.6799L16.6599%2043.9999H32.8599L38.7999%2033.6799L32.8599%2023.3599H16.6599L22.5999%2033.6799Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M25.3003%209.45337C26.4817%209.45351%2027.5405%2010.489%2027.5405%2011.8938C27.5403%2013.2983%2026.4816%2014.3331%2025.3003%2014.3333C24.1189%2014.3333%2023.0603%2013.2984%2023.0601%2011.8938C23.0601%2010.4889%2024.1188%209.45337%2025.3003%209.45337Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M9.10028%2012.8933C10.2817%2012.8934%2011.3405%2013.929%2011.3405%2015.3337C11.3403%2016.7383%2010.2816%2017.7731%209.10028%2017.7732C7.91887%2017.7732%206.86026%2016.7384%206.86005%2015.3337C6.86005%2013.9289%207.91875%2012.8933%209.10028%2012.8933Z'%20stroke='black'%20stroke-width='2'/%3e%3c/svg%3e", um = () => {
19742
19791
  const [e, r] = Ce(!1), n = $((a) => a.addSticker), t = $((a) => a.topZ);
19743
19792
  return /* @__PURE__ */ x("div", { className: "left-toolbar-container", onClick: (a) => a.stopPropagation(), children: /* @__PURE__ */ x("div", { className: "toolbar-card", children: /* @__PURE__ */ x(
19744
19793
  "button",
@@ -19786,14 +19835,14 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19786
19835
  children: /* @__PURE__ */ x("div", { className: `toolbar-markdown-plate ${e ? "toolbar-markdown-plate--active" : ""}`, children: /* @__PURE__ */ x(
19787
19836
  "img",
19788
19837
  {
19789
- src: e ? sm : om,
19838
+ src: e ? cm : lm,
19790
19839
  alt: "Roadmap",
19791
19840
  draggable: !1
19792
19841
  }
19793
19842
  ) })
19794
19843
  }
19795
19844
  ) }) });
19796
- }, An = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), wm = () => {
19845
+ }, An = ({ children: e }) => /* @__PURE__ */ x("div", { children: e }), ym = () => {
19797
19846
  const e = $((o) => o.setStickers), r = $((o) => o.setEdges), n = he(null), [t, i] = Ce(() => An);
19798
19847
  return re(() => {
19799
19848
  (async () => {
@@ -19842,63 +19891,18 @@ const gn = Pl(({ nodeTypes: e }, r) => {
19842
19891
  o = !1;
19843
19892
  };
19844
19893
  }, []), /* @__PURE__ */ x(t || An, { children: /* @__PURE__ */ Q("div", { className: "relative flex h-screen w-screen bg-gray-100", children: [
19845
- /* @__PURE__ */ x(lm, { createInCenter: () => ({ x: 300, y: 200 }) }),
19894
+ /* @__PURE__ */ x(um, { createInCenter: () => ({ x: 300, y: 200 }) }),
19846
19895
  /* @__PURE__ */ x(gn, { ref: n })
19847
19896
  ] }) });
19848
- }, cm = (e) => {
19849
- const { id: r, selected: n } = e, t = $(
19850
- (o) => o.stickers.find((s) => String(s.id) === String(r))
19851
- ), i = $((o) => o.bringToFront), a = $((o) => o.updateSticker);
19852
- return !t || !t.imageUrl ? null : /* @__PURE__ */ Q(f2, { children: [
19853
- /* @__PURE__ */ x(
19854
- ln,
19855
- {
19856
- isVisible: n,
19857
- minWidth: 30,
19858
- minHeight: 30,
19859
- onResizeEnd: async (o, s) => {
19860
- const l = Math.max(1, Math.round(s.width)), c = Math.max(1, Math.round(s.height));
19861
- a(r, { width: l, height: c });
19862
- try {
19863
- await G2.updateTransform(r, l, c);
19864
- } catch (u) {
19865
- console.warn("Не удалось сохранить размер эмодзи", u);
19866
- }
19867
- }
19868
- }
19869
- ),
19870
- /* @__PURE__ */ x(pt, { type: "target", position: ht.Left }),
19871
- /* @__PURE__ */ x(pt, { type: "source", position: ht.Right }),
19872
- /* @__PURE__ */ x(
19873
- "div",
19874
- {
19875
- className: "dragHandle__custom",
19876
- style: { width: t.width, height: t.height, position: "relative" },
19877
- onPointerDown: () => {
19878
- i(r);
19879
- },
19880
- children: /* @__PURE__ */ x(
19881
- "img",
19882
- {
19883
- src: t.imageUrl,
19884
- draggable: !1,
19885
- style: { width: "100%", height: "100%" }
19886
- }
19887
- )
19888
- }
19889
- )
19890
- ] });
19891
- }, ym = {
19892
- emoji: cm
19893
19897
  };
19894
19898
  export {
19895
19899
  gn as Board,
19896
- mm as EmojiBoardWidget,
19897
- Cm as MarkdownBoardWidget,
19898
- hm as NoteBoardWidget,
19899
- wm as RoadmapBoardWidget,
19900
- gm as ShapeBoardWidget,
19900
+ gm as EmojiBoardWidget,
19901
+ wm as MarkdownBoardWidget,
19902
+ mm as NoteBoardWidget,
19903
+ ym as RoadmapBoardWidget,
19904
+ Cm as ShapeBoardWidget,
19901
19905
  Wa as baseNodeTypes,
19902
- ym as emojiNodeTypes
19906
+ em as emojiNodeTypes
19903
19907
  };
19904
19908
  //# sourceMappingURL=index.mjs.map