benflux-ui 0.1.1 → 0.1.3
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/dist/bin/benflux-ui.js +24 -28
- package/dist/index.js +24 -28
- package/dist/index.mjs +24 -28
- package/package.json +1 -1
package/dist/bin/benflux-ui.js
CHANGED
|
@@ -28,11 +28,11 @@ var import_commander = require("commander");
|
|
|
28
28
|
var import_picocolors5 = __toESM(require("picocolors"));
|
|
29
29
|
|
|
30
30
|
// src/commands/init.ts
|
|
31
|
-
var import_path2 = __toESM(require("path"));
|
|
32
31
|
var clack = __toESM(require("@clack/prompts"));
|
|
33
|
-
var import_picocolors = __toESM(require("picocolors"));
|
|
34
|
-
var import_fs_extra2 = __toESM(require("fs-extra"));
|
|
35
32
|
var import_execa = require("execa");
|
|
33
|
+
var import_fs_extra2 = __toESM(require("fs-extra"));
|
|
34
|
+
var import_path2 = __toESM(require("path"));
|
|
35
|
+
var import_picocolors = __toESM(require("picocolors"));
|
|
36
36
|
|
|
37
37
|
// src/utils/detect-framework.ts
|
|
38
38
|
var import_path = __toESM(require("path"));
|
|
@@ -151,13 +151,13 @@ async function initCommand(options) {
|
|
|
151
151
|
spinner3.stop(`Components directory: ${import_picocolors.default.cyan(settings.componentsDir)}`);
|
|
152
152
|
spinner3.start("Creating benflux-ui.json config...");
|
|
153
153
|
const config = {
|
|
154
|
-
$schema: "https://benflux-ui.
|
|
154
|
+
$schema: "https://benflux-ui.vercel.app/schema.json",
|
|
155
155
|
style: "default",
|
|
156
156
|
typescript: settings.typescript,
|
|
157
157
|
tailwind: {
|
|
158
158
|
config: hasTw ? "tailwind.config.ts" : "tailwind.config.ts",
|
|
159
159
|
css: "src/app/globals.css",
|
|
160
|
-
baseColor: "
|
|
160
|
+
baseColor: "default"
|
|
161
161
|
},
|
|
162
162
|
aliases: {
|
|
163
163
|
components: `@/${settings.componentsDir.replace("src/", "")}`,
|
|
@@ -200,11 +200,10 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
200
200
|
import_picocolors.default.green("\u2713") + " Benflux UI initialized!",
|
|
201
201
|
"",
|
|
202
202
|
import_picocolors.default.bold("Next steps:"),
|
|
203
|
-
` ${import_picocolors.default.cyan("npx benflux-ui add button")}
|
|
204
|
-
` ${import_picocolors.default.cyan("npx benflux-ui
|
|
205
|
-
` ${import_picocolors.default.cyan("npx benflux-ui list")} See all components`,
|
|
203
|
+
` ${import_picocolors.default.cyan("npx benflux-ui add button")} Add a component`,
|
|
204
|
+
` ${import_picocolors.default.cyan("npx benflux-ui list")} See all components`,
|
|
206
205
|
"",
|
|
207
|
-
import_picocolors.default.
|
|
206
|
+
` ${import_picocolors.default.bold("Docs:")} \x1B]8;;https://benflux-ui.vercel.app\x07https://benflux-ui.vercel.app\x1B]8;;\x07`
|
|
208
207
|
].join("\n")
|
|
209
208
|
);
|
|
210
209
|
}
|
|
@@ -816,26 +815,23 @@ async function addCommand(components, options) {
|
|
|
816
815
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
817
816
|
let selectedComponents = components;
|
|
818
817
|
if (selectedComponents.length === 0) {
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
clack2.cancel("Cancelled.");
|
|
832
|
-
process.exit(0);
|
|
833
|
-
}
|
|
834
|
-
const componentOptions = category === "all" ? REGISTRY : REGISTRY.filter((c) => c.category === category);
|
|
818
|
+
const categoryLabel = {
|
|
819
|
+
layout: "Layout",
|
|
820
|
+
inputs: "Inputs",
|
|
821
|
+
navigation: "Navigation",
|
|
822
|
+
feedback: "Feedback",
|
|
823
|
+
"data-display": "Data Display",
|
|
824
|
+
ai: "AI",
|
|
825
|
+
wow: "WOW Effects"
|
|
826
|
+
};
|
|
827
|
+
const sorted = [...REGISTRY].sort(
|
|
828
|
+
(a, b) => a.category === b.category ? a.name.localeCompare(b.name) : a.category.localeCompare(b.category)
|
|
829
|
+
);
|
|
835
830
|
const selected = await clack2.multiselect({
|
|
836
|
-
message: "
|
|
837
|
-
options:
|
|
838
|
-
label:
|
|
831
|
+
message: "Which components would you like to add?",
|
|
832
|
+
options: sorted.map((c) => ({
|
|
833
|
+
label: c.name,
|
|
834
|
+
hint: `${categoryLabel[c.category] ?? c.category} \u2014 ${c.description}`,
|
|
839
835
|
value: c.name
|
|
840
836
|
}))
|
|
841
837
|
});
|
package/dist/index.js
CHANGED
|
@@ -46,11 +46,11 @@ __export(src_exports, {
|
|
|
46
46
|
module.exports = __toCommonJS(src_exports);
|
|
47
47
|
|
|
48
48
|
// src/commands/init.ts
|
|
49
|
-
var import_path2 = __toESM(require("path"));
|
|
50
49
|
var clack = __toESM(require("@clack/prompts"));
|
|
51
|
-
var import_picocolors = __toESM(require("picocolors"));
|
|
52
|
-
var import_fs_extra2 = __toESM(require("fs-extra"));
|
|
53
50
|
var import_execa = require("execa");
|
|
51
|
+
var import_fs_extra2 = __toESM(require("fs-extra"));
|
|
52
|
+
var import_path2 = __toESM(require("path"));
|
|
53
|
+
var import_picocolors = __toESM(require("picocolors"));
|
|
54
54
|
|
|
55
55
|
// src/utils/detect-framework.ts
|
|
56
56
|
var import_path = __toESM(require("path"));
|
|
@@ -169,13 +169,13 @@ async function initCommand(options) {
|
|
|
169
169
|
spinner3.stop(`Components directory: ${import_picocolors.default.cyan(settings.componentsDir)}`);
|
|
170
170
|
spinner3.start("Creating benflux-ui.json config...");
|
|
171
171
|
const config = {
|
|
172
|
-
$schema: "https://benflux-ui.
|
|
172
|
+
$schema: "https://benflux-ui.vercel.app/schema.json",
|
|
173
173
|
style: "default",
|
|
174
174
|
typescript: settings.typescript,
|
|
175
175
|
tailwind: {
|
|
176
176
|
config: hasTw ? "tailwind.config.ts" : "tailwind.config.ts",
|
|
177
177
|
css: "src/app/globals.css",
|
|
178
|
-
baseColor: "
|
|
178
|
+
baseColor: "default"
|
|
179
179
|
},
|
|
180
180
|
aliases: {
|
|
181
181
|
components: `@/${settings.componentsDir.replace("src/", "")}`,
|
|
@@ -218,11 +218,10 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
218
218
|
import_picocolors.default.green("\u2713") + " Benflux UI initialized!",
|
|
219
219
|
"",
|
|
220
220
|
import_picocolors.default.bold("Next steps:"),
|
|
221
|
-
` ${import_picocolors.default.cyan("npx benflux-ui add button")}
|
|
222
|
-
` ${import_picocolors.default.cyan("npx benflux-ui
|
|
223
|
-
` ${import_picocolors.default.cyan("npx benflux-ui list")} See all components`,
|
|
221
|
+
` ${import_picocolors.default.cyan("npx benflux-ui add button")} Add a component`,
|
|
222
|
+
` ${import_picocolors.default.cyan("npx benflux-ui list")} See all components`,
|
|
224
223
|
"",
|
|
225
|
-
import_picocolors.default.
|
|
224
|
+
` ${import_picocolors.default.bold("Docs:")} \x1B]8;;https://benflux-ui.vercel.app\x07https://benflux-ui.vercel.app\x1B]8;;\x07`
|
|
226
225
|
].join("\n")
|
|
227
226
|
);
|
|
228
227
|
}
|
|
@@ -843,26 +842,23 @@ async function addCommand(components, options) {
|
|
|
843
842
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
844
843
|
let selectedComponents = components;
|
|
845
844
|
if (selectedComponents.length === 0) {
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
clack2.cancel("Cancelled.");
|
|
859
|
-
process.exit(0);
|
|
860
|
-
}
|
|
861
|
-
const componentOptions = category === "all" ? REGISTRY : REGISTRY.filter((c) => c.category === category);
|
|
845
|
+
const categoryLabel = {
|
|
846
|
+
layout: "Layout",
|
|
847
|
+
inputs: "Inputs",
|
|
848
|
+
navigation: "Navigation",
|
|
849
|
+
feedback: "Feedback",
|
|
850
|
+
"data-display": "Data Display",
|
|
851
|
+
ai: "AI",
|
|
852
|
+
wow: "WOW Effects"
|
|
853
|
+
};
|
|
854
|
+
const sorted = [...REGISTRY].sort(
|
|
855
|
+
(a, b) => a.category === b.category ? a.name.localeCompare(b.name) : a.category.localeCompare(b.category)
|
|
856
|
+
);
|
|
862
857
|
const selected = await clack2.multiselect({
|
|
863
|
-
message: "
|
|
864
|
-
options:
|
|
865
|
-
label:
|
|
858
|
+
message: "Which components would you like to add?",
|
|
859
|
+
options: sorted.map((c) => ({
|
|
860
|
+
label: c.name,
|
|
861
|
+
hint: `${categoryLabel[c.category] ?? c.category} \u2014 ${c.description}`,
|
|
866
862
|
value: c.name
|
|
867
863
|
}))
|
|
868
864
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/commands/init.ts
|
|
2
|
-
import path2 from "path";
|
|
3
2
|
import * as clack from "@clack/prompts";
|
|
4
|
-
import pc from "picocolors";
|
|
5
|
-
import fs2 from "fs-extra";
|
|
6
3
|
import { execa } from "execa";
|
|
4
|
+
import fs2 from "fs-extra";
|
|
5
|
+
import path2 from "path";
|
|
6
|
+
import pc from "picocolors";
|
|
7
7
|
|
|
8
8
|
// src/utils/detect-framework.ts
|
|
9
9
|
import path from "path";
|
|
@@ -122,13 +122,13 @@ async function initCommand(options) {
|
|
|
122
122
|
spinner3.stop(`Components directory: ${pc.cyan(settings.componentsDir)}`);
|
|
123
123
|
spinner3.start("Creating benflux-ui.json config...");
|
|
124
124
|
const config = {
|
|
125
|
-
$schema: "https://benflux-ui.
|
|
125
|
+
$schema: "https://benflux-ui.vercel.app/schema.json",
|
|
126
126
|
style: "default",
|
|
127
127
|
typescript: settings.typescript,
|
|
128
128
|
tailwind: {
|
|
129
129
|
config: hasTw ? "tailwind.config.ts" : "tailwind.config.ts",
|
|
130
130
|
css: "src/app/globals.css",
|
|
131
|
-
baseColor: "
|
|
131
|
+
baseColor: "default"
|
|
132
132
|
},
|
|
133
133
|
aliases: {
|
|
134
134
|
components: `@/${settings.componentsDir.replace("src/", "")}`,
|
|
@@ -171,11 +171,10 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
171
171
|
pc.green("\u2713") + " Benflux UI initialized!",
|
|
172
172
|
"",
|
|
173
173
|
pc.bold("Next steps:"),
|
|
174
|
-
` ${pc.cyan("npx benflux-ui add button")}
|
|
175
|
-
` ${pc.cyan("npx benflux-ui
|
|
176
|
-
` ${pc.cyan("npx benflux-ui list")} See all components`,
|
|
174
|
+
` ${pc.cyan("npx benflux-ui add button")} Add a component`,
|
|
175
|
+
` ${pc.cyan("npx benflux-ui list")} See all components`,
|
|
177
176
|
"",
|
|
178
|
-
pc.
|
|
177
|
+
` ${pc.bold("Docs:")} \x1B]8;;https://benflux-ui.vercel.app\x07https://benflux-ui.vercel.app\x1B]8;;\x07`
|
|
179
178
|
].join("\n")
|
|
180
179
|
);
|
|
181
180
|
}
|
|
@@ -796,26 +795,23 @@ async function addCommand(components, options) {
|
|
|
796
795
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
797
796
|
let selectedComponents = components;
|
|
798
797
|
if (selectedComponents.length === 0) {
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
clack2.cancel("Cancelled.");
|
|
812
|
-
process.exit(0);
|
|
813
|
-
}
|
|
814
|
-
const componentOptions = category === "all" ? REGISTRY : REGISTRY.filter((c) => c.category === category);
|
|
798
|
+
const categoryLabel = {
|
|
799
|
+
layout: "Layout",
|
|
800
|
+
inputs: "Inputs",
|
|
801
|
+
navigation: "Navigation",
|
|
802
|
+
feedback: "Feedback",
|
|
803
|
+
"data-display": "Data Display",
|
|
804
|
+
ai: "AI",
|
|
805
|
+
wow: "WOW Effects"
|
|
806
|
+
};
|
|
807
|
+
const sorted = [...REGISTRY].sort(
|
|
808
|
+
(a, b) => a.category === b.category ? a.name.localeCompare(b.name) : a.category.localeCompare(b.category)
|
|
809
|
+
);
|
|
815
810
|
const selected = await clack2.multiselect({
|
|
816
|
-
message: "
|
|
817
|
-
options:
|
|
818
|
-
label:
|
|
811
|
+
message: "Which components would you like to add?",
|
|
812
|
+
options: sorted.map((c) => ({
|
|
813
|
+
label: c.name,
|
|
814
|
+
hint: `${categoryLabel[c.category] ?? c.category} \u2014 ${c.description}`,
|
|
819
815
|
value: c.name
|
|
820
816
|
}))
|
|
821
817
|
});
|