@nika-js/onlymap 0.8.4 → 0.9.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +56 -3
  3. package/dist/{LercDecode.es-BKustV-1.js → LercDecode.es-IEPCRZOv.js} +1 -1
  4. package/dist/{basemap-B0SwrOqQ.js → basemap-DL0mk9Bf.js} +780 -780
  5. package/dist/dem-decode.d.ts +58 -0
  6. package/dist/elements/om-map.d.ts +12 -0
  7. package/dist/{geoparquet-C5E6N6G0.js → geoparquet-DJxZA0if.js} +1 -1
  8. package/dist/hillshade-DR3TxO1a.js +186 -0
  9. package/dist/hillshade-apron-Bem3DWyJ.js +40 -0
  10. package/dist/hillshade-apron.d.ts +54 -0
  11. package/dist/hillshade-shader-n_zManfZ.js +160 -0
  12. package/dist/hillshade-shader.d.ts +152 -0
  13. package/dist/hillshade.d.ts +133 -0
  14. package/dist/html-data.d.ts +2 -2
  15. package/dist/{index-BLIjrGOE.js → index-BjcPjICh.js} +28 -28
  16. package/dist/{index-xUVMTGZG.js → index-CvuDsvnk.js} +23 -23
  17. package/dist/index-DO_w0tqR.js +514 -0
  18. package/dist/{index-BnQDfKfE.js → index-DdTZSuAb.js} +1 -1
  19. package/dist/{index-D5Fqn_eZ.js → index-oY3XHIux.js} +13145 -12484
  20. package/dist/{index-CaM1C93G.js → index-vLXZuog4.js} +1 -1
  21. package/dist/index.d.ts +3 -0
  22. package/dist/lerc-Bph62dCb.js +22 -0
  23. package/dist/onlymap.standalone.js +28919 -27259
  24. package/dist/onlymapjs.js +95 -92
  25. package/dist/post-process/catalogue.d.ts +61 -0
  26. package/dist/post-process/compile.d.ts +37 -0
  27. package/dist/post-process/index.d.ts +71 -0
  28. package/dist/post-process/ops.d.ts +22 -0
  29. package/dist/post-process/presets.d.ts +33 -0
  30. package/dist/post-process/validate.d.ts +8 -0
  31. package/dist/programmatic.d.ts +11 -0
  32. package/dist/{raster-B_wekCHv.js → raster-D-eTzCE3.js} +609 -499
  33. package/dist/raster-hillshade.d.ts +119 -0
  34. package/dist/{raster-pipeline-Dn2fkLYx.js → raster-pipeline-BlOnMPJe.js} +510 -484
  35. package/dist/raster-pipeline.d.ts +10 -0
  36. package/dist/raster.d.ts +5 -0
  37. package/dist/runtime-core.d.ts +39 -1
  38. package/dist/terrain-heightfield.d.ts +0 -16
  39. package/dist/terrain-sample.d.ts +0 -13
  40. package/dist/version.d.ts +1 -1
  41. package/dist/volumetrics.d.ts +7 -0
  42. package/dist/{zarr-Dan2ab-l.js → zarr-BGDoEtFb.js} +2 -2
  43. package/docs/cartograph.md +2 -2
  44. package/docs/design/hillshade.md +290 -0
  45. package/docs/effects.md +208 -0
  46. package/docs/hillshade.md +203 -0
  47. package/llms.txt +3 -1
  48. package/onlymapjs.attributes.json +27 -2
  49. package/onlymapjs.html-data.json +207 -6
  50. package/package.json +13 -9
  51. package/skills/onlymapjs/SKILL.md +4 -2
  52. package/skills/onlymapjs/references/syntax.md +17 -2
  53. package/dist/lerc-TxsFLMlC.js +0 -30
