@makeswift/runtime 0.9.12 → 0.10.1

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 (244) hide show
  1. package/dist/Box.cjs.js +3 -0
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +4 -1
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +3 -2
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +4 -3
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +3 -2
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +4 -3
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +3 -0
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +4 -1
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +3 -0
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +4 -1
  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 +13 -12
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +5 -4
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +11 -10
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +11 -10
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +3 -0
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +5 -2
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +11 -10
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +11 -10
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +10 -6
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +9 -5
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +19 -26
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +15 -22
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +29 -26
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +28 -25
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +3 -0
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +4 -1
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +6 -5
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +7 -6
  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/actions.cjs.js +2 -2
  70. package/dist/actions.cjs.js.map +1 -1
  71. package/dist/actions.es.js +2 -2
  72. package/dist/actions.es.js.map +1 -1
  73. package/dist/builder.cjs.js +2 -0
  74. package/dist/builder.cjs.js.map +1 -1
  75. package/dist/builder.es.js +2 -0
  76. package/dist/builder.es.js.map +1 -1
  77. package/dist/components.cjs.js +3 -2
  78. package/dist/components.cjs.js.map +1 -1
  79. package/dist/components.es.js +3 -2
  80. package/dist/components.es.js.map +1 -1
  81. package/dist/control-serialization.es.js +1 -1
  82. package/dist/controls.cjs.js +8 -8
  83. package/dist/controls.es.js +4 -2
  84. package/dist/controls.es.js.map +1 -1
  85. package/dist/index.cjs.js +280 -216
  86. package/dist/index.cjs.js.map +1 -1
  87. package/dist/index.cjs3.js +21 -107
  88. package/dist/index.cjs3.js.map +1 -1
  89. package/dist/index.cjs4.js +16 -57
  90. package/dist/index.cjs4.js.map +1 -1
  91. package/dist/index.cjs5.js +53 -242
  92. package/dist/index.cjs5.js.map +1 -1
  93. package/dist/index.cjs6.js +0 -41
  94. package/dist/index.cjs6.js.map +1 -1
  95. package/dist/index.cjs7.js +376 -14
  96. package/dist/index.cjs7.js.map +1 -1
  97. package/dist/index.cjs8.js +275 -11
  98. package/dist/index.cjs8.js.map +1 -1
  99. package/dist/index.es.js +274 -209
  100. package/dist/index.es.js.map +1 -1
  101. package/dist/index.es2.js +2 -2
  102. package/dist/index.es3.js +22 -103
  103. package/dist/index.es3.js.map +1 -1
  104. package/dist/index.es4.js +16 -57
  105. package/dist/index.es4.js.map +1 -1
  106. package/dist/index.es5.js +53 -240
  107. package/dist/index.es5.js.map +1 -1
  108. package/dist/index.es6.js +1 -36
  109. package/dist/index.es6.js.map +1 -1
  110. package/dist/index.es7.js +372 -16
  111. package/dist/index.es7.js.map +1 -1
  112. package/dist/index.es8.js +270 -10
  113. package/dist/index.es8.js.map +1 -1
  114. package/dist/main.cjs.js +2 -0
  115. package/dist/main.cjs.js.map +1 -1
  116. package/dist/main.es.js +2 -0
  117. package/dist/main.es.js.map +1 -1
  118. package/dist/next.cjs.js +3 -0
  119. package/dist/next.cjs.js.map +1 -1
  120. package/dist/next.es.js +4 -1
  121. package/dist/next.es.js.map +1 -1
  122. package/dist/prop-controllers.cjs.js +2 -0
  123. package/dist/prop-controllers.cjs.js.map +1 -1
  124. package/dist/prop-controllers.es.js +2 -0
  125. package/dist/prop-controllers.es.js.map +1 -1
  126. package/dist/react-page.cjs.js +1450 -65
  127. package/dist/react-page.cjs.js.map +1 -1
  128. package/dist/react-page.es.js +1427 -66
  129. package/dist/react-page.es.js.map +1 -1
  130. package/dist/react.cjs.js +3 -0
  131. package/dist/react.cjs.js.map +1 -1
  132. package/dist/react.es.js +3 -0
  133. package/dist/react.es.js.map +1 -1
  134. package/dist/slate.cjs.js +33 -391
  135. package/dist/slate.cjs.js.map +1 -1
  136. package/dist/slate.es.js +15 -376
  137. package/dist/slate.es.js.map +1 -1
  138. package/dist/text-input.cjs.js +0 -22
  139. package/dist/text-input.cjs.js.map +1 -1
  140. package/dist/text-input.es.js +1 -18
  141. package/dist/text-input.es.js.map +1 -1
  142. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -4
  143. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  144. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  145. package/dist/types/src/controls/rich-text/fixtures/v2-data-types.d.ts.map +1 -1
  146. package/dist/types/src/controls/rich-text/rich-text.d.ts +0 -1
  147. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  148. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  149. package/dist/types/src/controls/rich-text-v2/plugin.d.ts +29 -0
  150. package/dist/types/src/controls/rich-text-v2/plugin.d.ts.map +1 -0
  151. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +17 -31
  152. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  153. package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
  154. package/dist/types/src/next/client.d.ts.map +1 -1
  155. package/dist/types/src/next/index.d.ts.map +1 -1
  156. package/dist/types/src/prop-controllers/descriptors.d.ts +1 -1
  157. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  158. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  159. package/dist/types/src/runtimes/react/controls/control.d.ts +1 -1
  160. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  161. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/editable-text.d.ts +4 -3
  162. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/editable-text.d.ts.map +1 -0
  163. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/index.d.ts.map +1 -0
  164. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncDOMSelection.d.ts.map +1 -0
  165. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncWithBuilder.d.ts +1 -1
  166. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.d.ts.map +1 -0
  167. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/ReadOnlyText.d.ts +2 -2
  168. package/dist/types/src/runtimes/react/controls/rich-text/ReadOnlyText.d.ts.map +1 -0
  169. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/block.d.ts +1 -1
  170. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/block.d.ts.map +1 -0
  171. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/element.d.ts.map +1 -0
  172. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/index.d.ts.map +1 -0
  173. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/inline.d.ts +1 -1
  174. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/inline.d.ts.map +1 -0
  175. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/index.d.ts.map +1 -0
  176. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/leaf.d.ts.map +1 -0
  177. package/dist/types/src/runtimes/react/controls/rich-text/components/index.d.ts.map +1 -0
  178. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts +2 -0
  179. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts.map +1 -0
  180. package/dist/types/src/runtimes/react/controls/{rich-text.d.ts → rich-text/rich-text.d.ts} +1 -1
  181. package/dist/types/src/runtimes/react/controls/rich-text/rich-text.d.ts.map +1 -0
  182. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  183. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +2 -1
  184. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
  185. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +2 -1
  186. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
  187. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -1
  188. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +2 -1
  189. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  190. package/dist/types/src/slate/BlockPlugin/index.d.ts +3 -3
  191. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  192. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -4
  193. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  194. package/dist/types/src/slate/InlinePlugin/index.d.ts +3 -3
  195. package/dist/types/src/slate/InlinePlugin/index.d.ts.map +1 -1
  196. package/dist/types/src/slate/InlinePlugin/types.d.ts +1 -1
  197. package/dist/types/src/slate/InlinePlugin/types.d.ts.map +1 -1
  198. package/dist/types/src/slate/LinkPlugin/index.d.ts +3 -3
  199. package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
  200. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts +16 -0
  201. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts.map +1 -0
  202. package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
  203. package/dist/types/src/slate/TypographyPlugin/index.d.ts +3 -3
  204. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  205. package/dist/types/src/slate/types.d.ts +1 -10
  206. package/dist/types/src/slate/types.d.ts.map +1 -1
  207. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  208. package/dist/types/src/state/actions.d.ts +2 -1
  209. package/dist/types/src/state/actions.d.ts.map +1 -1
  210. package/dist/types/src/state/modules/locales.d.ts.map +1 -1
  211. package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
  212. package/package.json +1 -1
  213. package/dist/index.cjs10.js +0 -390
  214. package/dist/index.cjs10.js.map +0 -1
  215. package/dist/index.cjs9.js +0 -295
  216. package/dist/index.cjs9.js.map +0 -1
  217. package/dist/index.es10.js +0 -383
  218. package/dist/index.es10.js.map +0 -1
  219. package/dist/index.es9.js +0 -288
  220. package/dist/index.es9.js.map +0 -1
  221. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +0 -1
  222. package/dist/types/src/components/builtin/Text/EditableText/index.d.ts.map +0 -1
  223. package/dist/types/src/components/builtin/Text/EditableText/useSyncDOMSelection.d.ts.map +0 -1
  224. package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +0 -1
  225. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +0 -1
  226. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +0 -1
  227. package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +0 -1
  228. package/dist/types/src/components/builtin/Text/components/Element/index.d.ts.map +0 -1
  229. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +0 -1
  230. package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +0 -1
  231. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +0 -1
  232. package/dist/types/src/components/builtin/Text/components/index.d.ts.map +0 -1
  233. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +0 -1
  234. package/dist/types.cjs2.js +0 -765
  235. package/dist/types.cjs2.js.map +0 -1
  236. package/dist/types.es2.js +0 -748
  237. package/dist/types.es2.js.map +0 -1
  238. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/index.d.ts +0 -0
  239. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncDOMSelection.d.ts +0 -0
  240. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/element.d.ts +0 -0
  241. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/index.d.ts +0 -0
  242. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/index.d.ts +0 -0
  243. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/leaf.d.ts +0 -0
  244. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/index.d.ts +0 -0
