@getvitops/generator 3.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -354,7 +354,7 @@ declare const SiteFontSchema: z.ZodMiniObject<{
354
354
  }, z.z.core.$strip>>]>>;
355
355
  }, z.z.core.$strip>;
356
356
  /**
357
- * What `vitops notify` needs to tell search engines a deploy happened.
357
+ * What `vitops search notify` needs to tell search engines a deploy happened.
358
358
  *
359
359
  * Scoped by what search engines actually accept, which is narrower than it looks:
360
360
  * Google exposes **no** "request indexing" API (the Search Console button is not in
@@ -389,6 +389,41 @@ declare const IndexingSchema: z.ZodMiniObject<{
389
389
  }, z.z.core.$strip>>;
390
390
  priorityUrls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniURL>>;
391
391
  }, z.z.core.$strip>;
392
+ /**
393
+ * The ad platforms `vitops ads` can link a site to.
394
+ *
395
+ * A closed enum, mirroring `AD_PROVIDER_KEYS` in `@getvitops/utils/ads` — that
396
+ * module owns what each platform *can do* (whether it verifies a domain, what its
397
+ * tag is, which click ID it stamps), this owns what a config may *say*. Mirrored
398
+ * rather than derived because a `z.enum` needs literals to reach the published JSON
399
+ * Schema; `config.test.ts` asserts the two lists are the same set, so a provider
400
+ * added to one and not the other fails the build rather than silently getting no
401
+ * verification step and no tag.
402
+ */
403
+ declare const AD_PROVIDERS: readonly ["google", "meta", "linkedin", "reddit", "tiktok", "microsoft", "pinterest", "snapchat"];
404
+ type AdProvider = (typeof AD_PROVIDERS)[number];
405
+ /**
406
+ * One ad property this site is linked to.
407
+ *
408
+ * Facts, not prose — the same rule the legal block follows. This records *which*
409
+ * account and *which* tag id, and the platform capability table decides what can be
410
+ * done about them. It is also what finally lets the rest of the toolchain see an ad
411
+ * pixel: the generated cookie notice discloses its cookies, `vitops ads lint`
412
+ * checks its click ID is captured, and the consent gate is handed the cookie names
413
+ * to clear on revoke. A pixel pasted into a template is invisible to all three.
414
+ */
415
+ declare const AdPropertySchema: z.ZodMiniObject<{
416
+ accountId: z.ZodMiniOptional<z.ZodMiniString<string>>;
417
+ pixelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
418
+ conversionLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
419
+ domain: z.ZodMiniOptional<z.ZodMiniString<string>>;
420
+ domainVerification: z.ZodMiniOptional<z.ZodMiniString<string>>;
421
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
422
+ analytics: "analytics";
423
+ marketing: "marketing";
424
+ }>>;
425
+ enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
426
+ }, z.z.core.$strip>;
392
427
  /**
393
428
  * Which template set the generated legal documents are written against. This is
394
429
  * a closed enum rather than a free string because an unrecognised value would
@@ -398,6 +433,22 @@ declare const IndexingSchema: z.ZodMiniObject<{
398
433
  */
399
434
  declare const JURISDICTIONS: readonly ["ca"];
400
435
  type Jurisdiction = (typeof JURISDICTIONS)[number];
436
+ /**
437
+ * The country each template set frames cross-border transfers as *leaving*.
438
+ *
439
+ * A jurisdiction's own country is not a transfer, so this is what filters the
440
+ * disclosure lists — without it, `country: "Canada"` renders the incoherent
441
+ * "outside of Canada, including Canada".
442
+ *
443
+ * It belongs to the **jurisdiction**, not to `organization.address`: a `ca` policy
444
+ * says "outside of Canada" even for a business incorporated elsewhere. (The
445
+ * address drives a different sentence — the terms' governing-law clause, via
446
+ * `governingCountry`.) `satisfies` makes a new jurisdiction unable to forget it,
447
+ * the same guard style as `TEMPLATES`.
448
+ */
449
+ declare const JURISDICTION_COUNTRIES: {
450
+ ca: string;
451
+ };
401
452
  declare const SiteSectionSchema: z.ZodMiniObject<{
402
453
  defaultLocale: z.ZodMiniString<string>;
403
454
  locales: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
@@ -437,10 +488,15 @@ declare const SiteSectionSchema: z.ZodMiniObject<{
437
488
  }, z.z.core.$strip>>>;
438
489
  }, z.z.core.$strip>>>;
439
490
  cloudflare: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
491
+ searchConsole: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
492
+ delegatedOwners: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEmail>>;
493
+ fullUserGroup: z.ZodMiniOptional<z.ZodMiniEmail>;
494
+ }, z.z.core.$strip>>>;
440
495
  environments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
441
496
  url: z.ZodMiniURL;
442
497
  api: z.ZodMiniOptional<z.ZodMiniURL>;
443
498
  analytics: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
499
+ ads: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
444
500
  robots: z.ZodMiniOptional<z.ZodMiniString<string>>;
445
501
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
446
502
  }, z.z.core.$strip>>;
@@ -646,12 +702,44 @@ declare const SiteSectionSchema: z.ZodMiniObject<{
646
702
  }, z.z.core.$strip>>;
647
703
  }, z.z.core.$strip>>;
