@plitzi/sdk-authoring 0.38.2 → 0.38.4

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +317 -0
  2. package/dist/index-compactSvg.js +13 -0
  3. package/dist/index.d.ts +460 -25
  4. package/dist/index.js +2571 -1013
  5. package/dist/node.d.ts +29 -0
  6. package/dist/node.js +62 -0
  7. package/package.json +14 -6
  8. package/skills/plitzi-authoring/CHEATSHEET.md +9 -5
  9. package/skills/plitzi-authoring/SKILL.md +6 -2
  10. package/skills/plitzi-authoring/recipes/accordion.ts +58 -0
  11. package/skills/plitzi-authoring/recipes/carousel.ts +14 -9
  12. package/skills/plitzi-authoring/recipes/detail-page.ts +10 -6
  13. package/skills/plitzi-authoring/recipes/every-few-seconds.ts +13 -8
  14. package/skills/plitzi-authoring/recipes/filter-a-list.ts +2 -2
  15. package/skills/plitzi-authoring/recipes/forms-and-modals.ts +1 -2
  16. package/skills/plitzi-authoring/recipes/from-tailwind.ts +1 -1
  17. package/skills/plitzi-authoring/recipes/link-to-a-section.ts +3 -3
  18. package/skills/plitzi-authoring/recipes/link-with-data.ts +12 -7
  19. package/skills/plitzi-authoring/recipes/marquee.ts +2 -2
  20. package/skills/plitzi-authoring/recipes/scroll-a-row.ts +5 -6
  21. package/skills/plitzi-authoring/recipes/server-data.ts +65 -0
  22. package/skills/plitzi-authoring/recipes/show-data.ts +12 -7
  23. package/skills/plitzi-authoring/recipes/style-a-page.ts +1 -1
  24. package/skills/plitzi-authoring/recipes/typed-data.ts +9 -6
  25. package/skills/plitzi-authoring/recipes/usable-without-sight.ts +2 -2
  26. package/skills/plitzi-authoring/reference/accessibility.md +8 -4
  27. package/skills/plitzi-authoring/reference/authoring-errors.md +13 -3
  28. package/skills/plitzi-authoring/reference/colours-and-motion.md +7 -0
  29. package/skills/plitzi-authoring/reference/components.md +2 -1
  30. package/skills/plitzi-authoring/reference/data-and-visibility.md +26 -16
  31. package/skills/plitzi-authoring/reference/drawing.md +22 -0
  32. package/skills/plitzi-authoring/reference/efficiency.md +10 -1
  33. package/skills/plitzi-authoring/reference/elements-and-styles.md +7 -11
  34. package/skills/plitzi-authoring/reference/lists.md +12 -7
  35. package/skills/plitzi-authoring/reference/plugins.md +5 -0
  36. package/skills/plitzi-authoring/reference/review-checklist.md +14 -2
  37. package/skills/plitzi-authoring/reference/snippets-and-export.md +2 -2
  38. package/skills/plitzi-authoring/reference/structure.md +1 -1
  39. package/skills/plitzi-authoring/reference/templates.md +1 -1
  40. package/skills/plitzi-authoring/reference/testing.md +10 -5
  41. package/skills/plitzi-authoring/reference/typed-sources.md +1 -1
  42. package/skills/plitzi-authoring/reference/validation.md +3 -2
package/dist/index.d.ts CHANGED
@@ -289,6 +289,14 @@ export declare const addNotification: (params: {
289
289
  autoDismissTimeout?: number;
290
290
  }) => StepSpec;
291
291
 
292
+ /**
293
+ * Where each region of one picture sits in the other, from their row profiles — so two pages of different heights are
294
+ * compared section by section, not row for row: one section 400 px taller pushes everything under it down, and compared
295
+ * row for row every one of them would differ. Regions are placed from the top down; a row no region holds keeps the
296
+ * shift of the row above it.
297
+ */
298
+ export declare const alignPictures: (a: RowProfile, b: RowProfile, regions: PictureRegion[]) => PictureAlignment;
299
+
292
300
  /**
293
301
  * One refusal a document is allowed to carry, named exactly: which check, on which element, and why.
294
302
  *
@@ -709,6 +717,16 @@ export declare const AUTHORING_CODES: {
709
717
  readonly means: "a layout `slot` that is not an element inside that layout";
710
718
  readonly fix: "the id of the element in the shell where the body goes";
711
719
  };
720
+ readonly 'motion-invalid': {
721
+ readonly kind: "refused";
722
+ readonly means: "a `motion` with a preset, a trigger or a timing the page cannot play";
723
+ readonly fix: "`motion: { enter: 'fade-up', on: 'view' }` — the message lists the presets";
724
+ };
725
+ readonly 'motion-no-tag': {
726
+ readonly kind: "refused";
727
+ readonly means: "a `motion` on an element with no tag of its own — nothing to move";
728
+ readonly fix: "the motion on what it wraps, or a `subType` on it";
729
+ };
712
730
  readonly 'anchor-invalid': {
713
731
  readonly kind: "refused";
714
732
  readonly means: "an `anchor` or a link's `hash` that is not lowercase letters, digits and `-`";
@@ -739,10 +757,25 @@ export declare const AUTHORING_CODES: {
739
757
  readonly means: "an id a binding, a template or a test cannot name";
740
758
  readonly fix: "a letter first, then letters, digits, `-` and `_`: `'hero-title'`";
741
759
  };
760
+ readonly 'controls-no-anchor': {
761
+ readonly kind: "warned";
762
+ readonly means: "a button's `controls` naming no anchor — `aria-controls` points at nothing";
763
+ readonly fix: "an `anchor` on the element it shows and hides, and `controls` naming it";
764
+ };
765
+ readonly 'quiet-unknown': {
766
+ readonly kind: "refused";
767
+ readonly means: "an element's `quiet` naming something that is not a suggestion's code — a problem is never quieted";
768
+ readonly fix: "the code of the suggestion it was offered: `quiet: ['repeated-shape']`";
769
+ };
770
+ readonly 'controls-unknown': {
771
+ readonly kind: "refused";
772
+ readonly means: "a button's `controls` naming no element of the space";
773
+ readonly fix: "the id of the element it shows and hides: `controls: 'faq-answer'`";
774
+ };
742
775
  readonly 'id-taken': {
743
776
  readonly kind: "refused";
744
777
  readonly means: "two elements with one id — ids are one namespace for the whole space";
745
- readonly fix: "wrap what a helper builds in `scope('promos', ref => …)`: every id inside is prefixed, `ref('slides')` names one";
778
+ readonly fix: "a name taken by a page or a layout: a name of its own; a helper called twice: `scope('promos', ref => …)`, every id inside prefixed";
746
779
  };
747
780
  readonly 'id-shadows-global': {
748
781
  readonly kind: "refused";
@@ -879,6 +912,16 @@ export declare const AUTHORING_CODES: {
879
912
  readonly means: "a type no built-in element has";
880
913
  readonly fix: "the built-in it suggests; a plugin's declaration goes in `authorSpace(space, { plugins: [declaration] })`";
881
914
  };
915
+ readonly 'plugin-attribute-reserved': {
916
+ readonly kind: "warned";
917
+ readonly means: "a plugin attribute named as one of the element’s own fields — a factory never hands it to the plugin";
918
+ readonly fix: "rename it in the plugin (`variant` → `kind`)";
919
+ };
920
+ readonly 'unknown-variant': {
921
+ readonly kind: "warned";
922
+ readonly means: "a variant no class of the element and no style of its type declares — nothing applies";
923
+ readonly fix: "declare it (`styles(name, { variants: { … } })`), or name one that is";
924
+ };
882
925
  readonly 'unknown-attribute': {
883
926
  readonly kind: "refused";
884
927
  readonly means: "an attribute the element does not have";
@@ -911,8 +954,8 @@ export declare const AUTHORING_CODES: {
911
954
  };
912
955
  readonly 'span-holds-block': {
913
956
  readonly kind: "warned";
914
- readonly means: "a `container({ subType: 'span' })` holding a heading, a paragraph, a list, a form or prose";
915
- readonly fix: "a `div` (leave `subType` out), or words: a `text` with `display: inline` in its class";
957
+ readonly means: "a `container` with `subType: 'span'` or `'p'` holding a heading, a paragraph, a list, a form or prose";
958
+ readonly fix: "a `div` (leave `subType` out), or words and inline elements: a `text`, a `link`";
916
959
  };
917
960
  readonly 'part-missing': {
918
961
  readonly kind: "refused";
@@ -969,6 +1012,11 @@ export declare const AUTHORING_CODES: {
969
1012
  readonly means: "a controlled list with nothing to render";
970
1013
  readonly fix: "`items: [ … ]` or `bind: { items: 'provider.data.rows' }`";
971
1014
  };
1015
+ readonly 'list-row-not-li': {
1016
+ readonly kind: "warned";
1017
+ readonly means: "a row of a list with `items` that is not an `<li>` — that list is a `<ul>` (or `<ol>`), so the row is a box inside a list, no item to a screen reader";
1018
+ readonly fix: "`container({ subType: 'li' })` — or the component's root one, or a wrapper for a link or a button";
1019
+ };
972
1020
  readonly 'list-item-key-missing': {
973
1021
  readonly kind: "warned";
974
1022
  readonly means: "a list's `itemKey` that some of its items lack, or two of them share — the rows fall back to `id`, then position";
@@ -994,10 +1042,20 @@ export declare const AUTHORING_CODES: {
994
1042
  readonly means: "an `apiContainer` that asks nothing";
995
1043
  readonly fix: "a `query` (or `action`, `connector`, `resource`)";
996
1044
  };
1045
+ readonly 'path-not-in-data': {
1046
+ readonly kind: "warned";
1047
+ readonly means: "a binding onto a provider whose answer the author could read (`data`), through a path that answer does not have";
1048
+ readonly fix: "the path the message lists the keys for — `p.data.plans`, not `p.data.landing.plans`";
1049
+ };
1050
+ readonly 'server-provider-in-component': {
1051
+ readonly kind: "refused";
1052
+ readonly means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's";
1053
+ readonly fix: "put the provider on the page, around the instance, and hand the component its rows as a prop";
1054
+ };
997
1055
  readonly 'server-data-without-rsc': {
998
1056
  readonly kind: "warned";
999
- readonly means: "a `runtime: 'server'` provider with a `connector` or `action` in a space that does not turn server data on";
1000
- readonly fix: "`rsc: { enabled: true }` on the space";
1057
+ readonly means: "a `runtime: 'server'` provider — `connector`, `action` or `query` — in a space that turns server data off (`rsc: { enabled: false }`)";
1058
+ readonly fix: "drop `rsc: { enabled: false }`: server data is on unless a space turns it off";
1001
1059
  };
1002
1060
  readonly 'route-param-undeclared': {
1003
1061
  readonly kind: "warned";
@@ -1542,8 +1600,12 @@ export declare interface AuthoringProps {
1542
1600
  loadStrategy?: ElementLoadStrategy;
1543
1601
  /** Its `id` in the DOM, so `/page#anchor` lands on it. One per page; not inside a list row or a component. */
