@loaders.gl/arrow 4.0.0 → 4.0.1

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 (62) hide show
  1. package/dist/arrow-loader.d.ts.map +1 -1
  2. package/dist/arrow-loader.js.map +1 -1
  3. package/dist/arrow-worker.js +2 -2
  4. package/dist/arrow-writer.d.ts.map +1 -1
  5. package/dist/arrow-writer.js.map +1 -1
  6. package/dist/dist.dev.js +650 -2
  7. package/dist/geoarrow/convert-geoarrow-to-binary-geometry.d.ts +24 -0
  8. package/dist/geoarrow/convert-geoarrow-to-binary-geometry.d.ts.map +1 -0
  9. package/dist/geoarrow/convert-geoarrow-to-binary-geometry.js +190 -0
  10. package/dist/geoarrow/convert-geoarrow-to-binary-geometry.js.map +1 -0
  11. package/dist/geoarrow/convert-geoarrow-to-geojson.d.ts +19 -0
  12. package/dist/geoarrow/convert-geoarrow-to-geojson.d.ts.map +1 -0
  13. package/dist/geoarrow/convert-geoarrow-to-geojson.js +138 -0
  14. package/dist/geoarrow/convert-geoarrow-to-geojson.js.map +1 -0
  15. package/dist/geoarrow/get-arrow-bounds.d.ts +11 -0
  16. package/dist/geoarrow/get-arrow-bounds.d.ts.map +1 -0
  17. package/dist/geoarrow/get-arrow-bounds.js +24 -0
  18. package/dist/geoarrow/get-arrow-bounds.js.map +1 -0
  19. package/dist/index.cjs +589 -7
  20. package/dist/index.d.ts +5 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/lib/parse-arrow-sync.d.ts.map +1 -1
  25. package/dist/lib/parse-arrow-sync.js +1 -1
  26. package/dist/lib/parse-arrow-sync.js.map +1 -1
  27. package/dist/schema/arrow-type-utils.d.ts +1 -0
  28. package/dist/schema/arrow-type-utils.d.ts.map +1 -1
  29. package/dist/schema/arrow-type-utils.js.map +1 -1
  30. package/dist/schema/{convert-schema-arrow.d.ts → convert-arrow-schema.d.ts} +7 -1
  31. package/dist/schema/convert-arrow-schema.d.ts.map +1 -0
  32. package/dist/schema/{convert-schema-arrow.js → convert-arrow-schema.js} +78 -4
  33. package/dist/schema/convert-arrow-schema.js.map +1 -0
  34. package/dist/{lib/convert-table.d.ts → tables/convert-arrow-to-table.d.ts} +2 -2
  35. package/dist/tables/convert-arrow-to-table.d.ts.map +1 -0
  36. package/dist/{lib/convert-table.js → tables/convert-arrow-to-table.js} +1 -1
  37. package/dist/tables/convert-arrow-to-table.js.map +1 -0
  38. package/dist/{schema → tables}/convert-table-to-arrow.d.ts.map +1 -1
  39. package/dist/{schema → tables}/convert-table-to-arrow.js.map +1 -1
  40. package/dist/types.d.ts.map +1 -1
  41. package/dist/types.js.map +1 -1
  42. package/dist/workers/arrow-worker.js.map +1 -1
  43. package/package.json +5 -4
  44. package/src/arrow-loader.ts +1 -0
  45. package/src/arrow-writer.ts +1 -0
  46. package/src/geoarrow/convert-geoarrow-to-binary-geometry.ts +262 -0
  47. package/src/geoarrow/convert-geoarrow-to-geojson.ts +192 -0
  48. package/src/geoarrow/get-arrow-bounds.ts +41 -0
  49. package/src/index.ts +28 -4
  50. package/src/lib/parse-arrow-sync.ts +4 -1
  51. package/src/schema/arrow-type-utils.ts +1 -0
  52. package/src/schema/{convert-schema-arrow.ts → convert-arrow-schema.ts} +97 -21
  53. package/src/{lib/convert-table.ts → tables/convert-arrow-to-table.ts} +2 -1
  54. package/src/types.ts +3 -0
  55. package/src/workers/arrow-worker.ts +3 -0
  56. package/dist/lib/convert-table.d.ts.map +0 -1
  57. package/dist/lib/convert-table.js.map +0 -1
  58. package/dist/schema/convert-schema-arrow.d.ts.map +0 -1
  59. package/dist/schema/convert-schema-arrow.js.map +0 -1
  60. /package/dist/{schema → tables}/convert-table-to-arrow.d.ts +0 -0
  61. /package/dist/{schema → tables}/convert-table-to-arrow.js +0 -0
  62. /package/src/{schema → tables}/convert-table-to-arrow.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-loader.d.ts","sourceRoot":"","sources":["../src/arrow-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAMlD,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,WAAW,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;KAChG,CAAC;CACH,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAoBrE,CAAC"}
