@ai-matrx/content-ir 0.17.0 → 0.18.1
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 +74 -1
- package/dist/index.cjs +406 -310
- 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 +401 -311
- package/dist/index.js.map +1 -1
- package/dist/source.cjs +406 -310
- package/dist/source.cjs.map +1 -1
- package/dist/source.d.cts +124 -39
- package/dist/source.d.ts +124 -39
- package/dist/source.js +401 -311
- package/dist/source.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.1 — 2026-09-25
|
|
4
|
+
|
|
5
|
+
**Carries: RC-B10 only** (the one code-range rule). No RC-B3 work is pending
|
|
6
|
+
after the 0.18.0 tag; 0.18.0 itself (RC-B3's single-dollar release) ALSO
|
|
7
|
+
carried RC-B10 stages a and b, swept onto main before that tag — recorded
|
|
8
|
+
here because its entry does not mention them.
|
|
9
|
+
|
|
10
|
+
**`/source`: THE one code-range rule is the renderer's rule** (RC-B10 ruling,
|
|
11
|
+
REGISTER rulings ledger). `source/code-ranges.ts` owns it: a backtick fence
|
|
12
|
+
opens where a line's trimmed text starts with ``` at ANY indent (list items at
|
|
13
|
+
any depth), after stripping blockquote `>` prefixes; a tilde fence opens at
|
|
14
|
+
≤ 3 spaces relative to its container (list content column); a backtick fence
|
|
15
|
+
closes by the nested-fence rule (with the strict retry) or the renderer's
|
|
16
|
+
line-end closer (`code````), and inside ```json a backtick run in a JSON
|
|
17
|
+
string is text; a blockquoted fence ends with its quote. Strict CommonMark's
|
|
18
|
+
"4+ spaces is not a fence" is rejected on purpose — users see what the
|
|
19
|
+
renderer's splitter draws. Phases follow the renderer: the splitter's
|
|
20
|
+
any-indent backtick fences first, then remark inside each prose segment
|
|
21
|
+
(blockquote, list-marker-line and tilde fences, code spans).
|
|
22
|
+
- New exports: `fenceOpenerOf`, `closeFence`, `FenceReader` (the streaming
|
|
23
|
+
closer), `BacktickRuns` (the code-span pairing table), `fenceLineKinds`
|
|
24
|
+
(per-line prose/open/body/close), types `FenceOpener`, `FenceLines`,
|
|
25
|
+
`FenceEnd`, `FenceLineKind`.
|
|
26
|
+
- The tokenizer (0.18.0) and `XmlContainerTracker` (this release) read fences
|
|
27
|
+
only through these; their private copies are deleted.
|
|
28
|
+
- Corpus: 136,662/136,662 byte-identical; every tokenizer backtick-fence
|
|
29
|
+
island (17,518) is exactly one `findCodeRanges` fence (the 0.17 rule missed
|
|
30
|
+
92); display-math pairing unchanged on every row. Renderer blocks ⊆
|
|
31
|
+
tokenizer islands (matrx-frontend `source-covers-renderer`, container
|
|
32
|
+
fences added). Vectors: `__tests__/fixtures/code-range-vectors.json` (25,
|
|
33
|
+
incl. stored-row shapes with every word replaced) and the Python twin's
|
|
34
|
+
`fence-nesting-vectors.json` (container + stored-row documents).
|
|
35
|
+
- Consumer action: none — refresh to latest.
|
|
36
|
+
|
|
37
|
+
## 0.18.0 — 2026-09-25
|
|
38
|
+
|
|
39
|
+
**`/source` `isSingleDollarMath`: `$FC$` is math.** (RC-B9 verifier, RC-B3.)
|
|
40
|
+
`where $FC$ is fixed costs.` drew literal dollars on screen and in every
|
|
41
|
+
export, because the rule wanted an operator, a lone variable or a TeX
|
|
42
|
+
command. It now follows Pandoc's `tex_math_dollars` delimiters (what
|
|
43
|
+
remark-math approximates, and how ChatGPT and Claude render): the opener is
|
|
44
|
+
followed by a non-space; the closer is preceded by a non-space and not
|
|
45
|
+
followed by a digit. `$5 and $10`, `$5-$10`, `$5/$10` stay currency. On top,
|
|
46
|
+
content that reads as something else is refused: an unescaped `%`; a closing
|
|
47
|
+
bracket or `/` first, an opening bracket last; a straight quote at either
|
|
48
|
+
end; `:` `;` `,` `/` last; a number glued to a following letter
|
|
49
|
+
(`$10$N9qo…`); a placeholder (`$...$`); and prose (two plain words, a
|
|
50
|
+
contraction, an abbreviation) unless a TeX command or operator is present.
|
|
51
|
+
Measured before choosing (matrx-frontend
|
|
52
|
+
`scripts/measure-single-dollar-rule.ts`, 85,102 assistant messages and 4,298
|
|
53
|
+
notes, read-only): 128 spans become math, each one a formula on review
|
|
54
|
+
(`$FC$`, `$VC$`, `$(0, 0)$`, `$2a$`, `$3x + 6 = 15$`, `$XY$`, `$p(doom)$`);
|
|
55
|
+
22 spans the old rule drew as math stop (jQuery `$("#id")`, template literals
|
|
56
|
+
`${id}:${…}`, a printf `%1$s`, broken TeX); 0 currency spans become math.
|
|
57
|
+
Pure Pandoc would have added 36 more false positives (shell `$HOME/…:$PATH`,
|
|
58
|
+
`$\ge$20% …**$`, `[$X] … [$Y]`, bcrypt costs). Shared vectors:
|
|
59
|
+
`__tests__/fixtures/single-dollar-vectors.json` (red on 0.17.0). No other
|
|
60
|
+
implementation of this rule exists (the Python server has none).
|
|
61
|
+
|
|
62
|
+
**New: `looksLikeOpenInlineMath(partial)`** — whether an UNCLOSED `$…`
|
|
63
|
+
already reads as a formula while a stream is still arriving. It keeps the
|
|
64
|
+
old signal rule (a TeX command or operator, a lone variable, a single-letter
|
|
65
|
+
shape; a leading digit needs a TeX command), because without a closer there
|
|
66
|
+
are no delimiter facts yet: `$35 per stop` keeps showing mid-stream.
|
|
67
|
+
|
|
68
|
+
Also carries the committed RC-B10 code-range work in `source/code-ranges.ts`
|
|
69
|
+
and `source/tokenize.ts`. The print lane owns its entry.
|
|
70
|
+
|
|
71
|
+
**Consumer action:** a streaming healer that asks `isSingleDollarMath` about
|
|
72
|
+
an unclosed `$…` tail must ask `looksLikeOpenInlineMath` instead. With the
|
|
73
|
+
wider rule, a price like `$35 per stop` would otherwise be held back until
|
|
74
|
+
the line ends. matrx-frontend `stream-heal.ts` is the one known caller.
|
|
75
|
+
|
|
3
76
|
## 0.17.0 — 2026-09-26
|
|
4
77
|
|
|
5
78
|
**`/source` streaming: what "settled" promises, pinned — and the one
|
|
@@ -69,7 +142,7 @@ Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
|
69
142
|
`git diff npm/content-ir-core/v0.16.0..npm/content-ir-core/v0.16.1 -- apps/shared/content-ir-core`).
|
|
70
143
|
No source changes intended and no consumer action required.
|
|
71
144
|
|
|
72
|
-
##
|
|
145
|
+
## 0.16.2 (also shipped)
|
|
73
146
|
|
|
74
147
|
**`/source` — a callout or `:::` directive nested in a list item stays in the
|
|
75
148
|
list's prose block** (verify-RC-B8 round 2, SAFETY). Guard:
|