@makeswift/runtime 0.8.10 → 0.9.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 (552) hide show
  1. package/dist/Box.cjs.js +6 -4
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +6 -4
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +6 -4
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +6 -4
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +9 -7
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +9 -7
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +6 -4
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +6 -4
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +6 -4
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +6 -4
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +6 -4
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +6 -4
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +6 -4
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +6 -4
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +6 -4
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +6 -4
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +8 -6
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +7 -5
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +6 -4
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +6 -4
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +51 -34
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +23 -6
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +72 -67
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +18 -13
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +136 -91
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +82 -37
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +6 -4
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +6 -4
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +6 -4
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +6 -4
  60. package/dist/SocialLinks.es.js.map +1 -1
  61. package/dist/Text.cjs.js +7 -5
  62. package/dist/Text.cjs.js.map +1 -1
  63. package/dist/Text.es.js +7 -5
  64. package/dist/Text.es.js.map +1 -1
  65. package/dist/Video.cjs.js +6 -4
  66. package/dist/Video.cjs.js.map +1 -1
  67. package/dist/Video.es.js +6 -4
  68. package/dist/Video.es.js.map +1 -1
  69. package/dist/actions.cjs.js +16 -1
  70. package/dist/actions.cjs.js.map +1 -1
  71. package/dist/actions.es.js +14 -2
  72. package/dist/actions.es.js.map +1 -1
  73. package/dist/builder.cjs.js +7 -2
  74. package/dist/builder.cjs.js.map +1 -1
  75. package/dist/builder.es.js +7 -2
  76. package/dist/builder.es.js.map +1 -1
  77. package/dist/components.cjs.js +8 -6
  78. package/dist/components.cjs.js.map +1 -1
  79. package/dist/components.es.js +8 -6
  80. package/dist/components.es.js.map +1 -1
  81. package/dist/constants.cjs.js +0 -408
  82. package/dist/constants.cjs.js.map +1 -1
  83. package/dist/constants.es.js +1 -372
  84. package/dist/constants.es.js.map +1 -1
  85. package/dist/control-serialization.cjs.js +84 -41
  86. package/dist/control-serialization.cjs.js.map +1 -1
  87. package/dist/control-serialization.es.js +44 -1
  88. package/dist/control-serialization.es.js.map +1 -1
  89. package/dist/controls.cjs.js +58 -50
  90. package/dist/controls.cjs.js.map +1 -1
  91. package/dist/controls.es.js +8 -3
  92. package/dist/controls.es.js.map +1 -1
  93. package/dist/index.cjs.js +534 -495
  94. package/dist/index.cjs.js.map +1 -1
  95. package/dist/index.cjs10.js +372 -0
  96. package/dist/index.cjs10.js.map +1 -0
  97. package/dist/index.cjs2.js +10 -8
  98. package/dist/index.cjs2.js.map +1 -1
  99. package/dist/index.cjs5.js +2 -480
  100. package/dist/index.cjs5.js.map +1 -1
  101. package/dist/index.cjs6.js +6 -7
  102. package/dist/index.cjs6.js.map +1 -1
  103. package/dist/index.cjs7.js +17 -39
  104. package/dist/index.cjs7.js.map +1 -1
  105. package/dist/index.cjs8.js +14 -180
  106. package/dist/index.cjs8.js.map +1 -1
  107. package/dist/index.cjs9.js +191 -265
  108. package/dist/index.cjs9.js.map +1 -1
  109. package/dist/index.es.js +299 -260
  110. package/dist/index.es.js.map +1 -1
  111. package/dist/index.es10.js +365 -0
  112. package/dist/index.es10.js.map +1 -0
  113. package/dist/index.es2.js +5 -3
  114. package/dist/index.es2.js.map +1 -1
  115. package/dist/index.es5.js +3 -471
  116. package/dist/index.es5.js.map +1 -1
  117. package/dist/index.es6.js +4 -5
  118. package/dist/index.es6.js.map +1 -1
  119. package/dist/index.es7.js +17 -37
  120. package/dist/index.es7.js.map +1 -1
  121. package/dist/index.es8.js +13 -175
  122. package/dist/index.es8.js.map +1 -1
  123. package/dist/index.es9.js +188 -262
  124. package/dist/index.es9.js.map +1 -1
  125. package/dist/leaf.cjs.js +4 -4
  126. package/dist/leaf.cjs.js.map +1 -1
  127. package/dist/leaf.es.js +1 -1
  128. package/dist/leaf.es.js.map +1 -1
  129. package/dist/main.cjs.js +8 -4
  130. package/dist/main.cjs.js.map +1 -1
  131. package/dist/main.es.js +6 -5
  132. package/dist/main.es.js.map +1 -1
  133. package/dist/next.cjs.js +6 -4
  134. package/dist/next.cjs.js.map +1 -1
  135. package/dist/next.es.js +6 -4
  136. package/dist/next.es.js.map +1 -1
  137. package/dist/prop-controllers.cjs.js +11 -7
  138. package/dist/prop-controllers.cjs.js.map +1 -1
  139. package/dist/prop-controllers.es.js +7 -3
  140. package/dist/prop-controllers.es.js.map +1 -1
  141. package/dist/{descriptors.cjs.js → react-page.cjs.js} +1559 -102
  142. package/dist/react-page.cjs.js.map +1 -0
  143. package/dist/{descriptors.es.js → react-page.es.js} +1469 -80
  144. package/dist/react-page.es.js.map +1 -0
  145. package/dist/react.cjs.js +6 -4
  146. package/dist/react.cjs.js.map +1 -1
  147. package/dist/react.es.js +6 -4
  148. package/dist/react.es.js.map +1 -1
  149. package/dist/slate.cjs.js +17 -11
  150. package/dist/slate.cjs.js.map +1 -1
  151. package/dist/slate.es.js +7 -5
  152. package/dist/slate.es.js.map +1 -1
  153. package/dist/state/breakpoints.cjs.js.map +1 -1
  154. package/dist/state/breakpoints.es.js.map +1 -1
  155. package/dist/text-input.cjs.js +0 -6
  156. package/dist/text-input.cjs.js.map +1 -1
  157. package/dist/text-input.es.js +1 -5
  158. package/dist/text-input.es.js.map +1 -1
  159. package/dist/types/src/api/graphql/documents/queries.d.ts.map +1 -1
  160. package/dist/types/src/api/graphql/generated/types.d.ts +36 -44
  161. package/dist/types/src/api/graphql/generated/types.d.ts.map +1 -1
  162. package/dist/types/src/api/graphql/types.d.ts +2 -2
  163. package/dist/types/src/api/graphql/types.d.ts.map +1 -1
  164. package/dist/types/src/api/react.d.ts +3 -3
  165. package/dist/types/src/api/react.d.ts.map +1 -1
  166. package/dist/types/src/builder/serialization/control-serialization.d.ts +66 -66
  167. package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
  168. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +5 -0
  169. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -0
  170. package/dist/types/src/builder/serialization/controls/types.d.ts +3 -3
  171. package/dist/types/src/builder/serialization/controls/types.d.ts.map +1 -1
  172. package/dist/types/src/builder/serialization/function-serialization.d.ts +4 -4
  173. package/dist/types/src/builder/serialization/function-serialization.d.ts.map +1 -1
  174. package/dist/types/src/components/builtin/Box/animations.d.ts +1 -1
  175. package/dist/types/src/components/builtin/Box/animations.d.ts.map +1 -1
  176. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts +1 -1
  177. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
  178. package/dist/types/src/components/builtin/Box/constants.d.ts +1 -1
  179. package/dist/types/src/components/builtin/Box/constants.d.ts.map +1 -1
  180. package/dist/types/src/components/builtin/Button/Button.d.ts +3 -3
  181. package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
  182. package/dist/types/src/components/builtin/Button/contants.d.ts +1 -1
  183. package/dist/types/src/components/builtin/Button/contants.d.ts.map +1 -1
  184. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +1 -1
  185. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  186. package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
  187. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +1 -1
  188. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  189. package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
  190. package/dist/types/src/components/builtin/Divider/Divider.d.ts +2 -2
  191. package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
  192. package/dist/types/src/components/builtin/Divider/register.d.ts.map +1 -1
  193. package/dist/types/src/components/builtin/Embed/Embed.d.ts +1 -1
  194. package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
  195. package/dist/types/src/components/builtin/Embed/register.d.ts.map +1 -1
  196. package/dist/types/src/components/builtin/Form/Form.d.ts +2 -2
  197. package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
  198. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +2 -2
  199. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  200. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +1 -1
  201. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
  202. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +1 -1
  203. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
  204. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
  205. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  206. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +2 -2
  207. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  208. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +1 -1
  209. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
  210. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +1 -1
  211. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
  212. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +1 -1
  213. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
  214. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +1 -1
  215. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
  216. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +1 -1
  217. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  218. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +1 -1
  219. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
  220. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +1 -1
  221. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
  222. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +1 -1
  223. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  224. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +1 -1
  225. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -1
  226. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +1 -1
  227. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  228. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +1 -1
  229. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
  230. package/dist/types/src/components/builtin/Form/components/Field/index.d.ts +2 -2
  231. package/dist/types/src/components/builtin/Form/components/Field/index.d.ts.map +1 -1
  232. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +1 -1
  233. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  234. package/dist/types/src/components/builtin/Form/context/FormContext.d.ts +5 -5
  235. package/dist/types/src/components/builtin/Form/context/FormContext.d.ts.map +1 -1
  236. package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
  237. package/dist/types/src/components/builtin/Form/types.d.ts +13 -13
  238. package/dist/types/src/components/builtin/Form/types.d.ts.map +1 -1
  239. package/dist/types/src/components/builtin/Image/Image.d.ts +1 -1
  240. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  241. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +1 -1
  242. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  243. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +3 -3
  244. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  245. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts +1 -1
  246. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  247. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +3 -3
  248. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  249. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts +1 -1
  250. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  251. package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
  252. package/dist/types/src/components/builtin/Root/Root.d.ts +1 -1
  253. package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
  254. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +1 -1
  255. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  256. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts +1 -1
  257. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
  258. package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
  259. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts +1 -1
  260. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +1 -1
  261. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts +3 -3
  262. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +1 -1
  263. package/dist/types/src/components/builtin/Text/Text.d.ts +1 -1
  264. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  265. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts +2 -2
  266. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +1 -1
  267. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts +1 -1
  268. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +1 -1
  269. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +5 -5
  270. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
  271. package/dist/types/src/components/builtin/Video/Video.d.ts +1 -1
  272. package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
  273. package/dist/types/src/components/builtin/Video/register.d.ts.map +1 -1
  274. package/dist/types/src/components/hooks/useBackgrounds.d.ts +8 -8
  275. package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
  276. package/dist/types/src/components/hooks/useBorder.d.ts +3 -3
  277. package/dist/types/src/components/hooks/useBorder.d.ts.map +1 -1
  278. package/dist/types/src/components/hooks/useBoxShadow.d.ts +3 -3
  279. package/dist/types/src/components/hooks/useBoxShadow.d.ts.map +1 -1
  280. package/dist/types/src/components/page/BodySnippet.d.ts +1 -1
  281. package/dist/types/src/components/page/BodySnippet.d.ts.map +1 -1
  282. package/dist/types/src/components/page/Page.d.ts +1 -1
  283. package/dist/types/src/components/page/Page.d.ts.map +1 -1
  284. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts +1 -1
  285. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  286. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts +1 -1
  287. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
  288. package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts +1 -1
  289. package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
  290. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +1 -1
  291. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
  292. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts +1 -1
  293. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
  294. package/dist/types/src/components/shared/GutterContainer/index.d.ts +2 -2
  295. package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
  296. package/dist/types/src/components/shared/Link/index.d.ts +1 -1
  297. package/dist/types/src/components/shared/Link/index.d.ts.map +1 -1
  298. package/dist/types/src/components/shared/grid-item.d.ts +2 -2
  299. package/dist/types/src/components/shared/grid-item.d.ts.map +1 -1
  300. package/dist/types/src/components/utils/drop-first.d.ts +1 -1
  301. package/dist/types/src/components/utils/drop-first.d.ts.map +1 -1
  302. package/dist/types/src/components/utils/types.d.ts +2 -2
  303. package/dist/types/src/components/utils/types.d.ts.map +1 -1
  304. package/dist/types/src/controls/checkbox.d.ts +3 -3
  305. package/dist/types/src/controls/checkbox.d.ts.map +1 -1
  306. package/dist/types/src/controls/color.d.ts +3 -3
  307. package/dist/types/src/controls/color.d.ts.map +1 -1
  308. package/dist/types/src/controls/combobox.d.ts +5 -5
  309. package/dist/types/src/controls/combobox.d.ts.map +1 -1
  310. package/dist/types/src/controls/control.d.ts +6 -4
  311. package/dist/types/src/controls/control.d.ts.map +1 -1
  312. package/dist/types/src/controls/image.d.ts +4 -4
  313. package/dist/types/src/controls/image.d.ts.map +1 -1
  314. package/dist/types/src/controls/link.d.ts +8 -8
  315. package/dist/types/src/controls/link.d.ts.map +1 -1
  316. package/dist/types/src/controls/list.d.ts +6 -6
  317. package/dist/types/src/controls/list.d.ts.map +1 -1
  318. package/dist/types/src/controls/number.d.ts +3 -3
  319. package/dist/types/src/controls/number.d.ts.map +1 -1
  320. package/dist/types/src/controls/rich-text/dto-types.d.ts +4 -4
  321. package/dist/types/src/controls/rich-text/dto-types.d.ts.map +1 -1
  322. package/dist/types/src/controls/rich-text/rich-text.d.ts +11 -11
  323. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  324. package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
  325. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  326. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +39 -18
  327. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  328. package/dist/types/src/controls/select.d.ts +5 -5
  329. package/dist/types/src/controls/select.d.ts.map +1 -1
  330. package/dist/types/src/controls/shape.d.ts +5 -5
  331. package/dist/types/src/controls/shape.d.ts.map +1 -1
  332. package/dist/types/src/controls/slot.d.ts +17 -8
  333. package/dist/types/src/controls/slot.d.ts.map +1 -1
  334. package/dist/types/src/controls/style.d.ts +18 -18
  335. package/dist/types/src/controls/style.d.ts.map +1 -1
  336. package/dist/types/src/controls/text-area.d.ts +3 -3
  337. package/dist/types/src/controls/text-area.d.ts.map +1 -1
  338. package/dist/types/src/controls/text-input.d.ts +3 -3
  339. package/dist/types/src/controls/text-input.d.ts.map +1 -1
  340. package/dist/types/src/controls/types.d.ts +5 -5
  341. package/dist/types/src/controls/types.d.ts.map +1 -1
  342. package/dist/types/src/css/border-radius.d.ts +2 -2
  343. package/dist/types/src/css/border-radius.d.ts.map +1 -1
  344. package/dist/types/src/css/border.d.ts +2 -2
  345. package/dist/types/src/css/border.d.ts.map +1 -1
  346. package/dist/types/src/css/length-percentage.d.ts +2 -2
  347. package/dist/types/src/css/length-percentage.d.ts.map +1 -1
  348. package/dist/types/src/css/length.d.ts +1 -1
  349. package/dist/types/src/css/length.d.ts.map +1 -1
  350. package/dist/types/src/css/margin.d.ts +2 -2
  351. package/dist/types/src/css/margin.d.ts.map +1 -1
  352. package/dist/types/src/css/padding.d.ts +2 -2
  353. package/dist/types/src/css/padding.d.ts.map +1 -1
  354. package/dist/types/src/index.d.ts +2 -1
  355. package/dist/types/src/index.d.ts.map +1 -1
  356. package/dist/types/src/next/api-handler/handlers/element-tree.d.ts +3 -3
  357. package/dist/types/src/next/api-handler/handlers/element-tree.d.ts.map +1 -1
  358. package/dist/types/src/next/api-handler/handlers/fonts.d.ts +5 -5
  359. package/dist/types/src/next/api-handler/handlers/fonts.d.ts.map +1 -1
  360. package/dist/types/src/next/api-handler/handlers/manifest.d.ts +6 -4
  361. package/dist/types/src/next/api-handler/handlers/manifest.d.ts.map +1 -1
  362. package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts +2 -2
  363. package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts.map +1 -1
  364. package/dist/types/src/next/api-handler/handlers/revalidate.d.ts +3 -3
  365. package/dist/types/src/next/api-handler/handlers/revalidate.d.ts.map +1 -1
  366. package/dist/types/src/next/api-handler/index.d.ts +5 -4
  367. package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
  368. package/dist/types/src/next/client.d.ts +15 -15
  369. package/dist/types/src/next/client.d.ts.map +1 -1
  370. package/dist/types/src/next/dynamic.d.ts +4 -4
  371. package/dist/types/src/next/dynamic.d.ts.map +1 -1
  372. package/dist/types/src/next/index.d.ts +10 -7
  373. package/dist/types/src/next/index.d.ts.map +1 -1
  374. package/dist/types/src/next/preview-mode.d.ts +18 -4
  375. package/dist/types/src/next/preview-mode.d.ts.map +1 -1
  376. package/dist/types/src/prop-controllers/descriptors.d.ts +179 -179
  377. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  378. package/dist/types/src/prop-controllers/instances.d.ts +17 -17
  379. package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
  380. package/dist/types/src/runtimes/react/components/LiveProvider.d.ts +1 -1
  381. package/dist/types/src/runtimes/react/components/LiveProvider.d.ts.map +1 -1
  382. package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts +1 -1
  383. package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts.map +1 -1
  384. package/dist/types/src/runtimes/react/components/render-hook.d.ts +1 -1
  385. package/dist/types/src/runtimes/react/components/render-hook.d.ts.map +1 -1
  386. package/dist/types/src/runtimes/react/controls/checkbox.d.ts +1 -1
  387. package/dist/types/src/runtimes/react/controls/checkbox.d.ts.map +1 -1
  388. package/dist/types/src/runtimes/react/controls/color.d.ts +1 -1
  389. package/dist/types/src/runtimes/react/controls/color.d.ts.map +1 -1
  390. package/dist/types/src/runtimes/react/controls/combobox.d.ts +1 -1
  391. package/dist/types/src/runtimes/react/controls/combobox.d.ts.map +1 -1
  392. package/dist/types/src/runtimes/react/controls/control.d.ts +2 -2
  393. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  394. package/dist/types/src/runtimes/react/controls/image.d.ts +3 -3
  395. package/dist/types/src/runtimes/react/controls/image.d.ts.map +1 -1
  396. package/dist/types/src/runtimes/react/controls/link.d.ts +2 -2
  397. package/dist/types/src/runtimes/react/controls/link.d.ts.map +1 -1
  398. package/dist/types/src/runtimes/react/controls/list.d.ts +3 -3
  399. package/dist/types/src/runtimes/react/controls/list.d.ts.map +1 -1
  400. package/dist/types/src/runtimes/react/controls/number.d.ts +1 -1
  401. package/dist/types/src/runtimes/react/controls/number.d.ts.map +1 -1
  402. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +3 -3
  403. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  404. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +7 -4
  405. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  406. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +2 -2
  407. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  408. package/dist/types/src/runtimes/react/controls/rich-text.d.ts +2 -2
  409. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +1 -1
  410. package/dist/types/src/runtimes/react/controls/select.d.ts +1 -1
  411. package/dist/types/src/runtimes/react/controls/select.d.ts.map +1 -1
  412. package/dist/types/src/runtimes/react/controls/shape.d.ts +2 -2
  413. package/dist/types/src/runtimes/react/controls/shape.d.ts.map +1 -1
  414. package/dist/types/src/runtimes/react/controls/slot.d.ts +4 -4
  415. package/dist/types/src/runtimes/react/controls/slot.d.ts.map +1 -1
  416. package/dist/types/src/runtimes/react/controls/style.d.ts +1 -1
  417. package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
  418. package/dist/types/src/runtimes/react/controls/text-area.d.ts +1 -1
  419. package/dist/types/src/runtimes/react/controls/text-area.d.ts.map +1 -1
  420. package/dist/types/src/runtimes/react/controls/text-input.d.ts +1 -1
  421. package/dist/types/src/runtimes/react/controls/text-input.d.ts.map +1 -1
  422. package/dist/types/src/runtimes/react/controls.d.ts +8 -8
  423. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  424. package/dist/types/src/runtimes/react/element-imperative-handle.d.ts +1 -1
  425. package/dist/types/src/runtimes/react/element-imperative-handle.d.ts.map +1 -1
  426. package/dist/types/src/runtimes/react/find-dom-node.d.ts +1 -1
  427. package/dist/types/src/runtimes/react/find-dom-node.d.ts.map +1 -1
  428. package/dist/types/src/runtimes/react/index.d.ts +10 -8
  429. package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
  430. package/dist/types/src/slate/BlockPlugin/constants.d.ts.map +1 -0
  431. package/dist/types/src/slate/BlockPlugin/dedent.d.ts.map +1 -0
  432. package/dist/types/src/slate/BlockPlugin/indent.d.ts.map +1 -0
  433. package/dist/types/src/slate/BlockPlugin/index.d.ts +56 -2
  434. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  435. package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts +1 -1
  436. package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts.map +1 -1
  437. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/toggleList.d.ts +2 -2
  438. package/dist/types/src/slate/BlockPlugin/toggleList.d.ts.map +1 -0
  439. package/dist/types/src/slate/BlockPlugin/types.d.ts +3 -3
  440. package/dist/types/src/slate/BlockPlugin/types.d.ts.map +1 -1
  441. package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts +1 -1
  442. package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts.map +1 -1
  443. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/unwrapList.d.ts +1 -1
  444. package/dist/types/src/slate/BlockPlugin/unwrapList.d.ts.map +1 -0
  445. package/dist/types/src/slate/BlockPlugin/utils/filterForSubtreeRoots.d.ts.map +1 -0
  446. package/dist/types/src/slate/BlockPlugin/utils/getSelectedListItems.d.ts.map +1 -0
  447. package/dist/types/src/slate/BlockPlugin/utils/location.d.ts.map +1 -0
  448. package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts +1 -1
  449. package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts.map +1 -1
  450. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/wrapList.d.ts +2 -2
  451. package/dist/types/src/slate/BlockPlugin/wrapList.d.ts.map +1 -0
  452. package/dist/types/src/slate/BuilderPlugin/index.d.ts +1 -1
  453. package/dist/types/src/slate/BuilderPlugin/index.d.ts.map +1 -1
  454. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -2
  455. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  456. package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts +1 -1
  457. package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts.map +1 -1
  458. package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts +1 -1
  459. package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts.map +1 -1
  460. package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts +2 -2
  461. package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts.map +1 -1
  462. package/dist/types/src/slate/TypographyPlugin/index.d.ts +2 -2
  463. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  464. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts +1 -1
  465. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts.map +1 -1
  466. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts +1 -1
  467. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts.map +1 -1
  468. package/dist/types/src/slate/index.d.ts +1 -1
  469. package/dist/types/src/slate/index.d.ts.map +1 -1
  470. package/dist/types/src/slate/selectors.d.ts +1 -1
  471. package/dist/types/src/slate/selectors.d.ts.map +1 -1
  472. package/dist/types/{types/slate.d.ts → src/slate/types.d.ts} +42 -35
  473. package/dist/types/src/slate/types.d.ts.map +1 -0
  474. package/dist/types/src/slate/utils/editor.d.ts +1 -1
  475. package/dist/types/src/slate/utils/editor.d.ts.map +1 -1
  476. package/dist/types/src/slate/utils/element.d.ts +1 -2
  477. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  478. package/dist/types/src/state/actions.d.ts +66 -41
  479. package/dist/types/src/state/actions.d.ts.map +1 -1
  480. package/dist/types/src/state/makeswift-api-client.d.ts +5 -5
  481. package/dist/types/src/state/makeswift-api-client.d.ts.map +1 -1
  482. package/dist/types/src/state/modules/api-resources.d.ts +2 -2
  483. package/dist/types/src/state/modules/api-resources.d.ts.map +1 -1
  484. package/dist/types/src/state/modules/box-models.d.ts +2 -2
  485. package/dist/types/src/state/modules/box-models.d.ts.map +1 -1
  486. package/dist/types/src/state/modules/breakpoints.d.ts +9 -9
  487. package/dist/types/src/state/modules/breakpoints.d.ts.map +1 -1
  488. package/dist/types/src/state/modules/builder-edit-mode.d.ts +2 -2
  489. package/dist/types/src/state/modules/builder-edit-mode.d.ts.map +1 -1
  490. package/dist/types/src/state/modules/components-meta.d.ts +27 -3
  491. package/dist/types/src/state/modules/components-meta.d.ts.map +1 -1
  492. package/dist/types/src/state/modules/element-imperative-handles.d.ts +1 -1
  493. package/dist/types/src/state/modules/element-imperative-handles.d.ts.map +1 -1
  494. package/dist/types/src/state/modules/is-in-builder.d.ts +1 -1
  495. package/dist/types/src/state/modules/is-in-builder.d.ts.map +1 -1
  496. package/dist/types/src/state/modules/is-preview.d.ts +1 -1
  497. package/dist/types/src/state/modules/is-preview.d.ts.map +1 -1
  498. package/dist/types/src/state/modules/locales.d.ts +16 -0
  499. package/dist/types/src/state/modules/locales.d.ts.map +1 -0
  500. package/dist/types/src/state/modules/pointer.d.ts +2 -2
  501. package/dist/types/src/state/modules/pointer.d.ts.map +1 -1
  502. package/dist/types/src/state/modules/prop-controller-handles.d.ts +1 -1
  503. package/dist/types/src/state/modules/prop-controller-handles.d.ts.map +1 -1
  504. package/dist/types/src/state/modules/prop-controllers.d.ts +1 -1
  505. package/dist/types/src/state/modules/prop-controllers.d.ts.map +1 -1
  506. package/dist/types/src/state/modules/react-components.d.ts +2 -2
  507. package/dist/types/src/state/modules/react-components.d.ts.map +1 -1
  508. package/dist/types/src/state/modules/read-only-documents.d.ts +7 -7
  509. package/dist/types/src/state/modules/read-only-documents.d.ts.map +1 -1
  510. package/dist/types/src/state/modules/read-write-documents.d.ts +1 -1
  511. package/dist/types/src/state/modules/read-write-documents.d.ts.map +1 -1
  512. package/dist/types/src/state/react-builder-preview.d.ts +7 -6
  513. package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
  514. package/dist/types/src/state/react-page.d.ts +15 -7
  515. package/dist/types/src/state/react-page.d.ts.map +1 -1
  516. package/dist/types/src/state/react-page.test.d.ts +3 -0
  517. package/dist/types/src/state/react-page.test.d.ts.map +1 -0
  518. package/dist/types/src/utils/isErrorWithMessage.d.ts +1 -1
  519. package/dist/types/src/utils/isErrorWithMessage.d.ts.map +1 -1
  520. package/package.json +8 -4
  521. package/dist/descriptors.cjs.js.map +0 -1
  522. package/dist/descriptors.es.js.map +0 -1
  523. package/dist/element.cjs.js +0 -55
  524. package/dist/element.cjs.js.map +0 -1
  525. package/dist/element.es.js +0 -54
  526. package/dist/element.es.js.map +0 -1
  527. package/dist/introspection.cjs.js +0 -329
  528. package/dist/introspection.cjs.js.map +0 -1
  529. package/dist/introspection.es.js +0 -315
  530. package/dist/introspection.es.js.map +0 -1
  531. package/dist/slate.cjs2.js +0 -46
  532. package/dist/slate.cjs2.js.map +0 -1
  533. package/dist/slate.es2.js +0 -44
  534. package/dist/slate.es2.js.map +0 -1
  535. package/dist/types/src/slate/ListPlugin/constants.d.ts.map +0 -1
  536. package/dist/types/src/slate/ListPlugin/dedent.d.ts.map +0 -1
  537. package/dist/types/src/slate/ListPlugin/indent.d.ts.map +0 -1
  538. package/dist/types/src/slate/ListPlugin/index.d.ts +0 -17
  539. package/dist/types/src/slate/ListPlugin/index.d.ts.map +0 -1
  540. package/dist/types/src/slate/ListPlugin/toggleList.d.ts.map +0 -1
  541. package/dist/types/src/slate/ListPlugin/unwrapList.d.ts.map +0 -1
  542. package/dist/types/src/slate/ListPlugin/utils/filterForSubtreeRoots.d.ts.map +0 -1
  543. package/dist/types/src/slate/ListPlugin/utils/getSelectedListItems.d.ts.map +0 -1
  544. package/dist/types/src/slate/ListPlugin/utils/location.d.ts.map +0 -1
  545. package/dist/types/src/slate/ListPlugin/wrapList.d.ts.map +0 -1
  546. package/dist/types/types/slate.d.ts.map +0 -1
  547. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/constants.d.ts +0 -0
  548. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/dedent.d.ts +0 -0
  549. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/indent.d.ts +0 -0
  550. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/filterForSubtreeRoots.d.ts +0 -0
  551. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/getSelectedListItems.d.ts +0 -0
  552. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/location.d.ts +0 -0
