@monster-orange/den-ui 0.7.0 → 0.7.4

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.
@@ -42,7 +42,7 @@
42
42
  "h": 48
43
43
  },
44
44
  "style": {
45
- "display": "flex",
45
+ "display": "grid",
46
46
  "visibility": "visible",
47
47
  "height": "48px",
48
48
  "border-top-left-radius": "0px",
@@ -73,6 +73,61 @@
73
73
  "padding-right": "12px",
74
74
  "padding-bottom": "0px",
75
75
  "padding-left": "12px",
76
+ "row-gap": "normal",
77
+ "column-gap": "8px",
78
+ "color": "rgb(36, 30, 24)",
79
+ "opacity": "1",
80
+ "box-shadow": "none"
81
+ }
82
+ },
83
+ {
84
+ "key": "header.den-top > div.den-left",
85
+ "parent": "header.den-top",
86
+ "slot": "top",
87
+ "role": "div",
88
+ "tag": "div",
89
+ "name": "",
90
+ "classes": [
91
+ "den-left"
92
+ ],
93
+ "box": {
94
+ "x": 12,
95
+ "y": 7.5,
96
+ "w": 62,
97
+ "h": 32
98
+ },
99
+ "style": {
100
+ "display": "flex",
101
+ "visibility": "visible",
102
+ "height": "32px",
103
+ "border-top-left-radius": "0px",
104
+ "border-top-right-radius": "0px",
105
+ "border-bottom-right-radius": "0px",
106
+ "border-bottom-left-radius": "0px",
107
+ "background-color": "rgba(0, 0, 0, 0)",
108
+ "border-top-width": "0px",
109
+ "border-top-style": "none",
110
+ "border-top-color": "rgb(36, 30, 24)",
111
+ "border-right-width": "0px",
112
+ "border-right-style": "none",
113
+ "border-right-color": "rgb(36, 30, 24)",
114
+ "border-bottom-width": "0px",
115
+ "border-bottom-style": "none",
116
+ "border-bottom-color": "rgb(36, 30, 24)",
117
+ "border-left-width": "0px",
118
+ "border-left-style": "none",
119
+ "border-left-color": "rgb(36, 30, 24)",
120
+ "font-size": "14px",
121
+ "font-weight": "400",
122
+ "font-family": "-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif",
123
+ "font-style": "normal",
124
+ "line-height": "20.299999px",
125
+ "letter-spacing": "normal",
126
+ "text-transform": "none",
127
+ "padding-top": "0px",
128
+ "padding-right": "0px",
129
+ "padding-bottom": "0px",
130
+ "padding-left": "0px",
76
131
  "row-gap": "8px",
77
132
  "column-gap": "8px",
78
133
  "color": "rgb(36, 30, 24)",
@@ -82,7 +137,7 @@
82
137
  },
83
138
  {
84
139
  "key": "#den-menu-btn",
85
- "parent": "header.den-top",
140
+ "parent": "header.den-top > div.den-left",
86
141
  "slot": "top",
87
142
  "role": "button",
88
143
  "tag": "button",
@@ -137,8 +192,8 @@
137
192
  }
138
193
  },
139
194
  {
140
- "key": "header.den-top > a.den-brand",
141
- "parent": "header.den-top",
195
+ "key": "header.den-top > div.den-left > a.den-brand",
196
+ "parent": "header.den-top > div.den-left",
142
197
  "slot": "top",
143
198
  "role": "link",
144
199
  "tag": "a",
@@ -193,7 +248,7 @@
193
248
  },
194
249
  {
195
250
  "key": "#den-mark",
196
- "parent": "header.den-top > a.den-brand",
251
+ "parent": "header.den-top > div.den-left > a.den-brand",
197
252
  "slot": "top",
198
253
  "role": "span",
199
254
  "tag": "span",
@@ -301,8 +356,8 @@
301
356
  }
302
357
  },
303
358
  {
304
- "key": "header.den-top > a.den-brand > span.den-title",
305
- "parent": "header.den-top > a.den-brand",
359
+ "key": "header.den-top > div.den-left > a.den-brand > span.den-title",
360
+ "parent": "header.den-top > div.den-left > a.den-brand",
306
361
  "slot": "top",
307
362
  "role": "span",
308
363
  "tag": "span",
@@ -356,7 +411,7 @@
356
411
  },
