@aiquants/spreadsheet 0.15.0 → 0.16.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/dist/index.d.cts CHANGED
@@ -670,6 +670,36 @@ export declare type HtmlTableResult = {
670
670
  readonly outcome: "none";
671
671
  };
672
672
 
673
+ /**
674
+ * Yields the rows of a text that may be only the beginning of a TSV (a file read partway, a stream not yet ended), in
675
+ * exactly iterateTsvRows's grammar, but only those the rest of the text cannot change: every row the text ends with a
676
+ * line terminator, up to the first field that opens a quote the text does not close (whether it is one quoted field or a
677
+ * literal one split at its line breaks is the rest's to decide). So the rows of any beginning of a TSV are the first
678
+ * rows of the whole: a reader of a stream can show them as final. Empty text yields no row. Unpadded.
679
+ * TSV の先頭だけかもしれない文字 (途中まで読んだファイル、まだ終わらないストリーム) の行を、iterateTsvRows とちょうど同じ文法で、
680
+ * ただし文字の続きが変えられない行だけ出す処理。文字が改行で終える行すべてを、文字が閉じない引用を開く最初の値まで出す (それが 1 つの
681
+ * 引用の値か、改行で割れる文字どおりの値かは続きが決める)。そのため TSV のどの先頭の行も全体の最初の行で、ストリームの読み手は
682
+ * それを確定したものとして見せられる。空の文字は行を出さない。埋めない。
683
+ *
684
+ * @param text - The beginning of a TSV text, as read. 読んだままの TSV の文字の先頭。
685
+ * @returns The rows the rest of the text cannot change, unpadded. 文字の続きが変えられない行 (埋めない)。
686
+ */
687
+ export declare function iterateTsvPrefixRows(text: string): Generator<string[]>;
688
+
689
+ /**
690
+ * Yields the rows of a TSV text one at a time, in exactly parseTsv's grammar (the same quoting rule, line terminators
691
+ * and final-terminator handling; empty text is one row with one empty cell), WITHOUT padding them to a common width. A
692
+ * consumer that stops early materialises nothing past the last row it took, so a large text can be previewed under a
693
+ * cell budget.
694
+ * TSV の文字列の行を 1 つずつ出す処理。parseTsv とちょうど同じ文法 (同じ引用の規則・改行・末尾の改行の扱い。空の文字は空のセル
695
+ * 1 つの 1 行) で、幅を揃える右の埋めはしない。途中で止めた受け手は、最後に取った行より先を何も実体化しないので、大きな文字を
696
+ * セルの予算の下で見られる。
697
+ *
698
+ * @param text - The TSV text. TSV の文字列。
699
+ * @returns The rows, unpadded. 埋めない行。
700
+ */
701
+ export declare function iterateTsvRows(text: string): Generator<string[]>;
702
+
673
703
  /**
674
704
  * Renders the hyperlink editor for one cell.
675
705
  * 1 セルのハイパーリンクエディタを描画する。
@@ -733,6 +763,23 @@ export declare type ListValidationRule = {
733
763
  /** Builds a normalized range from two corners. / 2 隅から正規化レンジを構築。 */
734
764
  export declare const makeRange: (a: CellCoord, b: CellCoord) => CellRange;
735
765
 
766
+ /**
767
+ * The dimensions `parseTsv(text)` would materialise — rows and the rectangularised (maximum)
768
+ * column count — from the SAME grammar walk, without building any row array: the ADR-12
769
+ * pre-materialisation estimate of the `tsv` paste source (a raw line-terminator count would
770
+ * over-count rows for quoted embedded newlines and falsely reject a legitimate paste).
771
+ * `parseTsv(text)` が実体化する寸法 — 行数と矩形化後 (最大) の列数 — を**同じ**文法走査から、
772
+ * 行配列を一切作らずに返す: `tsv` 貼り付けソースの ADR-12 実体化前見積もり (素の改行計数は
773
+ * quoted 内の埋め込み改行を行と数え、正当な貼り付けを誤って上限拒否する)。
774
+ *
775
+ * @param text - The TSV text. TSV の文字列。
776
+ * @returns The row count and the maximum column count. 行数と最大の列数。
777
+ */
778
+ export declare const measureTsv: (text: string) => {
779
+ rows: number;
780
+ cols: number;
781
+ };
782
+
736
783
  /**
737
784
  * Applies a patch to a base format: `null` clears a key, `undefined` (or an omitted key) keeps
738
785
  * the base value, anything else replaces it (borders as a whole set). Returns the CANONICAL
@@ -902,8 +949,13 @@ export declare type ParsedChord = {
902
949
  export declare const parseHtmlTable: (html: string, kind: HtmlTableKind, options: NumberFormatDecodeOptions, maxCells: number) => HtmlTableResult;
903
950
 
904
951
  /**
905
- * Parses Excel-behavior TSV into a rectangular matrix (ragged rows are right-padded).
906
- * Excel 実挙動 TSV を矩形行列へ解析 (ギザギザ行は右パディング)。
952
+ * Parses TSV into a rectangular matrix (ragged rows are right-padded with ""; one trailing line
953
+ * terminator is dropped; empty text is one empty cell): the rows of iterateTsvRows, padded.
954
+ * TSV を矩形行列へ解析する処理 (不揃いの行は "" で右を埋め、末尾の改行 1 つを除き、空の文字は空のセル 1 つ)。iterateTsvRows の
955
+ * 行を埋めたもの。
956
+ *
957
+ * @param text - The TSV text. TSV の文字列。
958
+ * @returns The rectangular matrix, at least 1 × 1. 少なくとも 1 × 1 の矩形行列。
907
959
  */