648
704
  notifications: z.ZodMiniOptional<z.ZodMiniObject<{
649
- email: z.ZodMiniOptional<z.ZodMiniEmail>;
705
+ email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEmail, z.ZodMiniObject<{
706
+ provider: z.ZodMiniLiteral<"cloudflare">;
707
+ to: z.ZodMiniOptional<z.ZodMiniEmail>;
708
+ from: z.ZodMiniOptional<z.ZodMiniEmail>;
709
+ fromName: z.ZodMiniOptional<z.ZodMiniString<string>>;
710
+ replyTo: z.ZodMiniOptional<z.ZodMiniEmail>;
711
+ binding: z.ZodMiniOptional<z.ZodMiniString<string>>;
712
+ }, z.z.core.$strip>]>>;
650
713
  }, z.z.core.$strip>>;
651
714
  tracking: z.ZodMiniOptional<z.ZodMiniObject<{
652
715
  enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
716
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
717
+ analytics: "analytics";
718
+ marketing: "marketing";
719
+ }>>;
653
720
  platforms: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
654
721
  }, z.z.core.$strip>>;
722
+ ads: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniEnum<{
723
+ google: "google";
724
+ meta: "meta";
725
+ linkedin: "linkedin";
726
+ reddit: "reddit";
727
+ tiktok: "tiktok";
728
+ microsoft: "microsoft";
729
+ pinterest: "pinterest";
730
+ snapchat: "snapchat";
731
+ }> & z.z.core.$partial, z.ZodMiniObject<{
732
+ accountId: z.ZodMiniOptional<z.ZodMiniString<string>>;
733
+ pixelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
734
+ conversionLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
735
+ domain: z.ZodMiniOptional<z.ZodMiniString<string>>;
736
+ domainVerification: z.ZodMiniOptional<z.ZodMiniString<string>>;
737
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
738
+ analytics: "analytics";
739
+ marketing: "marketing";
740
+ }>>;
741
+ enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
742
+ }, z.z.core.$strip>>>;
655
743
  security: z.ZodMiniOptional<z.ZodMiniObject<{
656
744
  turnstile: z.ZodMiniOptional<z.ZodMiniObject<{
657
745
  siteKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -682,6 +770,11 @@ declare const SiteSectionSchema: z.ZodMiniObject<{
682
770
  name: z.ZodMiniString<string>;
683
771
  purpose: z.ZodMiniString<string>;
684
772
  country: z.ZodMiniOptional<z.ZodMiniString<string>>;
773
+ storage: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
774
+ country: z.ZodMiniString<string>;
775
+ scope: z.ZodMiniOptional<z.ZodMiniString<string>>;
776
+ }, z.z.core.$strip>>>;
777
+ operatorCountry: z.ZodMiniOptional<z.ZodMiniString<string>>;
685
778
  privacyUrl: z.ZodMiniOptional<z.ZodMiniURL>;
686
779
  }, z.z.core.$strip>>>;
687
780
  }, z.z.core.$strip>>;
@@ -1098,10 +1191,15 @@ declare const ConfigSchema: z.ZodMiniObject<{
1098
1191
  }, z.z.core.$strip>>>;
1099
1192
  }, z.z.core.$strip>>>;
1100
1193
  cloudflare: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
1194
+ searchConsole: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
1195
+ delegatedOwners: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEmail>>;
1196
+ fullUserGroup: z.ZodMiniOptional<z.ZodMiniEmail>;
1197
+ }, z.z.core.$strip>>>;
1101
1198
  environments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
1102
1199
  url: z.ZodMiniURL;
1103
1200
  api: z.ZodMiniOptional<z.ZodMiniURL>;
1104
1201
  analytics: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1202
+ ads: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1105
1203
  robots: z.ZodMiniOptional<z.ZodMiniString<string>>;
1106
1204
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
1107
1205
  }, z.z.core.$strip>>;
@@ -1307,12 +1405,44 @@ declare const ConfigSchema: z.ZodMiniObject<{
1307
1405
  }, z.z.core.$strip>>;
1308
1406
  }, z.z.core.$strip>>;
1309
1407
  notifications: z.ZodMiniOptional<z.ZodMiniObject<{
1310
- email: z.ZodMiniOptional<z.ZodMiniEmail>;
1408
+ email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEmail, z.ZodMiniObject<{
1409
+ provider: z.ZodMiniLiteral<"cloudflare">;
1410
+ to: z.ZodMiniOptional<z.ZodMiniEmail>;
1411
+ from: z.ZodMiniOptional<z.ZodMiniEmail>;
1412
+ fromName: z.ZodMiniOptional<z.ZodMiniString<string>>;
1413
+ replyTo: z.ZodMiniOptional<z.ZodMiniEmail>;
1414
+ binding: z.ZodMiniOptional<z.ZodMiniString<string>>;
1415
+ }, z.z.core.$strip>]>>;
1311
1416
  }, z.z.core.$strip>>;
1312
1417
  tracking: z.ZodMiniOptional<z.ZodMiniObject<{
1313
1418
  enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1419
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
1420
+ analytics: "analytics";
1421
+ marketing: "marketing";
1422
+ }>>;
1314
1423
  platforms: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
1315
1424
  }, z.z.core.$strip>>;
