Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@loaders.gl/schema

Package Overview
Dependencies
Maintainers
7
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/schema - npm Package Compare versions

Comparing version 4.0.0-alpha.4 to 4.0.0-alpha.5

dist/bundle.d.ts

2

dist/category/mesh/deduce-mesh-schema.js

@@ -1,2 +0,2 @@

import { Schema, Field, FixedSizeList } from '../../lib/schema';
import { Schema, Field, FixedSizeList } from '../../lib/schema/schema';
import { getArrowTypeFromTypedArray } from '../../lib/arrow/arrow-like-type-utils';

@@ -3,0 +3,0 @@ export function deduceMeshSchema(attributes, metadata) {

@@ -8,3 +8,3 @@ export { default as TableBatchBuilder } from './lib/batches/table-batch-builder';

export { deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata } from './category/mesh/deduce-mesh-schema';
export { Schema, Field, DataType, Null, Binary, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct } from './lib/schema';
export { Schema, Field, DataType, Null, Binary, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct } from './lib/schema/schema';
export { deduceTypeFromColumn, deduceTypeFromValue } from './lib/schema-utils/deduce-column-type';

@@ -11,0 +11,0 @@ export { getTypeInfo } from './lib/arrow/get-type-info';

@@ -1,2 +0,2 @@

import { Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8 } from '../schema';
import { Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8 } from '../schema/schema';
export function getArrowTypeFromTypedArray(array) {

@@ -3,0 +3,0 @@ switch (array.constructor) {

@@ -1,2 +0,2 @@

import { Type } from '../schema';
import { Type } from '../schema/schema';
export function getTypeInfo(arrowTypeLike) {

@@ -3,0 +3,0 @@ return {

{
"name": "@loaders.gl/schema",
"version": "4.0.0-alpha.4",
"version": "4.0.0-alpha.5",
"description": "Table format APIs for JSON, CSV, etc...",

@@ -21,3 +21,3 @@ "license": "MIT",

],
"types": "src/index.ts",
"types": "dist/index.d.ts",
"main": "dist/index.js",

@@ -33,3 +33,3 @@ "module": "dist/index.js",

"pre-build": "npm run build-bundle",
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js"
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
},

@@ -40,3 +40,3 @@ "dependencies": {

},
"gitHead": "53026061b3c8871f7e96d3a5826125cc6613bddc"
"gitHead": "7a71a54bdf1ddf985cc3af3db90b82e7fa97d025"
}
// GIS
import type {TypedArray} from '../types';
import type {Feature, Geometry, Point, LineString, Polygon} from 'geojson';

@@ -9,4 +10,70 @@ // GEOJSON FORMAT GEOMETRY

// eslint-disable-next-line import/no-unresolved
export type {Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon} from 'geojson';
export type {
Point,
MultiPoint,
LineString,
MultiLineString,
Polygon,
MultiPolygon,
GeometryCollection
} from 'geojson';
// Aggregate information for converting GeoJSON into other formats
export type GeojsonGeometryInfo = {
coordLength: number;
pointPositionsCount: number;
pointFeaturesCount: number;
linePositionsCount: number;
linePathsCount: number;
lineFeaturesCount: number;
polygonPositionsCount: number;
polygonObjectsCount: number;
polygonRingsCount: number;
polygonFeaturesCount: number;
};
// FLAT GEOJSON FORMAT GEOMETRY
export type FlatGeometryType = 'Point' | 'LineString' | 'Polygon';
type RemoveCoordinatesField<Type> = {
[Property in keyof Type as Exclude<Property, 'coordinates'>]: Type[Property];
};
/**
* Generic flat geometry data storage type
*/
export type FlatIndexedGeometry = {
data: number[];
indices: number[];
};
/**
* GeoJSON (Multi)Point geometry with coordinate data flattened into `data` array and indexed by `indices`
*/
export type FlatPoint = RemoveCoordinatesField<Point> & FlatIndexedGeometry;
/**
* GeoJSON (Multi)LineString geometry with coordinate data flattened into `data` array and indexed by `indices`
*/
export type FlatLineString = RemoveCoordinatesField<LineString> & FlatIndexedGeometry;
/**
* GeoJSON (Multi)Polygon geometry with coordinate data flattened into `data` array and indexed by 2D `indices`
*/
export type FlatPolygon = RemoveCoordinatesField<Polygon> & {
data: number[];
indices: number[][];
areas: number[][];
};
export type FlatGeometry = FlatPoint | FlatLineString | FlatPolygon;
type FlattenGeometry<Type> = {
[Property in keyof Type]: Type[Property] extends Geometry ? FlatGeometry : Type[Property];
};
/**
* GeoJSON Feature with Geometry replaced by FlatGeometry
*/
export type FlatFeature = FlattenGeometry<Feature>;
// BINARY FORMAT GEOMETRY

@@ -41,2 +108,3 @@

primitivePolygonIndices: BinaryAttribute;
triangles?: BinaryAttribute;
};

@@ -43,0 +111,0 @@

import {MeshAttribute, MeshAttributes} from './mesh-types';
import {Schema, Field, FixedSizeList} from '../../lib/schema';
import {Schema, Field, FixedSizeList} from '../../lib/schema/schema';
import {getArrowTypeFromTypedArray} from '../../lib/arrow/arrow-like-type-utils';

@@ -4,0 +4,0 @@

@@ -1,2 +0,2 @@

import type {Schema} from '../../lib/schema';
import type {Schema} from '../../lib/schema/schema';
import type {TypedArray} from '../../types';

@@ -3,0 +3,0 @@ import type {ColumnarTable, ArrowTable} from '../table/table-types';

@@ -17,3 +17,3 @@ // Type deduction

// Null
} from '../../lib/schema';
} from '../../lib/schema/schema';