908
960
  export declare const parseTsv: (text: string) => string[][];
909
961
 
@@ -1133,6 +1185,23 @@ export declare type SelectionState = {
1133
1185
  active: CellCoord;
1134
1186
  };
1135
1187
 
1188
+ /**
1189
+ * Serializes a matrix the way Excel writes its clipboard text, with a trailing CRLF: only a field
1190
+ * holding a tab, CR or LF is quoted (inner quotes doubled), so a field that merely starts with `"`
1191
+ * reaches a plain-text target as typed. Its round trip is not exact for such fields (a raw
1192
+ * `"\t"\tBlue` reads back as two cells); the grid's copy writes text/plain with it (and so should a
1193
+ * host's own copy control, to match), and the grid's own paste reads the JSON payload first. Files and
1194
+ * stored bodies use `serializeTsv`.
1195
+ * Excel がクリップボードの文字を書く形で行列を終端 CRLF つきに直列化する処理。囲むのはタブ・CR・LF を含む値だけ (中の
1196
+ * `"` は二重化) なので、`"` で始まるだけの値は平文の貼り先へそのまま届く。そうした値の往復は厳密でない (素の
1197
+ * `"\t"\tBlue` は 2 つのセルに読み戻る)。グリッドのコピーが text/plain をこれで書き (ホスト自身のコピーの部品も揃えて
1198
+ * これで書く)、グリッド自身の貼り付けは JSON の payload を先に読む。ファイルと保存する本文は `serializeTsv` を使う。
1199
+ *
1200
+ * @param matrix - The rows of cell strings. セルの文字列の行。
1201
+ * @returns The TSV text in Excel's form. Excel の形の TSV の文字列。
1202
+ */
1203
+ export declare const serializeClipboardTsv: (matrix: readonly (readonly string[])[]) => string;
1204
+
1136
1205
  /**
1137
1206
  * Serialises a payload with the FIXED leading key order `{"v":1,"rows":R,"cols":C,"clipId":"…",…}`
1138
1207
  * and a deterministic key order everywhere below (fileoverview). A structurally malformed
@@ -1156,8 +1225,14 @@ export declare const serializeClipPayload: (payload: ClipPayload) => string;
1156
1225
  export declare const serializeHtmlTable: (payload: ClipPayload, clipJson: string) => string;
1157
1226
 
1158
1227
  /**
1159
- * Serializes a matrix to Excel-behavior TSV with a trailing CRLF.
1160
- * 行列を終端 CRLF つきの Excel 実挙動 TSV へ直列化。
1228
+ * Serializes a matrix to TSV with a trailing CRLF; `parseTsv` reads the result back to the same
1229
+ * matrix for every rectangular matrix of strings of at least 1 × 1 (the strict writer the package
1230
+ * publishes; a host stores tables with it).
1231
+ * 行列を終端 CRLF つきの TSV へ直列化する処理。文字列の少なくとも 1 × 1 のどの矩形行列でも `parseTsv` が同じ行列へ
1232
+ * 読み戻す (パッケージが公開する厳密な書き手。ホストは表をこれで保存する)。
1233
+ *
1234
+ * @param matrix - The rows of cell strings. セルの文字列の行。
1235
+ * @returns The TSV text. TSV の文字列。
1161
1236
  */
1162
1237
  export declare const serializeTsv: (matrix: readonly (readonly string[])[]) => string;
1163
1238
 
