@nika-js/onlymap 0.8.3 → 0.9.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE.md +2 -0
  3. package/README.md +40 -2
  4. package/dist/{LercDecode.es-DW-G7u1_.js → LercDecode.es-BMcxSLhD.js} +1 -1
  5. package/dist/{basemap-C6mTd_uL.js → basemap-m98j2wxG.js} +780 -780
  6. package/dist/cartograph/elements/om-cartograph.d.ts +6 -0
  7. package/dist/cartograph.js +429 -416
  8. package/dist/cartograph.standalone.js +1235 -1222
  9. package/dist/elements/om-map.d.ts +21 -0
  10. package/dist/{geoparquet-CMESy27r.js → geoparquet-XOwOmChh.js} +1 -1
  11. package/dist/html-data.d.ts +1 -1
  12. package/dist/{index-CgpoaR-U.js → index-BMbpftvm.js} +1 -1
  13. package/dist/{index-DgHzTg2n.js → index-BSAY6CWm.js} +12159 -11695
  14. package/dist/index-CfPbQUqO.js +511 -0
  15. package/dist/{index-CrMM0kHK.js → index-DDNElBTs.js} +106 -106
  16. package/dist/{index-FEPpi86V.js → index-DzOvV-O7.js} +25 -25
  17. package/dist/{index-BfL5W1Ay.js → index-HZWdgtm4.js} +36 -36
  18. package/dist/index.d.ts +8 -3
  19. package/dist/{lerc-BQFrOj7h.js → lerc-qK-nhCaB.js} +2 -2
  20. package/dist/license.d.ts +46 -1
  21. package/dist/onlymap.standalone.js +26793 -25831
  22. package/dist/onlymapjs.js +97 -92
  23. package/dist/post-process/catalogue.d.ts +61 -0
  24. package/dist/post-process/compile.d.ts +37 -0
  25. package/dist/post-process/index.d.ts +71 -0
  26. package/dist/post-process/ops.d.ts +22 -0
  27. package/dist/post-process/presets.d.ts +33 -0
  28. package/dist/post-process/validate.d.ts +8 -0
  29. package/dist/programmatic.d.ts +11 -0
  30. package/dist/{raster-6vW4_NSI.js → raster-Dg5p_99H.js} +3 -3
  31. package/dist/{raster-pipeline-CYiGgsil.js → raster-pipeline-DhjkqDYd.js} +1 -1
  32. package/dist/runtime-core.d.ts +39 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/{zarr-BNQZpB1t.js → zarr-D3CzK1Zm.js} +2 -2
  35. package/docs/cartograph.md +10 -2
  36. package/docs/effects.md +197 -0
  37. package/llms.txt +3 -2
  38. package/onlymapjs.html-data.json +171 -0
  39. package/package.json +3 -3
  40. package/skills/onlymapjs/SKILL.md +3 -2
  41. package/skills/onlymapjs/references/syntax.md +10 -3
@@ -1,9 +1,9 @@
1
- import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-DgHzTg2n.js";
2
- import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-DgHzTg2n.js";
1
+ import { y as R, A as S, B as E, F as N, H as h, I as w, J as W, K as O, N as I, Q as x, R as B, S as _, T as P, U as k, X as $, Y as z, Z as C, _ as F, $ as v, a0 as U, a1 as p, a2 as M } from "./index-BSAY6CWm.js";
2
+ import { a3 as $e, a4 as ze, a5 as Ce, a6 as ve, a7 as Ue, a8 as Me, a9 as je, aa as De, ab as Je, ac as qe, ad as He, ae as Ve, af as Ge, ag as Ke, ah as Qe, ai as Xe, aj as Ye, ak as Ze, al as et, am as tt, an as nt, ao as rt, ap as at, aq as st, ar as ot } from "./index-BSAY6CWm.js";
3
3
  import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
