@elaraai/e3-ui-components 1.0.60 → 1.0.62

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.
@@ -0,0 +1,84 @@
1
+ import { EastTypeValue } from '@elaraai/east';
2
+ /** Where a query landed in the collection's canonical key order. */
3
+ export interface DatasetKeyMatchRange {
4
+ /** Whether any row matched. */
5
+ found: boolean;
6
+ /** First matched row (for a miss, the query's insertion row). */
7
+ row: number;
8
+ /** Number of matched rows. */
9
+ count: number;
10
+ }
11
+ /**
12
+ * A key query in wire form: a whole-key `.east` literal (`key`), a String
13
+ * prefix (`prefix`), or — for struct keys — exact leading-field literals
14
+ * (`fields`, declaration order) optionally followed by a `prefix` on the
15
+ * next (String) field. Every form addresses one contiguous row range in
16
+ * the canonical key order.
17
+ */
18
+ export type DatasetKeyQuery = {
19
+ key: string;
20
+ } | {
21
+ prefix: string;
22
+ } | {
23
+ fields: string[];
24
+ prefix?: string;
25
+ };
26
+ export interface DatasetKeySearchProps {
27
+ /** The searched collection's Dict key / Set element type. */
28
+ keyType: EastTypeValue;
29
+ /** Locates a query; literals are canonical `.east` text of
30
+ * already-validated values. */
31
+ onFind: (query: DatasetKeyQuery) => Promise<DatasetKeyMatchRange>;
32
+ /** Labels rows `[row, row + limit)` for the popup, in row order. */
33
+ onListRange: (row: number, limit: number) => Promise<string[]>;
34
+ /** Jumps the host tree to a global root row. */
35
+ onJump: (row: number) => void;
36
+ /** Clears the host's jump (and its held row highlight) when the query
37
+ * is cleared. */
38
+ onClear?: (() => void) | undefined;
39
+ }
40
+ /** A parsed search input: a wire query, or the hint to show instead. */
41
+ export type ParsedKeyInput = {
42
+ kind: 'query';
43
+ query: DatasetKeyQuery;
44
+ } | {
45
+ kind: 'hint';
46
+ hint: string;
47
+ };
48
+ /**
49
+ * Turns typed search text into a wire query, or a hint when it cannot
50
+ * parse. Struct keys: `(` opens a whole-key `.east` literal; otherwise
51
+ * comma-separated leading field values — exact for all but the last
52
+ * segment (unquoted String segments need no quotes), the last a prefix on
53
+ * a String field or an exact value otherwise, and a trailing comma
54
+ * narrows to the leading exact fields.
55
+ *
56
+ * @param keyType - the collection's Dict key / Set element type
57
+ * @param text - the raw search input
58
+ * @returns the query to send, or the hint to display
59
+ */
60
+ export declare function parseKeyInput(keyType: EastTypeValue, text: string): ParsedKeyInput;
61
+ /**
62
+ * Builds the monotone lower/upper row predicates of a RANGE query over
63
+ * keys in canonical East order — the client-side mirror of the server's
64
+ * fence-search predicates, for inline (already-decoded) previews. The
65
+ * range is `[first row where lower holds, first row where upper holds)`.
66
+ *
67
+ * @param keyType - the collection's Dict key / Set element type
68
+ * @param query - the wire query
69
+ * @returns the predicate pair, or `null` for a whole-key literal query
70
+ * (an exact lookup, not a range)
71
+ */
72
+ export declare function keyRangePredicates(keyType: EastTypeValue, query: DatasetKeyQuery): {
73
+ lower: (k: unknown) => boolean;
74
+ upper: (k: unknown) => boolean;
75
+ } | null;
76
+ /**
77
+ * Renders the dataset key search control.
78
+ *
79
+ * @param props - see {@link DatasetKeySearchProps}
80
+ * @returns the search combobox with its match count, range navigation and
81
+ * clear affordance
82
+ */
83
+ export declare const DatasetKeySearch: import('react').NamedExoticComponent<DatasetKeySearchProps>;
84
+ //# sourceMappingURL=DatasetKeySearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatasetKeySearch.d.ts","sourceRoot":"","sources":["../../src/components/DatasetKeySearch.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAoCH,OAAO,EAAmE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAQpH,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACjC,+BAA+B;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GACrB;IAAE,GAAG,EAAE,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3,"file":"DatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/DatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAkB7D,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mDAAmD;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+EAC2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAYzF;AAED,eAAO,MAAM,cAAc,2DAiJzB,CAAC"}
1
+ {"version":3,"file":"DatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/DatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAmB7D,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mDAAmD;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+EAC2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAYzF;AAED,eAAO,MAAM,cAAc,2DAoMzB,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import { RequestOptions } from '@elaraai/e3-api-client';
2
2
  import { EastTypeValue } from '@elaraai/east';
3
+ /** Drops loaded pages far from the window `[firstPage, lastPage]`, keeping
4
+ * the window itself and then the nearest pages up to the retention cap. */
5
+ export declare function pruneRetainedPages<T>(pages: ReadonlyMap<number, T>, firstPage: number, lastPage: number, max: number): ReadonlyMap<number, T>;
3
6
  export interface PagedDatasetPreviewProps {
4
7
  apiUrl: string;
5
8
  repo: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PagedDatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/PagedDatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAwC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAezF,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,EAAE,aAAa,CAAC;IACpB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAA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