@vectoriox/iox-ui 5.194.0 → 5.196.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/actions-core/index.d.ts +1 -0
- package/commerce-core/index.d.ts +0 -1
- package/composite-core/index.d.ts +39 -12
- package/design-core/index.d.ts +396 -9
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +1 -0
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs +0 -2
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +89 -36
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +864 -335
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +885 -513
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +221 -2
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs +11 -5
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +83 -31
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +322 -95
- package/harness-core/index.d.ts +165 -3
- package/identity-core/index.d.ts +8 -1
- package/index.d.ts +30 -8
- package/package.json +1 -1
- package/src/actions-core/public-api.ts +3 -0
- package/src/commerce-core/shop-display.ts +0 -2
- package/src/composite-core/account-runtime.ts +2 -2
- package/src/composite-core/header.ts +23 -1
- package/src/composite-core/lightbox.ts +27 -8
- package/src/composite-core/shop.ts +45 -28
- package/src/design-core/close-word.ts +18 -0
- package/src/design-core/contrast-audit.ts +62 -14
- package/src/design-core/flavor-spec.generated.ts +275 -1
- package/src/design-core/header-behaviour.ts +172 -3
- package/src/design-core/locale-direction.ts +17 -0
- package/src/design-core/node-classes.ts +9 -2
- package/src/design-core/public-api.ts +1 -0
- package/src/design-core/token-css.ts +62 -3
- package/src/generation-core/audit-site.ts +26 -5
- package/src/generation-core/audit-words.ts +8 -0
- package/src/generation-core/compose-site.ts +28 -10
- package/src/generation-core/header-mix.ts +165 -12
- package/src/generation-core/import-plan.ts +41 -0
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-spec.generated.ts +41 -9
- package/src/generation-core/stock-photos.ts +23 -4
- package/src/generation-core/stock-search.ts +235 -0
- package/src/harness-core/business-types.ts +11 -0
- package/src/harness-core/harness-spec.generated.ts +213 -0
- package/src/harness-core/run-compose-context.ts +9 -3
- package/src/identity-core/site-auth-transport.ts +11 -4
- package/styles/iox-design.css +148 -6
|
@@ -908,6 +908,31 @@ const SPEC_TIERS = {
|
|
|
908
908
|
"type": "spacing",
|
|
909
909
|
"default": "16px var(--iox-space-inline)"
|
|
910
910
|
},
|
|
911
|
+
{
|
|
912
|
+
"name": "nav-glass-bg",
|
|
913
|
+
"type": "color",
|
|
914
|
+
"default": "color-mix(in srgb, var(--iox-bg) 90%, transparent)"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"name": "nav-glass-backdrop",
|
|
918
|
+
"type": "effect",
|
|
919
|
+
"default": "blur(12px) saturate(140%)"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"name": "nav-glass-border",
|
|
923
|
+
"type": "color",
|
|
924
|
+
"default": "var(--iox-line)"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"name": "nav-glass-shadow",
|
|
928
|
+
"type": "shadow",
|
|
929
|
+
"default": "none"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "nav-over-veil",
|
|
933
|
+
"type": "paint",
|
|
934
|
+
"default": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
935
|
+
},
|
|
911
936
|
{
|
|
912
937
|
"name": "field-bg",
|
|
913
938
|
"type": "color",
|
|
@@ -4137,9 +4162,11 @@ const SPEC_A11Y = {
|
|
|
4137
4162
|
"surface-glass": "var(--iox-surface)",
|
|
4138
4163
|
"surface-glass-strong": "var(--iox-surface)",
|
|
4139
4164
|
"blur-surface": "none",
|
|
4165
|
+
"nav-glass-bg": "var(--iox-bg)",
|
|
4140
4166
|
"button-secondary-backdrop": "none",
|
|
4141
4167
|
"card-backdrop": "none",
|
|
4142
4168
|
"nav-backdrop": "none",
|
|
4169
|
+
"nav-glass-backdrop": "none",
|
|
4143
4170
|
"dialog-backdrop": "none",
|
|
4144
4171
|
"tabbar-backdrop": "none",
|
|
4145
4172
|
"segmented-track-backdrop": "none"
|
|
@@ -6166,6 +6193,28 @@ const SPEC_CONTRAST_AUDIT = {
|
|
|
6166
6193
|
"scheme": "inverse",
|
|
6167
6194
|
"image": "#FFFFFF"
|
|
6168
6195
|
}
|
|
6196
|
+
],
|
|
6197
|
+
"floatingGrounds": [
|
|
6198
|
+
{
|
|
6199
|
+
"ground": "nav-bg",
|
|
6200
|
+
"ink": "text"
|
|
6201
|
+
},
|
|
6202
|
+
{
|
|
6203
|
+
"ground": "nav-glass-bg",
|
|
6204
|
+
"ink": "text"
|
|
6205
|
+
},
|
|
6206
|
+
{
|
|
6207
|
+
"ground": "dialog-bg",
|
|
6208
|
+
"ink": "text"
|
|
6209
|
+
},
|
|
6210
|
+
{
|
|
6211
|
+
"ground": "popover-bg",
|
|
6212
|
+
"ink": "text"
|
|
6213
|
+
},
|
|
6214
|
+
{
|
|
6215
|
+
"ground": "surface-glass-strong",
|
|
6216
|
+
"ink": "text"
|
|
6217
|
+
}
|
|
6169
6218
|
]
|
|
6170
6219
|
};
|
|
6171
6220
|
const SPEC_LEGACY_ALIASES = {
|
|
@@ -7493,6 +7542,41 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
7493
7542
|
"group": "components",
|
|
7494
7543
|
"value": "16px var(--iox-space-inline)"
|
|
7495
7544
|
},
|
|
7545
|
+
{
|
|
7546
|
+
"name": "nav-glass-bg",
|
|
7547
|
+
"tier": "component",
|
|
7548
|
+
"type": "color",
|
|
7549
|
+
"group": "components",
|
|
7550
|
+
"value": "color-mix(in srgb, var(--iox-bg) 90%, transparent)"
|
|
7551
|
+
},
|
|
7552
|
+
{
|
|
7553
|
+
"name": "nav-glass-backdrop",
|
|
7554
|
+
"tier": "component",
|
|
7555
|
+
"type": "effect",
|
|
7556
|
+
"group": "components",
|
|
7557
|
+
"value": "blur(12px) saturate(140%)"
|
|
7558
|
+
},
|
|
7559
|
+
{
|
|
7560
|
+
"name": "nav-glass-border",
|
|
7561
|
+
"tier": "component",
|
|
7562
|
+
"type": "color",
|
|
7563
|
+
"group": "components",
|
|
7564
|
+
"value": "var(--iox-line)"
|
|
7565
|
+
},
|
|
7566
|
+
{
|
|
7567
|
+
"name": "nav-glass-shadow",
|
|
7568
|
+
"tier": "component",
|
|
7569
|
+
"type": "shadow",
|
|
7570
|
+
"group": "components",
|
|
7571
|
+
"value": "none"
|
|
7572
|
+
},
|
|
7573
|
+
{
|
|
7574
|
+
"name": "nav-over-veil",
|
|
7575
|
+
"tier": "component",
|
|
7576
|
+
"type": "paint",
|
|
7577
|
+
"group": "components",
|
|
7578
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
7579
|
+
},
|
|
7496
7580
|
{
|
|
7497
7581
|
"name": "field-bg",
|
|
7498
7582
|
"tier": "component",
|
|
@@ -9952,6 +10036,44 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
9952
10036
|
"group": "components",
|
|
9953
10037
|
"value": "16px var(--iox-space-inline)"
|
|
9954
10038
|
},
|
|
10039
|
+
{
|
|
10040
|
+
"name": "nav-glass-bg",
|
|
10041
|
+
"tier": "component",
|
|
10042
|
+
"type": "color",
|
|
10043
|
+
"group": "components",
|
|
10044
|
+
"value": "color-mix(in srgb, var(--iox-bg) 90%, transparent)"
|
|
10045
|
+
},
|
|
10046
|
+
{
|
|
10047
|
+
"name": "nav-glass-backdrop",
|
|
10048
|
+
"tier": "component",
|
|
10049
|
+
"type": "effect",
|
|
10050
|
+
"group": "components",
|
|
10051
|
+
"value": "blur(20px) saturate(135%)",
|
|
10052
|
+
"overridden": true
|
|
10053
|
+
},
|
|
10054
|
+
{
|
|
10055
|
+
"name": "nav-glass-border",
|
|
10056
|
+
"tier": "component",
|
|
10057
|
+
"type": "color",
|
|
10058
|
+
"group": "components",
|
|
10059
|
+
"value": "color-mix(in srgb, var(--iox-text) 10%, transparent)",
|
|
10060
|
+
"overridden": true
|
|
10061
|
+
},
|
|
10062
|
+
{
|
|
10063
|
+
"name": "nav-glass-shadow",
|
|
10064
|
+
"tier": "component",
|
|
10065
|
+
"type": "shadow",
|
|
10066
|
+
"group": "components",
|
|
10067
|
+
"value": "0 10px 30px color-mix(in srgb, var(--iox-text) 7%, transparent)",
|
|
10068
|
+
"overridden": true
|
|
10069
|
+
},
|
|
10070
|
+
{
|
|
10071
|
+
"name": "nav-over-veil",
|
|
10072
|
+
"tier": "component",
|
|
10073
|
+
"type": "paint",
|
|
10074
|
+
"group": "components",
|
|
10075
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
10076
|
+
},
|
|
9955
10077
|
{
|
|
9956
10078
|
"name": "field-bg",
|
|
9957
10079
|
"tier": "component",
|
|
@@ -12423,6 +12545,42 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
12423
12545
|
"group": "components",
|
|
12424
12546
|
"value": "16px var(--iox-space-inline)"
|
|
12425
12547
|
},
|
|
12548
|
+
{
|
|
12549
|
+
"name": "nav-glass-bg",
|
|
12550
|
+
"tier": "component",
|
|
12551
|
+
"type": "color",
|
|
12552
|
+
"group": "components",
|
|
12553
|
+
"value": "color-mix(in srgb, var(--iox-bg) 72%, transparent)",
|
|
12554
|
+
"overridden": true
|
|
12555
|
+
},
|
|
12556
|
+
{
|
|
12557
|
+
"name": "nav-glass-backdrop",
|
|
12558
|
+
"tier": "component",
|
|
12559
|
+
"type": "effect",
|
|
12560
|
+
"group": "components",
|
|
12561
|
+
"value": "blur(12px) saturate(140%)"
|
|
12562
|
+
},
|
|
12563
|
+
{
|
|
12564
|
+
"name": "nav-glass-border",
|
|
12565
|
+
"tier": "component",
|
|
12566
|
+
"type": "color",
|
|
12567
|
+
"group": "components",
|
|
12568
|
+
"value": "var(--iox-line)"
|
|
12569
|
+
},
|
|
12570
|
+
{
|
|
12571
|
+
"name": "nav-glass-shadow",
|
|
12572
|
+
"tier": "component",
|
|
12573
|
+
"type": "shadow",
|
|
12574
|
+
"group": "components",
|
|
12575
|
+
"value": "none"
|
|
12576
|
+
},
|
|
12577
|
+
{
|
|
12578
|
+
"name": "nav-over-veil",
|
|
12579
|
+
"tier": "component",
|
|
12580
|
+
"type": "paint",
|
|
12581
|
+
"group": "components",
|
|
12582
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
12583
|
+
},
|
|
12426
12584
|
{
|
|
12427
12585
|
"name": "field-bg",
|
|
12428
12586
|
"tier": "component",
|
|
@@ -14859,7 +15017,7 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
14859
15017
|
"tier": "component",
|
|
14860
15018
|
"type": "color",
|
|
14861
15019
|
"group": "components",
|
|
14862
|
-
"value": "var(--iox-surface-glass)",
|
|
15020
|
+
"value": "var(--iox-surface-glass-strong)",
|
|
14863
15021
|
"overridden": true
|
|
14864
15022
|
},
|
|
14865
15023
|
{
|
|
@@ -14910,6 +15068,45 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
14910
15068
|
"value": "10px var(--iox-space-inline)",
|
|
14911
15069
|
"overridden": true
|
|
14912
15070
|
},
|
|
15071
|
+
{
|
|
15072
|
+
"name": "nav-glass-bg",
|
|
15073
|
+
"tier": "component",
|
|
15074
|
+
"type": "color",
|
|
15075
|
+
"group": "components",
|
|
15076
|
+
"value": "var(--iox-surface-glass-strong)",
|
|
15077
|
+
"overridden": true
|
|
15078
|
+
},
|
|
15079
|
+
{
|
|
15080
|
+
"name": "nav-glass-backdrop",
|
|
15081
|
+
"tier": "component",
|
|
15082
|
+
"type": "effect",
|
|
15083
|
+
"group": "components",
|
|
15084
|
+
"value": "var(--iox-blur-surface)",
|
|
15085
|
+
"overridden": true
|
|
15086
|
+
},
|
|
15087
|
+
{
|
|
15088
|
+
"name": "nav-glass-border",
|
|
15089
|
+
"tier": "component",
|
|
15090
|
+
"type": "color",
|
|
15091
|
+
"group": "components",
|
|
15092
|
+
"value": "var(--iox-glass-border)",
|
|
15093
|
+
"overridden": true
|
|
15094
|
+
},
|
|
15095
|
+
{
|
|
15096
|
+
"name": "nav-glass-shadow",
|
|
15097
|
+
"tier": "component",
|
|
15098
|
+
"type": "shadow",
|
|
15099
|
+
"group": "components",
|
|
15100
|
+
"value": "var(--iox-shadow-md), var(--iox-glass-edge)",
|
|
15101
|
+
"overridden": true
|
|
15102
|
+
},
|
|
15103
|
+
{
|
|
15104
|
+
"name": "nav-over-veil",
|
|
15105
|
+
"tier": "component",
|
|
15106
|
+
"type": "paint",
|
|
15107
|
+
"group": "components",
|
|
15108
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
15109
|
+
},
|
|
14913
15110
|
{
|
|
14914
15111
|
"name": "field-bg",
|
|
14915
15112
|
"tier": "component",
|
|
@@ -17387,6 +17584,44 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
17387
17584
|
"group": "components",
|
|
17388
17585
|
"value": "16px var(--iox-space-inline)"
|
|
17389
17586
|
},
|
|
17587
|
+
{
|
|
17588
|
+
"name": "nav-glass-bg",
|
|
17589
|
+
"tier": "component",
|
|
17590
|
+
"type": "color",
|
|
17591
|
+
"group": "components",
|
|
17592
|
+
"value": "color-mix(in srgb, var(--iox-bg) 88%, transparent)",
|
|
17593
|
+
"overridden": true
|
|
17594
|
+
},
|
|
17595
|
+
{
|
|
17596
|
+
"name": "nav-glass-backdrop",
|
|
17597
|
+
"tier": "component",
|
|
17598
|
+
"type": "effect",
|
|
17599
|
+
"group": "components",
|
|
17600
|
+
"value": "blur(16px) saturate(150%)",
|
|
17601
|
+
"overridden": true
|
|
17602
|
+
},
|
|
17603
|
+
{
|
|
17604
|
+
"name": "nav-glass-border",
|
|
17605
|
+
"tier": "component",
|
|
17606
|
+
"type": "color",
|
|
17607
|
+
"group": "components",
|
|
17608
|
+
"value": "transparent",
|
|
17609
|
+
"overridden": true
|
|
17610
|
+
},
|
|
17611
|
+
{
|
|
17612
|
+
"name": "nav-glass-shadow",
|
|
17613
|
+
"tier": "component",
|
|
17614
|
+
"type": "shadow",
|
|
17615
|
+
"group": "components",
|
|
17616
|
+
"value": "none"
|
|
17617
|
+
},
|
|
17618
|
+
{
|
|
17619
|
+
"name": "nav-over-veil",
|
|
17620
|
+
"tier": "component",
|
|
17621
|
+
"type": "paint",
|
|
17622
|
+
"group": "components",
|
|
17623
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
17624
|
+
},
|
|
17390
17625
|
{
|
|
17391
17626
|
"name": "field-bg",
|
|
17392
17627
|
"tier": "component",
|
|
@@ -19852,6 +20087,45 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
19852
20087
|
"group": "components",
|
|
19853
20088
|
"value": "16px var(--iox-space-inline)"
|
|
19854
20089
|
},
|
|
20090
|
+
{
|
|
20091
|
+
"name": "nav-glass-bg",
|
|
20092
|
+
"tier": "component",
|
|
20093
|
+
"type": "color",
|
|
20094
|
+
"group": "components",
|
|
20095
|
+
"value": "var(--iox-nav-bg)",
|
|
20096
|
+
"overridden": true
|
|
20097
|
+
},
|
|
20098
|
+
{
|
|
20099
|
+
"name": "nav-glass-backdrop",
|
|
20100
|
+
"tier": "component",
|
|
20101
|
+
"type": "effect",
|
|
20102
|
+
"group": "components",
|
|
20103
|
+
"value": "none",
|
|
20104
|
+
"overridden": true
|
|
20105
|
+
},
|
|
20106
|
+
{
|
|
20107
|
+
"name": "nav-glass-border",
|
|
20108
|
+
"tier": "component",
|
|
20109
|
+
"type": "color",
|
|
20110
|
+
"group": "components",
|
|
20111
|
+
"value": "var(--iox-nav-border)",
|
|
20112
|
+
"overridden": true
|
|
20113
|
+
},
|
|
20114
|
+
{
|
|
20115
|
+
"name": "nav-glass-shadow",
|
|
20116
|
+
"tier": "component",
|
|
20117
|
+
"type": "shadow",
|
|
20118
|
+
"group": "components",
|
|
20119
|
+
"value": "var(--iox-nav-shadow)",
|
|
20120
|
+
"overridden": true
|
|
20121
|
+
},
|
|
20122
|
+
{
|
|
20123
|
+
"name": "nav-over-veil",
|
|
20124
|
+
"tier": "component",
|
|
20125
|
+
"type": "paint",
|
|
20126
|
+
"group": "components",
|
|
20127
|
+
"value": "linear-gradient(to bottom, color-mix(in srgb, var(--iox-bg) 32%, transparent), transparent)"
|
|
20128
|
+
},
|
|
19855
20129
|
{
|
|
19856
20130
|
"name": "field-bg",
|
|
19857
20131
|
"tier": "component",
|
|
@@ -21380,52 +21654,112 @@ function decomposeCssFunctions(controls, value) {
|
|
|
21380
21654
|
}
|
|
21381
21655
|
|
|
21382
21656
|
/**
|
|
21383
|
-
*
|
|
21384
|
-
*
|
|
21385
|
-
*
|
|
21386
|
-
* reads `elementStyle`: it records which look a node wears, for the panel row, Reset, adopt and AI.
|
|
21387
|
-
*
|
|
21388
|
-
* Works on two node shapes through one minimal interface, so the builder (a ComponentNode whose
|
|
21389
|
-
* values live in `styleTraits[].traits[].default`) and the server-side composer (a plain serialized
|
|
21390
|
-
* layout node with `styleProps`) share every function here.
|
|
21657
|
+
* Which way a language reads — ONE answer for the live document (`<html dir>`, vectoriox/iox-client-engine#17), the
|
|
21658
|
+
* builder and the composer (generation-core `isRtlLocale`). A locale is read by its language subtag (`he-IL` → `he`),
|
|
21659
|
+
* case-insensitively; anything else reads left to right. Framework-free, pure.
|
|
21391
21660
|
*/
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21398
|
-
|
|
21399
|
-
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21661
|
+
/** The direction a page's document is written in. */
|
|
21662
|
+
var LocaleDirection;
|
|
21663
|
+
(function (LocaleDirection) {
|
|
21664
|
+
LocaleDirection["Ltr"] = "ltr";
|
|
21665
|
+
LocaleDirection["Rtl"] = "rtl";
|
|
21666
|
+
})(LocaleDirection || (LocaleDirection = {}));
|
|
21667
|
+
/** The languages written right to left (their BCP 47 language subtags). */
|
|
21668
|
+
const RTL_LANGUAGES = new Set(['ar', 'ckb', 'dv', 'fa', 'he', 'iw', 'ps', 'sd', 'ug', 'ur', 'yi']);
|
|
21669
|
+
/**
|
|
21670
|
+
* The languages whose script has NO letter case (their BCP 47 language subtags): every right-to-left language (Hebrew,
|
|
21671
|
+
* Arabic and the Arabic-script languages, Thaana) plus the common caseless scripts of Asia and Ethiopia. In them
|
|
21672
|
+
* `text-transform: uppercase` touches only the Latin words a label borrows ("המשך עם GOOGLE", vectoriox/iox-ui#124) and
|
|
21673
|
+
* letter-spacing opens up letters their typography never spaces — so the look's case and tracking tokens stand down
|
|
21674
|
+
* (design-core `CASELESS_SCRIPT_OVERRIDES`, emitted by `compileTokenCss`).
|
|
21675
|
+
*/
|
|
21676
|
+
const CASELESS_LANGUAGES = new Set([
|
|
21677
|
+
...RTL_LANGUAGES,
|
|
21678
|
+
'am', 'bn', 'gu', 'hi', 'ja', 'km', 'kn', 'ko', 'lo', 'ml', 'mr', 'my', 'ne', 'pa', 'si', 'ta', 'te', 'th', 'zh',
|
|
21679
|
+
]);
|
|
21680
|
+
/** True when `locale`'s language is written in a script without letter case (`he-IL`, `ar`, `ja`…). */
|
|
21681
|
+
function isCaselessLocale(locale) {
|
|
21682
|
+
return CASELESS_LANGUAGES.has(languageOf(locale));
|
|
21683
|
+
}
|
|
21684
|
+
/** The language subtag of a locale (`he-IL` → `he`, `pt_BR` → `pt`), lower-cased; '' when there is none. */
|
|
21685
|
+
function languageOf(locale) {
|
|
21686
|
+
return String(locale ?? '').trim().split(/[-_]/)[0].toLowerCase();
|
|
21687
|
+
}
|
|
21688
|
+
/** The direction `locale` reads in — `rtl` for a right-to-left language, else `ltr` (an unknown or absent locale too). */
|
|
21689
|
+
function localeDirection(locale) {
|
|
21690
|
+
return RTL_LANGUAGES.has(languageOf(locale)) ? LocaleDirection.Rtl : LocaleDirection.Ltr;
|
|
21691
|
+
}
|
|
21692
|
+
/** The Text Direction trait and where it used to live (style-compiler `TEXT_DIRECTION_KEY` / `LEGACY_DIRECTION_KEY`). */
|
|
21693
|
+
const DIRECTION_KEYS = ['textDirection', 'direction'];
|
|
21694
|
+
/**
|
|
21695
|
+
* True when the node's OWN Text Direction is right-to-left (a saved node's styleProps, a builder node's style traits);
|
|
21696
|
+
* a node with no direction of its own reads left-to-right. THE answer for anything the shared CSS mirrors (AW6's seams,
|
|
21697
|
+
* AW11's leaning lists): a composed Hebrew page carries its direction as each node's CSS `direction`, which `:dir(rtl)`
|
|
21698
|
+
* cannot see, and the builder canvas sits inside the ADMIN's `<html dir>`. So design-core writes a class from the
|
|
21699
|
+
* node's own direction instead.
|
|
21700
|
+
*/
|
|
21701
|
+
function nodeIsRtl(node) {
|
|
21702
|
+
if (!node)
|
|
21703
|
+
return false;
|
|
21704
|
+
for (const key of DIRECTION_KEYS) {
|
|
21705
|
+
if (node.styleProps && key in node.styleProps)
|
|
21706
|
+
return node.styleProps[key] === LocaleDirection.Rtl;
|
|
21707
|
+
}
|
|
21708
|
+
for (const group of node.styleTraits ?? []) {
|
|
21709
|
+
const t = group?.traits?.find(x => x?.name === DIRECTION_KEYS[0]);
|
|
21710
|
+
if (t)
|
|
21711
|
+
return t.default === LocaleDirection.Rtl;
|
|
21712
|
+
}
|
|
21713
|
+
return false;
|
|
21714
|
+
}
|
|
21715
|
+
|
|
21716
|
+
/**
|
|
21717
|
+
* Element styles — the author's "classes" (design-system plan §3b). A named look is an EXACT trait
|
|
21718
|
+
* map written into a node; every value is a `var(--iox-…)` reference or a flavor-independent
|
|
21719
|
+
* keyword, so a re-theme rewrites token rows and every node wearing the style follows. No renderer
|
|
21720
|
+
* reads `elementStyle`: it records which look a node wears, for the panel row, Reset, adopt and AI.
|
|
21721
|
+
*
|
|
21722
|
+
* Works on two node shapes through one minimal interface, so the builder (a ComponentNode whose
|
|
21723
|
+
* values live in `styleTraits[].traits[].default`) and the server-side composer (a plain serialized
|
|
21724
|
+
* layout node with `styleProps`) share every function here.
|
|
21725
|
+
*/
|
|
21726
|
+
var ElementStyleState;
|
|
21727
|
+
(function (ElementStyleState) {
|
|
21728
|
+
ElementStyleState["Hover"] = "hover";
|
|
21729
|
+
ElementStyleState["Active"] = "active";
|
|
21730
|
+
ElementStyleState["Focus"] = "focus";
|
|
21731
|
+
/** The page you're on (CC1 N2): compiles to `[aria-current="page"]`, never a pseudo-class. */
|
|
21732
|
+
ElementStyleState["Current"] = "current";
|
|
21733
|
+
/** A composite part that is ON — the active tab (CC4a "Active"): compiles to `[data-iox-on]`, the attribute every
|
|
21734
|
+
* composite runtime writes. */
|
|
21735
|
+
ElementStyleState["On"] = "on";
|
|
21736
|
+
/** G4 — compile through the style compiler's COMPONENT_STATE_SELECTOR: `:disabled` / aria-disabled, aria-busy,
|
|
21737
|
+
* pressed / checked / selected, the page scrolled. */
|
|
21738
|
+
ElementStyleState["Disabled"] = "disabled";
|
|
21739
|
+
ElementStyleState["Busy"] = "busy";
|
|
21740
|
+
ElementStyleState["Selected"] = "selected";
|
|
21741
|
+
ElementStyleState["Scrolled"] = "scrolled";
|
|
21742
|
+
})(ElementStyleState || (ElementStyleState = {}));
|
|
21743
|
+
const ELEMENT_STYLE_STATES = [
|
|
21744
|
+
ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current, ElementStyleState.On,
|
|
21745
|
+
ElementStyleState.Disabled, ElementStyleState.Busy, ElementStyleState.Selected, ElementStyleState.Scrolled,
|
|
21746
|
+
];
|
|
21747
|
+
const ELEMENT_STYLES = SPEC_ELEMENT_STYLES;
|
|
21748
|
+
/** Legacy `Button.variant` → the element style it maps to (adopt, DS7). */
|
|
21749
|
+
const BUTTON_VARIANT_TO_STYLE = SPEC_BUTTON_VARIANT_TO_STYLE;
|
|
21750
|
+
/** Palette entries that are a Container wearing an element style (Card · Panel · Navigation bar). */
|
|
21751
|
+
const PALETTE_PRESETS = SPEC_PALETTE_PRESETS;
|
|
21752
|
+
const BY_ID = new Map(ELEMENT_STYLES.map(s => [s.id, s]));
|
|
21753
|
+
function elementStyleById(id) {
|
|
21754
|
+
return id ? BY_ID.get(id) : undefined;
|
|
21755
|
+
}
|
|
21756
|
+
/** The styles a node of `type` may wear — the Style panel's select. */
|
|
21757
|
+
function elementStylesFor(type) {
|
|
21758
|
+
return ELEMENT_STYLES.filter(s => s.appliesTo.includes(type));
|
|
21759
|
+
}
|
|
21760
|
+
var OwnedTraitLink;
|
|
21761
|
+
(function (OwnedTraitLink) {
|
|
21762
|
+
/** The node still holds the style's value. */
|
|
21429
21763
|
OwnedTraitLink["Linked"] = "linked";
|
|
21430
21764
|
/** The author replaced it on this node. */
|
|
21431
21765
|
OwnedTraitLink["Changed"] = "changed";
|
|
@@ -21655,51 +21989,6 @@ function applyHeadingLevelRule(target, oldLevel, newLevel, baseline = {}) {
|
|
|
21655
21989
|
return switchElementStyle(target, from, to, baseline);
|
|
21656
21990
|
}
|
|
21657
21991
|
|
|
21658
|
-
/**
|
|
21659
|
-
* Which way a language reads — ONE answer for the live document (`<html dir>`, vectoriox/iox-client-engine#17), the
|
|
21660
|
-
* builder and the composer (generation-core `isRtlLocale`). A locale is read by its language subtag (`he-IL` → `he`),
|
|
21661
|
-
* case-insensitively; anything else reads left to right. Framework-free, pure.
|
|
21662
|
-
*/
|
|
21663
|
-
/** The direction a page's document is written in. */
|
|
21664
|
-
var LocaleDirection;
|
|
21665
|
-
(function (LocaleDirection) {
|
|
21666
|
-
LocaleDirection["Ltr"] = "ltr";
|
|
21667
|
-
LocaleDirection["Rtl"] = "rtl";
|
|
21668
|
-
})(LocaleDirection || (LocaleDirection = {}));
|
|
21669
|
-
/** The languages written right to left (their BCP 47 language subtags). */
|
|
21670
|
-
const RTL_LANGUAGES = new Set(['ar', 'ckb', 'dv', 'fa', 'he', 'iw', 'ps', 'sd', 'ug', 'ur', 'yi']);
|
|
21671
|
-
/** The language subtag of a locale (`he-IL` → `he`, `pt_BR` → `pt`), lower-cased; '' when there is none. */
|
|
21672
|
-
function languageOf(locale) {
|
|
21673
|
-
return String(locale ?? '').trim().split(/[-_]/)[0].toLowerCase();
|
|
21674
|
-
}
|
|
21675
|
-
/** The direction `locale` reads in — `rtl` for a right-to-left language, else `ltr` (an unknown or absent locale too). */
|
|
21676
|
-
function localeDirection(locale) {
|
|
21677
|
-
return RTL_LANGUAGES.has(languageOf(locale)) ? LocaleDirection.Rtl : LocaleDirection.Ltr;
|
|
21678
|
-
}
|
|
21679
|
-
/** The Text Direction trait and where it used to live (style-compiler `TEXT_DIRECTION_KEY` / `LEGACY_DIRECTION_KEY`). */
|
|
21680
|
-
const DIRECTION_KEYS = ['textDirection', 'direction'];
|
|
21681
|
-
/**
|
|
21682
|
-
* True when the node's OWN Text Direction is right-to-left (a saved node's styleProps, a builder node's style traits);
|
|
21683
|
-
* a node with no direction of its own reads left-to-right. THE answer for anything the shared CSS mirrors (AW6's seams,
|
|
21684
|
-
* AW11's leaning lists): a composed Hebrew page carries its direction as each node's CSS `direction`, which `:dir(rtl)`
|
|
21685
|
-
* cannot see, and the builder canvas sits inside the ADMIN's `<html dir>`. So design-core writes a class from the
|
|
21686
|
-
* node's own direction instead.
|
|
21687
|
-
*/
|
|
21688
|
-
function nodeIsRtl(node) {
|
|
21689
|
-
if (!node)
|
|
21690
|
-
return false;
|
|
21691
|
-
for (const key of DIRECTION_KEYS) {
|
|
21692
|
-
if (node.styleProps && key in node.styleProps)
|
|
21693
|
-
return node.styleProps[key] === LocaleDirection.Rtl;
|
|
21694
|
-
}
|
|
21695
|
-
for (const group of node.styleTraits ?? []) {
|
|
21696
|
-
const t = group?.traits?.find(x => x?.name === DIRECTION_KEYS[0]);
|
|
21697
|
-
if (t)
|
|
21698
|
-
return t.default === LocaleDirection.Rtl;
|
|
21699
|
-
}
|
|
21700
|
-
return false;
|
|
21701
|
-
}
|
|
21702
|
-
|
|
21703
21992
|
/**
|
|
21704
21993
|
* A COMPOSED LIST'S MIX ON ITS FRAME (award-ingredients-plan §7.1f AW11, board award-lists): the words a list section was
|
|
21705
21994
|
* composed as ride on its frame as ONE prop, `listMix` (`item:packshot arrange:grid hover:swap …`, the wire's words), and
|
|
@@ -21961,15 +22250,363 @@ function schemeUnderBar(bands, barBottom) {
|
|
|
21961
22250
|
const hit = bands.find(b => b.top <= line && line < b.bottom);
|
|
21962
22251
|
return hit && colorSchemeClass(hit.scheme) ? hit.scheme : null;
|
|
21963
22252
|
}
|
|
21964
|
-
const SCHEME_CLASS = /^iox-scheme-([a-z][a-z0-9-]*)$/;
|
|
21965
|
-
/** The scheme an element wears, read back from its `iox-scheme-<id>` class — null for none. */
|
|
21966
|
-
function schemeOfClasses(classes) {
|
|
21967
|
-
for (const c of classes ?? []) {
|
|
21968
|
-
const m = SCHEME_CLASS.exec(c);
|
|
21969
|
-
if (m && colorSchemeClass(m[1]))
|
|
21970
|
-
return m[1];
|
|
21971
|
-
}
|
|
21972
|
-
return null;
|
|
22253
|
+
const SCHEME_CLASS = /^iox-scheme-([a-z][a-z0-9-]*)$/;
|
|
22254
|
+
/** The scheme an element wears, read back from its `iox-scheme-<id>` class — null for none. */
|
|
22255
|
+
function schemeOfClasses(classes) {
|
|
22256
|
+
for (const c of classes ?? []) {
|
|
22257
|
+
const m = SCHEME_CLASS.exec(c);
|
|
22258
|
+
if (m && colorSchemeClass(m[1]))
|
|
22259
|
+
return m[1];
|
|
22260
|
+
}
|
|
22261
|
+
return null;
|
|
22262
|
+
}
|
|
22263
|
+
|
|
22264
|
+
/**
|
|
22265
|
+
* How a site's header behaves as the page scrolls (premium components T2, M4). Two traits on the header's ROOT (the
|
|
22266
|
+
* Navigation bar, generation-core `NavRole.Root`) — edited in its "Header" section, stamped by the composer from a
|
|
22267
|
+
* `nav.*` pattern's `header` — and ONE answer every renderer applies: the attributes below, which the shared CSS
|
|
22268
|
+
* (`iox-design.css`) and the header runtime (`HeaderRuntime`, main entry) read. A header with neither trait renders
|
|
22269
|
+
* exactly as before (it scrolls away with the page, its divider line as its look draws it).
|
|
22270
|
+
*
|
|
22271
|
+
* Framework-free: the composer (generation-core) and both renderers read it.
|
|
22272
|
+
*/
|
|
22273
|
+
var HeaderBehaviour;
|
|
22274
|
+
(function (HeaderBehaviour) {
|
|
22275
|
+
/** It scrolls away with the page (the default; what every header saved before M4 does). */
|
|
22276
|
+
HeaderBehaviour["Scrolls"] = "scrolls";
|
|
22277
|
+
/** It stays at the top while the page scrolls under it. */
|
|
22278
|
+
HeaderBehaviour["Stays"] = "stays";
|
|
22279
|
+
/** It steps aside while the page scrolls down and comes back the moment it scrolls up. */
|
|
22280
|
+
HeaderBehaviour["Hides"] = "hides";
|
|
22281
|
+
})(HeaderBehaviour || (HeaderBehaviour = {}));
|
|
22282
|
+
/** What separates the header from the page once the page has moved under it (Emil 99: an edge, not a divider). */
|
|
22283
|
+
var HeaderEdge;
|
|
22284
|
+
(function (HeaderEdge) {
|
|
22285
|
+
/** A soft fade of the header's own ground over the content under it. */
|
|
22286
|
+
HeaderEdge["Fade"] = "fade";
|
|
22287
|
+
/** A hairline in the header's border colour. */
|
|
22288
|
+
HeaderEdge["Line"] = "line";
|
|
22289
|
+
HeaderEdge["None"] = "none";
|
|
22290
|
+
})(HeaderEdge || (HeaderEdge = {}));
|
|
22291
|
+
/** The traits, stored in the root's props (no default: a plain Container saves neither). */
|
|
22292
|
+
var HeaderTrait;
|
|
22293
|
+
(function (HeaderTrait) {
|
|
22294
|
+
HeaderTrait["Behaviour"] = "headerBehaviour";
|
|
22295
|
+
HeaderTrait["Edge"] = "headerEdge";
|
|
22296
|
+
/** HI1b (HS-5): the mix the header was composed as — its `<ingredient>:<word>` words, space-separated (generation-core
|
|
22297
|
+
* `stampHeaderMix`). Read by Bindings ▸ Header and the Header studio; no renderer reads it. */
|
|
22298
|
+
HeaderTrait["Mix"] = "headerMix";
|
|
22299
|
+
/** AW6 (AW6-D10): `follows` — its colours follow the section under it as the page scrolls. Absent / `opening`: it
|
|
22300
|
+
* wears the page's opening (#71), as before. Written by the Header studio ▸ Ground and the composer (`ink:follows`). */
|
|
22301
|
+
HeaderTrait["Ink"] = "headerInk";
|
|
22302
|
+
/** HI3 slice 1 (HI3-D1): what the header stands on — `glass` | `over` | `over-glass`. Absent / `solid`: its own ground,
|
|
22303
|
+
* as before. Written by the Header studio ▸ Around the bar and the composer (`ground:<word>`). */
|
|
22304
|
+
HeaderTrait["Ground"] = "headerGround";
|
|
22305
|
+
})(HeaderTrait || (HeaderTrait = {}));
|
|
22306
|
+
/** Whose colours the header wears (contract HEADER `ink`): the page's opening, or every section as it passes under it. */
|
|
22307
|
+
var HeaderInk;
|
|
22308
|
+
(function (HeaderInk) {
|
|
22309
|
+
HeaderInk["Opening"] = "opening";
|
|
22310
|
+
HeaderInk["Follows"] = "follows";
|
|
22311
|
+
})(HeaderInk || (HeaderInk = {}));
|
|
22312
|
+
var HeaderAttribute;
|
|
22313
|
+
(function (HeaderAttribute) {
|
|
22314
|
+
/** `stays` | `hides` on a header that stays at the top. Absent: it scrolls away. */
|
|
22315
|
+
HeaderAttribute["Behaviour"] = "data-iox-header";
|
|
22316
|
+
/** `fade` | `line` | `none`: the edge it shows once the page has scrolled. Absent: its look's own divider stays. */
|
|
22317
|
+
HeaderAttribute["Edge"] = "data-iox-header-edge";
|
|
22318
|
+
/** Written by the header runtime while a `hides` header has stepped aside. */
|
|
22319
|
+
HeaderAttribute["Hidden"] = "data-iox-header-hidden";
|
|
22320
|
+
/** `follows` on a header whose colours follow the section under it (the header ink runtime writes the page's
|
|
22321
|
+
* `data-iox-opening` as each section passes; the shared CSS cross-fades). Absent: it wears the opening. */
|
|
22322
|
+
HeaderAttribute["Ink"] = "data-iox-header-ink";
|
|
22323
|
+
/** `glass` | `over` | `over-glass` on a header that does not stand on its own solid ground (HI3 slice 1): the shared
|
|
22324
|
+
* CSS draws the ground on ONE `::before` faded by opacity, gives the bar's height back over a pictured opening and
|
|
22325
|
+
* lays the veil under its words at rest. Absent: the bar's own ground, as before. */
|
|
22326
|
+
HeaderAttribute["Ground"] = "data-iox-header-ground";
|
|
22327
|
+
})(HeaderAttribute || (HeaderAttribute = {}));
|
|
22328
|
+
/** What a composed header gets (the `nav.*` patterns' `header`, the palette's Navigation bar). */
|
|
22329
|
+
const COMPOSED_HEADER = {
|
|
22330
|
+
behaviour: HeaderBehaviour.Hides,
|
|
22331
|
+
edge: HeaderEdge.Fade,
|
|
22332
|
+
};
|
|
22333
|
+
const BEHAVIOURS = new Set(Object.values(HeaderBehaviour));
|
|
22334
|
+
const EDGES = new Set(Object.values(HeaderEdge));
|
|
22335
|
+
/** A stored behaviour, or Scrolls for anything else. */
|
|
22336
|
+
function headerBehaviourOf(value) {
|
|
22337
|
+
return typeof value === 'string' && BEHAVIOURS.has(value) ? value : HeaderBehaviour.Scrolls;
|
|
22338
|
+
}
|
|
22339
|
+
/** A stored edge, or null (none chosen: the look's divider stays as it is). */
|
|
22340
|
+
function headerEdgeOf(value) {
|
|
22341
|
+
return typeof value === 'string' && EDGES.has(value) ? value : null;
|
|
22342
|
+
}
|
|
22343
|
+
/** True when the header keeps its place at the top of the screen (it stays, or it hides and comes back). */
|
|
22344
|
+
function headerStaysAtTop(behaviour) {
|
|
22345
|
+
return headerBehaviourOf(behaviour) !== HeaderBehaviour.Scrolls;
|
|
22346
|
+
}
|
|
22347
|
+
/** A stored ink, or Opening for anything else. */
|
|
22348
|
+
function headerInkOf(value) {
|
|
22349
|
+
return value === HeaderInk.Follows ? HeaderInk.Follows : HeaderInk.Opening;
|
|
22350
|
+
}
|
|
22351
|
+
/** The attributes a header renders, from its trait values — `{}` for a header that keeps today's behaviour. A header on
|
|
22352
|
+
* glass draws no scroll edge (HI3-D9: its set carries its own hairline and shadow), whatever edge it stores. */
|
|
22353
|
+
function headerAttributes(behaviour, edge, ink, ground) {
|
|
22354
|
+
const out = {};
|
|
22355
|
+
if (headerInkOf(ink) === HeaderInk.Follows)
|
|
22356
|
+
out[HeaderAttribute.Ink] = HeaderInk.Follows;
|
|
22357
|
+
const b = headerBehaviourOf(behaviour);
|
|
22358
|
+
if (b !== HeaderBehaviour.Scrolls)
|
|
22359
|
+
out[HeaderAttribute.Behaviour] = b;
|
|
22360
|
+
const g = headerGroundOf(ground);
|
|
22361
|
+
if (g !== HeaderGround.Solid)
|
|
22362
|
+
out[HeaderAttribute.Ground] = g;
|
|
22363
|
+
const e = headerEdgeOf(edge);
|
|
22364
|
+
if (e && !headerGroundIsGlass(g))
|
|
22365
|
+
out[HeaderAttribute.Edge] = e;
|
|
22366
|
+
return out;
|
|
22367
|
+
}
|
|
22368
|
+
// ── What the header stands on (HI3 slice 1: over · over-glass · glass) ───────────────────────────────────────────────
|
|
22369
|
+
/**
|
|
22370
|
+
* What a header stands on (contract HEADER `ground`, HI3-D1). `blend` waits for slice 2+ and is never a trait value
|
|
22371
|
+
* (a stored `blend` reads as solid). ONE answer every renderer applies: `headerAttributes` writes the word, the shared
|
|
22372
|
+
* CSS (`iox-design.css`) draws it, and `headerFirm` / the selectors below say when the ground shows.
|
|
22373
|
+
*/
|
|
22374
|
+
var HeaderGround;
|
|
22375
|
+
(function (HeaderGround) {
|
|
22376
|
+
/** Its own ground (the look's bar), as every header before HI3. */
|
|
22377
|
+
HeaderGround["Solid"] = "solid";
|
|
22378
|
+
/** The look's glass from the first frame. */
|
|
22379
|
+
HeaderGround["Glass"] = "glass";
|
|
22380
|
+
/** Over the opening, clear at first; the look's own bar once the page moves. */
|
|
22381
|
+
HeaderGround["Over"] = "over";
|
|
22382
|
+
/** Over the opening, clear at first; the look's glass once the page moves. */
|
|
22383
|
+
HeaderGround["OverGlass"] = "over-glass";
|
|
22384
|
+
})(HeaderGround || (HeaderGround = {}));
|
|
22385
|
+
const GROUNDS = new Set(Object.values(HeaderGround));
|
|
22386
|
+
/** A stored ground, or Solid for anything else. */
|
|
22387
|
+
function headerGroundOf(value) {
|
|
22388
|
+
return typeof value === 'string' && GROUNDS.has(value) ? value : HeaderGround.Solid;
|
|
22389
|
+
}
|
|
22390
|
+
/** The grounds that stand over the opening at rest (clear until the page moves). */
|
|
22391
|
+
const OVER_GROUNDS = [HeaderGround.Over, HeaderGround.OverGlass];
|
|
22392
|
+
/** The grounds that turn into the look's glass (`nav-glass-*`), and draw no scroll edge (HI3-D9). */
|
|
22393
|
+
const GLASS_GROUNDS = [HeaderGround.Glass, HeaderGround.OverGlass];
|
|
22394
|
+
/** True for a ground that stands over the opening at rest. */
|
|
22395
|
+
function headerGroundIsOver(ground) {
|
|
22396
|
+
return OVER_GROUNDS.includes(headerGroundOf(ground));
|
|
22397
|
+
}
|
|
22398
|
+
/** True for a ground that turns into the look's glass. */
|
|
22399
|
+
function headerGroundIsGlass(ground) {
|
|
22400
|
+
return GLASS_GROUNDS.includes(headerGroundOf(ground));
|
|
22401
|
+
}
|
|
22402
|
+
/**
|
|
22403
|
+
* Whether the page OPENS on a picture the header can stand over (HI3-D10), written by each renderer beside
|
|
22404
|
+
* `data-iox-opening` (the engine's body, in the raw SSR; the canvas's globals layer) from `openingMediaOf(layout)`.
|
|
22405
|
+
*/
|
|
22406
|
+
const OPENING_MEDIA_ATTRIBUTE = 'data-iox-opening-media';
|
|
22407
|
+
var OpeningMediaKind;
|
|
22408
|
+
(function (OpeningMediaKind) {
|
|
22409
|
+
/** The first section's picture (a photo, a film, slides, an object, a material) fills the top of the page. */
|
|
22410
|
+
OpeningMediaKind["Picture"] = "picture";
|
|
22411
|
+
/** The page opens on a plain ground (words, an inset card, a form): an over header shows its ground from the top. */
|
|
22412
|
+
OpeningMediaKind["Plain"] = "plain";
|
|
22413
|
+
})(OpeningMediaKind || (OpeningMediaKind = {}));
|
|
22414
|
+
/** The props key a composed opening stores its mix under (generation-core `OPENING_MIX_PROP`; spelled here: design-core
|
|
22415
|
+
* reads no generation-core). Its words are `<ingredient>:<word>`, space-separated. */
|
|
22416
|
+
const OPENING_MIX_PROP = 'openingMix';
|
|
22417
|
+
const OPENING_NO_MEDIA = 'none';
|
|
22418
|
+
/** The frame that leaves the page's own ground at the top: the picture is a card inset from the edges. */
|
|
22419
|
+
const OPENING_INSET_FRAME = 'inset';
|
|
22420
|
+
/** Node types that ARE a picture: a section that is one, or a layer of one laid behind its words. */
|
|
22421
|
+
const PICTURE_TYPES = new Set(['Image', 'Video', 'SliderContainer', 'Gallery']);
|
|
22422
|
+
const LAYER_POSITIONS = new Set(['absolute', 'fixed']);
|
|
22423
|
+
const PICTURE_PAINT = /url\(|image-set\(/i;
|
|
22424
|
+
const wordOf = (mix, ingredient) => mix.split(/\s+/).find(w => w.startsWith(`${ingredient}:`))?.slice(ingredient.length + 1) ?? null;
|
|
22425
|
+
const paintsPicture = (styles) => ['backgroundImage', 'background'].some(k => PICTURE_PAINT.test(String(styles?.[k] ?? '')));
|
|
22426
|
+
/**
|
|
22427
|
+
* What a page opens on, from its own nodes in order (never its globals): a composed opening by its mix (a picture unless
|
|
22428
|
+
* its media is `none` or its frame is `inset`); any other first section when it paints a picture as its background, IS a
|
|
22429
|
+
* picture, or lays one behind its words (a positioned Image / Video / slider child). A page with no nodes is plain. Pure.
|
|
22430
|
+
*/
|
|
22431
|
+
function openingMediaOf(layout) {
|
|
22432
|
+
const first = layout?.find(n => !!n);
|
|
22433
|
+
if (!first)
|
|
22434
|
+
return OpeningMediaKind.Plain;
|
|
22435
|
+
const mix = first.props?.[OPENING_MIX_PROP];
|
|
22436
|
+
if (typeof mix === 'string' && mix.trim()) {
|
|
22437
|
+
const media = wordOf(mix, 'media');
|
|
22438
|
+
const frame = wordOf(mix, 'frame');
|
|
22439
|
+
return media && media !== OPENING_NO_MEDIA && frame !== OPENING_INSET_FRAME ? OpeningMediaKind.Picture : OpeningMediaKind.Plain;
|
|
22440
|
+
}
|
|
22441
|
+
if (paintsPicture(first.styleProps) || (first.type && PICTURE_TYPES.has(first.type)))
|
|
22442
|
+
return OpeningMediaKind.Picture;
|
|
22443
|
+
const layer = (first.children ?? []).some(c => !!c && !!c.type && PICTURE_TYPES.has(c.type) && LAYER_POSITIONS.has(String(c.styleProps?.['position'] ?? '')));
|
|
22444
|
+
return layer ? OpeningMediaKind.Picture : OpeningMediaKind.Plain;
|
|
22445
|
+
}
|
|
22446
|
+
/** The attribute a page's renderer writes beside `data-iox-opening`. */
|
|
22447
|
+
function openingMediaAttributes(layout) {
|
|
22448
|
+
return { [OPENING_MEDIA_ATTRIBUTE]: openingMediaOf(layout) };
|
|
22449
|
+
}
|
|
22450
|
+
/**
|
|
22451
|
+
* Whether the header shows its ground — FIRM (HI3-D4, D10, D11): a solid or glass header always; an over header once the
|
|
22452
|
+
* page has moved, while its menu is open, and from the top on a page that opens without a picture. The ONE answer: the
|
|
22453
|
+
* shared CSS draws it through `HEADER_AT_REST_SELECTOR` (held equal to this by header-behaviour.spec), the canvas's
|
|
22454
|
+
* "At the top · Scrolled" pair asks it. Pure.
|
|
22455
|
+
*/
|
|
22456
|
+
function headerFirm(ground, moment = {}) {
|
|
22457
|
+
if (!headerGroundIsOver(ground))
|
|
22458
|
+
return true;
|
|
22459
|
+
return !(moment.openingMedia === OpeningMediaKind.Picture && !moment.scrolled && !moment.menuOpen);
|
|
22460
|
+
}
|
|
22461
|
+
/** Whether the header gives its height back to the page (HI3-D7): it does not stand on its own solid ground, over a page
|
|
22462
|
+
* that opens on a picture — the picture starts at the top of the page, under the bar. */
|
|
22463
|
+
function headerGivesBack(ground, openingMedia) {
|
|
22464
|
+
return headerGroundOf(ground) !== HeaderGround.Solid && openingMedia === OpeningMediaKind.Picture;
|
|
22465
|
+
}
|
|
22466
|
+
/** The Page scrolled state's attribute (main entry `SCROLLED_ATTRIBUTE`; spelled here — design-core reads no Angular
|
|
22467
|
+
* entry; held equal by the scrolled spec). */
|
|
22468
|
+
const HEADER_SCROLLED_ATTRIBUTE = 'data-iox-scrolled';
|
|
22469
|
+
/** An open menu inside the header (the drawer / full / panel Dialog is the header's own child — T2). */
|
|
22470
|
+
const HEADER_OPEN_MENU_SELECTOR = 'dialog[open]';
|
|
22471
|
+
/** The CSS custom property the header runtime writes its height in (`watchHeaderHeight`), on the scope around it. */
|
|
22472
|
+
const HEADER_HEIGHT_VAR = '--header-h';
|
|
22473
|
+
const groundIs = (grounds) => `:is(${grounds.map(g => `[${HeaderAttribute.Ground}="${g}"]`).join(', ')})`;
|
|
22474
|
+
const onPicture = `:is([${OPENING_MEDIA_ATTRIBUTE}="${OpeningMediaKind.Picture}"] *)`;
|
|
22475
|
+
/**
|
|
22476
|
+
* The header AT REST (not firm), as a compound selector on the header's own element — `headerFirm`'s twin in CSS: an over
|
|
22477
|
+
* ground, inside a page that opens on a picture, not inside a scrolled page, holding no open menu.
|
|
22478
|
+
*/
|
|
22479
|
+
const HEADER_AT_REST_SELECTOR = `${groundIs(OVER_GROUNDS)}${onPicture}:not([${HEADER_SCROLLED_ATTRIBUTE}] *):not(:has(${HEADER_OPEN_MENU_SELECTOR}))`;
|
|
22480
|
+
/** The header that gives its height back (`headerGivesBack`'s twin): any ground word, inside a page that opens on a picture. */
|
|
22481
|
+
const HEADER_GIVES_BACK_SELECTOR = `[${HeaderAttribute.Ground}]${onPicture}`;
|
|
22482
|
+
/**
|
|
22483
|
+
* Whose colours a header wears at rest and once firm (HI3-D8), as the part of the opening follower's selector the header's
|
|
22484
|
+
* element must match: a header with no ground word, or one that follows every section, wears the opening as before; a
|
|
22485
|
+
* header standing on a ground wears the opening only AT REST — once firm, the page's own.
|
|
22486
|
+
*/
|
|
22487
|
+
const OPENING_FOLLOWER_GROUND_CLAUSES = [
|
|
22488
|
+
`:where(:not([${HeaderAttribute.Ground}]:not([${HeaderAttribute.Ink}="${HeaderInk.Follows}"])))`,
|
|
22489
|
+
`:where(${HEADER_AT_REST_SELECTOR})`,
|
|
22490
|
+
];
|
|
22491
|
+
// ── The header's name on a phone (vectoriox/iox-ui#98) ─────────────────────────────────────────────────────────────
|
|
22492
|
+
/** The brand's role (generation-core `NavRole.Brand`, spelled here: design-core reads no generation-core). */
|
|
22493
|
+
const BRAND_ROLE = 'nav.brand';
|
|
22494
|
+
/** Written on the brand when its name is long: the shared CSS steps its type down the look's scale on a phone. */
|
|
22495
|
+
const BRAND_NAME_ATTRIBUTE = 'data-iox-name';
|
|
22496
|
+
/** How long a header's name is, for a phone bar that must hold it on one or two lines. */
|
|
22497
|
+
var BrandNameLength;
|
|
22498
|
+
(function (BrandNameLength) {
|
|
22499
|
+
/** Wears `size-lead` on a phone. */
|
|
22500
|
+
BrandNameLength["Long"] = "long";
|
|
22501
|
+
/** Wears `size-body` on a phone. */
|
|
22502
|
+
BrandNameLength["Longer"] = "longer";
|
|
22503
|
+
/** Wears `size-small` on a phone (vectoriox/iox-ui#120: a name that took three lines at `size-body`). */
|
|
22504
|
+
BrandNameLength["Longest"] = "longest";
|
|
22505
|
+
})(BrandNameLength || (BrandNameLength = {}));
|
|
22506
|
+
/** From this many characters a name is `long`, then `longer`, then `longest`. Below it the name keeps its own size (a
|
|
22507
|
+
* phone bar holds a 16-character name in two lines at the largest heading size the looks give a brand). */
|
|
22508
|
+
const BRAND_NAME_LONG_AT = 17;
|
|
22509
|
+
const BRAND_NAME_LONGER_AT = 29;
|
|
22510
|
+
const BRAND_NAME_LONGEST_AT = 36;
|
|
22511
|
+
/** vectoriox/iox-ui#120: a line never breaks inside a word, so the LONGEST WORD decides too — a word from this many
|
|
22512
|
+
* letters does not fit one line of the bar at the size the name's length alone would give it ("Neighbourhoo|d Café"). */
|
|
22513
|
+
const BRAND_WORD_LONG_AT = 10;
|
|
22514
|
+
const BRAND_WORD_LONGER_AT = 12;
|
|
22515
|
+
const BRAND_WORD_LONGEST_AT = 15;
|
|
22516
|
+
const BRAND_STEPS = [
|
|
22517
|
+
{ length: BrandNameLength.Longest, name: BRAND_NAME_LONGEST_AT, word: BRAND_WORD_LONGEST_AT },
|
|
22518
|
+
{ length: BrandNameLength.Longer, name: BRAND_NAME_LONGER_AT, word: BRAND_WORD_LONGER_AT },
|
|
22519
|
+
{ length: BrandNameLength.Long, name: BRAND_NAME_LONG_AT, word: BRAND_WORD_LONG_AT },
|
|
22520
|
+
];
|
|
22521
|
+
/**
|
|
22522
|
+
* vectoriox/iox-ui#143: the steps for a CROWDED bar — three controls or more beside the name on a phone (a store's
|
|
22523
|
+
* account and bag beside the menu). Measured on a 390 store header (Fraunces, 4 × 16px gaps, 32px insets): the name kept
|
|
22524
|
+
* 77px, and "Homeware" (8 letters, 110px at the lead size) broke inside the word. A crowded bar packs its controls
|
|
22525
|
+
* (`BAR_ATTRIBUTE`, the shared CSS), which leaves the name ~105px at 360; at ~0.6em a letter that holds a 6-letter word at
|
|
22526
|
+
* the name's own size, 7 at `size-lead`, 10 at `size-body` — and, at ~0.55em a character, two lines of 13 / 16 / 22.
|
|
22527
|
+
*/
|
|
22528
|
+
const BRAND_CROWDED_NAME_LONG_AT = 13;
|
|
22529
|
+
const BRAND_CROWDED_NAME_LONGER_AT = 17;
|
|
22530
|
+
const BRAND_CROWDED_NAME_LONGEST_AT = 23;
|
|
22531
|
+
const BRAND_CROWDED_WORD_LONG_AT = 7;
|
|
22532
|
+
const BRAND_CROWDED_WORD_LONGER_AT = 8;
|
|
22533
|
+
const BRAND_CROWDED_WORD_LONGEST_AT = 11;
|
|
22534
|
+
const BRAND_CROWDED_STEPS = [
|
|
22535
|
+
{ length: BrandNameLength.Longest, name: BRAND_CROWDED_NAME_LONGEST_AT, word: BRAND_CROWDED_WORD_LONGEST_AT },
|
|
22536
|
+
{ length: BrandNameLength.Longer, name: BRAND_CROWDED_NAME_LONGER_AT, word: BRAND_CROWDED_WORD_LONGER_AT },
|
|
22537
|
+
{ length: BrandNameLength.Long, name: BRAND_CROWDED_NAME_LONG_AT, word: BRAND_CROWDED_WORD_LONG_AT },
|
|
22538
|
+
];
|
|
22539
|
+
/** The step a name takes: by its length and by its longest word, whichever asks for the smaller type; null = its size. */
|
|
22540
|
+
function brandNameLength(words, crowded = false) {
|
|
22541
|
+
const text = words.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim();
|
|
22542
|
+
const n = [...text].length;
|
|
22543
|
+
const word = Math.max(0, ...text.split(' ').map(w => [...w].length));
|
|
22544
|
+
return (crowded ? BRAND_CROWDED_STEPS : BRAND_STEPS).find(s => n >= s.name || word >= s.word)?.length ?? null;
|
|
22545
|
+
}
|
|
22546
|
+
/** The name's attributes: `{}` for a name that keeps its size. Never shortens the words — the type steps down, by the
|
|
22547
|
+
* name's length and by its longest word, whichever asks for the smaller step. */
|
|
22548
|
+
function brandNameAttributes(words) {
|
|
22549
|
+
const step = brandNameLength(words);
|
|
22550
|
+
return step ? { [BRAND_NAME_ATTRIBUTE]: step } : {};
|
|
22551
|
+
}
|
|
22552
|
+
// ── A crowded bar (vectoriox/iox-ui#143) ───────────────────────────────────────────────────────────────────────────
|
|
22553
|
+
/** The navigation root's role (generation-core `NavRole.Root`). */
|
|
22554
|
+
const NAV_ROLE = 'nav';
|
|
22555
|
+
/** Written on the navigation root when its phone bar is crowded: the shared CSS packs the controls. */
|
|
22556
|
+
const BAR_ATTRIBUTE = 'data-iox-bar';
|
|
22557
|
+
/** Written beside it: the step the name takes in that bar (never smaller type than the name's own step asks). */
|
|
22558
|
+
const BAR_NAME_ATTRIBUTE = 'data-iox-bar-name';
|
|
22559
|
+
var BarRoom;
|
|
22560
|
+
(function (BarRoom) {
|
|
22561
|
+
BarRoom["Crowded"] = "crowded";
|
|
22562
|
+
})(BarRoom || (BarRoom = {}));
|
|
22563
|
+
/** From this many controls beside the name on a phone, the bar is crowded. */
|
|
22564
|
+
const BAR_CROWDED_AT = 3;
|
|
22565
|
+
/** The parts that stay in the bar beside the name on a phone (generation-core `phoneHiddenParts` keeps the menu button, a
|
|
22566
|
+
* store's bag and account; HI1 keeps a menu-at-every-width header's pinned pages and actions). Spelled here: design-core
|
|
22567
|
+
* reads neither generation-core nor composite-core. */
|
|
22568
|
+
const PHONE_BAR_CONTROL_ROLES = ['nav.menu-button', 'shop.cart-button', 'account', 'nav.pinned', 'nav.actions'];
|
|
22569
|
+
/** What never counts: the drawer (a Dialog) and everything in it. */
|
|
22570
|
+
const BAR_SKIPPED_TYPES = ['Dialog'];
|
|
22571
|
+
/** The layers that reach a phone held upright, widest → narrowest — the cascade order (iox-ui `BREAKPOINTS`: `laptop`
|
|
22572
|
+
* ≤ 1200, `tablet` ≤ 991, `mobile` ≤ 767, `small` ≤ 479). Spelled here: design-core reads no Angular entry. */
|
|
22573
|
+
const PHONE_CASCADE = ['laptop', 'tablet', 'mobile', 'small'];
|
|
22574
|
+
/** Hidden on a phone: its display where a phone held upright lands, the last layer that says one (base → `small`).
|
|
22575
|
+
* vectoriox/iox-ui#143: a menu button is `none` at base and shown from its breakpoint down — read by its base alone it
|
|
22576
|
+
* was "hidden", the store bar (account · bag · menu) counted two and was never crowded, and its name broke at 390. */
|
|
22577
|
+
const hiddenOnPhone = (node) => {
|
|
22578
|
+
let display = node.styleProps?.['display'];
|
|
22579
|
+
for (const bp of PHONE_CASCADE) {
|
|
22580
|
+
const layer = node.responsive?.[bp]?.styleProps?.['display'];
|
|
22581
|
+
if (layer !== undefined && layer !== null && layer !== '')
|
|
22582
|
+
display = layer;
|
|
22583
|
+
}
|
|
22584
|
+
return display === 'none';
|
|
22585
|
+
};
|
|
22586
|
+
/** How many controls sit beside the name in the navigation's phone bar. */
|
|
22587
|
+
function phoneBarControls(nav) {
|
|
22588
|
+
let n = 0;
|
|
22589
|
+
const walk = (node) => {
|
|
22590
|
+
for (const child of (node.children ?? [])) {
|
|
22591
|
+
if (!child || (child.type && BAR_SKIPPED_TYPES.includes(child.type)) || hiddenOnPhone(child))
|
|
22592
|
+
continue;
|
|
22593
|
+
if (child.role && PHONE_BAR_CONTROL_ROLES.includes(child.role)) {
|
|
22594
|
+
n++;
|
|
22595
|
+
continue;
|
|
22596
|
+
}
|
|
22597
|
+
walk(child);
|
|
22598
|
+
}
|
|
22599
|
+
};
|
|
22600
|
+
if (nav)
|
|
22601
|
+
walk(nav);
|
|
22602
|
+
return n;
|
|
22603
|
+
}
|
|
22604
|
+
/** The navigation root's attributes: `{}` for a bar that is not crowded; else `crowded` and the name's crowded step. */
|
|
22605
|
+
function navBarAttributes(nav, brandWords) {
|
|
22606
|
+
if (phoneBarControls(nav) < BAR_CROWDED_AT)
|
|
22607
|
+
return {};
|
|
22608
|
+
const step = brandNameLength(brandWords, true);
|
|
22609
|
+
return { [BAR_ATTRIBUTE]: BarRoom.Crowded, ...(step ? { [BAR_NAME_ATTRIBUTE]: step } : {}) };
|
|
21973
22610
|
}
|
|
21974
22611
|
|
|
21975
22612
|
/**
|
|
@@ -22033,9 +22670,15 @@ function pageOpeningScheme(pageSettings) {
|
|
|
22033
22670
|
const id = pageSettings?.[OPENING_SETTING];
|
|
22034
22671
|
return colorSchemeClass(id) ? id : null;
|
|
22035
22672
|
}
|
|
22036
|
-
/**
|
|
22673
|
+
/**
|
|
22674
|
+
* The header that follows an opening of scheme `id` and names none of its own, inside `scope` (the builder's token scope).
|
|
22675
|
+
* HI3-D8: a header standing on a ground (over · over-glass · glass) follows the opening only at rest — once it has turned
|
|
22676
|
+
* it wears the page's own colours (unless its colours follow every section). Two selectors, each the same specificity as
|
|
22677
|
+
* before (the ground clauses are `:where()`).
|
|
22678
|
+
*/
|
|
22037
22679
|
function openingFollowerSelector(id, scope) {
|
|
22038
|
-
|
|
22680
|
+
const base = `${scope ? `${scope} ` : ''}[${OPENING_ATTRIBUTE}="${id}"] .${roleClass(OPENING_FOLLOWER_ROLE)}:not([class*="${SCHEME_PREFIX}"])`;
|
|
22681
|
+
return OPENING_FOLLOWER_GROUND_CLAUSES.map(clause => `${base}${clause}`).join(', ');
|
|
22039
22682
|
}
|
|
22040
22683
|
/**
|
|
22041
22684
|
* The page's CONTENT COLUMN (award plan §0c, AW-D33…AW-D41): every section, the header and the footer inset their words
|
|
@@ -22330,6 +22973,27 @@ function legacyRuleTokenReferences(css) {
|
|
|
22330
22973
|
const REDUCED_MOTION_OVERRIDES = SPEC_A11Y.reducedMotion;
|
|
22331
22974
|
/** What `prefers-reduced-transparency: reduce` makes solid — the contract's `a11y.reducedTransparency`. */
|
|
22332
22975
|
const REDUCED_TRANSPARENCY_OVERRIDES = SPEC_A11Y.reducedTransparency;
|
|
22976
|
+
/**
|
|
22977
|
+
* What a page in a CASELESS script (Hebrew, Arabic, Japanese… — locale-direction `CASELESS_LANGUAGES`) does with the
|
|
22978
|
+
* look's case and tracking tokens (vectoriox/iox-ui#124): a pairing that sets buttons and labels `uppercase` with
|
|
22979
|
+
* 0.04–0.12em tracking shouted only the Latin word inside a Hebrew label ("המשך עם GOOGLE") and opened up the Hebrew
|
|
22980
|
+
* letters, which Hebrew typography never does. So under a caseless `lang` the case tokens compile to `none` and the
|
|
22981
|
+
* tracking to `0em` (the contract's own `button-tracking` default). A CSS rule, not a compile option: the language is
|
|
22982
|
+
* read where it is written — the engine's `<html lang>`, the canvas's token scope `lang` (the SITE's, never the
|
|
22983
|
+
* admin's), a `lang` island inside a page — so ONE stylesheet serves a site whose pages differ in language.
|
|
22984
|
+
* An author's own `text-transform` on a node (styleProps) is untouched: only the look's tokens stand down.
|
|
22985
|
+
*/
|
|
22986
|
+
const CASELESS_SCRIPT_OVERRIDES = Object.freeze({
|
|
22987
|
+
'button-case': 'none',
|
|
22988
|
+
'case-label': 'none',
|
|
22989
|
+
'button-tracking': '0em',
|
|
22990
|
+
'tracking-label': '0em',
|
|
22991
|
+
});
|
|
22992
|
+
/** `:is([lang|="he" i], …)` — an element whose own `lang` names a caseless language (any region: `he`, `he-IL`). */
|
|
22993
|
+
const CASELESS_LANG_SELECTOR = `:is(${[...CASELESS_LANGUAGES].map(l => `[lang|="${l}" i]`).join(', ')})`;
|
|
22994
|
+
/** The scope itself carrying a caseless `lang`, and any element inside it that does. Specificity (0,2,0) on `:root`, so
|
|
22995
|
+
* it outranks the base `:root` block and the dark block's `:root` (0,1,0) wherever either is emitted. */
|
|
22996
|
+
const caselessSelector = (root) => `${root}${CASELESS_LANG_SELECTOR}, ${root} ${CASELESS_LANG_SELECTOR}`;
|
|
22333
22997
|
const ROOT = ':root';
|
|
22334
22998
|
const DEFAULT_SCHEME$1 = 'default';
|
|
22335
22999
|
const REFERENCE = 'var(';
|
|
@@ -22417,13 +23081,33 @@ function resolveTokenValues(tokens, mode = LIGHT) {
|
|
|
22417
23081
|
* the ones before it: a token the inner scheme does not set is the outer one's (custom properties inherit).
|
|
22418
23082
|
*/
|
|
22419
23083
|
function resolveSchemeTokenValues(tokens, mode, schemeId) {
|
|
23084
|
+
return schemeValuesOf(usableTokens(tokens), mode, schemeId, {});
|
|
23085
|
+
}
|
|
23086
|
+
/**
|
|
23087
|
+
* `resolveSchemeTokenValues` for MANY schemes (and chains) of ONE look in one mode: the look's root and
|
|
23088
|
+
* other-mode values are resolved once, and each scheme or chain once. The contrast audit asks ~90 of them per
|
|
23089
|
+
* look and the sweep thousands of looks (iox-ui#166). The answers are shared between calls: read them, never
|
|
23090
|
+
* write to them.
|
|
23091
|
+
*/
|
|
23092
|
+
function schemeTokenResolver(tokens, mode) {
|
|
22420
23093
|
const rows = usableTokens(tokens);
|
|
23094
|
+
const ground = {};
|
|
23095
|
+
const known = new Map();
|
|
23096
|
+
return schemeId => {
|
|
23097
|
+
const key = typeof schemeId === 'string' ? schemeId : schemeId.join('\u0001');
|
|
23098
|
+
let values = known.get(key);
|
|
23099
|
+
if (!values)
|
|
23100
|
+
known.set(key, values = schemeValuesOf(rows, mode, schemeId, ground));
|
|
23101
|
+
return values;
|
|
23102
|
+
};
|
|
23103
|
+
}
|
|
23104
|
+
function schemeValuesOf(rows, mode, schemeId, ground) {
|
|
22421
23105
|
const sets = (typeof schemeId === 'string' ? [schemeId] : schemeId)
|
|
22422
23106
|
.map(id => (id === DEFAULT_SCHEME$1 ? undefined : SPEC_SCHEMES[id]?.set));
|
|
23107
|
+
const root = (ground.root ??= resolveTokenValues(rows, mode));
|
|
22423
23108
|
if (!sets.some(Boolean))
|
|
22424
|
-
return
|
|
22425
|
-
const
|
|
22426
|
-
const other = resolveTokenValues(rows, mode === DARK ? LIGHT : DARK);
|
|
23109
|
+
return root;
|
|
23110
|
+
const other = (ground.other ??= resolveTokenValues(rows, mode === DARK ? LIGHT : DARK));
|
|
22427
23111
|
// Nested (`[outer, inner]` — a Featured card in an Inverse section): each scheme block re-declares the
|
|
22428
23112
|
// rows that reference a token, so at every level those are restored before the block's own set.
|
|
22429
23113
|
const overrides = new Map();
|
|
@@ -22601,6 +23285,7 @@ function compileTokenCssBlocks(tokens, opts = {}) {
|
|
|
22601
23285
|
rule(root, [...unset, ...rows.map((t) => [t.name, t.value])]),
|
|
22602
23286
|
compileSchemeCss(rows, opts.scope, opposite),
|
|
22603
23287
|
columns.base,
|
|
23288
|
+
rule(caselessSelector(root), presentOverrides(rows, CASELESS_SCRIPT_OVERRIDES, false)),
|
|
22604
23289
|
...ACCESSIBILITY_MEDIA.map(({ query, overrides }) => media(query, [rule(root, presentOverrides(rows, overrides, false), ' ')])),
|
|
22605
23290
|
].filter(Boolean).join('\n');
|
|
22606
23291
|
const darkRows = rows.map((t) => [t.name, darkOf(t)])
|
|
@@ -22664,220 +23349,6 @@ function themeColors(rows, mode = 'auto', options = {}) {
|
|
|
22664
23349
|
return out;
|
|
22665
23350
|
}
|
|
22666
23351
|
|
|
22667
|
-
/**
|
|
22668
|
-
* How a site's header behaves as the page scrolls (premium components T2, M4). Two traits on the header's ROOT (the
|
|
22669
|
-
* Navigation bar, generation-core `NavRole.Root`) — edited in its "Header" section, stamped by the composer from a
|
|
22670
|
-
* `nav.*` pattern's `header` — and ONE answer every renderer applies: the attributes below, which the shared CSS
|
|
22671
|
-
* (`iox-design.css`) and the header runtime (`HeaderRuntime`, main entry) read. A header with neither trait renders
|
|
22672
|
-
* exactly as before (it scrolls away with the page, its divider line as its look draws it).
|
|
22673
|
-
*
|
|
22674
|
-
* Framework-free: the composer (generation-core) and both renderers read it.
|
|
22675
|
-
*/
|
|
22676
|
-
var HeaderBehaviour;
|
|
22677
|
-
(function (HeaderBehaviour) {
|
|
22678
|
-
/** It scrolls away with the page (the default; what every header saved before M4 does). */
|
|
22679
|
-
HeaderBehaviour["Scrolls"] = "scrolls";
|
|
22680
|
-
/** It stays at the top while the page scrolls under it. */
|
|
22681
|
-
HeaderBehaviour["Stays"] = "stays";
|
|
22682
|
-
/** It steps aside while the page scrolls down and comes back the moment it scrolls up. */
|
|
22683
|
-
HeaderBehaviour["Hides"] = "hides";
|
|
22684
|
-
})(HeaderBehaviour || (HeaderBehaviour = {}));
|
|
22685
|
-
/** What separates the header from the page once the page has moved under it (Emil 99: an edge, not a divider). */
|
|
22686
|
-
var HeaderEdge;
|
|
22687
|
-
(function (HeaderEdge) {
|
|
22688
|
-
/** A soft fade of the header's own ground over the content under it. */
|
|
22689
|
-
HeaderEdge["Fade"] = "fade";
|
|
22690
|
-
/** A hairline in the header's border colour. */
|
|
22691
|
-
HeaderEdge["Line"] = "line";
|
|
22692
|
-
HeaderEdge["None"] = "none";
|
|
22693
|
-
})(HeaderEdge || (HeaderEdge = {}));
|
|
22694
|
-
/** The traits, stored in the root's props (no default: a plain Container saves neither). */
|
|
22695
|
-
var HeaderTrait;
|
|
22696
|
-
(function (HeaderTrait) {
|
|
22697
|
-
HeaderTrait["Behaviour"] = "headerBehaviour";
|
|
22698
|
-
HeaderTrait["Edge"] = "headerEdge";
|
|
22699
|
-
/** HI1b (HS-5): the mix the header was composed as — its `<ingredient>:<word>` words, space-separated (generation-core
|
|
22700
|
-
* `stampHeaderMix`). Read by Bindings ▸ Header and the Header studio; no renderer reads it. */
|
|
22701
|
-
HeaderTrait["Mix"] = "headerMix";
|
|
22702
|
-
/** AW6 (AW6-D10): `follows` — its colours follow the section under it as the page scrolls. Absent / `opening`: it
|
|
22703
|
-
* wears the page's opening (#71), as before. Written by the Header studio ▸ Ground and the composer (`ink:follows`). */
|
|
22704
|
-
HeaderTrait["Ink"] = "headerInk";
|
|
22705
|
-
})(HeaderTrait || (HeaderTrait = {}));
|
|
22706
|
-
/** Whose colours the header wears (contract HEADER `ink`): the page's opening, or every section as it passes under it. */
|
|
22707
|
-
var HeaderInk;
|
|
22708
|
-
(function (HeaderInk) {
|
|
22709
|
-
HeaderInk["Opening"] = "opening";
|
|
22710
|
-
HeaderInk["Follows"] = "follows";
|
|
22711
|
-
})(HeaderInk || (HeaderInk = {}));
|
|
22712
|
-
var HeaderAttribute;
|
|
22713
|
-
(function (HeaderAttribute) {
|
|
22714
|
-
/** `stays` | `hides` on a header that stays at the top. Absent: it scrolls away. */
|
|
22715
|
-
HeaderAttribute["Behaviour"] = "data-iox-header";
|
|
22716
|
-
/** `fade` | `line` | `none`: the edge it shows once the page has scrolled. Absent: its look's own divider stays. */
|
|
22717
|
-
HeaderAttribute["Edge"] = "data-iox-header-edge";
|
|
22718
|
-
/** Written by the header runtime while a `hides` header has stepped aside. */
|
|
22719
|
-
HeaderAttribute["Hidden"] = "data-iox-header-hidden";
|
|
22720
|
-
/** `follows` on a header whose colours follow the section under it (the header ink runtime writes the page's
|
|
22721
|
-
* `data-iox-opening` as each section passes; the shared CSS cross-fades). Absent: it wears the opening. */
|
|
22722
|
-
HeaderAttribute["Ink"] = "data-iox-header-ink";
|
|
22723
|
-
})(HeaderAttribute || (HeaderAttribute = {}));
|
|
22724
|
-
/** What a composed header gets (the `nav.*` patterns' `header`, the palette's Navigation bar). */
|
|
22725
|
-
const COMPOSED_HEADER = {
|
|
22726
|
-
behaviour: HeaderBehaviour.Hides,
|
|
22727
|
-
edge: HeaderEdge.Fade,
|
|
22728
|
-
};
|
|
22729
|
-
const BEHAVIOURS = new Set(Object.values(HeaderBehaviour));
|
|
22730
|
-
const EDGES = new Set(Object.values(HeaderEdge));
|
|
22731
|
-
/** A stored behaviour, or Scrolls for anything else. */
|
|
22732
|
-
function headerBehaviourOf(value) {
|
|
22733
|
-
return typeof value === 'string' && BEHAVIOURS.has(value) ? value : HeaderBehaviour.Scrolls;
|
|
22734
|
-
}
|
|
22735
|
-
/** A stored edge, or null (none chosen: the look's divider stays as it is). */
|
|
22736
|
-
function headerEdgeOf(value) {
|
|
22737
|
-
return typeof value === 'string' && EDGES.has(value) ? value : null;
|
|
22738
|
-
}
|
|
22739
|
-
/** True when the header keeps its place at the top of the screen (it stays, or it hides and comes back). */
|
|
22740
|
-
function headerStaysAtTop(behaviour) {
|
|
22741
|
-
return headerBehaviourOf(behaviour) !== HeaderBehaviour.Scrolls;
|
|
22742
|
-
}
|
|
22743
|
-
/** A stored ink, or Opening for anything else. */
|
|
22744
|
-
function headerInkOf(value) {
|
|
22745
|
-
return value === HeaderInk.Follows ? HeaderInk.Follows : HeaderInk.Opening;
|
|
22746
|
-
}
|
|
22747
|
-
/** The attributes a header renders, from its trait values — `{}` for a header that keeps today's behaviour. */
|
|
22748
|
-
function headerAttributes(behaviour, edge, ink) {
|
|
22749
|
-
const out = {};
|
|
22750
|
-
if (headerInkOf(ink) === HeaderInk.Follows)
|
|
22751
|
-
out[HeaderAttribute.Ink] = HeaderInk.Follows;
|
|
22752
|
-
const b = headerBehaviourOf(behaviour);
|
|
22753
|
-
if (b !== HeaderBehaviour.Scrolls)
|
|
22754
|
-
out[HeaderAttribute.Behaviour] = b;
|
|
22755
|
-
const e = headerEdgeOf(edge);
|
|
22756
|
-
if (e)
|
|
22757
|
-
out[HeaderAttribute.Edge] = e;
|
|
22758
|
-
return out;
|
|
22759
|
-
}
|
|
22760
|
-
// ── The header's name on a phone (vectoriox/iox-ui#98) ─────────────────────────────────────────────────────────────
|
|
22761
|
-
/** The brand's role (generation-core `NavRole.Brand`, spelled here: design-core reads no generation-core). */
|
|
22762
|
-
const BRAND_ROLE = 'nav.brand';
|
|
22763
|
-
/** Written on the brand when its name is long: the shared CSS steps its type down the look's scale on a phone. */
|
|
22764
|
-
const BRAND_NAME_ATTRIBUTE = 'data-iox-name';
|
|
22765
|
-
/** How long a header's name is, for a phone bar that must hold it on one or two lines. */
|
|
22766
|
-
var BrandNameLength;
|
|
22767
|
-
(function (BrandNameLength) {
|
|
22768
|
-
/** Wears `size-lead` on a phone. */
|
|
22769
|
-
BrandNameLength["Long"] = "long";
|
|
22770
|
-
/** Wears `size-body` on a phone. */
|
|
22771
|
-
BrandNameLength["Longer"] = "longer";
|
|
22772
|
-
/** Wears `size-small` on a phone (vectoriox/iox-ui#120: a name that took three lines at `size-body`). */
|
|
22773
|
-
BrandNameLength["Longest"] = "longest";
|
|
22774
|
-
})(BrandNameLength || (BrandNameLength = {}));
|
|
22775
|
-
/** From this many characters a name is `long`, then `longer`, then `longest`. Below it the name keeps its own size (a
|
|
22776
|
-
* phone bar holds a 16-character name in two lines at the largest heading size the looks give a brand). */
|
|
22777
|
-
const BRAND_NAME_LONG_AT = 17;
|
|
22778
|
-
const BRAND_NAME_LONGER_AT = 29;
|
|
22779
|
-
const BRAND_NAME_LONGEST_AT = 36;
|
|
22780
|
-
/** vectoriox/iox-ui#120: a line never breaks inside a word, so the LONGEST WORD decides too — a word from this many
|
|
22781
|
-
* letters does not fit one line of the bar at the size the name's length alone would give it ("Neighbourhoo|d Café"). */
|
|
22782
|
-
const BRAND_WORD_LONG_AT = 10;
|
|
22783
|
-
const BRAND_WORD_LONGER_AT = 12;
|
|
22784
|
-
const BRAND_WORD_LONGEST_AT = 15;
|
|
22785
|
-
const BRAND_STEPS = [
|
|
22786
|
-
{ length: BrandNameLength.Longest, name: BRAND_NAME_LONGEST_AT, word: BRAND_WORD_LONGEST_AT },
|
|
22787
|
-
{ length: BrandNameLength.Longer, name: BRAND_NAME_LONGER_AT, word: BRAND_WORD_LONGER_AT },
|
|
22788
|
-
{ length: BrandNameLength.Long, name: BRAND_NAME_LONG_AT, word: BRAND_WORD_LONG_AT },
|
|
22789
|
-
];
|
|
22790
|
-
/**
|
|
22791
|
-
* vectoriox/iox-ui#143: the steps for a CROWDED bar — three controls or more beside the name on a phone (a store's
|
|
22792
|
-
* account and bag beside the menu). Measured on a 390 store header (Fraunces, 4 × 16px gaps, 32px insets): the name kept
|
|
22793
|
-
* 77px, and "Homeware" (8 letters, 110px at the lead size) broke inside the word. A crowded bar packs its controls
|
|
22794
|
-
* (`BAR_ATTRIBUTE`, the shared CSS), which leaves the name ~105px at 360; at ~0.6em a letter that holds a 6-letter word at
|
|
22795
|
-
* the name's own size, 7 at `size-lead`, 10 at `size-body` — and, at ~0.55em a character, two lines of 13 / 16 / 22.
|
|
22796
|
-
*/
|
|
22797
|
-
const BRAND_CROWDED_NAME_LONG_AT = 13;
|
|
22798
|
-
const BRAND_CROWDED_NAME_LONGER_AT = 17;
|
|
22799
|
-
const BRAND_CROWDED_NAME_LONGEST_AT = 23;
|
|
22800
|
-
const BRAND_CROWDED_WORD_LONG_AT = 7;
|
|
22801
|
-
const BRAND_CROWDED_WORD_LONGER_AT = 8;
|
|
22802
|
-
const BRAND_CROWDED_WORD_LONGEST_AT = 11;
|
|
22803
|
-
const BRAND_CROWDED_STEPS = [
|
|
22804
|
-
{ length: BrandNameLength.Longest, name: BRAND_CROWDED_NAME_LONGEST_AT, word: BRAND_CROWDED_WORD_LONGEST_AT },
|
|
22805
|
-
{ length: BrandNameLength.Longer, name: BRAND_CROWDED_NAME_LONGER_AT, word: BRAND_CROWDED_WORD_LONGER_AT },
|
|
22806
|
-
{ length: BrandNameLength.Long, name: BRAND_CROWDED_NAME_LONG_AT, word: BRAND_CROWDED_WORD_LONG_AT },
|
|
22807
|
-
];
|
|
22808
|
-
/** The step a name takes: by its length and by its longest word, whichever asks for the smaller type; null = its size. */
|
|
22809
|
-
function brandNameLength(words, crowded = false) {
|
|
22810
|
-
const text = words.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim();
|
|
22811
|
-
const n = [...text].length;
|
|
22812
|
-
const word = Math.max(0, ...text.split(' ').map(w => [...w].length));
|
|
22813
|
-
return (crowded ? BRAND_CROWDED_STEPS : BRAND_STEPS).find(s => n >= s.name || word >= s.word)?.length ?? null;
|
|
22814
|
-
}
|
|
22815
|
-
/** The name's attributes: `{}` for a name that keeps its size. Never shortens the words — the type steps down, by the
|
|
22816
|
-
* name's length and by its longest word, whichever asks for the smaller step. */
|
|
22817
|
-
function brandNameAttributes(words) {
|
|
22818
|
-
const step = brandNameLength(words);
|
|
22819
|
-
return step ? { [BRAND_NAME_ATTRIBUTE]: step } : {};
|
|
22820
|
-
}
|
|
22821
|
-
// ── A crowded bar (vectoriox/iox-ui#143) ───────────────────────────────────────────────────────────────────────────
|
|
22822
|
-
/** The navigation root's role (generation-core `NavRole.Root`). */
|
|
22823
|
-
const NAV_ROLE = 'nav';
|
|
22824
|
-
/** Written on the navigation root when its phone bar is crowded: the shared CSS packs the controls. */
|
|
22825
|
-
const BAR_ATTRIBUTE = 'data-iox-bar';
|
|
22826
|
-
/** Written beside it: the step the name takes in that bar (never smaller type than the name's own step asks). */
|
|
22827
|
-
const BAR_NAME_ATTRIBUTE = 'data-iox-bar-name';
|
|
22828
|
-
var BarRoom;
|
|
22829
|
-
(function (BarRoom) {
|
|
22830
|
-
BarRoom["Crowded"] = "crowded";
|
|
22831
|
-
})(BarRoom || (BarRoom = {}));
|
|
22832
|
-
/** From this many controls beside the name on a phone, the bar is crowded. */
|
|
22833
|
-
const BAR_CROWDED_AT = 3;
|
|
22834
|
-
/** The parts that stay in the bar beside the name on a phone (generation-core `phoneHiddenParts` keeps the menu button, a
|
|
22835
|
-
* store's bag and account; HI1 keeps a menu-at-every-width header's pinned pages and actions). Spelled here: design-core
|
|
22836
|
-
* reads neither generation-core nor composite-core. */
|
|
22837
|
-
const PHONE_BAR_CONTROL_ROLES = ['nav.menu-button', 'shop.cart-button', 'account', 'nav.pinned', 'nav.actions'];
|
|
22838
|
-
/** What never counts: the drawer (a Dialog) and everything in it. */
|
|
22839
|
-
const BAR_SKIPPED_TYPES = ['Dialog'];
|
|
22840
|
-
/** The layers that reach a phone held upright, widest → narrowest — the cascade order (iox-ui `BREAKPOINTS`: `laptop`
|
|
22841
|
-
* ≤ 1200, `tablet` ≤ 991, `mobile` ≤ 767, `small` ≤ 479). Spelled here: design-core reads no Angular entry. */
|
|
22842
|
-
const PHONE_CASCADE = ['laptop', 'tablet', 'mobile', 'small'];
|
|
22843
|
-
/** Hidden on a phone: its display where a phone held upright lands, the last layer that says one (base → `small`).
|
|
22844
|
-
* vectoriox/iox-ui#143: a menu button is `none` at base and shown from its breakpoint down — read by its base alone it
|
|
22845
|
-
* was "hidden", the store bar (account · bag · menu) counted two and was never crowded, and its name broke at 390. */
|
|
22846
|
-
const hiddenOnPhone = (node) => {
|
|
22847
|
-
let display = node.styleProps?.['display'];
|
|
22848
|
-
for (const bp of PHONE_CASCADE) {
|
|
22849
|
-
const layer = node.responsive?.[bp]?.styleProps?.['display'];
|
|
22850
|
-
if (layer !== undefined && layer !== null && layer !== '')
|
|
22851
|
-
display = layer;
|
|
22852
|
-
}
|
|
22853
|
-
return display === 'none';
|
|
22854
|
-
};
|
|
22855
|
-
/** How many controls sit beside the name in the navigation's phone bar. */
|
|
22856
|
-
function phoneBarControls(nav) {
|
|
22857
|
-
let n = 0;
|
|
22858
|
-
const walk = (node) => {
|
|
22859
|
-
for (const child of (node.children ?? [])) {
|
|
22860
|
-
if (!child || (child.type && BAR_SKIPPED_TYPES.includes(child.type)) || hiddenOnPhone(child))
|
|
22861
|
-
continue;
|
|
22862
|
-
if (child.role && PHONE_BAR_CONTROL_ROLES.includes(child.role)) {
|
|
22863
|
-
n++;
|
|
22864
|
-
continue;
|
|
22865
|
-
}
|
|
22866
|
-
walk(child);
|
|
22867
|
-
}
|
|
22868
|
-
};
|
|
22869
|
-
if (nav)
|
|
22870
|
-
walk(nav);
|
|
22871
|
-
return n;
|
|
22872
|
-
}
|
|
22873
|
-
/** The navigation root's attributes: `{}` for a bar that is not crowded; else `crowded` and the name's crowded step. */
|
|
22874
|
-
function navBarAttributes(nav, brandWords) {
|
|
22875
|
-
if (phoneBarControls(nav) < BAR_CROWDED_AT)
|
|
22876
|
-
return {};
|
|
22877
|
-
const step = brandNameLength(brandWords, true);
|
|
22878
|
-
return { [BAR_ATTRIBUTE]: BarRoom.Crowded, ...(step ? { [BAR_NAME_ATTRIBUTE]: step } : {}) };
|
|
22879
|
-
}
|
|
22880
|
-
|
|
22881
23352
|
/**
|
|
22882
23353
|
* How a site's MENU looks and moves (header-ingredients-plan.md HI2a; HB-D1/HB-D2, header-builder board v2). The header
|
|
22883
23354
|
* table's menu words — its form (drawer · full · top panel · card · mega), how it opens (slide · fade · zoom · circle ·
|
|
@@ -23352,7 +23823,7 @@ const RAMP_STEPS = [
|
|
|
23352
23823
|
{ step: 800, L: 0.36, chromaScale: 0.76 },
|
|
23353
23824
|
{ step: 900, L: 0.27, chromaScale: 0.62 },
|
|
23354
23825
|
];
|
|
23355
|
-
const BLACK = { r: 0, g: 0, b: 0 };
|
|
23826
|
+
const BLACK$1 = { r: 0, g: 0, b: 0 };
|
|
23356
23827
|
const WHITE$1 = { r: 1, g: 1, b: 1 };
|
|
23357
23828
|
/** Snap to the 8-bit hex the token will actually carry — contrast is judged on WHAT SHIPS.
|
|
23358
23829
|
* (The first version searched in float space and hex rounding landed 6.9596 where 7 was owed.) */
|
|
@@ -23406,12 +23877,12 @@ function deriveBrandTokens(seed, pack) {
|
|
|
23406
23877
|
// 2 — brandInk on brand-500, nudging 500 (within its neighbours) when neither ink clears 4.5
|
|
23407
23878
|
let five = ramp.find(r => r.step === 500);
|
|
23408
23879
|
five.rgb = quant(five.rgb);
|
|
23409
|
-
const inkFor = (bg) => (wcagContrastRatio(WHITE$1, bg) >= wcagContrastRatio(BLACK, bg) ? WHITE$1 : BLACK);
|
|
23880
|
+
const inkFor = (bg) => (wcagContrastRatio(WHITE$1, bg) >= wcagContrastRatio(BLACK$1, bg) ? WHITE$1 : BLACK$1);
|
|
23410
23881
|
for (let i = 0; i < 40 && wcagContrastRatio(inkFor(five.rgb), five.rgb) < 4.5; i++) {
|
|
23411
23882
|
const L = rgbToOklab(five.rgb).L;
|
|
23412
23883
|
// Mid tones can fail both inks — walk toward whichever side is already winning, but
|
|
23413
23884
|
// never past the neighbouring steps: the ramp's monotonic lightness is a guarantee.
|
|
23414
|
-
const towardDark = wcagContrastRatio(WHITE$1, five.rgb) >= wcagContrastRatio(BLACK, five.rgb);
|
|
23885
|
+
const towardDark = wcagContrastRatio(WHITE$1, five.rgb) >= wcagContrastRatio(BLACK$1, five.rgb);
|
|
23415
23886
|
const next = Math.min(0.695, Math.max(0.545, L + (towardDark ? -0.012 : 0.012)));
|
|
23416
23887
|
if (next === L)
|
|
23417
23888
|
break;
|
|
@@ -23454,7 +23925,7 @@ const groundList = (g) => (g === undefined || g === null ? [] : typeof g === 'st
|
|
|
23454
23925
|
const hasGround = (g) => groundList(g).length > 0;
|
|
23455
23926
|
const RAMP_ORDER = RAMP_STEPS.map(s => s.step);
|
|
23456
23927
|
const WHITE_HEX = toHexColor(WHITE$1);
|
|
23457
|
-
const BLACK_HEX = toHexColor(BLACK);
|
|
23928
|
+
const BLACK_HEX = toHexColor(BLACK$1);
|
|
23458
23929
|
const passesText = (fg, bg) => groundList(bg).every(g => wcagContrastRatio(fg, g) >= WCAG_AA_TEXT);
|
|
23459
23930
|
const bestInkHex = (bg) => (wcagContrastRatio(WHITE_HEX, bg) >= wcagContrastRatio(BLACK_HEX, bg) ? WHITE_HEX : BLACK_HEX);
|
|
23460
23931
|
/**
|
|
@@ -24157,8 +24628,9 @@ function sweepDesignContrast(rows, mode) {
|
|
|
24157
24628
|
const section = ownStyle(byId.get(SECTION_STYLE));
|
|
24158
24629
|
const iconColour = ownStyle(byId.get(ICON_STYLE))['color'];
|
|
24159
24630
|
const bodyWeight = ownStyle(byId.get(BODY_STYLE))['fontWeight'];
|
|
24631
|
+
const valuesIn = schemeTokenResolver(rows, mode);
|
|
24160
24632
|
for (const schemeId of SCHEME_IDS) {
|
|
24161
|
-
const values =
|
|
24633
|
+
const values = valuesIn(schemeId);
|
|
24162
24634
|
const pageInk = parseCssColour(values['text']);
|
|
24163
24635
|
const page = paintColours(values['page-bg'], pageInk);
|
|
24164
24636
|
const sectionPaint = paintColours(values['section-bg'], pageInk);
|
|
@@ -24166,13 +24638,22 @@ function sweepDesignContrast(rows, mode) {
|
|
|
24166
24638
|
? sectionPaint.map(c => (c.a < 1 ? compositeOver(c, page[0] ?? WHITE) : c))
|
|
24167
24639
|
: page;
|
|
24168
24640
|
const sectionInk = parseCssColour(resolveIn(values, section['color']), pageInk);
|
|
24641
|
+
// What an ink-scoped element's Icon paints depends on the scheme alone, never the box: resolved once per scheme.
|
|
24642
|
+
const scopedIcon = new Map();
|
|
24643
|
+
const iconIn = (styleId) => {
|
|
24644
|
+
let v = scopedIcon.get(styleId);
|
|
24645
|
+
if (v === undefined)
|
|
24646
|
+
scopedIcon.set(styleId, v = resolveIn(inkScoped(values, styleId), iconColour));
|
|
24647
|
+
return v;
|
|
24648
|
+
};
|
|
24169
24649
|
for (const box of containers) {
|
|
24170
24650
|
const boxStyle = box ? ownStyle(box) : null;
|
|
24171
24651
|
const bgs = boxStyle ? overAll(paintColours(resolveIn(values, boxStyle['backgroundColor']), sectionInk), ground) : ground;
|
|
24172
24652
|
const boxInk = boxStyle?.['color'] && boxStyle['color'] !== 'inherit'
|
|
24173
24653
|
? parseCssColour(resolveIn(values, boxStyle['color']), sectionInk) : sectionInk;
|
|
24174
|
-
const
|
|
24175
|
-
|
|
24654
|
+
const container = box?.id ?? SECTION;
|
|
24655
|
+
// A plain literal, one shape for every finding (a `{ ...where }` spread here was a fifth of the sweep's time).
|
|
24656
|
+
const record = (element, part, fg, bg, ratio, min) => findings.push({ scheme: schemeId, container, element, part, fg, bg, ratio: Math.round(ratio * 100) / 100, min, pass: ratio >= min - 1e-9 });
|
|
24176
24657
|
const check = (element, part, fg, under, min) => {
|
|
24177
24658
|
if (!fg)
|
|
24178
24659
|
return;
|
|
@@ -24219,7 +24700,7 @@ function sweepDesignContrast(rows, mode) {
|
|
|
24219
24700
|
check(e.id, 'selected mark', f, bgs, WCAG_AA_UI);
|
|
24220
24701
|
// What a filled element HOLDS (inkScopes): a button's or a badge's icon reads its ink.
|
|
24221
24702
|
if (state === 'base' && INK_SCOPES.some(sc => sc.styles.includes(e.id))) {
|
|
24222
|
-
check(e.id, 'icon', parseCssColour(
|
|
24703
|
+
check(e.id, 'icon', parseCssColour(iconIn(e.id), ink), under, WCAG_AA_UI);
|
|
24223
24704
|
}
|
|
24224
24705
|
// Every focus ring an element style draws, on every ground the element sits on (CC4b: a Segmented
|
|
24225
24706
|
// option on its track — not only the buttons).
|
|
@@ -24259,9 +24740,9 @@ function sweepDesignContrast(rows, mode) {
|
|
|
24259
24740
|
}
|
|
24260
24741
|
}
|
|
24261
24742
|
}
|
|
24262
|
-
findings.push(...schemedContainerFindings(
|
|
24743
|
+
findings.push(...schemedContainerFindings(valuesIn, section, containers.filter((c) => !!c)));
|
|
24263
24744
|
for (const scrim of SCRIMS)
|
|
24264
|
-
findings.push(...scrimFindings(
|
|
24745
|
+
findings.push(...scrimFindings(valuesIn, scrim, byId.get(scrim.style)));
|
|
24265
24746
|
return findings;
|
|
24266
24747
|
}
|
|
24267
24748
|
/** What a section in `values` paints under its content: its own fill over the page, or the page. */
|
|
@@ -24277,12 +24758,12 @@ function sectionGround(values) {
|
|
|
24277
24758
|
* section's (what it does not set, it inherits); a translucent fill composites over the OUTER section; the running text it holds (`body`, `lead`, a label: `color: inherit`)
|
|
24278
24759
|
* reads the scheme's ink, which is what the scheme-ink rule and `withSchemeInk` make CSS compute.
|
|
24279
24760
|
*/
|
|
24280
|
-
function schemedContainerFindings(
|
|
24761
|
+
function schemedContainerFindings(valuesIn, section, containers) {
|
|
24281
24762
|
const out = [];
|
|
24282
24763
|
for (const outer of SCHEME_IDS) {
|
|
24283
|
-
const ground = sectionGround(
|
|
24764
|
+
const ground = sectionGround(valuesIn(outer));
|
|
24284
24765
|
for (const inner of SCHEME_IDS.filter(id => id !== DEFAULT_SCHEME)) {
|
|
24285
|
-
const values =
|
|
24766
|
+
const values = valuesIn([outer, inner]);
|
|
24286
24767
|
const schemeInk = parseCssColour(resolveIn(values, SCHEME_INK), parseCssColour(resolveIn(values, section['color'])));
|
|
24287
24768
|
for (const box of containers) {
|
|
24288
24769
|
const style = ownStyle(box);
|
|
@@ -24307,8 +24788,8 @@ function schemedContainerFindings(rows, mode, section, containers) {
|
|
|
24307
24788
|
/** Text over an image: the block's ink — and every token its ink scope pins to it — over the scrim
|
|
24308
24789
|
* composited on the WORST-CASE image, in the scheme the block wears. Never over the section: the image
|
|
24309
24790
|
* covers it. */
|
|
24310
|
-
function scrimFindings(
|
|
24311
|
-
const values =
|
|
24791
|
+
function scrimFindings(valuesIn, scrim, style) {
|
|
24792
|
+
const values = valuesIn(scrim.scheme);
|
|
24312
24793
|
const layer = parseCssColour(values[scrim.token]);
|
|
24313
24794
|
const image = parseCssColour(scrim.image);
|
|
24314
24795
|
if (!style || !layer || !image)
|
|
@@ -24358,6 +24839,39 @@ function colourTabChecks(rows, mode) {
|
|
|
24358
24839
|
}
|
|
24359
24840
|
return out;
|
|
24360
24841
|
}
|
|
24842
|
+
/** The translucent grounds that carry words over ANYTHING (the header's bar and glass while the page moves under them, the
|
|
24843
|
+
* bottom bar, a dialog, a popover, the strong glass) — the contract's table (`contrastAudit.floatingGrounds`). */
|
|
24844
|
+
const FLOATING_GROUNDS = SPEC_CONTRAST_AUDIT.floatingGrounds ?? [];
|
|
24845
|
+
const BLACK = { r: 0, g: 0, b: 0, a: 1 };
|
|
24846
|
+
/** The two backdrops that bound every picture: each channel of a blend is monotone in its backdrop's. */
|
|
24847
|
+
const FLOATING_BACKDROPS = Object.freeze({ black: BLACK, white: WHITE });
|
|
24848
|
+
/**
|
|
24849
|
+
* HI3 slice 1 (R-H16): each translucent ground's words over pure black AND pure white, in the page's own scheme (the one a
|
|
24850
|
+
* header on a ground and a top-layer dialog wear), in one mode — nothing a blur can lay under the bar is darker or
|
|
24851
|
+
* lighter, so a ground that holds AA over both holds it over any picture (iox-ui#173: the Glass look's bar dropped to
|
|
24852
|
+
* 3.55:1 over a light picture in dark mode). An opaque ground is not judged here (the DS9 audit judges it where it stands).
|
|
24853
|
+
* The contract's gate, 1:1 (build-spec `floatingGroundFailures`).
|
|
24854
|
+
*/
|
|
24855
|
+
function floatingGroundFindings(rows, mode) {
|
|
24856
|
+
const values = schemeTokenResolver(rows, mode)(DEFAULT_SCHEME);
|
|
24857
|
+
const out = [];
|
|
24858
|
+
for (const { ground, ink } of FLOATING_GROUNDS) {
|
|
24859
|
+
const fg = parseCssColour(values[ink]);
|
|
24860
|
+
const bg = parseCssColour(values[ground], fg);
|
|
24861
|
+
if (!fg || !bg || bg.a >= 1)
|
|
24862
|
+
continue;
|
|
24863
|
+
const fgHex = toHexColor(quantizeRgb(fg));
|
|
24864
|
+
for (const [name, under] of Object.entries(FLOATING_BACKDROPS)) {
|
|
24865
|
+
const shown = quantizeRgb(compositeOver(bg, under));
|
|
24866
|
+
const ratio = wcagContrastRatio(fgHex, shown);
|
|
24867
|
+
out.push({
|
|
24868
|
+
scheme: DEFAULT_SCHEME, container: `over ${name}`, element: ground, part: ink, fg: fgHex, bg: toHexColor(shown),
|
|
24869
|
+
ratio: Math.round(ratio * 100) / 100, min: WCAG_AA_TEXT, pass: ratio >= WCAG_AA_TEXT - 1e-9,
|
|
24870
|
+
});
|
|
24871
|
+
}
|
|
24872
|
+
}
|
|
24873
|
+
return out;
|
|
24874
|
+
}
|
|
24361
24875
|
|
|
24362
24876
|
/**
|
|
24363
24877
|
* Fonts (design-system plan §5b, D7): ONE Google catalog for both renderers, and ONE face builder
|
|
@@ -26294,6 +26808,21 @@ function designPreloaderOf(config) {
|
|
|
26294
26808
|
return hasRow ? preloaderOfChoices(choices) : null;
|
|
26295
26809
|
}
|
|
26296
26810
|
|
|
26811
|
+
/**
|
|
26812
|
+
* "Close" in the page's language — the accessible name of every × the platform names: the Dialog's close button (the
|
|
26813
|
+
* iox-ui component path AND the engine's string path, vectoriox/iox-ui#167), the toast's close control (premium M5) and
|
|
26814
|
+
* the Lightbox recipe's stamped Close part (composite-core, vectoriox/iox-ui#170). ONE table, so no overlay on a Hebrew
|
|
26815
|
+
* site is ever named "Close". It lives in design-core — the entry every other one may import (composite-core cannot
|
|
26816
|
+
* import actions-core, which imports it); actions-core re-exports it. Framework-free (the engine's string renderer and
|
|
26817
|
+
* iox-cms read it); a locale is read by its language subtag (`he-IL` → `he`).
|
|
26818
|
+
*/
|
|
26819
|
+
/** The close word by language subtag. English is the fallback for every language the table lacks. */
|
|
26820
|
+
const CLOSE_WORDS = Object.freeze({ en: 'Close', he: 'סגירה' });
|
|
26821
|
+
/** "Close" in `lang` (its base language), else English. */
|
|
26822
|
+
function closeWord(lang) {
|
|
26823
|
+
return CLOSE_WORDS[languageOf(lang)] ?? CLOSE_WORDS['en'];
|
|
26824
|
+
}
|
|
26825
|
+
|
|
26297
26826
|
/**
|
|
26298
26827
|
* @vectoriox/iox-ui/design-core — the shared, FRAMEWORK-FREE core of the design system
|
|
26299
26828
|
* (design-system plan §3e): the token vocabulary, the flavor contract (generated 1:1 from
|
|
@@ -26309,5 +26838,5 @@ function designPreloaderOf(config) {
|
|
|
26309
26838
|
* Generated bundle index. Do not edit.
|
|
26310
26839
|
*/
|
|
26311
26840
|
|
|
26312
|
-
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, ARRIVE_IDS, AdoptOutcome, AdoptSkipReason, BACKDROP_FUNCTIONS, BAR_ATTRIBUTE, BAR_CROWDED_AT, BAR_NAME_ATTRIBUTE, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BRAND_CROWDED_NAME_LONGER_AT, BRAND_CROWDED_NAME_LONGEST_AT, BRAND_CROWDED_NAME_LONG_AT, BRAND_CROWDED_WORD_LONGER_AT, BRAND_CROWDED_WORD_LONGEST_AT, BRAND_CROWDED_WORD_LONG_AT, BRAND_NAME_ATTRIBUTE, BRAND_NAME_LONGER_AT, BRAND_NAME_LONGEST_AT, BRAND_NAME_LONG_AT, BRAND_ROLE, BRAND_WORD_LONGER_AT, BRAND_WORD_LONGEST_AT, BRAND_WORD_LONG_AT, BUTTON_VARIANT_TO_STYLE, BarRoom, BrandNameLength, CANVAS_LINK_ATTRIBUTE, CARD_EDGES, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COLUMN_ATTRIBUTE, COLUMN_IDS, COLUMN_SETTING, COMPOSED_HEADER, CONTENT_CAP_TOKEN, CONTENT_WIDTH_TOKEN, CONTRAST_AUDIT_MEMORY, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DEFAULT_GROUND_INKS, DEFAULT_MENU_LOOK, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FIELD_INVALID_CLASS, FILTER_FUNCTIONS, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FOOTER_CLASS_PREFIX, FOOTER_MIRRORED_CLASS, FOOTER_MIX_PROP, FieldClass, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, GROUND_INK_MIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderInk, HeaderTrait, INHERITED_TEXT, LEAVE_IDS, LEAVE_SHARE, LINK_WEIGHT_STEP, LIST_CLASS_PREFIX, LIST_MIRRORED_CLASS, LIST_MIX_PROP, LinkType, LocaleDirection, MARK_STYLES, MAX_FONT_FILE_BYTES, MENU_ATTRIBUTES, MENU_PHONE_MAX_WIDTH, MIRRORED_EDGES, MOOD_IDS, MOOD_LABELS, MOTION_LANGUAGE_PRESET_IDS, MOVE_IDS, MenuAttribute, MenuButtonKind, MenuForm, MenuHover, MenuPhoneForm, MenuReveal, MenuTrait, MotionWordTier, NAV_ROLE, NEW_COLUMN, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OpticalSize, OwnedTraitLink, PALETTE_PRESETS, PHONE_BAR_CONTROL_ROLES, PRELOADER_CAP_MS, PRELOADER_ENTER_EASE, PRELOADER_EXIT_EASE, PRELOADER_EXIT_IDS, PRELOADER_EXIT_MAX_MS, PRELOADER_IDS, PRELOADER_LETTERS_MAX, PRELOADER_LEVELS, PRELOADER_MIN_SHOW_MS, PRE_COLUMN, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, PreloaderExit, PreloaderKind, QUIET_LEVELS, QUIET_MOVE, REDUCED_DESIGN_MOTION, REDUCED_ENTRANCE_MAX_MS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, RTL_LANGUAGES, SCHEME_INK, SCROLL_IDS, SCRUB_IDS, SCRUB_LEVELS, SEAM_CLASS_PREFIX, SEAM_MIRRORED_CLASS, SECTION_CARD_CLASS, SECTION_CARD_STYLES, SECTION_CARD_SUPERSEDED, SECTION_EDGES, SECTION_EDGE_TRAIT, SECTION_EDGE_TYPES, SECTION_FULL_STYLES, SECTION_SHAPE_TRAIT, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_MOTION_LANGUAGE, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SPRING_CURVE_TOKEN, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SUPERSEDED_TOKEN_VALUES, SWISS_FLAVOR, ScrubId, SectionEdge, SectionShape, TEXT_LINK_STYLES, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, WIDE_CONTENT_CAP, WIDE_CONTENT_WIDTH, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, brandNameAttributes, brandNameLength, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, columnSelector, columnWordOf, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, contentCapOf, contentWidthOf, cssString, decomposeCssFunctions, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designPreloaderOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, edgeFitsShape, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, footerMixClasses, footerMixWordsOf, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, graphemes, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerInkOf, headerStaysAtTop, headingHref, inSrgbGamut, inkOnGround, isArriveId, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFirstVisit, isFontWeightRange, isFooterMixClass, isListMixClass, isMoveId, isPreloaderKind, isRetiredFlavorId, isScrubId, isSectionDesignClass, languageOf, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, listMixClasses, listMixWordsOf, localeDirection, matchFontWeight, menuButtonAttributes, menuButtonOf, menuButtonProps, menuDialogAttributes, menuDialogProps, menuFormOf, menuFormSwitchesOnPhone, menuHoverOf, menuPhoneOf, menuRevealOf, missingDesignRows, missingFontRoles, motionCurve, motionLanguageForPlan, motionLanguageOf, motionWordTier, navBarAttributes, nodeDesignClasses, nodeIsRtl, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageColumn, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, phoneBarControls, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planPreloader, planSectionShape, planSwissMigration, popAllowed, preTintAccentGrounds, preloaderExitMotion, preloaderExitOf, preloaderGraphemes, preloaderLeaveAt, preloaderOfChoices, preloaderPercent, preloaderWords, presetChoices, presetModes, presetMotionLanguage, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveMotionLanguageChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, schemeOfClasses, schemeUnderBar, scriptsForLocale, scrubOfChoices, sectionDesignClasses, sectionEdgeClass, sectionEdgeOf, sectionIsRtl, sectionShapeOf, setColorScheme, setSectionEdge, setSectionShape, siteColumnOf, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeFieldError, writeOwnedTrait };
|
|
26841
|
+
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, ARRIVE_IDS, AdoptOutcome, AdoptSkipReason, BACKDROP_FUNCTIONS, BAR_ATTRIBUTE, BAR_CROWDED_AT, BAR_NAME_ATTRIBUTE, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BRAND_CROWDED_NAME_LONGER_AT, BRAND_CROWDED_NAME_LONGEST_AT, BRAND_CROWDED_NAME_LONG_AT, BRAND_CROWDED_WORD_LONGER_AT, BRAND_CROWDED_WORD_LONGEST_AT, BRAND_CROWDED_WORD_LONG_AT, BRAND_NAME_ATTRIBUTE, BRAND_NAME_LONGER_AT, BRAND_NAME_LONGEST_AT, BRAND_NAME_LONG_AT, BRAND_ROLE, BRAND_WORD_LONGER_AT, BRAND_WORD_LONGEST_AT, BRAND_WORD_LONG_AT, BUTTON_VARIANT_TO_STYLE, BarRoom, BrandNameLength, CANVAS_LINK_ATTRIBUTE, CARD_EDGES, CARD_LINK_CLASS, CASELESS_LANGUAGES, CASELESS_SCRIPT_OVERRIDES, CLOSE_WORDS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COLUMN_ATTRIBUTE, COLUMN_IDS, COLUMN_SETTING, COMPOSED_HEADER, CONTENT_CAP_TOKEN, CONTENT_WIDTH_TOKEN, CONTRAST_AUDIT_MEMORY, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DEFAULT_GROUND_INKS, DEFAULT_MENU_LOOK, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FIELD_INVALID_CLASS, FILTER_FUNCTIONS, FLAVOR_SPEC_VERSION, FLOATING_BACKDROPS, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FOOTER_CLASS_PREFIX, FOOTER_MIRRORED_CLASS, FOOTER_MIX_PROP, FieldClass, FontUploadError, GLASS_GROUNDS, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, GROUND_INK_MIN, HEADER_AT_REST_SELECTOR, HEADER_GIVES_BACK_SELECTOR, HEADER_HEIGHT_VAR, HEADER_OPEN_MENU_SELECTOR, HEADER_SCROLLED_ATTRIBUTE, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderGround, HeaderInk, HeaderTrait, INHERITED_TEXT, LEAVE_IDS, LEAVE_SHARE, LINK_WEIGHT_STEP, LIST_CLASS_PREFIX, LIST_MIRRORED_CLASS, LIST_MIX_PROP, LinkType, LocaleDirection, MARK_STYLES, MAX_FONT_FILE_BYTES, MENU_ATTRIBUTES, MENU_PHONE_MAX_WIDTH, MIRRORED_EDGES, MOOD_IDS, MOOD_LABELS, MOTION_LANGUAGE_PRESET_IDS, MOVE_IDS, MenuAttribute, MenuButtonKind, MenuForm, MenuHover, MenuPhoneForm, MenuReveal, MenuTrait, MotionWordTier, NAV_ROLE, NEW_COLUMN, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_GROUND_CLAUSES, OPENING_FOLLOWER_ROLE, OPENING_MEDIA_ATTRIBUTE, OPENING_SETTING, OVER_GROUNDS, OpeningMediaKind, OpticalSize, OwnedTraitLink, PALETTE_PRESETS, PHONE_BAR_CONTROL_ROLES, PRELOADER_CAP_MS, PRELOADER_ENTER_EASE, PRELOADER_EXIT_EASE, PRELOADER_EXIT_IDS, PRELOADER_EXIT_MAX_MS, PRELOADER_IDS, PRELOADER_LETTERS_MAX, PRELOADER_LEVELS, PRELOADER_MIN_SHOW_MS, PRE_COLUMN, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, PreloaderExit, PreloaderKind, QUIET_LEVELS, QUIET_MOVE, REDUCED_DESIGN_MOTION, REDUCED_ENTRANCE_MAX_MS, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, RTL_LANGUAGES, SCHEME_INK, SCROLL_IDS, SCRUB_IDS, SCRUB_LEVELS, SEAM_CLASS_PREFIX, SEAM_MIRRORED_CLASS, SECTION_CARD_CLASS, SECTION_CARD_STYLES, SECTION_CARD_SUPERSEDED, SECTION_EDGES, SECTION_EDGE_TRAIT, SECTION_EDGE_TYPES, SECTION_FULL_STYLES, SECTION_SHAPE_TRAIT, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_MOTION_LANGUAGE, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, SPRING_CURVE_TOKEN, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SUPERSEDED_TOKEN_VALUES, SWISS_FLAVOR, ScrubId, SectionEdge, SectionShape, TEXT_LINK_STYLES, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, WIDE_CONTENT_CAP, WIDE_CONTENT_WIDTH, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, brandNameAttributes, brandNameLength, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, closeWord, colorSchemeClass, colorSchemeOf, colourTabChecks, columnSelector, columnWordOf, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, contentCapOf, contentWidthOf, cssString, decomposeCssFunctions, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designPreloaderOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, edgeFitsShape, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, floatingGroundFindings, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, footerMixClasses, footerMixWordsOf, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, graphemes, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerFirm, headerGivesBack, headerGroundIsGlass, headerGroundIsOver, headerGroundOf, headerInkOf, headerStaysAtTop, headingHref, inSrgbGamut, inkOnGround, isArriveId, isCaselessLocale, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFirstVisit, isFontWeightRange, isFooterMixClass, isListMixClass, isMoveId, isPreloaderKind, isRetiredFlavorId, isScrubId, isSectionDesignClass, languageOf, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, listMixClasses, listMixWordsOf, localeDirection, matchFontWeight, menuButtonAttributes, menuButtonOf, menuButtonProps, menuDialogAttributes, menuDialogProps, menuFormOf, menuFormSwitchesOnPhone, menuHoverOf, menuPhoneOf, menuRevealOf, missingDesignRows, missingFontRoles, motionCurve, motionLanguageForPlan, motionLanguageOf, motionWordTier, navBarAttributes, nodeDesignClasses, nodeIsRtl, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, openingMediaAttributes, openingMediaOf, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageColumn, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, phoneBarControls, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planPreloader, planSectionShape, planSwissMigration, popAllowed, preTintAccentGrounds, preloaderExitMotion, preloaderExitOf, preloaderGraphemes, preloaderLeaveAt, preloaderOfChoices, preloaderPercent, preloaderWords, presetChoices, presetModes, presetMotionLanguage, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveMotionLanguageChoices, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, schemeOfClasses, schemeTokenResolver, schemeUnderBar, scriptsForLocale, scrubOfChoices, sectionDesignClasses, sectionEdgeClass, sectionEdgeOf, sectionIsRtl, sectionShapeOf, setColorScheme, setSectionEdge, setSectionShape, siteColumnOf, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeFieldError, writeOwnedTrait };
|
|
26313
26842
|
//# sourceMappingURL=vectoriox-iox-ui-design-core.mjs.map
|