@kya-os/consent 0.2.2 → 0.3.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/README.md +344 -2
- package/dist/bundle/index.d.ts +48 -36
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +45 -33
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/bundle/shell.d.ts +7 -0
- package/dist/bundle/shell.d.ts.map +1 -1
- package/dist/bundle/shell.js +5 -0
- package/dist/bundle/shell.js.map +1 -1
- package/dist/cjs/bundle/index.js +14 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/shell.js +5 -0
- package/dist/cjs/bundle/shell.js.map +1 -1
- package/dist/cjs/components/consent-action-bar.js +66 -15
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +20 -10
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +57 -79
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +2 -2
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +187 -0
- package/dist/cjs/components/consent-duration.js.map +1 -0
- package/dist/cjs/components/consent-folder-scope.js +169 -0
- package/dist/cjs/components/consent-folder-scope.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +13 -2
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-grant-terms.js +321 -0
- package/dist/cjs/components/consent-grant-terms.js.map +1 -0
- package/dist/cjs/components/consent-headline.js +138 -0
- package/dist/cjs/components/consent-headline.js.map +1 -0
- package/dist/cjs/components/consent-input.js +47 -27
- package/dist/cjs/components/consent-input.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +79 -55
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +219 -0
- package/dist/cjs/components/consent-phone-handoff.js.map +1 -0
- package/dist/cjs/components/consent-request-expiry.js +159 -0
- package/dist/cjs/components/consent-request-expiry.js.map +1 -0
- package/dist/cjs/components/consent-revoke.js +308 -0
- package/dist/cjs/components/consent-revoke.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +3 -0
- package/dist/cjs/components/consent-shell.js.map +1 -1
- package/dist/cjs/components/consent-terms.js +2 -2
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +107 -0
- package/dist/cjs/components/consent-wallet-check.js.map +1 -0
- package/dist/cjs/components/consent-wallet-notice.js +189 -0
- package/dist/cjs/components/consent-wallet-notice.js.map +1 -0
- package/dist/cjs/components/consent-wallet-orb.js +273 -0
- package/dist/cjs/components/consent-wallet-orb.js.map +1 -0
- package/dist/cjs/components/consent-wallet-signature.js +104 -0
- package/dist/cjs/components/consent-wallet-signature.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +85 -0
- package/dist/cjs/components/grant-field-styles.js.map +1 -0
- package/dist/cjs/components/index.js +34 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +60 -2
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/template-link.js +32 -0
- package/dist/cjs/components/template-link.js.map +1 -0
- package/dist/cjs/components/wallet-globe.js +184 -0
- package/dist/cjs/components/wallet-globe.js.map +1 -0
- package/dist/cjs/components/wallet-icons.js +19 -0
- package/dist/cjs/components/wallet-icons.js.map +1 -0
- package/dist/cjs/components/wallet-status.js +34 -0
- package/dist/cjs/components/wallet-status.js.map +1 -0
- package/dist/cjs/copy/tokens.js +107 -1
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/grant/index.js +24 -0
- package/dist/cjs/grant/index.js.map +1 -0
- package/dist/cjs/grant/terms.js +148 -0
- package/dist/cjs/grant/terms.js.map +1 -0
- package/dist/cjs/identity/agent-identity.js +314 -0
- package/dist/cjs/identity/agent-identity.js.map +1 -0
- package/dist/cjs/identity/documents.js +212 -0
- package/dist/cjs/identity/documents.js.map +1 -0
- package/dist/cjs/identity/entity-card.js +128 -0
- package/dist/cjs/identity/entity-card.js.map +1 -0
- package/dist/cjs/identity/index.js +31 -0
- package/dist/cjs/identity/index.js.map +1 -0
- package/dist/cjs/identity/resolve.js +122 -0
- package/dist/cjs/identity/resolve.js.map +1 -0
- package/dist/cjs/identity/schemas.js +88 -0
- package/dist/cjs/identity/schemas.js.map +1 -0
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/cjs/mcp-app/types.js +1 -1
- package/dist/cjs/popup/launcher.js +3 -3
- package/dist/cjs/react/index.js +260 -25
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/templates/index.js +1 -1
- package/dist/cjs/types/index.js +1 -1
- package/dist/components/consent-action-bar.d.ts +17 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +67 -16
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts +3 -1
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +20 -10
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +23 -3
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +57 -79
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +1 -1
- package/dist/components/consent-checkbox.js +2 -2
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-duration.d.ts +64 -0
- package/dist/components/consent-duration.d.ts.map +1 -0
- package/dist/components/consent-duration.js +184 -0
- package/dist/components/consent-duration.js.map +1 -0
- package/dist/components/consent-folder-scope.d.ts +70 -0
- package/dist/components/consent-folder-scope.d.ts.map +1 -0
- package/dist/components/consent-folder-scope.js +166 -0
- package/dist/components/consent-folder-scope.js.map +1 -0
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +13 -2
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-grant-terms.d.ts +88 -0
- package/dist/components/consent-grant-terms.d.ts.map +1 -0
- package/dist/components/consent-grant-terms.js +318 -0
- package/dist/components/consent-grant-terms.js.map +1 -0
- package/dist/components/consent-headline.d.ts +42 -0
- package/dist/components/consent-headline.d.ts.map +1 -0
- package/dist/components/consent-headline.js +135 -0
- package/dist/components/consent-headline.js.map +1 -0
- package/dist/components/consent-input.d.ts +4 -4
- package/dist/components/consent-input.d.ts.map +1 -1
- package/dist/components/consent-input.js +49 -29
- package/dist/components/consent-input.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts +11 -6
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +81 -57
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-phone-handoff.d.ts +50 -0
- package/dist/components/consent-phone-handoff.d.ts.map +1 -0
- package/dist/components/consent-phone-handoff.js +215 -0
- package/dist/components/consent-phone-handoff.js.map +1 -0
- package/dist/components/consent-request-expiry.d.ts +52 -0
- package/dist/components/consent-request-expiry.d.ts.map +1 -0
- package/dist/components/consent-request-expiry.js +154 -0
- package/dist/components/consent-request-expiry.js.map +1 -0
- package/dist/components/consent-revoke.d.ts +53 -0
- package/dist/components/consent-revoke.d.ts.map +1 -0
- package/dist/components/consent-revoke.js +305 -0
- package/dist/components/consent-revoke.js.map +1 -0
- package/dist/components/consent-shell.d.ts.map +1 -1
- package/dist/components/consent-shell.js +3 -0
- package/dist/components/consent-shell.js.map +1 -1
- package/dist/components/consent-terms.d.ts +1 -1
- package/dist/components/consent-terms.js +2 -2
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.d.ts +45 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -0
- package/dist/components/consent-wallet-check.js +102 -0
- package/dist/components/consent-wallet-check.js.map +1 -0
- package/dist/components/consent-wallet-notice.d.ts +54 -0
- package/dist/components/consent-wallet-notice.d.ts.map +1 -0
- package/dist/components/consent-wallet-notice.js +186 -0
- package/dist/components/consent-wallet-notice.js.map +1 -0
- package/dist/components/consent-wallet-orb.d.ts +48 -0
- package/dist/components/consent-wallet-orb.d.ts.map +1 -0
- package/dist/components/consent-wallet-orb.js +269 -0
- package/dist/components/consent-wallet-orb.js.map +1 -0
- package/dist/components/consent-wallet-signature.d.ts +26 -0
- package/dist/components/consent-wallet-signature.d.ts.map +1 -0
- package/dist/components/consent-wallet-signature.js +101 -0
- package/dist/components/consent-wallet-signature.js.map +1 -0
- package/dist/components/grant-field-styles.d.ts +9 -0
- package/dist/components/grant-field-styles.d.ts.map +1 -0
- package/dist/components/grant-field-styles.js +82 -0
- package/dist/components/grant-field-styles.js.map +1 -0
- package/dist/components/index.d.ts +28 -17
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +31 -17
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +16 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +60 -2
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/template-link.d.ts +24 -0
- package/dist/components/template-link.d.ts.map +1 -0
- package/dist/components/template-link.js +29 -0
- package/dist/components/template-link.js.map +1 -0
- package/dist/components/wallet-globe.d.ts +29 -0
- package/dist/components/wallet-globe.d.ts.map +1 -0
- package/dist/components/wallet-globe.js +181 -0
- package/dist/components/wallet-globe.js.map +1 -0
- package/dist/components/wallet-icons.d.ts +16 -0
- package/dist/components/wallet-icons.d.ts.map +1 -0
- package/dist/components/wallet-icons.js +16 -0
- package/dist/components/wallet-icons.js.map +1 -0
- package/dist/components/wallet-status.d.ts +19 -0
- package/dist/components/wallet-status.d.ts.map +1 -0
- package/dist/components/wallet-status.js +29 -0
- package/dist/components/wallet-status.js.map +1 -0
- package/dist/consent.js +3547 -811
- package/dist/consent.min.js +1366 -295
- package/dist/copy/tokens.d.ts +107 -1
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +107 -1
- package/dist/copy/tokens.js.map +1 -1
- package/dist/grant/index.d.ts +8 -0
- package/dist/grant/index.d.ts.map +1 -0
- package/dist/grant/index.js +8 -0
- package/dist/grant/index.js.map +1 -0
- package/dist/grant/terms.d.ts +97 -0
- package/dist/grant/terms.d.ts.map +1 -0
- package/dist/grant/terms.js +139 -0
- package/dist/grant/terms.js.map +1 -0
- package/dist/identity/agent-identity.d.ts +199 -0
- package/dist/identity/agent-identity.d.ts.map +1 -0
- package/dist/identity/agent-identity.js +305 -0
- package/dist/identity/agent-identity.js.map +1 -0
- package/dist/identity/documents.d.ts +63 -0
- package/dist/identity/documents.d.ts.map +1 -0
- package/dist/identity/documents.js +206 -0
- package/dist/identity/documents.js.map +1 -0
- package/dist/identity/entity-card.d.ts +80 -0
- package/dist/identity/entity-card.d.ts.map +1 -0
- package/dist/identity/entity-card.js +119 -0
- package/dist/identity/entity-card.js.map +1 -0
- package/dist/identity/index.d.ts +15 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +15 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/resolve.d.ts +31 -0
- package/dist/identity/resolve.d.ts.map +1 -0
- package/dist/identity/resolve.js +119 -0
- package/dist/identity/resolve.js.map +1 -0
- package/dist/identity/schemas.d.ts +404 -0
- package/dist/identity/schemas.d.ts.map +1 -0
- package/dist/identity/schemas.js +84 -0
- package/dist/identity/schemas.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/kya-os/index.d.ts +55 -0
- package/dist/kya-os/index.d.ts.map +1 -0
- package/dist/kya-os/index.js +235 -0
- package/dist/kya-os/index.js.map +1 -0
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/mcp-app/types.d.ts +1 -1
- package/dist/mcp-app/types.js +1 -1
- package/dist/popup/launcher.d.ts +3 -3
- package/dist/popup/launcher.js +3 -3
- package/dist/react/index.d.ts +182 -22
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +270 -35
- package/dist/react/index.js.map +1 -1
- package/dist/templates/index.d.ts +1 -1
- package/dist/templates/index.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +49 -8
package/dist/react/index.js
CHANGED
|
@@ -1,25 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* `@kya-os/consent/react`
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* React components for every consent element, made with `@lit/react`.
|
|
5
|
+
* Each one sets props as element properties and takes `onX` handlers for
|
|
6
|
+
* the element's events, which React 18 can't do for a custom element.
|
|
7
|
+
* React 19 can, but only through the raw event name
|
|
8
|
+
* (`oncapabilities-allow`), so the wrappers keep the handlers typed there too.
|
|
9
|
+
*
|
|
10
|
+
* `react` and `@lit/react` are optional peer dependencies: install both to
|
|
11
|
+
* use this entry point. No other entry point imports either.
|
|
12
|
+
*
|
|
13
|
+
* `<consent-passkey>` has its own wrapper in `@kya-os/consent/passkey/react`,
|
|
14
|
+
* so this entry point never imports `@kya-os/id`.
|
|
6
15
|
*
|
|
7
16
|
* @module react
|
|
8
17
|
*/
|
|
9
|
-
import { createComponent } from
|
|
10
|
-
import * as React from
|
|
18
|
+
import { createComponent } from "@lit/react";
|
|
19
|
+
import * as React from "react";
|
|
11
20
|
// Core components
|
|
12
|
-
import { ConsentButton } from
|
|
13
|
-
import { ConsentCheckbox } from
|
|
14
|
-
import { ConsentInput } from
|
|
15
|
-
import { ConsentShell } from
|
|
21
|
+
import { ConsentButton } from "../components/consent-button.js";
|
|
22
|
+
import { ConsentCheckbox } from "../components/consent-checkbox.js";
|
|
23
|
+
import { ConsentInput } from "../components/consent-input.js";
|
|
24
|
+
import { ConsentShell } from "../components/consent-shell.js";
|
|
16
25
|
// Extended components
|
|
17
|
-
import { ConsentPermissions } from
|
|
18
|
-
import { ConsentTerms } from
|
|
19
|
-
import { ConsentOAuthButton } from
|
|
20
|
-
import { ConsentOTPInput } from
|
|
26
|
+
import { ConsentPermissions } from "../components/consent-permissions.js";
|
|
27
|
+
import { ConsentTerms } from "../components/consent-terms.js";
|
|
28
|
+
import { ConsentOAuthButton } from "../components/consent-oauth-button.js";
|
|
29
|
+
import { ConsentOTPInput } from "../components/consent-otp-input.js";
|
|
21
30
|
// Composite component
|
|
22
|
-
import { McpConsent } from
|
|
31
|
+
import { McpConsent, } from "../components/mcp-consent.js";
|
|
32
|
+
// Capability screen and its parts
|
|
33
|
+
import { ConsentCapabilitiesScreen, } from "../components/consent-capabilities-screen.js";
|
|
34
|
+
import { ConsentCapabilityCard, } from "../components/consent-capability-card.js";
|
|
35
|
+
import { ConsentAgentHeader } from "../components/consent-agent-header.js";
|
|
36
|
+
import { ConsentHeadline } from "../components/consent-headline.js";
|
|
37
|
+
import { ConsentConnectorHeader } from "../components/consent-connector-header.js";
|
|
38
|
+
import { ConsentActionBar } from "../components/consent-action-bar.js";
|
|
39
|
+
import { ConsentRevocationNotice } from "../components/consent-revocation-notice.js";
|
|
40
|
+
import { ConsentFooter } from "../components/consent-footer.js";
|
|
41
|
+
// Grant terms and taking a grant back
|
|
42
|
+
import { ConsentDuration, } from "../components/consent-duration.js";
|
|
43
|
+
import { ConsentFolderScope, } from "../components/consent-folder-scope.js";
|
|
44
|
+
import { ConsentGrantTerms, } from "../components/consent-grant-terms.js";
|
|
45
|
+
import { ConsentRevoke } from "../components/consent-revoke.js";
|
|
46
|
+
// The person's wallet and one pending request
|
|
47
|
+
import { ConsentWalletOrb } from "../components/consent-wallet-orb.js";
|
|
48
|
+
import { ConsentWalletCheck } from "../components/consent-wallet-check.js";
|
|
49
|
+
import { ConsentWalletNotice } from "../components/consent-wallet-notice.js";
|
|
50
|
+
import { ConsentWalletSignature } from "../components/consent-wallet-signature.js";
|
|
51
|
+
import { ConsentRequestExpiry, } from "../components/consent-request-expiry.js";
|
|
52
|
+
import { ConsentPhoneHandoff } from "../components/consent-phone-handoff.js";
|
|
23
53
|
// ============================================================================
|
|
24
54
|
// Core Component Wrappers
|
|
25
55
|
// ============================================================================
|
|
@@ -27,41 +57,41 @@ import { McpConsent } from '../components/mcp-consent.js';
|
|
|
27
57
|
* React wrapper for consent-button
|
|
28
58
|
*/
|
|
29
59
|
export const ConsentButtonReact = createComponent({
|
|
30
|
-
tagName:
|
|
60
|
+
tagName: "consent-button",
|
|
31
61
|
elementClass: ConsentButton,
|
|
32
62
|
react: React,
|
|
33
63
|
events: {
|
|
34
|
-
onClick:
|
|
64
|
+
onClick: "click",
|
|
35
65
|
},
|
|
36
66
|
});
|
|
37
67
|
/**
|
|
38
68
|
* React wrapper for consent-checkbox
|
|
39
69
|
*/
|
|
40
70
|
export const ConsentCheckboxReact = createComponent({
|
|
41
|
-
tagName:
|
|
71
|
+
tagName: "consent-checkbox",
|
|
42
72
|
elementClass: ConsentCheckbox,
|
|
43
73
|
react: React,
|
|
44
74
|
events: {
|
|
45
|
-
onChange:
|
|
75
|
+
onChange: "change",
|
|
46
76
|
},
|
|
47
77
|
});
|
|
48
78
|
/**
|
|
49
79
|
* React wrapper for consent-input
|
|
50
80
|
*/
|
|
51
81
|
export const ConsentInputReact = createComponent({
|
|
52
|
-
tagName:
|
|
82
|
+
tagName: "consent-input",
|
|
53
83
|
elementClass: ConsentInput,
|
|
54
84
|
react: React,
|
|
55
85
|
events: {
|
|
56
|
-
onInput:
|
|
57
|
-
onChange:
|
|
86
|
+
onInput: "input",
|
|
87
|
+
onChange: "change",
|
|
58
88
|
},
|
|
59
89
|
});
|
|
60
90
|
/**
|
|
61
91
|
* React wrapper for consent-shell
|
|
62
92
|
*/
|
|
63
93
|
export const ConsentShellReact = createComponent({
|
|
64
|
-
tagName:
|
|
94
|
+
tagName: "consent-shell",
|
|
65
95
|
elementClass: ConsentShell,
|
|
66
96
|
react: React,
|
|
67
97
|
});
|
|
@@ -72,49 +102,51 @@ export const ConsentShellReact = createComponent({
|
|
|
72
102
|
* React wrapper for consent-permissions
|
|
73
103
|
*/
|
|
74
104
|
export const ConsentPermissionsReact = createComponent({
|
|
75
|
-
tagName:
|
|
105
|
+
tagName: "consent-permissions",
|
|
76
106
|
elementClass: ConsentPermissions,
|
|
77
107
|
react: React,
|
|
78
108
|
events: {
|
|
79
|
-
onChange:
|
|
109
|
+
onChange: "change",
|
|
80
110
|
},
|
|
81
111
|
});
|
|
82
112
|
/**
|
|
83
113
|
* React wrapper for consent-terms
|
|
84
114
|
*/
|
|
85
115
|
export const ConsentTermsReact = createComponent({
|
|
86
|
-
tagName:
|
|
116
|
+
tagName: "consent-terms",
|
|
87
117
|
elementClass: ConsentTerms,
|
|
88
118
|
react: React,
|
|
89
119
|
events: {
|
|
90
|
-
onChange:
|
|
120
|
+
onChange: "change",
|
|
91
121
|
},
|
|
92
122
|
});
|
|
93
123
|
/**
|
|
94
124
|
* React wrapper for consent-oauth-button
|
|
95
125
|
*/
|
|
96
126
|
export const ConsentOAuthButtonReact = createComponent({
|
|
97
|
-
tagName:
|
|
127
|
+
tagName: "consent-oauth-button",
|
|
98
128
|
elementClass: ConsentOAuthButton,
|
|
99
129
|
react: React,
|
|
100
130
|
events: {
|
|
101
|
-
onOAuthClick:
|
|
131
|
+
onOAuthClick: "oauth-click",
|
|
102
132
|
},
|
|
103
133
|
});
|
|
104
134
|
/**
|
|
105
135
|
* React wrapper for consent-otp-input
|
|
106
136
|
*
|
|
107
137
|
* Events:
|
|
138
|
+
* - onInput: Fired when a digit is typed (detail: { value, index, digit })
|
|
108
139
|
* - onComplete: Fired when all digits are entered (detail: { value: string })
|
|
109
140
|
* - onChange: Fired when value changes (detail: { value: string })
|
|
110
141
|
*/
|
|
111
142
|
export const ConsentOTPInputReact = createComponent({
|
|
112
|
-
tagName:
|
|
143
|
+
tagName: "consent-otp-input",
|
|
113
144
|
elementClass: ConsentOTPInput,
|
|
114
145
|
react: React,
|
|
115
146
|
events: {
|
|
116
|
-
|
|
117
|
-
|
|
147
|
+
onInput: "input",
|
|
148
|
+
onComplete: "complete",
|
|
149
|
+
onChange: "change",
|
|
118
150
|
},
|
|
119
151
|
});
|
|
120
152
|
// ============================================================================
|
|
@@ -138,17 +170,220 @@ export const ConsentOTPInputReact = createComponent({
|
|
|
138
170
|
* onApprove={(e) => console.log('Approved', e.detail)}
|
|
139
171
|
* onDeny={() => console.log('Denied')}
|
|
140
172
|
* onError={(e) => console.log('Error', e.detail)}
|
|
173
|
+
* onResendOtp={() => sendCodeAgain()}
|
|
141
174
|
* />
|
|
142
175
|
* ```
|
|
143
176
|
*/
|
|
144
177
|
export const McpConsentReact = createComponent({
|
|
145
|
-
tagName:
|
|
178
|
+
tagName: "mcp-consent",
|
|
146
179
|
elementClass: McpConsent,
|
|
147
180
|
react: React,
|
|
148
181
|
events: {
|
|
149
|
-
onApprove:
|
|
150
|
-
onDeny:
|
|
151
|
-
onError:
|
|
182
|
+
onApprove: "mcp-consent:approve",
|
|
183
|
+
onDeny: "mcp-consent:deny",
|
|
184
|
+
onError: "mcp-consent:error",
|
|
185
|
+
onResendOtp: "mcp-consent:resend-otp",
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
// ============================================================================
|
|
189
|
+
// Capability Screen Wrappers
|
|
190
|
+
// ============================================================================
|
|
191
|
+
/**
|
|
192
|
+
* React wrapper for consent-capabilities-screen, the whole consent screen
|
|
193
|
+
* for a capability grant.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```tsx
|
|
197
|
+
* import { ConsentCapabilitiesScreenReact } from '@kya-os/consent/react';
|
|
198
|
+
*
|
|
199
|
+
* <ConsentCapabilitiesScreenReact
|
|
200
|
+
* agentMetadata={{ name: 'Claude', did: 'did:key:z6Mk...', verification: 'verified' }}
|
|
201
|
+
* capabilities={capabilities}
|
|
202
|
+
* orgName="Acme"
|
|
203
|
+
* onAllow={(e) => grant(e.detail.selectedScopes)}
|
|
204
|
+
* onDeny={() => close()}
|
|
205
|
+
* />
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
export const ConsentCapabilitiesScreenReact = createComponent({
|
|
209
|
+
tagName: "consent-capabilities-screen",
|
|
210
|
+
elementClass: ConsentCapabilitiesScreen,
|
|
211
|
+
react: React,
|
|
212
|
+
events: {
|
|
213
|
+
onAllow: "capabilities-allow",
|
|
214
|
+
onDeny: "capabilities-deny",
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* React wrapper for consent-capability-card, one capability with its toggle.
|
|
219
|
+
*/
|
|
220
|
+
export const ConsentCapabilityCardReact = createComponent({
|
|
221
|
+
tagName: "consent-capability-card",
|
|
222
|
+
elementClass: ConsentCapabilityCard,
|
|
223
|
+
react: React,
|
|
224
|
+
events: {
|
|
225
|
+
onToggle: "capability-toggle",
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
/**
|
|
229
|
+
* React wrapper for consent-agent-header, the agent's name, pill and meta line.
|
|
230
|
+
*/
|
|
231
|
+
export const ConsentAgentHeaderReact = createComponent({
|
|
232
|
+
tagName: "consent-agent-header",
|
|
233
|
+
elementClass: ConsentAgentHeader,
|
|
234
|
+
react: React,
|
|
235
|
+
});
|
|
236
|
+
/**
|
|
237
|
+
* React wrapper for consent-headline, the eyebrow, the headline that says who
|
|
238
|
+
* is asking and where, and the subhead.
|
|
239
|
+
*/
|
|
240
|
+
export const ConsentHeadlineReact = createComponent({
|
|
241
|
+
tagName: "consent-headline",
|
|
242
|
+
elementClass: ConsentHeadline,
|
|
243
|
+
react: React,
|
|
244
|
+
});
|
|
245
|
+
/**
|
|
246
|
+
* React wrapper for consent-connector-header, the client and the server it
|
|
247
|
+
* connects to.
|
|
248
|
+
*/
|
|
249
|
+
export const ConsentConnectorHeaderReact = createComponent({
|
|
250
|
+
tagName: "consent-connector-header",
|
|
251
|
+
elementClass: ConsentConnectorHeader,
|
|
252
|
+
react: React,
|
|
253
|
+
});
|
|
254
|
+
/**
|
|
255
|
+
* React wrapper for consent-action-bar, the Allow and Deny buttons.
|
|
256
|
+
*/
|
|
257
|
+
export const ConsentActionBarReact = createComponent({
|
|
258
|
+
tagName: "consent-action-bar",
|
|
259
|
+
elementClass: ConsentActionBar,
|
|
260
|
+
react: React,
|
|
261
|
+
events: {
|
|
262
|
+
onAllow: "consent-allow",
|
|
263
|
+
onDeny: "consent-deny",
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
/**
|
|
267
|
+
* React wrapper for consent-revocation-notice, how and when access ends.
|
|
268
|
+
*/
|
|
269
|
+
export const ConsentRevocationNoticeReact = createComponent({
|
|
270
|
+
tagName: "consent-revocation-notice",
|
|
271
|
+
elementClass: ConsentRevocationNotice,
|
|
272
|
+
react: React,
|
|
273
|
+
});
|
|
274
|
+
/**
|
|
275
|
+
* React wrapper for consent-footer.
|
|
276
|
+
*/
|
|
277
|
+
export const ConsentFooterReact = createComponent({
|
|
278
|
+
tagName: "consent-footer",
|
|
279
|
+
elementClass: ConsentFooter,
|
|
280
|
+
react: React,
|
|
281
|
+
});
|
|
282
|
+
// ============================================================================
|
|
283
|
+
// Grant Terms and Revoke Wrappers
|
|
284
|
+
// ============================================================================
|
|
285
|
+
/**
|
|
286
|
+
* React wrapper for consent-duration, how long a grant lasts.
|
|
287
|
+
*/
|
|
288
|
+
export const ConsentDurationReact = createComponent({
|
|
289
|
+
tagName: "consent-duration",
|
|
290
|
+
elementClass: ConsentDuration,
|
|
291
|
+
react: React,
|
|
292
|
+
events: {
|
|
293
|
+
onChange: "consent-duration-change",
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
/**
|
|
297
|
+
* React wrapper for consent-folder-scope, the folder a grant is limited to.
|
|
298
|
+
*/
|
|
299
|
+
export const ConsentFolderScopeReact = createComponent({
|
|
300
|
+
tagName: "consent-folder-scope",
|
|
301
|
+
elementClass: ConsentFolderScope,
|
|
302
|
+
react: React,
|
|
303
|
+
events: {
|
|
304
|
+
onChange: "consent-folder-scope-change",
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
/**
|
|
308
|
+
* React wrapper for consent-grant-terms, a grant's terms behind one line.
|
|
309
|
+
* Its children are the fields.
|
|
310
|
+
*/
|
|
311
|
+
export const ConsentGrantTermsReact = createComponent({
|
|
312
|
+
tagName: "consent-grant-terms",
|
|
313
|
+
elementClass: ConsentGrantTerms,
|
|
314
|
+
react: React,
|
|
315
|
+
events: {
|
|
316
|
+
onChange: "consent-grant-terms-change",
|
|
152
317
|
},
|
|
153
318
|
});
|
|
319
|
+
/**
|
|
320
|
+
* React wrapper for consent-revoke, taking a grant back.
|
|
321
|
+
*/
|
|
322
|
+
export const ConsentRevokeReact = createComponent({
|
|
323
|
+
tagName: "consent-revoke",
|
|
324
|
+
elementClass: ConsentRevoke,
|
|
325
|
+
react: React,
|
|
326
|
+
events: {
|
|
327
|
+
onRevoke: "consent-revoke",
|
|
328
|
+
onKeep: "consent-keep",
|
|
329
|
+
},
|
|
330
|
+
});
|
|
331
|
+
// ============================================================================
|
|
332
|
+
// Wallet and Request Wrappers
|
|
333
|
+
// ============================================================================
|
|
334
|
+
/**
|
|
335
|
+
* React wrapper for consent-wallet-orb, the wallet check's picture on its
|
|
336
|
+
* own: a globe inside a dial that closes once the wallet can sign.
|
|
337
|
+
*/
|
|
338
|
+
export const ConsentWalletOrbReact = createComponent({
|
|
339
|
+
tagName: "consent-wallet-orb",
|
|
340
|
+
elementClass: ConsentWalletOrb,
|
|
341
|
+
react: React,
|
|
342
|
+
});
|
|
343
|
+
/**
|
|
344
|
+
* React wrapper for consent-wallet-check, the orb and one line that say
|
|
345
|
+
* whether this browser's wallet can sign.
|
|
346
|
+
*/
|
|
347
|
+
export const ConsentWalletCheckReact = createComponent({
|
|
348
|
+
tagName: "consent-wallet-check",
|
|
349
|
+
elementClass: ConsentWalletCheck,
|
|
350
|
+
react: React,
|
|
351
|
+
});
|
|
352
|
+
/**
|
|
353
|
+
* React wrapper for consent-wallet-notice, what to do when this browser
|
|
354
|
+
* can't sign. Pass the `more` slot's content as a child with `slot="more"`.
|
|
355
|
+
*/
|
|
356
|
+
export const ConsentWalletNoticeReact = createComponent({
|
|
357
|
+
tagName: "consent-wallet-notice",
|
|
358
|
+
elementClass: ConsentWalletNotice,
|
|
359
|
+
react: React,
|
|
360
|
+
});
|
|
361
|
+
/**
|
|
362
|
+
* React wrapper for consent-wallet-signature, who signs the grant and where
|
|
363
|
+
* to take it back.
|
|
364
|
+
*/
|
|
365
|
+
export const ConsentWalletSignatureReact = createComponent({
|
|
366
|
+
tagName: "consent-wallet-signature",
|
|
367
|
+
elementClass: ConsentWalletSignature,
|
|
368
|
+
react: React,
|
|
369
|
+
});
|
|
370
|
+
/**
|
|
371
|
+
* React wrapper for consent-request-expiry, the time left to approve.
|
|
372
|
+
*/
|
|
373
|
+
export const ConsentRequestExpiryReact = createComponent({
|
|
374
|
+
tagName: "consent-request-expiry",
|
|
375
|
+
elementClass: ConsentRequestExpiry,
|
|
376
|
+
react: React,
|
|
377
|
+
events: {
|
|
378
|
+
onExpired: "consent-request-expired",
|
|
379
|
+
},
|
|
380
|
+
});
|
|
381
|
+
/**
|
|
382
|
+
* React wrapper for consent-phone-handoff, a QR code to approve on a phone.
|
|
383
|
+
*/
|
|
384
|
+
export const ConsentPhoneHandoffReact = createComponent({
|
|
385
|
+
tagName: "consent-phone-handoff",
|
|
386
|
+
elementClass: ConsentPhoneHandoff,
|
|
387
|
+
react: React,
|
|
388
|
+
});
|
|
154
389
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAkB,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,sBAAsB;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,sBAAsB;AACtB,OAAO,EACL,UAAU,GAGX,MAAM,8BAA8B,CAAC;AAEtC,kCAAkC;AAClC,OAAO,EACL,yBAAyB,GAE1B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB,GAEtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC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CAAC"}
|
package/dist/templates/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Consent Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Canonical types for consent configuration, branding, copy, and auth modes.
|
|
5
|
-
* These types are the single source of truth shared between
|
|
5
|
+
* These types are the single source of truth shared between the server runtime and the dashboard preview.
|
|
6
6
|
*
|
|
7
7
|
* @module @kya-os/consent/types
|
|
8
8
|
*/
|
package/dist/types/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Consent Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Canonical types for consent configuration, branding, copy, and auth modes.
|
|
5
|
-
* These types are the single source of truth shared between
|
|
5
|
+
* These types are the single source of truth shared between the server runtime and the dashboard preview.
|
|
6
6
|
*
|
|
7
7
|
* @module @kya-os/consent/types
|
|
8
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/consent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Consent page types, styles, utilities, and web components for agent authorization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -76,6 +76,20 @@
|
|
|
76
76
|
"import": "./dist/mcp-app/index.js",
|
|
77
77
|
"require": "./dist/cjs/mcp-app/index.js"
|
|
78
78
|
},
|
|
79
|
+
"./identity": {
|
|
80
|
+
"types": "./dist/identity/index.d.ts",
|
|
81
|
+
"import": "./dist/identity/index.js",
|
|
82
|
+
"require": "./dist/cjs/identity/index.js"
|
|
83
|
+
},
|
|
84
|
+
"./grant": {
|
|
85
|
+
"types": "./dist/grant/index.d.ts",
|
|
86
|
+
"import": "./dist/grant/index.js",
|
|
87
|
+
"require": "./dist/cjs/grant/index.js"
|
|
88
|
+
},
|
|
89
|
+
"./kya-os": {
|
|
90
|
+
"types": "./dist/kya-os/index.d.ts",
|
|
91
|
+
"import": "./dist/kya-os/index.js"
|
|
92
|
+
},
|
|
79
93
|
"./passkey": {
|
|
80
94
|
"types": "./dist/passkey/index.d.ts",
|
|
81
95
|
"import": "./dist/passkey/index.js"
|
|
@@ -102,8 +116,14 @@
|
|
|
102
116
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
103
117
|
"clean": "rm -rf dist .turbo node_modules",
|
|
104
118
|
"prepublishOnly": "npm run build && node ../create-mcpi-app/scripts/validate-no-workspace.js",
|
|
105
|
-
"test:browser": "python3 scripts/test-capabilities-browser.py && python3 scripts/test-mcp-consent-selection.py && python3 scripts/test-passkey-browser.py",
|
|
106
|
-
"verify:bundles": "node scripts/verify-bundles.js"
|
|
119
|
+
"test:browser": "python3 scripts/test-capabilities-browser.py && python3 scripts/test-mcp-consent-selection.py && python3 scripts/test-passkey-browser.py && python3 scripts/test-grant-terms-browser.py && python3 scripts/test-wallet-browser.py && python3 scripts/test-form-names-browser.py && python3 scripts/test-narrow-browser.py",
|
|
120
|
+
"verify:bundles": "node scripts/verify-bundles.js",
|
|
121
|
+
"site:build": "node site/scripts/build.mjs",
|
|
122
|
+
"site:check": "node site/scripts/check.mjs",
|
|
123
|
+
"site:og": "npm run build && npm run site:build && node site/scripts/og.mjs",
|
|
124
|
+
"site:serve": "npm run build && npm run site:build && npm run site:check && npx --yes serve site/public -l 3334",
|
|
125
|
+
"site:deploy": "npm run build && npm run site:build && npm run site:check && npx --yes wrangler@4 deploy --config site/wrangler.jsonc",
|
|
126
|
+
"site:dev": "npm run build && npm run site:build && npm run site:check && npx --yes wrangler@4 dev --config site/wrangler.jsonc --port 8787"
|
|
107
127
|
},
|
|
108
128
|
"sideEffects": [
|
|
109
129
|
"./src/components/*.ts",
|
|
@@ -118,28 +138,48 @@
|
|
|
118
138
|
"./dist/consent.min.js"
|
|
119
139
|
],
|
|
120
140
|
"dependencies": {
|
|
121
|
-
"
|
|
141
|
+
"lean-qr": "^2.7.4",
|
|
122
142
|
"lit": "^3.3.2",
|
|
123
143
|
"zod": "^3.25.67"
|
|
124
144
|
},
|
|
125
145
|
"peerDependencies": {
|
|
126
|
-
"@kya-os/id": "^0.6.0"
|
|
146
|
+
"@kya-os/id": "^0.6.0 || ^0.7.0 || ^0.8.0",
|
|
147
|
+
"@kya-os/mcp": "^1.20.0",
|
|
148
|
+
"@lit/react": "^1.0.8",
|
|
149
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
127
150
|
},
|
|
128
151
|
"peerDependenciesMeta": {
|
|
129
152
|
"@kya-os/id": {
|
|
130
153
|
"optional": true
|
|
154
|
+
},
|
|
155
|
+
"@kya-os/mcp": {
|
|
156
|
+
"optional": true
|
|
157
|
+
},
|
|
158
|
+
"@lit/react": {
|
|
159
|
+
"optional": true
|
|
160
|
+
},
|
|
161
|
+
"react": {
|
|
162
|
+
"optional": true
|
|
131
163
|
}
|
|
132
164
|
},
|
|
133
165
|
"devDependencies": {
|
|
134
|
-
"@kya-os/id": "^0.
|
|
166
|
+
"@kya-os/id": "^0.8.0",
|
|
167
|
+
"@kya-os/mcp": "1.20.0",
|
|
168
|
+
"@lit/react": "^1.0.8",
|
|
135
169
|
"@modelcontextprotocol/ext-apps": "^1.0.0",
|
|
136
170
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
137
171
|
"@types/node": "^20.14.9",
|
|
138
172
|
"@types/react": "^19.2.14",
|
|
173
|
+
"@types/react-dom": "^19.2.3",
|
|
174
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
175
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
139
176
|
"@vitest/coverage-v8": "^4.0.18",
|
|
140
177
|
"esbuild": "^0.27.3",
|
|
141
178
|
"eslint": "^9.26.0",
|
|
142
|
-
"happy-dom": "
|
|
179
|
+
"happy-dom": "21.0.4",
|
|
180
|
+
"playwright-core": "1.57.0",
|
|
181
|
+
"react": "^19.2.4",
|
|
182
|
+
"react-dom": "^19.2.4",
|
|
143
183
|
"typescript": "^5.5.3",
|
|
144
184
|
"vitest": "^4.0.18"
|
|
145
185
|
},
|
|
@@ -151,6 +191,7 @@
|
|
|
151
191
|
"publishConfig": {
|
|
152
192
|
"access": "public"
|
|
153
193
|
},
|
|
194
|
+
"homepage": "https://consent.kya-os.ai",
|
|
154
195
|
"repository": {
|
|
155
196
|
"type": "git",
|
|
156
197
|
"url": "https://github.com/modelcontextprotocol-identity/xmcp-i.git",
|