open-grid 1.2.1 → 1.3.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 (258) hide show
  1. package/CHANGELOG.md +388 -365
  2. package/dist/{OpenGrid-0r_543Kj.cjs → OpenGrid-B7m7ei7f.cjs} +1222 -1029
  3. package/dist/{OpenGrid-HmhGVC2V.js → OpenGrid-CeUdO_fM.js} +1613 -1418
  4. package/dist/index-CeJ-0-80.cjs +260 -0
  5. package/dist/index-DnarQ4eR.js +266 -0
  6. package/dist/index-DrCPRuYi.js +548 -0
  7. package/dist/index-JjfWY3Bt.cjs +520 -0
  8. package/dist/open-grid-base.css +12 -1
  9. package/dist/open-grid-react.cjs +1 -1
  10. package/dist/open-grid-react.js +1 -1
  11. package/dist/open-grid-vue.cjs +7 -7
  12. package/dist/open-grid-vue.js +2 -2
  13. package/dist/open-grid.cjs +1 -1
  14. package/dist/open-grid.js +2 -2
  15. package/dist/types/bench/perf.d.ts +14 -8
  16. package/dist/types/core/AppearanceResolver.d.ts +98 -11
  17. package/dist/types/core/CFRenderBridge.d.ts +13 -0
  18. package/dist/types/core/CellTypeRegistry.d.ts +24 -0
  19. package/dist/types/core/ColumnLayout.d.ts +100 -2
  20. package/dist/types/core/CrossGridMapper.d.ts +43 -5
  21. package/dist/types/core/DataLayer.d.ts +210 -15
  22. package/dist/types/core/DragVisuals.d.ts +33 -4
  23. package/dist/types/core/EventEmitter.d.ts +54 -0
  24. package/dist/types/core/FilterSelect.d.ts +26 -5
  25. package/dist/types/core/FormulaEngine.d.ts +15 -4
  26. package/dist/types/core/GridRenderer.d.ts +143 -10
  27. package/dist/types/core/GridShuttle.d.ts +26 -10
  28. package/dist/types/core/GroupEngine.d.ts +68 -10
  29. package/dist/types/core/IconRegistry.d.ts +31 -13
  30. package/dist/types/core/MathUtils.d.ts +58 -5
  31. package/dist/types/core/MergeEngine.d.ts +45 -10
  32. package/dist/types/core/OGDecimal.d.ts +144 -13
  33. package/dist/types/core/OpenGrid.d.ts +401 -122
  34. package/dist/types/core/OrgChart.d.ts +32 -11
  35. package/dist/types/core/PivotEngine.d.ts +37 -0
  36. package/dist/types/core/RowDragDrop.d.ts +52 -6
  37. package/dist/types/core/SkinRegistry.d.ts +86 -19
  38. package/dist/types/core/TreeEngine.d.ts +60 -6
  39. package/dist/types/core/VirtualScroll.d.ts +64 -0
  40. package/dist/types/core/XmlConverter.d.ts +40 -0
  41. package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
  42. package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
  43. package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
  44. package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
  45. package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
  46. package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
  47. package/dist/types/core/a11y/index.d.ts +13 -0
  48. package/dist/types/core/a11y/ports.d.ts +24 -0
  49. package/dist/types/core/appearance/Appearance.d.ts +68 -0
  50. package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
  51. package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
  52. package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
  53. package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
  54. package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
  55. package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
  56. package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
  57. package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
  58. package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
  59. package/dist/types/core/appearance/defaults.d.ts +10 -0
  60. package/dist/types/core/appearance/index.d.ts +20 -0
  61. package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
  62. package/dist/types/core/cf/CFEngine.d.ts +56 -0
  63. package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
  64. package/dist/types/core/cf/CFRule.d.ts +127 -0
  65. package/dist/types/core/cf/ColorScale.d.ts +49 -0
  66. package/dist/types/core/cf/InkResolver.d.ts +33 -0
  67. package/dist/types/core/cf/appearance.d.ts +20 -0
  68. package/dist/types/core/cf/encoders.d.ts +61 -0
  69. package/dist/types/core/cf/eval-types.d.ts +93 -0
  70. package/dist/types/core/cf/index.d.ts +21 -0
  71. package/dist/types/core/cf/lineage.d.ts +32 -0
  72. package/dist/types/core/cf/predicates.d.ts +27 -0
  73. package/dist/types/core/cf/serialize.d.ts +46 -0
  74. package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
  75. package/dist/types/core/chart/DataExtractor.d.ts +53 -12
  76. package/dist/types/core/chart/a11y.d.ts +22 -0
  77. package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
  78. package/dist/types/core/chart/downsample-report.d.ts +36 -0
  79. package/dist/types/core/chart/downsample.d.ts +26 -1
  80. package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
  81. package/dist/types/core/chart/geometry.d.ts +96 -0
  82. package/dist/types/core/chart/hittest.d.ts +21 -3
  83. package/dist/types/core/chart/palette.d.ts +96 -12
  84. package/dist/types/core/chart/parity.d.ts +12 -0
  85. package/dist/types/core/chart/provenance.d.ts +47 -0
  86. package/dist/types/core/chart/scales.d.ts +28 -1
  87. package/dist/types/core/chart/scene.d.ts +102 -0
  88. package/dist/types/core/chart/server.d.ts +36 -0
  89. package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
  90. package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
  91. package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
  92. package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
  93. package/dist/types/core/chart/types.d.ts +102 -21
  94. package/dist/types/core/command/CommandBus.d.ts +51 -0
  95. package/dist/types/core/command/CommandRegistry.d.ts +43 -0
  96. package/dist/types/core/command/CommandStack.d.ts +38 -0
  97. package/dist/types/core/command/ICommand.d.ts +110 -0
  98. package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
  99. package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
  100. package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
  101. package/dist/types/core/command/index.d.ts +9 -0
  102. package/dist/types/core/command/support.d.ts +51 -0
  103. package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
  104. package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
  105. package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
  106. package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
  107. package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
  108. package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
  109. package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
  110. package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
  111. package/dist/types/core/coordinate/index.d.ts +10 -0
  112. package/dist/types/core/coordinate/ports.d.ts +45 -0
  113. package/dist/types/core/coordinate/types.d.ts +76 -0
  114. package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
  115. package/dist/types/core/detail/DetailSplice.d.ts +42 -11
  116. package/dist/types/core/detail/DetailState.d.ts +80 -11
  117. package/dist/types/core/detail/SubgridCache.d.ts +72 -10
  118. package/dist/types/core/detail/index.d.ts +8 -0
  119. package/dist/types/core/domain/AggregateResult.d.ts +54 -0
  120. package/dist/types/core/domain/CellAddress.d.ts +61 -0
  121. package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
  122. package/dist/types/core/domain/Delta.d.ts +37 -0
  123. package/dist/types/core/domain/DomainValue.d.ts +80 -0
  124. package/dist/types/core/domain/Missing.d.ts +65 -0
  125. package/dist/types/core/domain/Money.d.ts +42 -0
  126. package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
  127. package/dist/types/core/domain/Plain.d.ts +45 -0
  128. package/dist/types/core/domain/Quantity.d.ts +32 -0
  129. package/dist/types/core/domain/Ratios.d.ts +100 -0
  130. package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
  131. package/dist/types/core/domain/ValueType.d.ts +71 -0
  132. package/dist/types/core/domain/rounding.d.ts +25 -0
  133. package/dist/types/core/domain/strategies.d.ts +38 -0
  134. package/dist/types/core/editors/DateEditor.d.ts +18 -0
  135. package/dist/types/core/editors/SelectEditor.d.ts +29 -0
  136. package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
  137. package/dist/types/core/export/ExportManifest.d.ts +13 -0
  138. package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
  139. package/dist/types/core/export/Provenance.d.ts +34 -0
  140. package/dist/types/core/export/StreamPump.d.ts +28 -0
  141. package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
  142. package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
  143. package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
  144. package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
  145. package/dist/types/core/export/channels/capabilities.d.ts +13 -0
  146. package/dist/types/core/export/index.d.ts +24 -0
  147. package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
  148. package/dist/types/core/export/print/Paginator.d.ts +48 -0
  149. package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
  150. package/dist/types/core/export/sinks.d.ts +40 -0
  151. package/dist/types/core/export/types.d.ts +211 -0
  152. package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
  153. package/dist/types/core/extension/IExtension.d.ts +90 -0
  154. package/dist/types/core/extension/Registry.d.ts +142 -0
  155. package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
  156. package/dist/types/core/extension/adapters.d.ts +44 -0
  157. package/dist/types/core/extension/conformance.d.ts +47 -0
  158. package/dist/types/core/extension/index.d.ts +16 -0
  159. package/dist/types/core/extension/registries.d.ts +31 -0
  160. package/dist/types/core/extension/reserved.d.ts +10 -0
  161. package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
  162. package/dist/types/core/format/FormatCache.d.ts +20 -0
  163. package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
  164. package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
  165. package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
  166. package/dist/types/core/format/index.d.ts +55 -0
  167. package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
  168. package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
  169. package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
  170. package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
  171. package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
  172. package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
  173. package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
  174. package/dist/types/core/format/types.d.ts +292 -0
  175. package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
  176. package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
  177. package/dist/types/core/formula/CalcService.d.ts +137 -0
  178. package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
  179. package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
  180. package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
  181. package/dist/types/core/formula/FormulaParser.d.ts +9 -0
  182. package/dist/types/core/formula/FormulaStore.d.ts +63 -1
  183. package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
  184. package/dist/types/core/formula/Generation.d.ts +86 -0
  185. package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
  186. package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
  187. package/dist/types/core/formula/functions/essential.d.ts +3 -0
  188. package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
  189. package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
  190. package/dist/types/core/formula/numericLiteral.d.ts +11 -1
  191. package/dist/types/core/formula/serializeFormula.d.ts +10 -1
  192. package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
  193. package/dist/types/core/host/GridHostDriver.d.ts +27 -0
  194. package/dist/types/core/host/GridHostPort.d.ts +37 -0
  195. package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
  196. package/dist/types/core/host/archCheck.d.ts +26 -0
  197. package/dist/types/core/host/index.d.ts +6 -0
  198. package/dist/types/core/host/reconcile.d.ts +22 -0
  199. package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
  200. package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
  201. package/dist/types/core/i18n/types.d.ts +67 -11
  202. package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
  203. package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
  204. package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
  205. package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
  206. package/dist/types/core/quality/PerfSpec.d.ts +95 -0
  207. package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
  208. package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
  209. package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
  210. package/dist/types/core/quality/VisualRegression.d.ts +74 -0
  211. package/dist/types/core/quality/hooks.d.ts +53 -0
  212. package/dist/types/core/quality/index.d.ts +20 -0
  213. package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
  214. package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
  215. package/dist/types/core/range/FillEngine.d.ts +69 -9
  216. package/dist/types/core/range/RangeModel.d.ts +100 -13
  217. package/dist/types/core/range/types.d.ts +27 -11
  218. package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
  219. package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
  220. package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
  221. package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
  222. package/dist/types/core/realtime/PollingSource.d.ts +42 -0
  223. package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
  224. package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
  225. package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
  226. package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
  227. package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
  228. package/dist/types/core/realtime/backoff.d.ts +12 -0
  229. package/dist/types/core/realtime/index.d.ts +13 -0
  230. package/dist/types/core/realtime/ports.d.ts +80 -0
  231. package/dist/types/core/render/CellApplier.d.ts +18 -0
  232. package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
  233. package/dist/types/core/render/CellPipeline.d.ts +39 -0
  234. package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
  235. package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
  236. package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
  237. package/dist/types/core/render/RenderBudget.d.ts +67 -0
  238. package/dist/types/core/render/contrast.d.ts +33 -0
  239. package/dist/types/core/render/index.d.ts +35 -0
  240. package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
  241. package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
  242. package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
  243. package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
  244. package/dist/types/core/render/stages/index.d.ts +14 -0
  245. package/dist/types/core/state/AutosaveController.d.ts +63 -0
  246. package/dist/types/core/state/IStatePersistence.d.ts +59 -0
  247. package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
  248. package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
  249. package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
  250. package/dist/types/core/state/StateCodec.d.ts +75 -0
  251. package/dist/types/core/state/index.d.ts +6 -0
  252. package/dist/types/core/types.d.ts +511 -226
  253. package/dist/types/react/OpenGrid.d.ts +54 -0
  254. package/dist/types/react/index.d.ts +5 -0
  255. package/dist/types/realtime/index.d.ts +1 -0
  256. package/dist/types/vue/index.d.ts +5 -0
  257. package/dist/types/vue/types.d.ts +35 -0
  258. package/package.json +112 -111
