@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
|
@@ -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,12 +25,26 @@
|
|
|
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
|
+
* Slot: `mark`, in place of the shield, such as a `consent-wallet-check` with
|
|
29
|
+
* `placement="connector"`. It is drawn at `--cs-connector-mark-size` (60px, a
|
|
30
|
+
* little over the tiles), its caption hangs under the row, and the header
|
|
31
|
+
* leaves room under it before the card.
|
|
32
|
+
*
|
|
33
|
+
* Decorative: one visually hidden line says who is connecting to whom. What
|
|
34
|
+
* fills `mark` keeps its own words for assistive tech.
|
|
35
|
+
*
|
|
36
|
+
* @cssprop --cs-connector-mark-size - The wallet orb's size in `mark` (default: 60px).
|
|
37
|
+
* @cssprop --cs-tile-radius - The tiles' corners (default: 14px).
|
|
38
|
+
* @cssprop --cs-tint - The `bridge` shield's fill.
|
|
39
|
+
* @cssprop --cs-tint-line - The `bridge` shield's edge.
|
|
40
|
+
* @cssprop --cs-mark - The `bridge` shield's mark.
|
|
18
41
|
*
|
|
19
42
|
* @module components/consent-connector-header
|
|
20
43
|
*/
|
|
21
|
-
import { LitElement } from "lit";
|
|
44
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
45
|
+
/** The bridges the header draws between the two tiles. */
|
|
46
|
+
export declare const CONNECTOR_VARIANTS: readonly ["dots", "bridge"];
|
|
47
|
+
export type ConnectorVariant = (typeof CONNECTOR_VARIANTS)[number];
|
|
22
48
|
export declare class ConsentConnectorHeader extends LitElement {
|
|
23
49
|
/** Display name of the agent / client (e.g. "Claude"). */
|
|
24
50
|
clientName: string;
|
|
@@ -38,9 +64,19 @@ export declare class ConsentConnectorHeader extends LitElement {
|
|
|
38
64
|
* logo.dev returns 404.
|
|
39
65
|
*/
|
|
40
66
|
logoDevToken: string;
|
|
67
|
+
/** The bridge between the tiles: `bridge` (default) or `dots`. */
|
|
68
|
+
variant: ConnectorVariant;
|
|
69
|
+
/**
|
|
70
|
+
* Who carries the connection, such as the host's product name. Read out as
|
|
71
|
+
* "{client} is connecting to {server} via {via}" and shown as the shield's
|
|
72
|
+
* tooltip. Empty: the header names only the client and the server.
|
|
73
|
+
*/
|
|
74
|
+
via: string;
|
|
41
75
|
private clientImageOk;
|
|
42
76
|
private serverImageOk;
|
|
43
77
|
static styles: import("lit").CSSResult;
|
|
78
|
+
/** A logo that failed is tried again when its URL changes. */
|
|
79
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
44
80
|
/**
|
|
45
81
|
* Derive a logo URL for an agent DID via KTA hosting convention.
|
|
46
82
|
* `did:web:knowthat.ai:agents:claude` → `https://knowthat.ai/img/agents/claude.png`
|
|
@@ -54,6 +90,15 @@ export declare class ConsentConnectorHeader extends LitElement {
|
|
|
54
90
|
private resolveClientLogo;
|
|
55
91
|
private resolveServerLogo;
|
|
56
92
|
private monogram;
|
|
93
|
+
/** What a screen reader hears in place of the picture. */
|
|
94
|
+
private description;
|
|
95
|
+
/** Whether the host filled `mark`, so the shield steps aside. */
|
|
96
|
+
private hasMark;
|
|
97
|
+
private readMark;
|
|
98
|
+
protected updated(): void;
|
|
99
|
+
/** The middle of the bridge: the host's mark, or the shield. */
|
|
100
|
+
private renderMark;
|
|
101
|
+
private renderBridge;
|
|
57
102
|
render(): import("lit").TemplateResult<1>;
|
|
58
103
|
}
|
|
59
104
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-connector-header.d.ts","sourceRoot":"","sources":["../../src/components/consent-connector-header.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-connector-header.d.ts","sourceRoot":"","sources":["../../src/components/consent-connector-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1E,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,6BAA8B,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AA4BnE,qBACa,sBAAuB,SAAQ,UAAU;IACpD,0DAA0D;IAC9B,UAAU,SAAM;IAE5C,yEAAyE;IAC7C,SAAS,SAAM;IAE3C,6CAA6C;IACa,aAAa,SAAM;IAE7E,gEAAgE;IACpC,UAAU,SAAM;IAE5C,2EAA2E;IACnB,YAAY,SAAM;IAE1E,mDAAmD;IACO,aAAa,SAAM;IAE7E;;;;OAIG;IACsD,YAAY,SAAM;IAE3E,kEAAkE;IACvB,OAAO,EAAE,gBAAgB,CACzD;IAEX;;;;OAIG;IACyB,GAAG,SAAM;IAE5B,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,aAAa,CAAQ;IAEtC,OAAgB,MAAM,0BAmMpB;IAEF,8DAA8D;cAC3C,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAalE;;;OAGG;IACH,OAAO,CAAC,cAAc;IAOtB;;;OAGG;IACH,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,QAAQ;IAIhB,0DAA0D;IAC1D,OAAO,CAAC,WAAW;IAOnB,iEAAiE;IACxD,OAAO,CAAC,OAAO,CAAS;IAEjC,OAAO,CAAC,QAAQ;cAKG,OAAO,IAAI,IAAI;IAIlC,gEAAgE;IAChE,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,YAAY;IAgBX,MAAM;CAoChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,0BAA0B,EAAE,sBAAsB,CAAC;KACpD;CACF"}
|
|
@@ -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,19 @@
|
|
|
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
|
+
* Slot: `mark`, in place of the shield, such as a `consent-wallet-check` with
|
|
29
|
+
* `placement="connector"`. It is drawn at `--cs-connector-mark-size` (60px, a
|
|
30
|
+
* little over the tiles), its caption hangs under the row, and the header
|
|
31
|
+
* leaves room under it before the card.
|
|
32
|
+
*
|
|
33
|
+
* Decorative: one visually hidden line says who is connecting to whom. What
|
|
34
|
+
* fills `mark` keeps its own words for assistive tech.
|
|
35
|
+
*
|
|
36
|
+
* @cssprop --cs-connector-mark-size - The wallet orb's size in `mark` (default: 60px).
|
|
37
|
+
* @cssprop --cs-tile-radius - The tiles' corners (default: 14px).
|
|
38
|
+
* @cssprop --cs-tint - The `bridge` shield's fill.
|
|
39
|
+
* @cssprop --cs-tint-line - The `bridge` shield's edge.
|
|
40
|
+
* @cssprop --cs-mark - The `bridge` shield's mark.
|
|
18
41
|
*
|
|
19
42
|
* @module components/consent-connector-header
|
|
20
43
|
*/
|
|
@@ -24,8 +47,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
24
47
|
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
48
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
49
|
};
|
|
27
|
-
import { LitElement, html, css } from "lit";
|
|
50
|
+
import { LitElement, html, css, nothing } from "lit";
|
|
28
51
|
import { customElement, property, state } from "lit/decorators.js";
|
|
52
|
+
/** The bridges the header draws between the two tiles. */
|
|
53
|
+
export const CONNECTOR_VARIANTS = ["dots", "bridge"];
|
|
54
|
+
const SHIELD_CHECK = html `<svg
|
|
55
|
+
viewBox="0 0 24 24"
|
|
56
|
+
fill="none"
|
|
57
|
+
stroke="currentColor"
|
|
58
|
+
stroke-width="2"
|
|
59
|
+
stroke-linecap="round"
|
|
60
|
+
stroke-linejoin="round"
|
|
61
|
+
>
|
|
62
|
+
<path
|
|
63
|
+
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"
|
|
64
|
+
/>
|
|
65
|
+
<path d="m9 12 2 2 4-4" />
|
|
66
|
+
</svg>`;
|
|
67
|
+
const DOTS_SHIELD = html `<svg
|
|
68
|
+
viewBox="0 0 24 24"
|
|
69
|
+
fill="none"
|
|
70
|
+
stroke="currentColor"
|
|
71
|
+
stroke-width="2.2"
|
|
72
|
+
stroke-linecap="round"
|
|
73
|
+
stroke-linejoin="round"
|
|
74
|
+
>
|
|
75
|
+
<path d="M12 3l8 3v5c0 4.5-3.5 8.5-8 10-4.5-1.5-8-5.5-8-10V6l8-3z" />
|
|
76
|
+
<path d="m9 12 2 2 4-4" />
|
|
77
|
+
</svg>`;
|
|
29
78
|
let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
30
79
|
constructor() {
|
|
31
80
|
super(...arguments);
|
|
@@ -47,8 +96,29 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
47
96
|
* logo.dev returns 404.
|
|
48
97
|
*/
|
|
49
98
|
this.logoDevToken = "";
|
|
99
|
+
/** The bridge between the tiles: `bridge` (default) or `dots`. */
|
|
100
|
+
this.variant = "bridge";
|
|
101
|
+
/**
|
|
102
|
+
* Who carries the connection, such as the host's product name. Read out as
|
|
103
|
+
* "{client} is connecting to {server} via {via}" and shown as the shield's
|
|
104
|
+
* tooltip. Empty: the header names only the client and the server.
|
|
105
|
+
*/
|
|
106
|
+
this.via = "";
|
|
50
107
|
this.clientImageOk = true;
|
|
51
108
|
this.serverImageOk = true;
|
|
109
|
+
/** Whether the host filled `mark`, so the shield steps aside. */
|
|
110
|
+
this.hasMark = false;
|
|
111
|
+
}
|
|
112
|
+
/** A logo that failed is tried again when its URL changes. */
|
|
113
|
+
willUpdate(changed) {
|
|
114
|
+
if (changed.has("clientLogoUrl") || changed.has("clientDid")) {
|
|
115
|
+
this.clientImageOk = true;
|
|
116
|
+
}
|
|
117
|
+
if (changed.has("serverLogoUrl") ||
|
|
118
|
+
changed.has("serverDomain") ||
|
|
119
|
+
changed.has("logoDevToken")) {
|
|
120
|
+
this.serverImageOk = true;
|
|
121
|
+
}
|
|
52
122
|
}
|
|
53
123
|
/**
|
|
54
124
|
* Derive a logo URL for an agent DID via KTA hosting convention.
|
|
@@ -85,12 +155,54 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
85
155
|
return this.logoDevLogo(this.serverDomain);
|
|
86
156
|
}
|
|
87
157
|
monogram(name) {
|
|
88
|
-
return (name
|
|
158
|
+
return (name.trim().charAt(0) || "?").toUpperCase();
|
|
159
|
+
}
|
|
160
|
+
/** What a screen reader hears in place of the picture. */
|
|
161
|
+
description() {
|
|
162
|
+
const client = this.clientName.trim() || "An agent";
|
|
163
|
+
const server = this.serverName.trim() || "this site";
|
|
164
|
+
const via = this.via.trim();
|
|
165
|
+
return `${client} is connecting to ${server}${via ? ` via ${via}` : ""}`;
|
|
166
|
+
}
|
|
167
|
+
readMark(event) {
|
|
168
|
+
const slot = event.currentTarget;
|
|
169
|
+
this.hasMark = slot.assignedElements({ flatten: true }).length > 0;
|
|
170
|
+
}
|
|
171
|
+
updated() {
|
|
172
|
+
this.toggleAttribute("has-mark", this.hasMark);
|
|
173
|
+
}
|
|
174
|
+
/** The middle of the bridge: the host's mark, or the shield. */
|
|
175
|
+
renderMark(shield) {
|
|
176
|
+
const title = this.via.trim() ? `Protected by ${this.via.trim()}` : nothing;
|
|
177
|
+
return html `<span class="mark"
|
|
178
|
+
><slot name="mark" @slotchange=${this.readMark}></slot>${this.hasMark
|
|
179
|
+
? nothing
|
|
180
|
+
: html `<span class="shield" title=${title} aria-hidden="true"
|
|
181
|
+
>${shield}</span
|
|
182
|
+
>`}</span
|
|
183
|
+
>`;
|
|
184
|
+
}
|
|
185
|
+
renderBridge() {
|
|
186
|
+
if (this.variant === "bridge") {
|
|
187
|
+
return html `<div class="bridge">
|
|
188
|
+
<span class="dash" aria-hidden="true"></span>
|
|
189
|
+
${this.renderMark(SHIELD_CHECK)}
|
|
190
|
+
<span class="dash" aria-hidden="true"></span>
|
|
191
|
+
</div>`;
|
|
192
|
+
}
|
|
193
|
+
const dots = html `<span class="dots" aria-hidden="true"
|
|
194
|
+
><span></span><span></span><span></span
|
|
195
|
+
></span>`;
|
|
196
|
+
return html `<div class="bridge">
|
|
197
|
+
${dots}${this.renderMark(DOTS_SHIELD)}${dots}
|
|
198
|
+
</div>`;
|
|
89
199
|
}
|
|
90
200
|
render() {
|
|
91
201
|
const clientLogo = this.resolveClientLogo();
|
|
92
|
-
const serverLogo = this.
|
|
93
|
-
|
|
202
|
+
const serverLogo = this.serverImageOk
|
|
203
|
+
? this.resolveServerLogo()
|
|
204
|
+
: undefined;
|
|
205
|
+
return html `<div class="bar">
|
|
94
206
|
<div class="tile client" aria-hidden="true">
|
|
95
207
|
${clientLogo && this.clientImageOk
|
|
96
208
|
? html `<img
|
|
@@ -98,33 +210,38 @@ let ConsentConnectorHeader = class ConsentConnectorHeader extends LitElement {
|
|
|
98
210
|
alt=""
|
|
99
211
|
@error=${() => (this.clientImageOk = false)}
|
|
100
212
|
/>`
|
|
101
|
-
: html `<span class="monogram"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<span class="dots"><span></span><span></span><span></span></span>
|
|
105
|
-
<span class="shield" title="Protected by Checkpoint">
|
|
106
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
107
|
-
<path d="M12 3l8 3v5c0 4.5-3.5 8.5-8 10-4.5-1.5-8-5.5-8-10V6l8-3z" />
|
|
108
|
-
<path d="m9 12 2 2 4-4" />
|
|
109
|
-
</svg>
|
|
110
|
-
</span>
|
|
111
|
-
<span class="dots"><span></span><span></span><span></span></span>
|
|
213
|
+
: html `<span class="monogram"
|
|
214
|
+
>${this.monogram(this.clientName)}</span
|
|
215
|
+
>`}
|
|
112
216
|
</div>
|
|
113
|
-
|
|
114
|
-
|
|
217
|
+
${this.renderBridge()}
|
|
218
|
+
<div
|
|
219
|
+
class="tile server ${serverLogo ? "has-logo" : ""}"
|
|
220
|
+
aria-hidden="true"
|
|
221
|
+
>
|
|
222
|
+
${serverLogo
|
|
115
223
|
? html `<img
|
|
116
224
|
src="${serverLogo}"
|
|
117
225
|
alt=""
|
|
118
226
|
@error=${() => (this.serverImageOk = false)}
|
|
119
227
|
/>`
|
|
120
|
-
: html `<span class="monogram"
|
|
228
|
+
: html `<span class="monogram"
|
|
229
|
+
>${this.monogram(this.serverName)}</span
|
|
230
|
+
>`}
|
|
121
231
|
</div>
|
|
122
|
-
<span
|
|
123
|
-
|
|
232
|
+
<span class="visually-hidden">${this.description()}</span>
|
|
233
|
+
</div>`;
|
|
124
234
|
}
|
|
125
235
|
};
|
|
126
236
|
ConsentConnectorHeader.styles = css `
|
|
237
|
+
/* The box is on an inner element: a page's reset (such as
|
|
238
|
+
Tailwind's "* { padding: 0; margin: 0; border: 0 }") reaches the host,
|
|
239
|
+
never inside. */
|
|
127
240
|
:host {
|
|
241
|
+
display: block;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.bar {
|
|
128
245
|
display: flex;
|
|
129
246
|
align-items: center;
|
|
130
247
|
justify-content: center;
|
|
@@ -132,10 +249,16 @@ ConsentConnectorHeader.styles = css `
|
|
|
132
249
|
padding: 22px 0 4px;
|
|
133
250
|
}
|
|
134
251
|
|
|
252
|
+
:host([variant="bridge"]) .bar {
|
|
253
|
+
gap: 8px;
|
|
254
|
+
padding: 20px 0 14px;
|
|
255
|
+
}
|
|
256
|
+
|
|
135
257
|
.tile {
|
|
136
|
-
|
|
258
|
+
box-sizing: border-box;
|
|
137
259
|
height: 56px;
|
|
138
|
-
|
|
260
|
+
min-width: 56px;
|
|
261
|
+
border-radius: var(--cs-tile-radius, 14px);
|
|
139
262
|
overflow: hidden;
|
|
140
263
|
display: flex;
|
|
141
264
|
align-items: center;
|
|
@@ -145,30 +268,46 @@ ConsentConnectorHeader.styles = css `
|
|
|
145
268
|
border: 1px solid var(--cs-surface-border, rgba(15, 23, 42, 0.08));
|
|
146
269
|
}
|
|
147
270
|
|
|
148
|
-
/*
|
|
149
|
-
it 56px outside; the shared .tile (server) box is left unchanged. */
|
|
271
|
+
/* The agent's tile is white with a light border in every theme. */
|
|
150
272
|
.tile.client {
|
|
151
|
-
|
|
152
|
-
background: var(--cs-agent-tile-bg, #
|
|
273
|
+
width: 56px;
|
|
274
|
+
background: var(--cs-agent-tile-bg, #ffffff);
|
|
153
275
|
border: 1px solid var(--cs-agent-tile-border, rgba(15, 23, 42, 0.08));
|
|
154
276
|
}
|
|
155
277
|
|
|
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. */
|
|
278
|
+
/* Marks are contained, not cropped: 36px leaves a 10px inset inside the
|
|
279
|
+
56px tile, so a non-square logo keeps its whole shape. */
|
|
164
280
|
.tile.client img {
|
|
165
281
|
width: 36px;
|
|
166
282
|
height: 36px;
|
|
167
283
|
object-fit: contain;
|
|
168
284
|
}
|
|
169
285
|
|
|
286
|
+
/* The server's logo at the mark's height: a square logo in a square tile,
|
|
287
|
+
a wordmark widening the tile up to 126px and contained past that (a
|
|
288
|
+
3.75:1 wordmark draws 108 by 29). Where the row is short of room the
|
|
289
|
+
tile gives some back, down to square, and the wordmark is contained in
|
|
290
|
+
what is left. */
|
|
291
|
+
.tile.server {
|
|
292
|
+
flex-shrink: 1;
|
|
293
|
+
max-width: 126px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.tile.server.has-logo {
|
|
297
|
+
padding: 0 8px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.tile.server img {
|
|
301
|
+
display: block;
|
|
302
|
+
height: 36px;
|
|
303
|
+
width: auto;
|
|
304
|
+
min-width: 36px;
|
|
305
|
+
max-width: 100%;
|
|
306
|
+
object-fit: contain;
|
|
307
|
+
}
|
|
308
|
+
|
|
170
309
|
.tile .monogram {
|
|
171
|
-
width:
|
|
310
|
+
width: 54px;
|
|
172
311
|
height: 100%;
|
|
173
312
|
display: flex;
|
|
174
313
|
align-items: center;
|
|
@@ -178,11 +317,11 @@ ConsentConnectorHeader.styles = css `
|
|
|
178
317
|
}
|
|
179
318
|
|
|
180
319
|
.tile.client .monogram {
|
|
181
|
-
color: var(--cs-agent-tile-text, #
|
|
320
|
+
color: var(--cs-agent-tile-text, #0f172a);
|
|
182
321
|
}
|
|
183
322
|
|
|
184
323
|
.tile.server .monogram {
|
|
185
|
-
color: var(--cs-text-primary, #
|
|
324
|
+
color: var(--cs-text-primary, #0f172a);
|
|
186
325
|
}
|
|
187
326
|
|
|
188
327
|
.bridge {
|
|
@@ -200,7 +339,7 @@ ConsentConnectorHeader.styles = css `
|
|
|
200
339
|
width: 4px;
|
|
201
340
|
height: 4px;
|
|
202
341
|
border-radius: 50%;
|
|
203
|
-
background: var(--cs-text-tertiary, #
|
|
342
|
+
background: var(--cs-text-tertiary, #94a3b8);
|
|
204
343
|
opacity: 0.55;
|
|
205
344
|
}
|
|
206
345
|
|
|
@@ -212,7 +351,7 @@ ConsentConnectorHeader.styles = css `
|
|
|
212
351
|
display: inline-flex;
|
|
213
352
|
align-items: center;
|
|
214
353
|
justify-content: center;
|
|
215
|
-
color: #
|
|
354
|
+
color: #15803d;
|
|
216
355
|
flex-shrink: 0;
|
|
217
356
|
}
|
|
218
357
|
|
|
@@ -220,6 +359,75 @@ ConsentConnectorHeader.styles = css `
|
|
|
220
359
|
width: 16px;
|
|
221
360
|
height: 16px;
|
|
222
361
|
}
|
|
362
|
+
|
|
363
|
+
/* 144px where there is room; it gives way first where there is not. */
|
|
364
|
+
:host([variant="bridge"]) .bridge {
|
|
365
|
+
flex: 0 4 144px;
|
|
366
|
+
height: 56px;
|
|
367
|
+
gap: 6px;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.dash {
|
|
371
|
+
flex: 1;
|
|
372
|
+
min-width: 12px;
|
|
373
|
+
height: 0;
|
|
374
|
+
border-top: 1px dashed var(--cs-text-tertiary, #5d6c82);
|
|
375
|
+
opacity: 0.5;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
:host([variant="bridge"]) .shield {
|
|
379
|
+
box-sizing: border-box;
|
|
380
|
+
width: 32px;
|
|
381
|
+
height: 32px;
|
|
382
|
+
background: var(
|
|
383
|
+
--cs-tint,
|
|
384
|
+
color-mix(
|
|
385
|
+
in srgb,
|
|
386
|
+
var(--cs-text-primary, #0f172a) 4%,
|
|
387
|
+
var(--cs-surface-card, #fff)
|
|
388
|
+
)
|
|
389
|
+
);
|
|
390
|
+
border: 1px solid
|
|
391
|
+
var(
|
|
392
|
+
--cs-tint-line,
|
|
393
|
+
color-mix(
|
|
394
|
+
in srgb,
|
|
395
|
+
var(--cs-text-primary, #0f172a) 11%,
|
|
396
|
+
var(--cs-surface-card, #fff)
|
|
397
|
+
)
|
|
398
|
+
);
|
|
399
|
+
color: var(--cs-mark, var(--cs-text-primary, #0f172a));
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.mark {
|
|
403
|
+
display: inline-flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
flex-shrink: 0;
|
|
407
|
+
--cs-wallet-orb-size: var(--cs-connector-mark-size, 60px);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Room under the row for a mark's caption, and air before the card. */
|
|
411
|
+
:host([has-mark]) .bar {
|
|
412
|
+
padding-bottom: 44px;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
:host([variant="bridge"][has-mark]) .bridge {
|
|
416
|
+
height: auto;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.visually-hidden {
|
|
420
|
+
position: absolute;
|
|
421
|
+
width: 1px;
|
|
422
|
+
height: 1px;
|
|
423
|
+
padding: 0;
|
|
424
|
+
margin: -1px;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
clip: rect(0 0 0 0);
|
|
427
|
+
clip-path: inset(50%);
|
|
428
|
+
white-space: nowrap;
|
|
429
|
+
border: 0;
|
|
430
|
+
}
|
|
223
431
|
`;
|
|
224
432
|
__decorate([
|
|
225
433
|
property({ type: String })
|
|
@@ -242,12 +450,21 @@ __decorate([
|
|
|
242
450
|
__decorate([
|
|
243
451
|
property({ type: String, attribute: "logo-dev-token" })
|
|
244
452
|
], ConsentConnectorHeader.prototype, "logoDevToken", void 0);
|
|
453
|
+
__decorate([
|
|
454
|
+
property({ type: String, reflect: true })
|
|
455
|
+
], ConsentConnectorHeader.prototype, "variant", void 0);
|
|
456
|
+
__decorate([
|
|
457
|
+
property({ type: String })
|
|
458
|
+
], ConsentConnectorHeader.prototype, "via", void 0);
|
|
245
459
|
__decorate([
|
|
246
460
|
state()
|
|
247
461
|
], ConsentConnectorHeader.prototype, "clientImageOk", void 0);
|
|
248
462
|
__decorate([
|
|
249
463
|
state()
|
|
250
464
|
], ConsentConnectorHeader.prototype, "serverImageOk", void 0);
|
|
465
|
+
__decorate([
|
|
466
|
+
state()
|
|
467
|
+
], ConsentConnectorHeader.prototype, "hasMark", void 0);
|
|
251
468
|
ConsentConnectorHeader = __decorate([
|
|
252
469
|
customElement("consent-connector-header")
|
|
253
470
|
], ConsentConnectorHeader);
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;;;;;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,WAAW,GAAG,IAAI,CAAA;;;;;;;;;;OAUjB,CAAC;AAGD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,UAAU;IAA/C;;QACL,0DAA0D;QAC9B,eAAU,GAAG,EAAE,CAAC;QAE5C,yEAAyE;QAC7C,cAAS,GAAG,EAAE,CAAC;QAE3C,6CAA6C;QACa,kBAAa,GAAG,EAAE,CAAC;QAE7E,gEAAgE;QACpC,eAAU,GAAG,E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6DAAoB;AAOpB;IAAxD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;4DAAmB;AAGhC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDAC/B;AAOiB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAU;AAEpB;IAAhB,KAAK,EAAE;6DAA8B;AACrB;IAAhB,KAAK,EAAE;6DAA8B;AAoQrB;IAAhB,KAAK,EAAE;uDAAyB;AA1StB,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAqXlC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent flow timeline
|
|
3
|
+
*
|
|
4
|
+
* An editor's scrubber for a `<consent-flow>`: one button per step the flow
|
|
5
|
+
* has, in the flow's own order. Choosing one sets the flow's `step`; the
|
|
6
|
+
* timeline follows the flow's `consent-flow-step` events, so it shows the
|
|
7
|
+
* step whoever moved it. It never takes focus from the flow, nor the flow
|
|
8
|
+
* from it.
|
|
9
|
+
*
|
|
10
|
+
* <consent-flow id="preview" preview></consent-flow>
|
|
11
|
+
* <consent-flow-timeline for="preview"></consent-flow-timeline>
|
|
12
|
+
*
|
|
13
|
+
* @module components/consent-flow-timeline
|
|
14
|
+
*/
|
|
15
|
+
import { LitElement } from "lit";
|
|
16
|
+
import { type FlowStep } from "../flow/model.js";
|
|
17
|
+
import type { ConsentFlow } from "./consent-flow.js";
|
|
18
|
+
/** Each step's name on the timeline. An editor can pass its own (`labels`). */
|
|
19
|
+
export declare const FLOW_STEP_LABELS: Readonly<Record<FlowStep, string>>;
|
|
20
|
+
export declare class ConsentFlowTimeline extends LitElement {
|
|
21
|
+
/** The id of the `<consent-flow>` it drives, in the same document or shadow root. */
|
|
22
|
+
htmlFor: string;
|
|
23
|
+
/** The flow it drives, when the host holds a reference rather than an id. Wins over `for`. */
|
|
24
|
+
target: ConsentFlow | null;
|
|
25
|
+
/** Step names to show instead of the defaults. */
|
|
26
|
+
labels: Partial<Record<FlowStep, string>>;
|
|
27
|
+
/** The navigation's accessible name. */
|
|
28
|
+
label: string;
|
|
29
|
+
private current;
|
|
30
|
+
private steps;
|
|
31
|
+
private watched;
|
|
32
|
+
static styles: import("lit").CSSResult;
|
|
33
|
+
connectedCallback(): void;
|
|
34
|
+
disconnectedCallback(): void;
|
|
35
|
+
protected willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
36
|
+
/** The flow this timeline drives: `target`, else the element `for` names. */
|
|
37
|
+
private resolve;
|
|
38
|
+
private watch;
|
|
39
|
+
private onStep;
|
|
40
|
+
private read;
|
|
41
|
+
private choose;
|
|
42
|
+
protected render(): unknown;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
"consent-flow-timeline": ConsentFlowTimeline;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=consent-flow-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-flow-timeline.d.ts","sourceRoot":"","sources":["../../src/components/consent-flow-timeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAS/D,CAAC;AAEF,qBACa,mBAAoB,SAAQ,UAAU;IACjD,qFAAqF;IACvC,OAAO,SAAM;IAE3D,8FAA8F;IAC9D,MAAM,EAAE,WAAW,GAAG,I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