357
412
  "host": {
358
413
  "role": "brand-title",
359
- "key": "header.den-top > a.den-brand > span.den-title",
414
+ "key": "header.den-top > div.den-left > a.den-brand > span.den-title",
360
415
  "fit": 1
361
416
  }
362
417
  },
@@ -366,7 +421,7 @@
366
421
  "slot": "top",
367
422
  "role": "button",
368
423
  "tag": "button",
369
- "name": "Search pages, services, actions…",
424
+ "name": "Search",
370
425
  "classes": [
371
426
  "den-search"
372
427
  ],
@@ -414,7 +469,7 @@
414
469
  "opacity": "1",
415
470
  "box-shadow": "none"
416
471
  },
417
- "hostName": true
472
+ "kit": "search"
418
473
  },
419
474
  {
420
475
  "key": "#den-search > span.den-search-ic",
@@ -527,9 +582,64 @@
527
582
  }
528
583
  },
529
584
  {
530
- "key": "#den-status",
585
+ "key": "header.den-top > div.den-chips > div.den-end",
531
586
  "parent": "header.den-top > div.den-chips",
532
587
  "slot": "top",
588
+ "role": "div",
589
+ "tag": "div",
590
+ "name": "",
591
+ "classes": [
592
+ "den-end"
593
+ ],
594
+ "box": {
595
+ "x": 144,
596
+ "y": 7.5,
597
+ "w": 63.92,
598
+ "h": 32
599
+ },
600
+ "style": {
601
+ "display": "flex",
602
+ "visibility": "visible",
603
+ "height": "32px",
604
+ "border-top-left-radius": "0px",
605
+ "border-top-right-radius": "0px",
606
+ "border-bottom-right-radius": "0px",
607
+ "border-bottom-left-radius": "0px",
608
+ "background-color": "rgba(0, 0, 0, 0)",
609
+ "border-top-width": "0px",
610
+ "border-top-style": "none",
611
+ "border-top-color": "rgb(36, 30, 24)",
612
+ "border-right-width": "0px",
613
+ "border-right-style": "none",
614
+ "border-right-color": "rgb(36, 30, 24)",
615
+ "border-bottom-width": "0px",
616
+ "border-bottom-style": "none",
617
+ "border-bottom-color": "rgb(36, 30, 24)",
618
+ "border-left-width": "0px",
619
+ "border-left-style": "none",
620
+ "border-left-color": "rgb(36, 30, 24)",
621
+ "font-size": "14px",
622
+ "font-weight": "400",
623
+ "font-family": "-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif",
624
+ "font-style": "normal",
625
+ "line-height": "20.299999px",
626
+ "letter-spacing": "normal",
627
+ "text-transform": "none",
628
+ "padding-top": "0px",
629
+ "padding-right": "0px",
630
+ "padding-bottom": "0px",
631
+ "padding-left": "0px",
632
+ "row-gap": "4px",
633
+ "column-gap": "4px",
634
+ "color": "rgb(36, 30, 24)",
635
+ "opacity": "1",
636
+ "box-shadow": "none"
637
+ }
638
+ },
639
+ {
640
+ "key": "#den-status",
641
+ "parent": "header.den-top > div.den-chips > div.den-end",
642
+ "slot": "top",
533
643
  "role": "button",
534
644
  "tag": "button",
535
645
  "name": "2 not checked",
@@ -539,7 +649,7 @@
539
649
  "box": {
540
650
  "x": 144,
541
651
  "y": 7.5,
542
- "w": 76.19,
652
+ "w": 63.92,
543
653
  "h": 32
544
654
  },
545
655
  "style": {
@@ -650,7 +760,7 @@
650
760
  "box": {
651
761
  "x": 169,
652
762
  "y": 14.08,
653
- "w": 40.19,
763
+ "w": 27.92,
654
764
  "h": 18.84
655
765
  },
656
766
  "style": {
@@ -704,7 +814,7 @@
704
814
  "den-rb-top"
705
815
  ],
706
816
  "box": {
707
- "x": 224.19,
817
+ "x": 211.92,
708
818
  "y": 7.5,
709
819
  "w": 81.81,
710
820
  "h": 32
@@ -757,7 +867,7 @@
757
867
  "name": "",
758
868
  "classes": [],
759
869
  "box": {
760
- "x": 235.19,
870
+ "x": 222.92,
761
871
  "y": 15.5,
762
872
  "w": 16,
763
873
  "h": 16
@@ -810,7 +920,7 @@
810
920
  "name": "Report",
811
921
  "classes": [],
812
922
  "box": {
813
- "x": 257.19,
923
+ "x": 244.92,
814
924
  "y": 14.8,
815
925
  "w": 37.81,
816
926
  "h": 17.39
@@ -866,9 +976,9 @@
866
976
  "den-bell"
867
977
  ],
868
978
  "box": {
869
- "x": 310,
979
+ "x": 297.73,
870
980
  "y": 7.5,
871
- "w": 32,
981
+ "w": 34,
872
982
  "h": 32
873
983
  },
874
984
  "style": {
@@ -919,9 +1029,9 @@
919
1029
  "name": "",
920
1030
  "classes": [],
921
1031
  "box": {
922
- "x": 319,
1032
+ "x": 306.73,
923
1033
  "y": 15.5,
924
- "w": 14,
1034
+ "w": 16,
925
1035
  "h": 16
926
1036
  },
927
1037
  "style": {
@@ -975,9 +1085,9 @@
975
1085
  "appearance-btn"
976
1086
  ],
977
1087
  "box": {
978
- "x": 346,
1088
+ "x": 335.73,
979
1089
  "y": 7.5,
980
- "w": 32,
1090
+ "w": 42.27,
981
1091
  "h": 32
982
1092
  },
983
1093
  "style": {
@@ -1028,7 +1138,7 @@
1028
1138
  "name": "◐ ▾",
1029
1139
  "classes": [],
1030
1140
  "box": {
1031
- "x": 355,
1141
+ "x": 344.73,
1032
1142
  "y": 13.34,
1033
1143
  "w": 24.27,
1034
1144
  "h": 20.3
@@ -3428,12 +3538,12 @@
3428
3538
  "x": -266.05,
3429
3539
  "y": 499.27,
3430
3540
  "w": 244,
3431
- "h": 270.14
3541
+ "h": 254.2
3432
3542
  },
3433
3543
  "style": {
3434
3544
  "display": "block",
3435
3545
  "visibility": "visible",
3436
- "height": "270.140625px",
3546
+ "height": "254.203125px",
3437
3547
  "border-top-left-radius": "0px",
3438
3548
  "border-top-right-radius": "0px",
3439
3549
  "border-bottom-right-radius": "0px",
@@ -3481,7 +3591,7 @@
3481
3591
  ],
3482
3592
  "box": {
3483
3593
  "x": -266.05,
3484
- "y": 769.41,
3594
+ "y": 753.47,
3485
3595
  "w": 244,
3486
3596
  "h": 32.3
3487
3597
  },
@@ -3534,7 +3644,7 @@
3534
3644
  "classes": [],
3535
3645
  "box": {
3536
3646
  "x": -256.05,
3537
- "y": 776.55,
3647
+ "y": 760.61,
3538
3648
  "w": 18,
3539
3649
  "h": 18
3540
3650
  },
@@ -3589,7 +3699,7 @@
3589
3699
  ],
3590
3700
  "box": {
3591
3701
  "x": -228.05,
3592
- "y": 775.41,
3702
+ "y": 759.47,
3593
3703
  "w": 196,
3594
3704
  "h": 20.3
3595
3705
  },
@@ -3638,20 +3748,20 @@
3638
3748
  "slot": "foot",
3639
3749
  "role": "link",
3640
3750
  "tag": "a",
3641
- "name": "Signed in · this device",
3751
+ "name": "Ada Fixture@ada-fixture",
3642
3752
  "classes": [
3643
3753
  "den-ni"
3644
3754
  ],
3645
3755
  "box": {
3646
3756
  "x": -266.05,
3647
- "y": 801.7,
3757
+ "y": 785.77,
3648
3758
  "w": 244,
3649
- "h": 32.3
3759
+ "h": 48.23
3650
3760
  },
3651
3761
  "style": {
3652
3762
  "display": "flex",
3653
3763
  "visibility": "visible",
3654
- "height": "32.296875px",
3764
+ "height": "48.234375px",
3655
3765
  "border-top-left-radius": "6px",
3656
3766
  "border-top-right-radius": "6px",
3657
3767
  "border-bottom-right-radius": "6px",
@@ -3685,7 +3795,10 @@
3685
3795
  "color": "rgb(92, 82, 71)",
3686
3796
  "opacity": "1",
3687
3797
  "box-shadow": "none"
3688
- }
3798
+ },
3799
+ "shape": "name,login",
3800
+ "account": true,
3801
+ "lines": 2
3689
3802
  },
3690
3803
  {
3691
3804
  "key": "#den-ident > svg",
@@ -3697,7 +3810,7 @@
3697
3810
  "classes": [],
3698
3811
  "box": {
3699
3812
  "x": -256.05,
3700
- "y": 808.84,
3813
+ "y": 800.88,
3701
3814
  "w": 18,
3702
3815
  "h": 18
3703
3816
  },
@@ -3746,13 +3859,74 @@
3746
3859
  "slot": "foot",
3747
3860
  "role": "span",
3748
3861
  "tag": "span",
3749
- "name": "Signed in · this device",
3862
+ "name": "",
3750
3863
  "classes": [
3751
- "den-lbl"
3864
+ "den-lbl",
3865
+ "den-acct"
3866
+ ],
3867
+ "box": {
3868
+ "x": -228.05,
3869
+ "y": 791.77,
3870
+ "w": 196,
3871
+ "h": 36.23
3872
+ },
3873
+ "style": {
3874
+ "display": "flex",
3875
+ "visibility": "visible",
3876
+ "height": "36.234375px",
3877
+ "border-top-left-radius": "0px",
3878
+ "border-top-right-radius": "0px",
3879
+ "border-bottom-right-radius": "0px",
3880
+ "border-bottom-left-radius": "0px",
3881
+ "background-color": "rgba(0, 0, 0, 0)",
3882
+ "border-top-width": "0px",
3883
+ "border-top-style": "none",
3884
+ "border-top-color": "rgb(92, 82, 71)",
3885
+ "border-right-width": "0px",
3886
+ "border-right-style": "none",
3887
+ "border-right-color": "rgb(92, 82, 71)",
3888
+ "border-bottom-width": "0px",
3889
+ "border-bottom-style": "none",
3890
+ "border-bottom-color": "rgb(92, 82, 71)",
3891
+ "border-left-width": "0px",
3892
+ "border-left-style": "none",
3893
+ "border-left-color": "rgb(92, 82, 71)",
3894
+ "font-size": "14px",
3895
+ "font-weight": "400",
3896
+ "font-family": "-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif",
3897
+ "font-style": "normal",
3898
+ "line-height": "20.299999px",
3899
+ "letter-spacing": "normal",
3900
+ "text-transform": "none",
3901
+ "padding-top": "0px",
3902
+ "padding-right": "0px",
3903
+ "padding-bottom": "0px",
3904
+ "padding-left": "0px",
3905
+ "row-gap": "normal",
3906
+ "column-gap": "normal",
3907
+ "color": "rgb(92, 82, 71)",
3908
+ "opacity": "1",
3909
+ "box-shadow": "none"
3910
+ },
3911
+ "host": {
3912
+ "role": "account-name",
3913
+ "key": "#den-ident > span.den-lbl",
3914
+ "fit": 196
3915
+ }
3916
+ },
3917
+ {
3918
+ "key": "#den-ident > span.den-lbl > span.den-acct-n",
3919
+ "parent": "#den-ident > span.den-lbl",
3920
+ "slot": "foot",
3921
+ "role": "span",
3922
+ "tag": "span",
3923
+ "name": "Ada Fixture",
3924
+ "classes": [
3925
+ "den-acct-n"
3752
3926
  ],
3753
3927
  "box": {
3754
3928
  "x": -228.05,
3755
- "y": 807.7,
3929
+ "y": 791.77,
3756
3930
  "w": 196,
3757
3931
  "h": 20.3
3758
3932
  },
@@ -3796,8 +3970,66 @@
3796
3970
  },
3797
3971
  "host": {
3798
3972
  "role": "account-name",
3799
- "key": "#den-ident > span.den-lbl",
3800
- "fit": 142.48
3973
+ "key": "#den-ident > span.den-lbl"
3974
+ }
3975
+ },
3976
+ {
3977
+ "key": "#den-ident > span.den-lbl > span.den-acct-l",
3978
+ "parent": "#den-ident > span.den-lbl",
3979
+ "slot": "foot",
3980
+ "role": "span",
3981
+ "tag": "span",
3982
+ "name": "@ada-fixture",
3983
+ "classes": [
3984
+ "den-acct-l"
3985
+ ],
3986
+ "box": {
3987
+ "x": -228.05,
3988
+ "y": 812.06,
3989
+ "w": 196,
3990
+ "h": 15.94
3991
+ },
3992
+ "style": {
3993
+ "display": "block",
3994
+ "visibility": "visible",
3995
+ "height": "15.9375px",
3996
+ "border-top-left-radius": "0px",
3997
+ "border-top-right-radius": "0px",
3998
+ "border-bottom-right-radius": "0px",
3999
+ "border-bottom-left-radius": "0px",
4000
+ "background-color": "rgba(0, 0, 0, 0)",
4001
+ "border-top-width": "0px",
4002
+ "border-top-style": "none",
4003
+ "border-top-color": "rgb(109, 99, 88)",
4004
+ "border-right-width": "0px",
4005
+ "border-right-style": "none",
4006
+ "border-right-color": "rgb(109, 99, 88)",
4007
+ "border-bottom-width": "0px",
4008
+ "border-bottom-style": "none",
4009
+ "border-bottom-color": "rgb(109, 99, 88)",
4010
+ "border-left-width": "0px",
4011
+ "border-left-style": "none",
4012
+ "border-left-color": "rgb(109, 99, 88)",
4013
+ "font-size": "11px",
4014
+ "font-weight": "400",
4015
+ "font-family": "-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif",
4016
+ "font-style": "normal",
4017
+ "line-height": "15.95px",
4018
+ "letter-spacing": "normal",
4019
+ "text-transform": "none",
4020
+ "padding-top": "0px",
4021
+ "padding-right": "0px",
4022
+ "padding-bottom": "0px",
4023
+ "padding-left": "0px",
4024
+ "row-gap": "normal",
4025
+ "column-gap": "normal",
4026
+ "color": "rgb(109, 99, 88)",
4027
+ "opacity": "1",
4028
+ "box-shadow": "none"
4029
+ },
4030
+ "host": {
4031
+ "role": "account-name",
4032
+ "key": "#den-ident > span.den-lbl"
3801
4033
  }
3802
4034
  }
3803
4035
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monster-orange/den-ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.4",
4
4
  "description": "Den's UI kit: tokens, fonts and shared components, framework-free",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/busy.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare const NO_ANSWER_MS: number;
5
5
  export declare const SUCCESS_CLOSE_MS: number;
6
6
  export declare const POLL_MS: number;
7
7
  export declare const POLL_MAX_MS: number;
8
+ export declare const ASK_MS: number;
8
9
 
9
10
  export type Words = Record<string, Record<string, string>>;
10
11
  /** Check again's answer: how a request id ended. */
package/src/busy.js CHANGED
@@ -67,6 +67,9 @@
67
67
  * Reconnect mode: the request may get no answer (the product stopped
68
68
  * first); that counts as going down, and the pop-up waits for it to come
69
69
  * back. busyAction then resolves with the new answer from reconnect.url.
70
+ * Each ask of reconnect.url gives up after ASK_MS: an ask in flight as the
71
+ * product goes down (or one a proxy holds) may never be answered, and the
72
+ * next ask must still come.
70
73
  *
71
74
  * The request contract (Settled in v2): Try again sends the same id only
72
75
  * when no answer came back; after the server answered with an error it
@@ -84,6 +87,7 @@ export const NO_ANSWER_MS = 60_000;
84
87
  export const SUCCESS_CLOSE_MS = 1200;
85
88
  export const POLL_MS = 1000;
86
89
  export const POLL_MAX_MS = 3000;
90
+ export const ASK_MS = 3000;
87
91
 
88
92
  const hook = {
89
93
  lang: () =>
@@ -206,6 +210,20 @@ function newId() {
206
210
 
207
211
  const later = (ms) => new Promise((r) => setTimeout(r, ms));
208
212
 
213
+ /** One ask of the reconnect url: its JSON, or null (no answer in ASK_MS). */
214
+ async function askOnce(url) {
215
+ const stop = new AbortController();
216
+ const timer = setTimeout(() => stop.abort(), ASK_MS);
217
+ try {
218
+ const r = await fetch(url, { cache: "no-store", signal: stop.signal });
219
+ return r.ok ? await r.json() : null;
220
+ } catch {
221
+ return null;
222
+ } finally {
223
+ clearTimeout(timer);
224
+ }
225
+ }
226
+
209
227
  /** The first message with words: the error's own, its answer's, nothing. */
210
228
  export function messageOf(err) {
211
229
  const tries = [
@@ -625,13 +643,7 @@ export function busyAction(name, run, opts = {}) {
625
643
  while (!settled && Date.now() - startedAt < limit) {
626
644
  await later(gap);
627
645
  gap = Math.min(POLL_MAX_MS, gap + 500);
628
- let now = null;
629
- try {
630
- const r = await fetch(rc.url, { cache: "no-store" });
631
- now = r.ok ? await r.json() : null;
632
- } catch {
633
- now = null;
634
- }
646
+ const now = await askOnce(rc.url);
635
647
  if (settled) return;
636
648
  if (now && rc.back(now, before)) {
637
649
  const v = rc.version?.(now) ?? "";
@@ -650,13 +662,10 @@ export function busyAction(name, run, opts = {}) {
650
662
  // Reconnect mode: how the product answered before it went away.
651
663
  let before = opts.before ?? null;
652
664
  if (reconnect && hook.reconnect && !before)
653
- fetch(hook.reconnect.url, { cache: "no-store" })
654
- .then((r) => (r.ok ? r.json() : null))
655
- .catch(() => null)
656
- .then((b) => {
657
- before = b;
658
- attempt();
659
- });
665
+ askOnce(hook.reconnect.url).then((b) => {
666
+ before = b;
667
+ attempt();
668
+ });
660
669
  else attempt();
661
670
  return result;
662
671
  }
package/src/kit.d.ts CHANGED
@@ -42,6 +42,7 @@ import type {
42
42
  bellButtonHtml,
43
43
  bellPanelHtml,
44
44
  accountHtml,
45
+ accountWho,
45
46
  accountMenuHtml,
46
47
  settingsHtml,
47
48
  appearanceButtonHtml,
@@ -184,6 +185,7 @@ export interface DenUIKit {
184
185
  bellButtonHtml: typeof bellButtonHtml;
185
186
  bellPanelHtml: typeof bellPanelHtml;
186
187
  accountHtml: typeof accountHtml;
188
+ accountWho: typeof accountWho;
187
189
  accountMenuHtml: typeof accountMenuHtml;
188
190
  settingsHtml: typeof settingsHtml;
189
191
  appearanceButtonHtml: typeof appearanceButtonHtml;
package/src/kit.js CHANGED
@@ -48,6 +48,7 @@
48
48
  import { addStrings, kitT, setProduct } from "./strings.js";
49
49
  import {
50
50
  accountHtml,
51
+ accountWho,
51
52
  accountMenuHtml,
52
53
  appearanceButtonHtml,
53
54
  appearanceMenuHtml,
@@ -270,6 +271,7 @@ const DenUI = {
270
271
  bellButtonHtml,
271
272
  bellPanelHtml,
272
273
  accountHtml,
274
+ accountWho,
273
275
  accountMenuHtml,
274
276
  settingsHtml,
275
277
  appearanceButtonHtml,