@kya-os/consent 0.3.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 +185 -20
- 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 +488 -66
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +197 -42
- 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 +445 -30
- 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 +5 -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 +21 -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 +93 -14
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +488 -67
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +42 -5
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +196 -41
- 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 +76 -12
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +445 -32
- 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 +3 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -2
- 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 +2200 -389
- package/dist/consent.min.js +1308 -496
- package/dist/constants/capabilities.d.ts +14 -2
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +21 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +60 -21
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +60 -21
- package/dist/copy/tokens.js.map +1 -1
- package/dist/identity/agent-identity.d.ts +3 -2
- package/dist/identity/agent-identity.d.ts.map +1 -1
- package/dist/identity/agent-identity.js +3 -2
- package/dist/identity/agent-identity.js.map +1 -1
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/react/index.d.ts +6 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +10 -1
- package/dist/react/index.js.map +1 -1
- package/dist/styles/brand.d.ts +184 -0
- package/dist/styles/brand.d.ts.map +1 -0
- package/dist/styles/brand.js +372 -0
- package/dist/styles/brand.js.map +1 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/theme.d.ts +73 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +96 -29
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +12 -14
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +1 -2
- package/dist/types/capabilities.types.js.map +1 -1
- package/dist/types/decision.types.d.ts +57 -0
- package/dist/types/decision.types.d.ts.map +1 -0
- package/dist/types/decision.types.js +12 -0
- package/dist/types/decision.types.js.map +1 -0
- package/dist/types/edit.types.d.ts +73 -0
- package/dist/types/edit.types.d.ts.map +1 -0
- package/dist/types/edit.types.js +76 -0
- package/dist/types/edit.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,37 +2,101 @@
|
|
|
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).
|
|
21
|
+
*
|
|
22
|
+
* Slot: `headline`, the h1's words in place of the standard line, for a host
|
|
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.
|
|
14
30
|
*
|
|
15
31
|
* @module components/consent-headline
|
|
16
32
|
*/
|
|
17
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;
|
|
18
40
|
export declare class ConsentHeadline extends LitElement {
|
|
19
41
|
/** The agent asking. "An assistant" in the headline when it is empty. */
|
|
20
42
|
agentName: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
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;
|
|
23
48
|
/**
|
|
24
49
|
* What the agent wants to do, as a phrase that follows "would like to",
|
|
25
|
-
* such as "read your orders". Empty or "use" gives the
|
|
50
|
+
* such as "read your orders". Empty or "use" gives the standard headline.
|
|
26
51
|
*/
|
|
27
52
|
verb: string;
|
|
28
|
-
/** The subhead. Empty
|
|
53
|
+
/** The subhead. Empty draws none. */
|
|
29
54
|
description: string;
|
|
30
55
|
/** The line above the headline. Empty gives "PERMISSION REQUEST". */
|
|
31
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;
|
|
63
|
+
/** Whether the host filled the `headline` slot, so the standard line steps aside. */
|
|
64
|
+
private hostHeadline;
|
|
32
65
|
static styles: import("lit").CSSResult;
|
|
33
66
|
render(): import("lit").TemplateResult<1>;
|
|
34
|
-
/** The
|
|
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;
|
|
74
|
+
/**
|
|
75
|
+
* Before the first render, reads what the slot will hold from the light DOM,
|
|
76
|
+
* so the first render is already the right one. A change made here does not
|
|
77
|
+
* schedule another update, where one made after the first update would.
|
|
78
|
+
*/
|
|
79
|
+
willUpdate(): void;
|
|
80
|
+
/**
|
|
81
|
+
* The children the `headline` slot will be given, flattened: a screen's
|
|
82
|
+
* forwarded slot counts only when something is assigned to it.
|
|
83
|
+
*/
|
|
84
|
+
private lightHeadlineFilled;
|
|
85
|
+
/**
|
|
86
|
+
* Reads the slot itself, not the event's target: when a screen forwards its
|
|
87
|
+
* own slot here, the event comes from that slot, and a host that fills the
|
|
88
|
+
* screen's slot later is seen only through the flattened list.
|
|
89
|
+
*/
|
|
90
|
+
private readHeadlineSlot;
|
|
91
|
+
/** The headline, with the agent's name as a button when the agent is given. */
|
|
35
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;
|
|
36
100
|
}
|
|
37
101
|
declare global {
|
|
38
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;IACd,QAAQ,UAAS;IAE7D,uEAAuE;IACvC,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE1E,qFAAqF;IAC5E,OAAO,CAAC,YAAY,CAAS;IAEtC,OAAgB,MAAM,0BA6NpB;IAEO,MAAM;IAsBf,6CAA6C;IAC7C,OAAO,KAAK,WAAW,GAEtB;IAED;;;OAGG;IACH,OAAO,CAAC,WAAW;IAcnB;;;;OAIG;IACM,UAAU,IAAI,IAAI;IAK3B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAMtB;IAEF,+EAA+E;IAC/E,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,UAAU;IA+BlB,2EAA2E;IAC3E,OAAO,CAAC,aAAa;IA+DrB,8EAA8E;IAC9E,OAAO,CAAC,eAAe,CAWrB;IAEF,OAAO,CAAC,YAAY,CAclB;IAEO,oBAAoB,IAAI,IAAI;CAKtC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,eAAe,CAAC;KACrC;CACF"}
|