1544
1602
  anchor?: string;
1603
+ /** How it arrives and whether it keeps moving: `{ enter: 'fade-up', on: 'view' }`. Played by the SDK's stylesheet. */
1604
+ motion?: ElementMotion;
1545
1605
  /** The feature flag it exists under: `'newCheckout'` while on, `'!newCheckout'` while off. Not a visibility. */
1546
1606
  flag?: string;
1607
+ /** Suggestions it is not offered, written this way on purpose: `quiet: ['repeated-shape']`. Never a problem. */
1608
+ quiet?: SuggestionCode[];
1547
1609
  children?: ElementSpec[];
1548
1610
  /** What the builder shows, not what the runtime reads. */
1549
1611
  meta?: SpecMeta;
@@ -1601,6 +1663,16 @@ export declare interface AuthorSpaceOptions {
1601
1663
  attributeNames?: Readonly<Record<string, readonly string[] | null>>;
1602
1664
  /** The types that hold no children. Left out, children written into one are dropped at render time unreported. */
1603
1665
  leafTypes?: readonly string[];
1666
+ /**
1667
+ * The types that draw nothing on a page (a plugin's `drawsNothing`), under the name a space uses them by — their own
1668
+ * type or `custom:<renderType>`. Their handles are `boxless`, so a page check does not wait for them on screen.
1669
+ */
1670
+ drawsNothingTypes?: readonly string[];
1671
+ /**
1672
+ * Plugin type → the attributes it declares under a name authoring keeps for the element itself (`variant`, `class`,
1673
+ * `id`…): a factory reads those as the element's, so the plugin is never handed them. Derived from `plugins`.
1674
+ */
1675
+ reservedPluginAttributes?: Readonly<Record<string, readonly string[]>>;
1604
1676
  /**
1605
1677
  * Element type → the attributes it starts with. What tells a default `content` rendered beside children apart from
1606
1678
  * one the author wrote, and an attribute that holds a list from one that holds text.
@@ -1634,6 +1706,13 @@ export declare interface AuthorSpaceOptions {
1634
1706
  strictParams?: boolean;
1635
1707
  params?: ParamSpec;
1636
1708
  }>>;
1709
+ /**
1710
+ * What a provider's `query` answers, when the author can read it — a JSON file the project serves; `publicData` from
1711
+ * `@plitzi/sdk-authoring/node` reads them from `public/`. Every binding onto that provider is held to the answer: a
1712
+ * path it does not have is warned (`path-not-in-data`), with the keys it does. `undefined` for a query it cannot
1713
+ * answer, which is left unchecked.
1714
+ */
1715
+ data?: (query: string) => unknown;
1637
1716
  }
1638
1717
 
1639
1718
  export declare const authRefreshDetails: () => StepSpec;