@@ -4,23 +4,23 @@ var css = require("@emotion/css");
4
4
  var React = require("react");
5
5
  var next = require("./index.cjs.js");
6
6
  var index = require("./index.cjs3.js");
7
- var slate = require("./slate.cjs2.js");
7
+ require("slate");
8
+ require("./state/breakpoints.cjs.js");
9
+ var reactPage = require("./react-page.cjs.js");
10
+ require("is-hotkey");
11
+ require("slate-react");
8
12
  var jsxRuntime = require("react/jsx-runtime");
9
13
  var leaf = require("./leaf.cjs.js");
10
- var descriptors = require("./descriptors.cjs.js");
11
14
  require("use-sync-external-store/shim/with-selector");
12
15
  require("next/dynamic");
13
- require("./constants.cjs.js");
14
- require("redux");
15
- require("redux-thunk");
16
16
  require("./actions.cjs.js");
17
- require("./state/breakpoints.cjs.js");
18
- require("./introspection.cjs.js");
19
17
  require("@emotion/serialize");
20
18
  require("@emotion/utils");
21
19
  require("./text-input.cjs.js");
22
20
  require("./combobox.cjs.js");
23
21
  require("use-sync-external-store/shim");
22
+ require("redux");
23
+ require("redux-thunk");
24
24
  require("./types.cjs.js");