1425
+ ads: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniEnum<{
1426
+ google: "google";
1427
+ meta: "meta";
1428
+ linkedin: "linkedin";
1429
+ reddit: "reddit";
1430
+ tiktok: "tiktok";
1431
+ microsoft: "microsoft";
1432
+ pinterest: "pinterest";
1433
+ snapchat: "snapchat";
1434
+ }> & z.z.core.$partial, z.ZodMiniObject<{
1435
+ accountId: z.ZodMiniOptional<z.ZodMiniString<string>>;
1436
+ pixelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
1437
+ conversionLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
1438
+ domain: z.ZodMiniOptional<z.ZodMiniString<string>>;
1439
+ domainVerification: z.ZodMiniOptional<z.ZodMiniString<string>>;
1440
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
1441
+ analytics: "analytics";
1442
+ marketing: "marketing";
1443
+ }>>;
1444
+ enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1445
+ }, z.z.core.$strip>>>;
1316
1446
  security: z.ZodMiniOptional<z.ZodMiniObject<{
1317
1447
  turnstile: z.ZodMiniOptional<z.ZodMiniObject<{
1318
1448
  siteKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -1343,6 +1473,11 @@ declare const ConfigSchema: z.ZodMiniObject<{
1343
1473
  name: z.ZodMiniString<string>;
1344
1474
  purpose: z.ZodMiniString<string>;
1345
1475
  country: z.ZodMiniOptional<z.ZodMiniString<string>>;
1476
+ storage: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
1477
+ country: z.ZodMiniString<string>;
1478
+ scope: z.ZodMiniOptional<z.ZodMiniString<string>>;
1479
+ }, z.z.core.$strip>>>;
1480
+ operatorCountry: z.ZodMiniOptional<z.ZodMiniString<string>>;
1346
1481
  privacyUrl: z.ZodMiniOptional<z.ZodMiniURL>;
1347
1482
  }, z.z.core.$strip>>>;
1348
1483
  }, z.z.core.$strip>>;
@@ -1405,12 +1540,14 @@ type OrganizationConfig = z.infer<typeof OrganizationSectionSchema>;
1405
1540
  type SiteSection = z.infer<typeof SiteSectionSchema>;
1406
1541
  /** One `fonts[]` entry — a serialisable projection of an Astro Fonts API family. */
1407
1542
  type SiteFont = z.infer<typeof SiteFontSchema>;
1408
- /** The `seo.indexing` block — what `vitops notify` reads. */
1543
+ /** The `seo.indexing` block — what `vitops search notify` reads. */
1409
1544
  type SiteIndexing = z.infer<typeof IndexingSchema>;
1410
1545
  /** IndexNow submission settings. The `key` is public by design. */
1411
1546
  type SiteIndexNow = z.infer<typeof IndexNowSchema>;
1412
1547
  /** Google Search Console property settings. The credential is never in the config. */
1413
1548
  type SiteSearchConsole = z.infer<typeof SearchConsoleSchema>;
1549
+ /** One `site.ads` entry — an ad property to link via `vitops ads setup`. */
1550
+ type SiteAdProperty = z.infer<typeof AdPropertySchema>;
1414
1551
  declare const CONFIG_SCHEMA_URL = "https://unpkg.com/@getvitops/generator/config.schema.json";
1415
1552
  /** The published JSON Schema (draft-2020-12), derived from the zod schema. */
1416
1553
  declare const configJsonSchema: {
@@ -1666,10 +1803,15 @@ declare const configJsonSchema: {
1666
1803
  }, z.z.core.$strip>>>;
1667
1804
  }, z.z.core.$strip>>>;
1668
1805
  cloudflare: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
1806
+ searchConsole: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
1807
+ delegatedOwners: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEmail>>;
1808
+ fullUserGroup: z.ZodMiniOptional<z.ZodMiniEmail>;
1809
+ }, z.z.core.$strip>>>;
1669
1810
  environments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
1670
1811
  url: z.ZodMiniURL;
1671
1812
  api: z.ZodMiniOptional<z.ZodMiniURL>;
1672
1813
  analytics: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1814
+ ads: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1673
1815
  robots: z.ZodMiniOptional<z.ZodMiniString<string>>;
1674
1816
  variant: z.ZodMiniOptional<z.ZodMiniString<string>>;
1675
1817
  }, z.z.core.$strip>>;
@@ -1875,12 +2017,44 @@ declare const configJsonSchema: {
1875
2017
  }, z.z.core.$strip>>;
1876
2018
  }, z.z.core.$strip>>;
1877
2019
  notifications: z.ZodMiniOptional<z.ZodMiniObject<{
1878
- email: z.ZodMiniOptional<z.ZodMiniEmail>;
2020
+ email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEmail, z.ZodMiniObject<{
2021
+ provider: z.ZodMiniLiteral<"cloudflare">;
2022
+ to: z.ZodMiniOptional<z.ZodMiniEmail>;
2023
+ from: z.ZodMiniOptional<z.ZodMiniEmail>;
2024
+ fromName: z.ZodMiniOptional<z.ZodMiniString<string>>;
2025
+ replyTo: z.ZodMiniOptional<z.ZodMiniEmail>;
2026
+ binding: z.ZodMiniOptional<z.ZodMiniString<string>>;
2027
+ }, z.z.core.$strip>]>>;
1879
2028
  }, z.z.core.$strip>>;
1880
2029
  tracking: z.ZodMiniOptional<z.ZodMiniObject<{
1881
2030
  enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2031
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
2032
+ analytics: "analytics";
2033
+ marketing: "marketing";
2034
+ }>>;
1882
2035
  platforms: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
1883
2036
  }, z.z.core.$strip>>;
