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/cjs/node.js
CHANGED
|
@@ -1713,6 +1713,7 @@ __export(exports_node, {
|
|
|
1713
1713
|
overlaySymbolIcon: () => overlaySymbolIcon,
|
|
1714
1714
|
overlayAssetIcon: () => overlayAssetIcon,
|
|
1715
1715
|
omitDefaultProperties: () => omitDefaultProperties,
|
|
1716
|
+
normalizeOverlayIconAssetPath: () => normalizeOverlayIconAssetPath,
|
|
1716
1717
|
messageRouter: () => messageRouter,
|
|
1717
1718
|
meetsWCAG_AAA: () => meetsWCAG_AAA,
|
|
1718
1719
|
meetsWCAG_AA: () => meetsWCAG_AA,
|
|
@@ -1781,6 +1782,7 @@ __export(exports_node, {
|
|
|
1781
1782
|
calculatePosition: () => calculatePosition,
|
|
1782
1783
|
calculateAudioPosition: () => calculateAudioPosition,
|
|
1783
1784
|
borderWidths: () => borderWidths,
|
|
1785
|
+
WorkflowTool: () => WorkflowTool,
|
|
1784
1786
|
VideoItem: () => VideoItem,
|
|
1785
1787
|
Transformation: () => Transformation,
|
|
1786
1788
|
Tools: () => Tools,
|
|
@@ -1813,6 +1815,7 @@ __export(exports_node, {
|
|
|
1813
1815
|
PRESENCE_CLEANUP_IDLE_TIMER: () => PRESENCE_CLEANUP_IDLE_TIMER,
|
|
1814
1816
|
OVERLAY_SYMBOL_KEYS: () => OVERLAY_SYMBOL_KEYS,
|
|
1815
1817
|
OVERLAY_ICON_SPRITE_PATH: () => OVERLAY_ICON_SPRITE_PATH,
|
|
1818
|
+
OVERLAY_ICON_ASSET_PREFIX: () => OVERLAY_ICON_ASSET_PREFIX,
|
|
1816
1819
|
MiroItemConverter: () => MiroItemConverter,
|
|
1817
1820
|
Mbr: () => Mbr,
|
|
1818
1821
|
Matrix: () => Matrix,
|
|
@@ -12759,7 +12762,11 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
|
|
|
12759
12762
|
}
|
|
12760
12763
|
}
|
|
12761
12764
|
// src/Overlay/IconPack.ts
|
|
12762
|
-
var
|
|
12765
|
+
var OVERLAY_ICON_ASSET_PREFIX = "overlay-icons/";
|
|
12766
|
+
var OVERLAY_ICON_SPRITE_PATH = normalizeOverlayIconAssetPath("src/Overlay/overlay-icons.svg");
|
|
12767
|
+
function normalizeOverlayIconAssetPath(sourcePath) {
|
|
12768
|
+
return sourcePath.startsWith("src/") ? `${OVERLAY_ICON_ASSET_PREFIX}${sourcePath.slice(4)}` : sourcePath;
|
|
12769
|
+
}
|
|
12763
12770
|
function overlaySymbolIcon(key) {
|
|
12764
12771
|
return {
|
|
12765
12772
|
kind: "symbol",
|
|
@@ -12767,15 +12774,18 @@ function overlaySymbolIcon(key) {
|
|
|
12767
12774
|
sourcePath: OVERLAY_ICON_SPRITE_PATH
|
|
12768
12775
|
};
|
|
12769
12776
|
}
|
|
12770
|
-
function overlayAssetIcon(
|
|
12777
|
+
function overlayAssetIcon(sourcePath, state) {
|
|
12778
|
+
const path2 = normalizeOverlayIconAssetPath(sourcePath);
|
|
12771
12779
|
return state ? {
|
|
12772
12780
|
kind: "asset",
|
|
12773
12781
|
path: path2,
|
|
12782
|
+
sourcePath,
|
|
12774
12783
|
mimeType: "image/svg+xml",
|
|
12775
12784
|
state
|
|
12776
12785
|
} : {
|
|
12777
12786
|
kind: "asset",
|
|
12778
12787
|
path: path2,
|
|
12788
|
+
sourcePath,
|
|
12779
12789
|
mimeType: "image/svg+xml"
|
|
12780
12790
|
};
|
|
12781
12791
|
}
|
|
@@ -12935,10 +12945,23 @@ function compareEntriesByOrder(a, b) {
|
|
|
12935
12945
|
return aOrder - bOrder || aLabel.localeCompare(bLabel);
|
|
12936
12946
|
}
|
|
12937
12947
|
function readOverlayValueSource(context, source) {
|
|
12948
|
+
if (source.kind === "selectionProperty") {
|
|
12949
|
+
return readOverlayContextProperty(context.selection, source.property);
|
|
12950
|
+
}
|
|
12938
12951
|
if (source.kind === "itemProperty") {
|
|
12939
|
-
return context.item
|
|
12952
|
+
return readOverlayContextProperty(context.item, source.property);
|
|
12953
|
+
}
|
|
12954
|
+
return readOverlayContextProperty(context.tool, source.property);
|
|
12955
|
+
}
|
|
12956
|
+
function readOverlayContextProperty(target, property) {
|
|
12957
|
+
if (!target) {
|
|
12958
|
+
return;
|
|
12959
|
+
}
|
|
12960
|
+
const value = target[property];
|
|
12961
|
+
if (typeof value === "function") {
|
|
12962
|
+
return value.call(target);
|
|
12940
12963
|
}
|
|
12941
|
-
return
|
|
12964
|
+
return value;
|
|
12942
12965
|
}
|
|
12943
12966
|
// src/Items/BaseItem/BaseItem.ts
|
|
12944
12967
|
class BaseItem {
|
|
@@ -65509,6 +65532,10 @@ class Drawing extends BaseItem {
|
|
|
65509
65532
|
this.path2d = new conf.path2DFactory;
|
|
65510
65533
|
const context = this.path2d;
|
|
65511
65534
|
const points = this.points;
|
|
65535
|
+
if (points.length === 0) {
|
|
65536
|
+
this.untransformedMbr = new Mbr;
|
|
65537
|
+
return;
|
|
65538
|
+
}
|
|
65512
65539
|
if (points.length < 3) {
|
|
65513
65540
|
context.arc(points[0].x, points[0].y, 0.5, 0, Math.PI * 2, true);
|
|
65514
65541
|
context.closePath();
|
|
@@ -65559,6 +65586,9 @@ class Drawing extends BaseItem {
|
|
|
65559
65586
|
}
|
|
65560
65587
|
}
|
|
65561
65588
|
optimizePoints() {
|
|
65589
|
+
if (this.points.length === 0) {
|
|
65590
|
+
return;
|
|
65591
|
+
}
|
|
65562
65592
|
const dp = douglasPeucker(this.points, 1);
|
|
65563
65593
|
dp.push(this.points[this.points.length - 1]);
|
|
65564
65594
|
this.points = dp;
|
|
@@ -65844,6 +65874,68 @@ var propertyOps = {
|
|
|
65844
65874
|
}
|
|
65845
65875
|
};
|
|
65846
65876
|
|
|
65877
|
+
// src/Tools/Tool.ts
|
|
65878
|
+
class Tool {
|
|
65879
|
+
leftButtonDown() {
|
|
65880
|
+
return false;
|
|
65881
|
+
}
|
|
65882
|
+
leftButtonUp() {
|
|
65883
|
+
return false;
|
|
65884
|
+
}
|
|
65885
|
+
leftButtonDouble() {
|
|
65886
|
+
return false;
|
|
65887
|
+
}
|
|
65888
|
+
rightButtonDown() {
|
|
65889
|
+
return false;
|
|
65890
|
+
}
|
|
65891
|
+
rightButtonUp() {
|
|
65892
|
+
return false;
|
|
65893
|
+
}
|
|
65894
|
+
rightButtonDouble() {
|
|
65895
|
+
return false;
|
|
65896
|
+
}
|
|
65897
|
+
middleButtonDown() {
|
|
65898
|
+
return false;
|
|
65899
|
+
}
|
|
65900
|
+
middleButtonUp() {
|
|
65901
|
+
return false;
|
|
65902
|
+
}
|
|
65903
|
+
middleButtonDouble() {
|
|
65904
|
+
return false;
|
|
65905
|
+
}
|
|
65906
|
+
keyDown(_key) {
|
|
65907
|
+
return false;
|
|
65908
|
+
}
|
|
65909
|
+
keyUp(_key) {
|
|
65910
|
+
return false;
|
|
65911
|
+
}
|
|
65912
|
+
pointerMoveBy(_x, _y) {
|
|
65913
|
+
return false;
|
|
65914
|
+
}
|
|
65915
|
+
pointerDown() {
|
|
65916
|
+
return false;
|
|
65917
|
+
}
|
|
65918
|
+
pointerUp() {
|
|
65919
|
+
return false;
|
|
65920
|
+
}
|
|
65921
|
+
onCancel() {}
|
|
65922
|
+
onConfirm() {}
|
|
65923
|
+
render(_context) {}
|
|
65924
|
+
}
|
|
65925
|
+
|
|
65926
|
+
// src/Tools/BoardTool.ts
|
|
65927
|
+
class BoardTool extends Tool {
|
|
65928
|
+
board;
|
|
65929
|
+
constructor(board) {
|
|
65930
|
+
super();
|
|
65931
|
+
this.board = board;
|
|
65932
|
+
}
|
|
65933
|
+
}
|
|
65934
|
+
|
|
65935
|
+
// src/Tools/WorkflowTool.ts
|
|
65936
|
+
class WorkflowTool extends BoardTool {
|
|
65937
|
+
}
|
|
65938
|
+
|
|
65847
65939
|
// src/Items/Card/CardOverlay.ts
|
|
65848
65940
|
var cardOverlay = {
|
|
65849
65941
|
itemType: "Card",
|
|
@@ -65879,6 +65971,73 @@ var cardOverlay = {
|
|
|
65879
65971
|
}
|
|
65880
65972
|
]
|
|
65881
65973
|
};
|
|
65974
|
+
var addCardToolOverlay = {
|
|
65975
|
+
toolName: "AddCard",
|
|
65976
|
+
label: "Card",
|
|
65977
|
+
kind: "create",
|
|
65978
|
+
createsItemType: "Card",
|
|
65979
|
+
family: "game",
|
|
65980
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
65981
|
+
launch: {
|
|
65982
|
+
kind: "workflow",
|
|
65983
|
+
workflow: {
|
|
65984
|
+
kind: "property-sheet",
|
|
65985
|
+
description: "Upload front and back images for one or more cards.",
|
|
65986
|
+
submitLabel: "Create cards",
|
|
65987
|
+
controls: [
|
|
65988
|
+
{
|
|
65989
|
+
id: "cardArtwork",
|
|
65990
|
+
label: "Card artwork",
|
|
65991
|
+
editor: {
|
|
65992
|
+
kind: "asset-upload",
|
|
65993
|
+
mode: "paired",
|
|
65994
|
+
fields: [
|
|
65995
|
+
{
|
|
65996
|
+
id: "face",
|
|
65997
|
+
label: "Front",
|
|
65998
|
+
accept: ["image/*"],
|
|
65999
|
+
required: true
|
|
66000
|
+
},
|
|
66001
|
+
{
|
|
66002
|
+
id: "back",
|
|
66003
|
+
label: "Back",
|
|
66004
|
+
accept: ["image/*"],
|
|
66005
|
+
required: true
|
|
66006
|
+
}
|
|
66007
|
+
]
|
|
66008
|
+
}
|
|
66009
|
+
}
|
|
66010
|
+
],
|
|
66011
|
+
submit: {
|
|
66012
|
+
kind: "create-items",
|
|
66013
|
+
itemType: "Card",
|
|
66014
|
+
strategy: "per-upload-entry",
|
|
66015
|
+
placement: "stagger-from-pointer",
|
|
66016
|
+
properties: [
|
|
66017
|
+
{
|
|
66018
|
+
property: "faceUrl",
|
|
66019
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
66020
|
+
},
|
|
66021
|
+
{
|
|
66022
|
+
property: "backsideUrl",
|
|
66023
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
66024
|
+
}
|
|
66025
|
+
]
|
|
66026
|
+
}
|
|
66027
|
+
}
|
|
66028
|
+
},
|
|
66029
|
+
surface: {
|
|
66030
|
+
order: 4,
|
|
66031
|
+
group: {
|
|
66032
|
+
id: "gameItems",
|
|
66033
|
+
label: "Game items",
|
|
66034
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
66035
|
+
order: 1,
|
|
66036
|
+
behavior: "open-panel"
|
|
66037
|
+
},
|
|
66038
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
66039
|
+
}
|
|
66040
|
+
};
|
|
65882
66041
|
|
|
65883
66042
|
// src/Items/Card/Card.ts
|
|
65884
66043
|
var defaultCardData = {
|
|
@@ -66073,6 +66232,11 @@ registerItem({
|
|
|
66073
66232
|
defaultData: defaultCardData,
|
|
66074
66233
|
overlay: cardOverlay
|
|
66075
66234
|
});
|
|
66235
|
+
registerTool({
|
|
66236
|
+
name: "AddCard",
|
|
66237
|
+
tool: WorkflowTool,
|
|
66238
|
+
overlay: addCardToolOverlay
|
|
66239
|
+
});
|
|
66076
66240
|
registerHotkey({
|
|
66077
66241
|
name: "Rotate90deg",
|
|
66078
66242
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -66579,64 +66743,6 @@ registerHotkey({
|
|
|
66579
66743
|
}
|
|
66580
66744
|
});
|
|
66581
66745
|
registerSelectionAction(createDeckSelectionAction);
|
|
66582
|
-
// src/Tools/Tool.ts
|
|
66583
|
-
class Tool {
|
|
66584
|
-
leftButtonDown() {
|
|
66585
|
-
return false;
|
|
66586
|
-
}
|
|
66587
|
-
leftButtonUp() {
|
|
66588
|
-
return false;
|
|
66589
|
-
}
|
|
66590
|
-
leftButtonDouble() {
|
|
66591
|
-
return false;
|
|
66592
|
-
}
|
|
66593
|
-
rightButtonDown() {
|
|
66594
|
-
return false;
|
|
66595
|
-
}
|
|
66596
|
-
rightButtonUp() {
|
|
66597
|
-
return false;
|
|
66598
|
-
}
|
|
66599
|
-
rightButtonDouble() {
|
|
66600
|
-
return false;
|
|
66601
|
-
}
|
|
66602
|
-
middleButtonDown() {
|
|
66603
|
-
return false;
|
|
66604
|
-
}
|
|
66605
|
-
middleButtonUp() {
|
|
66606
|
-
return false;
|
|
66607
|
-
}
|
|
66608
|
-
middleButtonDouble() {
|
|
66609
|
-
return false;
|
|
66610
|
-
}
|
|
66611
|
-
keyDown(_key) {
|
|
66612
|
-
return false;
|
|
66613
|
-
}
|
|
66614
|
-
keyUp(_key) {
|
|
66615
|
-
return false;
|
|
66616
|
-
}
|
|
66617
|
-
pointerMoveBy(_x, _y) {
|
|
66618
|
-
return false;
|
|
66619
|
-
}
|
|
66620
|
-
pointerDown() {
|
|
66621
|
-
return false;
|
|
66622
|
-
}
|
|
66623
|
-
pointerUp() {
|
|
66624
|
-
return false;
|
|
66625
|
-
}
|
|
66626
|
-
onCancel() {}
|
|
66627
|
-
onConfirm() {}
|
|
66628
|
-
render(_context) {}
|
|
66629
|
-
}
|
|
66630
|
-
|
|
66631
|
-
// src/Tools/BoardTool.ts
|
|
66632
|
-
class BoardTool extends Tool {
|
|
66633
|
-
board;
|
|
66634
|
-
constructor(board) {
|
|
66635
|
-
super();
|
|
66636
|
-
this.board = board;
|
|
66637
|
-
}
|
|
66638
|
-
}
|
|
66639
|
-
|
|
66640
66746
|
// src/Tools/CustomTool.ts
|
|
66641
66747
|
class CustomTool extends BoardTool {
|
|
66642
66748
|
name;
|
|
@@ -70440,6 +70546,125 @@ class Presence {
|
|
|
70440
70546
|
}
|
|
70441
70547
|
}
|
|
70442
70548
|
|
|
70549
|
+
// src/Selection/SelectionOverlay.ts
|
|
70550
|
+
function everyItemHasRichText(items) {
|
|
70551
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
70552
|
+
}
|
|
70553
|
+
registerSelectionAction({
|
|
70554
|
+
id: "selection.delete",
|
|
70555
|
+
label: "Delete",
|
|
70556
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
70557
|
+
description: "Removes the selected items from the board.",
|
|
70558
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
70559
|
+
isAvailable: (items) => items.length > 0
|
|
70560
|
+
});
|
|
70561
|
+
registerSelectionAction({
|
|
70562
|
+
id: "selection.duplicate",
|
|
70563
|
+
label: "Duplicate",
|
|
70564
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
70565
|
+
description: "Duplicates the selected items.",
|
|
70566
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
70567
|
+
isAvailable: (items) => items.length > 0
|
|
70568
|
+
});
|
|
70569
|
+
registerSelectionAction({
|
|
70570
|
+
id: "selection.lock",
|
|
70571
|
+
label: "Lock",
|
|
70572
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
70573
|
+
description: "Locks the selected items.",
|
|
70574
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
70575
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
70576
|
+
});
|
|
70577
|
+
registerSelectionAction({
|
|
70578
|
+
id: "selection.unlock",
|
|
70579
|
+
label: "Unlock",
|
|
70580
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
70581
|
+
description: "Unlocks the selected items.",
|
|
70582
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
70583
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
70584
|
+
});
|
|
70585
|
+
registerSelectionAction({
|
|
70586
|
+
id: "selection.bringToFront",
|
|
70587
|
+
label: "Bring to front",
|
|
70588
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
70589
|
+
description: "Moves the selection above overlapping items.",
|
|
70590
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
70591
|
+
isAvailable: (items) => items.length > 0
|
|
70592
|
+
});
|
|
70593
|
+
registerSelectionAction({
|
|
70594
|
+
id: "selection.sendToBack",
|
|
70595
|
+
label: "Send to back",
|
|
70596
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
70597
|
+
description: "Moves the selection behind overlapping items.",
|
|
70598
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
70599
|
+
isAvailable: (items) => items.length > 0
|
|
70600
|
+
});
|
|
70601
|
+
registerSelectionAction({
|
|
70602
|
+
id: "selection.text.fontSize",
|
|
70603
|
+
label: "Font size",
|
|
70604
|
+
icon: styleFontSizeIcon(),
|
|
70605
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
70606
|
+
controls: [
|
|
70607
|
+
{
|
|
70608
|
+
id: "fontSize",
|
|
70609
|
+
label: "Font size",
|
|
70610
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
70611
|
+
editor: {
|
|
70612
|
+
kind: "number-stepper",
|
|
70613
|
+
min: 8,
|
|
70614
|
+
max: 144,
|
|
70615
|
+
step: 1,
|
|
70616
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
70617
|
+
unit: "px"
|
|
70618
|
+
},
|
|
70619
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
70620
|
+
}
|
|
70621
|
+
],
|
|
70622
|
+
isAvailable: everyItemHasRichText
|
|
70623
|
+
});
|
|
70624
|
+
registerSelectionAction({
|
|
70625
|
+
id: "selection.text.color",
|
|
70626
|
+
label: "Text color",
|
|
70627
|
+
icon: styleColorIcon({
|
|
70628
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
70629
|
+
}),
|
|
70630
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
70631
|
+
controls: [
|
|
70632
|
+
{
|
|
70633
|
+
id: "fontColor",
|
|
70634
|
+
label: "Text color",
|
|
70635
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
70636
|
+
editor: {
|
|
70637
|
+
kind: "color",
|
|
70638
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
70639
|
+
},
|
|
70640
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
70641
|
+
}
|
|
70642
|
+
],
|
|
70643
|
+
isAvailable: everyItemHasRichText
|
|
70644
|
+
});
|
|
70645
|
+
registerSelectionAction({
|
|
70646
|
+
id: "selection.text.highlight",
|
|
70647
|
+
label: "Highlight",
|
|
70648
|
+
icon: {
|
|
70649
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
70650
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
70651
|
+
},
|
|
70652
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
70653
|
+
controls: [
|
|
70654
|
+
{
|
|
70655
|
+
id: "fontHighlight",
|
|
70656
|
+
label: "Highlight",
|
|
70657
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
70658
|
+
editor: {
|
|
70659
|
+
kind: "color",
|
|
70660
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
70661
|
+
},
|
|
70662
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
70663
|
+
}
|
|
70664
|
+
],
|
|
70665
|
+
isAvailable: everyItemHasRichText
|
|
70666
|
+
});
|
|
70667
|
+
|
|
70443
70668
|
// src/Selection/SelectionItems.ts
|
|
70444
70669
|
class SelectionItems {
|
|
70445
70670
|
items = new Map;
|