@getquick/content 0.4.2 → 0.5.1

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/README.md CHANGED
@@ -309,6 +309,41 @@ per response, using the delivered `theme` from entry/home/chrome. Resolve defaul
309
309
  with `resolveDesignTheme` for older stored publications. A changed theme requires
310
310
  regenerating both stylesheets, including its media thresholds.
311
311
 
312
+ ### Fonts and text styles
313
+
314
+ GQ Design 0.10.1 or newer (contract 2.1.0; this package bundles 0.10.2) delivers the Site's self-hosted font families
315
+ (faces on the Site's own or media host, each with a metric-matched local
316
+ fallback), the `sans`/`serif`/`mono` slot assignments and the Heading and
317
+ Paragraph text styles. The design presets carry them as optional `fonts` and
318
+ `textStyles`: read with the other presets, stored with them, refreshed by the
319
+ `design` settings event (a global styles save, a font slot assignment, or a
320
+ Font Library family or face saved or deleted) and compared by reconciliation.
321
+ A CMS whose GQ Design predates them rejects the fields; the presets are read
322
+ again without them, with a warning, and pages keep the theme's system stacks.
323
+
324
+ Emit them once per response, in the head, after `designThemeStyleSheet(theme)`:
325
+
326
+ ```astro
327
+ <style is:inline set:html={designThemeStyleSheet(theme)} />
328
+ <Fragment set:html={designFontsHead(await runtime.designPresets())} />
329
+ ```
330
+
331
+ `designFontsHead(presets, { root? })` returns, in order: at most two
332
+ `<link rel="preload" as="font" type="font/woff2" href="…" crossorigin>` for the
333
+ faces GQ Design marks (the text styles' primary Latin files); a
334
+ `<style data-gqd-fonts>` with the `@font-face` rules (`font-display` as
335
+ delivered, `swap` from GQ Design), the fallback faces and the assigned slots'
336
+ `--gqd-font-*` stacks; and a `<style data-gqd-text-styles>` with the text
337
+ styles under `root` (default `.gqd-content`, the theme's root). GQ Design sets
338
+ the slot stacks on `:root` and on the doubled root (`:root,.gqd-content.gqd-content`),
339
+ because the theme stylesheet declares the system stacks there. A bad stored
340
+ text style value is dropped rather than failing the page. It is empty without fonts or text styles, or with no
341
+ families. Font URLs only come from the presets: faces with a relative URL or a
342
+ file on a Google host are dropped, so a visitor's browser never contacts
343
+ Google. Media hosts need a public CORS rule for cross-origin font files.
344
+ `designFontStyleSheet`, `designFontPreloads` (link descriptors for another
345
+ serializer) and `designTextStyleSheet` return the parts.
346
+
312
347
  `presentationHtml(name, shell, presentation, { attributes, model? })` decorates an
313
348
  existing root shell. Pass the complete block attributes for native Group layout
314
349
  context. `presentationVariables` takes the same attributes context. Both delegate
@@ -1,6 +1,6 @@
1
1
  import { S as SERVICE_CATALOG, T as copyLanguage, c as grantedCategories, d as promptReason, f as readConsentCookie, x as OPTIONAL_CATEGORIES } from "./state-BYWc5TUB.js";
2
2
  import { a as CONSENT_COPY, c as legalRevisions, r as escapeHtml } from "./embeds-CJJemAmE.js";
3
- import { t as CONSENT_UI_VERSION } from "./version-CGZoRnsU.js";
3
+ import { t as CONSENT_UI_VERSION } from "./version-7v3zP5aF.js";
4
4
  import { t as CONSENT_CONFIG_ID } from "./client-config-B3LNSOxl.js";
5
5
  import { t as CONSENT_PATH } from "./paths-Cmzzof3v.js";
6
6
  //#region frontend/src/consent/html.ts
package/dist/consent.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { C as SERVICE_IDS, D as hostMatches, E as embedService, O as hostService, S as SERVICE_CATALOG, T as copyLanguage, _ as consentConfiguration, a as consentCookie, b as COPY_LANGUAGES, c as grantedCategories, d as promptReason, f as readConsentCookie, g as MEASUREMENT_ID, h as CONSENT_COPY_REVISION, i as DECISION_VALIDITY_MS, k as isServiceId, l as isConsentId, m as serviceGranted, n as CONSENT_COOKIE, o as decide, p as serializeConsentState, r as CONSENT_COOKIE_MAX_AGE_SECONDS, s as denyAll, t as CONSENT_ACTIONS, u as parseConsentState, v as needsBanner, w as catalogService, x as OPTIONAL_CATEGORIES, y as CONSENT_CATEGORIES } from "./state-BYWc5TUB.js";
2
2
  import { a as parseConsentRecordRequest, i as isRecordToken, n as consentRecordRequest, r as isLegalRoleName, t as MAX_RECORD_BYTES } from "./records-Dumrz759.js";
3
3
  import { a as CONSENT_COPY, c as legalRevisions, i as rewriteEmbeds, l as parseLegalLanguage, n as embedPlaceholder, o as LEGAL_ROLES, r as escapeHtml, s as REQUIRED_LEGAL_ROLES, t as blockedPlaceholder } from "./embeds-CJJemAmE.js";
4
- import { t as CONSENT_UI_VERSION } from "./version-CGZoRnsU.js";
4
+ import { t as CONSENT_UI_VERSION } from "./version-7v3zP5aF.js";
5
5
  export { CONSENT_ACTIONS, CONSENT_CATEGORIES, CONSENT_COOKIE, CONSENT_COOKIE_MAX_AGE_SECONDS, CONSENT_COPY, CONSENT_COPY_REVISION, CONSENT_UI_VERSION, COPY_LANGUAGES, DECISION_VALIDITY_MS, LEGAL_ROLES, MAX_RECORD_BYTES, MEASUREMENT_ID, OPTIONAL_CATEGORIES, REQUIRED_LEGAL_ROLES, SERVICE_CATALOG, SERVICE_IDS, blockedPlaceholder, catalogService, consentConfiguration, consentCookie, consentRecordRequest, copyLanguage, decide, denyAll, embedPlaceholder, embedService, escapeHtml, grantedCategories, hostMatches, hostService, isConsentId, isLegalRoleName, isRecordToken, isServiceId, legalRevisions, needsBanner, parseConsentRecordRequest, parseConsentState, parseLegalLanguage, promptReason, readConsentCookie, rewriteEmbeds, serializeConsentState, serviceGranted };