open-grid 1.6.1 โ 1.7.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 +62 -0
- package/dist/ExportProgressView-BYPw8osg.cjs +2 -0
- package/dist/ExportProgressView-Bt5-z7rE.js +2 -0
- package/dist/LcpMergeOrderer-CeP6C6G1.cjs +2 -0
- package/dist/LcpMergeOrderer-Ebwuir-r.js +2 -0
- package/dist/OpenGrid-Bh1NMOcm.cjs +98 -0
- package/dist/OpenGrid-CeXt04ho.js +98 -0
- package/dist/Registry-CrT46EAO.js +2 -0
- package/dist/Registry-DpHOpU5V.cjs +2 -0
- package/dist/XlsxChannel-CuOZ3LQz.js +2 -0
- package/dist/XlsxChannel-DQHLGend.cjs +2 -0
- package/dist/XlsxWorkbookWriter-DixuNGtw.cjs +3 -0
- package/dist/XlsxWorkbookWriter-VgbibI0Z.js +3 -0
- package/dist/fflate-Cs3txMgg.js +2 -0
- package/dist/fflate-G9RAFEgF.cjs +2 -0
- package/dist/index-1OXjJmct.js +2 -0
- package/dist/index-B5V7e4Xc.js +2 -0
- package/dist/index-DbKDox8y.cjs +2 -0
- package/dist/index-HaDoF1HM.cjs +2 -0
- package/dist/open-grid-react.cjs +1 -27
- package/dist/open-grid-react.js +1 -30
- package/dist/open-grid-vue.cjs +1 -31
- package/dist/open-grid-vue.js +1 -33
- package/dist/open-grid.cjs +6 -275
- package/dist/open-grid.js +6 -293
- package/dist/sinks-BCZFMGQJ.cjs +2 -0
- package/dist/sinks-qkBJ5bKn.js +2 -0
- package/dist/types/core/CFRenderBridge.d.ts +5 -1
- package/dist/types/core/CellEditManager.d.ts +26 -2
- package/dist/types/core/CellEventHandler.d.ts +6 -2
- package/dist/types/core/ColumnLayout.d.ts +8 -0
- package/dist/types/core/DataLayer.d.ts +48 -1
- package/dist/types/core/DetailManager.d.ts +43 -2
- package/dist/types/core/ExportManager.d.ts +25 -0
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +61 -3
- package/dist/types/core/FooterManager.d.ts +43 -1
- package/dist/types/core/FormulaController.d.ts +4 -4
- package/dist/types/core/GridComposer.d.ts +11 -1
- package/dist/types/core/GridRenderer.d.ts +84 -19
- package/dist/types/core/GroupTreeManager.d.ts +6 -4
- package/dist/types/core/KeyboardManager.d.ts +3 -2
- package/dist/types/core/MutationService.d.ts +10 -8
- package/dist/types/core/OpenGrid.d.ts +7 -5
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/SortFilterManager.d.ts +10 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -0
- package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
- package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
- package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
- package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
- package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
- package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
- package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
- package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
- package/dist/types/core/coordinate/ports.d.ts +5 -0
- package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
- package/dist/types/core/domain/footer/ports.d.ts +31 -0
- package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
- package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
- package/dist/types/core/domain/render/ports.d.ts +169 -0
- package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
- package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
- package/dist/types/core/domain/resize/ports.d.ts +64 -0
- package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
- package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
- package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
- package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
- package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
- package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
- package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
- package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
- package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
- package/dist/types/core/domain/sort/ports.d.ts +140 -0
- package/dist/types/core/export/ExportProgressView.d.ts +28 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +38 -1
- package/dist/types/core/export/channels/XlsxRichTextRun.d.ts +14 -0
- package/dist/types/core/export/channels/XlsxSheetXml.d.ts +19 -0
- package/dist/types/core/export/channels/XlsxStyleEntries.d.ts +80 -0
- package/dist/types/core/export/channels/XlsxStylesRegistry.d.ts +20 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +20 -0
- package/dist/types/core/export/channels/XlsxXml.d.ts +6 -0
- package/dist/types/core/export/index.d.ts +2 -0
- package/dist/types/core/export/sinks.d.ts +81 -0
- package/dist/types/core/export/types.d.ts +63 -0
- package/dist/types/core/host/archCheck.d.ts +16 -1
- package/dist/types/core/i18n/locales/en.d.ts +6 -0
- package/dist/types/core/i18n/locales/ko.d.ts +6 -0
- package/dist/types/core/i18n/types.d.ts +8 -0
- package/dist/types/core/render/FooterView.d.ts +121 -0
- package/dist/types/core/render/GeometryApplier.d.ts +55 -0
- package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
- package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
- package/dist/types/core/render/RenderScheduler.d.ts +225 -0
- package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
- package/dist/types/core/render/ScrollFollower.d.ts +34 -0
- package/dist/types/core/render/ScrollObserver.d.ts +47 -0
- package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
- package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
- package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
- package/dist/types/core/render/body/BodyView.d.ts +185 -0
- package/dist/types/core/render/body/CellLocator.d.ts +36 -0
- package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
- package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
- package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
- package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
- package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
- package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
- package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
- package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
- package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
- package/dist/types/core/render/dom.d.ts +10 -0
- package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
- package/dist/types/core/render/header/HeaderView.d.ts +84 -0
- package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
- package/dist/types/core/render/ports.d.ts +218 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
- package/dist/types/core/types.d.ts +94 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
- package/dist/xlsx.min-CMvrM6b4.cjs +138 -0
- package/dist/xlsx.min-i_b-4PvU.js +138 -0
- package/package.json +3 -8
- package/dist/OpenGrid-CLk8Vt7j.cjs +0 -7459
- package/dist/OpenGrid-D6YxCsnV.js +0 -7472
- package/dist/Registry-CPJYOqCn.js +0 -74
- package/dist/Registry-D74ZmdDz.cjs +0 -71
- package/dist/index-CeJ-0-80.cjs +0 -260
- package/dist/index-D0DJtKYI.cjs +0 -452
- package/dist/index-DnarQ4eR.js +0 -266
- package/dist/index-VkKgQ506.js +0 -481
- package/dist/xlsx.min-BQ1o3sB6.cjs +0 -11793
- package/dist/xlsx.min-Bbz2ZypC.js +0 -11794
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ICellTextPolicy, TextSpec } from './geometryPorts.js';
|
|
2
|
+
export interface CellTextPolicyOptions {
|
|
3
|
+
/** ์ต์ ๊ธ์ ํญ์ ๊ธ๊ผด ํฌ๊ธฐ์ ๋ช ๋ฐฐ๋ก ๋ณผ์ง(๊ธฐ๋ณธ 0.2). / Narrowest glyph as a fraction of font size. */
|
|
4
|
+
minGlyphEm?: number;
|
|
5
|
+
/** ๋ฎ๋ ํญ์ ์ปฌ๋ผ ์์ชฝ ํญ์ ๋ช ๋ฐฐ๋ก ์ก์์ง(๊ธฐ๋ณธ 2). / Covered width as a multiple of the inner width. */
|
|
6
|
+
headroom?: number;
|
|
7
|
+
/** ํ ์ค ๋ชซ์ ๋ํ๋ ๊ธ์ ์(๊ธฐ๋ณธ 16). / Extra characters per line. */
|
|
8
|
+
slack?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ์นธ์ ๋ฃ์ ๊ธ์ ์ ์ํ๊ณผ ๊ทธ ์ํ์ด ๋ฎ๋ ํญ์ ์ ํ๊ณ ์์ ํ๊ฒ ์๋ฅด๋ ์ ์ผํ ๊ณณ. ์ํ๊ฐ ์๋ค.
|
|
12
|
+
* ๋ถ๋ณ: ๊ฒฐ๊ณผ๋ ์๋ฌธ์ ์๋ถ๋ถ ยท ์๋ก๊ฒ์ดํธ ์ยท๊ฒฐํฉ ๋ฌธ์๋ฅผ ๊ฐ๋ฅด์ง ์์ ยท ํญ ์๋ ๊ธ์๊ฐ ์๋ฅผ ์๋ฆฌ ์์ ์์ผ๋ฉด ์ ๋ฌธ.
|
|
13
|
+
*
|
|
14
|
+
* Sole owner of the per-cell character limit, the width it covers, and safe truncation. Stateless.
|
|
15
|
+
*/
|
|
16
|
+
export declare class CellTextPolicy implements ICellTextPolicy {
|
|
17
|
+
private readonly _em;
|
|
18
|
+
private readonly _headroom;
|
|
19
|
+
private readonly _slack;
|
|
20
|
+
constructor(opts?: CellTextPolicyOptions);
|
|
21
|
+
/**
|
|
22
|
+
* ์ํ(๊ธ์ ์). ์๋ฅด์ง ์์์ผ ํ ๋(์ํ ๋ยท์๋ ๋์ดยทํ
ํ๋ฆฟ, ๋ณด์ด๋ ํญ ๋ชจ๋ฆ, ๊ธ๊ผด ์งํ๊ฐ ์ด์ํจ)๋ Infinity.
|
|
23
|
+
* ํ ์ค: ceil(max(์์ชฝ ํญ ร ์ฌ์ , ๋ณด์ด๋ ํญ) / g) + slack.
|
|
24
|
+
* ์ฌ๋ฌ ์ค(ํ ๋์ด ๊ณ ์ + ์ค๋ฐ๊ฟ): ์ค ์ ร (ceil(์์ชฝ ํญ ร ์ฌ์ / g) + slack).
|
|
25
|
+
*
|
|
26
|
+
* Infinity when the text must not be cut (unlimited, unknown viewport width, bad metrics).
|
|
27
|
+
*/
|
|
28
|
+
limit(spec: TextSpec): number;
|
|
29
|
+
/**
|
|
30
|
+
* ์ด ์ํ์ผ๋ก ์ฑ์ด ์นธ์ด ๋ง์ค์์ ์งํค๋ ์ต๋ ์ปฌ๋ผ ํญ โ ์ปฌ๋ผ์ด ์ด๋ณด๋ค ๋์ด์ง๋ฉด ๋ค์ ์ฑ์ด๋ค.
|
|
31
|
+
* ํ ์ค: (limit โ slack) ร g + ์ข์ฐ ์ฌ๋ฐฑ. ์ฌ๋ฌ ์ค: ์ค๋น ๊ธ์ ์(limit รท ์ค ์)๋ก ๊ฐ์ ์.
|
|
32
|
+
*
|
|
33
|
+
* Widest column for which this limit still overflows; widen past it and the cell is refilled.
|
|
34
|
+
*/
|
|
35
|
+
coverWidth(limit: number, spec: TextSpec): number;
|
|
36
|
+
/**
|
|
37
|
+
* ์๋ถ๋ถ limit ์๋ก ์๋ฅธ๋ค. ์๋ฅผ ์๋ฆฌ๊ฐ ์๋ก๊ฒ์ดํธ ์ ๊ฐ์ด๋ฐ๋ฉด ํ ์ ๋ ๋ฃ๋๋ค(๊ธธ์ด โค limit + 1).
|
|
38
|
+
* ์๋ฅผ ์๋ฆฌ๊น์ง(๊ทธ ๋ฐ๋ก ๋ค ํ ์ ํฌํจ)์ ํญ ์๋ ๊ธ์๊ฐ ์์ผ๋ฉด ์ ๋ฌธ์ ๋๋ ค์ค๋ค โ ๊ฒฐํฉ ๋ฌธ์๋ฅผ ๊ฐ๋ฅด์ง ์๋ ๊ฒ๋ ์ด ๊ท์น์ด ๋งก๋๋ค.
|
|
39
|
+
* ์งง์ ๊ธยทInfinity ๋ ๊ทธ๋๋ก๋ผ ์ ๋ฌธ์์ด์ ๋ง๋ค์ง ์๋๋ค.
|
|
40
|
+
*
|
|
41
|
+
* Keeps the first `limit` code units, extending by one to keep a surrogate pair whole. Returns the
|
|
42
|
+
* whole text when a zero-width character sits at or before the cut (this also keeps combining sequences intact).
|
|
43
|
+
*/
|
|
44
|
+
fit(text: string, limit: number): string;
|
|
45
|
+
/** ์ต์ ๊ธ์ ํญ px. / Narrowest glyph width in px. */
|
|
46
|
+
private _glyph;
|
|
47
|
+
/** ์ปฌ๋ผ ์์ชฝ ํญ(์ฌ๋ฐฑ์ ๋บ ๊ฐ, 0 ์๋๋ก ์ ๊ฐ). / Inner column width, never negative. */
|
|
48
|
+
private _inner;
|
|
49
|
+
/** ์ฌ๋ฌ ์ค ์นธ ํ ์ค ๋ชซ ๊ธ์ ์. / Characters per line of a wrapped cell. */
|
|
50
|
+
private _perLine;
|
|
51
|
+
/**
|
|
52
|
+
* ๋ฃ์ ์ค ์ = ๋ณด์ด๋ ์ค ์(์ฌ๋ฆผ) + 1. ํ์ด ํ ์ค๋ณด๋ค ๋ฎ์๋ 2 ์ค ์๋๋ก ์ ๋ด๋ฆฐ๋ค(์ฒซ ์ค์ ๋ ์ฑ์).
|
|
53
|
+
* ์ค ๋์ด๊ฐ ์ด์ํ๋ฉด(0ยทNaN) Infinity.
|
|
54
|
+
*
|
|
55
|
+
* Visible lines rounded up plus one, never below two. Infinity for a bad line height.
|
|
56
|
+
*/
|
|
57
|
+
private _lines;
|
|
58
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Px, LeafColIndex } from './types.js';
|
|
2
|
+
import { GeometryChange, IColumnGeometryWriter, IExtraColumns } from './geometryPorts.js';
|
|
3
|
+
/**
|
|
4
|
+
* ํ์ ์ ์ปฌ๋ผ์ ํญยทleftยท์ ์ฒด ํญยท๊ณ ์ ์ค๋ฅธ์ชฝ ๋์ ์ ์ผํ ์ฃผ์ธ.
|
|
5
|
+
* ๋ถ๋ณ: leftOf(0) = extra.width() ยท leftOf(i+1) โ leftOf(i) = widthOf(i) ยท totalWidth() = leftOf(count) ยท
|
|
6
|
+
* ๊ฐ์ด ๋ฐ๋๋ฉด version ์ด 1 ์ค๋ฅด๊ณ , ์ ๋ฐ๋๋ฉด change.none(ํ ๊ทธ๋๋ก).
|
|
7
|
+
* ๋ฐ์ฌ๋ฆผ์ ์ฃผ์ธ: ๋์ด์ ์ ํ ํญ(resize)์ ์ ์ px ๋ก ๋ ๋ค(Math.round). ํ๋ฉด ๋ฐฐ์จ 125%ยท150% ์์๋ ํฌ์ธํฐ ์ขํ๊ฐ
|
|
8
|
+
* ์์๋ผ ์ ์ค์ฒ๊ฐ ์์ ํญ์ ๋ด๋๋ฐ, ๊ทธ๊ฒ์ ๊ทธ๋๋ก ๋ค๋ฉด ๋จธ๋ฆฌ๊ธ(ํ ํ๋ฆ)๊ณผ ๋ณธ๋ฌธ(๊ธฐํ ์์น)์ด ์๋ก ๋ค๋ฅด๊ฒ ๋ฐ์ฌ๋ฆผํด
|
|
9
|
+
* 1px ์ด๊ธ๋๋ค. ๋ฐ์ฌ๋ฆผ์ ์ฌ๊ธฐ ํ ๊ณณ์์ ํด ๋๋ฉด ๋ ์ชฝ์ด ๊ฐ์ ์ ์๋ฅผ ๋ณธ๋ค. ์์ฑ์ยทreset ์ด ๋ฐ๋ ํญ์ ๊ทธ๋๋ก ๋ ๋ค.
|
|
10
|
+
*
|
|
11
|
+
* Sole owner of column geometry. Version bumps by one on every real change; no-ops return change.none.
|
|
12
|
+
* Widths set by resize are rounded to whole px here (single owner of rounding); constructor/reset keep values as given.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ColumnGeometry implements IColumnGeometryWriter {
|
|
15
|
+
private _metrics;
|
|
16
|
+
private _widths;
|
|
17
|
+
private _extra;
|
|
18
|
+
private _offset;
|
|
19
|
+
private _version;
|
|
20
|
+
private _none;
|
|
21
|
+
/** _history[k] = ํ _base + k + 1 ๋ก ๋์ด๊ฐ ๋ณํ. */
|
|
22
|
+
private readonly _history;
|
|
23
|
+
private _base;
|
|
24
|
+
/**
|
|
25
|
+
* @param widths ํ์ ์ ์์์ ํญ(px). ๋ณต์ฌํด์ ์ฅ๋ค โ ๋ฐ๊นฅ ๋ฐฐ์ด์ ๋์ค์ ๊ณ ์ณ๋ ๊ธฐํ๋ ๊ทธ๋๋ก. / copied
|
|
26
|
+
* @param extra ์ฌ๋ถ ์ปฌ๋ผ / extra columns
|
|
27
|
+
* @param frozenCount ์ผ์ชฝ ๊ณ ์ ์ ์ปฌ๋ผ ์ / left-frozen leaf count
|
|
28
|
+
*/
|
|
29
|
+
constructor(widths: readonly number[], extra: IExtraColumns, frozenCount: number);
|
|
30
|
+
get version(): number;
|
|
31
|
+
get count(): number;
|
|
32
|
+
get frozenCount(): number;
|
|
33
|
+
get extra(): IExtraColumns;
|
|
34
|
+
/** ์ ์๊ฐ ์๋ ๋ฒํธ(NaN ํฌํจ)ยท๋ฒ์ ๋ฐ์ด๋ฉด 0. */
|
|
35
|
+
widthOf(ci: LeafColIndex): Px;
|
|
36
|
+
/** ๋ฒ์ ๋ฐ์ ๋์ผ๋ก ์๋ฅด๊ณ , ์ซ์๊ฐ ์๋ ๋ฒํธ๋ 0 ๋ฒ์ผ๋ก ๋ณธ๋ค(NaN ์ด ํผ์ง์ง ์๊ฒ). */
|
|
37
|
+
leftOf(ci: LeafColIndex): Px;
|
|
38
|
+
/** [ci, ci+span) ํญ์ ํฉ. ๋์ ๋์ผ๋ฉด ๋์์ ์๋ฅด๊ณ , span โค 0 ์ด๋ฉด 0. / Clipped at the end; 0 for span โค 0. */
|
|
39
|
+
spanWidth(ci: LeafColIndex, span: number): Px;
|
|
40
|
+
totalWidth(): Px;
|
|
41
|
+
frozenRight(): Px;
|
|
42
|
+
/** ๋ด์ฉ x โ ๊ทธ x ๋ฅผ ๋ด๋ ์ ์ปฌ๋ผ. ์ฌ๋ถ ๊ตฌ์ญยท์์๋ฉด 0, ๋์ ๋์ผ๋ฉด countโ1, ์ปฌ๋ผ์ด ์์ผ๋ฉด 0. */
|
|
43
|
+
colAt(x: Px): LeafColIndex;
|
|
44
|
+
/** ์ฝ๊ธฐ ์ ์ฉ(์ผ๋ฆฐ) ํญ ๋ฐฐ์ด โ ๋ฐ๋ ๋๋ง๋ค ์ ๋ฐฐ์ด์ด๋ผ ๋ฐ์ ๋ ์ชฝ์ ๊ฐ์ ๊ทธ ํ ๊ทธ๋๋ก๋ค. */
|
|
45
|
+
widths(): readonly number[];
|
|
46
|
+
changesSince(version: number): GeometryChange;
|
|
47
|
+
reset(widths: readonly number[], extra: IExtraColumns, frozenCount: number): GeometryChange;
|
|
48
|
+
/**
|
|
49
|
+
* ์ปฌ๋ผ ํ๋์ ํญ. ๋๋ ๋์ ์
๋ ฅ๋ง๋ค ๋ถ๋ฆฐ๋ค. ํญ์ ์ ์ px ๋ก ๋ฐ์ฌ๋ฆผํด [1, ์ํ] ์ผ๋ก ์๋ฅด๊ณ , ์ซ์๊ฐ ์๋๋ฉด ์๋ฌด๊ฒ๋ ์ ํ๋ค.
|
|
50
|
+
* ๋ฒํธ๊ฐ ๋ฒ์ ๋ฐยท์ ์ ์๋์ด๋ฉด RangeError โ ๋ฐฐ์ด ๋ฐ์ ์จ์ ์ปฌ๋ผ ์๊ฐ ๋์ด๋๋ ์ผ์ ๋ง๋๋ค.
|
|
51
|
+
*
|
|
52
|
+
* Called per input while dragging. Rounded to whole px and clamped to [1, max]; non-finite is a no-op;
|
|
53
|
+
* bad index throws RangeError.
|
|
54
|
+
*/
|
|
55
|
+
resize(ci: LeafColIndex, width: number): GeometryChange;
|
|
56
|
+
private _install;
|
|
57
|
+
private _commit;
|
|
58
|
+
private _structuralBody;
|
|
59
|
+
private _structuralChange;
|
|
60
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LeafColIndex } from './types.js';
|
|
2
|
+
import { IColumnWindow, WindowSegment } from './geometryPorts.js';
|
|
3
|
+
/**
|
|
4
|
+
* DOM ์ผ๋ก ๋ ์ปฌ๋ผ ์งํฉ. ๊ตฌ๊ฐ์ ์ ๊ทํ(์ค๋ฆ์ฐจ์ยท์ ๊ฒน์นจยท๋ถ์ ๊ตฌ๊ฐ์ ํ๋๋ก ํฉ์นจ)์ผ๋ก๋ง ๋ค๊ณ ์์ด์,
|
|
5
|
+
* ๊ฐ์ ์ปฌ๋ผ ์งํฉ์ด๋ฉด ๋ ๊ฐ์ ๊ตฌ๊ฐ ๋ชฉ๋ก์ด๋ค โ `equals` ๊ฐ ๊ตฌ๊ฐ์ ๊ทธ๋๋ก ๊ฒฌ์ฃผ๋ฉด ๋๋ค.
|
|
6
|
+
* ์ ์ปฌ๋ผ์ ๋ฎ์ผ๋ฉด `full` ์ด๊ณ ๋น์นธ์ด ์๋ค(๊ฐ์ํ๋ฅผ ์ ํ ์ง๊ธ DOM ๊ณผ ๊ฐ์ ๋ชจ์).
|
|
7
|
+
*
|
|
8
|
+
* The segments are kept canonical (ascending, disjoint, adjacent ones merged), so equal column sets
|
|
9
|
+
* always have equal segment lists. A window covering every column is `full` and has no gaps.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ColumnWindow implements IColumnWindow {
|
|
12
|
+
readonly full: boolean;
|
|
13
|
+
readonly segments: readonly WindowSegment[];
|
|
14
|
+
/** ํ์ ์ ์ปฌ๋ผ ์(์ฐฝ์ด ์ด๋ค ์ปฌ๋ผ ๊ตฌ์ฑ์์ ๊ณ์ฐ๋๋ โ ๊ตฌ์ฑ์ด ๋ฐ๋๋ฉด ๋ก์ ์ฐฝ). */
|
|
15
|
+
readonly count: number;
|
|
16
|
+
private readonly _gaps;
|
|
17
|
+
private constructor();
|
|
18
|
+
/** ์ ์ปฌ๋ผ ์ฐฝ. / Window covering every column. */
|
|
19
|
+
static full(count: number): ColumnWindow;
|
|
20
|
+
/**
|
|
21
|
+
* ๊ตฌ๊ฐ ๋ชฉ๋ก์ผ๋ก ๋ง๋ ๋ค. ๊ฒน์น๊ฑฐ๋ ๊ฑฐ๊พธ๋ก ๋์๊ฑฐ๋ ๋ฒ์ ๋ฐ์ด๋ฉด RangeError โ ๊ทธ๋ฆฌ๋ ์ชฝ์ด ๊ฐ์ ์นธ์ ๋ ๋ฒ ๋ง๋ค๊ฑฐ๋
|
|
22
|
+
* ์๋ ์ปฌ๋ผ ์ ์๋ฅผ ์ฝ๋ ์ผ์ ์ฌ๊ธฐ์ ๋ง๋๋ค. ๋ถ์ ๊ตฌ๊ฐ์ ํฉ์น๊ณ , ๋๊ฒจ์ค ๋ฐฐ์ด์ ๋ณต์ฌํด ๋ ๋ค.
|
|
23
|
+
*
|
|
24
|
+
* Throws RangeError on overlap, wrong order or out-of-range indices; adjacent segments are merged
|
|
25
|
+
* and the input array is copied.
|
|
26
|
+
*/
|
|
27
|
+
static of(segments: readonly WindowSegment[], count: number): ColumnWindow;
|
|
28
|
+
contains(ci: LeafColIndex): boolean;
|
|
29
|
+
forEachColumn(fn: (ci: LeafColIndex) => void): void;
|
|
30
|
+
/**
|
|
31
|
+
* ๋น์นธ์ด ๋ฎ์ ๊ตฌ๊ฐ: ์ฒซ ๊ตฌ๊ฐ ์ ยท ๊ตฌ๊ฐ ์ฌ์ด ยท ๋ง์ง๋ง ๊ตฌ๊ฐ ๋ค. ์ฒซ ๊ตฌ๊ฐ ์๋ ๋ด์ผ ๊ณ ์ ์ปฌ๋ผ ์๋ ๊ทธ๋ฆฌ๋์์
|
|
32
|
+
* ๊ฐ๋ก๋ก ์ฎ๊ธด ์ฐฝ์ด ์ผ์ชฝ 0 ์ ๋ถ์ด ๊ทธ๋ ค์ง์ง ์๋๋ค.
|
|
33
|
+
*
|
|
34
|
+
* Gaps before the first segment, between segments and after the last one.
|
|
35
|
+
*/
|
|
36
|
+
gaps(): readonly WindowSegment[];
|
|
37
|
+
equals(other: IColumnWindow): boolean;
|
|
38
|
+
private static _checkCount;
|
|
39
|
+
private static _gapsOf;
|
|
40
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Px, LeafColIndex } from './types.js';
|
|
2
|
+
import { IColumnGeometry, IColumnWindow, IColumnWindowPolicy, GridShape, WindowQuery, WindowRule } from './geometryPorts.js';
|
|
3
|
+
import { IWindowingPort } from './ports.js';
|
|
4
|
+
import { ColumnWindow } from './ColumnWindow.js';
|
|
5
|
+
/**
|
|
6
|
+
* ๊ฐ๋ก ๊ฐ์ํ ์ ์ฑ
. ใ์ฐฝ์ ์จ๋ ๋๋ใ๋ ์กฐ๊ฑด๋ฌธ์ด ์๋๋ผ ๊ท์น ๋ชฉ๋ก์ด ๋ตํ๋ค โ ๊ท์น ํ๋๋ผ๋ false ๋ฉด ์ ์ปฌ๋ผ.
|
|
7
|
+
* ์ฐฝ = ๊ณ ์ ์ปฌ๋ผ ๊ตฌ๊ฐ + ๋ณด์ด๋ ๋ฒ์ ์์์ผ๋ก `max(minMarginPx, ๋ณด์ด๋ ํญ ร marginRatio)` px ๋ฅผ ๋ํ ์ฐ์ ๊ตฌ๊ฐ ํ๋
|
|
8
|
+
* (๊ผญ ๋ฃ์ ์ปฌ๋ผ์ด ๋ฐ์ ์์ผ๋ฉด ๊ทธ ์ปฌ๋ผ๊น์ง ๋ํ ๊ป์ง). ๊ทธ๋ ค ๋ ์ฐฝ์ด ใ๋ณด์ด๋ ๋ฒ์ + ์ฌ์ ์ ์ ๋ฐใ์ ์์ง ๋ฎ๋ ๋์์
|
|
9
|
+
* ์ฐฝ์ ๋ฐ๊พธ์ง ์๋๋ค(์ด๋ ฅ) โ ์คํฌ๋กค ๋ช px ๋ง๋ค ๋ ์นธ์ ๋ถ์๋ค ๋๋ค ํ์ง ์๊ฒ.
|
|
10
|
+
* ๊ฐ๋ก ์ขํ๋ ๊ธฐํ์ ๋ด์ฉ ์ขํ(์ฌ๋ถ ์นธ ์ผ์ชฝ ๋ = 0)์ด๊ณ , ์คํฌ๋กค ๊ฐ๋ ๊ฐ์ ์์ ์ผ๋ก ๋ฐ๋๋ค.
|
|
11
|
+
*
|
|
12
|
+
* Window = frozen segment + one contiguous segment spanning the visible range plus a pixel margin on each side
|
|
13
|
+
* (hull-widened to include pinned columns). Hysteresis: a drawn window is kept while it still covers the
|
|
14
|
+
* visible range plus half the margin. x is the geometry content coordinate (left edge of extra columns = 0).
|
|
15
|
+
*/
|
|
16
|
+
export declare class ColumnWindowPolicy implements IColumnWindowPolicy, Pick<IWindowingPort, 'horizontalWindow'> {
|
|
17
|
+
private readonly _geometry;
|
|
18
|
+
private readonly _rules;
|
|
19
|
+
private readonly _minMargin;
|
|
20
|
+
private readonly _ratio;
|
|
21
|
+
/** ๊ฐ์ ์ปฌ๋ผ ์์ ์ ์ปฌ๋ผ ์ฐฝ์ ํ๋๋ง ๋ง๋ค์ด ๋๋ ค์ด๋ค(์คํฌ๋กค๋ง๋ค ์ ๊ฐ์ ๋ง๋ค์ง ์๊ฒ). */
|
|
22
|
+
private _full;
|
|
23
|
+
/** `next` ๊ฐ ๋ณธ ์ง์ ์คํฌ๋กค ๊ฐ(๋์๊ฐ๋ ๋ฐฉํฅยท์๋). ์ฒ์์ ๋ชจ๋ฆ(NaN). / Previous scroll seen by `next`. */
|
|
24
|
+
private _lastScroll;
|
|
25
|
+
constructor(geometry: IColumnGeometry, rules: readonly WindowRule[], opts?: {
|
|
26
|
+
minMarginPx?: number;
|
|
27
|
+
marginRatio?: number;
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* ๊ธฐ๋ณธ ๊ท์น ๋ท. ์๋ก ๋ชจ๋ฅด๊ณ ์์๋ ์๊ด์๋ค. ์ ์ปฌ๋ผ์ผ๋ก ๊ทธ๋ฆฌ๋ ๊ฒฝ์ฐ๋ ์๋ ๋์ด(ํ๋ฉด ๋ฐ ๊ธด ์นธ์ด ํ ๋์ด๋ฅผ ์ ํจ) ยท
|
|
31
|
+
* ํญ ๋ชจ๋ฆ(์จ์ ์ปจํ
์ด๋ ๋ฑ โ ์ง๊ธ์ฒ๋ผ ์ ์นธ) ยท ๋ณํฉ(๊ฐ๋ ค์ง ์นธ ์๋ฆฌ๋ฅผ ์ง๊ธ ๋ชจ์ ๊ทธ๋๋ก ์งํค๋ ค๊ณ ) ยท ์ฌ์ฉ์๊ฐ ๋.
|
|
32
|
+
* ์ค๋ฐ๊ฟ ์นธ์ ํ ๋์ด๊ฐ ์ต์
๊ฐ์ด๋ผ ๊ท์น์ ์๋ค โ ์ค๋ฐ๊ฟ + ๊ณ ์ ํ ๋์ด์์๋ ์ฐฝ์ ์ด๋ค.
|
|
33
|
+
* ใ๋ณํฉ์ด ์๋ใ๋ ๋ชจ์์ `mergeEmpty` ํ๋๋ง ๋ณธ๋ค โ ๊ทธ ๊ฐ์ ๋ณํฉ ์์ฒ์์ ์ฝ์ด ์ฑ์ฐ๋ ์ผ์ ๋ชจ์์ ๋ง๋๋ ์ชฝ ๋ชซ
|
|
34
|
+
* (์์ฒ์ด ๋์ด๋ฉด ์ด๊ธ๋ ๋ ์ด๋ ์ชฝ์ด ๋ง๋์ง ์ ์ฑ
์ด ๋ชจ๋ฅธ๋ค).
|
|
35
|
+
*
|
|
36
|
+
* Four independent, order-free rules. Wrapped cells with a fixed row height keep the window on.
|
|
37
|
+
* Merge presence is read from `GridShape.mergeEmpty` only.
|
|
38
|
+
*/
|
|
39
|
+
static defaultRules(): readonly WindowRule[];
|
|
40
|
+
/**
|
|
41
|
+
* ํ๋ ์๋ง๋ค ๋ถ๋ฅด๋ ์
๊ตฌ: ๊ทธ๋ ค ๋ ์ฐฝ์ ๊ทธ๋๋ก ๋์ง(๋ชจ์์ด ์ฐฝ์ ํ์ฉํ๊ณ ์ด๋ ฅ์ ์์ง ๋ฎ์) ์๋ก ์
์ง๋ฅผ ํ ๋ฒ์ ๋ตํ๋ค.
|
|
42
|
+
* ์๋ก ์
๋๋ ์ง์ ํ๋ ์์์ ์์ง์ธ ๋งํผ ๋์๊ฐ๋ ์ชฝ ์ฌ์ ๋ฅผ ๋ ๋ํ๋ค โ ๋น ๋ฅด๊ฒ ๊ธ์ด๋ ๋ค์ ํ๋ ์ ์๋ฆฌ๊ฐ ์ด๋ฏธ ๊ทธ๋ ค์ ธ
|
|
43
|
+
* ์๊ฒ. ๋ค์ชฝ์ ๊ธฐ๋ณธ ์ฌ์ ๊ทธ๋๋ก๋ผ ๋ฐฉํฅ์ ๋ฐ๊ฟ๋ ๋น ์นธ์ด ์๊ธฐ์ง ์๋๋ค. ๋ํ๋ ๋ชซ์ ๋ณด์ด๋ ํญ ํ ์ฅ๊น์ง.
|
|
44
|
+
* ์์ง์ ์ด๋ ฅ์ ์ด ์
๊ตฌ๋ง ์ด๋ค(`compute`ยท`covers` ๋ ๊ฐ์ ์
๋ ฅ์ ๋ ๊ฐ์ ๋ต).
|
|
45
|
+
*
|
|
46
|
+
* Per-frame entry: keep the drawn window (shape allows it and it still covers) or compute a new one whose
|
|
47
|
+
* leading margin grows with the last frame's movement. Only this entry keeps movement history.
|
|
48
|
+
*/
|
|
49
|
+
next(drawn: IColumnWindow | null, q: WindowQuery, shape: GridShape): IColumnWindow;
|
|
50
|
+
compute(q: WindowQuery, shape: GridShape): ColumnWindow;
|
|
51
|
+
private _window;
|
|
52
|
+
/**
|
|
53
|
+
* ๊ทธ๋ ค ๋ ์ฐฝ์ด ใ๋ณด์ด๋ ๋ฒ์ + ์ฌ์ ์ ์ ๋ฐใ์ px ๋ก ์์ง ๋ฎ๋. ๋ฎ์ผ๋ฉด ์ฐฝ์ ๋ฐ๊พธ์ง ์๋๋ค.
|
|
54
|
+
* ์ปฌ๋ผ ๊ตฌ์ฑ์ด ๋ฐ๋ ์ฐฝ(์ปฌ๋ผ ์๊ฐ ๋ค๋ฅด๊ฑฐ๋ ์ง๊ธ ๊ณ ์ ๊ตฌ๊ฐ์ ๋ด์ง ์์)์ ๋ฎ์ง ์๋๋ค โ ์ ๋ฒํธ๊ฐ ์ ๊ตฌ์ฑ์์ ๋ป์ด ๋ฌ๋ผ์ง๋ฏ๋ก.
|
|
55
|
+
* ์ ์ปฌ๋ผ ์ฐฝ์ ๋ false: ๊ทธ ์ฐฝ์ด ๊ท์น ๋๋ฌธ์ ์ ์ปฌ๋ผ์ธ์ง(์๋ ๋์ดยทํญ ๋ชจ๋ฆ โฆ) ์ฌ๊ธฐ์๋ ๋ชจ์์ ๋ชจ๋ฅด๋ฏ๋ก compute ์ ๋งก๊ธด๋ค.
|
|
56
|
+
* ๊ท์น์ด ์ฌ์ ํ ์ ์ปฌ๋ผ์ ์๊ตฌํ๋ฉด compute ๊ฐ ๊ฐ์ ์ ์ปฌ๋ผ ์ฐฝ ๊ฐ์ฒด๋ฅผ ๋๋ ค์ฃผ์ด `equals` ๊ฐ ๋ฐ๋ก ๊ฐ๋ค๊ณ ๋ตํ๋ค.
|
|
57
|
+
* ๊ผญ ๋ฃ์ ์ปฌ๋ผ์ด ์ฐฝ ๋ฐ์ด๋ฉด ๋ฎ์ง ์๋๋ค.
|
|
58
|
+
*
|
|
59
|
+
* Hysteresis test in pixels. A window built for another column layout never covers; a full window always
|
|
60
|
+
* answers false so that compute (which returns the same cached full window) decides.
|
|
61
|
+
*/
|
|
62
|
+
covers(drawn: IColumnWindow, q: WindowQuery): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* ๊ธฐ์กด ํฌํธ ํธํ: ๊ฐ์ ๊ท์นยท๊ฐ์ ์ฌ์ ๋ก ๊ณ์ฐํ ์ฐฝ์ ๊ป์ง์ ๋ฐ์ด๋ฆผ `{start, end}` ๋ก ๋๋ ค์ค๋ค.
|
|
65
|
+
* ๊ทธ ํฌํธ๋ ํญ ๋ง๊ณ ๋ ๋ชจ์์ ๋ชจ๋ฅด๋ฏ๋ก ๋๋จธ์ง ๊ท์น ์
๋ ฅ์ ใํ์ฉใ์ผ๋ก ๋๋ค(ํญ 0 ์ด๋ฉด ์ฌ์ ํ ์ ์ปฌ๋ผ).
|
|
66
|
+
* ๊ณ ์ ์ปฌ๋ผ์ด ์์ผ๋ฉด ๊ป์ง์ด 0 ๋ถํฐ๋ผ ๊ฐ์ํ ์๋ ๋์ ์งํฉ(0..์ฐฝ ๋)์ด ๋๋ค โ ํธํ์ฉ์ผ ๋ฟ, ์ ์ฝ๋๋ compute ๋ฅผ ์ด๋ค.
|
|
67
|
+
*
|
|
68
|
+
* Legacy port: hull of the computed window as half-open {start, end}; with frozen columns the hull starts at 0.
|
|
69
|
+
*/
|
|
70
|
+
horizontalWindow(scrollLeft: Px, viewportW: Px): {
|
|
71
|
+
start: LeafColIndex;
|
|
72
|
+
end: LeafColIndex;
|
|
73
|
+
};
|
|
74
|
+
private _allows;
|
|
75
|
+
/** ๋ณด์ด๋ ํญ: ์ ํํ ์์๊ฐ ์๋๋ฉด 0(๋ชจ๋ฆ). */
|
|
76
|
+
private static _width;
|
|
77
|
+
/**
|
|
78
|
+
* ์คํฌ๋กค ๊ฐ์ ๋ธ๋ผ์ฐ์ ์ฒ๋ผ [0, ์ ์ฒด ํญ โ ๋ณด์ด๋ ํญ] ์ ๋ฌถ๋๋ค. ์ปฌ๋ผ์ ์จ๊ธฐ๊ฑฐ๋ ์ขํ ์งํ ๊ด์ฐฐ์๊ฐ ๋ ๊ฐ์ด ํ ํ๋ ์
|
|
79
|
+
* ๋ก์ ๋ ๋๋จธ์ฌ๋ ์ค์ ๋ก ๋ณด์ผ ์ปฌ๋ผ์ ๋น ๋จ๋ฆฌ์ง ์๊ฒ. ์ ํ์๊ฐ ์๋๋ฉด 0.
|
|
80
|
+
*/
|
|
81
|
+
private _scroll;
|
|
82
|
+
/** ์ฐจ๋ก๋๋ก ๋์ธ ๊ฒน์นจ ์๋ ๊ตฌ๊ฐ ๋ชฉ๋ก์ ์ปฌ๋ผ ํ๋์ง๋ฆฌ ํ ๋ง์ ์ ์๋ฆฌ์ ๋ผ์ด๋ค(์ด๋ฏธ ๋ด๊ฒจ ์์ผ๋ฉด ๊ทธ๋๋ก). / Inserts a one-column segment in order. */
|
|
83
|
+
private static _insertColumn;
|
|
84
|
+
private _margin;
|
|
85
|
+
/** ๋ด์ฉ x โ ์ปฌ๋ผ(๊ธฐํ์ ๋ฌผ์). ์์ยท์ฌ๋ถ ๊ตฌ์ญ์ 0, ๋ ๋๋จธ๋ ๋ง์ง๋ง ์ปฌ๋ผ. */
|
|
86
|
+
private _col;
|
|
87
|
+
private _fullWindow;
|
|
88
|
+
private static _nonNegative;
|
|
89
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Px } from './types.js';
|
|
2
|
+
import { ExtraColumnId, IExtraColumns } from './geometryPorts.js';
|
|
3
|
+
/** fromOptions ๊ฐ ์ฝ๋ ์ต์
. ์ฐธ๊ฑฐ์ง์ ์ง๊ธ ์ฝ๋์ฒ๋ผ truthy ๋ก ๋ณธ๋ค(`=== true` ๊ฐ ์๋). */
|
|
4
|
+
export interface ExtraColumnOptions {
|
|
5
|
+
stateColumn?: boolean;
|
|
6
|
+
draggable?: boolean;
|
|
7
|
+
rowNumber?: boolean;
|
|
8
|
+
checkColumn?: boolean;
|
|
9
|
+
detailExpanderCol?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ์ฌ๋ถ ์ปฌ๋ผ์ ์ผ์งยท์์ยทํญ์ ์๋ ์ ์ผํ ๊ณณ(๋ถ๋ณ ๊ฐ).
|
|
13
|
+
* ๋ถ๋ณ: width() = ฮฃ ์ผ์ง ํญ, ids ์์ = stateโdragโrowNumberโcheckโdetail.
|
|
14
|
+
*
|
|
15
|
+
* Sole owner of extra-column on/off, order and width (immutable value).
|
|
16
|
+
*/
|
|
17
|
+
export declare class ExtraColumns implements IExtraColumns {
|
|
18
|
+
readonly ids: readonly ExtraColumnId[];
|
|
19
|
+
private readonly _width;
|
|
20
|
+
private readonly _left;
|
|
21
|
+
private readonly _total;
|
|
22
|
+
private constructor();
|
|
23
|
+
/**
|
|
24
|
+
* ๊ทธ๋ฆฌ๋ ์ต์
์์ ๋ง๋ ๋ค. ์ต์
์ด ์์ด๋(undefined) ๋์ง์ง ์๊ณ ใ์ฌ๋ถ ์์ใ์ ๋๋ ค์ค๋ค โ ๋ํผ๊ฐ ์ต์
์์ด ๋ถ๋ฅผ ์ ์๋ค.
|
|
25
|
+
*
|
|
26
|
+
* Builds from grid options; undefined yields the empty set instead of throwing.
|
|
27
|
+
*/
|
|
28
|
+
static fromOptions(o: ExtraColumnOptions | null | undefined): ExtraColumns;
|
|
29
|
+
/** ๊บผ์ง ์ปฌ๋ผ์ด๋ฉด 0. / 0 when that column is off. */
|
|
30
|
+
widthOf(id: ExtraColumnId): Px;
|
|
31
|
+
/**
|
|
32
|
+
* ๊ณ ์ (sticky) ๋ left. ๊บผ์ง ์ปฌ๋ผ์ด๋ฉด width() โ ๋ฌป๋ ์ชฝ์ NaNยทundefined ๊ฐ ํผ์ง์ง ์๊ฒ ๋์๋ฆฌ๋ฅผ ์ค๋ค.
|
|
33
|
+
*
|
|
34
|
+
* Sticky left; for an off column returns width() so callers never see NaN.
|
|
35
|
+
*/
|
|
36
|
+
leftOf(id: ExtraColumnId): Px;
|
|
37
|
+
/** ฮฃ ์ผ์ง ์ฌ๋ถ ์ปฌ๋ผ ํญ. / Sum of enabled extra-column widths. */
|
|
38
|
+
width(): Px;
|
|
39
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CellRangeLike, IColumnGeometry, IRangeRectCalculator } from './geometryPorts.js';
|
|
2
|
+
export interface RangeRectOptions {
|
|
3
|
+
/**
|
|
4
|
+
* ํ ์๋ ํ
๋๋ฆฌ ๋๊ป(px). ํ์ border-box ๋ผ ์นธ ๋์ด = rowHeight โ ์ด ๊ฐ์ด๊ณ , ์ง๊ธ ํ
๋๋ฆฌ ๋์ด๋ ๊ทธ ์นธ ๋์ด๋ก ์ฐ๋ค(๊ธฐ๋ณธ 1).
|
|
5
|
+
*
|
|
6
|
+
* Row bottom border thickness; cells are rowHeight minus this, and today's border is measured from cells (default 1).
|
|
7
|
+
*/
|
|
8
|
+
rowBorderPx?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ๋ฒ์ ํ
๋๋ฆฌ ์ขํ๋ฅผ ๊ธฐํยทํ ๋ฒํธ๋ก ๊ณ์ฐํ๋ ๊ณณ. ์ํ๊ฐ ์์ด ๊ธฐํ๊ฐ ๋ฐ๋๋ฉด ๋ค์ ํธ์ถ์ ๊ทธ๋๋ก ๋ฐ์๋๋ค.
|
|
12
|
+
* ๋ถ๋ณ: ์นธ์ด DOM ์ ์์ด๋ ๊ฐ์ ์ขํ ยท DOM ์ฝ๊ธฐ 0.
|
|
13
|
+
*
|
|
14
|
+
* Stateless: geometry changes show up on the next call.
|
|
15
|
+
*/
|
|
16
|
+
export declare class RangeRectCalculator implements IRangeRectCalculator {
|
|
17
|
+
private readonly _geometry;
|
|
18
|
+
private readonly _rowBorder;
|
|
19
|
+
constructor(geometry: IColumnGeometry, opts?: RangeRectOptions);
|
|
20
|
+
/**
|
|
21
|
+
* @param scroll ๋ณธ๋ฌธ ์์์ scrollTopยทscrollLeft / body scroller offsets
|
|
22
|
+
* @param headerHeight top ์ ๋ํ ๊ฐ. ๋ณธ๋ฌธ ์์ ๊ธฐ์ค์ด๋ฉด 0, ์ปจํ
์ด๋ ๊ธฐ์ค์ด๋ฉด ๋จธ๋ฆฌ๊ธ ๋์ด. / added to top
|
|
23
|
+
*/
|
|
24
|
+
rect(range: CellRangeLike, scroll: {
|
|
25
|
+
readonly top: number;
|
|
26
|
+
readonly left: number;
|
|
27
|
+
}, rowHeight: number, headerHeight: number): {
|
|
28
|
+
left: number;
|
|
29
|
+
top: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
};
|
|
33
|
+
/** ์นธ ํ๋์ ๋ณด์ด๋ x. ๊ณ ์ ์ปฌ๋ผ์ sticky ๋ผ ์คํฌ๋กค์ ์ ํ๋ค. */
|
|
34
|
+
private _cellX;
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IViewportHeightJudge, ViewportSample, ViewportVerdict } from './geometryPorts.js';
|
|
2
|
+
export interface ViewportHeightJudgeOptions {
|
|
3
|
+
/** ๋ณด์ด๋ ๊ตฌ๊ฐ ์๋ค๋ก ๋ ๊ทธ๋ฆด ๋์ด px(๊ธฐ๋ณธ 200). / Extra px drawn above and below the visible part. */
|
|
4
|
+
overscanPx?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* ์ปจํ
์ด๋ ๋์ด๊ฐ ์ ํด์ก๋์งยท๋ด์ฉ์ด ๋์ด๋ฅผ ์ ํ๋์ง ํ์ ํ๊ณ ์ธ๋ก ์ฐฝ์ ์ธ ๋์ดยท์๋ฆผ์ ๋ด๋ ์ ์ผํ ๊ณณ.
|
|
8
|
+
* ์ํ๊ฐ ์๋ค(ํ๋ณธ๋ง ์ฝ๊ณ ๊ณ ์น์ง ์์).
|
|
9
|
+
* ๋ถ๋ณ: ๋์ด๊ฐ ์ ํด์ง ์ปจํ
์ด๋์ ์ง๊ธ๊ณผ ๊ฐ์ ๊ฐ ยท ์ตํธ์ธ ์ฌ์ฉ์์ ์ง๊ธ ํด๋จํ ๊ฐ ยท ๋ฐฐ์น ๋์ด 0(jsdom)์ bounded ยท
|
|
10
|
+
* ์ด์ํ ํ๋ณธ์ bounded ยท clip โ [0, ์ ์ฒด ๋ด์ฉ ๋์ด].
|
|
11
|
+
*
|
|
12
|
+
* Sole owner of the viewport-height verdict. Stateless; never mutates the sample.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ViewportHeightJudge implements IViewportHeightJudge {
|
|
15
|
+
private readonly _overscan;
|
|
16
|
+
constructor(opts?: ViewportHeightJudgeOptions);
|
|
17
|
+
judge(sample: ViewportSample): ViewportVerdict;
|
|
18
|
+
/** ใ๋ด์ฉ์ด ๋์ด๋ฅผ ์ ํจใ ์กฐ๊ฑด. ํ๋ณธ ๊ฐ์ด ์ด์ํ๋ฉด false(์ง๊ธ ๋์ ์ชฝ). / Content-driven test; odd samples give false. */
|
|
19
|
+
private _isContentDriven;
|
|
20
|
+
/**
|
|
21
|
+
* ๋ณด์ด๋ ๊ตฌ๊ฐ์ ๋ณธ๋ฌธ ์ขํ๋ก ์ฎ๊ฒจ ๋ด์ฉ ๋ฒ์๋ก ์๋ฅด๊ณ ์๋ค ์ฌ์ ๋ฅผ ๋ํ๋ค.
|
|
22
|
+
* ๊ทธ๋ฆฌ๋๊ฐ ํ๋ฉด ์๋์ ์์ผ๋ฉด ๋งจ ์ ์ฌ์ ๋งํผ, ์ด๋ฏธ ์ง๋์ณค์ผ๋ฉด ๋งจ ๋ ์ฌ์ ๋งํผ์ ๋ธ๋ค(๋น ๊ตฌ๊ฐ์ ๋ด์ง ์์).
|
|
23
|
+
*
|
|
24
|
+
* Visible part in body coordinates, clamped to content, plus overscan. Below the screen: the
|
|
25
|
+
* first overscan px; scrolled past: the last overscan px.
|
|
26
|
+
*/
|
|
27
|
+
private _clip;
|
|
28
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Px, LeafColIndex, ViewIndex } from './types.js';
|
|
2
|
+
/** ์ฌ๋ถ ์ปฌ๋ผ ์ข
๋ฅ. ๊ทธ๋ฆฌ๋ ์์๋ ์ด ๋์ด ์์์ ๊ฐ๋ค(stateโdragโrowNumberโcheckโdetail). */
|
|
3
|
+
export type ExtraColumnId = 'state' | 'drag' | 'rowNumber' | 'check' | 'detail';
|
|
4
|
+
/** ์ฌ๋ถ ์ปฌ๋ผ์ ์ผ์งยท์์ยทํญ์ ์๋ ์ ์ผํ ๊ณณ(๋ถ๋ณ ๊ฐ). / Sole owner of extra-column on/off, order, width. */
|
|
5
|
+
export interface IExtraColumns {
|
|
6
|
+
readonly ids: readonly ExtraColumnId[];
|
|
7
|
+
widthOf(id: ExtraColumnId): Px;
|
|
8
|
+
/** ๊ณ ์ (sticky) ๋ left. leftOf(ids[0]) = 0. */
|
|
9
|
+
leftOf(id: ExtraColumnId): Px;
|
|
10
|
+
/** ฮฃ ์ผ์ง ์ฌ๋ถ ์ปฌ๋ผ ํญ. */
|
|
11
|
+
width(): Px;
|
|
12
|
+
}
|
|
13
|
+
/** ๊ธฐํ๊ฐ ๋ฐ๋ ๋ชซ. ๊ฐ์ ๋ฐ๊พธ๋ ๋ฉ์๋๊ฐ ๋๋ ค์ค๋ค. / What changed in geometry. */
|
|
14
|
+
export interface GeometryChange {
|
|
15
|
+
/** ์๋ฌด๊ฒ๋ ์ ๋ฐ๋(๊ฐ์ ํญ์ ๋ค์ ๋ฃ์ ๊ฒฝ์ฐ ๋ฑ). */
|
|
16
|
+
readonly none: boolean;
|
|
17
|
+
/** ํญ์ด ๋ฐ๋ ํ์ ์ ์ปฌ๋ผ ๋ฒํธ(์ค๋ฆ์ฐจ์). */
|
|
18
|
+
readonly widthCols: readonly LeafColIndex[];
|
|
19
|
+
/** ์ด ์ปฌ๋ผ๋ถํฐ left ๊ฐ ๋ฐ๋(์์ผ๋ฉด count). */
|
|
20
|
+
readonly leftFrom: LeafColIndex;
|
|
21
|
+
readonly totalChanged: boolean;
|
|
22
|
+
/** ์ปฌ๋ผ ์ยท์์ยท์ฌ๋ถ ์ปฌ๋ผยท๊ณ ์ ์๊ฐ ๋ฐ๋ โ ํฌ์์ ์ฒ์๋ถํฐ ๋ค์ ๊น์์ผ ํจ. */
|
|
23
|
+
readonly structural: boolean;
|
|
24
|
+
/** ๋ฐ๋ ๋ค ๊ธฐํ ํ ๋ฒํธ. */
|
|
25
|
+
readonly version: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ์ปฌ๋ผ ๊ธฐํ ์ฝ๊ธฐ ํฌํธ โ ๊ทธ๋ฆฌ๊ธฐ ๊ฐ์ฒดยท์ฐฝ ์ ์ฑ
ยท๋ฒ์ ๊ณ์ฐ์ ์ด๊ฒ๋ง ์๋ค.
|
|
29
|
+
* ๋ถ๋ณ: leftOf(0) = extra.width(); leftOf(i+1) โ leftOf(i) = widthOf(i); totalWidth() = leftOf(count).
|
|
30
|
+
* / Read port of column geometry. left includes extra columns.
|
|
31
|
+
*/
|
|
32
|
+
export interface IColumnGeometry {
|
|
33
|
+
readonly version: number;
|
|
34
|
+
/** ํ์ ์ ์ปฌ๋ผ ์. */
|
|
35
|
+
readonly count: number;
|
|
36
|
+
/** ์ผ์ชฝ ๊ณ ์ ์ ์ปฌ๋ผ ์. ๋ [0, count] ๋ก ์๋ ค ์๋ค(์ต์
๊ฐ์ด ์ปฌ๋ผ ์๋ณด๋ค ์ปค๋ count ๋ฅผ ๋์ง ์์). */
|
|
37
|
+
readonly frozenCount: number;
|
|
38
|
+
readonly extra: IExtraColumns;
|
|
39
|
+
widthOf(ci: LeafColIndex): Px;
|
|
40
|
+
/** ์ฌ๋ถ ์ปฌ๋ผ ํญ์ ํฌํจํ ๋ด์ฉ ์ขํ์ ์ผ์ชฝ. */
|
|
41
|
+
leftOf(ci: LeafColIndex): Px;
|
|
42
|
+
/** [ci, ci+span) ํญ์ ํฉ(๊ฐ๋ก ๋ณํฉยทํธํฐ colspan). */
|
|
43
|
+
spanWidth(ci: LeafColIndex, span: number): Px;
|
|
44
|
+
totalWidth(): Px;
|
|
45
|
+
/** ๊ณ ์ ๊ตฌ์ญ ์ค๋ฅธ์ชฝ ๋(= leftOf(frozenCount)). */
|
|
46
|
+
frozenRight(): Px;
|
|
47
|
+
/** ๋ด์ฉ x โ ๊ทธ x ๋ฅผ ๋ด๋ ์ ์ปฌ๋ผ(์ด๋ถ ํ์). x ๊ฐ ์ฌ๋ถ ๊ตฌ์ญ์ด๋ฉด 0. */
|
|
48
|
+
colAt(x: Px): LeafColIndex;
|
|
49
|
+
/** ์ฝ๊ธฐ ์ ์ฉ(์ผ๋ฆฐ) ํญ ๋ฐฐ์ด โ ๋ฐ๋ ๋๋ง๋ค ์ ๋ฐฐ์ด. RenderController ๊ฐ ๋จธ๋ฆฌ๊ธยท๋ณธ๋ฌธ์ ๋๊ธฐ๋ ํญ์ด ์ด๊ฒ์ด๋ค(deps getColWidths() ๋ ๊ณ์ฐ ๊ฒฐ๊ณผ ๋ ๋ฐฐ์ด์ ๊ทธ๋๋ก ์ค โ ๋ด๋ณด๋ด๊ธฐยทํธํฐ์ ๋น ํญ ๊ท์น ๋๋ฌธ). */
|
|
50
|
+
widths(): readonly number[];
|
|
51
|
+
/**
|
|
52
|
+
* ๊ทธ ํ ์ดํ ๋ฐ๋ ๋ชซ์ ํฉ์ณ ๋๋ ค์ค๋ค(์ค์ผ์ค๋ฌ๊ฐ ใ๋ง์ง๋ง์ผ๋ก DOM ์ ๋ฐ์ํ ํใ์ ๋ค๊ณ ํ๋ ์๋ง๋ค ๋ฌป๋๋ค).
|
|
53
|
+
* ๊ฐ์ ํ์ด๋ฉด change.none. ๊ตฌ์กฐ ๋ณ๊ฒฝ์ด ๋ผ๋ฉด structural.
|
|
54
|
+
*/
|
|
55
|
+
changesSince(version: number): GeometryChange;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* ์ปฌ๋ผ ํญ ์ฐ๊ธฐ ํฌํธ โ ๋๋น ์กฐ์ (๋๋ ๋์ยท๋์ ๋ยทEsc)์ด ํญ์ ๋ฐ๊พธ๋ ์ ์ผํ ๊ธธ. ๊ตฌํ์ ํญ ์
๋ ฅ์ ์ฃผ์ธ(RenderController.setUserWidth):
|
|
59
|
+
* ํญ์ ์ ์๋ก ๋ง๋ ๋ค ๊ณ์ฐ ๊ฒฐ๊ณผ ๋ฐฐ์ด๊ณผ ๊ธฐํ์ ๊ฐ์ ๊ฐ์ ์ฐ๊ณ , ๊ธฐํ์ ๋ฐ๋ ๋ชซ์ ๋๋ ค์ค๋ค. ๊ธฐํ ์ฐ๊ธฐ ํฌํธ(IColumnGeometryWriter)๋ ๋๊ธฐ์ง ์๋๋ค.
|
|
60
|
+
*
|
|
61
|
+
* Column width write port โ the only way width resizing (drag, release, Esc) changes a width. Implemented by the width owner
|
|
62
|
+
* (RenderController.setUserWidth): rounds to an integer, writes the same value to the computed-width array and the geometry,
|
|
63
|
+
* and returns the geometry change. The geometry writer port itself is never handed out.
|
|
64
|
+
*/
|
|
65
|
+
export interface IColumnWidthWriter {
|
|
66
|
+
setWidth(ci: LeafColIndex, width: number): GeometryChange;
|
|
67
|
+
}
|
|
68
|
+
/** ๊ธฐํ ์ฐ๊ธฐ ํฌํธ โ ๋๊ฒจ๋ฐ๋ ๊ฐ์ฒด ์์: RenderController ์(syncGeometry ์ reset, setUserWidth ์ resize)์์๋ง ์ด๋ค. */
|
|
69
|
+
export interface IColumnGeometryWriter extends IColumnGeometry {
|
|
70
|
+
/**
|
|
71
|
+
* ํญ ๋ฐฐ์ดยท์ฌ๋ถยท๊ณ ์ ์๋ฅผ ํต์งธ๋ก ๊ฐ์ ๋ฃ์(recalcWidthsยท์ปฌ๋ผ ๊ตฌ์ฑ ๋ณ๊ฒฝ). ๋ค์ ๊ณ์ฐ๋ ํญ์ด๋ผ **0 ์ด์ ์ ํํ ํญ์ ๊ทธ๋๋ก** ๋ ๋ค
|
|
72
|
+
* (0ยท์์ ํฌํจ, ๋ฐ์ฌ๋ฆผยทํํ ์์ โ ํญ 0 ์ปฌ๋ผ๋ ์ง๊ธ์ฒ๋ผ 0px). ์์ยทNaNยท๋ฌดํ๋๋ 0, ์์ฃผ ํฐ ๊ฐ์ ์ํ์ผ๋ก ์๋ฅธ๋ค(๋์ ํฉ์ด ๋จ์กฐยท์ ํํ๊ฒ).
|
|
73
|
+
*/
|
|
74
|
+
reset(widths: readonly number[], extra: IExtraColumns, frozenCount: number): GeometryChange;
|
|
75
|
+
/**
|
|
76
|
+
* ์ปฌ๋ผ ํ๋์ ํญ. ์
๋ ฅ ์ด๋ฒคํธ๋ง๋ค ๋ถ๋ ค๋ ๋๋ค(ํค๋๋ฆฌ์คยท50์ปฌ๋ผ ๋ถ๋ถํฉ ๋ค์ ์
โ ๋ฌดํด). DOM ์ฐ๊ธฐ๋ ์ค์ผ์ค๋ฌ๊ฐ ํ๋ ์๋น ํ ๋ฒ.
|
|
77
|
+
* ์์ชฝ ColumnMetrics ๋ ๋ถ๋ณ ๊ฐ์ด๋ผ ๋ถ๋ฅผ ๋๋ง๋ค ์๋ก ๋ง๋ ๋ค. ๋ฐ์ ํญ์ ์ ์ px ๋ก ๋ฐ์ฌ๋ฆผํ๊ณ 1 ์ด์์ผ๋ก ๋ ๋ค(๋๋ x ๊ฐ ์์์ฌ๋ ์นธ ํญ์ ์ ์ โ ์ต์ ํญ์ ์ฌ์ฉ์ ๋๊ธฐ ๊ธธ์๋ง).
|
|
78
|
+
*/
|
|
79
|
+
resize(ci: LeafColIndex, width: number): GeometryChange;
|
|
80
|
+
}
|
|
81
|
+
/** ๋ณธ๋ฌธ ์์์ ๊ฐ๋ก ์ํ. ๊ทธ๋ฆฌ๋ ๊ธธ์์ DOM ์ ์ฝ์ง ์์ผ๋ ค๊ณ ๊ฐ์ผ๋ก ๋๊ธด๋ค. width 0 = ๋ชจ๋ฆ. */
|
|
82
|
+
export interface ViewportBox {
|
|
83
|
+
readonly scrollLeft: number;
|
|
84
|
+
readonly width: number;
|
|
85
|
+
}
|
|
86
|
+
/** ๋ซํ ๊ตฌ๊ฐ [from, to] (ํ์ ์ ๋ฒํธ, ๋ ๋ค ํฌํจ). ํญ์ spanWidth(from, to โ from + 1). */
|
|
87
|
+
export interface WindowSegment {
|
|
88
|
+
readonly from: LeafColIndex;
|
|
89
|
+
readonly to: LeafColIndex;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* DOM ์ผ๋ก ๋ ์ปฌ๋ผ ์งํฉ(๋ถ๋ณ ๊ฐ). ์ง๊ธ ์ ์ฑ
์ ใ๊ณ ์ ๊ตฌ๊ฐ + ์ฐ์ ๊ตฌ๊ฐ ํ๋ใ๋ง ๋ด์ง๋ง
|
|
93
|
+
* ์๋น์๋ ๋ฐ๋์ segments/gaps ๋ก ์ํํ๋ค(๋์ค์ ๊ตฌ๊ฐ ์ฌ๋ฟ์ ๋ด๋ ์๋น์ ๋ฌด์์ ).
|
|
94
|
+
* ๋ถ๋ณ: ๊ณ ์ ์ปฌ๋ผ [0, F-1] ์ ๋ ํฌํจ ยท ๊ตฌ๊ฐ์ ๊ฒน์น์ง ์๊ณ ์ค๋ฆ์ฐจ์ ยท full ์ด๋ฉด ๋น์นธ ์์(์ง๊ธ DOM ๊ณผ ๊ฐ์).
|
|
95
|
+
*/
|
|
96
|
+
export interface IColumnWindow {
|
|
97
|
+
/** ์ด ์ฐฝ์ ๊ณ์ฐํ ํ์ ์ ์ปฌ๋ผ ์(๊ตฌ๊ฐยท๋น์นธ์ [0, count โ 1] ์). */
|
|
98
|
+
readonly count: number;
|
|
99
|
+
readonly full: boolean;
|
|
100
|
+
readonly segments: readonly WindowSegment[];
|
|
101
|
+
contains(ci: LeafColIndex): boolean;
|
|
102
|
+
forEachColumn(fn: (ci: LeafColIndex) => void): void;
|
|
103
|
+
/** ๋น์นธ์ด ๋ฎ์ ๊ตฌ๊ฐ(๊ตฌ๊ฐ ์ฌ์ดยท์ฐฝ ์ค๋ฅธ์ชฝ ๋ ๋ค). full ์ด๋ฉด []. */
|
|
104
|
+
gaps(): readonly WindowSegment[];
|
|
105
|
+
equals(other: IColumnWindow): boolean;
|
|
106
|
+
}
|
|
107
|
+
/** ์ฐฝ ๊ณ์ฐ ์
๋ ฅ. */
|
|
108
|
+
export interface WindowQuery {
|
|
109
|
+
readonly box: ViewportBox;
|
|
110
|
+
/** ํ๋ฉด ๋ฐ์ด์ด๋ ๊ทธ๋ฆด ์ปฌ๋ผ(ํธ์ง ์คยทํค๋ณด๋ ํฌ์ปค์ค ์งํ). */
|
|
111
|
+
readonly pinned: readonly LeafColIndex[];
|
|
112
|
+
}
|
|
113
|
+
/** ์ด ๊ทธ๋ฆฌ๋ ์ํ์ ๋ชจ์(๊ท์น ํ์ ์
๋ ฅ). */
|
|
114
|
+
export interface GridShape {
|
|
115
|
+
readonly autoHeight: boolean;
|
|
116
|
+
readonly viewportWidth: number;
|
|
117
|
+
/** ๋ณํฉ์ด ํ๋๋ ์๋ โ ์ฐฝ ๊ท์น์ด ใ๋ณํฉ์ด ์๋ใ๋ฅผ ๋ฌป๋ ์ ์ผํ ์์ฒ(๊ท์นยท์ ์ฑ
์ ๋ณํฉ ์์ฒ์ ๋ฐ๋ก ๋๊ธฐ์ง ์๋๋ค). */
|
|
118
|
+
readonly mergeEmpty: boolean;
|
|
119
|
+
readonly virtualColumns: boolean;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* ใ์ฐฝ์ ์จ๋ ๋๋ใ ๊ท์น ํ๋. ๊ท์น๋ผ๋ฆฌ ์๋ก ๋ชจ๋ฅธ๋ค. ํ๋๋ผ๋ false ๋ฉด ์ ์ปฌ๋ผ.
|
|
123
|
+
* ํด๋์ค๊ฐ ์๋๋ผ ๊ฐ์ฒด ๋ฆฌํฐ๋ด(id + ํจ์) ๋ชฉ๋ก โ ์กฐ๊ฑด์์ด์ง ์ข
๋ฅ ๊ฐ๋ฅด๊ธฐ๊ฐ ์๋๋ค. id ๋ ์ง๋จ์ฉ.
|
|
124
|
+
*/
|
|
125
|
+
export interface WindowRule {
|
|
126
|
+
readonly id: 'autoHeight' | 'unknownWidth' | 'mergeActive' | 'optOut' | (string & {});
|
|
127
|
+
readonly allowsWindow: (shape: GridShape) => boolean;
|
|
128
|
+
}
|
|
129
|
+
/** ์ง๊ธ ์ด๋ ์ปฌ๋ผ์ DOM ์ผ๋ก ๋์ง ์ ํ๋ ์ ์ผํ ๊ณณ. / Sole owner of the horizontal column window. */
|
|
130
|
+
export interface IColumnWindowPolicy {
|
|
131
|
+
compute(q: WindowQuery, shape: GridShape): IColumnWindow;
|
|
132
|
+
/** ์ด๋ ฅ: ๊ทธ๋ ค ๋ ์ฐฝ์ด ใ๋ณด์ด๋ ๋ฒ์ + ์ฌ์ ์ ์ ๋ฐใ์ ์์ง ๋ฎ๋. */
|
|
133
|
+
covers(drawn: IColumnWindow, q: WindowQuery): boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* ๊ธ๊ผด ์งํ โ ์์ฒ์ ๊ธฐ์กด `appearance/ResolvedAppearanceSnapshot.ts`(์ ์ผํ getComputedStyle ์ ์ , arch ๊ฒฝ๊ณ ํ์ผ).
|
|
137
|
+
* ๊ทธ ์ค๋
์์ ์ง๊ธ font{family,size,lineHeight:1.4} ๋ง ์ค๋ค โ ๊ฐ์ ํ์ผ์์ `--og-cell-padding` ์ ์ฝ์ด
|
|
138
|
+
* padX/padY ๋ฅผ ํจ๊ป ๋ด๋๊ฒ ๋ํ๋ค(์ getComputedStyle ์ ์ ์ ๋ง๋ค์ง ์์). wrap ์นธ ์ค ๋์ด๋ 1.4 ๊ฐ ์๋๋ผ base.css ์ 1.35 ร fontPx.
|
|
139
|
+
*/
|
|
140
|
+
export interface TypeMetrics {
|
|
141
|
+
readonly fontPx: number;
|
|
142
|
+
/**
|
|
143
|
+
* ์ค ๋์ด px. ์ฌ๋ฌ ์ค ์นธ ์ค ์ ์์ **์ด ๊ฐ**์ ์ฐ๊ณ , ์ ๊ณต์๊ฐ base.css ์ wrap ์นธ ๊ฐ 1.35 ร fontPx ๋ก ์ฑ์ด๋ค
|
|
144
|
+
* (ResolvedAppearanceSnapshot ์ lineHeight 1.4 ๋ ๋จธ๋ฆฌ๊ธยทํ ์ค ์นธ ๋ชซ์ด๋ผ ์ฐ์ง ์์).
|
|
145
|
+
*/
|
|
146
|
+
readonly lineHeightPx: number;
|
|
147
|
+
/** ์นธ ์ข์ฐ ์์ชฝ ์ฌ๋ฐฑ ํฉ(px). */
|
|
148
|
+
readonly padX: number;
|
|
149
|
+
/** ์นธ ์์๋ ์์ชฝ ์ฌ๋ฐฑ ํฉ(px). */
|
|
150
|
+
readonly padY: number;
|
|
151
|
+
}
|
|
152
|
+
export interface TextSpec {
|
|
153
|
+
readonly columnWidth: number;
|
|
154
|
+
/** ๋ณธ๋ฌธ ๋ณด์ด๋ ํญ(ํ ์ค ์นธ ๋ฎ๋ ํญ์ ํํ). 0(๋ชจ๋ฆ โ jsdomยท์จ์ ์ปจํ
์ด๋)์ด๋ฉด limit = Infinity(์๋ฅด์ง ์์, ํญ ๋ชจ๋ฆ ๊ท์น๊ณผ ๊ฐ์ ๋ป). */
|
|
155
|
+
readonly viewportWidth: number;
|
|
156
|
+
/** wrap + ๊ณ ์ ํ ๋์ด ์นธ์ด๋ฉด rowHeight, ์๋๋ฉด null(ํ ์ค). */
|
|
157
|
+
readonly wrapRowHeight: number | null;
|
|
158
|
+
readonly metrics: TypeMetrics;
|
|
159
|
+
/** autoHeightยท์ํ ๋ยทtemplate ๋ ๋๋ฌ โ true(์ ๋ฌธ). */
|
|
160
|
+
readonly unlimited: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* ์นธ์ ๋ฃ์ ๊ธ์ ์ ์ํ๊ณผ ๊ทธ ์ํ์ด ๋ง์ค์์ ์ง์ผ ์ฃผ๋ ์ต๋ ํญ์ ์ ํ๋ ์ ์ผํ ๊ณณ.
|
|
164
|
+
* ๋ถ๋ณ: ๊ฒฐ๊ณผ๋ ์๋ฌธ์ ์๋ถ๋ถ ยท ์๋ก๊ฒ์ดํธ ์ยท๊ฒฐํฉ ๋ฌธ์๋ฅผ ๊ฐ๋ฅด์ง ์์ ยท ํญ ์๋ ๊ธ์๊ฐ ์๋ฅผ ์๋ฆฌ ์์ ์์ผ๋ฉด ์ ๋ฌธ.
|
|
165
|
+
*/
|
|
166
|
+
export interface ICellTextPolicy {
|
|
167
|
+
/** Infinity = ์๋ฅด์ง ์์. */
|
|
168
|
+
limit(spec: TextSpec): number;
|
|
169
|
+
/** ์ด ์ํ์ผ๋ก ์ฑ์ด ์นธ์ด ๋ง์ค์์ ์ ์งํ๋ ์ต๋ ์ปฌ๋ผ ํญ(๋์ผ๋ฉด ๋ค์ ์ฑ์). */
|
|
170
|
+
coverWidth(limit: number, spec: TextSpec): number;
|
|
171
|
+
/** text ๋ฅผ limit ์ ๋ง์ถฐ ์์ ํ๊ฒ ์๋ฅธ๋ค(์๋ถ๋ถ). */
|
|
172
|
+
fit(text: string, limit: number): string;
|
|
173
|
+
}
|
|
174
|
+
export interface CellRangeLike {
|
|
175
|
+
readonly startRow: number;
|
|
176
|
+
readonly endRow: number;
|
|
177
|
+
readonly startCol: LeafColIndex;
|
|
178
|
+
readonly endCol: LeafColIndex;
|
|
179
|
+
}
|
|
180
|
+
/** ๋ฒ์ ์ ํ ํ
๋๋ฆฌ๋ฅผ ์นธ DOM ์ด ์๋๋ผ ๊ธฐํยทํ ๋ฒํธ๋ก ๊ณ์ฐ(์ฐฝ ๋ฐ ๋ชจ์๋ฆฌยท๊ฐ์ ๋ฐฐ์น ์ ๊ฑฐ). */
|
|
181
|
+
export interface IRangeRectCalculator {
|
|
182
|
+
rect(range: CellRangeLike, scroll: {
|
|
183
|
+
readonly top: number;
|
|
184
|
+
readonly left: number;
|
|
185
|
+
}, rowHeight: number, headerHeight: number): {
|
|
186
|
+
left: number;
|
|
187
|
+
top: number;
|
|
188
|
+
width: number;
|
|
189
|
+
height: number;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export interface ViewportSample {
|
|
193
|
+
readonly containerH: number;
|
|
194
|
+
/**
|
|
195
|
+
* ๋จธ๋ฆฌ๊ธ + ํ์ด์ง ๋๋๊ธฐ(ํธํฐ๋ ๋ฃ์ง ์๋๋ค). ๋์ด๊ฐ ์ ํด์ง ๊ฒฝ์ฐ์ ๋ณด์ด๋ ๋์ด๋ ์ง๊ธ ์ ๊ทธ๋๋ก containerH โ chromeH.
|
|
196
|
+
*/
|
|
197
|
+
readonly chromeH: number;
|
|
198
|
+
/** ํธํฐ ๋์ด(์์ผ๋ฉด 0). ใ๋ด์ฉ์ด ๋์ด๋ฅผ ์ ํจใ ๋ฑ์ containerH == chromeH + footerH + contentH + hScrollbarH ์๋ง ๋ ๋ค. */
|
|
199
|
+
readonly footerH: number;
|
|
200
|
+
/** ์ ์ฒด ํ ร rowHeight. */
|
|
201
|
+
readonly contentH: number;
|
|
202
|
+
/** ๋ณธ๋ฌธ ์์ ๋ฐฐ์น ๋์ด(jsdom = 0). */
|
|
203
|
+
readonly bodyLayoutH: number;
|
|
204
|
+
/** ๋ณธ๋ฌธ ์์์ ํ๋ฉด ์ขํ top. */
|
|
205
|
+
readonly bodyTop: number;
|
|
206
|
+
/** ์ฐฝยท์๋ผ ๋ณด์ด๊ฒ ํ๋ ์กฐ์๋ค๋ก ๊น์ ํ๋ฉด ๊ตฌ๊ฐ(ํ๋ฉด ์ขํ). */
|
|
207
|
+
readonly visibleTop: number;
|
|
208
|
+
readonly visibleBottom: number;
|
|
209
|
+
/** bodyWrap.scrollHeight > clientHeight + 1 */
|
|
210
|
+
readonly bodyScrollable: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* ๋ณธ๋ฌธ ์์์ ๊ฐ๋ก ์คํฌ๋กค๋ฐ ๋์ด = bodyWrap.offsetHeight โ clientHeight โ ์์๋ ํ
๋๋ฆฌ(์๋ ๊ธฐ๋ณธ ์ฝ 17px,
|
|
213
|
+
* ์คํฌ๋กค๋ฐ๋ฅผ ์จ๊ธด ํค๋๋ฆฌ์ค ๋ธ๋ผ์ฐ์ ์์๋ 0). contentDriven ์กฐ๊ฑด์ ๋ํ๋ค.
|
|
214
|
+
*/
|
|
215
|
+
readonly hScrollbarH: number;
|
|
216
|
+
/** ์ตํธ์ธ fallbackViewportHeight(์ค ๊ฒฝ์ฐ๋ง). */
|
|
217
|
+
readonly fallbackViewportHeight?: number;
|
|
218
|
+
/** ์ฌ์ฉ์๊ฐ ๋ ๊ฒฝ์ฐ(pageVirtualization:false). */
|
|
219
|
+
readonly pageVirtualization: boolean;
|
|
220
|
+
}
|
|
221
|
+
export type ViewportVerdict = {
|
|
222
|
+
readonly kind: 'bounded';
|
|
223
|
+
readonly viewportH: number;
|
|
224
|
+
} | {
|
|
225
|
+
readonly kind: 'legacyClamp';
|
|
226
|
+
readonly viewportH: number;
|
|
227
|
+
}
|
|
228
|
+
/** clip ์ ๋ณธ๋ฌธ ์ขํ(px). ์ด ๊ตฌ๊ฐ ๋ฐ ํ์ ํ๋ฉด์ ์ ๋ณด์ธ๋ค. */
|
|
229
|
+
| {
|
|
230
|
+
readonly kind: 'contentDriven';
|
|
231
|
+
readonly viewportH: number;
|
|
232
|
+
readonly clipTop: number;
|
|
233
|
+
readonly clipBottom: number;
|
|
234
|
+
};
|
|
235
|
+
/** ์ปจํ
์ด๋ ๋์ด๊ฐ ์ ํด์ง ์ํ์ธ์ง, ๋ด์ฉ์ด ๋์ด๋ฅผ ์ ํ๋ ์ํ์ธ์ง ํ์ ํ๋ ์ ์ผํ ๊ณณ. */
|
|
236
|
+
export interface IViewportHeightJudge {
|
|
237
|
+
judge(sample: ViewportSample): ViewportVerdict;
|
|
238
|
+
}
|
|
239
|
+
/** ์ธ๋ก ์ฐฝ์ ํ์ด์ง ์ชฝ ์๋ฆผ์ ์๋ ค ์ฃผ๋ ํฌํธ(VirtualScroll ์ด ๊ตฌํ). */
|
|
240
|
+
export interface IVerticalClipTarget {
|
|
241
|
+
setClip(clip: {
|
|
242
|
+
readonly top: number;
|
|
243
|
+
readonly bottom: number;
|
|
244
|
+
} | null): void;
|
|
245
|
+
}
|
|
246
|
+
/** ํ ๋ฒ์(๋ฐ์ด๋ฆผ). */
|
|
247
|
+
export interface RowSpan {
|
|
248
|
+
readonly start: ViewIndex;
|
|
249
|
+
readonly end: ViewIndex;
|
|
250
|
+
}
|
|
@@ -40,6 +40,11 @@ export declare const SLICE_OWNERSHIP: {
|
|
|
40
40
|
readonly rowHeight: "AppearanceResolver";
|
|
41
41
|
readonly measured: "MeasurementSeam";
|
|
42
42
|
readonly selection: "SelectionModel";
|
|
43
|
+
readonly colGeometry: "ColumnGeometry";
|
|
44
|
+
readonly colWindow: "ColumnWindowPolicy";
|
|
45
|
+
readonly renderRequest: "RenderScheduler";
|
|
46
|
+
readonly sortRanks: "SortKeyStore";
|
|
47
|
+
readonly drawnBody: "BodyView";
|
|
43
48
|
};
|
|
44
49
|
/** ์ฌ๋ผ์ด์ค ํค. / Slice key. */
|
|
45
50
|
export type SliceKey = keyof typeof SLICE_OWNERSHIP;
|