jssm 5.159.1 → 5.160.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.
@@ -521,6 +521,9 @@ function base64url_to_bytes(text) {
521
521
  async function deflate_raw(bytes) {
522
522
  const stream = new CompressionStream('deflate-raw');
523
523
  const writer = stream.writable.getWriter();
524
+ // 6.0.3 made typed arrays generic over their backing buffer; the DOM
525
+ // `BufferSource` wants `Uint8Array<ArrayBuffer>` specifically, so narrow the
526
+ // ArrayBufferLike-backed input at the stream boundary. Runtime is unchanged.
524
527
  void writer.write(bytes);
525
528
  void writer.close();
526
529
  return new Uint8Array(await new Response(stream.readable).arrayBuffer());
@@ -546,6 +549,8 @@ const MAX_PERMALINK_INFLATE_BYTES = 5 * 1024 * 1024;
546
549
  async function inflate_raw(bytes) {
547
550
  const stream = new DecompressionStream('deflate-raw');
548
551
  const writer = stream.writable.getWriter();
552
+ // See deflate_raw: narrow the ArrayBufferLike-backed input to the
553
+ // ArrayBuffer-backed Uint8Array the DOM BufferSource wants under 6.0.3.
549
554
  void writer.write(bytes);
550
555
  void writer.close();
551
556
  // Read incrementally; stopping past the cap leaves the stream half-drained, so
@@ -118,6 +118,9 @@ function bytes_to_base64url(bytes) {
118
118
  async function deflate_raw(bytes) {
119
119
  const stream = new CompressionStream('deflate-raw');
120
120
  const writer = stream.writable.getWriter();
121
+ // 6.0.3 made typed arrays generic over their backing buffer; the DOM
122
+ // `BufferSource` wants `Uint8Array<ArrayBuffer>` specifically, so narrow the
123
+ // ArrayBufferLike-backed input at the stream boundary. Runtime is unchanged.
121
124
  void writer.write(bytes);
122
125
  void writer.close();
123
126
  return new Uint8Array(await new Response(stream.readable).arrayBuffer());
package/jssm.cli.d.cts CHANGED
@@ -14,7 +14,7 @@ declare const RENDER_TARGETS: readonly ["svg", "dot", "png", "jpeg", "html", "gi
14
14
  * A render target the CLI and library can produce. Derived from
15
15
  * {@link RENDER_TARGETS} so the type can never drift from the runtime enum.
16
16
  */
17
- declare type RenderTarget = typeof RENDER_TARGETS[number];
17
+ type RenderTarget = typeof RENDER_TARGETS[number];
18
18
  /**
19
19
  * Options accepted by `render()` and `renderSet()`.
20
20
  *
@@ -53,7 +53,7 @@ interface RasterResult {
53
53
  kind: 'raster';
54
54
  buffer: Uint8Array;
55
55
  }
56
- declare type RenderResult = TextResult | RasterResult;
56
+ type RenderResult = TextResult | RasterResult;
57
57
  /**
58
58
  * Base error class for render-time failures.
59
59
  */
@@ -110,7 +110,7 @@ interface RenderSetItemErr {
110
110
  index: number;
111
111
  error: Error;
112
112
  }
113
- declare type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
113
+ type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
114
114
  /**
115
115
  * Render multiple FSL source strings in parallel, returning one result
116
116
  * per input. Errors are captured per-input rather than aborting the whole
@@ -129,7 +129,7 @@ declare type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
129
129
  */
130
130
  declare function renderSet(inputs: string[], opts: RenderOptions): Promise<RenderSetItem[]>;
131
131
 
132
- declare type FlagType = 'string' | 'number' | 'boolean';
132
+ type FlagType = 'string' | 'number' | 'boolean';
133
133
  interface FlagSpec {
134
134
  short?: string;
135
135
  type?: FlagType;
package/jssm.cli.d.ts CHANGED
@@ -14,7 +14,7 @@ declare const RENDER_TARGETS: readonly ["svg", "dot", "png", "jpeg", "html", "gi
14
14
  * A render target the CLI and library can produce. Derived from
15
15
  * {@link RENDER_TARGETS} so the type can never drift from the runtime enum.
16
16
  */
17
- declare type RenderTarget = typeof RENDER_TARGETS[number];
17
+ type RenderTarget = typeof RENDER_TARGETS[number];
18
18
  /**
19
19
  * Options accepted by `render()` and `renderSet()`.
20
20
  *
@@ -53,7 +53,7 @@ interface RasterResult {
53
53
  kind: 'raster';
54
54
  buffer: Uint8Array;
55
55
  }
56
- declare type RenderResult = TextResult | RasterResult;
56
+ type RenderResult = TextResult | RasterResult;
57
57
  /**
58
58
  * Base error class for render-time failures.
59
59
  */
@@ -110,7 +110,7 @@ interface RenderSetItemErr {
110
110
  index: number;
111
111
  error: Error;
112
112
  }
113
- declare type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
113
+ type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
114
114
  /**
115
115
  * Render multiple FSL source strings in parallel, returning one result
116
116
  * per input. Errors are captured per-input rather than aborting the whole
@@ -129,7 +129,7 @@ declare type RenderSetItem = RenderSetItemOk | RenderSetItemErr;
129
129
  */
130
130
  declare function renderSet(inputs: string[], opts: RenderOptions): Promise<RenderSetItem[]>;
131
131
 
132
- declare type FlagType = 'string' | 'number' | 'boolean';
132
+ type FlagType = 'string' | 'number' | 'boolean';
133
133
  interface FlagSpec {
134
134
  short?: string;
135
135
  type?: FlagType;