@@ -1247,7 +1322,7 @@ export declare const SPREADSHEET_RESERVED_SHORTCUTS: readonly string[];
1247
1322
  * グリッドの再バインド可能コマンド全件 (camelCase — 計画 §1.5 の正確な一覧)。前半は Google Sheets
1248
1323
  * 同等の既定束縛、拡張ブロックは既定未束縛 (`[]`) で consumer が `shortcuts` で束縛するための存在。
1249
1324
  */
1250
- export declare type SpreadsheetCommand = "bold" | "italic" | "underline" | "strikethrough" | "clearFormatting" | "alignLeft" | "alignCenter" | "alignRight" | "formatNumber" | "formatTime" | "formatDate" | "formatCurrency" | "formatPercent" | "formatScientific" | "bordersOuter" | "bordersClear" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "insertLink" | "insertNote" | "insertComment" | "openHyperlink" | "openValidationList" | "pasteSpecial" | "fillDown" | "fillRight" | "fillSelection" | "insertDate" | "insertTime" | "hideRows" | "hideColumns" | "unhideRows" | "unhideColumns" | "formatGeneral" | "bordersAll" | "pasteFormats" | "pasteFormulas" | "pasteAdd" | "pasteSubtract" | "pasteMultiply" | "pasteDivide" | "multiplyBy100" | "multiplyBy1000" | "divideBy100" | "divideBy1000" | "signReversal" | "fillColorYellow" | "fillColorBlue" | "fillColorGreen" | "fillColorRed" | "fillColorCustom1" | "fillColorCustom2" | "fillColorCustom3" | "fillColorCustom4" | "fillColorCustom5" | "fontColorYellow" | "fontColorBlue" | "fontColorGreen" | "fontColorRed" | "fontColorCustom1" | "fontColorCustom2" | "fontColorCustom3" | "fontColorCustom4" | "fontColorCustom5" | "toggleRowHighlight" | "toggleColumnHighlight" | "toggleBothHighlight" | "toggleIntersectionHighlight";
1325
+ export declare type SpreadsheetCommand = "bold" | "italic" | "underline" | "strikethrough" | "clearFormatting" | "alignLeft" | "alignCenter" | "alignRight" | "formatNumber" | "formatTime" | "formatDate" | "formatCurrency" | "formatPercent" | "formatScientific" | "bordersOuter" | "bordersClear" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "insertLink" | "insertNote" | "insertComment" | "openHyperlink" | "openValidationList" | "pasteSpecial" | "fillDown" | "fillRight" | "fillSelection" | "insertDate" | "insertTime" | "hideRows" | "hideColumns" | "unhideRows" | "unhideColumns" | "increaseColumnWidth" | "decreaseColumnWidth" | "increaseRowHeight" | "decreaseRowHeight" | "autoFitColumnWidth" | "formatGeneral" | "bordersAll" | "pasteFormats" | "pasteFormulas" | "pasteAdd" | "pasteSubtract" | "pasteMultiply" | "pasteDivide" | "multiplyBy100" | "multiplyBy1000" | "divideBy100" | "divideBy1000" | "signReversal" | "fillColorYellow" | "fillColorBlue" | "fillColorGreen" | "fillColorRed" | "fillColorCustom1" | "fillColorCustom2" | "fillColorCustom3" | "fillColorCustom4" | "fillColorCustom5" | "fontColorYellow" | "fontColorBlue" | "fontColorGreen" | "fontColorRed" | "fontColorCustom1" | "fontColorCustom2" | "fontColorCustom3" | "fontColorCustom4" | "fontColorCustom5" | "toggleRowHighlight" | "toggleColumnHighlight" | "toggleBothHighlight" | "toggleIntersectionHighlight";
1251
1326
 
1252
1327
  /**
1253
1328
  * The single data boundary between the grid and the consumer. Reads via getCellText (renderCell
@@ -1692,6 +1767,15 @@ export declare type SpreadsheetProps = {
1692
1767
  * 位置に依らず常時可視で、可視化の縦成分は no-op。飛行中の変更は全ドラッグを取り消す。
1693
1768
  */
1694
1769
  frozenRows?: number;
