microboard-temp 0.14.28 → 0.14.30

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/node.js CHANGED
@@ -6293,7 +6293,7 @@ function mergeSetPropertyOperations(opA, opB) {
6293
6293
  }
6294
6294
  return {
6295
6295
  ...opB,
6296
- prevValue: opA.prevValue
6296
+ prevValues: opA.prevValues
6297
6297
  };
6298
6298
  }
6299
6299
  function mergeBoardOperations(opA, opB) {
@@ -12981,7 +12981,6 @@ class BaseItem {
12981
12981
  shouldUseRelativeAlignment = true;
12982
12982
  resizeEnabled = true;
12983
12983
  onlyProportionalResize = false;
12984
- opacity = 1;
12985
12984
  itemType = "";
12986
12985
  childIds = [];
12987
12986
  isHoverHighlighted = false;
@@ -13334,7 +13333,6 @@ class BaseItem {
13334
13333
  itemType: this.itemType,
13335
13334
  childIds: this.childIds,
13336
13335
  parent: this.parent,
13337
- opacity: this.opacity,
13338
13336
  resizeEnabled: this.resizeEnabled
13339
13337
  };
13340
13338
  }
@@ -13546,16 +13544,6 @@ class BaseItem {
13546
13544
  this.index.render(context);
13547
13545
  }
13548
13546
  }
13549
- renderWithOpacity(context) {
13550
- if (this.opacity === 1) {
13551
- this.render(context);
13552
- return;
13553
- }
13554
- context.ctx.save();
13555
- context.ctx.globalAlpha *= this.opacity;
13556
- this.render(context);
13557
- context.ctx.restore();
13558
- }
13559
13547
  getSnapAnchorPoints() {
13560
13548
  return this.getMbr().getSnapAnchorPoints();
13561
13549
  }
@@ -28763,6 +28751,14 @@ var AudioOperationSchema = exports_external.object({
28763
28751
  item: StringArraySchema,
28764
28752
  url: exports_external.string()
28765
28753
  }).passthrough();
