@loaders.gl/schema 4.0.0-alpha.22 → 4.0.0-alpha.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"category-table.js","names":[],"sources":["../../../src/types/category-table.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\nimport type {Batch, Schema} from './schema';\nimport type {Feature} from './category-gis';\n\n// Idea was to just import types, but it seems\n// Seems this triggers more bundling and build issues than it is worth...\n// import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\n// type ApacheArrowTable = any;\n// type RecordBatch = any;\n\n/** A general table */\nexport type Table =\n | RowTable\n | ArrayRowTable\n | ObjectRowTable\n | GeoJSONRowTable\n | ColumnarTable\n | ArrowTable;\n\n/** A table organized as an array of rows */\nexport type RowTable = ArrayRowTable | ObjectRowTable | GeoJSONRowTable;\n\n/** A table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTable = {\n shape: 'array-row-table';\n schema?: Schema;\n data: any[][];\n};\n\n/** A table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTable = {\n shape: 'object-row-table';\n schema?: Schema;\n data: {[columnName: string]: any}[];\n};\n\n/** A table organized as an array of rows, each row is a GeoJSON Feature */\nexport type GeoJSONRowTable = {\n shape: 'geojson-row-table';\n schema?: Schema;\n data: Feature[];\n};\n\n/** A table organized as a map of columns, each column is an array of value */\nexport type ColumnarTable = {\n shape: 'columnar-table';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** A table organized as an Apache Arrow table */\nexport type ArrowTable = {\n shape: 'arrow-table';\n schema?: Schema;\n data: ApacheArrowTable;\n};\n\n/** A collection of tables */\nexport type Tables<TableType = Table> = {\n shape: 'tables';\n tables: {name: string; table: TableType}[];\n};\n\n// Batches\n\n/** Batch for a general table */\nexport type TableBatch = Batch & {\n data: any;\n length: number;\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTableBatch = TableBatch & {\n shape: 'array-row-table';\n data: any[][];\n};\n\n/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTableBatch = TableBatch & {\n shape: 'object-row-table';\n data: {[columnName: string]: any}[];\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type GeoJSONRowTableBatch = TableBatch & {\n shape: 'geojson-row-table';\n data: Feature[];\n};\n\n/** Batch for a table organized as a map of columns, each column is an array of value */\nexport type ColumnarTableBatch = TableBatch & {\n shape: 'columnar-table';\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** Batch for a table organized as an Apache Arrow table */\nexport type ArrowTableBatch = TableBatch & {\n shape: 'arrow-table';\n data: RecordBatch;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"category-table.js","names":[],"sources":["../../../src/types/category-table.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\nimport type {Batch, Schema} from './schema';\nimport type {Feature} from './category-gis';\n\n// Idea was to just import types, but it seems\n// Seems this triggers more bundling and build issues than it is worth...\n// import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\n// type ApacheArrowTable = any;\n// type RecordBatch = any;\n\n/** A general table */\nexport type Table =\n | RowTable\n | ArrayRowTable\n | ObjectRowTable\n | GeoJSONRowTable\n | ColumnarTable\n | ArrowTable;\n\n/** A table organized as an array of rows */\nexport type RowTable = ArrayRowTable | ObjectRowTable | GeoJSONRowTable;\n\n/** A table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTable = {\n shape: 'array-row-table';\n schema?: Schema;\n data: any[][];\n};\n\n/** A table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTable = {\n shape: 'object-row-table';\n schema?: Schema;\n data: {[columnName: string]: any}[];\n};\n\n/** A table organized as an array of rows, each row is a GeoJSON Feature */\nexport type GeoJSONRowTable = {\n shape: 'geojson-row-table';\n schema?: Schema;\n data: Feature[];\n};\n\n/** A table organized as a map of columns, each column is an array of value */\nexport type ColumnarTable = {\n shape: 'columnar-table';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** A table organized as an Apache Arrow table */\nexport type ArrowTable = {\n shape: 'arrow-table';\n schema?: Schema;\n data: ApacheArrowTable;\n};\n\n/** A collection of tables */\nexport type Tables<TableType = Table> = {\n shape: 'tables';\n tables: {name: string; table: TableType}[];\n};\n\n// Batches\n\n/** Batch for a general table */\nexport type TableBatch =\n | ArrayRowTableBatch\n | ObjectRowTableBatch\n | GeoJSONRowTableBatch\n | ColumnarTableBatch\n | ArrowTableBatch;\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTableBatch = Batch & {\n shape: 'array-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: any[][];\n length: number;\n};\n\n/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTableBatch = Batch & {\n shape: 'object-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: {[columnName: string]: any}[];\n length: number;\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type GeoJSONRowTableBatch = Batch & {\n shape: 'geojson-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: Feature[];\n length: number;\n};\n\n/** Batch for a table organized as a map of columns, each column is an array of value */\nexport type ColumnarTableBatch = Batch & {\n shape: 'columnar-table';\n schemaType?: 'explicit' | 'deduced';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n length: number;\n};\n\n/** Batch for a table organized as an Apache Arrow table */\nexport type ArrowTableBatch = Batch & {\n shape: 'arrow-table';\n schemaType?: 'explicit' | 'deduced';\n schema?: Schema;\n data: RecordBatch;\n length: number;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"category-table.js","names":[],"sources":["../../../src/types/category-table.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\nimport type {Batch, Schema} from './schema';\nimport type {Feature} from './category-gis';\n\n// Idea was to just import types, but it seems\n// Seems this triggers more bundling and build issues than it is worth...\n// import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\n// type ApacheArrowTable = any;\n// type RecordBatch = any;\n\n/** A general table */\nexport type Table =\n | RowTable\n | ArrayRowTable\n | ObjectRowTable\n | GeoJSONRowTable\n | ColumnarTable\n | ArrowTable;\n\n/** A table organized as an array of rows */\nexport type RowTable = ArrayRowTable | ObjectRowTable | GeoJSONRowTable;\n\n/** A table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTable = {\n shape: 'array-row-table';\n schema?: Schema;\n data: any[][];\n};\n\n/** A table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTable = {\n shape: 'object-row-table';\n schema?: Schema;\n data: {[columnName: string]: any}[];\n};\n\n/** A table organized as an array of rows, each row is a GeoJSON Feature */\nexport type GeoJSONRowTable = {\n shape: 'geojson-row-table';\n schema?: Schema;\n data: Feature[];\n};\n\n/** A table organized as a map of columns, each column is an array of value */\nexport type ColumnarTable = {\n shape: 'columnar-table';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** A table organized as an Apache Arrow table */\nexport type ArrowTable = {\n shape: 'arrow-table';\n schema?: Schema;\n data: ApacheArrowTable;\n};\n\n/** A collection of tables */\nexport type Tables<TableType = Table> = {\n shape: 'tables';\n tables: {name: string; table: TableType}[];\n};\n\n// Batches\n\n/** Batch for a general table */\nexport type TableBatch = Batch & {\n data: any;\n length: number;\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTableBatch = TableBatch & {\n shape: 'array-row-table';\n data: any[][];\n};\n\n/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTableBatch = TableBatch & {\n shape: 'object-row-table';\n data: {[columnName: string]: any}[];\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type GeoJSONRowTableBatch = TableBatch & {\n shape: 'geojson-row-table';\n data: Feature[];\n};\n\n/** Batch for a table organized as a map of columns, each column is an array of value */\nexport type ColumnarTableBatch = TableBatch & {\n shape: 'columnar-table';\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** Batch for a table organized as an Apache Arrow table */\nexport type ArrowTableBatch = TableBatch & {\n shape: 'arrow-table';\n data: RecordBatch;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"category-table.js","names":[],"sources":["../../../src/types/category-table.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\nimport type {Batch, Schema} from './schema';\nimport type {Feature} from './category-gis';\n\n// Idea was to just import types, but it seems\n// Seems this triggers more bundling and build issues than it is worth...\n// import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';\n// type ApacheArrowTable = any;\n// type RecordBatch = any;\n\n/** A general table */\nexport type Table =\n | RowTable\n | ArrayRowTable\n | ObjectRowTable\n | GeoJSONRowTable\n | ColumnarTable\n | ArrowTable;\n\n/** A table organized as an array of rows */\nexport type RowTable = ArrayRowTable | ObjectRowTable | GeoJSONRowTable;\n\n/** A table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTable = {\n shape: 'array-row-table';\n schema?: Schema;\n data: any[][];\n};\n\n/** A table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTable = {\n shape: 'object-row-table';\n schema?: Schema;\n data: {[columnName: string]: any}[];\n};\n\n/** A table organized as an array of rows, each row is a GeoJSON Feature */\nexport type GeoJSONRowTable = {\n shape: 'geojson-row-table';\n schema?: Schema;\n data: Feature[];\n};\n\n/** A table organized as a map of columns, each column is an array of value */\nexport type ColumnarTable = {\n shape: 'columnar-table';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n};\n\n/** A table organized as an Apache Arrow table */\nexport type ArrowTable = {\n shape: 'arrow-table';\n schema?: Schema;\n data: ApacheArrowTable;\n};\n\n/** A collection of tables */\nexport type Tables<TableType = Table> = {\n shape: 'tables';\n tables: {name: string; table: TableType}[];\n};\n\n// Batches\n\n/** Batch for a general table */\nexport type TableBatch =\n | ArrayRowTableBatch\n | ObjectRowTableBatch\n | GeoJSONRowTableBatch\n | ColumnarTableBatch\n | ArrowTableBatch;\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type ArrayRowTableBatch = Batch & {\n shape: 'array-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: any[][];\n length: number;\n};\n\n/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */\nexport type ObjectRowTableBatch = Batch & {\n shape: 'object-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: {[columnName: string]: any}[];\n length: number;\n};\n\n/** Batch for a table organized as an array of rows, each row is an array of values */\nexport type GeoJSONRowTableBatch = Batch & {\n shape: 'geojson-row-table';\n schema?: Schema;\n schemaType?: 'explicit' | 'deduced';\n data: Feature[];\n length: number;\n};\n\n/** Batch for a table organized as a map of columns, each column is an array of value */\nexport type ColumnarTableBatch = Batch & {\n shape: 'columnar-table';\n schemaType?: 'explicit' | 'deduced';\n schema?: Schema;\n data: {[columnName: string]: ArrayLike<unknown>};\n length: number;\n};\n\n/** Batch for a table organized as an Apache Arrow table */\nexport type ArrowTableBatch = Batch & {\n shape: 'arrow-table';\n schemaType?: 'explicit' | 'deduced';\n schema?: Schema;\n data: RecordBatch;\n length: number;\n};\n"],"mappings":""}
@@ -48,39 +48,49 @@ export type Tables<TableType = Table> = {
48
48
  }[];
49
49
  };
