@ai-matrx/content-ir 0.19.0 → 0.19.2
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/CHANGELOG.md +36 -0
- package/dist/index.cjs +95 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +85 -23
- package/dist/index.js.map +1 -1
- package/dist/source.cjs +95 -22
- package/dist/source.cjs.map +1 -1
- package/dist/source.d.cts +43 -1
- package/dist/source.d.ts +43 -1
- package/dist/source.js +85 -23
- package/dist/source.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,5 +7,5 @@ export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateR
|
|
|
7
7
|
export { ArrayItemKindBinding, BlockSchemaDraft, ConversionProblem, DroppedMetadata, FieldComparison, ItemKindRefCheck, JsonSchemaNode, KindJsonSchemaExport, KindJsonSchemaOptions, KindSchemaFromJsonResult, SavePlanEntry, SavePlanValidation, SchemaConversionResult, buildAgentSchemaWithRenderBlockSupport, collectReferencedKinds, collectSchemaReferencedKinds, compareWithExistingKindSchema, convertAiSchemaToBlockFields, fieldsToDbPayload, injectKindIntoObjectSchema, isDuplicateBlockSlug, kindSchemaFromJsonSchema, kindSchemaToJsonSchema, normalizeAiSchemaInput, runSchemaConversion, validateBlockSchemaSavePlan } from './convert.cjs';
|
|
8
8
|
export { AnyPartialKindEvent, IR_PARTIAL_KEY, KindVerdict, NODE_OUTCOME_KIND, NodeOutcomeWrapper, PartialKindEvent, PartialKindNode, PartialKindState, RUN_RESULT_KIND, RetractedKindEvent, RunResultWrapper, SupersededKindEvent, advancePartialKind, emitPayloadFence, emitPayloadJson, isProvisionalKind, isTerminalKindEvent, kindVerdictOf, makePartialKindStalenessGate, readNodeOutcomeValue, readOutputRef, readPartialKindEvent, readRunResultValue, rehydrateNodeOutcome, rehydrateRunResult, sanitizeInboundPartialKindMetadata, withRootKind } from './wire.cjs';
|
|
9
9
|
export { ACTION_BY_CLASS, CAPABILITY_BY_CLASS, CLASSES, DIRECTIVE_VERSION, DecodedDirective, DirectiveCapability, DirectiveClass, DirectiveDecodeError, DirectiveDisplay, DirectiveItemKindLookup, DirectiveItemsEdge, DirectiveNounCatalog, DirectiveNounEntry, DirectiveSlug, IN_CONTENT_CLASSES, ItemFact, KindDirectiveShell, RESERVED_PREFIX, SIDE_EFFECT_CLASSES, SLUG_PREFIX, asKindInstance, buildDirectiveSlug, buildKindDirective, capabilityOf, decodeDirective, directiveDisplay, directiveItemKindFromEdges, directiveSlugOf, executesAtOutputRoot, isDirectiveClass, isKindDirective, isLegacyShell, isReservedDirectiveSlug, itemFacts, itemSubtitle, itemTitle, legacyShellUses, looksLikeDirectiveHead, nounFamily, nounLabel, nounTitleColumn, parseDirectiveSlug, resetLegacyShellUses, resolvesInContent, titleCaseToken, tryDecodeDirective, tryDecodeDirectiveContent } from './directives.cjs';
|
|
10
|
-
export { AFTER_WINDOW, BacktickRuns, BlockIslandType, CALLOUT_NAMES, CodePointIndex, CodeRange, DisturbedIsland, FENCE_OPENER_WHITESPACE, FENCE_WHITESPACE, FenceEnd, FenceLineKind, FenceLines, FenceOpener, FenceReader, InlineIslandType, InnerFenceLine, IslandMeta, IslandType, MapOptions, MappedPosition, MappedRange, NESTING_FENCE_LANGUAGES, ReadXmlTag, SourceBlock, SourceBlockKind, SourceChange, SourceEdit, SourceIsland, SourceSpan, SourceSpliceError, SourceSpliceErrorCode, SpliceIntegrity, SpliceOptions, SpliceResult, TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, closeFence, codeSpanText, fenceLineKinds, fenceNestsInnerFences, fenceOpenerOf, fenceParts, findCodeRanges, isEscapedBracketMath, isMathPlaceholder, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, looksLikeOpenInlineMath, mapCodeRanges, mapPosition, mapRange, pairDisplayMath, parseFenceOpener, pendingDisplayMathOpener, readXmlTag, singleDollarAfter, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine } from './source.cjs';
|
|
10
|
+
export { AFTER_WINDOW, BacktickRuns, BlockIslandType, CALLOUT_NAMES, CodePointIndex, CodeRange, DisturbedIsland, FENCE_OPENER_WHITESPACE, FENCE_WHITESPACE, FenceEnd, FenceLineKind, FenceLines, FenceOpener, FenceReader, InlineIslandType, InnerFenceLine, IslandMeta, IslandType, MapOptions, MappedPosition, MappedRange, NESTING_FENCE_LANGUAGES, ReadXmlTag, SourceBlock, SourceBlockKind, SourceChange, SourceEdit, SourceIsland, SourceSpan, SourceSpliceError, SourceSpliceErrorCode, SpliceIntegrity, SpliceOptions, SpliceResult, TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, closeFence, codeSpanText, continuesTable, fenceLineKinds, fenceNestsInnerFences, fenceOpenerOf, fenceParts, findCodeRanges, findTableEnd, findTableStart, isEscapedBracketMath, isGfmDelimiterRow, isMathPlaceholder, isPipeLedRow, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, looksLikeOpenInlineMath, mapCodeRanges, mapPosition, mapRange, opensTable, pairDisplayMath, parseFenceOpener, pendingDisplayMathOpener, readXmlTag, rowCells, singleDollarAfter, singleDollarMathEnd, spliceSave, splitRowSegments, splitsSurrogatePair, startsPipelessTable, tableStartsAt, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine, unescapeCellPipes } from './source.cjs';
|
|
11
11
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateR
|
|
|
7
7
|
export { ArrayItemKindBinding, BlockSchemaDraft, ConversionProblem, DroppedMetadata, FieldComparison, ItemKindRefCheck, JsonSchemaNode, KindJsonSchemaExport, KindJsonSchemaOptions, KindSchemaFromJsonResult, SavePlanEntry, SavePlanValidation, SchemaConversionResult, buildAgentSchemaWithRenderBlockSupport, collectReferencedKinds, collectSchemaReferencedKinds, compareWithExistingKindSchema, convertAiSchemaToBlockFields, fieldsToDbPayload, injectKindIntoObjectSchema, isDuplicateBlockSlug, kindSchemaFromJsonSchema, kindSchemaToJsonSchema, normalizeAiSchemaInput, runSchemaConversion, validateBlockSchemaSavePlan } from './convert.js';
|
|
8
8
|
export { AnyPartialKindEvent, IR_PARTIAL_KEY, KindVerdict, NODE_OUTCOME_KIND, NodeOutcomeWrapper, PartialKindEvent, PartialKindNode, PartialKindState, RUN_RESULT_KIND, RetractedKindEvent, RunResultWrapper, SupersededKindEvent, advancePartialKind, emitPayloadFence, emitPayloadJson, isProvisionalKind, isTerminalKindEvent, kindVerdictOf, makePartialKindStalenessGate, readNodeOutcomeValue, readOutputRef, readPartialKindEvent, readRunResultValue, rehydrateNodeOutcome, rehydrateRunResult, sanitizeInboundPartialKindMetadata, withRootKind } from './wire.js';
|
|
9
9
|
export { ACTION_BY_CLASS, CAPABILITY_BY_CLASS, CLASSES, DIRECTIVE_VERSION, DecodedDirective, DirectiveCapability, DirectiveClass, DirectiveDecodeError, DirectiveDisplay, DirectiveItemKindLookup, DirectiveItemsEdge, DirectiveNounCatalog, DirectiveNounEntry, DirectiveSlug, IN_CONTENT_CLASSES, ItemFact, KindDirectiveShell, RESERVED_PREFIX, SIDE_EFFECT_CLASSES, SLUG_PREFIX, asKindInstance, buildDirectiveSlug, buildKindDirective, capabilityOf, decodeDirective, directiveDisplay, directiveItemKindFromEdges, directiveSlugOf, executesAtOutputRoot, isDirectiveClass, isKindDirective, isLegacyShell, isReservedDirectiveSlug, itemFacts, itemSubtitle, itemTitle, legacyShellUses, looksLikeDirectiveHead, nounFamily, nounLabel, nounTitleColumn, parseDirectiveSlug, resetLegacyShellUses, resolvesInContent, titleCaseToken, tryDecodeDirective, tryDecodeDirectiveContent } from './directives.js';
|
|
10
|
-
export { AFTER_WINDOW, BacktickRuns, BlockIslandType, CALLOUT_NAMES, CodePointIndex, CodeRange, DisturbedIsland, FENCE_OPENER_WHITESPACE, FENCE_WHITESPACE, FenceEnd, FenceLineKind, FenceLines, FenceOpener, FenceReader, InlineIslandType, InnerFenceLine, IslandMeta, IslandType, MapOptions, MappedPosition, MappedRange, NESTING_FENCE_LANGUAGES, ReadXmlTag, SourceBlock, SourceBlockKind, SourceChange, SourceEdit, SourceIsland, SourceSpan, SourceSpliceError, SourceSpliceErrorCode, SpliceIntegrity, SpliceOptions, SpliceResult, TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, closeFence, codeSpanText, fenceLineKinds, fenceNestsInnerFences, fenceOpenerOf, fenceParts, findCodeRanges, isEscapedBracketMath, isMathPlaceholder, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, looksLikeOpenInlineMath, mapCodeRanges, mapPosition, mapRange, pairDisplayMath, parseFenceOpener, pendingDisplayMathOpener, readXmlTag, singleDollarAfter, singleDollarMathEnd, spliceSave, splitsSurrogatePair, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine } from './source.js';
|
|
10
|
+
export { AFTER_WINDOW, BacktickRuns, BlockIslandType, CALLOUT_NAMES, CodePointIndex, CodeRange, DisturbedIsland, FENCE_OPENER_WHITESPACE, FENCE_WHITESPACE, FenceEnd, FenceLineKind, FenceLines, FenceOpener, FenceReader, InlineIslandType, InnerFenceLine, IslandMeta, IslandType, MapOptions, MappedPosition, MappedRange, NESTING_FENCE_LANGUAGES, ReadXmlTag, SourceBlock, SourceBlockKind, SourceChange, SourceEdit, SourceIsland, SourceSpan, SourceSpliceError, SourceSpliceErrorCode, SpliceIntegrity, SpliceOptions, SpliceResult, TokenizeOptions, XmlContainerTracker, blockAt, blockEdit, blockRangeEdit, buildCodePointIndex, classifyInnerFenceLine, closeFence, codeSpanText, continuesTable, fenceLineKinds, fenceNestsInnerFences, fenceOpenerOf, fenceParts, findCodeRanges, findTableEnd, findTableStart, isEscapedBracketMath, isGfmDelimiterRow, isMathPlaceholder, isPipeLedRow, isSingleDollarMath, islandEdit, joinSource, listIslands, looksLikeDisplayMath, looksLikeOpenInlineMath, mapCodeRanges, mapPosition, mapRange, opensTable, pairDisplayMath, parseFenceOpener, pendingDisplayMathOpener, readXmlTag, rowCells, singleDollarAfter, singleDollarMathEnd, spliceSave, splitRowSegments, splitsSurrogatePair, startsPipelessTable, tableStartsAt, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine, unescapeCellPipes } from './source.js';
|
|
11
11
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -5642,7 +5642,7 @@ function pendingCodeSpanStart(text) {
|
|
|
5642
5642
|
const n = text.length;
|
|
5643
5643
|
if (n === 0 || /\n[ \t]*\n[ \t]*$/.test(text)) return -1;
|
|
5644
5644
|
const lastLine = text.slice(text.lastIndexOf("\n") + 1);
|
|
5645
|
-
if (lastLine && /^(?: {0,3}>[ \t]?)*[ \t]*$/.test(lastLine)) return pendingCodeSpanStart(`${text}x`);
|
|
5645
|
+
if (lastLine && /^(?: {0,3}>[ \t]?)*[ \t\r]*$/.test(lastLine)) return pendingCodeSpanStart(`${text}x`);
|
|
5646
5646
|
const s = scan(text);
|
|
5647
5647
|
const para = s.pendingPara;
|
|
5648
5648
|
if (s.endsInFence || para === -1) return -1;
|
|
@@ -5806,7 +5806,7 @@ function isVariableChain(content, after) {
|
|
|
5806
5806
|
const run = /^[A-Za-z0-9_]+/.exec(after)?.[0];
|
|
5807
5807
|
if (!run) return false;
|
|
5808
5808
|
if (after.length === 1) return false;
|
|
5809
|
-
if (/^[A-Za-z_][A-Za-z0-9_]*[.@-]$/.test(content)) return true;
|
|
5809
|
+
if (/^[A-Za-z_][A-Za-z0-9_]*(?:[.@-]|->|::)$/.test(content)) return true;
|
|
5810
5810
|
return IDENTIFIER.test(content) && !MATH_SUFFIX.test(run);
|
|
5811
5811
|
}
|
|
5812
5812
|
var FUNCTION_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -6211,7 +6211,7 @@ var Tokenizer = class {
|
|
|
6211
6211
|
if (close >= span) this.provisionalFrom = Math.min(this.provisionalFrom, open);
|
|
6212
6212
|
}
|
|
6213
6213
|
}
|
|
6214
|
-
for (const pad of ["`", "``", "```", "~~~"]) {
|
|
6214
|
+
for (const pad of ["`", "``", "```", "~~~", "$"]) {
|
|
6215
6215
|
const alt = pairDisplayMath(text + pad);
|
|
6216
6216
|
for (const [open, close] of this.mathPairs) {
|
|
6217
6217
|
if (alt.get(open) !== close) this.provisionalFrom = Math.min(this.provisionalFrom, open);
|
|
@@ -6243,19 +6243,6 @@ var Tokenizer = class {
|
|
|
6243
6243
|
provisionalFrom = Number.POSITIVE_INFINITY;
|
|
6244
6244
|
/** Streaming: the text ends in a lone CR whose LF has not arrived yet. */
|
|
6245
6245
|
pendingCR = false;
|
|
6246
|
-
/**
|
|
6247
|
-
* Streaming: an open last line that begins with `{` is undecided — each new
|
|
6248
|
-
* byte can balance or unbalance its braces and flip the whole line between
|
|
6249
|
-
* prose and a JSON island — so it is provisional until it ends (G5).
|
|
6250
|
-
* (A lone HTML tag on that line is held by {@link holdUndecidedTail}.)
|
|
6251
|
-
*/
|
|
6252
|
-
markOpenJsonTail() {
|
|
6253
|
-
const last = this.lineStarts.length - 1;
|
|
6254
|
-
if (!this.isOpenTail(last)) return;
|
|
6255
|
-
if (this.lineText(last).trim().startsWith("{")) {
|
|
6256
|
-
this.provisionalFrom = Math.min(this.provisionalFrom, this.lineStarts[last]);
|
|
6257
|
-
}
|
|
6258
|
-
}
|
|
6259
6246
|
/**
|
|
6260
6247
|
* `text.indexOf(needle, from)` in O(log k): the first query for a needle
|
|
6261
6248
|
* indexes all of its occurrences once, so repeated searches for a closer
|
|
@@ -6290,7 +6277,7 @@ var Tokenizer = class {
|
|
|
6290
6277
|
const rest = this.n - pe;
|
|
6291
6278
|
if (rest === 0) return true;
|
|
6292
6279
|
const tail = this.text.slice(pe);
|
|
6293
|
-
return /^(?:\r\n|\r|\n)[ \t]*$/.test(tail);
|
|
6280
|
+
return /^(?:\r\n|\r|\n)[ \t\r]*$/.test(tail);
|
|
6294
6281
|
}
|
|
6295
6282
|
/**
|
|
6296
6283
|
* Streaming: an open block that may still turn back into prose — a `$$`
|
|
@@ -6299,7 +6286,9 @@ var Tokenizer = class {
|
|
|
6299
6286
|
* or any opener that is itself still arriving on the open last line.
|
|
6300
6287
|
*/
|
|
6301
6288
|
mayDissolve(block) {
|
|
6302
|
-
if (!this.streaming
|
|
6289
|
+
if (!this.streaming) return false;
|
|
6290
|
+
if (block.start >= this.provisionalFrom) return true;
|
|
6291
|
+
if (block.complete) return false;
|
|
6303
6292
|
if (block.type === "math_block" || block.type === "json") return true;
|
|
6304
6293
|
return this.isOpenTail(this.lineOf(block.start));
|
|
6305
6294
|
}
|
|
@@ -6338,7 +6327,6 @@ var Tokenizer = class {
|
|
|
6338
6327
|
return this.text.slice(this.lineStarts[li], this.contentEnds[li]);
|
|
6339
6328
|
}
|
|
6340
6329
|
run() {
|
|
6341
|
-
if (this.streaming) this.markOpenJsonTail();
|
|
6342
6330
|
let pos = 0;
|
|
6343
6331
|
while (pos < this.n) {
|
|
6344
6332
|
const li = this.lineOf(pos);
|
|
@@ -6576,7 +6564,7 @@ var Tokenizer = class {
|
|
|
6576
6564
|
return { type, start, end, complete, meta };
|
|
6577
6565
|
}
|
|
6578
6566
|
frontMatter(li, t) {
|
|
6579
|
-
const fence = this.lineText(li);
|
|
6567
|
+
const fence = this.lineText(li).replace(/^\uFEFF/, "");
|
|
6580
6568
|
if (fence !== "---" && fence !== "+++" || t !== fence) return null;
|
|
6581
6569
|
const toml = fence === "+++";
|
|
6582
6570
|
let sawContent = false;
|
|
@@ -6587,9 +6575,13 @@ var Tokenizer = class {
|
|
|
6587
6575
|
}
|
|
6588
6576
|
if (!NOT_WHITESPACE.test(line)) continue;
|
|
6589
6577
|
const shaped = toml ? /^\s*(?:[A-Za-z0-9_."-]+\s*=|\[|#)/.test(line) : /^(?:[A-Za-z0-9_"'-][^:]*:(?:\s|$)|\s+\S|-\s|#)/.test(line);
|
|
6590
|
-
if (!shaped)
|
|
6578
|
+
if (!shaped) {
|
|
6579
|
+
if (this.isOpenTail(k)) break;
|
|
6580
|
+
return null;
|
|
6581
|
+
}
|
|
6591
6582
|
sawContent = true;
|
|
6592
6583
|
}
|
|
6584
|
+
if (this.streaming) return this.island("front_matter", 0, this.n, false, { format: toml ? "toml" : "yaml" });
|
|
6593
6585
|
return null;
|
|
6594
6586
|
}
|
|
6595
6587
|
/**
|
|
@@ -6990,7 +6982,7 @@ var Tokenizer = class {
|
|
|
6990
6982
|
const block = this.detectBlock(this.lineStarts[k], k, false);
|
|
6991
6983
|
if (block) {
|
|
6992
6984
|
breakLine = k;
|
|
6993
|
-
if (this.mayDissolve(block)
|
|
6985
|
+
if (this.mayDissolve(block)) {
|
|
6994
6986
|
this.undecidedBreaks.add(end);
|
|
6995
6987
|
}
|
|
6996
6988
|
break;
|
|
@@ -7621,6 +7613,76 @@ function mapRange(changes, start, end, unit = "utf16") {
|
|
|
7621
7613
|
return { start: newStart, end: newEnd, touched, collapsed: newEnd === newStart && end > start };
|
|
7622
7614
|
}
|
|
7623
7615
|
|
|
7624
|
-
|
|
7616
|
+
// source/gfm-table.ts
|
|
7617
|
+
function splitRowSegments(line) {
|
|
7618
|
+
const segments = [];
|
|
7619
|
+
let start = 0;
|
|
7620
|
+
for (let i = 0; i < line.length; i += 1) {
|
|
7621
|
+
const ch = line[i];
|
|
7622
|
+
if (ch === "\\") {
|
|
7623
|
+
i += 1;
|
|
7624
|
+
continue;
|
|
7625
|
+
}
|
|
7626
|
+
if (ch === "|") {
|
|
7627
|
+
segments.push(line.slice(start, i));
|
|
7628
|
+
start = i + 1;
|
|
7629
|
+
}
|
|
7630
|
+
}
|
|
7631
|
+
segments.push(line.slice(start));
|
|
7632
|
+
return segments;
|
|
7633
|
+
}
|
|
7634
|
+
function rowCells(line) {
|
|
7635
|
+
const cells = splitRowSegments(line).map((cell) => cell.trim());
|
|
7636
|
+
if (cells.length > 1 && cells[0] === "") cells.shift();
|
|
7637
|
+
if (cells.length > 1 && cells[cells.length - 1] === "") cells.pop();
|
|
7638
|
+
else if (cells.length === 1 && cells[0] === "") cells.pop();
|
|
7639
|
+
return cells;
|
|
7640
|
+
}
|
|
7641
|
+
function unescapeCellPipes(cell) {
|
|
7642
|
+
return cell.replace(/\\\|/g, "|");
|
|
7643
|
+
}
|
|
7644
|
+
var BLOCK_START = /^(?:[-+*](?:\s|$)|\d{1,9}[.)](?:\s|$)|>|#{1,6}(?:\s|$)|```|~~~|(?:-\s*){3,}$|(?:\*\s*){3,}$|(?:_\s*){3,}$)/;
|
|
7645
|
+
var DELIMITER_CELL = /^:?-+:?$/;
|
|
7646
|
+
function isGfmDelimiterRow(line) {
|
|
7647
|
+
const trimmed = line.trim();
|
|
7648
|
+
if (!trimmed.includes("|")) return false;
|
|
7649
|
+
const cells = rowCells(trimmed);
|
|
7650
|
+
return cells.length > 0 && cells.every((cell) => DELIMITER_CELL.test(cell));
|
|
7651
|
+
}
|
|
7652
|
+
function isPipeLedRow(line) {
|
|
7653
|
+
const trimmed = line.trim();
|
|
7654
|
+
return trimmed.startsWith("|") && trimmed.includes("|", 1);
|
|
7655
|
+
}
|
|
7656
|
+
function startsPipelessTable(header, delimiter) {
|
|
7657
|
+
const head = header.trim();
|
|
7658
|
+
if (!head || head.startsWith("|") || BLOCK_START.test(head)) return false;
|
|
7659
|
+
if (splitRowSegments(head).length < 2) return false;
|
|
7660
|
+
if (delimiter === void 0 || !isGfmDelimiterRow(delimiter)) return false;
|
|
7661
|
+
return rowCells(head).length === rowCells(delimiter.trim()).length;
|
|
7662
|
+
}
|
|
7663
|
+
function continuesTable(line) {
|
|
7664
|
+
const trimmed = line.trim();
|
|
7665
|
+
if (!trimmed) return false;
|
|
7666
|
+
if (trimmed.startsWith("|")) return trimmed.includes("|", 1);
|
|
7667
|
+
return splitRowSegments(trimmed).length > 1 && !BLOCK_START.test(trimmed);
|
|
7668
|
+
}
|
|
7669
|
+
function opensTable(lines, index) {
|
|
7670
|
+
const line = lines[index] ?? "";
|
|
7671
|
+
return isPipeLedRow(line) || startsPipelessTable(line, lines[index + 1]);
|
|
7672
|
+
}
|
|
7673
|
+
function tableStartsAt(lines, index) {
|
|
7674
|
+
return opensTable(lines, index) && isGfmDelimiterRow(lines[index + 1] ?? "");
|
|
7675
|
+
}
|
|
7676
|
+
function findTableStart(lines, from = 0) {
|
|
7677
|
+
for (let i = Math.max(0, from); i < lines.length; i += 1) if (opensTable(lines, i)) return i;
|
|
7678
|
+
return -1;
|
|
7679
|
+
}
|
|
7680
|
+
function findTableEnd(lines, start) {
|
|
7681
|
+
let end = Math.min(lines.length, start + 2);
|
|
7682
|
+
while (end < lines.length && continuesTable(lines[end] ?? "")) end += 1;
|
|
7683
|
+
return end;
|
|
7684
|
+
}
|
|
7685
|
+
|
|
7686
|
+
export { ACTION_BY_CLASS, AFTER_WINDOW, BacktickRuns, CALLOUT_NAMES, CAPABILITY_BY_CLASS, CLASSES, DIRECTIVE_VERSION, DirectiveDecodeError, FENCE_OPENER_WHITESPACE, FENCE_WHITESPACE, FenceReader, IN_CONTENT_CLASSES, IR_ENVELOPE_CACHE_VERSION, IR_ENVELOPE_KEY, IR_PARTIAL_KEY, IR_VERSION, IrTree, JSON_DISCRIMINATOR, JsonStreamTokenizer, KIND_KEY, KindStorageError, KindStreamParser, NESTING_FENCE_LANGUAGES, NODE_OUTCOME_KIND, ParseSession, RESERVED_PREFIX, ROOT_STORAGE_NAME, RUN_RESULT_KIND, SIDE_EFFECT_CLASSES, SLUG_PREFIX, SourceSpliceError, XmlContainerTracker, advancePartialKind, asKindInstance, blockAt, blockEdit, blockRangeEdit, buildAgentSchemaWithRenderBlockSupport, buildCodePointIndex, buildCompliantKindSnapshot, buildDirectiveSlug, buildKindDirective, capabilityOf, classifyInboundEnvelopeMetadata, classifyInnerFenceLine, closeFence, codeSpanText, collectReferencedKinds, collectSchemaReferencedKinds, compareWithExistingKindSchema, continuesTable, convertAiSchemaToBlockFields, createFingerprinter, createKindStreamParser, createKindValidator, decodeDirective, describeDualGateFailure, directiveDisplay, directiveItemKindFromEdges, directiveSlugOf, disposeParseSession, emitPayloadFence, emitPayloadJson, emptyValueForFieldSchema, envelopeCacheFromEnvelopes, envelopeFromCompleteValue, executesAtOutputRoot, fenceDiscriminator, fenceLineKinds, fenceNestsInnerFences, fenceOpenerOf, fenceParts, fieldsToDbPayload, findCodeRanges, findTableEnd, findTableStart, fingerprintText, formatBlockLabel, getParseSession, injectKindIntoObjectSchema, irPathIsUnderOrEqual, irPathKey, irPathLabel, irPathsEqual, isCanonicalBlockIR, isDirectiveClass, isDuplicateBlockSlug, isEmptyResidue, isEscapedBracketMath, isGfmDelimiterRow, isIrEnvelopeCache, isJsonAnyField, isKindDirective, isLegacyShell, isMathPlaceholder, isPipeLedRow, isProvisionalKind, isReservedDirectiveSlug, isScalarArrayType, isSingleDollarMath, isTerminalKindEvent, islandEdit, itemFacts, itemSubtitle, itemTitle, joinSource, kindSchemaFromJsonSchema, kindSchemaToJsonSchema, kindSchemaToStorage, kindVerdictOf, legacyShellUses, listIslands, looksLikeDirectiveHead, looksLikeDisplayMath, looksLikeOpenInlineMath, makePartialKindStalenessGate, mapCodeRanges, mapPosition, mapRange, mergeResidueIntoValue, normalizeAiSchemaInput, normalizeJsonRegion, nounFamily, nounLabel, nounTitleColumn, openParseSession, opensTable, pairDisplayMath, parseDirectiveSlug, parseFenceOpener, pendingDisplayMathOpener, readEnvelope, readNodeOutcomeValue, readObjectKind, readOutputRef, readPartialKindEvent, readRunResultValue, readXmlTag, reconstructRegionValue, rehydrateNodeOutcome, rehydrateRunResult, resetLegacyShellUses, resolvesInContent, reuseEnvelopeIfCurrent, rowCells, runKindDualGate, runSchemaConversion, sanitizeInboundEnvelopeMetadata, sanitizeInboundPartialKindMetadata, scalarArrayItemType, schemaLayoutMode, schemaStructureDepth, setJsonRootKeyLookup, singleDollarAfter, singleDollarMathEnd, spliceSave, splitRowSegments, splitsSurrogatePair, startsPipelessTable, storageToKindSchema, stripKindDeep, tableStartsAt, titleCaseToken, toCodePointOffset, toUtf16Offset, tokenizeSource, trimFenceLine, tryDecodeDirective, tryDecodeDirectiveContent, unescapeCellPipes, validateBlockSchemaSavePlan, validateStructuralLeg, withRootKind, xmlDiscriminator };
|
|
7625
7687
|
//# sourceMappingURL=index.js.map
|
|
7626
7688
|
//# sourceMappingURL=index.js.map
|