@drghaliasri/butex 6.0.1 → 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 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 a stable `id` on every block. Legacy input without IDs remains accepted and receives IDs on its next import/export normalization. Use the pure command and outline helpers for server-side session transforms:
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
- Commands address top-level blocks only. Insertions require either `{ end: true }` or `{ after_block_id }`; missing anchors fail explicitly. Whole-block text replacement rejects formatted text, citations, references, and math so an agent cannot silently discard structured inline content.
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