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/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 {
|
|
@@ -63371,6 +63394,68 @@ var propertyOps = {
|
|
|
63371
63394
|
}
|
|
63372
63395
|
};
|
|
63373
63396
|
|
|
63397
|
+
// src/Tools/Tool.ts
|
|
63398
|
+
class Tool {
|
|
63399
|
+
leftButtonDown() {
|
|
63400
|
+
return false;
|
|
63401
|
+
}
|
|
63402
|
+
leftButtonUp() {
|
|
63403
|
+
return false;
|
|
63404
|
+
}
|
|
63405
|
+
leftButtonDouble() {
|
|
63406
|
+
return false;
|
|
63407
|
+
}
|
|
63408
|
+
rightButtonDown() {
|
|
63409
|
+
return false;
|
|
63410
|
+
}
|
|
63411
|
+
rightButtonUp() {
|
|
63412
|
+
return false;
|
|
63413
|
+
}
|
|
63414
|
+
rightButtonDouble() {
|
|
63415
|
+
return false;
|
|
63416
|
+
}
|
|
63417
|
+
middleButtonDown() {
|
|
63418
|
+
return false;
|
|
63419
|
+
}
|
|
63420
|
+
middleButtonUp() {
|
|
63421
|
+
return false;
|
|
63422
|
+
}
|
|
63423
|
+
middleButtonDouble() {
|
|
63424
|
+
return false;
|
|
63425
|
+
}
|
|
63426
|
+
keyDown(_key) {
|
|
63427
|
+
return false;
|
|
63428
|
+
}
|
|
63429
|
+
keyUp(_key) {
|
|
63430
|
+
return false;
|
|
63431
|
+
}
|
|
63432
|
+
pointerMoveBy(_x, _y) {
|
|
63433
|
+
return false;
|
|
63434
|
+
}
|
|
63435
|
+
pointerDown() {
|
|
63436
|
+
return false;
|
|
63437
|
+
}
|
|
63438
|
+
pointerUp() {
|
|
63439
|
+
return false;
|
|
63440
|
+
}
|
|
63441
|
+
onCancel() {}
|
|
63442
|
+
onConfirm() {}
|
|
63443
|
+
render(_context) {}
|
|
63444
|
+
}
|
|
63445
|
+
|
|
63446
|
+
// src/Tools/BoardTool.ts
|
|
63447
|
+
class BoardTool extends Tool {
|
|
63448
|
+
board;
|
|
63449
|
+
constructor(board) {
|
|
63450
|
+
super();
|
|
63451
|
+
this.board = board;
|
|
63452
|
+
}
|
|
63453
|
+
}
|
|
63454
|
+
|
|
63455
|
+
// src/Tools/WorkflowTool.ts
|
|
63456
|
+
class WorkflowTool extends BoardTool {
|
|
63457
|
+
}
|
|
63458
|
+
|
|
63374
63459
|
// src/Items/Card/CardOverlay.ts
|
|
63375
63460
|
var cardOverlay = {
|
|
63376
63461
|
itemType: "Card",
|
|
@@ -63406,6 +63491,73 @@ var cardOverlay = {
|
|
|
63406
63491
|
}
|
|
63407
63492
|
]
|
|
63408
63493
|
};
|
|
63494
|
+
var addCardToolOverlay = {
|
|
63495
|
+
toolName: "AddCard",
|
|
63496
|
+
label: "Card",
|
|
63497
|
+
kind: "create",
|
|
63498
|
+
createsItemType: "Card",
|
|
63499
|
+
family: "game",
|
|
63500
|
+
icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
|
|
63501
|
+
launch: {
|
|
63502
|
+
kind: "workflow",
|
|
63503
|
+
workflow: {
|
|
63504
|
+
kind: "property-sheet",
|
|
63505
|
+
description: "Upload front and back images for one or more cards.",
|
|
63506
|
+
submitLabel: "Create cards",
|
|
63507
|
+
controls: [
|
|
63508
|
+
{
|
|
63509
|
+
id: "cardArtwork",
|
|
63510
|
+
label: "Card artwork",
|
|
63511
|
+
editor: {
|
|
63512
|
+
kind: "asset-upload",
|
|
63513
|
+
mode: "paired",
|
|
63514
|
+
fields: [
|
|
63515
|
+
{
|
|
63516
|
+
id: "face",
|
|
63517
|
+
label: "Front",
|
|
63518
|
+
accept: ["image/*"],
|
|
63519
|
+
required: true
|
|
63520
|
+
},
|
|
63521
|
+
{
|
|
63522
|
+
id: "back",
|
|
63523
|
+
label: "Back",
|
|
63524
|
+
accept: ["image/*"],
|
|
63525
|
+
required: true
|
|
63526
|
+
}
|
|
63527
|
+
]
|
|
63528
|
+
}
|
|
63529
|
+
}
|
|
63530
|
+
],
|
|
63531
|
+
submit: {
|
|
63532
|
+
kind: "create-items",
|
|
63533
|
+
itemType: "Card",
|
|
63534
|
+
strategy: "per-upload-entry",
|
|
63535
|
+
placement: "stagger-from-pointer",
|
|
63536
|
+
properties: [
|
|
63537
|
+
{
|
|
63538
|
+
property: "faceUrl",
|
|
63539
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
|
|
63540
|
+
},
|
|
63541
|
+
{
|
|
63542
|
+
property: "backsideUrl",
|
|
63543
|
+
source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
|
|
63544
|
+
}
|
|
63545
|
+
]
|
|
63546
|
+
}
|
|
63547
|
+
}
|
|
63548
|
+
},
|
|
63549
|
+
surface: {
|
|
63550
|
+
order: 4,
|
|
63551
|
+
group: {
|
|
63552
|
+
id: "gameItems",
|
|
63553
|
+
label: "Game items",
|
|
63554
|
+
icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
|
|
63555
|
+
order: 1,
|
|
63556
|
+
behavior: "open-panel"
|
|
63557
|
+
},
|
|
63558
|
+
relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
|
|
63559
|
+
}
|
|
63560
|
+
};
|
|
63409
63561
|
|
|
63410
63562
|
// src/Items/Card/Card.ts
|
|
63411
63563
|
var defaultCardData = {
|
|
@@ -63600,6 +63752,11 @@ registerItem({
|
|
|
63600
63752
|
defaultData: defaultCardData,
|
|
63601
63753
|
overlay: cardOverlay
|
|
63602
63754
|
});
|
|
63755
|
+
registerTool({
|
|
63756
|
+
name: "AddCard",
|
|
63757
|
+
tool: WorkflowTool,
|
|
63758
|
+
overlay: addCardToolOverlay
|
|
63759
|
+
});
|
|
63603
63760
|
registerHotkey({
|
|
63604
63761
|
name: "Rotate90deg",
|
|
63605
63762
|
hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
|
|
@@ -64106,64 +64263,6 @@ registerHotkey({
|
|
|
64106
64263
|
}
|
|
64107
64264
|
});
|
|
64108
64265
|
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
64266
|
// src/Tools/CustomTool.ts
|
|
64168
64267
|
class CustomTool extends BoardTool {
|
|
64169
64268
|
name;
|
|
@@ -67967,6 +68066,125 @@ class Presence {
|
|
|
67967
68066
|
}
|
|
67968
68067
|
}
|
|
67969
68068
|
|
|
68069
|
+
// src/Selection/SelectionOverlay.ts
|
|
68070
|
+
function everyItemHasRichText(items) {
|
|
68071
|
+
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
68072
|
+
}
|
|
68073
|
+
registerSelectionAction({
|
|
68074
|
+
id: "selection.delete",
|
|
68075
|
+
label: "Delete",
|
|
68076
|
+
icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
|
|
68077
|
+
description: "Removes the selected items from the board.",
|
|
68078
|
+
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
68079
|
+
isAvailable: (items) => items.length > 0
|
|
68080
|
+
});
|
|
68081
|
+
registerSelectionAction({
|
|
68082
|
+
id: "selection.duplicate",
|
|
68083
|
+
label: "Duplicate",
|
|
68084
|
+
icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
|
|
68085
|
+
description: "Duplicates the selected items.",
|
|
68086
|
+
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
68087
|
+
isAvailable: (items) => items.length > 0
|
|
68088
|
+
});
|
|
68089
|
+
registerSelectionAction({
|
|
68090
|
+
id: "selection.lock",
|
|
68091
|
+
label: "Lock",
|
|
68092
|
+
icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
|
|
68093
|
+
description: "Locks the selected items.",
|
|
68094
|
+
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
68095
|
+
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
68096
|
+
});
|
|
68097
|
+
registerSelectionAction({
|
|
68098
|
+
id: "selection.unlock",
|
|
68099
|
+
label: "Unlock",
|
|
68100
|
+
icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
|
|
68101
|
+
description: "Unlocks the selected items.",
|
|
68102
|
+
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
68103
|
+
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
68104
|
+
});
|
|
68105
|
+
registerSelectionAction({
|
|
68106
|
+
id: "selection.bringToFront",
|
|
68107
|
+
label: "Bring to front",
|
|
68108
|
+
icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
|
|
68109
|
+
description: "Moves the selection above overlapping items.",
|
|
68110
|
+
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
68111
|
+
isAvailable: (items) => items.length > 0
|
|
68112
|
+
});
|
|
68113
|
+
registerSelectionAction({
|
|
68114
|
+
id: "selection.sendToBack",
|
|
68115
|
+
label: "Send to back",
|
|
68116
|
+
icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
|
|
68117
|
+
description: "Moves the selection behind overlapping items.",
|
|
68118
|
+
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
68119
|
+
isAvailable: (items) => items.length > 0
|
|
68120
|
+
});
|
|
68121
|
+
registerSelectionAction({
|
|
68122
|
+
id: "selection.text.fontSize",
|
|
68123
|
+
label: "Font size",
|
|
68124
|
+
icon: styleFontSizeIcon(),
|
|
68125
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
68126
|
+
controls: [
|
|
68127
|
+
{
|
|
68128
|
+
id: "fontSize",
|
|
68129
|
+
label: "Font size",
|
|
68130
|
+
valueSource: { kind: "selectionProperty", property: "getFontSize" },
|
|
68131
|
+
editor: {
|
|
68132
|
+
kind: "number-stepper",
|
|
68133
|
+
min: 8,
|
|
68134
|
+
max: 144,
|
|
68135
|
+
step: 1,
|
|
68136
|
+
presets: [12, 14, 16, 18, 24, 32, 48],
|
|
68137
|
+
unit: "px"
|
|
68138
|
+
},
|
|
68139
|
+
invoke: { kind: "selectionMethod", methodName: "setFontSize" }
|
|
68140
|
+
}
|
|
68141
|
+
],
|
|
68142
|
+
isAvailable: everyItemHasRichText
|
|
68143
|
+
});
|
|
68144
|
+
registerSelectionAction({
|
|
68145
|
+
id: "selection.text.color",
|
|
68146
|
+
label: "Text color",
|
|
68147
|
+
icon: styleColorIcon({
|
|
68148
|
+
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
68149
|
+
}),
|
|
68150
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
68151
|
+
controls: [
|
|
68152
|
+
{
|
|
68153
|
+
id: "fontColor",
|
|
68154
|
+
label: "Text color",
|
|
68155
|
+
valueSource: { kind: "selectionProperty", property: "getFontColor" },
|
|
68156
|
+
editor: {
|
|
68157
|
+
kind: "color",
|
|
68158
|
+
palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
|
|
68159
|
+
},
|
|
68160
|
+
invoke: { kind: "selectionMethod", methodName: "setFontColor" }
|
|
68161
|
+
}
|
|
68162
|
+
],
|
|
68163
|
+
isAvailable: everyItemHasRichText
|
|
68164
|
+
});
|
|
68165
|
+
registerSelectionAction({
|
|
68166
|
+
id: "selection.text.highlight",
|
|
68167
|
+
label: "Highlight",
|
|
68168
|
+
icon: {
|
|
68169
|
+
...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
|
|
68170
|
+
state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
|
|
68171
|
+
},
|
|
68172
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
68173
|
+
controls: [
|
|
68174
|
+
{
|
|
68175
|
+
id: "fontHighlight",
|
|
68176
|
+
label: "Highlight",
|
|
68177
|
+
valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
|
|
68178
|
+
editor: {
|
|
68179
|
+
kind: "color",
|
|
68180
|
+
palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
|
|
68181
|
+
},
|
|
68182
|
+
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
|
|
68183
|
+
}
|
|
68184
|
+
],
|
|
68185
|
+
isAvailable: everyItemHasRichText
|
|
68186
|
+
});
|
|
68187
|
+
|
|
67970
68188
|
// src/Selection/SelectionItems.ts
|
|
67971
68189
|
class SelectionItems {
|
|
67972
68190
|
items = new Map;
|