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.
Files changed (93) hide show
  1. package/dist/bin/cli.js +6 -6
  2. package/dist/core/types/Ui.d.ts +12 -92
  3. package/dist/core/types/Ui.d.ts.map +1 -1
  4. package/dist/core/types/index.js +1241 -362
  5. package/dist/core/ui/builders/container.d.ts +44 -0
  6. package/dist/core/ui/builders/container.d.ts.map +1 -0
  7. package/dist/core/ui/builders/index.d.ts +41 -0
  8. package/dist/core/ui/builders/index.d.ts.map +1 -0
  9. package/dist/core/ui/builders/primitives.d.ts +134 -0
  10. package/dist/core/ui/builders/primitives.d.ts.map +1 -0
  11. package/dist/core/ui/builders/select.d.ts +61 -0
  12. package/dist/core/ui/builders/select.d.ts.map +1 -0
  13. package/dist/core/ui/constants/index.d.ts +4 -0
  14. package/dist/core/ui/constants/index.d.ts.map +1 -0
  15. package/dist/core/ui/constants/limits.d.ts +19 -0
  16. package/dist/core/ui/constants/limits.d.ts.map +1 -0
  17. package/dist/core/ui/constants/patterns.d.ts +7 -0
  18. package/dist/core/ui/constants/patterns.d.ts.map +1 -0
  19. package/dist/core/ui/constants/symbols.d.ts +7 -0
  20. package/dist/core/ui/constants/symbols.d.ts.map +1 -0
  21. package/dist/core/ui/index.d.ts +4 -2
  22. package/dist/core/ui/index.d.ts.map +1 -1
  23. package/dist/core/ui/index.js +1792 -711
  24. package/dist/core/ui/normalizers/button.d.ts +25 -0
  25. package/dist/core/ui/normalizers/button.d.ts.map +1 -0
  26. package/dist/core/ui/normalizers/container.d.ts +68 -0
  27. package/dist/core/ui/normalizers/container.d.ts.map +1 -0
  28. package/dist/core/ui/normalizers/index.d.ts +6 -0
  29. package/dist/core/ui/normalizers/index.d.ts.map +1 -0
  30. package/dist/core/ui/normalizers/media.d.ts +17 -0
  31. package/dist/core/ui/normalizers/media.d.ts.map +1 -0
  32. package/dist/core/ui/normalizers/select.d.ts +45 -0
  33. package/dist/core/ui/normalizers/select.d.ts.map +1 -0
  34. package/dist/core/ui/types/button.d.ts +11 -0
  35. package/dist/core/ui/types/button.d.ts.map +1 -0
  36. package/dist/core/ui/types/container.d.ts +53 -0
  37. package/dist/core/ui/types/container.d.ts.map +1 -0
  38. package/dist/core/ui/types/index.d.ts +8 -0
  39. package/dist/core/ui/types/index.d.ts.map +1 -0
  40. package/dist/core/ui/types/media.d.ts +29 -0
  41. package/dist/core/ui/types/media.d.ts.map +1 -0
  42. package/dist/core/ui/types/message.d.ts +15 -0
  43. package/dist/core/ui/types/message.d.ts.map +1 -0
  44. package/dist/core/ui/types/render.d.ts +7 -0
  45. package/dist/core/ui/types/render.d.ts.map +1 -0
  46. package/dist/core/ui/types/row.d.ts +10 -0
  47. package/dist/core/ui/types/row.d.ts.map +1 -0
  48. package/dist/core/ui/types/select.d.ts +42 -0
  49. package/dist/core/ui/types/select.d.ts.map +1 -0
  50. package/dist/core/ui/utils/applySelectBase.d.ts +21 -0
  51. package/dist/core/ui/utils/applySelectBase.d.ts.map +1 -0
  52. package/dist/core/ui/utils/formatList.d.ts +12 -0
  53. package/dist/core/ui/utils/formatList.d.ts.map +1 -0
  54. package/dist/core/ui/utils/formatText.d.ts +46 -0
  55. package/dist/core/ui/utils/formatText.d.ts.map +1 -0
  56. package/dist/core/ui/utils/getAttachmentName.d.ts +8 -0
  57. package/dist/core/ui/utils/getAttachmentName.d.ts.map +1 -0
  58. package/dist/core/ui/utils/index.d.ts +7 -0
  59. package/dist/core/ui/utils/index.d.ts.map +1 -0
  60. package/dist/core/ui/utils/resolveSelectBase.d.ts +16 -0
  61. package/dist/core/ui/utils/resolveSelectBase.d.ts.map +1 -0
  62. package/dist/core/ui/utils/splitContainerArgs.d.ts +12 -0
  63. package/dist/core/ui/utils/splitContainerArgs.d.ts.map +1 -0
  64. package/dist/core/ui/validators/button.d.ts +8 -0
  65. package/dist/core/ui/validators/button.d.ts.map +1 -0
  66. package/dist/core/ui/validators/container.d.ts +51 -0
  67. package/dist/core/ui/validators/container.d.ts.map +1 -0
  68. package/dist/core/ui/validators/index.d.ts +18 -0
  69. package/dist/core/ui/validators/index.d.ts.map +1 -0
  70. package/dist/core/ui/validators/select.d.ts +8 -0
  71. package/dist/core/ui/validators/select.d.ts.map +1 -0
  72. package/dist/create/generator.d.ts.map +1 -1
  73. package/dist/index.cjs +2099 -869
  74. package/dist/index.js +2135 -905
  75. package/package.json +2 -2
  76. package/dist/commands/create/index.d.ts +0 -4
  77. package/dist/commands/create/index.d.ts.map +0 -1
  78. package/dist/commands/create/index.js +0 -867
  79. package/dist/commands/create/prompts.d.ts +0 -46
  80. package/dist/commands/create/prompts.d.ts.map +0 -1
  81. package/dist/commands/create/prompts.js +0 -105
  82. package/dist/commands/create/template.d.ts +0 -23
  83. package/dist/commands/create/template.d.ts.map +0 -1
  84. package/dist/commands/create/template.js +0 -762
  85. package/dist/commands/create/utils.d.ts +0 -45
  86. package/dist/commands/create/utils.d.ts.map +0 -1
  87. package/dist/commands/create/utils.js +0 -119
  88. package/dist/core/ui/builders.d.ts +0 -87
  89. package/dist/core/ui/builders.d.ts.map +0 -1
  90. package/dist/core/ui/normalize.d.ts +0 -17
  91. package/dist/core/ui/normalize.d.ts.map +0 -1
  92. package/dist/core/ui/validate.d.ts +0 -14
  93. package/dist/core/ui/validate.d.ts.map +0 -1
