@infonomic/payload-alternative-lexical-editor 1.0.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 (579) hide show
  1. package/LICENSE +21 -0
  2. package/dist/adapter.d.ts +11 -0
  3. package/dist/adapter.d.ts.map +1 -0
  4. package/dist/adapter.js +124 -0
  5. package/dist/adapter.js.map +1 -0
  6. package/dist/cell/rsc-entry.d.ts +20 -0
  7. package/dist/cell/rsc-entry.d.ts.map +1 -0
  8. package/dist/cell/rsc-entry.js +68 -0
  9. package/dist/cell/rsc-entry.js.map +1 -0
  10. package/dist/field/apply-value-plugin.d.ts +9 -0
  11. package/dist/field/apply-value-plugin.d.ts.map +1 -0
  12. package/dist/field/apply-value-plugin.js +66 -0
  13. package/dist/field/apply-value-plugin.js.map +1 -0
  14. package/dist/field/build-initial-state.d.ts +29 -0
  15. package/dist/field/build-initial-state.d.ts.map +1 -0
  16. package/dist/field/build-initial-state.js +14 -0
  17. package/dist/field/build-initial-state.js.map +1 -0
  18. package/dist/field/config/default.d.ts +6 -0
  19. package/dist/field/config/default.d.ts.map +1 -0
  20. package/dist/field/config/default.js +52 -0
  21. package/dist/field/config/default.js.map +1 -0
  22. package/dist/field/config/editor-config-context.d.ts +14 -0
  23. package/dist/field/config/editor-config-context.d.ts.map +1 -0
  24. package/dist/field/config/editor-config-context.js +38 -0
  25. package/dist/field/config/editor-config-context.js.map +1 -0
  26. package/dist/field/config/types.d.ts +22 -0
  27. package/dist/field/config/types.d.ts.map +1 -0
  28. package/dist/field/config/types.js +2 -0
  29. package/dist/field/config/types.js.map +1 -0
  30. package/dist/field/constants.d.ts +2 -0
  31. package/dist/field/constants.d.ts.map +1 -0
  32. package/dist/field/constants.js +2 -0
  33. package/dist/field/constants.js.map +1 -0
  34. package/dist/field/context/shared-autocomplete-context.d.ts +18 -0
  35. package/dist/field/context/shared-autocomplete-context.d.ts.map +1 -0
  36. package/dist/field/context/shared-autocomplete-context.js +40 -0
  37. package/dist/field/context/shared-autocomplete-context.js.map +1 -0
  38. package/dist/field/context/shared-history-context.d.ts +19 -0
  39. package/dist/field/context/shared-history-context.d.ts.map +1 -0
  40. package/dist/field/context/shared-history-context.js +13 -0
  41. package/dist/field/context/shared-history-context.js.map +1 -0
  42. package/dist/field/context/shared-on-change-context.d.ts +13 -0
  43. package/dist/field/context/shared-on-change-context.d.ts.map +1 -0
  44. package/dist/field/context/shared-on-change-context.js +18 -0
  45. package/dist/field/context/shared-on-change-context.js.map +1 -0
  46. package/dist/field/debug.d.ts +3 -0
  47. package/dist/field/debug.d.ts.map +1 -0
  48. package/dist/field/debug.js +17 -0
  49. package/dist/field/debug.js.map +1 -0
  50. package/dist/field/editor-context.d.ts +15 -0
  51. package/dist/field/editor-context.d.ts.map +1 -0
  52. package/dist/field/editor-context.js +37 -0
  53. package/dist/field/editor-context.js.map +1 -0
  54. package/dist/field/editor.css +1477 -0
  55. package/dist/field/editor.d.ts +4 -0
  56. package/dist/field/editor.d.ts.map +1 -0
  57. package/dist/field/editor.js +86 -0
  58. package/dist/field/editor.js.map +1 -0
  59. package/dist/field/field-component.css +44 -0
  60. package/dist/field/field-component.d.ts +16 -0
  61. package/dist/field/field-component.d.ts.map +1 -0
  62. package/dist/field/field-component.js +136 -0
  63. package/dist/field/field-component.js.map +1 -0
  64. package/dist/field/hooks/useMediaQuery.d.ts +3 -0
  65. package/dist/field/hooks/useMediaQuery.d.ts.map +1 -0
  66. package/dist/field/hooks/useMediaQuery.js +20 -0
  67. package/dist/field/hooks/useMediaQuery.js.map +1 -0
  68. package/dist/field/hooks/useModal.d.ts +13 -0
  69. package/dist/field/hooks/useModal.d.ts.map +1 -0
  70. package/dist/field/hooks/useModal.js +28 -0
  71. package/dist/field/hooks/useModal.js.map +1 -0
  72. package/dist/field/hooks/useReport.d.ts +9 -0
  73. package/dist/field/hooks/useReport.d.ts.map +1 -0
  74. package/dist/field/hooks/useReport.js +51 -0
  75. package/dist/field/hooks/useReport.js.map +1 -0
  76. package/dist/field/images/cat-typing.gif +0 -0
  77. package/dist/field/images/emoji/1F600.png +0 -0
  78. package/dist/field/images/emoji/1F641.png +0 -0
  79. package/dist/field/images/emoji/1F642.png +0 -0
  80. package/dist/field/images/emoji/2764.png +0 -0
  81. package/dist/field/images/icons/3-columns.svg +3 -0
  82. package/dist/field/images/icons/admonition.svg +1 -0
  83. package/dist/field/images/icons/arrow-clockwise.svg +1 -0
  84. package/dist/field/images/icons/arrow-counterclockwise.svg +1 -0
  85. package/dist/field/images/icons/bg-color.svg +1 -0
  86. package/dist/field/images/icons/camera.svg +1 -0
  87. package/dist/field/images/icons/card-checklist.svg +1 -0
  88. package/dist/field/images/icons/caret-right-fill.svg +1 -0
  89. package/dist/field/images/icons/chat-left-text.svg +1 -0
  90. package/dist/field/images/icons/chat-right-dots.svg +1 -0
  91. package/dist/field/images/icons/chat-right-text.svg +1 -0
  92. package/dist/field/images/icons/chat-right.svg +1 -0
  93. package/dist/field/images/icons/chat-square-quote.svg +1 -0
  94. package/dist/field/images/icons/chevron-down.svg +1 -0
  95. package/dist/field/images/icons/clipboard.svg +1 -0
  96. package/dist/field/images/icons/close.svg +1 -0
  97. package/dist/field/images/icons/code.svg +1 -0
  98. package/dist/field/images/icons/comments.svg +1 -0
  99. package/dist/field/images/icons/copy.svg +1 -0
  100. package/dist/field/images/icons/diagram-2.svg +1 -0
  101. package/dist/field/images/icons/download.svg +1 -0
  102. package/dist/field/images/icons/draggable-block-menu.svg +1 -0
  103. package/dist/field/images/icons/dropdown-more.svg +1 -0
  104. package/dist/field/images/icons/figma.svg +1 -0
  105. package/dist/field/images/icons/file-earmark-text.svg +4 -0
  106. package/dist/field/images/icons/file-image.svg +1 -0
  107. package/dist/field/images/icons/filetype-gif.svg +1 -0
  108. package/dist/field/images/icons/font-color.svg +1 -0
  109. package/dist/field/images/icons/font-family.svg +1 -0
  110. package/dist/field/images/icons/gear.svg +1 -0
  111. package/dist/field/images/icons/horizontal-rule.svg +1 -0
  112. package/dist/field/images/icons/indent.svg +1 -0
  113. package/dist/field/images/icons/journal-code.svg +1 -0
  114. package/dist/field/images/icons/journal-text.svg +1 -0
  115. package/dist/field/images/icons/justify.svg +1 -0
  116. package/dist/field/images/icons/link.svg +1 -0
  117. package/dist/field/images/icons/list-ol.svg +1 -0
  118. package/dist/field/images/icons/list-ul.svg +1 -0
  119. package/dist/field/images/icons/lock-fill.svg +1 -0
  120. package/dist/field/images/icons/lock.svg +1 -0
  121. package/dist/field/images/icons/markdown.svg +1 -0
  122. package/dist/field/images/icons/mic.svg +1 -0
  123. package/dist/field/images/icons/outdent.svg +1 -0
  124. package/dist/field/images/icons/paint-bucket.svg +1 -0
  125. package/dist/field/images/icons/palette.svg +1 -0
  126. package/dist/field/images/icons/pencil-fill.svg +1 -0
  127. package/dist/field/images/icons/plug-fill.svg +1 -0
  128. package/dist/field/images/icons/plug.svg +1 -0
  129. package/dist/field/images/icons/plus-slash-minus.svg +1 -0
  130. package/dist/field/images/icons/plus.svg +1 -0
  131. package/dist/field/images/icons/prettier-error.svg +1 -0
  132. package/dist/field/images/icons/prettier.svg +1 -0
  133. package/dist/field/images/icons/send.svg +1 -0
  134. package/dist/field/images/icons/square-check.svg +1 -0
  135. package/dist/field/images/icons/sticky.svg +1 -0
  136. package/dist/field/images/icons/success-alt.svg +1 -0
  137. package/dist/field/images/icons/success.svg +1 -0
  138. package/dist/field/images/icons/table.svg +1 -0
  139. package/dist/field/images/icons/text-center.svg +1 -0
  140. package/dist/field/images/icons/text-left.svg +1 -0
  141. package/dist/field/images/icons/text-paragraph.svg +1 -0
  142. package/dist/field/images/icons/text-right.svg +1 -0
  143. package/dist/field/images/icons/trash.svg +1 -0
  144. package/dist/field/images/icons/trash3.svg +1 -0
  145. package/dist/field/images/icons/tweet.svg +1 -0
  146. package/dist/field/images/icons/type-bold.svg +1 -0
  147. package/dist/field/images/icons/type-h1.svg +1 -0
  148. package/dist/field/images/icons/type-h2.svg +1 -0
  149. package/dist/field/images/icons/type-h3.svg +1 -0
  150. package/dist/field/images/icons/type-h4.svg +1 -0
  151. package/dist/field/images/icons/type-h5.svg +1 -0
  152. package/dist/field/images/icons/type-h6.svg +1 -0
  153. package/dist/field/images/icons/type-italic.svg +1 -0
  154. package/dist/field/images/icons/type-strikethrough.svg +1 -0
  155. package/dist/field/images/icons/type-subscript.svg +1 -0
  156. package/dist/field/images/icons/type-superscript.svg +1 -0
  157. package/dist/field/images/icons/type-underline.svg +1 -0
  158. package/dist/field/images/icons/upload.svg +1 -0
  159. package/dist/field/images/icons/user.svg +1 -0
  160. package/dist/field/images/icons/vimeo.svg +1 -0
  161. package/dist/field/images/icons/youtube.svg +1 -0
  162. package/dist/field/images/landscape.jpg +0 -0
  163. package/dist/field/images/logo.svg +1 -0
  164. package/dist/field/images/yellow-flower-small.jpg +0 -0
  165. package/dist/field/images/yellow-flower.jpg +0 -0
  166. package/dist/field/index.d.ts +12 -0
  167. package/dist/field/index.d.ts.map +1 -0
  168. package/dist/field/index.js +9 -0
  169. package/dist/field/index.js.map +1 -0
  170. package/dist/field/lexical-after-read-populate-links.d.ts +47 -0
  171. package/dist/field/lexical-after-read-populate-links.d.ts.map +1 -0
  172. package/dist/field/lexical-after-read-populate-links.js +118 -0
  173. package/dist/field/lexical-after-read-populate-links.js.map +1 -0
  174. package/dist/field/lexical-after-read-populate-media.d.ts +34 -0
  175. package/dist/field/lexical-after-read-populate-media.d.ts.map +1 -0
  176. package/dist/field/lexical-after-read-populate-media.js +40 -0
  177. package/dist/field/lexical-after-read-populate-media.js.map +1 -0
  178. package/dist/field/lexical-before-change-populate-links.d.ts +52 -0
  179. package/dist/field/lexical-before-change-populate-links.d.ts.map +1 -0
  180. package/dist/field/lexical-before-change-populate-links.js +116 -0
  181. package/dist/field/lexical-before-change-populate-links.js.map +1 -0
  182. package/dist/field/nodes/admonition-node/admonition-node-component.css +115 -0
  183. package/dist/field/nodes/admonition-node/admonition-node-component.d.ts +11 -0
  184. package/dist/field/nodes/admonition-node/admonition-node-component.d.ts.map +1 -0
  185. package/dist/field/nodes/admonition-node/admonition-node-component.js +157 -0
  186. package/dist/field/nodes/admonition-node/admonition-node-component.js.map +1 -0
  187. package/dist/field/nodes/admonition-node/admonition-node.d.ts +28 -0
  188. package/dist/field/nodes/admonition-node/admonition-node.d.ts.map +1 -0
  189. package/dist/field/nodes/admonition-node/admonition-node.js +134 -0
  190. package/dist/field/nodes/admonition-node/admonition-node.js.map +1 -0
  191. package/dist/field/nodes/admonition-node/icons/danger-icon.css +11 -0
  192. package/dist/field/nodes/admonition-node/icons/danger-icon.d.ts +8 -0
  193. package/dist/field/nodes/admonition-node/icons/danger-icon.d.ts.map +1 -0
  194. package/dist/field/nodes/admonition-node/icons/danger-icon.js +7 -0
  195. package/dist/field/nodes/admonition-node/icons/danger-icon.js.map +1 -0
  196. package/dist/field/nodes/admonition-node/icons/index.d.ts +5 -0
  197. package/dist/field/nodes/admonition-node/icons/index.d.ts.map +1 -0
  198. package/dist/field/nodes/admonition-node/icons/index.js +5 -0
  199. package/dist/field/nodes/admonition-node/icons/index.js.map +1 -0
  200. package/dist/field/nodes/admonition-node/icons/note-icon.css +11 -0
  201. package/dist/field/nodes/admonition-node/icons/note-icon.d.ts +8 -0
  202. package/dist/field/nodes/admonition-node/icons/note-icon.d.ts.map +1 -0
  203. package/dist/field/nodes/admonition-node/icons/note-icon.js +7 -0
  204. package/dist/field/nodes/admonition-node/icons/note-icon.js.map +1 -0
  205. package/dist/field/nodes/admonition-node/icons/tip-icon.css +11 -0
  206. package/dist/field/nodes/admonition-node/icons/tip-icon.d.ts +8 -0
  207. package/dist/field/nodes/admonition-node/icons/tip-icon.d.ts.map +1 -0
  208. package/dist/field/nodes/admonition-node/icons/tip-icon.js +7 -0
  209. package/dist/field/nodes/admonition-node/icons/tip-icon.js.map +1 -0
  210. package/dist/field/nodes/admonition-node/icons/warning-icon.css +11 -0
  211. package/dist/field/nodes/admonition-node/icons/warning-icon.d.ts +8 -0
  212. package/dist/field/nodes/admonition-node/icons/warning-icon.d.ts.map +1 -0
  213. package/dist/field/nodes/admonition-node/icons/warning-icon.js +7 -0
  214. package/dist/field/nodes/admonition-node/icons/warning-icon.js.map +1 -0
  215. package/dist/field/nodes/admonition-node/index.d.ts +4 -0
  216. package/dist/field/nodes/admonition-node/index.d.ts.map +1 -0
  217. package/dist/field/nodes/admonition-node/index.js +4 -0
  218. package/dist/field/nodes/admonition-node/index.js.map +1 -0
  219. package/dist/field/nodes/admonition-node/types.d.ts +14 -0
  220. package/dist/field/nodes/admonition-node/types.d.ts.map +1 -0
  221. package/dist/field/nodes/admonition-node/types.js +2 -0
  222. package/dist/field/nodes/admonition-node/types.js.map +1 -0
  223. package/dist/field/nodes/index.d.ts +10 -0
  224. package/dist/field/nodes/index.d.ts.map +1 -0
  225. package/dist/field/nodes/index.js +44 -0
  226. package/dist/field/nodes/index.js.map +1 -0
  227. package/dist/field/nodes/inline-image-node/index.d.ts +4 -0
  228. package/dist/field/nodes/inline-image-node/index.d.ts.map +1 -0
  229. package/dist/field/nodes/inline-image-node/index.js +4 -0
  230. package/dist/field/nodes/inline-image-node/index.js.map +1 -0
  231. package/dist/field/nodes/inline-image-node/inline-image-node-component.css +205 -0
  232. package/dist/field/nodes/inline-image-node/inline-image-node-component.d.ts +18 -0
  233. package/dist/field/nodes/inline-image-node/inline-image-node-component.d.ts.map +1 -0
  234. package/dist/field/nodes/inline-image-node/inline-image-node-component.js +239 -0
  235. package/dist/field/nodes/inline-image-node/inline-image-node-component.js.map +1 -0
  236. package/dist/field/nodes/inline-image-node/inline-image-node.d.ts +39 -0
  237. package/dist/field/nodes/inline-image-node/inline-image-node.d.ts.map +1 -0
  238. package/dist/field/nodes/inline-image-node/inline-image-node.js +204 -0
  239. package/dist/field/nodes/inline-image-node/inline-image-node.js.map +1 -0
  240. package/dist/field/nodes/inline-image-node/types.d.ts +33 -0
  241. package/dist/field/nodes/inline-image-node/types.d.ts.map +1 -0
  242. package/dist/field/nodes/inline-image-node/types.js +2 -0
  243. package/dist/field/nodes/inline-image-node/types.js.map +1 -0
  244. package/dist/field/nodes/layout-container-node/layout-container-node.d.ts +29 -0
  245. package/dist/field/nodes/layout-container-node/layout-container-node.d.ts.map +1 -0
  246. package/dist/field/nodes/layout-container-node/layout-container-node.js +66 -0
  247. package/dist/field/nodes/layout-container-node/layout-container-node.js.map +1 -0
  248. package/dist/field/nodes/layout-container-node/layout-item-node.d.ts +23 -0
  249. package/dist/field/nodes/layout-container-node/layout-item-node.d.ts.map +1 -0
  250. package/dist/field/nodes/layout-container-node/layout-item-node.js +50 -0
  251. package/dist/field/nodes/layout-container-node/layout-item-node.js.map +1 -0
  252. package/dist/field/nodes/link-nodes/auto-link-node.d.ts +17 -0
  253. package/dist/field/nodes/link-nodes/auto-link-node.d.ts.map +1 -0
  254. package/dist/field/nodes/link-nodes/auto-link-node.js +46 -0
  255. package/dist/field/nodes/link-nodes/auto-link-node.js.map +1 -0
  256. package/dist/field/nodes/link-nodes/index.d.ts +4 -0
  257. package/dist/field/nodes/link-nodes/index.d.ts.map +1 -0
  258. package/dist/field/nodes/link-nodes/index.js +4 -0
  259. package/dist/field/nodes/link-nodes/index.js.map +1 -0
  260. package/dist/field/nodes/link-nodes/link-node.d.ts +42 -0
  261. package/dist/field/nodes/link-nodes/link-node.d.ts.map +1 -0
  262. package/dist/field/nodes/link-nodes/link-node.js +340 -0
  263. package/dist/field/nodes/link-nodes/link-node.js.map +1 -0
  264. package/dist/field/nodes/link-nodes/types.d.ts +16 -0
  265. package/dist/field/nodes/link-nodes/types.d.ts.map +1 -0
  266. package/dist/field/nodes/link-nodes/types.js +2 -0
  267. package/dist/field/nodes/link-nodes/types.js.map +1 -0
  268. package/dist/field/nodes/vimeo-node/index.d.ts +30 -0
  269. package/dist/field/nodes/vimeo-node/index.d.ts.map +1 -0
  270. package/dist/field/nodes/vimeo-node/index.js +92 -0
  271. package/dist/field/nodes/vimeo-node/index.js.map +1 -0
  272. package/dist/field/nodes/youtube-node/index.d.ts +30 -0
  273. package/dist/field/nodes/youtube-node/index.d.ts.map +1 -0
  274. package/dist/field/nodes/youtube-node/index.js +92 -0
  275. package/dist/field/nodes/youtube-node/index.js.map +1 -0
  276. package/dist/field/plugins/admonition-plugin/admonition-drawer.css +8 -0
  277. package/dist/field/plugins/admonition-plugin/admonition-drawer.d.ts +5 -0
  278. package/dist/field/plugins/admonition-plugin/admonition-drawer.d.ts.map +1 -0
  279. package/dist/field/plugins/admonition-plugin/admonition-drawer.js +44 -0
  280. package/dist/field/plugins/admonition-plugin/admonition-drawer.js.map +1 -0
  281. package/dist/field/plugins/admonition-plugin/fields.d.ts +14 -0
  282. package/dist/field/plugins/admonition-plugin/fields.d.ts.map +1 -0
  283. package/dist/field/plugins/admonition-plugin/fields.js +72 -0
  284. package/dist/field/plugins/admonition-plugin/fields.js.map +1 -0
  285. package/dist/field/plugins/admonition-plugin/index.d.ts +8 -0
  286. package/dist/field/plugins/admonition-plugin/index.d.ts.map +1 -0
  287. package/dist/field/plugins/admonition-plugin/index.js +65 -0
  288. package/dist/field/plugins/admonition-plugin/index.js.map +1 -0
  289. package/dist/field/plugins/admonition-plugin/types.d.ts +15 -0
  290. package/dist/field/plugins/admonition-plugin/types.d.ts.map +1 -0
  291. package/dist/field/plugins/admonition-plugin/types.js +2 -0
  292. package/dist/field/plugins/admonition-plugin/types.js.map +1 -0
  293. package/dist/field/plugins/auto-embed-plugin/index.d.ts +26 -0
  294. package/dist/field/plugins/auto-embed-plugin/index.d.ts.map +1 -0
  295. package/dist/field/plugins/auto-embed-plugin/index.js +191 -0
  296. package/dist/field/plugins/auto-embed-plugin/index.js.map +1 -0
  297. package/dist/field/plugins/code-highlight-plugin/index.d.ts +10 -0
  298. package/dist/field/plugins/code-highlight-plugin/index.d.ts.map +1 -0
  299. package/dist/field/plugins/code-highlight-plugin/index.js +11 -0
  300. package/dist/field/plugins/code-highlight-plugin/index.js.map +1 -0
  301. package/dist/field/plugins/drag-drop-paste-plugin/index.d.ts +9 -0
  302. package/dist/field/plugins/drag-drop-paste-plugin/index.d.ts.map +1 -0
  303. package/dist/field/plugins/drag-drop-paste-plugin/index.js +37 -0
  304. package/dist/field/plugins/drag-drop-paste-plugin/index.js.map +1 -0
  305. package/dist/field/plugins/floating-text-format-toolbar-plugin/index.css +150 -0
  306. package/dist/field/plugins/floating-text-format-toolbar-plugin/index.d.ts +13 -0
  307. package/dist/field/plugins/floating-text-format-toolbar-plugin/index.d.ts.map +1 -0
  308. package/dist/field/plugins/floating-text-format-toolbar-plugin/index.js +236 -0
  309. package/dist/field/plugins/floating-text-format-toolbar-plugin/index.js.map +1 -0
  310. package/dist/field/plugins/inline-image-plugin/fields.d.ts +12 -0
  311. package/dist/field/plugins/inline-image-plugin/fields.d.ts.map +1 -0
  312. package/dist/field/plugins/inline-image-plugin/fields.js +160 -0
  313. package/dist/field/plugins/inline-image-plugin/fields.js.map +1 -0
  314. package/dist/field/plugins/inline-image-plugin/index.d.ts +26 -0
  315. package/dist/field/plugins/inline-image-plugin/index.d.ts.map +1 -0
  316. package/dist/field/plugins/inline-image-plugin/index.js +222 -0
  317. package/dist/field/plugins/inline-image-plugin/index.js.map +1 -0
  318. package/dist/field/plugins/inline-image-plugin/inline-image-drawer.css +29 -0
  319. package/dist/field/plugins/inline-image-plugin/inline-image-drawer.d.ts +5 -0
  320. package/dist/field/plugins/inline-image-plugin/inline-image-drawer.d.ts.map +1 -0
  321. package/dist/field/plugins/inline-image-plugin/inline-image-drawer.js +51 -0
  322. package/dist/field/plugins/inline-image-plugin/inline-image-drawer.js.map +1 -0
  323. package/dist/field/plugins/inline-image-plugin/types.d.ts +16 -0
  324. package/dist/field/plugins/inline-image-plugin/types.d.ts.map +1 -0
  325. package/dist/field/plugins/inline-image-plugin/types.js +2 -0
  326. package/dist/field/plugins/inline-image-plugin/types.js.map +1 -0
  327. package/dist/field/plugins/inline-image-plugin/utils.d.ts +9 -0
  328. package/dist/field/plugins/inline-image-plugin/utils.d.ts.map +1 -0
  329. package/dist/field/plugins/inline-image-plugin/utils.js +27 -0
  330. package/dist/field/plugins/inline-image-plugin/utils.js.map +1 -0
  331. package/dist/field/plugins/layout-plugin/insert-layout-dialog.d.ts +14 -0
  332. package/dist/field/plugins/layout-plugin/insert-layout-dialog.d.ts.map +1 -0
  333. package/dist/field/plugins/layout-plugin/insert-layout-dialog.js +26 -0
  334. package/dist/field/plugins/layout-plugin/insert-layout-dialog.js.map +1 -0
  335. package/dist/field/plugins/layout-plugin/layout-plugin.d.ts +8 -0
  336. package/dist/field/plugins/layout-plugin/layout-plugin.d.ts.map +1 -0
  337. package/dist/field/plugins/layout-plugin/layout-plugin.js +87 -0
  338. package/dist/field/plugins/layout-plugin/layout-plugin.js.map +1 -0
  339. package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.d.ts +22 -0
  340. package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.d.ts.map +1 -0
  341. package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.js +218 -0
  342. package/dist/field/plugins/link-plugin/auto-link/auto-link-plugin.js.map +1 -0
  343. package/dist/field/plugins/link-plugin/auto-link/index.d.ts +10 -0
  344. package/dist/field/plugins/link-plugin/auto-link/index.d.ts.map +1 -0
  345. package/dist/field/plugins/link-plugin/auto-link/index.js +17 -0
  346. package/dist/field/plugins/link-plugin/auto-link/index.js.map +1 -0
  347. package/dist/field/plugins/link-plugin/link/fields.d.ts +11 -0
  348. package/dist/field/plugins/link-plugin/link/fields.d.ts.map +1 -0
  349. package/dist/field/plugins/link-plugin/link/fields.js +120 -0
  350. package/dist/field/plugins/link-plugin/link/fields.js.map +1 -0
  351. package/dist/field/plugins/link-plugin/link/floating-link-editor.css +128 -0
  352. package/dist/field/plugins/link-plugin/link/floating-link-editor.d.ts +13 -0
  353. package/dist/field/plugins/link-plugin/link/floating-link-editor.d.ts.map +1 -0
  354. package/dist/field/plugins/link-plugin/link/floating-link-editor.js +239 -0
  355. package/dist/field/plugins/link-plugin/link/floating-link-editor.js.map +1 -0
  356. package/dist/field/plugins/link-plugin/link/index.d.ts +2 -0
  357. package/dist/field/plugins/link-plugin/link/index.d.ts.map +1 -0
  358. package/dist/field/plugins/link-plugin/link/index.js +65 -0
  359. package/dist/field/plugins/link-plugin/link/index.js.map +1 -0
  360. package/dist/field/plugins/link-plugin/link/link-drawer.css +21 -0
  361. package/dist/field/plugins/link-plugin/link/link-drawer.d.ts +5 -0
  362. package/dist/field/plugins/link-plugin/link/link-drawer.d.ts.map +1 -0
  363. package/dist/field/plugins/link-plugin/link/link-drawer.js +72 -0
  364. package/dist/field/plugins/link-plugin/link/link-drawer.js.map +1 -0
  365. package/dist/field/plugins/link-plugin/link/types.d.ts +20 -0
  366. package/dist/field/plugins/link-plugin/link/types.d.ts.map +1 -0
  367. package/dist/field/plugins/link-plugin/link/types.js +2 -0
  368. package/dist/field/plugins/link-plugin/link/types.js.map +1 -0
  369. package/dist/field/plugins/table-action-menu-plugin/index.d.ts +6 -0
  370. package/dist/field/plugins/table-action-menu-plugin/index.d.ts.map +1 -0
  371. package/dist/field/plugins/table-action-menu-plugin/index.js +476 -0
  372. package/dist/field/plugins/table-action-menu-plugin/index.js.map +1 -0
  373. package/dist/field/plugins/table-plugin/index.d.ts +4 -0
  374. package/dist/field/plugins/table-plugin/index.d.ts.map +1 -0
  375. package/dist/field/plugins/table-plugin/index.js +30 -0
  376. package/dist/field/plugins/table-plugin/index.js.map +1 -0
  377. package/dist/field/plugins/table-plugin/table-drawer.d.ts +12 -0
  378. package/dist/field/plugins/table-plugin/table-drawer.d.ts.map +1 -0
  379. package/dist/field/plugins/table-plugin/table-drawer.js +42 -0
  380. package/dist/field/plugins/table-plugin/table-drawer.js.map +1 -0
  381. package/dist/field/plugins/toolbar-plugin/index.d.ts +10 -0
  382. package/dist/field/plugins/toolbar-plugin/index.d.ts.map +1 -0
  383. package/dist/field/plugins/toolbar-plugin/index.js +394 -0
  384. package/dist/field/plugins/toolbar-plugin/index.js.map +1 -0
  385. package/dist/field/plugins/treeview-plugin/index.d.ts +10 -0
  386. package/dist/field/plugins/treeview-plugin/index.d.ts.map +1 -0
  387. package/dist/field/plugins/treeview-plugin/index.js +9 -0
  388. package/dist/field/plugins/treeview-plugin/index.js.map +1 -0
  389. package/dist/field/plugins/vimeo-plugin/index.d.ts +4 -0
  390. package/dist/field/plugins/vimeo-plugin/index.d.ts.map +1 -0
  391. package/dist/field/plugins/vimeo-plugin/index.js +29 -0
  392. package/dist/field/plugins/vimeo-plugin/index.js.map +1 -0
  393. package/dist/field/plugins/youtube-plugin/index.d.ts +4 -0
  394. package/dist/field/plugins/youtube-plugin/index.d.ts.map +1 -0
  395. package/dist/field/plugins/youtube-plugin/index.js +29 -0
  396. package/dist/field/plugins/youtube-plugin/index.js.map +1 -0
  397. package/dist/field/rsc-entry.d.ts +9 -0
  398. package/dist/field/rsc-entry.d.ts.map +1 -0
  399. package/dist/field/rsc-entry.js +57 -0
  400. package/dist/field/rsc-entry.js.map +1 -0
  401. package/dist/field/shared/canUseDOM.d.ts +9 -0
  402. package/dist/field/shared/canUseDOM.d.ts.map +1 -0
  403. package/dist/field/shared/canUseDOM.js +9 -0
  404. package/dist/field/shared/canUseDOM.js.map +1 -0
  405. package/dist/field/shared/environment.d.ts +23 -0
  406. package/dist/field/shared/environment.d.ts.map +1 -0
  407. package/dist/field/shared/environment.js +22 -0
  408. package/dist/field/shared/environment.js.map +1 -0
  409. package/dist/field/shared/invariant.d.ts +9 -0
  410. package/dist/field/shared/invariant.d.ts.map +1 -0
  411. package/dist/field/shared/invariant.js +18 -0
  412. package/dist/field/shared/invariant.js.map +1 -0
  413. package/dist/field/shared/simpleDiffWithCursor.d.ts +13 -0
  414. package/dist/field/shared/simpleDiffWithCursor.d.ts.map +1 -0
  415. package/dist/field/shared/simpleDiffWithCursor.js +34 -0
  416. package/dist/field/shared/simpleDiffWithCursor.js.map +1 -0
  417. package/dist/field/shared/useLayoutEffect.d.ts +11 -0
  418. package/dist/field/shared/useLayoutEffect.d.ts.map +1 -0
  419. package/dist/field/shared/useLayoutEffect.js +12 -0
  420. package/dist/field/shared/useLayoutEffect.js.map +1 -0
  421. package/dist/field/shared/warnOnlyOnce.d.ts +9 -0
  422. package/dist/field/shared/warnOnlyOnce.d.ts.map +1 -0
  423. package/dist/field/shared/warnOnlyOnce.js +21 -0
  424. package/dist/field/shared/warnOnlyOnce.js.map +1 -0
  425. package/dist/field/themes/lexical-editor-theme.css +558 -0
  426. package/dist/field/themes/lexical-editor-theme.d.ts +10 -0
  427. package/dist/field/themes/lexical-editor-theme.d.ts.map +1 -0
  428. package/dist/field/themes/lexical-editor-theme.js +105 -0
  429. package/dist/field/themes/lexical-editor-theme.js.map +1 -0
  430. package/dist/field/types.d.ts +10 -0
  431. package/dist/field/types.d.ts.map +1 -0
  432. package/dist/field/types.js +2 -0
  433. package/dist/field/types.js.map +1 -0
  434. package/dist/field/ui/button.css +45 -0
  435. package/dist/field/ui/button.d.ts +19 -0
  436. package/dist/field/ui/button.d.ts.map +1 -0
  437. package/dist/field/ui/button.js +8 -0
  438. package/dist/field/ui/button.js.map +1 -0
  439. package/dist/field/ui/checkbox.css +52 -0
  440. package/dist/field/ui/color-picker.css +88 -0
  441. package/dist/field/ui/color-picker.d.ts +21 -0
  442. package/dist/field/ui/color-picker.d.ts.map +1 -0
  443. package/dist/field/ui/color-picker.js +250 -0
  444. package/dist/field/ui/color-picker.js.map +1 -0
  445. package/dist/field/ui/content-editable-inline.d.ts +13 -0
  446. package/dist/field/ui/content-editable-inline.d.ts.map +1 -0
  447. package/dist/field/ui/content-editable-inline.js +14 -0
  448. package/dist/field/ui/content-editable-inline.js.map +1 -0
  449. package/dist/field/ui/content-editable.css +28 -0
  450. package/dist/field/ui/content-editable.d.ts +13 -0
  451. package/dist/field/ui/content-editable.d.ts.map +1 -0
  452. package/dist/field/ui/content-editable.js +15 -0
  453. package/dist/field/ui/content-editable.js.map +1 -0
  454. package/dist/field/ui/dialog.css +17 -0
  455. package/dist/field/ui/dialog.d.ts +17 -0
  456. package/dist/field/ui/dialog.d.ts.map +1 -0
  457. package/dist/field/ui/dialog.js +10 -0
  458. package/dist/field/ui/dialog.js.map +1 -0
  459. package/dist/field/ui/dropdown.d.ts +25 -0
  460. package/dist/field/ui/dropdown.d.ts.map +1 -0
  461. package/dist/field/ui/dropdown.js +118 -0
  462. package/dist/field/ui/dropdown.js.map +1 -0
  463. package/dist/field/ui/file-input.d.ts +18 -0
  464. package/dist/field/ui/file-input.d.ts.map +1 -0
  465. package/dist/field/ui/file-input.js +17 -0
  466. package/dist/field/ui/file-input.js.map +1 -0
  467. package/dist/field/ui/input.css +32 -0
  468. package/dist/field/ui/modal.css +84 -0
  469. package/dist/field/ui/modal.d.ts +17 -0
  470. package/dist/field/ui/modal.d.ts.map +1 -0
  471. package/dist/field/ui/modal.js +48 -0
  472. package/dist/field/ui/modal.js.map +1 -0
  473. package/dist/field/ui/placeholder-inline.d.ts +14 -0
  474. package/dist/field/ui/placeholder-inline.d.ts.map +1 -0
  475. package/dist/field/ui/placeholder-inline.js +12 -0
  476. package/dist/field/ui/placeholder-inline.js.map +1 -0
  477. package/dist/field/ui/placeholder.css +33 -0
  478. package/dist/field/ui/placeholder.d.ts +14 -0
  479. package/dist/field/ui/placeholder.d.ts.map +1 -0
  480. package/dist/field/ui/placeholder.js +14 -0
  481. package/dist/field/ui/placeholder.js.map +1 -0
  482. package/dist/field/ui/select.css +34 -0
  483. package/dist/field/ui/select.d.ts +16 -0
  484. package/dist/field/ui/select.d.ts.map +1 -0
  485. package/dist/field/ui/select.js +17 -0
  486. package/dist/field/ui/select.js.map +1 -0
  487. package/dist/field/ui/switch.d.ts +15 -0
  488. package/dist/field/ui/switch.d.ts.map +1 -0
  489. package/dist/field/ui/switch.js +8 -0
  490. package/dist/field/ui/switch.js.map +1 -0
  491. package/dist/field/ui/text-input.d.ts +20 -0
  492. package/dist/field/ui/text-input.d.ts.map +1 -0
  493. package/dist/field/ui/text-input.js +18 -0
  494. package/dist/field/ui/text-input.js.map +1 -0
  495. package/dist/field/utils/cloneDeep.d.ts +2 -0
  496. package/dist/field/utils/cloneDeep.d.ts.map +1 -0
  497. package/dist/field/utils/cloneDeep.js +50 -0
  498. package/dist/field/utils/cloneDeep.js.map +1 -0
  499. package/dist/field/utils/deepEqual.d.ts +2 -0
  500. package/dist/field/utils/deepEqual.d.ts.map +1 -0
  501. package/dist/field/utils/deepEqual.js +48 -0
  502. package/dist/field/utils/deepEqual.js.map +1 -0
  503. package/dist/field/utils/emoji-list.d.ts +28 -0
  504. package/dist/field/utils/emoji-list.d.ts.map +1 -0
  505. package/dist/field/utils/emoji-list.js +16613 -0
  506. package/dist/field/utils/emoji-list.js.map +1 -0
  507. package/dist/field/utils/getDOMRangeRect.d.ts +9 -0
  508. package/dist/field/utils/getDOMRangeRect.d.ts.map +1 -0
  509. package/dist/field/utils/getDOMRangeRect.js +23 -0
  510. package/dist/field/utils/getDOMRangeRect.js.map +1 -0
  511. package/dist/field/utils/getSelectedNode.d.ts +3 -0
  512. package/dist/field/utils/getSelectedNode.d.ts.map +1 -0
  513. package/dist/field/utils/getSelectedNode.js +25 -0
  514. package/dist/field/utils/getSelectedNode.js.map +1 -0
  515. package/dist/field/utils/guard.d.ts +9 -0
  516. package/dist/field/utils/guard.d.ts.map +1 -0
  517. package/dist/field/utils/guard.js +11 -0
  518. package/dist/field/utils/guard.js.map +1 -0
  519. package/dist/field/utils/hashSerializedState.d.ts +3 -0
  520. package/dist/field/utils/hashSerializedState.d.ts.map +1 -0
  521. package/dist/field/utils/hashSerializedState.js +32 -0
  522. package/dist/field/utils/hashSerializedState.js.map +1 -0
  523. package/dist/field/utils/isMobileWidth.d.ts +9 -0
  524. package/dist/field/utils/isMobileWidth.d.ts.map +1 -0
  525. package/dist/field/utils/isMobileWidth.js +9 -0
  526. package/dist/field/utils/isMobileWidth.js.map +1 -0
  527. package/dist/field/utils/joinClasses.d.ts +9 -0
  528. package/dist/field/utils/joinClasses.d.ts.map +1 -0
  529. package/dist/field/utils/joinClasses.js +11 -0
  530. package/dist/field/utils/joinClasses.js.map +1 -0
  531. package/dist/field/utils/load-related.d.ts +4 -0
  532. package/dist/field/utils/load-related.d.ts.map +1 -0
  533. package/dist/field/utils/load-related.js +45 -0
  534. package/dist/field/utils/load-related.js.map +1 -0
  535. package/dist/field/utils/point.d.ts +22 -0
  536. package/dist/field/utils/point.d.ts.map +1 -0
  537. package/dist/field/utils/point.js +43 -0
  538. package/dist/field/utils/point.js.map +1 -0
  539. package/dist/field/utils/rect.d.ts +46 -0
  540. package/dist/field/utils/rect.d.ts.map +1 -0
  541. package/dist/field/utils/rect.js +101 -0
  542. package/dist/field/utils/rect.js.map +1 -0
  543. package/dist/field/utils/setFloatingElemPosition.d.ts +2 -0
  544. package/dist/field/utils/setFloatingElemPosition.d.ts.map +1 -0
  545. package/dist/field/utils/setFloatingElemPosition.js +34 -0
  546. package/dist/field/utils/setFloatingElemPosition.js.map +1 -0
  547. package/dist/field/utils/setFloatingElemPositionForLinkEditor.d.ts +2 -0
  548. package/dist/field/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
  549. package/dist/field/utils/setFloatingElemPositionForLinkEditor.js +33 -0
  550. package/dist/field/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  551. package/dist/field/utils/swipe.d.ts +12 -0
  552. package/dist/field/utils/swipe.d.ts.map +1 -0
  553. package/dist/field/utils/swipe.js +100 -0
  554. package/dist/field/utils/swipe.js.map +1 -0
  555. package/dist/field/utils/url.d.ts +11 -0
  556. package/dist/field/utils/url.d.ts.map +1 -0
  557. package/dist/field/utils/url.js +45 -0
  558. package/dist/field/utils/url.js.map +1 -0
  559. package/dist/index.d.ts +3 -0
  560. package/dist/index.d.ts.map +1 -0
  561. package/dist/index.js +3 -0
  562. package/dist/index.js.map +1 -0
  563. package/dist/types.d.ts +33 -0
  564. package/dist/types.d.ts.map +1 -0
  565. package/dist/types.js +2 -0
  566. package/dist/types.js.map +1 -0
  567. package/dist/validate/hasText.d.ts +3 -0
  568. package/dist/validate/hasText.d.ts.map +1 -0
  569. package/dist/validate/hasText.js +29 -0
  570. package/dist/validate/hasText.js.map +1 -0
  571. package/dist/validate/validate-client.d.ts +4 -0
  572. package/dist/validate/validate-client.d.ts.map +1 -0
  573. package/dist/validate/validate-client.js +17 -0
  574. package/dist/validate/validate-client.js.map +1 -0
  575. package/dist/validate/validate-server.d.ts +4 -0
  576. package/dist/validate/validate-server.d.ts.map +1 -0
  577. package/dist/validate/validate-server.js +10 -0
  578. package/dist/validate/validate-server.js.map +1 -0
  579. package/package.json +108 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare function getDOMRangeRect(nativeSelection: Selection, rootElement: HTMLElement): DOMRect;