25
25
  require("./box-models.cjs.js");
26
26
  require("css-box-model");
@@ -29,6 +29,7 @@ require("scroll-into-view-if-needed");
29
29
  require("react-dom");
30
30
  require("html-react-parser");
31
31
  require("next/head");
32
+ require("zod");
32
33
  require("@emotion/server/create-instance");
33
34
  require("next/document");
34
35
  require("cors");
@@ -36,6 +37,7 @@ require("path-to-regexp");
36
37
  require("cookie");
37
38
  require("http-proxy");
38
39
  require("set-cookie-parser");
40
+ require("./constants.cjs.js");
39
41
  require("uuid");
40
42
  require("corporate-ipsum");
41
43
  require("next/link");
@@ -45,7 +47,7 @@ const ReadOnlyText = React.forwardRef(function ReadOnlyText2({
45
47
  width,
46
48
  margin
47
49
  }, ref) {
48
- const descendants = text == null ? [] : descriptors.richTextDTOtoDAO(text);
50
+ const descendants = text == null ? [] : reactPage.richTextDTOtoDAO(text);
49
51
  const descendantsAsString = getText(descendants);
50
52
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
51
53
  ref,
@@ -88,25 +90,25 @@ function InlineElement({
88
90
  textDecoration: "none"
89
91
  });
90
92
  switch (descendant.type) {
91
- case slate.InlineType.Code:
93
+ case reactPage.InlineType.Code:
92
94
  return /* @__PURE__ */ jsxRuntime.jsx("code", {
93
95
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
94
96
  descendants: descendant.children
95
97
  })
96
98
  });
97
- case slate.InlineType.SuperScript:
99
+ case reactPage.InlineType.SuperScript:
98
100
  return /* @__PURE__ */ jsxRuntime.jsx("sup", {
99
101
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
100
102
  descendants: descendant.children
101
103
  })
102
104
  });
