@kya-os/consent 0.5.2 → 0.5.3
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 +25 -8
- 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/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/approver-lockup.js +365 -0
- package/dist/cjs/components/approver-lockup.js.map +1 -0
- package/dist/cjs/components/consent-capabilities-screen.js +357 -97
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +35 -7
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/decision-icons.js +2 -0
- package/dist/cjs/components/decision-icons.js.map +1 -1
- package/dist/cjs/components/flow-blocks.js +26 -312
- package/dist/cjs/components/flow-blocks.js.map +1 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/copy/tokens.js +14 -1
- package/dist/cjs/copy/tokens.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 +1 -0
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/schemas/capabilities.schemas.js +1 -0
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -1
- package/dist/cjs/styles/theme.js +3 -0
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/components/approver-lockup.d.ts +73 -0
- package/dist/components/approver-lockup.d.ts.map +1 -0
- package/dist/components/approver-lockup.js +358 -0
- package/dist/components/approver-lockup.js.map +1 -0
- package/dist/components/consent-capabilities-screen.d.ts +88 -8
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +357 -97
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-headline.d.ts +15 -3
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +35 -7
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/decision-icons.d.ts +2 -0
- package/dist/components/decision-icons.d.ts.map +1 -1
- package/dist/components/decision-icons.js +2 -0
- package/dist/components/decision-icons.js.map +1 -1
- package/dist/components/flow-blocks.d.ts +0 -9
- package/dist/components/flow-blocks.d.ts.map +1 -1
- package/dist/components/flow-blocks.js +26 -309
- package/dist/components/flow-blocks.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/consent.js +899 -605
- package/dist/consent.min.js +620 -507
- package/dist/copy/tokens.d.ts +14 -1
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +14 -1
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/model.d.ts +1 -1
- package/dist/flow/schema.d.ts +12 -12
- 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 +3 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/schemas/api.schemas.d.ts +9 -0
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.d.ts +5 -0
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.js +1 -0
- package/dist/schemas/capabilities.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +14 -0
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/styles/theme.d.ts +5 -0
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +3 -0
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +20 -0
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/decision.types.d.ts +10 -2
- package/dist/types/decision.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/consent.js
CHANGED
|
@@ -3052,8 +3052,17 @@ var CONSENT_COPY_TOKENS = {
|
|
|
3052
3052
|
heading: "Unverified agent",
|
|
3053
3053
|
advice: "Allow only if you asked it to."
|
|
3054
3054
|
},
|
|
3055
|
-
/** The box naming who is signing in. */
|
|
3055
|
+
/** The box naming who is signing in, over the agent they authorize. */
|
|
3056
3056
|
approver: {
|
|
3057
|
+
/** Over the person's name. */
|
|
3058
|
+
label: "You are authorizing",
|
|
3059
|
+
/** Over the agent's name. */
|
|
3060
|
+
party: "To act for you",
|
|
3061
|
+
/** The sign-in mark's accessible name, with the host's `method`. */
|
|
3062
|
+
signedInWith: "Signed in with {Method}",
|
|
3063
|
+
/** The sign-in mark's accessible name, with no `method`. */
|
|
3064
|
+
signedInMark: "Signed in",
|
|
3065
|
+
/** @deprecated The box no longer draws it; kept for hosts that read it. */
|
|
3057
3066
|
signedIn: "Signed in as"
|
|
3058
3067
|
},
|
|
3059
3068
|
/** The box that says what the grant connects to and how it is bounded. */
|
|
@@ -3103,7 +3112,11 @@ var CONSENT_COPY_TOKENS = {
|
|
|
3103
3112
|
/** Disclosure title above the plain-language gloss. */
|
|
3104
3113
|
glossTitle: "What this allows",
|
|
3105
3114
|
/** Used in the gloss when no resource is extractable. */
|
|
3106
|
-
glossUnknownResource: "this deployment"
|
|
3115
|
+
glossUnknownResource: "this deployment",
|
|
3116
|
+
/** In a row that needs a check before it can be granted, beside the button that starts it. */
|
|
3117
|
+
checkRequired: "Requires verification",
|
|
3118
|
+
/** Under an unticked row, for a scope an earlier approval holds. `{Scope}` is drawn in code. */
|
|
3119
|
+
heldNotice: "{Scope} stays granted because of your earlier approval."
|
|
3107
3120
|
},
|
|
3108
3121
|
footer: {
|
|
3109
3122
|
/**
|
|
@@ -3723,7 +3736,7 @@ var editRegionStyles = i`
|
|
|
3723
3736
|
`;
|
|
3724
3737
|
|
|
3725
3738
|
// src/components/consent-headline.ts
|
|
3726
|
-
var PLACEHOLDER = /(\{Agent\}|\{Verb\})/;
|
|
3739
|
+
var PLACEHOLDER = /(\{Agent\}|\{Verb\}|\{Merchant\})/;
|
|
3727
3740
|
var DETAILS_WIDTH_PX = 304;
|
|
3728
3741
|
var DETAILS_GAP_PX = 8;
|
|
3729
3742
|
var DETAILS_GUTTER_PX = 16;
|
|
@@ -3739,6 +3752,8 @@ var ConsentHeadline = class extends i4 {
|
|
|
3739
3752
|
super(...arguments);
|
|
3740
3753
|
this.agentName = "";
|
|
3741
3754
|
this.verb = "";
|
|
3755
|
+
this.template = "";
|
|
3756
|
+
this.merchant = "";
|
|
3742
3757
|
this.description = "";
|
|
3743
3758
|
this.eyebrow = "";
|
|
3744
3759
|
this.preview = false;
|
|
@@ -3843,10 +3858,15 @@ var ConsentHeadline = class extends i4 {
|
|
|
3843
3858
|
headlinePieces() {
|
|
3844
3859
|
const tokens = CONSENT_COPY_TOKENS;
|
|
3845
3860
|
const verb = this.verb.trim();
|
|
3846
|
-
const
|
|
3861
|
+
const hasVerb = verb !== "" && verb !== "use";
|
|
3862
|
+
const merchant = this.merchant.trim();
|
|
3863
|
+
const own = this.template.trim();
|
|
3864
|
+
const template = own && (hasVerb || !own.includes("{Verb}")) && (merchant || !own.includes("{Merchant}")) ? own : hasVerb ? tokens.headline.template : tokens.headline.fallbackTemplate;
|
|
3847
3865
|
return template.split(PLACEHOLDER).map((piece) => {
|
|
3848
3866
|
if (piece === "{Agent}") return this.renderName();
|
|
3849
3867
|
if (piece === "{Verb}") return verb;
|
|
3868
|
+
if (piece === "{Merchant}")
|
|
3869
|
+
return b2`<em part="merchant-name">${merchant}</em>`;
|
|
3850
3870
|
return piece;
|
|
3851
3871
|
});
|
|
3852
3872
|
}
|
|
@@ -4118,6 +4138,12 @@ __decorateClass([
|
|
|
4118
4138
|
__decorateClass([
|
|
4119
4139
|
n4({ type: String })
|
|
4120
4140
|
], ConsentHeadline.prototype, "verb", 2);
|
|
4141
|
+
__decorateClass([
|
|
4142
|
+
n4({ type: String })
|
|
4143
|
+
], ConsentHeadline.prototype, "template", 2);
|
|
4144
|
+
__decorateClass([
|
|
4145
|
+
n4({ type: String })
|
|
4146
|
+
], ConsentHeadline.prototype, "merchant", 2);
|
|
4121
4147
|
__decorateClass([
|
|
4122
4148
|
n4({ type: String })
|
|
4123
4149
|
], ConsentHeadline.prototype, "description", 2);
|
|
@@ -5815,7 +5841,8 @@ var lightTheme = {
|
|
|
5815
5841
|
agentTileBg: FIXED_AGENT_TILE_BG,
|
|
5816
5842
|
agentTileBorder: FIXED_AGENT_TILE_BORDER,
|
|
5817
5843
|
agentTileText: FIXED_AGENT_TILE_TEXT,
|
|
5818
|
-
lockup: "#0810FE"
|
|
5844
|
+
lockup: "#0810FE",
|
|
5845
|
+
errorText: "#B42318"
|
|
5819
5846
|
};
|
|
5820
5847
|
var darkTheme = {
|
|
5821
5848
|
surfaceBg: "#0B0808",
|
|
@@ -5833,7 +5860,8 @@ var darkTheme = {
|
|
|
5833
5860
|
cardShadow: "0 40px 90px -40px rgba(0, 0, 0, 0.85)",
|
|
5834
5861
|
agentTileBg: FIXED_AGENT_TILE_BG,
|
|
5835
5862
|
agentTileBorder: FIXED_AGENT_TILE_BORDER,
|
|
5836
|
-
agentTileText: FIXED_AGENT_TILE_TEXT
|
|
5863
|
+
agentTileText: FIXED_AGENT_TILE_TEXT,
|
|
5864
|
+
errorText: "#FCA5A5"
|
|
5837
5865
|
};
|
|
5838
5866
|
function getConsentTheme(theme) {
|
|
5839
5867
|
return theme === "dark" ? darkTheme : lightTheme;
|
|
@@ -5896,7 +5924,8 @@ var DERIVED_TOKENS = {
|
|
|
5896
5924
|
mark: (token2) => token2("textPrimary"),
|
|
5897
5925
|
action: (token2) => token2("textPrimary"),
|
|
5898
5926
|
lockup: (token2) => token2("textPrimary"),
|
|
5899
|
-
warningText: (token2) => token2("textPrimary")
|
|
5927
|
+
warningText: (token2) => token2("textPrimary"),
|
|
5928
|
+
errorText: (token2) => token2("textPrimary")
|
|
5900
5929
|
};
|
|
5901
5930
|
var DERIVED_KEYS = Object.keys(DERIVED_TOKENS);
|
|
5902
5931
|
function themeTokenProperty(key) {
|
|
@@ -6287,6 +6316,140 @@ var CONSENT_CAPABILITIES_FEATURES = Object.freeze({
|
|
|
6287
6316
|
capabilitySlotPrefix: "capability-"
|
|
6288
6317
|
});
|
|
6289
6318
|
|
|
6319
|
+
// src/flow/copy.ts
|
|
6320
|
+
var FLOW_COPY = {
|
|
6321
|
+
eyebrow: {
|
|
6322
|
+
default: "Permission request",
|
|
6323
|
+
granted: "Permission granted",
|
|
6324
|
+
denied: "Permission declined"
|
|
6325
|
+
},
|
|
6326
|
+
headline: {
|
|
6327
|
+
"sign-in": "Sign in to let {Agent} {Verb} at {Merchant}.",
|
|
6328
|
+
default: "{Agent} would like to {Verb} at {Merchant} on your behalf",
|
|
6329
|
+
granted: "Access granted",
|
|
6330
|
+
denied: "No access given",
|
|
6331
|
+
error: "Something went wrong"
|
|
6332
|
+
},
|
|
6333
|
+
sub: {
|
|
6334
|
+
granted: "{Agent} can now {Verb} at {Merchant} for you.",
|
|
6335
|
+
denied: "{Agent} can't {Verb} for you. Nothing was approved.",
|
|
6336
|
+
error: "Nothing was approved. Try again, or ask {Agent} to start over."
|
|
6337
|
+
},
|
|
6338
|
+
signIn: {
|
|
6339
|
+
continueAs: "Continue as {First}",
|
|
6340
|
+
other: "Not you? Use another {Provider} account.",
|
|
6341
|
+
finePrint: "{Provider} confirms you control this account. {Merchant} does not get your mail, contacts or files."
|
|
6342
|
+
},
|
|
6343
|
+
approver: {
|
|
6344
|
+
label: "You are authorizing",
|
|
6345
|
+
labelGranted: "You authorized",
|
|
6346
|
+
labelDenied: "You declined",
|
|
6347
|
+
party: "To act for you",
|
|
6348
|
+
partyGranted: "Can now act for you",
|
|
6349
|
+
partyDenied: "Asked to act for you",
|
|
6350
|
+
confirmed: "Confirmed with passkey",
|
|
6351
|
+
signedInWith: "Signed in with {Provider}",
|
|
6352
|
+
declined: "Declined",
|
|
6353
|
+
unverified: "Unverified",
|
|
6354
|
+
unverifiedInfo: "It registered itself, so the name it gives is not checked. Allow only if you asked it to.",
|
|
6355
|
+
identifiedBy: "Identified by {Domain}"
|
|
6356
|
+
},
|
|
6357
|
+
capabilitiesHeader: "What {Agent} can do for you",
|
|
6358
|
+
tapToToggle: "Tap to toggle",
|
|
6359
|
+
seal: {
|
|
6360
|
+
"sign-in": "Sign in to continue",
|
|
6361
|
+
consent: "Waiting for your passkey",
|
|
6362
|
+
passkey: "Confirming with your passkey",
|
|
6363
|
+
cancelled: "Passkey not confirmed",
|
|
6364
|
+
granted: "Signed with your passkey",
|
|
6365
|
+
denied: "Nothing was signed",
|
|
6366
|
+
expired: "Request expired",
|
|
6367
|
+
error: "Something went wrong"
|
|
6368
|
+
},
|
|
6369
|
+
details: {
|
|
6370
|
+
title: "Permission details",
|
|
6371
|
+
connectsTo: "Connects to",
|
|
6372
|
+
duration: "Duration",
|
|
6373
|
+
budget: "Budget",
|
|
6374
|
+
amountLimits: "Amount limits",
|
|
6375
|
+
folders: "Folders",
|
|
6376
|
+
alreadyGranted: "Already granted"
|
|
6377
|
+
},
|
|
6378
|
+
actions: {
|
|
6379
|
+
approve: "Approve with passkey",
|
|
6380
|
+
deny: "Deny",
|
|
6381
|
+
confirming: "Confirming\u2026"
|
|
6382
|
+
},
|
|
6383
|
+
status: "Waiting for your passkey\u2026",
|
|
6384
|
+
notice: "Passkey not confirmed. Nothing was approved.",
|
|
6385
|
+
expired: "This request expired. Ask {Agent} to try again.",
|
|
6386
|
+
receipt: { until: "Until {When}" },
|
|
6387
|
+
goBack: "Go back to {Agent} and tell it to continue. Revoke anytime under Connected agents at {Merchant}.",
|
|
6388
|
+
retry: "Try again",
|
|
6389
|
+
terms: { agree: "I agree to the {Terms}" },
|
|
6390
|
+
legal: { label: "Legal" },
|
|
6391
|
+
announce: {
|
|
6392
|
+
"sign-in": "Sign in to continue.",
|
|
6393
|
+
consent: "Review what {Agent} is asking for.",
|
|
6394
|
+
passkey: "Waiting for your passkey.",
|
|
6395
|
+
granted: "Access granted.",
|
|
6396
|
+
denied: "No access given.",
|
|
6397
|
+
cancelled: "Passkey not confirmed. Nothing was approved.",
|
|
6398
|
+
expired: "This request expired.",
|
|
6399
|
+
error: "Something went wrong. Nothing was approved."
|
|
6400
|
+
}
|
|
6401
|
+
};
|
|
6402
|
+
var isGroup = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
6403
|
+
function flowCopy(...layers) {
|
|
6404
|
+
const out = { ...FLOW_COPY };
|
|
6405
|
+
for (const layer of layers) {
|
|
6406
|
+
for (const [key, value] of Object.entries(layer ?? {})) {
|
|
6407
|
+
const base = out[key];
|
|
6408
|
+
out[key] = isGroup(value) && isGroup(base) ? { ...base, ...value } : value;
|
|
6409
|
+
}
|
|
6410
|
+
}
|
|
6411
|
+
return out;
|
|
6412
|
+
}
|
|
6413
|
+
function token(copy, key, step) {
|
|
6414
|
+
const value = copy[key];
|
|
6415
|
+
if (typeof value === "string") return value;
|
|
6416
|
+
if (!isGroup(value)) return "";
|
|
6417
|
+
const entry = (step && value[step]) ?? value.default;
|
|
6418
|
+
return typeof entry === "string" ? entry : "";
|
|
6419
|
+
}
|
|
6420
|
+
function group(copy, key) {
|
|
6421
|
+
const value = copy[key];
|
|
6422
|
+
if (!isGroup(value)) return {};
|
|
6423
|
+
return Object.fromEntries(
|
|
6424
|
+
Object.entries(value).filter(
|
|
6425
|
+
(entry) => typeof entry[1] === "string"
|
|
6426
|
+
)
|
|
6427
|
+
);
|
|
6428
|
+
}
|
|
6429
|
+
function splitTemplate(template) {
|
|
6430
|
+
return template.split(/\{(\w+)\}/).map((part, i8) => i8 % 2 ? { name: part } : { text: part }).filter((part) => part.name || part.text);
|
|
6431
|
+
}
|
|
6432
|
+
function fillTemplate(template, values) {
|
|
6433
|
+
return splitTemplate(template).map((part) => part.name ? values[part.name] ?? "" : part.text).join("");
|
|
6434
|
+
}
|
|
6435
|
+
function initialsOf(name = "", identifier = "") {
|
|
6436
|
+
const first = (word) => Array.from(word.replace(/^[^\p{L}\p{N}]+/u, ""))[0] ?? "";
|
|
6437
|
+
const words = name.trim().split(/\s+/).filter((word) => /[\p{L}\p{N}]/u.test(word));
|
|
6438
|
+
if (words.length >= 2)
|
|
6439
|
+
return (first(words[0]) + first(words[words.length - 1])).toUpperCase();
|
|
6440
|
+
if (words.length === 1) return first(words[0]).toUpperCase();
|
|
6441
|
+
return (first(identifier) || "?").toUpperCase();
|
|
6442
|
+
}
|
|
6443
|
+
function httpsUrl(value) {
|
|
6444
|
+
const raw = typeof value === "string" ? value.trim() : "";
|
|
6445
|
+
if (!raw) return void 0;
|
|
6446
|
+
try {
|
|
6447
|
+
return new URL(raw).protocol === "https:" ? raw : void 0;
|
|
6448
|
+
} catch {
|
|
6449
|
+
return void 0;
|
|
6450
|
+
}
|
|
6451
|
+
}
|
|
6452
|
+
|
|
6290
6453
|
// src/components/decision-icons.ts
|
|
6291
6454
|
var PATHS = {
|
|
6292
6455
|
warning: w`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /><path d="M12 9v4" /><path d="M12 17h.01" />`,
|
|
@@ -6298,7 +6461,9 @@ var PATHS = {
|
|
|
6298
6461
|
alreadyGranted: w`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" /><path d="M12 7v5l4 2" />`,
|
|
6299
6462
|
info: w`<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />`,
|
|
6300
6463
|
minus: w`<path d="M5 12h14" />`,
|
|
6301
|
-
tick: w`<path d="M20 6 9 17l-5-5"
|
|
6464
|
+
tick: w`<path d="M20 6 9 17l-5-5" />`,
|
|
6465
|
+
shield: w`<path 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" /><path d="m9 12 2 2 4-4" />`,
|
|
6466
|
+
arrowRight: w`<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />`
|
|
6302
6467
|
};
|
|
6303
6468
|
function decisionIcon(name) {
|
|
6304
6469
|
return w`<svg
|
|
@@ -6312,86 +6477,406 @@ function decisionIcon(name) {
|
|
|
6312
6477
|
>${PATHS[name]}</svg>`;
|
|
6313
6478
|
}
|
|
6314
6479
|
|
|
6315
|
-
// src/components/
|
|
6316
|
-
function
|
|
6317
|
-
|
|
6318
|
-
const resource = details.resource?.trim() ?? "";
|
|
6319
|
-
const rows = [];
|
|
6320
|
-
if (name || resource) {
|
|
6321
|
-
rows.push({
|
|
6322
|
-
icon: "resource",
|
|
6323
|
-
label: copy.connectsTo,
|
|
6324
|
-
values: name ? [name] : [resource],
|
|
6325
|
-
...resource && name ? { note: resource } : {}
|
|
6326
|
-
});
|
|
6327
|
-
}
|
|
6328
|
-
const fact = (icon, label, given) => {
|
|
6329
|
-
const values = (given?.values ?? []).filter((value) => value.trim());
|
|
6330
|
-
const note = given?.note?.trim();
|
|
6331
|
-
if (values.length > 0 || note) {
|
|
6332
|
-
rows.push({ icon, label, values, ...note ? { note } : {} });
|
|
6333
|
-
}
|
|
6334
|
-
};
|
|
6335
|
-
fact("duration", copy.duration, details.duration);
|
|
6336
|
-
if (details.budget?.trim()) {
|
|
6337
|
-
rows.push({
|
|
6338
|
-
icon: "budget",
|
|
6339
|
-
label: copy.budget,
|
|
6340
|
-
values: [details.budget.trim()]
|
|
6341
|
-
});
|
|
6342
|
-
}
|
|
6343
|
-
fact("amountLimits", copy.amountLimits, details.amountLimits);
|
|
6344
|
-
fact("alreadyGranted", copy.alreadyGranted, details.alreadyGranted);
|
|
6345
|
-
return rows;
|
|
6480
|
+
// src/components/approver-lockup.ts
|
|
6481
|
+
function breakable(value) {
|
|
6482
|
+
return value.split(/(?=[@.])/).map((piece, i8) => i8 ? b2`<wbr />${piece}` : piece);
|
|
6346
6483
|
}
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
<dt class="small">${row.label}</dt>
|
|
6361
|
-
${row.values.map(
|
|
6362
|
-
(value) => b2`<dd class="value">${value}</dd>`
|
|
6363
|
-
)}
|
|
6364
|
-
${row.note ? b2`<dd class="note small">${row.note}</dd>` : A}
|
|
6365
|
-
</div>
|
|
6366
|
-
</div>`
|
|
6367
|
-
)}
|
|
6368
|
-
</dl>
|
|
6369
|
-
</section>`;
|
|
6484
|
+
var hide = (event) => {
|
|
6485
|
+
event.target.hidden = true;
|
|
6486
|
+
};
|
|
6487
|
+
var show = (event) => {
|
|
6488
|
+
event.target.hidden = false;
|
|
6489
|
+
};
|
|
6490
|
+
function face(name, identifier = "", avatarUrl = "", size = "md") {
|
|
6491
|
+
const initials = initialsOf(name, identifier);
|
|
6492
|
+
return b2`<span
|
|
6493
|
+
class="face ${size} ${initials.length > 1 ? "two" : ""}"
|
|
6494
|
+
aria-hidden="true"
|
|
6495
|
+
>${initials}${avatarUrl ? b2`<img src=${avatarUrl} alt="" @error=${hide} @load=${show} />` : A}</span
|
|
6496
|
+
>`;
|
|
6370
6497
|
}
|
|
6371
|
-
|
|
6372
|
-
.
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6498
|
+
function agentTile(agent) {
|
|
6499
|
+
const initial = initialsOf(agent.name).slice(0, 1);
|
|
6500
|
+
return b2`<span class="tile" aria-hidden="true"
|
|
6501
|
+
>${initial}${agent.logoUrl ? b2`<img src=${agent.logoUrl} alt="" @error=${hide} @load=${show} />` : A}</span
|
|
6502
|
+
>`;
|
|
6503
|
+
}
|
|
6504
|
+
function personRow(person) {
|
|
6505
|
+
return b2`<div class="lockup-row">
|
|
6506
|
+
${face(person.name, person.identifier, person.avatarUrl)}
|
|
6507
|
+
<div class="lockup-text">
|
|
6508
|
+
<span class="lockup-label">${person.label}</span>
|
|
6509
|
+
<span class="lockup-name">${breakable(person.name)}</span>
|
|
6510
|
+
${person.detail ? b2`<span class="small">${breakable(person.detail)}</span>` : A}
|
|
6511
|
+
</div>
|
|
6512
|
+
<span
|
|
6513
|
+
class="lockup-mark ${person.declined ? "declined" : ""}"
|
|
6514
|
+
role="img"
|
|
6515
|
+
aria-label=${person.mark}
|
|
6516
|
+
title=${person.mark}
|
|
6517
|
+
>${decisionIcon(person.declined ? "minus" : "check")}</span
|
|
6518
|
+
>
|
|
6519
|
+
</div>`;
|
|
6520
|
+
}
|
|
6521
|
+
function checkRow(check) {
|
|
6522
|
+
return b2`<div class="lockup-row lockup-check" part="approver-check">
|
|
6523
|
+
<span class="lockup-check-icon" aria-hidden="true"
|
|
6524
|
+
>${decisionIcon("check")}</span
|
|
6525
|
+
>
|
|
6526
|
+
<div class="lockup-text">
|
|
6527
|
+
<span class="value">${check.label}</span>
|
|
6528
|
+
${check.summary ? b2`<span>${check.summary}</span>` : A}
|
|
6529
|
+
${check.source ? b2`<span class="small">${check.source}</span>` : A}
|
|
6530
|
+
</div>
|
|
6531
|
+
</div>`;
|
|
6532
|
+
}
|
|
6533
|
+
function agentRow(agent) {
|
|
6534
|
+
return b2`<div class="lockup-row party" part="approver-agent">
|
|
6535
|
+
${agentTile(agent)}
|
|
6536
|
+
<div class="lockup-text">
|
|
6537
|
+
<span class="small">${agent.label}</span>
|
|
6538
|
+
<span class="value">${breakable(agent.name)}</span>
|
|
6539
|
+
</div>
|
|
6540
|
+
${agent.status ? b2`<span
|
|
6541
|
+
class="party-status ${agent.unverified ? "unverified" : ""}"
|
|
6542
|
+
part="agent-status"
|
|
6543
|
+
>${breakable(agent.status)}${agent.info ? b2`<button
|
|
6544
|
+
type="button"
|
|
6545
|
+
class="info"
|
|
6546
|
+
aria-label=${agent.status}
|
|
6547
|
+
aria-describedby="agent-status-info"
|
|
6548
|
+
>
|
|
6549
|
+
${decisionIcon("info")}</button
|
|
6550
|
+
><span class="tip" id="agent-status-info" role="tooltip"
|
|
6551
|
+
>${agent.info}</span
|
|
6552
|
+
>` : A}</span
|
|
6553
|
+
>` : A}
|
|
6554
|
+
</div>`;
|
|
6555
|
+
}
|
|
6556
|
+
function approverLockup(view) {
|
|
6557
|
+
return b2`<div class="tinted lockup" part="approver">
|
|
6558
|
+
${view.person ? personRow(view.person) : A}
|
|
6559
|
+
${(view.checks ?? []).map(checkRow)}
|
|
6560
|
+
${view.agent ? agentRow(view.agent) : A}
|
|
6561
|
+
</div>`;
|
|
6562
|
+
}
|
|
6563
|
+
var approverLockupStyles = i`
|
|
6564
|
+
/* Names break only where a word can't fit, and an address at its "@" and
|
|
6565
|
+
dots first (breakable). */
|
|
6566
|
+
.lockup {
|
|
6386
6567
|
display: flex;
|
|
6387
6568
|
flex-direction: column;
|
|
6388
6569
|
gap: 12px;
|
|
6389
|
-
|
|
6570
|
+
padding: 16px 18px;
|
|
6571
|
+
container-type: inline-size;
|
|
6390
6572
|
}
|
|
6391
6573
|
|
|
6392
|
-
.
|
|
6574
|
+
.lockup-row {
|
|
6393
6575
|
display: flex;
|
|
6394
|
-
align-items:
|
|
6576
|
+
align-items: center;
|
|
6577
|
+
gap: 12px;
|
|
6578
|
+
min-width: 0;
|
|
6579
|
+
}
|
|
6580
|
+
|
|
6581
|
+
.lockup-row.party,
|
|
6582
|
+
.lockup-check:not(:first-child) {
|
|
6583
|
+
padding-top: 12px;
|
|
6584
|
+
border-top: 1px solid var(--cs-tint-line);
|
|
6585
|
+
}
|
|
6586
|
+
|
|
6587
|
+
.lockup-check {
|
|
6588
|
+
align-items: flex-start;
|
|
6589
|
+
font-size: 14px;
|
|
6590
|
+
line-height: 1.45;
|
|
6591
|
+
}
|
|
6592
|
+
|
|
6593
|
+
.lockup-text {
|
|
6594
|
+
display: flex;
|
|
6595
|
+
flex: 1;
|
|
6596
|
+
flex-direction: column;
|
|
6597
|
+
gap: 2px;
|
|
6598
|
+
min-width: 0;
|
|
6599
|
+
}
|
|
6600
|
+
|
|
6601
|
+
.lockup-label {
|
|
6602
|
+
font-size: 10px;
|
|
6603
|
+
letter-spacing: 0.16em;
|
|
6604
|
+
font-weight: 600;
|
|
6605
|
+
text-transform: uppercase;
|
|
6606
|
+
color: var(--cs-text-tertiary);
|
|
6607
|
+
}
|
|
6608
|
+
|
|
6609
|
+
.lockup-name {
|
|
6610
|
+
font-size: 20px;
|
|
6611
|
+
font-weight: 600;
|
|
6612
|
+
line-height: 1.2;
|
|
6613
|
+
overflow-wrap: break-word;
|
|
6614
|
+
}
|
|
6615
|
+
|
|
6616
|
+
.lockup-text .value {
|
|
6617
|
+
font-weight: 500;
|
|
6618
|
+
overflow-wrap: break-word;
|
|
6619
|
+
}
|
|
6620
|
+
|
|
6621
|
+
.lockup-mark {
|
|
6622
|
+
display: grid;
|
|
6623
|
+
flex-shrink: 0;
|
|
6624
|
+
color: var(--cs-wallet-success, var(--cs-mark));
|
|
6625
|
+
}
|
|
6626
|
+
|
|
6627
|
+
.lockup-mark.declined {
|
|
6628
|
+
color: var(--cs-text-tertiary);
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6631
|
+
.lockup-mark svg {
|
|
6632
|
+
width: 22px;
|
|
6633
|
+
height: 22px;
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
/* A check's mark sits in the face's column, so its words line up with the name. */
|
|
6637
|
+
.lockup-check-icon {
|
|
6638
|
+
display: grid;
|
|
6639
|
+
place-items: center;
|
|
6640
|
+
flex-shrink: 0;
|
|
6641
|
+
width: 42px;
|
|
6642
|
+
color: var(--cs-mark);
|
|
6643
|
+
}
|
|
6644
|
+
|
|
6645
|
+
.lockup-check-icon svg {
|
|
6646
|
+
width: 20px;
|
|
6647
|
+
height: 20px;
|
|
6648
|
+
}
|
|
6649
|
+
|
|
6650
|
+
.face,
|
|
6651
|
+
.tile {
|
|
6652
|
+
position: relative;
|
|
6653
|
+
display: grid;
|
|
6654
|
+
place-items: center;
|
|
6655
|
+
flex-shrink: 0;
|
|
6656
|
+
width: 42px;
|
|
6657
|
+
height: 42px;
|
|
6658
|
+
overflow: hidden;
|
|
6659
|
+
font-weight: 600;
|
|
6660
|
+
}
|
|
6661
|
+
|
|
6662
|
+
.face {
|
|
6663
|
+
border-radius: 50%;
|
|
6664
|
+
background: var(--cs-surface-accent);
|
|
6665
|
+
color: var(--cs-surface-accent-text);
|
|
6666
|
+
font-size: 17px;
|
|
6667
|
+
}
|
|
6668
|
+
|
|
6669
|
+
.face.two {
|
|
6670
|
+
font-size: 15px;
|
|
6671
|
+
letter-spacing: 0.02em;
|
|
6672
|
+
}
|
|
6673
|
+
|
|
6674
|
+
.face.sm {
|
|
6675
|
+
width: 32px;
|
|
6676
|
+
height: 32px;
|
|
6677
|
+
font-size: 13px;
|
|
6678
|
+
}
|
|
6679
|
+
|
|
6680
|
+
.face img {
|
|
6681
|
+
position: absolute;
|
|
6682
|
+
inset: 0;
|
|
6683
|
+
width: 100%;
|
|
6684
|
+
height: 100%;
|
|
6685
|
+
object-fit: cover;
|
|
6686
|
+
}
|
|
6687
|
+
|
|
6688
|
+
.tile {
|
|
6689
|
+
border-radius: var(--cs-tile-radius, 10px);
|
|
6690
|
+
border: 1px solid var(--cs-agent-tile-border, rgba(15, 23, 42, 0.16));
|
|
6691
|
+
background: var(--cs-surface-accent);
|
|
6692
|
+
color: var(--cs-surface-accent-text);
|
|
6693
|
+
font-size: 18px;
|
|
6694
|
+
}
|
|
6695
|
+
|
|
6696
|
+
.tile img {
|
|
6697
|
+
position: absolute;
|
|
6698
|
+
inset: 0;
|
|
6699
|
+
width: 100%;
|
|
6700
|
+
height: 100%;
|
|
6701
|
+
padding: 4px;
|
|
6702
|
+
box-sizing: border-box;
|
|
6703
|
+
object-fit: contain;
|
|
6704
|
+
background: var(--cs-agent-tile-bg, #ffffff);
|
|
6705
|
+
}
|
|
6706
|
+
|
|
6707
|
+
.party-status {
|
|
6708
|
+
position: relative;
|
|
6709
|
+
display: inline-flex;
|
|
6710
|
+
align-items: center;
|
|
6711
|
+
gap: 4px;
|
|
6712
|
+
flex-shrink: 0;
|
|
6713
|
+
font-size: 13px;
|
|
6714
|
+
font-weight: 500;
|
|
6715
|
+
color: var(--cs-text-secondary);
|
|
6716
|
+
}
|
|
6717
|
+
|
|
6718
|
+
.party-status.unverified {
|
|
6719
|
+
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
6720
|
+
}
|
|
6721
|
+
|
|
6722
|
+
/* A phone-width card: smaller faces and padding, and the agent's status
|
|
6723
|
+
under its name, so the names keep their width. */
|
|
6724
|
+
@container (max-width: 300px) {
|
|
6725
|
+
.lockup-row {
|
|
6726
|
+
gap: 10px;
|
|
6727
|
+
}
|
|
6728
|
+
|
|
6729
|
+
.lockup-row.party {
|
|
6730
|
+
flex-wrap: wrap;
|
|
6731
|
+
}
|
|
6732
|
+
|
|
6733
|
+
.face,
|
|
6734
|
+
.tile {
|
|
6735
|
+
width: 36px;
|
|
6736
|
+
height: 36px;
|
|
6737
|
+
}
|
|
6738
|
+
|
|
6739
|
+
.lockup-check-icon {
|
|
6740
|
+
width: 36px;
|
|
6741
|
+
}
|
|
6742
|
+
|
|
6743
|
+
.party-status {
|
|
6744
|
+
flex-basis: 100%;
|
|
6745
|
+
flex-shrink: 1;
|
|
6746
|
+
min-width: 0;
|
|
6747
|
+
padding-left: 46px;
|
|
6748
|
+
overflow-wrap: break-word;
|
|
6749
|
+
}
|
|
6750
|
+
}
|
|
6751
|
+
|
|
6752
|
+
.info {
|
|
6753
|
+
display: inline-grid;
|
|
6754
|
+
place-items: center;
|
|
6755
|
+
width: 22px;
|
|
6756
|
+
height: 22px;
|
|
6757
|
+
padding: 0;
|
|
6758
|
+
border: 0;
|
|
6759
|
+
border-radius: 50%;
|
|
6760
|
+
background: none;
|
|
6761
|
+
color: var(--cs-text-tertiary);
|
|
6762
|
+
cursor: help;
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
.info svg {
|
|
6766
|
+
width: 16px;
|
|
6767
|
+
height: 16px;
|
|
6768
|
+
}
|
|
6769
|
+
|
|
6770
|
+
.info:focus-visible {
|
|
6771
|
+
outline: 2px solid var(--cs-focus-ring, currentColor);
|
|
6772
|
+
outline-offset: 1px;
|
|
6773
|
+
}
|
|
6774
|
+
|
|
6775
|
+
.tip {
|
|
6776
|
+
position: absolute;
|
|
6777
|
+
top: calc(100% + 8px);
|
|
6778
|
+
right: -6px;
|
|
6779
|
+
z-index: 5;
|
|
6780
|
+
width: 240px;
|
|
6781
|
+
padding: 8px 10px;
|
|
6782
|
+
border-radius: 8px;
|
|
6783
|
+
background: var(--cs-text-primary);
|
|
6784
|
+
color: var(--cs-surface-card);
|
|
6785
|
+
font-size: 12px;
|
|
6786
|
+
font-weight: 400;
|
|
6787
|
+
line-height: 1.45;
|
|
6788
|
+
text-align: left;
|
|
6789
|
+
opacity: 0;
|
|
6790
|
+
visibility: hidden;
|
|
6791
|
+
}
|
|
6792
|
+
|
|
6793
|
+
.party-status:hover .tip,
|
|
6794
|
+
.info:focus-visible + .tip {
|
|
6795
|
+
opacity: 1;
|
|
6796
|
+
visibility: visible;
|
|
6797
|
+
}
|
|
6798
|
+
`;
|
|
6799
|
+
|
|
6800
|
+
// src/components/grant-details.ts
|
|
6801
|
+
function grantDetailRows(details, name) {
|
|
6802
|
+
const copy = CONSENT_COPY_TOKENS.grantDetails;
|
|
6803
|
+
const resource = details.resource?.trim() ?? "";
|
|
6804
|
+
const rows = [];
|
|
6805
|
+
if (name || resource) {
|
|
6806
|
+
rows.push({
|
|
6807
|
+
icon: "resource",
|
|
6808
|
+
label: copy.connectsTo,
|
|
6809
|
+
values: name ? [name] : [resource],
|
|
6810
|
+
...resource && name ? { note: resource } : {}
|
|
6811
|
+
});
|
|
6812
|
+
}
|
|
6813
|
+
const fact = (icon, label, given) => {
|
|
6814
|
+
const values = (given?.values ?? []).filter((value) => value.trim());
|
|
6815
|
+
const note = given?.note?.trim();
|
|
6816
|
+
if (values.length > 0 || note) {
|
|
6817
|
+
rows.push({ icon, label, values, ...note ? { note } : {} });
|
|
6818
|
+
}
|
|
6819
|
+
};
|
|
6820
|
+
fact("duration", copy.duration, details.duration);
|
|
6821
|
+
if (details.budget?.trim()) {
|
|
6822
|
+
rows.push({
|
|
6823
|
+
icon: "budget",
|
|
6824
|
+
label: copy.budget,
|
|
6825
|
+
values: [details.budget.trim()]
|
|
6826
|
+
});
|
|
6827
|
+
}
|
|
6828
|
+
fact("amountLimits", copy.amountLimits, details.amountLimits);
|
|
6829
|
+
fact("alreadyGranted", copy.alreadyGranted, details.alreadyGranted);
|
|
6830
|
+
return rows;
|
|
6831
|
+
}
|
|
6832
|
+
function grantDetailsSection(rows, heading = CONSENT_COPY_TOKENS.grantDetails.heading) {
|
|
6833
|
+
if (rows.length === 0) return A;
|
|
6834
|
+
return b2`<section
|
|
6835
|
+
class="grant-details tinted"
|
|
6836
|
+
part="grant-details"
|
|
6837
|
+
aria-labelledby="grant-details-heading"
|
|
6838
|
+
>
|
|
6839
|
+
<h2 id="grant-details-heading">${heading}</h2>
|
|
6840
|
+
<dl>
|
|
6841
|
+
${rows.map(
|
|
6842
|
+
(row) => b2`<div class="fact">
|
|
6843
|
+
<span class="fact-icon">${decisionIcon(row.icon)}</span>
|
|
6844
|
+
<div class="fact-text">
|
|
6845
|
+
<dt class="small">${row.label}</dt>
|
|
6846
|
+
${row.values.map(
|
|
6847
|
+
(value) => b2`<dd class="value">${value}</dd>`
|
|
6848
|
+
)}
|
|
6849
|
+
${row.note ? b2`<dd class="note small">${row.note}</dd>` : A}
|
|
6850
|
+
</div>
|
|
6851
|
+
</div>`
|
|
6852
|
+
)}
|
|
6853
|
+
</dl>
|
|
6854
|
+
</section>`;
|
|
6855
|
+
}
|
|
6856
|
+
var grantDetailStyles = i`
|
|
6857
|
+
.grant-details {
|
|
6858
|
+
margin-top: 16px;
|
|
6859
|
+
padding: 16px;
|
|
6860
|
+
font-size: 14px;
|
|
6861
|
+
line-height: 1.45;
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
.grant-details h2 {
|
|
6865
|
+
margin: 0 0 12px;
|
|
6866
|
+
font-size: 14px;
|
|
6867
|
+
font-weight: 600;
|
|
6868
|
+
}
|
|
6869
|
+
|
|
6870
|
+
.grant-details dl {
|
|
6871
|
+
display: flex;
|
|
6872
|
+
flex-direction: column;
|
|
6873
|
+
gap: 12px;
|
|
6874
|
+
margin: 0;
|
|
6875
|
+
}
|
|
6876
|
+
|
|
6877
|
+
.fact {
|
|
6878
|
+
display: flex;
|
|
6879
|
+
align-items: flex-start;
|
|
6395
6880
|
gap: 12px;
|
|
6396
6881
|
}
|
|
6397
6882
|
|
|
@@ -7134,10 +7619,15 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7134
7619
|
this.fixedExpiry = false;
|
|
7135
7620
|
this.theme = "light";
|
|
7136
7621
|
this.howItWorksUrl = "";
|
|
7622
|
+
this.error = "";
|
|
7137
7623
|
this.loading = false;
|
|
7138
7624
|
this.disabled = false;
|
|
7625
|
+
this.eyebrow = "";
|
|
7626
|
+
this.headline = "";
|
|
7627
|
+
this.infoNote = "";
|
|
7139
7628
|
this.description = "";
|
|
7140
7629
|
this.submitLabel = "";
|
|
7630
|
+
this.heldScopes = [];
|
|
7141
7631
|
this.showIcons = false;
|
|
7142
7632
|
this.hideRisk = false;
|
|
7143
7633
|
this.hideScopes = false;
|
|
@@ -7174,20 +7664,8 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7174
7664
|
};
|
|
7175
7665
|
this.onAllow = () => {
|
|
7176
7666
|
if (this.preview || this.loading || this.approvalDisabled) return;
|
|
7177
|
-
const
|
|
7178
|
-
|
|
7179
|
-
);
|
|
7180
|
-
if (selectedCapabilities.length === 0) return;
|
|
7181
|
-
const selectedIds = selectedCapabilities.map((c6) => c6.id);
|
|
7182
|
-
const selectedScopes = Array.from(
|
|
7183
|
-
new Set(selectedCapabilities.flatMap((c6) => c6.scopes))
|
|
7184
|
-
);
|
|
7185
|
-
const terms = this.slottedTerms;
|
|
7186
|
-
const detail = {
|
|
7187
|
-
selectedCapabilityIds: selectedIds,
|
|
7188
|
-
selectedScopes,
|
|
7189
|
-
...terms.length > 0 ? { grantTerms: mergeGrantTerms(...terms.map((t8) => t8.grantTerms)) } : {}
|
|
7190
|
-
};
|
|
7667
|
+
const detail = this.approvalDetail(this.selected);
|
|
7668
|
+
if (!detail) return;
|
|
7191
7669
|
this.dispatchEvent(
|
|
7192
7670
|
new CustomEvent("capabilities-allow", {
|
|
7193
7671
|
detail,
|
|
@@ -7214,6 +7692,11 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7214
7692
|
super.connectedCallback();
|
|
7215
7693
|
this.seedDefaults();
|
|
7216
7694
|
}
|
|
7695
|
+
updated(changed) {
|
|
7696
|
+
if (changed.has("error") && this.error) {
|
|
7697
|
+
this.renderRoot.querySelector(".error")?.scrollIntoView?.({ block: "nearest" });
|
|
7698
|
+
}
|
|
7699
|
+
}
|
|
7217
7700
|
willUpdate(changed) {
|
|
7218
7701
|
if (changed.has("capabilities") || changed.has("allSelected")) {
|
|
7219
7702
|
this.seedDefaults();
|
|
@@ -7258,6 +7741,39 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7258
7741
|
(capability2) => !this.selected.has(capability2.id)
|
|
7259
7742
|
);
|
|
7260
7743
|
}
|
|
7744
|
+
/** What approving `selected` sends: its rows, their scopes and any grant terms. */
|
|
7745
|
+
approvalDetail(selected) {
|
|
7746
|
+
const selectedCapabilities = this.capabilities.filter(
|
|
7747
|
+
(c6) => selected.has(c6.id)
|
|
7748
|
+
);
|
|
7749
|
+
if (selectedCapabilities.length === 0) return null;
|
|
7750
|
+
const terms = this.slottedTerms;
|
|
7751
|
+
return {
|
|
7752
|
+
selectedCapabilityIds: selectedCapabilities.map((c6) => c6.id),
|
|
7753
|
+
selectedScopes: Array.from(
|
|
7754
|
+
new Set(selectedCapabilities.flatMap((c6) => c6.scopes))
|
|
7755
|
+
),
|
|
7756
|
+
...terms.length > 0 ? { grantTerms: mergeGrantTerms(...terms.map((t8) => t8.grantTerms)) } : {}
|
|
7757
|
+
};
|
|
7758
|
+
}
|
|
7759
|
+
/** A row's check can't start while the screen is busy or its terms can't be used. */
|
|
7760
|
+
get checkDisabled() {
|
|
7761
|
+
return this.loading || this.disabled || this.slottedTerms.some((terms) => terms.valid === false);
|
|
7762
|
+
}
|
|
7763
|
+
onCheck(capability2) {
|
|
7764
|
+
if (this.preview || this.checkDisabled) return;
|
|
7765
|
+
const approval = this.approvalDetail(
|
|
7766
|
+
/* @__PURE__ */ new Set([...this.selected, capability2.id])
|
|
7767
|
+
);
|
|
7768
|
+
if (!approval) return;
|
|
7769
|
+
this.dispatchEvent(
|
|
7770
|
+
new CustomEvent("capability-check", {
|
|
7771
|
+
detail: { ...approval, capabilityId: capability2.id },
|
|
7772
|
+
bubbles: true,
|
|
7773
|
+
composed: true
|
|
7774
|
+
})
|
|
7775
|
+
);
|
|
7776
|
+
}
|
|
7261
7777
|
compileCapabilityCedar(capability2) {
|
|
7262
7778
|
const cedar = capability2.cedar?.trim() || "";
|
|
7263
7779
|
if (!cedar) return "";
|
|
@@ -7288,6 +7804,8 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7288
7804
|
const agent = this.resolveAgent();
|
|
7289
7805
|
const editing = isEditing(this);
|
|
7290
7806
|
const agentName = agent?.name || "this agent";
|
|
7807
|
+
const approver2 = this.renderApprover(agent);
|
|
7808
|
+
const warning = approver2 !== A && agent?.name ? A : this.renderUnverified(agent);
|
|
7291
7809
|
return b2`
|
|
7292
7810
|
<style>
|
|
7293
7811
|
${this.hostStyle()}
|
|
@@ -7308,20 +7826,26 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7308
7826
|
></consent-connector-header>
|
|
7309
7827
|
<div class="card" part="card">
|
|
7310
7828
|
<consent-headline
|
|
7311
|
-
exportparts="eyebrow, headline, agent-name, subhead, agent-details"
|
|
7829
|
+
exportparts="eyebrow, headline, agent-name, merchant-name, subhead, agent-details"
|
|
7312
7830
|
agent-name="${agent?.name ?? ""}"
|
|
7313
7831
|
.agent=${agent}
|
|
7314
7832
|
verb="${this.headlineVerb}"
|
|
7833
|
+
eyebrow="${this.eyebrow}"
|
|
7834
|
+
template="${this.headline}"
|
|
7835
|
+
merchant="${this.orgName}"
|
|
7315
7836
|
description="${this.description}"
|
|
7316
7837
|
?preview=${this.preview}
|
|
7317
7838
|
?editable=${editing}
|
|
7318
7839
|
.editSource=${this.editSource}
|
|
7319
7840
|
><slot name="headline" slot="headline"></slot
|
|
7320
7841
|
></consent-headline>
|
|
7842
|
+
${this.error ? b2`<p class="error" part="error" role="alert">
|
|
7843
|
+
${decisionIcon("warning")}<span>${this.error}</span>
|
|
7844
|
+
</p>` : A}
|
|
7321
7845
|
<slot name="recovery"></slot>
|
|
7322
|
-
${
|
|
7846
|
+
${warning}
|
|
7323
7847
|
<slot name="identity"></slot>
|
|
7324
|
-
${
|
|
7848
|
+
${approver2}
|
|
7325
7849
|
<slot name="agent-key"></slot>
|
|
7326
7850
|
<div part="permissions">
|
|
7327
7851
|
${this.renderSectionHeader(agentName, editing)}
|
|
@@ -7345,7 +7869,7 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7345
7869
|
?editable=${editing}
|
|
7346
7870
|
.editSource=${this.editSource}
|
|
7347
7871
|
exportparts=${CAPABILITY_ROW_EXPORT_PARTS}
|
|
7348
|
-
|
|
7872
|
+
>${capability2.check ? this.renderCheck(capability2, capability2.check.action) : A}${this.renderHeld(capability2)}<slot
|
|
7349
7873
|
name=${capabilitySlotName(capability2.id)}
|
|
7350
7874
|
slot="extra"
|
|
7351
7875
|
></slot
|
|
@@ -7356,7 +7880,7 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7356
7880
|
</div>
|
|
7357
7881
|
<slot name="auth"></slot>
|
|
7358
7882
|
<slot name="details"></slot>
|
|
7359
|
-
${this.renderGrantDetails(editing)}
|
|
7883
|
+
${this.renderGrantDetails(editing)} ${this.renderInfoNote(agentName)}
|
|
7360
7884
|
<slot name="notice"
|
|
7361
7885
|
>${this.grantDetails ? A : b2`<consent-revocation-notice
|
|
7362
7886
|
revocationPath="${this.revocationPath}"
|
|
@@ -7407,11 +7931,65 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7407
7931
|
>` : A}
|
|
7408
7932
|
</div>`;
|
|
7409
7933
|
}
|
|
7934
|
+
/**
|
|
7935
|
+
* "Requires verification" and the button that starts a row's check. It is
|
|
7936
|
+
* in the row's `extra` slot, whose clicks the row leaves alone.
|
|
7937
|
+
*/
|
|
7938
|
+
renderCheck(capability2, action) {
|
|
7939
|
+
return b2`<div
|
|
7940
|
+
slot="extra"
|
|
7941
|
+
class="row-check tinted"
|
|
7942
|
+
part="capability-verify"
|
|
7943
|
+
data-capability-check=${capability2.id}
|
|
7944
|
+
>
|
|
7945
|
+
<span class="row-check-label" part="capability-verify-label"
|
|
7946
|
+
>${decisionIcon("shield")}${CONSENT_COPY_TOKENS.capabilityRow.checkRequired}</span
|
|
7947
|
+
>
|
|
7948
|
+
<button
|
|
7949
|
+
type="button"
|
|
7950
|
+
class="row-check-action"
|
|
7951
|
+
part="capability-verify-action"
|
|
7952
|
+
?disabled=${this.checkDisabled}
|
|
7953
|
+
@click=${() => this.onCheck(capability2)}
|
|
7954
|
+
>
|
|
7955
|
+
<span>${action}</span>${decisionIcon("arrowRight")}
|
|
7956
|
+
</button>
|
|
7957
|
+
</div>`;
|
|
7958
|
+
}
|
|
7959
|
+
/**
|
|
7960
|
+
* "<scope> stays granted because of your earlier approval." under an
|
|
7961
|
+
* unticked row, for each scope of it that an earlier approval holds. The
|
|
7962
|
+
* live region stays while the row is ticked, so the words are announced as
|
|
7963
|
+
* they appear.
|
|
7964
|
+
*/
|
|
7965
|
+
renderHeld(capability2) {
|
|
7966
|
+
const held = new Set(this.heldScopes);
|
|
7967
|
+
const scopes = [...new Set(capability2.scopes ?? [])].filter(
|
|
7968
|
+
(scope) => held.has(scope)
|
|
7969
|
+
);
|
|
7970
|
+
if (scopes.length === 0) return A;
|
|
7971
|
+
const unticked = !this.selected.has(capability2.id);
|
|
7972
|
+
const words = splitTemplate(CONSENT_COPY_TOKENS.capabilityRow.heldNotice);
|
|
7973
|
+
return b2`<div
|
|
7974
|
+
slot="extra"
|
|
7975
|
+
class="held"
|
|
7976
|
+
part="capability-held"
|
|
7977
|
+
role="status"
|
|
7978
|
+
>
|
|
7979
|
+
${unticked ? scopes.map(
|
|
7980
|
+
(scope) => b2`<p class="held-notice" data-held-scope=${scope}>
|
|
7981
|
+
${words.map(
|
|
7982
|
+
(part) => part.name === "Scope" ? b2`<code class="held-scope">${scope}</code>` : part.text ?? ""
|
|
7983
|
+
)}
|
|
7984
|
+
</p>`
|
|
7985
|
+
) : A}
|
|
7986
|
+
</div>`;
|
|
7987
|
+
}
|
|
7410
7988
|
/** The warning for an agent that registered itself: its name is not checked. */
|
|
7411
7989
|
renderUnverified(agent) {
|
|
7412
7990
|
if (!agent || agentVerification(agent) !== "unverified") return A;
|
|
7413
7991
|
const copy = CONSENT_COPY_TOKENS;
|
|
7414
|
-
return b2`<div class="unverified" part="unverified">
|
|
7992
|
+
return b2`<div class="unverified-note" part="unverified">
|
|
7415
7993
|
<p class="unverified-heading">${copy.unverifiedAgent.heading}</p>
|
|
7416
7994
|
<p class="unverified-body">
|
|
7417
7995
|
${copy.agentDetails.unverifiedExplanation}
|
|
@@ -7419,36 +7997,51 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7419
7997
|
</p>
|
|
7420
7998
|
</div>`;
|
|
7421
7999
|
}
|
|
7422
|
-
/**
|
|
7423
|
-
|
|
8000
|
+
/**
|
|
8001
|
+
* Who is signing in and the checks they passed, over the agent they
|
|
8002
|
+
* authorize; nothing when there is no identifier, name or check.
|
|
8003
|
+
*/
|
|
8004
|
+
renderApprover(agent) {
|
|
8005
|
+
const copy = CONSENT_COPY_TOKENS;
|
|
7424
8006
|
const identifier = this.approver?.identifier?.trim() ?? "";
|
|
8007
|
+
const name = this.approver?.name?.trim() ?? "";
|
|
8008
|
+
const method = this.approver?.method?.trim() ?? "";
|
|
7425
8009
|
const checks = (this.approver?.checks ?? []).filter(
|
|
7426
8010
|
(check) => check.label.trim()
|
|
7427
8011
|
);
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
8012
|
+
const shown = name || identifier;
|
|
8013
|
+
if (!shown && checks.length === 0) return A;
|
|
8014
|
+
const under = name && identifier && identifier !== name ? identifier : "";
|
|
8015
|
+
return approverLockup({
|
|
8016
|
+
person: shown ? {
|
|
8017
|
+
label: copy.approver.label,
|
|
8018
|
+
name: shown,
|
|
8019
|
+
identifier,
|
|
8020
|
+
detail: under || method,
|
|
8021
|
+
mark: method ? formatToken(copy.approver.signedInWith, { Method: method }) : copy.approver.signedInMark
|
|
8022
|
+
} : void 0,
|
|
8023
|
+
checks,
|
|
8024
|
+
agent: agent?.name ? this.lockupAgent(agent) : void 0
|
|
8025
|
+
});
|
|
8026
|
+
}
|
|
8027
|
+
/**
|
|
8028
|
+
* The agent's row: its name and tile, with "Unverified" or the domain it is
|
|
8029
|
+
* identified by. Each status has an info button: the unverified one says
|
|
8030
|
+
* what that means, and the domain one carries the host's `identityNote`
|
|
8031
|
+
* when it gives one.
|
|
8032
|
+
*/
|
|
8033
|
+
lockupAgent(agent) {
|
|
8034
|
+
const copy = CONSENT_COPY_TOKENS;
|
|
8035
|
+
const unverified = agentVerification(agent) === "unverified";
|
|
8036
|
+
const domain = agent.domain?.trim() ?? "";
|
|
8037
|
+
return {
|
|
8038
|
+
name: agent.name,
|
|
8039
|
+
logoUrl: agent.logoUrl,
|
|
8040
|
+
label: copy.approver.party,
|
|
8041
|
+
status: unverified ? copy.agentDetails.unverified : domain ? formatToken(copy.agentDetails.identifiedBy, { Host: domain }) : "",
|
|
8042
|
+
unverified,
|
|
8043
|
+
info: unverified ? `${copy.agentDetails.unverifiedExplanation} ${copy.unverifiedAgent.advice}` : domain && agent.identityNote?.trim() || void 0
|
|
8044
|
+
};
|
|
7452
8045
|
}
|
|
7453
8046
|
/** The "Permission details" box, when the host gives `grantDetails`. */
|
|
7454
8047
|
renderGrantDetails(editing) {
|
|
@@ -7465,6 +8058,20 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7465
8058
|
grantDetailRows(details, org || editing ? orgValue : "")
|
|
7466
8059
|
);
|
|
7467
8060
|
}
|
|
8061
|
+
/** The host's note under "Permission details"; nothing without one. */
|
|
8062
|
+
renderInfoNote(agentName) {
|
|
8063
|
+
const words = this.infoNote.trim();
|
|
8064
|
+
if (!words) return A;
|
|
8065
|
+
return b2`<p class="info-note tinted" part="info-note">
|
|
8066
|
+
${decisionIcon("info")}<span
|
|
8067
|
+
>${formatToken(words, {
|
|
8068
|
+
Agent: agentName,
|
|
8069
|
+
Verb: this.headlineVerb.trim(),
|
|
8070
|
+
Merchant: this.orgName.trim()
|
|
8071
|
+
})}</span
|
|
8072
|
+
>
|
|
8073
|
+
</p>`;
|
|
8074
|
+
}
|
|
7468
8075
|
/**
|
|
7469
8076
|
* The host's legal links, or a "How does this work?" link when the host
|
|
7470
8077
|
* gives its address; nothing when there is neither.
|
|
@@ -7484,6 +8091,7 @@ ConsentCapabilitiesScreen.features = CONSENT_CAPABILITIES_FEATURES;
|
|
|
7484
8091
|
ConsentCapabilitiesScreen.styles = i`
|
|
7485
8092
|
${editRegionStyles}
|
|
7486
8093
|
${grantDetailStyles}
|
|
8094
|
+
${approverLockupStyles}
|
|
7487
8095
|
|
|
7488
8096
|
/* The box is on an inner element: a page's reset (such as
|
|
7489
8097
|
Tailwind's "* { padding: 0; margin: 0; border: 0 }") reaches the host,
|
|
@@ -7545,7 +8153,7 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7545
8153
|
flex-shrink: 0;
|
|
7546
8154
|
}
|
|
7547
8155
|
|
|
7548
|
-
.unverified {
|
|
8156
|
+
.unverified-note {
|
|
7549
8157
|
display: flex;
|
|
7550
8158
|
flex-direction: column;
|
|
7551
8159
|
gap: 2px;
|
|
@@ -7554,86 +8162,153 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7554
8162
|
line-height: 1.45;
|
|
7555
8163
|
}
|
|
7556
8164
|
|
|
7557
|
-
.unverified p {
|
|
8165
|
+
.unverified-note p {
|
|
8166
|
+
margin: 0;
|
|
8167
|
+
}
|
|
8168
|
+
|
|
8169
|
+
.unverified-heading {
|
|
8170
|
+
font-weight: 500;
|
|
8171
|
+
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
8172
|
+
}
|
|
8173
|
+
|
|
8174
|
+
.unverified-body {
|
|
8175
|
+
color: var(--cs-text-secondary);
|
|
8176
|
+
}
|
|
8177
|
+
|
|
8178
|
+
.tinted {
|
|
8179
|
+
border-radius: 12px;
|
|
8180
|
+
border: 1px solid var(--cs-tint-line);
|
|
8181
|
+
background: var(--cs-tint);
|
|
8182
|
+
}
|
|
8183
|
+
|
|
8184
|
+
.error {
|
|
8185
|
+
display: flex;
|
|
8186
|
+
align-items: flex-start;
|
|
8187
|
+
gap: 8px;
|
|
8188
|
+
margin: 16px 0 0;
|
|
8189
|
+
font-size: 14px;
|
|
8190
|
+
line-height: 1.45;
|
|
8191
|
+
color: var(--cs-error-text, var(--cs-text-primary));
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
.error svg {
|
|
8195
|
+
flex: none;
|
|
8196
|
+
width: 16px;
|
|
8197
|
+
height: 16px;
|
|
8198
|
+
margin-top: 2px;
|
|
8199
|
+
}
|
|
8200
|
+
|
|
8201
|
+
/* Under "Permission details": the card's gap alone spaces it, as in consent-flow. */
|
|
8202
|
+
.info-note {
|
|
8203
|
+
display: flex;
|
|
8204
|
+
align-items: flex-start;
|
|
8205
|
+
gap: 8px;
|
|
7558
8206
|
margin: 0;
|
|
8207
|
+
padding: 12px 14px;
|
|
8208
|
+
font-size: 13px;
|
|
8209
|
+
line-height: 1.45;
|
|
8210
|
+
color: var(--cs-text-secondary);
|
|
7559
8211
|
}
|
|
7560
8212
|
|
|
7561
|
-
.
|
|
7562
|
-
|
|
7563
|
-
|
|
8213
|
+
.info-note svg {
|
|
8214
|
+
width: 16px;
|
|
8215
|
+
height: 16px;
|
|
8216
|
+
margin-top: 2px;
|
|
8217
|
+
color: var(--cs-text-tertiary);
|
|
7564
8218
|
}
|
|
7565
8219
|
|
|
7566
|
-
.
|
|
8220
|
+
.held-notice {
|
|
8221
|
+
margin: 6px 0 0;
|
|
8222
|
+
font-size: 13px;
|
|
8223
|
+
line-height: 1.45;
|
|
7567
8224
|
color: var(--cs-text-secondary);
|
|
7568
8225
|
}
|
|
7569
8226
|
|
|
7570
|
-
.
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
8227
|
+
.held-scope {
|
|
8228
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
8229
|
+
font-size: 12px;
|
|
8230
|
+
color: var(--cs-text-primary);
|
|
8231
|
+
word-break: break-all;
|
|
7574
8232
|
}
|
|
7575
8233
|
|
|
7576
|
-
.
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
8234
|
+
.row-check {
|
|
8235
|
+
display: flex;
|
|
8236
|
+
flex-wrap: wrap;
|
|
8237
|
+
align-items: center;
|
|
8238
|
+
justify-content: space-between;
|
|
8239
|
+
gap: 6px 12px;
|
|
8240
|
+
margin-top: 4px;
|
|
8241
|
+
padding: 8px 12px;
|
|
8242
|
+
border-radius: 8px;
|
|
7581
8243
|
}
|
|
7582
8244
|
|
|
7583
|
-
.
|
|
7584
|
-
|
|
7585
|
-
display: flex;
|
|
8245
|
+
.row-check-label {
|
|
8246
|
+
display: inline-flex;
|
|
7586
8247
|
align-items: center;
|
|
7587
|
-
gap:
|
|
8248
|
+
gap: 6px;
|
|
8249
|
+
font-size: 14px;
|
|
8250
|
+
font-weight: 500;
|
|
8251
|
+
color: var(--cs-text-primary);
|
|
7588
8252
|
}
|
|
7589
8253
|
|
|
7590
|
-
.check {
|
|
7591
|
-
|
|
8254
|
+
.row-check-label svg {
|
|
8255
|
+
flex: none;
|
|
8256
|
+
width: 16px;
|
|
8257
|
+
height: 16px;
|
|
8258
|
+
color: var(--cs-mark, var(--cs-text-primary));
|
|
7592
8259
|
}
|
|
7593
8260
|
|
|
7594
|
-
.
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
8261
|
+
.row-check-action {
|
|
8262
|
+
display: inline-flex;
|
|
8263
|
+
align-items: center;
|
|
8264
|
+
gap: 4px;
|
|
8265
|
+
margin-left: auto;
|
|
8266
|
+
padding: 0;
|
|
8267
|
+
border: 0;
|
|
8268
|
+
border-radius: 4px;
|
|
8269
|
+
background: transparent;
|
|
8270
|
+
font: inherit;
|
|
8271
|
+
font-size: 14px;
|
|
8272
|
+
font-weight: 600;
|
|
8273
|
+
color: var(--cs-action, var(--cs-text-primary));
|
|
8274
|
+
cursor: pointer;
|
|
7598
8275
|
}
|
|
7599
8276
|
|
|
7600
|
-
.
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
width: 40px;
|
|
7605
|
-
height: 40px;
|
|
7606
|
-
flex-shrink: 0;
|
|
8277
|
+
.row-check-action span {
|
|
8278
|
+
text-decoration: underline;
|
|
8279
|
+
text-decoration-thickness: 0.1em;
|
|
8280
|
+
text-underline-offset: 0.25em;
|
|
7607
8281
|
}
|
|
7608
8282
|
|
|
7609
|
-
.
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
8283
|
+
.row-check-action svg {
|
|
8284
|
+
flex: none;
|
|
8285
|
+
width: 14px;
|
|
8286
|
+
height: 14px;
|
|
8287
|
+
transition: transform 150ms ease-out;
|
|
7614
8288
|
}
|
|
7615
8289
|
|
|
7616
|
-
.check-
|
|
7617
|
-
|
|
8290
|
+
.row-check-action:hover:not(:disabled) svg {
|
|
8291
|
+
transform: translateX(2px);
|
|
7618
8292
|
}
|
|
7619
8293
|
|
|
7620
|
-
.check-
|
|
7621
|
-
|
|
7622
|
-
|
|
8294
|
+
.row-check-action:focus-visible {
|
|
8295
|
+
outline: 2px solid var(--cs-focus-ring);
|
|
8296
|
+
outline-offset: 2px;
|
|
7623
8297
|
}
|
|
7624
8298
|
|
|
7625
|
-
.
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
gap: 2px;
|
|
7629
|
-
min-width: 0;
|
|
8299
|
+
.row-check-action:disabled {
|
|
8300
|
+
cursor: not-allowed;
|
|
8301
|
+
opacity: 0.6;
|
|
7630
8302
|
}
|
|
7631
8303
|
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
8304
|
+
@media (prefers-reduced-motion: reduce) {
|
|
8305
|
+
.row-check-action svg {
|
|
8306
|
+
transition: none;
|
|
8307
|
+
}
|
|
8308
|
+
}
|
|
8309
|
+
|
|
8310
|
+
.lockup {
|
|
8311
|
+
margin-top: 16px;
|
|
7637
8312
|
}
|
|
7638
8313
|
|
|
7639
8314
|
.small {
|
|
@@ -7641,10 +8316,6 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7641
8316
|
color: var(--cs-text-tertiary);
|
|
7642
8317
|
}
|
|
7643
8318
|
|
|
7644
|
-
.strong {
|
|
7645
|
-
font-weight: 500;
|
|
7646
|
-
}
|
|
7647
|
-
|
|
7648
8319
|
.below {
|
|
7649
8320
|
display: flex;
|
|
7650
8321
|
flex-direction: column;
|
|
@@ -7719,12 +8390,24 @@ __decorateClass([
|
|
|
7719
8390
|
__decorateClass([
|
|
7720
8391
|
n4({ type: String, attribute: "how-it-works-url" })
|
|
7721
8392
|
], ConsentCapabilitiesScreen.prototype, "howItWorksUrl", 2);
|
|
8393
|
+
__decorateClass([
|
|
8394
|
+
n4({ type: String })
|
|
8395
|
+
], ConsentCapabilitiesScreen.prototype, "error", 2);
|
|
7722
8396
|
__decorateClass([
|
|
7723
8397
|
n4({ type: Boolean })
|
|
7724
8398
|
], ConsentCapabilitiesScreen.prototype, "loading", 2);
|
|
7725
8399
|
__decorateClass([
|
|
7726
8400
|
n4({ type: Boolean })
|
|
7727
8401
|
], ConsentCapabilitiesScreen.prototype, "disabled", 2);
|
|
8402
|
+
__decorateClass([
|
|
8403
|
+
n4({ type: String })
|
|
8404
|
+
], ConsentCapabilitiesScreen.prototype, "eyebrow", 2);
|
|
8405
|
+
__decorateClass([
|
|
8406
|
+
n4({ type: String })
|
|
8407
|
+
], ConsentCapabilitiesScreen.prototype, "headline", 2);
|
|
8408
|
+
__decorateClass([
|
|
8409
|
+
n4({ type: String, attribute: "info-note" })
|
|
8410
|
+
], ConsentCapabilitiesScreen.prototype, "infoNote", 2);
|
|
7728
8411
|
__decorateClass([
|
|
7729
8412
|
n4({ type: String })
|
|
7730
8413
|
], ConsentCapabilitiesScreen.prototype, "description", 2);
|
|
@@ -7734,6 +8417,9 @@ __decorateClass([
|
|
|
7734
8417
|
__decorateClass([
|
|
7735
8418
|
n4({ attribute: false })
|
|
7736
8419
|
], ConsentCapabilitiesScreen.prototype, "approver", 2);
|
|
8420
|
+
__decorateClass([
|
|
8421
|
+
n4({ attribute: false })
|
|
8422
|
+
], ConsentCapabilitiesScreen.prototype, "heldScopes", 2);
|
|
7737
8423
|
__decorateClass([
|
|
7738
8424
|
n4({ attribute: false })
|
|
7739
8425
|
], ConsentCapabilitiesScreen.prototype, "grantDetails", 2);
|
|
@@ -8928,152 +9614,18 @@ var c4 = e7(class extends i5 {
|
|
|
8928
9614
|
} else v4[k2] = u3(t9, p5[k2]), v2(s6, d4[x3], t9), d4[e10] = null;
|
|
8929
9615
|
k2++;
|
|
8930
9616
|
} else h3(d4[j2]), j2--;
|
|
8931
|
-
else h3(d4[x3]), x3++;
|
|
8932
|
-
for (; k2 <= w3; ) {
|
|
8933
|
-
const e10 = v2(s6, v4[w3 + 1]);
|
|
8934
|
-
u3(e10, p5[k2]), v4[k2++] = e10;
|
|
8935
|
-
}
|
|
8936
|
-
for (; x3 <= j2; ) {
|
|
8937
|
-
const e10 = d4[x3++];
|
|
8938
|
-
null !== e10 && h3(e10);
|
|
8939
|
-
}
|
|
8940
|
-
return this.ut = a4, p3(s6, v4), E;
|
|
8941
|
-
}
|
|
8942
|
-
});
|
|
8943
|
-
|
|
8944
|
-
// src/flow/copy.ts
|
|
8945
|
-
var FLOW_COPY = {
|
|
8946
|
-
eyebrow: {
|
|
8947
|
-
default: "Permission request",
|
|
8948
|
-
granted: "Permission granted",
|
|
8949
|
-
denied: "Permission declined"
|
|
8950
|
-
},
|
|
8951
|
-
headline: {
|
|
8952
|
-
"sign-in": "Sign in to let {Agent} {Verb} at {Merchant}.",
|
|
8953
|
-
default: "{Agent} would like to {Verb} at {Merchant} on your behalf",
|
|
8954
|
-
granted: "Access granted",
|
|
8955
|
-
denied: "No access given",
|
|
8956
|
-
error: "Something went wrong"
|
|
8957
|
-
},
|
|
8958
|
-
sub: {
|
|
8959
|
-
granted: "{Agent} can now {Verb} at {Merchant} for you.",
|
|
8960
|
-
denied: "{Agent} can't {Verb} for you. Nothing was approved.",
|
|
8961
|
-
error: "Nothing was approved. Try again, or ask {Agent} to start over."
|
|
8962
|
-
},
|
|
8963
|
-
signIn: {
|
|
8964
|
-
continueAs: "Continue as {First}",
|
|
8965
|
-
other: "Not you? Use another {Provider} account.",
|
|
8966
|
-
finePrint: "{Provider} confirms you control this account. {Merchant} does not get your mail, contacts or files."
|
|
8967
|
-
},
|
|
8968
|
-
approver: {
|
|
8969
|
-
label: "You are authorizing",
|
|
8970
|
-
labelGranted: "You authorized",
|
|
8971
|
-
labelDenied: "You declined",
|
|
8972
|
-
party: "To act for you",
|
|
8973
|
-
partyGranted: "Can now act for you",
|
|
8974
|
-
partyDenied: "Asked to act for you",
|
|
8975
|
-
confirmed: "Confirmed with passkey",
|
|
8976
|
-
signedInWith: "Signed in with {Provider}",
|
|
8977
|
-
declined: "Declined",
|
|
8978
|
-
unverified: "Unverified",
|
|
8979
|
-
unverifiedInfo: "It registered itself, so the name it gives is not checked. Allow only if you asked it to.",
|
|
8980
|
-
identifiedBy: "Identified by {Domain}"
|
|
8981
|
-
},
|
|
8982
|
-
capabilitiesHeader: "What {Agent} can do for you",
|
|
8983
|
-
tapToToggle: "Tap to toggle",
|
|
8984
|
-
seal: {
|
|
8985
|
-
"sign-in": "Sign in to continue",
|
|
8986
|
-
consent: "Waiting for your passkey",
|
|
8987
|
-
passkey: "Confirming with your passkey",
|
|
8988
|
-
cancelled: "Passkey not confirmed",
|
|
8989
|
-
granted: "Signed with your passkey",
|
|
8990
|
-
denied: "Nothing was signed",
|
|
8991
|
-
expired: "Request expired",
|
|
8992
|
-
error: "Something went wrong"
|
|
8993
|
-
},
|
|
8994
|
-
details: {
|
|
8995
|
-
title: "Permission details",
|
|
8996
|
-
connectsTo: "Connects to",
|
|
8997
|
-
duration: "Duration",
|
|
8998
|
-
budget: "Budget",
|
|
8999
|
-
amountLimits: "Amount limits",
|
|
9000
|
-
folders: "Folders",
|
|
9001
|
-
alreadyGranted: "Already granted"
|
|
9002
|
-
},
|
|
9003
|
-
actions: {
|
|
9004
|
-
approve: "Approve with passkey",
|
|
9005
|
-
deny: "Deny",
|
|
9006
|
-
confirming: "Confirming\u2026"
|
|
9007
|
-
},
|
|
9008
|
-
status: "Waiting for your passkey\u2026",
|
|
9009
|
-
notice: "Passkey not confirmed. Nothing was approved.",
|
|
9010
|
-
expired: "This request expired. Ask {Agent} to try again.",
|
|
9011
|
-
receipt: { until: "Until {When}" },
|
|
9012
|
-
goBack: "Go back to {Agent} and tell it to continue. Revoke anytime under Connected agents at {Merchant}.",
|
|
9013
|
-
retry: "Try again",
|
|
9014
|
-
terms: { agree: "I agree to the {Terms}" },
|
|
9015
|
-
legal: { label: "Legal" },
|
|
9016
|
-
announce: {
|
|
9017
|
-
"sign-in": "Sign in to continue.",
|
|
9018
|
-
consent: "Review what {Agent} is asking for.",
|
|
9019
|
-
passkey: "Waiting for your passkey.",
|
|
9020
|
-
granted: "Access granted.",
|
|
9021
|
-
denied: "No access given.",
|
|
9022
|
-
cancelled: "Passkey not confirmed. Nothing was approved.",
|
|
9023
|
-
expired: "This request expired.",
|
|
9024
|
-
error: "Something went wrong. Nothing was approved."
|
|
9025
|
-
}
|
|
9026
|
-
};
|
|
9027
|
-
var isGroup = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
9028
|
-
function flowCopy(...layers) {
|
|
9029
|
-
const out = { ...FLOW_COPY };
|
|
9030
|
-
for (const layer of layers) {
|
|
9031
|
-
for (const [key, value] of Object.entries(layer ?? {})) {
|
|
9032
|
-
const base = out[key];
|
|
9033
|
-
out[key] = isGroup(value) && isGroup(base) ? { ...base, ...value } : value;
|
|
9034
|
-
}
|
|
9035
|
-
}
|
|
9036
|
-
return out;
|
|
9037
|
-
}
|
|
9038
|
-
function token(copy, key, step) {
|
|
9039
|
-
const value = copy[key];
|
|
9040
|
-
if (typeof value === "string") return value;
|
|
9041
|
-
if (!isGroup(value)) return "";
|
|
9042
|
-
const entry = (step && value[step]) ?? value.default;
|
|
9043
|
-
return typeof entry === "string" ? entry : "";
|
|
9044
|
-
}
|
|
9045
|
-
function group(copy, key) {
|
|
9046
|
-
const value = copy[key];
|
|
9047
|
-
if (!isGroup(value)) return {};
|
|
9048
|
-
return Object.fromEntries(
|
|
9049
|
-
Object.entries(value).filter(
|
|
9050
|
-
(entry) => typeof entry[1] === "string"
|
|
9051
|
-
)
|
|
9052
|
-
);
|
|
9053
|
-
}
|
|
9054
|
-
function splitTemplate(template) {
|
|
9055
|
-
return template.split(/\{(\w+)\}/).map((part, i8) => i8 % 2 ? { name: part } : { text: part }).filter((part) => part.name || part.text);
|
|
9056
|
-
}
|
|
9057
|
-
function fillTemplate(template, values) {
|
|
9058
|
-
return splitTemplate(template).map((part) => part.name ? values[part.name] ?? "" : part.text).join("");
|
|
9059
|
-
}
|
|
9060
|
-
function initialsOf(name = "", identifier = "") {
|
|
9061
|
-
const first = (word) => Array.from(word.replace(/^[^\p{L}\p{N}]+/u, ""))[0] ?? "";
|
|
9062
|
-
const words = name.trim().split(/\s+/).filter((word) => /[\p{L}\p{N}]/u.test(word));
|
|
9063
|
-
if (words.length >= 2)
|
|
9064
|
-
return (first(words[0]) + first(words[words.length - 1])).toUpperCase();
|
|
9065
|
-
if (words.length === 1) return first(words[0]).toUpperCase();
|
|
9066
|
-
return (first(identifier) || "?").toUpperCase();
|
|
9067
|
-
}
|
|
9068
|
-
function httpsUrl(value) {
|
|
9069
|
-
const raw = typeof value === "string" ? value.trim() : "";
|
|
9070
|
-
if (!raw) return void 0;
|
|
9071
|
-
try {
|
|
9072
|
-
return new URL(raw).protocol === "https:" ? raw : void 0;
|
|
9073
|
-
} catch {
|
|
9074
|
-
return void 0;
|
|
9617
|
+
else h3(d4[x3]), x3++;
|
|
9618
|
+
for (; k2 <= w3; ) {
|
|
9619
|
+
const e10 = v2(s6, v4[w3 + 1]);
|
|
9620
|
+
u3(e10, p5[k2]), v4[k2++] = e10;
|
|
9621
|
+
}
|
|
9622
|
+
for (; x3 <= j2; ) {
|
|
9623
|
+
const e10 = d4[x3++];
|
|
9624
|
+
null !== e10 && h3(e10);
|
|
9625
|
+
}
|
|
9626
|
+
return this.ut = a4, p3(s6, v4), E;
|
|
9075
9627
|
}
|
|
9076
|
-
}
|
|
9628
|
+
});
|
|
9077
9629
|
|
|
9078
9630
|
// src/flow/model.ts
|
|
9079
9631
|
var FLOW_SCHEMA_VERSION = 1;
|
|
@@ -9616,29 +10168,6 @@ function richText(template, values) {
|
|
|
9616
10168
|
return value;
|
|
9617
10169
|
});
|
|
9618
10170
|
}
|
|
9619
|
-
function breakable(value) {
|
|
9620
|
-
return value.split(/(?=[@.])/).map((piece, i8) => i8 ? b2`<wbr />${piece}` : piece);
|
|
9621
|
-
}
|
|
9622
|
-
var hide = (event) => {
|
|
9623
|
-
event.target.hidden = true;
|
|
9624
|
-
};
|
|
9625
|
-
var show = (event) => {
|
|
9626
|
-
event.target.hidden = false;
|
|
9627
|
-
};
|
|
9628
|
-
function face(name, identifier = "", avatarUrl = "", size = "md") {
|
|
9629
|
-
const initials = initialsOf(name, identifier);
|
|
9630
|
-
return b2`<span
|
|
9631
|
-
class="face ${size} ${initials.length > 1 ? "two" : ""}"
|
|
9632
|
-
aria-hidden="true"
|
|
9633
|
-
>${initials}${avatarUrl ? b2`<img src=${avatarUrl} alt="" @error=${hide} @load=${show} />` : A}</span
|
|
9634
|
-
>`;
|
|
9635
|
-
}
|
|
9636
|
-
function agentTile(agent) {
|
|
9637
|
-
const initial = initialsOf(agent.name).slice(0, 1);
|
|
9638
|
-
return b2`<span class="tile" aria-hidden="true"
|
|
9639
|
-
>${initial}${agent.logoUrl ? b2`<img src=${agent.logoUrl} alt="" @error=${hide} @load=${show} />` : A}</span
|
|
9640
|
-
>`;
|
|
9641
|
-
}
|
|
9642
10171
|
var approver = ({ data, copy, step, variant, values }) => {
|
|
9643
10172
|
const c6 = filled(group(copy, "approver"), values);
|
|
9644
10173
|
const state = variant ?? step;
|
|
@@ -9647,51 +10176,25 @@ var approver = ({ data, copy, step, variant, values }) => {
|
|
|
9647
10176
|
const person = data.approver;
|
|
9648
10177
|
const agent = data.agent;
|
|
9649
10178
|
const unverified = agent.verification === "unverified";
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
>
|
|
9670
|
-
</div>
|
|
9671
|
-
<div class="lockup-row party" part="approver-agent">
|
|
9672
|
-
${agentTile(agent)}
|
|
9673
|
-
<div class="lockup-text">
|
|
9674
|
-
<span class="small"
|
|
9675
|
-
>${granted ? c6.partyGranted : declined ? c6.partyDenied : c6.party}</span
|
|
9676
|
-
>
|
|
9677
|
-
<span class="value">${breakable(agent.name)}</span>
|
|
9678
|
-
</div>
|
|
9679
|
-
${status ? b2`<span
|
|
9680
|
-
class="party-status ${unverified ? "unverified" : ""}"
|
|
9681
|
-
part="agent-status"
|
|
9682
|
-
>${breakable(status)}${unverified && c6.unverifiedInfo ? b2`<button
|
|
9683
|
-
type="button"
|
|
9684
|
-
class="info"
|
|
9685
|
-
aria-label=${c6.unverified}
|
|
9686
|
-
aria-describedby="unverified-info"
|
|
9687
|
-
>
|
|
9688
|
-
${decisionIcon("info")}</button
|
|
9689
|
-
><span class="tip" id="unverified-info" role="tooltip"
|
|
9690
|
-
>${c6.unverifiedInfo}</span
|
|
9691
|
-
>` : A}</span
|
|
9692
|
-
>` : A}
|
|
9693
|
-
</div>
|
|
9694
|
-
</div>`;
|
|
10179
|
+
return approverLockup({
|
|
10180
|
+
person: {
|
|
10181
|
+
label: (granted ? c6.labelGranted : declined ? c6.labelDenied : c6.label) ?? "",
|
|
10182
|
+
name: person.name,
|
|
10183
|
+
identifier: person.identifier,
|
|
10184
|
+
avatarUrl: person.avatarUrl,
|
|
10185
|
+
detail: granted ? c6.confirmed : person.identifier,
|
|
10186
|
+
mark: (declined ? c6.declined : c6.signedInWith) ?? "",
|
|
10187
|
+
declined
|
|
10188
|
+
},
|
|
10189
|
+
agent: {
|
|
10190
|
+
name: agent.name,
|
|
10191
|
+
logoUrl: agent.logoUrl,
|
|
10192
|
+
label: (granted ? c6.partyGranted : declined ? c6.partyDenied : c6.party) ?? "",
|
|
10193
|
+
status: unverified ? c6.unverified : agent.domain ? c6.identifiedBy ?? "" : "",
|
|
10194
|
+
unverified,
|
|
10195
|
+
info: unverified ? c6.unverifiedInfo : void 0
|
|
10196
|
+
}
|
|
10197
|
+
});
|
|
9695
10198
|
};
|
|
9696
10199
|
var capability = ({
|
|
9697
10200
|
data,
|
|
@@ -9885,6 +10388,7 @@ var FLOW_BLOCK_RENDERERS = {
|
|
|
9885
10388
|
};
|
|
9886
10389
|
var flowBlockStyles = i`
|
|
9887
10390
|
${grantDetailStyles}
|
|
10391
|
+
${approverLockupStyles}
|
|
9888
10392
|
|
|
9889
10393
|
.small {
|
|
9890
10394
|
font-size: 12px;
|
|
@@ -9975,216 +10479,6 @@ var flowBlockStyles = i`
|
|
|
9975
10479
|
opacity: 0.55;
|
|
9976
10480
|
}
|
|
9977
10481
|
|
|
9978
|
-
/* The approver lockup. Names break only where a word can't fit, and
|
|
9979
|
-
an address at its "@" and dots first (breakable). */
|
|
9980
|
-
.lockup {
|
|
9981
|
-
display: flex;
|
|
9982
|
-
flex-direction: column;
|
|
9983
|
-
gap: 12px;
|
|
9984
|
-
padding: 16px 18px;
|
|
9985
|
-
container-type: inline-size;
|
|
9986
|
-
}
|
|
9987
|
-
|
|
9988
|
-
.lockup-row {
|
|
9989
|
-
display: flex;
|
|
9990
|
-
align-items: center;
|
|
9991
|
-
gap: 12px;
|
|
9992
|
-
min-width: 0;
|
|
9993
|
-
}
|
|
9994
|
-
|
|
9995
|
-
.lockup-row.party {
|
|
9996
|
-
padding-top: 12px;
|
|
9997
|
-
border-top: 1px solid var(--cs-tint-line);
|
|
9998
|
-
}
|
|
9999
|
-
|
|
10000
|
-
.lockup-text {
|
|
10001
|
-
display: flex;
|
|
10002
|
-
flex: 1;
|
|
10003
|
-
flex-direction: column;
|
|
10004
|
-
gap: 2px;
|
|
10005
|
-
min-width: 0;
|
|
10006
|
-
}
|
|
10007
|
-
|
|
10008
|
-
.lockup-label {
|
|
10009
|
-
font-size: 10px;
|
|
10010
|
-
letter-spacing: 0.16em;
|
|
10011
|
-
font-weight: 600;
|
|
10012
|
-
text-transform: uppercase;
|
|
10013
|
-
color: var(--cs-text-tertiary);
|
|
10014
|
-
}
|
|
10015
|
-
|
|
10016
|
-
.lockup-name {
|
|
10017
|
-
font-size: 20px;
|
|
10018
|
-
font-weight: 600;
|
|
10019
|
-
line-height: 1.2;
|
|
10020
|
-
overflow-wrap: break-word;
|
|
10021
|
-
}
|
|
10022
|
-
|
|
10023
|
-
.lockup-text .value {
|
|
10024
|
-
font-weight: 500;
|
|
10025
|
-
overflow-wrap: break-word;
|
|
10026
|
-
}
|
|
10027
|
-
|
|
10028
|
-
.lockup-mark {
|
|
10029
|
-
display: grid;
|
|
10030
|
-
flex-shrink: 0;
|
|
10031
|
-
color: var(--cs-wallet-success, var(--cs-mark));
|
|
10032
|
-
}
|
|
10033
|
-
|
|
10034
|
-
.lockup-mark.declined {
|
|
10035
|
-
color: var(--cs-text-tertiary);
|
|
10036
|
-
}
|
|
10037
|
-
|
|
10038
|
-
.lockup-mark svg {
|
|
10039
|
-
width: 22px;
|
|
10040
|
-
height: 22px;
|
|
10041
|
-
}
|
|
10042
|
-
|
|
10043
|
-
.face,
|
|
10044
|
-
.tile {
|
|
10045
|
-
position: relative;
|
|
10046
|
-
display: grid;
|
|
10047
|
-
place-items: center;
|
|
10048
|
-
flex-shrink: 0;
|
|
10049
|
-
width: 42px;
|
|
10050
|
-
height: 42px;
|
|
10051
|
-
overflow: hidden;
|
|
10052
|
-
font-weight: 600;
|
|
10053
|
-
}
|
|
10054
|
-
|
|
10055
|
-
.face {
|
|
10056
|
-
border-radius: 50%;
|
|
10057
|
-
background: var(--cs-surface-accent);
|
|
10058
|
-
color: var(--cs-surface-accent-text);
|
|
10059
|
-
font-size: 17px;
|
|
10060
|
-
}
|
|
10061
|
-
|
|
10062
|
-
.face.two {
|
|
10063
|
-
font-size: 15px;
|
|
10064
|
-
letter-spacing: 0.02em;
|
|
10065
|
-
}
|
|
10066
|
-
|
|
10067
|
-
.face.sm {
|
|
10068
|
-
width: 32px;
|
|
10069
|
-
height: 32px;
|
|
10070
|
-
font-size: 13px;
|
|
10071
|
-
}
|
|
10072
|
-
|
|
10073
|
-
.face img {
|
|
10074
|
-
position: absolute;
|
|
10075
|
-
inset: 0;
|
|
10076
|
-
width: 100%;
|
|
10077
|
-
height: 100%;
|
|
10078
|
-
object-fit: cover;
|
|
10079
|
-
}
|
|
10080
|
-
|
|
10081
|
-
.tile {
|
|
10082
|
-
border-radius: var(--cs-tile-radius, 10px);
|
|
10083
|
-
border: 1px solid var(--cs-agent-tile-border, rgba(15, 23, 42, 0.16));
|
|
10084
|
-
background: var(--cs-surface-accent);
|
|
10085
|
-
color: var(--cs-surface-accent-text);
|
|
10086
|
-
font-size: 18px;
|
|
10087
|
-
}
|
|
10088
|
-
|
|
10089
|
-
.tile img {
|
|
10090
|
-
position: absolute;
|
|
10091
|
-
inset: 0;
|
|
10092
|
-
width: 100%;
|
|
10093
|
-
height: 100%;
|
|
10094
|
-
padding: 4px;
|
|
10095
|
-
box-sizing: border-box;
|
|
10096
|
-
object-fit: contain;
|
|
10097
|
-
background: var(--cs-agent-tile-bg, #ffffff);
|
|
10098
|
-
}
|
|
10099
|
-
|
|
10100
|
-
.party-status {
|
|
10101
|
-
position: relative;
|
|
10102
|
-
display: inline-flex;
|
|
10103
|
-
align-items: center;
|
|
10104
|
-
gap: 4px;
|
|
10105
|
-
flex-shrink: 0;
|
|
10106
|
-
font-size: 13px;
|
|
10107
|
-
font-weight: 500;
|
|
10108
|
-
color: var(--cs-text-secondary);
|
|
10109
|
-
}
|
|
10110
|
-
|
|
10111
|
-
.party-status.unverified {
|
|
10112
|
-
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
10113
|
-
}
|
|
10114
|
-
|
|
10115
|
-
/* A phone-width card: smaller faces and padding, and the agent's status
|
|
10116
|
-
under its name, so the names keep their width. */
|
|
10117
|
-
@container (max-width: 300px) {
|
|
10118
|
-
.lockup-row {
|
|
10119
|
-
gap: 10px;
|
|
10120
|
-
}
|
|
10121
|
-
|
|
10122
|
-
.lockup-row.party {
|
|
10123
|
-
flex-wrap: wrap;
|
|
10124
|
-
}
|
|
10125
|
-
|
|
10126
|
-
.face,
|
|
10127
|
-
.tile {
|
|
10128
|
-
width: 36px;
|
|
10129
|
-
height: 36px;
|
|
10130
|
-
}
|
|
10131
|
-
|
|
10132
|
-
.party-status {
|
|
10133
|
-
flex-basis: 100%;
|
|
10134
|
-
flex-shrink: 1;
|
|
10135
|
-
min-width: 0;
|
|
10136
|
-
padding-left: 46px;
|
|
10137
|
-
overflow-wrap: break-word;
|
|
10138
|
-
}
|
|
10139
|
-
}
|
|
10140
|
-
|
|
10141
|
-
.info {
|
|
10142
|
-
display: inline-grid;
|
|
10143
|
-
place-items: center;
|
|
10144
|
-
width: 22px;
|
|
10145
|
-
height: 22px;
|
|
10146
|
-
padding: 0;
|
|
10147
|
-
border: 0;
|
|
10148
|
-
border-radius: 50%;
|
|
10149
|
-
background: none;
|
|
10150
|
-
color: var(--cs-text-tertiary);
|
|
10151
|
-
cursor: help;
|
|
10152
|
-
}
|
|
10153
|
-
|
|
10154
|
-
.info svg {
|
|
10155
|
-
width: 16px;
|
|
10156
|
-
height: 16px;
|
|
10157
|
-
}
|
|
10158
|
-
|
|
10159
|
-
.info:focus-visible {
|
|
10160
|
-
outline: 2px solid var(--cs-focus-ring, currentColor);
|
|
10161
|
-
outline-offset: 1px;
|
|
10162
|
-
}
|
|
10163
|
-
|
|
10164
|
-
.tip {
|
|
10165
|
-
position: absolute;
|
|
10166
|
-
top: calc(100% + 8px);
|
|
10167
|
-
right: -6px;
|
|
10168
|
-
z-index: 5;
|
|
10169
|
-
width: 240px;
|
|
10170
|
-
padding: 8px 10px;
|
|
10171
|
-
border-radius: 8px;
|
|
10172
|
-
background: var(--cs-text-primary);
|
|
10173
|
-
color: var(--cs-surface-card);
|
|
10174
|
-
font-size: 12px;
|
|
10175
|
-
font-weight: 400;
|
|
10176
|
-
line-height: 1.45;
|
|
10177
|
-
text-align: left;
|
|
10178
|
-
opacity: 0;
|
|
10179
|
-
visibility: hidden;
|
|
10180
|
-
}
|
|
10181
|
-
|
|
10182
|
-
.party-status:hover .tip,
|
|
10183
|
-
.info:focus-visible + .tip {
|
|
10184
|
-
opacity: 1;
|
|
10185
|
-
visibility: visible;
|
|
10186
|
-
}
|
|
10187
|
-
|
|
10188
10482
|
/* Sign-in. */
|
|
10189
10483
|
.sign-in {
|
|
10190
10484
|
display: flex;
|