@kya-os/consent 0.1.37 → 0.1.39
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/dist/bundle/index.d.ts +12 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +12 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +2 -2
- package/dist/bundle/inline.js.map +1 -1
- package/dist/bundle/shell.d.ts +23 -0
- package/dist/bundle/shell.d.ts.map +1 -1
- package/dist/bundle/shell.js +25 -1
- package/dist/bundle/shell.js.map +1 -1
- package/dist/capabilities/index.d.ts +7 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +7 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/registry.d.ts +29 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +178 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/cedar/compile.d.ts +30 -0
- package/dist/cedar/compile.d.ts.map +1 -0
- package/dist/cedar/compile.js +55 -0
- package/dist/cedar/compile.js.map +1 -0
- package/dist/cedar/explain.d.ts +22 -0
- package/dist/cedar/explain.d.ts.map +1 -0
- package/dist/cedar/explain.js +72 -0
- package/dist/cedar/explain.js.map +1 -0
- package/dist/cedar/index.d.ts +8 -0
- package/dist/cedar/index.d.ts.map +1 -0
- package/dist/cedar/index.js +8 -0
- package/dist/cedar/index.js.map +1 -0
- package/dist/cjs/bundle/index.js +19 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +2 -2
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/shell.js +25 -1
- package/dist/cjs/bundle/shell.js.map +1 -1
- package/dist/cjs/capabilities/index.js +12 -0
- package/dist/cjs/capabilities/index.js.map +1 -0
- package/dist/cjs/capabilities/registry.js +182 -0
- package/dist/cjs/capabilities/registry.js.map +1 -0
- package/dist/cjs/cedar/compile.js +59 -0
- package/dist/cjs/cedar/compile.js.map +1 -0
- package/dist/cjs/cedar/explain.js +75 -0
- package/dist/cjs/cedar/explain.js.map +1 -0
- package/dist/cjs/cedar/index.js +14 -0
- package/dist/cjs/cedar/index.js.map +1 -0
- package/dist/cjs/components/consent-action-bar.js +138 -0
- package/dist/cjs/components/consent-action-bar.js.map +1 -0
- package/dist/cjs/components/consent-agent-header.js +205 -0
- package/dist/cjs/components/consent-agent-header.js.map +1 -0
- package/dist/cjs/components/consent-capabilities-screen.js +309 -0
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -0
- package/dist/cjs/components/consent-capability-card.js +340 -0
- package/dist/cjs/components/consent-capability-card.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +99 -0
- package/dist/cjs/components/consent-footer.js.map +1 -0
- package/dist/cjs/components/consent-revocation-notice.js +101 -0
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -0
- package/dist/cjs/components/index.js +14 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +176 -7
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/copy/index.js +12 -0
- package/dist/cjs/copy/index.js.map +1 -0
- package/dist/cjs/copy/tokens.js +101 -0
- package/dist/cjs/copy/tokens.js.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mcp-app/index.js +15 -0
- package/dist/cjs/mcp-app/index.js.map +1 -0
- package/dist/cjs/mcp-app/inline.js +20 -0
- package/dist/cjs/mcp-app/inline.js.map +1 -0
- package/dist/cjs/mcp-app/types.js +10 -0
- package/dist/cjs/mcp-app/types.js.map +1 -0
- package/dist/cjs/popup/index.js +15 -0
- package/dist/cjs/popup/index.js.map +1 -0
- package/dist/cjs/popup/launcher.js +77 -0
- package/dist/cjs/popup/launcher.js.map +1 -0
- package/dist/cjs/schemas/capabilities.schemas.js +129 -0
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -0
- package/dist/cjs/schemas/config.schemas.js +18 -0
- package/dist/cjs/schemas/config.schemas.js.map +1 -1
- package/dist/cjs/schemas/index.js +1 -0
- package/dist/cjs/schemas/index.js.map +1 -1
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +86 -0
- package/dist/cjs/styles/theme.js.map +1 -0
- package/dist/cjs/types/capabilities.types.js +12 -0
- package/dist/cjs/types/capabilities.types.js.map +1 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +30 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -0
- package/dist/components/consent-action-bar.js +135 -0
- package/dist/components/consent-action-bar.js.map +1 -0
- package/dist/components/consent-agent-header.d.ts +31 -0
- package/dist/components/consent-agent-header.d.ts.map +1 -0
- package/dist/components/consent-agent-header.js +202 -0
- package/dist/components/consent-agent-header.js.map +1 -0
- package/dist/components/consent-capabilities-screen.d.ts +62 -0
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -0
- package/dist/components/consent-capabilities-screen.js +306 -0
- package/dist/components/consent-capabilities-screen.js.map +1 -0
- package/dist/components/consent-capability-card.d.ts +44 -0
- package/dist/components/consent-capability-card.d.ts.map +1 -0
- package/dist/components/consent-capability-card.js +337 -0
- package/dist/components/consent-capability-card.js.map +1 -0
- package/dist/components/consent-footer.d.ts +22 -0
- package/dist/components/consent-footer.d.ts.map +1 -0
- package/dist/components/consent-footer.js +96 -0
- package/dist/components/consent-footer.js.map +1 -0
- package/dist/components/consent-revocation-notice.d.ts +22 -0
- package/dist/components/consent-revocation-notice.d.ts.map +1 -0
- package/dist/components/consent-revocation-notice.js +98 -0
- package/dist/components/consent-revocation-notice.js.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +41 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +176 -7
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +1578 -210
- package/dist/consent.min.js +727 -96
- package/dist/copy/index.d.ts +8 -0
- package/dist/copy/index.d.ts.map +1 -0
- package/dist/copy/index.js +7 -0
- package/dist/copy/index.js.map +1 -0
- package/dist/copy/tokens.d.ts +93 -0
- package/dist/copy/tokens.d.ts.map +1 -0
- package/dist/copy/tokens.js +97 -0
- package/dist/copy/tokens.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-app/index.d.ts +10 -0
- package/dist/mcp-app/index.d.ts.map +1 -0
- package/dist/mcp-app/index.js +9 -0
- package/dist/mcp-app/index.js.map +1 -0
- package/dist/mcp-app/inline.d.ts +16 -0
- package/dist/mcp-app/inline.d.ts.map +1 -0
- package/dist/mcp-app/inline.js +16 -0
- package/dist/mcp-app/inline.js.map +1 -0
- package/dist/mcp-app/types.d.ts +33 -0
- package/dist/mcp-app/types.d.ts.map +1 -0
- package/dist/mcp-app/types.js +8 -0
- package/dist/mcp-app/types.js.map +1 -0
- package/dist/popup/index.d.ts +8 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/popup/index.js +7 -0
- package/dist/popup/index.js.map +1 -0
- package/dist/popup/launcher.d.ts +81 -0
- package/dist/popup/launcher.d.ts.map +1 -0
- package/dist/popup/launcher.js +71 -0
- package/dist/popup/launcher.js.map +1 -0
- package/dist/schemas/api.schemas.d.ts +234 -30
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.d.ts +186 -0
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -0
- package/dist/schemas/capabilities.schemas.js +123 -0
- package/dist/schemas/capabilities.schemas.js.map +1 -0
- package/dist/schemas/config.schemas.d.ts +332 -36
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/schemas/config.schemas.js +18 -0
- package/dist/schemas/config.schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- 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 +72 -0
- package/dist/styles/theme.d.ts.map +1 -0
- package/dist/styles/theme.js +81 -0
- package/dist/styles/theme.js.map +1 -0
- package/dist/types/capabilities.types.d.ts +126 -0
- package/dist/types/capabilities.types.d.ts.map +1 -0
- package/dist/types/capabilities.types.js +11 -0
- package/dist/types/capabilities.types.js.map +1 -0
- package/dist/types/config.types.d.ts +33 -0
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +15 -8
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Capability Card
|
|
4
|
+
*
|
|
5
|
+
* Renders a single capability row in the new humanized consent layout.
|
|
6
|
+
* Shows: square checkbox + icon tile + bold label inline with description +
|
|
7
|
+
* optional amber HIGHER RISK chip + small "View policy" disclosure.
|
|
8
|
+
*
|
|
9
|
+
* Emits a `capability-toggle` CustomEvent with `{ id, checked }` whenever the
|
|
10
|
+
* checkbox state changes; the parent (`<mcp-consent>`) tracks selection.
|
|
11
|
+
*
|
|
12
|
+
* @module components/consent-capability-card
|
|
13
|
+
*/
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ConsentCapabilityCard = void 0;
|
|
22
|
+
const lit_1 = require("lit");
|
|
23
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
24
|
+
const tokens_js_1 = require("../copy/tokens.js");
|
|
25
|
+
const explain_js_1 = require("../cedar/explain.js");
|
|
26
|
+
let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.capabilityId = "";
|
|
30
|
+
this.label = "";
|
|
31
|
+
this.description = "";
|
|
32
|
+
this.icon = "neutral";
|
|
33
|
+
this.riskLevel = "low";
|
|
34
|
+
this.checked = false;
|
|
35
|
+
this.compiledCedar = "";
|
|
36
|
+
this.policyOpen = false;
|
|
37
|
+
}
|
|
38
|
+
toggleChecked() {
|
|
39
|
+
this.checked = !this.checked;
|
|
40
|
+
const detail = {
|
|
41
|
+
id: this.capabilityId,
|
|
42
|
+
checked: this.checked,
|
|
43
|
+
};
|
|
44
|
+
this.dispatchEvent(new CustomEvent("capability-toggle", {
|
|
45
|
+
detail,
|
|
46
|
+
bubbles: true,
|
|
47
|
+
composed: true,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
togglePolicy() {
|
|
51
|
+
this.policyOpen = !this.policyOpen;
|
|
52
|
+
}
|
|
53
|
+
isHigherRisk() {
|
|
54
|
+
return this.riskLevel === "high" || this.riskLevel === "critical";
|
|
55
|
+
}
|
|
56
|
+
renderIcon() {
|
|
57
|
+
return iconSvgFor(this.icon);
|
|
58
|
+
}
|
|
59
|
+
renderPolicy() {
|
|
60
|
+
if (!this.policyOpen)
|
|
61
|
+
return lit_1.nothing;
|
|
62
|
+
if (!this.compiledCedar)
|
|
63
|
+
return lit_1.nothing;
|
|
64
|
+
const explanation = (0, explain_js_1.explainCedarFragment)(this.compiledCedar);
|
|
65
|
+
const tokens = tokens_js_1.CONSENT_COPY_TOKENS.capabilityRow;
|
|
66
|
+
return (0, lit_1.html) `
|
|
67
|
+
<div class="policy-disclosure" part="policy">
|
|
68
|
+
<h4>${tokens.glossTitle}</h4>
|
|
69
|
+
<ul>
|
|
70
|
+
${explanation.actions.length === 0
|
|
71
|
+
? (0, lit_1.html) `<li>—</li>`
|
|
72
|
+
: explanation.actions.map((action) => (0, lit_1.html) `<li><code>${action}</code></li>`)}
|
|
73
|
+
</ul>
|
|
74
|
+
${explanation.resource
|
|
75
|
+
? (0, lit_1.html) `<p>
|
|
76
|
+
On <code>${explanation.resource}</code>
|
|
77
|
+
</p>`
|
|
78
|
+
: (0, lit_1.html) `<p>On ${tokens.glossUnknownResource}</p>`}
|
|
79
|
+
<h4>${tokens.rawPolicyTitle}</h4>
|
|
80
|
+
<pre><code>${this.compiledCedar}</code></pre>
|
|
81
|
+
</div>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
const tokens = tokens_js_1.CONSENT_COPY_TOKENS.capabilityRow;
|
|
86
|
+
return (0, lit_1.html) `
|
|
87
|
+
<div class="row" part="row">
|
|
88
|
+
<button
|
|
89
|
+
class="checkbox"
|
|
90
|
+
part="checkbox"
|
|
91
|
+
role="checkbox"
|
|
92
|
+
aria-checked="${String(this.checked)}"
|
|
93
|
+
aria-label="${this.label}"
|
|
94
|
+
@click=${this.toggleChecked}
|
|
95
|
+
type="button"
|
|
96
|
+
>
|
|
97
|
+
${this.checked ? (0, lit_1.html) `<span class="check-mark">✓</span>` : lit_1.nothing}
|
|
98
|
+
</button>
|
|
99
|
+
<div class="icon-tile" aria-hidden="true">${this.renderIcon()}</div>
|
|
100
|
+
<div class="body">
|
|
101
|
+
<div class="row-label">
|
|
102
|
+
<span><strong>${this.label}</strong> <span class="description">${this.description}</span></span>
|
|
103
|
+
${this.isHigherRisk()
|
|
104
|
+
? (0, lit_1.html) `<span class="risk-chip">${tokens.higherRiskChip}</span>`
|
|
105
|
+
: lit_1.nothing}
|
|
106
|
+
</div>
|
|
107
|
+
<button
|
|
108
|
+
class="policy-toggle"
|
|
109
|
+
type="button"
|
|
110
|
+
@click=${this.togglePolicy}
|
|
111
|
+
aria-expanded="${String(this.policyOpen)}"
|
|
112
|
+
>
|
|
113
|
+
${tokens.viewPolicyLink}
|
|
114
|
+
</button>
|
|
115
|
+
${this.renderPolicy()}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports.ConsentCapabilityCard = ConsentCapabilityCard;
|
|
122
|
+
ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
123
|
+
:host {
|
|
124
|
+
display: block;
|
|
125
|
+
border-bottom: 1px solid var(--cs-surface-border, rgba(15, 23, 42, 0.08));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host(:last-of-type) {
|
|
129
|
+
border-bottom: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.row {
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-columns: 22px 36px 1fr;
|
|
135
|
+
gap: 14px;
|
|
136
|
+
padding: 16px 0;
|
|
137
|
+
align-items: flex-start;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.checkbox {
|
|
141
|
+
width: 22px;
|
|
142
|
+
height: 22px;
|
|
143
|
+
border-radius: 6px;
|
|
144
|
+
border: 1.5px solid var(--cs-text-secondary, #334155);
|
|
145
|
+
background: transparent;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
padding: 0;
|
|
151
|
+
transition: background 0.12s ease, border-color 0.12s ease;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.checkbox[aria-checked="true"] {
|
|
155
|
+
background: var(--cs-surface-accent, #0F172A);
|
|
156
|
+
border-color: var(--cs-surface-accent, #0F172A);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.checkbox:focus-visible {
|
|
160
|
+
outline: 2px solid var(--cs-focus-ring, #0F172A);
|
|
161
|
+
outline-offset: 2px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.check-mark {
|
|
165
|
+
color: var(--cs-surface-accent-text, #fff);
|
|
166
|
+
font-size: 14px;
|
|
167
|
+
line-height: 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.icon-tile {
|
|
171
|
+
width: 36px;
|
|
172
|
+
height: 36px;
|
|
173
|
+
border-radius: 10px;
|
|
174
|
+
background: var(--cs-surface-inset, #F1ECE2);
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
color: var(--cs-text-secondary, #334155);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.icon-tile svg {
|
|
182
|
+
width: 18px;
|
|
183
|
+
height: 18px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.body {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
gap: 6px;
|
|
190
|
+
min-width: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.row-label {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 10px;
|
|
197
|
+
flex-wrap: wrap;
|
|
198
|
+
font-size: 14.5px;
|
|
199
|
+
color: var(--cs-text-primary, #0F172A);
|
|
200
|
+
line-height: 1.45;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.row-label strong {
|
|
204
|
+
font-weight: 600;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.description {
|
|
208
|
+
color: var(--cs-text-secondary, #334155);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.risk-chip {
|
|
212
|
+
display: inline-flex;
|
|
213
|
+
padding: 2px 8px;
|
|
214
|
+
border-radius: 999px;
|
|
215
|
+
font-size: 10.5px;
|
|
216
|
+
font-weight: 700;
|
|
217
|
+
letter-spacing: 0.06em;
|
|
218
|
+
background: var(--cs-chip-risk-bg, #FCE7B6);
|
|
219
|
+
color: var(--cs-chip-risk-text, #7A4F00);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.policy-toggle {
|
|
223
|
+
align-self: flex-start;
|
|
224
|
+
background: none;
|
|
225
|
+
border: none;
|
|
226
|
+
padding: 0;
|
|
227
|
+
font-size: 12px;
|
|
228
|
+
font-weight: 500;
|
|
229
|
+
color: var(--cs-text-tertiary, #64748B);
|
|
230
|
+
text-decoration: underline;
|
|
231
|
+
text-underline-offset: 2px;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.policy-toggle:focus-visible {
|
|
236
|
+
outline: 2px solid var(--cs-focus-ring, #0F172A);
|
|
237
|
+
outline-offset: 2px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.policy-disclosure {
|
|
241
|
+
margin-top: 8px;
|
|
242
|
+
border-radius: 10px;
|
|
243
|
+
background: var(--cs-surface-inset, #F1ECE2);
|
|
244
|
+
padding: 10px 12px;
|
|
245
|
+
font-size: 12px;
|
|
246
|
+
color: var(--cs-text-secondary, #334155);
|
|
247
|
+
display: flex;
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
gap: 8px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.policy-disclosure h4 {
|
|
253
|
+
margin: 0;
|
|
254
|
+
font-size: 11px;
|
|
255
|
+
letter-spacing: 0.08em;
|
|
256
|
+
text-transform: uppercase;
|
|
257
|
+
color: var(--cs-text-tertiary, #64748B);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.policy-disclosure pre {
|
|
261
|
+
margin: 0;
|
|
262
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
263
|
+
font-size: 11.5px;
|
|
264
|
+
line-height: 1.5;
|
|
265
|
+
white-space: pre-wrap;
|
|
266
|
+
word-break: break-word;
|
|
267
|
+
color: var(--cs-text-primary, #0F172A);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.policy-disclosure ul {
|
|
271
|
+
margin: 0;
|
|
272
|
+
padding-left: 18px;
|
|
273
|
+
}
|
|
274
|
+
`;
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, decorators_js_1.property)({ type: String })
|
|
277
|
+
], ConsentCapabilityCard.prototype, "capabilityId", void 0);
|
|
278
|
+
__decorate([
|
|
279
|
+
(0, decorators_js_1.property)({ type: String })
|
|
280
|
+
], ConsentCapabilityCard.prototype, "label", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, decorators_js_1.property)({ type: String })
|
|
283
|
+
], ConsentCapabilityCard.prototype, "description", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, decorators_js_1.property)({ type: String })
|
|
286
|
+
], ConsentCapabilityCard.prototype, "icon", void 0);
|
|
287
|
+
__decorate([
|
|
288
|
+
(0, decorators_js_1.property)({ type: String })
|
|
289
|
+
], ConsentCapabilityCard.prototype, "riskLevel", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, decorators_js_1.property)({ type: Boolean, reflect: true })
|
|
292
|
+
], ConsentCapabilityCard.prototype, "checked", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
(0, decorators_js_1.property)({ type: String, attribute: "compiled-cedar" })
|
|
295
|
+
], ConsentCapabilityCard.prototype, "compiledCedar", void 0);
|
|
296
|
+
__decorate([
|
|
297
|
+
(0, decorators_js_1.state)()
|
|
298
|
+
], ConsentCapabilityCard.prototype, "policyOpen", void 0);
|
|
299
|
+
exports.ConsentCapabilityCard = ConsentCapabilityCard = __decorate([
|
|
300
|
+
(0, decorators_js_1.customElement)("consent-capability-card")
|
|
301
|
+
], ConsentCapabilityCard);
|
|
302
|
+
/**
|
|
303
|
+
* Inline SVG icons for the recognized capability icons. Kept inline to avoid
|
|
304
|
+
* an asset-loading hop in shadow DOM.
|
|
305
|
+
*/
|
|
306
|
+
function iconSvgFor(icon) {
|
|
307
|
+
switch (icon) {
|
|
308
|
+
case "search":
|
|
309
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="9" r="5.25"/><path d="m13.25 13.25 3.5 3.5"/></svg>`;
|
|
310
|
+
case "cart":
|
|
311
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3h2l1.4 9.4a1.5 1.5 0 0 0 1.5 1.3h7.6a1.5 1.5 0 0 0 1.5-1.2L18 6H6"/><circle cx="9" cy="17" r="1.2"/><circle cx="15" cy="17" r="1.2"/></svg>`;
|
|
312
|
+
case "card":
|
|
313
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="4.5" width="15" height="11" rx="2"/><path d="M2.5 9h15"/><path d="M5.5 13h3"/></svg>`;
|
|
314
|
+
case "pin":
|
|
315
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z"/><circle cx="10" cy="8" r="2"/></svg>`;
|
|
316
|
+
case "pin-new":
|
|
317
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z"/><path d="M10 6v4"/><path d="M8 8h4"/></svg>`;
|
|
318
|
+
case "shield":
|
|
319
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2.5 4 5v5.5C4 14 6.5 16.5 10 17.5c3.5-1 6-3.5 6-7V5z"/></svg>`;
|
|
320
|
+
case "key":
|
|
321
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="7" cy="13" r="3.25"/><path d="m9.5 11 6.5-6.5"/><path d="m13.5 7 2 2"/></svg>`;
|
|
322
|
+
case "tools":
|
|
323
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 6 6"/><path d="m10 4 6 6"/><path d="m4 16 12-12"/></svg>`;
|
|
324
|
+
case "user":
|
|
325
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="7" r="3"/><path d="M3 17a7 7 0 0 1 14 0"/></svg>`;
|
|
326
|
+
case "calendar":
|
|
327
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="14" height="13" rx="2"/><path d="M3 8h14"/><path d="M7 2v4M13 2v4"/></svg>`;
|
|
328
|
+
case "lock":
|
|
329
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="9" width="12" height="8" rx="2"/><path d="M7 9V6a3 3 0 0 1 6 0v3"/></svg>`;
|
|
330
|
+
case "eye":
|
|
331
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M2 10s3-6 8-6 8 6 8 6-3 6-8 6-8-6-8-6z"/><circle cx="10" cy="10" r="2.25"/></svg>`;
|
|
332
|
+
case "send":
|
|
333
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m17 3-7 7-2 7-3-9z"/></svg>`;
|
|
334
|
+
case "package":
|
|
335
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m10 2 7 4v8l-7 4-7-4V6z"/><path d="m3 6 7 4 7-4"/><path d="M10 18V10"/></svg>`;
|
|
336
|
+
default:
|
|
337
|
+
return (0, lit_1.html) `<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="5"/></svg>`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=consent-capability-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-capability-card.js","sourceRoot":"","sources":["../../../src/components/consent-capability-card.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAwD;AACxD,oDAA2D;AAYpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gBAAU;IAA9C;;QACuB,iBAAY,GAAG,EAAE,CAAC;QAClB,UAAK,GAAG,EAAE,CAAC;QACX,gBAAW,GAAG,EAAE,CAAC;QACjB,SAAI,GAAmB,SAAS,CAAC;QACjC,cAAS,GAAc,KAAK,CAAC;QACb,YAAO,GAAG,KAAK,CAAC;QACH,kBAAa,GAAG,EAAE,CAAC;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AAC;QACjN,KAAK,UAAU;YACb,OAAO,IAAA,UAAI,EAAA,kOAAkO,CAAC;QAChP,KAAK,MAAM;YACT,OAAO,IAAA,UAAI,EAAA,uNAAuN,CAAC;QACrO,KAAK,KAAK;YACR,OAAO,IAAA,UAAI,EAAA,yNAAyN,CAAC;QACvO,KAAK,MAAM;YACT,OAAO,IAAA,UAAI,EAAA,mKAAmK,CAAC;QACjL,KAAK,SAAS;YACZ,OAAO,IAAA,UAAI,EAAA,qNAAqN,CAAC;QACnO;YACE,OAAO,IAAA,UAAI,EAAA,oKAAoK,CAAC;IACpL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Footer
|
|
4
|
+
*
|
|
5
|
+
* `Protected by ✓ Checkpoint` (left) + `How does this work?` (right). Shared
|
|
6
|
+
* between the consent screen and the (future-migrated) gateway consent.
|
|
7
|
+
*
|
|
8
|
+
* @module components/consent-footer
|
|
9
|
+
*/
|
|
10
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
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;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ConsentFooter = void 0;
|
|
18
|
+
const lit_1 = require("lit");
|
|
19
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
20
|
+
const tokens_js_1 = require("../copy/tokens.js");
|
|
21
|
+
let ConsentFooter = class ConsentFooter extends lit_1.LitElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.theme = "light";
|
|
25
|
+
this.howItWorksUrl = "";
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const attribution = this.theme === "dark"
|
|
29
|
+
? tokens_js_1.CONSENT_COPY_TOKENS.attribution.securedBy
|
|
30
|
+
: tokens_js_1.CONSENT_COPY_TOKENS.attribution.protectedBy;
|
|
31
|
+
return (0, lit_1.html) `
|
|
32
|
+
<span class="left">
|
|
33
|
+
<svg
|
|
34
|
+
class="check"
|
|
35
|
+
viewBox="0 0 16 16"
|
|
36
|
+
fill="none"
|
|
37
|
+
stroke="currentColor"
|
|
38
|
+
stroke-width="1.8"
|
|
39
|
+
stroke-linecap="round"
|
|
40
|
+
stroke-linejoin="round"
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
>
|
|
43
|
+
<path d="m3.5 8.5 3 3 6-6.5" />
|
|
44
|
+
</svg>
|
|
45
|
+
${attribution}
|
|
46
|
+
</span>
|
|
47
|
+
${this.howItWorksUrl
|
|
48
|
+
? (0, lit_1.html) `<a href="${this.howItWorksUrl}" target="_blank" rel="noopener">
|
|
49
|
+
${tokens_js_1.CONSENT_COPY_TOKENS.attribution.howThisWorks}
|
|
50
|
+
</a>`
|
|
51
|
+
: (0, lit_1.html) `<span>${tokens_js_1.CONSENT_COPY_TOKENS.attribution.howThisWorks}</span>`}
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.ConsentFooter = ConsentFooter;
|
|
56
|
+
ConsentFooter.styles = (0, lit_1.css) `
|
|
57
|
+
:host {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
gap: 16px;
|
|
62
|
+
padding-top: 12px;
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
color: var(--cs-text-tertiary, #64748B);
|
|
65
|
+
border-top: 1px solid var(--cs-surface-border, transparent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.left {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 6px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.check {
|
|
75
|
+
width: 14px;
|
|
76
|
+
height: 14px;
|
|
77
|
+
color: var(--cs-text-secondary, #334155);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
a {
|
|
81
|
+
color: inherit;
|
|
82
|
+
text-decoration: underline;
|
|
83
|
+
text-underline-offset: 2px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
a:hover {
|
|
87
|
+
color: var(--cs-text-primary, #0F172A);
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, decorators_js_1.property)({ type: String })
|
|
92
|
+
], ConsentFooter.prototype, "theme", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, decorators_js_1.property)({ type: String })
|
|
95
|
+
], ConsentFooter.prototype, "howItWorksUrl", void 0);
|
|
96
|
+
exports.ConsentFooter = ConsentFooter = __decorate([
|
|
97
|
+
(0, decorators_js_1.customElement)("consent-footer")
|
|
98
|
+
], ConsentFooter);
|
|
99
|
+
//# sourceMappingURL=consent-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-footer.js","sourceRoot":"","sources":["../../../src/components/consent-footer.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;AAEH,6BAA4C;AAC5C,qDAA4D;AAE5D,iDAAwD;AAIjD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,gBAAU;IAAtC;;QACuB,UAAK,GAAiB,OAAO,CAAC;QAC9B,kBAAa,GAAG,EAAE,CAAC;IAkEjD,CAAC;IA7BU,MAAM;QACb,MAAM,WAAW,GACf,IAAI,CAAC,KAAK,KAAK,MAAM;YACnB,CAAC,CAAC,+BAAmB,CAAC,WAAW,CAAC,SAAS;YAC3C,CAAC,CAAC,+BAAmB,CAAC,WAAW,CAAC,WAAW,CAAC;QAElD,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;;;;UAcL,WAAW;;QAEb,IAAI,CAAC,aAAa;YAClB,CAAC,CAAC,IAAA,UAAI,EAAA,YAAY,IAAI,CAAC,aAAa;cAC9B,+BAAmB,CAAC,WAAW,CAAC,YAAY;eAC3C;YACP,CAAC,CAAC,IAAA,UAAI,EAAA,SAAS,+BAAmB,CAAC,WAAW,CAAC,YAAY,SAAS;KACvE,CAAC;IACJ,CAAC;;AAnEU,sCAAa;AAIR,oBAAM,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiC3B,AAjCqB,CAiCpB;AApC0B;IAA3B,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAA+B;AAC9B;IAA3B,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAoB;wBAFpC,aAAa;IADzB,IAAA,6BAAa,EAAC,gBAAgB,CAAC;GACnB,aAAa,CAoEzB"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Revocation Notice
|
|
4
|
+
*
|
|
5
|
+
* Clock-iconed footer block telling the user where they can revoke and that
|
|
6
|
+
* permissions auto-expire after N days of inactivity.
|
|
7
|
+
*
|
|
8
|
+
* @module components/consent-revocation-notice
|
|
9
|
+
*/
|
|
10
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
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;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ConsentRevocationNotice = void 0;
|
|
18
|
+
const lit_1 = require("lit");
|
|
19
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
20
|
+
const tokens_js_1 = require("../copy/tokens.js");
|
|
21
|
+
let ConsentRevocationNotice = class ConsentRevocationNotice extends lit_1.LitElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.revocationPath = "Account → Connected Agents";
|
|
25
|
+
this.orgName = "this site";
|
|
26
|
+
this.inactivityDays = 90;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
const revoke = (0, tokens_js_1.formatToken)(tokens_js_1.CONSENT_COPY_TOKENS.footer.revocationTemplate, {
|
|
30
|
+
RevocationPath: this.revocationPath,
|
|
31
|
+
Org: this.orgName,
|
|
32
|
+
});
|
|
33
|
+
const inactivity = (0, tokens_js_1.formatToken)(tokens_js_1.CONSENT_COPY_TOKENS.footer.inactivityTemplate, { Days: this.inactivityDays });
|
|
34
|
+
return (0, lit_1.html) `
|
|
35
|
+
<svg
|
|
36
|
+
class="icon"
|
|
37
|
+
viewBox="0 0 20 20"
|
|
38
|
+
fill="none"
|
|
39
|
+
stroke="currentColor"
|
|
40
|
+
stroke-width="1.6"
|
|
41
|
+
stroke-linecap="round"
|
|
42
|
+
stroke-linejoin="round"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
>
|
|
45
|
+
<circle cx="10" cy="10" r="7.5" />
|
|
46
|
+
<path d="M10 6v4l2.5 1.5" />
|
|
47
|
+
</svg>
|
|
48
|
+
<div class="content">
|
|
49
|
+
<span>${revoke}</span>
|
|
50
|
+
<span>${inactivity}</span>
|
|
51
|
+
</div>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.ConsentRevocationNotice = ConsentRevocationNotice;
|
|
56
|
+
ConsentRevocationNotice.styles = (0, lit_1.css) `
|
|
57
|
+
:host {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: flex-start;
|
|
60
|
+
gap: 10px;
|
|
61
|
+
padding: 12px 14px;
|
|
62
|
+
border-radius: 12px;
|
|
63
|
+
background: var(--cs-surface-inset, #F1ECE2);
|
|
64
|
+
color: var(--cs-text-secondary, #334155);
|
|
65
|
+
font-size: 12.5px;
|
|
66
|
+
line-height: 1.5;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon {
|
|
70
|
+
width: 16px;
|
|
71
|
+
height: 16px;
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
margin-top: 2px;
|
|
74
|
+
color: var(--cs-text-tertiary, #64748B);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.content {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: 4px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
em {
|
|
84
|
+
font-style: normal;
|
|
85
|
+
color: var(--cs-text-primary, #0F172A);
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, decorators_js_1.property)({ type: String })
|
|
91
|
+
], ConsentRevocationNotice.prototype, "revocationPath", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, decorators_js_1.property)({ type: String })
|
|
94
|
+
], ConsentRevocationNotice.prototype, "orgName", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, decorators_js_1.property)({ type: Number })
|
|
97
|
+
], ConsentRevocationNotice.prototype, "inactivityDays", void 0);
|
|
98
|
+
exports.ConsentRevocationNotice = ConsentRevocationNotice = __decorate([
|
|
99
|
+
(0, decorators_js_1.customElement)("consent-revocation-notice")
|
|
100
|
+
], ConsentRevocationNotice);
|
|
101
|
+
//# sourceMappingURL=consent-revocation-notice.js.map
|
|
@@ -0,0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,7 @@
|
|
|
8
8
|
* @module components
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.css = exports.html = exports.McpConsent = exports.ConsentOTPInput = exports.ConsentOAuthButton = exports.ConsentTerms = exports.ConsentPermissions = exports.ConsentShell = exports.ConsentInput = exports.ConsentCheckbox = exports.ConsentButton = void 0;
|
|
11
|
+
exports.css = exports.html = exports.ConsentCapabilitiesScreen = exports.ConsentRevocationNotice = exports.ConsentFooter = exports.ConsentActionBar = exports.ConsentCapabilityCard = exports.ConsentAgentHeader = exports.McpConsent = exports.ConsentOTPInput = exports.ConsentOAuthButton = exports.ConsentTerms = exports.ConsentPermissions = exports.ConsentShell = exports.ConsentInput = exports.ConsentCheckbox = exports.ConsentButton = void 0;
|
|
12
12
|
// Core Components (use .js extension for ESM browser compatibility)
|
|
13
13
|
var consent_button_js_1 = require("./consent-button.js");
|
|
14
14
|
Object.defineProperty(exports, "ConsentButton", { enumerable: true, get: function () { return consent_button_js_1.ConsentButton; } });
|
|
@@ -30,6 +30,19 @@ Object.defineProperty(exports, "ConsentOTPInput", { enumerable: true, get: funct
|
|
|
30
30
|
// Composite Component (Full Consent Flow)
|
|
31
31
|
var mcp_consent_js_1 = require("./mcp-consent.js");
|
|
32
32
|
Object.defineProperty(exports, "McpConsent", { enumerable: true, get: function () { return mcp_consent_js_1.McpConsent; } });
|
|
33
|
+
// New design-language components (consent + future-migrated gateway)
|
|
34
|
+
var consent_agent_header_js_1 = require("./consent-agent-header.js");
|
|
35
|
+
Object.defineProperty(exports, "ConsentAgentHeader", { enumerable: true, get: function () { return consent_agent_header_js_1.ConsentAgentHeader; } });
|
|
36
|
+
var consent_capability_card_js_1 = require("./consent-capability-card.js");
|
|
37
|
+
Object.defineProperty(exports, "ConsentCapabilityCard", { enumerable: true, get: function () { return consent_capability_card_js_1.ConsentCapabilityCard; } });
|
|
38
|
+
var consent_action_bar_js_1 = require("./consent-action-bar.js");
|
|
39
|
+
Object.defineProperty(exports, "ConsentActionBar", { enumerable: true, get: function () { return consent_action_bar_js_1.ConsentActionBar; } });
|
|
40
|
+
var consent_footer_js_1 = require("./consent-footer.js");
|
|
41
|
+
Object.defineProperty(exports, "ConsentFooter", { enumerable: true, get: function () { return consent_footer_js_1.ConsentFooter; } });
|
|
42
|
+
var consent_revocation_notice_js_1 = require("./consent-revocation-notice.js");
|
|
43
|
+
Object.defineProperty(exports, "ConsentRevocationNotice", { enumerable: true, get: function () { return consent_revocation_notice_js_1.ConsentRevocationNotice; } });
|
|
44
|
+
var consent_capabilities_screen_js_1 = require("./consent-capabilities-screen.js");
|
|
45
|
+
Object.defineProperty(exports, "ConsentCapabilitiesScreen", { enumerable: true, get: function () { return consent_capabilities_screen_js_1.ConsentCapabilitiesScreen; } });
|
|
33
46
|
// Re-export Lit utilities that consumers might need
|
|
34
47
|
var lit_1 = require("lit");
|
|
35
48
|
Object.defineProperty(exports, "html", { enumerable: true, get: function () { return lit_1.html; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,oEAAoE;AACpE,yDAAwE;AAA/D,kHAAA,aAAa,OAAA;AACtB,6DAAwD;AAA/C,sHAAA,eAAe,OAAA;AACxB,uDAAkE;AAAzD,gHAAA,YAAY,OAAA;AACrB,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AAErB,sBAAsB;AACtB,mEAGkC;AAFhC,4HAAA,kBAAkB,OAAA;AAGpB,uDAAkD;AAAzC,gHAAA,YAAY,OAAA;AACrB,qEAGmC;AAFjC,6HAAA,kBAAkB,OAAA;AAGpB,+DAAyD;AAAhD,uHAAA,eAAe,OAAA;AAExB,0CAA0C;AAC1C,mDAK0B;AAJxB,4GAAA,UAAU,OAAA;AAMZ,oDAAoD;AACpD,2BAAgC;AAAvB,2FAAA,IAAI,OAAA;AAAE,0FAAA,GAAG,OAAA"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