@walkthru-earth/objex 1.3.1 → 1.4.0
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.
- package/LICENSE +5 -0
- package/README.md +20 -12
- package/dist/components/browser/FileTreeSidebar.svelte +32 -17
- package/dist/components/layout/AboutSheet.svelte +5 -2
- package/dist/components/layout/ConnectionDialog.svelte +1 -1
- package/dist/components/layout/SettingsSheet.svelte +237 -0
- package/dist/components/layout/SettingsSheet.svelte.d.ts +6 -0
- package/dist/components/layout/Sidebar.svelte +73 -6
- package/dist/components/layout/Sidebar.svelte.d.ts +4 -1
- package/dist/components/layout/StatusBar.svelte +1 -1
- package/dist/components/layout/TabBar.svelte +2 -2
- package/dist/components/ui/context-menu/context-menu-radio-group.svelte.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +1 -1
- package/dist/components/ui/input/input.svelte.d.ts +1 -1
- package/dist/components/ui/resizable/index.d.ts +1 -1
- package/dist/components/ui/resizable/index.js +2 -2
- package/dist/components/ui/slider/index.d.ts +3 -0
- package/dist/components/ui/slider/index.js +5 -0
- package/dist/components/ui/slider/range-slider.svelte +94 -0
- package/dist/components/ui/slider/range-slider.svelte.d.ts +21 -0
- package/dist/components/ui/slider/slider.svelte +83 -0
- package/dist/components/ui/slider/slider.svelte.d.ts +7 -0
- package/dist/components/viewers/ArchiveViewer.svelte +2 -2
- package/dist/components/viewers/CodeViewer.svelte +31 -22
- package/dist/components/viewers/CogControls.svelte +338 -184
- package/dist/components/viewers/CogControls.svelte.d.ts +33 -10
- package/dist/components/viewers/CogViewer.svelte +263 -112
- package/dist/components/viewers/CopcViewer.svelte +1 -1
- package/dist/components/viewers/FlatGeobufViewer.svelte +1 -1
- package/dist/components/viewers/GeoParquetMapViewer.svelte +6 -6
- package/dist/components/viewers/GeoParquetMapViewer.svelte.d.ts +1 -1
- package/dist/components/viewers/ImageViewer.svelte +2 -2
- package/dist/components/viewers/MarkdownViewer.svelte +12 -9
- package/dist/components/viewers/MediaViewer.svelte +2 -2
- package/dist/components/viewers/ModelViewer.svelte +1 -1
- package/dist/components/viewers/MultiCogViewer.svelte +467 -102
- package/dist/components/viewers/MultiCogViewer.svelte.d.ts +1 -1
- package/dist/components/viewers/NotebookViewer.svelte +6 -3
- package/dist/components/viewers/PdfViewer.svelte +2 -2
- package/dist/components/viewers/PmtilesViewer.svelte +3 -6
- package/dist/components/viewers/RawViewer.svelte +6 -3
- package/dist/components/viewers/StacMapViewer.svelte +1 -1
- package/dist/components/viewers/StacMosaicViewer.svelte +1760 -408
- package/dist/components/viewers/StacMosaicViewer.svelte.d.ts +1 -1
- package/dist/components/viewers/StacTabViewer.svelte +24 -13
- package/dist/components/viewers/StacTabViewer.svelte.d.ts +1 -1
- package/dist/components/viewers/TableGrid.svelte +4 -4
- package/dist/components/viewers/TableStatusBar.svelte +1 -1
- package/dist/components/viewers/TableToolbar.svelte +1 -1
- package/dist/components/viewers/TableViewer.svelte +25 -17
- package/dist/components/viewers/TableViewer.svelte.d.ts +1 -0
- package/dist/components/viewers/ViewerRouter.svelte +16 -8
- package/dist/components/viewers/ZarrMapViewer.svelte +11 -9
- package/dist/components/viewers/ZarrViewer.svelte +4 -4
- package/dist/components/viewers/cog/ChannelPicker.svelte +83 -0
- package/dist/components/viewers/cog/ChannelPicker.svelte.d.ts +13 -0
- package/dist/components/viewers/cog/PixelInspectorPanel.svelte +87 -0
- package/dist/components/viewers/cog/PixelInspectorPanel.svelte.d.ts +17 -0
- package/dist/components/viewers/cog/buildRgbLayer.d.ts +78 -0
- package/dist/components/viewers/cog/buildRgbLayer.js +176 -0
- package/dist/components/viewers/map/AttributeTable.svelte +1 -1
- package/dist/components/viewers/map/MapContainer.svelte +37 -11
- package/dist/components/viewers/pmtiles/PmtilesArchiveView.svelte +1 -1
- package/dist/components/viewers/pmtiles/PmtilesTileInspector.svelte +1 -1
- package/dist/components/viewers/stac/StacDatetimeBar.svelte +175 -0
- package/dist/components/viewers/stac/StacDatetimeBar.svelte.d.ts +10 -0
- package/dist/components/viewers/stac/StacFilterPanel.svelte +243 -0
- package/dist/components/viewers/stac/StacFilterPanel.svelte.d.ts +14 -0
- package/dist/components/viewers/stac/StacItemInspector.svelte +223 -0
- package/dist/components/viewers/stac/StacItemInspector.svelte.d.ts +10 -0
- package/dist/components/viewers/stac/StacItemStrip.svelte +228 -0
- package/dist/components/viewers/stac/StacItemStrip.svelte.d.ts +12 -0
- package/dist/file-icons/index.d.ts +1 -1
- package/dist/file-icons/index.js +1 -1
- package/dist/i18n/ar.js +110 -2
- package/dist/i18n/en.js +110 -2
- package/dist/index.d.ts +2 -28
- package/dist/index.js +7 -23
- package/dist/query/engine.d.ts +10 -0
- package/dist/query/source.js +1 -1
- package/dist/query/stac-source-factory.d.ts +65 -0
- package/dist/query/stac-source-factory.js +77 -0
- package/dist/query/stac-source-parquet.d.ts +135 -0
- package/dist/query/stac-source-parquet.js +465 -0
- package/dist/query/wasm.d.ts +8 -0
- package/dist/query/wasm.js +304 -2
- package/dist/storage/presign.js +1 -1
- package/dist/storage/providers.js +5 -5
- package/dist/stores/config.svelte.d.ts +15 -0
- package/dist/stores/config.svelte.js +46 -0
- package/dist/stores/connections.svelte.d.ts +2 -2
- package/dist/stores/connections.svelte.js +1 -2
- package/dist/stores/files.svelte.d.ts +1 -1
- package/dist/stores/files.svelte.js +1 -1
- package/dist/stores/query-history.svelte.js +1 -1
- package/dist/stores/settings.svelte.d.ts +16 -1
- package/dist/stores/settings.svelte.js +104 -48
- package/dist/stores/tabs.svelte.d.ts +3 -0
- package/dist/stores/tabs.svelte.js +17 -0
- package/dist/utils/cog-histogram.d.ts +121 -0
- package/dist/utils/cog-histogram.js +424 -0
- package/dist/utils/cog.d.ts +177 -20
- package/dist/utils/cog.js +361 -76
- package/dist/utils/colormap-sprite.d.ts +0 -9
- package/dist/utils/colormap-sprite.js +0 -21
- package/dist/utils/deck.d.ts +16 -12
- package/dist/utils/deck.js +10 -4
- package/dist/utils/pmtiles-tile.js +2 -2
- package/dist/utils/{url.d.ts → signed-url.d.ts} +15 -1
- package/dist/utils/{url.js → signed-url.js} +32 -10
- package/dist/utils/url-state.d.ts +36 -0
- package/dist/utils/url-state.js +72 -2
- package/dist/utils/zarr-tab.d.ts +1 -2
- package/dist/utils/zarr-tab.js +1 -2
- package/dist/utils/zarr.d.ts +0 -17
- package/dist/utils/zarr.js +1 -45
- package/package.json +55 -84
- package/dist/components/browser/Breadcrumb.svelte +0 -50
- package/dist/components/browser/Breadcrumb.svelte.d.ts +0 -7
- package/dist/components/browser/CreateFolderDialog.svelte +0 -98
- package/dist/components/browser/CreateFolderDialog.svelte.d.ts +0 -6
- package/dist/components/browser/DeleteConfirmDialog.svelte +0 -90
- package/dist/components/browser/DeleteConfirmDialog.svelte.d.ts +0 -8
- package/dist/components/browser/DropZone.svelte +0 -83
- package/dist/components/browser/DropZone.svelte.d.ts +0 -7
- package/dist/components/browser/FileBrowser.svelte +0 -252
- package/dist/components/browser/FileBrowser.svelte.d.ts +0 -3
- package/dist/components/browser/FileRow.svelte +0 -117
- package/dist/components/browser/FileRow.svelte.d.ts +0 -9
- package/dist/components/browser/RenameDialog.svelte +0 -101
- package/dist/components/browser/RenameDialog.svelte.d.ts +0 -8
- package/dist/components/browser/SearchBar.svelte +0 -40
- package/dist/components/browser/SearchBar.svelte.d.ts +0 -6
- package/dist/components/browser/UploadButton.svelte +0 -65
- package/dist/components/browser/UploadButton.svelte.d.ts +0 -3
- package/dist/query/stac-geoparquet.d.ts +0 -31
- package/dist/query/stac-geoparquet.js +0 -136
- package/dist/utils/clipboard.d.ts +0 -13
- package/dist/utils/clipboard.js +0 -38
- package/dist/utils/cloud-url.d.ts +0 -27
- package/dist/utils/cloud-url.js +0 -61
- package/dist/utils/cog-pure.d.ts +0 -25
- package/dist/utils/cog-pure.js +0 -35
- package/dist/utils/column-types.d.ts +0 -5
- package/dist/utils/column-types.js +0 -137
- package/dist/utils/connection-identity.d.ts +0 -51
- package/dist/utils/connection-identity.js +0 -97
- package/dist/utils/error.d.ts +0 -8
- package/dist/utils/error.js +0 -12
- package/dist/utils/evidence-context.d.ts +0 -22
- package/dist/utils/evidence-context.js +0 -56
- package/dist/utils/export.d.ts +0 -22
- package/dist/utils/export.js +0 -76
- package/dist/utils/file-sort.d.ts +0 -20
- package/dist/utils/file-sort.js +0 -41
- package/dist/utils/format.d.ts +0 -24
- package/dist/utils/format.js +0 -78
- package/dist/utils/geoarrow.d.ts +0 -32
- package/dist/utils/geoarrow.js +0 -672
- package/dist/utils/geometry-type.d.ts +0 -52
- package/dist/utils/geometry-type.js +0 -76
- package/dist/utils/hex.d.ts +0 -10
- package/dist/utils/hex.js +0 -27
- package/dist/utils/host-detection.d.ts +0 -23
- package/dist/utils/host-detection.js +0 -95
- package/dist/utils/local-storage.d.ts +0 -16
- package/dist/utils/local-storage.js +0 -37
- package/dist/utils/markdown-sql.d.ts +0 -30
- package/dist/utils/markdown-sql.js +0 -72
- package/dist/utils/notebook.d.ts +0 -59
- package/dist/utils/notebook.js +0 -211
- package/dist/utils/parquet-metadata.d.ts +0 -64
- package/dist/utils/parquet-metadata.js +0 -262
- package/dist/utils/stac-geoparquet.d.ts +0 -90
- package/dist/utils/stac-geoparquet.js +0 -223
- package/dist/utils/stac-hydrate.d.ts +0 -38
- package/dist/utils/stac-hydrate.js +0 -243
- package/dist/utils/stac.d.ts +0 -136
- package/dist/utils/stac.js +0 -176
- package/dist/utils/storage-url.d.ts +0 -90
- package/dist/utils/storage-url.js +0 -568
- package/dist/utils/wkb.d.ts +0 -43
- package/dist/utils/wkb.js +0 -359
package/dist/utils/format.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats a byte count into a human-readable string.
|
|
3
|
-
*/
|
|
4
|
-
export function formatFileSize(bytes) {
|
|
5
|
-
if (bytes < 0)
|
|
6
|
-
return '0 B';
|
|
7
|
-
if (bytes === 0)
|
|
8
|
-
return '0 B';
|
|
9
|
-
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
10
|
-
const base = 1024;
|
|
11
|
-
const exponent = Math.min(Math.floor(Math.log(bytes) / Math.log(base)), units.length - 1);
|
|
12
|
-
const value = bytes / base ** exponent;
|
|
13
|
-
// Use integer display for bytes, one decimal for everything else
|
|
14
|
-
if (exponent === 0)
|
|
15
|
-
return `${bytes} B`;
|
|
16
|
-
return `${value.toFixed(1)} ${units[exponent]}`;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Formats a unix timestamp (milliseconds) to a human-readable date string.
|
|
20
|
-
* Shows relative time for recent dates, absolute for older ones.
|
|
21
|
-
*/
|
|
22
|
-
export function formatDate(timestamp) {
|
|
23
|
-
if (!timestamp || timestamp <= 0 || !Number.isFinite(timestamp))
|
|
24
|
-
return '--';
|
|
25
|
-
const date = new Date(timestamp);
|
|
26
|
-
const now = Date.now();
|
|
27
|
-
const diffMs = now - timestamp;
|
|
28
|
-
const diffSeconds = Math.floor(diffMs / 1000);
|
|
29
|
-
const diffMinutes = Math.floor(diffSeconds / 60);
|
|
30
|
-
const diffHours = Math.floor(diffMinutes / 60);
|
|
31
|
-
const diffDays = Math.floor(diffHours / 24);
|
|
32
|
-
if (diffSeconds < 60)
|
|
33
|
-
return 'Just now';
|
|
34
|
-
if (diffMinutes < 60)
|
|
35
|
-
return `${diffMinutes}m ago`;
|
|
36
|
-
if (diffHours < 24)
|
|
37
|
-
return `${diffHours}h ago`;
|
|
38
|
-
if (diffDays < 7)
|
|
39
|
-
return `${diffDays}d ago`;
|
|
40
|
-
// For older dates, show absolute date
|
|
41
|
-
return date.toLocaleDateString(undefined, {
|
|
42
|
-
year: 'numeric',
|
|
43
|
-
month: 'short',
|
|
44
|
-
day: 'numeric'
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Extracts the file extension from a filename, including the leading dot.
|
|
49
|
-
* Returns an empty string if no extension is found.
|
|
50
|
-
*/
|
|
51
|
-
export function getFileExtension(filename) {
|
|
52
|
-
const lastDot = filename.lastIndexOf('.');
|
|
53
|
-
if (lastDot <= 0)
|
|
54
|
-
return '';
|
|
55
|
-
return filename.slice(lastDot).toLowerCase();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* JSON replacer that converts BigInt values to strings.
|
|
59
|
-
* Use with `JSON.stringify(value, jsonReplacerBigInt)`.
|
|
60
|
-
*/
|
|
61
|
-
export function jsonReplacerBigInt(_key, value) {
|
|
62
|
-
return typeof value === 'bigint' ? value.toString() : value;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Format a value for display in tables, attribute panels, and exports.
|
|
66
|
-
* Handles null, undefined, Date, BigInt, and objects uniformly.
|
|
67
|
-
*/
|
|
68
|
-
export function formatValue(value) {
|
|
69
|
-
if (value === null || value === undefined)
|
|
70
|
-
return 'NULL';
|
|
71
|
-
if (value instanceof Date)
|
|
72
|
-
return value.toISOString();
|
|
73
|
-
if (typeof value === 'bigint')
|
|
74
|
-
return value.toString();
|
|
75
|
-
if (typeof value === 'object')
|
|
76
|
-
return JSON.stringify(value, jsonReplacerBigInt);
|
|
77
|
-
return String(value);
|
|
78
|
-
}
|
package/dist/utils/geoarrow.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Direct WKB → GeoArrow bridge (zero-copy).
|
|
3
|
-
*
|
|
4
|
-
* Reads raw WKB binary directly into pre-allocated Arrow typed arrays
|
|
5
|
-
* without any intermediate JS object allocation. No parseWKB(), no GeoJSON.
|
|
6
|
-
*
|
|
7
|
-
* Data flow: WKB Uint8Array[] → DataView binary reads → Float64Array/Int32Array
|
|
8
|
-
* → arrow.makeData() → arrow.Table with ARROW:extension:name metadata
|
|
9
|
-
*/
|
|
10
|
-
import { Table } from 'apache-arrow';
|
|
11
|
-
export type GeoArrowGeomType = 'point' | 'linestring' | 'polygon' | 'multipoint' | 'multilinestring' | 'multipolygon';
|
|
12
|
-
export interface GeoArrowResult {
|
|
13
|
-
table: Table;
|
|
14
|
-
geometryType: GeoArrowGeomType;
|
|
15
|
-
bounds: [number, number, number, number];
|
|
16
|
-
/** Maps local table row index → original WKB array index (for selection lookup). */
|
|
17
|
-
sourceIndices: number[];
|
|
18
|
-
}
|
|
19
|
-
/** Map DuckDB ST_GeometryType output to our normalized type. */
|
|
20
|
-
export declare function normalizeGeomType(raw: string): GeoArrowGeomType;
|
|
21
|
-
/**
|
|
22
|
-
* Build GeoArrow tables from raw WKB arrays, automatically splitting by geometry type.
|
|
23
|
-
* Returns one GeoArrowResult per non-empty type group, with shared merged bounds.
|
|
24
|
-
*
|
|
25
|
-
* @param wkbArrays Raw WKB binary arrays from DuckDB
|
|
26
|
-
* @param attributes Attribute columns (non-geometry)
|
|
27
|
-
* @param knownGeomType If provided (e.g. from GeoParquet metadata), skip classification
|
|
28
|
-
*/
|
|
29
|
-
export declare function buildGeoArrowTables(wkbArrays: Uint8Array[], attributes: Map<string, {
|
|
30
|
-
values: any[];
|
|
31
|
-
type: string;
|
|
32
|
-
}>, knownGeomType?: GeoArrowGeomType): GeoArrowResult[];
|