torch-glare 2.5.6 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/README.md +4 -3
  2. package/dist/bin/index.js +9 -24
  3. package/dist/bin/index.js.map +1 -1
  4. package/dist/src/commands/add.d.ts +2 -2
  5. package/dist/src/commands/add.d.ts.map +1 -1
  6. package/dist/src/commands/add.js +4 -70
  7. package/dist/src/commands/add.js.map +1 -1
  8. package/dist/src/commands/hook.d.ts +5 -4
  9. package/dist/src/commands/hook.d.ts.map +1 -1
  10. package/dist/src/commands/hook.js +7 -75
  11. package/dist/src/commands/hook.js.map +1 -1
  12. package/dist/src/commands/init.js +1 -1
  13. package/dist/src/commands/init.js.map +1 -1
  14. package/dist/src/commands/layout.d.ts +5 -4
  15. package/dist/src/commands/layout.d.ts.map +1 -1
  16. package/dist/src/commands/layout.js +7 -75
  17. package/dist/src/commands/layout.js.map +1 -1
  18. package/dist/src/commands/provider.d.ts +5 -4
  19. package/dist/src/commands/provider.d.ts.map +1 -1
  20. package/dist/src/commands/provider.js +7 -75
  21. package/dist/src/commands/provider.js.map +1 -1
  22. package/dist/src/commands/update.d.ts.map +1 -1
  23. package/dist/src/commands/update.js +78 -43
  24. package/dist/src/commands/update.js.map +1 -1
  25. package/dist/src/commands/utils.d.ts +5 -4
  26. package/dist/src/commands/utils.d.ts.map +1 -1
  27. package/dist/src/commands/utils.js +7 -80
  28. package/dist/src/commands/utils.js.map +1 -1
  29. package/dist/src/shared/addFromRegistry.d.ts +16 -0
  30. package/dist/src/shared/addFromRegistry.d.ts.map +1 -0
  31. package/dist/src/shared/addFromRegistry.js +88 -0
  32. package/dist/src/shared/addFromRegistry.js.map +1 -0
  33. package/dist/src/shared/getInstallCommand.d.ts.map +1 -1
  34. package/dist/src/shared/getInstallCommand.js +5 -0
  35. package/dist/src/shared/getInstallCommand.js.map +1 -1
  36. package/dist/src/shared/installDependencies.d.ts +0 -10
  37. package/dist/src/shared/installDependencies.d.ts.map +1 -1
  38. package/dist/src/shared/installDependencies.js +0 -17
  39. package/dist/src/shared/installDependencies.js.map +1 -1
  40. package/dist/src/shared/installFromPlan.d.ts +7 -5
  41. package/dist/src/shared/installFromPlan.d.ts.map +1 -1
  42. package/dist/src/shared/installFromPlan.js +103 -36
  43. package/dist/src/shared/installFromPlan.js.map +1 -1
  44. package/dist/src/shared/loadRegistry.d.ts +12 -3
  45. package/dist/src/shared/loadRegistry.d.ts.map +1 -1
  46. package/dist/src/shared/loadRegistry.js +19 -20
  47. package/dist/src/shared/loadRegistry.js.map +1 -1
  48. package/dist/src/shared/registryClient.d.ts +19 -0
  49. package/dist/src/shared/registryClient.d.ts.map +1 -0
  50. package/dist/src/shared/registryClient.js +128 -0
  51. package/dist/src/shared/registryClient.js.map +1 -0
  52. package/dist/src/shared/resolveEntry.d.ts +10 -7
  53. package/dist/src/shared/resolveEntry.d.ts.map +1 -1
  54. package/dist/src/shared/resolveEntry.js +18 -13
  55. package/dist/src/shared/resolveEntry.js.map +1 -1
  56. package/dist/src/shared/suggestOtherCommand.d.ts +7 -1
  57. package/dist/src/shared/suggestOtherCommand.d.ts.map +1 -1
  58. package/dist/src/shared/suggestOtherCommand.js +29 -23
  59. package/dist/src/shared/suggestOtherCommand.js.map +1 -1
  60. package/dist/src/types/main.d.ts +31 -2
  61. package/dist/src/types/main.d.ts.map +1 -1
  62. package/package.json +6 -11
  63. package/apps/lib/components/ActionButton.tsx +0 -93
  64. package/apps/lib/components/ActionsGroup.tsx +0 -27
  65. package/apps/lib/components/AlertDialog.tsx +0 -204
  66. package/apps/lib/components/Avatar.tsx +0 -46
  67. package/apps/lib/components/Badge.tsx +0 -250
  68. package/apps/lib/components/BadgeField.tsx +0 -403
  69. package/apps/lib/components/Breadcrumb.tsx +0 -280
  70. package/apps/lib/components/Button.tsx +0 -325
  71. package/apps/lib/components/ButtonGroup.tsx +0 -190
  72. package/apps/lib/components/Calendar.tsx +0 -115
  73. package/apps/lib/components/Card.tsx +0 -95
  74. package/apps/lib/components/Checkbox.tsx +0 -42
  75. package/apps/lib/components/ColorPicker.tsx +0 -441
  76. package/apps/lib/components/ConclusionHeader.tsx +0 -148
  77. package/apps/lib/components/ContextMenu.tsx +0 -571
  78. package/apps/lib/components/CountBadge.tsx +0 -52
  79. package/apps/lib/components/DataTable.tsx +0 -213
  80. package/apps/lib/components/DataViews/badge.ts +0 -49
  81. package/apps/lib/components/DataViews/cell.tsx +0 -324
  82. package/apps/lib/components/DataViews/context.ts +0 -144
  83. package/apps/lib/components/DataViews/data-views.tsx +0 -395
  84. package/apps/lib/components/DataViews/filters/children.tsx +0 -98
  85. package/apps/lib/components/DataViews/filters/custom.tsx +0 -34
  86. package/apps/lib/components/DataViews/filters/filters.tsx +0 -157
  87. package/apps/lib/components/DataViews/filters/index.ts +0 -4
  88. package/apps/lib/components/DataViews/filters/labelled.tsx +0 -20
  89. package/apps/lib/components/DataViews/filters/presets.tsx +0 -65
  90. package/apps/lib/components/DataViews/filters/sync.tsx +0 -35
  91. package/apps/lib/components/DataViews/filters/values.ts +0 -173
  92. package/apps/lib/components/DataViews/header.tsx +0 -220
  93. package/apps/lib/components/DataViews/hooks/index.ts +0 -5
  94. package/apps/lib/components/DataViews/hooks/useActiveRow.ts +0 -22
  95. package/apps/lib/components/DataViews/hooks/useControllable.ts +0 -52
  96. package/apps/lib/components/DataViews/index.ts +0 -88
  97. package/apps/lib/components/DataViews/panel/columns.tsx +0 -153
  98. package/apps/lib/components/DataViews/panel/controls.tsx +0 -106
  99. package/apps/lib/components/DataViews/panel/index.ts +0 -3
  100. package/apps/lib/components/DataViews/panel/panel.tsx +0 -164
  101. package/apps/lib/components/DataViews/panel/saved-views.tsx +0 -67
  102. package/apps/lib/components/DataViews/panel/section.tsx +0 -81
  103. package/apps/lib/components/DataViews/panel/sort.tsx +0 -42
  104. package/apps/lib/components/DataViews/panel/tab.tsx +0 -31
  105. package/apps/lib/components/DataViews/slots.ts +0 -72
  106. package/apps/lib/components/DataViews/states.tsx +0 -73
  107. package/apps/lib/components/DataViews/types.ts +0 -510
  108. package/apps/lib/components/DataViews/views/board-view.tsx +0 -381
  109. package/apps/lib/components/DataViews/views/card-rows.tsx +0 -36
  110. package/apps/lib/components/DataViews/views/inbox-view.tsx +0 -260
  111. package/apps/lib/components/DataViews/views/pane-views.tsx +0 -196
  112. package/apps/lib/components/DataViews/views/table-view.tsx +0 -493
  113. package/apps/lib/components/DataViews/views/tree-view.tsx +0 -367
  114. package/apps/lib/components/DatePicker.tsx +0 -232
  115. package/apps/lib/components/Dialog.tsx +0 -116
  116. package/apps/lib/components/Divider.tsx +0 -28
  117. package/apps/lib/components/Drawer.tsx +0 -451
  118. package/apps/lib/components/DropdownMenu.tsx +0 -554
  119. package/apps/lib/components/FieldHint.tsx +0 -69
  120. package/apps/lib/components/Form.tsx +0 -182
  121. package/apps/lib/components/FormBuilder/context.ts +0 -85
  122. package/apps/lib/components/FormBuilder/field-kind.ts +0 -28
  123. package/apps/lib/components/FormBuilder/fields/ChoiceFields.tsx +0 -60
  124. package/apps/lib/components/FormBuilder/fields/ColorField.tsx +0 -59
  125. package/apps/lib/components/FormBuilder/fields/CustomField.tsx +0 -11
  126. package/apps/lib/components/FormBuilder/fields/DateField.tsx +0 -32
  127. package/apps/lib/components/FormBuilder/fields/FieldArray.tsx +0 -74
  128. package/apps/lib/components/FormBuilder/fields/FieldShell.tsx +0 -168
  129. package/apps/lib/components/FormBuilder/fields/FileField.tsx +0 -39
  130. package/apps/lib/components/FormBuilder/fields/OptionListFields.tsx +0 -132
  131. package/apps/lib/components/FormBuilder/fields/OtpField.tsx +0 -31
  132. package/apps/lib/components/FormBuilder/fields/PhoneField.tsx +0 -109
  133. package/apps/lib/components/FormBuilder/fields/RichTextEditorField.tsx +0 -31
  134. package/apps/lib/components/FormBuilder/fields/SelectField.tsx +0 -114
  135. package/apps/lib/components/FormBuilder/fields/SignatureField.tsx +0 -157
  136. package/apps/lib/components/FormBuilder/fields/SliderField.tsx +0 -67
  137. package/apps/lib/components/FormBuilder/fields/SwitchBoxField.tsx +0 -41
  138. package/apps/lib/components/FormBuilder/fields/TableField.tsx +0 -336
  139. package/apps/lib/components/FormBuilder/fields/TextField.tsx +0 -213
  140. package/apps/lib/components/FormBuilder/fields/TreeSelectField.tsx +0 -43
  141. package/apps/lib/components/FormBuilder/fields/countries.ts +0 -303
  142. package/apps/lib/components/FormBuilder/fields/index.ts +0 -25
  143. package/apps/lib/components/FormBuilder/form-builder.tsx +0 -198
  144. package/apps/lib/components/FormBuilder/index.ts +0 -31
  145. package/apps/lib/components/FormBuilder/numberFormat.ts +0 -16
  146. package/apps/lib/components/FormBuilder/submit.tsx +0 -67
  147. package/apps/lib/components/FormBuilder/types.ts +0 -316
  148. package/apps/lib/components/FormRenderer/FormDrawer.tsx +0 -250
  149. package/apps/lib/components/FormRenderer/detail.tsx +0 -256
  150. package/apps/lib/components/FormRenderer/form-renderer.tsx +0 -358
  151. package/apps/lib/components/FormRenderer/header.tsx +0 -88
  152. package/apps/lib/components/FormRenderer/index.ts +0 -17
  153. package/apps/lib/components/FormRenderer/notch-action.tsx +0 -64
  154. package/apps/lib/components/FormRenderer/section.tsx +0 -39
  155. package/apps/lib/components/FormRenderer/stepper.tsx +0 -393
  156. package/apps/lib/components/FormRenderer/types.ts +0 -115
  157. package/apps/lib/components/FormSummary.tsx +0 -282
  158. package/apps/lib/components/HeaderBar.tsx +0 -117
  159. package/apps/lib/components/ImageAttachment.tsx +0 -209
  160. package/apps/lib/components/InnerLabelField.tsx +0 -154
  161. package/apps/lib/components/Input.tsx +0 -224
  162. package/apps/lib/components/InputField.tsx +0 -147
  163. package/apps/lib/components/InputOTP.tsx +0 -84
  164. package/apps/lib/components/Label.tsx +0 -129
  165. package/apps/lib/components/LabelField.tsx +0 -76
  166. package/apps/lib/components/LabeledCheckBox.tsx +0 -51
  167. package/apps/lib/components/LabeledRadio.tsx +0 -51
  168. package/apps/lib/components/LinkButton.tsx +0 -94
  169. package/apps/lib/components/LoginButton.tsx +0 -51
  170. package/apps/lib/components/PasswordLevel.tsx +0 -58
  171. package/apps/lib/components/Popover.tsx +0 -312
  172. package/apps/lib/components/ProfileMenu.tsx +0 -85
  173. package/apps/lib/components/Radio.tsx +0 -59
  174. package/apps/lib/components/RadioCard.tsx +0 -50
  175. package/apps/lib/components/ScrollArea.tsx +0 -54
  176. package/apps/lib/components/SearchField.tsx +0 -62
  177. package/apps/lib/components/SearchableSelect.tsx +0 -318
  178. package/apps/lib/components/SearchableTable.tsx +0 -344
  179. package/apps/lib/components/SearchableTree.tsx +0 -485
  180. package/apps/lib/components/SearchableTreeDialog.tsx +0 -502
  181. package/apps/lib/components/SectionBlock.tsx +0 -168
  182. package/apps/lib/components/Select.tsx +0 -347
  183. package/apps/lib/components/SimpleSelect.tsx +0 -225
  184. package/apps/lib/components/Skeleton.tsx +0 -12
  185. package/apps/lib/components/SlideDatePicker.tsx +0 -255
  186. package/apps/lib/components/SpinLoading.tsx +0 -174
  187. package/apps/lib/components/Stepper.tsx +0 -480
  188. package/apps/lib/components/Switch.tsx +0 -82
  189. package/apps/lib/components/TabFormItem.tsx +0 -153
  190. package/apps/lib/components/TabSwitch.tsx +0 -172
  191. package/apps/lib/components/Table.tsx +0 -597
  192. package/apps/lib/components/TextEditor/ChartBlockTool.ts +0 -676
  193. package/apps/lib/components/TextEditor/RichTextField.tsx +0 -46
  194. package/apps/lib/components/TextEditor/TableDnDWrapper.ts +0 -462
  195. package/apps/lib/components/TextEditor/TextEditor.tsx +0 -1164
  196. package/apps/lib/components/TextEditor/TextEditorToolbar.tsx +0 -429
  197. package/apps/lib/components/TextEditor/editor-tools/AlignmentTune.ts +0 -70
  198. package/apps/lib/components/TextEditor/editor-tools/ColorInlineTool.ts +0 -50
  199. package/apps/lib/components/TextEditor/editor-tools/StrikethroughInlineTool.ts +0 -48
  200. package/apps/lib/components/TextEditor/editor-tools/inlineFormat.ts +0 -98
  201. package/apps/lib/components/TextEditor/editorjs.d.ts +0 -60
  202. package/apps/lib/components/TextEditor/index.ts +0 -7
  203. package/apps/lib/components/TextEditor/markdownParser.ts +0 -346
  204. package/apps/lib/components/Textarea.tsx +0 -117
  205. package/apps/lib/components/Timeline.tsx +0 -263
  206. package/apps/lib/components/Toast.tsx +0 -87
  207. package/apps/lib/components/Toggle.tsx +0 -125
  208. package/apps/lib/components/ToggleButton.tsx +0 -140
  209. package/apps/lib/components/Tooltip.tsx +0 -116
  210. package/apps/lib/components/TransparentLabel.tsx +0 -71
  211. package/apps/lib/components/TreeDropDown.tsx +0 -115
  212. package/apps/lib/components/TreeFolder/TreeFolder.tsx +0 -380
  213. package/apps/lib/components/TreeFolder/TreeFolderBreadcrumb.tsx +0 -75
  214. package/apps/lib/components/TreeFolder/TreeFolderRow.tsx +0 -354
  215. package/apps/lib/components/TreeFolder/TreeFolderStyles.tsx +0 -60
  216. package/apps/lib/components/TreeFolder/icons.tsx +0 -60
  217. package/apps/lib/components/TreeFolder/index.ts +0 -24
  218. package/apps/lib/components/TreeFolder/treeFolderUtils.ts +0 -109
  219. package/apps/lib/components/TreeFolder/types.ts +0 -77
  220. package/apps/lib/components/TreeFolder/useTreeFolderDnD.ts +0 -118
  221. package/apps/lib/hooks/useActiveTreeItem.ts +0 -61
  222. package/apps/lib/hooks/useClickOutside.ts +0 -27
  223. package/apps/lib/hooks/useDragDrop.tsx +0 -365
  224. package/apps/lib/hooks/useHtmlDir.ts +0 -31
  225. package/apps/lib/hooks/useInfiniteScroll.ts +0 -108
  226. package/apps/lib/hooks/useIsMobile.ts +0 -21
  227. package/apps/lib/hooks/useResize.ts +0 -67
  228. package/apps/lib/hooks/useTagSelection.ts +0 -300
  229. package/apps/lib/layouts/CNLayout.tsx +0 -372
  230. package/apps/lib/layouts/DataViewCard.tsx +0 -62
  231. package/apps/lib/layouts/FieldSection.tsx +0 -91
  232. package/apps/lib/layouts/TreeSubLayout.tsx +0 -173
  233. package/apps/lib/providers/ThemeProvider.tsx +0 -84
  234. package/apps/lib/registry.json +0 -1217
  235. package/apps/lib/tsconfig.json +0 -9
  236. package/apps/lib/tsconfig.tsbuildinfo +0 -1
  237. package/apps/lib/utils/cn.ts +0 -6
  238. package/apps/lib/utils/color.ts +0 -175
  239. package/apps/lib/utils/dataViews/path.ts +0 -67
  240. package/apps/lib/utils/dataViews/query.ts +0 -73
  241. package/apps/lib/utils/dataViews/types.ts +0 -187
  242. package/apps/lib/utils/dateFormat.ts +0 -108
  243. package/apps/lib/utils/resize.ts +0 -31
  244. package/apps/lib/utils/scroller.ts +0 -26
  245. package/apps/lib/utils/types.ts +0 -16
  246. package/docs/BLOCKS.md +0 -129
  247. package/docs/CHANGELOG-1.1.16.md +0 -108
  248. package/docs/Cover.png +0 -0
  249. package/docs/README.md +0 -215
  250. package/docs/components/action-button.md +0 -638
  251. package/docs/components/actions-group.md +0 -708
  252. package/docs/components/alert-dialog.md +0 -920
  253. package/docs/components/avatar.md +0 -709
  254. package/docs/components/badge-field.md +0 -738
  255. package/docs/components/badge.md +0 -301
  256. package/docs/components/breadcrumb.md +0 -930
  257. package/docs/components/button-group.md +0 -650
  258. package/docs/components/button.md +0 -639
  259. package/docs/components/calendar.md +0 -555
  260. package/docs/components/card.md +0 -622
  261. package/docs/components/chart-block-tool.md +0 -129
  262. package/docs/components/checkbox.md +0 -699
  263. package/docs/components/cn-layout.md +0 -854
  264. package/docs/components/color-picker.md +0 -101
  265. package/docs/components/conclusion-header.md +0 -80
  266. package/docs/components/context-menu.md +0 -483
  267. package/docs/components/count-badge.md +0 -560
  268. package/docs/components/data-table.md +0 -854
  269. package/docs/components/data-views/backend-response.md +0 -324
  270. package/docs/components/data-views/examples/a11y-rtl.md +0 -250
  271. package/docs/components/data-views/examples/api-orders-route.md +0 -130
  272. package/docs/components/data-views/examples/fields.md +0 -362
  273. package/docs/components/data-views/examples/filters.md +0 -307
  274. package/docs/components/data-views/examples/inbox-routing.md +0 -218
  275. package/docs/components/data-views/examples/index.md +0 -29
  276. package/docs/components/data-views/examples/overview.md +0 -244
  277. package/docs/components/data-views/examples/panel.md +0 -212
  278. package/docs/components/data-views/examples/scale.md +0 -231
  279. package/docs/components/data-views/examples/server-side.md +0 -210
  280. package/docs/components/data-views/examples/state.md +0 -250
  281. package/docs/components/data-views/examples/tree-custom.md +0 -388
  282. package/docs/components/data-views/examples/view-registry.md +0 -313
  283. package/docs/components/data-views/examples/views.md +0 -534
  284. package/docs/components/data-views/guide.md +0 -405
  285. package/docs/components/data-views/index.md +0 -1521
  286. package/docs/components/data-views/migration.md +0 -81
  287. package/docs/components/date-picker.md +0 -857
  288. package/docs/components/dialog.md +0 -929
  289. package/docs/components/divider.md +0 -766
  290. package/docs/components/drawer.md +0 -654
  291. package/docs/components/dropdown-menu.md +0 -668
  292. package/docs/components/field-hint.md +0 -898
  293. package/docs/components/field-section.md +0 -781
  294. package/docs/components/form-builder.md +0 -284
  295. package/docs/components/form-renderer.md +0 -396
  296. package/docs/components/form-summary.md +0 -138
  297. package/docs/components/form.md +0 -785
  298. package/docs/components/header-bar.md +0 -188
  299. package/docs/components/image-attachment.md +0 -906
  300. package/docs/components/inner-label-field.md +0 -819
  301. package/docs/components/input-field.md +0 -623
  302. package/docs/components/input-otp.md +0 -756
  303. package/docs/components/input.md +0 -634
  304. package/docs/components/label-field.md +0 -770
  305. package/docs/components/label.md +0 -761
  306. package/docs/components/labeled-check-box.md +0 -642
  307. package/docs/components/labeled-radio.md +0 -796
  308. package/docs/components/link-button.md +0 -685
  309. package/docs/components/login-button.md +0 -872
  310. package/docs/components/password-level.md +0 -803
  311. package/docs/components/popover.md +0 -649
  312. package/docs/components/profile-menu.md +0 -656
  313. package/docs/components/radio-card.md +0 -801
  314. package/docs/components/radio.md +0 -735
  315. package/docs/components/scroll-area.md +0 -691
  316. package/docs/components/search-field.md +0 -702
  317. package/docs/components/searchable-select.md +0 -368
  318. package/docs/components/searchable-table.md +0 -438
  319. package/docs/components/searchable-tree-dialog.md +0 -190
  320. package/docs/components/searchable-tree.md +0 -200
  321. package/docs/components/section-block.md +0 -483
  322. package/docs/components/select.md +0 -709
  323. package/docs/components/simple-select.md +0 -741
  324. package/docs/components/skeleton.md +0 -706
  325. package/docs/components/slide-date-picker.md +0 -837
  326. package/docs/components/spin-loading.md +0 -696
  327. package/docs/components/stepper.md +0 -316
  328. package/docs/components/switch.md +0 -770
  329. package/docs/components/tab-form-item.md +0 -773
  330. package/docs/components/tab-switch.md +0 -170
  331. package/docs/components/table-dnd-wrapper.md +0 -107
  332. package/docs/components/table.md +0 -1088
  333. package/docs/components/text-editor.md +0 -735
  334. package/docs/components/textarea.md +0 -681
  335. package/docs/components/timeline.md +0 -254
  336. package/docs/components/toast.md +0 -773
  337. package/docs/components/toggle-button.md +0 -643
  338. package/docs/components/toggle.md +0 -882
  339. package/docs/components/tooltip.md +0 -513
  340. package/docs/components/transparent-label.md +0 -721
  341. package/docs/components/tree-drop-down.md +0 -740
  342. package/docs/components/tree-folder.md +0 -110
  343. package/docs/components/tree-sub-layout.md +0 -707
  344. package/docs/explanation/architecture.md +0 -54
  345. package/docs/explanation/design-system.md +0 -52
  346. package/docs/how-to/form-and-list-recipes.md +0 -386
  347. package/docs/how-to/forms-with-form-builder.md +0 -472
  348. package/docs/how-to/guides.md +0 -1027
  349. package/docs/migration/changelog.md +0 -60
  350. package/docs/migration/form-builder-2.5.2.md +0 -113
  351. package/docs/reference/cli.md +0 -112
  352. package/docs/reference/components.md +0 -572
  353. package/docs/reference/hooks.md +0 -1523
  354. package/docs/reference/providers.md +0 -866
  355. package/docs/reference/tailwind-plugins.md +0 -942
  356. package/docs/reference/theme.md +0 -85
  357. package/docs/reference/types.md +0 -1016
  358. package/docs/reference/utilities.md +0 -726
  359. package/docs/tutorials/building-first-form.md +0 -846
  360. package/docs/tutorials/component-composition.md +0 -882
  361. package/docs/tutorials/getting-started.md +0 -302
  362. package/docs/tutorials/theming-basics.md +0 -785
