@urban-toolkit/autk-grammar 0.3.0 → 4.1.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.
@@ -1,126 +1,126 @@
1
- import { AutkDb as x, DEFAULT_WORKSPACE_COORDINATE_FORMAT as F } from "@urban-toolkit/autk-db";
2
- import { AutkMap as U, MapEvent as P } from "@urban-toolkit/autk-map";
3
- import { AutkPlot as Q, PlotEvent as A } from "@urban-toolkit/autk-plot";
4
- import { ColorMapDomainStrategy as b } from "@urban-toolkit/autk-core";
5
- import { AutkComputeEngine as $ } from "@urban-toolkit/autk-compute";
6
- function H(t) {
1
+ import { AutkDb as $, DEFAULT_WORKSPACE_COORDINATE_FORMAT as O } from "@urban-toolkit/autk-db";
2
+ import { AutkMap as Y, MapEvent as L } from "@urban-toolkit/autk-map";
3
+ import { AutkPlot as H, PlotEvent as w } from "@urban-toolkit/autk-plot";
4
+ import { ColorMapDomainStrategy as S } from "@urban-toolkit/autk-core";
5
+ import { AutkComputeEngine as V } from "@urban-toolkit/autk-compute";
6
+ function k(t) {
7
7
  const { spec: e, adapters: r } = t;
8
- let a;
8
+ let o;
9
9
  async function s() {
10
- let l;
10
+ let u;
11
11
  if (e.data)
12
12
  for (const i of e.data)
13
- l = await r.db.resolveSource(l, i);
13
+ u = await r.db.resolveSource(u, i);
14
14
  if (e.compute)
15
15
  for (const i of e.compute)
16
- l = await r.compute.resolveCompute(l, i);
16
+ u = await r.compute.resolveCompute(u, i);
17
17
  if (e.map)
18
18
  if (Array.isArray(e.map))
19
19
  for (let i = 0; i < e.map.length; i++) {
20
- let f = e.map[i];
21
- await r.map.resolveMap(l, f, i);
20
+ let l = e.map[i];
21
+ await r.map.resolveMap(u, l, i);
22
22
  }
23
23
  else
24
- await r.map.resolveMap(l, e.map);
24
+ await r.map.resolveMap(u, e.map);
25
25
  if (e.plot)
26
26
  if (Array.isArray(e.plot))
27
27
  for (const i of e.plot)
28
- await r.plot.resolvePlot(l, i);
28
+ await r.plot.resolvePlot(u, i);
29
29
  else
30
- await r.plot.resolvePlot(l, e.plot);
31
- a = l;
30
+ await r.plot.resolvePlot(u, e.plot);
31
+ o = u;
32
32
  }
33
- function o(l) {
34
- return console.log("Spec to update", l), new Promise((i) => {
33
+ function a(u) {
34
+ return console.log("Spec to update", u), new Promise((i) => {
35
35
  i();
36
36
  });
37
37
  }
38
38
  function n() {
39
39
  console.log("Function not implemented yet");
40
40
  }
41
- return { run: s, updatedSpec: o, destroy: n, get context() {
42
- return a;
41
+ return { run: s, updatedSpec: a, destroy: n, get context() {
42
+ return o;
43
43
  } };
44
44
  }
45
- var Y = /* @__PURE__ */ ((t) => (t.CAT_ACCENT = "schemeAccent", t.CAT_DARK2 = "schemeDark2", t.CAT_CATEGORY10 = "schemeCategory10", t.CAT_OBSERVABLE10 = "schemeObservable10", t.CAT_PAIRED = "schemePaired", t.CAT_PASTEL1 = "schemePastel1", t.CAT_PASTEL2 = "schemePastel2", t.CAT_SET1 = "schemeSet1", t.CAT_SET2 = "schemeSet2", t.CAT_SET3 = "schemeSet3", t.CAT_TABLEAU10 = "schemeTableau10", t.SEQ_REDS = "interpolateReds", t.SEQ_BLUES = "interpolateBlues", t.SEQ_GREENS = "interpolateGreens", t.SEQ_GREYS = "interpolateGreys", t.SEQ_ORANGES = "interpolateOranges", t.SEQ_PURPLES = "interpolatePurples", t.SEQ_TURBO = "interpolateTurbo", t.SEQ_VIRIDIS = "interpolateViridis", t.SEQ_INFERNO = "interpolateInferno", t.SEQ_MAGMA = "interpolateMagma", t.SEQ_PLASMA = "interpolatePlasma", t.SEQ_CIVIDIS = "interpolateCividis", t.SEQ_WARM = "interpolateWarm", t.SEQ_COOL = "interpolateCool", t.SEQ_CUBEHELIX_DEFAULT = "interpolateCubehelixDefault", t.SEQ_BU_GN = "interpolateBuGn", t.SEQ_BU_PU = "interpolateBuPu", t.SEQ_GN_BU = "interpolateGnBu", t.SEQ_OR_RD = "interpolateOrRd", t.SEQ_PU_BU_GN = "interpolatePuBuGn", t.SEQ_PU_BU = "interpolatePuBu", t.SEQ_PU_RD = "interpolatePuRd", t.SEQ_RD_PU = "interpolateRdPu", t.SEQ_YL_GN_BU = "interpolateYlGnBu", t.SEQ_YL_GN = "interpolateYlGn", t.SEQ_YL_OR_BR = "interpolateYlOrBr", t.SEQ_YL_OR_RD = "interpolateYlOrRd", t.DIV_BR_BG = "interpolateBrBG", t.DIV_PR_GN = "interpolatePRGn", t.DIV_PI_YG = "interpolatePiYG", t.DIV_PU_OR = "interpolatePuOr", t.DIV_RED_BLUE = "interpolateRdBu", t.DIV_RED_GREY = "interpolateRdGy", t.DIV_RED_YELLOW_BLUE = "interpolateRdYlBu", t.DIV_RED_YELLOW_GREEN = "interpolateRdYlGn", t.DIV_SPECTRAL = "interpolateSpectral", t))(Y || {}), O = /* @__PURE__ */ ((t) => (t.MIN_MAX = "minMax", t.PERCENTILE = "percentile", t))(O || {});
46
- function V(t) {
45
+ var W = /* @__PURE__ */ ((t) => (t.CAT_ACCENT = "schemeAccent", t.CAT_DARK2 = "schemeDark2", t.CAT_CATEGORY10 = "schemeCategory10", t.CAT_OBSERVABLE10 = "schemeObservable10", t.CAT_PAIRED = "schemePaired", t.CAT_PASTEL1 = "schemePastel1", t.CAT_PASTEL2 = "schemePastel2", t.CAT_SET1 = "schemeSet1", t.CAT_SET2 = "schemeSet2", t.CAT_SET3 = "schemeSet3", t.CAT_TABLEAU10 = "schemeTableau10", t.SEQ_REDS = "interpolateReds", t.SEQ_BLUES = "interpolateBlues", t.SEQ_GREENS = "interpolateGreens", t.SEQ_GREYS = "interpolateGreys", t.SEQ_ORANGES = "interpolateOranges", t.SEQ_PURPLES = "interpolatePurples", t.SEQ_TURBO = "interpolateTurbo", t.SEQ_VIRIDIS = "interpolateViridis", t.SEQ_INFERNO = "interpolateInferno", t.SEQ_MAGMA = "interpolateMagma", t.SEQ_PLASMA = "interpolatePlasma", t.SEQ_CIVIDIS = "interpolateCividis", t.SEQ_WARM = "interpolateWarm", t.SEQ_COOL = "interpolateCool", t.SEQ_CUBEHELIX_DEFAULT = "interpolateCubehelixDefault", t.SEQ_BU_GN = "interpolateBuGn", t.SEQ_BU_PU = "interpolateBuPu", t.SEQ_GN_BU = "interpolateGnBu", t.SEQ_OR_RD = "interpolateOrRd", t.SEQ_PU_BU_GN = "interpolatePuBuGn", t.SEQ_PU_BU = "interpolatePuBu", t.SEQ_PU_RD = "interpolatePuRd", t.SEQ_RD_PU = "interpolateRdPu", t.SEQ_YL_GN_BU = "interpolateYlGnBu", t.SEQ_YL_GN = "interpolateYlGn", t.SEQ_YL_OR_BR = "interpolateYlOrBr", t.SEQ_YL_OR_RD = "interpolateYlOrRd", t.DIV_BR_BG = "interpolateBrBG", t.DIV_PR_GN = "interpolatePRGn", t.DIV_PI_YG = "interpolatePiYG", t.DIV_PU_OR = "interpolatePuOr", t.DIV_RED_BLUE = "interpolateRdBu", t.DIV_RED_GREY = "interpolateRdGy", t.DIV_RED_YELLOW_BLUE = "interpolateRdYlBu", t.DIV_RED_YELLOW_GREEN = "interpolateRdYlGn", t.DIV_SPECTRAL = "interpolateSpectral", t))(W || {}), G = /* @__PURE__ */ ((t) => (t.MIN_MAX = "minMax", t.PERCENTILE = "percentile", t))(G || {});
46
+ function J(t) {
47
47
  const { autoLoadLayers: e, ...r } = t;
48
48
  return { ...r, autoLoadLayers: { layers: e?.layers ?? [] } };
49
49
  }
50
- function W(t, e) {
51
- function r(a, s) {
50
+ function K(t, e) {
51
+ function r(o, s) {
52
52
  if (!s || !s.db)
53
53
  return;
54
- const o = document.getElementById(s.db);
55
- if (o) {
56
- const n = a.getTablesMetadata();
57
- o.innerHTML += "<ul>";
58
- for (const l of n)
59
- o.innerHTML += `<li>${l.name}: (${l.source}, ${l.type}) </li>`;
60
- o.innerHTML += "</ul>", o.innerHTML += `<p>Number of tables: ${n.length}</p>`;
54
+ const a = document.getElementById(s.db);
55
+ if (a) {
56
+ const n = o.getTablesMetadata();
57
+ a.innerHTML += "<ul>";
58
+ for (const u of n)
59
+ a.innerHTML += `<li>${u.name}: (${u.source}, ${u.type}) </li>`;
60
+ a.innerHTML += "</ul>", a.innerHTML += `<p>Number of tables: ${n.length}</p>`;
61
61
  }
62
62
  }
63
63
  return {
64
- async resolveSource(a, s) {
65
- let o = a;
66
- o || (o = new x(), await o.init());
67
- let { type: n, ...l } = s;
64
+ async resolveSource(o, s) {
65
+ let a = o;
66
+ a || (a = new $(), await a.init());
67
+ let { type: n, ...u } = s;
68
68
  switch (n) {
69
69
  case "osm":
70
- return await o.loadOsm(V(l)), r(o, t), o;
70
+ return await a.loadOsm(J(u)), r(a, t), a;
71
71
  case "csv":
72
- return await o.loadCsv(l), r(o, t), o;
72
+ return await a.loadCsv(u), r(a, t), a;
73
73
  case "json":
74
- return await o.loadJson(l), r(o, t), o;
74
+ return await a.loadJson(u), r(a, t), a;
75
75
  case "geojson": {
76
- const i = l;
77
- let f;
78
- i.geojsonFileUrl ? f = await (await fetch(i.geojsonFileUrl)).json() : f = i.geojsonObject, e && f && e.set(i.outputTableName, f);
79
- const c = f ? (() => {
80
- const u = { ...i, geojsonObject: f };
81
- return delete u.geojsonFileUrl, u;
76
+ const i = u;
77
+ let l;
78
+ i.geojsonFileUrl ? l = await (await fetch(i.geojsonFileUrl)).json() : l = i.geojsonObject, e && l && e.set(i.outputTableName, l);
79
+ const c = l ? (() => {
80
+ const f = { ...i, geojsonObject: l };
81
+ return delete f.geojsonFileUrl, f;
82
82
  })() : i;
83
83
  try {
84
- await o.loadGeojson(c);
85
- } catch (u) {
84
+ await a.loadGeojson(c);
85
+ } catch (f) {
86
86
  const p = c.coordinateFormat ? `coordinateFormat is set to "${c.coordinateFormat}"` : "no coordinateFormat was specified — defaulting to EPSG:4326 (WGS84 per RFC 7946)";
87
87
  throw new Error(
88
- `Failed to load GeoJSON layer "${c.outputTableName}": ${u instanceof Error ? u.message : String(u)}. ${p}. Verify that coordinateFormat matches the actual CRS of the input data.`
88
+ `Failed to load GeoJSON layer "${c.outputTableName}": ${f instanceof Error ? f.message : String(f)}. ${p}. Verify that coordinateFormat matches the actual CRS of the input data.`
89
89
  );
90
90
  }
91
91
  try {
92
- const u = await o.getBoundingBoxFromLayer(c.outputTableName), p = 25e6;
93
- if (!isFinite(u.minLon) || !isFinite(u.minLat) || !isFinite(u.maxLon) || !isFinite(u.maxLat) || Math.abs(u.minLon) > p || Math.abs(u.maxLon) > p || Math.abs(u.minLat) > p || Math.abs(u.maxLat) > p)
92
+ const f = await a.getBoundingBoxFromLayer(c.outputTableName), p = 25e6;
93
+ if (!isFinite(f.minLon) || !isFinite(f.minLat) || !isFinite(f.maxLon) || !isFinite(f.maxLat) || Math.abs(f.minLon) > p || Math.abs(f.maxLon) > p || Math.abs(f.minLat) > p || Math.abs(f.maxLat) > p)
94
94
  throw new Error(
95
- `Geometry bounding box after transform is invalid for layer "${c.outputTableName}" (bbox: [${u.minLon}, ${u.minLat}, ${u.maxLon}, ${u.maxLat}]). Verify that coordinateFormat matches the actual CRS of the input data. The workspace uses ${F}; input is expected in EPSG:4326 by default.`
95
+ `Geometry bounding box after transform is invalid for layer "${c.outputTableName}" (bbox: [${f.minLon}, ${f.minLat}, ${f.maxLon}, ${f.maxLat}]). Verify that coordinateFormat matches the actual CRS of the input data. The workspace uses ${O}; input is expected in EPSG:4326 by default.`
96
96
  );
97
- } catch (u) {
98
- if (u instanceof Error && u.message.includes("bounding box after transform")) throw u;
97
+ } catch (f) {
98
+ if (f instanceof Error && f.message.includes("bounding box after transform")) throw f;
99
99
  }
100
- return r(o, t), o;
100
+ return r(a, t), a;
101
101
  }
102
102
  case "heatmap": {
103
- const i = l;
104
- return await o.buildHeatmap({
103
+ const i = u;
104
+ return await a.buildHeatmap({
105
105
  tableJoinName: i.tableJoinName,
106
106
  near: { distance: i.near.distance },
107
107
  outputTableName: i.outputTableName,
108
108
  grid: i.grid,
109
109
  ...i.groupBy && { groupBy: i.groupBy }
110
- }), r(o, t), o;
110
+ }), r(a, t), a;
111
111
  }
112
112
  case "join": {
113
- const i = l;
114
- if (await o.spatialQuery({
113
+ const i = u;
114
+ if (await a.spatialQuery({
115
115
  tableRootName: i.tableRootName,
116
116
  tableJoinName: i.tableJoinName,
117
117
  ...i.near && { near: i.near },
118
118
  ...i.groupBy && { groupBy: i.groupBy }
119
119
  }), e) {
120
- const f = await o.getLayer(i.tableRootName);
121
- e.set(i.tableRootName, f);
120
+ const l = await a.getLayer(i.tableRootName);
121
+ e.set(i.tableRootName, l);
122
122
  }
123
- return r(o, t), o;
123
+ return r(a, t), a;
124
124
  }
125
125
  default:
126
126
  return;
@@ -128,85 +128,85 @@ function W(t, e) {
128
128
  }
129
129
  };
130
130
  }
131
- function k(t, e) {
132
- return e && e.length > 0 ? { type: b.USER, params: e } : t?.mode === O.PERCENTILE ? t.lowerPercentile !== void 0 || t.upperPercentile !== void 0 ? {
133
- type: b.PERCENTILE,
131
+ function X(t, e) {
132
+ return e && e.length > 0 ? { type: S.USER, params: e } : t?.mode === G.PERCENTILE ? t.lowerPercentile !== void 0 || t.upperPercentile !== void 0 ? {
133
+ type: S.PERCENTILE,
134
134
  params: [t.lowerPercentile ?? 0, t.upperPercentile ?? 100]
135
- } : { type: b.PERCENTILE } : { type: b.MIN_MAX };
135
+ } : { type: S.PERCENTILE } : { type: S.MIN_MAX };
136
136
  }
137
- function J(t, e) {
138
- return e.split(".").reduce((r, a) => {
137
+ function q(t, e) {
138
+ return e.split(".").reduce((r, o) => {
139
139
  if (!(r == null || typeof r != "object"))
140
- return r[a];
140
+ return r[o];
141
141
  }, t);
142
142
  }
143
- function K(t, e, r) {
144
- const a = e.split("."), s = { ...t };
145
- let o = s;
146
- for (let n = 0; n < a.length - 1; n++)
147
- o[a[n]] = { ...o[a[n]] ?? {} }, o = o[a[n]];
148
- return o[a[a.length - 1]] = r, s;
143
+ function z(t, e, r) {
144
+ const o = e.split("."), s = { ...t };
145
+ let a = s;
146
+ for (let n = 0; n < o.length - 1; n++)
147
+ a[o[n]] = { ...a[o[n]] ?? {} }, a = a[o[n]];
148
+ return a[o[o.length - 1]] = r, s;
149
149
  }
150
- function X(t, e) {
151
- const a = t.features?.[0]?.properties?.bands ?? [];
152
- return a.find((o) => o.id === e || o.label === e?.replace(/\./g, "_"))?.id ?? a[0]?.id ?? e ?? "";
153
- }
154
- function q(t, e, r) {
155
- async function a(s, o, n) {
156
- let l = {};
157
- for (const i of o.getTablesMetadata())
158
- i.type !== void 0 && (l[i.name] = i.type);
159
- for (const i of n.layerRefs) {
160
- const f = i.dataRef, c = l[f], u = i.getFnv, p = r?.get(f) ?? await o.getLayer(f), m = c === "raster" ? p : {
161
- ...p,
162
- features: (p.features ?? []).filter((y) => y.geometry != null)
150
+ function Z(t, e) {
151
+ const o = t.features?.[0]?.properties?.bands ?? [];
152
+ return o.find((a) => a.id === e || a.label === e?.replace(/\./g, "_"))?.id ?? o[0]?.id ?? e ?? "";
153
+ }
154
+ function tt(t, e, r, o) {
155
+ async function s(a, n, u) {
156
+ let i = {};
157
+ for (const l of n.getTablesMetadata())
158
+ l.type !== void 0 && (i[l.name] = l.type);
159
+ for (const l of u.layerRefs) {
160
+ const c = l.dataRef, f = i[c], p = l.getFnv, m = r?.get(c) ?? await n.getLayer(c), d = f === "raster" ? m : {
161
+ ...m,
162
+ features: (m.features ?? []).filter((_) => _.geometry != null)
163
163
  };
164
- c === "raster" ? s.loadCollection(f, { collection: m, type: "raster", property: X(m, u) }) : s.loadCollection(f, { collection: m, type: c }), i.opacity != null && s.updateRenderInfo(f, { opacity: i.opacity }), (i.isColorMap ?? (u != null && c !== "raster")) && s.updateRenderInfo(f, { isColorMap: !0 }), i.isPick && s.updateRenderInfo(f, { isPick: !0 }), i.isSkip && s.updateRenderInfo(f, { isSkip: !0 });
165
- const { catchAllCategory: d, colorMapDomain: g } = i;
166
- let E = m, L = g;
167
- if (u && d && g?.length) {
168
- const y = new Set(g);
169
- E = {
170
- ...m,
171
- features: m.features.map((S) => {
172
- const v = S.properties, C = J(v, u);
173
- return C == null || !y.has(String(C)) ? { ...S, properties: K(v, u, d) } : S;
164
+ f === "raster" ? a.loadCollection(c, { collection: d, type: "raster", property: Z(d, p) }) : a.loadCollection(c, { collection: d, type: f }), l.opacity != null && a.updateRenderInfo(c, { opacity: l.opacity }), (l.isColorMap ?? (p != null && f !== "raster")) && a.updateRenderInfo(c, { isColorMap: !0 }), l.isPick && a.updateRenderInfo(c, { isPick: !0 }), l.isSkip && a.updateRenderInfo(c, { isSkip: !0 });
165
+ const { catchAllCategory: h, colorMapDomain: g } = l;
166
+ let R = d, b = g;
167
+ if (p && h && g?.length) {
168
+ const _ = new Set(g);
169
+ R = {
170
+ ...d,
171
+ features: d.features.map((M) => {
172
+ const v = M.properties, P = q(v, p);
173
+ return P == null || !_.has(String(P)) ? { ...M, properties: z(v, p, h) } : M;
174
174
  })
175
- }, L = y.has(d) ? g : [...g, d];
175
+ }, b = _.has(h) ? g : [...g, h];
176
176
  }
177
- if (i.colorMapInterpolator) {
178
- const y = {
177
+ if (l.colorMapInterpolator) {
178
+ const _ = {
179
179
  // urban-grammar ColorMapInterpolator values are string-compatible
180
180
  // with autk-core ColorMapInterpolator at runtime
181
- interpolator: i.colorMapInterpolator,
182
- domainSpec: k(i.normalization, L)
181
+ interpolator: l.colorMapInterpolator,
182
+ domainSpec: X(l.normalization, b)
183
183
  };
184
- s.updateRenderInfo(f, { colormap: { config: y }, isColorMap: !0 });
184
+ a.updateRenderInfo(c, { colormap: { config: _ }, isColorMap: !0 });
185
185
  }
186
- if (u && c !== "raster") {
187
- const y = u.startsWith("properties.") ? u : `properties.${u}`;
188
- s.updateThematic(f, { collection: E, property: y });
186
+ if (p && f !== "raster") {
187
+ const _ = p.startsWith("properties.") ? p : `properties.${p}`;
188
+ a.updateThematic(c, { collection: R, property: _ });
189
189
  }
190
190
  }
191
191
  }
192
192
  return {
193
- async resolveMap(s, o, n = 0) {
194
- if (t && t.map && s) {
195
- let l;
196
- if (Array.isArray(t.map) ? l = document.getElementById(t.map[n]) : l = document.getElementById(t.map), !l)
193
+ async resolveMap(a, n, u = 0) {
194
+ if (t && t.map && a) {
195
+ let i;
196
+ if (Array.isArray(t.map) ? i = document.getElementById(t.map[u]) : i = document.getElementById(t.map), !i)
197
197
  throw new Error("Could not find rendering target for map: " + t.map);
198
- if (!(l instanceof HTMLCanvasElement))
198
+ if (!(i instanceof HTMLCanvasElement))
199
199
  throw new Error("Target for map is not a canvas: " + t.map);
200
- const i = new U(l);
201
- if (o.style && i.style.setPredefinedStyle(o.style), await i.init(), await a(i, s, o), e)
202
- for (const f of o.layerRefs)
203
- e.set(f.dataRef, i);
204
- i.draw();
200
+ const l = new Y(i);
201
+ if (n.style && l.style.setPredefinedStyle(n.style), await l.init(), await s(l, a, n), e)
202
+ for (const c of n.layerRefs)
203
+ e.set(c.dataRef, l);
204
+ o && (o[u] = l), l.draw();
205
205
  }
206
206
  }
207
207
  };
208
208
  }
209
- function z(t) {
209
+ function et(t) {
210
210
  return {
211
211
  scatter: "scatterplot",
212
212
  bar: "barchart",
@@ -217,17 +217,17 @@ function z(t) {
217
217
  heatmatrix: "heatmatrix"
218
218
  }[t];
219
219
  }
220
- function Z(t, e, r, a, s) {
220
+ function rt(t, e, r, o, s) {
221
221
  return {
222
- async resolvePlot(o, n) {
222
+ async resolvePlot(a, n) {
223
223
  if (!t || !t.plot) return;
224
- const l = document.getElementById(t.plot);
225
- if (!l) throw new Error(`Could not find plot target: ${t.plot}`);
226
- const i = o;
224
+ const u = document.getElementById(t.plot);
225
+ if (!u) throw new Error(`Could not find plot target: ${t.plot}`);
226
+ const i = a;
227
227
  if (!i) throw new Error("No data context available for plot.");
228
- const f = s?.get(n.dataRef) ?? await i.getLayer(n.dataRef), c = n.events ?? [], u = new Q(l, {
229
- type: z(n.mark),
230
- collection: f,
228
+ const l = s?.get(n.dataRef) ?? await i.getLayer(n.dataRef), c = n.events ?? [], f = new H(u, {
229
+ type: et(n.mark),
230
+ collection: l,
231
231
  attributes: { axis: n.axis, ...n.color && { color: n.color } },
232
232
  labels: { axis: n.axis, title: n.title },
233
233
  events: c,
@@ -236,209 +236,222 @@ function Z(t, e, r, a, s) {
236
236
  ...n.margins && { margins: n.margins },
237
237
  ...n.transform && { transform: n.transform }
238
238
  });
239
- if (r?.set(n.dataRef, u), n.mapRef && a?.set(n.dataRef, n.mapRef), n.mapRef && e) {
239
+ if (r?.set(n.dataRef, f), n.mapRef && o?.set(n.dataRef, n.mapRef), n.mapRef && e) {
240
240
  const p = e.get(n.mapRef);
241
241
  if (p) {
242
- p.updateRenderInfo(n.mapRef, { isPick: !0 }), p.events.on(P.PICKING, ({ selection: m }) => {
243
- u.setSelection(m);
242
+ p.updateRenderInfo(n.mapRef, { isPick: !0 }), p.events.on(L.PICKING, ({ selection: m }) => {
243
+ f.setSelection(m);
244
244
  });
245
245
  for (const m of c)
246
- u.events.on(m, ({ selection: h }) => {
247
- p.setHighlightedIds(n.mapRef, h);
246
+ f.events.on(m, ({ selection: d }) => {
247
+ p.setHighlightedIds(n.mapRef, d);
248
248
  });
249
249
  }
250
250
  }
251
251
  }
252
252
  };
253
253
  }
254
- const M = 2e3;
255
- function tt(t) {
254
+ const D = 134217728, at = 4, ot = 32;
255
+ function nt(t) {
256
256
  return Array.isArray(t) ? t.join(`
257
257
  `) : t;
258
258
  }
259
- function _(t) {
259
+ function E(t) {
260
260
  return !!t && typeof t == "object" && !Array.isArray(t) && typeof t.fromFeature == "object" && t.fromFeature !== null;
261
261
  }
262
- function R(t, e) {
262
+ function A(t, e) {
263
263
  return t instanceof Map ? t.get(e) : t[e];
264
264
  }
265
- function w(t, e) {
266
- return e.split(".").reduce((r, a) => {
265
+ function C(t, e) {
266
+ return e.split(".").reduce((r, o) => {
267
267
  if (!(r == null || typeof r != "object"))
268
- return r[a];
268
+ return r[o];
269
269
  }, t);
270
270
  }
271
- function G(t) {
271
+ function j(t) {
272
272
  const e = [];
273
273
  for (const r of [t.uniforms, t.uniformMatrices])
274
- for (const a of Object.values(r ?? {}))
275
- _(a) && e.push(a);
274
+ for (const o of Object.values(r ?? {}))
275
+ E(o) && e.push(o);
276
276
  return e;
277
277
  }
278
- function et(t) {
279
- return [.../* @__PURE__ */ new Set([t.dataRef, ...G(t).map((e) => e.fromFeature.layer)])];
278
+ function it(t) {
279
+ return [.../* @__PURE__ */ new Set([t.dataRef, ...j(t).map((e) => e.fromFeature.layer)])];
280
280
  }
281
- function D(t) {
282
- for (const e of G(t)) {
283
- const { iterate: r, layer: a } = e.fromFeature;
284
- if (r === "all" || r === "batched") return { mode: r, layer: a };
281
+ function x(t) {
282
+ for (const e of j(t)) {
283
+ const { iterate: r, layer: o } = e.fromFeature;
284
+ if (r === "all" || r === "batched") return { mode: r, layer: o };
285
285
  }
286
286
  return null;
287
287
  }
288
- function j(t, e, r) {
289
- const a = t.fromFeature, s = r !== void 0 && a.iterate === "all" ? r : a.index ?? 0, o = R(e, a.layer)?.features?.[s];
290
- return o ? w(o, a.path) : void 0;
288
+ function U(t, e, r) {
289
+ const o = t.fromFeature, s = r !== void 0 && o.iterate === "all" ? r : o.index ?? 0, a = A(e, o.layer)?.features?.[s];
290
+ return a ? C(a, o.path) : void 0;
291
291
  }
292
292
  function N(t, e, r) {
293
293
  if (!t) return;
294
- const a = {};
295
- for (const [s, o] of Object.entries(t)) {
296
- if (!_(o)) {
297
- a[s] = o;
294
+ const o = {};
295
+ for (const [s, a] of Object.entries(t)) {
296
+ if (!E(a)) {
297
+ o[s] = a;
298
298
  continue;
299
299
  }
300
- const n = Number(j(o, e, r) ?? NaN);
301
- Number.isFinite(n) ? a[s] = n : typeof o.default == "number" && (a[s] = o.default);
300
+ const n = Number(U(a, e, r) ?? NaN);
301
+ Number.isFinite(n) ? o[s] = n : typeof a.default == "number" && (o[s] = a.default);
302
302
  }
303
- return a;
303
+ return o;
304
304
  }
305
- function T(t, e, r) {
305
+ function I(t, e, r) {
306
306
  if (!t) return;
307
- const a = {};
308
- for (const [s, o] of Object.entries(t)) {
309
- if (!_(o)) {
310
- a[s] = o;
307
+ const o = {};
308
+ for (const [s, a] of Object.entries(t)) {
309
+ if (!E(a)) {
310
+ o[s] = a;
311
311
  continue;
312
312
  }
313
- const n = j(o, e, r), l = Array.isArray(n) ? n : Array.isArray(o.default) ? o.default : void 0;
314
- if (!l) continue;
315
- const i = o.cols ?? (Array.isArray(l[0]) ? l[0].length : 0);
316
- i > 0 ? a[s] = { data: l, cols: i } : console.warn(`[autk-grammar] uniform matrix "${s}" has no column count; entry dropped`);
313
+ const n = U(a, e, r), u = Array.isArray(n) ? n : Array.isArray(a.default) ? a.default : void 0;
314
+ if (!u) continue;
315
+ const i = a.cols ?? (Array.isArray(u[0]) ? u[0].length : 0);
316
+ i > 0 ? o[s] = { data: u, cols: i } : console.warn(`[autk-grammar] uniform matrix "${s}" has no column count; entry dropped`);
317
317
  }
318
- return a;
318
+ return o;
319
319
  }
320
- function rt(t) {
320
+ function st(t) {
321
321
  return t != null && !(typeof t == "number" && !Number.isFinite(t));
322
322
  }
323
- function ot(t, e, r) {
324
- const a = {}, s = {}, o = [];
325
- for (const n of [t, e])
326
- for (const l of Object.values(n ?? {}))
327
- _(l) && l.fromFeature.iterate === "batched" && l.fromFeature.required && o.push(l.fromFeature.path);
328
- if (o.length > 0) {
329
- const n = r.length;
330
- r = r.filter((l) => o.every((i) => rt(w(l, i)))), r.length < n && console.info(`[autk-grammar] batched compute dropped ${n - r.length} feature(s) missing ${o.join(", ")}`);
323
+ function B(t) {
324
+ return E(t) && t.fromFeature.iterate === "batched";
325
+ }
326
+ function Q(t, e) {
327
+ return Object.values(e ?? {}).some(B) ? ot : Object.values(t ?? {}).some(B) ? at : 0;
328
+ }
329
+ function lt(t, e, r = D) {
330
+ const o = Q(t, e);
331
+ return o > 0 ? Math.floor(r / o) : Number.POSITIVE_INFINITY;
332
+ }
333
+ function ut(t, e, r, o = D) {
334
+ const s = {}, a = {}, n = [];
335
+ for (const i of [t, e])
336
+ for (const l of Object.values(i ?? {}))
337
+ E(l) && l.fromFeature.iterate === "batched" && l.fromFeature.required && n.push(l.fromFeature.path);
338
+ if (n.length > 0) {
339
+ const i = r.length;
340
+ r = r.filter((l) => n.every((c) => st(C(l, c)))), r.length < i && console.info(`[autk-grammar] batched compute dropped ${i - r.length} feature(s) missing ${n.join(", ")}`);
331
341
  }
332
- r.length > M && (console.warn(`[autk-grammar] batched compute capped at ${M} features (got ${r.length})`), r = r.slice(0, M));
333
- for (const [n, l] of Object.entries(t ?? {}))
334
- if (_(l) && l.fromFeature.iterate === "batched") {
335
- const i = typeof l.default == "number" ? l.default : void 0;
336
- s[n] = r.map((f) => {
337
- const c = Number(w(f, l.fromFeature.path) ?? i);
338
- return Number.isFinite(c) ? c : 0;
342
+ const u = lt(t, e, o);
343
+ r.length > u && (console.warn(
344
+ `[autk-grammar] batched compute capped at ${u} features (got ${r.length}): its largest packed array takes ${Q(t, e)} B per feature, and a storage buffer binding holds ${o} B`
345
+ ), r = r.slice(0, u));
346
+ for (const [i, l] of Object.entries(t ?? {}))
347
+ if (E(l) && l.fromFeature.iterate === "batched") {
348
+ const c = typeof l.default == "number" ? l.default : void 0;
349
+ a[i] = r.map((f) => {
350
+ const p = Number(C(f, l.fromFeature.path) ?? c);
351
+ return Number.isFinite(p) ? p : 0;
339
352
  });
340
- } else typeof l == "number" && (a[n] = l);
341
- for (const [n, l] of Object.entries(e ?? {})) {
342
- if (!_(l) || l.fromFeature.iterate !== "batched") continue;
343
- const i = [];
353
+ } else typeof l == "number" && (s[i] = l);
354
+ for (const [i, l] of Object.entries(e ?? {})) {
355
+ if (!E(l) || l.fromFeature.iterate !== "batched") continue;
356
+ const c = [];
344
357
  for (const f of r) {
345
- const c = w(f, l.fromFeature.path);
346
- let u = 1 / 0, p = 1 / 0, m = -1 / 0, h = -1 / 0;
347
- if (Array.isArray(c))
348
- for (const d of c) {
349
- if (!Array.isArray(d) || d.length < 2) continue;
350
- const g = Number(d[0]), E = Number(d[1]);
351
- !Number.isFinite(g) || !Number.isFinite(E) || (u = Math.min(u, g), p = Math.min(p, E), m = Math.max(m, g), h = Math.max(h, E));
358
+ const p = C(f, l.fromFeature.path);
359
+ let m = 1 / 0, d = 1 / 0, y = -1 / 0, h = -1 / 0;
360
+ if (Array.isArray(p))
361
+ for (const g of p) {
362
+ if (!Array.isArray(g) || g.length < 2) continue;
363
+ const R = Number(g[0]), b = Number(g[1]);
364
+ !Number.isFinite(R) || !Number.isFinite(b) || (m = Math.min(m, R), d = Math.min(d, b), y = Math.max(y, R), h = Math.max(h, b));
352
365
  }
353
- Number.isFinite(u) || (u = 0, p = 0, m = 0, h = 0), i.push(u, p, m, p, m, h, u, h);
366
+ Number.isFinite(m) || (m = 0, d = 0, y = 0, h = 0), c.push(m, d, y, d, y, h, m, h);
354
367
  }
355
- s[n] = i;
368
+ a[i] = c;
356
369
  }
357
- return a.num_features = r.length, { uniforms: a, uniformArrays: s };
370
+ return s.num_features = r.length, { uniforms: s, uniformArrays: a };
358
371
  }
359
- function I(t, e, r) {
360
- const a = R(e, t.dataRef);
361
- if (!a) throw new Error(`compute: table "${t.dataRef}" is not loaded`);
372
+ function T(t, e, r) {
373
+ const o = A(e, t.dataRef);
374
+ if (!o) throw new Error(`compute: table "${t.dataRef}" is not loaded`);
362
375
  const s = {
363
- collection: a,
376
+ collection: o,
364
377
  variableMapping: t.attributes,
365
- wgslBody: tt(t.wglsFunction)
378
+ wgslBody: nt(t.wglsFunction)
366
379
  };
367
380
  t.attributeArrays && (s.attributeArrays = t.attributeArrays), t.attributeMatrices && (s.attributeMatrices = t.attributeMatrices), t.uniformArrays && (s.uniformArrays = t.uniformArrays), t.outputColumnName && (s.resultField = t.outputColumnName), t.outputColumns && (s.outputColumns = t.outputColumns);
368
- const o = D(t);
369
- if (o?.mode === "batched") {
370
- const f = R(e, o.layer)?.features ?? [], c = ot(t.uniforms, t.uniformMatrices, f), u = N(B(t.uniforms), e) ?? {}, p = T(B(t.uniformMatrices), e);
371
- return s.uniforms = { ...u, ...c.uniforms }, s.uniformArrays = { ...s.uniformArrays ?? {}, ...c.uniformArrays }, p && Object.keys(p).length > 0 && (s.uniformMatrices = p), s;
381
+ const a = x(t);
382
+ if (a?.mode === "batched") {
383
+ const l = A(e, a.layer)?.features ?? [], c = ut(t.uniforms, t.uniformMatrices, l), f = N(F(t.uniforms), e) ?? {}, p = I(F(t.uniformMatrices), e);
384
+ return s.uniforms = { ...f, ...c.uniforms }, s.uniformArrays = { ...s.uniformArrays ?? {}, ...c.uniformArrays }, p && Object.keys(p).length > 0 && (s.uniformMatrices = p), s;
372
385
  }
373
- const n = o?.mode === "all" ? r : void 0, l = N(t.uniforms, e, n), i = T(t.uniformMatrices, e, n);
374
- return l && (s.uniforms = l), i && (s.uniformMatrices = i), s;
386
+ const n = a?.mode === "all" ? r : void 0, u = N(t.uniforms, e, n), i = I(t.uniformMatrices, e, n);
387
+ return u && (s.uniforms = u), i && (s.uniformMatrices = i), s;
375
388
  }
376
- function B(t) {
389
+ function F(t) {
377
390
  if (t)
378
- return Object.fromEntries(Object.entries(t).filter(([, e]) => !(_(e) && e.fromFeature.iterate === "batched")));
391
+ return Object.fromEntries(Object.entries(t).filter(([, e]) => !(E(e) && e.fromFeature.iterate === "batched")));
379
392
  }
380
- function at(t) {
393
+ function ft(t) {
381
394
  return t.outputColumns ?? (t.outputColumnName ? [t.outputColumnName] : []);
382
395
  }
383
- async function nt(t, e, r) {
384
- const a = D(t);
385
- if (a?.mode !== "all") return r(I(t, e));
386
- const s = R(e, t.dataRef);
396
+ async function ct(t, e, r) {
397
+ const o = x(t);
398
+ if (o?.mode !== "all") return r(T(t, e));
399
+ const s = A(e, t.dataRef);
387
400
  if (!s) throw new Error(`compute: table "${t.dataRef}" is not loaded`);
388
- const o = at(t), n = structuredClone(s);
401
+ const a = ft(t), n = structuredClone(s);
389
402
  for (const i of n.features) {
390
- const f = i.properties ??= {}, c = f.compute ??= {};
391
- for (const u of o) c[u] = 0;
403
+ const l = i.properties ??= {}, c = l.compute ??= {};
404
+ for (const f of a) c[f] = 0;
392
405
  }
393
- const l = R(e, a.layer)?.features?.length ?? 0;
394
- for (let i = 0; i < l; i++) {
395
- const f = await r({ ...I(t, e, i), collection: n });
396
- n.features.forEach((c, u) => {
397
- const p = c.properties?.compute, m = f.features[u]?.properties?.compute;
406
+ const u = A(e, o.layer)?.features?.length ?? 0;
407
+ for (let i = 0; i < u; i++) {
408
+ const l = await r({ ...T(t, e, i), collection: n });
409
+ n.features.forEach((c, f) => {
410
+ const p = c.properties?.compute, m = l.features[f]?.properties?.compute;
398
411
  if (!(!p || !m))
399
- for (const h of o) {
400
- const d = Number(m[h]);
401
- Number.isFinite(d) && (p[h] += d);
412
+ for (const d of a) {
413
+ const y = Number(m[d]);
414
+ Number.isFinite(y) && (p[d] += y);
402
415
  }
403
416
  });
404
417
  }
405
418
  return n;
406
419
  }
407
- function it(t) {
420
+ function pt(t) {
408
421
  return {
409
422
  async resolveCompute(e, r) {
410
423
  if (e) {
411
- const a = {};
412
- for (const n of et(r)) {
413
- const l = t?.get(n);
414
- if (l) a[n] = l;
415
- else if (n === r.dataRef) a[n] = await e.getLayer(n);
424
+ const o = {};
425
+ for (const n of it(r)) {
426
+ const u = t?.get(n);
427
+ if (u) o[n] = u;
428
+ else if (n === r.dataRef) o[n] = await e.getLayer(n);
416
429
  else
417
430
  try {
418
- a[n] = await e.getLayer(n);
431
+ o[n] = await e.getLayer(n);
419
432
  } catch {
420
- a[n] = void 0;
433
+ o[n] = void 0;
421
434
  }
422
435
  }
423
- const s = new $(), o = await nt(r, a, (n) => s.gpgpuPipeline(n));
424
- return t && t.set(r.dataRef, o), e;
436
+ const s = new V(), a = await ct(r, o, (n) => s.gpgpuPipeline(n));
437
+ return t && t.set(r.dataRef, a), e;
425
438
  }
426
439
  }
427
440
  };
428
441
  }
429
- class st {
442
+ class mt {
430
443
  _listeners = /* @__PURE__ */ new Map();
431
444
  on(e, r) {
432
445
  this._listeners.has(e) || this._listeners.set(e, /* @__PURE__ */ new Set());
433
- const a = this._listeners.get(e);
434
- return a.add(r), () => a.delete(r);
446
+ const o = this._listeners.get(e);
447
+ return o.add(r), () => o.delete(r);
435
448
  }
436
449
  /** @internal */
437
450
  emit(e, r) {
438
- this._listeners.get(e)?.forEach((a) => a(r));
451
+ this._listeners.get(e)?.forEach((o) => o(r));
439
452
  }
440
453
  }
441
- class mt {
454
+ class Et {
442
455
  dataAdapter;
443
456
  mapAdapter;
444
457
  plotAdapter;
@@ -447,13 +460,14 @@ class mt {
447
460
  _computeCache = /* @__PURE__ */ new Map();
448
461
  _data = {};
449
462
  _mapRegistry = /* @__PURE__ */ new Map();
463
+ _maps = [];
450
464
  _plotRegistry = /* @__PURE__ */ new Map();
451
465
  _fwdCleanups = [];
452
466
  _plotMapLinks = /* @__PURE__ */ new Map();
453
- interactions = new st();
467
+ interactions = new mt();
454
468
  constructor(e) {
455
469
  const r = /* @__PURE__ */ new Map();
456
- this.dataAdapter = W(e, r), this.mapAdapter = q(e, this._mapRegistry, this._computeCache), this.plotAdapter = Z(e, this._mapRegistry, this._plotRegistry, this._plotMapLinks, r), this.computeAdapter = it(this._computeCache);
470
+ this.dataAdapter = K(e, r), this.mapAdapter = tt(e, this._mapRegistry, this._computeCache, this._maps), this.plotAdapter = rt(e, this._mapRegistry, this._plotRegistry, this._plotMapLinks, r), this.computeAdapter = pt(this._computeCache);
457
471
  }
458
472
  /**
459
473
  * The coordinate reference system used internally by the autk workspace.
@@ -464,11 +478,22 @@ class mt {
464
478
  * instead of hard-coding a CRS string.
465
479
  */
466
480
  get workspaceCrs() {
467
- return F;
481
+ return O;
468
482
  }
469
483
  get data() {
470
484
  return this._data;
471
485
  }
486
+ /**
487
+ * The maps the last {@link run} drew, one per `map` entry of the spec, in order.
488
+ *
489
+ * Each map draws on demand: one frame once its layers are loaded, then one each
490
+ * time it changes. Between frames a map canvas can read back empty, so to read a
491
+ * map's pixels (for example with `canvas.toDataURL()`), call its `requestRender()`
492
+ * and read in a `requestAnimationFrame` callback registered after that call.
493
+ */
494
+ get maps() {
495
+ return this._maps;
496
+ }
472
497
  async run(e) {
473
498
  if (!this.dataAdapter)
474
499
  throw new Error("Database adapter not initialized. Please call the constructor first.");
@@ -478,7 +503,7 @@ class mt {
478
503
  throw new Error("Plot adapter not initialized. Please call the constructor first.");
479
504
  if (!this.computeAdapter)
480
505
  throw new Error("Compute adapter not initialized. Please call the constructor first.");
481
- this._mapRegistry.clear(), this._plotRegistry.clear(), this._plotMapLinks.clear(), this._computeCache.clear(), this.grammarEngine = H({
506
+ this._mapRegistry.clear(), this._maps.length = 0, this._plotRegistry.clear(), this._plotMapLinks.clear(), this._computeCache.clear(), this.grammarEngine = k({
482
507
  spec: e,
483
508
  adapters: {
484
509
  db: this.dataAdapter,
@@ -492,17 +517,17 @@ class mt {
492
517
  console.warn("Grammar engine produced no data context."), this._data = {};
493
518
  return;
494
519
  }
495
- const a = {};
520
+ const o = {};
496
521
  for (const s of r.getLayersMetadata())
497
- Object.defineProperty(a, s.name, {
522
+ Object.defineProperty(o, s.name, {
498
523
  get: () => {
499
- const o = this._computeCache.get(s.name);
500
- return o ? Promise.resolve(o) : r.getLayer(s.name);
524
+ const a = this._computeCache.get(s.name);
525
+ return a ? Promise.resolve(a) : r.getLayer(s.name);
501
526
  },
502
527
  enumerable: !0,
503
528
  configurable: !0
504
529
  });
505
- this._data = a;
530
+ this._data = o;
506
531
  }
507
532
  /**
508
533
  * Highlights features on the map layer identified by `layerId`.
@@ -510,8 +535,8 @@ class mt {
510
535
  */
511
536
  highlightOnMap(e, r) {
512
537
  this._mapRegistry.get(e)?.setHighlightedIds(e, r);
513
- for (const [a, s] of this._plotMapLinks)
514
- s === e && this._plotRegistry.get(a)?.setSelection(r);
538
+ for (const [o, s] of this._plotMapLinks)
539
+ s === e && this._plotRegistry.get(o)?.setSelection(r);
515
540
  }
516
541
  /**
517
542
  * Clears highlighted features on the map layer identified by `layerId`.
@@ -519,8 +544,8 @@ class mt {
519
544
  */
520
545
  clearHighlightOnMap(e) {
521
546
  this._mapRegistry.get(e)?.clearHighlightedIds(e);
522
- for (const [r, a] of this._plotMapLinks)
523
- a === e && this._plotRegistry.get(r)?.setSelection([]);
547
+ for (const [r, o] of this._plotMapLinks)
548
+ o === e && this._plotRegistry.get(r)?.setSelection([]);
524
549
  }
525
550
  /**
526
551
  * Clears the selection on the plot identified by `plotId` (its dataRef).
@@ -537,49 +562,50 @@ class mt {
537
562
  */
538
563
  setPlotSelection(e, r) {
539
564
  this._plotRegistry.get(e)?.setSelection(r);
540
- const a = this._plotMapLinks.get(e);
541
- a && this._mapRegistry.get(a)?.setHighlightedIds(a, r);
565
+ const o = this._plotMapLinks.get(e);
566
+ o && this._mapRegistry.get(o)?.setHighlightedIds(o, r);
542
567
  }
543
568
  _rewireInteractions() {
544
569
  for (const r of this._fwdCleanups) r();
545
570
  this._fwdCleanups = [];
546
571
  const e = /* @__PURE__ */ new Set();
547
- for (const [r, a] of this._mapRegistry) {
548
- if (e.has(a)) continue;
549
- e.add(a);
550
- const s = ({ selection: o }) => {
551
- this.interactions.emit("map:picking", { layerId: r, selection: o });
572
+ for (const [r, o] of this._mapRegistry) {
573
+ if (e.has(o)) continue;
574
+ e.add(o);
575
+ const s = ({ selection: a }) => {
576
+ this.interactions.emit("map:picking", { layerId: r, selection: a });
552
577
  };
553
- a.events.on(P.PICKING, s), this._fwdCleanups.push(() => a.events.off(P.PICKING, s));
578
+ o.events.on(L.PICKING, s), this._fwdCleanups.push(() => o.events.off(L.PICKING, s));
554
579
  }
555
- for (const [r, a] of this._plotRegistry)
556
- for (const s of [A.CLICK, A.BRUSH, A.BRUSH_X, A.BRUSH_Y]) {
557
- const o = ({ selection: n }) => {
580
+ for (const [r, o] of this._plotRegistry)
581
+ for (const s of [w.CLICK, w.BRUSH, w.BRUSH_X, w.BRUSH_Y]) {
582
+ const a = ({ selection: n }) => {
558
583
  this.interactions.emit("plot:selection", {
559
584
  plotId: r,
560
585
  event: s,
561
586
  selection: n
562
587
  });
563
588
  };
564
- a.events.on(s, o), this._fwdCleanups.push(() => a.events.off(s, o));
589
+ o.events.on(s, a), this._fwdCleanups.push(() => o.events.off(s, a));
565
590
  }
566
591
  }
567
592
  }
568
593
  export {
569
- mt as AutkGrammar,
570
- Y as ColorMapInterpolator,
571
- st as GrammarEventEmitter,
572
- M as MAX_BATCHED_FEATURES,
573
- O as NormalizationMode,
574
- ot as buildBatchedUniforms,
575
- et as computeLayerNames,
576
- H as createEngine,
577
- D as findIterateSource,
578
- _ as isFromFeature,
579
- tt as joinWgsl,
580
- I as resolveComputeParams,
581
- T as resolveUniformMatrices,
594
+ Et as AutkGrammar,
595
+ W as ColorMapInterpolator,
596
+ mt as GrammarEventEmitter,
597
+ G as NormalizationMode,
598
+ D as STORAGE_BUFFER_BINDING_SIZE,
599
+ ut as buildBatchedUniforms,
600
+ it as computeLayerNames,
601
+ k as createEngine,
602
+ x as findIterateSource,
603
+ E as isFromFeature,
604
+ nt as joinWgsl,
605
+ lt as maxBatchedFeatures,
606
+ T as resolveComputeParams,
607
+ I as resolveUniformMatrices,
582
608
  N as resolveUniforms,
583
- nt as runCompute
609
+ ct as runCompute
584
610
  };
585
611
  //# sourceMappingURL=autk-grammar.js.map