mlola-ui 1.0.4 → 1.0.5
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/package.json +1 -1
- package/registry/assets.json +44 -44
- package/registry/index.json +56 -50
- package/registry/source/packages/components/_internal/anchor.ts +3 -52
- package/registry/source/packages/components/_internal/dialog.ts +25 -1
- package/registry/source/packages/components/calendar/calendar.tsx +2 -1
- package/registry/source/packages/components/kbd/kbd.tsx +3 -1
- package/registry/source/packages/components/resizable/resizable.tsx +2 -1
- package/registry/source/packages/components/tag-input/tag-input.tsx +1 -0
- package/registry/source-manifest.json +6 -6
- package/src/assets.js +7 -2
package/package.json
CHANGED
package/registry/assets.json
CHANGED
|
@@ -147,14 +147,14 @@
|
|
|
147
147
|
{
|
|
148
148
|
"path": "checklist.svg",
|
|
149
149
|
"role": "source",
|
|
150
|
-
"bytes":
|
|
151
|
-
"integrity": "sha256-
|
|
150
|
+
"bytes": 5044,
|
|
151
|
+
"integrity": "sha256-bdyD2CXZuKZWwhL0Zzs+Xatuy9F0TjjMYOJVn3WZ7DQ="
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
"path": "checklist.tsx",
|
|
155
155
|
"role": "react",
|
|
156
|
-
"bytes":
|
|
157
|
-
"integrity": "sha256-
|
|
156
|
+
"bytes": 6023,
|
|
157
|
+
"integrity": "sha256-tG4P4LCm8chgVqgbYaDBu9Xxm6LmlRz6A5iXy8uuo1M="
|
|
158
158
|
}
|
|
159
159
|
]
|
|
160
160
|
},
|
|
@@ -225,14 +225,14 @@
|
|
|
225
225
|
{
|
|
226
226
|
"path": "data-vault.svg",
|
|
227
227
|
"role": "source",
|
|
228
|
-
"bytes":
|
|
229
|
-
"integrity": "sha256-
|
|
228
|
+
"bytes": 5200,
|
|
229
|
+
"integrity": "sha256-rdMlcPjBjBeo5MMnfHJz2DH5CYxSdMJyG/5flQNaQVc="
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"path": "data-vault.tsx",
|
|
233
233
|
"role": "react",
|
|
234
|
-
"bytes":
|
|
235
|
-
"integrity": "sha256-
|
|
234
|
+
"bytes": 6172,
|
|
235
|
+
"integrity": "sha256-5S8ZG/nh6ZtB5oaCgREFsZzWC12+vdxP6IN2Ix5e/uM="
|
|
236
236
|
}
|
|
237
237
|
]
|
|
238
238
|
},
|
|
@@ -459,14 +459,14 @@
|
|
|
459
459
|
{
|
|
460
460
|
"path": "inventory.svg",
|
|
461
461
|
"role": "source",
|
|
462
|
-
"bytes":
|
|
463
|
-
"integrity": "sha256-
|
|
462
|
+
"bytes": 4558,
|
|
463
|
+
"integrity": "sha256-lpe+xybY6if62AE7jyrc531zeQuQiZWvB6bZ8LNSAuE="
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
466
|
"path": "inventory.tsx",
|
|
467
467
|
"role": "react",
|
|
468
|
-
"bytes":
|
|
469
|
-
"integrity": "sha256-
|
|
468
|
+
"bytes": 5532,
|
|
469
|
+
"integrity": "sha256-si0HLYrwRJ07wZH2lNuvUhxhhNGFtihT8S21fClz4sY="
|
|
470
470
|
}
|
|
471
471
|
]
|
|
472
472
|
},
|
|
@@ -511,14 +511,14 @@
|
|
|
511
511
|
{
|
|
512
512
|
"path": "maintenance.svg",
|
|
513
513
|
"role": "source",
|
|
514
|
-
"bytes":
|
|
515
|
-
"integrity": "sha256-
|
|
514
|
+
"bytes": 3627,
|
|
515
|
+
"integrity": "sha256-nFrhbuQoe6Ys7h5QrNLajgk4NHtZvOBmXxQpjJZjXaQ="
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
518
|
"path": "maintenance.tsx",
|
|
519
519
|
"role": "react",
|
|
520
|
-
"bytes":
|
|
521
|
-
"integrity": "sha256-
|
|
520
|
+
"bytes": 4555,
|
|
521
|
+
"integrity": "sha256-wvuHnBjqhATZCt3dfHYBZ3thY57Tsm7UWoCB3z7MMjc="
|
|
522
522
|
}
|
|
523
523
|
]
|
|
524
524
|
},
|
|
@@ -693,14 +693,14 @@
|
|
|
693
693
|
{
|
|
694
694
|
"path": "roadmap.svg",
|
|
695
695
|
"role": "source",
|
|
696
|
-
"bytes":
|
|
697
|
-
"integrity": "sha256-
|
|
696
|
+
"bytes": 6403,
|
|
697
|
+
"integrity": "sha256-VGmXHxFV6dZH7naewqSFjNXW4aL9TXo313mIkhpRRIY="
|
|
698
698
|
},
|
|
699
699
|
{
|
|
700
700
|
"path": "roadmap.tsx",
|
|
701
701
|
"role": "react",
|
|
702
|
-
"bytes":
|
|
703
|
-
"integrity": "sha256-
|
|
702
|
+
"bytes": 7400,
|
|
703
|
+
"integrity": "sha256-PyS0RKSie4ScWYh84GMkOH1uM4NVIeaPsqN6G510IEI="
|
|
704
704
|
}
|
|
705
705
|
]
|
|
706
706
|
},
|
|
@@ -745,14 +745,14 @@
|
|
|
745
745
|
{
|
|
746
746
|
"path": "secure.svg",
|
|
747
747
|
"role": "source",
|
|
748
|
-
"bytes":
|
|
749
|
-
"integrity": "sha256-
|
|
748
|
+
"bytes": 4513,
|
|
749
|
+
"integrity": "sha256-DfQCBeSjDeXMV2/aj8gbyZ96qkt+xbKAbStNQ/WTuog="
|
|
750
750
|
},
|
|
751
751
|
{
|
|
752
752
|
"path": "secure.tsx",
|
|
753
753
|
"role": "react",
|
|
754
|
-
"bytes":
|
|
755
|
-
"integrity": "sha256-
|
|
754
|
+
"bytes": 5463,
|
|
755
|
+
"integrity": "sha256-wTJ37xnH/YYorXYm7Kw0LmKSdjkB3WRzE6N2HtRl8Ho="
|
|
756
756
|
}
|
|
757
757
|
]
|
|
758
758
|
},
|
|
@@ -771,14 +771,14 @@
|
|
|
771
771
|
{
|
|
772
772
|
"path": "settings.svg",
|
|
773
773
|
"role": "source",
|
|
774
|
-
"bytes":
|
|
775
|
-
"integrity": "sha256-
|
|
774
|
+
"bytes": 6307,
|
|
775
|
+
"integrity": "sha256-97sH/xeELOZb38vXhpSWwZTnbps93GOJQz8/qD+5oKI="
|
|
776
776
|
},
|
|
777
777
|
{
|
|
778
778
|
"path": "settings.tsx",
|
|
779
779
|
"role": "react",
|
|
780
|
-
"bytes":
|
|
781
|
-
"integrity": "sha256-
|
|
780
|
+
"bytes": 7362,
|
|
781
|
+
"integrity": "sha256-8rtUZ+Txob/uwVWyzvwiYHNSVhHSQxmk2Ng3j1Jt01g="
|
|
782
782
|
}
|
|
783
783
|
]
|
|
784
784
|
},
|
|
@@ -797,14 +797,14 @@
|
|
|
797
797
|
{
|
|
798
798
|
"path": "storage.svg",
|
|
799
799
|
"role": "source",
|
|
800
|
-
"bytes":
|
|
801
|
-
"integrity": "sha256-
|
|
800
|
+
"bytes": 3938,
|
|
801
|
+
"integrity": "sha256-iwCyd/bbuzEZd4UScH6dXyDSh/TLaBBt7c1lT48iVO4="
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
804
|
"path": "storage.tsx",
|
|
805
805
|
"role": "react",
|
|
806
|
-
"bytes":
|
|
807
|
-
"integrity": "sha256-
|
|
806
|
+
"bytes": 4817,
|
|
807
|
+
"integrity": "sha256-ml1PaCIZ+snHq7Z1RTyfZLUjBebwiZb/6uXpI/yNe3s="
|
|
808
808
|
}
|
|
809
809
|
]
|
|
810
810
|
},
|
|
@@ -823,14 +823,14 @@
|
|
|
823
823
|
{
|
|
824
824
|
"path": "success.svg",
|
|
825
825
|
"role": "source",
|
|
826
|
-
"bytes":
|
|
827
|
-
"integrity": "sha256-
|
|
826
|
+
"bytes": 4528,
|
|
827
|
+
"integrity": "sha256-sxMt1j1/7y8xPAOEAbmri/N0phPItxSekNnoqPW9QiA="
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
"path": "success.tsx",
|
|
831
831
|
"role": "react",
|
|
832
|
-
"bytes":
|
|
833
|
-
"integrity": "sha256-
|
|
832
|
+
"bytes": 5470,
|
|
833
|
+
"integrity": "sha256-yb06ZhflQxikrdfEtAlpTu4lZofiA0GMwD2krVmEH0U="
|
|
834
834
|
}
|
|
835
835
|
]
|
|
836
836
|
},
|
|
@@ -849,14 +849,14 @@
|
|
|
849
849
|
{
|
|
850
850
|
"path": "terminal.svg",
|
|
851
851
|
"role": "source",
|
|
852
|
-
"bytes":
|
|
853
|
-
"integrity": "sha256-
|
|
852
|
+
"bytes": 3383,
|
|
853
|
+
"integrity": "sha256-eWpshizfLD+m6shcHKYORhpPAyPmK1C4Shbj6NJiC8s="
|
|
854
854
|
},
|
|
855
855
|
{
|
|
856
856
|
"path": "terminal.tsx",
|
|
857
857
|
"role": "react",
|
|
858
|
-
"bytes":
|
|
859
|
-
"integrity": "sha256-
|
|
858
|
+
"bytes": 4292,
|
|
859
|
+
"integrity": "sha256-a26T4wq/nOrJiGDWPQ8a6JI6PP3++fimoOClHI1kP7A="
|
|
860
860
|
}
|
|
861
861
|
]
|
|
862
862
|
},
|
|
@@ -927,14 +927,14 @@
|
|
|
927
927
|
{
|
|
928
928
|
"path": "workflow.svg",
|
|
929
929
|
"role": "source",
|
|
930
|
-
"bytes":
|
|
931
|
-
"integrity": "sha256-
|
|
930
|
+
"bytes": 5424,
|
|
931
|
+
"integrity": "sha256-j/eKrdIOuoHFx1xgSpzCWn/itVKkdLM5hqXHcnedI9U="
|
|
932
932
|
},
|
|
933
933
|
{
|
|
934
934
|
"path": "workflow.tsx",
|
|
935
935
|
"role": "react",
|
|
936
|
-
"bytes":
|
|
937
|
-
"integrity": "sha256-
|
|
936
|
+
"bytes": 6417,
|
|
937
|
+
"integrity": "sha256-nO1BPNekc6T1fTYduDI9Z4izGEM7UI7WBgR48/iK390="
|
|
938
938
|
}
|
|
939
939
|
]
|
|
940
940
|
},
|
package/registry/index.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "./schema/registry-index.schema.json",
|
|
3
3
|
"schemaVersion": 2,
|
|
4
4
|
"name": "mlola-ui",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.5",
|
|
6
6
|
"homepage": "https://ui.mlola.com",
|
|
7
7
|
"themeContract": {
|
|
8
8
|
"attribute": "data-theme",
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
},
|
|
180
180
|
"registryDependencies": [],
|
|
181
181
|
"engineDependencies": {
|
|
182
|
-
"@mlola-ui/behavior": "^1.0.
|
|
183
|
-
"@mlola-ui/icons": "^1.0.
|
|
182
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
183
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
184
184
|
},
|
|
185
185
|
"files": [
|
|
186
186
|
{
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
},
|
|
237
237
|
"registryDependencies": [],
|
|
238
238
|
"engineDependencies": {
|
|
239
|
-
"@mlola-ui/icons": "^1.0.
|
|
239
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
240
240
|
},
|
|
241
241
|
"files": [
|
|
242
242
|
{
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
},
|
|
353
353
|
"registryDependencies": [],
|
|
354
354
|
"engineDependencies": {
|
|
355
|
-
"@mlola-ui/icons": "^1.0.
|
|
355
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
356
356
|
},
|
|
357
357
|
"files": [
|
|
358
358
|
{
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
},
|
|
402
402
|
"registryDependencies": [],
|
|
403
403
|
"engineDependencies": {
|
|
404
|
-
"@mlola-ui/icons": "^1.0.
|
|
404
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
405
405
|
},
|
|
406
406
|
"files": [
|
|
407
407
|
{
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
},
|
|
464
464
|
"registryDependencies": [],
|
|
465
465
|
"engineDependencies": {
|
|
466
|
-
"@mlola-ui/motion": "^1.0.
|
|
466
|
+
"@mlola-ui/motion": "^1.0.5"
|
|
467
467
|
},
|
|
468
468
|
"files": [
|
|
469
469
|
{
|
|
@@ -567,8 +567,8 @@
|
|
|
567
567
|
},
|
|
568
568
|
"registryDependencies": [],
|
|
569
569
|
"engineDependencies": {
|
|
570
|
-
"@mlola-ui/behavior": "^1.0.
|
|
571
|
-
"@mlola-ui/icons": "^1.0.
|
|
570
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
571
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
572
572
|
},
|
|
573
573
|
"files": [
|
|
574
574
|
{
|
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
},
|
|
619
619
|
"registryDependencies": [],
|
|
620
620
|
"engineDependencies": {
|
|
621
|
-
"@mlola-ui/icons": "^1.0.
|
|
621
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
622
622
|
},
|
|
623
623
|
"files": [
|
|
624
624
|
{
|
|
@@ -670,7 +670,7 @@
|
|
|
670
670
|
"modal"
|
|
671
671
|
],
|
|
672
672
|
"engineDependencies": {
|
|
673
|
-
"@mlola-ui/icons": "^1.0.
|
|
673
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
674
674
|
},
|
|
675
675
|
"files": [
|
|
676
676
|
{
|
|
@@ -732,8 +732,8 @@
|
|
|
732
732
|
},
|
|
733
733
|
"registryDependencies": [],
|
|
734
734
|
"engineDependencies": {
|
|
735
|
-
"@mlola-ui/behavior": "^1.0.
|
|
736
|
-
"@mlola-ui/icons": "^1.0.
|
|
735
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
736
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
737
737
|
},
|
|
738
738
|
"files": [
|
|
739
739
|
{
|
|
@@ -784,7 +784,7 @@
|
|
|
784
784
|
"input"
|
|
785
785
|
],
|
|
786
786
|
"engineDependencies": {
|
|
787
|
-
"@mlola-ui/icons": "^1.0.
|
|
787
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
788
788
|
},
|
|
789
789
|
"files": [
|
|
790
790
|
{
|
|
@@ -937,7 +937,7 @@
|
|
|
937
937
|
"path": "packages/components/kbd/kbd.tsx",
|
|
938
938
|
"target": "{{aliases.components}}/kbd.tsx",
|
|
939
939
|
"type": "registry:ui",
|
|
940
|
-
"integrity": "sha256-
|
|
940
|
+
"integrity": "sha256-e8EO2Gw6JiUyrU0YcEZOaQNMel1pe/EcJrxwwgd1Ggk="
|
|
941
941
|
}
|
|
942
942
|
],
|
|
943
943
|
"themeContract": {
|
|
@@ -980,15 +980,15 @@
|
|
|
980
980
|
},
|
|
981
981
|
"registryDependencies": [],
|
|
982
982
|
"engineDependencies": {
|
|
983
|
-
"@mlola-ui/behavior": "^1.0.
|
|
984
|
-
"@mlola-ui/icons": "^1.0.
|
|
983
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
984
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
985
985
|
},
|
|
986
986
|
"files": [
|
|
987
987
|
{
|
|
988
988
|
"path": "packages/components/_internal/dialog.ts",
|
|
989
989
|
"target": "{{aliases.components}}/_internal/dialog.ts",
|
|
990
990
|
"type": "registry:ui",
|
|
991
|
-
"integrity": "sha256-
|
|
991
|
+
"integrity": "sha256-796y3oNOVWarLvICTdi+d0/2axqSrzLVJiyBeh9X7bU="
|
|
992
992
|
},
|
|
993
993
|
{
|
|
994
994
|
"path": "packages/components/_internal/react.ts",
|
|
@@ -1086,7 +1086,7 @@
|
|
|
1086
1086
|
},
|
|
1087
1087
|
"registryDependencies": [],
|
|
1088
1088
|
"engineDependencies": {
|
|
1089
|
-
"@mlola-ui/icons": "^1.0.
|
|
1089
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
1090
1090
|
},
|
|
1091
1091
|
"files": [
|
|
1092
1092
|
{
|
|
@@ -1133,13 +1133,15 @@
|
|
|
1133
1133
|
"isDefault": false
|
|
1134
1134
|
},
|
|
1135
1135
|
"registryDependencies": [],
|
|
1136
|
-
"engineDependencies": {
|
|
1136
|
+
"engineDependencies": {
|
|
1137
|
+
"@mlola-ui/behavior": "^1.0.5"
|
|
1138
|
+
},
|
|
1137
1139
|
"files": [
|
|
1138
1140
|
{
|
|
1139
1141
|
"path": "packages/components/_internal/anchor.ts",
|
|
1140
1142
|
"target": "{{aliases.components}}/_internal/anchor.ts",
|
|
1141
1143
|
"type": "registry:ui",
|
|
1142
|
-
"integrity": "sha256-
|
|
1144
|
+
"integrity": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc="
|
|
1143
1145
|
},
|
|
1144
1146
|
{
|
|
1145
1147
|
"path": "packages/components/_internal/floating.ts",
|
|
@@ -1356,7 +1358,7 @@
|
|
|
1356
1358
|
"path": "packages/components/resizable/resizable.tsx",
|
|
1357
1359
|
"target": "{{aliases.components}}/resizable.tsx",
|
|
1358
1360
|
"type": "registry:ui",
|
|
1359
|
-
"integrity": "sha256-
|
|
1361
|
+
"integrity": "sha256-Yxlq88qElhv2Q5DooPdriZkawRS0QWx08nd6ybz5oeY="
|
|
1360
1362
|
}
|
|
1361
1363
|
],
|
|
1362
1364
|
"themeContract": {
|
|
@@ -1394,7 +1396,7 @@
|
|
|
1394
1396
|
},
|
|
1395
1397
|
"registryDependencies": [],
|
|
1396
1398
|
"engineDependencies": {
|
|
1397
|
-
"@mlola-ui/behavior": "^1.0.
|
|
1399
|
+
"@mlola-ui/behavior": "^1.0.5"
|
|
1398
1400
|
},
|
|
1399
1401
|
"files": [
|
|
1400
1402
|
{
|
|
@@ -1448,15 +1450,15 @@
|
|
|
1448
1450
|
},
|
|
1449
1451
|
"registryDependencies": [],
|
|
1450
1452
|
"engineDependencies": {
|
|
1451
|
-
"@mlola-ui/behavior": "^1.0.
|
|
1452
|
-
"@mlola-ui/icons": "^1.0.
|
|
1453
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
1454
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
1453
1455
|
},
|
|
1454
1456
|
"files": [
|
|
1455
1457
|
{
|
|
1456
1458
|
"path": "packages/components/_internal/anchor.ts",
|
|
1457
1459
|
"target": "{{aliases.components}}/_internal/anchor.ts",
|
|
1458
1460
|
"type": "registry:ui",
|
|
1459
|
-
"integrity": "sha256-
|
|
1461
|
+
"integrity": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc="
|
|
1460
1462
|
},
|
|
1461
1463
|
{
|
|
1462
1464
|
"path": "packages/components/_internal/floating.ts",
|
|
@@ -1520,15 +1522,15 @@
|
|
|
1520
1522
|
},
|
|
1521
1523
|
"registryDependencies": [],
|
|
1522
1524
|
"engineDependencies": {
|
|
1523
|
-
"@mlola-ui/behavior": "^1.0.
|
|
1524
|
-
"@mlola-ui/icons": "^1.0.
|
|
1525
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
1526
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
1525
1527
|
},
|
|
1526
1528
|
"files": [
|
|
1527
1529
|
{
|
|
1528
1530
|
"path": "packages/components/_internal/dialog.ts",
|
|
1529
1531
|
"target": "{{aliases.components}}/_internal/dialog.ts",
|
|
1530
1532
|
"type": "registry:ui",
|
|
1531
|
-
"integrity": "sha256-
|
|
1533
|
+
"integrity": "sha256-796y3oNOVWarLvICTdi+d0/2axqSrzLVJiyBeh9X7bU="
|
|
1532
1534
|
},
|
|
1533
1535
|
{
|
|
1534
1536
|
"path": "packages/components/_internal/react.ts",
|
|
@@ -1628,7 +1630,7 @@
|
|
|
1628
1630
|
},
|
|
1629
1631
|
"registryDependencies": [],
|
|
1630
1632
|
"engineDependencies": {
|
|
1631
|
-
"@mlola-ui/behavior": "^1.0.
|
|
1633
|
+
"@mlola-ui/behavior": "^1.0.5"
|
|
1632
1634
|
},
|
|
1633
1635
|
"files": [
|
|
1634
1636
|
{
|
|
@@ -1735,7 +1737,7 @@
|
|
|
1735
1737
|
},
|
|
1736
1738
|
"registryDependencies": [],
|
|
1737
1739
|
"engineDependencies": {
|
|
1738
|
-
"@mlola-ui/behavior": "^1.0.
|
|
1740
|
+
"@mlola-ui/behavior": "^1.0.5"
|
|
1739
1741
|
},
|
|
1740
1742
|
"files": [
|
|
1741
1743
|
{
|
|
@@ -1837,7 +1839,7 @@
|
|
|
1837
1839
|
},
|
|
1838
1840
|
"registryDependencies": [],
|
|
1839
1841
|
"engineDependencies": {
|
|
1840
|
-
"@mlola-ui/icons": "^1.0.
|
|
1842
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
1841
1843
|
},
|
|
1842
1844
|
"files": [
|
|
1843
1845
|
{
|
|
@@ -1893,7 +1895,7 @@
|
|
|
1893
1895
|
},
|
|
1894
1896
|
"registryDependencies": [],
|
|
1895
1897
|
"engineDependencies": {
|
|
1896
|
-
"@mlola-ui/icons": "^1.0.
|
|
1898
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
1897
1899
|
},
|
|
1898
1900
|
"files": [
|
|
1899
1901
|
{
|
|
@@ -2102,7 +2104,7 @@
|
|
|
2102
2104
|
},
|
|
2103
2105
|
"registryDependencies": [],
|
|
2104
2106
|
"engineDependencies": {
|
|
2105
|
-
"@mlola-ui/icons": "^1.0.
|
|
2107
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2106
2108
|
},
|
|
2107
2109
|
"files": [
|
|
2108
2110
|
{
|
|
@@ -2115,7 +2117,7 @@
|
|
|
2115
2117
|
"path": "packages/components/calendar/calendar.tsx",
|
|
2116
2118
|
"target": "{{aliases.components}}/calendar.tsx",
|
|
2117
2119
|
"type": "registry:ui",
|
|
2118
|
-
"integrity": "sha256-
|
|
2120
|
+
"integrity": "sha256-rWiS4YAueZfVoo6j5Fi3uN7A+yApe5U6HMm1woTVjys="
|
|
2119
2121
|
},
|
|
2120
2122
|
{
|
|
2121
2123
|
"path": "packages/components/calendar/dates.ts",
|
|
@@ -2161,7 +2163,7 @@
|
|
|
2161
2163
|
"popover"
|
|
2162
2164
|
],
|
|
2163
2165
|
"engineDependencies": {
|
|
2164
|
-
"@mlola-ui/icons": "^1.0.
|
|
2166
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2165
2167
|
},
|
|
2166
2168
|
"files": [
|
|
2167
2169
|
{
|
|
@@ -2219,7 +2221,7 @@
|
|
|
2219
2221
|
"popover"
|
|
2220
2222
|
],
|
|
2221
2223
|
"engineDependencies": {
|
|
2222
|
-
"@mlola-ui/icons": "^1.0.
|
|
2224
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2223
2225
|
},
|
|
2224
2226
|
"files": [
|
|
2225
2227
|
{
|
|
@@ -2383,7 +2385,7 @@
|
|
|
2383
2385
|
"input"
|
|
2384
2386
|
],
|
|
2385
2387
|
"engineDependencies": {
|
|
2386
|
-
"@mlola-ui/icons": "^1.0.
|
|
2388
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2387
2389
|
},
|
|
2388
2390
|
"files": [
|
|
2389
2391
|
{
|
|
@@ -2448,7 +2450,7 @@
|
|
|
2448
2450
|
"input"
|
|
2449
2451
|
],
|
|
2450
2452
|
"engineDependencies": {
|
|
2451
|
-
"@mlola-ui/icons": "^1.0.
|
|
2453
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2452
2454
|
},
|
|
2453
2455
|
"files": [
|
|
2454
2456
|
{
|
|
@@ -2461,7 +2463,7 @@
|
|
|
2461
2463
|
"path": "packages/components/tag-input/tag-input.tsx",
|
|
2462
2464
|
"target": "{{aliases.components}}/tag-input.tsx",
|
|
2463
2465
|
"type": "registry:ui",
|
|
2464
|
-
"integrity": "sha256-
|
|
2466
|
+
"integrity": "sha256-lc4ofz1/lUnb7B/GlFElVKXLbPwtJFAjE5vWwAY99fA="
|
|
2465
2467
|
}
|
|
2466
2468
|
],
|
|
2467
2469
|
"themeContract": {
|
|
@@ -2500,7 +2502,7 @@
|
|
|
2500
2502
|
"input"
|
|
2501
2503
|
],
|
|
2502
2504
|
"engineDependencies": {
|
|
2503
|
-
"@mlola-ui/icons": "^1.0.
|
|
2505
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2504
2506
|
},
|
|
2505
2507
|
"files": [
|
|
2506
2508
|
{
|
|
@@ -2560,7 +2562,7 @@
|
|
|
2560
2562
|
"popover"
|
|
2561
2563
|
],
|
|
2562
2564
|
"engineDependencies": {
|
|
2563
|
-
"@mlola-ui/icons": "^1.0.
|
|
2565
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2564
2566
|
},
|
|
2565
2567
|
"files": [
|
|
2566
2568
|
{
|
|
@@ -2616,7 +2618,7 @@
|
|
|
2616
2618
|
},
|
|
2617
2619
|
"registryDependencies": [],
|
|
2618
2620
|
"engineDependencies": {
|
|
2619
|
-
"@mlola-ui/icons": "^1.0.
|
|
2621
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2620
2622
|
},
|
|
2621
2623
|
"files": [
|
|
2622
2624
|
{
|
|
@@ -2719,14 +2721,15 @@
|
|
|
2719
2721
|
},
|
|
2720
2722
|
"registryDependencies": [],
|
|
2721
2723
|
"engineDependencies": {
|
|
2722
|
-
"@mlola-ui/
|
|
2724
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
2725
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2723
2726
|
},
|
|
2724
2727
|
"files": [
|
|
2725
2728
|
{
|
|
2726
2729
|
"path": "packages/components/_internal/anchor.ts",
|
|
2727
2730
|
"target": "{{aliases.components}}/_internal/anchor.ts",
|
|
2728
2731
|
"type": "registry:ui",
|
|
2729
|
-
"integrity": "sha256-
|
|
2732
|
+
"integrity": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc="
|
|
2730
2733
|
},
|
|
2731
2734
|
{
|
|
2732
2735
|
"path": "packages/components/_internal/floating.ts",
|
|
@@ -2779,13 +2782,15 @@
|
|
|
2779
2782
|
"isDefault": false
|
|
2780
2783
|
},
|
|
2781
2784
|
"registryDependencies": [],
|
|
2782
|
-
"engineDependencies": {
|
|
2785
|
+
"engineDependencies": {
|
|
2786
|
+
"@mlola-ui/behavior": "^1.0.5"
|
|
2787
|
+
},
|
|
2783
2788
|
"files": [
|
|
2784
2789
|
{
|
|
2785
2790
|
"path": "packages/components/_internal/anchor.ts",
|
|
2786
2791
|
"target": "{{aliases.components}}/_internal/anchor.ts",
|
|
2787
2792
|
"type": "registry:ui",
|
|
2788
|
-
"integrity": "sha256-
|
|
2793
|
+
"integrity": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc="
|
|
2789
2794
|
},
|
|
2790
2795
|
{
|
|
2791
2796
|
"path": "packages/components/_internal/floating.ts",
|
|
@@ -2840,14 +2845,15 @@
|
|
|
2840
2845
|
},
|
|
2841
2846
|
"registryDependencies": [],
|
|
2842
2847
|
"engineDependencies": {
|
|
2843
|
-
"@mlola-ui/
|
|
2848
|
+
"@mlola-ui/behavior": "^1.0.5",
|
|
2849
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2844
2850
|
},
|
|
2845
2851
|
"files": [
|
|
2846
2852
|
{
|
|
2847
2853
|
"path": "packages/components/_internal/anchor.ts",
|
|
2848
2854
|
"target": "{{aliases.components}}/_internal/anchor.ts",
|
|
2849
2855
|
"type": "registry:ui",
|
|
2850
|
-
"integrity": "sha256-
|
|
2856
|
+
"integrity": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc="
|
|
2851
2857
|
},
|
|
2852
2858
|
{
|
|
2853
2859
|
"path": "packages/components/_internal/floating.ts",
|
|
@@ -2905,7 +2911,7 @@
|
|
|
2905
2911
|
"sheet"
|
|
2906
2912
|
],
|
|
2907
2913
|
"engineDependencies": {
|
|
2908
|
-
"@mlola-ui/icons": "^1.0.
|
|
2914
|
+
"@mlola-ui/icons": "^1.0.5"
|
|
2909
2915
|
},
|
|
2910
2916
|
"files": [
|
|
2911
2917
|
{
|
|
@@ -1,54 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a floating layer goes next to its anchor
|
|
3
|
-
*
|
|
4
|
-
* along the edge to stay inside the viewport. No DOM, so it is testable.
|
|
2
|
+
* Where a floating layer goes next to its anchor. The math is shared with the
|
|
3
|
+
* framework-free runtime, so it lives in @mlola-ui/behavior/logic.
|
|
5
4
|
*/
|
|
6
|
-
export type
|
|
7
|
-
export type Align = "start" | "center" | "end";
|
|
8
|
-
|
|
9
|
-
export interface Rect {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface Placement {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
side: Side;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const OPPOSITE: Record<Side, Side> = { top: "bottom", bottom: "top", left: "right", right: "left" };
|
|
23
|
-
|
|
24
|
-
export function placeFloating(
|
|
25
|
-
anchor: Rect,
|
|
26
|
-
floating: { width: number; height: number },
|
|
27
|
-
viewport: { width: number; height: number },
|
|
28
|
-
{ side = "bottom", align = "center", offset = 8, padding = 8 }: { side?: Side; align?: Align; offset?: number; padding?: number } = {},
|
|
29
|
-
): Placement {
|
|
30
|
-
const room: Record<Side, number> = {
|
|
31
|
-
top: anchor.y - padding,
|
|
32
|
-
bottom: viewport.height - (anchor.y + anchor.height) - padding,
|
|
33
|
-
left: anchor.x - padding,
|
|
34
|
-
right: viewport.width - (anchor.x + anchor.width) - padding,
|
|
35
|
-
};
|
|
36
|
-
const needs = (candidate: Side) => (candidate === "top" || candidate === "bottom" ? floating.height : floating.width) + offset;
|
|
37
|
-
let chosen = side;
|
|
38
|
-
if (room[side] < needs(side) && room[OPPOSITE[side]] > room[side]) chosen = OPPOSITE[side];
|
|
39
|
-
|
|
40
|
-
const vertical = chosen === "top" || chosen === "bottom";
|
|
41
|
-
let x: number;
|
|
42
|
-
let y: number;
|
|
43
|
-
if (vertical) {
|
|
44
|
-
y = chosen === "bottom" ? anchor.y + anchor.height + offset : anchor.y - floating.height - offset;
|
|
45
|
-
x = align === "start" ? anchor.x : align === "end" ? anchor.x + anchor.width - floating.width : anchor.x + anchor.width / 2 - floating.width / 2;
|
|
46
|
-
} else {
|
|
47
|
-
x = chosen === "right" ? anchor.x + anchor.width + offset : anchor.x - floating.width - offset;
|
|
48
|
-
y = align === "start" ? anchor.y : align === "end" ? anchor.y + anchor.height - floating.height : anchor.y + anchor.height / 2 - floating.height / 2;
|
|
49
|
-
}
|
|
50
|
-
// Shift along the edge to stay on screen.
|
|
51
|
-
x = Math.min(Math.max(x, padding), Math.max(padding, viewport.width - floating.width - padding));
|
|
52
|
-
y = Math.min(Math.max(y, padding), Math.max(padding, viewport.height - floating.height - padding));
|
|
53
|
-
return { x: Math.round(x), y: Math.round(y), side: chosen };
|
|
54
|
-
}
|
|
5
|
+
export { placeFloating, type Align, type Placement, type Rect, type Side } from "@mlola-ui/behavior/logic";
|
|
@@ -44,6 +44,24 @@ function hideBackground(portal: HTMLElement) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// Safari does not focus a button it clicks, so when a dialog opens with
|
|
48
|
+
// nothing focused, focus returns on close to the control just pressed.
|
|
49
|
+
let lastPressed: HTMLElement | null = null;
|
|
50
|
+
let pressedAt = 0;
|
|
51
|
+
let tracking = false;
|
|
52
|
+
function trackPresses() {
|
|
53
|
+
if (tracking) return;
|
|
54
|
+
tracking = true;
|
|
55
|
+
document.addEventListener(
|
|
56
|
+
"pointerdown",
|
|
57
|
+
(event) => {
|
|
58
|
+
lastPressed = event.target instanceof Element ? event.target.closest<HTMLElement>(FOCUSABLE) : null;
|
|
59
|
+
pressedAt = performance.now();
|
|
60
|
+
},
|
|
61
|
+
true,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
47
65
|
export function useDialogLayer({
|
|
48
66
|
open,
|
|
49
67
|
onClose,
|
|
@@ -61,6 +79,7 @@ export function useDialogLayer({
|
|
|
61
79
|
closeRef.current = onClose;
|
|
62
80
|
|
|
63
81
|
React.useEffect(() => {
|
|
82
|
+
trackPresses();
|
|
64
83
|
const node = document.createElement("div");
|
|
65
84
|
node.setAttribute("data-ml-portal", "");
|
|
66
85
|
document.body.appendChild(node);
|
|
@@ -73,8 +92,13 @@ export function useDialogLayer({
|
|
|
73
92
|
|
|
74
93
|
React.useEffect(() => {
|
|
75
94
|
if (!open || !portal) return;
|
|
95
|
+
const active = document.activeElement;
|
|
76
96
|
restoreFocusRef.current =
|
|
77
|
-
|
|
97
|
+
active instanceof HTMLElement && active !== document.body
|
|
98
|
+
? active
|
|
99
|
+
: lastPressed?.isConnected && performance.now() - pressedAt < 2000
|
|
100
|
+
? lastPressed
|
|
101
|
+
: null;
|
|
78
102
|
const releaseScroll = lockScroll();
|
|
79
103
|
const restoreBackground = hideBackground(portal);
|
|
80
104
|
const focusPanel = () => {
|
|
@@ -257,7 +257,8 @@ export function Calendar(props: CalendarProps) {
|
|
|
257
257
|
))}
|
|
258
258
|
</div>
|
|
259
259
|
{monthGrid(first, weekStart).map((week) => (
|
|
260
|
-
|
|
260
|
+
// A week drawn only to keep months aligned has no day to read, so it is hidden whole.
|
|
261
|
+
<div key={week[0].date} role="row" className="ml-calendar-row" aria-hidden={(week.every(({ inMonth }) => !inMonth) && (!showOutsideDays || months > 1)) || undefined}>
|
|
261
262
|
{week.map(({ date, inMonth }) => {
|
|
262
263
|
if (!inMonth && (!showOutsideDays || months > 1)) return <span key={date} role="gridcell" className="ml-calendar-cell" aria-hidden="true" />;
|
|
263
264
|
const selected = isSelected(date);
|
|
@@ -43,12 +43,14 @@ export function Shortcut({ keys, className, ...props }: ShortcutProps) {
|
|
|
43
43
|
const shown = parts.map((key) => SYMBOLS[key]?.[apple ? "apple" : "other"] ?? key.toUpperCase());
|
|
44
44
|
const spoken = parts.map((key) => (apple ? SYMBOLS[key]?.spoken : SYMBOLS[key]?.spokenOther ?? SYMBOLS[key]?.spoken) ?? key.toUpperCase()).join(" ");
|
|
45
45
|
return (
|
|
46
|
-
<kbd className={cx("ml-shortcut", className)}
|
|
46
|
+
<kbd className={cx("ml-shortcut", className)} {...props}>
|
|
47
47
|
{shown.map((key, index) => (
|
|
48
48
|
<kbd key={index} className="ml-kbd" aria-hidden="true">
|
|
49
49
|
{key}
|
|
50
50
|
</kbd>
|
|
51
51
|
))}
|
|
52
|
+
{/* A kbd cannot carry a label, so the words are text a screen reader reads. */}
|
|
53
|
+
<span className="ml-visually-hidden">{spoken}</span>
|
|
52
54
|
</kbd>
|
|
53
55
|
);
|
|
54
56
|
}
|
|
@@ -134,7 +134,8 @@ export function Resizable({
|
|
|
134
134
|
aria-valuemin={collapsible ? 0 : min}
|
|
135
135
|
aria-valuemax={max}
|
|
136
136
|
aria-valuenow={Math.round(shown)}
|
|
137
|
-
|
|
137
|
+
// A separator has no expanded state: folded is its value at 0.
|
|
138
|
+
aria-valuetext={isFolded ? "Collapsed" : undefined}
|
|
138
139
|
className="ml-resizable-handle"
|
|
139
140
|
onPointerDown={(event) => {
|
|
140
141
|
dragging.current = true;
|
|
@@ -181,6 +181,7 @@ export const TagInput = React.forwardRef<HTMLInputElement, TagInputProps>(functi
|
|
|
181
181
|
ref={control}
|
|
182
182
|
className="ml-tag-input-control"
|
|
183
183
|
data-disabled={disabled || undefined}
|
|
184
|
+
aria-disabled={disabled || undefined}
|
|
184
185
|
data-invalid={message ? "" : undefined}
|
|
185
186
|
onMouseDown={(event) => {
|
|
186
187
|
// Clicking the field's empty space puts the caret in the input.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"packages/components/_internal/anchor.ts": "sha256-
|
|
3
|
-
"packages/components/_internal/dialog.ts": "sha256-
|
|
2
|
+
"packages/components/_internal/anchor.ts": "sha256-OPm/4Jf4UUo8IG+/4TAKpGDHtYpvxvGwyq3/RSZQIGc=",
|
|
3
|
+
"packages/components/_internal/dialog.ts": "sha256-796y3oNOVWarLvICTdi+d0/2axqSrzLVJiyBeh9X7bU=",
|
|
4
4
|
"packages/components/_internal/floating.ts": "sha256-+WxgC4CtAlSr2qA1EkoDTgto535XLIPsvtOfdOK6CHk=",
|
|
5
5
|
"packages/components/_internal/match.ts": "sha256-nKBpKWeow5ubAHUhOW8yOjlrKs0lqYdjbaYYfE8VoII=",
|
|
6
6
|
"packages/components/_internal/react.ts": "sha256-SH63/haiB4Q93uFjMIMe5xZbaxENu3VI+GcidV8HELM=",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"packages/components/badge/badge.tsx": "sha256-flEH8S2jZ/64n3Y/ROhC9+9rvF7wXaN0xLcMMwqNOVQ=",
|
|
15
15
|
"packages/components/breadcrumb/breadcrumb.tsx": "sha256-Mt9mvmwwDgdp5/+mj5byIrh8+hicsp7R6UcvUlK0yog=",
|
|
16
16
|
"packages/components/button/button.tsx": "sha256-khqYxcV3hlZ+Q+cYNTRXEpAfIijDFSvkuDJXMPtlk7g=",
|
|
17
|
-
"packages/components/calendar/calendar.tsx": "sha256-
|
|
17
|
+
"packages/components/calendar/calendar.tsx": "sha256-rWiS4YAueZfVoo6j5Fi3uN7A+yApe5U6HMm1woTVjys=",
|
|
18
18
|
"packages/components/calendar/dates.ts": "sha256-mygYkoC70av2ZQ0vkxf885trwW97Wd10I4dptYQe+4A=",
|
|
19
19
|
"packages/components/card/card.tsx": "sha256-aMKbv5DWYYWq7GZAFR9O1fuYE0H61WCjkvEbRMOd894=",
|
|
20
20
|
"packages/components/carousel/carousel.tsx": "sha256-pamugpB6Ujt9Ylxd37jNF/ZwSb8iRkW/MoYe12nY3i4=",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"packages/components/empty-state/empty-state.tsx": "sha256-uCKqYpr9vkozXZHpdl4GFtdX9ijcGOriCHvgyarBqRw=",
|
|
31
31
|
"packages/components/hover-card/hover-card.tsx": "sha256-AyRbxfqDOYBgGlgjgrtQZm5DipArLEzQn6XnzjPd0ro=",
|
|
32
32
|
"packages/components/input/input.tsx": "sha256-lbbheo+ydQTzyujTf0W7DD96TogOjifCyqj9c3h3W0g=",
|
|
33
|
-
"packages/components/kbd/kbd.tsx": "sha256-
|
|
33
|
+
"packages/components/kbd/kbd.tsx": "sha256-e8EO2Gw6JiUyrU0YcEZOaQNMel1pe/EcJrxwwgd1Ggk=",
|
|
34
34
|
"packages/components/modal/modal.tsx": "sha256-vybxgBGYCrMYvJRnO1wDAc2VFQylu+mQIf5OZIcabX4=",
|
|
35
35
|
"packages/components/number-input/number-input.tsx": "sha256-BDOyvCNtMULD/HK7uWHsYbGg79lrRDrVqtGQQrYHpmM=",
|
|
36
36
|
"packages/components/number-input/number.ts": "sha256-IrHCQrEhI5ein9ifMFuSViSoxQUBoT3tNmmCu/paGGM=",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"packages/components/progress/progress.tsx": "sha256-9OjecRNPWn7Bfe+C5IyXaKsW1NJae6X5gco1o0X5XkE=",
|
|
43
43
|
"packages/components/radio-group/radio-group.tsx": "sha256-jhnSEBLkdpe8dv5us/Q1sMsQF4sKGRgDXWGKm2JSFew=",
|
|
44
44
|
"packages/components/rating/rating.tsx": "sha256-zgPOQXzAiRE4qGNPQ8qat3SP1XSI/7567kA5VaT51P0=",
|
|
45
|
-
"packages/components/resizable/resizable.tsx": "sha256-
|
|
45
|
+
"packages/components/resizable/resizable.tsx": "sha256-Yxlq88qElhv2Q5DooPdriZkawRS0QWx08nd6ybz5oeY=",
|
|
46
46
|
"packages/components/segmented-control/segmented-control.tsx": "sha256-MCBG5XHFWCwbACctsYKbqe8mvSSR6pf60tyRgdCDKDA=",
|
|
47
47
|
"packages/components/select/select.tsx": "sha256-m8QmKUGC4386XcklosSntal0XwUAFjKosTBQSF0dduQ=",
|
|
48
48
|
"packages/components/sheet/sheet.tsx": "sha256-EIn3OeRDmXGHbYf/uihRh8aw3LmzarIFiyC9DUsL1jg=",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"packages/components/stepper/stepper.tsx": "sha256-uI/dRmkbijlixHiGUceWcpaDzpEixrzQ1UTmoPbGZAY=",
|
|
54
54
|
"packages/components/table/table.tsx": "sha256-ed1Qn2sIpxRvGdPDAb5ih5AcXr5PmHTHdlrJLYDYRp8=",
|
|
55
55
|
"packages/components/tabs/tabs.tsx": "sha256-kWAQjE9mshqZL7V3NJTUiurp6M5Nu3vx5O1LsIgdV5Y=",
|
|
56
|
-
"packages/components/tag-input/tag-input.tsx": "sha256-
|
|
56
|
+
"packages/components/tag-input/tag-input.tsx": "sha256-lc4ofz1/lUnb7B/GlFElVKXLbPwtJFAjE5vWwAY99fA=",
|
|
57
57
|
"packages/components/textarea/textarea.tsx": "sha256-C9jMYZ63w+m6bgdLvHjvULRuoCe26q5zbgS4+ahWzr8=",
|
|
58
58
|
"packages/components/time-picker/time-picker.tsx": "sha256-og8Cbf+e8oFYewfagUgjRzLHSIIlAZh+1OpAn9yNq70=",
|
|
59
59
|
"packages/components/time-picker/times.ts": "sha256-V/4uqFZPn9gVnyx8cB9vwp/RocmTYaPmLxjfy8DPQOI=",
|
package/src/assets.js
CHANGED
|
@@ -10,6 +10,9 @@ import { BUNDLED_REGISTRY_ROOT, readJson } from "./registry.js";
|
|
|
10
10
|
* Their files are not bundled with the CLI: a project wants three of them,
|
|
11
11
|
* not every model. The bundled index lists each file with its integrity; the
|
|
12
12
|
* files download from the site and are checked before anything is written.
|
|
13
|
+
* Each request names the integrity it expects, and the site answers with
|
|
14
|
+
* exactly those bytes, kept for every released version: an asset redrawn
|
|
15
|
+
* after this CLI was published still installs the version this CLI lists.
|
|
13
16
|
*
|
|
14
17
|
* Static files (SVG, GLB, posters) land in the `assets` target, public/mlola
|
|
15
18
|
* by default, so a web app serves them as /mlola/2d/… and /mlola/3d/…. A 2D
|
|
@@ -43,7 +46,7 @@ export async function addAssets(cwd, config, ids, { source, fetcher, overwrite =
|
|
|
43
46
|
for (const id of ids) {
|
|
44
47
|
const item = known.get(id);
|
|
45
48
|
for (const file of item.files) {
|
|
46
|
-
const url = `${source}/${item.kind}/${item.id}/${file.path}`;
|
|
49
|
+
const url = `${source}/${item.kind}/${item.id}/${file.path}?integrity=${encodeURIComponent(file.integrity)}`;
|
|
47
50
|
let response;
|
|
48
51
|
try {
|
|
49
52
|
response = await fetcher(url);
|
|
@@ -52,7 +55,9 @@ export async function addAssets(cwd, config, ids, { source, fetcher, overwrite =
|
|
|
52
55
|
}
|
|
53
56
|
if (!response.ok) throw new Error(`Could not download ${url}: the server answered ${response.status}.`);
|
|
54
57
|
const bytes = Buffer.from(await response.arrayBuffer());
|
|
55
|
-
if (integrityOf(bytes) !== file.integrity)
|
|
58
|
+
if (integrityOf(bytes) !== file.integrity) {
|
|
59
|
+
throw new Error(`${item.id}/${file.path} failed integrity validation; nothing was written. The server has a different version of this file: update the CLI (npx mlola-ui@latest) and try again.`);
|
|
60
|
+
}
|
|
56
61
|
planned.push({ item, file, bytes, relative: assetTarget(config, item, file) });
|
|
57
62
|
}
|
|
58
63
|
}
|