1770
+ /**
1771
+ * The leading rows whose cells are column headers (default 0): their cells take `role="columnheader"` and the
1772
+ * stylesheet's header-row paint (`--aqsp-header-row-*`), so assistive technology reads them as the headers of the
1773
+ * columns below. An integer in [0, frozenRows]: header rows are always frozen rows; anything else is a RangeError
1774
+ * during render.
1775
+ * 先頭の見出しの行数 (既定 0)。そのセルは `role="columnheader"` とスタイルシートの見出し行の塗り (`--aqsp-header-row-*`)
1776
+ * を受け、支援技術は下の列の見出しとして読む。[0, frozenRows] の整数 (見出しの行は常に凍結行)。それ以外は描画中の RangeError。
1777
+ */
1778
+ headerRows?: number;
1695
1779
  /**
1696
1780
  * Freezes the LAST N columns at the right edge (v0.9 — the VirtualGrid frozenTrailingCols
1697
1781
  * pass-through; LIVE prop, default 0). Validation SSOT is the engine's fail-fast contract
@@ -1901,6 +1985,26 @@ export declare type SpreadsheetProps = {
1901
1985
  * region は溢れない。
1902
1986
  */
1903
1987
  formatReadOnlyAnnouncement?: (rejection: ReadOnlyRejection) => string;
1988
+ /**
1989
+ * Makes the whole grid read-only (default false): `aria-readonly="true"` on the `role="grid"` element and on the
1990
+ * hidden input, and every cell is read-only whatever the adapter's `isCellReadOnly` says, so every write is refused
1991
+ * through `onReadOnlyRejected` / `formatReadOnlyAnnouncement` and the cell announcement's `readOnly` is true. View
1992
+ * changes stay available: selection, copy, scrolling, zoom, resizing, hiding and highlighting.
1993
+ * グリッド全体を読み取り専用にする (既定 false)。`role="grid"` の要素と隠しの入力に `aria-readonly="true"` を付け、アダプタの
1994
+ * `isCellReadOnly` に関わらず全てのセルを読み取り専用にする (書き込みは全て `onReadOnlyRejected` / `formatReadOnlyAnnouncement`
1995
+ * で拒まれ、セルの読み上げの `readOnly` は true)。見た目の変更 (選択・コピー・スクロール・拡大率・寸法・非表示・強調) は使える。
1996
+ */
1997
+ readOnly?: boolean;
1998
+ /**
1999
+ * The id of the element that names the grid (a caption or heading of the host): the `role="grid"` element and the
2000
+ * focusable root (the Escape landing point) both take `aria-labelledby` with it instead of the built-in
2001
+ * `labels.rootAriaLabel`. A non-empty id without whitespace; anything else is a RangeError during render. Omitted:
2002
+ * the root and the grid both carry `labels.rootAriaLabel` as `aria-label`.
2003
+ * グリッドに名前を与える要素の id (ホストの表題や見出し)。`role="grid"` の要素とフォーカスを受けるルート (Escape の着地点) は
2004
+ * 組み込みの `labels.rootAriaLabel` の代わりにこれを `aria-labelledby` に持つ。空白を含まない空でない id で、それ以外は描画中の
2005
+ * RangeError。省略するとルートとグリッドの両方が `labels.rootAriaLabel` を `aria-label` に持つ。
2006
+ */
2007
+ labelledBy?: string;
1904
2008
  /**
1905
2009
  * Paste outcome summary (v0.10 plan §3.1): the menu channel mirrors `paste(options)`'s
1906
2010
  * resolve value 1:1 (read refusals and the write-time re-gate included); the event channel
@@ -1982,6 +2086,20 @@ export declare type SpreadsheetProps = {
1982
2086
  command: SpreadsheetCommand;
1983
2087
  state: boolean | null;
1984
2088
  }) => string;
2089
+ /**
2090
+ * Live-region text after a keyboard resize (increaseColumnWidth / decreaseColumnWidth / increaseRowHeight /
2091
+ * decreaseRowHeight / autoFitColumnWidth): the active track's axis, index and new size in CSS px. Omit for silence
2092
+ * (no built-in strings); it shares the announcement debounce.
2093
+ * キーボードの寸法の変更 (increaseColumnWidth / decreaseColumnWidth / increaseRowHeight / decreaseRowHeight /
2094
+ * autoFitColumnWidth) の後の読み上げ文言。アクティブなトラックの軸・番号・新しい寸法 (CSS px) を受ける。省略で無音
2095
+ * (組み込み文言なし)。読み上げのデバウンスを共有する。
2096
+ */
2097
+ formatResizeAnnouncement?: (ctx: {
2098
+ command: SpreadsheetCommand;
2099
+ axis: "row" | "column";
2100
+ index: number;
2101
+ size: number;
2102
+ }) => string;
1985
2103
  /**
1986
2104
  * UI chrome language ("en" | "ja"; default "en"): selects the label catalog, the built-in
1987
2105
  * data-validation messages, and is forwarded to the grid scrollbars (arrow labels,
package/dist/index.d.ts CHANGED
@@ -670,6 +670,36 @@ export declare type HtmlTableResult = {
670
670
  readonly outcome: "none";
671
671
  };
672
672
 
673
+ /**
674
+ * Yields the rows of a text that may be only the beginning of a TSV (a file read partway, a stream not yet ended), in
675
+ * exactly iterateTsvRows's grammar, but only those the rest of the text cannot change: every row the text ends with a
676
+ * line terminator, up to the first field that opens a quote the text does not close (whether it is one quoted field or a
677
+ * literal one split at its line breaks is the rest's to decide). So the rows of any beginning of a TSV are the first
678
+ * rows of the whole: a reader of a stream can show them as final. Empty text yields no row. Unpadded.
679
+ * TSV の先頭だけかもしれない文字 (途中まで読んだファイル、まだ終わらないストリーム) の行を、iterateTsvRows とちょうど同じ文法で、
680
+ * ただし文字の続きが変えられない行だけ出す処理。文字が改行で終える行すべてを、文字が閉じない引用を開く最初の値まで出す (それが 1 つの
681
+ * 引用の値か、改行で割れる文字どおりの値かは続きが決める)。そのため TSV のどの先頭の行も全体の最初の行で、ストリームの読み手は
682
+ * それを確定したものとして見せられる。空の文字は行を出さない。埋めない。
683
+ *
684
+ * @param text - The beginning of a TSV text, as read. 読んだままの TSV の文字の先頭。
685
+ * @returns The rows the rest of the text cannot change, unpadded. 文字の続きが変えられない行 (埋めない)。
686
+ */
687
+ export declare function iterateTsvPrefixRows(text: string): Generator<string[]>;
688
+
689
+ /**
690
+ * Yields the rows of a TSV text one at a time, in exactly parseTsv's grammar (the same quoting rule, line terminators
691
+ * and final-terminator handling; empty text is one row with one empty cell), WITHOUT padding them to a common width. A
692
+ * consumer that stops early materialises nothing past the last row it took, so a large text can be previewed under a
693
+ * cell budget.
694
+ * TSV の文字列の行を 1 つずつ出す処理。parseTsv とちょうど同じ文法 (同じ引用の規則・改行・末尾の改行の扱い。空の文字は空のセル
695
+ * 1 つの 1 行) で、幅を揃える右の埋めはしない。途中で止めた受け手は、最後に取った行より先を何も実体化しないので、大きな文字を
696
+ * セルの予算の下で見られる。
697
+ *
698
+ * @param text - The TSV text. TSV の文字列。
699
+ * @returns The rows, unpadded. 埋めない行。
700
+ */
701
+ export declare function iterateTsvRows(text: string): Generator<string[]>;
702
+
673
703
  /**
674
704
  * Renders the hyperlink editor for one cell.
675
705
  * 1 セルのハイパーリンクエディタを描画する。
@@ -733,6 +763,23 @@ export declare type ListValidationRule = {
733
763
  /** Builds a normalized range from two corners. / 2 隅から正規化レンジを構築。 */