@@ -1860,6 +1939,7 @@ export declare const button: ElementFactory<Partial<{
1860
1939
  title?: string | undefined;
1861
1940
  content?: string | undefined;
1862
1941
  disabled?: boolean | undefined;
1942
+ controls?: string | undefined;
1863
1943
  icon?: string | undefined;
1864
1944
  subType?: "button" | "submit" | "reset" | undefined;
1865
1945
  iconPlacement?: IconPlacement | undefined;
@@ -2055,12 +2135,42 @@ export declare const column: (gap: string, extra?: CssProps) => StyleRules;
2055
2135
 
2056
2136
  declare type Combinator = 'and' | 'or';
2057
2137
 
2138
+ /**
2139
+ * An SVG as it is worth carrying in a space: what a design tool wrote for itself taken out — the XML prolog and doctype,
2140
+ * comments, `<metadata>`, an editor's own elements and attributes (Inkscape, Sodipodi, Sketch, Figma's `data-name`) —
2141
+ * and the whitespace between tags. What draws, and its `<title>`, stay as they were.
2142
+ *
2143
+ * Every byte of an inline SVG is in the space's documents and in every page that shows it, so a logo exported from a
2144
+ * design tool with half its size in notes to itself is that much heavier for nothing. `svg()` checks and sanitises
2145
+ * what it is given; this only makes it smaller.
2146
+ */
2147
+ export declare const compactSvg: (markup: string) => string;
2148
+
2149
+ export declare interface CompareOptions {
2150
+ /** The parts of the page a difference is told by (`pageRegions`). */
2151
+ regions?: PictureRegion[];
2152
+ /** How far apart two channels may be and still count as the same pixel (0–255); 32 by default. */
2153
+ tolerance?: number;
2154
+ /**
2155
+ * Whether each region is compared with where it sits in the second picture rather than row for row — for two
2156
+ * different pages, which seldom measure the same; never for two frames of one page, which do.
2157
+ */
2158
+ align?: boolean;
2159
+ }
2160
+
2058
2161
  /** Two pictures compared in a page the driver holds — any page will do, nothing of it is read. */
2059
- export declare const comparePictures: (driver: PictureDriver, a: string, b: string, regions?: PictureRegion[], tolerance?: number) => Promise<PictureDiff>;
2162
+ export declare const comparePictures: (driver: PictureDriver, a: string, b: string, { regions, tolerance, align }?: CompareOptions) => Promise<PictureDiff>;
2060
2163
 
2061
2164
  /** Every observable way `actual` differs from `expected`. Empty means they render the same space. */
2062
2165
  export declare const compareSpaces: (expected: SpaceDocuments, actual: SpaceDocuments) => SpaceDifference[];
2063
2166
 
2167
+ /**
2168
+ * The texts of two pages paired by their words — the second "Pricing" with the second "Pricing" — and what each pair
2169
+ * does differently on the second page. `shiftAt` says how far down the second page the rows around a point of the first
2170
+ * are, when the two were aligned; left out, nothing moved.
2171
+ */
2172
+ export declare const compareTexts: (here: PageText[], there: PageText[], shiftAt?: (y: number) => number) => TextComparison;
2173
+
2064
2174
  /**
2065
2175
  * An instance of one of the space's components (`SpaceSpec.components`): the component's tree, rendered here with
2066
2176
  * these props.
@@ -2132,12 +2242,14 @@ export declare interface ComponentSpec {
2132
2242
  export declare const container: {
2133
2243
  (props?: ElementProps<Partial<{
2134
2244
  label?: string | undefined;
2135
- subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
2245
+ subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
2246
+ live?: "polite" | "assertive" | "" | undefined;
2136
2247
  decorative?: boolean | undefined;
2137
2248
  }>> | undefined): ElementSpec;
2138
2249
  (children: ElementSpec[], props?: ElementProps<Partial<{
2139
2250
  label?: string | undefined;
2140
- subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
2251
+ subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
2252
+ live?: "polite" | "assertive" | "" | undefined;
2141
2253
  decorative?: boolean | undefined;
2142
2254
  }>> | undefined): ElementSpec;
2143
2255
  };
@@ -2243,6 +2355,40 @@ export declare const cycleState: (params: {
2243
2355
  */
2244
2356
  export declare const darkScheme: (light: ImportProbe, dark: ImportProbe) => ImportedDark | undefined;
2245
2357
 
2358
+ export declare interface DataIssue {
2359
+ code: DataIssueCode;
2360
+ message: string;
2361
+ elementId: string;
2362
+ }
2363
+
2364
+ /**
2365
+ * What a page's bindings read, held against what its providers answered: the half of "is this page whole" a box on
2366
+ * the screen cannot tell.
2367
+ *
2368
+ * A binding onto a path the answer does not have resolves to nothing, and nothing renders wrong in a way the eye or a
2369
+ * probe sees: a list draws no rows and keeps its box, a heading keeps its default words. So a page fed the wrong path
2370
+ * — `landing.data.plans` where the answer is `{ plans }` — was "36 elements on screen, nothing wrong". Read here, with
2371
+ * the provider's answer in hand, it is the binding, the path it reads and the keys that ARE there.
2372
+ *
2373
+ * Pure: the sources come from the page's dev tools (`window.__plitzi.sources()`), so a suite or `plitzi check` reads
2374
+ * them however it reaches the page.
2375
+ */
2376
+ export declare type DataIssueCode = 'binding-reads-nothing' | 'provider-failed';
2377
+
2378
+ /**
2379
+ * Every binding of the page onto a provider that has answered, read against that answer: a path that stops before its
2380
+ * last step — or a list's rows that are not there — is an issue that says where it stopped and what was there; a
2381
+ * provider that failed is one too. A provider still on
2382
+ * its way, or not on this page, is passed over — its answer is not in yet, or not this page's to judge.
2383
+ */
2384
+ export declare const dataIssues: (schema: Schema, pageId: string, sources: Record<string, unknown>) => DataReport;
2385
+
2386
+ export declare interface DataReport {
2387
+ issues: DataIssue[];
2388
+ /** Every list of the page whose rows come from a provider: how many it has now, `null` when it reads nothing. */
2389
+ lists: Record<string, number | null>;
2390
+ }
2391
+
2246
2392
  declare type DeclarationByType = {
2247
2393
  [Name in keyof typeof elementDeclarations as (typeof elementDeclarations)[Name]['type']]: (typeof elementDeclarations)[Name];
2248
2394
  };
@@ -2361,7 +2507,7 @@ export declare const dialogContainer: {
2361
2507
  };
2362
2508
 
2363
2509
  /** Runs in the page: both pictures decoded on canvases, compared pixel by pixel. Self-contained — it is serialised. */
2364
- export declare const diffPictures: ({ a, b, regions, tolerance }: PictureDiffInput) => Promise<PictureDiff>;
2510
+ export declare const diffPictures: ({ a, b, regions, tolerance, rowShift }: PictureDiffInput) => Promise<PictureDiff>;
2365
2511
 
2366
2512
  /**
2367
2513
  * Deterministic hex digest, in plain TypeScript. What names a style selector — never an element, a page or a step:
@@ -2440,7 +2586,7 @@ export { Element_2 as Element }
2440
2586
  * export drops without a word. `specFields.test.ts` refuses to compile until it is listed here — and once it is, it is
2441
2587
  * written like any other, so growing the authoring surface needs nothing more from the emitter than this line.
2442
2588
  */
2443
- export declare const ELEMENT_FIELDS: readonly ["type", "id", "attributes", "class", "css", "states", "selector", "variant", "slots", "bind", "from", "as", "row", "visible", "flows", "runtime", "loadStrategy", "anchor", "flag", "meta", "children"];
2589
+ export declare const ELEMENT_FIELDS: readonly ["type", "id", "attributes", "class", "css", "states", "selector", "variant", "slots", "bind", "from", "as", "row", "visible", "flows", "runtime", "loadStrategy", "anchor", "motion", "flag", "quiet", "meta", "children"];
2444
2590
 
2445
2591
  /** The sub-elements that only work inside another type, and that type — see `ElementDeclarationData.ancestorType`. */
2446
2592
  export declare const elementAncestorTypes: Record<string, string>;
@@ -2455,11 +2601,11 @@ export declare const elementAttributeNames: {
2455
2601
  readonly apiContainer: readonly ["accessToken", "action", "cache", "connector", "credentials", "endpoint", "filters", "gcTime", "headers", "input", "limit", "loadingSlot", "method", "mockData", "pageParam", "pagination", "query", "refreshSeconds", "renderWhileLoading", "resource", "singleRecord", "staleTime", "subType", "when"];
2456
2602
  readonly blockHtml: readonly ["content"];
2457
2603
  readonly blockJsx: readonly ["allowEmptyRender", "content", "contentCache", "props"];
2458
- readonly button: readonly ["ariaExpanded", "ariaPressed", "content", "contentPlacement", "disabled", "icon", "iconPlacement", "label", "subType", "title"];
2604
+ readonly button: readonly ["ariaExpanded", "ariaPressed", "content", "contentPlacement", "controls", "disabled", "icon", "iconPlacement", "label", "subType", "title"];
2459
2605
  readonly carousel: readonly ["autoplay", "itemKey", "items", "label", "loop", "mode", "pauseOnHover", "speed", "transition"];
2460
2606
  readonly carouselTrack: readonly [];
2461
2607
  readonly channel: readonly ["grant", "keep", "presence", "subType", "topic"];
2462
- readonly container: readonly ["decorative", "label", "subType"];
2608
+ readonly container: readonly ["decorative", "label", "live", "subType"];
2463
2609
  readonly custom: null;
2464
2610
  readonly dialogContainer: readonly ["acceptButtonLabel", "acceptButtonLabelLoading", "autoHideAfterClick", "headerLabel", "rejectButtonLabel"];
2465
2611
  readonly dropdown: readonly ["backgroundDisabled", "closeOnClickBackground", "closeOnClickPopup", "containerLeftOffset", "containerTopOffset", "disabled", "openPopup", "popupPlacement"];
@@ -2469,7 +2615,7 @@ export declare const elementAttributeNames: {
2469
2615
  readonly form: readonly ["actionUrl", "errors", "managedByInteractions", "method", "noValidate", "values"];
2470
2616
  readonly formControl: readonly ["autoComplete", "autoFocus", "defaultValue", "disabled", "formatMessage", "hideLabel", "label", "matches", "matchesMessage", "maxLength", "maxLengthMessage", "minLength", "minLengthMessage", "name", "options", "pattern", "patternMessage", "placeholder", "previewError", "readOnly", "required", "requiredMessage", "subType"];
2471
2617
  readonly heading: readonly ["content", "subType"];
2472
- readonly image: readonly ["alt", "decorative", "fetchPriority", "height", "loadMode", "sizes", "src", "width"];
2618
+ readonly image: readonly ["alt", "decorative", "fetchPriority", "height", "loadMode", "resize", "sizes", "src", "width"];
2473
2619
  readonly layoutContainer: readonly ["layout", "layoutContainer", "subType"];
2474
2620
  readonly link: readonly ["content", "contentPlacement", "hash", "href", "icon", "iconPlacement", "label", "mode", "target"];
2475
2621
  readonly list: readonly ["itemKey", "items", "source", "subType"];
@@ -2590,6 +2736,12 @@ export declare interface ElementDeclarationData {
2590
2736
  * surface to refuse a value outside it.
2591
2737
  */
2592
2738
  attributeValues?: Record<string, readonly string[]>;
2739
+ /**
2740
+ * Whether the element is behaviour rather than content — a clock that fires a flow, a listener — and draws nothing on
2741
+ * a page (at most a tag in the builder, to have something to select). Read by the page checks (`inspectPage`,
2742
+ * `plitzi check`), which would otherwise wait for it to be on screen and report it hidden.
2743
+ */
2744
+ drawsNothing?: boolean;
2593
2745
  content?: {
2594
2746
  attributes?: Record<string, unknown>;
2595
2747
  definition?: {
@@ -2986,6 +3138,7 @@ declare const elementDeclarations: {
2986
3138
  title?: string | undefined;
2987
3139
  content?: string | undefined;
2988
3140
  disabled?: boolean | undefined;
3141
+ controls?: string | undefined;
2989
3142
  icon?: string | undefined;
2990
3143
  subType?: "button" | "submit" | "reset" | undefined;
2991
3144
  iconPlacement?: IconPlacement | undefined;
@@ -3304,6 +3457,7 @@ declare const elementDeclarations: {
3304
3457
  readonly type: "container";
3305
3458
  readonly attributeValues: {
3306
3459
  readonly subType: readonly string[];
3460
+ readonly live: readonly string[];
3307
3461
  };
3308
3462
  readonly content: {
3309
3463
  readonly attributes: {
@@ -3354,7 +3508,8 @@ declare const elementDeclarations: {
3354
3508
  };
3355
3509
  } & ElementAttributesBrand<Partial<{
3356
3510
  label?: string | undefined;
3357
- subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | undefined;
3511
+ subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
3512
+ live?: "polite" | "assertive" | "" | undefined;
3358
3513
  decorative?: boolean | undefined;
3359
3514
  }>>;
3360
3515
  readonly Custom: {
@@ -4697,7 +4852,7 @@ declare const elementDeclarations: {
4697
4852
  };
4698
4853
  readonly content: {
4699
4854
  readonly attributes: {
4700
- readonly src: "https://cdn.plitzi.com/resources/img/placeholder-img.svg";
4855
+ readonly src: "";
4701
4856
  readonly alt: "";
4702
4857
  readonly decorative: false;
4703
4858
  readonly fetchPriority: "auto";
@@ -4749,6 +4904,7 @@ declare const elementDeclarations: {
4749
4904
  readonly settings: {};
4750
4905
  };
4751
4906
  } & ElementAttributesBrand<Partial<{
4907
+ resize?: boolean | undefined;
4752
4908
  height?: number | undefined;
4753
4909
  width?: number | undefined;
4754
4910
  fetchPriority?: "high" | "low" | "auto" | undefined;
@@ -6526,6 +6682,14 @@ export declare type ElementDefinition = {
6526
6682
  * for the platform, this names it for the URL. One per rendered page, layouts included (`isAnchor`).
6527
6683
  */
6528
6684
  anchor?: string;
6685
+ /** How it arrives and whether it keeps moving, played by the SDK's stylesheet. See {@link ElementMotion}. */
6686
+ motion?: ElementMotion;
6687
+ /**
6688
+ * The codes of the suggestions this element is not offered, because it is written this way on purpose —
6689
+ * `['repeated-shape']`. Read by the one place suggestions are made (`suggestSpace`), so authoring, the builder and
6690
+ * the MCP leave out the same ones. Never a problem's code.
6691
+ */
6692
+ quiet?: string[];
6529
6693
  };
6530
6694
 
6531
6695
  /**
@@ -6590,6 +6754,9 @@ export declare interface ElementHandle {
6590
6754
  * and they are correctly NOT on a page somebody has only just opened. A suite asserting "everything named is
6591
6755
  * visible" skips these, or it forces the author to leave unnamed exactly what a flow needs to point at.
6592
6756
  *
6757
+ * Also an element whose every child is conditional: with none of them shown it shows nothing either — a list of
6758
+ * flyouts at rest, a `display: contents` wrapper of panels.
6759
+ *
6593
6760
  * Present only when true: almost nothing on a page is conditional, and the handles are serialized.
6594
6761
  */
6595
6762
  conditional?: true;
@@ -6654,6 +6821,24 @@ export declare const elementLeafTypes: string[];
6654
6821
  */
6655
6822
  export declare type ElementLoadStrategy = 'eager' | 'lazy' | 'visible';
6656
6823
 
6824
+ declare interface ElementMotion {
6825
+ /** How it arrives. */
6826
+ enter?: MotionEnter;
6827
+ /** When it arrives: `load` (the default), `view` (once, as it comes into view) or `scroll` (with the scroll). */
6828
+ on?: MotionTrigger;
6829
+ /** How long it takes to arrive, in ms (600 by default). Ignored under `scroll`, which follows the scroll. */
6830
+ duration?: number;
6831
+ /** How long it waits before it does, in ms. */
6832
+ delay?: number;
6833
+ /**
6834
+ * Its CHILDREN arrive one after another, this many ms apart — a grid of cards, a list's rows — rather than the
6835
+ * element itself. Up to the first 24; the rest arrive with the 24th.
6836
+ */
6837
+ stagger?: number;
6838
+ /** Keeps moving after it arrived. */
6839
+ loop?: MotionLoop;
6840
+ }
6841
+
6657
6842
  /**
6658
6843
  * The parts each compound type renders through — a carousel's `carouselTrack`, a tab container's header and body: the
6659
6844
  * types it starts with (`initialItems`) that work only inside it. Without one it renders nothing of what it holds.
@@ -6844,12 +7029,24 @@ export declare interface ElementSpec {
6844
7029
  * would repeat it.
6845
7030
  */
6846
7031
  anchor?: string;
7032
+ /**
7033
+ * How it arrives and whether it keeps moving — `{ enter: 'fade-up', on: 'view' }`, `{ loop: 'float' }`,
7034
+ * `{ enter: 'scale', stagger: 60 }` for children that arrive one after another. Played by the SDK's stylesheet,
7035
+ * opacity and transforms only, and stilled for a visitor who asked for less motion. See motion.md.
7036
+ */
7037
+ motion?: ElementMotion;
6847
7038
  /**
6848
7039
  * The feature flag this exists under: `'newCheckout'` exists only while the flag is on, `'!newCheckout'` only while
6849
7040
  * it is off — the old version, kept until the new one ships. Not a visibility: gated off, it is not rendered at all,
6850
7041
  * on the server or in the browser. The flag is one {@link SpaceSpec.flags} declares.
6851
7042
  */
6852
7043
  flag?: string;
7044
+ /**
7045
+ * Suggestions this element is not offered, because it is written this way on purpose — `quiet: ['repeated-shape']`
7046
+ * on the root a helper writes three menus from, each reading its own data. A suggestion about several elements is
7047
+ * quiet when any of them says so. Only suggestions: a problem is never quieted.
7048
+ */
7049
+ quiet?: SuggestionCode[];
6853
7050
  children?: ElementSpec[];
6854
7051
  meta?: SpecMeta;
6855
7052
  }
@@ -7006,6 +7203,12 @@ export declare type Explanation = {
7006
7203
  title: string;
7007
7204
  description: string;
7008
7205
  params: ParamInfo[];
7206
+ } | {
7207
+ kind: 'helper';
7208
+ name: string;
7209
+ signature: string;
7210
+ summary: string;
7211
+ example: string;
7009
7212
  };
7010
7213
 
7011
7214
  /** One explanation as text, for a person or an agent reading a terminal. */
@@ -7146,7 +7349,11 @@ declare type FormControlAttributes = AuthorableAttributes<FormControlProps, 'val
7146
7349
  declare type FormControlProps = {
7147
7350
  ref: RefObject<HTMLElement>;
7148
7351
  className: string;
7149
- subType: 'text' | 'number' | 'email' | 'password' | 'date' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden'
7352
+ subType: 'text' | 'number' | 'email' | 'password'
7353
+ /** A search box: the browser draws its clear button, and a phone shows its search key. */
7354
+ | 'search' | 'url'
7355
+ /** A phone number: a phone shows its dial pad. */
7356
+ | 'tel' | 'date' | 'time' | 'checkbox' | 'switch' | 'select' | 'textarea' | 'hidden'
7150
7357
  /** The browser's own colour picker: its value is `#rrggbb`. */
7151
7358
  | 'color';
7152
7359
  name: string;
@@ -7294,6 +7501,7 @@ declare type IconPlacement = 'before' | 'after';
7294
7501
 
7295
7502
  export declare const image: {
7296
7503
  (props?: ElementProps<Partial<{
7504
+ resize?: boolean | undefined;
7297
7505
  height?: number | undefined;
7298
7506
  width?: number | undefined;
7299
7507
  fetchPriority?: "high" | "low" | "auto" | undefined;
@@ -7304,6 +7512,7 @@ export declare const image: {
7304
7512
  loadMode?: "auto" | "eager" | "lazy" | undefined;
7305
7513
  }>> | undefined): ElementSpec;
7306
7514
  (children: ElementSpec[], props?: ElementProps<Partial<{
7515
+ resize?: boolean | undefined;
7307
7516
  height?: number | undefined;
7308
7517
  width?: number | undefined;
7309
7518
  fetchPriority?: "high" | "low" | "auto" | undefined;
@@ -7508,6 +7717,12 @@ export declare const inspectPage: (driver: PageEvaluator, handles: SpaceHandles,
7508
7717
  */
7509
7718
  export declare const inspectRenders: (page: RenderEvaluator, act: () => Promise<unknown>, options?: RenderOptions) => Promise<RenderReport>;
7510
7719
 
7720
+ /**
7721
+ * A component's instance, which has no node of its own: the component's root is drawn where it is placed and carries
7722
+ * the instance's name beside the component's (`data-plitzi-instance`, see `RootElement`).
7723
+ */
7724
+ export declare const instanceSelectorFor: (id: string) => string;
7725
+
7511
7726
  declare const interactionBasicTriggers: Record<string, InteractionCallback>;
7512
7727
 
7513
7728
  export declare type InteractionCallback<T extends Record<string, unknown> = Record<string, unknown>> = {
@@ -7662,6 +7877,9 @@ export declare const isRuleSetSpec: (spec: StyleSpec) => spec is RuleSetSpec;
7662
7877
  */
7663
7878
  export declare const isStyleDeclaration: (value: StyleSpec | StyleDeclaration) => value is StyleDeclaration;
7664
7879
 
7880
+ /** Whether a code is a suggestion's: what an element's `quiet` may name. */
7881
+ export declare const isSuggestionCode: (code: unknown) => code is SuggestionCode;
7882
+
7665
7883
  /**
7666
7884
  * A shortcut pressed the way the page will read it.
7667
7885
  *
@@ -7794,6 +8012,25 @@ export declare interface ListRow {
7794
8012
  };
7795
8013
  }
7796
8014
 
8015
+ export declare interface LoadedImages {
8016
+ /** The pictures the page has. */
8017
+ images: number;
8018
+ /** Those still not drawn when the budget ran out — or that failed. */
8019
+ missing: number;
8020
+ }
8021
+
8022
+ /**
8023
+ * Runs in the page: every picture fetched and decoded before a picture of the whole page is taken. Self-contained — it
8024
+ * is serialised.
8025
+ *
8026
+ * A picture of the page is taken without scrolling, and a lazy image is fetched only once it is near the screen: below
8027
+ * the fold it is a hole, and a comparison counts the hole. So the page's scroller is walked down once — a loader of a
8028
+ * site's own (one that swaps `data-src` from an `IntersectionObserver`) and an arrival waiting to be seen react to the
8029
+ * scroll, not to an attribute — and back up; then `loading="lazy"` is made eager and the pictures are awaited, in
8030
+ * rounds while loading one turns up another (a blurred placeholder swapped for its picture), for `budgetMs` at most.
8031
+ */
8032
+ export declare const loadImages: (budgetMs: number) => Promise<LoadedImages>;
8033
+
7797
8034
  /**
7798
8035
  * A driver's locator for an authored element, by name.
7799
8036
  *
@@ -7847,6 +8084,36 @@ export declare const modalContainer: {
7847
8084
  /** The name of the class an element's own rules on top of its classes become. */
7848
8085
  export declare const modifierClassName: (elementId: string) => string;
7849
8086
 
8087
+ /**
8088
+ * An element's declared motion — how it arrives, when, and whether it keeps moving — which the SDK's own stylesheet
8089
+ * plays (`_motion.scss`). Every preset moves only `opacity` and `transform`, which the compositor animates without
8090
+ * laying the page out again, and every one is stilled for a visitor who asked for less motion: the motion good
8091
+ * practices, kept by construction rather than by the author.
8092
+ *
8093
+ * The one description the authoring package, the builder's Motion tab, the MCP and the validator all read; the
8094
+ * stylesheet mirrors its presets and frames, and a test in `apps/sdk` holds the two together.
8095
+ */
8096
+ export declare const MOTION_ENTERS: readonly ["fade", "fade-up", "fade-down", "slide-left", "slide-right", "slide-up", "scale", "zoom-in", "zoom-out", "pop", "bounce-in", "tilt", "spin-in"];
8097
+
8098
+ /**
8099
+ * A motion that repeats: a gentle rise and fall, a breath, a turn, a sway — a bounce, a wobble, a small orbit, a
8100
+ * heartbeat, a drift. Held until the page is live.
8101
+ */
8102
+ export declare const MOTION_LOOPS: readonly ["float", "pulse", "spin", "sway", "bounce", "wobble", "orbit", "heartbeat", "drift"];
8103
+
8104
+ /**
8105
+ * When an arrival plays: as the page loads (`load`); once, as the element first comes into view, and then it stays
8106
+ * (`view`); or with the scroll itself, at the reader's pace — played backwards when the reader scrolls back up past it
8107
+ * (`scroll`).
8108
+ */
8109
+ export declare const MOTION_TRIGGERS: readonly ["load", "view", "scroll"];
8110
+
8111
+ declare type MotionEnter = (typeof MOTION_ENTERS)[number];
8112
+
8113
+ declare type MotionLoop = (typeof MOTION_LOOPS)[number];
8114
+
8115
+ declare type MotionTrigger = (typeof MOTION_TRIGGERS)[number];
8116
+
7850
8117
  /**
7851
8118
  * Moves one entry between two lists, and does nothing if it is not in the first.
7852
8119
  *
@@ -8288,6 +8555,9 @@ export declare const openModal: (target: string, metadata?: string) => StepSpec;
8288
8555
 
8289
8556
  declare type Operator = '' | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'contains' | 'doesNotContain' | 'beginsWith' | 'doesNotBeginWith' | 'endsWith' | 'doesNotEndWith' | 'empty' | 'notEmpty' | 'in' | 'notIn' | 'between' | 'notBetween';
8290
8557
 
8558
+ /** How many texts a page is read for: enough for a long page, few enough to stay quick. */
8559
+ export declare const PAGE_TEXT_LIMIT = 2000;
8560
+
8291
8561
  /**
8292
8562
  * A page a function can be evaluated in — Playwright's `Page`, Puppeteer's, or anything with the same method.
8293
8563
  *
@@ -8337,6 +8607,17 @@ export declare interface PageHandle extends ElementHandle {
8337
8607
  elements: Record<string, ElementHandle>;
8338
8608
  }
8339
8609
 
8610
+ export declare interface PageIssue {
8611
+ code: PageIssueCode;
8612
+ /** The sentence, as `problems` holds it. */
8613
+ message: string;
8614
+ /** The space's element it is about, by id — absent for one about the page as a whole, or outside every element. */
8615
+ elementId?: string;
8616
+ }
8617
+
8618
+ /** What kind of problem a page check found: what a tool branches on, where `message` is what a person reads. */
8619
+ export declare type PageIssueCode = 'not-rendered' | 'element-missing' | 'element-hidden' | 'image-not-loaded' | 'sideways-scroll' | 'illegible-text';
8620
+
8340
8621
  /**
8341
8622
  * Runs in the page that was pictured: its parts, where they are on the full page — its landmarks (header, nav, main,
8342
8623
  * footer, each section and aside), or, on a page that has none, the named blocks right inside the page. Each named by
@@ -8356,6 +8637,13 @@ export declare interface PageReport {
8356
8637
  * together, instead of stopping at the first locator that timed out and saying only that it did.
8357
8638
  */
8358
8639
  problems: string[];
8640
+ /** The same problems as data — each with its `code` and the element it is about — for a tool to act on. */
8641
+ issues: PageIssue[];
8642
+ /**
8643
+ * Owed, and hidden at this width on purpose — a breakpoint's `display: none`, the menu a phone shows instead: not a
8644
+ * problem, and said so a reader knows they were looked at. Checked at the width they show at.
8645
+ */
8646
+ hiddenAtWidth: string[];
8359
8647
  }
8360
8648
 
8361
8649
  export declare interface PageSpec {
@@ -8405,6 +8693,39 @@ export declare interface PageSpec {
8405
8693
  body: ElementSpec[];
8406
8694
  }
8407
8695
 
8696
+ /**
8697
+ * The words of two pages paired — the same text on both — and what each pair does differently: its size, its weight,
8698
+ * its colour, the box around it, where it sits. What a picture comparison says as a percentage, said as the property
8699
+ * that makes it, so a page being matched to another is changed where it differs instead of measured by hand.
8700
+ */
8701
+ /** One run of words on a page, with what decides how it looks. */
8702
+ export declare interface PageText {
8703
+ /** The words, with their spaces collapsed, cut at 120 characters: past them, the start is enough to tell two apart. */
8704
+ text: string;
8705
+ tag: string;
8706
+ /** Its box, on the whole page. */
8707
+ x: number;
8708
+ y: number;
8709
+ width: number;
8710
+ height: number;
8711
+ fontSize: number;
8712
+ fontWeight: string;
8713
+ lineHeight: string;
8714
+ letterSpacing: string;
8715
+ /** The first family the page names. */
8716
+ fontFamily: string;
8717
+ color: string;
8718
+ background: string;
8719
+ padding: string;
8720
+ radius: string;
8721
+ }
8722
+
8723
+ /**
8724
+ * Runs in the page: every element that holds words of its own and is drawn, with what decides how they look. Skips the
8725
+ * dev tools' own chrome, and what a visitor cannot see. Self-contained — it is serialised.
8726
+ */
8727
+ export declare const pageTexts: (limit: number) => PageText[];
8728
+
8408
8729
  export declare const pagination: {
8409
8730
  (props?: ElementProps<Partial<{
8410
8731
  mode?: "pages" | "loadMore" | undefined;
@@ -8466,18 +8787,44 @@ declare const PATH: unique symbol;
8466
8787
  /** The route for a slug: authoring stores it bare, and everything that navigates wants it absolute. */
8467
8788
  export declare const pathForSlug: (slug: string) => string;
8468
8789
 
8790
+ export declare interface PictureAlignment {
8791
+ /** For each region, in the order given, how far down `b` its rows are. */
8792
+ shifts: number[];
8793
+ /** For each row of `a`, how far down `b` the same row is — the smallest region holding the row decides. */
8794
+ rowShift: number[];
8795
+ /** The first region from the top that `b` has somewhere else, and how far. */
8796
+ drift?: {
8797
+ name: string;
8798
+ shift: number;
8799
+ };
8800
+ }
8801
+
8469
8802
  export declare interface PictureDiff {
8470
8803
  width: number;
8471
8804
  height: number;
8472
8805
  /** The share of pixels that differ, in percent, to one decimal. */
8473
8806
  changed: number;
8807
+ /** Each region's share that differs — and, compared aligned, how far down the other picture it sits (`shift`). */
8474
8808
  regions: {
8475
8809
  name: string;
8476
8810
  changed: number;
8811
+ shift?: number;
8477
8812
  }[];
8478
8813
  /** Both pictures beside each other, and the differences in red over a faded copy of the first — PNG data URLs. */
8479
8814
  sideBySide: string;
8480
8815
  diff: string;
8816
+ /** How tall each picture is. */
8817
+ heights: {
8818
+ a: number;
8819
+ b: number;
8820
+ };
8821
+ /** Compared aligned: the first region the other picture has somewhere else, and how far. */
8822
+ driftFrom?: {
8823
+ name: string;
8824
+ shift: number;
8825
+ };
8826
+ /** Compared aligned: for each row of the first picture, how far down the second the same row is. */
8827
+ rowShift?: number[];
8481
8828
  }
8482
8829
 
8483
8830
  export declare interface PictureDiffInput {
@@ -8487,6 +8834,11 @@ export declare interface PictureDiffInput {
8487
8834
  regions: PictureRegion[];
8488
8835
  /** How far apart two channels may be and still count as the same pixel (0–255) — anti-aliasing is not a change. */
8489
8836
  tolerance: number;
8837
+ /**
8838
+ * For each row of `a`, how far down `b` the same row is (`alignPictures`): each section compared with where it sits
8839
+ * in the other picture. Left out, row for row.
8840
+ */
8841
+ rowShift?: number[];
8490
8842
  }
8491
8843
 
8492
8844
  /** Anything that can run a function in a browser page — Playwright's `Page`, Puppeteer's. */
@@ -8499,8 +8851,9 @@ export declare interface PictureDriver {
8499
8851
  * reads "footer 2 %, spotlight 14 %" instead of looking at two full screenshots, and opens a picture only where the
8500
8852
  * numbers say something moved.
8501
8853
  *
8502
- * The comparison runs in a browser page (any driver's `evaluate`): a canvas is the one image decoder every driver
8503
- * already has, so this package stays one that installs nothing.
8854
+ * The pixels are read in a browser page (any driver's `evaluate`): a canvas is the one image decoder every driver
8855
+ * already has, so this package stays one that installs nothing. What can be worked out from a little data — where each
8856
+ * section of one page sits in the other — is worked out here, in plain functions.
8504
8857
  */
8505
8858
  /** A part of the page, by where it is in the picture: the landmarks a page is read by. */
8506
8859
  export declare interface PictureRegion {
@@ -8589,6 +8942,8 @@ export declare interface PluginDeclarationData {
8589
8942
  type: string;
8590
8943
  /** The source name it publishes under, when it publishes one. */
8591
8944
  sourceType?: string;
8945
+ /** Behaviour rather than content: it draws nothing on a page, so no check waits for it on screen. */
8946
+ drawsNothing?: boolean;
8592
8947
  /** The events it fires beyond the ones every element does, by action. */
8593
8948
  triggers?: Readonly<Record<string, {
8594
8949
  action: string;
@@ -8707,12 +9062,23 @@ export declare interface ProbeFindings {
8707
9062
  id: string;
8708
9063
  reason: string;
8709
9064
  }[];
8710
- brokenImages: string[];
9065
+ /** Owed, and hidden at this width by a breakpoint on purpose — checked at the width it shows at, not a problem. */
9066
+ byWidth: string[];
9067
+ /** Each with the element it is in, by id, when one of the space's holds it. */
9068
+ brokenImages: {
9069
+ source: string;
9070
+ elementId?: string;
9071
+ }[];
9072
+ /** `elementIds`: the widest ones the space named, for a tool to point at. */
8711
9073
  overflow: {
8712
9074
  pixels: number;
8713
9075
  widest: string[];
9076
+ elementIds: string[];
8714
9077
  } | null;
8715
- illegible: string[];
9078
+ illegible: {
9079
+ text: string;
9080
+ elementId?: string;
9081
+ }[];
8716
9082
  }
8717
9083
 
8718
9084
  /**
@@ -8730,6 +9096,16 @@ export declare interface ProbeInput {
8730
9096
  legibility: boolean;
8731
9097
  }
8732
9098
 
9099
+ /** Runs in the page: both pictures read as row profiles, which is what aligning them needs. Self-contained. */
9100
+ export declare const profilePictures: ({ a, b, columns }: {
9101
+ a: string;
9102
+ b: string;
9103
+ columns: number;
9104
+ }) => Promise<{
9105
+ a: RowProfile;
9106
+ b: RowProfile;
9107
+ }>;
9108
+
8733
9109
  declare type ProviderPagination = 'none' | 'url' | 'append';
8734
9110
 
8735
9111
  /**
@@ -8863,7 +9239,7 @@ export declare type ResponsiveBlock = Partial<Record<DisplayMode, StyleBlock>>;
8863
9239
 
8864
9240
  /**
8865
9241
  * Per-breakpoint CSS as an author writes it. Omitted breakpoints inherit `desktop`, as they do in the builder — and
8866
- * only `desktop`: `tablet` (48–64rem) and `mobile` (below 48rem) are disjoint ranges, so a `tablet` rule never
9242
+ * only `desktop`: `tablet` (48–64rem) and `mobile` (up to 48rem) are disjoint ranges, so a `tablet` rule never
8867
9243
  * reaches a phone unless `mobile` repeats it.
8868
9244
  *
8869
9245
  * `compact` is both of them at once — everything narrower than a desktop: the dock that replaces a sidebar, the grid
@@ -8886,6 +9262,14 @@ export declare const richText: ElementFactory<Partial<{
8886
9262
 
8887
9263
  export declare const row: (gap: string, extra?: CssProps) => StyleRules;
8888
9264
 
9265
+ /** A picture read row by row: each row the mean colour of each of `columns` bands across it, `columns * 3` values. */
9266
+ export declare interface RowProfile {
9267
+ width: number;
9268
+ height: number;
9269
+ columns: number;
9270
+ rows: number[];
9271
+ }
9272
+
8889
9273
  /** What a list's `row` function is: handed the row's names, it writes what the row renders. */
8890
9274
  export declare type RowWriter<Row> = (row: Row) => ElementSpec | ElementSpec[];
8891
9275
 
@@ -9630,9 +10014,9 @@ export declare interface SpaceSpec {
9630
10014
  */
9631
10015
  settings?: Partial<Omit<Schema['settings'], 'customCss'>>;
9632
10016
  /**
9633
- * Server-resolved data for this space's `runtime: 'server'` elements. It is off unless a space says otherwise,
9634
- * so a space whose providers are fed by the server declares `{ enabled: true }` — without it those elements
9635
- * render from their mock data and nothing anywhere reports a missing switch.
10017
+ * Server-resolved data for this space's `runtime: 'server'` elements: on unless a space turns it off. Left out,
10018
+ * authoring writes `{ enabled: true }` for a space that has a server element; `{ enabled: false }` with one is warned
10019
+ * (`server-data-without-rsc`).
9636
10020
  */
9637
10021
  rsc?: Schema['rsc'];
9638
10022
  mode?: Style['mode'];
@@ -9684,12 +10068,17 @@ export declare type SpecCorrectionCode = 'legacy-element-id' | 'legacy-element-t
9684
10068
  * it — or on one of its steps, by the flow it is in and its place there.
9685
10069
  */
9686
10070
  export declare interface SpecEdit extends Omit<FixChange, 'on'> {
9687
- on: 'attribute' | 'field' | 'binding' | 'step';
10071
+ /** `children`: the children it holds — only its words and an icon — written as its own `content` and `icon`. */
10072
+ on: 'attribute' | 'field' | 'binding' | 'step' | 'children';
9688
10073
  /** For a step: which of the element's `flows`, and which step in it. */
9689
10074
  step?: {
9690
10075
  flow: number;
9691
10076
  index: number;
9692
10077
  };
10078
+ /** For `children`: the icon's class, when one of them is an icon. */
10079
+ icon?: string;
10080
+ /** For `children`: where the icon goes, when it came after the words. */
10081
+ iconPlacement?: 'after';
9693
10082
  }
9694
10083
 
9695
10084
  export declare interface SpecFromSpace {
@@ -9971,6 +10360,11 @@ declare const styleConstants: {
9971
10360
  readonly BACKGROUND_ATTACHMENT: "background-attachment";
9972
10361
  readonly BACKGROUND_BLEND_MODE: "background-blend-mode";
9973
10362
  readonly MASK_IMAGE: "mask-image";
10363
+ readonly MASK_SIZE: "mask-size";
10364
+ readonly MASK_POSITION: "mask-position";
10365
+ readonly MASK_REPEAT: "mask-repeat";
10366
+ readonly MASK_COMPOSITE: "mask-composite";
10367
+ readonly WEBKIT_MASK_IMAGE: "-webkit-mask-image";
9974
10368
  readonly BORDER_TOP_STYLE: "border-top-style";
9975
10369
  readonly BORDER_TOP_WIDTH: "border-top-width";
9976
10370
  readonly BORDER_TOP_COLOR: "border-top-color";
@@ -10018,7 +10412,13 @@ declare const styleConstants: {
10018
10412
  readonly CLIP_PATH: "clip-path";
10019
10413
  readonly TRANSFORM: "transform";
10020
10414
  readonly TRANSFORM_ORIGIN: "transform-origin";
10415
+ readonly TRANSLATE: "translate";
10416
+ readonly ROTATE: "rotate";
10417
+ readonly SCALE: "scale";
10418
+ readonly TRANSFORM_STYLE: "transform-style";
10021
10419
  readonly PERSPECTIVE: "perspective";
10420
+ readonly PERSPECTIVE_ORIGIN: "perspective-origin";
10421
+ readonly BACKFACE_VISIBILITY: "backface-visibility";
10022
10422
  readonly WILL_CHANGE: "will-change";
10023
10423
  readonly OUTLINE_WIDTH: "outline-width";
10024
10424
  readonly OUTLINE_STYLE: "outline-style";
@@ -10060,6 +10460,8 @@ declare const styleConstants: {
10060
10460
  readonly OVERFLOW_Y: "overflow-y";
10061
10461
  readonly SCROLLBAR_WIDTH: "scrollbar-width";
10062
10462
  readonly SCROLLBAR_COLOR: "scrollbar-color";
10463
+ readonly CONTAINER_TYPE: "container-type";
10464
+ readonly CONTAINER_NAME: "container-name";
10063
10465
  readonly OBJECT_FIT: "object-fit";
10064
10466
  readonly OBJECT_POSITION: "object-position";
10065
10467
  readonly COLUMN_WIDTH: "column-width";
@@ -10105,6 +10507,9 @@ declare const styleConstants: {
10105
10507
  readonly WEBKIT_LINE_CLAMP: "-webkit-line-clamp";
10106
10508
  readonly WEBKIT_BOX_ORIENT: "-webkit-box-orient";
10107
10509
  readonly WEBKIT_TEXT_FILL_COLOR: "-webkit-text-fill-color";
10510
+ readonly WEBKIT_BACKGROUND_CLIP: "-webkit-background-clip";
10511
+ readonly BOX_DECORATION_BREAK: "box-decoration-break";
10512
+ readonly WEBKIT_BOX_DECORATION_BREAK: "-webkit-box-decoration-break";
10108
10513
  readonly FILL: "fill";
10109
10514
  readonly STROKE: "stroke";
10110
10515
  readonly STROKE_WIDTH: "stroke-width";
@@ -10275,6 +10680,25 @@ export declare const text: ElementFactory<Partial<{
10275
10680
  content?: string | number | undefined;
10276
10681
  }>>;
10277
10682
 
10683
+ export declare interface TextComparison {
10684
+ /** The texts found on both pages that look the same. */
10685
+ same: number;
10686
+ /** Those that do not, top to bottom on the first page. */
10687
+ differ: TextDifference[];
10688
+ /** Words only one of the two pages has. */
10689
+ onlyHere: string[];
10690
+ onlyThere: string[];
10691
+ }
10692
+
10693
+ /** A text on both pages, and what it does differently on the second: `font-size 68px → 60px`. */
10694
+ export declare interface TextDifference {
10695
+ tag: string;
10696
+ text: string;
10697
+ /** Where it is on the first page. */
10698
+ y: number;
10699
+ differences: string[];
10700
+ }
10701
+
10278
10702
  export declare type Theme = 'dark' | 'light' | 'system';
10279
10703
 
10280
10704
  export declare const themeToggle: {
@@ -10484,6 +10908,17 @@ declare type TypedListProps<Item> = Omit<ListProps, 'items' | 'row'> & {
10484
10908
  /** The triggers only some types fire, by action name — for a step builder that wants the title the builder shows. */
10485
10909
  export declare const typeTriggerDefinitions: Record<string, InteractionCallback>;
10486
10910
 
10911
+ /**
10912
+ * Runs in the page: the document made as tall as what it holds, so a picture of the whole page is the whole page.
10913
+ * Self-contained — it is serialised.
10914
+ *
10915
+ * The SDK renders into `.plitzi-sdk` with a column of its own that scrolls, so the document never does and a driver's
10916
+ * full-page picture has nothing to extend: it is one screen. The column that scrolls, and every element up to `<html>`,
10917
+ * stops clipping and stops being held to a height. The viewport is left as it is on purpose: grown to the content, every
10918
+ * `vh` would mean that height and a `100vh` hero would be thousands of pixels tall. Answers the document's height.
10919
+ */
10920
+ export declare const unrollPage: () => number;
10921
+
10487
10922
  /**
10488
10923
  * Changes one element's own attribute or state — the element `setState`, which is NOT the global one that writes
10489
10924
  * `runtime.state`. Left without a target it runs against the element the flow is declared on.