@nika-js/onlymap 0.5.8 → 0.5.10
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/README.md +2 -0
- package/dist/{LercDecode.es-w8RZGC6C.js → LercDecode.es-Dr-FEhEw.js} +1 -1
- package/dist/attribute-resolution.d.ts +27 -0
- package/dist/{basemap-CRHvqdyB.js → basemap-CffVZA3o.js} +1 -1
- package/dist/{geoparquet-DP-cHcRU.js → geoparquet-BnZGJivS.js} +1 -1
- package/dist/{index-C4E9YVtT.js → index-B1NnawjM.js} +11754 -11336
- package/dist/{index-C_AAx0xW.js → index-BD1Lavii.js} +2 -2
- package/dist/{index-DxPAt_-m.js → index-BxgnlQlm.js} +1 -1
- package/dist/{index-BihwUsxS.js → index-DSpVgsJd.js} +1 -1
- package/dist/{index-C71sC-h9.js → index-DZ4aCYFL.js} +1 -1
- package/dist/{lerc-BkDclmAx.js → lerc-fOXa6Yt9.js} +2 -2
- package/dist/onlymap.standalone.js +19885 -19467
- package/dist/onlymapjs.js +1 -1
- package/dist/programmatic.d.ts +4 -0
- package/dist/{raster-BXRFjFgb.js → raster-C_Uo6zJh.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/llms.txt +1 -0
- package/onlymapjs.html-data.json +8 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +9 -2
package/README.md
CHANGED
|
@@ -147,6 +147,8 @@ Built-in actions wire to picks, widget buttons (`data-emit`), or script (`ctx.em
|
|
|
147
147
|
|
|
148
148
|
GPU filtering is declarative — `filter-field="magnitude" filter-range="[4,10]"` — updates live from the built-in `filter` slider widget, and widget statistics stay coherent with what the map shows (`ctx.stats` respects the active filter unless you opt out).
|
|
149
149
|
|
|
150
|
+
Dashed lines are one attribute — `dash="[6, 3]"` (or `dash="6 3"`, plus optional `dash-justified`) on a `PathLayer`/`GeoJsonLayer`/`PolygonLayer`/`TripsLayer` — wired through deck's `PathStyleExtension` under the hood.
|
|
151
|
+
|
|
150
152
|
### Widgets get a real runtime API
|
|
151
153
|
|
|
152
154
|
Custom widget scripts receive `ctx`: layer metadata, `viewport` (bounds/zoom/project), the current `selection`, `emit()`, and data access — `ctx.data(id)`, `ctx.dataInViewport(id)`, `ctx.stats(id, field)` (count/min/max/mean/stddev/percentiles/histogram, viewport-scoped on request). Declare `watch` tokens (`data:quakes viewport selection layers`) and the runtime re-renders you only when relevant state changes. `vegaEmbed` and `d3` are available as globals for charts.
|
|
@@ -24,6 +24,33 @@ export declare const RESERVED_ATTRS: Set<string>;
|
|
|
24
24
|
* dimensions" case is a documented future extension.
|
|
25
25
|
*/
|
|
26
26
|
export declare const FILTER_ATTRS: Set<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Dashed lines (`dash="[6, 3]"`) are universal across the path-rendering layers,
|
|
29
|
+
* like filtering — resolved here, not per-schema, and excluded from the
|
|
30
|
+
* typo-check the same way. Dashes come from `@deck.gl/extensions`'
|
|
31
|
+
* `PathStyleExtension` (already bundled for DataFilterExtension), which only
|
|
32
|
+
* applies to layers that stroke a path.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DASH_ATTRS: Set<string>;
|
|
35
|
+
/** Layer types whose deck class strokes a path, so PathStyleExtension's dash takes effect (GeoJsonLayer/PolygonLayer dash their line/stroke sublayers). */
|
|
36
|
+
export declare const DASH_CAPABLE_LAYERS: Set<string>;
|
|
37
|
+
/** A dash pattern authored as a JSON array (`[6, 3]`) OR an SVG-style token list (`6 3`, `6,3`) → `[dashLength, gapLength]`; undefined if it isn't two finite positive numbers. */
|
|
38
|
+
export declare function parseDashArray(raw: string): [number, number] | undefined;
|
|
39
|
+
/** Already-coerced dash declaration — attribute strings (DOM) or typed values (programmatic). */
|
|
40
|
+
export interface LayerDashSpec {
|
|
41
|
+
/** `[dashLength, gapLength]` in line-width units, or undefined when no dash is authored. */
|
|
42
|
+
dashArray?: [number, number];
|
|
43
|
+
/** Stretch each segment's dashes to start and end on a dash (deck `dashJustified`). */
|
|
44
|
+
dashJustified?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Mount PathStyleExtension + set the dash accessor when a path-capable layer
|
|
48
|
+
* authored `dash`. Mirrors applyFilterWiring: dedup the extension, set the deck
|
|
49
|
+
* props, and share one definition between the DOM and programmatic front-ends.
|
|
50
|
+
* `dash` on a non-path layer is a no-op with a warning (deck would silently
|
|
51
|
+
* ignore it otherwise — the invisible-attribute class of confusion).
|
|
52
|
+
*/
|
|
53
|
+
export declare function applyDashWiring(props: Record<string, unknown>, spec: LayerDashSpec, layerType: string, warnLabel: string): void;
|
|
27
54
|
/** Already-coerced filter declaration — attribute strings (DOM front-end) or typed values (programmatic front-end). */
|
|
28
55
|
export interface LayerFilterSpec {
|
|
29
56
|
filterField?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-
|
|
1
|
+
import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-B1NnawjM.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, Q = 0) {
|
|
4
4
|
const me = Math.min(180, Pe) * Cd;
|