@tileflow/core 0.1.0-alpha.24 → 0.1.0-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.js CHANGED
@@ -6771,10 +6771,10 @@ function roadWidth(roadClass, scale) {
6771
6771
  [16, 3.4]
6772
6772
  ]
6773
6773
  };
6774
- return zoom.linear(stops[roadClass].map(([z7, value]) => [z7, value * scale]));
6774
+ return zoom.linear(stops[roadClass].map(([z9, value]) => [z9, value * scale]));
6775
6775
  }
6776
6776
  function widen(value, addition) {
6777
- return zoom.linear(value.stops.map(([z7, width]) => [z7, width + addition]));
6777
+ return zoom.linear(value.stops.map(([z9, width]) => [z9, width + addition]));
6778
6778
  }
6779
6779
  function structureFilter(field2, structure) {
6780
6780
  if (structure === "surface") {
@@ -8420,8 +8420,60 @@ function assertNever(value) {
8420
8420
  throw new Error(`Unsupported Tileflow map merge strategy: ${String(value)}`);
8421
8421
  }
8422
8422
 
8423
- // src/resolved-map-schema.ts
8423
+ // src/icon-set.ts
8424
8424
  import { z as z3 } from "zod";
8425
+ var tileflowIconSourceLimit = 32;
8426
+ var slug = "[a-z0-9]+(?:-[a-z0-9]+)*";
8427
+ var tileflowIconSetReferenceSchema = z3.string().max(130).regex(
8428
+ new RegExp(`^@${slug}/${slug}$`, "u"),
8429
+ "Expected a canonical @team/set reference without a version suffix"
8430
+ ).refine(
8431
+ (value) => value.slice(1).split("/").every((part) => part.length <= 64),
8432
+ "Team and set slugs must contain at most 64 characters"
8433
+ );
8434
+ var tileflowIconSetSourceSchema = z3.object({
8435
+ kind: z3.literal("icon-set"),
8436
+ reference: tileflowIconSetReferenceSchema
8437
+ }).strict();
8438
+ var tileflowIconSetIdSchema = z3.string().regex(/^ics_[A-Za-z0-9_-]{16}$/u);
8439
+ var tileflowIconSetVersionIdSchema = z3.string().regex(/^icv_[A-Za-z0-9_-]{16}$/u);
8440
+ var tileflowIconSetPackageIdSchema = z3.string().regex(/^icp_[A-Za-z0-9_-]{16,64}$/u);
8441
+ var tileflowIconSetTeamIdSchema = z3.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/u);
8442
+ var TileflowIconSetError = class extends Error {
8443
+ constructor(code, message, options) {
8444
+ super(message, options);
8445
+ this.code = code;
8446
+ this.name = "TileflowIconSetError";
8447
+ }
8448
+ code;
8449
+ phase = "icon-resolution";
8450
+ };
8451
+ function collectTileflowIconSetReferences(sources) {
8452
+ if (sources.length > tileflowIconSourceLimit) {
8453
+ throw new TileflowIconSetError(
8454
+ "ICON_SET_INVALID",
8455
+ `A map supports at most ${tileflowIconSourceLimit} icon contributors`
8456
+ );
8457
+ }
8458
+ const references = [];
8459
+ const seen = /* @__PURE__ */ new Set();
8460
+ for (const source of sources) {
8461
+ if (typeof source !== "object" || source === null || source.kind !== "icon-set") continue;
8462
+ const parsed = tileflowIconSetSourceSchema.safeParse(source);
8463
+ if (!parsed.success || seen.has(source.reference)) {
8464
+ throw new TileflowIconSetError(
8465
+ "ICON_SET_INVALID",
8466
+ "Icon set references must be canonical and unique within a map"
8467
+ );
8468
+ }
8469
+ seen.add(source.reference);
8470
+ references.push(source.reference);
8471
+ }
8472
+ return references;
8473
+ }
8474
+
8475
+ // src/resolved-map-schema.ts
8476
+ import { z as z4 } from "zod";
8425
8477
 
8426
8478
  // src/cartography/data-expression.ts
8427
8479
  var tileflowDataExpressionLimits = Object.freeze({
@@ -10384,11 +10436,11 @@ var TileflowResolvedMapValidationError = class extends Error {
10384
10436
  this.messages = messages;
10385
10437
  }
10386
10438
  };
10387
- var identifierSchema = z3.string().trim().regex(/^[A-Za-z0-9_-]+$/, "Expected letters, numbers, underscores, or hyphens").refine((value) => value !== "__proto__", "Expected a safe identifier");
10388
- var revisionSchema = z3.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/, "Expected a portable data revision");
10389
- var zoomNumberSchema = z3.number().finite().min(0).max(24);
10439
+ var identifierSchema = z4.string().trim().regex(/^[A-Za-z0-9_-]+$/, "Expected letters, numbers, underscores, or hyphens").refine((value) => value !== "__proto__", "Expected a safe identifier");
10440
+ var revisionSchema = z4.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/, "Expected a portable data revision");
10441
+ var zoomNumberSchema = z4.number().finite().min(0).max(24);
10390
10442
  function zoomValueSchemaFor(valueSchema) {
10391
- const stops = z3.array(z3.tuple([zoomNumberSchema, valueSchema])).min(1).superRefine((entries, context) => {
10443
+ const stops = z4.array(z4.tuple([zoomNumberSchema, valueSchema])).min(1).superRefine((entries, context) => {
10392
10444
  for (let index = 1; index < entries.length; index += 1) {
10393
10445
  if (entries[index][0] <= entries[index - 1][0]) {
10394
10446
  context.addIssue({
@@ -10399,105 +10451,105 @@ function zoomValueSchemaFor(valueSchema) {
10399
10451
  }
10400
10452
  }
10401
10453
  });
10402
- return z3.discriminatedUnion("interpolation", [
10403
- z3.object({
10404
- base: z3.number().finite().positive(),
10405
- interpolation: z3.literal("exponential"),
10406
- kind: z3.literal("zoom"),
10454
+ return z4.discriminatedUnion("interpolation", [
10455
+ z4.object({
10456
+ base: z4.number().finite().positive(),
10457
+ interpolation: z4.literal("exponential"),
10458
+ kind: z4.literal("zoom"),
10407
10459
  stops
10408
10460
  }).strict(),
10409
- z3.object({
10410
- interpolation: z3.literal("linear"),
10411
- kind: z3.literal("zoom"),
10461
+ z4.object({
10462
+ interpolation: z4.literal("linear"),
10463
+ kind: z4.literal("zoom"),
10412
10464
  stops
10413
10465
  }).strict(),
10414
- z3.object({
10415
- interpolation: z3.literal("step"),
10416
- kind: z3.literal("zoom"),
10466
+ z4.object({
10467
+ interpolation: z4.literal("step"),
10468
+ kind: z4.literal("zoom"),
10417
10469
  stops
10418
10470
  }).strict()
10419
10471
  ]);
10420
10472
  }
10421
- var themeTokenNameSchema = z3.string().regex(
10473
+ var themeTokenNameSchema = z4.string().regex(
10422
10474
  /^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z][A-Za-z0-9_-]*)*$/,
10423
10475
  "Expected a portable dot-separated semantic token name"
10424
10476
  );
10425
- var themeTokenReferenceSchema = z3.object({
10426
- category: z3.enum(tileflowThemeTokenCategories),
10427
- kind: z3.literal("theme-token"),
10477
+ var themeTokenReferenceSchema = z4.object({
10478
+ category: z4.enum(tileflowThemeTokenCategories),
10479
+ kind: z4.literal("theme-token"),
10428
10480
  token: themeTokenNameSchema
10429
10481
  }).strict();
10430
10482
  var themeNumberReferenceSchema = themeTokenReferenceSchema.extend({
10431
- category: z3.literal("number")
10483
+ category: z4.literal("number")
10432
10484
  });
10433
- var fixedNumberSchema = z3.object({
10434
- kind: z3.literal("theme-fixed"),
10435
- reason: z3.string().trim().min(1),
10436
- value: z3.number().finite()
10485
+ var fixedNumberSchema = z4.object({
10486
+ kind: z4.literal("theme-fixed"),
10487
+ reason: z4.string().trim().min(1),
10488
+ value: z4.number().finite()
10437
10489
  }).strict();
10438
- var fixedNumberArraySchema = z3.object({
10439
- kind: z3.literal("theme-fixed"),
10440
- reason: z3.string().trim().min(1),
10441
- value: z3.array(z3.number().finite())
10490
+ var fixedNumberArraySchema = z4.object({
10491
+ kind: z4.literal("theme-fixed"),
10492
+ reason: z4.string().trim().min(1),
10493
+ value: z4.array(z4.number().finite())
10442
10494
  }).strict();
10443
- var fixedNumberOffsetSchema = z3.object({
10444
- kind: z3.literal("theme-fixed"),
10445
- reason: z3.string().trim().min(1),
10446
- value: z3.tuple([z3.number().finite(), z3.number().finite()])
10495
+ var fixedNumberOffsetSchema = z4.object({
10496
+ kind: z4.literal("theme-fixed"),
10497
+ reason: z4.string().trim().min(1),
10498
+ value: z4.tuple([z4.number().finite(), z4.number().finite()])
10447
10499
  }).strict();
10448
- var fixedNumberInsetsSchema = z3.object({
10449
- kind: z3.literal("theme-fixed"),
10450
- reason: z3.string().trim().min(1),
10451
- value: z3.tuple([
10452
- z3.number().finite(),
10453
- z3.number().finite(),
10454
- z3.number().finite(),
10455
- z3.number().finite()
10500
+ var fixedNumberInsetsSchema = z4.object({
10501
+ kind: z4.literal("theme-fixed"),
10502
+ reason: z4.string().trim().min(1),
10503
+ value: z4.tuple([
10504
+ z4.number().finite(),
10505
+ z4.number().finite(),
10506
+ z4.number().finite(),
10507
+ z4.number().finite()
10456
10508
  ])
10457
10509
  }).strict();
10458
- var fixedStringSchema = z3.object({ kind: z3.literal("theme-fixed"), reason: z3.string().trim().min(1), value: z3.string() }).strict();
10459
- var themeColorOperationSchema = z3.lazy(
10460
- () => z3.discriminatedUnion("operation", [
10461
- z3.object({
10510
+ var fixedStringSchema = z4.object({ kind: z4.literal("theme-fixed"), reason: z4.string().trim().min(1), value: z4.string() }).strict();
10511
+ var themeColorOperationSchema = z4.lazy(
10512
+ () => z4.discriminatedUnion("operation", [
10513
+ z4.object({
10462
10514
  color: themeColorValueSchema,
10463
- kind: z3.literal("theme-color"),
10515
+ kind: z4.literal("theme-color"),
10464
10516
  opacity: themeNumberValueSchema,
10465
- operation: z3.literal("alpha")
10517
+ operation: z4.literal("alpha")
10466
10518
  }).strict(),
10467
- z3.object({
10519
+ z4.object({
10468
10520
  amount: themeNumberValueSchema,
10469
10521
  from: themeColorValueSchema,
10470
- kind: z3.literal("theme-color"),
10471
- operation: z3.literal("mix"),
10472
- space: z3.literal("oklch"),
10522
+ kind: z4.literal("theme-color"),
10523
+ operation: z4.literal("mix"),
10524
+ space: z4.literal("oklch"),
10473
10525
  to: themeColorValueSchema
10474
10526
  }).strict()
10475
10527
  ])
10476
10528
  );
10477
- var themeNumberValueSchema = z3.lazy(
10478
- () => z3.union([z3.number().finite(), fixedNumberSchema, themeNumberReferenceSchema])
10529
+ var themeNumberValueSchema = z4.lazy(
10530
+ () => z4.union([z4.number().finite(), fixedNumberSchema, themeNumberReferenceSchema])
10479
10531
  );
10480
- var themeColorValueSchema = z3.lazy(
10481
- () => z3.union([
10482
- z3.string().min(1),
10532
+ var themeColorValueSchema = z4.lazy(
10533
+ () => z4.union([
10534
+ z4.string().min(1),
10483
10535
  fixedStringSchema,
10484
- themeTokenReferenceSchema.extend({ category: z3.literal("color") }),
10536
+ themeTokenReferenceSchema.extend({ category: z4.literal("color") }),
10485
10537
  themeColorOperationSchema
10486
10538
  ])
10487
10539
  );
10488
- var themeFontValueSchema = z3.union([
10489
- z3.string().min(1),
10540
+ var themeFontValueSchema = z4.union([
10541
+ z4.string().min(1),
10490
10542
  fixedStringSchema,
10491
- themeTokenReferenceSchema.extend({ category: z3.literal("font") })
10543
+ themeTokenReferenceSchema.extend({ category: z4.literal("font") })
10492
10544
  ]);
10493
- var themeImageValueSchema = z3.union([
10494
- z3.string().min(1),
10545
+ var themeImageValueSchema = z4.union([
10546
+ z4.string().min(1),
10495
10547
  fixedStringSchema,
10496
- themeTokenReferenceSchema.extend({ category: z3.literal("image") })
10548
+ themeTokenReferenceSchema.extend({ category: z4.literal("image") })
10497
10549
  ]);
10498
10550
  function expressionSchemaFor(expectedCategory) {
10499
10551
  const category = expectedCategory ?? "structural";
10500
- return z3.object({ kind: z3.literal("expression"), value: z3.array(z3.unknown()).min(1) }).strict().superRefine((expression2, context) => {
10552
+ return z4.object({ kind: z4.literal("expression"), value: z4.array(z4.unknown()).min(1) }).strict().superRefine((expression2, context) => {
10501
10553
  for (const issue of validateTileflowDataExpression(expression2.value)) {
10502
10554
  context.addIssue({
10503
10555
  code: "custom",
@@ -10551,7 +10603,7 @@ function validateExpressionThemeValues(value, expectedCategory, context, path) {
10551
10603
  return;
10552
10604
  }
10553
10605
  if (candidate.kind === "theme-fixed") {
10554
- const parsed = expectedCategory === "number" ? z3.union([fixedNumberSchema, fixedNumberArraySchema]).safeParse(candidate) : expectedCategory === "color" || expectedCategory === "image" ? fixedStringSchema.safeParse(candidate) : void 0;
10606
+ const parsed = expectedCategory === "number" ? z4.union([fixedNumberSchema, fixedNumberArraySchema]).safeParse(candidate) : expectedCategory === "color" || expectedCategory === "image" ? fixedStringSchema.safeParse(candidate) : void 0;
10555
10607
  if (!parsed?.success) {
10556
10608
  context.addIssue({
10557
10609
  code: "custom",
@@ -10582,71 +10634,71 @@ var structuralExpressionSchema = expressionSchemaFor(void 0);
10582
10634
  var numberZoomValueSchema = zoomValueSchemaFor(themeNumberValueSchema);
10583
10635
  var colorZoomValueSchema = zoomValueSchemaFor(themeColorValueSchema);
10584
10636
  var imageZoomValueSchema = zoomValueSchemaFor(themeImageValueSchema);
10585
- var stringZoomValueSchema = zoomValueSchemaFor(z3.string());
10586
- var numberValueSchema = z3.union([
10637
+ var stringZoomValueSchema = zoomValueSchemaFor(z4.string());
10638
+ var numberValueSchema = z4.union([
10587
10639
  themeNumberValueSchema,
10588
10640
  numberExpressionSchema,
10589
10641
  numberZoomValueSchema
10590
10642
  ]);
10591
- var structuralNumberValueSchema = z3.union([
10592
- z3.number().finite(),
10643
+ var structuralNumberValueSchema = z4.union([
10644
+ z4.number().finite(),
10593
10645
  structuralExpressionSchema,
10594
- zoomValueSchemaFor(z3.number().finite())
10646
+ zoomValueSchemaFor(z4.number().finite())
10595
10647
  ]);
10596
- var colorValueSchema = z3.union([
10648
+ var colorValueSchema = z4.union([
10597
10649
  themeColorValueSchema,
10598
10650
  colorExpressionSchema,
10599
10651
  colorZoomValueSchema
10600
10652
  ]);
10601
- var imageValueSchema = z3.union([
10653
+ var imageValueSchema = z4.union([
10602
10654
  themeImageValueSchema,
10603
10655
  imageExpressionSchema,
10604
10656
  imageZoomValueSchema
10605
10657
  ]);
10606
- var stringValueSchema = z3.union([z3.string(), structuralExpressionSchema, stringZoomValueSchema]);
10607
- var themeNumberArraySchema = z3.array(themeNumberValueSchema);
10608
- var themeNumberArrayValueSchema = z3.union([themeNumberArraySchema, fixedNumberArraySchema]);
10609
- var numberArrayValueSchema = z3.union([
10658
+ var stringValueSchema = z4.union([z4.string(), structuralExpressionSchema, stringZoomValueSchema]);
10659
+ var themeNumberArraySchema = z4.array(themeNumberValueSchema);
10660
+ var themeNumberArrayValueSchema = z4.union([themeNumberArraySchema, fixedNumberArraySchema]);
10661
+ var numberArrayValueSchema = z4.union([
10610
10662
  themeNumberArrayValueSchema,
10611
10663
  numberExpressionSchema,
10612
10664
  zoomValueSchemaFor(themeNumberArrayValueSchema)
10613
10665
  ]);
10614
- var themeNumberOffsetSchema = z3.tuple([themeNumberValueSchema, themeNumberValueSchema]);
10615
- var themeNumberOffsetValueSchema = z3.union([themeNumberOffsetSchema, fixedNumberOffsetSchema]);
10616
- var numberOffsetValueSchema = z3.union([
10666
+ var themeNumberOffsetSchema = z4.tuple([themeNumberValueSchema, themeNumberValueSchema]);
10667
+ var themeNumberOffsetValueSchema = z4.union([themeNumberOffsetSchema, fixedNumberOffsetSchema]);
10668
+ var numberOffsetValueSchema = z4.union([
10617
10669
  themeNumberOffsetValueSchema,
10618
10670
  numberExpressionSchema,
10619
10671
  zoomValueSchemaFor(themeNumberOffsetValueSchema)
10620
10672
  ]);
10621
- var themeNumberInsetsSchema = z3.tuple([
10673
+ var themeNumberInsetsSchema = z4.tuple([
10622
10674
  themeNumberValueSchema,
10623
10675
  themeNumberValueSchema,
10624
10676
  themeNumberValueSchema,
10625
10677
  themeNumberValueSchema
10626
10678
  ]);
10627
- var themeNumberInsetsValueSchema = z3.union([themeNumberInsetsSchema, fixedNumberInsetsSchema]);
10628
- var numberInsetsValueSchema = z3.union([
10679
+ var themeNumberInsetsValueSchema = z4.union([themeNumberInsetsSchema, fixedNumberInsetsSchema]);
10680
+ var numberInsetsValueSchema = z4.union([
10629
10681
  themeNumberInsetsValueSchema,
10630
10682
  numberExpressionSchema,
10631
10683
  zoomValueSchemaFor(themeNumberInsetsValueSchema)
10632
10684
  ]);
10633
- var lineCapSchema = z3.enum(["butt", "round", "square"]);
10634
- var lineCapValueSchema = z3.union([
10685
+ var lineCapSchema = z4.enum(["butt", "round", "square"]);
10686
+ var lineCapValueSchema = z4.union([
10635
10687
  lineCapSchema,
10636
10688
  structuralExpressionSchema,
10637
10689
  zoomValueSchemaFor(lineCapSchema)
10638
10690
  ]);
10639
- var lineJoinSchema = z3.enum(["bevel", "miter", "round"]);
10640
- var lineJoinValueSchema = z3.union([
10691
+ var lineJoinSchema = z4.enum(["bevel", "miter", "round"]);
10692
+ var lineJoinValueSchema = z4.union([
10641
10693
  lineJoinSchema,
10642
10694
  structuralExpressionSchema,
10643
10695
  zoomValueSchemaFor(lineJoinSchema)
10644
10696
  ]);
10645
- var exactFontFaceSchema = z3.string().min(1).max(100).refine(
10697
+ var exactFontFaceSchema = z4.string().min(1).max(100).refine(
10646
10698
  (value) => value === value.trim() && value === value.normalize("NFC") && !/[\p{Cc}\\]/u.test(value),
10647
10699
  "Expected an exact NFC font face name without surrounding whitespace, controls, or backslashes"
10648
10700
  );
10649
- var fontFallbacksSchema = z3.array(exactFontFaceSchema).max(8).superRefine((fallbacks, context) => {
10701
+ var fontFallbacksSchema = z4.array(exactFontFaceSchema).max(8).superRefine((fallbacks, context) => {
10650
10702
  const seen = /* @__PURE__ */ new Set();
10651
10703
  for (const [index, fallback] of fallbacks.entries()) {
10652
10704
  if (seen.has(fallback)) {
@@ -10659,16 +10711,16 @@ var fontFallbacksSchema = z3.array(exactFontFaceSchema).max(8).superRefine((fall
10659
10711
  seen.add(fallback);
10660
10712
  }
10661
10713
  });
10662
- var moduleFontValueSchema = z3.union([
10714
+ var moduleFontValueSchema = z4.union([
10663
10715
  exactFontFaceSchema,
10664
10716
  fixedStringSchema,
10665
- themeTokenReferenceSchema.extend({ category: z3.literal("font") })
10717
+ themeTokenReferenceSchema.extend({ category: z4.literal("font") })
10666
10718
  ]);
10667
- var moduleFontFallbacksSchema = z3.array(moduleFontValueSchema).max(8);
10668
- var hexColorSchema = z3.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, {
10719
+ var moduleFontFallbacksSchema = z4.array(moduleFontValueSchema).max(8);
10720
+ var hexColorSchema = z4.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, {
10669
10721
  message: "Expected a hex color like #F6F7F3 or #F6F7F3FF"
10670
10722
  });
10671
- var rgbColorSchema = z3.string().refine((value) => {
10723
+ var rgbColorSchema = z4.string().refine((value) => {
10672
10724
  const match2 = value.match(
10673
10725
  /^rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)(?:\s*,\s*(\d+(?:\.\d+)?))?\s*\)$/iu
10674
10726
  );
@@ -10677,21 +10729,21 @@ var rgbColorSchema = z3.string().refine((value) => {
10677
10729
  const alpha2 = Number(match2[4] ?? 1);
10678
10730
  return channels.every((channel) => channel >= 0 && channel <= 255) && alpha2 >= 0 && alpha2 <= 1;
10679
10731
  }, "Expected a Tileflow hex, rgb(), or rgba() color");
10680
- var terrainColorLiteralSchema = z3.union([hexColorSchema, rgbColorSchema]);
10681
- var terrainColorValueSchema = z3.union([
10732
+ var terrainColorLiteralSchema = z4.union([hexColorSchema, rgbColorSchema]);
10733
+ var terrainColorValueSchema = z4.union([
10682
10734
  terrainColorLiteralSchema,
10683
10735
  fixedStringSchema.extend({ value: terrainColorLiteralSchema }),
10684
- themeTokenReferenceSchema.extend({ category: z3.literal("color") }),
10736
+ themeTokenReferenceSchema.extend({ category: z4.literal("color") }),
10685
10737
  themeColorOperationSchema
10686
10738
  ]);
10687
10739
  function terrainNumberValueSchema(schema) {
10688
- return z3.union([schema, fixedNumberSchema.extend({ value: schema }), themeNumberReferenceSchema]);
10740
+ return z4.union([schema, fixedNumberSchema.extend({ value: schema }), themeNumberReferenceSchema]);
10689
10741
  }
10690
- var themeTypographyStyleSchema = z3.object({
10691
- fallbacks: z3.array(themeFontValueSchema).max(8).optional(),
10742
+ var themeTypographyStyleSchema = z4.object({
10743
+ fallbacks: z4.array(themeFontValueSchema).max(8).optional(),
10692
10744
  font: themeFontValueSchema.optional(),
10693
10745
  letterSpacing: themeNumberValueSchema.optional(),
10694
- transform: z3.enum(["lowercase", "none", "uppercase"]).optional()
10746
+ transform: z4.enum(["lowercase", "none", "uppercase"]).optional()
10695
10747
  }).strict();
10696
10748
  var themeTypographySchema = themeTypographyStyleSchema.extend({
10697
10749
  places: themeTypographyStyleSchema.optional(),
@@ -10699,46 +10751,46 @@ var themeTypographySchema = themeTypographyStyleSchema.extend({
10699
10751
  roads: themeTypographyStyleSchema.optional(),
10700
10752
  water: themeTypographyStyleSchema.optional()
10701
10753
  });
10702
- var themeLightingSchema = z3.object({
10703
- anchor: z3.enum(["map", "viewport"]).optional(),
10754
+ var themeLightingSchema = z4.object({
10755
+ anchor: z4.enum(["map", "viewport"]).optional(),
10704
10756
  color: themeColorValueSchema.optional(),
10705
10757
  intensity: themeNumberValueSchema.optional(),
10706
- position: z3.tuple([themeNumberValueSchema, themeNumberValueSchema, themeNumberValueSchema]).optional()
10758
+ position: z4.tuple([themeNumberValueSchema, themeNumberValueSchema, themeNumberValueSchema]).optional()
10707
10759
  }).strict();
10708
- var tileflowThemeSchema = z3.object({
10709
- colorScheme: z3.enum(["light", "dark"]),
10760
+ var tileflowThemeSchema = z4.object({
10761
+ colorScheme: z4.enum(["light", "dark"]),
10710
10762
  id: tileflowThemeNameSchema,
10711
10763
  lighting: themeLightingSchema,
10712
- tokens: z3.object({
10713
- color: z3.record(themeTokenNameSchema, themeColorValueSchema),
10714
- font: z3.record(themeTokenNameSchema, themeFontValueSchema),
10715
- image: z3.record(themeTokenNameSchema, themeImageValueSchema),
10716
- number: z3.record(themeTokenNameSchema, themeNumberValueSchema)
10764
+ tokens: z4.object({
10765
+ color: z4.record(themeTokenNameSchema, themeColorValueSchema),
10766
+ font: z4.record(themeTokenNameSchema, themeFontValueSchema),
10767
+ image: z4.record(themeTokenNameSchema, themeImageValueSchema),
10768
+ number: z4.record(themeTokenNameSchema, themeNumberValueSchema)
10717
10769
  }).strict(),
10718
10770
  typography: themeTypographySchema,
10719
- version: z3.number().int().positive()
10771
+ version: z4.number().int().positive()
10720
10772
  }).strict();
10721
10773
  var rangeShape = {
10722
10774
  maxZoom: zoomNumberSchema.optional(),
10723
10775
  minZoom: zoomNumberSchema.optional(),
10724
- visible: z3.boolean().optional()
10776
+ visible: z4.boolean().optional()
10725
10777
  };
10726
- var backgroundStyleSchema = z3.object({
10778
+ var backgroundStyleSchema = z4.object({
10727
10779
  ...rangeShape,
10728
10780
  color: colorValueSchema.optional(),
10729
10781
  opacity: numberValueSchema.optional(),
10730
10782
  pattern: imageValueSchema.optional()
10731
10783
  }).strict();
10732
- var fillStyleSchema = z3.object({
10784
+ var fillStyleSchema = z4.object({
10733
10785
  ...rangeShape,
10734
- antialias: z3.boolean().optional(),
10786
+ antialias: z4.boolean().optional(),
10735
10787
  color: colorValueSchema.optional(),
10736
10788
  opacity: numberValueSchema.optional(),
10737
10789
  pattern: imageValueSchema.optional(),
10738
10790
  translate: numberOffsetValueSchema.optional(),
10739
- translateAnchor: z3.enum(["map", "viewport"]).optional()
10791
+ translateAnchor: z4.enum(["map", "viewport"]).optional()
10740
10792
  }).strict();
10741
- var lineStyleSchema = z3.object({
10793
+ var lineStyleSchema = z4.object({
10742
10794
  ...rangeShape,
10743
10795
  blur: numberValueSchema.optional(),
10744
10796
  cap: lineCapValueSchema.optional(),
@@ -10752,13 +10804,13 @@ var lineStyleSchema = z3.object({
10752
10804
  pattern: imageValueSchema.optional(),
10753
10805
  roundLimit: numberValueSchema.optional(),
10754
10806
  translate: numberOffsetValueSchema.optional(),
10755
- translateAnchor: z3.enum(["map", "viewport"]).optional(),
10807
+ translateAnchor: z4.enum(["map", "viewport"]).optional(),
10756
10808
  width: numberValueSchema.optional()
10757
10809
  }).strict();
10758
- var textStyleSchema = z3.object({
10810
+ var textStyleSchema = z4.object({
10759
10811
  ...rangeShape,
10760
- allowOverlap: z3.boolean().optional(),
10761
- anchor: z3.enum([
10812
+ allowOverlap: z4.boolean().optional(),
10813
+ anchor: z4.enum([
10762
10814
  "bottom",
10763
10815
  "bottom-left",
10764
10816
  "bottom-right",
@@ -10776,25 +10828,25 @@ var textStyleSchema = z3.object({
10776
10828
  haloBlur: numberValueSchema.optional(),
10777
10829
  haloColor: colorValueSchema.optional(),
10778
10830
  haloWidth: numberValueSchema.optional(),
10779
- ignorePlacement: z3.boolean().optional(),
10780
- justify: z3.enum(["auto", "center", "left", "right"]).optional(),
10781
- keepUpright: z3.boolean().optional(),
10831
+ ignorePlacement: z4.boolean().optional(),
10832
+ justify: z4.enum(["auto", "center", "left", "right"]).optional(),
10833
+ keepUpright: z4.boolean().optional(),
10782
10834
  letterSpacing: numberValueSchema.optional(),
10783
10835
  lineHeight: numberValueSchema.optional(),
10784
10836
  maxAngle: numberValueSchema.optional(),
10785
10837
  maxWidth: numberValueSchema.optional(),
10786
10838
  offset: numberOffsetValueSchema.optional(),
10787
- optional: z3.boolean().optional(),
10839
+ optional: z4.boolean().optional(),
10788
10840
  opacity: numberValueSchema.optional(),
10789
10841
  padding: numberValueSchema.optional(),
10790
- pitchAlignment: z3.enum(["auto", "map", "viewport"]).optional(),
10842
+ pitchAlignment: z4.enum(["auto", "map", "viewport"]).optional(),
10791
10843
  radialOffset: numberValueSchema.optional(),
10792
10844
  rotate: numberValueSchema.optional(),
10793
- rotationAlignment: z3.enum(["auto", "map", "viewport"]).optional(),
10845
+ rotationAlignment: z4.enum(["auto", "map", "viewport"]).optional(),
10794
10846
  size: numberValueSchema.optional(),
10795
- transform: z3.enum(["lowercase", "none", "uppercase"]).optional(),
10796
- variableAnchors: z3.array(
10797
- z3.enum([
10847
+ transform: z4.enum(["lowercase", "none", "uppercase"]).optional(),
10848
+ variableAnchors: z4.array(
10849
+ z4.enum([
10798
10850
  "bottom",
10799
10851
  "bottom-left",
10800
10852
  "bottom-right",
@@ -10807,10 +10859,10 @@ var textStyleSchema = z3.object({
10807
10859
  ])
10808
10860
  ).min(1).optional()
10809
10861
  }).strict();
10810
- var iconStyleSchema = z3.object({
10862
+ var iconStyleSchema = z4.object({
10811
10863
  ...rangeShape,
10812
- allowOverlap: z3.boolean().optional(),
10813
- anchor: z3.enum([
10864
+ allowOverlap: z4.boolean().optional(),
10865
+ anchor: z4.enum([
10814
10866
  "bottom",
10815
10867
  "bottom-left",
10816
10868
  "bottom-right",
@@ -10825,60 +10877,60 @@ var iconStyleSchema = z3.object({
10825
10877
  haloBlur: numberValueSchema.optional(),
10826
10878
  haloColor: colorValueSchema.optional(),
10827
10879
  haloWidth: numberValueSchema.optional(),
10828
- ignorePlacement: z3.boolean().optional(),
10880
+ ignorePlacement: z4.boolean().optional(),
10829
10881
  image: imageValueSchema.optional(),
10830
10882
  offset: numberOffsetValueSchema.optional(),
10831
10883
  opacity: numberValueSchema.optional(),
10832
- keepUpright: z3.boolean().optional(),
10833
- optional: z3.boolean().optional(),
10884
+ keepUpright: z4.boolean().optional(),
10885
+ optional: z4.boolean().optional(),
10834
10886
  padding: numberValueSchema.optional(),
10835
- pitchAlignment: z3.enum(["auto", "map", "viewport"]).optional(),
10887
+ pitchAlignment: z4.enum(["auto", "map", "viewport"]).optional(),
10836
10888
  rotate: numberValueSchema.optional(),
10837
- rotationAlignment: z3.enum(["auto", "map", "viewport"]).optional(),
10889
+ rotationAlignment: z4.enum(["auto", "map", "viewport"]).optional(),
10838
10890
  size: numberValueSchema.optional(),
10839
- textFit: z3.enum(["both", "height", "none", "width"]).optional(),
10891
+ textFit: z4.enum(["both", "height", "none", "width"]).optional(),
10840
10892
  textFitPadding: numberInsetsValueSchema.optional()
10841
10893
  }).strict();
10842
10894
  var symbolPlacementShape = {
10843
10895
  ...rangeShape,
10844
- placement: z3.enum(["line", "line-center", "point"]).optional(),
10896
+ placement: z4.enum(["line", "line-center", "point"]).optional(),
10845
10897
  priority: structuralNumberValueSchema.optional(),
10846
- priorityOrder: z3.enum(["higher-first", "lower-first"]).optional(),
10898
+ priorityOrder: z4.enum(["higher-first", "lower-first"]).optional(),
10847
10899
  spacing: numberValueSchema.optional(),
10848
- zOrder: z3.enum(["auto", "source", "viewport-y"]).optional()
10900
+ zOrder: z4.enum(["auto", "source", "viewport-y"]).optional()
10849
10901
  };
10850
- var circleStyleSchema = z3.object({
10902
+ var circleStyleSchema = z4.object({
10851
10903
  ...rangeShape,
10852
10904
  blur: numberValueSchema.optional(),
10853
10905
  color: colorValueSchema.optional(),
10854
10906
  opacity: numberValueSchema.optional(),
10855
- pitchAlignment: z3.enum(["map", "viewport"]).optional(),
10856
- pitchScale: z3.enum(["map", "viewport"]).optional(),
10907
+ pitchAlignment: z4.enum(["map", "viewport"]).optional(),
10908
+ pitchScale: z4.enum(["map", "viewport"]).optional(),
10857
10909
  priority: structuralNumberValueSchema.optional(),
10858
- priorityOrder: z3.enum(["higher-first", "lower-first"]).optional(),
10910
+ priorityOrder: z4.enum(["higher-first", "lower-first"]).optional(),
10859
10911
  radius: numberValueSchema.optional(),
10860
10912
  strokeColor: colorValueSchema.optional(),
10861
10913
  strokeOpacity: numberValueSchema.optional(),
10862
10914
  strokeWidth: numberValueSchema.optional(),
10863
10915
  translate: numberOffsetValueSchema.optional(),
10864
- translateAnchor: z3.enum(["map", "viewport"]).optional()
10916
+ translateAnchor: z4.enum(["map", "viewport"]).optional()
10865
10917
  }).strict();
10866
- var extrusionStyleSchema = z3.object({
10918
+ var extrusionStyleSchema = z4.object({
10867
10919
  ...rangeShape,
10868
10920
  base: numberValueSchema.optional(),
10869
10921
  color: colorValueSchema.optional(),
10870
10922
  height: numberValueSchema.optional(),
10871
10923
  opacity: numberValueSchema.optional(),
10872
10924
  pattern: imageValueSchema.optional(),
10873
- verticalGradient: z3.boolean().optional()
10925
+ verticalGradient: z4.boolean().optional()
10874
10926
  }).strict();
10875
- var areaStyleSchema = z3.object({ fill: fillStyleSchema.optional(), outline: lineStyleSchema.optional() }).strict();
10876
- var lineStackStyleSchema = z3.object({
10927
+ var areaStyleSchema = z4.object({ fill: fillStyleSchema.optional(), outline: lineStyleSchema.optional() }).strict();
10928
+ var lineStackStyleSchema = z4.object({
10877
10929
  casing: lineStyleSchema.optional(),
10878
10930
  fill: lineStyleSchema.optional(),
10879
10931
  shadow: lineStyleSchema.optional()
10880
10932
  }).strict();
10881
- var lineHatchStyleSchema = z3.object({
10933
+ var lineHatchStyleSchema = z4.object({
10882
10934
  ...rangeShape,
10883
10935
  angle: numberValueSchema.optional(),
10884
10936
  color: colorValueSchema.optional(),
@@ -10927,62 +10979,62 @@ var lineHatchStyleSchema = z3.object({
10927
10979
  }
10928
10980
  });
10929
10981
  var roadLayerStyleSchema = lineStackStyleSchema.extend({ hatch: lineHatchStyleSchema.optional() }).strict();
10930
- var symbolStyleSchema = z3.object({
10982
+ var symbolStyleSchema = z4.object({
10931
10983
  ...symbolPlacementShape,
10932
10984
  icon: iconStyleSchema.optional(),
10933
10985
  text: textStyleSchema.optional()
10934
10986
  }).strict();
10935
10987
  var markerSymbolStyleSchema = symbolStyleSchema.extend({ marker: circleStyleSchema.optional() }).strict();
10936
10988
  var poiCategoryStyleSchema = markerSymbolStyleSchema.omit({ priority: true, priorityOrder: true }).extend({
10937
- density: z3.union([z3.literal(1), z3.literal(2), z3.literal(3), z3.literal(4), z3.literal(5)]).optional()
10989
+ density: z4.union([z4.literal(1), z4.literal(2), z4.literal(3), z4.literal(4), z4.literal(5)]).optional()
10938
10990
  }).strict();
10939
- var renderScalarSchema = z3.union([z3.boolean(), z3.number().finite(), z3.string()]);
10940
- var renderTargetSchema = z3.string().regex(tileflowSemanticTargetPattern, "Expected a semantic target");
10941
- var renderStackOperationNameSchema = z3.string().regex(
10991
+ var renderScalarSchema = z4.union([z4.boolean(), z4.number().finite(), z4.string()]);
10992
+ var renderTargetSchema = z4.string().regex(tileflowSemanticTargetPattern, "Expected a semantic target");
10993
+ var renderStackOperationNameSchema = z4.string().regex(
10942
10994
  tileflowRenderStackOperationNamePattern,
10943
10995
  "Expected a lowercase-initial portable render-stack operation name without dots"
10944
10996
  );
10945
10997
  var renderFieldNormalizationShape = {
10946
- coerce: z3.literal("number").optional(),
10998
+ coerce: z4.literal("number").optional(),
10947
10999
  fallback: renderScalarSchema.optional(),
10948
- field: z3.enum(tileflowSemanticFieldNames)
11000
+ field: z4.enum(tileflowSemanticFieldNames)
10949
11001
  };
10950
- var renderSelectorNodeSchema = z3.lazy(
10951
- () => z3.discriminatedUnion("kind", [
10952
- z3.object({ kind: z3.literal("literal"), value: z3.boolean() }).strict(),
10953
- z3.object({ kind: z3.literal("geometry"), geometry: z3.enum(tileflowRenderSelectorGeometries) }).strict(),
10954
- z3.object({ kind: z3.literal("has"), field: z3.enum(tileflowSemanticFieldNames) }).strict(),
10955
- z3.object({
11002
+ var renderSelectorNodeSchema = z4.lazy(
11003
+ () => z4.discriminatedUnion("kind", [
11004
+ z4.object({ kind: z4.literal("literal"), value: z4.boolean() }).strict(),
11005
+ z4.object({ kind: z4.literal("geometry"), geometry: z4.enum(tileflowRenderSelectorGeometries) }).strict(),
11006
+ z4.object({ kind: z4.literal("has"), field: z4.enum(tileflowSemanticFieldNames) }).strict(),
11007
+ z4.object({
10956
11008
  ...renderFieldNormalizationShape,
10957
- kind: z3.literal("compare"),
10958
- operator: z3.enum(tileflowRenderSelectorComparisons),
11009
+ kind: z4.literal("compare"),
11010
+ operator: z4.enum(tileflowRenderSelectorComparisons),
10959
11011
  value: renderScalarSchema
10960
11012
  }).strict(),
10961
- z3.object({
11013
+ z4.object({
10962
11014
  ...renderFieldNormalizationShape,
10963
- kind: z3.literal("in"),
10964
- values: z3.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
11015
+ kind: z4.literal("in"),
11016
+ values: z4.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
10965
11017
  }).strict(),
10966
- z3.object({
11018
+ z4.object({
10967
11019
  ...renderFieldNormalizationShape,
10968
- branches: z3.array(
10969
- z3.object({
10970
- result: z3.boolean(),
10971
- values: z3.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
11020
+ branches: z4.array(
11021
+ z4.object({
11022
+ result: z4.boolean(),
11023
+ values: z4.array(renderScalarSchema).min(1).max(tileflowRenderStackLimits.maxScalarValues)
10972
11024
  }).strict()
10973
11025
  ).min(1).max(tileflowRenderStackLimits.maxMatchBranches),
10974
- kind: z3.literal("match"),
10975
- otherwise: z3.boolean()
11026
+ kind: z4.literal("match"),
11027
+ otherwise: z4.boolean()
10976
11028
  }).strict(),
10977
- z3.object({ kind: z3.literal("not"), selector: renderSelectorNodeSchema }).strict(),
10978
- z3.object({
10979
- kind: z3.enum(["all", "any"]),
10980
- selectors: z3.array(renderSelectorNodeSchema).min(1).max(tileflowRenderStackLimits.maxSelectorChildren)
11029
+ z4.object({ kind: z4.literal("not"), selector: renderSelectorNodeSchema }).strict(),
11030
+ z4.object({
11031
+ kind: z4.enum(["all", "any"]),
11032
+ selectors: z4.array(renderSelectorNodeSchema).min(1).max(tileflowRenderStackLimits.maxSelectorChildren)
10981
11033
  }).strict(),
10982
- z3.object({
11034
+ z4.object({
10983
11035
  fallback: renderSelectorNodeSchema,
10984
- kind: z3.literal("step"),
10985
- stops: z3.array(z3.object({ selector: renderSelectorNodeSchema, zoom: zoomNumberSchema }).strict()).min(1).max(tileflowRenderStackLimits.maxStepStops)
11036
+ kind: z4.literal("step"),
11037
+ stops: z4.array(z4.object({ selector: renderSelectorNodeSchema, zoom: zoomNumberSchema }).strict()).min(1).max(tileflowRenderStackLimits.maxStepStops)
10986
11038
  }).strict()
10987
11039
  ])
10988
11040
  );
@@ -10993,7 +11045,7 @@ var renderSelectorSchema = renderSelectorNodeSchema.superRefine(
10993
11045
  }
10994
11046
  }
10995
11047
  );
10996
- var renderVisibilitySchema = z3.object({ visibilityGroup: z3.literal("building").optional() });
11048
+ var renderVisibilitySchema = z4.object({ visibilityGroup: z4.literal("building").optional() });
10997
11049
  var renderStyleSchemas = {
10998
11050
  background: backgroundStyleSchema.extend(renderVisibilitySchema.shape).strict(),
10999
11051
  circle: circleStyleSchema.extend(renderVisibilitySchema.shape).strict(),
@@ -11002,7 +11054,7 @@ var renderStyleSchemas = {
11002
11054
  line: lineStyleSchema.extend(renderVisibilitySchema.shape).strict(),
11003
11055
  symbol: symbolStyleSchema.extend(renderVisibilitySchema.shape).strict()
11004
11056
  };
11005
- var renderRequirementsSchema = z3.array(z3.enum(tileflowLayerDomains)).min(1).max(tileflowRenderStackLimits.maxRequirements).superRefine((requirements, context) => {
11057
+ var renderRequirementsSchema = z4.array(z4.enum(tileflowLayerDomains)).min(1).max(tileflowRenderStackLimits.maxRequirements).superRefine((requirements, context) => {
11006
11058
  const seen = /* @__PURE__ */ new Set();
11007
11059
  for (const [index, requirement] of requirements.entries()) {
11008
11060
  if (seen.has(requirement)) {
@@ -11016,40 +11068,40 @@ var renderRequirementsSchema = z3.array(z3.enum(tileflowLayerDomains)).min(1).ma
11016
11068
  }
11017
11069
  });
11018
11070
  var vectorRenderPassSchemas = tileflowRenderStackRenderers.filter((renderer) => renderer !== "background").map(
11019
- (renderer) => z3.object({
11071
+ (renderer) => z4.object({
11020
11072
  attachTo: renderTargetSchema,
11021
- feature: z3.enum(tileflowSemanticLayerNames).optional(),
11022
- kind: z3.literal("render-pass"),
11023
- phase: z3.enum(tileflowRenderStackPhases),
11024
- renderer: z3.literal(renderer),
11073
+ feature: z4.enum(tileflowSemanticLayerNames).optional(),
11074
+ kind: z4.literal("render-pass"),
11075
+ phase: z4.enum(tileflowRenderStackPhases),
11076
+ renderer: z4.literal(renderer),
11025
11077
  requirements: renderRequirementsSchema.optional(),
11026
11078
  selector: renderSelectorSchema.optional(),
11027
11079
  style: renderStyleSchemas[renderer]
11028
11080
  }).strict()
11029
11081
  );
11030
- var renderPassSchema = z3.discriminatedUnion("renderer", [
11031
- z3.object({
11082
+ var renderPassSchema = z4.discriminatedUnion("renderer", [
11083
+ z4.object({
11032
11084
  attachTo: renderTargetSchema,
11033
- kind: z3.literal("render-pass"),
11034
- phase: z3.enum(tileflowRenderStackPhases),
11035
- renderer: z3.literal("background"),
11085
+ kind: z4.literal("render-pass"),
11086
+ phase: z4.enum(tileflowRenderStackPhases),
11087
+ renderer: z4.literal("background"),
11036
11088
  requirements: renderRequirementsSchema.optional(),
11037
11089
  style: renderStyleSchemas.background
11038
11090
  }).strict(),
11039
11091
  ...vectorRenderPassSchemas
11040
11092
  ]);
11041
11093
  var renderRefinementSchemas = tileflowRenderStackRenderers.map(
11042
- (renderer) => z3.object({
11043
- kind: z3.literal("refine-render-target"),
11094
+ (renderer) => z4.object({
11095
+ kind: z4.literal("refine-render-target"),
11044
11096
  requirements: renderRequirementsSchema.optional(),
11045
- renderer: z3.literal(renderer),
11097
+ renderer: z4.literal(renderer),
11046
11098
  ...renderer === "background" ? {} : { selector: renderSelectorSchema.optional() },
11047
11099
  style: renderStyleSchemas[renderer],
11048
11100
  target: renderTargetSchema
11049
11101
  }).strict()
11050
11102
  );
11051
- var renderStackOperationSchema = z3.union([renderPassSchema, ...renderRefinementSchemas]);
11052
- var renderStackSchema = z3.record(renderStackOperationNameSchema, renderStackOperationSchema).superRefine((stack, context) => {
11103
+ var renderStackOperationSchema = z4.union([renderPassSchema, ...renderRefinementSchemas]);
11104
+ var renderStackSchema = z4.record(renderStackOperationNameSchema, renderStackOperationSchema).superRefine((stack, context) => {
11053
11105
  const size = Object.keys(stack).length;
11054
11106
  if (size === 0) {
11055
11107
  context.addIssue({
@@ -11064,19 +11116,19 @@ var renderStackSchema = z3.record(renderStackOperationNameSchema, renderStackOpe
11064
11116
  });
11065
11117
  }
11066
11118
  }).describe("tileflow-render-stack");
11067
- var roadClassSchema = z3.enum(tileflowRoadClasses);
11068
- var roadClassStyleSchema = z3.object({
11069
- enabled: z3.boolean().optional(),
11119
+ var roadClassSchema = z4.enum(tileflowRoadClasses);
11120
+ var roadClassStyleSchema = z4.object({
11121
+ enabled: z4.boolean().optional(),
11070
11122
  bridge: roadLayerStyleSchema.optional(),
11071
11123
  surface: roadLayerStyleSchema.optional(),
11072
11124
  tunnel: roadLayerStyleSchema.optional()
11073
11125
  }).strict();
11074
- var roadStructureMapSchema = z3.object({
11126
+ var roadStructureMapSchema = z4.object({
11075
11127
  bridge: roadLayerStyleSchema.optional(),
11076
11128
  surface: roadLayerStyleSchema.optional(),
11077
11129
  tunnel: roadLayerStyleSchema.optional()
11078
11130
  }).strict();
11079
- var roadTreatmentLayerStyleSchema = z3.object({
11131
+ var roadTreatmentLayerStyleSchema = z4.object({
11080
11132
  casing: lineStyleSchema.pick({
11081
11133
  blur: true,
11082
11134
  color: true,
@@ -11105,19 +11157,19 @@ var roadTreatmentLayerStyleSchema = z3.object({
11105
11157
  width: true
11106
11158
  }).optional()
11107
11159
  }).strict();
11108
- var roadTreatmentStyleSchema = z3.object({
11160
+ var roadTreatmentStyleSchema = z4.object({
11109
11161
  bridge: roadTreatmentLayerStyleSchema.optional(),
11110
- enabled: z3.boolean().optional(),
11162
+ enabled: z4.boolean().optional(),
11111
11163
  surface: roadTreatmentLayerStyleSchema.optional(),
11112
11164
  tunnel: roadTreatmentLayerStyleSchema.optional(),
11113
11165
  widthScale: themeNumberValueSchema.optional()
11114
11166
  }).strict();
11115
- var landModuleSchema = z3.object({
11116
- type: z3.literal("land"),
11167
+ var landModuleSchema = z4.object({
11168
+ type: z4.literal("land"),
11117
11169
  background: backgroundStyleSchema.optional(),
11118
- enabled: z3.boolean().optional(),
11170
+ enabled: z4.boolean().optional(),
11119
11171
  globalLandcover: fillStyleSchema.optional(),
11120
- landcover: z3.object({
11172
+ landcover: z4.object({
11121
11173
  farmland: areaStyleSchema.optional(),
11122
11174
  flowerbed: areaStyleSchema.optional(),
11123
11175
  grass: areaStyleSchema.optional(),
@@ -11133,7 +11185,7 @@ var landModuleSchema = z3.object({
11133
11185
  wetland: areaStyleSchema.optional(),
11134
11186
  wood: areaStyleSchema.optional()
11135
11187
  }).strict().optional(),
11136
- landuse: z3.object({
11188
+ landuse: z4.object({
11137
11189
  cemetery: areaStyleSchema.optional(),
11138
11190
  civic: areaStyleSchema.optional(),
11139
11191
  commercial: areaStyleSchema.optional(),
@@ -11149,99 +11201,99 @@ var landModuleSchema = z3.object({
11149
11201
  }).strict().optional(),
11150
11202
  renderStack: renderStackSchema.optional()
11151
11203
  }).strict();
11152
- var waterModuleSchema = z3.object({
11153
- type: z3.literal("water"),
11204
+ var waterModuleSchema = z4.object({
11205
+ type: z4.literal("water"),
11154
11206
  bathymetry: fillStyleSchema.optional(),
11155
11207
  bathymetryContours: lineStyleSchema.optional(),
11156
11208
  bathymetryLabels: symbolStyleSchema.optional(),
11157
11209
  bodies: areaStyleSchema.optional(),
11158
- enabled: z3.boolean().optional(),
11159
- intermittent: z3.object({ bodies: areaStyleSchema.optional(), waterways: lineStyleSchema.optional() }).strict().optional(),
11210
+ enabled: z4.boolean().optional(),
11211
+ intermittent: z4.object({ bodies: areaStyleSchema.optional(), waterways: lineStyleSchema.optional() }).strict().optional(),
11160
11212
  renderStack: renderStackSchema.optional(),
11161
- waterways: z3.object({
11213
+ waterways: z4.object({
11162
11214
  canal: lineStyleSchema.optional(),
11163
11215
  other: lineStyleSchema.optional(),
11164
11216
  river: lineStyleSchema.optional(),
11165
11217
  stream: lineStyleSchema.optional()
11166
11218
  }).strict().optional()
11167
11219
  }).strict();
11168
- var buildingsModuleSchema = z3.object({
11169
- type: z3.literal("buildings"),
11220
+ var buildingsModuleSchema = z4.object({
11221
+ type: z4.literal("buildings"),
11170
11222
  businessCorridor: areaStyleSchema.optional(),
11171
- enabled: z3.boolean().optional(),
11223
+ enabled: z4.boolean().optional(),
11172
11224
  extrusion: extrusionStyleSchema.optional(),
11173
11225
  flat: areaStyleSchema.optional(),
11174
- mode: z3.enum(["3d", "flat"]).optional(),
11226
+ mode: z4.enum(["3d", "flat"]).optional(),
11175
11227
  renderStack: renderStackSchema.optional()
11176
11228
  }).strict();
11177
- var addressesModuleSchema = z3.object({
11178
- type: z3.literal("addresses"),
11179
- enabled: z3.boolean().optional(),
11229
+ var addressesModuleSchema = z4.object({
11230
+ type: z4.literal("addresses"),
11231
+ enabled: z4.boolean().optional(),
11180
11232
  labels: symbolStyleSchema.optional(),
11181
11233
  renderStack: renderStackSchema.optional()
11182
11234
  }).strict();
11183
- var landformClassSchema = z3.enum(tileflowLandformClasses);
11184
- var landformsModuleSchema = z3.object({
11185
- type: z3.literal("landforms"),
11186
- classes: z3.partialRecord(landformClassSchema, symbolStyleSchema).optional(),
11187
- elevation: z3.boolean().optional(),
11188
- enabled: z3.boolean().optional(),
11235
+ var landformClassSchema = z4.enum(tileflowLandformClasses);
11236
+ var landformsModuleSchema = z4.object({
11237
+ type: z4.literal("landforms"),
11238
+ classes: z4.partialRecord(landformClassSchema, symbolStyleSchema).optional(),
11239
+ elevation: z4.boolean().optional(),
11240
+ enabled: z4.boolean().optional(),
11189
11241
  renderStack: renderStackSchema.optional()
11190
11242
  }).strict();
11191
- var boundariesModuleSchema = z3.object({
11192
- type: z3.literal("boundaries"),
11243
+ var boundariesModuleSchema = z4.object({
11244
+ type: z4.literal("boundaries"),
11193
11245
  admin2: lineStyleSchema.optional(),
11194
11246
  admin4: lineStyleSchema.optional(),
11195
11247
  disputed: lineStyleSchema.optional(),
11196
- enabled: z3.boolean().optional(),
11248
+ enabled: z4.boolean().optional(),
11197
11249
  maritime: lineStyleSchema.optional(),
11198
11250
  renderStack: renderStackSchema.optional()
11199
11251
  }).strict();
11200
- var aerowaysModuleSchema = z3.object({
11201
- type: z3.literal("aeroways"),
11252
+ var aerowaysModuleSchema = z4.object({
11253
+ type: z4.literal("aeroways"),
11202
11254
  area: areaStyleSchema.optional(),
11203
- enabled: z3.boolean().optional(),
11255
+ enabled: z4.boolean().optional(),
11204
11256
  runway: lineStackStyleSchema.optional(),
11205
11257
  runwayRef: symbolStyleSchema.optional(),
11206
11258
  renderStack: renderStackSchema.optional(),
11207
11259
  taxiway: lineStackStyleSchema.optional()
11208
11260
  }).strict();
11209
- var transitModuleSchema = z3.object({
11210
- type: z3.literal("transit"),
11261
+ var transitModuleSchema = z4.object({
11262
+ type: z4.literal("transit"),
11211
11263
  cableway: lineStyleSchema.optional(),
11212
- enabled: z3.boolean().optional(),
11264
+ enabled: z4.boolean().optional(),
11213
11265
  ferry: lineStyleSchema.optional(),
11214
- rail: z3.object({
11266
+ rail: z4.object({
11215
11267
  bridge: lineStyleSchema.optional(),
11216
11268
  surface: lineStyleSchema.optional(),
11217
11269
  tunnel: lineStyleSchema.optional()
11218
11270
  }).strict().optional(),
11219
- railHatching: z3.object({
11271
+ railHatching: z4.object({
11220
11272
  bridge: lineStyleSchema.optional(),
11221
11273
  surface: lineStyleSchema.optional(),
11222
11274
  tunnel: lineStyleSchema.optional()
11223
11275
  }).strict().optional(),
11224
- serviceRail: z3.object({
11276
+ serviceRail: z4.object({
11225
11277
  bridge: lineStyleSchema.optional(),
11226
11278
  surface: lineStyleSchema.optional(),
11227
11279
  tunnel: lineStyleSchema.optional()
11228
11280
  }).strict().optional(),
11229
11281
  renderStack: renderStackSchema.optional()
11230
11282
  }).strict();
11231
- var roadsModuleSchema = z3.object({
11232
- type: z3.literal("roads"),
11233
- areas: z3.object({
11283
+ var roadsModuleSchema = z4.object({
11284
+ type: z4.literal("roads"),
11285
+ areas: z4.object({
11234
11286
  pedestrian: areaStyleSchema.optional(),
11235
11287
  pier: areaStyleSchema.optional(),
11236
11288
  road: areaStyleSchema.optional()
11237
11289
  }).strict().optional(),
11238
- classes: z3.partialRecord(roadClassSchema, roadClassStyleSchema).optional(),
11290
+ classes: z4.partialRecord(roadClassSchema, roadClassStyleSchema).optional(),
11239
11291
  crossings: iconStyleSchema.extend({ image: imageValueSchema }).strict().optional(),
11240
- detail: z3.enum(["none", "highways", "major", "streets", "all"]).optional(),
11241
- enabled: z3.boolean().optional(),
11242
- extras: z3.object({ paths: z3.boolean().optional() }).strict().optional(),
11243
- hierarchy: z3.enum(["subtle", "clear", "strong"]).optional(),
11244
- modifiers: z3.object({
11292
+ detail: z4.enum(["none", "highways", "major", "streets", "all"]).optional(),
11293
+ enabled: z4.boolean().optional(),
11294
+ extras: z4.object({ paths: z4.boolean().optional() }).strict().optional(),
11295
+ hierarchy: z4.enum(["subtle", "clear", "strong"]).optional(),
11296
+ modifiers: z4.object({
11245
11297
  construction: roadTreatmentStyleSchema.optional(),
11246
11298
  expressway: roadTreatmentStyleSchema.optional(),
11247
11299
  indoor: roadTreatmentStyleSchema.optional(),
@@ -11249,7 +11301,7 @@ var roadsModuleSchema = z3.object({
11249
11301
  ramp: roadTreatmentStyleSchema.optional(),
11250
11302
  unpaved: roadTreatmentStyleSchema.optional()
11251
11303
  }).strict().optional(),
11252
- mountainBike: z3.object({
11304
+ mountainBike: z4.object({
11253
11305
  "0": roadTreatmentStyleSchema.optional(),
11254
11306
  "0+": roadTreatmentStyleSchema.optional(),
11255
11307
  "1": roadTreatmentStyleSchema.optional(),
@@ -11262,9 +11314,9 @@ var roadsModuleSchema = z3.object({
11262
11314
  "5": roadTreatmentStyleSchema.optional(),
11263
11315
  "6": roadTreatmentStyleSchema.optional()
11264
11316
  }).strict().optional(),
11265
- oneWayMarkers: z3.boolean().optional(),
11266
- outline: z3.enum(["none", "subtle", "strong"]).optional(),
11267
- restrictions: z3.object({
11317
+ oneWayMarkers: z4.boolean().optional(),
11318
+ outline: z4.enum(["none", "subtle", "strong"]).optional(),
11319
+ restrictions: z4.object({
11268
11320
  access: roadTreatmentStyleSchema.optional(),
11269
11321
  bicycle: roadTreatmentStyleSchema.optional(),
11270
11322
  foot: roadTreatmentStyleSchema.optional(),
@@ -11272,24 +11324,24 @@ var roadsModuleSchema = z3.object({
11272
11324
  toll: roadTreatmentStyleSchema.optional()
11273
11325
  }).strict().optional(),
11274
11326
  renderStack: renderStackSchema.optional(),
11275
- roundabouts: z3.object({ casing: circleStyleSchema.optional(), fill: circleStyleSchema.optional() }).strict().optional(),
11276
- serviceTypes: z3.object({
11327
+ roundabouts: z4.object({ casing: circleStyleSchema.optional(), fill: circleStyleSchema.optional() }).strict().optional(),
11328
+ serviceTypes: z4.object({
11277
11329
  alley: roadTreatmentStyleSchema.optional(),
11278
11330
  crossover: roadTreatmentStyleSchema.optional(),
11279
11331
  driveway: roadTreatmentStyleSchema.optional(),
11280
11332
  parkingAisle: roadTreatmentStyleSchema.optional(),
11281
11333
  yard: roadTreatmentStyleSchema.optional()
11282
11334
  }).strict().optional(),
11283
- sidewalks: z3.object({
11335
+ sidewalks: z4.object({
11284
11336
  outline: lineStyleSchema.optional(),
11285
11337
  pattern: fillStyleSchema.optional(),
11286
11338
  surface: fillStyleSchema.optional()
11287
11339
  }).strict().optional(),
11288
11340
  structures: roadStructureMapSchema.optional(),
11289
- weight: z3.enum(["thin", "regular", "bold"]).optional(),
11290
- widthScale: z3.partialRecord(roadClassSchema, themeNumberValueSchema).optional()
11341
+ weight: z4.enum(["thin", "regular", "bold"]).optional(),
11342
+ widthScale: z4.partialRecord(roadClassSchema, themeNumberValueSchema).optional()
11291
11343
  }).strict();
11292
- var placeLabelStylesSchema = z3.object({
11344
+ var placeLabelStylesSchema = z4.object({
11293
11345
  city: symbolStyleSchema.optional(),
11294
11346
  continent: symbolStyleSchema.optional(),
11295
11347
  country: symbolStyleSchema.optional(),
@@ -11299,65 +11351,65 @@ var placeLabelStylesSchema = z3.object({
11299
11351
  town: symbolStyleSchema.optional(),
11300
11352
  village: symbolStyleSchema.optional()
11301
11353
  }).strict();
11302
- var waterLabelStylesSchema = z3.object({
11354
+ var waterLabelStylesSchema = z4.object({
11303
11355
  line: symbolStyleSchema.optional(),
11304
11356
  ocean: symbolStyleSchema.optional(),
11305
11357
  other: symbolStyleSchema.optional(),
11306
11358
  waterway: symbolStyleSchema.optional()
11307
11359
  }).strict();
11308
- var labelsModuleSchema = z3.object({
11309
- type: z3.literal("labels"),
11310
- aerodromeCodes: z3.enum(["none", "iata", "all"]).optional(),
11311
- collisionPriority: z3.enum(["balanced", "navigation"]).optional(),
11312
- enabled: z3.boolean().optional(),
11313
- junctions: z3.boolean().optional(),
11314
- language: z3.string().trim().min(1).optional(),
11315
- places: z3.enum(["none", "major", "all"]).optional(),
11316
- roadClasses: z3.array(roadClassSchema).min(1).optional(),
11360
+ var labelsModuleSchema = z4.object({
11361
+ type: z4.literal("labels"),
11362
+ aerodromeCodes: z4.enum(["none", "iata", "all"]).optional(),
11363
+ collisionPriority: z4.enum(["balanced", "navigation"]).optional(),
11364
+ enabled: z4.boolean().optional(),
11365
+ junctions: z4.boolean().optional(),
11366
+ language: z4.string().trim().min(1).optional(),
11367
+ places: z4.enum(["none", "major", "all"]).optional(),
11368
+ roadClasses: z4.array(roadClassSchema).min(1).optional(),
11317
11369
  renderStack: renderStackSchema.optional(),
11318
- roads: z3.enum(["none", "highways", "major", "streets", "all"]).optional(),
11319
- styles: z3.object({
11370
+ roads: z4.enum(["none", "highways", "major", "streets", "all"]).optional(),
11371
+ styles: z4.object({
11320
11372
  aerodrome: symbolStyleSchema.optional(),
11321
11373
  junctions: symbolStyleSchema.optional(),
11322
11374
  places: placeLabelStylesSchema.optional(),
11323
- roads: z3.partialRecord(roadClassSchema, symbolStyleSchema).optional(),
11324
- shields: z3.object({
11375
+ roads: z4.partialRecord(roadClassSchema, symbolStyleSchema).optional(),
11376
+ shields: z4.object({
11325
11377
  default: symbolStyleSchema.optional(),
11326
11378
  detail: symbolStyleSchema.optional(),
11327
- kinds: z3.record(identifierSchema, z3.object({ image: themeImageValueSchema }).strict()).optional(),
11379
+ kinds: z4.record(identifierSchema, z4.object({ image: themeImageValueSchema }).strict()).optional(),
11328
11380
  overview: symbolStyleSchema.optional(),
11329
- textColors: z3.record(identifierSchema, z3.object({ color: themeColorValueSchema }).strict()).optional()
11381
+ textColors: z4.record(identifierSchema, z4.object({ color: themeColorValueSchema }).strict()).optional()
11330
11382
  }).strict().optional(),
11331
11383
  water: waterLabelStylesSchema.optional()
11332
11384
  }).strict().optional(),
11333
- shields: z3.enum(["none", "major", "all"]).optional(),
11334
- water: z3.enum(["none", "major", "all"]).optional()
11385
+ shields: z4.enum(["none", "major", "all"]).optional(),
11386
+ water: z4.enum(["none", "major", "all"]).optional()
11335
11387
  }).strict();
11336
- var poiModuleSchema = z3.object({
11337
- type: z3.literal("poi"),
11338
- categories: z3.array(z3.enum(tileflowPoiCategories)).optional(),
11339
- color: z3.enum(["uniform", "category"]).optional(),
11340
- density: z3.union([z3.literal(1), z3.literal(2), z3.literal(3), z3.literal(4), z3.literal(5)]).optional(),
11341
- enabled: z3.boolean().optional(),
11342
- icons: z3.boolean().optional(),
11343
- labels: z3.boolean().optional(),
11388
+ var poiModuleSchema = z4.object({
11389
+ type: z4.literal("poi"),
11390
+ categories: z4.array(z4.enum(tileflowPoiCategories)).optional(),
11391
+ color: z4.enum(["uniform", "category"]).optional(),
11392
+ density: z4.union([z4.literal(1), z4.literal(2), z4.literal(3), z4.literal(4), z4.literal(5)]).optional(),
11393
+ enabled: z4.boolean().optional(),
11394
+ icons: z4.boolean().optional(),
11395
+ labels: z4.boolean().optional(),
11344
11396
  minZoom: zoomNumberSchema.optional(),
11345
- placement: z3.object({
11346
- coupleIconAndLabel: z3.boolean().optional(),
11347
- iconPadding: z3.number().finite().min(0).optional(),
11348
- textPadding: z3.number().finite().min(0).optional()
11397
+ placement: z4.object({
11398
+ coupleIconAndLabel: z4.boolean().optional(),
11399
+ iconPadding: z4.number().finite().min(0).optional(),
11400
+ textPadding: z4.number().finite().min(0).optional()
11349
11401
  }).strict().optional(),
11350
11402
  renderStack: renderStackSchema.optional(),
11351
- styles: z3.partialRecord(z3.enum(tileflowPoiCategories), poiCategoryStyleSchema).optional()
11403
+ styles: z4.partialRecord(z4.enum(tileflowPoiCategories), poiCategoryStyleSchema).optional()
11352
11404
  }).strict();
11353
- var nauticalModuleSchema = z3.object({
11354
- type: z3.literal("nautical"),
11405
+ var nauticalModuleSchema = z4.object({
11406
+ type: z4.literal("nautical"),
11355
11407
  aids: markerSymbolStyleSchema.optional(),
11356
11408
  coverage: areaStyleSchema.optional(),
11357
- enabled: z3.boolean().optional(),
11409
+ enabled: z4.boolean().optional(),
11358
11410
  hazardAreas: areaStyleSchema.optional(),
11359
11411
  hazards: markerSymbolStyleSchema.optional(),
11360
- labels: z3.object({
11412
+ labels: z4.object({
11361
11413
  coverage: symbolStyleSchema.optional(),
11362
11414
  hazards: symbolStyleSchema.optional(),
11363
11415
  navigationAreas: symbolStyleSchema.optional(),
@@ -11373,7 +11425,7 @@ var nauticalModuleSchema = z3.object({
11373
11425
  wreckAreas: areaStyleSchema.optional(),
11374
11426
  wrecks: markerSymbolStyleSchema.optional()
11375
11427
  }).strict();
11376
- var modulesSchema = z3.object({
11428
+ var modulesSchema = z4.object({
11377
11429
  addresses: addressesModuleSchema.optional(),
11378
11430
  aeroways: aerowaysModuleSchema.optional(),
11379
11431
  boundaries: boundariesModuleSchema.optional(),
@@ -11385,152 +11437,152 @@ var modulesSchema = z3.object({
11385
11437
  poi: poiModuleSchema.optional(),
11386
11438
  roads: roadsModuleSchema.optional(),
11387
11439
  transit: transitModuleSchema.optional(),
11388
- vegetation: z3.object({
11389
- type: z3.literal("vegetation"),
11390
- enabled: z3.boolean().optional(),
11440
+ vegetation: z4.object({
11441
+ type: z4.literal("vegetation"),
11442
+ enabled: z4.boolean().optional(),
11391
11443
  flat: circleStyleSchema.optional(),
11392
11444
  minZoom: zoomNumberSchema.optional(),
11393
- mode: z3.enum(["3d", "flat"]).optional(),
11445
+ mode: z4.enum(["3d", "flat"]).optional(),
11394
11446
  renderStack: renderStackSchema.optional(),
11395
- threeDimensional: z3.object({
11447
+ threeDimensional: z4.object({
11396
11448
  barkColor: themeColorValueSchema.optional(),
11397
- broadleafColors: z3.array(themeColorValueSchema).min(1).max(8).optional(),
11398
- coniferColors: z3.array(themeColorValueSchema).min(1).max(8).optional(),
11399
- crownScale: z3.union([
11400
- z3.number().finite().positive().max(10),
11449
+ broadleafColors: z4.array(themeColorValueSchema).min(1).max(8).optional(),
11450
+ coniferColors: z4.array(themeColorValueSchema).min(1).max(8).optional(),
11451
+ crownScale: z4.union([
11452
+ z4.number().finite().positive().max(10),
11401
11453
  themeNumberReferenceSchema,
11402
- z3.object({
11403
- kind: z3.literal("theme-fixed"),
11404
- reason: z3.string().trim().min(1),
11405
- value: z3.number().finite().positive().max(10)
11454
+ z4.object({
11455
+ kind: z4.literal("theme-fixed"),
11456
+ reason: z4.string().trim().min(1),
11457
+ value: z4.number().finite().positive().max(10)
11406
11458
  }).strict()
11407
11459
  ]).optional(),
11408
- heightScale: z3.union([
11409
- z3.number().finite().positive().max(10),
11460
+ heightScale: z4.union([
11461
+ z4.number().finite().positive().max(10),
11410
11462
  themeNumberReferenceSchema,
11411
- z3.object({
11412
- kind: z3.literal("theme-fixed"),
11413
- reason: z3.string().trim().min(1),
11414
- value: z3.number().finite().positive().max(10)
11463
+ z4.object({
11464
+ kind: z4.literal("theme-fixed"),
11465
+ reason: z4.string().trim().min(1),
11466
+ value: z4.number().finite().positive().max(10)
11415
11467
  }).strict()
11416
11468
  ]).optional()
11417
11469
  }).strict().optional()
11418
11470
  }).strict().optional(),
11419
11471
  water: waterModuleSchema.optional()
11420
11472
  }).strict();
11421
- var layerBindingsSchema = z3.object({
11422
- aerodromeLabel: z3.string().trim().min(1),
11423
- aeroway: z3.string().trim().min(1),
11424
- boundary: z3.string().trim().min(1),
11425
- building: z3.string().trim().min(1),
11426
- bathymetry: z3.string().trim().min(1).optional(),
11427
- businessCorridor: z3.string().trim().min(1).optional(),
11428
- circularFeature: z3.string().trim().min(1).optional(),
11429
- globalLandcover: z3.string().trim().min(1).optional(),
11430
- houseNumber: z3.string().trim().min(1),
11431
- landcover: z3.string().trim().min(1),
11432
- landuse: z3.string().trim().min(1),
11433
- mountainPeak: z3.string().trim().min(1),
11434
- park: z3.string().trim().min(1),
11435
- place: z3.string().trim().min(1),
11436
- poi: z3.string().trim().min(1),
11437
- road: z3.string().trim().min(1),
11438
- roadName: z3.string().trim().min(1),
11439
- roadShield: z3.string().trim().min(1).optional(),
11440
- sidewalk: z3.string().trim().min(1).optional(),
11441
- streetFurniture: z3.string().trim().min(1).optional(),
11442
- tree: z3.string().trim().min(1).optional(),
11443
- water: z3.string().trim().min(1),
11444
- waterName: z3.string().trim().min(1),
11445
- waterway: z3.string().trim().min(1)
11473
+ var layerBindingsSchema = z4.object({
11474
+ aerodromeLabel: z4.string().trim().min(1),
11475
+ aeroway: z4.string().trim().min(1),
11476
+ boundary: z4.string().trim().min(1),
11477
+ building: z4.string().trim().min(1),
11478
+ bathymetry: z4.string().trim().min(1).optional(),
11479
+ businessCorridor: z4.string().trim().min(1).optional(),
11480
+ circularFeature: z4.string().trim().min(1).optional(),
11481
+ globalLandcover: z4.string().trim().min(1).optional(),
11482
+ houseNumber: z4.string().trim().min(1),
11483
+ landcover: z4.string().trim().min(1),
11484
+ landuse: z4.string().trim().min(1),
11485
+ mountainPeak: z4.string().trim().min(1),
11486
+ park: z4.string().trim().min(1),
11487
+ place: z4.string().trim().min(1),
11488
+ poi: z4.string().trim().min(1),
11489
+ road: z4.string().trim().min(1),
11490
+ roadName: z4.string().trim().min(1),
11491
+ roadShield: z4.string().trim().min(1).optional(),
11492
+ sidewalk: z4.string().trim().min(1).optional(),
11493
+ streetFurniture: z4.string().trim().min(1).optional(),
11494
+ tree: z4.string().trim().min(1).optional(),
11495
+ water: z4.string().trim().min(1),
11496
+ waterName: z4.string().trim().min(1),
11497
+ waterway: z4.string().trim().min(1)
11446
11498
  }).strict();
11447
- var fieldBindingsSchema = z3.object({
11448
- access: z3.string().trim().min(1),
11449
- activityScore: z3.string().trim().min(1),
11450
- adminLevel: z3.string().trim().min(1),
11451
- bicycle: z3.string().trim().min(1),
11452
- bathymetryMinDepth: z3.string().trim().min(1).optional(),
11453
- bathymetrySortKey: z3.string().trim().min(1).optional(),
11454
- brunnel: z3.string().trim().min(1),
11455
- buildingKind: z3.string().trim().min(1),
11456
- buildingTone: z3.string().trim().min(1),
11457
- capital: z3.string().trim().min(1),
11458
- circularClearanceExtraAtZoom15: z3.string().trim().min(1).optional(),
11459
- circularKind: z3.string().trim().min(1).optional(),
11460
- circularRadiusAtZoom15: z3.string().trim().min(1).optional(),
11461
- circularRadiusMeters: z3.string().trim().min(1).optional(),
11462
- circularInnerRadiusMeters: z3.string().trim().min(1).optional(),
11463
- circularOuterRadiusMeters: z3.string().trim().min(1).optional(),
11464
- class: z3.string().trim().min(1),
11465
- crossing: z3.string().trim().min(1),
11466
- classificationConfidence: z3.string().trim().min(1),
11467
- confidence: z3.string().trim().min(1),
11468
- circumference: z3.string().trim().min(1),
11469
- diameterCrown: z3.string().trim().min(1),
11470
- disputed: z3.string().trim().min(1),
11471
- direction: z3.string().trim().min(1).optional(),
11472
- elevation: z3.string().trim().min(1),
11473
- elevationFeet: z3.string().trim().min(1),
11474
- expressway: z3.string().trim().min(1),
11475
- foot: z3.string().trim().min(1),
11476
- height: z3.string().trim().min(1),
11477
- hasBusiness: z3.string().trim().min(1),
11478
- hasParts: z3.string().trim().min(1).optional(),
11479
- hide3d: z3.string().trim().min(1),
11480
- horse: z3.string().trim().min(1),
11481
- houseNumber: z3.string().trim().min(1),
11482
- importanceTier: z3.string().trim().min(1).optional(),
11483
- iata: z3.string().trim().min(1),
11484
- icao: z3.string().trim().min(1),
11485
- indoor: z3.string().trim().min(1),
11486
- intermittent: z3.string().trim().min(1),
11487
- genus: z3.string().trim().min(1),
11488
- layer: z3.string().trim().min(1),
11489
- leafCycle: z3.string().trim().min(1),
11490
- leafType: z3.string().trim().min(1),
11491
- level: z3.string().trim().min(1),
11492
- maritime: z3.string().trim().min(1),
11493
- markings: z3.string().trim().min(1),
11494
- minHeight: z3.string().trim().min(1),
11495
- minZoom: z3.string().trim().min(1),
11496
- mtbScale: z3.string().trim().min(1),
11497
- name: z3.string().trim().min(1),
11498
- nameEnglish: z3.string().trim().min(1),
11499
- nameLatin: z3.string().trim().min(1),
11500
- network: z3.string().trim().min(1),
11501
- official: z3.string().trim().min(1),
11502
- oneway: z3.string().trim().min(1),
11503
- poiCategory: z3.string().trim().min(1),
11504
- poiFilterRank: z3.string().trim().min(1),
11505
- poiIcon: z3.string().trim().min(1),
11506
- poiSizeRank: z3.string().trim().min(1),
11507
- poiType: z3.string().trim().min(1),
11508
- ramp: z3.string().trim().min(1),
11509
- rank: z3.string().trim().min(1),
11510
- ref: z3.string().trim().min(1),
11511
- refLength: z3.string().trim().min(1),
11512
- renderHeight: z3.string().trim().min(1),
11513
- renderMinZoom: z3.string().trim().min(1),
11514
- renderMinHeight: z3.string().trim().min(1),
11515
- shieldKind: z3.string().trim().min(1).optional(),
11516
- shieldLineLengthMeters: z3.string().trim().min(1).optional(),
11517
- shieldNetwork: z3.string().trim().min(1).optional(),
11518
- shieldRank: z3.string().trim().min(1).optional(),
11519
- shieldText: z3.string().trim().min(1).optional(),
11520
- shieldTextColor: z3.string().trim().min(1).optional(),
11521
- service: z3.string().trim().min(1),
11522
- species: z3.string().trim().min(1),
11523
- speciesWikidata: z3.string().trim().min(1),
11524
- subclass: z3.string().trim().min(1),
11525
- surface: z3.string().trim().min(1),
11526
- toll: z3.string().trim().min(1)
11499
+ var fieldBindingsSchema = z4.object({
11500
+ access: z4.string().trim().min(1),
11501
+ activityScore: z4.string().trim().min(1),
11502
+ adminLevel: z4.string().trim().min(1),
11503
+ bicycle: z4.string().trim().min(1),
11504
+ bathymetryMinDepth: z4.string().trim().min(1).optional(),
11505
+ bathymetrySortKey: z4.string().trim().min(1).optional(),
11506
+ brunnel: z4.string().trim().min(1),
11507
+ buildingKind: z4.string().trim().min(1),
11508
+ buildingTone: z4.string().trim().min(1),
11509
+ capital: z4.string().trim().min(1),
11510
+ circularClearanceExtraAtZoom15: z4.string().trim().min(1).optional(),
11511
+ circularKind: z4.string().trim().min(1).optional(),
11512
+ circularRadiusAtZoom15: z4.string().trim().min(1).optional(),
11513
+ circularRadiusMeters: z4.string().trim().min(1).optional(),
11514
+ circularInnerRadiusMeters: z4.string().trim().min(1).optional(),
11515
+ circularOuterRadiusMeters: z4.string().trim().min(1).optional(),
11516
+ class: z4.string().trim().min(1),
11517
+ crossing: z4.string().trim().min(1),
11518
+ classificationConfidence: z4.string().trim().min(1),
11519
+ confidence: z4.string().trim().min(1),
11520
+ circumference: z4.string().trim().min(1),
11521
+ diameterCrown: z4.string().trim().min(1),
11522
+ disputed: z4.string().trim().min(1),
11523
+ direction: z4.string().trim().min(1).optional(),
11524
+ elevation: z4.string().trim().min(1),
11525
+ elevationFeet: z4.string().trim().min(1),
11526
+ expressway: z4.string().trim().min(1),
11527
+ foot: z4.string().trim().min(1),
11528
+ height: z4.string().trim().min(1),
11529
+ hasBusiness: z4.string().trim().min(1),
11530
+ hasParts: z4.string().trim().min(1).optional(),
11531
+ hide3d: z4.string().trim().min(1),
11532
+ horse: z4.string().trim().min(1),
11533
+ houseNumber: z4.string().trim().min(1),
11534
+ importanceTier: z4.string().trim().min(1).optional(),
11535
+ iata: z4.string().trim().min(1),
11536
+ icao: z4.string().trim().min(1),
11537
+ indoor: z4.string().trim().min(1),
11538
+ intermittent: z4.string().trim().min(1),
11539
+ genus: z4.string().trim().min(1),
11540
+ layer: z4.string().trim().min(1),
11541
+ leafCycle: z4.string().trim().min(1),
11542
+ leafType: z4.string().trim().min(1),
11543
+ level: z4.string().trim().min(1),
11544
+ maritime: z4.string().trim().min(1),
11545
+ markings: z4.string().trim().min(1),
11546
+ minHeight: z4.string().trim().min(1),
11547
+ minZoom: z4.string().trim().min(1),
11548
+ mtbScale: z4.string().trim().min(1),
11549
+ name: z4.string().trim().min(1),
11550
+ nameEnglish: z4.string().trim().min(1),
11551
+ nameLatin: z4.string().trim().min(1),
11552
+ network: z4.string().trim().min(1),
11553
+ official: z4.string().trim().min(1),
11554
+ oneway: z4.string().trim().min(1),
11555
+ poiCategory: z4.string().trim().min(1),
11556
+ poiFilterRank: z4.string().trim().min(1),
11557
+ poiIcon: z4.string().trim().min(1),
11558
+ poiSizeRank: z4.string().trim().min(1),
11559
+ poiType: z4.string().trim().min(1),
11560
+ ramp: z4.string().trim().min(1),
11561
+ rank: z4.string().trim().min(1),
11562
+ ref: z4.string().trim().min(1),
11563
+ refLength: z4.string().trim().min(1),
11564
+ renderHeight: z4.string().trim().min(1),
11565
+ renderMinZoom: z4.string().trim().min(1),
11566
+ renderMinHeight: z4.string().trim().min(1),
11567
+ shieldKind: z4.string().trim().min(1).optional(),
11568
+ shieldLineLengthMeters: z4.string().trim().min(1).optional(),
11569
+ shieldNetwork: z4.string().trim().min(1).optional(),
11570
+ shieldRank: z4.string().trim().min(1).optional(),
11571
+ shieldText: z4.string().trim().min(1).optional(),
11572
+ shieldTextColor: z4.string().trim().min(1).optional(),
11573
+ service: z4.string().trim().min(1),
11574
+ species: z4.string().trim().min(1),
11575
+ speciesWikidata: z4.string().trim().min(1),
11576
+ subclass: z4.string().trim().min(1),
11577
+ surface: z4.string().trim().min(1),
11578
+ toll: z4.string().trim().min(1)
11527
11579
  }).strict();
11528
- var openMapTilesSchema = z3.object({
11529
- type: z3.literal("openmaptiles"),
11530
- contractVersion: z3.literal(openMapTilesContractVersion),
11580
+ var openMapTilesSchema = z4.object({
11581
+ type: z4.literal("openmaptiles"),
11582
+ contractVersion: z4.literal(openMapTilesContractVersion),
11531
11583
  fields: fieldBindingsSchema.partial().optional(),
11532
11584
  layers: layerBindingsSchema.partial().optional(),
11533
- semantics: z3.object({ parkLayer: z3.enum(["mixed", "protected-only"]).optional() }).strict().optional()
11585
+ semantics: z4.object({ parkLayer: z4.enum(["mixed", "protected-only"]).optional() }).strict().optional()
11534
11586
  }).strict().transform(
11535
11587
  (schema) => openMapTiles({
11536
11588
  capabilities: schema.layers === void 0 ? void 0 : {
@@ -11545,12 +11597,12 @@ var openMapTilesSchema = z3.object({
11545
11597
  })
11546
11598
  );
11547
11599
  var vectorDataShape = {
11548
- type: z3.literal("vector-tiles"),
11549
- attribution: z3.string().trim().min(1),
11600
+ type: z4.literal("vector-tiles"),
11601
+ attribution: z4.string().trim().min(1),
11550
11602
  revision: revisionSchema.optional(),
11551
11603
  schema: openMapTilesSchema
11552
11604
  };
11553
- var publicVectorUrlSchema = z3.string().min(1).max(4096).superRefine((value, context) => {
11605
+ var publicVectorUrlSchema = z4.string().min(1).max(4096).superRefine((value, context) => {
11554
11606
  try {
11555
11607
  validatePublicVectorUrl(value);
11556
11608
  } catch (error) {
@@ -11560,8 +11612,8 @@ var publicVectorUrlSchema = z3.string().min(1).max(4096).superRefine((value, con
11560
11612
  });
11561
11613
  }
11562
11614
  }).describe("tileflow-public-vector-url");
11563
- var marineSourceSchema = z3.object({
11564
- attribution: z3.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
11615
+ var marineSourceSchema = z4.object({
11616
+ attribution: z4.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
11565
11617
  sourceId: identifierSchema.optional(),
11566
11618
  url: publicVectorUrlSchema.optional()
11567
11619
  }).strict();
@@ -11569,24 +11621,24 @@ var bathymetryDemUrlSchema = publicVectorUrlSchema.refine(
11569
11621
  (value) => !value.startsWith("pmtiles://"),
11570
11622
  "Expected an HTTPS, loopback HTTP, or root-relative DEM TileJSON URL"
11571
11623
  ).describe("tileflow-public-dem-url");
11572
- var bathymetryReliefSchema = z3.object({
11624
+ var bathymetryReliefSchema = z4.object({
11573
11625
  accentColor: terrainColorValueSchema.optional(),
11574
- attribution: z3.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
11575
- encoding: z3.enum(["mapbox", "terrarium"]).optional(),
11576
- exaggeration: terrainNumberValueSchema(z3.number().finite().min(0).max(1)).optional(),
11626
+ attribution: z4.string().min(1).max(2048).refine((value) => value === value.trim()).optional(),
11627
+ encoding: z4.enum(["mapbox", "terrarium"]).optional(),
11628
+ exaggeration: terrainNumberValueSchema(z4.number().finite().min(0).max(1)).optional(),
11577
11629
  highlightColor: terrainColorValueSchema.optional(),
11578
- illuminationAltitude: terrainNumberValueSchema(z3.number().finite().min(0).max(90)).optional(),
11579
- illuminationAnchor: z3.enum(["map", "viewport"]).optional(),
11580
- illuminationDirection: terrainNumberValueSchema(z3.number().finite().min(0).max(359)).optional(),
11630
+ illuminationAltitude: terrainNumberValueSchema(z4.number().finite().min(0).max(90)).optional(),
11631
+ illuminationAnchor: z4.enum(["map", "viewport"]).optional(),
11632
+ illuminationDirection: terrainNumberValueSchema(z4.number().finite().min(0).max(359)).optional(),
11581
11633
  maxZoom: zoomNumberSchema.optional(),
11582
11634
  minZoom: zoomNumberSchema.optional(),
11583
- multidirectional: z3.boolean().optional(),
11584
- opacity: terrainNumberValueSchema(z3.number().finite().min(0).max(1)).optional(),
11635
+ multidirectional: z4.boolean().optional(),
11636
+ opacity: terrainNumberValueSchema(z4.number().finite().min(0).max(1)).optional(),
11585
11637
  shadowColor: terrainColorValueSchema.optional(),
11586
11638
  sourceId: identifierSchema.optional(),
11587
- tileSize: z3.union([z3.literal(256), z3.literal(512)]).optional(),
11639
+ tileSize: z4.union([z4.literal(256), z4.literal(512)]).optional(),
11588
11640
  url: bathymetryDemUrlSchema.optional(),
11589
- visible: z3.boolean().optional()
11641
+ visible: z4.boolean().optional()
11590
11642
  }).strict().superRefine((relief, context) => {
11591
11643
  if (relief.minZoom !== void 0 && relief.maxZoom !== void 0 && relief.minZoom > relief.maxZoom) {
11592
11644
  context.addIssue({
@@ -11596,33 +11648,33 @@ var bathymetryReliefSchema = z3.object({
11596
11648
  });
11597
11649
  }
11598
11650
  });
11599
- var bathymetryConfigSchema = z3.object({
11651
+ var bathymetryConfigSchema = z4.object({
11600
11652
  ...marineSourceSchema.shape,
11601
- bands: z3.union([z3.literal(false), fillStyleSchema]).optional(),
11602
- contours: z3.union([z3.literal(false), lineStyleSchema]).optional(),
11603
- display: z3.enum(["bands", "relief", "hybrid"]).optional(),
11604
- labels: z3.union([z3.literal(false), symbolStyleSchema]).optional(),
11605
- relief: z3.union([z3.literal(false), bathymetryReliefSchema]).optional(),
11606
- type: z3.literal("bathymetry")
11653
+ bands: z4.union([z4.literal(false), fillStyleSchema]).optional(),
11654
+ contours: z4.union([z4.literal(false), lineStyleSchema]).optional(),
11655
+ display: z4.enum(["bands", "relief", "hybrid"]).optional(),
11656
+ labels: z4.union([z4.literal(false), symbolStyleSchema]).optional(),
11657
+ relief: z4.union([z4.literal(false), bathymetryReliefSchema]).optional(),
11658
+ type: z4.literal("bathymetry")
11607
11659
  }).strict();
11608
- var marineSchema = z3.union([
11609
- z3.enum(["none", "bathymetry", "nautical", "chart"]),
11610
- z3.object({
11611
- bathymetry: z3.union([z3.literal(false), marineSourceSchema, bathymetryConfigSchema]).optional(),
11612
- nautical: z3.union([z3.literal(false), marineSourceSchema]).optional()
11660
+ var marineSchema = z4.union([
11661
+ z4.enum(["none", "bathymetry", "nautical", "chart"]),
11662
+ z4.object({
11663
+ bathymetry: z4.union([z4.literal(false), marineSourceSchema, bathymetryConfigSchema]).optional(),
11664
+ nautical: z4.union([z4.literal(false), marineSourceSchema]).optional()
11613
11665
  }).strict()
11614
11666
  ]);
11615
- var directVectorDataSchema = z3.object({
11667
+ var directVectorDataSchema = z4.object({
11616
11668
  ...vectorDataShape,
11617
- bounds: z3.tuple([
11618
- z3.number().finite().min(-180).max(180),
11619
- z3.number().finite().min(-90).max(90),
11620
- z3.number().finite().min(-180).max(180),
11621
- z3.number().finite().min(-90).max(90)
11669
+ bounds: z4.tuple([
11670
+ z4.number().finite().min(-180).max(180),
11671
+ z4.number().finite().min(-90).max(90),
11672
+ z4.number().finite().min(-180).max(180),
11673
+ z4.number().finite().min(-90).max(90)
11622
11674
  ]).optional(),
11623
- maxzoom: z3.number().int().min(0).max(30).optional(),
11624
- minzoom: z3.number().int().min(0).max(30).optional(),
11625
- tiles: z3.array(publicVectorUrlSchema).min(1).max(8)
11675
+ maxzoom: z4.number().int().min(0).max(30).optional(),
11676
+ minzoom: z4.number().int().min(0).max(30).optional(),
11677
+ tiles: z4.array(publicVectorUrlSchema).min(1).max(8)
11626
11678
  }).strict().refine(
11627
11679
  (value) => value.minzoom === void 0 || value.maxzoom === void 0 || value.minzoom <= value.maxzoom,
11628
11680
  { message: "minzoom must not exceed maxzoom", path: ["minzoom"] }
@@ -11630,34 +11682,34 @@ var directVectorDataSchema = z3.object({
11630
11682
  (value) => value.bounds === void 0 || value.bounds[0] < value.bounds[2] && value.bounds[1] < value.bounds[3],
11631
11683
  { message: "bounds must have increasing axes", path: ["bounds"] }
11632
11684
  );
11633
- var dataSchema = z3.union([
11634
- z3.object({
11635
- type: z3.literal("tileflow-world"),
11636
- generation: z3.literal(tileflowWorldGeneration),
11637
- selection: z3.discriminatedUnion("kind", [
11638
- z3.object({ kind: z3.literal("current"), product: z3.literal("world-v1") }).strict(),
11639
- z3.object({
11640
- kind: z3.literal("release"),
11641
- product: z3.literal("world-v1"),
11642
- release: z3.object({
11643
- descriptorSha256: z3.string().regex(/^[0-9a-f]{64}$/u),
11685
+ var dataSchema = z4.union([
11686
+ z4.object({
11687
+ type: z4.literal("tileflow-world"),
11688
+ generation: z4.literal(tileflowWorldGeneration),
11689
+ selection: z4.discriminatedUnion("kind", [
11690
+ z4.object({ kind: z4.literal("current"), product: z4.literal("world-v1") }).strict(),
11691
+ z4.object({
11692
+ kind: z4.literal("release"),
11693
+ product: z4.literal("world-v1"),
11694
+ release: z4.object({
11695
+ descriptorSha256: z4.string().regex(/^[0-9a-f]{64}$/u),
11644
11696
  releaseId: tileflowWorldReleaseIdSchema
11645
11697
  }).strict()
11646
11698
  }).strict()
11647
11699
  ])
11648
11700
  }).strict(),
11649
- z3.object({ ...vectorDataShape, url: publicVectorUrlSchema }).strict(),
11701
+ z4.object({ ...vectorDataShape, url: publicVectorUrlSchema }).strict(),
11650
11702
  directVectorDataSchema
11651
11703
  ]);
11652
- var hostedTilesetSourceSchema = z3.object({
11653
- attribution: z3.string().trim().min(1).max(4096),
11654
- kind: z3.literal("hosted-tileset"),
11655
- local: z3.string().refine(isSafeLocalPmtilesPath, {
11704
+ var hostedTilesetSourceSchema = z4.object({
11705
+ attribution: z4.string().trim().min(1).max(4096),
11706
+ kind: z4.literal("hosted-tileset"),
11707
+ local: z4.string().refine(isSafeLocalPmtilesPath, {
11656
11708
  message: "Expected a safe relative .pmtiles path beginning with ./ or ../"
11657
11709
  }),
11658
- tileset: z3.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u).refine((value) => value !== "terrain" && value !== "world", "Expected a Team tileset ID"),
11659
- tileSize: z3.union([z3.literal(256), z3.literal(512)]).optional(),
11660
- type: z3.enum(["raster", "vector"])
11710
+ tileset: z4.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u).refine((value) => value !== "terrain" && value !== "world", "Expected a Team tileset ID"),
11711
+ tileSize: z4.union([z4.literal(256), z4.literal(512)]).optional(),
11712
+ type: z4.enum(["raster", "vector"])
11661
11713
  }).strict().superRefine((source, context) => {
11662
11714
  if (source.type === "vector" && source.tileSize !== void 0) {
11663
11715
  context.addIssue({
@@ -11667,7 +11719,7 @@ var hostedTilesetSourceSchema = z3.object({
11667
11719
  });
11668
11720
  }
11669
11721
  });
11670
- var hostedSourcesSchema = z3.record(tileflowMapIdSchema, hostedTilesetSourceSchema).superRefine((sources, context) => {
11722
+ var hostedSourcesSchema = z4.record(tileflowMapIdSchema, hostedTilesetSourceSchema).superRefine((sources, context) => {
11671
11723
  if (Object.keys(sources).length > tileflowHostedSourceLimit) {
11672
11724
  context.addIssue({
11673
11725
  code: "too_big",
@@ -11676,7 +11728,7 @@ var hostedSourcesSchema = z3.record(tileflowMapIdSchema, hostedTilesetSourceSche
11676
11728
  });
11677
11729
  }
11678
11730
  });
11679
- var maplibreOverlayLayerSchema = z3.record(z3.string(), z3.unknown()).superRefine((layer, context) => {
11731
+ var maplibreOverlayLayerSchema = z4.record(z4.string(), z4.unknown()).superRefine((layer, context) => {
11680
11732
  if (!tileflowMapIdSchema.safeParse(layer.id).success) {
11681
11733
  context.addIssue({ code: "custom", message: "Expected a portable layer ID", path: ["id"] });
11682
11734
  }
@@ -11694,30 +11746,41 @@ var maplibreOverlayLayerSchema = z3.record(z3.string(), z3.unknown()).superRefin
11694
11746
  });
11695
11747
  }
11696
11748
  });
11697
- var maplibreOverlaySchema = z3.object({
11698
- kind: z3.literal("maplibre-overlay"),
11699
- layers: z3.array(maplibreOverlayLayerSchema).min(1),
11700
- placement: z3.enum(tileflowOverlayPlacements),
11749
+ var maplibreOverlaySchema = z4.object({
11750
+ kind: z4.literal("maplibre-overlay"),
11751
+ layers: z4.array(maplibreOverlayLayerSchema).min(1),
11752
+ placement: z4.enum(tileflowOverlayPlacements),
11701
11753
  source: tileflowMapIdSchema
11702
11754
  }).strict();
11703
- var overlaysSchema = z3.record(tileflowMapIdSchema, maplibreOverlaySchema);
11704
- var localAssetDirectorySchema = z3.string().min(3).max(tileflowLocalDirectoryMaximumLength).refine(isTileflowLocalDirectory, { message: tileflowLocalDirectoryMessage });
11705
- var packageAssetDirectorySchema = z3.object({
11706
- kind: z3.literal("package-directory"),
11707
- package: z3.string().regex(
11755
+ var overlaysSchema = z4.record(tileflowMapIdSchema, maplibreOverlaySchema);
11756
+ var localAssetDirectorySchema = z4.string().min(3).max(tileflowLocalDirectoryMaximumLength).refine(isTileflowLocalDirectory, { message: tileflowLocalDirectoryMessage });
11757
+ var packageAssetDirectorySchema = z4.object({
11758
+ kind: z4.literal("package-directory"),
11759
+ package: z4.string().regex(
11708
11760
  /^(?:@[a-z0-9][a-z0-9._-]*\/[a-z0-9][a-z0-9._-]*|[a-z0-9][a-z0-9._-]*)$/u,
11709
11761
  "Expected a lowercase npm package name"
11710
11762
  ),
11711
- path: z3.string().min(1).max(512).refine(
11763
+ path: z4.string().min(1).max(512).refine(
11712
11764
  (value) => !value.startsWith("/") && !value.includes("\\") && value.split("/").every((segment) => Boolean(segment) && segment !== "." && segment !== ".."),
11713
11765
  "Expected a portable package-relative directory"
11714
11766
  )
11715
11767
  }).strict();
11716
- var assetDirectorySchema = z3.union([localAssetDirectorySchema, packageAssetDirectorySchema]);
11717
- var iconDirectoriesSchema = z3.array(assetDirectorySchema).max(32);
11718
- var fontDirectoriesSchema = z3.array(assetDirectorySchema).max(16);
11719
- var fontStacksSchema = z3.array(
11720
- z3.string().min(1).max(200).refine(
11768
+ var assetDirectorySchema = z4.union([localAssetDirectorySchema, packageAssetDirectorySchema]);
11769
+ var iconDirectoriesSchema = z4.array(
11770
+ z4.union([localAssetDirectorySchema, packageAssetDirectorySchema, tileflowIconSetSourceSchema])
11771
+ ).max(tileflowIconSourceLimit).superRefine((sources, context) => {
11772
+ try {
11773
+ collectTileflowIconSetReferences(sources);
11774
+ } catch (cause) {
11775
+ context.addIssue({
11776
+ code: "custom",
11777
+ message: cause instanceof Error ? cause.message : "Invalid icon contributors"
11778
+ });
11779
+ }
11780
+ });
11781
+ var fontDirectoriesSchema = z4.array(assetDirectorySchema).max(16);
11782
+ var fontStacksSchema = z4.array(
11783
+ z4.string().min(1).max(200).refine(
11721
11784
  (value) => value === value.trim() && value === value.normalize("NFC") && !/[\p{Cc}\\/]/u.test(value),
11722
11785
  "Expected an exact NFC MapLibre font-stack key without whitespace padding, controls, slashes, or backslashes"
11723
11786
  )
@@ -11734,10 +11797,10 @@ var fontStacksSchema = z3.array(
11734
11797
  seen.add(fontStack);
11735
11798
  }
11736
11799
  });
11737
- var glyphsSchema = z3.object({
11800
+ var glyphsSchema = z4.object({
11738
11801
  fontStacks: fontStacksSchema,
11739
- kind: z3.literal("url"),
11740
- url: z3.string().min(1).refine(
11802
+ kind: z4.literal("url"),
11803
+ url: z4.string().min(1).refine(
11741
11804
  (value) => value.includes("{fontstack}") && value.includes("{range}"),
11742
11805
  "Expected {fontstack} and {range} placeholders"
11743
11806
  ).refine(isSafeGlyphUrl, "Expected an HTTP(S), root-relative, or path-relative glyph URL")
@@ -11745,34 +11808,34 @@ var glyphsSchema = z3.object({
11745
11808
  var terrainLayerRangeShape = {
11746
11809
  maxZoom: zoomNumberSchema.optional(),
11747
11810
  minZoom: zoomNumberSchema.optional(),
11748
- visible: z3.boolean().optional()
11811
+ visible: z4.boolean().optional()
11749
11812
  };
11750
- var terrainHillshadeSchema = z3.object({
11813
+ var terrainHillshadeSchema = z4.object({
11751
11814
  ...terrainLayerRangeShape,
11752
11815
  accentColor: terrainColorValueSchema.optional(),
11753
- exaggeration: terrainNumberValueSchema(z3.number().finite().min(0).max(1)).optional(),
11816
+ exaggeration: terrainNumberValueSchema(z4.number().finite().min(0).max(1)).optional(),
11754
11817
  highlightColor: terrainColorValueSchema.optional(),
11755
- illuminationAnchor: z3.enum(["map", "viewport"]).optional(),
11756
- illuminationDirection: terrainNumberValueSchema(z3.number().finite().min(0).max(359)).optional(),
11818
+ illuminationAnchor: z4.enum(["map", "viewport"]).optional(),
11819
+ illuminationDirection: terrainNumberValueSchema(z4.number().finite().min(0).max(359)).optional(),
11757
11820
  shadowColor: terrainColorValueSchema.optional()
11758
11821
  }).strict();
11759
- var terrainContourLineSchema = z3.object({
11822
+ var terrainContourLineSchema = z4.object({
11760
11823
  ...terrainLayerRangeShape,
11761
11824
  color: terrainColorValueSchema.optional(),
11762
- opacity: terrainNumberValueSchema(z3.number().finite().min(0).max(1)).optional(),
11763
- width: terrainNumberValueSchema(z3.number().finite().min(0).max(32)).optional()
11825
+ opacity: terrainNumberValueSchema(z4.number().finite().min(0).max(1)).optional(),
11826
+ width: terrainNumberValueSchema(z4.number().finite().min(0).max(32)).optional()
11764
11827
  }).strict();
11765
- var terrainContourLabelSchema = z3.object({
11828
+ var terrainContourLabelSchema = z4.object({
11766
11829
  ...terrainLayerRangeShape,
11767
11830
  color: terrainColorValueSchema.optional(),
11768
11831
  font: moduleFontValueSchema.optional(),
11769
11832
  haloColor: terrainColorValueSchema.optional(),
11770
- haloWidth: terrainNumberValueSchema(z3.number().finite().min(0).max(16)).optional(),
11771
- opacity: terrainNumberValueSchema(z3.number().finite().min(0).max(1)).optional(),
11772
- size: terrainNumberValueSchema(z3.number().finite().min(1).max(64)).optional(),
11773
- spacing: terrainNumberValueSchema(z3.number().finite().min(1).max(1e3)).optional()
11833
+ haloWidth: terrainNumberValueSchema(z4.number().finite().min(0).max(16)).optional(),
11834
+ opacity: terrainNumberValueSchema(z4.number().finite().min(0).max(1)).optional(),
11835
+ size: terrainNumberValueSchema(z4.number().finite().min(1).max(64)).optional(),
11836
+ spacing: terrainNumberValueSchema(z4.number().finite().min(1).max(1e3)).optional()
11774
11837
  }).strict();
11775
- var terrainContourThresholdPairSchema = z3.tuple([z3.number().finite().min(1e-3).max(1e5), z3.number().finite().min(1e-3).max(1e5)]).refine(([minor, index]) => minor <= index, {
11838
+ var terrainContourThresholdPairSchema = z4.tuple([z4.number().finite().min(1e-3).max(1e5), z4.number().finite().min(1e-3).max(1e5)]).refine(([minor, index]) => minor <= index, {
11776
11839
  message: "Expected the index contour interval to be greater than or equal to the minor interval"
11777
11840
  }).refine(([minor, index]) => isWholeContourMultiple2(index, minor), {
11778
11841
  message: "Expected the index contour interval to be a whole multiple of the minor interval"
@@ -11781,7 +11844,7 @@ function isWholeContourMultiple2(value, interval) {
11781
11844
  const ratio = value / interval;
11782
11845
  return Math.abs(ratio - Math.round(ratio)) <= Number.EPSILON * Math.max(1, ratio) * 8;
11783
11846
  }
11784
- var terrainContourThresholdsSchema = z3.record(z3.string().regex(/^(?:0|[1-9]|1\d|2[0-4])$/u), terrainContourThresholdPairSchema).superRefine((thresholds, context) => {
11847
+ var terrainContourThresholdsSchema = z4.record(z4.string().regex(/^(?:0|[1-9]|1\d|2[0-4])$/u), terrainContourThresholdPairSchema).superRefine((thresholds, context) => {
11785
11848
  const count = Object.keys(thresholds).length;
11786
11849
  if (count === 0 || count > 25) {
11787
11850
  context.addIssue({
@@ -11790,19 +11853,19 @@ var terrainContourThresholdsSchema = z3.record(z3.string().regex(/^(?:0|[1-9]|1\
11790
11853
  });
11791
11854
  }
11792
11855
  });
11793
- var terrainContoursSchema = z3.object({
11794
- demMaxZoom: z3.number().int().min(0).max(24),
11795
- demUrl: z3.string().min(1).max(2048).refine(
11856
+ var terrainContoursSchema = z4.object({
11857
+ demMaxZoom: z4.number().int().min(0).max(24),
11858
+ demUrl: z4.string().min(1).max(2048).refine(
11796
11859
  isSafeTileflowDemUrlTemplate,
11797
11860
  "Expected a safe HTTP(S) DEM URL template containing {z}, {x}, and {y}"
11798
11861
  ),
11799
11862
  index: terrainContourLineSchema.optional(),
11800
11863
  labels: terrainContourLabelSchema.optional(),
11801
- maxZoom: z3.number().int().min(0).max(24).optional(),
11864
+ maxZoom: z4.number().int().min(0).max(24).optional(),
11802
11865
  minZoom: zoomNumberSchema.optional(),
11803
11866
  minor: terrainContourLineSchema.optional(),
11804
- multiplier: z3.number().finite().min(1e-3).max(100).optional(),
11805
- overzoom: z3.number().int().min(0).max(8).optional(),
11867
+ multiplier: z4.number().finite().min(1e-3).max(100).optional(),
11868
+ overzoom: z4.number().int().min(0).max(8).optional(),
11806
11869
  sourceId: identifierSchema.optional(),
11807
11870
  thresholds: terrainContourThresholdsSchema
11808
11871
  }).strict().superRefine((contours, context) => {
@@ -11866,26 +11929,26 @@ var terrainContoursSchema = z3.object({
11866
11929
  }
11867
11930
  }
11868
11931
  });
11869
- var terrainSchema = z3.union([
11870
- z3.enum(["none", "hillshade", "3d"]),
11871
- z3.object({
11872
- attribution: z3.string().optional(),
11932
+ var terrainSchema = z4.union([
11933
+ z4.enum(["none", "hillshade", "3d"]),
11934
+ z4.object({
11935
+ attribution: z4.string().optional(),
11873
11936
  contours: terrainContoursSchema.optional(),
11874
- encoding: z3.enum(["mapbox", "terrarium"]).optional(),
11875
- exaggeration: z3.number().finite().min(0).max(10).optional(),
11937
+ encoding: z4.enum(["mapbox", "terrarium"]).optional(),
11938
+ exaggeration: z4.number().finite().min(0).max(10).optional(),
11876
11939
  hillshade: terrainHillshadeSchema.optional(),
11877
- mode: z3.enum(["none", "hillshade", "3d"]).optional(),
11878
- sourceId: z3.string().trim().min(1).optional(),
11879
- url: z3.string().trim().min(1).optional()
11940
+ mode: z4.enum(["none", "hillshade", "3d"]).optional(),
11941
+ sourceId: z4.string().trim().min(1).optional(),
11942
+ url: z4.string().trim().min(1).optional()
11880
11943
  }).strict()
11881
11944
  ]);
11882
- var viewSchema = z3.object({
11883
- bearing: z3.number().finite().min(-180).max(180).optional(),
11884
- center: z3.tuple([z3.number().finite().min(-180).max(180), z3.number().finite().min(-90).max(90)]).optional(),
11885
- pitch: z3.number().finite().min(0).max(85).optional(),
11945
+ var viewSchema = z4.object({
11946
+ bearing: z4.number().finite().min(-180).max(180).optional(),
11947
+ center: z4.tuple([z4.number().finite().min(-180).max(180), z4.number().finite().min(-90).max(90)]).optional(),
11948
+ pitch: z4.number().finite().min(0).max(85).optional(),
11886
11949
  zoom: zoomNumberSchema.optional()
11887
11950
  }).strict();
11888
- var themesSchema = z3.record(tileflowThemeNameSchema, tileflowThemeSchema).superRefine((themes, context) => {
11951
+ var themesSchema = z4.record(tileflowThemeNameSchema, tileflowThemeSchema).superRefine((themes, context) => {
11889
11952
  const names = Object.keys(themes);
11890
11953
  if (names.length === 0) {
11891
11954
  context.addIssue({ code: "custom", message: "Expected at least one named theme" });
@@ -11909,8 +11972,8 @@ var themesSchema = z3.record(tileflowThemeNameSchema, tileflowThemeSchema).super
11909
11972
  }
11910
11973
  }
11911
11974
  }).describe("tileflow-themes");
11912
- var systemThemesSchema = z3.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict();
11913
- var resolvedTileflowMapSchema = z3.object({
11975
+ var systemThemesSchema = z4.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict();
11976
+ var resolvedTileflowMapSchema = z4.object({
11914
11977
  data: dataSchema.optional(),
11915
11978
  defaultTheme: tileflowThemeNameSchema,
11916
11979
  fonts: fontDirectoriesSchema.optional(),
@@ -11919,14 +11982,14 @@ var resolvedTileflowMapSchema = z3.object({
11919
11982
  id: tileflowMapIdSchema,
11920
11983
  marine: marineSchema.optional(),
11921
11984
  modules: modulesSchema.optional(),
11922
- name: z3.string().trim().min(1),
11985
+ name: z4.string().trim().min(1),
11923
11986
  overlays: overlaysSchema.optional(),
11924
- projection: z3.enum(["globe", "mercator"]).optional(),
11987
+ projection: z4.enum(["globe", "mercator"]).optional(),
11925
11988
  sources: hostedSourcesSchema.optional(),
11926
11989
  systemThemes: systemThemesSchema.optional(),
11927
11990
  terrain: terrainSchema.optional(),
11928
11991
  themes: themesSchema,
11929
- version: z3.number().int().positive(),
11992
+ version: z4.number().int().positive(),
11930
11993
  view: viewSchema.optional()
11931
11994
  }).strict().superRefine((map, context) => {
11932
11995
  if (map.fonts !== void 0 && map.glyphs !== void 0) {
@@ -13949,46 +14012,46 @@ function semanticReportKey(...parts) {
13949
14012
  }
13950
14013
 
13951
14014
  // src/manifest.ts
13952
- import { z as z4 } from "zod";
14015
+ import { z as z5 } from "zod";
13953
14016
  var tileflowRuntimeManifestVersion = 1;
13954
14017
  var tileflowRuntimeManifestLimits = Object.freeze({ maximumBytes: 1024 * 1024 });
13955
- var safeTextSchema = z4.string().min(1).max(2048).refine((value) => value === value.trim(), "Expected text without surrounding whitespace").refine((value) => !/[\p{Cc}\\]/u.test(value), "Expected safe text");
14018
+ var safeTextSchema = z5.string().min(1).max(2048).refine((value) => value === value.trim(), "Expected text without surrounding whitespace").refine((value) => !/[\p{Cc}\\]/u.test(value), "Expected safe text");
13956
14019
  var publicResourceUrlSchema = safeTextSchema.refine(isPublicResourceUrl, {
13957
14020
  message: "Expected an HTTP(S), root-relative, or path-relative public URL"
13958
14021
  });
13959
14022
  var apiOriginSchema = safeTextSchema.refine(isApiOrigin, {
13960
14023
  message: "Expected an absolute HTTP(S) origin without path, credentials, query, or fragment"
13961
14024
  });
13962
- var viewSchema2 = z4.object({
13963
- bearing: z4.number().finite().min(-180).max(180).optional(),
13964
- center: z4.tuple([z4.number().finite().min(-180).max(180), z4.number().finite().min(-90).max(90)]).optional(),
13965
- pitch: z4.number().finite().min(0).max(85).optional(),
13966
- zoom: z4.number().finite().min(0).max(24).optional()
14025
+ var viewSchema2 = z5.object({
14026
+ bearing: z5.number().finite().min(-180).max(180).optional(),
14027
+ center: z5.tuple([z5.number().finite().min(-180).max(180), z5.number().finite().min(-90).max(90)]).optional(),
14028
+ pitch: z5.number().finite().min(0).max(85).optional(),
14029
+ zoom: z5.number().finite().min(0).max(24).optional()
13967
14030
  }).strict();
13968
- var fontFaceSchema = z4.object({
14031
+ var fontFaceSchema = z5.object({
13969
14032
  family: safeTextSchema.max(100),
13970
14033
  source: publicResourceUrlSchema,
13971
- style: z4.enum(["italic", "normal", "oblique"]).optional(),
13972
- weight: z4.enum(["100", "200", "300", "400", "500", "600", "700", "800", "900"]).optional()
14034
+ style: z5.enum(["italic", "normal", "oblique"]).optional(),
14035
+ weight: z5.enum(["100", "200", "300", "400", "500", "600", "700", "800", "900"]).optional()
13973
14036
  }).strict();
13974
- var fontFacesSchema = z4.array(fontFaceSchema).max(16).superRefine(validateUniqueFontFaces);
13975
- var manifestThemeSchema = z4.object({
13976
- colorScheme: z4.enum(["dark", "light"]),
14037
+ var fontFacesSchema = z5.array(fontFaceSchema).max(16).superRefine(validateUniqueFontFaces);
14038
+ var manifestThemeSchema = z5.object({
14039
+ colorScheme: z5.enum(["dark", "light"]),
13977
14040
  fontFaces: fontFacesSchema.optional(),
13978
14041
  revision: safeTextSchema.max(128).optional(),
13979
14042
  styleId: safeTextSchema.max(128).optional(),
13980
14043
  styleUrl: publicResourceUrlSchema
13981
14044
  }).strict();
13982
- var manifestMapSchema = z4.object({
14045
+ var manifestMapSchema = z5.object({
13983
14046
  apiUrl: apiOriginSchema.optional(),
13984
14047
  defaultTheme: tileflowThemeNameSchema,
13985
14048
  environment: safeTextSchema.max(128).optional(),
13986
14049
  mapId: safeTextSchema.max(128).optional(),
13987
- systemThemes: z4.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict().optional(),
13988
- themes: z4.record(tileflowThemeNameSchema, manifestThemeSchema),
13989
- usageMode: z4.literal("session").optional(),
14050
+ systemThemes: z5.object({ dark: tileflowThemeNameSchema, light: tileflowThemeNameSchema }).strict().optional(),
14051
+ themes: z5.record(tileflowThemeNameSchema, manifestThemeSchema),
14052
+ usageMode: z5.literal("session").optional(),
13990
14053
  view: viewSchema2.optional(),
13991
- worldGeneration: z4.literal("v1").optional()
14054
+ worldGeneration: z5.literal("v1").optional()
13992
14055
  }).strict().superRefine((entry, context) => {
13993
14056
  const names = Object.keys(entry.themes);
13994
14057
  if (names.length === 0) {
@@ -14035,10 +14098,10 @@ var manifestMapSchema = z4.object({
14035
14098
  });
14036
14099
  }
14037
14100
  });
14038
- var canonicalManifestSchema = z4.object({
14101
+ var canonicalManifestSchema = z5.object({
14039
14102
  apiUrl: apiOriginSchema.optional(),
14040
- maps: z4.record(tileflowPortableIdSchema, manifestMapSchema),
14041
- version: z4.literal(tileflowRuntimeManifestVersion)
14103
+ maps: z5.record(tileflowPortableIdSchema, manifestMapSchema),
14104
+ version: z5.literal(tileflowRuntimeManifestVersion)
14042
14105
  }).strict().superRefine((manifest, context) => {
14043
14106
  const mapCount = Object.keys(manifest.maps).length;
14044
14107
  if (mapCount === 0) {
@@ -14056,7 +14119,7 @@ var canonicalManifestSchema = z4.object({
14056
14119
  });
14057
14120
  }
14058
14121
  });
14059
- var safeManifestInputSchema = z4.unknown().superRefine((input, context) => {
14122
+ var safeManifestInputSchema = z5.unknown().superRefine((input, context) => {
14060
14123
  const unsafe = findUnsafeManifestStructure(input);
14061
14124
  if (unsafe) {
14062
14125
  context.addIssue({
@@ -14147,7 +14210,7 @@ function findUnsafeManifestStructure(input) {
14147
14210
  }
14148
14211
 
14149
14212
  // src/capture-scene.ts
14150
- import { z as z5 } from "zod";
14213
+ import { z as z6 } from "zod";
14151
14214
  var tileflowCaptureSceneLimits = Object.freeze({
14152
14215
  applicationPathLength: 2048,
14153
14216
  boundsPadding: { maximum: 1024, minimum: 0 },
@@ -14158,26 +14221,26 @@ var tileflowCaptureSceneLimits = Object.freeze({
14158
14221
  viewport: { maximum: 4096, minimum: 64 },
14159
14222
  zoom: { maximum: 24, minimum: 0 }
14160
14223
  });
14161
- var finiteLongitudeSchema = z5.number().finite().min(-180).max(180);
14162
- var finiteLatitudeSchema = z5.number().finite().min(-90).max(90);
14163
- var bearingSchema = z5.number().finite().min(-180).max(180).optional();
14164
- var pitchSchema = z5.number().finite().min(tileflowCaptureSceneLimits.pitch.minimum).max(tileflowCaptureSceneLimits.pitch.maximum).optional();
14165
- var tileflowCaptureCenterCameraSchema = z5.object({
14166
- type: z5.literal("center"),
14167
- center: z5.tuple([finiteLongitudeSchema, finiteLatitudeSchema]),
14168
- zoom: z5.number().finite().min(tileflowCaptureSceneLimits.zoom.minimum).max(tileflowCaptureSceneLimits.zoom.maximum),
14224
+ var finiteLongitudeSchema = z6.number().finite().min(-180).max(180);
14225
+ var finiteLatitudeSchema = z6.number().finite().min(-90).max(90);
14226
+ var bearingSchema = z6.number().finite().min(-180).max(180).optional();
14227
+ var pitchSchema = z6.number().finite().min(tileflowCaptureSceneLimits.pitch.minimum).max(tileflowCaptureSceneLimits.pitch.maximum).optional();
14228
+ var tileflowCaptureCenterCameraSchema = z6.object({
14229
+ type: z6.literal("center"),
14230
+ center: z6.tuple([finiteLongitudeSchema, finiteLatitudeSchema]),
14231
+ zoom: z6.number().finite().min(tileflowCaptureSceneLimits.zoom.minimum).max(tileflowCaptureSceneLimits.zoom.maximum),
14169
14232
  bearing: bearingSchema,
14170
14233
  pitch: pitchSchema
14171
14234
  }).strict();
14172
- var tileflowCaptureBoundsCameraSchema = z5.object({
14173
- type: z5.literal("bounds"),
14174
- bounds: z5.tuple([
14235
+ var tileflowCaptureBoundsCameraSchema = z6.object({
14236
+ type: z6.literal("bounds"),
14237
+ bounds: z6.tuple([
14175
14238
  finiteLongitudeSchema,
14176
14239
  finiteLatitudeSchema,
14177
14240
  finiteLongitudeSchema,
14178
14241
  finiteLatitudeSchema
14179
14242
  ]),
14180
- padding: z5.number().finite().min(tileflowCaptureSceneLimits.boundsPadding.minimum).max(tileflowCaptureSceneLimits.boundsPadding.maximum).optional(),
14243
+ padding: z6.number().finite().min(tileflowCaptureSceneLimits.boundsPadding.minimum).max(tileflowCaptureSceneLimits.boundsPadding.maximum).optional(),
14181
14244
  bearing: bearingSchema,
14182
14245
  pitch: pitchSchema
14183
14246
  }).strict().superRefine((camera, context) => {
@@ -14197,14 +14260,14 @@ var tileflowCaptureBoundsCameraSchema = z5.object({
14197
14260
  });
14198
14261
  }
14199
14262
  });
14200
- var tileflowCaptureCameraSchema = z5.discriminatedUnion("type", [
14263
+ var tileflowCaptureCameraSchema = z6.discriminatedUnion("type", [
14201
14264
  tileflowCaptureCenterCameraSchema,
14202
14265
  tileflowCaptureBoundsCameraSchema
14203
14266
  ]);
14204
- var tileflowCaptureViewportSchema = z5.object({
14205
- width: z5.number().int().min(tileflowCaptureSceneLimits.viewport.minimum).max(tileflowCaptureSceneLimits.viewport.maximum),
14206
- height: z5.number().int().min(tileflowCaptureSceneLimits.viewport.minimum).max(tileflowCaptureSceneLimits.viewport.maximum),
14207
- dpr: z5.union([z5.literal(1), z5.literal(2)]).optional()
14267
+ var tileflowCaptureViewportSchema = z6.object({
14268
+ width: z6.number().int().min(tileflowCaptureSceneLimits.viewport.minimum).max(tileflowCaptureSceneLimits.viewport.maximum),
14269
+ height: z6.number().int().min(tileflowCaptureSceneLimits.viewport.minimum).max(tileflowCaptureSceneLimits.viewport.maximum),
14270
+ dpr: z6.union([z6.literal(1), z6.literal(2)]).optional()
14208
14271
  }).strict().superRefine((viewport, context) => {
14209
14272
  const dpr = viewport.dpr ?? 1;
14210
14273
  const physicalWidth = viewport.width * dpr;
@@ -14218,22 +14281,22 @@ var tileflowCaptureViewportSchema = z5.object({
14218
14281
  });
14219
14282
  }
14220
14283
  });
14221
- var tileflowCaptureIdSchema = z5.string().min(1).max(tileflowCaptureSceneLimits.captureIdLength).regex(/^[A-Za-z0-9_-]+$/, {
14284
+ var tileflowCaptureIdSchema = z6.string().min(1).max(tileflowCaptureSceneLimits.captureIdLength).regex(/^[A-Za-z0-9_-]+$/, {
14222
14285
  message: "Expected letters, numbers, underscores, or hyphens"
14223
14286
  }).refine((name) => name !== "__proto__", {
14224
14287
  message: "Expected an identifier that cannot mutate an object prototype"
14225
14288
  });
14226
14289
  var tileflowCaptureSceneNameSchema = tileflowPortableIdSchema;
14227
- var applicationPathSchema = z5.string().min(1).max(tileflowCaptureSceneLimits.applicationPathLength).refine(isPortableApplicationPath, {
14290
+ var applicationPathSchema = z6.string().min(1).max(tileflowCaptureSceneLimits.applicationPathLength).refine(isPortableApplicationPath, {
14228
14291
  message: "Expected a root-relative application path without an origin, credentials, fragment, backslash, or control character"
14229
14292
  });
14230
- var tileflowCaptureMapTargetSchema = z5.object({ kind: z5.literal("map") }).strict();
14231
- var tileflowCaptureApplicationTargetSchema = z5.object({
14232
- kind: z5.literal("application"),
14293
+ var tileflowCaptureMapTargetSchema = z6.object({ kind: z6.literal("map") }).strict();
14294
+ var tileflowCaptureApplicationTargetSchema = z6.object({
14295
+ kind: z6.literal("application"),
14233
14296
  path: applicationPathSchema,
14234
14297
  captureId: tileflowCaptureIdSchema.optional(),
14235
- selector: z5.string().trim().min(1).max(tileflowCaptureSceneLimits.selectorLength).optional(),
14236
- frame: z5.enum(["map", "viewport"]).optional()
14298
+ selector: z6.string().trim().min(1).max(tileflowCaptureSceneLimits.selectorLength).optional(),
14299
+ frame: z6.enum(["map", "viewport"]).optional()
14237
14300
  }).strict().superRefine((target, context) => {
14238
14301
  if (target.captureId && target.selector) {
14239
14302
  context.addIssue({
@@ -14243,11 +14306,11 @@ var tileflowCaptureApplicationTargetSchema = z5.object({
14243
14306
  });
14244
14307
  }
14245
14308
  });
14246
- var tileflowCaptureTargetSchema = z5.discriminatedUnion("kind", [
14309
+ var tileflowCaptureTargetSchema = z6.discriminatedUnion("kind", [
14247
14310
  tileflowCaptureMapTargetSchema,
14248
14311
  tileflowCaptureApplicationTargetSchema
14249
14312
  ]);
14250
- var tileflowCaptureSceneSchema = z5.object({
14313
+ var tileflowCaptureSceneSchema = z6.object({
14251
14314
  map: tileflowPortableIdSchema,
14252
14315
  theme: tileflowThemeNameSchema,
14253
14316
  camera: tileflowCaptureCameraSchema,
@@ -14350,8 +14413,11 @@ function isPlainRecord5(value) {
14350
14413
  return prototype === Object.prototype || prototype === null;
14351
14414
  }
14352
14415
 
14416
+ // src/icon-composition.ts
14417
+ import { z as z8 } from "zod";
14418
+
14353
14419
  // src/icon-package.ts
14354
- import { z as z6 } from "zod";
14420
+ import { z as z7 } from "zod";
14355
14421
  var tileflowIconIdPattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
14356
14422
  var tileflowIconPackageLimits = {
14357
14423
  decodeConcurrency: 4,
@@ -14370,16 +14436,17 @@ var tileflowHostedAlphaCompatibility = {
14370
14436
  },
14371
14437
  maxMapsPerDeploy: 20
14372
14438
  };
14373
- var sha256Schema = z6.string().regex(/^[a-f0-9]{64}$/);
14374
- var tileflowIconIdSchema = z6.string().max(64).regex(tileflowIconIdPattern);
14375
- var tileflowRenderedIconManifestEntrySchema = z6.object({
14439
+ var sha256Schema = z7.string().regex(/^[a-f0-9]{64}$/);
14440
+ var tileflowIconPackageContentHashSchema = sha256Schema;
14441
+ var tileflowIconIdSchema = z7.string().max(64).regex(tileflowIconIdPattern);
14442
+ var tileflowRenderedIconManifestEntrySchema = z7.object({
14376
14443
  name: tileflowIconIdSchema,
14377
- pixelSha256: z6.object({
14444
+ pixelSha256: z7.object({
14378
14445
  oneX: sha256Schema,
14379
14446
  twoX: sha256Schema
14380
14447
  }).strict()
14381
14448
  }).strict();
14382
- var tileflowIconPackageLabelSchema = z6.string().superRefine((value, context) => {
14449
+ var tileflowIconPackageLabelSchema = z7.string().superRefine((value, context) => {
14383
14450
  if (value !== value.trim() || value.length === 0) {
14384
14451
  context.addIssue({
14385
14452
  code: "custom",
@@ -14399,32 +14466,32 @@ var tileflowIconPackageLabelSchema = z6.string().superRefine((value, context) =>
14399
14466
  });
14400
14467
  }
14401
14468
  });
14402
- var spriteDimensionsSchema = z6.object({
14403
- height: z6.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
14404
- pixelRatio: z6.union([z6.literal(1), z6.literal(2)]),
14405
- width: z6.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension)
14469
+ var spriteDimensionsSchema = z7.object({
14470
+ height: z7.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension),
14471
+ pixelRatio: z7.union([z7.literal(1), z7.literal(2)]),
14472
+ width: z7.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension)
14406
14473
  }).strict();
14407
14474
  function iconPackageFileSchema(name, contentType) {
14408
- return z6.object({
14409
- byteLength: z6.number().int().nonnegative().max(tileflowIconPackageLimits.maxGeneratedFileBytes),
14410
- contentType: z6.literal(contentType),
14411
- name: z6.literal(name),
14475
+ return z7.object({
14476
+ byteLength: z7.number().int().nonnegative().max(tileflowIconPackageLimits.maxGeneratedFileBytes),
14477
+ contentType: z7.literal(contentType),
14478
+ name: z7.literal(name),
14412
14479
  sha256: sha256Schema
14413
14480
  }).strict();
14414
14481
  }
14415
- var tileflowIconPackageManifestSchema = z6.object({
14416
- files: z6.tuple([
14482
+ var tileflowIconPackageManifestSchema = z7.object({
14483
+ files: z7.tuple([
14417
14484
  iconPackageFileSchema("sprite.json", "application/json"),
14418
14485
  iconPackageFileSchema("sprite.png", "image/png"),
14419
14486
  iconPackageFileSchema("sprite@2x.json", "application/json"),
14420
14487
  iconPackageFileSchema("sprite@2x.png", "image/png")
14421
14488
  ]),
14422
- format: z6.literal("tileflow-icon-package-v1"),
14423
- iconNames: z6.array(tileflowIconIdSchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
14424
- renderedIcons: z6.array(tileflowRenderedIconManifestEntrySchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
14425
- sprites: z6.object({
14426
- oneX: spriteDimensionsSchema.extend({ pixelRatio: z6.literal(1) }),
14427
- twoX: spriteDimensionsSchema.extend({ pixelRatio: z6.literal(2) })
14489
+ format: z7.literal("tileflow-icon-package-v1"),
14490
+ iconNames: z7.array(tileflowIconIdSchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
14491
+ renderedIcons: z7.array(tileflowRenderedIconManifestEntrySchema).min(1).max(tileflowIconPackageLimits.maxIconCount),
14492
+ sprites: z7.object({
14493
+ oneX: spriteDimensionsSchema.extend({ pixelRatio: z7.literal(1) }),
14494
+ twoX: spriteDimensionsSchema.extend({ pixelRatio: z7.literal(2) })
14428
14495
  }).strict()
14429
14496
  }).strict().superRefine((manifest, context) => {
14430
14497
  const sortedNames = [...manifest.iconNames].sort(compareCodeUnits8);
@@ -14512,8 +14579,113 @@ function containsControlCharacter(value) {
14512
14579
  });
14513
14580
  }
14514
14581
 
14582
+ // src/icon-composition.ts
14583
+ var tileflowIconCompositionMaximumBytes = 1024 * 1024;
14584
+ var idsSchema = z8.array(tileflowIconIdSchema).max(tileflowIconPackageLimits.maxIconCount).refine(
14585
+ (ids) => new Set(ids).size === ids.length && ids.every((id, index) => index === 0 || compareCodeUnits8(ids[index - 1], id) < 0),
14586
+ "Icon exports must be unique and sorted by code unit"
14587
+ );
14588
+ var localContributorSchema = z8.object({ kind: z8.literal("local"), iconIds: idsSchema }).strict();
14589
+ var packageContributorSchema = z8.object({
14590
+ kind: z8.literal("package"),
14591
+ package: z8.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u),
14592
+ iconIds: idsSchema
14593
+ }).strict();
14594
+ var setContributorSchema = z8.object({
14595
+ kind: z8.literal("icon-set"),
14596
+ reference: tileflowIconSetReferenceSchema,
14597
+ teamId: tileflowIconSetTeamIdSchema,
14598
+ setId: tileflowIconSetIdSchema,
14599
+ versionId: tileflowIconSetVersionIdSchema,
14600
+ version: z8.number().int().positive().max(Number.MAX_SAFE_INTEGER),
14601
+ packageId: tileflowIconSetPackageIdSchema,
14602
+ contentHash: tileflowIconPackageContentHashSchema,
14603
+ iconIds: idsSchema.min(1)
14604
+ }).strict();
14605
+ var tileflowRenderedIconIdentitySchema = z8.object({
14606
+ kind: z8.literal("rendered-icon"),
14607
+ id: tileflowIconIdSchema,
14608
+ width: z8.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
14609
+ height: z8.number().int().positive().max(tileflowIconPackageLimits.maxAtlasDimension / 2),
14610
+ pixelSha256: z8.object({
14611
+ oneX: tileflowIconPackageContentHashSchema,
14612
+ twoX: tileflowIconPackageContentHashSchema
14613
+ }).strict()
14614
+ }).strict();
14615
+ var tileflowIconCompositionSchema = z8.object({
14616
+ format: z8.literal("tileflow-icon-composition-v1"),
14617
+ compositionVersion: z8.literal(1),
14618
+ packageHash: tileflowIconPackageContentHashSchema,
14619
+ contributors: z8.array(
14620
+ z8.discriminatedUnion("kind", [
14621
+ localContributorSchema,
14622
+ packageContributorSchema,
14623
+ setContributorSchema
14624
+ ])
14625
+ ).min(1).max(tileflowIconSourceLimit),
14626
+ winners: z8.array(
14627
+ tileflowRenderedIconIdentitySchema.omit({ kind: true }).extend({
14628
+ contributor: z8.number().int().min(0).max(tileflowIconSourceLimit - 1)
14629
+ })
14630
+ ).min(1).max(tileflowIconPackageLimits.maxIconCount)
14631
+ }).strict().superRefine((receipt, context) => {
14632
+ const expected = /* @__PURE__ */ new Map();
14633
+ const references = /* @__PURE__ */ new Set();
14634
+ const sets = /* @__PURE__ */ new Set();
14635
+ const versions = /* @__PURE__ */ new Set();
14636
+ const teams = /* @__PURE__ */ new Set();
14637
+ const teamSlugs = /* @__PURE__ */ new Set();
14638
+ for (const [ordinal, contributor] of receipt.contributors.entries()) {
14639
+ if (contributor.kind === "icon-set") {
14640
+ if (references.has(contributor.reference) || sets.has(contributor.setId) || versions.has(contributor.versionId)) {
14641
+ context.addIssue({
14642
+ code: "custom",
14643
+ path: ["contributors", ordinal],
14644
+ message: "Duplicate icon set dependency"
14645
+ });
14646
+ }
14647
+ references.add(contributor.reference);
14648
+ sets.add(contributor.setId);
14649
+ versions.add(contributor.versionId);
14650
+ teams.add(contributor.teamId);
14651
+ teamSlugs.add(contributor.reference.split("/")[0]);
14652
+ }
14653
+ for (const id of contributor.iconIds) expected.set(id, ordinal);
14654
+ }
14655
+ if (teams.size !== 1 || teamSlugs.size !== 1)
14656
+ context.addIssue({
14657
+ code: "custom",
14658
+ path: ["contributors"],
14659
+ message: "A shared composition must contain exact dependencies from one Team"
14660
+ });
14661
+ const names = [...expected.keys()].sort(compareCodeUnits8);
14662
+ if (names.length !== receipt.winners.length || receipt.winners.some(
14663
+ (winner, index) => names[index] !== winner.id || expected.get(winner.id) !== winner.contributor
14664
+ )) {
14665
+ context.addIssue({
14666
+ code: "custom",
14667
+ path: ["winners"],
14668
+ message: "Winners must exactly cover the sorted last-wins export closure"
14669
+ });
14670
+ }
14671
+ if (new TextEncoder().encode(serializeCanonicalJson(receipt)).byteLength > tileflowIconCompositionMaximumBytes) {
14672
+ context.addIssue({ code: "custom", message: "Composition receipt exceeds its byte limit" });
14673
+ }
14674
+ });
14675
+ function parseTileflowIconComposition(input) {
14676
+ const parsed = tileflowIconCompositionSchema.safeParse(input);
14677
+ if (!parsed.success)
14678
+ throw new TileflowIconSetError(
14679
+ "ICON_COMPOSITION_INVALID",
14680
+ "Invalid ordered icon composition receipt",
14681
+ { cause: parsed.error }
14682
+ );
14683
+ return parsed.data;
14684
+ }
14685
+
14515
14686
  // src/map-build-manifest.ts
14516
14687
  var tileflowMapRevisionSchemaVersion = 1;
14688
+ var tileflowSharedIconMapRevisionSchemaVersion = 2;
14517
14689
  var tileflowMapRevisionCanonicalization = "tileflow-canonical-json-v1";
14518
14690
  var tileflowMapBuildManifestSchemaVersion = 1;
14519
14691
  var tileflowMapBuildManifestFileName = "build-manifest.json";
@@ -14553,6 +14725,7 @@ async function createTileflowMapBuildManifest(maps, options = {}) {
14553
14725
  defaultTheme: map.defaultTheme,
14554
14726
  lineage,
14555
14727
  mapRevisionSha256,
14728
+ ...sourceAssets.iconComposition ? { mapRevisionSchemaVersion: 2 } : {},
14556
14729
  mapVersion: map.version,
14557
14730
  semanticCompiler: { ...tileflowSemanticCompilerIdentity },
14558
14731
  sourceAssets,
@@ -14628,6 +14801,8 @@ async function hashTileflowMapRevision(input, sourceAssets) {
14628
14801
  view: _view,
14629
14802
  ...effectiveCartography
14630
14803
  } = map;
14804
+ const normalizedSources = normalizeSourceAssets(sourceAssets);
14805
+ assertIconCompositionMatchesMap(map, normalizedSources);
14631
14806
  const revisionDocument = {
14632
14807
  canonicalization: tileflowMapRevisionCanonicalization,
14633
14808
  effectiveCartography: {
@@ -14635,10 +14810,11 @@ async function hashTileflowMapRevision(input, sourceAssets) {
14635
14810
  // The semantic language is map semantics. Its compiler ABI version remains a separate axis.
14636
14811
  semanticLanguage: tileflowSemanticCompilerIdentity.name
14637
14812
  },
14638
- schemaVersion: tileflowMapRevisionSchemaVersion,
14639
- sourceAssets: normalizeSourceAssets(sourceAssets)
14813
+ schemaVersion: normalizedSources.iconComposition ? tileflowSharedIconMapRevisionSchemaVersion : tileflowMapRevisionSchemaVersion,
14814
+ sourceAssets: normalizedSources
14640
14815
  };
14641
- return sha256Hex(`${tileflowMapRevisionDomain}${serializeCanonicalJson(revisionDocument)}`);
14816
+ const domain = normalizedSources.iconComposition ? "tileflow-map-revision-v2\0" : tileflowMapRevisionDomain;
14817
+ return sha256Hex(`${domain}${serializeCanonicalJson(revisionDocument)}`);
14642
14818
  }
14643
14819
  function normalizeRevisionCartography(input) {
14644
14820
  if (!input.sources) return input;
@@ -14700,6 +14876,7 @@ function normalizeLineage(input, map) {
14700
14876
  }
14701
14877
  function normalizeSourceAssets(input) {
14702
14878
  const icons = [...input.icons].map((icon) => {
14879
+ if (icon.kind === "rendered-icon") return tileflowRenderedIconIdentitySchema.parse(icon);
14703
14880
  assertSha256(icon.sha256, `icon ${icon.id}`);
14704
14881
  return { ...icon };
14705
14882
  }).sort((left, right) => compareCodeUnits8(left.id, right.id));
@@ -14713,7 +14890,10 @@ function normalizeSourceAssets(input) {
14713
14890
  if (new Set(fonts.map(fontIdentity)).size !== fonts.length) {
14714
14891
  throw new Error("Effective Tileflow font source identities must have unique faces.");
14715
14892
  }
14716
- return { fonts, icons };
14893
+ const iconComposition = input.iconComposition === void 0 ? void 0 : parseTileflowIconComposition(input.iconComposition);
14894
+ if (icons.some((icon) => icon.kind === "rendered-icon") && !iconComposition)
14895
+ throw new Error("Rendered icon identities require an explicit composition receipt");
14896
+ return { fonts, icons, ...iconComposition ? { iconComposition } : {} };
14717
14897
  }
14718
14898
  function fontIdentity(font) {
14719
14899
  return `${font.family}\0${font.style}\0${font.weight}`;
@@ -14728,6 +14908,37 @@ function assertPortableAssetName(value) {
14728
14908
  throw new Error(`Invalid Tileflow map asset name: ${value}`);
14729
14909
  }
14730
14910
  }
14911
+ function assertIconCompositionMatchesMap(map, sources) {
14912
+ const declared = map.icons ?? [];
14913
+ const references = collectTileflowIconSetReferences(declared);
14914
+ const receipt = sources.iconComposition;
14915
+ if (references.length === 0 && receipt === void 0) return;
14916
+ if (!receipt || receipt.contributors.length !== declared.length)
14917
+ throw new Error("Shared icon dependencies require their complete ordered composition receipt");
14918
+ for (const [ordinal, source] of declared.entries()) {
14919
+ const contributor = receipt.contributors[ordinal];
14920
+ if (typeof source === "string") {
14921
+ if (contributor.kind !== "local") throw new Error("Icon contributor kind mismatch");
14922
+ } else if (source.kind === "icon-set") {
14923
+ if (contributor.kind !== "icon-set" || contributor.reference !== source.reference)
14924
+ throw new Error("Icon dependency reference mismatch");
14925
+ } else if (contributor.kind !== "package" || contributor.package !== source.package)
14926
+ throw new Error("Package icon contributor mismatch");
14927
+ }
14928
+ if (sources.icons.length !== receipt.winners.length)
14929
+ throw new Error("Effective icon identities must cover the entire winner closure");
14930
+ for (const [ordinal, winner] of receipt.winners.entries()) {
14931
+ const identity = sources.icons[ordinal];
14932
+ if (identity.id !== winner.id) throw new Error("Effective icon identity mismatch");
14933
+ if (receipt.contributors[winner.contributor].kind === "icon-set") {
14934
+ if (identity.kind !== "rendered-icon" || identity.width !== winner.width || identity.height !== winner.height || identity.pixelSha256.oneX !== winner.pixelSha256.oneX || identity.pixelSha256.twoX !== winner.pixelSha256.twoX)
14935
+ throw new Error(
14936
+ "Shared icon identity must match verified rendered pixels, not original-source hashes"
14937
+ );
14938
+ } else if (identity.kind === "rendered-icon")
14939
+ throw new Error("Local originals must retain their existing source identity");
14940
+ }
14941
+ }
14731
14942
 
14732
14943
  // src/style-inspection.ts
14733
14944
  function createStyleWithInspection(config, options = {}) {
@@ -14889,6 +15100,7 @@ export {
14889
15100
  tileflowMapBuildManifestSchemaVersion,
14890
15101
  tileflowMapRevisionCanonicalization,
14891
15102
  tileflowMapRevisionSchemaVersion,
15103
+ tileflowSharedIconMapRevisionSchemaVersion,
14892
15104
  tileflowStyleInspectionSchemaVersion,
14893
15105
  validateTileflowDataCompatibility
14894
15106
  };