4
4
  async function J(t, e, n = {}, r = {}) {
5
- const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
6
- o || (c.url = R(t, n));
5
+ const a = R(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
6
+ o || (c.url = E(t, n));
7
7
  const i = s.getWorkerPool(c), u = n.jobName || t.name, d = await i.startJob(
8
8
  u,
9
9
  // eslint-disable-next-line
@@ -158,10 +158,10 @@ async function Q(t) {
158
158
  }
159
159
  function Se(t, e, n, r) {
160
160
  !Array.isArray(e) && !w(e) && (r = void 0, n = e, e = void 0), n = n || {};
161
- const s = O(e, r), o = W(t, s, n);
161
+ const s = W(e, r), o = O(t, s, n);
162
162
  if (!o)
163
163
  return null;
164
- const c = x(n, o, s), i = I(t), u = () => {
164
+ const c = I(n, o, s), i = x(t), u = () => {
165
165
  throw new Error("parseSync called parse (which is async");
166
166
  };
167
167
  return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), X(o, t, c, r);
@@ -179,10 +179,10 @@ function Y(t) {
179
179
  async function l(t, e, n, r) {
180
180
  const a = Array.isArray(e) ? e : void 0;
181
181
  !Array.isArray(e) && !w(e) && (r = void 0, n = e, e = void 0), t = await t, n = n || {};
182
- const s = I(t), o = await P(t, e, n);
182
+ const s = x(t), o = await P(t, e, n);
183
183
  if (!o)
184
184
  return [];
185
- const c = x(n, o, a, s);
185
+ const c = I(n, o, a, s);
186
186
  return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await Z(o, t, c, r);
187
187
  }
188
188
  async function Z(t, e, n, r) {
@@ -234,10 +234,10 @@ async function re(t, e = []) {
234
234
  n = r(n);
235
235
  return n;
236
236
  }
237
- function xe(t, e, n, r) {
237
+ function Ie(t, e, n, r) {
238
238
  let a;
239
239
  !Array.isArray(e) && !w(e) ? (n = e, a = void 0) : a = e;
240
- const s = v(n || {});
240
+ const s = C(n || {});
241
241
  return Array.isArray(t) ? t.map((c) => T(c, a, n || {}, s)) : T(t, a, n || {}, s);
242
242
  }
243
243
  async function T(t, e, n, r) {
@@ -258,11 +258,11 @@ async function ae(t, e, n) {
258
258
  const r = se(t, e, n), a = [];
259
259
  for await (const s of r)
260
260
  a.push(s);
261
- return C(...a);
261
+ return v(...a);
262
262
  }
263
263
  throw new Error("Writer could not encode data");
264
264
  }
265
- async function Ie(t, e, n) {
265
+ async function xe(t, e, n) {
266
266
  if (e.text && e.encodeText)
267
267
  return await e.encodeText(t, n);
268
268
  if (e.text) {
@@ -357,7 +357,7 @@ function le(t, e) {
357
357
  return n;
358
358
  return null;
359
359
  }
360
- function Ee(t, e) {
360
+ function Re(t, e) {
361
361
  if (globalThis.loaders.makeNodeStream)
362
362
  return globalThis.loaders.makeNodeStream(t, e);
363
363
  const n = t[Symbol.asyncIterator] ? t[Symbol.asyncIterator]() : t[Symbol.iterator]();
@@ -388,7 +388,7 @@ function Ee(t, e) {
388
388
  }
389
389
  );
390
390
  }
391
- const L = "4.4.3", Re = {
391
+ const L = "4.4.3", Ee = {
392
392
  dataType: null,
393
393
  batchType: null,
394
394
  name: "Null loader",
@@ -425,7 +425,7 @@ const L = "4.4.3", Re = {
425
425
  function m(t, e, n) {
426
426
  return null;
427
427
  }
428
- async function Oe(t, e, n = () => {
428
+ async function We(t, e, n = () => {
429
429
  }, r = () => {
430
430
  }) {
431
431
  if (t = await t, !t.ok)
@@ -458,7 +458,7 @@ async function A(t, e, n, r, a, s, o) {
458
458
  t.error(c), o(c);
459
459
  }
460
460
  }
461
- class We {
461
+ class Oe {
462
462
  _fetch;
463
463
  files = {};
464
464
  lowerCaseFiles = {};
@@ -537,13 +537,13 @@ export {
537
537
  $e as FetchError,
538
538
  Te as JSONLoader,
539
539
  Ne as NullLoader,
540
- Re as NullWorkerLoader,
540
+ Ee as NullWorkerLoader,
541
541
  ze as RequestScheduler,
542
- We as _BrowserFileSystem,
543
- Oe as _fetchProgress,
542
+ Oe as _BrowserFileSystem,
543
+ We as _fetchProgress,
544
544
  Ae as _selectSource,
545
- ve as _unregisterLoaders,
546
- Ce as assert,
545
+ Ce as _unregisterLoaders,
546
+ ve as assert,
547
547
  z as concatenateArrayBuffersAsync,
548
548
  Ue as createDataSource,
549
549
  Me as document,
@@ -551,7 +551,7 @@ export {
551
551
  Le as encodeInBatches,
552
552
  ce as encodeSync,
553
553
  ae as encodeTable,
554
- Ie as encodeTableAsText,
554
+ xe as encodeTableAsText,
555
555
  se as encodeTableInBatches,
556
556
  ke as encodeText,
557
557
  Fe as encodeTextSync,
@@ -572,11 +572,11 @@ export {
572
572
  Ye as isWorker,
573
573
  Ze as isWritableStream,
574
574
  et as load,
575
- xe as loadInBatches,
575
+ Ie as loadInBatches,
576
576
  tt as makeIterator,
577
577
  pe as makeLineIterator,
578
578
  ge as makeNumberedLineIterator,
579
- Ee as makeStream,
579
+ Re as makeStream,
580
580
  me as makeTextDecoderIterator,
581
581
  we as makeTextEncoderIterator,
582
582
  k as parse,
@@ -586,7 +586,7 @@ export {
586
586
  nt as registerLoaders,
587
587
  p as resolvePath,
588
588
  P as selectLoader,
589
- W as selectLoaderSync,
589
+ O as selectLoaderSync,
590
590
  rt as self,
591
591
  at as setLoaderOptions,
592
592
  st as setPathPrefix,
@@ -1,22 +1,22 @@
1
- import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-DgHzTg2n.js";
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";
1
+ import { au as Be, av as le, aw as ce, ax as De, ay as Oe, az as ke } from "./index-BSAY6CWm.js";
2
+ import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as xe, n as je, 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";
5
5
  function de(t) {
6
6
  switch (t.shape) {
7
7
  case "array-row-table":
8
8
  case "object-row-table":
9
- return Pe(t.data);
9
+ return He(t.data);
10
10
  case "geojson-table":
11
- return ze(t.features);
11
+ return Pe(t.features);
12
12
  case "columnar-table":
13
- return He(t.data);
13
+ return ze(t.data);
14
14
  case "arrow-table":
15
15
  default:
16
16
  throw new Error("Deduce schema");
17
17
  }
18
18
  }
19
- function He(t) {
19
+ function ze(t) {
20
20
  const e = [];
21
21
  for (const [r, s] of Object.entries(t)) {
22
22
  const n = Qe(s, r);
@@ -24,7 +24,7 @@ function He(t) {
24
24
  }
25
25
  return { fields: e, metadata: {} };
26
26
  }
27
- function Pe(t) {
27
+ function He(t) {
28
28
  if (!t.length)
29
29
  throw new Error("deduce from empty table");
30
30
  const e = [], r = t[0];
@@ -32,7 +32,7 @@ function Pe(t) {
32
32
  e.push(me(n, s));
33
33
  return { fields: e, metadata: {} };
34
34
  }
35
- function ze(t) {
35
+ function Pe(t) {
36
36
  if (!t.length)
37
37
  throw new Error("deduce from empty table");
38
38
  const e = [], r = t[0].properties || {};
@@ -412,7 +412,7 @@ function ot(t) {
412
412
  for (const r in t) {
413
413
  const s = t[r];
414
414
  if (s.type === Float32Array) {
415
- const n = /* @__PURE__ */ new Map(), a = new je(s.name, new xe(), s.nullable, n);
415
+ const n = /* @__PURE__ */ new Map(), a = new xe(s.name, new je(), s.nullable, n);
416
416
  e.push(a);
417
417
  }
418
418
  }
@@ -620,7 +620,7 @@ let ye = class {
620
620
  }
621
621
  // eslint-disable-next-line complexity, max-statements
622
622
  parseChunk(e, r) {
623
- if (this.isFirstChunk && j(this._config.beforeFirstChunk)) {
623
+ if (this.isFirstChunk && x(this._config.beforeFirstChunk)) {
624
624
  const h = this._config.beforeFirstChunk(e);
625
625
  h !== void 0 && (e = h);
626
626
  }
@@ -633,15 +633,15 @@ let ye = class {
633
633
  const a = n.meta.cursor;
634
634
  this._finished || (this._partialLine = s.substring(a - this._baseIndex), this._baseIndex = a), n && n.data && (this._rowCount += n.data.length);
635
635
  const c = this._finished || this._config.preview && this._rowCount >= this._config.preview;
636
- if (j(this._config.chunk) && !r) {
636
+ if (x(this._config.chunk) && !r) {
637
637
  if (this._config.chunk(n, this._handle), this._handle.paused() || this._handle.aborted())
638
638
  return;
639
639
  n = void 0, this._completeResults = void 0;
640
640
  }
641
- return !this._config.step && !this._config.chunk && (this._completeResults.data = this._completeResults.data.concat(n.data), this._completeResults.errors = this._completeResults.errors.concat(n.errors), this._completeResults.meta = n.meta), !this._completed && c && j(this._config.complete) && (!n || !n.meta.aborted) && (this._config.complete(this._completeResults, this._input), this._completed = !0), n;
641
+ return !this._config.step && !this._config.chunk && (this._completeResults.data = this._completeResults.data.concat(n.data), this._completeResults.errors = this._completeResults.errors.concat(n.errors), this._completeResults.meta = n.meta), !this._completed && c && x(this._config.complete) && (!n || !n.meta.aborted) && (this._config.complete(this._completeResults, this._input), this._completed = !0), n;
642
642
  }
643
643
  _sendError(e) {
644
- j(this._config.error) && this._config.error(e);
644
+ x(this._config.error) && this._config.error(e);
645
645
  }
646
646
  };
647
647
  class dt extends ye {
@@ -685,7 +685,7 @@ class be {
685
685
  meta: {}
686
686
  };
687
687
  constructor(e) {
688
- if (j(e.step)) {
688
+ if (x(e.step)) {
689
689
  const r = e.step;
690
690
  e.step = (s) => {
691
691
  if (this._results = s, this.needsHeaderRow())
@@ -707,7 +707,7 @@ class be {
707
707
  parse(e, r, s) {
708
708
  const n = this._config.quoteChar || '"';
709
709
  if (this._config.newline || (this._config.newline = gt(e, n)), this._delimiterError = !1, this._config.delimiter)
710
- j(this._config.delimiter) && (this._config.delimiter = this._config.delimiter(e), this._results.meta.delimiter = this._config.delimiter);
710
+ x(this._config.delimiter) && (this._config.delimiter = this._config.delimiter(e), this._results.meta.delimiter = this._config.delimiter);
711
711
  else {
712
712
  const c = this.guessDelimiter(e, this._config.newline, this._config.skipEmptyLines, this._config.comments, this._config.delimitersToGuess);
713
713
  c.successful ? this._config.delimiter = c.bestDelimiter : (this._delimiterError = !0, this._config.delimiter = F.DefaultDelimiter), this._results.meta.delimiter = this._config.delimiter;
@@ -728,7 +728,7 @@ class be {
728
728
  return this._aborted;
729
729
  }
730
730
  abort() {
731
- this._aborted = !0, this._parser.abort(), this._results.meta.aborted = !0, j(this._config.complete) && this._config.complete(this._results), this._input = "";
731
+ this._aborted = !0, this._parser.abort(), this._results.meta.aborted = !0, x(this._config.complete) && this._config.complete(this._results), this._input = "";
732
732
  }
733
733
  testEmptyLine(e) {
734
734
  return this._config.skipEmptyLines === "greedy" ? e.join("").trim() === "" : e.length === 1 && e[0].length === 0;
@@ -746,7 +746,7 @@ class be {
746
746
  if (!this._results)
747
747
  return;
748
748
  const e = (r) => {
749
- j(this._config.transformHeader) && (r = this._config.transformHeader(r)), this._fields.push(r);
749
+ x(this._config.transformHeader) && (r = this._config.transformHeader(r)), this._fields.push(r);
750
750
  };
751
751
  if (Array.isArray(this._results.data[0])) {
752
752
  for (let r = 0; this.needsHeaderRow() && r < this._results.data.length; r++)
@@ -852,7 +852,7 @@ function W(t = {}) {
852
852
  this.parse = function(i, d, g) {
853
853
  if (typeof i != "string")
854
854
  throw new Error("Input must be a string");
855
- const w = i.length, l = e.length, m = r.length, C = s.length, T = j(n);
855
+ const w = i.length, l = e.length, m = r.length, C = s.length, T = x(n);
856
856
  o = 0;
857
857
  let y = [], v = [], p = [], k = 0;
858
858
  if (!i)
@@ -867,10 +867,10 @@ function W(t = {}) {
867
867
  return S();
868
868
  if (!(s && O.substr(0, C) === s)) {
869
869
  if (T) {
870
- if (y = [], x(O.split(e)), I(), u)
870
+ if (y = [], j(O.split(e)), I(), u)
871
871
  return S();
872
872
  } else
873
- x(O.split(e));
873
+ j(O.split(e));
874
874
  if (a && D >= a)
875
875
  return y = y.slice(0, a), S(!0);
876
876
  }
@@ -891,10 +891,10 @@ function W(t = {}) {
891
891
  row: y.length,
892
892
  // row has yet to be inserted
893
893
  index: o
894
- }), H();
894
+ }), z();
895
895
  if (b === w - 1) {
896
896
  const Ee = i.substring(o, b).replace(B, h);
897
- return H(Ee);
897
+ return z(Ee);
898
898
  }
899
899
  if (h === f && i[b + 1] === f) {
900
900
  b++;
@@ -952,8 +952,8 @@ function W(t = {}) {
952
952
  }
953
953
  break;
954
954
  }
955
- return H();
956
- function x(R) {
955
+ return z();
956
+ function j(R) {
957
957
  y.push(R), k = o;
958
958
  }
959
959
  function K(R) {
@@ -964,11 +964,11 @@ function W(t = {}) {
964
964
  }
965
965
  return D;
966
966
  }
967
- function H(R) {
968
- return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w, x(p), T && I()), S();
967
+ function z(R) {
968
+ return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w, j(p), T && I()), S();
969
969
  }
970
970
  function Y(R) {
971
- o = R, x(p), p = [], _ = i.indexOf(r, o);
971
+ o = R, j(p), p = [], _ = i.indexOf(r, o);
972
972
  }
973
973
  function S(R, D) {
974
974
  return {
@@ -1000,7 +1000,7 @@ function _e(t) {
1000
1000
  e[r] = _e(t[r]);
1001
1001
  return e;
1002
1002
  }
1003
- function j(t) {
1003
+ function x(t) {
1004
1004
  return typeof t == "function";
1005
1005
  }
1006
1006
  function wt(t, e = {}) {
@@ -1044,8 +1044,8 @@ function wt(t, e = {}) {
1044
1044
  if (C && !y && (A = C === "greedy" ? m[p].join("").trim() === "" : m[p].length === 1 && m[p][0].length === 0), C === "greedy" && y) {
1045
1045
  const B = [];
1046
1046
  for (let b = 0; b < k; b++) {
1047
- const x = v ? l[b] : b;
1048
- B.push(m[p][x]);
1047
+ const j = v ? l[b] : b;
1048
+ B.push(m[p][j]);
1049
1049
  }
1050
1050
  A = B.join("").trim() === "";
1051
1051
  }
@@ -1294,7 +1294,7 @@ function Rt(t, e) {
1294
1294
  }
1295
1295
  };
1296
1296
  }
1297
- var ne = {}, P = {}, z = 34, N = 10, Q = 13;
1297
+ var ne = {}, H = {}, P = 34, N = 10, Q = 13;
1298
1298
  function Se(t) {
1299
1299
  return new Function("d", "return {" + t.map(function(e, r) {
1300
1300
  return JSON.stringify(e) + ": d[" + r + '] || ""';
@@ -1338,11 +1338,11 @@ function Dt(t) {
1338
1338
  var g = [], w = i.length, l = 0, m = 0, C, T = w <= 0, y = !1;
1339
1339
  i.charCodeAt(w - 1) === N && --w, i.charCodeAt(w - 1) === Q && --w;
1340
1340
  function v() {
1341
- if (T) return P;
1341
+ if (T) return H;
1342
1342
  if (y) return y = !1, ne;
1343
1343
  var k, A = l, _;
1344
- if (i.charCodeAt(A) === z) {
1345
- for (; l++ < w && i.charCodeAt(l) !== z || i.charCodeAt(++l) === z; ) ;
1344
+ if (i.charCodeAt(A) === P) {
1345
+ for (; l++ < w && i.charCodeAt(l) !== P || i.charCodeAt(++l) === P; ) ;
1346
1346
  return (k = l) >= w ? T = !0 : (_ = i.charCodeAt(l++)) === N ? y = !0 : _ === Q && (y = !0, i.charCodeAt(l) === N && ++l), i.slice(A + 1, k - 1).replace(/""/g, '"');
1347
1347
  }
1348
1348
  for (; l < w; ) {
@@ -1354,8 +1354,8 @@ function Dt(t) {
1354
1354
  }
1355
1355
  return T = !0, i.slice(A, w);
1356
1356
  }
1357
- for (; (C = v()) !== P; ) {
1358
- for (var p = []; C !== ne && C !== P; ) p.push(C), C = v();
1357
+ for (; (C = v()) !== H; ) {
1358
+ for (var p = []; C !== ne && C !== H; ) p.push(C), C = v();
1359
1359
  d && (p = d(p, m++)) == null || g.push(p);
1360
1360
  }
1361
1361
  return g;
package/dist/index.d.ts CHANGED
@@ -34,7 +34,8 @@ import { registerBasemap, configureBasemap } from "./basemap-registry";
34
34
  import { registerTerrain } from "./terrain";
35
35
  import { registerRoutingProvider } from "./providers";
36
36
  import { configureTelemetry } from "./telemetry";
37
- import { configureLicense } from "./license";
37
+ import { configureLicense, setKeepBadge, badgeMode } from "./license";
38
+ import { expandPreset } from "./post-process/presets";
38
39
  import { validateManifestString } from "./validation";
39
40
  import { snapshotIR } from "./ir-snapshot";
40
41
  import { snapshotDescriptorIR } from "./programmatic";
@@ -70,8 +71,9 @@ export declare function configureIfc(options: {
70
71
  wasmPath?: string;
71
72
  }): Promise<void>;
72
73
  export type { TelemetryConfig, TelemetrySnapshot } from "./telemetry";
73
- export { configureLicense, getEntitlements, subscribeLicense } from "./license";
74
- export type { Entitlements, LicenseIdentity } from "./license";
74
+ export { configureLicense, getEntitlements, subscribeLicense, setKeepBadge, badgeMode } from "./license";
75
+ export { expandPreset, isEffectPreset, EFFECT_PRESET_NAMES } from "./post-process/presets";
76
+ export type { Entitlements, LicenseIdentity, BadgeMode } from "./license";
75
77
  export type { RuntimeContext } from "./ctx";
76
78
  export { MapController, descriptorToIR, snapshotDescriptorIR } from "./programmatic";
77
79
  export type { LayerDescriptor, MapControllerOptions, CameraState, OverlayPositioner, PickListener } from "./programmatic";
@@ -135,6 +137,9 @@ export declare const OmMap: {
135
137
  configureData: typeof configureData;
136
138
  configureTelemetry: typeof configureTelemetry;
137
139
  configureLicense: typeof configureLicense;
140
+ setKeepBadge: typeof setKeepBadge;
141
+ badgeMode: typeof badgeMode;
142
+ expandPreset: typeof expandPreset;
138
143
  validate: typeof validateManifestString;
139
144
  snapshotIR: typeof snapshotIR;
140
145
  snapshotDescriptorIR: typeof snapshotDescriptorIR;
@@ -1,4 +1,4 @@
1
- import { C as a, D as s } from "./raster-6vW4_NSI.js";
1
+ import { C as a, D as s } from "./raster-Dg5p_99H.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-DW-G7u1_.js");
11
+ const e = await import("./LercDecode.es-BMcxSLhD.js");
12
12
  return l || (await e.load(), l = !0), e;
13
13
  }
14
14
  async function i(e, r) {
package/dist/license.d.ts CHANGED
@@ -40,7 +40,11 @@
40
40
  * commercial distribution (hosted OR packaged) requires a key regardless
41
41
  * of whether gates fired. The badge stays on in every context (it is the
42
42
  * attribution obligation, not a cap). App-identity keys for packaged apps
43
- * are the onlymap-native roadmap's `apps` claim.
43
+ * are the onlymap-native roadmap's `apps` claim. REVISED 2026-09-21: badge
44
+ * removal is an entitlement a paid plan GRANTS, not one it imposes —
45
+ * `setKeepBadge` / `keep-badge` lets a paid deployment keep crediting
46
+ * OnlyMap, rendering the credit WITHOUT the free-tier license sentence
47
+ * (see `badgeMode`). It is an author choice, never part of `Entitlements`.
44
48
  *
45
49
  * Failure semantics: invalid/expired/mismatched keys → free tier + one
46
50
  * console warning — never a broken map. While a key verifies (WebCrypto
@@ -80,6 +84,47 @@ export declare function setHostedContextForTests(hosted: boolean | null): void;
80
84
  export declare function getEntitlements(): Readonly<Entitlements>;
81
85
  /** True while a key is being verified — gates fail open so a paid page never flashes violations. */
82
86
  export declare function licenseSettled(): boolean;
87
+ /**
88
+ * How the attribution badge should render — the ONE predicate every badge
89
+ * surface reads (the map badge, the cartograph's foot credit), so they can
90
+ * never disagree about the same license.
91
+ *
92
+ * - `pending` — a key is still verifying. Deliberately its OWN state and
93
+ * not folded into `hidden`: the two surfaces want opposite
94
+ * things here, and that is a rendering policy rather than a
95
+ * license fact. The map badge shows nothing (no unlock
96
+ * flash on a paid page); the cartograph shows the credit
97
+ * (no flash-of-nothing on a free sheet). Folding it in is
98
+ * what made an earlier cut of this predicate unusable by
99
+ * the second surface — a third one would have forked again.
100
+ * - `hidden` — a paid plan, no opt-in: no badge.
101
+ * - `obligation` — free/dev tier: the badge is a CONDITION of the free
102
+ * non-commercial license (LICENSE.md §3), and says so.
103
+ * - `voluntary` — a paid plan that opted back in. The credit WITHOUT the
104
+ * "free for non-commercial use" sentence, which would be
105
+ * false about that deployment.
106
+ *
107
+ * `opts.keepBadge` is the CALLER's own opt-in (its element's `keep-badge`),
108
+ * OR-ed with the page-wide preference — so a surface can opt in for itself
109
+ * without reaching for a global, and `setKeepBadge` still covers a page that
110
+ * has no markup route.
111
+ */
112
+ export type BadgeMode = "pending" | "hidden" | "obligation" | "voluntary";
113
+ export declare function badgeMode(opts?: {
114
+ keepBadge?: boolean;
115
+ }): BadgeMode;
116
+ /**
117
+ * Keep the badge on a plan that has earned the right to drop it (DECIDED
118
+ * 2026-09-21): badge removal is an entitlement a paid plan GRANTS, not a
119
+ * requirement it imposes, so an author who wants to keep crediting OnlyMap
120
+ * can. Deliberately NOT part of `Entitlements` — that struct describes what
121
+ * the license grants, and this is an author's choice layered on top, so a
122
+ * key's meaning never depends on page markup.
123
+ *
124
+ * No effect on a free plan: there the badge is the obligation, and this
125
+ * cannot turn it off.
126
+ */
127
+ export declare function setKeepBadge(on: boolean): void;
83
128
  /** Notified whenever entitlements settle or change (RuntimeCore re-reconciles; the badge re-evaluates). */
84
129
  export declare function subscribeLicense(fn: () => void): () => void;
85
130
  /** `*` matches anything; `*.acme.com` matches acme.com and every subdomain; otherwise exact. */