microboard-temp 0.14.45 → 0.14.47

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.
@@ -35438,6 +35438,7 @@ function underline(ctx, textBlock) {
35438
35438
  const width = measure.width - (textBlock.marginLeft || 0);
35439
35439
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35440
35440
  ctx.lineWidth = textBlock.fontSize / 14;
35441
+ ctx.setLineDash([]);
35441
35442
  ctx.beginPath();
35442
35443
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
35443
35444
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -35457,6 +35458,7 @@ function cross(ctx, textBlock) {
35457
35458
  const height = measure.height;
35458
35459
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35459
35460
  ctx.lineWidth = textBlock.fontSize / 14;
35461
+ ctx.setLineDash([]);
35460
35462
  ctx.beginPath();
35461
35463
  ctx.moveTo(x, y - height / 4);
35462
35464
  ctx.lineTo(x + width, y - height / 4);
@@ -50146,15 +50148,7 @@ var CONNECTOR_POINTER_TYPES = [
50146
50148
  ];
50147
50149
 
50148
50150
  // src/Items/Connector/ConnectorOverlay.ts
50149
- var COLOR_PALETTE = [
50150
- "#111111",
50151
- "#FFFFFF",
50152
- "#FF6B6B",
50153
- "#FFD166",
50154
- "#06D6A0",
50155
- "#118AB2",
50156
- "#7B61FF"
50157
- ];
50151
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
50158
50152
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
50159
50153
  var lineStyleAssetIcons = {
50160
50154
  straight: connectorAssetIcon("LineStraight"),
@@ -64510,16 +64504,7 @@ function transformShape({
64510
64504
  }
64511
64505
 
64512
64506
  // src/Items/Shape/ShapeOverlay.ts
64513
- var COLOR_PALETTE2 = [
64514
- "#111111",
64515
- "#FFFFFF",
64516
- "#FF6B6B",
64517
- "#FFD166",
64518
- "#06D6A0",
64519
- "#118AB2",
64520
- "#7B61FF",
64521
- "transparent"
64522
- ];
64507
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
64523
64508
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
64524
64509
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
64525
64510
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -64896,6 +64881,25 @@ class Shape extends BaseItem {
64896
64881
  this.subject.publish(this);
64897
64882
  }
64898
64883
  onPropertyUpdated(property, value, prevValue) {
64884
+ switch (property) {
64885
+ case "shapeType":
64886
+ this.initPath();
64887
+ break;
64888
+ case "backgroundOpacity":
64889
+ this.path.setBackgroundOpacity(value);
64890
+ break;
64891
+ case "borderOpacity":
64892
+ this.path.setBorderOpacity(value);
64893
+ break;
64894
+ case "borderStyle":
64895
+ this.path.setBorderStyle(value);
64896
+ break;
64897
+ case "borderWidth":
64898
+ this.path.setBorderWidth(value);
64899
+ break;
64900
+ default:
64901
+ break;
64902
+ }
64899
64903
  super.onPropertyUpdated(property, value, prevValue);
64900
64904
  this.saveShapeData();
64901
64905
  }
@@ -70199,14 +70203,7 @@ class AddDice extends ShapeTool {
70199
70203
  }
70200
70204
 
70201
70205
  // src/Items/Dice/DiceOverlay.ts
70202
- var COLOR_PALETTE3 = [
70203
- "#FFFFFF",
70204
- "#111111",
70205
- "#FF4444",
70206
- "#44BB44",
70207
- "#4466FF",
70208
- "#FFDD00"
70209
- ];
70206
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
70210
70207
  var diceOverlay = {
70211
70208
  itemType: "Dice",
70212
70209
  actions: [
@@ -70619,12 +70616,7 @@ class AddPouch extends ShapeTool {
70619
70616
  }
70620
70617
 
70621
70618
  // src/Items/Screen/ScreenOverlay.ts
70622
- var SCREEN_PALETTE = [
70623
- "#FFFFFF",
70624
- "#F0F0F0",
70625
- "#222222",
70626
- "transparent"
70627
- ];
70619
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
70628
70620
  var screenOverlay = {
70629
70621
  itemType: "Screen",
70630
70622
  actions: [
@@ -70665,7 +70657,7 @@ var screenOverlay = {
70665
70657
  valueSource: { kind: "itemProperty", property: "borderColor" },
70666
70658
  editor: {
70667
70659
  kind: "color",
70668
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
70660
+ palette: SCREEN_PALETTE,
70669
70661
  allowTransparent: true,
70670
70662
  presentation: "square"
70671
70663
  },
@@ -73920,6 +73912,8 @@ class Presence {
73920
73912
  }
73921
73913
 
73922
73914
  // src/Selection/SelectionOverlay.ts
73915
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
73916
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
73923
73917
  function everyItemHasRichText(items) {
73924
73918
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
73925
73919
  }
@@ -74049,7 +74043,7 @@ registerSelectionAction({
74049
74043
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
74050
74044
  editor: {
74051
74045
  kind: "color",
74052
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
74046
+ palette: SEMANTIC_COLOR_PALETTE
74053
74047
  },
74054
74048
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
74055
74049
  }
@@ -74072,7 +74066,7 @@ registerSelectionAction({
74072
74066
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
74073
74067
  editor: {
74074
74068
  kind: "color",
74075
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
74069
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
74076
74070
  },
74077
74071
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
74078
74072
  }
@@ -78874,15 +78868,7 @@ class AddConnector extends BoardTool {
78874
78868
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
78875
78869
 
78876
78870
  // src/Items/Drawing/DrawingOverlay.ts
78877
- var COLOR_PALETTE4 = [
78878
- "#111111",
78879
- "#FF6B6B",
78880
- "#FFD166",
78881
- "#06D6A0",
78882
- "#118AB2",
78883
- "#7B61FF",
78884
- "transparent"
78885
- ];
78871
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
78886
78872
  var strokeControls2 = [
78887
78873
  {
78888
78874
  id: "strokeColor",
package/dist/cjs/index.js CHANGED
@@ -35438,6 +35438,7 @@ function underline(ctx, textBlock) {
35438
35438
  const width = measure.width - (textBlock.marginLeft || 0);
35439
35439
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35440
35440
  ctx.lineWidth = textBlock.fontSize / 14;
35441
+ ctx.setLineDash([]);
35441
35442
  ctx.beginPath();
35442
35443
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
35443
35444
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -35457,6 +35458,7 @@ function cross(ctx, textBlock) {
35457
35458
  const height = measure.height;
35458
35459
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35459
35460
  ctx.lineWidth = textBlock.fontSize / 14;
35461
+ ctx.setLineDash([]);
35460
35462
  ctx.beginPath();
35461
35463
  ctx.moveTo(x, y - height / 4);
35462
35464
  ctx.lineTo(x + width, y - height / 4);
@@ -50146,15 +50148,7 @@ var CONNECTOR_POINTER_TYPES = [
50146
50148
  ];
50147
50149
 
50148
50150
  // src/Items/Connector/ConnectorOverlay.ts
50149
- var COLOR_PALETTE = [
50150
- "#111111",
50151
- "#FFFFFF",
50152
- "#FF6B6B",
50153
- "#FFD166",
50154
- "#06D6A0",
50155
- "#118AB2",
50156
- "#7B61FF"
50157
- ];
50151
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
50158
50152
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
50159
50153
  var lineStyleAssetIcons = {
50160
50154
  straight: connectorAssetIcon("LineStraight"),
@@ -64510,16 +64504,7 @@ function transformShape({
64510
64504
  }
64511
64505
 
64512
64506
  // src/Items/Shape/ShapeOverlay.ts
64513
- var COLOR_PALETTE2 = [
64514
- "#111111",
64515
- "#FFFFFF",
64516
- "#FF6B6B",
64517
- "#FFD166",
64518
- "#06D6A0",
64519
- "#118AB2",
64520
- "#7B61FF",
64521
- "transparent"
64522
- ];
64507
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
64523
64508
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
64524
64509
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
64525
64510
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -64896,6 +64881,25 @@ class Shape extends BaseItem {
64896
64881
  this.subject.publish(this);
64897
64882
  }
64898
64883
  onPropertyUpdated(property, value, prevValue) {
64884
+ switch (property) {
64885
+ case "shapeType":
64886
+ this.initPath();
64887
+ break;
64888
+ case "backgroundOpacity":
64889
+ this.path.setBackgroundOpacity(value);
64890
+ break;
64891
+ case "borderOpacity":
64892
+ this.path.setBorderOpacity(value);
64893
+ break;
64894
+ case "borderStyle":
64895
+ this.path.setBorderStyle(value);
64896
+ break;
64897
+ case "borderWidth":
64898
+ this.path.setBorderWidth(value);
64899
+ break;
64900
+ default:
64901
+ break;
64902
+ }
64899
64903
  super.onPropertyUpdated(property, value, prevValue);
64900
64904
  this.saveShapeData();
64901
64905
  }
@@ -70199,14 +70203,7 @@ class AddDice extends ShapeTool {
70199
70203
  }
70200
70204
 
70201
70205
  // src/Items/Dice/DiceOverlay.ts
70202
- var COLOR_PALETTE3 = [
70203
- "#FFFFFF",
70204
- "#111111",
70205
- "#FF4444",
70206
- "#44BB44",
70207
- "#4466FF",
70208
- "#FFDD00"
70209
- ];
70206
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
70210
70207
  var diceOverlay = {
70211
70208
  itemType: "Dice",
70212
70209
  actions: [
@@ -70619,12 +70616,7 @@ class AddPouch extends ShapeTool {
70619
70616
  }
70620
70617
 
70621
70618
  // src/Items/Screen/ScreenOverlay.ts
70622
- var SCREEN_PALETTE = [
70623
- "#FFFFFF",
70624
- "#F0F0F0",
70625
- "#222222",
70626
- "transparent"
70627
- ];
70619
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
70628
70620
  var screenOverlay = {
70629
70621
  itemType: "Screen",
70630
70622
  actions: [
@@ -70665,7 +70657,7 @@ var screenOverlay = {
70665
70657
  valueSource: { kind: "itemProperty", property: "borderColor" },
70666
70658
  editor: {
70667
70659
  kind: "color",
70668
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
70660
+ palette: SCREEN_PALETTE,
70669
70661
  allowTransparent: true,
70670
70662
  presentation: "square"
70671
70663
  },
@@ -73920,6 +73912,8 @@ class Presence {
73920
73912
  }
73921
73913
 
73922
73914
  // src/Selection/SelectionOverlay.ts
73915
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
73916
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
73923
73917
  function everyItemHasRichText(items) {
73924
73918
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
73925
73919
  }
@@ -74049,7 +74043,7 @@ registerSelectionAction({
74049
74043
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
74050
74044
  editor: {
74051
74045
  kind: "color",
74052
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
74046
+ palette: SEMANTIC_COLOR_PALETTE
74053
74047
  },
74054
74048
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
74055
74049
  }
@@ -74072,7 +74066,7 @@ registerSelectionAction({
74072
74066
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
74073
74067
  editor: {
74074
74068
  kind: "color",
74075
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
74069
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
74076
74070
  },
74077
74071
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
74078
74072
  }
@@ -78874,15 +78868,7 @@ class AddConnector extends BoardTool {
78874
78868
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
78875
78869
 
78876
78870
  // src/Items/Drawing/DrawingOverlay.ts
78877
- var COLOR_PALETTE4 = [
78878
- "#111111",
78879
- "#FF6B6B",
78880
- "#FFD166",
78881
- "#06D6A0",
78882
- "#118AB2",
78883
- "#7B61FF",
78884
- "transparent"
78885
- ];
78871
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
78886
78872
  var strokeControls2 = [
78887
78873
  {
78888
78874
  id: "strokeColor",
package/dist/cjs/node.js CHANGED
@@ -36474,6 +36474,7 @@ function underline(ctx, textBlock) {
36474
36474
  const width = measure.width - (textBlock.marginLeft || 0);
36475
36475
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
36476
36476
  ctx.lineWidth = textBlock.fontSize / 14;
36477
+ ctx.setLineDash([]);
36477
36478
  ctx.beginPath();
36478
36479
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
36479
36480
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -36493,6 +36494,7 @@ function cross(ctx, textBlock) {
36493
36494
  const height = measure.height;
36494
36495
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
36495
36496
  ctx.lineWidth = textBlock.fontSize / 14;
36497
+ ctx.setLineDash([]);
36496
36498
  ctx.beginPath();
36497
36499
  ctx.moveTo(x, y - height / 4);
36498
36500
  ctx.lineTo(x + width, y - height / 4);
@@ -52618,15 +52620,7 @@ var CONNECTOR_POINTER_TYPES = [
52618
52620
  ];
52619
52621
 
52620
52622
  // src/Items/Connector/ConnectorOverlay.ts
52621
- var COLOR_PALETTE = [
52622
- "#111111",
52623
- "#FFFFFF",
52624
- "#FF6B6B",
52625
- "#FFD166",
52626
- "#06D6A0",
52627
- "#118AB2",
52628
- "#7B61FF"
52629
- ];
52623
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
52630
52624
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
52631
52625
  var lineStyleAssetIcons = {
52632
52626
  straight: connectorAssetIcon("LineStraight"),
@@ -66983,16 +66977,7 @@ function transformShape({
66983
66977
  }
66984
66978
 
66985
66979
  // src/Items/Shape/ShapeOverlay.ts
66986
- var COLOR_PALETTE2 = [
66987
- "#111111",
66988
- "#FFFFFF",
66989
- "#FF6B6B",
66990
- "#FFD166",
66991
- "#06D6A0",
66992
- "#118AB2",
66993
- "#7B61FF",
66994
- "transparent"
66995
- ];
66980
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
66996
66981
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
66997
66982
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
66998
66983
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -67369,6 +67354,25 @@ class Shape extends BaseItem {
67369
67354
  this.subject.publish(this);
67370
67355
  }
67371
67356
  onPropertyUpdated(property, value, prevValue) {
67357
+ switch (property) {
67358
+ case "shapeType":
67359
+ this.initPath();
67360
+ break;
67361
+ case "backgroundOpacity":
67362
+ this.path.setBackgroundOpacity(value);
67363
+ break;
67364
+ case "borderOpacity":
67365
+ this.path.setBorderOpacity(value);
67366
+ break;
67367
+ case "borderStyle":
67368
+ this.path.setBorderStyle(value);
67369
+ break;
67370
+ case "borderWidth":
67371
+ this.path.setBorderWidth(value);
67372
+ break;
67373
+ default:
67374
+ break;
67375
+ }
67372
67376
  super.onPropertyUpdated(property, value, prevValue);
67373
67377
  this.saveShapeData();
67374
67378
  }
@@ -72672,14 +72676,7 @@ class AddDice extends ShapeTool {
72672
72676
  }
72673
72677
 
72674
72678
  // src/Items/Dice/DiceOverlay.ts
72675
- var COLOR_PALETTE3 = [
72676
- "#FFFFFF",
72677
- "#111111",
72678
- "#FF4444",
72679
- "#44BB44",
72680
- "#4466FF",
72681
- "#FFDD00"
72682
- ];
72679
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
72683
72680
  var diceOverlay = {
72684
72681
  itemType: "Dice",
72685
72682
  actions: [
@@ -73092,12 +73089,7 @@ class AddPouch extends ShapeTool {
73092
73089
  }
73093
73090
 
73094
73091
  // src/Items/Screen/ScreenOverlay.ts
73095
- var SCREEN_PALETTE = [
73096
- "#FFFFFF",
73097
- "#F0F0F0",
73098
- "#222222",
73099
- "transparent"
73100
- ];
73092
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
73101
73093
  var screenOverlay = {
73102
73094
  itemType: "Screen",
73103
73095
  actions: [
@@ -73138,7 +73130,7 @@ var screenOverlay = {
73138
73130
  valueSource: { kind: "itemProperty", property: "borderColor" },
73139
73131
  editor: {
73140
73132
  kind: "color",
73141
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
73133
+ palette: SCREEN_PALETTE,
73142
73134
  allowTransparent: true,
73143
73135
  presentation: "square"
73144
73136
  },
@@ -76393,6 +76385,8 @@ class Presence {
76393
76385
  }
76394
76386
 
76395
76387
  // src/Selection/SelectionOverlay.ts
76388
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
76389
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
76396
76390
  function everyItemHasRichText(items) {
76397
76391
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
76398
76392
  }
@@ -76522,7 +76516,7 @@ registerSelectionAction({
76522
76516
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
76523
76517
  editor: {
76524
76518
  kind: "color",
76525
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
76519
+ palette: SEMANTIC_COLOR_PALETTE
76526
76520
  },
76527
76521
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
76528
76522
  }
@@ -76545,7 +76539,7 @@ registerSelectionAction({
76545
76539
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
76546
76540
  editor: {
76547
76541
  kind: "color",
76548
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
76542
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
76549
76543
  },
76550
76544
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
76551
76545
  }
@@ -81347,15 +81341,7 @@ class AddConnector extends BoardTool {
81347
81341
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
81348
81342
 
81349
81343
  // src/Items/Drawing/DrawingOverlay.ts
81350
- var COLOR_PALETTE4 = [
81351
- "#111111",
81352
- "#FF6B6B",
81353
- "#FFD166",
81354
- "#06D6A0",
81355
- "#118AB2",
81356
- "#7B61FF",
81357
- "transparent"
81358
- ];
81344
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
81359
81345
  var strokeControls2 = [
81360
81346
  {
81361
81347
  id: "strokeColor",
@@ -35207,6 +35207,7 @@ function underline(ctx, textBlock) {
35207
35207
  const width = measure.width - (textBlock.marginLeft || 0);
35208
35208
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35209
35209
  ctx.lineWidth = textBlock.fontSize / 14;
35210
+ ctx.setLineDash([]);
35210
35211
  ctx.beginPath();
35211
35212
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
35212
35213
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -35226,6 +35227,7 @@ function cross(ctx, textBlock) {
35226
35227
  const height = measure.height;
35227
35228
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35228
35229
  ctx.lineWidth = textBlock.fontSize / 14;
35230
+ ctx.setLineDash([]);
35229
35231
  ctx.beginPath();
35230
35232
  ctx.moveTo(x, y - height / 4);
35231
35233
  ctx.lineTo(x + width, y - height / 4);
@@ -49919,15 +49921,7 @@ var CONNECTOR_POINTER_TYPES = [
49919
49921
  ];
49920
49922
 
49921
49923
  // src/Items/Connector/ConnectorOverlay.ts
49922
- var COLOR_PALETTE = [
49923
- "#111111",
49924
- "#FFFFFF",
49925
- "#FF6B6B",
49926
- "#FFD166",
49927
- "#06D6A0",
49928
- "#118AB2",
49929
- "#7B61FF"
49930
- ];
49924
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
49931
49925
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
49932
49926
  var lineStyleAssetIcons = {
49933
49927
  straight: connectorAssetIcon("LineStraight"),
@@ -64283,16 +64277,7 @@ function transformShape({
64283
64277
  }
64284
64278
 
64285
64279
  // src/Items/Shape/ShapeOverlay.ts
64286
- var COLOR_PALETTE2 = [
64287
- "#111111",
64288
- "#FFFFFF",
64289
- "#FF6B6B",
64290
- "#FFD166",
64291
- "#06D6A0",
64292
- "#118AB2",
64293
- "#7B61FF",
64294
- "transparent"
64295
- ];
64280
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
64296
64281
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
64297
64282
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
64298
64283
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -64669,6 +64654,25 @@ class Shape extends BaseItem {
64669
64654
  this.subject.publish(this);
64670
64655
  }
64671
64656
  onPropertyUpdated(property, value, prevValue) {
64657
+ switch (property) {
64658
+ case "shapeType":
64659
+ this.initPath();
64660
+ break;
64661
+ case "backgroundOpacity":
64662
+ this.path.setBackgroundOpacity(value);
64663
+ break;
64664
+ case "borderOpacity":
64665
+ this.path.setBorderOpacity(value);
64666
+ break;
64667
+ case "borderStyle":
64668
+ this.path.setBorderStyle(value);
64669
+ break;
64670
+ case "borderWidth":
64671
+ this.path.setBorderWidth(value);
64672
+ break;
64673
+ default:
64674
+ break;
64675
+ }
64672
64676
  super.onPropertyUpdated(property, value, prevValue);
64673
64677
  this.saveShapeData();
64674
64678
  }
@@ -69972,14 +69976,7 @@ class AddDice extends ShapeTool {
69972
69976
  }
69973
69977
 
69974
69978
  // src/Items/Dice/DiceOverlay.ts
69975
- var COLOR_PALETTE3 = [
69976
- "#FFFFFF",
69977
- "#111111",
69978
- "#FF4444",
69979
- "#44BB44",
69980
- "#4466FF",
69981
- "#FFDD00"
69982
- ];
69979
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
69983
69980
  var diceOverlay = {
69984
69981
  itemType: "Dice",
69985
69982
  actions: [
@@ -70392,12 +70389,7 @@ class AddPouch extends ShapeTool {
70392
70389
  }
70393
70390
 
70394
70391
  // src/Items/Screen/ScreenOverlay.ts
70395
- var SCREEN_PALETTE = [
70396
- "#FFFFFF",
70397
- "#F0F0F0",
70398
- "#222222",
70399
- "transparent"
70400
- ];
70392
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
70401
70393
  var screenOverlay = {
70402
70394
  itemType: "Screen",
70403
70395
  actions: [
@@ -70438,7 +70430,7 @@ var screenOverlay = {
70438
70430
  valueSource: { kind: "itemProperty", property: "borderColor" },
70439
70431
  editor: {
70440
70432
  kind: "color",
70441
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
70433
+ palette: SCREEN_PALETTE,
70442
70434
  allowTransparent: true,
70443
70435
  presentation: "square"
70444
70436
  },
@@ -73693,6 +73685,8 @@ class Presence {
73693
73685
  }
73694
73686
 
73695
73687
  // src/Selection/SelectionOverlay.ts
73688
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
73689
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
73696
73690
  function everyItemHasRichText(items) {
73697
73691
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
73698
73692
  }
@@ -73822,7 +73816,7 @@ registerSelectionAction({
73822
73816
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
73823
73817
  editor: {
73824
73818
  kind: "color",
73825
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
73819
+ palette: SEMANTIC_COLOR_PALETTE
73826
73820
  },
73827
73821
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
73828
73822
  }
@@ -73845,7 +73839,7 @@ registerSelectionAction({
73845
73839
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
73846
73840
  editor: {
73847
73841
  kind: "color",
73848
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
73842
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
73849
73843
  },
73850
73844
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
73851
73845
  }
@@ -78647,15 +78641,7 @@ class AddConnector extends BoardTool {
78647
78641
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
78648
78642
 
78649
78643
  // src/Items/Drawing/DrawingOverlay.ts
78650
- var COLOR_PALETTE4 = [
78651
- "#111111",
78652
- "#FF6B6B",
78653
- "#FFD166",
78654
- "#06D6A0",
78655
- "#118AB2",
78656
- "#7B61FF",
78657
- "transparent"
78658
- ];
78644
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
78659
78645
  var strokeControls2 = [
78660
78646
  {
78661
78647
  id: "strokeColor",
package/dist/esm/index.js CHANGED
@@ -35200,6 +35200,7 @@ function underline(ctx, textBlock) {
35200
35200
  const width = measure.width - (textBlock.marginLeft || 0);
35201
35201
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35202
35202
  ctx.lineWidth = textBlock.fontSize / 14;
35203
+ ctx.setLineDash([]);
35203
35204
  ctx.beginPath();
35204
35205
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
35205
35206
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -35219,6 +35220,7 @@ function cross(ctx, textBlock) {
35219
35220
  const height = measure.height;
35220
35221
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35221
35222
  ctx.lineWidth = textBlock.fontSize / 14;
35223
+ ctx.setLineDash([]);
35222
35224
  ctx.beginPath();
35223
35225
  ctx.moveTo(x, y - height / 4);
35224
35226
  ctx.lineTo(x + width, y - height / 4);
@@ -49912,15 +49914,7 @@ var CONNECTOR_POINTER_TYPES = [
49912
49914
  ];
49913
49915
 
49914
49916
  // src/Items/Connector/ConnectorOverlay.ts
49915
- var COLOR_PALETTE = [
49916
- "#111111",
49917
- "#FFFFFF",
49918
- "#FF6B6B",
49919
- "#FFD166",
49920
- "#06D6A0",
49921
- "#118AB2",
49922
- "#7B61FF"
49923
- ];
49917
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
49924
49918
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
49925
49919
  var lineStyleAssetIcons = {
49926
49920
  straight: connectorAssetIcon("LineStraight"),
@@ -64276,16 +64270,7 @@ function transformShape({
64276
64270
  }
64277
64271
 
64278
64272
  // src/Items/Shape/ShapeOverlay.ts
64279
- var COLOR_PALETTE2 = [
64280
- "#111111",
64281
- "#FFFFFF",
64282
- "#FF6B6B",
64283
- "#FFD166",
64284
- "#06D6A0",
64285
- "#118AB2",
64286
- "#7B61FF",
64287
- "transparent"
64288
- ];
64273
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
64289
64274
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
64290
64275
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
64291
64276
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -64662,6 +64647,25 @@ class Shape extends BaseItem {
64662
64647
  this.subject.publish(this);
64663
64648
  }
64664
64649
  onPropertyUpdated(property, value, prevValue) {
64650
+ switch (property) {
64651
+ case "shapeType":
64652
+ this.initPath();
64653
+ break;
64654
+ case "backgroundOpacity":
64655
+ this.path.setBackgroundOpacity(value);
64656
+ break;
64657
+ case "borderOpacity":
64658
+ this.path.setBorderOpacity(value);
64659
+ break;
64660
+ case "borderStyle":
64661
+ this.path.setBorderStyle(value);
64662
+ break;
64663
+ case "borderWidth":
64664
+ this.path.setBorderWidth(value);
64665
+ break;
64666
+ default:
64667
+ break;
64668
+ }
64665
64669
  super.onPropertyUpdated(property, value, prevValue);
64666
64670
  this.saveShapeData();
64667
64671
  }
@@ -69965,14 +69969,7 @@ class AddDice extends ShapeTool {
69965
69969
  }
69966
69970
 
69967
69971
  // src/Items/Dice/DiceOverlay.ts
69968
- var COLOR_PALETTE3 = [
69969
- "#FFFFFF",
69970
- "#111111",
69971
- "#FF4444",
69972
- "#44BB44",
69973
- "#4466FF",
69974
- "#FFDD00"
69975
- ];
69972
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
69976
69973
  var diceOverlay = {
69977
69974
  itemType: "Dice",
69978
69975
  actions: [
@@ -70385,12 +70382,7 @@ class AddPouch extends ShapeTool {
70385
70382
  }
70386
70383
 
70387
70384
  // src/Items/Screen/ScreenOverlay.ts
70388
- var SCREEN_PALETTE = [
70389
- "#FFFFFF",
70390
- "#F0F0F0",
70391
- "#222222",
70392
- "transparent"
70393
- ];
70385
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
70394
70386
  var screenOverlay = {
70395
70387
  itemType: "Screen",
70396
70388
  actions: [
@@ -70431,7 +70423,7 @@ var screenOverlay = {
70431
70423
  valueSource: { kind: "itemProperty", property: "borderColor" },
70432
70424
  editor: {
70433
70425
  kind: "color",
70434
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
70426
+ palette: SCREEN_PALETTE,
70435
70427
  allowTransparent: true,
70436
70428
  presentation: "square"
70437
70429
  },
@@ -73686,6 +73678,8 @@ class Presence {
73686
73678
  }
73687
73679
 
73688
73680
  // src/Selection/SelectionOverlay.ts
73681
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
73682
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
73689
73683
  function everyItemHasRichText(items) {
73690
73684
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
73691
73685
  }
@@ -73815,7 +73809,7 @@ registerSelectionAction({
73815
73809
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
73816
73810
  editor: {
73817
73811
  kind: "color",
73818
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
73812
+ palette: SEMANTIC_COLOR_PALETTE
73819
73813
  },
73820
73814
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
73821
73815
  }
@@ -73838,7 +73832,7 @@ registerSelectionAction({
73838
73832
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
73839
73833
  editor: {
73840
73834
  kind: "color",
73841
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
73835
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
73842
73836
  },
73843
73837
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
73844
73838
  }
@@ -78640,15 +78634,7 @@ class AddConnector extends BoardTool {
78640
78634
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
78641
78635
 
78642
78636
  // src/Items/Drawing/DrawingOverlay.ts
78643
- var COLOR_PALETTE4 = [
78644
- "#111111",
78645
- "#FF6B6B",
78646
- "#FFD166",
78647
- "#06D6A0",
78648
- "#118AB2",
78649
- "#7B61FF",
78650
- "transparent"
78651
- ];
78637
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
78652
78638
  var strokeControls2 = [
78653
78639
  {
78654
78640
  id: "strokeColor",
package/dist/esm/node.js CHANGED
@@ -35983,6 +35983,7 @@ function underline(ctx, textBlock) {
35983
35983
  const width = measure.width - (textBlock.marginLeft || 0);
35984
35984
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
35985
35985
  ctx.lineWidth = textBlock.fontSize / 14;
35986
+ ctx.setLineDash([]);
35986
35987
  ctx.beginPath();
35987
35988
  ctx.moveTo(x, y + 2 * textBlock.fontSize / 14);
35988
35989
  ctx.lineTo(x + width, y + 2 * textBlock.fontSize / 14);
@@ -36002,6 +36003,7 @@ function cross(ctx, textBlock) {
36002
36003
  const height = measure.height;
36003
36004
  ctx.strokeStyle = resolveColor(style.color, conf.theme, "foreground");
36004
36005
  ctx.lineWidth = textBlock.fontSize / 14;
36006
+ ctx.setLineDash([]);
36005
36007
  ctx.beginPath();
36006
36008
  ctx.moveTo(x, y - height / 4);
36007
36009
  ctx.lineTo(x + width, y - height / 4);
@@ -52379,15 +52381,7 @@ var CONNECTOR_POINTER_TYPES = [
52379
52381
  ];
52380
52382
 
52381
52383
  // src/Items/Connector/ConnectorOverlay.ts
52382
- var COLOR_PALETTE = [
52383
- "#111111",
52384
- "#FFFFFF",
52385
- "#FF6B6B",
52386
- "#FFD166",
52387
- "#06D6A0",
52388
- "#118AB2",
52389
- "#7B61FF"
52390
- ];
52384
+ var COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
52391
52385
  var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
52392
52386
  var lineStyleAssetIcons = {
52393
52387
  straight: connectorAssetIcon("LineStraight"),
@@ -66744,16 +66738,7 @@ function transformShape({
66744
66738
  }
66745
66739
 
66746
66740
  // src/Items/Shape/ShapeOverlay.ts
66747
- var COLOR_PALETTE2 = [
66748
- "#111111",
66749
- "#FFFFFF",
66750
- "#FF6B6B",
66751
- "#FFD166",
66752
- "#06D6A0",
66753
- "#118AB2",
66754
- "#7B61FF",
66755
- "transparent"
66756
- ];
66741
+ var COLOR_PALETTE2 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
66757
66742
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
66758
66743
  var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
66759
66744
  var shapeSymbolIcon = (key) => symbolIcon(key);
@@ -67130,6 +67115,25 @@ class Shape extends BaseItem {
67130
67115
  this.subject.publish(this);
67131
67116
  }
67132
67117
  onPropertyUpdated(property, value, prevValue) {
67118
+ switch (property) {
67119
+ case "shapeType":
67120
+ this.initPath();
67121
+ break;
67122
+ case "backgroundOpacity":
67123
+ this.path.setBackgroundOpacity(value);
67124
+ break;
67125
+ case "borderOpacity":
67126
+ this.path.setBorderOpacity(value);
67127
+ break;
67128
+ case "borderStyle":
67129
+ this.path.setBorderStyle(value);
67130
+ break;
67131
+ case "borderWidth":
67132
+ this.path.setBorderWidth(value);
67133
+ break;
67134
+ default:
67135
+ break;
67136
+ }
67133
67137
  super.onPropertyUpdated(property, value, prevValue);
67134
67138
  this.saveShapeData();
67135
67139
  }
@@ -72433,14 +72437,7 @@ class AddDice extends ShapeTool {
72433
72437
  }
72434
72438
 
72435
72439
  // src/Items/Dice/DiceOverlay.ts
72436
- var COLOR_PALETTE3 = [
72437
- "#FFFFFF",
72438
- "#111111",
72439
- "#FF4444",
72440
- "#44BB44",
72441
- "#4466FF",
72442
- "#FFDD00"
72443
- ];
72440
+ var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
72444
72441
  var diceOverlay = {
72445
72442
  itemType: "Dice",
72446
72443
  actions: [
@@ -72853,12 +72850,7 @@ class AddPouch extends ShapeTool {
72853
72850
  }
72854
72851
 
72855
72852
  // src/Items/Screen/ScreenOverlay.ts
72856
- var SCREEN_PALETTE = [
72857
- "#FFFFFF",
72858
- "#F0F0F0",
72859
- "#222222",
72860
- "transparent"
72861
- ];
72853
+ var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
72862
72854
  var screenOverlay = {
72863
72855
  itemType: "Screen",
72864
72856
  actions: [
@@ -72899,7 +72891,7 @@ var screenOverlay = {
72899
72891
  valueSource: { kind: "itemProperty", property: "borderColor" },
72900
72892
  editor: {
72901
72893
  kind: "color",
72902
- palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
72894
+ palette: SCREEN_PALETTE,
72903
72895
  allowTransparent: true,
72904
72896
  presentation: "square"
72905
72897
  },
@@ -76154,6 +76146,8 @@ class Presence {
76154
76146
  }
76155
76147
 
76156
76148
  // src/Selection/SelectionOverlay.ts
76149
+ var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
76150
+ var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
76157
76151
  function everyItemHasRichText(items) {
76158
76152
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
76159
76153
  }
@@ -76283,7 +76277,7 @@ registerSelectionAction({
76283
76277
  valueSource: { kind: "selectionProperty", property: "getFontColor" },
76284
76278
  editor: {
76285
76279
  kind: "color",
76286
- palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
76280
+ palette: SEMANTIC_COLOR_PALETTE
76287
76281
  },
76288
76282
  invoke: { kind: "selectionMethod", methodName: "setFontColor" }
76289
76283
  }
@@ -76306,7 +76300,7 @@ registerSelectionAction({
76306
76300
  valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
76307
76301
  editor: {
76308
76302
  kind: "color",
76309
- palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
76303
+ palette: SEMANTIC_HIGHLIGHT_PALETTE
76310
76304
  },
76311
76305
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
76312
76306
  }
@@ -81108,15 +81102,7 @@ class AddConnector extends BoardTool {
81108
81102
  registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
81109
81103
 
81110
81104
  // src/Items/Drawing/DrawingOverlay.ts
81111
- var COLOR_PALETTE4 = [
81112
- "#111111",
81113
- "#FF6B6B",
81114
- "#FFD166",
81115
- "#06D6A0",
81116
- "#118AB2",
81117
- "#7B61FF",
81118
- "transparent"
81119
- ];
81105
+ var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
81120
81106
  var strokeControls2 = [
81121
81107
  {
81122
81108
  id: "strokeColor",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.14.45",
3
+ "version": "0.14.47",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",