open-grid 1.2.0 → 1.3.0

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 (294) hide show
  1. package/CHANGELOG.md +376 -353
  2. package/README.md +1 -1
  3. package/dist/OpenGrid-B7m7ei7f.cjs +7385 -0
  4. package/dist/OpenGrid-CeUdO_fM.js +7398 -0
  5. package/dist/index-CeJ-0-80.cjs +260 -0
  6. package/dist/index-DnarQ4eR.js +266 -0
  7. package/dist/index-DrCPRuYi.js +548 -0
  8. package/dist/index-JjfWY3Bt.cjs +520 -0
  9. package/dist/open-grid-base.css +12 -1
  10. package/dist/open-grid-react.cjs +27 -1
  11. package/dist/open-grid-react.js +22 -82
  12. package/dist/open-grid-vue.cjs +31 -1
  13. package/dist/open-grid-vue.js +29 -79
  14. package/dist/open-grid.cjs +272 -6
  15. package/dist/open-grid.js +177 -266
  16. package/dist/types/bench/perf.d.ts +14 -8
  17. package/dist/types/core/AppearanceResolver.d.ts +98 -11
  18. package/dist/types/core/CFRenderBridge.d.ts +13 -0
  19. package/dist/types/core/CellEditManager.d.ts +73 -0
  20. package/dist/types/core/CellEventHandler.d.ts +99 -2
  21. package/dist/types/core/CellTypeRegistry.d.ts +24 -0
  22. package/dist/types/core/ChartManager.d.ts +51 -3
  23. package/dist/types/core/ColumnLayout.d.ts +100 -2
  24. package/dist/types/core/ContextMenu.d.ts +43 -2
  25. package/dist/types/core/CrossGridController.d.ts +86 -15
  26. package/dist/types/core/CrossGridMapper.d.ts +43 -5
  27. package/dist/types/core/CrossGridRegistry.d.ts +36 -2
  28. package/dist/types/core/DataLayer.d.ts +210 -15
  29. package/dist/types/core/DetailManager.d.ts +106 -15
  30. package/dist/types/core/DragVisuals.d.ts +33 -4
  31. package/dist/types/core/EventEmitter.d.ts +54 -0
  32. package/dist/types/core/ExportManager.d.ts +66 -1
  33. package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
  34. package/dist/types/core/FilterPanel.d.ts +17 -2
  35. package/dist/types/core/FilterSelect.d.ts +37 -13
  36. package/dist/types/core/FindBarManager.d.ts +26 -0
  37. package/dist/types/core/FlatRowModel.d.ts +54 -11
  38. package/dist/types/core/FooterManager.d.ts +53 -1
  39. package/dist/types/core/FormulaController.d.ts +139 -10
  40. package/dist/types/core/FormulaEngine.d.ts +15 -4
  41. package/dist/types/core/GridComposer.d.ts +54 -6
  42. package/dist/types/core/GridRenderer.d.ts +143 -10
  43. package/dist/types/core/GridShuttle.d.ts +44 -4
  44. package/dist/types/core/GroupEngine.d.ts +68 -10
  45. package/dist/types/core/GroupTreeManager.d.ts +86 -2
  46. package/dist/types/core/IconRegistry.d.ts +56 -9
  47. package/dist/types/core/KeyboardManager.d.ts +88 -4
  48. package/dist/types/core/MaskingEngine.d.ts +10 -9
  49. package/dist/types/core/MathUtils.d.ts +58 -5
  50. package/dist/types/core/MergeEngine.d.ts +45 -10
  51. package/dist/types/core/MutationService.d.ts +113 -10
  52. package/dist/types/core/OGDecimal.d.ts +144 -13
  53. package/dist/types/core/OpenGrid.d.ts +99 -0
  54. package/dist/types/core/OrgChart.d.ts +56 -1
  55. package/dist/types/core/OverrideKernel.d.ts +59 -15
  56. package/dist/types/core/Pagination.d.ts +38 -4
  57. package/dist/types/core/PivotEngine.d.ts +37 -0
  58. package/dist/types/core/RangeSelectionManager.d.ts +121 -7
  59. package/dist/types/core/RenderController.d.ts +56 -0
  60. package/dist/types/core/RowDragDrop.d.ts +52 -6
  61. package/dist/types/core/RowManager.d.ts +55 -0
  62. package/dist/types/core/SkinRegistry.d.ts +55 -15
  63. package/dist/types/core/SortFilterManager.d.ts +80 -1
  64. package/dist/types/core/TreeEngine.d.ts +60 -6
  65. package/dist/types/core/TriggerManager.d.ts +46 -0
  66. package/dist/types/core/VirtualScroll.d.ts +64 -0
  67. package/dist/types/core/WorksheetManager.d.ts +61 -2
  68. package/dist/types/core/XmlConverter.d.ts +56 -23
  69. package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
  70. package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
  71. package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
  72. package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
  73. package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
  74. package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
  75. package/dist/types/core/a11y/index.d.ts +13 -0
  76. package/dist/types/core/a11y/ports.d.ts +24 -0
  77. package/dist/types/core/appearance/Appearance.d.ts +68 -0
  78. package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
  79. package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
  80. package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
  81. package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
  82. package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
  83. package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
  84. package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
  85. package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
  86. package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
  87. package/dist/types/core/appearance/defaults.d.ts +10 -0
  88. package/dist/types/core/appearance/index.d.ts +20 -0
  89. package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
  90. package/dist/types/core/cf/CFEngine.d.ts +56 -0
  91. package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
  92. package/dist/types/core/cf/CFRule.d.ts +127 -0
  93. package/dist/types/core/cf/ColorScale.d.ts +49 -0
  94. package/dist/types/core/cf/InkResolver.d.ts +33 -0
  95. package/dist/types/core/cf/appearance.d.ts +20 -0
  96. package/dist/types/core/cf/encoders.d.ts +61 -0
  97. package/dist/types/core/cf/eval-types.d.ts +93 -0
  98. package/dist/types/core/cf/index.d.ts +21 -0
  99. package/dist/types/core/cf/lineage.d.ts +32 -0
  100. package/dist/types/core/cf/predicates.d.ts +27 -0
  101. package/dist/types/core/cf/serialize.d.ts +46 -0
  102. package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
  103. package/dist/types/core/chart/DataExtractor.d.ts +53 -12
  104. package/dist/types/core/chart/a11y.d.ts +22 -0
  105. package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
  106. package/dist/types/core/chart/downsample-report.d.ts +36 -0
  107. package/dist/types/core/chart/downsample.d.ts +26 -1
  108. package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
  109. package/dist/types/core/chart/geometry.d.ts +96 -0
  110. package/dist/types/core/chart/hittest.d.ts +21 -3
  111. package/dist/types/core/chart/palette.d.ts +96 -12
  112. package/dist/types/core/chart/parity.d.ts +12 -0
  113. package/dist/types/core/chart/provenance.d.ts +47 -0
  114. package/dist/types/core/chart/scales.d.ts +28 -1
  115. package/dist/types/core/chart/scene.d.ts +102 -0
  116. package/dist/types/core/chart/server.d.ts +36 -0
  117. package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
  118. package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
  119. package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
  120. package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
  121. package/dist/types/core/chart/types.d.ts +107 -10
  122. package/dist/types/core/command/CommandBus.d.ts +51 -0
  123. package/dist/types/core/command/CommandRegistry.d.ts +43 -0
  124. package/dist/types/core/command/CommandStack.d.ts +38 -0
  125. package/dist/types/core/command/ICommand.d.ts +110 -0
  126. package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
  127. package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
  128. package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
  129. package/dist/types/core/command/index.d.ts +9 -0
  130. package/dist/types/core/command/support.d.ts +51 -0
  131. package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
  132. package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
  133. package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
  134. package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
  135. package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
  136. package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
  137. package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
  138. package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
  139. package/dist/types/core/coordinate/index.d.ts +10 -0
  140. package/dist/types/core/coordinate/ports.d.ts +45 -0
  141. package/dist/types/core/coordinate/types.d.ts +76 -0
  142. package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
  143. package/dist/types/core/detail/DetailSplice.d.ts +42 -11
  144. package/dist/types/core/detail/DetailState.d.ts +80 -11
  145. package/dist/types/core/detail/SubgridCache.d.ts +72 -10
  146. package/dist/types/core/detail/index.d.ts +8 -0
  147. package/dist/types/core/domain/AggregateResult.d.ts +54 -0
  148. package/dist/types/core/domain/CellAddress.d.ts +61 -0
  149. package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
  150. package/dist/types/core/domain/Delta.d.ts +37 -0
  151. package/dist/types/core/domain/DomainValue.d.ts +80 -0
  152. package/dist/types/core/domain/Missing.d.ts +65 -0
  153. package/dist/types/core/domain/Money.d.ts +42 -0
  154. package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
  155. package/dist/types/core/domain/Plain.d.ts +45 -0
  156. package/dist/types/core/domain/Quantity.d.ts +32 -0
  157. package/dist/types/core/domain/Ratios.d.ts +100 -0
  158. package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
  159. package/dist/types/core/domain/ValueType.d.ts +71 -0
  160. package/dist/types/core/domain/rounding.d.ts +25 -0
  161. package/dist/types/core/domain/strategies.d.ts +38 -0
  162. package/dist/types/core/editors/CellEditor.d.ts +29 -2
  163. package/dist/types/core/editors/DateEditor.d.ts +18 -0
  164. package/dist/types/core/editors/SelectEditor.d.ts +29 -0
  165. package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
  166. package/dist/types/core/export/ExportManifest.d.ts +13 -0
  167. package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
  168. package/dist/types/core/export/Provenance.d.ts +34 -0
  169. package/dist/types/core/export/StreamPump.d.ts +28 -0
  170. package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
  171. package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
  172. package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
  173. package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
  174. package/dist/types/core/export/channels/capabilities.d.ts +13 -0
  175. package/dist/types/core/export/index.d.ts +24 -0
  176. package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
  177. package/dist/types/core/export/print/Paginator.d.ts +48 -0
  178. package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
  179. package/dist/types/core/export/sinks.d.ts +40 -0
  180. package/dist/types/core/export/types.d.ts +211 -0
  181. package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
  182. package/dist/types/core/extension/IExtension.d.ts +90 -0
  183. package/dist/types/core/extension/Registry.d.ts +142 -0
  184. package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
  185. package/dist/types/core/extension/adapters.d.ts +44 -0
  186. package/dist/types/core/extension/conformance.d.ts +47 -0
  187. package/dist/types/core/extension/index.d.ts +16 -0
  188. package/dist/types/core/extension/registries.d.ts +31 -0
  189. package/dist/types/core/extension/reserved.d.ts +10 -0
  190. package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
  191. package/dist/types/core/format/FormatCache.d.ts +20 -0
  192. package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
  193. package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
  194. package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
  195. package/dist/types/core/format/index.d.ts +55 -0
  196. package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
  197. package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
  198. package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
  199. package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
  200. package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
  201. package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
  202. package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
  203. package/dist/types/core/format/types.d.ts +292 -0
  204. package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
  205. package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
  206. package/dist/types/core/formula/CalcService.d.ts +137 -0
  207. package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
  208. package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
  209. package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
  210. package/dist/types/core/formula/FormulaParser.d.ts +9 -0
  211. package/dist/types/core/formula/FormulaStore.d.ts +63 -1
  212. package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
  213. package/dist/types/core/formula/Generation.d.ts +86 -0
  214. package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
  215. package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
  216. package/dist/types/core/formula/functions/essential.d.ts +3 -0
  217. package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
  218. package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
  219. package/dist/types/core/formula/numericLiteral.d.ts +11 -1
  220. package/dist/types/core/formula/serializeFormula.d.ts +10 -1
  221. package/dist/types/core/formula/types.d.ts +71 -8
  222. package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
  223. package/dist/types/core/host/GridHostDriver.d.ts +27 -0
  224. package/dist/types/core/host/GridHostPort.d.ts +37 -0
  225. package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
  226. package/dist/types/core/host/archCheck.d.ts +26 -0
  227. package/dist/types/core/host/index.d.ts +6 -0
  228. package/dist/types/core/host/reconcile.d.ts +22 -0
  229. package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
  230. package/dist/types/core/i18n/types.d.ts +26 -1
  231. package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
  232. package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
  233. package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
  234. package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
  235. package/dist/types/core/quality/PerfSpec.d.ts +95 -0
  236. package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
  237. package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
  238. package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
  239. package/dist/types/core/quality/VisualRegression.d.ts +74 -0
  240. package/dist/types/core/quality/hooks.d.ts +53 -0
  241. package/dist/types/core/quality/index.d.ts +20 -0
  242. package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
  243. package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
  244. package/dist/types/core/range/FillEngine.d.ts +69 -9
  245. package/dist/types/core/range/RangeModel.d.ts +100 -13
  246. package/dist/types/core/range/RangeQuery.d.ts +24 -2
  247. package/dist/types/core/range/types.d.ts +27 -11
  248. package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
  249. package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
  250. package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
  251. package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
  252. package/dist/types/core/realtime/PollingSource.d.ts +42 -0
  253. package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
  254. package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
  255. package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
  256. package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
  257. package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
  258. package/dist/types/core/realtime/backoff.d.ts +12 -0
  259. package/dist/types/core/realtime/index.d.ts +13 -0
  260. package/dist/types/core/realtime/ports.d.ts +80 -0
  261. package/dist/types/core/render/CellApplier.d.ts +18 -0
  262. package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
  263. package/dist/types/core/render/CellPipeline.d.ts +39 -0
  264. package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
  265. package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
  266. package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
  267. package/dist/types/core/render/RenderBudget.d.ts +67 -0
  268. package/dist/types/core/render/contrast.d.ts +33 -0
  269. package/dist/types/core/render/index.d.ts +35 -0
  270. package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
  271. package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
  272. package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
  273. package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
  274. package/dist/types/core/render/stages/index.d.ts +14 -0
  275. package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
  276. package/dist/types/core/state/AutosaveController.d.ts +63 -0
  277. package/dist/types/core/state/IStatePersistence.d.ts +59 -0
  278. package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
  279. package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
  280. package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
  281. package/dist/types/core/state/StateCodec.d.ts +75 -0
  282. package/dist/types/core/state/index.d.ts +6 -0
  283. package/dist/types/core/types.d.ts +17 -0
  284. package/dist/types/react/OpenGrid.d.ts +54 -0
  285. package/dist/types/react/index.d.ts +5 -0
  286. package/dist/types/realtime/index.d.ts +1 -0
  287. package/dist/types/vue/index.d.ts +5 -0
  288. package/dist/types/vue/types.d.ts +35 -0
  289. package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
  290. package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
  291. package/package.json +112 -110
  292. package/dist/OpenGrid-B0Spm0rU.js +0 -10404
  293. package/dist/OpenGrid-CuXj0isp.cjs +0 -97
  294. package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
