@makeswift/runtime 0.9.11 → 0.10.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 (265) hide show
  1. package/dist/Box.cjs.js +4 -1
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +5 -2
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +4 -3
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +5 -4
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +4 -3
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +5 -4
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +4 -1
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +5 -2
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +4 -1
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +5 -2
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +1 -0
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +2 -1
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +14 -13
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +6 -5
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +12 -11
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +12 -11
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +4 -1
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +6 -3
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +12 -11
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +12 -11
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +7 -4
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +6 -3
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +34 -26
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +30 -22
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +125 -246
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +126 -246
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +4 -1
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +5 -2
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +7 -6
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +8 -7
  60. package/dist/SocialLinks.es.js.map +1 -1
  61. package/dist/Text.cjs.js +12 -71
  62. package/dist/Text.cjs.js.map +1 -1
  63. package/dist/Text.es.js +13 -64
  64. package/dist/Text.es.js.map +1 -1
  65. package/dist/Video.cjs.js +1 -0
  66. package/dist/Video.cjs.js.map +1 -1
  67. package/dist/Video.es.js +2 -1
  68. package/dist/Video.es.js.map +1 -1
  69. package/dist/builder.cjs.js +2 -0
  70. package/dist/builder.cjs.js.map +1 -1
  71. package/dist/builder.es.js +2 -0
  72. package/dist/builder.es.js.map +1 -1
  73. package/dist/components.cjs.js +4 -3
  74. package/dist/components.cjs.js.map +1 -1
  75. package/dist/components.es.js +4 -3
  76. package/dist/components.es.js.map +1 -1
  77. package/dist/control-serialization.es.js +1 -1
  78. package/dist/controls.cjs.js +31 -21
  79. package/dist/controls.cjs.js.map +1 -1
  80. package/dist/controls.es.js +4 -2
  81. package/dist/controls.es.js.map +1 -1
  82. package/dist/index.cjs.js +307 -243
  83. package/dist/index.cjs.js.map +1 -1
  84. package/dist/index.cjs2.js +3 -3
  85. package/dist/index.cjs2.js.map +1 -1
  86. package/dist/index.cjs3.js +21 -107
  87. package/dist/index.cjs3.js.map +1 -1
  88. package/dist/index.cjs4.js +16 -57
  89. package/dist/index.cjs4.js.map +1 -1
  90. package/dist/index.cjs5.js +53 -243
  91. package/dist/index.cjs5.js.map +1 -1
  92. package/dist/index.cjs6.js +16 -37
  93. package/dist/index.cjs6.js.map +1 -1
  94. package/dist/index.cjs7.js +376 -14
  95. package/dist/index.cjs7.js.map +1 -1
  96. package/dist/index.cjs8.js +276 -12
  97. package/dist/index.cjs8.js.map +1 -1
  98. package/dist/index.es.js +279 -215
  99. package/dist/index.es.js.map +1 -1
  100. package/dist/index.es2.js +2 -2
  101. package/dist/index.es3.js +22 -103
  102. package/dist/index.es3.js.map +1 -1
  103. package/dist/index.es4.js +16 -57
  104. package/dist/index.es4.js.map +1 -1
  105. package/dist/index.es5.js +53 -241
  106. package/dist/index.es5.js.map +1 -1
  107. package/dist/index.es6.js +16 -32
  108. package/dist/index.es6.js.map +1 -1
  109. package/dist/index.es7.js +372 -16
  110. package/dist/index.es7.js.map +1 -1
  111. package/dist/index.es8.js +271 -11
  112. package/dist/index.es8.js.map +1 -1
  113. package/dist/main.cjs.js +2 -0
  114. package/dist/main.cjs.js.map +1 -1
  115. package/dist/main.es.js +2 -0
  116. package/dist/main.es.js.map +1 -1
  117. package/dist/next.cjs.js +4 -1
  118. package/dist/next.cjs.js.map +1 -1
  119. package/dist/next.es.js +5 -2
  120. package/dist/next.es.js.map +1 -1
  121. package/dist/prop-controllers.cjs.js +2 -0
  122. package/dist/prop-controllers.cjs.js.map +1 -1
  123. package/dist/prop-controllers.es.js +2 -0
  124. package/dist/prop-controllers.es.js.map +1 -1
  125. package/dist/react-page.cjs.js +1731 -183
  126. package/dist/react-page.cjs.js.map +1 -1
  127. package/dist/react-page.es.js +1694 -182
  128. package/dist/react-page.es.js.map +1 -1
  129. package/dist/react.cjs.js +4 -1
  130. package/dist/react.cjs.js.map +1 -1
  131. package/dist/react.es.js +4 -1
  132. package/dist/react.es.js.map +1 -1
  133. package/dist/slate.cjs.js +32 -377
  134. package/dist/slate.cjs.js.map +1 -1
  135. package/dist/slate.es.js +14 -363
  136. package/dist/slate.es.js.map +1 -1
  137. package/dist/text-input.cjs.js +26 -0
  138. package/dist/text-input.cjs.js.map +1 -0
  139. package/dist/text-input.es.js +18 -0
  140. package/dist/text-input.es.js.map +1 -0
  141. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -4
  142. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  143. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  144. package/dist/types/src/controls/list.d.ts +5 -2
  145. package/dist/types/src/controls/list.d.ts.map +1 -1
  146. package/dist/types/src/controls/rich-text/fixtures/v2-data-types.d.ts.map +1 -1
  147. package/dist/types/src/controls/rich-text/introspection.d.ts +5 -0
  148. package/dist/types/src/controls/rich-text/introspection.d.ts.map +1 -0
  149. package/dist/types/src/controls/rich-text/introspection.test.d.ts +2 -0
  150. package/dist/types/src/controls/rich-text/introspection.test.d.ts.map +1 -0
  151. package/dist/types/src/controls/rich-text/rich-text.d.ts +0 -1
  152. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  153. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  154. package/dist/types/src/controls/rich-text-v2/introspection.d.ts +5 -0
  155. package/dist/types/src/controls/rich-text-v2/introspection.d.ts.map +1 -0
  156. package/dist/types/src/controls/rich-text-v2/introspection.test.d.ts +2 -0
  157. package/dist/types/src/controls/rich-text-v2/introspection.test.d.ts.map +1 -0
  158. package/dist/types/src/controls/rich-text-v2/plugin.d.ts +29 -0
  159. package/dist/types/src/controls/rich-text-v2/plugin.d.ts.map +1 -0
  160. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +32 -34
  161. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  162. package/dist/types/src/controls/rich-text-v2/translation.d.ts +1 -1
  163. package/dist/types/src/controls/rich-text-v2/translation.d.ts.map +1 -1
  164. package/dist/types/src/controls/shape.d.ts +5 -2
  165. package/dist/types/src/controls/shape.d.ts.map +1 -1
  166. package/dist/types/src/controls/typography.d.ts +2 -0
  167. package/dist/types/src/controls/typography.d.ts.map +1 -1
  168. package/dist/types/src/next/client.d.ts.map +1 -1
  169. package/dist/types/src/prop-controllers/descriptors.d.ts +11 -1
  170. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  171. package/dist/types/src/prop-controllers/introspection.d.ts +0 -2
  172. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  173. package/dist/types/src/runtimes/react/controls/control.d.ts +1 -1
  174. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  175. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/editable-text.d.ts +4 -3
  176. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/editable-text.d.ts.map +1 -0
  177. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/index.d.ts.map +1 -0
  178. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncDOMSelection.d.ts.map +1 -0
  179. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncWithBuilder.d.ts +1 -1
  180. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.d.ts.map +1 -0
  181. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/ReadOnlyText.d.ts +2 -2
  182. package/dist/types/src/runtimes/react/controls/rich-text/ReadOnlyText.d.ts.map +1 -0
  183. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/block.d.ts +1 -1
  184. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/block.d.ts.map +1 -0
  185. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/element.d.ts.map +1 -0
  186. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/index.d.ts.map +1 -0
  187. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/inline.d.ts +1 -1
  188. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/inline.d.ts.map +1 -0
  189. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/index.d.ts.map +1 -0
  190. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/leaf.d.ts.map +1 -0
  191. package/dist/types/src/runtimes/react/controls/rich-text/components/index.d.ts.map +1 -0
  192. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts +2 -0
  193. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts.map +1 -0
  194. package/dist/types/src/runtimes/react/controls/{rich-text.d.ts → rich-text/rich-text.d.ts} +1 -1
  195. package/dist/types/src/runtimes/react/controls/rich-text/rich-text.d.ts.map +1 -0
  196. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  197. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +3 -2
  198. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
  199. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +2 -1
  200. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
  201. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts +4 -0
  202. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -0
  203. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +8 -16
  204. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  205. package/dist/types/src/slate/BlockPlugin/index.d.ts +3 -3
  206. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  207. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -4
  208. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  209. package/dist/types/src/slate/InlinePlugin/index.d.ts +3 -3
  210. package/dist/types/src/slate/InlinePlugin/index.d.ts.map +1 -1
  211. package/dist/types/src/slate/InlinePlugin/types.d.ts +1 -1
  212. package/dist/types/src/slate/InlinePlugin/types.d.ts.map +1 -1
  213. package/dist/types/src/slate/LinkPlugin/index.d.ts +3 -3
  214. package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
  215. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts +16 -0
  216. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts.map +1 -0
  217. package/dist/types/src/slate/LocalChangesPlugin/index.d.ts +16 -0
  218. package/dist/types/src/slate/LocalChangesPlugin/index.d.ts.map +1 -0
  219. package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
  220. package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -1
  221. package/dist/types/src/slate/TypographyPlugin/index.d.ts +3 -3
  222. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  223. package/dist/types/src/slate/index.d.ts +1 -0
  224. package/dist/types/src/slate/index.d.ts.map +1 -1
  225. package/dist/types/src/slate/types.d.ts +3 -12
  226. package/dist/types/src/slate/types.d.ts.map +1 -1
  227. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  228. package/dist/types/src/state/modules/locales.d.ts.map +1 -1
  229. package/package.json +1 -2
  230. package/dist/index.cjs10.js +0 -390
  231. package/dist/index.cjs10.js.map +0 -1
  232. package/dist/index.cjs9.js +0 -299
  233. package/dist/index.cjs9.js.map +0 -1
  234. package/dist/index.es10.js +0 -383
  235. package/dist/index.es10.js.map +0 -1
  236. package/dist/index.es9.js +0 -292
  237. package/dist/index.es9.js.map +0 -1
  238. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +0 -1
  239. package/dist/types/src/components/builtin/Text/EditableText/index.d.ts.map +0 -1
  240. package/dist/types/src/components/builtin/Text/EditableText/useSyncDOMSelection.d.ts.map +0 -1
  241. package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +0 -1
  242. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +0 -1
  243. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +0 -1
  244. package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +0 -1
  245. package/dist/types/src/components/builtin/Text/components/Element/index.d.ts.map +0 -1
  246. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +0 -1
  247. package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +0 -1
  248. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +0 -1
  249. package/dist/types/src/components/builtin/Text/components/index.d.ts.map +0 -1
  250. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +0 -1
  251. package/dist/types.cjs2.js +0 -746
  252. package/dist/types.cjs2.js.map +0 -1
  253. package/dist/types.es2.js +0 -729
  254. package/dist/types.es2.js.map +0 -1
  255. package/dist/typography.cjs.js +0 -56
  256. package/dist/typography.cjs.js.map +0 -1
  257. package/dist/typography.es.js +0 -41
  258. package/dist/typography.es.js.map +0 -1
  259. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/index.d.ts +0 -0
  260. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncDOMSelection.d.ts +0 -0
  261. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/element.d.ts +0 -0
  262. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/index.d.ts +0 -0
  263. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/index.d.ts +0 -0
  264. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/leaf.d.ts +0 -0
  265. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/index.d.ts +0 -0