50
50
  /** Batch for a general table */
51
- export type TableBatch = Batch & {
52
- data: any;
53
- length: number;
54
- schema?: Schema;
55
- schemaType?: 'explicit' | 'deduced';
56
- };
51
+ export type TableBatch = ArrayRowTableBatch | ObjectRowTableBatch | GeoJSONRowTableBatch | ColumnarTableBatch | ArrowTableBatch;
57
52
  /** Batch for a table organized as an array of rows, each row is an array of values */
58
- export type ArrayRowTableBatch = TableBatch & {
53
+ export type ArrayRowTableBatch = Batch & {
59
54
  shape: 'array-row-table';
55
+ schema?: Schema;
56
+ schemaType?: 'explicit' | 'deduced';
60
57
  data: any[][];
58
+ length: number;
61
59
  };
62
60
  /** Batch for a table organized as an array of rows, each row is an object mapping columns to values */
63
- export type ObjectRowTableBatch = TableBatch & {
61
+ export type ObjectRowTableBatch = Batch & {
64
62
  shape: 'object-row-table';
63
+ schema?: Schema;
64
+ schemaType?: 'explicit' | 'deduced';
65
65
  data: {
66
66
  [columnName: string]: any;
67
67
  }[];
68
+ length: number;
68
69
  };
69
70
  /** Batch for a table organized as an array of rows, each row is an array of values */
70
- export type GeoJSONRowTableBatch = TableBatch & {
71
+ export type GeoJSONRowTableBatch = Batch & {
71
72
  shape: 'geojson-row-table';
73
+ schema?: Schema;
74
+ schemaType?: 'explicit' | 'deduced';
72
75
  data: Feature[];
76
+ length: number;
73
77
  };
74
78
  /** Batch for a table organized as a map of columns, each column is an array of value */
75
- export type ColumnarTableBatch = TableBatch & {
79
+ export type ColumnarTableBatch = Batch & {
76
80
  shape: 'columnar-table';
81
+ schemaType?: 'explicit' | 'deduced';
82
+ schema?: Schema;
77
83
  data: {
78
84
  [columnName: string]: ArrayLike<unknown>;
79
85
  };
86
+ length: number;
80
87
  };
81
88
  /** Batch for a table organized as an Apache Arrow table */
82
- export type ArrowTableBatch = TableBatch & {
89
+ export type ArrowTableBatch = Batch & {
83
90
  shape: 'arrow-table';
91
+ schemaType?: 'explicit' | 'deduced';
92
+ schema?: Schema;
84
93
  data: RecordBatch;
94
+ length: number;
85
95
  };
86
96
  //# sourceMappingURL=category-table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-table.d.ts","sourceRoot":"","sources":["../../src/types/category-table.ts"],"names":[],"mappings":"AAEA,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AC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG;IACvC,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QAAC,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAA;KAAC,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG;IACpC,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/schema",
3
- "version": "4.0.0-alpha.22",
3
+ "version": "4.0.0-alpha.23",
4
4
  "description": "Table format APIs for JSON, CSV, etc...",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -34,5 +34,5 @@
34
34
  "dependencies": {
35
35
  "@types/geojson": "^7946.0.7"
36
36
  },
37
- "gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2"
37
+ "gitHead": "e212f2a0c0e342f7cb65ce84fa2ff39f64b7d94b"
38
38
  }
@@ -66,39 +66,54 @@ export type Tables<TableType = Table> = {
66
66
  // Batches
67
67
 
68
68
  /** Batch for a general table */
69
- export type TableBatch = Batch & {
70
- data: any;
71
- length: number;
72
- schema?: Schema;
73
- schemaType?: 'explicit' | 'deduced';
74
- };
69
+ export type TableBatch =
70
+ | ArrayRowTableBatch
71
+ | ObjectRowTableBatch
72
+ | GeoJSONRowTableBatch
73
+ | ColumnarTableBatch
74
+ | ArrowTableBatch;
75
75
 
76
76
  /** Batch for a table organized as an array of rows, each row is an array of values */
77
- export type ArrayRowTableBatch = TableBatch & {
77
+ export type ArrayRowTableBatch = Batch & {
78
78
  shape: 'array-row-table';
79
+ schema?: Schema;
80
+ schemaType?: 'explicit' | 'deduced';
79
81
  data: any[][];
82
+ length: number;
80
83
  };
81
84
 
82
85
  /** Batch for a table organized as an array of rows, each row is an object mapping columns to values */
83
- export type ObjectRowTableBatch = TableBatch & {
86
+ export type ObjectRowTableBatch = Batch & {
84
87
  shape: 'object-row-table';
88
+ schema?: Schema;
89
+ schemaType?: 'explicit' | 'deduced';
85
90
  data: {[columnName: string]: any}[];
91
+ length: number;
86
92
  };
87
93
 
88
94
  /** Batch for a table organized as an array of rows, each row is an array of values */
89
- export type GeoJSONRowTableBatch = TableBatch & {
95
+ export type GeoJSONRowTableBatch = Batch & {
90
96
  shape: 'geojson-row-table';
97
+ schema?: Schema;
98
+ schemaType?: 'explicit' | 'deduced';
91
99
  data: Feature[];
100
+ length: number;
92
101
  };
93
102
 
94
103
  /** Batch for a table organized as a map of columns, each column is an array of value */
95
- export type ColumnarTableBatch = TableBatch & {
104
+ export type ColumnarTableBatch = Batch & {
96
105
  shape: 'columnar-table';
106
+ schemaType?: 'explicit' | 'deduced';
107
+ schema?: Schema;
97
108
  data: {[columnName: string]: ArrayLike<unknown>};
109
+ length: number;
98
110
  };
99
111
 
100
112
  /** Batch for a table organized as an Apache Arrow table */
101
- export type ArrowTableBatch = TableBatch & {
113
+ export type ArrowTableBatch = Batch & {
102
114
  shape: 'arrow-table';
115
+ schemaType?: 'explicit' | 'deduced';
116
+ schema?: Schema;
103
117
  data: RecordBatch;
118
+ length: number;
104
119
  };