@vectoriox/iox-ui 5.96.2 → 5.98.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 (38) hide show
  1. package/commerce-core/index.d.ts +274 -2
  2. package/fesm2022/vectoriox-iox-ui-commerce-core.mjs +312 -1
  3. package/fesm2022/vectoriox-iox-ui-commerce-core.mjs.map +1 -1
  4. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +2 -8
  5. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1114 -223
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +115 -42
  9. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  10. package/generation-core/index.d.ts +515 -17
  11. package/harness-core/index.d.ts +66 -6
  12. package/package.json +1 -1
  13. package/src/commerce-core/public-api.ts +2 -0
  14. package/src/commerce-core/shipping.ts +22 -0
  15. package/src/commerce-core/site-checkout.ts +406 -0
  16. package/src/commerce-core/variants.ts +20 -0
  17. package/src/composite-core/shop-runtime.ts +2 -8
  18. package/src/generation-core/audit-site.ts +8 -0
  19. package/src/generation-core/compose-site.ts +130 -4
  20. package/src/generation-core/nav-shape.ts +4 -2
  21. package/src/generation-core/patterns.ts +25 -1
  22. package/src/generation-core/pictures.ts +1 -1
  23. package/src/generation-core/plan-derived.ts +10 -5
  24. package/src/generation-core/plan-edits.ts +8 -7
  25. package/src/generation-core/plan-wire.ts +59 -10
  26. package/src/generation-core/plan-words.ts +18 -1
  27. package/src/generation-core/public-api.ts +1 -0
  28. package/src/generation-core/shop-plan.ts +165 -0
  29. package/src/generation-core/showcase.ts +29 -4
  30. package/src/generation-core/site-build-run.ts +25 -0
  31. package/src/generation-core/site-plan.model.ts +49 -1
  32. package/src/generation-core/site-spec.generated.ts +330 -2
  33. package/src/generation-core/stock-photos.ts +19 -2
  34. package/src/generation-core/validate-site-plan.ts +146 -8
  35. package/src/harness-core/business-types.ts +13 -0
  36. package/src/harness-core/harness-spec.generated.ts +69 -39
  37. package/src/harness-core/needs.ts +30 -1
  38. package/src/harness-core/site-reading.ts +8 -2
@@ -15,6 +15,10 @@ declare const SPEC_NEEDS: {
15
15
  readonly label: "Your work or products";
16
16
  readonly archetype: "collection";
17
17
  };
