@bluepic/embed 0.7.0-layouts.4 → 0.7.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.
@@ -1,5 +1,5 @@
1
1
  import { BillingV3, FieldsBridge, Render, Studio, Template } from '@bluepic/types';
2
- import { Ref, type VNode } from 'vue';
2
+ import { Ref } from 'vue';
3
3
  import { z } from '@hono/zod-openapi';
4
4
  import BxLiveTemplate from '../components/TemplateEditor/BxLiveTemplate.vue';
5
5
  import { type ExportAnalyticsSink, type RenderLocation } from './analytics';
@@ -139,16 +139,6 @@ siblings?: Ref<CanvasSiblingsApi | undefined>,
139
139
  pendingFields?: {
140
140
  pendingCount: Ref<number>;
141
141
  review: () => void;
142
- },
143
- /**
144
- * Inline presentation (a host step such as bx-template's guided Share step):
145
- * every export ends in the export view, handed to the host to render in its
146
- * own page instead of a popup. Never bypassed, also for download-only pages.
147
- */
148
- inline?: {
149
- enabled: Ref<boolean>;
150
- present: (render: () => VNode) => void;
151
- reviewFields: () => void;
152
142
  }): {
153
143
  triggerExport: () => Promise<void>;
154
144
  consumeOutputFor: (rowData: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluepic/embed",
3
- "version": "0.7.0-layouts.4",
3
+ "version": "0.7.0",
4
4
  "description": "Bluepic embed sdk",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -47,11 +47,7 @@
47
47
  "test:imageaspect": "tsx src/util/imageAspect/imageAspect.test.ts",
48
48
  "test:blankdata": "tsx src/util/blankData.test.ts",
49
49
  "test:fieldstatus": "tsx src/util/fieldStatus.test.ts",
50
- "test:slotvnodes": "tsx src/util/slotVNodes.test.ts",
51
- "test:themescope": "tsx src/theme/scope.test.ts",
52
- "test:arrangement": "tsx src/components/TemplateEditor/editorArrangement.test.ts",
53
- "test:pageview": "tsx src/util/pageView.test.ts",
54
- "test:treenav": "tsx src/components/treeNav.test.ts"
50
+ "test:slotvnodes": "tsx src/util/slotVNodes.test.ts"
55
51
  },
56
52
  "peerDependencies": {
57
53
  "vue": "^3.5.23"
@@ -1,55 +0,0 @@
1
- declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
3
- readonly "onUpdate:index"?: ((value: number) => any) | undefined;
4
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:index"> & ({
5
- items: readonly T[];
6
- mode?: "3d" | "flat";
7
- /** Stable key of an item. Default: its index. */
8
- itemKey?: (item: T, index: number) => string | number;
9
- /** Wrap around at the ends. */
10
- loop?: boolean;
11
- /** Side cards per side on the 3D stage. */
12
- visible?: number;
13
- /** CSS width of a card. */
14
- cardWidth?: string;
15
- /** Gap between cards in flat mode. */
16
- gap?: string;
17
- arrows?: boolean;
18
- ariaLabel?: string;
19
- /** Accessible name of a slide, also announced after a change. */
20
- slideLabel?: (index: number, count: number) => string;
21
- prevLabel?: string;
22
- nextLabel?: string;
23
- /** Extra attributes on the flat row (for example a host's sortable contract). */
24
- listAttrs?: Record<string, string | number | boolean | undefined>;
25
- /** Extra attributes per card. */
26
- itemAttrs?: (item: T, index: number) => Record<string, string | number | boolean | undefined>;
27
- } & {
28
- index?: number;
29
- }) & Partial<{}>> & import("vue").PublicProps;
30
- expose(exposed: import("vue").ShallowUnwrapRef<{
31
- go: (i: number) => void;
32
- mode: import("vue").ComputedRef<"flat" | "3d">;
33
- }>): void;
34
- attrs: any;
35
- slots: {
36
- /** The front card. Optional: without it the front card renders `item` too. */
37
- front?: (scope: {
38
- item: T;
39
- index: number;
40
- }) => unknown;
41
- item?: (scope: {
42
- item: T;
43
- index: number;
44
- active: boolean;
45
- offset: number;
46
- }) => unknown;
47
- };
48
- emit: (evt: "update:index", value: number) => void;
49
- }>) => import("vue").VNode & {
50
- __ctx?: Awaited<typeof __VLS_setup>;
51
- };
52
- export default _default;
53
- type __VLS_PrettifyLocal<T> = {
54
- [K in keyof T]: T[K];
55
- } & {};
@@ -1,35 +0,0 @@
1
- export type BxChipOption = {
2
- id: string;
3
- label: string;
4
- count?: number | null;
5
- disabled?: boolean;
6
- };
7
- type __VLS_Props = {
8
- options: readonly BxChipOption[];
9
- multiple?: boolean;
10
- /** Label of a leading "all" chip. Omitted: no such chip. */
11
- allLabel?: string | null;
12
- /** Wrap onto several lines instead of scrolling sideways. */
13
- wrap?: boolean;
14
- size?: 'small' | 'medium';
15
- ariaLabel?: string;
16
- ariaLabelledby?: string;
17
- };
18
- type __VLS_PublicProps = __VLS_Props & {
19
- modelValue?: string | null | string[];
20
- };
21
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
- toggle: (id: string | null, selected: boolean) => any;
23
- "update:modelValue": (value: string | string[] | null) => any;
24
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
- onToggle?: ((id: string | null, selected: boolean) => any) | undefined;
26
- "onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
27
- }>, {
28
- ariaLabel: string;
29
- ariaLabelledby: string;
30
- multiple: boolean;
31
- size: "small" | "medium";
32
- wrap: boolean;
33
- allLabel: string | null;
34
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
- export default _default;
@@ -1,18 +0,0 @@
1
- type __VLS_Props = {
2
- headingId: string;
3
- ariaLabel?: string;
4
- };
5
- declare var __VLS_1: {}, __VLS_3: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_1) => any;
8
- } & {
9
- footer?: (props: typeof __VLS_3) => any;
10
- };
11
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
13
- export default _default;
14
- type __VLS_WithSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
@@ -1,35 +0,0 @@
1
- export type BxNavItem = {
2
- id: string;
3
- label: string;
4
- count?: number | null;
5
- href?: string;
6
- disabled?: boolean;
7
- children?: readonly BxNavItem[] | null;
8
- };
9
- type __VLS_Props = {
10
- items: readonly BxNavItem[];
11
- overflow?: 'more' | 'scroll' | 'wrap';
12
- align?: 'start' | 'center' | 'end';
13
- moreLabel?: string;
14
- ariaLabel?: string;
15
- };
16
- declare function measure(): void;
17
- type __VLS_PublicProps = __VLS_Props & {
18
- 'active'?: string | null;
19
- };
20
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
21
- close: () => null;
22
- measure: typeof measure;
23
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
- select: (item: BxNavItem) => any;
25
- "update:active": (value: string | null) => any;
26
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
27
- onSelect?: ((item: BxNavItem) => any) | undefined;
28
- "onUpdate:active"?: ((value: string | null) => any) | undefined;
29
- }>, {
30
- ariaLabel: string;
31
- align: "start" | "center" | "end";
32
- overflow: "more" | "scroll" | "wrap";
33
- moreLabel: string;
34
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
- export default _default;
@@ -1,32 +0,0 @@
1
- import type { ThemeInput } from '../theme/tokens';
2
- type __VLS_Props = {
3
- /** Band colour, any CSS colour. Empty or unparseable: no scope. */
4
- surface?: string | null;
5
- /** Page theme. Overrides the injected one. */
6
- input?: ThemeInput | null;
7
- /** Root element. */
8
- as?: string;
9
- /** Paint the band: `background-color: var(--bx-surface)` and `color: var(--bx-text)`. */
10
- paint?: boolean;
11
- };
12
- declare var __VLS_6: {
13
- mode: "light" | "dark" | null;
14
- };
15
- type __VLS_Slots = {} & {
16
- default?: (props: typeof __VLS_6) => any;
17
- };
18
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
19
- scope: import("vue").ComputedRef<import("../theme").ThemeScope | null>;
20
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
- input: ThemeInput | null;
22
- surface: string | null;
23
- as: string;
24
- paint: boolean;
25
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
27
- export default _default;
28
- type __VLS_WithSlots<T, S> = T & {
29
- new (): {
30
- $slots: S;
31
- };
32
- };
@@ -1,47 +0,0 @@
1
- import { type BxTreeNode } from './treeNav';
2
- type __VLS_Props = {
3
- nodes: readonly BxTreeNode[];
4
- showCounts?: boolean;
5
- /** Selecting a node with children also opens it. */
6
- expandOnSelect?: boolean;
7
- ariaLabel?: string;
8
- ariaLabelledby?: string;
9
- };
10
- type __VLS_Slots = {
11
- /** Replaces the label text of a row. */
12
- label?: (scope: {
13
- node: BxTreeNode;
14
- level: number;
15
- expanded: boolean;
16
- active: boolean;
17
- }) => unknown;
18
- };
19
- type __VLS_PublicProps = __VLS_Props & {
20
- 'active'?: string | null;
21
- 'expanded'?: string[];
22
- };
23
- declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
24
- focus: () => void | "";
25
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
- select: (node: BxTreeNode) => any;
27
- toggle: (id: string, expanded: boolean) => any;
28
- "update:active": (value: string | null) => any;
29
- "update:expanded": (value: string[]) => any;
30
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
31
- onSelect?: ((node: BxTreeNode) => any) | undefined;
32
- onToggle?: ((id: string, expanded: boolean) => any) | undefined;
33
- "onUpdate:active"?: ((value: string | null) => any) | undefined;
34
- "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
35
- }>, {
36
- ariaLabel: string;
37
- ariaLabelledby: string;
38
- showCounts: boolean;
39
- expandOnSelect: boolean;
40
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
42
- export default _default;
43
- type __VLS_WithSlots<T, S> = T & {
44
- new (): {
45
- $slots: S;
46
- };
47
- };
@@ -1,7 +0,0 @@
1
- import { type BxTreeNode } from './treeNav';
2
- type __VLS_Props = {
3
- nodes: readonly BxTreeNode[];
4
- level: number;
5
- };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
- export default _default;
@@ -1,20 +0,0 @@
1
- /**
2
- * Additive arrangement options of BxTemplateEditor (webpage layouts). Defaults equal the
3
- * editor's historical behaviour, so hosts that pass none of them see no change.
4
- */
5
- /** `full`: today's header. `actions`: only Export, canvas switcher and `navbar-right`, right-aligned, no bar background. */
6
- export type BxTemplateEditorChrome = 'full' | 'actions';
7
- /** Desktop list arrangement. `side`: fields beside the preview (today). `below`: fields under a width-fitted preview. */
8
- export type BxTemplateEditorFieldsPlacement = 'side' | 'below';
9
- /**
10
- * How many fields the desktop list shows for a `fieldLimit`.
11
- *
12
- * - no limit (undefined, not finite, < 1) or everything fits: all fields.
13
- * - more fields than the limit: the first `limit - 1`, the rest behind "More fields (n)".
14
- * Folding a single field behind a disclosure would cost a row and save none, which is
15
- * why exactly `limit` fields all show.
16
- */
17
- export declare function fieldLimitSplit<T>(fields: readonly T[], limit: number | undefined, expanded: boolean): {
18
- shown: T[];
19
- hiddenCount: number;
20
- };
@@ -1,32 +0,0 @@
1
- import type { InjectionKey, Slot } from 'vue';
2
- export type BxTreeNode = {
3
- id: string;
4
- label: string;
5
- /** Shown after the label. */
6
- count?: number | null;
7
- /** Hover text (`title`). */
8
- description?: string | null;
9
- disabled?: boolean;
10
- children?: readonly BxTreeNode[] | null;
11
- };
12
- export type BxTreeNavContext = {
13
- isExpanded: (id: string) => boolean;
14
- isActive: (id: string) => boolean;
15
- isTabbable: (id: string) => boolean;
16
- showCounts: () => boolean;
17
- activate: (node: BxTreeNode) => void;
18
- toggle: (node: BxTreeNode) => void;
19
- focus: (id: string) => void;
20
- setItemEl: (id: string, el: HTMLElement | null) => void;
21
- labelSlot: () => Slot | undefined;
22
- };
23
- export declare const TREE_NAV_KEY: InjectionKey<BxTreeNavContext>;
24
- export type TreeRow = {
25
- node: BxTreeNode;
26
- level: number;
27
- parentId: string | null;
28
- };
29
- /** Rows a keyboard user can reach: every node whose ancestors are all expanded, in display order. */
30
- export declare function visibleTreeRows(nodes: readonly BxTreeNode[], isExpanded: (id: string) => boolean, level?: number, parentId?: string | null, out?: TreeRow[]): TreeRow[];
31
- /** Ids from the root down to the node's parent, or null when the id is not in the tree. */
32
- export declare function treeAncestors(nodes: readonly BxTreeNode[], id: string, path?: string[]): string[] | null;
@@ -1,27 +0,0 @@
1
- import { type ResolvedTheme } from './resolve';
2
- import type { ThemeInput } from './tokens';
3
- import type { InjectionKey, MaybeRef } from 'vue';
4
- /**
5
- * Injection key for the page's ThemeInput (a `ThemeInput` or a ref of one). Provided by the
6
- * host page shell, read by `BxThemeScope`. `Symbol.for` so the key is the same symbol in
7
- * `@bluepic/embed` and `@bluepic/embed/theme`, which are separate bundles.
8
- */
9
- export declare const THEME_INPUT_KEY: InjectionKey<MaybeRef<ThemeInput | null | undefined>>;
10
- export declare function isSurfaceDerivedToken(name: string): boolean;
11
- /**
12
- * The ThemeInput of a band with its own surface. Keeps `primary`, `tint`, `contrast`,
13
- * `radius`, `font(s)` and the overrides that do not depend on the surface; drops
14
- * `customStyle` (raw component colours picked for the page surface) and the
15
- * surface-derived overrides.
16
- */
17
- export declare function deriveScopeInput(input: ThemeInput | null | undefined, surface: string): ThemeInput;
18
- export type ThemeScope = {
19
- theme: ResolvedTheme;
20
- /** `themeToCssVars(theme)`: tokens + legacy bridge, keys with the leading `--`. */
21
- vars: Record<string, string>;
22
- };
23
- /**
24
- * Resolve a band scope, memoised by (input, surface). Returns `null` when `surface` is not
25
- * a parseable CSS colour: no scope, the band inherits the page theme.
26
- */
27
- export declare function resolveThemeScope(input: ThemeInput | null | undefined, surface: string | null | undefined): ThemeScope | null;
@@ -1,5 +0,0 @@
1
- import { type Ref } from 'vue';
2
- /** Whether the visitor asked for reduced motion, right now. False without `matchMedia` (SSR, tests). */
3
- export declare function prefersReducedMotion(): boolean;
4
- /** `prefers-reduced-motion: reduce` as a live ref. Call in `setup`. */
5
- export declare function useReducedMotion(): Readonly<Ref<boolean>>;
@@ -1 +0,0 @@
1
- export declare function lockScroll(target?: HTMLElement | null): () => void;
@@ -1,24 +0,0 @@
1
- import { type MaybeRefOrGetter, type Ref } from 'vue';
2
- export type ScrollSpyOptions = {
3
- /** The scroll container. Default: the window. */
4
- root?: MaybeRefOrGetter<HTMLElement | null | undefined>;
5
- /** Height of sticky chrome above the content (px). A target counts as reached when its top passes this line. */
6
- offset?: MaybeRefOrGetter<number>;
7
- /** Element of a target id. Default `document.getElementById(id)`. */
8
- getElement?: (id: string) => HTMLElement | null | undefined;
9
- };
10
- export type ScrollSpy = {
11
- /** The target whose top last passed the offset line; the last one at the very bottom; else the first. */
12
- activeId: Ref<string | null>;
13
- /** Scroll so the target's top sits at the offset line. Smooth unless reduced motion. `activeId` follows at once. */
14
- scrollTo: (id: string, options?: {
15
- behavior?: ScrollBehavior;
16
- }) => void;
17
- /** Recompute now (after the content changed). */
18
- refresh: () => void;
19
- };
20
- /**
21
- * Scroll spy for chapter bars and anchor lists. Owns no scroll container: the
22
- * host passes it in. Call in `setup`.
23
- */
24
- export declare function useScrollSpy(targets: MaybeRefOrGetter<readonly string[]>, options?: ScrollSpyOptions): ScrollSpy;
@@ -1,127 +0,0 @@
1
- import { V4 } from '@bluepic/types';
2
- import { type PageGalleryCard, type PageGalleryOptions, type PortalAsset } from './gallery';
3
- type BaseTemplateDescriptor = {
4
- name: string;
5
- canvases?: readonly unknown[] | null;
6
- };
7
- /** What a layout shows. Structurally a superset of `V4.PageLayoutCapabilities`. */
8
- export type PageViewCapabilities = {
9
- /** `'active'` (or `true`): only the active subpage. `'all'`: every subpage, in order (chapters). `false`: merged. */
10
- subpages: 'active' | 'all' | boolean;
11
- /** `true`: sections as blocks. `'by-label'`: blocks merged by label (trimmed, case-insensitive). `false`: one block. */
12
- sections: boolean | 'by-label';
13
- /** `'inline'`: group members replace the group card, in member order, recursively. Default `'cards'`. */
14
- groups?: 'cards' | 'inline';
15
- };
16
- export type PageViewAspect = 'square' | 'portrait' | 'landscape';
17
- export type PageViewFilter = {
18
- /** Matches template name and asset title / filename / description. Case and diacritics are ignored; every word must match. */
19
- query?: string | null;
20
- /** Keep only blocks holding one of these section ids (a merged block matches through any of its `sectionIds`). Empty = all. */
21
- sectionIds?: readonly string[] | null;
22
- /** Keep only items of this aspect. Items without a known size drop out. */
23
- aspect?: PageViewAspect | null;
24
- };
25
- export type PageViewOptions<T> = Omit<PageGalleryOptions, 'layout'> & {
26
- layout: PageViewCapabilities;
27
- filter?: PageViewFilter | null;
28
- /** Searchable text of a template. Default: its `name`. */
29
- templateText?: (template: T, id: string) => string;
30
- /** Size of a template for the aspect filter. Default: first canvas, else `width` / `height` on the descriptor. */
31
- templateSize?: (template: T, id: string) => {
32
- width: number;
33
- height: number;
34
- } | null | undefined;
35
- };
36
- export type PageViewSection<T> = {
37
- /** The block's id: the section id, for a merged block the id of its first section. */
38
- id: string;
39
- subpageId: string;
40
- label: string;
41
- /** Render the label as a heading. */
42
- heading: boolean;
43
- items: V4.PageItemRef[];
44
- /** Every section this block stands for (one, or several when merged). */
45
- sectionIds: string[];
46
- cards: PageGalleryCard<T>[];
47
- /** Visible templates and assets in the block (a group counts its visible members). */
48
- count: number;
49
- };
50
- export type PageViewSubpage = {
51
- id: string;
52
- label: string;
53
- slug: string;
54
- description?: string;
55
- };
56
- export type PageViewChapter<T> = {
57
- subpage: PageViewSubpage;
58
- sections: PageViewSection<T>[];
59
- count: number;
60
- };
61
- /** A filter facet: the blocks of the current scope merged by label, counted without the `sectionIds` filter. */
62
- export type PageViewLabel = {
63
- id: string;
64
- label: string;
65
- sectionIds: string[];
66
- count: number;
67
- };
68
- export type PageViewTreeNode = {
69
- id: string;
70
- kind: 'subpage' | 'section' | 'group';
71
- label: string;
72
- /** Visible templates and assets below this node. */
73
- count: number;
74
- subpageId: string;
75
- /** Null for a subpage node. */
76
- sectionId: string | null;
77
- children: PageViewTreeNode[];
78
- };
79
- export type PageView<T> = {
80
- /** Subpage tabs. Empty when fewer than two subpages are shown, and always with `subpages: 'all'` (use `chapters`). */
81
- tabs: {
82
- id: string;
83
- label: string;
84
- slug: string;
85
- }[];
86
- /** `'active'`: the shown subpage. `'all'`: the one `activeSubpage` names (the scroll target), else the first. `false`: null. */
87
- activeSubpageId: string | null;
88
- /** Scroll anchors: only without tabs, when two or more labelled blocks are shown, never with `subpages: 'all'`. */
89
- anchors: {
90
- id: string;
91
- label: string;
92
- }[];
93
- /** Every shown subpage with its blocks (same section rules, filters applied). */
94
- chapters: PageViewChapter<T>[];
95
- /** The blocks to render: the active subpage, or every shown subpage in order. */
96
- sections: PageViewSection<T>[];
97
- /** Every card of `sections`, in document order (strip, carousel, wall). */
98
- cards: PageGalleryCard<T>[];
99
- /** Label facets of the scope (chips). */
100
- labels: PageViewLabel[];
101
- /** Visible items in `sections` (filters applied). */
102
- count: number;
103
- /** Visible items in the scope without any filter. */
104
- total: number;
105
- /** Subpages › labelled sections › groups, without filters. An unlabelled section is not a node: its groups sit under the subpage. */
106
- tree: PageViewTreeNode[];
107
- /** Where a template, asset or group id sits, for deep links. */
108
- locate(id: string): {
109
- subpageId: string;
110
- sectionId: string;
111
- } | null;
112
- };
113
- /** Lower case, diacritics removed (`NFD`), whitespace collapsed. */
114
- export declare function foldSearchText(text: string | null | undefined): string;
115
- /** `square` within ±10 % of 1:1, else `portrait` or `landscape`. Null for a missing or invalid size. */
116
- export declare function pageViewAspect(width: number | null | undefined, height: number | null | undefined): PageViewAspect | null;
117
- /**
118
- * The page as a layout shows it. Pure: same input, same output.
119
- *
120
- * Visibility is counted over what has data (a template missing from `templates`
121
- * or an asset missing from `assets` is not shown; a group shows when one of its
122
- * members does), then the filter applies on top.
123
- */
124
- export declare function buildPageView<T extends BaseTemplateDescriptor>(structure: V4.PageStructure, templates: {
125
- [k: string]: T;
126
- }, assets: readonly PortalAsset[] | undefined, options: PageViewOptions<T>): PageView<T>;
127
- export {};