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/browser.js
CHANGED
|
@@ -676,6 +676,7 @@ __export(exports_browser, {
|
|
|
676
676
|
overlaySymbolIcon: () => overlaySymbolIcon,
|
|
677
677
|
overlayAssetIcon: () => overlayAssetIcon,
|
|
678
678
|
omitDefaultProperties: () => omitDefaultProperties,
|
|
679
|
+
normalizeOverlayIconAssetPath: () => normalizeOverlayIconAssetPath,
|
|
679
680
|
messageRouter: () => messageRouter,
|
|
680
681
|
meetsWCAG_AAA: () => meetsWCAG_AAA,
|
|
681
682
|
meetsWCAG_AA: () => meetsWCAG_AA,
|
|
@@ -744,6 +745,7 @@ __export(exports_browser, {
|
|
|
744
745
|
calculatePosition: () => calculatePosition,
|
|
745
746
|
calculateAudioPosition: () => calculateAudioPosition,
|
|
746
747
|
borderWidths: () => borderWidths,
|
|
748
|
+
WorkflowTool: () => WorkflowTool,
|
|
747
749
|
VideoItem: () => VideoItem,
|
|
748
750
|
Transformation: () => Transformation,
|
|
749
751
|
Tools: () => Tools,
|
|
@@ -776,6 +778,7 @@ __export(exports_browser, {
|
|
|
776
778
|
PRESENCE_CLEANUP_IDLE_TIMER: () => PRESENCE_CLEANUP_IDLE_TIMER,
|
|
777
779
|
OVERLAY_SYMBOL_KEYS: () => OVERLAY_SYMBOL_KEYS,
|
|
778
780
|
OVERLAY_ICON_SPRITE_PATH: () => OVERLAY_ICON_SPRITE_PATH,
|
|
781
|
+
OVERLAY_ICON_ASSET_PREFIX: () => OVERLAY_ICON_ASSET_PREFIX,
|
|
779
782
|
MiroItemConverter: () => MiroItemConverter,
|
|
780
783
|
Mbr: () => Mbr,
|
|
781
784
|
Matrix: () => Matrix,
|
|
@@ -11723,7 +11726,11 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
|
|
|
11723
11726
|
}
|
|
11724
11727
|
}
|
|
11725
11728
|
// src/Overlay/IconPack.ts
|
|
11726
|
-
var
|
|
11729
|
+
var OVERLAY_ICON_ASSET_PREFIX = "overlay-icons/";
|
|
11730
|
+
var OVERLAY_ICON_SPRITE_PATH = normalizeOverlayIconAssetPath("src/Overlay/overlay-icons.svg");
|
|
11731
|
+
function normalizeOverlayIconAssetPath(sourcePath) {
|
|
11732
|
+
return sourcePath.startsWith("src/") ? `${OVERLAY_ICON_ASSET_PREFIX}${sourcePath.slice(4)}` : sourcePath;
|
|
11733
|
+
}
|
|
11727
11734
|
function overlaySymbolIcon(key) {
|
|
11728
11735
|
return {
|
|
11729
11736
|
kind: "symbol",
|
|
@@ -11731,15 +11738,18 @@ function overlaySymbolIcon(key) {
|
|
|
11731
11738
|
sourcePath: OVERLAY_ICON_SPRITE_PATH
|
|
11732
11739
|
};
|
|
11733
11740
|
}
|
|
11734
|
-
function overlayAssetIcon(
|
|
11741
|
+
function overlayAssetIcon(sourcePath, state) {
|
|
11742
|
+
const path2 = normalizeOverlayIconAssetPath(sourcePath);
|
|
11735
11743
|
return state ? {
|
|
11736
11744
|
kind: "asset",
|
|
11737
11745
|
path: path2,
|
|
11746
|
+
sourcePath,
|
|
11738
11747
|
mimeType: "image/svg+xml",
|
|
11739
11748
|
state
|
|
11740
11749
|
} : {
|
|
11741
11750
|
kind: "asset",
|
|
11742
11751
|
path: path2,
|
|
11752
|
+
sourcePath,
|
|
11743
11753
|
mimeType: "image/svg+xml"
|
|
11744
11754
|
};
|
|
11745
11755
|
}
|
|
@@ -11899,10 +11909,23 @@ function compareEntriesByOrder(a, b) {
|
|
|
11899
11909
|
return aOrder - bOrder || aLabel.localeCompare(bLabel);
|
|
11900
11910
|
}
|
|
11901
11911
|
function readOverlayValueSource(context, source) {
|
|
11912
|
+
if (source.kind === "selectionProperty") {
|
|
11913
|
+
return readOverlayContextProperty(context.selection, source.property);
|
|
11914
|
+
}
|
|
11902
11915
|
if (source.kind === "itemProperty") {
|
|
11903
|
-
return context.item
|
|
11916
|
+
return readOverlayContextProperty(context.item, source.property);
|
|
11917
|
+
}
|
|
11918
|
+
return readOverlayContextProperty(context.tool, source.property);
|
|
11919
|
+
}
|
|
11920
|
+
function readOverlayContextProperty(target, property) {
|
|
11921
|
+
if (!target) {
|
|
11922
|
+
return;
|
|
11923
|
+
}
|
|
11924
|
+
const value = target[property];
|
|
11925
|
+
if (typeof value === "function") {
|
|
11926
|
+
return value.call(target);
|
|
11904
11927
|
}
|
|
11905
|
-
return
|
|
11928
|
+
return value;
|
|
11906
11929
|
}
|
|
11907
11930
|
// src/Items/BaseItem/BaseItem.ts
|
|
11908
11931
|
class BaseItem {
|
|
@@ -63036,6 +63059,10 @@ class Drawing extends BaseItem {
|
|
|
63036
63059
|
this.path2d = new conf.path2DFactory;
|
|
63037
63060
|
const context = this.path2d;
|
|
63038
63061
|
const points = this.points;
|
|
63062
|
+
if (points.length === 0) {
|
|
63063
|
+
this.untransformedMbr = new Mbr;
|
|
63064
|
+
return;
|
|
63065
|
+
}
|
|
63039
63066
|
if (points.length < 3) {
|
|
63040
63067
|
context.arc(points[0].x, points[0].y, 0.5, 0, Math.PI * 2, true);
|
|
63041
63068
|
context.closePath();
|
|
@@ -63086,6 +63113,9 @@ class Drawing extends BaseItem {
|
|
|
63086
63113
|
}
|
|
63087
63114
|
}
|
|
63088
63115
|
optimizePoints() {
|
|
63116
|
+
if (this.points.length === 0) {
|
|
63117
|
+
return;
|
|
63118
|
+
}
|
|
63089
63119
|
const dp = douglasPeucker(this.points, 1);
|
|
63090
63120
|
dp.push(this.points[this.points.length - 1]);
|
|
63091
63121
|
this.points = dp;
|
|
@@ -63371,6 +63401,68 @@ var propertyOps = {
|
|
|
63371
63401
|
}
|
|
63372
63402
|
};
|
|
63373
63403
|
|
|
63404
|
+
// src/Tools/Tool.ts
|
|
63405
|
+
class Tool {
|
|
63406
|
+
leftButtonDown() {
|
|
63407
|
+
return false;
|
|
63408
|
+
}
|
|
63409
|
+
leftButtonUp() {
|
|
63410
|
+
return false;
|
|
63411
|
+
}
|
|
63412
|
+
leftButtonDouble() {
|
|
63413
|
+
return false;
|
|
63414
|
+
}
|
|
63415
|
+
rightButtonDown() {
|
|
63416
|
+
return false;
|
|
63417
|
+
}
|
|
63418
|
+
rightButtonUp() {
|
|
63419
|
+
return false;
|
|
63420
|
+
}
|
|
63421
|
+
rightButtonDouble() {
|
|
63422
|
+
return false;
|
|
63423
|
+
}
|
|
63424
|
+
middleButtonDown() {
|
|
63425
|
+
return false;
|
|
63426
|
+
}
|
|
63427
|
+
middleButtonUp() {
|
|
63428
|
+
return false;
|
|
63429
|
+
}
|
|
63430
|
+
middleButtonDouble() {
|
|
63431
|
+
return false;
|
|
63432
|
+
}
|
|
63433
|
+
keyDown(_key) {
|
|
63434
|
+
return false;
|
|
63435
|
+
}
|
|
63436
|
+
keyUp(_key) {
|
|
63437
|
+
return false;
|
|
63438
|
+
}
|
|
63439
|
+
pointerMoveBy(_x, _y) {
|
|
63440
|
+
return false;
|
|
63441
|
+
}
|
|
63442
|
+
pointerDown() {
|
|
63443
|
+
return false;
|
|
63444
|
+
}
|
|
63445
|
+
pointerUp() {
|
|
63446
|
+
return false;
|
|
63447
|
+
}
|
|
63448
|
+
onCancel() {}
|
|
63449
|
+
onConfirm() {}
|
|
63450
|
+
render(_context) {}
|
|
63451
|
+
}
|
|
63452
|
+
|
|
63453
|
+
// src/Tools/BoardTool.ts
|
|
63454
|
+
class BoardTool extends Tool {
|
|
63455
|
+
board;
|
|
63456
|
+
constructor(board) {
|
|
63457
|
+
super();
|
|
63458
|
+
this.board = board;
|
|
63459
|
+
}
|
|
63460
|
+
}
|
|
63461
|
+
|
|
63462
|
+
// src/Tools/WorkflowTool.ts
|
|
63463
|
+
class WorkflowTool extends BoardTool {
|
|
63464
|
+
}
|
|
63465
|
+
|
|
63374
63466
|
// src/Items/Card/CardOverlay.ts
|
|
63375
63467
|
var cardOverlay = {
|
|
63376
63468
|
itemType: "Card",
|
|
@@ -63406,6 +63498,73 @@ var cardOverlay = {
|
|
|
63406
63498
|
}
|
|
63407
63499
|
]
|
|
63408
63500
|
};
|
|
63501
|
+
var addCardToolOverlay = {
|
|
63502
|
+
toolName: "AddCard",
|
|
63503
|
+
label: "Card",
|
|
63504
|
+
kind: "create",
|
|
63505
|
+
createsItemType: "Card",
|
|
63506
|
+
family: "game",
|
|
63507
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
63508
|
+
launch: {
|
|
63509
|
+
kind: "workflow",
|
|
63510
|
+
workflow: {
|
|
63511
|
+
kind: "property-sheet",
|
|
63512
|
+
description: "Upload front and back images for one or more cards.",
|
|
63513
|
+
submitLabel: "Create cards",
|
|
63514
|
+
controls: [
|
|
63515
|
+
{
|
|
63516
|
+
id: "cardArtwork",
|
|
63517
|
+
label: "Card artwork",
|
|
63518
|
+
editor: {
|
|
63519
|
+
kind: "asset-upload",
|
|
63520
|
+
mode: "paired",
|
|
63521
|
+
fields: [
|
|
63522
|
+
{
|
|
63523
|
+
id: "face",
|
|
63524
|
+
label: "Front",
|
|
63525
|
+
accept: ["image/*"],
|
|
63526
|
+
required: true
|
|
63527
|
+
},
|
|
63528
|
+
{
|
|
63529
|
+
id: "back",
|
|
63530
|
+
label: "Back",
|
|
63531
|
+
accept: ["image/*"],
|
|
63532
|
+
required: true
|
|
63533
|
+
}
|
|
63534
|
+
]
|
|
63535
|
+
}
|
|
63536
|
+
}
|
|
63537
|
+
],
|
|
63538
|
+
submit: {
|
|
63539
|
+
kind: "create-items",
|
|
63540
|
+
itemType: "Card",
|
|
63541
|
+
strategy: "per-upload-entry",
|
|
63542
|
+
placement: "stagger-from-pointer",
|
|
63543
|
+
properties: [
|
|
63544
|
+
{
|
|
63545
|
+
property: "faceUrl",
|
|
63546
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
63547
|
+
},
|
|
63548
|
+
{
|
|
63549
|
+
property: "backsideUrl",
|
|
63550
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
63551
|
+
}
|
|
63552
|
+
]
|
|
63553
|
+
}
|
|
63554
|
+
}
|
|
63555
|
+
},
|
|
63556
|
+
surface: {
|
|
63557
|
+
order: 4,
|
|
63558
|
+
group: {
|
|
63559
|
+
id: "gameItems",
|
|
63560
|
+
label: "Game items",
|
|
63561
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
63562
|
+
order: 1,
|
|
63563
|
+
behavior: "open-panel"
|
|
63564
|
+
},
|
|
63565
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
63566
|
+
}
|
|
63567
|
+
};
|
|
63409
63568
|
|
|
63410
63569
|
// src/Items/Card/Card.ts
|
|
63411
63570
|
var defaultCardData = {
|
|
@@ -63600,6 +63759,11 @@ registerItem({
|
|
|
63600
63759
|
defaultData: defaultCardData,
|
|
63601
63760
|
overlay: cardOverlay
|
|
63602
63761
|
});
|
|
63762
|
+
registerTool({
|
|
63763
|
+
name: "AddCard",
|
|
63764
|
+
tool: WorkflowTool,
|
|
63765
|
+
overlay: addCardToolOverlay
|
|
63766
|
+
});
|
|
63603
63767
|
registerHotkey({
|
|
63604
63768
|
name: "Rotate90deg",
|
|
63605
63769
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -64106,64 +64270,6 @@ registerHotkey({
|
|
|
64106
64270
|
}
|
|
64107
64271
|
});
|
|
64108
64272
|
registerSelectionAction(createDeckSelectionAction);
|
|
64109
|
-
// src/Tools/Tool.ts
|
|
64110
|
-
class Tool {
|
|
64111
|
-
leftButtonDown() {
|
|
64112
|
-
return false;
|
|
64113
|
-
}
|
|
64114
|
-
leftButtonUp() {
|
|
64115
|
-
return false;
|
|
64116
|
-
}
|
|
64117
|
-
leftButtonDouble() {
|
|
64118
|
-
return false;
|
|
64119
|
-
}
|
|
64120
|
-
rightButtonDown() {
|
|
64121
|
-
return false;
|
|
64122
|
-
}
|
|
64123
|
-
rightButtonUp() {
|
|
64124
|
-
return false;
|
|
64125
|
-
}
|
|
64126
|
-
rightButtonDouble() {
|
|
64127
|
-
return false;
|
|
64128
|
-
}
|
|
64129
|
-
middleButtonDown() {
|
|
64130
|
-
return false;
|
|
64131
|
-
}
|
|
64132
|
-
middleButtonUp() {
|
|
64133
|
-
return false;
|
|
64134
|
-
}
|
|
64135
|
-
middleButtonDouble() {
|
|
64136
|
-
return false;
|
|
64137
|
-
}
|
|
64138
|
-
keyDown(_key) {
|
|
64139
|
-
return false;
|
|
64140
|
-
}
|
|
64141
|
-
keyUp(_key) {
|
|
64142
|
-
return false;
|
|
64143
|
-
}
|
|
64144
|
-
pointerMoveBy(_x, _y) {
|
|
64145
|
-
return false;
|
|
64146
|
-
}
|
|
64147
|
-
pointerDown() {
|
|
64148
|
-
return false;
|
|
64149
|
-
}
|
|
64150
|
-
pointerUp() {
|
|
64151
|
-
return false;
|
|
64152
|
-
}
|
|
64153
|
-
onCancel() {}
|
|
64154
|
-
onConfirm() {}
|
|
64155
|
-
render(_context) {}
|
|
64156
|
-
}
|
|
64157
|
-
|
|
64158
|
-
// src/Tools/BoardTool.ts
|
|
64159
|
-
class BoardTool extends Tool {
|
|
64160
|
-
board;
|
|
64161
|
-
constructor(board) {
|
|
64162
|
-
super();
|
|
64163
|
-
this.board = board;
|
|
64164
|
-
}
|
|
64165
|
-
}
|
|
64166
|
-
|
|
64167
64273
|
// src/Tools/CustomTool.ts
|
|
64168
64274
|
class CustomTool extends BoardTool {
|
|
64169
64275
|
name;
|
|
@@ -67967,6 +68073,125 @@ class Presence {
|
|
|
67967
68073
|
}
|
|
67968
68074
|
}
|
|
67969
68075
|
|
|
68076
|
+
// src/Selection/SelectionOverlay.ts
|
|
68077
|
+
function everyItemHasRichText(items) {
|
|
68078
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
68079
|
+
}
|
|
68080
|
+
registerSelectionAction({
|
|
68081
|
+
id: "selection.delete",
|
|
68082
|
+
label: "Delete",
|
|
68083
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
68084
|
+
description: "Removes the selected items from the board.",
|
|
68085
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
68086
|
+
isAvailable: (items) => items.length > 0
|
|
68087
|
+
});
|
|
68088
|
+
registerSelectionAction({
|
|
68089
|
+
id: "selection.duplicate",
|
|
68090
|
+
label: "Duplicate",
|
|
68091
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
68092
|
+
description: "Duplicates the selected items.",
|
|
68093
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
68094
|
+
isAvailable: (items) => items.length > 0
|
|
68095
|
+
});
|
|
68096
|
+
registerSelectionAction({
|
|
68097
|
+
id: "selection.lock",
|
|
68098
|
+
label: "Lock",
|
|
68099
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
68100
|
+
description: "Locks the selected items.",
|
|
68101
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
68102
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
68103
|
+
});
|
|
68104
|
+
registerSelectionAction({
|
|
68105
|
+
id: "selection.unlock",
|
|
68106
|
+
label: "Unlock",
|
|
68107
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
68108
|
+
description: "Unlocks the selected items.",
|
|
68109
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
68110
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
68111
|
+
});
|
|
68112
|
+
registerSelectionAction({
|
|
68113
|
+
id: "selection.bringToFront",
|
|
68114
|
+
label: "Bring to front",
|
|
68115
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
68116
|
+
description: "Moves the selection above overlapping items.",
|
|
68117
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
68118
|
+
isAvailable: (items) => items.length > 0
|
|
68119
|
+
});
|
|
68120
|
+
registerSelectionAction({
|
|
68121
|
+
id: "selection.sendToBack",
|
|
68122
|
+
label: "Send to back",
|
|
68123
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
68124
|
+
description: "Moves the selection behind overlapping items.",
|
|
68125
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
68126
|
+
isAvailable: (items) => items.length > 0
|
|
68127
|
+
});
|
|
68128
|
+
registerSelectionAction({
|
|
68129
|
+
id: "selection.text.fontSize",
|
|
68130
|
+
label: "Font size",
|
|
68131
|
+
icon: styleFontSizeIcon(),
|
|
68132
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
68133
|
+
controls: [
|
|
68134
|
+
{
|
|
68135
|
+
id: "fontSize",
|
|
68136
|
+
label: "Font size",
|
|
68137
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
68138
|
+
editor: {
|
|
68139
|
+
kind: "number-stepper",
|
|
68140
|
+
min: 8,
|
|
68141
|
+
max: 144,
|
|
68142
|
+
step: 1,
|
|
68143
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
68144
|
+
unit: "px"
|
|
68145
|
+
},
|
|
68146
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
68147
|
+
}
|
|
68148
|
+
],
|
|
68149
|
+
isAvailable: everyItemHasRichText
|
|
68150
|
+
});
|
|
68151
|
+
registerSelectionAction({
|
|
68152
|
+
id: "selection.text.color",
|
|
68153
|
+
label: "Text color",
|
|
68154
|
+
icon: styleColorIcon({
|
|
68155
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
68156
|
+
}),
|
|
68157
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
68158
|
+
controls: [
|
|
68159
|
+
{
|
|
68160
|
+
id: "fontColor",
|
|
68161
|
+
label: "Text color",
|
|
68162
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
68163
|
+
editor: {
|
|
68164
|
+
kind: "color",
|
|
68165
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
68166
|
+
},
|
|
68167
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
68168
|
+
}
|
|
68169
|
+
],
|
|
68170
|
+
isAvailable: everyItemHasRichText
|
|
68171
|
+
});
|
|
68172
|
+
registerSelectionAction({
|
|
68173
|
+
id: "selection.text.highlight",
|
|
68174
|
+
label: "Highlight",
|
|
68175
|
+
icon: {
|
|
68176
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
68177
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
68178
|
+
},
|
|
68179
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
68180
|
+
controls: [
|
|
68181
|
+
{
|
|
68182
|
+
id: "fontHighlight",
|
|
68183
|
+
label: "Highlight",
|
|
68184
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
68185
|
+
editor: {
|
|
68186
|
+
kind: "color",
|
|
68187
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
68188
|
+
},
|
|
68189
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
68190
|
+
}
|
|
68191
|
+
],
|
|
68192
|
+
isAvailable: everyItemHasRichText
|
|
68193
|
+
});
|
|
68194
|
+
|
|
67970
68195
|
// src/Selection/SelectionItems.ts
|
|
67971
68196
|
class SelectionItems {
|
|
67972
68197
|
items = new Map;
|