@loaders.gl/schema 3.1.0-beta.1 → 3.1.0-beta.2

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 (30) hide show
  1. package/dist/bundle.js +211 -15081
  2. package/dist/category/common.d.ts +2 -1
  3. package/dist/category/common.d.ts.map +1 -1
  4. package/dist/category/mesh/convert-mesh.js +5 -6
  5. package/dist/category/mesh/mesh-to-arrow-table.d.ts +0 -10
  6. package/dist/category/mesh/mesh-to-arrow-table.d.ts.map +1 -1
  7. package/dist/category/mesh/mesh-to-arrow-table.js +36 -26
  8. package/dist/category/table/table-types.d.ts +3 -1
  9. package/dist/category/table/table-types.d.ts.map +1 -1
  10. package/dist/es5/category/mesh/convert-mesh.js +0 -8
  11. package/dist/es5/category/mesh/convert-mesh.js.map +1 -1
  12. package/dist/es5/category/mesh/mesh-to-arrow-table.js +0 -39
  13. package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +1 -1
  14. package/dist/es5/lib/arrow/arrow-type-utils.js +0 -70
  15. package/dist/es5/lib/arrow/arrow-type-utils.js.map +1 -1
  16. package/dist/esm/category/mesh/convert-mesh.js +0 -7
  17. package/dist/esm/category/mesh/convert-mesh.js.map +1 -1
  18. package/dist/esm/category/mesh/mesh-to-arrow-table.js +0 -29
  19. package/dist/esm/category/mesh/mesh-to-arrow-table.js.map +1 -1
  20. package/dist/esm/lib/arrow/arrow-type-utils.js +0 -60
  21. package/dist/esm/lib/arrow/arrow-type-utils.js.map +1 -1
  22. package/dist/lib/arrow/arrow-type-utils.d.ts +0 -5
  23. package/dist/lib/arrow/arrow-type-utils.d.ts.map +1 -1
  24. package/dist/lib/arrow/arrow-type-utils.js +67 -47
  25. package/package.json +3 -4
  26. package/src/category/common.ts +2 -1
  27. package/src/category/mesh/convert-mesh.ts +6 -6
  28. package/src/category/mesh/mesh-to-arrow-table.ts +4 -2
  29. package/src/category/table/table-types.ts +4 -1
  30. package/src/lib/arrow/arrow-type-utils.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/schema",
3
- "version": "3.1.0-beta.1",
3
+ "version": "3.1.0-beta.2",
4
4
  "description": "Table format APIs for JSON, CSV, etc...",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -32,8 +32,7 @@
32
32
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js"
33
33
  },
34
34
  "dependencies": {
35
- "@types/geojson": "^7946.0.7",
36
- "apache-arrow": "^4.0.0"
35
+ "@types/geojson": "^7946.0.7"
37
36
  },
38
- "gitHead": "980cdefb4e8ec9ef9c951d20c78cf77777707f49"
37
+ "gitHead": "90f487e7b3f15c554d57c92497d3a12d71676818"
39
38
  }
@@ -1,4 +1,5 @@
1
- import type {RecordBatch} from 'apache-arrow';
1
+ // import type {RecordBatch} from 'apache-arrow';
2
+ type RecordBatch = any;
2
3
 
3
4
  export type Field = any;
4
5
 
@@ -1,6 +1,6 @@
1
1
  import type {Mesh} from './mesh-types';
2
2
  import type {ColumnarTable, ArrowTable} from '../table/table-types';
3
- import {convertMeshToArrowTable} from './mesh-to-arrow-table';
3
+ // import {convertMeshToArrowTable} from './mesh-to-arrow-table';
4
4
 
5
5
  type TargetShape = 'mesh' | 'columnar-table' | 'arrow-table';
6
6
 
@@ -17,11 +17,11 @@ export function convertMesh(
17
17
  return mesh;
18
18
  case 'columnar-table':
19
19
  return convertMeshToColumnarTable(mesh);
20
- case 'arrow-table':
21
- return {
22
- shape: 'arrow-table',
23
- data: convertMeshToArrowTable(mesh)
24
- };
20
+ // case 'arrow-table':
21
+ // return {
22
+ // shape: 'arrow-table',
23
+ // data: convertMeshToArrowTable(mesh)
24
+ // };
25
25
  default:
26
26
  throw new Error(`Unsupported shape ${options?.shape}`);
27
27
  }
@@ -1,3 +1,4 @@
1
+ /*
1
2
  import {
2
3
  Table,
3
4
  Schema,
@@ -6,7 +7,7 @@ import {
6
7
  Field,
7
8
  Data,
8
9
  FixedSizeListVector
9
- } from 'apache-arrow/Arrow.dom';
10
+ } from 'apache-arrow';
10
11
  import {AbstractVector} from 'apache-arrow/vector';
11
12
  import {getArrowType, getArrowVector} from '../../lib/arrow/arrow-type-utils';
12
13
  import type {Mesh} from './mesh-types';
@@ -18,7 +19,7 @@ import {makeMeshAttributeMetadata} from './deduce-mesh-schema';
18
19
  * @param metadata
19
20
  * @param batchSize
20
21
  * @returns
21
- */
22
+ *
22
23
  export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
23
24
  const vectors: AbstractVector[] = [];
24
25
  const fields: Field[] = [];
@@ -39,3 +40,4 @@ export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
39
40
  const table = new Table(schema, recordBatch);
40
41
  return table;
41
42
  }
43
+ */
@@ -1,7 +1,10 @@
1
1
  import type {Schema} from '../../lib/schema/schema';
2
- import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow/Arrow.dom';
3
2
  import type {AnyArray} from '../../types';
4
3
  import type {Batch} from '../common';
4
+ // TODO Arrow dependency causes issues
5
+ // import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow/Arrow.dom';
6
+ type ApacheArrowTable = any;
7
+ type RecordBatch = any;
5
8
 
6
9
  /** A general table */
7
10
  export interface Table {
@@ -1,3 +1,4 @@
1
+ /*
1
2
  import type {TypedArray} from '../../types';
2
3
  import {
3
4
  DataType,
@@ -65,3 +66,4 @@ export function getArrowVector(array: TypedArray): AbstractVector {
65
66
  throw new Error('array type not supported');
66
67
  }
67
68
  }
69
+ */