734
764
  export declare const makeRange: (a: CellCoord, b: CellCoord) => CellRange;
735
765
 
766
+ /**
767
+ * The dimensions `parseTsv(text)` would materialise — rows and the rectangularised (maximum)
768
+ * column count — from the SAME grammar walk, without building any row array: the ADR-12
769
+ * pre-materialisation estimate of the `tsv` paste source (a raw line-terminator count would
770
+ * over-count rows for quoted embedded newlines and falsely reject a legitimate paste).
771
+ * `parseTsv(text)` が実体化する寸法 — 行数と矩形化後 (最大) の列数 — を**同じ**文法走査から、
772
+ * 行配列を一切作らずに返す: `tsv` 貼り付けソースの ADR-12 実体化前見積もり (素の改行計数は
773
+ * quoted 内の埋め込み改行を行と数え、正当な貼り付けを誤って上限拒否する)。
774
+ *
775
+ * @param text - The TSV text. TSV の文字列。
776
+ * @returns The row count and the maximum column count. 行数と最大の列数。
777
+ */
778
+ export declare const measureTsv: (text: string) => {
779
+ rows: number;
780
+ cols: number;
781
+ };
782
+
736
783
  /**
737
784
  * Applies a patch to a base format: `null` clears a key, `undefined` (or an omitted key) keeps
738
785
  * the base value, anything else replaces it (borders as a whole set). Returns the CANONICAL
@@ -902,8 +949,13 @@ export declare type ParsedChord = {
902
949
  export declare const parseHtmlTable: (html: string, kind: HtmlTableKind, options: NumberFormatDecodeOptions, maxCells: number) => HtmlTableResult;
903
950
 
904
951
  /**
905
- * Parses Excel-behavior TSV into a rectangular matrix (ragged rows are right-padded).
906
- * Excel 実挙動 TSV を矩形行列へ解析 (ギザギザ行は右パディング)。
952
+ * Parses TSV into a rectangular matrix (ragged rows are right-padded with ""; one trailing line
953
+ * terminator is dropped; empty text is one empty cell): the rows of iterateTsvRows, padded.
954
+ * TSV を矩形行列へ解析する処理 (不揃いの行は "" で右を埋め、末尾の改行 1 つを除き、空の文字は空のセル 1 つ)。iterateTsvRows の
955
+ * 行を埋めたもの。
956
+ *
957
+ * @param text - The TSV text. TSV の文字列。
958
+ * @returns The rectangular matrix, at least 1 × 1. 少なくとも 1 × 1 の矩形行列。
907
959
  */
