@kepler.gl/processors 3.3.0-alpha.17 → 3.3.0-alpha.18

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/dist/esm/types.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export {};
2
2
  export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBNSVRcbi8vIENvcHlyaWdodCBjb250cmlidXRvcnMgdG8gdGhlIGtlcGxlci5nbCBwcm9qZWN0XG5cbmV4cG9ydCB0eXBlIEZpbGVDYWNoZUl0ZW0gPSB7XG4gIGRhdGE6IGFueTtcbiAgaW5mbzoge1xuICAgIGlkPzogc3RyaW5nO1xuICAgIGxhYmVsOiBzdHJpbmc7XG4gICAgZm9ybWF0OiBzdHJpbmc7XG4gICAgdHlwZT86IHN0cmluZztcbiAgfTtcbiAgbWV0YWRhdGE/OiB7XG4gICAgc291cmNlPzogc3RyaW5nO1xuICAgIGZvcm1hdD86IHN0cmluZztcbiAgICBzb3VyY2VGb3JtYXQ/OiBzdHJpbmc7XG4gICAgW2tleTogc3RyaW5nXTogdW5rbm93bjtcbiAgfTtcbn07XG5cbmV4cG9ydCB0eXBlIFZhbGlkS2VwbGVyR2xNYXAgPSB7XG4gIGRhdGFzZXRzOiB1bmtub3duO1xuICBjb25maWc6IHVua25vd247XG4gIGluZm86IFJlY29yZDxzdHJpbmcsIHN0cmluZz47XG59O1xuIl0sIm1hcHBpbmdzIjoiIiwiaWdub3JlTGlzdCI6W119
3
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBNSVRcbi8vIENvcHlyaWdodCBjb250cmlidXRvcnMgdG8gdGhlIGtlcGxlci5nbCBwcm9qZWN0XG5cbmV4cG9ydCB0eXBlIEZpbGVDYWNoZUl0ZW0gPSB7XG4gIGRhdGE6IGFueTtcbiAgLyoqXG4gICAqIEN1bXVsYXRpdmUgQXJyb3cgc25hcHNob3RzIHJlcGxheWVkIGFmdGVyIHRoZSB1c2VyIGNvbmZpcm1zIEFkZCBEYXRhLlxuICAgKiBLZXB0IG91dHNpZGUgYGRhdGFgIHNvIHRoZSBmaW5hbCBzdGFnZWQgZGF0YXNldCByZW1haW5zIGF2YWlsYWJsZSBmb3JcbiAgICogdmFsaWRhdGlvbiBhbmQgcm93LWNvdW50IGRpc3BsYXkgd2l0aG91dCBiZWluZyBhZGRlZCB0byB0aGUgbWFwIGVhcmx5LlxuICAgKi9cbiAgcHJvZ3Jlc3NpdmVEYXRhPzogYW55W107XG4gIGluZm86IHtcbiAgICBpZD86IHN0cmluZztcbiAgICBsYWJlbDogc3RyaW5nO1xuICAgIGZvcm1hdDogc3RyaW5nO1xuICAgIHR5cGU/OiBzdHJpbmc7XG4gIH07XG4gIG1ldGFkYXRhPzoge1xuICAgIHNvdXJjZT86IHN0cmluZztcbiAgICBmb3JtYXQ/OiBzdHJpbmc7XG4gICAgc291cmNlRm9ybWF0Pzogc3RyaW5nO1xuICAgIFtrZXk6IHN0cmluZ106IHVua25vd247XG4gIH07XG59O1xuXG5leHBvcnQgdHlwZSBWYWxpZEtlcGxlckdsTWFwID0ge1xuICBkYXRhc2V0czogdW5rbm93bjtcbiAgY29uZmlnOiB1bmtub3duO1xuICBpbmZvOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+O1xufTtcbiJdLCJtYXBwaW5ncyI6IiIsImlnbm9yZUxpc3QiOltdfQ==
@@ -1,5 +1,7 @@
1
+ import type { Field } from '@kepler.gl/types';
2
+ import type { DataContainerInterface } from '@kepler.gl/utils';
1
3
  import type { FeatureCollection } from 'geojson';
2
4
  /**
3
5
  * Write a GeoJSON FeatureCollection as GeoParquet 1.1 (WKB geometry, WGS84).
4
6
  */
5
- export declare function writeGeoParquet(geojson: FeatureCollection): Promise<Uint8Array>;
7
+ export declare function writeGeoParquet(geojson: FeatureCollection, fields?: Field[], data?: DataContainerInterface): Promise<Uint8Array>;
@@ -1,6 +1,7 @@
1
1
  import { Loader } from '@loaders.gl/loader-utils';
