@vectoriox/iox-ui 5.97.0 → 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.
@@ -17,6 +17,10 @@ const SPEC_NEEDS = {
17
17
  "label": "Your work or products",
18
18
  "archetype": "collection"
19
19
  },
20
+ "products": {
21
+ "label": "Products you sell",
22
+ "archetype": "collection"
23
+ },
20
24
  "detail": {
21
25
  "label": "A page for each item",
22
26
  "archetype": "detail"
@@ -259,7 +263,8 @@ const SPEC_BUSINESS_TYPES = [
259
263
  "structure": "studio",
260
264
  "slice": true,
261
265
  "stock": false,
262
- "booking": "sometimes"
266
+ "booking": "sometimes",
267
+ "sells": "offered"
263
268
  },
264
269
  {
265
270
  "id": "interior-design",
@@ -371,7 +376,8 @@ const SPEC_BUSINESS_TYPES = [
371
376
  "structure": "studio",
372
377
  "slice": true,
373
378
  "stock": false,
374
- "booking": "none"
379
+ "booking": "none",
380
+ "sells": "none"
375
381
  },
376
382
  {
377
383
  "id": "architecture",
@@ -478,7 +484,8 @@ const SPEC_BUSINESS_TYPES = [
478
484
  "structure": "studio",
479
485
  "slice": false,
480
486
  "stock": false,
481
- "booking": "none"
487
+ "booking": "none",
488
+ "sells": "none"
482
489
  },
483
490
  {
484
491
  "id": "creative-studio",
@@ -577,7 +584,8 @@ const SPEC_BUSINESS_TYPES = [
577
584
  "structure": "studio",
578
585
  "slice": false,
579
586
  "stock": false,
580
- "booking": "none"
587
+ "booking": "none",
588
+ "sells": "none"
581
589
  },
582
590
  {
583
591
  "id": "artist",
@@ -678,7 +686,8 @@ const SPEC_BUSINESS_TYPES = [
678
686
  "structure": "studio",
679
687
  "slice": false,
680
688
  "stock": false,
681
- "booking": "none"
689
+ "booking": "none",
690
+ "sells": "offered"
682
691
  },
683
692
  {
684
693
  "id": "makers",
@@ -750,8 +759,7 @@ const SPEC_BUSINESS_TYPES = [
750
759
  "contact"
751
760
  ],
752
761
  "needs": [
753
- "collection",
754
- "detail",
762
+ "products",
755
763
  "about",
756
764
  "contact"
757
765
  ],
@@ -784,7 +792,8 @@ const SPEC_BUSINESS_TYPES = [
784
792
  "structure": "studio",
785
793
  "slice": true,
786
794
  "stock": false,
787
- "booking": "sometimes"
795
+ "booking": "sometimes",
796
+ "sells": "inferred"
788
797
  },
789
798
  {
790
799
  "id": "jewellery",
@@ -848,8 +857,7 @@ const SPEC_BUSINESS_TYPES = [
848
857
  "contact"
849
858
  ],
850
859
  "needs": [
851
- "collection",
852
- "detail",
860
+ "products",
853
861
  "about",
854
862
  "contact"
855
863
  ],
@@ -886,7 +894,8 @@ const SPEC_BUSINESS_TYPES = [
886
894
  "structure": "studio",
887
895
  "slice": false,
888
896
  "stock": false,
889
- "booking": "none"
897
+ "booking": "none",
898
+ "sells": "inferred"
890
899
  },
891
900
  {
892
901
  "id": "tattoo",
@@ -983,7 +992,8 @@ const SPEC_BUSINESS_TYPES = [
983
992
  "structure": "studio",
984
993
  "slice": false,
985
994
  "stock": false,
986
- "booking": "must"
995
+ "booking": "must",
996
+ "sells": "none"
987
997
  },
988
998
  {
989
999
  "id": "spa",
@@ -1100,7 +1110,8 @@ const SPEC_BUSINESS_TYPES = [
1100
1110
  "structure": "practice",
1101
1111
  "slice": true,
1102
1112
  "stock": true,
1103
- "booking": "must"
1113
+ "booking": "must",
1114
+ "sells": "none"
1104
1115
  },
1105
1116
  {
1106
1117
  "id": "salon",
@@ -1206,7 +1217,8 @@ const SPEC_BUSINESS_TYPES = [
1206
1217
  "structure": "practice",
1207
1218
  "slice": true,
1208
1219
  "stock": true,
1209
- "booking": "must"
1220
+ "booking": "must",
1221
+ "sells": "none"
1210
1222
  },
1211
1223
  {
1212
1224
  "id": "yoga",
@@ -1308,7 +1320,8 @@ const SPEC_BUSINESS_TYPES = [
1308
1320
  "structure": "practice",
1309
1321
  "slice": false,
1310
1322
  "stock": true,
1311
- "booking": "must"
1323
+ "booking": "must",
1324
+ "sells": "none"
1312
1325
  },
1313
1326
  {
1314
1327
  "id": "fitness",
@@ -1418,7 +1431,8 @@ const SPEC_BUSINESS_TYPES = [
1418
1431
  "structure": "practice",
1419
1432
  "slice": false,
1420
1433
  "stock": true,
1421
- "booking": "must"
1434
+ "booking": "must",
1435
+ "sells": "none"
1422
1436
  },
1423
1437
  {
1424
1438
  "id": "therapist",
@@ -1529,7 +1543,8 @@ const SPEC_BUSINESS_TYPES = [
1529
1543
  "structure": "practice",
1530
1544
  "slice": false,
1531
1545
  "stock": true,
1532
- "booking": "must"
1546
+ "booking": "must",
1547
+ "sells": "never"
1533
1548
  },
1534
1549
  {
1535
1550
  "id": "clinic",
@@ -1643,7 +1658,8 @@ const SPEC_BUSINESS_TYPES = [
1643
1658
  "structure": "practice",
1644
1659
  "slice": true,
1645
1660
  "stock": true,
1646
- "booking": "must"
1661
+ "booking": "must",
1662
+ "sells": "never"
1647
1663
  },
1648
1664
  {
1649
1665
  "id": "dental",
@@ -1742,7 +1758,8 @@ const SPEC_BUSINESS_TYPES = [
1742
1758
  "structure": "practice",
1743
1759
  "slice": false,
1744
1760
  "stock": true,
1745
- "booking": "must"
1761
+ "booking": "must",
1762
+ "sells": "never"
1746
1763
  },
1747
1764
  {
1748
1765
  "id": "vet",
@@ -1842,7 +1859,8 @@ const SPEC_BUSINESS_TYPES = [
1842
1859
  "structure": "practice",
1843
1860
  "slice": false,
1844
1861
  "stock": true,
1845
- "booking": "must"
1862
+ "booking": "must",
1863
+ "sells": "none"
1846
1864
  },
1847
1865
  {
1848
1866
  "id": "restaurant",
@@ -1950,7 +1968,8 @@ const SPEC_BUSINESS_TYPES = [
1950
1968
  "structure": "place",
1951
1969
  "slice": false,
1952
1970
  "stock": true,
1953
- "booking": "tables"
1971
+ "booking": "tables",
1972
+ "sells": "none"
1954
1973
  },
1955
1974
  {
1956
1975
  "id": "cafe-bakery",
@@ -2054,7 +2073,8 @@ const SPEC_BUSINESS_TYPES = [
2054
2073
  "structure": "place",
2055
2074
  "slice": true,
2056
2075
  "stock": true,
2057
- "booking": "none"
2076
+ "booking": "none",
2077
+ "sells": "offered"
2058
2078
  },
2059
2079
  {
2060
2080
  "id": "bar-winery",
@@ -2159,7 +2179,8 @@ const SPEC_BUSINESS_TYPES = [
2159
2179
  "structure": "place",
2160
2180
  "slice": false,
2161
2181
  "stock": true,
2162
- "booking": "none"
2182
+ "booking": "none",
2183
+ "sells": "offered"
2163
2184
  },
2164
2185
  {
2165
2186
  "id": "boutique",
@@ -2226,8 +2247,7 @@ const SPEC_BUSINESS_TYPES = [
2226
2247
  "contact"
2227
2248
  ],
2228
2249
  "needs": [
2229
- "collection",
2230
- "detail",
2250
+ "products",
2231
2251
  "about",
2232
2252
  "contact"
2233
2253
  ],
@@ -2256,7 +2276,8 @@ const SPEC_BUSINESS_TYPES = [
2256
2276
  "structure": "studio",
2257
2277
  "slice": false,
2258
2278
  "stock": true,
2259
- "booking": "none"
2279
+ "booking": "none",
2280
+ "sells": "inferred"
2260
2281
  },
2261
2282
  {
2262
2283
  "id": "florist",
@@ -2322,7 +2343,7 @@ const SPEC_BUSINESS_TYPES = [
2322
2343
  "contact"
2323
2344
  ],
2324
2345
  "needs": [
2325
- "collection",
2346
+ "products",
2326
2347
  "about",
2327
2348
  "contact"
2328
2349
  ],
@@ -2354,7 +2375,8 @@ const SPEC_BUSINESS_TYPES = [
2354
2375
  "structure": "studio",
2355
2376
  "slice": false,
2356
2377
  "stock": true,
2357
- "booking": "none"
2378
+ "booking": "none",
2379
+ "sells": "inferred"
2358
2380
  },
2359
2381
  {
2360
2382
  "id": "home-goods",
@@ -2419,8 +2441,7 @@ const SPEC_BUSINESS_TYPES = [
2419
2441
  "contact"
2420
2442
  ],
2421
2443
  "needs": [
2422
- "collection",
2423
- "detail",
2444
+ "products",
2424
2445
  "about",
2425
2446
  "contact"
2426
2447
  ],
@@ -2452,7 +2473,8 @@ const SPEC_BUSINESS_TYPES = [
2452
2473
  "structure": "studio",
2453
2474
  "slice": false,
2454
2475
  "stock": true,
2455
- "booking": "none"
2476
+ "booking": "none",
2477
+ "sells": "inferred"
2456
2478
  },
2457
2479
  {
2458
2480
  "id": "consultant",
@@ -2553,7 +2575,8 @@ const SPEC_BUSINESS_TYPES = [
2553
2575
  "structure": "practice",
2554
2576
  "slice": true,
2555
2577
  "stock": true,
2556
- "booking": "sometimes"
2578
+ "booking": "sometimes",
2579
+ "sells": "none"
2557
2580
  },
2558
2581
  {
2559
2582
  "id": "coach",
@@ -2647,7 +2670,8 @@ const SPEC_BUSINESS_TYPES = [
2647
2670
  "structure": "practice",
2648
2671
  "slice": false,
2649
2672
  "stock": true,
2650
- "booking": "must"
2673
+ "booking": "must",
2674
+ "sells": "none"
2651
2675
  },
2652
2676
  {
2653
2677
  "id": "law-accounting",
@@ -2761,7 +2785,8 @@ const SPEC_BUSINESS_TYPES = [
2761
2785
  "structure": "practice",
2762
2786
  "slice": false,
2763
2787
  "stock": true,
2764
- "booking": "sometimes"
2788
+ "booking": "sometimes",
2789
+ "sells": "never"
2765
2790
  },
2766
2791
  {
2767
2792
  "id": "real-estate",
@@ -2865,7 +2890,8 @@ const SPEC_BUSINESS_TYPES = [
2865
2890
  "structure": "studio",
2866
2891
  "slice": false,
2867
2892
  "stock": false,
2868
- "booking": "sometimes"
2893
+ "booking": "sometimes",
2894
+ "sells": "none"
2869
2895
  },
2870
2896
  {
2871
2897
  "id": "nonprofit",
@@ -2958,7 +2984,8 @@ const SPEC_BUSINESS_TYPES = [
2958
2984
  "structure": "practice",
2959
2985
  "slice": false,
2960
2986
  "stock": true,
2961
- "booking": "none"
2987
+ "booking": "none",
2988
+ "sells": "none"
2962
2989
  },
2963
2990
  {
2964
2991
  "id": "venue-events",
@@ -3063,7 +3090,8 @@ const SPEC_BUSINESS_TYPES = [
3063
3090
  "structure": "place",
3064
3091
  "slice": false,
3065
3092
  "stock": true,
3066
- "booking": "tables"
3093
+ "booking": "tables",
3094
+ "sells": "none"
3067
3095
  },
3068
3096
  {
3069
3097
  "id": "hotel-bnb",
@@ -3168,7 +3196,8 @@ const SPEC_BUSINESS_TYPES = [
3168
3196
  "structure": "place",
3169
3197
  "slice": false,
3170
3198
  "stock": true,
3171
- "booking": "tables"
3199
+ "booking": "tables",
3200
+ "sells": "none"
3172
3201
  },
3173
3202
  {
3174
3203
  "id": "classes",
@@ -3275,7 +3304,8 @@ const SPEC_BUSINESS_TYPES = [
3275
3304
  "structure": "practice",
3276
3305
  "slice": false,
3277
3306
  "stock": true,
3278
- "booking": "must"
3307
+ "booking": "must",
3308
+ "sells": "offered"
3279
3309
  }
3280
3310
  ];
3281
3311
  const SPEC_ANALYSIS_SHAPE = {
@@ -3724,6 +3754,18 @@ var BookingNeed;
3724
3754
  BookingNeed["Sometimes"] = "sometimes";
3725
3755
  BookingNeed["None"] = "none";
3726
3756
  })(BookingNeed || (BookingNeed = {}));
3757
+ /** Commerce C-D21: whether a kind of business sells online — the need `products` (its site is a whole store). */
3758
+ var SellingNeed;
3759
+ (function (SellingNeed) {
3760
+ /** It sells: the reading names `products` (from: type) — the owner may switch it off. */
3761
+ SellingNeed["Inferred"] = "inferred";
3762
+ /** It may sell (a café's beans, an artist's prints): offered on Analysis, switched off until the owner says so. */
3763
+ SellingNeed["Offered"] = "offered";
3764
+ /** Care and trust work: never a shop, whatever a reading said. */
3765
+ SellingNeed["Never"] = "never";
3766
+ /** Not on the lists: as the owner said. */
3767
+ SellingNeed["None"] = "none";
3768
+ })(SellingNeed || (SellingNeed = {}));
3727
3769
  /** The content checks of the avoid grammar (a look rule is the other kind). */
3728
3770
  var AvoidCheck;
3729
3771
  (function (AvoidCheck) {
@@ -3807,6 +3849,33 @@ function inferNeeds(typeId, said = [], types = BUSINESS_TYPES) {
3807
3849
  }
3808
3850
  return out;
3809
3851
  }
3852
+ /** The need a business that sells names (generation-core `SHOP_NEED`): its site is a whole store. */
3853
+ const PRODUCTS_NEED = 'products';
3854
+ /**
3855
+ * Commerce C-D21 (R-H1): whether a reading's business sells — settled by its kind, never left to a model's guess. A kind
3856
+ * that sells (`inferred`) has `products` (from: type, unless the owner named it); a kind that never sells (care, trust)
3857
+ * has none, whatever was said; the rest keep what the reading said — on Analysis, an `offered` kind shows `products`
3858
+ * switched off (`offeredNeeds`). Pure; the same list when nothing changes.
3859
+ */
3860
+ function withSellingNeed(typeId, needs, types = BUSINESS_TYPES) {
3861
+ const sells = types.find(t => t.id === typeId)?.sells;
3862
+ const has = needs.some(n => n.id === PRODUCTS_NEED);
3863
+ if (sells === SellingNeed.Never && has)
3864
+ return needs.filter(n => n.id !== PRODUCTS_NEED);
3865
+ if (sells === SellingNeed.Inferred && !has)
3866
+ return [...needs, { id: PRODUCTS_NEED, from: NeedSource.Type }];
3867
+ return [...needs];
3868
+ }
3869
+ /** The needs Analysis offers switched off for this kind of business (a café's beans): `products` for an `offered` one
3870
+ * whose reading lacks it. */
3871
+ function offeredNeeds(typeId, needs, types = BUSINESS_TYPES) {
3872
+ const sells = types.find(t => t.id === typeId)?.sells;
3873
+ return sells === SellingNeed.Offered && !needs.some(n => n.id === PRODUCTS_NEED) ? [PRODUCTS_NEED] : [];
3874
+ }
3875
+ /** True when the needs say the business sells (the plan must name what — generation-core `validateSitePlan`'s `sells`). */
3876
+ function needsSell(needs) {
3877
+ return needs.some(n => n.id === PRODUCTS_NEED);
3878
+ }
3810
3879
 
3811
3880
  /**
3812
3881
  * What the reading of a prompt returns (AI plan rev 3 §3d): one of the 30 kinds of business (and the two
@@ -4801,9 +4870,13 @@ function validateSiteReading(value, ctx) {
4801
4870
  /** A valid reading's answer → `SiteReading` (the analysis alone answers `{ analysis }`; the facts made a map again). */
4802
4871
  function decodeSiteReading(value, pictureCount) {
4803
4872
  if (pictureCount <= 0)
4804
- return { analysis: analysisFromWire(value).analysis };
4873
+ return { analysis: settled(analysisFromWire(value).analysis) };
4805
4874
  const reading = value;
4806
- return { ...reading, analysis: analysisFromWire(reading.analysis).analysis };
4875
+ return { ...reading, analysis: settled(analysisFromWire(reading.analysis).analysis) };
4876
+ }
4877
+ /** What a reading's kind of business settles whatever the model wrote: whether it sells (`withSellingNeed`). */
4878
+ function settled(analysis) {
4879
+ return Array.isArray(analysis?.needs) ? { ...analysis, needs: withSellingNeed(analysis.businessType, analysis.needs) } : analysis;
4807
4880
  }
4808
4881
  /** The liked pictures as a StyleRead: their palettes measured together, what the model saw of them. */
4809
4882
  function pictureStyleRead(pictures, style) {
@@ -4983,5 +5056,5 @@ function startingDesign(input, read = null) {
4983
5056
  * Generated bundle index. Do not edit.
4984
5057
  */
4985
5058
 
4986
- 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 };
5059
+ 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 };
4987
5060
  //# sourceMappingURL=vectoriox-iox-ui-harness-core.mjs.map