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.
Files changed (134) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/ExportProgressView-BYPw8osg.cjs +2 -0
  3. package/dist/ExportProgressView-Bt5-z7rE.js +2 -0
  4. package/dist/LcpMergeOrderer-CeP6C6G1.cjs +2 -0
  5. package/dist/LcpMergeOrderer-Ebwuir-r.js +2 -0
  6. package/dist/OpenGrid-Bh1NMOcm.cjs +98 -0
  7. package/dist/OpenGrid-CeXt04ho.js +98 -0
  8. package/dist/Registry-CrT46EAO.js +2 -0
  9. package/dist/Registry-DpHOpU5V.cjs +2 -0
  10. package/dist/XlsxChannel-CuOZ3LQz.js +2 -0
  11. package/dist/XlsxChannel-DQHLGend.cjs +2 -0
  12. package/dist/XlsxWorkbookWriter-DixuNGtw.cjs +3 -0
  13. package/dist/XlsxWorkbookWriter-VgbibI0Z.js +3 -0
  14. package/dist/fflate-Cs3txMgg.js +2 -0
  15. package/dist/fflate-G9RAFEgF.cjs +2 -0
  16. package/dist/index-1OXjJmct.js +2 -0
  17. package/dist/index-B5V7e4Xc.js +2 -0
  18. package/dist/index-DbKDox8y.cjs +2 -0
  19. package/dist/index-HaDoF1HM.cjs +2 -0
  20. package/dist/open-grid-react.cjs +1 -27
  21. package/dist/open-grid-react.js +1 -30
  22. package/dist/open-grid-vue.cjs +1 -31
  23. package/dist/open-grid-vue.js +1 -33
  24. package/dist/open-grid.cjs +6 -275
  25. package/dist/open-grid.js +6 -293
  26. package/dist/sinks-BCZFMGQJ.cjs +2 -0
  27. package/dist/sinks-qkBJ5bKn.js +2 -0
  28. package/dist/types/core/CFRenderBridge.d.ts +5 -1
  29. package/dist/types/core/CellEditManager.d.ts +26 -2
  30. package/dist/types/core/CellEventHandler.d.ts +6 -2
  31. package/dist/types/core/ColumnLayout.d.ts +8 -0
  32. package/dist/types/core/DataLayer.d.ts +48 -1
  33. package/dist/types/core/DetailManager.d.ts +43 -2
  34. package/dist/types/core/ExportManager.d.ts +25 -0
  35. package/dist/types/core/FindBarManager.d.ts +6 -2
  36. package/dist/types/core/FlatRowModel.d.ts +61 -3
  37. package/dist/types/core/FooterManager.d.ts +43 -1
  38. package/dist/types/core/FormulaController.d.ts +4 -4
  39. package/dist/types/core/GridComposer.d.ts +11 -1
  40. package/dist/types/core/GridRenderer.d.ts +84 -19
  41. package/dist/types/core/GroupTreeManager.d.ts +6 -4
  42. package/dist/types/core/KeyboardManager.d.ts +3 -2
  43. package/dist/types/core/MutationService.d.ts +10 -8
  44. package/dist/types/core/OpenGrid.d.ts +7 -5
  45. package/dist/types/core/RangeSelectionManager.d.ts +23 -2
  46. package/dist/types/core/RenderController.d.ts +126 -8
  47. package/dist/types/core/SortFilterManager.d.ts +10 -2
  48. package/dist/types/core/VirtualScroll.d.ts +12 -0
  49. package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
  50. package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
  51. package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
  52. package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
  53. package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
  54. package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
  55. package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
  56. package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
  57. package/dist/types/core/coordinate/ports.d.ts +5 -0
  58. package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
  59. package/dist/types/core/domain/footer/ports.d.ts +31 -0
  60. package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
  61. package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
  62. package/dist/types/core/domain/render/ports.d.ts +169 -0
  63. package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
  64. package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
  65. package/dist/types/core/domain/resize/ports.d.ts +64 -0
  66. package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
  67. package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
  68. package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
  69. package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
  70. package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
  71. package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
  72. package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
  73. package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
  74. package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
  75. package/dist/types/core/domain/sort/ports.d.ts +140 -0
  76. package/dist/types/core/export/ExportProgressView.d.ts +28 -0
  77. package/dist/types/core/export/channels/XlsxChannel.d.ts +38 -1
  78. package/dist/types/core/export/channels/XlsxRichTextRun.d.ts +14 -0
  79. package/dist/types/core/export/channels/XlsxSheetXml.d.ts +19 -0
  80. package/dist/types/core/export/channels/XlsxStyleEntries.d.ts +80 -0
  81. package/dist/types/core/export/channels/XlsxStylesRegistry.d.ts +20 -0
  82. package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +20 -0
  83. package/dist/types/core/export/channels/XlsxXml.d.ts +6 -0
  84. package/dist/types/core/export/index.d.ts +2 -0
  85. package/dist/types/core/export/sinks.d.ts +81 -0
  86. package/dist/types/core/export/types.d.ts +63 -0
  87. package/dist/types/core/host/archCheck.d.ts +16 -1
  88. package/dist/types/core/i18n/locales/en.d.ts +6 -0
  89. package/dist/types/core/i18n/locales/ko.d.ts +6 -0
  90. package/dist/types/core/i18n/types.d.ts +8 -0
  91. package/dist/types/core/render/FooterView.d.ts +121 -0
  92. package/dist/types/core/render/GeometryApplier.d.ts +55 -0
  93. package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
  94. package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
  95. package/dist/types/core/render/RenderScheduler.d.ts +225 -0
  96. package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
  97. package/dist/types/core/render/ScrollFollower.d.ts +34 -0
  98. package/dist/types/core/render/ScrollObserver.d.ts +47 -0
  99. package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
  100. package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
  101. package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
  102. package/dist/types/core/render/body/BodyView.d.ts +185 -0
  103. package/dist/types/core/render/body/CellLocator.d.ts +36 -0
  104. package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
  105. package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
  106. package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
  107. package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
  108. package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
  109. package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
  110. package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
  111. package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
  112. package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
  113. package/dist/types/core/render/dom.d.ts +10 -0
  114. package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
  115. package/dist/types/core/render/header/HeaderView.d.ts +84 -0
  116. package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
  117. package/dist/types/core/render/ports.d.ts +218 -0
  118. package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
  119. package/dist/types/core/types.d.ts +94 -0
  120. package/dist/types/index.d.ts +1 -0
  121. package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
  122. package/dist/xlsx.min-CMvrM6b4.cjs +138 -0
  123. package/dist/xlsx.min-i_b-4PvU.js +138 -0
  124. package/package.json +3 -8
  125. package/dist/OpenGrid-CLk8Vt7j.cjs +0 -7459
  126. package/dist/OpenGrid-D6YxCsnV.js +0 -7472
  127. package/dist/Registry-CPJYOqCn.js +0 -74
  128. package/dist/Registry-D74ZmdDz.cjs +0 -71
  129. package/dist/index-CeJ-0-80.cjs +0 -260
  130. package/dist/index-D0DJtKYI.cjs +0 -452
  131. package/dist/index-DnarQ4eR.js +0 -266
  132. package/dist/index-VkKgQ506.js +0 -481
  133. package/dist/xlsx.min-BQ1o3sB6.cjs +0 -11793
  134. 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;