@vectojs/core 1.34.2 → 1.35.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/index.js CHANGED
@@ -6212,7 +6212,7 @@ var Scene = (_class15 = class _Scene {
6212
6212
  return;
6213
6213
  }
6214
6214
  const projection = node.getContentProjection(
6215
- lineBand ? { minY: lineBand.minY, maxY: lineBand.maxY } : void 0
6215
+ lineBand ? { minY: lineBand.minY, maxY: lineBand.maxY, textOnly: tier === "coarse" } : tier === "coarse" ? { textOnly: true } : void 0
6216
6216
  );
6217
6217
  if (!projection || !projection.text) {
6218
6218
  releaseProjectionEl();
@@ -6316,6 +6316,12 @@ var Scene = (_class15 = class _Scene {
6316
6316
  runElement.style.verticalAlign = "top";
6317
6317
  runElement.style.unicodeBidi = "isolate";
6318
6318
  runElement.dir = "ltr";
6319
+ } else if (run.width !== void 0) {
6320
+ runElement.style.display = "inline-block";
6321
+ runElement.style.width = `${run.width}px`;
6322
+ runElement.style.boxSizing = "border-box";
6323
+ runElement.style.whiteSpace = "pre";
6324
+ runElement.style.verticalAlign = "top";
6319
6325
  }
6320
6326
  lineElement.appendChild(runElement);
6321
6327
  }
package/dist/index.mjs CHANGED
@@ -6211,7 +6211,7 @@ var Scene = class _Scene {
6211
6211
  return;
6212
6212
  }
6213
6213
  const projection = node.getContentProjection(
6214
- lineBand ? { minY: lineBand.minY, maxY: lineBand.maxY } : void 0
6214
+ lineBand ? { minY: lineBand.minY, maxY: lineBand.maxY, textOnly: tier === "coarse" } : tier === "coarse" ? { textOnly: true } : void 0
6215
6215
  );
6216
6216
  if (!projection || !projection.text) {
6217
6217
  releaseProjectionEl();
@@ -6315,6 +6315,12 @@ var Scene = class _Scene {
6315
6315
  runElement.style.verticalAlign = "top";
6316
6316
  runElement.style.unicodeBidi = "isolate";
6317
6317
  runElement.dir = "ltr";
6318
+ } else if (run.width !== void 0) {
6319
+ runElement.style.display = "inline-block";
6320
+ runElement.style.width = `${run.width}px`;
6321
+ runElement.style.boxSizing = "border-box";
6322
+ runElement.style.whiteSpace = "pre";
6323
+ runElement.style.verticalAlign = "top";
6318
6324
  }
6319
6325
  lineElement.appendChild(runElement);
6320
6326
  }
@@ -144,6 +144,18 @@ export interface ContentProjectionHint {
144
144
  */
145
145
  minY?: number;
146
146
  maxY?: number;
147
+ /**
148
+ * When `true`, the caller only needs {@link ContentProjection.text} — no
149
+ * `lines`, no `grid`. Entities receiving this should return the full source
150
+ * text without building per-line or per-glyph structures, which avoids the
151
+ * O(glyphs) layout walk that the coarse resident tier would discard anyway.
152
+ *
153
+ * Entities may ignore this hint and still return `lines`; the caller will
154
+ * simply not use them. Returning fewer than all lines is **not** safe under
155
+ * this hint: if `lines` is non-empty, Scene interprets it as the line
156
+ * window, which must cover the whole text for correctness.
157
+ */
158
+ textOnly?: boolean;
147
159
  }
148
160
  /**
149
161
  * Whether a line at `y` of height `height` is worth projecting under `hint`.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectojs/core",
3
- "version": "1.34.2",
3
+ "version": "1.35.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },