@vectoriox/iox-ui 5.127.0 → 5.128.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions-core/index.d.ts +29 -8
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +40 -11
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +210 -5
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +38 -43
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +151 -2
- package/index.d.ts +32 -38
- package/package.json +1 -1
- package/src/actions-core/reveal-origin.ts +51 -12
- package/src/generation-core/node-baselines.generated.ts +7 -2
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-tree.ts +313 -0
- package/styles/iox-design.css +20 -11
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { LayoutPage } from './layout-language';
|
|
2
|
+
import { NavRole, NavShape, navShapeOf } from './nav-shape';
|
|
3
|
+
import { PageDataKind, PageDataLine, describePlanData } from './plan-data';
|
|
4
|
+
import { PatternGlobalPosition, patternById } from './patterns';
|
|
5
|
+
import { SerializedNode, walkSerialized } from './serialized-node';
|
|
6
|
+
import { CreatedKind, KeptReason, UndoPreview } from './site-build-run';
|
|
7
|
+
import { PagePlan, SitePlan } from './site-plan.model';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* THE SITE TREE (site-redesign-plan.md §3a, RD0, RD-D1): the site as a map — Home on top, the other pages below, a page
|
|
11
|
+
* per item under the page that lists them. DERIVED on read, never stored: from a plan (the wizard's Plan step) and from a
|
|
12
|
+
* studio (Pages ▸ Site map) in ONE shape, so both screens draw ONE view model with ONE component (R-H6). Pages have no
|
|
13
|
+
* parent field: a page's parent is the page whose route is the longest prefix of its own (`/work/:slug` → `/work`); a
|
|
14
|
+
* page with none sits in the row under Home. Pure.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** Who made a page, as the Site map says it (its edge tag and footer row). */
|
|
18
|
+
export enum SitePageMaker {
|
|
19
|
+
/** A build made it and nobody changed it since (the build's fingerprints say so). */
|
|
20
|
+
Built = 'built',
|
|
21
|
+
/** A build made it and the owner changed it since — "Edited by you". */
|
|
22
|
+
Edited = 'edited',
|
|
23
|
+
/** No build made it — "Made by you". */
|
|
24
|
+
Owner = 'owner',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** A section as the map draws it: a strip of its family's glyph. `pattern` is null on a hand-made page. */
|
|
28
|
+
export interface SiteTreeSection {
|
|
29
|
+
readonly pattern: string | null;
|
|
30
|
+
/** The section family (`hero`, `collection`, `contact`…) — what the strip is drawn as. */
|
|
31
|
+
readonly family: string;
|
|
32
|
+
readonly label: string;
|
|
33
|
+
/** It holds the page and moves as the visitor scrolls (SC6). */
|
|
34
|
+
readonly scene?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface SiteTreePage {
|
|
38
|
+
/** The plan page key (a plan), or the page `_id` (a studio). */
|
|
39
|
+
readonly key: string;
|
|
40
|
+
/** The page document's `_id` — a studio's page only. */
|
|
41
|
+
readonly id?: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly route: string;
|
|
44
|
+
readonly isHome: boolean;
|
|
45
|
+
/** A page per item (its route holds a parameter). */
|
|
46
|
+
readonly template: boolean;
|
|
47
|
+
readonly sections: ReadonlyArray<SiteTreeSection>;
|
|
48
|
+
/** What it shows and where its data comes from (`describePlanData`'s lines; a hand-made page's read from its nodes). */
|
|
49
|
+
readonly data: ReadonlyArray<PageDataLine>;
|
|
50
|
+
/** A page the model composed: its layout, drawn as its own map instead of section strips. */
|
|
51
|
+
readonly layout?: LayoutPage;
|
|
52
|
+
/** A plan page answering an inferred need (the Plan step's "we added"). */
|
|
53
|
+
readonly need?: boolean;
|
|
54
|
+
/** A studio's page: who made it, its status and when it last changed. */
|
|
55
|
+
readonly maker?: SitePageMaker;
|
|
56
|
+
/** The build's fingerprints were read (else "Built" is all that is known — never "not changed since"). */
|
|
57
|
+
readonly editsKnown?: boolean;
|
|
58
|
+
readonly status?: string;
|
|
59
|
+
readonly changedAt?: string | null;
|
|
60
|
+
/** When the build that made it finished. */
|
|
61
|
+
readonly builtAt?: string | null;
|
|
62
|
+
/** A page per item: how many pages that is (its content type's item count), when known. */
|
|
63
|
+
readonly items?: number | null;
|
|
64
|
+
readonly children: ReadonlyArray<SiteTreePage>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface SiteTreeType {
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly label: string;
|
|
70
|
+
readonly fields: ReadonlyArray<string>;
|
|
71
|
+
/** A studio: its items. A plan: the samples the build will make. */
|
|
72
|
+
readonly count: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The header and footer every page wears, as the Content strip says them. */
|
|
76
|
+
export interface SiteTreeGlobals {
|
|
77
|
+
/** Links the header carries. */
|
|
78
|
+
readonly links: number;
|
|
79
|
+
readonly phoneMenu: `${NavShape}` | null;
|
|
80
|
+
/** The footer's copyright line, as written. */
|
|
81
|
+
readonly copyright: string | null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface SiteTree {
|
|
85
|
+
readonly home: SiteTreePage | null;
|
|
86
|
+
/** The row under Home, each with the pages under it (depth-first, nested by route). */
|
|
87
|
+
readonly pages: ReadonlyArray<SiteTreePage>;
|
|
88
|
+
readonly types: ReadonlyArray<SiteTreeType>;
|
|
89
|
+
readonly globals: SiteTreeGlobals | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── The parent rule ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
93
|
+
|
|
94
|
+
const segmentsOf = (route: string): string[] => String(route ?? '').split('/').filter(Boolean);
|
|
95
|
+
|
|
96
|
+
/** A route holding a parameter (`/work/:slug`) — a page per item. */
|
|
97
|
+
export const isTemplateRoute = (route: string): boolean => segmentsOf(route).some(s => s.startsWith(':'));
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The route of a page's parent among `routes`: the longest route that is a whole-segment prefix of it (`/work` for
|
|
101
|
+
* `/work/:slug`, never `/wor`), or null — then the page sits in the row under Home. Home (`/`) is never a parent here:
|
|
102
|
+
* every page is under it.
|
|
103
|
+
*/
|
|
104
|
+
export function siteParentRoute(route: string, routes: ReadonlyArray<string>): string | null {
|
|
105
|
+
const own = segmentsOf(route);
|
|
106
|
+
let best: string | null = null;
|
|
107
|
+
let bestLength = 0;
|
|
108
|
+
for (const candidate of routes) {
|
|
109
|
+
const segs = segmentsOf(candidate);
|
|
110
|
+
if (!segs.length || segs.length >= own.length || segs.length <= bestLength) continue;
|
|
111
|
+
if (segs.every((s, i) => s === own[i])) { best = candidate; bestLength = segs.length; }
|
|
112
|
+
}
|
|
113
|
+
return best;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type Draft = Omit<SiteTreePage, 'children'> & { children: Draft[] };
|
|
117
|
+
|
|
118
|
+
/** Pages into the tree: Home apart, every other page under its parent (`siteParentRoute`), in the given order. */
|
|
119
|
+
export function nestSitePages(pages: ReadonlyArray<Omit<SiteTreePage, 'children'>>): { home: SiteTreePage | null; pages: SiteTreePage[] } {
|
|
120
|
+
const homePage = pages.find(p => p.isHome) ?? null;
|
|
121
|
+
const rest = pages.filter(p => p !== homePage);
|
|
122
|
+
const drafts: Draft[] = rest.map(p => ({ ...p, children: [] }));
|
|
123
|
+
const byRoute = new Map(drafts.map(d => [d.route, d]));
|
|
124
|
+
const routes = drafts.map(d => d.route);
|
|
125
|
+
const top: Draft[] = [];
|
|
126
|
+
for (const d of drafts) {
|
|
127
|
+
const parent = siteParentRoute(d.route, routes);
|
|
128
|
+
const holder = parent ? byRoute.get(parent) : undefined;
|
|
129
|
+
if (holder && holder !== d) holder.children.push(d); else top.push(d);
|
|
130
|
+
}
|
|
131
|
+
return { home: homePage ? { ...homePage, children: [] } : null, pages: top };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Every page of the tree, depth-first (Home first). */
|
|
135
|
+
export function sitePagesOf(tree: Pick<SiteTree, 'home' | 'pages'>): SiteTreePage[] {
|
|
136
|
+
const out: SiteTreePage[] = tree.home ? [tree.home] : [];
|
|
137
|
+
const walk = (p: SiteTreePage) => { out.push(p); p.children.forEach(walk); };
|
|
138
|
+
tree.pages.forEach(walk);
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ── From a plan (the wizard's Plan step) ─────────────────────────────────────────────────────────────────────────
|
|
143
|
+
|
|
144
|
+
const sectionOfPattern = (id: string): SiteTreeSection => {
|
|
145
|
+
const pattern = patternById(id);
|
|
146
|
+
return { pattern: id, family: id.split('.')[0], label: pattern?.label ?? id, ...(pattern?.scene ? { scene: true } : {}) };
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
function planPage(p: PagePlan, data: ReadonlyArray<PageDataLine>): Omit<SiteTreePage, 'children'> {
|
|
150
|
+
return {
|
|
151
|
+
key: p.key, name: p.name, route: p.route, isHome: !!p.isHome, template: !!p.template,
|
|
152
|
+
sections: p.sections.map(s => sectionOfPattern(s.pattern)), data,
|
|
153
|
+
...(p.layout ? { layout: p.layout } : {}), ...(p.need ? { need: true } : {}),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** A plan as the site tree: the map the Plan step draws (the samples each content type will have). */
|
|
158
|
+
export function siteTreeOfPlan(plan: SitePlan): SiteTree {
|
|
159
|
+
const data = new Map(describePlanData(plan).map(d => [d.pageKey, d.lines]));
|
|
160
|
+
const nested = nestSitePages(plan.pages.map(p => planPage(p, data.get(p.key) ?? [])));
|
|
161
|
+
return {
|
|
162
|
+
...nested,
|
|
163
|
+
types: plan.contentTypes.map(t => ({ name: t.name, label: t.label, fields: t.fields.map(f => f.name), count: t.seed?.count ?? 0 })),
|
|
164
|
+
globals: null,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ── From a studio (Pages ▸ Site map) ─────────────────────────────────────────────────────────────────────────────
|
|
169
|
+
|
|
170
|
+
/** A page document as the Pages list reads it. */
|
|
171
|
+
export interface SiteStudioPage {
|
|
172
|
+
readonly _id: string;
|
|
173
|
+
readonly name: string;
|
|
174
|
+
readonly route: { readonly path: string } | string;
|
|
175
|
+
readonly isHome?: boolean;
|
|
176
|
+
readonly status?: string;
|
|
177
|
+
readonly updatedAt?: string | null;
|
|
178
|
+
readonly layout?: ReadonlyArray<SerializedNode> | null;
|
|
179
|
+
readonly pageSettings?: { readonly layoutSource?: { readonly runId?: string; readonly pageKey?: string } | null } | null;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** A build run the studio's pages name (`layoutSource.runId`): its plan, when it finished, and the pages its fingerprints
|
|
183
|
+
* say were changed since (`editedPageIds` of its undo preview; null when it could not be read). */
|
|
184
|
+
export interface SiteStudioRun {
|
|
185
|
+
readonly id: string;
|
|
186
|
+
readonly plan: SitePlan;
|
|
187
|
+
readonly finishedAt?: string | null;
|
|
188
|
+
readonly edited?: ReadonlyArray<string> | null;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface SiteStudio {
|
|
192
|
+
readonly pages: ReadonlyArray<SiteStudioPage>;
|
|
193
|
+
readonly runs?: ReadonlyArray<SiteStudioRun>;
|
|
194
|
+
/** The studio's content types with their item counts. */
|
|
195
|
+
readonly contentTypes?: ReadonlyArray<{ readonly name: string; readonly label?: string; readonly fields?: ReadonlyArray<string>; readonly count?: number | null }>;
|
|
196
|
+
/** The org's data sources (alias → content type), to say what a hand-made page lists. */
|
|
197
|
+
readonly dataSources?: ReadonlyArray<{ readonly alias: string; readonly contentType?: string | null }>;
|
|
198
|
+
/** The global elements (header, footer, dialogs). */
|
|
199
|
+
readonly globals?: ReadonlyArray<SerializedNode> | null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** The page ids a build's undo preview keeps because the owner changed them — the W2 fingerprints, the one judge. */
|
|
203
|
+
export function editedPageIds(preview: Pick<UndoPreview, 'kept'> | null | undefined): string[] | null {
|
|
204
|
+
if (!preview) return null;
|
|
205
|
+
return preview.kept.filter(k => k.kind === CreatedKind.Page && k.reason === KeptReason.Edited).map(k => k.id);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const routeOf = (route: SiteStudioPage['route']): string => (typeof route === 'string' ? route : route?.path ?? '');
|
|
209
|
+
|
|
210
|
+
/** A hand-made section's family, by what it holds: first match wins (the map's strips are a sketch, never a claim). */
|
|
211
|
+
const FAMILY_BY_CONTENT: ReadonlyArray<{ family: string; types: ReadonlyArray<string> }> = [
|
|
212
|
+
{ family: 'contact', types: ['Form'] },
|
|
213
|
+
{ family: 'collection', types: ['Repeater', 'SliderContainer', 'List', 'Gallery'] },
|
|
214
|
+
{ family: 'project', types: ['Image', 'Video'] },
|
|
215
|
+
];
|
|
216
|
+
const FIRST_FAMILY = 'hero';
|
|
217
|
+
const PLAIN_FAMILY = 'feature';
|
|
218
|
+
const SOURCE_PROP = 'source';
|
|
219
|
+
|
|
220
|
+
function typesUnder(node: SerializedNode): Set<string> {
|
|
221
|
+
const types = new Set<string>();
|
|
222
|
+
walkSerialized([node], n => { types.add(n.type); });
|
|
223
|
+
return types;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** A top-level node of a hand-made page as a strip: the first one with a picture opens the page. */
|
|
227
|
+
function handSection(node: SerializedNode, index: number): SiteTreeSection {
|
|
228
|
+
const types = typesUnder(node);
|
|
229
|
+
const found = FAMILY_BY_CONTENT.find(f => f.types.some(t => types.has(t)))?.family;
|
|
230
|
+
const family = index === 0 && found === 'project' ? FIRST_FAMILY : found ?? PLAIN_FAMILY;
|
|
231
|
+
return { pattern: null, family, label: node.label || node.type };
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** What a hand-made page shows: each list it repeats (by its data source's content type), each form, else words. */
|
|
235
|
+
function handData(layout: ReadonlyArray<SerializedNode>, studio: SiteStudio, label: (type: string) => string): PageDataLine[] {
|
|
236
|
+
const lines: PageDataLine[] = [];
|
|
237
|
+
const add = (line: PageDataLine) => { if (!lines.some(l => JSON.stringify(l) === JSON.stringify(line))) lines.push(line); };
|
|
238
|
+
const typeOfAlias = new Map((studio.dataSources ?? []).map(d => [d.alias, d.contentType ?? null]));
|
|
239
|
+
walkSerialized(layout as SerializedNode[], n => {
|
|
240
|
+
if (n.type === 'Form') add({ kind: PageDataKind.Form });
|
|
241
|
+
const source = n.bindings?.find(b => b.prop === SOURCE_PROP)?.source;
|
|
242
|
+
const type = source ? typeOfAlias.get(source) : null;
|
|
243
|
+
if (type) add({ kind: PageDataKind.List, contentType: label(type) });
|
|
244
|
+
});
|
|
245
|
+
return lines.length ? lines : [{ kind: PageDataKind.Static }];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* A studio as the site tree: each page drawn from the build that made it (its plan page — sections, data lines, the
|
|
250
|
+
* composed layout) when it has one, else from its own top-level nodes; who made it (`SitePageMaker`), its status, when
|
|
251
|
+
* it changed; a page per item counted from its content type; the header and footer in words. Pure.
|
|
252
|
+
*/
|
|
253
|
+
export function siteTreeOf(studio: SiteStudio): SiteTree {
|
|
254
|
+
const runs = new Map((studio.runs ?? []).map(r => [r.id, r]));
|
|
255
|
+
const types = studio.contentTypes ?? [];
|
|
256
|
+
const label = (name: string) => types.find(t => t.name === name)?.label || name;
|
|
257
|
+
const countOf = (name: string | undefined) => (name ? types.find(t => t.name === name)?.count ?? null : null);
|
|
258
|
+
const planData = new Map<string, Map<string, PageDataLine[]>>();
|
|
259
|
+
const dataOf = (run: SiteStudioRun, key: string): PageDataLine[] => {
|
|
260
|
+
if (!planData.has(run.id)) planData.set(run.id, new Map(describePlanData(run.plan).map(d => [d.pageKey, d.lines])));
|
|
261
|
+
return planData.get(run.id)!.get(key) ?? [];
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
const nodes = studio.pages.map((page): Omit<SiteTreePage, 'children'> => {
|
|
265
|
+
const route = routeOf(page.route);
|
|
266
|
+
const base = {
|
|
267
|
+
key: page._id, id: page._id, name: page.name, route, isHome: !!page.isHome, template: isTemplateRoute(route),
|
|
268
|
+
status: page.status, changedAt: page.updatedAt ?? null,
|
|
269
|
+
};
|
|
270
|
+
const source = page.pageSettings?.layoutSource;
|
|
271
|
+
const run = source?.runId ? runs.get(source.runId) : undefined;
|
|
272
|
+
const planned = run && source?.pageKey ? run.plan.pages.find(p => p.key === source.pageKey) : undefined;
|
|
273
|
+
if (run && planned) {
|
|
274
|
+
const known = Array.isArray(run.edited);
|
|
275
|
+
return {
|
|
276
|
+
...planPage(planned, dataOf(run, planned.key)), ...base,
|
|
277
|
+
maker: known && run.edited!.includes(page._id) ? SitePageMaker.Edited : SitePageMaker.Built, editsKnown: known,
|
|
278
|
+
builtAt: run.finishedAt ?? null, items: planned.template ? countOf(planned.template) : null,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const layout = page.layout ?? [];
|
|
282
|
+
return {
|
|
283
|
+
...base, sections: layout.map(handSection), data: handData(layout, studio, label),
|
|
284
|
+
maker: source?.runId ? SitePageMaker.Built : SitePageMaker.Owner, items: null,
|
|
285
|
+
};
|
|
286
|
+
});
|
|
287
|
+
const nested = nestSitePages(nodes);
|
|
288
|
+
return {
|
|
289
|
+
...nested,
|
|
290
|
+
types: types.map(t => ({ name: t.name, label: t.label || t.name, fields: [...(t.fields ?? [])], count: t.count ?? 0 })),
|
|
291
|
+
globals: studio.globals ? siteGlobalsOf(studio.globals) : null,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const LINK_TYPES: ReadonlySet<string> = new Set(['Link', 'ButtonBlock']);
|
|
296
|
+
const COPYRIGHT = '©';
|
|
297
|
+
|
|
298
|
+
/** The header and footer in words: the header's links (its navigation's own when it has one — the drawer repeats them),
|
|
299
|
+
* its phone menu, the footer's copyright line. */
|
|
300
|
+
export function siteGlobalsOf(globals: ReadonlyArray<SerializedNode>): SiteTreeGlobals | null {
|
|
301
|
+
if (!globals.length) return null;
|
|
302
|
+
const header: SerializedNode[] = [];
|
|
303
|
+
let copyright: string | null = null;
|
|
304
|
+
for (const g of globals) {
|
|
305
|
+
walkSerialized([g], n => {
|
|
306
|
+
if (g.globalPosition !== PatternGlobalPosition.After) header.push(n);
|
|
307
|
+
const text = String(n.props?.['content'] ?? n.props?.['text'] ?? '');
|
|
308
|
+
if (!copyright && g.globalPosition === PatternGlobalPosition.After && text.includes(COPYRIGHT)) copyright = text.replace(/<[^>]*>/g, '').trim();
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
const navLinks = header.filter(n => n.role === NavRole.Link).length;
|
|
312
|
+
return { links: navLinks || header.filter(n => LINK_TYPES.has(n.type)).length, phoneMenu: navShapeOf(globals), copyright };
|
|
313
|
+
}
|
package/styles/iox-design.css
CHANGED
|
@@ -537,21 +537,21 @@ dialog[data-iox-dialog].iox-es[data-iox-menu='full'] {
|
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
@media (min-width: 768px) {
|
|
540
|
-
/* The card opens from the menu button's corner:
|
|
540
|
+
/* The card opens from the menu button's corner (board v2: 10px down, 14px in, 440 wide), as tall as its content. */
|
|
541
541
|
dialog[data-iox-dialog].iox-es[data-iox-menu='card'] {
|
|
542
|
-
margin-block:
|
|
543
|
-
margin-inline: auto
|
|
544
|
-
width: min(
|
|
542
|
+
margin-block: 10px auto;
|
|
543
|
+
margin-inline: auto 14px;
|
|
544
|
+
width: min(440px, calc(100vw - 28px));
|
|
545
545
|
max-width: none;
|
|
546
546
|
height: fit-content;
|
|
547
|
-
max-height: calc(100dvh -
|
|
547
|
+
max-height: calc(100dvh - 20px);
|
|
548
548
|
overflow: auto;
|
|
549
549
|
border-radius: var(--iox-dialog-radius);
|
|
550
550
|
--dialog-exit-x: 0px;
|
|
551
551
|
--dialog-exit-y: -14px;
|
|
552
552
|
--dialog-exit-opacity: 0;
|
|
553
553
|
}
|
|
554
|
-
dialog[data-iox-dialog].iox-es[data-iox-menu='card'][data-iox-dialog-placement='start'] { margin-inline:
|
|
554
|
+
dialog[data-iox-dialog].iox-es[data-iox-menu='card'][data-iox-dialog-placement='start'] { margin-inline: 14px auto; }
|
|
555
555
|
/* The top panel (T7): anchored to the top, as tall as its content; past 80dvh it scrolls inside itself. */
|
|
556
556
|
dialog[data-iox-dialog].iox-es[data-iox-menu='panel'] {
|
|
557
557
|
margin: 0 0 auto;
|
|
@@ -565,13 +565,13 @@ dialog[data-iox-dialog].iox-es[data-iox-menu='full'] {
|
|
|
565
565
|
--dialog-exit-y: -14px;
|
|
566
566
|
--dialog-exit-opacity: 0;
|
|
567
567
|
}
|
|
568
|
-
/* The mega panel: wide, floating just under the top edge, its pages in columns. */
|
|
568
|
+
/* The mega panel: wide, floating just under the top edge (board v2: 10px down, 14px in), its pages in columns. */
|
|
569
569
|
dialog[data-iox-dialog].iox-es[data-iox-menu='mega'] {
|
|
570
|
-
margin:
|
|
571
|
-
width: calc(100% -
|
|
570
|
+
margin: 10px 14px auto;
|
|
571
|
+
width: calc(100% - 28px);
|
|
572
572
|
max-width: none;
|
|
573
573
|
height: fit-content;
|
|
574
|
-
max-height: calc(100dvh -
|
|
574
|
+
max-height: calc(100dvh - 20px);
|
|
575
575
|
overflow: auto;
|
|
576
576
|
border-radius: var(--iox-dialog-radius);
|
|
577
577
|
--dialog-exit-x: 0px;
|
|
@@ -752,6 +752,13 @@ dialog[data-iox-dialog].iox-es[data-iox-menu='full'] {
|
|
|
752
752
|
--menu-in: min(200ms, calc(var(--iox-dur-ui, 200ms) * 100));
|
|
753
753
|
--menu-out: min(200ms, calc(var(--iox-dur-ui, 200ms) * 100));
|
|
754
754
|
}
|
|
755
|
+
/* …and only opacity may transition: an origin the reveal writes as it opens moves nothing. */
|
|
756
|
+
dialog[data-iox-dialog].iox-es:is([data-iox-menu], [data-iox-reveal], [data-iox-menu-phone]) {
|
|
757
|
+
transition-property: opacity, overlay, display;
|
|
758
|
+
transition-behavior: normal, allow-discrete, allow-discrete;
|
|
759
|
+
}
|
|
760
|
+
/* The torn edge's sheet follows the origin too: under reduced motion it takes its place at once. */
|
|
761
|
+
:is(dialog[data-iox-dialog].iox-es, .dialog-surface)[data-iox-reveal='torn']::before { transition: none; }
|
|
755
762
|
}
|
|
756
763
|
|
|
757
764
|
/* BUTTONS (board 2): the menu button and the menu's Close are ONE button, closed and open — the Close lands where the
|
|
@@ -759,7 +766,9 @@ dialog[data-iox-dialog].iox-es[data-iox-menu='full'] {
|
|
|
759
766
|
mouse; open, the four corners and the centre stay — a cross. Lines is the list icon and the X (today's). Drawn by two
|
|
760
767
|
pseudo-elements laid one over the other in the button's own row (the canvas forces a node's position, so nothing here
|
|
761
768
|
is positioned); its icon stays for a renderer without this file. */
|
|
762
|
-
|
|
769
|
+
/* The icon node a dots button holds is hidden by an id-weighted :is() (#iox-menu-dots matches nothing): its own compiled
|
|
770
|
+
rule (`.iox-node-<id> { display: block }`) comes later on the page and would otherwise win (found by e2e:menuproof). */
|
|
771
|
+
:is([data-iox-menu-button='dots'], #iox-menu-dots) > * { display: none; }
|
|
763
772
|
[data-iox-menu-button='dots']::before,
|
|
764
773
|
[data-iox-menu-button='dots']::after {
|
|
765
774
|
content: '';
|