@olvnck/ingrid 0.0.0-stage → 0.15.21
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 +13 -0
- package/LICENSE +21 -0
- package/README.md +5535 -2
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/dist/engine/clipboard/copy.d.ts +40 -0
- package/dist/engine/clipboard/options.d.ts +16 -0
- package/dist/engine/clipboard/text.d.ts +32 -0
- package/dist/engine/columns/autosize.d.ts +43 -0
- package/dist/engine/columns/dataType.d.ts +30 -0
- package/dist/engine/columns/fold.d.ts +48 -0
- package/dist/engine/columns/layout.d.ts +150 -0
- package/dist/engine/columns/model.d.ts +369 -0
- package/dist/engine/columns/query.d.ts +16 -0
- package/dist/engine/columns/tooltips.d.ts +27 -0
- package/dist/engine/data/client/clientSource.d.ts +151 -0
- package/dist/engine/data/client/columnFilters.d.ts +106 -0
- package/dist/engine/data/client/descendants.d.ts +35 -0
- package/dist/engine/data/client/diff.d.ts +23 -0
- package/dist/engine/data/client/fields.d.ts +70 -0
- package/dist/engine/data/client/filter.d.ts +95 -0
- package/dist/engine/data/client/flatten.d.ts +141 -0
- package/dist/engine/data/client/groupSize.d.ts +14 -0
- package/dist/engine/data/client/hierarchy.d.ts +85 -0
- package/dist/engine/data/client/order.d.ts +32 -0
- package/dist/engine/data/client/pipeline.d.ts +277 -0
- package/dist/engine/data/client/remap.d.ts +33 -0
- package/dist/engine/data/client/trees.d.ts +41 -0
- package/dist/engine/data/client/types.d.ts +173 -0
- package/dist/engine/data/memory/generate.d.ts +36 -0
- package/dist/engine/data/memory/memoryDatasource.d.ts +46 -0
- package/dist/engine/data/rowKey.d.ts +15 -0
- package/dist/engine/data/server/contract.d.ts +64 -0
- package/dist/engine/data/server/expansion.d.ts +35 -0
- package/dist/engine/data/server/levelStore.d.ts +99 -0
- package/dist/engine/data/server/loader.d.ts +128 -0
- package/dist/engine/data/server/reader.d.ts +88 -0
- package/dist/engine/data/server/response.d.ts +31 -0
- package/dist/engine/data/server/serverSource.d.ts +130 -0
- package/dist/engine/data/shared/aggregate.d.ts +12 -0
- package/dist/engine/data/shared/columnFilter.d.ts +19 -0
- package/dist/engine/data/shared/compare.d.ts +12 -0
- package/dist/engine/data/shared/dateParts.d.ts +19 -0
- package/dist/engine/data/shared/distinct.d.ts +30 -0
- package/dist/engine/data/shared/filterRecord.d.ts +7 -0
- package/dist/engine/data/shared/keys.d.ts +17 -0
- package/dist/engine/data/shared/quickFilter.d.ts +17 -0
- package/dist/engine/data/shared/sourceUtils.d.ts +11 -0
- package/dist/engine/data/shared/splice.d.ts +9 -0
- package/dist/engine/detail/builds.d.ts +26 -0
- package/dist/engine/detail/content.d.ts +24 -0
- package/dist/engine/detail/controller.d.ts +176 -0
- package/dist/engine/detail/events.d.ts +11 -0
- package/dist/engine/detail/follow.d.ts +56 -0
- package/dist/engine/detail/layer.d.ts +119 -0
- package/dist/engine/detail/live.d.ts +96 -0
- package/dist/engine/detail/options.d.ts +53 -0
- package/dist/engine/detail/state.d.ts +140 -0
- package/dist/engine/edit/clear.d.ts +20 -0
- package/dist/engine/edit/editing.d.ts +4 -0
- package/dist/engine/edit/editors/date.d.ts +3 -0
- package/dist/engine/edit/editors/index.d.ts +23 -0
- package/dist/engine/edit/editors/internals.d.ts +25 -0
- package/dist/engine/edit/editors/largeText.d.ts +2 -0
- package/dist/engine/edit/editors/number.d.ts +4 -0
- package/dist/engine/edit/editors/select.d.ts +2 -0
- package/dist/engine/edit/editors/text.d.ts +15 -0
- package/dist/engine/edit/fill.d.ts +47 -0
- package/dist/engine/edit/fillHandle.d.ts +66 -0
- package/dist/engine/edit/fillValues.d.ts +15 -0
- package/dist/engine/edit/operations.d.ts +68 -0
- package/dist/engine/edit/paste.d.ts +23 -0
- package/dist/engine/edit/pastePlan.d.ts +17 -0
- package/dist/engine/edit/popupHost.d.ts +63 -0
- package/dist/engine/edit/session.d.ts +52 -0
- package/dist/engine/edit/types.d.ts +234 -0
- package/dist/engine/edit/undo.d.ts +38 -0
- package/dist/engine/edit/validation.d.ts +10 -0
- package/dist/engine/edit/values.d.ts +38 -0
- package/dist/engine/export/columns.d.ts +19 -0
- package/dist/engine/export/deliver.d.ts +47 -0
- package/dist/engine/export/dsv.d.ts +2 -0
- package/dist/engine/export/expanded.d.ts +69 -0
- package/dist/engine/export/export.d.ts +25 -0
- package/dist/engine/export/headers.d.ts +15 -0
- package/dist/engine/export/options.d.ts +19 -0
- package/dist/engine/export/plan.d.ts +43 -0
- package/dist/engine/export/values.d.ts +33 -0
- package/dist/engine/export/walk.d.ts +31 -0
- package/dist/engine/export/writer.d.ts +62 -0
- package/dist/engine/export/xlsx/cells.d.ts +31 -0
- package/dist/engine/export/xlsx/index.d.ts +12 -0
- package/dist/engine/export/xlsx/parts.d.ts +36 -0
- package/dist/engine/export/xlsx/sheet.d.ts +30 -0
- package/dist/engine/export/xlsx/styles.d.ts +15 -0
- package/dist/engine/export/xlsx/table.d.ts +8 -0
- package/dist/engine/export/xlsx/zip.d.ts +24 -0
- package/dist/engine/filter/groupFilter.d.ts +28 -0
- package/dist/engine/filter/model.d.ts +235 -0
- package/dist/engine/filter/shorthand.d.ts +36 -0
- package/dist/engine/filter/state.d.ts +76 -0
- package/dist/engine/filter/summary.d.ts +16 -0
- package/dist/engine/filter/values.d.ts +40 -0
- package/dist/engine/find/index.d.ts +94 -0
- package/dist/engine/find/match.d.ts +38 -0
- package/dist/engine/find/model.d.ts +115 -0
- package/dist/engine/grid.d.ts +42 -0
- package/dist/engine/i18n/numbers.d.ts +34 -0
- package/dist/engine/i18n/texts.d.ts +306 -0
- package/dist/engine/interact/autoScroll.d.ts +11 -0
- package/dist/engine/interact/body.d.ts +41 -0
- package/dist/engine/interact/focus.d.ts +158 -0
- package/dist/engine/interact/header.d.ts +216 -0
- package/dist/engine/interact/host.d.ts +400 -0
- package/dist/engine/interact/keyboard.d.ts +20 -0
- package/dist/engine/interact/menuKey.d.ts +7 -0
- package/dist/engine/interact/own.d.ts +2 -0
- package/dist/engine/interact/ranges.d.ts +68 -0
- package/dist/engine/interact/rowSelection.d.ts +53 -0
- package/dist/engine/interact/shortcut.d.ts +21 -0
- package/dist/engine/interact/tooltips.d.ts +63 -0
- package/dist/engine/measure.d.ts +30 -0
- package/dist/engine/render/cells.d.ts +322 -0
- package/dist/engine/render/columns.d.ts +28 -0
- package/dist/engine/render/dom.d.ts +24 -0
- package/dist/engine/render/flash.d.ts +74 -0
- package/dist/engine/render/groupCell.d.ts +50 -0
- package/dist/engine/render/groupPanel.d.ts +21 -0
- package/dist/engine/render/header.d.ts +162 -0
- package/dist/engine/render/overlay.d.ts +15 -0
- package/dist/engine/render/pinnedRows.d.ts +106 -0
- package/dist/engine/render/rowPool.d.ts +3 -0
- package/dist/engine/render/scrollbars.d.ts +77 -0
- package/dist/engine/render/strategy.d.ts +397 -0
- package/dist/engine/reportError.d.ts +7 -0
- package/dist/engine/rowdrag/controller.d.ts +80 -0
- package/dist/engine/rowdrag/events.d.ts +17 -0
- package/dist/engine/rowdrag/gesture.d.ts +33 -0
- package/dist/engine/rowdrag/keys.d.ts +21 -0
- package/dist/engine/rowdrag/model.d.ts +67 -0
- package/dist/engine/rowdrag/options.d.ts +34 -0
- package/dist/engine/rowdrag/rows.d.ts +61 -0
- package/dist/engine/rowdrag/target.d.ts +59 -0
- package/dist/engine/rowdrag/zones.d.ts +79 -0
- package/dist/engine/schedule.d.ts +29 -0
- package/dist/engine/selection/aggregate.d.ts +30 -0
- package/dist/engine/selection/options.d.ts +7 -0
- package/dist/engine/selection/rangeRows.d.ts +19 -0
- package/dist/engine/selection/ranges.d.ts +114 -0
- package/dist/engine/selection/rows.d.ts +207 -0
- package/dist/engine/source.d.ts +225 -0
- package/dist/engine/synthetic.d.ts +28 -0
- package/dist/engine/table/cells.d.ts +52 -0
- package/dist/engine/table/headers.d.ts +20 -0
- package/dist/engine/table/host.d.ts +65 -0
- package/dist/engine/table/job.d.ts +21 -0
- package/dist/engine/table/rows.d.ts +99 -0
- package/dist/engine/table/slicer.d.ts +54 -0
- package/dist/engine/table/takes.d.ts +145 -0
- package/dist/engine/types.d.ts +2950 -0
- package/dist/engine/ui/announce.d.ts +7 -0
- package/dist/engine/ui/chooser.d.ts +19 -0
- package/dist/engine/ui/columnList.d.ts +41 -0
- package/dist/engine/ui/columnMenu.d.ts +96 -0
- package/dist/engine/ui/columnsPanel.d.ts +16 -0
- package/dist/engine/ui/contextMenu.d.ts +48 -0
- package/dist/engine/ui/controller.d.ts +295 -0
- package/dist/engine/ui/filters/apply.d.ts +53 -0
- package/dist/engine/ui/filters/custom.d.ts +3 -0
- package/dist/engine/ui/filters/date.d.ts +12 -0
- package/dist/engine/ui/filters/host.d.ts +102 -0
- package/dist/engine/ui/filters/multi.d.ts +6 -0
- package/dist/engine/ui/filters/number.d.ts +15 -0
- package/dist/engine/ui/filters/numberMask.d.ts +15 -0
- package/dist/engine/ui/filters/set.d.ts +3 -0
- package/dist/engine/ui/filters/simple.d.ts +52 -0
- package/dist/engine/ui/filters/text.d.ts +5 -0
- package/dist/engine/ui/filtersPanel.d.ts +18 -0
- package/dist/engine/ui/floating.d.ts +66 -0
- package/dist/engine/ui/floatingShorthand.d.ts +20 -0
- package/dist/engine/ui/floatingTypes.d.ts +82 -0
- package/dist/engine/ui/icons.d.ts +25 -0
- package/dist/engine/ui/menu.d.ts +45 -0
- package/dist/engine/ui/overlayHost.d.ts +7 -0
- package/dist/engine/ui/place.d.ts +37 -0
- package/dist/engine/ui/popup.d.ts +97 -0
- package/dist/engine/ui/sideBar.d.ts +26 -0
- package/dist/engine/ui/statusBar.d.ts +29 -0
- package/dist/engine/ui/toolbar/buttons.d.ts +21 -0
- package/dist/engine/ui/toolbar/chipState.d.ts +52 -0
- package/dist/engine/ui/toolbar/chips.d.ts +23 -0
- package/dist/engine/ui/toolbar/findBox.d.ts +10 -0
- package/dist/engine/ui/toolbar/quickFilterBox.d.ts +12 -0
- package/dist/engine/ui/toolbar/registry.d.ts +5 -0
- package/dist/engine/ui/toolbar/toolbar.d.ts +31 -0
- package/dist/engine/ui/toolbar/types.d.ts +23 -0
- package/dist/engine/ui/tooltip.d.ts +34 -0
- package/dist/engine/ui/virtualList.d.ts +35 -0
- package/dist/engine/viewport/heightView.d.ts +62 -0
- package/dist/engine/viewport/heights.d.ts +39 -0
- package/dist/engine/viewport/intervals.d.ts +19 -0
- package/dist/engine/viewport/range.d.ts +51 -0
- package/dist/engine/viewport/scroll.d.ts +45 -0
- package/dist/engine/viewport/stack.d.ts +160 -0
- package/dist/grid-C34VEap6.js +32310 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1273 -0
- package/dist/ingrid.css +1 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.js +1 -0
- package/dist/locale/de.d.ts +4 -0
- package/dist/locale/de.js +222 -0
- package/dist/themes/primevue.css +63 -0
- package/dist/themes/tailwind.css +68 -0
- package/dist/vue/InGrid.vue.d.ts +263 -0
- package/dist/vue/stableOptions.d.ts +8 -0
- package/dist/vue/useClientSource.d.ts +28 -0
- package/dist/vue/useServerSource.d.ts +8 -0
- package/dist/vue/vueRenderer.d.ts +164 -0
- package/dist/xlsx-59umS_n_.js +325 -0
- package/package.json +78 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { RowRange } from '../viewport/range';
|
|
2
|
+
/**
|
|
3
|
+
* `flash`: `grid.flashCells` (hold, then fade). `change`: the change flash, timed as `flash` in its own tint.
|
|
4
|
+
* `copied`: the copy confirmation (its fade within its hold).
|
|
5
|
+
*/
|
|
6
|
+
export type FlashKind = 'flash' | 'change' | 'copied';
|
|
7
|
+
/** What `add` takes. */
|
|
8
|
+
export interface FlashTarget {
|
|
9
|
+
/** Display rows, inclusive (outside the rendered window too); 'all' = every row. */
|
|
10
|
+
rows: RowRange | readonly RowRange[] | 'all';
|
|
11
|
+
/** Column ids; 'all' = every column except the row-number and selection columns, which flash only when named. */
|
|
12
|
+
columns: Iterable<string> | 'all';
|
|
13
|
+
kind: FlashKind;
|
|
14
|
+
/** ms the highlight holds: before the fade (`flash`), the class's whole life (`copied`). */
|
|
15
|
+
hold: number;
|
|
16
|
+
/** ms of fade after the hold (0 for `copied`). */
|
|
17
|
+
fade: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What `add` takes for the change flash: the changed cells, display row → column ids. The registry
|
|
21
|
+
* keeps the map: the caller hands over a map it no longer changes.
|
|
22
|
+
*/
|
|
23
|
+
export interface FlashCellSet {
|
|
24
|
+
cells: ReadonlyMap<number, ReadonlySet<string>>;
|
|
25
|
+
kind: 'change';
|
|
26
|
+
hold: number;
|
|
27
|
+
fade: number;
|
|
28
|
+
}
|
|
29
|
+
/** One running flash. The pool keeps a cell's entry to tell a continuing flash from a new one. */
|
|
30
|
+
export interface FlashEntry {
|
|
31
|
+
/** Ascending, disjoint, non-adjacent; 'all' = every row. Empty for a cell-set entry. */
|
|
32
|
+
readonly rows: readonly RowRange[] | 'all';
|
|
33
|
+
/** Empty for a cell-set entry. */
|
|
34
|
+
readonly columns: ReadonlySet<string> | 'all';
|
|
35
|
+
/** A change flash's cells (display row → column ids); null for a `rows` × `columns` entry. */
|
|
36
|
+
readonly cells: ReadonlyMap<number, ReadonlySet<string>> | null;
|
|
37
|
+
readonly kind: FlashKind;
|
|
38
|
+
/** `performance.now()` at `add`. */
|
|
39
|
+
readonly start: number;
|
|
40
|
+
readonly hold: number;
|
|
41
|
+
/** When it leaves the registry: start + hold + fade. */
|
|
42
|
+
readonly end: number;
|
|
43
|
+
}
|
|
44
|
+
export interface FlashRegistry {
|
|
45
|
+
/** Moves whenever an entry comes or goes: the pool looks its bound cells up again. */
|
|
46
|
+
readonly version: number;
|
|
47
|
+
/** An entry is running (false: the pool does no flash work beyond clearing what it drew). */
|
|
48
|
+
readonly active: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* A new entry, newer than every other: where it covers a running one, it wins (the cell's flash restarts). An
|
|
51
|
+
* empty cell set adds nothing.
|
|
52
|
+
*/
|
|
53
|
+
add(target: FlashTarget | FlashCellSet): void;
|
|
54
|
+
/** Drops every entry (the positions no longer mean the same cells). */
|
|
55
|
+
clear(): void;
|
|
56
|
+
/**
|
|
57
|
+
* The newest entry covering a cell, null when none; `owned`: the cell's column is the row-number or the selection
|
|
58
|
+
* column. No allocation: called for every bound cell of a row the pool binds while a flash runs.
|
|
59
|
+
*/
|
|
60
|
+
lookup(row: number, column: string, owned: boolean): FlashEntry | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The cell's `animation-delay` in ms for `entry` on an animation that started at `base` (when the cell got its class):
|
|
64
|
+
* the animation is then at the entry's elapsed time, so every cell of one flash fades together. `ig-flash` and
|
|
65
|
+
* `ig-flash-change` hold through their delay (`backwards` fill), so it includes the hold; `ig-copied` fades from its start.
|
|
66
|
+
*/
|
|
67
|
+
export declare function flashDelay(entry: FlashEntry, base: number): number;
|
|
68
|
+
/** A theme time token's computed text (`500ms`, `0.5s`) in ms; `fallback` for anything else. */
|
|
69
|
+
export declare function parseTime(text: string, fallback: number): number;
|
|
70
|
+
/**
|
|
71
|
+
* The registry; `changed` runs when an entry came or went (the grid requests a pass). Must be created inside an effect
|
|
72
|
+
* scope: its timer stops with it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function createFlashRegistry(changed: () => void): FlashRegistry;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Locale } from '../i18n/texts';
|
|
2
|
+
import type { RowInfo } from '../source';
|
|
3
|
+
import type { CellView } from './cells';
|
|
4
|
+
/**
|
|
5
|
+
* A right-pointing chevron in a 12 × 12 box; CSS turns it down on expanded rows. Also the detail chevron's
|
|
6
|
+
* icon.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CHEVRON = "M4.5 2.5 8 6l-3.5 3.5";
|
|
9
|
+
/**
|
|
10
|
+
* What a group cell's chevron shows: nothing, a spacer (tree leaves), or the chevron collapsed, expanded, or expanded
|
|
11
|
+
* while the level below is on its way (`opening`).
|
|
12
|
+
*/
|
|
13
|
+
export type ToggleState = 'none' | 'spacer' | 'collapsed' | 'expanded' | 'opening';
|
|
14
|
+
/** The parts of a group-column cell: chevron, label (text and renderer host), count. */
|
|
15
|
+
export interface GroupParts {
|
|
16
|
+
toggle: HTMLElement;
|
|
17
|
+
label: HTMLElement;
|
|
18
|
+
countEl: HTMLElement;
|
|
19
|
+
count: Text;
|
|
20
|
+
/** Last written (write-if-changed). */
|
|
21
|
+
toggleState: ToggleState;
|
|
22
|
+
/** Count last written, -1 = none: compared as a number, so an unchanged count formats nothing per frame. */
|
|
23
|
+
shownCount: number;
|
|
24
|
+
/** The locale the count was last written with: a locale change rewrites it. */
|
|
25
|
+
shownLocale: Locale | null;
|
|
26
|
+
}
|
|
27
|
+
/** A group cell's parts, not yet in a cell: `ensureGroupParts` puts them in one, auto-size in its probe. */
|
|
28
|
+
export declare function createGroupParts(): GroupParts;
|
|
29
|
+
/** Turns a cell into a group cell: the text node and a renderer host move into the label. */
|
|
30
|
+
export declare function ensureGroupParts(cell: CellView): void;
|
|
31
|
+
/** Back to a plain cell (its column changed). */
|
|
32
|
+
export declare function releaseGroupParts(cell: CellView): void;
|
|
33
|
+
/**
|
|
34
|
+
* The chevron of a row: on expandable rows; tree leaves get a spacer so labels line up, and so do
|
|
35
|
+
* total rows: no chevron, the label where a group label of its level sits — one level deeper than its group
|
|
36
|
+
* (the row's `--ig-level`), the grand total at level 0.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toggleStateOf(info: RowInfo | null, tree: boolean): ToggleState;
|
|
39
|
+
/** The child count a row shows, -1 for none; a total row is not expandable, so none. */
|
|
40
|
+
export declare function countOf(info: RowInfo | null, showCount: boolean): number;
|
|
41
|
+
/** The count's text, `(N)` written in the group counts' number style; '' for none (-1). */
|
|
42
|
+
export declare function countText(count: number, locale: Locale): string;
|
|
43
|
+
/**
|
|
44
|
+
* True when the cell's renderer was last given an `info` whose toggle state (opening included) or child count
|
|
45
|
+
* differs from the row's: an expand emits splices only, so the toggled row is never re-bound by it. Compares
|
|
46
|
+
* fields, allocates nothing; false for cells without a renderer.
|
|
47
|
+
*/
|
|
48
|
+
export declare function rendererInfoStale(cell: CellView, info: RowInfo | null): boolean;
|
|
49
|
+
/** Chevron (a spacer for tree leaves) and child count, write-if-changed; runs in every frame. */
|
|
50
|
+
export declare function bindGroupParts(cell: CellView, info: RowInfo | null, tree: boolean, showCount: boolean, locale: Locale): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GridTexts } from '../i18n/texts';
|
|
2
|
+
export interface PanelChip {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GroupPanelView {
|
|
7
|
+
/** Shows `chips` (grouping order), or the hint when there are none; `shown` false hides the panel. */
|
|
8
|
+
update(chips: readonly PanelChip[], shown: boolean): void;
|
|
9
|
+
/** Rewrites the panel's texts after a locale change; `chips` as for `update`. */
|
|
10
|
+
retext(chips: readonly PanelChip[]): void;
|
|
11
|
+
/** The chips, in grouping order. */
|
|
12
|
+
chips(): HTMLElement[];
|
|
13
|
+
chipOf(id: string): HTMLElement | null;
|
|
14
|
+
/** Focuses the × of the chip at `index`, else of the one before it; false when hidden or without either. */
|
|
15
|
+
focusRemove(index: number): boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The row group panel: rendered by the engine into `el`, an element the grid keeps as its root's
|
|
19
|
+
* first child. Chips are rebuilt only when the grouping or a label changes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createGroupPanel(el: HTMLElement, texts: () => GridTexts): GroupPanelView;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { type DisplayLayout, type Segment } from '../columns/layout';
|
|
2
|
+
import type { GridTexts } from '../i18n/texts';
|
|
3
|
+
import type { HeaderIcons } from '../types';
|
|
4
|
+
/** A leaf column's header decorations, computed by the grid from definitions and filter state. */
|
|
5
|
+
export interface CellDecor {
|
|
6
|
+
/** The menu button shows. */
|
|
7
|
+
menu: boolean;
|
|
8
|
+
/** The filter button shows. */
|
|
9
|
+
filter: boolean;
|
|
10
|
+
/** The column has an applied filter model. */
|
|
11
|
+
active: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The group column hosts its grouped columns' filters: a header renderer's `column.filter` is 'grouped'
|
|
14
|
+
* when it has no own filter. Absent = false.
|
|
15
|
+
*/
|
|
16
|
+
grouped?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The column's floating cell hosts its floating filter (it has a filter and `floatingFilter`): the cell
|
|
19
|
+
* goes to the floating hooks while the column is displayed.
|
|
20
|
+
*/
|
|
21
|
+
floating: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** What the header gets with each update besides the layout. */
|
|
24
|
+
export interface HeaderDecor {
|
|
25
|
+
/** Per displayed leaf; a missing id = no buttons, not active. */
|
|
26
|
+
cells: ReadonlyMap<string, CellDecor>;
|
|
27
|
+
/** `GridOptions.columnMenu.button === 'hover'`. */
|
|
28
|
+
menuHover: boolean;
|
|
29
|
+
/** The floating-filter row shows. */
|
|
30
|
+
floating: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The column whose header cell shows the header checkbox: the selection column, or the group column with
|
|
33
|
+
* `checkboxLocation: 'group'`; null or absent = none. Its states are the grid's to write (`HeaderView.checkbox`).
|
|
34
|
+
*/
|
|
35
|
+
checkbox?: string | null;
|
|
36
|
+
/** `GridOptions.icons`; absent or `{}` = none. A column's own `icons` win. */
|
|
37
|
+
icons?: HeaderIcons;
|
|
38
|
+
/**
|
|
39
|
+
* `tooltips.browser`: header tooltips are the browser's `title`; absent = the styled tooltip, and a fixed
|
|
40
|
+
* `headerTooltip` text a permanent description.
|
|
41
|
+
*/
|
|
42
|
+
browserTips?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Where the floating row's cells go: the UI's floating cells (`ui/floating.ts`) fill the cell of a column
|
|
46
|
+
* whose decor says `floating`, from `mount` until `unmount`. The header only builds, positions and pins the cells.
|
|
47
|
+
* Contract: `mount` and `unmount` alternate per column (an update's unmounts come before its mounts) and are called
|
|
48
|
+
* inside the header's update; after `unmount(id)` the host is left empty; a column hidden and shown again gets the same
|
|
49
|
+
* host mounted again; when the row goes, every mounted cell is unmounted first and the hosts are discarded.
|
|
50
|
+
*/
|
|
51
|
+
export interface FloatingHooks {
|
|
52
|
+
mount(id: string, host: HTMLElement): void;
|
|
53
|
+
unmount(id: string): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A header cell as the focus model names it: a column's leaf cell (its fillers are part of it), its
|
|
57
|
+
* floating cell, or a group segment — a group in a header row, the segment covering the leaf at `displayIndex`.
|
|
58
|
+
*/
|
|
59
|
+
export type HeaderTarget = {
|
|
60
|
+
kind: 'column';
|
|
61
|
+
column: string;
|
|
62
|
+
floating: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
kind: 'group';
|
|
65
|
+
group: string;
|
|
66
|
+
level: number;
|
|
67
|
+
displayIndex: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A column move's slide: the default of `--ig-column-move-duration`, which the header's
|
|
71
|
+
* elements glide (`slide`) and the body's cells transition under the root's `.ig-columns-moving`.
|
|
72
|
+
*/
|
|
73
|
+
export declare const SLIDE_MS = 200;
|
|
74
|
+
export interface HeaderView {
|
|
75
|
+
/** Applies a layout and the leaf cells' decorations; ends a resize preview first. */
|
|
76
|
+
update(layout: DisplayLayout, decor: HeaderDecor): void;
|
|
77
|
+
/**
|
|
78
|
+
* The centre column window the body renders (display indices of its first and last column; −1, −1 = none): the
|
|
79
|
+
* centre groups it meets get the sticky label. Called every frame; it writes only when the window
|
|
80
|
+
* changed, and then only the groups whose state changed.
|
|
81
|
+
*/
|
|
82
|
+
stickyWindow(first: number, last: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* Resize preview: `layout` differs from `base` (what the column variables hold) in widths and positions only.
|
|
85
|
+
* The header elements drawn inside `band` (centre-lane coordinates; the pinned lanes count as inside) get their
|
|
86
|
+
* `layout` geometry as inline px, so the variables, whose every change restyles all header cells, stay as they are.
|
|
87
|
+
*/
|
|
88
|
+
preview(layout: DisplayLayout, base: DisplayLayout, band: {
|
|
89
|
+
lo: number;
|
|
90
|
+
hi: number;
|
|
91
|
+
} | null): void;
|
|
92
|
+
/** Ends a resize preview: every overridden element follows the column variables again. */
|
|
93
|
+
endPreview(): void;
|
|
94
|
+
/** The header cell of a displayed column. */
|
|
95
|
+
cellOf(id: string): HTMLElement | null;
|
|
96
|
+
/** The floating cell of a displayed column while the floating row shows; else null. */
|
|
97
|
+
floatingCellOf(id: string): HTMLElement | null;
|
|
98
|
+
/**
|
|
99
|
+
* The element of a group in header row `level`: the segment covering the leaf at `displayIndex`, else the
|
|
100
|
+
* group's first segment in that row; null when the row has none.
|
|
101
|
+
*/
|
|
102
|
+
groupCellOf(group: string, level: number, displayIndex: number): HTMLElement | null;
|
|
103
|
+
/** The header cell an element belongs to (a filler stands for its leaf); null outside header cells. */
|
|
104
|
+
targetOf(el: Element): HeaderTarget | null;
|
|
105
|
+
/**
|
|
106
|
+
* The focused header cell's or group segment's tooltip description (the id of the tooltip layer's; null = none),
|
|
107
|
+
* after its filter description and its permanent one in `aria-describedby`.
|
|
108
|
+
*/
|
|
109
|
+
describe(el: HTMLElement, id: string | null): void;
|
|
110
|
+
/** The header checkbox the last update placed (`HeaderDecor.checkbox`); null = none. */
|
|
111
|
+
checkbox(): HTMLInputElement | null;
|
|
112
|
+
/** The segment behind a group header, a filler or a group's resize zone. */
|
|
113
|
+
segmentOf(el: Element): Segment | null;
|
|
114
|
+
/** Left, centre and right lane of the leaf row. */
|
|
115
|
+
leafLanes(): readonly HTMLElement[];
|
|
116
|
+
/** Header row `level`: a group row below the layout's `levels`, the leaf row at `levels`; else null. */
|
|
117
|
+
rowEl(level: number): HTMLElement | null;
|
|
118
|
+
/**
|
|
119
|
+
* The column the pointer is over (null: none): its leaf cell and fillers get `ig-hover` together. Driven by
|
|
120
|
+
* the header's delegated pointer events, not by a pass.
|
|
121
|
+
*/
|
|
122
|
+
hover(id: string | null): void;
|
|
123
|
+
/**
|
|
124
|
+
* The header highlight of cell ranges: the leaf cells of the columns `hit` names get `.ig-header-range`;
|
|
125
|
+
* null clears it. Write-if-changed; the grid calls it when the ranges or the header changed.
|
|
126
|
+
*/
|
|
127
|
+
highlight(hit: ((id: string) => boolean) | null): void;
|
|
128
|
+
/**
|
|
129
|
+
* The separator line whose resize zones show their line (`data-line`, null = none): a leaf's zone and the
|
|
130
|
+
* zones of the groups that end on the same line light up together, whichever header row the pointer is in.
|
|
131
|
+
*/
|
|
132
|
+
resizeLine(key: string | null): void;
|
|
133
|
+
/**
|
|
134
|
+
* The columns a header drag carries: their leaf cells and fillers get `.ig-header-moving`, and with `level`
|
|
135
|
+
* (a drag that started on a group segment) so do the group segments from that header row down whose leaves are
|
|
136
|
+
* all carried; null ends the tint. Kept across updates until changed.
|
|
137
|
+
*/
|
|
138
|
+
moving(ids: readonly string[] | null, level: number | null): void;
|
|
139
|
+
/**
|
|
140
|
+
* A column move follows: the next update that changes the layout glides the elements that stay in their lane
|
|
141
|
+
* from where the current layout draws them, in `ms` (`--ig-column-move-duration`).
|
|
142
|
+
*/
|
|
143
|
+
slide(ms: number): void;
|
|
144
|
+
destroy(): void;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The header's height with `levels` group rows and, when `floating`, the floating-filter row as a CSS expression ('' =
|
|
148
|
+
* the stylesheet's, one leaf row): the header gets it, and so do the elements that line up with the header's bottom
|
|
149
|
+
* (the vertical scrollbar), so a density or token change moves them all without JS.
|
|
150
|
+
*/
|
|
151
|
+
export declare function headerHeightCss(levels: number, floating: boolean): string;
|
|
152
|
+
/**
|
|
153
|
+
* The header: one row per group level, then the leaf row, then, while the decorations say so, the
|
|
154
|
+
* floating-filter row. Leaf cells are kept per column id, so moving, pinning or hiding re-parents them
|
|
155
|
+
* and never re-creates a header renderer; so are floating cells, whose content `hooks` mounts. Group segments
|
|
156
|
+
* are positioned purely with the leaves' column variables, so an applied width change writes nothing here; only a live
|
|
157
|
+
* resize previews the elements in view with px values (`preview`). Leaf cells carry the header buttons and the
|
|
158
|
+
* active-filter state, written from the grid's decorations; their labels and descriptions come from
|
|
159
|
+
* `texts`. `root` (the grid's root; null = none) gets the header's height expression as `--_ig-header-h`, the stuck
|
|
160
|
+
* group rows' header term.
|
|
161
|
+
*/
|
|
162
|
+
export declare function createHeader(headerEl: HTMLElement, texts: () => GridTexts, hooks: FloatingHooks, root?: HTMLElement | null): HeaderView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type OverlayKind = 'noRows' | 'noColumns';
|
|
2
|
+
export interface Overlay {
|
|
3
|
+
/** What it shows; null = nothing. */
|
|
4
|
+
readonly kind: OverlayKind | null;
|
|
5
|
+
/** Shows `text` as `kind` (null: empties it); writes only a text that changed. */
|
|
6
|
+
show(kind: OverlayKind | null, text: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Places it under the header (`levels` group rows, the leaf row and, when `floating`, the floating-filter row) and
|
|
9
|
+
* the pinned top section, above the pinned bottom section and clear of classic scrollbars (`right`, `bottom` in
|
|
10
|
+
* px); writes only what changed.
|
|
11
|
+
*/
|
|
12
|
+
place(levels: number, floating: boolean, right: number, bottom: number): void;
|
|
13
|
+
}
|
|
14
|
+
/** Appends the placeholder to the body area (`.ig-body`), after the content scroller. */
|
|
15
|
+
export declare function createOverlay(body: HTMLElement): Overlay;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type ViewportSource } from '../source';
|
|
2
|
+
import { HeightIndex } from '../viewport/heights';
|
|
3
|
+
import { type HeightView } from '../viewport/heightView';
|
|
4
|
+
import type { FrameState, RenderStrategy } from './strategy';
|
|
5
|
+
/**
|
|
6
|
+
* The pinned-row sections. Each side has an ordered entry list, one small
|
|
7
|
+
* section source over it and its own height index; the grid draws every row of a section with one more recycling pool
|
|
8
|
+
* (`StrategyContext.section`), after the body, with the body's column window.
|
|
9
|
+
*/
|
|
10
|
+
/** The side of a pinned section: above the body (under the header) or below it. */
|
|
11
|
+
export type SectionSide = 'top' | 'bottom';
|
|
12
|
+
/**
|
|
13
|
+
* The root's variable holding a section's drawn height (contract 1): the stuck rows' offsets read
|
|
14
|
+
* it. The stylesheet declares both `0px` on every root, so the grid writes one only while its section shows.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SECTION_HEIGHT_VAR: Readonly<Record<SectionSide, string>>;
|
|
17
|
+
/**
|
|
18
|
+
* One row of a section's ordered input (contract 3): an app object, or the body source's grand
|
|
19
|
+
* total (`grandTotalRow: 'pinnedTop'` / `'pinnedBottom'`), at the section's outer edge (`sectionEntries`).
|
|
20
|
+
*/
|
|
21
|
+
export type SectionEntry = {
|
|
22
|
+
kind: 'app';
|
|
23
|
+
data: object;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'grandTotal';
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A section's small source: the section's entries in order. An app entry's values are each column's field
|
|
29
|
+
* read through the body's client source (`ClientInternals.fieldValue`: its `FieldDef.value` getters) while the grid
|
|
30
|
+
* shows a `clientSource`, else `row[field]`; every row is loaded, an app row a level-0 leaf. Never sorted, filtered,
|
|
31
|
+
* grouped or aggregated; it announces nothing (the grid draws the section again at each set). A
|
|
32
|
+
* grand-total entry is the body's grand total — a level-0 total row (`kind: 'total'`, `grandTotal`), its values the
|
|
33
|
+
* body's (`ClientInternals.grandTotal()`), and no writes.
|
|
34
|
+
*/
|
|
35
|
+
export interface SectionSource extends ViewportSource {
|
|
36
|
+
readonly side: SectionSide;
|
|
37
|
+
/** Replaces the entries, in order. */
|
|
38
|
+
setEntries(entries: readonly SectionEntry[]): void;
|
|
39
|
+
/** Row `row`'s entry; undefined out of range. */
|
|
40
|
+
entry(row: number): SectionEntry | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The grid's body source behind a section source, null for any other source: a section's cells follow
|
|
44
|
+
* the body's client rules (`emptyGroupRows`), so the pinned grand total draws nothing where the body's would and writes
|
|
45
|
+
* its word into the same flat label column.
|
|
46
|
+
*/
|
|
47
|
+
export declare function sectionBody(source: ViewportSource): ViewportSource | null;
|
|
48
|
+
/**
|
|
49
|
+
* A section's entries: the app's objects in array order and, with `grand`, the grand total at the outer
|
|
50
|
+
* edge — the first row of the top section, the last of the bottom one, the app's rows between it and
|
|
51
|
+
* the body.
|
|
52
|
+
*/
|
|
53
|
+
export declare function sectionEntries(side: SectionSide, rows: readonly object[], grand: boolean): readonly SectionEntry[];
|
|
54
|
+
/** The section source of `side`; `body` is the grid's current source (it can be replaced: `setRows`). */
|
|
55
|
+
export declare function createSectionSource(side: SectionSide, body: () => ViewportSource): SectionSource;
|
|
56
|
+
/**
|
|
57
|
+
* One side's pinned section: the app's rows as given, the section source over their entries and the section's
|
|
58
|
+
* cell heights (the default row height, computed `rowHeight`s and measured `autoHeight`s). The grid adds its element
|
|
59
|
+
* and its pool.
|
|
60
|
+
*/
|
|
61
|
+
export interface PinnedSection {
|
|
62
|
+
readonly side: SectionSide;
|
|
63
|
+
/** `.ig-pinned-top` / `.ig-pinned-bottom` (`role="rowgroup"`), hidden while it draws no row. */
|
|
64
|
+
readonly el: HTMLElement;
|
|
65
|
+
/** The rows as the app gave them (`getPinnedTopRows`, `getPinnedBottomRows`); `[]` when none. */
|
|
66
|
+
rows: readonly object[];
|
|
67
|
+
/**
|
|
68
|
+
* The body's grand total is a row of this section, at its outer edge (`grandTotalRow` pins it on this
|
|
69
|
+
* side and the source has one: some row passes). Never one of `rows`.
|
|
70
|
+
*/
|
|
71
|
+
grand: boolean;
|
|
72
|
+
readonly source: SectionSource;
|
|
73
|
+
readonly heights: HeightIndex;
|
|
74
|
+
/** `heights` as the pool reads them: a section has no detail terms. */
|
|
75
|
+
readonly view: HeightView;
|
|
76
|
+
/** The section's pool: made when the section first has rows, so an app that pins none pays nothing. */
|
|
77
|
+
strategy: RenderStrategy | null;
|
|
78
|
+
/** Its rows' computed heights are to be evaluated again (a set, dropped heights) before the next render. */
|
|
79
|
+
stale: boolean;
|
|
80
|
+
/** Its DOM order is to be restored after the next render (a set changed which views hold which rows). */
|
|
81
|
+
reorder: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The element's height as last written (CSSOM), 0 while hidden: the room the section takes from the body area, which
|
|
84
|
+
* the grid's geometry reads — 0 for a section that never showed, so an app that pins none keeps its geometry.
|
|
85
|
+
*/
|
|
86
|
+
drawnHeight: number;
|
|
87
|
+
/** The resize preview's variables written on the element, as on the body's rows region. */
|
|
88
|
+
readonly previewVars: Map<string, string>;
|
|
89
|
+
/** The frame the pool draws: every row at its own index's tops, no scroll offsets, no stack. */
|
|
90
|
+
readonly frame: FrameState;
|
|
91
|
+
}
|
|
92
|
+
export declare function createPinnedSection(side: SectionSide, el: HTMLElement, body: () => ViewportSource, defaultHeight: number): PinnedSection;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the section's rows (`setPinnedTopRows`): the array as given (anything but an array empties it), its
|
|
95
|
+
* objects as the entries in order — beside the grand total at the outer edge with `grand` (it comes or goes
|
|
96
|
+
* as a set does; by default it stays as it is); the heights start again from the default and the drawn rows are bound
|
|
97
|
+
* again at the next render — a new array or the same one, changed or not.
|
|
98
|
+
*/
|
|
99
|
+
export declare function setSectionRows(section: PinnedSection, rows: readonly object[] | undefined, grand?: boolean): void;
|
|
100
|
+
/** The grand total's row in the section: the top section's first, the bottom one's last; −1 without one. */
|
|
101
|
+
export declare function sectionGrandRow(section: PinnedSection): number;
|
|
102
|
+
/**
|
|
103
|
+
* The frame of the section's next render: rows `0 … count − 1` (none: every bound row is released) with the body's
|
|
104
|
+
* centre columns.
|
|
105
|
+
*/
|
|
106
|
+
export declare function sectionFrame(section: PinnedSection, count: number, centerCols: readonly number[]): FrameState;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thickness of the bars where the platform's scrollbars take no room (overlay scrollbars, e.g. macOS with a trackpad):
|
|
3
|
+
* the width the pointer can grab, as wide as an expanded overlay scrollbar.
|
|
4
|
+
*/
|
|
5
|
+
export declare const OVERLAY_HIT = 16;
|
|
6
|
+
/** Overlay bars stay shown this long after scrolling stopped (the grid's idle point), as overlay scrollbars do. */
|
|
7
|
+
export declare const OVERLAY_LINGER_MS = 500;
|
|
8
|
+
export type ScrollAxis = 'v' | 'h';
|
|
9
|
+
export interface ScrollbarsHost {
|
|
10
|
+
/** The body area: the content scroller and the bars. */
|
|
11
|
+
body: HTMLElement;
|
|
12
|
+
/** The content scroller. */
|
|
13
|
+
viewport: HTMLElement;
|
|
14
|
+
/**
|
|
15
|
+
* The user moved a bar (thumb drag, track click, wheel over it): the content follows to `position`, or to its own
|
|
16
|
+
* end when `atEnd`, the end a native scrollbar reaches (the bar's end can lie a float32 step short of the content's:
|
|
17
|
+
* WebKit keeps scroll offsets in float32, 4 px steps near 2^25 px, and the grid folds at the content's end).
|
|
18
|
+
*/
|
|
19
|
+
onScroll(axis: ScrollAxis, position: number, atEnd: boolean): void;
|
|
20
|
+
/** The platform's scrollbar thickness changed (zoom, scrollbar style): the grid fits the bars again. */
|
|
21
|
+
onThickness(): void;
|
|
22
|
+
/** px per line of a wheel event in line mode (`WheelEvent.deltaMode` 1): the grid's row height. */
|
|
23
|
+
lineHeight(): number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Proxy scrollbars. The content scroller (`.ig-viewport`) hides its own scrollbars; a vertical bar over the
|
|
27
|
+
* body rows' right edge (from the header's bottom down; a classic one covers a strip the canvas adds) and a
|
|
28
|
+
* horizontal bar under the centre columns (between the pinned lanes) stand in for them. Each is a real overflow element whose one spacer makes its scroll range equal to the content's,
|
|
29
|
+
* so positions map 1:1 both ways, scroll stretching included.
|
|
30
|
+
*/
|
|
31
|
+
export interface Scrollbars {
|
|
32
|
+
/**
|
|
33
|
+
* Room (px) classic bars take: `right` is the strip a vertical bar covers over the rows' right edge (the content
|
|
34
|
+
* scroller keeps the body's width; the visible width is the body's less this), `bottom` the room the content
|
|
35
|
+
* scroller leaves below it for a horizontal bar.
|
|
36
|
+
*/
|
|
37
|
+
readonly right: number;
|
|
38
|
+
readonly bottom: number;
|
|
39
|
+
/** Reads the platform's scrollbar thickness (a layout read); true when the thickness in use changed. */
|
|
40
|
+
measure(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* `GridOptions.scrollbars`: an axis's bar shows while nothing overflows, and where the platform's bars
|
|
43
|
+
* overlay the content both bars are drawn (`ig-scroll-drawn`, the drawn probe's thickness). True when the thickness
|
|
44
|
+
* in use changed (the caller fits again either way).
|
|
45
|
+
*/
|
|
46
|
+
setAlways(vertical: boolean, horizontal: boolean): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Decides which axes overflow, as the browser does for its own scrollbars: content extent against the body area,
|
|
49
|
+
* a classic bar on one axis taking room from the other. Shows or hides the bars and writes the content scroller's
|
|
50
|
+
* room. Returns true when anything changed.
|
|
51
|
+
*/
|
|
52
|
+
fit(contentW: number, contentH: number, bodyW: number, bodyH: number): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Places the bars (write-if-changed): the vertical one below the header (`levels` group header rows, the leaf row
|
|
55
|
+
* and, when `floating`, the floating-filter row), its track beside the body area only, between the pinned-row
|
|
56
|
+
* sections `topH` / `bottomH` px tall; the horizontal one between the pinned lanes; spacers sized to
|
|
57
|
+
* the content's scroll ranges (`canvasW`, the rows region `regionH`).
|
|
58
|
+
*/
|
|
59
|
+
place(levels: number, floating: boolean, leftW: number, rightW: number, canvasW: number, regionH: number, topH: number, bottomH: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Moves the bars to the content's scroll position, in a task after the current frame's rendering: a bar's
|
|
62
|
+
* own scroll (its scrolling layer, its overlay scrollbar) is then drawn by the next frame instead of adding to the
|
|
63
|
+
* frame that draws the content, which a jump fills with a redraw of every row. The grid calls it in every pass
|
|
64
|
+
* with the offsets the pass read; the last call before the task wins. The task writes a scroll position only where
|
|
65
|
+
* it differs, and not over a bar the user moved since its last scroll event (a drag between frames: the content
|
|
66
|
+
* follows the bar instead).
|
|
67
|
+
*/
|
|
68
|
+
sync(top: number, left: number): void;
|
|
69
|
+
/**
|
|
70
|
+
* The user scrolls (content or bar): overlay bars show until `idle()` plus OVERLAY_LINGER_MS. A press on a bar
|
|
71
|
+
* keeps them shown until the pointer is released, also when it leaves the bar during a drag.
|
|
72
|
+
*/
|
|
73
|
+
scrolling(): void;
|
|
74
|
+
/** Scrolling stopped. */
|
|
75
|
+
idle(): void;
|
|
76
|
+
}
|
|
77
|
+
export declare function createScrollbars(host: ScrollbarsHost): Scrollbars;
|