@orangecheck/auth-client 2.26.0 → 2.27.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/dist/index.js +81 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1158,6 +1158,15 @@ var SUDO_ACCOUNT_MISMATCH_MESSAGE = "Switch this tab to that account first \u201
|
|
|
1158
1158
|
function isSudoAccountMismatch(body) {
|
|
1159
1159
|
return body?.reason === "sudo_account_mismatch";
|
|
1160
1160
|
}
|
|
1161
|
+
|
|
1162
|
+
// src/appearance.ts
|
|
1163
|
+
var SIGNIN_FONT = "var(--oc-signin-font, ui-monospace, SFMono-Regular, monospace)";
|
|
1164
|
+
var SIGNIN_CASE = "var(--oc-signin-case, uppercase)";
|
|
1165
|
+
var signinTracking = (em) => `var(--oc-signin-tracking, ${em})`;
|
|
1166
|
+
var signinSize = (px) => `calc(${px}px * var(--oc-signin-scale, 1))`;
|
|
1167
|
+
var signinRadius = (px) => `var(--oc-signin-radius, ${px}px)`;
|
|
1168
|
+
var SIGNIN_BUTTON_RADIUS = "var(--oc-signin-button-radius, 6px)";
|
|
1169
|
+
var SIGNIN_STRONG = "var(--oc-signin-strong, 600)";
|
|
1161
1170
|
var DEFAULT_AUTH_ORIGIN = "https://ochk.io";
|
|
1162
1171
|
async function fetchOcLinkedIdentities(opts) {
|
|
1163
1172
|
const authOrigin = opts?.authOrigin ?? DEFAULT_AUTH_ORIGIN;
|
|
@@ -1372,8 +1381,8 @@ function IdentityRow({
|
|
|
1372
1381
|
style: {
|
|
1373
1382
|
marginTop: 4,
|
|
1374
1383
|
color: V.foreground,
|
|
1375
|
-
fontFamily:
|
|
1376
|
-
fontSize: 12,
|
|
1384
|
+
fontFamily: SIGNIN_FONT,
|
|
1385
|
+
fontSize: signinSize(12),
|
|
1377
1386
|
wordBreak: "break-all"
|
|
1378
1387
|
},
|
|
1379
1388
|
children: display
|
|
@@ -1451,8 +1460,8 @@ function ConsolidationPanel({ entries }) {
|
|
|
1451
1460
|
gap: 8,
|
|
1452
1461
|
padding: "8px 0",
|
|
1453
1462
|
borderTop: `1px solid ${V.border}`,
|
|
1454
|
-
fontFamily:
|
|
1455
|
-
fontSize: 11
|
|
1463
|
+
fontFamily: SIGNIN_FONT,
|
|
1464
|
+
fontSize: signinSize(11)
|
|
1456
1465
|
},
|
|
1457
1466
|
children: [
|
|
1458
1467
|
/* @__PURE__ */ jsx("code", { style: { color: V.foreground, wordBreak: "break-all" }, children: e.did_oc }),
|
|
@@ -1755,7 +1764,7 @@ function BtcLinkForm({
|
|
|
1755
1764
|
placeholder: "bc1q\u2026",
|
|
1756
1765
|
autoCapitalize: "none",
|
|
1757
1766
|
spellCheck: false,
|
|
1758
|
-
style: { ...inputStyle, fontFamily:
|
|
1767
|
+
style: { ...inputStyle, fontFamily: SIGNIN_FONT }
|
|
1759
1768
|
}
|
|
1760
1769
|
),
|
|
1761
1770
|
err && /* @__PURE__ */ jsx(ErrorLine, { children: err }),
|
|
@@ -1785,7 +1794,7 @@ function BtcLinkForm({
|
|
|
1785
1794
|
/* @__PURE__ */ jsxs("p", { style: bodyStyle, children: [
|
|
1786
1795
|
"Sign the challenge with the wallet that controls",
|
|
1787
1796
|
" ",
|
|
1788
|
-
/* @__PURE__ */ jsx("span", { style: { fontFamily:
|
|
1797
|
+
/* @__PURE__ */ jsx("span", { style: { fontFamily: SIGNIN_FONT, wordBreak: "break-all" }, children: addr }),
|
|
1789
1798
|
"."
|
|
1790
1799
|
] }),
|
|
1791
1800
|
/* @__PURE__ */ jsx(
|
|
@@ -1893,10 +1902,10 @@ function SectionLabel({
|
|
|
1893
1902
|
{
|
|
1894
1903
|
style: {
|
|
1895
1904
|
color,
|
|
1896
|
-
fontFamily:
|
|
1897
|
-
fontSize: 10,
|
|
1898
|
-
letterSpacing: "0.18em",
|
|
1899
|
-
textTransform:
|
|
1905
|
+
fontFamily: SIGNIN_FONT,
|
|
1906
|
+
fontSize: signinSize(10),
|
|
1907
|
+
letterSpacing: signinTracking("0.18em"),
|
|
1908
|
+
textTransform: SIGNIN_CASE,
|
|
1900
1909
|
marginBottom: 8
|
|
1901
1910
|
},
|
|
1902
1911
|
children
|
|
@@ -1911,8 +1920,8 @@ function ErrorLine({ children }) {
|
|
|
1911
1920
|
style: {
|
|
1912
1921
|
margin: "8px 0 0",
|
|
1913
1922
|
color: V.destructive,
|
|
1914
|
-
fontFamily:
|
|
1915
|
-
fontSize: 11
|
|
1923
|
+
fontFamily: SIGNIN_FONT,
|
|
1924
|
+
fontSize: signinSize(11)
|
|
1916
1925
|
},
|
|
1917
1926
|
children
|
|
1918
1927
|
}
|
|
@@ -1921,7 +1930,6 @@ function ErrorLine({ children }) {
|
|
|
1921
1930
|
function FormButtons({ children }) {
|
|
1922
1931
|
return /* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 8, marginTop: 12 }, children });
|
|
1923
1932
|
}
|
|
1924
|
-
var MONO = "ui-monospace, SFMono-Regular, monospace";
|
|
1925
1933
|
var V = {
|
|
1926
1934
|
primary: "var(--primary, #f97316)",
|
|
1927
1935
|
foreground: "var(--foreground, #fafafa)",
|
|
@@ -1953,8 +1961,8 @@ var bodyStyle = {
|
|
|
1953
1961
|
};
|
|
1954
1962
|
var hintStyle = {
|
|
1955
1963
|
color: V.muted,
|
|
1956
|
-
fontFamily:
|
|
1957
|
-
fontSize: 10.5,
|
|
1964
|
+
fontFamily: SIGNIN_FONT,
|
|
1965
|
+
fontSize: signinSize(10.5),
|
|
1958
1966
|
opacity: 0.8
|
|
1959
1967
|
};
|
|
1960
1968
|
var rowStyle = {
|
|
@@ -1967,10 +1975,10 @@ var rowStyle = {
|
|
|
1967
1975
|
};
|
|
1968
1976
|
var rowLabelStyle = {
|
|
1969
1977
|
color: V.foreground,
|
|
1970
|
-
fontFamily:
|
|
1971
|
-
fontSize: 10.5,
|
|
1972
|
-
letterSpacing: "0.12em",
|
|
1973
|
-
textTransform:
|
|
1978
|
+
fontFamily: SIGNIN_FONT,
|
|
1979
|
+
fontSize: signinSize(10.5),
|
|
1980
|
+
letterSpacing: signinTracking("0.12em"),
|
|
1981
|
+
textTransform: SIGNIN_CASE,
|
|
1974
1982
|
opacity: 0.8
|
|
1975
1983
|
};
|
|
1976
1984
|
var inputStyle = {
|
|
@@ -1979,8 +1987,8 @@ var inputStyle = {
|
|
|
1979
1987
|
background: V.background,
|
|
1980
1988
|
color: V.foreground,
|
|
1981
1989
|
border: `1px solid ${V.border}`,
|
|
1982
|
-
borderRadius: 6,
|
|
1983
|
-
fontFamily:
|
|
1990
|
+
borderRadius: signinRadius(6),
|
|
1991
|
+
fontFamily: SIGNIN_FONT,
|
|
1984
1992
|
// 16px — never lower · suppresses iOS Safari focus auto-zoom.
|
|
1985
1993
|
fontSize: 16,
|
|
1986
1994
|
outline: "none",
|
|
@@ -1989,11 +1997,11 @@ var inputStyle = {
|
|
|
1989
1997
|
function btnBase(disabled) {
|
|
1990
1998
|
return {
|
|
1991
1999
|
padding: "0.5rem 0.875rem",
|
|
1992
|
-
borderRadius:
|
|
1993
|
-
fontFamily:
|
|
1994
|
-
fontSize: 10.5,
|
|
1995
|
-
letterSpacing: "0.12em",
|
|
1996
|
-
textTransform:
|
|
2000
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
2001
|
+
fontFamily: SIGNIN_FONT,
|
|
2002
|
+
fontSize: signinSize(10.5),
|
|
2003
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2004
|
+
textTransform: SIGNIN_CASE,
|
|
1997
2005
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1998
2006
|
opacity: disabled ? 0.5 : 1
|
|
1999
2007
|
};
|
|
@@ -2213,8 +2221,8 @@ function OcSignIn({
|
|
|
2213
2221
|
padding: "1rem",
|
|
2214
2222
|
border: "1px solid var(--border, #27272a)",
|
|
2215
2223
|
color: "var(--foreground, #fafafa)",
|
|
2216
|
-
fontFamily:
|
|
2217
|
-
fontSize: 12
|
|
2224
|
+
fontFamily: SIGNIN_FONT,
|
|
2225
|
+
fontSize: signinSize(12)
|
|
2218
2226
|
},
|
|
2219
2227
|
children: [
|
|
2220
2228
|
"no signin paths enabled \u2014 set ",
|
|
@@ -2252,10 +2260,10 @@ function OcSignIn({
|
|
|
2252
2260
|
marginBottom: 14,
|
|
2253
2261
|
padding: "0.6rem 0.75rem",
|
|
2254
2262
|
border: "1px solid var(--destructive, #ef4444)",
|
|
2255
|
-
borderRadius: 6,
|
|
2263
|
+
borderRadius: signinRadius(6),
|
|
2256
2264
|
color: "var(--destructive, #ef4444)",
|
|
2257
|
-
fontFamily:
|
|
2258
|
-
fontSize: 11
|
|
2265
|
+
fontFamily: SIGNIN_FONT,
|
|
2266
|
+
fontSize: signinSize(11)
|
|
2259
2267
|
},
|
|
2260
2268
|
children: "That sign-in didn't finish. Try again, or use another way below."
|
|
2261
2269
|
}
|
|
@@ -2269,11 +2277,11 @@ function OcSignIn({
|
|
|
2269
2277
|
padding: "0.6rem 0.75rem",
|
|
2270
2278
|
border: "1px solid var(--primary, #f97316)",
|
|
2271
2279
|
borderLeftWidth: 3,
|
|
2272
|
-
borderRadius: 4,
|
|
2280
|
+
borderRadius: signinRadius(4),
|
|
2273
2281
|
background: "color-mix(in srgb, var(--primary, #f97316) 8%, transparent)",
|
|
2274
2282
|
color: "var(--foreground, #fafafa)",
|
|
2275
|
-
fontFamily:
|
|
2276
|
-
fontSize: 11,
|
|
2283
|
+
fontFamily: SIGNIN_FONT,
|
|
2284
|
+
fontSize: signinSize(11),
|
|
2277
2285
|
lineHeight: 1.6
|
|
2278
2286
|
},
|
|
2279
2287
|
children: [
|
|
@@ -2282,9 +2290,9 @@ function OcSignIn({
|
|
|
2282
2290
|
{
|
|
2283
2291
|
style: {
|
|
2284
2292
|
color: "var(--primary, #f97316)",
|
|
2285
|
-
letterSpacing: "0.12em",
|
|
2286
|
-
textTransform:
|
|
2287
|
-
fontSize: 10,
|
|
2293
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2294
|
+
textTransform: SIGNIN_CASE,
|
|
2295
|
+
fontSize: signinSize(10),
|
|
2288
2296
|
display: "block",
|
|
2289
2297
|
marginBottom: 3
|
|
2290
2298
|
},
|
|
@@ -2413,10 +2421,10 @@ function SigninTab({
|
|
|
2413
2421
|
border: "none",
|
|
2414
2422
|
borderBottom: active ? "2px solid var(--primary, #f97316)" : "2px solid transparent",
|
|
2415
2423
|
color: active ? "var(--foreground, #fafafa)" : "var(--muted-foreground, #a1a1aa)",
|
|
2416
|
-
fontFamily:
|
|
2417
|
-
fontSize: 11,
|
|
2418
|
-
letterSpacing: "0.12em",
|
|
2419
|
-
textTransform:
|
|
2424
|
+
fontFamily: SIGNIN_FONT,
|
|
2425
|
+
fontSize: signinSize(11),
|
|
2426
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2427
|
+
textTransform: SIGNIN_CASE,
|
|
2420
2428
|
cursor: "pointer",
|
|
2421
2429
|
marginBottom: -1
|
|
2422
2430
|
},
|
|
@@ -2478,10 +2486,10 @@ function ProviderSignIn({
|
|
|
2478
2486
|
// marginTop owns the gap above, so the divider only pads below.
|
|
2479
2487
|
margin: first ? `${BLOCK_GAP}px 0` : `0 0 ${BLOCK_GAP}px`,
|
|
2480
2488
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
2481
|
-
fontFamily:
|
|
2482
|
-
fontSize: 10,
|
|
2483
|
-
letterSpacing: "0.16em",
|
|
2484
|
-
textTransform:
|
|
2489
|
+
fontFamily: SIGNIN_FONT,
|
|
2490
|
+
fontSize: signinSize(10),
|
|
2491
|
+
letterSpacing: signinTracking("0.16em"),
|
|
2492
|
+
textTransform: SIGNIN_CASE
|
|
2485
2493
|
},
|
|
2486
2494
|
children: [
|
|
2487
2495
|
/* @__PURE__ */ jsx("span", { style: line }),
|
|
@@ -2501,11 +2509,11 @@ function ProviderSignIn({
|
|
|
2501
2509
|
marginTop: i === 0 ? 0 : BUTTON_GAP,
|
|
2502
2510
|
padding: "0.6rem 0.875rem",
|
|
2503
2511
|
border: "1px solid var(--border, #27272a)",
|
|
2504
|
-
borderRadius:
|
|
2512
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
2505
2513
|
background: "transparent",
|
|
2506
2514
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
2507
|
-
fontFamily:
|
|
2508
|
-
fontSize: 12,
|
|
2515
|
+
fontFamily: SIGNIN_FONT,
|
|
2516
|
+
fontSize: signinSize(12),
|
|
2509
2517
|
textDecoration: "none"
|
|
2510
2518
|
});
|
|
2511
2519
|
if (providers === null) {
|
|
@@ -2984,10 +2992,10 @@ function FlowHeader({
|
|
|
2984
2992
|
{
|
|
2985
2993
|
style: {
|
|
2986
2994
|
color: "var(--primary, #f97316)",
|
|
2987
|
-
fontFamily:
|
|
2988
|
-
fontSize: 10,
|
|
2989
|
-
letterSpacing: "0.18em",
|
|
2990
|
-
textTransform:
|
|
2995
|
+
fontFamily: SIGNIN_FONT,
|
|
2996
|
+
fontSize: signinSize(10),
|
|
2997
|
+
letterSpacing: signinTracking("0.18em"),
|
|
2998
|
+
textTransform: SIGNIN_CASE,
|
|
2991
2999
|
marginBottom: 6
|
|
2992
3000
|
},
|
|
2993
3001
|
children: label
|
|
@@ -3016,10 +3024,10 @@ var linkButtonStyle = {
|
|
|
3016
3024
|
background: "transparent",
|
|
3017
3025
|
border: "none",
|
|
3018
3026
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3019
|
-
fontFamily:
|
|
3020
|
-
fontSize: 11,
|
|
3021
|
-
letterSpacing: "0.12em",
|
|
3022
|
-
textTransform:
|
|
3027
|
+
fontFamily: SIGNIN_FONT,
|
|
3028
|
+
fontSize: signinSize(11),
|
|
3029
|
+
letterSpacing: signinTracking("0.12em"),
|
|
3030
|
+
textTransform: SIGNIN_CASE,
|
|
3023
3031
|
cursor: "pointer",
|
|
3024
3032
|
padding: 0
|
|
3025
3033
|
};
|
|
@@ -3034,10 +3042,10 @@ function Label({
|
|
|
3034
3042
|
style: {
|
|
3035
3043
|
display: "block",
|
|
3036
3044
|
color: "var(--foreground, #fafafa)",
|
|
3037
|
-
fontFamily:
|
|
3038
|
-
fontSize: 11,
|
|
3039
|
-
letterSpacing: "0.12em",
|
|
3040
|
-
textTransform:
|
|
3045
|
+
fontFamily: SIGNIN_FONT,
|
|
3046
|
+
fontSize: signinSize(11),
|
|
3047
|
+
letterSpacing: signinTracking("0.12em"),
|
|
3048
|
+
textTransform: SIGNIN_CASE,
|
|
3041
3049
|
marginBottom: 6
|
|
3042
3050
|
},
|
|
3043
3051
|
children
|
|
@@ -3050,8 +3058,8 @@ var inputStyle2 = {
|
|
|
3050
3058
|
background: "var(--background, #0a0a0a)",
|
|
3051
3059
|
color: "var(--foreground, #fafafa)",
|
|
3052
3060
|
border: "1px solid var(--input, #27272a)",
|
|
3053
|
-
borderRadius: 6,
|
|
3054
|
-
fontFamily:
|
|
3061
|
+
borderRadius: signinRadius(6),
|
|
3062
|
+
fontFamily: SIGNIN_FONT,
|
|
3055
3063
|
// 16px — never below it. A sub-16px font-size makes iOS Safari
|
|
3056
3064
|
// auto-zoom the viewport on focus; the family rule is >=16px on
|
|
3057
3065
|
// every form field. Desktop reads fine at 16 too.
|
|
@@ -3068,8 +3076,8 @@ var linkAlsoStyle = {
|
|
|
3068
3076
|
paddingTop: 14,
|
|
3069
3077
|
borderTop: "1px solid var(--border, #27272a)",
|
|
3070
3078
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3071
|
-
fontFamily:
|
|
3072
|
-
fontSize: 12,
|
|
3079
|
+
fontFamily: SIGNIN_FONT,
|
|
3080
|
+
fontSize: signinSize(12),
|
|
3073
3081
|
lineHeight: 1.5,
|
|
3074
3082
|
cursor: "pointer"
|
|
3075
3083
|
};
|
|
@@ -3080,12 +3088,12 @@ function submitStyle(disabled) {
|
|
|
3080
3088
|
background: "var(--primary, #f97316)",
|
|
3081
3089
|
color: "var(--primary-foreground, #0a0a0a)",
|
|
3082
3090
|
border: "none",
|
|
3083
|
-
borderRadius:
|
|
3084
|
-
fontFamily:
|
|
3085
|
-
fontSize: 11,
|
|
3086
|
-
letterSpacing: "0.14em",
|
|
3087
|
-
textTransform:
|
|
3088
|
-
fontWeight:
|
|
3091
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
3092
|
+
fontFamily: SIGNIN_FONT,
|
|
3093
|
+
fontSize: signinSize(11),
|
|
3094
|
+
letterSpacing: signinTracking("0.14em"),
|
|
3095
|
+
textTransform: SIGNIN_CASE,
|
|
3096
|
+
fontWeight: SIGNIN_STRONG,
|
|
3089
3097
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
3090
3098
|
opacity: disabled ? 0.5 : 1,
|
|
3091
3099
|
width: "100%"
|
|
@@ -3100,8 +3108,8 @@ function ErrorLine2({ children }) {
|
|
|
3100
3108
|
marginTop: 6,
|
|
3101
3109
|
marginBottom: 0,
|
|
3102
3110
|
color: "var(--destructive, #ef4444)",
|
|
3103
|
-
fontFamily:
|
|
3104
|
-
fontSize: 11,
|
|
3111
|
+
fontFamily: SIGNIN_FONT,
|
|
3112
|
+
fontSize: signinSize(11),
|
|
3105
3113
|
letterSpacing: "0.04em"
|
|
3106
3114
|
},
|
|
3107
3115
|
children
|
|
@@ -3116,7 +3124,7 @@ function Hint({ children }) {
|
|
|
3116
3124
|
marginTop: 12,
|
|
3117
3125
|
marginBottom: 0,
|
|
3118
3126
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3119
|
-
fontFamily:
|
|
3127
|
+
fontFamily: SIGNIN_FONT,
|
|
3120
3128
|
fontSize: 10.5,
|
|
3121
3129
|
lineHeight: 1.55
|
|
3122
3130
|
},
|