bc-stubs 115.0.1 → 116.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.
@@ -6,10 +6,10 @@
6
6
  declare function BackgroundsTextGet(msg: string): string;
7
7
  /**
8
8
  * Builds the selectable background arrays based on the tags supplied
9
- * @param {readonly BackgroundTag[]} BackgroundTagList - An array of string of all the tags to load
9
+ * @param {BackgroundTag[]} BackgroundTagList - An array of string of all the tags to load
10
10
  * @returns {string[]} - The list of all background names
11
11
  */
12
- declare function BackgroundsGenerateList(BackgroundTagList: readonly BackgroundTag[]): string[];
12
+ declare function BackgroundsGenerateList(BackgroundTagList: BackgroundTag[]): string[];
13
13
  declare const BackgroundsStringsPath: "Backgrounds/Backgrounds.csv";
14
14
  declare const BackgroundsTagNone: "Filter by tag";
15
15
  declare const BackgroundsTagIndoor: "Indoor";
@@ -17,11 +17,13 @@ declare const BackgroundsTagOutdoor: "Outdoor";
17
17
  declare const BackgroundsTagAquatic: "Aquatic";
18
18
  declare const BackgroundsTagSpecial: "Special Events";
19
19
  declare const BackgroundsTagSciFiFantasy: "SciFi & Fantasy";
20
- declare const BackgroundsTagClub: "Club & College";
20
+ declare const BackgroundsTagClub: "Club";
21
+ declare const BackgroundsTagCollege: "College";
21
22
  declare const BackgroundsTagHouse: "Regular house";
22
23
  declare const BackgroundsTagDungeon: "Dungeon";
23
24
  declare const BackgroundsTagAsylum: "Asylum";
24
25
  declare const BackgroundsTagPandora: "Pandora";
26
+ declare const BackgroundsTagClubCards: "Club Cards";
25
27
  /**
26
28
  * List of all tags to create online chat rooms
27
29
  * @constant
@@ -34,6 +36,12 @@ declare const BackgroundsTagList: BackgroundTag[];
34
36
  * @type {BackgroundTag[]}
35
37
  */
36
38
  declare const BackgroundsPrivateRoomTagList: BackgroundTag[];
39
+ /**
40
+ * List of all tags for the club cards board
41
+ * @constant
42
+ * @type {BackgroundTag[]}
43
+ */
44
+ declare const BackgroundsClubCardsTagList: BackgroundTag[];
37
45
  /**
38
46
  * List of all the common backgrounds.
39
47
  * @constant
@@ -0,0 +1,6 @@
1
+ declare namespace ElementHelp {
2
+ type ElementOrId = HTMLElement | string;
3
+ type AnchorY = 'top' | 'bottom';
4
+ type AnchorX = 'left' | 'right';
5
+ type AnchorXY = `${AnchorY}-${AnchorX}`;
6
+ }
@@ -19,7 +19,7 @@ type FriendRawRoom = {
19
19
  name?: string;
20
20
  caption: string;
21
21
  canSearchRoom: boolean;
22
- types: FriendListIcon[];
22
+ types: (null | FriendListIcon)[];
23
23
  };
24
24
 
25
25
  type FriendRawBeep = {
@@ -467,6 +467,7 @@ interface ServerChatRoomSearchData {
467
467
  * @deprecated Use {@link ServerChatRoomData.Access} instead, this is maintained for backwards compatibility
468
468
  */
469
469
  Locked?: boolean;
470
+ CanJoin: boolean;
470
471
  MapType: string;
471
472
  }
472
473
 
@@ -861,7 +862,8 @@ interface ServerChatRoomGameCardGameData {
861
862
  Event: string;
862
863
  DiscardPile: string;
863
864
  CardsPlayedThisTurn: Record<number, ClubCard[]>;
864
- ClubCardTurnCounter: number;
865
+ ClubCardTurnCounter: number;
866
+ Sleeve: number;
865
867
  }
866
868
 