908
960
  export declare const parseTsv: (text: string) => string[][];
909
961
 
@@ -1133,6 +1185,23 @@ export declare type SelectionState = {
1133
1185
  active: CellCoord;
1134
1186
  };
1135
1187
 
1188
+ /**
1189
+ * Serializes a matrix the way Excel writes its clipboard text, with a trailing CRLF: only a field
1190
+ * holding a tab, CR or LF is quoted (inner quotes doubled), so a field that merely starts with `"`
1191
+ * reaches a plain-text target as typed. Its round trip is not exact for such fields (a raw
1192
+ * `"\t"\tBlue` reads back as two cells); the grid's copy writes text/plain with it (and so should a
1193
+ * host's own copy control, to match), and the grid's own paste reads the JSON payload first. Files and
1194
+ * stored bodies use `serializeTsv`.
1195
+ * Excel がクリップボードの文字を書く形で行列を終端 CRLF つきに直列化する処理。囲むのはタブ・CR・LF を含む値だけ (中の
1196
+ * `"` は二重化) なので、`"` で始まるだけの値は平文の貼り先へそのまま届く。そうした値の往復は厳密でない (素の
1197
+ * `"\t"\tBlue` は 2 つのセルに読み戻る)。グリッドのコピーが text/plain をこれで書き (ホスト自身のコピーの部品も揃えて
1198
+ * これで書く)、グリッド自身の貼り付けは JSON の payload を先に読む。ファイルと保存する本文は `serializeTsv` を使う。
1199
+ *
1200
+ * @param matrix - The rows of cell strings. セルの文字列の行。
1201
+ * @returns The TSV text in Excel's form. Excel の形の TSV の文字列。
1202
+ */
1203
+ export declare const serializeClipboardTsv: (matrix: readonly (readonly string[])[]) => string;
1204
+
1136
1205
  /**
1137
1206
  * Serialises a payload with the FIXED leading key order `{"v":1,"rows":R,"cols":C,"clipId":"…",…}`
1138
1207
  * and a deterministic key order everywhere below (fileoverview). A structurally malformed
@@ -1156,8 +1225,14 @@ export declare const serializeClipPayload: (payload: ClipPayload) => string;
1156
1225
  export declare const serializeHtmlTable: (payload: ClipPayload, clipJson: string) => string;
1157
1226
 
1158
1227
  /**
1159
- * Serializes a matrix to Excel-behavior TSV with a trailing CRLF.
1160
- * 行列を終端 CRLF つきの Excel 実挙動 TSV へ直列化。
1228
+ * Serializes a matrix to TSV with a trailing CRLF; `parseTsv` reads the result back to the same
1229
+ * matrix for every rectangular matrix of strings of at least 1 × 1 (the strict writer the package
1230
+ * publishes; a host stores tables with it).
1231
+ * 行列を終端 CRLF つきの TSV へ直列化する処理。文字列の少なくとも 1 × 1 のどの矩形行列でも `parseTsv` が同じ行列へ
1232
+ * 読み戻す (パッケージが公開する厳密な書き手。ホストは表をこれで保存する)。
1233
+ *
1234
+ * @param matrix - The rows of cell strings. セルの文字列の行。
1235
+ * @returns The TSV text. TSV の文字列。
1161
1236
  */
1162
1237
  export declare const serializeTsv: (matrix: readonly (readonly string[])[]) => string;
1163
1238
 
