@kya-os/consent 0.1.43 → 0.1.46
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/bundle/inline.d.ts +17 -0
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +19 -2
- package/dist/bundle/inline.js.map +1 -1
- package/dist/bundle/shell.d.ts +13 -8
- package/dist/bundle/shell.d.ts.map +1 -1
- package/dist/bundle/shell.js +33 -30
- package/dist/bundle/shell.js.map +1 -1
- package/dist/cjs/bundle/inline.js +20 -3
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/shell.js +32 -29
- package/dist/cjs/bundle/shell.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +52 -12
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +191 -32
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +180 -77
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/index.js +3 -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/resolution/credential-capabilities.js +53 -0
- package/dist/cjs/resolution/credential-capabilities.js.map +1 -0
- package/dist/components/consent-capabilities-screen.d.ts +32 -0
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +53 -13
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +191 -32
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +33 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +180 -77
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +430 -165
- package/dist/consent.min.js +278 -119
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- 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/resolution/credential-capabilities.d.ts +25 -0
- package/dist/resolution/credential-capabilities.d.ts.map +1 -0
- package/dist/resolution/credential-capabilities.js +46 -0
- package/dist/resolution/credential-capabilities.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.js","sourceRoot":"","sources":["../../../src/bundle/inline.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH;;;GAGG;AACU,QAAA,cAAc,GAAW,
|
|
1
|
+
{"version":3,"file":"inline.js","sourceRoot":"","sources":["../../../src/bundle/inline.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH;;;GAGG;AACU,QAAA,cAAc,GAAW,mjvQAAmjvQ,CAAC;AAE1lvQ;;GAEG;AACU,QAAA,mBAAmB,GAAW,MAAM,CAAC;AAElD;;GAEG;AACU,QAAA,mBAAmB,GAAW,kBAAkB,CAAC;AAE9D;;;;;;;;;;;GAWG;AACU,QAAA,mBAAmB,GAAW,8BAA8B,CAAC"}
|
package/dist/cjs/bundle/shell.js
CHANGED
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.generateConsentShell = generateConsentShell;
|
|
19
19
|
exports.generateInlineConsentShell = generateInlineConsentShell;
|
|
20
20
|
const escape_js_1 = require("../security/escape.js");
|
|
21
|
+
const inline_js_1 = require("./inline.js");
|
|
21
22
|
/**
|
|
22
23
|
* Generate the consent page HTML shell
|
|
23
24
|
*
|
|
@@ -45,7 +46,7 @@ const escape_js_1 = require("../security/escape.js");
|
|
|
45
46
|
* ```
|
|
46
47
|
*/
|
|
47
48
|
function generateConsentShell(options) {
|
|
48
|
-
const { config, tool, scopes, agentDid, sessionId, projectId, serverUrl, oauthIdentity, bundlePath =
|
|
49
|
+
const { config, tool, scopes, agentDid, sessionId, projectId, serverUrl, oauthIdentity, bundlePath = inline_js_1.CONSENT_BUNDLE_PATH, pageTitle = "Permission Request", nonce, authMode, agentName, provider, csrfToken, credentialProviderType, credentialProvider, userDid, // CRITICAL: Bypasses KV consistency issues
|
|
49
50
|
credentialUserEmail, // User email from credential provider
|
|
50
51
|
credentialProviderUserId, // Provider's user ID (e.g., customer ID)
|
|
51
52
|
oauthUrl, // Pre-built OAuth authorization URL
|
|
@@ -66,13 +67,15 @@ function generateConsentShell(options) {
|
|
|
66
67
|
const configJson = JSON.stringify(config);
|
|
67
68
|
const scopesJson = JSON.stringify(scopes);
|
|
68
69
|
const oauthJson = oauthIdentity ? JSON.stringify(oauthIdentity) : null;
|
|
69
|
-
const capabilitiesJson = capabilities && capabilities.length > 0
|
|
70
|
+
const capabilitiesJson = capabilities && capabilities.length > 0
|
|
71
|
+
? JSON.stringify(capabilities)
|
|
72
|
+
: null;
|
|
70
73
|
const agentMetadataJson = agentMetadata
|
|
71
74
|
? JSON.stringify(agentMetadata)
|
|
72
75
|
: null;
|
|
73
76
|
const cedarContextJson = cedarContext ? JSON.stringify(cedarContext) : null;
|
|
74
77
|
// Build nonce attribute if provided
|
|
75
|
-
const nonceAttr = nonce ? ` nonce="${(0, escape_js_1.escapeAttr)(nonce)}"` :
|
|
78
|
+
const nonceAttr = nonce ? ` nonce="${(0, escape_js_1.escapeAttr)(nonce)}"` : "";
|
|
76
79
|
return `<!DOCTYPE html>
|
|
77
80
|
<html lang="en">
|
|
78
81
|
<head>
|
|
@@ -208,29 +211,29 @@ function generateConsentShell(options) {
|
|
|
208
211
|
session-id="${(0, escape_js_1.escapeAttr)(sessionId)}"
|
|
209
212
|
project-id="${(0, escape_js_1.escapeAttr)(projectId)}"
|
|
210
213
|
server-url="${(0, escape_js_1.escapeAttr)(serverUrl)}"
|
|
211
|
-
${oauthJson ? `oauth-identity='${(0, escape_js_1.escapeAttr)(oauthJson)}'` :
|
|
212
|
-
${authMode ? `auth-mode="${(0, escape_js_1.escapeAttr)(authMode)}"` :
|
|
213
|
-
${agentName ? `agent-name="${(0, escape_js_1.escapeAttr)(agentName)}"` :
|
|
214
|
-
${provider ? `provider="${(0, escape_js_1.escapeAttr)(provider)}"` :
|
|
215
|
-
${csrfToken ? `csrf-token="${(0, escape_js_1.escapeAttr)(csrfToken)}"` :
|
|
216
|
-
${credentialProviderType ? `credential-provider-type="${(0, escape_js_1.escapeAttr)(credentialProviderType)}"` :
|
|
217
|
-
${credentialProvider ? `credential-provider="${(0, escape_js_1.escapeAttr)(credentialProvider)}"` :
|
|
218
|
-
${userDid ? `user-did="${(0, escape_js_1.escapeAttr)(userDid)}"` :
|
|
219
|
-
${credentialUserEmail ? `credential-user-email="${(0, escape_js_1.escapeAttr)(credentialUserEmail)}"` :
|
|
220
|
-
${credentialProviderUserId ? `credential-provider-user-id="${(0, escape_js_1.escapeAttr)(credentialProviderUserId)}"` :
|
|
221
|
-
${oauthUrl ? `oauth-url="${(0, escape_js_1.escapeAttr)(oauthUrl)}"` :
|
|
222
|
-
${authorizationType ? `authorization-type="${(0, escape_js_1.escapeAttr)(authorizationType)}"` :
|
|
223
|
-
${oauthProviderType ? `oauth-provider-type="${(0, escape_js_1.escapeAttr)(oauthProviderType)}"` :
|
|
224
|
-
${oauthProviderName ? `oauth-provider="${(0, escape_js_1.escapeAttr)(oauthProviderName)}"` :
|
|
225
|
-
${capabilitiesJson ? `capabilities='${(0, escape_js_1.escapeAttr)(capabilitiesJson)}'` :
|
|
226
|
-
${agentMetadataJson ? `agent-metadata='${(0, escape_js_1.escapeAttr)(agentMetadataJson)}'` :
|
|
227
|
-
${cedarContextJson ? `cedar-context='${(0, escape_js_1.escapeAttr)(cedarContextJson)}'` :
|
|
228
|
-
${consentTheme ? `consent-theme="${(0, escape_js_1.escapeAttr)(consentTheme)}"` :
|
|
229
|
-
${orgName ? `org-name="${(0, escape_js_1.escapeAttr)(orgName)}"` :
|
|
230
|
-
${headlineVerb ? `headline-verb="${(0, escape_js_1.escapeAttr)(headlineVerb)}"` :
|
|
231
|
-
${revocationPath ? `revocation-path="${(0, escape_js_1.escapeAttr)(revocationPath)}"` :
|
|
232
|
-
${typeof inactivityDays ===
|
|
233
|
-
${howItWorksUrl ? `how-it-works-url="${(0, escape_js_1.escapeAttr)(howItWorksUrl)}"` :
|
|
214
|
+
${oauthJson ? `oauth-identity='${(0, escape_js_1.escapeAttr)(oauthJson)}'` : ""}
|
|
215
|
+
${authMode ? `auth-mode="${(0, escape_js_1.escapeAttr)(authMode)}"` : ""}
|
|
216
|
+
${agentName ? `agent-name="${(0, escape_js_1.escapeAttr)(agentName)}"` : ""}
|
|
217
|
+
${provider ? `provider="${(0, escape_js_1.escapeAttr)(provider)}"` : ""}
|
|
218
|
+
${csrfToken ? `csrf-token="${(0, escape_js_1.escapeAttr)(csrfToken)}"` : ""}
|
|
219
|
+
${credentialProviderType ? `credential-provider-type="${(0, escape_js_1.escapeAttr)(credentialProviderType)}"` : ""}
|
|
220
|
+
${credentialProvider ? `credential-provider="${(0, escape_js_1.escapeAttr)(credentialProvider)}"` : ""}
|
|
221
|
+
${userDid ? `user-did="${(0, escape_js_1.escapeAttr)(userDid)}"` : ""}
|
|
222
|
+
${credentialUserEmail ? `credential-user-email="${(0, escape_js_1.escapeAttr)(credentialUserEmail)}"` : ""}
|
|
223
|
+
${credentialProviderUserId ? `credential-provider-user-id="${(0, escape_js_1.escapeAttr)(credentialProviderUserId)}"` : ""}
|
|
224
|
+
${oauthUrl ? `oauth-url="${(0, escape_js_1.escapeAttr)(oauthUrl)}"` : ""}
|
|
225
|
+
${authorizationType ? `authorization-type="${(0, escape_js_1.escapeAttr)(authorizationType)}"` : ""}
|
|
226
|
+
${oauthProviderType ? `oauth-provider-type="${(0, escape_js_1.escapeAttr)(oauthProviderType)}"` : ""}
|
|
227
|
+
${oauthProviderName ? `oauth-provider="${(0, escape_js_1.escapeAttr)(oauthProviderName)}"` : ""}
|
|
228
|
+
${capabilitiesJson ? `capabilities='${(0, escape_js_1.escapeAttr)(capabilitiesJson)}'` : ""}
|
|
229
|
+
${agentMetadataJson ? `agent-metadata='${(0, escape_js_1.escapeAttr)(agentMetadataJson)}'` : ""}
|
|
230
|
+
${cedarContextJson ? `cedar-context='${(0, escape_js_1.escapeAttr)(cedarContextJson)}'` : ""}
|
|
231
|
+
${consentTheme ? `consent-theme="${(0, escape_js_1.escapeAttr)(consentTheme)}"` : ""}
|
|
232
|
+
${orgName ? `org-name="${(0, escape_js_1.escapeAttr)(orgName)}"` : ""}
|
|
233
|
+
${headlineVerb ? `headline-verb="${(0, escape_js_1.escapeAttr)(headlineVerb)}"` : ""}
|
|
234
|
+
${revocationPath ? `revocation-path="${(0, escape_js_1.escapeAttr)(revocationPath)}"` : ""}
|
|
235
|
+
${typeof inactivityDays === "number" ? `inactivity-days="${(0, escape_js_1.escapeAttr)(String(inactivityDays))}"` : ""}
|
|
236
|
+
${howItWorksUrl ? `how-it-works-url="${(0, escape_js_1.escapeAttr)(howItWorksUrl)}"` : ""}
|
|
234
237
|
></mcp-consent>
|
|
235
238
|
|
|
236
239
|
<!-- Loading skeleton (hidden once component is defined) -->
|
|
@@ -283,11 +286,11 @@ function generateConsentShell(options) {
|
|
|
283
286
|
* @param bundleSource - The bundled consent.js source code
|
|
284
287
|
*/
|
|
285
288
|
function generateInlineConsentShell(options, bundleSource) {
|
|
286
|
-
const { config, tool, scopes, agentDid, sessionId, projectId, serverUrl, oauthIdentity, pageTitle =
|
|
289
|
+
const { config, tool, scopes, agentDid, sessionId, projectId, serverUrl, oauthIdentity, pageTitle = "Permission Request", nonce, } = options;
|
|
287
290
|
const configJson = JSON.stringify(config);
|
|
288
291
|
const scopesJson = JSON.stringify(scopes);
|
|
289
292
|
const oauthJson = oauthIdentity ? JSON.stringify(oauthIdentity) : null;
|
|
290
|
-
const nonceAttr = nonce ? ` nonce="${(0, escape_js_1.escapeAttr)(nonce)}"` :
|
|
293
|
+
const nonceAttr = nonce ? ` nonce="${(0, escape_js_1.escapeAttr)(nonce)}"` : "";
|
|
291
294
|
return `<!DOCTYPE html>
|
|
292
295
|
<html lang="en">
|
|
293
296
|
<head>
|
|
@@ -319,7 +322,7 @@ ${bundleSource}
|
|
|
319
322
|
session-id="${(0, escape_js_1.escapeAttr)(sessionId)}"
|
|
320
323
|
project-id="${(0, escape_js_1.escapeAttr)(projectId)}"
|
|
321
324
|
server-url="${(0, escape_js_1.escapeAttr)(serverUrl)}"
|
|
322
|
-
${oauthJson ? `oauth-identity='${(0, escape_js_1.escapeAttr)(oauthJson)}'` :
|
|
325
|
+
${oauthJson ? `oauth-identity='${(0, escape_js_1.escapeAttr)(oauthJson)}'` : ""}
|
|
323
326
|
></mcp-consent>
|
|
324
327
|
</body>
|
|
325
328
|
</html>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../src/bundle/shell.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../src/bundle/shell.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAuJH,oDAuPC;AAgBD,gEAyDC;AArdD,qDAA+D;AAC/D,2CAAkD;AA0HlD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,oBAAoB,CAAC,OAA4B;IAC/D,MAAM,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,GAAG,+BAAmB,EAChC,SAAS,GAAG,oBAAoB,EAChC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAClB,OAAO,EAAE,2CAA2C;IACpD,mBAAmB,EAAE,sCAAsC;IAC3D,wBAAwB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AAG,KAAK,CAAC,CAAC,CAAC,WAAW,IAAA,sBAAU,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/D,OAAO;;;;;WAKE,IAAA,sBAAU,EAAC,SAAS,CAAC;yBACP,SAAS;EAChC,YAAY;;UAEJ,SAAS;;;;;;;;;;;;;;;cAeL,IAAA,sBAAU,EAAC,UAAU,CAAC;YACxB,IAAA,sBAAU,EAAC,IAAI,CAAC;cACd,IAAA,sBAAU,EAAC,UAAU,CAAC;iBACnB,IAAA,sBAAU,EAAC,QAAQ,CAAC;kBACnB,IAAA,sBAAU,EAAC,SAAS,CAAC;kBACrB,IAAA,sBAAU,EAAC,SAAS,CAAC;kBACrB,IAAA,sBAAU,EAAC,SAAS,CAAC;MACjC,SAAS,CAAC,CAAC,CAAC,mBAAmB,IAAA,sBAAU,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;;;QAG1D,CAAC;AACT,CAAC"}
|
|
@@ -29,6 +29,7 @@ const decorators_js_1 = require("lit/decorators.js");
|
|
|
29
29
|
const tokens_js_1 = require("../copy/tokens.js");
|
|
30
30
|
const theme_js_1 = require("../styles/theme.js");
|
|
31
31
|
const compile_js_1 = require("../cedar/compile.js");
|
|
32
|
+
const credential_capabilities_js_1 = require("../resolution/credential-capabilities.js");
|
|
32
33
|
require("./consent-agent-header.js");
|
|
33
34
|
require("./consent-capability-card.js");
|
|
34
35
|
require("./consent-action-bar.js");
|
|
@@ -46,6 +47,18 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
46
47
|
this.theme = "light";
|
|
47
48
|
this.howItWorksUrl = "";
|
|
48
49
|
this.loading = false;
|
|
50
|
+
/**
|
|
51
|
+
* Seed every capability as selected. The credential path grants a fixed,
|
|
52
|
+
* all-or-nothing scope set, so every capability starts checked — the rows
|
|
53
|
+
* remain interactive, same as the consent-only path.
|
|
54
|
+
*/
|
|
55
|
+
this.allSelected = false;
|
|
56
|
+
/**
|
|
57
|
+
* Externally computed disable state for the Allow button. Used by the
|
|
58
|
+
* credential path to gate approval on the sign-in fields, which this
|
|
59
|
+
* component does not own.
|
|
60
|
+
*/
|
|
61
|
+
this.allowDisabled = false;
|
|
49
62
|
/**
|
|
50
63
|
* Domain used to fetch the server brand logo when one isn't explicitly
|
|
51
64
|
* configured via `agentMetadata.logoUrl` / branding. Passed to the
|
|
@@ -58,7 +71,19 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
58
71
|
* one. Falls back to monogram tile when missing or on 404.
|
|
59
72
|
*/
|
|
60
73
|
this.logoDevToken = "";
|
|
74
|
+
/**
|
|
75
|
+
* Explicit override for the operator's server brand logo, forwarded to the
|
|
76
|
+
* connector header. Lets the operator's configured branding (logo + name)
|
|
77
|
+
* reach this screen the same way it reaches the other consent screens.
|
|
78
|
+
*/
|
|
79
|
+
this.serverLogoUrl = "";
|
|
61
80
|
this.selected = new Set();
|
|
81
|
+
/**
|
|
82
|
+
* Last capability set this component seeded `selected` from, per
|
|
83
|
+
* `capabilitySeedKey`. Re-seeding is keyed on this value rather than on
|
|
84
|
+
* `capabilities` array identity — see `seedDefaults`.
|
|
85
|
+
*/
|
|
86
|
+
this.seedKey = "";
|
|
62
87
|
this.onCapabilityToggle = (event) => {
|
|
63
88
|
const detail = event.detail;
|
|
64
89
|
const next = new Set(this.selected);
|
|
@@ -94,17 +119,24 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
94
119
|
this.seedDefaults();
|
|
95
120
|
}
|
|
96
121
|
willUpdate(changed) {
|
|
97
|
-
if (changed.has("capabilities")) {
|
|
122
|
+
if (changed.has("capabilities") || changed.has("allSelected")) {
|
|
98
123
|
this.seedDefaults();
|
|
99
124
|
}
|
|
100
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Seed `selected` from the capability defaults, but only when the
|
|
128
|
+
* capability set actually changed. A parent that rebuilds its capability
|
|
129
|
+
* array on every render (e.g. because a sibling `@state()` field changed)
|
|
130
|
+
* produces a new array with the same contents on every keystroke; without
|
|
131
|
+
* this guard `willUpdate` would re-seed on every one of those renders and
|
|
132
|
+
* silently wipe whatever the user had already toggled.
|
|
133
|
+
*/
|
|
101
134
|
seedDefaults() {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.selected = next;
|
|
135
|
+
const key = (0, credential_capabilities_js_1.capabilitySeedKey)(this.capabilities, this.allSelected);
|
|
136
|
+
if (key === this.seedKey)
|
|
137
|
+
return;
|
|
138
|
+
this.seedKey = key;
|
|
139
|
+
this.selected = new Set((0, credential_capabilities_js_1.capabilityIdsFor)(this.capabilities, this.allSelected));
|
|
108
140
|
}
|
|
109
141
|
hostStyle() {
|
|
110
142
|
return `:host { ${(0, theme_js_1.themeToCssVariables)((0, theme_js_1.getConsentTheme)(this.theme))} }`;
|
|
@@ -132,10 +164,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
132
164
|
const withSerifEntities = escaped
|
|
133
165
|
.replace("@@AGENT@@", `<em>${nbspEscape(agentName)}</em>`)
|
|
134
166
|
.replace("@@ORG@@", `<em>${nbspEscape(this.orgName || "this site")}</em>`);
|
|
135
|
-
return (0, lit_1.html) `<h1
|
|
136
|
-
class="headline"
|
|
137
|
-
.innerHTML=${withSerifEntities}
|
|
138
|
-
></h1>`;
|
|
167
|
+
return (0, lit_1.html) `<h1 class="headline" .innerHTML=${withSerifEntities}></h1>`;
|
|
139
168
|
}
|
|
140
169
|
render() {
|
|
141
170
|
const tokens = tokens_js_1.CONSENT_COPY_TOKENS;
|
|
@@ -153,6 +182,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
153
182
|
clientDid="${this.agentMetadata?.did || ""}"
|
|
154
183
|
client-logo-url="${this.agentMetadata?.logoUrl || ""}"
|
|
155
184
|
serverName="${this.orgName || ""}"
|
|
185
|
+
server-logo-url="${this.serverLogoUrl}"
|
|
156
186
|
server-domain="${this.serverDomain}"
|
|
157
187
|
logo-dev-token="${this.logoDevToken}"
|
|
158
188
|
></consent-connector-header>
|
|
@@ -189,6 +219,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
189
219
|
`)}
|
|
190
220
|
</div>
|
|
191
221
|
</div>
|
|
222
|
+
<slot name="auth"></slot>
|
|
192
223
|
<consent-revocation-notice
|
|
193
224
|
revocationPath="${this.revocationPath}"
|
|
194
225
|
orgName="${this.orgName || "this site"}"
|
|
@@ -198,7 +229,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends lit_1.Li
|
|
|
198
229
|
agentName="${agentName}"
|
|
199
230
|
theme="${this.theme}"
|
|
200
231
|
?loading=${this.loading}
|
|
201
|
-
?disabled=${this.selected.size === 0}
|
|
232
|
+
?disabled=${this.allowDisabled || this.selected.size === 0}
|
|
202
233
|
@consent-allow=${this.onAllow}
|
|
203
234
|
@consent-deny=${this.onDeny}
|
|
204
235
|
></consent-action-bar>
|
|
@@ -313,12 +344,21 @@ __decorate([
|
|
|
313
344
|
__decorate([
|
|
314
345
|
(0, decorators_js_1.property)({ type: Boolean })
|
|
315
346
|
], ConsentCapabilitiesScreen.prototype, "loading", void 0);
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, decorators_js_1.property)({ type: Boolean, reflect: true, attribute: "all-selected" })
|
|
349
|
+
], ConsentCapabilitiesScreen.prototype, "allSelected", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
(0, decorators_js_1.property)({ type: Boolean, attribute: "allow-disabled" })
|
|
352
|
+
], ConsentCapabilitiesScreen.prototype, "allowDisabled", void 0);
|
|
316
353
|
__decorate([
|
|
317
354
|
(0, decorators_js_1.property)({ type: String, attribute: "server-domain" })
|
|
318
355
|
], ConsentCapabilitiesScreen.prototype, "serverDomain", void 0);
|
|
319
356
|
__decorate([
|
|
320
357
|
(0, decorators_js_1.property)({ type: String, attribute: "logo-dev-token" })
|
|
321
358
|
], ConsentCapabilitiesScreen.prototype, "logoDevToken", void 0);
|
|
359
|
+
__decorate([
|
|
360
|
+
(0, decorators_js_1.property)({ type: String, attribute: "server-logo-url" })
|
|
361
|
+
], ConsentCapabilitiesScreen.prototype, "serverLogoUrl", void 0);
|
|
322
362
|
__decorate([
|
|
323
363
|
(0, decorators_js_1.state)()
|
|
324
364
|
], ConsentCapabilitiesScreen.prototype, "selected", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-capabilities-screen.js","sourceRoot":"","sources":["../../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"consent-capabilities-screen.js","sourceRoot":"","sources":["../../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAqE;AACrE,iDAA0E;AAO1E,oDAA8D;AAC9D,yFAGkD;AAClD,qCAAmC;AACnC,wCAAsC;AACtC,mCAAiC;AACjC,+BAA6B;AAC7B,0CAAwC;AACxC,yCAAuC;AAahC,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,gBAAU;IAAlD;;QACsB,iBAAY,GAAiB,EAAE,CAAC;QAG/B,YAAO,GAAG,EAAE,CAAC;QACb,iBAAY,GAAG,KAAK,CAAC;QACrB,mBAAc,GAAG,4BAA4B,CAAC;QAC9C,mBAAc,GAAG,EAAE,CAAC;QACpB,UAAK,GAAiB,OAAO,CAAC;QACC,kBAAa,GAAG,EAAE,CAAC;QACjD,YAAO,GAAG,KAAK,CAAC;QAE7C;;;;WAIG;QAEH,gBAAW,GAAG,KAAK,CAAC;QA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</code></li>`)}
|
|
106
106
|
</ul>
|
|
107
107
|
${explanation.resource
|
|
108
|
-
? (0, lit_1.html) `<p>
|
|
109
|
-
On <code>${explanation.resource}</code>
|
|
110
|
-
</p>`
|
|
108
|
+
? (0, lit_1.html) `<p>On <code>${explanation.resource}</code></p>`
|
|
111
109
|
: (0, lit_1.html) `<p>On ${tokens.glossUnknownResource}</p>`}
|
|
112
110
|
<h4>${tokens.rawPolicyTitle}</h4>
|
|
113
111
|
<pre><code>${this.compiledCedar}</code></pre>
|
|
@@ -148,7 +146,10 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement
|
|
|
148
146
|
<div class="icon-tile" aria-hidden="true">${this.renderIcon()}</div>
|
|
149
147
|
<div class="body">
|
|
150
148
|
<div class="row-label">
|
|
151
|
-
<span
|
|
149
|
+
<span
|
|
150
|
+
><strong>${this.label}</strong>
|
|
151
|
+
<span class="description">${this.description}</span></span
|
|
152
|
+
>
|
|
152
153
|
${this.isHigherRisk()
|
|
153
154
|
? (0, lit_1.html) `<span class="risk-chip">${tokens.higherRiskChip}</span>`
|
|
154
155
|
: lit_1.nothing}
|
|
@@ -207,16 +208,18 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
207
208
|
align-items: center;
|
|
208
209
|
justify-content: center;
|
|
209
210
|
padding: 0;
|
|
210
|
-
transition:
|
|
211
|
+
transition:
|
|
212
|
+
background 0.12s ease,
|
|
213
|
+
border-color 0.12s ease;
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
.checkbox[aria-checked="true"] {
|
|
214
|
-
background: var(--cs-surface-accent, #
|
|
215
|
-
border-color: var(--cs-surface-accent, #
|
|
217
|
+
background: var(--cs-surface-accent, #0f172a);
|
|
218
|
+
border-color: var(--cs-surface-accent, #0f172a);
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
.checkbox:focus-visible {
|
|
219
|
-
outline: 2px solid var(--cs-focus-ring, #
|
|
222
|
+
outline: 2px solid var(--cs-focus-ring, #0f172a);
|
|
220
223
|
outline-offset: 2px;
|
|
221
224
|
}
|
|
222
225
|
|
|
@@ -230,7 +233,7 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
230
233
|
width: 36px;
|
|
231
234
|
height: 36px;
|
|
232
235
|
border-radius: 10px;
|
|
233
|
-
background: var(--cs-surface-inset, #
|
|
236
|
+
background: var(--cs-surface-inset, #f1ece2);
|
|
234
237
|
display: flex;
|
|
235
238
|
align-items: center;
|
|
236
239
|
justify-content: center;
|
|
@@ -255,7 +258,7 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
255
258
|
gap: 10px;
|
|
256
259
|
flex-wrap: wrap;
|
|
257
260
|
font-size: 14.5px;
|
|
258
|
-
color: var(--cs-text-primary, #
|
|
261
|
+
color: var(--cs-text-primary, #0f172a);
|
|
259
262
|
line-height: 1.45;
|
|
260
263
|
}
|
|
261
264
|
|
|
@@ -274,8 +277,8 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
274
277
|
font-size: 10.5px;
|
|
275
278
|
font-weight: 700;
|
|
276
279
|
letter-spacing: 0.06em;
|
|
277
|
-
background: var(--cs-chip-risk-bg, #
|
|
278
|
-
color: var(--cs-chip-risk-text, #
|
|
280
|
+
background: var(--cs-chip-risk-bg, #fce7b6);
|
|
281
|
+
color: var(--cs-chip-risk-text, #7a4f00);
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
.policy-toggle {
|
|
@@ -285,21 +288,21 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
285
288
|
padding: 0;
|
|
286
289
|
font-size: 12px;
|
|
287
290
|
font-weight: 500;
|
|
288
|
-
color: var(--cs-text-tertiary, #
|
|
291
|
+
color: var(--cs-text-tertiary, #64748b);
|
|
289
292
|
text-decoration: underline;
|
|
290
293
|
text-underline-offset: 2px;
|
|
291
294
|
cursor: pointer;
|
|
292
295
|
}
|
|
293
296
|
|
|
294
297
|
.policy-toggle:focus-visible {
|
|
295
|
-
outline: 2px solid var(--cs-focus-ring, #
|
|
298
|
+
outline: 2px solid var(--cs-focus-ring, #0f172a);
|
|
296
299
|
outline-offset: 2px;
|
|
297
300
|
}
|
|
298
301
|
|
|
299
302
|
.policy-disclosure {
|
|
300
303
|
margin-top: 8px;
|
|
301
304
|
border-radius: 10px;
|
|
302
|
-
background: var(--cs-surface-inset, #
|
|
305
|
+
background: var(--cs-surface-inset, #f1ece2);
|
|
303
306
|
padding: 10px 12px;
|
|
304
307
|
font-size: 12px;
|
|
305
308
|
color: var(--cs-text-secondary, #334155);
|
|
@@ -313,7 +316,7 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
313
316
|
font-size: 11px;
|
|
314
317
|
letter-spacing: 0.08em;
|
|
315
318
|
text-transform: uppercase;
|
|
316
|
-
color: var(--cs-text-tertiary, #
|
|
319
|
+
color: var(--cs-text-tertiary, #64748b);
|
|
317
320
|
}
|
|
318
321
|
|
|
319
322
|
.policy-disclosure pre {
|
|
@@ -323,7 +326,7 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
323
326
|
line-height: 1.5;
|
|
324
327
|
white-space: pre-wrap;
|
|
325
328
|
word-break: break-word;
|
|
326
|
-
color: var(--cs-text-primary, #
|
|
329
|
+
color: var(--cs-text-primary, #0f172a);
|
|
327
330
|
}
|
|
328
331
|
|
|
329
332
|
.policy-disclosure ul {
|
|
@@ -365,35 +368,191 @@ exports.ConsentCapabilityCard = ConsentCapabilityCard = __decorate([
|
|
|
365
368
|
function iconSvgFor(icon) {
|
|
366
369
|
switch (icon) {
|
|
367
370
|
case "search":
|
|
368
|
-
return (0, lit_1.html) `<svg
|
|
371
|
+
return (0, lit_1.html) `<svg
|
|
372
|
+
viewBox="0 0 20 20"
|
|
373
|
+
fill="none"
|
|
374
|
+
stroke="currentColor"
|
|
375
|
+
stroke-width="1.6"
|
|
376
|
+
stroke-linecap="round"
|
|
377
|
+
stroke-linejoin="round"
|
|
378
|
+
>
|
|
379
|
+
<circle cx="9" cy="9" r="5.25" />
|
|
380
|
+
<path d="m13.25 13.25 3.5 3.5" />
|
|
381
|
+
</svg>`;
|
|
369
382
|
case "cart":
|
|
370
|
-
return (0, lit_1.html) `<svg
|
|
383
|
+
return (0, lit_1.html) `<svg
|
|
384
|
+
viewBox="0 0 20 20"
|
|
385
|
+
fill="none"
|
|
386
|
+
stroke="currentColor"
|
|
387
|
+
stroke-width="1.6"
|
|
388
|
+
stroke-linecap="round"
|
|
389
|
+
stroke-linejoin="round"
|
|
390
|
+
>
|
|
391
|
+
<path
|
|
392
|
+
d="M3 3h2l1.4 9.4a1.5 1.5 0 0 0 1.5 1.3h7.6a1.5 1.5 0 0 0 1.5-1.2L18 6H6"
|
|
393
|
+
/>
|
|
394
|
+
<circle cx="9" cy="17" r="1.2" />
|
|
395
|
+
<circle cx="15" cy="17" r="1.2" />
|
|
396
|
+
</svg>`;
|
|
371
397
|
case "card":
|
|
372
|
-
return (0, lit_1.html) `<svg
|
|
398
|
+
return (0, lit_1.html) `<svg
|
|
399
|
+
viewBox="0 0 20 20"
|
|
400
|
+
fill="none"
|
|
401
|
+
stroke="currentColor"
|
|
402
|
+
stroke-width="1.6"
|
|
403
|
+
stroke-linecap="round"
|
|
404
|
+
stroke-linejoin="round"
|
|
405
|
+
>
|
|
406
|
+
<rect x="2.5" y="4.5" width="15" height="11" rx="2" />
|
|
407
|
+
<path d="M2.5 9h15" />
|
|
408
|
+
<path d="M5.5 13h3" />
|
|
409
|
+
</svg>`;
|
|
373
410
|
case "pin":
|
|
374
|
-
return (0, lit_1.html) `<svg
|
|
411
|
+
return (0, lit_1.html) `<svg
|
|
412
|
+
viewBox="0 0 20 20"
|
|
413
|
+
fill="none"
|
|
414
|
+
stroke="currentColor"
|
|
415
|
+
stroke-width="1.6"
|
|
416
|
+
stroke-linecap="round"
|
|
417
|
+
stroke-linejoin="round"
|
|
418
|
+
>
|
|
419
|
+
<path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z" />
|
|
420
|
+
<circle cx="10" cy="8" r="2" />
|
|
421
|
+
</svg>`;
|
|
375
422
|
case "pin-new":
|
|
376
|
-
return (0, lit_1.html) `<svg
|
|
423
|
+
return (0, lit_1.html) `<svg
|
|
424
|
+
viewBox="0 0 20 20"
|
|
425
|
+
fill="none"
|
|
426
|
+
stroke="currentColor"
|
|
427
|
+
stroke-width="1.6"
|
|
428
|
+
stroke-linecap="round"
|
|
429
|
+
stroke-linejoin="round"
|
|
430
|
+
>
|
|
431
|
+
<path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z" />
|
|
432
|
+
<path d="M10 6v4" />
|
|
433
|
+
<path d="M8 8h4" />
|
|
434
|
+
</svg>`;
|
|
377
435
|
case "shield":
|
|
378
|
-
return (0, lit_1.html) `<svg
|
|
436
|
+
return (0, lit_1.html) `<svg
|
|
437
|
+
viewBox="0 0 20 20"
|
|
438
|
+
fill="none"
|
|
439
|
+
stroke="currentColor"
|
|
440
|
+
stroke-width="1.6"
|
|
441
|
+
stroke-linecap="round"
|
|
442
|
+
stroke-linejoin="round"
|
|
443
|
+
>
|
|
444
|
+
<path d="M10 2.5 4 5v5.5C4 14 6.5 16.5 10 17.5c3.5-1 6-3.5 6-7V5z" />
|
|
445
|
+
</svg>`;
|
|
379
446
|
case "key":
|
|
380
|
-
return (0, lit_1.html) `<svg
|
|
447
|
+
return (0, lit_1.html) `<svg
|
|
448
|
+
viewBox="0 0 20 20"
|
|
449
|
+
fill="none"
|
|
450
|
+
stroke="currentColor"
|
|
451
|
+
stroke-width="1.6"
|
|
452
|
+
stroke-linecap="round"
|
|
453
|
+
stroke-linejoin="round"
|
|
454
|
+
>
|
|
455
|
+
<circle cx="7" cy="13" r="3.25" />
|
|
456
|
+
<path d="m9.5 11 6.5-6.5" />
|
|
457
|
+
<path d="m13.5 7 2 2" />
|
|
458
|
+
</svg>`;
|
|
381
459
|
case "tools":
|
|
382
|
-
return (0, lit_1.html) `<svg
|
|
460
|
+
return (0, lit_1.html) `<svg
|
|
461
|
+
viewBox="0 0 20 20"
|
|
462
|
+
fill="none"
|
|
463
|
+
stroke="currentColor"
|
|
464
|
+
stroke-width="1.6"
|
|
465
|
+
stroke-linecap="round"
|
|
466
|
+
stroke-linejoin="round"
|
|
467
|
+
>
|
|
468
|
+
<path d="m4 4 6 6" />
|
|
469
|
+
<path d="m10 4 6 6" />
|
|
470
|
+
<path d="m4 16 12-12" />
|
|
471
|
+
</svg>`;
|
|
383
472
|
case "user":
|
|
384
|
-
return (0, lit_1.html) `<svg
|
|
473
|
+
return (0, lit_1.html) `<svg
|
|
474
|
+
viewBox="0 0 20 20"
|
|
475
|
+
fill="none"
|
|
476
|
+
stroke="currentColor"
|
|
477
|
+
stroke-width="1.6"
|
|
478
|
+
stroke-linecap="round"
|
|
479
|
+
stroke-linejoin="round"
|
|
480
|
+
>
|
|
481
|
+
<circle cx="10" cy="7" r="3" />
|
|
482
|
+
<path d="M3 17a7 7 0 0 1 14 0" />
|
|
483
|
+
</svg>`;
|
|
385
484
|
case "calendar":
|
|
386
|
-
return (0, lit_1.html) `<svg
|
|
485
|
+
return (0, lit_1.html) `<svg
|
|
486
|
+
viewBox="0 0 20 20"
|
|
487
|
+
fill="none"
|
|
488
|
+
stroke="currentColor"
|
|
489
|
+
stroke-width="1.6"
|
|
490
|
+
stroke-linecap="round"
|
|
491
|
+
stroke-linejoin="round"
|
|
492
|
+
>
|
|
493
|
+
<rect x="3" y="4" width="14" height="13" rx="2" />
|
|
494
|
+
<path d="M3 8h14" />
|
|
495
|
+
<path d="M7 2v4M13 2v4" />
|
|
496
|
+
</svg>`;
|
|
387
497
|
case "lock":
|
|
388
|
-
return (0, lit_1.html) `<svg
|
|
498
|
+
return (0, lit_1.html) `<svg
|
|
499
|
+
viewBox="0 0 20 20"
|
|
500
|
+
fill="none"
|
|
501
|
+
stroke="currentColor"
|
|
502
|
+
stroke-width="1.6"
|
|
503
|
+
stroke-linecap="round"
|
|
504
|
+
stroke-linejoin="round"
|
|
505
|
+
>
|
|
506
|
+
<rect x="4" y="9" width="12" height="8" rx="2" />
|
|
507
|
+
<path d="M7 9V6a3 3 0 0 1 6 0v3" />
|
|
508
|
+
</svg>`;
|
|
389
509
|
case "eye":
|
|
390
|
-
return (0, lit_1.html) `<svg
|
|
510
|
+
return (0, lit_1.html) `<svg
|
|
511
|
+
viewBox="0 0 20 20"
|
|
512
|
+
fill="none"
|
|
513
|
+
stroke="currentColor"
|
|
514
|
+
stroke-width="1.6"
|
|
515
|
+
stroke-linecap="round"
|
|
516
|
+
stroke-linejoin="round"
|
|
517
|
+
>
|
|
518
|
+
<path d="M2 10s3-6 8-6 8 6 8 6-3 6-8 6-8-6-8-6z" />
|
|
519
|
+
<circle cx="10" cy="10" r="2.25" />
|
|
520
|
+
</svg>`;
|
|
391
521
|
case "send":
|
|
392
|
-
return (0, lit_1.html) `<svg
|
|
522
|
+
return (0, lit_1.html) `<svg
|
|
523
|
+
viewBox="0 0 20 20"
|
|
524
|
+
fill="none"
|
|
525
|
+
stroke="currentColor"
|
|
526
|
+
stroke-width="1.6"
|
|
527
|
+
stroke-linecap="round"
|
|
528
|
+
stroke-linejoin="round"
|
|
529
|
+
>
|
|
530
|
+
<path d="m17 3-7 7-2 7-3-9z" />
|
|
531
|
+
</svg>`;
|
|
393
532
|
case "package":
|
|
394
|
-
return (0, lit_1.html) `<svg
|
|
533
|
+
return (0, lit_1.html) `<svg
|
|
534
|
+
viewBox="0 0 20 20"
|
|
535
|
+
fill="none"
|
|
536
|
+
stroke="currentColor"
|
|
537
|
+
stroke-width="1.6"
|
|
538
|
+
stroke-linecap="round"
|
|
539
|
+
stroke-linejoin="round"
|
|
540
|
+
>
|
|
541
|
+
<path d="m10 2 7 4v8l-7 4-7-4V6z" />
|
|
542
|
+
<path d="m3 6 7 4 7-4" />
|
|
543
|
+
<path d="M10 18V10" />
|
|
544
|
+
</svg>`;
|
|
395
545
|
default:
|
|
396
|
-
return (0, lit_1.html) `<svg
|
|
546
|
+
return (0, lit_1.html) `<svg
|
|
547
|
+
viewBox="0 0 20 20"
|
|
548
|
+
fill="none"
|
|
549
|
+
stroke="currentColor"
|
|
550
|
+
stroke-width="1.6"
|
|
551
|
+
stroke-linecap="round"
|
|
552
|
+
stroke-linejoin="round"
|
|
553
|
+
>
|
|
554
|
+
<circle cx="10" cy="10" r="5" />
|
|
555
|
+
</svg>`;
|
|
397
556
|
}
|
|
398
557
|
}
|
|
399
558
|
//# sourceMappingURL=consent-capability-card.js.map
|