bun-docx 0.13.0 → 0.14.0

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.
Files changed (3) hide show
  1. package/README.md +13 -5
  2. package/dist/index.js +1258 -690
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -105,8 +105,8 @@ docx info locators [--json]
105
105
  `docx read` surfaces structural facts the Markdown body can't show as HTML-comment
106
106
  annotations (`<!-- docx:TYPE … -->`). These are **read-time visibility hints** — the
107
107
  agent can SEE the structure, but the importer drops them (the structure survives
108
- normal edits in place, `read --ast` is the lossless view, and `docx columns` /
109
- `insert --section` / `docx tables …` manage it). They're emitted **deviation-only**
108
+ normal edits in place, `read --ast` is the lossless view, and `docx sections` /
109
+ `docx tables …` manage it). They're emitted **deviation-only**
110
110
  (only when a value differs from the document default, so a plain document stays
111
111
  clean):
112
112
 
@@ -137,7 +137,7 @@ docx create FILE [--title T] [--author A] [--text "..." | --from PATH.md | --fro
137
137
  docx insert FILE (--after | --before) LOCATOR <content> # LOCATOR = pN | tN | sN | tN:rRcC:pK
138
138
  docx edit FILE --at LOCATOR <content> # LOCATOR = pN | pN:S-E | pN-pM | sN | eqN | tN:rRcC:pK[:S-E]
139
139
  docx delete FILE --at LOCATOR # LOCATOR = pN | pN-pM | tN | sN
140
- docx columns FILE --at LOCATOR --count N [--type T] # LOCATOR = pN-pM | pN (wrap a range) | sN (recount an existing section)
140
+ docx sections FILE --at LOCATOR --columns N [--type T] # LOCATOR = pN-pM | pN (wrap a range in N columns) | sN (recount an existing section). Multi-column layout lives HERE, not in insert.
141
141
  docx replace FILE PATTERN REPLACEMENT [--regex] [--ignore-case] [--all] [--limit N] [--current | --baseline] [--exact] [--track] [--dry-run]
142
142
 
143
143
  # Batch — apply many changes from ONE read (no re-reading between edits). Keys
@@ -154,6 +154,12 @@ docx delete FILE --batch drop.jsonl # { at } per line — whole blocks (
154
154
  # insert/edit content selectors (run "docx insert --help" / "docx edit --help" for the full list):
155
155
  # --text "..." [--style NAME] [--alignment A] [--color HEX] [--bold] [--italic] [--url URL]
156
156
  # (a newline in --text becomes a line break <w:br/>, a tab becomes <w:tab/> — verse/addresses stay line-per-line)
157
+ # edit --tabs right fix a line whose tabbed-over content WRAPS (read flags it as `docx:layout … warn`,
158
+ # and prints ONE consolidated fix-all summary at the top): swaps the fragile LEFT tab for a RIGHT tab
159
+ # flush at the margin so a long value (e.g. a city) never wraps. Rides along with --text, works
160
+ # per-entry in --batch, and on a RANGE (edit --at pN-pM --tabs right) cures every tab line at once.
161
+ # edit --text "" rejected (it would leave an invisible blank paragraph) — use `delete` to remove the
162
+ # line, or `--runs '[]'` to blank it but keep an empty spacer.
157
163
  # --runs '[{"type":"text","text":"X","bold":true}]'
158
164
  # --markdown "..." | --markdown-file PATH # GFM + math + CriticMarkup + inline HTML formatting → blocks
159
165
  # --code "..." | --code-file PATH [--language LANG]
@@ -197,8 +203,10 @@ docx tables unmerge FILE --at tN:rRcC
197
203
  docx tables borders FILE --at tN [--style single|double|none] [--size N] [--color HEX]
198
204
 
199
205
  docx track-changes on|off FILE
200
- docx track-changes accept FILE (--at tcN [--at tcM ...] | --all)
201
- docx track-changes reject FILE (--at tcN [--at tcM ...] | --all)
206
+ docx track-changes accept FILE (--at tcN [--at tcM ...] | --at revN | --all)
207
+ docx track-changes reject FILE (--at tcN [--at tcM ...] | --at revN | --all)
208
+ # A del+ins REPLACE pair shares a "group": "revN" in `list`; `--at revN` accepts/rejects
209
+ # both halves in one call (no re-list between them — tcN ids renumber after each accept).
202
210
  ```
203
211
 
204
212
  > **One rule to memorize: addressing an existing thing is always `--at`.**