@vectojs/core 1.32.7 → 1.33.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/dist/{chunk-FQ2565IT.js → chunk-UEIZDNK7.js} +57 -30
- package/dist/{chunk-YTGGL4I4.mjs → chunk-VFQMETOR.mjs} +27 -0
- package/dist/index.js +3053 -2278
- package/dist/index.mjs +2901 -2126
- package/dist/text.js +2 -2
- package/dist/text.mjs +1 -1
- package/dist/tree/Entity.d.ts +27 -0
- package/dist/tree/Scene.d.ts +199 -472
- package/dist/tree/scene/A11yProjectionManager.d.ts +147 -0
- package/dist/tree/scene/CanvasGeometry.d.ts +106 -0
- package/dist/tree/scene/ContentGridProjector.d.ts +63 -0
- package/dist/tree/scene/ContentProjectionManager.d.ts +217 -0
- package/dist/tree/scene/DirtyTracker.d.ts +107 -0
- package/dist/tree/scene/DriverTicker.d.ts +101 -0
- package/dist/tree/scene/HitTester.d.ts +113 -0
- package/dist/tree/scene/PhaseTimer.d.ts +114 -0
- package/dist/tree/scene/WasmBackendFacade.d.ts +271 -0
- package/dist/tree/scene/a11y-dom.d.ts +78 -0
- package/dist/tree/scene/content-caret.d.ts +28 -0
- package/dist/tree/scene/content-line-window.d.ts +64 -0
- package/package.json +1 -1
|
@@ -322,13 +322,40 @@ var Entity = (_class2 = class {
|
|
|
322
322
|
* fixed viewport. Off by default (children render unclipped). Canvas2D only.
|
|
323
323
|
*/
|
|
324
324
|
__init36() {this.clipChildren = false}
|
|
325
|
+
/**
|
|
326
|
+
* Group this subtree's projected text into its own accessibility **region**,
|
|
327
|
+
* without clipping anything.
|
|
328
|
+
*
|
|
329
|
+
* The projection sorts every mirror into visual reading order, and it bands
|
|
330
|
+
* them into rows per region so that side-by-side columns stay contiguous runs
|
|
331
|
+
* in the DOM. That matters beyond reading order: a native `Selection` covers
|
|
332
|
+
* everything between its anchor and focus in DOM order, so two columns banded
|
|
333
|
+
* together let a vertical drag through one of them swallow the other.
|
|
334
|
+
*
|
|
335
|
+
* {@link clipChildren} also establishes a region, because a clipper is
|
|
336
|
+
* usually the column boundary you want. Reach for this flag when the two
|
|
337
|
+
* needs come apart — a sidebar, a card deck or any column that must not be
|
|
338
|
+
* absorbed by its neighbour's drag, but that draws nothing and has no reason
|
|
339
|
+
* to clip. Measured in a real app before this existed: a table-of-contents
|
|
340
|
+
* sidebar had to switch `clipChildren` on purely to escape the body column's
|
|
341
|
+
* bands, buying a per-frame `save`/`clip`/`restore` for an entity that paints
|
|
342
|
+
* nothing.
|
|
343
|
+
*
|
|
344
|
+
* Unlike `clipChildren`, this is honoured regardless of the node's box. The
|
|
345
|
+
* zero-area exemption on the clipping path exists because a zero-area clipper
|
|
346
|
+
* clips nothing; grouping is a declaration of intent that never consults
|
|
347
|
+
* geometry, and a pure grouping container often leaves `width`/`height` at 0.
|
|
348
|
+
*
|
|
349
|
+
* Off by default. Regions nest: the nearest enclosing region wins.
|
|
350
|
+
*/
|
|
351
|
+
__init37() {this.a11yRegion = false}
|
|
325
352
|
// Lazily allocated (see _drivers above). Most entities never register a
|
|
326
353
|
// listener or an imperative animate() tween.
|
|
327
|
-
|
|
354
|
+
__init38() {this.listeners = null}
|
|
328
355
|
/** Capture-phase listeners (fired root→target before bubble). */
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
constructor(id) {;_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this);_class2.prototype.__init27.call(this);_class2.prototype.__init28.call(this);_class2.prototype.__init29.call(this);_class2.prototype.__init30.call(this);_class2.prototype.__init31.call(this);_class2.prototype.__init32.call(this);_class2.prototype.__init33.call(this);_class2.prototype.__init34.call(this);_class2.prototype.__init35.call(this);_class2.prototype.__init36.call(this);_class2.prototype.__init37.call(this);_class2.prototype.__init38.call(this);_class2.prototype.__init39.call(this);
|
|
356
|
+
__init39() {this.captureListeners = null}
|
|
357
|
+
__init40() {this.animations = null}
|
|
358
|
+
constructor(id) {;_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this);_class2.prototype.__init27.call(this);_class2.prototype.__init28.call(this);_class2.prototype.__init29.call(this);_class2.prototype.__init30.call(this);_class2.prototype.__init31.call(this);_class2.prototype.__init32.call(this);_class2.prototype.__init33.call(this);_class2.prototype.__init34.call(this);_class2.prototype.__init35.call(this);_class2.prototype.__init36.call(this);_class2.prototype.__init37.call(this);_class2.prototype.__init38.call(this);_class2.prototype.__init39.call(this);_class2.prototype.__init40.call(this);
|
|
332
359
|
this.id = id || `entity_${Math.random().toString(36).substring(2, 9)}`;
|
|
333
360
|
}
|
|
334
361
|
/**
|
|
@@ -1168,22 +1195,22 @@ var MSDFTextEntity = (_class3 = class extends Entity {
|
|
|
1168
1195
|
// joined by soft hyphens (U+00AD); the worker then treats those as break
|
|
1169
1196
|
// opportunities. `text` keeps the original string for a11y/content
|
|
1170
1197
|
// projection; `layoutText` is the soft-hyphen-annotated string sent to layout.
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1198
|
+
__init41() {this.hyphenator = null}
|
|
1199
|
+
__init42() {this.layoutText = ""}
|
|
1200
|
+
__init43() {this.text = ""}
|
|
1201
|
+
__init44() {this.lastRenderedSeqId = 0}
|
|
1175
1202
|
/** Bumped by {@link queueLayout}; read by `Scene` to skip an unchanged sync. */
|
|
1176
|
-
|
|
1203
|
+
__init45() {this.contentEpoch = 0}
|
|
1177
1204
|
// Atlas-decode subscription (see watchAtlasDecode). Held so `destroy()` can
|
|
1178
1205
|
// release it: the handler closes over `this`, so leaving it attached to a
|
|
1179
1206
|
// long-lived shared atlas image would retain the whole entity.
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1207
|
+
__init46() {this.atlasDecodeTarget = null}
|
|
1208
|
+
__init47() {this.atlasDecodeHandler = null}
|
|
1209
|
+
__init48() {this.rgbColorCache = /* @__PURE__ */ new Map()}
|
|
1210
|
+
__init49() {this.fontStringCache = []}
|
|
1211
|
+
__init50() {this.layoutResult = null}
|
|
1185
1212
|
constructor(text, options) {
|
|
1186
|
-
super();_class3.prototype.
|
|
1213
|
+
super();_class3.prototype.__init41.call(this);_class3.prototype.__init42.call(this);_class3.prototype.__init43.call(this);_class3.prototype.__init44.call(this);_class3.prototype.__init45.call(this);_class3.prototype.__init46.call(this);_class3.prototype.__init47.call(this);_class3.prototype.__init48.call(this);_class3.prototype.__init49.call(this);_class3.prototype.__init50.call(this);;
|
|
1187
1214
|
this.font = options.font;
|
|
1188
1215
|
this.texture = options.texture;
|
|
1189
1216
|
this.fallbackFont = _nullishCoalesce(options.fallbackFont, () => ( "sans-serif"));
|
|
@@ -1459,23 +1486,23 @@ var SVGEntity = (_class4 = class extends Entity {
|
|
|
1459
1486
|
* rasterized. Set to `'transparent'` to opt out and keep the box empty.
|
|
1460
1487
|
* Default `'rgba(248,113,113,0.9)'`.
|
|
1461
1488
|
*/
|
|
1462
|
-
|
|
1489
|
+
__init51() {this.fallbackStroke = "rgba(248,113,113,0.9)"}
|
|
1463
1490
|
/** Fill behind the fallback marker. Default `'rgba(248,113,113,0.12)'`. */
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1491
|
+
__init52() {this.fallbackFill = "rgba(248,113,113,0.12)"}
|
|
1492
|
+
__init53() {this.svgSource = ""}
|
|
1493
|
+
__init54() {this.imageBitmap = null}
|
|
1494
|
+
__init55() {this.imageElement = null}
|
|
1495
|
+
__init56() {this.blobURL = null}
|
|
1496
|
+
__init57() {this.currentImg = null}
|
|
1497
|
+
__init58() {this.lodTimeout = null}
|
|
1498
|
+
__init59() {this.rasterFailed = false}
|
|
1499
|
+
__init60() {this.cachedDoc = null}
|
|
1500
|
+
__init61() {this.baseWidth = 100}
|
|
1501
|
+
__init62() {this.baseHeight = 100}
|
|
1502
|
+
__init63() {this.lastRasterizedScale = 1}
|
|
1503
|
+
__init64() {this.targetScale = 1}
|
|
1477
1504
|
constructor(svgSource, id) {
|
|
1478
|
-
super(id);_class4.prototype.
|
|
1505
|
+
super(id);_class4.prototype.__init51.call(this);_class4.prototype.__init52.call(this);_class4.prototype.__init53.call(this);_class4.prototype.__init54.call(this);_class4.prototype.__init55.call(this);_class4.prototype.__init56.call(this);_class4.prototype.__init57.call(this);_class4.prototype.__init58.call(this);_class4.prototype.__init59.call(this);_class4.prototype.__init60.call(this);_class4.prototype.__init61.call(this);_class4.prototype.__init62.call(this);_class4.prototype.__init63.call(this);_class4.prototype.__init64.call(this);;
|
|
1479
1506
|
this.setSVGSource(svgSource);
|
|
1480
1507
|
}
|
|
1481
1508
|
setSVGSource(svgSource) {
|
|
@@ -320,6 +320,33 @@ var Entity = class {
|
|
|
320
320
|
* fixed viewport. Off by default (children render unclipped). Canvas2D only.
|
|
321
321
|
*/
|
|
322
322
|
clipChildren = false;
|
|
323
|
+
/**
|
|
324
|
+
* Group this subtree's projected text into its own accessibility **region**,
|
|
325
|
+
* without clipping anything.
|
|
326
|
+
*
|
|
327
|
+
* The projection sorts every mirror into visual reading order, and it bands
|
|
328
|
+
* them into rows per region so that side-by-side columns stay contiguous runs
|
|
329
|
+
* in the DOM. That matters beyond reading order: a native `Selection` covers
|
|
330
|
+
* everything between its anchor and focus in DOM order, so two columns banded
|
|
331
|
+
* together let a vertical drag through one of them swallow the other.
|
|
332
|
+
*
|
|
333
|
+
* {@link clipChildren} also establishes a region, because a clipper is
|
|
334
|
+
* usually the column boundary you want. Reach for this flag when the two
|
|
335
|
+
* needs come apart — a sidebar, a card deck or any column that must not be
|
|
336
|
+
* absorbed by its neighbour's drag, but that draws nothing and has no reason
|
|
337
|
+
* to clip. Measured in a real app before this existed: a table-of-contents
|
|
338
|
+
* sidebar had to switch `clipChildren` on purely to escape the body column's
|
|
339
|
+
* bands, buying a per-frame `save`/`clip`/`restore` for an entity that paints
|
|
340
|
+
* nothing.
|
|
341
|
+
*
|
|
342
|
+
* Unlike `clipChildren`, this is honoured regardless of the node's box. The
|
|
343
|
+
* zero-area exemption on the clipping path exists because a zero-area clipper
|
|
344
|
+
* clips nothing; grouping is a declaration of intent that never consults
|
|
345
|
+
* geometry, and a pure grouping container often leaves `width`/`height` at 0.
|
|
346
|
+
*
|
|
347
|
+
* Off by default. Regions nest: the nearest enclosing region wins.
|
|
348
|
+
*/
|
|
349
|
+
a11yRegion = false;
|
|
323
350
|
// Lazily allocated (see _drivers above). Most entities never register a
|
|
324
351
|
// listener or an imperative animate() tween.
|
|
325
352
|
listeners = null;
|