microboard-temp 0.5.14 → 0.5.16

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.
@@ -21735,7 +21735,15 @@ class BaseItem extends Mbr {
21735
21735
  }
21736
21736
  renderHTML(documentFactory) {
21737
21737
  const div = documentFactory.createElement("base-item");
21738
- div.id = this.id;
21738
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
21739
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
21740
+ div.style.backgroundColor = "#b2b0c3";
21741
+ div.id = this.getId();
21742
+ div.style.width = `${this.getWidth()}px`;
21743
+ div.style.height = `${this.getHeight()}px`;
21744
+ div.style.transformOrigin = "top left";
21745
+ div.style.transform = transform;
21746
+ div.style.position = "absolute";
21739
21747
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
21740
21748
  return div;
21741
21749
  }
@@ -41467,16 +41475,14 @@ class AudioItem extends BaseItem {
41467
41475
  url = "";
41468
41476
  isPlaying = false;
41469
41477
  currentTime = 0;
41470
- isStorageUrl = true;
41471
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41478
+ constructor(board, url, events, id = "", extension2) {
41472
41479
  super(board, id);
41473
41480
  this.events = events;
41474
41481
  this.extension = extension2;
41475
41482
  this.linkTo = new LinkTo(this.id, events);
41476
41483
  this.board = board;
41477
- this.isStorageUrl = isStorageUrl;
41478
41484
  if (url) {
41479
- this.applyUrl(url);
41485
+ this.url = url;
41480
41486
  }
41481
41487
  this.transformation = new Transformation(id, events);
41482
41488
  this.linkTo.subject.subscribe(() => {
@@ -41494,9 +41500,6 @@ class AudioItem extends BaseItem {
41494
41500
  getCurrentTime() {
41495
41501
  return this.currentTime;
41496
41502
  }
41497
- getIsStorageUrl() {
41498
- return this.isStorageUrl;
41499
- }
41500
41503
  onTransform = () => {
41501
41504
  this.updateMbr();
41502
41505
  this.subject.publish(this);
@@ -41515,17 +41518,8 @@ class AudioItem extends BaseItem {
41515
41518
  getIsPlaying() {
41516
41519
  return this.isPlaying;
41517
41520
  }
41518
- applyUrl(url) {
41519
- if (this.isStorageUrl) {
41520
- try {
41521
- const newUrl = new URL(url);
41522
- this.url = `${window.location.origin}${newUrl.pathname}`;
41523
- } catch (_) {}
41524
- } else {
41525
- this.url = url;
41526
- }
41527
- }
41528
41521
  setUrl(url) {
41522
+ this.url = url;
41529
41523
  this.emit({
41530
41524
  class: "Audio",
41531
41525
  method: "setUrl",
@@ -41534,9 +41528,6 @@ class AudioItem extends BaseItem {
41534
41528
  });
41535
41529
  }
41536
41530
  getStorageId() {
41537
- if (!this.isStorageUrl) {
41538
- return;
41539
- }
41540
41531
  return this.url.split("/").pop();
41541
41532
  }
41542
41533
  getUrl() {
@@ -41596,9 +41587,6 @@ class AudioItem extends BaseItem {
41596
41587
  if (this.extension) {
41597
41588
  div.setAttribute("extension", this.extension);
41598
41589
  }
41599
- if (this.isStorageUrl) {
41600
- div.setAttribute("is-storage-url", "true");
41601
- }
41602
41590
  div.setAttribute("data-link-to", "");
41603
41591
  return div;
41604
41592
  }
@@ -41607,14 +41595,10 @@ class AudioItem extends BaseItem {
41607
41595
  itemType: "Audio",
41608
41596
  url: this.url,
41609
41597
  transformation: this.transformation.serialize(),
41610
- isStorageUrl: this.isStorageUrl,
41611
41598
  extension: this.extension
41612
41599
  };
41613
41600
  }
41614
41601
  deserialize(data) {
41615
- if (data.isStorageUrl) {
41616
- this.isStorageUrl = data.isStorageUrl;
41617
- }
41618
41602
  if (data.transformation) {
41619
41603
  this.transformation.deserialize(data.transformation);
41620
41604
  }
@@ -41636,7 +41620,7 @@ class AudioItem extends BaseItem {
41636
41620
  break;
41637
41621
  case "Audio":
41638
41622
  if (op.method === "setUrl") {
41639
- this.applyUrl(op.url);
41623
+ this.url = op.url;
41640
41624
  }
41641
41625
  this.subject.publish(this);
41642
41626
  break;
@@ -42109,10 +42093,7 @@ class ImageItem extends BaseItem {
42109
42093
  this.transformation.subject.subscribe(this.onTransform);
42110
42094
  }
42111
42095
  setStorageLink(link2) {
42112
- try {
42113
- const url = new URL(link2);
42114
- this.storageLink = `${window?.location.origin}${url.pathname}`;
42115
- } catch (_) {}
42096
+ this.storageLink = link2;
42116
42097
  }
42117
42098
  getStorageId() {
42118
42099
  return this.storageLink.split("/").pop();
@@ -47906,6 +47887,20 @@ class Card extends BaseItem {
47906
47887
  ctx.restore();
47907
47888
  }
47908
47889
  }
47890
+ renderHTML(documentFactory) {
47891
+ const div = super.renderHTML(documentFactory);
47892
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47893
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47894
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47895
+ div.id = this.getId();
47896
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
47897
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
47898
+ div.style.transformOrigin = "top left";
47899
+ div.style.transform = transform;
47900
+ div.style.position = "absolute";
47901
+ div.style.backgroundSize = "cover";
47902
+ return div;
47903
+ }
47909
47904
  updateMbr() {
47910
47905
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47911
47906
  this.left = translateX;
@@ -48139,6 +48134,23 @@ class Deck extends BaseItem {
48139
48134
  ctx.restore();
48140
48135
  }
48141
48136
  }
48137
+ renderHTML(documentFactory) {
48138
+ const div = super.renderHTML(documentFactory);
48139
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
48140
+ return div;
48141
+ }
48142
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
48143
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
48144
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
48145
+ div.id = this.getId();
48146
+ div.style.width = `${this.getWidth()}px`;
48147
+ div.style.height = `${this.getHeight()}px`;
48148
+ div.style.transformOrigin = "top left";
48149
+ div.style.transform = transform;
48150
+ div.style.position = "absolute";
48151
+ div.style.backgroundSize = "cover";
48152
+ return div;
48153
+ }
48142
48154
  updateCache(context) {
48143
48155
  const cards = this.index?.list();
48144
48156
  const topCard = cards[cards.length - 1];
@@ -48736,6 +48748,14 @@ class Screen extends BaseItem {
48736
48748
  super.render(context);
48737
48749
  }
48738
48750
  }
48751
+ renderHTML(documentFactory) {
48752
+ const div = super.renderHTML(documentFactory);
48753
+ div.style.backgroundColor = this.backgroundColor;
48754
+ div.style.borderColor = this.borderColor;
48755
+ div.style.borderWidth = `${this.borderWidth}px`;
48756
+ div.style.borderStyle = this.borderStyle;
48757
+ return div;
48758
+ }
48739
48759
  }
48740
48760
  registerItem({
48741
48761
  item: Screen,
package/dist/cjs/index.js CHANGED
@@ -21735,7 +21735,15 @@ class BaseItem extends Mbr {
21735
21735
  }
21736
21736
  renderHTML(documentFactory) {
21737
21737
  const div = documentFactory.createElement("base-item");
21738
- div.id = this.id;
21738
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
21739
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
21740
+ div.style.backgroundColor = "#b2b0c3";
21741
+ div.id = this.getId();
21742
+ div.style.width = `${this.getWidth()}px`;
21743
+ div.style.height = `${this.getHeight()}px`;
21744
+ div.style.transformOrigin = "top left";
21745
+ div.style.transform = transform;
21746
+ div.style.position = "absolute";
21739
21747
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
21740
21748
  return div;
21741
21749
  }
@@ -41467,16 +41475,14 @@ class AudioItem extends BaseItem {
41467
41475
  url = "";
41468
41476
  isPlaying = false;
41469
41477
  currentTime = 0;
41470
- isStorageUrl = true;
41471
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41478
+ constructor(board, url, events, id = "", extension2) {
41472
41479
  super(board, id);
41473
41480
  this.events = events;
41474
41481
  this.extension = extension2;
41475
41482
  this.linkTo = new LinkTo(this.id, events);
41476
41483
  this.board = board;
41477
- this.isStorageUrl = isStorageUrl;
41478
41484
  if (url) {
41479
- this.applyUrl(url);
41485
+ this.url = url;
41480
41486
  }
41481
41487
  this.transformation = new Transformation(id, events);
41482
41488
  this.linkTo.subject.subscribe(() => {
@@ -41494,9 +41500,6 @@ class AudioItem extends BaseItem {
41494
41500
  getCurrentTime() {
41495
41501
  return this.currentTime;
41496
41502
  }
41497
- getIsStorageUrl() {
41498
- return this.isStorageUrl;
41499
- }
41500
41503
  onTransform = () => {
41501
41504
  this.updateMbr();
41502
41505
  this.subject.publish(this);
@@ -41515,17 +41518,8 @@ class AudioItem extends BaseItem {
41515
41518
  getIsPlaying() {
41516
41519
  return this.isPlaying;
41517
41520
  }
41518
- applyUrl(url) {
41519
- if (this.isStorageUrl) {
41520
- try {
41521
- const newUrl = new URL(url);
41522
- this.url = `${window.location.origin}${newUrl.pathname}`;
41523
- } catch (_) {}
41524
- } else {
41525
- this.url = url;
41526
- }
41527
- }
41528
41521
  setUrl(url) {
41522
+ this.url = url;
41529
41523
  this.emit({
41530
41524
  class: "Audio",
41531
41525
  method: "setUrl",
@@ -41534,9 +41528,6 @@ class AudioItem extends BaseItem {
41534
41528
  });
41535
41529
  }
41536
41530
  getStorageId() {
41537
- if (!this.isStorageUrl) {
41538
- return;
41539
- }
41540
41531
  return this.url.split("/").pop();
41541
41532
  }
41542
41533
  getUrl() {
@@ -41596,9 +41587,6 @@ class AudioItem extends BaseItem {
41596
41587
  if (this.extension) {
41597
41588
  div.setAttribute("extension", this.extension);
41598
41589
  }
41599
- if (this.isStorageUrl) {
41600
- div.setAttribute("is-storage-url", "true");
41601
- }
41602
41590
  div.setAttribute("data-link-to", "");
41603
41591
  return div;
41604
41592
  }
@@ -41607,14 +41595,10 @@ class AudioItem extends BaseItem {
41607
41595
  itemType: "Audio",
41608
41596
  url: this.url,
41609
41597
  transformation: this.transformation.serialize(),
41610
- isStorageUrl: this.isStorageUrl,
41611
41598
  extension: this.extension
41612
41599
  };
41613
41600
  }
41614
41601
  deserialize(data) {
41615
- if (data.isStorageUrl) {
41616
- this.isStorageUrl = data.isStorageUrl;
41617
- }
41618
41602
  if (data.transformation) {
41619
41603
  this.transformation.deserialize(data.transformation);
41620
41604
  }
@@ -41636,7 +41620,7 @@ class AudioItem extends BaseItem {
41636
41620
  break;
41637
41621
  case "Audio":
41638
41622
  if (op.method === "setUrl") {
41639
- this.applyUrl(op.url);
41623
+ this.url = op.url;
41640
41624
  }
41641
41625
  this.subject.publish(this);
41642
41626
  break;
@@ -42109,10 +42093,7 @@ class ImageItem extends BaseItem {
42109
42093
  this.transformation.subject.subscribe(this.onTransform);
42110
42094
  }
42111
42095
  setStorageLink(link2) {
42112
- try {
42113
- const url = new URL(link2);
42114
- this.storageLink = `${window?.location.origin}${url.pathname}`;
42115
- } catch (_) {}
42096
+ this.storageLink = link2;
42116
42097
  }
42117
42098
  getStorageId() {
42118
42099
  return this.storageLink.split("/").pop();
@@ -47906,6 +47887,20 @@ class Card extends BaseItem {
47906
47887
  ctx.restore();
47907
47888
  }
47908
47889
  }
47890
+ renderHTML(documentFactory) {
47891
+ const div = super.renderHTML(documentFactory);
47892
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47893
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47894
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47895
+ div.id = this.getId();
47896
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
47897
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
47898
+ div.style.transformOrigin = "top left";
47899
+ div.style.transform = transform;
47900
+ div.style.position = "absolute";
47901
+ div.style.backgroundSize = "cover";
47902
+ return div;
47903
+ }
47909
47904
  updateMbr() {
47910
47905
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47911
47906
  this.left = translateX;
@@ -48139,6 +48134,23 @@ class Deck extends BaseItem {
48139
48134
  ctx.restore();
48140
48135
  }
48141
48136
  }
48137
+ renderHTML(documentFactory) {
48138
+ const div = super.renderHTML(documentFactory);
48139
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
48140
+ return div;
48141
+ }
48142
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
48143
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
48144
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
48145
+ div.id = this.getId();
48146
+ div.style.width = `${this.getWidth()}px`;
48147
+ div.style.height = `${this.getHeight()}px`;
48148
+ div.style.transformOrigin = "top left";
48149
+ div.style.transform = transform;
48150
+ div.style.position = "absolute";
48151
+ div.style.backgroundSize = "cover";
48152
+ return div;
48153
+ }
48142
48154
  updateCache(context) {
48143
48155
  const cards = this.index?.list();
48144
48156
  const topCard = cards[cards.length - 1];
@@ -48736,6 +48748,14 @@ class Screen extends BaseItem {
48736
48748
  super.render(context);
48737
48749
  }
48738
48750
  }
48751
+ renderHTML(documentFactory) {
48752
+ const div = super.renderHTML(documentFactory);
48753
+ div.style.backgroundColor = this.backgroundColor;
48754
+ div.style.borderColor = this.borderColor;
48755
+ div.style.borderWidth = `${this.borderWidth}px`;
48756
+ div.style.borderStyle = this.borderStyle;
48757
+ return div;
48758
+ }
48739
48759
  }
48740
48760
  registerItem({
48741
48761
  item: Screen,
package/dist/cjs/node.js CHANGED
@@ -24207,7 +24207,15 @@ class BaseItem extends Mbr {
24207
24207
  }
24208
24208
  renderHTML(documentFactory) {
24209
24209
  const div = documentFactory.createElement("base-item");
24210
- div.id = this.id;
24210
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
24211
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
24212
+ div.style.backgroundColor = "#b2b0c3";
24213
+ div.id = this.getId();
24214
+ div.style.width = `${this.getWidth()}px`;
24215
+ div.style.height = `${this.getHeight()}px`;
24216
+ div.style.transformOrigin = "top left";
24217
+ div.style.transform = transform;
24218
+ div.style.position = "absolute";
24211
24219
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
24212
24220
  return div;
24213
24221
  }
@@ -43940,16 +43948,14 @@ class AudioItem extends BaseItem {
43940
43948
  url = "";
43941
43949
  isPlaying = false;
43942
43950
  currentTime = 0;
43943
- isStorageUrl = true;
43944
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
43951
+ constructor(board, url, events, id = "", extension2) {
43945
43952
  super(board, id);
43946
43953
  this.events = events;
43947
43954
  this.extension = extension2;
43948
43955
  this.linkTo = new LinkTo(this.id, events);
43949
43956
  this.board = board;
43950
- this.isStorageUrl = isStorageUrl;
43951
43957
  if (url) {
43952
- this.applyUrl(url);
43958
+ this.url = url;
43953
43959
  }
43954
43960
  this.transformation = new Transformation(id, events);
43955
43961
  this.linkTo.subject.subscribe(() => {
@@ -43967,9 +43973,6 @@ class AudioItem extends BaseItem {
43967
43973
  getCurrentTime() {
43968
43974
  return this.currentTime;
43969
43975
  }
43970
- getIsStorageUrl() {
43971
- return this.isStorageUrl;
43972
- }
43973
43976
  onTransform = () => {
43974
43977
  this.updateMbr();
43975
43978
  this.subject.publish(this);
@@ -43988,17 +43991,8 @@ class AudioItem extends BaseItem {
43988
43991
  getIsPlaying() {
43989
43992
  return this.isPlaying;
43990
43993
  }
43991
- applyUrl(url) {
43992
- if (this.isStorageUrl) {
43993
- try {
43994
- const newUrl = new URL(url);
43995
- this.url = `${window.location.origin}${newUrl.pathname}`;
43996
- } catch (_) {}
43997
- } else {
43998
- this.url = url;
43999
- }
44000
- }
44001
43994
  setUrl(url) {
43995
+ this.url = url;
44002
43996
  this.emit({
44003
43997
  class: "Audio",
44004
43998
  method: "setUrl",
@@ -44007,9 +44001,6 @@ class AudioItem extends BaseItem {
44007
44001
  });
44008
44002
  }
44009
44003
  getStorageId() {
44010
- if (!this.isStorageUrl) {
44011
- return;
44012
- }
44013
44004
  return this.url.split("/").pop();
44014
44005
  }
44015
44006
  getUrl() {
@@ -44069,9 +44060,6 @@ class AudioItem extends BaseItem {
44069
44060
  if (this.extension) {
44070
44061
  div.setAttribute("extension", this.extension);
44071
44062
  }
44072
- if (this.isStorageUrl) {
44073
- div.setAttribute("is-storage-url", "true");
44074
- }
44075
44063
  div.setAttribute("data-link-to", "");
44076
44064
  return div;
44077
44065
  }
@@ -44080,14 +44068,10 @@ class AudioItem extends BaseItem {
44080
44068
  itemType: "Audio",
44081
44069
  url: this.url,
44082
44070
  transformation: this.transformation.serialize(),
44083
- isStorageUrl: this.isStorageUrl,
44084
44071
  extension: this.extension
44085
44072
  };
44086
44073
  }
44087
44074
  deserialize(data) {
44088
- if (data.isStorageUrl) {
44089
- this.isStorageUrl = data.isStorageUrl;
44090
- }
44091
44075
  if (data.transformation) {
44092
44076
  this.transformation.deserialize(data.transformation);
44093
44077
  }
@@ -44109,7 +44093,7 @@ class AudioItem extends BaseItem {
44109
44093
  break;
44110
44094
  case "Audio":
44111
44095
  if (op.method === "setUrl") {
44112
- this.applyUrl(op.url);
44096
+ this.url = op.url;
44113
44097
  }
44114
44098
  this.subject.publish(this);
44115
44099
  break;
@@ -44582,10 +44566,7 @@ class ImageItem extends BaseItem {
44582
44566
  this.transformation.subject.subscribe(this.onTransform);
44583
44567
  }
44584
44568
  setStorageLink(link2) {
44585
- try {
44586
- const url = new URL(link2);
44587
- this.storageLink = `${window?.location.origin}${url.pathname}`;
44588
- } catch (_) {}
44569
+ this.storageLink = link2;
44589
44570
  }
44590
44571
  getStorageId() {
44591
44572
  return this.storageLink.split("/").pop();
@@ -50379,6 +50360,20 @@ class Card extends BaseItem {
50379
50360
  ctx.restore();
50380
50361
  }
50381
50362
  }
50363
+ renderHTML(documentFactory) {
50364
+ const div = super.renderHTML(documentFactory);
50365
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50366
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50367
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
50368
+ div.id = this.getId();
50369
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
50370
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
50371
+ div.style.transformOrigin = "top left";
50372
+ div.style.transform = transform;
50373
+ div.style.position = "absolute";
50374
+ div.style.backgroundSize = "cover";
50375
+ return div;
50376
+ }
50382
50377
  updateMbr() {
50383
50378
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50384
50379
  this.left = translateX;
@@ -50612,6 +50607,23 @@ class Deck extends BaseItem {
50612
50607
  ctx.restore();
50613
50608
  }
50614
50609
  }
50610
+ renderHTML(documentFactory) {
50611
+ const div = super.renderHTML(documentFactory);
50612
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
50613
+ return div;
50614
+ }
50615
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50616
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50617
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
50618
+ div.id = this.getId();
50619
+ div.style.width = `${this.getWidth()}px`;
50620
+ div.style.height = `${this.getHeight()}px`;
50621
+ div.style.transformOrigin = "top left";
50622
+ div.style.transform = transform;
50623
+ div.style.position = "absolute";
50624
+ div.style.backgroundSize = "cover";
50625
+ return div;
50626
+ }
50615
50627
  updateCache(context) {
50616
50628
  const cards = this.index?.list();
50617
50629
  const topCard = cards[cards.length - 1];
@@ -51209,6 +51221,14 @@ class Screen extends BaseItem {
51209
51221
  super.render(context);
51210
51222
  }
51211
51223
  }
51224
+ renderHTML(documentFactory) {
51225
+ const div = super.renderHTML(documentFactory);
51226
+ div.style.backgroundColor = this.backgroundColor;
51227
+ div.style.borderColor = this.borderColor;
51228
+ div.style.borderWidth = `${this.borderWidth}px`;
51229
+ div.style.borderStyle = this.borderStyle;
51230
+ return div;
51231
+ }
51212
51232
  }
51213
51233
  registerItem({
51214
51234
  item: Screen,
@@ -21581,7 +21581,15 @@ class BaseItem extends Mbr {
21581
21581
  }
21582
21582
  renderHTML(documentFactory) {
21583
21583
  const div = documentFactory.createElement("base-item");
21584
- div.id = this.id;
21584
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
21585
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
21586
+ div.style.backgroundColor = "#b2b0c3";
21587
+ div.id = this.getId();
21588
+ div.style.width = `${this.getWidth()}px`;
21589
+ div.style.height = `${this.getHeight()}px`;
21590
+ div.style.transformOrigin = "top left";
21591
+ div.style.transform = transform;
21592
+ div.style.position = "absolute";
21585
21593
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
21586
21594
  return div;
21587
21595
  }
@@ -41313,16 +41321,14 @@ class AudioItem extends BaseItem {
41313
41321
  url = "";
41314
41322
  isPlaying = false;
41315
41323
  currentTime = 0;
41316
- isStorageUrl = true;
41317
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41324
+ constructor(board, url, events, id = "", extension2) {
41318
41325
  super(board, id);
41319
41326
  this.events = events;
41320
41327
  this.extension = extension2;
41321
41328
  this.linkTo = new LinkTo(this.id, events);
41322
41329
  this.board = board;
41323
- this.isStorageUrl = isStorageUrl;
41324
41330
  if (url) {
41325
- this.applyUrl(url);
41331
+ this.url = url;
41326
41332
  }
41327
41333
  this.transformation = new Transformation(id, events);
41328
41334
  this.linkTo.subject.subscribe(() => {
@@ -41340,9 +41346,6 @@ class AudioItem extends BaseItem {
41340
41346
  getCurrentTime() {
41341
41347
  return this.currentTime;
41342
41348
  }
41343
- getIsStorageUrl() {
41344
- return this.isStorageUrl;
41345
- }
41346
41349
  onTransform = () => {
41347
41350
  this.updateMbr();
41348
41351
  this.subject.publish(this);
@@ -41361,17 +41364,8 @@ class AudioItem extends BaseItem {
41361
41364
  getIsPlaying() {
41362
41365
  return this.isPlaying;
41363
41366
  }
41364
- applyUrl(url) {
41365
- if (this.isStorageUrl) {
41366
- try {
41367
- const newUrl = new URL(url);
41368
- this.url = `${window.location.origin}${newUrl.pathname}`;
41369
- } catch (_) {}
41370
- } else {
41371
- this.url = url;
41372
- }
41373
- }
41374
41367
  setUrl(url) {
41368
+ this.url = url;
41375
41369
  this.emit({
41376
41370
  class: "Audio",
41377
41371
  method: "setUrl",
@@ -41380,9 +41374,6 @@ class AudioItem extends BaseItem {
41380
41374
  });
41381
41375
  }
41382
41376
  getStorageId() {
41383
- if (!this.isStorageUrl) {
41384
- return;
41385
- }
41386
41377
  return this.url.split("/").pop();
41387
41378
  }
41388
41379
  getUrl() {
@@ -41442,9 +41433,6 @@ class AudioItem extends BaseItem {
41442
41433
  if (this.extension) {
41443
41434
  div.setAttribute("extension", this.extension);
41444
41435
  }
41445
- if (this.isStorageUrl) {
41446
- div.setAttribute("is-storage-url", "true");
41447
- }
41448
41436
  div.setAttribute("data-link-to", "");
41449
41437
  return div;
41450
41438
  }
@@ -41453,14 +41441,10 @@ class AudioItem extends BaseItem {
41453
41441
  itemType: "Audio",
41454
41442
  url: this.url,
41455
41443
  transformation: this.transformation.serialize(),
41456
- isStorageUrl: this.isStorageUrl,
41457
41444
  extension: this.extension
41458
41445
  };
41459
41446
  }
41460
41447
  deserialize(data) {
41461
- if (data.isStorageUrl) {
41462
- this.isStorageUrl = data.isStorageUrl;
41463
- }
41464
41448
  if (data.transformation) {
41465
41449
  this.transformation.deserialize(data.transformation);
41466
41450
  }
@@ -41482,7 +41466,7 @@ class AudioItem extends BaseItem {
41482
41466
  break;
41483
41467
  case "Audio":
41484
41468
  if (op.method === "setUrl") {
41485
- this.applyUrl(op.url);
41469
+ this.url = op.url;
41486
41470
  }
41487
41471
  this.subject.publish(this);
41488
41472
  break;
@@ -41955,10 +41939,7 @@ class ImageItem extends BaseItem {
41955
41939
  this.transformation.subject.subscribe(this.onTransform);
41956
41940
  }
41957
41941
  setStorageLink(link2) {
41958
- try {
41959
- const url = new URL(link2);
41960
- this.storageLink = `${window?.location.origin}${url.pathname}`;
41961
- } catch (_) {}
41942
+ this.storageLink = link2;
41962
41943
  }
41963
41944
  getStorageId() {
41964
41945
  return this.storageLink.split("/").pop();
@@ -47752,6 +47733,20 @@ class Card extends BaseItem {
47752
47733
  ctx.restore();
47753
47734
  }
47754
47735
  }
47736
+ renderHTML(documentFactory) {
47737
+ const div = super.renderHTML(documentFactory);
47738
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47739
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47740
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47741
+ div.id = this.getId();
47742
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
47743
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
47744
+ div.style.transformOrigin = "top left";
47745
+ div.style.transform = transform;
47746
+ div.style.position = "absolute";
47747
+ div.style.backgroundSize = "cover";
47748
+ return div;
47749
+ }
47755
47750
  updateMbr() {
47756
47751
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47757
47752
  this.left = translateX;
@@ -47985,6 +47980,23 @@ class Deck extends BaseItem {
47985
47980
  ctx.restore();
47986
47981
  }
47987
47982
  }
47983
+ renderHTML(documentFactory) {
47984
+ const div = super.renderHTML(documentFactory);
47985
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
47986
+ return div;
47987
+ }
47988
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47989
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47990
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
47991
+ div.id = this.getId();
47992
+ div.style.width = `${this.getWidth()}px`;
47993
+ div.style.height = `${this.getHeight()}px`;
47994
+ div.style.transformOrigin = "top left";
47995
+ div.style.transform = transform;
47996
+ div.style.position = "absolute";
47997
+ div.style.backgroundSize = "cover";
47998
+ return div;
47999
+ }
47988
48000
  updateCache(context) {
47989
48001
  const cards = this.index?.list();
47990
48002
  const topCard = cards[cards.length - 1];
@@ -48582,6 +48594,14 @@ class Screen extends BaseItem {
48582
48594
  super.render(context);
48583
48595
  }
48584
48596
  }
48597
+ renderHTML(documentFactory) {
48598
+ const div = super.renderHTML(documentFactory);
48599
+ div.style.backgroundColor = this.backgroundColor;
48600
+ div.style.borderColor = this.borderColor;
48601
+ div.style.borderWidth = `${this.borderWidth}px`;
48602
+ div.style.borderStyle = this.borderStyle;
48603
+ return div;
48604
+ }
48585
48605
  }
48586
48606
  registerItem({
48587
48607
  item: Screen,
package/dist/esm/index.js CHANGED
@@ -21574,7 +21574,15 @@ class BaseItem extends Mbr {
21574
21574
  }
21575
21575
  renderHTML(documentFactory) {
21576
21576
  const div = documentFactory.createElement("base-item");
21577
- div.id = this.id;
21577
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
21578
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
21579
+ div.style.backgroundColor = "#b2b0c3";
21580
+ div.id = this.getId();
21581
+ div.style.width = `${this.getWidth()}px`;
21582
+ div.style.height = `${this.getHeight()}px`;
21583
+ div.style.transformOrigin = "top left";
21584
+ div.style.transform = transform;
21585
+ div.style.position = "absolute";
21578
21586
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
21579
21587
  return div;
21580
21588
  }
@@ -41306,16 +41314,14 @@ class AudioItem extends BaseItem {
41306
41314
  url = "";
41307
41315
  isPlaying = false;
41308
41316
  currentTime = 0;
41309
- isStorageUrl = true;
41310
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
41317
+ constructor(board, url, events, id = "", extension2) {
41311
41318
  super(board, id);
41312
41319
  this.events = events;
41313
41320
  this.extension = extension2;
41314
41321
  this.linkTo = new LinkTo(this.id, events);
41315
41322
  this.board = board;
41316
- this.isStorageUrl = isStorageUrl;
41317
41323
  if (url) {
41318
- this.applyUrl(url);
41324
+ this.url = url;
41319
41325
  }
41320
41326
  this.transformation = new Transformation(id, events);
41321
41327
  this.linkTo.subject.subscribe(() => {
@@ -41333,9 +41339,6 @@ class AudioItem extends BaseItem {
41333
41339
  getCurrentTime() {
41334
41340
  return this.currentTime;
41335
41341
  }
41336
- getIsStorageUrl() {
41337
- return this.isStorageUrl;
41338
- }
41339
41342
  onTransform = () => {
41340
41343
  this.updateMbr();
41341
41344
  this.subject.publish(this);
@@ -41354,17 +41357,8 @@ class AudioItem extends BaseItem {
41354
41357
  getIsPlaying() {
41355
41358
  return this.isPlaying;
41356
41359
  }
41357
- applyUrl(url) {
41358
- if (this.isStorageUrl) {
41359
- try {
41360
- const newUrl = new URL(url);
41361
- this.url = `${window.location.origin}${newUrl.pathname}`;
41362
- } catch (_) {}
41363
- } else {
41364
- this.url = url;
41365
- }
41366
- }
41367
41360
  setUrl(url) {
41361
+ this.url = url;
41368
41362
  this.emit({
41369
41363
  class: "Audio",
41370
41364
  method: "setUrl",
@@ -41373,9 +41367,6 @@ class AudioItem extends BaseItem {
41373
41367
  });
41374
41368
  }
41375
41369
  getStorageId() {
41376
- if (!this.isStorageUrl) {
41377
- return;
41378
- }
41379
41370
  return this.url.split("/").pop();
41380
41371
  }
41381
41372
  getUrl() {
@@ -41435,9 +41426,6 @@ class AudioItem extends BaseItem {
41435
41426
  if (this.extension) {
41436
41427
  div.setAttribute("extension", this.extension);
41437
41428
  }
41438
- if (this.isStorageUrl) {
41439
- div.setAttribute("is-storage-url", "true");
41440
- }
41441
41429
  div.setAttribute("data-link-to", "");
41442
41430
  return div;
41443
41431
  }
@@ -41446,14 +41434,10 @@ class AudioItem extends BaseItem {
41446
41434
  itemType: "Audio",
41447
41435
  url: this.url,
41448
41436
  transformation: this.transformation.serialize(),
41449
- isStorageUrl: this.isStorageUrl,
41450
41437
  extension: this.extension
41451
41438
  };
41452
41439
  }
41453
41440
  deserialize(data) {
41454
- if (data.isStorageUrl) {
41455
- this.isStorageUrl = data.isStorageUrl;
41456
- }
41457
41441
  if (data.transformation) {
41458
41442
  this.transformation.deserialize(data.transformation);
41459
41443
  }
@@ -41475,7 +41459,7 @@ class AudioItem extends BaseItem {
41475
41459
  break;
41476
41460
  case "Audio":
41477
41461
  if (op.method === "setUrl") {
41478
- this.applyUrl(op.url);
41462
+ this.url = op.url;
41479
41463
  }
41480
41464
  this.subject.publish(this);
41481
41465
  break;
@@ -41948,10 +41932,7 @@ class ImageItem extends BaseItem {
41948
41932
  this.transformation.subject.subscribe(this.onTransform);
41949
41933
  }
41950
41934
  setStorageLink(link2) {
41951
- try {
41952
- const url = new URL(link2);
41953
- this.storageLink = `${window?.location.origin}${url.pathname}`;
41954
- } catch (_) {}
41935
+ this.storageLink = link2;
41955
41936
  }
41956
41937
  getStorageId() {
41957
41938
  return this.storageLink.split("/").pop();
@@ -47745,6 +47726,20 @@ class Card extends BaseItem {
47745
47726
  ctx.restore();
47746
47727
  }
47747
47728
  }
47729
+ renderHTML(documentFactory) {
47730
+ const div = super.renderHTML(documentFactory);
47731
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47732
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47733
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47734
+ div.id = this.getId();
47735
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
47736
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
47737
+ div.style.transformOrigin = "top left";
47738
+ div.style.transform = transform;
47739
+ div.style.position = "absolute";
47740
+ div.style.backgroundSize = "cover";
47741
+ return div;
47742
+ }
47748
47743
  updateMbr() {
47749
47744
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47750
47745
  this.left = translateX;
@@ -47978,6 +47973,23 @@ class Deck extends BaseItem {
47978
47973
  ctx.restore();
47979
47974
  }
47980
47975
  }
47976
+ renderHTML(documentFactory) {
47977
+ const div = super.renderHTML(documentFactory);
47978
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
47979
+ return div;
47980
+ }
47981
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47982
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47983
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
47984
+ div.id = this.getId();
47985
+ div.style.width = `${this.getWidth()}px`;
47986
+ div.style.height = `${this.getHeight()}px`;
47987
+ div.style.transformOrigin = "top left";
47988
+ div.style.transform = transform;
47989
+ div.style.position = "absolute";
47990
+ div.style.backgroundSize = "cover";
47991
+ return div;
47992
+ }
47981
47993
  updateCache(context) {
47982
47994
  const cards = this.index?.list();
47983
47995
  const topCard = cards[cards.length - 1];
@@ -48575,6 +48587,14 @@ class Screen extends BaseItem {
48575
48587
  super.render(context);
48576
48588
  }
48577
48589
  }
48590
+ renderHTML(documentFactory) {
48591
+ const div = super.renderHTML(documentFactory);
48592
+ div.style.backgroundColor = this.backgroundColor;
48593
+ div.style.borderColor = this.borderColor;
48594
+ div.style.borderWidth = `${this.borderWidth}px`;
48595
+ div.style.borderStyle = this.borderStyle;
48596
+ return div;
48597
+ }
48578
48598
  }
48579
48599
  registerItem({
48580
48600
  item: Screen,
package/dist/esm/node.js CHANGED
@@ -24041,7 +24041,15 @@ class BaseItem extends Mbr {
24041
24041
  }
24042
24042
  renderHTML(documentFactory) {
24043
24043
  const div = documentFactory.createElement("base-item");
24044
- div.id = this.id;
24044
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
24045
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
24046
+ div.style.backgroundColor = "#b2b0c3";
24047
+ div.id = this.getId();
24048
+ div.style.width = `${this.getWidth()}px`;
24049
+ div.style.height = `${this.getHeight()}px`;
24050
+ div.style.transformOrigin = "top left";
24051
+ div.style.transform = transform;
24052
+ div.style.position = "absolute";
24045
24053
  div.setAttribute("serialized-data", JSON.stringify(this.serialize()));
24046
24054
  return div;
24047
24055
  }
@@ -43774,16 +43782,14 @@ class AudioItem extends BaseItem {
43774
43782
  url = "";
43775
43783
  isPlaying = false;
43776
43784
  currentTime = 0;
43777
- isStorageUrl = true;
43778
- constructor(board, isStorageUrl, url, events, id = "", extension2) {
43785
+ constructor(board, url, events, id = "", extension2) {
43779
43786
  super(board, id);
43780
43787
  this.events = events;
43781
43788
  this.extension = extension2;
43782
43789
  this.linkTo = new LinkTo(this.id, events);
43783
43790
  this.board = board;
43784
- this.isStorageUrl = isStorageUrl;
43785
43791
  if (url) {
43786
- this.applyUrl(url);
43792
+ this.url = url;
43787
43793
  }
43788
43794
  this.transformation = new Transformation(id, events);
43789
43795
  this.linkTo.subject.subscribe(() => {
@@ -43801,9 +43807,6 @@ class AudioItem extends BaseItem {
43801
43807
  getCurrentTime() {
43802
43808
  return this.currentTime;
43803
43809
  }
43804
- getIsStorageUrl() {
43805
- return this.isStorageUrl;
43806
- }
43807
43810
  onTransform = () => {
43808
43811
  this.updateMbr();
43809
43812
  this.subject.publish(this);
@@ -43822,17 +43825,8 @@ class AudioItem extends BaseItem {
43822
43825
  getIsPlaying() {
43823
43826
  return this.isPlaying;
43824
43827
  }
43825
- applyUrl(url) {
43826
- if (this.isStorageUrl) {
43827
- try {
43828
- const newUrl = new URL(url);
43829
- this.url = `${window.location.origin}${newUrl.pathname}`;
43830
- } catch (_) {}
43831
- } else {
43832
- this.url = url;
43833
- }
43834
- }
43835
43828
  setUrl(url) {
43829
+ this.url = url;
43836
43830
  this.emit({
43837
43831
  class: "Audio",
43838
43832
  method: "setUrl",
@@ -43841,9 +43835,6 @@ class AudioItem extends BaseItem {
43841
43835
  });
43842
43836
  }
43843
43837
  getStorageId() {
43844
- if (!this.isStorageUrl) {
43845
- return;
43846
- }
43847
43838
  return this.url.split("/").pop();
43848
43839
  }
43849
43840
  getUrl() {
@@ -43903,9 +43894,6 @@ class AudioItem extends BaseItem {
43903
43894
  if (this.extension) {
43904
43895
  div.setAttribute("extension", this.extension);
43905
43896
  }
43906
- if (this.isStorageUrl) {
43907
- div.setAttribute("is-storage-url", "true");
43908
- }
43909
43897
  div.setAttribute("data-link-to", "");
43910
43898
  return div;
43911
43899
  }
@@ -43914,14 +43902,10 @@ class AudioItem extends BaseItem {
43914
43902
  itemType: "Audio",
43915
43903
  url: this.url,
43916
43904
  transformation: this.transformation.serialize(),
43917
- isStorageUrl: this.isStorageUrl,
43918
43905
  extension: this.extension
43919
43906
  };
43920
43907
  }
43921
43908
  deserialize(data) {
43922
- if (data.isStorageUrl) {
43923
- this.isStorageUrl = data.isStorageUrl;
43924
- }
43925
43909
  if (data.transformation) {
43926
43910
  this.transformation.deserialize(data.transformation);
43927
43911
  }
@@ -43943,7 +43927,7 @@ class AudioItem extends BaseItem {
43943
43927
  break;
43944
43928
  case "Audio":
43945
43929
  if (op.method === "setUrl") {
43946
- this.applyUrl(op.url);
43930
+ this.url = op.url;
43947
43931
  }
43948
43932
  this.subject.publish(this);
43949
43933
  break;
@@ -44416,10 +44400,7 @@ class ImageItem extends BaseItem {
44416
44400
  this.transformation.subject.subscribe(this.onTransform);
44417
44401
  }
44418
44402
  setStorageLink(link2) {
44419
- try {
44420
- const url = new URL(link2);
44421
- this.storageLink = `${window?.location.origin}${url.pathname}`;
44422
- } catch (_) {}
44403
+ this.storageLink = link2;
44423
44404
  }
44424
44405
  getStorageId() {
44425
44406
  return this.storageLink.split("/").pop();
@@ -50213,6 +50194,20 @@ class Card extends BaseItem {
50213
50194
  ctx.restore();
50214
50195
  }
50215
50196
  }
50197
+ renderHTML(documentFactory) {
50198
+ const div = super.renderHTML(documentFactory);
50199
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50200
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50201
+ div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
50202
+ div.id = this.getId();
50203
+ div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
50204
+ div.style.height = `${conf.CARD_DIMENSIONS.height}px`;
50205
+ div.style.transformOrigin = "top left";
50206
+ div.style.transform = transform;
50207
+ div.style.position = "absolute";
50208
+ div.style.backgroundSize = "cover";
50209
+ return div;
50210
+ }
50216
50211
  updateMbr() {
50217
50212
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50218
50213
  this.left = translateX;
@@ -50446,6 +50441,23 @@ class Deck extends BaseItem {
50446
50441
  ctx.restore();
50447
50442
  }
50448
50443
  }
50444
+ renderHTML(documentFactory) {
50445
+ const div = super.renderHTML(documentFactory);
50446
+ if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
50447
+ return div;
50448
+ }
50449
+ const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50450
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50451
+ div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
50452
+ div.id = this.getId();
50453
+ div.style.width = `${this.getWidth()}px`;
50454
+ div.style.height = `${this.getHeight()}px`;
50455
+ div.style.transformOrigin = "top left";
50456
+ div.style.transform = transform;
50457
+ div.style.position = "absolute";
50458
+ div.style.backgroundSize = "cover";
50459
+ return div;
50460
+ }
50449
50461
  updateCache(context) {
50450
50462
  const cards = this.index?.list();
50451
50463
  const topCard = cards[cards.length - 1];
@@ -51043,6 +51055,14 @@ class Screen extends BaseItem {
51043
51055
  super.render(context);
51044
51056
  }
51045
51057
  }
51058
+ renderHTML(documentFactory) {
51059
+ const div = super.renderHTML(documentFactory);
51060
+ div.style.backgroundColor = this.backgroundColor;
51061
+ div.style.borderColor = this.borderColor;
51062
+ div.style.borderWidth = `${this.borderWidth}px`;
51063
+ div.style.borderStyle = this.borderStyle;
51064
+ return div;
51065
+ }
51046
51066
  }
51047
51067
  registerItem({
51048
51068
  item: Screen,
@@ -13,7 +13,6 @@ export interface AudioItemData {
13
13
  itemType: "Audio";
14
14
  url: string;
15
15
  transformation: TransformationData;
16
- isStorageUrl: boolean;
17
16
  extension?: string;
18
17
  }
19
18
  export declare class AudioItem extends BaseItem {
@@ -30,17 +29,14 @@ export declare class AudioItem extends BaseItem {
30
29
  private url;
31
30
  private isPlaying;
32
31
  private currentTime;
33
- private isStorageUrl;
34
- constructor(board: Board, isStorageUrl: boolean, url?: string, events?: Events | undefined, id?: string, extension?: string | undefined);
32
+ constructor(board: Board, url?: string, events?: Events | undefined, id?: string, extension?: string | undefined);
35
33
  setCurrentTime(time: number): void;
36
34
  getCurrentTime(): number;
37
- getIsStorageUrl(): boolean;
38
35
  onTransform: () => void;
39
36
  doOnceBeforeOnLoad: (callback: (audio: AudioItem) => void) => void;
40
37
  doOnceOnLoad: (callback: (audio: AudioItem) => void) => void;
41
38
  setIsPlaying(isPlaying: boolean): void;
42
39
  getIsPlaying(): boolean;
43
- applyUrl(url: string): void;
44
40
  setUrl(url: string): void;
45
41
  getStorageId(): string | undefined;
46
42
  getUrl(): string;
@@ -1,6 +1,7 @@
1
1
  import { BaseItem, BaseItemData, SerializedItemData } from "../../../BaseItem/BaseItem";
2
2
  import { Board } from "../../../../Board";
3
3
  import { DrawingContext } from "../../../DrawingContext";
4
+ import { DocumentFactory } from "../../../../api/DocumentFactory";
4
5
  import { Path } from "../../../Path/Path";
5
6
  import { Subject } from "../../../../Subject";
6
7
  import { Paths } from "../../../Path/Paths";
@@ -25,6 +26,7 @@ export declare class Card extends BaseItem {
25
26
  updateImageToRender(): void;
26
27
  getImage(): HTMLImageElement | null;
27
28
  render(context: DrawingContext, left?: number, top?: number): void;
29
+ renderHTML(documentFactory: DocumentFactory): HTMLElement;
28
30
  updateMbr(): void;
29
31
  getPath(): Path | Paths;
30
32
  deserialize(data: SerializedItemData): this;
@@ -5,6 +5,7 @@ import { Card } from "../../../Examples/CardGame/Card/Card";
5
5
  import { DrawingContext } from "../../../DrawingContext";
6
6
  import { DeckOperation } from "../../../Examples/CardGame/Deck/DeckOperation";
7
7
  import { Path } from "../../../Path";
8
+ import { DocumentFactory } from "../../../../api/DocumentFactory";
8
9
  export declare const defaultDeckData: BaseItemData;
9
10
  export declare class Deck extends BaseItem {
10
11
  readonly subject: Subject<Deck>;
@@ -26,6 +27,7 @@ export declare class Deck extends BaseItem {
26
27
  updateMbr(): void;
27
28
  deserialize(data: SerializedItemData): this;
28
29
  render(context: DrawingContext): void;
30
+ renderHTML(documentFactory: DocumentFactory): HTMLElement;
29
31
  private updateCache;
30
32
  }
31
33
  export declare function createDeck(event?: KeyboardEvent, board?: Board): void;
@@ -1 +1 @@
1
- export { Deck, createDeck } from "./Deck";
1
+ export { Deck } from "./Deck";
@@ -4,6 +4,7 @@ import { Subject } from "../../../../Subject";
4
4
  import { DrawingContext } from "../../../DrawingContext";
5
5
  import { BorderWidth } from "../../../Path";
6
6
  import { ScreenOperation } from "./ScreenOperation";
7
+ import { DocumentFactory } from "../../../../api/DocumentFactory";
7
8
  export declare const defaultScreenData: BaseItemData;
8
9
  export declare class Screen extends BaseItem {
9
10
  private ownerId;
@@ -28,4 +29,5 @@ export declare class Screen extends BaseItem {
28
29
  updateMbr(): void;
29
30
  deserialize(data: SerializedItemData): this;
30
31
  render(context: DrawingContext): void;
32
+ renderHTML(documentFactory: DocumentFactory): HTMLElement;
31
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.14",
3
+ "version": "0.5.16",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",