@getvitops/generator 8.2.0-alpha.0 → 8.2.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/CHANGELOG.md +467 -25
- package/assets/css/patterns/banner.css +20 -0
- package/assets/css/patterns/copy.css +5 -0
- package/assets/css/patterns/forms.css +5 -0
- package/assets/css/patterns/marquee.css +16 -0
- package/assets/css/patterns/splitter.css +11 -0
- package/assets/css/patterns/table.css +10 -0
- package/assets/js/consent.js +1 -1
- package/assets/js/elements.js +4 -4
- package/assets/js/polyfills/adoptedStyleSheets.js +1 -1
- package/assets/js/polyfills/css-anchor-positioning-fn.js +2 -2
- package/assets/js/polyfills/popover.js +2 -2
- package/config.schema.json +131 -110
- package/dist/config-BfcWKH-5.mjs +1743 -0
- package/dist/config-BfcWKH-5.mjs.map +1 -0
- package/dist/{config-DvbYx3Gi.mjs → config-Bhg3Xv3D.mjs} +10 -207
- package/dist/config-Bhg3Xv3D.mjs.map +1 -0
- package/dist/config.d.mts +81 -194
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +1 -1
- package/dist/{icons-sprite-Bf_KmKeX.d.mts → icons-sprite-CQ5Zj4go.d.mts} +4 -6
- package/dist/icons-sprite-CQ5Zj4go.d.mts.map +1 -0
- package/dist/icons-sprite.d.mts +1 -1
- package/dist/icons-sprite.mjs +1 -2
- package/dist/index.d.mts +19 -34
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +53 -38
- package/dist/index.mjs.map +1 -1
- package/dist/{schema-Dmq1J7S3.d.mts → schema-BV2n2phj.d.mts} +2 -3
- package/dist/{schema-Dmq1J7S3.d.mts.map → schema-BV2n2phj.d.mts.map} +1 -1
- package/dist/{tokens-8SXMDAd1.d.mts → tokens-BzBbTeTi.d.mts} +2 -6
- package/dist/tokens-BzBbTeTi.d.mts.map +1 -0
- package/dist/{tokens-zi594IZ3.mjs → tokens-C1RJwFeG.mjs} +3 -5
- package/dist/{tokens-zi594IZ3.mjs.map → tokens-C1RJwFeG.mjs.map} +1 -1
- package/dist/tokens.d.mts +1 -1
- package/dist/tokens.mjs +1 -1
- package/package.json +6 -5
- package/dist/config-DvbYx3Gi.mjs.map +0 -1
- package/dist/icons-sprite-Bf_KmKeX.d.mts.map +0 -1
- package/dist/tokens-8SXMDAd1.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as ValidationResult, i as SCHEMA_URL, n as DesignSystemSchema, o as jsonSchema, r as SCHEMA_LOCAL_PATH, s as validate, t as DesignSystem } from "./schema-
|
|
1
|
+
import { a as ValidationResult, i as SCHEMA_URL, n as DesignSystemSchema, o as jsonSchema, r as SCHEMA_LOCAL_PATH, s as validate, t as DesignSystem } from "./schema-BV2n2phj.mjs";
|
|
2
2
|
import { AD_PROVIDERS, AdProvider, BIGIN_DATA_CENTERS, CONFIG_SCHEMA_LOCAL_PATH, CONFIG_SCHEMA_URL, CONFIG_VERSION, CRM_PROVIDERS, Config, ConfigSchema, ConfigValidationResult, ContactObject, CrmProviderConfig, JURISDICTIONS, JURISDICTION_COUNTRIES, Jurisdiction, OrganizationConfig, PLAN_CAPABILITIES, PlanCapability, PostalAddress, ResolvedInput, SiteAdProperty, SiteExperiment, SiteFont, SiteFontSchema, SiteIndexNow, SiteIndexing, SitePlan, SiteReviewLocation, SiteReviews, SiteSearchConsole, SiteSearchConsoleSetup, SiteSection, configJsonSchema, deepMerge, designSystemPath, experimentDimensionWarnings, formatConfig, getAt, isConfig, mergePatch, resolveConfig, resolveInput, resolvePrivacyContact, resolveTheme, setAt, stripNulls, validateConfig } from "./config.mjs";
|
|
3
|
-
import { a as spriteId, i as loadIconSvg, n as IconSpriteResult, r as buildIconSprite, t as IconSpriteOptions } from "./icons-sprite-
|
|
4
|
-
import { C as roleHue, S as TYPO_KEYMAP, _ as DARK_SEL, a as RoleKind, b as RoleSpec, c as expandPalette, f as patchToOverrideCss, g as BASE_HOOK, h as validateColorContract, i as NUMERIC_STEPS, l as functionalRole, m as tokenVar, n as ExpandedHue, o as buildReverseIndex, p as tokenClass, r as FunctionalRole, s as checkContrast, t as CONTRAST, v as REQUIRED_ROLES, w as roleKind, x as TW_CLASH, y as ROLE_TOKEN_KEYS } from "./tokens-
|
|
3
|
+
import { a as spriteId, i as loadIconSvg, n as IconSpriteResult, r as buildIconSprite, t as IconSpriteOptions } from "./icons-sprite-CQ5Zj4go.mjs";
|
|
4
|
+
import { C as roleHue, S as TYPO_KEYMAP, _ as DARK_SEL, a as RoleKind, b as RoleSpec, c as expandPalette, f as patchToOverrideCss, g as BASE_HOOK, h as validateColorContract, i as NUMERIC_STEPS, l as functionalRole, m as tokenVar, n as ExpandedHue, o as buildReverseIndex, p as tokenClass, r as FunctionalRole, s as checkContrast, t as CONTRAST, v as REQUIRED_ROLES, w as roleKind, x as TW_CLASH, y as ROLE_TOKEN_KEYS } from "./tokens-BzBbTeTi.mjs";
|
|
5
5
|
import { ContentNode } from "@getvitops/utils";
|
|
6
|
-
//#region src/generate.d.ts
|
|
7
6
|
type Format = 'bricks' | 'css' | 'tailwind' | 'design';
|
|
8
7
|
/**
|
|
9
8
|
* Formats that emit a stylesheet. `design` is the odd one out — it emits a
|
|
@@ -93,8 +92,6 @@ interface ColorUtility {
|
|
|
93
92
|
*/
|
|
94
93
|
export declare function roleColorUtilities(roles: readonly FunctionalRole[], utilities: readonly string[]): ColorUtility[];
|
|
95
94
|
export declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region src/docs.d.ts
|
|
98
95
|
interface JsonSchemaNode {
|
|
99
96
|
type?: string;
|
|
100
97
|
description?: string;
|
|
@@ -181,8 +178,6 @@ export declare function schemaTreeNodes(schema: JsonSchemaNode, opts?: SchemaTre
|
|
|
181
178
|
* the caller writes it wherever the bundle should live (e.g. `<outDir>/docs`).
|
|
182
179
|
*/
|
|
183
180
|
export declare function generateDocs(ds: DesignSystem, assetsDir: string): Record<string, string>;
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region src/tiers.d.ts
|
|
186
181
|
/**
|
|
187
182
|
* Which tiers provide each pattern, and which call to make.
|
|
188
183
|
*
|
|
@@ -268,6 +263,19 @@ interface TierEntry {
|
|
|
268
263
|
astro?: TierAstro[];
|
|
269
264
|
/** Bricks element `$name`, e.g. `vitops-carousel`. */
|
|
270
265
|
bricks?: string;
|
|
266
|
+
/**
|
|
267
|
+
* `@getvitops/emdash` Portable Text block `_type`s that render this pattern, e.g.
|
|
268
|
+
* `vitops.carousel`. An array because one pattern can have several blocks
|
|
269
|
+
* (`details` has a single disclosure and an accordion group) and one block can span
|
|
270
|
+
* patterns (`vitops.actionLink` is `link`, `btn` and `cta`).
|
|
271
|
+
*
|
|
272
|
+
* Tier 3, a sibling of `astro` and `bricks`: a block is a platform wrapper that an
|
|
273
|
+
* editor drops into a page, and each one is an adapter over this entry's Astro
|
|
274
|
+
* component. `@getvitops/emdash`'s `blocks.test.ts` is the drift guard — it lives
|
|
275
|
+
* there because the generator cannot import the plugin (the plugin imports the
|
|
276
|
+
* generator), so the check runs from the side that can see both.
|
|
277
|
+
*/
|
|
278
|
+
emdash?: string[];
|
|
271
279
|
/** The one line an agent needs: what to actually write. */
|
|
272
280
|
use: string;
|
|
273
281
|
}
|
|
@@ -283,13 +291,13 @@ export declare function tierTags(): {
|
|
|
283
291
|
/**
|
|
284
292
|
* The projection axis: four keys, THREE tiers.
|
|
285
293
|
*
|
|
286
|
-
* `astro` and `
|
|
287
|
-
* platform, not levels 3 and
|
|
294
|
+
* `astro`, `bricks` and `emdash` are all the platform-wrapper tier — siblings chosen by
|
|
295
|
+
* platform, not levels 3, 4 and 5. They are separate keys because they are separate
|
|
288
296
|
* packages with separate tables, and no project uses both. Anything rendering a
|
|
289
297
|
* tier NUMBER must map them to the same one; deriving it from this union's order
|
|
290
298
|
* is what put Bricks at "tier 4" on the docsite.
|
|
291
299
|
*/
|
|
292
|
-
type Tier = 'css' | 'wc' | 'astro' | 'bricks';
|
|
300
|
+
type Tier = 'css' | 'wc' | 'astro' | 'bricks' | 'emdash';
|
|
293
301
|
/** A pattern paired with its entry — what one tier's projection iterates. */
|
|
294
302
|
interface TierProjection {
|
|
295
303
|
name: string;
|
|
@@ -312,8 +320,6 @@ interface TierProjection {
|
|
|
312
320
|
* no CSS. The other three tiers are optional fields, so presence is the test.
|
|
313
321
|
*/
|
|
314
322
|
export declare function tierPatterns(tier: Tier): TierProjection[];
|
|
315
|
-
//#endregion
|
|
316
|
-
//#region src/token-refs.d.ts
|
|
317
323
|
/**
|
|
318
324
|
* Old-grammar token name → its 1.0 replacement, for the roles this config
|
|
319
325
|
* declares.
|
|
@@ -323,8 +329,6 @@ export declare function tierPatterns(tier: Tier): TierProjection[];
|
|
|
323
329
|
* is why nothing detected these before.
|
|
324
330
|
*/
|
|
325
331
|
export declare function movedTokens(roles: Record<string, RoleSpec>): Record<string, string>;
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/legal/providers.d.ts
|
|
328
332
|
/** One place a provider holds information, and which information if not all of it. */
|
|
329
333
|
interface ProcessorStorage {
|
|
330
334
|
/** Reads inside a sentence: "…including the United States". */
|
|
@@ -499,8 +503,6 @@ export declare function resolveProcessors(cfg: Config): Processor[];
|
|
|
499
503
|
* so rejecting it would make this a breaking change.
|
|
500
504
|
*/
|
|
501
505
|
export declare function processorsMissingLocation(cfg: Config): string[];
|
|
502
|
-
//#endregion
|
|
503
|
-
//#region src/legal/derive.d.ts
|
|
504
506
|
/**
|
|
505
507
|
* The facts every legal template renders from.
|
|
506
508
|
*
|
|
@@ -597,17 +599,9 @@ interface PolicyVars {
|
|
|
597
599
|
cookieCategories: string[];
|
|
598
600
|
}
|
|
599
601
|
export declare function derivePolicyVars(cfg: Config): PolicyVars;
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region src/legal/templates/cookies.ca.d.ts
|
|
602
602
|
declare function cookiesCa(v: PolicyVars): string;
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region src/legal/templates/privacy.ca.d.ts
|
|
605
603
|
declare function privacyCa(v: PolicyVars): string;
|
|
606
|
-
//#endregion
|
|
607
|
-
//#region src/legal/templates/terms.ca.d.ts
|
|
608
604
|
declare function termsCa(v: PolicyVars): string;
|
|
609
|
-
//#endregion
|
|
610
|
-
//#region src/legal/templates/index.d.ts
|
|
611
605
|
type LegalDoc = 'privacy' | 'terms' | 'cookies';
|
|
612
606
|
type DocSet = Record<LegalDoc, (v: PolicyVars) => string>;
|
|
613
607
|
export declare const TEMPLATES: {
|
|
@@ -621,8 +615,6 @@ export declare const TEMPLATES: {
|
|
|
621
615
|
export declare const DOC_ORDER: LegalDoc[];
|
|
622
616
|
/** Output filename stem per document — also the Bricks shortcode's allowlist. */
|
|
623
617
|
export declare const DOC_SLUGS: Record<LegalDoc, string>;
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region src/legal/render.d.ts
|
|
626
618
|
interface Span {
|
|
627
619
|
text: string;
|
|
628
620
|
strong?: boolean;
|
|
@@ -664,8 +656,6 @@ export declare function toHtmlFragment(blocks: Block[]): string;
|
|
|
664
656
|
* unchanged config produces an identical seed and a clean diff.
|
|
665
657
|
*/
|
|
666
658
|
export declare function toPortableText(blocks: Block[], prefix: string): unknown[];
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/legal/index.d.ts
|
|
669
659
|
type LegalOutput = 'md' | 'html' | 'portable-text';
|
|
670
660
|
interface GenerateLegalOptions {
|
|
671
661
|
/** Which documents to render. Defaults to those enabled in the config. */
|
|
@@ -690,8 +680,6 @@ export declare function renderNodes(cfg: Config, doc: LegalDoc): ContentNode[];
|
|
|
690
680
|
* id so a caller can write the map verbatim.
|
|
691
681
|
*/
|
|
692
682
|
export declare function generateLegal(cfg: Config, opts?: GenerateLegalOptions): Record<string, string>;
|
|
693
|
-
//#endregion
|
|
694
|
-
//#region src/robots.d.ts
|
|
695
683
|
interface RenderRobotsOptions {
|
|
696
684
|
/** Which `site.environments` entry to render for. Default `'production'`. */
|
|
697
685
|
env?: string;
|
|
@@ -709,8 +697,6 @@ interface RenderRobotsOptions {
|
|
|
709
697
|
* the same default `@astrojs/sitemap` produces.
|
|
710
698
|
*/
|
|
711
699
|
export declare function renderRobotsTxt(cfg: Config, options?: RenderRobotsOptions): string;
|
|
712
|
-
//#endregion
|
|
713
|
-
//#region src/index.d.ts
|
|
714
700
|
/**
|
|
715
701
|
* A minimal but complete starter design system, used by `vitops init`. It
|
|
716
702
|
* validates against the schema and generates real output in every format, so a
|
|
@@ -732,6 +718,5 @@ export declare function defaultSiteConfig(opts?: {
|
|
|
732
718
|
url?: string | undefined;
|
|
733
719
|
locale?: string | undefined;
|
|
734
720
|
}): Config;
|
|
735
|
-
//#endregion
|
|
736
721
|
export { AD_PROVIDERS, type AdProvider, BASE_HOOK, BIGIN_DATA_CENTERS, type Block, CONFIG_SCHEMA_LOCAL_PATH, CONFIG_SCHEMA_URL, CONFIG_VERSION, CONTRAST, CRM_PROVIDERS, type ColorUtility, type Config, ConfigSchema, type ConfigValidationResult, type ContactObject, type CrmProviderConfig, DARK_SEL, 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, type KnownProcessorKey, type LegalDoc, type LegalOutput, NUMERIC_STEPS, type OrganizationConfig, PLAN_CAPABILITIES, type PlanCapability, type PolicyVars, type PostalAddress, type Processor, type ProcessorStorage, REQUIRED_ROLES, ROLE_TOKEN_KEYS, type RenderRobotsOptions, type ResolvedInput, type RoleKind, type RoleSpec, SCHEMA_LOCAL_PATH, SCHEMA_URL, type SchemaTreeNode, type SchemaTreeOptions, type SiteAdProperty, type SiteExperiment, type SiteFont, SiteFontSchema, type SiteIndexNow, type SiteIndexing, type SitePlan, type SiteReviewLocation, type SiteReviews, type SiteSearchConsole, type SiteSearchConsoleSetup, type SiteSection, type Span, type StylesheetFormat, TW_CLASH, TYPO_KEYMAP, type Tier, type TierAstro, type TierCss, type TierEntry, type TierProjection, type TierWc, type ValidationResult, buildIconSprite, buildReverseIndex, checkContrast, configJsonSchema, deepMerge, designSystemPath, expandPalette, experimentDimensionWarnings, formatConfig, functionalRole, getAt, isConfig, jsonSchema, loadIconSvg, mergePatch, patchToOverrideCss, resolveConfig, resolveInput, resolvePrivacyContact, resolveTheme, roleHue, roleKind, setAt, spriteId, stripNulls, tokenClass, tokenVar, validate, validateColorContract, validateConfig };
|
|
737
722
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/generate.ts","../src/docs.ts","../src/tiers.ts","../src/token-refs.ts","../src/legal/providers.ts","../src/legal/derive.ts","../src/legal/templates/cookies.ca.ts","../src/legal/templates/privacy.ca.ts","../src/legal/templates/terms.ca.ts","../src/legal/templates/index.ts","../src/legal/render.ts","../src/legal/index.ts","../src/robots.ts","../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/generate.ts","../src/docs.ts","../src/tiers.ts","../src/token-refs.ts","../src/legal/providers.ts","../src/legal/derive.ts","../src/legal/templates/cookies.ca.ts","../src/legal/templates/privacy.ca.ts","../src/legal/templates/terms.ca.ts","../src/legal/templates/index.ts","../src/legal/render.ts","../src/legal/index.ts","../src/robots.ts","../src/index.ts"],"mappings":"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"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as SYSTEM_DARK_SEL, a as expandPalette, b as roleHue, c as monotonicityErrors, d as tokenVar, f as validateColorContract, g as ROLE_TOKEN_KEYS, h as REQUIRED_ROLES, i as checkContrast, l as patchToOverrideCss, m as DARK_SEL, n as NUMERIC_STEPS, o as functionalRole, p as BASE_HOOK, r as buildReverseIndex, s as ladderWarnings, t as CONTRAST, u as tokenClass, v as TW_CLASH, x as roleKind, y as TYPO_KEYMAP } from "./tokens-
|
|
2
|
-
import { A as jsonSchema, C as resolveTheme, D as DesignSystemSchema, E as validateConfig, M as movedTokens, O as SCHEMA_LOCAL_PATH, S as resolvePrivacyContact, T as stripNulls, _ as getAt, a as CONFIG_VERSION, b as resolveConfig, c as JURISDICTIONS, d as SiteFontSchema, f as configJsonSchema, g as formatConfig, h as experimentDimensionWarnings, i as CONFIG_SCHEMA_URL, j as validate, k as SCHEMA_URL, l as JURISDICTION_COUNTRIES, m as designSystemPath, n as BIGIN_DATA_CENTERS, o as CRM_PROVIDERS, p as deepMerge, r as CONFIG_SCHEMA_LOCAL_PATH, s as ConfigSchema, t as AD_PROVIDERS, u as PLAN_CAPABILITIES, v as isConfig, w as setAt, x as resolveInput, y as mergePatch } from "./config-
|
|
1
|
+
import { _ as SYSTEM_DARK_SEL, a as expandPalette, b as roleHue, c as monotonicityErrors, d as tokenVar, f as validateColorContract, g as ROLE_TOKEN_KEYS, h as REQUIRED_ROLES, i as checkContrast, l as patchToOverrideCss, m as DARK_SEL, n as NUMERIC_STEPS, o as functionalRole, p as BASE_HOOK, r as buildReverseIndex, s as ladderWarnings, t as CONTRAST, u as tokenClass, v as TW_CLASH, x as roleKind, y as TYPO_KEYMAP } from "./tokens-C1RJwFeG.mjs";
|
|
2
|
+
import { A as jsonSchema, C as resolveTheme, D as DesignSystemSchema, E as validateConfig, M as movedTokens, O as SCHEMA_LOCAL_PATH, S as resolvePrivacyContact, T as stripNulls, _ as getAt, a as CONFIG_VERSION, b as resolveConfig, c as JURISDICTIONS, d as SiteFontSchema, f as configJsonSchema, g as formatConfig, h as experimentDimensionWarnings, i as CONFIG_SCHEMA_URL, j as validate, k as SCHEMA_URL, l as JURISDICTION_COUNTRIES, m as designSystemPath, n as BIGIN_DATA_CENTERS, o as CRM_PROVIDERS, p as deepMerge, r as CONFIG_SCHEMA_LOCAL_PATH, s as ConfigSchema, t as AD_PROVIDERS, u as PLAN_CAPABILITIES, v as isConfig, w as setAt, x as resolveInput, y as mergePatch } from "./config-BfcWKH-5.mjs";
|
|
3
3
|
import { buildIconSprite, loadIconSvg, spriteId } from "./icons-sprite.mjs";
|
|
4
4
|
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
@@ -10,7 +10,7 @@ import { AD_PLATFORMS, AD_PROVIDER_KEYS } from "@getvitops/utils/ads";
|
|
|
10
10
|
import { generateIconInclude, nodesToHtml, resolveIcon, t } from "@getvitops/utils";
|
|
11
11
|
import { resolveSitemapUrl } from "@getvitops/utils/indexing";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/tiers.ts
|
|
14
14
|
const c = (classes, partial, generated = false) => ({
|
|
15
15
|
...partial ? { partial } : {},
|
|
16
16
|
classes,
|
|
@@ -48,6 +48,7 @@ const TIERS = {
|
|
|
48
48
|
use: "`<Tree items={…} />` — it emits `<wc-tree>` itself, so do NOT add your own wrapper."
|
|
49
49
|
},
|
|
50
50
|
carousel: {
|
|
51
|
+
emdash: ["vitops.carousel"],
|
|
51
52
|
css: c([
|
|
52
53
|
"carousel",
|
|
53
54
|
"carousel__track",
|
|
@@ -65,6 +66,7 @@ const TIERS = {
|
|
|
65
66
|
use: "`<Carousel slides={…} label=\"…\" />` — it emits `<wc-carousel>` itself, so do NOT add your own wrapper. `.carousel` is the shell and `.carousel__track` the scroller; add `loop` for the cloned infinite strip (`autoplay` implies it)."
|
|
66
67
|
},
|
|
67
68
|
gallery: {
|
|
69
|
+
emdash: ["vitops.gallery"],
|
|
68
70
|
css: c([
|
|
69
71
|
"gallery",
|
|
70
72
|
"gallery__item",
|
|
@@ -94,6 +96,7 @@ const TIERS = {
|
|
|
94
96
|
use: "`<wc-entries>` around `<h3>` + `<dl>` pairs. The tier-2 exemplar: semantic pairs with no JS, a table with it."
|
|
95
97
|
},
|
|
96
98
|
copy: {
|
|
99
|
+
emdash: ["vitops.copyButton"],
|
|
97
100
|
css: c([
|
|
98
101
|
"copy",
|
|
99
102
|
"copy__button",
|
|
@@ -133,6 +136,7 @@ const TIERS = {
|
|
|
133
136
|
use: "`<wc-split-panel>` with two children. Unenhanced they simply stack."
|
|
134
137
|
},
|
|
135
138
|
"image-compare": {
|
|
139
|
+
emdash: ["vitops.imageCompare"],
|
|
136
140
|
css: c([
|
|
137
141
|
"image-compare",
|
|
138
142
|
"image-compare__before",
|
|
@@ -147,6 +151,7 @@ const TIERS = {
|
|
|
147
151
|
use: "`<wc-image-compare>` with two images. Both are visible without JS."
|
|
148
152
|
},
|
|
149
153
|
marquee: {
|
|
154
|
+
emdash: ["vitops.marquee"],
|
|
150
155
|
css: c([
|
|
151
156
|
"marquee",
|
|
152
157
|
"marquee__content",
|
|
@@ -272,6 +277,7 @@ const TIERS = {
|
|
|
272
277
|
use: "Not shipped. See `color-wheel`."
|
|
273
278
|
},
|
|
274
279
|
details: {
|
|
280
|
+
emdash: ["vitops.details", "vitops.accordion"],
|
|
275
281
|
css: c([
|
|
276
282
|
"details",
|
|
277
283
|
"details-trigger",
|
|
@@ -318,6 +324,7 @@ const TIERS = {
|
|
|
318
324
|
use: "`<Subgrid>` — emits `<ul class=\"subgrid\" role=\"list\">`; author `<li class=\"card subgrid-card\">` items yourself, so tranches align across the set."
|
|
319
325
|
},
|
|
320
326
|
card: {
|
|
327
|
+
emdash: ["vitops.cards"],
|
|
321
328
|
css: c(["card"], "patterns/card.css", true),
|
|
322
329
|
wc: {
|
|
323
330
|
tag: "wc-cards",
|
|
@@ -338,6 +345,7 @@ const TIERS = {
|
|
|
338
345
|
use: "`<Icon name=\"menu\" />`. Names are semantic and resolve per configured set; a name containing `:` passes through."
|
|
339
346
|
},
|
|
340
347
|
split: {
|
|
348
|
+
emdash: ["vitops.hero"],
|
|
341
349
|
css: c([
|
|
342
350
|
"split",
|
|
343
351
|
"split-1-2",
|
|
@@ -375,14 +383,17 @@ const TIERS = {
|
|
|
375
383
|
use: "`.split-link` — a link plus a disclosure toggle. No JS."
|
|
376
384
|
},
|
|
377
385
|
btn: {
|
|
386
|
+
emdash: ["vitops.actionLink"],
|
|
378
387
|
css: c(["btn"], void 0, true),
|
|
379
388
|
use: "`<button>` gets it with no class; `.btn` carries it to other tags. `fill: false`, so states drive `color`."
|
|
380
389
|
},
|
|
381
390
|
cta: {
|
|
391
|
+
emdash: ["vitops.actionLink"],
|
|
382
392
|
css: c(["cta", "cta-danger"], void 0, true),
|
|
383
393
|
use: "`.cta` on any element — usually `<a>`, since a CTA navigates. Filled, with role variants."
|
|
384
394
|
},
|
|
385
395
|
link: {
|
|
396
|
+
emdash: ["vitops.actionLink"],
|
|
386
397
|
css: c([
|
|
387
398
|
"link",
|
|
388
399
|
"skip-link",
|
|
@@ -481,6 +492,7 @@ const TIERS = {
|
|
|
481
492
|
use: "`.navbar` with `--start/--center/--end`."
|
|
482
493
|
},
|
|
483
494
|
banner: {
|
|
495
|
+
emdash: ["vitops.banner"],
|
|
484
496
|
css: c([
|
|
485
497
|
"banner",
|
|
486
498
|
"banner__content",
|
|
@@ -648,6 +660,7 @@ function tierPatterns(tier) {
|
|
|
648
660
|
case "wc": return !!e.wc;
|
|
649
661
|
case "astro": return !!e.astro?.length;
|
|
650
662
|
case "bricks": return !!e.bricks;
|
|
663
|
+
case "emdash": return !!e.emdash?.length;
|
|
651
664
|
}
|
|
652
665
|
};
|
|
653
666
|
return TIER_NAMES.filter((name) => has(TIERS[name])).map((name) => ({
|
|
@@ -656,8 +669,7 @@ function tierPatterns(tier) {
|
|
|
656
669
|
}));
|
|
657
670
|
}
|
|
658
671
|
|
|
659
|
-
|
|
660
|
-
//#region src/docs.ts
|
|
672
|
+
// src/docs.ts
|
|
661
673
|
/**
|
|
662
674
|
* OKF documentation bundle generator (ported from the repo's `generate-docs.ts`).
|
|
663
675
|
*
|
|
@@ -2267,7 +2279,8 @@ function renderComponentsConcept(ds) {
|
|
|
2267
2279
|
"css",
|
|
2268
2280
|
"wc",
|
|
2269
2281
|
"astro",
|
|
2270
|
-
"bricks"
|
|
2282
|
+
"bricks",
|
|
2283
|
+
"emdash"
|
|
2271
2284
|
].filter((t) => tierPatterns(t).some((p) => p.name === name));
|
|
2272
2285
|
const overview = TIER_NAMES.map((name) => {
|
|
2273
2286
|
const e = TIERS[name];
|
|
@@ -2280,6 +2293,7 @@ function renderComponentsConcept(ds) {
|
|
|
2280
2293
|
}).join("\n");
|
|
2281
2294
|
const astro = tierPatterns("astro").flatMap(({ name, entry }) => entry.astro.map((a) => `| ${code(a.component)} | ${code(name)} | ${a.wraps === "wc" ? `the ${code(`<${entry.wc.tag}>`)} tag, fallback inside` : "tier-1 markup — no web component"} |`)).join("\n");
|
|
2282
2295
|
const bricks = tierPatterns("bricks").map(({ name, entry }) => `| ${code(entry.bricks)} | ${code(name)} |`).join("\n");
|
|
2296
|
+
const emdash = tierPatterns("emdash").flatMap(({ name, entry }) => entry.emdash.map((type) => `| ${code(type)} | ${code(name)} | ${entry.astro?.length ? list(entry.astro.map((a) => `<${a.component.split("/").pop().replace(".astro", "")} />`)) : "tier-1 markup"} |`)).join("\n");
|
|
2283
2297
|
const css = tierPatterns("css").map(({ name, entry }) => {
|
|
2284
2298
|
const c = entry.css;
|
|
2285
2299
|
const config = !c.generated ? "—" : declared.has(name) ? "declared" : "**absent from this config — no CSS emitted**";
|
|
@@ -2290,13 +2304,14 @@ function renderComponentsConcept(ds) {
|
|
|
2290
2304
|
return `${frontmatter({
|
|
2291
2305
|
type: "Design Concept",
|
|
2292
2306
|
title: "Vitops components — which tier provides a pattern, and what to write",
|
|
2293
|
-
description: "Every UI pattern across the three tiers (CSS classes, wc-* web components, and the platform wrappers: Astro components and
|
|
2307
|
+
description: "Every UI pattern across the three tiers (CSS classes, wc-* web components, and the platform wrappers: Astro components, Bricks elements and EmDash blocks): which tiers provide it, which call to make, and how the tiers compose.",
|
|
2294
2308
|
resource: DS_PATH,
|
|
2295
2309
|
tags: [
|
|
2296
2310
|
"components",
|
|
2297
2311
|
"web-components",
|
|
2298
2312
|
"astro",
|
|
2299
2313
|
"bricks",
|
|
2314
|
+
"emdash",
|
|
2300
2315
|
"tiers",
|
|
2301
2316
|
"design-system"
|
|
2302
2317
|
]
|
|
@@ -2313,13 +2328,17 @@ A pattern is provided by up to **three tiers**, and they **compose** rather than
|
|
|
2313
2328
|
3. **Platform wrappers** — authoring conveniences that generate the correct markup at build
|
|
2314
2329
|
time, using the classes and elements of tiers 1 and 2. They must not require runtime JS.
|
|
2315
2330
|
Where a pattern has a web component, the wrapper emits that tag **with the accessible
|
|
2316
|
-
fallback inside it**.
|
|
2331
|
+
fallback inside it**. Three platforms:
|
|
2317
2332
|
- **Astro components** (${code("@getvitops/astro")})
|
|
2318
2333
|
- **Bricks elements** (WordPress / Bricks Builder)
|
|
2334
|
+
- **EmDash blocks** (${code("@getvitops/emdash")}) — Portable Text blocks an editor inserts;
|
|
2335
|
+
each is an adapter over the pattern's Astro component
|
|
2319
2336
|
|
|
2320
|
-
**Astro and
|
|
2321
|
-
platform you are on —
|
|
2322
|
-
|
|
2337
|
+
**Astro, Bricks and EmDash are the same tier**, not tiers 3, 4 and 5. They are siblings chosen
|
|
2338
|
+
by which platform you are on — neither outranks the others. (An EmDash site is an Astro site,
|
|
2339
|
+
so it uses the Astro components directly in templates and the blocks inside editor content.)
|
|
2340
|
+
The tables below give them separate columns because they are separate packages, not separate
|
|
2341
|
+
levels.
|
|
2323
2342
|
|
|
2324
2343
|
## Choosing
|
|
2325
2344
|
|
|
@@ -2366,6 +2385,16 @@ Controls, defaults and seeded children for each are in [the elements reference](
|
|
|
2366
2385
|
| --- | --- |
|
|
2367
2386
|
${bricks}
|
|
2368
2387
|
|
|
2388
|
+
## EmDash blocks
|
|
2389
|
+
|
|
2390
|
+
Portable Text block ${code("_type")}s from ${code("@getvitops/emdash")}. Repeating patterns are
|
|
2391
|
+
repeater fields. A block cannot contain other blocks — a section holding a card and a button is a
|
|
2392
|
+
${code("blocks")} field in the EmDash schema, not a Portable Text block.
|
|
2393
|
+
|
|
2394
|
+
| Block | Pattern | Renders via |
|
|
2395
|
+
| --- | --- | --- |
|
|
2396
|
+
${emdash}
|
|
2397
|
+
|
|
2369
2398
|
## CSS
|
|
2370
2399
|
|
|
2371
2400
|
${code("patterns.items")} patterns get the full token cascade — ${code("base")} declarations,
|
|
@@ -3113,8 +3142,7 @@ function generateDocs(ds, assetsDir) {
|
|
|
3113
3142
|
};
|
|
3114
3143
|
}
|
|
3115
3144
|
|
|
3116
|
-
|
|
3117
|
-
//#region src/design-md.ts
|
|
3145
|
+
// src/design-md.ts
|
|
3118
3146
|
const q = (s) => `"${s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
|
|
3119
3147
|
/** Keys are quoted only when they would not survive as a plain scalar. */
|
|
3120
3148
|
const key = (k) => /^[A-Za-z_][A-Za-z0-9_-]*$/.test(k) ? k : q(k);
|
|
@@ -3541,8 +3569,7 @@ across every pattern. Focus rings are never removed, only restyled.
|
|
|
3541
3569
|
`;
|
|
3542
3570
|
}
|
|
3543
3571
|
|
|
3544
|
-
|
|
3545
|
-
//#region src/legal/providers.ts
|
|
3572
|
+
// src/legal/providers.ts
|
|
3546
3573
|
/**
|
|
3547
3574
|
* What the config already tells us about third parties that receive personal
|
|
3548
3575
|
* information.
|
|
@@ -3839,8 +3866,7 @@ function biginLocation(processor, site) {
|
|
|
3839
3866
|
} : processor;
|
|
3840
3867
|
}
|
|
3841
3868
|
|
|
3842
|
-
|
|
3843
|
-
//#region src/legal/derive.ts
|
|
3869
|
+
// src/legal/derive.ts
|
|
3844
3870
|
/**
|
|
3845
3871
|
* Site config → the facts a legal document asserts.
|
|
3846
3872
|
*
|
|
@@ -4105,8 +4131,7 @@ function derivePolicyVars(cfg) {
|
|
|
4105
4131
|
};
|
|
4106
4132
|
}
|
|
4107
4133
|
|
|
4108
|
-
|
|
4109
|
-
//#region src/legal/render.ts
|
|
4134
|
+
// src/legal/render.ts
|
|
4110
4135
|
/**
|
|
4111
4136
|
* The legal documents are authored in markdown; consumers need markdown, HTML
|
|
4112
4137
|
* and EmDash Portable Text. This parses the markdown **once** into a small block
|
|
@@ -4316,8 +4341,7 @@ function toPortableText(blocks, prefix) {
|
|
|
4316
4341
|
return out;
|
|
4317
4342
|
}
|
|
4318
4343
|
|
|
4319
|
-
|
|
4320
|
-
//#region src/legal/templates/shared.ts
|
|
4344
|
+
// src/legal/templates/shared.ts
|
|
4321
4345
|
/**
|
|
4322
4346
|
* The banner every generated document opens with.
|
|
4323
4347
|
*
|
|
@@ -4340,8 +4364,7 @@ function updatedLine(v) {
|
|
|
4340
4364
|
return v.lastUpdated ? `\nLast updated: ${v.lastUpdated}\n` : "";
|
|
4341
4365
|
}
|
|
4342
4366
|
|
|
4343
|
-
|
|
4344
|
-
//#region src/legal/templates/cookies.ca.ts
|
|
4367
|
+
// src/legal/templates/cookies.ca.ts
|
|
4345
4368
|
/**
|
|
4346
4369
|
* Cookie notice — Canada.
|
|
4347
4370
|
*
|
|
@@ -4424,8 +4447,7 @@ ${bullets(v.cookieCategories)}
|
|
|
4424
4447
|
`;
|
|
4425
4448
|
}
|
|
4426
4449
|
|
|
4427
|
-
|
|
4428
|
-
//#region src/legal/templates/privacy.ca.ts
|
|
4450
|
+
// src/legal/templates/privacy.ca.ts
|
|
4429
4451
|
/**
|
|
4430
4452
|
* Privacy policy — Canada (PIPEDA).
|
|
4431
4453
|
*
|
|
@@ -4585,8 +4607,7 @@ function operatorClause(v) {
|
|
|
4585
4607
|
return `Some of the service providers we use are established in, or controlled from, jurisdictions outside of Canada, including ${v.operatorCountries}. Personal information those providers handle on our behalf may be subject to the laws of those jurisdictions even when it is stored in Canada.`;
|
|
4586
4608
|
}
|
|
4587
4609
|
|
|
4588
|
-
|
|
4589
|
-
//#region src/legal/templates/terms.ca.ts
|
|
4610
|
+
// src/legal/templates/terms.ca.ts
|
|
4590
4611
|
function termsCa(v) {
|
|
4591
4612
|
return `# Terms of Service
|
|
4592
4613
|
${updatedLine(v)}
|
|
@@ -4655,8 +4676,7 @@ function governingLaw(v) {
|
|
|
4655
4676
|
return v.governingProvince ? `${v.governingProvince} and the federal laws of ${v.governingCountry} applicable therein` : v.governingCountry;
|
|
4656
4677
|
}
|
|
4657
4678
|
|
|
4658
|
-
|
|
4659
|
-
//#region src/legal/templates/index.ts
|
|
4679
|
+
// src/legal/templates/index.ts
|
|
4660
4680
|
const TEMPLATES = { ca: {
|
|
4661
4681
|
privacy: privacyCa,
|
|
4662
4682
|
terms: termsCa,
|
|
@@ -4675,8 +4695,7 @@ const DOC_SLUGS = {
|
|
|
4675
4695
|
cookies: "cookie-notice"
|
|
4676
4696
|
};
|
|
4677
4697
|
|
|
4678
|
-
|
|
4679
|
-
//#region src/legal/index.ts
|
|
4698
|
+
// src/legal/index.ts
|
|
4680
4699
|
/**
|
|
4681
4700
|
* Generate a site's legal documents from its config.
|
|
4682
4701
|
*
|
|
@@ -4740,8 +4759,7 @@ function generateLegal(cfg, opts = {}) {
|
|
|
4740
4759
|
return out;
|
|
4741
4760
|
}
|
|
4742
4761
|
|
|
4743
|
-
|
|
4744
|
-
//#region src/generate.ts
|
|
4762
|
+
// src/generate.ts
|
|
4745
4763
|
/**
|
|
4746
4764
|
* Pure, parameterized port of the Vitops design-system generator.
|
|
4747
4765
|
*
|
|
@@ -6057,8 +6075,7 @@ function loadConfigFile(input, siteEnv) {
|
|
|
6057
6075
|
return resolveConfig(raw, siteEnv);
|
|
6058
6076
|
}
|
|
6059
6077
|
|
|
6060
|
-
|
|
6061
|
-
//#region src/robots.ts
|
|
6078
|
+
// src/robots.ts
|
|
6062
6079
|
/**
|
|
6063
6080
|
* `robots.txt`, generated from the same fact the indexing gate and the
|
|
6064
6081
|
* `<meta name="robots">` tag already read.
|
|
@@ -6119,8 +6136,7 @@ function renderRobotsTxt(cfg, options = {}) {
|
|
|
6119
6136
|
return lines.join("\n") + "\n";
|
|
6120
6137
|
}
|
|
6121
6138
|
|
|
6122
|
-
|
|
6123
|
-
//#region src/index.ts
|
|
6139
|
+
// src/index.ts
|
|
6124
6140
|
/**
|
|
6125
6141
|
* A minimal but complete starter design system, used by `vitops init`. It
|
|
6126
6142
|
* validates against the schema and generates real output in every format, so a
|
|
@@ -6428,6 +6444,5 @@ function defaultSiteConfig(opts) {
|
|
|
6428
6444
|
};
|
|
6429
6445
|
}
|
|
6430
6446
|
|
|
6431
|
-
//#endregion
|
|
6432
6447
|
export { AD_PROVIDERS, BASE_HOOK, BIGIN_DATA_CENTERS, CONFIG_SCHEMA_LOCAL_PATH, CONFIG_SCHEMA_URL, CONFIG_VERSION, CONTRAST, CRM_PROVIDERS, ConfigSchema, DARK_SEL, DOC_ORDER, DOC_SLUGS, DesignSystemSchema, JURISDICTIONS, JURISDICTION_COUNTRIES, KNOWN_PROCESSORS, NUMERIC_STEPS, PLAN_CAPABILITIES, REQUIRED_ROLES, ROLE_TOKEN_KEYS, SCHEMA_LOCAL_PATH, SCHEMA_URL, SiteFontSchema, TEMPLATES, TIERS, TIER_NAMES, TW_CLASH, TYPO_KEYMAP, buildIconSprite, buildReverseIndex, checkContrast, configJsonSchema, deepMerge, defaultConfig, defaultSiteConfig, derivePolicyVars, designSystemPath, detectProcessorKeys, enabledDocs, expandPalette, experimentDimensionWarnings, formatConfig, functionalRole, generate, generateDocs, generateLegal, getAt, isConfig, jsonSchema, loadIconSvg, mergePatch, movedTokens, parseMarkdown, patchToOverrideCss, processorsMissingLocation, renderInlineMarkdown, renderMarkdown, renderNodes, renderRobotsTxt, resolveConfig, resolveInput, resolvePrivacyContact, resolveProcessors, resolveTheme, roleColorUtilities, roleHue, roleKind, schemaTreeNodes, setAt, spriteId, stripNulls, tierPatterns, tierTags, toContentNodes, toHtmlFragment, toPortableText, tokenClass, tokenVar, validate, validateColorContract, validateConfig };
|
|
6433
6448
|
//# sourceMappingURL=index.mjs.map
|