@vectojs/markdown 0.20.1 → 0.20.3

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.
@@ -47,6 +47,13 @@ export declare class CodeBlock extends UIComponent {
47
47
  private grid;
48
48
  /** Raw (unhighlighted) lines of the last build, for prefix reuse in buildLines. */
49
49
  private rawLines;
50
+ /**
51
+ * Language the highlight segments were built under. Prefix reuse compares
52
+ * raw line text only, so a `setCode(code, otherLang)` with byte-identical
53
+ * lines would reuse segments highlighted with the WRONG language; the reuse
54
+ * predicate must also require this to equal the current `lang`.
55
+ */
56
+ private highlightLang;
50
57
  private cellWidth;
51
58
  private source;
52
59
  /** Bumped by {@link buildLines} and {@link setSelectable}; read by `Scene`. */
@@ -64,6 +71,12 @@ export declare class CodeBlock extends UIComponent {
64
71
  /** Memoized widest prepared line, keyed by the grid identity it came from. */
65
72
  private contentWidthGrid;
66
73
  private contentWidthValue;
74
+ /**
75
+ * The interactive horizontal scrollbar strip (#527), created lazily by
76
+ * {@link syncScrollTrack} the first time the block overflows. Kept, and merely
77
+ * disabled, when the overflow later disappears — see there for why.
78
+ */
79
+ private hTrack;
67
80
  private lang;
68
81
  private theme;
69
82
  /**
@@ -196,6 +209,17 @@ export declare class CodeBlock extends UIComponent {
196
209
  */
197
210
  private buildLines;
198
211
  private ensureGrid;
212
+ /**
213
+ * Fit the interactive scrollbar strip (#527) to the current overflow.
214
+ *
215
+ * Called from {@link render} rather than from `setWidth` or `buildLines`:
216
+ * `setWidth` is documented as costing nothing and `maxScrollX` costs a grid
217
+ * build, while `render` is about to pay for that grid anyway. Once created,
218
+ * the child is KEPT and merely de-`interactive`d when the overflow disappears
219
+ * — this runs inside the scene's tree walk, and removing a child mid-walk is
220
+ * how siblings get skipped.
221
+ */
222
+ private syncScrollTrack;
199
223
  /**
200
224
  * Not hit-testable, and deliberately still not `interactive`, even though the
201
225
  * block now consumes wheel events to scroll.
@@ -204,6 +228,10 @@ export declare class CodeBlock extends UIComponent {
204
228
  * hit-testing, so no a11y shadow node is needed. Creating one would place a
205
229
  * `pointer-events: auto` element above the transparent text mirror and swallow
206
230
  * the mousedown that starts a native drag-selection.
231
+ *
232
+ * Pointer-driven scrolling therefore lives on the {@link HScrollTrack} CHILD,
233
+ * whose shadow node covers only the bottom-padding strip below the last
234
+ * selectable carrier — never the text itself.
207
235
  */
208
236
  isPointInside(): boolean;
209
237
  render(r: IRenderer): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectojs/markdown",
3
- "version": "0.20.1",
3
+ "version": "0.20.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,7 +44,7 @@
44
44
  "test:e2e": "bun e2e/blockquote-layout.e2e.ts && bun e2e/stream-controller.e2e.ts && bun e2e/lazy-math.e2e.ts && bun e2e/paragraph-image-repaint.e2e.ts && bun e2e/inline-image.e2e.ts && bun e2e/selection-fidelity.e2e.ts && bun e2e/code-atlas-dpr.e2e.ts && bun e2e/set-max-width.e2e.ts && bun e2e/block-affordances.e2e.ts && bun e2e/single-tilde-ink.e2e.ts && bun e2e/superscript-ink.e2e.ts && bun e2e/ins-mark-ink.e2e.ts && bun e2e/container-ink.e2e.ts && bun e2e/abbr-ink.e2e.ts"
45
45
  },
46
46
  "dependencies": {
47
- "@vectojs/tex": "^0.1.0",
47
+ "@vectojs/tex": "^0.1.1",
48
48
  "marked": "^18.0.7"
49
49
  },
50
50
  "peerDependencies": {