@wix/patterns-fields 1.109.0 → 1.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/cjs/components/address/input/address-input.st.css.js +3 -3
  2. package/dist/cjs/components/address/input/address-input.st.css.js.map +1 -1
  3. package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
  4. package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
  5. package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js +4 -4
  6. package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
  7. package/dist/cjs/components/audio/audio-player/audio-player.st.css.js +2 -2
  8. package/dist/cjs/components/audio/audio-player/audio-player.st.css.js.map +1 -1
  9. package/dist/cjs/components/boolean/cell-checkbox.js +15 -6
  10. package/dist/cjs/components/boolean/cell-checkbox.js.map +1 -1
  11. package/dist/cjs/components/color-view/cell-color-view.st.css.js +3 -3
  12. package/dist/cjs/components/color-view/cell-color-view.st.css.js.map +1 -1
  13. package/dist/cjs/components/color-view/color-view.st.css.js +4 -4
  14. package/dist/cjs/components/color-view/color-view.st.css.js.map +1 -1
  15. package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js +3 -3
  16. package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
  17. package/dist/cjs/components/document/form-document-field.st.css.js +7 -7
  18. package/dist/cjs/components/document/form-document-field.st.css.js.map +1 -1
  19. package/dist/cjs/components/exclamation/exclamation.st.css.js +5 -5
  20. package/dist/cjs/components/exclamation/exclamation.st.css.js.map +1 -1
  21. package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js +5 -5
  22. package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
  23. package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js +3 -3
  24. package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
  25. package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js +2 -2
  26. package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
  27. package/dist/cjs/components/media-control/paste-url-button.st.css.js +4 -4
  28. package/dist/cjs/components/media-control/paste-url-button.st.css.js.map +1 -1
  29. package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
  30. package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
  31. package/dist/cjs/components/media-image/media-image.st.css.js +4 -4
  32. package/dist/cjs/components/media-image/media-image.st.css.js.map +1 -1
  33. package/dist/cjs/components/media-image/overlays/overlay.st.css.js +3 -3
  34. package/dist/cjs/components/media-image/overlays/overlay.st.css.js.map +1 -1
  35. package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  36. package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
  37. package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js +3 -3
  38. package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
  39. package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
  40. package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  41. package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js +2 -2
  42. package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
  43. package/dist/cjs/components/reference/cell-reference-input.st.css.js +3 -3
  44. package/dist/cjs/components/reference/cell-reference-input.st.css.js.map +1 -1
  45. package/dist/cjs/components/rich-content/cell-rich-content-input.js +12 -9
  46. package/dist/cjs/components/rich-content/cell-rich-content-input.js.map +1 -1
  47. package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +4 -4
  48. package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
  49. package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
  50. package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
  51. package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
  52. package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
  53. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
  54. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  55. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
  56. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
  57. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
  58. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
  59. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +23 -17
  60. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
  61. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +7 -7
  62. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
  63. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +5 -5
  64. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  65. package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
  66. package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
  67. package/dist/cjs/components/rich-text/cell-rich-text-editor.js +21 -5
  68. package/dist/cjs/components/rich-text/cell-rich-text-editor.js.map +1 -1
  69. package/dist/cjs/components/rich-text/cell-rich-text-input.js +15 -7
  70. package/dist/cjs/components/rich-text/cell-rich-text-input.js.map +1 -1
  71. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
  72. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
  73. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
  74. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
  75. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
  76. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
  77. package/dist/cjs/components/text/text-view.st.css.js +3 -3
  78. package/dist/cjs/components/text/text-view.st.css.js.map +1 -1
  79. package/dist/cjs/styles.global.css +1 -1
  80. package/dist/cjs/utils/keyboard.js +12 -0
  81. package/dist/cjs/utils/keyboard.js.map +1 -0
  82. package/dist/esm/components/address/input/address-input.st.css.js +2 -2
  83. package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js +2 -2
  84. package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
  85. package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js +2 -2
  86. package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
  87. package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
  88. package/dist/esm/components/boolean/cell-checkbox.js +10 -4
  89. package/dist/esm/components/boolean/cell-checkbox.js.map +1 -1
  90. package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
  91. package/dist/esm/components/color-view/color-view.st.css.js +2 -2
  92. package/dist/esm/components/delete-dialog/delete-dialog.st.css.js +2 -2
  93. package/dist/esm/components/document/form-document-field.st.css.js +2 -2
  94. package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
  95. package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
  96. package/dist/esm/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
  97. package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
  98. package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
  99. package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
  100. package/dist/esm/components/media-control/paste-url-button.st.css.js.map +1 -1
  101. package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
  102. package/dist/esm/components/media-image/media-image.st.css.js +3 -3
  103. package/dist/esm/components/media-image/media-image.st.css.js.map +1 -1
  104. package/dist/esm/components/media-image/overlays/overlay.st.css.js +2 -2
  105. package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  106. package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js +2 -2
  107. package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js +2 -2
  108. package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  109. package/dist/esm/components/reference/cell-multi-reference-input.st.css.js +2 -2
  110. package/dist/esm/components/reference/cell-reference-input.st.css.js +2 -2
  111. package/dist/esm/components/reference/cell-reference-input.st.css.js.map +1 -1
  112. package/dist/esm/components/rich-content/cell-rich-content-input.js +11 -9
  113. package/dist/esm/components/rich-content/cell-rich-content-input.js.map +1 -1
  114. package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +2 -2
  115. package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
  116. package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +2 -2
  117. package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
  118. package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
  119. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +2 -2
  120. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  121. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +2 -2
  122. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
  123. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +8 -2
  124. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
  125. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +2 -2
  126. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +2 -2
  127. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  128. package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +2 -2
  129. package/dist/esm/components/rich-text/cell-rich-text-editor.js +16 -1
  130. package/dist/esm/components/rich-text/cell-rich-text-editor.js.map +1 -1
  131. package/dist/esm/components/rich-text/cell-rich-text-input.js +8 -0
  132. package/dist/esm/components/rich-text/cell-rich-text-input.js.map +1 -1
  133. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +2 -2
  134. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +2 -2
  135. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
  136. package/dist/esm/components/text/text-view.st.css.js +2 -2
  137. package/dist/esm/styles.global.css +1 -1
  138. package/dist/esm/utils/keyboard.js +7 -0
  139. package/dist/esm/utils/keyboard.js.map +1 -0
  140. package/dist/types/components/audio/actions/actions-menu/actions-menu.st.css.d.ts.map +1 -1
  141. package/dist/types/components/audio/audio-field/form-audio-field.st.css.d.ts.map +1 -1
  142. package/dist/types/components/boolean/cell-checkbox.d.ts +4 -1
  143. package/dist/types/components/boolean/cell-checkbox.d.ts.map +1 -1
  144. package/dist/types/components/highlighted-text/highlighted-text.st.css.d.ts.map +1 -1
  145. package/dist/types/components/media-control/paste-url-button.st.css.d.ts.map +1 -1
  146. package/dist/types/components/media-image/media-image.st.css.d.ts.map +1 -1
  147. package/dist/types/components/multi-document/multi-document-input/form-multi-document.st.css.d.ts.map +1 -1
  148. package/dist/types/components/reference/cell-reference-input.st.css.d.ts.map +1 -1
  149. package/dist/types/components/rich-content/cell-rich-content-input.d.ts +2 -1
  150. package/dist/types/components/rich-content/cell-rich-content-input.d.ts.map +1 -1
  151. package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.d.ts.map +1 -1
  152. package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.d.ts.map +1 -1
  153. package/dist/types/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.d.ts.map +1 -1
  154. package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts +2 -0
  155. package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts.map +1 -1
  156. package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
  157. package/dist/types/components/rich-text/cell-rich-text-editor.d.ts.map +1 -1
  158. package/dist/types/components/rich-text/cell-rich-text-input.d.ts +1 -1
  159. package/dist/types/components/rich-text/cell-rich-text-input.d.ts.map +1 -1
  160. package/dist/types/utils/keyboard.d.ts +4 -0
  161. package/dist/types/utils/keyboard.d.ts.map +1 -0
  162. package/package.json +4 -4
  163. package/src/__tests__/components/cell-rich-content-input.spec.tsx +73 -0
  164. package/src/__tests__/components/cell-rich-text-editor.spec.tsx +64 -0
  165. package/src/__tests__/components/cell-rich-text-input.spec.tsx +39 -0
  166. package/src/__tests__/components/rich-content-editor.spec.tsx +53 -0
  167. package/src/__tests__/utils/keyboard.spec.ts +45 -0
  168. package/src/components/address/input/address-input.st.css.ts +2 -2
  169. package/src/components/audio/actions/actions-menu/actions-menu.st.css.ts +2 -2
  170. package/src/components/audio/audio-field/form-audio-field.st.css.ts +2 -2
  171. package/src/components/audio/audio-player/audio-player.st.css.ts +2 -2
  172. package/src/components/boolean/cell-checkbox.tsx +33 -11
  173. package/src/components/color-view/cell-color-view.st.css.ts +2 -2
  174. package/src/components/color-view/color-view.st.css.ts +2 -2
  175. package/src/components/delete-dialog/delete-dialog.st.css.ts +2 -2
  176. package/src/components/document/form-document-field.st.css.ts +2 -2
  177. package/src/components/exclamation/exclamation.st.css.ts +2 -2
  178. package/src/components/highlighted-text/highlighted-text.st.css.ts +3 -3
  179. package/src/components/image/thumbnail-replace-overlay.st.css.ts +2 -2
  180. package/src/components/media-control/cell-media-edit-shell.st.css.ts +2 -2
  181. package/src/components/media-control/paste-url-button.st.css.ts +2 -2
  182. package/src/components/media-gallery/form-media-gallery-field.st.css.ts +2 -2
  183. package/src/components/media-image/media-image.st.css.ts +3 -3
  184. package/src/components/media-image/overlays/overlay.st.css.ts +2 -2
  185. package/src/components/media-tag/web-media-tag/media-tag.st.css.ts +2 -2
  186. package/src/components/multi-document/cell-multi-document-edit.st.css.ts +2 -2
  187. package/src/components/multi-document/multi-document-input/form-multi-document.st.css.ts +2 -2
  188. package/src/components/reference/cell-multi-reference-input.st.css.ts +2 -2
  189. package/src/components/reference/cell-reference-input.st.css.ts +2 -2
  190. package/src/components/rich-content/cell-rich-content-input.tsx +12 -13
  191. package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
  192. package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +2 -2
  193. package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts +2 -2
  194. package/src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
  195. package/src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts +2 -2
  196. package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts +2 -2
  197. package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts +2 -2
  198. package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx +9 -1
  199. package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts +2 -2
  200. package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts +2 -2
  201. package/src/components/rich-text/cell-rich-text-editor.tsx +30 -1
  202. package/src/components/rich-text/cell-rich-text-input.tsx +9 -1
  203. package/src/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.ts +2 -2
  204. package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +2 -2
  205. package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts +2 -2
  206. package/src/components/text/text-view.st.css.ts +2 -2
  207. package/src/styles.global.css +1 -1
  208. package/src/utils/keyboard.ts +7 -0
@@ -17,6 +17,7 @@ var _common = require("../../../common");
17
17
  var _richContentCommon = require("../rich-content-common");
18
18
  var _plugins = require("./plugins");
19
19
  var _richContentToolbar = require("./rich-content-toolbar");
20
+ var _keyboard = require("../../../../utils/keyboard");
20
21
  var _richContentEditorStCss = require("./rich-content-editor.st.css.js");
21
22
  var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/fields/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx";
22
23
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
@@ -216,7 +217,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
216
217
  __self: void 0,
217
218
  __source: {
218
219
  fileName: _jsxFileName,
219
- lineNumber: 308,
220
+ lineNumber: 309,
220
221
  columnNumber: 7
221
222
  }
222
223
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -224,7 +225,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
224
225
  __self: void 0,
225
226
  __source: {
226
227
  fileName: _jsxFileName,
227
- lineNumber: 319,
228
+ lineNumber: 320,
228
229
  columnNumber: 9
229
230
  }
230
231
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -233,7 +234,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
233
234
  __self: void 0,
234
235
  __source: {
235
236
  fileName: _jsxFileName,
236
- lineNumber: 320,
237
+ lineNumber: 321,
237
238
  columnNumber: 11
238
239
  }
239
240
  }), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement(_richContentCommon.ToggleFullscreenButton, {
@@ -242,7 +243,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
242
243
  __self: void 0,
243
244
  __source: {
244
245
  fileName: _jsxFileName,
245
- lineNumber: 322,
246
+ lineNumber: 323,
246
247
  columnNumber: 13
247
248
  }
248
249
  })), editor && /*#__PURE__*/_react.default.createElement(InsertToolbarSync, {
@@ -252,7 +253,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
252
253
  __self: void 0,
253
254
  __source: {
254
255
  fileName: _jsxFileName,
255
- lineNumber: 330,
256
+ lineNumber: 331,
256
257
  columnNumber: 11
257
258
  }
258
259
  }), !hidden && RicosEditor ? /*#__PURE__*/_react.default.createElement("div", {
@@ -261,7 +262,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
261
262
  __self: void 0,
262
263
  __source: {
263
264
  fileName: _jsxFileName,
264
- lineNumber: 338,
265
+ lineNumber: 339,
265
266
  columnNumber: 11
266
267
  }
267
268
  }, /*#__PURE__*/_react.default.createElement(RicosEditor, (0, _extends2.default)({
@@ -277,14 +278,14 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
277
278
  __self: void 0,
278
279
  __source: {
279
280
  fileName: _jsxFileName,
280
- lineNumber: 339,
281
+ lineNumber: 340,
281
282
  columnNumber: 13
282
283
  }
283
284
  }))) : null, !isToolbarReady && /*#__PURE__*/_react.default.createElement(RCELoader, {
284
285
  __self: void 0,
285
286
  __source: {
286
287
  fileName: _jsxFileName,
287
- lineNumber: 354,
288
+ lineNumber: 355,
288
289
  columnNumber: 29
289
290
  }
290
291
  }), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement("div", {
@@ -293,7 +294,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
293
294
  __self: void 0,
294
295
  __source: {
295
296
  fileName: _jsxFileName,
296
- lineNumber: 356,
297
+ lineNumber: 357,
297
298
  columnNumber: 11
298
299
  }
299
300
  }, /*#__PURE__*/_react.default.createElement(_richContentToolbar.ExternalToolbar, {
@@ -301,7 +302,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
301
302
  __self: void 0,
302
303
  __source: {
303
304
  fileName: _jsxFileName,
304
- lineNumber: 360,
305
+ lineNumber: 361,
305
306
  columnNumber: 13
306
307
  }
307
308
  })));
@@ -317,7 +318,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
317
318
  __self: void 0,
318
319
  __source: {
319
320
  fileName: _jsxFileName,
320
- lineNumber: 370,
321
+ lineNumber: 371,
321
322
  columnNumber: 3
322
323
  }
323
324
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Loader, {
@@ -325,7 +326,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
325
326
  __self: void 0,
326
327
  __source: {
327
328
  fileName: _jsxFileName,
328
- lineNumber: 378,
329
+ lineNumber: 379,
329
330
  columnNumber: 5
330
331
  }
331
332
  }));
@@ -337,6 +338,7 @@ const RichContentEditor = ({
337
338
  onEnterFullScreen,
338
339
  onExitFullScreen,
339
340
  fullScreenOnly,
341
+ closeOnEnter,
340
342
  onPublish,
341
343
  onChange,
342
344
  theme,
@@ -425,11 +427,15 @@ const RichContentEditor = ({
425
427
  if (e.key === 'Escape') {
426
428
  e.stopPropagation();
427
429
  void onClose();
430
+ } else if (closeOnEnter && (0, _keyboard.isEnterInEditableText)(e)) {
431
+ e.preventDefault();
432
+ e.stopPropagation();
433
+ void onClose();
428
434
  }
429
435
  };
430
436
  document.addEventListener('keydown', handleKeyDown, true);
431
437
  return () => document.removeEventListener('keydown', handleKeyDown, true);
432
- }, [isFullScreen, onClose]);
438
+ }, [isFullScreen, onClose, closeOnEnter]);
433
439
  const rceProps = {
434
440
  onChange: handleChange
435
441
  };
@@ -453,7 +459,7 @@ const RichContentEditor = ({
453
459
  __self: void 0,
454
460
  __source: {
455
461
  fileName: _jsxFileName,
456
- lineNumber: 574,
462
+ lineNumber: 582,
457
463
  columnNumber: 7
458
464
  }
459
465
  }), !fullScreenOnly && /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
@@ -468,7 +474,7 @@ const RichContentEditor = ({
468
474
  __self: void 0,
469
475
  __source: {
470
476
  fileName: _jsxFileName,
471
- lineNumber: 576,
477
+ lineNumber: 584,
472
478
  columnNumber: 9
473
479
  }
474
480
  })), /*#__PURE__*/_react.default.createElement(_richContentCommon.FullscreenModal, {
@@ -477,7 +483,7 @@ const RichContentEditor = ({
477
483
  __self: void 0,
478
484
  __source: {
479
485
  fileName: _jsxFileName,
480
- lineNumber: 589,
486
+ lineNumber: 597,
481
487
  columnNumber: 7
482
488
  }
483
489
  }, /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
@@ -491,7 +497,7 @@ const RichContentEditor = ({
491
497
  __self: void 0,
492
498
  __source: {
493
499
  fileName: _jsxFileName,
494
- lineNumber: 590,
500
+ lineNumber: 598,
495
501
  columnNumber: 9
496
502
  }
497
503
  }))));
