@walkthru-earth/objex-utils 1.3.0 → 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 +36 -19
- package/dist/index.cjs +3020 -524
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1462 -82
- package/dist/index.d.ts +1462 -82
- package/dist/index.js +2938 -525
- package/dist/index.js.map +1 -1
- package/docs/README.md +17 -6
- package/docs/app-config.md +237 -0
- package/docs/channel-composite.md +127 -0
- package/docs/cog-asset.md +164 -0
- package/docs/cog.md +2 -2
- package/docs/errors.md +1 -1
- package/docs/file-sort.md +1 -1
- package/docs/formatting.md +4 -4
- package/docs/geometry.md +3 -3
- package/docs/local-storage.md +1 -1
- package/docs/lru.md +76 -0
- package/docs/map-pixel-inspect.md +132 -0
- package/docs/markdown-sql.md +1 -1
- package/docs/parquet-metadata.md +1 -1
- package/docs/stac-facets.md +198 -0
- package/docs/stac-hydrate.md +181 -0
- package/docs/stac-pushdown.md +145 -0
- package/docs/stac-source.md +224 -0
- package/docs/stac-storage-extension.md +146 -0
- package/docs/stac.md +425 -0
- package/docs/storage.md +2 -2
- package/package.json +10 -3
package/LICENSE
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
Copyright (c) 2026 walkthru.earth <hi@walkthru.earth>
|
|
2
|
+
|
|
3
|
+
This work is licensed under the Creative Commons Attribution 4.0 International License.
|
|
4
|
+
To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
|
|
5
|
+
|
|
1
6
|
Attribution 4.0 International
|
|
2
7
|
|
|
3
8
|
=======================================================================
|
package/README.md
CHANGED
|
@@ -65,25 +65,42 @@ import {
|
|
|
65
65
|
} from '@walkthru-earth/objex-utils';
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
## Usage
|
|
69
|
+
|
|
70
|
+
The package ships ESM and CommonJS builds with full TypeScript types, so it behaves the same across toolchains. Every export is a plain function, class, or constant with no framework coupling, there is no provider, context, or adapter to wire up.
|
|
71
|
+
|
|
72
|
+
ESM (browser bundlers, modern Node, TypeScript):
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { parseStorageUrl, formatFileSize } from '@walkthru-earth/objex-utils';
|
|
76
|
+
|
|
77
|
+
const parsed = parseStorageUrl('s3://my-bucket/data/');
|
|
78
|
+
const label = formatFileSize(1048576); // human-readable size
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
CommonJS (Node `require`):
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
const { parseStorageUrl, formatFileSize } = require('@walkthru-earth/objex-utils');
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Framework notes:
|
|
88
|
+
|
|
89
|
+
- React, Vue, Svelte, Solid, or vanilla JS, import the functions and call them directly. The package holds no framework state and renders no UI, so no wrapper is needed.
|
|
90
|
+
- Node 18+, the data utilities (`readParquetMetadata`, `parseStorageUrl`, WKB and GeoArrow builders) run server-side on the global `fetch`. Browser-only helpers such as `copyToClipboard` and `loadFromStorage` detect the missing API and no-op or return defaults rather than throwing.
|
|
91
|
+
- Install only the optional peers for the functions you actually call (see the table below).
|
|
92
|
+
|
|
68
93
|
## Documentation
|
|
69
94
|
|
|
70
|
-
Full per-module developer reference lives in [`docs/`](./docs/README.md). Each page lists the exact TypeScript signature, parameter semantics, return shape, peer-dependency requirements, and non-obvious behavior.
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
| [`docs/geometry.md`](./docs/
|
|
75
|
-
| [`docs/
|
|
76
|
-
| [`
|
|
77
|
-
| [`docs/
|
|
78
|
-
| [`docs/
|
|
79
|
-
| [`docs/query-engine.md`](./docs/query-engine.md) | `QueryEngine` interface + handle / result types |
|
|
80
|
-
| [`docs/file-types.md`](./docs/file-types.md) | File-type registry: `getFileTypeInfo`, `getViewerKind`, `getDuckDbReadFn`, … |
|
|
81
|
-
| [`docs/formatting.md`](./docs/formatting.md) | Display formatters, column-type classification, hex dump, CSV/JSON export |
|
|
82
|
-
| [`docs/file-sort.md`](./docs/file-sort.md) | `sortFileEntries`, `toggleSortField` |
|
|
83
|
-
| [`docs/markdown-sql.md`](./docs/markdown-sql.md) | Markdown + SQL block parsing (Evidence-compatible) |
|
|
84
|
-
| [`docs/local-storage.md`](./docs/local-storage.md) | SSR-safe `loadFromStorage` / `persistToStorage` |
|
|
85
|
-
| [`docs/errors.md`](./docs/errors.md) | `handleLoadError` |
|
|
86
|
-
| [`docs/types-constants.md`](./docs/types-constants.md) | `Connection`, `Tab`, `FileEntry`, `WriteResult`, `Theme`, shared constants |
|
|
95
|
+
Full per-module developer reference lives in [`docs/`](./docs/README.md), the authoritative index. Each page lists the exact TypeScript signature, parameter semantics, return shape, peer-dependency requirements, and non-obvious behavior. The areas below link a few entry points, see the [docs index](./docs/README.md) for all 24 modules.
|
|
96
|
+
|
|
97
|
+
| Area | Pages |
|
|
98
|
+
|------|-------|
|
|
99
|
+
| Geometry and raster | [`geometry`](./docs/geometry.md), [`parquet-metadata`](./docs/parquet-metadata.md), [`cog`](./docs/cog.md) (pure helpers only, the render pipeline stays in `@walkthru-earth/objex`), [`cog-asset`](./docs/cog-asset.md), [`channel-composite`](./docs/channel-composite.md) |
|
|
100
|
+
| STAC | [`stac`](./docs/stac.md), [`stac-geoparquet`](./docs/stac-geoparquet.md), [`stac-facets`](./docs/stac-facets.md), [`stac-pushdown`](./docs/stac-pushdown.md), [`stac-source`](./docs/stac-source.md), [`stac-hydrate`](./docs/stac-hydrate.md), [`stac-storage-extension`](./docs/stac-storage-extension.md) |
|
|
101
|
+
| Storage and URLs | [`storage`](./docs/storage.md) |
|
|
102
|
+
| Files and formatting | [`file-types`](./docs/file-types.md), [`formatting`](./docs/formatting.md) (formatters, column types, hex dump, CSV/JSON), [`file-sort`](./docs/file-sort.md) |
|
|
103
|
+
| App utilities | [`app-config`](./docs/app-config.md), [`types-constants`](./docs/types-constants.md), [`local-storage`](./docs/local-storage.md), [`markdown-sql`](./docs/markdown-sql.md), [`lru`](./docs/lru.md), [`map-pixel-inspect`](./docs/map-pixel-inspect.md), [`errors`](./docs/errors.md), [`query-engine`](./docs/query-engine.md) |
|
|
87
104
|
|
|
88
105
|
## Optional peer dependencies
|
|
89
106
|
|
|
@@ -94,13 +111,13 @@ Heavy dependencies are **optional** peers. Install only what you use.
|
|
|
94
111
|
| `apache-arrow >=14` | `buildGeoArrowTables` |
|
|
95
112
|
| `hyparquet >=1.25` | `readParquetMetadata` and friends |
|
|
96
113
|
| `hyparquet-compressors >=1.1` | SNAPPY / ZSTD / GZIP / LZ4 / BROTLI support in `readParquetMetadata` |
|
|
97
|
-
| `yaml >=2` | `parseMarkdownDocument` (lazy-loaded
|
|
114
|
+
| `yaml >=2` | `parseMarkdownDocument` (lazy-loaded, only when frontmatter is present) |
|
|
98
115
|
|
|
99
116
|
As of v1.2 the `yaml` dependency is imported dynamically inside `parseMarkdownDocument`. Consumers who never call that function do not need `yaml` at all. Before v1.2 the bundle failed to load without `yaml` even for unrelated imports.
|
|
100
117
|
|
|
101
118
|
## Related
|
|
102
119
|
|
|
103
|
-
- [`@walkthru-earth/objex`](https://www.npmjs.com/package/@walkthru-earth/objex)
|
|
120
|
+
- [`@walkthru-earth/objex`](https://www.npmjs.com/package/@walkthru-earth/objex), the full Svelte 5 component library with viewers, stores, and query engine.
|
|
104
121
|
|
|
105
122
|
## License
|
|
106
123
|
|