@tileflow/core 0.1.0-alpha.31 → 0.1.0-alpha.33

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 (40) hide show
  1. package/README.md +41 -2
  2. package/THIRD_PARTY_NOTICES.md +25 -2
  3. package/dist/browser.d.ts +1008 -16
  4. package/dist/browser.js +6661 -1392
  5. package/dist/build.d.ts +64 -56
  6. package/dist/build.js +702 -253
  7. package/dist/capture-shot-ChPQvPyi.d.ts +291 -0
  8. package/dist/capture.d.ts +1 -1
  9. package/dist/capture.js +230 -0
  10. package/dist/config-reference.json +1710 -1370
  11. package/dist/{icon-composition-BiOTwrvD.d.ts → icon-composition-CSnN2-Xt.d.ts} +169 -33
  12. package/dist/index.d.ts +57 -13
  13. package/dist/index.js +1684 -800
  14. package/dist/{manifest-types-CTT2eLbp.d.ts → manifest-types-E7m23eXL.d.ts} +18 -1
  15. package/dist/manifest.d.ts +2 -2
  16. package/dist/native-profile.d.ts +25 -11
  17. package/dist/native-profile.js +21 -1
  18. package/dist/native.js +1893 -1884
  19. package/dist/runtime.d.ts +1 -1
  20. package/docs/application-tile-reading.md +80 -0
  21. package/docs/authoring-model.md +16 -6
  22. package/docs/buildings-3d.md +168 -0
  23. package/docs/camera-moves-and-tile-cache.md +112 -0
  24. package/docs/capture-scenes.md +5 -1
  25. package/docs/capture-shots.md +173 -0
  26. package/docs/compiled-style-performance.md +4 -1
  27. package/docs/data-is-separate-from-design.md +103 -9
  28. package/docs/depth-markers.md +65 -0
  29. package/docs/dynamic-style-images.md +100 -0
  30. package/docs/native-artifact-profile.md +5 -3
  31. package/docs/public-api-and-browser-subpath.md +3 -3
  32. package/docs/route-drawing.md +191 -0
  33. package/docs/shared-visual-primitives.md +20 -0
  34. package/docs/street-lights.md +80 -0
  35. package/docs/style-states.md +73 -0
  36. package/docs/sun-and-light.md +125 -0
  37. package/docs/theme-transitions-and-blends.md +41 -2
  38. package/docs/themes-and-module-styles.md +7 -0
  39. package/package.json +4 -1
  40. package/dist/capture-scene-D6soWztE.d.ts +0 -161
package/dist/index.js CHANGED
@@ -440,6 +440,315 @@ var init_values = __esm({
440
440
  }
441
441
  });
442
442
 
443
+ // src/theme-blend.ts
444
+ function mixTileflowColours(from, to, t) {
445
+ const a = oklab(from);
446
+ const b = oklab(to);
447
+ if (!a || !b) return void 0;
448
+ return colourFromOklab(a.map((value, channel) => value + (b[channel] - value) * t));
449
+ }
450
+ function oklab(colour) {
451
+ const cached = oklabCache.get(colour);
452
+ if (cached !== void 0) return cached;
453
+ const rgba = parseColour(colour);
454
+ let result = null;
455
+ if (rgba) {
456
+ const [r, g, b] = rgba.slice(0, 3).map((channel) => {
457
+ const value = channel / 255;
458
+ return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
459
+ });
460
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
461
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
462
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
463
+ result = [
464
+ 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
465
+ 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
466
+ 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,
467
+ rgba[3]
468
+ ];
469
+ }
470
+ if (oklabCache.size > 4096) oklabCache.clear();
471
+ oklabCache.set(colour, result);
472
+ return result;
473
+ }
474
+ function colourFromOklab([lightness, a, b, alpha2]) {
475
+ const l = (lightness + 0.3963377774 * a + 0.2158037573 * b) ** 3;
476
+ const m = (lightness - 0.1055613458 * a - 0.0638541728 * b) ** 3;
477
+ const s = (lightness - 0.0894841775 * a - 1.291485548 * b) ** 3;
478
+ const [red, green, blue] = [
479
+ 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
480
+ -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
481
+ -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
482
+ ].map((value) => {
483
+ const clamped = Math.min(1, Math.max(0, value));
484
+ const encoded = clamped <= 31308e-7 ? clamped * 12.92 : 1.055 * clamped ** (1 / 2.4) - 0.055;
485
+ return Math.round(encoded * 255);
486
+ });
487
+ return `rgba(${red}, ${green}, ${blue}, ${Number(alpha2.toFixed(3))})`;
488
+ }
489
+ function tileflowColourChannels(colour) {
490
+ const rgba = parseColour(colour);
491
+ if (!rgba) return null;
492
+ return [
493
+ Math.min(1, Math.max(0, rgba[0] / 255)),
494
+ Math.min(1, Math.max(0, rgba[1] / 255)),
495
+ Math.min(1, Math.max(0, rgba[2] / 255)),
496
+ Math.min(1, Math.max(0, rgba[3]))
497
+ ];
498
+ }
499
+ function parseColour(colour) {
500
+ const text = colour.trim().toLowerCase();
501
+ const hex = /^#([\da-f]{3,8})$/u.exec(text)?.[1];
502
+ if (hex && [3, 4, 6, 8].includes(hex.length)) {
503
+ const full = hex.length <= 4 ? [...hex].map((digit) => digit + digit).join("") : hex;
504
+ const channels = full.match(/../gu).map((pair) => Number.parseInt(pair, 16));
505
+ return [channels[0], channels[1], channels[2], channels.length > 3 ? channels[3] / 255 : 1];
506
+ }
507
+ const functional = /^(rgba?|hsla?)\(([^)]+)\)$/u.exec(text);
508
+ if (!functional) return null;
509
+ const parts = functional[2].split(/[\s,/]+/u).filter(Boolean);
510
+ if (parts.length < 3 || parts.length > 4) return null;
511
+ const alpha2 = parts[3] === void 0 ? 1 : parseUnit(parts[3], 1);
512
+ if (functional[1].startsWith("rgb")) {
513
+ const [r, g, b] = parts.slice(0, 3).map((part) => parseUnit(part, 255));
514
+ if ([r, g, b, alpha2].some((value) => value === null)) return null;
515
+ return [r, g, b, alpha2];
516
+ }
517
+ const hue = Number.parseFloat(parts[0]);
518
+ const saturation = parseUnit(parts[1], 1);
519
+ const light = parseUnit(parts[2], 1);
520
+ if (!Number.isFinite(hue) || saturation === null || light === null || alpha2 === null) return null;
521
+ const chroma = (1 - Math.abs(2 * light - 1)) * saturation;
522
+ const sector = (hue % 360 + 360) % 360 / 60;
523
+ const x = chroma * (1 - Math.abs(sector % 2 - 1));
524
+ const [r1, g1, b1] = sector < 1 ? [chroma, x, 0] : sector < 2 ? [x, chroma, 0] : sector < 3 ? [0, chroma, x] : sector < 4 ? [0, x, chroma] : sector < 5 ? [x, 0, chroma] : [chroma, 0, x];
525
+ const offset = light - chroma / 2;
526
+ return [(r1 + offset) * 255, (g1 + offset) * 255, (b1 + offset) * 255, alpha2];
527
+ }
528
+ function parseUnit(part, scale) {
529
+ const percentage = part.endsWith("%");
530
+ const value = Number.parseFloat(part);
531
+ if (!Number.isFinite(value)) return null;
532
+ return percentage ? value / 100 * scale : value;
533
+ }
534
+ var oklabCache;
535
+ var init_theme_blend = __esm({
536
+ "src/theme-blend.ts"() {
537
+ "use strict";
538
+ oklabCache = /* @__PURE__ */ new Map();
539
+ }
540
+ });
541
+
542
+ // src/sun.ts
543
+ function normalizeTileflowAzimuth(azimuth) {
544
+ const turned = azimuth % 360;
545
+ return turned < 0 ? turned + 360 : turned === 0 ? 0 : turned;
546
+ }
547
+ function tileflowSunPosition(date, location) {
548
+ const time = typeof date === "number" ? date : date.getTime();
549
+ const [longitude, latitude] = location;
550
+ if (!Number.isFinite(time)) throw new TypeError("The sun position needs a valid date.");
551
+ if (!Number.isFinite(longitude) || !Number.isFinite(latitude) || Math.abs(latitude) > 90) {
552
+ throw new TypeError(
553
+ "The sun position needs a [longitude, latitude] location in degrees, latitude from -90 to 90."
554
+ );
555
+ }
556
+ const t = (time / 864e5 + 24405875e-1 - 2451545) / 36525;
557
+ const meanLongitude = normalizeTileflowAzimuth(280.46646 + t * (36000.76983 + t * 3032e-7));
558
+ const meanAnomaly = 357.52911 + t * (35999.05029 - 1537e-7 * t);
559
+ const eccentricity = 0.016708634 - t * (42037e-9 + 1267e-10 * t);
560
+ const m = meanAnomaly * degrees;
561
+ const centre = Math.sin(m) * (1.914602 - t * (4817e-6 + 14e-6 * t)) + Math.sin(2 * m) * (0.019993 - 101e-6 * t) + Math.sin(3 * m) * 289e-6;
562
+ const omega = (125.04 - 1934.136 * t) * degrees;
563
+ const apparentLongitude = (meanLongitude + centre - 569e-5 - 478e-5 * Math.sin(omega)) * degrees;
564
+ const meanObliquity = 23 + (26 + (21.448 - t * (46.815 + t * (59e-5 - t * 1813e-6))) / 60) / 60;
565
+ const obliquity = (meanObliquity + 256e-5 * Math.cos(omega)) * degrees;
566
+ const declination = Math.asin(Math.sin(obliquity) * Math.sin(apparentLongitude));
567
+ const y = Math.tan(obliquity / 2) ** 2;
568
+ const l0 = meanLongitude * degrees;
569
+ const equation = 4 / degrees * (y * Math.sin(2 * l0) - 2 * eccentricity * Math.sin(m) + 4 * eccentricity * y * Math.sin(m) * Math.cos(2 * l0) - 0.5 * y * y * Math.sin(4 * l0) - 1.25 * eccentricity * eccentricity * Math.sin(2 * m));
570
+ const minutes = (time % 864e5 + 864e5) % 864e5 / 6e4;
571
+ const solarMinutes = ((minutes + equation + 4 * longitude) % 1440 + 1440) % 1440;
572
+ const hourAngle = (solarMinutes / 4 - 180) * degrees;
573
+ const phi = latitude * degrees;
574
+ const cosZenith = Math.min(
575
+ 1,
576
+ Math.max(
577
+ -1,
578
+ Math.sin(phi) * Math.sin(declination) + Math.cos(phi) * Math.cos(declination) * Math.cos(hourAngle)
579
+ )
580
+ );
581
+ const elevation = 90 - Math.acos(cosZenith) / degrees;
582
+ const azimuth = normalizeTileflowAzimuth(
583
+ Math.atan2(
584
+ Math.sin(hourAngle),
585
+ Math.cos(hourAngle) * Math.sin(phi) - Math.tan(declination) * Math.cos(phi)
586
+ ) / degrees + 180
587
+ );
588
+ return Object.freeze({ azimuth, altitude: Math.min(90, elevation + refraction(elevation)) });
589
+ }
590
+ function refraction(elevation) {
591
+ if (elevation > 85) return 0;
592
+ const tangent = Math.tan(elevation * degrees);
593
+ let seconds;
594
+ if (elevation > 5) seconds = 58.1 / tangent - 0.07 / tangent ** 3 + 86e-6 / tangent ** 5;
595
+ else if (elevation > -0.575)
596
+ seconds = 1735 + elevation * (-518.2 + elevation * (103.4 + elevation * (-12.79 + elevation * 0.711)));
597
+ else seconds = -20.772 / tangent;
598
+ return seconds / 3600;
599
+ }
600
+ function tileflowSunDirection(azimuth, altitude) {
601
+ const a = azimuth * degrees;
602
+ const h = altitude * degrees;
603
+ return Object.freeze([
604
+ Math.sin(a) * Math.cos(h),
605
+ Math.cos(a) * Math.cos(h),
606
+ Math.sin(h)
607
+ ]);
608
+ }
609
+ function resolveTileflowSun(preset, direction = preset, source = "theme") {
610
+ const azimuth = normalizeTileflowAzimuth(direction.azimuth);
611
+ const altitude = Math.min(90, Math.max(-90, direction.altitude));
612
+ const horizon = smoothstep2(-0.5, 3, altitude);
613
+ const intensity = clamp01(preset.intensity) * horizon;
614
+ const rgb = rgbOf(preset.color);
615
+ const ambientRgb = rgbOf(preset.ambient.color);
616
+ const ambientIntensity = clamp01(preset.ambient.intensity);
617
+ const brightness = clamp01(
618
+ (luminance(ambientRgb) * ambientIntensity + luminance(rgb) * intensity * Math.max(0, Math.sin(altitude * degrees))) / 2
619
+ );
620
+ return Object.freeze({
621
+ azimuth,
622
+ altitude,
623
+ direction: tileflowSunDirection(azimuth, altitude),
624
+ color: preset.color,
625
+ rgb,
626
+ intensity,
627
+ shadowIntensity: clamp01(preset.shadowIntensity),
628
+ ambient: Object.freeze({
629
+ color: preset.ambient.color,
630
+ rgb: ambientRgb,
631
+ intensity: ambientIntensity
632
+ }),
633
+ brightness: Number(brightness.toFixed(6)),
634
+ source
635
+ });
636
+ }
637
+ function mixTileflowSunPresets(from, to, t) {
638
+ const at = clamp01(Number.isFinite(t) ? t : 0);
639
+ if (at === 0) return from;
640
+ if (at === 1) return to;
641
+ const colour = (a, b) => mixTileflowColours(a, b, at) ?? (at < 0.5 ? a : b);
642
+ const number = (a, b) => a + (b - a) * at;
643
+ return Object.freeze({
644
+ azimuth: mixTileflowAzimuths(from.azimuth, to.azimuth, at),
645
+ altitude: number(from.altitude, to.altitude),
646
+ color: colour(from.color, to.color),
647
+ intensity: number(from.intensity, to.intensity),
648
+ shadowIntensity: number(from.shadowIntensity, to.shadowIntensity),
649
+ ambient: Object.freeze({
650
+ color: colour(from.ambient.color, to.ambient.color),
651
+ intensity: number(from.ambient.intensity, to.ambient.intensity)
652
+ })
653
+ });
654
+ }
655
+ function mixTileflowAzimuths(from, to, t) {
656
+ let delta = normalizeTileflowAzimuth(to) - normalizeTileflowAzimuth(from);
657
+ if (delta > 180) delta -= 360;
658
+ if (delta < -180) delta += 360;
659
+ return normalizeTileflowAzimuth(from + delta * t);
660
+ }
661
+ function tileflowSunMetadata(preset) {
662
+ return Object.freeze({ version: 1, ...preset });
663
+ }
664
+ function readTileflowSunPreset(metadata) {
665
+ if (!isRecord3(metadata)) return void 0;
666
+ const value = metadata[tileflowSunMetadataKey];
667
+ if (!isRecord3(value) || value.version !== 1 || !isRecord3(value.ambient)) return void 0;
668
+ const { azimuth, altitude, color: color3, intensity, shadowIntensity } = value;
669
+ const ambient = value.ambient;
670
+ if (!isFiniteNumber(azimuth) || !isFiniteNumber(altitude) || !isUnit(intensity) || !isUnit(shadowIntensity) || !isUnit(ambient.intensity) || !isColour(color3) || !isColour(ambient.color))
671
+ return void 0;
672
+ return Object.freeze({
673
+ azimuth: normalizeTileflowAzimuth(azimuth),
674
+ altitude: Math.min(90, Math.max(-90, altitude)),
675
+ color: color3,
676
+ intensity,
677
+ shadowIntensity,
678
+ ambient: Object.freeze({ color: ambient.color, intensity: ambient.intensity })
679
+ });
680
+ }
681
+ function tileflowStyleSunPreset(style) {
682
+ const published = readTileflowSunPreset(style?.metadata);
683
+ if (published) return published;
684
+ const light = isRecord3(style?.light) ? style.light : void 0;
685
+ const position = light?.position;
686
+ if (!position) return tileflowDefaultSunPreset;
687
+ return Object.freeze({
688
+ ...tileflowDefaultSunPreset,
689
+ azimuth: normalizeTileflowAzimuth(position[1]),
690
+ altitude: Math.min(90, Math.max(-90, 90 - position[2])),
691
+ ...typeof light.color === "string" && isColour(light.color) ? { color: light.color } : {}
692
+ });
693
+ }
694
+ function tileflowSunLight(direction, base) {
695
+ const radial = base?.position?.[0] ?? 1.15;
696
+ return {
697
+ ...base ?? {},
698
+ anchor: "map",
699
+ position: [
700
+ radial,
701
+ Number(normalizeTileflowAzimuth(direction.azimuth).toFixed(3)),
702
+ // MapLibre lights the extrusions from above the horizon only.
703
+ Number(Math.min(90, Math.max(0, 90 - direction.altitude)).toFixed(3))
704
+ ]
705
+ };
706
+ }
707
+ function rgbOf(colour) {
708
+ const channels = tileflowColourChannels(colour) ?? [1, 1, 1, 1];
709
+ return Object.freeze([channels[0], channels[1], channels[2]]);
710
+ }
711
+ function luminance([r, g, b]) {
712
+ const linear = (value) => value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
713
+ return 0.2126 * linear(r) + 0.7152 * linear(g) + 0.0722 * linear(b);
714
+ }
715
+ function smoothstep2(from, to, value) {
716
+ const t = clamp01((value - from) / (to - from));
717
+ return t * t * (3 - 2 * t);
718
+ }
719
+ function clamp01(value) {
720
+ return Math.min(1, Math.max(0, Number.isFinite(value) ? value : 0));
721
+ }
722
+ function isRecord3(value) {
723
+ return typeof value === "object" && value !== null && !Array.isArray(value);
724
+ }
725
+ function isFiniteNumber(value) {
726
+ return typeof value === "number" && Number.isFinite(value);
727
+ }
728
+ function isUnit(value) {
729
+ return isFiniteNumber(value) && value >= 0 && value <= 1;
730
+ }
731
+ function isColour(value) {
732
+ return typeof value === "string" && tileflowColourChannels(value) !== null;
733
+ }
734
+ var tileflowSunMetadataKey, tileflowDefaultSunPreset, degrees;
735
+ var init_sun = __esm({
736
+ "src/sun.ts"() {
737
+ "use strict";
738
+ init_theme_blend();
739
+ tileflowSunMetadataKey = "tileflow:sun";
740
+ tileflowDefaultSunPreset = Object.freeze({
741
+ azimuth: 210,
742
+ altitude: 60,
743
+ color: "#ffffff",
744
+ intensity: 0.5,
745
+ shadowIntensity: 1,
746
+ ambient: Object.freeze({ color: "#ffffff", intensity: 0.5 })
747
+ });
748
+ degrees = Math.PI / 180;
749
+ }
750
+ });
751
+
443
752
  // src/themes/visual-semantics.ts