9
+ //# sourceMappingURL=getDOMRangeRect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDOMRangeRect.d.ts","sourceRoot":"","sources":["../../../src/field/utils/getDOMRangeRect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAgB7F"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export function getDOMRangeRect(nativeSelection, rootElement) {
9
+ const domRange = nativeSelection.getRangeAt(0);
10
+ let rect;
11
+ if (nativeSelection.anchorNode === rootElement) {
12
+ let inner = rootElement;
13
+ while (inner.firstElementChild != null) {
14
+ inner = inner.firstElementChild;
15
+ }
16
+ rect = inner.getBoundingClientRect();
17
+ }
18
+ else {
19
+ rect = domRange.getBoundingClientRect();
20
+ }
21
+ return rect;
22
+ }
23
+ //# sourceMappingURL=getDOMRangeRect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDOMRangeRect.js","sourceRoot":"","sources":["../../../src/field/utils/getDOMRangeRect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,eAA0B,EAAE,WAAwB;IAClF,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAE9C,IAAI,IAAa,CAAA;IAEjB,IAAI,eAAe,CAAC,UAAU,KAAK,WAAW,EAAE,CAAC;QAC/C,IAAI,KAAK,GAAG,WAAW,CAAA;QACvB,OAAO,KAAK,CAAC,iBAAiB,IAAI,IAAI,EAAE,CAAC;YACvC,KAAK,GAAG,KAAK,CAAC,iBAAgC,CAAA;QAChD,CAAC;QACD,IAAI,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAA;IACtC,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,QAAQ,CAAC,qBAAqB,EAAE,CAAA;IACzC,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ElementNode, RangeSelection, TextNode } from 'lexical';
2
+ export declare function getSelectedNode(selection: RangeSelection): TextNode | ElementNode;
3
+ //# sourceMappingURL=getSelectedNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelectedNode.d.ts","sourceRoot":"","sources":["../../../src/field/utils/getSelectedNode.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEpE,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,QAAQ,GAAG,WAAW,CAcjF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import { $isAtNodeEnd } from '@lexical/selection';
9
+ export function getSelectedNode(selection) {
10
+ const anchor = selection.anchor;
11
+ const focus = selection.focus;
12
+ const anchorNode = selection.anchor.getNode();
13
+ const focusNode = selection.focus.getNode();
14
+ if (anchorNode === focusNode) {
15
+ return anchorNode;
16
+ }
17
+ const isBackward = selection.isBackward();
18
+ if (isBackward) {
19
+ return $isAtNodeEnd(focus) ? anchorNode : focusNode;
20
+ }
21
+ else {
22
+ return $isAtNodeEnd(anchor) ? anchorNode : focusNode;
23
+ }
24
+ }
25
+ //# sourceMappingURL=getSelectedNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelectedNode.js","sourceRoot":"","sources":["../../../src/field/utils/getSelectedNode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,MAAM,UAAU,eAAe,CAAC,SAAyB;IACvD,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;IAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAA;IAC7B,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7C,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;IAC3C,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAA;IACnB,CAAC;IACD,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,CAAA;IACzC,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAA;IACrD,CAAC;SAAM,CAAC;QACN,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAA;IACtD,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare function isHTMLElement(x: unknown): x is HTMLElement;
9
+ //# sourceMappingURL=guard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/field/utils/guard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,WAAW,CAE1D"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export function isHTMLElement(x) {
9
+ return x instanceof HTMLElement;
10
+ }
11
+ //# sourceMappingURL=guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard.js","sourceRoot":"","sources":["../../../src/field/utils/guard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,CAAU;IACtC,OAAO,CAAC,YAAY,WAAW,CAAA;AACjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SerializedEditorState } from 'lexical';
2
+ export declare function hashSerializedState(state: SerializedEditorState | string): string;
3
+ //# sourceMappingURL=hashSerializedState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashSerializedState.d.ts","sourceRoot":"","sources":["../../../src/field/utils/hashSerializedState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,GAAG,MAAM,CAUjF"}
@@ -0,0 +1,32 @@
1
+ // Simple FNV-1a hash for serialized editor state.
2
+ // Used to detect external value changes without deep-equality costs.
3
+ export function hashSerializedState(state) {
4
+ const str = typeof state === 'string' ? state : stableJsonStringify(state);
5
+ let hash = 2166136261 >>> 0;
6
+ for (let i = 0; i < str.length; i++) {
7
+ hash ^= str.charCodeAt(i);
8
+ hash = Math.imul(hash, 16777619);
9
+ }
10
+ return (hash >>> 0).toString(16);
11
+ }
12
+ function stableJsonStringify(value) {
13
+ // Lexical/Payload states are plain JSON-ish objects.
14
+ // We sort object keys to ensure semantically identical objects hash the same,
15
+ // even if key insertion order differs (e.g. { relationTo, value } vs { value, relationTo }).
16
+ return JSON.stringify(value, (_key, val) => {
17
+ if (val == null)
18
+ return val;
19
+ if (Array.isArray(val))
20
+ return val;
21
+ if (typeof val !== 'object')
22
+ return val;
23
+ const obj = val;
24
+ const keys = Object.keys(obj).sort();
25
+ const sorted = {};
26
+ for (const key of keys) {
27
+ sorted[key] = obj[key];
28
+ }
29
+ return sorted;
30
+ });
31
+ }
32
+ //# sourceMappingURL=hashSerializedState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashSerializedState.js","sourceRoot":"","sources":["../../../src/field/utils/hashSerializedState.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,qEAAqE;AACrE,MAAM,UAAU,mBAAmB,CAAC,KAAqC;IACvE,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;IAC1E,IAAI,IAAI,GAAG,UAAU,KAAK,CAAC,CAAA;IAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QACzB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;AAClC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,qDAAqD;IACrD,8EAA8E;IAC9E,6FAA6F;IAC7F,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACzC,IAAI,GAAG,IAAI,IAAI;YAAE,OAAO,GAAG,CAAA;QAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAA;QAClC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAA;QAEvC,MAAM,GAAG,GAAG,GAA8B,CAAA;QAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;QACpC,MAAM,MAAM,GAA4B,EAAE,CAAA;QAC1C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACxB,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ export {};
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ //# sourceMappingURL=isMobileWidth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobileWidth.d.ts","sourceRoot":"","sources":["../../../src/field/utils/isMobileWidth.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ export {};
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ //# sourceMappingURL=isMobileWidth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobileWidth.js","sourceRoot":"","sources":["../../../src/field/utils/isMobileWidth.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export default function joinClasses(...args: Array<string | boolean | null | undefined>): string;
9
+ //# sourceMappingURL=joinClasses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinClasses.d.ts","sourceRoot":"","sources":["../../../src/field/utils/joinClasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAE/F"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export default function joinClasses(...args) {
9
+ return args.filter(Boolean).join(' ');
10
+ }
11
+ //# sourceMappingURL=joinClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinClasses.js","sourceRoot":"","sources":["../../../src/field/utils/joinClasses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,IAAgD;IACrF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACvC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Payload, RequestContext } from 'payload';
2
+ export declare function loadRelated(payload: Payload, value: string, relationTo: string, depth: number, locale: any): Promise<any | null>;
3
+ export declare function loadRelatedWithContext(payload: Payload, context: RequestContext, contextKey: string, value: string, relationTo: string, depth: number, locale: any): Promise<any | null>;
4
+ //# sourceMappingURL=load-related.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-related.d.ts","sourceRoot":"","sources":["../../../src/field/utils/load-related.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEtD,wBAAsB,WAAW,CAC/B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,GAAG,GACV,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAarB;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,GAAG,GACV,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CA0BrB"}
@@ -0,0 +1,45 @@
1
+ export async function loadRelated(payload, value, relationTo, depth, locale) {
2
+ try {
3
+ const relatedDoc = await payload.findByID({
4
+ collection: relationTo,
5
+ id: value,
6
+ depth,
7
+ locale,
8
+ });
9
+ return relatedDoc;
10
+ }
11
+ catch (error) {
12
+ console.error(error);
13
+ return null;
14
+ }
15
+ }
16
+ export async function loadRelatedWithContext(payload, context, contextKey, value, relationTo, depth, locale) {
17
+ try {
18
+ if (context[contextKey] == null) {
19
+ context[contextKey] = [value];
20
+ }
21
+ else {
22
+ // @ts-expect-error
23
+ if (context[contextKey].includes(value)) {
24
+ return null;
25
+ }
26
+ else {
27
+ // @ts-expect-error
28
+ context[contextKey].push(value);
29
+ }
30
+ }
31
+ const relatedDoc = await payload.findByID({
32
+ context,
33
+ collection: relationTo,
34
+ id: value,
35
+ depth,
36
+ locale,
37
+ });
38
+ return relatedDoc;
39
+ }
40
+ catch (error) {
41
+ console.error(error);
42
+ return null;
43
+ }
44
+ }
45
+ //# sourceMappingURL=load-related.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-related.js","sourceRoot":"","sources":["../../../src/field/utils/load-related.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAgB,EAChB,KAAa,EACb,UAAkB,EAClB,KAAa,EACb,MAAW;IAEX,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC;YACxC,UAAU,EAAE,UAAU;YACtB,EAAE,EAAE,KAAK;YACT,KAAK;YACL,MAAM;SACP,CAAC,CAAA;QACF,OAAO,UAAU,CAAA;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAgB,EAChB,OAAuB,EACvB,UAAkB,EAClB,KAAa,EACb,UAAkB,EAClB,KAAa,EACb,MAAW;IAEX,IAAI,CAAC;QACH,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;YAChC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC/B,CAAC;aAAM,CAAC;YACN,mBAAmB;YACnB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxC,OAAO,IAAI,CAAA;YACb,CAAC;iBAAM,CAAC;gBACN,mBAAmB;gBACnB,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACjC,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC;YACxC,OAAO;YACP,UAAU,EAAE,UAAU;YACtB,EAAE,EAAE,KAAK;YACT,KAAK;YACL,MAAM;SACP,CAAC,CAAA;QACF,OAAO,UAAU,CAAA;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare class Point {
9
+ private readonly _x;
10
+ private readonly _y;
11
+ constructor(x: number, y: number);
12
+ get x(): number;
13
+ get y(): number;
14
+ equals({ x, y }: Point): boolean;
15
+ calcDeltaXTo({ x }: Point): number;
16
+ calcDeltaYTo({ y }: Point): number;
17
+ calcHorizontalDistanceTo(point: Point): number;
18
+ calcVerticalDistance(point: Point): number;
19
+ calcDistanceTo(point: Point): number;
20
+ }
21
+ export declare function isPoint(x: unknown): x is Point;
22
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/field/utils/point.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAQ;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAQ;gBAEf,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAKhC,IAAI,CAAC,IAAI,MAAM,CAEd;IAED,IAAI,CAAC,IAAI,MAAM,CAEd;IAEM,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,OAAO;IAIhC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM;IAIlC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM;IAIlC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAI9C,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAI1C,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;CAG5C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,KAAK,CAE9C"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export class Point {
9
+ _x;
10
+ _y;
11
+ constructor(x, y) {
12
+ this._x = x;
13
+ this._y = y;
14
+ }
15
+ get x() {
16
+ return this._x;
17
+ }
18
+ get y() {
19
+ return this._y;
20
+ }
21
+ equals({ x, y }) {
22
+ return this.x === x && this.y === y;
23
+ }
24
+ calcDeltaXTo({ x }) {
25
+ return this.x - x;
26
+ }
27
+ calcDeltaYTo({ y }) {
28
+ return this.y - y;
29
+ }
30
+ calcHorizontalDistanceTo(point) {
31
+ return Math.abs(this.calcDeltaXTo(point));
32
+ }
33
+ calcVerticalDistance(point) {
34
+ return Math.abs(this.calcDeltaYTo(point));
35
+ }
36
+ calcDistanceTo(point) {
37
+ return Math.sqrt(this.calcDeltaXTo(point) ** 2 + this.calcDeltaYTo(point) ** 2);
38
+ }
39
+ }
40
+ export function isPoint(x) {
41
+ return x instanceof Point;
42
+ }
43
+ //# sourceMappingURL=point.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.js","sourceRoot":"","sources":["../../../src/field/utils/point.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IACC,EAAE,CAAQ;IACV,EAAE,CAAQ;IAE3B,YAAY,CAAS,EAAE,CAAS;QAC9B,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;QACX,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;IACb,CAAC;IAED,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,EAAE,CAAA;IAChB,CAAC;IAED,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,EAAE,CAAA;IAChB,CAAC;IAEM,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAS;QAC3B,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAA;IACrC,CAAC;IAEM,YAAY,CAAC,EAAE,CAAC,EAAS;QAC9B,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAEM,YAAY,CAAC,EAAE,CAAC,EAAS;QAC9B,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAEM,wBAAwB,CAAC,KAAY;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;IAC3C,CAAC;IAEM,oBAAoB,CAAC,KAAY;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;IAC3C,CAAC;IAEM,cAAc,CAAC,KAAY;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IACjF,CAAC;CACF;AAED,MAAM,UAAU,OAAO,CAAC,CAAU;IAChC,OAAO,CAAC,YAAY,KAAK,CAAA;AAC3B,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import { type Point } from './point';
9
+ interface ContainsPointReturn {
10
+ result: boolean;
11
+ reason: {
12
+ isOnTopSide: boolean;
13
+ isOnBottomSide: boolean;
14
+ isOnLeftSide: boolean;
15
+ isOnRightSide: boolean;
16
+ };
17
+ }
18
+ export declare class Rect {
19
+ private readonly _left;
20
+ private readonly _top;
21
+ private readonly _right;
22
+ private readonly _bottom;
23
+ constructor(left: number, top: number, right: number, bottom: number);
24
+ get top(): number;
25
+ get right(): number;
26
+ get bottom(): number;
27
+ get left(): number;
28
+ get width(): number;
29
+ get height(): number;
30
+ equals({ top, left, bottom, right }: Rect): boolean;
31
+ contains({ x, y }: Point): ContainsPointReturn;
32
+ contains({ top, left, bottom, right }: Rect): boolean;
33
+ intersectsWith(rect: Rect): boolean;
34
+ generateNewRect({ left, top, right, bottom, }: {
35
+ left?: number | undefined;
36
+ top?: number | undefined;
37
+ right?: number | undefined;
38
+ bottom?: number | undefined;
39
+ }): Rect;
40
+ static fromLTRB(left: number, top: number, right: number, bottom: number): Rect;
41
+ static fromLWTH(left: number, width: number, top: number, height: number): Rect;
42
+ static fromPoints(startPoint: Point, endPoint: Point): Rect;
43
+ static fromDOM(dom: HTMLElement): Rect;
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=rect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect.d.ts","sourceRoot":"","sources":["../../../src/field/utils/rect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAE7C,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE;QACN,WAAW,EAAE,OAAO,CAAA;QACpB,cAAc,EAAE,OAAO,CAAA;QACvB,YAAY,EAAE,OAAO,CAAA;QACrB,aAAa,EAAE,OAAO,CAAA;KACvB,CAAA;CACF;AAED,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAQ;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA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
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import { isPoint } from './point';
9
+ export class Rect {
10
+ _left;
11
+ _top;
12
+ _right;
13
+ _bottom;
14
+ constructor(left, top, right, bottom) {
15
+ const [physicTop, physicBottom] = top <= bottom ? [top, bottom] : [bottom, top];
16
+ const [physicLeft, physicRight] = left <= right ? [left, right] : [right, left];
17
+ this._top = physicTop;
18
+ this._right = physicRight;
19
+ this._left = physicLeft;
20
+ this._bottom = physicBottom;
21
+ }
22
+ get top() {
23
+ return this._top;
24
+ }
25
+ get right() {
26
+ return this._right;
27
+ }
28
+ get bottom() {
29
+ return this._bottom;
30
+ }
31
+ get left() {
32
+ return this._left;
33
+ }
34
+ get width() {
35
+ return Math.abs(this._left - this._right);
36
+ }
37
+ get height() {
38
+ return Math.abs(this._bottom - this._top);
39
+ }
40
+ equals({ top, left, bottom, right }) {
41
+ return (top === this._top && bottom === this._bottom && left === this._left && right === this._right);
42
+ }
43
+ contains(target) {
44
+ if (isPoint(target)) {
45
+ const { x, y } = target;
46
+ const isOnTopSide = y < this._top;
47
+ const isOnBottomSide = y > this._bottom;
48
+ const isOnLeftSide = x < this._left;
49
+ const isOnRightSide = x > this._right;
50
+ const result = !isOnTopSide && !isOnBottomSide && !isOnLeftSide && !isOnRightSide;
51
+ return {
52
+ reason: {
53
+ isOnBottomSide,
54
+ isOnLeftSide,
55
+ isOnRightSide,
56
+ isOnTopSide,
57
+ },
58
+ result,
59
+ };
60
+ }
61
+ else {
62
+ const { top, left, bottom, right } = target;
63
+ return (top >= this._top &&
64
+ top <= this._bottom &&
65
+ bottom >= this._top &&
66
+ bottom <= this._bottom &&
67
+ left >= this._left &&
68
+ left <= this._right &&
69
+ right >= this._left &&
70
+ right <= this._right);
71
+ }
72
+ }
73
+ intersectsWith(rect) {
74
+ const { left: x1, top: y1, width: w1, height: h1 } = rect;
75
+ const { left: x2, top: y2, width: w2, height: h2 } = this;
76
+ const maxX = x1 + w1 >= x2 + w2 ? x1 + w1 : x2 + w2;
77
+ const maxY = y1 + h1 >= y2 + h2 ? y1 + h1 : y2 + h2;
78
+ const minX = x1 <= x2 ? x1 : x2;
79
+ const minY = y1 <= y2 ? y1 : y2;
80
+ return maxX - minX <= w1 + w2 && maxY - minY <= h1 + h2;
81
+ }
82
+ generateNewRect({ left = this.left, top = this.top, right = this.right, bottom = this.bottom, }) {
83
+ return new Rect(left, top, right, bottom);
84
+ }
85
+ static fromLTRB(left, top, right, bottom) {
86
+ return new Rect(left, top, right, bottom);
87
+ }
88
+ static fromLWTH(left, width, top, height) {
89
+ return new Rect(left, top, left + width, top + height);
90
+ }
91
+ static fromPoints(startPoint, endPoint) {
92
+ const { y: top, x: left } = startPoint;
93
+ const { y: bottom, x: right } = endPoint;
94
+ return Rect.fromLTRB(left, top, right, bottom);
95
+ }
96
+ static fromDOM(dom) {
97
+ const { top, width, left, height } = dom.getBoundingClientRect();
98
+ return Rect.fromLWTH(left, width, top, height);
99
+ }
100
+ }
101
+ //# sourceMappingURL=rect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect.js","sourceRoot":"","sources":["../../../src/field/utils/rect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAc,MAAM,SAAS,CAAA;AAY7C,MAAM,OAAO,IAAI;IACE,KAAK,CAAQ;IACb,IAAI,CAAQ;IACZ,MAAM,CAAQ;IACd,OAAO,CAAQ;IAEhC,YAAY,IAAY,EAAE,GAAW,EAAE,KAAa,EAAE,MAAc;QAClE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QAE/E,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,C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;QACtC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAA;QACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,GAAgB;QAC7B,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAA;QAChE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export declare function setFloatingElemPosition(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, isLink?: boolean, verticalGap?: number, horizontalOffset?: number): void;
2
+ //# sourceMappingURL=setFloatingElemPosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPosition.d.ts","sourceRoot":"","sources":["../../../src/field/utils/setFloatingElemPosition.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,OAAO,GAAG,IAAI,EAC1B,YAAY,EAAE,WAAW,EACzB,UAAU,EAAE,WAAW,EACvB,MAAM,GAAE,OAAe,EACvB,WAAW,GAAE,MAAqB,EAClC,gBAAgB,GAAE,MAA0B,GAC3C,IAAI,CA8BN"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ const VERTICAL_GAP = 10;
9
+ const HORIZONTAL_OFFSET = 5;
10
+ export function setFloatingElemPosition(targetRect, floatingElem, anchorElem, isLink = false, verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET) {
11
+ const scrollerElem = anchorElem.parentElement;
12
+ if (targetRect === null || scrollerElem == null) {
13
+ floatingElem.style.opacity = '0';
14
+ floatingElem.style.transform = 'translate(-10000px, -10000px)';
15
+ return;
16
+ }
17
+ const floatingElemRect = floatingElem.getBoundingClientRect();
18
+ const anchorElementRect = anchorElem.getBoundingClientRect();
19
+ const editorScrollerRect = scrollerElem.getBoundingClientRect();
20
+ let top = targetRect.top - floatingElemRect.height - verticalGap;
21
+ let left = targetRect.left - horizontalOffset;
22
+ if (top < editorScrollerRect.top) {
23
+ // adjusted height for link element if the element is at top
24
+ top += floatingElemRect.height + targetRect.height + verticalGap * (isLink ? 9 : 2);
25
+ }
26
+ if (left + floatingElemRect.width > editorScrollerRect.right) {
27
+ left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
28
+ }
29
+ top -= anchorElementRect.top;
30
+ left -= anchorElementRect.left;
31
+ floatingElem.style.opacity = '1';
32
+ floatingElem.style.transform = `translate(${left}px, ${top}px)`;
33
+ }
34
+ //# sourceMappingURL=setFloatingElemPosition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPosition.js","sourceRoot":"","sources":["../../../src/field/utils/setFloatingElemPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,EAAE,CAAA;AACvB,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAE3B,MAAM,UAAU,uBAAuB,CACrC,UAA0B,EAC1B,YAAyB,EACzB,UAAuB,EACvB,SAAkB,KAAK,EACvB,cAAsB,YAAY,EAClC,mBAA2B,iBAAiB;IAE5C,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAA;IAE7C,IAAI,UAAU,KAAK,IAAI,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;QAChD,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;QAChC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,+BAA+B,CAAA;QAC9D,OAAM;IACR,CAAC;IAED,MAAM,gBAAgB,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAA;IAC7D,MAAM,iBAAiB,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAA;IAC5D,MAAM,kBAAkB,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAA;IAE/D,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,gBAAgB,CAAC,MAAM,GAAG,WAAW,CAAA;IAChE,IAAI,IAAI,GAAG,UAAU,CAAC,IAAI,GAAG,gBAAgB,CAAA;IAE7C,IAAI,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;QACjC,4DAA4D;QAC5D,GAAG,IAAI,gBAAgB,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACrF,CAAC;IAED,IAAI,IAAI,GAAG,gBAAgB,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAC7D,IAAI,GAAG,kBAAkB,CAAC,KAAK,GAAG,gBAAgB,CAAC,KAAK,GAAG,gBAAgB,CAAA;IAC7E,CAAC;IAED,GAAG,IAAI,iBAAiB,CAAC,GAAG,CAAA;IAC5B,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAA;IAE9B,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;IAChC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,aAAa,IAAI,OAAO,GAAG,KAAK,CAAA;AACjE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function setFloatingElemPositionForLinkEditor(targetRect: ClientRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number, horizontalOffset?: number): void;
2
+ //# sourceMappingURL=setFloatingElemPositionForLinkEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPositionForLinkEditor.d.ts","sourceRoot":"","sources":["../../../src/field/utils/setFloatingElemPositionForLinkEditor.ts"],"names":[],"mappings":"AAUA,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,UAAU,GAAG,IAAI,EAC7B,YAAY,EAAE,WAAW,EACzB,UAAU,EAAE,WAAW,EACvB,WAAW,GAAE,MAAqB,EAClC,gBAAgB,GAAE,MAA0B,GAC3C,IAAI,CA6BN"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ const VERTICAL_GAP = 10;
9
+ const HORIZONTAL_OFFSET = 5;
10
+ export function setFloatingElemPositionForLinkEditor(targetRect, floatingElem, anchorElem, verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET) {
11
+ const scrollerElem = anchorElem.parentElement;
12
+ if (targetRect === null || scrollerElem == null) {
13
+ floatingElem.style.opacity = '0';
14
+ floatingElem.style.transform = 'translate(-10000px, -10000px)';
15
+ return;
16
+ }
17
+ const floatingElemRect = floatingElem.getBoundingClientRect();
18
+ const anchorElementRect = anchorElem.getBoundingClientRect();
19
+ const editorScrollerRect = scrollerElem.getBoundingClientRect();
20
+ let top = targetRect.top - verticalGap;
21
+ let left = targetRect.left - horizontalOffset;
22
+ if (top < editorScrollerRect.top) {
23
+ top += floatingElemRect.height + targetRect.height + verticalGap * 2;
24
+ }
25
+ if (left + floatingElemRect.width > editorScrollerRect.right) {
26
+ left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
27
+ }
28
+ top -= anchorElementRect.top;
29
+ left -= anchorElementRect.left;
30
+ floatingElem.style.opacity = '1';
31
+ floatingElem.style.transform = `translate(${left}px, ${top}px)`;
32
+ }
33
+ //# sourceMappingURL=setFloatingElemPositionForLinkEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPositionForLinkEditor.js","sourceRoot":"","sources":["../../../src/field/ut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AE9B,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;IAChC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,aAAa,IAAI,OAAO,GAAG,KAAK,CAAA;AACjE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare function addSwipeLeftListener(element: HTMLElement, cb: (_force: number, e: TouchEvent) => void): () => void;
9
+ export declare function addSwipeRightListener(element: HTMLElement, cb: (_force: number, e: TouchEvent) => void): () => void;
10
+ export declare function addSwipeUpListener(element: HTMLElement, cb: (_force: number, e: TouchEvent) => void): () => void;
11
+ export declare function addSwipeDownListener(element: HTMLElement, cb: (_force: number, e: TouchEvent) => void): () => void;
12
+ //# sourceMappingURL=swipe.d.ts.map