@sqlrooms/deck 0.29.0-rc.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 (86) hide show
  1. package/README.md +357 -0
  2. package/dist/ColorScaleLegend.d.ts +8 -0
  3. package/dist/ColorScaleLegend.d.ts.map +1 -0
  4. package/dist/ColorScaleLegend.js +11 -0
  5. package/dist/ColorScaleLegend.js.map +1 -0
  6. package/dist/DeckMap.d.ts +4 -0
  7. package/dist/DeckMap.d.ts.map +1 -0
  8. package/dist/DeckMap.js +157 -0
  9. package/dist/DeckMap.js.map +1 -0
  10. package/dist/datasets/normalizeDatasets.d.ts +5 -0
  11. package/dist/datasets/normalizeDatasets.d.ts.map +1 -0
  12. package/dist/datasets/normalizeDatasets.js +57 -0
  13. package/dist/datasets/normalizeDatasets.js.map +1 -0
  14. package/dist/datasets/usePreparedDeckDatasets.d.ts +3 -0
  15. package/dist/datasets/usePreparedDeckDatasets.d.ts.map +1 -0
  16. package/dist/datasets/usePreparedDeckDatasets.js +61 -0
  17. package/dist/datasets/usePreparedDeckDatasets.js.map +1 -0
  18. package/dist/index.d.ts +11 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +9 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/json/compileColorScale.d.ts +35 -0
  23. package/dist/json/compileColorScale.d.ts.map +1 -0
  24. package/dist/json/compileColorScale.js +527 -0
  25. package/dist/json/compileColorScale.js.map +1 -0
  26. package/dist/json/compileGeoArrowAccessor.d.ts +11 -0
  27. package/dist/json/compileGeoArrowAccessor.d.ts.map +1 -0
  28. package/dist/json/compileGeoArrowAccessor.js +74 -0
  29. package/dist/json/compileGeoArrowAccessor.js.map +1 -0
  30. package/dist/json/createDeckJsonConfiguration.d.ts +9 -0
  31. package/dist/json/createDeckJsonConfiguration.d.ts.map +1 -0
  32. package/dist/json/createDeckJsonConfiguration.js +112 -0
  33. package/dist/json/createDeckJsonConfiguration.js.map +1 -0
  34. package/dist/json/defaultClasses.d.ts +24 -0
  35. package/dist/json/defaultClasses.d.ts.map +1 -0
  36. package/dist/json/defaultClasses.js +21 -0
  37. package/dist/json/defaultClasses.js.map +1 -0
  38. package/dist/json/extractColorScaleLegends.d.ts +8 -0
  39. package/dist/json/extractColorScaleLegends.d.ts.map +1 -0
  40. package/dist/json/extractColorScaleLegends.js +48 -0
  41. package/dist/json/extractColorScaleLegends.js.map +1 -0
  42. package/dist/json/layerCompatibility.d.ts +15 -0
  43. package/dist/json/layerCompatibility.d.ts.map +1 -0
  44. package/dist/json/layerCompatibility.js +38 -0
  45. package/dist/json/layerCompatibility.js.map +1 -0
  46. package/dist/json/layerConfig.d.ts +10 -0
  47. package/dist/json/layerConfig.d.ts.map +1 -0
  48. package/dist/json/layerConfig.js +43 -0
  49. package/dist/json/layerConfig.js.map +1 -0
  50. package/dist/json/rewriteGeoArrowAccessors.d.ts +7 -0
  51. package/dist/json/rewriteGeoArrowAccessors.d.ts.map +1 -0
  52. package/dist/json/rewriteGeoArrowAccessors.js +53 -0
  53. package/dist/json/rewriteGeoArrowAccessors.js.map +1 -0
  54. package/dist/prepare/detectGeometryColumn.d.ts +10 -0
  55. package/dist/prepare/detectGeometryColumn.d.ts.map +1 -0
  56. package/dist/prepare/detectGeometryColumn.js +84 -0
  57. package/dist/prepare/detectGeometryColumn.js.map +1 -0
  58. package/dist/prepare/geoarrow.d.ts +18 -0
  59. package/dist/prepare/geoarrow.d.ts.map +1 -0
  60. package/dist/prepare/geoarrow.js +114 -0
  61. package/dist/prepare/geoarrow.js.map +1 -0
  62. package/dist/prepare/geometryDecoder.d.ts +9 -0
  63. package/dist/prepare/geometryDecoder.d.ts.map +1 -0
  64. package/dist/prepare/geometryDecoder.js +2 -0
  65. package/dist/prepare/geometryDecoder.js.map +1 -0
  66. package/dist/prepare/prepareDeckDataset.d.ts +11 -0
  67. package/dist/prepare/prepareDeckDataset.d.ts.map +1 -0
  68. package/dist/prepare/prepareDeckDataset.js +66 -0
  69. package/dist/prepare/prepareDeckDataset.js.map +1 -0
  70. package/dist/prepare/toGeoJsonBinary.d.ts +9 -0
  71. package/dist/prepare/toGeoJsonBinary.d.ts.map +1 -0
  72. package/dist/prepare/toGeoJsonBinary.js +25 -0
  73. package/dist/prepare/toGeoJsonBinary.js.map +1 -0
  74. package/dist/prepare/types.d.ts +25 -0
  75. package/dist/prepare/types.d.ts.map +1 -0
  76. package/dist/prepare/types.js +2 -0
  77. package/dist/prepare/types.js.map +1 -0
  78. package/dist/prepare/wkbDecoder.d.ts +3 -0
  79. package/dist/prepare/wkbDecoder.d.ts.map +1 -0
  80. package/dist/prepare/wkbDecoder.js +106 -0
  81. package/dist/prepare/wkbDecoder.js.map +1 -0
  82. package/dist/types.d.ts +115 -0
  83. package/dist/types.d.ts.map +1 -0
  84. package/dist/types.js +2 -0
  85. package/dist/types.js.map +1 -0
  86. package/package.json +62 -0
