@solibo/solibo-ui 2.2.13 → 2.2.14

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 (180) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index10.css +1 -1
  3. package/dist/assets/index11.css +1 -1
  4. package/dist/assets/index12.css +1 -1
  5. package/dist/assets/index13.css +1 -1
  6. package/dist/assets/index14.css +1 -1
  7. package/dist/assets/index15.css +1 -1
  8. package/dist/assets/index16.css +1 -1
  9. package/dist/assets/index17.css +1 -1
  10. package/dist/assets/index18.css +1 -1
  11. package/dist/assets/index19.css +1 -1
  12. package/dist/assets/index20.css +1 -1
  13. package/dist/assets/index21.css +1 -1
  14. package/dist/assets/index22.css +1 -1
  15. package/dist/assets/index23.css +1 -1
  16. package/dist/assets/index24.css +1 -1
  17. package/dist/assets/index25.css +1 -1
  18. package/dist/assets/index26.css +1 -1
  19. package/dist/assets/index27.css +1 -1
  20. package/dist/assets/index28.css +1 -1
  21. package/dist/assets/index29.css +1 -1
  22. package/dist/assets/index3.css +1 -1
  23. package/dist/assets/index30.css +1 -1
  24. package/dist/assets/index31.css +1 -1
  25. package/dist/assets/index32.css +1 -1
  26. package/dist/assets/index33.css +1 -1
  27. package/dist/assets/index34.css +1 -1
  28. package/dist/assets/index35.css +1 -1
  29. package/dist/assets/index36.css +1 -1
  30. package/dist/assets/index37.css +1 -1
  31. package/dist/assets/index38.css +1 -1
  32. package/dist/assets/index39.css +1 -1
  33. package/dist/assets/index40.css +1 -1
  34. package/dist/assets/index41.css +1 -1
  35. package/dist/assets/index42.css +1 -1
  36. package/dist/assets/index43.css +1 -1
  37. package/dist/assets/index44.css +1 -1
  38. package/dist/assets/index45.css +1 -1
  39. package/dist/assets/index46.css +1 -1
  40. package/dist/assets/index47.css +1 -1
  41. package/dist/assets/index48.css +1 -1
  42. package/dist/assets/index49.css +1 -1
  43. package/dist/assets/index50.css +1 -1
  44. package/dist/assets/index51.css +1 -1
  45. package/dist/assets/index52.css +1 -1
  46. package/dist/assets/index53.css +1 -1
  47. package/dist/assets/index54.css +1 -1
  48. package/dist/assets/index55.css +1 -1
  49. package/dist/assets/index56.css +1 -1
  50. package/dist/assets/index57.css +1 -1
  51. package/dist/assets/index58.css +1 -1
  52. package/dist/assets/index59.css +1 -0
  53. package/dist/assets/index6.css +1 -1
  54. package/dist/assets/index60.css +1 -0
  55. package/dist/components/app-link/index.cjs +1 -1
  56. package/dist/components/app-link/index.js +9 -9
  57. package/dist/components/app-shell/index.cjs +1 -1
  58. package/dist/components/app-shell/index.js +1 -1
  59. package/dist/components/aside/index.cjs +1 -1
  60. package/dist/components/aside/index.js +1 -1
  61. package/dist/components/avatar/index.cjs +1 -1
  62. package/dist/components/avatar/index.js +38 -39
  63. package/dist/components/badge/index.cjs +1 -1
  64. package/dist/components/badge/index.js +1 -1
  65. package/dist/components/banner/index.cjs +1 -1
  66. package/dist/components/banner/index.js +1 -1
  67. package/dist/components/branding/index.cjs +1 -1
  68. package/dist/components/branding/index.js +1 -1
  69. package/dist/components/button/index.cjs +1 -1
  70. package/dist/components/button/index.js +1 -1
  71. package/dist/components/card/index.cjs +1 -1
  72. package/dist/components/card/index.js +49 -49
  73. package/dist/components/checkbox/index.cjs +1 -1
  74. package/dist/components/checkbox/index.js +23 -17
  75. package/dist/components/chip/index.cjs +1 -1
  76. package/dist/components/chip/index.js +1 -1
  77. package/dist/components/clipboard/index.cjs +1 -1
  78. package/dist/components/clipboard/index.js +1 -1
  79. package/dist/components/collapsible/index.cjs +1 -1
  80. package/dist/components/collapsible/index.js +1 -1
  81. package/dist/components/comment/index.cjs +1 -1
  82. package/dist/components/comment/index.js +1 -1
  83. package/dist/components/comments/index.cjs +1 -1
  84. package/dist/components/comments/index.js +2 -2
  85. package/dist/components/controls/index.cjs +1 -1
  86. package/dist/components/controls/index.js +1 -1
  87. package/dist/components/croppable/index.cjs +1 -1
  88. package/dist/components/croppable/index.js +152 -152
  89. package/dist/components/dialog/index.cjs +1 -1
  90. package/dist/components/dialog/index.js +1 -1
  91. package/dist/components/divider/index.cjs +1 -1
  92. package/dist/components/divider/index.js +1 -1
  93. package/dist/components/dropdown/index.cjs +1 -1
  94. package/dist/components/dropdown/index.js +3 -3
  95. package/dist/components/dropzone/index.cjs +1 -1
  96. package/dist/components/dropzone/index.js +1 -1
  97. package/dist/components/editor/index.cjs +1 -1
  98. package/dist/components/editor/index.js +237 -234
  99. package/dist/components/empty-state/index.cjs +1 -1
  100. package/dist/components/empty-state/index.js +1 -1
  101. package/dist/components/fieldset/index.cjs +1 -1
  102. package/dist/components/fieldset/index.js +1 -1
  103. package/dist/components/figure/index.cjs +1 -1
  104. package/dist/components/figure/index.js +1 -1
  105. package/dist/components/file/index.cjs +1 -1
  106. package/dist/components/file/index.js +1 -1
  107. package/dist/components/footer/index.cjs +1 -1
  108. package/dist/components/footer/index.js +1 -1
  109. package/dist/components/form/index.cjs +1 -1
  110. package/dist/components/form/index.js +21 -12
  111. package/dist/components/graph/index.cjs +1 -1
  112. package/dist/components/graph/index.js +1 -1
  113. package/dist/components/group/index.cjs +1 -1
  114. package/dist/components/group/index.js +1 -1
  115. package/dist/components/header/index.cjs +1 -1
  116. package/dist/components/header/index.js +1 -1
  117. package/dist/components/icon/index.cjs +1 -1
  118. package/dist/components/icon/index.js +1 -1
  119. package/dist/components/iframe/index.cjs +1 -1
  120. package/dist/components/iframe/index.js +2 -2
  121. package/dist/components/image/index.cjs +1 -1
  122. package/dist/components/image/index.js +1 -1
  123. package/dist/components/input/index.cjs +1 -1
  124. package/dist/components/input/index.js +4 -2
  125. package/dist/components/label/index.cjs +1 -0
  126. package/dist/components/label/index.js +18 -0
  127. package/dist/components/link/index.cjs +1 -1
  128. package/dist/components/link/index.js +1 -1
  129. package/dist/components/list/index.cjs +1 -1
  130. package/dist/components/list/index.js +1 -1
  131. package/dist/components/loading/index.cjs +1 -1
  132. package/dist/components/loading/index.js +1 -1
  133. package/dist/components/message/index.cjs +1 -1
  134. package/dist/components/message/index.js +2 -2
  135. package/dist/components/messages/index.cjs +1 -1
  136. package/dist/components/messages/index.js +2 -2
  137. package/dist/components/nav/index.cjs +1 -1
  138. package/dist/components/nav/index.js +1 -1
  139. package/dist/components/object/index.cjs +1 -1
  140. package/dist/components/object/index.js +1 -1
  141. package/dist/components/page-layout/index.cjs +1 -1
  142. package/dist/components/page-layout/index.js +1 -1
  143. package/dist/components/panel/index.cjs +1 -1
  144. package/dist/components/panel/index.js +1 -1
  145. package/dist/components/popover/index.cjs +1 -1
  146. package/dist/components/popover/index.js +1 -1
  147. package/dist/components/portal/index.cjs +1 -1
  148. package/dist/components/portal/index.js +1 -1
  149. package/dist/components/radio/index.cjs +1 -0
  150. package/dist/components/radio/index.js +35 -0
  151. package/dist/components/search/index.cjs +1 -1
  152. package/dist/components/search/index.js +2 -2
  153. package/dist/components/select/index.cjs +1 -1
  154. package/dist/components/select/index.js +3 -2
  155. package/dist/components/textarea/index.cjs +1 -1
  156. package/dist/components/textarea/index.js +30 -29
  157. package/dist/components/toggle/index.cjs +1 -1
  158. package/dist/components/toggle/index.js +16 -16
  159. package/dist/components/toolbar/index.cjs +1 -1
  160. package/dist/components/toolbar/index.js +8 -9
  161. package/dist/components/tooltip/index.cjs +1 -1
  162. package/dist/components/tooltip/index.js +1 -1
  163. package/dist/{index-DqZSdMHT.cjs → index-B4dFheLl.cjs} +1 -1
  164. package/dist/{index-KGoXYG8u.js → index-BJiUk1q2.js} +2 -2
  165. package/dist/index-BQoXmNo3.cjs +1 -0
  166. package/dist/index-Bre56YYa.js +90 -0
  167. package/dist/{index-Bl5EEYDv.cjs → index-BwfsmdF6.cjs} +1 -1
  168. package/dist/index-CHJNMNDr.cjs +1 -0
  169. package/dist/index-GPsHvb4d.js +74 -0
  170. package/dist/{index-DQuc_Zkg.js → index-acMNM3VJ.js} +1 -1
  171. package/dist/index.cjs +1 -1
  172. package/dist/index.d.ts +30 -7
  173. package/dist/index.js +74 -70
  174. package/dist/tokens.css +79 -38
  175. package/dist/tokens.json +627 -257
  176. package/package.json +1 -1
  177. package/dist/index-FSKjg3Z8.js +0 -82
  178. package/dist/index-HVXauXrX.js +0 -73
  179. package/dist/index-S1XsOUKE.cjs +0 -1
  180. package/dist/index-riaH5c_S.cjs +0 -1