2037
+ ads: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniEnum<{
2038
+ google: "google";
2039
+ meta: "meta";
2040
+ linkedin: "linkedin";
2041
+ reddit: "reddit";
2042
+ tiktok: "tiktok";
2043
+ microsoft: "microsoft";
2044
+ pinterest: "pinterest";
2045
+ snapchat: "snapchat";
2046
+ }> & z.z.core.$partial, z.ZodMiniObject<{
2047
+ accountId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2048
+ pixelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2049
+ conversionLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
2050
+ domain: z.ZodMiniOptional<z.ZodMiniString<string>>;
2051
+ domainVerification: z.ZodMiniOptional<z.ZodMiniString<string>>;
2052
+ category: z.ZodMiniOptional<z.ZodMiniEnum<{
2053
+ analytics: "analytics";
2054
+ marketing: "marketing";
2055
+ }>>;
2056
+ enabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2057
+ }, z.z.core.$strip>>>;
1884
2058
  security: z.ZodMiniOptional<z.ZodMiniObject<{
1885
2059
  turnstile: z.ZodMiniOptional<z.ZodMiniObject<{
1886
2060
  siteKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -1911,6 +2085,11 @@ declare const configJsonSchema: {
1911
2085
  name: z.ZodMiniString<string>;
1912
2086
  purpose: z.ZodMiniString<string>;
1913
2087
  country: z.ZodMiniOptional<z.ZodMiniString<string>>;
2088
+ storage: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
2089
+ country: z.ZodMiniString<string>;
2090
+ scope: z.ZodMiniOptional<z.ZodMiniString<string>>;
2091
+ }, z.z.core.$strip>>>;
2092
+ operatorCountry: z.ZodMiniOptional<z.ZodMiniString<string>>;
1914
2093
  privacyUrl: z.ZodMiniOptional<z.ZodMiniURL>;
1915
2094
  }, z.z.core.$strip>>>;
1916
2095
  }, z.z.core.$strip>>;
