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/node.js
CHANGED
|
@@ -12275,7 +12275,11 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
|
|
|
12275
12275
|
}
|
|
12276
12276
|
}
|
|
12277
12277
|
// src/Overlay/IconPack.ts
|
|
12278
|
-
var
|
|
12278
|
+
var OVERLAY_ICON_ASSET_PREFIX = "overlay-icons/";
|
|
12279
|
+
var OVERLAY_ICON_SPRITE_PATH = normalizeOverlayIconAssetPath("src/Overlay/overlay-icons.svg");
|
|
12280
|
+
function normalizeOverlayIconAssetPath(sourcePath) {
|
|
12281
|
+
return sourcePath.startsWith("src/") ? `${OVERLAY_ICON_ASSET_PREFIX}${sourcePath.slice(4)}` : sourcePath;
|
|
12282
|
+
}
|
|
12279
12283
|
function overlaySymbolIcon(key) {
|
|
12280
12284
|
return {
|
|
12281
12285
|
kind: "symbol",
|
|
@@ -12283,15 +12287,18 @@ function overlaySymbolIcon(key) {
|
|
|
12283
12287
|
sourcePath: OVERLAY_ICON_SPRITE_PATH
|
|
12284
12288
|
};
|
|
12285
12289
|
}
|
|
12286
|
-
function overlayAssetIcon(
|
|
12290
|
+
function overlayAssetIcon(sourcePath, state) {
|
|
12291
|
+
const path2 = normalizeOverlayIconAssetPath(sourcePath);
|
|
12287
12292
|
return state ? {
|
|
12288
12293
|
kind: "asset",
|
|
12289
12294
|
path: path2,
|
|
12295
|
+
sourcePath,
|
|
12290
12296
|
mimeType: "image/svg+xml",
|
|
12291
12297
|
state
|
|
12292
12298
|
} : {
|
|
12293
12299
|
kind: "asset",
|
|
12294
12300
|
path: path2,
|
|
12301
|
+
sourcePath,
|
|
12295
12302
|
mimeType: "image/svg+xml"
|
|
12296
12303
|
};
|
|
12297
12304
|
}
|
|
@@ -12451,10 +12458,23 @@ function compareEntriesByOrder(a, b) {
|
|
|
12451
12458
|
return aOrder - bOrder || aLabel.localeCompare(bLabel);
|
|
12452
12459
|
}
|
|
12453
12460
|
function readOverlayValueSource(context, source) {
|
|
12461
|
+
if (source.kind === "selectionProperty") {
|
|
12462
|
+
return readOverlayContextProperty(context.selection, source.property);
|
|
12463
|
+
}
|
|
12454
12464
|
if (source.kind === "itemProperty") {
|
|
12455
|
-
return context.item
|
|
12465
|
+
return readOverlayContextProperty(context.item, source.property);
|
|
12466
|
+
}
|
|
12467
|
+
return readOverlayContextProperty(context.tool, source.property);
|
|
12468
|
+
}
|
|
12469
|
+
function readOverlayContextProperty(target, property) {
|
|
12470
|
+
if (!target) {
|
|
12471
|
+
return;
|
|
12472
|
+
}
|
|
12473
|
+
const value = target[property];
|
|
12474
|
+
if (typeof value === "function") {
|
|
12475
|
+
return value.call(target);
|
|
12456
12476
|
}
|
|
12457
|
-
return
|
|
12477
|
+
return value;
|
|
12458
12478
|
}
|
|
12459
12479
|
// src/Items/BaseItem/BaseItem.ts
|
|
12460
12480
|
class BaseItem {
|
|
@@ -65281,6 +65301,10 @@ class Drawing extends BaseItem {
|
|
|
65281
65301
|
this.path2d = new conf.path2DFactory;
|
|
65282
65302
|
const context = this.path2d;
|
|
65283
65303
|
const points = this.points;
|
|
65304
|
+
if (points.length === 0) {
|
|
65305
|
+
this.untransformedMbr = new Mbr;
|
|
65306
|
+
return;
|
|
65307
|
+
}
|
|
65284
65308
|
if (points.length < 3) {
|
|
65285
65309
|
context.arc(points[0].x, points[0].y, 0.5, 0, Math.PI * 2, true);
|
|
65286
65310
|
context.closePath();
|
|
@@ -65331,6 +65355,9 @@ class Drawing extends BaseItem {
|
|
|
65331
65355
|
}
|
|
65332
65356
|
}
|
|
65333
65357
|
optimizePoints() {
|
|
65358
|
+
if (this.points.length === 0) {
|
|
65359
|
+
return;
|
|
65360
|
+
}
|
|
65334
65361
|
const dp = douglasPeucker(this.points, 1);
|
|
65335
65362
|
dp.push(this.points[this.points.length - 1]);
|
|
65336
65363
|
this.points = dp;
|
|
@@ -65616,6 +65643,68 @@ var propertyOps = {
|
|
|
65616
65643
|
}
|
|
65617
65644
|
};
|
|
65618
65645
|
|
|
65646
|
+
// src/Tools/Tool.ts
|
|
65647
|
+
class Tool {
|
|
65648
|
+
leftButtonDown() {
|
|
65649
|
+
return false;
|
|
65650
|
+
}
|
|
65651
|
+
leftButtonUp() {
|
|
65652
|
+
return false;
|
|
65653
|
+
}
|
|
65654
|
+
leftButtonDouble() {
|
|
65655
|
+
return false;
|
|
65656
|
+
}
|
|
65657
|
+
rightButtonDown() {
|
|
65658
|
+
return false;
|
|
65659
|
+
}
|
|
65660
|
+
rightButtonUp() {
|
|
65661
|
+
return false;
|
|
65662
|
+
}
|
|
65663
|
+
rightButtonDouble() {
|
|
65664
|
+
return false;
|
|
65665
|
+
}
|
|
65666
|
+
middleButtonDown() {
|
|
65667
|
+
return false;
|
|
65668
|
+
}
|
|
65669
|
+
middleButtonUp() {
|
|
65670
|
+
return false;
|
|
65671
|
+
}
|
|
65672
|
+
middleButtonDouble() {
|
|
65673
|
+
return false;
|
|
65674
|
+
}
|
|
65675
|
+
keyDown(_key) {
|
|
65676
|
+
return false;
|
|
65677
|
+
}
|
|
65678
|
+
keyUp(_key) {
|
|
65679
|
+
return false;
|
|
65680
|
+
}
|
|
65681
|
+
pointerMoveBy(_x, _y) {
|
|
65682
|
+
return false;
|
|
65683
|
+
}
|
|
65684
|
+
pointerDown() {
|
|
65685
|
+
return false;
|
|
65686
|
+
}
|
|
65687
|
+
pointerUp() {
|
|
65688
|
+
return false;
|
|
65689
|
+
}
|
|
65690
|
+
onCancel() {}
|
|
65691
|
+
onConfirm() {}
|
|
65692
|
+
render(_context) {}
|
|
65693
|
+
}
|
|
65694
|
+
|
|
65695
|
+
// src/Tools/BoardTool.ts
|
|
65696
|
+
class BoardTool extends Tool {
|
|
65697
|
+
board;
|
|
65698
|
+
constructor(board) {
|
|
65699
|
+
super();
|
|
65700
|
+
this.board = board;
|
|
65701
|
+
}
|
|
65702
|
+
}
|
|
65703
|
+
|
|
65704
|
+
// src/Tools/WorkflowTool.ts
|
|
65705
|
+
class WorkflowTool extends BoardTool {
|
|
65706
|
+
}
|
|
65707
|
+
|
|
65619
65708
|
// src/Items/Card/CardOverlay.ts
|
|
65620
65709
|
var cardOverlay = {
|
|
65621
65710
|
itemType: "Card",
|
|
@@ -65651,6 +65740,73 @@ var cardOverlay = {
|
|
|
65651
65740
|
}
|
|
65652
65741
|
]
|
|
65653
65742
|
};
|
|
65743
|
+
var addCardToolOverlay = {
|
|
65744
|
+
toolName: "AddCard",
|
|
65745
|
+
label: "Card",
|
|
65746
|
+
kind: "create",
|
|
65747
|
+
createsItemType: "Card",
|
|
65748
|
+
family: "game",
|
|
65749
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
65750
|
+
launch: {
|
|
65751
|
+
kind: "workflow",
|
|
65752
|
+
workflow: {
|
|
65753
|
+
kind: "property-sheet",
|
|
65754
|
+
description: "Upload front and back images for one or more cards.",
|
|
65755
|
+
submitLabel: "Create cards",
|
|
65756
|
+
controls: [
|
|
65757
|
+
{
|
|
65758
|
+
id: "cardArtwork",
|
|
65759
|
+
label: "Card artwork",
|
|
65760
|
+
editor: {
|
|
65761
|
+
kind: "asset-upload",
|
|
65762
|
+
mode: "paired",
|
|
65763
|
+
fields: [
|
|
65764
|
+
{
|
|
65765
|
+
id: "face",
|
|
65766
|
+
label: "Front",
|
|
65767
|
+
accept: ["image/*"],
|
|
65768
|
+
required: true
|
|
65769
|
+
},
|
|
65770
|
+
{
|
|
65771
|
+
id: "back",
|
|
65772
|
+
label: "Back",
|
|
65773
|
+
accept: ["image/*"],
|
|
65774
|
+
required: true
|
|
65775
|
+
}
|
|
65776
|
+
]
|
|
65777
|
+
}
|
|
65778
|
+
}
|
|
65779
|
+
],
|
|
65780
|
+
submit: {
|
|
65781
|
+
kind: "create-items",
|
|
65782
|
+
itemType: "Card",
|
|
65783
|
+
strategy: "per-upload-entry",
|
|
65784
|
+
placement: "stagger-from-pointer",
|
|
65785
|
+
properties: [
|
|
65786
|
+
{
|
|
65787
|
+
property: "faceUrl",
|
|
65788
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
65789
|
+
},
|
|
65790
|
+
{
|
|
65791
|
+
property: "backsideUrl",
|
|
65792
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
65793
|
+
}
|
|
65794
|
+
]
|
|
65795
|
+
}
|
|
65796
|
+
}
|
|
65797
|
+
},
|
|
65798
|
+
surface: {
|
|
65799
|
+
order: 4,
|
|
65800
|
+
group: {
|
|
65801
|
+
id: "gameItems",
|
|
65802
|
+
label: "Game items",
|
|
65803
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
65804
|
+
order: 1,
|
|
65805
|
+
behavior: "open-panel"
|
|
65806
|
+
},
|
|
65807
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
65808
|
+
}
|
|
65809
|
+
};
|
|
65654
65810
|
|
|
65655
65811
|
// src/Items/Card/Card.ts
|
|
65656
65812
|
var defaultCardData = {
|
|
@@ -65845,6 +66001,11 @@ registerItem({
|
|
|
65845
66001
|
defaultData: defaultCardData,
|
|
65846
66002
|
overlay: cardOverlay
|
|
65847
66003
|
});
|
|
66004
|
+
registerTool({
|
|
66005
|
+
name: "AddCard",
|
|
66006
|
+
tool: WorkflowTool,
|
|
66007
|
+
overlay: addCardToolOverlay
|
|
66008
|
+
});
|
|
65848
66009
|
registerHotkey({
|
|
65849
66010
|
name: "Rotate90deg",
|
|
65850
66011
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -66351,64 +66512,6 @@ registerHotkey({
|
|
|
66351
66512
|
}
|
|
66352
66513
|
});
|
|
66353
66514
|
registerSelectionAction(createDeckSelectionAction);
|
|
66354
|
-
// src/Tools/Tool.ts
|
|
66355
|
-
class Tool {
|
|
66356
|
-
leftButtonDown() {
|
|
66357
|
-
return false;
|
|
66358
|
-
}
|
|
66359
|
-
leftButtonUp() {
|
|
66360
|
-
return false;
|
|
66361
|
-
}
|
|
66362
|
-
leftButtonDouble() {
|
|
66363
|
-
return false;
|
|
66364
|
-
}
|
|
66365
|
-
rightButtonDown() {
|
|
66366
|
-
return false;
|
|
66367
|
-
}
|
|
66368
|
-
rightButtonUp() {
|
|
66369
|
-
return false;
|
|
66370
|
-
}
|
|
66371
|
-
rightButtonDouble() {
|
|
66372
|
-
return false;
|
|
66373
|
-
}
|
|
66374
|
-
middleButtonDown() {
|
|
66375
|
-
return false;
|
|
66376
|
-
}
|
|
66377
|
-
middleButtonUp() {
|
|
66378
|
-
return false;
|
|
66379
|
-
}
|
|
66380
|
-
middleButtonDouble() {
|
|
66381
|
-
return false;
|
|
66382
|
-
}
|
|
66383
|
-
keyDown(_key) {
|
|
66384
|
-
return false;
|
|
66385
|
-
}
|
|
66386
|
-
keyUp(_key) {
|
|
66387
|
-
return false;
|
|
66388
|
-
}
|
|
66389
|
-
pointerMoveBy(_x, _y) {
|
|
66390
|
-
return false;
|
|
66391
|
-
}
|
|
66392
|
-
pointerDown() {
|
|
66393
|
-
return false;
|
|
66394
|
-
}
|
|
66395
|
-
pointerUp() {
|
|
66396
|
-
return false;
|
|
66397
|
-
}
|
|
66398
|
-
onCancel() {}
|
|
66399
|
-
onConfirm() {}
|
|
66400
|
-
render(_context) {}
|
|
66401
|
-
}
|
|
66402
|
-
|
|
66403
|
-
// src/Tools/BoardTool.ts
|
|
66404
|
-
class BoardTool extends Tool {
|
|
66405
|
-
board;
|
|
66406
|
-
constructor(board) {
|
|
66407
|
-
super();
|
|
66408
|
-
this.board = board;
|
|
66409
|
-
}
|
|
66410
|
-
}
|
|
66411
|
-
|
|
66412
66515
|
// src/Tools/CustomTool.ts
|
|
66413
66516
|
class CustomTool extends BoardTool {
|
|
66414
66517
|
name;
|
|
@@ -70212,6 +70315,125 @@ class Presence {
|
|
|
70212
70315
|
}
|
|
70213
70316
|
}
|
|
70214
70317
|
|
|
70318
|
+
// src/Selection/SelectionOverlay.ts
|
|
70319
|
+
function everyItemHasRichText(items) {
|
|
70320
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
70321
|
+
}
|
|
70322
|
+
registerSelectionAction({
|
|
70323
|
+
id: "selection.delete",
|
|
70324
|
+
label: "Delete",
|
|
70325
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
70326
|
+
description: "Removes the selected items from the board.",
|
|
70327
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
70328
|
+
isAvailable: (items) => items.length > 0
|
|
70329
|
+
});
|
|
70330
|
+
registerSelectionAction({
|
|
70331
|
+
id: "selection.duplicate",
|
|
70332
|
+
label: "Duplicate",
|
|
70333
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
70334
|
+
description: "Duplicates the selected items.",
|
|
70335
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
70336
|
+
isAvailable: (items) => items.length > 0
|
|
70337
|
+
});
|
|
70338
|
+
registerSelectionAction({
|
|
70339
|
+
id: "selection.lock",
|
|
70340
|
+
label: "Lock",
|
|
70341
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
70342
|
+
description: "Locks the selected items.",
|
|
70343
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
70344
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
70345
|
+
});
|
|
70346
|
+
registerSelectionAction({
|
|
70347
|
+
id: "selection.unlock",
|
|
70348
|
+
label: "Unlock",
|
|
70349
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
70350
|
+
description: "Unlocks the selected items.",
|
|
70351
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
70352
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
70353
|
+
});
|
|
70354
|
+
registerSelectionAction({
|
|
70355
|
+
id: "selection.bringToFront",
|
|
70356
|
+
label: "Bring to front",
|
|
70357
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
70358
|
+
description: "Moves the selection above overlapping items.",
|
|
70359
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
70360
|
+
isAvailable: (items) => items.length > 0
|
|
70361
|
+
});
|
|
70362
|
+
registerSelectionAction({
|
|
70363
|
+
id: "selection.sendToBack",
|
|
70364
|
+
label: "Send to back",
|
|
70365
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
70366
|
+
description: "Moves the selection behind overlapping items.",
|
|
70367
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
70368
|
+
isAvailable: (items) => items.length > 0
|
|
70369
|
+
});
|
|
70370
|
+
registerSelectionAction({
|
|
70371
|
+
id: "selection.text.fontSize",
|
|
70372
|
+
label: "Font size",
|
|
70373
|
+
icon: styleFontSizeIcon(),
|
|
70374
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
70375
|
+
controls: [
|
|
70376
|
+
{
|
|
70377
|
+
id: "fontSize",
|
|
70378
|
+
label: "Font size",
|
|
70379
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
70380
|
+
editor: {
|
|
70381
|
+
kind: "number-stepper",
|
|
70382
|
+
min: 8,
|
|
70383
|
+
max: 144,
|
|
70384
|
+
step: 1,
|
|
70385
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
70386
|
+
unit: "px"
|
|
70387
|
+
},
|
|
70388
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
70389
|
+
}
|
|
70390
|
+
],
|
|
70391
|
+
isAvailable: everyItemHasRichText
|
|
70392
|
+
});
|
|
70393
|
+
registerSelectionAction({
|
|
70394
|
+
id: "selection.text.color",
|
|
70395
|
+
label: "Text color",
|
|
70396
|
+
icon: styleColorIcon({
|
|
70397
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
70398
|
+
}),
|
|
70399
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
70400
|
+
controls: [
|
|
70401
|
+
{
|
|
70402
|
+
id: "fontColor",
|
|
70403
|
+
label: "Text color",
|
|
70404
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
70405
|
+
editor: {
|
|
70406
|
+
kind: "color",
|
|
70407
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
70408
|
+
},
|
|
70409
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
70410
|
+
}
|
|
70411
|
+
],
|
|
70412
|
+
isAvailable: everyItemHasRichText
|
|
70413
|
+
});
|
|
70414
|
+
registerSelectionAction({
|
|
70415
|
+
id: "selection.text.highlight",
|
|
70416
|
+
label: "Highlight",
|
|
70417
|
+
icon: {
|
|
70418
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
70419
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
70420
|
+
},
|
|
70421
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
70422
|
+
controls: [
|
|
70423
|
+
{
|
|
70424
|
+
id: "fontHighlight",
|
|
70425
|
+
label: "Highlight",
|
|
70426
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
70427
|
+
editor: {
|
|
70428
|
+
kind: "color",
|
|
70429
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
70430
|
+
},
|
|
70431
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
70432
|
+
}
|
|
70433
|
+
],
|
|
70434
|
+
isAvailable: everyItemHasRichText
|
|
70435
|
+
});
|
|
70436
|
+
|
|
70215
70437
|
// src/Selection/SelectionItems.ts
|
|
70216
70438
|
class SelectionItems {
|
|
70217
70439
|
items = new Map;
|
|
@@ -78270,6 +78492,7 @@ export {
|
|
|
78270
78492
|
overlaySymbolIcon,
|
|
78271
78493
|
overlayAssetIcon,
|
|
78272
78494
|
omitDefaultProperties,
|
|
78495
|
+
normalizeOverlayIconAssetPath,
|
|
78273
78496
|
messageRouter,
|
|
78274
78497
|
meetsWCAG_AAA,
|
|
78275
78498
|
meetsWCAG_AA,
|
|
@@ -78338,6 +78561,7 @@ export {
|
|
|
78338
78561
|
calculatePosition,
|
|
78339
78562
|
calculateAudioPosition,
|
|
78340
78563
|
borderWidths,
|
|
78564
|
+
WorkflowTool,
|
|
78341
78565
|
VideoItem,
|
|
78342
78566
|
Transformation,
|
|
78343
78567
|
Tools,
|
|
@@ -78370,6 +78594,7 @@ export {
|
|
|
78370
78594
|
PRESENCE_CLEANUP_IDLE_TIMER,
|
|
78371
78595
|
OVERLAY_SYMBOL_KEYS,
|
|
78372
78596
|
OVERLAY_ICON_SPRITE_PATH,
|
|
78597
|
+
OVERLAY_ICON_ASSET_PREFIX,
|
|
78373
78598
|
MiroItemConverter,
|
|
78374
78599
|
Mbr,
|
|
78375
78600
|
Matrix,
|