@aiquants/spreadsheet 0.20.0 → 0.20.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/CHANGELOG.md +51 -0
- package/README.md +15 -12
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +35 -18
- package/dist/index.d.ts +35 -18
- package/dist/index.js +2187 -2179
- package/package.json +1 -1
- package/src/Spreadsheet.tsx +43 -22
- package/src/clipboard/useClipboard.ts +22 -9
- package/src/commands/useCommands.ts +21 -8
package/dist/index.d.cts
CHANGED
|
@@ -2005,19 +2005,29 @@ export declare type SpreadsheetProps = {
|
|
|
2005
2005
|
renderCell?: (ctx: RenderCellContext) => ReactNode;
|
|
2006
2006
|
/**
|
|
2007
2007
|
* Fires on every confirmed SelectionState change (press replace, extend confirm, cycling,
|
|
2008
|
-
* paste replace, Ctrl+A, ...)
|
|
2009
|
-
*
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2012
|
-
* fire
|
|
2013
|
-
*
|
|
2008
|
+
* paste replace, Ctrl+A, ...), including one run by a handle call (the handle `paste` moves
|
|
2009
|
+
* the selection to the written block and fires like the keyboard paste). Never during a drag
|
|
2010
|
+
* (state frozen — one fire at pointerup), with ONE documented in-drag firing point: the header
|
|
2011
|
+
* subtract reservation converts to a real press on the first movement, firing the deferred
|
|
2012
|
+
* press replace mid-drag (total fire count matches v0.1 — conversion 1 + up 1). Never for the
|
|
2013
|
+
* initial A1 mount. TWO adapter-driven fire points, each firing from a layout effect of the
|
|
2014
|
+
* commit that brings the new adapter or counts (neither a gesture nor a handle call): a sheet
|
|
2015
|
+
* switch (a new adapter identity) to a non-empty adapter resets the selection to A1 through
|
|
2016
|
+
* the wrapper and fires once, unless the selection already was the lone cell A1; and a
|
|
2017
|
+
* same-adapter rowCount / colCount shrink that moved the selection fires once (ADR-33). A
|
|
2018
|
+
* switch or a shrink that leaves 0 rows or 0 columns (so no A1) writes the empty-grid state
|
|
2019
|
+
* directly and never fires.
|
|
2014
2020
|
* Independent of the live region's 200ms debounce (firing point: the §6.9-1 setSelection
|
|
2015
2021
|
* wrapper).
|
|
2016
|
-
* 確定 SelectionState
|
|
2017
|
-
*
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2022
|
+
* 確定 SelectionState が変わるたびに発火。handle の呼び出しが走らせた変化も含む (handle の
|
|
2023
|
+
* `paste` は選択を書いた範囲へ動かし、キーボードの貼り付けと同じく発火)。ドラッグ中と初期マウント
|
|
2024
|
+
* では発火しない。明文のドラッグ中発火点が 1 つ: ヘッダー減算予約の実 press 変換 (初動 move) は
|
|
2025
|
+
* 遅延 press 置換をドラッグ中に発火する (発火総数は v0.1 と同一 — 変換 1 + up 1)。adapter 起点の
|
|
2026
|
+
* 発火点は 2 つで、どちらも新しい adapter や行数・列数を運んだ commit の layout effect から発火
|
|
2027
|
+
* (ジェスチャでも handle の呼び出しでもない): 空でない adapter へのシート切替 (adapter の同一性の
|
|
2028
|
+
* 変化) は、ラッパー経由の A1 へのリセットで 1 回発火 (選択が既に A1 の 1 マスだけなら発火なし)。
|
|
2029
|
+
* 同一 adapter の rowCount / colCount 縮小で選択が動いたときも 1 回発火 (ADR-33)。0 行または
|
|
2030
|
+
* 0 列 (A1 が無い) になる切替と縮小は、空グリッドの状態をラッパーを通さずに書き、発火なし。
|
|
2021
2031
|
*/
|
|
2022
2032
|
onSelectionChange?: (selection: SelectionState) => void;
|
|
2023
2033
|
/** Consumer context menu (§6.4.3-4 / §6.6.1 Shift+F10); keyboard origin carries the active cell viewport rect. / consumer コンテキストメニュー。 */
|
|
@@ -2130,13 +2140,20 @@ export declare type SpreadsheetProps = {
|
|
|
2130
2140
|
*/
|
|
2131
2141
|
enableFillHandle?: boolean;
|
|
2132
2142
|
/**
|
|
2133
|
-
* §11 opt-out (default true): false
|
|
2134
|
-
* entirely (track children, not resident
|
|
2135
|
-
*
|
|
2136
|
-
*
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2143
|
+
* §11 opt-out (default true): false closes every way the user changes track sizes. The
|
|
2144
|
+
* resize strip / unhide marker DOM is suppressed entirely (track children, not resident
|
|
2145
|
+
* nodes) and the band listeners are inert; the keyboard resize commands and the hide /
|
|
2146
|
+
* unhide commands are unavailable (their chords pass through, `executeCommand` returns
|
|
2147
|
+
* false); a paste writes no column widths or row heights (a copy still carries them, and
|
|
2148
|
+
* a `columnWidths` paste resolves `"empty"`). Sizes then change only through the
|
|
2149
|
+
* imperative API (`resizeRow` / `resizeColumn` / `autoFitColumns`), which is also the
|
|
2150
|
+
* only restore path for hidden tracks.
|
|
2151
|
+
* §11 の opt-out (既定 true)。false は利用者が寸法を変える道を全て閉じる。ストリップ /
|
|
2152
|
+
* unhide マーカーの DOM 生成ごと抑止 + 帯リスナー不活性、寸法のキーのコマンドと非表示・
|
|
2153
|
+
* 再表示のコマンドは使えず (チョードは素通し、`executeCommand` は false)、貼り付けは列幅・
|
|
2154
|
+
* 行高を書かない (copy は運び、`columnWidths` の貼り付けは `"empty"`)。寸法を変えるのは
|
|
2155
|
+
* 命令 API (`resizeRow` / `resizeColumn` / `autoFitColumns`) だけで、非表示トラックの
|
|
2156
|
+
* 復元もこの API だけ。
|
|
2140
2157
|
*/
|
|
2141
2158
|
enableResizeUI?: boolean;
|
|
2142
2159
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2005,19 +2005,29 @@ export declare type SpreadsheetProps = {
|
|
|
2005
2005
|
renderCell?: (ctx: RenderCellContext) => ReactNode;
|
|
2006
2006
|
/**
|
|
2007
2007
|
* Fires on every confirmed SelectionState change (press replace, extend confirm, cycling,
|
|
2008
|
-
* paste replace, Ctrl+A, ...)
|
|
2009
|
-
*
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2012
|
-
* fire
|
|
2013
|
-
*
|
|
2008
|
+
* paste replace, Ctrl+A, ...), including one run by a handle call (the handle `paste` moves
|
|
2009
|
+
* the selection to the written block and fires like the keyboard paste). Never during a drag
|
|
2010
|
+
* (state frozen — one fire at pointerup), with ONE documented in-drag firing point: the header
|
|
2011
|
+
* subtract reservation converts to a real press on the first movement, firing the deferred
|
|
2012
|
+
* press replace mid-drag (total fire count matches v0.1 — conversion 1 + up 1). Never for the
|
|
2013
|
+
* initial A1 mount. TWO adapter-driven fire points, each firing from a layout effect of the
|
|
2014
|
+
* commit that brings the new adapter or counts (neither a gesture nor a handle call): a sheet
|
|
2015
|
+
* switch (a new adapter identity) to a non-empty adapter resets the selection to A1 through
|
|
2016
|
+
* the wrapper and fires once, unless the selection already was the lone cell A1; and a
|
|
2017
|
+
* same-adapter rowCount / colCount shrink that moved the selection fires once (ADR-33). A
|
|
2018
|
+
* switch or a shrink that leaves 0 rows or 0 columns (so no A1) writes the empty-grid state
|
|
2019
|
+
* directly and never fires.
|
|
2014
2020
|
* Independent of the live region's 200ms debounce (firing point: the §6.9-1 setSelection
|
|
2015
2021
|
* wrapper).
|
|
2016
|
-
* 確定 SelectionState
|
|
2017
|
-
*
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2022
|
+
* 確定 SelectionState が変わるたびに発火。handle の呼び出しが走らせた変化も含む (handle の
|
|
2023
|
+
* `paste` は選択を書いた範囲へ動かし、キーボードの貼り付けと同じく発火)。ドラッグ中と初期マウント
|
|
2024
|
+
* では発火しない。明文のドラッグ中発火点が 1 つ: ヘッダー減算予約の実 press 変換 (初動 move) は
|
|
2025
|
+
* 遅延 press 置換をドラッグ中に発火する (発火総数は v0.1 と同一 — 変換 1 + up 1)。adapter 起点の
|
|
2026
|
+
* 発火点は 2 つで、どちらも新しい adapter や行数・列数を運んだ commit の layout effect から発火
|
|
2027
|
+
* (ジェスチャでも handle の呼び出しでもない): 空でない adapter へのシート切替 (adapter の同一性の
|
|
2028
|
+
* 変化) は、ラッパー経由の A1 へのリセットで 1 回発火 (選択が既に A1 の 1 マスだけなら発火なし)。
|
|
2029
|
+
* 同一 adapter の rowCount / colCount 縮小で選択が動いたときも 1 回発火 (ADR-33)。0 行または
|
|
2030
|
+
* 0 列 (A1 が無い) になる切替と縮小は、空グリッドの状態をラッパーを通さずに書き、発火なし。
|
|
2021
2031
|
*/
|
|
2022
2032
|
onSelectionChange?: (selection: SelectionState) => void;
|
|
2023
2033
|
/** Consumer context menu (§6.4.3-4 / §6.6.1 Shift+F10); keyboard origin carries the active cell viewport rect. / consumer コンテキストメニュー。 */
|
|
@@ -2130,13 +2140,20 @@ export declare type SpreadsheetProps = {
|
|
|
2130
2140
|
*/
|
|
2131
2141
|
enableFillHandle?: boolean;
|
|
2132
2142
|
/**
|
|
2133
|
-
* §11 opt-out (default true): false
|
|
2134
|
-
* entirely (track children, not resident
|
|
2135
|
-
*
|
|
2136
|
-
*
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2143
|
+
* §11 opt-out (default true): false closes every way the user changes track sizes. The
|
|
2144
|
+
* resize strip / unhide marker DOM is suppressed entirely (track children, not resident
|
|
2145
|
+
* nodes) and the band listeners are inert; the keyboard resize commands and the hide /
|
|
2146
|
+
* unhide commands are unavailable (their chords pass through, `executeCommand` returns
|
|
2147
|
+
* false); a paste writes no column widths or row heights (a copy still carries them, and
|
|
2148
|
+
* a `columnWidths` paste resolves `"empty"`). Sizes then change only through the
|
|
2149
|
+
* imperative API (`resizeRow` / `resizeColumn` / `autoFitColumns`), which is also the
|
|
2150
|
+
* only restore path for hidden tracks.
|
|
2151
|
+
* §11 の opt-out (既定 true)。false は利用者が寸法を変える道を全て閉じる。ストリップ /
|
|
2152
|
+
* unhide マーカーの DOM 生成ごと抑止 + 帯リスナー不活性、寸法のキーのコマンドと非表示・
|
|
2153
|
+
* 再表示のコマンドは使えず (チョードは素通し、`executeCommand` は false)、貼り付けは列幅・
|
|
2154
|
+
* 行高を書かない (copy は運び、`columnWidths` の貼り付けは `"empty"`)。寸法を変えるのは
|
|
2155
|
+
* 命令 API (`resizeRow` / `resizeColumn` / `autoFitColumns`) だけで、非表示トラックの
|
|
2156
|
+
* 復元もこの API だけ。
|
|
2140
2157
|
*/
|
|
2141
2158
|
enableResizeUI?: boolean;
|
|
2142
2159
|
/**
|