@@ -0,0 +1,44 @@
1
+ import { ContainerBuilder } from 'discord.js';
2
+ import type { ContainerInput, ContainerOptions, DisplayInput, SectionOptions, SectionTexts } from '../types';
3
+ /**
4
+ * Creates a public section component.
5
+ *
6
+ * @param texts Section text blocks.
7
+ * @param opts Section accessory options.
8
+ * @returns Public section component.
9
+ */
10
+ export declare function section(texts: SectionTexts, opts?: SectionOptions): {
11
+ button?: import("../types").Button;
12
+ thumbnail?: import("../types").Thumbnail;
13
+ type: "section";
14
+ texts: SectionTexts;
15
+ };
16
+ /**
17
+ * Creates a public container builder.
18
+ *
19
+ * @param args Container options followed by components, or components only.
20
+ * @returns Discord container builder.
21
+ */
22
+ export declare function container(...args: [ContainerOptions, ...ContainerInput[]] | ContainerInput[]): ContainerBuilder;
23
+ /**
24
+ * Creates a rendered display component array from public display inputs.
25
+ *
26
+ * @param components Display inputs to render.
27
+ * @returns Rendered display components with attachment metadata.
28
+ */
29
+ export declare function render(...components: DisplayInput[]): import("..").RenderedComponents;
30
+ /**
31
+ * Sends a rendered component payload through an interaction reply.
32
+ *
33
+ * @param interaction Reply-capable interaction.
34
+ * @param payload Message payload.
35
+ * @returns Interaction reply promise.
36
+ */
37
+ export declare function send(interaction: {
38
+ reply(options: unknown): Promise<unknown>;
39
+ }, payload: {
40
+ ephemeral?: boolean;
41
+ files?: readonly unknown[];
42
+ components: import('../types').RenderedComponents;
43
+ }): Promise<unknown>;
44
+ //# sourceMappingURL=container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/builders/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,YAAY,CAAC;AAE5D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAclB;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,GAAE,cAAmB;;;;;EAErE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,GAAG,IAAI,EAAE,CAAC,gBAAgB,EAAE,GAAG,cAAc,EAAE,CAAC,GAAG,cAAc,EAAE,oBAcpE;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,UAAU,EAAE,YAAY,EAAE,mCAKnD;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAClB,WAAW,EAAE;IAAE,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,EAC1D,OAAO,EAAE;IACP,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC3B,UAAU,EAAE,OAAO,UAAU,EAAE,kBAAkB,CAAC;CACnD,oBAoBF"}
@@ -0,0 +1,41 @@
1
+ import { button, divider, gallery, image, row, separator, thumbnail } from './primitives';
2
+ import { channel, mentionable, role, string, user } from './select';
3
+ import { container, render, section, send } from './container';
4
+ /** Public UI factory exposing the component builders used across the bot. */
5
+ export declare const ui: {
6
+ readonly text: import("./primitives").TextBuilder;
7
+ readonly separator: typeof separator;
8
+ readonly divider: typeof divider;
9
+ readonly button: typeof button;
10
+ readonly select: {
11
+ readonly user: typeof user;
12
+ readonly string: typeof string;
13
+ readonly role: typeof role;
14
+ readonly channel: typeof channel;
15
+ readonly mentionable: typeof mentionable;
16
+ };
17
+ readonly section: typeof section;
18
+ readonly thumbnail: typeof thumbnail;
19
+ readonly gallery: typeof gallery;
20
+ readonly image: typeof image;
21
+ readonly file: ((url: import("../types").AttachmentUrlString, fileOrSpoiler?: unknown | boolean, spoiler?: boolean) => {
22
+ type: "file";
23
+ url: `attachment://${string}`;
24
+ spoiler: boolean;
25
+ attachment: unknown;
26
+ }) & {
27
+ fromAttachment: (attachment: unknown, spoiler?: boolean) => {
28
+ type: "file";
29
+ url: `attachment://${string}`;
30
+ spoiler: boolean;
31
+ attachment: unknown;
32
+ };
33
+ };
34
+ readonly row: typeof row;
35
+ readonly container: typeof container;
36
+ readonly render: typeof render;
37
+ readonly send: typeof send;
38
+ };
39
+ export type { MessageSendOptions, MessageSendPayload, ReplyableInteraction, } from '../types';
40
+ export { toDisplayComponents } from '../normalizers';
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/builders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,OAAO,EAEP,OAAO,EACP,KAAK,EACL,GAAG,EACH,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAS/D,6EAA6E;AAC7E,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBL,CAAC;AAEX,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,134 @@
1
+ import { SeparatorBuilder } from 'discord.js';
2
+ import type { AttachmentUrlString, Button, MediaItem, TextInput, TextComponent, TextStyleOptions, Thumbnail } from '../types';
3
+ /** Text builder with markdown helpers attached. */
4
+ export type TextBuilder = {
5
+ (content: TextInput): TextComponent;
6
+ (content: TextInput, options?: TextStyleOptions): TextComponent;
7
+ /**
8
+ * Formats a bullet list as markdown text.
9
+ *
10
+ * @param items List items.
11
+ * @returns Markdown text component.
12
+ */
13
+ list(items: TextInput): TextComponent;
14
+ /**
15
+ * Formats a numbered list as markdown text.
16
+ *
17
+ * @param items List items.
18
+ * @returns Markdown text component.
19
+ */
20
+ ordered(items: TextInput): TextComponent;
21
+ /**
22
+ * Formats inline code as markdown text.
23
+ *
24
+ * @param content Inline code content.
25
+ * @returns Markdown text component.
26
+ */
27
+ code(content: TextInput): TextComponent;
28
+ /**
29
+ * Formats quoted text as markdown text.
30
+ *
31
+ * @param input Text or lines to quote.
32
+ * @returns Markdown text component.
33
+ */
34
+ quote(input: TextInput): TextComponent;
35
+ /**
36
+ * Formats spoiler text as markdown text.
37
+ *
38
+ * @param input Text or lines to hide.
39
+ * @returns Markdown text component.
40
+ */
41
+ spoiler(input: TextInput): TextComponent;
42
+ };
43
+ /** Public text factory used by `ui.text(...)`. */
44
+ export declare const text: TextBuilder;
45
+ /**
46
+ * Creates a public separator builder.
47
+ *
48
+ * @param options Separator configuration.
49
+ * @returns Discord separator builder.
50
+ */
51
+ export declare function separator(options?: Omit<import('../types').SeparatorComponent, 'type'>): SeparatorBuilder;
52
+ /**
53
+ * @deprecated Use ui.separator(...) instead.
54
+ *
55
+ * Creates a public separator builder.
56
+ *
57
+ * @param options Separator configuration.
58
+ * @returns Discord separator builder.
59
+ */
60
+ export declare function divider(options?: Omit<import('../types').SeparatorComponent, 'type'>): SeparatorBuilder;
61
+ /**
62
+ * Creates a public button descriptor.
63
+ *
64
+ * @param options Button configuration.
65
+ * @returns Public button descriptor.
66
+ */
67
+ export declare function button(options: Button): Button;
68
+ /**
69
+ * Creates a public thumbnail descriptor.
70
+ *
71
+ * @param options Thumbnail configuration.
72
+ * @returns Public thumbnail descriptor.
73
+ */
74
+ export declare function thumbnail(options: Thumbnail): Thumbnail;
75
+ /**
76
+ * Creates a public media gallery descriptor.
77
+ *
78
+ * @param items Gallery items.
79
+ * @returns Public gallery descriptor.
80
+ */
81
+ export declare function gallery(...items: MediaItem[]): {
82
+ type: "gallery";
83
+ items: MediaItem[];
84
+ };
85
+ /**
86
+ * Creates a public media item descriptor.
87
+ *
88
+ * @param options Media item configuration.
89
+ * @returns Public media item descriptor.
90
+ */
91
+ export declare function image(options: MediaItem): MediaItem;
92
+ /**
93
+ * Creates a public row descriptor.
94
+ *
95
+ * @param components Row components.
96
+ * @returns Public row descriptor.
97
+ */
98
+ export declare function row(...components: import('../types').RowComponent[]): {
99
+ type: "row";
100
+ components: import("../types").RowComponent[];
101
+ };
102
+ /**
103
+ * Creates a public file descriptor.
104
+ *
105
+ * @param url Attachment URL.
106
+ * @param fileOrSpoiler Attachment payload or spoiler flag.
107
+ * @param spoiler Spoiler flag when an attachment payload is provided.
108
+ * @returns Public file descriptor.
109
+ */
110
+ declare function buildFile(url: AttachmentUrlString, fileOrSpoiler?: unknown | boolean, spoiler?: boolean): {
111
+ type: "file";
112
+ url: `attachment://${string}`;
113
+ spoiler: boolean;
114
+ attachment: unknown;
115
+ };
116
+ /**
117
+ * Creates a public file descriptor from an attachment-like object.
118
+ *
119
+ * @param attachment Attachment-like object.
120
+ * @param spoiler Whether the file should be marked as spoiler.
121
+ * @returns Public file descriptor.
122
+ */
123
+ declare function fromAttachment(attachment: unknown, spoiler?: boolean): {
124
+ type: "file";
125
+ url: `attachment://${string}`;
126
+ spoiler: boolean;
127
+ attachment: unknown;
128
+ };
129
+ /** Public file factory used by `ui.file(...)`. */
130
+ export declare const file: typeof buildFile & {
131
+ fromAttachment: typeof fromAttachment;
132
+ };
133
+ export {};
134
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/builders/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EACV,mBAAmB,EACnB,MAAM,EACN,SAAS,EACT,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,SAAS,EACV,MAAM,UAAU,CAAC;AAUlB,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,OAAO,EAAE,SAAS,GAAG,aAAa,CAAC;IACpC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,aAAa,CAAC;IAChE;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC;IACtC;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC;IACzC;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,aAAa,CAAC;IACxC;;;;;OAKG;IACH,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC;IACvC;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC;CAC1C,CAAC;AA+DF,kDAAkD;AAClD,eAAO,MAAM,IAAI,EAAE,WAMjB,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,OAAO,GAAE,IAAI,CAAC,OAAO,UAAU,EAAE,kBAAkB,EAAE,MAAM,CAAM,oBAGlE;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,OAAO,GAAE,IAAI,CAAC,OAAO,UAAU,EAAE,kBAAkB,EAAE,MAAM,CAAM,oBAGlE;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAK,EAAE,SAAS,EAAE;;;EAE5C;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,GAAG,UAAU,EAAE,OAAO,UAAU,EAAE,YAAY,EAAE;;;EAEnE;AAiBD;;;;;;;GAOG;AACH,iBAAS,SAAS,CAChB,GAAG,EAAE,mBAAmB,EACxB,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,EACjC,OAAO,UAAQ;;;;;EAGhB;AAED;;;;;;GAMG;AACH,iBAAS,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,UAAQ;;;;;EAG3D;AAED,kDAAkD;AAClD,eAAO,MAAM,IAAI;;CAA+C,CAAC"}
@@ -0,0 +1,61 @@
1
+ import type { ChannelType } from 'discord.js';
2
+ import type { ChannelSelect, MentionableSelect, RoleSelect, SelectBase, StringSelect, StringSelectOption, UserSelect } from '../types';
3
+ type SelectBuilderOptions = Omit<SelectBase, 'id'>;
4
+ type SelectBuilderInput = SelectBuilderOptions & {
5
+ customId: SelectBase['id'];
6
+ };
7
+ type ChannelSelectBuilderInput = SelectBuilderInput & {
8
+ channelTypes?: readonly ChannelType[];
9
+ };
10
+ type StringSelectBuilderInput = SelectBuilderInput & {
11
+ options: readonly StringSelectOption[];
12
+ };
13
+ /**
14
+ * Creates a public user-select descriptor.
15
+ *
16
+ * @param customId Custom id or full select config.
17
+ * @param opts Optional select configuration when a custom id is provided.
18
+ * @returns Public user-select descriptor.
19
+ */
20
+ export declare function user(customId: SelectBase['id'], opts?: SelectBuilderOptions): UserSelect;
21
+ export declare function user(opts: SelectBuilderInput): UserSelect;
22
+ /**
23
+ * Creates a public role-select descriptor.
24
+ *
25
+ * @param customId Custom id or full select config.
26
+ * @param opts Optional select configuration when a custom id is provided.
27
+ * @returns Public role-select descriptor.
28
+ */
29
+ export declare function role(customId: SelectBase['id'], opts?: SelectBuilderOptions): RoleSelect;
30
+ export declare function role(opts: SelectBuilderInput): RoleSelect;
31
+ /**
32
+ * Creates a public mentionable-select descriptor.
33
+ *
34
+ * @param customId Custom id or full select config.
35
+ * @param opts Optional select configuration when a custom id is provided.
36
+ * @returns Public mentionable-select descriptor.
37
+ */
38
+ export declare function mentionable(customId: SelectBase['id'], opts?: SelectBuilderOptions): MentionableSelect;
39
+ export declare function mentionable(opts: SelectBuilderInput): MentionableSelect;
40
+ /**
41
+ * Creates a public channel-select descriptor.
42
+ *
43
+ * @param customId Custom id or full select config.
44
+ * @param channelTypes Optional channel type filter list.
45
+ * @param opts Optional select configuration when a custom id is provided.
46
+ * @returns Public channel-select descriptor.
47
+ */
48
+ export declare function channel(customId: SelectBase['id'], channelTypes?: readonly ChannelType[], opts?: SelectBuilderOptions): ChannelSelect;
49
+ export declare function channel(opts: ChannelSelectBuilderInput): ChannelSelect;
50
+ /**
51
+ * Creates a public string-select descriptor.
52
+ *
53
+ * @param customId Custom id or full select config.
54
+ * @param options Select options when a custom id is provided.
55
+ * @param opts Optional select configuration when a custom id is provided.
56
+ * @returns Public string-select descriptor.
57
+ */
58
+ export declare function string(customId: SelectBase['id'], options: readonly StringSelectOption[], opts?: SelectBuilderOptions): StringSelect;
59
+ export declare function string(opts: StringSelectBuilderInput): StringSelect;
60
+ export {};
61
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/builders/select.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACX,MAAM,UAAU,CAAC;AAGlB,KAAK,oBAAoB,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AACnD,KAAK,kBAAkB,GAAG,oBAAoB,GAAG;IAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AAChF,KAAK,yBAAyB,GAAG,kBAAkB,GAAG;IACpD,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC,CAAC;AACF,KAAK,wBAAwB,GAAG,kBAAkB,GAAG;IACnD,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACxC,CAAC;AA6DF;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,oBAAoB,GAAG,UAAU,CAAC;AAC1F,wBAAgB,IAAI,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAAC;AAU3D;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,oBAAoB,GAAG,UAAU,CAAC;AAC1F,wBAAgB,IAAI,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAAC;AAU3D;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAC1B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,iBAAiB,CAAC;AACrB,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;AAUzE;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAC1B,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,EACrC,IAAI,CAAC,EAAE,oBAAoB,GAC1B,aAAa,CAAC;AACjB,wBAAgB,OAAO,CAAC,IAAI,EAAE,yBAAyB,GAAG,aAAa,CAAC;AA0BxE;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAC1B,OAAO,EAAE,SAAS,kBAAkB,EAAE,EACtC,IAAI,CAAC,EAAE,oBAAoB,GAC1B,YAAY,CAAC;AAChB,wBAAgB,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './limits';
2
+ export * from './patterns';
3
+ export * from './symbols';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,19 @@
1
+ /** Maximum number of components allowed in a rendered message. */
2
+ export declare const MAX_MESSAGE_COMPONENTS = 40;
3
+ /** Maximum number of characters allowed in a display text block. */
4
+ export declare const MAX_TEXT_LENGTH = 4000;
5
+ /** Maximum number of components allowed inside an action row. */
6
+ export declare const MAX_ROW_COMPONENTS = 5;
7
+ /** Maximum number of options allowed in a string select menu. */
8
+ export declare const MAX_STRING_SELECT_OPTIONS = 25;
9
+ /** Maximum length of a select placeholder. */
10
+ export declare const MAX_SELECT_PLACEHOLDER_LENGTH = 150;
11
+ /** Maximum number of text blocks allowed inside a section. */
12
+ export declare const MAX_SECTION_TEXTS = 3;
13
+ /** Maximum number of items allowed inside a gallery. */
14
+ export declare const MAX_GALLERY_ITEMS = 10;
15
+ /** Maximum length of a button label. */
16
+ export declare const MAX_BUTTON_LABEL_LENGTH = 80;
17
+ /** Maximum length of a button custom id. */
18
+ export declare const MAX_BUTTON_CUSTOM_ID_LENGTH = 100;
19
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/constants/limits.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,oEAAoE;AACpE,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,8CAA8C;AAC9C,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,wCAAwC;AACxC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,MAAM,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Matches HTTP and HTTPS URLs accepted by media components. */
2
+ export declare const HTTP_URL_PATTERN: RegExp;
3
+ /** Matches attachment URLs accepted by file components. */
4
+ export declare const ATTACHMENT_URL_PATTERN: RegExp;
5
+ /** Matches the supported accent color formats. */
6
+ export declare const HEX_COLOR_PATTERN: RegExp;
7
+ //# sourceMappingURL=patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/constants/patterns.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,QAAwB,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,QAAgC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Internal metadata key used to track container attachments. */
2
+ export declare const ATTACHMENTS: unique symbol;
3
+ /** Internal metadata key used to mark rendered component arrays. */
4
+ export declare const RENDERED: unique symbol;
5
+ /** Internal metadata key used to store rendered attachments. */
6
+ export declare const RENDERED_ATTACHMENTS: unique symbol;
7
+ //# sourceMappingURL=symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/constants/symbols.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,WAAW,eAAmC,CAAC;AAE5D,oEAAoE;AACpE,eAAO,MAAM,QAAQ,eAAgC,CAAC;AAEtD,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,eAA4C,CAAC"}
@@ -1,3 +1,5 @@
1
- export * from './builders';
2
- export * from './normalize';
1
+ export { ui } from './builders/index';
2
+ export type { MessageSendOptions, MessageSendPayload, ReplyableInteraction, } from './types';
3
+ export * from './normalizers/index';
4
+ export { validate } from './validators/index';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AACjB,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}