@vectoriox/iox-ui 5.77.0 → 5.79.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.
Files changed (33) hide show
  1. package/design-core/index.d.ts +34 -4
  2. package/fesm2022/vectoriox-iox-ui-design-core.mjs +34 -4
  3. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  4. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +950 -15
  5. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +38 -3
  7. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-media-core.mjs +23 -1
  9. package/fesm2022/vectoriox-iox-ui-media-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +3 -6
  11. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  12. package/generation-core/index.d.ts +585 -8
  13. package/harness-core/index.d.ts +40 -2
  14. package/media-core/index.d.ts +19 -1
  15. package/package.json +1 -1
  16. package/scene-core/index.d.ts +1 -4
  17. package/src/design-core/flavor-spec.generated.ts +34 -4
  18. package/src/generation-core/compose-site.ts +25 -2
  19. package/src/generation-core/film.ts +91 -0
  20. package/src/generation-core/patterns.ts +41 -4
  21. package/src/generation-core/plan-wire.ts +4 -2
  22. package/src/generation-core/public-api.ts +1 -0
  23. package/src/generation-core/serialized-node.ts +3 -0
  24. package/src/generation-core/showcase.ts +32 -7
  25. package/src/generation-core/site-plan.model.ts +8 -0
  26. package/src/generation-core/site-spec.generated.ts +738 -1
  27. package/src/generation-core/validate-site-plan.ts +57 -2
  28. package/src/harness-core/business-types.ts +3 -0
  29. package/src/harness-core/generation-view.ts +3 -1
  30. package/src/harness-core/harness-spec.generated.ts +32 -2
  31. package/src/harness-core/motion.ts +8 -1
  32. package/src/media-core/frames.ts +23 -0
  33. package/src/scene-core/scene-edit.ts +3 -5
@@ -196,6 +196,8 @@ export const PLAN_WIRE_DERIVED: Readonly<Record<string, string>> = {
196
196
  sourceTemplate: 'the AI never writes a template plan',
197
197
  sourceAi: 'this run (the context)',
198
198
  design: "the owner's pick (the context)",
199
+ 'plan.film': "the owner's film, set by the build (SC6b)",
200
+ film: "the owner's film, set by the build (SC6b)",
199
201
  };
200
202
 
