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.
- package/CHANGELOG.md +376 -353
- package/README.md +1 -1
- package/dist/OpenGrid-B7m7ei7f.cjs +7385 -0
- package/dist/OpenGrid-CeUdO_fM.js +7398 -0
- package/dist/index-CeJ-0-80.cjs +260 -0
- package/dist/index-DnarQ4eR.js +266 -0
- package/dist/index-DrCPRuYi.js +548 -0
- package/dist/index-JjfWY3Bt.cjs +520 -0
- package/dist/open-grid-base.css +12 -1
- package/dist/open-grid-react.cjs +27 -1
- package/dist/open-grid-react.js +22 -82
- package/dist/open-grid-vue.cjs +31 -1
- package/dist/open-grid-vue.js +29 -79
- package/dist/open-grid.cjs +272 -6
- package/dist/open-grid.js +177 -266
- package/dist/types/bench/perf.d.ts +14 -8
- package/dist/types/core/AppearanceResolver.d.ts +98 -11
- package/dist/types/core/CFRenderBridge.d.ts +13 -0
- package/dist/types/core/CellEditManager.d.ts +73 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/CellTypeRegistry.d.ts +24 -0
- package/dist/types/core/ChartManager.d.ts +51 -3
- package/dist/types/core/ColumnLayout.d.ts +100 -2
- package/dist/types/core/ContextMenu.d.ts +43 -2
- package/dist/types/core/CrossGridController.d.ts +86 -15
- package/dist/types/core/CrossGridMapper.d.ts +43 -5
- package/dist/types/core/CrossGridRegistry.d.ts +36 -2
- package/dist/types/core/DataLayer.d.ts +210 -15
- package/dist/types/core/DetailManager.d.ts +106 -15
- package/dist/types/core/DragVisuals.d.ts +33 -4
- package/dist/types/core/EventEmitter.d.ts +54 -0
- package/dist/types/core/ExportManager.d.ts +66 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +17 -2
- package/dist/types/core/FilterSelect.d.ts +37 -13
- package/dist/types/core/FindBarManager.d.ts +26 -0
- package/dist/types/core/FlatRowModel.d.ts +54 -11
- package/dist/types/core/FooterManager.d.ts +53 -1
- package/dist/types/core/FormulaController.d.ts +139 -10
- package/dist/types/core/FormulaEngine.d.ts +15 -4
- package/dist/types/core/GridComposer.d.ts +54 -6
- package/dist/types/core/GridRenderer.d.ts +143 -10
- package/dist/types/core/GridShuttle.d.ts +44 -4
- package/dist/types/core/GroupEngine.d.ts +68 -10
- package/dist/types/core/GroupTreeManager.d.ts +86 -2
- package/dist/types/core/IconRegistry.d.ts +56 -9
- package/dist/types/core/KeyboardManager.d.ts +88 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MathUtils.d.ts +58 -5
- package/dist/types/core/MergeEngine.d.ts +45 -10
- package/dist/types/core/MutationService.d.ts +113 -10
- package/dist/types/core/OGDecimal.d.ts +144 -13
- package/dist/types/core/OpenGrid.d.ts +99 -0
- package/dist/types/core/OrgChart.d.ts +56 -1
- package/dist/types/core/OverrideKernel.d.ts +59 -15
- package/dist/types/core/Pagination.d.ts +38 -4
- package/dist/types/core/PivotEngine.d.ts +37 -0
- package/dist/types/core/RangeSelectionManager.d.ts +121 -7
- package/dist/types/core/RenderController.d.ts +56 -0
- package/dist/types/core/RowDragDrop.d.ts +52 -6
- package/dist/types/core/RowManager.d.ts +55 -0
- package/dist/types/core/SkinRegistry.d.ts +55 -15
- package/dist/types/core/SortFilterManager.d.ts +80 -1
- package/dist/types/core/TreeEngine.d.ts +60 -6
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/VirtualScroll.d.ts +64 -0
- package/dist/types/core/WorksheetManager.d.ts +61 -2
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
- package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
- package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
- package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
- package/dist/types/core/a11y/index.d.ts +13 -0
- package/dist/types/core/a11y/ports.d.ts +24 -0
- package/dist/types/core/appearance/Appearance.d.ts +68 -0
- package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
- package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
- package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
- package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
- package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
- package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
- package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
- package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
- package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
- package/dist/types/core/appearance/defaults.d.ts +10 -0
- package/dist/types/core/appearance/index.d.ts +20 -0
- package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
- package/dist/types/core/cf/CFEngine.d.ts +56 -0
- package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
- package/dist/types/core/cf/CFRule.d.ts +127 -0
- package/dist/types/core/cf/ColorScale.d.ts +49 -0
- package/dist/types/core/cf/InkResolver.d.ts +33 -0
- package/dist/types/core/cf/appearance.d.ts +20 -0
- package/dist/types/core/cf/encoders.d.ts +61 -0
- package/dist/types/core/cf/eval-types.d.ts +93 -0
- package/dist/types/core/cf/index.d.ts +21 -0
- package/dist/types/core/cf/lineage.d.ts +32 -0
- package/dist/types/core/cf/predicates.d.ts +27 -0
- package/dist/types/core/cf/serialize.d.ts +46 -0
- package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
- package/dist/types/core/chart/DataExtractor.d.ts +53 -12
- package/dist/types/core/chart/a11y.d.ts +22 -0
- package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
- package/dist/types/core/chart/downsample-report.d.ts +36 -0
- package/dist/types/core/chart/downsample.d.ts +26 -1
- package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
- package/dist/types/core/chart/geometry.d.ts +96 -0
- package/dist/types/core/chart/hittest.d.ts +21 -3
- package/dist/types/core/chart/palette.d.ts +96 -12
- package/dist/types/core/chart/parity.d.ts +12 -0
- package/dist/types/core/chart/provenance.d.ts +47 -0
- package/dist/types/core/chart/scales.d.ts +28 -1
- package/dist/types/core/chart/scene.d.ts +102 -0
- package/dist/types/core/chart/server.d.ts +36 -0
- package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
- package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
- package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
- package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/command/CommandBus.d.ts +51 -0
- package/dist/types/core/command/CommandRegistry.d.ts +43 -0
- package/dist/types/core/command/CommandStack.d.ts +38 -0
- package/dist/types/core/command/ICommand.d.ts +110 -0
- package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
- package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
- package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
- package/dist/types/core/command/index.d.ts +9 -0
- package/dist/types/core/command/support.d.ts +51 -0
- package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
- package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
- package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
- package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
- package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
- package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
- package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
- package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
- package/dist/types/core/coordinate/index.d.ts +10 -0
- package/dist/types/core/coordinate/ports.d.ts +45 -0
- package/dist/types/core/coordinate/types.d.ts +76 -0
- package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
- package/dist/types/core/detail/DetailSplice.d.ts +42 -11
- package/dist/types/core/detail/DetailState.d.ts +80 -11
- package/dist/types/core/detail/SubgridCache.d.ts +72 -10
- package/dist/types/core/detail/index.d.ts +8 -0
- package/dist/types/core/domain/AggregateResult.d.ts +54 -0
- package/dist/types/core/domain/CellAddress.d.ts +61 -0
- package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
- package/dist/types/core/domain/Delta.d.ts +37 -0
- package/dist/types/core/domain/DomainValue.d.ts +80 -0
- package/dist/types/core/domain/Missing.d.ts +65 -0
- package/dist/types/core/domain/Money.d.ts +42 -0
- package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
- package/dist/types/core/domain/Plain.d.ts +45 -0
- package/dist/types/core/domain/Quantity.d.ts +32 -0
- package/dist/types/core/domain/Ratios.d.ts +100 -0
- package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
- package/dist/types/core/domain/ValueType.d.ts +71 -0
- package/dist/types/core/domain/rounding.d.ts +25 -0
- package/dist/types/core/domain/strategies.d.ts +38 -0
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/editors/DateEditor.d.ts +18 -0
- package/dist/types/core/editors/SelectEditor.d.ts +29 -0
- package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
- package/dist/types/core/export/ExportManifest.d.ts +13 -0
- package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
- package/dist/types/core/export/Provenance.d.ts +34 -0
- package/dist/types/core/export/StreamPump.d.ts +28 -0
- package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
- package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
- package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
- package/dist/types/core/export/channels/capabilities.d.ts +13 -0
- package/dist/types/core/export/index.d.ts +24 -0
- package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
- package/dist/types/core/export/print/Paginator.d.ts +48 -0
- package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
- package/dist/types/core/export/sinks.d.ts +40 -0
- package/dist/types/core/export/types.d.ts +211 -0
- package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
- package/dist/types/core/extension/IExtension.d.ts +90 -0
- package/dist/types/core/extension/Registry.d.ts +142 -0
- package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
- package/dist/types/core/extension/adapters.d.ts +44 -0
- package/dist/types/core/extension/conformance.d.ts +47 -0
- package/dist/types/core/extension/index.d.ts +16 -0
- package/dist/types/core/extension/registries.d.ts +31 -0
- package/dist/types/core/extension/reserved.d.ts +10 -0
- package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
- package/dist/types/core/format/FormatCache.d.ts +20 -0
- package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
- package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
- package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
- package/dist/types/core/format/index.d.ts +55 -0
- package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
- package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
- package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
- package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
- package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
- package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
- package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
- package/dist/types/core/format/types.d.ts +292 -0
- package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
- package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
- package/dist/types/core/formula/CalcService.d.ts +137 -0
- package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
- package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
- package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
- package/dist/types/core/formula/FormulaParser.d.ts +9 -0
- package/dist/types/core/formula/FormulaStore.d.ts +63 -1
- package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
- package/dist/types/core/formula/Generation.d.ts +86 -0
- package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
- package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
- package/dist/types/core/formula/functions/essential.d.ts +3 -0
- package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
- package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
- package/dist/types/core/formula/numericLiteral.d.ts +11 -1
- package/dist/types/core/formula/serializeFormula.d.ts +10 -1
- package/dist/types/core/formula/types.d.ts +71 -8
- package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
- package/dist/types/core/host/GridHostDriver.d.ts +27 -0
- package/dist/types/core/host/GridHostPort.d.ts +37 -0
- package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
- package/dist/types/core/host/archCheck.d.ts +26 -0
- package/dist/types/core/host/index.d.ts +6 -0
- package/dist/types/core/host/reconcile.d.ts +22 -0
- package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
- package/dist/types/core/i18n/types.d.ts +26 -1
- package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
- package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
- package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
- package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
- package/dist/types/core/quality/PerfSpec.d.ts +95 -0
- package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
- package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
- package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
- package/dist/types/core/quality/VisualRegression.d.ts +74 -0
- package/dist/types/core/quality/hooks.d.ts +53 -0
- package/dist/types/core/quality/index.d.ts +20 -0
- package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
- package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
- package/dist/types/core/range/FillEngine.d.ts +69 -9
- package/dist/types/core/range/RangeModel.d.ts +100 -13
- package/dist/types/core/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/range/types.d.ts +27 -11
- package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
- package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
- package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
- package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
- package/dist/types/core/realtime/PollingSource.d.ts +42 -0
- package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
- package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
- package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
- package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
- package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
- package/dist/types/core/realtime/backoff.d.ts +12 -0
- package/dist/types/core/realtime/index.d.ts +13 -0
- package/dist/types/core/realtime/ports.d.ts +80 -0
- package/dist/types/core/render/CellApplier.d.ts +18 -0
- package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
- package/dist/types/core/render/CellPipeline.d.ts +39 -0
- package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
- package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
- package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
- package/dist/types/core/render/RenderBudget.d.ts +67 -0
- package/dist/types/core/render/contrast.d.ts +33 -0
- package/dist/types/core/render/index.d.ts +35 -0
- package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
- package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
- package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
- package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
- package/dist/types/core/render/stages/index.d.ts +14 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
- package/dist/types/core/state/AutosaveController.d.ts +63 -0
- package/dist/types/core/state/IStatePersistence.d.ts +59 -0
- package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
- package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
- package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
- package/dist/types/core/state/StateCodec.d.ts +75 -0
- package/dist/types/core/state/index.d.ts +6 -0
- package/dist/types/core/types.d.ts +17 -0
- package/dist/types/react/OpenGrid.d.ts +54 -0
- package/dist/types/react/index.d.ts +5 -0
- package/dist/types/realtime/index.d.ts +1 -0
- package/dist/types/vue/index.d.ts +5 -0
- package/dist/types/vue/types.d.ts +35 -0
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +112 -110
- package/dist/OpenGrid-B0Spm0rU.js +0 -10404
- package/dist/OpenGrid-CuXj0isp.cjs +0 -97
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { DeterminismKernel } from './DeterminismKernel.js';
|
|
2
|
+
import { ImageLike } from './pixelMetrics.js';
|
|
3
|
+
/** 스냅샷 대상 좌표 — 매트릭스 한 점. / A snapshot target coordinate — one matrix point. */
|
|
4
|
+
export interface SnapshotSpec {
|
|
5
|
+
readonly component: 'header' | 'cell' | 'widgetCell' | 'contextMenu' | 'emptyState' | 'chart' | 'filterPanel' | 'editor';
|
|
6
|
+
readonly theme: string;
|
|
7
|
+
readonly skin: string;
|
|
8
|
+
readonly state?: 'default' | 'hover' | 'selected' | 'focus' | 'disabled' | 'zebra';
|
|
9
|
+
readonly fixtureId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 비교 임계 — 판정 루브릭(육안 대체). 전부 주입값(생성자 DI) — 하드코딩 상수 아님(§4.1 오버라이딩).
|
|
13
|
+
* / Comparison thresholds — the verdict rubric replacing human eyeballing. All injectable.
|
|
14
|
+
*/
|
|
15
|
+
export interface DiffThreshold {
|
|
16
|
+
readonly maxChangedPixelRatio: number;
|
|
17
|
+
readonly minSsim: number;
|
|
18
|
+
readonly maxDeltaE: number;
|
|
19
|
+
readonly maxFlakyRate: number;
|
|
20
|
+
}
|
|
21
|
+
/** 기본 임계(§2.5 브리프 값). / Default thresholds (§2.5 brief values). */
|
|
22
|
+
export declare const DEFAULT_DIFF_THRESHOLD: DiffThreshold;
|
|
23
|
+
/** 단일 스냅샷 비교 결과. / A single snapshot comparison result. */
|
|
24
|
+
export interface DiffResult {
|
|
25
|
+
readonly spec: SnapshotSpec;
|
|
26
|
+
readonly changedPixelRatio: number;
|
|
27
|
+
readonly ssim: number;
|
|
28
|
+
readonly maxDeltaE: number;
|
|
29
|
+
readonly status: 'pass' | 'fail' | 'new-golden';
|
|
30
|
+
readonly diffImagePath?: string;
|
|
31
|
+
}
|
|
32
|
+
/** 실 픽셀 캡처 계약(실브라우저/스텁 주입). / Real-pixel capture contract (real browser / stub). */
|
|
33
|
+
export interface ICapturer {
|
|
34
|
+
capture(spec: SnapshotSpec): Promise<ImageLike>;
|
|
35
|
+
}
|
|
36
|
+
/** 골든 스냅샷 저장소 계약. / Golden snapshot store contract. */
|
|
37
|
+
export interface IGoldenStore {
|
|
38
|
+
get(spec: SnapshotSpec): ImageLike | null;
|
|
39
|
+
}
|
|
40
|
+
/** 매트릭스 전개 정의(컴포넌트×테마×스킨×상태). / Matrix definition for enumeration. */
|
|
41
|
+
export interface MatrixConfig {
|
|
42
|
+
readonly components: readonly SnapshotSpec['component'][];
|
|
43
|
+
readonly themes: readonly string[];
|
|
44
|
+
readonly skins: readonly string[];
|
|
45
|
+
readonly states: readonly NonNullable<SnapshotSpec['state']>[];
|
|
46
|
+
readonly fixtureId: string;
|
|
47
|
+
}
|
|
48
|
+
/** 스냅샷 spec 의 안정 키(골든 대조·flaky 추적). / Stable key for a snapshot spec. */
|
|
49
|
+
export declare function snapshotKey(s: SnapshotSpec): string;
|
|
50
|
+
/**
|
|
51
|
+
* 시각회귀 하니스 — 골든 캡처·비교·flaky 추적.
|
|
52
|
+
* CRC: 결정론 렌더→캡처→골든 대조 | 협력: DeterminismKernel(whenIdle)·ICapturer(실픽셀)·pixelMetrics.
|
|
53
|
+
* 불변식: 캡처 전 반드시 kernel.whenIdle() await(경쟁 제거).
|
|
54
|
+
* / Visual regression harness — golden capture, compare, flaky tracking.
|
|
55
|
+
*/
|
|
56
|
+
export declare class VisualRegressionHarness {
|
|
57
|
+
private readonly kernel;
|
|
58
|
+
private readonly threshold;
|
|
59
|
+
private readonly capturer;
|
|
60
|
+
private readonly goldens;
|
|
61
|
+
private readonly matrix;
|
|
62
|
+
constructor(kernel: DeterminismKernel, threshold: DiffThreshold, capturer: ICapturer, goldens: IGoldenStore, matrix: MatrixConfig);
|
|
63
|
+
/** 매트릭스 전개: 컴포넌트×테마×스킨×상태 조합 생성(누락 조합=미커버 리포트). */
|
|
64
|
+
enumerate(): SnapshotSpec[];
|
|
65
|
+
/** 단일 스냅샷 캡처(whenIdle 후 실픽셀). / Capture one snapshot (after whenIdle). */
|
|
66
|
+
capture(spec: SnapshotSpec): Promise<ImageLike>;
|
|
67
|
+
/** 골든 대조. SSIM+픽셀 diff+ΔE 동시 판정(§2.5 커널 재사용). / Compare against golden. */
|
|
68
|
+
compare(spec: SnapshotSpec, actual: ImageLike): DiffResult;
|
|
69
|
+
/**
|
|
70
|
+
* flaky 감지: 동일 spec N회 캡처→첫 캡처 대비 불일치율 반환. 임계 초과는 호출측이 판정.
|
|
71
|
+
* / Flaky detection: capture the same spec N times → mismatch ratio vs the first capture.
|
|
72
|
+
*/
|
|
73
|
+
measureFlaky(spec: SnapshotSpec, runs: number): Promise<number>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** 렌더 1회의 실측 샘플 — 코어가 매 렌더 완료 시 발신. / One measured render sample. */
|
|
2
|
+
export interface RenderMetric {
|
|
3
|
+
readonly renderMs: number;
|
|
4
|
+
readonly visibleRows: number;
|
|
5
|
+
readonly nodeCount: number;
|
|
6
|
+
readonly timestamp: number;
|
|
7
|
+
readonly reason: 'mount' | 'scroll' | 'data' | 'theme' | 'resize';
|
|
8
|
+
}
|
|
9
|
+
/** 상호작용 지연 샘플 — 입력→다음 페인트. / Interaction latency sample — input→next paint. */
|
|
10
|
+
export interface InteractionSample {
|
|
11
|
+
readonly type: 'edit' | 'scroll' | 'filter' | 'sort';
|
|
12
|
+
readonly latencyMs: number;
|
|
13
|
+
readonly timestamp: number;
|
|
14
|
+
}
|
|
15
|
+
/** 백분위 요약 — 원시 샘플에서 계산. / Percentile summary derived from raw samples. */
|
|
16
|
+
export interface LatencyStats {
|
|
17
|
+
readonly type: InteractionSample['type'];
|
|
18
|
+
readonly count: number;
|
|
19
|
+
readonly p50: number;
|
|
20
|
+
readonly p75: number;
|
|
21
|
+
readonly p95: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 계측 훅 옵션 — OpenGridOptions 에 additive 편입(semver 안전, opt-in).
|
|
25
|
+
* / Instrumentation hook options — additive to OpenGridOptions (semver-safe, opt-in).
|
|
26
|
+
*/
|
|
27
|
+
export interface PerfHooks {
|
|
28
|
+
/** 렌더마다 호출. dev 모드에서 예산 초과 시 [OpenGrid] 경고 동반. / Called per render. */
|
|
29
|
+
onRenderMetrics?(m: RenderMetric): void;
|
|
30
|
+
/** 상호작용 지연 수집기. 유형별 p75/p95 반환 API 제공. / Interaction latency sink. */
|
|
31
|
+
onInteractionLatency?(s: InteractionSample): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 지연 수집기 — 훅 샘플을 순환 버퍼에 모아 백분위 노출.
|
|
35
|
+
* CRC: 샘플 축적·백분위 계산 | 협력: PerfHooks(입력)·ReleaseGate/대시보드(출력).
|
|
36
|
+
* 불변식: 메모리 상한(고정 버퍼 크기 N=1024, 오래된 샘플 드롭) — 계측이 누수 원인이 되면 안 됨.
|
|
37
|
+
* / Latency collector — accumulates hook samples in a ring buffer and exposes percentiles.
|
|
38
|
+
*/
|
|
39
|
+
export declare class LatencyCollector {
|
|
40
|
+
private readonly _capacity;
|
|
41
|
+
private readonly _buf;
|
|
42
|
+
private _head;
|
|
43
|
+
/** @param capacity 순환 버퍼 크기(기본 1024) / ring buffer size (default 1024) */
|
|
44
|
+
constructor(capacity?: number);
|
|
45
|
+
/** 샘플 기록(용량 초과 시 최오래된 것 덮어씀). / Record a sample (overwrites the oldest when full). */
|
|
46
|
+
record(s: InteractionSample): void;
|
|
47
|
+
/** 현재 축적 샘플 수(용량 상한). / Current sample count (capped by capacity). */
|
|
48
|
+
get size(): number;
|
|
49
|
+
/** 유형별 p50/p75/p95 통계. / Per-type p50/p75/p95 stats. */
|
|
50
|
+
stats(type: InteractionSample['type']): LatencyStats;
|
|
51
|
+
/** 전체 샘플 비움. / Clear all samples. */
|
|
52
|
+
reset(): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type { Scale, Operation, PerfBudget, FeatureBudget, PaintBudget, MemoryBudget, PerfSpec, BudgetCheck, } from './PerfSpec.js';
|
|
2
|
+
export { LatencyClass, LATENCY_MS, DEFAULT_PERF_SPEC, metricId, findBudget, assertP95, assertFps, } from './PerfSpec.js';
|
|
3
|
+
export type { RenderMetric, InteractionSample, LatencyStats, PerfHooks } from './hooks.js';
|
|
4
|
+
export { LatencyCollector } from './hooks.js';
|
|
5
|
+
export type { MetricUnit, BaselineEntry, PerfBaseline } from './PerfBaseline.js';
|
|
6
|
+
export { DEFAULT_REGRESSION_TOLERANCE_PCT, EMPTY_BASELINE, makeBaseline } from './PerfBaseline.js';
|
|
7
|
+
export type { MetricVerdict } from './RegressionJudge.js';
|
|
8
|
+
export { RegressionJudge } from './RegressionJudge.js';
|
|
9
|
+
export type { IClock, IRandom } from './DeterminismKernel.js';
|
|
10
|
+
export { DeterminismKernel, SystemClock, SeededRandom, FakeClock } from './DeterminismKernel.js';
|
|
11
|
+
export type { ImageLike } from './pixelMetrics.js';
|
|
12
|
+
export { changedPixelRatio, ssim, maxDeltaE } from './pixelMetrics.js';
|
|
13
|
+
export type { SnapshotSpec, DiffThreshold, DiffResult, ICapturer, IGoldenStore, MatrixConfig, } from './VisualRegression.js';
|
|
14
|
+
export { DEFAULT_DIFF_THRESHOLD, VisualRegressionHarness, snapshotKey } from './VisualRegression.js';
|
|
15
|
+
export type { ContrastPair, ContrastVerdict, AppearanceSnapshotLike } from './ContrastAuditor.js';
|
|
16
|
+
export { CONTRAST_MIN, ContrastAuditor } from './ContrastAuditor.js';
|
|
17
|
+
export type { PixelAssertion, NodeCountAssertion, RenderGateCase, AssertionResult, CaseResult, RenderGateReport, ICaseRunner, } from './RealBrowserGate.js';
|
|
18
|
+
export { RealBrowserGate } from './RealBrowserGate.js';
|
|
19
|
+
export type { SubGateId, SubGateFailure, SubGateResult, ReleaseVerdict, GateContext, ISubGate, ReleaseChecklistItem, } from './ReleaseGate.js';
|
|
20
|
+
export { RegressionSubGate, ContrastSubGate, ReleaseGate } from './ReleaseGate.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 픽셀 버퍼(브라우저 ImageData 구조 호환, 헤드리스에서도 사용). RGBA row-major.
|
|
3
|
+
* / Pixel buffer (structurally compatible with browser ImageData; headless-usable). RGBA row-major.
|
|
4
|
+
*/
|
|
5
|
+
export interface ImageLike {
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
readonly data: ArrayLike<number>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 변경 픽셀 비율([0,1]). 규격 불일치는 1(전부 변경). tolerance=채널 절대차 허용(기본 0).
|
|
12
|
+
* / Ratio of changed pixels ([0,1]). Dimension mismatch → 1. tolerance = per-channel abs diff allowance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function changedPixelRatio(a: ImageLike, b: ImageLike, tolerance?: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* 구조 유사도 SSIM([0,1]) — 휘도 채널 전역 단일 창 근사. 동일 이미지=1, 규격 불일치=0.
|
|
17
|
+
* / Structural similarity (global single-window approximation over luma). Identical=1, mismatch=0.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ssim(a: ImageLike, b: ImageLike): number;
|
|
20
|
+
/**
|
|
21
|
+
* 최대 색차(ΔE 근사, RGB 유클리드). 규격 불일치는 최대치(441). 차트/그래픽 스냅샷 판정.
|
|
22
|
+
* / Max color difference (ΔE approximation, RGB Euclidean). Mismatch → max (441).
|
|
23
|
+
*/
|
|
24
|
+
export declare function maxDeltaE(a: ImageLike, b: ImageLike): number;
|
|
@@ -1,30 +1,72 @@
|
|
|
1
1
|
import { CellRange, FlatRowRefLike } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 복사 시 셀 값/표시값 조회 계약(§5.1, UR-4). / Cell value/display-text query contract for copy (§5.1, UR-4).
|
|
4
|
+
*/
|
|
2
5
|
export interface ClipboardQueryContext {
|
|
6
|
+
/** 열 인덱스(ci) → field 명(없으면 undefined). / Column index (ci) → field name (undefined if none). */
|
|
3
7
|
fieldAt(ci: number): string | undefined;
|
|
8
|
+
/** (행 ri, field) → 원시 셀 값. / (row ri, field) → raw cell value. */
|
|
4
9
|
getCellValue(ri: number, field: string): any;
|
|
5
|
-
/** override 데모 정합: 있으면 표시값 우선(§5.1 주석) */
|
|
10
|
+
/** override 데모 정합: 있으면 표시값 우선(§5.1 주석). / Override-demo alignment: prefer display text when present (§5.1 note). */
|
|
6
11
|
getDisplayText?(ri: number, field: string): string;
|
|
7
12
|
}
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* R행×C열 범위 → TSV(행마다 \t조인, 행간 \n) — 엑셀 왕복 호환(UR-4 AC).
|
|
15
|
+
* / R-row × C-col range → TSV (tab-join per row, newline between rows) — Excel round-trip compatible (UR-4 AC).
|
|
16
|
+
*
|
|
17
|
+
* @param rect - 직렬화할 정규화 셀 범위 / Normalized cell range to serialize
|
|
18
|
+
* @param ctx - 셀 값/표시값 조회 컨텍스트 / Cell value/display-text query context
|
|
19
|
+
* @returns TSV 문자열 / TSV string
|
|
20
|
+
*/
|
|
9
21
|
export declare function rangeToTSV(rect: CellRange, ctx: ClipboardQueryContext): string;
|
|
10
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* TSV 문자열 → 2D 블록(행×열 문자열 배열). 빈 문자열은 1×1 빈 블록.
|
|
24
|
+
* / TSV string → 2D block (row×col string array). Empty string yields a 1×1 empty block.
|
|
25
|
+
*
|
|
26
|
+
* @param text - 붙여넣기 원본 TSV 문자열 / Source TSV string to paste
|
|
27
|
+
* @returns 행×열 2D 문자열 블록 / Row×col 2D string block
|
|
28
|
+
*/
|
|
11
29
|
export declare function parseTSV(text: string): string[][];
|
|
30
|
+
/**
|
|
31
|
+
* 붙여넣기 플랜 생성에 필요한 행 해소/편집 가능 조회 계약(§5.2).
|
|
32
|
+
* / Row-resolution / editability query contract needed to build a paste plan (§5.2).
|
|
33
|
+
*/
|
|
12
34
|
export interface PastePlanContext {
|
|
35
|
+
/** flat index → 행 참조(kind/rowId). / flat index → row reference (kind/rowId). */
|
|
13
36
|
resolveFlatRow(ri: number): FlatRowRefLike;
|
|
37
|
+
/** 열 인덱스(ci) → field 명(없으면 undefined). / Column index (ci) → field name (undefined if none). */
|
|
14
38
|
fieldAt(ci: number): string | undefined;
|
|
15
|
-
/** 기본 true(잠금 없음) */
|
|
39
|
+
/** 기본 true(잠금 없음). / Defaults to true (no lock). */
|
|
16
40
|
isEditable?(rowId: string, field: string): boolean;
|
|
17
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* 붙여넣기 플랜의 셀별 항목(값 기록 또는 skip). / Per-cell item of a paste plan (write value or skip).
|
|
44
|
+
*/
|
|
18
45
|
export interface PastePlanItem {
|
|
46
|
+
/** 대상 행의 flat index. / Flat index of the target row. */
|
|
19
47
|
rowIndex: number;
|
|
48
|
+
/** 대상 컬럼 field 명. / Target column field name. */
|
|
20
49
|
field: string;
|
|
50
|
+
/** 수행 동작: 값 기록 또는 건너뜀. / Action: write value or skip. */
|
|
21
51
|
action: 'value' | 'skip';
|
|
52
|
+
/** 기록할 값(action==='value'일 때). / Value to write (when action==='value'). */
|
|
22
53
|
value?: any;
|
|
54
|
+
/** skip 사유(예: 'non-data-row', 'not-editable'). / Skip reason (e.g. 'non-data-row', 'not-editable'). */
|
|
23
55
|
reason?: string;
|
|
24
56
|
}
|
|
25
57
|
/**
|
|
26
58
|
* 붙여넣기 소스 블록(2D) + 타깃 range → 플랜.
|
|
59
|
+
* / Paste source block (2D) + target range → plan.
|
|
60
|
+
*
|
|
27
61
|
* 소스가 타깃보다 작으면 타일 반복, 크면(또는 같으면) 블록 그대로 전개(타깃 크기 무시) — 엑셀 규칙(FR-4 AC).
|
|
28
62
|
* `r % blockRows`/`c % blockCols` 단일 공식으로 두 경우 모두 성립(작을 때=주기 반복, 클 때=outRows=blockRows라 항상 r 자신).
|
|
63
|
+
* / When the source is smaller than the target it tiles; when equal or larger it expands the block
|
|
64
|
+
* verbatim (ignoring target size) — Excel rule (FR-4 AC). The single `r % blockRows` / `c % blockCols`
|
|
65
|
+
* formula covers both cases (smaller = periodic tiling; larger = outRows equals blockRows so it is always r itself).
|
|
66
|
+
*
|
|
67
|
+
* @param block - 붙여넣기 소스 2D 블록 / 2D source block to paste
|
|
68
|
+
* @param target - 타깃 셀 범위 / Target cell range
|
|
69
|
+
* @param ctx - 행 해소/편집가능 조회 컨텍스트 / Row-resolution / editability query context
|
|
70
|
+
* @returns 셀별 붙여넣기 플랜 항목 배열 / Array of per-cell paste plan items
|
|
29
71
|
*/
|
|
30
72
|
export declare function buildPastePlan(block: string[][], target: CellRange, ctx: PastePlanContext): PastePlanItem[];
|
|
@@ -1,61 +1,121 @@
|
|
|
1
1
|
import { OGDecimal } from '../OGDecimal.js';
|
|
2
2
|
import { CellRange, FillAxis, FillMode, FlatRowRefLike } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* detectSeries 판정 결과. / Result of a detectSeries classification.
|
|
5
|
+
*/
|
|
3
6
|
export interface DetectSeriesResult {
|
|
7
|
+
/** 판정 종류: 복제/등차/텍스트+말미숫자. / Classification kind: copy / arithmetic / text-with-trailing-number. */
|
|
4
8
|
kind: 'copy' | 'arith' | 'text-suffix';
|
|
5
|
-
/** 자연순서(위→아래 / 왼→오) diff. arith/text-suffix에만
|
|
9
|
+
/** 자연순서(위→아래 / 왼→오) diff. arith/text-suffix에만 존재. / Natural-order (top→bottom / left→right) diff. Present only for arith/text-suffix. */
|
|
6
10
|
step?: OGDecimal;
|
|
7
|
-
/** 자연순서로 파싱된 수치값(arith) 또는 접미 숫자부(text-suffix) */
|
|
11
|
+
/** 자연순서로 파싱된 수치값(arith) 또는 접미 숫자부(text-suffix). / Numeric values parsed in natural order (arith) or trailing numeric parts (text-suffix). */
|
|
8
12
|
values?: OGDecimal[];
|
|
9
|
-
/** text-suffix의 공통
|
|
13
|
+
/** text-suffix의 공통 접두문자열. / Common prefix string for text-suffix. */
|
|
10
14
|
prefix?: string;
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
17
|
* 소스 라인(주축과 직교하는 한 행 또는 한 열의 값 배열, 자연순서=위→아래/왼→오) → 감지 결과.
|
|
18
|
+
* / Source line (value array of one row or one column orthogonal to the fill axis, natural order = top→bottom/left→right)
|
|
19
|
+
* → detection result.
|
|
20
|
+
*
|
|
14
21
|
* 경계 AC(REQ-24): [1,2,4]→copy, [5]→copy, ["a","b"]→copy, ["Q1","Q2"]→arith 아님 text-suffix(step=1).
|
|
22
|
+
* / Boundary AC (REQ-24): [1,2,4]→copy, [5]→copy, ["a","b"]→copy, ["Q1","Q2"]→not arith but text-suffix (step=1).
|
|
23
|
+
*
|
|
24
|
+
* @param sourceLine - 자연순서 소스 값 배열 / Source values in natural order
|
|
25
|
+
* @returns copy/arith/text-suffix 판정 결과 / copy/arith/text-suffix classification result
|
|
15
26
|
*/
|
|
16
27
|
export declare function detectSeries(sourceLine: any[]): DetectSeriesResult;
|
|
17
28
|
/**
|
|
18
29
|
* 감지 결과 + 자연순서 소스라인으로 target 거리 d(1..N, 소스에 가장 가까운 셀=1)의 값을 외삽.
|
|
30
|
+
* / Extrapolate the value at target distance d (1..N, cell nearest the source = 1) from the detection result
|
|
31
|
+
* and the natural-order source line.
|
|
32
|
+
*
|
|
19
33
|
* 방향 부호(§3.4.1 "위/왼쪽 채우면 step 부호 반전")는 axis에 따라 base/부호를 선택해 처리한다.
|
|
34
|
+
* / The directional sign (§3.4.1 "filling up/left flips the step sign") is handled by choosing base/sign per axis.
|
|
35
|
+
*
|
|
36
|
+
* @param result - detectSeries 판정 결과 / detectSeries classification result
|
|
37
|
+
* @param sourceLine - 자연순서 소스 값 배열 / Source values in natural order
|
|
38
|
+
* @param axis - 채우기 방향(up/down/left/right) / Fill direction (up/down/left/right)
|
|
39
|
+
* @param d - 소스로부터의 거리(1..N) / Distance from the source (1..N)
|
|
40
|
+
* @returns 외삽된 셀 값 / Extrapolated cell value
|
|
20
41
|
*/
|
|
21
42
|
export declare function extrapolateValue(result: DetectSeriesResult, sourceLine: any[], axis: FillAxis, d: number): any;
|
|
43
|
+
/**
|
|
44
|
+
* 채우기 플랜의 셀별 항목(값/수식 기록 또는 skip). / Per-cell item of a fill plan (write value/formula or skip).
|
|
45
|
+
*/
|
|
22
46
|
export interface FillPlanItem {
|
|
47
|
+
/** 대상 행의 flat index. / Flat index of the target row. */
|
|
23
48
|
rowIndex: number;
|
|
49
|
+
/** 대상 컬럼 field 명. / Target column field name. */
|
|
24
50
|
field: string;
|
|
51
|
+
/** 수행 동작: 값 기록/수식 설정/건너뜀. / Action: write value / set formula / skip. */
|
|
25
52
|
action: 'value' | 'setFormula' | 'skip';
|
|
53
|
+
/** 기록할 값(action==='value'일 때). / Value to write (when action==='value'). */
|
|
26
54
|
value?: any;
|
|
55
|
+
/** 설정할 수식(action==='setFormula'일 때). / Formula to set (when action==='setFormula'). */
|
|
27
56
|
formula?: string;
|
|
57
|
+
/** skip 사유(예: 'non-data-row', 'formula-preserved'). / Skip reason (e.g. 'non-data-row', 'formula-preserved'). */
|
|
28
58
|
reason?: string;
|
|
29
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* buildFillPlan 결과 — 플랜 항목 + 보존된 수식 카운트. / buildFillPlan result — plan items + preserved-formula count.
|
|
62
|
+
*/
|
|
30
63
|
export interface FillPlanResult {
|
|
64
|
+
/** 셀별 플랜 항목 배열. / Array of per-cell plan items. */
|
|
31
65
|
items: FillPlanItem[];
|
|
32
|
-
/** C3.2 보존된 수식 셀 수(announce용) */
|
|
66
|
+
/** C3.2 보존된 수식 셀 수(announce용). / Count of preserved formula cells (C3.2, for announcement). */
|
|
33
67
|
skippedFormula: number;
|
|
34
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* 채우기 플랜 생성에 필요한 조회/정책 계약(§3.5/§3.6, C3). / Query/policy contract needed to build a fill plan (§3.5/§3.6, C3).
|
|
71
|
+
*/
|
|
35
72
|
export interface FillPlanContext {
|
|
73
|
+
/** flat index → 행 참조(kind/rowId). / flat index → row reference (kind/rowId). */
|
|
36
74
|
resolveFlatRow(ri: number): FlatRowRefLike;
|
|
75
|
+
/** 열 인덱스(ci) → field 명(없으면 undefined). / Column index (ci) → field name (undefined if none). */
|
|
37
76
|
fieldAt(ci: number): string | undefined;
|
|
77
|
+
/** (행 ri, field) → 원시 셀 값. / (row ri, field) → raw cell value. */
|
|
38
78
|
getCellValue(ri: number, field: string): any;
|
|
39
|
-
/** 기본 true(잠금 없음) */
|
|
79
|
+
/** 기본 true(잠금 없음). / Defaults to true (no lock). */
|
|
40
80
|
isEditable?(rowId: string, field: string): boolean;
|
|
41
|
-
/** 기본 false(수식 없음) */
|
|
81
|
+
/** 기본 false(수식 없음). / Defaults to false (no formula). */
|
|
42
82
|
hasCellFormula?(rowId: string, field: string): boolean;
|
|
43
|
-
/** C3.1: 상대 ref 오프셋 수식 생성(F3 제공) */
|
|
83
|
+
/** C3.1: 상대 ref 오프셋 수식 생성(F3 제공). / C3.1: build a relative-ref offset formula (provided by F3). */
|
|
44
84
|
offsetFormula?(rowId: string, field: string, dRow: number, dCol: number): string;
|
|
45
|
-
/** rangeSelection.fillOverwriteFormula(C3.2 opt-in) */
|
|
85
|
+
/** rangeSelection.fillOverwriteFormula(C3.2 opt-in). / rangeSelection.fillOverwriteFormula (C3.2 opt-in). */
|
|
46
86
|
overwriteFormula?: boolean;
|
|
47
|
-
/** Ctrl-강제-copy: 수식 원문 복제(오프셋 없음) */
|
|
87
|
+
/** Ctrl-강제-copy: 수식 원문 복제(오프셋 없음). / Ctrl-force-copy: replicate formula verbatim (no offset). */
|
|
48
88
|
forceCopyFormula?: boolean;
|
|
49
89
|
}
|
|
50
90
|
/**
|
|
51
91
|
* 소스 rect → 타깃 rect 채우기 플랜(§3.5). 주축과 직교하는 각 라인(행 또는 열) 별로 독립 처리(§3.4.1).
|
|
92
|
+
* / Fill plan for source rect → target rect (§3.5). Each line (row or column) orthogonal to the fill axis is
|
|
93
|
+
* processed independently (§3.4.1).
|
|
94
|
+
*
|
|
52
95
|
* non-data 행(kind!=='data')은 항상 skip(C0.3/CON-5). mode==='series'가 detectSeries로 'copy'에
|
|
53
96
|
* 귀결되면(경계 케이스) 그대로 copy 타일 반복으로 처리된다(설계가 의도한 동작).
|
|
97
|
+
* / Non-data rows (kind!=='data') are always skipped (C0.3/CON-5). If mode==='series' resolves to 'copy' via
|
|
98
|
+
* detectSeries (boundary case), it is handled as copy tiling as-is (intended design behavior).
|
|
99
|
+
*
|
|
100
|
+
* @param source - 소스 셀 범위 / Source cell range
|
|
101
|
+
* @param target - 타깃 셀 범위 / Target cell range
|
|
102
|
+
* @param axis - 채우기 방향(up/down/left/right) / Fill direction (up/down/left/right)
|
|
103
|
+
* @param mode - 'copy'(복제) 또는 'series'(시리즈 외삽) / 'copy' (replicate) or 'series' (series extrapolation)
|
|
104
|
+
* @param ctx - 조회/정책 컨텍스트 / Query/policy context
|
|
105
|
+
* @returns 플랜 항목 + 보존된 수식 카운트 / Plan items + preserved-formula count
|
|
54
106
|
*/
|
|
55
107
|
export declare function buildFillPlan(source: CellRange, target: CellRange, axis: FillAxis, mode: FillMode, ctx: FillPlanContext): FillPlanResult;
|
|
56
108
|
/**
|
|
57
109
|
* 현재 선택 rect에서 Ctrl+D(아래로)/Ctrl+R(오른쪽으로) 채우기의 source/target rect 산출(순수 함수).
|
|
110
|
+
* / Derive the source/target rects for Ctrl+D (downward) / Ctrl+R (rightward) fill from the current selection
|
|
111
|
+
* rect (pure function).
|
|
112
|
+
*
|
|
58
113
|
* 1행(D)/1열(R)뿐이면 채울 대상이 없어 null.
|
|
114
|
+
* / If the selection is a single row (D) / single column (R), there is nothing to fill, so returns null.
|
|
115
|
+
*
|
|
116
|
+
* @param rect - 현재 선택 셀 범위 / Current selection cell range
|
|
117
|
+
* @param axis - 'down'(Ctrl+D) 또는 'right'(Ctrl+R) / 'down' (Ctrl+D) or 'right' (Ctrl+R)
|
|
118
|
+
* @returns source/target rect 쌍, 채울 대상이 없으면 null / source/target rect pair, or null when nothing to fill
|
|
59
119
|
*/
|
|
60
120
|
export declare function ctrlFillSourceTarget(rect: CellRange, axis: 'down' | 'right'): {
|
|
61
121
|
source: CellRange;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { CellCoord, CellRange, Direction, RangeIdentity, RangeModelHost } from './types.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* anchor/focus → 정규화된 CellRange(§2.3). 역방향 드래그(anchor>focus)도 min/max로 정규화.
|
|
4
|
+
* / anchor/focus → normalized CellRange (§2.3). Reverse drags (anchor>focus) are normalized via min/max as well.
|
|
5
|
+
*
|
|
6
|
+
* @param a - 앵커 좌표 / Anchor coordinate
|
|
7
|
+
* @param f - 포커스 좌표 / Focus coordinate
|
|
8
|
+
* @returns 정규화된 셀 범위 / Normalized cell range
|
|
9
|
+
*/
|
|
3
10
|
export declare function normalize(a: CellCoord, f: CellCoord): CellRange;
|
|
11
|
+
/**
|
|
12
|
+
* F1 범위 선택 상태 머신(순수 MODEL). anchor/focus/정체성/rects를 관리하고, 드래그·Shift 확장·
|
|
13
|
+
* 재투영을 헤드리스로 계산한다. / F1 range-selection state machine (pure MODEL). Manages anchor/focus/identity/rects
|
|
14
|
+
* and computes drag, Shift extension, and reprojection headlessly.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const model = new RangeModel(host);
|
|
18
|
+
* model.beginDrag(2, 1);
|
|
19
|
+
* model.updateFocus(5, 3);
|
|
20
|
+
* model.endDrag();
|
|
21
|
+
* const rect = model.getActiveRange(); // { startRow: 2, endRow: 5, startCol: 1, endCol: 3 }
|
|
22
|
+
*/
|
|
4
23
|
export declare class RangeModel {
|
|
5
24
|
private _host;
|
|
6
25
|
private _anchor;
|
|
@@ -9,44 +28,112 @@ export declare class RangeModel {
|
|
|
9
28
|
private _rects;
|
|
10
29
|
private _hasSelection;
|
|
11
30
|
private _additive;
|
|
31
|
+
/**
|
|
32
|
+
* @param host - 좌표 해소/재투영을 제공하는 호스트(FlatRowModel 계약 모양, C0.3) / Host providing coordinate resolution/reprojection (FlatRowModel contract shape, C0.3)
|
|
33
|
+
*/
|
|
12
34
|
constructor(host: RangeModelHost);
|
|
35
|
+
/** 현재 선택이 존재하는지 여부. / Whether a selection currently exists. */
|
|
13
36
|
get hasSelection(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 현재 앵커 좌표의 복사본을 반환. / Return a copy of the current anchor coordinate.
|
|
39
|
+
* @returns 앵커 좌표 {ri, ci} / Anchor coordinate {ri, ci}
|
|
40
|
+
*/
|
|
14
41
|
getAnchor(): CellCoord;
|
|
42
|
+
/**
|
|
43
|
+
* 현재 포커스 좌표의 복사본을 반환. / Return a copy of the current focus coordinate.
|
|
44
|
+
* @returns 포커스 좌표 {ri, ci} / Focus coordinate {ri, ci}
|
|
45
|
+
*/
|
|
15
46
|
getFocus(): CellCoord;
|
|
47
|
+
/**
|
|
48
|
+
* 현재 범위 정체성(rowId/field 집합)의 복사본을 반환. / Return a copy of the current range identity (rowId/field sets).
|
|
49
|
+
* @returns 범위 정체성 스냅샷 / Range identity snapshot
|
|
50
|
+
*/
|
|
16
51
|
getIdentity(): RangeIdentity;
|
|
17
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* 공개 API 재료(C4): 정규화 rects (없으면 []). MVP는 길이 ≤1. / Public-API material (C4): normalized rects ([] if none). MVP length ≤1.
|
|
54
|
+
* @returns 정규화된 셀 범위 배열 / Array of normalized cell ranges
|
|
55
|
+
*/
|
|
18
56
|
getRangeSelection(): CellRange[];
|
|
19
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* 공개 API 재료(C4): getRangeSelection()[0] ?? null. / Public-API material (C4): getRangeSelection()[0] ?? null.
|
|
59
|
+
* @returns 활성 셀 범위 또는 null / Active cell range or null
|
|
60
|
+
*/
|
|
20
61
|
getActiveRange(): CellRange | null;
|
|
21
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* 복사/채우기 소스 결정용 별칭(§5.1 getPrimaryRect). / Alias for deciding the copy/fill source (§5.1 getPrimaryRect).
|
|
64
|
+
* @returns 기본(primary) 셀 범위 또는 null / Primary cell range or null
|
|
65
|
+
*/
|
|
22
66
|
getPrimaryRect(): CellRange | null;
|
|
23
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* 정렬/필터 후에도 유지되는 실제 rowId 집합의 현재 flat 위치(오름차순, 화면밖=-1 제외).
|
|
69
|
+
* / Current flat positions of the retained rowId set after sort/filter (ascending, off-screen=-1 excluded).
|
|
70
|
+
* @returns 오름차순 flat 행 인덱스 배열 / Ascending array of flat row indexes
|
|
71
|
+
*/
|
|
24
72
|
getProjectedFlatRows(): number[];
|
|
25
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* pointerdown. shift=true면 기존 anchor 유지(있을 때만), 아니면 새 1x1 anchor.
|
|
75
|
+
* / pointerdown. When shift=true keep the existing anchor (only if present); otherwise start a new 1×1 anchor.
|
|
76
|
+
*
|
|
77
|
+
* @param ri - 행 flat index / Row flat index
|
|
78
|
+
* @param ci - 열 인덱스 / Column index
|
|
79
|
+
* @param opts - additive(누적)/shift(기존 anchor 유지 확장) 플래그 / additive / shift (extend keeping anchor) flags
|
|
80
|
+
*/
|
|
26
81
|
beginDrag(ri: number, ci: number, opts?: {
|
|
27
82
|
additive?: boolean;
|
|
28
83
|
shift?: boolean;
|
|
29
84
|
}): void;
|
|
30
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* pointermove — 포커스만 갱신하고 rect 재계산. / pointermove — update only the focus and recompute the rect.
|
|
87
|
+
* @param ri - 행 flat index / Row flat index
|
|
88
|
+
* @param ci - 열 인덱스 / Column index
|
|
89
|
+
*/
|
|
31
90
|
updateFocus(ri: number, ci: number): void;
|
|
32
|
-
/** pointerup — 확정 + 정체성 스냅샷(§2.5). */
|
|
91
|
+
/** pointerup — 확정 + 정체성 스냅샷(§2.5). / pointerup — commit + identity snapshot (§2.5). */
|
|
33
92
|
endDrag(): void;
|
|
93
|
+
/** 마지막 드래그가 누적(additive) 모드였는지 여부. / Whether the last drag was in additive mode. */
|
|
34
94
|
get additive(): boolean;
|
|
35
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* 클릭(비-Shift): 새 1×1 anchor(FR-1). / Click (non-Shift): new 1×1 anchor (FR-1).
|
|
97
|
+
* @param ri - 행 flat index / Row flat index
|
|
98
|
+
* @param ci - 열 인덱스 / Column index
|
|
99
|
+
*/
|
|
36
100
|
click(ri: number, ci: number): void;
|
|
37
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Shift+클릭: anchor 유지, focus만 갱신. anchor 없으면 click으로 위임(UC-2 예외).
|
|
103
|
+
* / Shift+click: keep anchor, update only focus. If no anchor exists, delegate to click (UC-2 exception).
|
|
104
|
+
* @param ri - 행 flat index / Row flat index
|
|
105
|
+
* @param ci - 열 인덱스 / Column index
|
|
106
|
+
*/
|
|
38
107
|
shiftClickExtend(ri: number, ci: number): void;
|
|
39
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* anchor 고정, focus만 1칸 이동(격자 경계 clamp). 편집 우선순위(C9)는 호출측(KeyboardManager)이 가드.
|
|
110
|
+
* / Keep anchor fixed, move only the focus by one cell (clamped to grid bounds). The edit-priority guard (C9)
|
|
111
|
+
* is enforced by the caller (KeyboardManager).
|
|
112
|
+
* @param dir - 이동 방향(up/down/left/right) / Move direction (up/down/left/right)
|
|
113
|
+
*/
|
|
40
114
|
extendFocus(dir: Direction): void;
|
|
115
|
+
/**
|
|
116
|
+
* 외부에서 직접 rect를 지정하고 정체성을 스냅샷(setRangeSelection API 재료, §6.2).
|
|
117
|
+
* / Directly assign a rect from outside and snapshot the identity (setRangeSelection API material, §6.2).
|
|
118
|
+
* @param rect - 지정할 셀 범위 / Cell range to assign
|
|
119
|
+
*/
|
|
41
120
|
setRect(rect: CellRange): void;
|
|
42
|
-
/** clearRangeSelection API
|
|
121
|
+
/** clearRangeSelection API 재료 — 선택/정체성/rects를 비운다. / clearRangeSelection API material — clears selection/identity/rects. */
|
|
43
122
|
clear(): void;
|
|
44
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* 현재 rect를 rowId 집합 × field 집합으로 스냅샷(display-index는 렌더용 투영일 뿐).
|
|
125
|
+
* / Snapshot the current rect as a rowId set × field set (display-index is only a render-time projection).
|
|
126
|
+
*/
|
|
45
127
|
snapshotIdentity(): void;
|
|
46
128
|
/**
|
|
47
129
|
* 정렬/필터 후 호출(onModelReproject 구독 지점). rowId 집합 → 현재 flat 좌표로 재투영.
|
|
130
|
+
* / Called after sort/filter (onModelReproject subscription point). Reproject the rowId set → current flat coordinates.
|
|
131
|
+
*
|
|
48
132
|
* 사라진 행(flatIndexOfRowId === -1)은 정체성에는 남되 투영(rects)에서는 제외된다(불연속 허용).
|
|
49
133
|
* MVP는 단일 bounding rect로 투영(§2.2 rects 길이 1 방침) — 남아있는 행들의 min/max로 계산.
|
|
134
|
+
* / Vanished rows (flatIndexOfRowId === -1) remain in identity but are excluded from the projection (rects)
|
|
135
|
+
* (discontinuity allowed). MVP projects into a single bounding rect (§2.2 rects-length-1 policy) — computed from
|
|
136
|
+
* the min/max of surviving rows.
|
|
50
137
|
*/
|
|
51
138
|
reproject(): void;
|
|
52
139
|
private _recompute;
|