@ai-markdown/core 3.0.1 → 3.1.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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![TypeScript declarations included](https://img.shields.io/badge/TypeScript-included-3178c6?logo=typescript&logoColor=white)](https://github.com/ai-markdown/ai-markdown/tree/main/packages/core)
8
8
  [![MIT license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/ai-markdown/ai-markdown/blob/main/LICENSE)
9
9
 
10
- Framework-independent orchestration for ai-markdown adapters, on the **3.0.0** train alongside the React and Vue adapters. It supplies pipeline sessions, block planning, cross-chunk contributions, aggregate footnote trees and streaming coordination. Applications install `@ai-markdown/react` or `@ai-markdown/vue`; adapter authors can install `@ai-markdown/core` and `@ai-markdown/engine` directly.
10
+ Framework-independent orchestration for ai-markdown adapters, on the same release train as the React and Vue adapters. It supplies pipeline sessions, block planning, cross-chunk contributions, aggregate footnote trees and streaming coordination. Applications install `@ai-markdown/react` or `@ai-markdown/vue`; adapter authors can install `@ai-markdown/core` and `@ai-markdown/engine` directly.
11
11
 
12
12
  This package was the private runtime in the legacy v2.14.1 release. It is now a real external dependency of both framework adapters, with an explicit public export list. The old `@ai-react-markdown/core` React package maps to `@ai-markdown/react`, not this package. See the [migration guide](https://ai-markdown.github.io/docs/guides/framework-transition/). Public contracts follow semantic versioning from 3.0.0; keep the shared packages at the same exact train version.
13
13
 
package/dist/index.cjs CHANGED
@@ -266,10 +266,12 @@ function buildBlocks(mdast, hast, source, options = {}) {
266
266
  continue;
267
267
  }
268
268
  let hastDigest;
269
+ let swallowedSource;
269
270
  let swallowedTaint = false;
270
271
  if (isRawHtmlBlock) {
271
272
  const d = computeHtmlBlockDigestWithExtent(el, source, mdastPos.end.offset);
272
273
  hastDigest = d.digest;
274
+ swallowedSource = source.slice(mdastPos.end.offset, d.maxEnd);
273
275
  const first = firstTaintAtOrAfter(mdastPos.end.offset);
274
276
  swallowedTaint = first < taintOffsets.length && taintOffsets[first] < d.maxEnd;
275
277
  }
@@ -282,6 +284,7 @@ function buildBlocks(mdast, hast, source, options = {}) {
282
284
  startColumn: mdastPos.start.column,
283
285
  hasReference,
284
286
  ...hastDigest !== void 0 ? { hastDigest } : {},
287
+ ...swallowedSource !== void 0 ? { swallowedSource } : {},
285
288
  ...swallowed?.hasFootnoteSection ? { containsFootnoteSection: true } : {},
286
289
  ...hasReference ? {
287
290
  taintLabels: {
@@ -856,6 +859,9 @@ function createPipelineSession() {
856
859
  provenance,
857
860
  incrementalParse,
858
861
  defListEnabled,
862
+ gfmTaskListItems = false,
863
+ // No default: omitted is its own (undeclared) state at the engine.
864
+ mathFlow,
859
865
  measure: measureHere = unmeasured
860
866
  }) {
861
867
  const phantomDefs = (0, import_engine4.buildPhantomSuffix)(targetPhantoms);
@@ -933,9 +939,13 @@ function createPipelineSession() {
933
939
  // already refuses to resume under a different profile, but the
934
940
  // retained TREES were still spliced against — a prefix frozen
935
941
  // under one profile must not survive into frames under the other.
936
- defListEnabled
942
+ defListEnabled,
943
+ gfmTaskListItems,
944
+ mathFlow
937
945
  ],
938
946
  defListEnabled,
947
+ gfmTaskListItems,
948
+ mathFlow,
939
949
  phantomSuffix,
940
950
  measure: measureHere
941
951
  });