@@ -1247,7 +1322,7 @@ export declare const SPREADSHEET_RESERVED_SHORTCUTS: readonly string[];
1247
1322
  * グリッドの再バインド可能コマンド全件 (camelCase — 計画 §1.5 の正確な一覧)。前半は Google Sheets
1248
1323
  * 同等の既定束縛、拡張ブロックは既定未束縛 (`[]`) で consumer が `shortcuts` で束縛するための存在。
1249
1324
  */
1250
- export declare type SpreadsheetCommand = "bold" | "italic" | "underline" | "strikethrough" | "clearFormatting" | "alignLeft" | "alignCenter" | "alignRight" | "formatNumber" | "formatTime" | "formatDate" | "formatCurrency" | "formatPercent" | "formatScientific" | "bordersOuter" | "bordersClear" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "insertLink" | "insertNote" | "insertComment" | "openHyperlink" | "openValidationList" | "pasteSpecial" | "fillDown" | "fillRight" | "fillSelection" | "insertDate" | "insertTime" | "hideRows" | "hideColumns" | "unhideRows" | "unhideColumns" | "formatGeneral" | "bordersAll" | "pasteFormats" | "pasteFormulas" | "pasteAdd" | "pasteSubtract" | "pasteMultiply" | "pasteDivide" | "multiplyBy100" | "multiplyBy1000" | "divideBy100" | "divideBy1000" | "signReversal" | "fillColorYellow" | "fillColorBlue" | "fillColorGreen" | "fillColorRed" | "fillColorCustom1" | "fillColorCustom2" | "fillColorCustom3" | "fillColorCustom4" | "fillColorCustom5" | "fontColorYellow" | "fontColorBlue" | "fontColorGreen" | "fontColorRed" | "fontColorCustom1" | "fontColorCustom2" | "fontColorCustom3" | "fontColorCustom4" | "fontColorCustom5" | "toggleRowHighlight" | "toggleColumnHighlight" | "toggleBothHighlight" | "toggleIntersectionHighlight";
1325
+ export declare type SpreadsheetCommand = "bold" | "italic" | "underline" | "strikethrough" | "clearFormatting" | "alignLeft" | "alignCenter" | "alignRight" | "formatNumber" | "formatTime" | "formatDate" | "formatCurrency" | "formatPercent" | "formatScientific" | "bordersOuter" | "bordersClear" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "insertLink" | "insertNote" | "insertComment" | "openHyperlink" | "openValidationList" | "pasteSpecial" | "fillDown" | "fillRight" | "fillSelection" | "insertDate" | "insertTime" | "hideRows" | "hideColumns" | "unhideRows" | "unhideColumns" | "increaseColumnWidth" | "decreaseColumnWidth" | "increaseRowHeight" | "decreaseRowHeight" | "autoFitColumnWidth" | "formatGeneral" | "bordersAll" | "pasteFormats" | "pasteFormulas" | "pasteAdd" | "pasteSubtract" | "pasteMultiply" | "pasteDivide" | "multiplyBy100" | "multiplyBy1000" | "divideBy100" | "divideBy1000" | "signReversal" | "fillColorYellow" | "fillColorBlue" | "fillColorGreen" | "fillColorRed" | "fillColorCustom1" | "fillColorCustom2" | "fillColorCustom3" | "fillColorCustom4" | "fillColorCustom5" | "fontColorYellow" | "fontColorBlue" | "fontColorGreen" | "fontColorRed" | "fontColorCustom1" | "fontColorCustom2" | "fontColorCustom3" | "fontColorCustom4" | "fontColorCustom5" | "toggleRowHighlight" | "toggleColumnHighlight" | "toggleBothHighlight" | "toggleIntersectionHighlight";
1251
1326
 
1252
1327
  /**
1253
1328
  * The single data boundary between the grid and the consumer. Reads via getCellText (renderCell
@@ -1692,6 +1767,15 @@ export declare type SpreadsheetProps = {
1692
1767
  * 位置に依らず常時可視で、可視化の縦成分は no-op。飛行中の変更は全ドラッグを取り消す。
1693
1768
  */
1694
1769
  frozenRows?: number;