@@ -1,29 +1,84 @@
1
1
  import { DataLayer } from './DataLayer.js';
2
+ /**
3
+ * 행 선택(selection)과 체크(checkbox) 상태를 관리하는 매니저. / Manages row selection and checkbox state.
4
+ *
5
+ * 두 상태는 서로 독립적이다 — 선택은 활성/포커스 개념(단일 행만 유지 가능),
6
+ * 체크는 다중 표시(예: 체크박스 컬럼)를 위한 별도 집합이다.
7
+ * / The two states are independent — selection tracks an active/focus concept
8
+ * (can be limited to a single row), while checks are a separate set for
9
+ * multi-marking (e.g. a checkbox column).
10
+ */
2
11
  export declare class RowManager<T extends Record<string, any> = any> {
3
12
  private _selectedRows;
4
13
  private _checkedRows;
5
14
  private _data;
6
15
  constructor(data: DataLayer<T>);
16
+ /** 선택된 행 인덱스 집합(원본 참조). / Set of selected row indexes (live reference). */
7
17
  get selectedRows(): Set<number>;
18
+ /** 체크된 행 인덱스 집합(원본 참조). / Set of checked row indexes (live reference). */
8
19
  get checkedRows(): Set<number>;
20
+ /**
21
+ * 단일 행만 선택한다(기존 선택은 모두 해제). / Select exactly one row (clears any prior selection).
22
+ *
23
+ * @param ri - 선택할 행의 flat index / Flat index of the row to select
24
+ */
9
25
  selectSingle(ri: number): void;
26
+ /**
27
+ * 지정 행의 선택 상태를 토글한다(다중 선택 누적). / Toggle a row's selection state (accumulates for multi-select).
28
+ *
29
+ * @param ri - 토글할 행의 flat index / Flat index of the row to toggle
30
+ */
10
31
  selectToggle(ri: number): void;
32
+ /** 모든 행 선택을 해제한다. / Clear every row selection. */
11
33
  clearSelection(): void;
34
+ /**
35
+ * 지정 행의 체크 상태를 설정한다. / Set the checked state of a single row.
36
+ *
37
+ * @param ri - 대상 행의 flat index / Flat index of the target row
38
+ * @param checked - 체크 여부 / Whether the row should be checked
39
+ */
12
40
  check(ri: number, checked: boolean): void;
41
+ /**
42
+ * 전체 행을 체크하거나 전체 해제한다. / Check or uncheck every row.
43
+ *
44
+ * @param checked - `true` 면 전체 체크, `false` 면 전체 해제 / `true` to check all, `false` to clear all
45
+ * @param totalRows - 전체 행 수(체크 시 0..totalRows-1 을 채움) / Total row count (when checking, fills indexes 0..totalRows-1)
46
+ */
13
47
  checkAll(checked: boolean, totalRows: number): void;
48
+ /**
49
+ * 특정 컬럼 값이 주어진 목록에 포함된 행들을 체크한다. / Check every row whose column value is in the given list.
50
+ *
51
+ * @param field - 값을 비교할 컬럼 field 명 / Column field to compare values against
52
+ * @param values - 매칭 대상 값 목록 / Values to match against
53
+ */
14
54
  checkByValue(field: string, values: any[]): void;
55
+ /** 모든 체크를 해제한다. / Clear every checked row. */
15
56
  uncheckAll(): void;
57
+ /** @internal 미구현 스텁(rowId 기반 체크 API 예약). / @internal Unimplemented stub (reserved for a rowId-based check API). */
16
58
  checkById(_ids: string[]): void;
59
+ /** @internal 미구현 스텁(rowId 기반 체크 추가 API 예약). / @internal Unimplemented stub (reserved for a rowId-based add-check API). */
17
60
  addCheckById(_ids: string[]): void;
61
+ /** @internal 미구현 스텁(rowId 기반 체크 해제 API 예약). / @internal Unimplemented stub (reserved for a rowId-based uncheck API). */
18
62
  uncheckById(_ids: string[]): void;
63
+ /** 현재 선택된 행 데이터 배열을 반환한다(존재하지 않는 인덱스는 제외). / Return the currently selected row data (indexes with no backing row are skipped). */
19
64
  getSelections(): T[];
65
+ /** 체크된 행을 `{ row, rowIndex }` 쌍의 배열로 반환한다. / Return checked rows as an array of `{ row, rowIndex }` pairs. */
20
66
  getChecked(): Array<{
21
67
  row: T;
22
68
  rowIndex: number;
23
69
  }>;
70
+ /** 체크된 행의 데이터만 배열로 반환한다. / Return only the row data of checked rows. */
24
71
  getAllChecked(): T[];
72
+ /** 활성(선택) 행의 인덱스를 반환한다(없으면 -1). / Return the active (selected) row's index, or -1 if none. */
25
73
  getActiveRow(): number;
74
+ /**
75
+ * 지정 행을 활성 상태로 만든다(단일 선택과 동일 동작). / Make the given row active (same effect as single-select).
76
+ *
77
+ * @param index - 활성화할 행의 flat index / Flat index of the row to activate
78
+ */
26
79
  activate(index: number): void;
80
+ /** 선택을 해제한다(활성 행 없음). / Deselect (no active row). */
27
81
  deselect(): void;
82
+ /** 선택·체크 상태를 모두 초기화한다(주로 `setData`/`clearData` 시 호출). / Reset both selection and check state (typically called on `setData`/`clearData`). */
28
83
  reset(): void;
29
84
  }
