microboard-temp 0.14.46 → 0.14.48
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/browser.js +15 -49
- package/dist/cjs/index.js +15 -49
- package/dist/cjs/node.js +15 -49
- package/dist/esm/browser.js +15 -49
- package/dist/esm/index.js +15 -49
- package/dist/esm/node.js +15 -49
- package/package.json +1 -1
package/dist/cjs/browser.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"),
|
|
@@ -50189,11 +50183,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
50189
50183
|
value: pointer,
|
|
50190
50184
|
icon: pointerAssetIcons[pointer]
|
|
50191
50185
|
}));
|
|
50192
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
50186
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
50193
50187
|
id: style,
|
|
50194
50188
|
label: style,
|
|
50195
50189
|
value: style,
|
|
50196
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
50190
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
50197
50191
|
}));
|
|
50198
50192
|
var connectorStyleControls = [
|
|
50199
50193
|
{
|
|
@@ -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);
|
|
@@ -64569,8 +64554,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
64569
64554
|
var BORDER_STYLE_OPTIONS = [
|
|
64570
64555
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
64571
64556
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
64572
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64573
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
64557
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64574
64558
|
];
|
|
64575
64559
|
var shapeTypeControl = {
|
|
64576
64560
|
id: "shapeType",
|
|
@@ -70218,14 +70202,7 @@ class AddDice extends ShapeTool {
|
|
|
70218
70202
|
}
|
|
70219
70203
|
|
|
70220
70204
|
// src/Items/Dice/DiceOverlay.ts
|
|
70221
|
-
var COLOR_PALETTE3 =
|
|
70222
|
-
"#FFFFFF",
|
|
70223
|
-
"#111111",
|
|
70224
|
-
"#FF4444",
|
|
70225
|
-
"#44BB44",
|
|
70226
|
-
"#4466FF",
|
|
70227
|
-
"#FFDD00"
|
|
70228
|
-
];
|
|
70205
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
70229
70206
|
var diceOverlay = {
|
|
70230
70207
|
itemType: "Dice",
|
|
70231
70208
|
actions: [
|
|
@@ -70638,12 +70615,7 @@ class AddPouch extends ShapeTool {
|
|
|
70638
70615
|
}
|
|
70639
70616
|
|
|
70640
70617
|
// src/Items/Screen/ScreenOverlay.ts
|
|
70641
|
-
var SCREEN_PALETTE = [
|
|
70642
|
-
"#FFFFFF",
|
|
70643
|
-
"#F0F0F0",
|
|
70644
|
-
"#222222",
|
|
70645
|
-
"transparent"
|
|
70646
|
-
];
|
|
70618
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
70647
70619
|
var screenOverlay = {
|
|
70648
70620
|
itemType: "Screen",
|
|
70649
70621
|
actions: [
|
|
@@ -70684,7 +70656,7 @@ var screenOverlay = {
|
|
|
70684
70656
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
70685
70657
|
editor: {
|
|
70686
70658
|
kind: "color",
|
|
70687
|
-
palette:
|
|
70659
|
+
palette: SCREEN_PALETTE,
|
|
70688
70660
|
allowTransparent: true,
|
|
70689
70661
|
presentation: "square"
|
|
70690
70662
|
},
|
|
@@ -73939,6 +73911,8 @@ class Presence {
|
|
|
73939
73911
|
}
|
|
73940
73912
|
|
|
73941
73913
|
// src/Selection/SelectionOverlay.ts
|
|
73914
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
73915
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
73942
73916
|
function everyItemHasRichText(items) {
|
|
73943
73917
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73944
73918
|
}
|
|
@@ -74068,7 +74042,7 @@ registerSelectionAction({
|
|
|
74068
74042
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
74069
74043
|
editor: {
|
|
74070
74044
|
kind: "color",
|
|
74071
|
-
palette:
|
|
74045
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
74072
74046
|
},
|
|
74073
74047
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
74074
74048
|
}
|
|
@@ -74091,7 +74065,7 @@ registerSelectionAction({
|
|
|
74091
74065
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
74092
74066
|
editor: {
|
|
74093
74067
|
kind: "color",
|
|
74094
|
-
palette:
|
|
74068
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
74095
74069
|
},
|
|
74096
74070
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
74097
74071
|
}
|
|
@@ -78893,15 +78867,7 @@ class AddConnector extends BoardTool {
|
|
|
78893
78867
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
78894
78868
|
|
|
78895
78869
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
78896
|
-
var COLOR_PALETTE4 = [
|
|
78897
|
-
"#111111",
|
|
78898
|
-
"#FF6B6B",
|
|
78899
|
-
"#FFD166",
|
|
78900
|
-
"#06D6A0",
|
|
78901
|
-
"#118AB2",
|
|
78902
|
-
"#7B61FF",
|
|
78903
|
-
"transparent"
|
|
78904
|
-
];
|
|
78870
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
78905
78871
|
var strokeControls2 = [
|
|
78906
78872
|
{
|
|
78907
78873
|
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"),
|
|
@@ -50189,11 +50183,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
50189
50183
|
value: pointer,
|
|
50190
50184
|
icon: pointerAssetIcons[pointer]
|
|
50191
50185
|
}));
|
|
50192
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
50186
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
50193
50187
|
id: style,
|
|
50194
50188
|
label: style,
|
|
50195
50189
|
value: style,
|
|
50196
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
50190
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
50197
50191
|
}));
|
|
50198
50192
|
var connectorStyleControls = [
|
|
50199
50193
|
{
|
|
@@ -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);
|
|
@@ -64569,8 +64554,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
64569
64554
|
var BORDER_STYLE_OPTIONS = [
|
|
64570
64555
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
64571
64556
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
64572
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64573
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
64557
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64574
64558
|
];
|
|
64575
64559
|
var shapeTypeControl = {
|
|
64576
64560
|
id: "shapeType",
|
|
@@ -70218,14 +70202,7 @@ class AddDice extends ShapeTool {
|
|
|
70218
70202
|
}
|
|
70219
70203
|
|
|
70220
70204
|
// src/Items/Dice/DiceOverlay.ts
|
|
70221
|
-
var COLOR_PALETTE3 =
|
|
70222
|
-
"#FFFFFF",
|
|
70223
|
-
"#111111",
|
|
70224
|
-
"#FF4444",
|
|
70225
|
-
"#44BB44",
|
|
70226
|
-
"#4466FF",
|
|
70227
|
-
"#FFDD00"
|
|
70228
|
-
];
|
|
70205
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
70229
70206
|
var diceOverlay = {
|
|
70230
70207
|
itemType: "Dice",
|
|
70231
70208
|
actions: [
|
|
@@ -70638,12 +70615,7 @@ class AddPouch extends ShapeTool {
|
|
|
70638
70615
|
}
|
|
70639
70616
|
|
|
70640
70617
|
// src/Items/Screen/ScreenOverlay.ts
|
|
70641
|
-
var SCREEN_PALETTE = [
|
|
70642
|
-
"#FFFFFF",
|
|
70643
|
-
"#F0F0F0",
|
|
70644
|
-
"#222222",
|
|
70645
|
-
"transparent"
|
|
70646
|
-
];
|
|
70618
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
70647
70619
|
var screenOverlay = {
|
|
70648
70620
|
itemType: "Screen",
|
|
70649
70621
|
actions: [
|
|
@@ -70684,7 +70656,7 @@ var screenOverlay = {
|
|
|
70684
70656
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
70685
70657
|
editor: {
|
|
70686
70658
|
kind: "color",
|
|
70687
|
-
palette:
|
|
70659
|
+
palette: SCREEN_PALETTE,
|
|
70688
70660
|
allowTransparent: true,
|
|
70689
70661
|
presentation: "square"
|
|
70690
70662
|
},
|
|
@@ -73939,6 +73911,8 @@ class Presence {
|
|
|
73939
73911
|
}
|
|
73940
73912
|
|
|
73941
73913
|
// src/Selection/SelectionOverlay.ts
|
|
73914
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
73915
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
73942
73916
|
function everyItemHasRichText(items) {
|
|
73943
73917
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73944
73918
|
}
|
|
@@ -74068,7 +74042,7 @@ registerSelectionAction({
|
|
|
74068
74042
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
74069
74043
|
editor: {
|
|
74070
74044
|
kind: "color",
|
|
74071
|
-
palette:
|
|
74045
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
74072
74046
|
},
|
|
74073
74047
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
74074
74048
|
}
|
|
@@ -74091,7 +74065,7 @@ registerSelectionAction({
|
|
|
74091
74065
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
74092
74066
|
editor: {
|
|
74093
74067
|
kind: "color",
|
|
74094
|
-
palette:
|
|
74068
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
74095
74069
|
},
|
|
74096
74070
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
74097
74071
|
}
|
|
@@ -78893,15 +78867,7 @@ class AddConnector extends BoardTool {
|
|
|
78893
78867
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
78894
78868
|
|
|
78895
78869
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
78896
|
-
var COLOR_PALETTE4 = [
|
|
78897
|
-
"#111111",
|
|
78898
|
-
"#FF6B6B",
|
|
78899
|
-
"#FFD166",
|
|
78900
|
-
"#06D6A0",
|
|
78901
|
-
"#118AB2",
|
|
78902
|
-
"#7B61FF",
|
|
78903
|
-
"transparent"
|
|
78904
|
-
];
|
|
78870
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
78905
78871
|
var strokeControls2 = [
|
|
78906
78872
|
{
|
|
78907
78873
|
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"),
|
|
@@ -52661,11 +52655,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
52661
52655
|
value: pointer,
|
|
52662
52656
|
icon: pointerAssetIcons[pointer]
|
|
52663
52657
|
}));
|
|
52664
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
52658
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
52665
52659
|
id: style,
|
|
52666
52660
|
label: style,
|
|
52667
52661
|
value: style,
|
|
52668
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
52662
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
52669
52663
|
}));
|
|
52670
52664
|
var connectorStyleControls = [
|
|
52671
52665
|
{
|
|
@@ -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);
|
|
@@ -67042,8 +67027,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
67042
67027
|
var BORDER_STYLE_OPTIONS = [
|
|
67043
67028
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
67044
67029
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
67045
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
67046
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
67030
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
67047
67031
|
];
|
|
67048
67032
|
var shapeTypeControl = {
|
|
67049
67033
|
id: "shapeType",
|
|
@@ -72691,14 +72675,7 @@ class AddDice extends ShapeTool {
|
|
|
72691
72675
|
}
|
|
72692
72676
|
|
|
72693
72677
|
// src/Items/Dice/DiceOverlay.ts
|
|
72694
|
-
var COLOR_PALETTE3 =
|
|
72695
|
-
"#FFFFFF",
|
|
72696
|
-
"#111111",
|
|
72697
|
-
"#FF4444",
|
|
72698
|
-
"#44BB44",
|
|
72699
|
-
"#4466FF",
|
|
72700
|
-
"#FFDD00"
|
|
72701
|
-
];
|
|
72678
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
72702
72679
|
var diceOverlay = {
|
|
72703
72680
|
itemType: "Dice",
|
|
72704
72681
|
actions: [
|
|
@@ -73111,12 +73088,7 @@ class AddPouch extends ShapeTool {
|
|
|
73111
73088
|
}
|
|
73112
73089
|
|
|
73113
73090
|
// src/Items/Screen/ScreenOverlay.ts
|
|
73114
|
-
var SCREEN_PALETTE = [
|
|
73115
|
-
"#FFFFFF",
|
|
73116
|
-
"#F0F0F0",
|
|
73117
|
-
"#222222",
|
|
73118
|
-
"transparent"
|
|
73119
|
-
];
|
|
73091
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
73120
73092
|
var screenOverlay = {
|
|
73121
73093
|
itemType: "Screen",
|
|
73122
73094
|
actions: [
|
|
@@ -73157,7 +73129,7 @@ var screenOverlay = {
|
|
|
73157
73129
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
73158
73130
|
editor: {
|
|
73159
73131
|
kind: "color",
|
|
73160
|
-
palette:
|
|
73132
|
+
palette: SCREEN_PALETTE,
|
|
73161
73133
|
allowTransparent: true,
|
|
73162
73134
|
presentation: "square"
|
|
73163
73135
|
},
|
|
@@ -76412,6 +76384,8 @@ class Presence {
|
|
|
76412
76384
|
}
|
|
76413
76385
|
|
|
76414
76386
|
// src/Selection/SelectionOverlay.ts
|
|
76387
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
76388
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
76415
76389
|
function everyItemHasRichText(items) {
|
|
76416
76390
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
76417
76391
|
}
|
|
@@ -76541,7 +76515,7 @@ registerSelectionAction({
|
|
|
76541
76515
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
76542
76516
|
editor: {
|
|
76543
76517
|
kind: "color",
|
|
76544
|
-
palette:
|
|
76518
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
76545
76519
|
},
|
|
76546
76520
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
76547
76521
|
}
|
|
@@ -76564,7 +76538,7 @@ registerSelectionAction({
|
|
|
76564
76538
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
76565
76539
|
editor: {
|
|
76566
76540
|
kind: "color",
|
|
76567
|
-
palette:
|
|
76541
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
76568
76542
|
},
|
|
76569
76543
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
76570
76544
|
}
|
|
@@ -81366,15 +81340,7 @@ class AddConnector extends BoardTool {
|
|
|
81366
81340
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
81367
81341
|
|
|
81368
81342
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
81369
|
-
var COLOR_PALETTE4 = [
|
|
81370
|
-
"#111111",
|
|
81371
|
-
"#FF6B6B",
|
|
81372
|
-
"#FFD166",
|
|
81373
|
-
"#06D6A0",
|
|
81374
|
-
"#118AB2",
|
|
81375
|
-
"#7B61FF",
|
|
81376
|
-
"transparent"
|
|
81377
|
-
];
|
|
81343
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
81378
81344
|
var strokeControls2 = [
|
|
81379
81345
|
{
|
|
81380
81346
|
id: "strokeColor",
|
package/dist/esm/browser.js
CHANGED
|
@@ -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"),
|
|
@@ -49962,11 +49956,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
49962
49956
|
value: pointer,
|
|
49963
49957
|
icon: pointerAssetIcons[pointer]
|
|
49964
49958
|
}));
|
|
49965
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
49959
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
49966
49960
|
id: style,
|
|
49967
49961
|
label: style,
|
|
49968
49962
|
value: style,
|
|
49969
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
49963
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
49970
49964
|
}));
|
|
49971
49965
|
var connectorStyleControls = [
|
|
49972
49966
|
{
|
|
@@ -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);
|
|
@@ -64342,8 +64327,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
64342
64327
|
var BORDER_STYLE_OPTIONS = [
|
|
64343
64328
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
64344
64329
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
64345
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64346
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
64330
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64347
64331
|
];
|
|
64348
64332
|
var shapeTypeControl = {
|
|
64349
64333
|
id: "shapeType",
|
|
@@ -69991,14 +69975,7 @@ class AddDice extends ShapeTool {
|
|
|
69991
69975
|
}
|
|
69992
69976
|
|
|
69993
69977
|
// src/Items/Dice/DiceOverlay.ts
|
|
69994
|
-
var COLOR_PALETTE3 =
|
|
69995
|
-
"#FFFFFF",
|
|
69996
|
-
"#111111",
|
|
69997
|
-
"#FF4444",
|
|
69998
|
-
"#44BB44",
|
|
69999
|
-
"#4466FF",
|
|
70000
|
-
"#FFDD00"
|
|
70001
|
-
];
|
|
69978
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
70002
69979
|
var diceOverlay = {
|
|
70003
69980
|
itemType: "Dice",
|
|
70004
69981
|
actions: [
|
|
@@ -70411,12 +70388,7 @@ class AddPouch extends ShapeTool {
|
|
|
70411
70388
|
}
|
|
70412
70389
|
|
|
70413
70390
|
// src/Items/Screen/ScreenOverlay.ts
|
|
70414
|
-
var SCREEN_PALETTE = [
|
|
70415
|
-
"#FFFFFF",
|
|
70416
|
-
"#F0F0F0",
|
|
70417
|
-
"#222222",
|
|
70418
|
-
"transparent"
|
|
70419
|
-
];
|
|
70391
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
70420
70392
|
var screenOverlay = {
|
|
70421
70393
|
itemType: "Screen",
|
|
70422
70394
|
actions: [
|
|
@@ -70457,7 +70429,7 @@ var screenOverlay = {
|
|
|
70457
70429
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
70458
70430
|
editor: {
|
|
70459
70431
|
kind: "color",
|
|
70460
|
-
palette:
|
|
70432
|
+
palette: SCREEN_PALETTE,
|
|
70461
70433
|
allowTransparent: true,
|
|
70462
70434
|
presentation: "square"
|
|
70463
70435
|
},
|
|
@@ -73712,6 +73684,8 @@ class Presence {
|
|
|
73712
73684
|
}
|
|
73713
73685
|
|
|
73714
73686
|
// src/Selection/SelectionOverlay.ts
|
|
73687
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
73688
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
73715
73689
|
function everyItemHasRichText(items) {
|
|
73716
73690
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73717
73691
|
}
|
|
@@ -73841,7 +73815,7 @@ registerSelectionAction({
|
|
|
73841
73815
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
73842
73816
|
editor: {
|
|
73843
73817
|
kind: "color",
|
|
73844
|
-
palette:
|
|
73818
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
73845
73819
|
},
|
|
73846
73820
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
73847
73821
|
}
|
|
@@ -73864,7 +73838,7 @@ registerSelectionAction({
|
|
|
73864
73838
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
73865
73839
|
editor: {
|
|
73866
73840
|
kind: "color",
|
|
73867
|
-
palette:
|
|
73841
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
73868
73842
|
},
|
|
73869
73843
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
73870
73844
|
}
|
|
@@ -78666,15 +78640,7 @@ class AddConnector extends BoardTool {
|
|
|
78666
78640
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
78667
78641
|
|
|
78668
78642
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
78669
|
-
var COLOR_PALETTE4 = [
|
|
78670
|
-
"#111111",
|
|
78671
|
-
"#FF6B6B",
|
|
78672
|
-
"#FFD166",
|
|
78673
|
-
"#06D6A0",
|
|
78674
|
-
"#118AB2",
|
|
78675
|
-
"#7B61FF",
|
|
78676
|
-
"transparent"
|
|
78677
|
-
];
|
|
78643
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
78678
78644
|
var strokeControls2 = [
|
|
78679
78645
|
{
|
|
78680
78646
|
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"),
|
|
@@ -49955,11 +49949,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
49955
49949
|
value: pointer,
|
|
49956
49950
|
icon: pointerAssetIcons[pointer]
|
|
49957
49951
|
}));
|
|
49958
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
49952
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
49959
49953
|
id: style,
|
|
49960
49954
|
label: style,
|
|
49961
49955
|
value: style,
|
|
49962
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
49956
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
49963
49957
|
}));
|
|
49964
49958
|
var connectorStyleControls = [
|
|
49965
49959
|
{
|
|
@@ -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);
|
|
@@ -64335,8 +64320,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
64335
64320
|
var BORDER_STYLE_OPTIONS = [
|
|
64336
64321
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
64337
64322
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
64338
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64339
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
64323
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
64340
64324
|
];
|
|
64341
64325
|
var shapeTypeControl = {
|
|
64342
64326
|
id: "shapeType",
|
|
@@ -69984,14 +69968,7 @@ class AddDice extends ShapeTool {
|
|
|
69984
69968
|
}
|
|
69985
69969
|
|
|
69986
69970
|
// src/Items/Dice/DiceOverlay.ts
|
|
69987
|
-
var COLOR_PALETTE3 =
|
|
69988
|
-
"#FFFFFF",
|
|
69989
|
-
"#111111",
|
|
69990
|
-
"#FF4444",
|
|
69991
|
-
"#44BB44",
|
|
69992
|
-
"#4466FF",
|
|
69993
|
-
"#FFDD00"
|
|
69994
|
-
];
|
|
69971
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
69995
69972
|
var diceOverlay = {
|
|
69996
69973
|
itemType: "Dice",
|
|
69997
69974
|
actions: [
|
|
@@ -70404,12 +70381,7 @@ class AddPouch extends ShapeTool {
|
|
|
70404
70381
|
}
|
|
70405
70382
|
|
|
70406
70383
|
// src/Items/Screen/ScreenOverlay.ts
|
|
70407
|
-
var SCREEN_PALETTE = [
|
|
70408
|
-
"#FFFFFF",
|
|
70409
|
-
"#F0F0F0",
|
|
70410
|
-
"#222222",
|
|
70411
|
-
"transparent"
|
|
70412
|
-
];
|
|
70384
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
70413
70385
|
var screenOverlay = {
|
|
70414
70386
|
itemType: "Screen",
|
|
70415
70387
|
actions: [
|
|
@@ -70450,7 +70422,7 @@ var screenOverlay = {
|
|
|
70450
70422
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
70451
70423
|
editor: {
|
|
70452
70424
|
kind: "color",
|
|
70453
|
-
palette:
|
|
70425
|
+
palette: SCREEN_PALETTE,
|
|
70454
70426
|
allowTransparent: true,
|
|
70455
70427
|
presentation: "square"
|
|
70456
70428
|
},
|
|
@@ -73705,6 +73677,8 @@ class Presence {
|
|
|
73705
73677
|
}
|
|
73706
73678
|
|
|
73707
73679
|
// src/Selection/SelectionOverlay.ts
|
|
73680
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
73681
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
73708
73682
|
function everyItemHasRichText(items) {
|
|
73709
73683
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73710
73684
|
}
|
|
@@ -73834,7 +73808,7 @@ registerSelectionAction({
|
|
|
73834
73808
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
73835
73809
|
editor: {
|
|
73836
73810
|
kind: "color",
|
|
73837
|
-
palette:
|
|
73811
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
73838
73812
|
},
|
|
73839
73813
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
73840
73814
|
}
|
|
@@ -73857,7 +73831,7 @@ registerSelectionAction({
|
|
|
73857
73831
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
73858
73832
|
editor: {
|
|
73859
73833
|
kind: "color",
|
|
73860
|
-
palette:
|
|
73834
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
73861
73835
|
},
|
|
73862
73836
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
73863
73837
|
}
|
|
@@ -78659,15 +78633,7 @@ class AddConnector extends BoardTool {
|
|
|
78659
78633
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
78660
78634
|
|
|
78661
78635
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
78662
|
-
var COLOR_PALETTE4 = [
|
|
78663
|
-
"#111111",
|
|
78664
|
-
"#FF6B6B",
|
|
78665
|
-
"#FFD166",
|
|
78666
|
-
"#06D6A0",
|
|
78667
|
-
"#118AB2",
|
|
78668
|
-
"#7B61FF",
|
|
78669
|
-
"transparent"
|
|
78670
|
-
];
|
|
78636
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
78671
78637
|
var strokeControls2 = [
|
|
78672
78638
|
{
|
|
78673
78639
|
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"),
|
|
@@ -52422,11 +52416,11 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
|
|
|
52422
52416
|
value: pointer,
|
|
52423
52417
|
icon: pointerAssetIcons[pointer]
|
|
52424
52418
|
}));
|
|
52425
|
-
var borderStyleOptions = ["solid", "dot", "dash"
|
|
52419
|
+
var borderStyleOptions = ["solid", "dot", "dash"].map((style) => ({
|
|
52426
52420
|
id: style,
|
|
52427
52421
|
label: style,
|
|
52428
52422
|
value: style,
|
|
52429
|
-
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" :
|
|
52423
|
+
icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : "src/Items/Shape/icons/StrokeDash.icon.svg")
|
|
52430
52424
|
}));
|
|
52431
52425
|
var connectorStyleControls = [
|
|
52432
52426
|
{
|
|
@@ -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);
|
|
@@ -66803,8 +66788,7 @@ var SHAPE_CATALOG_OPTIONS = [
|
|
|
66803
66788
|
var BORDER_STYLE_OPTIONS = [
|
|
66804
66789
|
{ id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
|
|
66805
66790
|
{ id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
|
|
66806
|
-
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
66807
|
-
{ id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
|
|
66791
|
+
{ id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") }
|
|
66808
66792
|
];
|
|
66809
66793
|
var shapeTypeControl = {
|
|
66810
66794
|
id: "shapeType",
|
|
@@ -72452,14 +72436,7 @@ class AddDice extends ShapeTool {
|
|
|
72452
72436
|
}
|
|
72453
72437
|
|
|
72454
72438
|
// src/Items/Dice/DiceOverlay.ts
|
|
72455
|
-
var COLOR_PALETTE3 =
|
|
72456
|
-
"#FFFFFF",
|
|
72457
|
-
"#111111",
|
|
72458
|
-
"#FF4444",
|
|
72459
|
-
"#44BB44",
|
|
72460
|
-
"#4466FF",
|
|
72461
|
-
"#FFDD00"
|
|
72462
|
-
];
|
|
72439
|
+
var COLOR_PALETTE3 = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
72463
72440
|
var diceOverlay = {
|
|
72464
72441
|
itemType: "Dice",
|
|
72465
72442
|
actions: [
|
|
@@ -72872,12 +72849,7 @@ class AddPouch extends ShapeTool {
|
|
|
72872
72849
|
}
|
|
72873
72850
|
|
|
72874
72851
|
// src/Items/Screen/ScreenOverlay.ts
|
|
72875
|
-
var SCREEN_PALETTE = [
|
|
72876
|
-
"#FFFFFF",
|
|
72877
|
-
"#F0F0F0",
|
|
72878
|
-
"#222222",
|
|
72879
|
-
"transparent"
|
|
72880
|
-
];
|
|
72852
|
+
var SCREEN_PALETTE = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
72881
72853
|
var screenOverlay = {
|
|
72882
72854
|
itemType: "Screen",
|
|
72883
72855
|
actions: [
|
|
@@ -72918,7 +72890,7 @@ var screenOverlay = {
|
|
|
72918
72890
|
valueSource: { kind: "itemProperty", property: "borderColor" },
|
|
72919
72891
|
editor: {
|
|
72920
72892
|
kind: "color",
|
|
72921
|
-
palette:
|
|
72893
|
+
palette: SCREEN_PALETTE,
|
|
72922
72894
|
allowTransparent: true,
|
|
72923
72895
|
presentation: "square"
|
|
72924
72896
|
},
|
|
@@ -76173,6 +76145,8 @@ class Presence {
|
|
|
76173
76145
|
}
|
|
76174
76146
|
|
|
76175
76147
|
// src/Selection/SelectionOverlay.ts
|
|
76148
|
+
var SEMANTIC_COLOR_PALETTE = CONTRAST_PALETTE_LIST.map((pair) => pair.id);
|
|
76149
|
+
var SEMANTIC_HIGHLIGHT_PALETTE = ["transparent", ...SEMANTIC_COLOR_PALETTE];
|
|
76176
76150
|
function everyItemHasRichText(items) {
|
|
76177
76151
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
76178
76152
|
}
|
|
@@ -76302,7 +76276,7 @@ registerSelectionAction({
|
|
|
76302
76276
|
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
76303
76277
|
editor: {
|
|
76304
76278
|
kind: "color",
|
|
76305
|
-
palette:
|
|
76279
|
+
palette: SEMANTIC_COLOR_PALETTE
|
|
76306
76280
|
},
|
|
76307
76281
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
76308
76282
|
}
|
|
@@ -76325,7 +76299,7 @@ registerSelectionAction({
|
|
|
76325
76299
|
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
76326
76300
|
editor: {
|
|
76327
76301
|
kind: "color",
|
|
76328
|
-
palette:
|
|
76302
|
+
palette: SEMANTIC_HIGHLIGHT_PALETTE
|
|
76329
76303
|
},
|
|
76330
76304
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
76331
76305
|
}
|
|
@@ -81127,15 +81101,7 @@ class AddConnector extends BoardTool {
|
|
|
81127
81101
|
registerTool({ name: "AddConnector", tool: AddConnector, overlay: addConnectorToolOverlay });
|
|
81128
81102
|
|
|
81129
81103
|
// src/Items/Drawing/DrawingOverlay.ts
|
|
81130
|
-
var COLOR_PALETTE4 = [
|
|
81131
|
-
"#111111",
|
|
81132
|
-
"#FF6B6B",
|
|
81133
|
-
"#FFD166",
|
|
81134
|
-
"#06D6A0",
|
|
81135
|
-
"#118AB2",
|
|
81136
|
-
"#7B61FF",
|
|
81137
|
-
"transparent"
|
|
81138
|
-
];
|
|
81104
|
+
var COLOR_PALETTE4 = [...CONTRAST_PALETTE_LIST.map((pair) => pair.id), "transparent"];
|
|
81139
81105
|
var strokeControls2 = [
|
|
81140
81106
|
{
|
|
81141
81107
|
id: "strokeColor",
|