@_mustachio/openauth 0.6.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.
Files changed (192) hide show
  1. package/dist/esm/client.js +186 -0
  2. package/dist/esm/css.d.js +0 -0
  3. package/dist/esm/error.js +73 -0
  4. package/dist/esm/index.js +14 -0
  5. package/dist/esm/issuer.js +558 -0
  6. package/dist/esm/jwt.js +16 -0
  7. package/dist/esm/keys.js +113 -0
  8. package/dist/esm/pkce.js +35 -0
  9. package/dist/esm/provider/apple.js +28 -0
  10. package/dist/esm/provider/arctic.js +43 -0
  11. package/dist/esm/provider/code.js +58 -0
  12. package/dist/esm/provider/cognito.js +16 -0
  13. package/dist/esm/provider/discord.js +15 -0
  14. package/dist/esm/provider/facebook.js +24 -0
  15. package/dist/esm/provider/github.js +15 -0
  16. package/dist/esm/provider/google.js +25 -0
  17. package/dist/esm/provider/index.js +3 -0
  18. package/dist/esm/provider/jumpcloud.js +15 -0
  19. package/dist/esm/provider/keycloak.js +15 -0
  20. package/dist/esm/provider/linkedin.js +15 -0
  21. package/dist/esm/provider/m2m.js +17 -0
  22. package/dist/esm/provider/microsoft.js +24 -0
  23. package/dist/esm/provider/oauth2.js +119 -0
  24. package/dist/esm/provider/oidc.js +69 -0
  25. package/dist/esm/provider/passkey.js +315 -0
  26. package/dist/esm/provider/password.js +306 -0
  27. package/dist/esm/provider/provider.js +10 -0
  28. package/dist/esm/provider/slack.js +15 -0
  29. package/dist/esm/provider/spotify.js +15 -0
  30. package/dist/esm/provider/twitch.js +15 -0
  31. package/dist/esm/provider/x.js +16 -0
  32. package/dist/esm/provider/yahoo.js +15 -0
  33. package/dist/esm/random.js +27 -0
  34. package/dist/esm/storage/aws.js +39 -0
  35. package/dist/esm/storage/cloudflare.js +42 -0
  36. package/dist/esm/storage/dynamo.js +116 -0
  37. package/dist/esm/storage/memory.js +88 -0
  38. package/dist/esm/storage/storage.js +36 -0
  39. package/dist/esm/subject.js +7 -0
  40. package/dist/esm/ui/base.js +407 -0
  41. package/dist/esm/ui/code.js +151 -0
  42. package/dist/esm/ui/form.js +43 -0
  43. package/dist/esm/ui/icon.js +92 -0
  44. package/dist/esm/ui/passkey.js +329 -0
  45. package/dist/esm/ui/password.js +338 -0
  46. package/dist/esm/ui/select.js +187 -0
  47. package/dist/esm/ui/theme.js +115 -0
  48. package/dist/esm/util.js +54 -0
  49. package/dist/types/client.d.ts +466 -0
  50. package/dist/types/client.d.ts.map +1 -0
  51. package/dist/types/error.d.ts +77 -0
  52. package/dist/types/error.d.ts.map +1 -0
  53. package/dist/types/index.d.ts +20 -0
  54. package/dist/types/index.d.ts.map +1 -0
  55. package/dist/types/issuer.d.ts +465 -0
  56. package/dist/types/issuer.d.ts.map +1 -0
  57. package/dist/types/jwt.d.ts +6 -0
  58. package/dist/types/jwt.d.ts.map +1 -0
  59. package/dist/types/keys.d.ts +18 -0
  60. package/dist/types/keys.d.ts.map +1 -0
  61. package/dist/types/pkce.d.ts +7 -0
  62. package/dist/types/pkce.d.ts.map +1 -0
  63. package/dist/types/provider/apple.d.ts +108 -0
  64. package/dist/types/provider/apple.d.ts.map +1 -0
  65. package/dist/types/provider/arctic.d.ts +16 -0
  66. package/dist/types/provider/arctic.d.ts.map +1 -0
  67. package/dist/types/provider/code.d.ts +74 -0
  68. package/dist/types/provider/code.d.ts.map +1 -0
  69. package/dist/types/provider/cognito.d.ts +64 -0
  70. package/dist/types/provider/cognito.d.ts.map +1 -0
  71. package/dist/types/provider/discord.d.ts +38 -0
  72. package/dist/types/provider/discord.d.ts.map +1 -0
  73. package/dist/types/provider/facebook.d.ts +74 -0
  74. package/dist/types/provider/facebook.d.ts.map +1 -0
  75. package/dist/types/provider/github.d.ts +38 -0
  76. package/dist/types/provider/github.d.ts.map +1 -0
  77. package/dist/types/provider/google.d.ts +74 -0
  78. package/dist/types/provider/google.d.ts.map +1 -0
  79. package/dist/types/provider/index.d.ts +4 -0
  80. package/dist/types/provider/index.d.ts.map +1 -0
  81. package/dist/types/provider/jumpcloud.d.ts +38 -0
  82. package/dist/types/provider/jumpcloud.d.ts.map +1 -0
  83. package/dist/types/provider/keycloak.d.ts +67 -0
  84. package/dist/types/provider/keycloak.d.ts.map +1 -0
  85. package/dist/types/provider/linkedin.d.ts +6 -0
  86. package/dist/types/provider/linkedin.d.ts.map +1 -0
  87. package/dist/types/provider/m2m.d.ts +34 -0
  88. package/dist/types/provider/m2m.d.ts.map +1 -0
  89. package/dist/types/provider/microsoft.d.ts +89 -0
  90. package/dist/types/provider/microsoft.d.ts.map +1 -0
  91. package/dist/types/provider/oauth2.d.ts +133 -0
  92. package/dist/types/provider/oauth2.d.ts.map +1 -0
  93. package/dist/types/provider/oidc.d.ts +91 -0
  94. package/dist/types/provider/oidc.d.ts.map +1 -0
  95. package/dist/types/provider/passkey.d.ts +143 -0
  96. package/dist/types/provider/passkey.d.ts.map +1 -0
  97. package/dist/types/provider/password.d.ts +210 -0
  98. package/dist/types/provider/password.d.ts.map +1 -0
  99. package/dist/types/provider/provider.d.ts +29 -0
  100. package/dist/types/provider/provider.d.ts.map +1 -0
  101. package/dist/types/provider/slack.d.ts +59 -0
  102. package/dist/types/provider/slack.d.ts.map +1 -0
  103. package/dist/types/provider/spotify.d.ts +38 -0
  104. package/dist/types/provider/spotify.d.ts.map +1 -0
  105. package/dist/types/provider/twitch.d.ts +38 -0
  106. package/dist/types/provider/twitch.d.ts.map +1 -0
  107. package/dist/types/provider/x.d.ts +38 -0
  108. package/dist/types/provider/x.d.ts.map +1 -0
  109. package/dist/types/provider/yahoo.d.ts +38 -0
  110. package/dist/types/provider/yahoo.d.ts.map +1 -0
  111. package/dist/types/random.d.ts +3 -0
  112. package/dist/types/random.d.ts.map +1 -0
  113. package/dist/types/storage/aws.d.ts +4 -0
  114. package/dist/types/storage/aws.d.ts.map +1 -0
  115. package/dist/types/storage/cloudflare.d.ts +34 -0
  116. package/dist/types/storage/cloudflare.d.ts.map +1 -0
  117. package/dist/types/storage/dynamo.d.ts +65 -0
  118. package/dist/types/storage/dynamo.d.ts.map +1 -0
  119. package/dist/types/storage/memory.d.ts +49 -0
  120. package/dist/types/storage/memory.d.ts.map +1 -0
  121. package/dist/types/storage/storage.d.ts +15 -0
  122. package/dist/types/storage/storage.d.ts.map +1 -0
  123. package/dist/types/subject.d.ts +122 -0
  124. package/dist/types/subject.d.ts.map +1 -0
  125. package/dist/types/ui/base.d.ts +5 -0
  126. package/dist/types/ui/base.d.ts.map +1 -0
  127. package/dist/types/ui/code.d.ts +104 -0
  128. package/dist/types/ui/code.d.ts.map +1 -0
  129. package/dist/types/ui/form.d.ts +6 -0
  130. package/dist/types/ui/form.d.ts.map +1 -0
  131. package/dist/types/ui/icon.d.ts +6 -0
  132. package/dist/types/ui/icon.d.ts.map +1 -0
  133. package/dist/types/ui/passkey.d.ts +5 -0
  134. package/dist/types/ui/passkey.d.ts.map +1 -0
  135. package/dist/types/ui/password.d.ts +139 -0
  136. package/dist/types/ui/password.d.ts.map +1 -0
  137. package/dist/types/ui/select.d.ts +55 -0
  138. package/dist/types/ui/select.d.ts.map +1 -0
  139. package/dist/types/ui/theme.d.ts +207 -0
  140. package/dist/types/ui/theme.d.ts.map +1 -0
  141. package/dist/types/util.d.ts +8 -0
  142. package/dist/types/util.d.ts.map +1 -0
  143. package/package.json +51 -0
  144. package/src/client.ts +749 -0
  145. package/src/css.d.ts +4 -0
  146. package/src/error.ts +120 -0
  147. package/src/index.ts +26 -0
  148. package/src/issuer.ts +1302 -0
  149. package/src/jwt.ts +17 -0
  150. package/src/keys.ts +139 -0
  151. package/src/pkce.ts +40 -0
  152. package/src/provider/apple.ts +127 -0
  153. package/src/provider/arctic.ts +66 -0
  154. package/src/provider/code.ts +227 -0
  155. package/src/provider/cognito.ts +74 -0
  156. package/src/provider/discord.ts +45 -0
  157. package/src/provider/facebook.ts +84 -0
  158. package/src/provider/github.ts +45 -0
  159. package/src/provider/google.ts +85 -0
  160. package/src/provider/index.ts +3 -0
  161. package/src/provider/jumpcloud.ts +45 -0
  162. package/src/provider/keycloak.ts +75 -0
  163. package/src/provider/linkedin.ts +12 -0
  164. package/src/provider/m2m.ts +56 -0
  165. package/src/provider/microsoft.ts +100 -0
  166. package/src/provider/oauth2.ts +297 -0
  167. package/src/provider/oidc.ts +179 -0
  168. package/src/provider/passkey.ts +655 -0
  169. package/src/provider/password.ts +672 -0
  170. package/src/provider/provider.ts +33 -0
  171. package/src/provider/slack.ts +67 -0
  172. package/src/provider/spotify.ts +45 -0
  173. package/src/provider/twitch.ts +45 -0
  174. package/src/provider/x.ts +46 -0
  175. package/src/provider/yahoo.ts +45 -0
  176. package/src/random.ts +24 -0
  177. package/src/storage/aws.ts +59 -0
  178. package/src/storage/cloudflare.ts +77 -0
  179. package/src/storage/dynamo.ts +193 -0
  180. package/src/storage/memory.ts +135 -0
  181. package/src/storage/storage.ts +46 -0
  182. package/src/subject.ts +130 -0
  183. package/src/ui/base.tsx +118 -0
  184. package/src/ui/code.tsx +215 -0
  185. package/src/ui/form.tsx +40 -0
  186. package/src/ui/icon.tsx +95 -0
  187. package/src/ui/passkey.tsx +321 -0
  188. package/src/ui/password.tsx +405 -0
  189. package/src/ui/select.tsx +221 -0
  190. package/src/ui/theme.ts +319 -0
  191. package/src/ui/ui.css +252 -0
  192. package/src/util.ts +58 -0
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Configure the UI that's used by the Password provider.
3
+ *
4
+ * ```ts {1,7-12}
5
+ * import { PasswordUI } from "@openauthjs/openauth/ui/password"
6
+ * import { PasswordProvider } from "@openauthjs/openauth/provider/password"
7
+ *
8
+ * export default issuer({
9
+ * providers: {
10
+ * password: PasswordAdapter(
11
+ * PasswordUI({
12
+ * copy: {
13
+ * error_email_taken: "This email is already taken."
14
+ * },
15
+ * sendCode: (email, code) => console.log(email, code)
16
+ * })
17
+ * )
18
+ * },
19
+ * // ...
20
+ * })
21
+ * ```
22
+ *
23
+ * @packageDocumentation
24
+ */
25
+ /** @jsxImportSource hono/jsx */
26
+ import { PasswordConfig } from "../provider/password.js";
27
+ import "./form.js";
28
+ declare const DEFAULT_COPY: {
29
+ /**
30
+ * Error message when email is already taken.
31
+ */
32
+ error_email_taken: string;
33
+ /**
34
+ * Error message when the confirmation code is incorrect.
35
+ */
36
+ error_invalid_code: string;
37
+ /**
38
+ * Error message when the email is invalid.
39
+ */
40
+ error_invalid_email: string;
41
+ /**
42
+ * Error message when the password is incorrect.
43
+ */
44
+ error_invalid_password: string;
45
+ /**
46
+ * Error message when the passwords do not match.
47
+ */
48
+ error_password_mismatch: string;
49
+ /**
50
+ * Error message when the user enters a password that fails validation.
51
+ */
52
+ error_validation_error: string;
53
+ /**
54
+ * Title of the register page.
55
+ */
56
+ register_title: string;
57
+ /**
58
+ * Description of the register page.
59
+ */
60
+ register_description: string;
61
+ /**
62
+ * Title of the login page.
63
+ */
64
+ login_title: string;
65
+ /**
66
+ * Description of the login page.
67
+ */
68
+ login_description: string;
69
+ /**
70
+ * Copy for the register button.
71
+ */
72
+ register: string;
73
+ /**
74
+ * Copy for the register link.
75
+ */
76
+ register_prompt: string;
77
+ /**
78
+ * Copy for the login link.
79
+ */
80
+ login_prompt: string;
81
+ /**
82
+ * Copy for the login button.
83
+ */
84
+ login: string;
85
+ /**
86
+ * Copy for the forgot password link.
87
+ */
88
+ change_prompt: string;
89
+ /**
90
+ * Copy for the resend code button.
91
+ */
92
+ code_resend: string;
93
+ /**
94
+ * Copy for the "Back to" link.
95
+ */
96
+ code_return: string;
97
+ /**
98
+ * Copy for the logo.
99
+ * @internal
100
+ */
101
+ logo: string;
102
+ /**
103
+ * Copy for the email input.
104
+ */
105
+ input_email: string;
106
+ /**
107
+ * Copy for the password input.
108
+ */
109
+ input_password: string;
110
+ /**
111
+ * Copy for the code input.
112
+ */
113
+ input_code: string;
114
+ /**
115
+ * Copy for the repeat password input.
116
+ */
117
+ input_repeat: string;
118
+ /**
119
+ * Copy for the continue button.
120
+ */
121
+ button_continue: string;
122
+ };
123
+ type PasswordUICopy = typeof DEFAULT_COPY;
124
+ /**
125
+ * Configure the password UI.
126
+ */
127
+ export interface PasswordUIOptions extends Pick<PasswordConfig, "sendCode" | "validatePassword"> {
128
+ /**
129
+ * Custom copy for the UI.
130
+ */
131
+ copy?: Partial<PasswordUICopy>;
132
+ }
133
+ /**
134
+ * Creates a UI for the Password provider flow.
135
+ * @param input - Configure the UI.
136
+ */
137
+ export declare function PasswordUI(input: PasswordUIOptions): PasswordConfig;
138
+ export {};
139
+ //# sourceMappingURL=password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../src/ui/password.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,gCAAgC;AAEhC,OAAO,EAEL,cAAc,EAGf,MAAM,yBAAyB,CAAA;AAEhC,OAAO,WAAW,CAAA;AAGlB,QAAA,MAAM,YAAY;IAChB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAOqB,CAAA;AAE1B,KAAK,cAAc,GAAG,OAAO,YAAY,CAAA;AAEzC;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,cAAc,EACd,UAAU,GAAG,kBAAkB,CAChC;IACC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC/B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,CAwPnE"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The UI that's displayed when loading the root page of the OpenAuth server. You can configure
3
+ * which providers should be displayed in the select UI.
4
+ *
5
+ * ```ts
6
+ * import { Select } from "@openauthjs/openauth/ui/select"
7
+ *
8
+ * export default issuer({
9
+ * select: Select({
10
+ * providers: {
11
+ * github: {
12
+ * hide: true
13
+ * },
14
+ * google: {
15
+ * display: "Google"
16
+ * }
17
+ * }
18
+ * })
19
+ * // ...
20
+ * })
21
+ * ```
22
+ *
23
+ * @packageDocumentation
24
+ */
25
+ /** @jsxImportSource hono/jsx */
26
+ export interface SelectProps {
27
+ /**
28
+ * An object with all the providers and their config; where the key is the provider name.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * {
33
+ * github: {
34
+ * hide: true
35
+ * },
36
+ * google: {
37
+ * display: "Google"
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ providers?: Record<string, {
43
+ /**
44
+ * Whether to hide the provider from the select UI.
45
+ * @default false
46
+ */
47
+ hide?: boolean;
48
+ /**
49
+ * The display name of the provider.
50
+ */
51
+ display?: string;
52
+ }>;
53
+ }
54
+ export declare function Select(props?: SelectProps): (providers: Record<string, string>, _req: Request) => Promise<Response>;
55
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/ui/select.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,gCAAgC;AAKhC,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,MAAM,CAChB,MAAM,EACN;QACE;;;WAGG;QACH,IAAI,CAAC,EAAE,OAAO,CAAA;QACd;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CACF,CAAA;CACF;AAED,wBAAgB,MAAM,CAAC,KAAK,CAAC,EAAE,WAAW,eAE3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAC3B,OAAO,KACZ,OAAO,CAAC,QAAQ,CAAC,CA6BrB"}
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Use one of the built-in themes.
3
+ *
4
+ * @example
5
+ *
6
+ * ```ts
7
+ * import { THEME_SST } from "@openauthjs/openauth/ui/theme"
8
+ *
9
+ * export default issuer({
10
+ * theme: THEME_SST,
11
+ * // ...
12
+ * })
13
+ * ```
14
+ *
15
+ * Or define your own.
16
+ *
17
+ * ```ts
18
+ * import type { Theme } from "@openauthjs/openauth/ui/theme"
19
+ *
20
+ * const MY_THEME: Theme = {
21
+ * title: "Acne",
22
+ * radius: "none",
23
+ * favicon: "https://www.example.com/favicon.svg",
24
+ * // ...
25
+ * }
26
+ *
27
+ * export default issuer({
28
+ * theme: MY_THEME,
29
+ * // ...
30
+ * })
31
+ * ```
32
+ *
33
+ * @packageDocumentation
34
+ */
35
+ /**
36
+ * A type to define values for light and dark mode.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * {
41
+ * light: "#FFF",
42
+ * dark: "#000"
43
+ * }
44
+ * ```
45
+ */
46
+ export interface ColorScheme {
47
+ /**
48
+ * The value for dark mode.
49
+ */
50
+ dark: string;
51
+ /**
52
+ * The value for light mode.
53
+ */
54
+ light: string;
55
+ }
56
+ /**
57
+ * A type to define your custom theme.
58
+ */
59
+ export interface Theme {
60
+ /**
61
+ * The name of your app. Also used as the title of the page.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * {
66
+ * title: "Acne"
67
+ * }
68
+ * ```
69
+ */
70
+ title?: string;
71
+ /**
72
+ * A URL to the favicon of your app.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * {
77
+ * favicon: "https://www.example.com/favicon.svg"
78
+ * }
79
+ * ```
80
+ */
81
+ favicon?: string;
82
+ /**
83
+ * The border radius of the UI elements.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * {
88
+ * radius: "none"
89
+ * }
90
+ * ```
91
+ */
92
+ radius?: "none" | "sm" | "md" | "lg" | "full";
93
+ /**
94
+ * The primary color of the theme.
95
+ *
96
+ * Takes a color or both light and dark colors.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * {
101
+ * primary: "#FF5E00"
102
+ * }
103
+ * ```
104
+ */
105
+ primary: string | ColorScheme;
106
+ /**
107
+ * The background color of the theme.
108
+ *
109
+ * Takes a color or both light and dark colors.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * {
114
+ * background: "#FFF"
115
+ * }
116
+ * ```
117
+ */
118
+ background?: string | ColorScheme;
119
+ /**
120
+ * A URL to the logo of your app.
121
+ *
122
+ * Takes a single image or both light and dark mode versions.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * {
127
+ * logo: "https://www.example.com/logo.svg"
128
+ * }
129
+ * ```
130
+ */
131
+ logo?: string | ColorScheme;
132
+ /**
133
+ * The font family and scale of the theme.
134
+ */
135
+ font?: {
136
+ /**
137
+ * The font family of the theme.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * {
142
+ * font: {
143
+ * family: "Geist Mono, monospace"
144
+ * }
145
+ * }
146
+ * ```
147
+ */
148
+ family?: string;
149
+ /**
150
+ * The font scale of the theme. Can be used to increase or decrease the font sizes across
151
+ * the UI.
152
+ *
153
+ * @default "1"
154
+ * @example
155
+ * ```ts
156
+ * {
157
+ * font: {
158
+ * scale: "1.25"
159
+ * }
160
+ * }
161
+ * ```
162
+ */
163
+ scale?: string;
164
+ };
165
+ /**
166
+ * Custom CSS that's added to the page in a `<style>` tag.
167
+ *
168
+ * This can be used to import custom fonts.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * {
173
+ * css: `@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@100;200;300;400;500;600;700;800;900&display=swap');`
174
+ * }
175
+ * ```
176
+ */
177
+ css?: string;
178
+ }
179
+ /**
180
+ * Built-in default OpenAuth theme.
181
+ */
182
+ export declare const THEME_OPENAUTH: Theme;
183
+ /**
184
+ * Built-in theme based on [Terminal](https://terminal.shop).
185
+ */
186
+ export declare const THEME_TERMINAL: Theme;
187
+ /**
188
+ * Built-in theme based on [SST](https://sst.dev).
189
+ */
190
+ export declare const THEME_SST: Theme;
191
+ /**
192
+ * Built-in theme based on [Supabase](https://supabase.com).
193
+ */
194
+ export declare const THEME_SUPABASE: Theme;
195
+ /**
196
+ * Built-in theme based on [Vercel](https://vercel.com).
197
+ */
198
+ export declare const THEME_VERCEL: Theme;
199
+ /**
200
+ * @internal
201
+ */
202
+ export declare function setTheme(value: Theme): void;
203
+ /**
204
+ * @internal
205
+ */
206
+ export declare function getTheme(): any;
207
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/ui/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;IAC7C;;;;;;;;;;;OAWG;IACH,OAAO,EAAE,MAAM,GAAG,WAAW,CAAA;IAC7B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IACjC;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE;QACL;;;;;;;;;;;WAWG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;QACf;;;;;;;;;;;;;WAaG;QACH,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAiB5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAmB5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAkBvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAqB1B,CAAA;AAID;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,QAGpC;AAED;;GAEG;AACH,wBAAgB,QAAQ,QAGvB"}
@@ -0,0 +1,8 @@
1
+ import type { Context } from "hono";
2
+ export type Prettify<T> = {
3
+ [K in keyof T]: T[K];
4
+ };
5
+ export declare function getRelativeUrl(ctx: Context, path: string): string;
6
+ export declare function isDomainMatch(a: string, b: string): boolean;
7
+ export declare function lazy<T>(fn: () => T): () => T;
8
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAA;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAMxD;AAuBD,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAY3D;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAQ5C"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@_mustachio/openauth",
3
+ "version": "0.6.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "bun run script/build.ts",
8
+ "test": "bun test"
9
+ },
10
+ "sideEffects": false,
11
+ "devDependencies": {
12
+ "@cloudflare/workers-types": "4.20241205.0",
13
+ "@tsconfig/node22": "22.0.0",
14
+ "@types/node": "22.10.1",
15
+ "arctic": "2.2.2",
16
+ "hono": "4.11.3",
17
+ "typescript": "5.6.3",
18
+ "valibot": "1.0.0-beta.15"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/esm/index.js",
23
+ "types": "./dist/types/index.d.ts"
24
+ },
25
+ "./*": {
26
+ "import": "./dist/esm/*.js",
27
+ "types": "./dist/types/*.d.ts"
28
+ },
29
+ "./ui": {
30
+ "import": "./dist/esm/ui/index.js",
31
+ "types": "./dist/types/ui/index.d.ts"
32
+ }
33
+ },
34
+ "peerDependencies": {
35
+ "arctic": "^2.2.2",
36
+ "hono": "^4.0.0"
37
+ },
38
+ "dependencies": {
39
+ "@simplewebauthn/server": "13.1.1",
40
+ "@standard-schema/spec": "1.0.0-beta.3",
41
+ "aws4fetch": "1.0.20",
42
+ "jose": "5.9.6"
43
+ },
44
+ "files": [
45
+ "src",
46
+ "dist"
47
+ ],
48
+ "publishConfig": {
49
+ "access": "public"
50
+ }
51
+ }