@@ -1,53 +1,93 @@
1
1
  import { SkinTokenDelta } from './types.js';
2
+ /** 허용되는 FORM 토큰 이름(SkinTokenName 과 동일 집합의 런타임 가드).
3
+ * export 이유(DD-11): 테마 델타의 대칭 검증 `assertColorOnly` 가 이 집합을 denylist 로 재사용해
4
+ * 색축⊥형태축을 양방향으로 기계강제한다(형태/밀도/질감 shape 토큰이 테마 델타에 오면 거부). */
5
+ export declare const FORM_TOKENS: ReadonlySet<string>;
6
+ /** 스킨 정의 결과. / Result of a skin definition. */
2
7
  export interface SkinDefineResult {
3
- /** 실제 등록된(가드레일 클램프가 반영된) 델타. */
8
+ /** 실제 등록된(가드레일 클램프가 반영된) 델타. / The actually registered delta (with guardrail clamps applied). */
4
9
  readonly delta: SkinTokenDelta;
5
- /** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). */
10
+ /** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). / Warnings for tokens adjusted by accessibility guardrails (also logged to console when present). */
6
11
  readonly warnings: string[];
7
12
  }
8
- /** 스킨 델타가 색 리터럴을 담고 있는지 검사하고, 위반 시 던진다(FORM-only, Rule 2). */
13
+ /**
14
+ * 스킨 델타가 색 리터럴을 담고 있는지 검사하고, 위반 시 던진다(FORM-only, Rule 2).
15
+ * / Assert a skin delta carries no color literal; throws on violation (FORM-only, Rule 2).
16
+ *
17
+ * @param id - 스킨 id / Skin id
18
+ * @param delta - 검사할 토큰 델타 / Token delta to validate
19
+ * @throws FORM 토큰이 아니거나 색 리터럴이 있으면 Error / Throws if a non-FORM token or a color literal is present
20
+ */
9
21
  export declare function assertFormOnly(id: string, delta: SkinTokenDelta): void;
