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
@@ -0,0 +1,40 @@
1
+ import { LocaleRegistry } from './LocaleRegistry.js';
2
+ import { LocaleMeta, LocaleMessageKey, MessageParams } from './types.js';
3
+ /**
4
+ * `LocaleMeta` 조회 파사드 — 값객체/포맷터/정렬/검색이 주입받는 단일 컨텍스트 포트.
5
+ * `LocaleRegistry.meta()` 를 감싸 문화별 Intl 객체를 메모이즈 제공한다.
6
+ * / The single culture-context port injected into VOs/formatters/sort/search. Wraps
7
+ * `LocaleRegistry.meta()` and memoizes per-locale Intl objects.
8
+ */
9
+ export declare class LocaleContextProvider {
10
+ private readonly _registry;
11
+ private readonly _subscribers;
12
+ private _collator;
13
+ private _numberFmt;
14
+ private _dateTimeFmt;
15
+ /** 메모 무효화 기준 — 활성 로케일. 변경 감지 시 캐시 clear. / Memo-invalidation basis: active locale. */
16
+ private _memoLocale;
17
+ constructor(registry: LocaleRegistry);
18
+ /** 활성 로케일 문화 컨텍스트(폴백 병합 후). / Active-locale culture context (after fallback merge). */
19
+ meta(): LocaleMeta;
20
+ /** 정렬/검색 tie-break 콜레이터(메모이즈). collation 규칙은 `LocaleMeta.collation` 에서 조회. / Collator (memoized). */
21
+ collator(): Intl.Collator;
22
+ /** 숫자 포맷(메모이즈). numbering/currency 기본값은 `LocaleMeta` 에서 보강. / NumberFormat (memoized). */
23
+ numberFormat(opts?: Intl.NumberFormatOptions): Intl.NumberFormat;
24
+ /** 날짜/시간 포맷(메모이즈). calendar/timeZone 기본값은 `LocaleMeta` 에서 보강. / DateTimeFormat (memoized). */
25
+ dateTimeFormat(opts?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
26
+ /** i18n 메시지 해석(어댑터·공지가 하드코딩 대신 이걸로). / Message resolution. */
27
+ t(key: LocaleMessageKey | string, params?: MessageParams): string;
28
+ /**
29
+ * 활성 로케일 전환의 정본 경로 — 레지스트리 전환 + 메모 무효화 + 구독자 통지(어댑터 onLocaleChange 배선).
30
+ * / The canonical active-locale switch: registry.setActive + memo invalidation + notify subscribers.
31
+ */
32
+ setLocale(id: string): void;
33
+ /** 활성 로케일 변경 구독. 해제 함수 반환. / Subscribe to active-locale change; returns an unsubscribe fn. */
34
+ onChange(cb: () => void): () => void;
35
+ /** 외부에서 레지스트리를 직접 전환한 경우의 수동 메모 갱신·통지. / Manual refresh when the registry changed externally. */
36
+ refresh(): void;
37
+ private _syncMemo;
38
+ private _invalidate;
39
+ private _notify;
40
+ }
@@ -2,17 +2,31 @@
2
2
  export type MessageParams = Readonly<Record<string, string | number>>;
3
3
  /**
4
4
  * 메시지 값: 평문 문자열('{name}' 보간) 또는 함수(복수형·조사 등 "문법이 데이터인" 케이스의 탈출구).
5
- * ICU/CLDR 복수 엔진은 zero-dependency 정체성 때문에 도입하지 않는다(규칙은 로케일 파일에 둔다).
5
+ * 왜 함수까지 허용하나: "사과 1개/사과 2개"처럼 복수형 규칙이 언어마다 다른데, ICU/CLDR 같은
6
+ * 범용 복수형 엔진을 넣으면 zero-dependency 원칙이 깨진다. 그래서 그 규칙 자체를 로케일 파일
7
+ * 안의 함수로 옮겨, 각 언어가 자기 문법을 직접 결정하게 한다.
6
8
  * / A message value: a plain string ('{name}' interpolation) or a function (escape hatch for
7
- * plurals/particles where "grammar is data"). No ICU/CLDR plural engine (zero-dependency).
9
+ * plurals/particles where "grammar is data"). Why allow a function at all: plural rules differ
10
+ * per language, and pulling in a general ICU/CLDR plural engine would break the
11
+ * zero-dependency principle — so the rule itself moves into a function inside the locale file,
12
+ * letting each language own its own grammar.
13
+ *
14
+ * @example
15
+ * const countBadge: MessageValue = (p) => `${p.n}건`; // 한국어는 복수형이 없음 / Korean has no plural form
8
16
  */
9
17
  export type MessageValue = string | ((params: MessageParams) => string);
10
18
  /**
11
- * 로케일 메시지 카탈로그(2단 중첩, 최상위 섹션 = 소비 UI 표면). 파라미터를 받는 값만 `MessageValue`
12
- * (함수형 복수 허용), 정적 라벨은 `string`. 내장 ko 가 SSOT 이며 en 은 동일 키 집합을 갖는다.
13
- * / The locale message catalog (2-level nested, top-level section = consuming UI surface). Only
14
- * parameterized entries are `MessageValue` (allowing plural functions); static labels are
15
- * `string`. Built-in ko is the SSOT; en carries the same key set.
19
+ * 로케일 메시지 카탈로그 전체 형태(2단 중첩, 최상위 섹션 = 소비하는 UI 표면 — 필터 패널, 찾기
20
+ * 바 등). 새 언어를 추가하거나 커스텀 로케일을 만들 때 이 타입에 맞춰 객체를 작성하면 된다.
21
+ * 파라미터를 받는 값만 `MessageValue`(함수형 복수 허용), 정적 라벨은 `string`. 내장 ko 가
22
+ * 단일 진실 공급원(SSOT)이며 en 은 동일 키 집합을 갖는다 — 새 언어도 이 키 집합을 채우면(또는
23
+ * 부분만 채우고 `register()` 의 `missingKeys` 로 진행률을 보면) 된다.
24
+ * / Shape of a full locale message catalog (2-level nested; the top-level section is the
25
+ * consuming UI surface — filter panel, find bar, etc.). When adding a new language or building a
26
+ * custom locale, shape your object to satisfy this type. Only parameterized entries are
27
+ * `MessageValue` (allowing plural functions); static labels are `string`. Built-in ko is the
28
+ * single source of truth (SSOT), and en carries the same key set — fill the same keys for a new
29
+ * language (or fill partially and track progress via `register()`'s `missingKeys`).
16
30
  */
17
31
  export interface LocaleMessages {
18
32
  /** 우클릭 컨텍스트 메뉴 라벨. / Right-click context-menu labels. */
@@ -226,15 +240,39 @@ export interface LocaleMessages {
226
240
  printSummary: MessageValue;
227
241
  };
228
242
  }
229
- /** 부분 오버라이드(2단 딥머지, 카탈로그 위). / Partial override (2-level deep-merge over the catalog). */
243
+ /**
244
+ * `register()`/`extend()` 에 일부 섹션·키만 넘길 때 쓰는 타입(2단 딥머지로 카탈로그 위에 얹힌다).
245
+ * 전체 언어를 다 채우지 않아도 로케일을 등록할 수 있게 해 준다.
246
+ * / Type used when passing only some sections/keys to `register()`/`extend()` (layered onto the
247
+ * catalog via 2-level deep-merge) — lets you register a locale before every key is translated.
248
+ */
230
249
  export type PartialLocaleMessages = {
231
250
  [S in keyof LocaleMessages]?: Partial<LocaleMessages[S]>;
232
251
  };
233
- /** dot-key 유니온(`'filter.apply'` 등) — 오타를 컴파일 에러화. / Dot-key union (e.g. `'filter.apply'`) — typos become compile errors. */
252
+ /**
253
+ * `t()` 에 넘길 수 있는 모든 유효 키의 유니온 타입(예: `'filter.apply'`). 왜 필요한가:
254
+ * `t('filter.aply')` 처럼 오타가 나면 이 타입이 없을 때는 런타임에야 "키 없음" 경고로 드러난다 —
255
+ * 유니온으로 묶어 두면 컴파일 타임에 바로 에러가 난다.
256
+ * / Union of every key valid for `t()` (e.g. `'filter.apply'`). Why this exists: without it, a typo
257
+ * like `t('filter.aply')` only surfaces as a runtime "unknown key" warning; unioning the keys
258
+ * turns it into a compile-time error instead.
259
+ */
234
260
  export type LocaleMessageKey = {
235
261
  [S in keyof LocaleMessages]: `${S & string}.${keyof LocaleMessages[S] & string}`;
236
262
  }[keyof LocaleMessages];
237
- /** 로케일 포맷 파라미터(문자열 아님): Intl 태그·방향·수출 폰트. / Locale format params (non-string): Intl tag, direction, export font. */
263
+ /**
264
+ * 문화(지역) 규칙을 담는 단일 컨텍스트 타입. 통화·날짜·정렬·검색 등 "문화마다 다른 규칙"을
265
+ * 여러 군데서 각자 조회하게 두면, 그리드와 내보내기(export) 가 서로 다른 로케일을 참조하는
266
+ * 불일치가 생길 수 있다 — 그래서 값객체·포맷터·정렬·검색이 문화 정보를 **오직 이 타입을
267
+ * 통해서만** 조회하도록 강제한다(단일 진실 공급원). 아래 확장 필드는 전부 추가·옵셔널이라
268
+ * 기존 3필드를 쓰던 코드는 그대로 동작한다(semver 하위 호환).
269
+ * / A single context type carrying culture (locale) rules. Letting currency/date/sort/search each
270
+ * look up their own culture rules independently could let the grid and the export path silently
271
+ * disagree on locale — so value objects, formatters, sort, and search look up culture
272
+ * information **only through this type** (single source of truth). The extension fields below
273
+ * are all additive and optional, so code written against the original 3 fields keeps working
274
+ * unchanged (semver-compatible).
275
+ */
238
276
  export interface LocaleMeta {
239
277
  /** BCP-47 태그(toLocaleString/lang/인쇄 템플릿용). 예 'ko-KR'. / BCP-47 tag (for toLocaleString/lang/print template). e.g. 'ko-KR'. */
240
278
  readonly intlLocale: string;
@@ -242,8 +280,26 @@ export interface LocaleMeta {
242
280
  readonly dir?: 'ltr' | 'rtl';
243
281
  /** Excel 내보내기 기본 폰트. / Default font for Excel export. */
244
282
  readonly exportFont?: string;
283
+ /** 기본 통화코드(ISO 4217) — Money 미지정 시 폴백. / Default currency (ISO 4217). */
284
+ readonly currency?: string;
285
+ /** 달력 체계(gregory/japanese/…) — Intl.DateTimeFormat 위임. / Calendar system. */
286
+ readonly calendar?: string;
287
+ /** 콜레이션 규칙(정렬 tie-break·대소문자·발음구별) — Intl.Collator 옵션. / Collation for sort/search. */
288
+ readonly collation?: {
289
+ readonly sensitivity?: 'base' | 'accent' | 'case' | 'variant';
290
+ readonly numeric?: boolean;
291
+ readonly caseFirst?: 'upper' | 'lower' | 'false';
292
+ };
293
+ /** 숫자 체계(latn/arab/…). / Numbering system. */
294
+ readonly numbering?: string;
295
+ /** 시간대. / Time zone. */
296
+ readonly timeZone?: string;
297
+ /** 주 시작요일(0=일·1=월·6=토). / First day of week. */
298
+ readonly firstDayOfWeek?: 0 | 1 | 6;
299
+ /** 텍스트팽창 계수(레이아웃 예산 힌트·의사로케일). 예 de≈1.35, 의사로케일=1.4(REQ-T9-817). / Text-expansion factor. */
300
+ readonly textExpansion?: number;
245
301
  }
246
- /** register() 결과 — 누락 키 정직 신호(막지 않음). / register() result — honest missing-key signal (never blocks). */
302
+ /** register() 결과 — 누락 키 신호(막지 않음). / register() result — missing-key signal (never blocks). */
247
303
  export interface LocaleRegisterResult {
248
304
  readonly missingKeys: string[];
249
305
  }
@@ -1,9 +1,11 @@
1
- /** 모든 큐레이션 글리프 공통 viewBox(Bootstrap Icons 16px 그리드). */
1
+ /** 모든 큐레이션 글리프 공통 viewBox(Bootstrap Icons 16px 그리드). / Common viewBox for all curated glyphs (Bootstrap Icons 16px grid). */
2
2
  export declare const ICON_VIEWBOX = "0 0 16 16";
3
3
  /**
4
4
  * symbolId → SVG 내부 마크업(<path>/<g>). Bootstrap Icons v1.13.1(MIT)에서 큐레이션.
5
5
  * `eye-reveal` 는 예외(기존 마스킹 셀 커스텀 글리프, 행동 보존용).
6
+ * / symbolId → inner SVG markup (<path>/<g>). Curated from Bootstrap Icons v1.13.1 (MIT).
7
+ * `eye-reveal` is the exception (existing masking-cell custom glyph, kept for behavior parity).
6
8
  */
7
9
  export declare const BOOTSTRAP_ICONS: Readonly<Record<string, string>>;
8
- /** 큐레이션에 포함된 symbol 개수(테스트/디버깅용). `eye-reveal`(커스텀 1) 포함. */
10
+ /** 큐레이션에 포함된 symbol 개수(테스트/디버깅용). `eye-reveal`(커스텀 1) 포함. / Count of curated symbols (for tests/debugging), including `eye-reveal` (1 custom). */
9
11
  export declare const BOOTSTRAP_ICON_COUNT: number;
@@ -0,0 +1,64 @@
1
+ /** 대비 검사 쌍 — 전경/배경 + 요구 임계. / A contrast pair — fg/bg + required threshold. */
2
+ export interface ContrastPair {
3
+ readonly fg: string;
4
+ readonly bg: string;
5
+ readonly kind: 'bodyText' | 'largeText' | 'uiComponent' | 'graphic';
6
+ readonly context: {
7
+ theme: string;
8
+ skin: string;
9
+ state: string;
10
+ tokenId: string;
11
+ };
12
+ }
13
+ /** WCAG 임계: bodyText ≥4.5, large/ui/graphic ≥3.0. 의도적 고정(표준 SSOT). / WCAG minimums. */
14
+ export declare const CONTRAST_MIN: Readonly<Record<ContrastPair['kind'], number>>;
15
+ /** 단일 쌍 판정. / A single pair verdict. */
16
+ export interface ContrastVerdict {
17
+ readonly pair: ContrastPair;
18
+ readonly ratio: number;
19
+ readonly required: number;
20
+ readonly status: 'pass' | 'fail';
21
+ }
22
+ /**
23
+ * 외관 토큰 스냅샷 입력(헤드리스 계약). DD-11 `ResolvedAppearanceSnapshot` 구현 시 대체 import.
24
+ * 감사기는 토큰 값을 만들지 않고, 스냅샷이 선언한 대비 관련 쌍을 순회·판정만 한다.
25
+ * / Appearance token snapshot input (headless contract). To be replaced by DD-11's
26
+ * `ResolvedAppearanceSnapshot` import once implemented.
27
+ */
28
+ export interface AppearanceSnapshotLike {
29
+ readonly theme: string;
30
+ readonly skin: string;
31
+ readonly state: string;
32
+ /** 토큰 id → 결정된 색(hex/rgb). / token id → resolved color. */
33
+ readonly colors: Readonly<Record<string, string>>;
34
+ /** 감사 대상 대비 쌍(전경 토큰·배경 토큰·종류). / contrast pairs to audit. */
35
+ readonly pairs: ReadonlyArray<{
36
+ readonly fgToken: string;
37
+ readonly bgToken: string;
38
+ readonly kind: ContrastPair['kind'];
39
+ }>;
40
+ }
41
+ /**
42
+ * 대비 감사기 — 순수 계산(DOM 무관, 헤드리스).
43
+ * CRC: 색쌍→대비비→판정 | 협력: DD-11(토큰 스냅샷 입력)·ReleaseGate(a11y 게이트)·palette.ts(산식).
44
+ * 불변식: 미달 1건이라도 있으면 실패. 산식 재구현 0 — palette.contrastRatio 위임.
45
+ * / Contrast auditor — pure computation (DOM-agnostic, headless).
46
+ */
47
+ export declare class ContrastAuditor {
48
+ /**
49
+ * 테마×스킨×상태 스냅샷에서 색쌍 인벤토리 생성(누락 토큰=미커버). 결정론 순서.
50
+ * / Build a pair inventory from snapshots (missing token = uncovered). Deterministic order.
51
+ */
52
+ enumeratePairs(snapshots: readonly AppearanceSnapshotLike[]): ContrastPair[];
53
+ /**
54
+ * 스냅샷의 대비 쌍 중 토큰 값이 누락된 항목 지목(미커버=완결성 위반, TX-830).
55
+ * / Report pairs whose token colors are missing (uncovered = completeness violation).
56
+ */
57
+ coverageGaps(snapshots: readonly AppearanceSnapshotLike[]): string[];
58
+ /** WCAG 2.2 상대휘도 대비비 = palette.contrastRatio 위임(자체 산식 없음). / Delegated ratio. */
59
+ ratio(fg: string, bg: string): number;
60
+ /** 전수 판정. / Audit every pair. */
61
+ audit(pairs: readonly ContrastPair[]): ContrastVerdict[];
62
+ /** 미달 목록만 필터(리포트용). / Filter to failures only (for reporting). */
63
+ failures(verdicts: readonly ContrastVerdict[]): ContrastVerdict[];
64
+ }
@@ -0,0 +1,68 @@
1
+ /** 주입 clock — 프로덕션=시스템시계, 테스트=고정/전진 가능한 가짜시계. / Injected clock. */
2
+ export interface IClock {
3
+ now(): number;
4
+ raf(cb: (t: number) => void): number;
5
+ cancelRaf(id: number): void;
6
+ }
7
+ /** 주입 RNG — 시드 기반 결정론 난수(테스트), 프로덕션=암묵 시드. / Injected RNG. */
8
+ export interface IRandom {
9
+ next(): number;
10
+ seed(s: number): void;
11
+ }
12
+ /**
13
+ * 결정론 커널 — 비결정성 소스의 단일 주입 지점.
14
+ * CRC: 시간/난수/idle-flush 통제 | 협력: 렌더 파이프라인·차트가 DI 로 소비.
15
+ * 불변식: 동일 seed·동일 clock 스텝 → 동일 출력. whenIdle 는 보류 flush 후 resolve.
16
+ * / Deterministic kernel — the single injection point for non-determinism.
17
+ */
18
+ export declare class DeterminismKernel {
19
+ readonly clock: IClock;
20
+ readonly random: IRandom;
21
+ constructor(clock: IClock, random: IRandom);
22
+ /**
23
+ * 모든 보류 작업(raf 렌더·이미지 로드·캔버스 draw·레이아웃 반영) 완료 후 resolve.
24
+ * 시각회귀 스위트가 캡처 직전 호출 → 플래키(찍는 타이밍 경쟁) 제거의 핵심.
25
+ * / Resolve after all pending work completes; called right before a golden capture.
26
+ */
27
+ whenIdle(): Promise<void>;
28
+ /** 보류 렌더를 강제 flush(동기 레이아웃 확정) — 골든 캡처용. / Force-flush pending renders. */
29
+ flushLayout(): void;
30
+ /**
31
+ * 결정론 직렬화: 키 순서·수치 포맷 고정(toJSON diff·회귀 비교 가능화).
32
+ * / Deterministic serialization: fixed key order + number format.
33
+ */
34
+ stableStringify(value: unknown): string;
35
+ /**
36
+ * 포맷터 순수성 검증 헬퍼: 동일 입력 2회 실행 산출물 바이트 동일 assert.
37
+ * 위반 시 throw(계약 테스트에서 순수성 위반 탐지).
38
+ * / Purity check helper: run fn twice and assert byte-identical output; throws on violation.
39
+ */
40
+ assertPure<T>(fn: () => T): void;
41
+ }
42
+ /** 프로덕션 clock — 시스템 시계/requestAnimationFrame 위임(헤드리스는 setTimeout 폴백). */
43
+ export declare class SystemClock implements IClock {
44
+ now(): number;
45
+ raf(cb: (t: number) => void): number;
46
+ cancelRaf(id: number): void;
47
+ }
48
+ /** 시드 기반 결정론 PRNG(mulberry32). / Seeded deterministic PRNG (mulberry32). */
49
+ export declare class SeededRandom implements IRandom {
50
+ private _state;
51
+ constructor(seed?: number);
52
+ next(): number;
53
+ seed(s: number): void;
54
+ }
55
+ /** 수동 전진 가짜 시계 — 예약된 raf 콜백을 결정론 실행. / Manually-advanced fake clock. */
56
+ export declare class FakeClock implements IClock {
57
+ private _now;
58
+ private _nextId;
59
+ private _pending;
60
+ constructor(start?: number);
61
+ now(): number;
62
+ raf(cb: (t: number) => void): number;
63
+ cancelRaf(id: number): void;
64
+ /** 시간 전진 + 예약된 raf 콜백 결정론 실행. / Advance time and run scheduled raf callbacks. */
65
+ advance(ms: number): void;
66
+ /** 보류 raf 콜백을 등록 순서대로 flush(현재 시각 전달). / Flush pending raf callbacks in registration order. */
67
+ flushRaf(): void;
68
+ }
@@ -0,0 +1,23 @@
1
+ /** 지표 단위. / Metric unit. */
2
+ export type MetricUnit = 'ms' | 'fps' | 'kb' | 'mb' | 'ratio' | 'nodes' | 'percent';
3
+ /** 단일 지표의 기준값 — 골든 파일(버전 관리)의 한 항목. / A single baseline entry (golden file). */
4
+ export interface BaselineEntry {
5
+ readonly metricId: string;
6
+ readonly value: number;
7
+ readonly unit: MetricUnit;
8
+ readonly capturedAt: string;
9
+ readonly commit: string;
10
+ }
11
+ /** 기준선 SSOT — 회귀 판정의 유일한 진실원. / Baseline SSOT — the single source of regression truth. */
12
+ export interface PerfBaseline {
13
+ readonly version: string;
14
+ readonly entries: Readonly<Record<string, BaselineEntry>>;
15
+ /** 지표별 허용 회귀율 오버라이드(기본 5%). fps는 하한이라 부호 반전. / per-metric tolerance overrides. */
16
+ readonly toleranceOverrides?: Readonly<Record<string, number>>;
17
+ }
18
+ /** 기본 허용 회귀율(%). / Default allowed regression (%). */
19
+ export declare const DEFAULT_REGRESSION_TOLERANCE_PCT = 5;
20
+ /** 빈 기준선(신규 지표 전부 status='new'). / An empty baseline (all metrics become 'new'). */
21
+ export declare const EMPTY_BASELINE: PerfBaseline;
22
+ /** 항목 배열로 기준선을 조립(편의). / Build a baseline from an entry array (convenience). */
23
+ export declare function makeBaseline(version: string, entries: readonly BaselineEntry[], toleranceOverrides?: Readonly<Record<string, number>>): PerfBaseline;
@@ -0,0 +1,95 @@
1
+ /** 규모 축 — 대표 워크로드. / Scale axis — representative workloads. */
2
+ export type Scale = '10k' | '100k' | '1m';
3
+ /** 조작 축 — 7대 핵심 조작(SPS 매트릭스 행). / Operation axis — the 7 core operations (SPS matrix rows). */
4
+ export type Operation = 'initialRender' | 'verticalScroll' | 'sort' | 'filter' | 'cellEditCommit' | 'cfRecalc' | 'themeSwitch';
5
+ /**
6
+ * 상호작용 지연 등급(TX-802) — 정성어를 수치로 못박는 SSOT. 모든 상호작용 예산은 이 등급 하나를 인용.
7
+ * / Interaction latency class (TX-802) — the SSOT that pins qualitative words to numbers.
8
+ */
9
+ export declare enum LatencyClass {
10
+ Instant = "instant",// keypress→paint ≤16.7ms (1프레임)
11
+ Immediate = "immediate",// 지각적 즉시 ≤100ms
12
+ Responsive = "responsive",// INP p75 ≤200ms
13
+ Heavy = "heavy"
14
+ }
15
+ /** 지연 등급별 상한(ms) — 의도적 고정(표준·SSOT). / Per-class latency ceilings (ms) — intentionally fixed. */
16
+ export declare const LATENCY_MS: Readonly<Record<LatencyClass, number>>;
17
+ /**
18
+ * 단일 예산 셀 — SPS 매트릭스의 한 칸(조작×규모).
19
+ * 불변식: 모든 임계는 상한(≤)이거나 하한(≥, fps만). null=해당 규모에서 미측정 명시(누락과 구분).
20
+ * / A single budget cell — one square (operation×scale) of the SPS matrix.
21
+ */
22
+ export interface PerfBudget {
23
+ readonly op: Operation;
24
+ readonly scale: Scale;
25
+ readonly p50Ms?: number;
26
+ readonly p95Ms: number;
27
+ readonly minFps?: number;
28
+ readonly maxDomNodes?: number;
29
+ readonly latencyClass: LatencyClass;
30
+ readonly reqIds: readonly string[];
31
+ }
32
+ /**
33
+ * per-feature 렌더 예산 — 가시행 기준 노드/프레임(TX-801 원장·TX-808 각론).
34
+ * "빈 그리드는 빨라도 CF 켜지면 무너진다" — 총론이 아닌 기능별 각론.
35
+ * / per-feature render budget — nodes/frame per visible row.
36
+ */
37
+ export interface FeatureBudget {
38
+ readonly feature: 'cf' | 'sparkline' | 'databar' | 'heatmap' | 'widgetCell' | 'chart';
39
+ readonly scale: Scale;
40
+ readonly nodesPerVisibleRow: number;
41
+ readonly frameMs: number;
42
+ readonly reqIds: readonly string[];
43
+ }
44
+ /** TTFR·페인트·CLS 예산(TX-801). mount→첫 페인트. / TTFR·paint·CLS budget (TX-801). */
45
+ export interface PaintBudget {
46
+ readonly scale: Scale;
47
+ readonly ttfrMs: number;
48
+ readonly ttiMs: number;
49
+ readonly cls: number;
50
+ }
51
+ /** 상주 메모리 상한 곡선(TX-804). / Resident-memory ceiling curve (TX-804). */
52
+ export interface MemoryBudget {
53
+ readonly scale: Scale;
54
+ readonly maxResidentMb: number;
55
+ readonly maxDetachedNodes: number;
56
+ }
57
+ /**
58
+ * 통합 성능 명세 — 단일 SSOT 애그리게이트.
59
+ * 이 객체 하나가 "성능이 무엇을 의미하는가"의 유일한 정본. CI·문서·대시보드가 모두 이걸 인용.
60
+ * / Aggregate performance spec — the single SSOT.
61
+ */
62
+ export interface PerfSpec {
63
+ readonly version: string;
64
+ readonly operations: readonly PerfBudget[];
65
+ readonly features: readonly FeatureBudget[];
66
+ readonly paint: readonly PaintBudget[];
67
+ readonly memory: readonly MemoryBudget[];
68
+ /** 커버리지 계약: 신규 기능 키가 등장했는데 예산이 없으면 게이트 실패(머지 금지 강제). */
69
+ readonly coveredFeatures: readonly string[];
70
+ }
71
+ /** 기본 성능 명세 SSOT(v1). / Default performance spec SSOT (v1). */
72
+ export declare const DEFAULT_PERF_SPEC: PerfSpec;
73
+ /** 지표 id 규약: `${op}.${scale}.p95` 등 — 기준선/판정 키의 SSOT. / Metric id convention. */
74
+ export declare function metricId(op: Operation, scale: Scale, kind?: 'p50' | 'p95' | 'fps'): string;
75
+ /** op×scale 예산 셀 조회. 없으면 undefined. / Look up the op×scale budget cell. */
76
+ export declare function findBudget(spec: PerfSpec, op: Operation, scale: Scale): PerfBudget | undefined;
77
+ /** 단일 예산 assert 결과. / Single budget assertion result. */
78
+ export interface BudgetCheck {
79
+ readonly metricId: string;
80
+ readonly measured: number;
81
+ readonly budget: number;
82
+ /** fps/처리량 하한 지표면 true(작을수록 실패). / true for a floor metric (smaller = failing). */
83
+ readonly isFloor: boolean;
84
+ readonly withinBudget: boolean;
85
+ }
86
+ /**
87
+ * 측정 p95(ms)를 op×scale 상한과 대조. 상한 초과 시 withinBudget=false.
88
+ * / Assert a measured p95 (ms) against the op×scale ceiling.
89
+ */
90
+ export declare function assertP95(spec: PerfSpec, op: Operation, scale: Scale, measuredMs: number): BudgetCheck;
91
+ /**
92
+ * 측정 fps 를 op×scale 하한과 대조(스크롤류). 하한 미만이면 withinBudget=false.
93
+ * / Assert a measured fps against the op×scale floor (scroll-like).
94
+ */
95
+ export declare function assertFps(spec: PerfSpec, op: Operation, scale: Scale, measuredFps: number): BudgetCheck;
@@ -0,0 +1,69 @@
1
+ /** 픽셀 어서션 — 특정 좌표의 RGBA 기대(허용오차). / Pixel assertion — expected RGBA at a coordinate. */
2
+ export interface PixelAssertion {
3
+ readonly kind: 'pixel';
4
+ readonly at: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ readonly expect: {
9
+ rgba: [number, number, number, number];
10
+ tolerance: number;
11
+ };
12
+ }
13
+ /** 노드수 어서션 — 셀렉터 라이브 노드 상한(TX-803). / Node-count assertion — live node cap. */
14
+ export interface NodeCountAssertion {
15
+ readonly kind: 'nodeCount';
16
+ readonly selector: string;
17
+ readonly max: number;
18
+ }
19
+ /** 렌더 의존 기능 1건. / One render-dependent feature case. */
20
+ export interface RenderGateCase {
21
+ readonly id: string;
22
+ readonly feature: 'chart' | 'microVisual' | 'virtualization' | 'pixelAlign' | 'merge' | 'frozen';
23
+ readonly fixtureId: string;
24
+ /** 최소 1개 이상의 픽셀/노드 어서션 필수(없으면 게이트가 이 케이스를 무효 처리). */
25
+ readonly assertions: ReadonlyArray<PixelAssertion | NodeCountAssertion>;
26
+ }
27
+ /** 단일 어서션 결과. / A single assertion result. */
28
+ export interface AssertionResult {
29
+ readonly assertion: PixelAssertion | NodeCountAssertion;
30
+ readonly measured: number | [number, number, number, number];
31
+ readonly status: 'pass' | 'fail';
32
+ }
33
+ /** 케이스 1건의 실행 결과. / One case's run result. */
34
+ export interface CaseResult {
35
+ readonly caseId: string;
36
+ readonly engine: string;
37
+ readonly status: 'pass' | 'fail' | 'invalid';
38
+ readonly assertions: readonly AssertionResult[];
39
+ }
40
+ /** 엔진별 개별 리포트(TX-828 크로스브라우저). / Per-engine report. */
41
+ export interface RenderGateReport {
42
+ readonly engine: string;
43
+ readonly cases: readonly CaseResult[];
44
+ readonly status: 'pass' | 'fail';
45
+ }
46
+ /** 실브라우저 케이스 구동 계약(Playwright 잡/스텁 주입). / Real-browser case runner contract. */
47
+ export interface ICaseRunner {
48
+ readonly engine: string;
49
+ run(c: RenderGateCase): Promise<readonly AssertionResult[]>;
50
+ }
51
+ /**
52
+ * 실브라우저 게이트 — 렌더 의존 기능 전수가 실픽셀/노드 어서션을 통과해야 완료.
53
+ * CRC: 케이스 등록·구동·판정·커버리지 | 협력: ICaseRunner(엔진별)·ReleaseGate.
54
+ * 불변식: 케이스마다 assertion ≥1(허위완료 방지). assertion=0 → invalid.
55
+ * / Real-browser gate — every render-dependent feature must pass real pixel/node assertions.
56
+ */
57
+ export declare class RealBrowserGate {
58
+ private readonly runner;
59
+ private readonly _cases;
60
+ constructor(runner: ICaseRunner);
61
+ /** 케이스 등록. / Register a case. */
62
+ registerCase(c: RenderGateCase): void;
63
+ /** 등록 케이스 수. / Registered case count. */
64
+ get caseCount(): number;
65
+ /** 실브라우저 구동 → 엔진 리포트. assertion=0 케이스는 invalid(허위완료 차단). / Run cases. */
66
+ run(): Promise<RenderGateReport>;
67
+ /** 커버리지: 렌더 의존 기능 목록 중 케이스 없는 항목 → 미커버 실패. / Coverage gaps. */
68
+ coverageGaps(featureInventory: readonly string[]): string[];
69
+ }
@@ -0,0 +1,35 @@
1
+ import { PerfSpec } from './PerfSpec.js';
2
+ import { PerfBaseline } from './PerfBaseline.js';
3
+ /** 한 지표의 판정 결과 — 게이트 산출의 최소 단위. / A single metric verdict — the atomic gate output. */
4
+ export interface MetricVerdict {
5
+ readonly metricId: string;
6
+ readonly measured: number;
7
+ readonly baseline: number | null;
8
+ readonly budget: number;
9
+ /** (measured-baseline)/baseline*100. baseline=null|0 이면 null(NaN 금지). / null when baseline is null/0. */
10
+ readonly regressionPct: number | null;
11
+ readonly status: 'pass' | 'fail-budget' | 'fail-regression' | 'new';
12
+ readonly reqIds: readonly string[];
13
+ }
14
+ /**
15
+ * 회귀 판정기 — SPS 예산 + 기준선을 함께 적용하는 2중 게이트.
16
+ * CRC: 예산 위반·기준선 회귀 판정 | 협력: PerfSpec(예산)·PerfBaseline(기준선 DI).
17
+ * / Regression judge — the SPS-budget + baseline double gate.
18
+ */
19
+ export declare class RegressionJudge {
20
+ private readonly spec;
21
+ private readonly baseline;
22
+ constructor(spec: PerfSpec, baseline: PerfBaseline);
23
+ /** 지표별 허용 회귀율(%) — override 없으면 기본 5. / Per-metric tolerance (%). */
24
+ private tolerance;
25
+ /**
26
+ * 실측 지표맵을 받아 지표별 판정 배열 반환. 순수 함수(부작용 0).
27
+ * / Judge a measured metric map into per-metric verdicts. Pure.
28
+ */
29
+ judge(measured: Readonly<Record<string, number>>): MetricVerdict[];
30
+ /**
31
+ * 커버리지 검사: SPS coveredFeatures 중 실측에 없는 기능 지표 → 미커버 지목(머지 금지 강제).
32
+ * / Coverage check: covered features with no measured metric → merge-blocking gaps.
33
+ */
34
+ coverageGaps(measured: Readonly<Record<string, number>>): string[];
35
+ }
@@ -0,0 +1,94 @@
1
+ import { RegressionJudge } from './RegressionJudge.js';
2
+ import { ContrastAuditor, AppearanceSnapshotLike } from './ContrastAuditor.js';
3
+ /** 5대 하위 게이트. / The 5 sub-gates. */
4
+ export type SubGateId = 'perf' | 'memory' | 'bundle' | 'contrast' | 'a11y';
5
+ /** 하위 게이트 실패 항목. / A sub-gate failure item. */
6
+ export interface SubGateFailure {
7
+ readonly metricId: string;
8
+ readonly measured: number;
9
+ readonly budget: number;
10
+ readonly reqIds: readonly string[];
11
+ }
12
+ /** 하위 게이트 결과. / A sub-gate result. */
13
+ export interface SubGateResult {
14
+ readonly id: SubGateId;
15
+ readonly status: 'pass' | 'fail';
16
+ readonly failures: readonly SubGateFailure[];
17
+ }
18
+ /** 릴리스 종합 판정. / Aggregate release verdict. */
19
+ export interface ReleaseVerdict {
20
+ readonly status: 'pass' | 'blocked';
21
+ readonly subGates: readonly SubGateResult[];
22
+ /** 차단 시: 원인 하위게이트·지표·REQ 요약(리포트 SSOT). / Blocking reasons (report SSOT). */
23
+ readonly blockingReasons: ReadonlyArray<{
24
+ subGate: SubGateId;
25
+ metricId: string;
26
+ reqIds: readonly string[];
27
+ }>;
28
+ }
29
+ /**
30
+ * 게이트 컨텍스트 — 하위 게이트 입력 버킷. 각 게이트는 필요한 것만 읽는다.
31
+ * / Gate context — input buckets; each sub-gate reads only what it needs.
32
+ */
33
+ export interface GateContext {
34
+ /** 실측 지표맵(perf/memory/bundle). / measured metric map. */
35
+ readonly metrics?: Readonly<Record<string, number>>;
36
+ /** 외관 토큰 스냅샷(contrast/a11y). / appearance token snapshots. */
37
+ readonly snapshots?: readonly AppearanceSnapshotLike[];
38
+ }
39
+ /** 하위 게이트 공통 계약 — OCP seam(신규 예산 축 additive 추가). / Sub-gate contract (OCP seam). */
40
+ export interface ISubGate {
41
+ readonly id: SubGateId;
42
+ run(ctx: GateContext): Promise<SubGateResult>;
43
+ }
44
+ /** 체크리스트 항목(자동/수동). / A checklist item. */
45
+ export interface ReleaseChecklistItem {
46
+ readonly id: string;
47
+ readonly label: string;
48
+ readonly automated: boolean;
49
+ readonly subGate?: SubGateId;
50
+ }
51
+ /**
52
+ * 회귀 기반 하위게이트 — RegressionJudge 판정을 지표 prefix 로 선별해 perf/memory/bundle 축에 배정.
53
+ * / Regression-based sub-gate — selects RegressionJudge verdicts by metric-id prefix.
54
+ */
55
+ export declare class RegressionSubGate implements ISubGate {
56
+ readonly id: SubGateId;
57
+ private readonly judge;
58
+ /** 이 게이트가 소유하는 지표인지 판별(prefix 등). / owns-this-metric predicate. */
59
+ private readonly owns;
60
+ constructor(id: SubGateId, judge: RegressionJudge,
61
+ /** 이 게이트가 소유하는 지표인지 판별(prefix 등). / owns-this-metric predicate. */
62
+ owns: (metricId: string) => boolean);
63
+ run(ctx: GateContext): Promise<SubGateResult>;
64
+ }
65
+ /**
66
+ * 대비 기반 하위게이트 — ContrastAuditor 전수 판정을 contrast/a11y 축에 배정. 미달 1건이라도 실패.
67
+ * / Contrast-based sub-gate — maps ContrastAuditor verdicts to the contrast/a11y axis.
68
+ */
69
+ export declare class ContrastSubGate implements ISubGate {
70
+ readonly id: SubGateId;
71
+ private readonly auditor;
72
+ constructor(id: SubGateId, auditor: ContrastAuditor);
73
+ run(ctx: GateContext): Promise<SubGateResult>;
74
+ }
75
+ /**
76
+ * 릴리스 게이트 — 산재 게이트가 참조하는 단일 정본.
77
+ * CRC: 5개 하위 게이트 조립·단일 blocking 판정 | 협력: RegressionSubGate·ContrastSubGate·…
78
+ * 불변식: subGates 중 하나라도 fail → 전체 blocked(AND 게이트). 부분통과 개념 없음.
79
+ * / Release gate — the single canonical AND-gate.
80
+ */
81
+ export declare class ReleaseGate {
82
+ private readonly subGates;
83
+ constructor(subGates: readonly ISubGate[]);
84
+ evaluate(ctx: GateContext): Promise<ReleaseVerdict>;
85
+ /**
86
+ * 커버리지: 5대 정본 축(perf·memory·bundle·contrast·a11y) 중 조립된 하위게이트가 없는 축 지목.
87
+ * evaluate() 는 등록된 게이트만 판정하므로, 미등록 축은 침묵 통과한다 — 이 메서드가 그 갭을 계량한다.
88
+ * / Coverage: canonical axes with no assembled sub-gate. evaluate() silently passes missing axes;
89
+ * this measures that gap (measurability guard, mirrors RegressionJudge/RealBrowserGate.coverageGaps).
90
+ */
91
+ coverageGaps(): SubGateId[];
92
+ /** 체크리스트 정본 렌더(자동/수동 항목). / Render the canonical checklist. */
93
+ checklist(): ReleaseChecklistItem[];
94
+ }