@@ -2,6 +2,16 @@
2
2
  * XmlConverter — XML ↔ 그리드 데이터 양방향 변환 유틸리티.
3
3
  * / XmlConverter — bidirectional XML ↔ grid-data conversion utility.
4
4
  *
5
+ * SAP·레거시 백엔드처럼 JSON이 아니라 XML로 응답을 주는 시스템과 그리드를 연결할 때 쓴다.
6
+ * 데이터가 흐르는 방향은 두 가지다: **입력**(서버가 준 XML 문자열) → **변환**(태그/속성을
7
+ * 파싱해 행 객체 배열로 정규화) → **출력**(그리드가 바로 `setData()`에 넣을 수 있는
8
+ * `Record<string, any>[]`). 반대 방향(그리드에서 편집한 데이터 → XML)도 동일한 변환기로 처리한다.
9
+ * / Use this to bridge the grid with systems that answer in XML instead of JSON — SAP and other
10
+ * legacy backends being the common case. Data flows in two directions: **input** (the XML string
11
+ * a server returned) → **transform** (tags/attributes parsed and normalized into row objects) →
12
+ * **output** (a `Record<string, any>[]` the grid can pass straight to `setData()`). The reverse
13
+ * direction (grid-edited data → XML) goes through the same converter.
14
+ *
5
15
  * 지원 포맷 / Supported formats:
