@owlmeans/web-oauth 0.1.18-rc.19 → 0.1.18-rc.20

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/README.md CHANGED
@@ -6,7 +6,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
6
6
  your project's skill store (`.agents/skills/`):
7
7
 
8
8
  ```sh
9
- npx @owlmeans/agent-skills@^0.1.18-rc.47
9
+ npx @owlmeans/agent-skills@^0.1.18-rc.48
10
10
  ```
11
11
 
12
12
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-oauth",
4
- "version": "0.1.18-rc.19",
5
- "generatedAt": "2026-10-03T20:05:07.604Z",
4
+ "version": "0.1.18-rc.20",
5
+ "generatedAt": "2026-10-05T08:32:19.130Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/web-oauth
9
9
 
10
10
  **Layer:** Web (React, shadcn + Tailwind v4)
11
- **Install:** `"@owlmeans/web-oauth": "^0.1.18-rc.19"` in `dependencies`
11
+ **Install:** `"@owlmeans/web-oauth": "^0.1.18-rc.20"` in `dependencies`
12
12
  **Contracts:** `@owlmeans/oauth` — aliases, `makeOAuthProtocols`, `oauthFlow`, `ConsentView`
13
13
  **Server half:** `@owlmeans/server-oauth` (its `consentUrl`/`deviceUrl` must point at these screens)
14
14
 
