torch-glare 2.3.0 → 2.4.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 (264) hide show
  1. package/README.md +8 -0
  2. package/apps/lib/components/ActionButton.tsx +7 -12
  3. package/apps/lib/components/ActionsGroup.tsx +4 -15
  4. package/apps/lib/components/AlertDialog.tsx +173 -191
  5. package/apps/lib/components/Avatar.tsx +13 -16
  6. package/apps/lib/components/Badge.tsx +7 -3
  7. package/apps/lib/components/BadgeField.tsx +76 -71
  8. package/apps/lib/components/Breadcrumb.tsx +49 -85
  9. package/apps/lib/components/Button.tsx +20 -19
  10. package/apps/lib/components/ButtonGroup.tsx +31 -41
  11. package/apps/lib/components/Calendar.tsx +51 -29
  12. package/apps/lib/components/Card.tsx +2 -13
  13. package/apps/lib/components/ChartBlockTool.ts +17 -52
  14. package/apps/lib/components/Checkbox.tsx +9 -16
  15. package/apps/lib/components/ContextMenu.tsx +110 -106
  16. package/apps/lib/components/CountBadge.tsx +4 -6
  17. package/apps/lib/components/DataTable.tsx +196 -216
  18. package/apps/lib/components/DataViews/DataViewRadio.tsx +10 -8
  19. package/apps/lib/components/DataViews/DataViewsConfigPanel.tsx +21 -55
  20. package/apps/lib/components/DataViews/DataViewsHeader.tsx +1 -3
  21. package/apps/lib/components/DataViews/DataViewsLayout.tsx +5 -12
  22. package/apps/lib/components/DataViews/FilterPanel.tsx +173 -150
  23. package/apps/lib/components/DataViews/HeaderSearch.tsx +1 -5
  24. package/apps/lib/components/DataViews/InboxView.tsx +22 -68
  25. package/apps/lib/components/DataViews/InboxViewCard.tsx +68 -77
  26. package/apps/lib/components/DataViews/KanbanView.tsx +8 -25
  27. package/apps/lib/components/DataViews/PanelControls.tsx +3 -13
  28. package/apps/lib/components/DataViews/SettingsPanel.tsx +83 -89
  29. package/apps/lib/components/DataViews/TableView.tsx +8 -28
  30. package/apps/lib/components/DataViews/TreeView.tsx +12 -40
  31. package/apps/lib/components/DataViews/badgeAdapter.ts +32 -28
  32. package/apps/lib/components/DataViews/fieldRenderers.tsx +106 -141
  33. package/apps/lib/components/DataViews/filters/DatePickerRangeFilter.tsx +87 -0
  34. package/apps/lib/components/DataViews/filters/DateRangePopover.tsx +39 -32
  35. package/apps/lib/components/DataViews/filters/PresetChips.tsx +15 -15
  36. package/apps/lib/components/DataViews/filters/RangeSliderWithInputs.tsx +69 -58
  37. package/apps/lib/components/DataViews/index.ts +26 -26
  38. package/apps/lib/components/DataViews/tree/TreeDrawer.tsx +12 -16
  39. package/apps/lib/components/DataViews/tree/TreeSidebar.tsx +28 -31
  40. package/apps/lib/components/DataViews/types.ts +111 -114
  41. package/apps/lib/components/DatePicker.tsx +198 -191
  42. package/apps/lib/components/Dialog.tsx +92 -105
  43. package/apps/lib/components/Divider.tsx +21 -24
  44. package/apps/lib/components/Drawer.tsx +79 -139
  45. package/apps/lib/components/DropdownMenu.tsx +144 -181
  46. package/apps/lib/components/FieldHint.tsx +4 -11
  47. package/apps/lib/components/Form.tsx +146 -155
  48. package/apps/lib/components/FormStepper.tsx +9 -39
  49. package/apps/lib/components/HeaderBar.tsx +119 -0
  50. package/apps/lib/components/ImageAttachment.tsx +111 -73
  51. package/apps/lib/components/InnerLabelField.tsx +20 -16
  52. package/apps/lib/components/Input.tsx +171 -172
  53. package/apps/lib/components/InputField.tsx +44 -45
  54. package/apps/lib/components/InputOTP.tsx +68 -69
  55. package/apps/lib/components/Label.tsx +31 -35
  56. package/apps/lib/components/LabelField.tsx +4 -5
  57. package/apps/lib/components/LabeledCheckBox.tsx +8 -12
  58. package/apps/lib/components/LabeledRadio.tsx +7 -5
  59. package/apps/lib/components/LinkButton.tsx +2 -9
  60. package/apps/lib/components/LoginButton.tsx +4 -9
  61. package/apps/lib/components/PasswordLevel.tsx +5 -5
  62. package/apps/lib/components/Popover.tsx +15 -33
  63. package/apps/lib/components/ProfileMenu.tsx +67 -72
  64. package/apps/lib/components/Radio.tsx +1 -5
  65. package/apps/lib/components/RadioCard.tsx +9 -28
  66. package/apps/lib/components/ScrollArea.tsx +45 -43
  67. package/apps/lib/components/SearchField.tsx +49 -39
  68. package/apps/lib/components/SearchableSelect.tsx +46 -52
  69. package/apps/lib/components/SearchableTable.tsx +199 -219
  70. package/apps/lib/components/SearchableTree.tsx +469 -0
  71. package/apps/lib/components/SearchableTreeDialog.tsx +493 -0
  72. package/apps/lib/components/SectionBlock.tsx +4 -16
  73. package/apps/lib/components/Select.tsx +53 -80
  74. package/apps/lib/components/SimpleSelect.tsx +196 -187
  75. package/apps/lib/components/Skeleton.tsx +9 -12
  76. package/apps/lib/components/SlideDatePicker.tsx +215 -166
  77. package/apps/lib/components/SpinLoading.tsx +33 -49
  78. package/apps/lib/components/Stepper.tsx +13 -56
  79. package/apps/lib/components/Switch.tsx +8 -10
  80. package/apps/lib/components/TabFormItem.tsx +3 -12
  81. package/apps/lib/components/TabSwitch.tsx +7 -34
  82. package/apps/lib/components/Table.tsx +60 -75
  83. package/apps/lib/components/TableDnDWrapper.ts +15 -48
  84. package/apps/lib/components/TextEditor.tsx +93 -104
  85. package/apps/lib/components/Textarea.tsx +8 -12
  86. package/apps/lib/components/Timeline.tsx +21 -41
  87. package/apps/lib/components/Toast.tsx +83 -83
  88. package/apps/lib/components/Toggle.tsx +112 -114
  89. package/apps/lib/components/ToggleButton.tsx +1 -1
  90. package/apps/lib/components/Tooltip.tsx +24 -19
  91. package/apps/lib/components/TransparentLabel.tsx +61 -62
  92. package/apps/lib/components/TreeDropDown.tsx +86 -52
  93. package/apps/lib/components/TreeFolder/TreeFolder.tsx +15 -48
  94. package/apps/lib/components/TreeFolder/TreeFolderBreadcrumb.tsx +16 -21
  95. package/apps/lib/components/TreeFolder/TreeFolderRow.tsx +9 -20
  96. package/apps/lib/components/TreeFolder/TreeFolderStyles.tsx +3 -3
  97. package/apps/lib/components/TreeFolder/icons.tsx +14 -17
  98. package/apps/lib/components/TreeFolder/index.ts +15 -8
  99. package/apps/lib/components/TreeFolder/treeFolderUtils.ts +47 -52
  100. package/apps/lib/components/TreeFolder/types.ts +32 -32
  101. package/apps/lib/components/TreeFolder/useTreeFolderDnD.ts +117 -123
  102. package/apps/lib/hooks/useActiveTreeItem.ts +52 -55
  103. package/apps/lib/hooks/useClickOutside.ts +21 -20
  104. package/apps/lib/hooks/useDataViewsState.ts +86 -80
  105. package/apps/lib/hooks/useIsMobile.ts +12 -12
  106. package/apps/lib/hooks/useResize.ts +54 -65
  107. package/apps/lib/hooks/useTagSelection.ts +201 -201
  108. package/apps/lib/layouts/CNLayout.tsx +181 -140
  109. package/apps/lib/layouts/DataViewCard.tsx +4 -18
  110. package/apps/lib/layouts/FieldSection.tsx +2 -6
  111. package/apps/lib/layouts/TreeSubLayout.tsx +24 -38
  112. package/apps/lib/providers/ThemeProvider.tsx +8 -23
  113. package/apps/lib/registry.json +1004 -0
  114. package/apps/lib/tsconfig.json +9 -0
  115. package/apps/lib/utils/cn.ts +1 -1
  116. package/apps/lib/utils/dataViews/columnUtils.ts +46 -44
  117. package/apps/lib/utils/dataViews/fieldUtils.ts +70 -71
  118. package/apps/lib/utils/dataViews/nestedDataUtils.tsx +129 -122
  119. package/apps/lib/utils/dataViews/pathUtils.ts +74 -67
  120. package/apps/lib/utils/dataViews/rangeUtils.ts +121 -112
  121. package/apps/lib/utils/dataViews/treeUtils.ts +204 -211
  122. package/apps/lib/utils/dateFormat.ts +64 -54
  123. package/apps/lib/utils/markdownParser.ts +2 -7
  124. package/apps/lib/utils/resize.ts +21 -25
  125. package/apps/lib/utils/types.ts +13 -13
  126. package/dist/bin/index.js +8 -2
  127. package/dist/bin/index.js.map +1 -1
  128. package/dist/src/shared/getAvailableFiles.d.ts.map +1 -1
  129. package/dist/src/shared/getAvailableFiles.js +6 -1
  130. package/dist/src/shared/getAvailableFiles.js.map +1 -1
  131. package/dist/src/shared/loadRegistry.d.ts +7 -0
  132. package/dist/src/shared/loadRegistry.d.ts.map +1 -0
  133. package/dist/src/shared/loadRegistry.js +31 -0
  134. package/dist/src/shared/loadRegistry.js.map +1 -0
  135. package/dist/src/shared/resolveInstallPlan.d.ts +12 -0
  136. package/dist/src/shared/resolveInstallPlan.d.ts.map +1 -0
  137. package/dist/src/shared/resolveInstallPlan.js +39 -0
  138. package/dist/src/shared/resolveInstallPlan.js.map +1 -0
  139. package/dist/src/types/main.d.ts +24 -0
  140. package/dist/src/types/main.d.ts.map +1 -1
  141. package/docs/README.md +10 -2
  142. package/docs/components/action-button.md +30 -24
  143. package/docs/components/actions-group.md +26 -20
  144. package/docs/components/alert-dialog.md +45 -45
  145. package/docs/components/avatar.md +6 -2
  146. package/docs/components/badge-field.md +6 -2
  147. package/docs/components/badge.md +7 -1
  148. package/docs/components/breadcrumb.md +15 -40
  149. package/docs/components/button-group.md +13 -10
  150. package/docs/components/button.md +58 -33
  151. package/docs/components/calendar.md +26 -19
  152. package/docs/components/card.md +19 -16
  153. package/docs/components/chart-block-tool.md +128 -0
  154. package/docs/components/checkbox.md +16 -8
  155. package/docs/components/cn-layout.md +7 -1
  156. package/docs/components/context-menu.md +47 -24
  157. package/docs/components/count-badge.md +7 -1
  158. package/docs/components/data-table.md +45 -33
  159. package/docs/components/data-views-config-panel.md +18 -14
  160. package/docs/components/data-views-layout.md +20 -17
  161. package/docs/components/date-picker.md +30 -23
  162. package/docs/components/dialog.md +43 -42
  163. package/docs/components/divider.md +10 -4
  164. package/docs/components/drawer.md +8 -33
  165. package/docs/components/dropdown-menu.md +51 -32
  166. package/docs/components/field-hint.md +37 -25
  167. package/docs/components/field-section.md +9 -3
  168. package/docs/components/form-stepper.md +6 -0
  169. package/docs/components/form.md +17 -20
  170. package/docs/components/header-bar.md +187 -0
  171. package/docs/components/image-attachment.md +33 -41
  172. package/docs/components/inbox-view.md +16 -5
  173. package/docs/components/inner-label-field.md +34 -24
  174. package/docs/components/input-field.md +18 -10
  175. package/docs/components/input-otp.md +14 -11
  176. package/docs/components/input.md +22 -16
  177. package/docs/components/kanban-view.md +15 -5
  178. package/docs/components/label-field.md +32 -22
  179. package/docs/components/label.md +43 -32
  180. package/docs/components/labeled-check-box.md +16 -8
  181. package/docs/components/labeled-radio.md +18 -11
  182. package/docs/components/link-button.md +7 -1
  183. package/docs/components/login-button.md +8 -2
  184. package/docs/components/password-level.md +37 -24
  185. package/docs/components/popover.md +26 -23
  186. package/docs/components/profile-menu.md +38 -27
  187. package/docs/components/radio-card.md +16 -9
  188. package/docs/components/radio.md +16 -8
  189. package/docs/components/scroll-area.md +6 -2
  190. package/docs/components/search-field.md +14 -6
  191. package/docs/components/searchable-select.md +19 -14
  192. package/docs/components/searchable-table.md +60 -41
  193. package/docs/components/searchable-tree-dialog.md +190 -0
  194. package/docs/components/searchable-tree.md +200 -0
  195. package/docs/components/section-block.md +130 -4
  196. package/docs/components/select.md +23 -18
  197. package/docs/components/simple-select.md +14 -10
  198. package/docs/components/skeleton.md +43 -33
  199. package/docs/components/slide-date-picker.md +37 -29
  200. package/docs/components/spin-loading.md +32 -23
  201. package/docs/components/stepper.md +6 -0
  202. package/docs/components/switch.md +14 -6
  203. package/docs/components/tab-form-item.md +7 -1
  204. package/docs/components/tab-switch.md +13 -6
  205. package/docs/components/table-dnd-wrapper.md +105 -0
  206. package/docs/components/table-view.md +15 -5
  207. package/docs/components/table.md +28 -28
  208. package/docs/components/text-editor.md +19 -13
  209. package/docs/components/textarea.md +15 -7
  210. package/docs/components/timeline.md +6 -0
  211. package/docs/components/toast.md +35 -26
  212. package/docs/components/toggle-button.md +24 -21
  213. package/docs/components/toggle.md +23 -15
  214. package/docs/components/tooltip.md +42 -30
  215. package/docs/components/transparent-label.md +29 -20
  216. package/docs/components/tree-drop-down.md +31 -23
  217. package/docs/components/tree-sub-layout.md +6 -2
  218. package/docs/components/tree-view.md +16 -5
  219. package/docs/explanation/architecture.md +54 -0
  220. package/docs/explanation/design-system.md +52 -0
  221. package/docs/how-to/data-views-from-backend-response.md +7 -4
  222. package/docs/how-to/guides.md +24 -18
  223. package/docs/migration/changelog.md +38 -0
  224. package/docs/reference/cli.md +87 -0
  225. package/docs/reference/components.md +11 -12
  226. package/docs/reference/hooks.md +8 -8
  227. package/docs/reference/providers.md +22 -22
  228. package/docs/reference/tailwind-plugins.md +2 -2
  229. package/docs/reference/theme.md +85 -0
  230. package/docs/reference/types.md +4 -4
  231. package/docs/reference/utilities.md +19 -26
  232. package/docs/tutorials/building-first-form.md +20 -13
  233. package/docs/tutorials/component-composition.md +34 -50
  234. package/docs/tutorials/getting-started.md +2 -2
  235. package/docs/tutorials/theming-basics.md +13 -10
  236. package/package.json +31 -3
  237. package/dist/src/commands/block.d.ts +0 -5
  238. package/dist/src/commands/block.d.ts.map +0 -1
  239. package/dist/src/commands/block.js +0 -255
  240. package/dist/src/commands/block.js.map +0 -1
  241. package/dist/src/shared/configureFonts.d.ts +0 -6
  242. package/dist/src/shared/configureFonts.d.ts.map +0 -1
  243. package/dist/src/shared/configureFonts.js +0 -106
  244. package/dist/src/shared/configureFonts.js.map +0 -1
  245. package/dist/src/shared/configureGlobalCss.d.ts +0 -6
  246. package/dist/src/shared/configureGlobalCss.d.ts.map +0 -1
  247. package/dist/src/shared/configureGlobalCss.js +0 -154
  248. package/dist/src/shared/configureGlobalCss.js.map +0 -1
  249. package/dist/src/shared/configureTailwind.d.ts +0 -7
  250. package/dist/src/shared/configureTailwind.d.ts.map +0 -1
  251. package/dist/src/shared/configureTailwind.js +0 -163
  252. package/dist/src/shared/configureTailwind.js.map +0 -1
  253. package/dist/src/shared/detectFramework.d.ts +0 -23
  254. package/dist/src/shared/detectFramework.d.ts.map +0 -1
  255. package/dist/src/shared/detectFramework.js +0 -119
  256. package/dist/src/shared/detectFramework.js.map +0 -1
  257. package/dist/src/shared/installBaseUtils.d.ts +0 -5
  258. package/dist/src/shared/installBaseUtils.d.ts.map +0 -1
  259. package/dist/src/shared/installBaseUtils.js +0 -79
  260. package/dist/src/shared/installBaseUtils.js.map +0 -1
  261. package/dist/src/shared/resolveAliases.d.ts +0 -24
  262. package/dist/src/shared/resolveAliases.d.ts.map +0 -1
  263. package/dist/src/shared/resolveAliases.js +0 -98
  264. package/dist/src/shared/resolveAliases.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../cli/src/commands/block.ts"],"names":[],"mappings":"AA6MA;;GAEG;AACH,wBAAsB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA2FtF"}
