document-cli 5.4.23 → 5.4.25

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
@@ -227,7 +227,7 @@ Diagnostics and the summary line always go to stderr; stdout is reserved for the
227
227
 
228
228
  Launch it either bare (`document-cli`, with no arguments) or explicitly with `document-cli tui [file]` — both open the same app; the explicit form additionally opens `file` immediately, skipping the launcher screen. The TUI needs an interactive terminal: a bare invocation with redirected stdout prints help text instead, and an explicit `tui` invocation with redirected stdout fails outright, since there's no terminal for Ink to draw into.
229
229
 
230
- It supports the same seven formats documents.js's live-view editors cover — docx, pptx, odt, odp, ods, odg, markdown — each with a full navigate/edit/save experience built on that format's editor (paragraphs and runs for docx/odt/markdown, slides and shapes for pptx/odp, sheets and cells for ods, pages and vectors/shapes for odg), plus undo (whole-document snapshots taken before each committed mutation), search, a command palette, and PDF export straight from the open document. On a pptx or odp slide, `a` from the shape list also adds a real table (rows then columns, a two-step prompt) alongside the existing textbox/image choices, and `n` opens the slide's own speaker notes for either format — `PptxSlide` and `OdpSlide` both carry a real `.notes` getter/setter, so notes editing was never odp-specific, only gated that way until this phase removed the gate. On a docx document, `x` from the paragraph/table list opens a read-only view of the document's own comments, footnotes, headers/footers, and numbering definitions — a docx-only concept with no odt equivalent, and the TUI counterpart to the `docx-extras` command, rendered through the identical `src/docx-extras-format.ts` line formatter so the two can't drift apart. `m`, global to every screen with a document open, shows that document's own title/author/subject/keywords/etc metadata read-only — every format the `metadata` command covers, including `.odb`/`.pdf`/`.xlsx`; documents.js's live-view editors have no metadata setter to mutate in place, so this TUI has no matching write screen (use the `set-metadata` command for that).
230
+ It supports the same seven formats documents.js's live-view editors cover — docx, pptx, odt, odp, ods, odg, markdown — each with a full navigate/edit/save experience built on that format's editor (paragraphs and runs for docx/odt/markdown, slides and shapes for pptx/odp, sheets and cells for ods, pages and vectors/shapes for odg), plus undo (whole-document snapshots taken before each committed mutation), search, a command palette, and PDF export straight from the open document. On a pptx or odp slide, `a` from the shape list also adds a real table (rows then columns, a two-step prompt) alongside the existing textbox/image choices, and `n` opens the slide's own speaker notes for either format — `PptxSlide` and `OdpSlide` both carry a real `.notes` getter/setter, so notes editing was never odp-specific, only gated that way until this phase removed the gate. On a docx document, `x` from the paragraph/table list opens a read-only view of the document's own comments, footnotes, headers/footers, and numbering definitions — a docx-only concept with no odt equivalent, and the TUI counterpart to the `docx-extras` command, rendered through the identical `src/docx-extras-format.ts` line formatter so the two can't drift apart. `m`, global to every screen with a document open, shows that document's own title/author/subject/keywords/etc metadata read-only — every format the `metadata` command covers, including `.odb`/`.pdf`/`.xlsx`. documents.js's own DocxEditor/OdtEditor/PptxEditor/OdpEditor/OdsEditor/OdgEditor now each carry a real `.metadata` getter/setter (ExaDev/documents.js#933), but this TUI has not yet wired an edit flow through it, so `m` still has no matching write screen here (use the `set-metadata` command for that).
231
231
 
232
232
  Markdown (`.md`/`.markdown`) shares the same paragraph/run/table body-list screens docx and odt already use, through documents.js's own `MarkdownEditor` (`openMarkdown`/`createMarkdownEditor`) — a genuine live view over a mutable `ContentDocument`, the same live-view contract every other editor here follows, even though there is no `XmlElement` tree underneath it the way there is for docx/odt (`MarkdownEditor.toMarkdownText()` re-serialises the whole document fresh on every call, rather than exposing a `toBytes()`). Appending a paragraph, appending a run, and toggling bold/italic all go through the identical reducer actions docx/odt use; a markdown run has no underline, colour, font family, or font size at all (CommonMark/GFM has no construct for any of the four), so those keys — along with image insertion, which `MarkdownParagraph` has no counterpart for — are simply absent from a markdown paragraph's own key hints rather than opening a prompt that could only end in a warning. A markdown table can be created and its cells edited through the same 'T' wizard and table-view screens docx/odt use, but GFM tables have no cell-merge concept, so a merge requested alongside table creation still creates the table (unmerged) and reports why the merge itself didn't happen. `:view-source` (markdown documents only) shows the literal text the document was opened with side by side with what a save would write right now — these can genuinely differ even with no edits made this session, from a heading-style, bullet-marker, or line-ending choice the writer normalises. Every save re-serialises the whole document fresh through `buildMarkdownText`, a deliberate, permanent consequence of structured editing rather than something to work around. Diagnostics from the read side (a clamped heading level, a dropped front-matter key, a fenced code block's own info string with nowhere to go, …) now surface into the same diagnostics panel a PDF export's own substitutions already populate, the moment a `.md` file is opened, not only on export. documents.js's own `createMarkdownEditor()` exists now, but this TUI does not yet wire a "new markdown document" flow into `:new`/the new-document picker, so a markdown document can still only be opened from an existing file.
233
233
 
package/dist/cli.js CHANGED
@@ -1199,7 +1199,7 @@ function registerSetMetadataCommand(program) {
1199
1199
  }
1200
1200
  //#endregion
1201
1201
  //#region package.json
1202
- var version = "5.4.23";
1202
+ var version = "5.4.25";
1203
1203
  //#endregion
1204
1204
  //#region src/program.ts
1205
1205
  function createProgram() {
package/dist/index.cjs CHANGED
@@ -1547,7 +1547,7 @@ function registerSetMetadataCommand(program) {
1547
1547
  }
1548
1548
  //#endregion
1549
1549
  //#region package.json
1550
- var version = "5.4.23";
1550
+ var version = "5.4.25";
1551
1551
  //#endregion
1552
1552
  //#region src/program.ts
1553
1553
  function createProgram() {
package/dist/index.js CHANGED
@@ -1546,7 +1546,7 @@ function registerSetMetadataCommand(program) {
1546
1546
  }
1547
1547
  //#endregion
1548
1548
  //#region package.json
1549
- var version = "5.4.23";
1549
+ var version = "5.4.25";
1550
1550
  //#endregion
1551
1551
  //#region src/program.ts
1552
1552
  function createProgram() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-cli",
3
- "version": "5.4.23",
3
+ "version": "5.4.25",
4
4
  "description": "CLI and interactive Ink TUI for documents.js: every docx/pptx/odt/odp/ods/odg/odf/pdf/odm/odb/xlsx/csv/svg/markdown/rtf conversion, bridge, and editor as a scriptable command or a terminal app.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -94,7 +94,7 @@
94
94
  "commander": "^15.0.0",
95
95
  "document-outline.js": "^3.5.4",
96
96
  "document-schema.js": "^7.0.0",
97
- "documents.js": "^7.3.0",
97
+ "documents.js": "^7.5.0",
98
98
  "ink": "^7.1.1",
99
99
  "ink-text-input": "^6.0.0",
100
100
  "react": "^19.2.8"
@@ -111,7 +111,7 @@
111
111
  "eslint": "^10.8.0",
112
112
  "husky": "^9.1.7",
113
113
  "ink-testing-library": "^4.0.0",
114
- "odf.js": "^7.3.0",
114
+ "odf.js": "^7.4.0",
115
115
  "publint": "^0.3.22",
116
116
  "semantic-release": "^25.0.8",
117
117
  "tsdown": "^0.22.14",