@vectoriox/iox-ui 5.198.0 → 5.199.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 (43) hide show
  1. package/actions-core/index.d.ts +7 -1
  2. package/data-core/index.d.ts +11 -3
  3. package/design-core/index.d.ts +26 -1
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +6 -1
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-data-core.mjs +30 -4
  7. package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs +65 -1
  9. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +10821 -10094
  11. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +243 -38
  13. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  14. package/generation-core/index.d.ts +463 -126
  15. package/harness-core/index.d.ts +93 -6
  16. package/package.json +1 -1
  17. package/src/actions-core/element-actions.ts +6 -0
  18. package/src/data-core/placeholder-rows.ts +29 -4
  19. package/src/design-core/menu-look.ts +23 -0
  20. package/src/design-core/node-classes.ts +39 -0
  21. package/src/generation-core/check-free.ts +17 -9
  22. package/src/generation-core/compose-free.ts +7 -2
  23. package/src/generation-core/compose-site.ts +167 -46
  24. package/src/generation-core/footer-mix.ts +161 -15
  25. package/src/generation-core/free-opening.ts +13 -2
  26. package/src/generation-core/free-wire.ts +8 -0
  27. package/src/generation-core/header-mix.ts +31 -2
  28. package/src/generation-core/legal.ts +24 -0
  29. package/src/generation-core/menu-shelves.ts +138 -0
  30. package/src/generation-core/nav-shape.ts +138 -15
  31. package/src/generation-core/node-baselines.generated.ts +1 -0
  32. package/src/generation-core/patterns.ts +7 -0
  33. package/src/generation-core/plan-wire.ts +1 -0
  34. package/src/generation-core/public-api.ts +1 -0
  35. package/src/generation-core/site-build-run.ts +8 -0
  36. package/src/generation-core/site-plan.model.ts +3 -0
  37. package/src/generation-core/site-spec.generated.ts +230 -70
  38. package/src/generation-core/validate-site-plan.ts +2 -0
  39. package/src/harness-core/business-types.ts +4 -0
  40. package/src/harness-core/harness-spec.generated.ts +189 -30
  41. package/src/harness-core/popup-stance.ts +56 -3
  42. package/src/harness-core/run-compose-context.ts +25 -5
  43. package/styles/iox-design.css +25 -0
@@ -311,7 +311,12 @@ export const SPEC_BUSINESS_TYPES = [
311
311
  "slice": true,
312
312
  "stock": false,
313
313
  "booking": "sometimes",
314
- "sells": "offered"
314
+ "sells": "offered",
315
+ "opening": [
316
+ "frame:full",
317
+ "media:photo",
318
+ "words:wordmark"
319
+ ]
315
320
  },