@@ -1 +1 @@
1
- {"version":3,"names":["_isEqual","_interopRequireDefault","require","_cloneDeep","_defaultsDeep","_react","_interopRequireWildcard","_designSystem","_loadRicos","_hooks","_utils","_userSiteFonts","_common","_richContentCommon","_plugins","_richContentToolbar","_richContentEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","InsertToolbarSync","editor","onButtonsChange","onReadyChange","buttons","useToolbarProps","isRecordShape","Array","isArray","safeButtons","signature","map","b","id","join","buttonsRef","useRef","current","useEffect","length","displayName","filterStaticToolbarButtons","button","RCE","forwardRef","content","injectedContent","onChange","autoFocus","onFocus","onBlur","className","dataHook","colorScheme","isFullScreen","onToggleFullScreen","hidden","ricosProps","ref","containerRef","containerHeightRef","getContainer","useCallback","onFullScreenChange","clientHeight","editorRef","setEditor","useState","isToolbarReady","setIsToolbarReady","toolbarButtons","setToolbarButtons","toolbarContainer","setToolbarContainer","setEditorInstance","nextEditor","setContent","nextContent","_editorRef$current","getEditorCommands","useImperativeHandle","isContentChanged","_editorRef$current2","Boolean","getContentTraits","prePublish","_editorRef$current3","INITIAL_INJECTED_RICH_CONTENT","appliedInjectedContentRef","isEqual","timerId","window","setTimeout","clearTimeout","frameId","requestAnimationFrame","_editorRef$current4","focus","cancelAnimationFrame","toolbars","useMemo","undefined","text","mode","container","alignment","defaultButtons","filter","insert","footer","disabled","isModalOpenRef","modalSettings","onModalOpen","onModalClose","isFocusedRef","isBlurringRef","triggerFocus","triggerBlur","requestBlurCallback","useRequestFrameCallback","requestEditorBlur","handleFocus","getActiveElement","_editorRef$current5","handleBlur","relatedTarget","_containerRef$current","contains","getAppRootElement","wixRicosProps","useWixRicosProps","ricos","useRicosFromCdn","plugins","usePlugins","RicosEditor","createElement","st","classes","root","tabIndex","style","height","__self","__source","fileName","lineNumber","columnNumber","toolbarAndFullScreenButtonWrapper","ToggleFullscreenButton","_extends2","initialContent","textWrap","RCELoader","footerToolbarContainer","ExternalToolbar","Box","align","verticalAlign","position","top","bottom","width","Loader","size","LOADER_DELAY","RichContentEditor","onEnterFullScreen","onExitFullScreen","fullScreenOnly","onPublish","theme","props","modalEditorRef","isRichContentChanged","_editorRef$current6","_modalEditorRef$curre","handleChange","richContent","loader","setLoader","timer","resetLoader","queueLoader","setIsFullScreen","fullScreenContent","setFullScreenContent","publishEditorContent","editorHandle","fallbackContent","onOpen","finalContent","isChanged","error","onClose","catch","handleKeyDown","key","stopPropagation","document","addEventListener","removeEventListener","rceProps","fullScreenTheme","defaultsDeep","cloneDeep","customStyles","maxHeight","settingsStyles","modals","dialogZIndex","Z_INDEX_MODAL_POPOVER","Fragment","UserSiteFonts","FullscreenModal","isOpen","isLoading","modalEditor","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx"],"sourcesContent":["import isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport defaultsDeep from 'lodash/defaultsDeep';\n\nimport type { FC, FocusEventHandler } from 'react';\nimport React, {\n forwardRef,\n useRef,\n useMemo,\n useState,\n useEffect,\n useCallback,\n useImperativeHandle,\n} from 'react';\n\nimport { Box, Loader } from '@wix/design-system';\nimport type { RicosDocument } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\nimport type {\n ExternalToolbarButton as RicosExternalToolbarButton,\n RicosEditorAPI,\n RicosEditorProps,\n ToolbarsConfig,\n} from '@wix/patterns-fields-utils/@wix/patterns-fields-ricos-statics';\n\nimport { useRicosFromCdn } from '../../cdn/load-ricos';\nimport { useRequestFrameCallback } from '../../../../hooks';\nimport { getActiveElement, getAppRootElement } from '../../../../utils';\nimport { UserSiteFonts } from '../../../user-site-fonts';\nimport { Z_INDEX_MODAL_POPOVER } from '../../../common';\n\nimport type { ColorScheme } from '../../types';\n\nimport type { ToggleFullscreenButtonProps } from '../rich-content-common';\nimport {\n useWixRicosProps,\n FullscreenModal,\n ToggleFullscreenButton,\n INITIAL_INJECTED_RICH_CONTENT,\n} from '../rich-content-common';\n\nimport { usePlugins } from './plugins';\nimport { ExternalToolbar } from './rich-content-toolbar';\nimport { st, classes } from './rich-content-editor.st.css.js';\n\ntype RicosProps = Pick<RicosEditorProps, 'biSettings' | 'theme'> & {\n wixExperiments?: unknown;\n};\n\ninterface RCEHandle {\n isContentChanged: () => boolean;\n prePublish: () => Promise<RicosDocument>;\n setContent: (content: RicosDocument) => void;\n}\n\ninterface RCEProps extends RicosProps {\n content?: RicosDocument;\n injectedContent?: RicosDocument;\n onChange?: (content: RicosDocument) => void;\n autoFocus?: boolean;\n onFocus?: () => void;\n onBlur?: () => void;\n className?: string;\n colorScheme?: ColorScheme;\n hidden?: boolean;\n dataHook?: string;\n}\n\ntype ToolbarSyncProps = {\n editor: RicosEditorAPI;\n onButtonsChange: (buttons: readonly RicosExternalToolbarButton[]) => void;\n onReadyChange: (ready: boolean) => void;\n};\n\nconst InsertToolbarSync: FC<ToolbarSyncProps> = ({\n editor,\n onButtonsChange,\n onReadyChange,\n}) => {\n const { buttons } = editor.useToolbarProps('insert');\n\n // Ricos 11's next-runtime proxy is supposed to convert the legacy\n // `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,\n // but some consumer bundles end up calling through to the inner adapter\n // (duplicate ricos copies / unwrapped ref) and we receive the\n // record shape. Normalize to an array so `.map` is safe, and treat the\n // non-array (record) shape as ready — otherwise the absolute-positioned\n // RCELoader overlay stays mounted and the editor row becomes unclickable.\n const isRecordShape = !Array.isArray(buttons);\n const safeButtons: readonly RicosExternalToolbarButton[] = isRecordShape\n ? []\n : buttons;\n const signature = safeButtons.map((b) => b.id).join('|');\n const buttonsRef = useRef(safeButtons);\n buttonsRef.current = safeButtons;\n\n useEffect(() => {\n onButtonsChange(buttonsRef.current);\n onReadyChange(buttonsRef.current.length > 0 || isRecordShape);\n }, [signature, isRecordShape, onButtonsChange, onReadyChange]);\n\n return null;\n};\n\nInsertToolbarSync.displayName = 'InsertToolbarSync';\n\nconst filterStaticToolbarButtons = (button: string) =>\n // Inlined rather than read off the CDN module's `FORMATTING_BUTTONS`: this is\n // a plain string constant and the filter runs before the module has loaded.\n button !== 'CODE_BLOCK';\n\nconst RCE = forwardRef<RCEHandle, RCEProps & ToggleFullscreenButtonProps>(\n (\n {\n content,\n injectedContent,\n onChange,\n autoFocus,\n onFocus,\n onBlur,\n className,\n dataHook,\n colorScheme,\n isFullScreen,\n onToggleFullScreen,\n hidden,\n ...ricosProps\n },\n ref,\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const containerHeightRef = useRef<number | undefined>();\n\n // Stable identity so RicosEditor doesn't see a new `container` prop each render.\n const getContainer = useCallback(() => containerRef.current, []);\n\n const onFullScreenChange = useCallback(() => {\n onToggleFullScreen?.();\n\n if (containerRef.current) {\n containerHeightRef.current = containerRef.current.clientHeight;\n }\n }, [onToggleFullScreen]);\n\n const editorRef = useRef<RicosEditorAPI | null>(null);\n const [editor, setEditor] = useState<RicosEditorAPI | null>(null);\n const [isToolbarReady, setIsToolbarReady] = useState(false);\n const [toolbarButtons, setToolbarButtons] = useState<\n readonly RicosExternalToolbarButton[]\n >([]);\n const [toolbarContainer, setToolbarContainer] =\n useState<HTMLDivElement | null>(null);\n\n const setEditorInstance = useCallback(\n (nextEditor: RicosEditorAPI | null) => {\n editorRef.current = nextEditor;\n setEditor(nextEditor);\n },\n [],\n );\n\n const setContent = useCallback((nextContent: RicosDocument) => {\n editorRef.current?.getEditorCommands().setContent(nextContent);\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n isContentChanged: () =>\n Boolean(editorRef.current?.getContentTraits().isContentChanged),\n prePublish: async () =>\n (await editorRef.current?.prePublish()) ??\n INITIAL_INJECTED_RICH_CONTENT,\n setContent,\n }),\n [setContent],\n );\n\n const appliedInjectedContentRef = useRef<RicosDocument | undefined>();\n useEffect(() => {\n if (\n !injectedContent ||\n isEqual(INITIAL_INJECTED_RICH_CONTENT, injectedContent) ||\n isEqual(appliedInjectedContentRef.current, injectedContent)\n ) {\n return;\n }\n\n appliedInjectedContentRef.current = injectedContent;\n const timerId = window.setTimeout(() => {\n setContent(injectedContent);\n }, 0);\n\n return () => window.clearTimeout(timerId);\n }, [injectedContent, setContent]);\n\n useEffect(() => {\n if (!autoFocus || !editorRef.current) {\n return;\n }\n\n const frameId = requestAnimationFrame(() => {\n editorRef.current?.focus();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [autoFocus, editor]);\n\n const toolbars = useMemo<ToolbarsConfig | undefined>(() => {\n if (!toolbarContainer) {\n return undefined;\n }\n\n return {\n text: {\n mode: 'static',\n container: toolbarContainer,\n alignment: 'left',\n buttons: ({ defaultButtons }) =>\n defaultButtons.filter(filterStaticToolbarButtons),\n },\n insert: {\n footer: {\n disabled: true,\n },\n },\n };\n }, [toolbarContainer]);\n\n const isModalOpenRef = useRef(false);\n const modalSettings = useMemo<RicosEditorProps['modalSettings']>(\n () => ({\n onModalOpen() {\n isModalOpenRef.current = true;\n },\n onModalClose() {\n isModalOpenRef.current = false;\n },\n }),\n [],\n );\n\n const isFocusedRef = useRef(false);\n const isBlurringRef = useRef(false);\n\n const triggerFocus = useCallback(() => {\n isBlurringRef.current = false;\n\n if (isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = true;\n onFocus?.();\n }, [onFocus]);\n const triggerBlur = useCallback(() => {\n isBlurringRef.current = false;\n\n if (!isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = false;\n onBlur?.();\n }, [onBlur]);\n\n const requestBlurCallback = useRequestFrameCallback();\n const requestEditorBlur = useCallback(() => {\n isBlurringRef.current = true;\n requestBlurCallback(() => isBlurringRef.current && triggerBlur());\n }, [triggerBlur, requestBlurCallback]);\n\n const handleFocus = useCallback<FocusEventHandler>(() => {\n if (containerRef.current === getActiveElement()) {\n editorRef.current?.focus();\n }\n\n triggerFocus();\n }, [triggerFocus]);\n const handleBlur = useCallback<FocusEventHandler>(\n ({ relatedTarget }) => {\n if (!relatedTarget) {\n requestEditorBlur();\n return;\n }\n\n if (\n isModalOpenRef.current ||\n containerRef.current?.contains(relatedTarget)\n ) {\n return;\n }\n\n if (!getAppRootElement().contains(relatedTarget)) {\n requestEditorBlur();\n } else {\n triggerBlur();\n }\n },\n [triggerBlur, requestEditorBlur],\n );\n\n const wixRicosProps = useWixRicosProps();\n const ricos = useRicosFromCdn();\n const plugins = usePlugins(ricos, colorScheme);\n const RicosEditor = ricos?.RicosEditor;\n\n return (\n <div\n ref={containerRef}\n data-hook=\"rich-content.editor\"\n className={st(classes.root, className)}\n tabIndex={onFocus || onBlur ? 0 : undefined}\n onFocus={handleFocus}\n onBlur={handleBlur}\n style={{\n height: hidden ? containerHeightRef.current : undefined,\n }}\n >\n <div className={classes.toolbarAndFullScreenButtonWrapper}>\n <div className={classes.toolbarContainer} ref={setToolbarContainer} />\n {!hidden && isToolbarReady && (\n <ToggleFullscreenButton\n isFullScreen={isFullScreen}\n onToggleFullScreen={onFullScreenChange}\n />\n )}\n </div>\n\n {editor && (\n <InsertToolbarSync\n editor={editor}\n onButtonsChange={setToolbarButtons}\n onReadyChange={setIsToolbarReady}\n />\n )}\n\n {!hidden && RicosEditor ? (\n <div data-hook={dataHook} className={classes.editor}>\n <RicosEditor\n ref={setEditorInstance}\n plugins={plugins}\n initialContent={content}\n toolbars={toolbars}\n modalSettings={modalSettings}\n textWrap={false}\n onChange={onChange}\n container={getContainer}\n {...ricosProps}\n {...wixRicosProps}\n />\n </div>\n ) : null}\n\n {!isToolbarReady && <RCELoader />}\n {!hidden && isToolbarReady && (\n <div\n data-hook=\"rich-content.footerToolbar\"\n className={classes.footerToolbarContainer}\n >\n <ExternalToolbar buttons={toolbarButtons} />\n </div>\n )}\n </div>\n );\n },\n);\nRCE.displayName = 'RCE';\n\nconst RCELoader: React.FC = () => (\n <Box\n align=\"center\"\n verticalAlign=\"middle\"\n position=\"absolute\"\n top=\"0\"\n bottom=\"0\"\n width=\"100%\"\n >\n <Loader size=\"small\" />\n </Box>\n);\nRCELoader.displayName = 'RCELoader';\n\nconst LOADER_DELAY = 100;\n\nexport type RichContentEditorProps = Omit<RCEProps, 'onChange'> & {\n onEnterFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onExitFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onChange?: (content: RicosDocument, isContentChanged?: boolean) => void;\n onPublish?: (promise: Promise<RicosDocument>) => void;\n fullScreenOnly?: boolean;\n};\n\nexport const RichContentEditor: FC<RichContentEditorProps> = ({\n onFocus,\n onBlur,\n onEnterFullScreen,\n onExitFullScreen,\n fullScreenOnly,\n onPublish,\n onChange,\n theme,\n content,\n ...props\n}) => {\n const editorRef = useRef<RCEHandle>(null);\n const modalEditorRef = useRef<RCEHandle>(null);\n\n const isRichContentChanged = useCallback(\n () =>\n Boolean(\n editorRef.current?.isContentChanged() ||\n modalEditorRef.current?.isContentChanged(),\n ),\n [],\n );\n const handleChange = useCallback(\n (richContent: RicosDocument) => {\n onChange?.(richContent, isRichContentChanged());\n },\n [onChange, isRichContentChanged],\n );\n\n const [loader, setLoader] = useState(false);\n const timer = useRef<number>(0);\n const resetLoader = useCallback(() => {\n window.clearTimeout(timer.current);\n setLoader(false);\n }, []);\n const queueLoader = useCallback(() => {\n timer.current = window.setTimeout(() => {\n setLoader(true);\n }, LOADER_DELAY);\n }, []);\n\n const [isFullScreen, setIsFullScreen] = useState(!!fullScreenOnly);\n const [fullScreenContent, setFullScreenContent] = useState(content);\n\n useEffect(() => {\n if (!isFullScreen) {\n setFullScreenContent(content);\n }\n }, [content, isFullScreen]);\n\n const publishEditorContent = useCallback(\n async (\n editorHandle: RCEHandle | null,\n fallbackContent?: RicosDocument,\n ): Promise<RicosDocument> => {\n if (!editorHandle) {\n return fallbackContent ?? INITIAL_INJECTED_RICH_CONTENT;\n }\n\n return (\n (await editorHandle.prePublish()) ??\n fallbackContent ??\n INITIAL_INJECTED_RICH_CONTENT\n );\n },\n [],\n );\n\n const onOpen = useCallback(async () => {\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(editorRef.current, content);\n onEnterFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onEnterFullScreen?.(content, isChanged);\n } finally {\n setFullScreenContent(finalContent);\n setIsFullScreen(true);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onEnterFullScreen,\n publishEditorContent,\n ]);\n const onClose = useCallback(async () => {\n queueLoader();\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(\n modalEditorRef.current,\n content,\n );\n onExitFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onExitFullScreen?.(content, isChanged);\n } finally {\n resetLoader();\n setIsFullScreen(false);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onExitFullScreen,\n publishEditorContent,\n queueLoader,\n resetLoader,\n ]);\n\n const handleBlur = useCallback(() => {\n if (isRichContentChanged()) {\n onPublish?.(\n publishEditorContent(editorRef.current, content).catch(\n () => content ?? INITIAL_INJECTED_RICH_CONTENT,\n ),\n );\n }\n onBlur?.();\n }, [content, isRichContentChanged, onBlur, onPublish, publishEditorContent]);\n\n useEffect(() => {\n if (!isFullScreen) {\n return;\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n void onClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown, true);\n return () => document.removeEventListener('keydown', handleKeyDown, true);\n }, [isFullScreen, onClose]);\n\n const rceProps = {\n onChange: handleChange,\n };\n\n // Must be memoized: Ricos re-processes `theme` whenever its identity changes,\n // so passing a freshly cloned object every render drives an infinite\n // re-render loop (freezes the tab) once the fullscreen editor mounts.\n const fullScreenTheme = useMemo(\n () =>\n defaultsDeep(cloneDeep(theme), {\n customStyles: { editor: { maxHeight: '100%' } },\n settingsStyles: {\n modals: {\n dialogZIndex: Z_INDEX_MODAL_POPOVER,\n },\n },\n }),\n [theme],\n );\n\n return (\n <>\n <UserSiteFonts />\n {!fullScreenOnly && (\n <RCE\n {...props}\n {...rceProps}\n content={content}\n theme={theme}\n onFocus={onFocus}\n onBlur={handleBlur}\n hidden={isFullScreen}\n ref={editorRef}\n isFullScreen={false}\n onToggleFullScreen={onOpen}\n />\n )}\n <FullscreenModal isOpen={isFullScreen} isLoading={loader}>\n <RCE\n {...props}\n {...rceProps}\n content={fullScreenContent}\n theme={fullScreenTheme}\n autoFocus\n className={classes.modalEditor}\n ref={modalEditorRef}\n isFullScreen\n onToggleFullScreen={onClose}\n />\n </FullscreenModal>\n </>\n );\n};\nRichContentEditor.displayName = 'RichContentEditor';\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAUA,IAAAK,aAAA,GAAAL,OAAA;AASA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKA,IAAAW,kBAAA,GAAAX,OAAA;AAOA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,uBAAA,GAAAd,OAAA;AAA8D,IAAAe,YAAA;AAAA,S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AA,GAAAA,iBAAA;AACFA,iBAAiB,CAAC/H,WAAW,GAAG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["_isEqual","_interopRequireDefault","require","_cloneDeep","_defaultsDeep","_react","_interopRequireWildcard","_designSystem","_loadRicos","_hooks","_utils","_userSiteFonts","_common","_richContentCommon","_plugins","_richContentToolbar","_keyboard","_richContentEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","InsertToolbarSync","editor","onButtonsChange","onReadyChange","buttons","useToolbarProps","isRecordShape","Array","isArray","safeButtons","signature","map","b","id","join","buttonsRef","useRef","current","useEffect","length","displayName","filterStaticToolbarButtons","button","RCE","forwardRef","content","injectedContent","onChange","autoFocus","onFocus","onBlur","className","dataHook","colorScheme","isFullScreen","onToggleFullScreen","hidden","ricosProps","ref","containerRef","containerHeightRef","getContainer","useCallback","onFullScreenChange","clientHeight","editorRef","setEditor","useState","isToolbarReady","setIsToolbarReady","toolbarButtons","setToolbarButtons","toolbarContainer","setToolbarContainer","setEditorInstance","nextEditor","setContent","nextContent","_editorRef$current","getEditorCommands","useImperativeHandle","isContentChanged","_editorRef$current2","Boolean","getContentTraits","prePublish","_editorRef$current3","INITIAL_INJECTED_RICH_CONTENT","appliedInjectedContentRef","isEqual","timerId","window","setTimeout","clearTimeout","frameId","requestAnimationFrame","_editorRef$current4","focus","cancelAnimationFrame","toolbars","useMemo","undefined","text","mode","container","alignment","defaultButtons","filter","insert","footer","disabled","isModalOpenRef","modalSettings","onModalOpen","onModalClose","isFocusedRef","isBlurringRef","triggerFocus","triggerBlur","requestBlurCallback","useRequestFrameCallback","requestEditorBlur","handleFocus","getActiveElement","_editorRef$current5","handleBlur","relatedTarget","_containerRef$current","contains","getAppRootElement","wixRicosProps","useWixRicosProps","ricos","useRicosFromCdn","plugins","usePlugins","RicosEditor","createElement","st","classes","root","tabIndex","style","height","__self","__source","fileName","lineNumber","columnNumber","toolbarAndFullScreenButtonWrapper","ToggleFullscreenButton","_extends2","initialContent","textWrap","RCELoader","footerToolbarContainer","ExternalToolbar","Box","align","verticalAlign","position","top","bottom","width","Loader","size","LOADER_DELAY","RichContentEditor","onEnterFullScreen","onExitFullScreen","fullScreenOnly","closeOnEnter","onPublish","theme","props","modalEditorRef","isRichContentChanged","_editorRef$current6","_modalEditorRef$curre","handleChange","richContent","loader","setLoader","timer","resetLoader","queueLoader","setIsFullScreen","fullScreenContent","setFullScreenContent","publishEditorContent","editorHandle","fallbackContent","onOpen","finalContent","isChanged","error","onClose","catch","handleKeyDown","key","stopPropagation","isEnterInEditableText","preventDefault","document","addEventListener","removeEventListener","rceProps","fullScreenTheme","defaultsDeep","cloneDeep","customStyles","maxHeight","settingsStyles","modals","dialogZIndex","Z_INDEX_MODAL_POPOVER","Fragment","UserSiteFonts","FullscreenModal","isOpen","isLoading","modalEditor","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx"],"sourcesContent":["import isEqual from 'lodash/isEqual';\nimport cloneDeep from 'lodash/cloneDeep';\nimport defaultsDeep from 'lodash/defaultsDeep';\n\nimport type { FC, FocusEventHandler } from 'react';\nimport React, {\n forwardRef,\n useRef,\n useMemo,\n useState,\n useEffect,\n useCallback,\n useImperativeHandle,\n} from 'react';\n\nimport { Box, Loader } from '@wix/design-system';\nimport type { RicosDocument } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\nimport type {\n ExternalToolbarButton as RicosExternalToolbarButton,\n RicosEditorAPI,\n RicosEditorProps,\n ToolbarsConfig,\n} from '@wix/patterns-fields-utils/@wix/patterns-fields-ricos-statics';\n\nimport { useRicosFromCdn } from '../../cdn/load-ricos';\nimport { useRequestFrameCallback } from '../../../../hooks';\nimport { getActiveElement, getAppRootElement } from '../../../../utils';\nimport { UserSiteFonts } from '../../../user-site-fonts';\nimport { Z_INDEX_MODAL_POPOVER } from '../../../common';\n\nimport type { ColorScheme } from '../../types';\n\nimport type { ToggleFullscreenButtonProps } from '../rich-content-common';\nimport {\n useWixRicosProps,\n FullscreenModal,\n ToggleFullscreenButton,\n INITIAL_INJECTED_RICH_CONTENT,\n} from '../rich-content-common';\n\nimport { usePlugins } from './plugins';\nimport { ExternalToolbar } from './rich-content-toolbar';\nimport { isEnterInEditableText } from '../../../../utils/keyboard';\nimport { st, classes } from './rich-content-editor.st.css.js';\n\ntype RicosProps = Pick<RicosEditorProps, 'biSettings' | 'theme'> & {\n wixExperiments?: unknown;\n};\n\ninterface RCEHandle {\n isContentChanged: () => boolean;\n prePublish: () => Promise<RicosDocument>;\n setContent: (content: RicosDocument) => void;\n}\n\ninterface RCEProps extends RicosProps {\n content?: RicosDocument;\n injectedContent?: RicosDocument;\n onChange?: (content: RicosDocument) => void;\n autoFocus?: boolean;\n onFocus?: () => void;\n onBlur?: () => void;\n className?: string;\n colorScheme?: ColorScheme;\n hidden?: boolean;\n dataHook?: string;\n}\n\ntype ToolbarSyncProps = {\n editor: RicosEditorAPI;\n onButtonsChange: (buttons: readonly RicosExternalToolbarButton[]) => void;\n onReadyChange: (ready: boolean) => void;\n};\n\nconst InsertToolbarSync: FC<ToolbarSyncProps> = ({\n editor,\n onButtonsChange,\n onReadyChange,\n}) => {\n const { buttons } = editor.useToolbarProps('insert');\n\n // Ricos 11's next-runtime proxy is supposed to convert the legacy\n // `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,\n // but some consumer bundles end up calling through to the inner adapter\n // (duplicate ricos copies / unwrapped ref) and we receive the\n // record shape. Normalize to an array so `.map` is safe, and treat the\n // non-array (record) shape as ready — otherwise the absolute-positioned\n // RCELoader overlay stays mounted and the editor row becomes unclickable.\n const isRecordShape = !Array.isArray(buttons);\n const safeButtons: readonly RicosExternalToolbarButton[] = isRecordShape\n ? []\n : buttons;\n const signature = safeButtons.map((b) => b.id).join('|');\n const buttonsRef = useRef(safeButtons);\n buttonsRef.current = safeButtons;\n\n useEffect(() => {\n onButtonsChange(buttonsRef.current);\n onReadyChange(buttonsRef.current.length > 0 || isRecordShape);\n }, [signature, isRecordShape, onButtonsChange, onReadyChange]);\n\n return null;\n};\n\nInsertToolbarSync.displayName = 'InsertToolbarSync';\n\nconst filterStaticToolbarButtons = (button: string) =>\n // Inlined rather than read off the CDN module's `FORMATTING_BUTTONS`: this is\n // a plain string constant and the filter runs before the module has loaded.\n button !== 'CODE_BLOCK';\n\nconst RCE = forwardRef<RCEHandle, RCEProps & ToggleFullscreenButtonProps>(\n (\n {\n content,\n injectedContent,\n onChange,\n autoFocus,\n onFocus,\n onBlur,\n className,\n dataHook,\n colorScheme,\n isFullScreen,\n onToggleFullScreen,\n hidden,\n ...ricosProps\n },\n ref,\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const containerHeightRef = useRef<number | undefined>();\n\n // Stable identity so RicosEditor doesn't see a new `container` prop each render.\n const getContainer = useCallback(() => containerRef.current, []);\n\n const onFullScreenChange = useCallback(() => {\n onToggleFullScreen?.();\n\n if (containerRef.current) {\n containerHeightRef.current = containerRef.current.clientHeight;\n }\n }, [onToggleFullScreen]);\n\n const editorRef = useRef<RicosEditorAPI | null>(null);\n const [editor, setEditor] = useState<RicosEditorAPI | null>(null);\n const [isToolbarReady, setIsToolbarReady] = useState(false);\n const [toolbarButtons, setToolbarButtons] = useState<\n readonly RicosExternalToolbarButton[]\n >([]);\n const [toolbarContainer, setToolbarContainer] =\n useState<HTMLDivElement | null>(null);\n\n const setEditorInstance = useCallback(\n (nextEditor: RicosEditorAPI | null) => {\n editorRef.current = nextEditor;\n setEditor(nextEditor);\n },\n [],\n );\n\n const setContent = useCallback((nextContent: RicosDocument) => {\n editorRef.current?.getEditorCommands().setContent(nextContent);\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n isContentChanged: () =>\n Boolean(editorRef.current?.getContentTraits().isContentChanged),\n prePublish: async () =>\n (await editorRef.current?.prePublish()) ??\n INITIAL_INJECTED_RICH_CONTENT,\n setContent,\n }),\n [setContent],\n );\n\n const appliedInjectedContentRef = useRef<RicosDocument | undefined>();\n useEffect(() => {\n if (\n !injectedContent ||\n isEqual(INITIAL_INJECTED_RICH_CONTENT, injectedContent) ||\n isEqual(appliedInjectedContentRef.current, injectedContent)\n ) {\n return;\n }\n\n appliedInjectedContentRef.current = injectedContent;\n const timerId = window.setTimeout(() => {\n setContent(injectedContent);\n }, 0);\n\n return () => window.clearTimeout(timerId);\n }, [injectedContent, setContent]);\n\n useEffect(() => {\n if (!autoFocus || !editorRef.current) {\n return;\n }\n\n const frameId = requestAnimationFrame(() => {\n editorRef.current?.focus();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [autoFocus, editor]);\n\n const toolbars = useMemo<ToolbarsConfig | undefined>(() => {\n if (!toolbarContainer) {\n return undefined;\n }\n\n return {\n text: {\n mode: 'static',\n container: toolbarContainer,\n alignment: 'left',\n buttons: ({ defaultButtons }) =>\n defaultButtons.filter(filterStaticToolbarButtons),\n },\n insert: {\n footer: {\n disabled: true,\n },\n },\n };\n }, [toolbarContainer]);\n\n const isModalOpenRef = useRef(false);\n const modalSettings = useMemo<RicosEditorProps['modalSettings']>(\n () => ({\n onModalOpen() {\n isModalOpenRef.current = true;\n },\n onModalClose() {\n isModalOpenRef.current = false;\n },\n }),\n [],\n );\n\n const isFocusedRef = useRef(false);\n const isBlurringRef = useRef(false);\n\n const triggerFocus = useCallback(() => {\n isBlurringRef.current = false;\n\n if (isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = true;\n onFocus?.();\n }, [onFocus]);\n const triggerBlur = useCallback(() => {\n isBlurringRef.current = false;\n\n if (!isFocusedRef.current) {\n return;\n }\n\n isFocusedRef.current = false;\n onBlur?.();\n }, [onBlur]);\n\n const requestBlurCallback = useRequestFrameCallback();\n const requestEditorBlur = useCallback(() => {\n isBlurringRef.current = true;\n requestBlurCallback(() => isBlurringRef.current && triggerBlur());\n }, [triggerBlur, requestBlurCallback]);\n\n const handleFocus = useCallback<FocusEventHandler>(() => {\n if (containerRef.current === getActiveElement()) {\n editorRef.current?.focus();\n }\n\n triggerFocus();\n }, [triggerFocus]);\n const handleBlur = useCallback<FocusEventHandler>(\n ({ relatedTarget }) => {\n if (!relatedTarget) {\n requestEditorBlur();\n return;\n }\n\n if (\n isModalOpenRef.current ||\n containerRef.current?.contains(relatedTarget)\n ) {\n return;\n }\n\n if (!getAppRootElement().contains(relatedTarget)) {\n requestEditorBlur();\n } else {\n triggerBlur();\n }\n },\n [triggerBlur, requestEditorBlur],\n );\n\n const wixRicosProps = useWixRicosProps();\n const ricos = useRicosFromCdn();\n const plugins = usePlugins(ricos, colorScheme);\n const RicosEditor = ricos?.RicosEditor;\n\n return (\n <div\n ref={containerRef}\n data-hook=\"rich-content.editor\"\n className={st(classes.root, className)}\n tabIndex={onFocus || onBlur ? 0 : undefined}\n onFocus={handleFocus}\n onBlur={handleBlur}\n style={{\n height: hidden ? containerHeightRef.current : undefined,\n }}\n >\n <div className={classes.toolbarAndFullScreenButtonWrapper}>\n <div className={classes.toolbarContainer} ref={setToolbarContainer} />\n {!hidden && isToolbarReady && (\n <ToggleFullscreenButton\n isFullScreen={isFullScreen}\n onToggleFullScreen={onFullScreenChange}\n />\n )}\n </div>\n\n {editor && (\n <InsertToolbarSync\n editor={editor}\n onButtonsChange={setToolbarButtons}\n onReadyChange={setIsToolbarReady}\n />\n )}\n\n {!hidden && RicosEditor ? (\n <div data-hook={dataHook} className={classes.editor}>\n <RicosEditor\n ref={setEditorInstance}\n plugins={plugins}\n initialContent={content}\n toolbars={toolbars}\n modalSettings={modalSettings}\n textWrap={false}\n onChange={onChange}\n container={getContainer}\n {...ricosProps}\n {...wixRicosProps}\n />\n </div>\n ) : null}\n\n {!isToolbarReady && <RCELoader />}\n {!hidden && isToolbarReady && (\n <div\n data-hook=\"rich-content.footerToolbar\"\n className={classes.footerToolbarContainer}\n >\n <ExternalToolbar buttons={toolbarButtons} />\n </div>\n )}\n </div>\n );\n },\n);\nRCE.displayName = 'RCE';\n\nconst RCELoader: React.FC = () => (\n <Box\n align=\"center\"\n verticalAlign=\"middle\"\n position=\"absolute\"\n top=\"0\"\n bottom=\"0\"\n width=\"100%\"\n >\n <Loader size=\"small\" />\n </Box>\n);\nRCELoader.displayName = 'RCELoader';\n\nconst LOADER_DELAY = 100;\n\nexport type RichContentEditorProps = Omit<RCEProps, 'onChange'> & {\n onEnterFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onExitFullScreen?: (\n content?: RicosDocument,\n isContentChanged?: boolean,\n ) => void;\n onChange?: (content: RicosDocument, isContentChanged?: boolean) => void;\n onPublish?: (promise: Promise<RicosDocument>) => void;\n fullScreenOnly?: boolean;\n /** Close full screen on Enter in the text, like Escape. Shift+Enter still adds a new line. */\n closeOnEnter?: boolean;\n};\n\nexport const RichContentEditor: FC<RichContentEditorProps> = ({\n onFocus,\n onBlur,\n onEnterFullScreen,\n onExitFullScreen,\n fullScreenOnly,\n closeOnEnter,\n onPublish,\n onChange,\n theme,\n content,\n ...props\n}) => {\n const editorRef = useRef<RCEHandle>(null);\n const modalEditorRef = useRef<RCEHandle>(null);\n\n const isRichContentChanged = useCallback(\n () =>\n Boolean(\n editorRef.current?.isContentChanged() ||\n modalEditorRef.current?.isContentChanged(),\n ),\n [],\n );\n const handleChange = useCallback(\n (richContent: RicosDocument) => {\n onChange?.(richContent, isRichContentChanged());\n },\n [onChange, isRichContentChanged],\n );\n\n const [loader, setLoader] = useState(false);\n const timer = useRef<number>(0);\n const resetLoader = useCallback(() => {\n window.clearTimeout(timer.current);\n setLoader(false);\n }, []);\n const queueLoader = useCallback(() => {\n timer.current = window.setTimeout(() => {\n setLoader(true);\n }, LOADER_DELAY);\n }, []);\n\n const [isFullScreen, setIsFullScreen] = useState(!!fullScreenOnly);\n const [fullScreenContent, setFullScreenContent] = useState(content);\n\n useEffect(() => {\n if (!isFullScreen) {\n setFullScreenContent(content);\n }\n }, [content, isFullScreen]);\n\n const publishEditorContent = useCallback(\n async (\n editorHandle: RCEHandle | null,\n fallbackContent?: RicosDocument,\n ): Promise<RicosDocument> => {\n if (!editorHandle) {\n return fallbackContent ?? INITIAL_INJECTED_RICH_CONTENT;\n }\n\n return (\n (await editorHandle.prePublish()) ??\n fallbackContent ??\n INITIAL_INJECTED_RICH_CONTENT\n );\n },\n [],\n );\n\n const onOpen = useCallback(async () => {\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(editorRef.current, content);\n onEnterFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onEnterFullScreen?.(content, isChanged);\n } finally {\n setFullScreenContent(finalContent);\n setIsFullScreen(true);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onEnterFullScreen,\n publishEditorContent,\n ]);\n const onClose = useCallback(async () => {\n queueLoader();\n let finalContent = content;\n const isChanged = isRichContentChanged();\n\n try {\n finalContent = await publishEditorContent(\n modalEditorRef.current,\n content,\n );\n onExitFullScreen?.(finalContent, isChanged);\n } catch (error) {\n finalContent = content;\n onExitFullScreen?.(content, isChanged);\n } finally {\n resetLoader();\n setIsFullScreen(false);\n\n if (isChanged && finalContent) {\n handleChange(finalContent);\n }\n }\n }, [\n content,\n handleChange,\n isRichContentChanged,\n onExitFullScreen,\n publishEditorContent,\n queueLoader,\n resetLoader,\n ]);\n\n const handleBlur = useCallback(() => {\n if (isRichContentChanged()) {\n onPublish?.(\n publishEditorContent(editorRef.current, content).catch(\n () => content ?? INITIAL_INJECTED_RICH_CONTENT,\n ),\n );\n }\n onBlur?.();\n }, [content, isRichContentChanged, onBlur, onPublish, publishEditorContent]);\n\n useEffect(() => {\n if (!isFullScreen) {\n return;\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n void onClose();\n } else if (closeOnEnter && isEnterInEditableText(e)) {\n e.preventDefault();\n e.stopPropagation();\n void onClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown, true);\n return () => document.removeEventListener('keydown', handleKeyDown, true);\n }, [isFullScreen, onClose, closeOnEnter]);\n\n const rceProps = {\n onChange: handleChange,\n };\n\n // Must be memoized: Ricos re-processes `theme` whenever its identity changes,\n // so passing a freshly cloned object every render drives an infinite\n // re-render loop (freezes the tab) once the fullscreen editor mounts.\n const fullScreenTheme = useMemo(\n () =>\n defaultsDeep(cloneDeep(theme), {\n customStyles: { editor: { maxHeight: '100%' } },\n settingsStyles: {\n modals: {\n dialogZIndex: Z_INDEX_MODAL_POPOVER,\n },\n },\n }),\n [theme],\n );\n\n return (\n <>\n <UserSiteFonts />\n {!fullScreenOnly && (\n <RCE\n {...props}\n {...rceProps}\n content={content}\n theme={theme}\n onFocus={onFocus}\n onBlur={handleBlur}\n hidden={isFullScreen}\n ref={editorRef}\n isFullScreen={false}\n onToggleFullScreen={onOpen}\n />\n )}\n <FullscreenModal isOpen={isFullScreen} isLoading={loader}>\n <RCE\n {...props}\n {...rceProps}\n content={fullScreenContent}\n theme={fullScreenTheme}\n autoFocus\n className={classes.modalEditor}\n ref={modalEditorRef}\n isFullScreen\n onToggleFullScreen={onClose}\n />\n </FullscreenModal>\n </>\n );\n};\nRichContentEditor.displayName = 'RichContentEditor';\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAUA,IAAAK,aAAA,GAAAL,OAAA;AASA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAKA,IAAAW,kBAAA,GAAAX,OAAA;AAO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,MACEmK,KAAK,EACLgC,QAAQ;IACZjK,OAAO,EAAE8I,iBAAkB;IAC3Bd,KAAK,EAAEkC,eAAgB;IACvB/J,SAAS;IACTG,SAAS,EAAEwF,+BAAO,CAACkF,WAAY;IAC/BnK,GAAG,EAAEqH,cAAe;IACpBzH,YAAY;IACZC,kBAAkB,EAAE6I,OAAQ;IAAApD,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlJ,YAAA;MAAAmJ,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC7B,CACc,CACjB,CAAC;AAEP,CAAC;AAAC0E,OAAA,CAAAvD,iBAAA,GAAAA,iBAAA;AACFA,iBAAiB,CAAC/H,WAAW,GAAG,mBAAmB","ignoreList":[]}
@@ -5,19 +5,19 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "richcontenteditor2665333597";
8
+ var _namespace_ = "richcontenteditor3770552425";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "richcontenteditor2665333597__root",
16
- "toolbarContainer": "richcontenteditor2665333597__toolbarContainer",
17
- "footerToolbarContainer": "richcontenteditor2665333597__footerToolbarContainer",
18
- "toolbarAndFullScreenButtonWrapper": "richcontenteditor2665333597__toolbarAndFullScreenButtonWrapper",
19
- "editor": "richcontenteditor2665333597__editor",
20
- "modalEditor": "richcontenteditor2665333597__modalEditor"
15
+ "root": "richcontenteditor3770552425__root",
16
+ "toolbarContainer": "richcontenteditor3770552425__toolbarContainer",
17
+ "footerToolbarContainer": "richcontenteditor3770552425__footerToolbarContainer",
18
+ "toolbarAndFullScreenButtonWrapper": "richcontenteditor3770552425__toolbarAndFullScreenButtonWrapper",
19
+ "editor": "richcontenteditor3770552425__editor",
20
+ "modalEditor": "richcontenteditor3770552425__modalEditor"
21
21
  };
22
22
  var keyframes = exports.keyframes = {};
23
23
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontenteditor2665333597\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontenteditor2665333597__root\",\"toolbarContainer\":\"richcontenteditor2665333597__toolbarContainer\",\"footerToolbarContainer\":\"richcontenteditor2665333597__footerToolbarContainer\",\"toolbarAndFullScreenButtonWrapper\":\"richcontenteditor2665333597__toolbarAndFullScreenButtonWrapper\",\"editor\":\"richcontenteditor2665333597__editor\",\"modalEditor\":\"richcontenteditor2665333597__modalEditor\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-font-family-default\":\"--wds-font-family-default\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,kBAAkB,EAAC,+CAA+C;EAAC,wBAAwB,EAAC,qDAAqD;EAAC,mCAAmC,EAAC,gEAAgE;EAAC,QAAQ,EAAC,qCAAqC;EAAC,aAAa,EAAC;AAA0C,CAAC;AACzZ,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,yBAAyB,EAAC;AAA2B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontenteditor3770552425\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontenteditor3770552425__root\",\"toolbarContainer\":\"richcontenteditor3770552425__toolbarContainer\",\"footerToolbarContainer\":\"richcontenteditor3770552425__footerToolbarContainer\",\"toolbarAndFullScreenButtonWrapper\":\"richcontenteditor3770552425__toolbarAndFullScreenButtonWrapper\",\"editor\":\"richcontenteditor3770552425__editor\",\"modalEditor\":\"richcontenteditor3770552425__modalEditor\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-font-family-default\":\"--wds-font-family-default\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,kBAAkB,EAAC,+CAA+C;EAAC,wBAAwB,EAAC,qDAAqD;EAAC,mCAAmC,EAAC,gEAAgE;EAAC,QAAQ,EAAC,qCAAqC;EAAC,aAAa,EAAC;AAA0C,CAAC;AACzZ,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,yBAAyB,EAAC;AAA2B,CAAC","ignoreList":[]}
@@ -5,17 +5,17 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "richcontenttoolbar2552606762";
8
+ var _namespace_ = "richcontenttoolbar784676697";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "richcontenttoolbar2552606762__root",
16
- "toolbar": "richcontenttoolbar2552606762__toolbar",
17
- "toolbarButton": "richcontenttoolbar2552606762__toolbarButton",
18
- "separator": "richcontenttoolbar2552606762__separator"
15
+ "root": "richcontenttoolbar784676697__root",
16
+ "toolbar": "richcontenttoolbar784676697__toolbar",
17
+ "toolbarButton": "richcontenttoolbar784676697__toolbarButton",
18
+ "separator": "richcontenttoolbar784676697__separator"
19
19
  };
