@elaraai/e3-ui-components 1.0.71 → 1.0.73
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/README.md +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +4 -3
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/index.cjs +1 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ Dual-licensed:
|
|
|
165
165
|
- [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI v3 styling
|
|
166
166
|
- [@elaraai/e3-ui](https://www.npmjs.com/package/@elaraai/e3-ui): e3 + UI bridge — Data bindings, `e3.ui()` task, manifest
|
|
167
167
|
- [@elaraai/e3-ui-components](https://www.npmjs.com/package/@elaraai/e3-ui-components): React Query hooks and preview components for the e3 API
|
|
168
|
-
- [@elaraai/e3-ui-cli](https://www.npmjs.com/package/@elaraai/e3-ui-cli):
|
|
168
|
+
- [@elaraai/e3-ui-cli](https://www.npmjs.com/package/@elaraai/e3-ui-cli): Browse an e3 repository in the terminal (`e3-ui [repo]`), and render east-ui / e3-ui components to PNG (`e3-ui shot`)
|
|
169
169
|
- [east-ui-preview](https://marketplace.visualstudio.com/items?itemName=ElaraAI.east-ui-preview): VS Code extension for live East UI component preview
|
|
170
170
|
|
|
171
171
|
- **[e3 — East Execution Engine](https://github.com/elaraai/east-workspace/tree/main/libs/e3)**: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RequestOptions } from '@elaraai/e3-api-client';
|
|
2
2
|
import { EastTypeValue } from '@elaraai/east';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { pruneRetainedPages } from '@elaraai/east-ui/internal';
|
|
4
|
+
/** Page retention — the row model's `pruneRetainedPages` (moved to
|
|
5
|
+
* `@elaraai/east-ui` in #719), re-exported here for its existing importers. */
|
|
6
|
+
export { pruneRetainedPages };
|
|
6
7
|
export interface PagedDatasetPreviewProps {
|
|
7
8
|
apiUrl: string;
|
|
8
9
|
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;
|
|
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,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAwB/D;gFACgF;AAChF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,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,CAAC;IAChC,oEAAoE;IACpE,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;6DAGyD;IACzD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAiCD,eAAO,MAAM,mBAAmB,gEAwLgH,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -64428,16 +64428,6 @@ function pagingDebug(...args) {
|
|
|
64428
64428
|
}
|
|
64429
64429
|
const PAGE_SIZE = 500;
|
|
64430
64430
|
const MAX_RETAINED_PAGES = 8;
|
|
64431
|
-
function pruneRetainedPages(pages, firstPage, lastPage, max5) {
|
|
64432
|
-
if (pages.size <= max5) return pages;
|
|
64433
|
-
const distance2 = (p2) => p2 < firstPage ? firstPage - p2 : p2 > lastPage ? p2 - lastPage : 0;
|
|
64434
|
-
const keep = [...pages.keys()].sort((a2, b2) => distance2(a2) - distance2(b2) || a2 - b2).slice(0, max5);
|
|
64435
|
-
const kept = /* @__PURE__ */ new Map();
|
|
64436
|
-
for (const p2 of keep.sort((a2, b2) => a2 - b2)) {
|
|
64437
|
-
kept.set(p2, pages.get(p2));
|
|
64438
|
-
}
|
|
64439
|
-
return kept;
|
|
64440
|
-
}
|
|
64441
64431
|
function pageRows(type, decoded, offset) {
|
|
64442
64432
|
if (type.type === "Array") {
|
|
64443
64433
|
const elemType2 = type.value;
|
|
@@ -64539,7 +64529,7 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64539
64529
|
if (!pages.has(p2)) missing.push(p2);
|
|
64540
64530
|
}
|
|
64541
64531
|
pagingDebug(`need rows [${startRow}, ${endRow}) → pages ${first2}..${last2}, missing=[${missing.join(",")}], inflight=[${[...inflightRef.current].join(",")}]`);
|
|
64542
|
-
setPages((prev2) => pruneRetainedPages(prev2, first2, last2, MAX_RETAINED_PAGES));
|
|
64532
|
+
setPages((prev2) => internal$2.pruneRetainedPages(prev2, first2, last2, MAX_RETAINED_PAGES));
|
|
64543
64533
|
for (const p2 of missing) loadPage(p2);
|
|
64544
64534
|
}, [pages, loadPage]);
|
|
64545
64535
|
const keyType = React.useMemo(() => type.type === "Dict" ? type.value.key : type.type === "Set" ? type.value : null, [type]);
|