pivotkit-react 0.2.0 → 0.4.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +284 -1
  2. package/README.md +1 -1
  3. package/dist/chunks/{chunk-F6MVUAQD.js → chunk-6MDAL3IO.js} +51 -3
  4. package/dist/chunks/{chunk-53ZMK4BH.js → chunk-EM23V5GH.js} +6 -0
  5. package/dist/chunks/{chunk-LQCWFJBS.js → chunk-LEN5RPBM.js} +147 -26
  6. package/dist/chunks/{chunk-OYY4BKIL.js → chunk-RWYHJRQO.js} +6 -0
  7. package/dist/chunks/{chunk-QBD4FOBB.js → chunk-WB4GKWFQ.js} +124 -18
  8. package/dist/chunks/chunk-XN55BQ4M.js +618 -0
  9. package/dist/chunks/{chunk-X7H7BAVT.js → chunk-YITKWZ4L.js} +312 -628
  10. package/dist/chunks/chunk-ZYEYZSYL.js +187 -0
  11. package/dist/chunks/{unused-texts-YTNJCFFC.js → unused-texts-K3VFH65P.js} +1 -1
  12. package/dist/chunks/{unused-texts-de-SGOHV4N7.js → unused-texts-de-OW4TGIVX.js} +1 -1
  13. package/dist/import-ui.js +769 -0
  14. package/dist/import-worker.js +20 -0
  15. package/dist/index.js +653 -227
  16. package/dist/labels.js +14 -10
  17. package/dist/menu-texts-de.js +1 -1
  18. package/dist/menus.js +2499 -676
  19. package/dist/styles.css +673 -125
  20. package/package.json +3 -2
  21. package/types/chip-menus.d.ts +20 -4
  22. package/types/data-history.d.ts +85 -0
  23. package/types/data-keep.d.ts +51 -0
  24. package/types/data-menu.d.ts +11 -0
  25. package/types/dnd.d.ts +8 -4
  26. package/types/dom.d.ts +40 -7
  27. package/types/field-info.d.ts +32 -0
  28. package/types/filter-level.d.ts +16 -0
  29. package/types/filter.d.ts +31 -0
  30. package/types/help.d.ts +0 -7
  31. package/types/import-host.d.ts +53 -0
  32. package/types/import-labels.d.ts +360 -0
  33. package/types/import-module.d.ts +2 -0
  34. package/types/import-run.d.ts +73 -0
  35. package/types/import-source.d.ts +32 -0
  36. package/types/import-steps.d.ts +121 -0
  37. package/types/import-ui.d.ts +108 -0
  38. package/types/import-worker.d.ts +1 -0
  39. package/types/index.d.ts +56 -4
  40. package/types/labels.d.ts +97 -2
  41. package/types/lazy-import.d.ts +4 -0
  42. package/types/lazy-menus.d.ts +2 -2
  43. package/types/levels.d.ts +106 -0
  44. package/types/menu-fields.d.ts +80 -0
  45. package/types/menu-labels.d.ts +214 -22
  46. package/types/menu-ops.d.ts +150 -9
  47. package/types/menu-topics.d.ts +291 -0
  48. package/types/menus.d.ts +2 -1
  49. package/types/names.d.ts +141 -1
  50. package/types/overflow.d.ts +29 -17
  51. package/types/place.d.ts +44 -0
  52. package/types/popover.d.ts +47 -5
  53. package/types/section.d.ts +8 -11
  54. package/types/tips.d.ts +1 -36
  55. package/types/toasts.d.ts +1 -1
  56. package/types/toolbar-panels.d.ts +17 -9
  57. package/types/unused-keep.d.ts +20 -0
  58. package/types/unused-texts.d.ts +6 -0
  59. package/types/unused.d.ts +1 -0
  60. package/types/use-view-history.d.ts +13 -4
  61. package/types/view-ops.d.ts +12 -0
  62. package/types/virtual.d.ts +15 -0
  63. package/types/zones.d.ts +5 -4
  64. package/types/sections.d.ts +0 -2
