@vectoriox/iox-ui 5.88.0 → 5.90.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/design-core/index.d.ts +523 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +3 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +581 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +4692 -160
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +12 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +46 -6
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +6 -4
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +1611 -10
- package/harness-core/index.d.ts +52 -3
- package/package.json +1 -1
- package/scene-core/index.d.ts +28 -2
- package/src/composite-core/slider.ts +3 -2
- package/src/design-core/flavor-spec.generated.ts +500 -0
- package/src/design-core/font-metrics.ts +105 -0
- package/src/design-core/public-api.ts +1 -0
- package/src/generation-core/ai-run.ts +11 -0
- package/src/generation-core/audit-site.ts +5 -0
- package/src/generation-core/check-layout.ts +940 -0
- package/src/generation-core/compose-layout.ts +907 -0
- package/src/generation-core/compose-site.ts +136 -5
- package/src/generation-core/layout-drift.ts +78 -0
- package/src/generation-core/layout-edits.ts +122 -0
- package/src/generation-core/layout-fingerprint.ts +203 -0
- package/src/generation-core/layout-language.ts +537 -0
- package/src/generation-core/layout-look.ts +57 -0
- package/src/generation-core/layout-photos.ts +19 -0
- package/src/generation-core/layout-render-check.ts +275 -0
- package/src/generation-core/layout-section-fallback.ts +156 -0
- package/src/generation-core/layout-type.ts +48 -0
- package/src/generation-core/layout-wire.ts +282 -0
- package/src/generation-core/nav-shape.ts +23 -1
- package/src/generation-core/photo-inventory.ts +250 -0
- package/src/generation-core/plan-edits.ts +25 -2
- package/src/generation-core/plan-wire.ts +19 -2
- package/src/generation-core/public-api.ts +13 -0
- package/src/generation-core/site-plan.model.ts +16 -0
- package/src/generation-core/site-spec.generated.ts +759 -2
- package/src/generation-core/validate-site-plan.ts +55 -1
- package/src/harness-core/generation-view.ts +52 -1
- package/src/scene-core/scroll-driver.ts +14 -2
- package/src/scene-core/scroll-range.ts +37 -4
- package/styles/iox-design.css +17 -0
- package/styles/iox-forms.css +4 -0
|
@@ -70,6 +70,7 @@ export enum PlanWireEntry {
|
|
|
70
70
|
SlotText = 'slotText',
|
|
71
71
|
SlotLink = 'slotLink',
|
|
72
72
|
Globals = 'globals',
|
|
73
|
+
Direction = 'direction',
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
type PlanShapeName = keyof typeof SPEC_SITE_PLAN_SHAPE;
|
|
@@ -99,6 +100,13 @@ const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, Wir
|
|
|
99
100
|
dataSources: inPart(PlanPart.Structure, { refs: ['plan.dataSources'], text: "dataSource[] — merged by alias into the org library; a per-item page's $siblings.next source (what a section reading the next item needs) is added for you" }),
|
|
100
101
|
pages: inPart(PlanPart.Pages, key('plan.pages')),
|
|
101
102
|
globals: inPart(PlanPart.Pages, key('plan.globals')),
|
|
103
|
+
direction: inPart(PlanPart.Pages, key('plan.direction')),
|
|
104
|
+
},
|
|
105
|
+
direction: {
|
|
106
|
+
idea: key('direction.idea'),
|
|
107
|
+
cliche: key('direction.cliche'),
|
|
108
|
+
flip: key('direction.flip'),
|
|
109
|
+
rules: key('direction.rules'),
|
|
102
110
|
},
|
|
103
111
|
business: {
|
|
104
112
|
name: key('business.name'),
|
|
@@ -155,6 +163,7 @@ const WIRE_KEYS: Readonly<Record<`${PlanWireEntry}`, Readonly<Record<string, Wir
|
|
|
155
163
|
routeSource: key('page.routeSource', "''"),
|
|
156
164
|
seo: key('page.seo'),
|
|
157
165
|
sections: key('page.sections'),
|
|
166
|
+
compose: key('page.compose', 'false'),
|
|
158
167
|
},
|
|
159
168
|
pageSeo: {
|
|
160
169
|
title: key('pageSeo.title', "''"),
|
|
@@ -200,6 +209,8 @@ export const PLAN_WIRE_DERIVED: Readonly<Record<string, string>> = {
|
|
|
200
209
|
film: "the owner's film, set by the build (SC6b)",
|
|
201
210
|
'plan.artDirection': 'the generation, from the business type and the look (M7 — artDirectionFor)',
|
|
202
211
|
artDirection: 'the generation, from the business type and the look (M7 — artDirectionFor)',
|
|
212
|
+
'page.layout': 'the layout step: one request per composed page, after the pages (M8 gate 2)',
|
|
213
|
+
layoutPage: 'the layout step: one request per composed page, after the pages (M8 gate 2)',
|
|
203
214
|
};
|
|
204
215
|
|
|
205
216
|
const wireText = (spec: WireKey): string => {
|
|
@@ -339,6 +350,7 @@ export function wirePageJsonSchema(options: WireOptions = {}): JsonSchema {
|
|
|
339
350
|
routeSource: jsonText(),
|
|
340
351
|
seo: shaped(PlanWireEntry.PageSeo, { title: jsonText(), description: jsonText() }),
|
|
341
352
|
sections: jsonListOf(wireSectionJsonSchema()),
|
|
353
|
+
compose: jsonBoolean(),
|
|
342
354
|
});
|
|
343
355
|
}
|
|
344
356
|
|
|
@@ -351,6 +363,7 @@ const PLAN_TOP_SCHEMAS: Readonly<Record<string, () => JsonSchema>> = {
|
|
|
351
363
|
[GlobalSlot.Header]: jsonOneOf(globalIds(PatternGlobalPosition.Before)),
|
|
352
364
|
[GlobalSlot.Footer]: jsonOneOf(globalIds(PatternGlobalPosition.After)),
|
|
353
365
|
}),
|
|
366
|
+
direction: () => shaped(PlanWireEntry.Direction, { idea: jsonText(), cliche: jsonText(), flip: jsonText(), rules: jsonListOf(jsonText()) }),
|
|
354
367
|
};
|
|
355
368
|
|
|
356
369
|
/** The plan's top-level shape for one part (its keys only) — what that part's request shows and is built from. */
|
|
@@ -457,7 +470,7 @@ export function expandWireSection(wire: unknown): PageSectionPlan | unknown {
|
|
|
457
470
|
export function expandWirePage(wire: unknown, options: WireOptions = {}): PagePlan | unknown {
|
|
458
471
|
if (!isPlainObject(wire)) return wire;
|
|
459
472
|
const written: PlainObject = options.children === false ? { sections: [], ...wire } : wire;
|
|
460
|
-
const { archetype, need, template, routeSource, seo, sections, ...rest } = written;
|
|
473
|
+
const { archetype, need, template, routeSource, seo, sections, compose, ...rest } = written;
|
|
461
474
|
const words = isPlainObject(seo) ? { ...optional('title', seo['title']), ...optional('description', seo['description']) } : seo;
|
|
462
475
|
return {
|
|
463
476
|
...rest,
|
|
@@ -468,6 +481,7 @@ export function expandWirePage(wire: unknown, options: WireOptions = {}): PagePl
|
|
|
468
481
|
...optional('routeSource', routeSource),
|
|
469
482
|
...optional('seo', words, v => v === undefined || (isPlainObject(v) && Object.keys(v).length === 0)),
|
|
470
483
|
sections: each(sections, expandWireSection),
|
|
484
|
+
...(compose === true ? { compose: true } : compose === false || compose === undefined ? {} : { compose }),
|
|
471
485
|
};
|
|
472
486
|
}
|
|
473
487
|
|
|
@@ -491,9 +505,10 @@ export function expandPlanWire(parts: PlanWireParts, context: PlanWireContext):
|
|
|
491
505
|
const odd = written.find(value => !isPlainObject(value));
|
|
492
506
|
if (odd !== undefined) return odd;
|
|
493
507
|
const wire: PlainObject = Object.assign({}, ...(written as PlainObject[]));
|
|
494
|
-
const { business, contentTypes, dataSources, pages, ...rest } = wire;
|
|
508
|
+
const { business, contentTypes, dataSources, pages, direction, ...rest } = wire;
|
|
495
509
|
return withDerivedSources({
|
|
496
510
|
...rest,
|
|
511
|
+
...(isPlainObject(direction) && direction['idea'] === NONE ? {} : direction === undefined ? {} : { direction }),
|
|
497
512
|
version: SITE_PLAN_VERSION,
|
|
498
513
|
source: { ...context.source },
|
|
499
514
|
business: expandWireBusiness(business, context.facts),
|
|
@@ -543,6 +558,7 @@ export function pageToWire(page: PagePlan, options: WireOptions = {}): PlainObje
|
|
|
543
558
|
template: page.template ?? NONE, routeSource: page.routeSource ?? NONE,
|
|
544
559
|
seo: { title: page.seo?.title ?? NONE, description: page.seo?.description ?? NONE },
|
|
545
560
|
...(options.children === false ? {} : { sections: page.sections.map(sectionToWire) }),
|
|
561
|
+
compose: page.compose ?? false,
|
|
546
562
|
};
|
|
547
563
|
}
|
|
548
564
|
|
|
@@ -552,6 +568,7 @@ const PLAN_TO_WIRE: Readonly<Record<string, (plan: SitePlan) => unknown>> = {
|
|
|
552
568
|
dataSources: plan => plan.dataSources.map(dataSourceToWire),
|
|
553
569
|
pages: plan => plan.pages.map(page => pageToWire(page)),
|
|
554
570
|
globals: plan => ({ ...plan.globals }),
|
|
571
|
+
direction: plan => ({ idea: plan.direction?.idea ?? NONE, cliche: plan.direction?.cliche ?? NONE, flip: plan.direction?.flip ?? NONE, rules: [...(plan.direction?.rules ?? [])] }),
|
|
555
572
|
};
|
|
556
573
|
|
|
557
574
|
/** One part of the plan on the wire: what that part's request would have answered. */
|
|
@@ -39,3 +39,16 @@ export * from './stock-photos';
|
|
|
39
39
|
export * from './film';
|
|
40
40
|
export * from './art-direction';
|
|
41
41
|
export * from './pictures';
|
|
42
|
+
export * from './layout-language';
|
|
43
|
+
export * from './compose-layout';
|
|
44
|
+
export * from './layout-look';
|
|
45
|
+
export * from './layout-wire';
|
|
46
|
+
export * from './layout-render-check';
|
|
47
|
+
export * from './layout-drift';
|
|
48
|
+
export * from './layout-type';
|
|
49
|
+
export * from './layout-section-fallback';
|
|
50
|
+
export * from './layout-photos';
|
|
51
|
+
export * from './photo-inventory';
|
|
52
|
+
export * from './check-layout';
|
|
53
|
+
export * from './layout-fingerprint';
|
|
54
|
+
export * from './layout-edits';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FrameSequence } from '@vectoriox/iox-ui/media-core';
|
|
2
2
|
import type { AnimateId, DesignChoices } from '@vectoriox/iox-ui/design-core';
|
|
3
3
|
import type { ArtDirection } from './art-direction';
|
|
4
|
+
import type { LayoutPage } from './layout-language';
|
|
4
5
|
|
|
5
6
|
import { SPEC_SITE_ARCHETYPES, SPEC_SITE_FACTS, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES } from './site-spec.generated';
|
|
6
7
|
|
|
@@ -216,7 +217,12 @@ export interface PagePlan {
|
|
|
216
217
|
/** The inferred need this page answers (the Plan screen tags it "we added") — a harness-core need id. */
|
|
217
218
|
readonly need?: SiteNeedId;
|
|
218
219
|
readonly seo?: PageSeoPlan;
|
|
220
|
+
/** The page from patterns — a composed page keeps them as its fallback. */
|
|
219
221
|
readonly sections: ReadonlyArray<PageSectionPlan>;
|
|
222
|
+
/** M8 gate 2: the page is composed in the layout language (written with the pages; the layout step fills `layout`). */
|
|
223
|
+
readonly compose?: boolean;
|
|
224
|
+
/** M8 gate 2: the composed page — when present it is stamped (`composeLayout`) instead of `sections`. */
|
|
225
|
+
readonly layout?: LayoutPage;
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
export enum GlobalSlot {
|
|
@@ -253,6 +259,16 @@ export interface SitePlan {
|
|
|
253
259
|
/** M7: what every picture made for the site shares (a world and its five parts) — set by the generation from the
|
|
254
260
|
* business type and the look (`artDirectionFor`), never a model's. */
|
|
255
261
|
readonly artDirection?: ArtDirection;
|
|
262
|
+
/** M8 gate 2: what the site is built around, written with the pages and shown on the Plan step. */
|
|
263
|
+
readonly direction?: PlanDirection;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** M8 gate 2: the idea a site's composed pages serve — the usual site for the business, and what this one does instead. */
|
|
267
|
+
export interface PlanDirection {
|
|
268
|
+
readonly idea: string;
|
|
269
|
+
readonly cliche: string;
|
|
270
|
+
readonly flip: string;
|
|
271
|
+
readonly rules: ReadonlyArray<string>;
|
|
256
272
|
}
|
|
257
273
|
|
|
258
274
|
/** SC6b: the owner's film — the numbered pictures the wizard's browser made of their video (media-core). */
|