microboard-ui-temp 0.1.27 → 0.1.29

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 +92 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -256209,6 +256209,94 @@ registerItem({
256209
256209
  item: Deck,
256210
256210
  defaultData: defaultDeckData
256211
256211
  });
256212
+ registerHotkey({
256213
+ name: "getCard-top",
256214
+ hotkey: { key: { button: "KeyD" }, label: { windows: "Shift+D", mac: "⇧D" } },
256215
+ boardMode: "edit",
256216
+ hotkeyConfig: {
256217
+ singleItemOnly: true,
256218
+ allItemsType: ["Deck"],
256219
+ cb: (event, board) => {
256220
+ const deck = board?.selection.items.getSingle();
256221
+ if (!(deck instanceof Deck)) {
256222
+ return;
256223
+ }
256224
+ const card = deck.getTopCard();
256225
+ const { left, top } = deck.getMbr();
256226
+ if (!card) {
256227
+ return;
256228
+ }
256229
+ card.transformation.translateTo(left, top - 280);
256230
+ if (deck.getDeck().length === 0) {
256231
+ board?.remove(deck);
256232
+ }
256233
+ }
256234
+ }
256235
+ });
256236
+ registerHotkey({
256237
+ name: "getCard-bottom",
256238
+ hotkey: { key: { button: "KeyB" }, label: { windows: "Shift+B", mac: "⇧B" } },
256239
+ boardMode: "edit",
256240
+ hotkeyConfig: {
256241
+ singleItemOnly: true,
256242
+ allItemsType: ["Deck"],
256243
+ cb: (event, board) => {
256244
+ const deck = board?.selection.items.getSingle();
256245
+ if (!(deck instanceof Deck)) {
256246
+ return;
256247
+ }
256248
+ const card = deck.getBottomCard();
256249
+ const { left, top } = deck.getMbr();
256250
+ if (!card) {
256251
+ return;
256252
+ }
256253
+ card.transformation.translateTo(left, top - 280);
256254
+ if (deck.getDeck().length === 0) {
256255
+ board?.remove(deck);
256256
+ }
256257
+ }
256258
+ }
256259
+ });
256260
+ registerHotkey({
256261
+ name: "getCard-random",
256262
+ hotkey: { key: { button: "KeyR" }, label: { windows: "Shift+R", mac: "⇧R" } },
256263
+ boardMode: "edit",
256264
+ hotkeyConfig: {
256265
+ singleItemOnly: true,
256266
+ allItemsType: ["Deck"],
256267
+ cb: (event, board) => {
256268
+ const deck = board?.selection.items.getSingle();
256269
+ if (!(deck instanceof Deck)) {
256270
+ return;
256271
+ }
256272
+ const card = deck.getRandomCard();
256273
+ const { left, top } = deck.getMbr();
256274
+ if (!card) {
256275
+ return;
256276
+ }
256277
+ card.transformation.translateTo(left, top - 280);
256278
+ if (deck.getDeck().length === 0) {
256279
+ board?.remove(deck);
256280
+ }
256281
+ }
256282
+ }
256283
+ });
256284
+ registerHotkey({
256285
+ name: "flipDeck",
256286
+ hotkey: { key: { button: "KeyF" }, label: { windows: "F", mac: "F" } },
256287
+ boardMode: "edit",
256288
+ hotkeyConfig: {
256289
+ singleItemOnly: true,
256290
+ allItemsType: ["Deck"],
256291
+ cb: (event, board) => {
256292
+ const deck = board?.selection.items.getSingle();
256293
+ if (!(deck instanceof Deck)) {
256294
+ return;
256295
+ }
256296
+ deck.flipDeck();
256297
+ }
256298
+ }
256299
+ });
256212
256300
 
256213
256301
  class AddDice extends ShapeTool {
256214
256302
  constructor(board, name) {
@@ -283690,8 +283778,6 @@ function getApiUrl(path4) {
283690
283778
  if (!path4) {
283691
283779
  path4 = "";
283692
283780
  }
283693
- console.log("front conf", frontConf);
283694
- console.log("front conf spread", { ...frontConf });
283695
283781
  if (frontConf.apiURL) {
283696
283782
  return `${frontConf.apiURL}${path4}`;
283697
283783
  }
@@ -334838,7 +334924,6 @@ function createConnection(getCurrentBoard, getAccount3, getStorage) {
334838
334924
  case "AiChat":
334839
334925
  case "Confirmation":
334840
334926
  case "BoardEvent":
334841
- case "BoardSnapshot":
334842
334927
  case "CreateSnapshotRequest":
334843
334928
  case "BoardSubscriptionCompleted":
334844
334929
  case "UserJoin":
@@ -446595,8 +446680,7 @@ function createApp(isHistory = true) {
446595
446680
  return;
446596
446681
  }
446597
446682
  const currIndex = board2.getSnapshot().lastIndex;
446598
- const snapshot2 = undefined;
446599
- board2.events = createEvents(board2, connection, currIndex || snapshot2?.lastIndex || 0);
446683
+ board2.events = createEvents(board2, connection, currIndex || 0);
446600
446684
  board2.presence.addEvents(board2.events);
446601
446685
  board2.presence.setCurrentUser(localStorage.getItem(`currentUser`) || (() => {
446602
446686
  const uuid = v4_default3();
@@ -446604,7 +446688,6 @@ function createApp(isHistory = true) {
446604
446688
  return uuid;
446605
446689
  })());
446606
446690
  board2.selection.events = board2.events;
446607
- if (snapshot2 && currIndex === 0) {}
446608
446691
  board2.resolveConnecting();
446609
446692
  setTimeout(() => {
446610
446693
  board2.items.subject.publish(board2.items);
@@ -446765,6 +446848,7 @@ function createApp(isHistory = true) {
446765
446848
  disableLogger,
446766
446849
  getLocalEditFileHandler: () => fileHandle,
446767
446850
  setControlMode,
446851
+ settings: getSettings(),
446768
446852
  getSettings
446769
446853
  };
446770
446854
  account.setOnInit(async () => {
@@ -446869,8 +446953,10 @@ export {
446869
446953
  exports_media as mediaApi,
446870
446954
  initInter,
446871
446955
  frontConf,
446956
+ exports_folders as foldersApi,
446872
446957
  customCursors_default as customCursors,
446873
446958
  createApp,
446959
+ exports_boards2 as boardsApiV2,
446874
446960
  exports_boards as boardsApi,
446875
446961
  exports_billing as billingApi,
446876
446962
  exports_auth as authApi,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
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.5",
54
+ "microboard-temp": "^0.5.7",
55
55
  "nanoid": "^5.1.5",
56
56
  "prop-types": "^15.8.1",
57
57
  "react-hot-toast": "2.4.1",