2
+ import { ParseGeoArrowInput, ParseGeoArrowResult } from '@loaders.gl/arrow';
2
3
  import { isArrowTable } from '@kepler.gl/utils';
3
- import { AddDataToMapOptions, AddDataToMapPayload } from '@kepler.gl/types';
4
+ import { AddDataToMapOptions, AddDataToMapPayload, GeoArrowBinaryData, ProcessorResult } from '@kepler.gl/types';
4
5
  import type { Feature, FeatureCollection } from 'geojson';
5
6
  import { FileCacheItem, ValidKeplerGlMap } from './types';
6
7
  export type ProcessFileDataContent = {
@@ -31,8 +32,22 @@ export type ProcessFileDataContent = {
31
32
  * progressive Arrow loads so each batch does not copy the growing table.
32
33
  */
33
34
  skipArrowCompact?: boolean;
35
+ /** Build cumulative Arrow snapshots that can be replayed after Add Data confirmation. */
36
+ prepareProgressiveReplay?: boolean;
34
37
  };
35
38
  export { isArrowTable };
39
+ type ParseGeoArrowWorker = (data: ParseGeoArrowInput) => Promise<ParseGeoArrowResult>;
40
+ /**
41
+ * Convert native GeoArrow chunks to deck.gl binary features without blocking
42
+ * the main thread. WKB/WKT remain on the synchronous fallback because the
43
+ * loaders.gl triangulation worker only supports native GeoArrow encodings.
44
+ */
45
+ export declare function parseGeoArrowBatchesOnWorkers(data: NonNullable<ProcessorResult>, options?: {
46
+ latestOnly?: boolean;
47
+ parseOnWorker?: ParseGeoArrowWorker;
48
+ /** Merge per-batch worker output when the final Arrow table was compacted to one chunk. */
49
+ targetChunkCount?: number;
50
+ }): Promise<GeoArrowBinaryData | undefined>;
36
51
  /**
37
52
  * check if data is an ArrowData object, which is an array of RecordBatch
38
53
  * @param data - object to check
@@ -68,4 +83,9 @@ export declare function processFileData({ content, fileCache }: {
68
83
  content: ProcessFileDataContent;
69
84
  fileCache: FileCacheItem[];
70
85
  }): Promise<FileCacheItem[]>;
86
+ /**
87
+ * Expand staged files into cumulative payloads for one redraw per Arrow batch.
88
+ * Non-progressive files are present only in the first payload.
89
+ */
90
+ export declare function fileCacheToProgressiveSteps(fileCache: FileCacheItem[]): FileCacheItem[][];
71
91
  export declare function filesToDataPayload(fileCache: FileCacheItem[], options?: AddDataToMapOptions): AddDataToMapPayload[];
package/dist/types.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  export type FileCacheItem = {
2
2
  data: any;
3
+ /**
4
+ * Cumulative Arrow snapshots replayed after the user confirms Add Data.
5
+ * Kept outside `data` so the final staged dataset remains available for
6
+ * validation and row-count display without being added to the map early.
7
+ */
8
+ progressiveData?: any[];
3
9
  info: {
4
10
  id?: string;
5
11
  label: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kepler.gl/processors",
3
3
  "author": "Shan He <shan@uber.com>",
4
- "version": "3.3.0-alpha.17",
4
+ "version": "3.3.0-alpha.18",
5
5
  "description": "kepler.gl constants used by kepler.gl components, actions and reducers",
6
6
  "license": "MIT",
7
7
  "main": "dist/cjs/index.js",
@@ -29,12 +29,12 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@deck.gl-community/editable-layers": "9.3.8",
32
- "@kepler.gl/common-utils": "3.3.0-alpha.17",
33
- "@kepler.gl/constants": "3.3.0-alpha.17",
34
- "@kepler.gl/schemas": "3.3.0-alpha.17",
35
- "@kepler.gl/table": "3.3.0-alpha.17",
36
- "@kepler.gl/types": "3.3.0-alpha.17",
37
- "@kepler.gl/utils": "3.3.0-alpha.17",
32
+ "@kepler.gl/common-utils": "3.3.0-alpha.18",
33
+ "@kepler.gl/constants": "3.3.0-alpha.18",
34
+ "@kepler.gl/schemas": "3.3.0-alpha.18",
35
+ "@kepler.gl/table": "3.3.0-alpha.18",
36
+ "@kepler.gl/types": "3.3.0-alpha.18",
37
+ "@kepler.gl/utils": "3.3.0-alpha.18",
38
38
  "@loaders.gl/arrow": "^4.4.1",
39
39
  "@loaders.gl/core": "^4.4.1",
40
40
  "@loaders.gl/csv": "^4.4.1",