@layers-app/editor 0.5.6-optimization → 0.5.6

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 (256) hide show
  1. package/README.md +0 -19
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +10 -12
  4. package/dist/layers.52famHy6.js +1 -0
  5. package/dist/layers.59MV1gHs.js +41 -0
  6. package/dist/layers.6IaGqrl-.js +39 -0
  7. package/dist/layers.6lqPO-3Z.js +32 -0
  8. package/dist/layers.7JqFgE4-.js +15 -0
  9. package/dist/layers.8CsJHG7m.js +139 -0
  10. package/dist/layers.9pNaFvaX.js +1 -0
  11. package/dist/layers.AK6shBV6.js +42 -0
  12. package/dist/layers.AamAEMA7.js +160 -0
  13. package/dist/layers.B-WGMHL6.js +11 -0
  14. package/dist/layers.B19hGmey.js +1 -0
  15. package/dist/layers.B2wUdnez.js +437 -0
  16. package/dist/layers.B3D4g2HH.js +1 -0
  17. package/dist/layers.B6FBUZ1Z.js +9 -0
  18. package/dist/layers.B7-Kk2kp.js +11 -0
  19. package/dist/layers.B7K7JjK6.js +1510 -0
  20. package/dist/layers.B7USkgSi.js +6 -0
  21. package/dist/layers.B7hegMVr.js +1034 -0
  22. package/dist/layers.BAtv1CM7.js +1 -0
  23. package/dist/layers.BBSE_YmF.js +37 -0
  24. package/dist/layers.BCG8kdU-.js +32 -0
  25. package/dist/layers.BCUz59rh.js +39 -0
  26. package/dist/layers.BF8ID4w9.js +39 -0
  27. package/dist/layers.BIZaN3QR.js +7 -0
  28. package/dist/layers.BIeVwYKL.js +1 -0
  29. package/dist/layers.BJDrjORS.js +244 -0
  30. package/dist/layers.BK35bp4_.js +931 -0
  31. package/dist/layers.BKrHVgKG.js +11 -0
  32. package/dist/layers.BLd2spTm.js +1 -0
  33. package/dist/layers.BQj7sYv9.js +4 -0
  34. package/dist/layers.BSTBZrFn.js +1 -0
  35. package/dist/layers.BTnY40Hl.js +230 -0
  36. package/dist/layers.BW6eTqTQ.js +9 -0
  37. package/dist/layers.BX50pyFe.js +42 -0
  38. package/dist/layers.BXiMBNCf.js +7 -0
  39. package/dist/layers.BY0saexf.js +44 -0
  40. package/dist/layers.BYyHDhdF.js +40 -0
  41. package/dist/layers.B_SkKQaN.js +7 -0
  42. package/dist/layers.Bb45BkB7.js +35 -0
  43. package/dist/layers.BbCfEXyj.js +55 -0
  44. package/dist/layers.Bbx2DS9P.js +10 -0
  45. package/dist/layers.BeRqUeUL.js +1 -0
  46. package/dist/layers.BfBHY8YH.js +8 -0
  47. package/dist/layers.BfPqzMs9.js +1 -0
  48. package/dist/layers.Bfqazne8.js +70 -0
  49. package/dist/layers.BgzFjX4U.js +35 -0
  50. package/dist/layers.BhL3qtd0.js +1126 -0
  51. package/dist/layers.BitUjngp.js +11 -0
  52. package/dist/layers.BmR6H-fP.js +2966 -0
  53. package/dist/layers.Bn7g95cI.js +39 -0
  54. package/dist/layers.Bn7hw-zZ.js +13 -0
  55. package/dist/layers.BnYpz8RW.js +1359 -0
  56. package/dist/layers.BoIdFEtV.js +186 -0
  57. package/dist/layers.BorvTy9p.js +33 -0
  58. package/dist/layers.BpilXLfW.js +6 -0
  59. package/dist/layers.Bt8HOTA6.js +10 -0
  60. package/dist/layers.BvVfdnbz.js +41 -0
  61. package/dist/layers.BzUNMS1L.js +2 -0
  62. package/dist/layers.C-FZw43o.js +41 -0
  63. package/dist/layers.C0Lgw_Sx.js +11688 -0
  64. package/dist/layers.C4ToPutV.js +40 -0
  65. package/dist/layers.C4wkiWhv.js +8 -0
  66. package/dist/layers.C5ZDJAAD.js +220 -0
  67. package/dist/layers.C6P4YEcq.js +257 -0
  68. package/dist/layers.C7x1USYv.js +139 -0
  69. package/dist/layers.C8_lu5UH.js +23 -0
  70. package/dist/layers.C99jO8bw.js +1 -0
  71. package/dist/layers.C9KoadvU.js +122 -0
  72. package/dist/layers.C9PwfpMh.js +39 -0
  73. package/dist/layers.CA8KMZRI.js +1 -0
  74. package/dist/layers.CAGTppwS.js +4 -0
  75. package/dist/layers.CAgoPdOX.js +1088 -0
  76. package/dist/layers.CBb84SJY.js +10 -0
  77. package/dist/layers.CCaOiFeL.js +9 -0
  78. package/dist/layers.CChtus6s.js +9 -0
  79. package/dist/layers.CDpYDf4E.js +41 -0
  80. package/dist/layers.CElZbgj1.js +61 -0
  81. package/dist/layers.CFXi5TGg.js +5 -0
  82. package/dist/layers.CGvSf-pD.js +10 -0
  83. package/dist/layers.CH7Yhxyl.js +1 -0
  84. package/dist/layers.CHZsXQcr.js +1 -0
  85. package/dist/layers.CHbqHHw4.js +10 -0
  86. package/dist/layers.CIK15Iw8.js +1 -0
  87. package/dist/layers.CIpcY9uj.js +38 -0
  88. package/dist/layers.CK2ePV5l.js +1 -0
  89. package/dist/layers.CKOfAypO.js +1 -0
  90. package/dist/layers.CKuoZO2o.js +5 -0
  91. package/dist/layers.CLELtUjk.js +40 -0
  92. package/dist/layers.CNmEkwvP.js +84 -0
  93. package/dist/layers.CPJv1Tc9.js +46859 -0
  94. package/dist/layers.CPlQgHvJ.js +37 -0
  95. package/dist/layers.CR9KcJml.js +9 -0
  96. package/dist/layers.CRFf4NzO.js +10 -0
  97. package/dist/layers.CSI1-wyP.js +1 -0
  98. package/dist/layers.CTmWmJtN.js +32 -0
  99. package/dist/layers.CXqT56ec.js +304 -0
  100. package/dist/layers.CZ5YSh6D.js +8 -0
  101. package/dist/layers.C_2s_qym.js +3 -0
  102. package/dist/layers.C_IvrzZ3.js +7 -0
  103. package/dist/layers.C_fjSuvx.js +1 -0
  104. package/dist/layers.CaMAncU5.js +423 -0
  105. package/dist/layers.CcaiUz4r.js +1 -0
  106. package/dist/layers.Cd1zz9ej.js +39 -0
  107. package/dist/layers.CeafY0UM.js +37 -0
  108. package/dist/layers.CfcMk6Ta.js +1 -0
  109. package/dist/layers.Cfl_HoMI.js +769 -0
  110. package/dist/layers.CfpNlmP9.js +1 -0
  111. package/dist/layers.CiTTUiMF.js +8 -0
  112. package/dist/layers.Cj4cFFtZ.js +189 -0
  113. package/dist/layers.CmdoC_9-.js +7 -0
  114. package/dist/layers.CoGB8bed.js +8 -0
  115. package/dist/layers.Cpy28Z7d.js +35 -0
  116. package/dist/layers.CqVTtuYm.js +6 -0
  117. package/dist/layers.Cu93NN5Z.js +41 -0
  118. package/dist/layers.Cu9NodvY.js +1089 -0
  119. package/dist/layers.CvBE5BLz.js +118 -0
  120. package/dist/layers.Cx9zn9dM.js +41 -0
  121. package/dist/layers.CxJcDiDE.js +65 -0
  122. package/dist/layers.Cyzu9PKQ.js +1 -0
  123. package/dist/layers.CzAsjHtw.js +34 -0
  124. package/dist/layers.D0kgeXsw.js +1619 -0
  125. package/dist/layers.D0zn4_Mx.js +1 -0
  126. package/dist/layers.D1Vfjokq.js +32 -0
  127. package/dist/layers.D1rIvRN6.js +9 -0
  128. package/dist/layers.D22i1Ls7.js +6 -0
  129. package/dist/layers.D25D_N3C.js +7 -0
  130. package/dist/layers.D4T8fTcj.js +1223 -0
  131. package/dist/layers.D4fXRymr.js +40 -0
  132. package/dist/layers.D4gUAtLW.js +41 -0
  133. package/dist/layers.D59PMsKH.js +51 -0
  134. package/dist/layers.D5_C65FS.js +2479 -0
  135. package/dist/layers.D5j-6Vz3.js +36 -0
  136. package/dist/layers.D7ikYTua.js +2235 -0
  137. package/dist/layers.D7jGxypv.js +8 -0
  138. package/dist/layers.D7n2QyFM.js +48146 -0
  139. package/dist/layers.D8fdxG58.js +295 -0
  140. package/dist/layers.D9h1AMfz.js +8 -0
  141. package/dist/layers.DAsAtqWK.js +4 -0
  142. package/dist/layers.DBVrBhF0.js +1 -0
  143. package/dist/layers.DCWjWRvL.js +9 -0
  144. package/dist/layers.DD9dfhit.js +40 -0
  145. package/dist/layers.DHD10kvJ.js +1 -0
  146. package/dist/layers.DHZBzVaT.js +1283 -0
  147. package/dist/layers.DHfSJOOW.js +1 -0
  148. package/dist/layers.DKJQWPVn.js +32 -0
  149. package/dist/layers.DKUfWSX1.js +904 -0
  150. package/dist/layers.DLK-HpMV.js +1 -0
  151. package/dist/layers.DLjZPfF1.js +802 -0
  152. package/dist/layers.DLwuMfdd.js +84 -0
  153. package/dist/layers.DMIDFKxo.js +36 -0
  154. package/dist/layers.DMkBISW1.js +1 -0
  155. package/dist/layers.DN9HoVxI.js +18 -0
  156. package/dist/layers.DOrgOHBr.js +1 -0
  157. package/dist/layers.DRvKjryx.js +1265 -0
  158. package/dist/layers.DTMLuJKN.js +33 -0
  159. package/dist/layers.DUJa2ZOS.js +8 -0
  160. package/dist/layers.DVUWZ8Wt.js +37 -0
  161. package/dist/layers.DVrOJIL5.js +7 -0
  162. package/dist/layers.DY6GA9ww.js +9166 -0
  163. package/dist/layers.D_Imug13.js +8 -0
  164. package/dist/layers.D_KJI4uf.js +1 -0
  165. package/dist/layers.D_vzZUhY.js +1 -0
  166. package/dist/layers.DaCB9yHC.js +4 -0
  167. package/dist/layers.DbaKVP5e.js +1 -0
  168. package/dist/layers.DcjluSHw.js +84 -0
  169. package/dist/layers.De0fDaHO.js +40 -0
  170. package/dist/layers.DeEGG6FS.js +42 -0
  171. package/dist/layers.DfFJCPRD.js +373 -0
  172. package/dist/layers.DfLz3NUP.js +320 -0
  173. package/dist/layers.DhW2E_US.js +1580 -0
  174. package/dist/layers.DjUOC4st.js +16 -0
  175. package/dist/layers.DjbsplkN.js +32 -0
  176. package/dist/layers.DkaJchxc.js +6 -0
  177. package/dist/layers.DlGVcszu.js +1 -0
  178. package/dist/layers.DlfnKTKF.js +42 -0
  179. package/dist/layers.DnxO-9oO.js +1 -0
  180. package/dist/layers.DqSkTf9R.js +21763 -0
  181. package/dist/layers.Dr1JK1_Z.js +202 -0
  182. package/dist/layers.Dr8zNYOs.js +5 -0
  183. package/dist/layers.DsiNLArY.js +40 -0
  184. package/dist/layers.DtP3hMV0.js +10 -0
  185. package/dist/layers.Du1ZlY6H.js +40 -0
  186. package/dist/layers.Du8uQ4JH.js +1 -0
  187. package/dist/layers.DuQ8oZjN.js +1 -0
  188. package/dist/layers.DuwNlZRl.js +11 -0
  189. package/dist/layers.Dw7Dmv6Y.js +19 -0
  190. package/dist/layers.DxA6ocdw.js +70 -0
  191. package/dist/layers.Dy1naDTQ.js +14 -0
  192. package/dist/layers.E1TwhuY2.js +791 -0
  193. package/dist/layers.Eelq_G9Y.js +803 -0
  194. package/dist/layers.Eodu_OXz.js +2 -0
  195. package/dist/layers.H36OYk_h.js +5 -0
  196. package/dist/layers.HVpHwo9E.js +5 -0
  197. package/dist/layers.I-tmhwFG.js +39 -0
  198. package/dist/layers.Is4NOcYC.js +9 -0
  199. package/dist/layers.J20L8tWx.js +501 -0
  200. package/dist/layers.JWCLFILJ.js +1 -0
  201. package/dist/layers.Jm82B3Oj.js +116 -0
  202. package/dist/layers.L60GQ2sb.js +8 -0
  203. package/dist/layers.LJC22eKQ.js +7 -0
  204. package/dist/layers.MW6tobI-.js +6 -0
  205. package/dist/layers.MZ6d0DZp.js +10 -0
  206. package/dist/layers.M_62Sbj7.js +268 -0
  207. package/dist/layers.O8Nxijec.js +793 -0
  208. package/dist/layers.OLlYwVPc.js +14 -0
  209. package/dist/layers.Pw46DBip.js +59 -0
  210. package/dist/layers.U98UFPWm.js +207 -0
  211. package/dist/layers.VXlo2W40.js +36 -0
  212. package/dist/layers.VlKfhmpq.js +10 -0
  213. package/dist/layers.YOQy_t6q.js +40 -0
  214. package/dist/layers.ZoMyFX9M.js +2 -0
  215. package/dist/layers._1XiIhPh.js +7 -0
  216. package/dist/layers.ay_dYKjj.js +960 -0
  217. package/dist/layers.b0h5ZBmD.js +61 -0
  218. package/dist/layers.dDe6FHmh.js +36 -0
  219. package/dist/layers.dVkHa3a_.js +39 -0
  220. package/dist/layers.et7zjoY9.js +52 -0
  221. package/dist/layers.gryxZo3n.js +10 -0
  222. package/dist/layers.hPuFhhxl.js +41 -0
  223. package/dist/layers.hweLqW3I.js +261 -0
  224. package/dist/layers.kaOt41rd.js +9 -0
  225. package/dist/layers.lCpg7dOn.js +21 -0
  226. package/dist/layers.lLFiut9N.js +8 -0
  227. package/dist/layers.lNSz2AQQ.js +6 -0
  228. package/dist/layers.mV8zYAS9.js +39 -0
  229. package/dist/layers.oyyMMK1Q.js +21938 -0
  230. package/dist/layers.qFWUlMDP.js +282 -0
  231. package/dist/layers.t46sYkQh.js +96 -0
  232. package/dist/layers.tdFdnJVX.js +38 -0
  233. package/dist/layers.u4sk_7sk.js +6 -0
  234. package/dist/layers.uEa7jWOw.js +42 -0
  235. package/dist/layers.uKwUcHfW.js +9 -0
  236. package/dist/layers.v6694Ulr.js +425 -0
  237. package/dist/layers.xkw2pWfm.js +40 -0
  238. package/dist/layers.ytXaFkr-.js +1 -0
  239. package/dist/layers.z5ZNUv1T.js +38 -0
  240. package/package.json +18 -76
  241. package/dist/layers.7jmq6tBR.js +0 -2227
  242. package/dist/layers.B90YwJga.js +0 -4
  243. package/dist/layers.C03OvlLb.js +0 -6
  244. package/dist/layers.CJiIq6YQ.js +0 -1
  245. package/dist/layers.CXffIp2y.js +0 -864
  246. package/dist/layers.CZPeYQ9g.js +0 -3
  247. package/dist/layers.CZ_Lt7IL.js +0 -7
  248. package/dist/layers.Ci1-qkbn.js +0 -341
  249. package/dist/layers.Cnm-pECN.js +0 -2
  250. package/dist/layers.D6d62qQ_.js +0 -6774
  251. package/dist/layers.DNCgFYS7.js +0 -27
  252. package/dist/layers.Dev6Yrwi.js +0 -530
  253. package/dist/layers.Dgok89qX.js +0 -1
  254. package/dist/layers.Dq3o7sh3.js +0 -7723
  255. package/dist/layers.Duy8YzsH.js +0 -2511
  256. package/dist/layers.QjAkD17S.js +0 -3677
