@vectojs/core 1.32.7 → 1.34.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/text.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkFQ2565ITjs = require('./chunk-FQ2565IT.js');
5
+ var _chunkUEIZDNK7js = require('./chunk-UEIZDNK7.js');
6
6
 
7
7
  // src/text/index.ts
8
8
  var _text = require('@vectojs/text'); _createStarExport(_text);
9
9
 
10
10
 
11
11
 
12
- exports.MSDFTextEntity = _chunkFQ2565ITjs.MSDFTextEntity; exports.SVGEntity = _chunkFQ2565ITjs.SVGEntity;
12
+ exports.MSDFTextEntity = _chunkUEIZDNK7js.MSDFTextEntity; exports.SVGEntity = _chunkUEIZDNK7js.SVGEntity;
package/dist/text.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MSDFTextEntity,
3
3
  SVGEntity
4
- } from "./chunk-YTGGL4I4.mjs";
4
+ } from "./chunk-VFQMETOR.mjs";
5
5
 
6
6
  // src/text/index.ts
7
7
  export * from "@vectojs/text";
@@ -178,6 +178,20 @@ export interface ContentProjection {
178
178
  * shaping, and bidi boundaries cannot drift between the two surfaces.
179
179
  */
180
180
  grid?: PreparedContentGrid;
181
+ /**
182
+ * Confine the projected text's paint to the projection element's own box.
183
+ *
184
+ * Opt in when the entity's `render()` clips its own drawing, so the two
185
+ * surfaces agree on where the content ends. Without it the canvas clips and
186
+ * the DOM copy does not, and a selection highlight over content wider than
187
+ * the box paints past the entity onto whatever is drawn beside it — the
188
+ * defect a horizontally scrollable code block exhibits.
189
+ *
190
+ * Off by default, because the projection element is deliberately unclipped:
191
+ * `Scene` relies on that so selection can start in an entity's blank/padding
192
+ * regions and extend beyond its bounds.
193
+ */
194
+ clipToBounds?: boolean;
181
195
  }
182
196
  /** Typography for a native input projected by the accessibility layer. */
183
197
  export interface TextInputStyle {
@@ -640,6 +654,33 @@ export declare abstract class Entity {
640
654
  * fixed viewport. Off by default (children render unclipped). Canvas2D only.
641
655
  */
642
656
  clipChildren: boolean;
657
+ /**
658
+ * Group this subtree's projected text into its own accessibility **region**,
659
+ * without clipping anything.
660
+ *
661
+ * The projection sorts every mirror into visual reading order, and it bands
662
+ * them into rows per region so that side-by-side columns stay contiguous runs
663
+ * in the DOM. That matters beyond reading order: a native `Selection` covers
664
+ * everything between its anchor and focus in DOM order, so two columns banded
665
+ * together let a vertical drag through one of them swallow the other.
666
+ *
667
+ * {@link clipChildren} also establishes a region, because a clipper is
668
+ * usually the column boundary you want. Reach for this flag when the two
669
+ * needs come apart — a sidebar, a card deck or any column that must not be
670
+ * absorbed by its neighbour's drag, but that draws nothing and has no reason
671
+ * to clip. Measured in a real app before this existed: a table-of-contents
672
+ * sidebar had to switch `clipChildren` on purely to escape the body column's
673
+ * bands, buying a per-frame `save`/`clip`/`restore` for an entity that paints
674
+ * nothing.
675
+ *
676
+ * Unlike `clipChildren`, this is honoured regardless of the node's box. The
677
+ * zero-area exemption on the clipping path exists because a zero-area clipper
678
+ * clips nothing; grouping is a declaration of intent that never consults
679
+ * geometry, and a pure grouping container often leaves `width`/`height` at 0.
680
+ *
681
+ * Off by default. Regions nest: the nearest enclosing region wins.
682
+ */
683
+ a11yRegion: boolean;
643
684
  protected listeners: Map<VectoEvent, Array<(e: any) => void>> | null;
644
685
  /** Capture-phase listeners (fired root→target before bubble). */
645
686
  protected captureListeners: Map<VectoEvent, Array<(e: any) => void>> | null;