@ai-matrx/content-ir 0.14.2 → 0.14.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.
package/dist/source.d.cts CHANGED
@@ -101,6 +101,11 @@ interface SourceBlock extends SourceSpan {
101
101
  /** Inline islands of a `prose` block, in document order. Empty otherwise. */
102
102
  readonly inlines: readonly SourceIsland[];
103
103
  }
104
+ /**
105
+ * Every callout spelling the renderer resolves (matrx-frontend
106
+ * components/markdown-core/syntax/callout-types.ts ALIASES — keep in step).
107
+ */
108
+ declare const CALLOUT_NAMES: ReadonlySet<string>;
104
109
  /**
105
110
  * Cut `text` into blocks whose raw concatenation is exactly `text`.
106
111
  * Never throws; unclosed constructs are islands with `complete: false`.
@@ -407,4 +412,4 @@ declare function looksLikeDisplayMath(inner: string): boolean;
407
412
  /** Map of `$$` opener offset → closer offset for every pair the renderer shows as math. */
408
413
  declare function pairDisplayMath(text: string): Map<number, number>;
409
414
 
410
- export { type BlockIslandType, type CodePointIndex, type DisturbedIsland, FENCE_WHITESPACE, type InlineIslandType, type InnerFenceLine, type IslandMeta, type IslandType, type MapOptions, type MappedPosition, type MappedRange, NESTING_FENCE_LANGUAGES, type ReadXmlTag, type SourceBlock, type SourceBlockKind, type SourceChange, type SourceEdit, type SourceIsland, type SourceSpan, SourceSpliceError, type SourceSpliceErrorCode, type SpliceIntegrity, type SpliceOptions, type SpliceResult, type TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
415
+ export { type BlockIslandType, CALLOUT_NAMES, type CodePointIndex, type DisturbedIsland, FENCE_WHITESPACE, type InlineIslandType, type InnerFenceLine, type IslandMeta, type IslandType, type MapOptions, type MappedPosition, type MappedRange, NESTING_FENCE_LANGUAGES, type ReadXmlTag, type SourceBlock, type SourceBlockKind, type SourceChange, type SourceEdit, type SourceIsland, type SourceSpan, SourceSpliceError, type SourceSpliceErrorCode, type SpliceIntegrity, type SpliceOptions, type SpliceResult, type TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
package/dist/source.d.ts CHANGED
@@ -101,6 +101,11 @@ interface SourceBlock extends SourceSpan {
101
101
  /** Inline islands of a `prose` block, in document order. Empty otherwise. */
102
102
  readonly inlines: readonly SourceIsland[];
103
103
  }
104
+ /**
105
+ * Every callout spelling the renderer resolves (matrx-frontend
106
+ * components/markdown-core/syntax/callout-types.ts ALIASES — keep in step).
107
+ */
108
+ declare const CALLOUT_NAMES: ReadonlySet<string>;
104
109
  /**
105
110
  * Cut `text` into blocks whose raw concatenation is exactly `text`.
106
111
  * Never throws; unclosed constructs are islands with `complete: false`.
@@ -407,4 +412,4 @@ declare function looksLikeDisplayMath(inner: string): boolean;
407
412
  /** Map of `$$` opener offset → closer offset for every pair the renderer shows as math. */
408
413
  declare function pairDisplayMath(text: string): Map<number, number>;
409
414
 
410
- export { type BlockIslandType, type CodePointIndex, type DisturbedIsland, FENCE_WHITESPACE, type InlineIslandType, type InnerFenceLine, type IslandMeta, type IslandType, type MapOptions, type MappedPosition, type MappedRange, NESTING_FENCE_LANGUAGES, type ReadXmlTag, type SourceBlock, type SourceBlockKind, type SourceChange, type SourceEdit, type SourceIsland, type SourceSpan, SourceSpliceError, type SourceSpliceErrorCode, type SpliceIntegrity, type SpliceOptions, type SpliceResult, type TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
415
+ export { type BlockIslandType, CALLOUT_NAMES, type CodePointIndex, type DisturbedIsland, FENCE_WHITESPACE, type InlineIslandType, type InnerFenceLine, type IslandMeta, type IslandType, type MapOptions, type MappedPosition, type MappedRange, NESTING_FENCE_LANGUAGES, type ReadXmlTag, type SourceBlock, type SourceBlockKind, type SourceChange, type SourceEdit, type SourceIsland, type SourceSpan, SourceSpliceError, type SourceSpliceErrorCode, type SpliceIntegrity, type SpliceOptions, type SpliceResult, type TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
package/dist/source.js CHANGED
@@ -512,6 +512,37 @@ var NOT_WHITESPACE = /\S/;
512
512
  var DIRECTIVE_OPEN = /^(:{2,})([A-Za-z][\w-]*)/;
513
513
  var MKDOCS_OPEN = /^(!!!|\?\?\?\+?)[ \t]+([A-Za-z][\w-]*)/;
514
514
  var CALLOUT_OPEN = /^>[ \t]*\[!([A-Za-z][\w-]*)\]([+-])?/;
515
+ var CALLOUT_NAMES = /* @__PURE__ */ new Set([
516
+ "note",
517
+ "seealso",
518
+ "example",
519
+ "tip",
520
+ "hint",
521
+ "important",
522
+ "warning",
523
+ "warn",
524
+ "attention",
525
+ "caution",
526
+ "danger",
527
+ "error",
528
+ "failure",
529
+ "fail",
530
+ "missing",
531
+ "bug",
532
+ "info",
533
+ "abstract",
534
+ "summary",
535
+ "tldr",
536
+ "todo",
537
+ "success",
538
+ "check",
539
+ "done",
540
+ "question",
541
+ "help",
542
+ "faq",
543
+ "quote",
544
+ "cite"
545
+ ]);
515
546
  var FOOTNOTE_DEF = /^\[\^([^\]\s]+)\]:/;
516
547
  function countStructuralBraces(source) {
517
548
  let opens = 0;
@@ -905,7 +936,7 @@ var Tokenizer = class {
905
936
  /** A blockquote whose first line is `> [!TYPE]…` — every following `>` line belongs to it. */
906
937
  callout(p, li, t) {
907
938
  const open = CALLOUT_OPEN.exec(t);
908
- if (!open) return null;
939
+ if (!open || !CALLOUT_NAMES.has(open[1].toLowerCase())) return null;
909
940
  let last = li;
910
941
  for (let k = li + 1; k < this.lineCount; k++) {
911
942
  if (!/^ {0,3}>/.test(this.lineText(k))) break;
@@ -1884,6 +1915,6 @@ function mapRange(changes, start, end, unit = "utf16") {
1884
1915
  return { start: newStart, end: newEnd, touched, collapsed: newEnd === newStart && end > start };
1885
1916
  }
1886
1917
 
1887
- export { FENCE_WHITESPACE, NESTING_FENCE_LANGUAGES, SourceSpliceError, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
1918
+ export { CALLOUT_NAMES, FENCE_WHITESPACE, NESTING_FENCE_LANGUAGES, SourceSpliceError, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, fenceNestsInnerFences, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, mapPosition, mapRange, pairDisplayMath, readXmlTag, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine };
1888
1919
  //# sourceMappingURL=source.js.map
1889
1920
  //# sourceMappingURL=source.js.map