103
- case slate.InlineType.SubScript:
105
+ case reactPage.InlineType.SubScript:
104
106
  return /* @__PURE__ */ jsxRuntime.jsx("sub", {
105
107
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
106
108
  descendants: descendant.children
107
109
  })
108
110
  });
109
- case slate.InlineType.Link:
111
+ case reactPage.InlineType.Link:
110
112
  return /* @__PURE__ */ jsxRuntime.jsx(index.Link, {
111
113
  className: linkClassName,
112
114
  link: descendant.link,
@@ -124,76 +126,77 @@ function BlockElement({
124
126
  }), next.useStyle(next.useResponsiveStyle([descendant.textAlign], ([textAlign = "left"]) => ({
125
127
  textAlign
126
128
  })))];
129
+ const quoteStyle = next.useStyle({
130
+ padding: "0.5em 10px",
131
+ fontSize: "1.25em",
132
+ fontWeight: "300",
133
+ borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
134
+ });
127
135
  switch (descendant.type) {
128
- case slate.BlockType.Text:
136
+ case reactPage.BlockType.Text:
129
137
  return /* @__PURE__ */ jsxRuntime.jsx("span", {
130
138
  className: css.cx(...blockStyles),
131
139
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
132
140
  descendants: descendant.children
133
141
  })
134
142
  });
135
- case slate.BlockType.Paragraph:
143
+ case reactPage.BlockType.Paragraph:
136
144
  return /* @__PURE__ */ jsxRuntime.jsx("p", {
137
145
  className: css.cx(...blockStyles),
138
146
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
139
147
  descendants: descendant.children
140
148
  })
141
149
  });
142
- case slate.BlockType.Heading1:
150
+ case reactPage.BlockType.Heading1:
143
151
  return /* @__PURE__ */ jsxRuntime.jsx("h1", {
144
152
  className: css.cx(...blockStyles),
145
153
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
146
154
  descendants: descendant.children
147
155
  })
148
156
  });
149
- case slate.BlockType.Heading2:
157
+ case reactPage.BlockType.Heading2:
150
158
  return /* @__PURE__ */ jsxRuntime.jsx("h2", {
151
159
  className: css.cx(...blockStyles),
152
160
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
153
161
  descendants: descendant.children
154
162
  })
155
163
  });
156
- case slate.BlockType.Heading3:
164
+ case reactPage.BlockType.Heading3:
157
165
  return /* @__PURE__ */ jsxRuntime.jsx("h3", {
158
166
  className: css.cx(...blockStyles),
159
167
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
160
168
  descendants: descendant.children
161
169
  })
162
170
  });
163
- case slate.BlockType.Heading4:
171
+ case reactPage.BlockType.Heading4:
164
172
  return /* @__PURE__ */ jsxRuntime.jsx("h4", {
165
173
  className: css.cx(...blockStyles),
166
174
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
167
175
  descendants: descendant.children
168
176
  })
169
177
  });
170
- case slate.BlockType.Heading5:
178
+ case reactPage.BlockType.Heading5:
171
179
  return /* @__PURE__ */ jsxRuntime.jsx("h5", {
172
180
  className: css.cx(...blockStyles),
173
181
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
174
182
  descendants: descendant.children
175
183
  })
176
184
  });
177
- case slate.BlockType.Heading6:
185
+ case reactPage.BlockType.Heading6:
178
186
  return /* @__PURE__ */ jsxRuntime.jsx("h6", {
179
187
  className: css.cx(...blockStyles),
180
188
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
181
189
  descendants: descendant.children
182
190
  })
183
191
  });
184
- case slate.BlockType.BlockQuote:
192
+ case reactPage.BlockType.BlockQuote:
185
193
  return /* @__PURE__ */ jsxRuntime.jsx("blockquote", {
186
- className: css.cx(...blockStyles, next.useStyle({
187
- padding: "0.5em 10px",
188
- fontSize: "1.25em",
189
- fontWeight: "300",
190
- borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
191
- })),
194
+ className: css.cx(...blockStyles, quoteStyle),
192
195
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
193
196
  descendants: descendant.children
194
197
  })
195
198
  });
196
- case slate.BlockType.OrderedList:
199
+ case reactPage.BlockType.OrderedList:
197
200
  return /* @__PURE__ */ jsxRuntime.jsx("ol", {
198
201
  className: css.cx(...blockStyles),
199
202
  style: {
@@ -203,7 +206,7 @@ function BlockElement({
203
206
  descendants: descendant.children
204
207
  })
205
208
  });
206
- case slate.BlockType.UnorderedList:
209
+ case reactPage.BlockType.UnorderedList:
207
210
  return /* @__PURE__ */ jsxRuntime.jsx("ul", {
208
211
  className: css.cx(...blockStyles),
209
212
  style: {
@@ -213,20 +216,22 @@ function BlockElement({
213
216
  descendants: descendant.children
214
217
  })
215
218
  });
216
- case slate.BlockType.ListItem:
219
+ case reactPage.BlockType.ListItem:
217
220
  return /* @__PURE__ */ jsxRuntime.jsx("li", {
218
221
  className: css.cx(...blockStyles),
219
222
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
220
223
  descendants: descendant.children
221
224
  })
222
225
  });
223
- case slate.BlockType.ListItemChild:
226
+ case reactPage.BlockType.ListItemChild:
224
227
  return /* @__PURE__ */ jsxRuntime.jsx("span", {
225
228
  className: css.cx(...blockStyles),
226
229
  children: /* @__PURE__ */ jsxRuntime.jsx(Descendants, {
227
230
  descendants: descendant.children
228
231
  })
229
232
  });
233
+ default:
234
+ return null;
230
235
  }
231
236
  }
232
237
  function isText(node) {
@@ -245,23 +250,23 @@ function Descendants({
245
250
  }, index2);
246
251
  }