@@ -1,60 +0,0 @@
1
- declare module "@editorjs/checklist" {
2
- import { BlockToolConstructable } from "@editorjs/editorjs";
3
- const Checklist: BlockToolConstructable;
4
- export default Checklist;
5
- }
6
-
7
- declare module "@editorjs/embed" {
8
- import { BlockToolConstructable } from "@editorjs/editorjs";
9
- const Embed: BlockToolConstructable;
10
- export default Embed;
11
- }
12
-
13
- declare module "@editorjs/link" {
14
- import { BlockToolConstructable } from "@editorjs/editorjs";
15
- const LinkTool: BlockToolConstructable;
16
- export default LinkTool;
17
- }
18
-
19
- declare module "@editorjs/simple-image" {
20
- import { BlockToolConstructable } from "@editorjs/editorjs";
21
- const SimpleImage: BlockToolConstructable;
22
- export default SimpleImage;
23
- }
24
-
25
- declare module "@editorjs/raw" {
26
- import { BlockToolConstructable } from "@editorjs/editorjs";
27
- const RawTool: BlockToolConstructable;
28
- export default RawTool;
29
- }
30
-
31
- declare module "@editorjs/marker" {
32
- import { InlineToolConstructable } from "@editorjs/editorjs";
33
- const Marker: InlineToolConstructable;
34
- export default Marker;
35
- }
36
-
37
- declare module "@editorjs/text-variant-tune" {
38
- import { BlockTuneConstructable } from "@editorjs/editorjs";
39
- const TextVariantTune: BlockTuneConstructable;
40
- export default TextVariantTune;
41
- }
42
-
43
- declare module "editorjs-undo" {
44
- import EditorJS from "@editorjs/editorjs";
45
- interface UndoConfig {
46
- editor: EditorJS;
47
- config?: { debounceTimer?: number; shortcuts?: { undo?: string; redo?: string } };
48
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
- onUpdate?: () => void;
50
- }
51
- export default class Undo {
52
- constructor(options: UndoConfig);
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- initialize(data: any): void;
55
- undo(): void;
56
- redo(): void;
57
- clear(): void;
58
- setReadOnly(readOnly: boolean): void;
59
- }
60
- }
@@ -1,7 +0,0 @@
1
- export { TextEditor } from "./TextEditor";
2
- export type { TextEditorRef, TextEditorProps, OutputData } from "./TextEditor";
3
- export { RichTextField } from "./RichTextField";
4
- export type { RichTextFieldProps } from "./RichTextField";
5
- export { default as ChartBlockTool, type ChartBlockData } from "./ChartBlockTool";
6
- export { default as createTableDnDClass } from "./TableDnDWrapper";
7
- export { TextEditorToolbar } from "./TextEditorToolbar";
@@ -1,346 +0,0 @@
1
- // ─── Markdown → Editor.js Block Parser ───────────────────────────────────────
2
- // Parses pasted markdown text into Editor.js-compatible block data.
3
-
4
- export interface EditorBlock {
5
- type: string;
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
- data: Record<string, any>;
8
- }
9
-
10
- // ─── Markdown Detection ──────────────────────────────────────────────────────
11
-
12
- const MD_PATTERNS = {
13
- header: /^#{1,6}\s+\S/m,
14
- unorderedList: /^[\t ]*[-*+]\s+\S/m,
15
- orderedList: /^[\t ]*\d+\.\s+\S/m,
16
- checklist: /^[\t ]*-\s+\[[ xX]\]\s/m,
17
- codeBlock: /^```/m,
18
- blockquote: /^>\s/m,
19
- horizontalRule: /^(---+|___+|\*\*\*+)\s*$/m,
20
- table: /^\|(.+\|)+\s*$/m,
21
- image: /^!\[.*\]\(.+\)/m,
22
- link: /\[.+\]\(.+\)/,
23
- bold: /\*\*[^*]+\*\*/,
24
- italic: /(?<!\*)\*[^*]+\*(?!\*)/,
25
- inlineCode: /`[^`]+`/,
26
- strikethrough: /~~[^~]+~~/,
27
- };
28
-
29
- /**
30
- * Heuristic: determines whether the given text is likely markdown.
31
- * Returns true if the text matches enough markdown-specific patterns.
32
- */
33
- export function isMarkdown(text: string): boolean {
34
- if (!text || text.trim().length === 0) return false;
35
-
36
- const lines = text.split("\n");
37
- // Single short line without strong indicators → probably not markdown
38
- if (lines.length === 1 && text.length < 80) {
39
- // Only if it has a very strong indicator on a single line
40
- return MD_PATTERNS.header.test(text) || MD_PATTERNS.image.test(text);
41
- }
42
-
43
- let score = 0;
44
- const strongIndicators = [
45
- "header",
46
- "codeBlock",
47
- "table",
48
- "horizontalRule",
49
- "checklist",
50
- "image",
51
- ] as const;
52
- const weakIndicators = [
53
- "unorderedList",
54
- "orderedList",
55
- "blockquote",
56
- "bold",
57
- "italic",
58
- "inlineCode",
59
- "strikethrough",
60
- "link",
61
- ] as const;
62
-
63
- for (const key of strongIndicators) {
64
- if (MD_PATTERNS[key].test(text)) score += 2;
65
- }
66
- for (const key of weakIndicators) {
67
- if (MD_PATTERNS[key].test(text)) score += 1;
68
- }
69
-
70
- // Need at least score 2 (one strong indicator or two weak ones)
71
- return score >= 2;
72
- }
73
-
74
- // ─── Inline Markdown → HTML ──────────────────────────────────────────────────
75
-
76
- /**
77
- * Converts inline markdown syntax to HTML tags understood by Editor.js.
78
- * Order matters — bold before italic to handle ** vs *.
79
- */
80
- export function convertInlineMarkdown(text: string): string {
81
- let result = text;
82
-
83
- // Images inline (rare in inline context but handle gracefully)
84
- result = result.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '<img src="$2" alt="$1">');
85
-
86
- // Links: [text](url)
87
- result = result.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>');
88
-
89
- // Bold: **text** or __text__
90
- result = result.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>");
91
- result = result.replace(/__(.+?)__/g, "<b>$1</b>");
92
-
93
- // Italic: *text* or _text_ (not inside bold)
94
- result = result.replace(/(?<![*_])\*([^*]+?)\*(?![*_])/g, "<i>$1</i>");
95
- result = result.replace(/(?<![*_])_([^_]+?)_(?![*_])/g, "<i>$1</i>");
96
-
97
- // Strikethrough: ~~text~~
98
- result = result.replace(/~~(.+?)~~/g, "<s>$1</s>");
99
-
100
- // Inline code: `text`
101
- result = result.replace(/`([^`]+)`/g, "<code>$1</code>");
102
-
103
- // Highlight / mark: ==text==
104
- result = result.replace(/==(.+?)==/g, "<mark>$1</mark>");
105
-
106
- return result;
107
- }
108
-
109
- // ─── Block Parser ────────────────────────────────────────────────────────────
110
-
111
- type ParserState = "normal" | "code" | "table";
112
-
113
- /**
114
- * Parses a markdown string into an array of Editor.js block objects.
115
- */
116
- export function parseMarkdownToBlocks(md: string): EditorBlock[] {
117
- const lines = md.split("\n");
118
- const blocks: EditorBlock[] = [];
119
-
120
- let state: ParserState = "normal";
121
- let codeBuffer: string[] = [];
122
- let codeLang = "";
123
- let tableRows: string[][] = [];
124
- let listBuffer: { text: string; checked?: boolean }[] = [];
125
- let listType: "ordered" | "unordered" | "checklist" | null = null;
126
- let quoteBuffer: string[] = [];
127
-
128
- function flushList() {
129
- if (listBuffer.length === 0 || !listType) return;
130
-
131
- if (listType === "checklist") {
132
- blocks.push({
133
- type: "checklist",
134
- data: {
135
- items: listBuffer.map((item) => ({
136
- text: convertInlineMarkdown(item.text),
137
- checked: item.checked ?? false,
138
- })),
139
- },
140
- });
141
- } else {
142
- blocks.push({
143
- type: "list",
144
- data: {
145
- style: listType,
146
- items: listBuffer.map((item) => convertInlineMarkdown(item.text)),
147
- },
148
- });
149
- }
150
- listBuffer = [];
151
- listType = null;
152
- }
153
-
154
- function flushQuote() {
155
- if (quoteBuffer.length === 0) return;
156
- blocks.push({
157
- type: "quote",
158
- data: {
159
- text: convertInlineMarkdown(quoteBuffer.join("<br>")),
160
- caption: "",
161
- alignment: "left",
162
- },
163
- });
164
- quoteBuffer = [];
165
- }
166
-
167
- function flushTable() {
168
- if (tableRows.length === 0) return;
169
- blocks.push({
170
- type: "table",
171
- data: {
172
- withHeadings: tableRows.length > 1,
173
- content: tableRows.map((row) => row.map((cell) => convertInlineMarkdown(cell.trim()))),
174
- },
175
- });
176
- tableRows = [];
177
- }
178
-
179
- function flushAll() {
180
- flushList();
181
- flushQuote();
182
- flushTable();
183
- }
184
-
185
- for (let i = 0; i < lines.length; i++) {
186
- const line = lines[i];
187
- const trimmed = line.trimEnd();
188
-
189
- // ── Code block state ──
190
- if (state === "code") {
191
- if (trimmed.startsWith("```")) {
192
- blocks.push({
193
- type: "code",
194
- data: { code: codeBuffer.join("\n"), ...(codeLang && { language: codeLang }) },
195
- });
196
- codeBuffer = [];
197
- codeLang = "";
198
- state = "normal";
199
- } else {
200
- codeBuffer.push(line);
201
- }
202
- continue;
203
- }
204
-
205
- // ── Table state ──
206
- if (state === "table") {
207
- const tableMatch = trimmed.match(/^\|(.+)\|$/);
208
- if (tableMatch) {
209
- const cells = tableMatch[1].split("|").map((c) => c.trim());
210
- // Skip separator rows (|---|---|)
211
- if (cells.every((c) => /^[-:]+$/.test(c))) continue;
212
- tableRows.push(cells);
213
- continue;
214
- } else {
215
- flushTable();
216
- state = "normal";
217
- // Fall through to process this line normally
218
- }
219
- }
220
-
221
- // ── Normal state ──
222
-
223
- // Code block opening
224
- if (trimmed.startsWith("```")) {
225
- flushAll();
226
- codeLang = trimmed.slice(3).trim();
227
- state = "code";
228
- continue;
229
- }
230
-
231
- // Empty line — flush accumulators
232
- if (trimmed === "") {
233
- flushAll();
234
- continue;
235
- }
236
-
237
- // Horizontal rule
238
- if (/^(---+|___+|\*\*\*+)\s*$/.test(trimmed)) {
239
- flushAll();
240
- blocks.push({ type: "delimiter", data: {} });
241
- continue;
242
- }
243
-
244
- // Header
245
- const headerMatch = trimmed.match(/^(#{1,6})\s+(.+)$/);
246
- if (headerMatch) {
247
- flushAll();
248
- blocks.push({
249
- type: "header",
250
- data: {
251
- text: convertInlineMarkdown(headerMatch[2]),
252
- level: headerMatch[1].length,
253
- },
254
- });
255
- continue;
256
- }
257
-
258
- // Image (standalone line)
259
- const imageMatch = trimmed.match(/^!\[([^\]]*)\]\(([^)]+)\)$/);
260
- if (imageMatch) {
261
- flushAll();
262
- blocks.push({
263
- type: "image",
264
- data: {
265
- url: imageMatch[2],
266
- caption: imageMatch[1],
267
- withBorder: false,
268
- withBackground: false,
269
- stretched: false,
270
- },
271
- });
272
- continue;
273
- }
274
-
275
- // Checklist item: - [ ] or - [x]
276
- const checklistMatch = trimmed.match(/^[-*+]\s+\[([ xX])\]\s+(.+)$/);
277
- if (checklistMatch) {
278
- if (listType && listType !== "checklist") flushList();
279
- listType = "checklist";
280
- listBuffer.push({
281
- text: checklistMatch[2],
282
- checked: checklistMatch[1].toLowerCase() === "x",
283
- });
284
- continue;
285
- }
286
-
287
- // Unordered list item: - item, * item, + item
288
- const ulMatch = trimmed.match(/^[-*+]\s+(.+)$/);
289
- if (ulMatch) {
290
- if (listType && listType !== "unordered") flushList();
291
- if (quoteBuffer.length) flushQuote();
292
- listType = "unordered";
293
- listBuffer.push({ text: ulMatch[1] });
294
- continue;
295
- }
296
-
297
- // Ordered list item: 1. item
298
- const olMatch = trimmed.match(/^\d+\.\s+(.+)$/);
299
- if (olMatch) {
300
- if (listType && listType !== "ordered") flushList();
301
- if (quoteBuffer.length) flushQuote();
302
- listType = "ordered";
303
- listBuffer.push({ text: olMatch[1] });
304
- continue;
305
- }
306
-
307
- // Blockquote: > text
308
- const quoteMatch = trimmed.match(/^>\s?(.*)$/);
309
- if (quoteMatch) {
310
- if (listBuffer.length) flushList();
311
- quoteBuffer.push(quoteMatch[1]);
312
- continue;
313
- }
314
-
315
- // Table start: | col1 | col2 |
316
- const tableStartMatch = trimmed.match(/^\|(.+)\|$/);
317
- if (tableStartMatch) {
318
- flushAll();
319
- const cells = tableStartMatch[1].split("|").map((c) => c.trim());
320
- if (!cells.every((c) => /^[-:]+$/.test(c))) {
321
- tableRows.push(cells);
322
- }
323
- state = "table";
324
- continue;
325
- }
326
-
327
- // Warning block: > ⚠️ title \n > message (special blockquote variant)
328
- // Already handled by blockquote — this could be extended later
329
-
330
- // Regular paragraph
331
- flushAll();
332
- blocks.push({
333
- type: "paragraph",
334
- data: { text: convertInlineMarkdown(trimmed) },
335
- });
336
- }
337
-
338
- // Flush remaining accumulators
339
- if (state === "code" && codeBuffer.length > 0) {
340
- // Unterminated code block — still emit it
341
- blocks.push({ type: "code", data: { code: codeBuffer.join("\n") } });
342
- }
343
- flushAll();
344
-
345
- return blocks;
346
- }
@@ -1,117 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "../utils/cn";
3
- import { Label } from "./Label";
4
- import { cva, VariantProps } from "class-variance-authority";
5
-
6
- // Define the styles for the textarea using cva
7
- const textareaStyles = cva(
8
- [
9
- "border",
10
- // `radius/xl` (12px). Figma's TextArea-Field has two sizes — S is `radius/lg` (8px) and M is
11
- // `radius/xl` — and this component has no size variant: it renders its `Label` wrapper at
12
- // `size="M"` below, so M is the size it actually is. Supporting S properly needs a real `size`
13
- // prop, which is an API change rather than a radius one.
14
- "rounded-radius-xl",
15
- "px-[8px]",
16
- "py-[12px]",
17
- "outline-none",
18
- "typography-body-large-regular",
19
- // A floor for the empty field — without one, `field-sizing: content` collapses it to a single
20
- // 50px line. No `!` — twMerge does not dedupe an important class against a plain one, so `!`
21
- // here would make the height impossible to override from a caller's `className`.
22
- "min-h-[200px]",
23
- "transition-[border,background-color,color,caret-color,box-shadow]",
24
- "ease-in-out",
25
- "duration-150",
26
- "text-content-presentation-action-light-primary",
27
- "caret-border-presentation-state-focus",
28
- "border-border-presentation-action-primary",
29
- "bg-background-presentation-form-field-primary",
30
- "hover:border-border-presentation-action-hover",
31
- "hover:bg-background-presentation-form-field-hover",
32
- "focus:border-border-presentation-state-focus",
33
- "hover:shadow-[0px_1px_6px_0px_rgba(0,0,0,0.30)]",
34
- "disabled:border-border-presentation-action-disabled",
35
- "disabled:bg-background-presentation-action-disabled",
36
- "disabled:text-border-presentation-action-disabled",
37
- "disabled:cursor-not-allowed",
38
- "disabled:placeholder-border-presentation-action-disabled",
39
- "w-full min-w-[100px] max-w-[100%]",
40
- ],
41
- {
42
- variants: {
43
- state: {
44
- negative: [
45
- "border-border-presentation-state-negative",
46
- "caret-border-presentation-state-negative",
47
- "hover:border-border-presentation-state-negative",
48
- "focus:border-border-presentation-state-negative",
49
- ],
50
- },
51
- },
52
- defaultVariants: {},
53
- },
54
- );
55
-
56
- // Define the prop types for the Textarea component
57
- interface TextareaProps
58
- extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaStyles> {
59
- label?: string; // Optional label text
60
- requiredLabel?: string; // Text for required field indicator
61
- secondaryLabel?: string; // Additional label text
62
- direction?: "row" | "column";
63
- theme?: "dark" | "light" | "default";
64
- /**
65
- * Grow the field to fit its content as the user types, instead of scrolling inside a fixed box.
66
- * On by default, via CSS `field-sizing: content`. Set a `max-h-*` on the field to cap the growth —
67
- * past the cap it scrolls. Note `rows` has no effect while this is on: the browser sizes the field
68
- * from its content, so an empty field starts at one line. Pass `autoResize={false}` for the old
69
- * fixed-height box with a drag handle.
70
- */
71
- autoResize?: boolean;
72
- }
73
-
74
- // Textarea component definition
75
- const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
76
- (
77
- {
78
- className,
79
- state, // Default state for textarea
80
- label,
81
- requiredLabel,
82
- secondaryLabel,
83
- direction = "row",
84
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
85
- theme, // excluded from ...props spread
86
- autoResize = true,
87
- ...props
88
- },
89
- ref,
90
- ) => {
91
- return (
92
- <Label
93
- label={label}
94
- requiredLabel={requiredLabel}
95
- secondaryLabel={secondaryLabel}
96
- labelDirections={direction === "row" ? "vertical" : "horizontal"}
97
- childrenDirections={direction === "row" ? "horizontal" : "vertical"}
98
- size={"M"}
99
- className={cn(className)}
100
- >
101
- <textarea
102
- // Auto-grow is pure CSS. Written as an arbitrary *property* rather than as
103
- // `field-sizing-content`: that utility only exists in Tailwind v4 and this project is on
104
- // v3, where it compiled to no rule at all and left the computed `field-sizing` at `fixed`.
105
- // The drag handle goes away with it — the height is content-driven, and a manual drag
106
- // would pin it and silently stop the growing.
107
- className={cn(textareaStyles({ state }), autoResize && "[field-sizing:content] resize-none")}
108
- ref={ref}
109
- {...props}
110
- />
111
- </Label>
112
- );
113
- },
114
- );
115
- Textarea.displayName = "Textarea";
116
-
117
- export { Textarea };