6
16
  * A. Element 방식 <row><name>홍길동</name></row>
7
17
  * B. Attribute 방식 <row name="홍길동" />
@@ -70,6 +80,10 @@ export declare class XmlConverter {
70
80
  * @param options - 파싱 옵션 / Parse options
71
81
  * @returns 행 객체 배열 / Array of row objects
72
82
  * @throws XML 파싱 오류 시 Error 발생 / Throws an Error on XML parse failure
83
+ * @example
84
+ * // <rows><row><name>Kim</name><dept>Sales</dept></row></rows>
85
+ * const rows = XmlConverter.parse(xmlText);
86
+ * grid.setData(rows); // → [{ name: 'Kim', dept: 'Sales' }]
73
87
  */
74
88
  static parse(xml: string, options?: XmlParseOptions): Record<string, any>[];
75
89
  /**
@@ -78,12 +92,24 @@ export declare class XmlConverter {
78
92
  * @param data - 직렬화할 행 배열 / Row array to serialize
79
93
  * @param options - 직렬화 옵션 / Serialize options
80
94
  * @returns XML 문자열 / XML string
95
+ * @example
96
+ * // 그리드에서 수정된 행을 서버로 보낼 때 / Sending grid-edited rows back to a server
97
+ * const xml = XmlConverter.stringify(grid.getEditedRows(), { mode: 'attribute' });
81
98
  */
82
99
  static stringify(data: Record<string, any>[], options?: XmlStringifyOptions): string;
83
100
  /**
84
101
  * SAP BAPI XML 응답을 파싱하여 { header, items, returns } 구조로 반환.
85
102
  * / Parse a SAP BAPI XML response into a { header, items, returns } structure.
86
103
  *
104
+ * SAP BAPI 응답은 "행이 죽 나열된" 단순 목록이 아니라 문서 헤더(DOCUMENTHEADER)·라인
105
+ * 아이템(ACCOUNTGL 등)·처리 결과 메시지(RETURN)가 뒤섞여 한 응답 안에 들어온다. 그래서 범용
106
+ * `parse()`(단일 rowTag 기준)로는 못 풀고, 이 메서드가 세 부분을 각각 알아서 찾아 분리해 준다.
107
+ * 라인 아이템은 그리드에 그대로 `setData()`할 수 있는 배열로 나온다.
108
+ * / A SAP BAPI response isn't a flat list of rows — a document header (DOCUMENTHEADER), line
109
+ * items (e.g. ACCOUNTGL), and result messages (RETURN) are all mixed into one response. The
110
+ * generic `parse()` (which assumes a single rowTag) can't untangle that, so this method locates
111
+ * and splits all three parts for you. `items` comes out ready to hand to the grid's `setData()`.
112
+ *
87
113
  * 지원 패턴 / Supported patterns:
88
114
  * <DOCUMENTHEADER>...</DOCUMENTHEADER>
89
115
  * <ACCOUNTGL><ITEM>...</ITEM></ACCOUNTGL>
@@ -91,14 +117,28 @@ export declare class XmlConverter {
91
117
  *
92
118
  * @param xml - SAP BAPI XML 응답 문자열 / SAP BAPI XML response string
93
119
  * @returns 파싱 결과 구조 / Parsed result structure
120
+ * @example
121
+ * const { header, items, returns } = XmlConverter.parseSap(sapResponseXml);
122
+ * grid.setData(items);
123
+ * if (returns.some(r => r.TYPE === 'E')) console.error('SAP 오류 응답', returns);
94
124
  */
95
125
  static parseSap(xml: string): SapParseResult;
96
126
  /**
97
127
  * BAPI 페이로드 객체를 SAP XML 형식으로 직렬화. sapGenPayload() 결과 또는 단일 document 객체를 받음.
98
128
  * / Serialize a BAPI payload object into SAP XML. Accepts a sapGenPayload() result or a single document object.
99
129
  *
130
+ * `parseSap()`의 반대 방향 — 그리드에서 만든/편집한 전표 데이터를 SAP가 받을 수 있는
131
+ * BAPI 호출용 XML로 만들 때 쓴다. / The reverse of `parseSap()` — use this to turn
132
+ * grid-built/edited document data into the BAPI-call XML that SAP expects.
133
+ *
100
134
  * @param payload - BAPI 페이로드 객체 / BAPI payload object
101
135
  * @returns SAP XML 문자열 / SAP XML string
136
+ * @example
137
+ * const xml = XmlConverter.stringifySap({
138
+ * BAPI_FUNCTION: 'BAPI_ACC_DOCUMENT_POST',
139
+ * DOCUMENTHEADER: { COMP_CODE: '1000', DOC_DATE: '20260101' },
140
+ * ACCOUNTGL: grid.getData(),
141
+ * });
102
142
  */
103
143
  static stringifySap(payload: {
104
144
  BAPI_FUNCTION?: string;
@@ -0,0 +1,103 @@
1
+ import { FormatResult } from '../format/types.js';
2
+ import { MessageParams } from '../i18n/types.js';
3
+ import { A11yNodeKey, AriaIntent } from './AriaIntent.js';
4
+ import { FocusRequest, IAriaRenderPort } from './ports.js';
5
+ import { Announcement, LiveRegionController } from './LiveRegionController.js';
6
+ /** 사각 선택 영역(행/열 1-based inclusive 아님 — 모델 0-based 좌표). / A rectangular selection (0-based model coords). */
7
+ export interface A11ySelectionRect {
8
+ readonly r1: number;
9
+ readonly c1: number;
10
+ readonly r2: number;
11
+ readonly c2: number;
12
+ }
13
+ /**
14
+ * 모델 상태 스냅샷(어댑터가 읽는 읽기전용 뷰). DD-02 선택·DD-09 상태·DD-05 정렬/필터에서 투영.
15
+ * / A read-only snapshot of model state consumed by the adapter (projected from DD-02/09/05).
16
+ */
17
+ export interface A11yModelView {
18
+ /** 논리 전체 행/열 수(가상화 무관, aria-rowcount/colcount). / Logical row/col counts. */
19
+ readonly rows: number;
20
+ readonly cols: number;
21
+ /** 그리드 컨테이너 라벨(선택). / Grid container label (optional). */
22
+ readonly label?: string;
23
+ readonly activeCell?: {
24
+ row: number;
25
+ col: number;
26
+ };
27
+ readonly selection: ReadonlyArray<A11ySelectionRect>;
28
+ readonly sort?: {
29
+ field: string;
30
+ dir: 'asc' | 'desc' | 'none';
31
+ colKey?: A11yNodeKey;
32
+ };
33
+ /** 검증 실패 셀(aria-invalid). / Cells that failed validation (aria-invalid). */
34
+ readonly invalidCells: ReadonlySet<A11yNodeKey>;
35
+ }
36
+ /** 문화·메시지 컨텍스트 포트(느슨 결합 — i18n/LocaleContext 구현). / Culture/message context port (loose coupling). */
37
+ export interface ILocaleContextPort {
38
+ /** i18n 메시지 해석. / i18n message resolution. */
39
+ t(key: string, params?: MessageParams): string;
40
+ }
41
+ /** `AccessibilityAdapter` 의존성. / AccessibilityAdapter dependencies. */
42
+ export interface AccessibilityAdapterDeps {
43
+ /** DOM 물질화 포트(DD-03/14 역주입). / DOM materialization port. */
44
+ readonly render: IAriaRenderPort;
45
+ /** 공지 병합 파이프. / Announcement-merge pipe. */
46
+ readonly live: LiveRegionController;
47
+ /** 문화·메시지 컨텍스트(선택 — 미주입 시 공지 messageKey 를 컨트롤러가 해석). / Culture/message context (optional). */
48
+ readonly locale?: ILocaleContextPort;
49
+ }
50
+ /** `'cell:<row>:<col>'` 노드 키 조립. / Build a `'cell:<row>:<col>'` node key. */
51
+ export declare function cellKey(row: number, col: number): A11yNodeKey;
52
+ /**
53
+ * 모델→aria 투영의 단일 소유자(불변식 1). 위젯은 이 어댑터 외의 aria 산출 경로를 갖지 않는다.
54
+ * / Sole owner of model→aria projection (invariant 1). No aria path exists outside this adapter.
55
+ */
56
+ export declare class AccessibilityAdapter {
57
+ private readonly _render;
58
+ private readonly _live;
59
+ private readonly _locale;
60
+ private readonly _reprojectors;
61
+ private _localeEpoch;
62
+ constructor(deps: AccessibilityAdapterDeps);
63
+ /** 그리드 컨테이너 골격 투영(role=grid·rowcount·colcount·label). 초기/구조변경 시. / Project the grid skeleton. */
64
+ projectGrid(view: A11yModelView): AriaIntent;
65
+ /**
66
+ * 셀 1개 aria 투영(gridcell·rowindex·colindex·selected·invalid·label=display). 핫패스.
67
+ * aria-label 은 `display.aria ?? display.text`(마스킹 후) — raw 미참조(불변식 2).
68
+ * / Project one cell. aria-label = `display.aria ?? display.text` (masked); raw never referenced.
69
+ */
70
+ projectCell(key: A11yNodeKey, view: A11yModelView, display: FormatResult): AriaIntent;
71
+ /** 정렬 헤더 aria-sort 투영 + "정렬" 공지(병합·중복억제는 컨트롤러). / Project aria-sort + enqueue a 'sort' announcement. */
72
+ projectSort(view: A11yModelView): void;
73
+ /**
74
+ * 선택 변경 "r1행 c1열 ~ r2행 c2열, n셀 선택" 요약 공지(디바운스·병합).
75
+ * `range.selectionAnnounce` 카탈로그는 5파라미터(r1/c1/r2/c2/n)를 요구하므로, 전 선택
76
+ * 사각형의 **경계 상자**(1-based)를 산출해 함께 전달한다(누락 시 깨진 낭독 방지 — DD-12 QA).
77
+ * 선택이 비면 요약 공지를 내지 않는다.
78
+ * / Enqueue a debounced/coalesced "from r1c1 to r2c2, n cells" summary. Supplies the 1-based
79
+ * bounding box of all selection rects (the catalog key needs 5 params). No-op when empty.
80
+ */
81
+ projectSelection(view: A11yModelView): void;
82
+ /**
83
+ * 오류 발생 시 aria-invalid + assertive 공지 + 포커스 이관 요청(REQ-T9-831).
84
+ * / On error: aria-invalid + assertive announcement + focus-transfer request.
85
+ */
86
+ projectError(key: A11yNodeKey, messageKey: string, params?: MessageParams): FocusRequest;
87
+ /** 위젯이 부르는 유일한 공지 진입점(직접 라이브영역 접근 대체, 불변식 4). / The sole announcement entry point for widgets. */
88
+ announce(a: Announcement): void;
89
+ /**
90
+ * 로케일 전환 시 aria 재투영 훅 발화 + 캐시 무효화 에폭 증가(DD-09 오케스트레이션이 호출).
91
+ * / On locale change: fire re-projection hooks and bump the invalidation epoch (called by DD-09).
92
+ */
93
+ onLocaleChange(): void;
94
+ /** 로케일 전환 시 재투영할 콜백 등록(가시 표면 재산출 배선). 해제 함수 반환. / Register a re-projection callback. */
95
+ onReproject(fn: () => void): () => void;
96
+ /** 로케일 무효화 에폭(관측·테스트용). / Locale-invalidation epoch (observability/tests). */
97
+ localeEpoch(): number;
98
+ }
99
+ /** `'cell:<row>:<col>'` 파싱. 형식 불일치 시 null(never-throw). / Parse `'cell:<row>:<col>'`; null on mismatch. */
100
+ export declare function parseCellKey(key: A11yNodeKey): {
101
+ row: number;
102
+ col: number;
103
+ } | null;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * aria 롤(WAI-ARIA grid 패턴). 렌더/호스트가 `el.role` 로 물질화한다.
3
+ * / ARIA roles (WAI-ARIA grid pattern). The renderer/host materializes them via `el.role`.
4
+ */
5
+ export type AriaRole = 'grid' | 'row' | 'gridcell' | 'columnheader' | 'rowheader' | 'treegrid' | 'button' | 'dialog' | 'listbox' | 'option' | 'menu' | 'menuitem' | 'img';
6
+ /**
7
+ * 요소 식별자 — 모델 좌표(어떤 셀/행/오버레이)를 렌더 요소로 해소하기 위한 안정 문자열 키.
8
+ * 예: `'cell:42:3'` · `'overlay:filter'` · `'chart:sales'` · `'grid'`.
9
+ * / Node key — a stable string resolving a model coordinate (cell/row/overlay) to a render element.
10
+ */
11
+ export type A11yNodeKey = string;
12
+ /** AriaIntent.attrs 의 허용 속성 키(aria-* + 소수의 비-aria 접근성 속성). / Allowed attribute keys. */
13
+ export type AriaAttrKey = `aria-${string}` | 'tabindex' | 'lang' | 'dir' | 'role';
14
+ /**
15
+ * 한 DOM 요소에 투영할 aria "의도" — 속성 이름→값의 불변 맵(헤드리스 값객체).
16
+ * 렌더(DD-03)/호스트(DD-14)가 이 맵을 `setAttribute` 로 물질화한다. **값 `undefined` = 속성 제거**.
17
+ * / An immutable name→value map of aria attributes to project onto one element (headless VO).
18
+ * The renderer/host materializes it via setAttribute; a value of `undefined` = remove the attribute.
19
+ */
20
+ /** aria/비-aria 접근성 속성 맵(부분 — 존재하는 키만). 값 `undefined`=속성 제거. / Partial attribute map; value `undefined`=remove. */
21
+ export type AriaAttrs = Partial<Record<`aria-${string}` | 'tabindex' | 'lang' | 'dir', string | undefined>>;
22
+ export interface AriaIntent {
23
+ /** 롤(선택). 미지정 = 롤 미변경. / Role (optional); absent = role unchanged. */
24
+ readonly role?: AriaRole;
25
+ /** aria-* 속성 맵. 예 `{ 'aria-selected': 'true', 'aria-rowindex': '42' }`. `undefined`=제거. */
26
+ readonly attrs: Readonly<AriaAttrs>;
27
+ /** aria-label 소스가 마스킹 후 display 인지 표식(감사가 raw 유출을 검증, 불변식 2). / label is display-derived. */
28
+ readonly labelFromDisplay?: boolean;
29
+ }
30
+ /** AriaIntent 를 exactOptionalPropertyTypes 안전하게 조립. undefined 옵셔널 키는 넣지 않는다. / Assemble an AriaIntent safely. */
31
+ export declare function makeAriaIntent(attrs: AriaAttrs, opts?: {
32
+ role?: AriaRole;
33
+ labelFromDisplay?: boolean;
34
+ }): AriaIntent;
@@ -0,0 +1,64 @@
1
+ /** 상호작용 모드(단일 모델). 키 라우팅이 모드에 따라 분기. / Interaction mode; routing branches on it. */
2
+ export type InteractionMode = 'nav' | 'edit' | 'selectExtend';
3
+ /** 정규화 키 이벤트(헤드리스 — DOM KeyboardEvent 아님). 호스트 어댑터가 어댑팅. / Normalized key event (headless). */
4
+ export interface KeyStroke {
5
+ /** 'ArrowDown' | 'Enter' | 'F2' | 'a' … (DOM `KeyboardEvent.key`). */
6
+ readonly key: string;
7
+ readonly ctrl: boolean;
8
+ readonly shift: boolean;
9
+ readonly alt: boolean;
10
+ readonly meta: boolean;
11
+ /** IME 조합 중(가드 — 조합 중 커밋 금지). / Mid-IME-composition (guard: no commit while composing). */
12
+ readonly isComposing: boolean;
13
+ }
14
+ /** 키 바인딩 = (모드, 키패턴) → 커맨드 의도. 등록소가 충돌을 감지. / A keybinding; the registry detects conflicts. */
15
+ export interface KeyBinding {
16
+ readonly mode: InteractionMode | '*';
17
+ /** 'Ctrl+C' | 'ArrowDown' | 'Shift+ArrowDown'(수정자 순서 무관 — 정규화됨). / Pattern (modifier order-independent). */
18
+ readonly pattern: string;
19
+ /** DD-09 ICommand 로 라우팅(직접 변이 금지). / Routed to a DD-09 ICommand. */
20
+ readonly commandId: string;
21
+ /** 단축키 힌트/도움말(i18n 메시지 키). / Shortcut hint/help (i18n message key). */
22
+ readonly label?: string;
23
+ }
24
+ /** 수정자를 고정 순서(Ctrl+Alt+Shift+Meta)로 정렬해 정규 패턴 문자열 생성. / Canonicalize a pattern string. */
25
+ export declare function normalizePattern(pattern: string): string;
26
+ /** KeyStroke → 정규 패턴 문자열. / KeyStroke → canonical pattern string. */
27
+ export declare function strokeToPattern(k: KeyStroke): string;
28
+ /**
29
+ * 키보드 인터랙션 모델 — 모드·등록소·충돌·IME 가드·파리티 계측(REQ-T9-829).
30
+ * / Keyboard interaction model — mode, registry, conflicts, IME guard, parity metrics.
31
+ */
32
+ export declare class KeyboardInteractionModel {
33
+ /** 저장 키 = `${mode}|${normalizedPattern}`. / Storage key = `${mode}|${normalizedPattern}`. */
34
+ private _bindings;
35
+ /** 마우스로 도달 가능한 커맨드 인벤토리(파리티 분모). / Mouse-reachable command inventory (parity denominator). */
36
+ private _mouseCommands;
37
+ private _mode;
38
+ /** 바인딩 등록. 같은 (mode,pattern) 충돌 시 기존을 정직 반환(덮어쓰지 않음). / Register; returns any conflict. */
39
+ register(b: KeyBinding): {
40
+ conflict?: KeyBinding;
41
+ };
42
+ /** 마우스로 도달 가능한 커맨드를 파리티 인벤토리에 선언. / Declare a mouse-reachable command for the parity inventory. */
43
+ declareMouseCommand(commandId: string): void;
44
+ /**
45
+ * 키 → commandId 라우팅. 모드 전용 바인딩 우선, 없으면 `'*'`(전 모드). IME 조합 중 커밋 소거.
46
+ * / Route a key to a commandId. Mode-specific first, then `'*'`. Suppress commit during IME.
47
+ */
48
+ resolve(mode: InteractionMode, k: KeyStroke): string | null;
49
+ mode(): InteractionMode;
50
+ setMode(m: InteractionMode): void;
51
+ /**
52
+ * 마우스 인벤토리 대비 키보드 도달 커버리지(파리티 게이트 계측, REQ-T9-829 AC).
53
+ * / Keyboard-reach coverage vs the mouse inventory (parity gate; REQ-T9-829 AC).
54
+ */
55
+ parityReport(): {
56
+ mouseOnly: string[];
57
+ covered: number;
58
+ total: number;
59
+ };
60
+ /** 등록된 바인딩 수. / Number of registered bindings. */
61
+ size(): number;
62
+ private _guardIme;
63
+ private _storeKey;
64
+ }
@@ -0,0 +1,89 @@
1
+ import { MessageParams } from '../i18n/types.js';
2
+ import { IAriaRenderPort, LiveChannel } from './ports.js';
3
+ /**
4
+ * 공지 1건 — 텍스트가 아니라 (채널·우선순위·병합키·메시지키·페이로드) 구조. 병합·중복억제의 단위.
5
+ * / One announcement — a (channel, priority, mergeKey, messageKey, payload) structure, not raw text.
6
+ */
7
+ export interface Announcement {
8
+ /** 라이브영역 채널. polite=대기열 합류, assertive=즉시(오류). / Live channel. */
9
+ readonly channel: LiveChannel;
10
+ /** 우선순위(같은 채널 내 경합 시 큰 값 우선). 예 오류>편집완료>선택. / Priority (higher wins within a channel). */
11
+ readonly priority: number;
12
+ /**
13
+ * 병합키 — 같은 키의 연속 공지는 마지막 1건으로 병합(coalesce). 예 'sort'·'selection'·'bg-update'.
14
+ * 빠른 연속 정렬이 마지막 상태만 1회 발화되게 하는 핵심(REQ-T9-821 AC).
15
+ * / Merge key — successive announcements with the same key coalesce to the latest one.
16
+ */
17
+ readonly mergeKey: string;
18
+ /** i18n 메시지 키(컨트롤러가 `t()` 로 해석; 하드코딩 문자열 금지). / i18n message key (resolved via `t()`). */
19
+ readonly messageKey: string;
20
+ /** 보간 파라미터. / Interpolation params. */
21
+ readonly params?: MessageParams;
22
+ /** 배경(비-사용자) 변경 표식 — 편집/포커스 중 억제 대상(REQ-T9-822). / Background (non-user) change flag. */
23
+ readonly background?: boolean;
24
+ }
25
+ /** 주입 가능한 타이머 핸들·스케줄러(결정론 테스트용). / Injectable timer handle & scheduler (for deterministic tests). */
26
+ export type TimerHandle = unknown;
27
+ /** `LiveRegionController` 구성. render 는 필수 의존(교차리뷰 R: opts 전체 옵셔널 금지). / Controller config. */
28
+ export interface LiveRegionControllerOpts {
29
+ /** aria/공지 물질화 포트(필수). / aria/announcement materialization port (required). */
30
+ readonly render: IAriaRenderPort;
31
+ /** 메시지 해석기(하드코딩 금지). 미주입 시 키 원문 반환(항등). / Message resolver; defaults to identity (key). */
32
+ readonly t?: (key: string, params?: MessageParams) => string;
33
+ /** polite 디바운스(ms). 기본 150. / polite debounce (ms). Default 150. */
34
+ readonly debounceMs?: number;
35
+ /** assertive 즉시 발화(디바운스 우회, R1). 기본 true. / assertive immediate (bypass debounce). Default true. */
36
+ readonly assertiveImmediate?: boolean;
37
+ /** 타이머 예약(기본 setTimeout). / Schedule a timer (defaults to setTimeout). */
38
+ readonly schedule?: (fn: () => void, ms: number) => TimerHandle;
39
+ /** 타이머 취소(기본 clearTimeout). / Cancel a timer (defaults to clearTimeout). */
40
+ readonly cancel?: (h: TimerHandle) => void;
41
+ }
42
+ /**
43
+ * aria-live 경계의 문지기. 위젯의 직접 라이브영역 `textContent =` 접근을 대체한다(불변식 4).
44
+ * / Gatekeeper of the aria-live boundary; replaces direct live-region `textContent =` access.
45
+ */
46
+ export declare class LiveRegionController {
47
+ private readonly _render;
48
+ private readonly _t;
49
+ private readonly _debounceMs;
50
+ private readonly _assertiveImmediate;
51
+ private readonly _schedule;
52
+ private readonly _cancel;
53
+ /** polite 큐 — mergeKey 당 최신 1건(병합). / polite queue — latest per mergeKey. */
54
+ private _polite;
55
+ /** assertive 큐 — mergeKey 당 최신 1건. / assertive queue — latest per mergeKey. */
56
+ private _assertive;
57
+ private _timer;
58
+ private _userBusy;
59
+ private _disposed;
60
+ private _spoken;
61
+ private _coalesced;
62
+ private _dropped;
63
+ constructor(opts: LiveRegionControllerOpts);
64
+ /**
65
+ * 공지 투입 — 즉시 발화 아님(assertive-immediate 제외). 같은 mergeKey 는 큐에서 최신으로 대체(병합).
66
+ * / Enqueue — not spoken immediately (except assertive-immediate). Same mergeKey replaces (coalesce).
67
+ */
68
+ enqueue(a: Announcement): void;
69
+ /** 편집/포커스 중 배경 공지 억제 게이트(REQ-T9-822). false 전환 시 억제분 방출. / Suppress background while busy. */
70
+ setUserBusy(busy: boolean): void;
71
+ /**
72
+ * stale 공지 취소 — 큐에서 mergeKey 를 제거하고 dropped 계측(UC-2 E1: 정렬 대상 소멸).
73
+ * / Drop a stale announcement — remove the mergeKey from queues, count as dropped.
74
+ */
75
+ drop(mergeKey: string): void;
76
+ /** 계측: 발화 수·병합으로 삭제된 중복 수·drop 수(REQ-T9-821 중복률 0 계측 SSOT). / Metrics. */
77
+ metrics(): {
78
+ spoken: number;
79
+ coalesced: number;
80
+ dropped: number;
81
+ };
82
+ dispose(): void;
83
+ private _scheduleFlush;
84
+ /** 디바운스 만료 flush — 채널별 우선순위 정렬 → mergeKey 최신 1건씩 발화. / Debounced flush. */
85
+ private _flush;
86
+ private _flushAssertive;
87
+ private _flushPolite;
88
+ private _speak;
89
+ }
@@ -0,0 +1,36 @@
1
+ import { A11yNodeKey, AriaRole } from './AriaIntent.js';
2
+ import { FocusRequest } from './ports.js';
3
+ /** 오버레이 스택 프레임 — Esc/포커스복귀 계층. / An overlay stack frame — Esc / focus-return layer. */
4
+ export interface OverlayFrame {
5
+ /** 'dropdown' | 'contextmenu' | 'dialog' | 'tooltip' … / Overlay id. */
6
+ readonly id: A11yNodeKey;
7
+ /** 닫힘 시 포커스 복귀 대상(직전 층). / Focus-return target on close (the layer beneath). */
8
+ readonly returnFocusTo: A11yNodeKey;
9
+ /** dialog/menu/listbox… / Overlay role. */
10
+ readonly role: AriaRole;
11
+ /** 모달=포커스 트랩. / Modal = focus trap. */
12
+ readonly modal?: boolean;
13
+ }
14
+ /**
15
+ * 오버레이 스택 매니저 — Esc 는 최상위 1개만 닫고 포커스 직전 층 복귀. 복귀 대상 고아 시 폴백.
16
+ * / Overlay stack — Esc closes the topmost one and returns focus to the prior layer.
17
+ */
18
+ export declare class OverlayStack {
19
+ private _stack;
20
+ private readonly _fallback;
21
+ /** @param fallbackFocus 복귀 대상이 고아(스택에 부재)일 때 폴백(보통 그리드 컨테이너). / Fallback focus target. */
22
+ constructor(fallbackFocus?: A11yNodeKey);
23
+ push(f: OverlayFrame): void;
24
+ /**
25
+ * Esc 처리 — 최상위 1개 pop + returnFocusTo 로 FocusRequest. 나머지 스택 유지(REQ-T9-830 AC).
26
+ * 빈 스택이면 null(무동작 — 그리드가 Esc 를 선택 해제로 소비).
27
+ * / Esc — pop the topmost one, return a FocusRequest to returnFocusTo; keep the rest.
28
+ */
29
+ handleEsc(): FocusRequest | null;
30
+ /** 최상위 프레임(없으면 undefined). / Topmost frame (undefined when empty). */
31
+ top(): OverlayFrame | undefined;
32
+ /** 스택 깊이. / Stack depth. */
33
+ size(): number;
34
+ /** 전체 해제. / Clear the stack. */
35
+ dispose(): void;
36
+ }
@@ -0,0 +1,37 @@
1
+ import { RegisterOptions, RegisterResult } from '../extension/Registry.js';
2
+ /**
3
+ * 시각 인코딩 종류 → 텍스트 등가 provider. `describe` 는 시각 모델을 받아 낭독 문자열을 산출한다
4
+ * (헤드리스 순수 — DOM 미참조). 차트는 기존 `chart/a11y.chartAriaLabel` 을 감싸 등록할 수 있다.
5
+ * / A text-equivalent provider for a visual-encoding kind. `describe` produces the spoken string
6
+ * from a visual model (headless/pure). Charts can wrap `chart/a11y.chartAriaLabel`.
7
+ */
8
+ export interface VisualEquivProvider<M = unknown> {
9
+ /** 'chart' | 'sparkline' | 'databar' | 'delta' | 'iconset' … / Visual-encoding kind. */
10
+ readonly kind: string;
11
+ /** 시각 모델 → 낭독 텍스트. / Visual model → spoken text. */
12
+ describe(model: M): string;
13
+ }
14
+ /**
15
+ * 텍스트 등가 provider 등록 게이트. `TypedRegistry` 를 감싸 도메인 API 를 제공한다(재구현 0, C1).
16
+ * / The text-equivalent provider gate. Wraps `TypedRegistry` with a domain API (no reimplementation).
17
+ */
18
+ export declare class VisualEquivRegistry {
19
+ private readonly _reg;
20
+ private readonly _onWarn;
21
+ constructor(onWarn?: (msg: string) => void);
22
+ /** provider 등록(정책 적용, never-throw). / Register a provider (policy-applied, never-throw). */
23
+ register(provider: VisualEquivProvider, opts?: RegisterOptions): RegisterResult;
24
+ /** 등록 여부(게이트 판정 — 미등록 시 CI 실패의 근거). / Whether the kind is registered (CI-gate basis). */
25
+ has(kind: string): boolean;
26
+ get(kind: string): VisualEquivProvider | undefined;
27
+ /** 등록된 종류 목록. / Registered kinds. */
28
+ list(): string[];
29
+ /**
30
+ * 텍스트 등가 산출(never-throw). 미등록 종류면 빈 문자열 + 경고(침묵 금지·게이트 신호).
31
+ * / Produce the text equivalent (never-throw). Unregistered kind → empty string + warning.
32
+ */
33
+ describe(kind: string, model: unknown): string;
34
+ /** 플러그인 단위 일괄 해제. / Batch dispose by plugin. */
35
+ disposePlugin(pluginId: string): number;
36
+ dispose(): void;
37
+ }
@@ -0,0 +1,13 @@
1
+ export type { AriaRole, A11yNodeKey, AriaAttrKey, AriaAttrs, AriaIntent } from './AriaIntent.js';
2
+ export { makeAriaIntent } from './AriaIntent.js';
3
+ export type { FocusRequest, IAriaRenderPort, LiveChannel } from './ports.js';
4
+ export type { Announcement, LiveRegionControllerOpts, TimerHandle } from './LiveRegionController.js';
5
+ export { LiveRegionController } from './LiveRegionController.js';
6
+ export type { A11ySelectionRect, A11yModelView, ILocaleContextPort, AccessibilityAdapterDeps, } from './AccessibilityAdapter.js';
7
+ export { AccessibilityAdapter, cellKey, parseCellKey } from './AccessibilityAdapter.js';
8
+ export type { InteractionMode, KeyStroke, KeyBinding } from './KeyboardInteractionModel.js';
9
+ export { KeyboardInteractionModel, normalizePattern, strokeToPattern } from './KeyboardInteractionModel.js';
10
+ export type { OverlayFrame } from './OverlayStack.js';
11
+ export { OverlayStack } from './OverlayStack.js';
12
+ export type { VisualEquivProvider } from './VisualEquivRegistry.js';
13
+ export { VisualEquivRegistry } from './VisualEquivRegistry.js';
@@ -0,0 +1,24 @@
1
+ import { AriaIntent, A11yNodeKey } from './AriaIntent.js';
2
+ /** 포커스 이관 요청(헤드리스 — 실제 `el.focus()` 는 렌더/호스트). / Focus-transfer request (headless). */
3
+ export interface FocusRequest {
4
+ /** 포커스를 받을 노드. / Node to receive focus. */
5
+ readonly target: A11yNodeKey;
6
+ /** 이관 사유. / Transfer reason. */
7
+ readonly reason: 'error' | 'overlayClose' | 'restore';
8
+ /** 에디터 재진입 시 텍스트 선택 여부. / Whether to select text on editor re-entry. */
9
+ readonly selectText?: boolean;
10
+ }
11
+ /** 라이브영역 채널. polite=대기열 합류, assertive=즉시(오류). / Live-region channel. */
12
+ export type LiveChannel = 'polite' | 'assertive';
13
+ /**
14
+ * 헤드리스 코어가 aria/공지/포커스를 밀어내는 포트(DD-03/14 구현). 코어는 DOM 미참조.
15
+ * / The port the headless core pushes aria/announcements/focus through (implemented by DD-03/14).
16
+ */
17
+ export interface IAriaRenderPort {
18
+ /** 요소 해소 후 `AriaIntent` 를 setAttribute 로 물질화. / Resolve the element and materialize the intent. */
19
+ apply(key: A11yNodeKey, intent: AriaIntent): void;
20
+ /** 포커스 이관(오류/오버레이 복귀). / Transfer focus (error / overlay close / restore). */
21
+ requestFocus(req: FocusRequest): void;
22
+ /** 라이브영역에 해석된 공지 문자열 1건 물질화(`LiveRegionController` flush 전용). / Materialize one resolved announcement. */
23
+ announce(channel: LiveChannel, text: string): void;
24
+ }
@@ -0,0 +1,68 @@
1
+ import { ThemeMetaRegistry } from './ThemeMetaRegistry.js';
2
+ /** 조합 판정 등급. / Combination verdict grade. */
3
+ export type AppearanceVerdict = 'ok' | 'risky' | 'invalid';
4
+ /** 판정에 필요한 최소 메타 조회 표면(ISP — validate 는 테마 메타만 본다). / Minimal meta-lookup surface for validate. */
5
+ export interface AppearanceMetaLookup {
6
+ readonly theme: Pick<ThemeMetaRegistry, 'meta'>;
7
+ }
8
+ /** 판정 근거 1건(플래그·사유·해소 힌트). / One verdict finding (flag, reason, remedy hint). */
9
+ export interface AppearanceFinding {
10
+ /** 관련 축 쌍(또는 단일 축). / The axis pair (or single axis) involved. */
11
+ readonly axes: readonly string[];
12
+ readonly verdict: Exclude<AppearanceVerdict, 'ok'>;
13
+ /** 안정 코드(데모 배지·API 공유). / Stable code (shared by demo badge / API). */
14
+ readonly code: string;
15
+ /** 사람이 읽는 사유 + 해소 힌트. / Human-readable reason + remedy hint. */
16
+ readonly message: string;
17
+ }
18
+ /**
19
+ * Appearance — 4축 선택의 불변 값 애그리게이트. 동등성은 (theme,skin,density,texture) 튜플.
20
+ * / Appearance — immutable value aggregate of the 4-axis selection. Equality is the tuple.
21
+ *
22
+ * @example
23
+ * const a = new Appearance('dark', 'stitch');
24
+ * a.isDefault; // false
25
+ * a.with({ skin: 'sharp' }); // 새 인스턴스(불변)
26
+ */
27
+ export declare class Appearance {
28
+ readonly theme: string;
29
+ readonly skin: string;
30
+ readonly density: string;
31
+ readonly texture: string;
32
+ constructor(theme?: string, skin?: string, density?: string, texture?: string);
33
+ /** 값 동등성(참조 무관) — 캐시 키·무변경 감지. / Value equality (reference-free). */
34
+ equals(o: Appearance): boolean;
35
+ /** 한 축만 바꾼 새 인스턴스(불변). / A new instance with one axis changed (immutable). */
36
+ with(patch: Partial<{
37
+ theme: string;
38
+ skin: string;
39
+ density: string;
40
+ texture: string;
41
+ }>): Appearance;
42
+ /** 기본 외관인가(네 축 모두 default = byte-identical 락 경로). / Is this the default appearance? */
43
+ get isDefault(): boolean;
44
+ /** 값 튜플 문자열(캐시 키). / Tuple string (cache key). */
45
+ get key(): string;
46
+ /**
47
+ * 조합 판정 — 위험/불가 근거 목록(빈 배열 = ok). 테마 메타를 조회해 객관 집행한다(§3.5).
48
+ * / Combination verdict — findings (empty = ok). Objectively enforced via theme-meta lookup.
49
+ *
50
+ * @param reg - 테마 메타 조회 표면 / Theme-meta lookup surface
51
+ * @returns 위험/불가 findings(빈 배열이면 ok) / Findings (empty means ok)
52
+ */
53
+ validate(reg: AppearanceMetaLookup): AppearanceFinding[];
54
+ }
55
+ /** 최악 등급(findings 를 하나의 등급으로 접기 — 데모 배지용). / Worst grade over findings (fold to one badge). */
56
+ export declare function worstVerdict(findings: readonly AppearanceFinding[]): AppearanceVerdict;
57
+ /** 재질 프리셋 — 4축 튜플 + 서사(§9.6). / Material preset — 4-axis tuple + narrative. */
58
+ export interface MaterialPreset {
59
+ readonly id: string;
60
+ readonly appearance: Appearance;
61
+ /** 재질 서사(왜 이 조합이 물성을 만드는가). / Material narrative (why this combination makes a substance). */
62
+ readonly narrative: string;
63
+ }
64
+ /**
65
+ * 재질 서사 프리셋(§9.6) — 직교 축이 곱해져 태어나는 재질. 데모/문서·API 공유.
66
+ * / Material-narrative presets (§9.6) — substances born from orthogonal axes multiplied.
67
+ */
68
+ export declare const MATERIAL_PRESETS: ReadonlyArray<MaterialPreset>;