247
252
  switch (descendant.type) {
248
- case slate.InlineType.Link:
249
- case slate.InlineType.Code:
250
- case slate.InlineType.SubScript:
251
- case slate.InlineType.SuperScript:
253
+ case reactPage.InlineType.Link:
254
+ case reactPage.InlineType.Code:
255
+ case reactPage.InlineType.SubScript:
256
+ case reactPage.InlineType.SuperScript:
252
257
  return /* @__PURE__ */ jsxRuntime.jsx(InlineElement, {
253
258
  descendant
254
259
  }, index2);
255
- case slate.BlockType.Heading1:
256
- case slate.BlockType.Heading2:
257
- case slate.BlockType.Heading3:
258
- case slate.BlockType.BlockQuote:
259
- case slate.BlockType.Text:
260
- case slate.BlockType.Paragraph:
261
- case slate.BlockType.OrderedList:
262
- case slate.BlockType.UnorderedList:
263
- case slate.BlockType.ListItem:
264
- case slate.BlockType.ListItemChild:
260
+ case reactPage.BlockType.Heading1:
261
+ case reactPage.BlockType.Heading2:
262
+ case reactPage.BlockType.Heading3:
263
+ case reactPage.BlockType.BlockQuote:
264
+ case reactPage.BlockType.Text:
265
+ case reactPage.BlockType.Paragraph:
266
+ case reactPage.BlockType.OrderedList:
267
+ case reactPage.BlockType.UnorderedList:
268
+ case reactPage.BlockType.ListItem:
269
+ case reactPage.BlockType.ListItemChild:
265
270
  return /* @__PURE__ */ jsxRuntime.jsx(BlockElement, {
266
271
  descendant
267
272
  }, index2);
@@ -275,15 +280,15 @@ function isBlock(descendant) {
275
280
  if ("text" in descendant)
276
281
  return false;
277
282
  switch (descendant.type) {
278
- case slate.BlockType.Heading1:
279
- case slate.BlockType.Heading2:
280
- case slate.BlockType.Heading3:
281
- case slate.BlockType.BlockQuote:
282
- case slate.BlockType.Paragraph:
283
- case slate.BlockType.OrderedList:
284
- case slate.BlockType.UnorderedList:
285
- case slate.BlockType.ListItem:
286
- case slate.BlockType.ListItemChild:
283
+ case reactPage.BlockType.Heading1:
284
+ case reactPage.BlockType.Heading2:
285
+ case reactPage.BlockType.Heading3:
286
+ case reactPage.BlockType.BlockQuote:
287
+ case reactPage.BlockType.Paragraph:
288
+ case reactPage.BlockType.OrderedList:
289
+ case reactPage.BlockType.UnorderedList:
290
+ case reactPage.BlockType.ListItem:
291
+ case reactPage.BlockType.ListItemChild:
287
292
  return true;
288
293
  default:
289
294
  return false;
@@ -295,20 +300,20 @@ function getTextByDescendant(descendant) {
295
300
  return (_a = descendant.text) != null ? _a : "";
296
301
  }
297
302
  switch (descendant.type) {
298
- case slate.InlineType.Link:
299
- case slate.InlineType.Code:
300
- case slate.InlineType.SubScript:
301
- case slate.InlineType.SuperScript:
303
+ case reactPage.InlineType.Link:
304
+ case reactPage.InlineType.Code:
305
+ case reactPage.InlineType.SubScript:
306
+ case reactPage.InlineType.SuperScript:
302
307
  return (_b = descendant.children.map((descendant2) => getTextByDescendant(descendant2)).join("")) != null ? _b : "";
303
- case slate.BlockType.Heading1:
304
- case slate.BlockType.Heading2:
305
- case slate.BlockType.Heading3:
306
- case slate.BlockType.BlockQuote:
307
- case slate.BlockType.Paragraph:
308
- case slate.BlockType.OrderedList:
309
- case slate.BlockType.UnorderedList:
310
- case slate.BlockType.ListItem:
311
- case slate.BlockType.ListItemChild:
308
+ case reactPage.BlockType.Heading1:
309
+ case reactPage.BlockType.Heading2:
310
+ case reactPage.BlockType.Heading3:
311
+ case reactPage.BlockType.BlockQuote:
312
+ case reactPage.BlockType.Paragraph:
313
+ case reactPage.BlockType.OrderedList:
314
+ case reactPage.BlockType.UnorderedList:
315
+ case reactPage.BlockType.ListItem:
316
+ case reactPage.BlockType.ListItemChild:
312
317
  return (_c = descendant.children.map((descendant2) => getTextByDescendant(descendant2)).join(descendant.children.every(isBlock) ? "\n" : "")) != null ? _c : "";
313
318
  default:
314
319
  return "";
@@ -1 +1 @@
1
- {"version":3,"file":"ReadOnlyText.cjs.js","sources":["../src/components/builtin/Text/ReadOnlyText.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { Descendant, Text } from 'slate'\n\nimport type { ElementIDValue, RichTextValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { Link } from '../../shared/Link'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\nimport { useTypographyClassName } from './components'\nimport useEnhancedTypography from './components/Leaf/leaf'\nimport { Inline, InlineType, Block, BlockType } from '../../../../types/slate'\nimport { richTextDTOtoDAO } from '../../../controls'\n\ntype Props = {\n id?: ElementIDValue\n text?: RichTextValue\n width?: string\n margin?: string\n}\n\nconst ReadOnlyText = forwardRef(function ReadOnlyText(\n { id, text, width, margin }: Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const descendants = text == null ? [] : richTextDTOtoDAO(text)\n const descendantsAsString = getText(descendants)\n\n return (\n <div ref={ref} id={id} className={cx(width, margin)}>\n {descendantsAsString === '' ? <Placeholder /> : <Descendants descendants={descendants} />}\n </div>\n )\n})\n\nexport default ReadOnlyText\n\nfunction Placeholder({ text = 'Write some text...' }: { text?: string }) {\n return (\n <span\n className={useStyle({\n display: 'inline-block',\n width: 0,\n maxWidth: '100%',\n whiteSpace: 'nowrap',\n opacity: 0.333,\n verticalAlign: 'text-top',\n })}\n >\n {text}\n </span>\n )\n}\n\nexport interface TextProps {\n descendant: Text\n}\n\nexport function TextElement({ descendant }: TextProps) {\n const enhancedTypography = useEnhancedTypography(descendant.typography)\n const typographyClassName = useTypographyClassName(enhancedTypography)\n\n return (\n <span className={typographyClassName}>\n {descendant.text === '' ? '\\uFEFF' : descendant.text}\n </span>\n )\n}\n\nexport interface InlineProps {\n descendant: Inline\n}\n\nfunction InlineElement({ descendant }: InlineProps) {\n const linkClassName = useStyle({ textDecoration: 'none' })\n\n switch (descendant.type) {\n case InlineType.Code:\n return (\n <code>\n <Descendants descendants={descendant.children} />\n </code>\n )\n\n case InlineType.SuperScript:\n return (\n <sup>\n <Descendants descendants={descendant.children} />\n </sup>\n )\n\n case InlineType.SubScript:\n return (\n <sub>\n <Descendants descendants={descendant.children} />\n </sub>\n )\n\n case InlineType.Link:\n return (\n <Link className={linkClassName} link={descendant.link}>\n <Descendants descendants={descendant.children} />\n </Link>\n )\n }\n}\n\nexport interface BlockProps {\n descendant: Block\n}\n\nexport function BlockElement({ descendant }: BlockProps) {\n const blockStyles = [\n useStyle({ margin: 0 }),\n useStyle(useResponsiveStyle([descendant.textAlign], ([textAlign = 'left']) => ({ textAlign }))),\n ]\n\n switch (descendant.type) {\n case BlockType.Text:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n case BlockType.Paragraph:\n return (\n <p className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </p>\n )\n case BlockType.Heading1:\n return (\n <h1 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h1>\n )\n case BlockType.Heading2:\n return (\n <h2 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h2>\n )\n case BlockType.Heading3:\n return (\n <h3 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h3>\n )\n case BlockType.Heading4:\n return (\n <h4 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h4>\n )\n case BlockType.Heading5:\n return (\n <h5 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h5>\n )\n case BlockType.Heading6:\n return (\n <h6 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h6>\n )\n case BlockType.BlockQuote:\n return (\n <blockquote\n className={cx(\n ...blockStyles,\n useStyle({\n padding: '0.5em 10px',\n fontSize: '1.25em',\n fontWeight: '300',\n borderLeft: '5px solid rgba(0, 0, 0, 0.1)',\n }),\n )}\n >\n <Descendants descendants={descendant.children} />\n </blockquote>\n )\n case BlockType.OrderedList:\n return (\n <ol className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ol>\n )\n case BlockType.UnorderedList:\n return (\n <ul className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ul>\n )\n case BlockType.ListItem:\n return (\n <li className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </li>\n )\n case BlockType.ListItemChild:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n }\n}\n\n// reimplemented from slate source for code splitting\nfunction isText(node: any): node is Text {\n if (typeof node === 'object' && 'text' in node) return true\n\n return false\n}\n\nfunction Descendants({ descendants }: { descendants: Descendant[] }) {\n return (\n <>\n {descendants.map((descendant, index) => {\n if (isText(descendant)) {\n return <TextElement key={index} descendant={descendant} />\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return <InlineElement key={index} descendant={descendant} />\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Text:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return <BlockElement key={index} descendant={descendant} />\n default:\n return null\n }\n })}\n </>\n )\n}\n\nfunction isBlock(descendant: Descendant): descendant is Block {\n if ('text' in descendant) return false\n\n switch (descendant.type) {\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return true\n\n default:\n return false\n }\n}\n\nfunction getTextByDescendant(descendant: Descendant): string {\n if ('text' in descendant) {\n return descendant.text ?? ''\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return descendant.children.map(descendant => getTextByDescendant(descendant)).join('') ?? ''\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return (\n descendant.children\n .map(descendant => getTextByDescendant(descendant))\n .join(descendant.children.every(isBlock) ? '\\n' : '') ?? ''\n )\n default:\n return ''\n }\n}\n\nfunction getText(descendant: Descendant[]): string {\n return descendant.map(getTextByDescendant).join('\\n')\n}\n"],"names":["ReadOnlyText","forwardRef","id","text","width","margin","ref","descendants","richTextDTOtoDAO","descendantsAsString","getText","cx","_jsx","useStyle","display","maxWidth","whiteSpace","opacity","verticalAlign","descendant","enhancedTypography","useEnhancedTypography","typography","typographyClassName","useTypographyClassName","linkClassName","textDecoration","type","InlineType","Code","children","SuperScript","SubScript","Link","link","blockStyles","useResponsiveStyle","textAlign","BlockType","Text","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","BlockQuote","padding","fontSize","fontWeight","borderLeft","OrderedList","listStylePosition","UnorderedList","ListItem","ListItemChild","node","_Fragment","map","index","isText","getTextByDescendant","join","every","isBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBMA,MAAAA,eAAeC,MAAAA,WAAW,uBAC9B;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAMC;AAAAA,EAAOC;AAAAA,GACnBC,KACA;AACMC,QAAAA,cAAcJ,QAAQ,OAAO,CAAA,IAAKK,YAAAA,iBAAiBL,IAAD;AAClDM,QAAAA,sBAAsBC,QAAQH,WAAD;AAGjC,wCAAA,OAAA;AAAA,IAAK;AAAA,IAAU;AAAA,IAAQ,WAAWI,IAAAA,GAAGP,OAAOC,MAAR;AAAA,IACjCI,UAAAA,wBAAwB,KAAKG,2BAAA,IAAC,aAAD,EAAA,IAAkBA,2BAAA,IAAC,aAAD;AAAA,MAAa;AAAA,IAAA,CAAb;AAAA,EAAA,CAFpD;AAKD,CAZ8B;AAgB/B,qBAAqB;AAAA,EAAET,OAAO;AAAA,GAA2C;AAErE,wCAAA,QAAA;AAAA,IACE,WAAWU,KAAAA,SAAS;AAAA,MAClBC,SAAS;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AASkC,MAAMC,OAA1B,IAAqC,OAAO,EAFpD,MAAA9C,YAE2D;AAAA;AAGtD,aAAA;AAAA;AAEZ;AAED,iBAAiBA,YAAkC;AAC1CA,SAAAA,WAAWwC,IAAIG,mBAAf,EAAoCC,KAAK,IAAzC;AACR;;;;"}
1
+ {"version":3,"file":"ReadOnlyText.cjs.js","sources":["../src/components/builtin/Text/ReadOnlyText.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { Descendant, Text } from 'slate'\n\nimport type { ElementIDValue, RichTextValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { Link } from '../../shared/Link'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\nimport { useTypographyClassName } from './components'\nimport useEnhancedTypography from './components/Leaf/leaf'\nimport { Inline, InlineType, Block, BlockType } from '../../../slate'\nimport { richTextDTOtoDAO } from '../../../controls'\n\ntype Props = {\n id?: ElementIDValue\n text?: RichTextValue\n width?: string\n margin?: string\n}\n\nconst ReadOnlyText = forwardRef(function ReadOnlyText(\n { id, text, width, margin }: Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const descendants = text == null ? [] : richTextDTOtoDAO(text)\n const descendantsAsString = getText(descendants)\n\n return (\n <div ref={ref} id={id} className={cx(width, margin)}>\n {descendantsAsString === '' ? <Placeholder /> : <Descendants descendants={descendants} />}\n </div>\n )\n})\n\nexport default ReadOnlyText\n\nfunction Placeholder({ text = 'Write some text...' }: { text?: string }) {\n return (\n <span\n className={useStyle({\n display: 'inline-block',\n width: 0,\n maxWidth: '100%',\n whiteSpace: 'nowrap',\n opacity: 0.333,\n verticalAlign: 'text-top',\n })}\n >\n {text}\n </span>\n )\n}\n\nexport interface TextProps {\n descendant: Text\n}\n\nexport function TextElement({ descendant }: TextProps) {\n const enhancedTypography = useEnhancedTypography(descendant.typography)\n const typographyClassName = useTypographyClassName(enhancedTypography)\n\n return (\n <span className={typographyClassName}>\n {descendant.text === '' ? '\\uFEFF' : descendant.text}\n </span>\n )\n}\n\nexport interface InlineProps {\n descendant: Inline\n}\n\nfunction InlineElement({ descendant }: InlineProps) {\n const linkClassName = useStyle({ textDecoration: 'none' })\n\n switch (descendant.type) {\n case InlineType.Code:\n return (\n <code>\n <Descendants descendants={descendant.children} />\n </code>\n )\n\n case InlineType.SuperScript:\n return (\n <sup>\n <Descendants descendants={descendant.children} />\n </sup>\n )\n\n case InlineType.SubScript:\n return (\n <sub>\n <Descendants descendants={descendant.children} />\n </sub>\n )\n\n case InlineType.Link:\n return (\n <Link className={linkClassName} link={descendant.link}>\n <Descendants descendants={descendant.children} />\n </Link>\n )\n }\n}\n\nexport interface BlockProps {\n descendant: Block\n}\n\nexport function BlockElement({ descendant }: BlockProps) {\n const blockStyles = [\n useStyle({ margin: 0 }),\n useStyle(useResponsiveStyle([descendant.textAlign], ([textAlign = 'left']) => ({ textAlign }))),\n ]\n const quoteStyle = useStyle({\n padding: '0.5em 10px',\n fontSize: '1.25em',\n fontWeight: '300',\n borderLeft: '5px solid rgba(0, 0, 0, 0.1)',\n })\n\n switch (descendant.type) {\n case BlockType.Text:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n case BlockType.Paragraph:\n return (\n <p className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </p>\n )\n case BlockType.Heading1:\n return (\n <h1 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h1>\n )\n case BlockType.Heading2:\n return (\n <h2 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h2>\n )\n case BlockType.Heading3:\n return (\n <h3 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h3>\n )\n case BlockType.Heading4:\n return (\n <h4 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h4>\n )\n case BlockType.Heading5:\n return (\n <h5 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h5>\n )\n case BlockType.Heading6:\n return (\n <h6 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h6>\n )\n case BlockType.BlockQuote:\n return (\n <blockquote className={cx(...blockStyles, quoteStyle)}>\n <Descendants descendants={descendant.children} />\n </blockquote>\n )\n case BlockType.OrderedList:\n return (\n <ol className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ol>\n )\n case BlockType.UnorderedList:\n return (\n <ul className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ul>\n )\n case BlockType.ListItem:\n return (\n <li className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </li>\n )\n case BlockType.ListItemChild:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n default:\n return null\n }\n}\n\n// reimplemented from slate source for code splitting\nfunction isText(node: any): node is Text {\n if (typeof node === 'object' && 'text' in node) return true\n\n return false\n}\n\nfunction Descendants({ descendants }: { descendants: Descendant[] }) {\n return (\n <>\n {descendants.map((descendant, index) => {\n if (isText(descendant)) {\n return <TextElement key={index} descendant={descendant} />\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return <InlineElement key={index} descendant={descendant} />\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Text:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return <BlockElement key={index} descendant={descendant} />\n default:\n return null\n }\n })}\n </>\n )\n}\n\nfunction isBlock(descendant: Descendant): descendant is Block {\n if ('text' in descendant) return false\n\n switch (descendant.type) {\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return true\n\n default:\n return false\n }\n}\n\nfunction getTextByDescendant(descendant: Descendant): string {\n if ('text' in descendant) {\n return descendant.text ?? ''\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return descendant.children.map(descendant => getTextByDescendant(descendant)).join('') ?? ''\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return (\n descendant.children\n .map(descendant => getTextByDescendant(descendant))\n .join(descendant.children.every(isBlock) ? '\\n' : '') ?? ''\n )\n default:\n return ''\n }\n}\n\nfunction getText(descendant: Descendant[]): string {\n return descendant.map(getTextByDescendant).join('\\n')\n}\n"],"names":["ReadOnlyText","forwardRef","id","text","width","margin","ref","descendants","richTextDTOtoDAO","descendantsAsString","getText","cx","_jsx","useStyle","display","maxWidth","whiteSpace","opacity","verticalAlign","descendant","enhancedTypography","useEnhancedTypography","typography","typographyClassName","useTypographyClassName","linkClassName","textDecoration","type","InlineType","Code","children","SuperScript","SubScript","Link","link","blockStyles","useResponsiveStyle","textAlign","quoteStyle","padding","fontSize","fontWeight","borderLeft","BlockType","Text","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","BlockQuote","OrderedList","listStylePosition","UnorderedList","ListItem","ListItemChild","node","_Fragment","map","index","isText","getTextByDescendant","join","every","isBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBMA,MAAAA,eAAeC,MAAAA,WAAW,uBAC9B;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAMC;AAAAA,EAAOC;AAAAA,GACnBC,KACA;AACMC,QAAAA,cAAcJ,QAAQ,OAAO,CAAA,IAAKK,UAAAA,iBAAiBL,IAAD;AA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BAAAA,oBAAoB5C,WAAD,CAAzD,EAAuE6C,KAAK,EAA5E,MAAA7C,YAAmF;AAAA,SACvFwB,UAAAA,UAAUG;AAAAA,SACVH,UAAAA,UAAUI;AAAAA,SACVJ,UAAAA,UAAUK;AAAAA,SACVL,UAAAA,UAAUS;AAAAA,SACVT,UAAAA,UAAUE;AAAAA,SACVF,UAAAA,UAAUU;AAAAA,SACVV,UAAAA,UAAUY;AAAAA,SACVZ,UAAAA,UAAUa;AAAAA,SACVb,UAAUc,UAAAA;AAEXtC,aAAAA,iBAAWW,SACR8B,IAAIzC,CAAc4C,gBAAAA,oBAAoB5C,WAAD,CADxC,EAEG6C,KAAK7C,WAAWW,SAASmC,MAAMC,OAA1B,IAAqC,OAAO,EAFpD,MAAA/C,YAE2D;AAAA;AAGtD,aAAA;AAAA;AAEZ;AAED,iBAAiBA,YAAkC;AAC1CA,SAAAA,WAAWyC,IAAIG,mBAAf,EAAoCC,KAAK,IAAzC;AACR;;;;"}
@@ -2,23 +2,23 @@ import { cx } from "@emotion/css";
2
2
  import { forwardRef } from "react";
3
3
  import { n as useStyle, o as useResponsiveStyle } from "./index.es.js";
4
4
  import { L as Link } from "./index.es3.js";
5
- import { B as BlockType, I as InlineType } from "./slate.es2.js";
5
+ import "slate";
6
+ import "./state/breakpoints.es.js";
7
+ import { a_ as richTextDTOtoDAO, bc as BlockType, bd as InlineType } from "./react-page.es.js";
8
+ import "is-hotkey";
9
+ import "slate-react";
6
10
  import { jsx, Fragment } from "react/jsx-runtime";
7
11
  import { u as useEnhancedTypography, a as useTypographyClassName } from "./leaf.es.js";
8
- import { au as richTextDTOtoDAO } from "./descriptors.es.js";
9
12
  import "use-sync-external-store/shim/with-selector";
10
13
  import "next/dynamic";
11
- import "./constants.es.js";
12
- import "redux";
13
- import "redux-thunk";
14
14
  import "./actions.es.js";
15
- import "./state/breakpoints.es.js";
16
- import "./introspection.es.js";
17
15
  import "@emotion/serialize";
18
16
  import "@emotion/utils";
19
17
  import "./text-input.es.js";
20
18
  import "./combobox.es.js";
21
19
  import "use-sync-external-store/shim";
20
+ import "redux";
21
+ import "redux-thunk";
22
22
  import "./types.es.js";
23
23
  import "./box-models.es.js";
24
24
  import "css-box-model";
@@ -27,6 +27,7 @@ import "scroll-into-view-if-needed";
27
27
  import "react-dom";
28
28
  import "html-react-parser";
29
29
  import "next/head";
30
+ import "zod";
30
31
  import "@emotion/server/create-instance";
31
32
  import "next/document";
32
33
  import "cors";
@@ -34,6 +35,7 @@ import "path-to-regexp";
34
35
  import "cookie";
35
36
  import "http-proxy";
36
37
  import "set-cookie-parser";
38
+ import "./constants.es.js";
37
39
  import "uuid";
38
40
  import "corporate-ipsum";
39
41
  import "next/link";
@@ -122,6 +124,12 @@ function BlockElement({
122
124
  }), useStyle(useResponsiveStyle([descendant.textAlign], ([textAlign = "left"]) => ({
123
125
  textAlign
124
126
  })))];
127
+ const quoteStyle = useStyle({
128
+ padding: "0.5em 10px",
129
+ fontSize: "1.25em",
130
+ fontWeight: "300",
131
+ borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
132
+ });
125
133
  switch (descendant.type) {
126
134
  case BlockType.Text:
127
135
  return /* @__PURE__ */ jsx("span", {
@@ -181,12 +189,7 @@ function BlockElement({
181
189
  });
182
190
  case BlockType.BlockQuote:
183
191
  return /* @__PURE__ */ jsx("blockquote", {
184
- className: cx(...blockStyles, useStyle({
185
- padding: "0.5em 10px",
186
- fontSize: "1.25em",
187
- fontWeight: "300",
188
- borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
189
- })),
192
+ className: cx(...blockStyles, quoteStyle),
190
193
  children: /* @__PURE__ */ jsx(Descendants, {
191
194
  descendants: descendant.children
192
195
  })
@@ -225,6 +228,8 @@ function BlockElement({
225
228
  descendants: descendant.children
226
229
  })
227
230
  });
231
+ default:
232
+ return null;
228
233
  }
229
234
  }
230
235
  function isText(node) {
@@ -1 +1 @@
1
- {"version":3,"file":"ReadOnlyText.es.js","sources":["../src/components/builtin/Text/ReadOnlyText.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { Descendant, Text } from 'slate'\n\nimport type { ElementIDValue, RichTextValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { Link } from '../../shared/Link'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\nimport { useTypographyClassName } from './components'\nimport useEnhancedTypography from './components/Leaf/leaf'\nimport { Inline, InlineType, Block, BlockType } from '../../../../types/slate'\nimport { richTextDTOtoDAO } from '../../../controls'\n\ntype Props = {\n id?: ElementIDValue\n text?: RichTextValue\n width?: string\n margin?: string\n}\n\nconst ReadOnlyText = forwardRef(function ReadOnlyText(\n { id, text, width, margin }: Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const descendants = text == null ? [] : richTextDTOtoDAO(text)\n const descendantsAsString = getText(descendants)\n\n return (\n <div ref={ref} id={id} className={cx(width, margin)}>\n {descendantsAsString === '' ? <Placeholder /> : <Descendants descendants={descendants} />}\n </div>\n )\n})\n\nexport default ReadOnlyText\n\nfunction Placeholder({ text = 'Write some text...' }: { text?: string }) {\n return (\n <span\n className={useStyle({\n display: 'inline-block',\n width: 0,\n maxWidth: '100%',\n whiteSpace: 'nowrap',\n opacity: 0.333,\n verticalAlign: 'text-top',\n })}\n >\n {text}\n </span>\n )\n}\n\nexport interface TextProps {\n descendant: Text\n}\n\nexport function TextElement({ descendant }: TextProps) {\n const enhancedTypography = useEnhancedTypography(descendant.typography)\n const typographyClassName = useTypographyClassName(enhancedTypography)\n\n return (\n <span className={typographyClassName}>\n {descendant.text === '' ? '\\uFEFF' : descendant.text}\n </span>\n )\n}\n\nexport interface InlineProps {\n descendant: Inline\n}\n\nfunction InlineElement({ descendant }: InlineProps) {\n const linkClassName = useStyle({ textDecoration: 'none' })\n\n switch (descendant.type) {\n case InlineType.Code:\n return (\n <code>\n <Descendants descendants={descendant.children} />\n </code>\n )\n\n case InlineType.SuperScript:\n return (\n <sup>\n <Descendants descendants={descendant.children} />\n </sup>\n )\n\n case InlineType.SubScript:\n return (\n <sub>\n <Descendants descendants={descendant.children} />\n </sub>\n )\n\n case InlineType.Link:\n return (\n <Link className={linkClassName} link={descendant.link}>\n <Descendants descendants={descendant.children} />\n </Link>\n )\n }\n}\n\nexport interface BlockProps {\n descendant: Block\n}\n\nexport function BlockElement({ descendant }: BlockProps) {\n const blockStyles = [\n useStyle({ margin: 0 }),\n useStyle(useResponsiveStyle([descendant.textAlign], ([textAlign = 'left']) => ({ textAlign }))),\n ]\n\n switch (descendant.type) {\n case BlockType.Text:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n case BlockType.Paragraph:\n return (\n <p className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </p>\n )\n case BlockType.Heading1:\n return (\n <h1 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h1>\n )\n case BlockType.Heading2:\n return (\n <h2 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h2>\n )\n case BlockType.Heading3:\n return (\n <h3 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h3>\n )\n case BlockType.Heading4:\n return (\n <h4 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h4>\n )\n case BlockType.Heading5:\n return (\n <h5 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h5>\n )\n case BlockType.Heading6:\n return (\n <h6 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h6>\n )\n case BlockType.BlockQuote:\n return (\n <blockquote\n className={cx(\n ...blockStyles,\n useStyle({\n padding: '0.5em 10px',\n fontSize: '1.25em',\n fontWeight: '300',\n borderLeft: '5px solid rgba(0, 0, 0, 0.1)',\n }),\n )}\n >\n <Descendants descendants={descendant.children} />\n </blockquote>\n )\n case BlockType.OrderedList:\n return (\n <ol className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ol>\n )\n case BlockType.UnorderedList:\n return (\n <ul className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ul>\n )\n case BlockType.ListItem:\n return (\n <li className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </li>\n )\n case BlockType.ListItemChild:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n }\n}\n\n// reimplemented from slate source for code splitting\nfunction isText(node: any): node is Text {\n if (typeof node === 'object' && 'text' in node) return true\n\n return false\n}\n\nfunction Descendants({ descendants }: { descendants: Descendant[] }) {\n return (\n <>\n {descendants.map((descendant, index) => {\n if (isText(descendant)) {\n return <TextElement key={index} descendant={descendant} />\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return <InlineElement key={index} descendant={descendant} />\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Text:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return <BlockElement key={index} descendant={descendant} />\n default:\n return null\n }\n })}\n </>\n )\n}\n\nfunction isBlock(descendant: Descendant): descendant is Block {\n if ('text' in descendant) return false\n\n switch (descendant.type) {\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return true\n\n default:\n return false\n }\n}\n\nfunction getTextByDescendant(descendant: Descendant): string {\n if ('text' in descendant) {\n return descendant.text ?? ''\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return descendant.children.map(descendant => getTextByDescendant(descendant)).join('') ?? ''\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return (\n descendant.children\n .map(descendant => getTextByDescendant(descendant))\n .join(descendant.children.every(isBlock) ? '\\n' : '') ?? ''\n )\n default:\n return ''\n }\n}\n\nfunction getText(descendant: Descendant[]): string {\n return descendant.map(getTextByDescendant).join('\\n')\n}\n"],"names":["ReadOnlyText","forwardRef","id","text","width","margin","ref","descendants","richTextDTOtoDAO","descendantsAsString","getText","cx","_jsx","useStyle","display","maxWidth","whiteSpace","opacity","verticalAlign","descendant","enhancedTypography","useEnhancedTypography","typography","typographyClassName","useTypographyClassName","linkClassName","textDecoration","type","InlineType","Code","children","SuperScript","SubScript","Link","link","blockStyles","useResponsiveStyle","textAlign","BlockType","Text","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","BlockQuote","padding","fontSize","fontWeight","borderLeft","OrderedList","listStylePosition","UnorderedList","ListItem","ListItemChild","node","_Fragment","map","index","isText","getTextByDescendant","join","every","isBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBMA,MAAAA,eAAeC,WAAW,uBAC9B;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAMC;AAAAA,EAAOC;AAAAA,GACnBC,KACA;AACMC,QAAAA,cAAcJ,QAAQ,OAAO,CAAA,IAAKK,iBAAiBL,IAAD;AAClDM,QAAAA,sBAAsBC,QAAQH,WAAD;AAGjC,6BAAA,OAAA;AAAA,IAAK;AAAA,IAAU;AAAA,IAAQ,WAAWI,GAAGP,OAAOC,MAAR;AAAA,IACjCI,UAAAA,wBAAwB,KAAKG,oBAAC,aAAD,EAAA,IAAkBA,oBAAC,aAAD;AAAA,MAAa;AAAA,IAAA,CAAb;AAAA,EAAA,CAFpD;AAKD,CAZ8B;AAgB/B,qBAAqB;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VJ,UAAUK;AAAAA,SACVL,UAAUS;AAAAA,SACVT,UAAUE;AAAAA,SACVF,UAAUc;AAAAA,SACVd,UAAUgB;AAAAA,SACVhB,UAAUiB;AAAAA,SACVjB,UAAUkB;AACN,aAAA;AAAA;AAGA,aAAA;AAAA;AAEZ;AAED,6BAA6BrC,YAAgC;;AACvD,MAAA,UAAUA,YAAY;AACxB,WAAOA,iBAAWhB,SAAXgB,YAAmB;AAAA,EAC3B;AAEOA,UAAAA,WAAWQ;AAAAA,SACZC,WAAWK;AAAAA,SACXL,WAAWC;AAAAA,SACXD,WAAWI;AAAAA,SACXJ,WAAWG;AACPZ,aAAAA,iBAAWW,SAAS6B,IAAIxC,CAAc2C,gBAAAA,oBAAoB3C,WAAD,CAAzD,EAAuE4C,KAAK,EAA5E,MAAA5C,YAAmF;AAAA,SACvFmB,UAAUG;AAAAA,SACVH,UAAUI;AAAAA,SACVJ,UAAUK;AAAAA,SACVL,UAAUS;AAAAA,SACVT,UAAUE;AAAAA,SACVF,UAAUc;AAAAA,SACVd,UAAUgB;AAAAA,SACVhB,UAAUiB;AAAAA,SACVjB,UAAUkB;AAEXrC,aAAAA,iBAAWW,SACR6B,IAAIxC,CAAc2C,gBAAAA,oBAAoB3C,WAAD,CADxC,EAEG4C,KAAK5C,WAAWW,SAASkC,MAAMC,OAA1B,IAAqC,OAAO,EAFpD,MAAA9C,YAE2D;AAAA;AAGtD,aAAA;AAAA;AAEZ;AAED,iBAAiBA,YAAkC;AAC1CA,SAAAA,WAAWwC,IAAIG,mBAAf,EAAoCC,KAAK,IAAzC;AACR;;"}
1
+ {"version":3,"file":"ReadOnlyText.es.js","sources":["../src/components/builtin/Text/ReadOnlyText.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { Descendant, Text } from 'slate'\n\nimport type { ElementIDValue, RichTextValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { Link } from '../../shared/Link'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\nimport { useTypographyClassName } from './components'\nimport useEnhancedTypography from './components/Leaf/leaf'\nimport { Inline, InlineType, Block, BlockType } from '../../../slate'\nimport { richTextDTOtoDAO } from '../../../controls'\n\ntype Props = {\n id?: ElementIDValue\n text?: RichTextValue\n width?: string\n margin?: string\n}\n\nconst ReadOnlyText = forwardRef(function ReadOnlyText(\n { id, text, width, margin }: Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const descendants = text == null ? [] : richTextDTOtoDAO(text)\n const descendantsAsString = getText(descendants)\n\n return (\n <div ref={ref} id={id} className={cx(width, margin)}>\n {descendantsAsString === '' ? <Placeholder /> : <Descendants descendants={descendants} />}\n </div>\n )\n})\n\nexport default ReadOnlyText\n\nfunction Placeholder({ text = 'Write some text...' }: { text?: string }) {\n return (\n <span\n className={useStyle({\n display: 'inline-block',\n width: 0,\n maxWidth: '100%',\n whiteSpace: 'nowrap',\n opacity: 0.333,\n verticalAlign: 'text-top',\n })}\n >\n {text}\n </span>\n )\n}\n\nexport interface TextProps {\n descendant: Text\n}\n\nexport function TextElement({ descendant }: TextProps) {\n const enhancedTypography = useEnhancedTypography(descendant.typography)\n const typographyClassName = useTypographyClassName(enhancedTypography)\n\n return (\n <span className={typographyClassName}>\n {descendant.text === '' ? '\\uFEFF' : descendant.text}\n </span>\n )\n}\n\nexport interface InlineProps {\n descendant: Inline\n}\n\nfunction InlineElement({ descendant }: InlineProps) {\n const linkClassName = useStyle({ textDecoration: 'none' })\n\n switch (descendant.type) {\n case InlineType.Code:\n return (\n <code>\n <Descendants descendants={descendant.children} />\n </code>\n )\n\n case InlineType.SuperScript:\n return (\n <sup>\n <Descendants descendants={descendant.children} />\n </sup>\n )\n\n case InlineType.SubScript:\n return (\n <sub>\n <Descendants descendants={descendant.children} />\n </sub>\n )\n\n case InlineType.Link:\n return (\n <Link className={linkClassName} link={descendant.link}>\n <Descendants descendants={descendant.children} />\n </Link>\n )\n }\n}\n\nexport interface BlockProps {\n descendant: Block\n}\n\nexport function BlockElement({ descendant }: BlockProps) {\n const blockStyles = [\n useStyle({ margin: 0 }),\n useStyle(useResponsiveStyle([descendant.textAlign], ([textAlign = 'left']) => ({ textAlign }))),\n ]\n const quoteStyle = useStyle({\n padding: '0.5em 10px',\n fontSize: '1.25em',\n fontWeight: '300',\n borderLeft: '5px solid rgba(0, 0, 0, 0.1)',\n })\n\n switch (descendant.type) {\n case BlockType.Text:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n case BlockType.Paragraph:\n return (\n <p className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </p>\n )\n case BlockType.Heading1:\n return (\n <h1 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h1>\n )\n case BlockType.Heading2:\n return (\n <h2 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h2>\n )\n case BlockType.Heading3:\n return (\n <h3 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h3>\n )\n case BlockType.Heading4:\n return (\n <h4 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h4>\n )\n case BlockType.Heading5:\n return (\n <h5 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h5>\n )\n case BlockType.Heading6:\n return (\n <h6 className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </h6>\n )\n case BlockType.BlockQuote:\n return (\n <blockquote className={cx(...blockStyles, quoteStyle)}>\n <Descendants descendants={descendant.children} />\n </blockquote>\n )\n case BlockType.OrderedList:\n return (\n <ol className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ol>\n )\n case BlockType.UnorderedList:\n return (\n <ul className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n <Descendants descendants={descendant.children} />\n </ul>\n )\n case BlockType.ListItem:\n return (\n <li className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </li>\n )\n case BlockType.ListItemChild:\n return (\n <span className={cx(...blockStyles)}>\n <Descendants descendants={descendant.children} />\n </span>\n )\n default:\n return null\n }\n}\n\n// reimplemented from slate source for code splitting\nfunction isText(node: any): node is Text {\n if (typeof node === 'object' && 'text' in node) return true\n\n return false\n}\n\nfunction Descendants({ descendants }: { descendants: Descendant[] }) {\n return (\n <>\n {descendants.map((descendant, index) => {\n if (isText(descendant)) {\n return <TextElement key={index} descendant={descendant} />\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return <InlineElement key={index} descendant={descendant} />\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Text:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return <BlockElement key={index} descendant={descendant} />\n default:\n return null\n }\n })}\n </>\n )\n}\n\nfunction isBlock(descendant: Descendant): descendant is Block {\n if ('text' in descendant) return false\n\n switch (descendant.type) {\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return true\n\n default:\n return false\n }\n}\n\nfunction getTextByDescendant(descendant: Descendant): string {\n if ('text' in descendant) {\n return descendant.text ?? ''\n }\n\n switch (descendant.type) {\n case InlineType.Link:\n case InlineType.Code:\n case InlineType.SubScript:\n case InlineType.SuperScript:\n return descendant.children.map(descendant => getTextByDescendant(descendant)).join('') ?? ''\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.BlockQuote:\n case BlockType.Paragraph:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return (\n descendant.children\n .map(descendant => getTextByDescendant(descendant))\n .join(descendant.children.every(isBlock) ? '\\n' : '') ?? ''\n )\n default:\n return ''\n }\n}\n\nfunction getText(descendant: Descendant[]): string {\n return descendant.map(getTextByDescendant).join('\\n')\n}\n"],"names":["ReadOnlyText","forwardRef","id","text","width","margin","ref","descendants","richTextDTOtoDAO","descendantsAsString","getText","cx","_jsx","useStyle","display","maxWidth","whiteSpace","opacity","verticalAlign","descendant","enhancedTypography","useEnhancedTypography","typography","typographyClassName","useTypographyClassName","linkClassName","textDecoration","type","InlineType","Code","children","SuperScript","SubScript","Link","link","blockStyles","useResponsiveStyle","textAlign","quoteStyle","padding","fontSize","fontWeight","borderLeft","BlockType","Text","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","BlockQuote","OrderedList","listStylePosition","UnorderedList","ListItem","ListItemChild","node","_Fragment","map","index","isText","getTextByDescendant","join","every","isBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBMA,MAAAA,eAAeC,WAAW,uBAC9B;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAMC;AAAAA,EAAOC;AAAAA,GACnBC,KACA;AACMC,QAAAA,cAAcJ,QAAQ,OAAO,CAAA,IAAKK,iBAAiBL,IAAD;AAClDM,QAAAA,sBAAsBC,QAAQH,WAAD;AAGjC,6BAAA,OAAA;AAAA,IAAK;AAAA,IAAU;AAAA,IAAQ,WAAWI,GAAGP,OAAOC,MAAR;AAAA,IACjCI,UAAAA,wBAAwB,KAAKG,oBAAC,aAAD,EAAA,IAAkBA,oBAAC,aAAD;AAAA,MAAa;AAAA,IAAA,CAAb;AAAA,EAAA,CAFpD;AAKD,CAZ8B;AAgB/B,qBAAqB;AAAA,EAAET,OAAO;AAAA,GAA2C;AAErE,6BAAA,QAAA;AAAA,IACE,WAAWU,SAAS;AAAA,MAClBC,SAAS;AAAA,MACTV,OAAO;AAAA,MACPW,UAAU;AAAA,MACVC,YAAY;AAAA,MACZC,SAAS;AAA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