20
20
  var keyframes = exports.keyframes = {};
21
21
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontenttoolbar2552606762\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontenttoolbar2552606762__root\",\"toolbar\":\"richcontenttoolbar2552606762__toolbar\",\"toolbarButton\":\"richcontenttoolbar2552606762__toolbarButton\",\"separator\":\"richcontenttoolbar2552606762__separator\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,8BAA8B;AAChD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,oCAAoC;EAAC,SAAS,EAAC,uCAAuC;EAAC,eAAe,EAAC,6CAA6C;EAAC,WAAW,EAAC;AAAyC,CAAC;AACjO,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontenttoolbar784676697\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontenttoolbar784676697__root\",\"toolbar\":\"richcontenttoolbar784676697__toolbar\",\"toolbarButton\":\"richcontenttoolbar784676697__toolbarButton\",\"separator\":\"richcontenttoolbar784676697__separator\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,SAAS,EAAC,sCAAsC;EAAC,eAAe,EAAC,4CAA4C;EAAC,WAAW,EAAC;AAAwC,CAAC;AAC7N,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -5,16 +5,16 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "richcontentviewer3000865605";
8
+ var _namespace_ = "richcontentviewer4123602360";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "richcontentviewer3000865605__root",
16
- "viewer": "richcontentviewer3000865605__viewer",
17
- "modalViewer": "richcontentviewer3000865605__modalViewer"
15
+ "root": "richcontentviewer4123602360__root",
16
+ "viewer": "richcontentviewer4123602360__viewer",
17
+ "modalViewer": "richcontentviewer4123602360__modalViewer"
18
18
  };