@@ -1,864 +0,0 @@
1
- import { jsx as t, jsxs as R } from "react/jsx-runtime";
2
- import { useContext as le, memo as Xe, useState as O, useMemo as j, useRef as ie, useEffect as X } from "react";
3
- import { useTranslation as U } from "react-i18next";
4
- import { useLexicalComposerContext as je } from "@lexical/react/LexicalComposerContext";
5
- import { Flex as Ue, UnstyledButton as qe, Loader as Ve, Text as ue, Progress as Ze, Tooltip as we, Modal as Je, Button as Ke, Menu as w, Portal as Qe } from "@mantine/core";
6
- import { $getNodeByKey as et, CLICK_COMMAND as tt, COMMAND_PRIORITY_NORMAL as nt, $createParagraphNode as rt, $getNearestNodeFromDOMNode as it, DecoratorNode as ot, FORMAT_ELEMENT_COMMAND as st, BLUR_COMMAND as ct, COMMAND_PRIORITY_LOW as ze, FOCUS_COMMAND as at, $getRoot as lt } from "lexical";
7
- import { C as de } from "./layers.7jmq6tBR.js";
8
- import { IconPalette as xe, IconLayoutSidebarLeftExpand as ut, IconSend as dt, IconReload as mt, IconShieldCheckFilled as ht, IconMessages as pt, IconFilter as gt, IconArrowBackUp as Me, IconMessage as ft, IconMusic as It, IconApi as yt, IconX as Ct, IconPaperclip as Et, IconAt as zt, IconCodeCircle as Mt, IconBaseline as be, IconExclamationCircle as Tt, IconAlertTriangle as Pt, IconCheck as Te, IconFile as ae, IconMoodSmile as Rt, IconBrandYoutube as _t, IconCheckupList as wt, IconDropletOff as xt, IconLayersSubtract as bt, IconLayersUnion as St, IconTableOff as kt, IconContainerOff as Dt, IconRowInsertBottom as Nt, IconRowInsertTop as vt, IconColumnInsertRight as Ot, IconColumnInsertLeft as Lt, IconArrowBarToRight as At, IconArrowBarToLeft as Ht, IconArrowBarToDown as Bt, IconArrowBarToUp as Ft, IconCut as Wt, IconClipboard as $t, IconCopy as Gt, IconDotsVertical as Yt, IconColumns3 as Xt, IconCaretRight as jt, IconTable as Se, IconTrash as Ut, IconPencil as qt, IconCircleX as Vt, IconCircleCheck as Zt, IconGripVertical as Jt, IconChevronRight as Kt, IconChevronDown as Qt, IconPlus as en, IconMinus as tn, IconSuperscript as nn, IconSubscript as rn, IconStrikethrough as on, IconFlipHorizontal as sn, IconAlignJustified as cn, IconAlignCenter as an, IconAlignRight as ln, IconAlignLeft as oe, IconPhotoCheck as un, IconPhoto as dn, IconBucketDroplet as mn, IconColorPicker as hn, IconLink as pn, IconUnderline as gn, IconItalic as fn, IconBold as In, IconArrowForwardUp as yn, IconLetterT as Cn, IconQuote as En, IconIndentIncrease as zn, IconListNumbers as ke, IconH3 as Mn, IconH2 as Tn, IconH1 as De, IconCode as Ne, IconListCheck as Pn, IconList as Rn, IconColumns2 as _n, IconTemplate as wn, IconApps as xn } from "@tabler/icons-react";
9
- import { ProjectIcon as bn } from "@layers-app/shared";
10
- import { aE as Sn, a4 as ve, a0 as kn, Z as Dn, a1 as Nn } from "./layers.Dq3o7sh3.js";
11
- import { l as Pe, O as vn, c as Re, U as On, I as Ln } from "./layers.Dev6Yrwi.js";
12
- import { createPortal as An } from "react-dom";
13
- import { ContentEditable as Hn } from "@lexical/react/LexicalContentEditable";
14
- import { $createHeadingNode as Bn } from "@lexical/rich-text";
15
- import { mergeRegister as Fn } from "@lexical/utils";
16
- import { V as Wn, W as $n, X as Gn, I as Yn, Y as Xn, Z as jn } from "./layers.D6d62qQ_.js";
17
- const _e = {
18
- bullet: Rn,
19
- check: Pn,
20
- "check-mark": Te,
21
- code: Ne,
22
- h1: De,
23
- h2: Tn,
24
- h3: Mn,
25
- number: ke,
26
- paragraph: zn,
27
- quote: En,
28
- fontFamily: Cn,
29
- undo: Me,
30
- redo: yn,
31
- bold: In,
32
- italic: fn,
33
- underline: gn,
34
- link: pn,
35
- "color-picker": hn,
36
- background: mn,
37
- photo: dn,
38
- "photo-check": un,
39
- "align-left": oe,
40
- "align-end": oe,
41
- "align-start": oe,
42
- "align-right": ln,
43
- "align-center": an,
44
- "align-justify": cn,
45
- "horizontal-rule": sn,
46
- strikethrough: on,
47
- subscript: rn,
48
- superscript: nn,
49
- minus: tn,
50
- plus: en,
51
- "chevron-down": Qt,
52
- "chevron-right": Kt,
53
- grip: Jt,
54
- "circle-check": Zt,
55
- "circle-x": Vt,
56
- pencil: qt,
57
- trash: Ut,
58
- table: Se,
59
- "caret-right": jt,
60
- grid: Xt,
61
- "dots-vertical": Yt,
62
- copy: Gt,
63
- clipboard: $t,
64
- cut: Wt,
65
- "arrow-bar-to-up": Ft,
66
- "arrow-bar-to-down": Bt,
67
- "arrow-bar-to-left": Ht,
68
- "arrow-bar-to-right": At,
69
- "column-insert-left": Lt,
70
- "column-insert-right": Ot,
71
- "row-insert-top": vt,
72
- "row-insert-bottom": Nt,
73
- "container-off": Dt,
74
- "table-off": kt,
75
- "layers-union": St,
76
- "layers-substract": bt,
77
- "сlear-format": xt,
78
- form: wt,
79
- youtube: _t,
80
- emoji: Rt,
81
- file: ae,
82
- success: Te,
83
- warning: Pt,
84
- alert: Tt,
85
- defaultOff: be,
86
- embed: Mt,
87
- at: zt,
88
- paperclip: Et,
89
- close: Ct,
90
- api: yt,
91
- music: It,
92
- message: ft,
93
- reply: Me,
94
- filter: gt,
95
- messages: pt,
96
- "shield-check": ht,
97
- reOpen: mt,
98
- send: dt,
99
- expandSidebar: ut,
100
- palette: xe
101
- }, T = ({
102
- name: e,
103
- iconStyle: i,
104
- ...c
105
- }) => {
106
- const r = _e[e] || _e.bullet;
107
- return /* @__PURE__ */ t(Ue, { gap: 0, justify: "center", align: "center", ...c, children: /* @__PURE__ */ t(r, { size: 18, stroke: 2, style: i, ...c }) });
108
- }, Mr = ({
109
- icon: e,
110
- title: i,
111
- pointerEvents: c = "auto",
112
- isLoading: r,
113
- progress: y,
114
- nodeKey: f,
115
- onAfterCancel: m,
116
- ...g
117
- }) => {
118
- const [I] = je(), { t: C } = U(), { fetchUploadMedia: a } = le(de), P = ((a == null ? void 0 : a.length) ?? 0) >= 5, E = () => {
119
- I.update(() => {
120
- const z = et(f);
121
- z && z.remove();
122
- });
123
- };
124
- return /* @__PURE__ */ R(
125
- qe,
126
- {
127
- className: "image-node-picker-button",
128
- styles: {
129
- root: {
130
- width: "100%",
131
- display: "flex",
132
- alignItems: "center",
133
- gap: "var(--mantine-spacing-sm)",
134
- flexDirection: "column",
135
- padding: "var(--mantine-spacing-md)",
136
- background: "var(--mantine-primary-color-light)",
137
- color: "var(--mantine-color-text)",
138
- borderRadius: "var(--mantine-radius-default)",
139
- opacity: 0.75,
140
- pointerEvents: r ? "none" : c,
141
- boxSizing: "border-box"
142
- }
143
- },
144
- ...g,
145
- children: [
146
- /* @__PURE__ */ R("div", { className: "empty-node-button__content", children: [
147
- r && !P && /* @__PURE__ */ t(Ve, { size: "xs", mb: 2, mr: 4, color: "gray" }),
148
- !r && /* @__PURE__ */ t(T, { name: e }),
149
- i,
150
- r && m && /* @__PURE__ */ t(
151
- ue,
152
- {
153
- component: "span",
154
- onClick: (z) => {
155
- z.stopPropagation(), m == null || m();
156
- },
157
- variant: "link",
158
- style: {
159
- marginLeft: "auto",
160
- cursor: "pointer",
161
- pointerEvents: "auto"
162
- },
163
- children: C("editor.cancel")
164
- }
165
- ),
166
- f && !r && /* @__PURE__ */ t(
167
- T,
168
- {
169
- style: { pointerEvents: "auto" },
170
- className: "delete-icon",
171
- name: "close",
172
- size: 22,
173
- onClick: E
174
- }
175
- )
176
- ] }),
177
- r && typeof y == "number" && P && /* @__PURE__ */ t(Ze, { w: "100%", value: y, animated: !0, transitionDuration: 200 })
178
- ]
179
- }
180
- );
181
- }, Un = "_title_81iwv_1", qn = "_icon_81iwv_11", Vn = "_link_81iwv_20", se = {
182
- title: Un,
183
- icon: qn,
184
- link: Vn
185
- }, Zn = ({ page: e }) => {
186
- const { t: i } = U();
187
- return /* @__PURE__ */ R("div", { className: se.link, onClick: e.onClick, children: [
188
- /* @__PURE__ */ t("div", { className: se.icon, children: e.icon ? /* @__PURE__ */ t(
189
- bn,
190
- {
191
- size: 16,
192
- fz: 16,
193
- icon: e.icon,
194
- fallback: /* @__PURE__ */ t(ae, { size: "1em" })
195
- }
196
- ) : /* @__PURE__ */ t(ae, { size: 16 }) }),
197
- /* @__PURE__ */ t(we, { label: e.title, disabled: !e.title, openDelay: 400, children: /* @__PURE__ */ t(ue, { truncate: !0, className: se.title, "data-empty": !e.title, children: e.title || i("editor.noTitle") }) })
198
- ] });
199
- }, Jn = Xe, Tr = Jn(Zn), Kn = {
200
- center: -8,
201
- right: 2,
202
- left: -18
203
- }, Qn = (e, i, c, r) => {
204
- const f = e.width / 2, m = e.height / 2, g = r == null ? void 0 : r.classList[1], I = Kn[g];
205
- switch (i) {
206
- case "nw-resize":
207
- return { x: 0, y: 0 };
208
- case "ne-resize":
209
- return { x: e.width - 16, y: 0 };
210
- case "sw-resize":
211
- return { x: 0, y: e.height - 16 };
212
- case "se-resize":
213
- return { x: e.width - 16, y: e.height - 16 };
214
- case "n-resize":
215
- return { x: f + I, y: 0 };
216
- case "s-resize":
217
- return { x: f + I, y: e.height - 16 };
218
- case "w-resize":
219
- return { x: 0, y: m - 8 };
220
- case "e-resize":
221
- return { x: e.width - 16, y: m - (c ? 17 : 8) };
222
- }
223
- }, er = (e, i, c, r = [
224
- "nw-resize",
225
- "ne-resize",
226
- "sw-resize",
227
- "se-resize",
228
- "n-resize",
229
- "s-resize",
230
- "w-resize",
231
- "e-resize"
232
- ]) => {
233
- const f = c <= 32, m = c >= e.height - 32, g = i <= 32, I = i >= e.width - 32;
234
- return f && g ? r.includes("nw-resize") ? "nw-resize" : "default" : f && I ? r.includes("ne-resize") ? "ne-resize" : "default" : m && g ? r.includes("sw-resize") ? "sw-resize" : "default" : m && I ? r.includes("se-resize") ? "se-resize" : "default" : f ? r.includes("n-resize") ? "n-resize" : "default" : m ? r.includes("s-resize") ? "s-resize" : "default" : g ? r.includes("w-resize") ? "w-resize" : "default" : I && r.includes("e-resize") ? "e-resize" : "default";
235
- }, G = 32, Y = (e, i) => e && typeof e == "number" ? Math.min(e / i * 100, 95.5) : 95.5;
236
- function tr(e) {
237
- const c = 100 - 4e3 / e;
238
- return { minResizePercent: Math.max(5, 9792 / e), maxWidthPercent: c };
239
- }
240
- const Pr = ({
241
- editor: e,
242
- width: i,
243
- height: c,
244
- initialHeight: r,
245
- initialWidth: y,
246
- children: f,
247
- onResizeStart: m,
248
- isIcon: g,
249
- onResizeEnd: I,
250
- alignment: C,
251
- isEmbed: a,
252
- type: P
253
- }) => {
254
- const [E, L] = O({ x: -1e3, y: -1e3 }), [z, q] = O(30), [F, V] = O("default"), [W, me] = O(!1), { imperativeHandleRef: $ } = le(de), [Z, J] = O(
255
- null
256
- ), S = j(
257
- () => Sn(C) || ["e-resize"],
258
- [C]
259
- ), Oe = S.length === 1 && S[0] === "e-resize", l = ie(null), he = ie(null), M = ie({
260
- rootHeight: 0,
261
- rootWidth: 0,
262
- ratio: 1,
263
- currentWidth: 0,
264
- currentWidthPercent: 0,
265
- currentHeight: 0,
266
- currentHeightPercent: 0,
267
- startWidth: 0,
268
- startWidthPercent: 0,
269
- startHeight: 0,
270
- startHeightPercent: 0,
271
- startX: 0,
272
- startY: 0,
273
- direction: "x",
274
- isResizing: !1,
275
- isTop: !1,
276
- isBottom: !1,
277
- isLeft: !1,
278
- isRight: !1
279
- }), k = (n, o = 95.5) => {
280
- var u;
281
- const h = (u = e._window) == null ? void 0 : u.innerWidth;
282
- if (h) {
283
- let p = 100;
284
- a && (p = 250);
285
- const d = p / h * 100;
286
- return n < d ? d : n > o ? o : n;
287
- } else
288
- return n < 20 ? 20 : n > 100 ? 100 : n;
289
- }, pe = (n, o) => {
290
- const h = Math.min(n, o);
291
- return 15 + (Math.max(200, Math.min(800, h)) - 100) / 500 * 15;
292
- }, ge = (n, o, h) => {
293
- if (V("default"), !W) return;
294
- let u = F;
295
- u = er(n, o, h, S), M.current.isResizing && (u = F), V(u), q(z), L((p) => Qn(
296
- n,
297
- u,
298
- a || !1,
299
- l.current
300
- ) || p);
301
- }, Le = (n) => {
302
- var p;
303
- if (Pe) return;
304
- n.preventDefault();
305
- const o = (p = l.current) == null ? void 0 : p.getBoundingClientRect();
306
- if (!o) return;
307
- const h = n.clientX - o.left, u = n.clientY - o.top;
308
- M.current.isResizing || ge(o, h, u);
309
- }, fe = (n, o = 12, h = 95.5, u = M.current.rootWidth) => {
310
- const p = l.current, d = M.current;
311
- if (!p || n.button === 2 || !(d != null && d.isResizing)) return;
312
- const x = p.getBoundingClientRect(), D = n.clientX - x.left, K = n.clientY - x.top;
313
- ge(x, D, K);
314
- const Q = 0.17, A = C === "right", H = C === "center", N = d.isLeft, v = d.isTop, B = d.isBottom, ee = d.direction === "y", s = d.isRight, b = Math.floor(
315
- A ? x.right - n.clientX - (x.right - d.startX) : n.clientX - d.startX
316
- ), te = Math.floor(n.clientY - d.startY);
317
- let _ = 0;
318
- N || s ? _ = b / u * 100 : (v || B || H) && (_ = te * Q), (N || v) && (!A || ee && !N) && (!B || H) && (_ = -_), (v && s || B && s) && (_ = b / u * 100), _ = Math.max(-100, Math.min(100, _));
319
- const ne = d.startWidthPercent + _, re = d.startHeightPercent + _;
320
- d.currentWidthPercent = k(
321
- Math.max(o, ne),
322
- h
323
- ), d.currentHeightPercent = k(
324
- Math.max(o, re),
325
- h
326
- ), p.style.width = `${d.currentWidthPercent}%`, p.style.height = `${d.currentHeightPercent}%`;
327
- }, Ae = (n) => {
328
- var p, d;
329
- const o = M.current;
330
- if (o.isResizing = !1, (p = l.current) == null || p.classList.remove("is-resizing"), (d = l.current) == null || d.releasePointerCapture(n.pointerId), I(
331
- o.currentWidthPercent + "%",
332
- o.currentHeightPercent + "%"
333
- ), document.removeEventListener("pointermove", fe), !l.current) return;
334
- const h = l.current.getBoundingClientRect(), u = pe(h.width, h.height);
335
- q(u);
336
- }, He = (n) => {
337
- var Ie, ye;
338
- if (n.button === 2 || !W) {
339
- n.preventDefault(), n.stopPropagation();
340
- return;
341
- }
342
- if (!l.current) return;
343
- l.current.classList.add("is-resizing");
344
- const o = e.getRootElement();
345
- if (!o) return;
346
- const h = o.getBoundingClientRect();
347
- if (!e.isEditable() || F === "default") return;
348
- const u = he.current;
349
- if (u === null) return;
350
- const p = (Ie = l.current) == null ? void 0 : Ie.getBoundingClientRect();
351
- if (!u.getBoundingClientRect() || !p) return;
352
- const { width: x, height: D, top: K, left: Q } = p, A = n.clientX - Q, H = n.clientY - K, N = H <= G, v = H >= D - G, B = A <= G, ee = A >= x - G, s = M.current, b = window.getComputedStyle(o), te = parseFloat(b.paddingTop), _ = parseFloat(b.paddingBottom), ne = parseFloat(b.paddingLeft), re = parseFloat(b.paddingRight);
353
- s.rootHeight = h.height - te - _ || 0, s.rootWidth = h.width - ne - re || 0, s.ratio = x / D, s.currentWidth = s.currentWidth || x, s.currentWidthPercent = +l.current.style.width.replace(
354
- "%",
355
- ""
356
- ), s.currentHeight = s.currentHeight || D, s.currentHeightPercent = +l.current.style.height.replace("%", ""), s.startX = n.clientX, s.startY = n.clientY, s.startWidth = s.currentWidth || x, s.startWidthPercent = s.currentWidthPercent, s.startHeight = s.currentHeight || D, s.startHeightPercent = s.currentHeightPercent, s.isResizing = !0, s.isTop = N, s.isBottom = v, s.isLeft = B, s.isRight = ee, s.direction = v || N ? "y" : "x", m && m(), l.current.setPointerCapture(n.pointerId);
357
- const We = ((ye = l.current.parentElement) == null ? void 0 : ye.offsetWidth) ?? s.rootWidth, { maxWidthPercent: $e, minResizePercent: Ge } = tr(We);
358
- document.addEventListener(
359
- "pointermove",
360
- (Ye) => {
361
- var Ce, Ee;
362
- return fe(
363
- Ye,
364
- P === "video" ? 40 : Ge,
365
- $e,
366
- (Ee = (Ce = l.current) == null ? void 0 : Ce.parentElement) == null ? void 0 : Ee.offsetWidth
367
- );
368
- }
369
- ), document.addEventListener("pointerup", Ae, {
370
- capture: !0,
371
- once: !0
372
- });
373
- };
374
- X(() => {
375
- var p;
376
- const n = l.current;
377
- if (!n) return;
378
- if (typeof i == "number" && typeof c == "number") {
379
- n.style.width = `${k(i)}%`, n.style.height = `${k(c)}%`;
380
- return;
381
- }
382
- const o = (p = n.parentElement) == null ? void 0 : p.getBoundingClientRect();
383
- if (!o) return;
384
- const h = Y(
385
- r,
386
- o.height
387
- ), u = Y(
388
- y,
389
- o.width
390
- );
391
- n.style.width = `${u}%`, n.style.height = `${h}%`;
392
- }, [i, c, y, r]), X(() => {
393
- var u;
394
- if (!l.current) return;
395
- const n = l.current.getBoundingClientRect(), o = (u = l.current.parentElement) == null ? void 0 : u.getBoundingClientRect(), h = pe(n.width, n.height);
396
- if (q(h), typeof i == "number" && typeof c == "number")
397
- l.current.style.width = `${k(i)}%`, l.current.style.height = `${k(c)}%`, M.current.currentWidthPercent = i, M.current.currentHeightPercent = c;
398
- else if (o) {
399
- const p = Y(
400
- r,
401
- o.height
402
- ), d = Y(
403
- y,
404
- o.width
405
- );
406
- requestAnimationFrame(() => {
407
- l.current && (l.current.style.height = `${p}%`, l.current.style.width = `${d}%`);
408
- }), M.current.currentWidthPercent = d, M.current.currentHeightPercent = p;
409
- } else
410
- l.current.style.height = "100%", l.current.style.width = "100%", M.current.currentWidthPercent = 100, M.current.currentHeightPercent = 100;
411
- }, [l.current, g, r, y]);
412
- const Be = (n) => {
413
- const h = n.target.closest("[data-lexical-decorator]");
414
- return h ? e.update(() => {
415
- const u = it(h);
416
- u && u instanceof ot && J(u);
417
- }) : J(null), !1;
418
- }, Fe = () => (Z && setTimeout(() => {
419
- e.update(() => (Z.insertAfter(rt()).selectStart(), J(null), !0));
420
- }), !1);
421
- return $ != null && $.current && ($.current.decoratorEnterAction = Fe), X(() => {
422
- const n = e.registerCommand(
423
- tt,
424
- Be,
425
- nt
426
- );
427
- return () => {
428
- n();
429
- };
430
- }, [Z]), Pe ? f : /* @__PURE__ */ R(
431
- "div",
432
- {
433
- ref: l,
434
- className: `resizable-container ${C || ""} ${Oe ? "hide-padding" : ""}`,
435
- style: { cursor: F },
436
- onMouseMove: Le,
437
- onMouseEnter: () => me(!0),
438
- onMouseLeave: () => {
439
- me(!1), V("default");
440
- },
441
- onMouseUp: () => {
442
- e.dispatchCommand(vn, "show_menu");
443
- },
444
- onPointerDown: He,
445
- children: [
446
- /* @__PURE__ */ t(
447
- "svg",
448
- {
449
- className: `resizable-container__handle ${W ? "hovered" : ""}`,
450
- style: {
451
- "--clip-x1": `${E.x - z}px`,
452
- "--clip-y1": `${E.y - z}px`,
453
- "--clip-x2": `${E.x + z}px`,
454
- "--clip-y2": `${E.y - z}px`,
455
- "--clip-x3": `${E.x + z}px`,
456
- "--clip-y3": `${E.y + z}px`,
457
- "--clip-x4": `${E.x - z}px`,
458
- "--clip-y4": `${E.y + z}px`,
459
- clipPath: `polygon(
460
- var(--clip-x1) var(--clip-y1),
461
- var(--clip-x2) var(--clip-y2),
462
- var(--clip-x3) var(--clip-y3),
463
- var(--clip-x4) var(--clip-y4)
464
- )`,
465
- opacity: W ? 1 : 0,
466
- transition: `${M.current.isResizing ? "none" : ` opacity 0.3s ease-in-out, clip-path ${(S == null ? void 0 : S.length) < 4 ? "0.2s" : "0.3s"} cubic-bezier(0.825, 0.225, 0.280, 0.770)`}`
467
- },
468
- children: /* @__PURE__ */ t(
469
- "rect",
470
- {
471
- x: 0,
472
- y: 0,
473
- width: "100%",
474
- height: "100%",
475
- stroke: "#D9D9D9",
476
- strokeWidth: 8,
477
- rx: 15,
478
- ry: 15,
479
- fill: "none"
480
- }
481
- )
482
- }
483
- ),
484
- /* @__PURE__ */ t(
485
- "div",
486
- {
487
- ref: he,
488
- className: "resizable-container__inner",
489
- style: {
490
- height: "100%",
491
- width: "100%",
492
- pointerEvents: M.current.isResizing ? "none" : "auto"
493
- },
494
- children: f
495
- }
496
- )
497
- ]
498
- }
499
- );
500
- };
501
- function Rr({
502
- children: e
503
- }) {
504
- return An(
505
- /* @__PURE__ */ t("div", { className: "FlashMessage__overlay", role: "dialog", children: /* @__PURE__ */ t("p", { className: "FlashMessage__alert", role: "alert", children: e }) }),
506
- document.body
507
- );
508
- }
509
- function _r({
510
- onClose: e,
511
- children: i,
512
- title: c,
513
- size: r
514
- }) {
515
- return /* @__PURE__ */ t(
516
- Je,
517
- {
518
- className: "doc-space-editor-wrapper",
519
- size: r,
520
- centered: !0,
521
- opened: !0,
522
- onClose: e,
523
- title: c,
524
- zIndex: 999,
525
- children: i
526
- }
527
- );
528
- }
529
- function wr({
530
- "data-test-id": e,
531
- children: i,
532
- className: c,
533
- onClick: r,
534
- disabled: y,
535
- small: f,
536
- title: m
537
- }) {
538
- return /* @__PURE__ */ t(Ke, { onClick: r, disabled: y, variant: "filled", children: i });
539
- }
540
- const xr = ({
541
- label: e,
542
- icon: i
543
- }) => /* @__PURE__ */ R("div", { className: "custom-menu-item", children: [
544
- /* @__PURE__ */ R("div", { children: [
545
- i,
546
- /* @__PURE__ */ t("span", { children: e })
547
- ] }),
548
- /* @__PURE__ */ t(T, { name: "chevron-right" })
549
- ] }), nr = (e) => ({
550
- center: {
551
- icon: "align-center",
552
- iconRTL: "center-align",
553
- name: e("editor.toolbar.center")
554
- },
555
- end: {
556
- icon: "align-end",
557
- iconRTL: "left-align",
558
- name: "End Align"
559
- },
560
- justify: {
561
- icon: "align-justify",
562
- iconRTL: "justify-align",
563
- name: e("editor.toolbar.justify")
564
- },
565
- left: {
566
- icon: "align-left",
567
- iconRTL: "left-align",
568
- name: e("editor.toolbar.left")
569
- },
570
- right: {
571
- icon: "align-right",
572
- iconRTL: "left-align",
573
- name: e("editor.toolbar.right")
574
- },
575
- start: {
576
- icon: "align-start",
577
- iconRTL: "right-align",
578
- name: "Start Align"
579
- }
580
- });
581
- function br({
582
- editor: e,
583
- value: i,
584
- // isRTL,
585
- disabled: c = !1,
586
- setElementFormat: r
587
- }) {
588
- const { t: y, i18n: f } = U(), m = j(
589
- () => nr(y),
590
- [f.language]
591
- ), g = j(() => i === "start" || i === "end" ? m.left : m[i || "left"], [i, f.language]), I = (C) => {
592
- r(C), e.dispatchCommand(st, C);
593
- };
594
- return /* @__PURE__ */ R(
595
- w,
596
- {
597
- transitionProps: ve,
598
- shadow: "md",
599
- styles: { dropdown: { zIndex: 1e3 } },
600
- children: [
601
- /* @__PURE__ */ t(w.Target, { children: /* @__PURE__ */ t(we, { label: y("editor.toolbar.align"), children: /* @__PURE__ */ R(
602
- "button",
603
- {
604
- disabled: c,
605
- className: "toolbar-item spaced alignment",
606
- "aria-label": "Formatting options for text alignment",
607
- type: "button",
608
- children: [
609
- /* @__PURE__ */ t(T, { size: 18, name: g.icon }),
610
- /* @__PURE__ */ R(ue, { mx: 5, size: "sm", children: [
611
- " ",
612
- g.name
613
- ] }),
614
- /* @__PURE__ */ t(T, { name: "chevron-down" })
615
- ]
616
- }
617
- ) }) }),
618
- /* @__PURE__ */ R(
619
- w.Dropdown,
620
- {
621
- onMouseDown: (C) => {
622
- C.preventDefault();
623
- },
624
- children: [
625
- /* @__PURE__ */ t(
626
- w.Item,
627
- {
628
- leftSection: /* @__PURE__ */ t(T, { size: 18, name: "align-left" }),
629
- rightSection: i === "left" && /* @__PURE__ */ t(T, { name: "check-mark" }),
630
- onClick: () => I("left"),
631
- children: m.left.name
632
- }
633
- ),
634
- /* @__PURE__ */ t(
635
- w.Item,
636
- {
637
- leftSection: /* @__PURE__ */ t(T, { size: 18, name: "align-center" }),
638
- rightSection: i === "center" && /* @__PURE__ */ t(T, { name: "check-mark" }),
639
- onClick: () => I("center"),
640
- children: m.center.name
641
- }
642
- ),
643
- /* @__PURE__ */ t(
644
- w.Item,
645
- {
646
- leftSection: /* @__PURE__ */ t(T, { size: 18, name: "align-right" }),
647
- rightSection: i === "right" && /* @__PURE__ */ t(T, { name: "check-mark" }),
648
- onClick: () => I("right"),
649
- children: m.right.name
650
- }
651
- ),
652
- /* @__PURE__ */ t(
653
- w.Item,
654
- {
655
- leftSection: /* @__PURE__ */ t(T, { size: 18, name: "align-justify" }),
656
- rightSection: i === "justify" && /* @__PURE__ */ t(T, { name: "check-mark" }),
657
- onClick: () => I("justify"),
658
- children: m.justify.name
659
- }
660
- )
661
- ]
662
- }
663
- )
664
- ]
665
- }
666
- );
667
- }
668
- function Sr({
669
- className: e
670
- }) {
671
- return /* @__PURE__ */ t(
672
- Hn,
673
- {
674
- contentEditable: !1,
675
- className: e || "ContentEditable__root"
676
- }
677
- );
678
- }
679
- const rr = "_listContainer_1d88b_1", ir = "_list_1d88b_1", or = "_text_1d88b_28", ce = {
680
- listContainer: rr,
681
- list: ir,
682
- text: or
683
- }, kr = ({ editor: e }) => {
684
- var C;
685
- const [i, c] = O(!1), { t: r, i18n: y } = U(), { excludeNodes: f } = le(de), m = (a) => {
686
- const P = document.querySelector(".editor-container");
687
- if (a) {
688
- P.classList.add("empty-editor");
689
- return;
690
- }
691
- P.classList.remove("empty-editor");
692
- };
693
- X(() => {
694
- e.update(() => {
695
- Re() && (c(!0), m(!0));
696
- }), Fn(
697
- e.registerCommand(
698
- ct,
699
- () => {
700
- const a = !!Re();
701
- return c(a), m(a), !1;
702
- },
703
- ze
704
- ),
705
- e.registerCommand(
706
- at,
707
- () => (c(!1), m(!1), !1),
708
- ze
709
- )
710
- );
711
- }, []);
712
- const g = (a, P) => {
713
- a == null || a.update(() => {
714
- a.focus();
715
- const L = lt().getFirstChild();
716
- L && P && (P(L), c(!1));
717
- });
718
- }, I = j(() => [
719
- {
720
- title: r("editor.emptyPageOptions.heading"),
721
- icon: /* @__PURE__ */ t(De, { stroke: 2, size: 18 }),
722
- onSelect: () => g(e, (a) => {
723
- a.replace(Bn("h1"));
724
- })
725
- },
726
- {
727
- title: r("editor.emptyPageOptions.grid"),
728
- icon: /* @__PURE__ */ t(_n, { stroke: 2, size: 18 }),
729
- onSelect: () => {
730
- g(e, () => {
731
- e == null || e.dispatchCommand(
732
- Gn,
733
- Yn
734
- );
735
- });
736
- }
737
- },
738
- {
739
- title: r("editor.emptyPageOptions.list"),
740
- icon: /* @__PURE__ */ t(ke, { stroke: 2, size: 18 }),
741
- onSelect: () => {
742
- g(e, () => {
743
- e == null || e.dispatchCommand(Dn, void 0);
744
- });
745
- }
746
- },
747
- {
748
- title: r("editor.emptyPageOptions.code"),
749
- icon: /* @__PURE__ */ t(Ne, { stroke: 2, size: 18 }),
750
- onSelect: () => {
751
- g(e, () => {
752
- e == null || e.dispatchCommand(Xn, void 0);
753
- });
754
- }
755
- },
756
- {
757
- title: r("editor.menu.media.excalidraw.hint.description"),
758
- icon: /* @__PURE__ */ t(xe, { stroke: 2, size: 18 }),
759
- onSelect: () => {
760
- import("./layers.D6d62qQ_.js").then((a) => a.ac).then(
761
- ({ INSERT_EXCALIDRAW_COMMAND: a }) => {
762
- g(e, () => {
763
- e.dispatchCommand(a, void 0);
764
- });
765
- }
766
- );
767
- }
768
- },
769
- f.template ? {
770
- title: r("editor.emptyPageOptions.template"),
771
- icon: /* @__PURE__ */ t(wn, { stroke: 2, size: 18 }),
772
- onSelect: () => {
773
- g(e, () => {
774
- e == null || e.dispatchCommand(On, void 0);
775
- });
776
- }
777
- } : null,
778
- {
779
- title: r("editor.emptyPageOptions.callout"),
780
- icon: /* @__PURE__ */ t(be, { stroke: 2, size: 18 }),
781
- onSelect: () => {
782
- g(e, () => {
783
- setTimeout(() => {
784
- e == null || e.dispatchCommand(Ln, "success");
785
- });
786
- });
787
- }
788
- },
789
- {
790
- title: r("editor.emptyPageOptions.table"),
791
- icon: /* @__PURE__ */ t(Se, { stroke: 2, size: 18 }),
792
- onSelect: () => {
793
- g(e, () => {
794
- setTimeout(() => {
795
- e == null || e.dispatchCommand(Nn, {
796
- columns: "4",
797
- includeHeaders: !1,
798
- rows: "3"
799
- });
800
- });
801
- });
802
- }
803
- },
804
- {
805
- title: r("editor.emptyPageOptions.integrations"),
806
- icon: /* @__PURE__ */ t(xn, { stroke: 2, size: 18 }),
807
- onSelect: () => {
808
- }
809
- }
810
- ], [y.language]);
811
- return i ? /* @__PURE__ */ t(Qe, { target: ((C = e == null ? void 0 : e._rootElement) == null ? void 0 : C.parentElement) || document.body, children: /* @__PURE__ */ t("ul", { className: `${ce.listContainer} empty-page-options`, children: I.map((a, P) => a ? /* @__PURE__ */ R(
812
- w,
813
- {
814
- disabled: P !== I.length - 1,
815
- position: "bottom-start",
816
- shadow: "md",
817
- styles: { dropdown: { overflow: "auto", zIndex: 1e3 } },
818
- middlewares: Wn,
819
- width: 200,
820
- transitionProps: ve,
821
- children: [
822
- /* @__PURE__ */ t(w.Target, { children: /* @__PURE__ */ R("li", { className: ce.list, onClick: a.onSelect, children: [
823
- a.icon,
824
- " ",
825
- /* @__PURE__ */ t("span", { className: ce.text, children: a.title })
826
- ] }) }),
827
- /* @__PURE__ */ t(w.Dropdown, { children: kn.map((E) => /* @__PURE__ */ t(
828
- w.Item,
829
- {
830
- className: "item " + $n(E.key === "1"),
831
- leftSection: E.icon,
832
- style: { borderRadius: "var(--mantine-radius-sm)" },
833
- onClick: () => {
834
- g(e, () => {
835
- setTimeout(() => {
836
- e == null || e.dispatchCommand(
837
- jn,
838
- ""
839
- ), c(!1);
840
- });
841
- });
842
- },
843
- children: E.name
844
- },
845
- E.name
846
- )) })
847
- ]
848
- },
849
- a.title
850
- ) : null) }) }) : null;
851
- };
852
- export {
853
- br as A,
854
- wr as B,
855
- xr as C,
856
- kr as E,
857
- Rr as F,
858
- T as I,
859
- Sr as L,
860
- _r as M,
861
- Tr as P,
862
- Pr as R,
863
- Mr as a
864
- };