torch-glare 2.5.5 → 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 (359) 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 -338
  69. package/apps/lib/components/Breadcrumb.tsx +0 -280
  70. package/apps/lib/components/Button.tsx +0 -317
  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 -383
  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 -84
  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 -63
  106. package/apps/lib/components/DataViews/states.tsx +0 -38
  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 -420
  118. package/apps/lib/components/DropdownMenu.tsx +0 -540
  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 -73
  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 -163
  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 -91
  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 -47
  147. package/apps/lib/components/FormBuilder/types.ts +0 -311
  148. package/apps/lib/components/FormRenderer/FormDrawer.tsx +0 -128
  149. package/apps/lib/components/FormRenderer/detail.tsx +0 -207
  150. package/apps/lib/components/FormRenderer/form-renderer.tsx +0 -297
  151. package/apps/lib/components/FormRenderer/header.tsx +0 -88
  152. package/apps/lib/components/FormRenderer/index.ts +0 -15
  153. package/apps/lib/components/FormRenderer/section.tsx +0 -39
  154. package/apps/lib/components/FormRenderer/stepper.tsx +0 -339
  155. package/apps/lib/components/FormRenderer/types.ts +0 -78
  156. package/apps/lib/components/FormSummary.tsx +0 -282
  157. package/apps/lib/components/HeaderBar.tsx +0 -117
  158. package/apps/lib/components/ImageAttachment.tsx +0 -209
  159. package/apps/lib/components/InnerLabelField.tsx +0 -154
  160. package/apps/lib/components/Input.tsx +0 -224
  161. package/apps/lib/components/InputField.tsx +0 -147
  162. package/apps/lib/components/InputOTP.tsx +0 -84
  163. package/apps/lib/components/Label.tsx +0 -129
  164. package/apps/lib/components/LabelField.tsx +0 -76
  165. package/apps/lib/components/LabeledCheckBox.tsx +0 -51
  166. package/apps/lib/components/LabeledRadio.tsx +0 -51
  167. package/apps/lib/components/LinkButton.tsx +0 -94
  168. package/apps/lib/components/LoginButton.tsx +0 -51
  169. package/apps/lib/components/PasswordLevel.tsx +0 -58
  170. package/apps/lib/components/Popover.tsx +0 -312
  171. package/apps/lib/components/ProfileMenu.tsx +0 -85
  172. package/apps/lib/components/Radio.tsx +0 -59
  173. package/apps/lib/components/RadioCard.tsx +0 -50
  174. package/apps/lib/components/ScrollArea.tsx +0 -54
  175. package/apps/lib/components/SearchField.tsx +0 -62
  176. package/apps/lib/components/SearchableSelect.tsx +0 -318
  177. package/apps/lib/components/SearchableTable.tsx +0 -344
  178. package/apps/lib/components/SearchableTree.tsx +0 -485
  179. package/apps/lib/components/SearchableTreeDialog.tsx +0 -502
  180. package/apps/lib/components/SectionBlock.tsx +0 -147
  181. package/apps/lib/components/Select.tsx +0 -347
  182. package/apps/lib/components/SimpleSelect.tsx +0 -225
  183. package/apps/lib/components/Skeleton.tsx +0 -12
  184. package/apps/lib/components/SlideDatePicker.tsx +0 -253
  185. package/apps/lib/components/SpinLoading.tsx +0 -174
  186. package/apps/lib/components/Stepper.tsx +0 -480
  187. package/apps/lib/components/Switch.tsx +0 -82
  188. package/apps/lib/components/TabFormItem.tsx +0 -153
  189. package/apps/lib/components/TabSwitch.tsx +0 -172
  190. package/apps/lib/components/Table.tsx +0 -610
  191. package/apps/lib/components/TextEditor/ChartBlockTool.ts +0 -676
  192. package/apps/lib/components/TextEditor/RichTextField.tsx +0 -46
  193. package/apps/lib/components/TextEditor/TableDnDWrapper.ts +0 -462
  194. package/apps/lib/components/TextEditor/TextEditor.tsx +0 -1164
  195. package/apps/lib/components/TextEditor/TextEditorToolbar.tsx +0 -429
  196. package/apps/lib/components/TextEditor/editor-tools/AlignmentTune.ts +0 -70
  197. package/apps/lib/components/TextEditor/editor-tools/ColorInlineTool.ts +0 -50
  198. package/apps/lib/components/TextEditor/editor-tools/StrikethroughInlineTool.ts +0 -48
  199. package/apps/lib/components/TextEditor/editor-tools/inlineFormat.ts +0 -98
  200. package/apps/lib/components/TextEditor/editorjs.d.ts +0 -60
  201. package/apps/lib/components/TextEditor/index.ts +0 -7
  202. package/apps/lib/components/TextEditor/markdownParser.ts +0 -346
  203. package/apps/lib/components/Textarea.tsx +0 -117
  204. package/apps/lib/components/Timeline.tsx +0 -263
  205. package/apps/lib/components/Toast.tsx +0 -87
  206. package/apps/lib/components/Toggle.tsx +0 -125
  207. package/apps/lib/components/ToggleButton.tsx +0 -140
  208. package/apps/lib/components/Tooltip.tsx +0 -116
  209. package/apps/lib/components/TransparentLabel.tsx +0 -71
  210. package/apps/lib/components/TreeDropDown.tsx +0 -115
  211. package/apps/lib/components/TreeFolder/TreeFolder.tsx +0 -380
  212. package/apps/lib/components/TreeFolder/TreeFolderBreadcrumb.tsx +0 -75
  213. package/apps/lib/components/TreeFolder/TreeFolderRow.tsx +0 -354
  214. package/apps/lib/components/TreeFolder/TreeFolderStyles.tsx +0 -60
  215. package/apps/lib/components/TreeFolder/icons.tsx +0 -60
  216. package/apps/lib/components/TreeFolder/index.ts +0 -24
  217. package/apps/lib/components/TreeFolder/treeFolderUtils.ts +0 -109
  218. package/apps/lib/components/TreeFolder/types.ts +0 -77
  219. package/apps/lib/components/TreeFolder/useTreeFolderDnD.ts +0 -118
  220. package/apps/lib/hooks/useActiveTreeItem.ts +0 -58
  221. package/apps/lib/hooks/useClickOutside.ts +0 -27
  222. package/apps/lib/hooks/useDragDrop.tsx +0 -365
  223. package/apps/lib/hooks/useInfiniteScroll.ts +0 -108
  224. package/apps/lib/hooks/useIsMobile.ts +0 -21
  225. package/apps/lib/hooks/useResize.ts +0 -67
  226. package/apps/lib/hooks/useTagSelection.ts +0 -214
  227. package/apps/lib/layouts/CNLayout.tsx +0 -372
  228. package/apps/lib/layouts/DataViewCard.tsx +0 -62
  229. package/apps/lib/layouts/FieldSection.tsx +0 -91
  230. package/apps/lib/layouts/TreeSubLayout.tsx +0 -173
  231. package/apps/lib/providers/ThemeProvider.tsx +0 -84
  232. package/apps/lib/registry.json +0 -1201
  233. package/apps/lib/tsconfig.json +0 -9
  234. package/apps/lib/tsconfig.tsbuildinfo +0 -1
  235. package/apps/lib/utils/cn.ts +0 -6
  236. package/apps/lib/utils/color.ts +0 -175
  237. package/apps/lib/utils/dataViews/path.ts +0 -67
  238. package/apps/lib/utils/dataViews/query.ts +0 -73
  239. package/apps/lib/utils/dataViews/types.ts +0 -187
  240. package/apps/lib/utils/dateFormat.ts +0 -108
  241. package/apps/lib/utils/resize.ts +0 -31
  242. package/apps/lib/utils/types.ts +0 -16
  243. package/docs/BLOCKS.md +0 -129
  244. package/docs/CHANGELOG-1.1.16.md +0 -108
  245. package/docs/Cover.png +0 -0
  246. package/docs/README.md +0 -215
  247. package/docs/components/action-button.md +0 -638
  248. package/docs/components/actions-group.md +0 -708
  249. package/docs/components/alert-dialog.md +0 -920
  250. package/docs/components/avatar.md +0 -709
  251. package/docs/components/badge-field.md +0 -712
  252. package/docs/components/badge.md +0 -301
  253. package/docs/components/breadcrumb.md +0 -930
  254. package/docs/components/button-group.md +0 -650
  255. package/docs/components/button.md +0 -639
  256. package/docs/components/calendar.md +0 -555
  257. package/docs/components/card.md +0 -622
  258. package/docs/components/chart-block-tool.md +0 -129
  259. package/docs/components/checkbox.md +0 -699
  260. package/docs/components/cn-layout.md +0 -854
  261. package/docs/components/color-picker.md +0 -101
  262. package/docs/components/conclusion-header.md +0 -80
  263. package/docs/components/context-menu.md +0 -483
  264. package/docs/components/count-badge.md +0 -560
  265. package/docs/components/data-table.md +0 -854
  266. package/docs/components/data-views/backend-response.md +0 -324
  267. package/docs/components/data-views/examples/a11y-rtl.md +0 -250
  268. package/docs/components/data-views/examples/api-orders-route.md +0 -130
  269. package/docs/components/data-views/examples/fields.md +0 -362
  270. package/docs/components/data-views/examples/filters.md +0 -307
  271. package/docs/components/data-views/examples/inbox-routing.md +0 -218
  272. package/docs/components/data-views/examples/index.md +0 -29
  273. package/docs/components/data-views/examples/overview.md +0 -244
  274. package/docs/components/data-views/examples/panel.md +0 -212
  275. package/docs/components/data-views/examples/scale.md +0 -231
  276. package/docs/components/data-views/examples/server-side.md +0 -210
  277. package/docs/components/data-views/examples/state.md +0 -250
  278. package/docs/components/data-views/examples/tree-custom.md +0 -388
  279. package/docs/components/data-views/examples/view-registry.md +0 -313
  280. package/docs/components/data-views/examples/views.md +0 -534
  281. package/docs/components/data-views/guide.md +0 -405
  282. package/docs/components/data-views/index.md +0 -1495
  283. package/docs/components/data-views/migration.md +0 -79
  284. package/docs/components/date-picker.md +0 -857
  285. package/docs/components/dialog.md +0 -929
  286. package/docs/components/divider.md +0 -766
  287. package/docs/components/drawer.md +0 -654
  288. package/docs/components/dropdown-menu.md +0 -668
  289. package/docs/components/field-hint.md +0 -898
  290. package/docs/components/field-section.md +0 -781
  291. package/docs/components/form-builder.md +0 -276
  292. package/docs/components/form-renderer.md +0 -326
  293. package/docs/components/form-summary.md +0 -138
  294. package/docs/components/form.md +0 -785
  295. package/docs/components/header-bar.md +0 -188
  296. package/docs/components/image-attachment.md +0 -906
  297. package/docs/components/inner-label-field.md +0 -819
  298. package/docs/components/input-field.md +0 -623
  299. package/docs/components/input-otp.md +0 -756
  300. package/docs/components/input.md +0 -634
  301. package/docs/components/label-field.md +0 -770
  302. package/docs/components/label.md +0 -761
  303. package/docs/components/labeled-check-box.md +0 -642
  304. package/docs/components/labeled-radio.md +0 -796
  305. package/docs/components/link-button.md +0 -685
  306. package/docs/components/login-button.md +0 -872
  307. package/docs/components/password-level.md +0 -803
  308. package/docs/components/popover.md +0 -649
  309. package/docs/components/profile-menu.md +0 -656
  310. package/docs/components/radio-card.md +0 -801
  311. package/docs/components/radio.md +0 -735
  312. package/docs/components/scroll-area.md +0 -691
  313. package/docs/components/search-field.md +0 -702
  314. package/docs/components/searchable-select.md +0 -368
  315. package/docs/components/searchable-table.md +0 -438
  316. package/docs/components/searchable-tree-dialog.md +0 -190
  317. package/docs/components/searchable-tree.md +0 -200
  318. package/docs/components/section-block.md +0 -477
  319. package/docs/components/select.md +0 -709
  320. package/docs/components/simple-select.md +0 -741
  321. package/docs/components/skeleton.md +0 -706
  322. package/docs/components/slide-date-picker.md +0 -837
  323. package/docs/components/spin-loading.md +0 -696
  324. package/docs/components/stepper.md +0 -316
  325. package/docs/components/switch.md +0 -770
  326. package/docs/components/tab-form-item.md +0 -773
  327. package/docs/components/tab-switch.md +0 -170
  328. package/docs/components/table-dnd-wrapper.md +0 -107
  329. package/docs/components/table.md +0 -1088
  330. package/docs/components/text-editor.md +0 -735
  331. package/docs/components/textarea.md +0 -681
  332. package/docs/components/timeline.md +0 -254
  333. package/docs/components/toast.md +0 -773
  334. package/docs/components/toggle-button.md +0 -643
  335. package/docs/components/toggle.md +0 -882
  336. package/docs/components/tooltip.md +0 -513
  337. package/docs/components/transparent-label.md +0 -721
  338. package/docs/components/tree-drop-down.md +0 -740
  339. package/docs/components/tree-folder.md +0 -110
  340. package/docs/components/tree-sub-layout.md +0 -707
  341. package/docs/explanation/architecture.md +0 -54
  342. package/docs/explanation/design-system.md +0 -52
  343. package/docs/how-to/form-and-list-recipes.md +0 -386
  344. package/docs/how-to/forms-with-form-builder.md +0 -472
  345. package/docs/how-to/guides.md +0 -1027
  346. package/docs/migration/changelog.md +0 -54
  347. package/docs/migration/form-builder-2.5.2.md +0 -113
  348. package/docs/reference/cli.md +0 -112
  349. package/docs/reference/components.md +0 -572
  350. package/docs/reference/hooks.md +0 -1500
  351. package/docs/reference/providers.md +0 -866
  352. package/docs/reference/tailwind-plugins.md +0 -942
  353. package/docs/reference/theme.md +0 -85
  354. package/docs/reference/types.md +0 -1016
  355. package/docs/reference/utilities.md +0 -704
  356. package/docs/tutorials/building-first-form.md +0 -846
  357. package/docs/tutorials/component-composition.md +0 -882
  358. package/docs/tutorials/getting-started.md +0 -302
  359. package/docs/tutorials/theming-basics.md +0 -785