28754
+ var ItemSetPropertyOperationSchema = exports_external.object({
28755
+ class: exports_external.literal("Item"),
28756
+ method: exports_external.literal("setProperty"),
28757
+ item: StringArraySchema,
28758
+ property: exports_external.string(),
28759
+ value: exports_external.unknown(),
28760
+ prevValues: exports_external.array(exports_external.unknown())
28761
+ }).passthrough();
28766
28762
  var SocketOperationSchema = exports_external.union([
28767
28763
  UndoOperationSchema,
28768
28764
  RedoOperationSchema,
@@ -28782,7 +28778,8 @@ var SocketOperationSchema = exports_external.union([
28782
28778
  ...CommentOperationSchemas,
28783
28779
  ImageOperationSchema,
28784
28780
  VideoOperationSchema,
28785
- AudioOperationSchema
28781
+ AudioOperationSchema,
28782
+ ItemSetPropertyOperationSchema
28786
28783
  ]);
28787
28784
  var SocketBoardEventBodySchema = exports_external.object({
28788
28785
  eventId: exports_external.string(),
@@ -43403,9 +43400,7 @@ function registerHTMLRenderer(itemType, renderer) {
43403
43400
  }
43404
43401
  function renderItemToHTML(item, documentFactory) {
43405
43402
  const renderer = renderers[item.itemType] || defaultRenderer;
43406
- const element = renderer.render(item, documentFactory);
43407
- element.style.opacity = `${item.opacity}`;
43408
- return element;
43403
+ return renderer.render(item, documentFactory);
43409
43404
  }
43410
43405
  var defaultRenderer = {
43411
43406
  render(item, documentFactory) {
@@ -45175,6 +45170,7 @@ function parseHTMLDrawing(el) {
45175
45170
  transformation,
45176
45171
  strokeStyle: pathElement.getAttribute("stroke") || "",
45177
45172
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
45173
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
45178
45174
  linkTo: el.getAttribute("data-link-to") || undefined
45179
45175
  };
45180
45176
  }
@@ -45629,7 +45625,7 @@ class DrawingHTMLRenderer {
45629
45625
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
45630
45626
  pathElement.setAttribute("d", this.getPathData(drawing));
45631
45627
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
45632
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
45628
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
45633
45629
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
45634
45630
  pathElement.setAttribute("fill", "none");
45635
45631
  svg.appendChild(pathElement);
@@ -46692,7 +46688,7 @@ class SimpleSpatialIndex {
46692
46688
  }
46693
46689
  render(context) {
46694
46690
  this.itemsArray.forEach((item) => {
46695
- item.renderWithOpacity?.(context) ?? item.render(context);
46691
+ item.render(context);
46696
46692
  });
46697
46693
  }
46698
46694
  }
@@ -61447,7 +61443,7 @@ var addShapeToolOverlay = {
61447
61443
  createsItemType: "Shape",
61448
61444
  family: "shape",
61449
61445
  icon: {
61450
- ...overlayAssetIcon("src/Items/Shape/icons/Tool.icon.svg"),
61446
+ ...symbolIcon("Shape"),
61451
61447
  state: {
61452
61448
  note: "UI may swap the top-level icon to the selected shape option when desired."
61453
61449
  }
@@ -63010,7 +63006,7 @@ async function exportBoardScreenshot({
63010
63006
  const { left, top, right, bottom } = selection;
63011
63007
  const inView = board.items.index.listEnclosedOrCrossedBy(left, top, right, bottom);
63012
63008
  for (const item of inView) {
63013
- item.renderWithOpacity?.(context) ?? item.render(context);
63009
+ item.render(context);
63014
63010
  }
63015
63011
  const blob = await offscreenCanvas.convertToBlob({ type: "image/png" });
63016
63012
  const dataUrl = await convertBlobToDataUrl(blob);
@@ -65465,6 +65461,7 @@ var DrawingDataSchema = exports_external.object({
65465
65461
  strokeStyle: ColorValueSchema,
65466
65462
  strokeWidth: exports_external.number(),
65467
65463
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
65464
+ borderOpacity: exports_external.number().optional(),
65468
65465
  opacity: exports_external.number().optional(),
65469
65466
  linkTo: exports_external.string().optional()
65470
65467
  });
@@ -65482,6 +65479,7 @@ class Drawing extends BaseItem {
65482
65479
  borderStyle = "solid";
65483
65480
  colorRole = "foreground";
65484
65481
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
65482
+ borderOpacity = 1;
65485
65483
  transformationRenderBlock = undefined;
65486
65484
  points = [];
65487
65485
  constructor(board, id = "") {
@@ -65500,7 +65498,8 @@ class Drawing extends BaseItem {
65500
65498
  points,
65501
65499
  strokeStyle: this.borderColor,
65502
65500
  strokeWidth: this.strokeWidth,
65503
- colorRole: this.colorRole
65501
+ colorRole: this.colorRole,
65502
+ borderOpacity: this.borderOpacity
65504
65503
  };
65505
65504
  }
65506
65505
  deserialize(data) {
@@ -65518,7 +65517,7 @@ class Drawing extends BaseItem {
65518
65517
  if (data.colorRole) {
65519
65518
  this.colorRole = data.colorRole;
65520
65519
  }
65521
- this.opacity = data.opacity ?? this.opacity;
65520
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
65522
65521
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
65523
65522
  return this;
65524
65523
  }
@@ -65633,6 +65632,7 @@ class Drawing extends BaseItem {
65633
65632
  const ctx = context.ctx;
65634
65633
  ctx.save();
65635
65634
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
65635
+ ctx.globalAlpha = this.borderOpacity;
65636
65636
  ctx.lineWidth = this.strokeWidth;
65637
65637
  ctx.lineCap = "round";
65638
65638
  ctx.setLineDash(this.linePattern);
@@ -65762,7 +65762,7 @@ class Drawing extends BaseItem {
65762
65762
  "borderColor",
65763
65763
  "strokeWidth",
65764
65764
  "borderStyle",
65765
- "opacity",
65765
+ "borderOpacity",
65766
65766
  "colorRole",
65767
65767
  "strokeStyle"
65768
65768
  ];
@@ -65772,7 +65772,7 @@ class Drawing extends BaseItem {
65772
65772
  return super.getPropertyUpdateHint(property);
65773
65773
  }
65774
65774
  getStrokeOpacity() {
65775
- return this.opacity;
65775
+ return this.borderOpacity;
65776
65776
  }
65777
65777
  getBorderStyle() {
65778
65778
  return this.borderStyle;
@@ -65818,7 +65818,7 @@ registerItem({
65818
65818
  itemType: "Drawing",
65819
65819
  points: [],
65820
65820
  borderColor: coerceColorValue("#000000"),
65821
- opacity: 1,
65821
+ borderOpacity: 1,
65822
65822
  borderStyle: "solid",
65823
65823
  strokeWidth: 2,
65824
65824
  transformation: new DefaultTransformationData
@@ -66840,7 +66840,7 @@ class ShapeTool extends CustomTool {
66840
66840
  }
66841
66841
  render(context) {
66842
66842
  if (this.isDown) {
66843
- this.item.renderWithOpacity(context);
66843
+ this.item.render(context);
66844
66844
  this.bounds.render(context);
66845
66845
  }
66846
66846
  }
@@ -69613,15 +69613,15 @@ class Keyboard {
69613
69613
  }
69614
69614
  }
69615
69615
 
69616
- // src/HTMLAdapter/BoardHTMLAdapter.ts
69617
- function parseHTML(el) {
69616
+ // src/HTMLAdapter/LegacyBoardHTMLAdapter.ts
69617
+ function parseLegacyHTML(el) {
69618
69618
  const parser = parsersHTML[el.tagName.toLowerCase()];
69619
69619
  if (!parser) {
69620
69620
  throw new Error(`Unknown element tag: ${el.tagName.toLowerCase()}`);
69621
69621
  }
69622
69622
  return parser(el);
69623
69623
  }
69624
- function serializeBoardToHTML(board) {
69624
+ function serializeBoardToLegacyHTML(board) {
69625
69625
  const boardName = board.getName() || board.getBoardId();
69626
69626
  const items = board.index.items.getWholeHTML(conf.documentFactory);
69627
69627
  const itemsDiv = `<div id="items">${items}</div>`;
@@ -69647,14 +69647,14 @@ function serializeBoardToHTML(board) {
69647
69647
  </head>`.replace(/\t|\n/g, "");
69648
69648
  return `${head}${body}`;
69649
69649
  }
69650
- function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
69650
+ function deserializeLegacyHTMLAndEmitToBoard(board, stringedHTML) {
69651
69651
  const parser = conf.getDOMParser();
69652
69652
  const doc2 = parser.parseFromString(stringedHTML, "text/html");
69653
69653
  const items = doc2.body.querySelector("#items");
69654
69654
  if (items) {
69655
69655
  const idsMap = {};
69656
69656
  const addedConnectors = [];
69657
- const data = Array.from(items.children).map((el) => parseHTML(el));
69657
+ const data = Array.from(items.children).map((el) => parseLegacyHTML(el));
69658
69658
  for (const parsedData of data) {
69659
69659
  if ("childrenMap" in parsedData) {
69660
69660
  const frameData = parsedData;
@@ -69702,14 +69702,14 @@ function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
69702
69702
  }
69703
69703
  return [];
69704
69704
  }
69705
- function deserializeHTMLToBoard(board, stringedHTML) {
69705
+ function deserializeLegacyHTMLToBoard(board, stringedHTML) {
69706
69706
  const parser = conf.getDOMParser();
69707
69707
  const doc2 = parser.parseFromString(stringedHTML, "text/html");
69708
69708
  const itemsDiv = doc2.body.querySelector("#items");
69709
69709
  if (!itemsDiv) {
69710
69710
  return;
69711
69711
  }
69712
- const items = Array.from(itemsDiv.children).map((el) => parseHTML(el));
69712
+ const items = Array.from(itemsDiv.children).map((el) => parseLegacyHTML(el));
69713
69713
  board.index.clear();
69714
69714
  const createdConnectors = {};
69715
69715
  const createdGroups = {};
@@ -69750,6 +69750,20 @@ function deserializeHTMLToBoard(board, stringedHTML) {
69750
69750
  }
69751
69751
  }
69752
69752
 
69753
+ // src/HTMLAdapter/BoardHTMLAdapter.ts
69754
+ function parseHTML(el) {
69755
+ return parseLegacyHTML(el);
69756
+ }
69757
+ function serializeBoardToHTML(board) {
69758
+ return serializeBoardToLegacyHTML(board);
69759
+ }
69760
+ function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
69761
+ return deserializeLegacyHTMLAndEmitToBoard(board, stringedHTML);
69762
+ }
69763
+ function deserializeHTMLToBoard(board, stringedHTML) {
69764
+ deserializeLegacyHTMLToBoard(board, stringedHTML);
69765
+ }
69766
+
69753
69767
  // src/Presence/consts.ts
69754
69768
  var PRESENCE_COLORS = [
69755
69769
  "rgb(71,120,245)",
@@ -71326,13 +71340,13 @@ function createCanvasDrawer(board) {
71326
71340
  if (container2) {
71327
71341
  context.ctx.save();
71328
71342
  container2.getNestingMatrix().applyToContext(context.ctx);
71329
- item.renderWithOpacity(context);
71343
+ item.render(context);
71330
71344
  context.ctx.restore();
71331
71345
  } else {
71332
- item.renderWithOpacity(context);
71346
+ item.render(context);
71333
71347
  }
71334
71348
  } else {
71335
- item.renderWithOpacity(context);
71349
+ item.render(context);
71336
71350
  }
71337
71351
  board2.selection.renderItemMbr(context, item, board2.camera.getMatrix().scaleX);
71338
71352
  }
@@ -75800,7 +75814,7 @@ class AddHighlighter extends AddDrawing {
75800
75814
  }
75801
75815
  applyDrawingRole(drawing) {
75802
75816
  drawing.setColorRole("background");
75803
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
75817
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
75804
75818
  }
75805
75819
  updateSettings() {
75806
75820
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
@@ -14254,6 +14254,14 @@ var AudioOperationSchema = exports_external.object({
14254
14254
  item: StringArraySchema,
14255
14255
  url: exports_external.string()
14256
14256
  }).passthrough();
14257
+ var ItemSetPropertyOperationSchema = exports_external.object({
14258
+ class: exports_external.literal("Item"),
14259
+ method: exports_external.literal("setProperty"),
14260
+ item: StringArraySchema,
14261
+ property: exports_external.string(),
14262
+ value: exports_external.unknown(),
14263
+ prevValues: exports_external.array(exports_external.unknown())
14264
+ }).passthrough();
14257
14265
  var SocketOperationSchema = exports_external.union([
14258
14266
  UndoOperationSchema,
14259
14267
  RedoOperationSchema,
@@ -14273,7 +14281,8 @@ var SocketOperationSchema = exports_external.union([
14273
14281
  ...CommentOperationSchemas,
14274
14282
  ImageOperationSchema,
14275
14283
  VideoOperationSchema,
14276
- AudioOperationSchema
14284
+ AudioOperationSchema,
14285
+ ItemSetPropertyOperationSchema
14277
14286
  ]);
14278
14287
  var SocketBoardEventBodySchema = exports_external.object({
14279
14288
  eventId: exports_external.string(),
@@ -5030,7 +5030,7 @@ function mergeSetPropertyOperations(opA, opB) {
5030
5030
  }
5031
5031
  return {
5032
5032
  ...opB,
5033
- prevValue: opA.prevValue
5033
+ prevValues: opA.prevValues
5034
5034
  };
5035
5035
  }
5036
5036
  function mergeBoardOperations(opA, opB) {
@@ -11719,7 +11719,6 @@ class BaseItem {
11719
11719
  shouldUseRelativeAlignment = true;
11720
11720
  resizeEnabled = true;
11721
11721
  onlyProportionalResize = false;
11722
- opacity = 1;
11723
11722
  itemType = "";
11724
11723
  childIds = [];
11725
11724
  isHoverHighlighted = false;
@@ -12072,7 +12071,6 @@ class BaseItem {
12072
12071
  itemType: this.itemType,
12073
12072
  childIds: this.childIds,
12074
12073
  parent: this.parent,
12075
- opacity: this.opacity,
12076
12074
  resizeEnabled: this.resizeEnabled
12077
12075
  };
12078
12076
  }
@@ -12284,16 +12282,6 @@ class BaseItem {
12284
12282
  this.index.render(context);
12285
12283
  }
12286
12284
  }
12287
- renderWithOpacity(context) {
12288
- if (this.opacity === 1) {
12289
- this.render(context);
12290
- return;
12291
- }
12292
- context.ctx.save();
12293
- context.ctx.globalAlpha *= this.opacity;
12294
- this.render(context);
12295
- context.ctx.restore();
12296
- }
12297
12285
  getSnapAnchorPoints() {
12298
12286
  return this.getMbr().getSnapAnchorPoints();
12299
12287
  }
@@ -27501,6 +27489,14 @@ var AudioOperationSchema = exports_external.object({
27501
27489
  item: StringArraySchema,
27502
27490
  url: exports_external.string()
27503
27491
  }).passthrough();
27492
+ var ItemSetPropertyOperationSchema = exports_external.object({
27493
+ class: exports_external.literal("Item"),
27494
+ method: exports_external.literal("setProperty"),
27495
+ item: StringArraySchema,
27496
+ property: exports_external.string(),
27497
+ value: exports_external.unknown(),
27498
+ prevValues: exports_external.array(exports_external.unknown())
27499
+ }).passthrough();
27504
27500
  var SocketOperationSchema = exports_external.union([
27505
27501
  UndoOperationSchema,
27506
27502
  RedoOperationSchema,
@@ -27520,7 +27516,8 @@ var SocketOperationSchema = exports_external.union([
27520
27516
  ...CommentOperationSchemas,
27521
27517
  ImageOperationSchema,
27522
27518
  VideoOperationSchema,
27523
- AudioOperationSchema
27519
+ AudioOperationSchema,
27520
+ ItemSetPropertyOperationSchema
27524
27521
  ]);
27525
27522
  var SocketBoardEventBodySchema = exports_external.object({
27526
27523
  eventId: exports_external.string(),
@@ -40713,9 +40710,7 @@ function registerHTMLRenderer(itemType, renderer) {
40713
40710
  }
40714
40711
  function renderItemToHTML(item, documentFactory) {
40715
40712
  const renderer = renderers[item.itemType] || defaultRenderer;
40716
- const element2 = renderer.render(item, documentFactory);
40717
- element2.style.opacity = `${item.opacity}`;
40718
- return element2;
40713
+ return renderer.render(item, documentFactory);
40719
40714
  }
40720
40715
  var defaultRenderer = {
40721
40716
  render(item, documentFactory) {
@@ -42485,6 +42480,7 @@ function parseHTMLDrawing(el) {
42485
42480
  transformation,
42486
42481
  strokeStyle: pathElement.getAttribute("stroke") || "",
42487
42482
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
42483
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
42488
42484
  linkTo: el.getAttribute("data-link-to") || undefined
42489
42485
  };
42490
42486
  }
@@ -42939,7 +42935,7 @@ class DrawingHTMLRenderer {
42939
42935
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
42940
42936
  pathElement.setAttribute("d", this.getPathData(drawing));
42941
42937
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
42942
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
42938
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
42943
42939
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
42944
42940
  pathElement.setAttribute("fill", "none");
42945
42941
  svg.appendChild(pathElement);
@@ -44002,7 +43998,7 @@ class SimpleSpatialIndex {
44002
43998
  }
44003
43999
  render(context) {
44004
44000
  this.itemsArray.forEach((item) => {
44005
- item.renderWithOpacity?.(context) ?? item.render(context);
44001
+ item.render(context);
44006
44002
  });
44007
44003
  }
44008
44004
  }
@@ -58756,7 +58752,7 @@ var addShapeToolOverlay = {
58756
58752
  createsItemType: "Shape",
58757
58753
  family: "shape",
58758
58754
  icon: {
58759
- ...overlayAssetIcon("src/Items/Shape/icons/Tool.icon.svg"),
58755
+ ...symbolIcon("Shape"),
58760
58756
  state: {
58761
58757
  note: "UI may swap the top-level icon to the selected shape option when desired."
58762
58758
  }
@@ -60319,7 +60315,7 @@ async function exportBoardScreenshot({
60319
60315
  const { left, top, right, bottom } = selection;
60320
60316
  const inView = board.items.index.listEnclosedOrCrossedBy(left, top, right, bottom);
60321
60317
  for (const item of inView) {
60322
- item.renderWithOpacity?.(context) ?? item.render(context);
60318
+ item.render(context);
60323
60319
  }
60324
60320
  const blob = await offscreenCanvas.convertToBlob({ type: "image/png" });
60325
60321
  const dataUrl = await convertBlobToDataUrl(blob);
@@ -62774,6 +62770,7 @@ var DrawingDataSchema = exports_external.object({
62774
62770
  strokeStyle: ColorValueSchema,
62775
62771
  strokeWidth: exports_external.number(),
62776
62772
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
62773
+ borderOpacity: exports_external.number().optional(),
62777
62774
  opacity: exports_external.number().optional(),
62778
62775
  linkTo: exports_external.string().optional()
62779
62776
  });
@@ -62791,6 +62788,7 @@ class Drawing extends BaseItem {
62791
62788
  borderStyle = "solid";
62792
62789
  colorRole = "foreground";
62793
62790
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
62791
+ borderOpacity = 1;
62794
62792
  transformationRenderBlock = undefined;
62795
62793
  points = [];
62796
62794
  constructor(board, id = "") {
@@ -62809,7 +62807,8 @@ class Drawing extends BaseItem {
62809
62807
  points,
62810
62808
  strokeStyle: this.borderColor,
62811
62809
  strokeWidth: this.strokeWidth,
62812
- colorRole: this.colorRole
62810
+ colorRole: this.colorRole,
62811
+ borderOpacity: this.borderOpacity
62813
62812
  };
62814
62813
  }
62815
62814
  deserialize(data) {
@@ -62827,7 +62826,7 @@ class Drawing extends BaseItem {
62827
62826
  if (data.colorRole) {
62828
62827
  this.colorRole = data.colorRole;
62829
62828
  }
62830
- this.opacity = data.opacity ?? this.opacity;
62829
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
62831
62830
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
62832
62831
  return this;
62833
62832
  }
@@ -62942,6 +62941,7 @@ class Drawing extends BaseItem {
62942
62941
  const ctx = context.ctx;
62943
62942
  ctx.save();
62944
62943
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
62944
+ ctx.globalAlpha = this.borderOpacity;
62945
62945
  ctx.lineWidth = this.strokeWidth;
62946
62946
  ctx.lineCap = "round";
62947
62947
  ctx.setLineDash(this.linePattern);
@@ -63071,7 +63071,7 @@ class Drawing extends BaseItem {
63071
63071
  "borderColor",
63072
63072
  "strokeWidth",
63073
63073
  "borderStyle",
63074
- "opacity",
63074
+ "borderOpacity",
63075
63075
  "colorRole",
63076
63076
  "strokeStyle"
63077
63077
  ];
@@ -63081,7 +63081,7 @@ class Drawing extends BaseItem {
63081
63081
  return super.getPropertyUpdateHint(property);
63082
63082
  }
63083
63083
  getStrokeOpacity() {
63084
- return this.opacity;
63084
+ return this.borderOpacity;
63085
63085
  }
63086
63086
  getBorderStyle() {
63087
63087
  return this.borderStyle;
@@ -63127,7 +63127,7 @@ registerItem({
63127
63127
  itemType: "Drawing",
63128
63128
  points: [],
63129
63129
  borderColor: coerceColorValue("#000000"),
63130
- opacity: 1,
63130
+ borderOpacity: 1,
63131
63131
  borderStyle: "solid",
63132
63132
  strokeWidth: 2,
63133
63133
  transformation: new DefaultTransformationData
@@ -64149,7 +64149,7 @@ class ShapeTool extends CustomTool {
64149
64149
  }
64150
64150
  render(context) {
64151
64151
  if (this.isDown) {
64152
- this.item.renderWithOpacity(context);
64152
+ this.item.render(context);
64153
64153
  this.bounds.render(context);
64154
64154
  }
64155
64155
  }
@@ -66922,15 +66922,15 @@ class Keyboard {
66922
66922
  }
66923
66923
  }
66924
66924
 
66925
- // src/HTMLAdapter/BoardHTMLAdapter.ts
66926
- function parseHTML(el) {
66925
+ // src/HTMLAdapter/LegacyBoardHTMLAdapter.ts
66926
+ function parseLegacyHTML(el) {
66927
66927
  const parser = parsersHTML[el.tagName.toLowerCase()];
66928
66928
  if (!parser) {
66929
66929
  throw new Error(`Unknown element tag: ${el.tagName.toLowerCase()}`);
66930
66930
  }
66931
66931
  return parser(el);
66932
66932
  }
66933
- function serializeBoardToHTML(board) {
66933
+ function serializeBoardToLegacyHTML(board) {
66934
66934
  const boardName = board.getName() || board.getBoardId();
66935
66935
  const items = board.index.items.getWholeHTML(conf.documentFactory);
66936
66936
  const itemsDiv = `<div id="items">${items}</div>`;
@@ -66956,14 +66956,14 @@ function serializeBoardToHTML(board) {
66956
66956
  </head>`.replace(/\t|\n/g, "");
66957
66957
  return `${head}${body}`;
66958
66958
  }
66959
- function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
66959
+ function deserializeLegacyHTMLAndEmitToBoard(board, stringedHTML) {
66960
66960
  const parser = conf.getDOMParser();
66961
66961
  const doc2 = parser.parseFromString(stringedHTML, "text/html");
66962
66962
  const items = doc2.body.querySelector("#items");
66963
66963
  if (items) {
66964
66964
  const idsMap = {};
66965
66965
  const addedConnectors = [];
66966
- const data = Array.from(items.children).map((el) => parseHTML(el));
66966
+ const data = Array.from(items.children).map((el) => parseLegacyHTML(el));
66967
66967
  for (const parsedData of data) {
66968
66968
  if ("childrenMap" in parsedData) {
66969
66969
  const frameData = parsedData;
@@ -67011,14 +67011,14 @@ function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
67011
67011
  }
67012
67012
  return [];
67013
67013
  }
67014
- function deserializeHTMLToBoard(board, stringedHTML) {
67014
+ function deserializeLegacyHTMLToBoard(board, stringedHTML) {
67015
67015
  const parser = conf.getDOMParser();
67016
67016
  const doc2 = parser.parseFromString(stringedHTML, "text/html");
67017
67017
  const itemsDiv = doc2.body.querySelector("#items");
67018
67018
  if (!itemsDiv) {
67019
67019
  return;
67020
67020
  }
67021
- const items = Array.from(itemsDiv.children).map((el) => parseHTML(el));
67021
+ const items = Array.from(itemsDiv.children).map((el) => parseLegacyHTML(el));
67022
67022
  board.index.clear();
67023
67023
  const createdConnectors = {};
67024
67024
  const createdGroups = {};
@@ -67059,6 +67059,20 @@ function deserializeHTMLToBoard(board, stringedHTML) {
67059
67059
  }
67060
67060
  }
67061
67061
 
67062
+ // src/HTMLAdapter/BoardHTMLAdapter.ts
67063
+ function parseHTML(el) {
67064
+ return parseLegacyHTML(el);
67065
+ }
67066
+ function serializeBoardToHTML(board) {
67067
+ return serializeBoardToLegacyHTML(board);
67068
+ }
67069
+ function deserializeHTMLAndEmitToBoard(board, stringedHTML) {
67070
+ return deserializeLegacyHTMLAndEmitToBoard(board, stringedHTML);
67071
+ }
67072
+ function deserializeHTMLToBoard(board, stringedHTML) {
67073
+ deserializeLegacyHTMLToBoard(board, stringedHTML);
67074
+ }
67075
+
67062
67076
  // src/Presence/consts.ts
67063
67077
  var PRESENCE_COLORS = [
67064
67078
  "rgb(71,120,245)",
@@ -68635,13 +68649,13 @@ function createCanvasDrawer(board) {
68635
68649
  if (container2) {
68636
68650
  context.ctx.save();
68637
68651
  container2.getNestingMatrix().applyToContext(context.ctx);
68638
- item.renderWithOpacity(context);
68652
+ item.render(context);
68639
68653
  context.ctx.restore();
68640
68654
  } else {
68641
- item.renderWithOpacity(context);
68655
+ item.render(context);
68642
68656
  }
68643
68657
  } else {
68644
- item.renderWithOpacity(context);
68658
+ item.render(context);
68645
68659
  }
68646
68660
  board2.selection.renderItemMbr(context, item, board2.camera.getMatrix().scaleX);
68647
68661
  }
@@ -73109,7 +73123,7 @@ class AddHighlighter extends AddDrawing {
73109
73123
  }
73110
73124
  applyDrawingRole(drawing) {
73111
73125
  drawing.setColorRole("background");
73112
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
73126
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
73113
73127
  }
73114
73128
  updateSettings() {
73115
73129
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({