@@ -1,255 +0,0 @@
1
- import path from "path";
2
- import fs from "fs";
3
- import inquirer from "inquirer";
4
- import { execSync } from "child_process";
5
- import { fileURLToPath } from "url";
6
- import { ensureDirectoryExists } from "../shared/ensureDirectoryExists.js";
7
- import { getConfig } from "../shared/getConfig.js";
8
- import { CONFIG_FILE } from "./init.js";
9
- import { add } from "./add.js";
10
- import { addUtil } from "./utils.js";
11
- import { detectPackageManager } from "../shared/detectPackageManager.js";
12
- import { getInstallCommand } from "../shared/getInstallCommand.js";
13
- import { getCurrentInstalledDependencies } from "../shared/getCurrentInstalledDependencies.js";
14
- const __filename = fileURLToPath(import.meta.url);
15
- const __dirname = path.dirname(__filename);
16
- // Define the path to the blocks templates directory
17
- const blocksTemplatesDir = path.resolve(__dirname, "../../../apps/lib/blocks");
18
- // Required dependencies for each block
19
- const BLOCK_DEPENDENCIES = {
20
- DataViewPage: {
21
- components: [
22
- "Button",
23
- "Table",
24
- "Card",
25
- "Input",
26
- "Popover",
27
- "Badge",
28
- "Checkbox",
29
- "Select",
30
- "ButtonGroup",
31
- "Skeleton",
32
- ],
33
- utils: ["cn", "types"],
34
- npmPackages: [
35
- "@dnd-kit/core",
36
- "@dnd-kit/sortable",
37
- "@dnd-kit/utilities",
38
- "@radix-ui/react-dialog",
39
- "@tanstack/react-query",
40
- ],
41
- },
42
- };
43
- /**
44
- * Get a list of available blocks from the blocks templates directory.
45
- */
46
- function getAvailableBlocks() {
47
- if (!fs.existsSync(blocksTemplatesDir)) {
48
- return [];
49
- }
50
- return fs.readdirSync(blocksTemplatesDir, { withFileTypes: true })
51
- .filter((dirent) => dirent.isDirectory())
52
- .map((dirent) => dirent.name);
53
- }
54
- /**
55
- * Prompt the user to select a block from a list.
56
- */
57
- async function promptBlockSelection(availableBlocks) {
58
- if (availableBlocks.length === 0) {
59
- console.error("❌ No blocks available.");
60
- process.exit(1);
61
- }
62
- const { selectedBlock } = await inquirer.prompt([
63
- {
64
- type: "list",
65
- name: "selectedBlock",
66
- message: "Which block would you like to add?",
67
- choices: availableBlocks.map((block) => ({
68
- name: `${block} - Ready-to-use page template`,
69
- value: block,
70
- })),
71
- },
72
- ]);
73
- return selectedBlock;
74
- }
75
- /**
76
- * Copy a directory recursively (simple version without dependency resolution)
77
- */
78
- function copyBlockDirectory(source, target) {
79
- if (!fs.existsSync(target)) {
80
- fs.mkdirSync(target, { recursive: true });
81
- }
82
- const entries = fs.readdirSync(source, { withFileTypes: true });
83
- for (const entry of entries) {
84
- const srcPath = path.join(source, entry.name);
85
- const destPath = path.join(target, entry.name);
86
- if (entry.isDirectory()) {
87
- copyBlockDirectory(srcPath, destPath);
88
- }
89
- else {
90
- fs.copyFileSync(srcPath, destPath);
91
- }
92
- }
93
- }
94
- /**
95
- * Update import paths in copied block files to use relative paths
96
- * From blocks/DataViewPage/ to components/ and utils/
97
- */
98
- function updateImportPaths(targetDir) {
99
- const processFile = (filePath, depth) => {
100
- let content = fs.readFileSync(filePath, "utf-8");
101
- // Calculate relative path prefix based on depth
102
- // depth 0 = blocks/DataViewPage/*.tsx -> ../../
103
- // depth 1 = blocks/DataViewPage/views/*.tsx -> ../../../
104
- const basePrefix = "../".repeat(depth + 2);
105
- // Replace ../../utils/ and ../../../utils/ with relative path
106
- content = content.replace(/from ["']\.\.\/\.\.\/utils\//g, `from "${basePrefix}utils/`);
107
- content = content.replace(/from ["']\.\.\/\.\.\/\.\.\/utils\//g, `from "${basePrefix}utils/`);
108
- // Replace ../../components/ and ../../../components/ with relative path
109
- content = content.replace(/from ["']\.\.\/\.\.\/components\//g, `from "${basePrefix}components/`);
110
- content = content.replace(/from ["']\.\.\/\.\.\/\.\.\/components\//g, `from "${basePrefix}components/`);
111
- fs.writeFileSync(filePath, content, "utf-8");
112
- };
113
- const walkDir = (dir, depth = 0) => {
114
- const entries = fs.readdirSync(dir, { withFileTypes: true });
115
- for (const entry of entries) {
116
- const fullPath = path.join(dir, entry.name);
117
- if (entry.isDirectory()) {
118
- walkDir(fullPath, depth + 1);
119
- }
120
- else if (entry.name.endsWith(".tsx") || entry.name.endsWith(".ts")) {
121
- processFile(fullPath, depth);
122
- }
123
- }
124
- };
125
- walkDir(targetDir);
126
- }
127
- /**
128
- * Install required npm packages for a block
129
- */
130
- function installNpmPackages(packages) {
131
- if (packages.length === 0)
132
- return;
133
- // Get currently installed dependencies
134
- const { depsNames } = getCurrentInstalledDependencies();
135
- // Filter out already installed packages
136
- const packagesToInstall = packages.filter((pkg) => !depsNames.has(pkg));
137
- if (packagesToInstall.length === 0) {
138
- console.log("✅ All npm packages are already installed.");
139
- return;
140
- }
141
- const packageManager = detectPackageManager();
142
- const installCommand = getInstallCommand(packageManager, new Set(packagesToInstall));
143
- console.log(`📦 Installing npm packages using ${packageManager}:`, packagesToInstall.join(", "));
144
- try {
145
- execSync(installCommand, { stdio: "inherit" });
146
- console.log("✅ npm packages installed successfully.");
147
- }
148
- catch (error) {
149
- console.error("❌ Error installing npm packages:", error.message);
150
- }
151
- }
152
- /**
153
- * Install required components for a block
154
- */
155
- async function installBlockDependencies(blockName) {
156
- const deps = BLOCK_DEPENDENCIES[blockName];
157
- if (!deps)
158
- return;
159
- console.log("\n📦 Installing required components and packages...");
160
- // Install npm packages first
161
- installNpmPackages(deps.npmPackages);
162
- // Install utils
163
- for (const util of deps.utils) {
164
- await addUtil(`${util}.ts`);
165
- }
166
- // Install components
167
- for (const component of deps.components) {
168
- await add(`${component}.tsx`);
169
- }
170
- console.log("✅ Dependencies installed.\n");
171
- }
172
- /**
173
- * Main function to add a block and its dependencies.
174
- */
175
- export async function addBlock(block, replace = false) {
176
- const targetFile = getConfig(CONFIG_FILE);
177
- const availableBlocks = getAvailableBlocks();
178
- if (availableBlocks.length === 0) {
179
- console.error("❌ No blocks found in the template directory.");
180
- console.log("Blocks directory:", blocksTemplatesDir);
181
- return;
182
- }
183
- // If no block is provided, prompt the user to select one
184
- if (!block) {
185
- block = await promptBlockSelection(availableBlocks);
186
- }
187
- // Validate if the block exists in the blocks templates directory
188
- if (!availableBlocks.includes(block)) {
189
- console.error(`❌ Block "${block}" not found.`);
190
- console.log(`Available blocks: ${availableBlocks.join(", ")}`);
191
- return;
192
- }
193
- // Get source and target paths
194
- const source = path.join(blocksTemplatesDir, block);
195
- const targetDir = path.join(targetFile.path, "blocks", block);
196
- // Check if block already exists
197
- if (fs.existsSync(targetDir) && !replace) {
198
- const { shouldReplace } = await inquirer.prompt([
199
- {
200
- type: "confirm",
201
- name: "shouldReplace",
202
- message: `Block "${block}" already exists. Do you want to replace it?`,
203
- default: false,
204
- },
205
- ]);
206
- if (!shouldReplace) {
207
- console.log("⚠️ Installation cancelled.");
208
- return;
209
- }
210
- }
211
- console.log(`\n📦 Installing ${block} block...`);
212
- // Install required components first
213
- await installBlockDependencies(block);
214
- // Ensure the target directory exists
215
- ensureDirectoryExists(path.join(targetFile.path, "blocks"));
216
- // Copy the block directory
217
- copyBlockDirectory(source, targetDir);
218
- // Update import paths to use relative paths
219
- updateImportPaths(targetDir);
220
- console.log(`\n✅ ${block} has been added to ${targetFile.path}/blocks/${block}/`);
221
- console.log(`\n📖 Usage example:`);
222
- console.log(`
223
- import { DataViewPage } from "@/blocks/${block}";
224
-
225
- function MyPage() {
226
- return (
227
- <DataViewPage
228
- data={data}
229
- columns={columns}
230
- defaultView="table"
231
- >
232
- <DataViewPage.Toolbar>
233
- <DataViewPage.Search placeholder="Search..." />
234
- <DataViewPage.Filters>
235
- <DataViewPage.FilterItem field="status" label="Status" options={statusOptions} />
236
- </DataViewPage.Filters>
237
- <DataViewPage.ViewToggle views={["table", "cards", "kanban"]} />
238
- </DataViewPage.Toolbar>
239
-
240
- <DataViewPage.Content>
241
- <DataViewPage.TableView />
242
- <DataViewPage.CardsView />
243
- <DataViewPage.KanbanView groupByField="status" columns={kanbanColumns} />
244
- </DataViewPage.Content>
245
-
246
- <DataViewPage.Pagination />
247
- <DataViewPage.DetailDrawer>
248
- {(item) => <ItemDetails item={item} />}
249
- </DataViewPage.DetailDrawer>
250
- </DataViewPage>
251
- );
252
- }
253
- `);
254
- }
255
- //# sourceMappingURL=block.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.js","sourceRoot":"","sources":["../../../cli/src/commands/block.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAE/F,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,oDAAoD;AACpD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,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAE9D,gCAAgC;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACvC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YAC5C;gBACI,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,UAAU,KAAK,8CAA8C;gBACtE,OAAO,EAAE,KAAK;aACjB;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,OAAO;QACX,CAAC;IACL,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,WAAW,CAAC,CAAC;IAEjD,oCAAoC;IACpC,MAAM,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEtC,qCAAqC;IACrC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5D,2BAA2B;IAC3B,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEtC,4CAA4C;IAC5C,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAE7B,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,sBAAsB,UAAU,CAAC,IAAI,WAAW,KAAK,GAAG,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC;yCACyB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B7C,CAAC,CAAC;AACH,CAAC"}
@@ -1,6 +0,0 @@
1
- import { Framework } from "./detectFramework.js";
2
- /**
3
- * Configure font links in the project's layout or HTML file.
4
- */
5
- export declare function configureFonts(framework: Framework, defaults?: boolean): Promise<void>;
6
- //# sourceMappingURL=configureFonts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureFonts.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/configureFonts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAkB,MAAM,sBAAsB,CAAC;AAQjE;;GAEG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDnG"}
@@ -1,106 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import inquirer from "inquirer";
4
- import { findLayoutPath } from "./detectFramework.js";
5
- const FONT_LINKS = [
6
- `<link href="https://cdn.jsdelivr.net/npm/remixicon@4.5.0/fonts/remixicon.css" rel="stylesheet" />`,
7
- `<link rel="stylesheet" href="https://cdn.statically.io/gh/TORCH-Corp/SF-PRO-FONT/main/font/fonts.css" />`,
8
- `<link rel="preload" href="https://cdn.statically.io/gh/TORCH-Corp/SF-PRO-FONT/main/font/SF-Pro.woff2" as="font" type="font/woff2" crossOrigin="" />`,
9
- ];
10
- /**
11
- * Configure font links in the project's layout or HTML file.
12
- */
13
- export async function configureFonts(framework, defaults = false) {
14
- const layoutPath = findLayoutPath(framework);
15
- if (!layoutPath) {
16
- console.log(" ⚠️ Could not find layout file. Add font links manually:");
17
- printManualFontInstructions();
18
- return;
19
- }
20
- const fullPath = path.join(process.cwd(), layoutPath);
21
- const content = fs.readFileSync(fullPath, "utf-8");
22
- // Check if fonts are already added
23
- if (content.includes("remixicon") && content.includes("SF-PRO-FONT")) {
24
- console.log(` ✅ ${layoutPath} already has TORCH Glare font links`);
25
- return;
26
- }
27
- // Ask user (skip if defaults mode)
28
- if (!defaults) {
29
- const { shouldModify } = await inquirer.prompt([
30
- {
31
- type: "confirm",
32
- name: "shouldModify",
33
- message: `Add TORCH Glare font links (RemixIcon + SF Pro) to ${layoutPath}?`,
34
- default: true,
35
- },
36
- ]);
37
- if (!shouldModify) {
38
- console.log(" ⏭️ Skipped adding font links. Add them manually:");
39
- printManualFontInstructions();
40
- return;
41
- }
42
- }
43
- // Backup
44
- const backupPath = fullPath + ".bak";
45
- fs.copyFileSync(fullPath, backupPath);
46
- console.log(` 📋 Backup created: ${layoutPath}.bak`);
47
- // Inject based on file type
48
- if (layoutPath.endsWith(".html")) {
49
- injectIntoHtml(fullPath, content);
50
- }
51
- else {
52
- injectIntoJsxLayout(fullPath, content);
53
- }
54
- console.log(` ✅ Added font links to ${layoutPath}`);
55
- }
56
- /**
57
- * Inject font links into an HTML file (Vite/React).
58
- */
59
- function injectIntoHtml(filePath, content) {
60
- const indent = " ";
61
- const fontLinksStr = FONT_LINKS.map(link => `${indent}${link}`).join("\n");
62
- let modified;
63
- if (content.includes("</head>")) {
64
- modified = content.replace("</head>", `${fontLinksStr}\n </head>`);
65
- }
66
- else {
67
- // No </head> found, prepend
68
- modified = `<head>\n${fontLinksStr}\n</head>\n${content}`;
69
- }
70
- fs.writeFileSync(filePath, modified);
71
- }
72
- /**
73
- * Inject font links into a JSX/TSX layout file (Next.js App Router).
74
- */
75
- function injectIntoJsxLayout(filePath, content) {
76
- const indent = " ";
77
- const fontLinksJsx = FONT_LINKS.map(link => `${indent}${link}`).join("\n");
78
- let modified;
79
- // Try to find <head> tag in the JSX
80
- if (content.includes("<head>") || content.includes("<head ")) {
81
- // Insert after <head> opening tag
82
- modified = content.replace(/(<head[^>]*>)/, `$1\n${fontLinksJsx}`);
83
- }
84
- else if (content.includes("</head>")) {
85
- modified = content.replace("</head>", `${fontLinksJsx}\n${indent}</head>`);
86
- }
87
- else if (content.includes("<html")) {
88
- // Next.js layout without explicit <head> — add <head> tag
89
- modified = content.replace(/(<html[^>]*>)/, `$1\n <head>\n${fontLinksJsx}\n </head>`);
90
- }
91
- else {
92
- // Fallback: can't figure out where to inject
93
- console.log(" ⚠️ Could not determine injection point. Add font links manually:");
94
- printManualFontInstructions();
95
- return;
96
- }
97
- fs.writeFileSync(filePath, modified);
98
- }
99
- function printManualFontInstructions() {
100
- console.log("\n Add these to your <head>:");
101
- for (const link of FONT_LINKS) {
102
- console.log(` ${link}`);
103
- }
104
- console.log("");
105
- }
106
- //# sourceMappingURL=configureFonts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureFonts.js","sourceRoot":"","sources":["../../../cli/src/shared/configureFonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,UAAU,GAAG;IACf,mGAAmG;IACnG,0GAA0G;IAC1G,qJAAqJ;CACxJ,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,SAAoB,EAAE,WAAoB,KAAK;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAE7C,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;QAC1E,2BAA2B,EAAE,CAAC;QAC9B,OAAO;IACX,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEnD,mCAAmC;IACnC,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,OAAO,UAAU,qCAAqC,CAAC,CAAC;QACpE,OAAO;IACX,CAAC;IAED,mCAAmC;IACnC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAA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AAC,CAAC;IAC7C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { Framework } from "./detectFramework.js";
2
- /**
3
- * Configure the global CSS file based on Tailwind version.
4
- */
5
- export declare function configureGlobalCss(framework: Framework, tailwindVersion: 3 | 4, defaults?: boolean): Promise<string | null>;
6
- //# sourceMappingURL=configureGlobalCss.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureGlobalCss.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/configureGlobalCss.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAqB,MAAM,sBAAsB,CAAC;AAgBpE;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxI"}
@@ -1,154 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import inquirer from "inquirer";
4
- import { findGlobalCssPath } from "./detectFramework.js";
5
- const V4_PLUGIN_DIRECTIVES = `@import "tailwindcss";
6
- @import "mapping-color-system-v4/tailwindVars.css";
7
- @plugin "glare-torch-mode";
8
- @plugin "tailwind-scrollbar-hide";
9
- @plugin "tailwindcss-animate";
10
- @plugin "glare-typography";
11
- @plugin "mapping-color-system-v4";
12
- `;
13
- const V3_TAILWIND_DIRECTIVES = `@tailwind base;
14
- @tailwind components;
15
- @tailwind utilities;
16
- `;
17
- /**
18
- * Configure the global CSS file based on Tailwind version.
19
- */
20
- export async function configureGlobalCss(framework, tailwindVersion, defaults = false) {
21
- const existingCss = findGlobalCssPath(framework);
22
- if (tailwindVersion === 4) {
23
- return await configureV4Css(existingCss, framework, defaults);
24
- }
25
- else {
26
- return await configureV3Css(existingCss, framework, defaults);
27
- }
28
- }
29
- /**
30
- * Configure global CSS for Tailwind v4 (add @plugin directives).
31
- */
32
- async function configureV4Css(existingCss, framework, defaults = false) {
33
- if (!existingCss) {
34
- // Create new CSS file
35
- const cssPath = framework === "next" ? "app/globals.css" : "src/index.css";
36
- const fullPath = path.join(process.cwd(), cssPath);
37
- ensureDir(path.dirname(fullPath));
38
- fs.writeFileSync(fullPath, V4_PLUGIN_DIRECTIVES + "\n");
39
- console.log(` ✅ Created ${cssPath} with Tailwind v4 plugin directives`);
40
- return cssPath;
41
- }
42
- // Check if already configured
43
- const fullPath = path.join(process.cwd(), existingCss);
44
- const content = fs.readFileSync(fullPath, "utf-8");
45
- if (content.includes("glare-torch-mode")) {
46
- console.log(` ✅ ${existingCss} already has TORCH Glare plugins`);
47
- return existingCss;
48
- }
49
- // Ask user (skip if defaults mode)
50
- if (!defaults) {
51
- const { shouldModify } = await inquirer.prompt([
52
- {
53
- type: "confirm",
54
- name: "shouldModify",
55
- message: `${existingCss} exists. Add TORCH Glare v4 plugin directives?`,
56
- default: true,
57
- },
58
- ]);
59
- if (!shouldModify) {
60
- console.log(` ⏭️ Skipped modifying ${existingCss}`);
61
- return existingCss;
62
- }
63
- }
64
- // Backup and modify
65
- const backupPath = fullPath + ".bak";
66
- fs.copyFileSync(fullPath, backupPath);
67
- console.log(` 📋 Backup created: ${existingCss}.bak`);
68
- // Build the directives to add (only missing ones)
69
- const lines = V4_PLUGIN_DIRECTIVES.split("\n").filter(line => line.trim());
70
- const missingLines = lines.filter(line => !content.includes(line.trim()));
71
- if (missingLines.length > 0) {
72
- // Split missing lines into groups to maintain correct CSS order:
73
- // @import "tailwindcss" must come first, then other @imports, then @plugins
74
- const missingTailwindImport = missingLines.filter(l => l.startsWith("@import") && l.includes('"tailwindcss"'));
75
- const missingImports = missingLines.filter(l => l.startsWith("@import") && !l.includes('"tailwindcss"'));
76
- const missingPlugins = missingLines.filter(l => l.startsWith("@plugin"));
77
- let modified = content;
78
- const hasTailwindImport = content.includes('@import "tailwindcss"') || content.includes("@import 'tailwindcss'");
79
- if (hasTailwindImport) {
80
- // Add @import lines right after the tailwindcss import
81
- if (missingImports.length > 0) {
82
- modified = modified.replace(/(@import\s+["']tailwindcss["'];?\s*\n?)/, `$1${missingImports.join("\n")}\n`);
83
- }
84
- // Add @plugin lines after all @import lines
85
- if (missingPlugins.length > 0) {
86
- const lastImportMatch = modified.match(/.*@import[^\n]*\n/g);
87
- if (lastImportMatch && lastImportMatch.length > 0) {
88
- const lastImport = lastImportMatch[lastImportMatch.length - 1];
89
- modified = modified.replace(lastImport, `${lastImport}${missingPlugins.join("\n")}\n`);
90
- }
91
- else {
92
- modified = missingPlugins.join("\n") + "\n" + modified;
93
- }
94
- }
95
- }
96
- else {
97
- // No tailwindcss import — prepend all directives in correct order:
98
- // @import "tailwindcss" first, then other @imports, then @plugins
99
- const allDirectives = [...missingTailwindImport, ...missingImports, ...missingPlugins];
100
- modified = allDirectives.join("\n") + "\n\n" + content;
101
- }
102
- fs.writeFileSync(fullPath, modified);
103
- }
104
- console.log(` ✅ Updated ${existingCss} with Tailwind v4 plugin directives`);
105
- return existingCss;
106
- }
107
- /**
108
- * Configure global CSS for Tailwind v3 (ensure @tailwind directives exist).
109
- */
110
- async function configureV3Css(existingCss, framework, defaults = false) {
111
- if (!existingCss) {
112
- // Create new CSS file
113
- const cssPath = framework === "next" ? "app/globals.css" : "src/index.css";
114
- const fullPath = path.join(process.cwd(), cssPath);
115
- ensureDir(path.dirname(fullPath));
116
- fs.writeFileSync(fullPath, V3_TAILWIND_DIRECTIVES + "\n");
117
- console.log(` ✅ Created ${cssPath} with Tailwind v3 directives`);
118
- return cssPath;
119
- }
120
- // Check if @tailwind directives already exist
121
- const fullPath = path.join(process.cwd(), existingCss);
122
- const content = fs.readFileSync(fullPath, "utf-8");
123
- if (content.includes("@tailwind base")) {
124
- console.log(` ✅ ${existingCss} already has Tailwind directives`);
125
- return existingCss;
126
- }
127
- // Ask user (skip if defaults mode)
128
- if (!defaults) {
129
- const { shouldModify } = await inquirer.prompt([
130
- {
131
- type: "confirm",
132
- name: "shouldModify",
133
- message: `${existingCss} exists but missing @tailwind directives. Add them?`,
134
- default: true,
135
- },
136
- ]);
137
- if (!shouldModify) {
138
- return existingCss;
139
- }
140
- }
141
- // Backup and prepend
142
- const backupPath = fullPath + ".bak";
143
- fs.copyFileSync(fullPath, backupPath);
144
- console.log(` 📋 Backup created: ${existingCss}.bak`);
145
- fs.writeFileSync(fullPath, V3_TAILWIND_DIRECTIVES + "\n" + content);
146
- console.log(` ✅ Updated ${existingCss} with Tailwind v3 directives`);
147
- return existingCss;
148
- }
149
- function ensureDir(dirPath) {
150
- if (!fs.existsSync(dirPath)) {
151
- fs.mkdirSync(dirPath, { recursive: true });
152
- }
153
- }
154
- //# sourceMappingURL=configureGlobalCss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureGlobalCss.js","sourceRoot":"","sources":["../../../cli/src/shared/configureGlobalCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAa,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;CAO5B,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;CAG9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,SAAoB,EAAE,eAAsB,EAAE,WAAoB,KAAK;IAC5G,MAAM,WAAW,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAEjD,IAAI,eAAe,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,MAAM,cAAc,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACJ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O,EAAE,GAAG,WAAW,qDAAqD;gBAC5E,OAAO,EAAE,IAAI;aAChB;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,EAAE,CAAC;YAChB,OAAO,WAAW,CAAC;QACvB,CAAC;IACL,CAAC;IAED,qBAAqB;IACrB,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,wBAAwB,WAAW,MAAM,CAAC,CAAC;IAEvD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,eAAe,WAAW,8BAA8B,CAAC,CAAC;IACtE,OAAO,WAAW,CAAC;AACvB,CAAC;AAED,SAAS,SAAS,CAAC,OAAe;IAC9B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Configure Tailwind CSS for v3 projects.
3
- * If no config exists, creates one from template.
4
- * If config exists, asks the user then injects TORCH plugins.
5
- */
6
- export declare function configureTailwindV3(basePath: string, defaults?: boolean): Promise<string>;
7
- //# sourceMappingURL=configureTailwind.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureTailwind.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/configureTailwind.ts"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA2CtG"}