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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexocord",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Framework TypeScript moderno para criar bots escaláveis do Discord com discord.js v14, apresentando arquitetura modular, cli e utilitários amigáveis para desenvolvedores.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -41,19 +41,14 @@
|
|
|
41
41
|
"./ui": {
|
|
42
42
|
"types": "./dist/core/ui/index.d.ts",
|
|
43
43
|
"import": "./dist/core/ui/index.js"
|
|
44
|
-
},
|
|
45
|
-
"./utils": {
|
|
46
|
-
"types": "./dist/core/utils/index.d.ts",
|
|
47
|
-
"import": "./dist/core/utils/index.js"
|
|
48
44
|
}
|
|
49
45
|
},
|
|
50
46
|
"types": "./dist/index.d.ts",
|
|
51
47
|
"main": "./dist/index.js",
|
|
52
48
|
"files": [
|
|
53
|
-
"dist
|
|
49
|
+
"dist",
|
|
54
50
|
"README.md",
|
|
55
|
-
"
|
|
56
|
-
"package.json"
|
|
51
|
+
"LICENSE"
|
|
57
52
|
],
|
|
58
53
|
"bin": {
|
|
59
54
|
"nexo": "./dist/bin/cli.js"
|
|
@@ -62,22 +57,22 @@
|
|
|
62
57
|
"node": ">=20"
|
|
63
58
|
},
|
|
64
59
|
"scripts": {
|
|
65
|
-
"build": "bun build src/index.ts src/core/types/index.ts src/core/ui/index.ts src/core/utils/index.ts --outdir dist --target node --format esm && bun build src/index.ts --target node --format cjs --outfile dist/index.cjs && bun build src/bin/cli.ts --outdir dist/bin --target node --format esm &&
|
|
66
|
-
"
|
|
60
|
+
"build": "bun build src/index.ts src/core/types/index.ts src/core/ui/index.ts src/core/utils/index.ts --outdir dist --target node --format esm && bun build src/index.ts --target node --format cjs --outfile dist/index.cjs && bun build src/bin/cli.ts --outdir dist/bin --target node --format esm && bunx tsc --emitDeclarationOnly --outDir dist",
|
|
61
|
+
"publish:pkg": "bun run build && npm publish --access public"
|
|
67
62
|
},
|
|
68
63
|
"devDependencies": {
|
|
69
|
-
"@types/bun": "
|
|
70
|
-
"@types/node": "^25.
|
|
64
|
+
"@types/bun": "^1.4.2",
|
|
65
|
+
"@types/node": "^25.9.9"
|
|
71
66
|
},
|
|
72
67
|
"peerDependencies": {
|
|
73
|
-
"typescript": "^
|
|
68
|
+
"typescript": "^7.0.2"
|
|
74
69
|
},
|
|
75
70
|
"dependencies": {
|
|
76
|
-
"@clack/prompts": "^
|
|
77
|
-
"chalk": "^
|
|
78
|
-
"commander": "^
|
|
79
|
-
"discord.js": "^14.
|
|
71
|
+
"@clack/prompts": "^1.8.1",
|
|
72
|
+
"chalk": "^6.0.1",
|
|
73
|
+
"commander": "^15.0.0",
|
|
74
|
+
"discord.js": "^14.27.0",
|
|
80
75
|
"glob": "^13.0.6",
|
|
81
|
-
"zod": "^4.
|
|
76
|
+
"zod": "^4.6.5"
|
|
82
77
|
}
|
|
83
78
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cli/create/create.ts"],"names":[],"mappings":"AAiBA,wBAAsB,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCvE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../src/commands/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,QAK/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.command.d.ts","sourceRoot":"","sources":["../../src/commands/dev.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,QAkF/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../src/commands/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,QAiB/C"}
|
package/dist/core/creators.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ClientEvents } from 'discord.js';
|
|
2
|
-
import { Command, CommandType, Event, Responder, ResponderParser, ResponderTypes } from './types';
|
|
3
|
-
export declare const createCommand: <T extends CommandType>(command: Command<T>) => Command<T>, createSubcommand: (name: string, directory: string) => Promise<any>, createEvent: <K extends keyof ClientEvents>(options: Event<K>) => Event<K>, createResponder: <const Path extends string, const Type extends ResponderTypes, Parse extends ResponderParser<Path> | undefined = undefined>(opts: Responder<Path, Type, Parse>) => Responder<Path, Type, Parse>;
|
|
4
|
-
//# sourceMappingURL=creators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../src/core/creators.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,YAAY,EAIb,MAAM,YAAY,CAAC;AAQpB,OAAO,EACL,OAAO,EACP,WAAW,EACX,KAAK,EACL,SAAS,EACT,eAAe,EACf,cAAc,EACf,MAAM,SAAS,CAAC;AAuFjB,eAAO,MAAQ,aAAa,GAjFC,CAAC,SAAS,WAAW,WAAW,OAAO,CAAC,CAAC,CAAC,iBAiFzC,gBAAgB,SA7EF,MAAM,aAAa,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC,EA6EpC,WAAW,GAhBhC,CAAC,SAAS,MAAM,YAAY,WAAW,KAAK,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,CAAC,CAAC,EAgBxB,eAAe,SAXhE,IAAI,SAAS,MAAM,QACnB,IAAI,SAAS,cAAc,EACjC,KAAK,SAAS,eAAe,CAAC,IAAI,CAAC,GAAG,SAAS,oBACzC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,iCAS5B,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,134 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,61 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
1
|
-
import { ButtonBuilder, ButtonStyle } from 'discord.js';
|
|
2
|
-
import type { Button } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Discord button builder from a public button descriptor.
|
|
5
|
-
*
|
|
6
|
-
* @param button Button descriptor.
|
|
7
|
-
* @returns Discord button builder.
|
|
8
|
-
*/
|
|
9
|
-
export declare function normalizeButton(button: Button): ButtonBuilder;
|
|
10
|
-
/**
|
|
11
|
-
* Applies button data to a button-like Discord builder.
|
|
12
|
-
*
|
|
13
|
-
* @param button Target button builder.
|
|
14
|
-
* @param data Public button descriptor.
|
|
15
|
-
* @returns The same button builder instance for chaining.
|
|
16
|
-
*/
|
|
17
|
-
export declare function applyButtonData<T extends {
|
|
18
|
-
setLabel(label: string): T;
|
|
19
|
-
setCustomId(id: string): T;
|
|
20
|
-
setStyle(style: ButtonStyle): T;
|
|
21
|
-
setEmoji(emoji: {
|
|
22
|
-
name: string;
|
|
23
|
-
}): T;
|
|
24
|
-
}>(button: T, data: Button): T;
|
|
25
|
-
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/normalizers/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,iBAa7C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS;IACR,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IAC3B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,CAAC,CAAC;CACtC,EACD,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAW5B"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ContainerBuilder } from 'discord.js';
|
|
2
|
-
import type { ContainerChild, ContainerInput, DisplayComponent, DisplayInput } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a container input into a container child builder when needed.
|
|
5
|
-
*
|
|
6
|
-
* @param component Container input.
|
|
7
|
-
* @returns Discord container child.
|
|
8
|
-
*/
|
|
9
|
-
export declare function toContainerChild(component: ContainerInput): ContainerChild;
|
|
10
|
-
/**
|
|
11
|
-
* Converts a display input into a Discord display component.
|
|
12
|
-
*
|
|
13
|
-
* @param component Display input.
|
|
14
|
-
* @returns Discord display component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function toDisplayComponent(component: DisplayInput): DisplayComponent;
|
|
17
|
-
/**
|
|
18
|
-
* Converts a variadic list of display inputs into Discord display components.
|
|
19
|
-
*
|
|
20
|
-
* @param components Display inputs.
|
|
21
|
-
* @returns Discord display components.
|
|
22
|
-
*/
|
|
23
|
-
export declare function toDisplayComponents(...components: DisplayInput[]): DisplayComponent[];
|
|
24
|
-
/**
|
|
25
|
-
* Marks a display component array as rendered and stores attachment metadata.
|
|
26
|
-
*
|
|
27
|
-
* @param components Rendered display components.
|
|
28
|
-
* @param attachments Attachment metadata.
|
|
29
|
-
* @returns Rendered components with metadata.
|
|
30
|
-
*/
|
|
31
|
-
export declare function createRenderedComponents(components: DisplayComponent[], attachments: readonly unknown[]): import("../types").RenderedComponents;
|
|
32
|
-
/**
|
|
33
|
-
* Checks whether a value is a rendered component array.
|
|
34
|
-
*
|
|
35
|
-
* @param value Value to inspect.
|
|
36
|
-
* @returns Whether the value was created by `createRenderedComponents(...)`.
|
|
37
|
-
*/
|
|
38
|
-
export declare function isRenderedComponents(value: unknown): value is import('../types').RenderedComponents;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the attachment metadata attached to a rendered component array.
|
|
41
|
-
*
|
|
42
|
-
* @param components Rendered components.
|
|
43
|
-
* @returns Rendered attachments.
|
|
44
|
-
*/
|
|
45
|
-
export declare function getRenderedComponentsAttachments(components: import('../types').RenderedComponents): readonly unknown[];
|
|
46
|
-
/**
|
|
47
|
-
* Collects file attachments from public container inputs.
|
|
48
|
-
*
|
|
49
|
-
* @param components Container inputs.
|
|
50
|
-
* @returns Collected attachment payloads.
|
|
51
|
-
*/
|
|
52
|
-
export declare function collectAttachmentsFromContainerInputs(components: readonly ContainerInput[]): readonly unknown[];
|
|
53
|
-
/**
|
|
54
|
-
* Attaches metadata to a container builder for later file collection.
|
|
55
|
-
*
|
|
56
|
-
* @param container Container builder.
|
|
57
|
-
* @param attachments Attachments to associate with the container.
|
|
58
|
-
* @returns The same container builder instance for chaining.
|
|
59
|
-
*/
|
|
60
|
-
export declare function attachContainerAttachments(container: ContainerBuilder, attachments: readonly unknown[]): ContainerBuilder;
|
|
61
|
-
/**
|
|
62
|
-
* Collects file attachments from rendered display inputs.
|
|
63
|
-
*
|
|
64
|
-
* @param components Display inputs.
|
|
65
|
-
* @returns Collected attachment payloads.
|
|
66
|
-
*/
|
|
67
|
-
export declare function collectAttachmentsFromDisplayInputs(components: readonly DisplayInput[]): readonly unknown[];
|
|
68
|
-
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/normalizers/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,EAMjB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EAQb,MAAM,UAAU,CAAC;AAiIlB;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAI1E;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,YAAY,GAAG,gBAAgB,CAG5E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,UAAU,EAAE,YAAY,EAAE,sBAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,gBAAgB,EAAE,EAC9B,WAAW,EAAE,SAAS,OAAO,EAAE,GAUZ,OAAO,UAAU,EAAE,kBAAkB,CACzD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,OAAO,UAAU,EAAE,kBAAkB,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,OAAO,UAAU,EAAE,kBAAkB,GAChD,SAAS,OAAO,EAAE,CAEpB;AAeD;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,SAAS,OAAO,EAAE,CAKpB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,gBAAgB,EAC3B,WAAW,EAAE,SAAS,OAAO,EAAE,GAC9B,gBAAgB,CAKlB;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,SAAS,YAAY,EAAE,GAClC,SAAS,OAAO,EAAE,CAepB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { applyButtonData, normalizeButton } from './button';
|
|
2
|
-
export { attachContainerAttachments, collectAttachmentsFromContainerInputs, collectAttachmentsFromDisplayInputs, createRenderedComponents, getRenderedComponentsAttachments, isRenderedComponents, toContainerChild, toDisplayComponent, toDisplayComponents, } from './container';
|
|
3
|
-
export { normalizeFile, normalizeGallery } from './media';
|
|
4
|
-
export { normalizeChannelSelect, normalizeMentionableSelect, normalizeRoleSelect, normalizeSelect, normalizeStringSelect, normalizeUserSelect, } from './select';
|
|
5
|
-
export type { RenderedComponents } from '../types';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/normalizers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EACrC,mCAAmC,EACnC,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FileBuilder, MediaGalleryBuilder } from 'discord.js';
|
|
2
|
-
import type { FileComponent, MediaItem } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Discord gallery builder from public gallery items.
|
|
5
|
-
*
|
|
6
|
-
* @param items Gallery items.
|
|
7
|
-
* @returns Discord media gallery builder.
|
|
8
|
-
*/
|
|
9
|
-
export declare function normalizeGallery(items: readonly MediaItem[]): MediaGalleryBuilder;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a Discord file builder from a public file descriptor.
|
|
12
|
-
*
|
|
13
|
-
* @param fileInput File descriptor.
|
|
14
|
-
* @returns Discord file builder.
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeFile(fileInput: FileComponent): FileBuilder;
|
|
17
|
-
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/core/ui/normalizers/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGzD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,uBAkB3D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,eAOrD"}
|