1770
+ /**
1771
+ * The leading rows whose cells are column headers (default 0): their cells take `role="columnheader"` and the
1772
+ * stylesheet's header-row paint (`--aqsp-header-row-*`), so assistive technology reads them as the headers of the
1773
+ * columns below. An integer in [0, frozenRows]: header rows are always frozen rows; anything else is a RangeError
1774
+ * during render.
1775
+ * 先頭の見出しの行数 (既定 0)。そのセルは `role="columnheader"` とスタイルシートの見出し行の塗り (`--aqsp-header-row-*`)
1776
+ * を受け、支援技術は下の列の見出しとして読む。[0, frozenRows] の整数 (見出しの行は常に凍結行)。それ以外は描画中の RangeError。
1777
+ */
1778
+ headerRows?: number;
1695
1779
  /**
1696
1780
  * Freezes the LAST N columns at the right edge (v0.9 — the VirtualGrid frozenTrailingCols
1697
1781
  * pass-through; LIVE prop, default 0). Validation SSOT is the engine's fail-fast contract
@@ -1901,6 +1985,26 @@ export declare type SpreadsheetProps = {
1901
1985
  * region は溢れない。
1902
1986
  */
1903
1987
  formatReadOnlyAnnouncement?: (rejection: ReadOnlyRejection) => string;
1988
+ /**
1989
+ * Makes the whole grid read-only (default false): `aria-readonly="true"` on the `role="grid"` element and on the
1990
+ * hidden input, and every cell is read-only whatever the adapter's `isCellReadOnly` says, so every write is refused
1991
+ * through `onReadOnlyRejected` / `formatReadOnlyAnnouncement` and the cell announcement's `readOnly` is true. View
1992
+ * changes stay available: selection, copy, scrolling, zoom, resizing, hiding and highlighting.
1993
+ * グリッド全体を読み取り専用にする (既定 false)。`role="grid"` の要素と隠しの入力に `aria-readonly="true"` を付け、アダプタの
1994
+ * `isCellReadOnly` に関わらず全てのセルを読み取り専用にする (書き込みは全て `onReadOnlyRejected` / `formatReadOnlyAnnouncement`
1995
+ * で拒まれ、セルの読み上げの `readOnly` は true)。見た目の変更 (選択・コピー・スクロール・拡大率・寸法・非表示・強調) は使える。
1996
+ */
1997
+ readOnly?: boolean;
1998
+ /**
1999
+ * The id of the element that names the grid (a caption or heading of the host): the `role="grid"` element and the
2000
+ * focusable root (the Escape landing point) both take `aria-labelledby` with it instead of the built-in
2001
+ * `labels.rootAriaLabel`. A non-empty id without whitespace; anything else is a RangeError during render. Omitted:
2002
+ * the root and the grid both carry `labels.rootAriaLabel` as `aria-label`.
2003
+ * グリッドに名前を与える要素の id (ホストの表題や見出し)。`role="grid"` の要素とフォーカスを受けるルート (Escape の着地点) は
2004
+ * 組み込みの `labels.rootAriaLabel` の代わりにこれを `aria-labelledby` に持つ。空白を含まない空でない id で、それ以外は描画中の
2005
+ * RangeError。省略するとルートとグリッドの両方が `labels.rootAriaLabel` を `aria-label` に持つ。
2006
+ */
2007
+ labelledBy?: string;
1904
2008
  /**
1905
2009
  * Paste outcome summary (v0.10 plan §3.1): the menu channel mirrors `paste(options)`'s
1906
2010
  * resolve value 1:1 (read refusals and the write-time re-gate included); the event channel
@@ -1982,6 +2086,20 @@ export declare type SpreadsheetProps = {
1982
2086
  command: SpreadsheetCommand;
1983
2087
  state: boolean | null;
1984
2088
  }) => string;
2089
+ /**
2090
+ * Live-region text after a keyboard resize (increaseColumnWidth / decreaseColumnWidth / increaseRowHeight /
2091
+ * decreaseRowHeight / autoFitColumnWidth): the active track's axis, index and new size in CSS px. Omit for silence
2092
+ * (no built-in strings); it shares the announcement debounce.
2093
+ * キーボードの寸法の変更 (increaseColumnWidth / decreaseColumnWidth / increaseRowHeight / decreaseRowHeight /
2094
+ * autoFitColumnWidth) の後の読み上げ文言。アクティブなトラックの軸・番号・新しい寸法 (CSS px) を受ける。省略で無音
2095
+ * (組み込み文言なし)。読み上げのデバウンスを共有する。
2096
+ */
2097
+ formatResizeAnnouncement?: (ctx: {
2098
+ command: SpreadsheetCommand;
2099
+ axis: "row" | "column";
2100
+ index: number;
2101
+ size: number;
2102
+ }) => string;
1985
2103
  /**
1986
2104
  * UI chrome language ("en" | "ja"; default "en"): selects the label catalog, the built-in
1987
2105
  * data-validation messages, and is forwarded to the grid scrollbars (arrow labels,