benflux-ui 0.1.2 → 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 +19 -22
- package/dist/index.js +19 -22
- package/dist/index.mjs +19 -22
- 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"));
|
|
@@ -815,26 +815,23 @@ async function addCommand(components, options) {
|
|
|
815
815
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
816
816
|
let selectedComponents = components;
|
|
817
817
|
if (selectedComponents.length === 0) {
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
clack2.cancel("Cancelled.");
|
|
831
|
-
process.exit(0);
|
|
832
|
-
}
|
|
833
|
-
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
|
+
);
|
|
834
830
|
const selected = await clack2.multiselect({
|
|
835
|
-
message: "
|
|
836
|
-
options:
|
|
837
|
-
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}`,
|
|
838
835
|
value: c.name
|
|
839
836
|
}))
|
|
840
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"));
|
|
@@ -842,26 +842,23 @@ async function addCommand(components, options) {
|
|
|
842
842
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
843
843
|
let selectedComponents = components;
|
|
844
844
|
if (selectedComponents.length === 0) {
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
clack2.cancel("Cancelled.");
|
|
858
|
-
process.exit(0);
|
|
859
|
-
}
|
|
860
|
-
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
|
+
);
|
|
861
857
|
const selected = await clack2.multiselect({
|
|
862
|
-
message: "
|
|
863
|
-
options:
|
|
864
|
-
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}`,
|
|
865
862
|
value: c.name
|
|
866
863
|
}))
|
|
867
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";
|
|
@@ -795,26 +795,23 @@ async function addCommand(components, options) {
|
|
|
795
795
|
const defaultDir = options.path ?? await getComponentsPath(cwd);
|
|
796
796
|
let selectedComponents = components;
|
|
797
797
|
if (selectedComponents.length === 0) {
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
clack2.cancel("Cancelled.");
|
|
811
|
-
process.exit(0);
|
|
812
|
-
}
|
|
813
|
-
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
|
+
);
|
|
814
810
|
const selected = await clack2.multiselect({
|
|
815
|
-
message: "
|
|
816
|
-
options:
|
|
817
|
-
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}`,
|
|
818
815
|
value: c.name
|
|
819
816
|
}))
|
|
820
817
|
});
|