torch-glare 2.4.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.
- package/README.md +8 -0
- package/apps/lib/components/ActionButton.tsx +7 -12
- package/apps/lib/components/ActionsGroup.tsx +4 -15
- package/apps/lib/components/AlertDialog.tsx +173 -191
- package/apps/lib/components/Avatar.tsx +13 -16
- package/apps/lib/components/Badge.tsx +1 -3
- package/apps/lib/components/BadgeField.tsx +76 -71
- package/apps/lib/components/Breadcrumb.tsx +49 -85
- package/apps/lib/components/Button.tsx +20 -19
- package/apps/lib/components/ButtonGroup.tsx +31 -41
- package/apps/lib/components/Calendar.tsx +51 -29
- package/apps/lib/components/Card.tsx +2 -13
- package/apps/lib/components/ChartBlockTool.ts +17 -52
- package/apps/lib/components/Checkbox.tsx +9 -16
- package/apps/lib/components/ContextMenu.tsx +97 -96
- package/apps/lib/components/CountBadge.tsx +4 -6
- package/apps/lib/components/DataTable.tsx +196 -216
- package/apps/lib/components/DataViews/DataViewRadio.tsx +1 -6
- package/apps/lib/components/DataViews/DataViewsConfigPanel.tsx +13 -47
- package/apps/lib/components/DataViews/DataViewsHeader.tsx +1 -3
- package/apps/lib/components/DataViews/DataViewsLayout.tsx +5 -12
- package/apps/lib/components/DataViews/FilterPanel.tsx +155 -149
- package/apps/lib/components/DataViews/HeaderSearch.tsx +1 -5
- package/apps/lib/components/DataViews/InboxView.tsx +22 -68
- package/apps/lib/components/DataViews/InboxViewCard.tsx +68 -77
- package/apps/lib/components/DataViews/KanbanView.tsx +8 -25
- package/apps/lib/components/DataViews/PanelControls.tsx +3 -13
- package/apps/lib/components/DataViews/SettingsPanel.tsx +83 -89
- package/apps/lib/components/DataViews/TableView.tsx +8 -28
- package/apps/lib/components/DataViews/TreeView.tsx +12 -40
- package/apps/lib/components/DataViews/badgeAdapter.ts +32 -28
- package/apps/lib/components/DataViews/fieldRenderers.tsx +106 -141
- package/apps/lib/components/DataViews/filters/DatePickerRangeFilter.tsx +30 -23
- package/apps/lib/components/DataViews/filters/DateRangePopover.tsx +39 -32
- package/apps/lib/components/DataViews/filters/PresetChips.tsx +15 -15
- package/apps/lib/components/DataViews/filters/RangeSliderWithInputs.tsx +69 -58
- package/apps/lib/components/DataViews/index.ts +26 -26
- package/apps/lib/components/DataViews/tree/TreeDrawer.tsx +12 -16
- package/apps/lib/components/DataViews/tree/TreeSidebar.tsx +28 -31
- package/apps/lib/components/DataViews/types.ts +104 -115
- package/apps/lib/components/DatePicker.tsx +198 -196
- package/apps/lib/components/Dialog.tsx +92 -105
- package/apps/lib/components/Divider.tsx +21 -24
- package/apps/lib/components/Drawer.tsx +79 -139
- package/apps/lib/components/DropdownMenu.tsx +131 -171
- package/apps/lib/components/FieldHint.tsx +4 -11
- package/apps/lib/components/Form.tsx +146 -155
- package/apps/lib/components/FormStepper.tsx +9 -39
- package/apps/lib/components/HeaderBar.tsx +1 -9
- package/apps/lib/components/ImageAttachment.tsx +111 -73
- package/apps/lib/components/InnerLabelField.tsx +20 -16
- package/apps/lib/components/Input.tsx +171 -172
- package/apps/lib/components/InputField.tsx +44 -45
- package/apps/lib/components/InputOTP.tsx +68 -69
- package/apps/lib/components/Label.tsx +31 -35
- package/apps/lib/components/LabelField.tsx +4 -5
- package/apps/lib/components/LabeledCheckBox.tsx +8 -12
- package/apps/lib/components/LabeledRadio.tsx +7 -5
- package/apps/lib/components/LinkButton.tsx +2 -9
- package/apps/lib/components/LoginButton.tsx +4 -9
- package/apps/lib/components/PasswordLevel.tsx +5 -5
- package/apps/lib/components/Popover.tsx +15 -33
- package/apps/lib/components/ProfileMenu.tsx +67 -72
- package/apps/lib/components/Radio.tsx +1 -5
- package/apps/lib/components/RadioCard.tsx +9 -28
- package/apps/lib/components/ScrollArea.tsx +45 -43
- package/apps/lib/components/SearchField.tsx +49 -39
- package/apps/lib/components/SearchableSelect.tsx +8 -14
- package/apps/lib/components/SearchableTable.tsx +108 -118
- package/apps/lib/components/SearchableTree.tsx +469 -0
- package/apps/lib/components/SearchableTreeDialog.tsx +493 -0
- package/apps/lib/components/SectionBlock.tsx +4 -16
- package/apps/lib/components/Select.tsx +53 -80
- package/apps/lib/components/SimpleSelect.tsx +196 -187
- package/apps/lib/components/Skeleton.tsx +9 -12
- package/apps/lib/components/SlideDatePicker.tsx +215 -166
- package/apps/lib/components/SpinLoading.tsx +33 -49
- package/apps/lib/components/Stepper.tsx +13 -56
- package/apps/lib/components/Switch.tsx +8 -10
- package/apps/lib/components/TabFormItem.tsx +3 -12
- package/apps/lib/components/TabSwitch.tsx +7 -34
- package/apps/lib/components/Table.tsx +60 -75
- package/apps/lib/components/TableDnDWrapper.ts +15 -48
- package/apps/lib/components/TextEditor.tsx +93 -104
- package/apps/lib/components/Textarea.tsx +8 -12
- package/apps/lib/components/Timeline.tsx +21 -41
- package/apps/lib/components/Toast.tsx +83 -83
- package/apps/lib/components/Toggle.tsx +112 -114
- package/apps/lib/components/ToggleButton.tsx +1 -1
- package/apps/lib/components/Tooltip.tsx +24 -19
- package/apps/lib/components/TransparentLabel.tsx +61 -62
- package/apps/lib/components/TreeDropDown.tsx +86 -52
- package/apps/lib/components/TreeFolder/TreeFolder.tsx +15 -48
- package/apps/lib/components/TreeFolder/TreeFolderBreadcrumb.tsx +16 -21
- package/apps/lib/components/TreeFolder/TreeFolderRow.tsx +9 -20
- package/apps/lib/components/TreeFolder/TreeFolderStyles.tsx +3 -3
- package/apps/lib/components/TreeFolder/icons.tsx +14 -17
- package/apps/lib/components/TreeFolder/index.ts +15 -8
- package/apps/lib/components/TreeFolder/treeFolderUtils.ts +47 -52
- package/apps/lib/components/TreeFolder/types.ts +32 -32
- package/apps/lib/components/TreeFolder/useTreeFolderDnD.ts +117 -123
- package/apps/lib/hooks/useActiveTreeItem.ts +52 -55
- package/apps/lib/hooks/useClickOutside.ts +21 -20
- package/apps/lib/hooks/useDataViewsState.ts +86 -80
- package/apps/lib/hooks/useIsMobile.ts +12 -12
- package/apps/lib/hooks/useResize.ts +54 -65
- package/apps/lib/hooks/useTagSelection.ts +201 -201
- package/apps/lib/layouts/CNLayout.tsx +181 -140
- package/apps/lib/layouts/DataViewCard.tsx +4 -18
- package/apps/lib/layouts/FieldSection.tsx +2 -6
- package/apps/lib/layouts/TreeSubLayout.tsx +24 -38
- package/apps/lib/providers/ThemeProvider.tsx +8 -23
- package/apps/lib/registry.json +1004 -0
- package/apps/lib/tsconfig.json +9 -0
- package/apps/lib/utils/cn.ts +1 -1
- package/apps/lib/utils/dataViews/columnUtils.ts +46 -44
- package/apps/lib/utils/dataViews/fieldUtils.ts +70 -71
- package/apps/lib/utils/dataViews/nestedDataUtils.tsx +129 -122
- package/apps/lib/utils/dataViews/pathUtils.ts +74 -67
- package/apps/lib/utils/dataViews/rangeUtils.ts +121 -112
- package/apps/lib/utils/dataViews/treeUtils.ts +204 -211
- package/apps/lib/utils/dateFormat.ts +64 -54
- package/apps/lib/utils/markdownParser.ts +2 -7
- package/apps/lib/utils/resize.ts +21 -25
- package/apps/lib/utils/types.ts +13 -13
- package/dist/bin/index.js +8 -2
- package/dist/bin/index.js.map +1 -1
- package/dist/src/shared/getAvailableFiles.d.ts.map +1 -1
- package/dist/src/shared/getAvailableFiles.js +6 -1
- package/dist/src/shared/getAvailableFiles.js.map +1 -1
- package/dist/src/shared/loadRegistry.d.ts +7 -0
- package/dist/src/shared/loadRegistry.d.ts.map +1 -0
- package/dist/src/shared/loadRegistry.js +31 -0
- package/dist/src/shared/loadRegistry.js.map +1 -0
- package/dist/src/shared/resolveInstallPlan.d.ts +12 -0
- package/dist/src/shared/resolveInstallPlan.d.ts.map +1 -0
- package/dist/src/shared/resolveInstallPlan.js +39 -0
- package/dist/src/shared/resolveInstallPlan.js.map +1 -0
- package/dist/src/types/main.d.ts +24 -0
- package/dist/src/types/main.d.ts.map +1 -1
- package/docs/README.md +10 -2
- package/docs/components/action-button.md +30 -24
- package/docs/components/actions-group.md +26 -20
- package/docs/components/alert-dialog.md +45 -45
- package/docs/components/avatar.md +6 -2
- package/docs/components/badge-field.md +6 -2
- package/docs/components/badge.md +7 -1
- package/docs/components/breadcrumb.md +15 -40
- package/docs/components/button-group.md +13 -10
- package/docs/components/button.md +58 -33
- package/docs/components/calendar.md +26 -19
- package/docs/components/card.md +19 -16
- package/docs/components/chart-block-tool.md +128 -0
- package/docs/components/checkbox.md +16 -8
- package/docs/components/cn-layout.md +7 -1
- package/docs/components/context-menu.md +18 -25
- package/docs/components/count-badge.md +7 -1
- package/docs/components/data-table.md +45 -33
- package/docs/components/data-views-config-panel.md +15 -11
- package/docs/components/data-views-layout.md +13 -16
- package/docs/components/date-picker.md +30 -23
- package/docs/components/dialog.md +43 -42
- package/docs/components/divider.md +10 -4
- package/docs/components/drawer.md +8 -33
- package/docs/components/dropdown-menu.md +25 -34
- package/docs/components/field-hint.md +37 -25
- package/docs/components/field-section.md +9 -3
- package/docs/components/form-stepper.md +6 -0
- package/docs/components/form.md +17 -20
- package/docs/components/header-bar.md +6 -0
- package/docs/components/image-attachment.md +33 -41
- package/docs/components/inbox-view.md +16 -5
- package/docs/components/inner-label-field.md +34 -24
- package/docs/components/input-field.md +18 -10
- package/docs/components/input-otp.md +14 -11
- package/docs/components/input.md +22 -16
- package/docs/components/kanban-view.md +15 -5
- package/docs/components/label-field.md +32 -22
- package/docs/components/label.md +43 -32
- package/docs/components/labeled-check-box.md +16 -8
- package/docs/components/labeled-radio.md +18 -11
- package/docs/components/link-button.md +7 -1
- package/docs/components/login-button.md +8 -2
- package/docs/components/password-level.md +37 -24
- package/docs/components/popover.md +26 -23
- package/docs/components/profile-menu.md +38 -27
- package/docs/components/radio-card.md +16 -9
- package/docs/components/radio.md +16 -8
- package/docs/components/scroll-area.md +6 -2
- package/docs/components/search-field.md +14 -6
- package/docs/components/searchable-select.md +19 -14
- package/docs/components/searchable-table.md +18 -13
- package/docs/components/searchable-tree-dialog.md +190 -0
- package/docs/components/searchable-tree.md +200 -0
- package/docs/components/section-block.md +12 -4
- package/docs/components/select.md +23 -18
- package/docs/components/simple-select.md +14 -10
- package/docs/components/skeleton.md +43 -33
- package/docs/components/slide-date-picker.md +37 -29
- package/docs/components/spin-loading.md +32 -23
- package/docs/components/stepper.md +6 -0
- package/docs/components/switch.md +14 -6
- package/docs/components/tab-form-item.md +7 -1
- package/docs/components/tab-switch.md +13 -6
- package/docs/components/table-dnd-wrapper.md +105 -0
- package/docs/components/table-view.md +15 -5
- package/docs/components/table.md +28 -28
- package/docs/components/text-editor.md +19 -13
- package/docs/components/textarea.md +15 -7
- package/docs/components/timeline.md +6 -0
- package/docs/components/toast.md +35 -26
- package/docs/components/toggle-button.md +24 -21
- package/docs/components/toggle.md +23 -15
- package/docs/components/tooltip.md +42 -30
- package/docs/components/transparent-label.md +29 -20
- package/docs/components/tree-drop-down.md +31 -23
- package/docs/components/tree-sub-layout.md +6 -2
- package/docs/components/tree-view.md +16 -5
- package/docs/explanation/architecture.md +54 -0
- package/docs/explanation/design-system.md +52 -0
- package/docs/how-to/data-views-from-backend-response.md +6 -4
- package/docs/how-to/guides.md +24 -18
- package/docs/migration/changelog.md +38 -0
- package/docs/reference/cli.md +87 -0
- package/docs/reference/components.md +11 -12
- package/docs/reference/hooks.md +8 -8
- package/docs/reference/providers.md +22 -22
- package/docs/reference/tailwind-plugins.md +2 -2
- package/docs/reference/theme.md +85 -0
- package/docs/reference/types.md +4 -4
- package/docs/reference/utilities.md +19 -26
- package/docs/tutorials/building-first-form.md +20 -13
- package/docs/tutorials/component-composition.md +34 -50
- package/docs/tutorials/getting-started.md +2 -2
- package/docs/tutorials/theming-basics.md +13 -10
- package/package.json +31 -3
- package/dist/src/commands/block.d.ts +0 -5
- package/dist/src/commands/block.d.ts.map +0 -1
- package/dist/src/commands/block.js +0 -255
- package/dist/src/commands/block.js.map +0 -1
- package/dist/src/shared/configureFonts.d.ts +0 -6
- package/dist/src/shared/configureFonts.d.ts.map +0 -1
- package/dist/src/shared/configureFonts.js +0 -106
- package/dist/src/shared/configureFonts.js.map +0 -1
- package/dist/src/shared/configureGlobalCss.d.ts +0 -6
- package/dist/src/shared/configureGlobalCss.d.ts.map +0 -1
- package/dist/src/shared/configureGlobalCss.js +0 -154
- package/dist/src/shared/configureGlobalCss.js.map +0 -1
- package/dist/src/shared/configureTailwind.d.ts +0 -7
- package/dist/src/shared/configureTailwind.d.ts.map +0 -1
- package/dist/src/shared/configureTailwind.js +0 -163
- package/dist/src/shared/configureTailwind.js.map +0 -1
- package/dist/src/shared/detectFramework.d.ts +0 -23
- package/dist/src/shared/detectFramework.d.ts.map +0 -1
- package/dist/src/shared/detectFramework.js +0 -119
- package/dist/src/shared/detectFramework.js.map +0 -1
- package/dist/src/shared/installBaseUtils.d.ts +0 -5
- package/dist/src/shared/installBaseUtils.d.ts.map +0 -1
- package/dist/src/shared/installBaseUtils.js +0 -79
- package/dist/src/shared/installBaseUtils.js.map +0 -1
- package/dist/src/shared/resolveAliases.d.ts +0 -24
- package/dist/src/shared/resolveAliases.d.ts.map +0 -1
- package/dist/src/shared/resolveAliases.js +0 -98
- package/dist/src/shared/resolveAliases.js.map +0 -1
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import inquirer from "inquirer";
|
|
4
|
-
import { findTailwindConfigPath } from "./detectFramework.js";
|
|
5
|
-
const TAILWIND_V3_TEMPLATE = (contentPaths) => `\
|
|
6
|
-
const { plugin, mappingVars } = require('mapping-color-system')
|
|
7
|
-
import type { Config } from "tailwindcss";
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
content: [
|
|
11
|
-
${contentPaths.map(p => ` "${p}",`).join("\n")}
|
|
12
|
-
],
|
|
13
|
-
theme: {
|
|
14
|
-
extend: {
|
|
15
|
-
colors: {
|
|
16
|
-
...mappingVars,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
plugins: [
|
|
21
|
-
plugin,
|
|
22
|
-
require('tailwindcss-animate'),
|
|
23
|
-
require('tailwind-scrollbar-hide'),
|
|
24
|
-
require('glare-typography'),
|
|
25
|
-
require('glare-torch-mode'),
|
|
26
|
-
function ({ addVariant }: any) {
|
|
27
|
-
addVariant("rtl", '&[dir="rtl"]');
|
|
28
|
-
addVariant("ltr", '&[dir="ltr"]');
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
} satisfies Config;
|
|
32
|
-
`;
|
|
33
|
-
/**
|
|
34
|
-
* Configure Tailwind CSS for v3 projects.
|
|
35
|
-
* If no config exists, creates one from template.
|
|
36
|
-
* If config exists, asks the user then injects TORCH plugins.
|
|
37
|
-
*/
|
|
38
|
-
export async function configureTailwindV3(basePath, defaults = false) {
|
|
39
|
-
const existingConfig = findTailwindConfigPath();
|
|
40
|
-
const contentPaths = buildContentPaths(basePath);
|
|
41
|
-
if (!existingConfig) {
|
|
42
|
-
// Create new config
|
|
43
|
-
const configPath = "tailwind.config.ts";
|
|
44
|
-
const fullPath = path.join(process.cwd(), configPath);
|
|
45
|
-
fs.writeFileSync(fullPath, TAILWIND_V3_TEMPLATE(contentPaths));
|
|
46
|
-
console.log(` ✅ Created ${configPath}`);
|
|
47
|
-
return configPath;
|
|
48
|
-
}
|
|
49
|
-
// Config exists - ask user (skip if defaults mode)
|
|
50
|
-
if (!defaults) {
|
|
51
|
-
const { shouldModify } = await inquirer.prompt([
|
|
52
|
-
{
|
|
53
|
-
type: "confirm",
|
|
54
|
-
name: "shouldModify",
|
|
55
|
-
message: `${existingConfig} already exists. Add TORCH Glare plugins to it?`,
|
|
56
|
-
default: true,
|
|
57
|
-
},
|
|
58
|
-
]);
|
|
59
|
-
if (!shouldModify) {
|
|
60
|
-
console.log(` ⏭️ Skipped modifying ${existingConfig}`);
|
|
61
|
-
return existingConfig;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// Create backup
|
|
65
|
-
const fullPath = path.join(process.cwd(), existingConfig);
|
|
66
|
-
const backupPath = fullPath + ".bak";
|
|
67
|
-
fs.copyFileSync(fullPath, backupPath);
|
|
68
|
-
console.log(` 📋 Backup created: ${existingConfig}.bak`);
|
|
69
|
-
// Inject into existing config
|
|
70
|
-
const content = fs.readFileSync(fullPath, "utf-8");
|
|
71
|
-
const modified = injectIntoTailwindConfig(content, contentPaths);
|
|
72
|
-
fs.writeFileSync(fullPath, modified);
|
|
73
|
-
console.log(` ✅ Updated ${existingConfig} with TORCH Glare plugins`);
|
|
74
|
-
return existingConfig;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Inject TORCH Glare plugins into an existing Tailwind v3 config.
|
|
78
|
-
*/
|
|
79
|
-
function injectIntoTailwindConfig(content, contentPaths) {
|
|
80
|
-
let result = content;
|
|
81
|
-
// Check what's missing based on original content before any modifications
|
|
82
|
-
const needsImport = !content.includes("mapping-color-system");
|
|
83
|
-
const needsMappingVars = !content.includes("...mappingVars");
|
|
84
|
-
// Add mapping-color-system import at the top if not present
|
|
85
|
-
if (needsImport) {
|
|
86
|
-
result = `const { plugin, mappingVars } = require('mapping-color-system')\n${result}`;
|
|
87
|
-
}
|
|
88
|
-
// Add mappingVars to theme.extend.colors if not already spread in colors
|
|
89
|
-
if (needsMappingVars) {
|
|
90
|
-
// Try to find theme.extend.colors
|
|
91
|
-
if (result.includes("extend:")) {
|
|
92
|
-
if (result.includes("colors:")) {
|
|
93
|
-
// Add mappingVars spread into existing colors
|
|
94
|
-
result = result.replace(/(colors:\s*\{)/, "$1\n ...mappingVars,");
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
// Replace empty extend: {} or add colors into extend
|
|
98
|
-
result = result.replace(/extend:\s*\{\s*\}/, "extend: {\n colors: {\n ...mappingVars,\n },\n }");
|
|
99
|
-
// If extend wasn't empty (no replacement happened), inject inside it
|
|
100
|
-
if (!result.includes("...mappingVars")) {
|
|
101
|
-
result = result.replace(/(extend:\s*\{)/, "$1\n colors: {\n ...mappingVars,\n },");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else if (result.includes("theme:")) {
|
|
106
|
-
result = result.replace(/(theme:\s*\{)/, "$1\n extend: {\n colors: {\n ...mappingVars,\n },\n },");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
// Add plugins if not present (check against original content to avoid false positives)
|
|
110
|
-
const pluginsToAdd = [
|
|
111
|
-
{ check: "mapping-color-system", value: "plugin" },
|
|
112
|
-
{ check: "tailwindcss-animate", value: "require('tailwindcss-animate')" },
|
|
113
|
-
{ check: "tailwind-scrollbar-hide", value: "require('tailwind-scrollbar-hide')" },
|
|
114
|
-
{ check: "glare-typography", value: "require('glare-typography')" },
|
|
115
|
-
{ check: "glare-torch-mode", value: "require('glare-torch-mode')" },
|
|
116
|
-
];
|
|
117
|
-
const rtlVariant = `function ({ addVariant }: any) {
|
|
118
|
-
addVariant("rtl", '&[dir="rtl"]');
|
|
119
|
-
addVariant("ltr", '&[dir="ltr"]');
|
|
120
|
-
}`;
|
|
121
|
-
if (result.includes("plugins:") || result.includes("plugins :")) {
|
|
122
|
-
// Insert missing plugins into existing plugins array
|
|
123
|
-
// Use original content for checks to avoid false positives from added require()
|
|
124
|
-
for (const p of pluginsToAdd) {
|
|
125
|
-
if (!content.includes(p.check)) {
|
|
126
|
-
result = result.replace(/(plugins:\s*\[)/, `$1\n ${p.value},`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
// Add RTL/LTR variant if not present
|
|
130
|
-
if (!content.includes("addVariant")) {
|
|
131
|
-
result = result.replace(/(plugins:\s*\[[\s\S]*?)(]\s*[,}])/, `$1\n ${rtlVariant},\n $2`);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
// Add plugins array before the closing of the config
|
|
136
|
-
const allPlugins = pluginsToAdd.map(p => ` ${p.value},`).join("\n");
|
|
137
|
-
result = result.replace(/}(\s*satisfies|\s*as|\s*;|\s*$)/, ` plugins: [\n${allPlugins}\n ${rtlVariant},\n ],\n}$1`);
|
|
138
|
-
}
|
|
139
|
-
// Add content paths if the component path is missing
|
|
140
|
-
for (const cp of contentPaths) {
|
|
141
|
-
if (!result.includes(cp)) {
|
|
142
|
-
if (result.includes("content:")) {
|
|
143
|
-
result = result.replace(/(content:\s*\[)/, `$1\n "${cp}",`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return result;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Build content paths based on the base installation path.
|
|
151
|
-
*/
|
|
152
|
-
function buildContentPaths(basePath) {
|
|
153
|
-
const normalized = basePath.replace(/^\.\//, "").replace(/\/$/, "");
|
|
154
|
-
const paths = [
|
|
155
|
-
`./${normalized}/**/*.{js,ts,jsx,tsx}`,
|
|
156
|
-
];
|
|
157
|
-
// Add common patterns
|
|
158
|
-
if (!normalized.includes("app")) {
|
|
159
|
-
paths.push("./app/**/*.{js,ts,jsx,tsx}");
|
|
160
|
-
}
|
|
161
|
-
return paths;
|
|
162
|
-
}
|
|
163
|
-
//# sourceMappingURL=configureTailwind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configureTailwind.js","sourceRoot":"","sources":["../../../cli/src/shared/configureTailwind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,oBAAoB,GAAG,CAAC,YAAsB,EAAE,EAAE,CAAC;;;;;;EAMvD,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;CAqBhD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,QAAgB,EAAE,WAAoB,KAAK;IACj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C,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,GAAG,MAAM,CAAC,OAAO,CACnB,iCAAiC,EACjC,iBAAiB,UAAU,SAAS,UAAU,cAAc,CAC/D,CAAC;IACN,CAAC;IAED,qDAAqD;IACrD,KAAK,MAAM,EAAE,IAAI,YAAY,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;YACvB,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9B,MAAM,GAAG,MAAM,CAAC,OAAO,CACnB,iBAAiB,EACjB,YAAY,EAAE,IAAI,CACrB,CAAC;YACN,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACvC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG;QACV,KAAK,UAAU,uBAAuB;KACzC,CAAC;IAEF,sBAAsB;IACtB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type Framework = "next" | "vite" | "react" | "unknown";
|
|
2
|
-
/**
|
|
3
|
-
* Detect the framework used in the project by checking package.json dependencies.
|
|
4
|
-
*/
|
|
5
|
-
export declare function detectFramework(): Framework;
|
|
6
|
-
/**
|
|
7
|
-
* Detect if the project uses Tailwind CSS v3 (returns true) or v4+ (returns false).
|
|
8
|
-
* Returns null if Tailwind is not installed.
|
|
9
|
-
*/
|
|
10
|
-
export declare function detectTailwindVersion(): 3 | 4 | null;
|
|
11
|
-
/**
|
|
12
|
-
* Find the global CSS file in the project.
|
|
13
|
-
*/
|
|
14
|
-
export declare function findGlobalCssPath(framework: Framework): string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Find the Tailwind config file path.
|
|
17
|
-
*/
|
|
18
|
-
export declare function findTailwindConfigPath(): string | null;
|
|
19
|
-
/**
|
|
20
|
-
* Find the layout/HTML file where font links should be injected.
|
|
21
|
-
*/
|
|
22
|
-
export declare function findLayoutPath(framework: Framework): string | null;
|
|
23
|
-
//# sourceMappingURL=detectFramework.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detectFramework.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/detectFramework.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAkB3C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAqBpD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAuBrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAetD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CA6BlE"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
/**
|
|
4
|
-
* Detect the framework used in the project by checking package.json dependencies.
|
|
5
|
-
*/
|
|
6
|
-
export function detectFramework() {
|
|
7
|
-
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
8
|
-
if (!fs.existsSync(packageJsonPath)) {
|
|
9
|
-
return "unknown";
|
|
10
|
-
}
|
|
11
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
12
|
-
const allDeps = {
|
|
13
|
-
...(packageJson.dependencies || {}),
|
|
14
|
-
...(packageJson.devDependencies || {}),
|
|
15
|
-
};
|
|
16
|
-
if (allDeps["next"])
|
|
17
|
-
return "next";
|
|
18
|
-
if (allDeps["vite"])
|
|
19
|
-
return "vite";
|
|
20
|
-
if (allDeps["react"])
|
|
21
|
-
return "react";
|
|
22
|
-
return "unknown";
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Detect if the project uses Tailwind CSS v3 (returns true) or v4+ (returns false).
|
|
26
|
-
* Returns null if Tailwind is not installed.
|
|
27
|
-
*/
|
|
28
|
-
export function detectTailwindVersion() {
|
|
29
|
-
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
30
|
-
if (!fs.existsSync(packageJsonPath)) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
34
|
-
const allDeps = {
|
|
35
|
-
...(packageJson.dependencies || {}),
|
|
36
|
-
...(packageJson.devDependencies || {}),
|
|
37
|
-
};
|
|
38
|
-
const tailwindVersion = allDeps["tailwindcss"];
|
|
39
|
-
if (!tailwindVersion)
|
|
40
|
-
return null;
|
|
41
|
-
if (tailwindVersion.startsWith("^3") || tailwindVersion.startsWith("3") || tailwindVersion.startsWith("~3")) {
|
|
42
|
-
return 3;
|
|
43
|
-
}
|
|
44
|
-
return 4;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Find the global CSS file in the project.
|
|
48
|
-
*/
|
|
49
|
-
export function findGlobalCssPath(framework) {
|
|
50
|
-
const candidates = framework === "next"
|
|
51
|
-
? [
|
|
52
|
-
"app/globals.css",
|
|
53
|
-
"src/app/globals.css",
|
|
54
|
-
"styles/globals.css",
|
|
55
|
-
"src/styles/globals.css",
|
|
56
|
-
]
|
|
57
|
-
: [
|
|
58
|
-
"src/index.css",
|
|
59
|
-
"src/globals.css",
|
|
60
|
-
"src/App.css",
|
|
61
|
-
"index.css",
|
|
62
|
-
"styles/globals.css",
|
|
63
|
-
];
|
|
64
|
-
for (const candidate of candidates) {
|
|
65
|
-
if (fs.existsSync(path.join(process.cwd(), candidate))) {
|
|
66
|
-
return candidate;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Find the Tailwind config file path.
|
|
73
|
-
*/
|
|
74
|
-
export function findTailwindConfigPath() {
|
|
75
|
-
const candidates = [
|
|
76
|
-
"tailwind.config.ts",
|
|
77
|
-
"tailwind.config.js",
|
|
78
|
-
"tailwind.config.mjs",
|
|
79
|
-
"tailwind.config.cjs",
|
|
80
|
-
];
|
|
81
|
-
for (const candidate of candidates) {
|
|
82
|
-
if (fs.existsSync(path.join(process.cwd(), candidate))) {
|
|
83
|
-
return candidate;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Find the layout/HTML file where font links should be injected.
|
|
90
|
-
*/
|
|
91
|
-
export function findLayoutPath(framework) {
|
|
92
|
-
if (framework === "next") {
|
|
93
|
-
const candidates = [
|
|
94
|
-
"app/layout.tsx",
|
|
95
|
-
"app/layout.jsx",
|
|
96
|
-
"app/layout.js",
|
|
97
|
-
"src/app/layout.tsx",
|
|
98
|
-
"src/app/layout.jsx",
|
|
99
|
-
"src/app/layout.js",
|
|
100
|
-
];
|
|
101
|
-
for (const candidate of candidates) {
|
|
102
|
-
if (fs.existsSync(path.join(process.cwd(), candidate))) {
|
|
103
|
-
return candidate;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// Vite / React / Other
|
|
108
|
-
const htmlCandidates = [
|
|
109
|
-
"index.html",
|
|
110
|
-
"public/index.html",
|
|
111
|
-
];
|
|
112
|
-
for (const candidate of htmlCandidates) {
|
|
113
|
-
if (fs.existsSync(path.join(process.cwd(), candidate))) {
|
|
114
|
-
return candidate;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=detectFramework.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detectFramework.js","sourceRoot":"","sources":["../../../cli/src/shared/detectFramework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB;;GAEG;AACH,MAAM,UAAU,eAAe;IAC3B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IAEjE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG;QACZ,GAAG,CAAC,WAAW,CAAC,YAAY,IAAI,EAAE,CAAC;QACnC,GAAG,CAAC,WAAW,CAAC,eAAe,IAAI,EAAE,CAAC;KACzC,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IACnC,IAAI,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IACnC,IAAI,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAErC,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACjC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IAEjE,IAA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GAAG;QACf,oBAAoB;QACpB,oBAAoB;QACpB,qBAAqB;QACrB,qBAAqB;KACxB,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,SAAoB;IAC/C,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG;YACf,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;YACf,oBAAoB;YACpB,oBAAoB;YACpB,mBAAmB;SACtB,CAAC;QACF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACjC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;gBACrD,OAAO,SAAS,CAAC;YACrB,CAAC;QACL,CAAC;IACL,CAAC;IAED,uBAAuB;IACvB,MAAM,cAAc,GAAG;QACnB,YAAY;QACZ,mBAAmB;KACtB,CAAC;IACF,KAAK,MAAM,SAAS,IAAI,cAAc,EAAE,CAAC;QACrC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installBaseUtils.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/installBaseUtils.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CA8BvD"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { execSync } from "child_process";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
import { detectPackageManager } from "./detectPackageManager.js";
|
|
6
|
-
import { getCurrentInstalledDependencies } from "./getCurrentInstalledDependencies.js";
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = path.dirname(__filename);
|
|
9
|
-
const UTILS_TEMPLATE_DIR = path.resolve(__dirname, "../../../apps/lib/utils");
|
|
10
|
-
const BASE_UTILS = ["cn.ts", "types.ts"];
|
|
11
|
-
const BASE_DEPENDENCIES = [
|
|
12
|
-
"clsx",
|
|
13
|
-
"tailwind-merge",
|
|
14
|
-
"class-variance-authority",
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Install base utility files (cn.ts, types.ts) and their dependencies.
|
|
18
|
-
*/
|
|
19
|
-
export function installBaseUtils(basePath) {
|
|
20
|
-
const normalizedPath = basePath.replace("@/", "").replace(/^\.\//, "");
|
|
21
|
-
const utilsTargetDir = path.join(process.cwd(), normalizedPath, "utils");
|
|
22
|
-
// Ensure target directory exists
|
|
23
|
-
if (!fs.existsSync(utilsTargetDir)) {
|
|
24
|
-
fs.mkdirSync(utilsTargetDir, { recursive: true });
|
|
25
|
-
}
|
|
26
|
-
// Copy base utility files
|
|
27
|
-
for (const utilFile of BASE_UTILS) {
|
|
28
|
-
const source = path.join(UTILS_TEMPLATE_DIR, utilFile);
|
|
29
|
-
const target = path.join(utilsTargetDir, utilFile);
|
|
30
|
-
if (!fs.existsSync(source)) {
|
|
31
|
-
console.log(` ⚠️ Template not found: ${utilFile}`);
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (fs.existsSync(target)) {
|
|
35
|
-
console.log(` ⏭️ ${utilFile} already exists, skipping`);
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
fs.copyFileSync(source, target);
|
|
39
|
-
console.log(` ✅ Installed ${utilFile}`);
|
|
40
|
-
}
|
|
41
|
-
// Install npm dependencies
|
|
42
|
-
installMissingDependencies();
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Install base npm dependencies (clsx, tailwind-merge, cva) if missing.
|
|
46
|
-
*/
|
|
47
|
-
function installMissingDependencies() {
|
|
48
|
-
const { depsNames } = getCurrentInstalledDependencies();
|
|
49
|
-
const missing = BASE_DEPENDENCIES.filter(dep => !depsNames.has(dep));
|
|
50
|
-
if (missing.length === 0) {
|
|
51
|
-
console.log(" ✅ Base dependencies already installed");
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const packageManager = detectPackageManager();
|
|
55
|
-
const depsStr = missing.map(dep => `${dep}@latest`).join(" ");
|
|
56
|
-
let installCommand;
|
|
57
|
-
switch (packageManager) {
|
|
58
|
-
case "pnpm":
|
|
59
|
-
installCommand = `pnpm add ${depsStr}`;
|
|
60
|
-
break;
|
|
61
|
-
case "yarn":
|
|
62
|
-
installCommand = `yarn add ${depsStr}`;
|
|
63
|
-
break;
|
|
64
|
-
case "bun":
|
|
65
|
-
installCommand = `bun add ${depsStr}`;
|
|
66
|
-
break;
|
|
67
|
-
default:
|
|
68
|
-
installCommand = `npm install ${depsStr}`;
|
|
69
|
-
}
|
|
70
|
-
try {
|
|
71
|
-
console.log(` 📦 Installing: ${missing.join(", ")}`);
|
|
72
|
-
execSync(installCommand, { stdio: "inherit" });
|
|
73
|
-
console.log(" ✅ Base dependencies installed");
|
|
74
|
-
}
|
|
75
|
-
catch (error) {
|
|
76
|
-
console.error(" ❌ Error installing base dependencies:", error.message);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=installBaseUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installBaseUtils.js","sourceRoot":"","sources":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YACP,cAAc,GAAG,YAAY,OAAO,EAAE,CAAC;YACvC,MAAM;QACV,KAAK,MAAM;YACP,cAAc,GAAG,YAAY,OAAO,EAAE,CAAC;YACvC,MAAM;QACV,KAAK,KAAK;YACN,cAAc,GAAG,WAAW,OAAO,EAAE,CAAC;YACtC,MAAM;QACV;YACI,cAAc,GAAG,eAAe,OAAO,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,oBAAoB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtD,QAAQ,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;AACL,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Framework } from "./detectFramework.js";
|
|
2
|
-
export interface Aliases {
|
|
3
|
-
components: string;
|
|
4
|
-
hooks: string;
|
|
5
|
-
utils: string;
|
|
6
|
-
providers: string;
|
|
7
|
-
layouts: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Resolve the base path and aliases for the project.
|
|
11
|
-
* Parses tsconfig.json/jsconfig.json to find path aliases,
|
|
12
|
-
* then builds the aliases map for each category.
|
|
13
|
-
*/
|
|
14
|
-
export declare function resolveAliases(framework: Framework): {
|
|
15
|
-
basePath: string;
|
|
16
|
-
aliases: Aliases;
|
|
17
|
-
aliasPrefix: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Resolve an alias path to a filesystem path.
|
|
21
|
-
* e.g. "@/components" with basePath "./lib/" → "./lib/components"
|
|
22
|
-
*/
|
|
23
|
-
export declare function resolveAliasToPath(aliasPath: string, basePath: string): string;
|
|
24
|
-
//# sourceMappingURL=resolveAliases.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAliases.d.ts","sourceRoot":"","sources":["../../../cli/src/shared/resolveAliases.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,WAAW,OAAO;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAchH;AAsED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAU9E"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
/**
|
|
4
|
-
* Resolve the base path and aliases for the project.
|
|
5
|
-
* Parses tsconfig.json/jsconfig.json to find path aliases,
|
|
6
|
-
* then builds the aliases map for each category.
|
|
7
|
-
*/
|
|
8
|
-
export function resolveAliases(framework) {
|
|
9
|
-
const { basePath, aliasPrefix } = resolveBasePath(framework);
|
|
10
|
-
// Store actual filesystem paths (not alias paths) so getInstallPaths resolves correctly
|
|
11
|
-
const normalizedBase = basePath.replace(/\/$/, "");
|
|
12
|
-
const aliases = {
|
|
13
|
-
components: `${normalizedBase}/components`,
|
|
14
|
-
hooks: `${normalizedBase}/hooks`,
|
|
15
|
-
utils: `${normalizedBase}/utils`,
|
|
16
|
-
providers: `${normalizedBase}/providers`,
|
|
17
|
-
layouts: `${normalizedBase}/layouts`,
|
|
18
|
-
};
|
|
19
|
-
return { basePath, aliases, aliasPrefix };
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Resolve the base path from tsconfig paths or directory structure.
|
|
23
|
-
*/
|
|
24
|
-
function resolveBasePath(framework) {
|
|
25
|
-
// Try to parse tsconfig.json or jsconfig.json for path aliases
|
|
26
|
-
const tsconfigPath = findTsConfig();
|
|
27
|
-
if (tsconfigPath) {
|
|
28
|
-
const tsconfig = parseTsConfig(tsconfigPath);
|
|
29
|
-
const paths = tsconfig?.compilerOptions?.paths;
|
|
30
|
-
if (paths) {
|
|
31
|
-
// Look for @/* alias
|
|
32
|
-
const aliasKey = Object.keys(paths).find(key => key.endsWith("/*"));
|
|
33
|
-
if (aliasKey) {
|
|
34
|
-
const aliasTargets = paths[aliasKey];
|
|
35
|
-
if (aliasTargets && aliasTargets.length > 0) {
|
|
36
|
-
const target = aliasTargets[0].replace("/*", "/");
|
|
37
|
-
const prefix = aliasKey.replace("/*", "/");
|
|
38
|
-
return { basePath: target, aliasPrefix: prefix };
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// Fallback: detect based on directory structure
|
|
44
|
-
if (fs.existsSync(path.join(process.cwd(), "src"))) {
|
|
45
|
-
return { basePath: "./src/", aliasPrefix: "./src/" };
|
|
46
|
-
}
|
|
47
|
-
// Next.js without src/ directory
|
|
48
|
-
if (framework === "next") {
|
|
49
|
-
return { basePath: "./", aliasPrefix: "./" };
|
|
50
|
-
}
|
|
51
|
-
return { basePath: "./src/", aliasPrefix: "./src/" };
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Find tsconfig.json or jsconfig.json in the project root.
|
|
55
|
-
*/
|
|
56
|
-
function findTsConfig() {
|
|
57
|
-
const candidates = ["tsconfig.json", "jsconfig.json"];
|
|
58
|
-
for (const candidate of candidates) {
|
|
59
|
-
const fullPath = path.join(process.cwd(), candidate);
|
|
60
|
-
if (fs.existsSync(fullPath)) {
|
|
61
|
-
return fullPath;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Parse tsconfig.json, handling comments and trailing commas.
|
|
68
|
-
*/
|
|
69
|
-
function parseTsConfig(filePath) {
|
|
70
|
-
try {
|
|
71
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
72
|
-
// Strip single-line comments and trailing commas for JSON.parse
|
|
73
|
-
const cleaned = content
|
|
74
|
-
.replace(/\/\/.*$/gm, "")
|
|
75
|
-
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
76
|
-
.replace(/,(\s*[}\]])/g, "$1");
|
|
77
|
-
return JSON.parse(cleaned);
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Resolve an alias path to a filesystem path.
|
|
85
|
-
* e.g. "@/components" with basePath "./lib/" → "./lib/components"
|
|
86
|
-
*/
|
|
87
|
-
export function resolveAliasToPath(aliasPath, basePath) {
|
|
88
|
-
// Handle @/ prefix
|
|
89
|
-
if (aliasPath.startsWith("@/")) {
|
|
90
|
-
return path.join(basePath, aliasPath.slice(2));
|
|
91
|
-
}
|
|
92
|
-
// Handle ./ prefix
|
|
93
|
-
if (aliasPath.startsWith("./")) {
|
|
94
|
-
return aliasPath;
|
|
95
|
-
}
|
|
96
|
-
return path.join(basePath, aliasPath);
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=resolveAliases.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAliases.js","sourceRoot":"","sources":["../../../cli/src/shared/resolveAliases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAWxB;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,SAAoB;IAC/C,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