microboard-temp 0.4.12 → 0.4.14

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.
@@ -6743,6 +6743,7 @@ var conf = {
6743
6743
  beforeMediaRemove: async (...args) => false,
6744
6744
  onUploadMediaError: async (...args) => false
6745
6745
  },
6746
+ getAccessToken: () => null,
6746
6747
  openModal: () => {},
6747
6748
  notify: () => "",
6748
6749
  disMissNotification: () => {},
@@ -45960,7 +45961,6 @@ class Card extends BaseItem {
45960
45961
  this.transformation.subject.subscribe(() => {
45961
45962
  this.throttledBringToFront();
45962
45963
  this.updateMbr();
45963
- this.updateImageToRender();
45964
45964
  this.subject.publish(this);
45965
45965
  });
45966
45966
  this.updateMbr();
@@ -45976,6 +45976,7 @@ class Card extends BaseItem {
45976
45976
  this.backside.onload = () => {
45977
45977
  this.subject.publish(this);
45978
45978
  };
45979
+ this.updateImageToRender();
45979
45980
  }
45980
45981
  setIsInDeck(isInDeck) {
45981
45982
  this.emit({
@@ -55787,7 +55788,7 @@ function handleAudioGenerate(response, board) {
55787
55788
  }
55788
55789
  function handleImageGenerate(response, board) {
55789
55790
  if (response.status === "completed" && response.base64) {
55790
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
55791
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
55791
55792
  const placeholderId = board.aiImagePlaceholder?.getId();
55792
55793
  if (placeholderId) {
55793
55794
  const placeholderNode = board.items.getById(placeholderId);
package/dist/cjs/index.js CHANGED
@@ -6743,6 +6743,7 @@ var conf = {
6743
6743
  beforeMediaRemove: async (...args) => false,
6744
6744
  onUploadMediaError: async (...args) => false
6745
6745
  },
6746
+ getAccessToken: () => null,
6746
6747
  openModal: () => {},
6747
6748
  notify: () => "",
6748
6749
  disMissNotification: () => {},
@@ -45960,7 +45961,6 @@ class Card extends BaseItem {
45960
45961
  this.transformation.subject.subscribe(() => {
45961
45962
  this.throttledBringToFront();
45962
45963
  this.updateMbr();
45963
- this.updateImageToRender();
45964
45964
  this.subject.publish(this);
45965
45965
  });
45966
45966
  this.updateMbr();
@@ -45976,6 +45976,7 @@ class Card extends BaseItem {
45976
45976
  this.backside.onload = () => {
45977
45977
  this.subject.publish(this);
45978
45978
  };
45979
+ this.updateImageToRender();
45979
45980
  }
45980
45981
  setIsInDeck(isInDeck) {
45981
45982
  this.emit({
@@ -55787,7 +55788,7 @@ function handleAudioGenerate(response, board) {
55787
55788
  }
55788
55789
  function handleImageGenerate(response, board) {
55789
55790
  if (response.status === "completed" && response.base64) {
55790
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
55791
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
55791
55792
  const placeholderId = board.aiImagePlaceholder?.getId();
55792
55793
  if (placeholderId) {
55793
55794
  const placeholderNode = board.items.getById(placeholderId);
package/dist/cjs/node.js CHANGED
@@ -7780,6 +7780,7 @@ var conf = {
7780
7780
  beforeMediaRemove: async (...args) => false,
7781
7781
  onUploadMediaError: async (...args) => false
7782
7782
  },
7783
+ getAccessToken: () => null,
7783
7784
  openModal: () => {},
7784
7785
  notify: () => "",
7785
7786
  disMissNotification: () => {},
@@ -48500,7 +48501,6 @@ class Card extends BaseItem {
48500
48501
  this.transformation.subject.subscribe(() => {
48501
48502
  this.throttledBringToFront();
48502
48503
  this.updateMbr();
48503
- this.updateImageToRender();
48504
48504
  this.subject.publish(this);
48505
48505
  });
48506
48506
  this.updateMbr();
@@ -48516,6 +48516,7 @@ class Card extends BaseItem {
48516
48516
  this.backside.onload = () => {
48517
48517
  this.subject.publish(this);
48518
48518
  };
48519
+ this.updateImageToRender();
48519
48520
  }
48520
48521
  setIsInDeck(isInDeck) {
48521
48522
  this.emit({
@@ -58260,7 +58261,7 @@ function handleAudioGenerate(response, board) {
58260
58261
  }
58261
58262
  function handleImageGenerate(response, board) {
58262
58263
  if (response.status === "completed" && response.base64) {
58263
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
58264
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
58264
58265
  const placeholderId = board.aiImagePlaceholder?.getId();
58265
58266
  if (placeholderId) {
58266
58267
  const placeholderNode = board.items.getById(placeholderId);
@@ -6585,6 +6585,7 @@ var conf = {
6585
6585
  beforeMediaRemove: async (...args) => false,
6586
6586
  onUploadMediaError: async (...args) => false
6587
6587
  },
6588
+ getAccessToken: () => null,
6588
6589
  openModal: () => {},
6589
6590
  notify: () => "",
6590
6591
  disMissNotification: () => {},
@@ -45811,7 +45812,6 @@ class Card extends BaseItem {
45811
45812
  this.transformation.subject.subscribe(() => {
45812
45813
  this.throttledBringToFront();
45813
45814
  this.updateMbr();
45814
- this.updateImageToRender();
45815
45815
  this.subject.publish(this);
45816
45816
  });
45817
45817
  this.updateMbr();
@@ -45827,6 +45827,7 @@ class Card extends BaseItem {
45827
45827
  this.backside.onload = () => {
45828
45828
  this.subject.publish(this);
45829
45829
  };
45830
+ this.updateImageToRender();
45830
45831
  }
45831
45832
  setIsInDeck(isInDeck) {
45832
45833
  this.emit({
@@ -55638,7 +55639,7 @@ function handleAudioGenerate(response, board) {
55638
55639
  }
55639
55640
  function handleImageGenerate(response, board) {
55640
55641
  if (response.status === "completed" && response.base64) {
55641
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
55642
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
55642
55643
  const placeholderId = board.aiImagePlaceholder?.getId();
55643
55644
  if (placeholderId) {
55644
55645
  const placeholderNode = board.items.getById(placeholderId);
package/dist/esm/index.js CHANGED
@@ -6578,6 +6578,7 @@ var conf = {
6578
6578
  beforeMediaRemove: async (...args) => false,
6579
6579
  onUploadMediaError: async (...args) => false
6580
6580
  },
6581
+ getAccessToken: () => null,
6581
6582
  openModal: () => {},
6582
6583
  notify: () => "",
6583
6584
  disMissNotification: () => {},
@@ -45804,7 +45805,6 @@ class Card extends BaseItem {
45804
45805
  this.transformation.subject.subscribe(() => {
45805
45806
  this.throttledBringToFront();
45806
45807
  this.updateMbr();
45807
- this.updateImageToRender();
45808
45808
  this.subject.publish(this);
45809
45809
  });
45810
45810
  this.updateMbr();
@@ -45820,6 +45820,7 @@ class Card extends BaseItem {
45820
45820
  this.backside.onload = () => {
45821
45821
  this.subject.publish(this);
45822
45822
  };
45823
+ this.updateImageToRender();
45823
45824
  }
45824
45825
  setIsInDeck(isInDeck) {
45825
45826
  this.emit({
@@ -55631,7 +55632,7 @@ function handleAudioGenerate(response, board) {
55631
55632
  }
55632
55633
  function handleImageGenerate(response, board) {
55633
55634
  if (response.status === "completed" && response.base64) {
55634
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
55635
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
55635
55636
  const placeholderId = board.aiImagePlaceholder?.getId();
55636
55637
  if (placeholderId) {
55637
55638
  const placeholderNode = board.items.getById(placeholderId);
package/dist/esm/node.js CHANGED
@@ -7362,6 +7362,7 @@ var conf = {
7362
7362
  beforeMediaRemove: async (...args) => false,
7363
7363
  onUploadMediaError: async (...args) => false
7364
7364
  },
7365
+ getAccessToken: () => null,
7365
7366
  openModal: () => {},
7366
7367
  notify: () => "",
7367
7368
  disMissNotification: () => {},
@@ -48339,7 +48340,6 @@ class Card extends BaseItem {
48339
48340
  this.transformation.subject.subscribe(() => {
48340
48341
  this.throttledBringToFront();
48341
48342
  this.updateMbr();
48342
- this.updateImageToRender();
48343
48343
  this.subject.publish(this);
48344
48344
  });
48345
48345
  this.updateMbr();
@@ -48355,6 +48355,7 @@ class Card extends BaseItem {
48355
48355
  this.backside.onload = () => {
48356
48356
  this.subject.publish(this);
48357
48357
  };
48358
+ this.updateImageToRender();
48358
48359
  }
48359
48360
  setIsInDeck(isInDeck) {
48360
48361
  this.emit({
@@ -58099,7 +58100,7 @@ function handleAudioGenerate(response, board) {
58099
58100
  }
58100
58101
  function handleImageGenerate(response, board) {
58101
58102
  if (response.status === "completed" && response.base64) {
58102
- prepareImage(response.base64, null, board.getBoardId()).then((imageData) => {
58103
+ prepareImage(response.base64, conf.getAccessToken(), board.getBoardId()).then((imageData) => {
58103
58104
  const placeholderId = board.aiImagePlaceholder?.getId();
58104
58105
  if (placeholderId) {
58105
58106
  const placeholderNode = board.items.getById(placeholderId);
@@ -98,6 +98,7 @@ export interface ExportSnapshotSelection {
98
98
  endX: number;
99
99
  endY: number;
100
100
  }
101
+ type GetAccessTokenFunction = () => string | null;
101
102
  type OpenModalFunction = (modalId: string) => void;
102
103
  type NotifyWrapperFunction = NotifyFunction;
103
104
  type DisMissNotificationFunction = (toastId?: string) => void;
@@ -128,6 +129,7 @@ export declare const conf: {
128
129
  beforeMediaRemove: (...args: any[]) => Promise<boolean>;
129
130
  onUploadMediaError: (...args: any[]) => Promise<boolean>;
130
131
  };
132
+ getAccessToken: GetAccessTokenFunction;
131
133
  openModal: OpenModalFunction;
132
134
  notify: NotifyWrapperFunction;
133
135
  disMissNotification: DisMissNotificationFunction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",