10
22
  /**
11
- * HANMS 접근성 가드레일(불변식) 적용 — 정의 시점 클램프(§6.4, HANMS P0-4).
12
- * - focus-width < 2px → 2px 로 클램프(가시 포커스 비협상).
23
+ * 접근성 가드레일(불변식) 적용 — 정의 시점 클램프(§6.4).
24
+ * / Apply accessibility guardrails (invariants) — clamp at definition time (§6.4).
25
+ *
26
+ * - focus-width < 2px → 2px 로 클램프(가시 포커스 비협상). / clamp to 2px (visible focus is non-negotiable).
13
27
  * - focus-style: none → solid.
28
+ *
14
29
  * 반환은 조정된 델타 + 경고 목록(silent override 아님 — 무엇을 클램프했는지 알린다).
30
+ * / Returns the adjusted delta plus a warning list (not a silent override — it reports what was clamped).
31
+ *
32
+ * @param id - 스킨 id / Skin id
33
+ * @param delta - 조정할 토큰 델타 / Token delta to adjust
34
+ * @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
15
35
  */
16
36
  export declare function applyGuardrails(id: string, delta: SkinTokenDelta): SkinDefineResult;
17
37
  /**
18
38
  * 프로세스 전역 스킨 등록소. defineSkin(사용자) 는 검증+가드레일+`<style>` 주입,
19
39
  * registerBuiltin(내장) 은 검증+가드레일만(CSS 는 skins.css 정적 번들 소유).
40
+ * / Process-global skin registry. `define` (user) does validation + guardrails + `<style>` injection;
41
+ * `registerBuiltin` (built-in) does validation + guardrails only (CSS is owned by the skins.css static bundle).
42
+ *
43
+ * @example
44
+ * skinRegistry.define('my-skin', { '--og-radius-md': '10px', '--og-border-style': 'solid' });
20
45
  */
21
46
  export declare class SkinRegistry {
22
47
  private _skins;
23
48
  private _styleEl;
24
- /** 내장 스킨 등록(주입 없음 — CSS 는 skins.css 가 전달). 검증/가드레일은 동일 적용. */
49
+ /**
50
+ * 내장 스킨 등록(주입 없음 — CSS 는 skins.css 가 전달). 검증/가드레일은 동일 적용.
51
+ * / Register a built-in skin (no injection — CSS is delivered by skins.css). Validation/guardrails still apply.
52
+ *
53
+ * @param id - 스킨 id / Skin id
54
+ * @param delta - FORM 토큰 델타 / FORM token delta
55
+ */
25
56
  registerBuiltin(id: string, delta: SkinTokenDelta): void;
26
57
  /**
27
58
  * 사용자 스킨 등록. FORM-only 검증 + 가드레일 클램프 후 런타임 `<style>` 로
28
59
  * `.og-container[data-og-skin="id"]` 블록을 주입(브라우저 환경). 반환은 조정 결과.
60
+ * / Register a user skin. After FORM-only validation and guardrail clamps, injects a
61
+ * `.og-container[data-og-skin="id"]` block via a runtime `<style>` (browser env). Returns the adjusted result.
62
+ *
63
+ * @param id - 스킨 id / Skin id
64
+ * @param delta - FORM 토큰 델타 / FORM token delta
65
+ * @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
29
66
  */
30
67
  define(id: string, delta: SkinTokenDelta): SkinDefineResult;
68
+ /** 스킨 id 등록 여부. / Whether a skin id is registered. */
31
69
  has(id: string): boolean;
70
+ /** 등록된 스킨 델타 조회(없으면 undefined). / Get a registered skin delta (undefined if absent). */
32
71
  get(id: string): SkinTokenDelta | undefined;
33
- /** 등록된 모든 스킨 id(내장 + 사용자). */
72
+ /** 등록된 모든 스킨 id(내장 + 사용자). / All registered skin ids (built-in + user). */
34
73
  list(): string[];
35
74
  /** 런타임 `<style>` 주입(테스트/SSR 등 document 없으면 no-op). 같은 태그를 누적 사용. */
36
75
  private _inject;
37
76
  }
38
- /** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1). HANMS: APPROVE-WITH-GUARDRAIL(G-S1). */
77
+ /** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1). / Sharp/Gothic — enterprise high-density, squared corners (§3.1). */
39
78
  export declare const SKIN_SHARP: SkinTokenDelta;
40
- /** Rounded — 소비자 SaaS 소프트(§3.2). HANMS: APPROVE. */
79
+ /** Rounded — 소비자 SaaS 소프트(§3.2). / Rounded — consumer-SaaS soft look (§3.2). */
41
80
  export declare const SKIN_ROUNDED: SkinTokenDelta;
42
- /** Stitch — 핸드크래프트(§3.3). HANMS: APPROVE-WITH-GUARDRAIL(G-ST1~3). 색(리넨/자수)은 theme 축. */
81
+ /** Stitch — 핸드크래프트(§3.3). 색(리넨/자수)은 theme 축. / Stitch — handcrafted look (§3.3); color (linen/embroidery) lives on the theme axis. */
43
82
  export declare const SKIN_STITCH: SkinTokenDelta;
44
- /** Flat/Minimal — 플랫 2.0(§3.5). HANMS: APPROVE-WITH-GUARDRAIL(G-F1: 플로팅 표면 1px 보더). */
83
+ /** Flat/Minimal — 플랫 2.0(§3.5). / Flat/Minimal — flat 2.0 (§3.5). */
45
84
  export declare const SKIN_FLAT: SkinTokenDelta;
46
- /** High-Contrast — 접근성 우선·레퍼런스(§3.6). HANMS: APPROVE(안전 폴백). */
85
+ /** High-Contrast — 접근성 우선·레퍼런스(§3.6). / High-Contrast — accessibility-first reference skin (§3.6). */
47
86
  export declare const SKIN_HIGH_CONTRAST: SkinTokenDelta;
48
- /** Material/Elevated — Neumorph 대체(HANMS §3): 중간 반경 + 정직한 그림자 엘리베이션. APPROVE. */
87
+ /** Material/Elevated — 중간 반경 + 정직한 그림자 엘리베이션. / Material/Elevated — medium radius plus honest shadow elevation. */
49
88
  export declare const SKIN_MATERIAL: SkinTokenDelta;
50
- /** 내장 스킨 카탈로그(HANMS 확정 6종, Neumorph 제외). id → 델타. */
89
+ /** 내장 스킨 카탈로그(확정 6종). id → 델타. / Built-in skin catalog (6 finalized skins). id → delta. */
51
90
  export declare const BUILTIN_SKINS: ReadonlyArray<readonly [string, SkinTokenDelta]>;