18
+ readonly products: {
19
+ readonly label: "Products you sell";
20
+ readonly archetype: "collection";
21
+ };
18
22
  readonly detail: {
19
23
  readonly label: "A page for each item";
20
24
  readonly archetype: "detail";
@@ -184,6 +188,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
184
188
  readonly slice: true;
185
189
  readonly stock: false;
186
190
  readonly booking: "sometimes";
191
+ readonly sells: "offered";
187
192
  }, {
188
193
  readonly id: "interior-design";
189
194
  readonly label: "Interior designer";
@@ -249,6 +254,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
249
254
  readonly slice: true;
250
255
  readonly stock: false;
251
256
  readonly booking: "none";
257
+ readonly sells: "none";
252
258
  }, {
253
259
  readonly id: "architecture";
254
260
  readonly label: "Architect";
@@ -315,6 +321,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
315
321
  readonly slice: false;
316
322
  readonly stock: false;
317
323
  readonly booking: "none";
324
+ readonly sells: "none";
318
325
  }, {
319
326
  readonly id: "creative-studio";
320
327
  readonly label: "Design or branding studio";
@@ -371,6 +378,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
371
378
  readonly slice: false;
372
379
  readonly stock: false;
373
380
  readonly booking: "none";
381
+ readonly sells: "none";
374
382
  }, {
375
383
  readonly id: "artist";
376
384
  readonly label: "Artist or illustrator";
@@ -429,6 +437,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
429
437
  readonly slice: false;
430
438
  readonly stock: false;
431
439
  readonly booking: "none";
440
+ readonly sells: "offered";
432
441
  }, {
433
442
  readonly id: "makers";
434
443
  readonly label: "Ceramics, crafts and makers";
@@ -469,7 +478,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
469
478
  readonly world: "macro";
470
479
  readonly imagery: "Your pieces and hands at work; natural light.";
471
480
  readonly pages: readonly ["home", "pieces (collection)", "piece (detail)", "workshops", "about", "contact"];
472
- readonly needs: readonly ["collection", "detail", "about", "contact"];
481
+ readonly needs: readonly ["products", "about", "contact"];
473
482
  readonly home: readonly ["hero.split", "collection.card-grid", "feature.triad", "cta.banner"];
474
483
  readonly avoid: readonly [{
475
484
  readonly when: {
@@ -486,6 +495,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
486
495
  readonly slice: true;
487
496
  readonly stock: false;
488
497
  readonly booking: "sometimes";
498
+ readonly sells: "inferred";
489
499
  }, {
490
500
  readonly id: "jewellery";
491
501
  readonly label: "Jewellery";
@@ -526,7 +536,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
526
536
  readonly world: "macro";
527
537
  readonly imagery: "Close-ups on a plain ground.";
528
538
  readonly pages: readonly ["home", "collection", "piece (detail)", "about", "contact"];
529
- readonly needs: readonly ["collection", "detail", "about", "contact"];
539
+ readonly needs: readonly ["products", "about", "contact"];
530
540
  readonly home: readonly ["hero.split", "collection.card-grid", "about.story", "cta.banner"];
531
541
  readonly avoid: readonly [{
532
542
  readonly when: {
@@ -544,6 +554,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
544
554
  readonly slice: false;
545
555
  readonly stock: false;
546
556
  readonly booking: "none";
557
+ readonly sells: "inferred";
547
558
  }, {
548
559
  readonly id: "tattoo";
549
560
  readonly label: "Tattoo or barber studio";
@@ -601,6 +612,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
601
612
  readonly slice: false;
602
613
  readonly stock: false;
603
614
  readonly booking: "must";
615
+ readonly sells: "none";
604
616
  }, {
605
617
  readonly id: "spa";
606
618
  readonly label: "Spa and massage";
@@ -668,6 +680,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
668
680
  readonly slice: true;
669
681
  readonly stock: true;
670
682
  readonly booking: "must";
683
+ readonly sells: "none";
671
684
  }, {
672
685
  readonly id: "salon";
673
686
  readonly label: "Hair and beauty salon";
@@ -729,6 +742,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
729
742
  readonly slice: true;
730
743
  readonly stock: true;
731
744
  readonly booking: "must";
745
+ readonly sells: "none";
732
746
  }, {
733
747
  readonly id: "yoga";
734
748
  readonly label: "Yoga or pilates studio";
@@ -787,6 +801,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
787
801
  readonly slice: false;
788
802
  readonly stock: true;
789
803
  readonly booking: "must";
804
+ readonly sells: "none";
790
805
  }, {
791
806
  readonly id: "fitness";
792
807
  readonly label: "Trainer, gym or dance";
@@ -849,6 +864,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
849
864
  readonly slice: false;
850
865
  readonly stock: true;
851
866
  readonly booking: "must";
867
+ readonly sells: "none";
852
868
  }, {
853
869
  readonly id: "therapist";
854
870
  readonly label: "Therapist or counsellor";
@@ -911,6 +927,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
911
927
  readonly slice: false;
912
928
  readonly stock: true;
913
929
  readonly booking: "must";
930
+ readonly sells: "never";
914
931
  }, {
915
932
  readonly id: "clinic";
916
933
  readonly label: "Clinic or practice";
@@ -978,6 +995,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
978
995
  readonly slice: true;
979
996
  readonly stock: true;
980
997
  readonly booking: "must";
998
+ readonly sells: "never";
981
999
  }, {
982
1000
  readonly id: "dental";
983
1001
  readonly label: "Dental practice";
@@ -1035,6 +1053,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1035
1053
  readonly slice: false;
1036
1054
  readonly stock: true;
1037
1055
  readonly booking: "must";
1056
+ readonly sells: "never";
1038
1057
  }, {
1039
1058
  readonly id: "vet";
1040
1059
  readonly label: "Vet or pet care";
@@ -1092,6 +1111,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1092
1111
  readonly slice: false;
1093
1112
  readonly stock: true;
1094
1113
  readonly booking: "must";
1114
+ readonly sells: "none";
1095
1115
  }, {
1096
1116
  readonly id: "restaurant";
1097
1117
  readonly label: "Restaurant";
@@ -1156,6 +1176,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1156
1176
  readonly slice: false;
1157
1177
  readonly stock: true;
1158
1178
  readonly booking: "tables";
1179
+ readonly sells: "none";
1159
1180
  }, {
1160
1181
  readonly id: "cafe-bakery";
1161
1182
  readonly label: "Café or bakery";
@@ -1217,6 +1238,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1217
1238
  readonly slice: true;
1218
1239
  readonly stock: true;
1219
1240
  readonly booking: "none";
1241
+ readonly sells: "offered";
1220
1242
  }, {
1221
1243
  readonly id: "bar-winery";
1222
1244
  readonly label: "Bar, winery or brewery";
@@ -1278,6 +1300,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1278
1300
  readonly slice: false;
1279
1301
  readonly stock: true;
1280
1302
  readonly booking: "none";
1303
+ readonly sells: "offered";
1281
1304
  }, {
1282
1305
  readonly id: "boutique";
1283
1306
  readonly label: "Fashion or lifestyle shop";
@@ -1318,7 +1341,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1318
1341
  readonly world: "high-key";
1319
1342
  readonly imagery: "Product photos on plain grounds; real people wearing them.";
1320
1343
  readonly pages: readonly ["home", "collection", "product (detail)", "about", "contact"];
1321
- readonly needs: readonly ["collection", "detail", "about", "contact"];
1344
+ readonly needs: readonly ["products", "about", "contact"];
1322
1345
  readonly home: readonly ["hero.split", "collection.card-grid", "proof.logo-strip", "cta.banner"];
1323
1346
  readonly avoid: readonly [{
1324
1347
  readonly check: "copy-length";
@@ -1334,6 +1357,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1334
1357
  readonly slice: false;
1335
1358
  readonly stock: true;
1336
1359
  readonly booking: "none";
1360
+ readonly sells: "inferred";
1337
1361
  }, {
1338
1362
  readonly id: "florist";
1339
1363
  readonly label: "Florist or plant shop";
@@ -1374,7 +1398,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1374
1398
  readonly world: "macro";
1375
1399
  readonly imagery: "Your own arrangements in daylight.";
1376
1400
  readonly pages: readonly ["home", "flowers (collection)", "weddings and events", "about", "contact"];
1377
- readonly needs: readonly ["collection", "about", "contact"];
1401
+ readonly needs: readonly ["products", "about", "contact"];
1378
1402
  readonly home: readonly ["hero.split", "collection.masonry-gallery", "feature.triad", "cta.banner"];
1379
1403
  readonly avoid: readonly [{
1380
1404
  readonly when: {
@@ -1391,6 +1415,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1391
1415
  readonly slice: false;
1392
1416
  readonly stock: true;
1393
1417
  readonly booking: "none";
1418
+ readonly sells: "inferred";
1394
1419
  }, {
1395
1420
  readonly id: "home-goods";
1396
1421
  readonly label: "Furniture or home goods";
@@ -1431,7 +1456,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1431
1456
  readonly world: "documentary";
1432
1457
  readonly imagery: "Pieces in real rooms and on plain grounds.";
1433
1458
  readonly pages: readonly ["home", "collection", "product (detail)", "about", "contact"];
1434
- readonly needs: readonly ["collection", "detail", "about", "contact"];
1459
+ readonly needs: readonly ["products", "about", "contact"];
1435
1460
  readonly home: readonly ["hero.split", "collection.card-grid", "feature.alternating-rows", "cta.banner"];
1436
1461
  readonly avoid: readonly [{
1437
1462
  readonly when: {
@@ -1448,6 +1473,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1448
1473
  readonly slice: false;
1449
1474
  readonly stock: true;
1450
1475
  readonly booking: "none";
1476
+ readonly sells: "inferred";
1451
1477
  }, {
1452
1478
  readonly id: "consultant";
1453
1479
  readonly label: "Consultant";
@@ -1507,6 +1533,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1507
1533
  readonly slice: true;
1508
1534
  readonly stock: true;
1509
1535
  readonly booking: "sometimes";
1536
+ readonly sells: "none";
1510
1537
  }, {
1511
1538
  readonly id: "coach";
1512
1539
  readonly label: "Life or business coach";
@@ -1560,6 +1587,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1560
1587
  readonly slice: false;
1561
1588
  readonly stock: true;
1562
1589
  readonly booking: "must";
1590
+ readonly sells: "none";
1563
1591
  }, {
1564
1592
  readonly id: "law-accounting";
1565
1593
  readonly label: "Law or accounting firm";
@@ -1624,6 +1652,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1624
1652
  readonly slice: false;
1625
1653
  readonly stock: true;
1626
1654
  readonly booking: "sometimes";
1655
+ readonly sells: "never";
1627
1656
  }, {
1628
1657
  readonly id: "real-estate";
1629
1658
  readonly label: "Real estate agent";
@@ -1684,6 +1713,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1684
1713
  readonly slice: false;
1685
1714
  readonly stock: false;
1686
1715
  readonly booking: "sometimes";
1716
+ readonly sells: "none";
1687
1717
  }, {
1688
1718
  readonly id: "nonprofit";
1689
1719
  readonly label: "Nonprofit or community";
@@ -1737,6 +1767,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1737
1767
  readonly slice: false;
1738
1768
  readonly stock: true;
1739
1769
  readonly booking: "none";
1770
+ readonly sells: "none";
1740
1771
  }, {
1741
1772
  readonly id: "venue-events";
1742
1773
  readonly label: "Venue, weddings or events";
@@ -1797,6 +1828,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1797
1828
  readonly slice: false;
1798
1829
  readonly stock: true;
1799
1830
  readonly booking: "tables";
1831
+ readonly sells: "none";
1800
1832
  }, {
1801
1833
  readonly id: "hotel-bnb";
1802
1834
  readonly label: "Hotel, B&B or guesthouse";
@@ -1857,6 +1889,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1857
1889
  readonly slice: false;
1858
1890
  readonly stock: true;
1859
1891
  readonly booking: "tables";
1892
+ readonly sells: "none";
1860
1893
  }, {
1861
1894
  readonly id: "classes";
1862
1895
  readonly label: "Teacher, tutor or classes";
@@ -1915,6 +1948,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
1915
1948
  readonly slice: false;
1916
1949
  readonly stock: true;
1917
1950
  readonly booking: "must";
1951
+ readonly sells: "offered";
1918
1952
  }];
1919
1953
  declare const SPEC_ANALYSIS_SHAPE: {
1920
1954
  readonly analysis: {
@@ -2213,6 +2247,17 @@ declare enum BookingNeed {
2213
2247
  Sometimes = "sometimes",
2214
2248
  None = "none"
2215
2249
  }
2250
+ /** Commerce C-D21: whether a kind of business sells online — the need `products` (its site is a whole store). */
2251
+ declare enum SellingNeed {
2252
+ /** It sells: the reading names `products` (from: type) — the owner may switch it off. */
2253
+ Inferred = "inferred",
2254
+ /** It may sell (a café's beans, an artist's prints): offered on Analysis, switched off until the owner says so. */
2255
+ Offered = "offered",
2256
+ /** Care and trust work: never a shop, whatever a reading said. */
2257
+ Never = "never",
2258
+ /** Not on the lists: as the owner said. */
2259
+ None = "none"
2260
+ }
2216
2261
  /** The content checks of the avoid grammar (a look rule is the other kind). */
2217
2262
  declare enum AvoidCheck {
2218
2263
  NeedsFamily = "needs-family",
@@ -2319,6 +2364,7 @@ interface BusinessType {
2319
2364
  /** Stock photos may fill its pictures (never the work itself). */
2320
2365
  readonly stock: boolean;
2321
2366
  readonly booking: `${BookingNeed}`;
2367
+ readonly sells: `${SellingNeed}`;
2322
2368
  }
2323
2369
  /** The 30, in the board's order. Assignment here proves the generated data fits the type. */
2324
2370
  declare const BUSINESS_TYPES: ReadonlyArray<BusinessType>;
@@ -2536,6 +2582,20 @@ interface SiteNeed {
2536
2582
  * each marked `from: 'type'` (the Analysis step's "we added"). Pure; an unknown type adds nothing.
2537
2583
  */
2538
2584
  declare function inferNeeds(typeId: string | null | undefined, said?: ReadonlyArray<Omit<SiteNeed, 'from'>>, types?: ReadonlyArray<BusinessType>): SiteNeed[];
2585
+ /** The need a business that sells names (generation-core `SHOP_NEED`): its site is a whole store. */
2586
+ declare const PRODUCTS_NEED: NeedId;
2587
+ /**
2588
+ * Commerce C-D21 (R-H1): whether a reading's business sells — settled by its kind, never left to a model's guess. A kind
2589
+ * that sells (`inferred`) has `products` (from: type, unless the owner named it); a kind that never sells (care, trust)
2590
+ * has none, whatever was said; the rest keep what the reading said — on Analysis, an `offered` kind shows `products`
2591
+ * switched off (`offeredNeeds`). Pure; the same list when nothing changes.
2592
+ */
2593
+ declare function withSellingNeed(typeId: string | null | undefined, needs: ReadonlyArray<SiteNeed>, types?: ReadonlyArray<BusinessType>): SiteNeed[];
2594
+ /** The needs Analysis offers switched off for this kind of business (a café's beans): `products` for an `offered` one
2595
+ * whose reading lacks it. */
2596
+ declare function offeredNeeds(typeId: string | null | undefined, needs: ReadonlyArray<Pick<SiteNeed, 'id'>>, types?: ReadonlyArray<BusinessType>): NeedId[];
2597
+ /** True when the needs say the business sells (the plan must name what — generation-core `validateSitePlan`'s `sells`). */
2598
+ declare function needsSell(needs: ReadonlyArray<Pick<SiteNeed, 'id'>>): boolean;
2539
2599
 
2540
2600
  /**
2541
2601
  * Design advice (AI plan rev 3 §3f, H5's core): the business type's avoid rules run against a built site's
@@ -3179,5 +3239,5 @@ type SiteAuditView = SiteAudit & {
3179
3239
  advice: LintFinding[];
3180
3240
  };
3181
3241
 
3182
- export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, ComposedPageState, CopyLength, GENERATION_LIMITS, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, MAX_PIXEL_SAMPLES, MAX_READ_PICTURES, NEEDS, NEED_IDS, NeedSource, PALETTE_SIZE, PALETTE_THRESHOLDS, PictureRole, PicturesUnavailable, PlanChangeOutcome, PresetFit, RANK_WEIGHTS, READING_SHAPE, READ_ANIMATE, READ_WEIGHTS, RankReason, ReaderState, ReadingIssueCode, SITE_ANALYSIS_SCHEMA_NAME, SITE_READING_SCHEMA_NAME, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, SiteReadRefusal, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisFromWire, analysisPromptContext, analysisToWire, bestRankedPreset, businessTypeById, calmerChoice, decodeSiteReading, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, measurePalette, mergeStyleReads, motionAdvice, motionFor, normalizeAddress, oklchHue, paletteBrand, paletteGround, paletteSamples, pictureStyleRead, pixelSamples, presetDesign, presetHasSerifHeadings, presetLook, presetReason, presetsByFlavor, rankStylePresets, rankWithReferences, readPalette, referenceSeed, seedPassesPreset, siteAnalysisJsonSchema, siteReadingJsonSchema, startingDesign, structureFor, userAvoidRule, validateSiteAnalysis, validateSiteReading, withoutAddress };
3242
+ export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, ComposedPageState, CopyLength, GENERATION_LIMITS, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, MAX_PIXEL_SAMPLES, MAX_READ_PICTURES, NEEDS, NEED_IDS, NeedSource, PALETTE_SIZE, PALETTE_THRESHOLDS, PRODUCTS_NEED, PictureRole, PicturesUnavailable, PlanChangeOutcome, PresetFit, RANK_WEIGHTS, READING_SHAPE, READ_ANIMATE, READ_WEIGHTS, RankReason, ReaderState, ReadingIssueCode, SITE_ANALYSIS_SCHEMA_NAME, SITE_READING_SCHEMA_NAME, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, SellingNeed, SiteReadRefusal, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisFromWire, analysisPromptContext, analysisToWire, bestRankedPreset, businessTypeById, calmerChoice, decodeSiteReading, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, measurePalette, mergeStyleReads, motionAdvice, motionFor, needsSell, normalizeAddress, offeredNeeds, oklchHue, paletteBrand, paletteGround, paletteSamples, pictureStyleRead, pixelSamples, presetDesign, presetHasSerifHeadings, presetLook, presetReason, presetsByFlavor, rankStylePresets, rankWithReferences, readPalette, referenceSeed, seedPassesPreset, siteAnalysisJsonSchema, siteReadingJsonSchema, startingDesign, structureFor, userAvoidRule, validateSiteAnalysis, validateSiteReading, withSellingNeed, withoutAddress };
3183
3243
  export type { AiGenerationView, AnalysisContext, AnalysisIssue, AnalysisValidation, AvoidRule, BusinessType, BusinessTypeMatch, CheckRule, ColourSample, ComposedPageView, FactRead, GenerationBuildRequest, GenerationFileView, GenerationPicturesView, GenerationReadersView, GenerationStartRequest, GoodFit, LayoutCheckRequest, LayoutPhotoView, LintFinding, LintSite, LookCondition, LookDesign, LookRule, MeasuredPicture, MotionBasis, MotionInput, MotionStart, NeedDef, NeedId, PaletteColour, PaletteReading, PictureStyle, PlanRevisionView, PresetFlavorGroup, PromptContext, PromptContextOptions, PromptSection, RankInput, RankedPreset, ReadingIssue, ReferenceSeed, SiteAnalysis, SiteAuditView, SiteNeed, SiteReaderView, SiteReading, StartingDesign, StructureChoice, StructureId, StyleHints, StyleRead, UserAvoidId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.96.2",
3
+ "version": "5.98.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -25,3 +25,5 @@ export * from './variants';
25
25
  export * from './quantity';
26
26
  export * from './cart-transport';
27
27
  export * from './shop-display';
28
+ export * from './site-checkout';
29
+ export { looksLikeEmail, looksLikePhone } from './text';
@@ -166,3 +166,25 @@ export function availableShippingMethods(methods: readonly ShippingMethod[], pri
166
166
  lineCount: pricedCart.lines.length,
167
167
  });
168
168
  }
169
+
170
+ /**
171
+ * What the goods still lack before a free-over method delivers free (the drawer's "Add ₪X more for free delivery"):
172
+ * the smallest gap over the methods offered, null when nothing ships, when no method is free-over, or when one already
173
+ * is free. `methods` are the ready ones (the checkout's options answer only those).
174
+ */
175
+ export function freeShippingRemaining(
176
+ methods: ReadonlyArray<Pick<ShippingMethod, 'kind'> & { freeOver?: Money | null }>,
177
+ cart: Pick<ShippingCart, 'currency' | 'subtotal' | 'discount' | 'requiresShipping' | 'lines'>,
178
+ ): Money | null {
179
+ if (!cart.lines.length || !cart.requiresShipping) return null;
180
+ const goods = subtractMoney(cart.subtotal, cart.discount);
181
+ let gap: Money | null = null;
182
+ for (const method of Array.isArray(methods) ? methods : []) {
183
+ const over = method.kind === ShippingMethodKind.FreeOver ? method.freeOver : null;
184
+ if (!isMoney(over) || over.currency !== cart.currency) continue;
185
+ const left = over.amount - goods.amount;
186
+ if (left <= 0) return null;
187
+ if (!gap || left < gap.amount) gap = money(left, cart.currency);
188
+ }
189
+ return gap;
190
+ }