package/dist/onlymapjs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aC as e, aD as r, aE as t, aF as o, aG as b, aH as i, ap as l, aI as n, aJ as S, aK as c, aL as g, aM as E, aN as L, aO as T, aP as d, aQ as _, aR as A, aS as p, aT as I, aU as m, aV as D, aW as M, aX as u, aY as y, aZ as O, a_ as f, ao as R, a$ as N, aw as P, b0 as F, b1 as h, b2 as B, W as C, b3 as v, b4 as x, b5 as G, b6 as U, b7 as W, b8 as w, b9 as Y, ba as X, bb as H, bc as k, bd as K, be as J, bf as V, bg as z, bh as Q, bi as Z, bj as $, bk as j, bl as q, bm as aa, bn as sa, bo as ea, bp as ra, bq as ta, br as oa, bs as ba, bt as ia, bu as la, bv as na, bw as Sa, bx as ca, by as ga, bz as Ea, bA as La, bB as Ta, bC as da, bD as _a, bE as Aa, bF as pa, bG as Ia, bH as ma, bI as Da, bJ as Ma, bK as ua, bL as ya, bM as Oa, bN as fa, bO as Ra, bP as Na, bQ as Pa, bR as Fa, bS as ha, bT as Ba, bU as Ca, bV as va, bW as xa, bX as Ga, bY as Ua, bZ as Wa, b_ as wa, b$ as Ya, c0 as Xa, c1 as Ha, c2 as ka, c3 as Ka, c4 as Ja, c5 as Va, c6 as za, c7 as Qa, c8 as Za, c9 as $a, ca as ja, cb as qa, cc as as, cd as ss, ce as es, cf as rs } from "./index-D5Fqn_eZ.js";
1
+ import { aV as e, aW as r, aX as t, B as o, aY as b, aZ as i, C as c, a_ as n, a$ as l, b0 as S, b1 as E, e as g, b2 as L, b3 as T, b4 as d, b5 as _, b6 as A, b7 as p, b8 as m, b9 as I, ba as u, bb as D, bc as M, bd as y, be as f, bf as O, bg as P, aJ as R, bh as N, T as F, bi as h, bj as B, bk as C, W as v, bl as x, bm as G, bn as W, bo as w, bp as U, bq as Y, br as X, bs as k, bt as H, bu as J, bv as K, bw as V, bx as j, by as z, bz as q, bA as Z, bB as $, bC as Q, j as aa, bD as sa, bE as ea, bF as ra, bG as ta, bH as oa, bI as ba, bJ as ia, bK as ca, bL as na, bM as la, bN as Sa, bO as Ea, g as ga, bP as La, bQ as Ta, b as da, bR as _a, bS as Aa, bT as pa, bU as ma, bV as Ia, bW as ua, bX as Da, bY as Ma, bZ as ya, b_ as fa, b$ as Oa, c0 as Pa, c1 as Ra, c2 as Na, c3 as Fa, c4 as ha, c5 as Ba, c6 as Ca, c7 as va, c8 as xa, c9 as Ga, ca as Wa, cb as wa, cc as Ua, cd as Ya, ce as Xa, cf as ka, cg as Ha, ch as Ja, ci as Ka, cj as Va, ck as ja, cl as za, cm as qa, cn as Za, co as $a, cp as Qa, cq as as, cr as ss, cs as es, ct as rs, cu as ts, cv as os, cw as bs } from "./index-oY3XHIux.js";
2
2
  export {
3
3
  e as ALL_POSITION_VALUES,
4
4
  r as AUDIT_EXEMPTIONS,
@@ -6,108 +6,111 @@ export {
6
6
  o as BitmapLayer,
7
7
  b as COORDINATE_SYSTEM,
8
8
  i as CompileError,
9
- l as CompositeLayer,
9
+ c as CompositeLayer,
10
10
  n as DEFAULT_AUDIT_WIDTHS,
11
- S as DEFAULT_FOLD_BREAKPOINT_PX,
12
- c as DRONE_SENSOR_DATABASE,
13
- g as EDGE_TOLERANCE_PX,
14
- E as FOLD_BOTTOM_CLEARANCE_PX,
15
- L as FOLD_HYSTERESIS_PX,
16
- T as FOLD_SIDES,
17
- d as FOLD_SINGLE_SIDED_RATIO,
18
- _ as GeoJsonLayer,
19
- A as IconLayer,
20
- p as LEGACY_POSITION_ALIASES,
11
+ l as DEFAULT_FOLD_BREAKPOINT_PX,
12
+ S as DRONE_SENSOR_DATABASE,
13
+ E as EDGE_TOLERANCE_PX,
14
+ g as EFFECT_PRESET_NAMES,
15
+ L as FOLD_BOTTOM_CLEARANCE_PX,
16
+ T as FOLD_HYSTERESIS_PX,
17
+ d as FOLD_SIDES,
18
+ _ as FOLD_SINGLE_SIDED_RATIO,
19
+ A as GeoJsonLayer,
20
+ p as IconLayer,
21
+ m as LEGACY_POSITION_ALIASES,
21
22
  I as LIGHTING_PRESET_NAMES,
22
- m as Layer,
23
+ u as Layer,
23
24
  D as LayerExtension,
24
25
  M as MANAGED_SLOTS,
25
- u as MapController,
26
- y as OmMap,
26
+ y as MapController,
27
+ f as OmMap,
27
28
  O as ScatterplotLayer,
28
- f as ScenegraphLayer,
29
+ P as ScenegraphLayer,
29
30
  R as SimpleMeshLayer,
30
31
  N as Tile3DLayer,
31
- P as TileLayer,
32
- F as UNIT_SYSTEMS,
33
- h as WGS84_MEAN_RADIUS_M,
34
- B as WIDGET_STYLE_KEY_NAMES,
35
- C as WebMercatorViewport,
36
- v as arrowTableToColumnar,
37
- x as asRows,
38
- G as auditLayout,
39
- U as badgeMode,
40
- W as bottomEndLiftPx,
41
- w as compileExpression,
42
- Y as compileFullJsAccessorBlockInSandbox,
43
- X as computeTimeline,
32
+ F as TileLayer,
33
+ h as UNIT_SYSTEMS,
34
+ B as WGS84_MEAN_RADIUS_M,
35
+ C as WIDGET_STYLE_KEY_NAMES,
36
+ v as WebMercatorViewport,
37
+ x as arrowTableToColumnar,
38
+ G as asRows,
39
+ W as auditLayout,
40
+ w as badgeMode,
41
+ U as bottomEndLiftPx,
42
+ Y as compileExpression,
43
+ X as compileFullJsAccessorBlockInSandbox,
44
+ k as computeTimeline,
44
45
  H as configureBasemap,
45
- k as configureData,
46
+ J as configureData,
46
47
  K as configureIfc,
47
- J as configureLicense,
48
- V as configureTelemetry,
48
+ V as configureLicense,
49
+ j as configureTelemetry,
49
50
  z as descriptorToIR,
50
- Q as destroySandbox,
51
+ q as destroySandbox,
51
52
  Z as distanceMeters,
52
53
  $ as effectiveFoldBreakpointPx,
53
- j as evaluateInSandbox,
54
- q as foldDrawerStyle,
55
- aa as foldPanelStyle,
56
- sa as foldSideForSlot,
57
- ea as foldToggleSlot,
58
- ra as foldToggleStyle,
59
- ta as formatArea,
60
- oa as formatLength,
61
- ba as getBasemap,
62
- ia as getEntitlements,
54
+ Q as evaluateInSandbox,
55
+ aa as expandPreset,
56
+ sa as foldDrawerStyle,
57
+ ea as foldPanelStyle,
58
+ ra as foldSideForSlot,
59
+ ta as foldToggleSlot,
60
+ oa as foldToggleStyle,
61
+ ba as formatArea,
62
+ ia as formatLength,
63
+ ca as getBasemap,
64
+ na as getEntitlements,
63
65
  la as getLayerSchema,
64
- na as getMeasureRadiusMeters,
65
- Sa as getRoutingProvider,
66
- ca as getTerrain,
67
- ga as isBrowser,
68
- Ea as isColumnar,
69
- La as isStoreToken,
70
- Ta as lineStringLengthMeters,
71
- da as loadIfc,
72
- _a as loadRasterModule,
73
- Aa as midpoint,
74
- pa as mountForTest,
75
- Ia as niceNumber,
76
- ma as normalizeData,
77
- Da as parseDurationMs,
78
- Ma as parseTerrainAttrs,
79
- ua as parseUnitSystem,
80
- ya as parseWidgetStyle,
81
- Oa as pathLengthMeters,
82
- fa as registerAction,
83
- Ra as registerBasemap,
84
- Na as registerFormat,
85
- Pa as registerLayer,
86
- Fa as registerRoutingProvider,
87
- ha as registerSource,
88
- Ba as registerTerrain,
89
- Ca as registerWidget,
90
- va as releaseDataOwner,
91
- xa as resolveFoldBreakpointPx,
92
- Ga as resolveImageOverlay,
93
- Ua as resolveLighting,
94
- Wa as resolveSlot,
95
- wa as ringAreaMeters2,
96
- Ya as ringEnclosesPole,
97
- Xa as ringPerimeterMeters,
98
- Ha as rowAt,
99
- ka as sandboxHtml,
100
- Ka as scaleBarStep,
101
- Ja as setKeepBadge,
102
- Va as setMeasureRadiusMeters,
103
- za as settleLayout,
104
- Qa as shouldFoldAtWidth,
105
- Za as slotContainerStyle,
106
- $a as slotLayout,
107
- ja as snapshotDescriptorIR,
108
- qa as snapshotIR,
109
- as as solarAzElDegrees,
110
- ss as subscribeLicense,
111
- es as validateManifest,
112
- rs as validateManifestString
66
+ Sa as getMeasureRadiusMeters,
67
+ Ea as getRoutingProvider,
68
+ ga as getTerrain,
69
+ La as isBrowser,
70
+ Ta as isColumnar,
71
+ da as isEffectPreset,
72
+ _a as isStoreToken,
73
+ Aa as lineStringLengthMeters,
74
+ pa as loadIfc,
75
+ ma as loadRasterModule,
76
+ Ia as midpoint,
77
+ ua as mountForTest,
78
+ Da as niceNumber,
79
+ Ma as normalizeData,
80
+ ya as parseDurationMs,
81
+ fa as parseTerrainAttrs,
82
+ Oa as parseUnitSystem,
83
+ Pa as parseWidgetStyle,
84
+ Ra as pathLengthMeters,
85
+ Na as registerAction,
86
+ Fa as registerBasemap,
87
+ ha as registerFormat,
88
+ Ba as registerLayer,
89
+ Ca as registerRoutingProvider,
90
+ va as registerSource,
91
+ xa as registerTerrain,
92
+ Ga as registerWidget,
93
+ Wa as releaseDataOwner,
94
+ wa as resolveFoldBreakpointPx,
95
+ Ua as resolveImageOverlay,
96
+ Ya as resolveLighting,
97
+ Xa as resolveSlot,
98
+ ka as ringAreaMeters2,
99
+ Ha as ringEnclosesPole,
100
+ Ja as ringPerimeterMeters,
101
+ Ka as rowAt,
102
+ Va as sandboxHtml,
103
+ ja as scaleBarStep,
104
+ za as setKeepBadge,
105
+ qa as setMeasureRadiusMeters,
106
+ Za as settleLayout,
107
+ $a as shouldFoldAtWidth,
108
+ Qa as slotContainerStyle,
109
+ as as slotLayout,
110
+ ss as snapshotDescriptorIR,
111
+ es as snapshotIR,
112
+ rs as solarAzElDegrees,
113
+ ts as subscribeLicense,
114
+ os as validateManifest,
115
+ bs as validateManifestString
113
116
  };
@@ -0,0 +1,61 @@
1
+ /**
2
+ * The op catalogue's METADATA — names, kinds, knobs.
3
+ *
4
+ * Split from the GLSL deliberately. `OmMap.validate` is synchronous and lives
5
+ * in the core bundle, so the rules it runs cannot come from a lazy chunk; the
6
+ * shader source can, and does (`ops.ts`). Keeping the descriptions here means
7
+ * a map with no `<om-effect>` never downloads a line of GLSL, while the
8
+ * validator, the schema and the inspector still know every knob.
9
+ *
10
+ * An op is one named image operation with named knobs — `grain`, `edges`,
11
+ * `tint`. Authors compose them in document order and tune them by attribute;
12
+ * a preset is nothing more than a saved list of them (see `presets.ts`), which
13
+ * is the test of whether this tier is honest.
14
+ *
15
+ * Two kinds, and the difference is not cosmetic — it decides how the pipeline
16
+ * compiles:
17
+ *
18
+ * - POINTWISE ops read only the pixel they are writing, so any run of them
19
+ * fuses into a single fragment function and therefore a single pass.
20
+ * - NEIGHBOURHOOD ops sample texels around the pixel, so each one needs the
21
+ * previous stage finished and resident in a texture — one pass each.
22
+ *
23
+ * Spatial knobs are in MILLIMETRES, converted against `pxPerMm` inside the
24
+ * shader rather than baked in at build time. That is what makes a look
25
+ * resolution-independent: the same document printed at 600 dpi keeps the same
26
+ * physical grain and ink width it had on screen, where a pixel-valued knob
27
+ * would render four times finer and quietly lose the look.
28
+ */
29
+ /**
30
+ * Pixels per millimetre at 96 CSS dpi, before any device or capture scaling.
31
+ *
32
+ * Lives here rather than beside the compiler so the runtime can read it
33
+ * WITHOUT pulling in the GLSL: one value import from the lazy chunk is all it
34
+ * takes to make the chunk eager, which is exactly what the browser test that
35
+ * guards this caught.
36
+ */
37
+ export declare const CSS_PX_PER_MM: number;
38
+ /** How a run of ops compiles. See the file header. */
39
+ export type OpKind = "pointwise" | "neighbourhood";
40
+ /**
41
+ * What a knob means, which decides how its attribute is parsed and how it
42
+ * reaches the shader: `length` accepts `0.12mm` and stays in mm, `color`
43
+ * becomes a vec4, everything else is a plain number.
44
+ */
45
+ export type ParamKind = "amount" | "length" | "color" | "angle" | "count";
46
+ export interface OpParamDef {
47
+ name: string;
48
+ kind: ParamKind;
49
+ /** Millimetres for `length`, a CSS colour for `color`, else a number. */
50
+ default: number | string;
51
+ description: string;
52
+ }
53
+ export interface OpMeta {
54
+ name: string;
55
+ kind: OpKind;
56
+ description: string;
57
+ params: OpParamDef[];
58
+ }
59
+ export declare const OP_META: OpMeta[];
60
+ export declare const OP_NAMES: readonly string[];
61
+ export declare function opMeta(name: string): OpMeta | undefined;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Compile a run of ops into ONE luma shader module.
3
+ *
4
+ * This is what makes the op tier a generator rather than a stack of effects.
5
+ * Ten colour knobs are not ten fullscreen passes: every consecutive run of
6
+ * POINTWISE ops fuses into a single fragment function, and only a
7
+ * NEIGHBOURHOOD op — one that samples texels around the pixel, and so needs
8
+ * the previous stage finished and resident in a texture — starts a new pass.
9
+ * deck's `PostProcessEffect` already supports a multi-pass module where each
10
+ * pass names its own function, so the whole pipeline is one effect object.
11
+ *
12
+ * Uniform layout is the one place to be careful. luma's contract is explicit:
13
+ * "Both order and types MUST match uniform block declarations in shader". So
14
+ * the block text and `uniformTypes` are emitted from the same ordered arrays,
15
+ * never written twice — and std140 padding is sidestepped by grouping all
16
+ * vec4s ahead of all floats rather than interleaving them.
17
+ *
18
+ * Knobs stay uniforms rather than being baked into the source, because a
19
+ * story can animate one per frame and recompiling a shader per frame is not a
20
+ * thing to ship.
21
+ */
22
+ import type { ShaderPass } from "@luma.gl/shadertools";
23
+ import { type OpDef } from "./ops";
24
+ import { CSS_PX_PER_MM } from "./catalogue";
25
+ export { CSS_PX_PER_MM };
26
+ export interface ResolvedOp {
27
+ def: OpDef;
28
+ /** Knob name → value: a number, or `[r, g, b, a]` in 0..1 for a colour. */
29
+ values: Record<string, number | number[]>;
30
+ }
31
+ export interface CompiledEffect {
32
+ module: ShaderPass;
33
+ uniforms: Record<string, number | number[]>;
34
+ /** GPU passes this run costs — asserted by the tests, and worth reading in a profile. */
35
+ passCount: number;
36
+ }
37
+ export declare function compileOps(ops: ResolvedOp[], moduleName: string): CompiledEffect | null;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * `<om-effect>` — deck's `effects` array, declared as markup.
3
+ *
4
+ * Three lanes, in the order an author reaches for them:
5
+ *
6
+ * 1. `preset="vintage"` — a named look. Tune it with `<op>-<param>`
7
+ * attributes, or eject it into its ops with `OmMap.expandPreset`.
8
+ * 2. `op="grain" size="0.12mm"` — one named operation with named knobs.
9
+ * Compose them in document order; consecutive pointwise ops cost one pass.
10
+ * 3. An inline `<script type="application/json">` luma ShaderModule — raw
11
+ * GLSL, passed through untouched, which is the 1:1 deck surface.
12
+ *
13
+ * DOM order is pipeline order, exactly as it is for `<om-layer>`. The inline
14
+ * module rides an `application/json` script because that is the one script
15
+ * type a cartograph's adoption sanitizer keeps, so an effect survives into a
16
+ * print sheet.
17
+ */
18
+ import { type Effect } from "@deck.gl/core";
19
+ import type { OpParamDef } from "./catalogue";
20
+ export { EFFECT_PRESETS, EFFECT_PRESET_NAMES, expandPreset, isEffectPreset } from "./presets";
21
+ export { OP_NAMES, allOps, opDef } from "./ops";
22
+ export { OP_META, opMeta, type OpMeta, type OpParamDef } from "./catalogue";
23
+ export { CSS_PX_PER_MM } from "./compile";
24
+ /** One op with its knobs already coerced to shader values. */
25
+ export interface EffectOpIR {
26
+ op: string;
27
+ values: Record<string, number | number[]>;
28
+ }
29
+ /** One `<om-effect>` element. */
30
+ export interface EffectEntryIR {
31
+ /** The ops this element contributes — one for `op=`, several for `preset=`. */
32
+ ops?: EffectOpIR[];
33
+ /** Or a module supplied verbatim, with its uniform values. */
34
+ raw?: {
35
+ module: Record<string, unknown>;
36
+ uniforms: Record<string, unknown>;
37
+ };
38
+ }
39
+ export type EffectsIR = EffectEntryIR[];
40
+ export interface BuiltEffects {
41
+ effects: Effect[];
42
+ /**
43
+ * Re-point every compiled pass at a new device scale.
44
+ *
45
+ * Called when a capture re-rasterises at print resolution: the knobs stay in
46
+ * millimetres and only this changes, so a 600 dpi plate keeps the same
47
+ * physical grain and ink width it had on screen. Raw modules are left alone —
48
+ * their uniforms mean whatever their author decided.
49
+ */
50
+ setPixelsPerMm(value: number): void;
51
+ }
52
+ /** A knob's attribute value as the shader wants it, or undefined if unusable. */
53
+ export declare function coerceParam(param: OpParamDef, raw: string): number | number[] | undefined;
54
+ /**
55
+ * Read the `<om-effect>` children of a map.
56
+ *
57
+ * Bad input is SKIPPED with a console warning rather than thrown: one
58
+ * malformed effect must not cost the author their map, and `OmMap.validate`
59
+ * is where the same problem is reported as an error with a fix.
60
+ */
61
+ export declare function parseEffectEls(mapEl: Element): EffectsIR;
62
+ /** Test seam: make generated names deterministic for snapshot-style assertions. */
63
+ export declare function resetEffectBuildCounterForTests(): void;
64
+ /**
65
+ * Turn the IR into deck effects.
66
+ *
67
+ * Consecutive op entries fuse into ONE compiled effect; a raw entry breaks the
68
+ * run, because author-supplied GLSL cannot be merged into generated code and
69
+ * its position in the chain is part of what the author asked for.
70
+ */
71
+ export declare function buildPostProcessEffects(ir: EffectsIR, pixelsPerMm?: number): BuiltEffects;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The op catalogue's GLSL — the half that only a map with effects downloads.
3
+ *
4
+ * Metadata lives in `catalogue.ts` (see its header for why). An op's body
5
+ * reads and writes `color`; `u(param)` returns the accessor for a knob's
6
+ * uniform, since the compiler owns slot assignment, and `px` is the accessor
7
+ * for pixels-per-millimetre, which is what keeps a spatial knob the same
8
+ * physical size at any export resolution.
9
+ *
10
+ * A POINTWISE body may use `coord` and `texSize`. A NEIGHBOURHOOD body gets
11
+ * those plus `src` (sampler2D), with `color` pre-seeded from the centre.
12
+ */
13
+ import { type OpMeta } from "./catalogue";
14
+ export type { OpKind, OpMeta, OpParamDef, ParamKind } from "./catalogue";
15
+ export { OP_NAMES, opMeta } from "./catalogue";
16
+ export interface OpDef extends OpMeta {
17
+ glsl(u: (param: string) => string, px: string): string;
18
+ }
19
+ /** Shared helpers, emitted once per compiled module. */
20
+ export declare const OP_GLSL_PRELUDE = "\nfloat omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }\nfloat omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }\n";
21
+ export declare function opDef(name: string): OpDef | undefined;
22
+ export declare function allOps(): OpDef[];
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Presets — saved op lists, and nothing more.
3
+ *
4
+ * That is the whole design constraint: a preset must be expressible in the
5
+ * tier below it, the way `lighting="daylight"` is only a seeding of
6
+ * `lighting-ambient`/`lighting-sun`. If a preset ever needed something the op
7
+ * tier could not express, the op tier would be the thing to fix.
8
+ *
9
+ * Which is why `expandPreset` exists: "I like vintage but want less grain"
10
+ * should be paste-and-edit, not read-the-source. A preset can be ejected into
11
+ * the markup it stands for, and from then on it is ordinary authoring.
12
+ */
13
+ export interface PresetOp {
14
+ op: string;
15
+ params: Record<string, number | string>;
16
+ }
17
+ /**
18
+ * The shipped looks. Each is a finish for a PRINTED sheet — they assume the
19
+ * map beneath them is styled to suit (a night plate needs dark layers; no
20
+ * image pass can invert a light base into one), which is why the docs pair
21
+ * each with a base palette rather than promising a one-attribute transform.
22
+ */
23
+ export declare const EFFECT_PRESETS: Record<string, PresetOp[]>;
24
+ export declare const EFFECT_PRESET_NAMES: readonly string[];
25
+ export declare function isEffectPreset(name: string): boolean;
26
+ /**
27
+ * A preset as the markup it stands for — the eject button.
28
+ *
29
+ * Returns the `<om-effect op="…">` elements in order, ready to paste in place
30
+ * of the `preset` attribute. Lengths print with their `mm` unit, because a
31
+ * bare number in a spatial knob is the mistake this tier exists to prevent.
32
+ */
33
+ export declare function expandPreset(name: string): string | null;
@@ -0,0 +1,8 @@
1
+ export interface EffectValidationEntry {
2
+ severity: "error" | "warning";
3
+ element: string;
4
+ attribute?: string;
5
+ message: string;
6
+ fix: string;
7
+ }
8
+ export declare function validateEffectEl(el: Element, hasBasemap: boolean): EffectValidationEntry[];
@@ -1,3 +1,4 @@
1
+ import type { Effect } from "@deck.gl/core";
1
2
  import { type CameraOptions, type MandatedChromeHosts } from "./runtime-core";
2
3
  import type { HoverPickMode } from "./hover-pick";
3
4
  import { type LightingIR, type LightingOptions } from "./scene-lighting";
@@ -295,6 +296,16 @@ export declare class MapController {
295
296
  setLighting(options: LightingOptions | null): void;
296
297
  /** Resolved scene-lighting IR (test inspection) — null = deck default lights. */
297
298
  getLighting(): LightingIR | null;
299
+ /**
300
+ * Post-process effects, supplied as deck's own `Effect` instances — the
301
+ * 1:1 surface, with no vocabulary of ours in the way.
302
+ *
303
+ * Build them however you like (`new PostProcessEffect(module, props)`, your
304
+ * own module, one of ours via `compileOps`); order is the chain order. While
305
+ * set, these outrank any `<om-effect>` the document declares; `null` hands
306
+ * the document its own chain back.
307
+ */
308
+ setEffects(effects: Effect[] | null): void;
298
309
  /**
299
310
  * Terrain (spec: "Terrain") — a resolved TerrainIR, or null to turn the
300
311
  * surface off. Note: terrain suppresses an active basemap while on