@layers-app/editor 0.7.44 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.Bt5BEQ6h.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.CsTbIH2o.js → layers.BtvuN20E.js} +8988 -9641
  7. package/dist/{layers.8AV9TJ5y.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.BPwGnx6H.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D5EnJuSD.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +1 -1
  15. package/dist/layers.03rOzGz6.js +0 -1
  16. package/dist/layers.2ki87-LU.js +0 -5
  17. package/dist/layers.2o06iRgp.js +0 -504
  18. package/dist/layers.52famHy6.js +0 -1
  19. package/dist/layers.5oOWOsbG.js +0 -39
  20. package/dist/layers.7JqFgE4-.js +0 -15
  21. package/dist/layers.8KaGKAU3.js +0 -271
  22. package/dist/layers.9URcRock.js +0 -1
  23. package/dist/layers.9pNaFvaX.js +0 -1
  24. package/dist/layers.B-dneuft.js +0 -373
  25. package/dist/layers.B19hGmey.js +0 -1
  26. package/dist/layers.B1fchoGW.js +0 -1
  27. package/dist/layers.B2cspFhx.js +0 -1034
  28. package/dist/layers.B3D4g2HH.js +0 -1
  29. package/dist/layers.B6soS223.js +0 -8
  30. package/dist/layers.B780IvgC.js +0 -84
  31. package/dist/layers.B7K7JjK6.js +0 -1510
  32. package/dist/layers.B9UunCzG.js +0 -39
  33. package/dist/layers.B9rQcczY.js +0 -14
  34. package/dist/layers.BAtv1CM7.js +0 -1
  35. package/dist/layers.BBcDfITy.js +0 -40
  36. package/dist/layers.BBhmfZot.js +0 -39
  37. package/dist/layers.BDqHBDOj.js +0 -9
  38. package/dist/layers.BFRbDTjY.js +0 -160
  39. package/dist/layers.BIUiVID4.js +0 -10
  40. package/dist/layers.BIeVwYKL.js +0 -1
  41. package/dist/layers.BJDrjORS.js +0 -244
  42. package/dist/layers.BKamPs3H.js +0 -1
  43. package/dist/layers.BLd2spTm.js +0 -1
  44. package/dist/layers.BMWMvKH-.js +0 -806
  45. package/dist/layers.BMxAun-L.js +0 -6
  46. package/dist/layers.BOMgDmQW.js +0 -1
  47. package/dist/layers.BQX_W7-N.js +0 -41
  48. package/dist/layers.BRBbDnyO.js +0 -32
  49. package/dist/layers.BRU1WOyl.js +0 -65
  50. package/dist/layers.BSTBZrFn.js +0 -1
  51. package/dist/layers.BUP7J0N1.js +0 -198
  52. package/dist/layers.BWYHKKSc.js +0 -9
  53. package/dist/layers.B_5Gf5vh.js +0 -7
  54. package/dist/layers.BbCfEXyj.js +0 -55
  55. package/dist/layers.Be7sKoi1.js +0 -36
  56. package/dist/layers.BewWHVmc.js +0 -10
  57. package/dist/layers.Bhbf4Voy.js +0 -1286
  58. package/dist/layers.BhgyYcry.js +0 -2966
  59. package/dist/layers.BjqXvHbh.js +0 -38
  60. package/dist/layers.Bl153Elb.js +0 -772
  61. package/dist/layers.BlVr0EB6.js +0 -35
  62. package/dist/layers.BmBx-JQP.js +0 -9
  63. package/dist/layers.BnDdlKo4.js +0 -39
  64. package/dist/layers.BnWlIV7l.js +0 -9
  65. package/dist/layers.BpilXLfW.js +0 -6
  66. package/dist/layers.BpxcN2Id.js +0 -118
  67. package/dist/layers.Bva7u9LH.js +0 -41
  68. package/dist/layers.Bw9PyPP3.js +0 -40
  69. package/dist/layers.BxxWjVSm.js +0 -7
  70. package/dist/layers.ByfnxHEU.js +0 -11
  71. package/dist/layers.BzrUktHE.js +0 -40
  72. package/dist/layers.Bzx6XYuC.js +0 -1
  73. package/dist/layers.C-oUoVP8.js +0 -11
  74. package/dist/layers.C-v8184a.js +0 -10
  75. package/dist/layers.C2DLU3k6.js +0 -205
  76. package/dist/layers.C4n-fEss.js +0 -9
  77. package/dist/layers.C8LHt7Vy.js +0 -35
  78. package/dist/layers.C8_lu5UH.js +0 -23
  79. package/dist/layers.C8i9MTMT.js +0 -1089
  80. package/dist/layers.C8sUTigy.js +0 -1
  81. package/dist/layers.C9xAxi33.js +0 -2
  82. package/dist/layers.CBBwxyeE.js +0 -36
  83. package/dist/layers.CD1cqEz5.js +0 -40
  84. package/dist/layers.CDMZWhfy.js +0 -61
  85. package/dist/layers.CEGoZtyz.js +0 -42
  86. package/dist/layers.CF5fav1y.js +0 -42
  87. package/dist/layers.CHZsXQcr.js +0 -1
  88. package/dist/layers.CL2zU9v_.js +0 -8
  89. package/dist/layers.CMF1lFeu.js +0 -2482
  90. package/dist/layers.CN4h4dWv.js +0 -40
  91. package/dist/layers.COskFe6S.js +0 -39
  92. package/dist/layers.CPYfnqn5.js +0 -37
  93. package/dist/layers.CQGa02SB.js +0 -8
  94. package/dist/layers.CS1a09mB.js +0 -2
  95. package/dist/layers.CSABgVEk.js +0 -13
  96. package/dist/layers.CSPqTpuh.js +0 -1
  97. package/dist/layers.CUJquY9u.js +0 -40
  98. package/dist/layers.CVpmcvSk.js +0 -425
  99. package/dist/layers.CXNwKrxy.js +0 -2
  100. package/dist/layers.CXbg7PbM.js +0 -32
  101. package/dist/layers.CXtLmfFd.js +0 -4
  102. package/dist/layers.CYQ-eDkR.js +0 -36
  103. package/dist/layers.CYlMzZJI.js +0 -223
  104. package/dist/layers.C_6t44t9.js +0 -7
  105. package/dist/layers.C_AqJZgj.js +0 -1
  106. package/dist/layers.C_IvrzZ3.js +0 -7
  107. package/dist/layers.C_JAqhrY.js +0 -76
  108. package/dist/layers.C_l6mWJZ.js +0 -3
  109. package/dist/layers.Cbn9kFtP.js +0 -22
  110. package/dist/layers.CdC2YLb3.js +0 -189
  111. package/dist/layers.Ce68IynP.js +0 -8
  112. package/dist/layers.Ced46X3q.js +0 -6
  113. package/dist/layers.CgAndu8u.js +0 -437
  114. package/dist/layers.CgKZ3PQQ.js +0 -1
  115. package/dist/layers.CjF61D9D.js +0 -32
  116. package/dist/layers.Ck_mYNSX.js +0 -38
  117. package/dist/layers.Ckb_FqEw.js +0 -9
  118. package/dist/layers.ClK-YSEj.js +0 -10
  119. package/dist/layers.ClPMD0vL.js +0 -1619
  120. package/dist/layers.Cq3WhnzE.js +0 -41
  121. package/dist/layers.CqVTtuYm.js +0 -6
  122. package/dist/layers.CrM-3BQr.js +0 -4
  123. package/dist/layers.CsJQzt0K.js +0 -805
  124. package/dist/layers.Cux05MKl.js +0 -8
  125. package/dist/layers.CwZFs1PA.js +0 -10
  126. package/dist/layers.Cxlebi7D.js +0 -122
  127. package/dist/layers.Cy9EF2DN.js +0 -8
  128. package/dist/layers.Cyzu9PKQ.js +0 -1
  129. package/dist/layers.D0zn4_Mx.js +0 -1
  130. package/dist/layers.D1hB76Bq.js +0 -11
  131. package/dist/layers.D3RHWYgt.js +0 -8
  132. package/dist/layers.D3qdetie.js +0 -9
  133. package/dist/layers.D3xtqcGm.js +0 -42
  134. package/dist/layers.D4T8fTcj.js +0 -1223
  135. package/dist/layers.D54e-Khu.js +0 -9
  136. package/dist/layers.D661e9Xc.js +0 -1225
  137. package/dist/layers.D7cIx_9y.js +0 -7
  138. package/dist/layers.D7jGxypv.js +0 -8
  139. package/dist/layers.D7v-bI_M.js +0 -796
  140. package/dist/layers.DA37YYAX.js +0 -1
  141. package/dist/layers.DBFtWsLd.js +0 -32
  142. package/dist/layers.DBspJRLt.js +0 -9
  143. package/dist/layers.DCYPhLVi.js +0 -139
  144. package/dist/layers.DCeGyOw0.js +0 -32
  145. package/dist/layers.DDBS2bZp.js +0 -10
  146. package/dist/layers.DEV2RzXF.js +0 -35
  147. package/dist/layers.DFOzrTFb.js +0 -6
  148. package/dist/layers.DGbx9JE5.js +0 -70
  149. package/dist/layers.DH1xK3c2.js +0 -48149
  150. package/dist/layers.DH2Fx227.js +0 -38
  151. package/dist/layers.DH7NXYKd.js +0 -21941
  152. package/dist/layers.DHOsMTqa.js +0 -41
  153. package/dist/layers.DJIT4Yuh.js +0 -1
  154. package/dist/layers.DJteL1WD.js +0 -33
  155. package/dist/layers.DLwuMfdd.js +0 -84
  156. package/dist/layers.DMkBISW1.js +0 -1
  157. package/dist/layers.DN58BT2N.js +0 -129
  158. package/dist/layers.DN9HoVxI.js +0 -18
  159. package/dist/layers.DNRniJ59.js +0 -33
  160. package/dist/layers.DOZhGFQj.js +0 -40
  161. package/dist/layers.DOrgOHBr.js +0 -1
  162. package/dist/layers.DP6Pb86W.js +0 -4
  163. package/dist/layers.DQpfAS9_.js +0 -84
  164. package/dist/layers.DSBfJxui.js +0 -2238
  165. package/dist/layers.DUulRicy.js +0 -213
  166. package/dist/layers.DXLQ2q0o.js +0 -794
  167. package/dist/layers.DXqg60IE.js +0 -1
  168. package/dist/layers.DZkyqPUI.js +0 -41
  169. package/dist/layers.D_MAZnF5.js +0 -11
  170. package/dist/layers.DbMx76Zo.js +0 -1
  171. package/dist/layers.DbaKVP5e.js +0 -1
  172. package/dist/layers.DcYYTMWk.js +0 -5
  173. package/dist/layers.DenHSAM-.js +0 -423
  174. package/dist/layers.Dfg_GwXo.js +0 -41
  175. package/dist/layers.Dfv6IVuG.js +0 -39
  176. package/dist/layers.Di5XQ7RG.js +0 -5
  177. package/dist/layers.DiLG4f1T.js +0 -41
  178. package/dist/layers.DjUOC4st.js +0 -16
  179. package/dist/layers.Dksb8xWL.js +0 -21620
  180. package/dist/layers.DnTHkHku.js +0 -1
  181. package/dist/layers.DnbGJb7n.js +0 -10
  182. package/dist/layers.Dp8hIITu.js +0 -39
  183. package/dist/layers.DrGILrJe.js +0 -1
  184. package/dist/layers.DrPZhd4b.js +0 -8
  185. package/dist/layers.DsCDPcQF.js +0 -52
  186. package/dist/layers.DsLXYKq7.js +0 -139
  187. package/dist/layers.DssLE6Ze.js +0 -42
  188. package/dist/layers.DtK0Svqg.js +0 -36
  189. package/dist/layers.DtNKNbtb.js +0 -1268
  190. package/dist/layers.DuuzgAVb.js +0 -7
  191. package/dist/layers.DuyNXGEO.js +0 -5
  192. package/dist/layers.DvSwjIBG.js +0 -37
  193. package/dist/layers.DwPc2_v9.js +0 -1088
  194. package/dist/layers.DxA6ocdw.js +0 -70
  195. package/dist/layers.Dy1naDTQ.js +0 -14
  196. package/dist/layers.DyK8xvHc.js +0 -1
  197. package/dist/layers.G5fXkV2g.js +0 -40
  198. package/dist/layers.GRwgnZ0K.js +0 -1126
  199. package/dist/layers.H9GbooLl.js +0 -11
  200. package/dist/layers.Ii0kosET.js +0 -10
  201. package/dist/layers.IsBK41F6.js +0 -960
  202. package/dist/layers.JFRyjmr3.js +0 -295
  203. package/dist/layers.JWCLFILJ.js +0 -1
  204. package/dist/layers.L1EEfd1U.js +0 -323
  205. package/dist/layers.LgOKQKa4.js +0 -39
  206. package/dist/layers.NsxwBYck.js +0 -907
  207. package/dist/layers.OqunHjml.js +0 -51
  208. package/dist/layers.OziSx6JY.js +0 -8583
  209. package/dist/layers.PW9J5Jxo.js +0 -37
  210. package/dist/layers.R8mPlCA0.js +0 -261
  211. package/dist/layers.S2akqscS.js +0 -1
  212. package/dist/layers.SGT8YAPE.js +0 -7
  213. package/dist/layers.TD8A7YjM.js +0 -44
  214. package/dist/layers.UtIqQK19.js +0 -276
  215. package/dist/layers.VIZ2Xa30.js +0 -1
  216. package/dist/layers.WAvmJfLV.js +0 -7
  217. package/dist/layers.XQpyNRW5.js +0 -116
  218. package/dist/layers.Xco5GVBh.js +0 -40
  219. package/dist/layers.Y0BjACCI.js +0 -39
  220. package/dist/layers.YTMr1YyH.js +0 -42
  221. package/dist/layers._bAvXI7Q.js +0 -934
  222. package/dist/layers._mqWoKOG.js +0 -1
  223. package/dist/layers.al8Vg6zt.js +0 -6
  224. package/dist/layers.b0h5ZBmD.js +0 -61
  225. package/dist/layers.dyRJvH-s.js +0 -6
  226. package/dist/layers.eB1U5Jl6.js +0 -8
  227. package/dist/layers.euNtZlgm.js +0 -37
  228. package/dist/layers.fChmSQjC.js +0 -1
  229. package/dist/layers.feSI_7Kx.js +0 -1
  230. package/dist/layers.frthGoDK.js +0 -9
  231. package/dist/layers.gqLoI9xW.js +0 -5
  232. package/dist/layers.hpuqkyYN.js +0 -257
  233. package/dist/layers.iN3mYsr5.js +0 -34
  234. package/dist/layers.jjNsAaLS.js +0 -10
  235. package/dist/layers.l6EuAdoo.js +0 -7
  236. package/dist/layers.lCpg7dOn.js +0 -21
  237. package/dist/layers.lXs3RYd3.js +0 -10
  238. package/dist/layers.liB8aZ3C.js +0 -207
  239. package/dist/layers.qffllMmW.js +0 -41
  240. package/dist/layers.r1jKcKBb.js +0 -4
  241. package/dist/layers.rFy6_B28.js +0 -32
  242. package/dist/layers.rq1vUYAs.js +0 -6
  243. package/dist/layers.sIeIPQd4.js +0 -40
  244. package/dist/layers.sdxt2Nuu.js +0 -8
  245. package/dist/layers.t8MaTGN8.js +0 -1
  246. package/dist/layers.wKJ5yZVV.js +0 -96
  247. package/dist/layers.x9brO2TV.js +0 -1
  248. package/dist/layers.xQ1jNHSB.js +0 -1583
@@ -1,295 +0,0 @@
1
- import { jsx as u, jsxs as L } from "react/jsx-runtime";
2
- import { useTranslation as D } from "react-i18next";
3
- import { Modal as U, Text as X, Flex as J, Button as R, useMantineColorScheme as Y, Loader as Z } from "@mantine/core";
4
- import { useRef as $, useState as T, useEffect as y, useCallback as j, Suspense as Q, lazy as P } from "react";
5
- import { BottomDrawerWithoutHeader as ee } from "@layers-app/shared";
6
- const ce = ({
7
- isCloseModal: l,
8
- setCloseModalOpen: t,
9
- confirmClose: c
10
- }) => {
11
- const { t: d } = D();
12
- return /* @__PURE__ */ u(
13
- U,
14
- {
15
- opened: l,
16
- onClose: () => {
17
- t(!1);
18
- },
19
- centered: !0,
20
- title: d("editor.unsavedChanges.title"),
21
- closeOnClickOutside: !0,
22
- closeOnEscape: !0,
23
- size: "500",
24
- zIndex: 999,
25
- children: /* @__PURE__ */ L("div", { children: [
26
- /* @__PURE__ */ u(X, { mb: "md", children: d("editor.unsavedChanges.message") }),
27
- /* @__PURE__ */ L(J, { justify: "flex-end", gap: "sm", children: [
28
- /* @__PURE__ */ u(
29
- R,
30
- {
31
- variant: "default",
32
- onClick: () => {
33
- t(!1);
34
- },
35
- fullWidth: !0,
36
- children: d("editor.unsavedChanges.cancel")
37
- }
38
- ),
39
- /* @__PURE__ */ u(R, { color: "red", onClick: c, fullWidth: !0, children: d("editor.unsavedChanges.closeWithoutSaving") })
40
- ] })
41
- ] })
42
- }
43
- );
44
- }, A = {
45
- elements: [],
46
- files: {},
47
- appState: {},
48
- previewSVG: null
49
- }, de = (l) => {
50
- try {
51
- const t = JSON.parse(l);
52
- if (Array.isArray(t))
53
- return { ...A, elements: t };
54
- if (t && typeof t == "object")
55
- return {
56
- elements: Array.isArray(t.elements) ? t.elements : [],
57
- files: t.files && typeof t.files == "object" ? t.files : {},
58
- appState: t.appState && typeof t.appState == "object" ? t.appState : {},
59
- previewSVG: typeof t.previewSVG == "string" ? t.previewSVG : typeof t.previewSvg == "string" ? t.previewSvg : null
60
- };
61
- } catch {
62
- }
63
- return { ...A };
64
- }, te = {
65
- en: "en-US",
66
- ru: "ru-RU",
67
- fr: "fr-FR",
68
- de: "de-DE",
69
- es: "es-ES",
70
- it: "it-IT",
71
- pt: "pt-BR",
72
- zh: "zh-CN",
73
- ja: "ja-JP",
74
- ko: "ko-KR",
75
- ar: "ar-SA",
76
- hi: "hi-IN",
77
- nl: "nl-NL",
78
- tr: "tr-TR",
79
- pl: "pl-PL",
80
- sv: "sv-SE",
81
- cs: "cs-CZ",
82
- uk: "uk-UA",
83
- ro: "ro-RO",
84
- fi: "fi-FI",
85
- da: "da-DK",
86
- no: "no-NO",
87
- el: "el-GR",
88
- he: "he-IL",
89
- th: "th-TH",
90
- id: "id-ID",
91
- ms: "ms-MY",
92
- vi: "vi-VN"
93
- };
94
- let w = null;
95
- const re = /* @__PURE__ */ P(async () => {
96
- var t;
97
- const l = await import("./layers.Dksb8xWL.js").then((c) => c.M);
98
- return !w && l && (w = l.exportToSvg || ((t = l.default) == null ? void 0 : t.exportToSvg) || l.default), { default: l.Excalidraw };
99
- }), oe = () => {
100
- const [l, t] = T(
101
- null
102
- ), c = j(
103
- (d) => t(d),
104
- []
105
- );
106
- return [l, c];
107
- };
108
- function ue({
109
- onSave: l,
110
- initialElements: t,
111
- initialAppState: c,
112
- initialFiles: d,
113
- isShown: i = !1,
114
- onDelete: B,
115
- onClose: N,
116
- isEdited: W
117
- }) {
118
- const [n, z] = oe(), { i18n: f, t: _ } = D(), { colorScheme: O } = Y(), E = $(!1), [g, G] = T(t), [C, V] = T(d), [F, H] = T(i);
119
- y(() => {
120
- i && H(!0);
121
- }, [i]), y(() => {
122
- !i || E.current || (E.current = !0, Promise.resolve({ }));
123
- }, [i]), y(() => {
124
- i && setTimeout(() => {
125
- var e;
126
- (e = n == null ? void 0 : n.refresh) == null || e.call(n);
127
- }, 500);
128
- }, [i, n]), y(() => {
129
- if (!i)
130
- return;
131
- const e = (r, a) => {
132
- const s = _(r);
133
- return s.startsWith("editor.menu") ? a : s;
134
- }, m = e(
135
- "editor.menu.excalidraw.tools.frameTool",
136
- f.language === "ru" ? "Инструмент рамки" : f.language === "es" ? "Herramienta de marco" : "Frame tool"
137
- ), o = e(
138
- "editor.menu.excalidraw.tools.webEmbed",
139
- f.language === "ru" ? "Веб-встраивание" : f.language === "es" ? "Incrustación web" : "Web Embed"
140
- ), h = e(
141
- "editor.menu.excalidraw.tools.generate",
142
- f.language === "ru" ? "Генерировать" : f.language === "es" ? "Generar" : "Generate"
143
- ), p = {
144
- "Frame tool": m,
145
- "Web Embed": o,
146
- "Web embeded": o,
147
- Generate: h
148
- }, v = () => {
149
- const r = document.querySelector(".App-toolbar__extra-tools-dropdown");
150
- if (!r)
151
- return;
152
- const a = document.createTreeWalker(
153
- r,
154
- NodeFilter.SHOW_TEXT,
155
- null
156
- );
157
- let s;
158
- for (; s = a.nextNode(); )
159
- if (s.nodeType === Node.TEXT_NODE && s.textContent) {
160
- const M = s.textContent.trim();
161
- for (const [S, k] of Object.entries(p))
162
- if (M === S && k && !M.includes(k)) {
163
- s.textContent = s.textContent.replace(S, k);
164
- break;
165
- }
166
- }
167
- }, x = () => {
168
- setTimeout(() => {
169
- v();
170
- }, 0);
171
- }, b = setTimeout(() => {
172
- const r = document.querySelector(
173
- ".excalidraw-container"
174
- );
175
- if (r) {
176
- const a = r.querySelector(
177
- ".App-toolbar__extra-tools-trigger"
178
- );
179
- a && a.addEventListener("click", x);
180
- }
181
- }, 300);
182
- return () => {
183
- clearTimeout(b);
184
- const r = document.querySelector(
185
- ".excalidraw-container"
186
- );
187
- if (r) {
188
- const a = r.querySelector(
189
- ".App-toolbar__extra-tools-trigger"
190
- );
191
- a && a.removeEventListener("click", x);
192
- }
193
- };
194
- }, [i, f.language]);
195
- const q = j(async () => {
196
- var v, x, b;
197
- let e = w;
198
- if (!e || typeof e != "function") {
199
- const r = await import("./layers.Dksb8xWL.js").then((a) => a.M);
200
- e = r.exportToSvg || ((v = r.default) == null ? void 0 : v.exportToSvg) || r.default, e && typeof e == "function" && (w = e);
201
- }
202
- if (!e || typeof e != "function") {
203
- const r = await import("./layers.Dksb8xWL.js").then((s) => s.M), a = r ? Object.keys(r) : [];
204
- throw console.error("Excalidraw module structure:", {
205
- keys: a,
206
- hasExportToSvg: r && "exportToSvg" in r,
207
- hasDefault: r && "default" in r,
208
- moduleType: typeof r,
209
- module: r
210
- }), new Error(
211
- `exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${a.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`
212
- );
213
- }
214
- const m = ((x = n == null ? void 0 : n.getAppState) == null ? void 0 : x.call(n)) ?? c, o = await e({
215
- appState: m,
216
- elements: g,
217
- files: C
218
- }), h = (b = o == null ? void 0 : o.firstElementChild) == null ? void 0 : b.firstElementChild, p = o.getAttribute("viewBox");
219
- if (p != null) {
220
- const r = p.split(" ");
221
- o.setAttribute("width", r[2]), o.setAttribute("height", r[3]);
222
- }
223
- return h && h.tagName === "style" && h.remove(), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("display", "block"), o.classList.add("excalidraw-svg"), o.outerHTML;
224
- }, [g, C, n, c]), I = () => {
225
- if (g && g.filter((e) => !e.isDeleted).length > 0) {
226
- const e = n == null ? void 0 : n.getAppState(), m = {
227
- exportBackground: e == null ? void 0 : e.exportBackground,
228
- exportScale: e == null ? void 0 : e.exportScale,
229
- exportWithDarkMode: (e == null ? void 0 : e.theme) === "dark",
230
- isBindingEnabled: e == null ? void 0 : e.isBindingEnabled,
231
- isLoading: e == null ? void 0 : e.isLoading,
232
- name: e == null ? void 0 : e.name,
233
- theme: e == null ? void 0 : e.theme,
234
- viewBackgroundColor: e == null ? void 0 : e.viewBackgroundColor,
235
- viewModeEnabled: e == null ? void 0 : e.viewModeEnabled,
236
- zenModeEnabled: e == null ? void 0 : e.zenModeEnabled,
237
- zoom: e == null ? void 0 : e.zoom
238
- };
239
- (async () => {
240
- const o = await q();
241
- l(g, m, C, o);
242
- })();
243
- } else
244
- B();
245
- }, K = (e, m, o) => {
246
- (e == null ? void 0 : e.length) !== (t == null ? void 0 : t.length) && (W.current = !0), G(e), V(o);
247
- };
248
- return /* @__PURE__ */ u(
249
- ee,
250
- {
251
- opened: i,
252
- onClose: N,
253
- onSave: I,
254
- className: "excaildraw-modal",
255
- closeOnEscape: !1,
256
- children: F && /* @__PURE__ */ u(
257
- Q,
258
- {
259
- fallback: /* @__PURE__ */ u(
260
- "div",
261
- {
262
- style: {
263
- display: "flex",
264
- justifyContent: "center",
265
- alignItems: "center",
266
- height: "100%",
267
- minHeight: "400px"
268
- },
269
- children: /* @__PURE__ */ u(Z, { size: "sm" })
270
- }
271
- ),
272
- children: /* @__PURE__ */ u(
273
- re,
274
- {
275
- langCode: te[f.language],
276
- theme: O,
277
- onChange: K,
278
- excalidrawAPI: z,
279
- initialData: {
280
- appState: { ...c || { isLoading: !1 } },
281
- elements: t,
282
- files: d
283
- }
284
- }
285
- )
286
- }
287
- )
288
- }
289
- );
290
- }
291
- export {
292
- ce as C,
293
- ue as E,
294
- de as p
295
- };
@@ -1 +0,0 @@
1
- "use strict";(()=>{var R,m,C;(R=Path2D.prototype).roundRect??(R.roundRect=P),globalThis.CanvasRenderingContext2D&&((m=globalThis.CanvasRenderingContext2D.prototype).roundRect??(m.roundRect=P)),globalThis.OffscreenCanvasRenderingContext2D&&((C=globalThis.OffscreenCanvasRenderingContext2D.prototype).roundRect??(C.roundRect=P));function P(t,o,u,a,s){if(![t,o,u,a].every(n=>Number.isFinite(n)))return;s=O(s);let e,r,i,h;if(s.length===4)e=l(s[0]),r=l(s[1]),i=l(s[2]),h=l(s[3]);else if(s.length===3)e=l(s[0]),r=l(s[1]),h=l(s[1]),i=l(s[2]);else if(s.length===2)e=l(s[0]),i=l(s[0]),r=l(s[1]),h=l(s[1]);else if(s.length===1)e=l(s[0]),r=l(s[0]),i=l(s[0]),h=l(s[0]);else throw new RangeError(`${b(this)} ${s.length} is not a valid size for radii sequence.`);const g=[e,r,i,h],p=g.find(({x:n,y:f})=>n<0||f<0);if((p==null?void 0:p.x)<0?p.x:p==null||p.y,g.some(({x:n,y:f})=>!Number.isFinite(n)||!Number.isFinite(f)))return;if(p)throw new RangeError(`${b(this)} Radius value ${p} is negative.`);v(g),u<0&&a<0?(this.moveTo(t-e.x,o),this.ellipse(t+u+r.x,o-r.y,r.x,r.y,0,-Math.PI*1.5,-Math.PI),this.ellipse(t+u+i.x,o+a+i.y,i.x,i.y,0,-Math.PI,-Math.PI/2),this.ellipse(t-h.x,o+a+h.y,h.x,h.y,0,-Math.PI/2,0),this.ellipse(t-e.x,o-e.y,e.x,e.y,0,0,-Math.PI/2)):u<0?(this.moveTo(t-e.x,o),this.ellipse(t+u+r.x,o+r.y,r.x,r.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(t+u+i.x,o+a-i.y,i.x,i.y,0,-Math.PI,-Math.PI*1.5,1),this.ellipse(t-h.x,o+a-h.y,h.x,h.y,0,Math.PI/2,0,1),this.ellipse(t-e.x,o+e.y,e.x,e.y,0,0,-Math.PI/2,1)):a<0?(this.moveTo(t+e.x,o),this.ellipse(t+u-r.x,o-r.y,r.x,r.y,0,Math.PI/2,0,1),this.ellipse(t+u-i.x,o+a+i.y,i.x,i.y,0,0,-Math.PI/2,1),this.ellipse(t+h.x,o+a+h.y,h.x,h.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(t+e.x,o-e.y,e.x,e.y,0,-Math.PI,-Math.PI*1.5,1)):(this.moveTo(t+e.x,o),this.ellipse(t+u-r.x,o+r.y,r.x,r.y,0,-Math.PI/2,0),this.ellipse(t+u-i.x,o+a-i.y,i.x,i.y,0,0,Math.PI/2),this.ellipse(t+h.x,o+a-h.y,h.x,h.y,0,Math.PI/2,Math.PI),this.ellipse(t+e.x,o+e.y,e.x,e.y,0,Math.PI,Math.PI*1.5)),this.closePath(),this.moveTo(t,o);function N(n){const{x:f,y:c,z:x,w:M}=n;return{x:f,y:c,z:x,w:M}}function O(n){const f=typeof n;return f==="undefined"||n===null?[0]:f==="function"?[NaN]:f==="object"?typeof n[Symbol.iterator]=="function"?[...n].map(c=>{const x=typeof c;return x==="undefined"||c===null?0:x==="function"?NaN:x==="object"?N(c):y(c)}):[N(n)]:[y(n)]}function y(n){return+n}function l(n){const f=y(n);return Number.isFinite(f)?{x:f,y:f}:Object(n)===n?{x:y(n.x??0),y:y(n.y??0)}:{x:NaN,y:NaN}}function v(n){const[f,c,x,M]=n,F=[Math.abs(u)/(f.x+c.x),Math.abs(a)/(c.y+x.y),Math.abs(u)/(x.x+M.x),Math.abs(a)/(f.y+M.y)],I=Math.min(...F);if(I<=1)for(const D of n)D.x*=I,D.y*=I}}function b(t){return`Failed to execute 'roundRect' on '${T(t)}':`}function T(t){return Object(t)===t&&t instanceof Path2D?"Path2D":t instanceof(globalThis==null?void 0:globalThis.CanvasRenderingContext2D)?"CanvasRenderingContext2D":t instanceof(globalThis==null?void 0:globalThis.OffscreenCanvasRenderingContext2D)?"OffscreenCanvasRenderingContext2D":(t==null?void 0:t.constructor.name)||t}})();
@@ -1,323 +0,0 @@
1
- import { l as Y, A as D, e as M } from "./layers.OziSx6JY.js";
2
- import "./layers.Dksb8xWL.js";
3
- import "lodash-es/memoize.js";
4
- import "lodash-es/merge.js";
5
- import "lodash-es/isEmpty.js";
6
- var O = (function() {
7
- var a = function(u, t, e, n) {
8
- for (e = e || {}, n = u.length; n--; e[u[n]] = t)
9
- ;
10
- return e;
11
- }, f = [6, 9, 10], m = {
12
- trace: function() {
13
- },
14
- yy: {},
15
- symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 },
16
- terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" },
17
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
18
- performAction: function(t, e, n, s, r, i, d) {
19
- switch (i.length - 1, r) {
20
- case 1:
21
- return s;
22
- case 4:
23
- break;
24
- case 6:
25
- s.setInfo(!0);
26
- break;
27
- }
28
- },
29
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, a(f, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, a(f, [2, 3]), a(f, [2, 4]), a(f, [2, 5]), a(f, [2, 6])],
30
- defaultActions: { 4: [2, 1] },
31
- parseError: function(t, e) {
32
- if (e.recoverable)
33
- this.trace(t);
34
- else {
35
- var n = new Error(t);
36
- throw n.hash = e, n;
37
- }
38
- },
39
- parse: function(t) {
40
- var e = this, n = [0], s = [], r = [null], i = [], d = this.table, P = "", v = 0, L = 0, N = 2, T = 1, R = i.slice.call(arguments, 1), o = Object.create(this.lexer), p = { yy: {} };
41
- for (var E in this.yy)
42
- Object.prototype.hasOwnProperty.call(this.yy, E) && (p.yy[E] = this.yy[E]);
43
- o.setInput(t, p.yy), p.yy.lexer = o, p.yy.parser = this, typeof o.yylloc > "u" && (o.yylloc = {});
44
- var I = o.yylloc;
45
- i.push(I);
46
- var z = o.options && o.options.ranges;
47
- typeof p.yy.parseError == "function" ? this.parseError = p.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
48
- function U() {
49
- var y;
50
- return y = s.pop() || o.lex() || T, typeof y != "number" && (y instanceof Array && (s = y, y = s.pop()), y = e.symbols_[y] || y), y;
51
- }
52
- for (var l, g, h, w, _ = {}, b, c, F, S; ; ) {
53
- if (g = n[n.length - 1], this.defaultActions[g] ? h = this.defaultActions[g] : ((l === null || typeof l > "u") && (l = U()), h = d[g] && d[g][l]), typeof h > "u" || !h.length || !h[0]) {
54
- var A = "";
55
- S = [];
56
- for (b in d[g])
57
- this.terminals_[b] && b > N && S.push("'" + this.terminals_[b] + "'");
58
- o.showPosition ? A = "Parse error on line " + (v + 1) + `:
59
- ` + o.showPosition() + `
60
- Expecting ` + S.join(", ") + ", got '" + (this.terminals_[l] || l) + "'" : A = "Parse error on line " + (v + 1) + ": Unexpected " + (l == T ? "end of input" : "'" + (this.terminals_[l] || l) + "'"), this.parseError(A, {
61
- text: o.match,
62
- token: this.terminals_[l] || l,
63
- line: o.yylineno,
64
- loc: I,
65
- expected: S
66
- });
67
- }
68
- if (h[0] instanceof Array && h.length > 1)
69
- throw new Error("Parse Error: multiple actions possible at state: " + g + ", token: " + l);
70
- switch (h[0]) {
71
- case 1:
72
- n.push(l), r.push(o.yytext), i.push(o.yylloc), n.push(h[1]), l = null, L = o.yyleng, P = o.yytext, v = o.yylineno, I = o.yylloc;
73
- break;
74
- case 2:
75
- if (c = this.productions_[h[1]][1], _.$ = r[r.length - c], _._$ = {
76
- first_line: i[i.length - (c || 1)].first_line,
77
- last_line: i[i.length - 1].last_line,
78
- first_column: i[i.length - (c || 1)].first_column,
79
- last_column: i[i.length - 1].last_column
80
- }, z && (_._$.range = [
81
- i[i.length - (c || 1)].range[0],
82
- i[i.length - 1].range[1]
83
- ]), w = this.performAction.apply(_, [
84
- P,
85
- L,
86
- v,
87
- p.yy,
88
- h[1],
89
- r,
90
- i
91
- ].concat(R)), typeof w < "u")
92
- return w;
93
- c && (n = n.slice(0, -1 * c * 2), r = r.slice(0, -1 * c), i = i.slice(0, -1 * c)), n.push(this.productions_[h[1]][0]), r.push(_.$), i.push(_._$), F = d[n[n.length - 2]][n[n.length - 1]], n.push(F);
94
- break;
95
- case 3:
96
- return !0;
97
- }
98
- }
99
- return !0;
100
- }
101
- }, k = /* @__PURE__ */ (function() {
102
- var u = {
103
- EOF: 1,
104
- parseError: function(e, n) {
105
- if (this.yy.parser)
106
- this.yy.parser.parseError(e, n);
107
- else
108
- throw new Error(e);
109
- },
110
- // resets the lexer, sets new input
111
- setInput: function(t, e) {
112
- return this.yy = e || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
113
- first_line: 1,
114
- first_column: 0,
115
- last_line: 1,
116
- last_column: 0
117
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
118
- },
119
- // consumes and returns one char from the input
120
- input: function() {
121
- var t = this._input[0];
122
- this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
123
- var e = t.match(/(?:\r\n?|\n).*/g);
124
- return e ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
125
- },
126
- // unshifts one char (or a string) into the input
127
- unput: function(t) {
128
- var e = t.length, n = t.split(/(?:\r\n?|\n)/g);
129
- this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e), this.offset -= e;
130
- var s = this.match.split(/(?:\r\n?|\n)/g);
131
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
132
- var r = this.yylloc.range;
133
- return this.yylloc = {
134
- first_line: this.yylloc.first_line,
135
- last_line: this.yylineno + 1,
136
- first_column: this.yylloc.first_column,
137
- last_column: n ? (n.length === s.length ? this.yylloc.first_column : 0) + s[s.length - n.length].length - n[0].length : this.yylloc.first_column - e
138
- }, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - e]), this.yyleng = this.yytext.length, this;
139
- },
140
- // When called from action, caches matched text and appends it on next action
141
- more: function() {
142
- return this._more = !0, this;
143
- },
144
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
145
- reject: function() {
146
- if (this.options.backtrack_lexer)
147
- this._backtrack = !0;
148
- else
149
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
150
- ` + this.showPosition(), {
151
- text: "",
152
- token: null,
153
- line: this.yylineno
154
- });
155
- return this;
156
- },
157
- // retain first n characters of the match
158
- less: function(t) {
159
- this.unput(this.match.slice(t));
160
- },
161
- // displays already matched input, i.e. for error messages
162
- pastInput: function() {
163
- var t = this.matched.substr(0, this.matched.length - this.match.length);
164
- return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
165
- },
166
- // displays upcoming input, i.e. for error messages
167
- upcomingInput: function() {
168
- var t = this.match;
169
- return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
170
- },
171
- // displays the character position where the lexing error occurred, i.e. for error messages
172
- showPosition: function() {
173
- var t = this.pastInput(), e = new Array(t.length + 1).join("-");
174
- return t + this.upcomingInput() + `
175
- ` + e + "^";
176
- },
177
- // test the lexed token: return FALSE when not a match, otherwise return token
178
- test_match: function(t, e) {
179
- var n, s, r;
180
- if (this.options.backtrack_lexer && (r = {
181
- yylineno: this.yylineno,
182
- yylloc: {
183
- first_line: this.yylloc.first_line,
184
- last_line: this.last_line,
185
- first_column: this.yylloc.first_column,
186
- last_column: this.yylloc.last_column
187
- },
188
- yytext: this.yytext,
189
- match: this.match,
190
- matches: this.matches,
191
- matched: this.matched,
192
- yyleng: this.yyleng,
193
- offset: this.offset,
194
- _more: this._more,
195
- _input: this._input,
196
- yy: this.yy,
197
- conditionStack: this.conditionStack.slice(0),
198
- done: this.done
199
- }, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), s = t[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
200
- first_line: this.yylloc.last_line,
201
- last_line: this.yylineno + 1,
202
- first_column: this.yylloc.last_column,
203
- last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
204
- }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, e, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
205
- return n;
206
- if (this._backtrack) {
207
- for (var i in r)
208
- this[i] = r[i];
209
- return !1;
210
- }
211
- return !1;
212
- },
213
- // return next match in input
214
- next: function() {
215
- if (this.done)
216
- return this.EOF;
217
- this._input || (this.done = !0);
218
- var t, e, n, s;
219
- this._more || (this.yytext = "", this.match = "");
220
- for (var r = this._currentRules(), i = 0; i < r.length; i++)
221
- if (n = this._input.match(this.rules[r[i]]), n && (!e || n[0].length > e[0].length)) {
222
- if (e = n, s = i, this.options.backtrack_lexer) {
223
- if (t = this.test_match(n, r[i]), t !== !1)
224
- return t;
225
- if (this._backtrack) {
226
- e = !1;
227
- continue;
228
- } else
229
- return !1;
230
- } else if (!this.options.flex)
231
- break;
232
- }
233
- return e ? (t = this.test_match(e, r[s]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
234
- ` + this.showPosition(), {
235
- text: "",
236
- token: null,
237
- line: this.yylineno
238
- });
239
- },
240
- // return next match that has a token
241
- lex: function() {
242
- var e = this.next();
243
- return e || this.lex();
244
- },
245
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
246
- begin: function(e) {
247
- this.conditionStack.push(e);
248
- },
249
- // pop the previously active lexer condition state off the condition stack
250
- popState: function() {
251
- var e = this.conditionStack.length - 1;
252
- return e > 0 ? this.conditionStack.pop() : this.conditionStack[0];
253
- },
254
- // produce the lexer rule set which is active for the currently active lexer condition state
255
- _currentRules: function() {
256
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
257
- },
258
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
259
- topState: function(e) {
260
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
261
- },
262
- // alias for begin(condition)
263
- pushState: function(e) {
264
- this.begin(e);
265
- },
266
- // return the number of states currently on the stack
267
- stateStackSize: function() {
268
- return this.conditionStack.length;
269
- },
270
- options: { "case-insensitive": !0 },
271
- performAction: function(e, n, s, r) {
272
- switch (s) {
273
- case 0:
274
- return 4;
275
- case 1:
276
- return 9;
277
- case 2:
278
- return "space";
279
- case 3:
280
- return 10;
281
- case 4:
282
- return 6;
283
- case 5:
284
- return "TXT";
285
- }
286
- },
287
- rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
288
- conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } }
289
- };
290
- return u;
291
- })();
292
- m.lexer = k;
293
- function x() {
294
- this.yy = {};
295
- }
296
- return x.prototype = m, m.Parser = x, new x();
297
- })();
298
- O.parser = O;
299
- const B = O, j = {
300
- info: !1
301
- };
302
- let $ = j.info;
303
- const V = (a) => {
304
- $ = a;
305
- }, X = () => $, q = () => {
306
- $ = j.info;
307
- }, C = {
308
- clear: q,
309
- setInfo: V,
310
- getInfo: X
311
- }, G = (a, f, m) => {
312
- Y.debug(`rendering info diagram
313
- ` + a);
314
- const k = D(f);
315
- M(k, 100, 400, !0), k.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${m}`);
316
- }, H = { draw: G }, tt = {
317
- parser: B,
318
- db: C,
319
- renderer: H
320
- };
321
- export {
322
- tt as diagram
323
- };
@@ -1,39 +0,0 @@
1
- import { l as r, n as e, u as o, v as l, A as i, F as t, R as c, C as n, B as g, c as m, r as D, E as h, y as p, h as u, s as b, w as d, N as f, p as S, k, m as v, x, t as L, a as w, D as y, _ as C, f as E, S as P, I as B, g as q, i as z, b as A, T as F, L as I, d as N, z as R, P as T } from "./layers.Dksb8xWL.js";
2
- export {
3
- r as alerts,
4
- e as buttons,
5
- o as canvasError,
6
- l as clearCanvasDialog,
7
- i as colorPicker,
8
- t as colors,
9
- c as commandPalette,
10
- n as confirmDialog,
11
- g as default,
12
- m as element,
13
- D as elementLink,
14
- h as encrypted,
15
- p as errorDialog,
16
- u as errorSplash,
17
- b as errors,
18
- d as exportDialog,
19
- f as fontList,
20
- S as headings,
21
- k as helpDialog,
22
- v as hints,
23
- x as imageExportDialog,
24
- L as labels,
25
- w as library,
26
- y as mermaid,
27
- C as overwriteConfirm,
28
- E as publishDialog,
29
- P as publishSuccessDialog,
30
- B as quickSearch,
31
- q as roomDialog,
32
- z as search,
33
- A as shareDialog,
34
- F as stats,
35
- I as toast,
36
- N as toolBar,
37
- R as userList,
38
- T as welcomeScreen
39
- };