@zoreal/oauth2-react 0.2.11 → 0.2.12
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/dist/index.cjs +51 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +51 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var import_react2 = require("react");
|
|
|
39
39
|
|
|
40
40
|
// src/wire.ts
|
|
41
41
|
var WIRE_VERSION = 1;
|
|
42
|
-
var SDK_VERSION = "0.2.
|
|
42
|
+
var SDK_VERSION = "0.2.12";
|
|
43
43
|
var DEFAULT_ISSUER = "https://id.zoreal.com";
|
|
44
44
|
var POLL_INTERVAL_MS = 2e3;
|
|
45
45
|
var POLL_INTERVAL_ENROLLING_MS = 5e3;
|
|
@@ -859,8 +859,20 @@ var LIGHT = `
|
|
|
859
859
|
--zrl-accent-ink: #04698a;
|
|
860
860
|
--zrl-urgent: #b4761a;
|
|
861
861
|
--zrl-qr-bg: #ffffff;
|
|
862
|
+
--zrl-qr-filter: none;
|
|
863
|
+
--zrl-qr-spent-filter: blur(3px);
|
|
864
|
+
--zrl-qr-blend: normal;
|
|
862
865
|
--zrl-shadow: 0 1px 2px rgba(16, 18, 27, 0.06), 0 20px 50px -12px rgba(16, 18, 27, 0.3);
|
|
863
866
|
--zrl-ring: rgba(16, 18, 27, 0.07);
|
|
867
|
+
/* The light on the QR well's edge. Brand blue on both grounds, a lighter
|
|
868
|
+
tint at the head; only its strength is themed, see the dark block. */
|
|
869
|
+
--zrl-beam: #00b4d9;
|
|
870
|
+
--zrl-beam-head: #7fe0f4;
|
|
871
|
+
--zrl-beam-line: 2px;
|
|
872
|
+
--zrl-glow-core: 4px;
|
|
873
|
+
--zrl-glow-reach: 24px;
|
|
874
|
+
--zrl-glow-blur: 8px;
|
|
875
|
+
--zrl-glow-opacity: 0.6;
|
|
864
876
|
`;
|
|
865
877
|
var DARK = `
|
|
866
878
|
--zrl-scrim: rgba(0, 0, 0, 0.62);
|
|
@@ -875,12 +887,24 @@ var DARK = `
|
|
|
875
887
|
--zrl-accent-soft: #0d3b47;
|
|
876
888
|
--zrl-accent-ink: #7fdcf0;
|
|
877
889
|
--zrl-urgent: #e0a952;
|
|
878
|
-
/* The
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
--zrl-qr-bg:
|
|
890
|
+
/* The code is drawn light on the dark surface: the panel is transparent
|
|
891
|
+
and the image is inverted and screened, so only the modules and the
|
|
892
|
+
mark show. */
|
|
893
|
+
--zrl-qr-bg: transparent;
|
|
894
|
+
--zrl-qr-filter: invert(1);
|
|
895
|
+
--zrl-qr-spent-filter: invert(1) blur(3px);
|
|
896
|
+
--zrl-qr-blend: screen;
|
|
882
897
|
--zrl-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 50px -12px rgba(0, 0, 0, 0.65);
|
|
883
898
|
--zrl-ring: rgba(255, 255, 255, 0.1);
|
|
899
|
+
/* A glow that reads on a white card disappears on a dark one: the light
|
|
900
|
+
here is brighter and wider, and its halo reaches further out. */
|
|
901
|
+
--zrl-beam: #22c8ec;
|
|
902
|
+
--zrl-beam-head: #c2f3fc;
|
|
903
|
+
--zrl-beam-line: 3px;
|
|
904
|
+
--zrl-glow-core: 6px;
|
|
905
|
+
--zrl-glow-reach: 32px;
|
|
906
|
+
--zrl-glow-blur: 10px;
|
|
907
|
+
--zrl-glow-opacity: 0.85;
|
|
884
908
|
`;
|
|
885
909
|
var CSS = `
|
|
886
910
|
.${PREFIX}-root { ${LIGHT} }
|
|
@@ -952,16 +976,10 @@ var CSS = `
|
|
|
952
976
|
border: 1px solid var(--zrl-line);
|
|
953
977
|
border-radius: var(--zrl-radius);
|
|
954
978
|
background: var(--zrl-qr-bg);
|
|
955
|
-
/* The light on the edge takes its shape
|
|
956
|
-
|
|
957
|
-
it at the head, no other hue. */
|
|
979
|
+
/* The light on the edge takes its shape from here and its colour and
|
|
980
|
+
strength from the theme tokens above. One lap in 4s on every tier. */
|
|
958
981
|
--zrl-radius: 16px;
|
|
959
|
-
--zrl-beam: #00b4d9;
|
|
960
|
-
--zrl-beam-head: #7fe0f4;
|
|
961
|
-
--zrl-beam-size: 100px;
|
|
962
982
|
--zrl-beam-time: 4s;
|
|
963
|
-
--zrl-glow-reach: 20px;
|
|
964
|
-
--zrl-glow-core: 3px;
|
|
965
983
|
}
|
|
966
984
|
|
|
967
985
|
/* The light on the well's edge: a short comet running along the border, with
|
|
@@ -974,7 +992,7 @@ var CSS = `
|
|
|
974
992
|
before 120 and Safari before 15.4; the unprefixed one, declared after it,
|
|
975
993
|
wins everywhere else.
|
|
976
994
|
|
|
977
|
-
qr-beam keeps a
|
|
995
|
+
qr-beam keeps a thin ring on the border line: the comet itself.
|
|
978
996
|
qr-beam-glow is the glow: a wide band outside the well that blurs whatever
|
|
979
997
|
is inside it, and inside it qr-beam-glow-band keeps a 3px ring with a
|
|
980
998
|
second copy of the comet. The blur has to sit on the parent because a
|
|
@@ -989,9 +1007,9 @@ var CSS = `
|
|
|
989
1007
|
.${PREFIX}-qr-beam-glow,
|
|
990
1008
|
.${PREFIX}-qr-beam-glow-band {
|
|
991
1009
|
position: absolute;
|
|
992
|
-
inset: -
|
|
993
|
-
border:
|
|
994
|
-
border-radius: var(--zrl-radius);
|
|
1010
|
+
inset: calc(0px - var(--zrl-beam-line));
|
|
1011
|
+
border: var(--zrl-beam-line) solid transparent;
|
|
1012
|
+
border-radius: calc(var(--zrl-radius) - 1px + var(--zrl-beam-line));
|
|
995
1013
|
pointer-events: none;
|
|
996
1014
|
-webkit-mask: linear-gradient(transparent, transparent), linear-gradient(#fff, #fff);
|
|
997
1015
|
-webkit-mask-clip: padding-box, border-box;
|
|
@@ -1004,8 +1022,9 @@ var CSS = `
|
|
|
1004
1022
|
inset: calc(0px - var(--zrl-glow-reach));
|
|
1005
1023
|
border-width: var(--zrl-glow-reach);
|
|
1006
1024
|
border-radius: calc(var(--zrl-radius) - 1px + var(--zrl-glow-reach));
|
|
1007
|
-
filter: blur(
|
|
1008
|
-
opacity:
|
|
1025
|
+
filter: blur(var(--zrl-glow-blur));
|
|
1026
|
+
opacity: var(--zrl-glow-opacity);
|
|
1027
|
+
will-change: filter;
|
|
1009
1028
|
}
|
|
1010
1029
|
.${PREFIX}-qr-beam-glow-band {
|
|
1011
1030
|
inset: calc(0px - var(--zrl-glow-core));
|
|
@@ -1028,20 +1047,24 @@ var CSS = `
|
|
|
1028
1047
|
transition: opacity 400ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
1029
1048
|
}
|
|
1030
1049
|
|
|
1031
|
-
/* The moving light
|
|
1032
|
-
|
|
1050
|
+
/* The moving light: an oversized square carrying a conic sweep, rotated
|
|
1051
|
+
whole. A transform animation runs on the compositor, so the light keeps
|
|
1052
|
+
moving while the page is busy; animating the gradient angle instead
|
|
1053
|
+
repaints every frame on the main thread and stutters. */
|
|
1033
1054
|
.${PREFIX}-qr-beam::after,
|
|
1034
1055
|
.${PREFIX}-qr-beam-glow-band::after {
|
|
1035
1056
|
content: '';
|
|
1036
1057
|
position: absolute;
|
|
1037
1058
|
inset: -50%;
|
|
1038
1059
|
background: conic-gradient(
|
|
1039
|
-
from
|
|
1040
|
-
transparent 0deg
|
|
1041
|
-
var(--zrl-beam)
|
|
1060
|
+
from 0deg,
|
|
1061
|
+
transparent 0deg 220deg,
|
|
1062
|
+
var(--zrl-beam) 330deg,
|
|
1063
|
+
var(--zrl-beam-head) 348deg,
|
|
1042
1064
|
transparent 356deg 360deg
|
|
1043
1065
|
);
|
|
1044
|
-
animation: ${PREFIX}-orbit
|
|
1066
|
+
animation: ${PREFIX}-orbit var(--zrl-beam-time) linear infinite;
|
|
1067
|
+
will-change: transform;
|
|
1045
1068
|
transition: opacity 400ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
1046
1069
|
}
|
|
1047
1070
|
|
|
@@ -1061,6 +1084,8 @@ var CSS = `
|
|
|
1061
1084
|
width: 100%;
|
|
1062
1085
|
height: 100%;
|
|
1063
1086
|
border-radius: 8px;
|
|
1087
|
+
filter: var(--zrl-qr-filter);
|
|
1088
|
+
mix-blend-mode: var(--zrl-qr-blend);
|
|
1064
1089
|
transition: filter 300ms cubic-bezier(0.23, 1, 0.32, 1),
|
|
1065
1090
|
opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
|
|
1066
1091
|
transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
|
@@ -1069,7 +1094,7 @@ var CSS = `
|
|
|
1069
1094
|
/* Once the code is claimed the QR is spent. Blurring it out rather than
|
|
1070
1095
|
swapping it keeps one object on screen through the state change, so the eye
|
|
1071
1096
|
reads a transformation instead of two things trading places. */
|
|
1072
|
-
.${PREFIX}-qr[data-spent="true"] { opacity: 0.2; filter:
|
|
1097
|
+
.${PREFIX}-qr[data-spent="true"] { opacity: 0.2; filter: var(--zrl-qr-spent-filter); transform: scale(0.96); }
|
|
1073
1098
|
|
|
1074
1099
|
.${PREFIX}-qr-overlay {
|
|
1075
1100
|
position: absolute;
|
|
@@ -1198,53 +1223,7 @@ var CSS = `
|
|
|
1198
1223
|
70%, 100% { transform: scale(2.6); opacity: 0 }
|
|
1199
1224
|
}
|
|
1200
1225
|
|
|
1201
|
-
/* Three ways to move the light, one look at rest.
|
|
1202
|
-
Where offset-path takes a rect() (Chrome 116, Firefox 122, Safari 18) the
|
|
1203
|
-
comet rides the edge. Before that, a conic gradient turns inside the same
|
|
1204
|
-
masks instead: on a registered custom property where @property exists, and
|
|
1205
|
-
by rotating an oversized square where it does not, since an untyped custom
|
|
1206
|
-
property cannot interpolate and the light would snap once a cycle.
|
|
1207
|
-
There is no direct query for @property support. transition-behavior
|
|
1208
|
-
shipped after it in every engine (Chrome 117 vs 85, Firefox 129 vs 128,
|
|
1209
|
-
Safari 17.4 vs 16.4), so it stands in: a yes is never wrong, and a no only
|
|
1210
|
-
sends a capable browser down the transform tier, which looks the same.
|
|
1211
|
-
inherits: false so the angle stays on the element that animates it and
|
|
1212
|
-
never reaches the host page or the well. */
|
|
1213
|
-
@property --zrl-angle {
|
|
1214
|
-
syntax: '<angle>';
|
|
1215
|
-
inherits: false;
|
|
1216
|
-
initial-value: 0deg;
|
|
1217
|
-
}
|
|
1218
1226
|
@keyframes ${PREFIX}-orbit { to { transform: rotate(360deg) } }
|
|
1219
|
-
@keyframes ${PREFIX}-orbit-angle { to { --zrl-angle: 360deg } }
|
|
1220
|
-
@keyframes ${PREFIX}-beam { to { offset-distance: 100% } }
|
|
1221
|
-
@supports (transition-behavior: allow-discrete) {
|
|
1222
|
-
.${PREFIX}-qr-beam::after {
|
|
1223
|
-
inset: -1px;
|
|
1224
|
-
animation-name: ${PREFIX}-orbit-angle;
|
|
1225
|
-
}
|
|
1226
|
-
.${PREFIX}-qr-beam-glow-band::after {
|
|
1227
|
-
inset: calc(0px - var(--zrl-glow-core));
|
|
1228
|
-
animation-name: ${PREFIX}-orbit-angle;
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
/* The comet: a square that rides the well's edge on a rounded-rect path, its
|
|
1232
|
-
anchor a little ahead of centre, turned to face the way it travels, and
|
|
1233
|
-
masked down to what its overlay allows. The gradient runs against the
|
|
1234
|
-
direction of travel: a light head, the blue body, nothing behind. One lap
|
|
1235
|
-
in 4s, linear: continuous motion has no ease. */
|
|
1236
|
-
@supports (offset-path: rect(0 auto auto 0)) {
|
|
1237
|
-
.${PREFIX}-qr-beam::after,
|
|
1238
|
-
.${PREFIX}-qr-beam-glow-band::after {
|
|
1239
|
-
inset: auto;
|
|
1240
|
-
width: var(--zrl-beam-size);
|
|
1241
|
-
height: var(--zrl-beam-size);
|
|
1242
|
-
background: linear-gradient(to left, var(--zrl-beam-head), var(--zrl-beam), transparent);
|
|
1243
|
-
offset-path: rect(0 auto auto 0 round calc(var(--zrl-radius) - 1px));
|
|
1244
|
-
offset-anchor: 60% 50%;
|
|
1245
|
-
animation: ${PREFIX}-beam var(--zrl-beam-time) linear infinite;
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
1227
|
|
|
1249
1228
|
@media (prefers-reduced-motion: reduce) {
|
|
1250
1229
|
.${PREFIX}-scrim,
|