@nascentdigital/funnel-core 4.4.4

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 (368) hide show
  1. package/dist/app/AppConfig.d.ts +41 -0
  2. package/dist/app/AppConfig.js +93 -0
  3. package/dist/app/BrandConfig.d.ts +13 -0
  4. package/dist/app/BrandConfig.js +2 -0
  5. package/dist/app/FeaturesConfig.d.ts +6 -0
  6. package/dist/app/FeaturesConfig.js +2 -0
  7. package/dist/app/RegionsConfig.d.ts +43 -0
  8. package/dist/app/RegionsConfig.js +113 -0
  9. package/dist/app/UIConfig.d.ts +4 -0
  10. package/dist/app/UIConfig.js +2 -0
  11. package/dist/app/index.d.ts +5 -0
  12. package/dist/app/index.js +21 -0
  13. package/dist/consent/ConsentCategory.d.ts +12 -0
  14. package/dist/consent/ConsentCategory.js +28 -0
  15. package/dist/consent/ConsentService.d.ts +15 -0
  16. package/dist/consent/ConsentService.js +37 -0
  17. package/dist/consent/index.d.ts +2 -0
  18. package/dist/consent/index.js +18 -0
  19. package/dist/errors/IsometricError.d.ts +19 -0
  20. package/dist/errors/IsometricError.js +30 -0
  21. package/dist/errors/IsometricErrorModule.d.ts +11 -0
  22. package/dist/errors/IsometricErrorModule.js +2 -0
  23. package/dist/errors/IsometricErrorUtils.d.ts +9 -0
  24. package/dist/errors/IsometricErrorUtils.js +85 -0
  25. package/dist/errors/SerializedIsometricError.d.ts +10 -0
  26. package/dist/errors/SerializedIsometricError.js +15 -0
  27. package/dist/errors/api/ApiError.d.ts +15 -0
  28. package/dist/errors/api/ApiError.js +23 -0
  29. package/dist/errors/api/ApiErrors.d.ts +7 -0
  30. package/dist/errors/api/ApiErrors.js +67 -0
  31. package/dist/errors/api/ArgumentError.d.ts +7 -0
  32. package/dist/errors/api/ArgumentError.js +18 -0
  33. package/dist/errors/api/ConcurrencyError.d.ts +4 -0
  34. package/dist/errors/api/ConcurrencyError.js +11 -0
  35. package/dist/errors/api/ConflictError.d.ts +4 -0
  36. package/dist/errors/api/ConflictError.js +11 -0
  37. package/dist/errors/api/DependencyError.d.ts +4 -0
  38. package/dist/errors/api/DependencyError.js +11 -0
  39. package/dist/errors/api/IllegalStateError.d.ts +4 -0
  40. package/dist/errors/api/IllegalStateError.js +11 -0
  41. package/dist/errors/api/InvalidOperationError.d.ts +4 -0
  42. package/dist/errors/api/InvalidOperationError.js +11 -0
  43. package/dist/errors/api/NotAuthenticatedError.d.ts +4 -0
  44. package/dist/errors/api/NotAuthenticatedError.js +11 -0
  45. package/dist/errors/api/NotAuthorizedError.d.ts +4 -0
  46. package/dist/errors/api/NotAuthorizedError.js +11 -0
  47. package/dist/errors/api/NotAvailableError.d.ts +4 -0
  48. package/dist/errors/api/NotAvailableError.js +11 -0
  49. package/dist/errors/api/NotFoundError.d.ts +4 -0
  50. package/dist/errors/api/NotFoundError.js +11 -0
  51. package/dist/errors/api/NotImplementedError.d.ts +4 -0
  52. package/dist/errors/api/NotImplementedError.js +11 -0
  53. package/dist/errors/api/OfflineError.d.ts +4 -0
  54. package/dist/errors/api/OfflineError.js +11 -0
  55. package/dist/errors/api/RangeError.d.ts +4 -0
  56. package/dist/errors/api/RangeError.js +11 -0
  57. package/dist/errors/api/ServerError.d.ts +4 -0
  58. package/dist/errors/api/ServerError.js +11 -0
  59. package/dist/errors/api/TimeoutError.d.ts +4 -0
  60. package/dist/errors/api/TimeoutError.js +11 -0
  61. package/dist/errors/api/index.d.ts +16 -0
  62. package/dist/errors/api/index.js +32 -0
  63. package/dist/errors/index.d.ts +5 -0
  64. package/dist/errors/index.js +26 -0
  65. package/dist/forms/FormModel.d.ts +47 -0
  66. package/dist/forms/FormModel.js +149 -0
  67. package/dist/forms/Forms.d.ts +15 -0
  68. package/dist/forms/Forms.js +35 -0
  69. package/dist/forms/IFormService.d.ts +6 -0
  70. package/dist/forms/IFormService.js +2 -0
  71. package/dist/forms/TranslateSchema.d.ts +8 -0
  72. package/dist/forms/TranslateSchema.js +2 -0
  73. package/dist/forms/index.d.ts +4 -0
  74. package/dist/forms/index.js +20 -0
  75. package/dist/index.d.ts +10 -0
  76. package/dist/index.js +49 -0
  77. package/dist/regionalization/Country.d.ts +266 -0
  78. package/dist/regionalization/Country.js +338 -0
  79. package/dist/regionalization/Language.d.ts +199 -0
  80. package/dist/regionalization/Language.js +237 -0
  81. package/dist/regionalization/Locale.d.ts +28 -0
  82. package/dist/regionalization/Locale.js +49 -0
  83. package/dist/regionalization/Localized.d.ts +10 -0
  84. package/dist/regionalization/Localized.js +36 -0
  85. package/dist/regionalization/LocalizedCopy.d.ts +9 -0
  86. package/dist/regionalization/LocalizedCopy.js +26 -0
  87. package/dist/regionalization/Regionalization.d.ts +50 -0
  88. package/dist/regionalization/Regionalization.js +260 -0
  89. package/dist/regionalization/Regions.d.ts +2 -0
  90. package/dist/regionalization/Regions.js +2 -0
  91. package/dist/regionalization/index.d.ts +7 -0
  92. package/dist/regionalization/index.js +23 -0
  93. package/dist/schema/Asset.d.ts +23 -0
  94. package/dist/schema/Asset.js +36 -0
  95. package/dist/schema/AssetScope.d.ts +75 -0
  96. package/dist/schema/AssetScope.js +146 -0
  97. package/dist/schema/Block.d.ts +105 -0
  98. package/dist/schema/Block.js +122 -0
  99. package/dist/schema/ChangeSet.d.ts +108 -0
  100. package/dist/schema/ChangeSet.js +187 -0
  101. package/dist/schema/Collection.d.ts +197 -0
  102. package/dist/schema/Collection.js +165 -0
  103. package/dist/schema/CollectionModel.d.ts +30 -0
  104. package/dist/schema/CollectionModel.js +383 -0
  105. package/dist/schema/CollectionSnapshot.d.ts +11 -0
  106. package/dist/schema/CollectionSnapshot.js +12 -0
  107. package/dist/schema/Fields.d.ts +31 -0
  108. package/dist/schema/Fields.js +21 -0
  109. package/dist/schema/Form.d.ts +31 -0
  110. package/dist/schema/Form.js +23 -0
  111. package/dist/schema/LinkedCollectionModel.d.ts +9 -0
  112. package/dist/schema/LinkedCollectionModel.js +19 -0
  113. package/dist/schema/LinkedData.d.ts +44 -0
  114. package/dist/schema/LinkedData.js +288 -0
  115. package/dist/schema/LinkedPageModel.d.ts +11 -0
  116. package/dist/schema/LinkedPageModel.js +26 -0
  117. package/dist/schema/Optional.d.ts +23 -0
  118. package/dist/schema/Optional.js +34 -0
  119. package/dist/schema/Page.d.ts +299 -0
  120. package/dist/schema/Page.js +244 -0
  121. package/dist/schema/PageModel.d.ts +58 -0
  122. package/dist/schema/PageModel.js +881 -0
  123. package/dist/schema/PageQuery.d.ts +60 -0
  124. package/dist/schema/PageQuery.js +116 -0
  125. package/dist/schema/PageRoute.d.ts +7 -0
  126. package/dist/schema/PageRoute.js +48 -0
  127. package/dist/schema/PageSnapshot.d.ts +11 -0
  128. package/dist/schema/PageSnapshot.js +12 -0
  129. package/dist/schema/Section.d.ts +71 -0
  130. package/dist/schema/Section.js +35 -0
  131. package/dist/schema/Seo.d.ts +13 -0
  132. package/dist/schema/Seo.js +25 -0
  133. package/dist/schema/Site.d.ts +40 -0
  134. package/dist/schema/Site.js +87 -0
  135. package/dist/schema/SiteModel.d.ts +5 -0
  136. package/dist/schema/SiteModel.js +10 -0
  137. package/dist/schema/Tag.d.ts +28 -0
  138. package/dist/schema/Tag.js +59 -0
  139. package/dist/schema/TagGroup.d.ts +26 -0
  140. package/dist/schema/TagGroup.js +64 -0
  141. package/dist/schema/field/Field.d.ts +179 -0
  142. package/dist/schema/field/Field.js +309 -0
  143. package/dist/schema/field/base/AssetField.d.ts +148 -0
  144. package/dist/schema/field/base/AssetField.js +206 -0
  145. package/dist/schema/field/base/BooleanField.d.ts +21 -0
  146. package/dist/schema/field/base/BooleanField.js +38 -0
  147. package/dist/schema/field/base/CollectionField.d.ts +34 -0
  148. package/dist/schema/field/base/CollectionField.js +85 -0
  149. package/dist/schema/field/base/DateField.d.ts +21 -0
  150. package/dist/schema/field/base/DateField.js +37 -0
  151. package/dist/schema/field/base/DynamicPagesField.d.ts +36 -0
  152. package/dist/schema/field/base/DynamicPagesField.js +50 -0
  153. package/dist/schema/field/base/EmbeddedVideoField.d.ts +45 -0
  154. package/dist/schema/field/base/EmbeddedVideoField.js +176 -0
  155. package/dist/schema/field/base/EnumField.d.ts +40 -0
  156. package/dist/schema/field/base/EnumField.js +131 -0
  157. package/dist/schema/field/base/FormField.d.ts +25 -0
  158. package/dist/schema/field/base/FormField.js +48 -0
  159. package/dist/schema/field/base/LinkField.d.ts +103 -0
  160. package/dist/schema/field/base/LinkField.js +201 -0
  161. package/dist/schema/field/base/PageField.d.ts +46 -0
  162. package/dist/schema/field/base/PageField.js +83 -0
  163. package/dist/schema/field/base/RichTextField.d.ts +71 -0
  164. package/dist/schema/field/base/RichTextField.js +196 -0
  165. package/dist/schema/field/base/TextField.d.ts +33 -0
  166. package/dist/schema/field/base/TextField.js +86 -0
  167. package/dist/schema/field/base/TimestampField.d.ts +25 -0
  168. package/dist/schema/field/base/TimestampField.js +41 -0
  169. package/dist/schema/field/base/index.d.ts +13 -0
  170. package/dist/schema/field/base/index.js +29 -0
  171. package/dist/schema/field/composite/ListField.d.ts +47 -0
  172. package/dist/schema/field/composite/ListField.js +107 -0
  173. package/dist/schema/field/composite/ObjectField.d.ts +56 -0
  174. package/dist/schema/field/composite/ObjectField.js +19 -0
  175. package/dist/schema/field/composite/index.d.ts +2 -0
  176. package/dist/schema/field/composite/index.js +18 -0
  177. package/dist/schema/field/index.d.ts +3 -0
  178. package/dist/schema/field/index.js +19 -0
  179. package/dist/schema/index.d.ts +25 -0
  180. package/dist/schema/index.js +41 -0
  181. package/dist/services/EventBus.d.ts +17 -0
  182. package/dist/services/EventBus.js +37 -0
  183. package/dist/services/humanVerification/IHumanVerification.d.ts +8 -0
  184. package/dist/services/humanVerification/IHumanVerification.js +2 -0
  185. package/dist/services/humanVerification/index.d.ts +1 -0
  186. package/dist/services/humanVerification/index.js +17 -0
  187. package/dist/services/index.d.ts +3 -0
  188. package/dist/services/index.js +19 -0
  189. package/dist/services/leadGen/Contact.d.ts +40 -0
  190. package/dist/services/leadGen/Contact.js +38 -0
  191. package/dist/services/leadGen/ILeadGen.d.ts +16 -0
  192. package/dist/services/leadGen/ILeadGen.js +2 -0
  193. package/dist/services/leadGen/index.d.ts +2 -0
  194. package/dist/services/leadGen/index.js +18 -0
  195. package/dist/types/BoxedValue.d.ts +3 -0
  196. package/dist/types/BoxedValue.js +2 -0
  197. package/dist/types/Callback.d.ts +9 -0
  198. package/dist/types/Callback.js +2 -0
  199. package/dist/types/DateString.d.ts +35 -0
  200. package/dist/types/DateString.js +172 -0
  201. package/dist/types/FilterConditionally.d.ts +3 -0
  202. package/dist/types/FilterConditionally.js +2 -0
  203. package/dist/types/MaybeConditionalValue.d.ts +8 -0
  204. package/dist/types/MaybeConditionalValue.js +12 -0
  205. package/dist/types/Ordinal.d.ts +17 -0
  206. package/dist/types/Ordinal.js +38 -0
  207. package/dist/types/OverridableStringUnion.d.ts +2 -0
  208. package/dist/types/OverridableStringUnion.js +2 -0
  209. package/dist/types/PartialBy.d.ts +1 -0
  210. package/dist/types/PartialBy.js +2 -0
  211. package/dist/types/PickData.d.ts +6 -0
  212. package/dist/types/PickData.js +2 -0
  213. package/dist/types/Provider.d.ts +4 -0
  214. package/dist/types/Provider.js +2 -0
  215. package/dist/types/RequiredBy.d.ts +1 -0
  216. package/dist/types/RequiredBy.js +2 -0
  217. package/dist/types/Result.d.ts +16 -0
  218. package/dist/types/Result.js +2 -0
  219. package/dist/types/Timestamp.d.ts +17 -0
  220. package/dist/types/Timestamp.js +57 -0
  221. package/dist/types/Transform.d.ts +4 -0
  222. package/dist/types/Transform.js +2 -0
  223. package/dist/types/index.d.ts +14 -0
  224. package/dist/types/index.js +30 -0
  225. package/dist/ui/Accessible.d.ts +5 -0
  226. package/dist/ui/Accessible.js +15 -0
  227. package/dist/ui/BlockThemes.d.ts +19 -0
  228. package/dist/ui/BlockThemes.js +29 -0
  229. package/dist/ui/ColorMode.d.ts +12 -0
  230. package/dist/ui/ColorMode.js +49 -0
  231. package/dist/ui/File.d.ts +43 -0
  232. package/dist/ui/File.js +55 -0
  233. package/dist/ui/FileType.d.ts +8 -0
  234. package/dist/ui/FileType.js +48 -0
  235. package/dist/ui/ImageSource.d.ts +12 -0
  236. package/dist/ui/ImageSource.js +48 -0
  237. package/dist/ui/MimeType.d.ts +28 -0
  238. package/dist/ui/MimeType.js +110 -0
  239. package/dist/ui/Placement.d.ts +21 -0
  240. package/dist/ui/Placement.js +135 -0
  241. package/dist/ui/Position.d.ts +6 -0
  242. package/dist/ui/Position.js +42 -0
  243. package/dist/ui/Selector.d.ts +6 -0
  244. package/dist/ui/Selector.js +23 -0
  245. package/dist/ui/SemanticColor.d.ts +8 -0
  246. package/dist/ui/SemanticColor.js +237 -0
  247. package/dist/ui/Visual.d.ts +24 -0
  248. package/dist/ui/Visual.js +66 -0
  249. package/dist/ui/block-layout/BlockLayout.d.ts +99 -0
  250. package/dist/ui/block-layout/BlockLayout.js +286 -0
  251. package/dist/ui/block-layout/index.d.ts +1 -0
  252. package/dist/ui/block-layout/index.js +17 -0
  253. package/dist/ui/browser/BlurHasher.d.ts +13 -0
  254. package/dist/ui/browser/BlurHasher.js +76 -0
  255. package/dist/ui/browser/Browser.d.ts +107 -0
  256. package/dist/ui/browser/Browser.js +313 -0
  257. package/dist/ui/browser/ImageProxy.d.ts +30 -0
  258. package/dist/ui/browser/ImageProxy.js +132 -0
  259. package/dist/ui/browser/InputEvent.d.ts +13 -0
  260. package/dist/ui/browser/InputEvent.js +2 -0
  261. package/dist/ui/browser/SVGProxy.d.ts +9 -0
  262. package/dist/ui/browser/SVGProxy.js +59 -0
  263. package/dist/ui/browser/VideoProxy.d.ts +42 -0
  264. package/dist/ui/browser/VideoProxy.js +235 -0
  265. package/dist/ui/browser/index.d.ts +6 -0
  266. package/dist/ui/browser/index.js +22 -0
  267. package/dist/ui/fields/Field.d.ts +80 -0
  268. package/dist/ui/fields/Field.js +298 -0
  269. package/dist/ui/fields/FieldList.d.ts +80 -0
  270. package/dist/ui/fields/FieldList.js +421 -0
  271. package/dist/ui/fields/FieldListValidator.d.ts +9 -0
  272. package/dist/ui/fields/FieldListValidator.js +37 -0
  273. package/dist/ui/fields/FieldModel.d.ts +15 -0
  274. package/dist/ui/fields/FieldModel.js +28 -0
  275. package/dist/ui/fields/FieldSerializer.d.ts +13 -0
  276. package/dist/ui/fields/FieldSerializer.js +71 -0
  277. package/dist/ui/fields/FieldValidator.d.ts +19 -0
  278. package/dist/ui/fields/FieldValidator.js +98 -0
  279. package/dist/ui/fields/ObjectField.d.ts +75 -0
  280. package/dist/ui/fields/ObjectField.js +288 -0
  281. package/dist/ui/fields/errors.json +44 -0
  282. package/dist/ui/fields/index.d.ts +7 -0
  283. package/dist/ui/fields/index.js +23 -0
  284. package/dist/ui/fields/validators/AssetValidator.d.ts +9 -0
  285. package/dist/ui/fields/validators/AssetValidator.js +25 -0
  286. package/dist/ui/fields/validators/DateValidator.d.ts +9 -0
  287. package/dist/ui/fields/validators/DateValidator.js +41 -0
  288. package/dist/ui/fields/validators/EnumValidator.d.ts +10 -0
  289. package/dist/ui/fields/validators/EnumValidator.js +77 -0
  290. package/dist/ui/fields/validators/GenericValidator.d.ts +6 -0
  291. package/dist/ui/fields/validators/GenericValidator.js +22 -0
  292. package/dist/ui/fields/validators/LinkValidator.d.ts +9 -0
  293. package/dist/ui/fields/validators/LinkValidator.js +146 -0
  294. package/dist/ui/fields/validators/RichTextValidator.d.ts +6 -0
  295. package/dist/ui/fields/validators/RichTextValidator.js +35 -0
  296. package/dist/ui/fields/validators/TextValidator.d.ts +10 -0
  297. package/dist/ui/fields/validators/TextValidator.js +138 -0
  298. package/dist/ui/fields/validators/TimestampValidator.d.ts +9 -0
  299. package/dist/ui/fields/validators/TimestampValidator.js +41 -0
  300. package/dist/ui/fields/validators/ValidatorHelper.d.ts +23 -0
  301. package/dist/ui/fields/validators/ValidatorHelper.js +55 -0
  302. package/dist/ui/fields/validators/index.d.ts +8 -0
  303. package/dist/ui/fields/validators/index.js +24 -0
  304. package/dist/ui/geometry/AspectRatio.d.ts +27 -0
  305. package/dist/ui/geometry/AspectRatio.js +77 -0
  306. package/dist/ui/geometry/Bounds.d.ts +4 -0
  307. package/dist/ui/geometry/Bounds.js +11 -0
  308. package/dist/ui/geometry/Frame.d.ts +3 -0
  309. package/dist/ui/geometry/Frame.js +2 -0
  310. package/dist/ui/geometry/Insets.d.ts +14 -0
  311. package/dist/ui/geometry/Insets.js +14 -0
  312. package/dist/ui/geometry/PixelSize.d.ts +1 -0
  313. package/dist/ui/geometry/PixelSize.js +2 -0
  314. package/dist/ui/geometry/Point.d.ts +7 -0
  315. package/dist/ui/geometry/Point.js +15 -0
  316. package/dist/ui/geometry/Rect.d.ts +19 -0
  317. package/dist/ui/geometry/Rect.js +68 -0
  318. package/dist/ui/geometry/ScreenSize.d.ts +1 -0
  319. package/dist/ui/geometry/ScreenSize.js +2 -0
  320. package/dist/ui/geometry/Size.d.ts +7 -0
  321. package/dist/ui/geometry/Size.js +9 -0
  322. package/dist/ui/geometry/index.d.ts +9 -0
  323. package/dist/ui/geometry/index.js +25 -0
  324. package/dist/ui/index.d.ts +18 -0
  325. package/dist/ui/index.js +34 -0
  326. package/dist/ui/responsive/Breakpoint.d.ts +8 -0
  327. package/dist/ui/responsive/Breakpoint.js +24 -0
  328. package/dist/ui/responsive/BreakpointObserver.d.ts +16 -0
  329. package/dist/ui/responsive/BreakpointObserver.js +104 -0
  330. package/dist/ui/responsive/Breakpoints.d.ts +5 -0
  331. package/dist/ui/responsive/Breakpoints.js +15 -0
  332. package/dist/ui/responsive/ResponsiveValue.d.ts +7 -0
  333. package/dist/ui/responsive/ResponsiveValue.js +26 -0
  334. package/dist/ui/responsive/index.d.ts +4 -0
  335. package/dist/ui/responsive/index.js +20 -0
  336. package/dist/ui/richtext/LexicalUtils.d.ts +31 -0
  337. package/dist/ui/richtext/LexicalUtils.js +314 -0
  338. package/dist/ui/richtext/StyledTextNode.d.ts +33 -0
  339. package/dist/ui/richtext/StyledTextNode.js +101 -0
  340. package/dist/ui/richtext/index.d.ts +2 -0
  341. package/dist/ui/richtext/index.js +18 -0
  342. package/dist/utils/ArrayUtils.d.ts +17 -0
  343. package/dist/utils/ArrayUtils.js +66 -0
  344. package/dist/utils/ByteSize.d.ts +19 -0
  345. package/dist/utils/ByteSize.js +33 -0
  346. package/dist/utils/DateUtils.d.ts +15 -0
  347. package/dist/utils/DateUtils.js +100 -0
  348. package/dist/utils/Deferral.d.ts +28 -0
  349. package/dist/utils/Deferral.js +107 -0
  350. package/dist/utils/Duration.d.ts +7 -0
  351. package/dist/utils/Duration.js +35 -0
  352. package/dist/utils/Fn.d.ts +14 -0
  353. package/dist/utils/Fn.js +52 -0
  354. package/dist/utils/ObjectUtils.d.ts +89 -0
  355. package/dist/utils/ObjectUtils.js +159 -0
  356. package/dist/utils/Random.d.ts +15 -0
  357. package/dist/utils/Random.js +72 -0
  358. package/dist/utils/StringUtils.d.ts +10 -0
  359. package/dist/utils/StringUtils.js +51 -0
  360. package/dist/utils/UrlUtils.d.ts +22 -0
  361. package/dist/utils/UrlUtils.js +119 -0
  362. package/dist/utils/Value.d.ts +23 -0
  363. package/dist/utils/Value.js +122 -0
  364. package/dist/utils/index.d.ts +12 -0
  365. package/dist/utils/index.js +28 -0
  366. package/dist/utils/isDefined.d.ts +1 -0
  367. package/dist/utils/isDefined.js +6 -0
  368. package/package.json +64 -0
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AspectRatio = void 0;
4
+ // class
5
+ const errors_1 = require("../../errors");
6
+ class AspectRatio {
7
+ constructor(value) {
8
+ // normalize value
9
+ const { width, height } = AspectRatio.Data.parse(value);
10
+ // initialize instance variables
11
+ this.width = width;
12
+ this.height = height;
13
+ }
14
+ get ratio() {
15
+ const { width, height } = this;
16
+ return width / height;
17
+ }
18
+ isSimilarTo(that) {
19
+ const threshold = 0.005;
20
+ return Math.abs(this.ratio - that.ratio) < threshold;
21
+ }
22
+ toString() {
23
+ const { width, height } = this;
24
+ return `${width.toFixed()}:${height.toFixed()}`;
25
+ }
26
+ }
27
+ exports.AspectRatio = AspectRatio;
28
+ // extension
29
+ (function (AspectRatio) {
30
+ let Data;
31
+ (function (Data) {
32
+ // helpers
33
+ function parse(value) {
34
+ // handle tuple form
35
+ if (Array.isArray(value)) {
36
+ return Tuple.parse(value);
37
+ }
38
+ // or handle data form
39
+ else if (typeof value === 'object') {
40
+ return value;
41
+ }
42
+ // otherwise try to parse string
43
+ else if (String.filter(value)) {
44
+ return String.parse(value);
45
+ }
46
+ // or throw
47
+ else {
48
+ throw new errors_1.ArgumentError(`Invalid AspectRatio "${value}"`);
49
+ }
50
+ }
51
+ Data.parse = parse;
52
+ })(Data = AspectRatio.Data || (AspectRatio.Data = {}));
53
+ let String;
54
+ (function (String) {
55
+ // helper
56
+ function filter(value) {
57
+ return /^[1-9]\d?:[1-9]\d?$/.test(value);
58
+ }
59
+ String.filter = filter;
60
+ function parse(value) {
61
+ const [widthValue, heightValue] = value.split(':');
62
+ return {
63
+ width: Number.parseInt(widthValue),
64
+ height: Number.parseInt(heightValue)
65
+ };
66
+ }
67
+ String.parse = parse;
68
+ })(String = AspectRatio.String || (AspectRatio.String = {}));
69
+ let Tuple;
70
+ (function (Tuple) {
71
+ // helper
72
+ function parse([width, height]) {
73
+ return { width, height };
74
+ }
75
+ Tuple.parse = parse;
76
+ })(Tuple = AspectRatio.Tuple || (AspectRatio.Tuple = {}));
77
+ })(AspectRatio || (exports.AspectRatio = AspectRatio = {}));
@@ -0,0 +1,4 @@
1
+ import { Rect } from './Rect';
2
+ export declare class Bounds extends Rect {
3
+ constructor(width: number, height: number);
4
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Bounds = void 0;
4
+ const Rect_1 = require("./Rect");
5
+ // class
6
+ class Bounds extends Rect_1.Rect {
7
+ constructor(width, height) {
8
+ super(0, 0, width, height);
9
+ }
10
+ }
11
+ exports.Bounds = Bounds;
@@ -0,0 +1,3 @@
1
+ import { Insets } from './Insets';
2
+ import { Size } from './Size';
3
+ export type Frame = Insets & Size;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export type Insets = {
2
+ top: number;
3
+ right: number;
4
+ bottom: number;
5
+ left: number;
6
+ };
7
+ export declare namespace Insets {
8
+ const none: Readonly<Insets>;
9
+ type AsText = `${AsText.Format}` | `${AsText.Format} ${AsText.Format}` | `${AsText.Format} ${AsText.Format} ${AsText.Format} ${AsText.Format}`;
10
+ namespace AsText {
11
+ type Format = `${number}${'px' | '%'}`;
12
+ }
13
+ function asText({ top, right, bottom, left }: Insets): AsText;
14
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Insets = void 0;
4
+ // extension
5
+ var Insets;
6
+ (function (Insets) {
7
+ // constants
8
+ Insets.none = { top: 0, right: 0, bottom: 0, left: 0 };
9
+ // helpers
10
+ function asText({ top, right, bottom, left }) {
11
+ return `${top}px ${right}px ${bottom}px ${left}px`;
12
+ }
13
+ Insets.asText = asText;
14
+ })(Insets || (exports.Insets = Insets = {}));
@@ -0,0 +1 @@
1
+ export type PixelSize = `${number}px`;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export declare class Point {
2
+ readonly x: number;
3
+ readonly y: number;
4
+ static readonly origin: Point;
5
+ constructor(x: number, y: number);
6
+ distanceTo(point: Point): number;
7
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Point = void 0;
4
+ // class
5
+ class Point {
6
+ constructor(x, y) {
7
+ this.x = x;
8
+ this.y = y;
9
+ }
10
+ distanceTo(point) {
11
+ return Math.hypot(this.x - point.x, this.y - point.y);
12
+ }
13
+ }
14
+ exports.Point = Point;
15
+ Point.origin = new Point(0, 0);
@@ -0,0 +1,19 @@
1
+ import { Insets } from './Insets';
2
+ import { Point } from './Point';
3
+ export declare class Rect {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ readonly width: number;
7
+ readonly height: number;
8
+ constructor(x: number, y: number, width: number, height: number);
9
+ get top(): number;
10
+ get bottom(): number;
11
+ get left(): number;
12
+ get right(): number;
13
+ get center(): Point;
14
+ contains(that: Rect): boolean;
15
+ overlaps(that: Rect): boolean;
16
+ touches(that: Rect): boolean;
17
+ static fromInsets(insets: Insets): Rect;
18
+ static fromRect({ x, y, width, height }: Pick<Rect, 'x' | 'y' | 'width' | 'height'>): Rect;
19
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Rect = void 0;
4
+ const Point_1 = require("./Point");
5
+ class Rect {
6
+ constructor(x, y, width, height) {
7
+ this.x = x;
8
+ this.y = y;
9
+ this.width = width;
10
+ this.height = height;
11
+ }
12
+ get top() {
13
+ return this.y;
14
+ }
15
+ get bottom() {
16
+ return this.y + this.height;
17
+ }
18
+ get left() {
19
+ return this.x;
20
+ }
21
+ get right() {
22
+ return this.x + this.width;
23
+ }
24
+ get center() {
25
+ return new Point_1.Point(this.x + this.width / 2, this.y + this.height / 2);
26
+ }
27
+ contains(that) {
28
+ return !(that.x < this.x ||
29
+ that.y < this.y ||
30
+ (that.x + that.width) > (this.x + this.width) ||
31
+ (that.y + that.height) > (this.y + this.height));
32
+ }
33
+ overlaps(that) {
34
+ // no horizontal overlap
35
+ if (this.x >= (that.x + that.width) || that.x >= (this.x + this.width)) {
36
+ return false;
37
+ }
38
+ // no vertical overlap
39
+ else if (this.y >= (that.y + that.height) || that.y >= (this.y + this.height)) {
40
+ return false;
41
+ }
42
+ // otherwise they must overlap
43
+ else {
44
+ return true;
45
+ }
46
+ }
47
+ touches(that) {
48
+ // has horizontal gap
49
+ if (this.x > (that.x + that.width) || that.x > (this.x + this.width)) {
50
+ return false;
51
+ }
52
+ // has vertical gap
53
+ else if (this.y > (that.y + that.height) || that.y > (this.y + this.height)) {
54
+ return false;
55
+ }
56
+ // otherwise there's no gap
57
+ else {
58
+ return true;
59
+ }
60
+ }
61
+ static fromInsets(insets) {
62
+ return new Rect(insets.left, insets.top, insets.right - insets.left, insets.bottom - insets.top);
63
+ }
64
+ static fromRect({ x, y, width, height }) {
65
+ return new Rect(x, y, width, height);
66
+ }
67
+ }
68
+ exports.Rect = Rect;
@@ -0,0 +1 @@
1
+ export type ScreenSize = 'mobile' | 'desktop';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export type Size = {
2
+ width: number;
3
+ height: number;
4
+ };
5
+ export declare namespace Size {
6
+ const none: Readonly<Size>;
7
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Size = void 0;
4
+ // extension
5
+ var Size;
6
+ (function (Size) {
7
+ // constants
8
+ Size.none = { width: 0, height: 0 };
9
+ })(Size || (exports.Size = Size = {}));
@@ -0,0 +1,9 @@
1
+ export * from './AspectRatio';
2
+ export * from './Bounds';
3
+ export * from './Frame';
4
+ export * from './Insets';
5
+ export * from './PixelSize';
6
+ export * from './Point';
7
+ export * from './Rect';
8
+ export * from './ScreenSize';
9
+ export * from './Size';
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AspectRatio"), exports);
18
+ __exportStar(require("./Bounds"), exports);
19
+ __exportStar(require("./Frame"), exports);
20
+ __exportStar(require("./Insets"), exports);
21
+ __exportStar(require("./PixelSize"), exports);
22
+ __exportStar(require("./Point"), exports);
23
+ __exportStar(require("./Rect"), exports);
24
+ __exportStar(require("./ScreenSize"), exports);
25
+ __exportStar(require("./Size"), exports);
@@ -0,0 +1,18 @@
1
+ export * from './block-layout';
2
+ export * from './browser/index';
3
+ export * from './fields';
4
+ export * from './geometry';
5
+ export * from './responsive';
6
+ export * from './richtext';
7
+ export * from './Accessible';
8
+ export * from './BlockThemes';
9
+ export * from './ColorMode';
10
+ export * from './ImageSource';
11
+ export * from './File';
12
+ export * from './FileType';
13
+ export * from './MimeType';
14
+ export * from './Placement';
15
+ export * from './Position';
16
+ export * from './Selector';
17
+ export * from './SemanticColor';
18
+ export * from './Visual';
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./block-layout"), exports);
18
+ __exportStar(require("./browser/index"), exports);
19
+ __exportStar(require("./fields"), exports);
20
+ __exportStar(require("./geometry"), exports);
21
+ __exportStar(require("./responsive"), exports);
22
+ __exportStar(require("./richtext"), exports);
23
+ __exportStar(require("./Accessible"), exports);
24
+ __exportStar(require("./BlockThemes"), exports);
25
+ __exportStar(require("./ColorMode"), exports);
26
+ __exportStar(require("./ImageSource"), exports);
27
+ __exportStar(require("./File"), exports);
28
+ __exportStar(require("./FileType"), exports);
29
+ __exportStar(require("./MimeType"), exports);
30
+ __exportStar(require("./Placement"), exports);
31
+ __exportStar(require("./Position"), exports);
32
+ __exportStar(require("./Selector"), exports);
33
+ __exportStar(require("./SemanticColor"), exports);
34
+ __exportStar(require("./Visual"), exports);
@@ -0,0 +1,8 @@
1
+ export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+ export type BreakpointStates = Record<Breakpoint, boolean>;
3
+ export declare namespace Breakpoint {
4
+ const values: ReadonlyArray<Breakpoint>;
5
+ const last: Breakpoint;
6
+ function test(value: string): value is Breakpoint;
7
+ function compare(lhs: Breakpoint, rhs: Breakpoint): number;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Breakpoint = void 0;
4
+ // extensions
5
+ var Breakpoint;
6
+ (function (Breakpoint) {
7
+ // constants
8
+ Breakpoint.values = ['xs', 'sm', 'md', 'lg', 'xl'];
9
+ Breakpoint.last = Breakpoint.values[Breakpoint.values.length - 1];
10
+ // helpers
11
+ function test(value) {
12
+ return Breakpoint.values.includes(value);
13
+ }
14
+ Breakpoint.test = test;
15
+ function compare(lhs, rhs) {
16
+ // skip if same
17
+ if (lhs === rhs) {
18
+ return 0;
19
+ }
20
+ // otherwise return based on index
21
+ return Breakpoint.values.indexOf(lhs) < Breakpoint.values.indexOf(rhs) ? -1 : 1;
22
+ }
23
+ Breakpoint.compare = compare;
24
+ })(Breakpoint || (exports.Breakpoint = Breakpoint = {}));
@@ -0,0 +1,16 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Breakpoint } from './Breakpoint';
3
+ import { Breakpoints } from './Breakpoints';
4
+ export declare class BreakpointObserver {
5
+ private _configurations;
6
+ private _current;
7
+ private _current$;
8
+ private _disposed;
9
+ constructor(breakpoints: Breakpoints);
10
+ get current(): Breakpoint | undefined;
11
+ get current$(): Observable<Breakpoint>;
12
+ get disposed(): boolean;
13
+ dispose(): void;
14
+ private setCurrent;
15
+ private bindBreakpoint;
16
+ }
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BreakpointObserver = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const utils_1 = require("../../utils");
6
+ const Browser_1 = require("../browser/Browser");
7
+ const Breakpoint_1 = require("./Breakpoint");
8
+ // class
9
+ class BreakpointObserver {
10
+ constructor(breakpoints) {
11
+ // create configurations
12
+ const breakpointEntries = Object.entries(breakpoints)
13
+ .sort(([lhs], [rhs]) => Breakpoint_1.Breakpoint.compare(lhs, rhs));
14
+ const lastBreakpointIndex = breakpointEntries.length - 1;
15
+ this._configurations = breakpointEntries
16
+ .map(([breakpoint, start], index) => ({
17
+ breakpoint,
18
+ start,
19
+ end: index < lastBreakpointIndex
20
+ ? breakpointEntries[index + 1][1] - 1
21
+ : undefined
22
+ }));
23
+ // initialize instance variables
24
+ this._current = undefined;
25
+ this._current$ = new rxjs_1.BehaviorSubject(undefined);
26
+ this._disposed = false;
27
+ // bind breakpoints
28
+ this._configurations.forEach(configuration => {
29
+ // initialize media query callback
30
+ const breakpoint = configuration.breakpoint;
31
+ configuration.mediaQueryCallback = (e) => {
32
+ // update if matches and not current
33
+ if (e.matches) {
34
+ this.setCurrent(breakpoint);
35
+ }
36
+ };
37
+ // bind breakpoint (indirectly updates to matching breakpoint)
38
+ this.bindBreakpoint(configuration);
39
+ });
40
+ }
41
+ get current() {
42
+ return this._current;
43
+ }
44
+ get current$() {
45
+ return this._current$
46
+ .pipe((0, rxjs_1.filter)(utils_1.isDefinedStrict));
47
+ }
48
+ get disposed() {
49
+ return this._disposed;
50
+ }
51
+ dispose() {
52
+ // mark disposed
53
+ this._disposed = true;
54
+ // clear all configurations
55
+ this._configurations.forEach(configuration => {
56
+ // remove listener (if any)
57
+ if (configuration.mediaQuery !== undefined) {
58
+ configuration.mediaQuery.removeEventListener('change', configuration.mediaQueryCallback);
59
+ }
60
+ // reset
61
+ delete configuration.mediaQuery;
62
+ delete configuration.mediaQueryCallback;
63
+ });
64
+ // clear configurations
65
+ this._configurations = [];
66
+ }
67
+ setCurrent(breakpoint) {
68
+ if (this._current !== breakpoint) {
69
+ this._current = breakpoint;
70
+ this._current$.next(breakpoint);
71
+ }
72
+ }
73
+ bindBreakpoint(configuration) {
74
+ // skip if in the backend
75
+ if (!Browser_1.Browser.available) {
76
+ return;
77
+ }
78
+ // unbind previous media query (if any)
79
+ if (configuration.mediaQuery !== undefined) {
80
+ configuration.mediaQuery.removeEventListener('change', configuration.mediaQueryCallback);
81
+ }
82
+ // create last breakpoint query
83
+ let mediaQuery;
84
+ if (configuration.end === undefined) {
85
+ mediaQuery = `(min-width: ${configuration.start}px)`;
86
+ }
87
+ // or create first breakpoint query
88
+ else if (configuration.start === 0) {
89
+ mediaQuery = `(max-width: ${configuration.end}px)`;
90
+ }
91
+ // or create bounded breakpoint query
92
+ else {
93
+ mediaQuery = `(min-width: ${configuration.start}px) and (max-width: ${configuration.end}px)`;
94
+ }
95
+ // bind new media query
96
+ configuration.mediaQuery = window.matchMedia(mediaQuery);
97
+ configuration.mediaQuery.addEventListener('change', configuration.mediaQueryCallback);
98
+ // update breakpoint if matching
99
+ if (configuration.mediaQuery.matches) {
100
+ this.setCurrent(configuration.breakpoint);
101
+ }
102
+ }
103
+ }
104
+ exports.BreakpointObserver = BreakpointObserver;
@@ -0,0 +1,5 @@
1
+ import { ResponsiveValue } from './ResponsiveValue';
2
+ export type Breakpoints = ResponsiveValue<number>;
3
+ export declare namespace Breakpoints {
4
+ const defaults: Readonly<Breakpoints>;
5
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Breakpoints = void 0;
4
+ // extension
5
+ var Breakpoints;
6
+ (function (Breakpoints) {
7
+ // constants
8
+ Breakpoints.defaults = {
9
+ xs: 0,
10
+ sm: 600,
11
+ md: 900,
12
+ lg: 1280,
13
+ xl: 1520
14
+ };
15
+ })(Breakpoints || (exports.Breakpoints = Breakpoints = {}));
@@ -0,0 +1,7 @@
1
+ import { Breakpoint } from './Breakpoint';
2
+ export type ResponsiveValue<T> = Partial<Record<Breakpoint, T>>;
3
+ export type MixedResponsiveValue<T> = T | ResponsiveValue<T>;
4
+ export declare namespace ResponsiveValue {
5
+ function isResponsive<T>(value: any): value is Partial<Record<Breakpoint, T>>;
6
+ function resolve<T>(responsiveValue: Partial<ResponsiveValue<T>>, breakpoint: Breakpoint): T | undefined;
7
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResponsiveValue = void 0;
4
+ const Breakpoint_1 = require("./Breakpoint");
5
+ // extensions
6
+ var ResponsiveValue;
7
+ (function (ResponsiveValue) {
8
+ // guard
9
+ function isResponsive(value) {
10
+ return !!value
11
+ && typeof value === 'object'
12
+ && Object.keys(value).some(key => Breakpoint_1.Breakpoint.values.includes(key));
13
+ }
14
+ ResponsiveValue.isResponsive = isResponsive;
15
+ // helpers
16
+ function resolve(responsiveValue, breakpoint) {
17
+ // lookup the closest value
18
+ if (isResponsive(responsiveValue)) {
19
+ const closestBreakpoint = Breakpoint_1.Breakpoint.values.slice()
20
+ .reverse()
21
+ .find(b => Breakpoint_1.Breakpoint.compare(b, breakpoint) <= 0 && responsiveValue[b] !== undefined);
22
+ return closestBreakpoint && responsiveValue[closestBreakpoint];
23
+ }
24
+ }
25
+ ResponsiveValue.resolve = resolve;
26
+ })(ResponsiveValue || (exports.ResponsiveValue = ResponsiveValue = {}));
@@ -0,0 +1,4 @@
1
+ export * from './Breakpoint';
2
+ export * from './BreakpointObserver';
3
+ export * from './Breakpoints';
4
+ export * from './ResponsiveValue';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Breakpoint"), exports);
18
+ __exportStar(require("./BreakpointObserver"), exports);
19
+ __exportStar(require("./Breakpoints"), exports);
20
+ __exportStar(require("./ResponsiveValue"), exports);
@@ -0,0 +1,31 @@
1
+ import { SerializedLinkNode } from '@lexical/link';
2
+ import { SerializedListItemNode, SerializedListNode } from '@lexical/list';
3
+ import { SerializedHeadingNode } from '@lexical/rich-text';
4
+ import { BaseSelection, ElementNode, type Klass, LexicalEditor, LexicalNode, SerializedElementNode, SerializedLexicalNode, SerializedParagraphNode, SerializedRootNode, SerializedTextNode, TextNode } from 'lexical';
5
+ import { Transform } from '../../types';
6
+ import { Rect } from '../geometry';
7
+ export declare namespace LexicalUtils {
8
+ function isSerializedTextNode(node: SerializedLexicalNode): node is SerializedTextNode;
9
+ function isSerializedParagraphNode(node: SerializedLexicalNode): node is SerializedParagraphNode;
10
+ function isSerializedHeadingNode(node: SerializedLexicalNode): node is SerializedHeadingNode;
11
+ function isSerializedQuoteNode(node: SerializedLexicalNode): boolean;
12
+ function isSerializedListNode(node: SerializedLexicalNode): node is SerializedListNode;
13
+ function isSerializedHrNode(node: SerializedLexicalNode): boolean;
14
+ function isSerializedListItemNode(node: SerializedLexicalNode): node is SerializedListItemNode;
15
+ function isSerializedLinkNode(node: SerializedLexicalNode): node is SerializedLinkNode;
16
+ function isSerializedElementNode(node: SerializedLexicalNode): node is SerializedElementNode;
17
+ function rootToString(root?: SerializedRootNode): string;
18
+ type ReplaceTextNodesArgs = {
19
+ selection?: BaseSelection | null;
20
+ onReplaceNode: Transform<TextNode, LexicalNode>;
21
+ };
22
+ function replaceTextNodes({ selection: selectionRaw, onReplaceNode }: ReplaceTextNodesArgs): boolean;
23
+ function findContainer<T extends ReadonlyArray<Klass<ElementNode>>>(node: LexicalNode | null | undefined, types: T): InstanceType<T[number]> | undefined;
24
+ type GetSelectionRectArgs = {
25
+ editor: LexicalEditor;
26
+ selection?: BaseSelection | null | undefined;
27
+ coerce?: boolean | ReadonlyArray<Klass<ElementNode>>;
28
+ allowEmpty?: boolean;
29
+ };
30
+ function getSelectionRect({ editor, selection: selectionRaw, coerce, allowEmpty }: GetSelectionRectArgs): Rect | undefined;
31
+ }