52
- /** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css). */
91
+ /** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css).
92
+ * / Process-global default registry — bootstraps the built-in skins (no injection; CSS=skins.css). */
53
93
  export declare const skinRegistry: SkinRegistry;
@@ -3,37 +3,116 @@ import { ColumnLayout } from './ColumnLayout.js';
3
3
  import { VirtualScroll } from './VirtualScroll.js';
4
4
  import { Pagination } from './Pagination.js';
5
5
  import { SortItem, FilterItem } from './types.js';
6
+ /**
7
+ * {@link SortFilterManager} 의존성 주입 계약. / Dependency-injection contract for {@link SortFilterManager}.
8
+ *
9
+ * 호스트 그리드가 데이터/렌더/i18n 접근을 함수로 넘겨 매니저를 데이터 소스와 분리한다.
10
+ * / The host grid passes data/render/i18n access as functions, decoupling the manager
11
+ * from its data source.
12
+ */
6
13
  export interface SortFilterDeps<T extends Record<string, any>> {
14
+ /** 현재 데이터 레이어 조회. / Look up the current data layer. */
7
15
  getData: () => DataLayer<T>;
16
+ /** 현재 컬럼 레이아웃 조회. / Look up the current column layout. */
8
17
  getColLayout: () => ColumnLayout<T>;
18
+ /** 통합검색(find) 필터 문자열 조회. / Look up the current find-filter string. */
9
19
  getFindFilter: () => string;
20
+ /** 가상 스크롤 인스턴스 조회(없으면 `null`). / Look up the virtual-scroll instance (or `null`). */
10
21
  getVs: () => VirtualScroll | null;
22
+ /** 페이지네이션 인스턴스 조회(없으면 `null`). / Look up the pagination instance (or `null`). */
11
23
  getPagination: () => Pagination | null;
24
+ /** 현재 그리드 옵션 조회. / Look up the current grid options. */
12
25
  getOptions: () => any;
26
+ /** 헤더(정렬/필터 표시)를 다시 그린다. / Re-render the header (sort/filter indicators). */
13
27
  renderHeader: () => void;
28
+ /** 바디를 다시 그린다. / Re-render the body. */
14
29
  doRender: () => void;
30
+ /** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
15
31
  announce: (msg: string) => void;
16
32
  /** i18n: 정렬 상태어 + announce 해석. / i18n: resolve sort state words + announce. */
17
33
  t: (key: string, params?: Record<string, string | number>) => string;
34
+ /** 그리드 이벤트를 발행한다. / Emit a grid event. */
18
35
  emit: (event: string, ...args: any[]) => void;
19
- /** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님). */
36
+ /** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님).
37
+ * / C0.5/§2.5: after sort/filter, re-project the F1 range selection by its rowId
38
+ * set instead of clearing it. */
20
39
  onReproject?: () => void;
21
40
  }