package/dist/types.es2.js DELETED
@@ -1,729 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { Element, Range, Editor, Text, Path, Transforms, Node, Point } from "slate";
21
- import { findBreakpointOverride } from "./state/breakpoints.es.js";
22
- import { bi as BlockType, bg as InlineType, ba as createRichTextV2Plugin, bh as RootBlockType, U as useStyle } from "./react-page.es.js";
23
- import "./actions.es.js";
24
- import { f as Select, u as unstable_IconRadioGroupIcon } from "./typography.es.js";
25
- import isHotkey from "is-hotkey";
26
- import { cx } from "@emotion/css";
27
- import { jsx, Fragment } from "react/jsx-runtime";
28
- const ElementUtils = {
29
- isRootBlock(node) {
30
- return Element.isElement(node) && (Element.isElementType(node, BlockType.Paragraph) || Element.isElementType(node, BlockType.Heading1) || Element.isElementType(node, BlockType.Heading2) || Element.isElementType(node, BlockType.Heading3) || Element.isElementType(node, BlockType.Heading3) || Element.isElementType(node, BlockType.Heading4) || Element.isElementType(node, BlockType.Heading5) || Element.isElementType(node, BlockType.Heading6) || Element.isElementType(node, BlockType.BlockQuote) || Element.isElementType(node, BlockType.UnorderedList) || Element.isElementType(node, BlockType.OrderedList) || Element.isElementType(node, BlockType.Text) || Element.isElementType(node, BlockType.Default));
31
- },
32
- isBlock(node) {
33
- return Element.isElement(node) && (this.isRootBlock(node) || Element.isElementType(node, BlockType.ListItem) || Element.isElementType(node, BlockType.ListItemChild));
34
- },
35
- isInline(node) {
36
- return Element.isElementType(node, InlineType.Code) || Element.isElementType(node, InlineType.Link) || Element.isElementType(node, InlineType.SubScript) || Element.isElementType(node, InlineType.SuperScript);
37
- },
38
- isConvertibleToListTextNode(node) {
39
- return !this.isList(node) && !this.isListItem(node) && !this.isListItemChild(node);
40
- },
41
- isList(node) {
42
- return Element.isElementType(node, BlockType.OrderedList) || Element.isElementType(node, BlockType.UnorderedList);
43
- },
44
- isListItem(node) {
45
- return Element.isElementType(node, BlockType.ListItem);
46
- },
47
- isListItemChild(node) {
48
- return Element.isElementType(node, BlockType.ListItemChild);
49
- },
50
- createText() {
51
- return { text: "" };
52
- },
53
- createParagraph() {
54
- return {
55
- children: [this.createText()],
56
- type: BlockType.Paragraph
57
- };
58
- },
59
- createList(type = BlockType.UnorderedList) {
60
- return { children: [this.createText()], type };
61
- },
62
- createListItem() {
63
- return {
64
- children: [this.createListItemChild()],
65
- type: BlockType.ListItem
66
- };
67
- },
68
- createListItemChild() {
69
- return {
70
- children: [this.createText()],
71
- type: BlockType.ListItemChild
72
- };
73
- }
74
- };
75
- function unhangRange(editor, range) {
76
- let [start, end] = Range.edges(range);
77
- if (start.offset !== 0 || end.offset !== 0 || Range.isCollapsed(range)) {
78
- return range;
79
- }
80
- const endBlock = Editor.above(editor, {
81
- at: end,
82
- match: (n) => Element.isElement(n) && Editor.isBlock(editor, n)
83
- });
84
- const blockPath = endBlock ? endBlock[1] : [];
85
- const first = Editor.start(editor, start);
86
- const before = { anchor: first, focus: end };
87
- let skip = true;
88
- for (const [node, path] of Editor.nodes(editor, {
89
- at: before,
90
- match: Text.isText,
91
- reverse: true
92
- })) {
93
- if (skip) {
94
- skip = false;
95
- continue;
96
- }
97
- if (node.text !== "" || Path.isBefore(path, blockPath)) {
98
- end = { path, offset: node.text.length };
99
- break;
100
- }
101
- }
102
- return { anchor: start, focus: end };
103
- }
104
- function getSelection(editor) {
105
- if (editor.selection)
106
- return unhangRange(editor, editor.selection);
107
- return {
108
- anchor: Editor.start(editor, []),
109
- focus: Editor.end(editor, [])
110
- };
111
- }
112
- function getBlocksInSelection(editor) {
113
- return Array.from(Editor.nodes(editor, {
114
- at: getSelection(editor),
115
- match: (node) => ElementUtils.isRootBlock(node)
116
- })).filter((entry) => ElementUtils.isRootBlock(entry[0]));
117
- }
118
- function getActiveBlockType(editor) {
119
- var _a;
120
- const rootBlocks = getBlocksInSelection(editor).map(([node]) => node.type);
121
- return rootBlocks.reduce((a, b) => a === b ? b : null, (_a = rootBlocks.at(0)) != null ? _a : null);
122
- }
123
- function setBlockKeyForDevice(editor, breakpoints, deviceId, key, value, options) {
124
- var _a, _b;
125
- const at = (_a = options == null ? void 0 : options.at) != null ? _a : editor.selection;
126
- if (!at)
127
- return;
128
- const rootElements = getBlocksInSelection(editor);
129
- for (const [node, path] of rootElements) {
130
- if (ElementUtils.isBlock(node)) {
131
- const deviceValues = (_b = node[key]) != null ? _b : [];
132
- const currentDeviceValue = findBreakpointOverride(breakpoints, deviceValues, deviceId, (v) => v);
133
- const nextDeviceValue = __spreadProps(__spreadValues({}, currentDeviceValue), {
134
- deviceId,
135
- value
136
- });
137
- Transforms.setNodes(editor, {
138
- [key]: [...deviceValues.filter((v) => v.deviceId !== deviceId), nextDeviceValue]
139
- }, { at: path });
140
- }
141
- }
142
- }
143
- function clearBlockKeyForDevice(editor, deviceId, key) {
144
- var _a;
145
- const rootElements = getBlocksInSelection(editor);
146
- for (const [node, path] of rootElements) {
147
- if (ElementUtils.isBlock(node)) {
148
- const deviceOverrides = (_a = node[key]) != null ? _a : [];
149
- Transforms.setNodes(editor, {
150
- [key]: deviceOverrides.filter((v) => v.deviceId !== deviceId)
151
- }, { at: path });
152
- }
153
- }
154
- }
155
- function wrapInline(editor, inline) {
156
- Transforms.wrapNodes(editor, inline, {
157
- at: getSelection(editor),
158
- split: true
159
- });
160
- }
161
- function unwrapInline(editor, type) {
162
- Transforms.unwrapNodes(editor, {
163
- match: (node) => ElementUtils.isInline(node) && node.type === type,
164
- at: getSelection(editor)
165
- });
166
- }
167
- const EditorUtils = {
168
- getFirstAncestorList(editor, path) {
169
- try {
170
- const parentList = Editor.above(editor, {
171
- at: path,
172
- match: (node) => ElementUtils.isList(node)
173
- });
174
- return parentList != null ? parentList : null;
175
- } catch (e) {
176
- return null;
177
- }
178
- },
179
- getFirstAncestorListItem(editor, path) {
180
- try {
181
- const parentListItem = Editor.above(editor, {
182
- at: path,
183
- match: (node) => ElementUtils.isListItem(node)
184
- });
185
- return parentListItem != null ? parentListItem : null;
186
- } catch (e) {
187
- return null;
188
- }
189
- }
190
- };
191
- const LIST_ITEM_CHILD_POSITION = 0;
192
- const LIST_ITEM_LIST_POSITION = 1;
193
- function filterForSubtreeRoots(entries) {
194
- return entries.filter(([, nodePath]) => !Path.ancestors(nodePath).some((ancestor) => {
195
- return entries.some(([, path]) => Path.equals(path, ancestor));
196
- }));
197
- }
198
- function unwrapPath(editor, listItemPath) {
199
- const parentList = EditorUtils.getFirstAncestorList(editor, listItemPath);
200
- const listItemContainingParentList = EditorUtils.getFirstAncestorListItem(editor, listItemPath);
201
- if (!parentList || listItemContainingParentList)
202
- return;
203
- Editor.withoutNormalizing(editor, () => {
204
- const listItemTextPath = [...listItemPath, LIST_ITEM_CHILD_POSITION];
205
- const listItemNestedListPath = [...listItemPath, LIST_ITEM_LIST_POSITION];
206
- if (Node.has(editor, listItemNestedListPath)) {
207
- Transforms.setNodes(editor, { type: parentList[0].type }, { at: listItemNestedListPath });
208
- Transforms.liftNodes(editor, { at: listItemNestedListPath });
209
- Transforms.liftNodes(editor, { at: Path.next(listItemPath) });
210
- }
211
- if (Node.has(editor, listItemTextPath)) {
212
- Transforms.setNodes(editor, { type: BlockType.Paragraph }, {
213
- at: listItemTextPath
214
- });
215
- Transforms.liftNodes(editor, { at: listItemTextPath });
216
- Transforms.liftNodes(editor, { at: listItemPath });
217
- }
218
- });
219
- }
220
- function unwrapList(editor, options) {
221
- var _a;
222
- const at = (_a = options == null ? void 0 : options.at) != null ? _a : editor.selection;
223
- if (!at)
224
- return;
225
- const listItems = Array.from(Editor.nodes(editor, {
226
- at,
227
- match: (node) => {
228
- return Element.isElement(node) && ElementUtils.isListItem(node);
229
- }
230
- }));
231
- const subRoots = filterForSubtreeRoots(listItems);
232
- const refs = subRoots.map(([_, path]) => Editor.pathRef(editor, path));
233
- refs.forEach((ref) => {
234
- if (ref.current) {
235
- unwrapPath(editor, ref.current);
236
- }
237
- ref.unref();
238
- });
239
- }
240
- function wrapList(editor, options = { type: BlockType.UnorderedList }) {
241
- var _a;
242
- const at = (_a = options.at) != null ? _a : editor.selection;
243
- if (!at)
244
- return;
245
- const nonListEntries = Array.from(Editor.nodes(editor, {
246
- at,
247
- match: (node) => {
248
- return Element.isElement(node) && ElementUtils.isConvertibleToListTextNode(node);
249
- }
250
- }));
251
- const refs = nonListEntries.map(([_, path]) => Editor.pathRef(editor, path));
252
- refs.forEach((ref) => {
253
- const path = ref.current;
254
- if (path) {
255
- Editor.withoutNormalizing(editor, () => {
256
- Transforms.setNodes(editor, { type: BlockType.ListItemChild }, {
257
- at: path
258
- });
259
- Transforms.wrapNodes(editor, ElementUtils.createListItem(), {
260
- match: (node) => ElementUtils.isListItemChild(node),
261
- at: path
262
- });
263
- Transforms.wrapNodes(editor, ElementUtils.createList(options.type), {
264
- at: path
265
- });
266
- });
267
- }
268
- ref.unref();
269
- });
270
- }
271
- const LocationUtils = {
272
- getStartPath(location) {
273
- if (Range.isRange(location))
274
- return Range.start(location).path;
275
- if (Point.isPoint(location))
276
- return location.path;
277
- return location;
278
- }
279
- };
280
- function getSelectedListItems(editor) {
281
- var _a, _b;
282
- if (!editor.selection)
283
- return [];
284
- const start = LocationUtils.getStartPath(editor.selection);
285
- const listItems = Editor.nodes(editor, {
286
- at: editor.selection,
287
- match: (node) => ElementUtils.isListItem(node)
288
- });
289
- const firstAncestorPath = (_b = (_a = EditorUtils.getFirstAncestorListItem(editor, start)) == null ? void 0 : _a[1]) != null ? _b : [];
290
- return Array.from(listItems).filter((node) => Path.isDescendant(start, node[1]) ? Path.equals(node[1], firstAncestorPath) : !Path.isAfter(start, node[1]));
291
- }
292
- function indentPath(editor, path) {
293
- const parent = Node.parent(editor, path);
294
- if (!path || !Path.hasPrevious(path) || !ElementUtils.isList(parent))
295
- return;
296
- const previosPath = Path.previous(path);
297
- const previousChildListPath = [...previosPath, LIST_ITEM_LIST_POSITION];
298
- const previousHasChildList = Node.has(editor, previousChildListPath);
299
- Editor.withoutNormalizing(editor, () => {
300
- if (!previousHasChildList) {
301
- Transforms.insertNodes(editor, ElementUtils.createList(parent.type), {
302
- at: previousChildListPath
303
- });
304
- }
305
- const previousChildList = Node.get(editor, previousChildListPath);
306
- if (ElementUtils.isList(previousChildList)) {
307
- const index = previousHasChildList ? previousChildList.children.length : 0;
308
- Transforms.moveNodes(editor, {
309
- at: path,
310
- to: [...previousChildListPath, index]
311
- });
312
- }
313
- });
314
- }
315
- function indent(editor) {
316
- if (!editor.selection)
317
- return;
318
- const listItems = getSelectedListItems(editor);
319
- const subRoots = filterForSubtreeRoots(listItems);
320
- const refs = subRoots.map(([_, path]) => Editor.pathRef(editor, path));
321
- refs.forEach((ref) => {
322
- if (ref.current) {
323
- indentPath(editor, ref.current);
324
- }
325
- ref.unref();
326
- });
327
- }
328
- function dedentPath(editor, listItemPath) {
329
- const parentList = EditorUtils.getFirstAncestorList(editor, listItemPath);
330
- const listItemContainingParentList = EditorUtils.getFirstAncestorListItem(editor, listItemPath);
331
- if (!parentList || !listItemContainingParentList)
332
- return;
333
- const [parentListNode, parentListPath] = parentList;
334
- const [_, listItemContainingParentListPath] = listItemContainingParentList;
335
- const listItemPosition = listItemPath[listItemPath.length - 1];
336
- const previousSiblings = parentListNode.children.slice(0, listItemPosition);
337
- const nextSiblings = parentListNode.children.slice(listItemPosition + 1);
338
- Editor.withoutNormalizing(editor, () => {
339
- nextSiblings.forEach(() => {
340
- const nextSiblingPath = [...parentListPath, listItemPosition + 1];
341
- indentPath(editor, nextSiblingPath);
342
- });
343
- Transforms.moveNodes(editor, {
344
- at: listItemPath,
345
- to: Path.next(listItemContainingParentListPath)
346
- });
347
- if (previousSiblings.length === 0) {
348
- Transforms.removeNodes(editor, { at: parentListPath });
349
- }
350
- });
351
- }
352
- function dedent(editor) {
353
- if (!editor.selection)
354
- return;
355
- const listItems = getSelectedListItems(editor);
356
- const subRoots = filterForSubtreeRoots(listItems);
357
- const refs = subRoots.map(([_, path]) => Editor.pathRef(editor, path));
358
- refs.forEach((ref) => {
359
- if (ref.current) {
360
- dedentPath(editor, ref.current);
361
- }
362
- ref.unref();
363
- });
364
- }
365
- function toggleList(editor, options = { type: BlockType.UnorderedList }) {
366
- var _a;
367
- const at = (_a = options.at) != null ? _a : editor.selection;
368
- if (at == null)
369
- return;
370
- const start = LocationUtils.getStartPath(at);
371
- const ancestorPath = Path.ancestors(start).at(1);
372
- if (!ancestorPath || !Node.has(editor, ancestorPath))
373
- return;
374
- const ancestor = Node.get(editor, ancestorPath);
375
- if (!ElementUtils.isList(ancestor)) {
376
- return wrapList(editor, { type: options.type, at });
377
- }
378
- if (ancestor.type === options.type) {
379
- unwrapList(editor, { at });
380
- } else {
381
- Transforms.setNodes(editor, { type: options.type }, { at: ancestorPath });
382
- }
383
- }
384
- const BlockActions = {
385
- setBlockKeyForDevice,
386
- clearBlockKeyForDevice,
387
- wrapInline,
388
- unwrapInline
389
- };
390
- const ListActions = {
391
- unwrapList,
392
- wrapList,
393
- indent,
394
- dedent,
395
- toggleList
396
- };
397
- function onKeyDown(e, editor) {
398
- if (!editor.selection || Array.from(Editor.nodes(editor, {
399
- match: (node) => ElementUtils.isListItem(node)
400
- })).length === 0)
401
- return;
402
- if (isHotkey("shift+tab", e)) {
403
- e.preventDefault();
404
- ListActions.dedent(editor);
405
- }
406
- if (isHotkey("tab", e)) {
407
- e.preventDefault();
408
- ListActions.indent(editor);
409
- }
410
- if (isHotkey("backspace", e)) {
411
- if (!editor.selection)
412
- return;
413
- if (Range.isExpanded(editor.selection))
414
- return;
415
- const listItem = EditorUtils.getFirstAncestorListItem(editor, editor.selection.anchor.path);
416
- if (editor.selection.anchor.offset === 0 && listItem) {
417
- e.preventDefault();
418
- const parentListItem = EditorUtils.getFirstAncestorListItem(editor, listItem[1]);
419
- const list = EditorUtils.getFirstAncestorList(editor, listItem[1]);
420
- if (parentListItem) {
421
- ListActions.dedent(editor);
422
- } else if (list) {
423
- ListActions.unwrapList(editor);
424
- }
425
- return;
426
- }
427
- }
428
- if (isHotkey("enter", e)) {
429
- e.preventDefault();
430
- if (!editor.selection)
431
- return;
432
- if (Range.isExpanded(editor.selection)) {
433
- Transforms.delete(editor);
434
- return;
435
- }
436
- const listItem = EditorUtils.getFirstAncestorListItem(editor, editor.selection.anchor.path);
437
- if (editor.selection.anchor.offset === 0 && listItem && Editor.string(editor, listItem[1]) === "") {
438
- const parentListItem = EditorUtils.getFirstAncestorListItem(editor, listItem[1]);
439
- if (parentListItem) {
440
- ListActions.dedent(editor);
441
- } else {
442
- ListActions.unwrapList(editor);
443
- }
444
- return;
445
- }
446
- Transforms.splitNodes(editor, {
447
- at: editor.selection,
448
- always: true,
449
- match: (node) => ElementUtils.isListItem(node)
450
- });
451
- }
452
- if (isHotkey("shift+enter", e)) {
453
- e.preventDefault();
454
- editor.insertText("\n");
455
- }
456
- }
457
- function withBlock(editor) {
458
- const {
459
- normalizeNode
460
- } = editor;
461
- editor.isInline = (entry) => {
462
- return ElementUtils.isInline(entry);
463
- };
464
- editor.normalizeNode = (entry) => {
465
- var _a;
466
- const [normalizationNode, normalizationPath] = entry;
467
- if (ElementUtils.isBlock(normalizationNode) && ((_a = normalizationNode == null ? void 0 : normalizationNode.textAlign) == null ? void 0 : _a.length) == 0) {
468
- Transforms.unsetNodes(editor, "textAlign", {
469
- at: normalizationPath
470
- });
471
- return;
472
- }
473
- if (ElementUtils.isListItem(normalizationNode)) {
474
- const pathToListItemText = [...normalizationPath, LIST_ITEM_CHILD_POSITION];
475
- if (Node.has(editor, pathToListItemText)) {
476
- const nodeInListItemTextPosition = Node.get(editor, pathToListItemText);
477
- if (ElementUtils.isRootBlock(nodeInListItemTextPosition)) {
478
- Transforms.setNodes(editor, {
479
- type: BlockType.ListItemChild
480
- }, {
481
- at: pathToListItemText
482
- });
483
- return;
484
- }
485
- } else {
486
- Transforms.insertNodes(editor, ElementUtils.createListItem(), {
487
- at: pathToListItemText
488
- });
489
- return;
490
- }
491
- }
492
- if (!Text.isText(normalizationNode)) {
493
- const mergeableChildren = Array.from(Node.children(editor, normalizationPath)).map((child, index, children) => {
494
- const potentialNodeToBeMerged = children.at(index + 1);
495
- if (!potentialNodeToBeMerged || !ElementUtils.isList(potentialNodeToBeMerged[0]) || !ElementUtils.isList(child[0]) || potentialNodeToBeMerged[0].type !== child[0].type) {
496
- return null;
497
- }
498
- return [Editor.pathRef(editor, child[1]), Editor.pathRef(editor, potentialNodeToBeMerged[1])];
499
- }).filter((mergeableNodes) => Boolean(mergeableNodes));
500
- if (mergeableChildren.length !== 0) {
501
- mergeableChildren.reverse().forEach(([nodePathRef, nodeToBeMergedPathRef]) => {
502
- const nodePath = nodePathRef.current;
503
- const nodeToBeMergedPath = nodeToBeMergedPathRef.current;
504
- if (nodePath == null || nodeToBeMergedPath == null)
505
- return;
506
- const nodeChildren = Array.from(Node.children(editor, nodePath));
507
- const childrenToBeMerged = Array.from(Node.children(editor, nodeToBeMergedPath));
508
- Editor.withoutNormalizing(editor, () => {
509
- childrenToBeMerged.reverse().forEach(([_, childPath]) => {
510
- Transforms.moveNodes(editor, {
511
- at: childPath,
512
- to: [...nodePath, nodeChildren.length]
513
- });
514
- });
515
- Transforms.removeNodes(editor, {
516
- at: nodeToBeMergedPath
517
- });
518
- });
519
- nodePathRef.unref();
520
- nodeToBeMergedPathRef.unref();
521
- });
522
- return;
523
- }
524
- }
525
- normalizeNode(entry);
526
- };
527
- return editor;
528
- }
529
- const definition = Select({
530
- label: "Block",
531
- labelOrientation: "horizontal",
532
- options: [{
533
- value: BlockType.Paragraph,
534
- label: "Paragraph"
535
- }, {
536
- value: BlockType.Heading1,
537
- label: "Heading 1"
538
- }, {
539
- value: BlockType.Heading2,
540
- label: "Heading 2"
541
- }, {
542
- value: BlockType.Heading3,
543
- label: "Heading 3"
544
- }, {
545
- value: BlockType.Heading4,
546
- label: "Heading 4"
547
- }, {
548
- value: BlockType.Heading5,
549
- label: "Heading 5"
550
- }, {
551
- value: BlockType.Heading6,
552
- label: "Heading 6"
553
- }, {
554
- value: BlockType.UnorderedList,
555
- label: "Bulleted list"
556
- }, {
557
- value: BlockType.OrderedList,
558
- label: "Numbered list"
559
- }, {
560
- value: BlockType.BlockQuote,
561
- label: "Quote"
562
- }],
563
- defaultValue: BlockType.Paragraph
564
- });
565
- function BlockPlugin() {
566
- return createRichTextV2Plugin({
567
- withPlugin: withBlock,
568
- onKeyDown,
569
- control: {
570
- definition,
571
- onChange: (editor, value) => {
572
- const activeBlockType = getActiveBlockType(editor);
573
- if (value === BlockType.UnorderedList || value === BlockType.OrderedList) {
574
- ListActions.toggleList(editor, {
575
- type: value,
576
- at: getSelection(editor)
577
- });
578
- } else if (activeBlockType === value) {
579
- Transforms.setNodes(editor, {
580
- type: BlockType.Default
581
- }, {
582
- at: getSelection(editor)
583
- });
584
- } else {
585
- ListActions.unwrapList(editor, {
586
- at: getSelection(editor)
587
- });
588
- Transforms.setNodes(editor, {
589
- type: value != null ? value : BlockType.Default
590
- }, {
591
- at: getSelection(editor)
592
- });
593
- }
594
- },
595
- getValue: (editor) => {
596
- const activeBlock = getActiveBlockType(editor);
597
- if (activeBlock === RootBlockType.Text || activeBlock === RootBlockType.Default)
598
- return void 0;
599
- return activeBlock;
600
- }
601
- },
602
- renderElement: (renderElement) => (props) => /* @__PURE__ */ jsx(BlockPluginComponent, __spreadProps(__spreadValues({}, props), {
603
- renderElement
604
- }))
605
- });
606
- }
607
- function BlockPluginComponent({
608
- element,
609
- attributes,
610
- children,
611
- renderElement
612
- }) {
613
- const blockStyles = [useStyle({
614
- margin: 0
615
- }), element.className];
616
- const quoteStyles = useStyle({
617
- padding: "0.5em 10px",
618
- fontSize: "1.25em",
619
- fontWeight: "300",
620
- borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
621
- });
622
- const listStyles = useStyle({
623
- listStylePosition: "inside",
624
- paddingInlineStart: "20px",
625
- listStyleType: "disc"
626
- });
627
- switch (element.type) {
628
- case BlockType.Text:
629
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, attributes), {
630
- className: cx(...blockStyles),
631
- children
632
- }));
633
- case BlockType.Default:
634
- case BlockType.Paragraph:
635
- return /* @__PURE__ */ jsx("p", __spreadProps(__spreadValues({}, attributes), {
636
- className: cx(...blockStyles),
637
- children
638
- }));
639
- case BlockType.Heading1:
640
- return /* @__PURE__ */ jsx("h1", __spreadProps(__spreadValues({}, attributes), {
641
- className: cx(...blockStyles),
642
- children
643
- }));
644
- case BlockType.Heading2:
645
- return /* @__PURE__ */ jsx("h2", __spreadProps(__spreadValues({}, attributes), {
646
- className: cx(...blockStyles),
647
- children
648
- }));
649
- case BlockType.Heading3:
650
- return /* @__PURE__ */ jsx("h3", __spreadProps(__spreadValues({}, attributes), {
651
- className: cx(...blockStyles),
652
- children
653
- }));
654
- case BlockType.Heading4:
655
- return /* @__PURE__ */ jsx("h4", __spreadProps(__spreadValues({}, attributes), {
656
- className: cx(...blockStyles),
657
- children
658
- }));
659
- case BlockType.Heading5:
660
- return /* @__PURE__ */ jsx("h5", __spreadProps(__spreadValues({}, attributes), {
661
- className: cx(...blockStyles),
662
- children
663
- }));
664
- case BlockType.Heading6:
665
- return /* @__PURE__ */ jsx("h6", __spreadProps(__spreadValues({}, attributes), {
666
- className: cx(...blockStyles),
667
- children
668
- }));
669
- case BlockType.BlockQuote:
670
- return /* @__PURE__ */ jsx("blockquote", __spreadProps(__spreadValues({}, attributes), {
671
- className: cx(...blockStyles, quoteStyles),
672
- children
673
- }));
674
- case BlockType.OrderedList:
675
- return /* @__PURE__ */ jsx("ol", __spreadProps(__spreadValues({}, attributes), {
676
- className: cx(...blockStyles, listStyles),
677
- children
678
- }));
679
- case BlockType.UnorderedList:
680
- return /* @__PURE__ */ jsx("ul", __spreadProps(__spreadValues({}, attributes), {
681
- className: cx(...blockStyles, listStyles),
682
- children
683
- }));
684
- case BlockType.ListItem:
685
- return /* @__PURE__ */ jsx("li", __spreadProps(__spreadValues({}, attributes), {
686
- className: cx(...blockStyles),
687
- children
688
- }));
689
- case BlockType.ListItemChild:
690
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, attributes), {
691
- className: cx(...blockStyles),
692
- children
693
- }));
694
- default:
695
- return /* @__PURE__ */ jsx(Fragment, {
696
- children: renderElement({
697
- element,
698
- attributes,
699
- children
700
- })
701
- });
702
- }
703
- }
704
- const supportedInlineOptions = [
705
- {
706
- icon: unstable_IconRadioGroupIcon.Superscript,
707
- label: "Superscript",
708
- value: "superscript"
709
- },
710
- {
711
- icon: unstable_IconRadioGroupIcon.Subscript,
712
- label: "Subscript",
713
- value: "subscript"
714
- },
715
- {
716
- icon: unstable_IconRadioGroupIcon.Code,
717
- label: "Code",
718
- value: "code"
719
- }
720
- ];
721
- function isSupportedInlineType(inline) {
722
- return supportedInlineOptions.findIndex((option) => option.value === inline) !== -1;
723
- }
724
- function isSupportedInlineEntry(entry) {
725
- const node = entry[0];
726
- return ElementUtils.isInline(node) && supportedInlineOptions.findIndex((option) => option.value === node.type) !== -1;
727
- }
728
- export { BlockActions as B, ElementUtils as E, ListActions as L, isSupportedInlineEntry as a, withBlock as b, BlockPlugin as c, filterForSubtreeRoots as f, getSelection as g, isSupportedInlineType as i, onKeyDown as o, supportedInlineOptions as s, unwrapInline as u, wrapInline as w };
729
- //# sourceMappingURL=types.es2.js.map