@@ -4,6 +4,21 @@ export declare const LayerContext: React.Context<{
4
4
  layer: HTMLElement | null;
5
5
  size: string;
6
6
  }>;
7
+ /**
8
+ * Whether the browser has the Popover API, so a popover goes into the top layer. Read when a popover
9
+ * opens (a page may load a polyfill or lack the API; a server has no HTMLElement).
10
+ */
11
+ export declare const hasTopLayer: () => boolean;
12
+ /**
13
+ * Shows elements in the top layer while a popover is open, in order (the scrim, then the sheet above
14
+ * it); a popover opened later from this one is shown later, so it is above. Hidden again when it
15
+ * closes (an element removed from the page has left the top layer by itself).
16
+ * @param {boolean} open
17
+ * @param {Array<React.RefObject<HTMLElement | null>>} refs
18
+ * @param {unknown} key what re-shows them (the sheet's scrim coming or going)
19
+ * @param {unknown} layer the report's layer: the elements are there only once it is
20
+ */
21
+ export declare function useTopLayer(open: boolean, refs: Array<React.RefObject<HTMLElement | null>>, key: unknown, layer: unknown): void;
7
22
  /**
8
23
  * Whether a wheel turn inside a popover may scroll something there: an element on its way from the
9
24
  * target up to the popover that scrolls in that direction and is not at its end. Else the popover
@@ -44,11 +59,13 @@ export declare function Popover({ open, anchor, onClose, label, role, align, cla
44
59
  * @param {{ label: string, icon?: string, text?: React.ReactNode, showText?: boolean, className?: string,
45
60
  * role?: "menu" | "dialog", align?: "start" | "end", popoverClass?: string, disabled?: boolean,
46
61
  * title?: string, children: (close: () => void) => React.ReactNode, testId?: string, name?: string,
47
- * buttonRef?: React.RefObject<HTMLButtonElement>, tabIndex?: number, slot?: string, fill?: boolean, mark?: React.ReactNode }} props
62
+ * buttonRef?: React.RefObject<HTMLButtonElement>, tabIndex?: number, slot?: string, fill?: boolean, mark?: React.ReactNode, arrowOpens?: boolean, off?: string }} props
48
63
  * `tabIndex`: -1 where a list moves the focus itself (the field list); `mark`: after the text (the
49
- * dot for unsaved changes on "More")
64
+ * dot for unsaved changes on "More"); `arrowOpens`: the down arrow opens it (a toolbar's menu);
65
+ * `off`: why it opens nothing now (every entry of its menu is off): it stays focusable
66
+ * (aria-disabled) with the reason as its description and tooltip
50
67
  */