@@ -0,0 +1,106 @@
1
+ import { Field, FixedSizeList, Float64, Table, vectorFromArray, } from 'apache-arrow';
2
+ import { WKBLoader, WKTLoader } from '@loaders.gl/wkt';
3
+ import { buildBinaryGeoJsonData } from './toGeoJsonBinary';
4
+ function toArrayBuffer(value) {
5
+ if (ArrayBuffer.isView(value)) {
6
+ const copy = new Uint8Array(value.byteLength);
7
+ copy.set(new Uint8Array(value.buffer, value.byteOffset, value.byteLength), 0);
8
+ return copy.buffer;
9
+ }
10
+ return value;
11
+ }
12
+ function parseGeometryValue(value, encoding) {
13
+ if (value == null) {
14
+ return null;
15
+ }
16
+ try {
17
+ if (encoding === 'wkt' || encoding === 'geoarrow.wkt') {
18
+ return (WKTLoader.parseTextSync?.(String(value), { wkt: { crs: false } }) ?? null);
19
+ }
20
+ return (WKBLoader.parseSync?.(toArrayBuffer(value), {
21
+ wkb: { shape: 'geojson-geometry' },
22
+ }) ?? null);
23
+ }
24
+ catch (error) {
25
+ const message = error instanceof Error ? error.message : String(error);
26
+ if (message.includes('WKB: Unsupported geometry type: 0')) {
27
+ throw new Error('DuckDB GEOMETRY values are not WKB by default. Select ST_AsWKB(geom) AS geom or ST_AsText(geom) AS geom before passing the result to DeckMap.');
28
+ }
29
+ throw error instanceof Error ? error : new Error(message);
30
+ }
31
+ }
32
+ function getSampleGeometry(table, columnName, encoding) {
33
+ const vector = table.getChild(columnName);
34
+ if (!vector) {
35
+ return null;
36
+ }
37
+ for (let rowIndex = 0; rowIndex < table.numRows; rowIndex++) {
38
+ const geometry = parseGeometryValue(vector.get(rowIndex), encoding);
39
+ if (geometry) {
40
+ return geometry;
41
+ }
42
+ }
43
+ return null;
44
+ }
45
+ function createPromotedPointTable(table, columnName, encoding) {
46
+ const vector = table.getChild(columnName);
47
+ if (!vector) {
48
+ throw new Error(`Geometry column "${columnName}" was not found.`);
49
+ }
50
+ const points = [];
51
+ for (let rowIndex = 0; rowIndex < table.numRows; rowIndex++) {
52
+ const geometry = parseGeometryValue(vector.get(rowIndex), encoding);
53
+ if (!geometry) {
54
+ points.push(null);
55
+ continue;
56
+ }
57
+ if (geometry.type !== 'Point') {
58
+ throw new Error(`Only Point WKB/WKT geometries can be promoted for GeoArrow point layers. Received ${geometry.type}.`);
59
+ }
60
+ points.push(geometry.coordinates);
61
+ }
62
+ const coordinateField = new Field('xy', new Float64());
63
+ const geomType = new FixedSizeList(2, coordinateField);
64
+ const promotedGeometry = vectorFromArray(points, geomType);
65
+ const nextColumns = {};
66
+ for (const field of table.schema.fields) {
67
+ nextColumns[field.name] =
68
+ field.name === columnName
69
+ ? promotedGeometry
70
+ : table.getChild(field.name);
71
+ }
72
+ const promotedTable = new Table(nextColumns);
73
+ return {
74
+ table: promotedTable,
75
+ geometryColumnName: columnName,
76
+ geometryColumn: promotedTable.getChild(columnName),
77
+ encoding: 'geoarrow.point',
78
+ source: 'promoted',
79
+ };
80
+ }
81
+ export const wkbGeometryDecoder = {
82
+ supportsGeoArrowPromotion(layerType, encoding, table, columnName) {
83
+ if (!['wkb', 'geoarrow.wkb', 'wkt', 'geoarrow.wkt', 'unknown'].includes(encoding)) {
84
+ return false;
85
+ }
86
+ if (layerType !== 'GeoArrowScatterplotLayer') {
87
+ return false;
88
+ }
89
+ const sampleGeometry = getSampleGeometry(table, columnName, encoding);
90
+ return sampleGeometry == null || sampleGeometry.type === 'Point';
91
+ },
92
+ toGeoArrowLike(table, columnName, encoding) {
93
+ return createPromotedPointTable(table, columnName, encoding);
94
+ },
95
+ toGeoJsonBinary(table, columnName, encoding) {
96
+ return buildBinaryGeoJsonData({
97
+ table,
98
+ geometryColumnName: columnName,
99
+ getGeometryAt: (rowIndex) => {
100
+ const value = table.getChild(columnName)?.get(rowIndex);
101
+ return parseGeometryValue(value, encoding);
102
+ },
103
+ });
104
+ },
105
+ };
106
+ //# sourceMappingURL=wkbDecoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wkbDecoder.js","sourceRoot":"","sources":["../../src/prepare/wkbDecoder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,KAAK,EACL,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,CACN,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,EAChE,CAAC,CACF,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,OAAO,KAAoB,CAAC;AAC9B,CAAC;AAED,SAAS,kBAAkB,CACzB,KAAc,EACd,QAAkC;IAElC,IAAI,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AkB,EAClB,QAAkC;QAElC,OAAO,sBAAsB,CAAC;YAC5B,KAAK;YACL,kBAAkB,EAAE,UAAU;YAC9B,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;gBACxD,OAAO,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC7C,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC","sourcesContent":["import {\n Field,\n FixedSizeList,\n Float64,\n Table,\n vectorFromArray,\n} from 'apache-arrow';\nimport type * as arrow from 'apache-arrow';\nimport {WKBLoader, WKTLoader} from '@loaders.gl/wkt';\nimport type {GeometryDecoder, SupportedGeoArrowLayerType} from './geometryDecoder';\nimport type {PreparedGeoArrowLayerData, ResolvedGeometryEncoding} from './types';\nimport {buildBinaryGeoJsonData} from './toGeoJsonBinary';\n\nfunction toArrayBuffer(value: unknown) {\n if (ArrayBuffer.isView(value)) {\n const copy = new Uint8Array(value.byteLength);\n copy.set(\n new Uint8Array(value.buffer, value.byteOffset, value.byteLength),\n 0,\n );\n return copy.buffer;\n }\n return value as ArrayBuffer;\n}\n\nfunction parseGeometryValue(\n value: unknown,\n encoding: ResolvedGeometryEncoding,\n) {\n if (value == null) {\n return null;\n }\n\n try {\n if (encoding === 'wkt' || encoding === 'geoarrow.wkt') {\n return (\n WKTLoader.parseTextSync?.(String(value), {wkt: {crs: false}}) ?? null\n );\n }\n\n return (\n WKBLoader.parseSync?.(toArrayBuffer(value), {\n wkb: {shape: 'geojson-geometry'},\n }) ?? null\n );\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n if (message.includes('WKB: Unsupported geometry type: 0')) {\n throw new Error(\n 'DuckDB GEOMETRY values are not WKB by default. Select ST_AsWKB(geom) AS geom or ST_AsText(geom) AS geom before passing the result to DeckMap.',\n );\n }\n\n throw error instanceof Error ? error : new Error(message);\n }\n}\n\nfunction getSampleGeometry(\n table: arrow.Table,\n columnName: string,\n encoding: ResolvedGeometryEncoding,\n) {\n const vector = table.getChild(columnName);\n if (!vector) {\n return null;\n }\n\n for (let rowIndex = 0; rowIndex < table.numRows; rowIndex++) {\n const geometry = parseGeometryValue(vector.get(rowIndex), encoding);\n if (geometry) {\n return geometry;\n }\n }\n\n return null;\n}\n\nfunction createPromotedPointTable(\n table: arrow.Table,\n columnName: string,\n encoding: ResolvedGeometryEncoding,\n): PreparedGeoArrowLayerData {\n const vector = table.getChild(columnName);\n if (!vector) {\n throw new Error(`Geometry column \"${columnName}\" was not found.`);\n }\n\n const points = [];\n for (let rowIndex = 0; rowIndex < table.numRows; rowIndex++) {\n const geometry = parseGeometryValue(vector.get(rowIndex), encoding);\n if (!geometry) {\n points.push(null);\n continue;\n }\n\n if (geometry.type !== 'Point') {\n throw new Error(\n `Only Point WKB/WKT geometries can be promoted for GeoArrow point layers. Received ${geometry.type}.`,\n );\n }\n\n points.push(geometry.coordinates);\n }\n\n const coordinateField = new Field('xy', new Float64());\n const geomType = new FixedSizeList(2, coordinateField);\n const promotedGeometry = vectorFromArray(points, geomType);\n\n const nextColumns: Record<string, arrow.Vector> = {};\n for (const field of table.schema.fields) {\n nextColumns[field.name] =\n field.name === columnName\n ? promotedGeometry\n : (table.getChild(field.name) as arrow.Vector);\n }\n\n const promotedTable = new Table(nextColumns);\n\n return {\n table: promotedTable,\n geometryColumnName: columnName,\n geometryColumn: promotedTable.getChild(columnName)!,\n encoding: 'geoarrow.point',\n source: 'promoted',\n };\n}\n\nexport const wkbGeometryDecoder: GeometryDecoder = {\n supportsGeoArrowPromotion(\n layerType: SupportedGeoArrowLayerType,\n encoding: ResolvedGeometryEncoding,\n table: arrow.Table,\n columnName: string,\n ) {\n if (\n !['wkb', 'geoarrow.wkb', 'wkt', 'geoarrow.wkt', 'unknown'].includes(\n encoding,\n )\n ) {\n return false;\n }\n\n if (layerType !== 'GeoArrowScatterplotLayer') {\n return false;\n }\n\n const sampleGeometry = getSampleGeometry(table, columnName, encoding);\n return sampleGeometry == null || sampleGeometry.type === 'Point';\n },\n toGeoArrowLike(\n table: arrow.Table,\n columnName: string,\n encoding: ResolvedGeometryEncoding,\n ) {\n return createPromotedPointTable(table, columnName, encoding);\n },\n toGeoJsonBinary(\n table: arrow.Table,\n columnName: string,\n encoding: ResolvedGeometryEncoding,\n ) {\n return buildBinaryGeoJsonData({\n table,\n geometryColumnName: columnName,\n getGeometryAt: (rowIndex) => {\n const value = table.getChild(columnName)?.get(rowIndex);\n return parseGeometryValue(value, encoding);\n },\n });\n },\n};\n"]}
@@ -0,0 +1,115 @@
1
+ import type { DeckProps } from '@deck.gl/core';
2
+ import type * as arrow from 'apache-arrow';
3
+ import type { ReactNode } from 'react';
4
+ import type { MapProps } from 'react-map-gl/maplibre';
5
+ import type { GeometryEncodingHint, PreparedDeckDataset } from './prepare/types';
6
+ export type DeckQueryResultLike = {
7
+ arrowTable?: arrow.Table | undefined;
8
+ };
9
+ export type DeckDatasetInput = {
10
+ sqlQuery?: string;
11
+ arrowTable?: arrow.Table;
12
+ queryResult?: DeckQueryResultLike;
13
+ geometryColumn?: string;
14
+ geometryEncodingHint?: GeometryEncodingHint;
15
+ };
16
+ export type PreparedDeckDatasetState = {
17
+ status: 'loading';
18
+ } | {
19
+ status: 'ready';
20
+ prepared: PreparedDeckDataset;
21
+ } | {
22
+ status: 'error';
23
+ error: Error;
24
+ };
25
+ export type LayerColorScaleProp = 'getFillColor' | 'getLineColor';
26
+ export type LayerColorLegendConfig = false | {
27
+ title?: string;
28
+ };
29
+ export type ContinuousSequentialScheme = 'Blues' | 'BuGn' | 'BuPu' | 'Cividis' | 'Cool' | 'CubehelixDefault' | 'GnBu' | 'Greens' | 'Greys' | 'Inferno' | 'Magma' | 'OrRd' | 'Oranges' | 'Plasma' | 'PuBu' | 'PuBuGn' | 'PuRd' | 'Purples' | 'RdPu' | 'Reds' | 'Turbo' | 'Viridis' | 'Warm' | 'YlGn' | 'YlGnBu' | 'YlOrBr' | 'YlOrRd' | 'Rainbow' | 'Sinebow';
30
+ export type ContinuousDivergingScheme = 'BrBG' | 'PRGn' | 'PiYG' | 'PuOr' | 'RdBu' | 'RdGy' | 'RdYlBu' | 'RdYlGn' | 'Spectral';
31
+ export type BinnedNumericScheme = 'Blues' | 'BuGn' | 'BuPu' | 'GnBu' | 'Greens' | 'Greys' | 'OrRd' | 'Oranges' | 'PuBu' | 'PuBuGn' | 'PuRd' | 'Purples' | 'RdPu' | 'Reds' | 'YlGn' | 'YlGnBu' | 'YlOrBr' | 'YlOrRd' | 'BrBG' | 'PRGn' | 'PiYG' | 'PuOr' | 'RdBu' | 'RdGy' | 'RdYlBu' | 'RdYlGn' | 'Spectral';
32
+ export type CategoricalScheme = 'Accent' | 'Dark2' | 'Paired' | 'Pastel1' | 'Pastel2' | 'Set1' | 'Set2' | 'Set3' | 'Tableau10' | 'Observable10' | 'Category10';
33
+ export type LayerColorScale = {
34
+ prop?: LayerColorScaleProp;
35
+ field: string;
36
+ type: 'sequential';
37
+ scheme: ContinuousSequentialScheme;
38
+ domain: 'auto' | [number, number];
39
+ clamp?: boolean;
40
+ reverse?: boolean;
41
+ nullColor?: [number, number, number, number?];
42
+ legend?: LayerColorLegendConfig;
43
+ } | {
44
+ prop?: LayerColorScaleProp;
45
+ field: string;
46
+ type: 'diverging';
47
+ scheme: ContinuousDivergingScheme;
48
+ domain: 'auto' | [number, number, number];
49
+ clamp?: boolean;
50
+ reverse?: boolean;
51
+ nullColor?: [number, number, number, number?];
52
+ legend?: LayerColorLegendConfig;
53
+ } | {
54
+ prop?: LayerColorScaleProp;
55
+ field: string;
56
+ type: 'quantize';
57
+ scheme: BinnedNumericScheme;
58
+ domain: 'auto' | [number, number];
59
+ bins?: number;
60
+ clamp?: boolean;
61
+ reverse?: boolean;
62
+ nullColor?: [number, number, number, number?];
63
+ legend?: LayerColorLegendConfig;
64
+ } | {
65
+ prop?: LayerColorScaleProp;
66
+ field: string;
67
+ type: 'quantile';
68
+ scheme: BinnedNumericScheme;
69
+ bins?: number;
70
+ reverse?: boolean;
71
+ nullColor?: [number, number, number, number?];
72
+ legend?: LayerColorLegendConfig;
73
+ } | {
74
+ prop?: LayerColorScaleProp;
75
+ field: string;
76
+ type: 'threshold';
77
+ scheme: BinnedNumericScheme;
78
+ thresholds: number[];
79
+ reverse?: boolean;
80
+ nullColor?: [number, number, number, number?];
81
+ legend?: LayerColorLegendConfig;
82
+ } | {
83
+ prop?: LayerColorScaleProp;
84
+ field: string;
85
+ type: 'categorical';
86
+ scheme: CategoricalScheme;
87
+ reverse?: boolean;
88
+ unknownColor?: [number, number, number, number?];
89
+ nullColor?: [number, number, number, number?];
90
+ legend?: LayerColorLegendConfig;
91
+ };
92
+ export type LayerExtensionConfig = {
93
+ dataset?: string;
94
+ geometryColumn?: string;
95
+ geometryEncodingHint?: GeometryEncodingHint;
96
+ colorScale?: LayerColorScale;
97
+ };
98
+ export type LayerExtensionProps = {
99
+ _sqlrooms?: LayerExtensionConfig;
100
+ };
101
+ export type DeckMapProps = {
102
+ spec: string | Record<string, unknown>;
103
+ datasets?: Record<string, DeckDatasetInput>;
104
+ sqlQuery?: string;
105
+ arrowTable?: arrow.Table;
106
+ queryResult?: DeckQueryResultLike;
107
+ geometryColumn?: string;
108
+ geometryEncodingHint?: GeometryEncodingHint;
109
+ mapStyle?: string;
110
+ deckProps?: Partial<DeckProps>;
111
+ mapProps?: Partial<MapProps>;
112
+ className?: string;
113
+ children?: ReactNode;
114
+ };
115
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC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AAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {DeckProps} from '@deck.gl/core';\nimport type * as arrow from 'apache-arrow';\nimport type {ReactNode} from 'react';\nimport type {MapProps} from 'react-map-gl/maplibre';\nimport type {GeometryEncodingHint, PreparedDeckDataset} from './prepare/types';\n\nexport type DeckQueryResultLike = {\n arrowTable?: arrow.Table | undefined;\n};\n\nexport type DeckDatasetInput = {\n sqlQuery?: string;\n arrowTable?: arrow.Table;\n queryResult?: DeckQueryResultLike;\n geometryColumn?: string;\n geometryEncodingHint?: GeometryEncodingHint;\n};\n\nexport type PreparedDeckDatasetState =\n | {status: 'loading'}\n | {status: 'ready'; prepared: PreparedDeckDataset}\n | {status: 'error'; error: Error};\n\nexport type LayerColorScaleProp = 'getFillColor' | 'getLineColor';\nexport type LayerColorLegendConfig =\n | false\n | {\n title?: string;\n };\n\nexport type ContinuousSequentialScheme =\n | 'Blues'\n | 'BuGn'\n | 'BuPu'\n | 'Cividis'\n | 'Cool'\n | 'CubehelixDefault'\n | 'GnBu'\n | 'Greens'\n | 'Greys'\n | 'Inferno'\n | 'Magma'\n | 'OrRd'\n | 'Oranges'\n | 'Plasma'\n | 'PuBu'\n | 'PuBuGn'\n | 'PuRd'\n | 'Purples'\n | 'RdPu'\n | 'Reds'\n | 'Turbo'\n | 'Viridis'\n | 'Warm'\n | 'YlGn'\n | 'YlGnBu'\n | 'YlOrBr'\n | 'YlOrRd'\n | 'Rainbow'\n | 'Sinebow';\n\nexport type ContinuousDivergingScheme =\n | 'BrBG'\n | 'PRGn'\n | 'PiYG'\n | 'PuOr'\n | 'RdBu'\n | 'RdGy'\n | 'RdYlBu'\n | 'RdYlGn'\n | 'Spectral';\n\nexport type BinnedNumericScheme =\n | 'Blues'\n | 'BuGn'\n | 'BuPu'\n | 'GnBu'\n | 'Greens'\n | 'Greys'\n | 'OrRd'\n | 'Oranges'\n | 'PuBu'\n | 'PuBuGn'\n | 'PuRd'\n | 'Purples'\n | 'RdPu'\n | 'Reds'\n | 'YlGn'\n | 'YlGnBu'\n | 'YlOrBr'\n | 'YlOrRd'\n | 'BrBG'\n | 'PRGn'\n | 'PiYG'\n | 'PuOr'\n | 'RdBu'\n | 'RdGy'\n | 'RdYlBu'\n | 'RdYlGn'\n | 'Spectral';\n\nexport type CategoricalScheme =\n | 'Accent'\n | 'Dark2'\n | 'Paired'\n | 'Pastel1'\n | 'Pastel2'\n | 'Set1'\n | 'Set2'\n | 'Set3'\n | 'Tableau10'\n | 'Observable10'\n | 'Category10';\n\nexport type LayerColorScale =\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'sequential';\n scheme: ContinuousSequentialScheme;\n domain: 'auto' | [number, number];\n clamp?: boolean;\n reverse?: boolean;\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n }\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'diverging';\n scheme: ContinuousDivergingScheme;\n domain: 'auto' | [number, number, number];\n clamp?: boolean;\n reverse?: boolean;\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n }\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'quantize';\n scheme: BinnedNumericScheme;\n domain: 'auto' | [number, number];\n bins?: number;\n clamp?: boolean;\n reverse?: boolean;\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n }\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'quantile';\n scheme: BinnedNumericScheme;\n bins?: number;\n reverse?: boolean;\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n }\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'threshold';\n scheme: BinnedNumericScheme;\n thresholds: number[];\n reverse?: boolean;\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n }\n | {\n prop?: LayerColorScaleProp;\n field: string;\n type: 'categorical';\n scheme: CategoricalScheme;\n reverse?: boolean;\n unknownColor?: [number, number, number, number?];\n nullColor?: [number, number, number, number?];\n legend?: LayerColorLegendConfig;\n };\n\nexport type LayerExtensionConfig = {\n dataset?: string;\n geometryColumn?: string;\n geometryEncodingHint?: GeometryEncodingHint;\n colorScale?: LayerColorScale;\n};\n\nexport type LayerExtensionProps = {\n _sqlrooms?: LayerExtensionConfig;\n};\n\nexport type DeckMapProps = {\n spec: string | Record<string, unknown>;\n datasets?: Record<string, DeckDatasetInput>;\n sqlQuery?: string;\n arrowTable?: arrow.Table;\n queryResult?: DeckQueryResultLike;\n geometryColumn?: string;\n geometryEncodingHint?: GeometryEncodingHint;\n mapStyle?: string;\n deckProps?: Partial<DeckProps>;\n mapProps?: Partial<MapProps>;\n className?: string;\n children?: ReactNode;\n};\n"]}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@sqlrooms/deck",
3
+ "version": "0.29.0-rc.2",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "module": "dist/index.js",
7
+ "type": "module",
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
11
+ "author": "SQLRooms Contributors",
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/sqlrooms/sqlrooms.git"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "dependencies": {
24
+ "@deck.gl/core": "^9.2.11",
25
+ "@deck.gl/json": "^9.2.11",
26
+ "@deck.gl/layers": "^9.2.11",
27
+ "@deck.gl/react": "^9.2.11",
28
+ "@geoarrow/deck.gl-layers": "0.3.2",
29
+ "@loaders.gl/core": "^4.4.1",
30
+ "@loaders.gl/geoarrow": "^4.4.1",
31
+ "@loaders.gl/gis": "^4.4.1",
32
+ "@loaders.gl/wkt": "^4.4.1",
33
+ "@sqlrooms/color-scales": "workspace:*",
34
+ "@sqlrooms/duckdb": "workspace:*",
35
+ "@sqlrooms/ui": "workspace:*",
36
+ "maplibre-gl": "^5.12.0",
37
+ "react-map-gl": "^8.1.0",
38
+ "zod": "^4.1.8",
39
+ "zustand": "^5.0.8"
40
+ },
41
+ "devDependencies": {
42
+ "@jest/globals": "^30.3.0",
43
+ "@types/geojson": "^7946.0.16",
44
+ "@types/jest": "^30.0.0",
45
+ "jest": "^30.1.3",
46
+ "ts-jest": "^29.4.4"
47
+ },
48
+ "peerDependencies": {
49
+ "apache-arrow": "17.0.0",
50
+ "react": ">=18",
51
+ "react-dom": ">=18"
52
+ },
53
+ "scripts": {
54
+ "dev": "tsc -w",
55
+ "build": "tsc",
56
+ "lint": "eslint .",
57
+ "typecheck": "tsc --noEmit",
58
+ "typedoc": "typedoc",
59
+ "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest",
60
+ "test:watch": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --watch"
61
+ }
62
+ }