@kya-os/consent 0.4.0 → 0.4.2
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 +186 -22
- package/dist/bundle/index.d.ts +9 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +13 -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 +36 -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 +456 -117
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +159 -32
- 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 +262 -45
- 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-flow-timeline.js +177 -0
- package/dist/cjs/components/consent-flow-timeline.js.map +1 -0
- package/dist/cjs/components/consent-flow.js +540 -0
- package/dist/cjs/components/consent-flow.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +22 -14
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +353 -33
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-oauth-button.js +68 -138
- 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 +29 -18
- 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 +26 -2
- package/dist/cjs/components/consent-wallet-check.js.map +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 +37 -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/flow-blocks.js +762 -0
- package/dist/cjs/components/flow-blocks.js.map +1 -0
- package/dist/cjs/components/flow-motion.js +177 -0
- package/dist/cjs/components/flow-motion.js.map +1 -0
- package/dist/cjs/components/grant-details.js +143 -0
- package/dist/cjs/components/grant-details.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +2 -2
- package/dist/cjs/components/index.js +13 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +93 -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/components/provider-icons.js +92 -0
- package/dist/cjs/components/provider-icons.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +17 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +67 -24
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/flow/copy.js +146 -0
- package/dist/cjs/flow/copy.js.map +1 -0
- package/dist/cjs/flow/index.js +31 -0
- package/dist/cjs/flow/index.js.map +1 -0
- package/dist/cjs/flow/model.js +107 -0
- package/dist/cjs/flow/model.js.map +1 -0
- package/dist/cjs/flow/presets.js +157 -0
- package/dist/cjs/flow/presets.js.map +1 -0
- package/dist/cjs/flow/schema.js +76 -0
- package/dist/cjs/flow/schema.js.map +1 -0
- 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 +40 -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 +102 -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 +101 -17
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +457 -118
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +32 -3
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +159 -32
- 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 +52 -7
- package/dist/components/consent-connector-header.d.ts.map +1 -1
- package/dist/components/consent-connector-header.js +262 -45
- package/dist/components/consent-connector-header.js.map +1 -1
- package/dist/components/consent-duration.js +1 -1
- package/dist/components/consent-flow-timeline.d.ts +49 -0
- package/dist/components/consent-flow-timeline.d.ts.map +1 -0
- package/dist/components/consent-flow-timeline.js +174 -0
- package/dist/components/consent-flow-timeline.js.map +1 -0
- package/dist/components/consent-flow.d.ts +101 -0
- package/dist/components/consent-flow.d.ts.map +1 -0
- package/dist/components/consent-flow.js +504 -0
- package/dist/components/consent-flow.js.map +1 -0
- 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 +22 -14
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-headline.d.ts +62 -16
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +352 -34
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-oauth-button.d.ts +9 -6
- package/dist/components/consent-oauth-button.d.ts.map +1 -1
- package/dist/components/consent-oauth-button.js +71 -141
- 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 +29 -18
- 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.d.ts +8 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -1
- package/dist/components/consent-wallet-check.js +27 -3
- package/dist/components/consent-wallet-check.js.map +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 +26 -0
- package/dist/components/decision-icons.d.ts.map +1 -0
- package/dist/components/decision-icons.js +34 -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/flow-blocks.d.ts +45 -0
- package/dist/components/flow-blocks.d.ts.map +1 -0
- package/dist/components/flow-blocks.js +755 -0
- package/dist/components/flow-blocks.js.map +1 -0
- package/dist/components/flow-motion.d.ts +41 -0
- package/dist/components/flow-motion.d.ts.map +1 -0
- package/dist/components/flow-motion.js +164 -0
- package/dist/components/flow-motion.js.map +1 -0
- package/dist/components/grant-details.d.ts +28 -0
- package/dist/components/grant-details.d.ts.map +1 -0
- package/dist/components/grant-details.js +138 -0
- package/dist/components/grant-details.js.map +1 -0
- package/dist/components/grant-field-styles.js +2 -2
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +19 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +93 -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/components/provider-icons.d.ts +16 -0
- package/dist/components/provider-icons.d.ts.map +1 -0
- package/dist/components/provider-icons.js +88 -0
- package/dist/components/provider-icons.js.map +1 -0
- package/dist/consent.js +4875 -1178
- package/dist/consent.min.js +2367 -814
- package/dist/constants/capabilities.d.ts +16 -3
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +17 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +67 -24
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +67 -24
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/copy.d.ts +31 -0
- package/dist/flow/copy.d.ts.map +1 -0
- package/dist/flow/copy.js +137 -0
- package/dist/flow/copy.js.map +1 -0
- package/dist/flow/index.d.ts +15 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +15 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/flow/model.d.ts +209 -0
- package/dist/flow/model.d.ts.map +1 -0
- package/dist/flow/model.js +103 -0
- package/dist/flow/model.js.map +1 -0
- package/dist/flow/presets.d.ts +29 -0
- package/dist/flow/presets.d.ts.map +1 -0
- package/dist/flow/presets.js +153 -0
- package/dist/flow/presets.js.map +1 -0
- package/dist/flow/schema.d.ts +127 -0
- package/dist/flow/schema.d.ts.map +1 -0
- package/dist/flow/schema.js +72 -0
- package/dist/flow/schema.js.map +1 -0
- 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 +27 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +39 -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 +76 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +98 -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 +10 -5
|
@@ -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,GA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AC;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":["../../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,iEAAiE;QACrB,YAAO,GAAG,KAAK,CAAC;QAE5D;;WAEG;QAEH,YAAO,GAAkB,SAAS,CAAC;QAEnC;;WAEG;QAEH,SAAI,GAAkC,QAAQ,CAAC;QAE/C;;WA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AM,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,39 @@
|
|
|
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
|
-
* the `
|
|
20
|
+
* CAPABILITY_ROW_EXPORT_PARTS). The other parts are `connector`, `card`,
|
|
21
|
+
* `eyebrow`, `headline`, `agent-name`, `subhead`, `agent-details`,
|
|
22
|
+
* `unverified`, `approver`, `permissions`, `section-header` (the eyebrow over
|
|
23
|
+
* the rows, "What {Agent} can do for you"), `section-hint` ("Tap to toggle"),
|
|
24
|
+
* `grant-details`, `actions`,
|
|
25
|
+
* `submit`, `cancel` and `below`. A host puts content in a row by giving it
|
|
26
|
+
* `slot="capability-<capability id>"`, words the headline itself through the
|
|
27
|
+
* `headline` slot, replaces the lockup through `footer`, adds its legal
|
|
28
|
+
* links through `legal`, and puts a `consent-wallet-check`
|
|
29
|
+
* (`placement="connector"`) in the shield's place through `connector-mark`.
|
|
30
|
+
*
|
|
31
|
+
* Text wraps with `text-wrap: pretty`, inherited by every part, so no line
|
|
32
|
+
* ends on one word where the browser supports it.
|
|
33
|
+
*
|
|
34
|
+
* With `preview` the screen draws as it would live and acts on nothing: it
|
|
35
|
+
* sends no `capabilities-allow` or `capabilities-deny`, and no link inside it
|
|
36
|
+
* goes anywhere; rows still tick. With `editable` as well, the subhead, the
|
|
37
|
+
* organization's name (in "Connects to"), each row's label and description
|
|
38
|
+
* and both button labels are regions a person types into (see
|
|
39
|
+
* `CONSENT_EDIT_KEYS`), and the rows stop toggling.
|
|
22
40
|
*
|
|
23
41
|
* @module components/consent-capabilities-screen
|
|
24
42
|
*/
|
|
25
43
|
import { LitElement } from "lit";
|
|
26
44
|
import { type ConsentScopeCapability, type AgentMetadata, type ConsentTheme, type CedarTemplateContext } from "../types/capabilities.types.js";
|
|
45
|
+
import type { ConsentApprover, ConsentGrantDetails } from "../types/decision.types.js";
|
|
27
46
|
import { type AgentIdentity } from "../identity/agent-identity.js";
|
|
28
|
-
import "
|
|
29
|
-
import "./consent-headline.js";
|
|
47
|
+
import { type ConsentEditSource } from "../types/edit.types.js";
|
|
30
48
|
import "./consent-action-bar.js";
|
|
31
|
-
import "./consent-
|
|
49
|
+
import "./consent-secured-by.js";
|
|
32
50
|
import "./consent-revocation-notice.js";
|
|
33
51
|
import "./consent-connector-header.js";
|
|
52
|
+
import type { ConnectorVariant } from "./consent-connector-header.js";
|
|
34
53
|
import { type GrantTerms } from "../grant/terms.js";
|
|
35
54
|
/** Each row part the screen forwards, as `<row part>: capability-<row part>`. */
|
|
36
55
|
export declare const CAPABILITY_ROW_EXPORT_PARTS: string;
|
|
@@ -52,18 +71,17 @@ export interface CapabilitiesApproveDetail {
|
|
|
52
71
|
}
|
|
53
72
|
export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
54
73
|
static readonly features: Readonly<{
|
|
55
|
-
version:
|
|
74
|
+
version: 5;
|
|
56
75
|
scopesOnly: true;
|
|
57
|
-
slots: readonly ["identity", "details", "notice", "footer", "headline"];
|
|
76
|
+
slots: readonly ["identity", "details", "notice", "footer", "legal", "headline", "connector-mark"];
|
|
58
77
|
capabilitySlotPrefix: "capability-";
|
|
59
78
|
}>;
|
|
60
79
|
capabilities: ConsentScopeCapability[];
|
|
61
80
|
agentMetadata: AgentMetadata | undefined;
|
|
62
81
|
/**
|
|
63
82
|
* 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.
|
|
83
|
+
* `agentMetadata`. The tile shows the card's name; an identity that
|
|
84
|
+
* doesn't validate shows no tile.
|
|
67
85
|
*/
|
|
68
86
|
agentIdentity: AgentIdentity | undefined;
|
|
69
87
|
cedarContext: CedarTemplateContext | undefined;
|
|
@@ -79,8 +97,26 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
79
97
|
loading: boolean;
|
|
80
98
|
/** Blocks approval while allowing the human to decline. */
|
|
81
99
|
disabled: boolean;
|
|
100
|
+
/** The subhead. Empty draws none. */
|
|
82
101
|
description: string;
|
|
83
102
|
submitLabel: string;
|
|
103
|
+
/**
|
|
104
|
+
* Who is signing in, and the checks they passed. With neither an identifier
|
|
105
|
+
* nor a check, as for a confirmation without sign-in, no box is drawn.
|
|
106
|
+
*/
|
|
107
|
+
approver: ConsentApprover | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* The "Permission details" box: what the grant connects to, how long it
|
|
110
|
+
* lasts and its limits, each worded by the host. Without it the screen
|
|
111
|
+
* shows its revocation notice instead.
|
|
112
|
+
*/
|
|
113
|
+
grantDetails: ConsentGrantDetails | undefined;
|
|
114
|
+
/** Draw each row's icon tile. */
|
|
115
|
+
showIcons: boolean;
|
|
116
|
+
/** Leave out every row's HIGHER RISK chip (each row's riskLevel is unchanged). */
|
|
117
|
+
hideRisk: boolean;
|
|
118
|
+
/** Leave out every row's scope badges (what is granted is unchanged). */
|
|
119
|
+
hideScopes: boolean;
|
|
84
120
|
cancelLabel: string;
|
|
85
121
|
/**
|
|
86
122
|
* Seed every capability as selected. The credential path grants a fixed,
|
|
@@ -112,9 +148,35 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
112
148
|
* reach this screen the same way it reaches the other consent screens.
|
|
113
149
|
*/
|
|
114
150
|
serverLogoUrl: string;
|
|
151
|
+
/**
|
|
152
|
+
* The connector's bridge: `bridge` (default), dashed lines and a shield in
|
|
153
|
+
* the page's tint, or `dots`. Forwarded to the connector header.
|
|
154
|
+
*/
|
|
155
|
+
connectorVariant: ConnectorVariant;
|
|
156
|
+
/**
|
|
157
|
+
* Who carries the connection, such as the host's product name: read out as
|
|
158
|
+
* "{agent} is connecting to {org} via {via}" and shown on the connector's
|
|
159
|
+
* shield. Empty: the connector names only the agent and the org.
|
|
160
|
+
*/
|
|
161
|
+
via: string;
|
|
115
162
|
/** Fixed grants require every disclosed capability to remain selected. */
|
|
116
163
|
requireAll: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Draws as it would live and acts on nothing: no decision event, no link
|
|
166
|
+
* followed. Every part inside gets it.
|
|
167
|
+
*/
|
|
168
|
+
preview: boolean;
|
|
169
|
+
/** With `preview`: the screen's words can be edited in place. */
|
|
170
|
+
editable: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* The raw text each region edits, by key, such as a template with its
|
|
173
|
+
* placeholders. Replace the object to change it; a change made inside the
|
|
174
|
+
* same object is not seen.
|
|
175
|
+
*/
|
|
176
|
+
editSource: ConsentEditSource | undefined;
|
|
117
177
|
private selected;
|
|
178
|
+
/** Whether the host filled the `legal` slot. */
|
|
179
|
+
private hasLegal;
|
|
118
180
|
/**
|
|
119
181
|
* Last capability set this component seeded `selected` from, per
|
|
120
182
|
* `capabilitySeedKey`. Re-seeding is keyed on this value rather than on
|
|
@@ -134,6 +196,10 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
134
196
|
*/
|
|
135
197
|
private seedDefaults;
|
|
136
198
|
static styles: import("lit").CSSResult;
|
|
199
|
+
/**
|
|
200
|
+
* The theme, as values the page can override: a `--cs-*` property set on
|
|
201
|
+
* this element or on any ancestor wins over the theme's own.
|
|
202
|
+
*/
|
|
137
203
|
private hostStyle;
|
|
138
204
|
private onCapabilityToggle;
|
|
139
205
|
/** Grant terms in the `details` slot. None when rendered without a DOM. */
|
|
@@ -145,6 +211,24 @@ export declare class ConsentCapabilitiesScreen extends LitElement {
|
|
|
145
211
|
/** The agent tile: from `agentIdentity` when it is set, else `agentMetadata`. */
|
|
146
212
|
private resolveAgent;
|
|
147
213
|
render(): import("lit").TemplateResult<1>;
|
|
214
|
+
/**
|
|
215
|
+
* "What {Agent} can do for you" over the rows, with "Tap to toggle" while a
|
|
216
|
+
* person can tick them (not in edit mode, while loading or disabled). With no
|
|
217
|
+
* rows, nothing.
|
|
218
|
+
*/
|
|
219
|
+
private renderSectionHeader;
|
|
220
|
+
/** The warning for an agent that registered itself: its name is not checked. */
|
|
221
|
+
private renderUnverified;
|
|
222
|
+
/** Who is signing in, and the checks they passed; nothing when there is neither. */
|
|
223
|
+
private renderApprover;
|
|
224
|
+
/** The "Permission details" box, when the host gives `grantDetails`. */
|
|
225
|
+
private renderGrantDetails;
|
|
226
|
+
/**
|
|
227
|
+
* The host's legal links, or a "How does this work?" link when the host
|
|
228
|
+
* gives its address; nothing when there is neither.
|
|
229
|
+
*/
|
|
230
|
+
private renderLegal;
|
|
231
|
+
private readLegalSlot;
|
|
148
232
|
}
|
|
149
233
|
declare global {
|
|
150
234
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;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,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAgBhC,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;;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