1
+ {"version":3,"file":"arrow-loader.d.ts","sourceRoot":"","sources":["../src/arrow-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAMlD,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,WAAW,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;KAChG,CAAC;CACH,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAoBrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-loader.js","names":["VERSION","__VERSION__","ArrowLoader","name","id","module","version","category","extensions","mimeTypes","binary","tests","options","arrow","shape"],"sources":["../src/arrow-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ArrowTable} from './lib/arrow-table';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type ArrowLoaderOptions = LoaderOptions & {\n arrow?: {\n shape: 'arrow-table' | 'columnar-table' | 'row-table' | 'array-row-table' | 'object-row-table';\n };\n};\n\n/** ArrowJS table loader */\nexport const ArrowLoader: Loader<ArrowTable, never, ArrowLoaderOptions> = {\n name: 'Apache Arrow',\n id: 'arrow',\n module: 'arrow',\n version: VERSION,\n // worker: true,\n category: 'table',\n extensions: ['arrow', 'feather'],\n mimeTypes: [\n 'application/vnd.apache.arrow.file',\n 'application/vnd.apache.arrow.stream',\n 'application/octet-stream'\n ],\n binary: true,\n tests: ['ARROW'],\n options: {\n arrow: {\n shape: 'columnar-table'\n }\n }\n};\n"],"mappings":"AAOA,MAAMA,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAS3E,OAAO,MAAMC,WAA0D,GAAG;EACxEC,IAAI,EAAE,cAAc;EACpBC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAEN,OAAO;EAEhBO,QAAQ,EAAE,OAAO;EACjBC,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;EAChCC,SAAS,EAAE,CACT,mCAAmC,EACnC,qCAAqC,EACrC,0BAA0B,CAC3B;EACDC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,CAAC,OAAO,CAAC;EAChBC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,KAAK,EAAE;IACT;EACF;AACF,CAAC"}
1
+ {"version":3,"file":"arrow-loader.js","names":["VERSION","__VERSION__","ArrowLoader","name","id","module","version","category","extensions","mimeTypes","binary","tests","options","arrow","shape"],"sources":["../src/arrow-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ArrowTable} from './lib/arrow-table';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type ArrowLoaderOptions = LoaderOptions & {\n arrow?: {\n shape: 'arrow-table' | 'columnar-table' | 'row-table' | 'array-row-table' | 'object-row-table';\n };\n};\n\n/** ArrowJS table loader */\nexport const ArrowLoader: Loader<ArrowTable, never, ArrowLoaderOptions> = {\n name: 'Apache Arrow',\n id: 'arrow',\n module: 'arrow',\n version: VERSION,\n // worker: true,\n category: 'table',\n extensions: ['arrow', 'feather'],\n mimeTypes: [\n 'application/vnd.apache.arrow.file',\n 'application/vnd.apache.arrow.stream',\n 'application/octet-stream'\n ],\n binary: true,\n tests: ['ARROW'],\n options: {\n arrow: {\n shape: 'columnar-table'\n }\n }\n};\n"],"mappings":"AAQA,MAAMA,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAS3E,OAAO,MAAMC,WAA0D,GAAG;EACxEC,IAAI,EAAE,cAAc;EACpBC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAEN,OAAO;EAEhBO,QAAQ,EAAE,OAAO;EACjBC,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;EAChCC,SAAS,EAAE,CACT,mCAAmC,EACnC,qCAAqC,EACrC,0BAA0B,CAC3B;EACDC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,CAAC,OAAO,CAAC;EAChBC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,KAAK,EAAE;IACT;EACF;AACF,CAAC"}
@@ -945,7 +945,7 @@
945
945
  }
946
946
 
947
947
  // src/arrow-loader.ts
