open-grid 1.6.1 → 1.7.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 +28 -0
- package/dist/ExportProgressView-9Kt1SQxv.js +48 -0
- package/dist/ExportProgressView-B59uHIwt.cjs +48 -0
- package/dist/LcpMergeOrderer-BdUtV67j.js +114 -0
- package/dist/LcpMergeOrderer-C_ANVkGk.cjs +113 -0
- package/dist/OpenGrid-BUYQs1_w.cjs +9806 -0
- package/dist/OpenGrid-BmagF0yo.js +9819 -0
- package/dist/XlsxChannel-DOeHeP7h.cjs +95 -0
- package/dist/XlsxChannel-DdaiytFR.js +95 -0
- package/dist/XlsxWorkbookWriter-BTNtZ80J.js +199 -0
- package/dist/XlsxWorkbookWriter-_u5stfg4.cjs +198 -0
- package/dist/{index-VkKgQ506.js → index-B9_g5Eg3.js} +2 -2
- package/dist/{index-D0DJtKYI.cjs → index-CnyumyPV.cjs} +2 -2
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +1 -1
- package/dist/open-grid.js +2 -2
- package/dist/sinks-BWkWQexV.js +149 -0
- package/dist/sinks-DPK0VxYG.cjs +143 -0
- package/dist/types/core/CFRenderBridge.d.ts +5 -1
- package/dist/types/core/CellEditManager.d.ts +26 -2
- package/dist/types/core/CellEventHandler.d.ts +6 -2
- package/dist/types/core/ColumnLayout.d.ts +8 -0
- package/dist/types/core/DataLayer.d.ts +48 -1
- package/dist/types/core/DetailManager.d.ts +43 -2
- package/dist/types/core/ExportManager.d.ts +24 -0
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +61 -3
- package/dist/types/core/FooterManager.d.ts +43 -1
- package/dist/types/core/FormulaController.d.ts +4 -4
- package/dist/types/core/GridComposer.d.ts +11 -1
- package/dist/types/core/GridRenderer.d.ts +84 -19
- package/dist/types/core/GroupTreeManager.d.ts +6 -4
- package/dist/types/core/KeyboardManager.d.ts +3 -2
- package/dist/types/core/MutationService.d.ts +10 -8
- package/dist/types/core/OpenGrid.d.ts +7 -5
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/SortFilterManager.d.ts +10 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -0
- package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
- package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
- package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
- package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
- package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
- package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
- package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
- package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
- package/dist/types/core/coordinate/ports.d.ts +5 -0
- package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
- package/dist/types/core/domain/footer/ports.d.ts +31 -0
- package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
- package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
- package/dist/types/core/domain/render/ports.d.ts +169 -0
- package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
- package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
- package/dist/types/core/domain/resize/ports.d.ts +64 -0
- package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
- package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
- package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
- package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
- package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
- package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
- package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
- package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
- package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
- package/dist/types/core/domain/sort/ports.d.ts +140 -0
- package/dist/types/core/export/ExportProgressView.d.ts +28 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +29 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +17 -0
- package/dist/types/core/export/index.d.ts +2 -0
- package/dist/types/core/export/sinks.d.ts +81 -0
- package/dist/types/core/host/archCheck.d.ts +16 -1
- package/dist/types/core/i18n/locales/en.d.ts +6 -0
- package/dist/types/core/i18n/locales/ko.d.ts +6 -0
- package/dist/types/core/i18n/types.d.ts +8 -0
- package/dist/types/core/render/FooterView.d.ts +121 -0
- package/dist/types/core/render/GeometryApplier.d.ts +55 -0
- package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
- package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
- package/dist/types/core/render/RenderScheduler.d.ts +225 -0
- package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
- package/dist/types/core/render/ScrollFollower.d.ts +34 -0
- package/dist/types/core/render/ScrollObserver.d.ts +47 -0
- package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
- package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
- package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
- package/dist/types/core/render/body/BodyView.d.ts +185 -0
- package/dist/types/core/render/body/CellLocator.d.ts +36 -0
- package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
- package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
- package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
- package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
- package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
- package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
- package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
- package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
- package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
- package/dist/types/core/render/dom.d.ts +10 -0
- package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
- package/dist/types/core/render/header/HeaderView.d.ts +84 -0
- package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
- package/dist/types/core/render/ports.d.ts +218 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
- package/dist/types/core/types.d.ts +70 -0
- package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
- package/package.json +2 -8
- package/dist/OpenGrid-CLk8Vt7j.cjs +0 -7459
- package/dist/OpenGrid-D6YxCsnV.js +0 -7472
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IByteSink } from '../types.js';
|
|
2
|
+
import { IStreamingWorkbookWriter, IXlsxStreamSession, SheetModel, XlsxStreamInit } from './XlsxChannel.js';
|
|
3
|
+
/** 쓰기기 옵션. / Writer options. */
|
|
4
|
+
export interface XlsxWorkbookWriterOptions {
|
|
5
|
+
/** deflate 수준(0 = 저장만, 기본 6). / Deflate level (0 = stored; default 6). */
|
|
6
|
+
readonly level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
7
|
+
}
|
|
8
|
+
/** XML 에서 허용되지 않는 제어문자 제거 + 특수문자 이스케이프. / Strip illegal control chars + escape. */
|
|
9
|
+
export declare function xmlEscape(s: string): string;
|
|
10
|
+
/** 스트리밍 xlsx 쓰기기. / Streaming xlsx writer. */
|
|
11
|
+
export declare class XlsxWorkbookWriter implements IStreamingWorkbookWriter {
|
|
12
|
+
private readonly opts;
|
|
13
|
+
constructor(opts?: XlsxWorkbookWriterOptions);
|
|
14
|
+
/** SheetModel → 바이트(소형 경로도 같은 스트리밍 엔진 사용). / Model path reuses the streaming engine. */
|
|
15
|
+
write(model: SheetModel, sink: IByteSink): Promise<number>;
|
|
16
|
+
openStream(init: XlsxStreamInit, sink: IByteSink): Promise<IXlsxStreamSession>;
|
|
17
|
+
}
|
|
@@ -4,6 +4,8 @@ export type { ArtifactProvenanceOptions } from './Provenance.js';
|
|
|
4
4
|
export { ExportManifest } from './ExportManifest.js';
|
|
5
5
|
export { StreamPump, STREAM_DEFAULTS, shouldStream } from './StreamPump.js';
|
|
6
6
|
export { MemoryByteSink, DownloadByteSink } from './sinks.js';
|
|
7
|
+
export { FileSystemByteSink, BlobDownloadByteSink, pickExcelSink, canUseFileSystemAccess, XLSX_MIME, } from './sinks.js';
|
|
8
|
+
export type { IWritableLike, BlobDownloadOptions, PickExcelSinkOptions, ExcelSinkChoice, } from './sinks.js';
|
|
7
9
|
export { GridArtifactSource } from './GridArtifactSource.js';
|
|
8
10
|
export type { GridArtifactSourceDeps, ArtifactColumn, PlacementFn, CfFn, } from './GridArtifactSource.js';
|
|
9
11
|
export { ChannelRegistry } from './ChannelRegistry.js';
|
|
@@ -38,3 +38,84 @@ export declare class DownloadByteSink implements IByteSink {
|
|
|
38
38
|
abort(): void;
|
|
39
39
|
get desiredSize(): number;
|
|
40
40
|
}
|
|
41
|
+
/** 엑셀 기본 MIME. / Default xlsx MIME type. */
|
|
42
|
+
export declare const XLSX_MIME = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
43
|
+
/** FileSystemWritableFileStream 의 필요한 최소 모양(주입용). / Minimal shape of a writable file stream. */
|
|
44
|
+
export interface IWritableLike {
|
|
45
|
+
write(data: Uint8Array | string): Promise<void>;
|
|
46
|
+
close(): Promise<void>;
|
|
47
|
+
abort?(reason?: unknown): Promise<void> | void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 디스크 직접 기록 싱크(File System Access). 호출부가 `showSaveFilePicker().createWritable()` 결과를 넘긴다.
|
|
51
|
+
* desiredSize = highWaterMark − 아직 기록 끝나지 않은 바이트(기록이 끝나면 회복).
|
|
52
|
+
* / Direct-to-disk sink; wraps a writable. desiredSize = highWaterMark − in-flight bytes.
|
|
53
|
+
*/
|
|
54
|
+
export declare class FileSystemByteSink implements IByteSink {
|
|
55
|
+
private readonly _writable;
|
|
56
|
+
private readonly _highWaterMark;
|
|
57
|
+
private _pending;
|
|
58
|
+
private _closed;
|
|
59
|
+
private _aborted;
|
|
60
|
+
constructor(_writable: IWritableLike, _highWaterMark?: number);
|
|
61
|
+
write(chunk: Uint8Array | string): Promise<void>;
|
|
62
|
+
close(): Promise<void>;
|
|
63
|
+
abort(reason?: string): void;
|
|
64
|
+
get desiredSize(): number;
|
|
65
|
+
}
|
|
66
|
+
/** Blob 다운로드 옵션. / Blob download options. */
|
|
67
|
+
export interface BlobDownloadOptions {
|
|
68
|
+
fileName?: string;
|
|
69
|
+
mime?: string;
|
|
70
|
+
highWaterMark?: number | undefined;
|
|
71
|
+
/** 결과 Blob 전달 콜백(미지정 시 `<a download>` 클릭). / Receives the Blob (default: anchor click). */
|
|
72
|
+
download?: ((blob: Blob, fileName: string) => void) | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* 폴백 싱크: 조각을 모아 close 때 Blob→objectURL→`<a download>`. 압축 바이트만 보유.
|
|
76
|
+
* / Fallback sink: collects pieces, downloads as a Blob on close.
|
|
77
|
+
*/
|
|
78
|
+
export declare class BlobDownloadByteSink implements IByteSink {
|
|
79
|
+
private readonly _parts;
|
|
80
|
+
private _bytes;
|
|
81
|
+
private _closed;
|
|
82
|
+
private _aborted;
|
|
83
|
+
private readonly _fileName;
|
|
84
|
+
private readonly _mime;
|
|
85
|
+
private readonly _hwm;
|
|
86
|
+
private readonly _download?;
|
|
87
|
+
constructor(opts?: BlobDownloadOptions);
|
|
88
|
+
write(chunk: Uint8Array | string): Promise<void>;
|
|
89
|
+
close(): Promise<void>;
|
|
90
|
+
abort(): void;
|
|
91
|
+
get desiredSize(): number;
|
|
92
|
+
get bytesWritten(): number;
|
|
93
|
+
private static _anchorDownload;
|
|
94
|
+
}
|
|
95
|
+
/** 선택기 옵션. / Selector options. */
|
|
96
|
+
export interface PickExcelSinkOptions {
|
|
97
|
+
fileName?: string;
|
|
98
|
+
mime?: string;
|
|
99
|
+
/** 'off' 면 File System Access 를 쓰지 않는다(기본 'auto'). / 'off' blocks FS-Access. */
|
|
100
|
+
fsAccess?: 'auto' | 'off';
|
|
101
|
+
highWaterMark?: number;
|
|
102
|
+
/** Blob 경로의 다운로드 콜백. / Download callback for the Blob path. */
|
|
103
|
+
download?: BlobDownloadOptions['download'];
|
|
104
|
+
/** 판정 대상 환경(테스트용, 기본 window). / Environment to probe (tests; default window). */
|
|
105
|
+
env?: unknown;
|
|
106
|
+
}
|
|
107
|
+
/** pickExcelSink 결과. / Result of pickExcelSink. */
|
|
108
|
+
export interface ExcelSinkChoice {
|
|
109
|
+
readonly kind: 'fs' | 'blob';
|
|
110
|
+
/** 싱크 생성. 'fs' 는 저장 대화상자를 연다(사용자 취소 시 reject, 호출부가 처리). / Creates the sink; 'fs' opens the picker. */
|
|
111
|
+
create(): Promise<IByteSink>;
|
|
112
|
+
}
|
|
113
|
+
/** 순수 판정: File System Access 를 쓸 수 있고 막지 않았나. / Pure check: is FS-Access usable and not blocked. */
|
|
114
|
+
export declare function canUseFileSystemAccess(opts?: PickExcelSinkOptions): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* 엑셀 싱크 선택기. 사용: `const sink = await pickExcelSink({ fileName: 'a.xlsx' }).create();`
|
|
117
|
+
* 이후 스트리밍 쓰기(`writeStreaming(source, sink, ctx)`)에 넘긴다. 'fs' 는 사용자 제스처 안에서 create() 를 호출해야 한다.
|
|
118
|
+
* / Usage: `const sink = await pickExcelSink({ fileName }).create()`, then pass it to the streaming writer.
|
|
119
|
+
* For 'fs', call create() inside a user gesture.
|
|
120
|
+
*/
|
|
121
|
+
export declare function pickExcelSink(opts?: PickExcelSinkOptions): ExcelSinkChoice;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ArchRuleId = 'core-imports-framework' | 'headless-dom-global' | 'a11y-aria-write' | 'getcomputedstyle-scope';
|
|
1
|
+
export type ArchRuleId = 'core-imports-framework' | 'headless-dom-global' | 'a11y-aria-write' | 'getcomputedstyle-scope' | 'headless-imports-render' | 'headless-dom-type' | 'paint-path-dom-read' | 'private-name-string-access';
|
|
2
2
|
export interface ArchViolation {
|
|
3
3
|
readonly rule: ArchRuleId;
|
|
4
4
|
readonly path: string;
|
|
@@ -16,6 +16,21 @@ export interface ArchCheckOptions {
|
|
|
16
16
|
readonly coreDir?: string;
|
|
17
17
|
/** 경계 화이트리스트(헤드리스 규칙 예외 — humble shell·boundary). / Boundary whitelist. */
|
|
18
18
|
readonly boundaryDirs?: readonly string[];
|
|
19
|
+
/** 헤드리스 dir 이 import 하면 안 되는 그리기 쪽 경로(확장자 뺀 접두사). / DOM-side targets headless code must not import. */
|
|
20
|
+
readonly renderSideTargets?: readonly string[];
|
|
21
|
+
/** DOM 형 이름 금지 대상(새 헤드리스 파일·dir 접두사). / New headless files where DOM type names are banned. */
|
|
22
|
+
readonly domTypeBannedFiles?: readonly string[];
|
|
23
|
+
/** 그리는 길 파일(접두사) — DOM 읽기 금지. / Paint-path files where layout-forcing DOM reads are banned. */
|
|
24
|
+
readonly paintPathFiles?: readonly string[];
|
|
25
|
+
/** 그리는 길 DOM 읽기 허용 목록: 파일 통째(method 없음) 또는 그 파일의 메서드 하나. / Allowed readers. */
|
|
26
|
+
readonly paintPathReadAllow?: readonly PaintReadAllow[];
|
|
27
|
+
/** 글자로 불러도 되는 비공개 이름(이미 있던 예외 — 빌드 이름표가 그 글자를 보고 지킴). / Private names allowed as strings. */
|
|
28
|
+
readonly privateStringAllow?: readonly string[];
|
|
29
|
+
}
|
|
30
|
+
/** 그리는 길 DOM 읽기 허용 항목. method 를 주면 그 메서드 몸통 안에서만 허용. / Allow entry for paint-path reads. */
|
|
31
|
+
export interface PaintReadAllow {
|
|
32
|
+
readonly path: string;
|
|
33
|
+
readonly method?: string;
|
|
19
34
|
}
|
|
20
35
|
/**
|
|
21
36
|
* 정적 적합성 검사. 위반 목록 반환(빈 배열=통과).
|
|
@@ -160,6 +160,12 @@ export declare const EN_MESSAGES: {
|
|
|
160
160
|
};
|
|
161
161
|
export: {
|
|
162
162
|
printSummary: string;
|
|
163
|
+
preparing: string;
|
|
164
|
+
exporting: string;
|
|
165
|
+
cancel: string;
|
|
166
|
+
cancelled: string;
|
|
167
|
+
done: string;
|
|
168
|
+
exportError: string;
|
|
163
169
|
};
|
|
164
170
|
};
|
|
165
171
|
/** en 포맷 메타. / en format meta. */
|
|
@@ -160,6 +160,12 @@ export declare const KO_MESSAGES: {
|
|
|
160
160
|
};
|
|
161
161
|
export: {
|
|
162
162
|
printSummary: string;
|
|
163
|
+
preparing: string;
|
|
164
|
+
exporting: string;
|
|
165
|
+
cancel: string;
|
|
166
|
+
cancelled: string;
|
|
167
|
+
done: string;
|
|
168
|
+
exportError: string;
|
|
163
169
|
};
|
|
164
170
|
};
|
|
165
171
|
/** ko 포맷 메타(Intl 태그·방향·수출 폰트). / ko format meta (Intl tag, direction, export font). */
|
|
@@ -669,6 +669,14 @@ export interface LocaleMessages {
|
|
|
669
669
|
* 打印的摘要行。参数 {rows} {cols} {date}。
|
|
670
670
|
*/
|
|
671
671
|
printSummary: MessageValue;
|
|
672
|
+
/** 엑셀 내보내기 진척 문구. / Excel export progress strings. */
|
|
673
|
+
preparing: MessageValue;
|
|
674
|
+
/** 파라미터 {done} {total} {percent}. / Params {done} {total} {percent}. */
|
|
675
|
+
exporting: MessageValue;
|
|
676
|
+
cancel: MessageValue;
|
|
677
|
+
cancelled: MessageValue;
|
|
678
|
+
done: MessageValue;
|
|
679
|
+
exportError: MessageValue;
|
|
672
680
|
};
|
|
673
681
|
}
|
|
674
682
|
/**
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { IFooterView, IGeometryApplier, IScrollFollower } from './ports.js';
|
|
2
|
+
import { FooterResultLike } from '../domain/footer/ports.js';
|
|
3
|
+
import { FooterDef } from '../domain/footer/FooterValues.js';
|
|
4
|
+
import { IColumnGeometry } from '../coordinate/geometryPorts.js';
|
|
5
|
+
/** 그리기에 쓰는 옵션 몫(그리드 옵션 객체를 그대로 넘김). / The grid options the footer reads. */
|
|
6
|
+
export interface FooterViewOptions {
|
|
7
|
+
footer?: readonly FooterDef[] | null;
|
|
8
|
+
footerHeight?: number;
|
|
9
|
+
footerPosition?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FooterViewDeps {
|
|
12
|
+
/** 막대를 넣을 컨테이너 — 그릴 때마다 묻는다(지금 동작). / Container, asked on every paint. */
|
|
13
|
+
container(): HTMLElement;
|
|
14
|
+
options(): FooterViewOptions;
|
|
15
|
+
/** 보이는 잎 컬럼(정렬 기본값에 형을 봄). / Visible leaf columns. */
|
|
16
|
+
leaves(): readonly {
|
|
17
|
+
readonly type?: string;
|
|
18
|
+
readonly width?: number;
|
|
19
|
+
}[];
|
|
20
|
+
/** 컬럼 기하 — 그릴 때마다 한 번 묻는다. / Column geometry, asked once per paint. */
|
|
21
|
+
geometry(): IColumnGeometry;
|
|
22
|
+
/**
|
|
23
|
+
* 저장된 폭 배열. 폭 값은 기하에 묻고, 이 배열은 「그 잎에 폭이 저장돼 있나」만 본다(없으면 100px, 배열 자체가 없으면 잎의 width).
|
|
24
|
+
*
|
|
25
|
+
* Stored width array; only used to tell whether a leaf has a stored width — the value itself comes from the geometry.
|
|
26
|
+
*/
|
|
27
|
+
widths(): readonly number[] | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* 정의마다의 합계 결과를 주는 곳. 값 계산은 FooterValues 가 하고 이 객체는 결과만 받는다(어떤 정의·행으로
|
|
30
|
+
* 셈할지는 주는 쪽이 안다). 그릴 때마다 한 번 부른다.
|
|
31
|
+
*
|
|
32
|
+
* Supplies the per-definition results; FooterValues computes them and the supplier knows which
|
|
33
|
+
* definitions and rows. Called once per paint.
|
|
34
|
+
*/
|
|
35
|
+
values(): readonly FooterResultLike[];
|
|
36
|
+
/** 가로 스크롤 따라가기(선택). / Optional horizontal scroll follower. */
|
|
37
|
+
follower?: IScrollFollower;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 푸터 막대 DOM 의 주인. 값은 deps.values(), 정의는 deps.options().footer 에서.
|
|
41
|
+
*
|
|
42
|
+
* Owner of the footer bar DOM.
|
|
43
|
+
*/
|
|
44
|
+
export declare class FooterView implements IFooterView {
|
|
45
|
+
private readonly _d;
|
|
46
|
+
/** 마지막으로 그린 막대(따라가기 풀기·값만 고치기용). / Last painted bar. */
|
|
47
|
+
private _bar;
|
|
48
|
+
/** 그 막대를 그린 정의 배열(같은 배열이어야 값만 고칠 수 있다). / Definitions the bar was painted from. */
|
|
49
|
+
private _defs;
|
|
50
|
+
/** 정의마다의 칸(정의 순서). / One cell per definition. */
|
|
51
|
+
private _cells;
|
|
52
|
+
/** 정의마다 값 칸으로 그렸나(라벨만인 칸과 갈래가 바뀌면 통째로 다시). / Whether each cell was painted as a value cell. */
|
|
53
|
+
private _valued;
|
|
54
|
+
/** 그 막대를 그릴 때의 기하 판·높이·위치(바뀌면 값만 고칠 수 없다 — 칸 폭·막대 모양이 달라짐). / Shape inputs at paint time. */
|
|
55
|
+
private _geoVersion;
|
|
56
|
+
private _height;
|
|
57
|
+
private _position;
|
|
58
|
+
private _follower;
|
|
59
|
+
private _applier;
|
|
60
|
+
/** 막대 끝 여백 px(본문 세로 스크롤바 폭)와 그 자리 요소(0 이면 없음). / End gutter px and its element (none when 0). */
|
|
61
|
+
private _gutter;
|
|
62
|
+
private _gutterEl;
|
|
63
|
+
constructor(deps: FooterViewDeps);
|
|
64
|
+
/**
|
|
65
|
+
* 가로 따라가기 객체를 넘겨 받는다(그리드가 렌더러를 만든 뒤 한 번). 이미 그린 막대가 있으면 옛 객체에서 풀고 새 객체에 맡긴다.
|
|
66
|
+
*
|
|
67
|
+
* Receives the horizontal scroll follower; an existing bar moves from the old follower to the new one.
|
|
68
|
+
*/
|
|
69
|
+
setFollower(f: IScrollFollower | null): void;
|
|
70
|
+
/**
|
|
71
|
+
* 폭 등록기를 넘겨 받는다(그리드가 기하·등록기를 만든 뒤). 막대를 그릴 때마다 폭 자리를 'footer' 범위로 등록해 두면
|
|
72
|
+
* 컬럼 폭을 끄는 동안 등록기가 머리글·본문과 같은 프레임에 푸터 칸 폭도 고친다(막대를 다시 만들지 않음).
|
|
73
|
+
* 이미 그린 막대가 있으면 한 번 다시 그려 등록을 맞춘다.
|
|
74
|
+
*
|
|
75
|
+
* Receives the geometry applier; each paint registers the footer's width spots under the 'footer' scope so a column
|
|
76
|
+
* drag updates footer cells in the same frame as header and body. An existing bar is repainted once to register.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* 막대 끝 여백을 정한다(본문 세로 스크롤바 폭). 본문은 스크롤바 때문에 보이는 폭이 그만큼 좁아 가로로 그만큼 더 옮겨지는데,
|
|
80
|
+
* 막대는 스크롤바가 없어 끝까지 긁으면 그만큼 덜 간다 — 그 차이를 막대 끝 빈 칸으로 메운다. 0 이면 아무것도 쓰지 않는다
|
|
81
|
+
* (스크롤바가 없는 화면의 막대 글자는 지금과 같다). 이미 그린 막대는 다시 만들지 않고 그 칸만 고친다.
|
|
82
|
+
*
|
|
83
|
+
* Sets the bar's end gutter (the body's vertical scrollbar width) so the bar can scroll as far as the body. Zero
|
|
84
|
+
* writes nothing (markup unchanged when no scrollbar shows). An existing bar is patched, not rebuilt.
|
|
85
|
+
*/
|
|
86
|
+
setEndGutter(px: number): void;
|
|
87
|
+
private _makeGutter;
|
|
88
|
+
setApplier(a: IGeometryApplier | null): void;
|
|
89
|
+
/**
|
|
90
|
+
* 막대를 통째로 다시 그린다. 있던 `.og-footer-bar` 를 떼고, 정의가 있으면 새로 만들어
|
|
91
|
+
* `footerPosition` 에 따라 컨테이너 맨 앞이나 맨 뒤에 넣는다.
|
|
92
|
+
*
|
|
93
|
+
* Rebuilds the bar: removes the existing `.og-footer-bar` and, when definitions exist, inserts a new
|
|
94
|
+
* one at the top or bottom of the container per `footerPosition`.
|
|
95
|
+
*/
|
|
96
|
+
paint(): void;
|
|
97
|
+
/**
|
|
98
|
+
* 값만 다시: 같은 정의로 그린 막대가 아직 컨테이너에 붙어 있으면 값 칸의 글자와 title 만 고친다(요소는 그대로 — 따라가기·스크롤 위치도 그대로).
|
|
99
|
+
* 막대가 없거나, 막대 모양을 정하는 입력(정의 배열·컬럼 기하 판·높이·위치)이 바뀌었거나, 어느 칸이 값 칸↔라벨 칸으로 갈래가
|
|
100
|
+
* 바뀌면 통째로 다시 그린다(결과 글자는 통째와 같다).
|
|
101
|
+
*
|
|
102
|
+
* Values only: when the bar painted from the same definitions is attached, rewrite just the value cells' text
|
|
103
|
+
* and title (elements kept). Otherwise repaint fully; the resulting markup equals a full paint.
|
|
104
|
+
*/
|
|
105
|
+
updateValues(): void;
|
|
106
|
+
/** 값 칸의 글자와 title(그리기·값만 고치기가 함께 쓰는 한 곳). / Text and title of a value cell. */
|
|
107
|
+
private _writeValue;
|
|
108
|
+
/** 따라가기를 풀고 막대 참조를 놓는다(막대 요소는 컨테이너와 함께 사라진다). / Releases the follower and the bar reference. */
|
|
109
|
+
destroy(): void;
|
|
110
|
+
/**
|
|
111
|
+
* 잎 하나의 칸 폭. 폭이 저장된 잎은 기하에 묻고, 저장된 폭이 없으면 100px, 폭 배열 자체가 없으면 잎의 width(없으면 100) —
|
|
112
|
+
* 모두 지금 동작. 기하 범위 밖(합쳐 그리기가 마지막 잎을 넘는 경우)은 저장된 값이나 100px.
|
|
113
|
+
*
|
|
114
|
+
* Width of one leaf: from the geometry when a width is stored, otherwise 100px (or the leaf's own width
|
|
115
|
+
* when there is no array at all) — all current behaviour.
|
|
116
|
+
*/
|
|
117
|
+
/** 그 잎의 칸 폭이 기하에서 오나(저장 폭이 있고 기하 범위 안). / Whether the leaf's width comes from the geometry. */
|
|
118
|
+
private _fromGeometry;
|
|
119
|
+
private _widthAt;
|
|
120
|
+
private _release;
|
|
121
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { GeometryChange, IColumnGeometry } from '../coordinate/geometryPorts.js';
|
|
2
|
+
import { ICellRegistry, IGeometryApplier, ProjectionScope, WidthProps } from './ports.js';
|
|
3
|
+
type StyleProp = 'width' | 'minWidth' | 'maxWidth' | 'left';
|
|
4
|
+
/**
|
|
5
|
+
* 기하에서 나온 px 를 DOM 에 쓰는 유일한 객체.
|
|
6
|
+
* 불변: applyChange 뒤 등록된(살아 있는) 모든 폭 자리의 px == 기하 값 · 칸은 지도에 묻고 등록하지 않음 ·
|
|
7
|
+
* release(scope) 뒤 그 범위 등록 0(다른 범위는 건드리지 않음).
|
|
8
|
+
*
|
|
9
|
+
* Sole writer of geometry-derived px. Cells come from the registry; other spots are registered per scope.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GeometryApplier implements IGeometryApplier {
|
|
12
|
+
private readonly _geometry;
|
|
13
|
+
private readonly _cells;
|
|
14
|
+
private readonly _stores;
|
|
15
|
+
constructor(geometry: IColumnGeometry, cells: ICellRegistry);
|
|
16
|
+
/** 칸 폭을 쓴다(칸은 등록하지 않음 — 지도가 안다). */
|
|
17
|
+
writeCellWidth(el: HTMLElement, ci: number, p: WidthProps): void;
|
|
18
|
+
trackHeaderCell(th: HTMLElement, ci: number, p: WidthProps): void;
|
|
19
|
+
/** extraPx — 기하가 모르는 몫(마지막 컬럼을 넘는 병합의 넘은 컬럼 × 기본 폭 등). / px the geometry does not know. */
|
|
20
|
+
trackSpan(el: HTMLElement, ci: number, span: number, p: WidthProps, s: ProjectionScope, extraPx?: number): void;
|
|
21
|
+
/**
|
|
22
|
+
* 행 하나로 칸 여럿을 등록한다: row 의 자식 [firstChild, firstChild + (to − from)] 가 컬럼 [from, to] 의 칸 폭 자리.
|
|
23
|
+
* 칸 지도 밖 칸이 컬럼마다 있는 행(묶음 행 등)을 칸마다 등록하면 뜨거운 길에 기록이 칸 수만큼 생기므로 행 하나로 묶는다.
|
|
24
|
+
*
|
|
25
|
+
* Registers one row for many cells: row children [firstChild, firstChild + (to − from)] are the cells of columns
|
|
26
|
+
* [from, to]. Rows with an off-registry cell per column would otherwise create one record per cell on a hot path.
|
|
27
|
+
*/
|
|
28
|
+
trackRowCells(row: HTMLElement, firstChild: number, from: number, to: number, p: WidthProps, s: ProjectionScope): void;
|
|
29
|
+
trackLeft(el: HTMLElement, ci: number, s: ProjectionScope): void;
|
|
30
|
+
trackTotal(el: HTMLElement, prop: 'width' | 'minWidth', s: ProjectionScope): void;
|
|
31
|
+
trackExtra(el: HTMLElement, s: ProjectionScope): void;
|
|
32
|
+
trackGap(el: HTMLElement, from: number, to: number, s: ProjectionScope, extraPx?: number): void;
|
|
33
|
+
trackBar(el: HTMLElement, ci: number, span: number, ratio: number): void;
|
|
34
|
+
untrack(el: HTMLElement): void;
|
|
35
|
+
/** 그 범위의 등록을 모두 푼다 — 그 범위를 통째로 다시 그리기 직전에 부른다(다른 범위는 훑지 않음). */
|
|
36
|
+
release(s: ProjectionScope): void;
|
|
37
|
+
/**
|
|
38
|
+
* 바뀐 몫만 다시 쓴다: 바뀐 컬럼의 칸(지도)·고정 칸 left → 등록 자리(병합 span 은 칸 쓰기 뒤라 span 값이 이김).
|
|
39
|
+
* 값이 지금과 같으면 쓰지 않는다. DOM 에서 떨어진 요소는 건너뛰고 등록을 푼다.
|
|
40
|
+
*/
|
|
41
|
+
applyChange(change: GeometryChange, opts?: {
|
|
42
|
+
skipScope?: 'body';
|
|
43
|
+
}): void;
|
|
44
|
+
/** 진단·시험용: 등록된 자리마다 기하가 정한 값(행 등록은 칸마다 펼침). */
|
|
45
|
+
projections(scope?: ProjectionScope): readonly {
|
|
46
|
+
el: HTMLElement;
|
|
47
|
+
prop: StyleProp;
|
|
48
|
+
value: string;
|
|
49
|
+
}[];
|
|
50
|
+
/** 진단·시험용: 등록 수(요소 하나에 등록이 둘이면 둘로, 행 등록은 하나로 셈). */
|
|
51
|
+
trackedCount(scope?: ProjectionScope): number;
|
|
52
|
+
private _pick;
|
|
53
|
+
private _add;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IColumnGeometry, ViewportBox } from '../coordinate/geometryPorts.js';
|
|
2
|
+
import { IHorizontalReveal } from './ports.js';
|
|
3
|
+
/** 옮기기에 필요한 스크롤 쪽(스크롤 관찰 객체가 구현). / The scroll side needed to move (implemented by the scroll observer). */
|
|
4
|
+
export interface RevealScroll {
|
|
5
|
+
readonly box: ViewportBox;
|
|
6
|
+
scrollLeftTo(x: number): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 컬럼 하나가 보이도록 가로 위치를 정하는 곳. 상태 없음(기하·상자는 부를 때마다 묻는다).
|
|
10
|
+
*
|
|
11
|
+
* Decides the horizontal offset that reveals one column. Stateless (geometry and box are asked per call).
|
|
12
|
+
*/
|
|
13
|
+
export declare class HorizontalReveal implements IHorizontalReveal {
|
|
14
|
+
private readonly _scroll;
|
|
15
|
+
private readonly _geometry;
|
|
16
|
+
constructor(_scroll: RevealScroll, _geometry: IColumnGeometry);
|
|
17
|
+
revealColumn(ci: number): void;
|
|
18
|
+
/**
|
|
19
|
+
* 컬럼 ci 가 보이게 옮기고 새 scrollLeft 를 돌려준다. 이미 보이거나(고정 컬럼 포함) 보이는 폭을 모르면 null(안 옮김).
|
|
20
|
+
* 컬럼이 보이는 폭보다 넓으면 왼쪽 끝을 맞춘다.
|
|
21
|
+
*
|
|
22
|
+
* Moves so column ci is visible and returns the new scrollLeft; null when already visible (frozen included) or the
|
|
23
|
+
* viewport width is unknown. A column wider than the viewport is aligned to its left edge.
|
|
24
|
+
*/
|
|
25
|
+
reveal(ci: number): number | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IRangeOverlay } from './ports.js';
|
|
2
|
+
/** 덧그림을 다시 그릴 줄 아는 것(범위 선택 관리자). / Something that can repaint the range overlay. */
|
|
3
|
+
export interface RangeOverlayTarget {
|
|
4
|
+
repaint(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class RangeOverlayAdapter implements IRangeOverlay {
|
|
7
|
+
private readonly _target;
|
|
8
|
+
constructor(target: RangeOverlayTarget);
|
|
9
|
+
repaint(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { GridShape, IColumnWindow, WindowQuery, IColumnGeometry } from '../coordinate/geometryPorts.js';
|
|
2
|
+
import { ColWork, IRenderPlan, IRenderPlanner, IRenderRequest, NextState, RowWork } from '../domain/render/ports.js';
|
|
3
|
+
import { FramePort, IFooterView, IGeometryApplier, IHeaderSortIndicator, IRangeOverlay, IRenderScheduler, IScrollObserver } from './ports.js';
|
|
4
|
+
/**
|
|
5
|
+
* 옛 그리기 길 — 본문을 행 범위로 통째 다시 그리는 함수와, 「보이는 범위」를 묻는 함수.
|
|
6
|
+
* 끝 번호는 포함(지금 `_doRender(시작, 끝)` 과 같은 뜻), `(0, −1)` 은 본문 비우기.
|
|
7
|
+
*
|
|
8
|
+
* Legacy paint path: full body repaint over an inclusive row range, plus the current visible range.
|
|
9
|
+
*/
|
|
10
|
+
export interface LegacyPaintPort {
|
|
11
|
+
/**
|
|
12
|
+
* `columns` = 그릴 가로 창(가로 창을 쓰지 않으면 넘기지 않음 — 받는 쪽은 전 컬럼). `rowWork` = `'diff'` 면 행 차분
|
|
13
|
+
* (남는 행은 그대로 두고 들어온 행만 만들고 나간 행만 뗌 — 남는 행의 창 옮김까지 함께), 없으면 그 범위를 통째로.
|
|
14
|
+
*
|
|
15
|
+
* `columns` = column window (omitted = all columns); `rowWork: 'diff'` asks for a row diff (keep remaining rows,
|
|
16
|
+
* create entering, remove leaving — including the window shift of remaining rows); omitted = full repaint of the range.
|
|
17
|
+
*/
|
|
18
|
+
paintRows(startIndex: number, endIndex: number, columns?: IColumnWindow, rowWork?: 'diff'): void;
|
|
19
|
+
visibleRows(): readonly [number, number];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 스케줄러 협력자 — 그리기 객체가 하나씩 물릴 때마다 칸이 자란다(없는 칸은 옛 그리기 길이 맡음).
|
|
23
|
+
*
|
|
24
|
+
* Collaborators; a slot is added as each paint object is wired in (missing slots are still handled by the legacy path).
|
|
25
|
+
*/
|
|
26
|
+
export interface RenderSchedulerStartDeps {
|
|
27
|
+
readonly planner: IRenderPlanner;
|
|
28
|
+
readonly paint: LegacyPaintPort;
|
|
29
|
+
/** 푸터 막대(있으면 계획의 footer 일을 여기서 시킴). / Footer bar; when present the plan's footer work runs here. */
|
|
30
|
+
readonly footer?: IFooterView;
|
|
31
|
+
/**
|
|
32
|
+
* 머리글 정렬 표시(있으면 계획의 `header: 'sortIndicator'` 를 여기서 — 머리글을 다시 만들지 않고 화살표·aria-sort 만).
|
|
33
|
+
* 지금 정렬 목록은 `sortList` 로 묻는다(둘이 함께 있어야 실행).
|
|
34
|
+
*
|
|
35
|
+
* Header sort marks; when present the plan's `header: 'sortIndicator'` patches arrows/aria-sort here (no header rebuild).
|
|
36
|
+
*/
|
|
37
|
+
readonly sort?: IHeaderSortIndicator;
|
|
38
|
+
readonly sortList?: () => readonly {
|
|
39
|
+
readonly field: string;
|
|
40
|
+
readonly dir: 'asc' | 'desc';
|
|
41
|
+
}[];
|
|
42
|
+
/**
|
|
43
|
+
* 기하와 그 투영(있으면 계획의 `geometry` 를 여기서 — 등록해 둔 폭 자리에만 px 를 씀, 본문을 다시 만들지 않음).
|
|
44
|
+
* 둘이 함께 있어야 실행. 스케줄러가 「마지막으로 DOM 에 반영한 기하 판」을 든다.
|
|
45
|
+
* 값 대신 「지금 것을 돌려주는 함수」도 받는다 — 스케줄러는 그리드를 붙이기(마운트) 전에 생기고 기하·투영은 그 뒤에 생기므로
|
|
46
|
+
* (아직 없으면 null → 그 일을 건너뜀). 쓰는 몫만 받는다(판 번호·폭 목록·바뀐 몫 / 바뀐 몫 반영).
|
|
47
|
+
*
|
|
48
|
+
* Geometry and its projector, or functions returning the current ones (they appear after the scheduler, at mount;
|
|
49
|
+
* null skips the work). Only the members the scheduler uses are required.
|
|
50
|
+
*/
|
|
51
|
+
readonly geometry?: Late<Pick<IColumnGeometry, 'version' | 'widths' | 'changesSince'>>;
|
|
52
|
+
readonly applier?: Late<Pick<IGeometryApplier, 'applyChange'>>;
|
|
53
|
+
/**
|
|
54
|
+
* 줄바꿈 머리글이면 기하를 반영한 프레임마다 부른다 — 머리글 높이를 재어 달라졌을 때만 본문 자리를 맞추는 일은 그 주인 몫
|
|
55
|
+
* (높이 기준을 한 곳만 들어야 머리글을 다른 길로 다시 그려도 기준이 낡지 않는다).
|
|
56
|
+
*
|
|
57
|
+
* Called once per geometry frame for wrapping headers; comparing the header height with the last laid-out one is the
|
|
58
|
+
* owner's job (one baseline, so a header redrawn by another path never leaves it stale).
|
|
59
|
+
*/
|
|
60
|
+
readonly headerLayout?: () => void; /** 머리글이 줄바꿈되나(아니면 높이를 묻지 않음 — 끄는 프레임마다 배치를 강제하지 않게). / Whether the header wraps. */
|
|
61
|
+
readonly headerWraps?: () => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 범위 덧그림. 행을 다시 그리지 않는 계획(폭만 바뀜 등)에서 계획의 `overlay` 를 여기서 — 행을 다시 그리는 계획은 옛 그리기 길이
|
|
64
|
+
* 이미 덧그림을 고친다. 고를 범위가 없으면 덧그림 쪽이 바로 돌아간다.
|
|
65
|
+
*
|
|
66
|
+
* Range overlay; runs the plan's `overlay` for plans without row work (the legacy row path already repaints it).
|
|
67
|
+
*/
|
|
68
|
+
readonly overlay?: IRangeOverlay;
|
|
69
|
+
/**
|
|
70
|
+
* 가로 창(넷이 다 있어야 씀 — 하나라도 없으면 전 컬럼으로 그려 지금과 같다).
|
|
71
|
+
* `window` = 창 정책의 프레임 입구(그려 둔 창을 둘지·새로 셀지), `scroll` = 이벤트에서 이미 읽은 가로 위치·보이는 폭,
|
|
72
|
+
* `shape` = 창 규칙의 입력(자동 높이·병합·옵션), `body` = 그려 둔 창을 아는 본문과 「창만 옮기기」.
|
|
73
|
+
* `pinnedColumns` = 화면 밖이어도 그릴 컬럼(편집 중·포커스 — 없으면 빈 목록).
|
|
74
|
+
*
|
|
75
|
+
* Column window; used only when all four are present, otherwise every column is painted exactly as before.
|
|
76
|
+
*/
|
|
77
|
+
readonly window?: Late<WindowEntry>;
|
|
78
|
+
readonly scroll?: Late<Pick<IScrollObserver, 'box'>>;
|
|
79
|
+
readonly shape?: () => GridShape;
|
|
80
|
+
readonly body?: Late<BodyWindowPort>;
|
|
81
|
+
readonly pinnedColumns?: () => readonly number[];
|
|
82
|
+
}
|
|
83
|
+
/** 값, 또는 지금 값을 돌려주는 함수(아직 없으면 null). / A value, or a function returning the current one (null = not yet). */
|
|
84
|
+
export type Late<T extends object> = T | (() => T | null);
|
|
85
|
+
/** 창 정책의 프레임 입구. / The window policy's per-frame entry. */
|
|
86
|
+
export interface WindowEntry {
|
|
87
|
+
next(drawn: IColumnWindow | null, q: WindowQuery, shape: GridShape): IColumnWindow;
|
|
88
|
+
}
|
|
89
|
+
/** 본문 쪽 창 몫: 그려 둔 창과 「창만 옮기기」. / The body's window share: drawn window and window-only update. */
|
|
90
|
+
export interface BodyWindowPort {
|
|
91
|
+
/**
|
|
92
|
+
* 그려 둔 창과, 그려 둔 행에 행 차분을 막는 종류(세로 병합·묶음·나무·디테일·자동 높이)가 있는지 — 본문만 안다.
|
|
93
|
+
* `diffBlocked` 를 주지 않으면 막힘으로 본다(통째 — 안전한 쪽).
|
|
94
|
+
*
|
|
95
|
+
* Drawn window, and whether the drawn rows block a row diff; a missing `diffBlocked` counts as blocked.
|
|
96
|
+
*/
|
|
97
|
+
readonly drawn: {
|
|
98
|
+
readonly columns: IColumnWindow | null;
|
|
99
|
+
readonly diffBlocked?: boolean;
|
|
100
|
+
};
|
|
101
|
+
update(next: NextState, rows: RowWork, cols: ColWork): void;
|
|
102
|
+
}
|
|
103
|
+
/** rAF 를 감싼 프레임 시계. / requestAnimationFrame-backed frame clock. */
|
|
104
|
+
export declare const RAF_FRAME: FramePort;
|
|
105
|
+
/**
|
|
106
|
+
* 요청을 모았다가 계획을 받아 실행하는 유일한 곳. 「할 일 결정」은 하지 않는다(계획 객체 몫).
|
|
107
|
+
* - sync 요청: 쌓인 요청까지 합쳐 그 자리에서 한 번 실행(예약 프레임 취소) — 공개 API 의 「호출이 끝나면 DOM 이 맞음」.
|
|
108
|
+
* - sync 아닌 요청: 합쳐 두고 다음 프레임에 한 번.
|
|
109
|
+
* - 실행 중 들어온 요청: sync 아니면 다음 프레임으로. sync 면 안쪽으로 재귀하지 않고 지금 실행이 끝난 바로 뒤
|
|
110
|
+
* 같은 호출 안에서 한 번 더(부른 쪽이 돌아올 때 DOM 이 맞음 · 재진입 없음).
|
|
111
|
+
* - 쌓인 sync 아닌 요청(세로 스크롤 쪽)은 sync 요청이 오면 함께 얼려 한 번에 그린다 — 같은 프레임에 두 번 그리지 않게.
|
|
112
|
+
* - 프레임에서 실행하다 던진 오류는 보고만 하고 다음 요청을 계속 받는다. sync 실행의 오류는 부른 쪽으로 그대로 던진다.
|
|
113
|
+
* - 합치기 규칙은 요청 쪽 누적기(`RenderRequestAccumulator`)가 안다 — 여기서는 하나를 들고 더하기만 하고 실행할 때 얼린다.
|
|
114
|
+
*
|
|
115
|
+
* Single place that batches requests and runs the planner's plan. Sync requests flush everything now; others wait
|
|
116
|
+
* for the next frame; mid-run requests never recurse (sync ones run again right after the current run, others next frame).
|
|
117
|
+
* The merge rules belong to the request-side accumulator; this object only adds to one and freezes it per run.
|
|
118
|
+
*/
|
|
119
|
+
export declare class RenderScheduler implements IRenderScheduler {
|
|
120
|
+
private readonly _frame;
|
|
121
|
+
private readonly _planner;
|
|
122
|
+
private readonly _paint;
|
|
123
|
+
private readonly _footer;
|
|
124
|
+
private readonly _sort;
|
|
125
|
+
private readonly _geometry;
|
|
126
|
+
private readonly _applier;
|
|
127
|
+
private readonly _headerLayout;
|
|
128
|
+
private readonly _headerWraps;
|
|
129
|
+
private readonly _overlay;
|
|
130
|
+
private readonly _win;
|
|
131
|
+
/** 마지막으로 DOM 에 반영한 기하 판(처음엔 지금 판 — 처음 그림이 그 판으로 그려짐). / Last geometry version projected to the DOM. */
|
|
132
|
+
private _applied;
|
|
133
|
+
private readonly _sortList;
|
|
134
|
+
private readonly _queue;
|
|
135
|
+
private _lastPlan;
|
|
136
|
+
private _frameId;
|
|
137
|
+
private _depth;
|
|
138
|
+
private _destroyed;
|
|
139
|
+
/**
|
|
140
|
+
* 그려 둔 행 범위(아직 안 그림·그리다 실패함 = null). 본문 객체가 물리면 그쪽이 그려 둔 상태의 주인이 된다.
|
|
141
|
+
*
|
|
142
|
+
* Row range drawn last (null = never drawn or the last paint threw). The body view takes this over once wired in.
|
|
143
|
+
*/
|
|
144
|
+
private _drawnRows;
|
|
145
|
+
/** 그리기를 시작한 차례 번호(안쪽 실행을 가려내려고). / Paint sequence number (to detect nested paints). */
|
|
146
|
+
private _paintSeq;
|
|
147
|
+
/** 실행 중 sync 요청이 들어와 끝난 뒤 한 번 더 돌아야 함. / A sync request arrived mid-run; run again afterwards. */
|
|
148
|
+
private _rerun;
|
|
149
|
+
constructor(frame: FramePort, deps: RenderSchedulerStartDeps);
|
|
150
|
+
get lastPlan(): IRenderPlan | null;
|
|
151
|
+
/** 지금 실행 중인 깊이(0 = 실행 중 아님). 진단용. / Current run depth (diagnostics). */
|
|
152
|
+
get depth(): number;
|
|
153
|
+
submit(req: IRenderRequest): void;
|
|
154
|
+
flushNow(): void;
|
|
155
|
+
destroy(): void;
|
|
156
|
+
private _schedule;
|
|
157
|
+
private _cancelFrame;
|
|
158
|
+
/**
|
|
159
|
+
* 쌓인 요청을 한 번 얼려 계획을 받고 실행한다.
|
|
160
|
+
*
|
|
161
|
+
* Freezes the accumulated request once, asks the planner and runs the plan.
|
|
162
|
+
*/
|
|
163
|
+
private _run;
|
|
164
|
+
/**
|
|
165
|
+
* 다음 상태를 만드는 유일한 곳: 행은 요청의 명시 범위, 없으면 지금 보이는 범위 하나(세로 창 범위 — 끝 포함 → 반열림).
|
|
166
|
+
* 범위는 요청을 낸 때가 아니라 그릴 때 묻는다(그 사이에 바뀐 보이는 높이·행 수가 들어가게).
|
|
167
|
+
*
|
|
168
|
+
* Sole builder of the next state: explicit rows, else the single visible range (the vertical window, inclusive →
|
|
169
|
+
* half-open), asked at paint time rather than at submit time.
|
|
170
|
+
*/
|
|
171
|
+
private _next;
|
|
172
|
+
/**
|
|
173
|
+
* 다음 창: 창 정책의 프레임 입구에 그려 둔 창·가로 위치·꼭 넣을 컬럼·모양을 넘긴다(그대로 둘지·새로 셀지는 정책이 정함 —
|
|
174
|
+
* 그대로면 같은 객체라 계획이 「창 일 0」을 낸다). 창을 쓰지 않으면 늘 같은 「없음」 창.
|
|
175
|
+
*
|
|
176
|
+
* Next window from the policy's per-frame entry (the same object back means no window work); a fixed empty window otherwise.
|
|
177
|
+
*/
|
|
178
|
+
private _nextColumns;
|
|
179
|
+
/** 본문이 그려 둔 창(창을 안 쓰면 늘 같은 「없음」 창, 본문이 아직 없으면 null). / Window drawn by the body. */
|
|
180
|
+
private _drawnColumns;
|
|
181
|
+
private _drawn;
|
|
182
|
+
/**
|
|
183
|
+
* 계획을 실행한다: 행 일은 옛 그리기 길로, 정렬 표시·푸터 일은 그 포트가 있으면 그리로. 머리글 통째·덧그림 칸은 옛 길이
|
|
184
|
+
* 지금처럼 맡으므로(본문 다시 그리기가 범위 덧그림을 함께 하고, 머리글 통째는 부르는 쪽이 그림) 기록(lastPlan)만 한다.
|
|
185
|
+
* 「그려 둔 범위」는 그린 뒤에 적는다 — 그리다 던지면 무엇이 그려져 있는지 모르므로 null.
|
|
186
|
+
*
|
|
187
|
+
* Runs the plan: row work through the legacy paint path, sort-mark and footer work through their ports when present;
|
|
188
|
+
* full header and overlay cells are only recorded. The drawn range is recorded after painting (null if the paint throws).
|
|
189
|
+
*/
|
|
190
|
+
private _execute;
|
|
191
|
+
/**
|
|
192
|
+
* 기하 일: 마지막으로 반영한 판 이후 바뀐 몫을 투영에 한 번 넘긴다(등록 자리에만 px — 읽기 0). 행을 다시 그리는 계획이어도
|
|
193
|
+
* 먼저 한다(머리글·푸터 자리는 행 다시 그리기가 안 고침) — 다만 그때 본문 자리는 곧 새로 그려 버려지므로 건너뛰게 한다.
|
|
194
|
+
* 줄바꿈 머리글이면 그 뒤 자리 맞춤 주인을 한 번 부른다(높이가 마지막으로 맞춘 값과 다를 때만 맞추는 것은 그쪽 몫).
|
|
195
|
+
*
|
|
196
|
+
* Geometry work: hand the change since the last projected version to the applier once (tracked slots only, no reads);
|
|
197
|
+
* body slots are skipped when rows are about to be rebuilt. For wrapping headers, the layout owner is called once and
|
|
198
|
+
* relayouts only when the height differs from the last laid-out one.
|
|
199
|
+
*/
|
|
200
|
+
private _executeGeometry;
|
|
201
|
+
/** 덧그림: 행을 다시 그리지 않는 계획에서만(행 다시 그리기는 옛 길이 덧그림까지 고침). / Overlay only when no row work. */
|
|
202
|
+
private _executeOverlay;
|
|
203
|
+
/**
|
|
204
|
+
* 머리글 일: 정렬 표시만이면(`sortIndicator`) 표시 객체에 지금 정렬 목록을 알린다(바뀐 칸만 고침 — 같은 목록이면 일 0).
|
|
205
|
+
* 머리글 통째(`rebuild`)는 아직 옛 길(부르는 쪽의 renderHeader)이 맡는다.
|
|
206
|
+
*
|
|
207
|
+
* Header work: `sortIndicator` notifies the indicator with the current sort list (only changed cells are patched);
|
|
208
|
+
* a full header rebuild is still done by the legacy path.
|
|
209
|
+
*/
|
|
210
|
+
private _executeHeader;
|
|
211
|
+
/**
|
|
212
|
+
* 창 일: 행은 그대로 두고 창만 옮긴다(들어온 컬럼 칸만 만들고 나간 컬럼 칸만 뗌 — 본문 쪽 몫). 계획은 창이 실제로
|
|
213
|
+
* 달라졌을 때만, 그리고 행을 새로 그리지 않을 때만 이 일을 낸다(새로 그리면 이미 새 창으로 그려짐).
|
|
214
|
+
*
|
|
215
|
+
* Window work: move the window without touching rows; planned only when the window really changed and rows are not rebuilt.
|
|
216
|
+
*/
|
|
217
|
+
private _executeCols;
|
|
218
|
+
private _executeRows;
|
|
219
|
+
/**
|
|
220
|
+
* 푸터 일은 행 일 뒤에, 행 일이 없어도 계획대로: 막대 다시 → paint, 값만 → updateValues. 푸터 포트가 없으면 옛 길이 맡는다.
|
|
221
|
+
*
|
|
222
|
+
* Footer work runs after the row work, even when there is none: rebuild → paint, values → updateValues.
|
|
223
|
+
*/
|
|
224
|
+
private _executeFooter;
|
|
225
|
+
}
|