@vectoriox/iox-ui 5.205.0 → 5.206.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/data-core/index.d.ts +13 -4
- package/design-core/index.d.ts +269 -6
- package/fesm2022/vectoriox-iox-ui-data-core.mjs +23 -4
- package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +3064 -2682
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1159 -172
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +71 -19
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +32 -4
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/generation-core/index.d.ts +411 -34
- package/harness-core/index.d.ts +52 -12
- package/package.json +1 -1
- package/scene-core/index.d.ts +16 -2
- package/src/data-core/placeholder-rows.ts +24 -3
- package/src/design-core/colour-eval.ts +22 -0
- package/src/design-core/contrast-audit.ts +96 -2
- package/src/design-core/design-token.model.ts +2 -0
- package/src/design-core/flavor-spec.generated.ts +184 -0
- package/src/design-core/font-metrics.ts +14 -1
- package/src/design-core/font-vertical.ts +80 -0
- package/src/design-core/public-api.ts +1 -0
- package/src/design-core/style-presets.ts +20 -1
- package/src/design-core/token-css.ts +3 -1
- package/src/generation-core/audit-site.ts +5 -3
- package/src/generation-core/compose-free.ts +1 -1
- package/src/generation-core/compose-layout.ts +172 -22
- package/src/generation-core/critic-calibration.ts +26 -9
- package/src/generation-core/critic-numbers.ts +259 -0
- package/src/generation-core/critic-prompt.ts +53 -6
- package/src/generation-core/critic-rubric.generated.ts +6 -6
- package/src/generation-core/critic-sheet.ts +112 -1
- package/src/generation-core/layout-render-check.ts +35 -2
- package/src/generation-core/nav-shape.ts +67 -8
- package/src/generation-core/opening-mix.ts +61 -17
- package/src/generation-core/public-api.ts +2 -0
- package/src/generation-core/social-links.ts +47 -8
- package/src/generation-core/stock-photos.ts +149 -14
- package/src/generation-core/stock-search.ts +108 -19
- package/src/generation-core/stock-subjects.ts +204 -0
- package/src/harness-core/business-types.ts +3 -0
- package/src/harness-core/harness-spec.generated.ts +54 -15
- package/src/harness-core/intake.ts +18 -5
- package/src/scene-core/scene.ts +34 -3
- package/styles/iox-design.css +41 -2
- package/styles/iox-forms.css +7 -6
package/harness-core/index.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
136
136
|
readonly group: "Creative work";
|
|
137
137
|
readonly uupm: "53 Photography Studio";
|
|
138
138
|
readonly match: readonly ["photographer", "photography", "photo studio", "צלם", "צילום"];
|
|
139
|
+
readonly qualifiers: readonly [];
|
|
139
140
|
readonly good: readonly [{
|
|
140
141
|
readonly preset: "night-gallery";
|
|
141
142
|
readonly reason: "Pictures sit on black, as in a darkened gallery.";
|
|
@@ -248,7 +249,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
248
249
|
readonly he: "מעצב/ת פנים";
|
|
249
250
|
readonly group: "Creative work";
|
|
250
251
|
readonly uupm: "161 Home Decoration & Interior Design · 84 Architecture / Interior";
|
|
251
|
-
readonly match: readonly ["interior", "
|
|
252
|
+
readonly match: readonly ["interior", "עיצוב פנים", "decor"];
|
|
253
|
+
readonly qualifiers: readonly [];
|
|
252
254
|
readonly good: readonly [{
|
|
253
255
|
readonly preset: "gallery-minimal";
|
|
254
256
|
readonly reason: "Calm white rooms let the materials show.";
|
|
@@ -363,6 +365,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
363
365
|
readonly group: "Creative work";
|
|
364
366
|
readonly uupm: "84 Architecture / Interior · 51 Construction/Architecture";
|
|
365
367
|
readonly match: readonly ["architect", "architecture", "אדריכל"];
|
|
368
|
+
readonly qualifiers: readonly [];
|
|
366
369
|
readonly good: readonly [{
|
|
367
370
|
readonly preset: "swiss-grid";
|
|
368
371
|
readonly reason: "A strict grid and clean type, like a drawing set.";
|
|
@@ -478,6 +481,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
478
481
|
readonly group: "Creative work";
|
|
479
482
|
readonly uupm: "10 Creative Agency";
|
|
480
483
|
readonly match: readonly ["design studio", "branding", "agency", "graphic design", "סטודיו לעיצוב", "מיתוג"];
|
|
484
|
+
readonly qualifiers: readonly [];
|
|
481
485
|
readonly good: readonly [{
|
|
482
486
|
readonly preset: "zine";
|
|
483
487
|
readonly reason: "Shows you take risks with type and colour.";
|
|
@@ -581,6 +585,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
581
585
|
readonly group: "Creative work";
|
|
582
586
|
readonly uupm: "11 Portfolio/Personal · Museum/Gallery";
|
|
583
587
|
readonly match: readonly ["artist", "painter", "illustrator", "אמנית", "אמן", "ציור", "איור"];
|
|
588
|
+
readonly qualifiers: readonly [];
|
|
584
589
|
readonly good: readonly [{
|
|
585
590
|
readonly preset: "zine";
|
|
586
591
|
readonly reason: "Hand-made energy that suits an illustrator.";
|
|
@@ -685,7 +690,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
685
690
|
readonly he: "קרמיקה ויוצרים";
|
|
686
691
|
readonly group: "Creative work";
|
|
687
692
|
readonly uupm: "no row — nearest: Nature Distilled, Anti-Polish styles; Indie/Craft pairing";
|
|
688
|
-
readonly match: readonly ["ceramic", "ceramics", "pottery", "stoneware", "handmade", "
|
|
693
|
+
readonly match: readonly ["ceramic", "ceramics", "pottery", "stoneware", "handmade", "craft", "maker", "workshop", "קרמיקה", "כלי חרס", "עבודת יד", "סדנ"];
|
|
694
|
+
readonly qualifiers: readonly [];
|
|
689
695
|
readonly good: readonly [{
|
|
690
696
|
readonly preset: "warm-editorial";
|
|
691
697
|
readonly reason: "Cream and terracotta echo clay; a serif with a hand-made feel.";
|
|
@@ -790,6 +796,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
790
796
|
readonly group: "Creative work";
|
|
791
797
|
readonly uupm: "33 Luxury/Premium Brand · 4 E-commerce Luxury";
|
|
792
798
|
readonly match: readonly ["jewel", "jewellery", "jewelry", "rings", "תכשיט"];
|
|
799
|
+
readonly qualifiers: readonly [];
|
|
793
800
|
readonly good: readonly [{
|
|
794
801
|
readonly preset: "quiet-luxury";
|
|
795
802
|
readonly reason: "Bronze and serif: precious without shouting.";
|
|
@@ -895,6 +902,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
895
902
|
readonly group: "Creative work";
|
|
896
903
|
readonly uupm: "no row";
|
|
897
904
|
readonly match: readonly ["tattoo", "barber", "piercing", "קעקוע", "ברבר", "מספרה לגברים"];
|
|
905
|
+
readonly qualifiers: readonly [];
|
|
898
906
|
readonly good: readonly [{
|
|
899
907
|
readonly preset: "ink-studio";
|
|
900
908
|
readonly reason: "Black, sharp and orange: a studio with attitude.";
|
|
@@ -999,6 +1007,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
999
1007
|
readonly group: "Wellness and beauty";
|
|
1000
1008
|
readonly uupm: "32 Beauty/Spa/Wellness Service";
|
|
1001
1009
|
readonly match: readonly ["spa", "massage", "wellness", "ספא", "עיסוי", "טיפולי"];
|
|
1010
|
+
readonly qualifiers: readonly [];
|
|
1002
1011
|
readonly good: readonly [{
|
|
1003
1012
|
readonly preset: "soft-spa";
|
|
1004
1013
|
readonly reason: "Rose cream, a fine serif and slow motion: calm before they arrive.";
|
|
@@ -1114,7 +1123,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1114
1123
|
readonly he: "מספרה וסלון יופי";
|
|
1115
1124
|
readonly group: "Wellness and beauty";
|
|
1116
1125
|
readonly uupm: "32 Beauty/Spa/Wellness Service (salon keyword)";
|
|
1117
|
-
readonly match: readonly ["salon", "hair", "nails", "beauty", "lashes", "מספרה", "סלון", "ציפורניים", "קוסמטיקה"];
|
|
1126
|
+
readonly match: readonly ["salon", "hair", "nails", "beauty", "lashes", "מספרה", "סלון", "ציפורניים", "קוסמטיקה", "שיער"];
|
|
1127
|
+
readonly qualifiers: readonly [];
|
|
1118
1128
|
readonly good: readonly [{
|
|
1119
1129
|
readonly preset: "soft-spa";
|
|
1120
1130
|
readonly reason: "Elegant and soft for a beauty salon.";
|
|
@@ -1224,6 +1234,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1224
1234
|
readonly group: "Wellness and beauty";
|
|
1225
1235
|
readonly uupm: "141 Yoga & Stretching Guide (app)";
|
|
1226
1236
|
readonly match: readonly ["yoga", "pilates", "meditation", "יוגה", "פילאטיס", "מדיטציה"];
|
|
1237
|
+
readonly qualifiers: readonly [];
|
|
1227
1238
|
readonly good: readonly [{
|
|
1228
1239
|
readonly preset: "morning-glass";
|
|
1229
1240
|
readonly reason: "Fresh air and soft light, like a morning class.";
|
|
@@ -1329,6 +1340,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1329
1340
|
readonly group: "Wellness and beauty";
|
|
1330
1341
|
readonly uupm: "35 Fitness/Gym App";
|
|
1331
1342
|
readonly match: readonly ["gym", "fitness", "trainer", "crossfit", "dance", "boxing", "כושר", "מאמן", "מחול", "ריקוד"];
|
|
1343
|
+
readonly qualifiers: readonly [];
|
|
1332
1344
|
readonly good: readonly [{
|
|
1333
1345
|
readonly preset: "coral-studio";
|
|
1334
1346
|
readonly reason: "Warm, energetic and bouncy.";
|
|
@@ -1438,6 +1450,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1438
1450
|
readonly group: "Wellness and beauty";
|
|
1439
1451
|
readonly uupm: "22 Mental Health App (nearest)";
|
|
1440
1452
|
readonly match: readonly ["therapist", "therapy", "psychologist", "counsellor", "counselor", "מטפל", "פסיכולוג", "טיפול רגשי"];
|
|
1453
|
+
readonly qualifiers: readonly [];
|
|
1441
1454
|
readonly good: readonly [{
|
|
1442
1455
|
readonly preset: "fresh-practice";
|
|
1443
1456
|
readonly reason: "Soft and reassuring; nothing sharp.";
|
|
@@ -1548,6 +1561,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1548
1561
|
readonly group: "Health";
|
|
1549
1562
|
readonly uupm: "58 Medical Clinic";
|
|
1550
1563
|
readonly match: readonly ["clinic", "doctor", "physio", "physiotherapy", "medical", "מרפאה", "רופא", "פיזיותרפיה"];
|
|
1564
|
+
readonly qualifiers: readonly [];
|
|
1551
1565
|
readonly good: readonly [{
|
|
1552
1566
|
readonly preset: "clear-care";
|
|
1553
1567
|
readonly reason: "Clean and readable; trust first.";
|
|
@@ -1664,6 +1678,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1664
1678
|
readonly group: "Health";
|
|
1665
1679
|
readonly uupm: "60 Dental Practice";
|
|
1666
1680
|
readonly match: readonly ["dental", "dentist", "orthodont", "שיניים", "רופא שיניים"];
|
|
1681
|
+
readonly qualifiers: readonly [];
|
|
1667
1682
|
readonly good: readonly [{
|
|
1668
1683
|
readonly preset: "fresh-practice";
|
|
1669
1684
|
readonly reason: "Fresh blue and soft shapes: a friendly smile.";
|
|
@@ -1768,7 +1783,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1768
1783
|
readonly he: "וטרינר / טיפוח חיות";
|
|
1769
1784
|
readonly group: "Health";
|
|
1770
1785
|
readonly uupm: "61 Veterinary Clinic";
|
|
1771
|
-
readonly match: readonly ["vet", "veterinary", "pet", "dog", "groom", "וטרינר", "
|
|
1786
|
+
readonly match: readonly ["vet", "veterinary", "pet", "dog", "groom", "וטרינר", "כלב", "חיות"];
|
|
1787
|
+
readonly qualifiers: readonly [];
|
|
1772
1788
|
readonly good: readonly [{
|
|
1773
1789
|
readonly preset: "little-ones";
|
|
1774
1790
|
readonly reason: "Round, warm and playful.";
|
|
@@ -1873,6 +1889,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1873
1889
|
readonly group: "Food and drink";
|
|
1874
1890
|
readonly uupm: "34 Restaurant/Food Service";
|
|
1875
1891
|
readonly match: readonly ["restaurant", "bistro", "kitchen", "chef", "מסעדה", "שף", "ביסטרו"];
|
|
1892
|
+
readonly qualifiers: readonly [];
|
|
1876
1893
|
readonly good: readonly [{
|
|
1877
1894
|
readonly preset: "warm-editorial";
|
|
1878
1895
|
readonly reason: "Warm paper and serif, like a printed menu.";
|
|
@@ -1986,6 +2003,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
1986
2003
|
readonly group: "Food and drink";
|
|
1987
2004
|
readonly uupm: "63 Bakery/Cafe";
|
|
1988
2005
|
readonly match: readonly ["cafe", "café", "coffee", "bakery", "patisserie", "בית קפה", "קפה", "מאפייה", "קונדיטוריה"];
|
|
2006
|
+
readonly qualifiers: readonly [];
|
|
1989
2007
|
readonly good: readonly [{
|
|
1990
2008
|
readonly preset: "corner-cafe";
|
|
1991
2009
|
readonly reason: "Warm, round and cheerful.";
|
|
@@ -2095,6 +2113,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2095
2113
|
readonly group: "Food and drink";
|
|
2096
2114
|
readonly uupm: "64 Brewery/Winery";
|
|
2097
2115
|
readonly match: readonly ["bar", "wine", "winery", "brewery", "cocktail", "יקב", "בר", "יין", "בירה"];
|
|
2116
|
+
readonly qualifiers: readonly [];
|
|
2098
2117
|
readonly good: readonly [{
|
|
2099
2118
|
readonly preset: "quiet-luxury";
|
|
2100
2119
|
readonly reason: "Bronze and serif, like a good label.";
|
|
@@ -2204,6 +2223,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2204
2223
|
readonly group: "Shops";
|
|
2205
2224
|
readonly uupm: "3 E-commerce · 4 E-commerce Luxury";
|
|
2206
2225
|
readonly match: readonly ["boutique", "fashion", "clothing", "shop", "store", "בוטיק", "אופנה", "חנות"];
|
|
2226
|
+
readonly qualifiers: readonly ["boutique", "shop", "store", "בוטיק", "חנות"];
|
|
2207
2227
|
readonly good: readonly [{
|
|
2208
2228
|
readonly preset: "gallery-minimal";
|
|
2209
2229
|
readonly reason: "Clean and chic; the products lead.";
|
|
@@ -2306,7 +2326,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2306
2326
|
readonly he: "חנות פרחים";
|
|
2307
2327
|
readonly group: "Shops";
|
|
2308
2328
|
readonly uupm: "62 Florist/Plant Shop";
|
|
2309
|
-
readonly match: readonly ["florist", "
|
|
2329
|
+
readonly match: readonly ["florist", "flower", "plant", "bouquet", "פרח", "צמחים", "זרים"];
|
|
2330
|
+
readonly qualifiers: readonly [];
|
|
2310
2331
|
readonly good: readonly [{
|
|
2311
2332
|
readonly preset: "garden-party";
|
|
2312
2333
|
readonly reason: "Soft, romantic and full of colour.";
|
|
@@ -2410,7 +2431,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2410
2431
|
readonly he: "רהיטים ועיצוב הבית";
|
|
2411
2432
|
readonly group: "Shops";
|
|
2412
2433
|
readonly uupm: "161 Home Decoration & Interior Design";
|
|
2413
|
-
readonly match: readonly ["furniture", "home goods", "homeware", "decor shop", "
|
|
2434
|
+
readonly match: readonly ["furniture", "home goods", "homeware", "decor shop", "רהיט", "כלי בית"];
|
|
2435
|
+
readonly qualifiers: readonly [];
|
|
2414
2436
|
readonly good: readonly [{
|
|
2415
2437
|
readonly preset: "warm-editorial";
|
|
2416
2438
|
readonly reason: "Warm and tactile, like a catalogue.";
|
|
@@ -2515,6 +2537,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2515
2537
|
readonly group: "Professional services";
|
|
2516
2538
|
readonly uupm: "5 B2B Service (consult keyword)";
|
|
2517
2539
|
readonly match: readonly ["consult", "consultant", "advisor", "strategy", "יועץ", "ייעוץ"];
|
|
2540
|
+
readonly qualifiers: readonly [];
|
|
2518
2541
|
readonly good: readonly [{
|
|
2519
2542
|
readonly preset: "trusted-advisor";
|
|
2520
2543
|
readonly reason: "Navy and plain type: serious and clear.";
|
|
@@ -2621,6 +2644,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2621
2644
|
readonly group: "Professional services";
|
|
2622
2645
|
readonly uupm: "no row";
|
|
2623
2646
|
readonly match: readonly ["life coach", "business coach", "mentor", "coaching", "מאמנת", "אימון אישי", "קואצ'ינג"];
|
|
2647
|
+
readonly qualifiers: readonly [];
|
|
2624
2648
|
readonly good: readonly [{
|
|
2625
2649
|
readonly preset: "morning-glass";
|
|
2626
2650
|
readonly reason: "Fresh and hopeful.";
|
|
@@ -2719,7 +2743,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2719
2743
|
readonly he: "משרד עורכי דין / רואי חשבון";
|
|
2720
2744
|
readonly group: "Professional services";
|
|
2721
2745
|
readonly uupm: "40 Legal Services";
|
|
2722
|
-
readonly match: readonly ["law", "lawyer", "attorney", "legal", "accountant", "accounting", "עורך דין", "עורכת דין", "רואה חשבון", "משפט"];
|
|
2746
|
+
readonly match: readonly ["law", "lawyer", "attorney", "legal", "accountant", "accounting", "עורך דין", "עורכת דין", "עורכי דין", "רואה חשבון", "רואי חשבון", "משפט"];
|
|
2747
|
+
readonly qualifiers: readonly [];
|
|
2723
2748
|
readonly good: readonly [{
|
|
2724
2749
|
readonly preset: "trusted-advisor";
|
|
2725
2750
|
readonly reason: "Navy and gold: authority without fuss.";
|
|
@@ -2831,7 +2856,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2831
2856
|
readonly he: "נדל\"ן";
|
|
2832
2857
|
readonly group: "Professional services";
|
|
2833
2858
|
readonly uupm: "36 Real Estate/Property";
|
|
2834
|
-
readonly match: readonly ["real estate", "realtor", "property", "
|
|
2859
|
+
readonly match: readonly ["real estate", "realtor", "property", "apartment", "נדל\"ן", "נדלן", "דירה", "דירות"];
|
|
2860
|
+
readonly qualifiers: readonly [];
|
|
2835
2861
|
readonly good: readonly [{
|
|
2836
2862
|
readonly preset: "holiday-light";
|
|
2837
2863
|
readonly reason: "Bright glass and big photos.";
|
|
@@ -2939,7 +2965,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
2939
2965
|
readonly he: "עמותה";
|
|
2940
2966
|
readonly group: "Community and places";
|
|
2941
2967
|
readonly uupm: "44 Non-profit/Charity";
|
|
2942
|
-
readonly match: readonly ["nonprofit", "non-profit", "charity", "ngo", "volunteer", "community", "עמותה", "
|
|
2968
|
+
readonly match: readonly ["nonprofit", "non-profit", "charity", "ngo", "volunteer", "community", "עמותה", "מתנדב", "קהילה"];
|
|
2969
|
+
readonly qualifiers: readonly [];
|
|
2943
2970
|
readonly good: readonly [{
|
|
2944
2971
|
readonly preset: "kind-community";
|
|
2945
2972
|
readonly reason: "Warm, open and welcoming.";
|
|
@@ -3038,7 +3065,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
3038
3065
|
readonly he: "אולם, חתונות ואירועים";
|
|
3039
3066
|
readonly group: "Community and places";
|
|
3040
3067
|
readonly uupm: "39 Wedding/Event Planning · 70 Event Management";
|
|
3041
|
-
readonly match: readonly ["venue", "wedding", "
|
|
3068
|
+
readonly match: readonly ["venue", "wedding", "event", "hall", "festival", "אולם", "חתונה", "חתונות", "אירוע", "גן אירועים"];
|
|
3069
|
+
readonly qualifiers: readonly [];
|
|
3042
3070
|
readonly good: readonly [{
|
|
3043
3071
|
readonly preset: "garden-party";
|
|
3044
3072
|
readonly reason: "Romantic and warm for weddings.";
|
|
@@ -3147,6 +3175,7 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
3147
3175
|
readonly group: "Community and places";
|
|
3148
3176
|
readonly uupm: "38 Hotel/Hospitality";
|
|
3149
3177
|
readonly match: readonly ["hotel", "b&b", "guesthouse", "cabin", "zimmer", "מלון", "צימר", "אירוח"];
|
|
3178
|
+
readonly qualifiers: readonly [];
|
|
3150
3179
|
readonly good: readonly [{
|
|
3151
3180
|
readonly preset: "holiday-light";
|
|
3152
3181
|
readonly reason: "Sea-blue glass: makes people want to go.";
|
|
@@ -3254,7 +3283,8 @@ declare const SPEC_BUSINESS_TYPES: readonly [{
|
|
|
3254
3283
|
readonly he: "מורה, חוגים ושיעורים";
|
|
3255
3284
|
readonly group: "Community and places";
|
|
3256
3285
|
readonly uupm: "153 Music Instrument Learning · 56 Childcare/Daycare";
|
|
3257
|
-
readonly match: readonly ["tutor", "
|
|
3286
|
+
readonly match: readonly ["tutor", "lesson", "teacher", "classes", "school", "music lesson", "kids", "מורה", "שיעור", "חוג", "חוגים", "ילדים"];
|
|
3287
|
+
readonly qualifiers: readonly [];
|
|
3258
3288
|
readonly good: readonly [{
|
|
3259
3289
|
readonly preset: "little-ones";
|
|
3260
3290
|
readonly reason: "Playful and safe for children.";
|
|
@@ -3869,6 +3899,9 @@ interface BusinessType {
|
|
|
3869
3899
|
readonly uupm: string;
|
|
3870
3900
|
/** Keywords (English + Hebrew): the eval's expected answer and the no-model fallback. */
|
|
3871
3901
|
readonly match: ReadonlyArray<string>;
|
|
3902
|
+
/** iox-ui#213: those of `match` that also DESCRIBE other businesses ("a boutique hotel", "a coffee shop") — they name
|
|
3903
|
+
* this type only when no other type's keyword is in the words (`matchBusinessTypes`). Empty for most types. */
|
|
3904
|
+
readonly qualifiers: ReadonlyArray<string>;
|
|
3872
3905
|
/** The styles that suit it, best first, each with why. */
|
|
3873
3906
|
readonly good: ReadonlyArray<GoodFit>;
|
|
3874
3907
|
/** Colour v2 CV2: its mood and swatches, and (H1) the colour words its site NEVER wears (`<ingredient>.<word>`, harness
|
|
@@ -4503,7 +4536,14 @@ interface BusinessTypeMatch {
|
|
|
4503
4536
|
/** The letters matched — longer, more specific keywords weigh more ("barber" over "bar"). */
|
|
4504
4537
|
score: number;
|
|
4505
4538
|
}
|
|
4506
|
-
/**
|
|
4539
|
+
/**
|
|
4540
|
+
* The kind of business the words name, best first; empty when none of the keywords appears. Ties keep the board's order.
|
|
4541
|
+
*
|
|
4542
|
+
* A QUALIFIER (`BusinessType.qualifiers` — "boutique", "shop", "בוטיק") is a word that also describes other businesses: in
|
|
4543
|
+
* "a boutique hotel", "a boutique law firm" or "מספרה בוטיק" it says how, not what. So a qualifier counts only when the
|
|
4544
|
+
* words hold no plain keyword at all — "a boutique selling linen dresses" is still a boutique, "a boutique hotel" a hotel,
|
|
4545
|
+
* whatever their letter counts (iox-ui#213: "boutique" (8) used to outweigh "hotel" (5)).
|
|
4546
|
+
*/
|
|
4507
4547
|
declare function matchBusinessTypes(text: string, types?: ReadonlyArray<BusinessType>): BusinessTypeMatch[];
|
|
4508
4548
|
/** The single best kind of business the words name, or null. */
|
|
4509
4549
|
declare function matchBusinessType(text: string, types?: ReadonlyArray<BusinessType>): string | null;
|
package/package.json
CHANGED
package/scene-core/index.d.ts
CHANGED
|
@@ -166,9 +166,23 @@ declare const trackEase: (track: Pick<SceneTrack, "prop" | "ease">) => SceneEase
|
|
|
166
166
|
declare const trackRange: (track: Pick<SceneTrack, "range">) => SceneRange;
|
|
167
167
|
/** A track the hold drives (every authored track): what the timeline edits. */
|
|
168
168
|
declare const isHoldTrack: (track: Pick<SceneTrack, "range">) => boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Tracks on ONE timeline (the same property and range; a Clip's same direction) are pieces of one movement: their keys
|
|
171
|
+
* merge into the first one's track, ascending by progress (an exact repeat dropped), its ease kept. A step that fades in
|
|
172
|
+
* and later out (`[0.4, 0] → [0.5, 1]` and `[0.6, 1] → [0.7, 0]`) reads as one track — read as two, the later piece held
|
|
173
|
+
* its first key before it began and the step stood at full opacity over the step before it (iox-ui#195). The one rule
|
|
174
|
+
* both renderers read through `normalizeTracks`, and the composer stamps its tracks with. Pure.
|
|
175
|
+
*/
|
|
176
|
+
declare function mergeSceneTracks<T extends {
|
|
177
|
+
prop: string;
|
|
178
|
+
keys: ReadonlyArray<readonly [number, number | string]>;
|
|
179
|
+
range?: string;
|
|
180
|
+
from?: string;
|
|
181
|
+
}>(tracks: ReadonlyArray<T>): T[];
|
|
169
182
|
/**
|
|
170
183
|
* The tracks a saved value really holds: unknown properties, bad keys and colours that are not colours are dropped,
|
|
171
|
-
* keys sorted by progress, a track left with no key dropped
|
|
184
|
+
* keys sorted by progress, a track left with no key dropped, and tracks on one timeline merged (`mergeSceneTracks`).
|
|
185
|
+
* Never throws on what a page document holds.
|
|
172
186
|
*/
|
|
173
187
|
declare function normalizeTracks(tracks: unknown): SceneTrack[];
|
|
174
188
|
/**
|
|
@@ -954,5 +968,5 @@ interface TextScrub {
|
|
|
954
968
|
*/
|
|
955
969
|
declare function scrubTextReveal(el: HTMLElement, by: TextRevealBy, look?: TextRevealLook, easing?: string): TextScrub | null;
|
|
956
970
|
|
|
957
|
-
export { ARRIVE_ELEMENT_OPTIONS, ARRIVE_SCREEN_OPTIONS, ARRIVE_SHARE, LENIS_SMOOTH_CLASS, LETTER_PIECE_CAP, LIGHT_UP_PIECE_CAP, LetterRefusal, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_REST_DEFAULT, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, REVEAL_STAGGER_MAX_MS, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LAND_EVENT, SCENE_LAND_TRIGGER, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_TRACK_EASE, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneEase, SceneProp, SceneRange, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, arrivedWithin, attachSceneRoots, attachScenes, boxInside, buildSceneRecipe, colourAt, crossesStage, crossingOf, dampToward, followToward, gentleFrames, heldProgress, holdLookAt, isHoldTrack, layoutBoxOnScreen, letterCount, letterRefusalOf, lettersSplittable, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, onSceneLand, outermostNodeOf, pageScroller, parallaxFrames, parallaxOffset, parallaxRest, parallaxShift, playTextReveal, progressShowingFocus, progressShowingStep, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollAlong, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, scrollSubpixel, scrubPieceProgress, scrubTextReveal, setPageScroller, splitForReveal, splitText, stepLanding, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, textRevealStaggerOf, trackColourAt, trackEase, trackProgress, trackRange, trackValueAt, travellingLayerOf, unmovedBox, valueAt, watchArrival, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
971
|
+
export { ARRIVE_ELEMENT_OPTIONS, ARRIVE_SCREEN_OPTIONS, ARRIVE_SHARE, LENIS_SMOOTH_CLASS, LETTER_PIECE_CAP, LIGHT_UP_PIECE_CAP, LetterRefusal, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_REST_DEFAULT, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, REVEAL_STAGGER_MAX_MS, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LAND_EVENT, SCENE_LAND_TRIGGER, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_TRACK_EASE, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneEase, SceneProp, SceneRange, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, arrivedWithin, attachSceneRoots, attachScenes, boxInside, buildSceneRecipe, colourAt, crossesStage, crossingOf, dampToward, followToward, gentleFrames, heldProgress, holdLookAt, isHoldTrack, layoutBoxOnScreen, letterCount, letterRefusalOf, lettersSplittable, lightMotionWanted, lineIndexes, mergeSceneTracks, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, onSceneLand, outermostNodeOf, pageScroller, parallaxFrames, parallaxOffset, parallaxRest, parallaxShift, playTextReveal, progressShowingFocus, progressShowingStep, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollAlong, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, scrollSubpixel, scrubPieceProgress, scrubTextReveal, setPageScroller, splitForReveal, splitText, stepLanding, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, textRevealStaggerOf, trackColourAt, trackEase, trackProgress, trackRange, trackValueAt, travellingLayerOf, unmovedBox, valueAt, watchArrival, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
958
972
|
export type { ArrivalBox, RevealSplit, SceneBox, SceneBudget, SceneFilmDensity, SceneFrame, SceneFrameOptions, SceneFrameState, SceneKey, SceneLayerNode, SceneNodeSource, SceneProgress, SceneTrack, SceneTrackDef, SceneTreeNode, SceneWords, ScrollBox, ScrollDriverOptions, ScrollLink, ScrollLinkGeometry, ScrollMotionEnv, SmoothScroller, SplitText, SplitTextOptions, TextPiece, TextScrub };
|
|
@@ -9,7 +9,8 @@ import { resolveRepeaterItems } from './data-source-resolver';
|
|
|
9
9
|
* reading of both, so the builder and the SSR engine agree:
|
|
10
10
|
*
|
|
11
11
|
* - `isNumberedPlaceholderTitle` — words and then a number (G-D1). The Publishable gate reads it as well.
|
|
12
|
-
* - `isPlaceholderRow(row, titleField)` — a row marked `isSample` whose title is such a placeholder
|
|
12
|
+
* - `isPlaceholderRow(row, titleField)` — a row marked `isSample` whose title is such a placeholder, or whose picture is
|
|
13
|
+
* still the bundled sample art (`isSampleArtUrl`, G-D3 widened 2026-12-01).
|
|
13
14
|
* - `listTitleField(list)` — the field a list's card shows as its title; `listPlaceholderFields(list)` — that, else
|
|
14
15
|
* the fields a list with no title shows (a quote slider's person line, engine#41).
|
|
15
16
|
* - `planPlaceholderHides(roots, resolved)` — what the live engine leaves out (G-D3): placeholder rows are dropped,
|
|
@@ -33,6 +34,24 @@ export function isNumberedPlaceholderTitle(title: string | null | undefined): bo
|
|
|
33
34
|
return typeof title === 'string' && /^\D*\S\s+\d{1,3}$/u.test(title.trim());
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/**
|
|
38
|
+
* G-D3 widened (lead 2026-12-01, iox-cms#133's residual): the bundled sample art iox-cms uploads for a sample no photo
|
|
39
|
+
* fits — `media/samples/<organization>/sample-<n>.svg` (iox-cms `sampleImageKey`), under any storage origin. A sample still
|
|
40
|
+
* wearing it is a placeholder row like an unnamed one: pro-ceramics' "Handled Cup" showed grey shapes on its live Home.
|
|
41
|
+
*/
|
|
42
|
+
export const SAMPLE_ART_PATTERN = /(?:^|\/)media\/samples\/[^/?#]+\/sample-\d+\.svg(?:[?#].*)?$/;
|
|
43
|
+
|
|
44
|
+
/** True for a URL (or storage key) of the bundled sample art. */
|
|
45
|
+
export function isSampleArtUrl(value: unknown): boolean {
|
|
46
|
+
return typeof value === 'string' && SAMPLE_ART_PATTERN.test(value.trim());
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** A row's own picture fields that still hold sample art: a top-level string, an array of them, or `{ src }`. */
|
|
50
|
+
function holdsSampleArt(row: Record<string, unknown>): boolean {
|
|
51
|
+
const art = (v: unknown): boolean => isSampleArtUrl(v) || (!!v && typeof v === 'object' && !Array.isArray(v) && isSampleArtUrl((v as { src?: unknown }).src));
|
|
52
|
+
return Object.values(row).some(v => (Array.isArray(v) ? v.some(art) : art(v)));
|
|
53
|
+
}
|
|
54
|
+
|
|
36
55
|
/** The value at a dotted path of a row (`title`, `details.name`). */
|
|
37
56
|
function fieldOf(row: Record<string, unknown>, path: string): unknown {
|
|
38
57
|
let at: unknown = row;
|
|
@@ -44,14 +63,16 @@ function fieldOf(row: Record<string, unknown>, path: string): unknown {
|
|
|
44
63
|
}
|
|
45
64
|
|
|
46
65
|
/**
|
|
47
|
-
* True when a row is a sample still titled "<words> <n>"
|
|
48
|
-
* out. `titleField` is the list's title field (`listTitleField`); without one the row's `title` / `name` / `label` is
|
|
66
|
+
* True when a row is a sample still titled "<words> <n>", or still wearing the bundled sample art — the builder draws a
|
|
67
|
+
* ghost card for it, the live site leaves it out. `titleField` is the list's title field (`listTitleField`); without one the row's `title` / `name` / `label` is
|
|
49
68
|
* read. A row with no title to read is never a placeholder: when in doubt, show it.
|
|
50
69
|
*/
|
|
51
70
|
export function isPlaceholderRow(row: unknown, titleField?: string | ReadonlyArray<string> | null): boolean {
|
|
52
71
|
if (!row || typeof row !== 'object' || Array.isArray(row)) return false;
|
|
53
72
|
const r = row as Record<string, unknown>;
|
|
54
73
|
if (r[SAMPLE_ROW_FIELD] !== true) return false;
|
|
74
|
+
// G-D3 widened: a sample whose picture is still the bundled sample art — named or not — is a placeholder.
|
|
75
|
+
if (holdsSampleArt(r)) return true;
|
|
55
76
|
// engine#41: a list that names no title passes the fields it SHOWS — any of them still "<words> <n>" is the sample's
|
|
56
77
|
// unnamed line (a quote slider's "Guest 1").
|
|
57
78
|
if (Array.isArray(titleField) && titleField.length) return titleField.some(f => isPlaceholderRow(row, f));
|
|
@@ -105,6 +105,28 @@ export function paintColours(value: string | null | undefined, ink?: Rgba | null
|
|
|
105
105
|
return out;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Every colour a paint LAYS over what is under it, translucent kept (iox-ui#212): a plain colour is one; a gradient is each
|
|
110
|
+
* of its stops. For a paint over a PICTURE, where nothing opaque closes the list (a scrim): its thinnest stop is where a
|
|
111
|
+
* word over it stands on the least. Empty when nothing reads.
|
|
112
|
+
*/
|
|
113
|
+
export function paintStops(value: string | null | undefined, ink?: Rgba | null): Rgba[] {
|
|
114
|
+
const out: Rgba[] = [];
|
|
115
|
+
for (const layer of splitTopLevel(String(value ?? ''))) {
|
|
116
|
+
const g = GRADIENT.exec(layer);
|
|
117
|
+
if (!g) {
|
|
118
|
+
const plain = parseCssColour(layer, ink);
|
|
119
|
+
if (plain) out.push(plain);
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
for (const part of splitTopLevel(g[1])) {
|
|
123
|
+
const colour = parseCssColour(part.replace(STOP_POSITION, ''), ink);
|
|
124
|
+
if (colour) out.push(colour);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
129
|
+
|
|
108
130
|
/** The outermost ring of a box-shadow list (`0 0 0 4px <colour>`) — a focus indicator's colour. */
|
|
109
131
|
export function ringColour(shadow: string | null | undefined, ink?: Rgba | null): Rgba | null {
|
|
110
132
|
const layers = splitTopLevel(String(shadow ?? ''))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toHexColor, wcagContrastRatio, WCAG_AA_TEXT } from './brand';
|
|
2
2
|
import { WCAG_AA_UI } from './brand-neutrals';
|
|
3
|
-
import { compositeOver, paintColours, parseCssColour, quantizeRgb, Rgba, ringColour } from './colour-eval';
|
|
3
|
+
import { compositeOver, paintColours, paintStops, parseCssColour, quantizeRgb, Rgba, ringColour } from './colour-eval';
|
|
4
4
|
import { ElementStyle, ELEMENT_STYLES } from './element-styles';
|
|
5
5
|
import { SPEC_CONTRAST_AUDIT, SPEC_INK_SCOPES, SPEC_SCHEMES } from './flavor-spec.generated';
|
|
6
6
|
import { colorSchemeOf, DesignClassSource, SCHEME_INK } from './node-classes';
|
|
@@ -503,7 +503,14 @@ export function renderedContrastPairs(trees: ReadonlyArray<ContrastTree>): Set<s
|
|
|
503
503
|
} else if (style) {
|
|
504
504
|
out.add(pairKey(here, container, style.id));
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
// iox-ui#211: a scrim LAYER (a scrim style holding nothing) lies over the picture; the siblings after it stand on it.
|
|
507
|
+
let layer: ContrastTreeNode | null = null;
|
|
508
|
+
for (const child of node.children ?? []) {
|
|
509
|
+
if (!child) continue;
|
|
510
|
+
if (layer && holdsLooseWords(child)) out.add(overScrimPair(child, ownScheme(child) ?? here, layer));
|
|
511
|
+
visit(child, here, inside);
|
|
512
|
+
if (isScrimLayer(child)) layer = child;
|
|
513
|
+
}
|
|
507
514
|
};
|
|
508
515
|
for (const tree of trees) {
|
|
509
516
|
for (const scheme of tree.schemes?.length ? tree.schemes : [DEFAULT_SCHEME]) {
|
|
@@ -514,6 +521,93 @@ export function renderedContrastPairs(trees: ReadonlyArray<ContrastTree>): Set<s
|
|
|
514
521
|
return out;
|
|
515
522
|
}
|
|
516
523
|
|
|
524
|
+
/**
|
|
525
|
+
* iox-ui#211 (pro-ceramics, Midnight in dark mode: the name near-black on the opening's dark wash, 1.88:1 / 1.33:1). The
|
|
526
|
+
* opening lays its scrim as a LAYER over the picture and its words as the layer's next sibling — not inside it — so the
|
|
527
|
+
* words never read the scrim's ink; they read their frame's scheme (Inverse: dark in a light look, LIGHT in a dark one).
|
|
528
|
+
* The gate judged the scrim's own ink over the scrim (`scrimFindings`) and the words on their scheme's ground — never the
|
|
529
|
+
* words over the scrim they stand on. Now: the words the shared stylesheet pins to the scrim's ink (the rule
|
|
530
|
+
* `.iox-role-opening .iox-role-opening-scrim ~ :is(…)`, pinned to this list by contrast-rendered.spec) are judged as the
|
|
531
|
+
* scrim's own; any other sibling after a scrim layer is judged by `scrimLayerFindings` — its scheme's ink over the scrim.
|
|
532
|
+
*/
|
|
533
|
+
export const SCRIM_LAYER_ROLE = 'opening.scrim';
|
|
534
|
+
export const SCRIM_LAYER_WORD_ROLES: ReadonlySet<string> = new Set(['opening.words', 'opening.apart', 'opening.aside', 'opening.cue']);
|
|
535
|
+
/** The container a finding of `scrimLayerFindings` names: what stands over a scrim layer of `style`. */
|
|
536
|
+
export const overScrim = (style: string) => `over ${style}`;
|
|
537
|
+
|
|
538
|
+
/** A scrim style that holds nothing: a layer laid over a picture, under what follows it. */
|
|
539
|
+
function isScrimLayer(node: ContrastTreeNode): boolean {
|
|
540
|
+
return !!node.elementStyle && SCRIM_STYLES.has(node.elementStyle) && !(node.children ?? []).some(c => !!c);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/** The node types that are words when they wear no element style. */
|
|
544
|
+
const WORD_TYPES: ReadonlySet<string> = new Set(['Heading', 'Text', 'Paragraph', 'RichText', 'Link', 'Label']);
|
|
545
|
+
|
|
546
|
+
/** Whether a node over a scrim layer holds words standing ON the scrim — not inside something that paints its own fill
|
|
547
|
+
* (a card, a badge: judged on that fill) and not a picture (the opening's cutout). */
|
|
548
|
+
function holdsLooseWords(node: ContrastTreeNode): boolean {
|
|
549
|
+
const style = node.elementStyle ? STYLE_BY_ID.get(node.elementStyle) : undefined;
|
|
550
|
+
if (style) {
|
|
551
|
+
if (NOT_CONTENT.has(style.id) || isBoxStyle(style) || SCRIM_STYLES.has(style.id)) return false;
|
|
552
|
+
if (isContentStyle(style)) {
|
|
553
|
+
const fill = ownStyle(style)['backgroundColor'];
|
|
554
|
+
return !fill || fill === 'transparent';
|
|
555
|
+
}
|
|
556
|
+
} else if (node.type && WORD_TYPES.has(node.type)) {
|
|
557
|
+
return true;
|
|
558
|
+
}
|
|
559
|
+
return (node.children ?? []).some(c => !!c && holdsLooseWords(c));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/** The pair a node standing over a scrim layer renders: the scrim's own when the stylesheet pins it to the scrim's ink,
|
|
563
|
+
* else its scheme's ink over the scrim. */
|
|
564
|
+
function overScrimPair(node: ContrastTreeNode, scheme: string, layer: ContrastTreeNode): string {
|
|
565
|
+
const style = layer.elementStyle as string;
|
|
566
|
+
const pinned = layer.role === SCRIM_LAYER_ROLE && !!node.role && SCRIM_LAYER_WORD_ROLES.has(node.role);
|
|
567
|
+
return pinned ? pairKey(scheme, style, style) : pairKey(scheme, overScrim(style), INHERITED_TEXT);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* What stands over a scrim LAYER without its ink and ground (iox-ui#211, #212): in every scheme, the scheme's ink — and the
|
|
572
|
+
* heading, eyebrow and muted colours it holds — over the layer's THINNEST stop composited on a black AND a white picture
|
|
573
|
+
* (`FLOATING_BACKDROPS`: the scheme's ink may be light or dark, so either bound can be its worst case). The stock layer is a
|
|
574
|
+
* top-down gradient from `transparent`, so a loose word over it always fails: a word over a scrim layer carries the scrim
|
|
575
|
+
* as its own ground (the stylesheet's rule for `SCRIM_LAYER_WORD_ROLES`, judged as the scrim's own by `scrimFindings`). Judged only where the pages lay one (`renderedContrastFindings` keeps a finding whose scheme the sibling stands in);
|
|
576
|
+
* kept out of the sweep, which is the contract's audit 1:1.
|
|
577
|
+
*/
|
|
578
|
+
export function scrimLayerFindings(rows: ReadonlyArray<DesignTokenLike>, mode: ResolvedMode): ContrastFinding[] {
|
|
579
|
+
const valuesIn = schemeTokenResolver(rows, mode);
|
|
580
|
+
const out: ContrastFinding[] = [];
|
|
581
|
+
for (const scheme of SCHEME_IDS) {
|
|
582
|
+
const values = valuesIn(scheme);
|
|
583
|
+
for (const scrim of SCRIMS) {
|
|
584
|
+
// iox-ui#212: the layer's THINNEST stop — a word over a layer may stand anywhere on it (the stock layer opens on
|
|
585
|
+
// `transparent`: the bare picture), so a word with no ground of its own is judged where the layer is least.
|
|
586
|
+
const style = STYLE_BY_ID.get(scrim.style);
|
|
587
|
+
const stops = paintStops(resolveIn(values, style ? ownStyle(style)['backgroundColor'] : `var(--iox-${scrim.token})`));
|
|
588
|
+
const thinnest = stops.length ? stops.reduce((a, b) => (b.a < a.a ? b : a)) : parseCssColour(values[scrim.token]);
|
|
589
|
+
if (!thinnest) continue;
|
|
590
|
+
const ink = parseCssColour(resolveIn(values, SCHEME_INK));
|
|
591
|
+
const parts: Array<[string, Rgba | null]> = [
|
|
592
|
+
['text', ink], ...SCRIM_HELD_TOKENS.map((t): [string, Rgba | null] => [t, parseCssColour(resolveIn(values, `var(--iox-${t})`), ink)]),
|
|
593
|
+
];
|
|
594
|
+
for (const [name, image] of Object.entries(FLOATING_BACKDROPS)) {
|
|
595
|
+
const bg = quantizeRgb(compositeOver(thinnest, image));
|
|
596
|
+
for (const [part, fg] of parts) {
|
|
597
|
+
if (!fg) continue;
|
|
598
|
+
const f = quantizeRgb(fg.a < 1 ? compositeOver(fg, bg) : fg);
|
|
599
|
+
const ratio = wcagContrastRatio(f, bg);
|
|
600
|
+
out.push({
|
|
601
|
+
scheme, container: overScrim(scrim.style), element: INHERITED_TEXT, part: `${part} over a ${name} picture`,
|
|
602
|
+
fg: toHexColor(f), bg: toHexColor(bg), ratio: Math.round(ratio * 100) / 100, min: WCAG_AA_TEXT, pass: ratio >= WCAG_AA_TEXT - 1e-9,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return out;
|
|
609
|
+
}
|
|
610
|
+
|
|
517
611
|
/**
|
|
518
612
|
* The findings of `auditDesignContrast` that a site's pages RENDER (AD0 A6): the sweep judges every pairing the look COULD
|
|
519
613
|
* make (472 failing on both designer-loop proof sites, almost all in schemes and boxes nobody used), so the Publish gate
|
|
@@ -158,6 +158,8 @@ export interface FlavorTintConfig {
|
|
|
158
158
|
export interface FlavorPackV2 {
|
|
159
159
|
readonly id: string;
|
|
160
160
|
readonly name: string;
|
|
161
|
+
/** The name in Hebrew (iox-ui#217) — shown through `nameIn`. */
|
|
162
|
+
readonly nameHe: string;
|
|
161
163
|
readonly personality: string;
|
|
162
164
|
readonly inspiredBy: string;
|
|
163
165
|
readonly blurb: string;
|