@plitzi/sdk-authoring 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @plitzi/sdk-authoring
2
2
 
3
+ ## 0.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cba7b8b: Authoring catches the tablet-only rule, declares fonts, and tells a test which pages and elements a visit can see.
8
+
9
+ - **`tablet-rule-skips-mobile` warning.** `tablet` compiles to 48–64rem and `mobile` to below 48rem, and each
10
+ inherits only from `desktop`. So a rule written for tablet and not for mobile hands phones the desktop value back —
11
+ a layout that collapsed at tablet came back as desktop columns on a phone, with every check passing. `authorSpace`
12
+ now warns, naming the class or element and the properties. The skill and `ResponsiveCss` say the same, and the
13
+ blank space every new space starts from — which had exactly this bug on its page and its cards — now carries
14
+ mobile rules.
15
+ - **`fonts` on `SpaceSpec`.** The page server loads only the faces `style.fonts` lists, and a space authored in code
16
+ had no way to list one, so a `font-family` silently rendered in its fallback. `fonts` goes through the same
17
+ `parseSpaceFont` as any manifest, and a malformed face is refused by index and family. `SpaceFont` is exported.
18
+ - **Handles for a suite that only opens pages.** `PageHandle` gains `accessLevel` and `params` (the route params its
19
+ slug declares), and `ElementHandle` gains `conditional` — present, and `true`, only when the element or anything
20
+ above it has a `visible` condition. `plitzi create`'s visual test uses them to skip what a bare visit cannot show.
21
+
22
+ ### Patch Changes
23
+
24
+ - v0.34.1
25
+
3
26
  ## 0.34.0
4
27
 
5
28
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -4106,6 +4106,16 @@ export declare interface ElementHandle {
4106
4106
  * derived ones are positional and change the moment a section is inserted above them.
4107
4107
  */
4108
4108
  named: boolean;
4109
+ /**
4110
+ * Whether this element is on screen only under a condition — a `visible` of its own or on anything above it.
4111
+ *
4112
+ * A menu that opens on a tap and a confirmation that appears after a submit are named so a flow can reach them,
4113
+ * and they are correctly NOT on a page somebody has only just opened. A suite asserting "everything named is
4114
+ * visible" skips these, or it forces the author to leave unnamed exactly what a flow needs to point at.
4115
+ *
4116
+ * Present only when true: almost nothing on a page is conditional, and the handles are serialized.
4117
+ */
4118
+ conditional?: true;
4109
4119
  }
4110
4120
 
4111
4121
  declare type ElementInteraction<T extends Record<string, unknown> = Record<string, unknown>> = {
@@ -5052,6 +5062,10 @@ export declare interface PageHandle extends ElementHandle {
5052
5062
  slug: string;
5053
5063
  /** The route a test navigates to, leading slash included — `/` for the home page. */
5054
5064
  path: string;
5065
+ /** Who the page is for, as declared. An `authenticated` page answers a visitor with no session with a 403 or a redirect. */
5066
+ accessLevel?: 'public' | 'authenticated';
5067
+ /** The route params its slug declares (`post/{{slug}}` → `['slug']`). A path with any is not a URL until they are filled. */
5068
+ params: string[];
5055
5069
  /** Everything on this page, by id. */
5056
5070
  elements: Record<string, ElementHandle>;
5057
5071
  }
@@ -5277,7 +5291,11 @@ export declare const resetForm: (target: string) => StepSpec;
5277
5291
  */
5278
5292
  export declare const resolveSource: (source: string, index: SourceIndex, where: string) => string;
5279
5293
 
5280
- /** Per-breakpoint CSS as an author writes it. Omitted breakpoints inherit, as they do in the builder. */
5294
+ /**
5295
+ * Per-breakpoint CSS as an author writes it. Omitted breakpoints inherit `desktop`, as they do in the builder — and
5296
+ * only `desktop`: `tablet` (48–64rem) and `mobile` (below 48rem) are disjoint ranges, so a `tablet` rule never
5297
+ * reaches a phone unless `mobile` repeats it.
5298
+ */
5281
5299
  export declare type ResponsiveCss = Partial<Record<DisplayMode, CssProps>>;
5282
5300
 
5283
5301
  /** Per-breakpoint CSS as it reaches the document. */
@@ -5538,6 +5556,14 @@ export declare interface SpaceSpec {
5538
5556
  rsc?: Schema['rsc'];
5539
5557
  mode?: Style['mode'];
5540
5558
  theme?: Style['theme'];
5559
+ /**
5560
+ * The web fonts this space loads — Google, hosted or remote faces, or a system stack.
5561
+ *
5562
+ * A `font-family` naming a face nobody declares here renders in the fallback, and silently: the renderer loads
5563
+ * exactly this list (the page server writes its `<link>`s and `@font-face` rules into the document) and nothing
5564
+ * else ever fetches a face.
5565
+ */
5566
+ fonts?: SpaceFont[];
5541
5567
  /** Route prefixes a page can sit under. See {@link PageFolderSpec}. */
5542
5568
  pageFolders?: PageFolderSpec[];
5543
5569
  pages: PageSpec[];