nexocord 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +6 -6
- package/dist/core/types/Ui.d.ts +12 -92
- package/dist/core/types/Ui.d.ts.map +1 -1
- package/dist/core/types/index.js +1241 -362
- package/dist/core/ui/builders/container.d.ts +44 -0
- package/dist/core/ui/builders/container.d.ts.map +1 -0
- package/dist/core/ui/builders/index.d.ts +41 -0
- package/dist/core/ui/builders/index.d.ts.map +1 -0
- package/dist/core/ui/builders/primitives.d.ts +134 -0
- package/dist/core/ui/builders/primitives.d.ts.map +1 -0
- package/dist/core/ui/builders/select.d.ts +61 -0
- package/dist/core/ui/builders/select.d.ts.map +1 -0
- package/dist/core/ui/constants/index.d.ts +4 -0
- package/dist/core/ui/constants/index.d.ts.map +1 -0
- package/dist/core/ui/constants/limits.d.ts +19 -0
- package/dist/core/ui/constants/limits.d.ts.map +1 -0
- package/dist/core/ui/constants/patterns.d.ts +7 -0
- package/dist/core/ui/constants/patterns.d.ts.map +1 -0
- package/dist/core/ui/constants/symbols.d.ts +7 -0
- package/dist/core/ui/constants/symbols.d.ts.map +1 -0
- package/dist/core/ui/index.d.ts +4 -2
- package/dist/core/ui/index.d.ts.map +1 -1
- package/dist/core/ui/index.js +1792 -711
- package/dist/core/ui/normalizers/button.d.ts +25 -0
- package/dist/core/ui/normalizers/button.d.ts.map +1 -0
- package/dist/core/ui/normalizers/container.d.ts +68 -0
- package/dist/core/ui/normalizers/container.d.ts.map +1 -0
- package/dist/core/ui/normalizers/index.d.ts +6 -0
- package/dist/core/ui/normalizers/index.d.ts.map +1 -0
- package/dist/core/ui/normalizers/media.d.ts +17 -0
- package/dist/core/ui/normalizers/media.d.ts.map +1 -0
- package/dist/core/ui/normalizers/select.d.ts +45 -0
- package/dist/core/ui/normalizers/select.d.ts.map +1 -0
- package/dist/core/ui/types/button.d.ts +11 -0
- package/dist/core/ui/types/button.d.ts.map +1 -0
- package/dist/core/ui/types/container.d.ts +53 -0
- package/dist/core/ui/types/container.d.ts.map +1 -0
- package/dist/core/ui/types/index.d.ts +8 -0
- package/dist/core/ui/types/index.d.ts.map +1 -0
- package/dist/core/ui/types/media.d.ts +29 -0
- package/dist/core/ui/types/media.d.ts.map +1 -0
- package/dist/core/ui/types/message.d.ts +15 -0
- package/dist/core/ui/types/message.d.ts.map +1 -0
- package/dist/core/ui/types/render.d.ts +7 -0
- package/dist/core/ui/types/render.d.ts.map +1 -0
- package/dist/core/ui/types/row.d.ts +10 -0
- package/dist/core/ui/types/row.d.ts.map +1 -0
- package/dist/core/ui/types/select.d.ts +42 -0
- package/dist/core/ui/types/select.d.ts.map +1 -0
- package/dist/core/ui/utils/applySelectBase.d.ts +21 -0
- package/dist/core/ui/utils/applySelectBase.d.ts.map +1 -0
- package/dist/core/ui/utils/formatList.d.ts +12 -0
- package/dist/core/ui/utils/formatList.d.ts.map +1 -0
- package/dist/core/ui/utils/formatText.d.ts +46 -0
- package/dist/core/ui/utils/formatText.d.ts.map +1 -0
- package/dist/core/ui/utils/getAttachmentName.d.ts +8 -0
- package/dist/core/ui/utils/getAttachmentName.d.ts.map +1 -0
- package/dist/core/ui/utils/index.d.ts +7 -0
- package/dist/core/ui/utils/index.d.ts.map +1 -0
- package/dist/core/ui/utils/resolveSelectBase.d.ts +16 -0
- package/dist/core/ui/utils/resolveSelectBase.d.ts.map +1 -0
- package/dist/core/ui/utils/splitContainerArgs.d.ts +12 -0
- package/dist/core/ui/utils/splitContainerArgs.d.ts.map +1 -0
- package/dist/core/ui/validators/button.d.ts +8 -0
- package/dist/core/ui/validators/button.d.ts.map +1 -0
- package/dist/core/ui/validators/container.d.ts +51 -0
- package/dist/core/ui/validators/container.d.ts.map +1 -0
- package/dist/core/ui/validators/index.d.ts +18 -0
- package/dist/core/ui/validators/index.d.ts.map +1 -0
- package/dist/core/ui/validators/select.d.ts +8 -0
- package/dist/core/ui/validators/select.d.ts.map +1 -0
- package/dist/create/generator.d.ts.map +1 -1
- package/dist/index.cjs +2099 -869
- package/dist/index.js +2135 -905
- package/package.json +2 -2
- package/dist/commands/create/index.d.ts +0 -4
- package/dist/commands/create/index.d.ts.map +0 -1
- package/dist/commands/create/index.js +0 -867
- package/dist/commands/create/prompts.d.ts +0 -46
- package/dist/commands/create/prompts.d.ts.map +0 -1
- package/dist/commands/create/prompts.js +0 -105
- package/dist/commands/create/template.d.ts +0 -23
- package/dist/commands/create/template.d.ts.map +0 -1
- package/dist/commands/create/template.js +0 -762
- package/dist/commands/create/utils.d.ts +0 -45
- package/dist/commands/create/utils.d.ts.map +0 -1
- package/dist/commands/create/utils.js +0 -119
- package/dist/core/ui/builders.d.ts +0 -87
- package/dist/core/ui/builders.d.ts.map +0 -1
- package/dist/core/ui/normalize.d.ts +0 -17
- package/dist/core/ui/normalize.d.ts.map +0 -1
- package/dist/core/ui/validate.d.ts +0 -14
- package/dist/core/ui/validate.d.ts.map +0 -1
package/dist/bin/cli.js
CHANGED
|
@@ -1005,7 +1005,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1005
1005
|
this._exitCallback = (err) => {
|
|
1006
1006
|
if (err.code !== "commander.executeSubCommandAsync") {
|
|
1007
1007
|
throw err;
|
|
1008
|
-
}
|
|
1008
|
+
}
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
1011
|
return this;
|
|
@@ -2254,7 +2254,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
2254
2254
|
module.exports.createColors = createColors;
|
|
2255
2255
|
});
|
|
2256
2256
|
// package.json
|
|
2257
|
-
var version = "1.
|
|
2257
|
+
var version = "1.2.0";
|
|
2258
2258
|
|
|
2259
2259
|
// node_modules/commander/esm.mjs
|
|
2260
2260
|
var import__ = __toESM(require_commander(), 1);
|
|
@@ -3476,7 +3476,7 @@ function createPackageJson(options, frameworkPackageName) {
|
|
|
3476
3476
|
},
|
|
3477
3477
|
devDependencies: isTypeScript ? {
|
|
3478
3478
|
typescript: "^6.0.2",
|
|
3479
|
-
...isBun ? { "@types/bun": "latest" } : { "@types/node": "^25.5.0" }
|
|
3479
|
+
...isBun ? { "@types/bun": "latest" } : { "@types/node": "^25.5.0", tsx: "^4.20.6" }
|
|
3480
3480
|
} : undefined,
|
|
3481
3481
|
engines: isBun ? undefined : { node: ">=20" }
|
|
3482
3482
|
};
|
|
@@ -3553,10 +3553,10 @@ async function askProjectName(initialName) {
|
|
|
3553
3553
|
async function askRuntime() {
|
|
3554
3554
|
return abortOnCancel(await ve({
|
|
3555
3555
|
message: "Runtime",
|
|
3556
|
-
initialValue: "
|
|
3556
|
+
initialValue: "node",
|
|
3557
3557
|
options: [
|
|
3558
|
-
{ value: "
|
|
3559
|
-
{ value: "
|
|
3558
|
+
{ value: "node", label: "Node.js" },
|
|
3559
|
+
{ value: "bun", label: "Bun" }
|
|
3560
3560
|
]
|
|
3561
3561
|
}));
|
|
3562
3562
|
}
|
package/dist/core/types/Ui.d.ts
CHANGED
|
@@ -1,93 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export type SelectBase = {
|
|
14
|
-
id: ButtonID;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
minValues?: number;
|
|
17
|
-
maxValues?: number;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export type StringSelectOption = {
|
|
21
|
-
label: string;
|
|
22
|
-
value: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
default?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type StringSelect = SelectBase & {
|
|
27
|
-
type: 'select.string';
|
|
28
|
-
options: readonly StringSelectOption[];
|
|
29
|
-
};
|
|
30
|
-
export type UserSelect = SelectBase & {
|
|
31
|
-
type: 'select.user';
|
|
32
|
-
};
|
|
33
|
-
export type RoleSelect = SelectBase & {
|
|
34
|
-
type: 'select.role';
|
|
35
|
-
};
|
|
36
|
-
export type MentionableSelect = SelectBase & {
|
|
37
|
-
type: 'select.mentionable';
|
|
38
|
-
};
|
|
39
|
-
export type ChannelSelect = SelectBase & {
|
|
40
|
-
type: 'select.channel';
|
|
41
|
-
channelTypes?: readonly ChannelType[];
|
|
42
|
-
};
|
|
43
|
-
export type SelectMenu = StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect;
|
|
44
|
-
export type RowComponent = Button | SelectMenu;
|
|
45
|
-
export type TextComponent = {
|
|
46
|
-
type: 'text';
|
|
47
|
-
content: string;
|
|
48
|
-
};
|
|
49
|
-
export type SeparatorComponent = {
|
|
50
|
-
type: 'separator';
|
|
51
|
-
};
|
|
52
|
-
export type FileComponent = {
|
|
53
|
-
type: 'file';
|
|
54
|
-
url: AttachmentUrlString;
|
|
55
|
-
spoiler?: boolean;
|
|
56
|
-
attachment?: unknown;
|
|
57
|
-
};
|
|
58
|
-
export type MediaItem = {
|
|
59
|
-
url: UrlString;
|
|
60
|
-
description?: string;
|
|
61
|
-
spoiler?: boolean;
|
|
62
|
-
};
|
|
63
|
-
export type MediaGallery = {
|
|
64
|
-
type: 'gallery';
|
|
65
|
-
items: readonly MediaItem[];
|
|
66
|
-
};
|
|
67
|
-
export type Thumbnail = {
|
|
68
|
-
url: UrlString;
|
|
69
|
-
description?: string;
|
|
70
|
-
spoiler?: boolean;
|
|
71
|
-
};
|
|
72
|
-
export type SectionTexts = [string] | [string, string] | [string, string, string];
|
|
73
|
-
export type SectionOptions = {
|
|
74
|
-
button?: Button;
|
|
75
|
-
thumbnail?: Thumbnail;
|
|
76
|
-
};
|
|
77
|
-
export type SectionComponent = {
|
|
78
|
-
type: 'section';
|
|
79
|
-
texts: SectionTexts;
|
|
80
|
-
button?: Button;
|
|
81
|
-
thumbnail?: Thumbnail;
|
|
82
|
-
};
|
|
83
|
-
export type Row = {
|
|
84
|
-
type: 'row';
|
|
85
|
-
components: readonly RowComponent[];
|
|
86
|
-
};
|
|
87
|
-
export type ContainerNode = TextComponent | SeparatorComponent | SectionComponent | Row | MediaGallery | FileComponent;
|
|
88
|
-
export type ContainerInput = ContainerChild | ContainerNode;
|
|
89
|
-
export type ContainerOptions = {
|
|
90
|
-
color?: number | string;
|
|
91
|
-
};
|
|
92
|
-
export type DisplayInput = DisplayComponent | ContainerNode;
|
|
1
|
+
import { SeparatorSpacingSize } from 'discord.js';
|
|
2
|
+
export declare enum TextSize {
|
|
3
|
+
Title = 1,
|
|
4
|
+
Subtitle = 2,
|
|
5
|
+
Section = 3,
|
|
6
|
+
Small = 4
|
|
7
|
+
}
|
|
8
|
+
export declare const SeparatorSize: {
|
|
9
|
+
readonly Small: SeparatorSpacingSize.Small;
|
|
10
|
+
readonly Large: SeparatorSpacingSize.Large;
|
|
11
|
+
};
|
|
12
|
+
export type SeparatorSize = (typeof SeparatorSize)[keyof typeof SeparatorSize];
|
|
93
13
|
//# sourceMappingURL=Ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ui.d.ts","sourceRoot":"","sources":["../../../src/core/types/Ui.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Ui.d.ts","sourceRoot":"","sources":["../../../src/core/types/Ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,KAAK,IAAI;CACV;AAED,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"}
|