19
19
  var keyframes = exports.keyframes = {};
20
20
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontentviewer3000865605\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontentviewer3000865605__root\",\"viewer\":\"richcontentviewer3000865605__viewer\",\"modalViewer\":\"richcontentviewer3000865605__modalViewer\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,QAAQ,EAAC,qCAAqC;EAAC,aAAa,EAAC;AAA0C,CAAC;AAClK,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontentviewer4123602360\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontentviewer4123602360__root\",\"viewer\":\"richcontentviewer4123602360__viewer\",\"modalViewer\":\"richcontentviewer4123602360__modalViewer\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,6BAA6B;AAC/C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,mCAAmC;EAAC,QAAQ,EAAC,qCAAqC;EAAC,aAAa,EAAC;AAA0C,CAAC;AAClK,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -87,8 +87,24 @@ const CellRichTextEditor = ({
87
87
  const [editorState, setEditorState] = (0, _react.useState)(initialEditorState);
88
88
  const inlineStylesRef = (0, _react.useRef)(inlineStyles);
89
89
  const customStyleMapRef = (0, _react.useRef)(customStyleMap);
90
+ const contentRef = (0, _react.useRef)(initialEditorState.getCurrentContent());
91
+
92
+ // A typed-to-edit key is already a change, even before the user edits again.
93
+ (0, _react.useEffect)(() => {
94
+ if (initialTypedKey) {
95
+ onChange((0, _utils.editorStateToHTML)(initialEditorState, inlineStylesRef.current, EDITING_OPTIONS));
96
+ }
97
+ // eslint-disable-next-line react-hooks/exhaustive-deps
98
+ }, []);
90
99
  const handleChange = (0, _react.useCallback)(newState => {
91
100
  setEditorState(newState);
101
+ // Draft.js also fires onChange for focus and selection changes. Only a
102
+ // content change is an edit — otherwise an untouched cell would save.
103
+ const content = newState.getCurrentContent();
104
+ if (content === contentRef.current) {
105
+ return;
106
+ }
107
+ contentRef.current = content;
92
108
  const html = (0, _utils.editorStateToHTML)(newState, inlineStylesRef.current, EDITING_OPTIONS);
93
109
  onChange(html);
94
110
  }, [onChange]);
