microboard-temp 0.5.2 → 0.5.4
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/dist/cjs/browser.js +12 -1
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/node.js +12 -1
- package/dist/esm/browser.js +12 -1
- package/dist/esm/index.js +12 -1
- package/dist/esm/node.js +12 -1
- package/dist/types/Items/Examples/CardGame/Deck/Deck.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -48105,6 +48105,16 @@ class Deck extends BaseItem {
|
|
|
48105
48105
|
this.removeChildItems(this.index.list());
|
|
48106
48106
|
this.addChildItems(shuffled);
|
|
48107
48107
|
}
|
|
48108
|
+
flipDeck() {
|
|
48109
|
+
if (!this.index || !this.index.list().length) {
|
|
48110
|
+
return;
|
|
48111
|
+
}
|
|
48112
|
+
const cards = this.index.list();
|
|
48113
|
+
cards[0].toggleIsOpen(cards);
|
|
48114
|
+
const reversed = [...cards].reverse();
|
|
48115
|
+
this.removeChildItems(cards);
|
|
48116
|
+
this.addChildItems(reversed);
|
|
48117
|
+
}
|
|
48108
48118
|
apply(op) {
|
|
48109
48119
|
super.apply(op);
|
|
48110
48120
|
if (op.class === "Deck") {
|
|
@@ -49858,7 +49868,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
49858
49868
|
}
|
|
49859
49869
|
// src/Keyboard/getHotkeyLabel.ts
|
|
49860
49870
|
function getHotkeyLabel(hotkey) {
|
|
49861
|
-
const
|
|
49871
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
49872
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
49862
49873
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
49863
49874
|
case "windows":
|
|
49864
49875
|
return hotkeyLabel.windows;
|
package/dist/cjs/index.js
CHANGED
|
@@ -48105,6 +48105,16 @@ class Deck extends BaseItem {
|
|
|
48105
48105
|
this.removeChildItems(this.index.list());
|
|
48106
48106
|
this.addChildItems(shuffled);
|
|
48107
48107
|
}
|
|
48108
|
+
flipDeck() {
|
|
48109
|
+
if (!this.index || !this.index.list().length) {
|
|
48110
|
+
return;
|
|
48111
|
+
}
|
|
48112
|
+
const cards = this.index.list();
|
|
48113
|
+
cards[0].toggleIsOpen(cards);
|
|
48114
|
+
const reversed = [...cards].reverse();
|
|
48115
|
+
this.removeChildItems(cards);
|
|
48116
|
+
this.addChildItems(reversed);
|
|
48117
|
+
}
|
|
48108
48118
|
apply(op) {
|
|
48109
48119
|
super.apply(op);
|
|
48110
48120
|
if (op.class === "Deck") {
|
|
@@ -49858,7 +49868,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
49858
49868
|
}
|
|
49859
49869
|
// src/Keyboard/getHotkeyLabel.ts
|
|
49860
49870
|
function getHotkeyLabel(hotkey) {
|
|
49861
|
-
const
|
|
49871
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
49872
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
49862
49873
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
49863
49874
|
case "windows":
|
|
49864
49875
|
return hotkeyLabel.windows;
|
package/dist/cjs/node.js
CHANGED
|
@@ -50578,6 +50578,16 @@ class Deck extends BaseItem {
|
|
|
50578
50578
|
this.removeChildItems(this.index.list());
|
|
50579
50579
|
this.addChildItems(shuffled);
|
|
50580
50580
|
}
|
|
50581
|
+
flipDeck() {
|
|
50582
|
+
if (!this.index || !this.index.list().length) {
|
|
50583
|
+
return;
|
|
50584
|
+
}
|
|
50585
|
+
const cards = this.index.list();
|
|
50586
|
+
cards[0].toggleIsOpen(cards);
|
|
50587
|
+
const reversed = [...cards].reverse();
|
|
50588
|
+
this.removeChildItems(cards);
|
|
50589
|
+
this.addChildItems(reversed);
|
|
50590
|
+
}
|
|
50581
50591
|
apply(op) {
|
|
50582
50592
|
super.apply(op);
|
|
50583
50593
|
if (op.class === "Deck") {
|
|
@@ -52331,7 +52341,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
52331
52341
|
}
|
|
52332
52342
|
// src/Keyboard/getHotkeyLabel.ts
|
|
52333
52343
|
function getHotkeyLabel(hotkey) {
|
|
52334
|
-
const
|
|
52344
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
52345
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
52335
52346
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
52336
52347
|
case "windows":
|
|
52337
52348
|
return hotkeyLabel.windows;
|
package/dist/esm/browser.js
CHANGED
|
@@ -47951,6 +47951,16 @@ class Deck extends BaseItem {
|
|
|
47951
47951
|
this.removeChildItems(this.index.list());
|
|
47952
47952
|
this.addChildItems(shuffled);
|
|
47953
47953
|
}
|
|
47954
|
+
flipDeck() {
|
|
47955
|
+
if (!this.index || !this.index.list().length) {
|
|
47956
|
+
return;
|
|
47957
|
+
}
|
|
47958
|
+
const cards = this.index.list();
|
|
47959
|
+
cards[0].toggleIsOpen(cards);
|
|
47960
|
+
const reversed = [...cards].reverse();
|
|
47961
|
+
this.removeChildItems(cards);
|
|
47962
|
+
this.addChildItems(reversed);
|
|
47963
|
+
}
|
|
47954
47964
|
apply(op) {
|
|
47955
47965
|
super.apply(op);
|
|
47956
47966
|
if (op.class === "Deck") {
|
|
@@ -49704,7 +49714,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
49704
49714
|
}
|
|
49705
49715
|
// src/Keyboard/getHotkeyLabel.ts
|
|
49706
49716
|
function getHotkeyLabel(hotkey) {
|
|
49707
|
-
const
|
|
49717
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
49718
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
49708
49719
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
49709
49720
|
case "windows":
|
|
49710
49721
|
return hotkeyLabel.windows;
|
package/dist/esm/index.js
CHANGED
|
@@ -47944,6 +47944,16 @@ class Deck extends BaseItem {
|
|
|
47944
47944
|
this.removeChildItems(this.index.list());
|
|
47945
47945
|
this.addChildItems(shuffled);
|
|
47946
47946
|
}
|
|
47947
|
+
flipDeck() {
|
|
47948
|
+
if (!this.index || !this.index.list().length) {
|
|
47949
|
+
return;
|
|
47950
|
+
}
|
|
47951
|
+
const cards = this.index.list();
|
|
47952
|
+
cards[0].toggleIsOpen(cards);
|
|
47953
|
+
const reversed = [...cards].reverse();
|
|
47954
|
+
this.removeChildItems(cards);
|
|
47955
|
+
this.addChildItems(reversed);
|
|
47956
|
+
}
|
|
47947
47957
|
apply(op) {
|
|
47948
47958
|
super.apply(op);
|
|
47949
47959
|
if (op.class === "Deck") {
|
|
@@ -49697,7 +49707,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
49697
49707
|
}
|
|
49698
49708
|
// src/Keyboard/getHotkeyLabel.ts
|
|
49699
49709
|
function getHotkeyLabel(hotkey) {
|
|
49700
|
-
const
|
|
49710
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
49711
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
49701
49712
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
49702
49713
|
case "windows":
|
|
49703
49714
|
return hotkeyLabel.windows;
|
package/dist/esm/node.js
CHANGED
|
@@ -50412,6 +50412,16 @@ class Deck extends BaseItem {
|
|
|
50412
50412
|
this.removeChildItems(this.index.list());
|
|
50413
50413
|
this.addChildItems(shuffled);
|
|
50414
50414
|
}
|
|
50415
|
+
flipDeck() {
|
|
50416
|
+
if (!this.index || !this.index.list().length) {
|
|
50417
|
+
return;
|
|
50418
|
+
}
|
|
50419
|
+
const cards = this.index.list();
|
|
50420
|
+
cards[0].toggleIsOpen(cards);
|
|
50421
|
+
const reversed = [...cards].reverse();
|
|
50422
|
+
this.removeChildItems(cards);
|
|
50423
|
+
this.addChildItems(reversed);
|
|
50424
|
+
}
|
|
50415
50425
|
apply(op) {
|
|
50416
50426
|
super.apply(op);
|
|
50417
50427
|
if (op.class === "Deck") {
|
|
@@ -52165,7 +52175,8 @@ function checkHotkeys(hotkeyMap, event, board) {
|
|
|
52165
52175
|
}
|
|
52166
52176
|
// src/Keyboard/getHotkeyLabel.ts
|
|
52167
52177
|
function getHotkeyLabel(hotkey) {
|
|
52168
|
-
const
|
|
52178
|
+
const hotkeys = { ...hotkeys_default, ...hotkeyNames };
|
|
52179
|
+
const hotkeyLabel = hotkeys[hotkey].label;
|
|
52169
52180
|
switch (conf.FORCE_HOTKEYS || "auto") {
|
|
52170
52181
|
case "windows":
|
|
52171
52182
|
return hotkeyLabel.windows;
|
|
@@ -21,6 +21,7 @@ export declare class Deck extends BaseItem {
|
|
|
21
21
|
getBottomCard(): Card | undefined;
|
|
22
22
|
getRandomCard(): Card | undefined;
|
|
23
23
|
shuffleDeck(): void;
|
|
24
|
+
flipDeck(): void;
|
|
24
25
|
apply(op: DeckOperation): void;
|
|
25
26
|
updateMbr(): void;
|
|
26
27
|
deserialize(data: SerializedItemData): this;
|