@serenityjs/core 0.7.7-beta-20250323194840 → 0.7.7
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/CHANGELOG.md +7 -7
- package/dist/index.d.mts +47 -17
- package/dist/index.d.ts +47 -17
- package/dist/index.js +4 -4
- package/dist/index.mjs +5 -5
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# @serenityjs/core
|
|
2
2
|
|
|
3
|
-
## 0.7.7
|
|
3
|
+
## 0.7.7
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- [`6467080`](https://github.com/SerenityJS/serenity/commit/6467080e39c0257a78c466b0ff0b81f4c6efca68) Thanks [@PMK744](https://github.com/PMK744)! - init v0.7.7-beta
|
|
8
8
|
|
|
9
9
|
- Updated dependencies [[`6467080`](https://github.com/SerenityJS/serenity/commit/6467080e39c0257a78c466b0ff0b81f4c6efca68)]:
|
|
10
|
-
- @serenityjs/data@0.7.7
|
|
11
|
-
- @serenityjs/emitter@0.7.7
|
|
12
|
-
- @serenityjs/logger@0.7.7
|
|
13
|
-
- @serenityjs/nbt@0.7.7
|
|
14
|
-
- @serenityjs/protocol@0.7.7
|
|
15
|
-
- @serenityjs/raknet@0.7.7
|
|
10
|
+
- @serenityjs/data@0.7.7
|
|
11
|
+
- @serenityjs/emitter@0.7.7
|
|
12
|
+
- @serenityjs/logger@0.7.7
|
|
13
|
+
- @serenityjs/nbt@0.7.7
|
|
14
|
+
- @serenityjs/protocol@0.7.7
|
|
15
|
+
- @serenityjs/raknet@0.7.7
|
|
16
16
|
|
|
17
17
|
## 0.7.6
|
|
18
18
|
|
package/dist/index.d.mts
CHANGED
|
@@ -10496,6 +10496,15 @@ declare class Form<T> {
|
|
|
10496
10496
|
* The type of form.
|
|
10497
10497
|
*/
|
|
10498
10498
|
readonly type: ModalFormType;
|
|
10499
|
+
/**
|
|
10500
|
+
* The title of the form.
|
|
10501
|
+
*/
|
|
10502
|
+
title: string;
|
|
10503
|
+
/**
|
|
10504
|
+
* Create a new server-side form.
|
|
10505
|
+
* @param title The title of the form.
|
|
10506
|
+
*/
|
|
10507
|
+
constructor(title: string);
|
|
10499
10508
|
/**
|
|
10500
10509
|
* Shows the form to a player.
|
|
10501
10510
|
* @param player The player to show the form to.
|
|
@@ -10512,10 +10521,6 @@ declare class Form<T> {
|
|
|
10512
10521
|
|
|
10513
10522
|
declare class MessageForm extends Form<boolean> {
|
|
10514
10523
|
readonly type = ModalFormType.Message;
|
|
10515
|
-
/**
|
|
10516
|
-
* The title of the form.
|
|
10517
|
-
*/
|
|
10518
|
-
title: string;
|
|
10519
10524
|
/**
|
|
10520
10525
|
* The content of the form.
|
|
10521
10526
|
*/
|
|
@@ -10528,6 +10533,14 @@ declare class MessageForm extends Form<boolean> {
|
|
|
10528
10533
|
* The text of the second button.
|
|
10529
10534
|
*/
|
|
10530
10535
|
button2: string;
|
|
10536
|
+
/**
|
|
10537
|
+
* Create a new server-sided message form.
|
|
10538
|
+
* @param title The title of the form.
|
|
10539
|
+
* @param content The content of the form; defaults to an empty string.
|
|
10540
|
+
* @param button1 The text of the first button; defaults to "OK".
|
|
10541
|
+
* @param button2 The text of the second button; defaults to "Cancel".
|
|
10542
|
+
*/
|
|
10543
|
+
constructor(title: string, content?: string, button1?: string, button2?: string);
|
|
10531
10544
|
}
|
|
10532
10545
|
|
|
10533
10546
|
/**
|
|
@@ -10580,17 +10593,19 @@ interface ActionFormButton {
|
|
|
10580
10593
|
declare class ActionForm extends Form<number> {
|
|
10581
10594
|
readonly type = ModalFormType.Action;
|
|
10582
10595
|
/**
|
|
10583
|
-
* The
|
|
10596
|
+
* The buttons of the form.
|
|
10584
10597
|
*/
|
|
10585
|
-
|
|
10598
|
+
readonly buttons: Array<ActionFormButton>;
|
|
10586
10599
|
/**
|
|
10587
10600
|
* The content of the form.
|
|
10588
10601
|
*/
|
|
10589
10602
|
content: string;
|
|
10590
10603
|
/**
|
|
10591
|
-
*
|
|
10604
|
+
* Create a new server-sided action form.
|
|
10605
|
+
* @param title The title of the form.
|
|
10606
|
+
* @param content The content of the form; defaults to an empty string.
|
|
10592
10607
|
*/
|
|
10593
|
-
|
|
10608
|
+
constructor(title: string, content?: string);
|
|
10594
10609
|
/**
|
|
10595
10610
|
* Adds a button to the form.
|
|
10596
10611
|
*/
|
|
@@ -10634,14 +10649,20 @@ declare class ActionForm extends Form<number> {
|
|
|
10634
10649
|
*/
|
|
10635
10650
|
declare class ModalForm<T = Array<unknown>> extends Form<T> {
|
|
10636
10651
|
readonly type = ModalFormType.Modal;
|
|
10637
|
-
/**
|
|
10638
|
-
* The title of the form.
|
|
10639
|
-
*/
|
|
10640
|
-
title: string;
|
|
10641
10652
|
/**
|
|
10642
10653
|
* The content of the form.
|
|
10643
10654
|
*/
|
|
10644
10655
|
readonly content: Array<unknown>;
|
|
10656
|
+
/**
|
|
10657
|
+
* The sumbit button text.
|
|
10658
|
+
*/
|
|
10659
|
+
submit: string;
|
|
10660
|
+
/**
|
|
10661
|
+
* Create a new server-sided modal form.
|
|
10662
|
+
* @param title The title of the form.
|
|
10663
|
+
* @param submit The text of the submit button; defaults to "Submit".
|
|
10664
|
+
*/
|
|
10665
|
+
constructor(title: string, submit?: string);
|
|
10645
10666
|
/**
|
|
10646
10667
|
* Adds a dropdown menu to the form.
|
|
10647
10668
|
* @param text The text of the dropdown menu
|
|
@@ -10688,6 +10709,17 @@ declare class ModalForm<T = Array<unknown>> extends Form<T> {
|
|
|
10688
10709
|
* @returns
|
|
10689
10710
|
*/
|
|
10690
10711
|
toggle(text: string, defaultValue?: boolean): this;
|
|
10712
|
+
/**
|
|
10713
|
+
* Adds a sectuib divider to the form.
|
|
10714
|
+
* @returns
|
|
10715
|
+
*/
|
|
10716
|
+
divider(): this;
|
|
10717
|
+
/**
|
|
10718
|
+
* Adds a header to the form.
|
|
10719
|
+
* @param text The text of the header
|
|
10720
|
+
* @returns
|
|
10721
|
+
*/
|
|
10722
|
+
header(text: string): this;
|
|
10691
10723
|
}
|
|
10692
10724
|
|
|
10693
10725
|
declare class Bossbar {
|
|
@@ -10766,10 +10798,6 @@ declare class DialogueForm extends Form<number> {
|
|
|
10766
10798
|
* The target entity that the dialogue is focused on.
|
|
10767
10799
|
*/
|
|
10768
10800
|
readonly target: Entity;
|
|
10769
|
-
/**
|
|
10770
|
-
* The title of the form.
|
|
10771
|
-
*/
|
|
10772
|
-
title: string;
|
|
10773
10801
|
/**
|
|
10774
10802
|
* The dialogue content of the form.
|
|
10775
10803
|
*/
|
|
@@ -10785,9 +10813,11 @@ declare class DialogueForm extends Form<number> {
|
|
|
10785
10813
|
/**
|
|
10786
10814
|
* Creates a new dialogue form.
|
|
10787
10815
|
* @param target The target entity that the dialogue is focused on.
|
|
10816
|
+
* @param title The title of the dialogue form.
|
|
10817
|
+
* @param content The content of the dialogue form.
|
|
10788
10818
|
* @param fromTrait Whether the dialogue form is from a trait.
|
|
10789
10819
|
*/
|
|
10790
|
-
constructor(target: Entity, fromTrait?: boolean);
|
|
10820
|
+
constructor(target: Entity, title: string, content?: string, fromTrait?: boolean);
|
|
10791
10821
|
/**
|
|
10792
10822
|
* Adds a button to the dialogue form.
|
|
10793
10823
|
* @param text The text of the button.
|
package/dist/index.d.ts
CHANGED
|
@@ -10496,6 +10496,15 @@ declare class Form<T> {
|
|
|
10496
10496
|
* The type of form.
|
|
10497
10497
|
*/
|
|
10498
10498
|
readonly type: ModalFormType;
|
|
10499
|
+
/**
|
|
10500
|
+
* The title of the form.
|
|
10501
|
+
*/
|
|
10502
|
+
title: string;
|
|
10503
|
+
/**
|
|
10504
|
+
* Create a new server-side form.
|
|
10505
|
+
* @param title The title of the form.
|
|
10506
|
+
*/
|
|
10507
|
+
constructor(title: string);
|
|
10499
10508
|
/**
|
|
10500
10509
|
* Shows the form to a player.
|
|
10501
10510
|
* @param player The player to show the form to.
|
|
@@ -10512,10 +10521,6 @@ declare class Form<T> {
|
|
|
10512
10521
|
|
|
10513
10522
|
declare class MessageForm extends Form<boolean> {
|
|
10514
10523
|
readonly type = ModalFormType.Message;
|
|
10515
|
-
/**
|
|
10516
|
-
* The title of the form.
|
|
10517
|
-
*/
|
|
10518
|
-
title: string;
|
|
10519
10524
|
/**
|
|
10520
10525
|
* The content of the form.
|
|
10521
10526
|
*/
|
|
@@ -10528,6 +10533,14 @@ declare class MessageForm extends Form<boolean> {
|
|
|
10528
10533
|
* The text of the second button.
|
|
10529
10534
|
*/
|
|
10530
10535
|
button2: string;
|
|
10536
|
+
/**
|
|
10537
|
+
* Create a new server-sided message form.
|
|
10538
|
+
* @param title The title of the form.
|
|
10539
|
+
* @param content The content of the form; defaults to an empty string.
|
|
10540
|
+
* @param button1 The text of the first button; defaults to "OK".
|
|
10541
|
+
* @param button2 The text of the second button; defaults to "Cancel".
|
|
10542
|
+
*/
|
|
10543
|
+
constructor(title: string, content?: string, button1?: string, button2?: string);
|
|
10531
10544
|
}
|
|
10532
10545
|
|
|
10533
10546
|
/**
|
|
@@ -10580,17 +10593,19 @@ interface ActionFormButton {
|
|
|
10580
10593
|
declare class ActionForm extends Form<number> {
|
|
10581
10594
|
readonly type = ModalFormType.Action;
|
|
10582
10595
|
/**
|
|
10583
|
-
* The
|
|
10596
|
+
* The buttons of the form.
|
|
10584
10597
|
*/
|
|
10585
|
-
|
|
10598
|
+
readonly buttons: Array<ActionFormButton>;
|
|
10586
10599
|
/**
|
|
10587
10600
|
* The content of the form.
|
|
10588
10601
|
*/
|
|
10589
10602
|
content: string;
|
|
10590
10603
|
/**
|
|
10591
|
-
*
|
|
10604
|
+
* Create a new server-sided action form.
|
|
10605
|
+
* @param title The title of the form.
|
|
10606
|
+
* @param content The content of the form; defaults to an empty string.
|
|
10592
10607
|
*/
|
|
10593
|
-
|
|
10608
|
+
constructor(title: string, content?: string);
|
|
10594
10609
|
/**
|
|
10595
10610
|
* Adds a button to the form.
|
|
10596
10611
|
*/
|
|
@@ -10634,14 +10649,20 @@ declare class ActionForm extends Form<number> {
|
|
|
10634
10649
|
*/
|
|
10635
10650
|
declare class ModalForm<T = Array<unknown>> extends Form<T> {
|
|
10636
10651
|
readonly type = ModalFormType.Modal;
|
|
10637
|
-
/**
|
|
10638
|
-
* The title of the form.
|
|
10639
|
-
*/
|
|
10640
|
-
title: string;
|
|
10641
10652
|
/**
|
|
10642
10653
|
* The content of the form.
|
|
10643
10654
|
*/
|
|
10644
10655
|
readonly content: Array<unknown>;
|
|
10656
|
+
/**
|
|
10657
|
+
* The sumbit button text.
|
|
10658
|
+
*/
|
|
10659
|
+
submit: string;
|
|
10660
|
+
/**
|
|
10661
|
+
* Create a new server-sided modal form.
|
|
10662
|
+
* @param title The title of the form.
|
|
10663
|
+
* @param submit The text of the submit button; defaults to "Submit".
|
|
10664
|
+
*/
|
|
10665
|
+
constructor(title: string, submit?: string);
|
|
10645
10666
|
/**
|
|
10646
10667
|
* Adds a dropdown menu to the form.
|
|
10647
10668
|
* @param text The text of the dropdown menu
|
|
@@ -10688,6 +10709,17 @@ declare class ModalForm<T = Array<unknown>> extends Form<T> {
|
|
|
10688
10709
|
* @returns
|
|
10689
10710
|
*/
|
|
10690
10711
|
toggle(text: string, defaultValue?: boolean): this;
|
|
10712
|
+
/**
|
|
10713
|
+
* Adds a sectuib divider to the form.
|
|
10714
|
+
* @returns
|
|
10715
|
+
*/
|
|
10716
|
+
divider(): this;
|
|
10717
|
+
/**
|
|
10718
|
+
* Adds a header to the form.
|
|
10719
|
+
* @param text The text of the header
|
|
10720
|
+
* @returns
|
|
10721
|
+
*/
|
|
10722
|
+
header(text: string): this;
|
|
10691
10723
|
}
|
|
10692
10724
|
|
|
10693
10725
|
declare class Bossbar {
|
|
@@ -10766,10 +10798,6 @@ declare class DialogueForm extends Form<number> {
|
|
|
10766
10798
|
* The target entity that the dialogue is focused on.
|
|
10767
10799
|
*/
|
|
10768
10800
|
readonly target: Entity;
|
|
10769
|
-
/**
|
|
10770
|
-
* The title of the form.
|
|
10771
|
-
*/
|
|
10772
|
-
title: string;
|
|
10773
10801
|
/**
|
|
10774
10802
|
* The dialogue content of the form.
|
|
10775
10803
|
*/
|
|
@@ -10785,9 +10813,11 @@ declare class DialogueForm extends Form<number> {
|
|
|
10785
10813
|
/**
|
|
10786
10814
|
* Creates a new dialogue form.
|
|
10787
10815
|
* @param target The target entity that the dialogue is focused on.
|
|
10816
|
+
* @param title The title of the dialogue form.
|
|
10817
|
+
* @param content The content of the dialogue form.
|
|
10788
10818
|
* @param fromTrait Whether the dialogue form is from a trait.
|
|
10789
10819
|
*/
|
|
10790
|
-
constructor(target: Entity, fromTrait?: boolean);
|
|
10820
|
+
constructor(target: Entity, title: string, content?: string, fromTrait?: boolean);
|
|
10791
10821
|
/**
|
|
10792
10822
|
* Adds a button to the dialogue form.
|
|
10793
10823
|
* @param text The text of the button.
|