316
321
  {
317
322
  "id": "interior-design",
@@ -466,7 +471,12 @@ export const SPEC_BUSINESS_TYPES = [
466
471
  "slice": true,
467
472
  "stock": false,
468
473
  "booking": "none",
469
- "sells": "none"
474
+ "sells": "none",
475
+ "opening": [
476
+ "frame:full",
477
+ "media:photo",
478
+ "words:wordmark"
479
+ ]
470
480
  },
471
481
  {
472
482
  "id": "architecture",
@@ -616,7 +626,12 @@ export const SPEC_BUSINESS_TYPES = [
616
626
  "slice": false,
617
627
  "stock": false,
618
628
  "booking": "none",
619
- "sells": "none"
629
+ "sells": "none",
630
+ "opening": [
631
+ "frame:full",
632
+ "media:photo",
633
+ "words:wordmark"
634
+ ]
620
635
  },
621
636
  {
622
637
  "id": "creative-studio",
@@ -755,7 +770,12 @@ export const SPEC_BUSINESS_TYPES = [
755
770
  "slice": false,
756
771
  "stock": false,
757
772
  "booking": "none",
758
- "sells": "none"
773
+ "sells": "none",
774
+ "opening": [
775
+ "frame:full",
776
+ "media:photo",
777
+ "words:wordmark"
778
+ ]
759
779
  },
760
780
  {
761
781
  "id": "artist",
@@ -898,7 +918,12 @@ export const SPEC_BUSINESS_TYPES = [
898
918
  "slice": false,
899
919
  "stock": false,
900
920
  "booking": "none",
901
- "sells": "offered"
921
+ "sells": "offered",
922
+ "opening": [
923
+ "frame:full",
924
+ "media:photo",
925
+ "words:wordmark"
926
+ ]
902
927
  },
903
928
  {
904
929
  "id": "makers",
@@ -1045,7 +1070,12 @@ export const SPEC_BUSINESS_TYPES = [
1045
1070
  "slice": true,
1046
1071
  "stock": false,
1047
1072
  "booking": "sometimes",
1048
- "sells": "inferred"
1073
+ "sells": "inferred",
1074
+ "opening": [
1075
+ "frame:full",
1076
+ "media:photo",
1077
+ "words:wordmark"
1078
+ ]
1049
1079
  },
1050
1080
  {
1051
1081
  "id": "jewellery",
@@ -1188,7 +1218,12 @@ export const SPEC_BUSINESS_TYPES = [
1188
1218
  "slice": false,
1189
1219
  "stock": false,
1190
1220
  "booking": "none",
1191
- "sells": "inferred"
1221
+ "sells": "inferred",
1222
+ "opening": [
1223
+ "frame:full",
1224
+ "media:photo",
1225
+ "words:wordmark"
1226
+ ]
1192
1227
  },
1193
1228
  {
1194
1229
  "id": "tattoo",
@@ -1325,7 +1360,12 @@ export const SPEC_BUSINESS_TYPES = [
1325
1360
  "slice": false,
1326
1361
  "stock": false,
1327
1362
  "booking": "must",
1328
- "sells": "none"
1363
+ "sells": "none",
1364
+ "opening": [
1365
+ "frame:full",
1366
+ "media:photo",
1367
+ "words:wordmark"
1368
+ ]
1329
1369
  },
1330
1370
  {
1331
1371
  "id": "spa",
@@ -1524,7 +1564,12 @@ export const SPEC_BUSINESS_TYPES = [
1524
1564
  "slice": true,
1525
1565
  "stock": true,
1526
1566
  "booking": "must",
1527
- "sells": "none"
1567
+ "sells": "none",
1568
+ "opening": [
1569
+ "frame:full",
1570
+ "media:photo",
1571
+ "words:wordmark"
1572
+ ]
1528
1573
  },
1529
1574
  {
1530
1575
  "id": "salon",
@@ -1678,7 +1723,12 @@ export const SPEC_BUSINESS_TYPES = [
1678
1723
  "slice": true,
1679
1724
  "stock": true,
1680
1725
  "booking": "must",
1681
- "sells": "none"
1726
+ "sells": "none",
1727
+ "opening": [
1728
+ "frame:full",
1729
+ "media:photo",
1730
+ "words:wordmark"
1731
+ ]
1682
1732
  },
1683
1733
  {
1684
1734
  "id": "yoga",
@@ -1827,7 +1877,12 @@ export const SPEC_BUSINESS_TYPES = [
1827
1877
  "slice": false,
1828
1878
  "stock": true,
1829
1879
  "booking": "must",
1830
- "sells": "none"
1880
+ "sells": "none",
1881
+ "opening": [
1882
+ "frame:full",
1883
+ "media:photo",
1884
+ "words:wordmark"
1885
+ ]
1831
1886
  },
1832
1887
  {
1833
1888
  "id": "fitness",
@@ -1984,7 +2039,12 @@ export const SPEC_BUSINESS_TYPES = [
1984
2039
  "slice": false,
1985
2040
  "stock": true,
1986
2041
  "booking": "must",
1987
- "sells": "none"
2042
+ "sells": "none",
2043
+ "opening": [
2044
+ "frame:full",
2045
+ "media:photo",
2046
+ "words:wordmark"
2047
+ ]
1988
2048
  },
1989
2049
  {
1990
2050
  "id": "therapist",
@@ -2192,7 +2252,12 @@ export const SPEC_BUSINESS_TYPES = [
2192
2252
  "slice": false,
2193
2253
  "stock": true,
2194
2254
  "booking": "must",
2195
- "sells": "never"
2255
+ "sells": "never",
2256
+ "opening": [
2257
+ "frame:inset",
2258
+ "media:photo",
2259
+ "words:headline"
2260
+ ]
2196
2261
  },
2197
2262
  {
2198
2263
  "id": "clinic",
@@ -2404,7 +2469,12 @@ export const SPEC_BUSINESS_TYPES = [
2404
2469
  "slice": true,
2405
2470
  "stock": true,
2406
2471
  "booking": "must",
2407
- "sells": "never"
2472
+ "sells": "never",
2473
+ "opening": [
2474
+ "frame:inset",
2475
+ "media:photo",
2476
+ "words:headline"
2477
+ ]
2408
2478
  },
2409
2479
  {
2410
2480
  "id": "dental",
@@ -2600,7 +2670,12 @@ export const SPEC_BUSINESS_TYPES = [
2600
2670
  "slice": false,
2601
2671
  "stock": true,
2602
2672
  "booking": "must",
2603
- "sells": "never"
2673
+ "sells": "never",
2674
+ "opening": [
2675
+ "frame:inset",
2676
+ "media:photo",
2677
+ "words:headline"
2678
+ ]
2604
2679
  },
2605
2680
  {
2606
2681
  "id": "vet",
@@ -2779,7 +2854,12 @@ export const SPEC_BUSINESS_TYPES = [
2779
2854
  "slice": false,
2780
2855
  "stock": true,
2781
2856
  "booking": "must",
2782
- "sells": "none"
2857
+ "sells": "none",
2858
+ "opening": [
2859
+ "frame:inset",
2860
+ "media:photo",
2861
+ "words:headline"
2862
+ ]
2783
2863
  },
2784
2864
  {
2785
2865
  "id": "restaurant",
@@ -2931,7 +3011,12 @@ export const SPEC_BUSINESS_TYPES = [
2931
3011
  "slice": false,
2932
3012
  "stock": true,
2933
3013
  "booking": "tables",
2934
- "sells": "none"
3014
+ "sells": "none",
3015
+ "opening": [
3016
+ "frame:full",
3017
+ "media:photo",
3018
+ "words:wordmark"
3019
+ ]
2935
3020
  },
2936
3021
  {
2937
3022
  "id": "cafe-bakery",
@@ -3084,7 +3169,12 @@ export const SPEC_BUSINESS_TYPES = [
3084
3169
  "slice": true,
3085
3170
  "stock": true,
3086
3171
  "booking": "none",
3087
- "sells": "offered"
3172
+ "sells": "offered",
3173
+ "opening": [
3174
+ "frame:full",
3175
+ "media:photo",
3176
+ "words:wordmark"
3177
+ ]
3088
3178
  },
3089
3179
  {
3090
3180
  "id": "bar-winery",
@@ -3232,7 +3322,12 @@ export const SPEC_BUSINESS_TYPES = [
3232
3322
  "slice": false,
3233
3323
  "stock": true,
3234
3324
  "booking": "none",
3235
- "sells": "offered"
3325
+ "sells": "offered",
3326
+ "opening": [
3327
+ "frame:full",
3328
+ "media:photo",
3329
+ "words:wordmark"
3330
+ ]
3236
3331
  },
3237
3332
  {
3238
3333
  "id": "boutique",
@@ -3370,7 +3465,12 @@ export const SPEC_BUSINESS_TYPES = [
3370
3465
  "slice": false,
3371
3466
  "stock": true,
3372
3467
  "booking": "none",
3373
- "sells": "inferred"
3468
+ "sells": "inferred",
3469
+ "opening": [
3470
+ "frame:full",
3471
+ "media:photo",
3472
+ "words:wordmark"
3473
+ ]
3374
3474
  },
3375
3475
  {
3376
3476
  "id": "florist",
@@ -3516,7 +3616,12 @@ export const SPEC_BUSINESS_TYPES = [
3516
3616
  "slice": false,
3517
3617
  "stock": true,
3518
3618
  "booking": "none",
3519
- "sells": "inferred"
3619
+ "sells": "inferred",
3620
+ "opening": [
3621
+ "frame:full",
3622
+ "media:photo",
3623
+ "words:wordmark"
3624
+ ]
3520
3625
  },
3521
3626
  {
3522
3627
  "id": "home-goods",
@@ -3655,7 +3760,12 @@ export const SPEC_BUSINESS_TYPES = [
3655
3760
  "slice": false,
3656
3761
  "stock": true,
3657
3762
  "booking": "none",
3658
- "sells": "inferred"
3763
+ "sells": "inferred",
3764
+ "opening": [
3765
+ "frame:full",
3766
+ "media:photo",
3767
+ "words:wordmark"
3768
+ ]
3659
3769
  },
3660
3770
  {
3661
3771
  "id": "consultant",
@@ -3838,7 +3948,12 @@ export const SPEC_BUSINESS_TYPES = [
3838
3948
  "slice": true,
3839
3949
  "stock": true,
3840
3950
  "booking": "sometimes",
3841
- "sells": "none"
3951
+ "sells": "none",
3952
+ "opening": [
3953
+ "frame:inset",
3954
+ "media:photo",
3955
+ "words:headline"
3956
+ ]
3842
3957
  },
3843
3958
  {
3844
3959
  "id": "coach",
@@ -4013,7 +4128,12 @@ export const SPEC_BUSINESS_TYPES = [
4013
4128
  "slice": false,
4014
4129
  "stock": true,
4015
4130
  "booking": "must",
4016
- "sells": "none"
4131
+ "sells": "none",
4132
+ "opening": [
4133
+ "frame:inset",
4134
+ "media:photo",
4135
+ "words:headline"
4136
+ ]
4017
4137
  },
4018
4138
  {
4019
4139
  "id": "law-accounting",
@@ -4224,7 +4344,12 @@ export const SPEC_BUSINESS_TYPES = [
4224
4344
  "slice": false,
4225
4345
  "stock": true,
4226
4346
  "booking": "sometimes",
4227
- "sells": "never"
4347
+ "sells": "never",
4348
+ "opening": [
4349
+ "frame:inset",
4350
+ "media:photo",
4351
+ "words:headline"
4352
+ ]
4228
4353
  },
4229
4354
  {
4230
4355
  "id": "real-estate",
@@ -4376,7 +4501,12 @@ export const SPEC_BUSINESS_TYPES = [
4376
4501
  "slice": false,
4377
4502
  "stock": false,
4378
4503
  "booking": "sometimes",
4379
- "sells": "none"
4504
+ "sells": "none",
4505
+ "opening": [
4506
+ "frame:inset",
4507
+ "media:photo",
4508
+ "words:headline"
4509
+ ]
4380
4510
  },
4381
4511
  {
4382
4512
  "id": "nonprofit",
@@ -4550,7 +4680,12 @@ export const SPEC_BUSINESS_TYPES = [
4550
4680
  "slice": false,
4551
4681
  "stock": true,
4552
4682
  "booking": "none",
4553
- "sells": "none"
4683
+ "sells": "none",
4684
+ "opening": [
4685
+ "frame:inset",
4686
+ "media:photo",
4687
+ "words:headline"
4688
+ ]
4554
4689
  },
4555
4690
  {
4556
4691
  "id": "venue-events",
@@ -4697,7 +4832,12 @@ export const SPEC_BUSINESS_TYPES = [
4697
4832
  "slice": false,
4698
4833
  "stock": true,
4699
4834
  "booking": "tables",
4700
- "sells": "none"
4835
+ "sells": "none",
4836
+ "opening": [
4837
+ "frame:full",
4838
+ "media:photo",
4839
+ "words:wordmark"
4840
+ ]
4701
4841
  },
4702
4842
  {
4703
4843
  "id": "hotel-bnb",
@@ -4844,7 +4984,12 @@ export const SPEC_BUSINESS_TYPES = [
4844
4984
  "slice": false,
4845
4985
  "stock": true,
4846
4986
  "booking": "tables",
4847
- "sells": "none"
4987
+ "sells": "none",
4988
+ "opening": [
4989
+ "frame:full",
4990
+ "media:photo",
4991
+ "words:wordmark"
4992
+ ]
4848
4993
  },
4849
4994
  {
4850
4995
  "id": "classes",
@@ -4998,7 +5143,12 @@ export const SPEC_BUSINESS_TYPES = [
4998
5143
  "slice": false,
4999
5144
  "stock": true,
5000
5145
  "booking": "must",
5001
- "sells": "offered"
5146
+ "sells": "offered",
5147
+ "opening": [
5148
+ "frame:inset",
5149
+ "media:photo",
5150
+ "words:headline"
5151
+ ]
5002
5152
  }
5003
5153
  ] as const;
5004
5154
 
@@ -5573,5 +5723,14 @@ export const SPEC_STATED_FACTS = {
5573
5723
  "how": "only news the prompt states — an offer, an opening, a date (\"a November offer: transfer included\", \"our second shop opens on 1 December\"); never inferred",
5574
5724
  "reads": "PU3",
5575
5725
  "feeds": "popup"
5726
+ },
5727
+ "social": {
5728
+ "label": {
5729
+ "en": "Your social links",
5730
+ "he": "הקישורים שלך ברשתות החברתיות"
5731
+ },
5732
+ "how": "only addresses of the owner's own pages on social networks that the prompt states (instagram.com/…, facebook.com/…, wa.me/…), as written and separated by spaces; never searched for, completed or guessed",
5733
+ "reads": "FV1",
5734
+ "feeds": "footer"
5576
5735
  }
5577
5736
  } as const;
@@ -1,3 +1,5 @@
1
+ import { POPUP_BODY_MAX_CHARS } from '@vectoriox/iox-ui/composite-core';
2
+
1
3
  import { BusinessType, businessTypeById } from './business-types';
2
4
  import { SPEC_POPUP_STANCES, SPEC_STATED_FACTS } from './harness-spec.generated';
3
5
  import { keywordsIn } from './intake';
@@ -10,7 +12,10 @@ import { keywordsIn } from './intake';
10
12
  * - the Plan step's two LINES — "Show your news in a popup" exists only when the owner STATED news (`news`, a stated fact:
11
13
  * never inferred, never a placeholder) and the stance is offer, and starts ticked; "Invite visitors to your newsletter
12
14
  * in a popup" is offered when the site has a newsletter form and the stance is not never, and is never ticked by itself.
13
- * A generated site gets a popup only from one of these two lines. Pure: no transport, no clock.
15
+ * - the Plan step's QUESTION (popup-ask, PA-D1…PA-D4) — "Any news or an offer to announce?" — asked whenever the stance is
16
+ * not never; it starts with the stated news when the news line would show. The owner's answer IS stated news (their
17
+ * own words are its value and its quote); an empty answer is no news, also over news the prompt stated.
18
+ * A generated site gets a popup only from one of these lines. Pure: no transport, no clock.
14
19
  */
15
20
 
16
21
  /** How a popup is suggested. */
@@ -89,8 +94,17 @@ export interface PopupLine {
89
94
  readonly ticked: boolean;
90
95
  }
91
96
 
97
+ /** The Plan step's question (popup-ask, PA-D1): "Any news or an offer to announce?" — optional, the owner's own words. */
98
+ export interface PopupAsk {
99
+ readonly shown: boolean;
100
+ /** What the answer starts as: the stated news when its line would show (offer stance), else empty. */
101
+ readonly starting: string;
102
+ }
103
+
92
104
  export interface PopupSuggestion {
93
105
  readonly stance: PopupStance;
106
+ /** "Any news or an offer to announce?" — asked whenever the stance is not never (PA-D2). */
107
+ readonly ask: PopupAsk;
94
108
  /** "Show your news in a popup — '<news>'". */
95
109
  readonly news: PopupLine;
96
110
  /** "Invite visitors to your newsletter in a popup" — never ticked by itself. */
@@ -100,12 +114,51 @@ export interface PopupSuggestion {
100
114
 
101
115
  const HIDDEN: PopupLine = { shown: false, ticked: false };
102
116
 
103
- /** The Plan step's popup lines for a site (PU-D12). */
117
+ /** The longest answer a popup holds (composite-core `POPUP_BODY_MAX_CHARS`): the Plan step's field stops there, and a
118
+ * longer one makes no popup (`checkPopup` refuses it, said) — the owner's words are never cut. */
119
+ export const POPUP_NEWS_MAX_CHARS = POPUP_BODY_MAX_CHARS;
120
+
121
+ /** A stated fact as the popup reads it: the value and the owner's words it came from. */
122
+ export interface PopupNews {
123
+ readonly value: string;
124
+ readonly quote: string;
125
+ }
126
+
127
+ /** The Plan step's popup lines and question for a site (PU-D12, PA-D1). */
104
128
  export function popupSuggestion(input: PopupSuggestionInput): PopupSuggestion {
105
129
  const words = popupWordsIn(input.prompt);
106
130
  const stance = popupStanceFor(businessTypeById(input.businessType), words);
107
131
  const stated = !!(input.news?.value?.trim() && input.news?.quote?.trim());
108
132
  const news: PopupLine = stated && stance === PopupStance.Offer ? { shown: true, ticked: true } : HIDDEN;
109
133
  const newsletter: PopupLine = input.newsletterForm && stance !== PopupStance.Never ? { shown: true, ticked: false } : HIDDEN;
110
- return { stance, news, newsletter, words };
134
+ const ask: PopupAsk = { shown: stance !== PopupStance.Never, starting: news.shown ? newsFromAnswer(input.news!.value)!.value : '' };
135
+ return { stance, ask, news, newsletter, words };
136
+ }
137
+
138
+ /** The owner's answer to "Any news or an offer to announce?" as stated news (PA-D3): their own words are its value AND
139
+ * its quote — so every figure in it is the owner's (`checkPopup`'s figure check holds by construction). White space is
140
+ * folded to single spaces (a line break in a one-line field); nothing else changes and nothing is cut. Null: no answer. */
141
+ export function newsFromAnswer(answer: string | null | undefined): PopupNews | null {
142
+ const value = typeof answer === 'string' ? answer.replace(/\s+/g, ' ').trim() : '';
143
+ return value ? { value, quote: value } : null;
144
+ }
145
+
146
+ /** What the owner left on the Plan step (or what "Build with these" starts with): the news line's tick, and the question's
147
+ * answer when they were asked — `undefined` = never asked, `''` = asked and left empty. */
148
+ export interface PopupNewsChoice {
149
+ readonly news?: boolean;
150
+ readonly answer?: string | null;
151
+ }
152
+
153
+ /**
154
+ * The news a build's popup is stamped from (PU-D11 / PU-D12 / PA-D3) — the ONE rule, judged by the same `popupSuggestion`
155
+ * the Plan step draws: an ANSWER counts when the question was shown (the stance is not never) and is the news, an empty
156
+ * one meaning none — also over news the prompt stated; without an answer, the reading's stated news counts when its line
157
+ * showed and is ticked. Null: no news popup. Never invented — every word is the owner's.
158
+ */
159
+ export function popupNewsOf(input: PopupSuggestionInput, choice: PopupNewsChoice | null | undefined): PopupNews | null {
160
+ const lines = popupSuggestion(input);
161
+ if (typeof choice?.answer === 'string') return lines.ask.shown ? newsFromAnswer(choice.answer) : null;
162
+ if (!choice?.news || !lines.news.shown || !input.news) return null;
163
+ return { value: input.news.value.trim(), quote: input.news.quote };
111
164
  }
@@ -1,6 +1,6 @@
1
- import { BuildComposeDecisions, ComposeContext, composeContextOf, GenerationTier, PictureSupply } from '@vectoriox/iox-ui/generation-core';
1
+ import { BuildComposeDecisions, ComposeContext, composeContextOf, GenerationTier, PictureSupply, PicturesRefused } from '@vectoriox/iox-ui/generation-core';
2
2
 
3
- import { businessTypeById } from './business-types';
3
+ import { BusinessType, businessTypeById } from './business-types';
4
4
  import { isCalmBusinessType } from './motion';
5
5
 
6
6
  /**
@@ -20,10 +20,14 @@ export interface ComposeRun {
20
20
  * - `footerNever` — what that kind of business's footer never wears (AW12-D10, harness FOOTER_NEVER), mended and said by
21
21
  * `checkFooter` (`type-never`);
22
22
  * - `headerNever` — what that kind of business's header never stands on (HI3-D12, harness HEADER_NEVER), mended to its
23
- * own ground and said by `checkHeader` (`type-never`).
23
+ * own ground and said by `checkHeader` (`type-never`);
24
+ * - `opening` — pictures first: the Home opening the kind of business takes when its plan names none (harness
25
+ * OPENING_PICTURE), given only when a picture can come (`pictureCanCome`).
24
26
  * An unknown or absent type gives nothing: the composer's defaults hold. (`calm` stays `composeContextOf`'s own argument.)
25
27
  */
26
- export function businessComposeContext(typeId: string | null | undefined): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever'> {
28
+ export function businessComposeContext(
29
+ typeId: string | null | undefined, decisions?: Pick<BuildComposeDecisions, 'picturesRefused' | 'ownPhotos' | 'layoutPhotos'> | null,
30
+ ): Pick<ComposeContext, 'businessType' | 'footerNever' | 'headerNever' | 'opening'> {
27
31
  const type = typeId ? businessTypeById(typeId) : undefined;
28
32
  if (!type) return {};
29
33
  const never = type.footer;
@@ -32,9 +36,25 @@ export function businessComposeContext(typeId: string | null | undefined): Pick<
32
36
  return {
33
37
  businessType: type.id, ...(refuses ? { footerNever: never } : {}),
34
38
  ...(header && header.grounds.length > 0 ? { headerNever: header } : {}),
39
+ ...(type.opening?.length && pictureCanCome(type, decisions) ? { opening: [...type.opening] } : {}),
35
40
  };
36
41
  }
37
42
 
43
+ /** The layout photo ids that are the owner's own (`own:<asset>`). */
44
+ const OWN_PHOTO = /^own:/;
45
+
46
+ /**
47
+ * Pictures first: can a picture come for the Home's opening? Never when the owner ruled pictures out; the owner's own photo
48
+ * always can; else stock, where the kind of business lets stock stand in (`BusinessType.stock` — never the work itself) and
49
+ * the owner did not refuse stock. Pure.
50
+ */
51
+ export function pictureCanCome(type: Pick<BusinessType, 'stock'>, decisions?: Pick<BuildComposeDecisions, 'picturesRefused' | 'ownPhotos' | 'layoutPhotos'> | null): boolean {
52
+ const refused = decisions?.picturesRefused;
53
+ if (refused === PicturesRefused.All) return false;
54
+ const own = (decisions?.ownPhotos?.length ?? 0) > 0 || Object.keys(decisions?.layoutPhotos ?? {}).some(id => OWN_PHOTO.test(id));
55
+ return own || (type.stock && refused !== PicturesRefused.Stock);
56
+ }
57
+
38
58
  /**
39
59
  * THE compose context of a build run (moved from iox-cms `site-builds.service`, iox-cms-client#111): its year, its
40
60
  * layouts' photos, its tier, the legal context its preflight read (AW1), whether its business is calm (AW6 — the body
@@ -47,7 +67,7 @@ export function runComposeContext(run: ComposeRun): ComposeContext {
47
67
  const decisions = run.decisions ?? undefined;
48
68
  const context: ComposeContext = {
49
69
  ...composeContextOf(run.year, decisions?.layoutPhotos, run.tier ?? undefined, decisions?.legal ?? null, isCalmBusinessType(decisions?.businessType)),
50
- ...businessComposeContext(decisions?.businessType),
70
+ ...businessComposeContext(decisions?.businessType, decisions),
51
71
  // HI3-D5: the preflight judged the words at rest once, on the pixels it held; every step composes with that answer.
52
72
  ...(typeof decisions?.headerReadable === 'boolean' ? { headerReadable: decisions.headerReadable } : {}),
53
73
  };
@@ -535,6 +535,7 @@ dialog[data-iox-dialog]:has(> .iox-dialog-close),
535
535
  .iox-role-nav-links,
536
536
  .iox-role-nav-pinned,
537
537
  .iox-role-nav-actions,
538
+ .iox-role-nav-drawer-more-links,
538
539
  .iox-role-nav-drawer-links,
539
540
  .iox-role-footer-links {
540
541
  --iox-link-weight: var(--iox-weight-body);
@@ -749,6 +750,30 @@ dialog[data-iox-dialog].iox-es[data-iox-menu='full'] {
749
750
  .dialog-surface[data-iox-menu='mega'] .iox-role-nav-drawer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 24px; }
750
751
  }
751
752
 
753
+ /* SHELVES (HI2, header-builder board v2 "menu contents"). A menu that shows its page names LARGE (`big`, and the first
754
+ names of a `words-card`) sets them in the look's display link (`link-display`: its face, weight, leading and tracking)
755
+ at the size of the menu they stand in — board v2's 34px in a drawer, 40–44px in a card, a top panel, a mega panel or
756
+ the full screen: the look's h2 and h1 (fluid). The size is the menu's, so no Link holds a literal; the names arrive
757
+ WITH the menu (D1 — one entrance per container, Emil 64/65/110), so nothing here moves. A card, a panel and a mega
758
+ panel are the drawer on a phone (R-H10), so their h1 waits for the width that shows them; the live page sizes by the
759
+ window, the canvas by its frame (never @media). */
760
+ :is(dialog, .dialog-surface):is([data-iox-menu-shows='big'], [data-iox-menu-shows='words-card']) .iox-role-nav-drawer-links .iox-role-nav-drawer-link {
761
+ font-size: var(--iox-size-h2);
762
+ }
763
+ :is(dialog, .dialog-surface):is([data-iox-menu-shows='big'], [data-iox-menu-shows='words-card'])[data-iox-menu='full'] .iox-role-nav-drawer-links .iox-role-nav-drawer-link {
764
+ font-size: var(--iox-size-h1);
765
+ }
766
+ @media (min-width: 768px) {
767
+ body:not(.builder-active) dialog:is([data-iox-menu-shows='big'], [data-iox-menu-shows='words-card']):is([data-iox-menu='panel'], [data-iox-menu='card'], [data-iox-menu='mega']) .iox-role-nav-drawer-links .iox-role-nav-drawer-link {
768
+ font-size: var(--iox-size-h1);
769
+ }
770
+ }
771
+ @container iox-canvas (min-width: 768px) {
772
+ .dialog-surface:is([data-iox-menu-shows='big'], [data-iox-menu-shows='words-card']):is([data-iox-menu='panel'], [data-iox-menu='card'], [data-iox-menu='mega']) .iox-role-nav-drawer-links .iox-role-nav-drawer-link {
773
+ font-size: var(--iox-size-h1);
774
+ }
775
+ }
776
+
752
777
  /* REVEALS. Fade: in place. Zoom: from 0.88 at the opener. Circle: clip-path circle() from the opener. Torn: our own ragged
753
778
  edge (HB-D7 — a 48-point polygon, never another site's asset) grown from the opener, the menu a twin 6% larger in the
754
779
  look's menu-edge while it moves: the sheet's own ground is its ::before, cut by the smaller edge. (Slide is the form's own: