document-cli 5.4.25 → 5.5.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
@@ -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 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).
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 — every format the `metadata` command covers, including `.odb`/`.pdf`/`.xlsx`. For the seven live-view-editor formats, title/author/subject/keywords are editable in place through documents.js's own `editor.metadata` setter (ExaDev/documents.js#933): select a field and Enter opens it for editing, committing a partial merge that leaves every other field untouched. Every other format (and creator/producer/created/modified on the editable formats too, since those are derived/producer-stamped rather than user-authored) stays read-only here use the `set-metadata` command for a format with no live-view editor.
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
 
@@ -239,24 +239,24 @@ The export-to-PDF screen (`e` from any editor screen) is a two-field form: a des
239
239
 
240
240
  The global bindings below apply everywhere; individual screens (a docx run's own bold/italic toggles, an ods cell's own value-kind picker) add their own on top:
241
241
 
242
- | Keys | Action |
243
- | --------------------- | --------------------------------------------- |
244
- | `↑` / `k` | Move the selection up |
245
- | `↓` / `j` | Move the selection down |
246
- | `Enter` / `→` / `l` | Open or edit the selected item |
247
- | `Esc` / `←` / `h` | Go back to the previous screen |
248
- | `PageUp` / `PageDown` | Scroll a page at a time |
249
- | `Home` / `End` | Jump to the first or last item |
250
- | `a` | Append a new item to the current list |
251
- | `m` | Show the open document's metadata (read-only) |
252
- | `Ctrl+S` | Save the open document |
253
- | `Ctrl+W` | Close the open document |
254
- | `Ctrl+Z` | Undo the last change |
255
- | `q` / `Ctrl+C` | Quit |
256
- | `:` | Open the command palette |
257
- | `/` | Search within the current screen |
258
- | `?` | Show this help |
259
- | `Ctrl+D` | Show the diagnostics panel |
242
+ | Keys | Action |
243
+ | --------------------- | ------------------------------------------------------------------------------ |
244
+ | `↑` / `k` | Move the selection up |
245
+ | `↓` / `j` | Move the selection down |
246
+ | `Enter` / `→` / `l` | Open or edit the selected item |
247
+ | `Esc` / `←` / `h` | Go back to the previous screen |
248
+ | `PageUp` / `PageDown` | Scroll a page at a time |
249
+ | `Home` / `End` | Jump to the first or last item |
250
+ | `a` | Append a new item to the current list |
251
+ | `m` | Show the open document's metadata (editable for docx/pptx/odt/odp/ods/odg/pdf) |
252
+ | `Ctrl+S` | Save the open document |
253
+ | `Ctrl+W` | Close the open document |
254
+ | `Ctrl+Z` | Undo the last change |
255
+ | `q` / `Ctrl+C` | Quit |
256
+ | `:` | Open the command palette |
257
+ | `/` | Search within the current screen |
258
+ | `?` | Show this help |
259
+ | `Ctrl+D` | Show the diagnostics panel |
260
260
 
261
261
  ## Architecture
262
262
 
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as odbFormSummary, c as formatDocxExtrasLines, d as writeOutput, f as loadProvidedFonts, h as isDocumentFormat, i as formatOdbReportLines, l as readInput, m as inferFormatFromExtension, n as describeOdbReport, o as formatMetadataLines, r as formatOdbFormLines, s as presentMetadataEntries, t as describeOdbForm, u as resolveDefaultOutputPath } from "./odb-structure-DsWeqhGj.js";
2
+ import { a as odbFormSummary, c as presentMetadataEntries, d as resolveDefaultOutputPath, f as writeOutput, g as isDocumentFormat, h as inferFormatFromExtension, i as formatOdbReportLines, l as formatDocxExtrasLines, n as describeOdbReport, o as formatMetadataLines, p as loadProvidedFonts, r as formatOdbFormLines, t as describeOdbForm, u as readInput } from "./odb-structure-DKJ3vi6l.js";
3
3
  import { Command, CommanderError, InvalidArgumentError } from "commander";
4
4
  import { writeFile } from "node:fs/promises";
5
5
  import { basename, dirname, extname, join, resolve } from "node:path";
@@ -1199,7 +1199,7 @@ function registerSetMetadataCommand(program) {
1199
1199
  }
1200
1200
  //#endregion
1201
1201
  //#region package.json
1202
- var version = "5.4.25";
1202
+ var version = "5.5.1";
1203
1203
  //#endregion
1204
1204
  //#region src/program.ts
1205
1205
  function createProgram() {
@@ -1227,7 +1227,7 @@ function createProgram() {
1227
1227
  //#region src/cli.ts
1228
1228
  async function launchTui(startPath, signal) {
1229
1229
  try {
1230
- const { runTui } = await import("./tui-BYCDgi8p.js");
1230
+ const { runTui } = await import("./tui-C_It5tfz.js");
1231
1231
  await runTui({
1232
1232
  startPath,
1233
1233
  signal
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.25";
1550
+ var version = "5.5.1";
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.25";
1549
+ var version = "5.5.1";
1550
1550
  //#endregion
1551
1551
  //#region src/program.ts
1552
1552
  function createProgram() {
@@ -342,4 +342,4 @@ function formatOdbReportLines(report) {
342
342
  return lines;
343
343
  }
344
344
  //#endregion
345
- export { odbFormSummary as a, formatDocxExtrasLines as c, writeOutput as d, loadProvidedFonts as f, isDocumentFormat as h, formatOdbReportLines as i, readInput as l, inferFormatFromExtension as m, describeOdbReport as n, formatMetadataLines as o, formatToExtension as p, formatOdbFormLines as r, presentMetadataEntries as s, describeOdbForm as t, resolveDefaultOutputPath as u };
345
+ export { odbFormSummary as a, presentMetadataEntries as c, resolveDefaultOutputPath as d, writeOutput as f, isDocumentFormat as g, inferFormatFromExtension as h, formatOdbReportLines as i, formatDocxExtrasLines as l, formatToExtension as m, describeOdbReport as n, formatMetadataLines as o, loadProvidedFonts as p, formatOdbFormLines as r, formatMetadataValue as s, describeOdbForm as t, readInput as u };
@@ -1,11 +1,11 @@
1
- import { c as formatDocxExtrasLines, f as loadProvidedFonts, i as formatOdbReportLines, l as readInput, m as inferFormatFromExtension, n as describeOdbReport, o as formatMetadataLines, p as formatToExtension, r as formatOdbFormLines, t as describeOdbForm } from "./odb-structure-DsWeqhGj.js";
1
+ import { h as inferFormatFromExtension, i as formatOdbReportLines, l as formatDocxExtrasLines, m as formatToExtension, n as describeOdbReport, o as formatMetadataLines, p as loadProvidedFonts, r as formatOdbFormLines, s as formatMetadataValue, t as describeOdbForm, u as readInput } from "./odb-structure-DKJ3vi6l.js";
2
2
  import { readFile, writeFile } from "node:fs/promises";
3
3
  import { basename, dirname, extname, join } from "node:path";
4
- import { bytesToBase64, cellReference, columnIndexToLetters, convertDocument, createDocx, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, csvToPdf, decodeMarkdownText, decodeOdbPackage, docToPdf, docxToPdf, encodeMarkdownText, hsqldbCellDisplayText, markdownToPdf, odbReportToDocx, odbReportToOdt, odbReportToPdf, odgToPdf, odpToPdf, odsToPdf, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, parseXml, pptToPdf, pptxToPdf, readDocxContent, readDocxExtras, readMarkdownContent, readOdbForms, readOdbReportContent, readOdbReports, readOdbTables, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, rgbHexToColor, rtfToPdf, svgToPdf, xlsToPdf, xlsxToPdf } from "documents.js";
4
+ import { bytesToBase64, cellReference, columnIndexToLetters, convertDocument, createDocx, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, csvToPdf, decodeMarkdownText, decodeOdbPackage, docToPdf, docxToPdf, encodeMarkdownText, hsqldbCellDisplayText, markdownToPdf, odbReportToDocx, odbReportToOdt, odbReportToPdf, odgToPdf, odpToPdf, odsToPdf, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, parseXml, pptToPdf, pptxToPdf, readDocxContent, readDocxExtras, readMarkdownContent, readOdbForms, readOdbReportContent, readOdbReports, readOdbTables, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, rgbHexToColor, rtfToPdf, svgToPdf, xlsToPdf, xlsxToPdf } from "documents.js";
5
5
  import { readdirSync } from "node:fs";
6
6
  import { Box, Text, render, useApp, useInput, useWindowSize } from "ink";
7
7
  import { createContext, useContext, useEffect, useReducer, useState } from "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import TextInput from "ink-text-input";
10
10
  //#region src/tui/errors.ts
11
11
  function describeError(error) {
@@ -235,6 +235,12 @@ function createNewDocument(format) {
235
235
  editor: createDocx(),
236
236
  path: void 0
237
237
  };
238
+ case "markdown": return {
239
+ format,
240
+ editor: createMarkdownEditor(),
241
+ originalText: void 0,
242
+ path: void 0
243
+ };
238
244
  case "pptx": return {
239
245
  format,
240
246
  editor: createPptx(),
@@ -297,6 +303,9 @@ const WRITABLE_FORMATS = {
297
303
  function isEditableFormat(value) {
298
304
  return value in EDITABLE_FORMATS;
299
305
  }
306
+ function isEditableDocument(document) {
307
+ return isEditableFormat(document.format);
308
+ }
300
309
  function isWritableFormat(value) {
301
310
  return value in WRITABLE_FORMATS;
302
311
  }
@@ -1026,6 +1035,16 @@ function appReducer(state, action) {
1026
1035
  setTextContainerText(item, action.text);
1027
1036
  });
1028
1037
  }
1038
+ case "INDENT_LIST_ITEM": {
1039
+ const doc = wordprocessingDocument(state);
1040
+ if (doc === void 0) return wrongDocument(state, "a docx, odt or markdown document");
1041
+ if (doc.format !== "odt") return wrongDocument(state, "an odt document (lists are an odt-only concept)");
1042
+ const list = doc.editor.lists()[action.blockIndex];
1043
+ if (list === void 0) return withStatus(state, "warning", `There is no list at index ${action.blockIndex}`);
1044
+ return mutateGuarded(state, doc, () => {
1045
+ list.indentItem(action.itemIndex);
1046
+ });
1047
+ }
1029
1048
  case "ADD_LIST": {
1030
1049
  const doc = wordprocessingDocument(state);
1031
1050
  if (doc === void 0) return wrongDocument(state, "a docx, odt or markdown document");
@@ -1425,6 +1444,13 @@ function appReducer(state, action) {
1425
1444
  item.widthPt = action.widthPt;
1426
1445
  item.heightPt = action.heightPt;
1427
1446
  });
1447
+ case "SET_METADATA": {
1448
+ const doc = state.openDocument;
1449
+ if (doc === void 0 || !isEditableDocument(doc)) return wrongDocument(state, "an editable document");
1450
+ return mutate(state, doc, () => {
1451
+ doc.editor.metadata = action.overrides;
1452
+ });
1453
+ }
1428
1454
  case "APPEND_DIAGNOSTIC": return {
1429
1455
  ...state,
1430
1456
  diagnostics: [...state.diagnostics, action.diagnostic]
@@ -7135,7 +7161,8 @@ function ListEditorScreen() {
7135
7161
  const [editingIndex, setEditingIndex] = useState(void 0);
7136
7162
  const screen = currentScreen(state);
7137
7163
  const doc = paragraphFamilyDocument(state.openDocument);
7138
- const list = screen.kind === "listEditor" && doc?.format === "odt" ? doc.editor.lists()[screen.blockIndex] : void 0;
7164
+ const blockIndex = screen.kind === "listEditor" ? screen.blockIndex : void 0;
7165
+ const list = blockIndex !== void 0 && doc?.format === "odt" ? doc.editor.lists()[blockIndex] : void 0;
7139
7166
  const items = list === void 0 ? [] : list.items();
7140
7167
  const rows = items.map((item, index) => ({
7141
7168
  item,
@@ -7157,10 +7184,17 @@ function ListEditorScreen() {
7157
7184
  }
7158
7185
  });
7159
7186
  useInput((input, key) => {
7160
- if (key.tab || input === ">" || input === "<") dispatch({
7187
+ if (key.tab || input === ">") {
7188
+ if (blockIndex === void 0) return;
7189
+ dispatch({
7190
+ type: "INDENT_LIST_ITEM",
7191
+ blockIndex,
7192
+ itemIndex: selectedIndex
7193
+ });
7194
+ } else if (input === "<") dispatch({
7161
7195
  type: "SET_STATUS",
7162
7196
  severity: "warning",
7163
- text: "Indenting a list item needs a new reducer action this pass didn't add -- OdtListItem.addNestedList() has no wiring yet"
7197
+ text: "Outdenting isn't reachable from this screen yet -- it only browses top-level lists, with no route into an item's own nested list"
7164
7198
  });
7165
7199
  }, { isActive: isNavigationActive });
7166
7200
  if (screen.kind !== "listEditor") return /* @__PURE__ */ jsx(Text, {
@@ -7265,7 +7299,7 @@ function ListEditorScreen() {
7265
7299
  }
7266
7300
  })] }) : /* @__PURE__ */ jsx(Text, {
7267
7301
  dimColor: true,
7268
- children: "Enter to edit an item, a to add, Esc back"
7302
+ children: "Enter to edit an item, a to add, Tab/> to indent, Esc back"
7269
7303
  })
7270
7304
  ]
7271
7305
  });
@@ -9009,6 +9043,10 @@ const CREATABLE_FORMATS = [
9009
9043
  {
9010
9044
  format: "odg",
9011
9045
  description: "Vector drawing (OpenDocument)"
9046
+ },
9047
+ {
9048
+ format: "markdown",
9049
+ description: "Markdown document"
9012
9050
  }
9013
9051
  ];
9014
9052
  const EXTENSION_COLUMN_WIDTH = 8;
@@ -9139,13 +9177,58 @@ function metadataFor(doc) {
9139
9177
  }
9140
9178
  //#endregion
9141
9179
  //#region src/tui/screens/shared/metadata.tsx
9180
+ const EDITABLE_FIELDS = [
9181
+ {
9182
+ key: "title",
9183
+ label: "title"
9184
+ },
9185
+ {
9186
+ key: "author",
9187
+ label: "author"
9188
+ },
9189
+ {
9190
+ key: "subject",
9191
+ label: "subject"
9192
+ },
9193
+ {
9194
+ key: "keywords",
9195
+ label: "keywords"
9196
+ }
9197
+ ];
9198
+ function parseKeywords(text) {
9199
+ return text.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
9200
+ }
9201
+ function overridesFor(field, text) {
9202
+ switch (field) {
9203
+ case "title": return { title: text };
9204
+ case "author": return { author: text };
9205
+ case "subject": return { subject: text };
9206
+ case "keywords": return { keywords: parseKeywords(text) };
9207
+ }
9208
+ }
9142
9209
  function MetadataScreen() {
9143
9210
  const state = useAppState();
9144
9211
  const dispatch = useAppDispatch();
9145
9212
  const doc = state.openDocument;
9146
- useInput((input, key) => {
9147
- if (key.escape || key.leftArrow || input === "h") dispatch({ type: "POP_SCREEN" });
9148
- }, { isActive: doc !== void 0 && !anyOverlayOpen(state) });
9213
+ const editable = doc !== void 0 && isEditableDocument(doc);
9214
+ const [editingField, setEditingField] = useState(void 0);
9215
+ const [draft, setDraft] = useState("");
9216
+ const isNavigationActive = doc !== void 0 && !anyOverlayOpen(state) && editingField === void 0;
9217
+ const { selectedIndex } = useNavigationInput({
9218
+ itemCount: editable ? EDITABLE_FIELDS.length : 0,
9219
+ isActive: isNavigationActive,
9220
+ onBack: () => {
9221
+ dispatch({ type: "POP_SCREEN" });
9222
+ },
9223
+ onSelect: (index) => {
9224
+ if (doc === void 0 || !editable) return;
9225
+ const field = EDITABLE_FIELDS[index];
9226
+ if (field === void 0) return;
9227
+ const currentValue = metadataFor(doc)[field.key];
9228
+ setDraft(currentValue === void 0 ? "" : formatMetadataValue(currentValue));
9229
+ setEditingField(field.key);
9230
+ }
9231
+ });
9149
9232
  if (doc === void 0) return /* @__PURE__ */ jsx(Text, {
9150
9233
  color: "red",
9151
9234
  children: "MetadataScreen requires an open document."
@@ -9157,6 +9240,37 @@ function MetadataScreen() {
9157
9240
  } catch (error) {
9158
9241
  errorMessage = error instanceof Error ? error.message : String(error);
9159
9242
  }
9243
+ if (editingField !== void 0) {
9244
+ const field = EDITABLE_FIELDS.find((f) => f.key === editingField);
9245
+ return /* @__PURE__ */ jsxs(Box, {
9246
+ flexDirection: "column",
9247
+ children: [
9248
+ /* @__PURE__ */ jsxs(Text, {
9249
+ bold: true,
9250
+ children: ["Editing ", field?.label ?? editingField]
9251
+ }),
9252
+ editingField === "keywords" ? /* @__PURE__ */ jsx(Text, {
9253
+ dimColor: true,
9254
+ children: "Comma-separated"
9255
+ }) : void 0,
9256
+ /* @__PURE__ */ jsx(TextField, {
9257
+ value: draft,
9258
+ isFocused: true,
9259
+ onChange: setDraft,
9260
+ onSubmit: (text) => {
9261
+ dispatch({
9262
+ type: "SET_METADATA",
9263
+ overrides: overridesFor(editingField, text)
9264
+ });
9265
+ setEditingField(void 0);
9266
+ },
9267
+ onCancel: () => {
9268
+ setEditingField(void 0);
9269
+ }
9270
+ })
9271
+ ]
9272
+ });
9273
+ }
9160
9274
  return /* @__PURE__ */ jsxs(Box, {
9161
9275
  flexDirection: "column",
9162
9276
  children: [
@@ -9175,9 +9289,27 @@ function MetadataScreen() {
9175
9289
  dimColor: true,
9176
9290
  children: "This document carries no metadata."
9177
9291
  }),
9178
- /* @__PURE__ */ jsx(Text, {
9292
+ editable ? /* @__PURE__ */ jsxs(Fragment, { children: [
9293
+ /* @__PURE__ */ jsx(Text, {
9294
+ bold: true,
9295
+ children: "Edit a field"
9296
+ }),
9297
+ /* @__PURE__ */ jsx(ListView, {
9298
+ items: EDITABLE_FIELDS,
9299
+ selectedIndex,
9300
+ renderItem: (field, isSelected) => /* @__PURE__ */ jsx(Text, {
9301
+ color: isSelected ? "cyan" : void 0,
9302
+ inverse: isSelected,
9303
+ children: field.label
9304
+ })
9305
+ }),
9306
+ /* @__PURE__ */ jsx(Text, {
9307
+ dimColor: true,
9308
+ children: "Enter to edit, Esc / ← / h to go back"
9309
+ })
9310
+ ] }) : /* @__PURE__ */ jsx(Text, {
9179
9311
  dimColor: true,
9180
- children: "Esc / ← / h to go back"
9312
+ children: "This document's metadata is read-only. Esc / ← / h to go back"
9181
9313
  })
9182
9314
  ]
9183
9315
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-cli",
3
- "version": "5.4.25",
3
+ "version": "5.5.1",
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": {
@@ -92,9 +92,9 @@
92
92
  "packageManager": "pnpm@11.6.0",
93
93
  "dependencies": {
94
94
  "commander": "^15.0.0",
95
- "document-outline.js": "^3.5.4",
96
- "document-schema.js": "^7.0.0",
97
- "documents.js": "^7.5.0",
95
+ "document-outline.js": "^3.5.5",
96
+ "document-schema.js": "^7.1.0",
97
+ "documents.js": "^7.6.1",
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.4.0",
114
+ "odf.js": "^7.4.1",
115
115
  "publint": "^0.3.22",
116
116
  "semantic-release": "^25.0.8",
117
117
  "tsdown": "^0.22.14",