microboard-temp 0.14.20 → 0.14.22
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 +287 -62
- package/dist/cjs/index.js +287 -62
- package/dist/cjs/node.js +287 -62
- package/dist/cjs/overlayIconManifest.js +115 -0
- package/dist/esm/browser.js +287 -62
- package/dist/esm/index.js +287 -62
- package/dist/esm/node.js +287 -62
- package/dist/esm/overlayIconManifest.js +113 -0
- package/dist/overlay-icons/Items/Card/icons/Flip.icon.svg +1 -0
- package/dist/overlay-icons/Items/Card/icons/RotateCcw.icon.svg +1 -0
- package/dist/overlay-icons/Items/Card/icons/RotateCw.icon.svg +1 -0
- package/dist/overlay-icons/Items/Card/icons/Tool.icon.svg +7 -0
- package/dist/overlay-icons/Items/Connector/icons/LineCurved.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/LineOrthogonal.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/LineStraight.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerArrowHeavy.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerArrowThin.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerCircleFilled.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerCircleOutline.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerDiamondFilled.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerDiamondOutline.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerNone.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerTriangleFilled.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/PointerTriangleOutline.icon.svg +1 -0
- package/dist/overlay-icons/Items/Connector/icons/SmartJump.icon.svg +3 -0
- package/dist/overlay-icons/Items/Connector/icons/Style.icon.svg +5 -0
- package/dist/overlay-icons/Items/Connector/icons/SwitchPointers.icon.svg +4 -0
- package/dist/overlay-icons/Items/Connector/icons/Tool.icon.svg +3 -0
- package/dist/overlay-icons/Items/Deck/icons/CreateFromSelection.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/DrawBottom.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/DrawMany.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/DrawRandom.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/DrawTop.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/Flip.icon.svg +1 -0
- package/dist/overlay-icons/Items/Deck/icons/Shuffle.icon.svg +1 -0
- package/dist/overlay-icons/Items/Dice/icons/Range.icon.svg +1 -0
- package/dist/overlay-icons/Items/Dice/icons/Throw.icon.svg +1 -0
- package/dist/overlay-icons/Items/Dice/icons/Tool.icon.svg +1 -0
- package/dist/overlay-icons/Items/Drawing/icons/Eraser.icon.svg +3 -0
- package/dist/overlay-icons/Items/Drawing/icons/Highlighter.icon.svg +3 -0
- package/dist/overlay-icons/Items/Drawing/icons/Pen.icon.svg +3 -0
- package/dist/overlay-icons/Items/Frame/Basic/1-1/1-1.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/16-9/16-9.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/3-2/3-2.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/4-3/4-3.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/9-18/9-18.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/A4/A4.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Basic/Custom/Custom.icon.svg +14 -0
- package/dist/overlay-icons/Items/Frame/Basic/Letter/Letter.icon.svg +1 -0
- package/dist/overlay-icons/Items/Frame/Frame.icon.svg +1 -0
- package/dist/overlay-icons/Items/Placeholder/Placeholder.icon.svg +4 -0
- package/dist/overlay-icons/Items/RichText/icons/FontSize.icon.svg +3 -0
- package/dist/overlay-icons/Items/RichText/icons/Text.icon.svg +3 -0
- package/dist/overlay-icons/Items/Screen/icons/Background.icon.svg +1 -0
- package/dist/overlay-icons/Items/Screen/icons/BackgroundImage.icon.svg +1 -0
- package/dist/overlay-icons/Items/Screen/icons/BackgroundImageRemove.icon.svg +1 -0
- package/dist/overlay-icons/Items/Screen/icons/Pouch.icon.svg +1 -0
- package/dist/overlay-icons/Items/Screen/icons/Tool.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Annotation/BPMN_Annotation.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_DataObject/BPMN_DataObject.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_DataStore/BPMN_DataStore.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_EndEvent/BPMN_EndEvent.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_EventSubprocess/BPMN_EventSubprocess.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Gateway/BPMN_Gateway.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_GatewayParallel/BPMN_GatewayParallel.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_GatewayXOR/BPMN_GatewayXOR.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Group/BPMN_Group.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_IntermediateEvent/BPMN_IntermediateEvent.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_IntermediateEventNoneInterrupting/BPMN_IntermediateEventNoneInterrupting.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Participant/BPMN_Participant.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_StartEvent/BPMN_StartEvent.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_StartEventNoneInterrupting/BPMN_StartEventNoneInterrupting.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Task/BPMN_Task.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Transaction/BPMN_Transaction.icon.svg +1 -0
- package/dist/overlay-icons/Items/Shape/Basic/ArrowLeft/ArrowLeft.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/ArrowLeftRight/ArrowLeftRight.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/ArrowRight/ArrowRight.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/BracesLeft/BracesLeft.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/BracesRight/BracesRight.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Circle/Circle.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Cloud/Cloud.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Cross/Cross.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Cylinder/Cylinder.icon.svg +19 -0
- package/dist/overlay-icons/Items/Shape/Basic/Hexagon/Hexagon.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Octagon/Octagon.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Parallelogram/Parallelogram.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Pentagon/Pentagon.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Rectangle/Rectangle.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Rhombus/Rhombus.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/RoundedRectangle/RoundedRectangle.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/SpeachBubble/SpeachBubble.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Star/Star.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Trapezoid/Trapezoid.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/Basic/Triangle/Triangle.icon.svg +14 -0
- package/dist/overlay-icons/Items/Shape/icons/ArrowBlockLeft.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/ArrowBlockRight.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/Color.icon.svg +4 -0
- package/dist/overlay-icons/Items/Shape/icons/Fill.icon.svg +4 -0
- package/dist/overlay-icons/Items/Shape/icons/PredefinedProcess.icon.svg +4 -0
- package/dist/overlay-icons/Items/Shape/icons/ReversedParallelogram.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/ReversedTriangle.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/Stroke.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/StrokeDash.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/StrokeDot.icon.svg +5 -0
- package/dist/overlay-icons/Items/Shape/icons/StrokeLongDash.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/StrokeSolid.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/Tool.icon.svg +3 -0
- package/dist/overlay-icons/Items/Shape/icons/Type.icon.svg +5 -0
- package/dist/overlay-icons/Items/Sticker/Path/Sticker.icon.svg +14 -0
- package/dist/overlay-icons/Overlay/icons/BringToFront.icon.svg +5 -0
- package/dist/overlay-icons/Overlay/icons/Delete.icon.svg +7 -0
- package/dist/overlay-icons/Overlay/icons/Duplicate.icon.svg +4 -0
- package/dist/overlay-icons/Overlay/icons/Lock.icon.svg +4 -0
- package/dist/overlay-icons/Overlay/icons/SendToBack.icon.svg +5 -0
- package/dist/overlay-icons/Overlay/icons/Unlock.icon.svg +4 -0
- package/dist/overlay-icons/Overlay/overlay-icons.svg +323 -0
- package/dist/types/Items/Card/CardOverlay.d.ts +2 -1
- package/dist/types/Overlay/IconPack.d.ts +4 -2
- package/dist/types/Overlay/OverlayMetadata.d.ts +24 -0
- package/dist/types/Overlay/overlayRegistry.d.ts +1 -0
- package/dist/types/Selection/SelectionOverlay.d.ts +1 -0
- package/dist/types/Selection/index.d.ts +1 -0
- package/dist/types/Tools/WorkflowTool.d.ts +8 -0
- package/dist/types/Tools/index.d.ts +1 -0
- package/dist/types/overlayIconManifest.d.ts +2 -0
- package/package.json +8 -2
package/dist/esm/index.js
CHANGED
|
@@ -11492,7 +11492,11 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
|
|
|
11492
11492
|
}
|
|
11493
11493
|
}
|
|
11494
11494
|
// src/Overlay/IconPack.ts
|
|
11495
|
-
var
|
|
11495
|
+
var OVERLAY_ICON_ASSET_PREFIX = "overlay-icons/";
|
|
11496
|
+
var OVERLAY_ICON_SPRITE_PATH = normalizeOverlayIconAssetPath("src/Overlay/overlay-icons.svg");
|
|
11497
|
+
function normalizeOverlayIconAssetPath(sourcePath) {
|
|
11498
|
+
return sourcePath.startsWith("src/") ? `${OVERLAY_ICON_ASSET_PREFIX}${sourcePath.slice(4)}` : sourcePath;
|
|
11499
|
+
}
|
|
11496
11500
|
function overlaySymbolIcon(key) {
|
|
11497
11501
|
return {
|
|
11498
11502
|
kind: "symbol",
|
|
@@ -11500,15 +11504,18 @@ function overlaySymbolIcon(key) {
|
|
|
11500
11504
|
sourcePath: OVERLAY_ICON_SPRITE_PATH
|
|
11501
11505
|
};
|
|
11502
11506
|
}
|
|
11503
|
-
function overlayAssetIcon(
|
|
11507
|
+
function overlayAssetIcon(sourcePath, state) {
|
|
11508
|
+
const path2 = normalizeOverlayIconAssetPath(sourcePath);
|
|
11504
11509
|
return state ? {
|
|
11505
11510
|
kind: "asset",
|
|
11506
11511
|
path: path2,
|
|
11512
|
+
sourcePath,
|
|
11507
11513
|
mimeType: "image/svg+xml",
|
|
11508
11514
|
state
|
|
11509
11515
|
} : {
|
|
11510
11516
|
kind: "asset",
|
|
11511
11517
|
path: path2,
|
|
11518
|
+
sourcePath,
|
|
11512
11519
|
mimeType: "image/svg+xml"
|
|
11513
11520
|
};
|
|
11514
11521
|
}
|
|
@@ -11668,10 +11675,23 @@ function compareEntriesByOrder(a, b) {
|
|
|
11668
11675
|
return aOrder - bOrder || aLabel.localeCompare(bLabel);
|
|
11669
11676
|
}
|
|
11670
11677
|
function readOverlayValueSource(context, source) {
|
|
11678
|
+
if (source.kind === "selectionProperty") {
|
|
11679
|
+
return readOverlayContextProperty(context.selection, source.property);
|
|
11680
|
+
}
|
|
11671
11681
|
if (source.kind === "itemProperty") {
|
|
11672
|
-
return context.item
|
|
11682
|
+
return readOverlayContextProperty(context.item, source.property);
|
|
11683
|
+
}
|
|
11684
|
+
return readOverlayContextProperty(context.tool, source.property);
|
|
11685
|
+
}
|
|
11686
|
+
function readOverlayContextProperty(target, property) {
|
|
11687
|
+
if (!target) {
|
|
11688
|
+
return;
|
|
11689
|
+
}
|
|
11690
|
+
const value = target[property];
|
|
11691
|
+
if (typeof value === "function") {
|
|
11692
|
+
return value.call(target);
|
|
11673
11693
|
}
|
|
11674
|
-
return
|
|
11694
|
+
return value;
|
|
11675
11695
|
}
|
|
11676
11696
|
// src/Items/BaseItem/BaseItem.ts
|
|
11677
11697
|
class BaseItem {
|
|
@@ -62813,6 +62833,10 @@ class Drawing extends BaseItem {
|
|
|
62813
62833
|
this.path2d = new conf.path2DFactory;
|
|
62814
62834
|
const context = this.path2d;
|
|
62815
62835
|
const points = this.points;
|
|
62836
|
+
if (points.length === 0) {
|
|
62837
|
+
this.untransformedMbr = new Mbr;
|
|
62838
|
+
return;
|
|
62839
|
+
}
|
|
62816
62840
|
if (points.length < 3) {
|
|
62817
62841
|
context.arc(points[0].x, points[0].y, 0.5, 0, Math.PI * 2, true);
|
|
62818
62842
|
context.closePath();
|
|
@@ -62863,6 +62887,9 @@ class Drawing extends BaseItem {
|
|
|
62863
62887
|
}
|
|
62864
62888
|
}
|
|
62865
62889
|
optimizePoints() {
|
|
62890
|
+
if (this.points.length === 0) {
|
|
62891
|
+
return;
|
|
62892
|
+
}
|
|
62866
62893
|
const dp = douglasPeucker(this.points, 1);
|
|
62867
62894
|
dp.push(this.points[this.points.length - 1]);
|
|
62868
62895
|
this.points = dp;
|
|
@@ -63148,6 +63175,68 @@ var propertyOps = {
|
|
|
63148
63175
|
}
|
|
63149
63176
|
};
|
|
63150
63177
|
|
|
63178
|
+
// src/Tools/Tool.ts
|
|
63179
|
+
class Tool {
|
|
63180
|
+
leftButtonDown() {
|
|
63181
|
+
return false;
|
|
63182
|
+
}
|
|
63183
|
+
leftButtonUp() {
|
|
63184
|
+
return false;
|
|
63185
|
+
}
|
|
63186
|
+
leftButtonDouble() {
|
|
63187
|
+
return false;
|
|
63188
|
+
}
|
|
63189
|
+
rightButtonDown() {
|
|
63190
|
+
return false;
|
|
63191
|
+
}
|
|
63192
|
+
rightButtonUp() {
|
|
63193
|
+
return false;
|
|
63194
|
+
}
|
|
63195
|
+
rightButtonDouble() {
|
|
63196
|
+
return false;
|
|
63197
|
+
}
|
|
63198
|
+
middleButtonDown() {
|
|
63199
|
+
return false;
|
|
63200
|
+
}
|
|
63201
|
+
middleButtonUp() {
|
|
63202
|
+
return false;
|
|
63203
|
+
}
|
|
63204
|
+
middleButtonDouble() {
|
|
63205
|
+
return false;
|
|
63206
|
+
}
|
|
63207
|
+
keyDown(_key) {
|
|
63208
|
+
return false;
|
|
63209
|
+
}
|
|
63210
|
+
keyUp(_key) {
|
|
63211
|
+
return false;
|
|
63212
|
+
}
|
|
63213
|
+
pointerMoveBy(_x, _y) {
|
|
63214
|
+
return false;
|
|
63215
|
+
}
|
|
63216
|
+
pointerDown() {
|
|
63217
|
+
return false;
|
|
63218
|
+
}
|
|
63219
|
+
pointerUp() {
|
|
63220
|
+
return false;
|
|
63221
|
+
}
|
|
63222
|
+
onCancel() {}
|
|
63223
|
+
onConfirm() {}
|
|
63224
|
+
render(_context) {}
|
|
63225
|
+
}
|
|
63226
|
+
|
|
63227
|
+
// src/Tools/BoardTool.ts
|
|
63228
|
+
class BoardTool extends Tool {
|
|
63229
|
+
board;
|
|
63230
|
+
constructor(board) {
|
|
63231
|
+
super();
|
|
63232
|
+
this.board = board;
|
|
63233
|
+
}
|
|
63234
|
+
}
|
|
63235
|
+
|
|
63236
|
+
// src/Tools/WorkflowTool.ts
|
|
63237
|
+
class WorkflowTool extends BoardTool {
|
|
63238
|
+
}
|
|
63239
|
+
|
|
63151
63240
|
// src/Items/Card/CardOverlay.ts
|
|
63152
63241
|
var cardOverlay = {
|
|
63153
63242
|
itemType: "Card",
|
|
@@ -63183,6 +63272,73 @@ var cardOverlay = {
|
|
|
63183
63272
|
}
|
|
63184
63273
|
]
|
|
63185
63274
|
};
|
|
63275
|
+
var addCardToolOverlay = {
|
|
63276
|
+
toolName: "AddCard",
|
|
63277
|
+
label: "Card",
|
|
63278
|
+
kind: "create",
|
|
63279
|
+
createsItemType: "Card",
|
|
63280
|
+
family: "game",
|
|
63281
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
63282
|
+
launch: {
|
|
63283
|
+
kind: "workflow",
|
|
63284
|
+
workflow: {
|
|
63285
|
+
kind: "property-sheet",
|
|
63286
|
+
description: "Upload front and back images for one or more cards.",
|
|
63287
|
+
submitLabel: "Create cards",
|
|
63288
|
+
controls: [
|
|
63289
|
+
{
|
|
63290
|
+
id: "cardArtwork",
|
|
63291
|
+
label: "Card artwork",
|
|
63292
|
+
editor: {
|
|
63293
|
+
kind: "asset-upload",
|
|
63294
|
+
mode: "paired",
|
|
63295
|
+
fields: [
|
|
63296
|
+
{
|
|
63297
|
+
id: "face",
|
|
63298
|
+
label: "Front",
|
|
63299
|
+
accept: ["image/*"],
|
|
63300
|
+
required: true
|
|
63301
|
+
},
|
|
63302
|
+
{
|
|
63303
|
+
id: "back",
|
|
63304
|
+
label: "Back",
|
|
63305
|
+
accept: ["image/*"],
|
|
63306
|
+
required: true
|
|
63307
|
+
}
|
|
63308
|
+
]
|
|
63309
|
+
}
|
|
63310
|
+
}
|
|
63311
|
+
],
|
|
63312
|
+
submit: {
|
|
63313
|
+
kind: "create-items",
|
|
63314
|
+
itemType: "Card",
|
|
63315
|
+
strategy: "per-upload-entry",
|
|
63316
|
+
placement: "stagger-from-pointer",
|
|
63317
|
+
properties: [
|
|
63318
|
+
{
|
|
63319
|
+
property: "faceUrl",
|
|
63320
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
63321
|
+
},
|
|
63322
|
+
{
|
|
63323
|
+
property: "backsideUrl",
|
|
63324
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
63325
|
+
}
|
|
63326
|
+
]
|
|
63327
|
+
}
|
|
63328
|
+
}
|
|
63329
|
+
},
|
|
63330
|
+
surface: {
|
|
63331
|
+
order: 4,
|
|
63332
|
+
group: {
|
|
63333
|
+
id: "gameItems",
|
|
63334
|
+
label: "Game items",
|
|
63335
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
63336
|
+
order: 1,
|
|
63337
|
+
behavior: "open-panel"
|
|
63338
|
+
},
|
|
63339
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
63340
|
+
}
|
|
63341
|
+
};
|
|
63186
63342
|
|
|
63187
63343
|
// src/Items/Card/Card.ts
|
|
63188
63344
|
var defaultCardData = {
|
|
@@ -63377,6 +63533,11 @@ registerItem({
|
|
|
63377
63533
|
defaultData: defaultCardData,
|
|
63378
63534
|
overlay: cardOverlay
|
|
63379
63535
|
});
|
|
63536
|
+
registerTool({
|
|
63537
|
+
name: "AddCard",
|
|
63538
|
+
tool: WorkflowTool,
|
|
63539
|
+
overlay: addCardToolOverlay
|
|
63540
|
+
});
|
|
63380
63541
|
registerHotkey({
|
|
63381
63542
|
name: "Rotate90deg",
|
|
63382
63543
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -63883,64 +64044,6 @@ registerHotkey({
|
|
|
63883
64044
|
}
|
|
63884
64045
|
});
|
|
63885
64046
|
registerSelectionAction(createDeckSelectionAction);
|
|
63886
|
-
// src/Tools/Tool.ts
|
|
63887
|
-
class Tool {
|
|
63888
|
-
leftButtonDown() {
|
|
63889
|
-
return false;
|
|
63890
|
-
}
|
|
63891
|
-
leftButtonUp() {
|
|
63892
|
-
return false;
|
|
63893
|
-
}
|
|
63894
|
-
leftButtonDouble() {
|
|
63895
|
-
return false;
|
|
63896
|
-
}
|
|
63897
|
-
rightButtonDown() {
|
|
63898
|
-
return false;
|
|
63899
|
-
}
|
|
63900
|
-
rightButtonUp() {
|
|
63901
|
-
return false;
|
|
63902
|
-
}
|
|
63903
|
-
rightButtonDouble() {
|
|
63904
|
-
return false;
|
|
63905
|
-
}
|
|
63906
|
-
middleButtonDown() {
|
|
63907
|
-
return false;
|
|
63908
|
-
}
|
|
63909
|
-
middleButtonUp() {
|
|
63910
|
-
return false;
|
|
63911
|
-
}
|
|
63912
|
-
middleButtonDouble() {
|
|
63913
|
-
return false;
|
|
63914
|
-
}
|
|
63915
|
-
keyDown(_key) {
|
|
63916
|
-
return false;
|
|
63917
|
-
}
|
|
63918
|
-
keyUp(_key) {
|
|
63919
|
-
return false;
|
|
63920
|
-
}
|
|
63921
|
-
pointerMoveBy(_x, _y) {
|
|
63922
|
-
return false;
|
|
63923
|
-
}
|
|
63924
|
-
pointerDown() {
|
|
63925
|
-
return false;
|
|
63926
|
-
}
|
|
63927
|
-
pointerUp() {
|
|
63928
|
-
return false;
|
|
63929
|
-
}
|
|
63930
|
-
onCancel() {}
|
|
63931
|
-
onConfirm() {}
|
|
63932
|
-
render(_context) {}
|
|
63933
|
-
}
|
|
63934
|
-
|
|
63935
|
-
// src/Tools/BoardTool.ts
|
|
63936
|
-
class BoardTool extends Tool {
|
|
63937
|
-
board;
|
|
63938
|
-
constructor(board) {
|
|
63939
|
-
super();
|
|
63940
|
-
this.board = board;
|
|
63941
|
-
}
|
|
63942
|
-
}
|
|
63943
|
-
|
|
63944
64047
|
// src/Tools/CustomTool.ts
|
|
63945
64048
|
class CustomTool extends BoardTool {
|
|
63946
64049
|
name;
|
|
@@ -67744,6 +67847,125 @@ class Presence {
|
|
|
67744
67847
|
}
|
|
67745
67848
|
}
|
|
67746
67849
|
|
|
67850
|
+
// src/Selection/SelectionOverlay.ts
|
|
67851
|
+
function everyItemHasRichText(items) {
|
|
67852
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
67853
|
+
}
|
|
67854
|
+
registerSelectionAction({
|
|
67855
|
+
id: "selection.delete",
|
|
67856
|
+
label: "Delete",
|
|
67857
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
67858
|
+
description: "Removes the selected items from the board.",
|
|
67859
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
67860
|
+
isAvailable: (items) => items.length > 0
|
|
67861
|
+
});
|
|
67862
|
+
registerSelectionAction({
|
|
67863
|
+
id: "selection.duplicate",
|
|
67864
|
+
label: "Duplicate",
|
|
67865
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
67866
|
+
description: "Duplicates the selected items.",
|
|
67867
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
67868
|
+
isAvailable: (items) => items.length > 0
|
|
67869
|
+
});
|
|
67870
|
+
registerSelectionAction({
|
|
67871
|
+
id: "selection.lock",
|
|
67872
|
+
label: "Lock",
|
|
67873
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
67874
|
+
description: "Locks the selected items.",
|
|
67875
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
67876
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
67877
|
+
});
|
|
67878
|
+
registerSelectionAction({
|
|
67879
|
+
id: "selection.unlock",
|
|
67880
|
+
label: "Unlock",
|
|
67881
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
67882
|
+
description: "Unlocks the selected items.",
|
|
67883
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
67884
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
67885
|
+
});
|
|
67886
|
+
registerSelectionAction({
|
|
67887
|
+
id: "selection.bringToFront",
|
|
67888
|
+
label: "Bring to front",
|
|
67889
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
67890
|
+
description: "Moves the selection above overlapping items.",
|
|
67891
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
67892
|
+
isAvailable: (items) => items.length > 0
|
|
67893
|
+
});
|
|
67894
|
+
registerSelectionAction({
|
|
67895
|
+
id: "selection.sendToBack",
|
|
67896
|
+
label: "Send to back",
|
|
67897
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
67898
|
+
description: "Moves the selection behind overlapping items.",
|
|
67899
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
67900
|
+
isAvailable: (items) => items.length > 0
|
|
67901
|
+
});
|
|
67902
|
+
registerSelectionAction({
|
|
67903
|
+
id: "selection.text.fontSize",
|
|
67904
|
+
label: "Font size",
|
|
67905
|
+
icon: styleFontSizeIcon(),
|
|
67906
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
67907
|
+
controls: [
|
|
67908
|
+
{
|
|
67909
|
+
id: "fontSize",
|
|
67910
|
+
label: "Font size",
|
|
67911
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
67912
|
+
editor: {
|
|
67913
|
+
kind: "number-stepper",
|
|
67914
|
+
min: 8,
|
|
67915
|
+
max: 144,
|
|
67916
|
+
step: 1,
|
|
67917
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
67918
|
+
unit: "px"
|
|
67919
|
+
},
|
|
67920
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
67921
|
+
}
|
|
67922
|
+
],
|
|
67923
|
+
isAvailable: everyItemHasRichText
|
|
67924
|
+
});
|
|
67925
|
+
registerSelectionAction({
|
|
67926
|
+
id: "selection.text.color",
|
|
67927
|
+
label: "Text color",
|
|
67928
|
+
icon: styleColorIcon({
|
|
67929
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
67930
|
+
}),
|
|
67931
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
67932
|
+
controls: [
|
|
67933
|
+
{
|
|
67934
|
+
id: "fontColor",
|
|
67935
|
+
label: "Text color",
|
|
67936
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
67937
|
+
editor: {
|
|
67938
|
+
kind: "color",
|
|
67939
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
67940
|
+
},
|
|
67941
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
67942
|
+
}
|
|
67943
|
+
],
|
|
67944
|
+
isAvailable: everyItemHasRichText
|
|
67945
|
+
});
|
|
67946
|
+
registerSelectionAction({
|
|
67947
|
+
id: "selection.text.highlight",
|
|
67948
|
+
label: "Highlight",
|
|
67949
|
+
icon: {
|
|
67950
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
67951
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
67952
|
+
},
|
|
67953
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
67954
|
+
controls: [
|
|
67955
|
+
{
|
|
67956
|
+
id: "fontHighlight",
|
|
67957
|
+
label: "Highlight",
|
|
67958
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
67959
|
+
editor: {
|
|
67960
|
+
kind: "color",
|
|
67961
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
67962
|
+
},
|
|
67963
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
67964
|
+
}
|
|
67965
|
+
],
|
|
67966
|
+
isAvailable: everyItemHasRichText
|
|
67967
|
+
});
|
|
67968
|
+
|
|
67747
67969
|
// src/Selection/SelectionItems.ts
|
|
67748
67970
|
class SelectionItems {
|
|
67749
67971
|
items = new Map;
|
|
@@ -75635,6 +75857,7 @@ export {
|
|
|
75635
75857
|
overlaySymbolIcon,
|
|
75636
75858
|
overlayAssetIcon,
|
|
75637
75859
|
omitDefaultProperties,
|
|
75860
|
+
normalizeOverlayIconAssetPath,
|
|
75638
75861
|
messageRouter,
|
|
75639
75862
|
meetsWCAG_AAA,
|
|
75640
75863
|
meetsWCAG_AA,
|
|
@@ -75703,6 +75926,7 @@ export {
|
|
|
75703
75926
|
calculatePosition,
|
|
75704
75927
|
calculateAudioPosition,
|
|
75705
75928
|
borderWidths,
|
|
75929
|
+
WorkflowTool,
|
|
75706
75930
|
VideoItem,
|
|
75707
75931
|
Transformation,
|
|
75708
75932
|
Tools,
|
|
@@ -75735,6 +75959,7 @@ export {
|
|
|
75735
75959
|
PRESENCE_CLEANUP_IDLE_TIMER,
|
|
75736
75960
|
OVERLAY_SYMBOL_KEYS,
|
|
75737
75961
|
OVERLAY_ICON_SPRITE_PATH,
|
|
75962
|
+
OVERLAY_ICON_ASSET_PREFIX,
|
|
75738
75963
|
MiroItemConverter,
|
|
75739
75964
|
Mbr,
|
|
75740
75965
|
Matrix,
|