@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.js
CHANGED
|
@@ -1180,6 +1180,15 @@ var SUDO_ACCOUNT_MISMATCH_MESSAGE = "Switch this tab to that account first \u201
|
|
|
1180
1180
|
function isSudoAccountMismatch(body) {
|
|
1181
1181
|
return body?.reason === "sudo_account_mismatch";
|
|
1182
1182
|
}
|
|
1183
|
+
|
|
1184
|
+
// src/appearance.ts
|
|
1185
|
+
var SIGNIN_FONT = "var(--oc-signin-font, ui-monospace, SFMono-Regular, monospace)";
|
|
1186
|
+
var SIGNIN_CASE = "var(--oc-signin-case, uppercase)";
|
|
1187
|
+
var signinTracking = (em) => `var(--oc-signin-tracking, ${em})`;
|
|
1188
|
+
var signinSize = (px) => `calc(${px}px * var(--oc-signin-scale, 1))`;
|
|
1189
|
+
var signinRadius = (px) => `var(--oc-signin-radius, ${px}px)`;
|
|
1190
|
+
var SIGNIN_BUTTON_RADIUS = "var(--oc-signin-button-radius, 6px)";
|
|
1191
|
+
var SIGNIN_STRONG = "var(--oc-signin-strong, 600)";
|
|
1183
1192
|
var DEFAULT_AUTH_ORIGIN = "https://ochk.io";
|
|
1184
1193
|
async function fetchOcLinkedIdentities(opts) {
|
|
1185
1194
|
const authOrigin = opts?.authOrigin ?? DEFAULT_AUTH_ORIGIN;
|
|
@@ -1394,8 +1403,8 @@ function IdentityRow({
|
|
|
1394
1403
|
style: {
|
|
1395
1404
|
marginTop: 4,
|
|
1396
1405
|
color: V.foreground,
|
|
1397
|
-
fontFamily:
|
|
1398
|
-
fontSize: 12,
|
|
1406
|
+
fontFamily: SIGNIN_FONT,
|
|
1407
|
+
fontSize: signinSize(12),
|
|
1399
1408
|
wordBreak: "break-all"
|
|
1400
1409
|
},
|
|
1401
1410
|
children: display
|
|
@@ -1473,8 +1482,8 @@ function ConsolidationPanel({ entries }) {
|
|
|
1473
1482
|
gap: 8,
|
|
1474
1483
|
padding: "8px 0",
|
|
1475
1484
|
borderTop: `1px solid ${V.border}`,
|
|
1476
|
-
fontFamily:
|
|
1477
|
-
fontSize: 11
|
|
1485
|
+
fontFamily: SIGNIN_FONT,
|
|
1486
|
+
fontSize: signinSize(11)
|
|
1478
1487
|
},
|
|
1479
1488
|
children: [
|
|
1480
1489
|
/* @__PURE__ */ jsxRuntime.jsx("code", { style: { color: V.foreground, wordBreak: "break-all" }, children: e.did_oc }),
|
|
@@ -1777,7 +1786,7 @@ function BtcLinkForm({
|
|
|
1777
1786
|
placeholder: "bc1q\u2026",
|
|
1778
1787
|
autoCapitalize: "none",
|
|
1779
1788
|
spellCheck: false,
|
|
1780
|
-
style: { ...inputStyle, fontFamily:
|
|
1789
|
+
style: { ...inputStyle, fontFamily: SIGNIN_FONT }
|
|
1781
1790
|
}
|
|
1782
1791
|
),
|
|
1783
1792
|
err && /* @__PURE__ */ jsxRuntime.jsx(ErrorLine, { children: err }),
|
|
@@ -1807,7 +1816,7 @@ function BtcLinkForm({
|
|
|
1807
1816
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { style: bodyStyle, children: [
|
|
1808
1817
|
"Sign the challenge with the wallet that controls",
|
|
1809
1818
|
" ",
|
|
1810
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily:
|
|
1819
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: SIGNIN_FONT, wordBreak: "break-all" }, children: addr }),
|
|
1811
1820
|
"."
|
|
1812
1821
|
] }),
|
|
1813
1822
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1915,10 +1924,10 @@ function SectionLabel({
|
|
|
1915
1924
|
{
|
|
1916
1925
|
style: {
|
|
1917
1926
|
color,
|
|
1918
|
-
fontFamily:
|
|
1919
|
-
fontSize: 10,
|
|
1920
|
-
letterSpacing: "0.18em",
|
|
1921
|
-
textTransform:
|
|
1927
|
+
fontFamily: SIGNIN_FONT,
|
|
1928
|
+
fontSize: signinSize(10),
|
|
1929
|
+
letterSpacing: signinTracking("0.18em"),
|
|
1930
|
+
textTransform: SIGNIN_CASE,
|
|
1922
1931
|
marginBottom: 8
|
|
1923
1932
|
},
|
|
1924
1933
|
children
|
|
@@ -1933,8 +1942,8 @@ function ErrorLine({ children }) {
|
|
|
1933
1942
|
style: {
|
|
1934
1943
|
margin: "8px 0 0",
|
|
1935
1944
|
color: V.destructive,
|
|
1936
|
-
fontFamily:
|
|
1937
|
-
fontSize: 11
|
|
1945
|
+
fontFamily: SIGNIN_FONT,
|
|
1946
|
+
fontSize: signinSize(11)
|
|
1938
1947
|
},
|
|
1939
1948
|
children
|
|
1940
1949
|
}
|
|
@@ -1943,7 +1952,6 @@ function ErrorLine({ children }) {
|
|
|
1943
1952
|
function FormButtons({ children }) {
|
|
1944
1953
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 8, marginTop: 12 }, children });
|
|
1945
1954
|
}
|
|
1946
|
-
var MONO = "ui-monospace, SFMono-Regular, monospace";
|
|
1947
1955
|
var V = {
|
|
1948
1956
|
primary: "var(--primary, #f97316)",
|
|
1949
1957
|
foreground: "var(--foreground, #fafafa)",
|
|
@@ -1975,8 +1983,8 @@ var bodyStyle = {
|
|
|
1975
1983
|
};
|
|
1976
1984
|
var hintStyle = {
|
|
1977
1985
|
color: V.muted,
|
|
1978
|
-
fontFamily:
|
|
1979
|
-
fontSize: 10.5,
|
|
1986
|
+
fontFamily: SIGNIN_FONT,
|
|
1987
|
+
fontSize: signinSize(10.5),
|
|
1980
1988
|
opacity: 0.8
|
|
1981
1989
|
};
|
|
1982
1990
|
var rowStyle = {
|
|
@@ -1989,10 +1997,10 @@ var rowStyle = {
|
|
|
1989
1997
|
};
|
|
1990
1998
|
var rowLabelStyle = {
|
|
1991
1999
|
color: V.foreground,
|
|
1992
|
-
fontFamily:
|
|
1993
|
-
fontSize: 10.5,
|
|
1994
|
-
letterSpacing: "0.12em",
|
|
1995
|
-
textTransform:
|
|
2000
|
+
fontFamily: SIGNIN_FONT,
|
|
2001
|
+
fontSize: signinSize(10.5),
|
|
2002
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2003
|
+
textTransform: SIGNIN_CASE,
|
|
1996
2004
|
opacity: 0.8
|
|
1997
2005
|
};
|
|
1998
2006
|
var inputStyle = {
|
|
@@ -2001,8 +2009,8 @@ var inputStyle = {
|
|
|
2001
2009
|
background: V.background,
|
|
2002
2010
|
color: V.foreground,
|
|
2003
2011
|
border: `1px solid ${V.border}`,
|
|
2004
|
-
borderRadius: 6,
|
|
2005
|
-
fontFamily:
|
|
2012
|
+
borderRadius: signinRadius(6),
|
|
2013
|
+
fontFamily: SIGNIN_FONT,
|
|
2006
2014
|
// 16px — never lower · suppresses iOS Safari focus auto-zoom.
|
|
2007
2015
|
fontSize: 16,
|
|
2008
2016
|
outline: "none",
|
|
@@ -2011,11 +2019,11 @@ var inputStyle = {
|
|
|
2011
2019
|
function btnBase(disabled) {
|
|
2012
2020
|
return {
|
|
2013
2021
|
padding: "0.5rem 0.875rem",
|
|
2014
|
-
borderRadius:
|
|
2015
|
-
fontFamily:
|
|
2016
|
-
fontSize: 10.5,
|
|
2017
|
-
letterSpacing: "0.12em",
|
|
2018
|
-
textTransform:
|
|
2022
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
2023
|
+
fontFamily: SIGNIN_FONT,
|
|
2024
|
+
fontSize: signinSize(10.5),
|
|
2025
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2026
|
+
textTransform: SIGNIN_CASE,
|
|
2019
2027
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
2020
2028
|
opacity: disabled ? 0.5 : 1
|
|
2021
2029
|
};
|
|
@@ -2235,8 +2243,8 @@ function OcSignIn({
|
|
|
2235
2243
|
padding: "1rem",
|
|
2236
2244
|
border: "1px solid var(--border, #27272a)",
|
|
2237
2245
|
color: "var(--foreground, #fafafa)",
|
|
2238
|
-
fontFamily:
|
|
2239
|
-
fontSize: 12
|
|
2246
|
+
fontFamily: SIGNIN_FONT,
|
|
2247
|
+
fontSize: signinSize(12)
|
|
2240
2248
|
},
|
|
2241
2249
|
children: [
|
|
2242
2250
|
"no signin paths enabled \u2014 set ",
|
|
@@ -2274,10 +2282,10 @@ function OcSignIn({
|
|
|
2274
2282
|
marginBottom: 14,
|
|
2275
2283
|
padding: "0.6rem 0.75rem",
|
|
2276
2284
|
border: "1px solid var(--destructive, #ef4444)",
|
|
2277
|
-
borderRadius: 6,
|
|
2285
|
+
borderRadius: signinRadius(6),
|
|
2278
2286
|
color: "var(--destructive, #ef4444)",
|
|
2279
|
-
fontFamily:
|
|
2280
|
-
fontSize: 11
|
|
2287
|
+
fontFamily: SIGNIN_FONT,
|
|
2288
|
+
fontSize: signinSize(11)
|
|
2281
2289
|
},
|
|
2282
2290
|
children: "That sign-in didn't finish. Try again, or use another way below."
|
|
2283
2291
|
}
|
|
@@ -2291,11 +2299,11 @@ function OcSignIn({
|
|
|
2291
2299
|
padding: "0.6rem 0.75rem",
|
|
2292
2300
|
border: "1px solid var(--primary, #f97316)",
|
|
2293
2301
|
borderLeftWidth: 3,
|
|
2294
|
-
borderRadius: 4,
|
|
2302
|
+
borderRadius: signinRadius(4),
|
|
2295
2303
|
background: "color-mix(in srgb, var(--primary, #f97316) 8%, transparent)",
|
|
2296
2304
|
color: "var(--foreground, #fafafa)",
|
|
2297
|
-
fontFamily:
|
|
2298
|
-
fontSize: 11,
|
|
2305
|
+
fontFamily: SIGNIN_FONT,
|
|
2306
|
+
fontSize: signinSize(11),
|
|
2299
2307
|
lineHeight: 1.6
|
|
2300
2308
|
},
|
|
2301
2309
|
children: [
|
|
@@ -2304,9 +2312,9 @@ function OcSignIn({
|
|
|
2304
2312
|
{
|
|
2305
2313
|
style: {
|
|
2306
2314
|
color: "var(--primary, #f97316)",
|
|
2307
|
-
letterSpacing: "0.12em",
|
|
2308
|
-
textTransform:
|
|
2309
|
-
fontSize: 10,
|
|
2315
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2316
|
+
textTransform: SIGNIN_CASE,
|
|
2317
|
+
fontSize: signinSize(10),
|
|
2310
2318
|
display: "block",
|
|
2311
2319
|
marginBottom: 3
|
|
2312
2320
|
},
|
|
@@ -2435,10 +2443,10 @@ function SigninTab({
|
|
|
2435
2443
|
border: "none",
|
|
2436
2444
|
borderBottom: active ? "2px solid var(--primary, #f97316)" : "2px solid transparent",
|
|
2437
2445
|
color: active ? "var(--foreground, #fafafa)" : "var(--muted-foreground, #a1a1aa)",
|
|
2438
|
-
fontFamily:
|
|
2439
|
-
fontSize: 11,
|
|
2440
|
-
letterSpacing: "0.12em",
|
|
2441
|
-
textTransform:
|
|
2446
|
+
fontFamily: SIGNIN_FONT,
|
|
2447
|
+
fontSize: signinSize(11),
|
|
2448
|
+
letterSpacing: signinTracking("0.12em"),
|
|
2449
|
+
textTransform: SIGNIN_CASE,
|
|
2442
2450
|
cursor: "pointer",
|
|
2443
2451
|
marginBottom: -1
|
|
2444
2452
|
},
|
|
@@ -2500,10 +2508,10 @@ function ProviderSignIn({
|
|
|
2500
2508
|
// marginTop owns the gap above, so the divider only pads below.
|
|
2501
2509
|
margin: first ? `${BLOCK_GAP}px 0` : `0 0 ${BLOCK_GAP}px`,
|
|
2502
2510
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
2503
|
-
fontFamily:
|
|
2504
|
-
fontSize: 10,
|
|
2505
|
-
letterSpacing: "0.16em",
|
|
2506
|
-
textTransform:
|
|
2511
|
+
fontFamily: SIGNIN_FONT,
|
|
2512
|
+
fontSize: signinSize(10),
|
|
2513
|
+
letterSpacing: signinTracking("0.16em"),
|
|
2514
|
+
textTransform: SIGNIN_CASE
|
|
2507
2515
|
},
|
|
2508
2516
|
children: [
|
|
2509
2517
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: line }),
|
|
@@ -2523,11 +2531,11 @@ function ProviderSignIn({
|
|
|
2523
2531
|
marginTop: i === 0 ? 0 : BUTTON_GAP,
|
|
2524
2532
|
padding: "0.6rem 0.875rem",
|
|
2525
2533
|
border: "1px solid var(--border, #27272a)",
|
|
2526
|
-
borderRadius:
|
|
2534
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
2527
2535
|
background: "transparent",
|
|
2528
2536
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
2529
|
-
fontFamily:
|
|
2530
|
-
fontSize: 12,
|
|
2537
|
+
fontFamily: SIGNIN_FONT,
|
|
2538
|
+
fontSize: signinSize(12),
|
|
2531
2539
|
textDecoration: "none"
|
|
2532
2540
|
});
|
|
2533
2541
|
if (providers === null) {
|
|
@@ -3006,10 +3014,10 @@ function FlowHeader({
|
|
|
3006
3014
|
{
|
|
3007
3015
|
style: {
|
|
3008
3016
|
color: "var(--primary, #f97316)",
|
|
3009
|
-
fontFamily:
|
|
3010
|
-
fontSize: 10,
|
|
3011
|
-
letterSpacing: "0.18em",
|
|
3012
|
-
textTransform:
|
|
3017
|
+
fontFamily: SIGNIN_FONT,
|
|
3018
|
+
fontSize: signinSize(10),
|
|
3019
|
+
letterSpacing: signinTracking("0.18em"),
|
|
3020
|
+
textTransform: SIGNIN_CASE,
|
|
3013
3021
|
marginBottom: 6
|
|
3014
3022
|
},
|
|
3015
3023
|
children: label
|
|
@@ -3038,10 +3046,10 @@ var linkButtonStyle = {
|
|
|
3038
3046
|
background: "transparent",
|
|
3039
3047
|
border: "none",
|
|
3040
3048
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3041
|
-
fontFamily:
|
|
3042
|
-
fontSize: 11,
|
|
3043
|
-
letterSpacing: "0.12em",
|
|
3044
|
-
textTransform:
|
|
3049
|
+
fontFamily: SIGNIN_FONT,
|
|
3050
|
+
fontSize: signinSize(11),
|
|
3051
|
+
letterSpacing: signinTracking("0.12em"),
|
|
3052
|
+
textTransform: SIGNIN_CASE,
|
|
3045
3053
|
cursor: "pointer",
|
|
3046
3054
|
padding: 0
|
|
3047
3055
|
};
|
|
@@ -3056,10 +3064,10 @@ function Label({
|
|
|
3056
3064
|
style: {
|
|
3057
3065
|
display: "block",
|
|
3058
3066
|
color: "var(--foreground, #fafafa)",
|
|
3059
|
-
fontFamily:
|
|
3060
|
-
fontSize: 11,
|
|
3061
|
-
letterSpacing: "0.12em",
|
|
3062
|
-
textTransform:
|
|
3067
|
+
fontFamily: SIGNIN_FONT,
|
|
3068
|
+
fontSize: signinSize(11),
|
|
3069
|
+
letterSpacing: signinTracking("0.12em"),
|
|
3070
|
+
textTransform: SIGNIN_CASE,
|
|
3063
3071
|
marginBottom: 6
|
|
3064
3072
|
},
|
|
3065
3073
|
children
|
|
@@ -3072,8 +3080,8 @@ var inputStyle2 = {
|
|
|
3072
3080
|
background: "var(--background, #0a0a0a)",
|
|
3073
3081
|
color: "var(--foreground, #fafafa)",
|
|
3074
3082
|
border: "1px solid var(--input, #27272a)",
|
|
3075
|
-
borderRadius: 6,
|
|
3076
|
-
fontFamily:
|
|
3083
|
+
borderRadius: signinRadius(6),
|
|
3084
|
+
fontFamily: SIGNIN_FONT,
|
|
3077
3085
|
// 16px — never below it. A sub-16px font-size makes iOS Safari
|
|
3078
3086
|
// auto-zoom the viewport on focus; the family rule is >=16px on
|
|
3079
3087
|
// every form field. Desktop reads fine at 16 too.
|
|
@@ -3090,8 +3098,8 @@ var linkAlsoStyle = {
|
|
|
3090
3098
|
paddingTop: 14,
|
|
3091
3099
|
borderTop: "1px solid var(--border, #27272a)",
|
|
3092
3100
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3093
|
-
fontFamily:
|
|
3094
|
-
fontSize: 12,
|
|
3101
|
+
fontFamily: SIGNIN_FONT,
|
|
3102
|
+
fontSize: signinSize(12),
|
|
3095
3103
|
lineHeight: 1.5,
|
|
3096
3104
|
cursor: "pointer"
|
|
3097
3105
|
};
|
|
@@ -3102,12 +3110,12 @@ function submitStyle(disabled) {
|
|
|
3102
3110
|
background: "var(--primary, #f97316)",
|
|
3103
3111
|
color: "var(--primary-foreground, #0a0a0a)",
|
|
3104
3112
|
border: "none",
|
|
3105
|
-
borderRadius:
|
|
3106
|
-
fontFamily:
|
|
3107
|
-
fontSize: 11,
|
|
3108
|
-
letterSpacing: "0.14em",
|
|
3109
|
-
textTransform:
|
|
3110
|
-
fontWeight:
|
|
3113
|
+
borderRadius: SIGNIN_BUTTON_RADIUS,
|
|
3114
|
+
fontFamily: SIGNIN_FONT,
|
|
3115
|
+
fontSize: signinSize(11),
|
|
3116
|
+
letterSpacing: signinTracking("0.14em"),
|
|
3117
|
+
textTransform: SIGNIN_CASE,
|
|
3118
|
+
fontWeight: SIGNIN_STRONG,
|
|
3111
3119
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
3112
3120
|
opacity: disabled ? 0.5 : 1,
|
|
3113
3121
|
width: "100%"
|
|
@@ -3122,8 +3130,8 @@ function ErrorLine2({ children }) {
|
|
|
3122
3130
|
marginTop: 6,
|
|
3123
3131
|
marginBottom: 0,
|
|
3124
3132
|
color: "var(--destructive, #ef4444)",
|
|
3125
|
-
fontFamily:
|
|
3126
|
-
fontSize: 11,
|
|
3133
|
+
fontFamily: SIGNIN_FONT,
|
|
3134
|
+
fontSize: signinSize(11),
|
|
3127
3135
|
letterSpacing: "0.04em"
|
|
3128
3136
|
},
|
|
3129
3137
|
children
|
|
@@ -3138,7 +3146,7 @@ function Hint({ children }) {
|
|
|
3138
3146
|
marginTop: 12,
|
|
3139
3147
|
marginBottom: 0,
|
|
3140
3148
|
color: "var(--muted-foreground, #a1a1aa)",
|
|
3141
|
-
fontFamily:
|
|
3149
|
+
fontFamily: SIGNIN_FONT,
|
|
3142
3150
|
fontSize: 10.5,
|
|
3143
3151
|
lineHeight: 1.55
|
|
3144
3152
|
},
|