@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
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Consent Connector Header
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The top of the consent screen: the client's mark on the left, a bridge with
|
|
5
|
+
* a shield in the middle, and the server's logo on the right. It shows "{client}
|
|
6
|
+
* is connecting to {server}" before the user reads any copy.
|
|
7
|
+
*
|
|
8
|
+
* Two bridges (`variant`):
|
|
9
|
+
* - `dots` (the default): dotted lines and a green shield.
|
|
10
|
+
* - `bridge`: dashed lines and a shield in the page's tint (`--cs-tint`,
|
|
11
|
+
* edged in `--cs-tint-line`), drawn in `--cs-mark`, so it follows a brand.
|
|
12
|
+
*
|
|
13
|
+
* Every logo is contained, never cropped: the client's mark in a square tile,
|
|
14
|
+
* the server's logo at the same height in a tile that widens for a wordmark,
|
|
15
|
+
* up to a cap, and shrinks it to fit past that. A missing or broken logo is
|
|
16
|
+
* the name's first letter; a new logo URL is tried again.
|
|
17
|
+
*
|
|
18
|
+
* Who carries the connection is the host's to say (`via`): with none, the
|
|
19
|
+
* header names only the client and the server.
|
|
8
20
|
*
|
|
9
21
|
* Logo resolution priority:
|
|
10
22
|
* 1. explicit `clientLogoUrl` / `serverLogoUrl` attributes (operator override)
|
|
@@ -13,8 +25,12 @@
|
|
|
13
25
|
* 3. logo.dev fallback when `logoDevToken` is set + a domain is derivable
|
|
14
26
|
* 4. monogram tile (first letter of name) as the last-resort placeholder
|
|
15
27
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
28
|
+
* Decorative: one visually hidden line says who is connecting to whom.
|
|
29
|
+
*
|
|
30
|
+
* @cssprop --cs-tile-radius - The tiles' corners (default: 14px).
|
|
31
|
+
* @cssprop --cs-tint - The `bridge` shield's fill.
|
|
32
|
+
* @cssprop --cs-tint-line - The `bridge` shield's edge.
|
|
33
|
+
* @cssprop --cs-mark - The `bridge` shield's mark.
|
|
18
34
|
*
|
|
19
35
|
* @module components/consent-connector-header
|
|
20
36
|
*/
|
|
@@ -24,8 +40,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
24
40
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
25
41
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
42
|
};
|
|
27
|
-
import { LitElement, html, css } from "lit";
|
|
43
|
+
import { LitElement, html, css, nothing } from "lit";
|
|
28
44
|
import { customElement, property, state } from "lit/decorators.js";
|
|
45
|
+
/** The bridges the header draws between the two tiles. */
|
|
46
|
+
export const CONNECTOR_VARIANTS = ["dots", "bridge"];
|
|
47
|
+
const SHIELD_CHECK = html `<svg
|
|
48
|
+
viewBox="0 0 24 24"
|
|
49
|
+
fill="none"
|
|
50
|
+
stroke="currentColor"
|
|
51
|
+
stroke-width="2"
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
stroke-linejoin="round"
|
|
54
|
+
>
|
|
55
|
+
<path
|
|
56
|
+
d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
|
|
57
|
+
/>
|
|
58
|
+
<path d="m9 12 2 2 4-4" />
|
|
59
|
+
</svg>`;
|
|
60
|
+
const DOTS_SHIELD = html `<svg
|
|
61
|
+
viewBox="0 0 24 24"
|
|
62
|
+
fill="none"
|
|
63
|
+
stroke="currentColor"
|
|
64
|
+
stroke-width="2.2"
|
|
65
|
+
stroke-linecap="round"
|
|
66
|
+
stroke-linejoin="round"
|
|
67
|
+
>
|
|
68
|
+
<path d="M12 3l8 3v5c0 4.5-3.5 8.5-8 10-4.5-1.5-8-5.5-8-10V6l8-3z" />
|
|
69
|
+
<path d="m9 12 2 2 4-4" />
|
|
70
|
+
</svg>`;
|
|
29
71
|
let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
30
72
|
constructor() {
|
|
31
73
|
super(...arguments);
|
|
@@ -47,9 +89,28 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
47
89
|
* logo.dev returns 404.
|
|
48
90
|
*/
|
|
49
91
|
this.logoDevToken = "";
|
|
92
|
+
/** The bridge between the tiles: `bridge` (default) or `dots`. */
|
|
93
|
+
this.variant = "bridge";
|
|
94
|
+
/**
|
|
95
|
+
* Who carries the connection, such as the host's product name. Read out as
|
|
96
|
+
* "{client} is connecting to {server} via {via}" and shown as the shield's
|
|
97
|
+
* tooltip. Empty: the header names only the client and the server.
|
|
98
|
+
*/
|
|
99
|
+
this.via = "";
|
|
50
100
|
this.clientImageOk = true;
|
|
51
101
|
this.serverImageOk = true;
|
|
52
102
|
}
|
|
103
|
+
/** A logo that failed is tried again when its URL changes. */
|
|
104
|
+
willUpdate(changed) {
|
|
105
|
+
if (changed.has("clientLogoUrl") || changed.has("clientDid")) {
|
|
106
|
+
this.clientImageOk = true;
|
|
107
|
+
}
|
|
108
|
+
if (changed.has("serverLogoUrl") ||
|
|
109
|
+
changed.has("serverDomain") ||
|
|
110
|
+
changed.has("logoDevToken")) {
|
|
111
|
+
this.serverImageOk = true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
53
114
|
/**
|
|
54
115
|
* Derive a logo URL for an agent DID via KTA hosting convention.
|
|
55
116
|
* `did:web:knowthat.ai:agents:claude` → `https://knowthat.ai/img/agents/claude.png`
|
|
@@ -85,11 +146,35 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
85
146
|
return this.logoDevLogo(this.serverDomain);
|
|
86
147
|
}
|
|
87
148
|
monogram(name) {
|
|
88
|
-
return (name
|
|
149
|
+
return (name.trim().charAt(0) || "?").toUpperCase();
|
|
150
|
+
}
|
|
151
|
+
/** What a screen reader hears in place of the picture. */
|
|
152
|
+
description() {
|
|
153
|
+
const client = this.clientName.trim() || "An agent";
|
|
154
|
+
const server = this.serverName.trim() || "this site";
|
|
155
|
+
const via = this.via.trim();
|
|
156
|
+
return `${client} is connecting to ${server}${via ? ` via ${via}` : ""}`;
|
|
157
|
+
}
|
|
158
|
+
renderBridge() {
|
|
159
|
+
const title = this.via.trim() ? `Protected by ${this.via.trim()}` : nothing;
|
|
160
|
+
if (this.variant === "bridge") {
|
|
161
|
+
return html `<div class="bridge" aria-hidden="true">
|
|
162
|
+
<span class="dash"></span>
|
|
163
|
+
<span class="shield" title=${title}>${SHIELD_CHECK}</span>
|
|
164
|
+
<span class="dash"></span>
|
|
165
|
+
</div>`;
|
|
166
|
+
}
|
|
167
|
+
return html `<div class="bridge" aria-hidden="true">
|
|
168
|
+
<span class="dots"><span></span><span></span><span></span></span>
|
|
169
|
+
<span class="shield" title=${title}>${DOTS_SHIELD}</span>
|
|
170
|
+
<span class="dots"><span></span><span></span><span></span></span>
|
|
171
|
+
</div>`;
|
|
89
172
|
}
|
|
90
173
|
render() {
|
|
91
174
|
const clientLogo = this.resolveClientLogo();
|
|
92
|
-
const serverLogo = this.
|
|
175
|
+
const serverLogo = this.serverImageOk
|
|
176
|
+
? this.resolveServerLogo()
|
|
177
|
+
: undefined;
|
|
93
178
|
return html `
|
|
94
179
|
<div class="tile client" aria-hidden="true">
|
|
95
180
|
${clientLogo && this.clientImageOk
|
|
@@ -98,28 +183,26 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
98
183
|
alt=""
|
|
99
184
|
@error=${() => (this.clientImageOk = false)}
|
|
100
185
|
/>`
|
|
101
|
-
: html `<span class="monogram"
|
|
186
|
+
: html `<span class="monogram"
|
|
187
|
+
>${this.monogram(this.clientName)}</span
|
|
188
|
+
>`}
|
|
102
189
|
</div>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</svg>
|
|
110
|
-
</span>
|
|
111
|
-
<span class="dots"><span></span><span></span><span></span></span>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="tile server" aria-hidden="true">
|
|
114
|
-
${serverLogo && this.serverImageOk
|
|
190
|
+
${this.renderBridge()}
|
|
191
|
+
<div
|
|
192
|
+
class="tile server ${serverLogo ? "has-logo" : ""}"
|
|
193
|
+
aria-hidden="true"
|
|
194
|
+
>
|
|
195
|
+
${serverLogo
|
|
115
196
|
? html `<img
|
|
116
197
|
src="${serverLogo}"
|
|
117
198
|
alt=""
|
|
118
199
|
@error=${() => (this.serverImageOk = false)}
|
|
119
200
|
/>`
|
|
120
|
-
: html `<span class="monogram"
|
|
201
|
+
: html `<span class="monogram"
|
|
202
|
+
>${this.monogram(this.serverName)}</span
|
|
203
|
+
>`}
|
|
121
204
|
</div>
|
|
122
|
-
<span
|
|
205
|
+
<span class="visually-hidden">${this.description()}</span>
|
|
123
206
|
`;
|
|
124
207
|
}
|
|
125
208
|
};
|
|
@@ -132,10 +215,16 @@ ConsentConnectorHeader.styles = css `
|
|
|
132
215
|
padding: 22px 0 4px;
|
|
133
216
|
}
|
|
134
217
|
|
|
218
|
+
:host([variant="bridge"]) {
|
|
219
|
+
gap: 8px;
|
|
220
|
+
padding: 20px 0 14px;
|
|
221
|
+
}
|
|
222
|
+
|
|
135
223
|
.tile {
|
|
136
|
-
|
|
224
|
+
box-sizing: border-box;
|
|
137
225
|
height: 56px;
|
|
138
|
-
|
|
226
|
+
min-width: 56px;
|
|
227
|
+
border-radius: var(--cs-tile-radius, 14px);
|
|
139
228
|
overflow: hidden;
|
|
140
229
|
display: flex;
|
|
141
230
|
align-items: center;
|
|
@@ -145,30 +234,46 @@ ConsentConnectorHeader.styles = css `
|
|
|
145
234
|
border: 1px solid var(--cs-surface-border, rgba(15, 23, 42, 0.08));
|
|
146
235
|
}
|
|
147
236
|
|
|
148
|
-
/*
|
|
149
|
-
it 56px outside; the shared .tile (server) box is left unchanged. */
|
|
237
|
+
/* The agent's tile is white with a light border in every theme. */
|
|
150
238
|
.tile.client {
|
|
151
|
-
|
|
152
|
-
background: var(--cs-agent-tile-bg, #
|
|
239
|
+
width: 56px;
|
|
240
|
+
background: var(--cs-agent-tile-bg, #ffffff);
|
|
153
241
|
border: 1px solid var(--cs-agent-tile-border, rgba(15, 23, 42, 0.08));
|
|
154
242
|
}
|
|
155
243
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
height: 100%;
|
|
159
|
-
object-fit: cover;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* Agent marks are contained, not cropped: 36px leaves a 10px inset inside
|
|
163
|
-
the centred 56px tile, so non-square logos keep their full shape. */
|
|
244
|
+
/* Marks are contained, not cropped: 36px leaves a 10px inset inside the
|
|
245
|
+
56px tile, so a non-square logo keeps its whole shape. */
|
|
164
246
|
.tile.client img {
|
|
165
247
|
width: 36px;
|
|
166
248
|
height: 36px;
|
|
167
249
|
object-fit: contain;
|
|
168
250
|
}
|
|
169
251
|
|
|
252
|
+
/* The server's logo at the mark's height: a square logo in a square tile,
|
|
253
|
+
a wordmark widening the tile up to 126px and contained past that (a
|
|
254
|
+
3.75:1 wordmark draws 108 by 29). Where the row is short of room the
|
|
255
|
+
tile gives some back, down to square, and the wordmark is contained in
|
|
256
|
+
what is left. */
|
|
257
|
+
.tile.server {
|
|
258
|
+
flex-shrink: 1;
|
|
259
|
+
max-width: 126px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.tile.server.has-logo {
|
|
263
|
+
padding: 0 8px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.tile.server img {
|
|
267
|
+
display: block;
|
|
268
|
+
height: 36px;
|
|
269
|
+
width: auto;
|
|
270
|
+
min-width: 36px;
|
|
271
|
+
max-width: 100%;
|
|
272
|
+
object-fit: contain;
|
|
273
|
+
}
|
|
274
|
+
|
|
170
275
|
.tile .monogram {
|
|
171
|
-
width:
|
|
276
|
+
width: 54px;
|
|
172
277
|
height: 100%;
|
|
173
278
|
display: flex;
|
|
174
279
|
align-items: center;
|
|
@@ -178,11 +283,11 @@ ConsentConnectorHeader.styles = css `
|
|
|
178
283
|
}
|
|
179
284
|
|
|
180
285
|
.tile.client .monogram {
|
|
181
|
-
color: var(--cs-agent-tile-text, #
|
|
286
|
+
color: var(--cs-agent-tile-text, #0f172a);
|
|
182
287
|
}
|
|
183
288
|
|
|
184
289
|
.tile.server .monogram {
|
|
185
|
-
color: var(--cs-text-primary, #
|
|
290
|
+
color: var(--cs-text-primary, #0f172a);
|
|
186
291
|
}
|
|
187
292
|
|
|
188
293
|
.bridge {
|
|
@@ -200,7 +305,7 @@ ConsentConnectorHeader.styles = css `
|
|
|
200
305
|
width: 4px;
|
|
201
306
|
height: 4px;
|
|
202
307
|
border-radius: 50%;
|
|
203
|
-
background: var(--cs-text-tertiary, #
|
|
308
|
+
background: var(--cs-text-tertiary, #94a3b8);
|
|
204
309
|
opacity: 0.55;
|
|
205
310
|
}
|
|
206
311
|
|
|
@@ -212,7 +317,7 @@ ConsentConnectorHeader.styles = css `
|
|
|
212
317
|
display: inline-flex;
|
|
213
318
|
align-items: center;
|
|
214
319
|
justify-content: center;
|
|
215
|
-
color: #
|
|
320
|
+
color: #15803d;
|
|
216
321
|
flex-shrink: 0;
|
|
217
322
|
}
|
|
218
323
|
|
|
@@ -220,6 +325,58 @@ ConsentConnectorHeader.styles = css `
|
|
|
220
325
|
width: 16px;
|
|
221
326
|
height: 16px;
|
|
222
327
|
}
|
|
328
|
+
|
|
329
|
+
/* 144px where there is room; it gives way first where there is not. */
|
|
330
|
+
:host([variant="bridge"]) .bridge {
|
|
331
|
+
flex: 0 4 144px;
|
|
332
|
+
height: 56px;
|
|
333
|
+
gap: 6px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.dash {
|
|
337
|
+
flex: 1;
|
|
338
|
+
min-width: 12px;
|
|
339
|
+
height: 0;
|
|
340
|
+
border-top: 1px dashed var(--cs-text-tertiary, #5d6c82);
|
|
341
|
+
opacity: 0.5;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
:host([variant="bridge"]) .shield {
|
|
345
|
+
box-sizing: border-box;
|
|
346
|
+
width: 32px;
|
|
347
|
+
height: 32px;
|
|
348
|
+
background: var(
|
|
349
|
+
--cs-tint,
|
|
350
|
+
color-mix(
|
|
351
|
+
in srgb,
|
|
352
|
+
var(--cs-text-primary, #0f172a) 7%,
|
|
353
|
+
var(--cs-surface-card, #fff)
|
|
354
|
+
)
|
|
355
|
+
);
|
|
356
|
+
border: 1px solid
|
|
357
|
+
var(
|
|
358
|
+
--cs-tint-line,
|
|
359
|
+
color-mix(
|
|
360
|
+
in srgb,
|
|
361
|
+
var(--cs-text-primary, #0f172a) 18%,
|
|
362
|
+
var(--cs-surface-card, #fff)
|
|
363
|
+
)
|
|
364
|
+
);
|
|
365
|
+
color: var(--cs-mark, var(--cs-text-primary, #0f172a));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.visually-hidden {
|
|
369
|
+
position: absolute;
|
|
370
|
+
width: 1px;
|
|
371
|
+
height: 1px;
|
|
372
|
+
padding: 0;
|
|
373
|
+
margin: -1px;
|
|
374
|
+
overflow: hidden;
|
|
375
|
+
clip: rect(0 0 0 0);
|
|
376
|
+
clip-path: inset(50%);
|
|
377
|
+
white-space: nowrap;
|
|
378
|
+
border: 0;
|
|
379
|
+
}
|
|
223
380
|
`;
|
|
224
381
|
__decorate([
|
|
225
382
|
property({ type: String })
|
|
@@ -242,6 +399,12 @@ __decorate([
|
|
|
242
399
|
__decorate([
|
|
243
400
|
property({ type: String, attribute: "logo-dev-token" })
|
|
244
401
|
], ConsentConnectorHeader.prototype, "logoDevToken", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
property({ type: String, reflect: true })
|
|
404
|
+
], ConsentConnectorHeader.prototype, "variant", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
property({ type: String })
|
|
407
|
+
], ConsentConnectorHeader.prototype, "via", void 0);
|
|
245
408
|
__decorate([
|
|
246
409
|
state()
|
|
247
410
|
], ConsentConnectorHeader.prototype, "clientImageOk", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-connector-header.js","sourceRoot":"","sources":["../../src/components/consent-connector-header.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-connector-header.js","sourceRoot":"","sources":["../../src/components/consent-connector-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;AAG9D,MAAM,YAAY,GAAG,IAAI,CAAA;;;;;;;;;;;;OAYlB,CAAC;AAER,MAAM,WA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|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Consent Footer
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* `✓ by Vouched KYA` (left) + `How does this work?` (right). Shared between
|
|
5
|
+
* the consent screen and the (future-migrated) gateway consent. A host that
|
|
6
|
+
* runs the screen itself puts its own footer in the screen's `footer` slot.
|
|
6
7
|
*
|
|
7
8
|
* @module components/consent-footer
|
|
8
9
|
*/
|
|
9
10
|
import { LitElement } from "lit";
|
|
10
|
-
import type { ConsentTheme } from "../types/capabilities.types.js";
|
|
11
11
|
export declare class ConsentFooter extends LitElement {
|
|
12
|
-
theme: ConsentTheme;
|
|
13
12
|
howItWorksUrl: string;
|
|
13
|
+
/** Draws as it would live; its link goes nowhere. */
|
|
14
|
+
preview: boolean;
|
|
15
|
+
constructor();
|
|
14
16
|
static styles: import("lit").CSSResult;
|
|
15
17
|
render(): import("lit").TemplateResult<1>;
|
|
16
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-footer.d.ts","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-footer.d.ts","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C,qBACa,aAAc,SAAQ,UAAU;IACf,aAAa,SAAM;IAC/C,qDAAqD;IACT,OAAO,UAAS;;IAM5D,OAAgB,MAAM,0BAyCpB;IAEO,MAAM;CA+BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Consent Footer
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* `✓ by Vouched KYA` (left) + `How does this work?` (right). Shared between
|
|
5
|
+
* the consent screen and the (future-migrated) gateway consent. A host that
|
|
6
|
+
* runs the screen itself puts its own footer in the screen's `footer` slot.
|
|
6
7
|
*
|
|
7
8
|
* @module components/consent-footer
|
|
8
9
|
*/
|
|
@@ -15,17 +16,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
15
16
|
import { LitElement, html, css } from "lit";
|
|
16
17
|
import { customElement, property } from "lit/decorators.js";
|
|
17
18
|
import { CONSENT_COPY_TOKENS } from "../copy/tokens.js";
|
|
19
|
+
import { guardPreviewNavigation } from "./preview.js";
|
|
18
20
|
import { sanitizeLinkUrl } from "../resolution/resolve-branding.js";
|
|
19
21
|
let ConsentFooter = class ConsentFooter extends LitElement {
|
|
20
22
|
constructor() {
|
|
21
|
-
super(
|
|
22
|
-
this.theme = "light";
|
|
23
|
+
super();
|
|
23
24
|
this.howItWorksUrl = "";
|
|
25
|
+
/** Draws as it would live; its link goes nowhere. */
|
|
26
|
+
this.preview = false;
|
|
27
|
+
guardPreviewNavigation(this);
|
|
24
28
|
}
|
|
25
29
|
render() {
|
|
26
|
-
const attribution = this.theme === "dark"
|
|
27
|
-
? CONSENT_COPY_TOKENS.attribution.securedBy
|
|
28
|
-
: CONSENT_COPY_TOKENS.attribution.protectedBy;
|
|
29
30
|
return html `
|
|
30
31
|
<span class="left">
|
|
31
32
|
<svg
|
|
@@ -40,7 +41,7 @@ let ConsentFooter = class ConsentFooter extends LitElement {
|
|
|
40
41
|
>
|
|
41
42
|
<path d="m3.5 8.5 3 3 6-6.5" />
|
|
42
43
|
</svg>
|
|
43
|
-
${attribution}
|
|
44
|
+
${CONSENT_COPY_TOKENS.attribution.byLine}
|
|
44
45
|
</span>
|
|
45
46
|
${sanitizeLinkUrl(this.howItWorksUrl)
|
|
46
47
|
? html `<a
|
|
@@ -68,7 +69,7 @@ ConsentFooter.styles = css `
|
|
|
68
69
|
gap: 6px 16px;
|
|
69
70
|
padding-top: 12px;
|
|
70
71
|
font-size: 12px;
|
|
71
|
-
color: var(--cs-text-tertiary, #
|
|
72
|
+
color: var(--cs-text-tertiary, #5d6c82);
|
|
72
73
|
border-top: 1px solid var(--cs-surface-border, transparent);
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -99,12 +100,12 @@ ConsentFooter.styles = css `
|
|
|
99
100
|
color: var(--cs-text-primary, #0f172a);
|
|
100
101
|
}
|
|
101
102
|
`;
|
|
102
|
-
__decorate([
|
|
103
|
-
property({ type: String })
|
|
104
|
-
], ConsentFooter.prototype, "theme", void 0);
|
|
105
103
|
__decorate([
|
|
106
104
|
property({ type: String })
|
|
107
105
|
], ConsentFooter.prototype, "howItWorksUrl", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: Boolean, reflect: true })
|
|
108
|
+
], ConsentFooter.prototype, "preview", void 0);
|
|
108
109
|
ConsentFooter = __decorate([
|
|
109
110
|
customElement("consent-footer")
|
|
110
111
|
], ConsentFooter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-footer.js","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;
|
|
1
|
+
{"version":3,"file":"consent-footer.js","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAG7D,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAI3C;QACE,KAAK,EAAE,CAAC;QAJkB,kBAAa,GAAG,EAAE,CAAC;QAC/C,qDAAqD;QACT,YAAO,GAAG,KAAK,CAAC;QAG1D,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IA6CQ,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;;;;;;UAcL,mBAAmB,CAAC,WAAW,CAAC,MAAM;;QAExC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC;YACnC,CAAC,CAAC,IAAI,CAAA;;oBAEM,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC;;;;cAIzC,mBAAmB,CAAC,WAAW,CAAC,YAAY;eAC3C;YACP,CAAC,CAAC,IAAI,CAAA;eACC,mBAAmB,CAAC,WAAW,CAAC,YAAY;YAC/C;KACP,CAAC;IACJ,CAAC;;AAzEe,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyC3B,AAzCqB,CAyCpB;AAjD0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAoB;AAEH;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAiB;AAHjD,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAmFzB"}
|
|
@@ -2,43 +2,75 @@
|
|
|
2
2
|
* Consent Headline
|
|
3
3
|
*
|
|
4
4
|
* The top of a consent screen: an eyebrow, the headline that says who is
|
|
5
|
-
* asking
|
|
6
|
-
*
|
|
5
|
+
* asking, and a subhead. consent-capabilities-screen renders one, and a screen
|
|
6
|
+
* composed from parts places its own.
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The headline reads "{Agent} is requesting permission on your behalf", or
|
|
9
|
+
* "{Agent} would like to {Verb} on your behalf" when the host gives a verb.
|
|
10
|
+
* Given the agent (`agent`), its name is a button that opens what is known
|
|
11
|
+
* about it, and a domain-bound agent's name is followed by a chip naming the
|
|
12
|
+
* host that vouches for it. The subhead shows only when the host gives one.
|
|
11
13
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
+
* The agent's name comes from outside, and an agent chooses its own name. It
|
|
15
|
+
* is rendered as text, never as markup, so a name like
|
|
16
|
+
* `Atlas <span class="pill">Verified</span>` reads exactly that way.
|
|
17
|
+
*
|
|
18
|
+
* Parts: `eyebrow`, `headline` (the h1), `agent-name` (the name, an `em`, or a
|
|
19
|
+
* button when the agent is given), `host` (the domain chip), `subhead` and
|
|
20
|
+
* `agent-details` (the popover).
|
|
14
21
|
*
|
|
15
22
|
* Slot: `headline`, the h1's words in place of the standard line, for a host
|
|
16
|
-
* that words it its own way
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* that words it its own way. The host's content is its own markup, so the host
|
|
24
|
+
* keeps an agent-chosen name as text. consent-capabilities-screen forwards its
|
|
25
|
+
* own `headline` slot here.
|
|
26
|
+
*
|
|
27
|
+
* In edit mode (`preview` and `editable`) the subhead is a region a person
|
|
28
|
+
* types into, keyed `description`; with no subhead of its own it starts from
|
|
29
|
+
* the standard line, and only typing writes it.
|
|
20
30
|
*
|
|
21
31
|
* @module components/consent-headline
|
|
22
32
|
*/
|
|
23
33
|
import { LitElement } from "lit";
|
|
34
|
+
import { type AgentMetadata } from "../types/capabilities.types.js";
|
|
35
|
+
import { type ConsentEditSource } from "../types/edit.types.js";
|
|
36
|
+
/** The first letter or digit of a name, for a tile with no logo. */
|
|
37
|
+
export declare function initialOf(name: string): string;
|
|
38
|
+
/** The host that vouches for a domain-bound agent; none for any other. */
|
|
39
|
+
export declare function vouchingHost(agent: Pick<AgentMetadata, "verification" | "verified" | "domain">): string | undefined;
|
|
24
40
|
export declare class ConsentHeadline extends LitElement {
|
|
25
41
|
/** The agent asking. "An assistant" in the headline when it is empty. */
|
|
26
42
|
agentName: string;
|
|
27
|
-
/**
|
|
28
|
-
|
|
43
|
+
/**
|
|
44
|
+
* The agent, for its name, the host chip and what its name opens. Its name
|
|
45
|
+
* wins over `agent-name`. Without it the name is plain text.
|
|
46
|
+
*/
|
|
47
|
+
agent: AgentMetadata | undefined;
|
|
29
48
|
/**
|
|
30
49
|
* What the agent wants to do, as a phrase that follows "would like to",
|
|
31
|
-
* such as "read your orders". Empty or "use" gives the
|
|
50
|
+
* such as "read your orders". Empty or "use" gives the standard headline.
|
|
32
51
|
*/
|
|
33
52
|
verb: string;
|
|
34
|
-
/** The subhead. Empty
|
|
53
|
+
/** The subhead. Empty draws none. */
|
|
35
54
|
description: string;
|
|
36
55
|
/** The line above the headline. Empty gives "PERMISSION REQUEST". */
|
|
37
56
|
eyebrow: string;
|
|
57
|
+
/** Draws as it would live; nothing here acts, so it only enables `editable`. */
|
|
58
|
+
preview: boolean;
|
|
59
|
+
/** With `preview`: the subhead can be edited in place. */
|
|
60
|
+
editable: boolean;
|
|
61
|
+
/** The raw text each region edits, by key. See `ConsentEditSource`. */
|
|
62
|
+
editSource: ConsentEditSource | undefined;
|
|
38
63
|
/** Whether the host filled the `headline` slot, so the standard line steps aside. */
|
|
39
64
|
private hostHeadline;
|
|
40
65
|
static styles: import("lit").CSSResult;
|
|
41
66
|
render(): import("lit").TemplateResult<1>;
|
|
67
|
+
/** The name the headline gives the agent. */
|
|
68
|
+
private get displayName();
|
|
69
|
+
/**
|
|
70
|
+
* The subhead: the host's, as a region in edit mode. With none, nothing,
|
|
71
|
+
* except in edit mode, where the region starts from the standard line.
|
|
72
|
+
*/
|
|
73
|
+
private subheadText;
|
|
42
74
|
/**
|
|
43
75
|
* Before the first render, reads what the slot will hold from the light DOM,
|
|
44
76
|
* so the first render is already the right one. A change made here does not
|
|
@@ -56,8 +88,15 @@ export declare class ConsentHeadline extends LitElement {
|
|
|
56
88
|
* screen's slot later is seen only through the flattened list.
|
|
57
89
|
*/
|
|
58
90
|
private readHeadlineSlot;
|
|
59
|
-
/** The headline, with
|
|
91
|
+
/** The headline, with the agent's name as a button when the agent is given. */
|
|
60
92
|
private headlinePieces;
|
|
93
|
+
private renderName;
|
|
94
|
+
/** What the agent's name opens: who it is and how its name was checked. */
|
|
95
|
+
private renderDetails;
|
|
96
|
+
/** Places the popover under the name, inside the window, while it is open. */
|
|
97
|
+
private onDetailsToggle;
|
|
98
|
+
private placeDetails;
|
|
99
|
+
disconnectedCallback(): void;
|
|
61
100
|
}
|
|
62
101
|
declare global {
|
|
63
102
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-headline.d.ts","sourceRoot":"","sources":["../../src/components/consent-headline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-headline.d.ts","sourceRoot":"","sources":["../../src/components/consent-headline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAA2B,MAAM,KAAK,CAAC;AAI1D,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAYhC,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAC1B,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC,GACjE,MAAM,GAAG,SAAS,CAIpB;AAKD,qBACa,eAAgB,SAAQ,UAAU;IAC7C,yEAAyE;IACpB,SAAS,SAAM;IAEpE;;;OAGG;IAC6B,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IAEjE;;;OAGG;IACyB,IAAI,SAAM;IAEtC,qCAAqC;IACT,WAAW,SAAM;IAE7C,qEAAqE;IACzC,OAAO,SAAM;IAEzC,gFAAgF;IACpC,OAAO,UAAS;IAE5D,0DAA0D;IAC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