444
753
  function classifyTileflowVisualProperty(property, _value) {
445
754
  if (property === "color" || property === "colors" || property.endsWith("Color") || property.endsWith("Colors") || property.endsWith("-color") || property.endsWith("-colors")) {
@@ -582,7 +891,7 @@ function defineTheme(baseOrDefinition, maybeDefinition) {
582
891
  const theme = {
583
892
  colorScheme: definition.colorScheme,
584
893
  id: definition.id,
585
- lighting: mergeRecord(base?.lighting ?? {}, definition.lighting ?? {}),
894
+ lighting: mergeLighting(base?.lighting ?? {}, definition.lighting ?? {}),
586
895
  tokens: {
587
896
  color: mergeRecord(base?.tokens.color ?? {}, definition.tokens?.color ?? {}),
588
897
  font: mergeRecord(base?.tokens.font ?? {}, definition.tokens?.font ?? {}),
@@ -605,11 +914,12 @@ function resolveTileflowTheme(theme) {
605
914
  number: resolver.resolveCategory("number")
606
915
  };
607
916
  const typography = resolver.resolveTypography(theme.typography);
608
- const lighting = resolver.resolveLighting(theme.lighting);
917
+ const { light: lighting, sun } = resolver.resolveLighting(theme.lighting);
609
918
  return {
610
919
  colorScheme: theme.colorScheme,
611
920
  id: theme.id,
612
921
  lighting,
922
+ ...sun ? { sun } : {},
613
923
  tokens,
614
924
  typography,
615
925
  version: theme.version
@@ -653,7 +963,7 @@ function auditTileflowThemeValues(value, path = "value", context = inferAuditCon
653
963
  return diagnostics.sort(compareAuditDiagnostics);
654
964
  }
655
965
  function auditTileflowMapThemeValues(map) {
656
- const modules = isRecord3(map.modules) ? map.modules : void 0;
966
+ const modules = isRecord4(map.modules) ? map.modules : void 0;
657
967
  const moduleDiagnostics = modules ? Object.keys(modules).sort(compareCodeUnits2).flatMap(
658
968
  (owner) => auditTileflowThemeValues(modules[owner], `modules.${owner}`, {
659
969
  owner,
@@ -760,7 +1070,7 @@ function isThemePrimitiveForCategory(value, category) {
760
1070
  return category === "number" ? typeof value === "number" && Number.isFinite(value) || Array.isArray(value) && value.every((entry) => typeof entry === "number" && Number.isFinite(entry)) : typeof value === "string" && value.length > 0;
761
1071
  }
762
1072
  function isThemeValueCandidate(value) {
763
- return isRecord3(value) && (value.kind === "theme-token" || value.kind === "theme-fixed" || value.kind === "theme-color");
1073
+ return isRecord4(value) && (value.kind === "theme-token" || value.kind === "theme-fixed" || value.kind === "theme-color");
764
1074
  }
765
1075
  function visitAuditableValue(value, path, category, state, intentRequired = false) {
766
1076
  if (isThemeStructuralPath(path)) category = void 0;
@@ -776,7 +1086,7 @@ function visitAuditableValue(value, path, category, state, intentRequired = fals
776
1086
  visitAuditableArray(value, path, category, state, false, intentRequired);
777
1087
  return;
778
1088
  }
779
- if (!isRecord3(value)) return;
1089
+ if (!isRecord4(value)) return;
780
1090
  if (value.kind === "expression" && Array.isArray(value.value)) {
781
1091
  visitAuditableArray(value.value, `${path}.value`, category, state, true, intentRequired);
782
1092
  return;
@@ -1122,6 +1432,24 @@ function assertThemeTypographyStyleFields(style, path) {
1122
1432
  function assertThemeLighting(value, path) {
1123
1433
  const lighting = assertPlainThemeRecord(value, path);
1124
1434
  assertExactThemeKeys(lighting, path, themeLightingKeys);
1435
+ if (Object.hasOwn(lighting, "sun")) {
1436
+ const sun = assertPlainThemeRecord(lighting.sun, `${path}.sun`);
1437
+ assertExactThemeKeys(sun, `${path}.sun`, themeSunKeys);
1438
+ for (const key of ["altitude", "azimuth", "intensity", "shadowIntensity"]) {
1439
+ if (Object.hasOwn(sun, key))
1440
+ assertThemeCategoryValue(sun[key], "number", `${path}.sun.${key}`);
1441
+ }
1442
+ if (Object.hasOwn(sun, "color"))
1443
+ assertThemeCategoryValue(sun.color, "color", `${path}.sun.color`);
1444
+ }
1445
+ if (Object.hasOwn(lighting, "ambient")) {
1446
+ const ambient = assertPlainThemeRecord(lighting.ambient, `${path}.ambient`);
1447
+ assertExactThemeKeys(ambient, `${path}.ambient`, themeAmbientKeys);
1448
+ if (Object.hasOwn(ambient, "intensity"))
1449
+ assertThemeCategoryValue(ambient.intensity, "number", `${path}.ambient.intensity`);
1450
+ if (Object.hasOwn(ambient, "color"))
1451
+ assertThemeCategoryValue(ambient.color, "color", `${path}.ambient.color`);
1452
+ }
1125
1453
  if (Object.hasOwn(lighting, "anchor") && lighting.anchor !== "map" && lighting.anchor !== "viewport") {
1126
1454
  throw themeTypeError(`${path}.anchor`, "map or viewport", lighting.anchor);
1127
1455
  }
@@ -1141,7 +1469,7 @@ function assertThemeLighting(value, path) {
1141
1469
  }
1142
1470
  }
1143
1471
  function assertThemeCategoryValue(value, expectedCategory, path) {
1144
- if (!isRecord3(value)) {
1472
+ if (!isRecord4(value)) {
1145
1473
  assertTokenPrimitive(expectedCategory, value, path);
1146
1474
  return;
1147
1475
  }
@@ -1288,6 +1616,7 @@ function inferThemeCategoryFromPath(path) {
1288
1616
  const tokenCategory = path.match(/^theme\.tokens\.(color|font|image|number)(?:\.|$)/u)?.[1];
1289
1617
  if (isThemeTokenCategory(tokenCategory)) return tokenCategory;
1290
1618
  if (/^theme\.lighting\.position(?:\[\d+\])?$/u.test(path)) return "number";
1619
+ if (/^theme\.lighting\.sun\.(?:altitude|azimuth|shadowIntensity)$/u.test(path)) return "number";
1291
1620
  const segments = path.replace(/\[\d+\]/g, "").split(".");
1292
1621
  return [...segments].reverse().map((segment) => classifyTileflowVisualProperty(segment)).find((category) => category !== void 0);
1293
1622
  }
@@ -1329,6 +1658,15 @@ function mergeOptionalStyle(key, base, overlay) {
1329
1658
  const value = mergeRecord(base[key] ?? {}, overlay?.[key] ?? {});
1330
1659
  return Object.keys(value).length ? { [key]: value } : {};
1331
1660
  }
1661
+ function mergeLighting(base, overlay) {
1662
+ const merged = mergeRecord(base, overlay);
1663
+ for (const key of ["sun", "ambient"]) {
1664
+ if (base[key] !== void 0 && overlay[key] !== void 0) {
1665
+ merged[key] = mergeRecord(base[key], overlay[key]);
1666
+ }
1667
+ }
1668
+ return merged;
1669
+ }
1332
1670
  function mergeRecord(base, overlay) {
1333
1671
  if (!isPlainRecord(base) || !isPlainRecord(overlay)) {
1334
1672
  throw new Error("Tileflow theme composition accepts only plain JSON objects.");
@@ -1410,9 +1748,9 @@ function oklchToRgba({ c, h, l }) {
1410
1748
  const sLinear = sRoot ** 3;
1411
1749
  return {
1412
1750
  a: 1,
1413
- b: clamp01(-0.0041960863 * lLinear - 0.7034186147 * mLinear + 1.707614701 * sLinear),
1414
- g: clamp01(-1.2684380046 * lLinear + 2.6097574011 * mLinear - 0.3413193965 * sLinear),
1415
- r: clamp01(4.0767416621 * lLinear - 3.3077115913 * mLinear + 0.2309699292 * sLinear)
1751
+ b: clamp012(-0.0041960863 * lLinear - 0.7034186147 * mLinear + 1.707614701 * sLinear),
1752
+ g: clamp012(-1.2684380046 * lLinear + 2.6097574011 * mLinear - 0.3413193965 * sLinear),
1753
+ r: clamp012(4.0767416621 * lLinear - 3.3077115913 * mLinear + 0.2309699292 * sLinear)
1416
1754
  };
1417
1755
  }
1418
1756
  function formatColor({ a, b, g, r }) {
@@ -1423,7 +1761,7 @@ function formatColor({ a, b, g, r }) {
1423
1761
  return `rgba(${channels[0]}, ${channels[1]}, ${channels[2]}, ${round(a, 4)})`;
1424
1762
  }
1425
1763
  function formatSrgbColor({ a, b, g, r }) {
1426
- const channels = [r, g, b].map((entry) => Math.round(clamp01(entry) * 255));
1764
+ const channels = [r, g, b].map((entry) => Math.round(clamp012(entry) * 255));
1427
1765
  if (a >= 0.9995) {
1428
1766
  return `#${channels.map((entry) => entry.toString(16).padStart(2, "0")).join("")}`;
1429
1767
  }
@@ -1433,7 +1771,7 @@ function srgbToLinear(value) {
1433
1771
  return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
1434
1772
  }
1435
1773
  function linearToSrgb(value) {
1436
- const clamped = clamp01(value);
1774
+ const clamped = clamp012(value);
1437
1775
  return clamped <= 31308e-7 ? clamped * 12.92 : 1.055 * clamped ** (1 / 2.4) - 0.055;
1438
1776
  }
1439
1777
  function assertColor(value, path) {
@@ -1480,7 +1818,7 @@ function describe(value) {
1480
1818
  function interpolate(from, to, amount) {
1481
1819
  return from + (to - from) * amount;
1482
1820
  }
1483
- function clamp01(value) {
1821
+ function clamp012(value) {
1484
1822
  return Math.max(0, Math.min(1, value));
1485
1823
  }
1486
1824
  function round(value, digits) {
@@ -1492,24 +1830,25 @@ function cloneJson14(value) {
1492
1830
  if (serialized === void 0) throw new Error("Tileflow themes must be JSON-serializable.");
1493
1831
  return JSON.parse(serialized);
1494
1832
  }
1495
- function isRecord3(value) {
1833
+ function isRecord4(value) {
1496
1834
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
1497
1835
  }
1498
1836
  function isPlainRecord(value) {
1499
- if (!isRecord3(value)) return false;
1837
+ if (!isRecord4(value)) return false;
1500
1838
  const prototype = Object.getPrototypeOf(value);
1501
1839
  return prototype === Object.prototype || prototype === null;
1502
1840
  }
1503
1841
  function compareCodeUnits2(left, right) {
1504
1842
  return left < right ? -1 : left > right ? 1 : 0;
1505
1843
  }
1506
- var tileflowThemeLimits, TileflowThemeAuditError, defaultTypography, themeDocumentKeys, themeDefinitionRequiredKeys, themeTypographyStyleKeys, themeTypographyKeys, themeTypographyDomains, themeLightingKeys, expressionDataOperators, ThemeValueResolver, themeStructuralPathSegments;
1844
+ var tileflowThemeLimits, TileflowThemeAuditError, defaultTypography, themeDocumentKeys, themeDefinitionRequiredKeys, themeTypographyStyleKeys, themeTypographyKeys, themeTypographyDomains, themeLightingKeys, themeSunKeys, themeAmbientKeys, expressionDataOperators, ThemeValueResolver, themeStructuralPathSegments;
1507
1845
  var init_model = __esm({
1508
1846
  "src/themes/model.ts"() {
1509
1847
  "use strict";
1510
1848
  init_expression_operators();
1511
1849
  init_values();
1512
1850
  init_portable_identity_rules();
1851
+ init_sun();
1513
1852
  init_visual_semantics();
1514
1853
  tileflowThemeLimits = Object.freeze({ maxThemes: 64 });
1515
1854
  TileflowThemeAuditError = class extends Error {
@@ -1545,7 +1884,9 @@ var init_model = __esm({
1545
1884
  "water"
1546
1885
  ];
1547
1886
  themeTypographyDomains = ["places", "poi", "roads", "water"];
1548
- themeLightingKeys = ["anchor", "color", "intensity", "position"];
1887
+ themeLightingKeys = ["ambient", "anchor", "color", "intensity", "position", "sun"];
1888
+ themeSunKeys = ["altitude", "azimuth", "color", "intensity", "shadowIntensity"];
1889
+ themeAmbientKeys = ["color", "intensity"];
1549
1890
  expressionDataOperators = /* @__PURE__ */ new Set([
1550
1891
  "accumulated",
1551
1892
  "collator",
@@ -1606,7 +1947,7 @@ var init_model = __esm({
1606
1947
  if (Array.isArray(value)) {
1607
1948
  return value.map((entry, index) => this.resolveTree(entry, `${path}[${index}]`, category));
1608
1949
  }
1609
- if (!isRecord3(value)) return value;
1950
+ if (!isRecord4(value)) return value;
1610
1951
  if (value.kind === "expression" && Array.isArray(value.value)) {
1611
1952
  return {
1612
1953
  ...value,
@@ -1646,6 +1987,65 @@ var init_model = __esm({
1646
1987
  };
1647
1988
  }
1648
1989
  resolveLighting(lighting) {
1990
+ const { ambient, sun, ...flat } = lighting;
1991
+ const light = this.#resolveFlatLight(flat);
1992
+ if (sun === void 0 && ambient === void 0) return { light };
1993
+ const resolvedSun = this.resolveTree(sun ?? {}, "theme.lighting.sun");
1994
+ const resolvedAmbient = this.resolveTree(ambient ?? {}, "theme.lighting.ambient");
1995
+ const defaults4 = tileflowDefaultSunPreset;
1996
+ const number = (value, path, fallback, range2) => {
1997
+ if (value === void 0) return fallback;
1998
+ assertFiniteNumber(value, path);
1999
+ if (range2 && (value < range2[0] || value > range2[1])) {
2000
+ throw new Error(`Tileflow ${path} must be between ${range2[0]} and ${range2[1]}.`);
2001
+ }
2002
+ return value;
2003
+ };
2004
+ const colour = (value, path, fallback) => {
2005
+ if (value === void 0) return fallback;
2006
+ assertColor(value, path);
2007
+ return value;
2008
+ };
2009
+ const preset = {
2010
+ azimuth: normalizeTileflowAzimuth(
2011
+ number(resolvedSun.azimuth, "theme.lighting.sun.azimuth", defaults4.azimuth)
2012
+ ),
2013
+ altitude: number(
2014
+ resolvedSun.altitude,
2015
+ "theme.lighting.sun.altitude",
2016
+ defaults4.altitude,
2017
+ [-90, 90]
2018
+ ),
2019
+ color: colour(resolvedSun.color, "theme.lighting.sun.color", defaults4.color),
2020
+ intensity: number(
2021
+ resolvedSun.intensity,
2022
+ "theme.lighting.sun.intensity",
2023
+ defaults4.intensity,
2024
+ [0, 1]
2025
+ ),
2026
+ shadowIntensity: number(
2027
+ resolvedSun.shadowIntensity,
2028
+ "theme.lighting.sun.shadowIntensity",
2029
+ defaults4.shadowIntensity,
2030
+ [0, 1]
2031
+ ),
2032
+ ambient: {
2033
+ color: colour(
2034
+ resolvedAmbient.color,
2035
+ "theme.lighting.ambient.color",
2036
+ defaults4.ambient.color
2037
+ ),
2038
+ intensity: number(
2039
+ resolvedAmbient.intensity,
2040
+ "theme.lighting.ambient.intensity",
2041
+ defaults4.ambient.intensity,
2042
+ [0, 1]
2043
+ )
2044
+ }
2045
+ };
2046
+ return { light: sun === void 0 ? light : tileflowSunLight(preset, light), sun: preset };
2047
+ }
2048
+ #resolveFlatLight(lighting) {
1649
2049
  const result = this.resolveTree(lighting, "theme.lighting");
1650
2050
  if (result.anchor !== void 0 && result.anchor !== "map" && result.anchor !== "viewport") {
1651
2051
  throw themeTypeError("theme.lighting.anchor", "map or viewport", result.anchor);
@@ -2174,8 +2574,19 @@ var tileflowCaptureSceneSchema = z3.object({
2174
2574
  viewport: tileflowCaptureViewportSchema,
2175
2575
  target: tileflowCaptureTargetSchema.optional()
2176
2576
  }).strict();
2577
+ function tileflowCaptureSceneFitIssue(scene) {
2578
+ if (scene.camera.type !== "bounds" || scene.camera.padding === void 0) return void 0;
2579
+ const room = Math.min(scene.viewport.width, scene.viewport.height);
2580
+ if (scene.camera.padding * 2 < room) return void 0;
2581
+ return {
2582
+ message: `Expected bounds padding less than half the viewport's shorter side (${room / 2} pixels)`,
2583
+ path: ["camera", "padding"]
2584
+ };
2585
+ }
2177
2586
  function normalizeTileflowCaptureScene(input) {
2178
2587
  const scene = tileflowCaptureSceneSchema.parse(input);
2588
+ const fit = tileflowCaptureSceneFitIssue(scene);
2589
+ if (fit) throw new RangeError(`${fit.path.join(".")}: ${fit.message}`);
2179
2590
  const camera = scene.camera.type === "center" ? {
2180
2591
  type: scene.camera.type,
2181
2592
  center: scene.camera.center,
@@ -2227,6 +2638,216 @@ function hasControlCharacter(value) {
2227
2638
  return false;
2228
2639
  }
2229
2640
 
2641
+ // src/capture-shot.ts
2642
+ import { z as z4 } from "zod";
2643
+
2644
+ // src/capture-shot-motion.ts
2645
+ function tileflowShotStateAt(shot, at) {
2646
+ const { keyframes } = shot;
2647
+ const first = keyframes[0];
2648
+ const last = keyframes.at(-1);
2649
+ if (!first || !last || keyframes.length < 2)
2650
+ throw new TypeError("A shot needs at least two keyframes.");
2651
+ const time = Math.min(last.at, Math.max(first.at, Number.isFinite(at) ? at : first.at));
2652
+ let segment = 0;
2653
+ while (segment < keyframes.length - 2 && time > keyframes[segment + 1].at) segment += 1;
2654
+ const from = keyframes[segment];
2655
+ const to = keyframes[segment + 1];
2656
+ const linear = Math.min(1, Math.max(0, (time - from.at) / (to.at - from.at)));
2657
+ const t = shot.easing === "linear" ? linear : smoothstep(linear);
2658
+ return {
2659
+ at: time,
2660
+ camera: interpolateCamera(cameraOf(from), cameraOf(to), t),
2661
+ ...from.blend && to.blend ? { blendPosition: interpolateNumber(from.blend.position, to.blend.position, t) } : {}
2662
+ };
2663
+ }
2664
+ function cameraOf({ camera }) {
2665
+ return {
2666
+ type: "center",
2667
+ center: [camera.center[0], camera.center[1]],
2668
+ zoom: camera.zoom,
2669
+ bearing: camera.bearing ?? 0,
2670
+ pitch: camera.pitch ?? 0
2671
+ };
2672
+ }
2673
+ var maximumMercatorLatitude = 85.051129;
2674
+ function interpolateCamera(from, to, t) {
2675
+ return {
2676
+ type: "center",
2677
+ center: interpolateCenter(from.center, to.center, t),
2678
+ zoom: interpolateNumber(from.zoom, to.zoom, t),
2679
+ bearing: interpolateBearing(from.bearing, to.bearing, t),
2680
+ pitch: interpolateNumber(from.pitch, to.pitch, t)
2681
+ };
2682
+ }
2683
+ function interpolateNumber(from, to, t) {
2684
+ if (t <= 0 || from === to) return from;
2685
+ if (t >= 1) return to;
2686
+ return from + (to - from) * t;
2687
+ }
2688
+ function interpolateCenter(from, to, t) {
2689
+ if (t <= 0 || from[0] === to[0] && from[1] === to[1]) return [from[0], from[1]];
2690
+ if (t >= 1) return [to[0], to[1]];
2691
+ const start = mercatorFromLngLat(from);
2692
+ const end = mercatorFromLngLat(to);
2693
+ let dx = end[0] - start[0];
2694
+ if (dx > 0.5) dx -= 1;
2695
+ else if (dx < -0.5) dx += 1;
2696
+ return lngLatFromMercator([start[0] + dx * t, start[1] + (end[1] - start[1]) * t]);
2697
+ }
2698
+ function interpolateBearing(from, to, t) {
2699
+ if (t <= 0 || from === to) return from;
2700
+ if (t >= 1) return to;
2701
+ const delta = ((to - from) % 360 + 540) % 360 - 180;
2702
+ return wrapDegrees(from + delta * t);
2703
+ }
2704
+ function mercatorFromLngLat([longitude, latitude]) {
2705
+ const clamped = Math.max(-maximumMercatorLatitude, Math.min(maximumMercatorLatitude, latitude));
2706
+ return [
2707
+ (180 + longitude) / 360,
2708
+ (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + clamped * Math.PI / 360))) / 360
2709
+ ];
2710
+ }
2711
+ function lngLatFromMercator([x, y]) {
2712
+ const latitude = 360 / Math.PI * Math.atan(Math.exp((180 - y * 360) * Math.PI / 180)) - 90;
2713
+ return [wrapDegrees(x * 360 - 180), latitude];
2714
+ }
2715
+ function wrapDegrees(value) {
2716
+ if (value >= -180 && value <= 180) return value;
2717
+ return ((value + 180) % 360 + 360) % 360 - 180;
2718
+ }
2719
+ function smoothstep(t) {
2720
+ return t * t * (3 - 2 * t);
2721
+ }
2722
+
2723
+ // src/capture-shot.ts
2724
+ init_portable_identity();
2725
+ var tileflowCaptureShotSchemaVersion = 1;
2726
+ var tileflowCaptureShotLimits = Object.freeze({
2727
+ blendThemes: Object.freeze({ maximum: 8, minimum: 2 }),
2728
+ defaultFps: 30,
2729
+ durationMs: Object.freeze({ maximum: 6e4 }),
2730
+ fps: Object.freeze([24, 25, 30, 50, 60]),
2731
+ keyframes: Object.freeze({ maximum: 64, minimum: 2 }),
2732
+ maximumFrames: 3600
2733
+ });
2734
+ var tileflowCaptureShotNameSchema = tileflowCaptureSceneNameSchema;
2735
+ var tileflowCaptureShotBlendSchema = z4.object({
2736
+ themes: z4.array(tileflowThemeNameSchema).min(tileflowCaptureShotLimits.blendThemes.minimum).max(tileflowCaptureShotLimits.blendThemes.maximum),
2737
+ position: z4.number().finite().min(0)
2738
+ }).strict().superRefine((blend, context) => {
2739
+ if (new Set(blend.themes).size !== blend.themes.length) {
2740
+ context.addIssue({ code: "custom", message: "Expected distinct themes", path: ["themes"] });
2741
+ }
2742
+ if (blend.position > blend.themes.length - 1) {
2743
+ context.addIssue({
2744
+ code: "custom",
2745
+ message: `Expected a position from 0 to ${blend.themes.length - 1}`,
2746
+ path: ["position"]
2747
+ });
2748
+ }
2749
+ });
2750
+ var tileflowCaptureShotKeyframeSchema = z4.object({
2751
+ at: z4.number().int().min(0).max(tileflowCaptureShotLimits.durationMs.maximum),
2752
+ camera: tileflowCaptureCenterCameraSchema,
2753
+ blend: tileflowCaptureShotBlendSchema.optional()
2754
+ }).strict();
2755
+ var tileflowCaptureShotFields = {
2756
+ theme: tileflowThemeNameSchema,
2757
+ viewport: tileflowCaptureViewportSchema,
2758
+ fps: z4.literal(tileflowCaptureShotLimits.fps).optional(),
2759
+ keyframes: z4.array(tileflowCaptureShotKeyframeSchema).min(tileflowCaptureShotLimits.keyframes.minimum).max(tileflowCaptureShotLimits.keyframes.maximum),
2760
+ easing: z4.enum(["smooth", "linear"]).optional()
2761
+ };
2762
+ var tileflowCaptureShotSchema = z4.object({ map: tileflowPortableIdSchema, ...tileflowCaptureShotFields }).strict().superRefine(checkShotTiming);
2763
+ var tileflowMapShotSchema = z4.object(tileflowCaptureShotFields).strict().superRefine(checkShotTiming);
2764
+ function normalizeTileflowCaptureShot(input) {
2765
+ const shot = tileflowCaptureShotSchema.parse(input);
2766
+ return { map: shot.map, ...normalizeShotFields(shot) };
2767
+ }
2768
+ function tileflowCaptureShotFrameCount(shot) {
2769
+ const fps = shot.fps ?? tileflowCaptureShotLimits.defaultFps;
2770
+ const duration = shot.keyframes.at(-1)?.at ?? 0;
2771
+ return Math.floor(duration * fps / 1e3 + 1e-9) + 1;
2772
+ }
2773
+ function tileflowCaptureShotFrames(shot) {
2774
+ const { map: _map, ...fields } = shot;
2775
+ const normalized = normalizeShotFields(tileflowMapShotSchema.parse(fields));
2776
+ const count = tileflowCaptureShotFrameCount(normalized);
2777
+ const duration = normalized.keyframes.at(-1).at;
2778
+ const frames = [];
2779
+ for (let index = 0; index < count; index += 1) {
2780
+ const at = Math.min(duration, index * 1e3 / normalized.fps);
2781
+ frames.push({ index, ...tileflowShotStateAt(normalized, at) });
2782
+ }
2783
+ return frames;
2784
+ }
2785
+ function normalizeShotFields(shot) {
2786
+ return {
2787
+ theme: shot.theme,
2788
+ viewport: { ...shot.viewport, dpr: shot.viewport.dpr ?? 1 },
2789
+ fps: shot.fps ?? tileflowCaptureShotLimits.defaultFps,
2790
+ easing: shot.easing ?? "smooth",
2791
+ keyframes: shot.keyframes.map((keyframe) => ({
2792
+ at: keyframe.at,
2793
+ camera: {
2794
+ type: "center",
2795
+ center: keyframe.camera.center,
2796
+ zoom: keyframe.camera.zoom,
2797
+ bearing: keyframe.camera.bearing ?? 0,
2798
+ pitch: keyframe.camera.pitch ?? 0
2799
+ },
2800
+ ...keyframe.blend ? { blend: { themes: [...keyframe.blend.themes], position: keyframe.blend.position } } : {}
2801
+ }))
2802
+ };
2803
+ }
2804
+ function checkShotTiming(shot, context) {
2805
+ const { keyframes } = shot;
2806
+ if (keyframes[0] && keyframes[0].at !== 0) {
2807
+ context.addIssue({
2808
+ code: "custom",
2809
+ message: "Expected the first keyframe at 0 milliseconds",
2810
+ path: ["keyframes", 0, "at"]
2811
+ });
2812
+ }
2813
+ for (let index = 1; index < keyframes.length; index += 1) {
2814
+ if (keyframes[index].at <= keyframes[index - 1].at) {
2815
+ context.addIssue({
2816
+ code: "custom",
2817
+ message: "Expected a time after the previous keyframe",
2818
+ path: ["keyframes", index, "at"]
2819
+ });
2820
+ }
2821
+ }
2822
+ const blended = keyframes.filter((keyframe) => keyframe.blend !== void 0);
2823
+ if (blended.length > 0) {
2824
+ const themes = JSON.stringify(blended[0].blend.themes);
2825
+ keyframes.forEach((keyframe, index) => {
2826
+ if (!keyframe.blend) {
2827
+ context.addIssue({
2828
+ code: "custom",
2829
+ message: "Expected a blend on every keyframe when one keyframe blends themes",
2830
+ path: ["keyframes", index, "blend"]
2831
+ });
2832
+ } else if (JSON.stringify(keyframe.blend.themes) !== themes) {
2833
+ context.addIssue({
2834
+ code: "custom",
2835
+ message: "Expected the same themes, in the same order, on every keyframe",
2836
+ path: ["keyframes", index, "blend", "themes"]
2837
+ });
2838
+ }
2839
+ });
2840
+ }
2841
+ const frames = tileflowCaptureShotFrameCount(shot);
2842
+ if (frames > tileflowCaptureShotLimits.maximumFrames) {
2843
+ context.addIssue({
2844
+ code: "custom",
2845
+ message: `Expected at most ${tileflowCaptureShotLimits.maximumFrames} frames; this shot renders ${frames}`,
2846
+ path: ["keyframes", keyframes.length - 1, "at"]
2847
+ });
2848
+ }
2849
+ }
2850
+
2230
2851
  // src/cartography/compilation-report.ts
2231
2852
  var tileflowCompilationReportSchemaVersion = 1;
2232
2853
  var tileflowCompilationPhases = Object.freeze([
@@ -2368,7 +2989,7 @@ var tileflowWorldGeneration = "v1";
2368
2989
  var tileflowWorldTileJsonUrl = "https://api.tileflow.dev/tiles/world/tiles.json";
2369
2990
 
2370
2991
  // src/data/world-release-id.ts
2371
- import { z as z4 } from "zod";
2992
+ import { z as z5 } from "zod";
2372
2993
 
2373
2994
  // src/data/world-release-id-values.ts
2374
2995
  var tileflowWorldReleaseIdMinimumLength = 12;
@@ -2380,7 +3001,7 @@ function isTileflowWorldReleaseId(value) {
2380
3001
  }
2381
3002
 
2382
3003
  // src/data/world-release-id.ts
2383
- var tileflowWorldReleaseIdSchema = z4.string().min(tileflowWorldReleaseIdMinimumLength).max(tileflowWorldReleaseIdMaximumLength).regex(tileflowWorldReleaseIdPattern);
3004
+ var tileflowWorldReleaseIdSchema = z5.string().min(tileflowWorldReleaseIdMinimumLength).max(tileflowWorldReleaseIdMaximumLength).regex(tileflowWorldReleaseIdPattern);
2384
3005
 
2385
3006
  // src/data/index.ts
2386
3007
  var tileflowPrimarySourceId = "tileflow";
@@ -2391,6 +3012,7 @@ var canonicalLayers = {
2391
3012
  boundary: "boundary",
2392
3013
  building: "building",
2393
3014
  businessCorridor: "business_corridor",
3015
+ canopy: "canopy",
2394
3016
  globalLandcover: "globallandcover",
2395
3017
  houseNumber: "housenumber",
2396
3018
  landcover: "landcover",
@@ -2412,8 +3034,10 @@ var canonicalFields = {
2412
3034
  adminLevel: "admin_level",
2413
3035
  bicycle: "bicycle",
2414
3036
  brunnel: "brunnel",
2415
- buildingKind: "building_kind",
2416
3037
  buildingTone: "building_tone",
3038
+ canopyClearanceAtZoom15: "clearance_px_z15",
3039
+ canopyCoverPercent: "cover_pct",
3040
+ canopyRank: "rank",
2417
3041
  capital: "capital",
2418
3042
  circularClearanceExtraAtZoom15: "clearance_extra_px_z15",
2419
3043
  circularInnerRadiusMeters: "inner_radius_m",
@@ -2424,9 +3048,9 @@ var canonicalFields = {
2424
3048
  class: "class",
2425
3049
  crossing: "crossing",
2426
3050
  circumference: "circumference",
2427
- classificationConfidence: "classification_confidence",
2428
3051
  confidence: "confidence",
2429
3052
  diameterCrown: "diameter_crown",
3053
+ direction: "direction",
2430
3054
  disputed: "disputed",
2431
3055
  elevation: "ele",
2432
3056
  elevationFeet: "ele_ft",
@@ -2434,7 +3058,6 @@ var canonicalFields = {
2434
3058
  foot: "foot",
2435
3059
  height: "height",
2436
3060
  hide3d: "hide_3d",
2437
- hasBusiness: "has_business",
2438
3061
  hasParts: "has_parts",
2439
3062
  horse: "horse",
2440
3063
  houseNumber: "housenumber",
@@ -2469,7 +3092,6 @@ var canonicalFields = {
2469
3092
  ref: "ref",
2470
3093
  refLength: "ref_length",
2471
3094
  renderHeight: "render_height",
2472
- renderMinZoom: "render_min_zoom",
2473
3095
  renderMinHeight: "render_min_height",
2474
3096
  service: "service",
2475
3097
  species: "species",
@@ -2492,6 +3114,7 @@ function openMapTiles(options = {}) {
2492
3114
  delete fields.bathymetryMinDepth;
2493
3115
  delete fields.bathymetrySortKey;
2494
3116
  }
3117
+ if (options.capabilities?.canopy === false) delete layers.canopy;
2495
3118
  if (options.capabilities?.globalLandcover === false) delete layers.globalLandcover;
2496
3119
  if (options.capabilities?.tree === false) delete layers.tree;
2497
3120
  return {
@@ -2509,14 +3132,6 @@ function tileflowWorldV1Schema(options = {}) {
2509
3132
  ...options,
2510
3133
  capabilities: { ...options.capabilities, bathymetry: true, globalLandcover: true },
2511
3134
  fields: {
2512
- circularClearanceExtraAtZoom15: "clearance_extra_px_z15",
2513
- circularInnerRadiusMeters: "inner_radius_m",
2514
- circularKind: "circle_kind",
2515
- circularOuterRadiusMeters: "outer_radius_m",
2516
- circularRadiusAtZoom15: "radius_px_z15",
2517
- circularRadiusMeters: "radius_m",
2518
- direction: "direction",
2519
- hasParts: "has_parts",
2520
3135
  shieldKind: "shield_kind",
2521
3136
  shieldLineLengthMeters: "shield_line_length_m",
2522
3137
  shieldNetwork: "shield_network",
@@ -2547,6 +3162,7 @@ function validateTileflowWorldV1Tilejson(tilejson, schema = tileflowWorldV1Schem
2547
3162
  const road = requireTilejsonLayer(layers, schema.layers.road, issues);
2548
3163
  const roadName = requireTilejsonLayer(layers, schema.layers.roadName, issues);
2549
3164
  const roadShield = requireTilejsonLayer(layers, schema.layers.roadShield, issues);
3165
+ const canopy = optionalTilejsonLayer(layers, schema.layers.canopy, issues);
2550
3166
  if (bathymetry2) {
2551
3167
  if (bathymetry2.minzoom !== 0 || bathymetry2.maxzoom !== 9) {
2552
3168
  issues.push(`Tileflow World V1 ${schema.layers.bathymetry} must declare z0-z9.`);
@@ -2719,6 +3335,18 @@ function validateTileflowWorldV1Tilejson(tilejson, schema = tileflowWorldV1Schem
2719
3335
  requireTilejsonField(roadShield, schema.layers.roadShield, field2, ["Number"], issues);
2720
3336
  }
2721
3337
  }
3338
+ if (canopy && schema.layers.canopy) {
3339
+ if (canopy.minzoom !== 14 || canopy.maxzoom !== 15) {
3340
+ issues.push(`Tileflow World V1 ${schema.layers.canopy} must declare native z14-z15.`);
3341
+ }
3342
+ for (const field2 of [
3343
+ schema.fields.canopyRank,
3344
+ schema.fields.canopyClearanceAtZoom15,
3345
+ schema.fields.canopyCoverPercent
3346
+ ]) {
3347
+ requireTilejsonField(canopy, schema.layers.canopy, field2, ["Number"], issues);
3348
+ }
3349
+ }
2722
3350
  return issues;
2723
3351
  }
2724
3352
  function requireTilejsonLayer(layers, id2, issues) {
@@ -2735,6 +3363,13 @@ function requireTilejsonLayer(layers, id2, issues) {
2735
3363
  }
2736
3364
  return matches[0];
2737
3365
  }
3366
+ function optionalTilejsonLayer(layers, id2, issues) {
3367
+ if (id2 === void 0) return void 0;
3368
+ const declared = layers.some(
3369
+ (layer) => typeof layer === "object" && layer !== null && layer.id === id2
3370
+ );
3371
+ return declared ? requireTilejsonLayer(layers, id2, issues) : void 0;
3372
+ }
2738
3373
  function requireNativeZoom15(layer, layerId, issues) {
2739
3374
  if (layer.minzoom !== 15 || layer.maxzoom !== 15) {
2740
3375
  issues.push(`Tileflow World V1 ${layerId} must declare native z15.`);
@@ -2839,7 +3474,7 @@ function resolveTileflowData(data, options = {}) {
2839
3474
  };
2840
3475
  }
2841
3476
  function isCanonicalOpenMapTilesSchema(schema) {
2842
- return (schema.semantics?.parkLayer ?? "mixed") === "mixed" && Object.entries(canonicalLayers).every(
3477
+ return schema.semantics.parkLayer === "mixed" && Object.entries(canonicalLayers).every(
2843
3478
  ([key, value]) => schema.layers[key] === value
2844
3479
  ) && Object.entries(canonicalFields).every(
2845
3480
  ([key, value]) => schema.fields[key] === value
@@ -2857,6 +3492,7 @@ function dataIdentity(kind, schema, version, url) {
2857
3492
  capabilities: {
2858
3493
  businessCorridor: Boolean(schema.layers.businessCorridor),
2859
3494
  bathymetry: Boolean(schema.layers.bathymetry),
3495
+ canopy: Boolean(schema.layers.canopy),
2860
3496
  globalLandcover: Boolean(schema.layers.globalLandcover),
2861
3497
  tree: Boolean(schema.layers.tree)
2862
3498
  }
@@ -3013,7 +3649,7 @@ function validateOpenMapTilesSchema(schema) {
3013
3649
  `Tileflow requires OpenMapTiles contract version ${openMapTilesContractVersion}.`
3014
3650
  );
3015
3651
  }
3016
- const parkLayer = schema.semantics?.parkLayer ?? "mixed";
3652
+ const parkLayer = schema.semantics?.parkLayer;
3017
3653
  if (parkLayer !== "mixed" && parkLayer !== "protected-only") {
3018
3654
  throw new Error("Tileflow OpenMapTiles semantics.parkLayer is invalid.");
3019
3655
  }
@@ -3942,7 +4578,7 @@ function applyTextStyle(layer, style) {
3942
4578
  layout["text-variable-anchor"] = [...style.variableAnchors];
3943
4579
  }
3944
4580
  if (style.justify !== void 0) layout["text-justify"] = style.justify;
3945
- if (style.allowOverlap !== void 0) layout["text-allow-overlap"] = style.allowOverlap;
4581
+ setOverlap(layout, "text", style);
3946
4582
  if (style.ignorePlacement !== void 0) layout["text-ignore-placement"] = style.ignorePlacement;
3947
4583
  if (style.keepUpright !== void 0) layout["text-keep-upright"] = style.keepUpright;
3948
4584
  if (style.optional !== void 0) layout["text-optional"] = style.optional;
@@ -4012,7 +4648,7 @@ function applyIconStyle(layer, style) {
4012
4648
  if (style.rotationAlignment !== void 0) {
4013
4649
  layout["icon-rotation-alignment"] = style.rotationAlignment;
4014
4650
  }
4015
- if (style.allowOverlap !== void 0) layout["icon-allow-overlap"] = style.allowOverlap;
4651
+ setOverlap(layout, "icon", style);
4016
4652
  if (style.ignorePlacement !== void 0) layout["icon-ignore-placement"] = style.ignorePlacement;
4017
4653
  if (style.keepUpright !== void 0) layout["icon-keep-upright"] = style.keepUpright;
4018
4654
  if (style.optional !== void 0) layout["icon-optional"] = style.optional;
@@ -4130,6 +4766,18 @@ function withoutRange(value) {
4130
4766
  const { maxZoom: _maxZoom, minZoom: _minZoom, visible: _visible, ...rest } = value;
4131
4767
  return rest;
4132
4768
  }
4769
+ function setOverlap(layout, part, style) {
4770
+ if (style.overlap !== void 0) layout[`${part}-overlap`] = style.overlap;
4771
+ else if (style.allowOverlap !== void 0) layout[`${part}-allow-overlap`] = style.allowOverlap;
4772
+ if (layout[`${part}-overlap`] !== void 0) delete layout[`${part}-allow-overlap`];
4773
+ }
4774
+ function withoutGovernedAllowOverlap(layout) {
4775
+ const result = { ...layout };
4776
+ for (const part of ["icon", "text"]) {
4777
+ if (result[`${part}-overlap`] !== void 0) delete result[`${part}-allow-overlap`];
4778
+ }
4779
+ return result;
4780
+ }
4133
4781
  function setPaint(paint, property, value) {
4134
4782
  if (value !== void 0) paint[property] = toMapLibreStyleValue(value);
4135
4783
  }
@@ -4668,15 +5316,6 @@ function buildingColorExpression(context) {
4668
5316
  colors.destination,
4669
5317
  ["==", ["coalesce", ["get", fields.buildingTone], ""], "commercial"],
4670
5318
  colors.commercial,
4671
- // Defensive compatibility for immutable V8.9 archives. New candidates emit building_tone.
4672
- [
4673
- "any",
4674
- ["==", ["get", fields.hasBusiness], true],
4675
- ["==", ["get", fields.hasBusiness], 1],
4676
- ["==", ["get", fields.hasBusiness], "1"],
4677
- ["==", ["coalesce", ["get", fields.buildingKind], "generic"], "commercial"]
4678
- ],
4679
- colors.commercial,
4680
5319
  colors.generic
4681
5320
  ];
4682
5321
  }
@@ -6757,7 +7396,7 @@ function createPoiLayer(options) {
6757
7396
  ["==", ["get", options.categoryField], options.category],
6758
7397
  ["has", options.filterRankField],
6759
7398
  [">=", filterRank, 0],
6760
- ["<=", filterRank, options.density],
7399
+ ["<=", filterRank, poiRankThreshold(options.density)],
6761
7400
  ["has", options.sizeRankField],
6762
7401
  [">=", sizeRank, 0],
6763
7402
  ["<=", sizeRank, 16]
@@ -6765,6 +7404,9 @@ function createPoiLayer(options) {
6765
7404
  layout: { "symbol-sort-key": poiSortKey(options.filterRankField, options.sizeRankField) }
6766
7405
  };
6767
7406
  }
7407
+ function poiRankThreshold(density) {
7408
+ return ["+", ["step", ["zoom"], 0, 16, 1, 17, 2], density];
7409
+ }
6768
7410
  function numericPoiField(field2, fallback) {
6769
7411
  return ["to-number", ["get", field2], fallback];
6770
7412
  }
@@ -7576,7 +8218,7 @@ function compileRoads(request, context) {
7576
8218
  });
7577
8219
  }
7578
8220
  }
7579
- compileSidewalks(request?.sidewalks, context, contributions);
8221
+ compileSidewalks(request?.sidewalks, areaStyles.pedestrian?.fill?.color, context, contributions);
7580
8222
  compileRoundabouts(request?.roundabouts, context, contributions);
7581
8223
  compileCrossings(request?.crossings, context, contributions);
7582
8224
  if (semantics.oneWayMarkers && visible.size > 0) {
@@ -7645,15 +8287,15 @@ function roadPhysicalCohort(roadClass) {
7645
8287
  if (roadClass === "minor" || roadClass === "service" || roadClass === "track") return "local";
7646
8288
  return "path";
7647
8289
  }
7648
- function compileSidewalks(request, context, contributions) {
8290
+ function compileSidewalks(request, pedestrianAreaColor, context, contributions) {
7649
8291
  const { fields, layers } = context.data.schema;
7650
8292
  if (!layers.sidewalk) return;
7651
8293
  const config = mergeTileflowDesign(
7652
8294
  {
7653
8295
  surface: {
7654
- color: context.colors.roads.casing,
8296
+ color: pedestrianAreaColor ?? context.colors.road,
7655
8297
  minZoom: 17,
7656
- opacity: 0.96
8298
+ opacity: 1
7657
8299
  }
7658
8300
  },
7659
8301
  request
@@ -7704,9 +8346,7 @@ function compileSidewalks(request, context, contributions) {
7704
8346
  }
7705
8347
  function compileRoundabouts(request, context, contributions) {
7706
8348
  const { fields, layers } = context.data.schema;
7707
- if (!layers.circularFeature || !fields.circularKind || !fields.circularRadiusAtZoom15 || !fields.circularRadiusMeters || !fields.circularOuterRadiusMeters || !fields.circularInnerRadiusMeters) {
7708
- return;
7709
- }
8349
+ if (!layers.circularFeature) return;
7710
8350
  const circularFields = {
7711
8351
  circularInnerRadiusMeters: fields.circularInnerRadiusMeters,
7712
8352
  circularOuterRadiusMeters: fields.circularOuterRadiusMeters,
@@ -7780,7 +8420,7 @@ function compileRoundabouts(request, context, contributions) {
7780
8420
  }
7781
8421
  function compileCrossings(request, context, contributions) {
7782
8422
  const { fields, layers } = context.data.schema;
7783
- if (!request || !layers.streetFurniture || !fields.direction) return;
8423
+ if (!request || !layers.streetFurniture) return;
7784
8424
  const config = mergeTileflowDesign(
7785
8425
  {
7786
8426
  allowOverlap: true,
@@ -7846,7 +8486,7 @@ function circularRoadInnerRadius(fields, casing) {
7846
8486
  ["/", values.innerRadiusMeters, values.radiusMeters]
7847
8487
  ];
7848
8488
  const baseWidth = circularRoadBaseWidth(fields.class);
7849
- const fallbackWidth = level === 15 ? baseWidth : ["*", baseWidth, circularRoadLegacyScale(level)];
8489
+ const fallbackWidth = level === 15 ? baseWidth : ["*", baseWidth, circularRoadFallbackScale(level)];
7850
8490
  const fallbackInnerRadius = ["-", centerlineRadius, ["/", fallbackWidth, 2]];
7851
8491
  const innerRadius = ["case", values.hasPhysicalRadii, physicalInnerRadius, fallbackInnerRadius];
7852
8492
  stops.push(level, [
@@ -7868,7 +8508,7 @@ function circularRoadStrokeWidth(fields, casing) {
7868
8508
  centerlineRadius,
7869
8509
  ["/", ["-", values.outerRadiusMeters, values.innerRadiusMeters], values.radiusMeters]
7870
8510
  ];
7871
- const fallbackWidth = level === 15 ? baseWidth : ["*", baseWidth, circularRoadLegacyScale(level)];
8511
+ const fallbackWidth = level === 15 ? baseWidth : ["*", baseWidth, circularRoadFallbackScale(level)];
7872
8512
  stops.push(level, [
7873
8513
  "case",
7874
8514
  values.hasPhysicalRadii,
@@ -7917,7 +8557,7 @@ function circularRoadValues(fields) {
7917
8557
  radiusMeters
7918
8558
  };
7919
8559
  }
7920
- function circularRoadLegacyScale(level) {
8560
+ function circularRoadFallbackScale(level) {
7921
8561
  const interpolationBase = 1.35;
7922
8562
  const progress = (interpolationBase ** (level - 15) - 1) / (interpolationBase ** (22 - 15) - 1);
7923
8563
  return 1 + progress * 1.2;
@@ -8307,10 +8947,10 @@ function roadWidth(roadClass, scale) {
8307
8947
  [16, 3.4]
8308
8948
  ]
8309
8949
  };
8310
- return zoom.linear(stops[roadClass].map(([z14, value]) => [z14, value * scale]));
8950
+ return zoom.linear(stops[roadClass].map(([z15, value]) => [z15, value * scale]));
8311
8951
  }
8312
8952
  function widen(value, addition) {
8313
- return zoom.linear(value.stops.map(([z14, width]) => [z14, width + addition]));
8953
+ return zoom.linear(value.stops.map(([z15, width]) => [z15, width + addition]));
8314
8954
  }
8315
8955
  function structureFilter(field2, structure) {
8316
8956
  if (structure === "surface") {
@@ -8524,7 +9164,7 @@ function cloneJson16(value) {
8524
9164
  // src/modules/vegetation/compiler.ts
8525
9165
  init_values();
8526
9166
  function compileVegetation(request, context) {
8527
- const minZoom = request?.flat?.minZoom ?? request?.minZoom ?? 16;
9167
+ const minZoom = request?.flat?.minZoom ?? 16;
8528
9168
  const mode = request?.mode ?? "3d";
8529
9169
  const config = mergeTileflowDesign(
8530
9170
  {
@@ -8544,7 +9184,6 @@ function compileVegetation(request, context) {
8544
9184
  strokeOpacity: 0.55,
8545
9185
  strokeWidth: 0.8
8546
9186
  },
8547
- minZoom,
8548
9187
  mode,
8549
9188
  threeDimensional: {
8550
9189
  barkColor: context.colors.vegetation.tree.bark,
@@ -9632,7 +10271,7 @@ function isPlainRecord2(value) {
9632
10271
 
9633
10272
  // src/resolved-map-schema.ts
9634
10273
  import { Color as Color3 } from "@maplibre/maplibre-gl-style-spec";
9635
- import { z as z6 } from "zod";
10274
+ import { z as z7 } from "zod";
9636
10275
 
9637
10276
  // src/cartography/data-expression.ts
9638
10277
  init_values();
@@ -9815,24 +10454,39 @@ function validateStops(stops, api) {
9815
10454
  }
9816
10455
  }
9817
10456
  function validateOperandCount(count, api) {
9818
- if (count > tileflowDataExpressionLimits.maxOperands) {
9819
- throw new Error(
9820
- `${api} supports at most ${tileflowDataExpressionLimits.maxOperands} operands.`
10457
+ const limit = tileflowDataExpressionLimits.maxOperands;
10458
+ if (count > limit) {
10459
+ throw limitError(
10460
+ `${api} received ${count} operands; it supports at most ${limit}. Nest ${api} calls of at most ${limit} operands each.`
9821
10461
  );
9822
10462
  }
9823
10463
  }
9824
10464
  function validateBranchCount(count, api) {
9825
- if (count > tileflowDataExpressionLimits.maxBranches) {
9826
- throw new Error(
9827
- `${api} supports at most ${tileflowDataExpressionLimits.maxBranches} branches.`
10465
+ const limit = tileflowDataExpressionLimits.maxBranches;
10466
+ if (count > limit) {
10467
+ throw limitError(
10468
+ `${api} received ${count} branches; it supports at most ${limit}. Split the lookup into nested ${api} groups of at most ${limit} branches, or reduce the mapping.`
9828
10469
  );
9829
10470
  }
9830
10471
  }
9831
10472
  function validateStopCount(count, api) {
9832
- if (count > tileflowDataExpressionLimits.maxStops) {
9833
- throw new Error(`${api} supports at most ${tileflowDataExpressionLimits.maxStops} stops.`);
10473
+ const limit = tileflowDataExpressionLimits.maxStops;
10474
+ if (count > limit) {
10475
+ throw limitError(
10476
+ `${api} received ${count} stops; it supports at most ${limit}. Remove stops the curve can interpolate.`
10477
+ );
9834
10478
  }
9835
10479
  }
10480
+ function limitError(message) {
10481
+ const site = authoringCallSite(new Error().stack);
10482
+ return new Error(site ? `${message} Called at ${site}.` : message);
10483
+ }
10484
+ function authoringCallSite(stack) {
10485
+ const locations = (stack ?? "").split("\n").slice(1).map((line) => /\(?([^()\s]+?):(\d+):(\d+)\)?$/.exec(line.trim())).filter((match2) => match2 !== null).map(([, file, line, column]) => ({ file: file.replace(/^file:\/\//, ""), line, column }));
10486
+ const own = locations[0]?.file;
10487
+ const site = locations.find(({ file }) => file !== own && !file.startsWith("node:"));
10488
+ return site ? `${site.file}:${site.line}:${site.column}` : void 0;
10489
+ }
9836
10490
  function node(value) {
9837
10491
  if (isTileflowExpression(value)) return cloneJson19(value.value);
9838
10492
  if (isDataFieldReference(value)) return ["get", cloneJson19(value)];
@@ -10026,7 +10680,11 @@ function visitExpression(value, path, variables, issues) {
10026
10680
  return;
10027
10681
  }
10028
10682
  if ((value.length - 2) / 2 > branchLimit) {
10029
- addExpressionIssue(issues, path, `Expression case exceeds ${branchLimit} branches.`);
10683
+ addExpressionIssue(
10684
+ issues,
10685
+ path,
10686
+ `Expression case has ${(value.length - 2) / 2} branches and exceeds ${branchLimit}.`
10687
+ );
10030
10688
  return;
10031
10689
  }
10032
10690
  for (let index = 1; index < value.length; index += 1) visit(value[index], index);
@@ -10042,7 +10700,11 @@ function visitExpression(value, path, variables, issues) {
10042
10700
  return;
10043
10701
  }
10044
10702
  if ((value.length - 3) / 2 > branchLimit) {
10045
- addExpressionIssue(issues, path, `Expression match exceeds ${branchLimit} branches.`);
10703
+ addExpressionIssue(
10704
+ issues,
10705
+ path,
10706
+ `Expression match has ${(value.length - 3) / 2} branches and exceeds ${branchLimit}.`
10707
+ );
10046
10708
  return;
10047
10709
  }
10048
10710
  visit(value[1], 1);
@@ -10271,21 +10933,21 @@ function bindSemanticValue(value, schema, sourceId) {
10271
10933
  }
10272
10934
  if (isDataSourceReference(value)) return sourceId;
10273
10935
  if (Array.isArray(value)) return value.map((item) => bindSemanticValue(item, schema, sourceId));
10274
- if (!isRecord4(value)) return value;
10936
+ if (!isRecord5(value)) return value;
10275
10937
  return Object.fromEntries(
10276
10938
  Object.entries(value).map(([key, item]) => [key, bindSemanticValue(item, schema, sourceId)])
10277
10939
  );
10278
10940
  }
10279
10941
  function isDataFieldReference2(value) {
10280
- return isRecord4(value) && value.kind === "tileflow-data-field" && typeof value.name === "string";
10942
+ return isRecord5(value) && value.kind === "tileflow-data-field" && typeof value.name === "string";
10281
10943
  }
10282
10944
  function isDataLayerReference(value) {
10283
- return isRecord4(value) && value.kind === "tileflow-data-layer" && typeof value.name === "string";
10945
+ return isRecord5(value) && value.kind === "tileflow-data-layer" && typeof value.name === "string";
10284
10946
  }
10285
10947
  function isDataSourceReference(value) {
10286
- return isRecord4(value) && value.kind === "tileflow-data-source" && value.name === "primary";
10948
+ return isRecord5(value) && value.kind === "tileflow-data-source" && value.name === "primary";
10287
10949
  }
10288
- function isRecord4(value) {
10950
+ function isRecord5(value) {
10289
10951
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
10290
10952
  }
10291
10953
  function compareCodeUnits5(left, right) {
@@ -10389,8 +11051,8 @@ function createTileflowLayerTemplateIR(layer, semanticKey) {
10389
11051
  renderer: type,
10390
11052
  ...filter === void 0 ? {} : { selector: cloneJson20(filter) },
10391
11053
  style: Object.freeze({
10392
- ...isRecord5(layout) ? { placement: Object.freeze(cloneJson20(layout)) } : {},
10393
- ...isRecord5(paint) ? { appearance: Object.freeze(cloneJson20(paint)) } : {}
11054
+ ...isRecord6(layout) ? { placement: Object.freeze(cloneJson20(layout)) } : {},
11055
+ ...isRecord6(paint) ? { appearance: Object.freeze(cloneJson20(paint)) } : {}
10394
11056
  })
10395
11057
  });
10396
11058
  }
@@ -10630,21 +11292,21 @@ function visitReferences(value, counts, visited = /* @__PURE__ */ new WeakSet())
10630
11292
  }
10631
11293
  }
10632
11294
  function isSemanticFieldReference(value) {
10633
- return isRecord5(value) && value.kind === "tileflow-data-field";
11295
+ return isRecord6(value) && value.kind === "tileflow-data-field";
10634
11296
  }
10635
11297
  function isSemanticLayerReference(value) {
10636
- return isRecord5(value) && value.kind === "tileflow-data-layer";
11298
+ return isRecord6(value) && value.kind === "tileflow-data-layer";
10637
11299
  }
10638
11300
  function isSemanticSourceReference(value) {
10639
- return isRecord5(value) && value.kind === "tileflow-data-source";
11301
+ return isRecord6(value) && value.kind === "tileflow-data-source";
10640
11302
  }
10641
11303
  function cloneJson20(value) {
10642
11304
  return JSON.parse(JSON.stringify(value));
10643
11305
  }
10644
11306
  function asRecord4(value) {
10645
- return isRecord5(value) ? value : {};
11307
+ return isRecord6(value) ? value : {};
10646
11308
  }
10647
- function isRecord5(value) {
11309
+ function isRecord6(value) {
10648
11310
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
10649
11311
  }
10650
11312
 
@@ -10708,7 +11370,7 @@ function validateTileflowRenderSelectorConstraints(input) {
10708
11370
  };
10709
11371
  while (pending.length > 0) {
10710
11372
  const current = pending.pop();
10711
- if (!isRecord6(current.selector) || typeof current.selector.kind !== "string") {
11373
+ if (!isRecord7(current.selector) || typeof current.selector.kind !== "string") {
10712
11374
  addIssue(
10713
11375
  "invalid-selector",
10714
11376
  "a render selector must be a semantic selector node",
@@ -10769,7 +11431,7 @@ function validateTileflowRenderSelectorConstraints(input) {
10769
11431
  }
10770
11432
  for (const [index, branch] of current.selector.branches.entries()) {
10771
11433
  const branchPath = [...branchesPath, index];
10772
- if (!isRecord6(branch)) {
11434
+ if (!isRecord7(branch)) {
10773
11435
  addIssue("invalid-selector", "match selector branch must be an object", branchPath);
10774
11436
  continue;
10775
11437
  }
@@ -10800,14 +11462,14 @@ function validateTileflowRenderSelectorConstraints(input) {
10800
11462
  for (let index = current.selector.stops.length - 1; index >= 0; index -= 1) {
10801
11463
  const stop = current.selector.stops[index];
10802
11464
  const stopPath = [...stopsPath, index];
10803
- if (!isRecord6(stop)) {
11465
+ if (!isRecord7(stop)) {
10804
11466
  addIssue("invalid-selector", "step selector stop must be an object", stopPath);
10805
11467
  continue;
10806
11468
  }
10807
11469
  pushChild(stop.selector, current.depth + 1, [...stopPath, "selector"]);
10808
11470
  }
10809
11471
  for (const [index, stop] of current.selector.stops.entries()) {
10810
- if (!isRecord6(stop)) continue;
11472
+ if (!isRecord7(stop)) continue;
10811
11473
  const zoom3 = stop.zoom;
10812
11474
  const zoomPath = [...stopsPath, index, "zoom"];
10813
11475
  if (typeof zoom3 !== "number" || !Number.isFinite(zoom3) || zoom3 < 0 || zoom3 > 24) {
@@ -11190,7 +11852,7 @@ function applyRendererStyle(layer, renderer, style) {
11190
11852
  };
11191
11853
  }
11192
11854
  function lowerSelector(selector, data) {
11193
- if (!isRecord6(selector) || typeof selector.kind !== "string") {
11855
+ if (!isRecord7(selector) || typeof selector.kind !== "string") {
11194
11856
  throw renderStackError(
11195
11857
  "invalid-selector",
11196
11858
  "A render selector must be a semantic selector node."
@@ -11364,10 +12026,10 @@ function applyRefinement(previous, refinement) {
11364
12026
  style: {
11365
12027
  ...previous.style,
11366
12028
  ...patch.style?.placement === void 0 ? {} : {
11367
- placement: {
12029
+ placement: withoutGovernedAllowOverlap({
11368
12030
  ...previous.style.placement ?? {},
11369
12031
  ...patch.style.placement
11370
- }
12032
+ })
11371
12033
  },
11372
12034
  ...patch.style?.appearance === void 0 ? {} : {
11373
12035
  appearance: {
@@ -11393,7 +12055,7 @@ function requireRenderer(value) {
11393
12055
  function requirePlacement(value) {
11394
12056
  if (typeof value === "string") {
11395
12057
  if (tileflowBandPlacements.includes(value)) return;
11396
- } else if (isRecord6(value)) {
12058
+ } else if (isRecord7(value)) {
11397
12059
  const keys = Object.keys(value);
11398
12060
  if (keys.length === 1 && (keys[0] === "above" || keys[0] === "below")) {
11399
12061
  requirePortableTarget(value[keys[0]], "render placement target");
@@ -11420,7 +12082,7 @@ function validateRefinementShape(operation) {
11420
12082
  validateStyle(operation.renderer, operation.style);
11421
12083
  }
11422
12084
  function validateStyle(renderer, style) {
11423
- if (!isRecord6(style)) {
12085
+ if (!isRecord7(style)) {
11424
12086
  throw renderStackError(
11425
12087
  "invalid-style",
11426
12088
  `A ${renderer} render operation requires a style object.`
@@ -11522,7 +12184,7 @@ function normalizeRequirements(requirements) {
11522
12184
  return [...requirements];
11523
12185
  }
11524
12186
  function requireRenderStackEntries(stack) {
11525
- if (!isRecord6(stack)) {
12187
+ if (!isRecord7(stack)) {
11526
12188
  throw renderStackError("invalid-stack", "A render stack must be a named operation record.");
11527
12189
  }
11528
12190
  const entries = Object.entries(stack);
@@ -11669,9 +12331,9 @@ function cloneJson21(value) {
11669
12331
  return JSON.parse(JSON.stringify(value));
11670
12332
  }
11671
12333
  function asRecord5(value) {
11672
- return isRecord6(value) ? value : {};
12334
+ return isRecord7(value) ? value : {};
11673
12335
  }
11674
- function isRecord6(value) {
12336
+ function isRecord7(value) {
11675
12337
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
11676
12338
  }
11677
12339
 
@@ -11679,18 +12341,18 @@ function isRecord6(value) {
11679
12341
  init_values();
11680
12342
 
11681
12343
  // src/icon-set.ts
11682
- import { z as z5 } from "zod";
12344
+ import { z as z6 } from "zod";
11683
12345
  var tileflowIconSourceLimit = 32;
11684
12346
  var slug = "[a-z0-9]+(?:-[a-z0-9]+)*";
11685
- var tileflowIconSetReferenceSchema = z5.string().max(130).regex(
12347
+ var tileflowIconSetReferenceSchema = z6.string().max(130).regex(
11686
12348
  new RegExp(`^@${slug}/${slug}$`, "u"),
11687
12349
  "Expected a canonical @team/set reference without a version suffix"
11688
12350
  ).refine(
11689
12351
  (value) => value.slice(1).split("/").every((part) => part.length <= 64),
11690
12352
  "Team and set slugs must contain at most 64 characters"
11691
12353
  );
11692
- var tileflowIconSetSourceSchema = z5.object({
11693
- kind: z5.literal("icon-set"),
12354
+ var tileflowIconSetSourceSchema = z6.object({
12355
+ kind: z6.literal("icon-set"),
11694
12356
  reference: tileflowIconSetReferenceSchema
11695
12357
  }).strict();
11696
12358
  function iconSet(reference) {
@@ -11701,10 +12363,10 @@ function iconSet(reference) {
11701
12363
  function isTileflowIconSetSource(value) {
11702
12364
  return tileflowIconSetSourceSchema.safeParse(value).success;
11703
12365
  }
11704
- var tileflowIconSetIdSchema = z5.string().regex(/^ics_[A-Za-z0-9_-]{16}$/u);
11705
- var tileflowIconSetVersionIdSchema = z5.string().regex(/^icv_[A-Za-z0-9_-]{16}$/u);
11706
- var tileflowIconSetPackageIdSchema = z5.string().regex(/^icp_[A-Za-z0-9_-]{16,64}$/u);
11707
- var tileflowIconSetTeamIdSchema = z5.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/u);
12366
+ var tileflowIconSetIdSchema = z6.string().regex(/^ics_[A-Za-z0-9_-]{16}$/u);
12367
+ var tileflowIconSetVersionIdSchema = z6.string().regex(/^icv_[A-Za-z0-9_-]{16}$/u);
12368
+ var tileflowIconSetPackageIdSchema = z6.string().regex(/^icp_[A-Za-z0-9_-]{16,64}$/u);
12369
+ var tileflowIconSetTeamIdSchema = z6.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/u);
11708
12370
  var TileflowIconSetError = class extends Error {
11709
12371
  constructor(code, message, options) {
11710
12372
  super(message, options);
@@ -11894,11 +12556,11 @@ var TileflowResolvedMapValidationError = class extends Error {
11894
12556
  this.messages = messages;
11895
12557
  }
11896
12558
  };
11897
- var identifierSchema = z6.string().trim().regex(/^[A-Za-z0-9_-]+$/, "Expected letters, numbers, underscores, or hyphens").refine((value) => value !== "__proto__", "Expected a safe identifier");
11898
- var revisionSchema = z6.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/, "Expected a portable data revision");
11899
- var zoomNumberSchema = z6.number().finite().min(0).max(24);
12559
+ var identifierSchema = z7.string().trim().regex(/^[A-Za-z0-9_-]+$/, "Expected letters, numbers, underscores, or hyphens").refine((value) => value !== "__proto__", "Expected a safe identifier");
12560
+ var revisionSchema = z7.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/, "Expected a portable data revision");
12561
+ var zoomNumberSchema = z7.number().finite().min(0).max(24);
11900
12562
  function zoomValueSchemaFor(valueSchema) {
11901
- const stops = z6.array(z6.tuple([zoomNumberSchema, valueSchema])).min(1).superRefine((entries, context) => {
12563
+ const stops = z7.array(z7.tuple([zoomNumberSchema, valueSchema])).min(1).superRefine((entries, context) => {
11902
12564
  for (let index = 1; index < entries.length; index += 1) {
11903
12565
  if (entries[index][0] <= entries[index - 1][0]) {
11904
12566
  context.addIssue({
@@ -11909,105 +12571,105 @@ function zoomValueSchemaFor(valueSchema) {
11909
12571
  }
11910
12572
  }
11911
12573
  });
11912
- return z6.discriminatedUnion("interpolation", [
11913
- z6.object({
11914
- base: z6.number().finite().positive(),
11915
- interpolation: z6.literal("exponential"),
11916
- kind: z6.literal("zoom"),
12574
+ return z7.discriminatedUnion("interpolation", [
12575
+ z7.object({
12576
+ base: z7.number().finite().positive(),
12577
+ interpolation: z7.literal("exponential"),
12578
+ kind: z7.literal("zoom"),
11917
12579
  stops
11918
12580
  }).strict(),
11919
- z6.object({
11920
- interpolation: z6.literal("linear"),
11921
- kind: z6.literal("zoom"),
12581
+ z7.object({
12582
+ interpolation: z7.literal("linear"),
12583
+ kind: z7.literal("zoom"),
11922
12584
  stops
11923
12585
  }).strict(),
11924
- z6.object({
11925
- interpolation: z6.literal("step"),
11926
- kind: z6.literal("zoom"),
12586
+ z7.object({
12587
+ interpolation: z7.literal("step"),
12588
+ kind: z7.literal("zoom"),
11927
12589
  stops
11928
12590
  }).strict()
11929
12591
  ]);
11930
12592
  }
11931
- var themeTokenNameSchema = z6.string().regex(
12593
+ var themeTokenNameSchema = z7.string().regex(
11932
12594
  /^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z][A-Za-z0-9_-]*)*$/,
11933
12595
  "Expected a portable dot-separated semantic token name"
11934
12596
  );
11935
- var themeTokenReferenceSchema = z6.object({
11936
- category: z6.enum(tileflowThemeTokenCategories),
11937
- kind: z6.literal("theme-token"),
12597
+ var themeTokenReferenceSchema = z7.object({
12598
+ category: z7.enum(tileflowThemeTokenCategories),
12599
+ kind: z7.literal("theme-token"),
11938
12600
  token: themeTokenNameSchema
11939
12601
  }).strict();
11940
12602
  var themeNumberReferenceSchema = themeTokenReferenceSchema.extend({
11941
- category: z6.literal("number")
12603
+ category: z7.literal("number")
11942
12604
  });
11943
- var fixedNumberSchema = z6.object({
11944
- kind: z6.literal("theme-fixed"),
11945
- reason: z6.string().trim().min(1),
11946
- value: z6.number().finite()
12605
+ var fixedNumberSchema = z7.object({
12606
+ kind: z7.literal("theme-fixed"),
12607
+ reason: z7.string().trim().min(1),
12608
+ value: z7.number().finite()
11947
12609
  }).strict();
11948
- var fixedNumberArraySchema = z6.object({
11949
- kind: z6.literal("theme-fixed"),
11950
- reason: z6.string().trim().min(1),
11951
- value: z6.array(z6.number().finite())
12610
+ var fixedNumberArraySchema = z7.object({
12611
+ kind: z7.literal("theme-fixed"),
12612
+ reason: z7.string().trim().min(1),
12613
+ value: z7.array(z7.number().finite())
11952
12614
  }).strict();
11953
- var fixedNumberOffsetSchema = z6.object({
11954
- kind: z6.literal("theme-fixed"),
11955
- reason: z6.string().trim().min(1),
11956
- value: z6.tuple([z6.number().finite(), z6.number().finite()])
12615
+ var fixedNumberOffsetSchema = z7.object({
12616
+ kind: z7.literal("theme-fixed"),
12617
+ reason: z7.string().trim().min(1),
12618
+ value: z7.tuple([z7.number().finite(), z7.number().finite()])
11957
12619
  }).strict();
11958
- var fixedNumberInsetsSchema = z6.object({
11959
- kind: z6.literal("theme-fixed"),
11960
- reason: z6.string().trim().min(1),
11961
- value: z6.tuple([
11962
- z6.number().finite(),
11963
- z6.number().finite(),
11964
- z6.number().finite(),
11965
- z6.number().finite()
12620
+ var fixedNumberInsetsSchema = z7.object({
12621
+ kind: z7.literal("theme-fixed"),
12622
+ reason: z7.string().trim().min(1),
12623
+ value: z7.tuple([
12624
+ z7.number().finite(),
12625
+ z7.number().finite(),
12626
+ z7.number().finite(),
12627
+ z7.number().finite()
11966
12628
  ])
11967
12629
  }).strict();
11968
- var fixedStringSchema = z6.object({ kind: z6.literal("theme-fixed"), reason: z6.string().trim().min(1), value: z6.string() }).strict();
11969
- var themeColorOperationSchema = z6.lazy(
11970
- () => z6.discriminatedUnion("operation", [
11971
- z6.object({
12630
+ var fixedStringSchema = z7.object({ kind: z7.literal("theme-fixed"), reason: z7.string().trim().min(1), value: z7.string() }).strict();
12631
+ var themeColorOperationSchema = z7.lazy(
12632
+ () => z7.discriminatedUnion("operation", [
12633
+ z7.object({
11972
12634
  color: themeColorValueSchema,
11973
- kind: z6.literal("theme-color"),
12635
+ kind: z7.literal("theme-color"),
11974
12636
  opacity: themeNumberValueSchema,
11975
- operation: z6.literal("alpha")
12637
+ operation: z7.literal("alpha")
11976
12638
  }).strict(),
11977
- z6.object({
12639
+ z7.object({
11978
12640
  amount: themeNumberValueSchema,
11979
12641
  from: themeColorValueSchema,
11980
- kind: z6.literal("theme-color"),
11981
- operation: z6.literal("mix"),
11982
- space: z6.literal("oklch"),
12642
+ kind: z7.literal("theme-color"),
12643
+ operation: z7.literal("mix"),
12644
+ space: z7.literal("oklch"),
11983
12645
  to: themeColorValueSchema
11984
12646
  }).strict()
11985
12647
  ])
11986
12648
  );
11987
- var themeNumberValueSchema = z6.lazy(
11988
- () => z6.union([z6.number().finite(), fixedNumberSchema, themeNumberReferenceSchema])
12649
+ var themeNumberValueSchema = z7.lazy(
12650
+ () => z7.union([z7.number().finite(), fixedNumberSchema, themeNumberReferenceSchema])
11989
12651
  );
11990
- var themeColorValueSchema = z6.lazy(
11991
- () => z6.union([
11992
- z6.string().min(1),
12652
+ var themeColorValueSchema = z7.lazy(
12653
+ () => z7.union([
12654
+ z7.string().min(1),
11993
12655
  fixedStringSchema,
11994
- themeTokenReferenceSchema.extend({ category: z6.literal("color") }),
12656
+ themeTokenReferenceSchema.extend({ category: z7.literal("color") }),
11995
12657
  themeColorOperationSchema
11996
12658
  ])
11997
12659
  );
11998
- var themeFontValueSchema = z6.union([
11999
- z6.string().min(1),
12660
+ var themeFontValueSchema = z7.union([
12661
+ z7.string().min(1),
12000
12662
  fixedStringSchema,
12001
- themeTokenReferenceSchema.extend({ category: z6.literal("font") })
12663
+ themeTokenReferenceSchema.extend({ category: z7.literal("font") })
12002
12664
  ]);
12003
- var themeImageValueSchema = z6.union([
12004
- z6.string().min(1),
12665
+ var themeImageValueSchema = z7.union([
12666
+ z7.string().min(1),
12005
12667
  fixedStringSchema,
12006
- themeTokenReferenceSchema.extend({ category: z6.literal("image") })
12668
+ themeTokenReferenceSchema.extend({ category: z7.literal("image") })
12007
12669
  ]);
12008
12670
  function expressionSchemaFor(expectedCategory) {
12009
12671
  const category = expectedCategory ?? "structural";
12010
- return z6.object({ kind: z6.literal("expression"), value: z6.array(z6.unknown()).min(1) }).strict().superRefine((expression2, context) => {
12672
+ return z7.object({ kind: z7.literal("expression"), value: z7.array(z7.unknown()).min(1) }).strict().superRefine((expression2, context) => {
12011
12673
  for (const issue of validateTileflowDataExpression(expression2.value)) {
12012
12674
  context.addIssue({
12013
12675
  code: "custom",
@@ -12054,18 +12716,20 @@ function validateExpressionThemeValues(value, expectedCategory, context, path) {
12054
12716
  if (!parsed.success || parsed.data.category !== expectedCategory) {
12055
12717
  context.addIssue({
12056
12718
  code: "custom",
12057
- message: expectedCategory === void 0 ? "Structural expressions cannot contain theme-token references" : `Expected a ${expectedCategory} theme-token reference`,
12719
+ message: expectedCategory === void 0 ? `Structural expressions cannot contain theme-token references. ${structuralThemeValueHint}` : parsed.success ? `Expected a ${expectedCategory} theme-token reference, received ${parsed.data.category} token "${parsed.data.token}". ${expressionOperandHint(expectedCategory)}` : `Expected a ${expectedCategory} theme-token reference`,
12058
12720
  path
12059
12721
  });
12060
12722
  }
12061
12723
  return;
12062
12724
  }
12063
12725
  if (candidate.kind === "theme-fixed") {
12064
- const parsed = expectedCategory === "number" ? z6.union([fixedNumberSchema, fixedNumberArraySchema]).safeParse(candidate) : expectedCategory === "color" || expectedCategory === "image" ? fixedStringSchema.safeParse(candidate) : void 0;
12726
+ const parsed = expectedCategory === "number" ? z7.union([fixedNumberSchema, fixedNumberArraySchema]).safeParse(candidate) : expectedCategory === "color" || expectedCategory === "image" ? fixedStringSchema.safeParse(candidate) : void 0;
12065
12727
  if (!parsed?.success) {
12728
+ const received = fixedValueKind(candidate.value);
12729
+ const literal2 = JSON.stringify(candidate.value);
12066
12730
  context.addIssue({
12067
12731
  code: "custom",
12068
- message: expectedCategory === void 0 ? "Structural expressions cannot contain theme-fixed values" : `Expected a fixed ${expectedCategory} value`,
12732
+ message: expectedCategory === void 0 ? `Structural expressions cannot contain theme-fixed values. ${structuralThemeValueHint}` : received !== void 0 && received !== expectedCategoryKind(expectedCategory) ? `Expected a fixed ${expectedCategory} value, received a fixed ${received}. ${expressionOperandHint(expectedCategory)} Write ${literal2} instead of fixed(${literal2}).` : `Expected a fixed ${expectedCategory} value`,
12069
12733
  path
12070
12734
  });
12071
12735
  }
@@ -12085,6 +12749,20 @@ function validateExpressionThemeValues(value, expectedCategory, context, path) {
12085
12749
  validateExpressionThemeValues(entry, expectedCategory, context, [...path, key]);
12086
12750
  }
12087
12751
  }
12752
+ var structuralThemeValueHint = "fixed() and theme tokens apply only to visual properties such as colours, sizes, and images; write structural values directly.";
12753
+ function expressionOperandHint(category) {
12754
+ return `In ${category === "image" ? "an" : "a"} ${category} expression, fixed() and theme tokens belong in its ${category} results; conditions and other operands take plain values.`;
12755
+ }
12756
+ function fixedValueKind(value) {
12757
+ if (typeof value === "number") return "number";
12758
+ if (typeof value === "string") return "string";
12759
+ if (typeof value === "boolean") return "boolean";
12760
+ if (Array.isArray(value)) return "array";
12761
+ return void 0;
12762
+ }
12763
+ function expectedCategoryKind(category) {
12764
+ return category === "number" ? "number" : "string";
12765
+ }
12088
12766
  var numberExpressionSchema = expressionSchemaFor("number");
12089
12767
  var colorExpressionSchema = expressionSchemaFor("color");
12090
12768
  var imageExpressionSchema = expressionSchemaFor("image");
@@ -12092,80 +12770,80 @@ var structuralExpressionSchema = expressionSchemaFor(void 0);
12092
12770
  var numberZoomValueSchema = zoomValueSchemaFor(themeNumberValueSchema);
12093
12771
  var colorZoomValueSchema = zoomValueSchemaFor(themeColorValueSchema);
12094
12772
  var imageZoomValueSchema = zoomValueSchemaFor(themeImageValueSchema);
12095
- var stringZoomValueSchema = zoomValueSchemaFor(z6.string());
12096
- var numberValueSchema = z6.union([
12773
+ var stringZoomValueSchema = zoomValueSchemaFor(z7.string());
12774
+ var numberValueSchema = z7.union([
12097
12775
  themeNumberValueSchema,
12098
12776
  numberExpressionSchema,
12099
12777
  numberZoomValueSchema
12100
12778
  ]);
12101
- var structuralNumberValueSchema = z6.union([
12102
- z6.number().finite(),
12779
+ var structuralNumberValueSchema = z7.union([
12780
+ z7.number().finite(),
12103
12781
  structuralExpressionSchema,
12104
- zoomValueSchemaFor(z6.number().finite())
12782
+ zoomValueSchemaFor(z7.number().finite())
12105
12783
  ]);
12106
- var colorValueSchema = z6.union([
12784
+ var colorValueSchema = z7.union([
12107
12785
  themeColorValueSchema,
12108
12786
  colorExpressionSchema,
12109
12787
  colorZoomValueSchema
12110
12788
  ]);
12111
- var imageValueSchema = z6.union([
12789
+ var imageValueSchema = z7.union([
12112
12790
  themeImageValueSchema,
12113
12791
  imageExpressionSchema,
12114
12792
  imageZoomValueSchema
12115
12793
  ]);
12116
- var stringValueSchema = z6.union([z6.string(), structuralExpressionSchema, stringZoomValueSchema]);
12117
- var themeNumberArraySchema = z6.array(themeNumberValueSchema);
12118
- var themeNumberArrayValueSchema = z6.union([themeNumberArraySchema, fixedNumberArraySchema]);
12119
- var numberArrayValueSchema = z6.union([
12794
+ var stringValueSchema = z7.union([z7.string(), structuralExpressionSchema, stringZoomValueSchema]);
12795
+ var themeNumberArraySchema = z7.array(themeNumberValueSchema);
12796
+ var themeNumberArrayValueSchema = z7.union([themeNumberArraySchema, fixedNumberArraySchema]);
12797
+ var numberArrayValueSchema = z7.union([
12120
12798
  themeNumberArrayValueSchema,
12121
12799
  numberExpressionSchema,
12122
12800
  zoomValueSchemaFor(themeNumberArrayValueSchema)
12123
12801
  ]);
12124
- var themeNumberOffsetSchema = z6.tuple([themeNumberValueSchema, themeNumberValueSchema]);
12125
- var themeNumberOffsetValueSchema = z6.union([themeNumberOffsetSchema, fixedNumberOffsetSchema]);
12126
- var numberOffsetValueSchema = z6.union([
12802
+ var themeNumberOffsetSchema = z7.tuple([themeNumberValueSchema, themeNumberValueSchema]);
12803
+ var themeNumberOffsetValueSchema = z7.union([themeNumberOffsetSchema, fixedNumberOffsetSchema]);
12804
+ var numberOffsetValueSchema = z7.union([
12127
12805
  themeNumberOffsetValueSchema,
12128
12806
  numberExpressionSchema,
12129
12807
  zoomValueSchemaFor(themeNumberOffsetValueSchema)
12130
12808
  ]);
12131
- var themeNumberInsetsSchema = z6.tuple([
12809
+ var themeNumberInsetsSchema = z7.tuple([
12132
12810
  themeNumberValueSchema,
12133
12811
  themeNumberValueSchema,
12134
12812
  themeNumberValueSchema,
12135
12813
  themeNumberValueSchema
12136
12814
  ]);
12137
- var themeNumberInsetsValueSchema = z6.union([themeNumberInsetsSchema, fixedNumberInsetsSchema]);
12138
- var numberInsetsValueSchema = z6.union([
12815
+ var themeNumberInsetsValueSchema = z7.union([themeNumberInsetsSchema, fixedNumberInsetsSchema]);
12816
+ var numberInsetsValueSchema = z7.union([
12139
12817
  themeNumberInsetsValueSchema,
12140
12818
  numberExpressionSchema,
12141
12819
  zoomValueSchemaFor(themeNumberInsetsValueSchema)
12142
12820
  ]);
12143
- var lineCapSchema = z6.enum(["butt", "round", "square"]);
12144
- var lineCapValueSchema = z6.union([
12821
+ var lineCapSchema = z7.enum(["butt", "round", "square"]);
12822
+ var lineCapValueSchema = z7.union([
12145
12823
  lineCapSchema,
12146
12824
  structuralExpressionSchema,
12147
12825
  zoomValueSchemaFor(lineCapSchema)
12148
12826
  ]);
12149
- var lineJoinSchema = z6.enum(["bevel", "miter", "round"]);
12150
- var lineJoinValueSchema = z6.union([
12827
+ var lineJoinSchema = z7.enum(["bevel", "miter", "round"]);
12828
+ var lineJoinValueSchema = z7.union([
12151
12829
  lineJoinSchema,
12152
12830
  structuralExpressionSchema,
12153
12831
  zoomValueSchemaFor(lineJoinSchema)
12154
12832
  ]);
12155
- var exactFontFaceSchema = z6.string().min(1).max(100).refine(
12833
+ var exactFontFaceSchema = z7.string().min(1).max(100).refine(
12156
12834
  (value) => value === value.trim() && value === value.normalize("NFC") && !/[\p{Cc}\\]/u.test(value),
12157
12835
  "Expected an exact NFC font face name without surrounding whitespace, controls, or backslashes"
12158
12836
  );
12159
- var moduleFontValueSchema = z6.union([
12837
+ var moduleFontValueSchema = z7.union([
12160
12838
  exactFontFaceSchema,
12161
12839
  fixedStringSchema,
12162
- themeTokenReferenceSchema.extend({ category: z6.literal("font") })
12840
+ themeTokenReferenceSchema.extend({ category: z7.literal("font") })
12163
12841
  ]);
12164
- var moduleFontFallbacksSchema = z6.array(moduleFontValueSchema).max(8);
12165
- var hexColorSchema = z6.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, {
12842
+ var moduleFontFallbacksSchema = z7.array(moduleFontValueSchema).max(8);
12843
+ var hexColorSchema = z7.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, {
12166
12844
  message: "Expected a hex color like #F6F7F3 or #F6F7F3FF"
12167
12845
  });
12168
- var rgbColorSchema = z6.string().refine((value) => {
12846
+ var rgbColorSchema = z7.string().refine((value) => {
12169
12847
  const match2 = value.match(
12170
12848
  /^rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)(?:\s*,\s*(\d+(?:\.\d+)?))?\s*\)$/iu
12171
12849
  );
@@ -12174,21 +12852,21 @@ var rgbColorSchema = z6.string().refine((value) => {
12174
12852
  const alpha2 = Number(match2[4] ?? 1);
12175
12853
  return channels.every((channel) => channel >= 0 && channel <= 255) && alpha2 >= 0 && alpha2 <= 1;
12176
12854
  }, "Expected a Tileflow hex, rgb(), or rgba() color");
12177
- var terrainColorLiteralSchema = z6.union([hexColorSchema, rgbColorSchema]);
12178
- var terrainColorValueSchema = z6.union([
12855
+ var terrainColorLiteralSchema = z7.union([hexColorSchema, rgbColorSchema]);
12856
+ var terrainColorValueSchema = z7.union([
12179
12857
  terrainColorLiteralSchema,
12180
12858
  fixedStringSchema.extend({ value: terrainColorLiteralSchema }),
12181
- themeTokenReferenceSchema.extend({ category: z6.literal("color") }),
12859
+ themeTokenReferenceSchema.extend({ category: z7.literal("color") }),
12182
12860
  themeColorOperationSchema
12183
12861
  ]);
12184
12862
  function terrainNumberValueSchema(schema) {
12185
- return z6.union([schema, fixedNumberSchema.extend({ value: schema }), themeNumberReferenceSchema]);
12863
+ return z7.union([schema, fixedNumberSchema.extend({ value: schema }), themeNumberReferenceSchema]);
12186
12864
  }
12187
- var themeTypographyStyleSchema = z6.object({
12188
- fallbacks: z6.array(themeFontValueSchema).max(8).optional(),
12865
+ var themeTypographyStyleSchema = z7.object({
12866
+ fallbacks: z7.array(themeFontValueSchema).max(8).optional(),
12189
12867
  font: themeFontValueSchema.optional(),
12190
12868
  letterSpacing: themeNumberValueSchema.optional(),
12191
- transform: z6.enum(["lowercase", "none", "uppercase"]).optional()
12869
+ transform: z7.enum(["lowercase", "none", "uppercase"]).optional()
12192
12870
  }).strict();
12193
12871
  var themeTypographySchema = themeTypographyStyleSchema.extend({
12194
12872
  places: themeTypographyStyleSchema.optional(),
@@ -12196,46 +12874,57 @@ var themeTypographySchema = themeTypographyStyleSchema.extend({
12196
12874
  roads: themeTypographyStyleSchema.optional(),
12197
12875
  water: themeTypographyStyleSchema.optional()
12198
12876
  });
12199
- var themeLightingSchema = z6.object({
12200
- anchor: z6.enum(["map", "viewport"]).optional(),
12877
+ var themeLightingSchema = z7.object({
12878
+ ambient: z7.object({
12879
+ color: themeColorValueSchema.optional(),
12880
+ intensity: themeNumberValueSchema.optional()
12881
+ }).strict().optional(),
12882
+ anchor: z7.enum(["map", "viewport"]).optional(),
12201
12883
  color: themeColorValueSchema.optional(),
12202
12884
  intensity: themeNumberValueSchema.optional(),
12203
- position: z6.tuple([themeNumberValueSchema, themeNumberValueSchema, themeNumberValueSchema]).optional()
12885
+ position: z7.tuple([themeNumberValueSchema, themeNumberValueSchema, themeNumberValueSchema]).optional(),
12886
+ sun: z7.object({
12887
+ altitude: themeNumberValueSchema.optional(),
12888
+ azimuth: themeNumberValueSchema.optional(),
12889
+ color: themeColorValueSchema.optional(),
12890
+ intensity: themeNumberValueSchema.optional(),
12891
+ shadowIntensity: themeNumberValueSchema.optional()
12892
+ }).strict().optional()
12204
12893
  }).strict();
12205
- var tileflowThemeSchema = z6.object({
12206
- colorScheme: z6.enum(["light", "dark"]),
12894
+ var tileflowThemeSchema = z7.object({
12895
+ colorScheme: z7.enum(["light", "dark"]),
12207
12896
  id: tileflowThemeNameSchema,
12208
12897
  lighting: themeLightingSchema,
12209
- tokens: z6.object({
12210
- color: z6.record(themeTokenNameSchema, themeColorValueSchema),
12211
- font: z6.record(themeTokenNameSchema, themeFontValueSchema),
12212
- image: z6.record(themeTokenNameSchema, themeImageValueSchema),
12213
- number: z6.record(themeTokenNameSchema, themeNumberValueSchema)
12898
+ tokens: z7.object({
12899
+ color: z7.record(themeTokenNameSchema, themeColorValueSchema),
12900
+ font: z7.record(themeTokenNameSchema, themeFontValueSchema),
12901
+ image: z7.record(themeTokenNameSchema, themeImageValueSchema),
12902
+ number: z7.record(themeTokenNameSchema, themeNumberValueSchema)
12214
12903
  }).strict(),
12215
12904
  typography: themeTypographySchema,
12216
- version: z6.number().int().positive()
12905
+ version: z7.number().int().positive()
12217
12906
  }).strict();
12218
12907
  var rangeShape = {
12219
12908
  maxZoom: zoomNumberSchema.optional(),
12220
12909
  minZoom: zoomNumberSchema.optional(),
12221
- visible: z6.boolean().optional()
12910
+ visible: z7.boolean().optional()
12222
12911
  };
12223
- var backgroundStyleSchema = z6.object({
12912
+ var backgroundStyleSchema = z7.object({
12224
12913
  ...rangeShape,
12225
12914
  color: colorValueSchema.optional(),
12226
12915
  opacity: numberValueSchema.optional(),
12227
12916
  pattern: imageValueSchema.optional()
12228
12917
  }).strict();
12229
- var fillStyleSchema = z6.object({
12918
+ var fillStyleSchema = z7.object({
12230
12919
  ...rangeShape,
12231
- antialias: z6.boolean().optional(),
12920
+ antialias: z7.boolean().optional(),
12232
12921
  color: colorValueSchema.optional(),
12233
12922
  opacity: numberValueSchema.optional(),
12234
12923
  pattern: imageValueSchema.optional(),
12235
12924
  translate: numberOffsetValueSchema.optional(),
12236
- translateAnchor: z6.enum(["map", "viewport"]).optional()
12925
+ translateAnchor: z7.enum(["map", "viewport"]).optional()
12237
12926
  }).strict();
12238
- var lineStyleSchema = z6.object({
12927
+ var lineStyleSchema = z7.object({
12239
12928
  ...rangeShape,
12240
12929
  blur: numberValueSchema.optional(),
12241
12930
  cap: lineCapValueSchema.optional(),
@@ -12249,13 +12938,13 @@ var lineStyleSchema = z6.object({
12249
12938
  pattern: imageValueSchema.optional(),
12250
12939
  roundLimit: numberValueSchema.optional(),
12251
12940
  translate: numberOffsetValueSchema.optional(),
12252
- translateAnchor: z6.enum(["map", "viewport"]).optional(),
12941
+ translateAnchor: z7.enum(["map", "viewport"]).optional(),
12253
12942
  width: numberValueSchema.optional()
12254
12943
  }).strict();
12255
- var textStyleSchema = z6.object({
12944
+ var textStyleSchema = z7.object({
12256
12945
  ...rangeShape,
12257
- allowOverlap: z6.boolean().optional(),
12258
- anchor: z6.enum([
12946
+ allowOverlap: z7.boolean().optional(),
12947
+ anchor: z7.enum([
12259
12948
  "bottom",
12260
12949
  "bottom-left",
12261
12950
  "bottom-right",
@@ -12266,9 +12955,9 @@ var textStyleSchema = z6.object({
12266
12955
  "top-left",
12267
12956
  "top-right"
12268
12957
  ]).optional(),
12269
- background: z6.object({
12958
+ background: z7.object({
12270
12959
  color: colorValueSchema,
12271
- fit: z6.literal("lines"),
12960
+ fit: z7.literal("lines"),
12272
12961
  padding: themeNumberValueSchema.optional()
12273
12962
  }).strict().optional(),
12274
12963
  color: colorValueSchema.optional(),
@@ -12278,25 +12967,26 @@ var textStyleSchema = z6.object({
12278
12967
  haloBlur: numberValueSchema.optional(),
12279
12968
  haloColor: colorValueSchema.optional(),
12280
12969
  haloWidth: numberValueSchema.optional(),
12281
- ignorePlacement: z6.boolean().optional(),
12282
- justify: z6.enum(["auto", "center", "left", "right"]).optional(),
12283
- keepUpright: z6.boolean().optional(),
12970
+ ignorePlacement: z7.boolean().optional(),
12971
+ justify: z7.enum(["auto", "center", "left", "right"]).optional(),
12972
+ keepUpright: z7.boolean().optional(),
12284
12973
  letterSpacing: numberValueSchema.optional(),
12285
12974
  lineHeight: numberValueSchema.optional(),
12286
12975
  maxAngle: numberValueSchema.optional(),
12287
12976
  maxWidth: numberValueSchema.optional(),
12288
12977
  offset: numberOffsetValueSchema.optional(),
12289
- optional: z6.boolean().optional(),
12978
+ optional: z7.boolean().optional(),
12290
12979
  opacity: numberValueSchema.optional(),
12980
+ overlap: z7.enum(["always", "cooperative", "never"]).optional(),
12291
12981
  padding: numberValueSchema.optional(),
12292
- pitchAlignment: z6.enum(["auto", "map", "viewport"]).optional(),
12982
+ pitchAlignment: z7.enum(["auto", "map", "viewport"]).optional(),
12293
12983
  radialOffset: numberValueSchema.optional(),
12294
12984
  rotate: numberValueSchema.optional(),
12295
- rotationAlignment: z6.enum(["auto", "map", "viewport"]).optional(),
12985
+ rotationAlignment: z7.enum(["auto", "map", "viewport"]).optional(),
12296
12986
  size: numberValueSchema.optional(),
12297
- transform: z6.enum(["lowercase", "none", "uppercase"]).optional(),
12298
- variableAnchors: z6.array(
12299
- z6.enum([
12987
+ transform: z7.enum(["lowercase", "none", "uppercase"]).optional(),
12988
+ variableAnchors: z7.array(
12989
+ z7.enum([
12300
12990
  "bottom",
12301
12991
  "bottom-left",
12302
12992
  "bottom-right",
@@ -12309,10 +12999,10 @@ var textStyleSchema = z6.object({
12309
12999
  ])
12310
13000
  ).min(1).optional()
12311
13001
  }).strict();
12312
- var iconStyleSchema = z6.object({
13002
+ var iconStyleSchema = z7.object({
12313
13003
  ...rangeShape,
12314
- allowOverlap: z6.boolean().optional(),
12315
- anchor: z6.enum([
13004
+ allowOverlap: z7.boolean().optional(),
13005
+ anchor: z7.enum([
12316
13006
  "bottom",
12317
13007
  "bottom-left",
12318
13008
  "bottom-right",
@@ -12327,60 +13017,61 @@ var iconStyleSchema = z6.object({
12327
13017
  haloBlur: numberValueSchema.optional(),
12328
13018
  haloColor: colorValueSchema.optional(),
12329
13019
  haloWidth: numberValueSchema.optional(),
12330
- ignorePlacement: z6.boolean().optional(),
13020
+ ignorePlacement: z7.boolean().optional(),
12331
13021
  image: imageValueSchema.optional(),
12332
13022
  offset: numberOffsetValueSchema.optional(),
12333
13023
  opacity: numberValueSchema.optional(),
12334
- keepUpright: z6.boolean().optional(),
12335
- optional: z6.boolean().optional(),
13024
+ keepUpright: z7.boolean().optional(),
13025
+ optional: z7.boolean().optional(),
13026
+ overlap: z7.enum(["always", "cooperative", "never"]).optional(),
12336
13027
  padding: numberValueSchema.optional(),
12337
- pitchAlignment: z6.enum(["auto", "map", "viewport"]).optional(),
13028
+ pitchAlignment: z7.enum(["auto", "map", "viewport"]).optional(),
12338
13029
  rotate: numberValueSchema.optional(),
12339
- rotationAlignment: z6.enum(["auto", "map", "viewport"]).optional(),
13030
+ rotationAlignment: z7.enum(["auto", "map", "viewport"]).optional(),
12340
13031
  size: numberValueSchema.optional(),
12341
- textFit: z6.enum(["both", "height", "none", "width"]).optional(),
13032
+ textFit: z7.enum(["both", "height", "none", "width"]).optional(),
12342
13033
  textFitPadding: numberInsetsValueSchema.optional()
12343
13034
  }).strict();
12344
13035
  var symbolPlacementShape = {
12345
13036
  ...rangeShape,
12346
- placement: z6.enum(["line", "line-center", "point"]).optional(),
13037
+ placement: z7.enum(["line", "line-center", "point"]).optional(),
12347
13038
  priority: structuralNumberValueSchema.optional(),
12348
- priorityOrder: z6.enum(["higher-first", "lower-first"]).optional(),
13039
+ priorityOrder: z7.enum(["higher-first", "lower-first"]).optional(),
12349
13040
  spacing: numberValueSchema.optional(),
12350
- zOrder: z6.enum(["auto", "source", "viewport-y"]).optional()
13041
+ zOrder: z7.enum(["auto", "source", "viewport-y"]).optional()
12351
13042
  };
12352
- var circleStyleSchema = z6.object({
13043
+ var circleStyleSchema = z7.object({
12353
13044
  ...rangeShape,
12354
13045
  blur: numberValueSchema.optional(),
12355
13046
  color: colorValueSchema.optional(),
12356
13047
  opacity: numberValueSchema.optional(),
12357
- pitchAlignment: z6.enum(["map", "viewport"]).optional(),
12358
- pitchScale: z6.enum(["map", "viewport"]).optional(),
13048
+ pitchAlignment: z7.enum(["map", "viewport"]).optional(),
13049
+ pitchScale: z7.enum(["map", "viewport"]).optional(),
12359
13050
  priority: structuralNumberValueSchema.optional(),
12360
- priorityOrder: z6.enum(["higher-first", "lower-first"]).optional(),
13051
+ priorityOrder: z7.enum(["higher-first", "lower-first"]).optional(),
12361
13052
  radius: numberValueSchema.optional(),
12362
13053
  strokeColor: colorValueSchema.optional(),
12363
13054
  strokeOpacity: numberValueSchema.optional(),
12364
13055
  strokeWidth: numberValueSchema.optional(),
12365
13056
  translate: numberOffsetValueSchema.optional(),
12366
- translateAnchor: z6.enum(["map", "viewport"]).optional()
13057
+ translateAnchor: z7.enum(["map", "viewport"]).optional()
12367
13058
  }).strict();
12368
- var extrusionStyleSchema = z6.object({
13059
+ var extrusionStyleSchema = z7.object({
12369
13060
  ...rangeShape,
12370
13061
  base: numberValueSchema.optional(),
12371
13062
  color: colorValueSchema.optional(),
12372
13063
  height: numberValueSchema.optional(),
12373
13064
  opacity: numberValueSchema.optional(),
12374
13065
  pattern: imageValueSchema.optional(),
12375
- verticalGradient: z6.boolean().optional()
13066
+ verticalGradient: z7.boolean().optional()
12376
13067
  }).strict();
12377
- var areaStyleSchema = z6.object({ fill: fillStyleSchema.optional(), outline: lineStyleSchema.optional() }).strict();
12378
- var lineStackStyleSchema = z6.object({
13068
+ var areaStyleSchema = z7.object({ fill: fillStyleSchema.optional(), outline: lineStyleSchema.optional() }).strict();
13069
+ var lineStackStyleSchema = z7.object({
12379
13070
  casing: lineStyleSchema.optional(),
12380
13071
  fill: lineStyleSchema.optional(),
12381
13072
  shadow: lineStyleSchema.optional()
12382
13073
  }).strict();
12383
- var lineHatchStyleSchema = z6.object({
13074
+ var lineHatchStyleSchema = z7.object({
12384
13075
  ...rangeShape,
12385
13076
  angle: numberValueSchema.optional(),
12386
13077
  color: colorValueSchema.optional(),
@@ -12429,62 +13120,62 @@ var lineHatchStyleSchema = z6.object({
12429
13120
  }
12430
13121
  });
12431
13122
  var roadLayerStyleSchema = lineStackStyleSchema.extend({ hatch: lineHatchStyleSchema.optional() }).strict();
12432
- var symbolStyleSchema = z6.object({
13123
+ var symbolStyleSchema = z7.object({
12433
13124
  ...symbolPlacementShape,
12434
13125
  icon: iconStyleSchema.optional(),
12435
13126
  text: textStyleSchema.optional()
12436
13127
  }).strict();
12437
13128
  var markerSymbolStyleSchema = symbolStyleSchema.extend({ marker: circleStyleSchema.optional() }).strict();
12438
13129
  var poiCategoryStyleSchema = markerSymbolStyleSchema.omit({ priority: true, priorityOrder: true }).extend({
12439
- density: z6.union([z6.literal(1), z6.literal(2), z6.literal(3), z6.literal(4), z6.literal(5)]).optional()
13130
+ density: z7.union([z7.literal(1), z7.literal(2), z7.literal(3), z7.literal(4), z7.literal(5)]).optional()
12440
13131
  }).strict();
12441
- var renderScalarSchema = z6.union([z6.boolean(), z6.number().finite(), z6.string()]);
12442
- var renderTargetSchema = z6.string().regex(tileflowSemanticTargetPattern, "Expected a semantic target");
12443
- var renderStackOperationNameSchema = z6.string().regex(
13132
+ var renderScalarSchema = z7.union([z7.boolean(), z7.number().finite(), z7.string()]);
13133
+ var renderTargetSchema = z7.string().regex(tileflowSemanticTargetPattern, "Expected a semantic target");
13134
+ var renderStackOperationNameSchema = z7.string().regex(
12444
13135
  tileflowRenderStackOperationNamePattern,
12445
13136
  "Expected a lowercase-initial portable render-stack operation name without dots"
12446
13137
  );
12447
13138
  var renderFieldNormalizationShape = {
12448
- coerce: z6.literal("number").optional(),
13139
+ coerce: z7.literal("number").optional(),
12449
13140
  fallback: renderScalarSchema.optional(),
12450
- field: z6.enum(tileflowSemanticFieldNames)
13141
+ field: z7.enum(tileflowSemanticFieldNames)
12451
13142
  };
12452
- var renderSelectorNodeSchema = z6.lazy(
12453
- () => z6.discriminatedUnion("kind", [
12454
- z6.object({ kind: z6.literal("literal"), value: z6.boolean() }).strict(),
12455
- z6.object({ kind: z6.literal("geometry"), geometry: z6.enum(tileflowRenderSelectorGeometries) }).strict(),
12456
- z6.object({ kind: z6.literal("has"), field: z6.enum(tileflowSemanticFieldNames) }).strict(),
12457
- z6.object({
13143
+ var renderSelectorNodeSchema = z7.lazy(
13144
+ () => z7.discriminatedUnion("kind", [
13145
+ z7.object({ kind: z7.literal("literal"), value: z7.boolean() }).strict(),
13146
+ z7.object({ kind: z7.literal("geometry"), geometry: z7.enum(tileflowRenderSelectorGeometries) }).strict(),
13147
+ z7.object({ kind: z7.literal("has"), field: z7.enum(tileflowSemanticFieldNames) }).strict(),
13148
+ z7.object({
12458
13149
  ...renderFieldNormalizationShape,
12459
- kind: z6.literal("compare"),
12460
- operator: z6.enum(tileflowRenderSelectorComparisons),
13150
+ kind: z7.literal("compare"),
13151
+ operator: z7.enum(tileflowRenderSelectorComparisons),
12461
13152
  value: renderScalarSchema
12462
13153
  }).strict(),
12463
- z6.object({
13154
+ z7.object({
12464
13155
  ...renderFieldNormalizationShape,
12465
- kind: z6.literal("in"),
12466
- values: z6.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
13156
+ kind: z7.literal("in"),
13157
+ values: z7.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
12467
13158
  }).strict(),
12468
- z6.object({
13159
+ z7.object({
12469
13160
  ...renderFieldNormalizationShape,
12470
- branches: z6.array(
12471
- z6.object({
12472
- result: z6.boolean(),
12473
- values: z6.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
13161
+ branches: z7.array(
13162
+ z7.object({
13163
+ result: z7.boolean(),
13164
+ values: z7.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
12474
13165
  }).strict()
12475
13166
  ).min(1).max(tileflowRenderStackLimits.maxMatchBranches),
12476
- kind: z6.literal("match"),
12477
- otherwise: z6.boolean()
13167
+ kind: z7.literal("match"),
13168
+ otherwise: z7.boolean()
12478
13169
  }).strict(),
12479
- z6.object({ kind: z6.literal("not"), selector: renderSelectorNodeSchema }).strict(),
12480
- z6.object({
12481
- kind: z6.enum(["all", "any"]),
12482
- selectors: z6.array(renderSelectorNodeSchema).min(1).max(tileflowRenderStackLimits.maxSelectorChildren)
13170
+ z7.object({ kind: z7.literal("not"), selector: renderSelectorNodeSchema }).strict(),
13171
+ z7.object({
13172
+ kind: z7.enum(["all", "any"]),
13173
+ selectors: z7.array(renderSelectorNodeSchema).min(1).max(tileflowRenderStackLimits.maxSelectorChildren)
12483
13174
  }).strict(),
12484
- z6.object({
13175
+ z7.object({
12485
13176
  fallback: renderSelectorNodeSchema,
12486
- kind: z6.literal("step"),
12487
- stops: z6.array(z6.object({ selector: renderSelectorNodeSchema, zoom: zoomNumberSchema }).strict()).min(1).max(tileflowRenderStackLimits.maxStepStops)
13177
+ kind: z7.literal("step"),
13178
+ stops: z7.array(z7.object({ selector: renderSelectorNodeSchema, zoom: zoomNumberSchema }).strict()).min(1).max(tileflowRenderStackLimits.maxStepStops)
12488
13179
  }).strict()
12489
13180
  ])
12490
13181
  );
@@ -12495,7 +13186,7 @@ var renderSelectorSchema = renderSelectorNodeSchema.superRefine(
12495
13186
  }
12496
13187
  }
12497
13188
  );
12498
- var renderVisibilitySchema = z6.object({ visibilityGroup: z6.literal("building").optional() });
13189
+ var renderVisibilitySchema = z7.object({ visibilityGroup: z7.literal("building").optional() });
12499
13190
  var renderStyleSchemas = {
12500
13191
  background: backgroundStyleSchema.extend(renderVisibilitySchema.shape).strict(),
12501
13192
  circle: circleStyleSchema.extend(renderVisibilitySchema.shape).strict(),
@@ -12504,7 +13195,7 @@ var renderStyleSchemas = {
12504
13195
  line: lineStyleSchema.extend(renderVisibilitySchema.shape).strict(),
12505
13196
  symbol: symbolStyleSchema.extend(renderVisibilitySchema.shape).strict()
12506
13197
  };
12507
- var renderRequirementsSchema = z6.array(z6.enum(tileflowLayerDomains)).min(1).max(tileflowRenderStackLimits.maxRequirements).superRefine((requirements, context) => {
13198
+ var renderRequirementsSchema = z7.array(z7.enum(tileflowLayerDomains)).min(1).max(tileflowRenderStackLimits.maxRequirements).superRefine((requirements, context) => {
12508
13199
  const seen = /* @__PURE__ */ new Set();
12509
13200
  for (const [index, requirement] of requirements.entries()) {
12510
13201
  if (seen.has(requirement)) {
@@ -12517,55 +13208,55 @@ var renderRequirementsSchema = z6.array(z6.enum(tileflowLayerDomains)).min(1).ma
12517
13208
  seen.add(requirement);
12518
13209
  }
12519
13210
  });
12520
- var renderPlacementSchema = z6.union([
12521
- z6.enum(tileflowBandPlacements),
12522
- z6.object({ above: renderTargetSchema }).strict(),
12523
- z6.object({ below: renderTargetSchema }).strict()
13211
+ var renderPlacementSchema = z7.union([
13212
+ z7.enum(tileflowBandPlacements),
13213
+ z7.object({ above: renderTargetSchema }).strict(),
13214
+ z7.object({ below: renderTargetSchema }).strict()
12524
13215
  ]);
12525
13216
  var vectorRenderPassSchemas = tileflowRenderStackRenderers.filter((renderer) => renderer !== "background").map(
12526
- (renderer) => z6.object({
12527
- feature: z6.enum(tileflowSemanticLayerNames).optional(),
12528
- kind: z6.literal("render-pass"),
13217
+ (renderer) => z7.object({
13218
+ feature: z7.enum(tileflowSemanticLayerNames).optional(),
13219
+ kind: z7.literal("render-pass"),
12529
13220
  placement: renderPlacementSchema,
12530
- renderer: z6.literal(renderer),
13221
+ renderer: z7.literal(renderer),
12531
13222
  requirements: renderRequirementsSchema.optional(),
12532
13223
  selector: renderSelectorSchema.optional(),
12533
13224
  style: renderStyleSchemas[renderer]
12534
13225
  }).strict()
12535
13226
  );
12536
- var renderPassSchema = z6.discriminatedUnion("renderer", [
12537
- z6.object({
12538
- kind: z6.literal("render-pass"),
13227
+ var renderPassSchema = z7.discriminatedUnion("renderer", [
13228
+ z7.object({
13229
+ kind: z7.literal("render-pass"),
12539
13230
  placement: renderPlacementSchema,
12540
- renderer: z6.literal("background"),
13231
+ renderer: z7.literal("background"),
12541
13232
  requirements: renderRequirementsSchema.optional(),
12542
13233
  style: renderStyleSchemas.background
12543
13234
  }).strict(),
12544
13235
  ...vectorRenderPassSchemas
12545
13236
  ]);
12546
13237
  var renderRefinementSchemas = tileflowRenderStackRenderers.map(
12547
- (renderer) => z6.object({
12548
- kind: z6.literal("refine-render-target"),
13238
+ (renderer) => z7.object({
13239
+ kind: z7.literal("refine-render-target"),
12549
13240
  placement: renderPlacementSchema.optional(),
12550
13241
  requirements: renderRequirementsSchema.optional(),
12551
- renderer: z6.literal(renderer),
13242
+ renderer: z7.literal(renderer),
12552
13243
  ...renderer === "background" ? {} : { selector: renderSelectorSchema.optional() },
12553
13244
  style: renderStyleSchemas[renderer],
12554
13245
  target: renderTargetSchema
12555
13246
  }).strict()
12556
13247
  );
12557
- var renderPlacementRefinementSchema = z6.object({
12558
- kind: z6.literal("refine-render-target"),
13248
+ var renderPlacementRefinementSchema = z7.object({
13249
+ kind: z7.literal("refine-render-target"),
12559
13250
  placement: renderPlacementSchema,
12560
13251
  requirements: renderRequirementsSchema.optional(),
12561
13252
  target: renderTargetSchema
12562
13253
  }).strict();
12563
- var renderStackOperationSchema = z6.union([
13254
+ var renderStackOperationSchema = z7.union([
12564
13255
  renderPassSchema,
12565
13256
  ...renderRefinementSchemas,
12566
13257
  renderPlacementRefinementSchema
12567
13258
  ]);
12568
- var renderStackSchema = z6.record(renderStackOperationNameSchema, renderStackOperationSchema).superRefine((stack, context) => {
13259
+ var renderStackSchema = z7.record(renderStackOperationNameSchema, renderStackOperationSchema).superRefine((stack, context) => {
12569
13260
  const size = Object.keys(stack).length;
12570
13261
  if (size === 0) {
12571
13262
  context.addIssue({
@@ -12580,19 +13271,19 @@ var renderStackSchema = z6.record(renderStackOperationNameSchema, renderStackOpe
12580
13271
  });
12581
13272
  }
12582
13273
  }).describe("tileflow-render-stack");
12583
- var roadClassSchema = z6.enum(tileflowRoadClasses);
12584
- var roadClassStyleSchema = z6.object({
12585
- enabled: z6.boolean().optional(),
13274
+ var roadClassSchema = z7.enum(tileflowRoadClasses);
13275
+ var roadClassStyleSchema = z7.object({
13276
+ enabled: z7.boolean().optional(),
12586
13277
  bridge: roadLayerStyleSchema.optional(),
12587
13278
  surface: roadLayerStyleSchema.optional(),
12588
13279
  tunnel: roadLayerStyleSchema.optional()
12589
13280
  }).strict();
12590
- var roadStructureMapSchema = z6.object({
13281
+ var roadStructureMapSchema = z7.object({
12591
13282
  bridge: roadLayerStyleSchema.optional(),
12592
13283
  surface: roadLayerStyleSchema.optional(),
12593
13284
  tunnel: roadLayerStyleSchema.optional()
12594
13285
  }).strict();
12595
- var roadTreatmentLayerStyleSchema = z6.object({
13286
+ var roadTreatmentLayerStyleSchema = z7.object({
12596
13287
  casing: lineStyleSchema.pick({
12597
13288
  blur: true,
12598
13289
  color: true,
@@ -12621,19 +13312,19 @@ var roadTreatmentLayerStyleSchema = z6.object({
12621
13312
  width: true
12622
13313
  }).optional()
12623
13314
  }).strict();
12624
- var roadTreatmentStyleSchema = z6.object({
13315
+ var roadTreatmentStyleSchema = z7.object({
12625
13316
  bridge: roadTreatmentLayerStyleSchema.optional(),
12626
- enabled: z6.boolean().optional(),
13317
+ enabled: z7.boolean().optional(),
12627
13318
  surface: roadTreatmentLayerStyleSchema.optional(),
12628
13319
  tunnel: roadTreatmentLayerStyleSchema.optional(),
12629
13320
  widthScale: themeNumberValueSchema.optional()
12630
13321
  }).strict();
12631
- var landModuleSchema = z6.object({
12632
- type: z6.literal("land"),
13322
+ var landModuleSchema = z7.object({
13323
+ type: z7.literal("land"),
12633
13324
  background: backgroundStyleSchema.optional(),
12634
- enabled: z6.boolean().optional(),
13325
+ enabled: z7.boolean().optional(),
12635
13326
  globalLandcover: fillStyleSchema.optional(),
12636
- landcover: z6.object({
13327
+ landcover: z7.object({
12637
13328
  farmland: areaStyleSchema.optional(),
12638
13329
  flowerbed: areaStyleSchema.optional(),
12639
13330
  grass: areaStyleSchema.optional(),
@@ -12649,7 +13340,7 @@ var landModuleSchema = z6.object({
12649
13340
  wetland: areaStyleSchema.optional(),
12650
13341
  wood: areaStyleSchema.optional()
12651
13342
  }).strict().optional(),
12652
- landuse: z6.object({
13343
+ landuse: z7.object({
12653
13344
  cemetery: areaStyleSchema.optional(),
12654
13345
  civic: areaStyleSchema.optional(),
12655
13346
  commercial: areaStyleSchema.optional(),
@@ -12665,99 +13356,99 @@ var landModuleSchema = z6.object({
12665
13356
  }).strict().optional(),
12666
13357
  renderStack: renderStackSchema.optional()
12667
13358
  }).strict();
12668
- var waterModuleSchema = z6.object({
12669
- type: z6.literal("water"),
13359
+ var waterModuleSchema = z7.object({
13360
+ type: z7.literal("water"),
12670
13361
  bathymetry: fillStyleSchema.optional(),
12671
13362
  bathymetryContours: lineStyleSchema.optional(),
12672
13363
  bathymetryLabels: symbolStyleSchema.optional(),
12673
13364
  bodies: areaStyleSchema.optional(),
12674
- enabled: z6.boolean().optional(),
12675
- intermittent: z6.object({ bodies: areaStyleSchema.optional(), waterways: lineStyleSchema.optional() }).strict().optional(),
13365
+ enabled: z7.boolean().optional(),
13366
+ intermittent: z7.object({ bodies: areaStyleSchema.optional(), waterways: lineStyleSchema.optional() }).strict().optional(),
12676
13367
  renderStack: renderStackSchema.optional(),
12677
- waterways: z6.object({
13368
+ waterways: z7.object({
12678
13369
  canal: lineStyleSchema.optional(),
12679
13370
  other: lineStyleSchema.optional(),
12680
13371
  river: lineStyleSchema.optional(),
12681
13372
  stream: lineStyleSchema.optional()
12682
13373
  }).strict().optional()
12683
13374
  }).strict();
12684
- var buildingsModuleSchema = z6.object({
12685
- type: z6.literal("buildings"),
13375
+ var buildingsModuleSchema = z7.object({
13376
+ type: z7.literal("buildings"),
12686
13377
  businessCorridor: areaStyleSchema.optional(),
12687
- enabled: z6.boolean().optional(),
13378
+ enabled: z7.boolean().optional(),
12688
13379
  extrusion: extrusionStyleSchema.optional(),
12689
13380
  flat: areaStyleSchema.optional(),
12690
- mode: z6.enum(["3d", "flat"]).optional(),
13381
+ mode: z7.enum(["3d", "flat"]).optional(),
12691
13382
  renderStack: renderStackSchema.optional()
12692
13383
  }).strict();
12693
- var addressesModuleSchema = z6.object({
12694
- type: z6.literal("addresses"),
12695
- enabled: z6.boolean().optional(),
13384
+ var addressesModuleSchema = z7.object({
13385
+ type: z7.literal("addresses"),
13386
+ enabled: z7.boolean().optional(),
12696
13387
  labels: symbolStyleSchema.optional(),
12697
13388
  renderStack: renderStackSchema.optional()
12698
13389
  }).strict();
12699
- var landformClassSchema = z6.enum(tileflowLandformClasses);
12700
- var landformsModuleSchema = z6.object({
12701
- type: z6.literal("landforms"),
12702
- classes: z6.partialRecord(landformClassSchema, symbolStyleSchema).optional(),
12703
- elevation: z6.boolean().optional(),
12704
- enabled: z6.boolean().optional(),
13390
+ var landformClassSchema = z7.enum(tileflowLandformClasses);
13391
+ var landformsModuleSchema = z7.object({
13392
+ type: z7.literal("landforms"),
13393
+ classes: z7.partialRecord(landformClassSchema, symbolStyleSchema).optional(),
13394
+ elevation: z7.boolean().optional(),
13395
+ enabled: z7.boolean().optional(),
12705
13396
  renderStack: renderStackSchema.optional()
12706
13397
  }).strict();
12707
- var boundariesModuleSchema = z6.object({
12708
- type: z6.literal("boundaries"),
13398
+ var boundariesModuleSchema = z7.object({
13399
+ type: z7.literal("boundaries"),
12709
13400
  admin2: lineStyleSchema.optional(),
12710
13401
  admin4: lineStyleSchema.optional(),
12711
13402
  disputed: lineStyleSchema.optional(),
12712
- enabled: z6.boolean().optional(),
13403
+ enabled: z7.boolean().optional(),
12713
13404
  maritime: lineStyleSchema.optional(),
12714
13405
  renderStack: renderStackSchema.optional()
12715
13406
  }).strict();
12716
- var aerowaysModuleSchema = z6.object({
12717
- type: z6.literal("aeroways"),
13407
+ var aerowaysModuleSchema = z7.object({
13408
+ type: z7.literal("aeroways"),
12718
13409
  area: areaStyleSchema.optional(),
12719
- enabled: z6.boolean().optional(),
13410
+ enabled: z7.boolean().optional(),
12720
13411
  runway: lineStackStyleSchema.optional(),
12721
13412
  runwayRef: symbolStyleSchema.optional(),
12722
13413
  renderStack: renderStackSchema.optional(),
12723
13414
  taxiway: lineStackStyleSchema.optional()
12724
13415
  }).strict();
12725
- var transitModuleSchema = z6.object({
12726
- type: z6.literal("transit"),
13416
+ var transitModuleSchema = z7.object({
13417
+ type: z7.literal("transit"),
12727
13418
  cableway: lineStyleSchema.optional(),
12728
- enabled: z6.boolean().optional(),
13419
+ enabled: z7.boolean().optional(),
12729
13420
  ferry: lineStyleSchema.optional(),
12730
- rail: z6.object({
13421
+ rail: z7.object({
12731
13422
  bridge: lineStyleSchema.optional(),
12732
13423
  surface: lineStyleSchema.optional(),
12733
13424
  tunnel: lineStyleSchema.optional()
12734
13425
  }).strict().optional(),
12735
- railHatching: z6.object({
13426
+ railHatching: z7.object({
12736
13427
  bridge: lineStyleSchema.optional(),
12737
13428
  surface: lineStyleSchema.optional(),
12738
13429
  tunnel: lineStyleSchema.optional()
12739
13430
  }).strict().optional(),
12740
- serviceRail: z6.object({
13431
+ serviceRail: z7.object({
12741
13432
  bridge: lineStyleSchema.optional(),
12742
13433
  surface: lineStyleSchema.optional(),
12743
13434
  tunnel: lineStyleSchema.optional()
12744
13435
  }).strict().optional(),
12745
13436
  renderStack: renderStackSchema.optional()
12746
13437
  }).strict();
12747
- var roadsModuleSchema = z6.object({
12748
- type: z6.literal("roads"),
12749
- areas: z6.object({
13438
+ var roadsModuleSchema = z7.object({
13439
+ type: z7.literal("roads"),
13440
+ areas: z7.object({
12750
13441
  pedestrian: areaStyleSchema.optional(),
12751
13442
  pier: areaStyleSchema.optional(),
12752
13443
  road: areaStyleSchema.optional()
12753
13444
  }).strict().optional(),
12754
- classes: z6.partialRecord(roadClassSchema, roadClassStyleSchema).optional(),
13445
+ classes: z7.partialRecord(roadClassSchema, roadClassStyleSchema).optional(),
12755
13446
  crossings: iconStyleSchema.extend({ image: imageValueSchema }).strict().optional(),
12756
- detail: z6.enum(["none", "highways", "major", "streets", "all"]).optional(),
12757
- enabled: z6.boolean().optional(),
12758
- extras: z6.object({ paths: z6.boolean().optional() }).strict().optional(),
12759
- hierarchy: z6.enum(["subtle", "clear", "strong"]).optional(),
12760
- modifiers: z6.object({
13447
+ detail: z7.enum(["none", "highways", "major", "streets", "all"]).optional(),
13448
+ enabled: z7.boolean().optional(),
13449
+ extras: z7.object({ paths: z7.boolean().optional() }).strict().optional(),
13450
+ hierarchy: z7.enum(["subtle", "clear", "strong"]).optional(),
13451
+ modifiers: z7.object({
12761
13452
  construction: roadTreatmentStyleSchema.optional(),
12762
13453
  expressway: roadTreatmentStyleSchema.optional(),
12763
13454
  indoor: roadTreatmentStyleSchema.optional(),
@@ -12765,7 +13456,7 @@ var roadsModuleSchema = z6.object({
12765
13456
  ramp: roadTreatmentStyleSchema.optional(),
12766
13457
  unpaved: roadTreatmentStyleSchema.optional()
12767
13458
  }).strict().optional(),
12768
- mountainBike: z6.object({
13459
+ mountainBike: z7.object({
12769
13460
  "0": roadTreatmentStyleSchema.optional(),
12770
13461
  "0+": roadTreatmentStyleSchema.optional(),
12771
13462
  "1": roadTreatmentStyleSchema.optional(),
@@ -12778,9 +13469,9 @@ var roadsModuleSchema = z6.object({
12778
13469
  "5": roadTreatmentStyleSchema.optional(),
12779
13470
  "6": roadTreatmentStyleSchema.optional()
12780
13471
  }).strict().optional(),
12781
- oneWayMarkers: z6.boolean().optional(),
12782
- outline: z6.enum(["none", "subtle", "strong"]).optional(),
12783
- restrictions: z6.object({
13472
+ oneWayMarkers: z7.boolean().optional(),
13473
+ outline: z7.enum(["none", "subtle", "strong"]).optional(),
13474
+ restrictions: z7.object({
12784
13475
  access: roadTreatmentStyleSchema.optional(),
12785
13476
  bicycle: roadTreatmentStyleSchema.optional(),
12786
13477
  foot: roadTreatmentStyleSchema.optional(),
@@ -12788,24 +13479,24 @@ var roadsModuleSchema = z6.object({
12788
13479
  toll: roadTreatmentStyleSchema.optional()
12789
13480
  }).strict().optional(),
12790
13481
  renderStack: renderStackSchema.optional(),
12791
- roundabouts: z6.object({ casing: circleStyleSchema.optional(), fill: circleStyleSchema.optional() }).strict().optional(),
12792
- serviceTypes: z6.object({
13482
+ roundabouts: z7.object({ casing: circleStyleSchema.optional(), fill: circleStyleSchema.optional() }).strict().optional(),
13483
+ serviceTypes: z7.object({
12793
13484
  alley: roadTreatmentStyleSchema.optional(),
12794
13485
  crossover: roadTreatmentStyleSchema.optional(),
12795
13486
  driveway: roadTreatmentStyleSchema.optional(),
12796
13487
  parkingAisle: roadTreatmentStyleSchema.optional(),
12797
13488
  yard: roadTreatmentStyleSchema.optional()
12798
13489
  }).strict().optional(),
12799
- sidewalks: z6.object({
13490
+ sidewalks: z7.object({
12800
13491
  outline: lineStyleSchema.optional(),
12801
13492
  pattern: fillStyleSchema.optional(),
12802
13493
  surface: fillStyleSchema.optional()
12803
13494
  }).strict().optional(),
12804
13495
  structures: roadStructureMapSchema.optional(),
12805
- weight: z6.enum(["thin", "regular", "bold"]).optional(),
12806
- widthScale: z6.partialRecord(roadClassSchema, themeNumberValueSchema).optional()
13496
+ weight: z7.enum(["thin", "regular", "bold"]).optional(),
13497
+ widthScale: z7.partialRecord(roadClassSchema, themeNumberValueSchema).optional()
12807
13498
  }).strict();
12808
- var placeLabelStylesSchema = z6.object({
13499
+ var placeLabelStylesSchema = z7.object({
12809
13500
  city: symbolStyleSchema.optional(),
12810
13501
  continent: symbolStyleSchema.optional(),
12811
13502
  country: symbolStyleSchema.optional(),
@@ -12815,65 +13506,65 @@ var placeLabelStylesSchema = z6.object({
12815
13506
  town: symbolStyleSchema.optional(),
12816
13507
  village: symbolStyleSchema.optional()
12817
13508
  }).strict();
12818
- var waterLabelStylesSchema = z6.object({
13509
+ var waterLabelStylesSchema = z7.object({
12819
13510
  line: symbolStyleSchema.optional(),
12820
13511
  ocean: symbolStyleSchema.optional(),
12821
13512
  other: symbolStyleSchema.optional(),
12822
13513
  waterway: symbolStyleSchema.optional()
12823
13514
  }).strict();
12824
- var labelsModuleSchema = z6.object({
12825
- type: z6.literal("labels"),
12826
- aerodromeCodes: z6.enum(["none", "iata", "all"]).optional(),
12827
- collisionPriority: z6.enum(["balanced", "navigation"]).optional(),
12828
- enabled: z6.boolean().optional(),
12829
- junctions: z6.boolean().optional(),
12830
- language: z6.string().trim().min(1).optional(),
12831
- places: z6.enum(["none", "major", "all"]).optional(),
12832
- roadClasses: z6.array(roadClassSchema).min(1).optional(),
13515
+ var labelsModuleSchema = z7.object({
13516
+ type: z7.literal("labels"),
13517
+ aerodromeCodes: z7.enum(["none", "iata", "all"]).optional(),
13518
+ collisionPriority: z7.enum(["balanced", "navigation"]).optional(),
13519
+ enabled: z7.boolean().optional(),
13520
+ junctions: z7.boolean().optional(),
13521
+ language: z7.string().trim().min(1).optional(),
13522
+ places: z7.enum(["none", "major", "all"]).optional(),
13523
+ roadClasses: z7.array(roadClassSchema).min(1).optional(),
12833
13524
  renderStack: renderStackSchema.optional(),
12834
- roads: z6.enum(["none", "highways", "major", "streets", "all"]).optional(),
12835
- styles: z6.object({
13525
+ roads: z7.enum(["none", "highways", "major", "streets", "all"]).optional(),
13526
+ styles: z7.object({
12836
13527
  aerodrome: symbolStyleSchema.optional(),
12837
13528
  junctions: symbolStyleSchema.optional(),
12838
13529
  places: placeLabelStylesSchema.optional(),
12839
- roads: z6.partialRecord(roadClassSchema, symbolStyleSchema).optional(),
12840
- shields: z6.object({
13530
+ roads: z7.partialRecord(roadClassSchema, symbolStyleSchema).optional(),
13531
+ shields: z7.object({
12841
13532
  default: symbolStyleSchema.optional(),
12842
13533
  detail: symbolStyleSchema.optional(),
12843
- kinds: z6.record(identifierSchema, z6.object({ image: themeImageValueSchema }).strict()).optional(),
13534
+ kinds: z7.record(identifierSchema, z7.object({ image: themeImageValueSchema }).strict()).optional(),
12844
13535
  overview: symbolStyleSchema.optional(),
12845
- textColors: z6.record(identifierSchema, z6.object({ color: themeColorValueSchema }).strict()).optional()
13536
+ textColors: z7.record(identifierSchema, z7.object({ color: themeColorValueSchema }).strict()).optional()
12846
13537
  }).strict().optional(),
12847
13538
  water: waterLabelStylesSchema.optional()
12848
13539
  }).strict().optional(),
12849
- shields: z6.enum(["none", "major", "all"]).optional(),
12850
- water: z6.enum(["none", "major", "all"]).optional()
13540
+ shields: z7.enum(["none", "major", "all"]).optional(),
13541
+ water: z7.enum(["none", "major", "all"]).optional()
12851
13542
  }).strict();
12852
- var poiModuleSchema = z6.object({
12853
- type: z6.literal("poi"),
12854
- categories: z6.array(z6.enum(tileflowPoiCategories)).optional(),
12855
- color: z6.enum(["uniform", "category"]).optional(),
12856
- density: z6.union([z6.literal(1), z6.literal(2), z6.literal(3), z6.literal(4), z6.literal(5)]).optional(),
12857
- enabled: z6.boolean().optional(),
12858
- icons: z6.boolean().optional(),
12859
- labels: z6.boolean().optional(),
13543
+ var poiModuleSchema = z7.object({
13544
+ type: z7.literal("poi"),
13545
+ categories: z7.array(z7.enum(tileflowPoiCategories)).optional(),
13546
+ color: z7.enum(["uniform", "category"]).optional(),
13547
+ density: z7.union([z7.literal(1), z7.literal(2), z7.literal(3), z7.literal(4), z7.literal(5)]).optional(),
13548
+ enabled: z7.boolean().optional(),
13549
+ icons: z7.boolean().optional(),
13550
+ labels: z7.boolean().optional(),
12860
13551
  minZoom: zoomNumberSchema.optional(),
12861
- placement: z6.object({
12862
- coupleIconAndLabel: z6.boolean().optional(),
12863
- iconPadding: z6.number().finite().min(0).optional(),
12864
- textPadding: z6.number().finite().min(0).optional()
13552
+ placement: z7.object({
13553
+ coupleIconAndLabel: z7.boolean().optional(),
13554
+ iconPadding: z7.number().finite().min(0).optional(),
13555
+ textPadding: z7.number().finite().min(0).optional()
12865
13556
  }).strict().optional(),
12866
13557
  renderStack: renderStackSchema.optional(),
12867
- styles: z6.partialRecord(z6.enum(tileflowPoiCategories), poiCategoryStyleSchema).optional()
13558
+ styles: z7.partialRecord(z7.enum(tileflowPoiCategories), poiCategoryStyleSchema).optional()
12868
13559
  }).strict();
12869
- var nauticalModuleSchema = z6.object({
12870
- type: z6.literal("nautical"),
13560
+ var nauticalModuleSchema = z7.object({
13561
+ type: z7.literal("nautical"),
12871
13562
  aids: markerSymbolStyleSchema.optional(),
12872
13563
  coverage: areaStyleSchema.optional(),
12873
- enabled: z6.boolean().optional(),
13564
+ enabled: z7.boolean().optional(),
12874
13565
  hazardAreas: areaStyleSchema.optional(),
12875
13566
  hazards: markerSymbolStyleSchema.optional(),
12876
- labels: z6.object({
13567
+ labels: z7.object({
12877
13568
  coverage: symbolStyleSchema.optional(),
12878
13569
  hazards: symbolStyleSchema.optional(),
12879
13570
  navigationAreas: symbolStyleSchema.optional(),
@@ -12889,7 +13580,7 @@ var nauticalModuleSchema = z6.object({
12889
13580
  wreckAreas: areaStyleSchema.optional(),
12890
13581
  wrecks: markerSymbolStyleSchema.optional()
12891
13582
  }).strict();
12892
- var modulesSchema = z6.object({
13583
+ var modulesSchema = z7.object({
12893
13584
  addresses: addressesModuleSchema.optional(),
12894
13585
  aeroways: aerowaysModuleSchema.optional(),
12895
13586
  boundaries: boundariesModuleSchema.optional(),
@@ -12901,157 +13592,157 @@ var modulesSchema = z6.object({
12901
13592
  poi: poiModuleSchema.optional(),
12902
13593
  roads: roadsModuleSchema.optional(),
12903
13594
  transit: transitModuleSchema.optional(),
12904
- vegetation: z6.object({
12905
- type: z6.literal("vegetation"),
12906
- enabled: z6.boolean().optional(),
13595
+ vegetation: z7.object({
13596
+ type: z7.literal("vegetation"),
13597
+ enabled: z7.boolean().optional(),
12907
13598
  flat: circleStyleSchema.optional(),
12908
- minZoom: zoomNumberSchema.optional(),
12909
- mode: z6.enum(["3d", "flat"]).optional(),
13599
+ mode: z7.enum(["3d", "flat"]).optional(),
12910
13600
  renderStack: renderStackSchema.optional(),
12911
- threeDimensional: z6.object({
13601
+ threeDimensional: z7.object({
12912
13602
  barkColor: themeColorValueSchema.optional(),
12913
- broadleafColors: z6.array(themeColorValueSchema).min(1).max(8).optional(),
12914
- coniferColors: z6.array(themeColorValueSchema).min(1).max(8).optional(),
12915
- crownScale: z6.union([
12916
- z6.number().finite().positive().max(10),
13603
+ broadleafColors: z7.array(themeColorValueSchema).min(1).max(8).optional(),
13604
+ coniferColors: z7.array(themeColorValueSchema).min(1).max(8).optional(),
13605
+ crownScale: z7.union([
13606
+ z7.number().finite().positive().max(10),
12917
13607
  themeNumberReferenceSchema,
12918
- z6.object({
12919
- kind: z6.literal("theme-fixed"),
12920
- reason: z6.string().trim().min(1),
12921
- value: z6.number().finite().positive().max(10)
13608
+ z7.object({
13609
+ kind: z7.literal("theme-fixed"),
13610
+ reason: z7.string().trim().min(1),
13611
+ value: z7.number().finite().positive().max(10)
12922
13612
  }).strict()
12923
13613
  ]).optional(),
12924
- heightScale: z6.union([
12925
- z6.number().finite().positive().max(10),
13614
+ heightScale: z7.union([
13615
+ z7.number().finite().positive().max(10),
12926
13616
  themeNumberReferenceSchema,
12927
- z6.object({
12928
- kind: z6.literal("theme-fixed"),
12929
- reason: z6.string().trim().min(1),
12930
- value: z6.number().finite().positive().max(10)
13617
+ z7.object({
13618
+ kind: z7.literal("theme-fixed"),
13619
+ reason: z7.string().trim().min(1),
13620
+ value: z7.number().finite().positive().max(10)
12931
13621
  }).strict()
12932
13622
  ]).optional()
12933
13623
  }).strict().optional()
12934
13624
  }).strict().optional(),
12935
13625
  water: waterModuleSchema.optional()
12936
13626
  }).strict();
12937
- var layerBindingsSchema = z6.object({
12938
- aerodromeLabel: z6.string().trim().min(1),
12939
- aeroway: z6.string().trim().min(1),
12940
- boundary: z6.string().trim().min(1),
12941
- building: z6.string().trim().min(1),
12942
- bathymetry: z6.string().trim().min(1).optional(),
12943
- businessCorridor: z6.string().trim().min(1).optional(),
12944
- circularFeature: z6.string().trim().min(1).optional(),
12945
- globalLandcover: z6.string().trim().min(1).optional(),
12946
- houseNumber: z6.string().trim().min(1),
12947
- landcover: z6.string().trim().min(1),
12948
- landuse: z6.string().trim().min(1),
12949
- mountainPeak: z6.string().trim().min(1),
12950
- park: z6.string().trim().min(1),
12951
- place: z6.string().trim().min(1),
12952
- poi: z6.string().trim().min(1),
12953
- road: z6.string().trim().min(1),
12954
- roadName: z6.string().trim().min(1),
12955
- roadShield: z6.string().trim().min(1).optional(),
12956
- sidewalk: z6.string().trim().min(1).optional(),
12957
- streetFurniture: z6.string().trim().min(1).optional(),
12958
- tree: z6.string().trim().min(1).optional(),
12959
- water: z6.string().trim().min(1),
12960
- waterName: z6.string().trim().min(1),
12961
- waterway: z6.string().trim().min(1)
13627
+ var layerBindingsSchema = z7.object({
13628
+ aerodromeLabel: z7.string().trim().min(1),
13629
+ aeroway: z7.string().trim().min(1),
13630
+ boundary: z7.string().trim().min(1),
13631
+ building: z7.string().trim().min(1),
13632
+ bathymetry: z7.string().trim().min(1).optional(),
13633
+ businessCorridor: z7.string().trim().min(1).optional(),
13634
+ canopy: z7.string().trim().min(1).optional(),
13635
+ circularFeature: z7.string().trim().min(1).optional(),
13636
+ globalLandcover: z7.string().trim().min(1).optional(),
13637
+ houseNumber: z7.string().trim().min(1),
13638
+ landcover: z7.string().trim().min(1),
13639
+ landuse: z7.string().trim().min(1),
13640
+ mountainPeak: z7.string().trim().min(1),
13641
+ park: z7.string().trim().min(1),
13642
+ place: z7.string().trim().min(1),
13643
+ poi: z7.string().trim().min(1),
13644
+ road: z7.string().trim().min(1),
13645
+ roadName: z7.string().trim().min(1),
13646
+ roadShield: z7.string().trim().min(1).optional(),
13647
+ sidewalk: z7.string().trim().min(1).optional(),
13648
+ streetFurniture: z7.string().trim().min(1).optional(),
13649
+ tree: z7.string().trim().min(1).optional(),
13650
+ water: z7.string().trim().min(1),
13651
+ waterName: z7.string().trim().min(1),
13652
+ waterway: z7.string().trim().min(1)
12962
13653
  }).strict();
12963
- var fieldBindingsSchema = z6.object({
12964
- access: z6.string().trim().min(1),
12965
- activityScore: z6.string().trim().min(1),
12966
- adminLevel: z6.string().trim().min(1),
12967
- bicycle: z6.string().trim().min(1),
12968
- bathymetryMinDepth: z6.string().trim().min(1).optional(),
12969
- bathymetrySortKey: z6.string().trim().min(1).optional(),
12970
- brunnel: z6.string().trim().min(1),
12971
- buildingKind: z6.string().trim().min(1),
12972
- buildingTone: z6.string().trim().min(1),
12973
- capital: z6.string().trim().min(1),
12974
- circularClearanceExtraAtZoom15: z6.string().trim().min(1).optional(),
12975
- circularKind: z6.string().trim().min(1).optional(),
12976
- circularRadiusAtZoom15: z6.string().trim().min(1).optional(),
12977
- circularRadiusMeters: z6.string().trim().min(1).optional(),
12978
- circularInnerRadiusMeters: z6.string().trim().min(1).optional(),
12979
- circularOuterRadiusMeters: z6.string().trim().min(1).optional(),
12980
- class: z6.string().trim().min(1),
12981
- crossing: z6.string().trim().min(1),
12982
- classificationConfidence: z6.string().trim().min(1),
12983
- confidence: z6.string().trim().min(1),
12984
- circumference: z6.string().trim().min(1),
12985
- diameterCrown: z6.string().trim().min(1),
12986
- disputed: z6.string().trim().min(1),
12987
- direction: z6.string().trim().min(1).optional(),
12988
- elevation: z6.string().trim().min(1),
12989
- elevationFeet: z6.string().trim().min(1),
12990
- expressway: z6.string().trim().min(1),
12991
- foot: z6.string().trim().min(1),
12992
- height: z6.string().trim().min(1),
12993
- hasBusiness: z6.string().trim().min(1),
12994
- hasParts: z6.string().trim().min(1).optional(),
12995
- hide3d: z6.string().trim().min(1),
12996
- horse: z6.string().trim().min(1),
12997
- houseNumber: z6.string().trim().min(1),
12998
- importanceTier: z6.string().trim().min(1).optional(),
12999
- iata: z6.string().trim().min(1),
13000
- icao: z6.string().trim().min(1),
13001
- indoor: z6.string().trim().min(1),
13002
- intermittent: z6.string().trim().min(1),
13003
- genus: z6.string().trim().min(1),
13004
- layer: z6.string().trim().min(1),
13005
- leafCycle: z6.string().trim().min(1),
13006
- leafType: z6.string().trim().min(1),
13007
- level: z6.string().trim().min(1),
13008
- maritime: z6.string().trim().min(1),
13009
- markings: z6.string().trim().min(1),
13010
- minHeight: z6.string().trim().min(1),
13011
- minZoom: z6.string().trim().min(1),
13012
- mtbScale: z6.string().trim().min(1),
13013
- name: z6.string().trim().min(1),
13014
- nameEnglish: z6.string().trim().min(1),
13015
- nameLatin: z6.string().trim().min(1),
13016
- network: z6.string().trim().min(1),
13017
- official: z6.string().trim().min(1),
13018
- oneway: z6.string().trim().min(1),
13019
- poiCategory: z6.string().trim().min(1),
13020
- poiFilterRank: z6.string().trim().min(1),
13021
- poiIcon: z6.string().trim().min(1),
13022
- poiSizeRank: z6.string().trim().min(1),
13023
- poiType: z6.string().trim().min(1),
13024
- ramp: z6.string().trim().min(1),
13025
- rank: z6.string().trim().min(1),
13026
- ref: z6.string().trim().min(1),
13027
- refLength: z6.string().trim().min(1),
13028
- renderHeight: z6.string().trim().min(1),
13029
- renderMinZoom: z6.string().trim().min(1),
13030
- renderMinHeight: z6.string().trim().min(1),
13031
- shieldKind: z6.string().trim().min(1).optional(),
13032
- shieldLineLengthMeters: z6.string().trim().min(1).optional(),
13033
- shieldNetwork: z6.string().trim().min(1).optional(),
13034
- shieldRank: z6.string().trim().min(1).optional(),
13035
- shieldText: z6.string().trim().min(1).optional(),
13036
- shieldTextColor: z6.string().trim().min(1).optional(),
13037
- service: z6.string().trim().min(1),
13038
- species: z6.string().trim().min(1),
13039
- speciesWikidata: z6.string().trim().min(1),
13040
- subclass: z6.string().trim().min(1),
13041
- surface: z6.string().trim().min(1),
13042
- toll: z6.string().trim().min(1)
13654
+ var fieldBindingsSchema = z7.object({
13655
+ access: z7.string().trim().min(1),
13656
+ activityScore: z7.string().trim().min(1),
13657
+ adminLevel: z7.string().trim().min(1),
13658
+ bicycle: z7.string().trim().min(1),
13659
+ bathymetryMinDepth: z7.string().trim().min(1).optional(),
13660
+ bathymetrySortKey: z7.string().trim().min(1).optional(),
13661
+ brunnel: z7.string().trim().min(1),
13662
+ buildingTone: z7.string().trim().min(1),
13663
+ canopyClearanceAtZoom15: z7.string().trim().min(1),
13664
+ canopyCoverPercent: z7.string().trim().min(1),
13665
+ canopyRank: z7.string().trim().min(1),
13666
+ capital: z7.string().trim().min(1),
13667
+ circularClearanceExtraAtZoom15: z7.string().trim().min(1),
13668
+ circularKind: z7.string().trim().min(1),
13669
+ circularRadiusAtZoom15: z7.string().trim().min(1),
13670
+ circularRadiusMeters: z7.string().trim().min(1),
13671
+ circularInnerRadiusMeters: z7.string().trim().min(1),
13672
+ circularOuterRadiusMeters: z7.string().trim().min(1),
13673
+ class: z7.string().trim().min(1),
13674
+ crossing: z7.string().trim().min(1),
13675
+ confidence: z7.string().trim().min(1),
13676
+ circumference: z7.string().trim().min(1),
13677
+ diameterCrown: z7.string().trim().min(1),
13678
+ disputed: z7.string().trim().min(1),
13679
+ direction: z7.string().trim().min(1),
13680
+ elevation: z7.string().trim().min(1),
13681
+ elevationFeet: z7.string().trim().min(1),
13682
+ expressway: z7.string().trim().min(1),
13683
+ foot: z7.string().trim().min(1),
13684
+ height: z7.string().trim().min(1),
13685
+ hasParts: z7.string().trim().min(1),
13686
+ hide3d: z7.string().trim().min(1),
13687
+ horse: z7.string().trim().min(1),
13688
+ houseNumber: z7.string().trim().min(1),
13689
+ importanceTier: z7.string().trim().min(1),
13690
+ iata: z7.string().trim().min(1),
13691
+ icao: z7.string().trim().min(1),
13692
+ indoor: z7.string().trim().min(1),
13693
+ intermittent: z7.string().trim().min(1),
13694
+ genus: z7.string().trim().min(1),
13695
+ layer: z7.string().trim().min(1),
13696
+ leafCycle: z7.string().trim().min(1),
13697
+ leafType: z7.string().trim().min(1),
13698
+ level: z7.string().trim().min(1),
13699
+ maritime: z7.string().trim().min(1),
13700
+ markings: z7.string().trim().min(1),
13701
+ minHeight: z7.string().trim().min(1),
13702
+ minZoom: z7.string().trim().min(1),
13703
+ mtbScale: z7.string().trim().min(1),
13704
+ name: z7.string().trim().min(1),
13705
+ nameEnglish: z7.string().trim().min(1),
13706
+ nameLatin: z7.string().trim().min(1),
13707
+ network: z7.string().trim().min(1),
13708
+ official: z7.string().trim().min(1),
13709
+ oneway: z7.string().trim().min(1),
13710
+ poiCategory: z7.string().trim().min(1),
13711
+ poiFilterRank: z7.string().trim().min(1),
13712
+ poiIcon: z7.string().trim().min(1),
13713
+ poiSizeRank: z7.string().trim().min(1),
13714
+ poiType: z7.string().trim().min(1),
13715
+ ramp: z7.string().trim().min(1),
13716
+ rank: z7.string().trim().min(1),
13717
+ ref: z7.string().trim().min(1),
13718
+ refLength: z7.string().trim().min(1),
13719
+ renderHeight: z7.string().trim().min(1),
13720
+ renderMinHeight: z7.string().trim().min(1),
13721
+ shieldKind: z7.string().trim().min(1).optional(),
13722
+ shieldLineLengthMeters: z7.string().trim().min(1).optional(),
13723
+ shieldNetwork: z7.string().trim().min(1).optional(),
13724
+ shieldRank: z7.string().trim().min(1).optional(),
13725
+ shieldText: z7.string().trim().min(1).optional(),
13726
+ shieldTextColor: z7.string().trim().min(1).optional(),
13727
+ service: z7.string().trim().min(1),
13728
+ species: z7.string().trim().min(1),
13729
+ speciesWikidata: z7.string().trim().min(1),
13730
+ subclass: z7.string().trim().min(1),
13731
+ surface: z7.string().trim().min(1),
13732
+ toll: z7.string().trim().min(1)
13043
13733
  }).strict();
13044
- var openMapTilesSchema = z6.object({
13045
- type: z6.literal("openmaptiles"),
13046
- contractVersion: z6.literal(openMapTilesContractVersion),
13734
+ var openMapTilesSchema = z7.object({
13735
+ type: z7.literal("openmaptiles"),
13736
+ contractVersion: z7.literal(openMapTilesContractVersion),
13047
13737
  fields: fieldBindingsSchema.partial().optional(),
13048
13738
  layers: layerBindingsSchema.partial().optional(),
13049
- semantics: z6.object({ parkLayer: z6.enum(["mixed", "protected-only"]).optional() }).strict().optional()
13739
+ semantics: z7.object({ parkLayer: z7.enum(["mixed", "protected-only"]).optional() }).strict().optional()
13050
13740
  }).strict().transform(
13051
13741
  (schema) => openMapTiles({
13052
13742
  capabilities: schema.layers === void 0 ? void 0 : {
13053
13743
  businessCorridor: schema.layers.businessCorridor !== void 0,
13054
13744
  bathymetry: schema.layers.bathymetry !== void 0,
13745
+ canopy: schema.layers.canopy !== void 0,
13055
13746
  globalLandcover: schema.layers.globalLandcover !== void 0,
13056
13747
  tree: schema.layers.tree !== void 0
13057
13748
  },
@@ -13061,12 +13752,12 @@ var openMapTilesSchema = z6.object({
13061
13752
  })
13062
13753
  );
13063
13754
  var vectorDataShape = {
13064
- type: z6.literal("vector-tiles"),
13065
- attribution: z6.string().trim().min(1),
13755
+ type: z7.literal("vector-tiles"),
13756
+ attribution: z7.string().trim().min(1),
13066
13757
  revision: revisionSchema.optional(),
13067
13758
  schema: openMapTilesSchema
13068
13759
  };
13069
- var publicVectorUrlSchema = z6.string().min(1).max(4096).superRefine((value, context) => {
13760
+ var publicVectorUrlSchema = z7.string().min(1).max(4096).superRefine((value, context) => {
13070
13761
  try {
13071
13762
  validatePublicVectorUrl(value);
13072
13763
  } catch (error) {
@@ -13076,8 +13767,8 @@ var publicVectorUrlSchema = z6.string().min(1).max(4096).superRefine((value, con
13076
13767
  });
13077
13768
  }
13078
13769
  }).describe("tileflow-public-vector-url");
13079
- var marineSourceSchema = z6.object({
13080
- attribution: z6.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
13770
+ var marineSourceSchema = z7.object({
13771
+ attribution: z7.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
13081
13772
  sourceId: identifierSchema.optional(),
13082
13773
  url: publicVectorUrlSchema.optional()
13083
13774
  }).strict();
@@ -13085,24 +13776,24 @@ var bathymetryDemUrlSchema = publicVectorUrlSchema.refine(
13085
13776
  (value) => !value.startsWith("pmtiles://"),
13086
13777
  "Expected an HTTPS, loopback HTTP, or root-relative DEM TileJSON URL"
13087
13778
  ).describe("tileflow-public-dem-url");
13088
- var bathymetryReliefSchema = z6.object({
13779
+ var bathymetryReliefSchema = z7.object({
13089
13780
  accentColor: terrainColorValueSchema.optional(),
13090
- attribution: z6.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
13091
- encoding: z6.enum(["mapbox", "terrarium"]).optional(),
13092
- exaggeration: terrainNumberValueSchema(z6.number().finite().min(0).max(1)).optional(),
13781
+ attribution: z7.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
13782
+ encoding: z7.enum(["mapbox", "terrarium"]).optional(),
13783
+ exaggeration: terrainNumberValueSchema(z7.number().finite().min(0).max(1)).optional(),
13093
13784
  highlightColor: terrainColorValueSchema.optional(),
13094
- illuminationAltitude: terrainNumberValueSchema(z6.number().finite().min(0).max(90)).optional(),
13095
- illuminationAnchor: z6.enum(["map", "viewport"]).optional(),
13096
- illuminationDirection: terrainNumberValueSchema(z6.number().finite().min(0).max(359)).optional(),
13785
+ illuminationAltitude: terrainNumberValueSchema(z7.number().finite().min(0).max(90)).optional(),
13786
+ illuminationAnchor: z7.enum(["map", "viewport"]).optional(),
13787
+ illuminationDirection: terrainNumberValueSchema(z7.number().finite().min(0).max(359)).optional(),
13097
13788
  maxZoom: zoomNumberSchema.optional(),
13098
13789
  minZoom: zoomNumberSchema.optional(),
13099
- multidirectional: z6.boolean().optional(),
13100
- opacity: terrainNumberValueSchema(z6.number().finite().min(0).max(1)).optional(),
13790
+ multidirectional: z7.boolean().optional(),
13791
+ opacity: terrainNumberValueSchema(z7.number().finite().min(0).max(1)).optional(),
13101
13792
  shadowColor: terrainColorValueSchema.optional(),
13102
13793
  sourceId: identifierSchema.optional(),
13103
- tileSize: z6.union([z6.literal(256), z6.literal(512)]).optional(),
13794
+ tileSize: z7.union([z7.literal(256), z7.literal(512)]).optional(),
13104
13795
  url: bathymetryDemUrlSchema.optional(),
13105
- visible: z6.boolean().optional()
13796
+ visible: z7.boolean().optional()
13106
13797
  }).strict().superRefine((relief, context) => {
13107
13798
  if (relief.minZoom !== void 0 && relief.maxZoom !== void 0 && relief.minZoom > relief.maxZoom) {
13108
13799
  context.addIssue({
@@ -13112,33 +13803,33 @@ var bathymetryReliefSchema = z6.object({
13112
13803
  });
13113
13804
  }
13114
13805
  });
13115
- var bathymetryConfigSchema = z6.object({
13806
+ var bathymetryConfigSchema = z7.object({
13116
13807
  ...marineSourceSchema.shape,
13117
- bands: z6.union([z6.literal(false), fillStyleSchema]).optional(),
13118
- contours: z6.union([z6.literal(false), lineStyleSchema]).optional(),
13119
- display: z6.enum(["bands", "relief", "hybrid"]).optional(),
13120
- labels: z6.union([z6.literal(false), symbolStyleSchema]).optional(),
13121
- relief: z6.union([z6.literal(false), bathymetryReliefSchema]).optional(),
13122
- type: z6.literal("bathymetry")
13808
+ bands: z7.union([z7.literal(false), fillStyleSchema]).optional(),
13809
+ contours: z7.union([z7.literal(false), lineStyleSchema]).optional(),
13810
+ display: z7.enum(["bands", "relief", "hybrid"]).optional(),
13811
+ labels: z7.union([z7.literal(false), symbolStyleSchema]).optional(),
13812
+ relief: z7.union([z7.literal(false), bathymetryReliefSchema]).optional(),
13813
+ type: z7.literal("bathymetry")
13123
13814
  }).strict();
13124
- var marineSchema = z6.union([
13125
- z6.enum(["none", "bathymetry", "nautical", "chart"]),
13126
- z6.object({
13127
- bathymetry: z6.union([z6.literal(false), marineSourceSchema, bathymetryConfigSchema]).optional(),
13128
- nautical: z6.union([z6.literal(false), marineSourceSchema]).optional()
13815
+ var marineSchema = z7.union([
13816
+ z7.enum(["none", "bathymetry", "nautical", "chart"]),
13817
+ z7.object({
13818
+ bathymetry: z7.union([z7.literal(false), marineSourceSchema, bathymetryConfigSchema]).optional(),
13819
+ nautical: z7.union([z7.literal(false), marineSourceSchema]).optional()
13129
13820
  }).strict()
13130
13821
  ]);
13131
- var directVectorDataSchema = z6.object({
13822
+ var directVectorDataSchema = z7.object({
13132
13823
  ...vectorDataShape,
13133
- bounds: z6.tuple([
13134
- z6.number().finite().min(-180).max(180),
13135
- z6.number().finite().min(-90).max(90),
13136
- z6.number().finite().min(-180).max(180),
13137
- z6.number().finite().min(-90).max(90)
13824
+ bounds: z7.tuple([
13825
+ z7.number().finite().min(-180).max(180),
13826
+ z7.number().finite().min(-90).max(90),
13827
+ z7.number().finite().min(-180).max(180),
13828
+ z7.number().finite().min(-90).max(90)
13138
13829
  ]).optional(),
13139
- maxzoom: z6.number().int().min(0).max(30).optional(),
13140
- minzoom: z6.number().int().min(0).max(30).optional(),
13141
- tiles: z6.array(publicVectorUrlSchema).min(1).max(8)
13830
+ maxzoom: z7.number().int().min(0).max(30).optional(),
13831
+ minzoom: z7.number().int().min(0).max(30).optional(),
13832
+ tiles: z7.array(publicVectorUrlSchema).min(1).max(8)
13142
13833
  }).strict().refine(
13143
13834
  (value) => value.minzoom === void 0 || value.maxzoom === void 0 || value.minzoom <= value.maxzoom,
13144
13835
  { message: "minzoom must not exceed maxzoom", path: ["minzoom"] }
@@ -13146,34 +13837,34 @@ var directVectorDataSchema = z6.object({
13146
13837
  (value) => value.bounds === void 0 || value.bounds[0] < value.bounds[2] && value.bounds[1] < value.bounds[3],
13147
13838
  { message: "bounds must have increasing axes", path: ["bounds"] }
13148
13839
  );
13149
- var dataSchema = z6.union([
13150
- z6.object({
13151
- type: z6.literal("tileflow-world"),
13152
- generation: z6.literal(tileflowWorldGeneration),
13153
- selection: z6.discriminatedUnion("kind", [
13154
- z6.object({ kind: z6.literal("current"), product: z6.literal("world-v1") }).strict(),
13155
- z6.object({
13156
- kind: z6.literal("release"),
13157
- product: z6.literal("world-v1"),
13158
- release: z6.object({
13159
- descriptorSha256: z6.string().regex(/^[0-9a-f]{64}$/u),
13840
+ var dataSchema = z7.union([
13841
+ z7.object({
13842
+ type: z7.literal("tileflow-world"),
13843
+ generation: z7.literal(tileflowWorldGeneration),
13844
+ selection: z7.discriminatedUnion("kind", [
13845
+ z7.object({ kind: z7.literal("current"), product: z7.literal("world-v1") }).strict(),
13846
+ z7.object({
13847
+ kind: z7.literal("release"),
13848
+ product: z7.literal("world-v1"),
13849
+ release: z7.object({
13850
+ descriptorSha256: z7.string().regex(/^[0-9a-f]{64}$/u),
13160
13851
  releaseId: tileflowWorldReleaseIdSchema
13161
13852
  }).strict()
13162
13853
  }).strict()
13163
13854
  ])
13164
13855
  }).strict(),
13165
- z6.object({ ...vectorDataShape, url: publicVectorUrlSchema }).strict(),
13856
+ z7.object({ ...vectorDataShape, url: publicVectorUrlSchema }).strict(),
13166
13857
  directVectorDataSchema
13167
13858
  ]);
13168
- var hostedTilesetSourceSchema = z6.object({
13169
- attribution: z6.string().trim().min(1).max(4096),
13170
- kind: z6.literal("hosted-tileset"),
13171
- local: z6.string().refine(isSafeLocalPmtilesPath, {
13859
+ var hostedTilesetSourceSchema = z7.object({
13860
+ attribution: z7.string().trim().min(1).max(4096),
13861
+ kind: z7.literal("hosted-tileset"),
13862
+ local: z7.string().refine(isSafeLocalPmtilesPath, {
13172
13863
  message: "Expected a safe relative .pmtiles path beginning with ./ or ../"
13173
13864
  }),
13174
- tileset: z6.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u).refine((value) => value !== "terrain" && value !== "world", "Expected a Team tileset ID"),
13175
- tileSize: z6.union([z6.literal(256), z6.literal(512)]).optional(),
13176
- type: z6.enum(["raster", "vector"])
13865
+ tileset: z7.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u).refine((value) => value !== "terrain" && value !== "world", "Expected a Team tileset ID"),
13866
+ tileSize: z7.union([z7.literal(256), z7.literal(512)]).optional(),
13867
+ type: z7.enum(["raster", "vector"])
13177
13868
  }).strict().superRefine((source, context) => {
13178
13869
  if (source.type === "vector" && source.tileSize !== void 0) {
13179
13870
  context.addIssue({
@@ -13183,7 +13874,7 @@ var hostedTilesetSourceSchema = z6.object({
13183
13874
  });
13184
13875
  }
13185
13876
  });
13186
- var hostedSourcesSchema = z6.record(tileflowMapIdSchema, hostedTilesetSourceSchema).superRefine((sources, context) => {
13877
+ var hostedSourcesSchema = z7.record(tileflowMapIdSchema, hostedTilesetSourceSchema).superRefine((sources, context) => {
13187
13878
  if (Object.keys(sources).length > tileflowHostedSourceLimit) {
13188
13879
  context.addIssue({
13189
13880
  code: "too_big",
@@ -13192,7 +13883,7 @@ var hostedSourcesSchema = z6.record(tileflowMapIdSchema, hostedTilesetSourceSche
13192
13883
  });
13193
13884
  }
13194
13885
  });
13195
- var maplibreOverlayLayerSchema = z6.record(z6.string(), z6.unknown()).superRefine((layer, context) => {
13886
+ var maplibreOverlayLayerSchema = z7.record(z7.string(), z7.unknown()).superRefine((layer, context) => {
13196
13887
  if (!tileflowMapIdSchema.safeParse(layer.id).success) {
13197
13888
  context.addIssue({ code: "custom", message: "Expected a portable layer ID", path: ["id"] });
13198
13889
  }
@@ -13210,28 +13901,28 @@ var maplibreOverlayLayerSchema = z6.record(z6.string(), z6.unknown()).superRefin
13210
13901
  });
13211
13902
  }
13212
13903
  });
13213
- var maplibreOverlaySchema = z6.object({
13214
- kind: z6.literal("maplibre-overlay"),
13215
- layers: z6.array(maplibreOverlayLayerSchema).min(1),
13216
- placement: z6.enum(tileflowOverlayPlacements),
13904
+ var maplibreOverlaySchema = z7.object({
13905
+ kind: z7.literal("maplibre-overlay"),
13906
+ layers: z7.array(maplibreOverlayLayerSchema).min(1),
13907
+ placement: z7.enum(tileflowOverlayPlacements),
13217
13908
  source: tileflowMapIdSchema
13218
13909
  }).strict();
13219
- var overlaysSchema = z6.record(tileflowMapIdSchema, maplibreOverlaySchema);
13220
- var localAssetDirectorySchema = z6.string().min(3).max(tileflowLocalDirectoryMaximumLength).refine(isTileflowLocalDirectory, { message: tileflowLocalDirectoryMessage });
13221
- var packageAssetDirectorySchema = z6.object({
13222
- kind: z6.literal("package-directory"),
13223
- package: z6.string().regex(
13910
+ var overlaysSchema = z7.record(tileflowMapIdSchema, maplibreOverlaySchema);
13911
+ var localAssetDirectorySchema = z7.string().min(3).max(tileflowLocalDirectoryMaximumLength).refine(isTileflowLocalDirectory, { message: tileflowLocalDirectoryMessage });
13912
+ var packageAssetDirectorySchema = z7.object({
13913
+ kind: z7.literal("package-directory"),
13914
+ package: z7.string().regex(
13224
13915
  /^(?:@[a-z0-9][a-z0-9._-]*\/[a-z0-9][a-z0-9._-]*|[a-z0-9][a-z0-9._-]*)$/u,
13225
13916
  "Expected a lowercase npm package name"
13226
13917
  ),
13227
- path: z6.string().min(1).max(512).refine(
13918
+ path: z7.string().min(1).max(512).refine(
13228
13919
  (value) => !value.startsWith("/") && !value.includes("\\") && value.split("/").every((segment) => Boolean(segment) && segment !== "." && segment !== ".."),
13229
13920
  "Expected a portable package-relative directory"
13230
13921
  )
13231
13922
  }).strict();
13232
- var assetDirectorySchema = z6.union([localAssetDirectorySchema, packageAssetDirectorySchema]);
13233
- var iconDirectoriesSchema = z6.array(
13234
- z6.union([localAssetDirectorySchema, packageAssetDirectorySchema, tileflowIconSetSourceSchema])
13923
+ var assetDirectorySchema = z7.union([localAssetDirectorySchema, packageAssetDirectorySchema]);
13924
+ var iconDirectoriesSchema = z7.array(
13925
+ z7.union([localAssetDirectorySchema, packageAssetDirectorySchema, tileflowIconSetSourceSchema])
13235
13926
  ).max(tileflowIconSourceLimit).superRefine((sources, context) => {
13236
13927
  try {
13237
13928
  collectTileflowIconSetReferences(sources);
@@ -13242,9 +13933,9 @@ var iconDirectoriesSchema = z6.array(
13242
13933
  });
13243
13934
  }
13244
13935
  });
13245
- var fontDirectoriesSchema = z6.array(assetDirectorySchema).max(16);
13246
- var fontStacksSchema = z6.array(
13247
- z6.string().min(1).max(200).refine(
13936
+ var fontDirectoriesSchema = z7.array(assetDirectorySchema).max(16);
13937
+ var fontStacksSchema = z7.array(
13938
+ z7.string().min(1).max(200).refine(
13248
13939
  (value) => value === value.trim() && value === value.normalize("NFC") && !/[\p{Cc}\\/]/u.test(value),
13249
13940
  "Expected an exact NFC MapLibre font-stack key without whitespace padding, controls, slashes, or backslashes"
13250
13941
  )
@@ -13261,10 +13952,10 @@ var fontStacksSchema = z6.array(
13261
13952
  seen.add(fontStack);
13262
13953
  }
13263
13954
  });
13264
- var glyphsSchema = z6.object({
13955
+ var glyphsSchema = z7.object({
13265
13956
  fontStacks: fontStacksSchema,
13266
- kind: z6.literal("url"),
13267
- url: z6.string().min(1).refine(
13957
+ kind: z7.literal("url"),
13958
+ url: z7.string().min(1).refine(
13268
13959
  (value) => value.includes("{fontstack}") && value.includes("{range}"),
13269
13960
  "Expected {fontstack} and {range} placeholders"
13270
13961
  ).refine(isSafeGlyphUrl, "Expected an HTTP(S), root-relative, or path-relative glyph URL")
@@ -13272,34 +13963,34 @@ var glyphsSchema = z6.object({
13272
13963
  var terrainLayerRangeShape = {
13273
13964
  maxZoom: zoomNumberSchema.optional(),
13274
13965
  minZoom: zoomNumberSchema.optional(),
13275
- visible: z6.boolean().optional()
13966
+ visible: z7.boolean().optional()
13276
13967
  };
13277
- var terrainHillshadeSchema = z6.object({
13968
+ var terrainHillshadeSchema = z7.object({
13278
13969
  ...terrainLayerRangeShape,
13279
13970
  accentColor: terrainColorValueSchema.optional(),
13280
- exaggeration: terrainNumberValueSchema(z6.number().finite().min(0).max(1)).optional(),
13971
+ exaggeration: terrainNumberValueSchema(z7.number().finite().min(0).max(1)).optional(),
13281
13972
  highlightColor: terrainColorValueSchema.optional(),
13282
- illuminationAnchor: z6.enum(["map", "viewport"]).optional(),
13283
- illuminationDirection: terrainNumberValueSchema(z6.number().finite().min(0).max(359)).optional(),
13973
+ illuminationAnchor: z7.enum(["map", "viewport"]).optional(),
13974
+ illuminationDirection: terrainNumberValueSchema(z7.number().finite().min(0).max(359)).optional(),
13284
13975
  shadowColor: terrainColorValueSchema.optional()
13285
13976
  }).strict();
13286
- var terrainContourLineSchema = z6.object({
13977
+ var terrainContourLineSchema = z7.object({
13287
13978
  ...terrainLayerRangeShape,
13288
13979
  color: terrainColorValueSchema.optional(),
13289
- opacity: terrainNumberValueSchema(z6.number().finite().min(0).max(1)).optional(),
13290
- width: terrainNumberValueSchema(z6.number().finite().min(0).max(32)).optional()
13980
+ opacity: terrainNumberValueSchema(z7.number().finite().min(0).max(1)).optional(),
13981
+ width: terrainNumberValueSchema(z7.number().finite().min(0).max(32)).optional()
13291
13982
  }).strict();
13292
- var terrainContourLabelSchema = z6.object({
13983
+ var terrainContourLabelSchema = z7.object({
13293
13984
  ...terrainLayerRangeShape,
13294
13985
  color: terrainColorValueSchema.optional(),
13295
13986
  font: moduleFontValueSchema.optional(),
13296
13987
  haloColor: terrainColorValueSchema.optional(),
13297
- haloWidth: terrainNumberValueSchema(z6.number().finite().min(0).max(16)).optional(),
13298
- opacity: terrainNumberValueSchema(z6.number().finite().min(0).max(1)).optional(),
13299
- size: terrainNumberValueSchema(z6.number().finite().min(1).max(64)).optional(),
13300
- spacing: terrainNumberValueSchema(z6.number().finite().min(1).max(1e3)).optional()
13988
+ haloWidth: terrainNumberValueSchema(z7.number().finite().min(0).max(16)).optional(),
13989
+ opacity: terrainNumberValueSchema(z7.number().finite().min(0).max(1)).optional(),
13990
+ size: terrainNumberValueSchema(z7.number().finite().min(1).max(64)).optional(),
13991
+ spacing: terrainNumberValueSchema(z7.number().finite().min(1).max(1e3)).optional()
13301
13992
  }).strict();
13302
- var terrainContourThresholdPairSchema = z6.tuple([z6.number().finite().min(1e-3).max(1e5), z6.number().finite().min(1e-3).max(1e5)]).refine(([minor, index]) => minor <= index, {
13993
+ var terrainContourThresholdPairSchema = z7.tuple([z7.number().finite().min(1e-3).max(1e5), z7.number().finite().min(1e-3).max(1e5)]).refine(([minor, index]) => minor <= index, {
13303
13994
  message: "Expected the index contour interval to be greater than or equal to the minor interval"
13304
13995
  }).refine(([minor, index]) => isWholeContourMultiple2(index, minor), {
13305
13996
  message: "Expected the index contour interval to be a whole multiple of the minor interval"
@@ -13308,7 +13999,7 @@ function isWholeContourMultiple2(value, interval) {
13308
13999
  const ratio = value / interval;
13309
14000
  return Math.abs(ratio - Math.round(ratio)) <= Number.EPSILON * Math.max(1, ratio) * 8;
13310
14001
  }
13311
- var terrainContourThresholdsSchema = z6.record(z6.string().regex(/^(?:0|[1-9]|1\d|2[0-4])$/u), terrainContourThresholdPairSchema).superRefine((thresholds, context) => {
14002
+ var terrainContourThresholdsSchema = z7.record(z7.string().regex(/^(?:0|[1-9]|1\d|2[0-4])$/u), terrainContourThresholdPairSchema).superRefine((thresholds, context) => {
13312
14003
  const count = Object.keys(thresholds).length;
13313
14004
  if (count === 0 || count > 25) {
13314
14005
  context.addIssue({
@@ -13317,19 +14008,19 @@ var terrainContourThresholdsSchema = z6.record(z6.string().regex(/^(?:0|[1-9]|1\
13317
14008
  });
13318
14009
  }
13319
14010
  });
13320
- var terrainContoursSchema = z6.object({
13321
- demMaxZoom: z6.number().int().min(0).max(24),
13322
- demUrl: z6.string().min(1).max(2048).refine(
14011
+ var terrainContoursSchema = z7.object({
14012
+ demMaxZoom: z7.number().int().min(0).max(24),
14013
+ demUrl: z7.string().min(1).max(2048).refine(
13323
14014
  isSafeTileflowDemUrlTemplate,
13324
14015
  "Expected a safe HTTP(S) DEM URL template containing {z}, {x}, and {y}"
13325
14016
  ),
13326
14017
  index: terrainContourLineSchema.optional(),
13327
14018
  labels: terrainContourLabelSchema.optional(),
13328
- maxZoom: z6.number().int().min(0).max(24).optional(),
14019
+ maxZoom: z7.number().int().min(0).max(24).optional(),
13329
14020
  minZoom: zoomNumberSchema.optional(),
13330
14021
  minor: terrainContourLineSchema.optional(),
13331
- multiplier: z6.number().finite().min(1e-3).max(100).optional(),
13332
- overzoom: z6.number().int().min(0).max(8).optional(),
14022
+ multiplier: z7.number().finite().min(1e-3).max(100).optional(),
14023
+ overzoom: z7.number().int().min(0).max(8).optional(),
13333
14024
  sourceId: identifierSchema.optional(),
13334
14025
  thresholds: terrainContourThresholdsSchema
13335
14026
  }).strict().superRefine((contours, context) => {
@@ -13393,44 +14084,44 @@ var terrainContoursSchema = z6.object({
13393
14084
  }
13394
14085
  }
13395
14086
  });
13396
- var terrainSchema = z6.union([
13397
- z6.enum(["none", "hillshade", "3d"]),
13398
- z6.object({
13399
- attribution: z6.string().optional(),
14087
+ var terrainSchema = z7.union([
14088
+ z7.enum(["none", "hillshade", "3d"]),
14089
+ z7.object({
14090
+ attribution: z7.string().optional(),
13400
14091
  contours: terrainContoursSchema.optional(),
13401
- encoding: z6.enum(["mapbox", "terrarium"]).optional(),
13402
- exaggeration: z6.number().finite().min(0).max(10).optional(),
14092
+ encoding: z7.enum(["mapbox", "terrarium"]).optional(),
14093
+ exaggeration: z7.number().finite().min(0).max(10).optional(),
13403
14094
  hillshade: terrainHillshadeSchema.optional(),
13404
- mode: z6.enum(["none", "hillshade", "3d"]).optional(),
13405
- sourceId: z6.string().trim().min(1).optional(),
13406
- url: z6.string().trim().min(1).optional()
14095
+ mode: z7.enum(["none", "hillshade", "3d"]).optional(),
14096
+ sourceId: z7.string().trim().min(1).optional(),
14097
+ url: z7.string().trim().min(1).optional()
13407
14098
  }).strict()
13408
14099
  ]);
13409
- var atmosphereColorLiteralSchema = z6.string().refine((value) => Color3.parse(value)?.a === 1, "Expected an opaque color");
13410
- var atmosphereColorSchema = z6.union([
14100
+ var atmosphereColorLiteralSchema = z7.string().refine((value) => Color3.parse(value)?.a === 1, "Expected an opaque color");
14101
+ var atmosphereColorSchema = z7.union([
13411
14102
  atmosphereColorLiteralSchema,
13412
14103
  fixedStringSchema.extend({ value: atmosphereColorLiteralSchema }),
13413
- themeTokenReferenceSchema.extend({ category: z6.literal("color") }),
14104
+ themeTokenReferenceSchema.extend({ category: z7.literal("color") }),
13414
14105
  themeColorOperationSchema
13415
14106
  ]);
13416
- var atmosphereSchema = z6.union([
13417
- z6.boolean(),
13418
- z6.object({
14107
+ var atmosphereSchema = z7.union([
14108
+ z7.boolean(),
14109
+ z7.object({
13419
14110
  skyColor: atmosphereColorSchema.optional(),
13420
14111
  horizonColor: atmosphereColorSchema.optional(),
13421
14112
  fogColor: atmosphereColorSchema.optional(),
13422
14113
  spaceColor: atmosphereColorSchema.optional(),
13423
- starIntensity: z6.number().finite().min(0).max(1).optional(),
13424
- starParallax: z6.number().finite().min(0).max(1).optional()
14114
+ starIntensity: z7.number().finite().min(0).max(1).optional(),
14115
+ starParallax: z7.number().finite().min(0).max(1).optional()
13425
14116
  }).strict()
13426
14117
  ]);
13427
- var viewSchema = z6.object({
13428
- bearing: z6.number().finite().min(-180).max(180).optional(),
13429
- center: z6.tuple([z6.number().finite().min(-180).max(180), z6.number().finite().min(-90).max(90)]).optional(),
13430
- pitch: z6.number().finite().min(0).max(85).optional(),
14118
+ var viewSchema = z7.object({
14119
+ bearing: z7.number().finite().min(-180).max(180).optional(),
14120
+ center: z7.tuple([z7.number().finite().min(-180).max(180), z7.number().finite().min(-90).max(90)]).optional(),
14121
+ pitch: z7.number().finite().min(0).max(85).optional(),
13431
14122
  zoom: zoomNumberSchema.optional()
13432
14123
  }).strict();
13433
- var themesSchema = z6.record(tileflowThemeNameSchema, tileflowThemeSchema).superRefine((themes, context) => {
14124
+ var themesSchema = z7.record(tileflowThemeNameSchema, tileflowThemeSchema).superRefine((themes, context) => {
13434
14125
  const names = Object.keys(themes);
13435
14126
  if (names.length === 0) {
13436
14127
  context.addIssue({ code: "custom", message: "Expected at least one named theme" });
@@ -13454,8 +14145,8 @@ var themesSchema = z6.record(tileflowThemeNameSchema, tileflowThemeSchema).super
13454
14145
  }
13455
14146
  }
13456
14147
  }).describe("tileflow-themes");
13457
- var systemThemesSchema = z6.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict();
13458
- var resolvedTileflowMapSchema = z6.object({
14148
+ var systemThemesSchema = z7.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict();
14149
+ var resolvedTileflowMapSchema = z7.object({
13459
14150
  atmosphere: atmosphereSchema.optional(),
13460
14151
  data: dataSchema.optional(),
13461
14152
  defaultTheme: tileflowThemeNameSchema,
@@ -13465,14 +14156,14 @@ var resolvedTileflowMapSchema = z6.object({
13465
14156
  id: tileflowMapIdSchema,
13466
14157
  marine: marineSchema.optional(),
13467
14158
  modules: modulesSchema.optional(),
13468
- name: z6.string().trim().min(1),
14159
+ name: z7.string().trim().min(1),
13469
14160
  overlays: overlaysSchema.optional(),
13470
- projection: z6.enum(["globe", "mercator"]).optional(),
14161
+ projection: z7.enum(["globe", "mercator"]).optional(),
13471
14162
  sources: hostedSourcesSchema.optional(),
13472
14163
  systemThemes: systemThemesSchema.optional(),
13473
14164
  terrain: terrainSchema.optional(),
13474
14165
  themes: themesSchema,
13475
- version: z6.number().int().positive(),
14166
+ version: z7.number().int().positive(),
13476
14167
  view: viewSchema.optional()
13477
14168
  }).strict().superRefine((map, context) => {
13478
14169
  if (map.fonts !== void 0 && map.glyphs !== void 0) {
@@ -13553,9 +14244,43 @@ function parseOrThrow(schema, input, name) {
13553
14244
  if (result.success) return result.data;
13554
14245
  throw new TileflowResolvedMapValidationError(
13555
14246
  name,
13556
- validationMessagesFromIssues(result.error.issues)
14247
+ validationMessagesFromIssues(expandUnionIssues(result.error.issues, [], input))
13557
14248
  );
13558
14249
  }
14250
+ function expandUnionIssues(issues, base, input) {
14251
+ return issues.flatMap((issue) => {
14252
+ const path = [...base, ...issue.path];
14253
+ if (issue.code !== "invalid_union" || issue.errors.length === 0) return [{ ...issue, path }];
14254
+ const candidates = issue.errors.filter((branch) => !branch.some(isUnionBranchMismatch));
14255
+ if (candidates.length === 0) {
14256
+ return [{ ...issue, path, message: unmatchedUnionMessage(valueAtPath(input, path)) }];
14257
+ }
14258
+ const fewest = Math.min(...candidates.map((branch) => branch.length));
14259
+ const best = candidates.filter((branch) => branch.length === fewest);
14260
+ return best.length === 1 ? expandUnionIssues(best[0], path, input) : [{ ...issue, path }];
14261
+ });
14262
+ }
14263
+ function isUnionBranchMismatch(issue) {
14264
+ if (issue.path.length === 0)
14265
+ return issue.code === "invalid_type" || issue.code === "invalid_value";
14266
+ return issue.path.length === 1 && (issue.code === "invalid_value" || issue.code === "invalid_union" && issue.errors.length === 0);
14267
+ }
14268
+ function unmatchedUnionMessage(value) {
14269
+ const kind = value !== null && typeof value === "object" ? value.kind : void 0;
14270
+ if (kind === "theme-fixed" || kind === "theme-token") {
14271
+ return `This property is structural. ${structuralThemeValueHint}`;
14272
+ }
14273
+ const received = value === null ? "null" : Array.isArray(value) ? "an array" : typeof value;
14274
+ return `Invalid input: no accepted form takes ${received === "object" ? "this object" : received}`;
14275
+ }
14276
+ function valueAtPath(input, path) {
14277
+ let value = input;
14278
+ for (const key of path) {
14279
+ if (value === null || typeof value !== "object" || !Object.hasOwn(value, key)) return void 0;
14280
+ value = value[key];
14281
+ }
14282
+ return value;
14283
+ }
13559
14284
  function validationMessagesFromIssues(issues) {
13560
14285
  return issues.flatMap((issue) => {
13561
14286
  const basePath = issue.path.join(".");
@@ -13619,6 +14344,74 @@ function findUnsafeObjectStructure(input) {
13619
14344
  return void 0;
13620
14345
  }
13621
14346
 
14347
+ // src/route-inks.ts
14348
+ var tileflowRouteMetadataKey = "tileflow:route";
14349
+ var tileflowRouteTokens = Object.freeze({
14350
+ color: Object.freeze({
14351
+ line: "route.line",
14352
+ casing: "route.casing",
14353
+ core: "route.core",
14354
+ glow: "route.glow",
14355
+ alternative: "route.alternative"
14356
+ }),
14357
+ number: Object.freeze({
14358
+ glowOpacity: "route.glow.opacity",
14359
+ coreOpacity: "route.core.opacity"
14360
+ })
14361
+ });
14362
+ var tileflowDefaultRouteInks = Object.freeze({
14363
+ light: Object.freeze({
14364
+ line: "#2563eb",
14365
+ casing: "#1e3a8a",
14366
+ core: "#dbeafe",
14367
+ glow: "#2563eb",
14368
+ alternative: "#94a3b8",
14369
+ glowOpacity: 0.16,
14370
+ coreOpacity: 0
14371
+ }),
14372
+ dark: Object.freeze({
14373
+ line: "#60a5fa",
14374
+ casing: "#0b1220",
14375
+ core: "#eff6ff",
14376
+ glow: "#60a5fa",
14377
+ alternative: "#64748b",
14378
+ glowOpacity: 0.4,
14379
+ coreOpacity: 0.7
14380
+ })
14381
+ });
14382
+ var colourKeys = Object.keys(
14383
+ tileflowRouteTokens.color
14384
+ );
14385
+ var numberKeys = Object.keys(
14386
+ tileflowRouteTokens.number
14387
+ );
14388
+ function resolveTileflowRouteInks(theme) {
14389
+ const defaults4 = tileflowDefaultRouteInks[theme.colorScheme];
14390
+ const inks = { ...defaults4 };
14391
+ for (const key of colourKeys) {
14392
+ const value = theme.tokens.color[tileflowRouteTokens.color[key]];
14393
+ if (value !== void 0) inks[key] = value;
14394
+ }
14395
+ for (const key of numberKeys) {
14396
+ const token2 = tileflowRouteTokens.number[key];
14397
+ const value = theme.tokens.number[token2];
14398
+ if (value === void 0) continue;
14399
+ if (!(value >= 0 && value <= 1)) {
14400
+ throw new Error(
14401
+ `Tileflow theme "${theme.id}" sets number token "${token2}" to ${value}; route opacities run from 0 to 1.`
14402
+ );
14403
+ }
14404
+ inks[key] = value;
14405
+ }
14406
+ return Object.freeze(inks);
14407
+ }
14408
+ function tileflowRouteMetadata(inks) {
14409
+ return Object.freeze({ version: 1, ...inks });
14410
+ }
14411
+
14412
+ // src/cartography/streets.ts
14413
+ init_sun();
14414
+
13622
14415
  // src/terrain/index.ts
13623
14416
  function resolveTerrain(terrain, apiBaseUrl) {
13624
14417
  if (!terrain || terrain === "none") return void 0;
@@ -13904,18 +14697,18 @@ function cloneJson22(value) {
13904
14697
 
13905
14698
  // src/icon-appearance.ts
13906
14699
  import { Color as Color4 } from "@maplibre/maplibre-gl-style-spec";
13907
- import { z as z8 } from "zod";
14700
+ import { z as z9 } from "zod";
13908
14701
 
13909
14702
  // src/icon-layout.ts
13910
- import { z as z7 } from "zod";
13911
- var coordinate = z7.number().int().nonnegative().max(2048);
13912
- var regions = z7.array(z7.tuple([coordinate, coordinate])).min(1).max(2048);
14703
+ import { z as z8 } from "zod";
14704
+ var coordinate = z8.number().int().nonnegative().max(2048);
14705
+ var regions = z8.array(z8.tuple([coordinate, coordinate])).min(1).max(2048);
13913
14706
  var tileflowIconLayoutFields = {
13914
14707
  stretchX: regions.optional(),
13915
14708
  stretchY: regions.optional(),
13916
- content: z7.tuple([coordinate, coordinate, coordinate, coordinate]).optional()
14709
+ content: z8.tuple([coordinate, coordinate, coordinate, coordinate]).optional()
13917
14710
  };
13918
- var tileflowIconLayoutSchema = z7.object(tileflowIconLayoutFields).strict().superRefine((layout, context) => {
14711
+ var tileflowIconLayoutSchema = z8.object(tileflowIconLayoutFields).strict().superRefine((layout, context) => {
13919
14712
  if (!Object.values(layout).some((value) => value !== void 0))
13920
14713
  context.addIssue({
13921
14714
  code: "custom",
@@ -13977,14 +14770,14 @@ function scaleTileflowIconLayout(layout, scale) {
13977
14770
  }
13978
14771
 
13979
14772
  // src/icon-appearance.ts
13980
- var color2 = z8.string().max(128).refine((value) => Color4.parse(value) !== void 0, "Expected a MapLibre color");
13981
- var tileflowIconAppearanceSchema = z8.object({
13982
- representation: z8.literal("sdf"),
13983
- defaults: z8.object({
14773
+ var color2 = z9.string().max(128).refine((value) => Color4.parse(value) !== void 0, "Expected a MapLibre color");
14774
+ var tileflowIconAppearanceSchema = z9.object({
14775
+ representation: z9.literal("sdf"),
14776
+ defaults: z9.object({
13984
14777
  color: color2,
13985
14778
  haloColor: color2,
13986
- haloWidth: z8.number().finite().min(0).max(2),
13987
- haloBlur: z8.number().finite().min(0).max(1)
14779
+ haloWidth: z9.number().finite().min(0).max(2),
14780
+ haloBlur: z9.number().finite().min(0).max(1)
13988
14781
  }).strict()
13989
14782
  }).strict();
13990
14783
  function assertTileflowSdfPixels(input) {
@@ -14008,18 +14801,18 @@ function assertTileflowSdfPixels(input) {
14008
14801
  throw new Error("SDF pixels require an interior and a distance transition.");
14009
14802
  }
14010
14803
  var tileflowIconMetadataFileName = "tileflow.icons.json";
14011
- var tileflowIconAuthorMetadataSchema = z8.object({
14012
- schemaVersion: z8.literal(1),
14013
- icons: z8.record(
14014
- z8.string().max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u),
14015
- z8.union([
14016
- z8.object({ representation: z8.literal("rgba"), layout: tileflowIconLayoutSchema.optional() }).strict(),
14804
+ var tileflowIconAuthorMetadataSchema = z9.object({
14805
+ schemaVersion: z9.literal(1),
14806
+ icons: z9.record(
14807
+ z9.string().max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u),
14808
+ z9.union([
14809
+ z9.object({ representation: z9.literal("rgba"), layout: tileflowIconLayoutSchema.optional() }).strict(),
14017
14810
  tileflowIconAppearanceSchema.extend({
14018
14811
  layout: tileflowIconLayoutSchema.optional(),
14019
14812
  defaults: tileflowIconAppearanceSchema.shape.defaults.extend({
14020
14813
  haloColor: color2.default("transparent"),
14021
- haloWidth: z8.number().finite().min(0).max(2).default(0),
14022
- haloBlur: z8.number().finite().min(0).max(1).default(0)
14814
+ haloWidth: z9.number().finite().min(0).max(2).default(0),
14815
+ haloBlur: z9.number().finite().min(0).max(1).default(0)
14023
14816
  })
14024
14817
  })
14025
14818
  ])
@@ -14304,11 +15097,11 @@ function isTileflowPoiCategory(value) {
14304
15097
  return typeof value === "string" && tileflowPoiCategories.includes(value);
14305
15098
  }
14306
15099
  function semanticTarget(layer) {
14307
- if (!isRecord7(layer.metadata)) return void 0;
15100
+ if (!isRecord8(layer.metadata)) return void 0;
14308
15101
  const value = layer.metadata[tileflowCompilerMetadataKeys.target];
14309
15102
  return typeof value === "string" ? value : void 0;
14310
15103
  }
14311
- function isRecord7(value) {
15104
+ function isRecord8(value) {
14312
15105
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
14313
15106
  }
14314
15107
  function isSafeArtifactName(value) {
@@ -14318,6 +15111,47 @@ function isSafeArtifactName(value) {
14318
15111
  });
14319
15112
  }
14320
15113
 
15114
+ // src/cartography/layout-zoom-diagnostics.ts
15115
+ function diagnoseFractionalLayoutZoomSteps(layers) {
15116
+ const diagnostics = [];
15117
+ for (const layer of layers) {
15118
+ const layout = layer.layout;
15119
+ if (layout === null || typeof layout !== "object") continue;
15120
+ for (const [property, value] of Object.entries(layout)) {
15121
+ const stops = fractionalZoomSteps(value);
15122
+ if (stops.length === 0) continue;
15123
+ const [origin] = readTileflowCompilerProvenance(layer);
15124
+ const listed = stops.map((stop) => String(stop)).join(", ");
15125
+ diagnostics.push({
15126
+ code: "TF_LAYOUT_FRACTIONAL_ZOOM_STEP",
15127
+ ...origin ? { domain: origin.owner } : {},
15128
+ message: `${property} steps at zoom ${listed}; layout properties are evaluated at each tile's integer zoom, so the step takes effect at zoom ${stops.map(Math.ceil).join(", ")}.`,
15129
+ path: `layers.${String(layer.id)}.layout.${property}`,
15130
+ phase: "lowering",
15131
+ severity: "warning",
15132
+ suggestion: "Step at whole zooms, or move the change to a paint property or a zoom range.",
15133
+ ...origin ? { target: origin.target } : {}
15134
+ });
15135
+ }
15136
+ }
15137
+ return diagnostics;
15138
+ }
15139
+ function fractionalZoomSteps(value) {
15140
+ if (!Array.isArray(value)) return [];
15141
+ const stops = [];
15142
+ if (value[0] === "step" && isZoom(value[1])) {
15143
+ for (let index = 3; index < value.length; index += 2) {
15144
+ const stop = value[index];
15145
+ if (typeof stop === "number" && !Number.isInteger(stop)) stops.push(stop);
15146
+ }
15147
+ }
15148
+ for (const entry of value) stops.push(...fractionalZoomSteps(entry));
15149
+ return stops;
15150
+ }
15151
+ function isZoom(value) {
15152
+ return Array.isArray(value) && value.length === 1 && value[0] === "zoom";
15153
+ }
15154
+
14321
15155
  // src/cartography/overlay-placement-manifest.ts
14322
15156
  var tileflowOverlayPlacementManifestMetadataKey = "tileflow:overlay-placement-manifest";
14323
15157
  var tileflowOverlayPlacementManifestSchemaVersion = 1;
@@ -15312,7 +16146,7 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
15312
16146
  () => compileSemanticDomains(modules, context)
15313
16147
  );
15314
16148
  const renderStackModules = Object.values(modules).filter(
15315
- (module) => isRecord8(module) && module.enabled !== false && "renderStack" in module && isRecord8(module.renderStack)
16149
+ (module) => isRecord9(module) && module.enabled !== false && "renderStack" in module && isRecord9(module.renderStack)
15316
16150
  );
15317
16151
  const renderOperations = runCompilationPhase(
15318
16152
  "render-stack",
@@ -15542,13 +16376,15 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
15542
16376
  ...atmosphere ? { [tileflowAtmosphereMetadataKey]: { version: 1, ...atmosphere } } : {},
15543
16377
  "tileflow:theme": selected.name,
15544
16378
  "tileflow:colorScheme": resolvedTheme.colorScheme,
16379
+ [tileflowRouteMetadataKey]: tileflowRouteMetadata(resolveTileflowRouteInks(resolvedTheme)),
16380
+ ...resolvedTheme.sun ? { [tileflowSunMetadataKey]: tileflowSunMetadata(resolvedTheme.sun) } : {},
15545
16381
  "tileflow:data": data.identity,
15546
16382
  "tileflow:sources": sourceIdentities,
15547
16383
  ...Object.keys(loweredOverlays.identities).length > 0 ? { "tileflow:overlays": loweredOverlays.identities } : {},
15548
16384
  "tileflow:sourceRequirements": sourceRequirements,
15549
16385
  ...interactionManifest ? { [tileflowInteractionManifestMetadataKey]: interactionManifest } : {},
15550
16386
  [tileflowOverlayPlacementManifestMetadataKey]: overlayPlacementManifest,
15551
- "tileflow:modules": Object.entries(modules).filter(([, module]) => !isRecord8(module) || module.enabled !== false).map(([name]) => name).sort(),
16387
+ "tileflow:modules": Object.entries(modules).filter(([, module]) => !isRecord9(module) || module.enabled !== false).map(([name]) => name).sort(),
15552
16388
  ...config.view ? { "tileflow:view": config.view } : {}
15553
16389
  }
15554
16390
  };
@@ -15568,7 +16404,16 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
15568
16404
  runCompilationPhase("assets", () => assertTextAssets(style, config));
15569
16405
  runCompilationPhase("assets", () => assertGlyphFontStacks(style, config));
15570
16406
  runCompilationPhase("validation", () => assertMapLibreStyle(style, config.id));
15571
- return { diagnostics, report, style, ...inspection ? { inspection } : {} };
16407
+ const layoutDiagnostics = runCompilationPhase(
16408
+ "validation",
16409
+ () => diagnoseFractionalLayoutZoomSteps(plannedLayers)
16410
+ );
16411
+ return {
16412
+ diagnostics: [...diagnostics, ...layoutDiagnostics],
16413
+ report,
16414
+ style,
16415
+ ...inspection ? { inspection } : {}
16416
+ };
15572
16417
  }
15573
16418
  function finalizeTileflowLayers(input) {
15574
16419
  const ids = /* @__PURE__ */ new Set();
@@ -15591,7 +16436,7 @@ function finalizeTileflowLayers(input) {
15591
16436
  if (typeof minimum2 === "number" && typeof maximum2 === "number" && minimum2 > maximum2) {
15592
16437
  throw new Error(`Compiled Tileflow layer ${id2} requires minzoom <= maxzoom.`);
15593
16438
  }
15594
- const metadata = isRecord8(layer.metadata) ? { ...layer.metadata } : void 0;
16439
+ const metadata = isRecord9(layer.metadata) ? { ...layer.metadata } : void 0;
15595
16440
  if (metadata) {
15596
16441
  const owner = metadata[tileflowCompilerMetadataKeys.owner];
15597
16442
  delete metadata[tileflowCompilerProvenanceMetadataKey];
@@ -15625,7 +16470,7 @@ function assertMapLibreStyle(style, mapId) {
15625
16470
  }
15626
16471
  );
15627
16472
  }
15628
- function isRecord8(value) {
16473
+ function isRecord9(value) {
15629
16474
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
15630
16475
  }
15631
16476
  function resolveGlyphs(config) {
@@ -15646,8 +16491,8 @@ function assertPreparedIconReferences(style, config, prepared) {
15646
16491
  function collectStyleImageReferences(style) {
15647
16492
  const result = /* @__PURE__ */ new Set();
15648
16493
  for (const layer of style.layers) {
15649
- const layout = isRecord8(layer.layout) ? layer.layout : {};
15650
- const paint = isRecord8(layer.paint) ? layer.paint : {};
16494
+ const layout = isRecord9(layer.layout) ? layer.layout : {};
16495
+ const paint = isRecord9(layer.paint) ? layer.paint : {};
15651
16496
  const layerId = typeof layer.id === "string" ? layer.id : "<unknown>";
15652
16497
  for (const [property, value] of [
15653
16498
  ["icon-image", layout["icon-image"]],
@@ -15736,7 +16581,7 @@ function assertGlyphFontStacks(style, config) {
15736
16581
  const declared = new Set(config.glyphs.fontStacks);
15737
16582
  const missing = /* @__PURE__ */ new Set();
15738
16583
  for (const layer of style.layers) {
15739
- const layout = isRecord8(layer.layout) ? layer.layout : void 0;
16584
+ const layout = isRecord9(layer.layout) ? layer.layout : void 0;
15740
16585
  const font = layout?.["text-font"];
15741
16586
  if (!Array.isArray(font) || !font.every((entry) => typeof entry === "string")) continue;
15742
16587
  const stack = font.join(",");
@@ -15752,7 +16597,7 @@ function assertGlyphFontStacks(style, config) {
15752
16597
  function assertTextAssets(style, config) {
15753
16598
  const textLayers = [];
15754
16599
  for (const layer of style.layers) {
15755
- const layout = isRecord8(layer.layout) ? layer.layout : void 0;
16600
+ const layout = isRecord9(layer.layout) ? layer.layout : void 0;
15756
16601
  if (layout?.["text-field"] === void 0) continue;
15757
16602
  textLayers.push(typeof layer.id === "string" ? layer.id : "<unknown>");
15758
16603
  const font = layout["text-font"];
@@ -15765,7 +16610,7 @@ function assertTextAssets(style, config) {
15765
16610
  if (textLayers.length === 0) return;
15766
16611
  if (config.fonts !== void 0) {
15767
16612
  const backed = style.layers.find((layer) => {
15768
- const font = isRecord8(layer.layout) ? layer.layout["text-font"] : void 0;
16613
+ const font = isRecord9(layer.layout) ? layer.layout["text-font"] : void 0;
15769
16614
  return Array.isArray(font) && font.length === 1 && typeof font[0] === "string" && parseTileflowLineBackgroundFontStack(font[0]) !== void 0;
15770
16615
  });
15771
16616
  if (backed) {
@@ -15791,7 +16636,7 @@ function runCompilationPhase(phase, operation) {
15791
16636
  }
15792
16637
  }
15793
16638
  function withCompilationPhase(error, phase) {
15794
- const record2 = isRecord8(error) ? error : {};
16639
+ const record2 = isRecord9(error) ? error : {};
15795
16640
  if (typeof record2.phase === "string") return error;
15796
16641
  if (error instanceof Error && Object.isExtensible(error)) {
15797
16642
  Object.defineProperty(error, "phase", { configurable: true, enumerable: true, value: phase });
@@ -15893,6 +16738,7 @@ var tileflowMapMergeStrategies = {
15893
16738
  overlays: "keyed-resources",
15894
16739
  projection: "atomic",
15895
16740
  scenes: "leaf",
16741
+ shots: "leaf",
15896
16742
  sources: "keyed-resources",
15897
16743
  systemThemes: "atomic",
15898
16744
  terrain: "atomic",
@@ -16232,11 +17078,11 @@ function cloneDesign(value) {
16232
17078
  function describeMap(value) {
16233
17079
  return typeof value.id === "string" && value.id ? value.id : "<anonymous>";
16234
17080
  }
16235
- function isRecord9(value) {
17081
+ function isRecord10(value) {
16236
17082
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
16237
17083
  }
16238
17084
  function isPlainRecord4(value) {
16239
- if (!isRecord9(value)) return false;
17085
+ if (!isRecord10(value)) return false;
16240
17086
  const prototype = Object.getPrototypeOf(value);
16241
17087
  return prototype === Object.prototype || prototype === null;
16242
17088
  }
@@ -16303,6 +17149,7 @@ function parseTileflowMap(map) {
16303
17149
  for (const node2 of lineage.reverse()) {
16304
17150
  const resolved = node2 === map ? resolvedLeaf : resolveMap(node2);
16305
17151
  validateMapScenes(node2, resolved.id);
17152
+ validateMapShots(node2, resolved.id);
16306
17153
  const parsed = parseResolvedTileflowMap(resolved);
16307
17154
  if (node2 === map) parsedLeaf = parsed;
16308
17155
  }
@@ -16310,40 +17157,53 @@ function parseTileflowMap(map) {
16310
17157
  return parsedLeaf;
16311
17158
  }
16312
17159
  function validateMapScenes(map, mapId) {
16313
- if (map.scenes === void 0) return;
16314
- if (!isPlainRecord5(map.scenes)) {
16315
- throw new Error(`Invalid Tileflow map "${map.id}". scenes: Expected a plain object.`);
17160
+ validateMapCaptureEntries(map, mapId, "scenes", (input) => {
17161
+ const result = tileflowCaptureSceneSchema.safeParse(input);
17162
+ return result.success ? tileflowCaptureSceneFitIssue(result.data) : result.error.issues[0];
17163
+ });
17164
+ }
17165
+ function validateMapShots(map, mapId) {
17166
+ validateMapCaptureEntries(map, mapId, "shots", (input) => {
17167
+ const result = tileflowCaptureShotSchema.safeParse(input);
17168
+ return result.success ? void 0 : result.error.issues[0];
17169
+ });
17170
+ }
17171
+ function validateMapCaptureEntries(map, mapId, key, findIssue) {
17172
+ const entries = map[key];
17173
+ if (entries === void 0) return;
17174
+ if (!isPlainRecord5(entries)) {
17175
+ throw new Error(`Invalid Tileflow map "${map.id}". ${key}: Expected a plain object.`);
16316
17176
  }
17177
+ const label = key === "scenes" ? "scene" : "shot";
16317
17178
  const namesByCaseFold = /* @__PURE__ */ new Map();
16318
- for (const [sceneName, input] of Object.entries(map.scenes)) {
16319
- const nameResult = tileflowCaptureSceneNameSchema.safeParse(sceneName);
17179
+ for (const [name, input] of Object.entries(entries)) {
17180
+ const nameResult = tileflowCaptureSceneNameSchema.safeParse(name);
16320
17181
  if (!nameResult.success) {
16321
17182
  throw new Error(
16322
- `Invalid Tileflow map "${map.id}". scenes.${sceneName}: ${nameResult.error.issues[0]?.message ?? "Invalid scene name"}`
17183
+ `Invalid Tileflow map "${map.id}". ${key}.${name}: ${nameResult.error.issues[0]?.message ?? `Invalid ${label} name`}`
16323
17184
  );
16324
17185
  }
16325
- const normalizedSceneName = nameResult.data;
16326
- const folded = normalizedSceneName.toLowerCase();
17186
+ const normalizedName = nameResult.data;
17187
+ const folded = normalizedName.toLowerCase();
16327
17188
  const existing = namesByCaseFold.get(folded);
16328
17189
  if (existing) {
16329
17190
  throw new Error(
16330
- `Invalid Tileflow map "${map.id}". scenes.${sceneName}: Expected an id that does not normalize to "${existing}".`
17191
+ `Invalid Tileflow map "${map.id}". ${key}.${name}: Expected an id that does not normalize to "${existing}".`
16331
17192
  );
16332
17193
  }
16333
- namesByCaseFold.set(folded, normalizedSceneName);
17194
+ namesByCaseFold.set(folded, normalizedName);
16334
17195
  if (!isPlainRecord5(input)) {
16335
- throw new Error(`Invalid Tileflow map "${map.id}". scenes.${sceneName}: Expected an object.`);
17196
+ throw new Error(`Invalid Tileflow map "${map.id}". ${key}.${name}: Expected an object.`);
16336
17197
  }
16337
17198
  if (Object.hasOwn(input, "map")) {
16338
17199
  throw new Error(
16339
- `Invalid Tileflow map "${map.id}". scenes.${sceneName}.map: Unrecognized key; a singular map scene inherits its map id.`
17200
+ `Invalid Tileflow map "${map.id}". ${key}.${name}.map: Unrecognized key; a singular map ${label} inherits its map id.`
16340
17201
  );
16341
17202
  }
16342
- const result = tileflowCaptureSceneSchema.safeParse({ ...input, map: mapId });
16343
- if (!result.success) {
16344
- const issue = result.error.issues[0];
17203
+ const issue = findIssue({ ...input, map: mapId });
17204
+ if (issue) {
16345
17205
  throw new Error(
16346
- `Invalid Tileflow map "${map.id}". scenes.${sceneName}${issue?.path.length ? `.${issue.path.join(".")}` : ""}: ${issue?.message ?? "Invalid scene"}`
17206
+ `Invalid Tileflow map "${map.id}". ${key}.${name}${issue.path.length ? `.${issue.path.join(".")}` : ""}: ${issue.message}`
16347
17207
  );
16348
17208
  }
16349
17209
  }
@@ -16966,7 +17826,7 @@ function resolveSemanticDiffInput(input) {
16966
17826
  }
16967
17827
  function isAuthoringOnlyMapShape(input) {
16968
17828
  if (!isUnknownRecord(input)) return true;
16969
- if (!Object.hasOwn(input, "name") || Object.hasOwn(input, "extends") || Object.hasOwn(input, "scenes")) {
17829
+ if (!Object.hasOwn(input, "name") || Object.hasOwn(input, "extends") || Object.hasOwn(input, "scenes") || Object.hasOwn(input, "shots")) {
16970
17830
  return true;
16971
17831
  }
16972
17832
  if (!isUnknownRecord(input.modules)) return false;
@@ -16980,7 +17840,7 @@ function semanticDesign(map) {
16980
17840
  }
16981
17841
  function compareValues(before, after, path, output) {
16982
17842
  if (Object.is(before, after)) return;
16983
- if (isRecord10(before) && isRecord10(after)) {
17843
+ if (isRecord11(before) && isRecord11(after)) {
16984
17844
  const keys = [.../* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)])].sort(
16985
17845
  compareCodeUnits9
16986
17846
  );
@@ -17022,7 +17882,7 @@ function toSemanticValue(value, path) {
17022
17882
  }
17023
17883
  throw new TypeError(`Tileflow semantic value at ${path || "/"} is not JSON-serializable.`);
17024
17884
  }
17025
- function isRecord10(value) {
17885
+ function isRecord11(value) {
17026
17886
  return value !== null && typeof value === "object" && !Array.isArray(value);
17027
17887
  }
17028
17888
  function isUnknownRecord(value) {
@@ -17035,7 +17895,7 @@ function deepEqual(left, right) {
17035
17895
  if (Array.isArray(left) || Array.isArray(right)) {
17036
17896
  return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((value, index) => deepEqual(value, right[index]));
17037
17897
  }
17038
- if (!isRecord10(left) || !isRecord10(right)) return false;
17898
+ if (!isRecord11(left) || !isRecord11(right)) return false;
17039
17899
  const leftKeys = Object.keys(left).sort(compareCodeUnits9);
17040
17900
  const rightKeys = Object.keys(right).sort(compareCodeUnits9);
17041
17901
  return leftKeys.length === rightKeys.length && leftKeys.every((key, index) => key === rightKeys[index] && deepEqual(left[key], right[key]));
@@ -17132,8 +17992,11 @@ function asRecord7(value) {
17132
17992
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
17133
17993
  }
17134
17994
 
17995
+ // src/index.ts
17996
+ init_sun();
17997
+
17135
17998
  // src/icon-package.ts
17136
- import { z as z9 } from "zod";
17999
+ import { z as z10 } from "zod";
17137
18000
  var tileflowIconPackageFileNames = [
17138
18001
  "sprite.json",
17139
18002
  "sprite.png",
@@ -17158,19 +18021,19 @@ var tileflowHostedAlphaCompatibility = {
17158
18021
  },
17159
18022
  maxMapsPerDeploy: 20
17160
18023
  };
17161
- var sha256Schema = z9.string().regex(/^[a-f0-9]{64}$/);
18024
+ var sha256Schema = z10.string().regex(/^[a-f0-9]{64}$/);
17162
18025
  var tileflowIconPackageContentHashSchema = sha256Schema;
17163
- var tileflowIconIdSchema = z9.string().max(64).regex(tileflowIconIdPattern);
17164
- var tileflowRenderedIconManifestEntrySchema = z9.object({
18026
+ var tileflowIconIdSchema = z10.string().max(64).regex(tileflowIconIdPattern);
18027
+ var tileflowRenderedIconManifestEntrySchema = z10.object({
17165
18028
  name: tileflowIconIdSchema,
17166
18029
  appearance: tileflowIconAppearanceSchema.optional(),
17167
18030
  layout: tileflowIconLayoutSchema.optional(),
17168
- pixelSha256: z9.object({
18031
+ pixelSha256: z10.object({
17169
18032
  oneX: sha256Schema,
17170
18033
  twoX: sha256Schema
17171
18034
  }).strict()
17172
18035
  }).strict();
17173
- var tileflowIconPackageLabelSchema = z9.string().superRefine((value, context) => {
18036
+ var tileflowIconPackageLabelSchema = z10.string().superRefine((value, context) => {
17174
18037
  if (value !== value.trim() || value.length === 0) {
17175
18038
  context.addIssue({
17176
18039
  code: "custom",
@@ -17190,32 +18053,32 @@ var tileflowIconPackageLabelSchema = z9.string().superRefine((value, context) =>
17190
18053
  });
17191
18054
  }
17192
18055
  });
17193
- var spriteDimensionsSchema = z9.object({
17194
- height: z9.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
17195
- pixelRatio: z9.union([z9.literal(1), z9.literal(2)]),
17196
- width: z9.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension)
18056
+ var spriteDimensionsSchema = z10.object({
18057
+ height: z10.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
18058
+ pixelRatio: z10.union([z10.literal(1), z10.literal(2)]),
18059
+ width: z10.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension)
17197
18060
  }).strict();
17198
18061
  function iconPackageFileSchema(name, contentType) {
17199
- return z9.object({
17200
- byteLength: z9.number().int().nonnegative().max(tileflowIconPackageLimits.maxGeneratedFileBytes),
17201
- contentType: z9.literal(contentType),
17202
- name: z9.literal(name),
18062
+ return z10.object({
18063
+ byteLength: z10.number().int().nonnegative().max(tileflowIconPackageLimits.maxGeneratedFileBytes),
18064
+ contentType: z10.literal(contentType),
18065
+ name: z10.literal(name),
17203
18066
  sha256: sha256Schema
17204
18067
  }).strict();
17205
18068
  }
17206
- var tileflowIconPackageManifestSchema = z9.object({
17207
- files: z9.tuple([
18069
+ var tileflowIconPackageManifestSchema = z10.object({
18070
+ files: z10.tuple([
17208
18071
  iconPackageFileSchema("sprite.json", "application/json"),
17209
18072
  iconPackageFileSchema("sprite.png", "image/png"),
17210
18073
  iconPackageFileSchema("sprite@2x.json", "application/json"),
17211
18074
  iconPackageFileSchema("sprite@2x.png", "image/png")
17212
18075
  ]),
17213
- format: z9.enum(["tileflow-icon-package-v1", "tileflow-icon-package-v2"]),
17214
- iconNames: z9.array(tileflowIconIdSchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
17215
- renderedIcons: z9.array(tileflowRenderedIconManifestEntrySchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
17216
- sprites: z9.object({
17217
- oneX: spriteDimensionsSchema.extend({ pixelRatio: z9.literal(1) }),
17218
- twoX: spriteDimensionsSchema.extend({ pixelRatio: z9.literal(2) })
18076
+ format: z10.enum(["tileflow-icon-package-v1", "tileflow-icon-package-v2"]),
18077
+ iconNames: z10.array(tileflowIconIdSchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
18078
+ renderedIcons: z10.array(tileflowRenderedIconManifestEntrySchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
18079
+ sprites: z10.object({
18080
+ oneX: spriteDimensionsSchema.extend({ pixelRatio: z10.literal(1) }),
18081
+ twoX: spriteDimensionsSchema.extend({ pixelRatio: z10.literal(2) })
17219
18082
  }).strict()
17220
18083
  }).strict().superRefine((manifest, context) => {
17221
18084
  if (manifest.renderedIcons.some(
@@ -17350,7 +18213,7 @@ function containsControlCharacter(value) {
17350
18213
  }
17351
18214
 
17352
18215
  // src/font-bundle.ts
17353
- import { z as z10 } from "zod";
18216
+ import { z as z11 } from "zod";
17354
18217
  var tileflowFontBundleLimits = {
17355
18218
  maxFaceCount: 16,
17356
18219
  maxFileCount: 32,
@@ -17359,39 +18222,39 @@ var tileflowFontBundleLimits = {
17359
18222
  maxManifestBytes: 64 * 1024,
17360
18223
  maxPackageBytes: 20 * 1024 * 1024
17361
18224
  };
17362
- var sha256Schema2 = z10.string().regex(/^[a-f0-9]{64}$/u);
17363
- var fontFileNameSchema = z10.string().max(512).regex(/^fonts\/[a-z0-9]+(?:-[a-z0-9]+)*-[a-f0-9]{64}\.(?:otf|ttf|woff2)$/u);
17364
- var licenseFileNameSchema = z10.string().max(512).regex(/^fonts\/licenses\/license-[a-f0-9]{64}\.txt$/u);
17365
- var fontFamilySchema = z10.string().min(1).max(100).refine(
18225
+ var sha256Schema2 = z11.string().regex(/^[a-f0-9]{64}$/u);
18226
+ var fontFileNameSchema = z11.string().max(512).regex(/^fonts\/[a-z0-9]+(?:-[a-z0-9]+)*-[a-f0-9]{64}\.(?:otf|ttf|woff2)$/u);
18227
+ var licenseFileNameSchema = z11.string().max(512).regex(/^fonts\/licenses\/license-[a-f0-9]{64}\.txt$/u);
18228
+ var fontFamilySchema = z11.string().min(1).max(100).refine(
17366
18229
  (value) => value === value.trim() && !/[\p{Cc}\\]/u.test(value),
17367
18230
  "Font family must be printable, trimmed text"
17368
18231
  );
17369
18232
  var tileflowFontBundleContentHashSchema = sha256Schema2;
17370
- var fontFileSchema = z10.object({
17371
- byteLength: z10.number().int().positive().max(tileflowFontBundleLimits.maxFontFileBytes),
17372
- contentType: z10.enum(["font/otf", "font/ttf", "font/woff2"]),
17373
- kind: z10.literal("font"),
18233
+ var fontFileSchema = z11.object({
18234
+ byteLength: z11.number().int().positive().max(tileflowFontBundleLimits.maxFontFileBytes),
18235
+ contentType: z11.enum(["font/otf", "font/ttf", "font/woff2"]),
18236
+ kind: z11.literal("font"),
17374
18237
  name: fontFileNameSchema,
17375
18238
  sha256: sha256Schema2
17376
18239
  }).strict();
17377
- var licenseFileSchema = z10.object({
17378
- byteLength: z10.number().int().positive().max(tileflowFontBundleLimits.maxLicenseFileBytes),
17379
- contentType: z10.literal("text/plain; charset=utf-8"),
17380
- kind: z10.literal("license"),
18240
+ var licenseFileSchema = z11.object({
18241
+ byteLength: z11.number().int().positive().max(tileflowFontBundleLimits.maxLicenseFileBytes),
18242
+ contentType: z11.literal("text/plain; charset=utf-8"),
18243
+ kind: z11.literal("license"),
17381
18244
  name: licenseFileNameSchema,
17382
18245
  sha256: sha256Schema2
17383
18246
  }).strict();
17384
- var fontFaceSchema = z10.object({
18247
+ var fontFaceSchema = z11.object({
17385
18248
  family: fontFamilySchema,
17386
18249
  file: fontFileNameSchema,
17387
18250
  licenseFile: licenseFileNameSchema,
17388
- style: z10.enum(["italic", "normal", "oblique"]),
17389
- weight: z10.enum(["100", "200", "300", "400", "500", "600", "700", "800", "900"])
18251
+ style: z11.enum(["italic", "normal", "oblique"]),
18252
+ weight: z11.enum(["100", "200", "300", "400", "500", "600", "700", "800", "900"])
17390
18253
  }).strict();
17391
- var tileflowFontBundleManifestSchema = z10.object({
17392
- files: z10.array(z10.discriminatedUnion("kind", [fontFileSchema, licenseFileSchema])).min(2).max(tileflowFontBundleLimits.maxFileCount),
17393
- fontFaces: z10.array(fontFaceSchema).min(1).max(tileflowFontBundleLimits.maxFaceCount),
17394
- format: z10.literal("tileflow-font-bundle-v1")
18254
+ var tileflowFontBundleManifestSchema = z11.object({
18255
+ files: z11.array(z11.discriminatedUnion("kind", [fontFileSchema, licenseFileSchema])).min(2).max(tileflowFontBundleLimits.maxFileCount),
18256
+ fontFaces: z11.array(fontFaceSchema).min(1).max(tileflowFontBundleLimits.maxFaceCount),
18257
+ format: z11.literal("tileflow-font-bundle-v1")
17395
18258
  }).strict().superRefine((manifest, context) => {
17396
18259
  const sortedFiles = [...manifest.files].sort(
17397
18260
  (left, right) => compareCodeUnits11(left.name, right.name)
@@ -17833,7 +18696,7 @@ async function requestSessionGrant(input) {
17833
18696
  else throw error;
17834
18697
  }
17835
18698
  throwIfSessionGrantAborted(signal);
17836
- if (response.status === 409 && isRecord11(body) && body.code === "COMMERCIAL_SESSION_RESTART_REQUIRED" && body.ok === false && body.retryWithNewSession === true && body.sessionId === input.sessionId) {
18699
+ if (response.status === 409 && isRecord12(body) && body.code === "COMMERCIAL_SESSION_RESTART_REQUIRED" && body.ok === false && body.retryWithNewSession === true && body.sessionId === input.sessionId) {
17837
18700
  throw new TileflowSessionRestartError();
17838
18701
  }
17839
18702
  if (!response.ok) {
@@ -17906,7 +18769,7 @@ function sessionGrantAbortReason(signal) {
17906
18769
  return error;
17907
18770
  }
17908
18771
  function parseSessionGrantResponse(value, expectedSessionId) {
17909
- if (!isRecord11(value) || value.ok !== true || value.sessionId !== expectedSessionId) return null;
18772
+ if (!isRecord12(value) || value.ok !== true || value.sessionId !== expectedSessionId) return null;
17910
18773
  if (value.usageMode !== void 0 && value.usageMode !== "session") return null;
17911
18774
  if (value.billingEnabled !== void 0 && value.billingEnabled !== false) return null;
17912
18775
  if (value.disposition !== void 0 && value.disposition !== "ordinary" && value.disposition !== "unbilled_fail_open") {
@@ -17925,11 +18788,11 @@ function parseSessionGrantResponse(value, expectedSessionId) {
17925
18788
  }
17926
18789
  return value;
17927
18790
  }
17928
- function isRecord11(value) {
18791
+ function isRecord12(value) {
17929
18792
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
17930
18793
  }
17931
18794
  function isPlainRuntimeRecord(value) {
17932
- if (!isRecord11(value)) return false;
18795
+ if (!isRecord12(value)) return false;
17933
18796
  const prototype = Object.getPrototypeOf(value);
17934
18797
  return prototype === Object.prototype || prototype === null;
17935
18798
  }
@@ -18360,7 +19223,7 @@ function getTileflowLocationBaseUrl() {
18360
19223
  }
18361
19224
 
18362
19225
  // src/icon-lock.ts
18363
- import { z as z11 } from "zod";
19226
+ import { z as z12 } from "zod";
18364
19227
 
18365
19228
  // src/icon-json.ts
18366
19229
  function parseTileflowIconJson(text, maximumBytes) {
@@ -18467,15 +19330,15 @@ function parseTileflowIconJson(text, maximumBytes) {
18467
19330
  // src/icon-lock.ts
18468
19331
  var tileflowIconsLockfileName = "tileflow.icons.lock.json";
18469
19332
  var tileflowIconsLockfileMaximumBytes = 4 * 1024 * 1024;
18470
- var tileflowIconSetPinSchema = z11.object({
19333
+ var tileflowIconSetPinSchema = z12.object({
18471
19334
  teamId: tileflowIconSetTeamIdSchema,
18472
19335
  setId: tileflowIconSetIdSchema,
18473
19336
  versionId: tileflowIconSetVersionIdSchema,
18474
- version: z11.number().int().positive().max(Number.MAX_SAFE_INTEGER),
19337
+ version: z12.number().int().positive().max(Number.MAX_SAFE_INTEGER),
18475
19338
  packageId: tileflowIconSetPackageIdSchema,
18476
19339
  contentHash: tileflowIconPackageContentHashSchema,
18477
19340
  manifest: tileflowIconPackageManifestSchema,
18478
- spriteUrl: z11.string().max(2048)
19341
+ spriteUrl: z12.string().max(2048)
18479
19342
  }).strict().superRefine((pin, context) => {
18480
19343
  try {
18481
19344
  const url = new URL(pin.spriteUrl);
@@ -18490,9 +19353,9 @@ var tileflowIconSetPinSchema = z11.object({
18490
19353
  });
18491
19354
  }
18492
19355
  });
18493
- var tileflowIconsLockfileSchema = z11.object({
18494
- lockfileVersion: z11.literal(1),
18495
- sets: z11.record(tileflowIconSetReferenceSchema, tileflowIconSetPinSchema)
19356
+ var tileflowIconsLockfileSchema = z12.object({
19357
+ lockfileVersion: z12.literal(1),
19358
+ sets: z12.record(tileflowIconSetReferenceSchema, tileflowIconSetPinSchema)
18496
19359
  }).strict().superRefine((lock, context) => {
18497
19360
  const entries = Object.entries(lock.sets);
18498
19361
  if (entries.length > tileflowIconSourceLimit) {
@@ -18546,59 +19409,59 @@ async function serializeTileflowIconsLockfile(input) {
18546
19409
  }
18547
19410
 
18548
19411
  // src/icon-composition.ts
18549
- import { z as z12 } from "zod";
19412
+ import { z as z13 } from "zod";
18550
19413
  var tileflowIconCompositionMaximumBytes = 1024 * 1024;
18551
- var idsSchema = z12.array(tileflowIconIdSchema).max(tileflowIconPackageLimits.maxIconCount).refine(
19414
+ var idsSchema = z13.array(tileflowIconIdSchema).max(tileflowIconPackageLimits.maxIconCount).refine(
18552
19415
  (ids) => new Set(ids).size === ids.length && ids.every((id2, index) => index === 0 || compareCodeUnits11(ids[index - 1], id2) < 0),
18553
19416
  "Icon exports must be unique and sorted by code unit"
18554
19417
  );
18555
- var localContributorSchema = z12.object({ kind: z12.literal("local"), iconIds: idsSchema }).strict();
18556
- var packageContributorSchema = z12.object({
18557
- kind: z12.literal("package"),
18558
- package: z12.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u),
19418
+ var localContributorSchema = z13.object({ kind: z13.literal("local"), iconIds: idsSchema }).strict();
19419
+ var packageContributorSchema = z13.object({
19420
+ kind: z13.literal("package"),
19421
+ package: z13.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u),
18559
19422
  iconIds: idsSchema
18560
19423
  }).strict();
18561
- var setContributorSchema = z12.object({
18562
- kind: z12.literal("icon-set"),
19424
+ var setContributorSchema = z13.object({
19425
+ kind: z13.literal("icon-set"),
18563
19426
  reference: tileflowIconSetReferenceSchema,
18564
19427
  teamId: tileflowIconSetTeamIdSchema,
18565
19428
  setId: tileflowIconSetIdSchema,
18566
19429
  versionId: tileflowIconSetVersionIdSchema,
18567
- version: z12.number().int().positive().max(Number.MAX_SAFE_INTEGER),
19430
+ version: z13.number().int().positive().max(Number.MAX_SAFE_INTEGER),
18568
19431
  packageId: tileflowIconSetPackageIdSchema,
18569
19432
  contentHash: tileflowIconPackageContentHashSchema,
18570
19433
  iconIds: idsSchema.min(1)
18571
19434
  }).strict();
18572
- var tileflowRenderedIconIdentitySchema = z12.object({
18573
- kind: z12.literal("rendered-icon"),
19435
+ var tileflowRenderedIconIdentitySchema = z13.object({
19436
+ kind: z13.literal("rendered-icon"),
18574
19437
  id: tileflowIconIdSchema,
18575
19438
  appearance: tileflowIconAppearanceSchema.optional(),
18576
19439
  layout: tileflowIconLayoutSchema.optional(),
18577
- width: z12.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
18578
- height: z12.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
18579
- pixelSha256: z12.object({
19440
+ width: z13.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
19441
+ height: z13.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
19442
+ pixelSha256: z13.object({
18580
19443
  oneX: tileflowIconPackageContentHashSchema,
18581
19444
  twoX: tileflowIconPackageContentHashSchema
18582
19445
  }).strict()
18583
19446
  }).strict();
18584
- var tileflowIconCompositionSchema = z12.object({
19447
+ var tileflowIconCompositionSchema = z13.object({
18585
19448
  // An explicit map keeps declaration order independent of TypeScript's literal cache.
18586
- format: z12.enum({
19449
+ format: z13.enum({
18587
19450
  "tileflow-icon-composition-v1": "tileflow-icon-composition-v1",
18588
19451
  "tileflow-icon-composition-v2": "tileflow-icon-composition-v2"
18589
19452
  }),
18590
- compositionVersion: z12.union([z12.literal(1), z12.literal(2)]),
19453
+ compositionVersion: z13.union([z13.literal(1), z13.literal(2)]),
18591
19454
  packageHash: tileflowIconPackageContentHashSchema,
18592
- contributors: z12.array(
18593
- z12.discriminatedUnion("kind", [
19455
+ contributors: z13.array(
19456
+ z13.discriminatedUnion("kind", [
18594
19457
  localContributorSchema,
18595
19458
  packageContributorSchema,
18596
19459
  setContributorSchema
18597
19460
  ])
18598
19461
  ).min(1).max(tileflowIconSourceLimit),
18599
- winners: z12.array(
19462
+ winners: z13.array(
18600
19463
  tileflowRenderedIconIdentitySchema.omit({ kind: true }).extend({
18601
- contributor: z12.number().int().min(0).max(tileflowIconSourceLimit - 1)
19464
+ contributor: z13.number().int().min(0).max(tileflowIconSourceLimit - 1)
18602
19465
  })
18603
19466
  ).min(1).max(tileflowIconPackageLimits.maxIconCount)
18604
19467
  }).strict().superRefine((receipt, context) => {
@@ -18683,15 +19546,15 @@ async function hashTileflowIconComposition(input) {
18683
19546
  }
18684
19547
 
18685
19548
  // src/icon-sprite-index.ts
18686
- import { z as z13 } from "zod";
18687
- var tileflowIconSpriteIndexEntrySchema = z13.object({
19549
+ import { z as z14 } from "zod";
19550
+ var tileflowIconSpriteIndexEntrySchema = z14.object({
18688
19551
  ...tileflowIconLayoutFields,
18689
- height: z13.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
18690
- width: z13.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
18691
- pixelRatio: z13.union([z13.literal(1), z13.literal(2)]),
18692
- x: z13.number().int().nonnegative().max(tileflowIconPackageLimits.maxAtlasDimension),
18693
- y: z13.number().int().nonnegative().max(tileflowIconPackageLimits.maxAtlasDimension),
18694
- sdf: z13.literal(true).optional(),
19552
+ height: z14.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
19553
+ width: z14.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
19554
+ pixelRatio: z14.union([z14.literal(1), z14.literal(2)]),
19555
+ x: z14.number().int().nonnegative().max(tileflowIconPackageLimits.maxAtlasDimension),
19556
+ y: z14.number().int().nonnegative().max(tileflowIconPackageLimits.maxAtlasDimension),
19557
+ sdf: z14.literal(true).optional(),
18695
19558
  tileflow: tileflowIconAppearanceSchema.optional()
18696
19559
  }).strict().refine(
18697
19560
  (entry) => entry.sdf === true === (entry.tileflow !== void 0),
@@ -18707,7 +19570,7 @@ var tileflowIconSpriteIndexEntrySchema = z13.object({
18707
19570
  });
18708
19571
  }
18709
19572
  });
18710
- var tileflowIconSpriteIndexSchema = z13.record(tileflowIconIdSchema, tileflowIconSpriteIndexEntrySchema).refine(
19573
+ var tileflowIconSpriteIndexSchema = z14.record(tileflowIconIdSchema, tileflowIconSpriteIndexEntrySchema).refine(
18711
19574
  (index) => Object.keys(index).length > 0 && Object.keys(index).length <= tileflowIconPackageLimits.maxIconCount,
18712
19575
  `A generated sprite index must contain 1 through ${tileflowIconPackageLimits.maxIconCount} icons`
18713
19576
  );
@@ -18775,10 +19638,12 @@ export {
18775
19638
  loadTileflowManifest,
18776
19639
  maplibreOverlay,
18777
19640
  mergeTileflowAnalytics,
19641
+ mixTileflowSunPresets,
18778
19642
  nautical,
18779
19643
  nearestTileflowBlendTheme,
18780
19644
  normalizeTileflowCaptureId,
18781
19645
  normalizeTileflowCaptureScene,
19646
+ normalizeTileflowCaptureShot,
18782
19647
  normalizeTileflowLineBackgroundMetrics,
18783
19648
  normalizeTileflowRuntimeCenter,
18784
19649
  normalizeTileflowStaticImageSize,
@@ -18794,6 +19659,7 @@ export {
18794
19659
  parseTileflowRuntimeManifest,
18795
19660
  poi,
18796
19661
  readTileflowIconLayout,
19662
+ readTileflowSunPreset,
18797
19663
  refine,
18798
19664
  refineRenderTarget,
18799
19665
  remove,
@@ -18809,11 +19675,13 @@ export {
18809
19675
  resolveTileflowIconPreviewPaint,
18810
19676
  resolveTileflowManifestMap,
18811
19677
  resolveTileflowMapMode,
19678
+ resolveTileflowRouteInks,
18812
19679
  resolveTileflowRuntimeStyle,
18813
19680
  resolveTileflowRuntimeTheme,
18814
19681
  resolveTileflowRuntimeThemeBlend,
18815
19682
  resolveTileflowRuntimeView,
18816
19683
  resolveTileflowStaticImageUrl,
19684
+ resolveTileflowSun,
18817
19685
  resolveTileflowTheme,
18818
19686
  roads,
18819
19687
  safeParseTileflowRuntimeManifest,
@@ -18842,11 +19710,21 @@ export {
18842
19710
  tileflowCaptureSceneNameSchema,
18843
19711
  tileflowCaptureSceneSchema,
18844
19712
  tileflowCaptureSceneSchemaVersion,
19713
+ tileflowCaptureShotBlendSchema,
19714
+ tileflowCaptureShotFrameCount,
19715
+ tileflowCaptureShotFrames,
19716
+ tileflowCaptureShotKeyframeSchema,
19717
+ tileflowCaptureShotLimits,
19718
+ tileflowCaptureShotNameSchema,
19719
+ tileflowCaptureShotSchema,
19720
+ tileflowCaptureShotSchemaVersion,
18845
19721
  tileflowCaptureTargetSchema,
18846
19722
  tileflowCaptureViewportSchema,
18847
19723
  tileflowCompilationPhases,
18848
19724
  tileflowCompilationPlannerStages,
18849
19725
  tileflowCompilationReportSchemaVersion,
19726
+ tileflowDefaultRouteInks,
19727
+ tileflowDefaultSunPreset,
18850
19728
  tileflowFontBundleContentHashSchema,
18851
19729
  tileflowFontBundleLimits,
18852
19730
  tileflowFontBundleManifestSchema,
@@ -18904,12 +19782,18 @@ export {
18904
19782
  tileflowRenderedIconIdentitySchema,
18905
19783
  tileflowRenderedIconManifestEntrySchema,
18906
19784
  tileflowRoadClasses,
19785
+ tileflowRouteMetadataKey,
19786
+ tileflowRouteTokens,
18907
19787
  tileflowRuntimeManifestLimits,
18908
19788
  tileflowRuntimeManifestSchema,
18909
19789
  tileflowRuntimeManifestVersion,
18910
19790
  tileflowSemanticDiffSchemaVersion,
18911
19791
  tileflowStyleFontFaceLimits,
18912
19792
  tileflowStyleFontFacesMetadataKey,
19793
+ tileflowStyleSunPreset,
19794
+ tileflowSunDirection,
19795
+ tileflowSunMetadataKey,
19796
+ tileflowSunPosition,
18913
19797
  tileflowThemeBlendLimits,
18914
19798
  tileflowThemeLimits,
18915
19799
  tileflowThemeNameSchema,