nexocord 1.2.0 → 2.0.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/{LICENCE → LICENSE} +3 -3
- package/README.md +193 -58
- package/dist/bin/cli.js +4382 -2903
- package/dist/cli/commands/build.command.d.ts +3 -0
- package/dist/cli/commands/build.command.d.ts.map +1 -0
- package/dist/cli/commands/create.command.d.ts +3 -0
- package/dist/cli/commands/create.command.d.ts.map +1 -0
- package/dist/cli/commands/dev.command.d.ts +3 -0
- package/dist/cli/commands/dev.command.d.ts.map +1 -0
- package/dist/cli/commands/doctor.command.d.ts +3 -0
- package/dist/cli/commands/doctor.command.d.ts.map +1 -0
- package/dist/cli/commands/info.command.d.ts +3 -0
- package/dist/cli/commands/info.command.d.ts.map +1 -0
- package/dist/cli/commands/init.command.d.ts +3 -0
- package/dist/cli/commands/init.command.d.ts.map +1 -0
- package/dist/cli/commands/start.command.d.ts +3 -0
- package/dist/cli/commands/start.command.d.ts.map +1 -0
- package/dist/cli/commands/update.command.d.ts +3 -0
- package/dist/cli/commands/update.command.d.ts.map +1 -0
- package/dist/cli/create/flow.d.ts +7 -0
- package/dist/cli/create/flow.d.ts.map +1 -0
- package/dist/cli/create/install.d.ts +1 -1
- package/dist/cli/create/install.d.ts.map +1 -1
- package/dist/cli/create/prompts.d.ts +4 -4
- package/dist/cli/create/prompts.d.ts.map +1 -1
- package/dist/cli/errors.d.ts +7 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/logger.d.ts +8 -5
- package/dist/cli/logger.d.ts.map +1 -1
- package/dist/cli/runner.d.ts +3 -3
- package/dist/cli/runner.d.ts.map +1 -1
- package/dist/cli/runtime.d.ts +3 -2
- package/dist/cli/runtime.d.ts.map +1 -1
- package/dist/cli/services/build/flow.d.ts +2 -0
- package/dist/cli/services/build/flow.d.ts.map +1 -0
- package/dist/cli/services/create/flow.d.ts +2 -0
- package/dist/cli/services/create/flow.d.ts.map +1 -0
- package/dist/cli/services/create/generator.d.ts +14 -0
- package/dist/cli/services/create/generator.d.ts.map +1 -0
- package/dist/cli/services/create/install.d.ts +3 -0
- package/dist/cli/services/create/install.d.ts.map +1 -0
- package/dist/cli/services/create/prompts.d.ts +12 -0
- package/dist/cli/services/create/prompts.d.ts.map +1 -0
- package/dist/{create/templates/bun-ts → cli/services/create/templates/bun-js}/README.md +7 -7
- package/dist/cli/services/create/templates/bun-js/src/commands/utils/ping.tpl +10 -0
- package/dist/cli/services/create/templates/bun-js/src/events/ready.tpl +9 -0
- package/dist/cli/services/create/templates/bun-js/src/index.tpl +12 -0
- package/dist/{create/templates/bun-js → cli/services/create/templates/bun-ts}/README.md +7 -7
- package/dist/{create/templates/node-js → cli/services/create/templates/bun-ts}/src/commands/utils/ping.tpl +9 -9
- package/dist/cli/services/create/templates/bun-ts/src/events/ready.tpl +9 -0
- package/dist/cli/services/create/templates/bun-ts/src/index.tpl +12 -0
- package/dist/{create/templates/node-ts → cli/services/create/templates/node-js}/README.md +7 -7
- package/dist/cli/services/create/templates/node-js/src/commands/utils/ping.tpl +10 -0
- package/dist/cli/services/create/templates/node-js/src/events/ready.tpl +9 -0
- package/dist/cli/services/create/templates/node-js/src/index.tpl +12 -0
- package/dist/{create/templates/node-js → cli/services/create/templates/node-ts}/README.md +7 -7
- package/dist/{create → cli/services/create}/templates/node-ts/src/commands/utils/ping.tpl +9 -9
- package/dist/cli/services/create/templates/node-ts/src/events/ready.tpl +9 -0
- package/dist/cli/services/create/templates/node-ts/src/index.tpl +12 -0
- package/dist/cli/services/dev/flow.d.ts +5 -0
- package/dist/cli/services/dev/flow.d.ts.map +1 -0
- package/dist/cli/services/doctor/flow.d.ts +2 -0
- package/dist/cli/services/doctor/flow.d.ts.map +1 -0
- package/dist/cli/services/info/flow.d.ts +2 -0
- package/dist/cli/services/info/flow.d.ts.map +1 -0
- package/dist/cli/services/init/flow.d.ts +4 -0
- package/dist/cli/services/init/flow.d.ts.map +1 -0
- package/dist/cli/services/init/project.d.ts +15 -0
- package/dist/cli/services/init/project.d.ts.map +1 -0
- package/dist/cli/services/init/types.d.ts +20 -0
- package/dist/cli/services/init/types.d.ts.map +1 -0
- package/dist/cli/services/start/flow.d.ts +2 -0
- package/dist/cli/services/start/flow.d.ts.map +1 -0
- package/dist/cli/services/update/flow.d.ts +2 -0
- package/dist/cli/services/update/flow.d.ts.map +1 -0
- package/dist/cli/utils.d.ts +17 -3
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/core/app.d.ts +1 -1
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/client/ExtendedClient.d.ts +3 -3
- package/dist/core/client/ExtendedClient.d.ts.map +1 -1
- package/dist/core/client/Interactions/autocomplete.d.ts +2 -1
- package/dist/core/client/Interactions/autocomplete.d.ts.map +1 -1
- package/dist/core/client/Interactions/command.d.ts +2 -1
- package/dist/core/client/Interactions/command.d.ts.map +1 -1
- package/dist/core/client/Interactions/index.d.ts +2 -1
- package/dist/core/client/Interactions/index.d.ts.map +1 -1
- package/dist/core/client/Interactions/responder.d.ts +2 -1
- package/dist/core/client/Interactions/responder.d.ts.map +1 -1
- package/dist/core/client/bootstrap.d.ts.map +1 -1
- package/dist/core/creators/command.d.ts +3 -0
- package/dist/core/creators/command.d.ts.map +1 -0
- package/dist/core/creators/context.d.ts +16 -0
- package/dist/core/creators/context.d.ts.map +1 -0
- package/dist/core/creators/events.d.ts +4 -0
- package/dist/core/creators/events.d.ts.map +1 -0
- package/dist/core/creators/index.d.ts +7 -0
- package/dist/core/creators/index.d.ts.map +1 -0
- package/dist/core/creators/option.d.ts +132 -0
- package/dist/core/creators/option.d.ts.map +1 -0
- package/dist/core/creators/responder.d.ts +3 -0
- package/dist/core/creators/responder.d.ts.map +1 -0
- package/dist/core/creators/subcommand.d.ts +2 -0
- package/dist/core/creators/subcommand.d.ts.map +1 -0
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/modules/Responders/manager.d.ts.map +1 -1
- package/dist/core/modules/Responders/route.d.ts.map +1 -1
- package/dist/core/modules/Responders/session.d.ts.map +1 -1
- package/dist/core/modules/commands/context.d.ts +14 -0
- package/dist/core/modules/commands/context.d.ts.map +1 -0
- package/dist/core/modules/commands/handler.d.ts +5 -5
- package/dist/core/modules/commands/handler.d.ts.map +1 -1
- package/dist/core/modules/commands/manager.d.ts +1 -1
- package/dist/core/modules/commands/manager.d.ts.map +1 -1
- package/dist/core/modules/events/handler.d.ts +4 -4
- package/dist/core/modules/events/handler.d.ts.map +1 -1
- package/dist/core/modules/events/manager.d.ts +1 -1
- package/dist/core/modules/events/manager.d.ts.map +1 -1
- package/dist/core/modules/index.d.ts +1 -1
- package/dist/core/modules/responders/manager.d.ts +8 -0
- package/dist/core/modules/responders/manager.d.ts.map +1 -0
- package/dist/core/modules/responders/route.d.ts +13 -0
- package/dist/core/modules/responders/route.d.ts.map +1 -0
- package/dist/core/modules/responders/session.d.ts +9 -0
- package/dist/core/modules/responders/session.d.ts.map +1 -0
- package/dist/core/settings.d.ts +1 -1
- package/dist/core/settings.d.ts.map +1 -1
- package/dist/core/types/Command.d.ts +2 -2
- package/dist/core/types/Command.d.ts.map +1 -1
- package/dist/core/types/Event.d.ts +2 -2
- package/dist/core/types/Responder.d.ts +8 -6
- package/dist/core/types/Responder.d.ts.map +1 -1
- package/dist/core/types/Run.d.ts +6 -5
- package/dist/core/types/Run.d.ts.map +1 -1
- package/dist/core/types/Settings.d.ts +3 -3
- package/dist/core/types/Settings.d.ts.map +1 -1
- package/dist/core/types/Ui.d.ts +91 -12
- package/dist/core/types/Ui.d.ts.map +1 -1
- package/dist/core/types/index.js +1042 -446
- package/dist/core/ui/builders.d.ts +76 -0
- package/dist/core/ui/builders.d.ts.map +1 -0
- package/dist/core/ui/index.d.ts +1 -4
- package/dist/core/ui/index.d.ts.map +1 -1
- package/dist/core/ui/index.js +1462 -1036
- package/dist/core/ui/normalize.d.ts +13 -0
- package/dist/core/ui/normalize.d.ts.map +1 -0
- package/dist/core/ui/validate.d.ts +14 -0
- package/dist/core/ui/validate.d.ts.map +1 -0
- package/dist/core/utils/Cooldown.d.ts.map +1 -1
- package/dist/core/utils/Responder.d.ts +4 -4
- package/dist/core/utils/Responder.d.ts.map +1 -1
- package/dist/core/utils/cooldown.d.ts +9 -0
- package/dist/core/utils/cooldown.d.ts.map +1 -0
- package/dist/core/utils/extensions.d.ts +1 -1
- package/dist/core/utils/extensions.d.ts.map +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/core/utils/index.js +148 -89
- package/dist/core/utils/logger.d.ts +12 -0
- package/dist/core/utils/logger.d.ts.map +1 -0
- package/dist/core/utils/responder.d.ts +5 -0
- package/dist/core/utils/responder.d.ts.map +1 -0
- package/dist/index.cjs +3638 -2037
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3594 -1979
- package/package.json +13 -18
- package/dist/cli/create/create.d.ts +0 -2
- package/dist/cli/create/create.d.ts.map +0 -1
- package/dist/cli/create/index.d.ts +0 -2
- package/dist/cli/create/index.d.ts.map +0 -1
- package/dist/commands/create.command.d.ts +0 -3
- package/dist/commands/create.command.d.ts.map +0 -1
- package/dist/commands/dev.command.d.ts +0 -3
- package/dist/commands/dev.command.d.ts.map +0 -1
- package/dist/commands/start.command.d.ts +0 -3
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/core/creators.d.ts +0 -4
- package/dist/core/creators.d.ts.map +0 -1
- package/dist/core/ui/builders/container.d.ts +0 -44
- package/dist/core/ui/builders/container.d.ts.map +0 -1
- package/dist/core/ui/builders/index.d.ts +0 -41
- package/dist/core/ui/builders/index.d.ts.map +0 -1
- package/dist/core/ui/builders/primitives.d.ts +0 -134
- package/dist/core/ui/builders/primitives.d.ts.map +0 -1
- package/dist/core/ui/builders/select.d.ts +0 -61
- package/dist/core/ui/builders/select.d.ts.map +0 -1
- package/dist/core/ui/constants/index.d.ts +0 -4
- package/dist/core/ui/constants/index.d.ts.map +0 -1
- package/dist/core/ui/constants/limits.d.ts +0 -19
- package/dist/core/ui/constants/limits.d.ts.map +0 -1
- package/dist/core/ui/constants/patterns.d.ts +0 -7
- package/dist/core/ui/constants/patterns.d.ts.map +0 -1
- package/dist/core/ui/constants/symbols.d.ts +0 -7
- package/dist/core/ui/constants/symbols.d.ts.map +0 -1
- package/dist/core/ui/normalizers/button.d.ts +0 -25
- package/dist/core/ui/normalizers/button.d.ts.map +0 -1
- package/dist/core/ui/normalizers/container.d.ts +0 -68
- package/dist/core/ui/normalizers/container.d.ts.map +0 -1
- package/dist/core/ui/normalizers/index.d.ts +0 -6
- package/dist/core/ui/normalizers/index.d.ts.map +0 -1
- package/dist/core/ui/normalizers/media.d.ts +0 -17
- package/dist/core/ui/normalizers/media.d.ts.map +0 -1
- package/dist/core/ui/normalizers/select.d.ts +0 -45
- package/dist/core/ui/normalizers/select.d.ts.map +0 -1
- package/dist/core/ui/types/button.d.ts +0 -11
- package/dist/core/ui/types/button.d.ts.map +0 -1
- package/dist/core/ui/types/container.d.ts +0 -53
- package/dist/core/ui/types/container.d.ts.map +0 -1
- package/dist/core/ui/types/index.d.ts +0 -8
- package/dist/core/ui/types/index.d.ts.map +0 -1
- package/dist/core/ui/types/media.d.ts +0 -29
- package/dist/core/ui/types/media.d.ts.map +0 -1
- package/dist/core/ui/types/message.d.ts +0 -15
- package/dist/core/ui/types/message.d.ts.map +0 -1
- package/dist/core/ui/types/render.d.ts +0 -7
- package/dist/core/ui/types/render.d.ts.map +0 -1
- package/dist/core/ui/types/row.d.ts +0 -10
- package/dist/core/ui/types/row.d.ts.map +0 -1
- package/dist/core/ui/types/select.d.ts +0 -42
- package/dist/core/ui/types/select.d.ts.map +0 -1
- package/dist/core/ui/utils/applySelectBase.d.ts +0 -21
- package/dist/core/ui/utils/applySelectBase.d.ts.map +0 -1
- package/dist/core/ui/utils/formatList.d.ts +0 -12
- package/dist/core/ui/utils/formatList.d.ts.map +0 -1
- package/dist/core/ui/utils/formatText.d.ts +0 -46
- package/dist/core/ui/utils/formatText.d.ts.map +0 -1
- package/dist/core/ui/utils/getAttachmentName.d.ts +0 -8
- package/dist/core/ui/utils/getAttachmentName.d.ts.map +0 -1
- package/dist/core/ui/utils/index.d.ts +0 -7
- package/dist/core/ui/utils/index.d.ts.map +0 -1
- package/dist/core/ui/utils/resolveSelectBase.d.ts +0 -16
- package/dist/core/ui/utils/resolveSelectBase.d.ts.map +0 -1
- package/dist/core/ui/utils/splitContainerArgs.d.ts +0 -12
- package/dist/core/ui/utils/splitContainerArgs.d.ts.map +0 -1
- package/dist/core/ui/validators/button.d.ts +0 -8
- package/dist/core/ui/validators/button.d.ts.map +0 -1
- package/dist/core/ui/validators/container.d.ts +0 -51
- package/dist/core/ui/validators/container.d.ts.map +0 -1
- package/dist/core/ui/validators/index.d.ts +0 -18
- package/dist/core/ui/validators/index.d.ts.map +0 -1
- package/dist/core/ui/validators/select.d.ts +0 -8
- package/dist/core/ui/validators/select.d.ts.map +0 -1
- package/dist/create/generator.d.ts +0 -10
- package/dist/create/generator.d.ts.map +0 -1
- package/dist/create/prompts.d.ts +0 -8
- package/dist/create/prompts.d.ts.map +0 -1
- package/dist/create/templates/bun-js/src/commands/utils/ping.tpl +0 -10
- package/dist/create/templates/bun-js/src/events/ready.tpl +0 -10
- package/dist/create/templates/bun-js/src/index.tpl +0 -11
- package/dist/create/templates/bun-ts/src/commands/utils/ping.tpl +0 -10
- package/dist/create/templates/bun-ts/src/events/ready.tpl +0 -10
- package/dist/create/templates/bun-ts/src/index.tpl +0 -11
- package/dist/create/templates/node-js/src/events/ready.tpl +0 -10
- package/dist/create/templates/node-js/src/index.tpl +0 -11
- package/dist/create/templates/node-ts/src/events/ready.tpl +0 -10
- package/dist/create/templates/node-ts/src/index.tpl +0 -11
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ChannelSelectMenuBuilder, MentionableSelectMenuBuilder, RoleSelectMenuBuilder, StringSelectMenuBuilder, UserSelectMenuBuilder } from 'discord.js';
|
|
2
|
-
import type { ChannelSelect, SelectBase, SelectMenu, StringSelect } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Discord user select builder from a public descriptor.
|
|
5
|
-
*
|
|
6
|
-
* @param select User select descriptor.
|
|
7
|
-
* @returns Discord user select builder.
|
|
8
|
-
*/
|
|
9
|
-
export declare function normalizeUserSelect(select: SelectBase): UserSelectMenuBuilder;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a Discord role select builder from a public descriptor.
|
|
12
|
-
*
|
|
13
|
-
* @param select Role select descriptor.
|
|
14
|
-
* @returns Discord role select builder.
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeRoleSelect(select: SelectBase): RoleSelectMenuBuilder;
|
|
17
|
-
/**
|
|
18
|
-
* Creates a Discord mentionable select builder from a public descriptor.
|
|
19
|
-
*
|
|
20
|
-
* @param select Mentionable select descriptor.
|
|
21
|
-
* @returns Discord mentionable select builder.
|
|
22
|
-
*/
|
|
23
|
-
export declare function normalizeMentionableSelect(select: SelectBase): MentionableSelectMenuBuilder;
|
|
24
|
-
/**
|
|
25
|
-
* Creates a Discord channel select builder from a public descriptor.
|
|
26
|
-
*
|
|
27
|
-
* @param select Channel select descriptor.
|
|
28
|
-
* @returns Discord channel select builder.
|
|
29
|
-
*/
|
|
30
|
-
export declare function normalizeChannelSelect(select: ChannelSelect): ChannelSelectMenuBuilder;
|
|
31
|
-
/**
|
|
32
|
-
* Creates a Discord string select builder from a public descriptor.
|
|
33
|
-
*
|
|
34
|
-
* @param select String select descriptor.
|
|
35
|
-
* @returns Discord string select builder.
|
|
36
|
-
*/
|
|
37
|
-
export declare function normalizeStringSelect(select: StringSelect): StringSelectMenuBuilder;
|
|
38
|
-
/**
|
|
39
|
-
* Creates the matching Discord select builder for a public select descriptor.
|
|
40
|
-
*
|
|
41
|
-
* @param select Select descriptor.
|
|
42
|
-
* @returns Discord select builder.
|
|
43
|
-
*/
|
|
44
|
-
export declare function normalizeSelect(select: SelectMenu): UserSelectMenuBuilder | RoleSelectMenuBuilder | MentionableSelectMenuBuilder | ChannelSelectMenuBuilder | StringSelectMenuBuilder;
|
|
45
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/normalizers/select.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAY,EAEb,MAAM,UAAU,CAAC;AAIlB;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,yBAGrD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,yBAGrD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,gCAG5D;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,4BAM3D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,2BAczD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,qIAoBjD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ButtonStyle } from 'discord.js';
|
|
2
|
-
/** Branded type used for component custom ids. */
|
|
3
|
-
export type ButtonID = string & {};
|
|
4
|
-
/** Public button descriptor used by `ui.button(...)`. */
|
|
5
|
-
export type Button = {
|
|
6
|
-
label: string;
|
|
7
|
-
customId: ButtonID;
|
|
8
|
-
emoji?: string;
|
|
9
|
-
style?: ButtonStyle;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,EAAE,CAAC;AAEnC,yDAAyD;AACzD,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { ActionRowBuilder, AnyComponentBuilder, ContainerBuilder, FileBuilder, MediaGalleryBuilder, SectionBuilder, SeparatorBuilder, SeparatorSpacingSize, TextDisplayBuilder } from 'discord.js';
|
|
2
|
-
import type { Button } from './button';
|
|
3
|
-
import type { FileComponent, MediaGallery, Thumbnail } from './media';
|
|
4
|
-
import type { Row } from './row';
|
|
5
|
-
/** Any component that can be rendered as a display component. */
|
|
6
|
-
export type DisplayComponent = ContainerBuilder | TextDisplayBuilder | SeparatorBuilder | SectionBuilder | MediaGalleryBuilder | FileBuilder | ActionRowBuilder<AnyComponentBuilder>;
|
|
7
|
-
/** Display component that can appear inside a container. */
|
|
8
|
-
export type ContainerChild = Exclude<DisplayComponent, ContainerBuilder>;
|
|
9
|
-
/** Text payload used by section components. */
|
|
10
|
-
export type SectionTexts = [string] | [string, string] | [string, string, string];
|
|
11
|
-
/** Section accessory options. */
|
|
12
|
-
export type SectionOptions = {
|
|
13
|
-
button?: Button;
|
|
14
|
-
thumbnail?: Thumbnail;
|
|
15
|
-
};
|
|
16
|
-
/** Text input accepted by `ui.text(...)` and its helpers. */
|
|
17
|
-
export type TextInput = string | readonly string[];
|
|
18
|
-
/** Text formatting options used by `ui.text(...)`. */
|
|
19
|
-
export type TextStyleOptions = {
|
|
20
|
-
size?: 1 | 2 | 3 | 4;
|
|
21
|
-
bold?: boolean;
|
|
22
|
-
italic?: boolean;
|
|
23
|
-
underline?: boolean;
|
|
24
|
-
};
|
|
25
|
-
/** Public text component used by `ui.text(...)`. */
|
|
26
|
-
export type TextComponent = {
|
|
27
|
-
type: 'text';
|
|
28
|
-
content: string;
|
|
29
|
-
};
|
|
30
|
-
/** Public separator component used by `ui.separator(...)`. */
|
|
31
|
-
export type SeparatorComponent = {
|
|
32
|
-
type: 'separator';
|
|
33
|
-
spacing?: SeparatorSpacingSize;
|
|
34
|
-
divider?: boolean;
|
|
35
|
-
};
|
|
36
|
-
/** Public section component used by `ui.section(...)`. */
|
|
37
|
-
export type SectionComponent = {
|
|
38
|
-
type: 'section';
|
|
39
|
-
texts: SectionTexts;
|
|
40
|
-
button?: Button;
|
|
41
|
-
thumbnail?: Thumbnail;
|
|
42
|
-
};
|
|
43
|
-
/** Public container node used by `ui.container(...)`. */
|
|
44
|
-
export type ContainerNode = TextComponent | SeparatorComponent | SectionComponent | Row | MediaGallery | FileComponent;
|
|
45
|
-
/** Allowed container input passed to `ui.container(...)`. */
|
|
46
|
-
export type ContainerInput = ContainerChild | ContainerNode;
|
|
47
|
-
/** Optional container configuration. */
|
|
48
|
-
export type ContainerOptions = {
|
|
49
|
-
color?: number | string;
|
|
50
|
-
};
|
|
51
|
-
/** Any component accepted by `ui.render(...)`. */
|
|
52
|
-
export type DisplayInput = DisplayComponent | ContainerNode;
|
|
53
|
-
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,iEAAiE;AACjE,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,WAAW,GACX,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAE1C,4DAA4D;AAC5D,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;AAEzE,+CAA+C;AAC/C,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAElF,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;AAEnD,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oDAAoD;AACpD,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,8DAA8D;AAC9D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,yDAAyD;AACzD,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,kBAAkB,GAClB,gBAAgB,GAChB,GAAG,GACH,YAAY,GACZ,aAAa,CAAC;AAElB,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC;AAE5D,wCAAwC;AACxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** HTTP or HTTPS URL used by media components. */
|
|
2
|
-
export type UrlString = `http://${string}` | `https://${string}`;
|
|
3
|
-
/** Attachment URL used by file components. */
|
|
4
|
-
export type AttachmentUrlString = `attachment://${string}`;
|
|
5
|
-
/** Media item used by galleries and thumbnails. */
|
|
6
|
-
export type MediaItem = {
|
|
7
|
-
url: UrlString;
|
|
8
|
-
description?: string;
|
|
9
|
-
spoiler?: boolean;
|
|
10
|
-
};
|
|
11
|
-
/** Public gallery descriptor used by `ui.gallery(...)`. */
|
|
12
|
-
export type MediaGallery = {
|
|
13
|
-
type: 'gallery';
|
|
14
|
-
items: readonly MediaItem[];
|
|
15
|
-
};
|
|
16
|
-
/** Public thumbnail descriptor used by section components. */
|
|
17
|
-
export type Thumbnail = {
|
|
18
|
-
url: UrlString;
|
|
19
|
-
description?: string;
|
|
20
|
-
spoiler?: boolean;
|
|
21
|
-
};
|
|
22
|
-
/** Public file descriptor used by `ui.file(...)`. */
|
|
23
|
-
export type FileComponent = {
|
|
24
|
-
type: 'file';
|
|
25
|
-
url: AttachmentUrlString;
|
|
26
|
-
spoiler?: boolean;
|
|
27
|
-
attachment?: unknown;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/media.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,MAAM,SAAS,GAAG,UAAU,MAAM,EAAE,GAAG,WAAW,MAAM,EAAE,CAAC;AAEjE,8CAA8C;AAC9C,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,MAAM,EAAE,CAAC;AAE3D,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,SAAS,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;CAC7B,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,SAAS,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,mBAAmB,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { RenderedComponents } from './render';
|
|
2
|
-
/** Options accepted by `ui.send(...)`. */
|
|
3
|
-
export type MessageSendOptions = {
|
|
4
|
-
ephemeral?: boolean;
|
|
5
|
-
files?: readonly unknown[];
|
|
6
|
-
};
|
|
7
|
-
/** Payload accepted by `ui.send(...)`. */
|
|
8
|
-
export type MessageSendPayload = MessageSendOptions & {
|
|
9
|
-
components: RenderedComponents;
|
|
10
|
-
};
|
|
11
|
-
/** Minimal interaction shape used by `ui.send(...)`. */
|
|
12
|
-
export type ReplyableInteraction = {
|
|
13
|
-
reply(options: unknown): Promise<unknown>;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC5B,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG;IACpD,UAAU,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RENDERED } from '../constants';
|
|
2
|
-
import type { DisplayComponent } from './container';
|
|
3
|
-
/** Rendered display components with internal metadata. */
|
|
4
|
-
export type RenderedComponents = readonly DisplayComponent[] & {
|
|
5
|
-
readonly [RENDERED]: true;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,0DAA0D;AAC1D,MAAM,MAAM,kBAAkB,GAAG,SAAS,gBAAgB,EAAE,GAAG;IAC7D,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;CAC3B,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Button } from './button';
|
|
2
|
-
import type { SelectMenu } from './select';
|
|
3
|
-
/** Component allowed inside a row. */
|
|
4
|
-
export type RowComponent = Button | SelectMenu;
|
|
5
|
-
/** Public row descriptor used by `ui.row(...)`. */
|
|
6
|
-
export type Row = {
|
|
7
|
-
type: 'row';
|
|
8
|
-
components: readonly RowComponent[];
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=row.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/C,mDAAmD;AACnD,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,SAAS,YAAY,EAAE,CAAC;CACrC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChannelType } from 'discord.js';
|
|
2
|
-
import type { ButtonID } from './button';
|
|
3
|
-
/** Shared base fields for all select menus. */
|
|
4
|
-
export type SelectBase = {
|
|
5
|
-
id: ButtonID;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
minValues?: number;
|
|
8
|
-
maxValues?: number;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
/** Single string-select option descriptor. */
|
|
12
|
-
export type StringSelectOption = {
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
default?: boolean;
|
|
17
|
-
};
|
|
18
|
-
/** Public string-select descriptor used by `ui.select.string(...)`. */
|
|
19
|
-
export type StringSelect = SelectBase & {
|
|
20
|
-
type: 'select.string';
|
|
21
|
-
options: readonly StringSelectOption[];
|
|
22
|
-
};
|
|
23
|
-
/** Public user-select descriptor used by `ui.select.user(...)`. */
|
|
24
|
-
export type UserSelect = SelectBase & {
|
|
25
|
-
type: 'select.user';
|
|
26
|
-
};
|
|
27
|
-
/** Public role-select descriptor used by `ui.select.role(...)`. */
|
|
28
|
-
export type RoleSelect = SelectBase & {
|
|
29
|
-
type: 'select.role';
|
|
30
|
-
};
|
|
31
|
-
/** Public mentionable-select descriptor used by `ui.select.mentionable(...)`. */
|
|
32
|
-
export type MentionableSelect = SelectBase & {
|
|
33
|
-
type: 'select.mentionable';
|
|
34
|
-
};
|
|
35
|
-
/** Public channel-select descriptor used by `ui.select.channel(...)`. */
|
|
36
|
-
export type ChannelSelect = SelectBase & {
|
|
37
|
-
type: 'select.channel';
|
|
38
|
-
channelTypes?: readonly ChannelType[];
|
|
39
|
-
};
|
|
40
|
-
/** Union of all supported select menu descriptors. */
|
|
41
|
-
export type SelectMenu = StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect;
|
|
42
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/types/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,QAAQ,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACtC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACxC,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG;IAC3C,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,UAAU,GACV,UAAU,GACV,iBAAiB,GACjB,aAAa,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applies shared select fields to a Discord builder.
|
|
3
|
-
*
|
|
4
|
-
* @param builder Target builder.
|
|
5
|
-
* @param select Normalized select descriptor.
|
|
6
|
-
* @returns The same builder instance for chaining.
|
|
7
|
-
*/
|
|
8
|
-
export declare function applySelectBase<T extends {
|
|
9
|
-
setCustomId(id: string): T;
|
|
10
|
-
setPlaceholder(placeholder: string): T;
|
|
11
|
-
setMinValues(minValues: number): T;
|
|
12
|
-
setMaxValues(maxValues: number): T;
|
|
13
|
-
setDisabled(disabled?: boolean): T;
|
|
14
|
-
}>(builder: T, select: {
|
|
15
|
-
id: string;
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
minValues?: number;
|
|
18
|
-
maxValues?: number;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}): T;
|
|
21
|
-
//# sourceMappingURL=applySelectBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applySelectBase.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/applySelectBase.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS;IACR,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;IAC3B,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,CAAC;IACvC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;CACpC,EAED,OAAO,EAAE,CAAC,EACV,MAAM,EAAE;IACN,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KAUF"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TextInput } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Formats a list of text items as markdown.
|
|
4
|
-
*
|
|
5
|
-
* @param items List items.
|
|
6
|
-
* @param options List formatting options.
|
|
7
|
-
* @returns Markdown list.
|
|
8
|
-
*/
|
|
9
|
-
export declare function formatList(items: TextInput, options?: {
|
|
10
|
-
ordered?: boolean;
|
|
11
|
-
}): string;
|
|
12
|
-
//# sourceMappingURL=formatList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatList.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/formatList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,UASpC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { TextInput, TextStyleOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Normalizes a text input into an array of lines.
|
|
4
|
-
*
|
|
5
|
-
* @param input Text input.
|
|
6
|
-
* @returns Normalized lines.
|
|
7
|
-
*/
|
|
8
|
-
export declare function toLines(input: TextInput): any[];
|
|
9
|
-
/**
|
|
10
|
-
* Formats one or more lines using a per-line mapper.
|
|
11
|
-
*
|
|
12
|
-
* @param input Text input.
|
|
13
|
-
* @param formatter Line formatter.
|
|
14
|
-
* @returns Formatted markdown text.
|
|
15
|
-
*/
|
|
16
|
-
export declare function formatLines(input: TextInput, formatter: (line: string, index: number) => string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Applies markdown formatting to a text payload.
|
|
19
|
-
*
|
|
20
|
-
* @param content Raw text content.
|
|
21
|
-
* @param options Formatting options.
|
|
22
|
-
* @returns Markdown-formatted text.
|
|
23
|
-
*/
|
|
24
|
-
export declare function formatText(content: TextInput, options?: TextStyleOptions): string;
|
|
25
|
-
/**
|
|
26
|
-
* Wraps text in inline-code markdown.
|
|
27
|
-
*
|
|
28
|
-
* @param content Raw text content.
|
|
29
|
-
* @returns Inline-code markdown.
|
|
30
|
-
*/
|
|
31
|
-
export declare function formatInlineCode(content: TextInput): string;
|
|
32
|
-
/**
|
|
33
|
-
* Formats a markdown quote block.
|
|
34
|
-
*
|
|
35
|
-
* @param input Quote content.
|
|
36
|
-
* @returns Markdown quote text.
|
|
37
|
-
*/
|
|
38
|
-
export declare function formatQuote(input: TextInput): string;
|
|
39
|
-
/**
|
|
40
|
-
* Formats a markdown spoiler block.
|
|
41
|
-
*
|
|
42
|
-
* @param input Spoiler content.
|
|
43
|
-
* @returns Markdown spoiler text.
|
|
44
|
-
*/
|
|
45
|
-
export declare function formatSpoiler(input: TextInput): string;
|
|
46
|
-
//# sourceMappingURL=formatText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatText.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/formatText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAuB5D;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,SAEvC;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,UAKnD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,GAAE,gBAAqB,UAa5E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,UAIlD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,UAE3C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,UAE7C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts a file name from an attachment-like value.
|
|
3
|
-
*
|
|
4
|
-
* @param attachment Attachment-like value.
|
|
5
|
-
* @returns Attachment file name.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getAttachmentName(attachment: unknown): string;
|
|
8
|
-
//# sourceMappingURL=getAttachmentName.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAttachmentName.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/getAttachmentName.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,OAAO,UAwBpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SelectBase } from '../types';
|
|
2
|
-
type SelectBuilderOptions = Omit<SelectBase, 'id'>;
|
|
3
|
-
type SelectBuilderInput = SelectBuilderOptions & {
|
|
4
|
-
customId: SelectBase['id'];
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Resolves select base fields from the public builder overloads.
|
|
8
|
-
*
|
|
9
|
-
* @param customIdOrOpts Custom id or full select options object.
|
|
10
|
-
* @param opts Partial select options when a custom id is passed first.
|
|
11
|
-
* @returns Normalized select base data.
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveSelectBase(customId: SelectBase['id'], opts?: SelectBuilderOptions): SelectBase;
|
|
14
|
-
export declare function resolveSelectBase(opts: SelectBuilderInput): SelectBase;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=resolveSelectBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSelectBase.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/resolveSelectBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,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;AAEhF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAC1B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,UAAU,CAAC;AACd,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ContainerInput, ContainerOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Splits the overloaded container inputs into options and components.
|
|
4
|
-
*
|
|
5
|
-
* @param args Container arguments.
|
|
6
|
-
* @returns Normalized container options and component list.
|
|
7
|
-
*/
|
|
8
|
-
export declare function splitContainerArgs(args: [ContainerOptions, ...ContainerInput[]] | ContainerInput[]): {
|
|
9
|
-
options: ContainerOptions;
|
|
10
|
-
components: ContainerInput[];
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=splitContainerArgs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"splitContainerArgs.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/utils/splitContainerArgs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAUjE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,CAAC,gBAAgB,EAAE,GAAG,cAAc,EAAE,CAAC,GAAG,cAAc,EAAE;;gBAK/B,cAAc,EAAE;EAQlD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/validators/button.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOvC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,QAQ5C"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { DisplayComponent, MediaItem, RowComponent, SectionComponent } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validates the number of display components in a rendered message.
|
|
4
|
-
*
|
|
5
|
-
* @param components Display components to validate.
|
|
6
|
-
*/
|
|
7
|
-
export declare function validateComponents(components: readonly DisplayComponent[]): void;
|
|
8
|
-
/**
|
|
9
|
-
* Validates display text content.
|
|
10
|
-
*
|
|
11
|
-
* @param content Text content to validate.
|
|
12
|
-
*/
|
|
13
|
-
export declare function validateText(content: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Validates a display media URL.
|
|
16
|
-
*
|
|
17
|
-
* @param url URL to validate.
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateUrl(url: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Validates a file attachment URL.
|
|
22
|
-
*
|
|
23
|
-
* @param url URL to validate.
|
|
24
|
-
*/
|
|
25
|
-
export declare function validateAttachmentUrl(url: string): void;
|
|
26
|
-
/**
|
|
27
|
-
* Validates a row component list.
|
|
28
|
-
*
|
|
29
|
-
* @param components Row components to validate.
|
|
30
|
-
*/
|
|
31
|
-
export declare function validateRow(components: readonly RowComponent[]): void;
|
|
32
|
-
/**
|
|
33
|
-
* Validates a section component.
|
|
34
|
-
*
|
|
35
|
-
* @param section Section component to validate.
|
|
36
|
-
*/
|
|
37
|
-
export declare function validateSection(section: SectionComponent): void;
|
|
38
|
-
/**
|
|
39
|
-
* Validates an accent color value.
|
|
40
|
-
*
|
|
41
|
-
* @param color Color to validate.
|
|
42
|
-
* @returns Normalized numeric color.
|
|
43
|
-
*/
|
|
44
|
-
export declare function validateColor(color: number | string): number;
|
|
45
|
-
/**
|
|
46
|
-
* Validates gallery items.
|
|
47
|
-
*
|
|
48
|
-
* @param items Gallery items to validate.
|
|
49
|
-
*/
|
|
50
|
-
export declare function validateGallery(items: readonly MediaItem[]): void;
|
|
51
|
-
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/validators/container.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAOlB;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,QAIzE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,QAI3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,QAItC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,QAIhD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,SAAS,YAAY,EAAE,QAY9D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,QAIxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,UA0BnD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,QAI1D"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { validateAttachmentUrl, validateColor, validateComponents, validateGallery, validateRow, validateSection, validateText, validateUrl } from './container';
|
|
2
|
-
import { validateButton } from './button';
|
|
3
|
-
import { validateSelect } from './select';
|
|
4
|
-
/** Aggregated validation helpers used by the public UI builders. */
|
|
5
|
-
export declare const validate: {
|
|
6
|
-
components: typeof validateComponents;
|
|
7
|
-
text: typeof validateText;
|
|
8
|
-
url: typeof validateUrl;
|
|
9
|
-
attachmentUrl: typeof validateAttachmentUrl;
|
|
10
|
-
button: typeof validateButton;
|
|
11
|
-
row: typeof validateRow;
|
|
12
|
-
select: typeof validateSelect;
|
|
13
|
-
section: typeof validateSection;
|
|
14
|
-
color: typeof validateColor;
|
|
15
|
-
gallery: typeof validateGallery;
|
|
16
|
-
};
|
|
17
|
-
export { validateAttachmentUrl, validateButton, validateColor, validateComponents, validateGallery, validateRow, validateSection, validateSelect, validateText, validateUrl, };
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,eAAe,EACf,YAAY,EACZ,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,oEAAoE;AACpE,eAAO,MAAM,QAAQ;;;;;;;;;;;CAWpB,CAAC;AAEF,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,GACZ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/validators/select.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAO3C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,QAchD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CreateAnswers, ProjectLanguage, ProjectRuntime } from "./prompts";
|
|
2
|
-
export interface GenerateResult {
|
|
3
|
-
projectName: string;
|
|
4
|
-
targetDir: string;
|
|
5
|
-
runtime: ProjectRuntime;
|
|
6
|
-
language: ProjectLanguage;
|
|
7
|
-
}
|
|
8
|
-
export declare function prepareProjectTarget(projectName: string): Promise<string>;
|
|
9
|
-
export declare function generateProject(options: CreateAnswers, preparedTargetDir?: string): Promise<GenerateResult>;
|
|
10
|
-
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/create/generator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAyFD,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS/E;AA+DD,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,cAAc,CAAC,CA0CzB"}
|
package/dist/create/prompts.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/create/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,YAAY,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC3B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createCommand, CommandType } from "__NEXO_PACKAGE__";
|
|
2
|
-
|
|
3
|
-
export default createCommand({
|
|
4
|
-
name: "ping",
|
|
5
|
-
description: "Responde com Pong!",
|
|
6
|
-
type: CommandType.ChatInput,
|
|
7
|
-
async run(interaction) {
|
|
8
|
-
await interaction.reply({ content: "Pong!" });
|
|
9
|
-
},
|
|
10
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Bootstrap } from "__NEXO_PACKAGE__";
|
|
2
|
-
import { GatewayIntentBits } from "discord.js";
|
|
3
|
-
|
|
4
|
-
await Bootstrap.init({
|
|
5
|
-
token: process.env.TOKEN,
|
|
6
|
-
intents: [GatewayIntentBits.Guilds],
|
|
7
|
-
paths: {
|
|
8
|
-
commands: "src/commands",
|
|
9
|
-
events: "src/events",
|
|
10
|
-
},
|
|
11
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createCommand, CommandType } from "__NEXO_PACKAGE__";
|
|
2
|
-
|
|
3
|
-
export default createCommand({
|
|
4
|
-
name: "ping",
|
|
5
|
-
description: "Responde com Pong!",
|
|
6
|
-
type: CommandType.ChatInput,
|
|
7
|
-
async run(interaction) {
|
|
8
|
-
await interaction.reply({ content: "Pong!" });
|
|
9
|
-
},
|
|
10
|
-
});
|