@@ -20,0 +20,0 @@ // const TYPED_ARRAY_TO_TYPE = {

@@ -1,2 +0,2 @@

import type {Schema} from '../../lib/schema';
import type {Schema} from '../../lib/schema/schema';
import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow/Arrow.dom';

@@ -3,0 +3,0 @@ import type {AnyArray} from '../../types';

@@ -7,3 +7,2 @@ // COMMON CATEGORY

// TABLE CATEGORY TYPES
export type {

@@ -50,2 +49,8 @@ Table,

// TEXTURES
export type {TextureLevel, GPUTextureFormat} from './category/texture/texture';
// IMAGES
export type {ImageDataType, ImageType, ImageTypeEnum} from './category/image/image';
// TYPES

@@ -60,5 +65,19 @@ // GIS CATEGORY - GEOJSON

Polygon,
MultiPolygon
MultiPolygon,
GeometryCollection
} from './category/gis';
export type {GeojsonGeometryInfo} from './category/gis';
// GIS CATEGORY - FLAT GEOJSON
export type {
FlatFeature,
FlatIndexedGeometry,
FlatGeometry,
FlatGeometryType,
FlatPoint,
FlatLineString,
FlatPolygon
} from './category/gis';
// GIS CATEGORY - BINARY

@@ -118,3 +137,3 @@ export type {

Struct
} from './lib/schema';
} from './lib/schema/schema';

@@ -121,0 +140,0 @@ // EXPERIMENTAL APIs

import type {TypedArray} from '../../types';
import {DataType, Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8} from '../schema';
import {
DataType,
Float32,
Float64,
Int16,
Int32,
Int8,
Uint16,
Uint32,
Uint8
} from '../schema/schema';

@@ -4,0 +14,0 @@ export function getArrowTypeFromTypedArray(array: TypedArray): DataType {

@@ -1,2 +0,2 @@

import {Type} from '../schema';
import {Type} from '../schema/schema';
import {AnyArray} from '../../types';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import type {Schema} from '../schema';
import type {Schema} from '../schema/schema';
import type {TableBatch} from '../../category/table/table-types';

@@ -3,0 +3,0 @@ import {TableBatchAggregator, TableBatchOptions} from './table-batch-aggregator';

@@ -1,2 +0,2 @@

import type {Schema} from '../schema';
import type {Schema} from '../schema/schema';
import type {ColumnarTableBatch, ArrowTableBatch} from '../../category/table/table-types';

@@ -3,0 +3,0 @@ import {TableBatchAggregator} from './table-batch-aggregator';

@@ -1,2 +0,2 @@

import type {Schema} from '../schema';
import type {Schema} from '../schema/schema';
import type {TableBatch} from '../../category/table/table-types';

@@ -3,0 +3,0 @@ // import type {ArrayRowTableBatch, ObjectRowTableBatch} from '../../category/table';

@@ -1,2 +0,2 @@

import type {Schema} from '../schema';
import type {Schema} from '../schema/schema';
import type {TableBatch} from '../../category/table/table-types';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import type {Schema} from '../schema';
import type {Schema} from '../schema/schema';
import type {TableBatch} from '../../category/table/table-types';

@@ -3,0 +3,0 @@ import type {TableBatchAggregator, TableBatchConstructor} from './table-batch-aggregator';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc