microboard-temp 0.14.20 → 0.14.21
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 +280 -62
- package/dist/cjs/index.js +280 -62
- package/dist/cjs/node.js +280 -62
- package/dist/cjs/overlayIconManifest.js +115 -0
- package/dist/esm/browser.js +280 -62
- package/dist/esm/index.js +280 -62
- package/dist/esm/node.js +280 -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 {
|
|
@@ -65844,6 +65867,68 @@ var propertyOps = {
|
|
|
65844
65867
|
}
|
|
65845
65868
|
};
|
|
65846
65869
|
|
|
65870
|
+
// src/Tools/Tool.ts
|
|
65871
|
+
class Tool {
|
|
65872
|
+
leftButtonDown() {
|
|
65873
|
+
return false;
|
|
65874
|
+
}
|
|
65875
|
+
leftButtonUp() {
|
|
65876
|
+
return false;
|
|
65877
|
+
}
|
|
65878
|
+
leftButtonDouble() {
|
|
65879
|
+
return false;
|
|
65880
|
+
}
|
|
65881
|
+
rightButtonDown() {
|
|
65882
|
+
return false;
|
|
65883
|
+
}
|
|
65884
|
+
rightButtonUp() {
|
|
65885
|
+
return false;
|
|
65886
|
+
}
|
|
65887
|
+
rightButtonDouble() {
|
|
65888
|
+
return false;
|
|
65889
|
+
}
|
|
65890
|
+
middleButtonDown() {
|
|
65891
|
+
return false;
|
|
65892
|
+
}
|
|
65893
|
+
middleButtonUp() {
|
|
65894
|
+
return false;
|
|
65895
|
+
}
|
|
65896
|
+
middleButtonDouble() {
|
|
65897
|
+
return false;
|
|
65898
|
+
}
|
|
65899
|
+
keyDown(_key) {
|
|
65900
|
+
return false;
|
|
65901
|
+
}
|
|
65902
|
+
keyUp(_key) {
|
|
65903
|
+
return false;
|
|
65904
|
+
}
|
|
65905
|
+
pointerMoveBy(_x, _y) {
|
|
65906
|
+
return false;
|
|
65907
|
+
}
|
|
65908
|
+
pointerDown() {
|
|
65909
|
+
return false;
|
|
65910
|
+
}
|
|
65911
|
+
pointerUp() {
|
|
65912
|
+
return false;
|
|
65913
|
+
}
|
|
65914
|
+
onCancel() {}
|
|
65915
|
+
onConfirm() {}
|
|
65916
|
+
render(_context) {}
|
|
65917
|
+
}
|
|
65918
|
+
|
|
65919
|
+
// src/Tools/BoardTool.ts
|
|
65920
|
+
class BoardTool extends Tool {
|
|
65921
|
+
board;
|
|
65922
|
+
constructor(board) {
|
|
65923
|
+
super();
|
|
65924
|
+
this.board = board;
|
|
65925
|
+
}
|
|
65926
|
+
}
|
|
65927
|
+
|
|
65928
|
+
// src/Tools/WorkflowTool.ts
|
|
65929
|
+
class WorkflowTool extends BoardTool {
|
|
65930
|
+
}
|
|
65931
|
+
|
|
65847
65932
|
// src/Items/Card/CardOverlay.ts
|
|
65848
65933
|
var cardOverlay = {
|
|
65849
65934
|
itemType: "Card",
|
|
@@ -65879,6 +65964,73 @@ var cardOverlay = {
|
|
|
65879
65964
|
}
|
|
65880
65965
|
]
|
|
65881
65966
|
};
|
|
65967
|
+
var addCardToolOverlay = {
|
|
65968
|
+
toolName: "AddCard",
|
|
65969
|
+
label: "Card",
|
|
65970
|
+
kind: "create",
|
|
65971
|
+
createsItemType: "Card",
|
|
65972
|
+
family: "game",
|
|
65973
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
65974
|
+
launch: {
|
|
65975
|
+
kind: "workflow",
|
|
65976
|
+
workflow: {
|
|
65977
|
+
kind: "property-sheet",
|
|
65978
|
+
description: "Upload front and back images for one or more cards.",
|
|
65979
|
+
submitLabel: "Create cards",
|
|
65980
|
+
controls: [
|
|
65981
|
+
{
|
|
65982
|
+
id: "cardArtwork",
|
|
65983
|
+
label: "Card artwork",
|
|
65984
|
+
editor: {
|
|
65985
|
+
kind: "asset-upload",
|
|
65986
|
+
mode: "paired",
|
|
65987
|
+
fields: [
|
|
65988
|
+
{
|
|
65989
|
+
id: "face",
|
|
65990
|
+
label: "Front",
|
|
65991
|
+
accept: ["image/*"],
|
|
65992
|
+
required: true
|
|
65993
|
+
},
|
|
65994
|
+
{
|
|
65995
|
+
id: "back",
|
|
65996
|
+
label: "Back",
|
|
65997
|
+
accept: ["image/*"],
|
|
65998
|
+
required: true
|
|
65999
|
+
}
|
|
66000
|
+
]
|
|
66001
|
+
}
|
|
66002
|
+
}
|
|
66003
|
+
],
|
|
66004
|
+
submit: {
|
|
66005
|
+
kind: "create-items",
|
|
66006
|
+
itemType: "Card",
|
|
66007
|
+
strategy: "per-upload-entry",
|
|
66008
|
+
placement: "stagger-from-pointer",
|
|
66009
|
+
properties: [
|
|
66010
|
+
{
|
|
66011
|
+
property: "faceUrl",
|
|
66012
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
66013
|
+
},
|
|
66014
|
+
{
|
|
66015
|
+
property: "backsideUrl",
|
|
66016
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
66017
|
+
}
|
|
66018
|
+
]
|
|
66019
|
+
}
|
|
66020
|
+
}
|
|
66021
|
+
},
|
|
66022
|
+
surface: {
|
|
66023
|
+
order: 4,
|
|
66024
|
+
group: {
|
|
66025
|
+
id: "gameItems",
|
|
66026
|
+
label: "Game items",
|
|
66027
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
66028
|
+
order: 1,
|
|
66029
|
+
behavior: "open-panel"
|
|
66030
|
+
},
|
|
66031
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
66032
|
+
}
|
|
66033
|
+
};
|
|
65882
66034
|
|
|
65883
66035
|
// src/Items/Card/Card.ts
|
|
65884
66036
|
var defaultCardData = {
|
|
@@ -66073,6 +66225,11 @@ registerItem({
|
|
|
66073
66225
|
defaultData: defaultCardData,
|
|
66074
66226
|
overlay: cardOverlay
|
|
66075
66227
|
});
|
|
66228
|
+
registerTool({
|
|
66229
|
+
name: "AddCard",
|
|
66230
|
+
tool: WorkflowTool,
|
|
66231
|
+
overlay: addCardToolOverlay
|
|
66232
|
+
});
|
|
66076
66233
|
registerHotkey({
|
|
66077
66234
|
name: "Rotate90deg",
|
|
66078
66235
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -66579,64 +66736,6 @@ registerHotkey({
|
|
|
66579
66736
|
}
|
|
66580
66737
|
});
|
|
66581
66738
|
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
66739
|
// src/Tools/CustomTool.ts
|
|
66641
66740
|
class CustomTool extends BoardTool {
|
|
66642
66741
|
name;
|
|
@@ -70440,6 +70539,125 @@ class Presence {
|
|
|
70440
70539
|
}
|
|
70441
70540
|
}
|
|
70442
70541
|
|
|
70542
|
+
// src/Selection/SelectionOverlay.ts
|
|
70543
|
+
function everyItemHasRichText(items) {
|
|
70544
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
70545
|
+
}
|
|
70546
|
+
registerSelectionAction({
|
|
70547
|
+
id: "selection.delete",
|
|
70548
|
+
label: "Delete",
|
|
70549
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
70550
|
+
description: "Removes the selected items from the board.",
|
|
70551
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
70552
|
+
isAvailable: (items) => items.length > 0
|
|
70553
|
+
});
|
|
70554
|
+
registerSelectionAction({
|
|
70555
|
+
id: "selection.duplicate",
|
|
70556
|
+
label: "Duplicate",
|
|
70557
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
70558
|
+
description: "Duplicates the selected items.",
|
|
70559
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
70560
|
+
isAvailable: (items) => items.length > 0
|
|
70561
|
+
});
|
|
70562
|
+
registerSelectionAction({
|
|
70563
|
+
id: "selection.lock",
|
|
70564
|
+
label: "Lock",
|
|
70565
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
70566
|
+
description: "Locks the selected items.",
|
|
70567
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
70568
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
70569
|
+
});
|
|
70570
|
+
registerSelectionAction({
|
|
70571
|
+
id: "selection.unlock",
|
|
70572
|
+
label: "Unlock",
|
|
70573
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
70574
|
+
description: "Unlocks the selected items.",
|
|
70575
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
70576
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
70577
|
+
});
|
|
70578
|
+
registerSelectionAction({
|
|
70579
|
+
id: "selection.bringToFront",
|
|
70580
|
+
label: "Bring to front",
|
|
70581
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
70582
|
+
description: "Moves the selection above overlapping items.",
|
|
70583
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
70584
|
+
isAvailable: (items) => items.length > 0
|
|
70585
|
+
});
|
|
70586
|
+
registerSelectionAction({
|
|
70587
|
+
id: "selection.sendToBack",
|
|
70588
|
+
label: "Send to back",
|
|
70589
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
70590
|
+
description: "Moves the selection behind overlapping items.",
|
|
70591
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
70592
|
+
isAvailable: (items) => items.length > 0
|
|
70593
|
+
});
|
|
70594
|
+
registerSelectionAction({
|
|
70595
|
+
id: "selection.text.fontSize",
|
|
70596
|
+
label: "Font size",
|
|
70597
|
+
icon: styleFontSizeIcon(),
|
|
70598
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
70599
|
+
controls: [
|
|
70600
|
+
{
|
|
70601
|
+
id: "fontSize",
|
|
70602
|
+
label: "Font size",
|
|
70603
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
70604
|
+
editor: {
|
|
70605
|
+
kind: "number-stepper",
|
|
70606
|
+
min: 8,
|
|
70607
|
+
max: 144,
|
|
70608
|
+
step: 1,
|
|
70609
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
70610
|
+
unit: "px"
|
|
70611
|
+
},
|
|
70612
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
70613
|
+
}
|
|
70614
|
+
],
|
|
70615
|
+
isAvailable: everyItemHasRichText
|
|
70616
|
+
});
|
|
70617
|
+
registerSelectionAction({
|
|
70618
|
+
id: "selection.text.color",
|
|
70619
|
+
label: "Text color",
|
|
70620
|
+
icon: styleColorIcon({
|
|
70621
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
70622
|
+
}),
|
|
70623
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
70624
|
+
controls: [
|
|
70625
|
+
{
|
|
70626
|
+
id: "fontColor",
|
|
70627
|
+
label: "Text color",
|
|
70628
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
70629
|
+
editor: {
|
|
70630
|
+
kind: "color",
|
|
70631
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
70632
|
+
},
|
|
70633
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
70634
|
+
}
|
|
70635
|
+
],
|
|
70636
|
+
isAvailable: everyItemHasRichText
|
|
70637
|
+
});
|
|
70638
|
+
registerSelectionAction({
|
|
70639
|
+
id: "selection.text.highlight",
|
|
70640
|
+
label: "Highlight",
|
|
70641
|
+
icon: {
|
|
70642
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
70643
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
70644
|
+
},
|
|
70645
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
70646
|
+
controls: [
|
|
70647
|
+
{
|
|
70648
|
+
id: "fontHighlight",
|
|
70649
|
+
label: "Highlight",
|
|
70650
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
70651
|
+
editor: {
|
|
70652
|
+
kind: "color",
|
|
70653
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
70654
|
+
},
|
|
70655
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
70656
|
+
}
|
|
70657
|
+
],
|
|
70658
|
+
isAvailable: everyItemHasRichText
|
|
70659
|
+
});
|
|
70660
|
+
|
|
70443
70661
|
// src/Selection/SelectionItems.ts
|
|
70444
70662
|
class SelectionItems {
|
|
70445
70663
|
items = new Map;
|