@@ -1 +1 @@
1
- {"version":3,"file":"suggestOtherCommand.js","sourceRoot":"","sources":["../../../cli/src/shared/suggestOtherCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI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AAI,CAAC,KAAK,wBAAwB,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC;IACrG,CAAC;IAED,6FAA6F;IAC7F,uDAAuD;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;SACvC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;SACxB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO,iBAAiB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAC/C,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -1,22 +1,51 @@
1
1
  export interface Config {
2
+ /** Where components are installed, e.g. "./src/app/components/ui". A leading "@/" is stripped. */
2
3
  path: string;
3
4
  }
4
5
  export interface DependenciesInfo {
5
6
  depsNames: Set<string>;
6
7
  depsNamesAndVersions: Record<string, string>;
7
8
  }
8
- /** A single entry in apps/lib/registry.json. */
9
+ /** A single entry in the registry index. */
9
10
  export interface RegistryItem {
10
11
  name: string;
11
12
  /** Folder name, which doubles as the CLI install sub-folder. */
12
13
  type: "components" | "hooks" | "utils" | "layouts" | "providers";
13
- /** Source path relative to apps/lib, e.g. "components/Select.tsx". */
14
+ /** Path relative to the library root, e.g. "components/Select.tsx". May be a directory. */
14
15
  path: string;
16
+ /**
17
+ * Every source file this item is made of, relative to the library root — the expansion of
18
+ * `path` when it is a directory (`components/DataViews` is 34 files).
19
+ *
20
+ * Optional only because a registry generated before this field existed does not carry it.
21
+ */
22
+ files?: string[];
15
23
  /** External npm packages this item imports (normalized install names). */
16
24
  npmDependencies: string[];
17
25
  /** Other registry items it depends on, as "type/name" refs. */
18
26
  registryDependencies: string[];
19
27
  }
28
+ /** One file of a hosted registry item, with its content inlined. */
29
+ export interface RegistryFile {
30
+ /** Path relative to the library root, e.g. "components/DataViews/index.ts". */
31
+ path: string;
32
+ /** Where it installs, relative to the configured `path`. Equal to `path` for this registry. */
33
+ target: string;
34
+ content: string;
35
+ }
36
+ /**
37
+ * A single item as served at `<registry>/<type>/<name>.json` — self-contained, so a consumer
38
+ * needs no access to the library source tree.
39
+ */
40
+ export interface RegistryItemPayload {
41
+ version: string;
42
+ name: string;
43
+ type: RegistryItem["type"];
44
+ /** npm packages, pinned inline (`react-hook-form@^7.54.2`). */
45
+ dependencies: string[];
46
+ registryDependencies: string[];
47
+ files: RegistryFile[];
48
+ }
20
49
  export interface Registry {
21
50
  version: string;
22
51
  generatedBy: string;
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../cli/src/types/main.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACnB,IAAI,EAAE,MAAM,CAAC;CAEhB;AAED,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD;AAED,gDAAgD;AAChD,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,IAAI,EAAE,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IACjE,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,+DAA+D;IAC/D,oBA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AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,+DAA+D;IAC/D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,QAAQ;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IACxB,wEAAwE;IACxE,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,8CAA8C;IAC9C,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAChC"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "torch-glare",
3
- "version": "2.5.5",
3
+ "version": "2.6.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
- "description": "A copy-in React component library (TypeScript + Radix UI + Tailwind CSS). Its CLI copies component source directly into your project — you own the code.",
6
+ "description": "A React component library (TypeScript + Radix UI + Tailwind CSS). Its CLI installs component source from a hosted registry straight into your project — you own the code.",
7
7
  "homepage": "https://glare.torchcorp.com",
8
8
  "repository": {
9
9
  "type": "git",
@@ -22,11 +22,7 @@
22
22
  "cli"
23
23
  ],
24
24
  "files": [
25
- "dist",
26
- "apps/lib",
27
- "docs",
28
- "!**/*-dev.*",
29
- "!apps/lib/components/**/*.md"
25
+ "dist"
30
26
  ],
31
27
  "bin": {
32
28
  "torch-glare": "dist/bin/index.js"
@@ -37,17 +33,16 @@
37
33
  "scripts": {
38
34
  "build": "tsc -b",
39
35
  "registry": "node scripts/bin/generateRegistry/index.js",
40
- "examples": "node scripts/bin/generateExampleDocs/index.js",
36
+ "tag": "node scripts/bin/tagRelease/index.js",
41
37
  "docs:fix": "node scripts/bin/fixDocs/index.js",
42
38
  "check:ai-docs": "node scripts/bin/checkAiDocs/index.js",
39
+ "hooks:install": "git config core.hooksPath .githooks",
43
40
  "typecheck": "pnpm -C apps run typecheck",
44
41
  "lint": "pnpm -C apps run lint:lib",
45
42
  "format": "pnpm -C apps run format",
46
43
  "format:check": "pnpm -C apps run format:check",
47
44
  "test": "pnpm -C apps run test",
48
- "mcp:build": "pnpm -C mcp install && pnpm -C mcp run build",
49
- "prepare": "pnpm -C mcp install && pnpm -C mcp run build",
50
- "deploy": "pnpm run registry && pnpm run examples && pnpm run check:ai-docs && npx tsc --build --force && npm publish --access public"
45
+ "deploy": "pnpm run registry && pnpm run check:ai-docs && npx tsc --build --force && npm publish --access public && pnpm run tag"
51
46
  },
52
47
  "dependencies": {
53
48
  "commander": "^13.1.0",
@@ -1,93 +0,0 @@
1
- import React, { ButtonHTMLAttributes } from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { Button } from "./Button";
4
- import { cn } from "../utils/cn";
5
- import { ButtonVariant, Themes } from "../utils/types";
6
-
7
- /**
8
- * The button that sits at the end of an input field — Figma `ActionButton` (Type=DropDown).
9
- *
10
- * Sizes are Figma's exactly: Xs 18, S 22, M 32, with `radius/sm` on the two small ones and
11
- * `radius/lg` on M.
12
- *
13
- * The `!` on the radius is load-bearing. `twMerge` does not dedupe `rounded-radius-*` — they are
14
- * custom scale keys, not values it recognises — so this radius and the one coming from `Button`'s
15
- * own `size` variant both survive, and CSS source order picks the winner. Tailwind emits the scale
16
- * in config order (sm before md before lg), so without `!` size S would render Button M's 6px
17
- * instead of its own 4px.
18
- */
19
- const buttonVariants = cva("", {
20
- variants: {
21
- size: {
22
- XS: "h-[18px] w-[18px] text-[12px] !rounded-radius-sm",
23
- S: "h-[22px] w-[22px] text-[12px] !rounded-radius-sm",
24
- M: "h-[32px] w-[32px] text-[18px] !rounded-radius-lg",
25
- },
26
- },
27
- defaultVariants: {
28
- size: "M",
29
- },
30
- });
31
-
32
- /**
33
- * Default/hover/disabled colours as Figma binds them. Applied only when the caller passes no
34
- * `variant`, so anything asking for a specific Button variant still gets it.
35
- *
36
- * `action-secondary` and `action-disabled` already match `Button`'s `PrimeStyle` equivalents; the
37
- * real difference is hover, where `PrimeStyle` uses `button-hover` and the design uses
38
- * `action-hover`.
39
- */
40
- const actionTokens = [
41
- "bg-background-presentation-action-secondary",
42
- "text-content-presentation-action-light-primary",
43
- "hover:bg-background-presentation-action-hover",
44
- "hover:text-content-presentation-global-hover",
45
- "disabled:bg-background-presentation-action-disabled",
46
- "disabled:text-content-presentation-state-disabled",
47
- ];
48
-
49
- interface Props
50
- extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
51
- is_loading?: boolean;
52
- disabled?: boolean;
53
- asChild?: boolean;
54
- as?: React.ElementType;
55
- theme?: Themes;
56
- variant?: ButtonVariant;
57
- }
58
- export const ActionButton = function ({
59
- size,
60
- asChild,
61
- as: Tag = "button",
62
- className,
63
- variant,
64
- type = "button",
65
- children,
66
- theme,
67
- ...props
68
- }: Props) {
69
- return (
70
- <Button
71
- theme={theme}
72
- asChild={asChild}
73
- // Forwarded, not swallowed: the chevron inside a field renders `as="span"` because it is
74
- // nested in a clickable trigger, and a <button> cannot contain a <button>.
75
- as={Tag}
76
- buttonType="icon"
77
- // `type` is only meaningful on a real button; on a span it would be an invalid attribute.
78
- type={Tag === "button" ? type : undefined}
79
- size={size == "XS" ? "S" : size == "S" ? "M" : size == "M" ? "L" : "S"}
80
- variant={variant}
81
- className={cn(
82
- buttonVariants({
83
- size,
84
- }),
85
- !variant && actionTokens,
86
- className,
87
- )}
88
- {...props}
89
- >
90
- {children}
91
- </Button>
92
- );
93
- };
@@ -1,27 +0,0 @@
1
- import React, { HTMLAttributes } from "react";
2
- import { cn } from "../utils/cn";
3
- import { Themes } from "../utils/types";
4
- import { Divider } from "./Divider";
5
-
6
- interface Props extends HTMLAttributes<HTMLDivElement> {
7
- withDivider?: boolean; // to display the divider line if you pass it see on figma design file
8
- theme?: Themes;
9
- }
10
-
11
- const ActionsGroup: React.FC<Props> = ({ withDivider, className, children, theme, ...props }) => {
12
- return (
13
- <section
14
- {...props}
15
- data-theme={theme}
16
- className={cn("flex items-center gap-2 w-full", className)}
17
- >
18
- {withDivider && <Divider />}
19
- {children}
20
- {withDivider && <Divider />}
21
- </section>
22
- );
23
- };
24
-
25
- // <div className="flex border-t border-solid border-border-presentation-global-primary flex-1 px-2" />
26
-
27
- export default ActionsGroup;
@@ -1,204 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
5
-
6
- import { cn } from "../utils/cn";
7
- import { Button, buttonVariants } from "./Button";
8
- import { ButtonVariant } from "../utils/types";
9
- import { cva } from "class-variance-authority";
10
-
11
- const StatusTextStyle = cva("", {
12
- variants: {
13
- variant: {
14
- default:
15
- "[&_strong]:text-content-presentation-global-primary [&_[data-description]]:text-content-presentation-global-primary",
16
- info: "[&_strong]:text-content-presentation-state-information [&_[data-description]]:text-content-presentation-state-information",
17
- success:
18
- "[&_strong]:text-content-presentation-state-success [&_[data-description]]:text-content-presentation-state-success",
19
- warning:
20
- "[&_strong]:text-content-presentation-state-warning [&_[data-description]]:text-content-presentation-state-warning",
21
- error:
22
- "[&_strong]:text-content-presentation-state-negative [&_[data-description]]:text-content-presentation-state-negative",
23
- },
24
- },
25
- defaultVariants: {
26
- variant: "default",
27
- },
28
- });
29
-
30
- const AlertDialog = AlertDialogPrimitive.Root;
31
-
32
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
33
-
34
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
35
-
36
- const AlertDialogOverlay = React.forwardRef<
37
- React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
38
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
39
- >(({ className, ...props }, ref) => (
40
- <AlertDialogPrimitive.Overlay
41
- className={cn(
42
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
43
- className,
44
- )}
45
- {...props}
46
- ref={ref}
47
- />
48
- ));
49
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
50
-
51
- const AlertDialogContent = React.forwardRef<
52
- React.ElementRef<typeof AlertDialogPrimitive.Content>,
53
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
54
- variant?: "info" | "success" | "warning" | "error" | "default";
55
- }
56
- >(({ className, variant = "default", ...props }, ref) => (
57
- <AlertDialogPortal>
58
- <AlertDialogOverlay />
59
- <AlertDialogPrimitive.Content
60
- ref={ref}
61
- className={cn(
62
- StatusTextStyle({ variant }),
63
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-[800px] translate-x-[-50%] translate-y-[-50%]",
64
- "gap-2 rounded-[16px] border-2 border-border-presentation-global-primary",
65
- "bg-background-presentation-body-overlay-primary p-[12px]",
66
- "text-content-presentation-global-primary",
67
- "shadow-lg duration-200",
68
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
69
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
70
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
71
- "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
72
- "data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
73
- className,
74
- )}
75
- {...props}
76
- />
77
- </AlertDialogPortal>
78
- ));
79
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
80
-
81
- const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
82
- <div className={cn("flex justify-between space-x-2 text-left", className)} {...props} />
83
- );
84
- AlertDialogHeader.displayName = "AlertDialogHeader";
85
-
86
- const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
87
- <div
88
- className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
89
- {...props}
90
- />
91
- );
92
- AlertDialogFooter.displayName = "AlertDialogFooter";
93
-
94
- const AlertDialogTitle = React.forwardRef<
95
- React.ElementRef<typeof AlertDialogPrimitive.Title>,
96
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
97
- >(({ className, ...props }, ref) => (
98
- <AlertDialogPrimitive.Title
99
- ref={ref}
100
- className={cn("typography-display-medium-semibold", className)}
101
- {...props}
102
- />
103
- ));
104
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
105
-
106
- const AlertDialogLabel = React.forwardRef<
107
- React.ElementRef<typeof AlertDialogPrimitive.Title>,
108
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> & {
109
- title: string;
110
- }
111
- >(({ className, title, ...props }, ref) => {
112
- const words = title.split(" ");
113
- const firstWord = words[0];
114
- const restOfTitle = words.slice(1).join(" ");
115
-
116
- return (
117
- <AlertDialogPrimitive.Title
118
- ref={ref}
119
- className={cn("typography-display-medium-semibold", className)}
120
- {...props}
121
- >
122
- <p className="first-letter:uppercase typography-display-medium-semibold">
123
- <strong className="typography-display-medium-semibold">{firstWord}</strong>
124
- {restOfTitle.length > 0 && " " + restOfTitle}
125
- </p>
126
- </AlertDialogPrimitive.Title>
127
- );
128
- });
129
- AlertDialogLabel.displayName = "AlertDialogLabel";
130
-
131
- const AlertDialogDescription = React.forwardRef<
132
- React.ElementRef<typeof AlertDialogPrimitive.Description>,
133
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
134
- >(({ className, ...props }, ref) => (
135
- <AlertDialogPrimitive.Description
136
- data-description=""
137
- ref={ref}
138
- className={cn(
139
- "typography-body-large-medium",
140
- "bg-background-presentation-form-base",
141
- "border border-border-presentation-global-primary",
142
- "rounded-[8px] p-[24px_48px_48px_48px]",
143
- className,
144
- )}
145
- {...props}
146
- />
147
- ));
148
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
149
-
150
- const AlertDialogAction = React.forwardRef<
151
- React.ElementRef<typeof AlertDialogPrimitive.Action>,
152
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
153
- size?: "M" | "S" | "L" | "XL";
154
- variant?: ButtonVariant;
155
- buttonType?: "button" | "icon";
156
- }
157
- >(({ className, size = "M", variant = "BorderStyle", buttonType = "button", ...props }, ref) => (
158
- <AlertDialogPrimitive.Action
159
- ref={ref}
160
- className={cn(
161
- buttonVariants({ variant: variant, size: size, buttonType: buttonType }),
162
- className,
163
- )}
164
- asChild
165
- >
166
- <Button size={size} variant={variant} buttonType={buttonType} {...props} />
167
- </AlertDialogPrimitive.Action>
168
- ));
169
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
170
-
171
- const AlertDialogCancel = React.forwardRef<
172
- React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
173
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> & {
174
- size?: "M" | "S" | "L" | "XL";
175
- variant?: ButtonVariant;
176
- buttonType?: "button" | "icon";
177
- }
178
- >(({ className, size = "M", variant = "RedSecStyle", buttonType = "icon", ...props }, ref) => (
179
- <AlertDialogPrimitive.Cancel
180
- ref={ref}
181
- className={cn(
182
- buttonVariants({ variant: variant, size: size, buttonType: buttonType }),
183
- "",
184
- className,
185
- )}
186
- {...props}
187
- />
188
- ));
189
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
190
-
191
- export {
192
- AlertDialog,
193
- AlertDialogPortal,
194
- AlertDialogOverlay,
195
- AlertDialogTrigger,
196
- AlertDialogContent,
197
- AlertDialogHeader,
198
- AlertDialogFooter,
199
- AlertDialogTitle,
200
- AlertDialogLabel,
201
- AlertDialogDescription,
202
- AlertDialogAction,
203
- AlertDialogCancel,
204
- };
@@ -1,46 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
- import { cn } from "../utils/cn";
6
-
7
- const Avatar = React.forwardRef<
8
- React.ElementRef<typeof AvatarPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
10
- >(({ className, ...props }, ref) => (
11
- <AvatarPrimitive.Root
12
- ref={ref}
13
- className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
14
- {...props}
15
- />
16
- ));
17
- Avatar.displayName = AvatarPrimitive.Root.displayName;
18
-
19
- const AvatarImage = React.forwardRef<
20
- React.ElementRef<typeof AvatarPrimitive.Image>,
21
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
22
- >(({ className, ...props }, ref) => (
23
- <AvatarPrimitive.Image
24
- ref={ref}
25
- className={cn("aspect-square h-full w-full object-cover", className)}
26
- {...props}
27
- />
28
- ));
29
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
30
-
31
- const AvatarFallback = React.forwardRef<
32
- React.ElementRef<typeof AvatarPrimitive.Fallback>,
33
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
34
- >(({ className, ...props }, ref) => (
35
- <AvatarPrimitive.Fallback
36
- ref={ref}
37
- className={cn(
38
- "flex h-full w-full items-center justify-center rounded-full bg-background-presentation-action-disabled text-content-presentation-global-primary",
39
- className,
40
- )}
41
- {...props}
42
- />
43
- ));
44
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
45
-
46
- export { Avatar, AvatarImage, AvatarFallback };