@@ -1,13 +1,13 @@
1
- import '../../assets/index44.css';var Et = Object.defineProperty;
2
- var Rt = (l, e, t) => e in l ? Et(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
- var J = (l, e, t) => Rt(l, typeof e != "symbol" ? e + "" : e, t);
4
- import { jsxs as F, jsx as s, Fragment as ht } from "react/jsx-runtime";
5
- import { $generateHtmlFromNodes as Ot, $generateNodesFromDOM as $t } from "@lexical/html";
6
- import { TOGGLE_LINK_COMMAND as _t, $isLinkNode as st, AutoLinkNode as Ut, LinkNode as Ht } from "@lexical/link";
1
+ import '../../assets/index43.css';var Rt = Object.defineProperty;
2
+ var Ot = (a, e, t) => e in a ? Rt(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var J = (a, e, t) => Ot(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { jsxs as U, jsx as s, Fragment as ht } from "react/jsx-runtime";
5
+ import { $generateHtmlFromNodes as $t, $generateNodesFromDOM as Ut } from "@lexical/html";
6
+ import { TOGGLE_LINK_COMMAND as _t, $isLinkNode as st, AutoLinkNode as zt, LinkNode as Ht } from "@lexical/link";
7
7
  import { $isListNode as bt, $isListItemNode as Dt, REMOVE_LIST_COMMAND as Bt, INSERT_UNORDERED_LIST_COMMAND as Ft, ListNode as Wt, ListItemNode as jt } from "@lexical/list";
8
8
  import { AutoFocusPlugin as Kt } from "@lexical/react/LexicalAutoFocusPlugin";
9
9
  import { AutoLinkPlugin as Gt } from "@lexical/react/LexicalAutoLinkPlugin";
10
- import { useLexicalComposerContext as At } from "@lexical/react/LexicalComposerContext";
10
+ import { useLexicalComposerContext as Ct } from "@lexical/react/LexicalComposerContext";
11
11
  import { ContentEditable as qt } from "@lexical/react/LexicalContentEditable";
12
12
  import { LexicalErrorBoundary as Yt } from "@lexical/react/LexicalErrorBoundary";
13
13
  import { LexicalExtensionComposer as Zt } from "@lexical/react/LexicalExtensionComposer";
@@ -16,47 +16,47 @@ import { LinkPlugin as Xt } from "@lexical/react/LexicalLinkPlugin";
16
16
  import { ListPlugin as Jt } from "@lexical/react/LexicalListPlugin";
17
17
  import { OnChangePlugin as Qt } from "@lexical/react/LexicalOnChangePlugin";
18
18
  import { RichTextPlugin as te } from "@lexical/react/LexicalRichTextPlugin";
19
- import at from "classix";
20
- import { $getNodeByKey as gt, $isParagraphNode as xt, DecoratorNode as ee, $applyNodeReplacement as re, createCommand as zt, COMMAND_PRIORITY_HIGH as Mt, PASTE_COMMAND as ie, $insertNodes as Lt, $isRangeSelection as vt, $setSelection as St, $getSelection as It, $isTextNode as lt, $createTextNode as ne, $isNodeSelection as oe, COMMAND_PRIORITY_LOW as yt, SELECTION_CHANGE_COMMAND as se, FORMAT_TEXT_COMMAND as wt, defineExtension as le, $getRoot as ae, CLEAR_HISTORY_COMMAND as ce } from "lexical";
21
- import { useRef as L, useState as w, useEffect as Z, useCallback as k, useId as ue } from "react";
22
- import Ct from "sanitize-html";
23
- import { Button as P } from "../button/index.js";
19
+ import lt from "classix";
20
+ import { $getNodeByKey as gt, $isParagraphNode as Nt, DecoratorNode as ee, $applyNodeReplacement as re, createCommand as St, COMMAND_PRIORITY_HIGH as At, PASTE_COMMAND as ie, $insertNodes as kt, $isRangeSelection as vt, $setSelection as Pt, $getSelection as It, $isTextNode as at, $createTextNode as ne, $isNodeSelection as oe, COMMAND_PRIORITY_LOW as Lt, SELECTION_CHANGE_COMMAND as se, FORMAT_TEXT_COMMAND as yt, defineExtension as ae, $getRoot as le, CLEAR_HISTORY_COMMAND as ce } from "lexical";
21
+ import { useRef as k, useState as y, useEffect as Z, useCallback as x, useId as ue } from "react";
22
+ import wt from "sanitize-html";
23
+ import { Button as T } from "../button/index.js";
24
24
  import { File as de } from "../file/index.js";
25
+ import { Icon as E } from "../icon/index.js";
25
26
  import { mergeRegister as me } from "@lexical/utils";
26
- import { Icon as O } from "../icon/index.js";
27
- import { I as Nt } from "../../index-FSKjg3Z8.js";
27
+ import { I as Mt } from "../../index-Bre56YYa.js";
28
28
  import { Toolbar as he } from "../toolbar/index.js";
29
- const ge = "_field_mzlbe_3", fe = "_editor_mzlbe_8", pe = "_submit_mzlbe_26", _e = "_resizable_mzlbe_71", be = "_resized_mzlbe_75", De = "_invalid_mzlbe_101", ve = "_error_mzlbe_105", Ie = "_dragging_mzlbe_111", we = "_content_mzlbe_115", Ce = "_embedded_mzlbe_127", ke = "_files_mzlbe_147", Ae = "_placeholder_mzlbe_156", Le = "_fill_mzlbe_164", Me = "_meta_mzlbe_196", ye = "_active_mzlbe_205", Ne = "_bold_mzlbe_276", xe = "_italic_mzlbe_280", ze = "_underline_mzlbe_284", Se = "_link_mzlbe_288", Pe = "_list_mzlbe_294", Te = "_paragraph_mzlbe_295", g = {
29
+ const ge = "_field_x93yd_3", fe = "_editor_x93yd_8", pe = "_submit_x93yd_23", _e = "_resizable_x93yd_68", be = "_resized_x93yd_72", De = "_invalid_x93yd_98", ve = "_error_x93yd_102", Ie = "_dragging_x93yd_108", ye = "_content_x93yd_112", we = "_embedded_x93yd_124", xe = "_files_x93yd_144", Ce = "_placeholder_x93yd_154", ke = "_fill_x93yd_162", Ae = "_meta_x93yd_194", Le = "_active_x93yd_203", Me = "_bold_x93yd_272", Ne = "_italic_x93yd_276", Se = "_underline_x93yd_280", Pe = "_link_x93yd_284", Te = "_list_x93yd_290", Ee = "_paragraph_x93yd_291", g = {
30
30
  field: ge,
31
31
  editor: fe,
32
32
  submit: pe,
33
- "image-resize-handle": "_image-resize-handle_mzlbe_50",
34
- "with-controls": "_with-controls_mzlbe_56",
33
+ "image-resize-handle": "_image-resize-handle_x93yd_47",
34
+ "with-controls": "_with-controls_x93yd_53",
35
35
  resizable: _e,
36
36
  resized: be,
37
- "resize-handle": "_resize-handle_mzlbe_79",
37
+ "resize-handle": "_resize-handle_x93yd_76",
38
38
  invalid: De,
39
39
  error: ve,
40
40
  dragging: Ie,
41
- content: we,
42
- embedded: Ce,
43
- "has-files": "_has-files_mzlbe_143",
44
- files: ke,
45
- placeholder: Ae,
46
- fill: Le,
47
- "fill-editor": "_fill-editor_mzlbe_172",
48
- meta: Me,
49
- active: ye,
50
- "inline-image": "_inline-image_mzlbe_217",
51
- bold: Ne,
52
- italic: xe,
53
- underline: ze,
54
- link: Se,
55
- list: Pe,
56
- paragraph: Te
41
+ content: ye,
42
+ embedded: we,
43
+ "has-files": "_has-files_x93yd_140",
44
+ files: xe,
45
+ placeholder: Ce,
46
+ fill: ke,
47
+ "fill-editor": "_fill-editor_x93yd_170",
48
+ meta: Ae,
49
+ active: Le,
50
+ "inline-image": "_inline-image_x93yd_215",
51
+ bold: Me,
52
+ italic: Ne,
53
+ underline: Se,
54
+ link: Pe,
55
+ list: Te,
56
+ paragraph: Ee
57
57
  };
58
- function Ee({
59
- alt: l = "",
58
+ function Re({
59
+ alt: a = "",
60
60
  editor: e,
61
61
  height: t,
62
62
  nodeKey: c,
@@ -65,67 +65,67 @@ function Ee({
65
65
  src: b,
66
66
  width: n
67
67
  }) {
68
- const a = L(null), p = L(null), [z, C] = w(), v = () => {
68
+ const l = k(null), p = k(null), [S, w] = y(), v = () => {
69
69
  const o = e.getRootElement();
70
70
  if (!o) return 1 / 0;
71
71
  const u = getComputedStyle(o);
72
72
  return Math.max(1, o.clientWidth - (parseFloat(u.paddingLeft) || 0) - (parseFloat(u.paddingRight) || 0));
73
- }, M = (o, u = v()) => Math.round(Math.min(u, Math.max(Math.min(32, u), o))), $ = (o) => {
73
+ }, A = (o, u = v()) => Math.round(Math.min(u, Math.max(Math.min(32, u), o))), z = (o) => {
74
74
  e.update(() => {
75
75
  const u = gt(c);
76
76
  pt(u) && u.setWidth(o);
77
- }), C(void 0);
77
+ }), w(void 0);
78
78
  };
79
- return /* @__PURE__ */ F("span", { className: g["inline-image"], contentEditable: !1, tabIndex: h ? 0 : void 0, onKeyDown: (o) => {
79
+ return /* @__PURE__ */ U("span", { className: g["inline-image"], contentEditable: !1, tabIndex: h ? 0 : void 0, onKeyDown: (o) => {
80
80
  !h || o.target !== o.currentTarget || !["Backspace", "Delete"].includes(o.key) || (o.preventDefault(), o.stopPropagation(), e.update(() => {
81
81
  const u = gt(c);
82
82
  if (!pt(u)) return;
83
83
  const D = u.getParent();
84
- xt(D) && D.getChildrenSize() === 1 ? D.remove() : u.remove(), e.dispatchCommand(Pt, h);
84
+ Nt(D) && D.getChildrenSize() === 1 ? D.remove() : u.remove(), e.dispatchCommand(Tt, h);
85
85
  }), e.focus());
86
86
  }, "data-component": "editorimage", children: [
87
- /* @__PURE__ */ s("img", { alt: l, "data-solibo-document-id": f, "data-solibo-document-slot": h, draggable: !1, height: z === void 0 ? t : void 0, ref: a, src: b, width: z ?? n, onClick: (o) => {
87
+ /* @__PURE__ */ s("img", { alt: a, "data-solibo-document-id": f, "data-solibo-document-slot": h, draggable: !1, height: S === void 0 ? t : void 0, ref: l, src: b, width: S ?? n, onClick: (o) => {
88
88
  var u;
89
- o.preventDefault(), h && ((u = o.currentTarget.parentElement) == null || u.focus()), e.dispatchCommand(Tt, {
89
+ o.preventDefault(), h && ((u = o.currentTarget.parentElement) == null || u.focus()), e.dispatchCommand(Et, {
90
90
  key: c,
91
91
  soliboDocumentSlot: h,
92
92
  src: b,
93
93
  width: n
94
94
  });
95
95
  } }),
96
- /* @__PURE__ */ s("button", { type: "button", "aria-label": `Resize image${l ? `: ${l}` : ""}`, title: "Drag to resize; use arrow keys to adjust width", className: g["image-resize-handle"], tabIndex: 0, onClick: (o) => {
96
+ /* @__PURE__ */ s("button", { type: "button", "aria-label": `Resize image${a ? `: ${a}` : ""}`, title: "Drag to resize; use arrow keys to adjust width", className: g["image-resize-handle"], tabIndex: 0, onClick: (o) => {
97
97
  o.preventDefault(), o.stopPropagation();
98
98
  }, onKeyDown: (o) => {
99
99
  var D;
100
100
  if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(o.key)) return;
101
101
  o.preventDefault(), o.stopPropagation();
102
- const u = ((D = a.current) == null ? void 0 : D.getBoundingClientRect().width) ?? n ?? 32;
103
- $(M(u + (["ArrowRight", "ArrowUp"].includes(o.key) ? 10 : -10)));
102
+ const u = ((D = l.current) == null ? void 0 : D.getBoundingClientRect().width) ?? n ?? 32;
103
+ z(A(u + (["ArrowRight", "ArrowUp"].includes(o.key) ? 10 : -10)));
104
104
  }, onPointerDown: (o) => {
105
- o.button !== 0 || !a.current || (o.preventDefault(), o.stopPropagation(), o.currentTarget.focus({
105
+ o.button !== 0 || !l.current || (o.preventDefault(), o.stopPropagation(), o.currentTarget.focus({
106
106
  preventScroll: !0
107
107
  }), o.currentTarget.setPointerCapture(o.pointerId), p.current = {
108
108
  pointerId: o.pointerId,
109
109
  x: o.clientX,
110
- width: a.current.getBoundingClientRect().width,
110
+ width: l.current.getBoundingClientRect().width,
111
111
  maximum: v()
112
112
  });
113
113
  }, onPointerMove: (o) => {
114
114
  const u = p.current;
115
- !u || u.pointerId !== o.pointerId || C(M(u.width + o.clientX - u.x, u.maximum));
115
+ !u || u.pointerId !== o.pointerId || w(A(u.width + o.clientX - u.x, u.maximum));
116
116
  }, onPointerUp: (o) => {
117
117
  const u = p.current;
118
- !u || u.pointerId !== o.pointerId || (p.current = null, $(M(u.width + o.clientX - u.x, u.maximum)), o.currentTarget.releasePointerCapture(o.pointerId));
118
+ !u || u.pointerId !== o.pointerId || (p.current = null, z(A(u.width + o.clientX - u.x, u.maximum)), o.currentTarget.releasePointerCapture(o.pointerId));
119
119
  }, onPointerCancel: () => {
120
- p.current = null, C(void 0);
120
+ p.current = null, w(void 0);
121
121
  }, onLostPointerCapture: () => {
122
- p.current = null, C(void 0);
122
+ p.current = null, w(void 0);
123
123
  } })
124
124
  ] });
125
125
  }
126
- const Pt = zt(), Tt = zt();
126
+ const Tt = St(), Et = St();
127
127
  class ct extends ee {
128
- constructor(t, c, f, h, b, n, a) {
128
+ constructor(t, c, f, h, b, n, l) {
129
129
  super(b);
130
130
  J(this, "__src");
131
131
  J(this, "__alt");
@@ -133,7 +133,7 @@ class ct extends ee {
133
133
  J(this, "__height");
134
134
  J(this, "__soliboDocumentId");
135
135
  J(this, "__soliboDocumentSlot");
136
- this.__src = t, this.__alt = c, this.__width = f, this.__height = h, this.__soliboDocumentId = n, this.__soliboDocumentSlot = a;
136
+ this.__src = t, this.__alt = c, this.__width = f, this.__height = h, this.__soliboDocumentId = n, this.__soliboDocumentSlot = l;
137
137
  }
138
138
  static getType() {
139
139
  return "image";
@@ -220,52 +220,52 @@ class ct extends ee {
220
220
  return c.__width = t, c.__height = void 0, c;
221
221
  }
222
222
  decorate(t) {
223
- return /* @__PURE__ */ s(Ee, { alt: this.__alt, editor: t, height: this.__height, nodeKey: this.getKey(), soliboDocumentId: this.__soliboDocumentId, soliboDocumentSlot: this.__soliboDocumentSlot, src: this.__src, width: this.__width });
223
+ return /* @__PURE__ */ s(Re, { alt: this.__alt, editor: t, height: this.__height, nodeKey: this.getKey(), soliboDocumentId: this.__soliboDocumentId, soliboDocumentSlot: this.__soliboDocumentSlot, src: this.__src, width: this.__width });
224
224
  }
225
225
  }
226
226
  function ft({
227
- alt: l = "",
227
+ alt: a = "",
228
228
  height: e,
229
229
  soliboDocumentId: t,
230
230
  soliboDocumentSlot: c,
231
231
  src: f,
232
232
  width: h
233
233
  }) {
234
- return re(new ct(f, l, h, e, void 0, t, c));
234
+ return re(new ct(f, a, h, e, void 0, t, c));
235
235
  }
236
- function pt(l) {
237
- return l instanceof ct;
236
+ function pt(a) {
237
+ return a instanceof ct;
238
238
  }
239
- const Re = ({
240
- createImages: l,
239
+ const Oe = ({
240
+ createImages: a,
241
241
  onRemove: e
242
242
  }) => {
243
- const [t] = At();
244
- return Z(() => t.registerCommand(Pt, (c) => (e(c), !0), Mt), [t, e]), Z(() => t.registerCommand(ie, (c) => {
243
+ const [t] = Ct();
244
+ return Z(() => t.registerCommand(Tt, (c) => (e(c), !0), At), [t, e]), Z(() => t.registerCommand(ie, (c) => {
245
245
  var n;
246
246
  if (!("clipboardData" in c)) return !1;
247
- const f = c, h = Array.from(((n = f.clipboardData) == null ? void 0 : n.items) ?? []).flatMap((a) => {
248
- if (a.kind !== "file" || !a.type.startsWith("image/")) return [];
249
- const p = a.getAsFile();
247
+ const f = c, h = Array.from(((n = f.clipboardData) == null ? void 0 : n.items) ?? []).flatMap((l) => {
248
+ if (l.kind !== "file" || !l.type.startsWith("image/")) return [];
249
+ const p = l.getAsFile();
250
250
  return p ? [p] : [];
251
251
  });
252
252
  if (h.length === 0) return !1;
253
253
  f.preventDefault();
254
- const b = l(h);
254
+ const b = a(h);
255
255
  return t.update(() => {
256
- Lt(b.map((a) => ft(a)));
256
+ kt(b.map((l) => ft(l)));
257
257
  }), !0;
258
- }, Mt), [l, t]), null;
259
- }, Oe = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, $e = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/, Ue = [(l) => {
260
- const e = Oe.exec(l);
258
+ }, At), [a, t]), null;
259
+ }, $e = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, Ue = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/, ze = [(a) => {
260
+ const e = $e.exec(a);
261
261
  return e != null && e.length ? {
262
262
  index: e.index,
263
263
  length: e[0].length,
264
264
  text: e[0],
265
265
  url: `mailto:${e[0]}`
266
266
  } : null;
267
- }, (l) => {
268
- const e = $e.exec(l);
267
+ }, (a) => {
268
+ const e = Ue.exec(a);
269
269
  return e != null && e.length ? {
270
270
  index: e.index,
271
271
  length: e[0].length,
@@ -273,48 +273,48 @@ const Re = ({
273
273
  url: e[0].startsWith("http") ? e[0] : `https://${e[0]}`
274
274
  } : null;
275
275
  }];
276
- function kt(l) {
276
+ function xt(a) {
277
277
  try {
278
- const e = new URL(l);
278
+ const e = new URL(a);
279
279
  return e.protocol === "http:" || e.protocol === "https:";
280
280
  } catch {
281
281
  return !1;
282
282
  }
283
283
  }
284
284
  function He({
285
- editableRef: l
285
+ editableRef: a
286
286
  }) {
287
- const e = L(null), [t, c] = w(0), [f, h] = w(0);
287
+ const e = k(null), [t, c] = y(0), [f, h] = y(0);
288
288
  Z(() => {
289
- const n = l.current;
289
+ const n = a.current;
290
290
  if (!n) return;
291
- const a = () => {
291
+ const l = () => {
292
292
  c(Math.round(n.getBoundingClientRect().height)), h(Math.round(parseFloat(getComputedStyle(n).minHeight) || 0));
293
293
  };
294
- if (a(), typeof ResizeObserver > "u") return;
295
- const p = new ResizeObserver(a);
294
+ if (l(), typeof ResizeObserver > "u") return;
295
+ const p = new ResizeObserver(l);
296
296
  return p.observe(n), () => p.disconnect();
297
- }, [l]);
297
+ }, [a]);
298
298
  const b = (n) => {
299
- const a = l.current;
300
- if (!a) return;
301
- const p = parseFloat(getComputedStyle(a).minHeight) || 0;
302
- a.style.height = `${Math.max(p, n)}px`;
299
+ const l = a.current;
300
+ if (!l) return;
301
+ const p = parseFloat(getComputedStyle(l).minHeight) || 0;
302
+ l.style.height = `${Math.max(p, n)}px`;
303
303
  };
304
304
  return /* @__PURE__ */ s("div", { "aria-label": "Resize editor", "aria-orientation": "horizontal", "aria-valuemin": f, "aria-valuenow": t, "aria-valuetext": `${t} pixels`, className: g["resize-handle"], role: "separator", tabIndex: 0, onDoubleClick: () => {
305
305
  var n;
306
- return (n = l.current) == null ? void 0 : n.style.removeProperty("height");
306
+ return (n = a.current) == null ? void 0 : n.style.removeProperty("height");
307
307
  }, onKeyDown: (n) => {
308
- const a = l.current;
309
- a && (n.key === "Home" ? (n.preventDefault(), a.style.removeProperty("height")) : (n.key === "ArrowUp" || n.key === "ArrowDown") && (n.preventDefault(), b(a.getBoundingClientRect().height + (n.key === "ArrowUp" ? 20 : -20))));
308
+ const l = a.current;
309
+ l && (n.key === "Home" ? (n.preventDefault(), l.style.removeProperty("height")) : (n.key === "ArrowUp" || n.key === "ArrowDown") && (n.preventDefault(), b(l.getBoundingClientRect().height + (n.key === "ArrowUp" ? 20 : -20))));
310
310
  }, onPointerDown: (n) => {
311
- const a = l.current;
312
- n.button !== 0 || !a || (n.preventDefault(), n.currentTarget.focus({
311
+ const l = a.current;
312
+ n.button !== 0 || !l || (n.preventDefault(), n.currentTarget.focus({
313
313
  preventScroll: !0
314
314
  }), n.currentTarget.setPointerCapture(n.pointerId), e.current = {
315
315
  pointerId: n.pointerId,
316
316
  y: n.clientY,
317
- height: a.getBoundingClientRect().height
317
+ height: l.getBoundingClientRect().height
318
318
  });
319
319
  }, onPointerMove: (n) => {
320
320
  !e.current || e.current.pointerId !== n.pointerId || b(e.current.height + e.current.y - n.clientY);
@@ -327,15 +327,15 @@ function He({
327
327
  }, "data-component": "editorresizehandle" });
328
328
  }
329
329
  const Be = ({
330
- onFilesSelected: l,
330
+ onFilesSelected: a,
331
331
  onInlineImageRemove: e
332
332
  }) => {
333
- const [t] = At(), [c, f] = w(!1), [h, b] = w(!1), [n, a] = w(!1), [p, z] = w(!1), [C, v] = w(!1), [M, $] = w(!1), [o, u] = w(""), [D, W] = w(null), [U, j] = w(null), [H, T] = w(""), K = kt(H.trim()), it = L(null), Q = L(null), nt = L(null), E = L(null), G = L(!1), tt = (r) => r.preventDefault(), et = k((r) => {
334
- E.current = vt(r) ? r.clone() : null;
335
- }, []), V = k((r) => {
333
+ const [t] = Ct(), [c, f] = y(!1), [h, b] = y(!1), [n, l] = y(!1), [p, S] = y(!1), [w, v] = y(!1), [A, z] = y(!1), [o, u] = y(""), [D, W] = y(null), [H, j] = y(null), [B, R] = y(""), K = xt(B.trim()), it = k(null), Q = k(null), nt = k(null), O = k(null), G = k(!1), tt = (r) => r.preventDefault(), et = x((r) => {
334
+ O.current = vt(r) ? r.clone() : null;
335
+ }, []), V = x((r) => {
336
336
  t.update(() => {
337
- E.current && St(E.current), r();
338
- }), E.current = null;
337
+ O.current && Pt(O.current), r();
338
+ }), O.current = null;
339
339
  }, [t]), ut = (r) => {
340
340
  G.current = !0, r.preventDefault();
341
341
  }, X = () => {
@@ -343,52 +343,52 @@ const Be = ({
343
343
  G.current = !1;
344
344
  return;
345
345
  }
346
- A();
347
- }, y = k(() => {
346
+ C();
347
+ }, L = x(() => {
348
348
  b(!1), u(""), W(null), j(null);
349
- }, []), R = k(() => {
350
- v(!1), T("");
351
- }, []), dt = k((r) => {
352
- b(!0), u((r == null ? void 0 : r.src) ?? ""), W((r == null ? void 0 : r.key) ?? null), j((r == null ? void 0 : r.soliboDocumentSlot) ?? null), R(), r != null && r.soliboDocumentSlot || setTimeout(() => {
349
+ }, []), $ = x(() => {
350
+ v(!1), R("");
351
+ }, []), dt = x((r) => {
352
+ b(!0), u((r == null ? void 0 : r.src) ?? ""), W((r == null ? void 0 : r.key) ?? null), j((r == null ? void 0 : r.soliboDocumentSlot) ?? null), $(), r != null && r.soliboDocumentSlot || setTimeout(() => {
353
353
  var _;
354
354
  return (_ = Q.current) == null ? void 0 : _.focus();
355
355
  }, 0);
356
- }, [R]), mt = k((r) => {
356
+ }, [$]), mt = x((r) => {
357
357
  t.getEditorState().read(() => {
358
358
  et(It());
359
- }), v(!0), T(r), y(), setTimeout(() => {
359
+ }), v(!0), R(r), L(), setTimeout(() => {
360
360
  var _;
361
361
  return (_ = nt.current) == null ? void 0 : _.focus();
362
362
  }, 0);
363
- }, [y, t, et]), N = k(() => {
364
- const r = H.trim();
365
- kt(r) && (V(() => {
363
+ }, [L, t, et]), M = x(() => {
364
+ const r = B.trim();
365
+ xt(r) && (V(() => {
366
366
  t.dispatchCommand(_t, {
367
367
  url: r,
368
368
  target: "_blank"
369
369
  });
370
370
  const _ = It();
371
371
  if (!vt(_)) return;
372
- const x = _.getNodes().at(-1) ?? null, B = (x == null ? void 0 : x.getParent()) ?? null, I = st(x) ? x : st(B) ? B : null;
372
+ const N = _.getNodes().at(-1) ?? null, F = (N == null ? void 0 : N.getParent()) ?? null, I = st(N) ? N : st(F) ? F : null;
373
373
  if (I) {
374
374
  const i = I.getLastChild();
375
- if (lt(i)) {
376
- const S = i.getTextContent(), ot = S.replace(/\s+$/, "");
377
- ot !== S && i.setTextContent(ot);
375
+ if (at(i)) {
376
+ const P = i.getTextContent(), ot = P.replace(/\s+$/, "");
377
+ ot !== P && i.setTextContent(ot);
378
378
  }
379
379
  const m = I.getNextSibling();
380
- if (lt(m) && /^\s/.test(m.getTextContent())) {
380
+ if (at(m) && /^\s/.test(m.getTextContent())) {
381
381
  m.select(1, 1);
382
382
  return;
383
383
  }
384
384
  const d = ne(" ");
385
385
  I.insertAfter(d), d.selectEnd();
386
386
  }
387
- }), R());
388
- }, [R, t, H, V]), A = k(() => {
387
+ }), $());
388
+ }, [$, t, B, V]), C = x(() => {
389
389
  const r = o.trim();
390
390
  if (!r) {
391
- y();
391
+ L();
392
392
  return;
393
393
  }
394
394
  t.update(() => {
@@ -397,49 +397,49 @@ const Be = ({
397
397
  pt(_) && _.setSrc(r);
398
398
  return;
399
399
  }
400
- Lt([ft({
400
+ kt([ft({
401
401
  src: r
402
402
  })]);
403
- }), y();
404
- }, [y, t, D, o]), q = k(() => {
403
+ }), L();
404
+ }, [L, t, D, o]), q = x(() => {
405
405
  if (!D) {
406
- y();
406
+ L();
407
407
  return;
408
408
  }
409
409
  t.update(() => {
410
410
  const r = gt(D);
411
411
  if (pt(r)) {
412
412
  const _ = r.getParent();
413
- xt(_) && _.getChildrenSize() === 1 ? _.remove() : r.remove(), U && (e == null || e(U));
413
+ Nt(_) && _.getChildrenSize() === 1 ? _.remove() : r.remove(), H && (e == null || e(H));
414
414
  }
415
- }), y();
416
- }, [y, t, D, U, e]), rt = k(() => {
415
+ }), L();
416
+ }, [L, t, D, H, e]), rt = x(() => {
417
417
  V(() => {
418
418
  t.dispatchCommand(_t, null);
419
- }), R();
420
- }, [R, t, V]), Y = k(() => {
419
+ }), $();
420
+ }, [$, t, V]), Y = x(() => {
421
421
  const r = It();
422
422
  if (!vt(r)) {
423
423
  if (oe(r)) {
424
- const B = r.getNodes(), I = B[0] ?? null, i = (I == null ? void 0 : I.getParent()) ?? null;
425
- f(B.some((d) => lt(d) && d.hasFormat("bold"))), a(B.some((d) => lt(d) && d.hasFormat("italic"))), z(B.some((d) => lt(d) && d.hasFormat("underline"))), $(bt(i) || Dt(i) || bt(I) || Dt(I));
424
+ const F = r.getNodes(), I = F[0] ?? null, i = (I == null ? void 0 : I.getParent()) ?? null;
425
+ f(F.some((d) => at(d) && d.hasFormat("bold"))), l(F.some((d) => at(d) && d.hasFormat("italic"))), S(F.some((d) => at(d) && d.hasFormat("underline"))), z(bt(i) || Dt(i) || bt(I) || Dt(I));
426
426
  const m = st(I) ? I : st(i) ? i : null;
427
427
  if (m) {
428
- v(!0), T(m.getURL());
428
+ v(!0), R(m.getURL());
429
429
  return;
430
430
  }
431
- v(!1), T(""), E.current = null;
431
+ v(!1), R(""), O.current = null;
432
432
  return;
433
433
  }
434
- f(!1), a(!1), z(!1), $(!1), v(!1), T(""), E.current = null;
434
+ f(!1), l(!1), S(!1), z(!1), v(!1), R(""), O.current = null;
435
435
  return;
436
436
  }
437
- const [_] = r.getNodes(), x = (_ == null ? void 0 : _.getParent()) ?? null;
438
- if (f(r.hasFormat("bold")), a(r.hasFormat("italic")), z(r.hasFormat("underline")), $(bt(x) || Dt(x)), st(x)) {
439
- v(!0), T(x.getURL()), et(r);
437
+ const [_] = r.getNodes(), N = (_ == null ? void 0 : _.getParent()) ?? null;
438
+ if (f(r.hasFormat("bold")), l(r.hasFormat("italic")), S(r.hasFormat("underline")), z(bt(N) || Dt(N)), st(N)) {
439
+ v(!0), R(N.getURL()), et(r);
440
440
  return;
441
441
  }
442
- v(!1), T(""), E.current = null;
442
+ v(!1), R(""), O.current = null;
443
443
  }, [et]);
444
444
  return Z(() => me(t.registerUpdateListener(({
445
445
  editorState: r
@@ -447,62 +447,62 @@ const Be = ({
447
447
  r.read(() => {
448
448
  Y();
449
449
  });
450
- }), t.registerCommand(Tt, (r) => (r.soliboDocumentSlot ? (y(), R()) : dt(r), !0), yt), t.registerCommand(se, () => (t.getEditorState().read(() => {
450
+ }), t.registerCommand(Et, (r) => (r.soliboDocumentSlot ? (L(), $()) : dt(r), !0), Lt), t.registerCommand(se, () => (t.getEditorState().read(() => {
451
451
  Y();
452
- }), !1), yt)), [y, R, t, dt, Y]), /* @__PURE__ */ F(he, { variant: "editor", "data-component": "editortoolbar", children: [
453
- /* @__PURE__ */ s(P, { "aria-label": "Bold", "data-active": c, onClick: () => {
454
- t.dispatchCommand(wt, "bold");
455
- }, title: "Bold", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "TextB" }) }),
456
- /* @__PURE__ */ s(P, { "aria-label": "Italic", "data-active": n, onClick: () => {
457
- t.dispatchCommand(wt, "italic");
458
- }, title: "Italic", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "TextItalic" }) }),
459
- /* @__PURE__ */ s(P, { "aria-label": "Underline", "data-active": p, onClick: () => {
460
- t.dispatchCommand(wt, "underline");
461
- }, title: "Underline", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "TextUnderline" }) }),
462
- /* @__PURE__ */ s(P, { "aria-label": "List", "data-active": M, onClick: () => {
463
- M ? t.dispatchCommand(Bt, void 0) : t.dispatchCommand(Ft, void 0);
464
- }, title: "List", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "ListBullets" }) }),
465
- /* @__PURE__ */ s(P, { "aria-label": "Link", "data-active": C, onClick: () => {
466
- C ? mt(H) : (t.dispatchCommand(_t, {
452
+ }), !1), Lt)), [L, $, t, dt, Y]), /* @__PURE__ */ U(he, { variant: "editor", "data-component": "editortoolbar", children: [
453
+ /* @__PURE__ */ s(T, { "aria-label": "Bold", "data-active": c, onClick: () => {
454
+ t.dispatchCommand(yt, "bold");
455
+ }, title: "Bold", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextB" }) }),
456
+ /* @__PURE__ */ s(T, { "aria-label": "Italic", "data-active": n, onClick: () => {
457
+ t.dispatchCommand(yt, "italic");
458
+ }, title: "Italic", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextItalic" }) }),
459
+ /* @__PURE__ */ s(T, { "aria-label": "Underline", "data-active": p, onClick: () => {
460
+ t.dispatchCommand(yt, "underline");
461
+ }, title: "Underline", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextUnderline" }) }),
462
+ /* @__PURE__ */ s(T, { "aria-label": "List", "data-active": A, onClick: () => {
463
+ A ? t.dispatchCommand(Bt, void 0) : t.dispatchCommand(Ft, void 0);
464
+ }, title: "List", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "ListBullets" }) }),
465
+ /* @__PURE__ */ s(T, { "aria-label": "Link", "data-active": w, onClick: () => {
466
+ w ? mt(B) : (t.dispatchCommand(_t, {
467
467
  url: "https://"
468
468
  }), mt("https://"));
469
- }, title: "Link", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Link" }) }),
470
- l && /* @__PURE__ */ F(ht, { children: [
469
+ }, title: "Link", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Link" }) }),
470
+ a && /* @__PURE__ */ U(ht, { children: [
471
471
  /* @__PURE__ */ s("input", { hidden: !0, multiple: !0, onChange: (r) => {
472
- r.target.files && l(r.target.files), r.target.value = "";
472
+ r.target.files && a(r.target.files), r.target.value = "";
473
473
  }, ref: it, type: "file" }),
474
- /* @__PURE__ */ s(P, { "aria-label": "Upload files", onClick: () => {
474
+ /* @__PURE__ */ s(T, { "aria-label": "Upload files", onClick: () => {
475
475
  var r;
476
476
  return (r = it.current) == null ? void 0 : r.click();
477
- }, title: "Upload files", variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Paperclip" }) })
477
+ }, title: "Upload files", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Paperclip" }) })
478
478
  ] }),
479
- /* @__PURE__ */ F("div", { className: at(g.meta, C || h ? g.active : ""), children: [
480
- C && /* @__PURE__ */ F(ht, { children: [
481
- /* @__PURE__ */ s(Nt, { "aria-invalid": !K, onBlur: () => N(), onChange: (r) => T(r.target.value), onKeyDown: (r) => {
482
- r.key === "Enter" && (r.preventDefault(), N());
483
- }, ref: nt, value: H }),
484
- /* @__PURE__ */ s(P, { "aria-label": "Apply link", disabled: !K, onClick: () => {
485
- N();
486
- }, onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Check" }) }),
487
- /* @__PURE__ */ s(P, { "aria-label": "Remove link", onClick: () => rt(), onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Trash", variant: "danger" }) })
479
+ /* @__PURE__ */ U("div", { className: lt(g.meta, w || h ? g.active : ""), children: [
480
+ w && /* @__PURE__ */ U(ht, { children: [
481
+ /* @__PURE__ */ s(Mt, { "aria-invalid": !K, onBlur: () => M(), onChange: (r) => R(r.target.value), onKeyDown: (r) => {
482
+ r.key === "Enter" && (r.preventDefault(), M());
483
+ }, ref: nt, value: B }),
484
+ /* @__PURE__ */ s(T, { "aria-label": "Apply link", disabled: !K, onClick: () => {
485
+ M();
486
+ }, onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Check" }) }),
487
+ /* @__PURE__ */ s(T, { "aria-label": "Remove link", onClick: () => rt(), onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Trash", variant: "danger" }) })
488
488
  ] }),
489
- h && /* @__PURE__ */ F(ht, { children: [
490
- !U && /* @__PURE__ */ F(ht, { children: [
491
- /* @__PURE__ */ s(Nt, { className: at(g.active), onBlur: X, onChange: (r) => u(r.target.value), onKeyDown: (r) => {
492
- r.key === "Enter" && (r.preventDefault(), G.current = !0, A());
489
+ h && /* @__PURE__ */ U(ht, { children: [
490
+ !H && /* @__PURE__ */ U(ht, { children: [
491
+ /* @__PURE__ */ s(Mt, { className: lt(g.active), onBlur: X, onChange: (r) => u(r.target.value), onKeyDown: (r) => {
492
+ r.key === "Enter" && (r.preventDefault(), G.current = !0, C());
493
493
  }, ref: Q, value: o }),
494
- /* @__PURE__ */ s(P, { "aria-label": "Apply image", onClick: () => A(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Check" }) })
494
+ /* @__PURE__ */ s(T, { "aria-label": "Apply image", onClick: () => C(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Check" }) })
495
495
  ] }),
496
- /* @__PURE__ */ s(P, { "aria-label": "Remove image", onClick: () => q(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(O, { name: "Trash", variant: "danger" }) })
496
+ /* @__PURE__ */ s(T, { "aria-label": "Remove image", onClick: () => q(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Trash", variant: "danger" }) })
497
497
  ] })
498
498
  ] })
499
499
  ] });
500
- }, Fe = le({
500
+ }, Fe = ae({
501
501
  name: "solibo-editor",
502
502
  namespace: "Editor",
503
- nodes: [Ut, Ht, Wt, jt, ct],
504
- onError(l) {
505
- throw l;
503
+ nodes: [zt, Ht, Wt, jt, ct],
504
+ onError(a) {
505
+ throw a;
506
506
  },
507
507
  theme: {
508
508
  link: g.link,
@@ -519,30 +519,30 @@ const Be = ({
519
519
  }
520
520
  });
521
521
  function We({
522
- autofocus: l,
522
+ autofocus: a,
523
523
  content: e = "",
524
524
  sessionKey: t,
525
525
  lastEmittedContentRef: c,
526
526
  imagePreviews: f
527
527
  }) {
528
- const [h] = At(), b = L(t);
528
+ const [h] = Ct(), b = k(t);
529
529
  return Z(() => {
530
530
  const n = b.current !== t;
531
531
  b.current = t, !(!n && c.current === e) && (h.update(() => {
532
532
  const p = new DOMParser().parseFromString(e, "text/html");
533
533
  p.querySelectorAll("img[data-solibo-document-slot]").forEach((v) => {
534
- const M = f.get(v.getAttribute("data-solibo-document-slot"));
535
- M && v.setAttribute("src", M);
534
+ const A = f.get(v.getAttribute("data-solibo-document-slot"));
535
+ A && v.setAttribute("src", A);
536
536
  });
537
- const z = $t(h, p), C = ae();
538
- C.clear().select(), Lt(z), l || n ? C.selectEnd() : St(null);
537
+ const S = Ut(h, p), w = le();
538
+ w.clear().select(), kt(S), a || n ? w.selectEnd() : Pt(null);
539
539
  }, {
540
540
  discrete: !0
541
541
  }), n && h.dispatchCommand(ce, void 0));
542
- }, [l, e, h, f, c, t]), null;
542
+ }, [a, e, h, f, c, t]), null;
543
543
  }
544
544
  const pr = ({
545
- autofocus: l = !1,
545
+ autofocus: a = !1,
546
546
  attachmentsEnabled: e = !0,
547
547
  sessionKey: t,
548
548
  autolink: c = !1,
@@ -550,30 +550,30 @@ const pr = ({
550
550
  controls: h,
551
551
  disabled: b = !1,
552
552
  errorMessage: n,
553
- fill: a = !1,
553
+ fill: l = !1,
554
554
  files: p,
555
- inline: z = !1,
556
- inlineImages: C,
555
+ inline: S = !1,
556
+ inlineImages: w,
557
557
  invalid: v = !1,
558
- isSubmitting: M = !1,
559
- maxRows: $ = 12,
558
+ isSubmitting: A = !1,
559
+ maxRows: z = 12,
560
560
  minRows: o = 1,
561
561
  onChange: u,
562
562
  onFilesChange: D,
563
563
  onInlineImagesChange: W,
564
- onSubmit: U,
564
+ onSubmit: H,
565
565
  onUpload: j,
566
- placeholder: H,
567
- required: T = !1,
566
+ placeholder: B,
567
+ required: R = !1,
568
568
  resizable: K = !1,
569
569
  submitLabel: it = "Submit",
570
570
  variant: Q = "default"
571
571
  }) => {
572
- const nt = ue(), E = L(void 0), G = L(!1), tt = L(null), [et, V] = w(!1), [ut, X] = w(!1), [y, R] = w([]), [dt, mt] = w([]), N = L(/* @__PURE__ */ new Map()), A = p ?? y, q = C ?? dt;
572
+ const nt = ue(), O = k(void 0), G = k(!1), tt = k(null), [et, V] = y(!1), [ut, X] = y(!1), [L, $] = y([]), [dt, mt] = y([]), M = k(/* @__PURE__ */ new Map()), C = p ?? L, q = w ?? dt;
573
573
  Z(() => {
574
574
  const i = tt.current;
575
575
  if (!i) return;
576
- if (!K || a) {
576
+ if (!K || l) {
577
577
  i.style.removeProperty("height"), V(!1);
578
578
  return;
579
579
  }
@@ -582,23 +582,23 @@ const pr = ({
582
582
  attributes: !0,
583
583
  attributeFilter: ["style"]
584
584
  }), m(), () => d.disconnect();
585
- }, [a, K]);
585
+ }, [l, K]);
586
586
  const rt = (i) => {
587
- p === void 0 && R(i), D == null || D(i);
588
- }, Y = k((i) => {
589
- C === void 0 && mt(i), W == null || W(i);
590
- }, [C, W]), r = k((i) => {
587
+ p === void 0 && $(i), D == null || D(i);
588
+ }, Y = x((i) => {
589
+ w === void 0 && mt(i), W == null || W(i);
590
+ }, [w, W]), r = x((i) => {
591
591
  const m = i.map((d) => {
592
- const S = `pasted-${crypto.randomUUID()}`, ot = URL.createObjectURL(d);
593
- return N.current.set(S, ot), {
592
+ const P = `pasted-${crypto.randomUUID()}`, ot = URL.createObjectURL(d);
593
+ return M.current.set(P, ot), {
594
594
  image: {
595
595
  alt: d.name,
596
- soliboDocumentSlot: S,
596
+ soliboDocumentSlot: P,
597
597
  src: ot
598
598
  },
599
599
  pending: {
600
600
  file: d,
601
- slot: S
601
+ slot: P
602
602
  }
603
603
  };
604
604
  });
@@ -607,20 +607,20 @@ const pr = ({
607
607
  }) => d)]), m.map(({
608
608
  image: d
609
609
  }) => d);
610
- }, [q, Y]), _ = k((i) => {
610
+ }, [q, Y]), _ = x((i) => {
611
611
  Y(q.filter((d) => d.slot !== i));
612
- const m = N.current.get(i);
613
- m && URL.revokeObjectURL(m), N.current.delete(i);
612
+ const m = M.current.get(i);
613
+ m && URL.revokeObjectURL(m), M.current.delete(i);
614
614
  }, [q, Y]);
615
615
  Z(() => () => {
616
- N.current.forEach((i) => URL.revokeObjectURL(i)), N.current.clear();
616
+ M.current.forEach((i) => URL.revokeObjectURL(i)), M.current.clear();
617
617
  }, []), Z(() => {
618
618
  const i = new Set(q.map((m) => m.slot));
619
- N.current.forEach((m, d) => {
620
- i.has(d) || (URL.revokeObjectURL(m), N.current.delete(d));
619
+ M.current.forEach((m, d) => {
620
+ i.has(d) || (URL.revokeObjectURL(m), M.current.delete(d));
621
621
  });
622
622
  }, [q]);
623
- const x = (i) => {
623
+ const N = (i) => {
624
624
  if (typeof DataTransfer < "u") {
625
625
  const m = new DataTransfer();
626
626
  return i.forEach((d) => m.items.add(d)), m.files;
@@ -628,11 +628,11 @@ const pr = ({
628
628
  return Object.assign([...i], {
629
629
  item: (m) => i[m] ?? null
630
630
  });
631
- }, B = async () => {
632
- if (!(b || M || G.current)) {
631
+ }, F = async () => {
632
+ if (!(b || A || G.current)) {
633
633
  G.current = !0;
634
634
  try {
635
- e && A.length > 0 && await (j == null ? void 0 : j(x(A))), await (U == null ? void 0 : U()), e && A.length > 0 && rt([]);
635
+ e && C.length > 0 && await (j == null ? void 0 : j(N(C))), await (H == null ? void 0 : H()), e && C.length > 0 && rt([]);
636
636
  } catch {
637
637
  return;
638
638
  } finally {
@@ -642,7 +642,7 @@ const pr = ({
642
642
  }, I = (i) => {
643
643
  i.preventDefault(), i.stopPropagation();
644
644
  };
645
- return /* @__PURE__ */ F("div", { className: at(g.field, a && g.fill), "data-max-rows": $, "data-min-rows": o, onDragEnter: (i) => {
645
+ return /* @__PURE__ */ U("div", { className: lt(g.field, l && g.fill), "data-max-rows": z, "data-min-rows": o, onDragEnter: (i) => {
646
646
  I(i), X(e && !!D);
647
647
  }, onDragOver: (i) => {
648
648
  I(i), X(e && !!D);
@@ -651,42 +651,45 @@ const pr = ({
651
651
  }, onDropCapture: (i) => {
652
652
  var d;
653
653
  const m = (d = i.dataTransfer) == null ? void 0 : d.files;
654
- m != null && m.length && (I(i), e && (D || j) && rt([...A, ...Array.from(m)]), X(!1));
654
+ m != null && m.length && (I(i), e && (D || j) && rt([...C, ...Array.from(m)]), X(!1));
655
655
  }, onDrop: (i) => {
656
656
  i.preventDefault(), X(!1);
657
657
  }, "data-component": "editor", children: [
658
- K === "top" && !a && /* @__PURE__ */ s(He, { editableRef: tt }),
659
- /* @__PURE__ */ s("div", { className: at(g.editor, !!h && g["with-controls"], Q === "embedded" && g.embedded, a && g["fill-editor"], K === !0 && !a && g.resizable, K && !a && et && g.resized, v && g.invalid, A.length > 0 && g["has-files"]), style: {
660
- "--editor-max-height": `calc(${$ * 1.25}em + (2 * var(--scale-8)))`,
658
+ K === "top" && !l && /* @__PURE__ */ s(He, { editableRef: tt }),
659
+ /* @__PURE__ */ s("div", { className: lt(g.editor, !!h && g["with-controls"], Q === "embedded" && g.embedded, l && g["fill-editor"], K === !0 && !l && g.resizable, K && !l && et && g.resized, v && g.invalid, C.length > 0 && g["has-files"]), style: {
660
+ "--editor-max-height": `calc(${z * 1.25}em + (2 * var(--scale-8)))`,
661
661
  "--editor-min-height": `calc(${o * 1.25}em + (2 * var(--scale-8)))`
662
- }, children: /* @__PURE__ */ F(Zt, { contentEditable: null, extension: Fe, children: [
663
- !z && Q !== "embedded" && /* @__PURE__ */ s(Be, { onInlineImageRemove: e ? _ : void 0, onFilesSelected: e && (j || D) ? (i) => {
664
- rt([...A, ...Array.from(i)]);
662
+ }, children: /* @__PURE__ */ U(Zt, { contentEditable: null, extension: Fe, children: [
663
+ !S && Q !== "embedded" && /* @__PURE__ */ s(Be, { onInlineImageRemove: e ? _ : void 0, onFilesSelected: e && (j || D) ? (i) => {
664
+ rt([...C, ...Array.from(i)]);
665
665
  } : void 0 }),
666
- /* @__PURE__ */ s("div", { className: at(g.content, ut && g.dragging), children: /* @__PURE__ */ s(te, { contentEditable: /* @__PURE__ */ s(qt, { ref: tt, "aria-placeholder": H ?? "", ariaErrorMessage: v && n ? nt : void 0, ariaInvalid: v || void 0, ariaRequired: T || void 0, placeholder: () => H ? /* @__PURE__ */ s("div", { className: g.placeholder, children: H }) : null }), ErrorBoundary: Yt }) }),
667
- !z && Q !== "embedded" && (h || U) && /* @__PURE__ */ s("div", { className: g.submit, children: h ?? /* @__PURE__ */ s(P, { "aria-label": it, "data-cy": "toolbar-submit-button", disabled: b, icon: "PaperPlaneTilt", isLoading: M, onClick: () => void B(), variant: "primary", children: /* @__PURE__ */ s("span", { children: it }) }) }),
668
- e && A.length > 0 && /* @__PURE__ */ s("div", { "aria-label": "Files to upload", className: g.files, role: "region", children: A.map((i, m) => /* @__PURE__ */ s(de, { deleteAccessibleLabel: `Remove ${i.name} from upload queue`, name: i.name, onDelete: () => rt(A.filter((d, S) => S !== m)) }, `${i.name}-${i.size}-${i.lastModified}-${m}`)) }),
669
- l && /* @__PURE__ */ s(Kt, {}),
670
- c && /* @__PURE__ */ s(Gt, { matchers: Ue }),
666
+ /* @__PURE__ */ s("div", { className: lt(g.content, ut && g.dragging), children: /* @__PURE__ */ s(te, { contentEditable: /* @__PURE__ */ s(qt, { ref: tt, "aria-placeholder": B ?? "", ariaErrorMessage: v && n ? nt : void 0, ariaInvalid: v || void 0, ariaRequired: R || void 0, placeholder: () => B ? /* @__PURE__ */ s("div", { className: g.placeholder, children: B }) : null }), ErrorBoundary: Yt }) }),
667
+ !S && Q !== "embedded" && (h || H) && /* @__PURE__ */ s("div", { className: g.submit, children: h ?? /* @__PURE__ */ s(T, { "aria-label": it, "data-cy": "toolbar-submit-button", disabled: b, icon: "PaperPlaneTilt", isLoading: A, onClick: () => void F(), variant: "primary", children: /* @__PURE__ */ s("span", { children: it }) }) }),
668
+ e && C.length > 0 && /* @__PURE__ */ s("div", { "aria-label": "Files to upload", className: g.files, role: "region", children: C.map((i, m) => /* @__PURE__ */ s(de, { deleteAccessibleLabel: `Remove ${i.name} from upload queue`, name: i.name, onDelete: () => rt(C.filter((d, P) => P !== m)) }, `${i.name}-${i.size}-${i.lastModified}-${m}`)) }),
669
+ a && /* @__PURE__ */ s(Kt, {}),
670
+ c && /* @__PURE__ */ s(Gt, { matchers: ze }),
671
671
  /* @__PURE__ */ s(Vt, {}),
672
- e && W && /* @__PURE__ */ s(Re, { createImages: r, onRemove: _ }),
673
- f !== void 0 && /* @__PURE__ */ s(We, { autofocus: l, content: f, sessionKey: t, lastEmittedContentRef: E, imagePreviews: N.current }),
674
- /* @__PURE__ */ s(Xt, { validateUrl: kt }),
672
+ e && W && /* @__PURE__ */ s(Oe, { createImages: r, onRemove: _ }),
673
+ f !== void 0 && /* @__PURE__ */ s(We, { autofocus: a, content: f, sessionKey: t, lastEmittedContentRef: O, imagePreviews: M.current }),
674
+ /* @__PURE__ */ s(Xt, { validateUrl: xt }),
675
675
  /* @__PURE__ */ s(Jt, {}),
676
676
  u && /* @__PURE__ */ s(Qt, { ignoreHistoryMergeTagChange: !1, onChange: (i, m) => {
677
677
  i.read(() => {
678
- const d = Ot(m, null), S = Ct(d, {
678
+ const d = $t(m, null), P = wt(d, {
679
679
  allowedAttributes: {
680
- ...Ct.defaults.allowedAttributes,
681
- img: [...Ct.defaults.allowedAttributes.img ?? [], "data-solibo-document-id", "data-solibo-document-slot"]
680
+ ...wt.defaults.allowedAttributes,
681
+ img: [...wt.defaults.allowedAttributes.img ?? [], "data-solibo-document-id", "data-solibo-document-slot"]
682
682
  },
683
683
  allowedTags: ["a", "b", "br", "i", "img", "li", "ol", "p", "u", "ul"]
684
684
  });
685
- E.current = S, u(S);
685
+ O.current = P, u(P);
686
686
  });
687
687
  } })
688
688
  ] }) }),
689
- v && n && /* @__PURE__ */ s("div", { className: g.error, id: nt, children: n })
689
+ v && n && /* @__PURE__ */ U("div", { className: g.error, id: nt, children: [
690
+ /* @__PURE__ */ s(E, { name: "Warning", gap: "right", size: "small" }),
691
+ n
692
+ ] })
690
693
  ] });
691
694
  };
692
695
  export {