201
203
  const wireText = (spec: WireKey): string => {
@@ -252,9 +254,9 @@ const orNone = (values: ReadonlyArray<string>): JsonSchema => jsonOneOf([NONE, .
252
254
  const closedOrText = (values: ReadonlyArray<string>): JsonSchema => (values.length ? jsonOneOf(values) : jsonText());
253
255
  const shaped = (entry: `${PlanWireEntry}`, properties: Record<string, JsonSchema>) => jsonShapedObject(PLAN_WIRE_SHAPE[entry], properties, `wire ${entry}`);
254
256
 
255
- /** The patterns a page section may use (every non-global one), in library order. */
257
+ /** The patterns a page section may use (every non-global one but a film's, which `placeFilm` places), in library order. */
256
258
  export function sectionPatternIds(): string[] {
257
- return Object.entries(SITE_PATTERNS).filter(([, p]) => !p.global).map(([id]) => id);
259
+ return Object.entries(SITE_PATTERNS).filter(([, p]) => !p.global && !p.film).map(([id]) => id);
258
260
  }
259
261
 
260
262
  const sectionPatterns = () => sectionPatternIds().map(id => SITE_PATTERNS[id]);
@@ -36,3 +36,4 @@ export * from './plan-words';
36
36
  export * from './audit-site';
37
37
  export * from './stock-match';
38
38
  export * from './stock-photos';
39
+ export * from './film';
@@ -34,6 +34,9 @@ export interface SerializedNode {
34
34
  itemKey?: string;
35
35
  /** A targeted state's driving node (CC2: an icon's `trigger-on` → its item). */
36
36
  stateTriggers?: Partial<Record<string, string>>;
37
+ /** SC6: a Scene layer's tracks (scene-core `SceneTrack`), and its phone's own. Additive. */
38
+ sceneTracks?: unknown[];
39
+ scenePhoneTracks?: unknown[];
37
40
  bindings: SerializedBinding[];
38
41
  interactions: unknown[];
39
42
  isGlobal?: boolean;
@@ -1,6 +1,7 @@
1
1
  import type { DesignChoices } from '@vectoriox/iox-ui/design-core';
2
+ import { FILM_PREPARED_PICTURES, FrameExtension, FrameSequence } from '@vectoriox/iox-ui/media-core';
2
3
 
3
- import { BindScope, patternNeedsBinding, PatternGlobalPosition, patternScopes, SITE_PATTERNS } from './patterns';
4
+ import { BindScope, patternNeedsBinding, PatternGlobalPosition, patternScopes, SCENE_LEVEL, SITE_PATTERNS } from './patterns';
4
5
  import { GlobalSlot, PagePlan, PageSectionPlan, SiteBusiness, SiteLocale, SitePlan, SitePlanSourceKind, SITE_PLAN_VERSION } from './site-plan.model';
5
6
  import { STUDIO_TEMPLATE } from './templates';
6
7
 
@@ -15,8 +16,17 @@ export interface ShowcaseInput {
15
16
  business: SiteBusiness;
16
17
  design: DesignChoices;
17
18
  locale?: `${SiteLocale}`;
19
+ /** SC6b: the film the film's Scene plays — a render-parity run serves its own; absent, `SHOWCASE_FILM`. */
20
+ film?: FrameSequence;
18
21
  }
19
22
 
23
+ /** SC6b: a film's description for the showcase — as many pictures as the build prepares; nothing is fetched to compose it. */
24
+ export const SHOWCASE_FILM: FrameSequence = {
25
+ base: 'https://showcase.iox.invalid/film', ext: FrameExtension.Webp,
26
+ wide: { count: FILM_PREPARED_PICTURES, width: 1600, height: 900 },
27
+ phone: { count: FILM_PREPARED_PICTURES, width: 1100, height: 619 },
28
+ };
29
+
20
30
  const ITEM_ROUTE = '/work/:slug';
21
31
  const LIST_SOURCE = 'projects';
22
32
 
@@ -39,7 +49,7 @@ export function showcasePages(): PagePlan[] {
39
49
  const byFamily = new Map<string, string[]>();
40
50
  const onItemPage: string[] = [];
41
51
  for (const [id, p] of Object.entries(SITE_PATTERNS)) {
42
- if (p.global) continue;
52
+ if (p.global || p.scene) continue;
43
53
  if (readsRouteItem(id)) { onItemPage.push(id); continue; }
44
54
  byFamily.set(p.family, [...(byFamily.get(p.family) ?? []), id]);
45
55
  }
@@ -62,20 +72,35 @@ export function showcaseGlobals(): { headers: string[]; footers: string[] } {
62
72
  return { headers: of(PatternGlobalPosition.Before), footers: of(PatternGlobalPosition.After) };
63
73
  }
64
74
 
65
- /** The showcase as Site Plans — as many as it takes for every header and every footer to be composed once. */
75
+ /** SC6: the Scene patterns — each shown alone on the home page of its own plan, as a site may hold one (validateScenes). */
76
+ export function showcaseScenes(): string[] {
77
+ return Object.entries(SITE_PATTERNS).filter(([, p]) => p.scene && !p.global).map(([id]) => id);
78
+ }
79
+
80
+ /**
81
+ * The showcase as Site Plans — as many as it takes for every header and every footer to be composed once, then one per
82
+ * Scene pattern (SC6): its home page holds that Scene and nothing else, at How animated Expressive, the only level a
83
+ * Scene is composed at; the film's Scene with a film (SC6b).
84
+ */
66
85
  export function showcasePlans(input: ShowcaseInput): SitePlan[] {
67
86
  const { headers, footers } = showcaseGlobals();
68
87
  const count = Math.max(headers.length, footers.length, 1);
69
88
  const pages = showcasePages();
70
- return Array.from({ length: count }, (_, i): SitePlan => ({
89
+ const plan = (i: number, planPages: PagePlan[], design: DesignChoices): SitePlan => ({
71
90
  version: SITE_PLAN_VERSION,
72
91
  source: { kind: SitePlanSourceKind.Template, templateId: 'showcase', templateVersion: 1 },
73
92
  business: JSON.parse(JSON.stringify(input.business)),
74
93
  ...(input.locale ? { locale: input.locale } : {}),
75
- design: JSON.parse(JSON.stringify(input.design)),
94
+ design: JSON.parse(JSON.stringify(design)),
76
95
  contentTypes: JSON.parse(JSON.stringify(STUDIO_TEMPLATE.contentTypes)),
77
96
  dataSources: JSON.parse(JSON.stringify(STUDIO_TEMPLATE.dataSources)),
78
- pages: JSON.parse(JSON.stringify(pages)),
97
+ pages: JSON.parse(JSON.stringify(planPages)),
79
98
  globals: { [GlobalSlot.Header]: headers[i % headers.length], [GlobalSlot.Footer]: footers[i % footers.length] } as SitePlan['globals'],
80
- }));
99
+ });
100
+ const scenes = showcaseScenes().map((id, i) => {
101
+ const scene = plan(i, [{ key: 'home', name: 'Home', route: '/', isHome: true, inNav: false, sections: [sectionFor(id)] }], { ...input.design, animate: SCENE_LEVEL });
102
+ // A film's Scene plays a film (SC6b): the plan carries one, as the build's would.
103
+ return SITE_PATTERNS[id].film ? { ...scene, film: { sequence: JSON.parse(JSON.stringify(input.film ?? SHOWCASE_FILM)) } } : scene;
104
+ });
105
+ return [...Array.from({ length: count }, (_, i) => plan(i, pages, input.design)), ...scenes];
81
106
  }
@@ -1,3 +1,4 @@
1
+ import type { FrameSequence } from '@vectoriox/iox-ui/media-core';
1
2
  import type { AnimateId, DesignChoices } from '@vectoriox/iox-ui/design-core';
2
3
 
3
4
  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';
@@ -246,4 +247,11 @@ export interface SitePlan {
246
247
  readonly dataSources: ReadonlyArray<DataSourcePlan>;
247
248
  readonly pages: ReadonlyArray<PagePlan>;
248
249
  readonly globals: Readonly<Record<`${GlobalSlot}`, string>>;
250
+ /** SC6b: the owner's film as pictures, set by the build and placed by `placeFilm` — never a model's. */
251
+ readonly film?: PlanFilm;
252
+ }
253
+
254
+ /** SC6b: the owner's film — the numbered pictures the wizard's browser made of their video (media-core). */
255
+ export interface PlanFilm {
256
+ readonly sequence: FrameSequence;
249
257
  }