microboard-ui-temp 0.1.32 → 0.1.34

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -37
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -255866,17 +255866,6 @@ function throttle2(func, delay) {
255866
255866
  }
255867
255867
  };
255868
255868
  }
255869
- var editModeHotkeyRegistry = {};
255870
- var viewModeHotkeyRegistry = {};
255871
- var hotkeyNames = {};
255872
- function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
255873
- if (boardMode === "edit") {
255874
- editModeHotkeyRegistry[name] = hotkeyConfig;
255875
- } else {
255876
- viewModeHotkeyRegistry[name] = hotkeyConfig;
255877
- }
255878
- hotkeyNames[name] = hotkey;
255879
- }
255880
255869
  var defaultCardData = {
255881
255870
  itemType: "Card",
255882
255871
  isOpen: false,
@@ -256012,21 +256001,17 @@ registerItem({
256012
256001
  item: Card,
256013
256002
  defaultData: defaultCardData
256014
256003
  });
256015
- registerHotkey({
256016
- name: "flipCard",
256017
- hotkey: { key: { button: "KeyF", shift: true }, label: { windows: "F", mac: "F" } },
256018
- boardMode: "edit",
256019
- hotkeyConfig: {
256020
- allItemsType: ["Card"],
256021
- cb: (event, board) => {
256022
- const cards = board?.selection.items.list();
256023
- if (!cards) {
256024
- return;
256025
- }
256026
- cards[0].toggleIsOpen(cards);
256027
- }
256004
+ var editModeHotkeyRegistry = {};
256005
+ var viewModeHotkeyRegistry = {};
256006
+ var hotkeyNames = {};
256007
+ function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
256008
+ if (boardMode === "edit") {
256009
+ editModeHotkeyRegistry[name] = hotkeyConfig;
256010
+ } else {
256011
+ viewModeHotkeyRegistry[name] = hotkeyConfig;
256028
256012
  }
256029
- });
256013
+ hotkeyNames[name] = hotkey;
256014
+ }
256030
256015
  var defaultDeckData = {
256031
256016
  itemType: "Deck"
256032
256017
  };
@@ -256279,17 +256264,29 @@ registerHotkey({
256279
256264
  }
256280
256265
  });
256281
256266
  registerHotkey({
256282
- name: "flipDeck",
256283
- hotkey: { key: { button: "KeyF", shift: true }, label: { windows: "F", mac: "F" } },
256267
+ name: "flipDeckOrCard",
256268
+ hotkey: { key: { button: "KeyF", shift: true }, label: { windows: "Shift+F", mac: "F" } },
256284
256269
  boardMode: "edit",
256285
256270
  hotkeyConfig: {
256286
- allItemsType: ["Deck"],
256271
+ allItemsType: ["Deck", "Card"],
256287
256272
  cb: (event, board) => {
256288
- const deck = board?.selection.items.getSingle();
256289
- if (!(deck instanceof Deck)) {
256273
+ const cardsOrDecks = board?.selection.items.list();
256274
+ if (!cardsOrDecks) {
256290
256275
  return;
256291
256276
  }
256292
- deck.flipDeck();
256277
+ let cards = [];
256278
+ let decks = [];
256279
+ for (const item of cardsOrDecks) {
256280
+ if (item instanceof Card) {
256281
+ cards.push(item);
256282
+ } else if (item instanceof Deck) {
256283
+ decks.push(item);
256284
+ }
256285
+ }
256286
+ cards[0]?.toggleIsOpen(cards);
256287
+ decks.forEach((deck) => {
256288
+ deck.flipDeck();
256289
+ });
256293
256290
  }
256294
256291
  }
256295
256292
  });
@@ -341017,12 +341014,6 @@ function getController(getBoard2, clipboard, account, appSettings) {
341017
341014
  if (!board) {
341018
341015
  return;
341019
341016
  }
341020
- const editModeHotkeys = {
341021
- navigateMode: () => board.tools.exitNavigateMode()
341022
- };
341023
- if (board.getInterfaceType() === "edit") {
341024
- checkHotkeys(editModeHotkeys, event, board);
341025
- }
341026
341017
  board.keyboard.keyUp(event);
341027
341018
  if (!board.selection.tool.keyUp(board.keyboard.up)) {
341028
341019
  board.tools.keyUp(board.keyboard.up);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -51,7 +51,7 @@
51
51
  "i18next-browser-languagedetector": "^8.2.0",
52
52
  "js-cookie": "^3.0.5",
53
53
  "jwt-decode": "^4.0.0",
54
- "microboard-temp": "^0.5.11",
54
+ "microboard-temp": "^0.5.12",
55
55
  "nanoid": "^5.1.5",
56
56
  "prop-types": "^15.8.1",
57
57
  "react-hot-toast": "2.4.1",