@@ -97,7 +113,7 @@ const CellRichTextEditor = ({
97
113
  __self: void 0,
98
114
  __source: {
99
115
  fileName: _jsxFileName,
100
- lineNumber: 137,
116
+ lineNumber: 166,
101
117
  columnNumber: 9
102
118
  }
103
119
  }, /*#__PURE__*/_react.default.createElement(_richEditor.RichEditor, {
@@ -111,7 +127,7 @@ const CellRichTextEditor = ({
111
127
  __self: void 0,
112
128
  __source: {
113
129
  fileName: _jsxFileName,
114
- lineNumber: 138,
130
+ lineNumber: 167,
115
131
  columnNumber: 11
116
132
  }
117
133
  })), isFullScreen && /*#__PURE__*/_react.default.createElement(_designSystem.Modal, {
@@ -120,7 +136,7 @@ const CellRichTextEditor = ({
120
136
  __self: void 0,
121
137
  __source: {
122
138
  fileName: _jsxFileName,
123
- lineNumber: 150,
139
+ lineNumber: 179,
124
140
  columnNumber: 9
125
141
  }
126
142
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -131,7 +147,7 @@ const CellRichTextEditor = ({
131
147
  __self: void 0,
132
148
  __source: {
133
149
  fileName: _jsxFileName,
134
- lineNumber: 151,
150
+ lineNumber: 180,
135
151
  columnNumber: 11
136
152
  }
137
153
  }, /*#__PURE__*/_react.default.createElement(_richEditor.RichEditor, {
@@ -145,7 +161,7 @@ const CellRichTextEditor = ({
145
161
  __self: void 0,
146
162
  __source: {
147
163
  fileName: _jsxFileName,
148
- lineNumber: 157,
164
+ lineNumber: 186,
149
165
  columnNumber: 13
150
166
  }
151
167
  }))));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_autoFieldTypes","_compositeDecorator","_utils","_richEditor","_stylableHelper","_richTextEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EDITING_OPTIONS","headingsEnabled","DEFAULT_CELL_TEXT_STYLE","exports","buildInitialHtml","value","typedKey","existing","HTMLToText","CellRichTextEditor","onChange","autoFocus","initialTypedKey","isFullScreen","onToggleFullScreen","textStyle","initialHtml","useMemo","editorState","initialEditorState","customStyleMap","inlineStyles","htmlToEditorState","compositeDecorator","setEditorState","useState","inlineStylesRef","useRef","customStyleMapRef","handleChange","useCallback","newState","html","editorStateToHTML","current","createElement","Fragment","style","__self","__source","fileName","lineNumber","columnNumber","RichEditor","Modal","screen","isOpen","className","combineClasses","classes","editor","displayName"],"sources":["../../../../src/components/rich-text/cell-rich-text-editor.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { EditorState } from 'draft-js';\nimport { Modal } from '@wix/design-system';\n\nimport { HTMLToText } from '../../auto-field-types';\nimport { compositeDecorator } from './rich-text-input/rich-text-editor/composite-decorator';\nimport {\n htmlToEditorState,\n editorStateToHTML,\n} from './rich-text-input/rich-text-editor/utils';\nimport type {\n CustomStyleMap,\n InlineStyles,\n} from './rich-text-input/rich-text-editor/utils';\nimport { RichEditor } from './rich-text-input/rich-text-editor/rich-editor';\nimport { combineClasses } from './rich-text-input/rich-text-editor/utils/stylable-helper';\nimport {\n style,\n classes,\n} from './rich-text-input/rich-text-editor/rich-text-editor.st.css.js';\nimport type { RichTextStyleVariables } from './rich-text-input/rich-text-editor/text-style';\n\nconst EDITING_OPTIONS = { headingsEnabled: true };\n\n/** Default text style — matches the CSS fallback values in rich-editor.st.css.\n * Consumers (e.g. cms-web) can override with site-specific font values. */\nexport const DEFAULT_CELL_TEXT_STYLE: RichTextStyleVariables = {\n '--rt-h1-fontSize': '72px',\n '--rt-h1-fontStyle': 'normal',\n '--rt-h1-fontWeight': '700',\n '--rt-h1-lineHeight': '1.33',\n '--rt-h2-fontSize': '42px',\n '--rt-h2-fontStyle': 'normal',\n '--rt-h2-fontWeight': '700',\n '--rt-h2-lineHeight': '1.2',\n '--rt-h3-fontSize': '38px',\n '--rt-h3-fontStyle': 'normal',\n '--rt-h3-fontWeight': '500',\n '--rt-h3-lineHeight': '1.2',\n '--rt-h4-fontSize': '34px',\n '--rt-h4-fontStyle': 'normal',\n '--rt-h4-fontWeight': '700',\n '--rt-h4-lineHeight': '1.2',\n '--rt-h5-fontSize': '28px',\n '--rt-h5-fontStyle': 'normal',\n '--rt-h5-fontWeight': '700',\n '--rt-h5-lineHeight': '1.2',\n '--rt-h6-fontSize': '22px',\n '--rt-h6-fontStyle': 'normal',\n '--rt-h6-fontWeight': '500',\n '--rt-h6-lineHeight': '1.2',\n '--rt-p1-fontSize': '18px',\n '--rt-p1-fontStyle': 'normal',\n '--rt-p1-fontWeight': '500',\n '--rt-p1-lineHeight': '24px',\n '--rt-unstyled-fontSize': '16px',\n '--rt-unstyled-fontStyle': 'normal',\n '--rt-unstyled-fontWeight': '500',\n '--rt-unstyled-lineHeight': '24px',\n '--rt-p3-fontSize': '14px',\n '--rt-p3-fontStyle': 'normal',\n '--rt-p3-fontWeight': '500',\n '--rt-p3-lineHeight': '18px',\n};\n\nfunction buildInitialHtml(\n value?: string,\n typedKey?: string,\n): string | undefined {\n if (!typedKey) return value;\n const existing = value ? HTMLToText(value) : '';\n return `<p>${existing}${typedKey}</p>`;\n}\n\nexport interface CellRichTextEditorProps {\n value?: string;\n onChange: (value: string) => void;\n autoFocus?: boolean;\n initialTypedKey?: string;\n /** Controlled fullscreen state — managed by the parent (CellRichTextInput). */\n isFullScreen?: boolean;\n onToggleFullScreen?: () => void;\n /** CSS custom properties for the --rt-* theming API. Defaults to standard sizes. */\n textStyle?: RichTextStyleVariables;\n}\n\n/** Cell-layer Draft.js editor — fires onChange on every keystroke (not on blur).\n * Fullscreen state is controlled by the parent so ESC handling can be\n * centralised in a capture-phase listener without React portal limitations. */\nexport const CellRichTextEditor: React.FC<CellRichTextEditorProps> = ({\n value,\n onChange,\n autoFocus,\n initialTypedKey,\n isFullScreen = false,\n onToggleFullScreen,\n textStyle = DEFAULT_CELL_TEXT_STYLE,\n}) => {\n const initialHtml = useMemo(\n () => buildInitialHtml(value, initialTypedKey),\n // Deliberately computed only on mount — typed key is a one-shot initializer.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n const {\n editorState: initialEditorState,\n customStyleMap,\n inlineStyles,\n } = useMemo(\n () => htmlToEditorState(initialHtml, compositeDecorator, EDITING_OPTIONS),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n const [editorState, setEditorState] =\n useState<EditorState>(initialEditorState);\n const inlineStylesRef = useRef<InlineStyles>(inlineStyles);\n const customStyleMapRef = useRef<CustomStyleMap>(customStyleMap);\n\n const handleChange = useCallback(\n (newState: EditorState) => {\n setEditorState(newState);\n const html = editorStateToHTML(\n newState,\n inlineStylesRef.current,\n EDITING_OPTIONS,\n );\n onChange(html);\n },\n [onChange],\n );\n\n return (\n <>\n {!isFullScreen && (\n <div style={textStyle as React.CSSProperties}>\n <RichEditor\n editorState={editorState}\n customStyleMap={customStyleMapRef.current}\n onChange={handleChange}\n onToggleFullScreen={onToggleFullScreen}\n isFullScreen={false}\n autoFocus={autoFocus}\n headingsEnabled\n />\n </div>\n )}\n {isFullScreen && (\n <Modal screen=\"desktop\" isOpen>\n <div\n className={combineClasses(style, classes.editor, {\n isFullScreen: true,\n })}\n style={textStyle as React.CSSProperties}\n >\n <RichEditor\n editorState={editorState}\n customStyleMap={customStyleMapRef.current}\n onChange={handleChange}\n onToggleFullScreen={onToggleFullScreen}\n isFullScreen\n autoFocus\n headingsEnabled\n />\n </div>\n </Modal>\n )}\n </>\n );\n};\n\nCellRichTextEditor.displayName = 'CellRichTextEditor';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAGuE,IAAAQ,YAAA;AA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names":["_react","_interopRequireWildcard","require","_designSystem","_autoFieldTypes","_compositeDecorator","_utils","_richEditor","_stylableHelper","_richTextEditorStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EDITING_OPTIONS","headingsEnabled","DEFAULT_CELL_TEXT_STYLE","exports","buildInitialHtml","value","typedKey","existing","HTMLToText","CellRichTextEditor","onChange","autoFocus","initialTypedKey","isFullScreen","onToggleFullScreen","textStyle","initialHtml","useMemo","editorState","initialEditorState","customStyleMap","inlineStyles","htmlToEditorState","compositeDecorator","setEditorState","useState","inlineStylesRef","useRef","customStyleMapRef","contentRef","getCurrentContent","useEffect","editorStateToHTML","current","handleChange","useCallback","newState","content","html","createElement","Fragment","style","__self","__source","fileName","lineNumber","columnNumber","RichEditor","Modal","screen","isOpen","className","combineClasses","classes","editor","displayName"],"sources":["../../../../src/components/rich-text/cell-rich-text-editor.tsx"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { EditorState } from 'draft-js';\nimport { Modal } from '@wix/design-system';\n\nimport { HTMLToText } from '../../auto-field-types';\nimport { compositeDecorator } from './rich-text-input/rich-text-editor/composite-decorator';\nimport {\n htmlToEditorState,\n editorStateToHTML,\n} from './rich-text-input/rich-text-editor/utils';\nimport type {\n CustomStyleMap,\n InlineStyles,\n} from './rich-text-input/rich-text-editor/utils';\nimport { RichEditor } from './rich-text-input/rich-text-editor/rich-editor';\nimport { combineClasses } from './rich-text-input/rich-text-editor/utils/stylable-helper';\nimport {\n style,\n classes,\n} from './rich-text-input/rich-text-editor/rich-text-editor.st.css.js';\nimport type { RichTextStyleVariables } from './rich-text-input/rich-text-editor/text-style';\n\nconst EDITING_OPTIONS = { headingsEnabled: true };\n\n/** Default text style — matches the CSS fallback values in rich-editor.st.css.\n * Consumers (e.g. cms-web) can override with site-specific font values. */\nexport const DEFAULT_CELL_TEXT_STYLE: RichTextStyleVariables = {\n '--rt-h1-fontSize': '72px',\n '--rt-h1-fontStyle': 'normal',\n '--rt-h1-fontWeight': '700',\n '--rt-h1-lineHeight': '1.33',\n '--rt-h2-fontSize': '42px',\n '--rt-h2-fontStyle': 'normal',\n '--rt-h2-fontWeight': '700',\n '--rt-h2-lineHeight': '1.2',\n '--rt-h3-fontSize': '38px',\n '--rt-h3-fontStyle': 'normal',\n '--rt-h3-fontWeight': '500',\n '--rt-h3-lineHeight': '1.2',\n '--rt-h4-fontSize': '34px',\n '--rt-h4-fontStyle': 'normal',\n '--rt-h4-fontWeight': '700',\n '--rt-h4-lineHeight': '1.2',\n '--rt-h5-fontSize': '28px',\n '--rt-h5-fontStyle': 'normal',\n '--rt-h5-fontWeight': '700',\n '--rt-h5-lineHeight': '1.2',\n '--rt-h6-fontSize': '22px',\n '--rt-h6-fontStyle': 'normal',\n '--rt-h6-fontWeight': '500',\n '--rt-h6-lineHeight': '1.2',\n '--rt-p1-fontSize': '18px',\n '--rt-p1-fontStyle': 'normal',\n '--rt-p1-fontWeight': '500',\n '--rt-p1-lineHeight': '24px',\n '--rt-unstyled-fontSize': '16px',\n '--rt-unstyled-fontStyle': 'normal',\n '--rt-unstyled-fontWeight': '500',\n '--rt-unstyled-lineHeight': '24px',\n '--rt-p3-fontSize': '14px',\n '--rt-p3-fontStyle': 'normal',\n '--rt-p3-fontWeight': '500',\n '--rt-p3-lineHeight': '18px',\n};\n\nfunction buildInitialHtml(\n value?: string,\n typedKey?: string,\n): string | undefined {\n if (!typedKey) return value;\n const existing = value ? HTMLToText(value) : '';\n return `<p>${existing}${typedKey}</p>`;\n}\n\nexport interface CellRichTextEditorProps {\n value?: string;\n onChange: (value: string) => void;\n autoFocus?: boolean;\n initialTypedKey?: string;\n /** Controlled fullscreen state — managed by the parent (CellRichTextInput). */\n isFullScreen?: boolean;\n onToggleFullScreen?: () => void;\n /** CSS custom properties for the --rt-* theming API. Defaults to standard sizes. */\n textStyle?: RichTextStyleVariables;\n}\n\n/** Cell-layer Draft.js editor — fires onChange on every keystroke (not on blur).\n * Fullscreen state is controlled by the parent so ESC handling can be\n * centralised in a capture-phase listener without React portal limitations. */\nexport const CellRichTextEditor: React.FC<CellRichTextEditorProps> = ({\n value,\n onChange,\n autoFocus,\n initialTypedKey,\n isFullScreen = false,\n onToggleFullScreen,\n textStyle = DEFAULT_CELL_TEXT_STYLE,\n}) => {\n const initialHtml = useMemo(\n () => buildInitialHtml(value, initialTypedKey),\n // Deliberately computed only on mount — typed key is a one-shot initializer.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n const {\n editorState: initialEditorState,\n customStyleMap,\n inlineStyles,\n } = useMemo(\n () => htmlToEditorState(initialHtml, compositeDecorator, EDITING_OPTIONS),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n const [editorState, setEditorState] =\n useState<EditorState>(initialEditorState);\n const inlineStylesRef = useRef<InlineStyles>(inlineStyles);\n const customStyleMapRef = useRef<CustomStyleMap>(customStyleMap);\n\n const contentRef = useRef(initialEditorState.getCurrentContent());\n\n // A typed-to-edit key is already a change, even before the user edits again.\n useEffect(() => {\n if (initialTypedKey) {\n onChange(\n editorStateToHTML(\n initialEditorState,\n inlineStylesRef.current,\n EDITING_OPTIONS,\n ),\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChange = useCallback(\n (newState: EditorState) => {\n setEditorState(newState);\n // Draft.js also fires onChange for focus and selection changes. Only a\n // content change is an edit — otherwise an untouched cell would save.\n const content = newState.getCurrentContent();\n if (content === contentRef.current) {\n return;\n }\n contentRef.current = content;\n const html = editorStateToHTML(\n newState,\n inlineStylesRef.current,\n EDITING_OPTIONS,\n );\n onChange(html);\n },\n [onChange],\n );\n\n return (\n <>\n {!isFullScreen && (\n <div style={textStyle as React.CSSProperties}>\n <RichEditor\n editorState={editorState}\n customStyleMap={customStyleMapRef.current}\n onChange={handleChange}\n onToggleFullScreen={onToggleFullScreen}\n isFullScreen={false}\n autoFocus={autoFocus}\n headingsEnabled\n />\n </div>\n )}\n {isFullScreen && (\n <Modal screen=\"desktop\" isOpen>\n <div\n className={combineClasses(style, classes.editor, {\n isFullScreen: true,\n })}\n style={textStyle as React.CSSProperties}\n >\n <RichEditor\n editorState={editorState}\n customStyleMap={customStyleMapRef.current}\n onChange={handleChange}\n onToggleFullScreen={onToggleFullScreen}\n isFullScreen\n autoFocus\n headingsEnabled\n />\n </div>\n </Modal>\n )}\n </>\n );\n};\n\nCellRichTextEditor.displayName = 'CellRichTextEditor';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAQA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAGuE,IAAAQ,YAAA;AAAA,SAAAT,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IA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