@@ -1,383 +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
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { useCallback, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from "react";
33
- import { Range, createEditor } from "slate";
34
- import { ReactEditor, withReact, Slate, Editable } from "slate-react";
35
- import { cx } from "@emotion/css";
36
- import { g as getBox } from "./box-models.es.js";
37
- import { U as useStyle, bu as BlockType, bs as InlineType, bf as richTextDTOtoDAO, be as richTextDTOtoSelection, bD as BuilderEditMode } from "./react-page.es.js";
38
- import { W as useEnhancedTypography, X as useTypographyClassName, n as useResponsiveStyle, u as useIsInBuilder, M as deepEqual, U as useBuilderEditMode, V as pollBoxModel } from "./index.es.js";
39
- import { jsx } from "react/jsx-runtime";
40
- import "./state/breakpoints.es.js";
41
- import "./actions.es.js";
42
- import { b as withBlock, o as onKeyDown } from "./types.es2.js";
43
- import isHotkey from "is-hotkey";
44
- import { L as Link } from "./index.es3.js";
45
- import "uuid";
46
- import { w as withTypography } from "./index.es5.js";
47
- import { w as withBuilder } from "./index.es7.js";
48
- import { u as useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect.es.js";
49
- import "css-box-model";
50
- import "redux";
51
- import "redux-thunk";
52
- import "@emotion/serialize";
53
- import "@emotion/utils";
54
- import "use-sync-external-store/shim/with-selector";
55
- import "next/dynamic";
56
- import "./text-input.es.js";
57
- import "./combobox.es.js";
58
- import "use-sync-external-store/shim";
59
- import "./types.es.js";
60
- import "color";
61
- import "scroll-into-view-if-needed";
62
- import "react-dom";
63
- import "html-react-parser";
64
- import "next/head";
65
- import "zod";
66
- import "@emotion/server/create-instance";
67
- import "next/document";
68
- import "cors";
69
- import "path-to-regexp";
70
- import "cookie";
71
- import "http-proxy";
72
- import "set-cookie-parser";
73
- import "./constants.es.js";
74
- import "corporate-ipsum";
75
- import "next/link";
76
- function Leaf(_a) {
77
- var _b = _a, {
78
- leaf
79
- } = _b, props = __objRest(_b, [
80
- "leaf"
81
- ]);
82
- const enhancedTypography = useEnhancedTypography(leaf.typography);
83
- const typographyClassName = useTypographyClassName(enhancedTypography);
84
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, props.attributes), {
85
- className: typographyClassName,
86
- children: props.children
87
- }));
88
- }
89
- function BlockElement({
90
- element,
91
- attributes,
92
- children
93
- }) {
94
- const blockStyles = [useStyle({
95
- margin: 0
96
- }), useStyle(useResponsiveStyle([element.textAlign], ([textAlign = "left"]) => ({
97
- textAlign
98
- })))];
99
- const quoteStyles = useStyle({
100
- padding: "0.5em 10px",
101
- fontSize: "1.25em",
102
- fontWeight: "300",
103
- borderLeft: "5px solid rgba(0, 0, 0, 0.1)"
104
- });
105
- switch (element.type) {
106
- case BlockType.Text:
107
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, attributes), {
108
- className: cx(...blockStyles),
109
- children
110
- }));
111
- case BlockType.Default:
112
- case BlockType.Paragraph:
113
- return /* @__PURE__ */ jsx("p", __spreadProps(__spreadValues({}, attributes), {
114
- className: cx(...blockStyles),
115
- children
116
- }));
117
- case BlockType.Heading1:
118
- return /* @__PURE__ */ jsx("h1", __spreadProps(__spreadValues({}, attributes), {
119
- className: cx(...blockStyles),
120
- children
121
- }));
122
- case BlockType.Heading2:
123
- return /* @__PURE__ */ jsx("h2", __spreadProps(__spreadValues({}, attributes), {
124
- className: cx(...blockStyles),
125
- children
126
- }));
127
- case BlockType.Heading3:
128
- return /* @__PURE__ */ jsx("h3", __spreadProps(__spreadValues({}, attributes), {
129
- className: cx(...blockStyles),
130
- children
131
- }));
132
- case BlockType.Heading4:
133
- return /* @__PURE__ */ jsx("h4", __spreadProps(__spreadValues({}, attributes), {
134
- className: cx(...blockStyles),
135
- children
136
- }));
137
- case BlockType.Heading5:
138
- return /* @__PURE__ */ jsx("h5", __spreadProps(__spreadValues({}, attributes), {
139
- className: cx(...blockStyles),
140
- children
141
- }));
142
- case BlockType.Heading6:
143
- return /* @__PURE__ */ jsx("h6", __spreadProps(__spreadValues({}, attributes), {
144
- className: cx(...blockStyles),
145
- children
146
- }));
147
- case BlockType.BlockQuote:
148
- return /* @__PURE__ */ jsx("blockquote", __spreadProps(__spreadValues({}, attributes), {
149
- className: cx(...blockStyles, quoteStyles),
150
- children
151
- }));
152
- case BlockType.OrderedList:
153
- return /* @__PURE__ */ jsx("ol", __spreadProps(__spreadValues({}, attributes), {
154
- className: cx(...blockStyles),
155
- style: {
156
- listStylePosition: "inside"
157
- },
158
- children
159
- }));
160
- case BlockType.UnorderedList:
161
- return /* @__PURE__ */ jsx("ul", __spreadProps(__spreadValues({}, attributes), {
162
- className: cx(...blockStyles),
163
- style: {
164
- listStylePosition: "inside"
165
- },
166
- children
167
- }));
168
- case BlockType.ListItem:
169
- return /* @__PURE__ */ jsx("li", __spreadProps(__spreadValues({}, attributes), {
170
- className: cx(...blockStyles),
171
- children
172
- }));
173
- case BlockType.ListItemChild:
174
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, attributes), {
175
- className: cx(...blockStyles),
176
- children
177
- }));
178
- }
179
- }
180
- function StyledLink(_c) {
181
- var _d = _c, {
182
- className
183
- } = _d, restOfProps = __objRest(_d, [
184
- "className"
185
- ]);
186
- return /* @__PURE__ */ jsx(Link, __spreadProps(__spreadValues({}, restOfProps), {
187
- className: cx(useStyle({
188
- textDecoration: "none"
189
- }), className)
190
- }));
191
- }
192
- function InlineElement({
193
- element,
194
- attributes,
195
- children
196
- }) {
197
- var _a;
198
- switch (element.type) {
199
- case InlineType.Code:
200
- return /* @__PURE__ */ jsx("code", __spreadProps(__spreadValues({}, attributes), {
201
- children
202
- }));
203
- case InlineType.SuperScript:
204
- return /* @__PURE__ */ jsx("sup", __spreadProps(__spreadValues({}, attributes), {
205
- children
206
- }));
207
- case InlineType.SubScript:
208
- return /* @__PURE__ */ jsx("sub", __spreadProps(__spreadValues({}, attributes), {
209
- children
210
- }));
211
- case InlineType.Link:
212
- return /* @__PURE__ */ jsx(StyledLink, __spreadProps(__spreadValues({}, attributes), {
213
- link: (_a = element.link) != null ? _a : void 0,
214
- children
215
- }));
216
- }
217
- }
218
- function Element(_e) {
219
- var _f = _e, {
220
- element
221
- } = _f, props = __objRest(_f, [
222
- "element"
223
- ]);
224
- switch (element.type) {
225
- case InlineType.Code:
226
- case InlineType.SuperScript:
227
- case InlineType.SubScript:
228
- case InlineType.Link:
229
- return /* @__PURE__ */ jsx(InlineElement, __spreadValues({
230
- element
231
- }, props));
232
- case BlockType.Text:
233
- case BlockType.Default:
234
- case BlockType.Paragraph:
235
- case BlockType.Heading1:
236
- case BlockType.Heading2:
237
- case BlockType.Heading3:
238
- case BlockType.Heading4:
239
- case BlockType.Heading5:
240
- case BlockType.Heading6:
241
- case BlockType.BlockQuote:
242
- case BlockType.OrderedList:
243
- case BlockType.UnorderedList:
244
- case BlockType.ListItem:
245
- case BlockType.ListItemChild:
246
- return /* @__PURE__ */ jsx(BlockElement, __spreadValues({
247
- element
248
- }, props));
249
- default:
250
- return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, props.attributes), {
251
- children: props.children
252
- }));
253
- }
254
- }
255
- const COMMIT_DEBOUNCE_DELAY = 500;
256
- function useSyncWithBuilder(editor, text) {
257
- const [shouldCommit, setShouldCommit] = useState(true);
258
- const isInBuilder = useIsInBuilder();
259
- useEffect(() => {
260
- if (shouldCommit && text && isInBuilder) {
261
- const nextValue = richTextDTOtoDAO(text);
262
- const nextSelection = richTextDTOtoSelection(text);
263
- if (!deepEqual(editor.children, nextValue) || !deepEqual(editor.selection, nextSelection)) {
264
- editor.children = nextValue;
265
- editor.selection = nextSelection;
266
- editor.onChange();
267
- }
268
- }
269
- }, [editor, shouldCommit, text]);
270
- useEffect(() => {
271
- if (shouldCommit)
272
- return;
273
- const timeoutId = window.setTimeout(() => {
274
- setShouldCommit(true);
275
- }, COMMIT_DEBOUNCE_DELAY);
276
- return () => {
277
- window.clearTimeout(timeoutId);
278
- };
279
- }, [shouldCommit]);
280
- return useCallback(() => setShouldCommit(false), []);
281
- }
282
- function useSyncDOMSelection(editor, isEnabled) {
283
- useIsomorphicLayoutEffect(() => {
284
- if (!isEnabled || editor.selection == null || ReactEditor.isFocused(editor))
285
- return;
286
- try {
287
- const root = ReactEditor.findDocumentOrShadowRoot(editor);
288
- const domSelection = root.getSelection();
289
- const newDomRange = ReactEditor.toDOMRange(editor, editor.selection);
290
- if (newDomRange) {
291
- if (Range.isBackward(editor.selection)) {
292
- domSelection == null ? void 0 : domSelection.setBaseAndExtent(newDomRange.endContainer, newDomRange.endOffset, newDomRange.startContainer, newDomRange.startOffset);
293
- } else {
294
- domSelection == null ? void 0 : domSelection.setBaseAndExtent(newDomRange.startContainer, newDomRange.startOffset, newDomRange.endContainer, newDomRange.endOffset);
295
- }
296
- } else {
297
- domSelection == null ? void 0 : domSelection.removeAllRanges();
298
- }
299
- } catch (e) {
300
- console.error(e);
301
- }
302
- });
303
- }
304
- const defaultText = [{
305
- type: BlockType.Paragraph,
306
- children: [{
307
- text: ""
308
- }]
309
- }];
310
- const EditableText = forwardRef(function EditableText2({
311
- id,
312
- text,
313
- width,
314
- margin
315
- }, ref) {
316
- const [editor] = useState(() => withBlock(withTypography(withBuilder(withReact(createEditor())))));
317
- const [isPreservingDOMSElection, setIsPreservingDOMSelection] = useState(false);
318
- useSyncDOMSelection(editor, isPreservingDOMSElection);
319
- const delaySync = useSyncWithBuilder(editor, text);
320
- const editMode = useBuilderEditMode();
321
- const [propControllers, setPropControllers] = useState(null);
322
- const controller = propControllers == null ? void 0 : propControllers.text;
323
- useEffect(() => {
324
- if (controller == null)
325
- return;
326
- const element = ReactEditor.toDOMNode(editor, editor);
327
- return pollBoxModel({
328
- element,
329
- onBoxModelChange: (boxModel) => controller.changeBoxModel(boxModel)
330
- });
331
- }, [editor, controller]);
332
- useImperativeHandle(ref, () => ({
333
- getDomNode() {
334
- return ReactEditor.toDOMNode(editor, editor);
335
- },
336
- getBoxModel() {
337
- return getBox(ReactEditor.toDOMNode(editor, editor));
338
- },
339
- setPropControllers
340
- }), [editor, setPropControllers]);
341
- const initialValue = useMemo(() => text ? richTextDTOtoDAO(text) : defaultText, [text]);
342
- useEffect(() => {
343
- controller == null ? void 0 : controller.setSlateEditor(editor);
344
- }, [controller, editor]);
345
- const handleFocus = useCallback(() => {
346
- controller == null ? void 0 : controller.focus();
347
- setIsPreservingDOMSelection(true);
348
- }, [controller]);
349
- const handleKeyDown = useCallback((e) => {
350
- if (isHotkey("mod+shift+z", e))
351
- return controller == null ? void 0 : controller.redo();
352
- if (isHotkey("mod+z", e))
353
- return controller == null ? void 0 : controller.undo();
354
- if (isHotkey("escape")(e))
355
- return controller == null ? void 0 : controller.blur();
356
- onKeyDown(e, editor);
357
- }, [controller, editor]);
358
- const handleBlur = useCallback((e) => {
359
- if (e.relatedTarget == null)
360
- return;
361
- setIsPreservingDOMSelection(false);
362
- ReactEditor.deselect(editor);
363
- }, []);
364
- return /* @__PURE__ */ jsx(Slate, {
365
- editor,
366
- value: initialValue,
367
- onChange: delaySync,
368
- children: /* @__PURE__ */ jsx(Editable, {
369
- id,
370
- renderLeaf: Leaf,
371
- renderElement: Element,
372
- onFocus: handleFocus,
373
- onKeyDown: handleKeyDown,
374
- onBlur: handleBlur,
375
- className: cx(width, margin),
376
- readOnly: editMode !== BuilderEditMode.CONTENT,
377
- placeholder: "Write some text..."
378
- })
379
- });
380
- });
381
- var EditableText$1 = EditableText;
382
- export { EditableText, EditableText$1 as default };
383
- //# sourceMappingURL=index.es10.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es10.js","sources":["../src/components/builtin/Text/components/Leaf/leaf.tsx","../src/components/builtin/Text/components/Element/block.tsx","../src/components/builtin/Text/components/Element/inline.tsx","../src/components/builtin/Text/components/Element/element.tsx","../src/components/builtin/Text/EditableText/useSyncWithBuilder.tsx","../src/components/builtin/Text/EditableText/useSyncDOMSelection.tsx","../src/components/builtin/Text/EditableText/editable-text.tsx"],"sourcesContent":["import { RenderLeafProps } from 'slate-react'\nimport useEnhancedTypography, {\n useTypographyClassName,\n} from '../../../../../runtimes/react/controls/typography'\n\nexport function Leaf({ leaf, ...props }: RenderLeafProps) {\n // for each breakpoint fetch related resources and merge its value with its override\n const enhancedTypography = useEnhancedTypography(leaf.typography)\n\n // for each breakpoint shallow merge back up through the breakpoints and create a className\n const typographyClassName = useTypographyClassName(enhancedTypography)\n\n return (\n <span {...props.attributes} className={typographyClassName}>\n {props.children}\n </span>\n )\n}\n","import { cx } from '@emotion/css'\nimport { RenderElementProps } from 'slate-react'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\nimport { useResponsiveStyle } from '../../../../utils/responsive-style'\nimport { Block, BlockType } from '../../../../../slate'\n\nexport interface InlineRenderElementProps extends RenderElementProps {\n element: Block\n}\n\nexport function BlockElement({ element, attributes, children }: InlineRenderElementProps) {\n const blockStyles = [\n useStyle({ margin: 0 }),\n useStyle(useResponsiveStyle([element.textAlign], ([textAlign = 'left']) => ({ textAlign }))),\n ]\n\n const quoteStyles = 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 (element.type) {\n case BlockType.Text:\n return (\n <span {...attributes} className={cx(...blockStyles)}>\n {children}\n </span>\n )\n case BlockType.Default:\n case BlockType.Paragraph:\n return (\n <p {...attributes} className={cx(...blockStyles)}>\n {children}\n </p>\n )\n case BlockType.Heading1:\n return (\n <h1 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h1>\n )\n case BlockType.Heading2:\n return (\n <h2 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h2>\n )\n case BlockType.Heading3:\n return (\n <h3 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h3>\n )\n case BlockType.Heading4:\n return (\n <h4 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h4>\n )\n case BlockType.Heading5:\n return (\n <h5 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h5>\n )\n case BlockType.Heading6:\n return (\n <h6 {...attributes} className={cx(...blockStyles)}>\n {children}\n </h6>\n )\n case BlockType.BlockQuote:\n return (\n <blockquote {...attributes} className={cx(...blockStyles, quoteStyles)}>\n {children}\n </blockquote>\n )\n case BlockType.OrderedList:\n return (\n <ol {...attributes} className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n {children}\n </ol>\n )\n case BlockType.UnorderedList:\n return (\n <ul {...attributes} className={cx(...blockStyles)} style={{ listStylePosition: 'inside' }}>\n {children}\n </ul>\n )\n case BlockType.ListItem:\n return (\n <li {...attributes} className={cx(...blockStyles)}>\n {children}\n </li>\n )\n case BlockType.ListItemChild:\n return (\n <span {...attributes} className={cx(...blockStyles)}>\n {children}\n </span>\n )\n }\n}\n","import { cx } from '@emotion/css'\nimport { ComponentPropsWithoutRef } from 'react'\nimport { RenderElementProps } from 'slate-react'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\nimport { Link } from '../../../../shared/Link'\nimport { Inline, InlineType } from '../../../../../slate'\n\nfunction StyledLink({ className, ...restOfProps }: ComponentPropsWithoutRef<typeof Link>) {\n return <Link {...restOfProps} className={cx(useStyle({ textDecoration: 'none' }), className)} />\n}\n\nexport interface InlineRenderElementProps extends RenderElementProps {\n element: Inline\n}\n\nexport function InlineElement({ element, attributes, children }: InlineRenderElementProps) {\n switch (element.type) {\n case InlineType.Code:\n return <code {...attributes}>{children}</code>\n case InlineType.SuperScript:\n return <sup {...attributes}>{children}</sup>\n case InlineType.SubScript:\n return <sub {...attributes}>{children}</sub>\n case InlineType.Link:\n return (\n <StyledLink {...attributes} link={element.link ?? undefined}>\n {children}\n </StyledLink>\n )\n }\n}\n","import { RenderElementProps } from 'slate-react'\nimport { BlockElement } from './block'\nimport { InlineElement } from './inline'\nimport { InlineType, BlockType } from '../../../../../slate'\n\nexport function Element({ element, ...props }: RenderElementProps) {\n switch (element.type) {\n case InlineType.Code:\n case InlineType.SuperScript:\n case InlineType.SubScript:\n case InlineType.Link:\n return <InlineElement element={element} {...props} />\n case BlockType.Text:\n case BlockType.Default:\n case BlockType.Paragraph:\n case BlockType.Heading1:\n case BlockType.Heading2:\n case BlockType.Heading3:\n case BlockType.Heading4:\n case BlockType.Heading5:\n case BlockType.Heading6:\n case BlockType.BlockQuote:\n case BlockType.OrderedList:\n case BlockType.UnorderedList:\n case BlockType.ListItem:\n case BlockType.ListItemChild:\n return <BlockElement element={element} {...props} />\n default:\n return <span {...props.attributes}>{props.children}</span>\n }\n}\n","import { useState, useEffect, useCallback } from 'react'\nimport { Editor } from 'slate'\nimport { richTextDTOtoDAO, richTextDTOtoSelection } from '../../../../controls'\nimport { RichTextValue } from '../../../../prop-controllers'\nimport deepEqual from '../../../../utils/deepEqual'\nimport { useIsInBuilder } from '../../../../runtimes/react'\n\nconst COMMIT_DEBOUNCE_DELAY = 500\n\n/**\n * Compare new prop value with current editor and update editor\n * if the values are not equal.\n */\nexport function useSyncWithBuilder(editor: Editor, text?: RichTextValue) {\n const [shouldCommit, setShouldCommit] = useState(true)\n const isInBuilder = useIsInBuilder()\n\n useEffect(() => {\n if (shouldCommit && text && isInBuilder) {\n const nextValue = richTextDTOtoDAO(text)\n const nextSelection = richTextDTOtoSelection(text)\n if (!deepEqual(editor.children, nextValue) || !deepEqual(editor.selection, nextSelection)) {\n editor.children = nextValue\n editor.selection = nextSelection\n editor.onChange()\n }\n }\n }, [editor, shouldCommit, text])\n\n useEffect(() => {\n if (shouldCommit) return\n\n const timeoutId = window.setTimeout(() => {\n setShouldCommit(true)\n }, COMMIT_DEBOUNCE_DELAY)\n\n return () => {\n window.clearTimeout(timeoutId)\n }\n }, [shouldCommit])\n\n return useCallback(() => setShouldCommit(false), [])\n}\n","import { ReactEditor } from 'slate-react'\nimport { useIsomorphicLayoutEffect } from '../../../hooks/useIsomorphicLayoutEffect'\nimport { Editor, Range as SlateRange } from 'slate'\n\n/**\n * Clicking outside of the host blurs our `<Editable />`.\n * `<Editable />` only updates the DOM's selection to match slate when it is focused.\n * In the case of a panel being clicked this hook updates the DOM selection to match slate.\n */\nexport function useSyncDOMSelection(editor: Editor, isEnabled: boolean) {\n useIsomorphicLayoutEffect(() => {\n if (!isEnabled || editor.selection == null || ReactEditor.isFocused(editor)) return\n try {\n const root = ReactEditor.findDocumentOrShadowRoot(editor) as Document\n const domSelection = root.getSelection()\n const newDomRange: Range | null = ReactEditor.toDOMRange(editor, editor.selection)\n\n if (newDomRange) {\n if (SlateRange.isBackward(editor.selection!)) {\n domSelection?.setBaseAndExtent(\n newDomRange.endContainer,\n newDomRange.endOffset,\n newDomRange.startContainer,\n newDomRange.startOffset,\n )\n } else {\n domSelection?.setBaseAndExtent(\n newDomRange.startContainer,\n newDomRange.startOffset,\n newDomRange.endContainer,\n newDomRange.endOffset,\n )\n }\n } else {\n domSelection?.removeAllRanges()\n }\n } catch (e) {\n console.error(e)\n }\n })\n}\n","import {\n FocusEvent,\n forwardRef,\n KeyboardEvent,\n Ref,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react'\n\nimport { createEditor } from 'slate'\nimport { Slate, Editable, withReact, ReactEditor } from 'slate-react'\n\nimport { ElementIDValue, RichTextValue } from '../../../../prop-controllers/descriptors'\nimport { cx } from '@emotion/css'\nimport { DescriptorsPropControllers } from '../../../../prop-controllers/instances'\nimport { Descriptors } from '../../../../runtimes/react/controls/rich-text'\nimport { getBox } from '../../../../box-model'\nimport { PropControllersHandle } from '../../../../state/modules/prop-controller-handles'\nimport { richTextDTOtoDAO } from '../../../../controls'\nimport { Leaf } from '../components/Leaf'\nimport { Element } from '../components/Element'\nimport { useSyncWithBuilder } from './useSyncWithBuilder'\nimport isHotkey from 'is-hotkey'\nimport { useBuilderEditMode } from '../../../../runtimes/react'\nimport { BuilderEditMode } from '../../../../state/modules/builder-edit-mode'\nimport { onKeyDown, withBlock, withTypography, withBuilder } from '../../../../slate'\nimport { pollBoxModel } from '../../../../runtimes/react/poll-box-model'\nimport { useSyncDOMSelection } from './useSyncDOMSelection'\nimport { RichTextDAO, BlockType } from '../../../../slate'\n\ntype Props = {\n id?: ElementIDValue\n text?: RichTextValue\n width?: string\n margin?: string\n}\n\nconst defaultText: RichTextDAO = [{ type: BlockType.Paragraph, children: [{ text: '' }] }]\n\nexport const EditableText = forwardRef(function EditableText(\n { id, text, width, margin }: Props,\n ref: Ref<PropControllersHandle<Descriptors>>,\n) {\n const [editor] = useState(() => withBlock(withTypography(withBuilder(withReact(createEditor())))))\n const [isPreservingDOMSElection, setIsPreservingDOMSelection] = useState(false)\n useSyncDOMSelection(editor, isPreservingDOMSElection)\n const delaySync = useSyncWithBuilder(editor, text)\n const editMode = useBuilderEditMode()\n\n const [propControllers, setPropControllers] =\n useState<DescriptorsPropControllers<Descriptors> | null>(null)\n const controller = propControllers?.text\n\n useEffect(() => {\n if (controller == null) return\n\n const element = ReactEditor.toDOMNode(editor, editor)\n\n return pollBoxModel({\n element,\n onBoxModelChange: boxModel => controller.changeBoxModel(boxModel),\n })\n }, [editor, controller])\n\n useImperativeHandle(\n ref,\n () => ({\n getDomNode() {\n return ReactEditor.toDOMNode(editor, editor)\n },\n getBoxModel() {\n return getBox(ReactEditor.toDOMNode(editor, editor))\n },\n setPropControllers,\n }),\n [editor, setPropControllers],\n )\n\n const initialValue = useMemo(() => (text ? richTextDTOtoDAO(text) : defaultText), [text])\n\n useEffect(() => {\n controller?.setSlateEditor(editor)\n }, [controller, editor])\n\n const handleFocus = useCallback(() => {\n controller?.focus()\n setIsPreservingDOMSelection(true)\n }, [controller])\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (isHotkey('mod+shift+z', e)) return controller?.redo()\n if (isHotkey('mod+z', e)) return controller?.undo()\n if (isHotkey('escape')(e)) return controller?.blur()\n onKeyDown(e, editor)\n },\n [controller, editor],\n )\n\n const handleBlur = useCallback((e: FocusEvent) => {\n // When clicking outside of the iframe (`relatedTarget` is null) we want to preserve the DOM selection.\n if (e.relatedTarget == null) return\n // Otherwise we want to deselect on blur and stop preserving selection.\n setIsPreservingDOMSelection(false)\n ReactEditor.deselect(editor)\n }, [])\n\n return (\n <Slate editor={editor} value={initialValue} onChange={delaySync}>\n <Editable\n id={id}\n renderLeaf={Leaf}\n renderElement={Element}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n className={cx(width, margin)}\n readOnly={editMode !== BuilderEditMode.CONTENT}\n placeholder=\"Write some text...\"\n />\n </Slate>\n )\n})\n\nexport default EditableText\n"],"names":["leaf","props","enhancedTypography","useEnhancedTypography","typography","typographyClassName","useTypographyClassName","attributes","children","element","blockStyles","useStyle","margin","useResponsiveStyle","textAlign","quoteStyles","padding","fontSize","fontWeight","borderLeft","type","BlockType","Text","cx","Default","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","BlockQuote","OrderedList","listStylePosition","UnorderedList","ListItem","ListItemChild","className","restOfProps","textDecoration","InlineType","Code","SuperScript","SubScript","Link","link","undefined","COMMIT_DEBOUNCE_DELAY","editor","text","shouldCommit","setShouldCommit","useState","isInBuilder","useIsInBuilder","useEffect","nextValue","richTextDTOtoDAO","nextSelection","richTextDTOtoSelection","deepEqual","selection","onChange","timeoutId","window","setTimeout","clearTimeout","useCallback","isEnabled","useIsomorphicLayoutEffect","ReactEditor","isFocused","root","findDocumentOrShadowRoot","domSelection","getSelection","newDomRange","toDOMRange","SlateRange","isBackward","setBaseAndExtent","endContainer","endOffset","startContainer","startOffset","removeAllRanges","e","console","error","defaultText","EditableText","forwardRef","id","width","ref","withBlock","withTypography","withBuilder","withReact","createEditor","isPreservingDOMSElection","setIsPreservingDOMSelection","useSyncDOMSelection","delaySync","useSyncWithBuilder","editMode","useBuilderEditMode","propControllers","setPropControllers","controller","toDOMNode","pollBoxModel","onBoxModelChange","boxModel","changeBoxModel","useImperativeHandle","getDomNode","getBoxModel","getBox","initialValue","useMemo","setSlateEditor","handleFocus","focus","handleKeyDown","isHotkey","redo","undo","blur","onKeyDown","handleBlur","relatedTarget","deselect","Leaf","Element","BuilderEditMode","CONTENT"],"mappings":";;;;;;;;;;;;;;;;;;;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