@@ -2284,12 +2463,216 @@ declare function roleColorUtilities(roles: readonly FunctionalRole[], utilities:
2284
2463
  declare function generate(options: GenerateOptions): Promise<GenerateResult>;
2285
2464
  //#endregion
2286
2465
  //#region src/docs.d.ts
2466
+ interface JsonSchemaNode {
2467
+ type?: string;
2468
+ description?: string;
2469
+ properties?: Record<string, JsonSchemaNode>;
2470
+ required?: string[];
2471
+ additionalProperties?: JsonSchemaNode | boolean;
2472
+ anyOf?: JsonSchemaNode[];
2473
+ items?: JsonSchemaNode;
2474
+ enum?: unknown[];
2475
+ }
2476
+ /**
2477
+ * The inline markdown the schema's `desc()` text actually uses, as HTML. Closed
2478
+ * on purpose, exactly like the legal renderer's subset: these strings are
2479
+ * authored in `schema.ts`, so the set is knowable rather than guessed at.
2480
+ *
2481
+ * Escaping happens before any markup is emitted, so a description containing `<`
2482
+ * cannot inject tags — several do (`<canonical>/<key>.txt`). Exported because the
2483
+ * only safe place for this is one tested function; a caller doing its own escaping
2484
+ * is how one of them eventually doesn't.
2485
+ *
2486
+ * **Code spans are lifted out FIRST, and that is load-bearing rather than tidy.**
2487
+ * `colors.utilities` describes the target families as `` `bg-*` ``, `` `text-*` ``,
2488
+ * `` `border-*` `` — literal asterisk WILDCARDS. Run emphasis over the raw string
2489
+ * and the `*` closing `bg-*` pairs with the one closing `text-*`, wrapping the
2490
+ * text between two unrelated utilities in `<em>` and eating both asterisks. The
2491
+ * prose then silently describes families that don't exist. Lifting code spans
2492
+ * first makes emphasis structurally unable to see inside them.
2493
+ */
2494
+ declare const renderInlineMarkdown: (s: string) => string;
2495
+ interface SchemaTreeOptions {
2496
+ /** Dotted id prefix, so two trees on one page can't collide. */
2497
+ idPrefix?: string;
2498
+ /** Nesting cap. Unlike the markdown walk there is no reason to truncate. */
2499
+ maxDepth?: number;
2500
+ /**
2501
+ * Dotted paths to render but not descend into.
2502
+ *
2503
+ * Exists for one real case: the project config declares `designSystem.themes`
2504
+ * as a looser shape than `DesignSystemSchema`, because the full one is applied
2505
+ * separately by `resolveTheme`. Its embedded copy is therefore an
2506
+ * APPROXIMATION — measurably so, missing the descriptions for `colors`,
2507
+ * `colors.palette`, `colors.roles` and `colors.utilities`. Rendering it as the
2508
+ * token reference would quietly document the colour system less well than the
2509
+ * design-system schema does, so a caller prunes it here and renders
2510
+ * `jsonSchema` alongside instead.
2511
+ */
2512
+ prune?: readonly string[];
2513
+ }
2514
+ interface SchemaTreeNode {
2515
+ /** Field name, or `<name>` / `[items]` for a map value or array item. */
2516
+ label: string;
2517
+ /** Human type label — `object`, `map`, `string | number`, `one of`. */
2518
+ type: string;
2519
+ required: boolean;
2520
+ /** Raw schema description (the closed inline-markdown subset), if any. */
2521
+ description?: string;
2522
+ /**
2523
+ * Dotted config path (`site.analytics.clarityId`). Absent when the node is not
2524
+ * addressable: a pseudo-label, or a path already claimed by an earlier node.
2525
+ */
2526
+ id?: string;
2527
+ /** True for an `anyOf` branch, which has no name of its own. */
2528
+ variant?: boolean;
2529
+ children: SchemaTreeNode[];
2530
+ }
2531
+ /**
2532
+ * Walk a JSON Schema into tree DATA.
2533
+ *
2534
+ * The same walk that produces the `authoring.md` / `config.md` bullet lists,
2535
+ * returned as a node model instead of a string. Returning data rather than markup
2536
+ * is deliberate and follows `roleColorUtilities()`: the *shape* of the tree is one
2537
+ * decision, and each medium renders it — markdown for agents, an accessible
2538
+ * `<details>` tree for the docs site. An HTML-emitting version here would be a
2539
+ * second source of the markup contract for `<wc-tree>` to drift from.
2540
+ *
2541
+ * Ids are dotted paths so a field can be linked to directly. Map-value and
2542
+ * array-item pseudo-labels are skipped in the path: `site.dns.records` reads
2543
+ * better than `site.dns.<domain>.records`, and neither `<domain>` nor `[items]`
2544
+ * is a real key.
2545
+ */
2546
+ declare function schemaTreeNodes(schema: JsonSchemaNode, opts?: SchemaTreeOptions): SchemaTreeNode[];
2287
2547
  /**
2288
2548
  * Build the OKF docs bundle for a config. Returns a `{ relPath: content }` map;
2289
2549
  * the caller writes it wherever the bundle should live (e.g. `<outDir>/docs`).
2290
2550
  */
2291
2551
  declare function generateDocs(ds: DesignSystem, assetsDir: string): Record<string, string>;
2292
2552
  //#endregion
2553
+ //#region src/tiers.d.ts
2554
+ /**
2555
+ * Which tiers provide each pattern, and which call to make.
2556
+ *
2557
+ * The toolkit ships four tiers that COMPOSE — CSS framework classes, Lit web
2558
+ * components, Astro components, Bricks elements — and the composition is what a
2559
+ * consumer actually needs. For a tree: `.tree` styles it, `<Tree />` generates the
2560
+ * markup, `<wc-tree>` enhances it. This file is the single source for that, and
2561
+ * `tiers.test.ts` holds it to the files on disk.
2562
+ *
2563
+ * **Authored, not derived, and that is deliberate.** Name convention carries most
2564
+ * of it (`patterns/<name>.css` ↔ `WC<Name>.ts` → `wc-<name>` ↔
2565
+ * `bricks/elements/<name>.php`) but breaks where it matters:
2566
+ *
2567
+ * - `splitter.css` hosts TWO components (`wc-split-panel`, `wc-image-compare`);
2568
+ * - `anchor-link.css` provides `.link`, whose config pattern is `link`;
2569
+ * - `tag.css` carries parts for THREE config patterns (`badge`, `tag`, `status`);
2570
+ * - `layout.css` (a root partial, not under `patterns/`) provides `.split` and
2571
+ * `.centered`, both of which have Bricks elements;
2572
+ * - `forms.css`, `nav.css`, `navbar.css`, `navshell.css` each serve several tiers.
2573
+ *
2574
+ * A derivation would need an exceptions table longer than the rule, and a rename
2575
+ * would silently drop a link instead of failing. So it is authored, and the guards
2576
+ * make omission a build failure rather than a missing docs row.
2577
+ *
2578
+ * **The composition rule this encodes** (see `AGENTS.md`, tier 3): an Astro
2579
+ * component emits the `<wc-*>` tag with the accessible fallback INSIDE it. So
2580
+ * `<Tree />` is the whole call — wrapping it in your own `<wc-tree>` nests two
2581
+ * elements on one tree. `astro.wraps` records which case each component is, because
2582
+ * it varies: `Tree` and `CookieConsent` wrap a web component, while `Details`,
2583
+ * `Drawer`, `Popover`, `NavShell` and `Subgrid` emit tier-1 markup with no web
2584
+ * component at all. That cannot be inferred from the taxonomy.
2585
+ */
2586
+ /** A pattern's CSS. `generated` means `design-system.json`'s `patterns.items`. */
2587
+ interface TierCss {
2588
+ /**
2589
+ * Hand-written partial, relative to `packages/core/css/` — usually
2590
+ * `patterns/<name>.css`, occasionally a root partial such as `layout.css`.
2591
+ * Absent when the pattern is generated CSS only.
2592
+ */
2593
+ partial?: string;
2594
+ /** Representative classes. Not exhaustive — the class reference enumerates. */
2595
+ classes: string[];
2596
+ /**
2597
+ * True when the pattern is **config-authored** — its CSS comes from
2598
+ * `patterns.items.<name>`, so it gets the token cascade, `states`, role variants
2599
+ * and `BASE_HOOK` override vars. False means a purely structural partial with
2600
+ * none of those.
2601
+ *
2602
+ * Note `patterns.items` is CONSUMER-authored: `defaultConfig()` ships only
2603
+ * `btn`/`cta`/`card`, and a consumer declares whatever else they need. So this
2604
+ * flag records which patterns are *of that kind* — the reference set is this
2605
+ * repo's own `src/design-system.json`, which is what the docs render from — not a
2606
+ * promise about any particular consumer's config.
2607
+ */
2608
+ generated: boolean;
2609
+ }
2610
+ interface TierWc {
2611
+ tag: string;
2612
+ /** In `elements.js`. False = its own bundle, or not shipped at all. */
2613
+ registered: boolean;
2614
+ /** What JS adds over the fallback. The reason the tier exists for this pattern. */
2615
+ adds: string;
2616
+ /** Set when the element ships somewhere other than `elements.js`. */
2617
+ bundle?: string;
2618
+ }
2619
+ interface TierAstro {
2620
+ /** Import specifier, e.g. `@getvitops/astro/components/Tree.astro`. */
2621
+ component: string;
2622
+ /**
2623
+ * `wc` — emits the `<wc-*>` tag with the fallback inside, so this one call is the
2624
+ * whole composition. `css` — emits tier-1 markup; there is no web component.
2625
+ */
2626
+ wraps: 'wc' | 'css';
2627
+ }
2628
+ interface TierEntry {
2629
+ css: TierCss;
2630
+ wc?: TierWc;
2631
+ /**
2632
+ * Astro components for this pattern. An array because a pattern can ship more
2633
+ * than one — `navshell` has both `NavShell` and `NavShellToggle`, since the
2634
+ * toggle must be placeable outside the shell.
2635
+ */
2636
+ astro?: TierAstro[];
2637
+ /** Bricks element `$name`, e.g. `vitops-carousel`. */
2638
+ bricks?: string;
2639
+ /** The one line an agent needs: what to actually write. */
2640
+ use: string;
2641
+ }
2642
+ declare const TIERS: Record<string, TierEntry>;
2643
+ /** Pattern names, sorted — a stable order for docs and tests. */
2644
+ declare const TIER_NAMES: readonly string[];
2645
+ /** Every `wc-*` tag the manifest knows, whether shipped in `elements.js` or not. */
2646
+ declare function tierTags(): {
2647
+ tag: string;
2648
+ registered: boolean;
2649
+ pattern: string;
2650
+ }[];
2651
+ /** The four tiers, as a projection axis. */
2652
+ type Tier = 'css' | 'wc' | 'astro' | 'bricks';
2653
+ /** A pattern paired with its entry — what one tier's projection iterates. */
2654
+ interface TierProjection {
2655
+ name: string;
2656
+ entry: TierEntry;
2657
+ }
2658
+ /**
2659
+ * The patterns one tier provides, in `TIER_NAMES` order.
2660
+ *
2661
+ * Every renderer goes through this rather than filtering `TIERS` itself: the docs
2662
+ * bundle projects all four tiers into one table for agents, the docsite projects
2663
+ * each tier as its own page for humans, and they must agree about which patterns
2664
+ * are in a tier. Five copies of `.filter(e => e.wc)` would agree until one of them
2665
+ * didn't.
2666
+ *
2667
+ * `css` needs a predicate rather than a presence check, which is the non-obvious
2668
+ * part. `TierEntry.css` is required, so *every* entry has one — including the
2669
+ * editor-v2 track, whose entries carry `c([])`: no partial, no classes, not
2670
+ * generated. Treating the field's presence as membership would list four patterns
2671
+ * on the CSS page with nothing to show for them, and `color-wheel` genuinely has
2672
+ * no CSS. The other three tiers are optional fields, so presence is the test.
2673
+ */
2674
+ declare function tierPatterns(tier: Tier): TierProjection[];
2675
+ //#endregion
2293
2676
  //#region ../../node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts
2294
2677
  /**
2295
2678
  * Icon dimensions.
@@ -2537,7 +2920,7 @@ declare function loadIconSvg(qualified: string, opts?: {
2537
2920
  *
2538
2921
  * `data-brx-theme` is Bricks' own attribute — Bricks sets it, so it's what the
2539
2922
  * WordPress target needs. Nothing sets it anywhere else, which meant the dark
2540
- * flip was unreachable outside Bricks: the shipped `<color-scheme-toggle>` web
2923
+ * flip was unreachable outside Bricks: the shipped `<wc-color-scheme-toggle>` web
2541
2924
  * component writes `documentElement.dataset.theme` (i.e. `data-theme`), so
2542
2925
  * clicking "Dark" changed an attribute no rule matched. Matching both makes the
2543
2926
  * component work on every target without changing what Bricks already does.
@@ -2602,13 +2985,48 @@ declare const BASE_HOOK: Record<string, string>;
2602
2985
  declare const TW_CLASH: ReadonlySet<string>;
2603
2986
  //#endregion
2604
2987
  //#region src/legal/providers.d.ts
2988
+ /** One place a provider holds information, and which information if not all of it. */
2989
+ interface ProcessorStorage {
2990
+ /** Reads inside a sentence: "…including the United States". */
2991
+ country: string;
2992
+ /**
2993
+ * Reads after "in the case of". Present means this location holds only SOME of
2994
+ * what the provider receives, which is a narrower claim than an unscoped entry —
2995
+ * so the template gives it its own sentence rather than folding it into the list,
2996
+ * where a reader would take it to cover everything.
2997
+ */
2998
+ scope?: string | undefined;
2999
+ }
2605
3000
  interface Processor {
2606
3001
  /** The provider as a reader would recognise it. */
2607
3002
  name: string;
2608
3003
  /** Reads after "for": "…to Stripe for payment processing". */
2609
3004
  purpose: string;
2610
- /** Reads inside a sentence: "…including the United States". */
3005
+ /**
3006
+ * Shorthand asserting BOTH `storage` and `operatorCountry` are this one country.
3007
+ *
3008
+ * Kept for the common case (and because it is public API), but note it is the
3009
+ * field whose *meaning* was never defined — its old doc comment described how it
3010
+ * READ, not what it asserted, which is how one string came to stand for two
3011
+ * different facts. Prefer the explicit pair when they differ.
3012
+ */
2611
3013
  country?: string | undefined;
3014
+ /**
3015
+ * Where the information actually rests. Feeds the "stored or processed outside
3016
+ * of <jurisdiction>" disclosure and nothing else.
3017
+ */
3018
+ storage?: ProcessorStorage[] | undefined;
3019
+ /**
3020
+ * The jurisdiction that can compel this provider to produce the information —
3021
+ * where it is established, or from which it is controlled. Reads after "the laws
3022
+ * of".
3023
+ *
3024
+ * A separate fact from `storage`, and the one privacy law actually turns on: the
3025
+ * OPC's concern is foreign *access*, not foreign storage. Azure in a Canadian
3026
+ * region is `storage: [{ country: 'Canada' }]`, `operatorCountry: 'the United
3027
+ * States'` — the bytes never move and US law still reaches them.
3028
+ */
3029
+ operatorCountry?: string | undefined;
2612
3030
  privacyUrl?: string | undefined;
2613
3031
  /**
2614
3032
  * Cookies this provider sets. An empty array is meaningful and not the same as
@@ -2669,28 +3087,28 @@ declare const KNOWN_PROCESSORS: {
2669
3087
  turnstile: {
2670
3088
  name: string;
2671
3089
  purpose: string;
2672
- country: string;
3090
+ operatorCountry: string;
2673
3091
  privacyUrl: string;
2674
3092
  cookies: string[];
2675
3093
  };
2676
3094
  cloudflare: {
2677
3095
  name: string;
2678
3096
  purpose: string;
2679
- country: string;
3097
+ operatorCountry: string;
2680
3098
  privacyUrl: string;
2681
3099
  cookies: never[];
2682
3100
  };
2683
3101
  vercel: {
2684
3102
  name: string;
2685
3103
  purpose: string;
2686
- country: string;
3104
+ operatorCountry: string;
2687
3105
  privacyUrl: string;
2688
3106
  cookies: never[];
2689
3107
  };
2690
3108
  netlify: {
2691
3109
  name: string;
2692
3110
  purpose: string;
2693
- country: string;
3111
+ operatorCountry: string;
2694
3112
  privacyUrl: string;
2695
3113
  cookies: never[];
2696
3114
  };
@@ -2712,6 +3130,19 @@ declare function detectProcessorKeys(cfg: Config): KnownProcessorKey[];
2712
3130
  * an explicit declaration is a statement of fact we have no grounds to drop.
2713
3131
  */
2714
3132
  declare function resolveProcessors(cfg: Config): Processor[];
3133
+ /**
3134
+ * Processors the config discloses but places nowhere.
3135
+ *
3136
+ * Such a processor cannot appear in the transfer disclosure — there is nothing true
3137
+ * to say about it — and today it vanishes from that section in silence, which is the
3138
+ * tidy-looking failure. Names only, and deliberately NOT on `PolicyVars`: that type
3139
+ * is the facts a template renders from, and a document must not editorialise about
3140
+ * its own gaps. The CLI reports these on stderr instead.
3141
+ *
3142
+ * Not a `validateConfig` error either: a bare `{ name, purpose }` validates today,
3143
+ * so rejecting it would make this a breaking change.
3144
+ */
3145
+ declare function processorsMissingLocation(cfg: Config): string[];
2715
3146
  //#endregion
2716
3147
  //#region src/legal/derive.d.ts
2717
3148
  /**
@@ -2757,7 +3188,54 @@ interface PolicyVars {
2757
3188
  * not a cookie choice, and listing it in a cookie notice reads as padding. */
2758
3189
  cookieOptOutOptions: string[];
2759
3190
  processors: Processor[];
2760
- /** Reads after "including": "…the United States and the European Union". */
3191
+ /**
3192
+ * Cookies the site sets itself.
3193
+ *
3194
+ * Separate from `processors`, which are third parties — no provider table would
3195
+ * ever name a first-party cookie, so without this the notice can say "we do not
3196
+ * set cookies" while `_ac` sits in the visitor's browser.
3197
+ */
3198
+ firstPartyCookies: {
3199
+ name: string;
3200
+ purpose: string;
3201
+ retention: string;
3202
+ }[];
3203
+ /**
3204
+ * The country this document frames transfers as *leaving*, from the jurisdiction
3205
+ * rather than the org's address — a `ca` policy says "outside of Canada" even for
3206
+ * a business incorporated elsewhere. (`governingCountry` is the address, and
3207
+ * drives a different sentence: the terms' governing-law clause.)
3208
+ */
3209
+ jurisdictionCountry: string;
3210
+ /**
3211
+ * Reads after "including": foreign countries where information rests, with no
3212
+ * category attached — the broad claim.
3213
+ */
3214
+ storageCountries: string | undefined;
3215
+ /**
3216
+ * Foreign storage locations holding only SOME categories. Structured rather than
3217
+ * pre-joined, because the connective ("in the case of") is the template's word,
3218
+ * not a fact. Disjoint from `storageCountries`: a country already claimed
3219
+ * unscoped is never repeated here, since the unscoped claim is the broader one.
3220
+ */
3221
+ scopedStorage: {
3222
+ country: string;
3223
+ scope: string;
3224
+ }[];
3225
+ /**
3226
+ * Reads after "the laws of": foreign jurisdictions that can compel a provider to
3227
+ * produce information, EXCLUDING any already named in `storageCountries` —
3228
+ * saying US law reaches information already disclosed as stored in the US adds a
3229
+ * sentence and no fact.
3230
+ */
3231
+ operatorCountries: string | undefined;
3232
+ /**
3233
+ * Reads after "including": "…the United States and the European Union".
3234
+ *
3235
+ * @deprecated Split into `storageCountries` and `operatorCountries`, which keep
3236
+ * residency and legal reach apart. Retained, and still every country the field
3237
+ * ever named, so a consumer's own template renders what it always rendered.
3238
+ */
2761
3239
  countries: string | undefined;
2762
3240
  consentModel: 'opt-in' | 'opt-out' | 'none';
2763
3241
  cookieCategories: string[];
@@ -2865,5 +3343,5 @@ declare function generateLegal(cfg: Config, opts?: GenerateLegalOptions): Record
2865
3343
  */
2866
3344
  declare function defaultConfig(): DesignSystem;
2867
3345
  //#endregion
2868
- export { BASE_HOOK, type Block, CONFIG_SCHEMA_URL, CONTRAST, type ColorUtility, type Config, ConfigSchema, type ConfigValidationResult, type ContactObject, DARK_SEL, DOC_ORDER, DOC_SLUGS, type DesignSystem, DesignSystemSchema, type DocSet, type ExpandedHue, type Format, type FunctionalRole, type GenerateLegalOptions, type GenerateOptions, type GenerateResult, type IconSpriteOptions, type IconSpriteResult, JURISDICTIONS, type Jurisdiction, KNOWN_PROCESSORS, type KnownProcessorKey, type LegalDoc, type LegalOutput, NUMERIC_STEPS, type OrganizationConfig, type PolicyVars, type PostalAddress, type Processor, REQUIRED_ROLES, ROLE_TOKEN_KEYS, type ResolvedInput, type RoleKind, type RoleSpec, SCHEMA_URL, type SiteFont, SiteFontSchema, type SiteIndexNow, type SiteIndexing, type SiteSearchConsole, type SiteSection, type Span, type StylesheetFormat, TEMPLATES, TW_CLASH, type ValidationResult, buildIconSprite, configJsonSchema, deepMerge, defaultConfig, derivePolicyVars, detectProcessorKeys, enabledDocs, expandPalette, functionalRole, generate, generateDocs, generateLegal, isConfig, jsonSchema, loadIconSvg, parseMarkdown, renderMarkdown, renderNodes, resolveConfig, resolveInput, resolvePrivacyContact, resolveProcessors, resolveTheme, roleColorUtilities, roleHue, roleKind, spriteId, stripNulls, toContentNodes, toHtmlFragment, toPortableText, tokenClass, tokenVar, validate, validateConfig };
3346
+ export { AD_PROVIDERS, type AdProvider, BASE_HOOK, type Block, CONFIG_SCHEMA_URL, CONTRAST, type ColorUtility, type Config, ConfigSchema, type ConfigValidationResult, type ContactObject, DARK_SEL, DOC_ORDER, DOC_SLUGS, type DesignSystem, DesignSystemSchema, type DocSet, type ExpandedHue, type Format, type FunctionalRole, type GenerateLegalOptions, type GenerateOptions, type GenerateResult, type IconSpriteOptions, type IconSpriteResult, JURISDICTIONS, JURISDICTION_COUNTRIES, type JsonSchemaNode, type Jurisdiction, KNOWN_PROCESSORS, type KnownProcessorKey, type LegalDoc, type LegalOutput, NUMERIC_STEPS, type OrganizationConfig, type PolicyVars, type PostalAddress, type Processor, type ProcessorStorage, REQUIRED_ROLES, ROLE_TOKEN_KEYS, type ResolvedInput, type RoleKind, type RoleSpec, SCHEMA_URL, type SchemaTreeNode, type SchemaTreeOptions, type SiteAdProperty, type SiteFont, SiteFontSchema, type SiteIndexNow, type SiteIndexing, type SiteSearchConsole, type SiteSection, type Span, type StylesheetFormat, TEMPLATES, TIERS, TIER_NAMES, TW_CLASH, type Tier, type TierAstro, type TierCss, type TierEntry, type TierProjection, type TierWc, type ValidationResult, buildIconSprite, configJsonSchema, deepMerge, defaultConfig, derivePolicyVars, detectProcessorKeys, enabledDocs, expandPalette, functionalRole, generate, generateDocs, generateLegal, isConfig, jsonSchema, loadIconSvg, parseMarkdown, processorsMissingLocation, renderInlineMarkdown, renderMarkdown, renderNodes, resolveConfig, resolveInput, resolvePrivacyContact, resolveProcessors, resolveTheme, roleColorUtilities, roleHue, roleKind, schemaTreeNodes, spriteId, stripNulls, tierPatterns, tierTags, toContentNodes, toHtmlFragment, toPortableText, tokenClass, tokenVar, validate, validateConfig };
2869
3347
  //# sourceMappingURL=index.d.mts.map