pivotkit-react 0.6.0 → 0.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.
@@ -7,6 +7,21 @@
7
7
  export declare const tagFor: (tag: any, sourceId: string | undefined) => any;
8
8
  /** Steps kept for undo. */
9
9
  export declare const HISTORY_LIMIT = 100;
10
+ /**
11
+ * The views told to a controlled host (onViewChange) that it has not passed back yet, with `view`
12
+ * added: at most HISTORY_LIMIT, the newest kept, so a host that never passes them back does not make
13
+ * the list grow with every change (#204).
14
+ * @param {string[]} pending
15
+ * @param {string} view
16
+ */
17
+ export declare const told: (pending: string[], view: string) => string[];
18
+ /**
19
+ * What still waits once the host passes `view`: the views told after it (a host that answers late,
20
+ * #141), or none when it was not told (a change of the host's own).
21
+ * @param {string[]} pending
22
+ * @param {string} view
23
+ */
24
+ export declare function answered(pending: string[], view: string): string[];
10
25
  export type HistoryState = {
11
26
  /**
12
27
  * the schema the views were normalized against
@@ -1,16 +0,0 @@
1
- /**
2
- * Tokens as the report's light theme resolves them, in either theme: a workbook and an HTML report are
3
- * light (black text in Excel, paper), so a host's light colours go into them from a dark report too.
4
- * A dark report shows the light theme for the read, on its root and, inside pivotkit-element, on the
5
- * element whose :host rules declare the tokens, and the dark one again in the same task, so nothing is
6
- * drawn in between; --pk-duration is 0ms meanwhile (on the root, important), so no transition of the
7
- * report's starts on the way there or back. A host's dark rules on data-pk-theme="dark" are left out
8
- * that way; rules on something else (an html[data-theme] of the page) apply in both. Lengths are
9
- * resolved by the chart's module (chart-decorate.js, tokenLengths), passed in as `more`, read in the
10
- * light theme too.
11
- * @param {HTMLElement} root the report's root
12
- * @param {readonly string[]} names
13
- * @param {() => Record<string, string>} [more] further tokens read while the light theme shows
14
- * @returns {Record<string, string>} the tokens that are set
15
- */
16
- export declare function lightTokens(root: HTMLElement, names: readonly string[], more?: () => Record<string, string>): Record<string, string>;