@spillway-cms/blocks 0.1.34 → 0.1.36

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/css.js CHANGED
@@ -150,7 +150,8 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
150
150
  .sw-container { padding-inline: var(--sw-space-3); }
151
151
  }
152
152
  .sw-container--narrow { max-width: min(var(--sw-max-width, 1120px), 720px); }
153
- .sw-container--wide { max-width: min(calc(var(--sw-max-width, 1120px) * 1.25), 1400px); }
153
+ /* --sw-wide-width (a theme's custom token "wide-width") sets the wide container; unset, it is a quarter wider than the content. */
154
+ .sw-container--wide { max-width: var(--sw-wide-width, min(calc(var(--sw-max-width, 1120px) * 1.25), 1400px)); }
154
155
 
155
156
  .sw-block { padding-block: var(--sw-block-pad, 1.5rem); }
156
157
  /* Two blocks on the page background share one gap instead of adding theirs up. */
@@ -226,6 +227,55 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
226
227
  text-underline-offset: 0.15em;
227
228
  }
228
229
  .sw-button--link:hover { text-decoration-thickness: 2px; }
230
+ /* The emphasis values added with the block variants (the Buttons block; a Button takes them from its style). Accent: solid, in
231
+ the text color that reads on the accent (--sw-on-accent, which the theme writes when white does not). Dark: the dark neutral.
232
+ Hover underlines the label and keeps the fill: the accent's text color was chosen for that fill, and a darker one could
233
+ lose it. Light and light outline are for dark bands and images: a white button with dark text (with a soft edge, so it can
234
+ still be seen where someone puts it on a light background), a white outline with white text.
235
+ Focus keeps the page's ring (.sw-page .sw-button:focus-visible): none of these sets box-shadow or outline. */
236
+ .sw-button--accent {
237
+ background: var(--sw-color-accent, var(--sw-color-primary, #1d4ed8));
238
+ border-color: var(--sw-color-accent, var(--sw-color-primary, #1d4ed8));
239
+ color: var(--sw-on-accent, #ffffff);
240
+ }
241
+ .sw-button--accent:hover { text-decoration: underline; text-underline-offset: 0.15em; }
242
+ .sw-button--dark {
243
+ background: var(--sw-color-neutral-900, #111827);
244
+ border-color: var(--sw-color-neutral-900, #111827);
245
+ color: #ffffff;
246
+ }
247
+ .sw-button--dark:hover {
248
+ background: color-mix(in srgb, var(--sw-color-neutral-900, #111827) 80%, #ffffff);
249
+ border-color: color-mix(in srgb, var(--sw-color-neutral-900, #111827) 80%, #ffffff);
250
+ }
251
+ /* Two classes on these two, so a dark Section's "buttons take the band's text color" rule does not repaint them. */
252
+ .sw-button.sw-button--light {
253
+ background: #ffffff;
254
+ border-color: color-mix(in srgb, currentColor 30%, #ffffff);
255
+ color: var(--sw-color-neutral-900, #111827);
256
+ }
257
+ .sw-button.sw-button--light:hover { background: rgba(255, 255, 255, 0.9); border-color: rgba(255, 255, 255, 0.9); }
258
+ .sw-button.sw-button--outline-light {
259
+ background: transparent;
260
+ border-color: currentColor;
261
+ color: #ffffff;
262
+ }
263
+ .sw-button.sw-button--outline-light:hover { background: rgba(255, 255, 255, 0.16); }
264
+ /* Size and width (Button and Buttons). Four classes, so they hold whatever a Button style from Brand sets (three). Only the
265
+ padding above and below changes: a text link keeps its flush sides. */
266
+ .sw-button-block.sw-button-block--small .sw-actions .sw-button { font-size: 0.875rem; min-height: 2.25rem; padding-block: 0.45em; }
267
+ .sw-button-block.sw-button-block--large .sw-actions .sw-button { font-size: 1.125rem; min-height: 3.25rem; padding-block: 0.8em; }
268
+ .sw-button-block--full .sw-actions .sw-button { flex: 1 1 12rem; }
269
+ /* A grid of buttons: one column on phones, two from 640px, the block's columns from 900px. Every button fills its cell. */
270
+ .sw-buttons--grid .sw-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
271
+ .sw-buttons--grid .sw-actions .sw-button { text-align: center; }
272
+ @media (min-width: 640px) {
273
+ .sw-buttons--grid .sw-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
274
+ }
275
+ @media (min-width: 900px) {
276
+ .sw-buttons--cols-3 .sw-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
277
+ .sw-buttons--cols-4 .sw-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
278
+ }
229
279
 
230
280
  /* ---------- Hero ---------- */
231
281
 
@@ -320,9 +370,19 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
320
370
  /* ---------- Text ---------- */
321
371
 
322
372
  /* Text lines up with the headings and cards around it; the measure is capped, and alignment moves the column. */
323
- .sw-text .sw-prose { max-width: 36em; }
373
+ /* The brand's Text width setting writes --sw-measure (wide, or none to fill the column); with tables on the full column the cap
374
+ moves from the box (--sw-measure-box: none) to its paragraphs, headings, lists and quotes, which leaves a table the column.
375
+ --sw-measure-len is registered as a length so an em resolves once, on the text's box, not again on a larger heading. */
376
+ @property --sw-measure-len { syntax: "<length> | none"; inherits: true; initial-value: none; }
377
+ .sw-text .sw-prose, .sw-richtext.sw-prose { --sw-measure-len: var(--sw-measure-child, none); }
378
+ .sw-text .sw-prose { max-width: var(--sw-measure-box, var(--sw-measure, 36em)); }
379
+ /* The rules that are new with the setting sit in :where(), so they add no specificity: a rule a site already had in its
380
+ custom CSS (.sw-prose blockquote { max-width: ... }) still wins, and with the setting off they change nothing. */
381
+ :where(.sw-text .sw-prose, .sw-richtext.sw-prose) > :where(p, h2, h3, h4, ul, ol, blockquote, pre, hr, figure) { max-width: var(--sw-measure-len); }
324
382
  .sw-text.sw-align-center .sw-prose { margin-inline: auto; }
325
383
  .sw-text.sw-align-right .sw-prose { margin-left: auto; }
384
+ :where(.sw-text.sw-align-center .sw-prose) > :where(p, h2, h3, h4, ul, ol, pre) { margin-inline: auto; }
385
+ :where(.sw-text.sw-align-right .sw-prose) > :where(p, h2, h3, h4, ul, ol, pre) { margin-left: auto; }
326
386
  .sw-text .sw-prose > * + * { margin-top: 1em; }
327
387
  .sw-text--lead .sw-prose { font-size: 1.25rem; line-height: 1.55; }
328
388
  .sw-prose h1, .sw-prose h2, .sw-prose h3, .sw-prose h4 { margin-top: 1.5em; }
@@ -362,6 +422,65 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
362
422
  .sw-prose pre:focus-visible,
363
423
  .sw-prose table:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }
364
424
  .sw-prose th, .sw-prose td { padding: 0.5em 0.75em; border-bottom: 1px solid var(--sw-color-border); text-align: left; }
425
+ /* The header row's colors, for every table: a theme's custom tokens "table-head-bg" and "table-head-color" (set both, as a
426
+ pair that reads). Unset, a plain table's header is as it was. */
427
+ :where(.sw-prose) th { background: var(--sw-table-head-bg, transparent); color: var(--sw-table-head-color, inherit); }
428
+ /* Table styles: the fixed classes a table in rich text may carry (shared TABLE_STYLES), picked in the editor; one or several.
429
+ The shading is a tint of the text color, so it reads on the page background, the surface and a dark band alike. */
430
+ .sw-prose table:is(.sw-table-striped, .sw-table-bordered) th { background: var(--sw-table-head-bg, color-mix(in srgb, currentColor 10%, transparent)); }
431
+ .sw-prose table.sw-table-striped tbody tr:nth-child(even) { background: var(--sw-table-stripe, color-mix(in srgb, currentColor 5%, transparent)); }
432
+ .sw-prose table.sw-table-bordered :is(th, td) { border: 1px solid var(--sw-table-border, var(--sw-color-border)); }
433
+ .sw-prose table.sw-table-compact :is(th, td) { padding: 0.25em 0.5em; font-size: 0.9375em; }
434
+
435
+ /* Text styles: the fixed classes rich text may carry (shared TEXT_STYLES), offered in the editor as paragraph styles. Each reads a
436
+ variable a theme can set as a custom token (eyebrow-color is --sw-eyebrow-color), with a fallback that keeps its contrast on
437
+ light and dark backgrounds. */
438
+ .sw-text-eyebrow {
439
+ font-size: var(--sw-eyebrow-size, 0.8125em);
440
+ font-weight: var(--sw-eyebrow-weight, 700);
441
+ letter-spacing: var(--sw-eyebrow-tracking, 0.08em);
442
+ text-transform: var(--sw-eyebrow-transform, uppercase);
443
+ color: var(--sw-eyebrow-color, var(--sw-color-muted));
444
+ }
445
+ .sw-prose .sw-text-eyebrow + :is(h2, h3, h4) { margin-top: 0.2em; }
446
+ .sw-text-lead { font-size: var(--sw-lead-size, 1.25em); line-height: var(--sw-lead-leading, 1.55); }
447
+ .sw-text-small { font-size: var(--sw-small-size, 0.875em); color: var(--sw-small-color, var(--sw-color-muted)); }
448
+ .sw-text-highlight {
449
+ padding: 0.05em 0.2em;
450
+ border-radius: 0.2em;
451
+ background: var(--sw-highlight-bg, color-mix(in srgb, var(--sw-color-accent, var(--sw-color-primary, #1d4ed8)) 24%, transparent));
452
+ color: var(--sw-highlight-color, inherit);
453
+ -webkit-box-decoration-break: clone;
454
+ box-decoration-break: clone;
455
+ }
456
+ @media (forced-colors: active) {
457
+ .sw-text-highlight { background: Mark; color: MarkText; }
458
+ }
459
+
460
+ /* Text styles: the fixed classes rich text may carry (shared TEXT_STYLES), offered in the editor as paragraph styles. Each reads a
461
+ variable a theme can set as a custom token (eyebrow-color is --sw-eyebrow-color), with a fallback that keeps its contrast on
462
+ light and dark backgrounds. */
463
+ .sw-text-eyebrow {
464
+ font-size: var(--sw-eyebrow-size, 0.8125em);
465
+ font-weight: var(--sw-eyebrow-weight, 700);
466
+ letter-spacing: var(--sw-eyebrow-tracking, 0.08em);
467
+ text-transform: var(--sw-eyebrow-transform, uppercase);
468
+ color: var(--sw-eyebrow-color, var(--sw-color-muted));
469
+ }
470
+ .sw-prose .sw-text-eyebrow + :is(h2, h3, h4) { margin-top: 0.2em; }
471
+ .sw-text-lead { font-size: var(--sw-lead-size, 1.25em); line-height: var(--sw-lead-leading, 1.55); }
472
+ .sw-text-small { font-size: var(--sw-small-size, 0.875em); color: var(--sw-small-color, var(--sw-color-muted)); }
473
+ .sw-text-highlight {
474
+ padding: 0.05em 0.2em;
475
+ border-radius: 0.2em;
476
+ background: var(--sw-highlight-bg, color-mix(in srgb, var(--sw-color-accent, var(--sw-color-primary, #1d4ed8)) 24%, transparent));
477
+ color: var(--sw-highlight-color, inherit);
478
+ -webkit-box-decoration-break: clone;
479
+ box-decoration-break: clone;
480
+ }
481
+ @media (forced-colors: active) {
482
+ .sw-text-highlight { background: Mark; color: MarkText; }
483
+ }
365
484
 
366
485
  /* ---------- Image ---------- */
367
486
 
@@ -372,6 +491,16 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
372
491
  height: auto;
373
492
  }
374
493
  .sw-image--rounded .sw-image__img { border-radius: var(--sw-radius, 8px); }
494
+ /* Crop: a square, or a circle (a portrait), around the focal point. Size caps the figure inside its container: a theme's custom
495
+ tokens "image-small" and "image-medium" set the two widths. */
496
+ .sw-image--crop-square .sw-image__img, .sw-image--crop-round .sw-image__img { aspect-ratio: 1 / 1; object-fit: cover; }
497
+ .sw-image.sw-image--crop-round .sw-image__img { border-radius: 50%; }
498
+ .sw-image--size-small .sw-image__figure { max-width: var(--sw-image-small, 200px); }
499
+ .sw-image--size-medium .sw-image__figure { max-width: var(--sw-image-medium, 420px); }
500
+ .sw-image--full:is(.sw-image--size-small, .sw-image--size-medium) .sw-image__figure { margin-inline: var(--sw-space-2); }
501
+ .sw-image--align-center .sw-image__figure { margin-inline: auto; }
502
+ .sw-image--align-center .sw-image__caption { text-align: center; }
503
+ .sw-image--align-right .sw-image__figure { margin-left: auto; }
375
504
  .sw-image__placeholder {
376
505
  aspect-ratio: 16 / 9;
377
506
  background: repeating-linear-gradient(45deg, var(--sw-color-surface) 0 12px, var(--sw-color-border) 12px 14px);
@@ -421,10 +550,36 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
421
550
  .sw-section__body > .sw-block { padding-block: 0; }
422
551
  .sw-section__body > .sw-block + .sw-block { padding-top: var(--sw-space-3); }
423
552
  .sw-section__body .sw-container { max-width: none; padding-inline: 0; }
424
- .sw-block.sw-section--filled { padding-block: var(--sw-space-4); }
553
+ /* A band's own padding: --sw-section-pad (a theme's custom token "section-pad") replaces the automatic amount on every band. */
554
+ .sw-block.sw-section--filled { padding-block: var(--sw-section-pad, var(--sw-space-4)); }
425
555
  @media (min-width: 640px) {
426
- .sw-block.sw-section--filled { padding-block: var(--sw-space-5); }
556
+ .sw-block.sw-section--filled { padding-block: var(--sw-section-pad, var(--sw-space-5)); }
557
+ }
558
+ /* Shape: a band held inside the content width (inset), with the brand's radius (rounded) and its shadow too (shadow). The band
559
+ is as wide as its container would be, less the page's gutter, and keeps a band's padding even on the page background. */
560
+ .sw-block:is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow) {
561
+ width: calc(100% - 2 * var(--sw-space-2));
562
+ max-width: calc(var(--sw-max-width, 1120px) - 2 * var(--sw-space-3));
563
+ margin-inline: auto;
564
+ padding-block: var(--sw-section-pad, var(--sw-space-4));
427
565
  }
566
+ .sw-block:is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow).sw-section--w-narrow { max-width: calc(min(var(--sw-max-width, 1120px), 720px) - 2 * var(--sw-space-3)); }
567
+ .sw-block:is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow).sw-section--w-wide { max-width: calc(var(--sw-wide-width, min(calc(var(--sw-max-width, 1120px) * 1.25), 1400px)) - 2 * var(--sw-space-3)); }
568
+ @media (min-width: 640px) {
569
+ .sw-block:is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow) { width: calc(100% - 2 * var(--sw-space-3)); padding-block: var(--sw-section-pad, var(--sw-space-5)); }
570
+ }
571
+ .sw-section--shape-rounded, .sw-section--shape-shadow { border-radius: var(--sw-radius, 8px); }
572
+ .sw-section--shape-shadow { box-shadow: var(--sw-shadow, 0 1px 2px rgba(0, 0, 0, 0.08), 0 12px 28px -12px rgba(0, 0, 0, 0.3)); }
573
+ /* An inset band does not touch the block above or below it. */
574
+ .sw-block + .sw-block:is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow) { margin-top: var(--sw-block-pad, 1.5rem); }
575
+ :is(.sw-section--shape-inset, .sw-section--shape-rounded, .sw-section--shape-shadow) + .sw-block { padding-top: var(--sw-block-pad, 1.5rem); }
576
+ /* Padding: the band's own space above and below its blocks, in steps a theme can set ("section-pad-s" to "section-pad-xl").
577
+ Three classes, so a step holds on an inset band too; Space above and Space below still win over either side. */
578
+ .sw-block.sw-section.sw-section--pad-none { padding-block: 0; }
579
+ .sw-block.sw-section.sw-section--pad-s { padding-block: var(--sw-section-pad-s, var(--sw-space-2)); }
580
+ .sw-block.sw-section.sw-section--pad-m { padding-block: var(--sw-section-pad-m, var(--sw-space-4)); }
581
+ .sw-block.sw-section.sw-section--pad-l { padding-block: var(--sw-section-pad-l, var(--sw-space-5)); }
582
+ .sw-block.sw-section.sw-section--pad-xl { padding-block: var(--sw-section-pad-xl, var(--sw-space-6)); }
428
583
  .sw-section--filled + .sw-block { padding-top: var(--sw-block-pad, 1.5rem); }
429
584
  .sw-section--bg-surface { background: var(--sw-color-surface); }
430
585
  .sw-section--bg-primary { background: var(--sw-color-primary, #1d4ed8); }
@@ -528,6 +683,9 @@ export const blockCss = `/* Spillway core blocks. Generated from packages/blocks
528
683
  aspect-ratio: 16 / 9;
529
684
  object-fit: cover;
530
685
  }
686
+ /* Images: "Show the whole image" fits each picture inside the frame (a logo, a diagram) on the surface color. Four classes, so it
687
+ holds under any Cards style. */
688
+ .sw-block.sw-cards.sw-cards--fit-contain .sw-card .sw-card__image { object-fit: contain; object-position: center; background: var(--sw-color-surface); }
531
689
  .sw-card__body {
532
690
  flex: 1;
533
691
  display: flex;
package/dist/css.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"css.js","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC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most sites need and the page builder lacked: FAQ (questions that open in place, with FAQPage structured data),
3
- * Testimonials (quotes with who said them), Stats (big numbers with labels) and a Logo strip (partners, clients, accreditations).
4
- * All server-safe: the FAQ opens with <details>, so it needs no script and stays readable when printed or without CSS.
5
- */
6
1
  import type { ComponentConfig } from '@puckeditor/core';
7
2
  export interface FaqItem {
8
3
  question: string;
@@ -33,6 +28,8 @@ export interface TestimonialsProps {
33
28
  columns: 1 | 2 | 3;
34
29
  /** Scroll the quotes continuously (docs/dev/motion.md): the page's motion script runs it, with a pause button; otherwise a grid. */
35
30
  marquee?: boolean;
31
+ /** The block style's key (Brand → Styles); empty means the site's default Testimonials style. The built-in default writes no class. */
32
+ style?: string;
36
33
  }
37
34
  export declare const testimonialsComponent: ComponentConfig<TestimonialsProps>;
38
35
  export interface Stat {
@@ -48,6 +45,8 @@ export interface StatsProps {
48
45
  align: 'left' | 'center';
49
46
  /** Numbers count up from zero as the block comes into view (docs/dev/motion.md); the final value is in the HTML either way. */
50
47
  countUp?: boolean;
48
+ /** The block style's key (Brand → Styles); empty means the site's default Stats style. The built-in default writes no class. */
49
+ style?: string;
51
50
  }
52
51
  /**
53
52
  * A stat's value split for counting up: the prefix, the number, the suffix, its decimals and whether it groups thousands
package/dist/marketing.js CHANGED
@@ -1,5 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Marketing blocks most sites need and the page builder lacked: FAQ (questions that open in place, with FAQPage structured data),
4
+ * Testimonials (quotes with who said them), Stats (big numbers with labels) and a Logo strip (partners, clients, accreditations).
5
+ * All server-safe: the FAQ opens with <details>, so it needs no script and stays readable when printed or without CSS.
6
+ */
7
+ import { classPart } from './options.js';
2
8
  import { Icon, iconField, iconLabelField } from './icons.js';
9
+ import { styleClassFor } from './styles.js';
3
10
  const cx = (...c) => c.filter(Boolean).join(' ');
4
11
  /** Plain text from a short HTML answer, for the FAQ's structured data. */
5
12
  const plain = (html) => html.replace(/<\/?(?:p|div|br|li|ul|ol)\b[^>]*>/gi, ' ').replace(/<[^>]*>/g, '').replace(/&nbsp;/g, ' ').replace(/&amp;/g, '&').replace(/\s+/g, ' ').trim();
@@ -70,7 +77,7 @@ export const testimonialsComponent = {
70
77
  ],
71
78
  columns: 3,
72
79
  },
73
- render: ({ title, items, columns, marquee }) => (_jsx("section", { className: cx('sw-block', 'sw-testimonials', `sw-testimonials--${columns}`), "data-motion-marquee": marquee ? 'slow' : undefined, children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-testimonials__title", children: title }) : null, marquee ? (_jsx("button", { type: "button", className: "sw-marquee-toggle", "data-sw-marquee-toggle": "", "aria-pressed": "false", hidden: true, children: "Pause scrolling" })) : null, _jsx("ul", { className: "sw-testimonials__grid", children: (items ?? []).filter((t) => t.quote?.trim()).map((t, i) => (_jsx("li", { className: "sw-testimonial", children: _jsxs("figure", { children: [_jsx("blockquote", { className: "sw-testimonial__quote", children: _jsx("p", { children: t.quote }) }), t.name || t.role ? (_jsxs("figcaption", { className: "sw-testimonial__by", children: [t.imageUrl ? _jsx("img", { className: "sw-testimonial__photo", src: t.imageUrl, alt: "", width: 48, height: 48, loading: "lazy" }) : null, _jsxs("span", { children: [t.name ? _jsx("span", { className: "sw-testimonial__name", children: t.name }) : null, t.role ? _jsx("span", { className: "sw-testimonial__role", children: t.role }) : null] })] })) : null] }) }, i))) })] }) })),
80
+ render: ({ title, items, columns, marquee, style }) => (_jsx("section", { className: cx('sw-block', 'sw-testimonials', `sw-testimonials--${classPart([1, 2, 3], columns, 3)}`, styleClassFor('Testimonials', style)), "data-motion-marquee": marquee ? 'slow' : undefined, children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-testimonials__title", children: title }) : null, marquee ? (_jsx("button", { type: "button", className: "sw-marquee-toggle", "data-sw-marquee-toggle": "", "aria-pressed": "false", hidden: true, children: "Pause scrolling" })) : null, _jsx("ul", { className: "sw-testimonials__grid", children: (items ?? []).filter((t) => t.quote?.trim()).map((t, i) => (_jsx("li", { className: "sw-testimonial", children: _jsxs("figure", { children: [_jsx("blockquote", { className: "sw-testimonial__quote", children: _jsx("p", { children: t.quote }) }), t.name || t.role ? (_jsxs("figcaption", { className: "sw-testimonial__by", children: [t.imageUrl ? _jsx("img", { className: "sw-testimonial__photo", src: t.imageUrl, alt: "", width: 48, height: 48, loading: "lazy" }) : null, _jsxs("span", { children: [t.name ? _jsx("span", { className: "sw-testimonial__name", children: t.name }) : null, t.role ? _jsx("span", { className: "sw-testimonial__role", children: t.role }) : null] })] })) : null] }) }, i))) })] }) })),
74
81
  };
75
82
  /**
76
83
  * A stat's value split for counting up: the prefix, the number, the suffix, its decimals and whether it groups thousands
@@ -118,7 +125,7 @@ export const statsComponent = {
118
125
  ],
119
126
  align: 'center',
120
127
  },
121
- render: ({ title, items, align, countUp }) => (_jsx("section", { className: cx('sw-block', 'sw-stats', align === 'center' && 'sw-stats--center'), "data-motion-count": countUp ? '' : undefined, children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-stats__title", children: title }) : null, _jsx("dl", { className: "sw-stats__grid", children: (items ?? []).filter((s) => s.value?.trim()).map((s, i) => {
128
+ render: ({ title, items, align, countUp, style }) => (_jsx("section", { className: cx('sw-block', 'sw-stats', align === 'center' && 'sw-stats--center', styleClassFor('Stats', style)), "data-motion-count": countUp ? '' : undefined, children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-stats__title", children: title }) : null, _jsx("dl", { className: "sw-stats__grid", children: (items ?? []).filter((s) => s.value?.trim()).map((s, i) => {
122
129
  const n = countUp ? countableValue(s.value) : null;
123
130
  return (_jsxs("div", { className: "sw-stat", children: [_jsx("dt", { className: "sw-stat__label", children: s.label }), n ? (
124
131
  // Screen readers get the final value once; the digits that count are hidden from them.
@@ -1 +1 @@
1
- {"version":3,"file":"marketing.js","sourceRoot":"","sources":["../src/marketing.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,IAA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iB,YAAE,KAAK,GAAM,CAAC,CAAC,CAAC,IAAI,EAC3D,OAAO,CAAC,CAAC,CAAC,CACT,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,mBAAmB,4BAAwB,EAAE,kBAAc,OAAO,EAAC,MAAM,sCAEhG,CACV,CAAC,CAAC,CAAC,IAAI,EACR,aAAI,SAAS,EAAC,gBAAgB,YAC3B,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;wBAC9D,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAC,MAAM,GAAG,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,gBAAgB,YAAE,CAAC,CAAC,IAAI,GAAQ,CAAC;wBAC3J,OAAO,uBAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAC,UAAU,YAAE,GAAG,GAAK,CAAC,CAAC,CAAC,GAAG,IAA5D,CAAC,CAAiE,CAAC;oBACrF,CAAC,CAAC,GACC,IACD,GACE,CACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D5B,CAAC"}
package/dist/menu.d.ts CHANGED
@@ -28,6 +28,8 @@ export interface MenuBlockProps {
28
28
  /** Shown above the links. Empty: no heading, except in branch mode, where the branch's own item is the heading. */
29
29
  heading: string;
30
30
  layout: 'vertical' | 'horizontal';
31
+ /** The block style's key (Brand → Styles); empty means the site's default Menu style. The built-in default writes no class. */
32
+ style?: string;
31
33
  /** Resolved by the server; never stored. */
32
34
  items?: MenuBlockItem[];
33
35
  /** The menu's label, for the navigation landmark's name. Resolved; never stored. */
package/dist/menu.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { styleClassFor } from './styles.js';
2
3
  const cx = (...c) => c.filter(Boolean).join(' ');
3
4
  function List({ items, depth, level }) {
4
5
  return (_jsx("ul", { className: level === 0 ? 'sw-menu-block__list' : 'sw-menu-block__sublist', children: items.map((item, i) => (_jsxs("li", { className: cx('sw-menu-block__item', item.current && 'is-current', item.trail && !item.current && 'is-trail'), children: [_jsx("a", { href: item.href, "aria-current": item.current ? 'page' : undefined, target: item.newTab ? '_blank' : undefined, rel: item.newTab ? 'noopener' : undefined, children: item.label }), item.children?.length && level + 1 < depth ? _jsx(List, { items: item.children, depth: depth, level: level + 1 }) : null] }, `${item.href}-${i}`))) }));
@@ -43,7 +44,7 @@ export const menuBlockComponent = {
43
44
  },
44
45
  },
45
46
  defaultProps: { source: 'menu', menuKey: 'main', show: 'all', depth: 2, heading: '', layout: 'vertical' },
46
- render: ({ source, menuKey, show, depth, heading, layout, items, menuLabel, branch, puck }) => {
47
+ render: ({ source, menuKey, show, depth, heading, layout, style, items, menuLabel, branch, puck }) => {
47
48
  const list = Array.isArray(items) ? items : [];
48
49
  if (!list.length) {
49
50
  if (!puck?.isEditing)
@@ -54,7 +55,7 @@ export const menuBlockComponent = {
54
55
  const title = heading?.trim() || (show === 'branch' ? branch?.label : '');
55
56
  const titleHref = !heading?.trim() && show === 'branch' ? branch?.href : undefined;
56
57
  const levels = Number(depth) === 1 ? 1 : 2;
57
- return (_jsx("nav", { className: cx('sw-block', 'sw-menu-block', layout === 'horizontal' && 'sw-menu-block--horizontal'), "aria-label": title || menuLabel || 'Menu', children: _jsxs("div", { className: "sw-container", children: [title ? (_jsx("h2", { className: "sw-menu-block__heading", children: titleHref ? (_jsx("a", { href: titleHref, "aria-current": branch?.current ? 'page' : undefined, children: title })) : (title) })) : null, _jsx(List, { items: list, depth: levels, level: 0 })] }) }));
58
+ return (_jsx("nav", { className: cx('sw-block', 'sw-menu-block', layout === 'horizontal' && 'sw-menu-block--horizontal', styleClassFor('Menu', style)), "aria-label": title || menuLabel || 'Menu', children: _jsxs("div", { className: "sw-container", children: [title ? (_jsx("h2", { className: "sw-menu-block__heading", children: titleHref ? (_jsx("a", { href: titleHref, "aria-current": branch?.current ? 'page' : undefined, children: title })) : (title) })) : null, _jsx(List, { items: list, depth: levels, level: 0 })] }) }));
58
59
  },
59
60
  };
60
61
  export const menuBlockCss = `/* ---------- Menu ---------- */
package/dist/menu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["../src/menu.tsx"],"names":[],"mappings":";AAwCA,MAAM,EAAE,GAAG,CAAC,GAAG,CAAwC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAExF,SAAS,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAA4D;IAC7F,OAAO,CACL,aAAI,SAAS,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,wBAAwB,YAC1E,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,cAA8B,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,IAAI,CAAC,OAAO,IAAI,YAAY,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,UAAU,CAAC,aACzI,YAAG,IAAI,EAAE,IAAI,CAAC,IAAI,kBAAgB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,EAA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C,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,MAAM,KAAK,YAAY,IAAI,2BAA2B,EAAE,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,gBAAc,KAAK,IAAI,SAAS,IAAI,MAAM,YAC7K,eAAK,SAAS,EAAC,cAAc,aAC1B,KAAK,CAAC,CAAC,CAAC,CACP,aAAI,SAAS,EAAC,wBAAwB,YACnC,SAAS,CAAC,CAAC,CAAC,CACX,YAAG,IAAI,EAAE,SAAS,kBAAgB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YACnE,KAAK,GACJ,CACL,CAAC,CAAC,CAAC,CACF,KAAK,CACN,GACE,CACN,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,IAAI,IAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAI,IAC1C,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;CAc3B,CAAC"}
package/dist/meta.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  * short line under the block's name in the page builder's blocks panel;
4
4
  * `description` is the full one for the docs; `aiHint` tells a model when to use
5
5
  * the block and what to put in it. The style slots of the styled blocks (Hero,
6
- * Cards, Button, CallToAction, Heading, Text) and their built-in styles sit next
7
- * door, in styles.ts (`blockStyleSlots`).
6
+ * Cards, Button, CallToAction, Heading, Text, Stats, Testimonials, Menu and the
7
+ * rest) and their built-in styles sit next door, in styles.ts (`blockStyleSlots`).
8
8
  */
9
9
  export interface BlockMeta {
10
10
  summary: string;
package/dist/meta.js CHANGED
@@ -16,8 +16,8 @@ export const blockMeta = {
16
16
  },
17
17
  Image: {
18
18
  summary: 'One image with alt text.',
19
- description: 'A single image with required alt text, optional caption and width (normal, wide, full).',
20
- aiHint: 'Use only with a real image URL from the media library (/media/...). Always write descriptive alt text; use an empty alt only for purely decorative images.',
19
+ description: 'A single image with alt text (its own, or the media library item\'s), optional caption and width (normal, wide, full). Can be marked decorative. It can be cropped to a square or a circle around its focal point, shown small or medium instead of filling its place, and then aligned left, center or right.',
20
+ aiHint: 'Use only with a real image URL from the media library (/media/...). Always write descriptive alt text; an empty alt uses the media library item\'s alt text. Never set decorative: only a person marks an image decorative, and a decorative you set is dropped. For a portrait use crop "round" with size "small" or "medium"; for a logo use size "small". Leave crop "none" and size unset otherwise.',
21
21
  },
22
22
  Gallery: {
23
23
  summary: 'Image grid with a lightbox.',
@@ -36,8 +36,8 @@ export const blockMeta = {
36
36
  },
37
37
  Section: {
38
38
  summary: 'A band that holds other blocks.',
39
- description: 'A full-width band with a background (page, surface, primary, secondary or dark) and a width (narrow, normal, wide), holding any blocks in its content slot; each block inside keeps its own alignment. Text and buttons turn light on the colored and dark backgrounds. It can have a background image from the media library (cropped around its focal point, under an overlay in a brand color at 20 to 80 percent, with light or dark text to match) and a muted background video that plays only when motion is allowed, with a pause button. A link name gives it an id for #links.',
40
- aiHint: 'Use to group a heading, text, buttons or cards on one background, for example a dark band with a Heading, a Text and a Buttons block. Put the child blocks in "content". Prefer it to Spacer for separating sections. For a photo band, set backgroundImage to a real /media/ image (or "find: " and what it shows when photos are offered), overlay "dark" (or "primary") with overlayStrength 60 or more and textColor "auto"; keep the text inside short. backgroundVideo only with a real .mp4 or .webm and a backgroundImage as its poster. anchor is an optional link name (lowercase words joined by hyphens, unique on the page).',
39
+ description: 'A full-width band with a background (page, surface, primary, secondary or dark) and a width (narrow, normal, wide), holding any blocks in its content slot; each block inside keeps its own alignment. Text and buttons turn light on the colored and dark backgrounds. It can have a background image from the media library (cropped around its focal point, under an overlay in a brand color at 20 to 80 percent, with light or dark text to match) and a muted background video that plays only when motion is allowed, with a pause button. A link name gives it an id for #links. Its shape can be the full width, or inset inside the content width, with rounded corners and with a shadow; its padding above and below the blocks is automatic or a step from none to XL.',
40
+ aiHint: 'Use to group a heading, text, buttons or cards on one background, for example a dark band with a Heading, a Text and a Buttons block. Put the child blocks in "content". Prefer it to Spacer for separating sections. For a photo band, set backgroundImage to a real /media/ image (or "find: " and what it shows when photos are offered), overlay "dark" (or "primary") with overlayStrength 60 or more and textColor "auto"; keep the text inside short. backgroundVideo only with a real .mp4 or .webm and a backgroundImage as its poster. anchor is an optional link name (lowercase words joined by hyphens, unique on the page). Leave shape "full" and padding "auto" unless the design calls for a card-like band (shape "rounded" or "shadow") or a tighter or roomier band.',
41
41
  },
42
42
  OnThisPage: {
43
43
  summary: 'Links to the page\'s headings.',
@@ -66,7 +66,7 @@ export const blockMeta = {
66
66
  },
67
67
  Cards: {
68
68
  summary: 'A grid of cards with links.',
69
- description: 'A grid of cards with title, text, optional link, image and icon, in 2 to 4 columns. An icon is decorative unless it has a label.',
69
+ description: 'A grid of cards with title, text, optional link, image and icon, in 2 to 4 columns. An icon is decorative unless it has a label. Images fill their frame (cropped) or show whole; the Overlay style lays the title and text over the image.',
70
70
  aiHint: 'Use for features, benefits, services or a list of related pages. Three cards with parallel phrasing read best. Leave href empty when there is no target page. Give each card an icon that fits its title when the cards have no images (the same style of icon on every card), and leave iconLabel empty: the title says what it is. Icon names are the bundled set (graduation-cap, book-open, users, map-pin, calendar, heart, globe, award, briefcase, flask-conical, lightbulb, phone, mail, arrow-right and more; the field lists them all); leave icon empty when no icon fits.',
71
71
  },
72
72
  Faq: {
@@ -76,12 +76,12 @@ export const blockMeta = {
76
76
  },
77
77
  Testimonials: {
78
78
  summary: 'Quotes from people, with names.',
79
- description: 'Quotes with the name, role and an optional photo of who said them, in 1 to 3 columns.',
79
+ description: 'Quotes with the name, role and an optional photo of who said them, in 1 to 3 columns. Its style (Brand → Styles) is cards, plain or a large quote.',
80
80
  aiHint: 'Only use real quotes the site has; never invent testimonials. Keep each quote to one or two sentences. Leave imageUrl empty unless a real photo URL is known.',
81
81
  },
82
82
  Stats: {
83
83
  summary: 'Big numbers with labels.',
84
- description: 'Up to six large figures (98%, 40, 14:1), each with what it counts and an optional icon above it.',
84
+ description: 'Up to six large figures (98%, 40, 14:1), each with what it counts and an optional icon above it. Its style (Brand → Styles) is plain, cards or a band in a brand color.',
85
85
  aiHint: 'Use for three or four true, specific figures the site states elsewhere. The label says what is counted, in a few words. Do not invent numbers. An icon per figure is optional (decorative; iconLabel empty). Icon names are the bundled set (graduation-cap, book-open, users, map-pin, calendar, heart, globe, award, briefcase, flask-conical, lightbulb, phone, mail, arrow-right and more; the field lists them all); leave icon empty when no icon fits.',
86
86
  },
87
87
  LogoStrip: {
@@ -121,7 +121,7 @@ export const blockMeta = {
121
121
  },
122
122
  Menu: {
123
123
  summary: 'Links from a menu.',
124
- description: "One of the site's menus as a list of links: the whole menu, or only the branch that holds the page being viewed (its sub-items, like a department's navigation), one or two levels deep, stacked for a sidebar or in a row. It can follow the menu of the department section the page is in instead of naming one. The current page is marked; nothing shows when there are no links for the page.",
124
+ description: "One of the site's menus as a list of links: the whole menu, or only the branch that holds the page being viewed (its sub-items, like a department's navigation), one or two levels deep, stacked for a sidebar or in a row. It can follow the menu of the department section the page is in instead of naming one. The current page is marked; nothing shows when there are no links for the page. Its style (Brand → Styles) is a list, pills or underlined.",
125
125
  aiHint: 'Use for in-page or sidebar navigation of a section of the site. Set menuKey to an existing menu key (main is the header menu); use show "branch" to list the pages around the current one. Do not repeat the header navigation on a page.',
126
126
  },
127
127
  Breadcrumbs: {
@@ -145,13 +145,13 @@ export const blockMeta = {
145
145
  aiHint: 'Use only when the user provides embed code or a known embeddable URL. Put the full iframe markup in "html". Never invent video IDs.',
146
146
  },
147
147
  Buttons: {
148
- summary: 'A row of one to four buttons.',
149
- description: 'One to four buttons in a row that wraps on small screens, each with its own label, link, emphasis (primary, secondary or text link) and an option to open in a new tab; aligned left, center or right.',
150
- aiHint: 'Use when a section needs more than one action, for example "Book a demo" (primary) and "Read the docs" (secondary). One primary button per row; the rest secondary or text links. An icon is optional (decorative, iconPosition before or after the label), for example arrow-right after or download before.',
148
+ summary: 'A row or a grid of buttons.',
149
+ description: 'Up to twelve buttons, in a row that wraps on small screens or in a grid of 2, 3 or 4 equal columns, each with its own label, link, emphasis (primary, secondary, text link, accent, dark, and light or light outline for dark bands) and an option to open in a new tab; small, medium or large; as wide as their labels or sharing the full width; aligned left, center or right.',
150
+ aiHint: 'Use when a section needs more than one action, for example "Book a demo" (primary) and "Read the docs" (secondary). One primary button per row; the rest secondary or text links. An icon is optional (decorative, iconPosition before or after the label), for example arrow-right after or download before. Inside a dark or primary Section use emphasis "light" or "outline-light". For a set of quick links (five or more) use layout "grid" with columns 3 or 4. Leave size "medium" and width "auto" unless the design calls for more.',
151
151
  },
152
152
  Button: {
153
153
  summary: 'A single button or text link.',
154
- description: 'A single button with alignment and an optional icon before or after the label; its emphasis (primary, secondary or a text link) comes from its style.',
154
+ description: 'A single button with alignment, a size (small, medium, large), a width (as wide as its label, or full) and an optional icon before or after the label; its emphasis (primary, secondary, a text link, accent, dark, light or light outline) comes from its style.',
155
155
  aiHint: 'Use for a standalone link styled as a button. Label is a verb phrase; href is a site path or full URL. icon is optional and decorative (arrow-right, download, external-link).',
156
156
  },
157
157
  Form: {
package/dist/meta.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../src/meta.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE;QACJ,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,iPAAiP;QAC9P,MAAM,EACJ,+kBAA+kB;KACllB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,oBAAoB;QAC7B,WAAW,EAAE,iDAAiD;QAC9D,MAAM,EACJ,8RAA8R;KACjS;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,0BAA0B;QACnC,WAAW,EAAE,6GAA6G;QAC1H,MAA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;KACnL;IACD,WAAW,EAAE;QACX,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,gcAAgc;QAC7c,MAAM,EAAE,0RAA0R;KACnS;IACD,UAAU,EAAE;QACV,OAAO,EAAE,6BAA6B;QACtC,WAAW,EAAE,yTAAyT;QACtU,MAAM,EACJ,kaAAka;KACra;IACD,cAAc,EAAE;QACd,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,0PAA0P;QACvQ,MAAM,EAAE,oMAAoM;KAC7M;IACD,eAAe,EAAE;QACf,OAAO,EAAE,4BAA4B;QACrC,WAAW,EAAE,0UAA0U;QACvV,MAAM,EAAE,+JAA+J;KACxK;IACD,aAAa,EAAE;QACb,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,uFAAuF;QACpG,MAAM,EAAE,+IAA+I;KACxJ;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,sIAAsI;QACnJ,MAAM,EAAE,qHAAqH;KAC9H;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EAAE,oMAAoM;QACjN,MAAM,EAAE,iKAAiK;KAC1K;IACD,UAAU,EAAE;QACV,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,iQAAiQ;QAC9Q,MAAM,EAAE,8JAA8J;KACvK;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,0BAA0B;QACnC,WAAW,EAAE,uUAAuU;QACpV,MAAM,EAAE,2LAA2L;KACpM;IACD,WAAW,EAAE;QACX,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,yRAAyR;QACtS,MAAM,EAAE,wKAAwK;KACjL;IACD,WAAW,EAAE;QACX,OAAO,EAAE,wBAAwB;QACjC,WAAW,EAAE,2LAA2L;QACxM,MAAM,EAAE,4IAA4I;KACrJ;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Options with fixed values. A block's option (alignment, size, width, columns) becomes part of a class name, so a render never
3
+ * writes the stored value itself: it writes the member of the option's list that equals it. A page saved through the API with
4
+ * `align: "left sw-lightbox"` therefore gets the default's class, not a class of Spillway's own that the CSS class field refuses.
5
+ */
6
+ /** The member of `allowed` equal to `value` (a number and its text count as equal), or `fallback`. */
7
+ export declare function choice<T extends string | number>(allowed: readonly T[], value: unknown, fallback: T): T;
8
+ /**
9
+ * The text an option contributes to a class name: the member of `allowed` equal to `value`, else `fallback`. A block stored
10
+ * without the option at all keeps the text it always rendered with (`undefined`, a fixed word), so pages saved before this
11
+ * check render the same bytes; anything else outside the list takes the fallback.
12
+ */
13
+ export declare function classPart<T extends string | number>(allowed: readonly T[], value: unknown, fallback: T): string;
14
+ export declare const ALIGNS: readonly ["left", "center", "right"];
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Options with fixed values. A block's option (alignment, size, width, columns) becomes part of a class name, so a render never
3
+ * writes the stored value itself: it writes the member of the option's list that equals it. A page saved through the API with
4
+ * `align: "left sw-lightbox"` therefore gets the default's class, not a class of Spillway's own that the CSS class field refuses.
5
+ */
6
+ /** The member of `allowed` equal to `value` (a number and its text count as equal), or `fallback`. */
7
+ export function choice(allowed, value, fallback) {
8
+ const found = allowed.find((v) => v === value || (typeof value !== 'object' && value !== null && value !== undefined && String(v) === String(value)));
9
+ return found === undefined ? fallback : found;
10
+ }
11
+ /**
12
+ * The text an option contributes to a class name: the member of `allowed` equal to `value`, else `fallback`. A block stored
13
+ * without the option at all keeps the text it always rendered with (`undefined`, a fixed word), so pages saved before this
14
+ * check render the same bytes; anything else outside the list takes the fallback.
15
+ */
16
+ export function classPart(allowed, value, fallback) {
17
+ if (value === undefined)
18
+ return 'undefined';
19
+ return String(choice(allowed, value, fallback));
20
+ }
21
+ export const ALIGNS = ['left', 'center', 'right'];
22
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sGAAsG;AACtG,MAAM,UAAU,MAAM,CAA4B,OAAqB,EAAE,KAAc,EAAE,QAAW;IAClG,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtJ,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAA4B,OAAqB,EAAE,KAAc,EAAE,QAAW;IACrG,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAC5C,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC"}