@@ -0,0 +1,16 @@
1
+ import type { ConsentView } from '@owlmeans/oauth';
2
+ export type ConsentStage = 'checking' | 'signing-in' | 'loading' | 'ready' | 'deciding' | 'done' | 'error';
3
+ /** Why the screen cannot go on — the screen phrases each kind as ONE sentence, never the wire text. */
4
+ export type ConsentErrorKind = 'missing' | 'not-found' | 'expired' | 'forbidden' | 'failed';
5
+ export interface UseOAuthConsent {
6
+ stage: ConsentStage;
7
+ view: ConsentView | null;
8
+ /** The raw failure, for a log; what a person reads is `errorKind`. */
9
+ error: string | null;
10
+ errorKind: ConsentErrorKind | null;
11
+ approve: () => Promise<void>;
12
+ deny: () => Promise<void>;
13
+ /** Sign the current session out and go through the sign-in again, returning to this request. */
14
+ switchAccount: () => Promise<void>;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1G,uGAAuG;AACvG,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAA;AAE3F,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;IACxB,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,gGAAgG;IAChG,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":""}
@@ -1,18 +1,5 @@
1
- import type { ConsentView, OAuthEntrypointOptions } from '@owlmeans/oauth';
2
- export type ConsentStage = 'checking' | 'signing-in' | 'loading' | 'ready' | 'deciding' | 'done' | 'error';
3
- /** Why the screen cannot go on — the screen phrases each kind as ONE sentence, never the wire text. */
4
- export type ConsentErrorKind = 'missing' | 'not-found' | 'expired' | 'forbidden' | 'failed';
5
- export interface UseOAuthConsent {
6
- stage: ConsentStage;
7
- view: ConsentView | null;
8
- /** The raw failure, for a log; what a person reads is `errorKind`. */
9
- error: string | null;
10
- errorKind: ConsentErrorKind | null;
11
- approve: () => Promise<void>;
12
- deny: () => Promise<void>;
13
- /** Sign the current session out and go through the sign-in again, returning to this request. */
14
- switchAccount: () => Promise<void>;
15
- }
1
+ import { type OAuthEntrypointOptions } from '@owlmeans/oauth';
2
+ import type { UseOAuthConsent } from './types.js';
16
3
  /**
17
4
  * The whole consent screen's logic, headless — so the rendered component stays a thin shell over
18
5
  * whatever a consuming app's own primitives look like, the same split `@owlmeans/web-auth-token`
@@ -1 +1 @@
1
- {"version":3,"file":"use-oauth-consent.d.ts","sourceRoot":"","sources":["../../src/hooks/use-oauth-consent.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAI1E,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1G,uGAAuG;AACvG,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAA;AAE3F,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;IACxB,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,gGAAgG;IAChG,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC;AAQD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,GAAG,IAAI,YAAY,sBAAsB,KAAG,eAkHtF,CAAA"}
1
+ {"version":3,"file":"use-oauth-consent.d.ts","sourceRoot":"","sources":["../../src/hooks/use-oauth-consent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAyG,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAGpK,OAAO,KAAK,EAAkC,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,GAAG,IAAI,YAAY,sBAAsB,KAAG,eAkHtF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-oauth-consent.js","sourceRoot":"","sources":["../../src/hooks/use-oauth-consent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EACL,kBAAkB,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EACpF,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAmBnD,MAAM,WAAW,GAAG,CAAC,OAAe,EAAoB,EAAE,CACxD,OAAO,CAA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,CAAC,MAAO,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAC9F,CAAA;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,CAAC,CAAC,CAAA;QACT,CAAC;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;IAEf,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC3C,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE;YAAE,OAAM;QACrC,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,OAAO,CAAc,YAAY,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;YAClE,MAAM,cAAc,CAAC,GAAG,CAAC,CAAA;QAC3B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,CAAC,CAAC,CAAA;QACT,CAAC;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,OAAO;QACL,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS;QAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC;QAChC,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAC1B,aAAa;KACd,CAAA;AACH,CAAC,CAAA"}
package/build/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './consts.js';
2
2
  export * from './append.js';
3
3
  export * from './entrypoints.js';
4
4
  export * from './hooks/use-oauth-consent.js';
5
+ export type * from './hooks/types.js';
5
6
  export * from './components/index.js';
6
7
  export * from './i18n.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,mBAAmB,kBAAkB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAE5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/web-oauth",
3
- "version": "0.1.18-rc.19",
3
+ "version": "0.1.18-rc.20",
4
4
  "license": "MIT",
5
5
  "description": "The browser half of @owlmeans/oauth — the consent, device-code and done screens an OAuth 2.1 sign-in ends on, driven by the shared consent flow, plus the entrypoints and app-config helper that put them on a web app with no wiring beyond configuration.",
6
6
  "type": "module",
@@ -23,20 +23,20 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@owlmeans/auth-common": "^0.1.18-rc.45",
27
- "@owlmeans/client": "^0.1.18-rc.49",
28
- "@owlmeans/client-auth": "^0.1.18-rc.56",
29
- "@owlmeans/client-context": "^0.1.18-rc.46",
30
- "@owlmeans/client-entrypoint": "^0.1.18-rc.45",
31
- "@owlmeans/client-flow": "^0.1.18-rc.52",
32
- "@owlmeans/client-i18n": "^0.1.18-rc.48",
33
- "@owlmeans/context": "^0.1.18-rc.32",
34
- "@owlmeans/entrypoint": "^0.1.18-rc.39",
35
- "@owlmeans/error": "^0.1.18-rc.36",
36
- "@owlmeans/flow": "^0.1.18-rc.43",
37
- "@owlmeans/i18n": "^0.1.18-rc.37",
38
- "@owlmeans/oauth": "^0.1.18-rc.14",
39
- "@owlmeans/route": "^0.1.18-rc.33"
26
+ "@owlmeans/auth-common": "^0.1.18-rc.46",
27
+ "@owlmeans/client": "^0.1.18-rc.50",
28
+ "@owlmeans/client-auth": "^0.1.18-rc.57",
29
+ "@owlmeans/client-context": "^0.1.18-rc.47",
30
+ "@owlmeans/client-entrypoint": "^0.1.18-rc.46",
31
+ "@owlmeans/client-flow": "^0.1.18-rc.53",
32
+ "@owlmeans/client-i18n": "^0.1.18-rc.49",
33
+ "@owlmeans/context": "^0.1.18-rc.33",
34
+ "@owlmeans/entrypoint": "^0.1.18-rc.40",
35
+ "@owlmeans/error": "^0.1.18-rc.37",
36
+ "@owlmeans/flow": "^0.1.18-rc.44",
37
+ "@owlmeans/i18n": "^0.1.18-rc.38",
38
+ "@owlmeans/oauth": "^0.1.18-rc.15",
39
+ "@owlmeans/route": "^0.1.18-rc.34"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@radix-ui/react-label": "*",
@@ -50,26 +50,26 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@owlmeans/dep-config": "workspace:*",
53
- "@owlmeans/test-auth": "^0.1.18-rc.44",
54
- "@owlmeans/test-ui": "^0.1.18-rc.47",
55
- "@owlmeans/web-client": "^0.1.18-rc.59",
56
- "@owlmeans/web-flow": "^0.1.18-rc.51",
57
- "@radix-ui/react-label": "^2.1.0",
58
- "@radix-ui/react-slot": "^1.1.0",
59
- "@tailwindcss/vite": "^4.0.0",
60
- "@types/bun": "^1.4.0",
61
- "@types/react": "^19.2.17",
62
- "@types/react-dom": "^19.2.3",
63
- "@vitejs/plugin-react": "^6.0.3",
64
- "class-variance-authority": "^0.7.0",
65
- "clsx": "^2.1.0",
66
- "idb-keyval": "^6.2.1",
53
+ "@owlmeans/test-auth": "^0.1.18-rc.45",
54
+ "@owlmeans/test-ui": "^0.1.18-rc.48",
55
+ "@owlmeans/web-client": "^0.1.18-rc.60",
56
+ "@owlmeans/web-flow": "^0.1.18-rc.52",
57
+ "@radix-ui/react-label": "^2.1.15",
58
+ "@radix-ui/react-slot": "^1.3.3",
59
+ "@tailwindcss/vite": "^4.3.3",
60
+ "@types/bun": "^1.4.2",
61
+ "@types/react": "^19.3.0",
62
+ "@types/react-dom": "^19.3.0",
63
+ "@vitejs/plugin-react": "^6.1.1",
64
+ "class-variance-authority": "^0.7.1",
65
+ "clsx": "^2.1.1",
66
+ "idb-keyval": "^6.3.0",
67
67
  "nodemon": "^3.1.14",
68
- "playwright": "^1.61.1",
69
- "tailwind-merge": "^3.6.0",
70
- "tailwindcss": "^4.0.0",
68
+ "playwright": "^1.63.0",
69
+ "tailwind-merge": "^3.7.0",
70
+ "tailwindcss": "^4.3.3",
71
71
  "typescript": "^7.0.2",
72
- "vite": "^8.1.2"
72
+ "vite": "^8.3.2"
73
73
  },
74
74
  "publishConfig": {
75
75
  "access": "public"
@@ -0,0 +1,18 @@
1
+ import type { ConsentView } from '@owlmeans/oauth'
2
+
3
+ export type ConsentStage = 'checking' | 'signing-in' | 'loading' | 'ready' | 'deciding' | 'done' | 'error'
4
+
5
+ /** Why the screen cannot go on — the screen phrases each kind as ONE sentence, never the wire text. */
6
+ export type ConsentErrorKind = 'missing' | 'not-found' | 'expired' | 'forbidden' | 'failed'
7
+
8
+ export interface UseOAuthConsent {
9
+ stage: ConsentStage
10
+ view: ConsentView | null
11
+ /** The raw failure, for a log; what a person reads is `errorKind`. */
12
+ error: string | null
13
+ errorKind: ConsentErrorKind | null
14
+ approve: () => Promise<void>
15
+ deny: () => Promise<void>
16
+ /** Sign the current session out and go through the sign-in again, returning to this request. */
17
+ switchAccount: () => Promise<void>
18
+ }
@@ -6,29 +6,10 @@ import { DISPATCHER } from '@owlmeans/auth'
6
6
  import { suspendFlow } from '@owlmeans/client-flow'
7
7
  import { makeFlowModel } from '@owlmeans/flow'
8
8
  import { ResilientError } from '@owlmeans/error'
9
- import {
10
- makeOAuthProtocols, oauthFlow, OAuthFlowStep, OAUTH_PAYLOAD_KIND, OAUTH_PAYLOAD_REF
11
- } from '@owlmeans/oauth'
12
- import type { ConsentView, OAuthEntrypointOptions } from '@owlmeans/oauth'
9
+ import { makeOAuthProtocols, oauthFlow, OAuthFlowStep, OAUTH_PAYLOAD_KIND, OAUTH_PAYLOAD_REF, type ConsentView, type OAuthEntrypointOptions } from '@owlmeans/oauth'
13
10
  import type { ClientEntrypoint } from '@owlmeans/client-entrypoint'
14
11
  import { OAUTH_SUSPEND_TTL_MS } from '../consts.js'
15
-
16
- export type ConsentStage = 'checking' | 'signing-in' | 'loading' | 'ready' | 'deciding' | 'done' | 'error'
17
-
18
- /** Why the screen cannot go on — the screen phrases each kind as ONE sentence, never the wire text. */
19
- export type ConsentErrorKind = 'missing' | 'not-found' | 'expired' | 'forbidden' | 'failed'
20
-
21
- export interface UseOAuthConsent {
22
- stage: ConsentStage
23
- view: ConsentView | null
24
- /** The raw failure, for a log; what a person reads is `errorKind`. */
25
- error: string | null
26
- errorKind: ConsentErrorKind | null
27
- approve: () => Promise<void>
28
- deny: () => Promise<void>
29
- /** Sign the current session out and go through the sign-in again, returning to this request. */
30
- switchAccount: () => Promise<void>
31
- }
12
+ import type { ConsentErrorKind, ConsentStage, UseOAuthConsent } from './types.js'
32
13
 
33
14
  const errorKindOf = (message: string): ConsentErrorKind =>
34
15
  message.includes('request-expired') ? 'expired'
package/src/index.ts CHANGED
@@ -2,5 +2,6 @@ export * from './consts.js'
2
2
  export * from './append.js'
3
3
  export * from './entrypoints.js'
4
4
  export * from './hooks/use-oauth-consent.js'
5
+ export type * from './hooks/types.js'
5
6
  export * from './components/index.js'
6
7
  export * from './i18n.js'
@@ -0,0 +1 @@
1
+ declare module '*.css'