@edgespark/web 0.0.0-beta.c422625

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.
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const ar: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const de: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const enUS: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const es: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const fr: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const hi: AuthUILabels;
@@ -0,0 +1,21 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export { enUS } from './en-US';
3
+ export { zhCN } from './zh-CN';
4
+ export { ja } from './ja';
5
+ export { ko } from './ko';
6
+ export { es } from './es';
7
+ export { ptBR } from './pt-BR';
8
+ export { fr } from './fr';
9
+ export { de } from './de';
10
+ export { it } from './it';
11
+ export { ru } from './ru';
12
+ export { ar } from './ar';
13
+ export { hi } from './hi';
14
+ /**
15
+ * Returns the best locale preset for the browser's language preferences.
16
+ *
17
+ * Walks `navigator.languages` in preference order, checking each against
18
+ * available presets (exact match first, then base language code).
19
+ * Falls back to English if nothing matches.
20
+ */
21
+ export declare function detectLocale(): AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const it: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const ja: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const ko: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const ptBR: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const ru: AuthUILabels;
@@ -0,0 +1,2 @@
1
+ import { AuthUILabels } from '../auth-ui/types';
2
+ export declare const zhCN: AuthUILabels;
@@ -0,0 +1,5 @@
1
+ export type RedirectTarget = string | URL;
2
+ /**
3
+ * Resolves relative and absolute redirect targets against the current page URL.
4
+ */
5
+ export declare function resolveRedirectTarget(input: RedirectTarget): URL;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Recursively makes nested label/config objects optional while preserving key names.
3
+ */
4
+ export type DeepPartial<T> = {
5
+ [K in keyof T]?: T[K] extends object ? T[K] extends (...args: never[]) => unknown ? T[K] : DeepPartial<T[K]> : T[K];
6
+ };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@edgespark/web",
3
+ "version": "0.0.0-beta.c422625",
4
+ "private": false,
5
+ "description": "EdgeSpark web SDK: same-origin auth, API, and managed auth UI.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "dist/index.cjs",
9
+ "module": "dist/index.es.js",
10
+ "types": "dist/index.d.ts",
11
+ "sideEffects": [
12
+ "auth/styles/styles.css"
13
+ ],
14
+ "files": [
15
+ "dist",
16
+ "auth/styles/styles.css"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.es.js",
22
+ "require": "./dist/index.cjs",
23
+ "default": "./dist/index.es.js"
24
+ },
25
+ "./styles.css": "./auth/styles/styles.css",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "dependencies": {
29
+ "better-auth": "^1.5.6"
30
+ },
31
+ "devDependencies": {
32
+ "typescript": "^5.6.3",
33
+ "vite": "^5.4.0",
34
+ "vite-plugin-dts": "^4.2.3"
35
+ },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "scripts": {
40
+ "build": "pnpm run clean && pnpm exec vite build -c vite.config.ts",
41
+ "clean": "rm -rf dist",
42
+ "test": "node ./scripts/audit-auth-contract.mjs",
43
+ "typecheck": "pnpm exec tsc --noEmit && pnpm exec tsc --noEmit -p tsconfig.type-tests.json"
44
+ }
45
+ }