microboard-temp 0.14.27 → 0.14.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.
@@ -11945,7 +11945,6 @@ class BaseItem {
11945
11945
  shouldUseRelativeAlignment = true;
11946
11946
  resizeEnabled = true;
11947
11947
  onlyProportionalResize = false;
11948
- opacity = 1;
11949
11948
  itemType = "";
11950
11949
  childIds = [];
11951
11950
  isHoverHighlighted = false;
@@ -12298,7 +12297,6 @@ class BaseItem {
12298
12297
  itemType: this.itemType,
12299
12298
  childIds: this.childIds,
12300
12299
  parent: this.parent,
12301
- opacity: this.opacity,
12302
12300
  resizeEnabled: this.resizeEnabled
12303
12301
  };
12304
12302
  }
@@ -42691,6 +42689,7 @@ function parseHTMLDrawing(el) {
42691
42689
  transformation,
42692
42690
  strokeStyle: pathElement.getAttribute("stroke") || "",
42693
42691
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
42692
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
42694
42693
  linkTo: el.getAttribute("data-link-to") || undefined
42695
42694
  };
42696
42695
  }
@@ -43145,7 +43144,7 @@ class DrawingHTMLRenderer {
43145
43144
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
43146
43145
  pathElement.setAttribute("d", this.getPathData(drawing));
43147
43146
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
43148
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
43147
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
43149
43148
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
43150
43149
  pathElement.setAttribute("fill", "none");
43151
43150
  svg.appendChild(pathElement);
@@ -62980,6 +62979,7 @@ var DrawingDataSchema = exports_external.object({
62980
62979
  strokeStyle: ColorValueSchema,
62981
62980
  strokeWidth: exports_external.number(),
62982
62981
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
62982
+ borderOpacity: exports_external.number().optional(),
62983
62983
  opacity: exports_external.number().optional(),
62984
62984
  linkTo: exports_external.string().optional()
62985
62985
  });
@@ -62997,6 +62997,7 @@ class Drawing extends BaseItem {
62997
62997
  borderStyle = "solid";
62998
62998
  colorRole = "foreground";
62999
62999
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
63000
+ borderOpacity = 1;
63000
63001
  transformationRenderBlock = undefined;
63001
63002
  points = [];
63002
63003
  constructor(board, id = "") {
@@ -63015,7 +63016,8 @@ class Drawing extends BaseItem {
63015
63016
  points,
63016
63017
  strokeStyle: this.borderColor,
63017
63018
  strokeWidth: this.strokeWidth,
63018
- colorRole: this.colorRole
63019
+ colorRole: this.colorRole,
63020
+ borderOpacity: this.borderOpacity
63019
63021
  };
63020
63022
  }
63021
63023
  deserialize(data) {
@@ -63033,7 +63035,7 @@ class Drawing extends BaseItem {
63033
63035
  if (data.colorRole) {
63034
63036
  this.colorRole = data.colorRole;
63035
63037
  }
63036
- this.opacity = data.opacity ?? this.opacity;
63038
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
63037
63039
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
63038
63040
  return this;
63039
63041
  }
@@ -63148,7 +63150,7 @@ class Drawing extends BaseItem {
63148
63150
  const ctx = context.ctx;
63149
63151
  ctx.save();
63150
63152
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
63151
- ctx.globalAlpha = this.opacity;
63153
+ ctx.globalAlpha = this.borderOpacity;
63152
63154
  ctx.lineWidth = this.strokeWidth;
63153
63155
  ctx.lineCap = "round";
63154
63156
  ctx.setLineDash(this.linePattern);
@@ -63278,7 +63280,7 @@ class Drawing extends BaseItem {
63278
63280
  "borderColor",
63279
63281
  "strokeWidth",
63280
63282
  "borderStyle",
63281
- "opacity",
63283
+ "borderOpacity",
63282
63284
  "colorRole",
63283
63285
  "strokeStyle"
63284
63286
  ];
@@ -63288,7 +63290,7 @@ class Drawing extends BaseItem {
63288
63290
  return super.getPropertyUpdateHint(property);
63289
63291
  }
63290
63292
  getStrokeOpacity() {
63291
- return this.opacity;
63293
+ return this.borderOpacity;
63292
63294
  }
63293
63295
  getBorderStyle() {
63294
63296
  return this.borderStyle;
@@ -63334,7 +63336,7 @@ registerItem({
63334
63336
  itemType: "Drawing",
63335
63337
  points: [],
63336
63338
  borderColor: coerceColorValue("#000000"),
63337
- opacity: 1,
63339
+ borderOpacity: 1,
63338
63340
  borderStyle: "solid",
63339
63341
  strokeWidth: 2,
63340
63342
  transformation: new DefaultTransformationData
@@ -73316,7 +73318,7 @@ class AddHighlighter extends AddDrawing {
73316
73318
  }
73317
73319
  applyDrawingRole(drawing) {
73318
73320
  drawing.setColorRole("background");
73319
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
73321
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
73320
73322
  }
73321
73323
  updateSettings() {
73322
73324
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
package/dist/cjs/index.js CHANGED
@@ -11945,7 +11945,6 @@ class BaseItem {
11945
11945
  shouldUseRelativeAlignment = true;
11946
11946
  resizeEnabled = true;
11947
11947
  onlyProportionalResize = false;
11948
- opacity = 1;
11949
11948
  itemType = "";
11950
11949
  childIds = [];
11951
11950
  isHoverHighlighted = false;
@@ -12298,7 +12297,6 @@ class BaseItem {
12298
12297
  itemType: this.itemType,
12299
12298
  childIds: this.childIds,
12300
12299
  parent: this.parent,
12301
- opacity: this.opacity,
12302
12300
  resizeEnabled: this.resizeEnabled
12303
12301
  };
12304
12302
  }
@@ -42691,6 +42689,7 @@ function parseHTMLDrawing(el) {
42691
42689
  transformation,
42692
42690
  strokeStyle: pathElement.getAttribute("stroke") || "",
42693
42691
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
42692
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
42694
42693
  linkTo: el.getAttribute("data-link-to") || undefined
42695
42694
  };
42696
42695
  }
@@ -43145,7 +43144,7 @@ class DrawingHTMLRenderer {
43145
43144
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
43146
43145
  pathElement.setAttribute("d", this.getPathData(drawing));
43147
43146
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
43148
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
43147
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
43149
43148
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
43150
43149
  pathElement.setAttribute("fill", "none");
43151
43150
  svg.appendChild(pathElement);
@@ -62980,6 +62979,7 @@ var DrawingDataSchema = exports_external.object({
62980
62979
  strokeStyle: ColorValueSchema,
62981
62980
  strokeWidth: exports_external.number(),
62982
62981
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
62982
+ borderOpacity: exports_external.number().optional(),
62983
62983
  opacity: exports_external.number().optional(),
62984
62984
  linkTo: exports_external.string().optional()
62985
62985
  });
@@ -62997,6 +62997,7 @@ class Drawing extends BaseItem {
62997
62997
  borderStyle = "solid";
62998
62998
  colorRole = "foreground";
62999
62999
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
63000
+ borderOpacity = 1;
63000
63001
  transformationRenderBlock = undefined;
63001
63002
  points = [];
63002
63003
  constructor(board, id = "") {
@@ -63015,7 +63016,8 @@ class Drawing extends BaseItem {
63015
63016
  points,
63016
63017
  strokeStyle: this.borderColor,
63017
63018
  strokeWidth: this.strokeWidth,
63018
- colorRole: this.colorRole
63019
+ colorRole: this.colorRole,
63020
+ borderOpacity: this.borderOpacity
63019
63021
  };
63020
63022
  }
63021
63023
  deserialize(data) {
@@ -63033,7 +63035,7 @@ class Drawing extends BaseItem {
63033
63035
  if (data.colorRole) {
63034
63036
  this.colorRole = data.colorRole;
63035
63037
  }
63036
- this.opacity = data.opacity ?? this.opacity;
63038
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
63037
63039
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
63038
63040
  return this;
63039
63041
  }
@@ -63148,7 +63150,7 @@ class Drawing extends BaseItem {
63148
63150
  const ctx = context.ctx;
63149
63151
  ctx.save();
63150
63152
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
63151
- ctx.globalAlpha = this.opacity;
63153
+ ctx.globalAlpha = this.borderOpacity;
63152
63154
  ctx.lineWidth = this.strokeWidth;
63153
63155
  ctx.lineCap = "round";
63154
63156
  ctx.setLineDash(this.linePattern);
@@ -63278,7 +63280,7 @@ class Drawing extends BaseItem {
63278
63280
  "borderColor",
63279
63281
  "strokeWidth",
63280
63282
  "borderStyle",
63281
- "opacity",
63283
+ "borderOpacity",
63282
63284
  "colorRole",
63283
63285
  "strokeStyle"
63284
63286
  ];
@@ -63288,7 +63290,7 @@ class Drawing extends BaseItem {
63288
63290
  return super.getPropertyUpdateHint(property);
63289
63291
  }
63290
63292
  getStrokeOpacity() {
63291
- return this.opacity;
63293
+ return this.borderOpacity;
63292
63294
  }
63293
63295
  getBorderStyle() {
63294
63296
  return this.borderStyle;
@@ -63334,7 +63336,7 @@ registerItem({
63334
63336
  itemType: "Drawing",
63335
63337
  points: [],
63336
63338
  borderColor: coerceColorValue("#000000"),
63337
- opacity: 1,
63339
+ borderOpacity: 1,
63338
63340
  borderStyle: "solid",
63339
63341
  strokeWidth: 2,
63340
63342
  transformation: new DefaultTransformationData
@@ -73316,7 +73318,7 @@ class AddHighlighter extends AddDrawing {
73316
73318
  }
73317
73319
  applyDrawingRole(drawing) {
73318
73320
  drawing.setColorRole("background");
73319
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
73321
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
73320
73322
  }
73321
73323
  updateSettings() {
73322
73324
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
package/dist/cjs/node.js CHANGED
@@ -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
  }
@@ -45163,6 +45161,7 @@ function parseHTMLDrawing(el) {
45163
45161
  transformation,
45164
45162
  strokeStyle: pathElement.getAttribute("stroke") || "",
45165
45163
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
45164
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
45166
45165
  linkTo: el.getAttribute("data-link-to") || undefined
45167
45166
  };
45168
45167
  }
@@ -45617,7 +45616,7 @@ class DrawingHTMLRenderer {
45617
45616
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
45618
45617
  pathElement.setAttribute("d", this.getPathData(drawing));
45619
45618
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
45620
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
45619
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
45621
45620
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
45622
45621
  pathElement.setAttribute("fill", "none");
45623
45622
  svg.appendChild(pathElement);
@@ -65453,6 +65452,7 @@ var DrawingDataSchema = exports_external.object({
65453
65452
  strokeStyle: ColorValueSchema,
65454
65453
  strokeWidth: exports_external.number(),
65455
65454
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
65455
+ borderOpacity: exports_external.number().optional(),
65456
65456
  opacity: exports_external.number().optional(),
65457
65457
  linkTo: exports_external.string().optional()
65458
65458
  });
@@ -65470,6 +65470,7 @@ class Drawing extends BaseItem {
65470
65470
  borderStyle = "solid";
65471
65471
  colorRole = "foreground";
65472
65472
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
65473
+ borderOpacity = 1;
65473
65474
  transformationRenderBlock = undefined;
65474
65475
  points = [];
65475
65476
  constructor(board, id = "") {
@@ -65488,7 +65489,8 @@ class Drawing extends BaseItem {
65488
65489
  points,
65489
65490
  strokeStyle: this.borderColor,
65490
65491
  strokeWidth: this.strokeWidth,
65491
- colorRole: this.colorRole
65492
+ colorRole: this.colorRole,
65493
+ borderOpacity: this.borderOpacity
65492
65494
  };
65493
65495
  }
65494
65496
  deserialize(data) {
@@ -65506,7 +65508,7 @@ class Drawing extends BaseItem {
65506
65508
  if (data.colorRole) {
65507
65509
  this.colorRole = data.colorRole;
65508
65510
  }
65509
- this.opacity = data.opacity ?? this.opacity;
65511
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
65510
65512
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
65511
65513
  return this;
65512
65514
  }
@@ -65621,7 +65623,7 @@ class Drawing extends BaseItem {
65621
65623
  const ctx = context.ctx;
65622
65624
  ctx.save();
65623
65625
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
65624
- ctx.globalAlpha = this.opacity;
65626
+ ctx.globalAlpha = this.borderOpacity;
65625
65627
  ctx.lineWidth = this.strokeWidth;
65626
65628
  ctx.lineCap = "round";
65627
65629
  ctx.setLineDash(this.linePattern);
@@ -65751,7 +65753,7 @@ class Drawing extends BaseItem {
65751
65753
  "borderColor",
65752
65754
  "strokeWidth",
65753
65755
  "borderStyle",
65754
- "opacity",
65756
+ "borderOpacity",
65755
65757
  "colorRole",
65756
65758
  "strokeStyle"
65757
65759
  ];
@@ -65761,7 +65763,7 @@ class Drawing extends BaseItem {
65761
65763
  return super.getPropertyUpdateHint(property);
65762
65764
  }
65763
65765
  getStrokeOpacity() {
65764
- return this.opacity;
65766
+ return this.borderOpacity;
65765
65767
  }
65766
65768
  getBorderStyle() {
65767
65769
  return this.borderStyle;
@@ -65807,7 +65809,7 @@ registerItem({
65807
65809
  itemType: "Drawing",
65808
65810
  points: [],
65809
65811
  borderColor: coerceColorValue("#000000"),
65810
- opacity: 1,
65812
+ borderOpacity: 1,
65811
65813
  borderStyle: "solid",
65812
65814
  strokeWidth: 2,
65813
65815
  transformation: new DefaultTransformationData
@@ -75789,7 +75791,7 @@ class AddHighlighter extends AddDrawing {
75789
75791
  }
75790
75792
  applyDrawingRole(drawing) {
75791
75793
  drawing.setColorRole("background");
75792
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
75794
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
75793
75795
  }
75794
75796
  updateSettings() {
75795
75797
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
@@ -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
  }
@@ -42473,6 +42471,7 @@ function parseHTMLDrawing(el) {
42473
42471
  transformation,
42474
42472
  strokeStyle: pathElement.getAttribute("stroke") || "",
42475
42473
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
42474
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
42476
42475
  linkTo: el.getAttribute("data-link-to") || undefined
42477
42476
  };
42478
42477
  }
@@ -42927,7 +42926,7 @@ class DrawingHTMLRenderer {
42927
42926
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
42928
42927
  pathElement.setAttribute("d", this.getPathData(drawing));
42929
42928
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
42930
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
42929
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
42931
42930
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
42932
42931
  pathElement.setAttribute("fill", "none");
42933
42932
  svg.appendChild(pathElement);
@@ -62762,6 +62761,7 @@ var DrawingDataSchema = exports_external.object({
62762
62761
  strokeStyle: ColorValueSchema,
62763
62762
  strokeWidth: exports_external.number(),
62764
62763
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
62764
+ borderOpacity: exports_external.number().optional(),
62765
62765
  opacity: exports_external.number().optional(),
62766
62766
  linkTo: exports_external.string().optional()
62767
62767
  });
@@ -62779,6 +62779,7 @@ class Drawing extends BaseItem {
62779
62779
  borderStyle = "solid";
62780
62780
  colorRole = "foreground";
62781
62781
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
62782
+ borderOpacity = 1;
62782
62783
  transformationRenderBlock = undefined;
62783
62784
  points = [];
62784
62785
  constructor(board, id = "") {
@@ -62797,7 +62798,8 @@ class Drawing extends BaseItem {
62797
62798
  points,
62798
62799
  strokeStyle: this.borderColor,
62799
62800
  strokeWidth: this.strokeWidth,
62800
- colorRole: this.colorRole
62801
+ colorRole: this.colorRole,
62802
+ borderOpacity: this.borderOpacity
62801
62803
  };
62802
62804
  }
62803
62805
  deserialize(data) {
@@ -62815,7 +62817,7 @@ class Drawing extends BaseItem {
62815
62817
  if (data.colorRole) {
62816
62818
  this.colorRole = data.colorRole;
62817
62819
  }
62818
- this.opacity = data.opacity ?? this.opacity;
62820
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
62819
62821
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
62820
62822
  return this;
62821
62823
  }
@@ -62930,7 +62932,7 @@ class Drawing extends BaseItem {
62930
62932
  const ctx = context.ctx;
62931
62933
  ctx.save();
62932
62934
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
62933
- ctx.globalAlpha = this.opacity;
62935
+ ctx.globalAlpha = this.borderOpacity;
62934
62936
  ctx.lineWidth = this.strokeWidth;
62935
62937
  ctx.lineCap = "round";
62936
62938
  ctx.setLineDash(this.linePattern);
@@ -63060,7 +63062,7 @@ class Drawing extends BaseItem {
63060
63062
  "borderColor",
63061
63063
  "strokeWidth",
63062
63064
  "borderStyle",
63063
- "opacity",
63065
+ "borderOpacity",
63064
63066
  "colorRole",
63065
63067
  "strokeStyle"
63066
63068
  ];
@@ -63070,7 +63072,7 @@ class Drawing extends BaseItem {
63070
63072
  return super.getPropertyUpdateHint(property);
63071
63073
  }
63072
63074
  getStrokeOpacity() {
63073
- return this.opacity;
63075
+ return this.borderOpacity;
63074
63076
  }
63075
63077
  getBorderStyle() {
63076
63078
  return this.borderStyle;
@@ -63116,7 +63118,7 @@ registerItem({
63116
63118
  itemType: "Drawing",
63117
63119
  points: [],
63118
63120
  borderColor: coerceColorValue("#000000"),
63119
- opacity: 1,
63121
+ borderOpacity: 1,
63120
63122
  borderStyle: "solid",
63121
63123
  strokeWidth: 2,
63122
63124
  transformation: new DefaultTransformationData
@@ -73098,7 +73100,7 @@ class AddHighlighter extends AddDrawing {
73098
73100
  }
73099
73101
  applyDrawingRole(drawing) {
73100
73102
  drawing.setColorRole("background");
73101
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
73103
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
73102
73104
  }
73103
73105
  updateSettings() {
73104
73106
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
package/dist/esm/index.js CHANGED
@@ -11712,7 +11712,6 @@ class BaseItem {
11712
11712
  shouldUseRelativeAlignment = true;
11713
11713
  resizeEnabled = true;
11714
11714
  onlyProportionalResize = false;
11715
- opacity = 1;
11716
11715
  itemType = "";
11717
11716
  childIds = [];
11718
11717
  isHoverHighlighted = false;
@@ -12065,7 +12064,6 @@ class BaseItem {
12065
12064
  itemType: this.itemType,
12066
12065
  childIds: this.childIds,
12067
12066
  parent: this.parent,
12068
- opacity: this.opacity,
12069
12067
  resizeEnabled: this.resizeEnabled
12070
12068
  };
12071
12069
  }
@@ -42466,6 +42464,7 @@ function parseHTMLDrawing(el) {
42466
42464
  transformation,
42467
42465
  strokeStyle: pathElement.getAttribute("stroke") || "",
42468
42466
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
42467
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
42469
42468
  linkTo: el.getAttribute("data-link-to") || undefined
42470
42469
  };
42471
42470
  }
@@ -42920,7 +42919,7 @@ class DrawingHTMLRenderer {
42920
42919
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
42921
42920
  pathElement.setAttribute("d", this.getPathData(drawing));
42922
42921
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
42923
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
42922
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
42924
42923
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
42925
42924
  pathElement.setAttribute("fill", "none");
42926
42925
  svg.appendChild(pathElement);
@@ -62755,6 +62754,7 @@ var DrawingDataSchema = exports_external.object({
62755
62754
  strokeStyle: ColorValueSchema,
62756
62755
  strokeWidth: exports_external.number(),
62757
62756
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
62757
+ borderOpacity: exports_external.number().optional(),
62758
62758
  opacity: exports_external.number().optional(),
62759
62759
  linkTo: exports_external.string().optional()
62760
62760
  });
@@ -62772,6 +62772,7 @@ class Drawing extends BaseItem {
62772
62772
  borderStyle = "solid";
62773
62773
  colorRole = "foreground";
62774
62774
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
62775
+ borderOpacity = 1;
62775
62776
  transformationRenderBlock = undefined;
62776
62777
  points = [];
62777
62778
  constructor(board, id = "") {
@@ -62790,7 +62791,8 @@ class Drawing extends BaseItem {
62790
62791
  points,
62791
62792
  strokeStyle: this.borderColor,
62792
62793
  strokeWidth: this.strokeWidth,
62793
- colorRole: this.colorRole
62794
+ colorRole: this.colorRole,
62795
+ borderOpacity: this.borderOpacity
62794
62796
  };
62795
62797
  }
62796
62798
  deserialize(data) {
@@ -62808,7 +62810,7 @@ class Drawing extends BaseItem {
62808
62810
  if (data.colorRole) {
62809
62811
  this.colorRole = data.colorRole;
62810
62812
  }
62811
- this.opacity = data.opacity ?? this.opacity;
62813
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
62812
62814
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
62813
62815
  return this;
62814
62816
  }
@@ -62923,7 +62925,7 @@ class Drawing extends BaseItem {
62923
62925
  const ctx = context.ctx;
62924
62926
  ctx.save();
62925
62927
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
62926
- ctx.globalAlpha = this.opacity;
62928
+ ctx.globalAlpha = this.borderOpacity;
62927
62929
  ctx.lineWidth = this.strokeWidth;
62928
62930
  ctx.lineCap = "round";
62929
62931
  ctx.setLineDash(this.linePattern);
@@ -63053,7 +63055,7 @@ class Drawing extends BaseItem {
63053
63055
  "borderColor",
63054
63056
  "strokeWidth",
63055
63057
  "borderStyle",
63056
- "opacity",
63058
+ "borderOpacity",
63057
63059
  "colorRole",
63058
63060
  "strokeStyle"
63059
63061
  ];
@@ -63063,7 +63065,7 @@ class Drawing extends BaseItem {
63063
63065
  return super.getPropertyUpdateHint(property);
63064
63066
  }
63065
63067
  getStrokeOpacity() {
63066
- return this.opacity;
63068
+ return this.borderOpacity;
63067
63069
  }
63068
63070
  getBorderStyle() {
63069
63071
  return this.borderStyle;
@@ -63109,7 +63111,7 @@ registerItem({
63109
63111
  itemType: "Drawing",
63110
63112
  points: [],
63111
63113
  borderColor: coerceColorValue("#000000"),
63112
- opacity: 1,
63114
+ borderOpacity: 1,
63113
63115
  borderStyle: "solid",
63114
63116
  strokeWidth: 2,
63115
63117
  transformation: new DefaultTransformationData
@@ -73091,7 +73093,7 @@ class AddHighlighter extends AddDrawing {
73091
73093
  }
73092
73094
  applyDrawingRole(drawing) {
73093
73095
  drawing.setColorRole("background");
73094
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
73096
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
73095
73097
  }
73096
73098
  updateSettings() {
73097
73099
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
package/dist/esm/node.js CHANGED
@@ -12495,7 +12495,6 @@ class BaseItem {
12495
12495
  shouldUseRelativeAlignment = true;
12496
12496
  resizeEnabled = true;
12497
12497
  onlyProportionalResize = false;
12498
- opacity = 1;
12499
12498
  itemType = "";
12500
12499
  childIds = [];
12501
12500
  isHoverHighlighted = false;
@@ -12848,7 +12847,6 @@ class BaseItem {
12848
12847
  itemType: this.itemType,
12849
12848
  childIds: this.childIds,
12850
12849
  parent: this.parent,
12851
- opacity: this.opacity,
12852
12850
  resizeEnabled: this.resizeEnabled
12853
12851
  };
12854
12852
  }
@@ -44933,6 +44931,7 @@ function parseHTMLDrawing(el) {
44933
44931
  transformation,
44934
44932
  strokeStyle: pathElement.getAttribute("stroke") || "",
44935
44933
  strokeWidth: parseFloat(pathElement.getAttribute("stroke-width") || "1"),
44934
+ borderOpacity: parseFloat(pathElement.getAttribute("stroke-opacity") || el.style.opacity || "1"),
44936
44935
  linkTo: el.getAttribute("data-link-to") || undefined
44937
44936
  };
44938
44937
  }
@@ -45387,7 +45386,7 @@ class DrawingHTMLRenderer {
45387
45386
  const pathElement = documentFactory.createElementNS("http://www.w3.org/2000/svg", "path");
45388
45387
  pathElement.setAttribute("d", this.getPathData(drawing));
45389
45388
  pathElement.setAttribute("stroke", resolveColor(drawing.borderColor, conf.theme, drawing.colorRole));
45390
- pathElement.setAttribute("stroke-opacity", `${drawing.opacity}`);
45389
+ pathElement.setAttribute("stroke-opacity", `${drawing.getStrokeOpacity()}`);
45391
45390
  pathElement.setAttribute("stroke-width", `${drawing.strokeWidth}`);
45392
45391
  pathElement.setAttribute("fill", "none");
45393
45392
  svg.appendChild(pathElement);
@@ -65223,6 +65222,7 @@ var DrawingDataSchema = exports_external.object({
65223
65222
  strokeStyle: ColorValueSchema,
65224
65223
  strokeWidth: exports_external.number(),
65225
65224
  colorRole: exports_external.enum(["foreground", "background"]).optional(),
65225
+ borderOpacity: exports_external.number().optional(),
65226
65226
  opacity: exports_external.number().optional(),
65227
65227
  linkTo: exports_external.string().optional()
65228
65228
  });
@@ -65240,6 +65240,7 @@ class Drawing extends BaseItem {
65240
65240
  borderStyle = "solid";
65241
65241
  colorRole = "foreground";
65242
65242
  linePattern = scalePatterns(this.strokeWidth)[this.borderStyle];
65243
+ borderOpacity = 1;
65243
65244
  transformationRenderBlock = undefined;
65244
65245
  points = [];
65245
65246
  constructor(board, id = "") {
@@ -65258,7 +65259,8 @@ class Drawing extends BaseItem {
65258
65259
  points,
65259
65260
  strokeStyle: this.borderColor,
65260
65261
  strokeWidth: this.strokeWidth,
65261
- colorRole: this.colorRole
65262
+ colorRole: this.colorRole,
65263
+ borderOpacity: this.borderOpacity
65262
65264
  };
65263
65265
  }
65264
65266
  deserialize(data) {
@@ -65276,7 +65278,7 @@ class Drawing extends BaseItem {
65276
65278
  if (data.colorRole) {
65277
65279
  this.colorRole = data.colorRole;
65278
65280
  }
65279
- this.opacity = data.opacity ?? this.opacity;
65281
+ this.borderOpacity = data.borderOpacity ?? data.opacity ?? this.borderOpacity;
65280
65282
  this.updateVisuals({ method: "deserialize", class: this.itemType }, "FullRebuild" /* FullRebuild */);
65281
65283
  return this;
65282
65284
  }
@@ -65391,7 +65393,7 @@ class Drawing extends BaseItem {
65391
65393
  const ctx = context.ctx;
65392
65394
  ctx.save();
65393
65395
  ctx.strokeStyle = resolveColor(this.borderColor, conf.theme, this.colorRole);
65394
- ctx.globalAlpha = this.opacity;
65396
+ ctx.globalAlpha = this.borderOpacity;
65395
65397
  ctx.lineWidth = this.strokeWidth;
65396
65398
  ctx.lineCap = "round";
65397
65399
  ctx.setLineDash(this.linePattern);
@@ -65521,7 +65523,7 @@ class Drawing extends BaseItem {
65521
65523
  "borderColor",
65522
65524
  "strokeWidth",
65523
65525
  "borderStyle",
65524
- "opacity",
65526
+ "borderOpacity",
65525
65527
  "colorRole",
65526
65528
  "strokeStyle"
65527
65529
  ];
@@ -65531,7 +65533,7 @@ class Drawing extends BaseItem {
65531
65533
  return super.getPropertyUpdateHint(property);
65532
65534
  }
65533
65535
  getStrokeOpacity() {
65534
- return this.opacity;
65536
+ return this.borderOpacity;
65535
65537
  }
65536
65538
  getBorderStyle() {
65537
65539
  return this.borderStyle;
@@ -65577,7 +65579,7 @@ registerItem({
65577
65579
  itemType: "Drawing",
65578
65580
  points: [],
65579
65581
  borderColor: coerceColorValue("#000000"),
65580
- opacity: 1,
65582
+ borderOpacity: 1,
65581
65583
  borderStyle: "solid",
65582
65584
  strokeWidth: 2,
65583
65585
  transformation: new DefaultTransformationData
@@ -75559,7 +75561,7 @@ class AddHighlighter extends AddDrawing {
75559
75561
  }
75560
75562
  applyDrawingRole(drawing) {
75561
75563
  drawing.setColorRole("background");
75562
- drawing.apply(propertyOps.setProperty([drawing], "opacity", 0.5));
75564
+ drawing.apply(propertyOps.setProperty([drawing], "borderOpacity", 0.5));
75563
75565
  }
75564
75566
  updateSettings() {
75565
75567
  localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
@@ -29,7 +29,6 @@ export interface BaseItemData {
29
29
  linkTo?: string;
30
30
  childIds?: string[];
31
31
  parent?: string;
32
- opacity?: number;
33
32
  [key: string]: unknown;
34
33
  }
35
34
  export type SerializedItemData<T extends BaseItemData = BaseItemData> = T & {
@@ -54,7 +53,6 @@ export declare class BaseItem<T extends BaseItem<any> = any> implements Geometry
54
53
  shouldUseRelativeAlignment: boolean;
55
54
  resizeEnabled: boolean;
56
55
  onlyProportionalResize: boolean;
57
- opacity: number;
58
56
  itemType: ItemType;
59
57
  childIds: string[];
60
58
  isHoverHighlighted: boolean;
@@ -23,6 +23,7 @@ export interface DrawingData {
23
23
  strokeStyle: ColorValue | string;
24
24
  strokeWidth: number;
25
25
  colorRole?: ColorRole;
26
+ borderOpacity?: number;
26
27
  opacity?: number;
27
28
  linkTo?: string;
28
29
  [key: string]: unknown;
@@ -39,6 +40,7 @@ export declare class Drawing extends BaseItem<Drawing> {
39
40
  borderStyle: BorderStyle;
40
41
  colorRole: ColorRole;
41
42
  private linePattern;
43
+ private borderOpacity;
42
44
  transformationRenderBlock?: boolean;
43
45
  points: Point[];
44
46
  constructor(board: Board, id?: string);
@@ -37,6 +37,7 @@ export declare const DrawingDataSchema: z.ZodObject<{
37
37
  background: "background";
38
38
  foreground: "foreground";
39
39
  }>>;
40
+ borderOpacity: z.ZodOptional<z.ZodNumber>;
40
41
  opacity: z.ZodOptional<z.ZodNumber>;
41
42
  linkTo: z.ZodOptional<z.ZodString>;
42
43
  }, z.core.$strip>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.14.27",
3
+ "version": "0.14.29",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",