41
+ /**
42
+ * 정렬·필터 상태와 적용을 담당하는 매니저. / Manages sort/filter state and their application.
43
+ *
44
+ * 정렬 목록(`SortItem[]`)과 컬럼별 필터(`FilterItem[]`)를 소유하고, 데이터 레이어에
45
+ * 적용한 뒤 헤더/바디 재렌더와 관련 이벤트 발행까지 처리한다.
46
+ * / Owns the sort list (`SortItem[]`) and per-column filters (`FilterItem[]`), applies
47
+ * them to the data layer, and drives header/body re-render plus related event emission.
48
+ */
22
49
  export declare class SortFilterManager<T extends Record<string, any> = any> {
23
50
  private _sortList;
24
51
  private _filters;
25
52
  private _d;
26
53
  constructor(deps: SortFilterDeps<T>);
54
+ /** 현재 정렬 목록(원본 참조). / Current sort list (live reference). */
27
55
  get sortList(): SortItem[];
56
+ /** 컬럼 field 별 필터 목록(원본 참조). / Filter items keyed by column field (live reference). */
28
57
  get filters(): Record<string, FilterItem[]>;
58
+ /**
59
+ * 헤더 정렬 클릭을 처리한다(단일/다중 정렬 토글). / Handle a header sort click (toggles single/multi sort).
60
+ *
61
+ * 같은 필드를 다시 클릭하면 asc→desc→해제 순으로 순환한다. `shiftKey` 와
62
+ * `multiSort` 옵션이 모두 켜져야 다중 정렬 목록에 누적된다.
63
+ * / Re-clicking the same field cycles asc → desc → removed. Multi-sort only
64
+ * accumulates when both `shiftKey` and the `multiSort` option are on.
65
+ *
66
+ * @param field - 정렬 대상 컬럼 field 명 / Column field to sort by
67
+ * @param shiftKey - 다중 정렬 결합 키(Shift) 눌림 여부 / Whether the multi-sort modifier (Shift) was held
68
+ */
29
69
  handleSortClick(field: string, shiftKey: boolean): void;
70
+ /**
71
+ * 프로그램적으로 정렬을 설정한다(단일 필드+방향, 또는 전체 정렬 목록). / Set sort programmatically (single field+direction, or a full sort list).
72
+ *
73
+ * @param fieldOrList - 정렬할 필드명, 또는 대체할 전체 `SortItem[]` / Field to sort by, or a full `SortItem[]` to replace the current list
74
+ * @param dir - `fieldOrList` 가 문자열일 때의 정렬 방향(기본 `'asc'`) / Sort direction when `fieldOrList` is a string (default `'asc'`)
75
+ * @example
76
+ * mgr.sort('name', 'desc');
77
+ * mgr.sort([{ field: 'age', dir: 'asc' }]);
78
+ */
30
79
  sort(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
80
+ /** 모든 정렬을 해제한다. / Clear all sorting. */
31
81
  resetSort(): void;
82
+ /**
83
+ * 초기 정렬 목록을 조용히 적용한다(렌더/이벤트 없이 데이터만). / Silently seed the initial sort list (data only, no render/events).
84
+ *
85
+ * @param sortList - 초기화 시 적용할 정렬 목록 / Sort list to apply at initialization
86
+ */
32
87
  initSort(sortList: SortItem[]): void;
88
+ /** 현재 정렬 목록의 복사본을 반환한다. / Return a copy of the current sort list. */
33
89
  getSortState(): SortItem[];
90
+ /**
91
+ * 특정 컬럼의 필터를 설정하고 적용한다. / Set and apply the filter for one column.
92
+ *
93
+ * @param field - 필터를 적용할 컬럼 field 명 / Column field to filter
94
+ * @param filterItems - 적용할 필터 조건 목록 / Filter conditions to apply
95
+ */
34
96
  setFilter(field: string, filterItems: FilterItem[]): void;
97
+ /**
98
+ * 필터를 해제한다(필드 지정 시 해당 필드만, 생략 시 전체). / Clear filters (one field if given, otherwise all).
99
+ *
100
+ * @param field - 해제할 컬럼 field 명. 생략하면 전체 필터 해제 / Column field to clear; omit to clear every filter
101
+ */
35
102
  resetFilter(field?: string): void;
103
+ /** 현재 컬럼별 필터 상태의 복사본을 반환한다. / Return a copy of the current per-column filter state. */
36
104
  getFilterState(): Record<string, FilterItem[]>;
105
+ /**
106
+ * 저장된 필터 상태를 복원하고 재적용한다(헤더/바디 재렌더는 호출측 책임). / Restore a saved filter state and reapply it (caller is responsible for header/body re-render).
107
+ *
108
+ * @param state - 복원할 컬럼별 필터 상태 / Per-column filter state to restore
109
+ */
37
110
  restoreFilter(state: Record<string, FilterItem[]>): void;
111
+ /**
112
+ * 통합검색 + 컬럼 필터를 데이터 레이어에 적용하고 행수를 재투영한다. / Apply find-filter and column filters to the data layer, then re-project row counts.
113
+ *
114
+ * 정렬과 달리 이 메서드는 헤더/바디를 직접 재렌더하지 않는다(호출측이 필요 시 처리).
115
+ * / Unlike sorting, this does not re-render header/body itself (callers handle that as needed).
116
+ */
38
117
  applyFilters(): void;
39
118
  }
@@ -1,34 +1,88 @@
1
+ /** 트리 노드 — 원본 행 데이터에 계층·펼침·라인 렌더 메타를 얹은 래퍼. / A tree node — wraps a row with hierarchy, expansion, and line-render metadata. */
1
2
  export interface TreeNode<T = any> {
3
+ /** 트리 노드 판별 플래그(항상 true). / Tree-node discriminant flag (always true). */
2
4
  _isTree: true;
5
+ /** 노드 id(idField 값). / Node id (value of `idField`). */
3
6
  _treeId: any;
7
+ /** 부모 노드 id(parentIdField 값). / Parent node id (value of `parentIdField`). */
4
8
  _treeParentId: any;
9
+ /** 트리 깊이(루트 0). / Tree depth (root is 0). */
5
10
  _depth: number;
11
+ /** 펼침 여부. / Whether the node is expanded. */
6
12
  _expanded: boolean;
13
+ /** 자식 보유 여부. / Whether the node has children. */
7
14
  _hasChildren: boolean;
15
+ /** 하위 전체(후손) 노드 수. / Total descendant node count. */
8
16
  _childCount: number;
17
+ /** true → └─ / false → ├─. / true → └─, false → ├─. */
9
18
  _isLastChild: boolean;
19
+ /** [d]=true → 깊이 d 조상에 형제가 더 있어 │ 라인 표시. / `[d]=true` → an ancestor at depth d has more siblings, so draw a │ line. */
10
20
  _ancestorHasMore: boolean[];
21
+ /** 원본 행 데이터. / The original row data. */
11
22
  data: T;
23
+ /** 자식 노드 배열. / Child nodes. */
12
24
  children: TreeNode<T>[];
13
25
  }
26
+ /** 트리 항목 별칭(=TreeNode). / Tree item alias (= TreeNode). */
14
27
  export type TreeItem<T> = TreeNode<T>;
28
+ /**
29
+ * 값이 트리 노드인지 판별하는 타입 가드. / Type guard: whether a value is a tree node.
30
+ *
31
+ * @typeParam T - 행 데이터 타입 / Row data type
32
+ * @param item - 검사할 값 / Value to test
33
+ * @returns 트리 노드이면 true / true if the value is a tree node
34
+ */
15
35
  export declare function isTreeNode<T>(item: any): item is TreeNode<T>;
36
+ /** 트리 빌드 옵션. / Options for building a tree. */
16
37
  export interface TreeBuildOptions {
38
+ /** 노드 id 필드명. / Field name holding the node id. */
17
39
  idField: string;
40
+ /** 부모 id 필드명. / Field name holding the parent id. */
18
41
  parentIdField: string;
42
+ /** 로드 시 전체 펼침 여부(기본 false). / Whether to expand all on load (default false). */
19
43
  expandOnLoad?: boolean;
20
44
  }
21
45
  /**
22
- * flat 데이터를 트리 구조로 변환.
23
- * parentId가 null/undefined/''인 행이 루트 노드.
46
+ * flat 데이터를 트리 구조로 변환. / Convert flat data into a tree structure.
47
+ *
48
+ * parentId가 null/undefined/'' 또는 미존재인 행이 루트 노드가 된다. 깊이·후손 수·
49
+ * 탐색기 라인 메타(_isLastChild, _ancestorHasMore)를 함께 계산한다.
50
+ * / Rows whose parentId is null/undefined/'' or missing become root nodes. Also computes depth,
51
+ * descendant counts, and explorer line metadata (_isLastChild, _ancestorHasMore).
52
+ *
53
+ * @typeParam T - 행 데이터 타입 / Row data type
54
+ * @param data - flat 행 배열 / Flat rows
55
+ * @param opts - id/parentId 필드 및 펼침 옵션 / id/parentId fields and expand option
56
+ * @param expandedKeys - 펼침 상태 노드 id 집합 / Set of expanded node ids
57
+ * @returns 루트 노드 배열 / Array of root nodes
58
+ * @example
59
+ * const roots = buildTree(rows, { idField: 'id', parentIdField: 'pid' });
60
+ * const flat = flattenTree(roots); // 화면 표시용 / for on-screen display
24
61
  */
25
62
  export declare function buildTree<T extends Record<string, any>>(data: T[], opts: TreeBuildOptions, expandedKeys?: Set<any>): TreeNode<T>[];
26
63
  /**
27
- * 트리를 화면에 표시할 flat 배열로 변환.
28
- * 접힌 노드(_expanded=false)의 자식은 제외.
64
+ * 트리를 화면에 표시할 flat 배열로 변환. / Flatten a tree into a display array.
65
+ *
66
+ * 접힌 노드(_expanded=false)의 자식은 제외. / Children of collapsed nodes (_expanded=false) are excluded.
67
+ *
68
+ * @typeParam T - 행 데이터 타입 / Row data type
69
+ * @param nodes - 루트 노드 배열 / Root nodes
70
+ * @returns 펼침 상태에 따른 표시 노드 배열 / Visible nodes according to expansion state
29
71
  */
30
72
  export declare function flattenTree<T>(nodes: TreeNode<T>[]): TreeNode<T>[];
31
- /** 특정 id 노드의 펼침 상태 토글 */
73
+ /**
74
+ * 특정 id 노드의 펼침 상태 토글. / Toggle the expansion state of a node id.
75
+ *
76
+ * @typeParam T - 행 데이터 타입 / Row data type
77
+ * @param expandedKeys - 펼침 상태 집합(제자리 변경) / Set of expanded ids (mutated in place)
78
+ * @param nodeId - 토글할 노드 id / Node id to toggle
79
+ */
32
80
  export declare function toggleTreeNode<T>(expandedKeys: Set<any>, nodeId: any): void;
33
- /** 모든 노드 id 수집 */
81
+ /**
82
+ * 모든 노드 id 수집(전체 펼침/접기 등에 사용). / Collect every node id (used for expand-all/collapse-all).
83
+ *
84
+ * @typeParam T - 행 데이터 타입 / Row data type
85
+ * @param nodes - 루트 노드 배열 / Root nodes
86
+ * @returns 후손 포함 전체 노드 id 배열 / All node ids including descendants
87
+ */
34
88
  export declare function collectAllTreeIds<T>(nodes: TreeNode<T>[]): any[];
@@ -1,9 +1,55 @@
1
1
  import { TriggerContext, TriggerHandler, TriggerEvent } from './types.js';
2
+ /**
3
+ * before/after 트리거 훅 레지스트리. / Registry for before/after trigger hooks.
4
+ *
5
+ * 그리드 연산(`operation`) 앞뒤로 사용자 핸들러를 실행한다. `before:*` 훅은
6
+ * 컨텍스트를 `cancel()` 하여 연산을 취소할 수 있고, `after:*` 훅 뒤에는 `complete`
7
+ * 훅이 추가로 실행된다.
8
+ * / Runs user handlers around grid operations. A `before:*` hook may cancel the
9
+ * operation via `ctx.cancel()`; after any `after:*` hook, registered `complete`
10
+ * hooks also fire.
11
+ */
2
12
  export declare class TriggerManager {
3
13
  private _triggers;
14
+ /**
15
+ * 트리거 이벤트에 핸들러를 등록한다. / Register a handler for a trigger event.
16
+ *
17
+ * @param event - 트리거 이벤트명(예: `before:setValue`) / Trigger event name (e.g. `before:setValue`)
18
+ * @param handler - 실행할 핸들러 / Handler to run
19
+ */
4
20
  add(event: TriggerEvent | string, handler: TriggerHandler): void;
21
+ /**
22
+ * 등록된 핸들러를 제거한다. / Remove a previously registered handler.
23
+ *
24
+ * @param event - 트리거 이벤트명 / Trigger event name
25
+ * @param handler - 제거할 핸들러(등록 시와 동일 참조) / Handler to remove (same reference used at registration)
26
+ */
5
27
  remove(event: TriggerEvent | string, handler: TriggerHandler): void;
28
+ /**
29
+ * 특정 이벤트 또는 전체 트리거를 해제한다. / Clear one event's triggers, or all of them.
30
+ *
31
+ * @param event - 지우려는 이벤트명. 생략하면 전체 삭제 / Event to clear; omit to clear everything
32
+ */
6
33
  clear(event?: TriggerEvent | string): void;
34
+ /**
35
+ * 트리거 실행용 컨텍스트 객체를 생성한다. / Build a context object for trigger execution.
36
+ *
37
+ * @param operation - 연산 이름 / Operation name
38
+ * @param args - 연산 인자 배열 / Operation argument array
39
+ * @returns `cancel()` 로 취소 가능한 트리거 컨텍스트 / A trigger context cancellable via `cancel()`
40
+ */
7
41
  mkCtx(operation: string, args: any[]): TriggerContext;
42
+ /**
43
+ * 이벤트에 등록된 핸들러를 순차 실행한다. / Run handlers registered for an event, in order.
44
+ *
45
+ * `before:*` 훅 중 하나라도 `ctx.cancel()` 을 호출하면 즉시 중단하고 `false` 를
46
+ * 반환한다. `after:*` 이벤트는 완료 후 `complete` 훅도 실행한다.
47
+ * / If any `before:*` hook calls `ctx.cancel()`, execution stops immediately and
48
+ * returns `false`. For `after:*` events, `complete` hooks also run afterward.
49
+ *
50
+ * @param event - 실행할 이벤트명 / Event name to run
51
+ * @param ctx - 트리거 컨텍스트 / Trigger context
52
+ * @returns 취소되지 않았으면 `true` / `true` unless the operation was cancelled
53
+ */
8
54
  exec(event: string, ctx: TriggerContext): boolean;
9
55
  }
@@ -1,13 +1,35 @@
1
+ /** 가상 스크롤 생성 옵션. / Virtual scroll construction options. */
1
2
  export interface VirtualScrollOptions {
3
+ /** 행 높이(px). / Row height in px. */
2
4
  rowHeight: number;
5
+ /** 뷰포트 위/아래로 여분 렌더할 행 수(기본 5). / Extra rows rendered above/below the viewport (default 5). */
3
6
  overscan?: number;
7
+ /** 가시 범위 변화 시 호출되는 렌더 콜백. / Render callback fired when the visible range changes. */
4
8
  onRender: (startIndex: number, endIndex: number) => void;
5
9
  }
10
+ /** 현재 가시 행 범위와 스크롤 오프셋. / Current visible row range and scroll offset. */
6
11
  export interface VirtualScrollRange {
12
+ /** 렌더 시작 행 인덱스. / First row index to render. */
7
13
  startIndex: number;
14
+ /** 렌더 종료 행 인덱스(포함). / Last row index to render (inclusive). */
8
15
  endIndex: number;
16
+ /** 시작 행의 상단 y 오프셋(px). / Top y-offset of the start row in px. */
9
17
  offsetY: number;
10
18
  }
19
+ /**
20
+ * 대용량 행을 위한 가상 스크롤 엔진(C0 가상스크롤). / Virtual scroll engine for large row counts (contract C0 virtual-scroll).
21
+ *
22
+ * 컨테이너의 scroll 이벤트를 rAF 로 코얼레싱하여 가시 범위만 렌더 콜백으로 통지한다.
23
+ * 스크롤 위치·뷰포트 높이·행 높이에서 시작/종료 인덱스를 계산해 DOM 노드 수를 상수로 유지한다.
24
+ * / Coalesces the container's scroll events via rAF and notifies only the visible range through
25
+ * the render callback. Derives start/end indices from scroll position, viewport height, and row
26
+ * height so the DOM node count stays constant.
27
+ *
28
+ * @example
29
+ * const vs = new VirtualScroll(container, { rowHeight: 32, onRender: (s, e) => renderRows(s, e) });
30
+ * vs.setViewportHeight(640);
31
+ * vs.setTotalRows(100000);
32
+ */
11
33
  export declare class VirtualScroll {
12
34
  private container;
13
35
  private rowHeight;
@@ -17,15 +39,57 @@ export declare class VirtualScroll {
17
39
  private _viewportHeight;
18
40
  private _rafId;
19
41
  private onRender;
42
+ /**
43
+ * 가상 스크롤 엔진 생성 및 컨테이너 scroll 리스너 부착. / Create the engine and attach the container scroll listener.
44
+ *
45
+ * @param container - 스크롤을 감지할 컨테이너 요소 / Container element whose scroll is tracked
46
+ * @param options - 행 높이·overscan·렌더 콜백 / Row height, overscan, and render callback
47
+ */
20
48
  constructor(container: HTMLElement, options: VirtualScrollOptions);
21
49
  private _onScroll;
22
50
  private _scheduleRender;
51
+ /**
52
+ * 현재 스크롤 상태 기준 가시 행 범위 계산. / Compute the visible row range for the current scroll state.
53
+ *
54
+ * overscan 을 반영해 시작/종료 인덱스와 시작 오프셋을 반환한다.
55
+ * / Returns start/end indices and the start offset, accounting for overscan.
56
+ *
57
+ * @returns 가시 범위 및 오프셋 / The visible range and offset
58
+ */
23
59
  getVisibleRange(): VirtualScrollRange;
60
+ /**
61
+ * 전체 행 수 설정 — spacer 높이 갱신 후 재렌더 예약. / Set total row count — updates spacer height and schedules a re-render.
62
+ *
63
+ * @param count - 전체 행 수 / Total number of rows
64
+ */
24
65
  setTotalRows(count: number): void;
66
+ /**
67
+ * 뷰포트 높이 설정 — 가시 행 개수 계산에 사용. / Set viewport height — used to compute the number of visible rows.
68
+ *
69
+ * @param height - 뷰포트 높이(px) / Viewport height in px
70
+ */
25
71
  setViewportHeight(height: number): void;
72
+ /**
73
+ * 행 높이 변경 — spacer 높이 갱신 후 재렌더 예약. / Change row height — updates spacer height and schedules a re-render.
74
+ *
75
+ * @param height - 새 행 높이(px) / New row height in px
76
+ */
26
77
  setRowHeight(height: number): void;
78
+ /**
79
+ * 지정 행이 보이도록 스크롤 위치 조정(이미 보이면 무이동). / Scroll so the given row is visible (no-op if already visible).
80
+ *
81
+ * @param rowIndex - 대상 행 인덱스 / Target row index
82
+ */
27
83
  scrollToRow(rowIndex: number): void;
84
+ /**
85
+ * 전체 콘텐츠 높이(전체 행 수 × 행 높이) 반환. / Return the total content height (total rows × row height).
86
+ *
87
+ * @returns 전체 높이(px) / Total height in px
88
+ */
28
89
  getTotalHeight(): number;
29
90
  private _updateSpacerHeight;
91
+ /**
92
+ * 리스너·rAF 정리. 그리드 파기 시 반드시 호출. / Tear down the listener and pending rAF; call on grid destroy.
93
+ */
30
94
  destroy(): void;
31
95
  }
@@ -1,7 +1,18 @@
1
1
  import { ColumnDef, WorksheetState } from './types.js';
2
+ /** 시트 전환 시 호출되는 콜백. / Callback invoked when the active sheet switches. */
2
3
  export type SwitchCallback<T> = (name: string, state: WorksheetState<T>) => void;
3
4
  /** i18n: 탭 UI aria 해석기(주입 없으면 전역 t). / i18n: tab-UI aria resolver (global t when not injected). */
4
5
  export type WorksheetT = (key: string, params?: Record<string, string | number>) => string;
6
+ /**
7
+ * 그리드 다중 워크시트(탭) 관리자. / Manages the grid's multiple worksheets (tabs).
8
+ *
9
+ * 시트별로 독립적인 `columns`/`data` 를 `Map` 으로 보유하고, 탭 클릭 시
10
+ * `onSwitch` 콜백을 통해 `OpenGrid.setData`/`applyColumns` 로 화면을 전환시킨다.
11
+ * 탭 UI는 그리드 컨테이너 하단에 `.og-sheet-tabs` 영역으로 삽입된다.
12
+ * / Holds independent `columns`/`data` per sheet in a `Map`; a tab click drives the
13
+ * `onSwitch` callback, which the caller uses to run `OpenGrid.setData`/`applyColumns`.
14
+ * The tab UI is inserted as a `.og-sheet-tabs` region at the bottom of the grid container.
15
+ */
5
16
  export declare class WorksheetManager<T extends Record<string, any> = any> {
6
17
  private _sheets;
7
18
  private _active;
@@ -9,18 +20,66 @@ export declare class WorksheetManager<T extends Record<string, any> = any> {
9
20
  private _onSwitch;
10
21
  private _t;
11
22
  constructor(container: HTMLElement, onSwitch: SwitchCallback<T>, t?: WorksheetT);
23
+ /**
24
+ * 새 시트를 추가한다. / Add a new sheet.
25
+ *
26
+ * 첫 번째로 추가되는 시트는 자동으로 활성화된다. / The first sheet ever added is auto-activated.
27
+ *
28
+ * @param name - 시트 이름(고유해야 함) / Sheet name (must be unique)
29
+ * @param columns - 시트 컬럼 정의(기본 빈 배열) / Sheet column definitions (default empty array)
30
+ * @param data - 시트 초기 데이터(기본 빈 배열) / Initial sheet data (default empty array)
31
+ */
12
32
  add(name: string, columns?: ColumnDef<T>[], data?: T[]): void;
33
+ /**
34
+ * 시트를 제거한다. / Remove a sheet.
35
+ *
36
+ * 마지막 남은 시트는 제거할 수 없다(예외 발생). 활성 시트를 제거하면 남은 시트 중
37
+ * 첫 번째로 자동 전환한다. / The last remaining sheet cannot be removed (throws).
38
+ * Removing the active sheet auto-switches to the first remaining sheet.
39
+ *
40
+ * @param name - 제거할 시트 이름 / Name of the sheet to remove
41
+ */
13
42
  remove(name: string): void;
43
+ /**
44
+ * 시트 이름을 변경한다. / Rename a sheet.
45
+ *
46
+ * 삽입 순서(`Map` 순회 순서) 유지를 위해 내부적으로 시트 맵을 재구성한다.
47
+ * / Internally rebuilds the sheet map to preserve insertion order (`Map` iteration order).
48
+ *
49
+ * @param oldName - 기존 시트 이름 / Current sheet name
50
+ * @param newName - 새 시트 이름(고유해야 함) / New sheet name (must be unique)
51
+ */
14
52
  rename(oldName: string, newName: string): void;
53
+ /**
54
+ * 지정 시트를 활성화하고 `onSwitch` 콜백을 실행한다. / Activate the given sheet and invoke the `onSwitch` callback.
55
+ *
56
+ * @param name - 활성화할 시트 이름 / Name of the sheet to activate
57
+ */
15
58
  switch(name: string): void;
59
+ /**
60
+ * 시트 상태를 조회한다. / Look up a sheet's state.
61
+ *
62
+ * @param name - 조회할 시트 이름 / Name of the sheet to look up
63
+ * @returns 시트 상태, 없으면 `undefined` / The sheet state, or `undefined`
64
+ */
16
65
  get(name: string): WorksheetState<T> | undefined;
66
+ /** 등록된 모든 시트 이름 목록(삽입 순서). / Names of all registered sheets, in insertion order. */
17
67
  getNames(): string[];
68
+ /** 현재 활성 시트 이름. / Name of the currently active sheet. */
18
69
  getActive(): string;
19
- /** 현재 활성 시트의 data를 갱신 (그리드 편집 동기화용) */
70
+ /**
71
+ * 지정 시트의 데이터를 갱신한다(그리드 편집 동기화용). / Update a sheet's data (for syncing grid edits back).
72
+ *
73
+ * @param name - 갱신할 시트 이름 / Name of the sheet to update
74
+ * @param data - 새 데이터 배열 / New data array
75
+ */
20
76
  syncData(name: string, data: T[]): void;
77
+ /** 탭 바 DOM 을 제거한다. / Remove the tab-bar DOM. */
21
78
  destroy(): void;
79
+ /** @internal 탭 바 컨테이너를 생성해 그리드 컨테이너에 삽입한다. / Creates the tab-bar container and appends it to the grid container. */
22
80
  private _buildTabBar;
81
+ /** @internal 탭 바를 전체 재렌더한다(시트 목록 + '+' 버튼). / Fully re-renders the tab bar (sheet list + '+' button). */
23
82
  private _renderTabs;
24
- /** 탭 더블클릭 → input으로 전환해 이름 변경 */
83
+ /** @internal 탭 더블클릭 → input으로 전환해 이름 변경. / Double-click on a tab switches it to an input for inline rename. */
25
84
  private _startRename;
26
85
  }