@nika-js/onlymap 0.4.3 → 0.4.6
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 +44 -11
- package/bin/onlymapjs.mjs +160 -11
- package/dist/{LercDecode.es-peqB7bxk.js → LercDecode.es-B49qauXg.js} +1 -1
- package/dist/{basemap-BeKuGQJs.js → basemap-nJ_ODY7r.js} +168 -163
- package/dist/basemap.d.ts +3 -1
- package/dist/elements/om-map.d.ts +68 -0
- package/dist/{index-BPKvpqIk.js → index-CeOjfL2p.js} +2 -2
- package/dist/{index-DzyVbu_T.js → index-DSkgI4Oc.js} +12996 -12463
- package/dist/{index-BKU3HvOO.js → index-DjlGZov2.js} +1 -1
- package/dist/{index-DVnTYF5u.js → index-o_yRv2lD.js} +1 -1
- package/dist/{index-Dg8SKcgV.js → index-uDJbHjA9.js} +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/layer-registry.d.ts +8 -0
- package/dist/layout-audit.d.ts +53 -0
- package/dist/{lerc-DEpGyngt.js → lerc-CaQOmDCP.js} +2 -2
- package/dist/onlymap.standalone.js +22201 -21663
- package/dist/onlymapjs.js +78 -63
- package/dist/programmatic.d.ts +7 -1
- package/dist/{raster-CX7Y4jtJ.js → raster-DMq8FgiV.js} +2 -2
- package/dist/react/context.d.ts +9 -1
- package/dist/react/om-map.d.ts +3 -1
- package/dist/react/om-widget.d.ts +3 -1
- package/dist/react.js +336 -204
- package/dist/runtime-core.d.ts +20 -1
- package/dist/testing.d.ts +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/widget-layout.d.ts +36 -0
- package/docs/basemaps.md +1 -1
- package/docs/react.md +2 -1
- package/docs/testing.md +13 -1
- package/llms.txt +2 -2
- package/onlymapjs.html-data.json +18 -0
- package/package.json +2 -2
- package/skills/onlymapjs/SKILL.md +3 -2
- package/skills/onlymapjs/references/react.md +2 -2
- package/skills/onlymapjs/references/syntax.md +4 -4
- package/skills/onlymapjs/references/testing.md +16 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-
|
|
1
|
+
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-DSkgI4Oc.js";
|
|
2
2
|
import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
|
|
3
3
|
import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
|
|
4
4
|
import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index-
|
|
1
|
+
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index-DSkgI4Oc.js";
|
|
2
2
|
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as je, n as xe, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
|
|
3
3
|
import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -58,8 +58,10 @@ export type { Entitlements } from "./license";
|
|
|
58
58
|
export type { RuntimeContext } from "./ctx";
|
|
59
59
|
export { MapController, descriptorToIR } from "./programmatic";
|
|
60
60
|
export type { LayerDescriptor, MapControllerOptions, CameraState, OverlayPositioner, PickListener } from "./programmatic";
|
|
61
|
-
export { MANAGED_SLOTS, LEGACY_POSITION_ALIASES, ALL_POSITION_VALUES, resolveSlot, slotLayout, slotContainerStyle, parseWidgetStyle, WIDGET_STYLE_KEY_NAMES } from "./widget-layout";
|
|
62
|
-
export type { ManagedSlot, WidgetSlot, SlotLayout, WidgetStyleParse } from "./widget-layout";
|
|
61
|
+
export { MANAGED_SLOTS, LEGACY_POSITION_ALIASES, ALL_POSITION_VALUES, FOLD_SIDES, resolveSlot, slotLayout, slotContainerStyle, foldSideForSlot, foldToggleSlot, foldDrawerStyle, foldPanelStyle, foldToggleStyle, resolveFoldBreakpointPx, shouldFoldAtWidth, DEFAULT_FOLD_BREAKPOINT_PX, FOLD_HYSTERESIS_PX, parseWidgetStyle, WIDGET_STYLE_KEY_NAMES, } from "./widget-layout";
|
|
62
|
+
export type { ManagedSlot, WidgetSlot, FoldSide, SlotLayout, WidgetStyleParse } from "./widget-layout";
|
|
63
|
+
export { auditLayout, settleLayout, DEFAULT_AUDIT_WIDTHS, EDGE_TOLERANCE_PX, AUDIT_EXEMPTIONS } from "./layout-audit";
|
|
64
|
+
export type { LayoutAuditPage, LayoutDiagnostic, AuditOptions } from "./layout-audit";
|
|
63
65
|
export { isStoreToken } from "./external-store";
|
|
64
66
|
export type { TokenStore, ViewOrigin, ViewportSnapshot, DataVersionSnapshot } from "./external-store";
|
|
65
67
|
export type { LayerMetaSnapshot } from "./ctx";
|
package/dist/layer-registry.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export interface LayerSchema {
|
|
|
28
28
|
props: PropDescriptor[];
|
|
29
29
|
/** Hand-authored (curated, ~15) vs. runtime-derived from defaultProps (HU1 tiering). */
|
|
30
30
|
tier: "curated" | "auto-derived";
|
|
31
|
+
/**
|
|
32
|
+
* Carries a deck `Tileset3D` and supports the `onTilesetLoad` deck prop
|
|
33
|
+
* (spec: "Consumer map events / om-tileset-load") — the runtime injects
|
|
34
|
+
* the tileset-load hook only into these types. Declared HERE, at
|
|
35
|
+
* registration, rather than a name-matched set in runtime-core (the
|
|
36
|
+
* `compact`/`neverHides` widget-flag precedent — one source of truth).
|
|
37
|
+
*/
|
|
38
|
+
carriesTileset?: boolean;
|
|
31
39
|
}
|
|
32
40
|
export declare function registerLayer(schema: Omit<LayerSchema, "tier"> & {
|
|
33
41
|
tier?: LayerSchema["tier"];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The small structural slice of Playwright's Page used by the audit. Keeping
|
|
3
|
+
* this type dependency-free lets the browser-truth checker ship in the main
|
|
4
|
+
* package while the CLI still loads Playwright only on demand.
|
|
5
|
+
*/
|
|
6
|
+
export interface LayoutAuditPage {
|
|
7
|
+
evaluate<Result>(fn: () => Result | Promise<Result>): Promise<Awaited<Result>>;
|
|
8
|
+
evaluate<Result, Arg>(fn: (arg: Arg) => Result | Promise<Result>, arg: Arg): Promise<Awaited<Result>>;
|
|
9
|
+
waitForSelector(selector: string, options?: {
|
|
10
|
+
state?: "attached" | "visible";
|
|
11
|
+
timeout?: number;
|
|
12
|
+
}): Promise<unknown>;
|
|
13
|
+
viewportSize(): {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
} | null;
|
|
17
|
+
setViewportSize(size: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export interface LayoutDiagnostic {
|
|
23
|
+
severity: "error" | "warning";
|
|
24
|
+
element: string;
|
|
25
|
+
message: string;
|
|
26
|
+
fix: string;
|
|
27
|
+
/** Managed-tier geometry failures are usually library bugs — say so instead of blaming the manifest. */
|
|
28
|
+
blame: "manifest" | "library";
|
|
29
|
+
/** Viewport width (CSS px) the failure was observed at. */
|
|
30
|
+
width: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AuditOptions {
|
|
33
|
+
/** Viewport widths to sweep — exercises responsive behavior in one pass. */
|
|
34
|
+
widths?: number[];
|
|
35
|
+
}
|
|
36
|
+
export declare const DEFAULT_AUDIT_WIDTHS: number[];
|
|
37
|
+
export declare const EDGE_TOLERANCE_PX = 2;
|
|
38
|
+
/**
|
|
39
|
+
* THE exemption table (spec: "Widget Layout Manager" — exemptions live in
|
|
40
|
+
* ONE enumerated place so feature growth can't quietly hollow the checker).
|
|
41
|
+
* Every entry names its expiry condition.
|
|
42
|
+
*
|
|
43
|
+
* No exemptions remain: responsive auto-fold makes the full narrow-width
|
|
44
|
+
* sweep a release gate.
|
|
45
|
+
*/
|
|
46
|
+
export declare const AUDIT_EXEMPTIONS: readonly [];
|
|
47
|
+
/** Settle contract — resolve when layout is trustworthy, never a timeout. Handles both lanes (React pages have no <om-map> element — slot containers are the common marker). */
|
|
48
|
+
export declare function settleLayout(page: LayoutAuditPage): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Run the audit across a viewport-width sweep. The page must already be
|
|
51
|
+
* loaded (`page.goto` done); each width re-settles before measuring.
|
|
52
|
+
*/
|
|
53
|
+
export declare function auditLayout(page: LayoutAuditPage, opts?: AuditOptions): Promise<LayoutDiagnostic[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as s } from "./raster-
|
|
1
|
+
import { C as a, D as s } from "./raster-DMq8FgiV.js";
|
|
2
2
|
const D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null
|
|
4
4
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -8,7 +8,7 @@ var t;
|
|
|
8
8
|
})(t || (t = {}));
|
|
9
9
|
let l = !1;
|
|
10
10
|
async function d() {
|
|
11
|
-
const e = await import("./LercDecode.es-
|
|
11
|
+
const e = await import("./LercDecode.es-B49qauXg.js");
|
|
12
12
|
return l || (await e.load(), l = !0), e;
|
|
13
13
|
}
|
|
14
14
|
async function i(e, r) {
|