@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 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
- | Page | Covers |
73
- |------|--------|
74
- | [`docs/geometry.md`](./docs/geometry.md) | WKB parser, GeoArrow builder, geometry-column detection |
75
- | [`docs/cog.md`](./docs/cog.md) | Cloud-Optimized GeoTIFF pipeline helpers, band configs, color ramps |
76
- | [`docs/parquet-metadata.md`](./docs/parquet-metadata.md) | `readParquetMetadata` + CRS / bounds / geometry-type extractors |
77
- | [`docs/stac-geoparquet.md`](./docs/stac-geoparquet.md) | stac-geoparquet detection + row STAC Item transforms |
78
- | [`docs/storage.md`](./docs/storage.md) | URL parsing, provider registry, `StorageAdapter`, `UrlAdapter` |
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 only when frontmatter is present) |
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) Full Svelte 5 component library with viewers, stores, and query engine.
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