867
869
  interface ServerChatRoomGameCardGameQueryRequest {
@@ -130,6 +130,8 @@ type HTMLOptions<T extends keyof HTMLElementTagNameMap> = {
130
130
  interface HTMLElementEventMap {
131
131
  /** Custom event fired by {@link ElementButton.Create} buttons whenever a click-event encounters `aria-disabled: "true"`. */
132
132
  bcClickDisabled: MouseEvent;
133
+ /** Custom event fired by {@link ElementButton.Create} buttons whenever a touch is hold for 300 ms. */
134
+ bcTouchHold: MouseEvent;
133
135
  }
134
136
 
135
137
  declare namespace ElementButton {
@@ -179,6 +181,11 @@ declare namespace ElementButton {
179
181
  disabled?: boolean;
180
182
  /** A click event listener to-be fired when a button is disabled via `aria-disabled: "true"`. */
181
183
  clickDisabled?: (this: HTMLButtonElement, event: MouseEvent) => any;
184
+ /**
185
+ * Enabled buttons with a `checkbox` or `radio` role can normally not be clicked if the `aria-required: "true"` is set.
186
+ * Setting this option to `true` disables that behavior, clicking an already enabled button thus firing its click events once again rather than aborting.
187
+ */
188
+ allowRequiredClick?: boolean;
182
189
  }
183
190
  }
184
191
 
@@ -495,7 +502,8 @@ interface ExpressionNameMap {
495
502
  null | "Afk" | "Whisper" | "Sleep" | "Hearts" | "Tear" | "Hearing" | "Confusion" | "Exclamation" |
496
503
  "Annoyed" | "Read" | "RaisedHand" | "Spectator" | "ThumbsDown" | "ThumbsUp" | "LoveRope" |
497
504
  "LoveGag" | "LoveLock" | "Wardrobe" | "Gaming" | "Coffee" | "Fork" | "Music" | "Car" | "Hanger" |
498
- "Call" | "Lightbulb" | "Warning" | "BrokenHeart" | "Drawing" | "Coding" | "TV" | "Bathing"
505
+ "Call" | "Lightbulb" | "Warning" | "BrokenHeart" | "Drawing" | "Coding" | "TV" | "Bathing" |
506
+ "Shopping" |"Brb" | "Work" | "SOS"
499
507
  ),
500
508
  }
501
509
 
@@ -650,7 +658,7 @@ type FetishName =
650
658
 
651
659
  type BackgroundTag =
652
660
  "Filter by tag" | "Indoor" | "Outdoor" | "Aquatic" | "Special Events" | "SciFi & Fantasy" |
653
- "Club & College" | "Regular house" | "Dungeon" | "Asylum" | "Pandora"
661
+ "Club" | "College" | "Regular house" | "Dungeon" | "Asylum" | "Pandora" | "Club Cards"
654
662
  ;
655
663
 
656
664
  // NOTE: `NPCArchetype` is for NPC's only
@@ -2324,6 +2332,7 @@ interface ChatSettingsType {
2324
2332
  /** Whether to preserve the chat log when switching rooms */
2325
2333
  PreserveChat: boolean;
2326
2334
  OOCAutoClose: boolean;
2335
+ DisableReplies: boolean;
2327
2336
  }
2328
2337
 
2329
2338
  interface GameplaySettingsType {
@@ -2350,8 +2359,16 @@ interface AudioSettingsType {
2350
2359
  interface VisualSettingsType {
2351
2360
  ForceFullHeight: boolean;
2352
2361
  UseCharacterInPreviews: boolean;
2353
- MainHallBackground: string;
2354
- PrivateRoomBackground: string;
2362
+ /**
2363
+ * Background to use for the MainHall screen
2364
+ * "MainHall" is used if undefined
2365
+ */
2366
+ MainHallBackground?: string;
2367
+ /**
2368
+ * Background to use for the PrivateRoom screen
2369
+ * "Private" is used if undefined
2370
+ */
2371
+ PrivateRoomBackground?: string;
2355
2372
  }
2356
2373
 
2357
2374
  /**
@@ -2369,6 +2386,7 @@ interface PlayerOnlineSettings {
2369
2386
  EnableAfkTimer: boolean;
2370
2387
  ShowRoomCustomization: 0 | 1 | 2 | 3; // 0 - Never, 1 - No by default, 2 - Yes by default, 3 - Always
2371
2388
  FriendListAutoRefresh: boolean;
2389
+ DefaultChatRoomBackground: string;
2372
2390
  }
2373
2391
 
2374
2392
  /** Pandora Player extension */
@@ -3779,6 +3797,9 @@ interface GameClubCardParameters {
3779
3797
  Reward?: string;
3780
3798
  Status?: OnlineGameStatus;
3781
3799
  PlayerSlot?: number;
3800
+ Background?: string;
3801
+ CardBack?: number;
3802
+ IsAnimation?: boolean;
3782
3803
  }
3783
3804
 
3784
3805
  interface GamePrisonParameters {
@@ -4427,6 +4448,15 @@ interface NotificationData {
4427
4448
  chatRoomName?: string,
4428
4449
  }
4429
4450
 
4451
+ interface NotificationBeep {
4452
+ Message: string;
4453
+ Duration: number;
4454
+ ClickHandler?: (event: MouseEvent) => void;
4455
+ Silent?: boolean;
4456
+ /** Internal use; timer that is set when the beep first appears on screen */
4457
+ Timer?: number;
4458
+ }
4459
+
4430
4460
  // #end region
4431
4461
 
4432
4462
  // #region preference
@@ -4585,8 +4615,11 @@ interface WheelFortuneOptionType {
4585
4615
 
4586
4616
  // #end region
4587
4617
 
4618
+ // #region ClubCard
4619
+
4588
4620
  interface ClubCard {
4589
4621
  ID: number;
4622
+ UniqueID?: string;
4590
4623
  Name: string;
4591
4624
  ArrayIndex?: number;
4592
4625
  Type?: string;
@@ -4607,6 +4640,16 @@ interface ClubCard {
4607
4640
  Negated?: boolean;
4608
4641
  GlowTimer?: number;
4609
4642
  GlowColor?: string;
4643
+ EffectKey?: number;
4644
+ EffectType?: string;
4645
+ //### Animations
4646
+ AnimationState?: string;
4647
+ DelayedAnimationState?: string;
4648
+ CurrentX?: number;
4649
+ CurrentY?: number;
4650
+ CurrentW?: number;
4651
+ IsVisible?: boolean;
4652
+ //### ### ### ###
4610
4653
  OnPlay?: (C: ClubCardPlayer) => void;
4611
4654
  BeforeTurnEnd?: (C: ClubCardPlayer) => void;
4612
4655
  AfterTurnEnd?: (C: ClubCardPlayer) => void;
@@ -4636,12 +4679,13 @@ interface ClubCardPlayer {
4636
4679
  Character: Character;
4637
4680
  Control: string;
4638
4681
  Index: number;
4639
- Sleeve: string;
4682
+ Sleeve: number;
4640
4683
  Deck: ClubCard[];
4641
4684
  FullDeck: ClubCard[];
4642
4685
  Hand: ClubCard[];
4643
4686
  Board: ClubCard[];
4644
4687
  Event: ClubCard[];
4688
+ RenderFullBoard: ClubCard[];
4645
4689
  DiscardPile: ClubCard[];
4646
4690
  Level: number;
4647
4691
  Money: number;
@@ -4666,6 +4710,39 @@ interface ClubCardMessage {
4666
4710
  OpponentPlayer?: string;
4667
4711
  }
4668
4712
 
4713
+ /**
4714
+ * Represents an active card animation in progress.
4715
+ */
4716
+ interface ClubCardActiveAnimation {
4717
+ /** The card being animated. */
4718
+ Card: ClubCard;
4719
+ /** The original card (if a copy is animated). */
4720
+ OriginalCard?: ClubCard | null;
4721
+ /** Timestamp when the animation started (in milliseconds). */
4722
+ StartTime: number;
4723
+ /** Total animation duration in milliseconds. */
4724
+ Duration: number;
4725
+ /** Initial position of the card. */
4726
+ StartPosition: { x: number, y: number, w: number };
4727
+ /** Target position of the card. */
4728
+ EndPosition: { x: number, y: number, w: number };
4729
+ /** Whether to hide the original card during animation. */
4730
+ HideOriginal: boolean;
4731
+ /** Whether the original card should stay hidden after animation completes. */
4732
+ KeepOriginalHidden: boolean;
4733
+ /** Timeout ID for fallback handling (used to restore the card state in case of failure). */
4734
+ SafetyTimeout: number;
4735
+ /** Callback function called when the animation completes. */
4736
+ OnComplete?: Function|null;
4737
+ // Processed elsewhere
4738
+ // /** Callback function called when the animation starts. */
4739
+ // OnStart?: Function|null;
4740
+ /** Animation rendering level priority*/
4741
+ Priority: number;
4742
+ }
4743
+
4744
+
4745
+ // #endregion
4669
4746
 
4670
4747
  // #region drawing
4671
4748
 
@@ -4813,6 +4890,8 @@ interface ShopItem {
4813
4890
  readonly Asset: Asset,
4814
4891
  /** The assets sorting priority within the asset list; lower values take priority */
4815
4892
  readonly SortPriority: number,
4893
+ /** Whether the player is forbidden to buy the item */
4894
+ readonly CannotBuy: boolean,
4816
4895
  /** Whether an item should never be able to be sold */
4817
4896
  readonly NeverSell: boolean,
4818
4897
  /** Whether the asset can be bought; `false` implies that it can be sold */
@@ -1,24 +1,18 @@
1
1
  /**
2
2
  * Change the current screen to the background selection screen
3
- * @param {string[]} List - The list of possible Background names
4
- * @param {number} Idx - The index of the current background
5
- * @param {(selection: string) => void} Callback - The function to call when a new background has been selected
3
+ * @param {BackgroundTag[]} Tags - The list of possible Background names
4
+ * @param {string} Name - The name of the current background
5
+ * @param {(selection: string, setBackground: boolean) => void} Callback - The function to call when a new background has been selected
6
6
  * @returns {void} - Nothing
7
7
  */
8
- declare function BackgroundSelectionMake(List: string[], Idx: number, Callback: (selection: string) => void): void;
8
+ declare function BackgroundSelectionMake(Tags: BackgroundTag[], Name: string, Callback: (selection: string, setBackground: boolean) => void): void;
9
9
  /**
10
10
  * Comapres two backgrounds by their description
11
- * @param {object} a - The first object to compare
12
- * @param {string} a.Description - The description of object a. Is used for comparision
13
- * @param {object} b - The second object to compar
14
- * @param {string} b.Description - The description of object b. Is used for comparision
11
+ * @param {string} a - The name of the first background
12
+ * @param {string} b - The name of the second background
15
13
  * @returns {number} - Returns -1 if the description of object a is less then that of b, 1 otherwise
16
14
  */
17
- declare function BackgroundSelectionSort(a: {
18
- Description: string;
19
- }, b: {
20
- Description: string;
21
- }): number;
15
+ declare function BackgroundSelectionSort(a: string, b: string): number;
22
16
  /**
23
17
  * Initializes the Background selection screen.
24
18
  * Function coiuld be called dynamically, so the body has to be there, even if it does nothing.
@@ -34,9 +28,11 @@ declare function BackgroundSelectionUnload(): void;
34
28
  declare function BackgroundSelectionInputChanged(): void;
35
29
  /**
36
30
  * When a new value is selected in the tag selection drop-down, we refresh the displayed background
31
+ * @this {HTMLSelectElement}
37
32
  * @returns {void} - Nothing
38
33
  */
39
- declare function BackgroundSelectionTagChanged(): void;
34
+ declare function BackgroundSelectionTagChanged(this: HTMLSelectElement): void;
35
+ declare function BackgroundSelectionResize(load: boolean): void;
40
36
  /**
41
37
  * Draws the Background selection screen:
42
38
  * - draws all the buttons and the text input field on the topmost rows
@@ -71,22 +67,26 @@ declare var BackgroundSelectionList: string[];
71
67
  /** @type {BackgroundTag[]} */
72
68
  declare var BackgroundSelectionTagList: BackgroundTag[];
73
69
  declare var BackgroundSelectionIndex: number;
74
- declare var BackgroundSelectionSelect: string;
70
+ /** @type {string | null} */
71
+ declare var BackgroundSelectionSelect: string | null;
75
72
  declare var BackgroundSelectionSize: number;
76
73
  declare var BackgroundSelectionOffset: number;
77
- /** @type {null | ((selection: string) => void)} */
78
- declare var BackgroundSelectionCallback: null | ((selection: string) => void);
79
- /** @type {ScreenSpecifier | null} */
80
- declare var BackgroundSelectionReturnScreen: ScreenSpecifier | null;
81
- /** @type {{ Name: string, Description: string, Low: string }[]} */
82
- declare var BackgroundSelectionAll: {
83
- Name: string;
84
- Description: string;
85
- Low: string;
86
- }[];
87
- /** @type {{ Name: string, Description: string, Low: string }[]} */
88
- declare var BackgroundSelectionView: {
89
- Name: string;
90
- Description: string;
91
- Low: string;
92
- }[];
74
+ /** @type {null | ((selection: string, setBackground: boolean) => void)} */
75
+ declare var BackgroundSelectionCallback: null | ((selection: string, setBackground: boolean) => void);
76
+ /** @type {never} */
77
+ declare var BackgroundSelectionReturnScreen: never;
78
+ /** @type {never} */
79
+ declare var BackgroundSelectionAll: never;
80
+ /** @type {string[]} */
81
+ declare var BackgroundSelectionView: string[];
82
+ declare namespace Background {
83
+ namespace elementID {
84
+ let root: string;
85
+ let searchFilter: string;
86
+ let tagFilter: string;
87
+ let btnPrev: string;
88
+ let btnNext: string;
89
+ let btnCancel: string;
90
+ let btnAccept: string;
91
+ }
92
+ }
@@ -1,3 +1,4 @@
1
+ declare function PreferenceSubscreenOnlineLoad(): void;
1
2
  /**
2
3
  * Sets the online preferences for the player. Redirected to from the main Run function if the player is in the online
3
4
  * settings subscreen.
@@ -9,3 +10,7 @@ declare function PreferenceSubscreenOnlineRun(): void;
9
10
  * @returns {void} - Nothing
10
11
  */
11
12
  declare function PreferenceSubscreenOnlineClick(): void;
13
+ /** @type {null | string[]} */
14
+ declare var PreferenceOnlineDefaultBackgroundList: null | string[];
15
+ declare var PreferenceOnlineDefaultBackgroundIndex: number;
16
+ declare var PreferenceOnlineDefaultBackground: string;