@neta-art/cohub-cli 10.28.0 → 10.29.0
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/README.md +8 -0
- package/dist/board-gpu/page.js +189 -141
- package/dist/build.json +1 -1
- package/dist/chunks/{Geometry.js → FilterPipe.js} +12377 -11608
- package/dist/chunks/board-kernel.js +16852 -16483
- package/dist/chunks/browserAll.js +83 -43
- package/dist/chunks/client.js +9 -6
- package/dist/chunks/id.js +20 -4
- package/dist/chunks/init.js +97 -99
- package/dist/chunks/spaces.js +56 -10
- package/dist/chunks/webworkerAll.js +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as Container, C as Ticker, V as removeItems, W as warn, ft as ExtensionType, lt as Point, pt as extensions, ut as eventemitter3_default, w as UPDATE_PRIORITY } from "./FilterPipe.js";
|
|
3
3
|
import "./init.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/dom/CanvasObserver.mjs
|
|
5
5
|
var CanvasObserver = class {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
/** A cached value of the last transform applied to the DOM element. */
|
|
@@ -66,14 +66,17 @@ var CanvasObserver = class {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
this._observer.observe(this._canvas);
|
|
69
|
-
} else if (!this._tickerAttached)
|
|
69
|
+
} else if (!this._tickerAttached) {
|
|
70
|
+
Ticker.shared.add(this.updateTranslation, this, UPDATE_PRIORITY.HIGH);
|
|
71
|
+
this._tickerAttached = true;
|
|
72
|
+
}
|
|
70
73
|
}
|
|
71
74
|
/** Destroys the CanvasObserver instance, cleaning up observers and Ticker. */
|
|
72
75
|
destroy() {
|
|
73
76
|
if (this._observer) {
|
|
74
77
|
this._observer.disconnect();
|
|
75
78
|
this._observer = null;
|
|
76
|
-
} else if (this._tickerAttached) Ticker.shared.remove(this.updateTranslation);
|
|
79
|
+
} else if (this._tickerAttached) Ticker.shared.remove(this.updateTranslation, this);
|
|
77
80
|
this._domElement = null;
|
|
78
81
|
this._renderer = null;
|
|
79
82
|
this._canvas = null;
|
|
@@ -84,7 +87,7 @@ var CanvasObserver = class {
|
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
89
|
//#endregion
|
|
87
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
90
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/FederatedEvent.mjs
|
|
88
91
|
var FederatedEvent = class FederatedEvent {
|
|
89
92
|
/**
|
|
90
93
|
* @param manager - The event boundary which manages this event. Propagation can only occur
|
|
@@ -366,7 +369,7 @@ var require_isMobile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
366
369
|
exports["default"] = isMobile;
|
|
367
370
|
}));
|
|
368
371
|
//#endregion
|
|
369
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
372
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/utils/browser/isMobile.mjs
|
|
370
373
|
var import_cjs = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
371
374
|
function __export(m) {
|
|
372
375
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
@@ -377,7 +380,7 @@ var import_cjs = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((export
|
|
|
377
380
|
})))(), 1);
|
|
378
381
|
const isMobile = (import_cjs.default.default ?? import_cjs.default)(globalThis.navigator);
|
|
379
382
|
//#endregion
|
|
380
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
383
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/accessibility/AccessibilitySystem.mjs
|
|
381
384
|
const KEY_CODE_TAB = 9;
|
|
382
385
|
const DIV_TOUCH_SIZE = 100;
|
|
383
386
|
const DIV_TOUCH_POS_X = 0;
|
|
@@ -504,7 +507,6 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
504
507
|
renderer: this._renderer
|
|
505
508
|
});
|
|
506
509
|
}
|
|
507
|
-
if (this._activateOnTab) globalThis.addEventListener("keydown", this._boundOnKeyDown, false);
|
|
508
510
|
if (this._deactivateOnMouseMove) globalThis.document.addEventListener("mousemove", this._boundOnMouseMove, true);
|
|
509
511
|
const canvas = this._renderer.view.canvas;
|
|
510
512
|
if (!canvas.parentNode) {
|
|
@@ -536,7 +538,6 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
536
538
|
if (!this._isActive || this._isMobileAccessibility) return;
|
|
537
539
|
this._isActive = false;
|
|
538
540
|
globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, true);
|
|
539
|
-
if (this._activateOnTab) globalThis.addEventListener("keydown", this._boundOnKeyDown, false);
|
|
540
541
|
this._renderer.runners.postrender.remove(this);
|
|
541
542
|
for (const child of this._children) {
|
|
542
543
|
if (child._accessibleDiv?.parentNode) {
|
|
@@ -581,6 +582,7 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
581
582
|
this.debug = mergedOptions.accessibilityOptions.debug;
|
|
582
583
|
this._activateOnTab = mergedOptions.accessibilityOptions.activateOnTab;
|
|
583
584
|
this._deactivateOnMouseMove = mergedOptions.accessibilityOptions.deactivateOnMouseMove;
|
|
585
|
+
if (this._activateOnTab) globalThis.addEventListener("keydown", this._boundOnKeyDown, false);
|
|
584
586
|
if (mergedOptions.accessibilityOptions.enabledByDefault) this._activate();
|
|
585
587
|
this._renderer.runners.postrender.remove(this);
|
|
586
588
|
}
|
|
@@ -675,8 +677,10 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
675
677
|
div.removeAttribute("aria-label");
|
|
676
678
|
div.tabIndex = 0;
|
|
677
679
|
} else {
|
|
678
|
-
if (container.accessibleType === "button")
|
|
679
|
-
|
|
680
|
+
if (container.accessibleType === "button") {
|
|
681
|
+
div = document.createElement("button");
|
|
682
|
+
if (!this.debug) div.style.color = "transparent";
|
|
683
|
+
} else {
|
|
680
684
|
div = document.createElement(container.accessibleType);
|
|
681
685
|
div.style.cssText = `
|
|
682
686
|
color: transparent;
|
|
@@ -692,7 +696,6 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
692
696
|
-moz-user-select: none;
|
|
693
697
|
-ms-user-select: none;
|
|
694
698
|
`;
|
|
695
|
-
if (container.accessibleText) div.innerText = container.accessibleText;
|
|
696
699
|
}
|
|
697
700
|
div.style.width = `${DIV_TOUCH_SIZE}px`;
|
|
698
701
|
div.style.height = `${DIV_TOUCH_SIZE}px`;
|
|
@@ -710,6 +713,7 @@ const _AccessibilitySystem = class _AccessibilitySystem {
|
|
|
710
713
|
}
|
|
711
714
|
div.style.pointerEvents = container.accessiblePointerEvents;
|
|
712
715
|
div.type = container.accessibleType;
|
|
716
|
+
if (container.accessibleText) div.innerText = container.accessibleText;
|
|
713
717
|
if (container.accessibleTitle && container.accessibleTitle !== null) div.title = container.accessibleTitle;
|
|
714
718
|
else if (!container.accessibleHint || container.accessibleHint === null) div.title = `container ${container.tabIndex}`;
|
|
715
719
|
if (container.accessibleHint && container.accessibleHint !== null) div.setAttribute("aria-label", container.accessibleHint);
|
|
@@ -863,7 +867,7 @@ _AccessibilitySystem.defaultOptions = {
|
|
|
863
867
|
};
|
|
864
868
|
let AccessibilitySystem = _AccessibilitySystem;
|
|
865
869
|
//#endregion
|
|
866
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
870
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/accessibility/accessibilityTarget.mjs
|
|
867
871
|
const accessibilityTarget = {
|
|
868
872
|
accessible: false,
|
|
869
873
|
accessibleTitle: null,
|
|
@@ -878,11 +882,7 @@ const accessibilityTarget = {
|
|
|
878
882
|
_renderId: -1
|
|
879
883
|
};
|
|
880
884
|
//#endregion
|
|
881
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
882
|
-
extensions.add(AccessibilitySystem);
|
|
883
|
-
extensions.mixin(Container, accessibilityTarget);
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/dom/DOMPipe.mjs
|
|
885
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/dom/DOMPipe.mjs
|
|
886
886
|
var DOMPipe = class {
|
|
887
887
|
/**
|
|
888
888
|
* Constructor for the DOMPipe class.
|
|
@@ -983,10 +983,7 @@ DOMPipe.extension = {
|
|
|
983
983
|
name: "dom"
|
|
984
984
|
};
|
|
985
985
|
//#endregion
|
|
986
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
987
|
-
extensions.add(DOMPipe);
|
|
988
|
-
//#endregion
|
|
989
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/events/EventTicker.mjs
|
|
986
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/EventTicker.mjs
|
|
990
987
|
var EventsTickerClass = class {
|
|
991
988
|
constructor() {
|
|
992
989
|
/** The frequency that fake events will be fired. */
|
|
@@ -1077,7 +1074,7 @@ var EventsTickerClass = class {
|
|
|
1077
1074
|
};
|
|
1078
1075
|
const EventsTicker = new EventsTickerClass();
|
|
1079
1076
|
//#endregion
|
|
1080
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
1077
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/FederatedMouseEvent.mjs
|
|
1081
1078
|
var FederatedMouseEvent = class extends FederatedEvent {
|
|
1082
1079
|
constructor() {
|
|
1083
1080
|
super(...arguments);
|
|
@@ -1218,7 +1215,7 @@ var FederatedMouseEvent = class extends FederatedEvent {
|
|
|
1218
1215
|
}
|
|
1219
1216
|
};
|
|
1220
1217
|
//#endregion
|
|
1221
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
1218
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/FederatedPointerEvent.mjs
|
|
1222
1219
|
var FederatedPointerEvent = class extends FederatedMouseEvent {
|
|
1223
1220
|
constructor() {
|
|
1224
1221
|
super(...arguments);
|
|
@@ -1262,7 +1259,7 @@ var FederatedPointerEvent = class extends FederatedMouseEvent {
|
|
|
1262
1259
|
}
|
|
1263
1260
|
};
|
|
1264
1261
|
//#endregion
|
|
1265
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
1262
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/FederatedWheelEvent.mjs
|
|
1266
1263
|
var FederatedWheelEvent = class extends FederatedMouseEvent {
|
|
1267
1264
|
constructor() {
|
|
1268
1265
|
super(...arguments);
|
|
@@ -1299,10 +1296,12 @@ FederatedWheelEvent.DOM_DELTA_LINE = 1;
|
|
|
1299
1296
|
*/
|
|
1300
1297
|
FederatedWheelEvent.DOM_DELTA_PAGE = 2;
|
|
1301
1298
|
//#endregion
|
|
1302
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
1299
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/EventBoundary.mjs
|
|
1303
1300
|
const PROPAGATION_LIMIT = 2048;
|
|
1304
1301
|
const tempHitLocation = new Point();
|
|
1305
1302
|
const tempLocalMapping = new Point();
|
|
1303
|
+
const handlerKeys = /* @__PURE__ */ Object.create(null);
|
|
1304
|
+
const captureKeys = /* @__PURE__ */ Object.create(null);
|
|
1306
1305
|
var EventBoundary = class {
|
|
1307
1306
|
/**
|
|
1308
1307
|
* @param rootTarget - The holder of the event boundary.
|
|
@@ -1354,6 +1353,7 @@ var EventBoundary = class {
|
|
|
1354
1353
|
this.mapPointerUp = this.mapPointerUp.bind(this);
|
|
1355
1354
|
this.mapPointerUpOutside = this.mapPointerUpOutside.bind(this);
|
|
1356
1355
|
this.mapWheel = this.mapWheel.bind(this);
|
|
1356
|
+
this.mapContextMenu = this.mapContextMenu.bind(this);
|
|
1357
1357
|
this.mappingTable = {};
|
|
1358
1358
|
this.addEventMapping("pointerdown", this.mapPointerDown);
|
|
1359
1359
|
this.addEventMapping("pointermove", this.mapPointerMove);
|
|
@@ -1363,6 +1363,7 @@ var EventBoundary = class {
|
|
|
1363
1363
|
this.addEventMapping("pointerup", this.mapPointerUp);
|
|
1364
1364
|
this.addEventMapping("pointerupoutside", this.mapPointerUpOutside);
|
|
1365
1365
|
this.addEventMapping("wheel", this.mapWheel);
|
|
1366
|
+
this.addEventMapping("contextmenu", this.mapContextMenu);
|
|
1366
1367
|
}
|
|
1367
1368
|
/**
|
|
1368
1369
|
* Adds an event mapping for the event `type` handled by `fn`.
|
|
@@ -1456,10 +1457,10 @@ var EventBoundary = class {
|
|
|
1456
1457
|
if (targets.length === 0) return;
|
|
1457
1458
|
e.eventPhase = e.BUBBLING_PHASE;
|
|
1458
1459
|
const events = Array.isArray(type) ? type : [type];
|
|
1459
|
-
for (let i = targets.length - 1; i >= 0; i--) events.
|
|
1460
|
+
for (let i = targets.length - 1; i >= 0; i--) for (let j = 0; j < events.length; j++) {
|
|
1460
1461
|
e.currentTarget = targets[i];
|
|
1461
|
-
this.notifyTarget(e,
|
|
1462
|
-
}
|
|
1462
|
+
this.notifyTarget(e, events[j]);
|
|
1463
|
+
}
|
|
1463
1464
|
}
|
|
1464
1465
|
/**
|
|
1465
1466
|
* Finds the propagation path from {@link EventBoundary.rootTarget rootTarget} to the passed
|
|
@@ -1480,18 +1481,15 @@ var EventBoundary = class {
|
|
|
1480
1481
|
let shouldReturn = false;
|
|
1481
1482
|
if (this._interactivePrune(currentTarget)) return null;
|
|
1482
1483
|
if (currentTarget.eventMode === "dynamic" || eventMode === "dynamic") EventsTicker.pauseUpdate = false;
|
|
1483
|
-
if (currentTarget.interactiveChildren && currentTarget.children) {
|
|
1484
|
+
if (currentTarget.interactiveChildren && currentTarget.children && currentTarget.children.length > 0) {
|
|
1484
1485
|
const children = currentTarget.children;
|
|
1486
|
+
const ignoreChildren = ignore || pruneFn(currentTarget, location);
|
|
1485
1487
|
for (let i = children.length - 1; i >= 0; i--) {
|
|
1486
1488
|
const child = children[i];
|
|
1487
|
-
const nestedHit = this.hitTestMoveRecursive(child, this._isInteractive(eventMode) ? eventMode : child.eventMode, location, testFn, pruneFn,
|
|
1489
|
+
const nestedHit = this.hitTestMoveRecursive(child, this._isInteractive(eventMode) ? eventMode : child.eventMode, location, testFn, pruneFn, ignoreChildren);
|
|
1488
1490
|
if (nestedHit) {
|
|
1489
1491
|
if (nestedHit.length > 0 && !nestedHit[nestedHit.length - 1].parent) continue;
|
|
1490
|
-
|
|
1491
|
-
if (nestedHit.length > 0 || isInteractive) {
|
|
1492
|
-
if (isInteractive) this._allInteractiveElements.push(currentTarget);
|
|
1493
|
-
nestedHit.push(currentTarget);
|
|
1494
|
-
}
|
|
1492
|
+
if (nestedHit.length > 0 || currentTarget.isInteractive()) nestedHit.push(currentTarget);
|
|
1495
1493
|
if (this._hitElements.length === 0) this._hitElements = nestedHit;
|
|
1496
1494
|
shouldReturn = true;
|
|
1497
1495
|
}
|
|
@@ -1499,7 +1497,7 @@ var EventBoundary = class {
|
|
|
1499
1497
|
}
|
|
1500
1498
|
const isInteractiveMode = this._isInteractive(eventMode);
|
|
1501
1499
|
const isInteractiveTarget = currentTarget.isInteractive();
|
|
1502
|
-
if (isInteractiveTarget
|
|
1500
|
+
if (isInteractiveTarget) this._allInteractiveElements.push(currentTarget);
|
|
1503
1501
|
if (ignore || this._hitElements.length > 0) return null;
|
|
1504
1502
|
if (shouldReturn) return this._hitElements;
|
|
1505
1503
|
if (isInteractiveMode && !pruneFn(currentTarget, location) && testFn(currentTarget, location)) return isInteractiveTarget ? [currentTarget] : [];
|
|
@@ -1596,9 +1594,9 @@ var EventBoundary = class {
|
|
|
1596
1594
|
notifyTarget(e, type) {
|
|
1597
1595
|
if (!e.currentTarget.isInteractive()) return;
|
|
1598
1596
|
type ?? (type = e.type);
|
|
1599
|
-
const handlerKey = `on${type}
|
|
1597
|
+
const handlerKey = handlerKeys[type] ?? (handlerKeys[type] = `on${type}`);
|
|
1600
1598
|
e.currentTarget[handlerKey]?.(e);
|
|
1601
|
-
const key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? `${type}capture` : type;
|
|
1599
|
+
const key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? captureKeys[type] ?? (captureKeys[type] = `${type}capture`) : type;
|
|
1602
1600
|
this._notifyListeners(e, key);
|
|
1603
1601
|
if (e.eventPhase === e.AT_TARGET) this._notifyListeners(e, type);
|
|
1604
1602
|
}
|
|
@@ -1876,6 +1874,19 @@ var EventBoundary = class {
|
|
|
1876
1874
|
this.freeEvent(wheelEvent);
|
|
1877
1875
|
}
|
|
1878
1876
|
/**
|
|
1877
|
+
* Maps the upstream `contextmenu` event to a downstream `contextmenu` event.
|
|
1878
|
+
* @param from - The upstream `contextmenu` event.
|
|
1879
|
+
*/
|
|
1880
|
+
mapContextMenu(from) {
|
|
1881
|
+
if (!(from instanceof FederatedPointerEvent)) {
|
|
1882
|
+
warn("EventBoundary cannot map a non-pointer event as a pointer event");
|
|
1883
|
+
return;
|
|
1884
|
+
}
|
|
1885
|
+
const e = this.createPointerEvent(from);
|
|
1886
|
+
this.dispatchEvent(e, "contextmenu");
|
|
1887
|
+
this.freeEvent(e);
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1879
1890
|
* Finds the most specific event-target in the given propagation path that is still mounted in the scene graph.
|
|
1880
1891
|
*
|
|
1881
1892
|
* This is used to find the correct `pointerup` and `pointerout` target in the case that the original `pointerdown`
|
|
@@ -2115,7 +2126,7 @@ var EventBoundary = class {
|
|
|
2115
2126
|
}
|
|
2116
2127
|
};
|
|
2117
2128
|
//#endregion
|
|
2118
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
2129
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/EventSystem.mjs
|
|
2119
2130
|
const MOUSE_POINTER_ID = 1;
|
|
2120
2131
|
const TOUCH_TO_POINTER = {
|
|
2121
2132
|
touchstart: "pointerdown",
|
|
@@ -2147,7 +2158,7 @@ const _EventSystem = class _EventSystem {
|
|
|
2147
2158
|
this.supportsPointerEvents = !!globalThis.PointerEvent;
|
|
2148
2159
|
/**
|
|
2149
2160
|
* The DOM element to which the root event listeners are bound. This is automatically set to
|
|
2150
|
-
* the renderer's {@link
|
|
2161
|
+
* the renderer's {@link AbstractRenderer#canvas canvas}.
|
|
2151
2162
|
*/
|
|
2152
2163
|
this.domElement = null;
|
|
2153
2164
|
/** The resolution used to convert between the DOM client space into world space. */
|
|
@@ -2159,6 +2170,7 @@ const _EventSystem = class _EventSystem {
|
|
|
2159
2170
|
this._eventsAdded = false;
|
|
2160
2171
|
this._rootPointerEvent = new FederatedPointerEvent(null);
|
|
2161
2172
|
this._rootWheelEvent = new FederatedWheelEvent(null);
|
|
2173
|
+
this._rootContextMenuEvent = new FederatedPointerEvent(null);
|
|
2162
2174
|
this.cursorStyles = {
|
|
2163
2175
|
default: "inherit",
|
|
2164
2176
|
pointer: "pointer"
|
|
@@ -2172,6 +2184,7 @@ const _EventSystem = class _EventSystem {
|
|
|
2172
2184
|
this._onPointerMove = this._onPointerMove.bind(this);
|
|
2173
2185
|
this._onPointerUp = this._onPointerUp.bind(this);
|
|
2174
2186
|
this._onPointerOverOut = this._onPointerOverOut.bind(this);
|
|
2187
|
+
this._onContextMenu = this._onContextMenu.bind(this);
|
|
2175
2188
|
this.onWheel = this.onWheel.bind(this);
|
|
2176
2189
|
}
|
|
2177
2190
|
/**
|
|
@@ -2351,6 +2364,23 @@ const _EventSystem = class _EventSystem {
|
|
|
2351
2364
|
this.setCursor(this.rootBoundary.cursor);
|
|
2352
2365
|
}
|
|
2353
2366
|
/**
|
|
2367
|
+
* Event handler for `contextmenu` events on {@link EventSystem#domElement this.domElement}.
|
|
2368
|
+
*
|
|
2369
|
+
* {@link EventSystem#autoPreventDefault autoPreventDefault} does not apply, so the browser menu
|
|
2370
|
+
* opens unless a listener calls `preventDefault()`.
|
|
2371
|
+
* @param nativeEvent - The native mouse/pointer event.
|
|
2372
|
+
*/
|
|
2373
|
+
_onContextMenu(nativeEvent) {
|
|
2374
|
+
if (!this.features.click) return;
|
|
2375
|
+
this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
|
|
2376
|
+
const normalizedEvents = this._normalizeToPointerData(nativeEvent);
|
|
2377
|
+
for (let i = 0, j = normalizedEvents.length; i < j; i++) {
|
|
2378
|
+
const event = this._bootstrapEvent(this._rootContextMenuEvent, normalizedEvents[i]);
|
|
2379
|
+
this.rootBoundary.mapEvent(event);
|
|
2380
|
+
}
|
|
2381
|
+
this.setCursor(this.rootBoundary.cursor);
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2354
2384
|
* Passive handler for `wheel` events on {@link EventSystem.domElement this.domElement}.
|
|
2355
2385
|
* @param nativeEvent - The native wheel event.
|
|
2356
2386
|
*/
|
|
@@ -2426,6 +2456,7 @@ const _EventSystem = class _EventSystem {
|
|
|
2426
2456
|
passive: true,
|
|
2427
2457
|
capture: true
|
|
2428
2458
|
});
|
|
2459
|
+
this.domElement.addEventListener("contextmenu", this._onContextMenu, true);
|
|
2429
2460
|
this._eventsAdded = true;
|
|
2430
2461
|
}
|
|
2431
2462
|
/** Unregister event listeners on {@link EventSystem#domElement this.domElement}. */
|
|
@@ -2458,6 +2489,7 @@ const _EventSystem = class _EventSystem {
|
|
|
2458
2489
|
}
|
|
2459
2490
|
}
|
|
2460
2491
|
this.domElement.removeEventListener("wheel", this.onWheel, true);
|
|
2492
|
+
this.domElement.removeEventListener("contextmenu", this._onContextMenu, true);
|
|
2461
2493
|
this.domElement = null;
|
|
2462
2494
|
this._eventsAdded = false;
|
|
2463
2495
|
}
|
|
@@ -2670,9 +2702,10 @@ _EventSystem.defaultEventFeatures = {
|
|
|
2670
2702
|
};
|
|
2671
2703
|
let EventSystem = _EventSystem;
|
|
2672
2704
|
//#endregion
|
|
2673
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
2705
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/FederatedEventTarget.mjs
|
|
2674
2706
|
const FederatedContainer = {
|
|
2675
2707
|
onclick: null,
|
|
2708
|
+
oncontextmenu: null,
|
|
2676
2709
|
onmousedown: null,
|
|
2677
2710
|
onmouseenter: null,
|
|
2678
2711
|
onmouseleave: null,
|
|
@@ -2754,7 +2787,14 @@ const FederatedContainer = {
|
|
|
2754
2787
|
}
|
|
2755
2788
|
};
|
|
2756
2789
|
//#endregion
|
|
2757
|
-
//#region ../../node_modules/.pnpm/pixi.js@8.
|
|
2790
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/accessibility/init.mjs
|
|
2791
|
+
extensions.add(AccessibilitySystem);
|
|
2792
|
+
extensions.mixin(Container, accessibilityTarget);
|
|
2793
|
+
//#endregion
|
|
2794
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/dom/init.mjs
|
|
2795
|
+
extensions.add(DOMPipe);
|
|
2796
|
+
//#endregion
|
|
2797
|
+
//#region ../../node_modules/.pnpm/pixi.js@8.23.0/node_modules/pixi.js/lib/events/init.mjs
|
|
2758
2798
|
extensions.add(EventSystem);
|
|
2759
2799
|
extensions.mixin(Container, FederatedContainer);
|
|
2760
2800
|
//#endregion
|
package/dist/chunks/client.js
CHANGED
|
@@ -5913,11 +5913,14 @@ var SessionClient = class {
|
|
|
5913
5913
|
});
|
|
5914
5914
|
}
|
|
5915
5915
|
turn(turnId) {
|
|
5916
|
-
return {
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5916
|
+
return {
|
|
5917
|
+
fork: (input = {}) => this.transport.request(`/api/sessions/${this.id}/turns/${turnId}/fork`, {
|
|
5918
|
+
method: "POST",
|
|
5919
|
+
headers: { "Content-Type": "application/json" },
|
|
5920
|
+
body: JSON.stringify(input)
|
|
5921
|
+
}),
|
|
5922
|
+
speak: () => this.transport.request(`/api/sessions/${this.id}/turns/${turnId}/speech`, { method: "POST" })
|
|
5923
|
+
};
|
|
5921
5924
|
}
|
|
5922
5925
|
subscribe(handlers) {
|
|
5923
5926
|
return this.realtime.subscribe(handlers);
|
|
@@ -11252,7 +11255,7 @@ attach: attachAppEmbed },
|
|
|
11252
11255
|
};
|
|
11253
11256
|
}
|
|
11254
11257
|
};
|
|
11255
|
-
const USERNAME_PATTERN = /^(
|
|
11258
|
+
const USERNAME_PATTERN = /^(?!.*--)[a-z0-9](?:[a-z0-9-]{0,37}[a-z0-9])?$/;
|
|
11256
11259
|
const SPACE_SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9_-]{0,78}[a-z0-9])?$/;
|
|
11257
11260
|
/**
|
|
11258
11261
|
* Platform-owned path segments that must not be newly assigned to public
|
package/dist/chunks/id.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as union, a as array, c as discriminatedUnion, d as literal, f as number, h as string, l as json, m as record, n as _enum, p as object, s as boolean, v as unknown } from "./schemas.js";
|
|
1
|
+
import { _ as union, a as array, c as discriminatedUnion, d as literal, f as number, g as tuple, h as string, l as json, m as record, n as _enum, p as object, s as boolean, v as unknown } from "./schemas.js";
|
|
2
2
|
//#region ../protocol/src/board-constants.ts
|
|
3
3
|
const BOARD_TEXT_FONT_FAMILY = "Geist Variable";
|
|
4
4
|
const BOARD_ARROW_STROKE_SIZE = 2.5;
|
|
@@ -418,6 +418,20 @@ const fileProps = {
|
|
|
418
418
|
coverUrl: string().optional()
|
|
419
419
|
}).strict().describe("Cached facts for an instant preview; filled in when the media loads.").optional()
|
|
420
420
|
};
|
|
421
|
+
const BoardModelViewSchema = object({
|
|
422
|
+
yaw: finite.describe("Degrees around the model; 0 faces its front, 90 its right side."),
|
|
423
|
+
pitch: finite.min(-90).max(90).describe("Degrees above the model; 90 looks straight down."),
|
|
424
|
+
zoom: finite.positive().max(100).describe("1 fits the whole model; 2 is twice as close."),
|
|
425
|
+
target: tuple([
|
|
426
|
+
finite,
|
|
427
|
+
finite,
|
|
428
|
+
finite
|
|
429
|
+
]).optional().describe("Pivot offset from the model's centre, in model radii.")
|
|
430
|
+
}).strict();
|
|
431
|
+
const BoardModelSettingsSchema = object({
|
|
432
|
+
view: BoardModelViewSchema.optional().describe("Camera for the card's still and where the model turns back to; the default three-quarter view without it."),
|
|
433
|
+
animation: string().min(1).max(240).optional().describe("Animation clip that plays; the model's first without it.")
|
|
434
|
+
}).strict().describe("How a 3D model file shows; ignored for other files.");
|
|
421
435
|
const BoardMediaOriginSchema = object({
|
|
422
436
|
taskRunId: string().min(1).max(160),
|
|
423
437
|
artifactId: string().min(1).max(240)
|
|
@@ -458,7 +472,10 @@ const BoardAudioItemSchema = object({
|
|
|
458
472
|
const BoardFileItemSchema = object({
|
|
459
473
|
...boxed(BOARD_DEFAULT_SIZES.file),
|
|
460
474
|
type: literal("file"),
|
|
461
|
-
props: object(
|
|
475
|
+
props: object({
|
|
476
|
+
...fileProps,
|
|
477
|
+
model: BoardModelSettingsSchema.optional()
|
|
478
|
+
}).strict()
|
|
462
479
|
}).strict();
|
|
463
480
|
const httpsUrl = string().max(4096).url();
|
|
464
481
|
const artifactBase = {
|
|
@@ -2404,8 +2421,7 @@ function isModelMime(mimeType) {
|
|
|
2404
2421
|
const MODEL_FORMAT_BY_MIME = {
|
|
2405
2422
|
"model/gltf-binary": "glb",
|
|
2406
2423
|
"model/gltf+json": "gltf",
|
|
2407
|
-
"model/stl": "stl"
|
|
2408
|
-
"model/obj": "obj"
|
|
2424
|
+
"model/stl": "stl"
|
|
2409
2425
|
};
|
|
2410
2426
|
function modelFormatForPath(path, mimeType) {
|
|
2411
2427
|
const format = (mime) => {
|