@olddevs/ui 0.0.0-stage → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1553) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +100 -0
  4. package/README.md +145 -2
  5. package/README.ru.md +146 -0
  6. package/dist/color.d.ts +22 -0
  7. package/dist/color.d.ts.map +1 -0
  8. package/dist/color.js +2 -0
  9. package/dist/color.js.map +1 -0
  10. package/dist/components/actions/Alert.d.ts +46 -0
  11. package/dist/components/actions/Alert.d.ts.map +1 -0
  12. package/dist/components/actions/Alert.js +20 -0
  13. package/dist/components/actions/Alert.js.map +1 -0
  14. package/dist/components/actions/Banner.d.ts +58 -0
  15. package/dist/components/actions/Banner.d.ts.map +1 -0
  16. package/dist/components/actions/Banner.js +20 -0
  17. package/dist/components/actions/Banner.js.map +1 -0
  18. package/dist/components/actions/Button.d.ts +79 -0
  19. package/dist/components/actions/Button.d.ts.map +1 -0
  20. package/dist/components/actions/Button.js +29 -0
  21. package/dist/components/actions/Button.js.map +1 -0
  22. package/dist/components/actions/ButtonGroup.d.ts +32 -0
  23. package/dist/components/actions/ButtonGroup.d.ts.map +1 -0
  24. package/dist/components/actions/ButtonGroup.js +10 -0
  25. package/dist/components/actions/ButtonGroup.js.map +1 -0
  26. package/dist/components/actions/Chip.d.ts +36 -0
  27. package/dist/components/actions/Chip.d.ts.map +1 -0
  28. package/dist/components/actions/Chip.js +16 -0
  29. package/dist/components/actions/Chip.js.map +1 -0
  30. package/dist/components/actions/CopyButton.d.ts +32 -0
  31. package/dist/components/actions/CopyButton.d.ts.map +1 -0
  32. package/dist/components/actions/CopyButton.js +41 -0
  33. package/dist/components/actions/CopyButton.js.map +1 -0
  34. package/dist/components/actions/Progress.d.ts +36 -0
  35. package/dist/components/actions/Progress.d.ts.map +1 -0
  36. package/dist/components/actions/Progress.js +14 -0
  37. package/dist/components/actions/Progress.js.map +1 -0
  38. package/dist/components/actions/Segmented.d.ts +64 -0
  39. package/dist/components/actions/Segmented.d.ts.map +1 -0
  40. package/dist/components/actions/Segmented.js +14 -0
  41. package/dist/components/actions/Segmented.js.map +1 -0
  42. package/dist/components/actions/Spinner.d.ts +46 -0
  43. package/dist/components/actions/Spinner.d.ts.map +1 -0
  44. package/dist/components/actions/Spinner.js +17 -0
  45. package/dist/components/actions/Spinner.js.map +1 -0
  46. package/dist/components/actions/SplitButton.d.ts +92 -0
  47. package/dist/components/actions/SplitButton.d.ts.map +1 -0
  48. package/dist/components/actions/SplitButton.js +21 -0
  49. package/dist/components/actions/SplitButton.js.map +1 -0
  50. package/dist/components/actions/StatusBadge.d.ts +26 -0
  51. package/dist/components/actions/StatusBadge.d.ts.map +1 -0
  52. package/dist/components/actions/StatusBadge.js +14 -0
  53. package/dist/components/actions/StatusBadge.js.map +1 -0
  54. package/dist/components/actions/Toaster.d.ts +83 -0
  55. package/dist/components/actions/Toaster.d.ts.map +1 -0
  56. package/dist/components/actions/Toaster.js +38 -0
  57. package/dist/components/actions/Toaster.js.map +1 -0
  58. package/dist/components/actions/Toggle.d.ts +75 -0
  59. package/dist/components/actions/Toggle.d.ts.map +1 -0
  60. package/dist/components/actions/Toggle.js +39 -0
  61. package/dist/components/actions/Toggle.js.map +1 -0
  62. package/dist/components/actions/ToggleGroup.d.ts +63 -0
  63. package/dist/components/actions/ToggleGroup.d.ts.map +1 -0
  64. package/dist/components/actions/ToggleGroup.js +30 -0
  65. package/dist/components/actions/ToggleGroup.js.map +1 -0
  66. package/dist/components/actions/Toolbar.d.ts +52 -0
  67. package/dist/components/actions/Toolbar.d.ts.map +1 -0
  68. package/dist/components/actions/Toolbar.js +98 -0
  69. package/dist/components/actions/Toolbar.js.map +1 -0
  70. package/dist/components/actions/Truncate.d.ts +31 -0
  71. package/dist/components/actions/Truncate.d.ts.map +1 -0
  72. package/dist/components/actions/Truncate.js +32 -0
  73. package/dist/components/actions/Truncate.js.map +1 -0
  74. package/dist/components/app-shell/AppShell.d.ts +106 -0
  75. package/dist/components/app-shell/AppShell.d.ts.map +1 -0
  76. package/dist/components/app-shell/AppShell.js +29 -0
  77. package/dist/components/app-shell/AppShell.js.map +1 -0
  78. package/dist/components/app-shell/MobileTabBar.d.ts +130 -0
  79. package/dist/components/app-shell/MobileTabBar.d.ts.map +1 -0
  80. package/dist/components/app-shell/MobileTabBar.js +50 -0
  81. package/dist/components/app-shell/MobileTabBar.js.map +1 -0
  82. package/dist/components/app-shell/NavItem.d.ts +72 -0
  83. package/dist/components/app-shell/NavItem.d.ts.map +1 -0
  84. package/dist/components/app-shell/NavItem.js +22 -0
  85. package/dist/components/app-shell/NavItem.js.map +1 -0
  86. package/dist/components/app-shell/SideNav.d.ts +65 -0
  87. package/dist/components/app-shell/SideNav.d.ts.map +1 -0
  88. package/dist/components/app-shell/SideNav.js +31 -0
  89. package/dist/components/app-shell/SideNav.js.map +1 -0
  90. package/dist/components/app-shell/SplitPanel.d.ts +121 -0
  91. package/dist/components/app-shell/SplitPanel.d.ts.map +1 -0
  92. package/dist/components/app-shell/SplitPanel.js +88 -0
  93. package/dist/components/app-shell/SplitPanel.js.map +1 -0
  94. package/dist/components/app-shell/TopBar.d.ts +43 -0
  95. package/dist/components/app-shell/TopBar.d.ts.map +1 -0
  96. package/dist/components/app-shell/TopBar.js +24 -0
  97. package/dist/components/app-shell/TopBar.js.map +1 -0
  98. package/dist/components/content/AspectRatio.d.ts +25 -0
  99. package/dist/components/content/AspectRatio.d.ts.map +1 -0
  100. package/dist/components/content/AspectRatio.js +7 -0
  101. package/dist/components/content/AspectRatio.js.map +1 -0
  102. package/dist/components/content/Avatar.d.ts +22 -0
  103. package/dist/components/content/Avatar.d.ts.map +1 -0
  104. package/dist/components/content/Avatar.js +23 -0
  105. package/dist/components/content/Avatar.js.map +1 -0
  106. package/dist/components/content/AvatarGroup.d.ts +42 -0
  107. package/dist/components/content/AvatarGroup.d.ts.map +1 -0
  108. package/dist/components/content/AvatarGroup.js +11 -0
  109. package/dist/components/content/AvatarGroup.js.map +1 -0
  110. package/dist/components/content/Badge.d.ts +41 -0
  111. package/dist/components/content/Badge.d.ts.map +1 -0
  112. package/dist/components/content/Badge.js +13 -0
  113. package/dist/components/content/Badge.js.map +1 -0
  114. package/dist/components/content/Card.d.ts +59 -0
  115. package/dist/components/content/Card.d.ts.map +1 -0
  116. package/dist/components/content/Card.js +20 -0
  117. package/dist/components/content/Card.js.map +1 -0
  118. package/dist/components/content/Carousel.d.ts +79 -0
  119. package/dist/components/content/Carousel.d.ts.map +1 -0
  120. package/dist/components/content/Carousel.js +172 -0
  121. package/dist/components/content/Carousel.js.map +1 -0
  122. package/dist/components/content/CodeView.d.ts +76 -0
  123. package/dist/components/content/CodeView.d.ts.map +1 -0
  124. package/dist/components/content/CodeView.js +12 -0
  125. package/dist/components/content/CodeView.js.map +1 -0
  126. package/dist/components/content/DescriptionList.d.ts +31 -0
  127. package/dist/components/content/DescriptionList.d.ts.map +1 -0
  128. package/dist/components/content/DescriptionList.js +10 -0
  129. package/dist/components/content/DescriptionList.js.map +1 -0
  130. package/dist/components/content/EditableList.d.ts +162 -0
  131. package/dist/components/content/EditableList.d.ts.map +1 -0
  132. package/dist/components/content/EditableList.js +241 -0
  133. package/dist/components/content/EditableList.js.map +1 -0
  134. package/dist/components/content/EmptyState.d.ts +31 -0
  135. package/dist/components/content/EmptyState.d.ts.map +1 -0
  136. package/dist/components/content/EmptyState.js +9 -0
  137. package/dist/components/content/EmptyState.js.map +1 -0
  138. package/dist/components/content/ErrorState.d.ts +52 -0
  139. package/dist/components/content/ErrorState.d.ts.map +1 -0
  140. package/dist/components/content/ErrorState.js +16 -0
  141. package/dist/components/content/ErrorState.js.map +1 -0
  142. package/dist/components/content/Grid.d.ts +57 -0
  143. package/dist/components/content/Grid.d.ts.map +1 -0
  144. package/dist/components/content/Grid.js +85 -0
  145. package/dist/components/content/Grid.js.map +1 -0
  146. package/dist/components/content/Heading.d.ts +43 -0
  147. package/dist/components/content/Heading.d.ts.map +1 -0
  148. package/dist/components/content/Heading.js +21 -0
  149. package/dist/components/content/Heading.js.map +1 -0
  150. package/dist/components/content/Image.d.ts +94 -0
  151. package/dist/components/content/Image.d.ts.map +1 -0
  152. package/dist/components/content/Image.js +41 -0
  153. package/dist/components/content/Image.js.map +1 -0
  154. package/dist/components/content/Kbd.d.ts +31 -0
  155. package/dist/components/content/Kbd.d.ts.map +1 -0
  156. package/dist/components/content/Kbd.js +13 -0
  157. package/dist/components/content/Kbd.js.map +1 -0
  158. package/dist/components/content/Keyboard.d.ts +32 -0
  159. package/dist/components/content/Keyboard.d.ts.map +1 -0
  160. package/dist/components/content/Keyboard.js +381 -0
  161. package/dist/components/content/Keyboard.js.map +1 -0
  162. package/dist/components/content/Link.d.ts +46 -0
  163. package/dist/components/content/Link.d.ts.map +1 -0
  164. package/dist/components/content/Link.js +38 -0
  165. package/dist/components/content/Link.js.map +1 -0
  166. package/dist/components/content/MediaCard.d.ts +56 -0
  167. package/dist/components/content/MediaCard.d.ts.map +1 -0
  168. package/dist/components/content/MediaCard.js +15 -0
  169. package/dist/components/content/MediaCard.js.map +1 -0
  170. package/dist/components/content/NotificationCenter.d.ts +68 -0
  171. package/dist/components/content/NotificationCenter.d.ts.map +1 -0
  172. package/dist/components/content/NotificationCenter.js +14 -0
  173. package/dist/components/content/NotificationCenter.js.map +1 -0
  174. package/dist/components/content/NotificationList.d.ts +111 -0
  175. package/dist/components/content/NotificationList.d.ts.map +1 -0
  176. package/dist/components/content/NotificationList.js +48 -0
  177. package/dist/components/content/NotificationList.js.map +1 -0
  178. package/dist/components/content/ScrollArea.d.ts +30 -0
  179. package/dist/components/content/ScrollArea.d.ts.map +1 -0
  180. package/dist/components/content/ScrollArea.js +7 -0
  181. package/dist/components/content/ScrollArea.js.map +1 -0
  182. package/dist/components/content/Separator.d.ts +19 -0
  183. package/dist/components/content/Separator.d.ts.map +1 -0
  184. package/dist/components/content/Separator.js +14 -0
  185. package/dist/components/content/Separator.js.map +1 -0
  186. package/dist/components/content/Skeleton.d.ts +24 -0
  187. package/dist/components/content/Skeleton.d.ts.map +1 -0
  188. package/dist/components/content/Skeleton.js +8 -0
  189. package/dist/components/content/Skeleton.js.map +1 -0
  190. package/dist/components/content/SortableList.d.ts +98 -0
  191. package/dist/components/content/SortableList.d.ts.map +1 -0
  192. package/dist/components/content/SortableList.js +46 -0
  193. package/dist/components/content/SortableList.js.map +1 -0
  194. package/dist/components/content/Stat.d.ts +46 -0
  195. package/dist/components/content/Stat.d.ts.map +1 -0
  196. package/dist/components/content/Stat.js +12 -0
  197. package/dist/components/content/Stat.js.map +1 -0
  198. package/dist/components/content/Table.d.ts +110 -0
  199. package/dist/components/content/Table.d.ts.map +1 -0
  200. package/dist/components/content/Table.js +66 -0
  201. package/dist/components/content/Table.js.map +1 -0
  202. package/dist/components/content/TagGroup.d.ts +120 -0
  203. package/dist/components/content/TagGroup.d.ts.map +1 -0
  204. package/dist/components/content/TagGroup.js +20 -0
  205. package/dist/components/content/TagGroup.js.map +1 -0
  206. package/dist/components/content/Text.d.ts +55 -0
  207. package/dist/components/content/Text.d.ts.map +1 -0
  208. package/dist/components/content/Text.js +27 -0
  209. package/dist/components/content/Text.js.map +1 -0
  210. package/dist/components/content/Timeline.d.ts +50 -0
  211. package/dist/components/content/Timeline.d.ts.map +1 -0
  212. package/dist/components/content/Timeline.js +15 -0
  213. package/dist/components/content/Timeline.js.map +1 -0
  214. package/dist/components/content/VirtualGrid.d.ts +171 -0
  215. package/dist/components/content/VirtualGrid.d.ts.map +1 -0
  216. package/dist/components/content/VirtualGrid.js +267 -0
  217. package/dist/components/content/VirtualGrid.js.map +1 -0
  218. package/dist/components/content/VisuallyHidden.d.ts +24 -0
  219. package/dist/components/content/VisuallyHidden.d.ts.map +1 -0
  220. package/dist/components/content/VisuallyHidden.js +3 -0
  221. package/dist/components/content/VisuallyHidden.js.map +1 -0
  222. package/dist/components/content/keyboardEditing.d.ts +15 -0
  223. package/dist/components/content/keyboardEditing.d.ts.map +1 -0
  224. package/dist/components/content/keyboardEditing.js +28 -0
  225. package/dist/components/content/keyboardEditing.js.map +1 -0
  226. package/dist/components/content/useDragToSelect.d.ts +41 -0
  227. package/dist/components/content/useDragToSelect.d.ts.map +1 -0
  228. package/dist/components/content/useDragToSelect.js +190 -0
  229. package/dist/components/content/useDragToSelect.js.map +1 -0
  230. package/dist/components/date-time/Calendar.d.ts +67 -0
  231. package/dist/components/date-time/Calendar.d.ts.map +1 -0
  232. package/dist/components/date-time/Calendar.js +28 -0
  233. package/dist/components/date-time/Calendar.js.map +1 -0
  234. package/dist/components/date-time/DatePicker.d.ts +57 -0
  235. package/dist/components/date-time/DatePicker.d.ts.map +1 -0
  236. package/dist/components/date-time/DatePicker.js +37 -0
  237. package/dist/components/date-time/DatePicker.js.map +1 -0
  238. package/dist/components/date-time/DateRangePicker.d.ts +91 -0
  239. package/dist/components/date-time/DateRangePicker.d.ts.map +1 -0
  240. package/dist/components/date-time/DateRangePicker.js +72 -0
  241. package/dist/components/date-time/DateRangePicker.js.map +1 -0
  242. package/dist/components/date-time/DateTimePicker.d.ts +55 -0
  243. package/dist/components/date-time/DateTimePicker.d.ts.map +1 -0
  244. package/dist/components/date-time/DateTimePicker.js +9 -0
  245. package/dist/components/date-time/DateTimePicker.js.map +1 -0
  246. package/dist/components/date-time/RangeCalendar.d.ts +50 -0
  247. package/dist/components/date-time/RangeCalendar.d.ts.map +1 -0
  248. package/dist/components/date-time/RangeCalendar.js +17 -0
  249. package/dist/components/date-time/RangeCalendar.js.map +1 -0
  250. package/dist/components/date-time/TimePicker.d.ts +47 -0
  251. package/dist/components/date-time/TimePicker.d.ts.map +1 -0
  252. package/dist/components/date-time/TimePicker.js +148 -0
  253. package/dist/components/date-time/TimePicker.js.map +1 -0
  254. package/dist/components/inputs/Checkbox.d.ts +140 -0
  255. package/dist/components/inputs/Checkbox.d.ts.map +1 -0
  256. package/dist/components/inputs/Checkbox.js +29 -0
  257. package/dist/components/inputs/Checkbox.js.map +1 -0
  258. package/dist/components/inputs/CheckboxCard.d.ts +17 -0
  259. package/dist/components/inputs/CheckboxCard.d.ts.map +1 -0
  260. package/dist/components/inputs/CheckboxCard.js +25 -0
  261. package/dist/components/inputs/CheckboxCard.js.map +1 -0
  262. package/dist/components/inputs/CheckboxGroup.d.ts +68 -0
  263. package/dist/components/inputs/CheckboxGroup.d.ts.map +1 -0
  264. package/dist/components/inputs/CheckboxGroup.js +14 -0
  265. package/dist/components/inputs/CheckboxGroup.js.map +1 -0
  266. package/dist/components/inputs/ChoiceCardBody.d.ts +16 -0
  267. package/dist/components/inputs/ChoiceCardBody.d.ts.map +1 -0
  268. package/dist/components/inputs/ChoiceCardBody.js +10 -0
  269. package/dist/components/inputs/ChoiceCardBody.js.map +1 -0
  270. package/dist/components/inputs/ColorPicker.d.ts +71 -0
  271. package/dist/components/inputs/ColorPicker.d.ts.map +1 -0
  272. package/dist/components/inputs/ColorPicker.js +30 -0
  273. package/dist/components/inputs/ColorPicker.js.map +1 -0
  274. package/dist/components/inputs/Combobox.d.ts +41 -0
  275. package/dist/components/inputs/Combobox.d.ts.map +1 -0
  276. package/dist/components/inputs/Combobox.js +16 -0
  277. package/dist/components/inputs/Combobox.js.map +1 -0
  278. package/dist/components/inputs/FileDropzone.d.ts +51 -0
  279. package/dist/components/inputs/FileDropzone.d.ts.map +1 -0
  280. package/dist/components/inputs/FileDropzone.js +75 -0
  281. package/dist/components/inputs/FileDropzone.js.map +1 -0
  282. package/dist/components/inputs/Form.d.ts +50 -0
  283. package/dist/components/inputs/Form.d.ts.map +1 -0
  284. package/dist/components/inputs/Form.js +14 -0
  285. package/dist/components/inputs/Form.js.map +1 -0
  286. package/dist/components/inputs/FormField.d.ts +89 -0
  287. package/dist/components/inputs/FormField.d.ts.map +1 -0
  288. package/dist/components/inputs/FormField.js +24 -0
  289. package/dist/components/inputs/FormField.js.map +1 -0
  290. package/dist/components/inputs/FormLayout.d.ts +47 -0
  291. package/dist/components/inputs/FormLayout.d.ts.map +1 -0
  292. package/dist/components/inputs/FormLayout.js +12 -0
  293. package/dist/components/inputs/FormLayout.js.map +1 -0
  294. package/dist/components/inputs/InlineEdit.d.ts +50 -0
  295. package/dist/components/inputs/InlineEdit.d.ts.map +1 -0
  296. package/dist/components/inputs/InlineEdit.js +70 -0
  297. package/dist/components/inputs/InlineEdit.js.map +1 -0
  298. package/dist/components/inputs/MaskedInput.d.ts +66 -0
  299. package/dist/components/inputs/MaskedInput.d.ts.map +1 -0
  300. package/dist/components/inputs/MaskedInput.js +73 -0
  301. package/dist/components/inputs/MaskedInput.js.map +1 -0
  302. package/dist/components/inputs/NumberInput.d.ts +53 -0
  303. package/dist/components/inputs/NumberInput.d.ts.map +1 -0
  304. package/dist/components/inputs/NumberInput.js +17 -0
  305. package/dist/components/inputs/NumberInput.js.map +1 -0
  306. package/dist/components/inputs/PasswordInput.d.ts +49 -0
  307. package/dist/components/inputs/PasswordInput.d.ts.map +1 -0
  308. package/dist/components/inputs/PasswordInput.js +49 -0
  309. package/dist/components/inputs/PasswordInput.js.map +1 -0
  310. package/dist/components/inputs/PhoneInput.d.ts +35 -0
  311. package/dist/components/inputs/PhoneInput.d.ts.map +1 -0
  312. package/dist/components/inputs/PhoneInput.js +9 -0
  313. package/dist/components/inputs/PhoneInput.js.map +1 -0
  314. package/dist/components/inputs/PinInput.d.ts +50 -0
  315. package/dist/components/inputs/PinInput.d.ts.map +1 -0
  316. package/dist/components/inputs/PinInput.js +67 -0
  317. package/dist/components/inputs/PinInput.js.map +1 -0
  318. package/dist/components/inputs/RadioGroup.d.ts +86 -0
  319. package/dist/components/inputs/RadioGroup.d.ts.map +1 -0
  320. package/dist/components/inputs/RadioGroup.js +51 -0
  321. package/dist/components/inputs/RadioGroup.js.map +1 -0
  322. package/dist/components/inputs/Rating.d.ts +69 -0
  323. package/dist/components/inputs/Rating.d.ts.map +1 -0
  324. package/dist/components/inputs/Rating.js +51 -0
  325. package/dist/components/inputs/Rating.js.map +1 -0
  326. package/dist/components/inputs/SearchControl.d.ts +85 -0
  327. package/dist/components/inputs/SearchControl.d.ts.map +1 -0
  328. package/dist/components/inputs/SearchControl.js +62 -0
  329. package/dist/components/inputs/SearchControl.js.map +1 -0
  330. package/dist/components/inputs/Select.d.ts +205 -0
  331. package/dist/components/inputs/Select.d.ts.map +1 -0
  332. package/dist/components/inputs/Select.js +136 -0
  333. package/dist/components/inputs/Select.js.map +1 -0
  334. package/dist/components/inputs/Slider.d.ts +59 -0
  335. package/dist/components/inputs/Slider.d.ts.map +1 -0
  336. package/dist/components/inputs/Slider.js +153 -0
  337. package/dist/components/inputs/Slider.js.map +1 -0
  338. package/dist/components/inputs/SwatchGroup.d.ts +101 -0
  339. package/dist/components/inputs/SwatchGroup.d.ts.map +1 -0
  340. package/dist/components/inputs/SwatchGroup.js +57 -0
  341. package/dist/components/inputs/SwatchGroup.js.map +1 -0
  342. package/dist/components/inputs/TagInput.d.ts +45 -0
  343. package/dist/components/inputs/TagInput.d.ts.map +1 -0
  344. package/dist/components/inputs/TagInput.js +56 -0
  345. package/dist/components/inputs/TagInput.js.map +1 -0
  346. package/dist/components/inputs/TextControl.d.ts +101 -0
  347. package/dist/components/inputs/TextControl.d.ts.map +1 -0
  348. package/dist/components/inputs/TextControl.js +31 -0
  349. package/dist/components/inputs/TextControl.js.map +1 -0
  350. package/dist/components/inputs/Transfer.d.ts +84 -0
  351. package/dist/components/inputs/Transfer.d.ts.map +1 -0
  352. package/dist/components/inputs/Transfer.js +112 -0
  353. package/dist/components/inputs/Transfer.js.map +1 -0
  354. package/dist/components/inputs/TreeSelect.d.ts +73 -0
  355. package/dist/components/inputs/TreeSelect.d.ts.map +1 -0
  356. package/dist/components/inputs/TreeSelect.js +60 -0
  357. package/dist/components/inputs/TreeSelect.js.map +1 -0
  358. package/dist/components/inputs/UploadQueue.d.ts +84 -0
  359. package/dist/components/inputs/UploadQueue.d.ts.map +1 -0
  360. package/dist/components/inputs/UploadQueue.js +30 -0
  361. package/dist/components/inputs/UploadQueue.js.map +1 -0
  362. package/dist/components/navigation/Accordion.d.ts +44 -0
  363. package/dist/components/navigation/Accordion.d.ts.map +1 -0
  364. package/dist/components/navigation/Accordion.js +12 -0
  365. package/dist/components/navigation/Accordion.js.map +1 -0
  366. package/dist/components/navigation/Breadcrumbs.d.ts +35 -0
  367. package/dist/components/navigation/Breadcrumbs.d.ts.map +1 -0
  368. package/dist/components/navigation/Breadcrumbs.js +17 -0
  369. package/dist/components/navigation/Breadcrumbs.js.map +1 -0
  370. package/dist/components/navigation/ContextualSaveBar.d.ts +90 -0
  371. package/dist/components/navigation/ContextualSaveBar.d.ts.map +1 -0
  372. package/dist/components/navigation/ContextualSaveBar.js +20 -0
  373. package/dist/components/navigation/ContextualSaveBar.js.map +1 -0
  374. package/dist/components/navigation/PageHeader.d.ts +17 -0
  375. package/dist/components/navigation/PageHeader.d.ts.map +1 -0
  376. package/dist/components/navigation/PageHeader.js +8 -0
  377. package/dist/components/navigation/PageHeader.js.map +1 -0
  378. package/dist/components/navigation/Pagination.d.ts +44 -0
  379. package/dist/components/navigation/Pagination.d.ts.map +1 -0
  380. package/dist/components/navigation/Pagination.js +57 -0
  381. package/dist/components/navigation/Pagination.js.map +1 -0
  382. package/dist/components/navigation/SectionHeader.d.ts +32 -0
  383. package/dist/components/navigation/SectionHeader.d.ts.map +1 -0
  384. package/dist/components/navigation/SectionHeader.js +13 -0
  385. package/dist/components/navigation/SectionHeader.js.map +1 -0
  386. package/dist/components/navigation/SelectionBar.d.ts +65 -0
  387. package/dist/components/navigation/SelectionBar.d.ts.map +1 -0
  388. package/dist/components/navigation/SelectionBar.js +24 -0
  389. package/dist/components/navigation/SelectionBar.js.map +1 -0
  390. package/dist/components/navigation/Stepper.d.ts +45 -0
  391. package/dist/components/navigation/Stepper.d.ts.map +1 -0
  392. package/dist/components/navigation/Stepper.js +16 -0
  393. package/dist/components/navigation/Stepper.js.map +1 -0
  394. package/dist/components/navigation/Tabs.d.ts +45 -0
  395. package/dist/components/navigation/Tabs.d.ts.map +1 -0
  396. package/dist/components/navigation/Tabs.js +51 -0
  397. package/dist/components/navigation/Tabs.js.map +1 -0
  398. package/dist/components/navigation/TreeView.d.ts +101 -0
  399. package/dist/components/navigation/TreeView.d.ts.map +1 -0
  400. package/dist/components/navigation/TreeView.js +27 -0
  401. package/dist/components/navigation/TreeView.js.map +1 -0
  402. package/dist/components/overlays/CommandPalette.d.ts +115 -0
  403. package/dist/components/overlays/CommandPalette.d.ts.map +1 -0
  404. package/dist/components/overlays/CommandPalette.js +43 -0
  405. package/dist/components/overlays/CommandPalette.js.map +1 -0
  406. package/dist/components/overlays/ConfirmDialog.d.ts +67 -0
  407. package/dist/components/overlays/ConfirmDialog.d.ts.map +1 -0
  408. package/dist/components/overlays/ConfirmDialog.js +47 -0
  409. package/dist/components/overlays/ConfirmDialog.js.map +1 -0
  410. package/dist/components/overlays/ContextMenu.d.ts +122 -0
  411. package/dist/components/overlays/ContextMenu.d.ts.map +1 -0
  412. package/dist/components/overlays/ContextMenu.js +39 -0
  413. package/dist/components/overlays/ContextMenu.js.map +1 -0
  414. package/dist/components/overlays/Dialog.d.ts +113 -0
  415. package/dist/components/overlays/Dialog.d.ts.map +1 -0
  416. package/dist/components/overlays/Dialog.js +43 -0
  417. package/dist/components/overlays/Dialog.js.map +1 -0
  418. package/dist/components/overlays/Drawer.d.ts +53 -0
  419. package/dist/components/overlays/Drawer.d.ts.map +1 -0
  420. package/dist/components/overlays/Drawer.js +32 -0
  421. package/dist/components/overlays/Drawer.js.map +1 -0
  422. package/dist/components/overlays/HelpTooltip.d.ts +41 -0
  423. package/dist/components/overlays/HelpTooltip.d.ts.map +1 -0
  424. package/dist/components/overlays/HelpTooltip.js +10 -0
  425. package/dist/components/overlays/HelpTooltip.js.map +1 -0
  426. package/dist/components/overlays/HoverCard.d.ts +62 -0
  427. package/dist/components/overlays/HoverCard.d.ts.map +1 -0
  428. package/dist/components/overlays/HoverCard.js +175 -0
  429. package/dist/components/overlays/HoverCard.js.map +1 -0
  430. package/dist/components/overlays/Menu.d.ts +113 -0
  431. package/dist/components/overlays/Menu.d.ts.map +1 -0
  432. package/dist/components/overlays/Menu.js +26 -0
  433. package/dist/components/overlays/Menu.js.map +1 -0
  434. package/dist/components/overlays/ModalHeader.d.ts +77 -0
  435. package/dist/components/overlays/ModalHeader.d.ts.map +1 -0
  436. package/dist/components/overlays/ModalHeader.js +11 -0
  437. package/dist/components/overlays/ModalHeader.js.map +1 -0
  438. package/dist/components/overlays/ModalOverlay.d.ts +45 -0
  439. package/dist/components/overlays/ModalOverlay.d.ts.map +1 -0
  440. package/dist/components/overlays/ModalOverlay.js +29 -0
  441. package/dist/components/overlays/ModalOverlay.js.map +1 -0
  442. package/dist/components/overlays/Popover.d.ts +56 -0
  443. package/dist/components/overlays/Popover.d.ts.map +1 -0
  444. package/dist/components/overlays/Popover.js +16 -0
  445. package/dist/components/overlays/Popover.js.map +1 -0
  446. package/dist/components/overlays/ShortcutsHelp.d.ts +70 -0
  447. package/dist/components/overlays/ShortcutsHelp.d.ts.map +1 -0
  448. package/dist/components/overlays/ShortcutsHelp.js +20 -0
  449. package/dist/components/overlays/ShortcutsHelp.js.map +1 -0
  450. package/dist/components/overlays/Tooltip.d.ts +35 -0
  451. package/dist/components/overlays/Tooltip.d.ts.map +1 -0
  452. package/dist/components/overlays/Tooltip.js +18 -0
  453. package/dist/components/overlays/Tooltip.js.map +1 -0
  454. package/dist/components/table/DataTable.d.ts +60 -0
  455. package/dist/components/table/DataTable.d.ts.map +1 -0
  456. package/dist/components/table/DataTable.js +20 -0
  457. package/dist/components/table/DataTable.js.map +1 -0
  458. package/dist/components/table/FilterBar.d.ts +35 -0
  459. package/dist/components/table/FilterBar.d.ts.map +1 -0
  460. package/dist/components/table/FilterBar.js +17 -0
  461. package/dist/components/table/FilterBar.js.map +1 -0
  462. package/dist/components/table/FilterBarAdd.d.ts +57 -0
  463. package/dist/components/table/FilterBarAdd.d.ts.map +1 -0
  464. package/dist/components/table/FilterBarAdd.js +83 -0
  465. package/dist/components/table/FilterBarAdd.js.map +1 -0
  466. package/dist/components/table/SavedViews.d.ts +83 -0
  467. package/dist/components/table/SavedViews.d.ts.map +1 -0
  468. package/dist/components/table/SavedViews.js +12 -0
  469. package/dist/components/table/SavedViews.js.map +1 -0
  470. package/dist/components/table/TablePreferences.d.ts +45 -0
  471. package/dist/components/table/TablePreferences.d.ts.map +1 -0
  472. package/dist/components/table/TablePreferences.js +41 -0
  473. package/dist/components/table/TablePreferences.js.map +1 -0
  474. package/dist/components/table/TableToolbar.d.ts +38 -0
  475. package/dist/components/table/TableToolbar.d.ts.map +1 -0
  476. package/dist/components/table/TableToolbar.js +11 -0
  477. package/dist/components/table/TableToolbar.js.map +1 -0
  478. package/dist/editor/RichTextEditor.d.ts +274 -0
  479. package/dist/editor/RichTextEditor.d.ts.map +1 -0
  480. package/dist/editor/RichTextEditor.js +671 -0
  481. package/dist/editor/RichTextEditor.js.map +1 -0
  482. package/dist/editor/RichTextView.d.ts +70 -0
  483. package/dist/editor/RichTextView.d.ts.map +1 -0
  484. package/dist/editor/RichTextView.js +24 -0
  485. package/dist/editor/RichTextView.js.map +1 -0
  486. package/dist/editor/core/atomText.d.ts +21 -0
  487. package/dist/editor/core/atomText.d.ts.map +1 -0
  488. package/dist/editor/core/atomText.js +77 -0
  489. package/dist/editor/core/atomText.js.map +1 -0
  490. package/dist/editor/core/blockCommands.d.ts +94 -0
  491. package/dist/editor/core/blockCommands.d.ts.map +1 -0
  492. package/dist/editor/core/blockCommands.js +188 -0
  493. package/dist/editor/core/blockCommands.js.map +1 -0
  494. package/dist/editor/core/blockTypes.d.ts +89 -0
  495. package/dist/editor/core/blockTypes.d.ts.map +1 -0
  496. package/dist/editor/core/blockTypes.js +121 -0
  497. package/dist/editor/core/blockTypes.js.map +1 -0
  498. package/dist/editor/core/containers.d.ts +43 -0
  499. package/dist/editor/core/containers.d.ts.map +1 -0
  500. package/dist/editor/core/containers.js +52 -0
  501. package/dist/editor/core/containers.js.map +1 -0
  502. package/dist/editor/core/customMarkdown.d.ts +8 -0
  503. package/dist/editor/core/customMarkdown.d.ts.map +1 -0
  504. package/dist/editor/core/customMarkdown.js +34 -0
  505. package/dist/editor/core/customMarkdown.js.map +1 -0
  506. package/dist/editor/core/customTool.d.ts +407 -0
  507. package/dist/editor/core/customTool.d.ts.map +1 -0
  508. package/dist/editor/core/customTool.js +31 -0
  509. package/dist/editor/core/customTool.js.map +1 -0
  510. package/dist/editor/core/customToolEngine.d.ts +31 -0
  511. package/dist/editor/core/customToolEngine.d.ts.map +1 -0
  512. package/dist/editor/core/customToolEngine.js +324 -0
  513. package/dist/editor/core/customToolEngine.js.map +1 -0
  514. package/dist/editor/core/document.d.ts +17 -0
  515. package/dist/editor/core/document.d.ts.map +1 -0
  516. package/dist/editor/core/document.js +11 -0
  517. package/dist/editor/core/document.js.map +1 -0
  518. package/dist/editor/core/emptiness.d.ts +18 -0
  519. package/dist/editor/core/emptiness.d.ts.map +1 -0
  520. package/dist/editor/core/emptiness.js +14 -0
  521. package/dist/editor/core/emptiness.js.map +1 -0
  522. package/dist/editor/core/extensions.d.ts +78 -0
  523. package/dist/editor/core/extensions.d.ts.map +1 -0
  524. package/dist/editor/core/extensions.js +134 -0
  525. package/dist/editor/core/extensions.js.map +1 -0
  526. package/dist/editor/core/fieldNotice.d.ts +48 -0
  527. package/dist/editor/core/fieldNotice.d.ts.map +1 -0
  528. package/dist/editor/core/fieldNotice.js +18 -0
  529. package/dist/editor/core/fieldNotice.js.map +1 -0
  530. package/dist/editor/core/handle.d.ts +110 -0
  531. package/dist/editor/core/handle.d.ts.map +1 -0
  532. package/dist/editor/core/handle.js +149 -0
  533. package/dist/editor/core/handle.js.map +1 -0
  534. package/dist/editor/core/insertItems.d.ts +147 -0
  535. package/dist/editor/core/insertItems.d.ts.map +1 -0
  536. package/dist/editor/core/insertItems.js +215 -0
  537. package/dist/editor/core/insertItems.js.map +1 -0
  538. package/dist/editor/core/jsonDocument.d.ts +42 -0
  539. package/dist/editor/core/jsonDocument.d.ts.map +1 -0
  540. package/dist/editor/core/jsonDocument.js +44 -0
  541. package/dist/editor/core/jsonDocument.js.map +1 -0
  542. package/dist/editor/core/markdown.d.ts +47 -0
  543. package/dist/editor/core/markdown.d.ts.map +1 -0
  544. package/dist/editor/core/markdown.js +169 -0
  545. package/dist/editor/core/markdown.js.map +1 -0
  546. package/dist/editor/core/maxLength.d.ts +43 -0
  547. package/dist/editor/core/maxLength.d.ts.map +1 -0
  548. package/dist/editor/core/maxLength.js +45 -0
  549. package/dist/editor/core/maxLength.js.map +1 -0
  550. package/dist/editor/core/pasteTrim.d.ts +8 -0
  551. package/dist/editor/core/pasteTrim.d.ts.map +1 -0
  552. package/dist/editor/core/pasteTrim.js +61 -0
  553. package/dist/editor/core/pasteTrim.js.map +1 -0
  554. package/dist/editor/core/schema.d.ts +479 -0
  555. package/dist/editor/core/schema.d.ts.map +1 -0
  556. package/dist/editor/core/schema.js +371 -0
  557. package/dist/editor/core/schema.js.map +1 -0
  558. package/dist/editor/core/schemaConform.d.ts +30 -0
  559. package/dist/editor/core/schemaConform.d.ts.map +1 -0
  560. package/dist/editor/core/schemaConform.js +72 -0
  561. package/dist/editor/core/schemaConform.js.map +1 -0
  562. package/dist/editor/core/shortcuts.d.ts +110 -0
  563. package/dist/editor/core/shortcuts.d.ts.map +1 -0
  564. package/dist/editor/core/shortcuts.js +299 -0
  565. package/dist/editor/core/shortcuts.js.map +1 -0
  566. package/dist/editor/core/skeleton.d.ts +11 -0
  567. package/dist/editor/core/skeleton.d.ts.map +1 -0
  568. package/dist/editor/core/skeleton.js +48 -0
  569. package/dist/editor/core/skeleton.js.map +1 -0
  570. package/dist/editor/core/slashCommand.d.ts +46 -0
  571. package/dist/editor/core/slashCommand.d.ts.map +1 -0
  572. package/dist/editor/core/slashCommand.js +67 -0
  573. package/dist/editor/core/slashCommand.js.map +1 -0
  574. package/dist/editor/core/sourceFormat.d.ts +30 -0
  575. package/dist/editor/core/sourceFormat.d.ts.map +1 -0
  576. package/dist/editor/core/sourceFormat.js +136 -0
  577. package/dist/editor/core/sourceFormat.js.map +1 -0
  578. package/dist/editor/core/toolButtons.d.ts +58 -0
  579. package/dist/editor/core/toolButtons.d.ts.map +1 -0
  580. package/dist/editor/core/toolButtons.js +64 -0
  581. package/dist/editor/core/toolButtons.js.map +1 -0
  582. package/dist/editor/core/toolDescriptor.d.ts +304 -0
  583. package/dist/editor/core/toolDescriptor.d.ts.map +1 -0
  584. package/dist/editor/core/toolDescriptor.js +29 -0
  585. package/dist/editor/core/toolDescriptor.js.map +1 -0
  586. package/dist/editor/core/toolEntryShortcuts.d.ts +20 -0
  587. package/dist/editor/core/toolEntryShortcuts.d.ts.map +1 -0
  588. package/dist/editor/core/toolEntryShortcuts.js +46 -0
  589. package/dist/editor/core/toolEntryShortcuts.js.map +1 -0
  590. package/dist/editor/core/toolLoader.d.ts +14 -0
  591. package/dist/editor/core/toolLoader.d.ts.map +1 -0
  592. package/dist/editor/core/toolLoader.js +20 -0
  593. package/dist/editor/core/toolLoader.js.map +1 -0
  594. package/dist/editor/core/tools.d.ts +90 -0
  595. package/dist/editor/core/tools.d.ts.map +1 -0
  596. package/dist/editor/core/tools.js +56 -0
  597. package/dist/editor/core/tools.js.map +1 -0
  598. package/dist/editor/core/viewIsland.d.ts +17 -0
  599. package/dist/editor/core/viewIsland.d.ts.map +1 -0
  600. package/dist/editor/core/viewIsland.js +4 -0
  601. package/dist/editor/core/viewIsland.js.map +1 -0
  602. package/dist/editor/features/builtins.d.ts +25 -0
  603. package/dist/editor/features/builtins.d.ts.map +1 -0
  604. package/dist/editor/features/builtins.js +88 -0
  605. package/dist/editor/features/builtins.js.map +1 -0
  606. package/dist/editor/features/code/CodeBlockView.d.ts +38 -0
  607. package/dist/editor/features/code/CodeBlockView.d.ts.map +1 -0
  608. package/dist/editor/features/code/CodeBlockView.js +98 -0
  609. package/dist/editor/features/code/CodeBlockView.js.map +1 -0
  610. package/dist/editor/features/code/CodeCopyButton.d.ts +20 -0
  611. package/dist/editor/features/code/CodeCopyButton.d.ts.map +1 -0
  612. package/dist/editor/features/code/CodeCopyButton.js +29 -0
  613. package/dist/editor/features/code/CodeCopyButton.js.map +1 -0
  614. package/dist/editor/features/code/CodeCopyIsland.d.ts +37 -0
  615. package/dist/editor/features/code/CodeCopyIsland.d.ts.map +1 -0
  616. package/dist/editor/features/code/CodeCopyIsland.js +21 -0
  617. package/dist/editor/features/code/CodeCopyIsland.js.map +1 -0
  618. package/dist/editor/features/code/codeBlock.d.ts +25 -0
  619. package/dist/editor/features/code/codeBlock.d.ts.map +1 -0
  620. package/dist/editor/features/code/codeBlock.js +116 -0
  621. package/dist/editor/features/code/codeBlock.js.map +1 -0
  622. package/dist/editor/features/code/codeBlockTool.d.ts +24 -0
  623. package/dist/editor/features/code/codeBlockTool.d.ts.map +1 -0
  624. package/dist/editor/features/code/codeBlockTool.js +66 -0
  625. package/dist/editor/features/code/codeBlockTool.js.map +1 -0
  626. package/dist/editor/features/code/codeHeader.d.ts +41 -0
  627. package/dist/editor/features/code/codeHeader.d.ts.map +1 -0
  628. package/dist/editor/features/code/codeHeader.js +25 -0
  629. package/dist/editor/features/code/codeHeader.js.map +1 -0
  630. package/dist/editor/features/code/codeLanguages.d.ts +76 -0
  631. package/dist/editor/features/code/codeLanguages.d.ts.map +1 -0
  632. package/dist/editor/features/code/codeLanguages.js +24 -0
  633. package/dist/editor/features/code/codeLanguages.js.map +1 -0
  634. package/dist/editor/features/code/highlight.d.ts +20 -0
  635. package/dist/editor/features/code/highlight.d.ts.map +1 -0
  636. package/dist/editor/features/code/highlight.js +51 -0
  637. package/dist/editor/features/code/highlight.js.map +1 -0
  638. package/dist/editor/features/code/highlightNodes.d.ts +31 -0
  639. package/dist/editor/features/code/highlightNodes.d.ts.map +1 -0
  640. package/dist/editor/features/code/highlightNodes.js +25 -0
  641. package/dist/editor/features/code/highlightNodes.js.map +1 -0
  642. package/dist/editor/features/code/lowlight.d.ts +20 -0
  643. package/dist/editor/features/code/lowlight.d.ts.map +1 -0
  644. package/dist/editor/features/code/lowlight.js +26 -0
  645. package/dist/editor/features/code/lowlight.js.map +1 -0
  646. package/dist/editor/features/color/CustomColorPopover.d.ts +40 -0
  647. package/dist/editor/features/color/CustomColorPopover.d.ts.map +1 -0
  648. package/dist/editor/features/color/CustomColorPopover.js +70 -0
  649. package/dist/editor/features/color/CustomColorPopover.js.map +1 -0
  650. package/dist/editor/features/color/contrast.d.ts +26 -0
  651. package/dist/editor/features/color/contrast.d.ts.map +1 -0
  652. package/dist/editor/features/color/contrast.js +27 -0
  653. package/dist/editor/features/color/contrast.js.map +1 -0
  654. package/dist/editor/features/color/customColor.d.ts +65 -0
  655. package/dist/editor/features/color/customColor.d.ts.map +1 -0
  656. package/dist/editor/features/color/customColor.js +29 -0
  657. package/dist/editor/features/color/customColor.js.map +1 -0
  658. package/dist/editor/features/color/styleExtensions.d.ts +28 -0
  659. package/dist/editor/features/color/styleExtensions.d.ts.map +1 -0
  660. package/dist/editor/features/color/styleExtensions.js +172 -0
  661. package/dist/editor/features/color/styleExtensions.js.map +1 -0
  662. package/dist/editor/features/emoji/EmojiGrid.d.ts +34 -0
  663. package/dist/editor/features/emoji/EmojiGrid.d.ts.map +1 -0
  664. package/dist/editor/features/emoji/EmojiGrid.js +71 -0
  665. package/dist/editor/features/emoji/EmojiGrid.js.map +1 -0
  666. package/dist/editor/features/emoji/emoji.d.ts +47 -0
  667. package/dist/editor/features/emoji/emoji.d.ts.map +1 -0
  668. package/dist/editor/features/emoji/emoji.js +108 -0
  669. package/dist/editor/features/emoji/emoji.js.map +1 -0
  670. package/dist/editor/features/emoji/emojiTool.d.ts +32 -0
  671. package/dist/editor/features/emoji/emojiTool.d.ts.map +1 -0
  672. package/dist/editor/features/emoji/emojiTool.js +34 -0
  673. package/dist/editor/features/emoji/emojiTool.js.map +1 -0
  674. package/dist/editor/features/image/ImagePopover.d.ts +29 -0
  675. package/dist/editor/features/image/ImagePopover.d.ts.map +1 -0
  676. package/dist/editor/features/image/ImagePopover.js +89 -0
  677. package/dist/editor/features/image/ImagePopover.js.map +1 -0
  678. package/dist/editor/features/image/ImageToolbar.d.ts +25 -0
  679. package/dist/editor/features/image/ImageToolbar.d.ts.map +1 -0
  680. package/dist/editor/features/image/ImageToolbar.js +49 -0
  681. package/dist/editor/features/image/ImageToolbar.js.map +1 -0
  682. package/dist/editor/features/image/image.d.ts +115 -0
  683. package/dist/editor/features/image/image.d.ts.map +1 -0
  684. package/dist/editor/features/image/image.js +539 -0
  685. package/dist/editor/features/image/image.js.map +1 -0
  686. package/dist/editor/features/image/imageNotice.d.ts +6 -0
  687. package/dist/editor/features/image/imageNotice.d.ts.map +1 -0
  688. package/dist/editor/features/image/imageNotice.js +16 -0
  689. package/dist/editor/features/image/imageNotice.js.map +1 -0
  690. package/dist/editor/features/layout/columnLayouts.d.ts +36 -0
  691. package/dist/editor/features/layout/columnLayouts.d.ts.map +1 -0
  692. package/dist/editor/features/layout/columnLayouts.js +33 -0
  693. package/dist/editor/features/layout/columnLayouts.js.map +1 -0
  694. package/dist/editor/features/layout/layout.d.ts +81 -0
  695. package/dist/editor/features/layout/layout.d.ts.map +1 -0
  696. package/dist/editor/features/layout/layout.js +318 -0
  697. package/dist/editor/features/layout/layout.js.map +1 -0
  698. package/dist/editor/features/link/LinkPopover.d.ts +21 -0
  699. package/dist/editor/features/link/LinkPopover.d.ts.map +1 -0
  700. package/dist/editor/features/link/LinkPopover.js +54 -0
  701. package/dist/editor/features/link/LinkPopover.js.map +1 -0
  702. package/dist/editor/features/link/link.d.ts +41 -0
  703. package/dist/editor/features/link/link.d.ts.map +1 -0
  704. package/dist/editor/features/link/link.js +66 -0
  705. package/dist/editor/features/link/link.js.map +1 -0
  706. package/dist/editor/features/link/linkTool.d.ts +13 -0
  707. package/dist/editor/features/link/linkTool.d.ts.map +1 -0
  708. package/dist/editor/features/link/linkTool.js +25 -0
  709. package/dist/editor/features/link/linkTool.js.map +1 -0
  710. package/dist/editor/features/search/SearchPanel.d.ts +31 -0
  711. package/dist/editor/features/search/SearchPanel.d.ts.map +1 -0
  712. package/dist/editor/features/search/SearchPanel.js +101 -0
  713. package/dist/editor/features/search/SearchPanel.js.map +1 -0
  714. package/dist/editor/features/search/revealMatch.d.ts +25 -0
  715. package/dist/editor/features/search/revealMatch.d.ts.map +1 -0
  716. package/dist/editor/features/search/revealMatch.js +41 -0
  717. package/dist/editor/features/search/revealMatch.js.map +1 -0
  718. package/dist/editor/features/search/searchMatch.d.ts +53 -0
  719. package/dist/editor/features/search/searchMatch.d.ts.map +1 -0
  720. package/dist/editor/features/search/searchMatch.js +67 -0
  721. package/dist/editor/features/search/searchMatch.js.map +1 -0
  722. package/dist/editor/features/search/searchPlugin.d.ts +48 -0
  723. package/dist/editor/features/search/searchPlugin.d.ts.map +1 -0
  724. package/dist/editor/features/search/searchPlugin.js +151 -0
  725. package/dist/editor/features/search/searchPlugin.js.map +1 -0
  726. package/dist/editor/features/search/searchTool.d.ts +13 -0
  727. package/dist/editor/features/search/searchTool.d.ts.map +1 -0
  728. package/dist/editor/features/search/searchTool.js +18 -0
  729. package/dist/editor/features/search/searchTool.js.map +1 -0
  730. package/dist/editor/features/table/TableInsertDialog.d.ts +29 -0
  731. package/dist/editor/features/table/TableInsertDialog.d.ts.map +1 -0
  732. package/dist/editor/features/table/TableInsertDialog.js +37 -0
  733. package/dist/editor/features/table/TableInsertDialog.js.map +1 -0
  734. package/dist/editor/features/table/TableMenuButton.d.ts +40 -0
  735. package/dist/editor/features/table/TableMenuButton.d.ts.map +1 -0
  736. package/dist/editor/features/table/TableMenuButton.js +97 -0
  737. package/dist/editor/features/table/TableMenuButton.js.map +1 -0
  738. package/dist/editor/features/table/TableSizeGrid.d.ts +60 -0
  739. package/dist/editor/features/table/TableSizeGrid.d.ts.map +1 -0
  740. package/dist/editor/features/table/TableSizeGrid.js +88 -0
  741. package/dist/editor/features/table/TableSizeGrid.js.map +1 -0
  742. package/dist/editor/features/table/tableActions.d.ts +110 -0
  743. package/dist/editor/features/table/tableActions.d.ts.map +1 -0
  744. package/dist/editor/features/table/tableActions.js +254 -0
  745. package/dist/editor/features/table/tableActions.js.map +1 -0
  746. package/dist/editor/features/table/tableCells.d.ts +41 -0
  747. package/dist/editor/features/table/tableCells.d.ts.map +1 -0
  748. package/dist/editor/features/table/tableCells.js +38 -0
  749. package/dist/editor/features/table/tableCells.js.map +1 -0
  750. package/dist/editor/features/table/tableChunk.d.ts +4 -0
  751. package/dist/editor/features/table/tableChunk.d.ts.map +1 -0
  752. package/dist/editor/features/table/tableChunk.js +5 -0
  753. package/dist/editor/features/table/tableChunk.js.map +1 -0
  754. package/dist/editor/features/table/tableTool.d.ts +22 -0
  755. package/dist/editor/features/table/tableTool.d.ts.map +1 -0
  756. package/dist/editor/features/table/tableTool.js +42 -0
  757. package/dist/editor/features/table/tableTool.js.map +1 -0
  758. package/dist/editor/features/table/tables.d.ts +79 -0
  759. package/dist/editor/features/table/tables.d.ts.map +1 -0
  760. package/dist/editor/features/table/tables.js +118 -0
  761. package/dist/editor/features/table/tables.js.map +1 -0
  762. package/dist/editor/features/wrapper/wrapper.d.ts +73 -0
  763. package/dist/editor/features/wrapper/wrapper.d.ts.map +1 -0
  764. package/dist/editor/features/wrapper/wrapper.js +198 -0
  765. package/dist/editor/features/wrapper/wrapper.js.map +1 -0
  766. package/dist/editor/features/wrapper/wrapperTones.d.ts +39 -0
  767. package/dist/editor/features/wrapper/wrapperTones.d.ts.map +1 -0
  768. package/dist/editor/features/wrapper/wrapperTones.js +19 -0
  769. package/dist/editor/features/wrapper/wrapperTones.js.map +1 -0
  770. package/dist/editor/highlight-entry.d.ts +24 -0
  771. package/dist/editor/highlight-entry.d.ts.map +1 -0
  772. package/dist/editor/highlight-entry.js +3 -0
  773. package/dist/editor/highlight-entry.js.map +1 -0
  774. package/dist/editor/hooks/useChangeThrottle.d.ts +24 -0
  775. package/dist/editor/hooks/useChangeThrottle.d.ts.map +1 -0
  776. package/dist/editor/hooks/useChangeThrottle.js +35 -0
  777. package/dist/editor/hooks/useChangeThrottle.js.map +1 -0
  778. package/dist/editor/hooks/useCoarsePointer.d.ts +17 -0
  779. package/dist/editor/hooks/useCoarsePointer.d.ts.map +1 -0
  780. package/dist/editor/hooks/useCoarsePointer.js +19 -0
  781. package/dist/editor/hooks/useCoarsePointer.js.map +1 -0
  782. package/dist/editor/hooks/useFieldsetDisabled.d.ts +22 -0
  783. package/dist/editor/hooks/useFieldsetDisabled.d.ts.map +1 -0
  784. package/dist/editor/hooks/useFieldsetDisabled.js +29 -0
  785. package/dist/editor/hooks/useFieldsetDisabled.js.map +1 -0
  786. package/dist/editor/hooks/useRichTextEditorState.d.ts +25 -0
  787. package/dist/editor/hooks/useRichTextEditorState.d.ts.map +1 -0
  788. package/dist/editor/hooks/useRichTextEditorState.js +17 -0
  789. package/dist/editor/hooks/useRichTextEditorState.js.map +1 -0
  790. package/dist/editor/hooks/useSubmenuPlacement.d.ts +19 -0
  791. package/dist/editor/hooks/useSubmenuPlacement.d.ts.map +1 -0
  792. package/dist/editor/hooks/useSubmenuPlacement.js +20 -0
  793. package/dist/editor/hooks/useSubmenuPlacement.js.map +1 -0
  794. package/dist/editor/index.d.ts +32 -0
  795. package/dist/editor/index.d.ts.map +1 -0
  796. package/dist/editor/index.js +7 -0
  797. package/dist/editor/index.js.map +1 -0
  798. package/dist/editor/schema-entry.d.ts +29 -0
  799. package/dist/editor/schema-entry.d.ts.map +1 -0
  800. package/dist/editor/schema-entry.js +3 -0
  801. package/dist/editor/schema-entry.js.map +1 -0
  802. package/dist/editor/styles/codeTheme.d.ts +49 -0
  803. package/dist/editor/styles/codeTheme.d.ts.map +1 -0
  804. package/dist/editor/styles/codeTheme.js +11 -0
  805. package/dist/editor/styles/codeTheme.js.map +1 -0
  806. package/dist/editor/styles/glass.d.ts +40 -0
  807. package/dist/editor/styles/glass.d.ts.map +1 -0
  808. package/dist/editor/styles/glass.js +15 -0
  809. package/dist/editor/styles/glass.js.map +1 -0
  810. package/dist/editor/styles/palette.d.ts +181 -0
  811. package/dist/editor/styles/palette.d.ts.map +1 -0
  812. package/dist/editor/styles/palette.js +57 -0
  813. package/dist/editor/styles/palette.js.map +1 -0
  814. package/dist/editor/styles/prose.d.ts +56 -0
  815. package/dist/editor/styles/prose.d.ts.map +1 -0
  816. package/dist/editor/styles/prose.js +154 -0
  817. package/dist/editor/styles/prose.js.map +1 -0
  818. package/dist/editor/styles/surface.d.ts +22 -0
  819. package/dist/editor/styles/surface.d.ts.map +1 -0
  820. package/dist/editor/styles/surface.js +4 -0
  821. package/dist/editor/styles/surface.js.map +1 -0
  822. package/dist/editor/styles/tokens.d.ts +136 -0
  823. package/dist/editor/styles/tokens.d.ts.map +1 -0
  824. package/dist/editor/styles/tokens.js +38 -0
  825. package/dist/editor/styles/tokens.js.map +1 -0
  826. package/dist/editor/ui/BlockHandle.d.ts +40 -0
  827. package/dist/editor/ui/BlockHandle.d.ts.map +1 -0
  828. package/dist/editor/ui/BlockHandle.js +394 -0
  829. package/dist/editor/ui/BlockHandle.js.map +1 -0
  830. package/dist/editor/ui/BlockIsland.d.ts +3 -0
  831. package/dist/editor/ui/BlockIsland.d.ts.map +1 -0
  832. package/dist/editor/ui/BlockIsland.js +8 -0
  833. package/dist/editor/ui/BlockIsland.js.map +1 -0
  834. package/dist/editor/ui/BlockIslandSlots.d.ts +31 -0
  835. package/dist/editor/ui/BlockIslandSlots.d.ts.map +1 -0
  836. package/dist/editor/ui/BlockIslandSlots.js +61 -0
  837. package/dist/editor/ui/BlockIslandSlots.js.map +1 -0
  838. package/dist/editor/ui/ColorMenus.d.ts +18 -0
  839. package/dist/editor/ui/ColorMenus.d.ts.map +1 -0
  840. package/dist/editor/ui/ColorMenus.js +281 -0
  841. package/dist/editor/ui/ColorMenus.js.map +1 -0
  842. package/dist/editor/ui/EditorToolbar.d.ts +71 -0
  843. package/dist/editor/ui/EditorToolbar.d.ts.map +1 -0
  844. package/dist/editor/ui/EditorToolbar.js +197 -0
  845. package/dist/editor/ui/EditorToolbar.js.map +1 -0
  846. package/dist/editor/ui/FieldResizer.d.ts +22 -0
  847. package/dist/editor/ui/FieldResizer.d.ts.map +1 -0
  848. package/dist/editor/ui/FieldResizer.js +75 -0
  849. package/dist/editor/ui/FieldResizer.js.map +1 -0
  850. package/dist/editor/ui/FieldStatus.d.ts +32 -0
  851. package/dist/editor/ui/FieldStatus.d.ts.map +1 -0
  852. package/dist/editor/ui/FieldStatus.js +15 -0
  853. package/dist/editor/ui/FieldStatus.js.map +1 -0
  854. package/dist/editor/ui/FloatingToolbar.d.ts +32 -0
  855. package/dist/editor/ui/FloatingToolbar.d.ts.map +1 -0
  856. package/dist/editor/ui/FloatingToolbar.js +17 -0
  857. package/dist/editor/ui/FloatingToolbar.js.map +1 -0
  858. package/dist/editor/ui/FormatMenus.d.ts +210 -0
  859. package/dist/editor/ui/FormatMenus.d.ts.map +1 -0
  860. package/dist/editor/ui/FormatMenus.js +296 -0
  861. package/dist/editor/ui/FormatMenus.js.map +1 -0
  862. package/dist/editor/ui/InsertMenuButton.d.ts +25 -0
  863. package/dist/editor/ui/InsertMenuButton.d.ts.map +1 -0
  864. package/dist/editor/ui/InsertMenuButton.js +28 -0
  865. package/dist/editor/ui/InsertMenuButton.js.map +1 -0
  866. package/dist/editor/ui/SelectionBubble.d.ts +46 -0
  867. package/dist/editor/ui/SelectionBubble.d.ts.map +1 -0
  868. package/dist/editor/ui/SelectionBubble.js +90 -0
  869. package/dist/editor/ui/SelectionBubble.js.map +1 -0
  870. package/dist/editor/ui/ShortcutsButton.d.ts +29 -0
  871. package/dist/editor/ui/ShortcutsButton.d.ts.map +1 -0
  872. package/dist/editor/ui/ShortcutsButton.js +34 -0
  873. package/dist/editor/ui/ShortcutsButton.js.map +1 -0
  874. package/dist/editor/ui/SlashMenu.d.ts +42 -0
  875. package/dist/editor/ui/SlashMenu.d.ts.map +1 -0
  876. package/dist/editor/ui/SlashMenu.js +114 -0
  877. package/dist/editor/ui/SlashMenu.js.map +1 -0
  878. package/dist/editor/ui/SuggestionList.d.ts +60 -0
  879. package/dist/editor/ui/SuggestionList.d.ts.map +1 -0
  880. package/dist/editor/ui/SuggestionList.js +61 -0
  881. package/dist/editor/ui/SuggestionList.js.map +1 -0
  882. package/dist/editor/ui/TextCard.d.ts +20 -0
  883. package/dist/editor/ui/TextCard.d.ts.map +1 -0
  884. package/dist/editor/ui/TextCard.js +192 -0
  885. package/dist/editor/ui/TextCard.js.map +1 -0
  886. package/dist/editor/ui/ToolButtonView.d.ts +58 -0
  887. package/dist/editor/ui/ToolButtonView.d.ts.map +1 -0
  888. package/dist/editor/ui/ToolButtonView.js +86 -0
  889. package/dist/editor/ui/ToolButtonView.js.map +1 -0
  890. package/dist/editor/ui/TriggerMenu.d.ts +25 -0
  891. package/dist/editor/ui/TriggerMenu.d.ts.map +1 -0
  892. package/dist/editor/ui/TriggerMenu.js +180 -0
  893. package/dist/editor/ui/TriggerMenu.js.map +1 -0
  894. package/dist/editor/ui/focusWithin.d.ts +22 -0
  895. package/dist/editor/ui/focusWithin.d.ts.map +1 -0
  896. package/dist/editor/ui/focusWithin.js +5 -0
  897. package/dist/editor/ui/focusWithin.js.map +1 -0
  898. package/dist/editor/ui/lockableMenu.d.ts +28 -0
  899. package/dist/editor/ui/lockableMenu.d.ts.map +1 -0
  900. package/dist/editor/ui/lockableMenu.js +17 -0
  901. package/dist/editor/ui/lockableMenu.js.map +1 -0
  902. package/dist/editor/ui/rowMarks.d.ts +21 -0
  903. package/dist/editor/ui/rowMarks.d.ts.map +1 -0
  904. package/dist/editor/ui/rowMarks.js +35 -0
  905. package/dist/editor/ui/rowMarks.js.map +1 -0
  906. package/dist/editor/ui/selectionMenu.d.ts +61 -0
  907. package/dist/editor/ui/selectionMenu.d.ts.map +1 -0
  908. package/dist/editor/ui/selectionMenu.js +32 -0
  909. package/dist/editor/ui/selectionMenu.js.map +1 -0
  910. package/dist/hooks/useFieldDescription.d.ts +45 -0
  911. package/dist/hooks/useFieldDescription.d.ts.map +1 -0
  912. package/dist/hooks/useFieldDescription.js +23 -0
  913. package/dist/hooks/useFieldDescription.js.map +1 -0
  914. package/dist/hooks/useMediaQuery.d.ts +25 -0
  915. package/dist/hooks/useMediaQuery.d.ts.map +1 -0
  916. package/dist/hooks/useMediaQuery.js +14 -0
  917. package/dist/hooks/useMediaQuery.js.map +1 -0
  918. package/dist/hooks/useOpenerFocus.d.ts +10 -0
  919. package/dist/hooks/useOpenerFocus.d.ts.map +1 -0
  920. package/dist/hooks/useOpenerFocus.js +35 -0
  921. package/dist/hooks/useOpenerFocus.js.map +1 -0
  922. package/dist/hooks/useOverlayLayer.d.ts +23 -0
  923. package/dist/hooks/useOverlayLayer.d.ts.map +1 -0
  924. package/dist/hooks/useOverlayLayer.js +19 -0
  925. package/dist/hooks/useOverlayLayer.js.map +1 -0
  926. package/dist/hooks/useScrollLock.d.ts +3 -0
  927. package/dist/hooks/useScrollLock.d.ts.map +1 -0
  928. package/dist/hooks/useScrollLock.js +52 -0
  929. package/dist/hooks/useScrollLock.js.map +1 -0
  930. package/dist/hooks/useStickyOffset.d.ts +53 -0
  931. package/dist/hooks/useStickyOffset.d.ts.map +1 -0
  932. package/dist/hooks/useStickyOffset.js +91 -0
  933. package/dist/hooks/useStickyOffset.js.map +1 -0
  934. package/dist/hooks/useTableState.d.ts +35 -0
  935. package/dist/hooks/useTableState.d.ts.map +1 -0
  936. package/dist/hooks/useTableState.js +23 -0
  937. package/dist/hooks/useTableState.js.map +1 -0
  938. package/dist/i18n/UiProvider.d.ts +53 -0
  939. package/dist/i18n/UiProvider.d.ts.map +1 -0
  940. package/dist/i18n/UiProvider.js +63 -0
  941. package/dist/i18n/UiProvider.js.map +1 -0
  942. package/dist/i18n/context.d.ts +26 -0
  943. package/dist/i18n/context.d.ts.map +1 -0
  944. package/dist/i18n/context.js +4 -0
  945. package/dist/i18n/context.js.map +1 -0
  946. package/dist/i18n/defaults.d.ts +19 -0
  947. package/dist/i18n/defaults.d.ts.map +1 -0
  948. package/dist/i18n/defaults.js +574 -0
  949. package/dist/i18n/defaults.js.map +1 -0
  950. package/dist/i18n/messages.d.ts +1178 -0
  951. package/dist/i18n/messages.d.ts.map +1 -0
  952. package/dist/i18n/messages.js +2 -0
  953. package/dist/i18n/messages.js.map +1 -0
  954. package/dist/i18n/useMessages.d.ts +26 -0
  955. package/dist/i18n/useMessages.d.ts.map +1 -0
  956. package/dist/i18n/useMessages.js +22 -0
  957. package/dist/i18n/useMessages.js.map +1 -0
  958. package/dist/icons.d.ts +437 -0
  959. package/dist/icons.d.ts.map +1 -0
  960. package/dist/icons.js +2 -0
  961. package/dist/icons.js.map +1 -0
  962. package/dist/index.d.ts +250 -0
  963. package/dist/index.d.ts.map +1 -0
  964. package/dist/index.js +128 -0
  965. package/dist/index.js.map +1 -0
  966. package/dist/lib/accessible-name.d.ts +34 -0
  967. package/dist/lib/accessible-name.d.ts.map +1 -0
  968. package/dist/lib/accessible-name.js +2 -0
  969. package/dist/lib/accessible-name.js.map +1 -0
  970. package/dist/lib/bottom-bar-slot.d.ts +24 -0
  971. package/dist/lib/bottom-bar-slot.d.ts.map +1 -0
  972. package/dist/lib/bottom-bar-slot.js +4 -0
  973. package/dist/lib/bottom-bar-slot.js.map +1 -0
  974. package/dist/lib/button.d.ts +36 -0
  975. package/dist/lib/button.d.ts.map +1 -0
  976. package/dist/lib/button.js +35 -0
  977. package/dist/lib/button.js.map +1 -0
  978. package/dist/lib/choice-card.d.ts +64 -0
  979. package/dist/lib/choice-card.d.ts.map +1 -0
  980. package/dist/lib/choice-card.js +15 -0
  981. package/dist/lib/choice-card.js.map +1 -0
  982. package/dist/lib/clamp.d.ts +17 -0
  983. package/dist/lib/clamp.d.ts.map +1 -0
  984. package/dist/lib/clamp.js +4 -0
  985. package/dist/lib/clamp.js.map +1 -0
  986. package/dist/lib/cn.d.ts +12 -0
  987. package/dist/lib/cn.d.ts.map +1 -0
  988. package/dist/lib/cn.js +14 -0
  989. package/dist/lib/cn.js.map +1 -0
  990. package/dist/lib/date.d.ts +61 -0
  991. package/dist/lib/date.d.ts.map +1 -0
  992. package/dist/lib/date.js +30 -0
  993. package/dist/lib/date.js.map +1 -0
  994. package/dist/lib/dev-warn.d.ts +26 -0
  995. package/dist/lib/dev-warn.d.ts.map +1 -0
  996. package/dist/lib/dev-warn.js +28 -0
  997. package/dist/lib/dev-warn.js.map +1 -0
  998. package/dist/lib/empty.d.ts +35 -0
  999. package/dist/lib/empty.d.ts.map +1 -0
  1000. package/dist/lib/empty.js +11 -0
  1001. package/dist/lib/empty.js.map +1 -0
  1002. package/dist/lib/field.d.ts +105 -0
  1003. package/dist/lib/field.d.ts.map +1 -0
  1004. package/dist/lib/field.js +18 -0
  1005. package/dist/lib/field.js.map +1 -0
  1006. package/dist/lib/filter-range.d.ts +24 -0
  1007. package/dist/lib/filter-range.d.ts.map +1 -0
  1008. package/dist/lib/filter-range.js +27 -0
  1009. package/dist/lib/filter-range.js.map +1 -0
  1010. package/dist/lib/interaction-modality.d.ts +40 -0
  1011. package/dist/lib/interaction-modality.d.ts.map +1 -0
  1012. package/dist/lib/interaction-modality.js +60 -0
  1013. package/dist/lib/interaction-modality.js.map +1 -0
  1014. package/dist/lib/mask.d.ts +94 -0
  1015. package/dist/lib/mask.d.ts.map +1 -0
  1016. package/dist/lib/mask.js +114 -0
  1017. package/dist/lib/mask.js.map +1 -0
  1018. package/dist/lib/menu.d.ts +85 -0
  1019. package/dist/lib/menu.d.ts.map +1 -0
  1020. package/dist/lib/menu.js +33 -0
  1021. package/dist/lib/menu.js.map +1 -0
  1022. package/dist/lib/overlay-layer.d.ts +101 -0
  1023. package/dist/lib/overlay-layer.d.ts.map +1 -0
  1024. package/dist/lib/overlay-layer.js +40 -0
  1025. package/dist/lib/overlay-layer.js.map +1 -0
  1026. package/dist/lib/period.d.ts +82 -0
  1027. package/dist/lib/period.d.ts.map +1 -0
  1028. package/dist/lib/period.js +58 -0
  1029. package/dist/lib/period.js.map +1 -0
  1030. package/dist/lib/progress-status.d.ts +38 -0
  1031. package/dist/lib/progress-status.d.ts.map +1 -0
  1032. package/dist/lib/progress-status.js +7 -0
  1033. package/dist/lib/progress-status.js.map +1 -0
  1034. package/dist/lib/published-height.d.ts +16 -0
  1035. package/dist/lib/published-height.d.ts.map +1 -0
  1036. package/dist/lib/published-height.js +72 -0
  1037. package/dist/lib/published-height.js.map +1 -0
  1038. package/dist/lib/reorder.d.ts +44 -0
  1039. package/dist/lib/reorder.d.ts.map +1 -0
  1040. package/dist/lib/reorder.js +22 -0
  1041. package/dist/lib/reorder.js.map +1 -0
  1042. package/dist/lib/responsive.d.ts +51 -0
  1043. package/dist/lib/responsive.d.ts.map +1 -0
  1044. package/dist/lib/responsive.js +12 -0
  1045. package/dist/lib/responsive.js.map +1 -0
  1046. package/dist/lib/state.d.ts +25 -0
  1047. package/dist/lib/state.d.ts.map +1 -0
  1048. package/dist/lib/state.js +21 -0
  1049. package/dist/lib/state.js.map +1 -0
  1050. package/dist/lib/table-state.d.ts +105 -0
  1051. package/dist/lib/table-state.d.ts.map +1 -0
  1052. package/dist/lib/table-state.js +121 -0
  1053. package/dist/lib/table-state.js.map +1 -0
  1054. package/dist/lib/tag.d.ts +25 -0
  1055. package/dist/lib/tag.d.ts.map +1 -0
  1056. package/dist/lib/tag.js +6 -0
  1057. package/dist/lib/tag.js.map +1 -0
  1058. package/dist/lib/themes.d.ts +54 -0
  1059. package/dist/lib/themes.d.ts.map +1 -0
  1060. package/dist/lib/themes.js +40 -0
  1061. package/dist/lib/themes.js.map +1 -0
  1062. package/dist/lib/time.d.ts +35 -0
  1063. package/dist/lib/time.d.ts.map +1 -0
  1064. package/dist/lib/time.js +68 -0
  1065. package/dist/lib/time.js.map +1 -0
  1066. package/dist/lib/toolbar-axis.d.ts +17 -0
  1067. package/dist/lib/toolbar-axis.d.ts.map +1 -0
  1068. package/dist/lib/toolbar-axis.js +10 -0
  1069. package/dist/lib/toolbar-axis.js.map +1 -0
  1070. package/dist/lib/touch.d.ts +16 -0
  1071. package/dist/lib/touch.d.ts.map +1 -0
  1072. package/dist/lib/touch.js +2 -0
  1073. package/dist/lib/touch.js.map +1 -0
  1074. package/dist/lib/variants.d.ts +204 -0
  1075. package/dist/lib/variants.d.ts.map +1 -0
  1076. package/dist/lib/variants.js +127 -0
  1077. package/dist/lib/variants.js.map +1 -0
  1078. package/dist/locales/en.d.ts +11 -0
  1079. package/dist/locales/en.d.ts.map +1 -0
  1080. package/dist/locales/en.js +3 -0
  1081. package/dist/locales/en.js.map +1 -0
  1082. package/dist/locales/ru.d.ts +5 -0
  1083. package/dist/locales/ru.d.ts.map +1 -0
  1084. package/dist/locales/ru.js +591 -0
  1085. package/dist/locales/ru.js.map +1 -0
  1086. package/docs/accessibility.en.md +79 -0
  1087. package/docs/accessibility.md +73 -0
  1088. package/docs/api/editor-extension.en.md +309 -0
  1089. package/docs/api/editor-extension.md +308 -0
  1090. package/docs/api/messages.md +750 -0
  1091. package/docs/api/migration-notes.en.md +885 -0
  1092. package/docs/api/migration-notes.md +890 -0
  1093. package/docs/api/utilities.md +252 -0
  1094. package/docs/component-selection.en.md +48 -0
  1095. package/docs/component-selection.md +44 -0
  1096. package/docs/components/actions/button.en.md +59 -0
  1097. package/docs/components/actions/button.md +58 -0
  1098. package/docs/components/actions/chip.en.md +47 -0
  1099. package/docs/components/actions/chip.md +46 -0
  1100. package/docs/components/actions/copy-and-truncate.en.md +98 -0
  1101. package/docs/components/actions/copy-and-truncate.md +96 -0
  1102. package/docs/components/actions/feedback.en.md +69 -0
  1103. package/docs/components/actions/feedback.md +68 -0
  1104. package/docs/components/actions/split-button.en.md +76 -0
  1105. package/docs/components/actions/split-button.md +75 -0
  1106. package/docs/components/actions/toggles.en.md +139 -0
  1107. package/docs/components/actions/toggles.md +136 -0
  1108. package/docs/components/actions/toolbar.en.md +197 -0
  1109. package/docs/components/actions/toolbar.md +192 -0
  1110. package/docs/components/app-shell/app-shell.en.md +172 -0
  1111. package/docs/components/app-shell/app-shell.md +172 -0
  1112. package/docs/components/app-shell/mobile-tab-bar.en.md +207 -0
  1113. package/docs/components/app-shell/mobile-tab-bar.md +210 -0
  1114. package/docs/components/app-shell/side-nav.en.md +153 -0
  1115. package/docs/components/app-shell/side-nav.md +152 -0
  1116. package/docs/components/app-shell/split-panel.en.md +148 -0
  1117. package/docs/components/app-shell/split-panel.md +147 -0
  1118. package/docs/components/app-shell/top-bar.en.md +103 -0
  1119. package/docs/components/app-shell/top-bar.md +100 -0
  1120. package/docs/components/content/avatar.en.md +123 -0
  1121. package/docs/components/content/avatar.md +119 -0
  1122. package/docs/components/content/card.en.md +123 -0
  1123. package/docs/components/content/card.md +122 -0
  1124. package/docs/components/content/carousel.en.md +236 -0
  1125. package/docs/components/content/carousel.md +227 -0
  1126. package/docs/components/content/code-view.en.md +177 -0
  1127. package/docs/components/content/code-view.md +172 -0
  1128. package/docs/components/content/data-display.en.md +205 -0
  1129. package/docs/components/content/data-display.md +212 -0
  1130. package/docs/components/content/editable-list.en.md +437 -0
  1131. package/docs/components/content/editable-list.md +418 -0
  1132. package/docs/components/content/empty-and-loading.en.md +149 -0
  1133. package/docs/components/content/empty-and-loading.md +149 -0
  1134. package/docs/components/content/grid.en.md +148 -0
  1135. package/docs/components/content/grid.md +142 -0
  1136. package/docs/components/content/image.en.md +115 -0
  1137. package/docs/components/content/image.md +114 -0
  1138. package/docs/components/content/keyboard.en.md +129 -0
  1139. package/docs/components/content/keyboard.md +129 -0
  1140. package/docs/components/content/layout-primitives.en.md +105 -0
  1141. package/docs/components/content/layout-primitives.md +104 -0
  1142. package/docs/components/content/media-card.en.md +137 -0
  1143. package/docs/components/content/media-card.md +132 -0
  1144. package/docs/components/content/notifications.en.md +216 -0
  1145. package/docs/components/content/notifications.md +207 -0
  1146. package/docs/components/content/rich-text-view.en.md +325 -0
  1147. package/docs/components/content/rich-text-view.md +324 -0
  1148. package/docs/components/content/sortable-list.en.md +212 -0
  1149. package/docs/components/content/sortable-list.md +206 -0
  1150. package/docs/components/content/tag-group.en.md +158 -0
  1151. package/docs/components/content/tag-group.md +151 -0
  1152. package/docs/components/content/timeline.en.md +77 -0
  1153. package/docs/components/content/timeline.md +76 -0
  1154. package/docs/components/content/typography.en.md +152 -0
  1155. package/docs/components/content/typography.md +146 -0
  1156. package/docs/components/content/virtual-grid.en.md +305 -0
  1157. package/docs/components/content/virtual-grid.md +315 -0
  1158. package/docs/components/date-time/calendar.en.md +47 -0
  1159. package/docs/components/date-time/calendar.md +46 -0
  1160. package/docs/components/date-time/date-picker.en.md +52 -0
  1161. package/docs/components/date-time/date-picker.md +50 -0
  1162. package/docs/components/date-time/date-range-picker.en.md +58 -0
  1163. package/docs/components/date-time/date-range-picker.md +57 -0
  1164. package/docs/components/date-time/date-time-picker.en.md +44 -0
  1165. package/docs/components/date-time/date-time-picker.md +43 -0
  1166. package/docs/components/date-time/range-calendar.en.md +47 -0
  1167. package/docs/components/date-time/range-calendar.md +46 -0
  1168. package/docs/components/date-time/time-picker.en.md +47 -0
  1169. package/docs/components/date-time/time-picker.md +51 -0
  1170. package/docs/components/index.en.md +155 -0
  1171. package/docs/components/index.md +150 -0
  1172. package/docs/components/inputs/choice-controls.en.md +118 -0
  1173. package/docs/components/inputs/choice-controls.md +112 -0
  1174. package/docs/components/inputs/color-picker.en.md +126 -0
  1175. package/docs/components/inputs/color-picker.md +122 -0
  1176. package/docs/components/inputs/combobox.en.md +62 -0
  1177. package/docs/components/inputs/combobox.md +58 -0
  1178. package/docs/components/inputs/file-dropzone.en.md +51 -0
  1179. package/docs/components/inputs/file-dropzone.md +50 -0
  1180. package/docs/components/inputs/form-layout.en.md +99 -0
  1181. package/docs/components/inputs/form-layout.md +97 -0
  1182. package/docs/components/inputs/form.en.md +87 -0
  1183. package/docs/components/inputs/form.md +86 -0
  1184. package/docs/components/inputs/inline-edit.en.md +93 -0
  1185. package/docs/components/inputs/inline-edit.md +94 -0
  1186. package/docs/components/inputs/masked-input.en.md +149 -0
  1187. package/docs/components/inputs/masked-input.md +147 -0
  1188. package/docs/components/inputs/number-input.en.md +81 -0
  1189. package/docs/components/inputs/number-input.md +80 -0
  1190. package/docs/components/inputs/password-input.en.md +101 -0
  1191. package/docs/components/inputs/password-input.md +97 -0
  1192. package/docs/components/inputs/phone-input.en.md +78 -0
  1193. package/docs/components/inputs/phone-input.md +76 -0
  1194. package/docs/components/inputs/pin-input.en.md +109 -0
  1195. package/docs/components/inputs/pin-input.md +108 -0
  1196. package/docs/components/inputs/rating.en.md +100 -0
  1197. package/docs/components/inputs/rating.md +99 -0
  1198. package/docs/components/inputs/rich-text-editor.en.md +1539 -0
  1199. package/docs/components/inputs/rich-text-editor.md +1538 -0
  1200. package/docs/components/inputs/search-control.en.md +60 -0
  1201. package/docs/components/inputs/search-control.md +58 -0
  1202. package/docs/components/inputs/select.en.md +68 -0
  1203. package/docs/components/inputs/select.md +65 -0
  1204. package/docs/components/inputs/slider.en.md +60 -0
  1205. package/docs/components/inputs/slider.md +59 -0
  1206. package/docs/components/inputs/swatch-group.en.md +181 -0
  1207. package/docs/components/inputs/swatch-group.md +177 -0
  1208. package/docs/components/inputs/tag-input.en.md +50 -0
  1209. package/docs/components/inputs/tag-input.md +48 -0
  1210. package/docs/components/inputs/text-control.en.md +76 -0
  1211. package/docs/components/inputs/text-control.md +74 -0
  1212. package/docs/components/inputs/transfer.en.md +118 -0
  1213. package/docs/components/inputs/transfer.md +114 -0
  1214. package/docs/components/inputs/tree-select.en.md +91 -0
  1215. package/docs/components/inputs/tree-select.md +89 -0
  1216. package/docs/components/inputs/upload-queue.en.md +160 -0
  1217. package/docs/components/inputs/upload-queue.md +158 -0
  1218. package/docs/components/navigation/accordion.en.md +76 -0
  1219. package/docs/components/navigation/accordion.md +75 -0
  1220. package/docs/components/navigation/breadcrumbs.en.md +73 -0
  1221. package/docs/components/navigation/breadcrumbs.md +72 -0
  1222. package/docs/components/navigation/contextual-save-bar.en.md +104 -0
  1223. package/docs/components/navigation/contextual-save-bar.md +103 -0
  1224. package/docs/components/navigation/page-header.en.md +71 -0
  1225. package/docs/components/navigation/page-header.md +70 -0
  1226. package/docs/components/navigation/pagination.en.md +69 -0
  1227. package/docs/components/navigation/pagination.md +69 -0
  1228. package/docs/components/navigation/section-header.en.md +67 -0
  1229. package/docs/components/navigation/section-header.md +66 -0
  1230. package/docs/components/navigation/selection-bar.en.md +83 -0
  1231. package/docs/components/navigation/selection-bar.md +83 -0
  1232. package/docs/components/navigation/stepper.en.md +78 -0
  1233. package/docs/components/navigation/stepper.md +77 -0
  1234. package/docs/components/navigation/tabs.en.md +71 -0
  1235. package/docs/components/navigation/tabs.md +70 -0
  1236. package/docs/components/navigation/tree-view.en.md +173 -0
  1237. package/docs/components/navigation/tree-view.md +172 -0
  1238. package/docs/components/overlays/command-palette.en.md +153 -0
  1239. package/docs/components/overlays/command-palette.md +147 -0
  1240. package/docs/components/overlays/confirm-dialog.en.md +134 -0
  1241. package/docs/components/overlays/confirm-dialog.md +127 -0
  1242. package/docs/components/overlays/context-menu.en.md +115 -0
  1243. package/docs/components/overlays/context-menu.md +113 -0
  1244. package/docs/components/overlays/dialog.en.md +120 -0
  1245. package/docs/components/overlays/dialog.md +117 -0
  1246. package/docs/components/overlays/drawer.en.md +87 -0
  1247. package/docs/components/overlays/drawer.md +88 -0
  1248. package/docs/components/overlays/hover-card.en.md +179 -0
  1249. package/docs/components/overlays/hover-card.md +175 -0
  1250. package/docs/components/overlays/menu.en.md +103 -0
  1251. package/docs/components/overlays/menu.md +100 -0
  1252. package/docs/components/overlays/popover.en.md +78 -0
  1253. package/docs/components/overlays/popover.md +77 -0
  1254. package/docs/components/overlays/shortcuts-help.en.md +190 -0
  1255. package/docs/components/overlays/shortcuts-help.md +186 -0
  1256. package/docs/components/overlays/tooltip.en.md +78 -0
  1257. package/docs/components/overlays/tooltip.md +77 -0
  1258. package/docs/components/table/data-table.en.md +137 -0
  1259. package/docs/components/table/data-table.md +133 -0
  1260. package/docs/components/table/filter-bar.en.md +161 -0
  1261. package/docs/components/table/filter-bar.md +155 -0
  1262. package/docs/components/table/saved-views.en.md +117 -0
  1263. package/docs/components/table/saved-views.md +115 -0
  1264. package/docs/components/table/toolbar.en.md +100 -0
  1265. package/docs/components/table/toolbar.md +97 -0
  1266. package/docs/conventions.md +358 -0
  1267. package/docs/getting-started.en.md +382 -0
  1268. package/docs/getting-started.md +381 -0
  1269. package/docs/glossary.en.md +179 -0
  1270. package/docs/glossary.md +174 -0
  1271. package/docs/i18n.en.md +147 -0
  1272. package/docs/i18n.md +143 -0
  1273. package/docs/icons.en.md +252 -0
  1274. package/docs/icons.md +251 -0
  1275. package/docs/index.md +62 -0
  1276. package/docs/palette.en.md +400 -0
  1277. package/docs/palette.md +396 -0
  1278. package/docs/theming.en.md +522 -0
  1279. package/docs/theming.md +518 -0
  1280. package/llms.txt +144 -0
  1281. package/package.json +173 -4
  1282. package/src/color.ts +21 -0
  1283. package/src/components/actions/Alert.tsx +121 -0
  1284. package/src/components/actions/Banner.tsx +120 -0
  1285. package/src/components/actions/Button.tsx +241 -0
  1286. package/src/components/actions/ButtonGroup.tsx +65 -0
  1287. package/src/components/actions/Chip.tsx +113 -0
  1288. package/src/components/actions/CopyButton.tsx +112 -0
  1289. package/src/components/actions/Progress.tsx +103 -0
  1290. package/src/components/actions/Segmented.tsx +162 -0
  1291. package/src/components/actions/Spinner.tsx +80 -0
  1292. package/src/components/actions/SplitButton.tsx +164 -0
  1293. package/src/components/actions/StatusBadge.tsx +61 -0
  1294. package/src/components/actions/Toaster.tsx +148 -0
  1295. package/src/components/actions/Toggle.tsx +224 -0
  1296. package/src/components/actions/ToggleGroup.tsx +147 -0
  1297. package/src/components/actions/Toolbar.tsx +223 -0
  1298. package/src/components/actions/Truncate.tsx +96 -0
  1299. package/src/components/app-shell/AppShell.tsx +268 -0
  1300. package/src/components/app-shell/MobileTabBar.tsx +305 -0
  1301. package/src/components/app-shell/NavItem.tsx +149 -0
  1302. package/src/components/app-shell/SideNav.tsx +217 -0
  1303. package/src/components/app-shell/SplitPanel.tsx +381 -0
  1304. package/src/components/app-shell/TopBar.tsx +115 -0
  1305. package/src/components/content/AspectRatio.tsx +45 -0
  1306. package/src/components/content/Avatar.tsx +132 -0
  1307. package/src/components/content/AvatarGroup.tsx +92 -0
  1308. package/src/components/content/Badge.tsx +78 -0
  1309. package/src/components/content/Card.tsx +117 -0
  1310. package/src/components/content/Carousel.tsx +427 -0
  1311. package/src/components/content/CodeView.tsx +178 -0
  1312. package/src/components/content/DescriptionList.tsx +64 -0
  1313. package/src/components/content/EditableList.tsx +879 -0
  1314. package/src/components/content/EmptyState.tsx +65 -0
  1315. package/src/components/content/ErrorState.tsx +100 -0
  1316. package/src/components/content/Grid.tsx +208 -0
  1317. package/src/components/content/Heading.tsx +81 -0
  1318. package/src/components/content/Image.tsx +235 -0
  1319. package/src/components/content/Kbd.tsx +67 -0
  1320. package/src/components/content/Keyboard.tsx +634 -0
  1321. package/src/components/content/Link.tsx +199 -0
  1322. package/src/components/content/MediaCard.tsx +167 -0
  1323. package/src/components/content/NotificationCenter.tsx +168 -0
  1324. package/src/components/content/NotificationList.tsx +329 -0
  1325. package/src/components/content/ScrollArea.tsx +69 -0
  1326. package/src/components/content/Separator.tsx +62 -0
  1327. package/src/components/content/Skeleton.tsx +40 -0
  1328. package/src/components/content/SortableList.tsx +249 -0
  1329. package/src/components/content/Stat.tsx +75 -0
  1330. package/src/components/content/Table.tsx +500 -0
  1331. package/src/components/content/TagGroup.tsx +222 -0
  1332. package/src/components/content/Text.tsx +127 -0
  1333. package/src/components/content/Timeline.tsx +126 -0
  1334. package/src/components/content/VirtualGrid.tsx +726 -0
  1335. package/src/components/content/VisuallyHidden.tsx +25 -0
  1336. package/src/components/content/keyboardEditing.ts +51 -0
  1337. package/src/components/content/useDragToSelect.ts +255 -0
  1338. package/src/components/date-time/Calendar.tsx +181 -0
  1339. package/src/components/date-time/DatePicker.tsx +143 -0
  1340. package/src/components/date-time/DateRangePicker.tsx +349 -0
  1341. package/src/components/date-time/DateTimePicker.tsx +92 -0
  1342. package/src/components/date-time/RangeCalendar.tsx +156 -0
  1343. package/src/components/date-time/TimePicker.tsx +377 -0
  1344. package/src/components/inputs/Checkbox.tsx +284 -0
  1345. package/src/components/inputs/CheckboxCard.tsx +132 -0
  1346. package/src/components/inputs/CheckboxGroup.tsx +140 -0
  1347. package/src/components/inputs/ChoiceCardBody.tsx +53 -0
  1348. package/src/components/inputs/ColorPicker.tsx +221 -0
  1349. package/src/components/inputs/Combobox.tsx +156 -0
  1350. package/src/components/inputs/FileDropzone.tsx +253 -0
  1351. package/src/components/inputs/Form.tsx +77 -0
  1352. package/src/components/inputs/FormField.tsx +235 -0
  1353. package/src/components/inputs/FormLayout.tsx +80 -0
  1354. package/src/components/inputs/InlineEdit.tsx +205 -0
  1355. package/src/components/inputs/MaskedInput.tsx +288 -0
  1356. package/src/components/inputs/NumberInput.tsx +138 -0
  1357. package/src/components/inputs/PasswordInput.tsx +166 -0
  1358. package/src/components/inputs/PhoneInput.tsx +55 -0
  1359. package/src/components/inputs/PinInput.tsx +197 -0
  1360. package/src/components/inputs/RadioGroup.tsx +322 -0
  1361. package/src/components/inputs/Rating.tsx +224 -0
  1362. package/src/components/inputs/SearchControl.tsx +278 -0
  1363. package/src/components/inputs/Select.tsx +741 -0
  1364. package/src/components/inputs/Slider.tsx +436 -0
  1365. package/src/components/inputs/SwatchGroup.tsx +342 -0
  1366. package/src/components/inputs/TagInput.tsx +221 -0
  1367. package/src/components/inputs/TextControl.tsx +335 -0
  1368. package/src/components/inputs/Transfer.tsx +368 -0
  1369. package/src/components/inputs/TreeSelect.tsx +275 -0
  1370. package/src/components/inputs/UploadQueue.tsx +240 -0
  1371. package/src/components/navigation/Accordion.tsx +118 -0
  1372. package/src/components/navigation/Breadcrumbs.tsx +112 -0
  1373. package/src/components/navigation/ContextualSaveBar.tsx +174 -0
  1374. package/src/components/navigation/PageHeader.tsx +41 -0
  1375. package/src/components/navigation/Pagination.tsx +184 -0
  1376. package/src/components/navigation/SectionHeader.tsx +54 -0
  1377. package/src/components/navigation/SelectionBar.tsx +151 -0
  1378. package/src/components/navigation/Stepper.tsx +153 -0
  1379. package/src/components/navigation/Tabs.tsx +130 -0
  1380. package/src/components/navigation/TreeView.tsx +246 -0
  1381. package/src/components/overlays/CommandPalette.tsx +343 -0
  1382. package/src/components/overlays/ConfirmDialog.tsx +272 -0
  1383. package/src/components/overlays/ContextMenu.tsx +284 -0
  1384. package/src/components/overlays/Dialog.tsx +283 -0
  1385. package/src/components/overlays/Drawer.tsx +193 -0
  1386. package/src/components/overlays/HelpTooltip.tsx +96 -0
  1387. package/src/components/overlays/HoverCard.tsx +404 -0
  1388. package/src/components/overlays/Menu.tsx +243 -0
  1389. package/src/components/overlays/ModalHeader.tsx +125 -0
  1390. package/src/components/overlays/ModalOverlay.tsx +108 -0
  1391. package/src/components/overlays/Popover.tsx +120 -0
  1392. package/src/components/overlays/ShortcutsHelp.tsx +147 -0
  1393. package/src/components/overlays/Tooltip.tsx +89 -0
  1394. package/src/components/table/DataTable.tsx +164 -0
  1395. package/src/components/table/FilterBar.tsx +114 -0
  1396. package/src/components/table/FilterBarAdd.tsx +268 -0
  1397. package/src/components/table/SavedViews.tsx +122 -0
  1398. package/src/components/table/TablePreferences.tsx +173 -0
  1399. package/src/components/table/TableToolbar.tsx +74 -0
  1400. package/src/editor/RichTextEditor.tsx +1747 -0
  1401. package/src/editor/RichTextView.tsx +119 -0
  1402. package/src/editor/core/atomText.ts +140 -0
  1403. package/src/editor/core/blockCommands.ts +329 -0
  1404. package/src/editor/core/blockTypes.ts +252 -0
  1405. package/src/editor/core/containers.ts +100 -0
  1406. package/src/editor/core/customMarkdown.ts +74 -0
  1407. package/src/editor/core/customTool.ts +472 -0
  1408. package/src/editor/core/customToolEngine.ts +442 -0
  1409. package/src/editor/core/document.ts +27 -0
  1410. package/src/editor/core/emptiness.ts +31 -0
  1411. package/src/editor/core/extensions.ts +295 -0
  1412. package/src/editor/core/fieldNotice.ts +75 -0
  1413. package/src/editor/core/handle.ts +311 -0
  1414. package/src/editor/core/insertItems.ts +434 -0
  1415. package/src/editor/core/jsonDocument.ts +99 -0
  1416. package/src/editor/core/markdown.ts +313 -0
  1417. package/src/editor/core/maxLength.ts +99 -0
  1418. package/src/editor/core/pasteTrim.ts +85 -0
  1419. package/src/editor/core/schema.ts +986 -0
  1420. package/src/editor/core/schemaConform.ts +122 -0
  1421. package/src/editor/core/shortcuts.ts +435 -0
  1422. package/src/editor/core/skeleton.ts +108 -0
  1423. package/src/editor/core/slashCommand.ts +143 -0
  1424. package/src/editor/core/sourceFormat.ts +194 -0
  1425. package/src/editor/core/toolButtons.ts +133 -0
  1426. package/src/editor/core/toolDescriptor.ts +359 -0
  1427. package/src/editor/core/toolEntryShortcuts.ts +66 -0
  1428. package/src/editor/core/toolLoader.ts +50 -0
  1429. package/src/editor/core/tools.ts +150 -0
  1430. package/src/editor/core/viewIsland.ts +35 -0
  1431. package/src/editor/features/builtins.ts +145 -0
  1432. package/src/editor/features/code/CodeBlockView.tsx +240 -0
  1433. package/src/editor/features/code/CodeCopyButton.tsx +76 -0
  1434. package/src/editor/features/code/CodeCopyIsland.tsx +71 -0
  1435. package/src/editor/features/code/codeBlock.ts +188 -0
  1436. package/src/editor/features/code/codeBlockTool.ts +107 -0
  1437. package/src/editor/features/code/codeHeader.ts +97 -0
  1438. package/src/editor/features/code/codeLanguages.ts +62 -0
  1439. package/src/editor/features/code/highlight.ts +109 -0
  1440. package/src/editor/features/code/highlightNodes.ts +65 -0
  1441. package/src/editor/features/code/lowlight.ts +45 -0
  1442. package/src/editor/features/color/CustomColorPopover.tsx +180 -0
  1443. package/src/editor/features/color/contrast.ts +52 -0
  1444. package/src/editor/features/color/customColor.ts +91 -0
  1445. package/src/editor/features/color/styleExtensions.ts +316 -0
  1446. package/src/editor/features/emoji/EmojiGrid.tsx +160 -0
  1447. package/src/editor/features/emoji/emoji.ts +156 -0
  1448. package/src/editor/features/emoji/emojiTool.tsx +67 -0
  1449. package/src/editor/features/image/ImagePopover.tsx +254 -0
  1450. package/src/editor/features/image/ImageToolbar.tsx +147 -0
  1451. package/src/editor/features/image/image.ts +821 -0
  1452. package/src/editor/features/image/imageNotice.ts +27 -0
  1453. package/src/editor/features/layout/columnLayouts.ts +71 -0
  1454. package/src/editor/features/layout/layout.ts +537 -0
  1455. package/src/editor/features/link/LinkPopover.tsx +114 -0
  1456. package/src/editor/features/link/link.ts +112 -0
  1457. package/src/editor/features/link/linkTool.tsx +36 -0
  1458. package/src/editor/features/search/SearchPanel.tsx +264 -0
  1459. package/src/editor/features/search/revealMatch.ts +69 -0
  1460. package/src/editor/features/search/searchMatch.ts +129 -0
  1461. package/src/editor/features/search/searchPlugin.ts +254 -0
  1462. package/src/editor/features/search/searchTool.ts +30 -0
  1463. package/src/editor/features/table/TableInsertDialog.tsx +129 -0
  1464. package/src/editor/features/table/TableMenuButton.tsx +503 -0
  1465. package/src/editor/features/table/TableSizeGrid.tsx +265 -0
  1466. package/src/editor/features/table/tableActions.ts +380 -0
  1467. package/src/editor/features/table/tableCells.ts +63 -0
  1468. package/src/editor/features/table/tableChunk.ts +11 -0
  1469. package/src/editor/features/table/tableTool.ts +74 -0
  1470. package/src/editor/features/table/tables.ts +220 -0
  1471. package/src/editor/features/wrapper/wrapper.ts +350 -0
  1472. package/src/editor/features/wrapper/wrapperTones.ts +51 -0
  1473. package/src/editor/highlight-entry.ts +23 -0
  1474. package/src/editor/highlight-grammars.d.ts +12 -0
  1475. package/src/editor/hooks/useChangeThrottle.ts +62 -0
  1476. package/src/editor/hooks/useCoarsePointer.ts +36 -0
  1477. package/src/editor/hooks/useFieldsetDisabled.ts +53 -0
  1478. package/src/editor/hooks/useRichTextEditorState.ts +51 -0
  1479. package/src/editor/hooks/useSubmenuPlacement.ts +40 -0
  1480. package/src/editor/index.ts +59 -0
  1481. package/src/editor/schema-entry.ts +40 -0
  1482. package/src/editor/styles/codeTheme.ts +66 -0
  1483. package/src/editor/styles/glass.ts +66 -0
  1484. package/src/editor/styles/palette.ts +191 -0
  1485. package/src/editor/styles/prose.ts +429 -0
  1486. package/src/editor/styles/surface.ts +24 -0
  1487. package/src/editor/styles/tokens.ts +173 -0
  1488. package/src/editor/ui/BlockHandle.tsx +601 -0
  1489. package/src/editor/ui/BlockIsland.tsx +23 -0
  1490. package/src/editor/ui/BlockIslandSlots.tsx +114 -0
  1491. package/src/editor/ui/ColorMenus.tsx +613 -0
  1492. package/src/editor/ui/EditorToolbar.tsx +630 -0
  1493. package/src/editor/ui/FieldResizer.tsx +155 -0
  1494. package/src/editor/ui/FieldStatus.tsx +85 -0
  1495. package/src/editor/ui/FloatingToolbar.tsx +77 -0
  1496. package/src/editor/ui/FormatMenus.tsx +706 -0
  1497. package/src/editor/ui/InsertMenuButton.tsx +104 -0
  1498. package/src/editor/ui/SelectionBubble.tsx +317 -0
  1499. package/src/editor/ui/ShortcutsButton.tsx +128 -0
  1500. package/src/editor/ui/SlashMenu.tsx +199 -0
  1501. package/src/editor/ui/SuggestionList.tsx +217 -0
  1502. package/src/editor/ui/TextCard.tsx +312 -0
  1503. package/src/editor/ui/ToolButtonView.tsx +242 -0
  1504. package/src/editor/ui/TriggerMenu.tsx +255 -0
  1505. package/src/editor/ui/focusWithin.ts +26 -0
  1506. package/src/editor/ui/lockableMenu.ts +37 -0
  1507. package/src/editor/ui/rowMarks.ts +66 -0
  1508. package/src/editor/ui/selectionMenu.ts +97 -0
  1509. package/src/hooks/useFieldDescription.ts +126 -0
  1510. package/src/hooks/useMediaQuery.ts +46 -0
  1511. package/src/hooks/useOpenerFocus.ts +118 -0
  1512. package/src/hooks/useOverlayLayer.ts +42 -0
  1513. package/src/hooks/useScrollLock.ts +92 -0
  1514. package/src/hooks/useStickyOffset.ts +228 -0
  1515. package/src/hooks/useTableState.ts +76 -0
  1516. package/src/i18n/UiProvider.tsx +152 -0
  1517. package/src/i18n/context.ts +30 -0
  1518. package/src/i18n/defaults.ts +657 -0
  1519. package/src/i18n/messages.ts +1183 -0
  1520. package/src/i18n/useMessages.ts +47 -0
  1521. package/src/icons.ts +566 -0
  1522. package/src/index.ts +502 -0
  1523. package/src/lib/accessible-name.ts +35 -0
  1524. package/src/lib/bottom-bar-slot.ts +27 -0
  1525. package/src/lib/button.ts +158 -0
  1526. package/src/lib/choice-card.ts +79 -0
  1527. package/src/lib/clamp.ts +18 -0
  1528. package/src/lib/cn.ts +48 -0
  1529. package/src/lib/date.ts +87 -0
  1530. package/src/lib/dev-warn.ts +82 -0
  1531. package/src/lib/empty.ts +43 -0
  1532. package/src/lib/field.ts +125 -0
  1533. package/src/lib/filter-range.ts +48 -0
  1534. package/src/lib/interaction-modality.ts +134 -0
  1535. package/src/lib/mask.ts +226 -0
  1536. package/src/lib/menu.ts +196 -0
  1537. package/src/lib/overlay-layer.ts +163 -0
  1538. package/src/lib/period.ts +167 -0
  1539. package/src/lib/progress-status.ts +44 -0
  1540. package/src/lib/published-height.ts +147 -0
  1541. package/src/lib/reorder.ts +65 -0
  1542. package/src/lib/responsive.ts +71 -0
  1543. package/src/lib/state.ts +39 -0
  1544. package/src/lib/table-state.ts +264 -0
  1545. package/src/lib/tag.ts +31 -0
  1546. package/src/lib/themes.ts +144 -0
  1547. package/src/lib/time.ts +107 -0
  1548. package/src/lib/toolbar-axis.tsx +31 -0
  1549. package/src/lib/touch.ts +15 -0
  1550. package/src/lib/variants.ts +342 -0
  1551. package/src/locales/en.ts +10 -0
  1552. package/src/locales/ru.ts +695 -0
  1553. package/styles.css +1650 -0