948
- var VERSION = true ? "4.0.0" : "latest";
948
+ var VERSION = true ? "4.0.1" : "latest";
949
949
  var ArrowLoader = {
950
950
  name: "Apache Arrow",
951
951
  id: "arrow",
@@ -12334,7 +12334,7 @@ return true;`);
12334
12334
  RecordBatchFileWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
12335
12335
  RecordBatchStreamWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
12336
12336
 
12337
- // src/lib/convert-table.ts
12337
+ // src/tables/convert-arrow-to-table.ts
12338
12338
  function convertApacheArrowToArrowTable(arrowTable) {
12339
12339
  return {
12340
12340
  shape: "arrow-table",
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-writer.d.ts","sourceRoot":"","sources":["../src/arrow-writer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,aAAa,GAAG;IACxC,KAAK,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAgBxE,CAAC"}
1
+ {"version":3,"file":"arrow-writer.d.ts","sourceRoot":"","sources":["../src/arrow-writer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,aAAa,GAAG;IACxC,KAAK,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAgBxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-writer.js","names":["encodeArrowSync","VERSION","__VERSION__","ArrowWriter","name","id","module","version","extensions","mimeTypes","encodeSync","data","options","binary"],"sources":["../src/arrow-writer.ts"],"sourcesContent":["// import type {} from '@loaders.gl/loader-utils';\nimport type {Writer, WriterOptions} from '@loaders.gl/loader-utils';\nimport {ColumnarTable} from './lib/encode-arrow';\nimport {encodeArrowSync} from './lib/encode-arrow';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\ntype ArrowWriterOptions = WriterOptions & {\n arrow?: {};\n};\n\n/** Apache Arrow writer */\nexport const ArrowWriter: Writer<ColumnarTable, never, ArrowWriterOptions> = {\n name: 'Apache Arrow',\n id: 'arrow',\n module: 'arrow',\n version: VERSION,\n extensions: ['arrow', 'feather'],\n mimeTypes: [\n 'application/vnd.apache.arrow.file',\n 'application/vnd.apache.arrow.stream',\n 'application/octet-stream'\n ],\n encodeSync(data, options?) {\n return encodeArrowSync(data);\n },\n binary: true,\n options: {}\n};\n"],"mappings":"SAGQA,eAAe;AAIvB,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAO3E,OAAO,MAAMC,WAA6D,GAAG;EAC3EC,IAAI,EAAE,cAAc;EACpBC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;EAChCC,SAAS,EAAE,CACT,mCAAmC,EACnC,qCAAqC,EACrC,0BAA0B,CAC3B;EACDC,UAAUA,CAACC,IAAI,EAAEC,OAAQ,EAAE;IACzB,OAAOZ,eAAe,CAACW,IAAI,CAAC;EAC9B,CAAC;EACDE,MAAM,EAAE,IAAI;EACZD,OAAO,EAAE,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"arrow-writer.js","names":["encodeArrowSync","VERSION","__VERSION__","ArrowWriter","name","id","module","version","extensions","mimeTypes","encodeSync","data","options","binary"],"sources":["../src/arrow-writer.ts"],"sourcesContent":["// import type {} from '@loaders.gl/loader-utils';\n\nimport type {Writer, WriterOptions} from '@loaders.gl/loader-utils';\nimport {ColumnarTable} from './lib/encode-arrow';\nimport {encodeArrowSync} from './lib/encode-arrow';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\ntype ArrowWriterOptions = WriterOptions & {\n arrow?: {};\n};\n\n/** Apache Arrow writer */\nexport const ArrowWriter: Writer<ColumnarTable, never, ArrowWriterOptions> = {\n name: 'Apache Arrow',\n id: 'arrow',\n module: 'arrow',\n version: VERSION,\n extensions: ['arrow', 'feather'],\n mimeTypes: [\n 'application/vnd.apache.arrow.file',\n 'application/vnd.apache.arrow.stream',\n 'application/octet-stream'\n ],\n encodeSync(data, options?) {\n return encodeArrowSync(data);\n },\n binary: true,\n options: {}\n};\n"],"mappings":"SAIQA,eAAe;AAIvB,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAO3E,OAAO,MAAMC,WAA6D,GAAG;EAC3EC,IAAI,EAAE,cAAc;EACpBC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;EAChCC,SAAS,EAAE,CACT,mCAAmC,EACnC,qCAAqC,EACrC,0BAA0B,CAC3B;EACDC,UAAUA,CAACC,IAAI,EAAEC,OAAQ,EAAE;IACzB,OAAOZ,eAAe,CAACW,IAAI,CAAC;EAC9B,CAAC;EACDE,MAAM,EAAE,IAAI;EACZD,OAAO,EAAE,CAAC;AACZ,CAAC"}