@drghaliasri/butex 6.0.0 → 6.1.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/README.md +8 -2
- package/dist/document2-cli.js +984 -280
- package/dist/document2-cli.js.map +1 -1
- package/dist/document2.d.mts +156 -8
- package/dist/document2.d.ts +156 -8
- package/dist/document2.js +1054 -240
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +1054 -240
- package/dist/document2.mjs.map +1 -1
- package/dist/react-document2.d.mts +31 -0
- package/dist/react-document2.d.ts +31 -0
- package/dist/react-document2.js +201 -86
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +201 -86
- package/dist/react-document2.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -266,7 +266,11 @@ V2 exports Arabic TeX by default for equations saved from the embedded editor. I
|
|
|
266
266
|
|
|
267
267
|
### Headless document commands
|
|
268
268
|
|
|
269
|
-
Canonical `Document2Json` exports include
|
|
269
|
+
Canonical `Document2Json` exports include stable block IDs, list-item IDs, and an `inline_ids` sidecar for every text-bearing field. Table cells use a parallel `cell_inline_ids` matrix. Each sidecar contains a stable `field_id` plus text/math/citation/reference token IDs and their JavaScript string offsets. Legacy input may omit all identities; its next import/export normalization adds them lazily.
|
|
270
|
+
|
|
271
|
+
Blocks may also carry creation provenance as `metadata: { source: 'agent' | 'user' }`. The editor and preview expose it as `data-butex-block-source` and intentionally ship no provenance styling.
|
|
272
|
+
|
|
273
|
+
Use the pure command and outline helpers for server-side session transforms:
|
|
270
274
|
|
|
271
275
|
```ts
|
|
272
276
|
import {
|
|
@@ -286,7 +290,9 @@ const updated = applyDocument2Command(canonical, {
|
|
|
286
290
|
});
|
|
287
291
|
```
|
|
288
292
|
|
|
289
|
-
|
|
293
|
+
Block insertions accept `{ end: true }`, `{ before_block_id }`, or `{ after_block_id }`; missing targets fail explicitly. The command union also includes stable-ID inline token operations, list/item operations, and table cell/row/column operations. List and table targets are found recursively, while row and column coordinates are zero-based. Column shape changes require the complete resulting LaTeX `columns` specification.
|
|
294
|
+
|
|
295
|
+
Whole-field replacement rejects formatted text, citations, references, and math so an agent cannot silently discard structured content. Inline math insertion/replacement requires one complete delimited `source` plus a matching structured `MathObject`; BuTeX does not parse raw LaTeX into an equation AST.
|
|
290
296
|
|
|
291
297
|
### Document worker CLI
|
|
292
298
|
|