@@ -0,0 +1,986 @@
1
+ import { CODE_LANGUAGE_IDS } from "../features/code/codeLanguages.js";
2
+ import { EDITOR_LAYOUTS } from "../features/layout/columnLayouts.js";
3
+ import { CUSTOM_COLOR_STYLE_PATTERN } from "../features/color/customColor.js";
4
+ import { devWarn } from "../../lib/dev-warn.js";
5
+ import type { CustomAttribute, PrefixedName, ToolEntry } from "./customTool.js";
6
+ import {
7
+ EDITOR_ALIGNMENTS,
8
+ EDITOR_MARKER_NAMES,
9
+ EDITOR_TEXT_COLOR_NAMES,
10
+ LEGACY_MARKER_NAMES,
11
+ } from "../styles/palette.js";
12
+ import { EDITOR_WRAPPER_TONES } from "../features/wrapper/wrapperTones.js";
13
+
14
+ /**
15
+ * Схема Редактора ДАННЫМИ: белый список тегов и атрибутов, которые он
16
+ * принимает и отдаёт.
17
+ *
18
+ * ЗАЧЕМ ОТДЕЛЬНЫМ СПИСКОМ, ЕСЛИ СХЕМУ И ТАК ЗАДАЮТ РАСШИРЕНИЯ. Расширения
19
+ * Tiptap описывают схему кодом, и прочитать из них «что может прийти в HTML»
20
+ * нельзя ни человеку, ни санитайзеру. А потребителю нужен ровно этот ответ:
21
+ * санитизация на сервере — его ответственность (ADR-0050), и очистку
22
+ * (`sanitizeRichText` ниже) кит строит отсюда, а не из исходника. Совпадение списка с
23
+ * тем, что редактор реально отдаёт, сторожит
24
+ * `tests/rich-text-editor-schema.test.tsx` — в обе стороны.
25
+ *
26
+ * Список растёт вместе с набором Блоков и Меток;
27
+ * опубликован он на странице `RichTextView`, и таблица там сверяется с этим
28
+ * файлом тестом (`tests/rich-text-view.test.tsx`). Атрибута `style` в нём нет,
29
+ * кроме одного узкого исключения — произвольного цвета (`customColor` ниже):
30
+ * цвет палитры и выравнивание пишутся в `data-*` (спека, «Схема и
31
+ * безопасность»).
32
+ *
33
+ * Модуль серверно-безопасен: данные, без React и без движка. Его импорты —
34
+ * `palette.ts`, `customColor.ts`, `codeLanguages.ts`, `columnLayouts.ts` и
35
+ * `wrapperTones.ts`, тоже данные: имена палитры, языков, вариантов Раскладки и
36
+ * тонов Обёртки живут там один раз; ещё `lib/dev-warn.ts` — предупреждение
37
+ * разработчику без зависимостей.
38
+ */
39
+ export const RICH_TEXT_SCHEMA = {
40
+ /**
41
+ * Блоки. `h1` — только с инструментом `heading1`: экран, у
42
+ * которого заголовок страницы стоит над Редактором, его выключает, и тогда
43
+ * Редактор `h1` не отдаёт. Схема-данные перечисляют всё, что кит МОЖЕТ
44
+ * отдать, а не то, что отдаёт при конкретном наборе `tools`.
45
+ * `pre` — блок кода, внутри него `code`. `figure` — картинка: внутри неё
46
+ * `img` и, если подпись не пуста, `figcaption`. Вне `figure` Редактор не
47
+ * отдаёт ни `img`, ни `figcaption`.
48
+ *
49
+ * `label`, `input`, `span` и `div` — разметка пункта чек-листа, как её пишет
50
+ * Tiptap: `<li data-type="taskItem"><label><input type="checkbox"><span>
51
+ * </span></label><div>…</div></li>`. Вне пункта чек-листа Редактор их не
52
+ * отдаёт, и `sanitizeRichText` держит их там же — хуком на предка.
53
+ *
54
+ * `div` с `data-block` — Раскладка: `div[data-block="layout"]`
55
+ * с вариантом в `data-layout`, внутри от одной до четырёх
56
+ * `div[data-block="column"]`, в колонке — Блоки, кроме другой Раскладки.
57
+ * Раскладка — только Блок верхнего уровня: не в колонке, Обёртке, списке,
58
+ * цитате и ячейке. Ширины колонок — вариантом, а не `style` (`layouts` ниже).
59
+ *
60
+ * `div[data-block="wrapper"]` — Обёртка, группа Блоков, как у
61
+ * Redactor; тон, если есть, — в `data-tone` (`wrapperTones` ниже).
62
+ * Стоит на верхнем уровне и прямо в колонке Раскладки; внутри — Блоки, кроме
63
+ * другой Обёртки и Раскладки.
64
+ *
65
+ * Таблица — `table > tbody > tr > th|td`, без `thead`, `colgroup` и
66
+ * `caption`: строка-заголовок — это обычная первая строка из `th`. На ячейке
67
+ * бывают только слияние (`colspan`, `rowspan`) и выравнивание столбца
68
+ * (`data-align`); ширина столбцов не строится, и `style` и `colwidth` на
69
+ * выходе не бывают. `tbody`, `tr`, `th` и `td` вне таблицы парсер HTML
70
+ * выбрасывает сам, хук на это не нужен.
71
+ */
72
+ blocks: [
73
+ "p",
74
+ "h1",
75
+ "h2",
76
+ "h3",
77
+ "h4",
78
+ "ul",
79
+ "ol",
80
+ "li",
81
+ "blockquote",
82
+ "hr",
83
+ "pre",
84
+ "table",
85
+ "tbody",
86
+ "tr",
87
+ "th",
88
+ "td",
89
+ "label",
90
+ "input",
91
+ "span",
92
+ "div",
93
+ "figure",
94
+ "img",
95
+ "figcaption",
96
+ ],
97
+ /**
98
+ * Метки и строчные узлы. `br` — мягкий перенос по Shift+Enter. `mark` —
99
+ * маркер, всегда с `data-color`; `span` с `data-color` — цвет текста (тег
100
+ * назван в `blocks`: там он же — разметка пункта чек-листа). `a` — ссылка,
101
+ * её адрес ограничен схемами из `protocols`.
102
+ */
103
+ marks: ["strong", "em", "u", "s", "code", "sup", "sub", "mark", "br", "a"],
104
+ /** Атрибуты по тегам. Всё, чего здесь нет, на выходе не появляется. */
105
+ attributes: {
106
+ /** Номер первого пункта — только когда он не 1. */
107
+ ol: ["start"],
108
+ /** Чек-лист: `data-type="taskList"`. */
109
+ ul: ["data-type"],
110
+ /**
111
+ * Раскладка и её колонка: `data-block="layout"` и `data-block="column"`;
112
+ * `data-layout` — вариант из `layouts`, только у Раскладки. Обёртка —
113
+ * `data-block="wrapper"` и, если у неё есть тон, `data-tone` — имя из
114
+ * `wrapperTones`, только у Обёртки. У `div` пункта чек-листа атрибутов нет.
115
+ */
116
+ div: ["data-block", "data-layout", "data-tone"],
117
+ /** Пункт чек-листа: `data-type="taskItem"` и `data-checked="true|false"`. */
118
+ li: ["data-type", "data-checked"],
119
+ /** Флажок пункта чек-листа: всегда `type="checkbox"`, `checked` — у отмеченного. */
120
+ input: ["type", "checked"],
121
+ /**
122
+ * Язык блока кода: только `language-<имя>` с именем из `codeLanguages` и
123
+ * только на `code` внутри `pre`. Подсветка в Документ не пишется — токены
124
+ * `hljs-*` живут декорациями Редактора (ADR-0051). Другие классы Редактор
125
+ * не отдаёт, блок без языка — `<code>` без класса.
126
+ */
127
+ code: ["class"],
128
+ /**
129
+ * Цвет текста и маркер: имя в `data-color` ИЛИ произвольный цвет в `style`
130
+ * (`customColor`) — вместе на одном элементе не бывают. Палитры две:
131
+ * `span[data-color]` — имя из `textColors`, `mark[data-color]` — имя из
132
+ * `markerColors`; имя чужой палитры на теге не принимается. Другое имя
133
+ * Редактор не отдаёт и при загрузке отбрасывает вместе с обёрткой (старые
134
+ * имена маркера он переводит — `legacyMarkerColors`). На `span` без
135
+ * `data-color` и без `style` он тоже не бывает — пустой `span` есть только
136
+ * в пункте чек-листа.
137
+ */
138
+ span: ["data-color", "style"],
139
+ mark: ["data-color", "style"],
140
+ /**
141
+ * Выравнивание Блока: значение из `alignments`, кроме `left` — оно
142
+ * умолчание, и Редактор его не пишет (читает как отсутствие атрибута).
143
+ */
144
+ p: ["data-align"],
145
+ /**
146
+ * Ячейка таблицы: слияние — `colspan` и `rowspan`, целое больше 1 и не
147
+ * больше `tableSpans` (1 Редактор не пишет — это умолчание); выравнивание
148
+ * столбца — `data-align` со значением из `alignments`, кроме `left`, на
149
+ * каждой ячейке столбца.
150
+ */
151
+ th: ["colspan", "rowspan", "data-align"],
152
+ td: ["colspan", "rowspan", "data-align"],
153
+ h1: ["data-align"],
154
+ h2: ["data-align"],
155
+ h3: ["data-align"],
156
+ h4: ["data-align"],
157
+ /**
158
+ * Ссылка: `href` только со схемой из `protocols`, `rel` всегда
159
+ * `"noopener noreferrer"`. `target` Редактор не отдаёт: новая вкладка —
160
+ * решение страницы показа, а не данных Документа.
161
+ */
162
+ a: ["href", "rel"],
163
+ /**
164
+ * Картинка: `src` только абсолютный `http` или `https` (`imageProtocols`),
165
+ * `alt` есть всегда — пустой у картинки без описания, — `data-width` —
166
+ * значение из `imageWidths`, только у картинки с заданной шириной.
167
+ */
168
+ img: ["src", "alt", "data-width"],
169
+ },
170
+ /**
171
+ * Допустимые значения `span[data-color]` — цвет текста: шесть тонов статуса.
172
+ * Значение вне списка `sanitizeRichText` снимает вместе с атрибутом:
173
+ * `ALLOWED_ATTR` у DOMPurify значений не проверяет, и проверять надо по
174
+ * тегу — имя маркера на `span` не годится.
175
+ */
176
+ textColors: EDITOR_TEXT_COLOR_NAMES,
177
+ /**
178
+ * Допустимые значения `mark[data-color]` — маркер: девять названий цвета.
179
+ * Те же правила, что у `textColors`, и свой тег.
180
+ */
181
+ markerColors: EDITOR_MARKER_NAMES,
182
+ /**
183
+ * Старые имена `mark[data-color]` — шесть имён цвета текста, которыми маркер
184
+ * назывался до палитры Notion, — и цвет, в который их переводит Редактор при
185
+ * загрузке и вставке. `sanitizeRichText` делает то же ДО проверки по
186
+ * `markerColors`: иначе подсветка у сохранённого документа пропадёт. На
187
+ * `span` перевода нет.
188
+ */
189
+ legacyMarkerColors: LEGACY_MARKER_NAMES,
190
+ /**
191
+ * ЕДИНСТВЕННОЕ место, где в документе бывает `style` — произвольный цвет,
192
+ * выбранный автором в `ColorPicker`. Исключение узкое и принято
193
+ * владельцем: у цвета автора нет имени, а носитель значения в HTML — `style`.
194
+ *
195
+ * `styles` — регулярное выражение (строкой) на ВСЁ значение атрибута по
196
+ * тегу: `span` — только `color:#rrggbb`, `mark` — только
197
+ * `background-color:#rrggbb`; строчные буквы, шесть цифр, без пробелов и
198
+ * `;`, ничего больше. Любой другой `style` Редактор при загрузке и вставке
199
+ * отбрасывает, а `sanitizeRichText` снимает — `ALLOWED_ATTR` у DOMPurify
200
+ * значений не проверяет, поэтому в голом `richTextSanitizeConfig()` `style`
201
+ * нет вовсе. `style` не бывает вместе с `data-color` на одном элементе.
202
+ *
203
+ * Цвет автора НЕ следует за темой — в отличие от `textColors` и `markerColors`: `#ff0000` одинаков
204
+ * в `dark`, `light` и `dim`, и контраст на какой-то из тем может не держать.
205
+ */
206
+ customColor: {
207
+ styles: CUSTOM_COLOR_STYLE_PATTERN,
208
+ },
209
+ /**
210
+ * Языки блока кода — имена после `language-` в `class` у `<pre><code>`.
211
+ * Псевдонимы (`py`, `yml`) Редактор при загрузке приводит к
212
+ * имени, неизвестный язык — к блоку без класса; `sanitizeRichText` снимает
213
+ * `class` со значением вне этого списка, псевдонимы тоже.
214
+ */
215
+ codeLanguages: CODE_LANGUAGE_IDS,
216
+ /** Допустимые значения `data-align`; `left` читается, но не пишется. */
217
+ alignments: EDITOR_ALIGNMENTS,
218
+ /**
219
+ * Варианты Раскладки — значения `div[data-layout]`: доли колонок в процентах
220
+ * через дефис (`50-50`, `60-40`, `25-25-25-25`). Число колонок Раскладки
221
+ * Редактор приводит к варианту при загрузке; сервер его не пересчитывает —
222
+ * лишняя или недостающая колонка в показе ничего не ломает.
223
+ */
224
+ layouts: EDITOR_LAYOUTS,
225
+ /**
226
+ * Тоны Обёртки — значения `div[data-tone]`: имена словаря `Tone`
227
+ * кита. Без тона атрибута нет; имя вне списка Редактор при загрузке
228
+ * отбрасывает (Обёртка остаётся), `sanitizeRichText` снимает атрибут. Цвет
229
+ * подставляет тема, как у `data-color`: в HTML нет ни `style`, ни роли.
230
+ */
231
+ wrapperTones: EDITOR_WRAPPER_TONES,
232
+ /**
233
+ * Схемы адреса ссылки. Только абсолютные адреса: `javascript:`, `data:` и
234
+ * прочие схемы не проходят ни из `value`, ни из вставки, ни из поповера.
235
+ *
236
+ * ПОЧЕМУ БЕЗ ОТНОСИТЕЛЬНЫХ (`/docs`, `#part`, `page.html`). Документ — данные,
237
+ * которые уезжают с экрана, где их написали: в `RichTextView` на другом
238
+ * маршруте, в письмо, в Markdown, в соседний продукт на другом домене.
239
+ * Относительный адрес там значит другое или ничего, а якорям в Документе не
240
+ * на что указывать — у заголовков нет `id`. Заодно адрес без схемы в поповере
241
+ * однозначен: `example.com` — это `https://example.com`, а не путь от
242
+ * текущей страницы. Ослабить правило потом можно без ломки сохранённого,
243
+ * ужесточить — уже нет.
244
+ */
245
+ protocols: ["http", "https", "mailto"],
246
+ /**
247
+ * Схемы адреса картинки — строже, чем у ссылки: `mailto:` картинкой не
248
+ * бывает, а `data:` и `blob:` не пишутся никогда (спека, «Схема и
249
+ * безопасность»). `data:` — это base64 внутри Документа: мегабайты в базе
250
+ * потребителя и в каждом `onChange`; `blob:` — адрес, живущий только в
251
+ * вкладке, где его создали, — после сохранения он ведёт в никуда.
252
+ */
253
+ imageProtocols: ["http", "https"],
254
+ /**
255
+ * Ширина картинки — доля ширины Документа в процентах: `data-width="50"`.
256
+ * Без атрибута картинка показывается в своём размере, но не шире Документа.
257
+ * Пресеты, а не любое число: ручки мышью прилипают к ним, и тот же набор
258
+ * доступен с клавиатуры в поповере картинки.
259
+ */
260
+ imageWidths: ["50", "75", "100"],
261
+ /**
262
+ * Предел слияния ячейки: `colspan` не больше 20, `rowspan` не больше 50 —
263
+ * столько же, сколько столбцов и строк у самой большой таблицы, которую
264
+ * Редактор вставляет. Значение сверх предела, ноль, дробь и не-число
265
+ * Редактор при загрузке и вставке читает как 1 (ячейка остаётся, слияние
266
+ * распадается), а санитайзеру стоит снимать атрибут: `colspan="10000"` —
267
+ * это десять тысяч пустых ячеек в каждом, кто таблицу откроет.
268
+ */
269
+ tableSpans: { colspan: 20, rowspan: 50 },
270
+ } as const satisfies {
271
+ blocks: readonly string[];
272
+ marks: readonly string[];
273
+ attributes: Readonly<Record<string, readonly string[]>>;
274
+ textColors: readonly string[];
275
+ markerColors: readonly string[];
276
+ legacyMarkerColors: Readonly<Record<string, string>>;
277
+ codeLanguages: readonly string[];
278
+ customColor: { readonly styles: Readonly<Record<string, string>> };
279
+ alignments: readonly string[];
280
+ layouts: readonly string[];
281
+ wrapperTones: readonly string[];
282
+ protocols: readonly string[];
283
+ imageProtocols: readonly string[];
284
+ imageWidths: readonly string[];
285
+ tableSpans: { readonly colspan: number; readonly rowspan: number };
286
+ };
287
+
288
+ /**
289
+ * Правила Схемы своего Блока — данные из описания своего Инструмента
290
+ * (`CustomBlock`) с заполненными умолчаниями. Признаков Блока здесь нет: это
291
+ * поведение Редактора, а не то, что может прийти в HTML.
292
+ */
293
+ export interface RichTextCustomBlockRules {
294
+ /** Блочный — `div[data-block="<имя>"]`, строчный — `span[data-block="<имя>"]`. */
295
+ kind: "block" | "inline";
296
+ /** `top` — только верхний уровень Документа (бывает только у блочного). */
297
+ place: "anywhere" | "top";
298
+ /** Свои атрибуты: имя без `data-` — вид значения. */
299
+ attributes: Readonly<Record<PrefixedName, CustomAttribute>>;
300
+ }
301
+
302
+ /** Правила Схемы своей Метки — `span[data-mark="<имя>"]` и её атрибуты. */
303
+ export interface RichTextCustomMarkRules {
304
+ attributes: Readonly<Record<PrefixedName, CustomAttribute>>;
305
+ }
306
+
307
+ /** Схема данными с правилами своих Инструментов — результат `richTextSchema(tools)`. */
308
+ export type RichTextSchema = typeof RICH_TEXT_SCHEMA & {
309
+ /** Свои Блоки и строчные атомы — по имени Блока. */
310
+ customBlocks: Readonly<Record<PrefixedName, RichTextCustomBlockRules>>;
311
+ /** Свои Метки — по имени Метки. */
312
+ customMarks: Readonly<Record<PrefixedName, RichTextCustomMarkRules>>;
313
+ };
314
+
315
+ /**
316
+ * Имя своего Блока, Метки и Инструмента: Префикс потребителя (буква, буквы и
317
+ * цифры), подчёркивание, остаток-слово — `acme_mergeTag`. В именах кита
318
+ * подчёркивания не бывает, поэтому своё и встроенное не пересекаются.
319
+ *
320
+ * @internal Им же проверяет набор Редактор (`customToolEngine.ts`).
321
+ */
322
+ export const CUSTOM_NAME = /^[A-Za-z][A-Za-z0-9]*_\w+$/;
323
+ /**
324
+ * Имя своего атрибута — то же, но строчными: в HTML имена атрибутов без регистра.
325
+ *
326
+ * @internal
327
+ */
328
+ export const CUSTOM_ATTRIBUTE_NAME = /^[a-z][a-z0-9]*_[a-z0-9_]+$/;
329
+
330
+ /**
331
+ * HTML-соглашение своего правила (ADR-0058, п. 2): блочный Блок — `div`,
332
+ * строчный Блок и Метка — `span`; Блок помечен `data-block`, Метка —
333
+ * `data-mark`, значение — имя. Одно место на Редактор (`customToolEngine.ts`:
334
+ * разбор, вывод, сверка `renderHTML`) и очистку на сервере.
335
+ *
336
+ * @internal
337
+ */
338
+ export function customElement(kind: "block" | "inline" | "mark"): {
339
+ tag: "div" | "span";
340
+ marker: "data-block" | "data-mark";
341
+ } {
342
+ return {
343
+ tag: kind === "block" ? "div" : "span",
344
+ marker: kind === "mark" ? "data-mark" : "data-block",
345
+ };
346
+ }
347
+
348
+ /** Свои атрибуты с годным именем — остальные сервер не читает. */
349
+ function customAttributes(
350
+ attributes: Readonly<Record<string, CustomAttribute>> | undefined
351
+ ): Record<PrefixedName, CustomAttribute> {
352
+ return Object.fromEntries(
353
+ Object.entries(attributes ?? {}).filter(([name]) => CUSTOM_ATTRIBUTE_NAME.test(name))
354
+ );
355
+ }
356
+
357
+ /**
358
+ * Схема Редактора данными для набора `tools` — тот же массив, что получает
359
+ * Редактор (ADR-0058, п. 2.3): Схема кита плюс правила своих Блоков и Меток.
360
+ *
361
+ * ИМЕНА КИТА БЕЛЫЙ СПИСОК НЕ СУЖАЮТ. Схема кита — по-прежнему всё, что кит
362
+ * может отдать, при любом наборе: экраны с `basic` и `full` пишут один
363
+ * Документ, и сервер одного не вправе срезать то, что записал другой. Описания
364
+ * своих Инструментов только добавляют правила. Без аргумента — Схема кита без
365
+ * своих правил; сама константа `RICH_TEXT_SCHEMA` не меняется.
366
+ *
367
+ * Правила с именем без Префикса потребителя здесь не читаются: Редактор такой
368
+ * набор отвергает ошибкой поля, а у сервера ошибок нет — и описание с именем
369
+ * кита (`wrapper`, атрибут `tone`) не должно открыть обход правил кита.
370
+ *
371
+ * Читаются только данные описания (`blocks`, `marks`), Часть для движка не
372
+ * трогается: модуль с описанием своего Инструмента импортируется на сервере,
373
+ * и Tiptap здесь не нужен.
374
+ */
375
+ export function richTextSchema(tools: readonly ToolEntry[] = []): RichTextSchema {
376
+ const customBlocks: Record<PrefixedName, RichTextCustomBlockRules> = {};
377
+ const customMarks: Record<PrefixedName, RichTextCustomMarkRules> = {};
378
+ for (const tool of tools) {
379
+ if (typeof tool !== "object" || tool === null) continue;
380
+ for (const [name, block] of Object.entries(tool.blocks ?? {})) {
381
+ if (!CUSTOM_NAME.test(name)) continue;
382
+ const kind = block.kind === "inline" ? "inline" : "block";
383
+ customBlocks[name as PrefixedName] = {
384
+ kind,
385
+ place: kind === "block" && block.place === "top" ? "top" : "anywhere",
386
+ attributes: customAttributes(block.attributes),
387
+ };
388
+ }
389
+ for (const [name, mark] of Object.entries(tool.marks ?? {})) {
390
+ if (CUSTOM_NAME.test(name)) {
391
+ customMarks[name as PrefixedName] = { attributes: customAttributes(mark.attributes) };
392
+ }
393
+ }
394
+ }
395
+ return { ...RICH_TEXT_SCHEMA, customBlocks, customMarks };
396
+ }
397
+
398
+ /** Имена атрибутов HTML своих правил: `data-mark` и `data-<имя>` каждого своего атрибута. */
399
+ function customAttributeNames(schema: RichTextSchema): string[] {
400
+ const rules = [...Object.values(schema.customBlocks), ...Object.values(schema.customMarks)];
401
+ return [
402
+ ...(Object.keys(schema.customMarks).length > 0 ? ["data-mark"] : []),
403
+ ...rules.flatMap((rule) => Object.keys(rule.attributes).map((name) => `data-${name}`)),
404
+ ];
405
+ }
406
+
407
+ /**
408
+ * Атрибуты и теги Схемы, которые без проверки по тегу и значению опасны.
409
+ *
410
+ * `ALLOWED_ATTR` у DOMPurify — один список на все теги, и значений он не
411
+ * проверяет. Для большинства атрибутов Схемы это безвредно: `data-color` на
412
+ * `<p>` или `start` на `<ul>` ничего не красят и ничего не исполняют. Для этих —
413
+ * нет: `style` пропустил бы любой CSS (`position:fixed` поверх страницы),
414
+ * `class` — любой класс Tailwind потребителя (`fixed inset-0 z-50`), `src` у
415
+ * `<img>` DOMPurify пропускает с `data:` в обход `ALLOWED_URI_REGEXP`,
416
+ * `colspan="10000"` — десять тысяч пустых ячеек у каждого читателя, `type` и
417
+ * `checked` делают из флажка любое поле ввода. А `<input>` и `<img>` без своих
418
+ * атрибутов — пустое текстовое поле и битая картинка.
419
+ *
420
+ * Поэтому они разрешаются ТОЛЬКО вместе с хуками `sanitizeRichText`, которые
421
+ * сверяют тег и значение. Голый `richTextSanitizeConfig()` их не знает.
422
+ */
423
+ const HOOK_GUARDED_ATTRIBUTES: readonly string[] = [
424
+ "style",
425
+ "class",
426
+ "src",
427
+ "colspan",
428
+ "rowspan",
429
+ "type",
430
+ "checked",
431
+ ];
432
+ const HOOK_GUARDED_TAGS: readonly string[] = ["input", "img"];
433
+
434
+ /** Атрибуты Схемы, несущие адрес: их DOMPurify сверяет с `ALLOWED_URI_REGEXP`. */
435
+ const URI_ATTRIBUTES: readonly string[] = ["href", "src"];
436
+
437
+ /**
438
+ * Конфиг очистки для DOMPurify — ЗАКРЫТЫЙ ПО УМОЛЧАНИЮ. Безопасный путь —
439
+ * `sanitizeRichText(html, DOMPurify)` ниже: он ставит хуки Схемы и пропускает
440
+ * разметку Редактора целиком. Этот конфиг — для того, кто передаёт его
441
+ * DOMPurify напрямую: без хуков он не пропустит ничего опасного, но и часть
442
+ * разметки Редактора потеряется (цвет автора, язык блока кода, слияние ячеек,
443
+ * флажки чек-листа и картинки — `HOOK_GUARDED_ATTRIBUTES`).
444
+ *
445
+ * ПОЧЕМУ ФУНКЦИЯ НА МАССИВАХ, А НЕ ЗАВИСИМОСТЬ. DOMPurify кит не ставит и не
446
+ * импортирует: очистка — дело сервера потребителя (ADR-0050), а у него свой
447
+ * выбор — DOMPurify с jsdom, `isomorphic-dompurify`, другой санитайзер. Здесь
448
+ * только данные Схемы в форме, которую DOMPurify принимает, поэтому тип результата
449
+ * свой, а не его `Config`: структурно он ему присваивается.
450
+ *
451
+ * ПОЧЕМУ КАЖДЫЙ РАЗ НОВЫЕ МАССИВЫ. DOMPurify и вызывающий код вольны менять
452
+ * конфиг (`ALLOWED_ATTR.push("data-color")`), и общий массив протёк бы такой
453
+ * правкой в соседние вызовы.
454
+ *
455
+ * Что остаётся в общем `ALLOWED_ATTR` — безвредно на любом теге и с любым
456
+ * значением: имена `data-*` Схемы (их читает только типографика, и только свои
457
+ * значения), `start`, `alt`, `rel` и `href` — адрес сверяет выражение ниже.
458
+ * `ALLOW_DATA_ATTR` и `ALLOW_ARIA_ATTR` выключены: по умолчанию DOMPurify
459
+ * пропускает любые `data-*` и `aria-*`, а Схема знает свои `data-*` —
460
+ * `data-type`, `data-checked`, `data-color`, `data-align` и `data-width`, они
461
+ * названы в `ALLOWED_ATTR` поимённо и попадают туда из `attributes`.
462
+ *
463
+ * АДРЕС ССЫЛКИ — `ALLOWED_URI_REGEXP` по `protocols`, той же политикой, что в
464
+ * Редакторе: `javascript:`, `data:`, `ftp:` и относительные адреса `href` не
465
+ * проходят. DOMPurify сверяет с этим выражением не только `href`, а КАЖДЫЙ
466
+ * разрешённый атрибут, кроме «безопасных для URI», — и строгое выражение
467
+ * срезало бы `start="3"` и `data-type="taskList"`. Поэтому все атрибуты Схемы,
468
+ * кроме адресов (`href` и `src`), объявлены безопасными (`ADD_URI_SAFE_ATTR`)
469
+ * и сверяются только со списком имён. Атрибут, который добавит следующий
470
+ * срез, попадёт туда сам.
471
+ *
472
+ * Модуль серверно-безопасен: функция над данными, без React и без движка.
473
+ */
474
+ export function richTextSanitizeConfig(): RichTextSanitizeConfig {
475
+ return sanitizeConfig(false);
476
+ }
477
+
478
+ /**
479
+ * Конфиг Схемы: закрытый — без охраняемых хуками атрибутов и тегов, полный — с
480
+ * ними и с атрибутами своих Блоков и Меток (`data-mark`, `data-<имя>`): их
481
+ * значения тоже сверяют только хуки.
482
+ */
483
+ function sanitizeConfig(withHooks: boolean, custom?: RichTextSchema): RichTextSanitizeConfig {
484
+ const attributes = [
485
+ ...new Set<string>([
486
+ ...Object.values(RICH_TEXT_SCHEMA.attributes).flat(),
487
+ ...(custom ? customAttributeNames(custom) : []),
488
+ ]),
489
+ ].filter((name) => withHooks || !HOOK_GUARDED_ATTRIBUTES.includes(name));
490
+ return {
491
+ ALLOWED_TAGS: [...RICH_TEXT_SCHEMA.blocks, ...RICH_TEXT_SCHEMA.marks].filter(
492
+ (tag) => withHooks || !HOOK_GUARDED_TAGS.includes(tag)
493
+ ),
494
+ ALLOWED_ATTR: attributes,
495
+ ALLOW_DATA_ATTR: false,
496
+ ALLOW_ARIA_ATTR: false,
497
+ ALLOWED_URI_REGEXP: linkProtocolPattern(),
498
+ ADD_URI_SAFE_ATTR: attributes.filter((name) => !URI_ATTRIBUTES.includes(name)),
499
+ };
500
+ }
501
+
502
+ /** Форма, которую принимает `DOMPurify.sanitize`; подмножество его `Config`. */
503
+ export interface RichTextSanitizeConfig {
504
+ ALLOWED_TAGS: string[];
505
+ ALLOWED_ATTR: string[];
506
+ ALLOW_DATA_ATTR: false;
507
+ ALLOW_ARIA_ATTR: false;
508
+ /** Схемы адреса ссылки — `RICH_TEXT_SCHEMA.protocols`. */
509
+ ALLOWED_URI_REGEXP: RegExp;
510
+ /** Атрибуты, которые DOMPurify не сверяет с `ALLOWED_URI_REGEXP`: все, кроме `href` и `src`. */
511
+ ADD_URI_SAFE_ATTR: string[];
512
+ }
513
+
514
+ /** Событие хука `uponSanitizeAttribute`: подмножество того, что передаёт DOMPurify. */
515
+ export interface RichTextAttributeHookEvent {
516
+ attrName: string;
517
+ attrValue: string;
518
+ keepAttr: boolean;
519
+ }
520
+
521
+ /**
522
+ * Экземпляр DOMPurify — ровно то, чем пользуется `sanitizeRichText`.
523
+ *
524
+ * ПОЧЕМУ СТРУКТУРНЫЙ ТИП, А НЕ ИМПОРТ ИЗ `dompurify`. Пакета в зависимостях кита
525
+ * нет и не будет (ADR-0050): потребитель приносит свой — `dompurify` с jsdom
526
+ * или `isomorphic-dompurify`. Экземпляр любого из них присваивается этому типу
527
+ * без приведений; это сторожит `tests/editor-sanitize.test.tsx` на настоящем
528
+ * DOMPurify.
529
+ */
530
+ export interface RichTextPurifier {
531
+ sanitize(dirty: string, config: RichTextSanitizeConfig): string;
532
+ addHook(
533
+ entryPoint: "uponSanitizeAttribute",
534
+ hook: (node: Element, event: RichTextAttributeHookEvent) => void
535
+ ): void;
536
+ addHook(entryPoint: "afterSanitizeAttributes", hook: (node: Element) => void): void;
537
+ removeHook(
538
+ entryPoint: "uponSanitizeAttribute",
539
+ hook?: (node: Element, event: RichTextAttributeHookEvent) => void
540
+ ): unknown;
541
+ removeHook(entryPoint: "afterSanitizeAttributes", hook?: (node: Element) => void): unknown;
542
+ }
543
+
544
+ /**
545
+ * Очистить HTML Документа по Схеме Редактора — безопасный путь по умолчанию
546
+ * (ADR-0050): `sanitizeRichText(html, DOMPurify)` на сервере потребителя.
547
+ *
548
+ * ПОЧЕМУ ХЕЛПЕР, А НЕ РЕЦЕПТ НА СТРАНИЦЕ. Политика по тегам — где `style`
549
+ * бывает и с каким значением, какой `class` у `code`, где живут `label` и
550
+ * `input` — жила только в хуках, которые потребитель копировал со страницы
551
+ * `RichTextView`. Конфиг при этом разрешал `style` и `class` на любом теге:
552
+ * забытый или устаревший при копировании хук молча пропускал любой CSS. Теперь
553
+ * хуки — код кита, они меняются вместе со Схемой, а без них конфиг закрыт.
554
+ *
555
+ * ХУКИ — НА ВРЕМЯ ОДНОГО ВЫЗОВА. DOMPurify держит хуки на экземпляре, а
556
+ * экземпляр у потребителя общий (комментарии, письма, свои правила).
557
+ * Поставленные навсегда, правила Схемы срабатывали бы в чужой очистке. Хелпер
558
+ * ставит их перед `sanitize` и снимает после — по ссылке на функцию, поэтому
559
+ * свои хуки потребителя остаются на месте. Снятие по ссылке — DOMPurify 3.2+;
560
+ * старый `removeHook` без функции снимает последний поставленный, то есть тоже
561
+ * наш. `sanitize` синхронный: чужой вызов между установкой и снятием не
562
+ * вклинится.
563
+ *
564
+ * Что проверяют хуки (всё, что Редактор пишет, проходит без изменений):
565
+ *
566
+ * - `label`, `input`, `span`, `div` — только разметка пункта чек-листа; `input`
567
+ * — только `type="checkbox"`;
568
+ * - `ol[start]` — только на `ol`; `ul`/`li[data-type]`, `li[data-checked]` —
569
+ * только значения чек-листа;
570
+ * - `code[class]` — только канонический `language-<имя>` из `codeLanguages`;
571
+ * - `span[data-color]` и `mark[data-color]` — только имена своей палитры, старые
572
+ * имена маркера переводятся (`legacyMarkerColors`); `mark` без цвета
573
+ * снимается;
574
+ * - `style` — только `color:#rrggbb` на `span` и `background-color:#rrggbb` на
575
+ * `mark` и никогда вместе с `data-color`;
576
+ * - `data-align` — известное значение на `p`, `h1`–`h4`, `th`, `td`;
577
+ * - Раскладка — `div[data-block="layout"]` с вариантом из `layouts` и только
578
+ * вне колонки, списка, цитаты и таблицы; `div[data-block="column"]` — только
579
+ * прямо в ней. Иначе обёртка снимается, Блоки остаются подряд;
580
+ * - Обёртка — `div[data-block="wrapper"]` на верхнем уровне или прямо в
581
+ * колонке Раскладки, не в другой Обёртке, списке, цитате и таблице; иначе
582
+ * снимается так же, вместе с тоном; `data-tone` — имя из `wrapperTones` и
583
+ * только на Обёртке;
584
+ * - `colspan`, `rowspan` — на `th`/`td`, целое от 1 до `tableSpans`;
585
+ * - ссылка — `href` по `protocols` (выражение конфига), `rel` всегда
586
+ * `"noopener noreferrer"`, ссылка без адреса становится текстом;
587
+ * - картинка — `img` с абсолютным `http`/`https` прямо в `figure`, без `data:`
588
+ * и `blob:`, `data-width` — пресет, `alt` есть всегда; `figcaption` — только
589
+ * в `figure`.
590
+ *
591
+ * Токенов подсветки `hljs-*` в Схеме нет, и хелпер их снимает: подсветка —
592
+ * после очистки (`highlightCodeBlocks`, ADR-0051).
593
+ *
594
+ * СВОИ ИНСТРУМЕНТЫ — ТРЕТЬИМ АРГУМЕНТОМ (ADR-0058, п. 2.3): тот же массив
595
+ * `tools`, что у Редактора. Свой Блок проходит как `div[data-block="<имя>"]`
596
+ * (строчный — `span`), своя Метка — как `span[data-mark="<имя>"]`, их атрибуты
597
+ * `data-<имя>` — только на своём элементе и только со значением по виду из
598
+ * правил (список, шаблон, адрес по политике протоколов ссылки); значение с
599
+ * разметкой не проходит никогда. Чужие теги и атрибуты на своём элементе
600
+ * снимаются, Блок с местом `top` вне верхнего уровня теряет обёртку, как
601
+ * Раскладка. Имена Инструментов кита белый список не сужают (`richTextSchema`).
602
+ * Без третьего аргумента очистка та же, что была до своих Инструментов.
603
+ *
604
+ * Модуль серверно-безопасен: DOM даёт экземпляр DOMPurify, кит его не
605
+ * импортирует.
606
+ */
607
+ export function sanitizeRichText(
608
+ html: string,
609
+ purify: RichTextPurifier,
610
+ tools?: readonly ToolEntry[]
611
+ ): string {
612
+ // Хуки — замыкания на Схему этого вызова: снимаются по ссылке, как и раньше.
613
+ const schema = richTextSchema(tools);
614
+ const onAttribute = (node: Element, event: RichTextAttributeHookEvent) =>
615
+ checkAttribute(node, event, schema);
616
+ const onStructure = (node: Element) => checkStructure(node, schema);
617
+ purify.addHook("uponSanitizeAttribute", onAttribute);
618
+ purify.addHook("afterSanitizeAttributes", onStructure);
619
+ try {
620
+ return purify.sanitize(html, sanitizeConfig(true, schema));
621
+ } finally {
622
+ purify.removeHook("afterSanitizeAttributes", onStructure);
623
+ purify.removeHook("uponSanitizeAttribute", onAttribute);
624
+ }
625
+ }
626
+
627
+ const has = (list: readonly string[], value: string) => list.includes(value);
628
+
629
+ /** Слияние ячеек: только `th` и `td`, только цифры и не больше предела Схемы. */
630
+ function isSpan(node: Element, value: string, max: number): boolean {
631
+ return (
632
+ (node.nodeName === "TH" || node.nodeName === "TD") &&
633
+ /^\d{1,6}$/.test(value) &&
634
+ Number(value) >= 1 &&
635
+ Number(value) <= max
636
+ );
637
+ }
638
+
639
+ /**
640
+ * Каждый атрибут Схемы — только на своём теге и со своим значением. Общий
641
+ * `ALLOWED_ATTR` DOMPurify пускает его куда угодно и с любым значением; правило
642
+ * здесь оставляет его там и таким, где и каким его пишет Редактор.
643
+ */
644
+ const ATTRIBUTE_RULES: Record<string, (node: Element, value: string) => boolean> = {
645
+ start: (node) => node.nodeName === "OL",
646
+ "data-type": (node, value) =>
647
+ (node.nodeName === "UL" && value === "taskList") ||
648
+ (node.nodeName === "LI" && value === "taskItem"),
649
+ "data-checked": (node, value) =>
650
+ node.nodeName === "LI" &&
651
+ node.getAttribute("data-type") === "taskItem" &&
652
+ (value === "true" || value === "false"),
653
+ // Цвет — только на `span` и `mark` и только имя ИХ палитры: у цвета текста и у
654
+ // маркера списки разные, имя маркера на `span` не проходит.
655
+ "data-color": (node, value) =>
656
+ (node.nodeName === "SPAN" && has(RICH_TEXT_SCHEMA.textColors, value)) ||
657
+ (node.nodeName === "MARK" && has(RICH_TEXT_SCHEMA.markerColors, value)),
658
+ // `style` — только произвольный цвет автора, выражения — из Схемы. Любой другой
659
+ // CSS и `style` на других тегах снимаются.
660
+ style: (node, value) => {
661
+ const tag = node.nodeName.toLowerCase();
662
+ const pattern =
663
+ tag === "span" || tag === "mark" ? RICH_TEXT_SCHEMA.customColor.styles[tag] : undefined;
664
+ return pattern !== undefined && new RegExp(pattern).test(value);
665
+ },
666
+ // Раскладка, колонка и Обёртка — только `div`; вариант — только у Раскладки.
667
+ "data-block": (node, value) =>
668
+ node.nodeName === "DIV" &&
669
+ (value === LAYOUT_BLOCK || value === COLUMN_BLOCK || value === WRAPPER_BLOCK),
670
+ "data-layout": (node, value) =>
671
+ node.nodeName === "DIV" &&
672
+ node.getAttribute("data-block") === LAYOUT_BLOCK &&
673
+ has(RICH_TEXT_SCHEMA.layouts, value),
674
+ // Тон — только у Обёртки и только имя из словаря тонов.
675
+ "data-tone": (node, value) =>
676
+ node.nodeName === "DIV" &&
677
+ node.getAttribute("data-block") === WRAPPER_BLOCK &&
678
+ has(RICH_TEXT_SCHEMA.wrapperTones, value),
679
+ "data-align": (node, value) =>
680
+ ["P", "H1", "H2", "H3", "H4", "TH", "TD"].includes(node.nodeName) &&
681
+ has(RICH_TEXT_SCHEMA.alignments, value),
682
+ colspan: (node, value) => isSpan(node, value, RICH_TEXT_SCHEMA.tableSpans.colspan),
683
+ rowspan: (node, value) => isSpan(node, value, RICH_TEXT_SCHEMA.tableSpans.rowspan),
684
+ type: (node, value) => node.nodeName === "INPUT" && value === "checkbox",
685
+ checked: (node) => node.nodeName === "INPUT",
686
+ // Язык блока кода — только канонический «language-<имя>» и только на `code`:
687
+ // псевдоним, второй класс рядом и класс на других тегах снимаются. Без списка
688
+ // классов на уровне модуля: вызов `map` там не вытряхивается и ехал бы в каждый
689
+ // импорт `@olddevs/ui/editor`, даже без очистки.
690
+ class: (node, value) =>
691
+ node.nodeName === "CODE" &&
692
+ value.startsWith("language-") &&
693
+ has(RICH_TEXT_SCHEMA.codeLanguages, value.slice("language-".length)),
694
+ // Схему адреса уже сверил `ALLOWED_URI_REGEXP` конфига; здесь — тег.
695
+ href: (node) => node.nodeName === "A",
696
+ rel: (node) => node.nodeName === "A",
697
+ // Адрес картинки — только абсолютный http и https. `ALLOWED_URI_REGEXP` здесь не
698
+ // помогает: `data:` в `src` у `<img>` DOMPurify пропускает в обход него.
699
+ src: (node, value) => node.nodeName === "IMG" && isAllowedImageSrc(value),
700
+ alt: (node) => node.nodeName === "IMG",
701
+ "data-width": (node, value) =>
702
+ node.nodeName === "IMG" && has(RICH_TEXT_SCHEMA.imageWidths, value),
703
+ };
704
+
705
+ /** Ключ записи — только собственное поле: `constructor` и `__proto__` правилом не станут. */
706
+ function own<T>(record: Readonly<Record<string, T>>, key: string | null): T | undefined {
707
+ return key !== null && Object.hasOwn(record, key) ? record[key] : undefined;
708
+ }
709
+
710
+ /**
711
+ * Правила своего элемента: свой Блок — по `data-block` и тегу своего вида,
712
+ * своя Метка — `span` по `data-mark`. Тег сверяется здесь, а не полагается на
713
+ * уже проверенный `data-block`: DOMPurify обходит атрибуты в своём порядке.
714
+ */
715
+ function customRulesOf(
716
+ node: Element,
717
+ schema: RichTextSchema
718
+ ): RichTextCustomBlockRules | RichTextCustomMarkRules | undefined {
719
+ const tag = node.nodeName.toLowerCase();
720
+ const block = own(schema.customBlocks, node.getAttribute("data-block"));
721
+ if (block) return tag === customElement(block.kind).tag ? block : undefined;
722
+ return tag === customElement("mark").tag
723
+ ? own(schema.customMarks, node.getAttribute("data-mark"))
724
+ : undefined;
725
+ }
726
+
727
+ /**
728
+ * Атрибут своего элемента: `true` и `false` — решение, `undefined` — дело
729
+ * правил кита. На своём элементе бывают только `data-block`, `data-mark` и
730
+ * свои `data-<имя>` по его правилам; атрибуты кита (`data-color`, `style`) там
731
+ * чужие.
732
+ */
733
+ function customAttributeAllowed(
734
+ node: Element,
735
+ { attrName, attrValue }: RichTextAttributeHookEvent,
736
+ schema: RichTextSchema
737
+ ): boolean | undefined {
738
+ if (attrName === "data-mark") {
739
+ return node.nodeName === "SPAN" && own(schema.customMarks, attrValue) !== undefined;
740
+ }
741
+ const rules = customRulesOf(node, schema);
742
+ if (attrName === "data-block") {
743
+ const block = own(schema.customBlocks, attrValue);
744
+ return block ? rules === block : undefined;
745
+ }
746
+ const attribute = attrName.startsWith("data-")
747
+ ? own(rules?.attributes ?? {}, attrName.slice("data-".length))
748
+ : undefined;
749
+ if (attribute) return isAllowedAttributeValue(attribute, attrValue);
750
+ return rules ? false : undefined;
751
+ }
752
+
753
+ /** Хук `uponSanitizeAttribute`: атрибут Схемы — по правилу своего имени. */
754
+ function checkAttribute(
755
+ node: Element,
756
+ event: RichTextAttributeHookEvent,
757
+ schema: RichTextSchema
758
+ ): void {
759
+ const custom = customAttributeAllowed(node, event, schema);
760
+ if (custom !== undefined) {
761
+ if (!custom) event.keepAttr = false;
762
+ return;
763
+ }
764
+ // Документ, сохранённый до палитры маркера Notion, несёт на `mark` старое имя
765
+ // (`accent`, `success`, …). Его переводят до проверки, как Редактор при
766
+ // загрузке; иначе подсветка пропала бы, а голый `mark` снимается ниже.
767
+ if (event.attrName === "data-color" && node.nodeName === "MARK") {
768
+ const legacy = RICH_TEXT_SCHEMA.legacyMarkerColors as Record<string, string>;
769
+ if (Object.hasOwn(legacy, event.attrValue)) event.attrValue = legacy[event.attrValue]!;
770
+ }
771
+ const allowed = ATTRIBUTE_RULES[event.attrName];
772
+ if (allowed && !allowed(node, event.attrValue)) event.keepAttr = false;
773
+ }
774
+
775
+ /**
776
+ * `label`, `input`, `span` и `div` — разметка пункта чек-листа. Вне пункта
777
+ * обёртка снимается, а содержимое остаётся, как и у любого неразрешённого тега.
778
+ */
779
+ const TASK_ITEM = 'li[data-type="taskItem"]';
780
+ const PARENT_OF: Record<string, string> = {
781
+ LABEL: TASK_ITEM,
782
+ DIV: TASK_ITEM,
783
+ INPUT: `${TASK_ITEM} > label`,
784
+ SPAN: `${TASK_ITEM} > label`,
785
+ };
786
+
787
+ /** Значения `div[data-block]`: Раскладка, её колонка и Обёртка. */
788
+ const LAYOUT_BLOCK = "layout";
789
+ const COLUMN_BLOCK = "column";
790
+ const WRAPPER_BLOCK = "wrapper";
791
+
792
+ /**
793
+ * Где Раскладки быть не может: в другой Раскладке (её колонке), в Обёртке, в
794
+ * списке, цитате и ячейке. Редактор такую не отдаёт — у колонки и прочих контейнеров
795
+ * в Схеме движка её нет, — и при загрузке разворачивает в Блоки подряд.
796
+ */
797
+ const NOT_A_LAYOUT_PLACE = "div[data-block], li, blockquote, th, td";
798
+
799
+ /**
800
+ * Раскладка, колонка и Обёртка: `true` — элемент обработан (оставлен или
801
+ * снят). Родитель обходится раньше детей, поэтому колонка снятой Раскладки уже
802
+ * не находит её над собой и снимается тоже, а Обёртка снятой колонки
803
+ * проверяется по новому месту.
804
+ */
805
+ function checkLayout(node: Element): boolean {
806
+ const block = node.nodeName === "DIV" ? node.getAttribute("data-block") : null;
807
+ // Обёртка — на верхнем уровне или прямо в колонке: тот же список мест, где
808
+ // нет Раскладки, только колонка её принимает.
809
+ if (block === WRAPPER_BLOCK) {
810
+ const parent = node.parentElement;
811
+ if (
812
+ parent?.closest(NOT_A_LAYOUT_PLACE) &&
813
+ !parent.matches(`div[data-block="${COLUMN_BLOCK}"]`)
814
+ ) {
815
+ node.replaceWith(...node.childNodes);
816
+ }
817
+ return true;
818
+ }
819
+ if (block === LAYOUT_BLOCK) {
820
+ if (!node.hasAttribute("data-layout") || node.parentElement?.closest(NOT_A_LAYOUT_PLACE)) {
821
+ node.replaceWith(...node.childNodes);
822
+ }
823
+ return true;
824
+ }
825
+ if (block === COLUMN_BLOCK) {
826
+ if (!node.parentElement?.matches(`div[data-block="${LAYOUT_BLOCK}"]`)) {
827
+ node.replaceWith(...node.childNodes);
828
+ }
829
+ return true;
830
+ }
831
+ return false;
832
+ }
833
+
834
+ /**
835
+ * Свой элемент: `true` — обработан (оставлен или снят). Блок с местом `top` —
836
+ * только прямо в Документе: вложенный теряет обёртку, содержимое остаётся.
837
+ */
838
+ function checkCustom(node: Element, schema: RichTextSchema): boolean {
839
+ const rules = customRulesOf(node, schema);
840
+ if (!rules) return false;
841
+ const parent = node.parentElement;
842
+ // Верхний уровень — прямо в `body` разбора DOMPurify. По имени, а не по
843
+ // `ownerDocument.body`: у документа разбора DOMPurify его может не быть.
844
+ if ("place" in rules && rules.place === "top" && parent && parent.nodeName !== "BODY") {
845
+ node.replaceWith(...node.childNodes);
846
+ }
847
+ return true;
848
+ }
849
+
850
+ /** Хук `afterSanitizeAttributes`: место элемента в Документе. */
851
+ function checkStructure(node: Element, schema: RichTextSchema): void {
852
+ if (checkLayout(node) || checkCustom(node, schema)) return;
853
+ // Без `type="checkbox"` поле ввода — обычное текстовое: такого флажка нет.
854
+ if (node.nodeName === "INPUT" && node.getAttribute("type") !== "checkbox") {
855
+ node.remove();
856
+ return;
857
+ }
858
+ // Цвет у метки один — палитры или автора, поэтому рядом с `data-color` `style`
859
+ // снимается. `span` с цветом бывает где угодно; `mark` без цвета снимается:
860
+ // голый маркер браузер красит жёлтым.
861
+ if (node.hasAttribute("data-color")) node.removeAttribute("style");
862
+ const coloured = node.hasAttribute("data-color") || node.hasAttribute("style");
863
+ if (node.nodeName === "MARK" && !coloured) {
864
+ node.replaceWith(...node.childNodes);
865
+ return;
866
+ }
867
+ if (node.nodeName === "SPAN" && coloured) return;
868
+ // Картинка — `img` с адресом прямо внутри `figure`, и только так: `figure`
869
+ // без годной картинки разворачивается в содержимое, `img` вне `figure` или без
870
+ // адреса удаляется, `figcaption` вне `figure` теряет обёртку.
871
+ if (node.nodeName === "FIGURE") {
872
+ const img = node.querySelector(":scope > img");
873
+ if (!img || !isAllowedImageSrc(img.getAttribute("src") ?? "")) {
874
+ node.replaceWith(...node.childNodes);
875
+ }
876
+ return;
877
+ }
878
+ if (node.nodeName === "IMG") {
879
+ if (!node.hasAttribute("src") || node.parentElement?.nodeName !== "FIGURE") {
880
+ node.remove();
881
+ return;
882
+ }
883
+ if (!node.hasAttribute("alt")) node.setAttribute("alt", "");
884
+ return;
885
+ }
886
+ if (node.nodeName === "FIGCAPTION") {
887
+ if (node.parentElement?.nodeName !== "FIGURE") node.replaceWith(...node.childNodes);
888
+ return;
889
+ }
890
+ // Ссылка, у которой адрес срезан (чужая схема), остаётся текстом; у ссылки
891
+ // с адресом `rel` всегда тот, что пишет Редактор.
892
+ if (node.nodeName === "A") {
893
+ if (!node.hasAttribute("href")) {
894
+ node.replaceWith(...node.childNodes);
895
+ return;
896
+ }
897
+ node.setAttribute("rel", "noopener noreferrer");
898
+ }
899
+ const parent = PARENT_OF[node.nodeName];
900
+ if (parent && !node.parentElement?.matches(parent)) node.replaceWith(...node.childNodes);
901
+ }
902
+
903
+ /**
904
+ * Символы, которые браузер вырезает из адреса перед разбором: пробелы и
905
+ * управляющие. `java\tscript:` для него — `javascript:`, поэтому схема
906
+ * сверяется после их удаления. Набор тот же, что `ATTR_WHITESPACE` у DOMPurify:
907
+ * Редактор и очистка на сервере обязаны видеть один и тот же адрес.
908
+ */
909
+ // eslint-disable-next-line no-control-regex -- управляющие символы и есть предмет проверки
910
+ const URI_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
911
+
912
+ /** Адрес начинается с разрешённой схемы — из `RICH_TEXT_SCHEMA.protocols`. */
913
+ function linkProtocolPattern(): RegExp {
914
+ return new RegExp(`^(?:${RICH_TEXT_SCHEMA.protocols.join("|")}):`, "i");
915
+ }
916
+
917
+ /**
918
+ * Годится ли адрес для ссылки Документа: абсолютный, со схемой из
919
+ * `RICH_TEXT_SCHEMA.protocols`. Им проверяют и Редактор (загрузка, вставка,
920
+ * поповер), и конфиг очистки — правило одно на обе стороны.
921
+ *
922
+ * @internal Не входит в публичные входы: потребителю хватает конфига.
923
+ */
924
+ export function isAllowedLinkHref(href: string): boolean {
925
+ return linkProtocolPattern().test(href.replace(URI_WHITESPACE, ""));
926
+ }
927
+
928
+ /**
929
+ * Годится ли адрес для картинки Документа: абсолютный `http` или `https`
930
+ * (`RICH_TEXT_SCHEMA.imageProtocols`) с именем хоста. `https:photo.png` без
931
+ * `//` браузер разобрал бы относительно страницы — такой адрес не проходит.
932
+ *
933
+ * @internal Не входит в публичные входы: потребителю хватает `sanitizeRichText`.
934
+ */
935
+ export function isAllowedImageSrc(src: string): boolean {
936
+ const pattern = new RegExp(`^(?:${RICH_TEXT_SCHEMA.imageProtocols.join("|")})://[^/?#]`, "i");
937
+ return pattern.test(src.replace(URI_WHITESPACE, ""));
938
+ }
939
+
940
+ /**
941
+ * Годится ли значение своего атрибута по его виду (`CustomAttribute`). Одна
942
+ * проверка на Редактор (`customToolEngine.ts`) и очистку на сервере.
943
+ *
944
+ * Значение с `<` не проходит никогда, какой бы ни был шаблон: HTML в атрибутах
945
+ * запрещён (ADR-0058, п. 2.5) — содержимое Блока живёт разметкой Документа в
946
+ * его детях, где его чистит та же Схема.
947
+ *
948
+ * @internal Наружу отдаётся через `customTool.ts`.
949
+ */
950
+ export function isAllowedAttributeValue(rule: CustomAttribute, value: string): boolean {
951
+ if (value.includes("<")) return false;
952
+ if (rule.kind === "list") return rule.values.includes(value);
953
+ if (rule.kind === "pattern") return patternOf(rule)?.test(value) ?? false;
954
+ return rule.kind === "url" && isAllowedLinkHref(value);
955
+ }
956
+
957
+ /**
958
+ * Выражения правил `pattern` — по одному на правило: очистка зовёт проверку на
959
+ * каждый атрибут каждого вызова, и компилировать шаблон заново там незачем.
960
+ * Ключ — объект правила (`richTextSchema` его не копирует), `null` — шаблон не
961
+ * выражение.
962
+ */
963
+ const PATTERNS = new WeakMap<CustomAttribute, RegExp | null>();
964
+
965
+ /**
966
+ * Выражение правила или `null`. Битый шаблон Редактор отвергает ошибкой поля
967
+ * (`customToolsError`), а у сервера ошибок нет: очистка не падает, значение по
968
+ * такому правилу не проходит, разработчик видит предупреждение. Шаблон в
969
+ * тексте — данные описания, не меняющиеся от вызова к вызову.
970
+ */
971
+ function patternOf(rule: Extract<CustomAttribute, { kind: "pattern" }>): RegExp | null {
972
+ let pattern = PATTERNS.get(rule);
973
+ if (pattern === undefined) {
974
+ try {
975
+ pattern = new RegExp(`^(?:${rule.pattern})$`);
976
+ } catch {
977
+ pattern = null;
978
+ devWarn(
979
+ `sanitizeRichText: the custom attribute pattern "${rule.pattern}" is not a regular ` +
980
+ "expression, so no value passes it. Fix the pattern in the tool's rules."
981
+ );
982
+ }
983
+ PATTERNS.set(rule, pattern);
984
+ }
985
+ return pattern;
986
+ }