@kya-os/consent 0.4.0 → 0.4.1
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 +182 -22
- package/dist/bundle/index.d.ts +4 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +6 -0
- 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/cjs/bundle/index.js +15 -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/components/consent-action-bar.js +97 -25
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +7 -105
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-button.js +6 -1
- package/dist/cjs/components/consent-button.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +454 -68
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +131 -27
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +7 -0
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-connector-header.js +206 -43
- package/dist/cjs/components/consent-connector-header.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +1 -1
- package/dist/cjs/components/consent-footer.js +13 -12
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +399 -33
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-oauth-button.js +71 -62
- package/dist/cjs/components/consent-oauth-button.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +5 -0
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +3 -3
- package/dist/cjs/components/consent-request-expiry.js +1 -1
- package/dist/cjs/components/consent-revocation-notice.js +4 -2
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
- package/dist/cjs/components/consent-revoke.js +9 -4
- package/dist/cjs/components/consent-revoke.js.map +1 -1
- package/dist/cjs/components/consent-secured-by.js +106 -0
- package/dist/cjs/components/consent-secured-by.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +1 -1
- package/dist/cjs/components/consent-terms.js +7 -0
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +1 -1
- package/dist/cjs/components/consent-wallet-notice.js +1 -1
- package/dist/cjs/components/consent-wallet-orb.js +1 -1
- package/dist/cjs/components/consent-wallet-signature.js +1 -1
- package/dist/cjs/components/decision-icons.js +33 -0
- package/dist/cjs/components/decision-icons.js.map +1 -0
- package/dist/cjs/components/edit-region.js +309 -0
- package/dist/cjs/components/edit-region.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +2 -2
- package/dist/cjs/components/index.js +4 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +81 -36
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/preview.js +67 -0
- package/dist/cjs/components/preview.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +12 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +60 -21
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/identity/agent-identity.js +3 -2
- package/dist/cjs/identity/agent-identity.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/react/index.js +11 -2
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/styles/brand.js +385 -0
- package/dist/cjs/styles/brand.js.map +1 -0
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +100 -30
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +1 -2
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/cjs/types/decision.types.js +13 -0
- package/dist/cjs/types/decision.types.js.map +1 -0
- package/dist/cjs/types/edit.types.js +80 -0
- package/dist/cjs/types/edit.types.js.map +1 -0
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +20 -1
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +97 -25
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts +4 -17
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +7 -105
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-button.d.ts +2 -0
- package/dist/components/consent-button.d.ts.map +1 -1
- package/dist/components/consent-button.js +6 -1
- package/dist/components/consent-button.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +85 -17
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +456 -70
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +23 -3
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +131 -27
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +2 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -1
- package/dist/components/consent-checkbox.js +7 -0
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-connector-header.d.ts +39 -7
- package/dist/components/consent-connector-header.d.ts.map +1 -1
- package/dist/components/consent-connector-header.js +206 -43
- package/dist/components/consent-connector-header.js.map +1 -1
- package/dist/components/consent-duration.js +1 -1
- package/dist/components/consent-footer.d.ts +6 -4
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +13 -12
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-headline.d.ts +55 -16
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +398 -34
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-oauth-button.d.ts +7 -3
- package/dist/components/consent-oauth-button.d.ts.map +1 -1
- package/dist/components/consent-oauth-button.js +74 -65
- package/dist/components/consent-oauth-button.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +5 -0
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-passkey.d.ts +6 -0
- package/dist/components/consent-passkey.d.ts.map +1 -1
- package/dist/components/consent-passkey.js +67 -9
- package/dist/components/consent-passkey.js.map +1 -1
- package/dist/components/consent-phone-handoff.js +3 -3
- package/dist/components/consent-request-expiry.js +1 -1
- package/dist/components/consent-revocation-notice.d.ts.map +1 -1
- package/dist/components/consent-revocation-notice.js +4 -2
- package/dist/components/consent-revocation-notice.js.map +1 -1
- package/dist/components/consent-revoke.d.ts +2 -0
- package/dist/components/consent-revoke.d.ts.map +1 -1
- package/dist/components/consent-revoke.js +9 -4
- package/dist/components/consent-revoke.js.map +1 -1
- package/dist/components/consent-secured-by.d.ts +25 -0
- package/dist/components/consent-secured-by.d.ts.map +1 -0
- package/dist/components/consent-secured-by.js +103 -0
- package/dist/components/consent-secured-by.js.map +1 -0
- package/dist/components/consent-shell.js +1 -1
- package/dist/components/consent-terms.d.ts +2 -0
- package/dist/components/consent-terms.d.ts.map +1 -1
- package/dist/components/consent-terms.js +7 -0
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.js +1 -1
- package/dist/components/consent-wallet-notice.js +1 -1
- package/dist/components/consent-wallet-orb.js +1 -1
- package/dist/components/consent-wallet-signature.js +1 -1
- package/dist/components/decision-icons.d.ts +22 -0
- package/dist/components/decision-icons.d.ts.map +1 -0
- package/dist/components/decision-icons.js +30 -0
- package/dist/components/decision-icons.js.map +1 -0
- package/dist/components/edit-region.d.ts +50 -0
- package/dist/components/edit-region.d.ts.map +1 -0
- package/dist/components/edit-region.js +305 -0
- package/dist/components/edit-region.js.map +1 -0
- package/dist/components/grant-field-styles.js +2 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +15 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +81 -36
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/preview.d.ts +38 -0
- package/dist/components/preview.d.ts.map +1 -0
- package/dist/components/preview.js +61 -0
- package/dist/components/preview.js.map +1 -0
- package/dist/consent.js +2104 -389
- package/dist/consent.min.js +1289 -497
- package/dist/constants/capabilities.d.ts +12 -3
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +12 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +60 -21
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +60 -21
- package/dist/copy/tokens.js.map +1 -1
- package/dist/identity/agent-identity.d.ts +3 -2
- package/dist/identity/agent-identity.d.ts.map +1 -1
- package/dist/identity/agent-identity.js +3 -2
- package/dist/identity/agent-identity.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/react/index.d.ts +6 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +10 -1
- package/dist/react/index.js.map +1 -1
- package/dist/styles/brand.d.ts +184 -0
- package/dist/styles/brand.d.ts.map +1 -0
- package/dist/styles/brand.js +372 -0
- package/dist/styles/brand.js.map +1 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/theme.d.ts +73 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +96 -29
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +12 -14
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +1 -2
- package/dist/types/capabilities.types.js.map +1 -1
- package/dist/types/decision.types.d.ts +57 -0
- package/dist/types/decision.types.d.ts.map +1 -0
- package/dist/types/decision.types.js +12 -0
- package/dist/types/decision.types.js.map +1 -0
- package/dist/types/edit.types.d.ts +73 -0
- package/dist/types/edit.types.d.ts.map +1 -0
- package/dist/types/edit.types.js +76 -0
- package/dist/types/edit.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,40 +2,27 @@
|
|
|
2
2
|
* Consent Agent Header
|
|
3
3
|
*
|
|
4
4
|
* Renders the agent identity tile shared between the new consent screen and
|
|
5
|
-
* the OAuth Gateway consent modal. Shows logo + name +
|
|
5
|
+
* the OAuth Gateway consent modal. Shows logo + name + meta line
|
|
6
6
|
* (`Made by {Vendor} · Asking from your {Surface} · Connected just now`,
|
|
7
|
-
* leaving out a vendor or surface that isn't known).
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* (`verification`): Verified, the domain a CIMD client is bound to (e.g.
|
|
11
|
-
* "chatgpt.com", never the word Verified), or UNVERIFIED.
|
|
7
|
+
* leaving out a vendor or surface that isn't known). It draws no badge: how
|
|
8
|
+
* the agent's identity is established (`AgentMetadata.verification`) decides
|
|
9
|
+
* what a grant may reach, not what the tile says.
|
|
12
10
|
*
|
|
13
11
|
* Fed by `AgentMetadata` from `@kya-os/consent/types/capabilities`.
|
|
14
12
|
*
|
|
15
13
|
* @module components/consent-agent-header
|
|
16
14
|
*/
|
|
17
15
|
import { LitElement } from "lit";
|
|
18
|
-
import { type AgentVerification } from "../types/capabilities.types.js";
|
|
19
16
|
export declare class ConsentAgentHeader extends LitElement {
|
|
20
17
|
agentName: string;
|
|
21
18
|
vendor: string;
|
|
22
19
|
surfaceLabel: string;
|
|
23
|
-
/**
|
|
24
|
-
* How the agent's identity is established: `verified`, `domain` or
|
|
25
|
-
* `unverified`. When unset, the deprecated `verified` boolean decides.
|
|
26
|
-
*/
|
|
27
|
-
verification: AgentVerification | undefined;
|
|
28
|
-
/** The domain a `domain` agent is bound to, named in its pill. */
|
|
29
|
-
domain: string;
|
|
30
|
-
/** @deprecated Use `verification`; read only when it is unset. */
|
|
31
|
-
verified: boolean;
|
|
32
20
|
logoUrl: string;
|
|
33
21
|
connectedAt: string;
|
|
34
22
|
static styles: import("lit").CSSResult;
|
|
35
23
|
private renderConnectedFragment;
|
|
36
24
|
/** Only the parts that are known: an unknown vendor or surface is left out. */
|
|
37
25
|
private renderMeta;
|
|
38
|
-
private renderPill;
|
|
39
26
|
render(): import("lit").TemplateResult<1>;
|
|
40
27
|
}
|
|
41
28
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-agent-header.d.ts","sourceRoot":"","sources":["../../src/components/consent-agent-header.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-agent-header.d.ts","sourceRoot":"","sources":["../../src/components/consent-agent-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,qBACa,kBAAmB,SAAQ,UAAU;IACpB,SAAS,SAAM;IACf,MAAM,SAAM;IACZ,YAAY,SAAM;IAClB,OAAO,SAAM;IACb,WAAW,SAAM;IAE7C,OAAgB,MAAM,0BAyEpB;IAEF,OAAO,CAAC,uBAAuB;IAiB/B,+EAA+E;IAC/E,OAAO,CAAC,UAAU;IAgBT,MAAM;CAiBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* Consent Agent Header
|
|
3
3
|
*
|
|
4
4
|
* Renders the agent identity tile shared between the new consent screen and
|
|
5
|
-
* the OAuth Gateway consent modal. Shows logo + name +
|
|
5
|
+
* the OAuth Gateway consent modal. Shows logo + name + meta line
|
|
6
6
|
* (`Made by {Vendor} · Asking from your {Surface} · Connected just now`,
|
|
7
|
-
* leaving out a vendor or surface that isn't known).
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* (`verification`): Verified, the domain a CIMD client is bound to (e.g.
|
|
11
|
-
* "chatgpt.com", never the word Verified), or UNVERIFIED.
|
|
7
|
+
* leaving out a vendor or surface that isn't known). It draws no badge: how
|
|
8
|
+
* the agent's identity is established (`AgentMetadata.verification`) decides
|
|
9
|
+
* what a grant may reach, not what the tile says.
|
|
12
10
|
*
|
|
13
11
|
* Fed by `AgentMetadata` from `@kya-os/consent/types/capabilities`.
|
|
14
12
|
*
|
|
@@ -23,17 +21,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
23
21
|
import { LitElement, html, css, nothing } from "lit";
|
|
24
22
|
import { customElement, property } from "lit/decorators.js";
|
|
25
23
|
import { CONSENT_COPY_TOKENS, formatToken } from "../copy/tokens.js";
|
|
26
|
-
import { agentVerification, } from "../types/capabilities.types.js";
|
|
27
24
|
let ConsentAgentHeader = class ConsentAgentHeader extends LitElement {
|
|
28
25
|
constructor() {
|
|
29
26
|
super(...arguments);
|
|
30
27
|
this.agentName = "";
|
|
31
28
|
this.vendor = "";
|
|
32
29
|
this.surfaceLabel = "";
|
|
33
|
-
/** The domain a `domain` agent is bound to, named in its pill. */
|
|
34
|
-
this.domain = "";
|
|
35
|
-
/** @deprecated Use `verification`; read only when it is unset. */
|
|
36
|
-
this.verified = false;
|
|
37
30
|
this.logoUrl = "";
|
|
38
31
|
this.connectedAt = "";
|
|
39
32
|
}
|
|
@@ -68,23 +61,6 @@ let ConsentAgentHeader = class ConsentAgentHeader extends LitElement {
|
|
|
68
61
|
.filter(Boolean)
|
|
69
62
|
.join(tokens.metaSeparator);
|
|
70
63
|
}
|
|
71
|
-
renderPill() {
|
|
72
|
-
const tokens = CONSENT_COPY_TOKENS.agentTile;
|
|
73
|
-
const state = agentVerification({
|
|
74
|
-
verification: this.verification,
|
|
75
|
-
verified: this.verified,
|
|
76
|
-
domain: this.domain,
|
|
77
|
-
});
|
|
78
|
-
if (state === "domain") {
|
|
79
|
-
return html `<span class="pill domain" part="pill"
|
|
80
|
-
><span class="visually-hidden">${tokens.domainPillPrefix} </span
|
|
81
|
-
>${this.domain.trim()}</span
|
|
82
|
-
>`;
|
|
83
|
-
}
|
|
84
|
-
return html `<span class="pill ${state}" part="pill">
|
|
85
|
-
${state === "verified" ? tokens.verifiedPill : tokens.unverifiedPill}
|
|
86
|
-
</span>`;
|
|
87
|
-
}
|
|
88
64
|
render() {
|
|
89
65
|
const initial = (this.agentName || "?").trim().charAt(0).toUpperCase();
|
|
90
66
|
return html `
|
|
@@ -95,10 +71,7 @@ let ConsentAgentHeader = class ConsentAgentHeader extends LitElement {
|
|
|
95
71
|
: html `<div class="placeholder">${initial}</div>`}
|
|
96
72
|
</div>
|
|
97
73
|
<div class="body">
|
|
98
|
-
<
|
|
99
|
-
<span class="name">${this.agentName || nothing}</span>
|
|
100
|
-
${this.renderPill()}
|
|
101
|
-
</div>
|
|
74
|
+
<span class="name">${this.agentName || nothing}</span>
|
|
102
75
|
<div class="meta">${this.renderMeta()}</div>
|
|
103
76
|
</div>
|
|
104
77
|
</div>
|
|
@@ -112,7 +85,7 @@ ConsentAgentHeader.styles = css `
|
|
|
112
85
|
}
|
|
113
86
|
|
|
114
87
|
/* In a narrow card the name moves under the logo rather than squeezing
|
|
115
|
-
into a column too thin
|
|
88
|
+
into a column too thin to read (see .body's basis). */
|
|
116
89
|
.tile {
|
|
117
90
|
display: flex;
|
|
118
91
|
flex-wrap: wrap;
|
|
@@ -166,13 +139,6 @@ ConsentAgentHeader.styles = css `
|
|
|
166
139
|
min-width: 0;
|
|
167
140
|
}
|
|
168
141
|
|
|
169
|
-
.row-name {
|
|
170
|
-
display: flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
gap: 10px;
|
|
173
|
-
flex-wrap: wrap;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
142
|
.name {
|
|
177
143
|
font-size: 16px;
|
|
178
144
|
font-weight: 600;
|
|
@@ -180,64 +146,9 @@ ConsentAgentHeader.styles = css `
|
|
|
180
146
|
letter-spacing: -0.01em;
|
|
181
147
|
}
|
|
182
148
|
|
|
183
|
-
.pill {
|
|
184
|
-
display: inline-flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
gap: 4px;
|
|
187
|
-
padding: 2px 8px;
|
|
188
|
-
border-radius: 999px;
|
|
189
|
-
font-size: 11px;
|
|
190
|
-
font-weight: 600;
|
|
191
|
-
letter-spacing: 0.04em;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.pill.verified {
|
|
195
|
-
background: var(--cs-pill-verified-bg, #dcfce7);
|
|
196
|
-
color: var(--cs-pill-verified-text, #166534);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.pill.unverified {
|
|
200
|
-
background: var(--cs-pill-unverified-bg, #f1f5f9);
|
|
201
|
-
color: var(--cs-pill-unverified-text, #475569);
|
|
202
|
-
letter-spacing: 0.08em;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/*
|
|
206
|
-
* Domain-bound: a tint and an outline from the brand primary, with the
|
|
207
|
-
* theme's own text color, so the domain reads in light and dark
|
|
208
|
-
* whatever the brand color is.
|
|
209
|
-
*/
|
|
210
|
-
.pill.domain {
|
|
211
|
-
background: var(
|
|
212
|
-
--cs-pill-domain-bg,
|
|
213
|
-
color-mix(in srgb, var(--consent-primary, #2563eb) 14%, transparent)
|
|
214
|
-
);
|
|
215
|
-
box-shadow: inset 0 0 0 1px
|
|
216
|
-
var(
|
|
217
|
-
--cs-pill-domain-border,
|
|
218
|
-
color-mix(in srgb, var(--consent-primary, #2563eb) 40%, transparent)
|
|
219
|
-
);
|
|
220
|
-
color: var(--cs-pill-domain-text, var(--cs-text-primary, #0f172a));
|
|
221
|
-
font-weight: 500;
|
|
222
|
-
letter-spacing: 0;
|
|
223
|
-
overflow-wrap: anywhere;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.visually-hidden {
|
|
227
|
-
position: absolute;
|
|
228
|
-
width: 1px;
|
|
229
|
-
height: 1px;
|
|
230
|
-
margin: -1px;
|
|
231
|
-
padding: 0;
|
|
232
|
-
overflow: hidden;
|
|
233
|
-
clip: rect(0, 0, 0, 0);
|
|
234
|
-
white-space: nowrap;
|
|
235
|
-
border: 0;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
149
|
.meta {
|
|
239
150
|
font-size: 12px;
|
|
240
|
-
color: var(--cs-text-tertiary, #
|
|
151
|
+
color: var(--cs-text-tertiary, #5d6c82);
|
|
241
152
|
line-height: 1.5;
|
|
242
153
|
}
|
|
243
154
|
`;
|
|
@@ -250,15 +161,6 @@ __decorate([
|
|
|
250
161
|
__decorate([
|
|
251
162
|
property({ type: String })
|
|
252
163
|
], ConsentAgentHeader.prototype, "surfaceLabel", void 0);
|
|
253
|
-
__decorate([
|
|
254
|
-
property({ type: String })
|
|
255
|
-
], ConsentAgentHeader.prototype, "verification", void 0);
|
|
256
|
-
__decorate([
|
|
257
|
-
property({ type: String })
|
|
258
|
-
], ConsentAgentHeader.prototype, "domain", void 0);
|
|
259
|
-
__decorate([
|
|
260
|
-
property({ type: Boolean })
|
|
261
|
-
], ConsentAgentHeader.prototype, "verified", void 0);
|
|
262
164
|
__decorate([
|
|
263
165
|
property({ type: String })
|
|
264
166
|
], ConsentAgentHeader.prototype, "logoUrl", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-agent-header.js","sourceRoot":"","sources":["../../src/components/consent-agent-header.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-agent-header.js","sourceRoot":"","sources":["../../src/components/consent-agent-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAG9D,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAA3C;;QACuB,cAAS,GAAG,EAAE,CAAC;QACf,WAAM,GAAG,EAAE,CAAC;QACZ,iBAAY,GAAG,EAAE,CAAC;QAClB,YAAO,GAAG,EAAE,CAAC;QACb,gBAAW,GAAG,EAAE,CAAC;IAgI/C,CAAC;IAnDS,uBAAuB;QAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,OAAO,mBAAmB,CAAC,SAAS,CAAC,gBAAgB,CAAC;QACxD,CAAC;QACD,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;YACrB,OAAO,mBAAmB,CAAC,SAAS,CAAC,gBAAgB,CAAC;QACxD,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,KAAM,CAAC,CAAC,CAAC;QACpE,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAChB,OAAO,mBAAmB,CAAC,SAAS,CAAC,gBAAgB,CAAC;QACxD,CAAC;QACD,OAAO,WAAW,CAAC,mBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyE3B,AAzEqB,CAyEpB;AA/E0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAgB;AACf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAkB;AALlC,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAqI9B"}
|
|
@@ -30,6 +30,8 @@ export declare class ConsentButton extends LitElement {
|
|
|
30
30
|
static formAssociated: boolean;
|
|
31
31
|
private internals;
|
|
32
32
|
constructor();
|
|
33
|
+
/** Draws as it would live; a click submits or resets no form. */
|
|
34
|
+
preview: boolean;
|
|
33
35
|
/**
|
|
34
36
|
* Button variant - 'primary' (filled) or 'secondary' (outlined)
|
|
35
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-button.d.ts","sourceRoot":"","sources":["../../src/components/consent-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,qBACa,aAAc,SAAQ,UAAU;IAE3C,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAO,CAAC,SAAS,CAAmB;;IAOpC;;OAEG;IAEH,OAAO,EAAE,aAAa,CAAa;IAEnC;;OAEG;IAEH,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAY;IAE/C;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,SAAS,UAAS;IAElB;;OAEG;IAEH,OAAO,UAAS;IAEhB,OAAgB,MAAM,0BAwEpB;IAEF,OAAO,CAAC,WAAW;IAcV,MAAM;CAchB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
|
|
1
|
+
{"version":3,"file":"consent-button.d.ts","sourceRoot":"","sources":["../../src/components/consent-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,qBACa,aAAc,SAAQ,UAAU;IAE3C,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAO,CAAC,SAAS,CAAmB;;IAOpC,iEAAiE;IACrB,OAAO,UAAS;IAE5D;;OAEG;IAEH,OAAO,EAAE,aAAa,CAAa;IAEnC;;OAEG;IAEH,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAY;IAE/C;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,SAAS,UAAS;IAElB;;OAEG;IAEH,OAAO,UAAS;IAEhB,OAAgB,MAAM,0BAwEpB;IAEF,OAAO,CAAC,WAAW;IAcV,MAAM;CAchB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
|
|
@@ -32,6 +32,8 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
32
32
|
let ConsentButton = class ConsentButton extends LitElement {
|
|
33
33
|
constructor() {
|
|
34
34
|
super();
|
|
35
|
+
/** Draws as it would live; a click submits or resets no form. */
|
|
36
|
+
this.preview = false;
|
|
35
37
|
/**
|
|
36
38
|
* Button variant - 'primary' (filled) or 'secondary' (outlined)
|
|
37
39
|
*/
|
|
@@ -55,7 +57,7 @@ let ConsentButton = class ConsentButton extends LitElement {
|
|
|
55
57
|
this.internals = this.attachInternals();
|
|
56
58
|
}
|
|
57
59
|
handleClick() {
|
|
58
|
-
if (this.disabled || this.loading)
|
|
60
|
+
if (this.disabled || this.loading || this.preview)
|
|
59
61
|
return;
|
|
60
62
|
const form = this.internals.form;
|
|
61
63
|
if (!form)
|
|
@@ -158,6 +160,9 @@ ConsentButton.styles = css `
|
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
`;
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: Boolean, reflect: true })
|
|
165
|
+
], ConsentButton.prototype, "preview", void 0);
|
|
161
166
|
__decorate([
|
|
162
167
|
property({ type: String, reflect: true })
|
|
163
168
|
], ConsentButton.prototype, "variant", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-button.js","sourceRoot":"","sources":["../../src/components/consent-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO5D;;;;;;;;;;;;GAYG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAM3C;QACE,KAAK,EAAE,CAAC;QAIV;;WAEG;QAEH,YAAO,GAAkB,SAAS,CAAC;QAEnC;;WAEG;QAEH,SAAI,GAAkC,QAAQ,CAAC;QAE/C;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;WAEG;QAEH,cAAS,GAAG,KAAK,CAAC;QAElB;;WAEG;QAEH,YAAO,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"consent-button.js","sourceRoot":"","sources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B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,+BAA+B,CAAC,CAAC,CAAC,IAAI;;;KAG9D,CAAC;IACJ,CAAC;;AAhJD,0BAA0B;AACnB,4BAAc,GAAG,IAAI,AAAP,CAAQ;AA0Cb,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwE3B,AAxEqB,CAwEpB;AAxG0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAiB;AAM5D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CACP;AAMnC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACoB;AAM/C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAC1B;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;gDACnC;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC3B;AA1CL,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAkJzB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Consent Capabilities Screen
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* The consent decision page, as Checkpoint draws it: the connector above a
|
|
5
|
+
* card holding the eyebrow, the serif headline that names the agent (its name
|
|
6
|
+
* opens what is known about it), a warning when the agent registered itself,
|
|
7
|
+
* who is signing in (`approver`), the permission rows, the "Permission
|
|
8
|
+
* details" box (`grantDetails`, else the revocation notice) and Allow and
|
|
9
|
+
* Deny; under the card, "Secured by" and the Vouched lockup, and the host's
|
|
10
|
+
* legal links. Used when the resolved consent config includes `capabilities`.
|
|
9
11
|
*
|
|
10
12
|
* This component is purely presentational. It accepts the resolved data
|
|
11
13
|
* (capabilities, agent metadata, copy values) and emits `capabilities-allow` /
|
|
@@ -15,22 +17,33 @@
|
|
|
15
17
|
*
|
|
16
18
|
* Each row's parts are forwarded with a `capability-` prefix
|
|
17
19
|
* (`capability-row`, `capability-label` and so on, see
|
|
18
|
-
* CAPABILITY_ROW_EXPORT_PARTS)
|
|
19
|
-
* `
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
20
|
+
* CAPABILITY_ROW_EXPORT_PARTS). The other parts are `connector`, `card`,
|
|
21
|
+
* `eyebrow`, `headline`, `agent-name`, `host`, `subhead`, `agent-details`,
|
|
22
|
+
* `unverified`, `approver`, `permissions`, `grant-details`, `actions`,
|
|
23
|
+
* `submit`, `cancel` and `below`. A host puts content in a row by giving it
|
|
24
|
+
* `slot="capability-<capability id>"`, words the headline itself through the
|
|
25
|
+
* `headline` slot, replaces the lockup through `footer` and adds its legal
|
|
26
|
+
* links through `legal`.
|
|
27
|
+
*
|
|
28
|
+
* With `preview` the screen draws as it would live and acts on nothing: it
|
|
29
|
+
* sends no `capabilities-allow` or `capabilities-deny`, and no link inside it
|
|
30
|
+
* goes anywhere; rows still tick. With `editable` as well, the subhead, the
|
|
31
|
+
* organization's name (in "Connects to"), each row's label and description
|
|
32
|
+
* and both button labels are regions a person types into (see
|
|
33
|
+
* `CONSENT_EDIT_KEYS`), and the rows stop toggling.
|
|
22
34
|
*
|
|
23
35
|
* @module components/consent-capabilities-screen
|
|
24
36
|
*/
|
|
25
37
|
import { LitElement } from "lit";
|
|
26
38
|
import { type ConsentScopeCapability, type AgentMetadata, type ConsentTheme, type CedarTemplateContext } from "../types/capabilities.types.js";
|
|
39
|
+
import type { ConsentApprover, ConsentGrantDetails } from "../types/decision.types.js";
|
|
27
40
|
import { type AgentIdentity } from "../identity/agent-identity.js";
|
|
28
|
-
import "
|
|
29
|
-
import "./consent-headline.js";
|
|
41
|
+
import { type ConsentEditSource } from "../types/edit.types.js";
|
|
30
42
|
import "./consent-action-bar.js";
|
|
31
|
-
import "./consent-
|
|
43
|
+
import "./consent-secured-by.js";
|
|
32
44
|
import "./consent-revocation-notice.js";
|
|
33
45
|
import "./consent-connector-header.js";
|
|
46
|
+
import type { ConnectorVariant } from "./consent-connector-header.js";
|
|
34
47
|
import { type GrantTerms } from "../grant/terms.js";
|
|
35
48
|
/** Each row part the screen forwards, as `<row part>: capability-<row part>`. */
|
|
36
49
|
export declare const CAPABILITY_ROW_EXPORT_PARTS: string;
|
|
@@ -52,18 +65,17 @@ export interface CapabilitiesApproveDetail {
|
|
|
52
65
|
}
|
|
53
66
|
export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
54
67
|
static readonly features: Readonly<{
|
|
55
|
-
version:
|
|
68
|
+
version: 4;
|
|
56
69
|
scopesOnly: true;
|
|
57
|
-
slots: readonly ["identity", "details", "notice", "footer", "headline"];
|
|
70
|
+
slots: readonly ["identity", "details", "notice", "footer", "legal", "headline"];
|
|
58
71
|
capabilitySlotPrefix: "capability-";
|
|
59
72
|
}>;
|
|
60
73
|
capabilities: ConsentScopeCapability[];
|
|
61
74
|
agentMetadata: AgentMetadata | undefined;
|
|
62
75
|
/**
|
|
63
76
|
* The agent as an Entity Card plus the host verifier's result. Wins over
|
|
64
|
-
* `agentMetadata`. The
|
|
65
|
-
*
|
|
66
|
-
* the card's own domain. An identity that doesn't validate shows no tile.
|
|
77
|
+
* `agentMetadata`. The tile shows the card's name; an identity that
|
|
78
|
+
* doesn't validate shows no tile.
|
|
67
79
|
*/
|
|
68
80
|
agentIdentity: AgentIdentity | undefined;
|
|
69
81
|
cedarContext: CedarTemplateContext | undefined;
|
|
@@ -79,8 +91,22 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
79
91
|
loading: boolean;
|
|
80
92
|
/** Blocks approval while allowing the human to decline. */
|
|
81
93
|
disabled: boolean;
|
|
94
|
+
/** The subhead. Empty draws none. */
|
|
82
95
|
description: string;
|
|
83
96
|
submitLabel: string;
|
|
97
|
+
/**
|
|
98
|
+
* Who is signing in, and the checks they passed. With neither an identifier
|
|
99
|
+
* nor a check, as for a confirmation without sign-in, no box is drawn.
|
|
100
|
+
*/
|
|
101
|
+
approver: ConsentApprover | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* The "Permission details" box: what the grant connects to, how long it
|
|
104
|
+
* lasts and its limits, each worded by the host. Without it the screen
|
|
105
|
+
* shows its revocation notice instead.
|
|
106
|
+
*/
|
|
107
|
+
grantDetails: ConsentGrantDetails | undefined;
|
|
108
|
+
/** Draw each row's icon tile. */
|
|
109
|
+
showIcons: boolean;
|
|
84
110
|
cancelLabel: string;
|
|
85
111
|
/**
|
|
86
112
|
* Seed every capability as selected. The credential path grants a fixed,
|
|
@@ -112,9 +138,35 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
112
138
|
* reach this screen the same way it reaches the other consent screens.
|
|
113
139
|
*/
|
|
114
140
|
serverLogoUrl: string;
|
|
141
|
+
/**
|
|
142
|
+
* The connector's bridge: `bridge` (default), dashed lines and a shield in
|
|
143
|
+
* the page's tint, or `dots`. Forwarded to the connector header.
|
|
144
|
+
*/
|
|
145
|
+
connectorVariant: ConnectorVariant;
|
|
146
|
+
/**
|
|
147
|
+
* Who carries the connection, such as the host's product name: read out as
|
|
148
|
+
* "{agent} is connecting to {org} via {via}" and shown on the connector's
|
|
149
|
+
* shield. Empty: the connector names only the agent and the org.
|
|
150
|
+
*/
|
|
151
|
+
via: string;
|
|
115
152
|
/** Fixed grants require every disclosed capability to remain selected. */
|
|
116
153
|
requireAll: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Draws as it would live and acts on nothing: no decision event, no link
|
|
156
|
+
* followed. Every part inside gets it.
|
|
157
|
+
*/
|
|
158
|
+
preview: boolean;
|
|
159
|
+
/** With `preview`: the screen's words can be edited in place. */
|
|
160
|
+
editable: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* The raw text each region edits, by key, such as a template with its
|
|
163
|
+
* placeholders. Replace the object to change it; a change made inside the
|
|
164
|
+
* same object is not seen.
|
|
165
|
+
*/
|
|
166
|
+
editSource: ConsentEditSource | undefined;
|
|
117
167
|
private selected;
|
|
168
|
+
/** Whether the host filled the `legal` slot. */
|
|
169
|
+
private hasLegal;
|
|
118
170
|
/**
|
|
119
171
|
* Last capability set this component seeded `selected` from, per
|
|
120
172
|
* `capabilitySeedKey`. Re-seeding is keyed on this value rather than on
|
|
@@ -134,6 +186,10 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
134
186
|
*/
|
|
135
187
|
private seedDefaults;
|
|
136
188
|
static styles: import("lit").CSSResult;
|
|
189
|
+
/**
|
|
190
|
+
* The theme, as values the page can override: a `--cs-*` property set on
|
|
191
|
+
* this element or on any ancestor wins over the theme's own.
|
|
192
|
+
*/
|
|
137
193
|
private hostStyle;
|
|
138
194
|
private onCapabilityToggle;
|
|
139
195
|
/** Grant terms in the `details` slot. None when rendered without a DOM. */
|
|
@@ -145,6 +201,18 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
145
201
|
/** The agent tile: from `agentIdentity` when it is set, else `agentMetadata`. */
|
|
146
202
|
private resolveAgent;
|
|
147
203
|
render(): import("lit").TemplateResult<1>;
|
|
204
|
+
/** The warning for an agent that registered itself: its name is not checked. */
|
|
205
|
+
private renderUnverified;
|
|
206
|
+
/** Who is signing in, and the checks they passed; nothing when there is neither. */
|
|
207
|
+
private renderApprover;
|
|
208
|
+
/** The "Permission details" box, when the host gives `grantDetails`. */
|
|
209
|
+
private renderGrantDetails;
|
|
210
|
+
/**
|
|
211
|
+
* The host's legal links, or a "How does this work?" link when the host
|
|
212
|
+
* gives its address; nothing when there is neither.
|
|
213
|
+
*/
|
|
214
|
+
private renderLegal;
|
|
215
|
+
private readLegalSlot;
|
|
148
216
|
}
|
|
149
217
|
declare global {
|
|
150
218
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-capabilities-screen.d.ts","sourceRoot":"","sources":["../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-capabilities-screen.d.ts","sourceRoot":"","sources":["../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAWhC,OAAO,yBAAyB,CAAC;AACjC,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAgC,CAAC;AACxC,OAAO,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAErE,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,QAE5B,CAAC;AAEb,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE/D;AAoBD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;OA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