51
- export declare function MenuButton({ label, icon, text, showText, className, role, align, popoverClass, disabled, title, children, testId, buttonRef, name, tabIndex, slot, fill, mark }: {
68
+ export declare function MenuButton({ label, icon, text, showText, className, role, align, popoverClass, disabled, title, children, testId, buttonRef, name, tabIndex, slot, fill, mark, arrowOpens, off }: {
52
69
  label: string;
53
70
  icon?: string;
54
71
  text?: React.ReactNode;
@@ -67,20 +84,45 @@ export declare function MenuButton({ label, icon, text, showText, className, rol
67
84
  slot?: string;
68
85
  fill?: boolean;
69
86
  mark?: React.ReactNode;
87
+ arrowOpens?: boolean;
88
+ off?: string;
89
+ }): React.JSX.Element;
90
+ /**
91
+ * A group of a menu's entries, the one way every menu draws its groups (the toolbar's menus, More,
92
+ * a chip menu's levels; section.jsx's Section adds the "i"): its title in bold above it, a rule
93
+ * between it and what comes before (styles.css: .pk-section), none above the first. In a dialog the
94
+ * group is the whole block, named by its title. In an ARIA menu (`menu`) the block is presentational
95
+ * and the group holds only the items, as a menu may own groups of items but no other text; a group
96
+ * without a title (More) is named by `label`.
97
+ * @param {{ title?: React.ReactNode, label?: string, menu?: boolean, head?: React.ReactNode, after?: React.ReactNode, children: React.ReactNode, testId?: string, titleTestId?: string }} props
98
+ * `head`: next to the title (an "i"); `after`: under the entries, inside the block (a note);
99
+ * `testId`: the group's, `titleTestId`: the title's
100
+ */
101
+ export declare function Group({ title, label, menu, head, after, children, testId, titleTestId }: {
102
+ title?: React.ReactNode;
103
+ label?: string;
104
+ menu?: boolean;
105
+ head?: React.ReactNode;
106
+ after?: React.ReactNode;
107
+ children: React.ReactNode;
108
+ testId?: string;
109
+ titleTestId?: string;
70
110
  }): React.JSX.Element;
71
111
  /**
72
112
  * One option of a menu or of a chip's settings: one line. `hint` is a short second line that belongs
73
113
  * to the option (a date unit's example); `reason` says why a disabled option does nothing and shows
74
114
  * only while it is disabled (it is state, not an explanation: those go into an "i").
75
- * @param {{ onSelect: () => void, icon?: string, checked?: boolean, children: React.ReactNode, hint?: React.ReactNode,
115
+ * @param {{ onSelect: () => void, icon?: string, checked?: boolean, checkbox?: boolean, children: React.ReactNode, hint?: React.ReactNode,
76
116
  * reason?: React.ReactNode, inMenu?: boolean, disabled?: boolean, danger?: boolean, tone?: "accent", testId?: string, current?: boolean }} props
117
+ * `checkbox`: a toggle of its own in a menu (menuitemcheckbox), not one of a set of choices;
77
118
  * `tone`: "accent" for an option that says what is set (a filter); `current`: the entry shown now
78
119
  * (the view loaded), with a check and aria-current
79
120
  */
80
- export declare function Option({ onSelect, icon, checked, children, hint, reason, inMenu, disabled, danger, tone, testId, current }: {
121
+ export declare function Option({ onSelect, icon, checked, checkbox, children, hint, reason, inMenu, disabled, danger, tone, testId, current }: {
81
122
  onSelect: () => void;
82
123
  icon?: string;
83
124
  checked?: boolean;
125
+ checkbox?: boolean;
84
126
  children: React.ReactNode;
85
127
  hint?: React.ReactNode;
86
128
  reason?: React.ReactNode;
@@ -2,24 +2,21 @@ import React from "react";
2
2
  /**
3
3
  * The "i" next to a setting: its explanation (labels.settingInfo[id], loaded with the menus) on
4
4
  * hover, focus or tap. Nothing while "Show explanations" is off or the text is missing.
5
- * @param {{ id: string, name: string }} props `name`: the setting's name, for the button's name
5
+ * @param {{ id: string, name: string, tabIndex?: number }} props `name`: the setting's name, for the button's name;
6
+ * `tabIndex` -1 next to a menu's item (the item has the text as its description)
6
7
  */
7
- export declare function SettingInfo({ id, name }: {
8
+ export declare function SettingInfo({ id, name, tabIndex }: {
8
9
  id: string;
9
10
  name: string;
11
+ tabIndex?: number;
10
12
  }): React.JSX.Element | null;
11
13
  /**
12
- * A titled group of options. With an `id` of SECTIONS (tips.js) its title is a button that folds it;
13
- * folded, the title says what the section holds (`state`, muted at its end) and marks a setting that
14
- * is not the default (`changed`). `info` is the id of an explanation shown as an "i" next to the
15
- * title.
16
- * @param {{ title: React.ReactNode, children: React.ReactNode, id?: string, info?: string, state?: string | null, changed?: boolean }} props
14
+ * A titled group of a menu's entries (the Export menus, the chart type): popover.jsx's Group, with
15
+ * `info`, the id of an explanation shown as an "i" next to the title.
16
+ * @param {{ title: React.ReactNode, children: React.ReactNode, info?: string }} props
17
17
  */
18
- export declare function Section({ title, children, id, info, state, changed }: {
18
+ export declare function Section({ title, children, info }: {
19
19
  title: React.ReactNode;
20
20
  children: React.ReactNode;
21
- id?: string;
22
21
  info?: string;
23
- state?: string | null;
24
- changed?: boolean;
25
22
  }): React.JSX.Element;
package/types/tips.d.ts CHANGED
@@ -138,42 +138,7 @@ export declare const SWITCHES: readonly string[];
138
138
  * @param {readonly string[]} dismissed
139
139
  */
140
140
  export declare function fieldsCollapsed(session: boolean | null, forced: unknown, dismissed: readonly string[]): boolean;
141
- /**
142
- * The sections of the menus that fold, and whether each is open until the user folds or opens it:
143
- * what a first-time user needs open, the rest folded (a folded section's title says what it holds).
144
- * The user's choice is kept in the same list (and storage) as the tips, as "open:<id>" or
145
- * "closed:<id>" where it differs from this default; "Show dismissed tips again" keeps it, "Reset menu
146
- * sections" (Options → Help) clears it.
147
- */
148
- export declare const SECTIONS: Readonly<{
149
- summarize: true;
150
- showAs: true;
151
- format: false;
152
- highlight: false;
153
- move: false;
154
- sort: true;
155
- groupBy: true;
156
- bins: true;
157
- topN: true;
158
- filters: true;
159
- totals: true;
160
- help: true;
161
- exportDownload: true;
162
- exportCopy: true;
163
- thisView: true;
164
- sharedViews: true;
165
- myViews: true;
166
- share: false;
167
- chartType: true;
168
- chartDisplay: false;
169
- }>;
170
- /** Whether a section is open: the user's choice in the list, else its default. */
171
- export declare function sectionOpen(id: any, dismissed: any): any;
172
- /** The list with a section opened or folded: an entry only where it differs from the default. */
173
- export declare function withSection(dismissed: any, id: any, open: any): any;
174
- /** An entry of the list that is a section's state. */
175
- export declare const isSection: (id: any) => boolean;
176
- /** Entries "Show dismissed tips again" keeps: the switches and the sections' states. */
141
+ /** Entries "Show dismissed tips again" keeps: the switches. */
177
142
  export declare const keptOnReset: (id: any) => boolean;
178
143
  /**
179
144
  * Whether one kind of "i" shows: the host's "on" or "off" forces it (and the user's switch leaves it
package/types/toasts.d.ts CHANGED
@@ -13,7 +13,7 @@ export type Toast = {
13
13
  /** @typedef {{ id: number, text: string, action?: { label: string, run: () => void }, tone?: "error" }} Toast */
14
14
  export declare function useToasts(): {
15
15
  toasts: Toast[];
16
- push: (toast: Omit<Toast, "id">) => void;
16
+ push: (toast: Omit<Toast, "id">) => number;
17
17
  dismiss: (id: any) => void;
18
18
  pause: (on: any, list: any) => void;
19
19
  };
@@ -8,6 +8,11 @@ export declare function ChartTypePanel({ view, plan, labels, onChart, onDisplay,
8
8
  plan: any;
9
9
  view: any;
10
10
  }): React.JSX.Element;
11
+ /**
12
+ * The Options menu (topics in menu-topics.js): the totals, Expand all and Collapse all, help with the
13
+ * keyboard shortcuts as a level. A switch or an action applies at once and the menu stays open (the
14
+ * report behind it shows the change); Expand all and Collapse all close it.
15
+ */
11
16
  export declare function OptionsPanel({ view, labels, onTotal, onExpand, onCollapse, close, tips, mod, folding, help }: {
12
17
  close: any;
13
18
  folding: any;
@@ -43,15 +48,18 @@ export declare function LoadCheck({ check, labels, onCancel, close, title, quiet
43
48
  quiet?: boolean;
44
49
  }): React.JSX.Element;
45
50
  /**
46
- * The Views menu: "This view" (Save the loaded view under its name, or why not; Save as, the name
47
- * field; New, an empty report), the templates in two groups, "Shared views" (the host's, for
48
- * everyone) and "My views" (the user's own: the host's or the browser store's), each shown only when
49
- * it has entries ("My views" also when the user can save), then sharing. An entry loads its view; a deletable one
50
- * has a delete button, a shared one that is not has the "i" that says who changes shared views, and
51
- * a user's view offers "Publish as shared view" when the host allows it. Delete and publish ask
52
- * first, in place; the entry changes only when the host's callback (or the browser store) has
53
- * finished, and the focus goes back to the entry in that place. Names need not be unique: every
54
- * entry is shown, keyed and confirmed by its place in the list.
51
+ * The Views menu in levels: what persists, as one list to scan in groups - "This view" (Save the
52
+ * loaded view under its name, or why not; Save as…), "Shared views" (the host's, for everyone) and
53
+ * "My views" (the user's own: the host's or the browser store's), each shown only when it has entries
54
+ * ("My views" also when the user can save), then "Share this view" (copy a link or the JSON, download
55
+ * the view file, open one). Save as…, Open view file… and the questions before a change open levels
56
+ * of their own. (Starting over, New and Reset, is the toolbar's Start over.) An
57
+ * entry loads its view; a deletable one has Delete next to it, a user's view Publish when the host
58
+ * allows it, a shared one that is not deletable the "i" that says who changes shared views. Delete,
59
+ * publish and Save over a shared view ask first, in a level; the entry changes only when the host's
60
+ * callback (or the browser store) has finished, and the focus goes back to the entry in that place
61
+ * (the next one after a delete). Names need not be unique: every entry is shown, keyed by its group,
62
+ * its name and how often the name came before.
55
63
  * @param {{ templates: import("./templates.js").TemplateEntry[], labels: any, onLoad: (t: any) => void, actions: any, close: () => void, share?: any }} props
56
64
  */
57
65
  export declare function ViewsPanel({ templates, labels, onLoad, actions, close, share }: {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The part of a view a path names, as JSON: a value of Values by its field and aggregator (its
3
+ * place may differ from the place in the view as given, which may have had entries that were
4
+ * dropped), a setting of an object section (chart.legend), else the whole section (rows, filters), or
5
+ * the whole view for a path that names none ("" for a view that could not be read at all).
6
+ * @param {string | undefined} path an issue's path in the view as given
7
+ * @param {unknown} raw the view as given (a file's, a link's, the host's), before normalize()
8
+ * @param {Record<string, any>} view a normalized view
9
+ * @returns {string | undefined}
10
+ */
11
+ export declare function partOf(path: string | undefined, raw: unknown, view: Record<string, any>): string | undefined;
12
+ /**
13
+ * Whether a line of the warning still applies to the view shown: the part of the view it names is
14
+ * as it was in the view loaded (both normalized). A line without a path (a text) names its zone in
15
+ * `path`, or nothing (it stays).
16
+ * @param {import("./unused.jsx").UnusedNote} note
17
+ * @param {Record<string, any> | null} loaded the view as loaded, normalized; null: every line stays
18
+ * @param {Record<string, any>} shown the view shown, normalized
19
+ */
20
+ export declare function stillApplies(note: import("./unused.jsx").UnusedNote, loaded: Record<string, any> | null, shown: Record<string, any>): boolean;
@@ -76,6 +76,12 @@ export declare const en: {
76
76
  filterCount: string;
77
77
  filterValue: string;
78
78
  filterValue2: string;
79
+ filterCompareField: string;
80
+ filterCompareValue: string;
81
+ filterRelativeField: string;
82
+ filterRelativeUnit: string;
83
+ filterRelativeCount: string;
84
+ filterRelativeAnchor: string;
79
85
  sortNoItems: string;
80
86
  sortedTwice: string;
81
87
  badTotals: string;
package/types/unused.d.ts CHANGED
@@ -4,6 +4,7 @@ export type UnusedNote = {
4
4
  raw: unknown;
5
5
  } | {
6
6
  text: string;
7
+ path?: string;
7
8
  };
8
9
  /**
9
10
  * @param {{ notes: UnusedNote[], notesKey: string, dismissed: boolean, onDismiss: (next: HTMLElement | null) => void,
@@ -6,13 +6,16 @@ export declare function schemaKeyOf(encoded: import("pivotkit-core").Encoded): s
6
6
  /**
7
7
  * @param {{ encoded: import("pivotkit-core").Encoded, view: object | undefined, defaultView: object | undefined,
8
8
  * onViewChange?: (view: import("pivotkit-core").View) => void, limits: object | undefined, outsideNote: string,
9
- * orderOf?: (field: string) => unknown[] | undefined }} options `orderOf`: the host's custom order of a
10
- * field (fieldDefaults.order), applied to every view shown (withHostOrders); keep it stable
9
+ * orderOf?: (field: string) => unknown[] | undefined, dataKey?: string | number,
10
+ * initial?: import("./view-history.js").HistoryState | null }} options `orderOf`: the host's custom order of a
11
+ * field (fieldDefaults.order), applied to every view shown (withHostOrders); keep it stable. `initial`:
12
+ * the history to start on (read on the first render only)
11
13
  * @returns {{ view: import("pivotkit-core").View, viewKey: string, tag: any, setTag: (tag: any) => void, commit: (next: object, note: string, tag?: any) => boolean,
12
14
  * undo: () => string | null, redo: () => string | null, reset: (note: string) => void,
13
- * restore: (view: object, tag?: any) => void, keyOf: (view: object) => string, canUndo: boolean, canRedo: boolean, canReset: boolean }}
15
+ * restore: (view: object, tag?: any) => void, keyOf: (view: object) => string, earlier: () => any[], canUndo: boolean, canRedo: boolean, canReset: boolean, startEmpty: boolean,
16
+ * snapshot: () => import("./view-history.js").HistoryState, replace: (state: import("./view-history.js").HistoryState) => void }}
14
17
  */
15
- export declare function useViewHistory({ encoded, view, defaultView, onViewChange, limits, outsideNote, orderOf }: {
18
+ export declare function useViewHistory({ encoded, view, defaultView, onViewChange, limits, outsideNote, orderOf, dataKey, initial: initialState }: {
16
19
  encoded: import("pivotkit-core").Encoded;
17
20
  view: object | undefined;
18
21
  defaultView: object | undefined;
@@ -20,6 +23,8 @@ export declare function useViewHistory({ encoded, view, defaultView, onViewChang
20
23
  limits: object | undefined;
21
24
  outsideNote: string;
22
25
  orderOf?: (field: string) => unknown[] | undefined;
26
+ dataKey?: string | number;
27
+ initial?: import("./view-history.js").HistoryState | null;
23
28
  }): {
24
29
  view: import("pivotkit-core").View;
25
30
  viewKey: string;
@@ -31,7 +36,11 @@ export declare function useViewHistory({ encoded, view, defaultView, onViewChang
31
36
  reset: (note: string) => void;
32
37
  restore: (view: object, tag?: any) => void;
33
38
  keyOf: (view: object) => string;
39
+ earlier: () => any[];
34
40
  canUndo: boolean;
35
41
  canRedo: boolean;
36
42
  canReset: boolean;
43
+ startEmpty: boolean;
44
+ snapshot: () => import("./view-history.js").HistoryState;
45
+ replace: (state: import("./view-history.js").HistoryState) => void;
37
46
  };
@@ -107,6 +107,18 @@ export declare function numberRange(encoded: import("pivotkit-core").Encoded, fi
107
107
  min: number;
108
108
  max: number;
109
109
  } | null;
110
+ /**
111
+ * The first and the last date of a date column (wall-clock ms, as the column holds them), or null
112
+ * for another type or a column without dates: the data's span, which a relative range is measured
113
+ * against ("2026 has no data") and the anchor "latest" counts back from.
114
+ * @param {import("pivotkit-core").Encoded} encoded
115
+ * @param {string} field a date column (a grouping's source, see sourceOf)
116
+ * @returns {{ min: number, max: number } | null}
117
+ */
118
+ export declare function dateSpan(encoded: import("pivotkit-core").Encoded, field: string): {
119
+ min: number;
120
+ max: number;
121
+ } | null;
110
122
  /**
111
123
  * The derived field a grouping makes of a field on an axis: replaces it in place. `unit` null removes
112
124
  * the grouping (back to the source field). Returns the view and the new field's name.
@@ -42,3 +42,18 @@ export declare function sliceRows(grid: import("pivotkit-core").Grid, start: num
42
42
  * @param {number} r body row index
43
43
  */
44
44
  export declare function rowLabelOf(grid: import("pivotkit-core").Grid, r: number): string;
45
+ /**
46
+ * The longest row labels of a column by their number of characters, at most `n`: what a virtual table
47
+ * measures for the column's width once, instead of the rows it happens to show (they change as it
48
+ * scrolls). With each label whether it has a group's toggle in front of it and whether it is a total's
49
+ * (drawn bolder). A label spanning several columns (a total) is left out: it widens no single column.
50
+ * @param {import("pivotkit-core").Grid} grid
51
+ * @param {number} col a row label column (below grid.rowHeaderColumns)
52
+ * @param {number} n
53
+ * @returns {Array<{ text: string, toggle: boolean, total: boolean }>}
54
+ */
55
+ export declare function longestLabels(grid: import("pivotkit-core").Grid, col: number, n: number): Array<{
56
+ text: string;
57
+ toggle: boolean;
58
+ total: boolean;
59
+ }>;
package/types/zones.d.ts CHANGED
@@ -14,21 +14,22 @@ export declare function zoneEntries(view: any, types: any, labels: any): {
14
14
  };
15
15
  /**
16
16
  * @param {{ view: any, types: Map<string, string>, labels: import("./labels.js").UiLabels,
17
- * commit: (view: object, note?: any) => void, openFilter: (field: string, anchor: HTMLElement) => void,
17
+ * commit: (view: object, note?: any) => void, earlier?: () => any[],
18
18
  * encoded: import("pivotkit-core").Encoded, locale: string, onSwap: () => void,
19
19
  * id: string, folded: boolean, onShow: () => void, defaultsOf?: (field: string) => import("./index.js").FieldDefaults | undefined,
20
20
  * infoOf?: (field: string) => import("./field-info.js").FieldInfo | undefined, explain?: boolean, showInfo?: boolean }} props
21
21
  * `explain`: an "i" next to each zone's title that says what the zone does; `showInfo` false: no "i"
22
22
  * of a field description on the chips (Options → Help)
23
23
  * `folded`: the compact layout's one line; `defaultsOf`: the host's settings for a source field (fieldDefaults);
24
- * `infoOf`: the host's description of a field (its source field's for a grouping)
24
+ * `infoOf`: the host's description of a field (its source field's for a grouping); `earlier`: the
25
+ * history's views before this one (a value's own colours for its Highlight)
25
26
  */
26
- export declare function Zones({ view, types, labels, commit, openFilter, encoded, locale, onSwap, id, folded, onShow, defaultsOf, infoOf, explain, showInfo }: {
27
+ export declare function Zones({ view, types, labels, commit, earlier, encoded, locale, onSwap, id, folded, onShow, defaultsOf, infoOf, explain, showInfo }: {
27
28
  view: any;
28
29
  types: Map<string, string>;
29
30
  labels: import("./labels.js").UiLabels;
30
31
  commit: (view: object, note?: any) => void;
31
- openFilter: (field: string, anchor: HTMLElement) => void;
32
+ earlier?: () => any[];
32
33
  encoded: import("pivotkit-core").Encoded;
33
34
  locale: string;
34
35
  onSwap: () => void;
@@ -1,2 +0,0 @@
1
- /** The list without the sections' states: every section open or folded as at first, the tips as they are. */
2
- export declare const withoutSections: (dismissed: any) => any;