@kya-os/consent 0.5.2 → 0.5.4
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 +372 -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 +365 -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 +907 -606
- package/dist/consent.min.js +629 -509
- 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,413 @@ 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.08));
|
|
6691
|
+
background: var(--cs-surface-accent);
|
|
6692
|
+
color: var(--cs-surface-accent-text);
|
|
6693
|
+
font-size: 18px;
|
|
6694
|
+
}
|
|
6695
|
+
|
|
6696
|
+
/* A tile showing a logo is white under its faint edge, as the connector
|
|
6697
|
+
header's tile is, so the accent never shows through the edge as a ring.
|
|
6698
|
+
The initial alone, or after a logo fails to load, keeps the accent. */
|
|
6699
|
+
.tile:has(img:not([hidden])) {
|
|
6700
|
+
background: var(--cs-agent-tile-bg, #ffffff);
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6703
|
+
.tile img {
|
|
6704
|
+
position: absolute;
|
|
6705
|
+
inset: 0;
|
|
6706
|
+
width: 100%;
|
|
6707
|
+
height: 100%;
|
|
6708
|
+
padding: 4px;
|
|
6709
|
+
box-sizing: border-box;
|
|
6710
|
+
object-fit: contain;
|
|
6711
|
+
background: var(--cs-agent-tile-bg, #ffffff);
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6714
|
+
.party-status {
|
|
6715
|
+
position: relative;
|
|
6716
|
+
display: inline-flex;
|
|
6717
|
+
align-items: center;
|
|
6718
|
+
gap: 4px;
|
|
6719
|
+
flex-shrink: 0;
|
|
6720
|
+
font-size: 13px;
|
|
6721
|
+
font-weight: 500;
|
|
6722
|
+
color: var(--cs-text-secondary);
|
|
6723
|
+
}
|
|
6724
|
+
|
|
6725
|
+
.party-status.unverified {
|
|
6726
|
+
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
6727
|
+
}
|
|
6728
|
+
|
|
6729
|
+
/* A phone-width card: smaller faces and padding, and the agent's status
|
|
6730
|
+
under its name, so the names keep their width. */
|
|
6731
|
+
@container (max-width: 300px) {
|
|
6732
|
+
.lockup-row {
|
|
6733
|
+
gap: 10px;
|
|
6734
|
+
}
|
|
6735
|
+
|
|
6736
|
+
.lockup-row.party {
|
|
6737
|
+
flex-wrap: wrap;
|
|
6738
|
+
}
|
|
6739
|
+
|
|
6740
|
+
.face,
|
|
6741
|
+
.tile {
|
|
6742
|
+
width: 36px;
|
|
6743
|
+
height: 36px;
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6746
|
+
.lockup-check-icon {
|
|
6747
|
+
width: 36px;
|
|
6748
|
+
}
|
|
6749
|
+
|
|
6750
|
+
.party-status {
|
|
6751
|
+
flex-basis: 100%;
|
|
6752
|
+
flex-shrink: 1;
|
|
6753
|
+
min-width: 0;
|
|
6754
|
+
padding-left: 46px;
|
|
6755
|
+
overflow-wrap: break-word;
|
|
6756
|
+
}
|
|
6757
|
+
}
|
|
6758
|
+
|
|
6759
|
+
.info {
|
|
6760
|
+
display: inline-grid;
|
|
6761
|
+
place-items: center;
|
|
6762
|
+
width: 22px;
|
|
6763
|
+
height: 22px;
|
|
6764
|
+
padding: 0;
|
|
6765
|
+
border: 0;
|
|
6766
|
+
border-radius: 50%;
|
|
6767
|
+
background: none;
|
|
6768
|
+
color: var(--cs-text-tertiary);
|
|
6769
|
+
cursor: help;
|
|
6770
|
+
}
|
|
6771
|
+
|
|
6772
|
+
.info svg {
|
|
6773
|
+
width: 16px;
|
|
6774
|
+
height: 16px;
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6777
|
+
.info:focus-visible {
|
|
6778
|
+
outline: 2px solid var(--cs-focus-ring, currentColor);
|
|
6779
|
+
outline-offset: 1px;
|
|
6780
|
+
}
|
|
6781
|
+
|
|
6782
|
+
.tip {
|
|
6783
|
+
position: absolute;
|
|
6784
|
+
top: calc(100% + 8px);
|
|
6785
|
+
right: -6px;
|
|
6786
|
+
z-index: 5;
|
|
6787
|
+
width: 240px;
|
|
6788
|
+
padding: 8px 10px;
|
|
6789
|
+
border-radius: 8px;
|
|
6790
|
+
background: var(--cs-text-primary);
|
|
6791
|
+
color: var(--cs-surface-card);
|
|
6792
|
+
font-size: 12px;
|
|
6793
|
+
font-weight: 400;
|
|
6794
|
+
line-height: 1.45;
|
|
6795
|
+
text-align: left;
|
|
6796
|
+
opacity: 0;
|
|
6797
|
+
visibility: hidden;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
.party-status:hover .tip,
|
|
6801
|
+
.info:focus-visible + .tip {
|
|
6802
|
+
opacity: 1;
|
|
6803
|
+
visibility: visible;
|
|
6804
|
+
}
|
|
6805
|
+
`;
|
|
6806
|
+
|
|
6807
|
+
// src/components/grant-details.ts
|
|
6808
|
+
function grantDetailRows(details, name) {
|
|
6809
|
+
const copy = CONSENT_COPY_TOKENS.grantDetails;
|
|
6810
|
+
const resource = details.resource?.trim() ?? "";
|
|
6811
|
+
const rows = [];
|
|
6812
|
+
if (name || resource) {
|
|
6813
|
+
rows.push({
|
|
6814
|
+
icon: "resource",
|
|
6815
|
+
label: copy.connectsTo,
|
|
6816
|
+
values: name ? [name] : [resource],
|
|
6817
|
+
...resource && name ? { note: resource } : {}
|
|
6818
|
+
});
|
|
6819
|
+
}
|
|
6820
|
+
const fact = (icon, label, given) => {
|
|
6821
|
+
const values = (given?.values ?? []).filter((value) => value.trim());
|
|
6822
|
+
const note = given?.note?.trim();
|
|
6823
|
+
if (values.length > 0 || note) {
|
|
6824
|
+
rows.push({ icon, label, values, ...note ? { note } : {} });
|
|
6825
|
+
}
|
|
6826
|
+
};
|
|
6827
|
+
fact("duration", copy.duration, details.duration);
|
|
6828
|
+
if (details.budget?.trim()) {
|
|
6829
|
+
rows.push({
|
|
6830
|
+
icon: "budget",
|
|
6831
|
+
label: copy.budget,
|
|
6832
|
+
values: [details.budget.trim()]
|
|
6833
|
+
});
|
|
6834
|
+
}
|
|
6835
|
+
fact("amountLimits", copy.amountLimits, details.amountLimits);
|
|
6836
|
+
fact("alreadyGranted", copy.alreadyGranted, details.alreadyGranted);
|
|
6837
|
+
return rows;
|
|
6838
|
+
}
|
|
6839
|
+
function grantDetailsSection(rows, heading = CONSENT_COPY_TOKENS.grantDetails.heading) {
|
|
6840
|
+
if (rows.length === 0) return A;
|
|
6841
|
+
return b2`<section
|
|
6842
|
+
class="grant-details tinted"
|
|
6843
|
+
part="grant-details"
|
|
6844
|
+
aria-labelledby="grant-details-heading"
|
|
6845
|
+
>
|
|
6846
|
+
<h2 id="grant-details-heading">${heading}</h2>
|
|
6847
|
+
<dl>
|
|
6848
|
+
${rows.map(
|
|
6849
|
+
(row) => b2`<div class="fact">
|
|
6850
|
+
<span class="fact-icon">${decisionIcon(row.icon)}</span>
|
|
6851
|
+
<div class="fact-text">
|
|
6852
|
+
<dt class="small">${row.label}</dt>
|
|
6853
|
+
${row.values.map(
|
|
6854
|
+
(value) => b2`<dd class="value">${value}</dd>`
|
|
6855
|
+
)}
|
|
6856
|
+
${row.note ? b2`<dd class="note small">${row.note}</dd>` : A}
|
|
6857
|
+
</div>
|
|
6858
|
+
</div>`
|
|
6859
|
+
)}
|
|
6860
|
+
</dl>
|
|
6861
|
+
</section>`;
|
|
6862
|
+
}
|
|
6863
|
+
var grantDetailStyles = i`
|
|
6864
|
+
.grant-details {
|
|
6865
|
+
margin-top: 16px;
|
|
6866
|
+
padding: 16px;
|
|
6867
|
+
font-size: 14px;
|
|
6868
|
+
line-height: 1.45;
|
|
6869
|
+
}
|
|
6870
|
+
|
|
6871
|
+
.grant-details h2 {
|
|
6872
|
+
margin: 0 0 12px;
|
|
6873
|
+
font-size: 14px;
|
|
6874
|
+
font-weight: 600;
|
|
6875
|
+
}
|
|
6876
|
+
|
|
6877
|
+
.grant-details dl {
|
|
6878
|
+
display: flex;
|
|
6879
|
+
flex-direction: column;
|
|
6880
|
+
gap: 12px;
|
|
6881
|
+
margin: 0;
|
|
6882
|
+
}
|
|
6883
|
+
|
|
6884
|
+
.fact {
|
|
6885
|
+
display: flex;
|
|
6886
|
+
align-items: flex-start;
|
|
6395
6887
|
gap: 12px;
|
|
6396
6888
|
}
|
|
6397
6889
|
|
|
@@ -7134,10 +7626,15 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7134
7626
|
this.fixedExpiry = false;
|
|
7135
7627
|
this.theme = "light";
|
|
7136
7628
|
this.howItWorksUrl = "";
|
|
7629
|
+
this.error = "";
|
|
7137
7630
|
this.loading = false;
|
|
7138
7631
|
this.disabled = false;
|
|
7632
|
+
this.eyebrow = "";
|
|
7633
|
+
this.headline = "";
|
|
7634
|
+
this.infoNote = "";
|
|
7139
7635
|
this.description = "";
|
|
7140
7636
|
this.submitLabel = "";
|
|
7637
|
+
this.heldScopes = [];
|
|
7141
7638
|
this.showIcons = false;
|
|
7142
7639
|
this.hideRisk = false;
|
|
7143
7640
|
this.hideScopes = false;
|
|
@@ -7174,20 +7671,8 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7174
7671
|
};
|
|
7175
7672
|
this.onAllow = () => {
|
|
7176
7673
|
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
|
-
};
|
|
7674
|
+
const detail = this.approvalDetail(this.selected);
|
|
7675
|
+
if (!detail) return;
|
|
7191
7676
|
this.dispatchEvent(
|
|
7192
7677
|
new CustomEvent("capabilities-allow", {
|
|
7193
7678
|
detail,
|
|
@@ -7214,6 +7699,11 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7214
7699
|
super.connectedCallback();
|
|
7215
7700
|
this.seedDefaults();
|
|
7216
7701
|
}
|
|
7702
|
+
updated(changed) {
|
|
7703
|
+
if (changed.has("error") && this.error) {
|
|
7704
|
+
this.renderRoot.querySelector(".error")?.scrollIntoView?.({ block: "nearest" });
|
|
7705
|
+
}
|
|
7706
|
+
}
|
|
7217
7707
|
willUpdate(changed) {
|
|
7218
7708
|
if (changed.has("capabilities") || changed.has("allSelected")) {
|
|
7219
7709
|
this.seedDefaults();
|
|
@@ -7258,6 +7748,39 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7258
7748
|
(capability2) => !this.selected.has(capability2.id)
|
|
7259
7749
|
);
|
|
7260
7750
|
}
|
|
7751
|
+
/** What approving `selected` sends: its rows, their scopes and any grant terms. */
|
|
7752
|
+
approvalDetail(selected) {
|
|
7753
|
+
const selectedCapabilities = this.capabilities.filter(
|
|
7754
|
+
(c6) => selected.has(c6.id)
|
|
7755
|
+
);
|
|
7756
|
+
if (selectedCapabilities.length === 0) return null;
|
|
7757
|
+
const terms = this.slottedTerms;
|
|
7758
|
+
return {
|
|
7759
|
+
selectedCapabilityIds: selectedCapabilities.map((c6) => c6.id),
|
|
7760
|
+
selectedScopes: Array.from(
|
|
7761
|
+
new Set(selectedCapabilities.flatMap((c6) => c6.scopes))
|
|
7762
|
+
),
|
|
7763
|
+
...terms.length > 0 ? { grantTerms: mergeGrantTerms(...terms.map((t8) => t8.grantTerms)) } : {}
|
|
7764
|
+
};
|
|
7765
|
+
}
|
|
7766
|
+
/** A row's check can't start while the screen is busy or its terms can't be used. */
|
|
7767
|
+
get checkDisabled() {
|
|
7768
|
+
return this.loading || this.disabled || this.slottedTerms.some((terms) => terms.valid === false);
|
|
7769
|
+
}
|
|
7770
|
+
onCheck(capability2) {
|
|
7771
|
+
if (this.preview || this.checkDisabled) return;
|
|
7772
|
+
const approval = this.approvalDetail(
|
|
7773
|
+
/* @__PURE__ */ new Set([...this.selected, capability2.id])
|
|
7774
|
+
);
|
|
7775
|
+
if (!approval) return;
|
|
7776
|
+
this.dispatchEvent(
|
|
7777
|
+
new CustomEvent("capability-check", {
|
|
7778
|
+
detail: { ...approval, capabilityId: capability2.id },
|
|
7779
|
+
bubbles: true,
|
|
7780
|
+
composed: true
|
|
7781
|
+
})
|
|
7782
|
+
);
|
|
7783
|
+
}
|
|
7261
7784
|
compileCapabilityCedar(capability2) {
|
|
7262
7785
|
const cedar = capability2.cedar?.trim() || "";
|
|
7263
7786
|
if (!cedar) return "";
|
|
@@ -7288,6 +7811,8 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7288
7811
|
const agent = this.resolveAgent();
|
|
7289
7812
|
const editing = isEditing(this);
|
|
7290
7813
|
const agentName = agent?.name || "this agent";
|
|
7814
|
+
const approver2 = this.renderApprover(agent);
|
|
7815
|
+
const warning = approver2 !== A && agent?.name ? A : this.renderUnverified(agent);
|
|
7291
7816
|
return b2`
|
|
7292
7817
|
<style>
|
|
7293
7818
|
${this.hostStyle()}
|
|
@@ -7308,20 +7833,26 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7308
7833
|
></consent-connector-header>
|
|
7309
7834
|
<div class="card" part="card">
|
|
7310
7835
|
<consent-headline
|
|
7311
|
-
exportparts="eyebrow, headline, agent-name, subhead, agent-details"
|
|
7836
|
+
exportparts="eyebrow, headline, agent-name, merchant-name, subhead, agent-details"
|
|
7312
7837
|
agent-name="${agent?.name ?? ""}"
|
|
7313
7838
|
.agent=${agent}
|
|
7314
7839
|
verb="${this.headlineVerb}"
|
|
7840
|
+
eyebrow="${this.eyebrow}"
|
|
7841
|
+
template="${this.headline}"
|
|
7842
|
+
merchant="${this.orgName}"
|
|
7315
7843
|
description="${this.description}"
|
|
7316
7844
|
?preview=${this.preview}
|
|
7317
7845
|
?editable=${editing}
|
|
7318
7846
|
.editSource=${this.editSource}
|
|
7319
7847
|
><slot name="headline" slot="headline"></slot
|
|
7320
7848
|
></consent-headline>
|
|
7849
|
+
${this.error ? b2`<p class="error" part="error" role="alert">
|
|
7850
|
+
${decisionIcon("warning")}<span>${this.error}</span>
|
|
7851
|
+
</p>` : A}
|
|
7321
7852
|
<slot name="recovery"></slot>
|
|
7322
|
-
${
|
|
7853
|
+
${warning}
|
|
7323
7854
|
<slot name="identity"></slot>
|
|
7324
|
-
${
|
|
7855
|
+
${approver2}
|
|
7325
7856
|
<slot name="agent-key"></slot>
|
|
7326
7857
|
<div part="permissions">
|
|
7327
7858
|
${this.renderSectionHeader(agentName, editing)}
|
|
@@ -7345,7 +7876,7 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7345
7876
|
?editable=${editing}
|
|
7346
7877
|
.editSource=${this.editSource}
|
|
7347
7878
|
exportparts=${CAPABILITY_ROW_EXPORT_PARTS}
|
|
7348
|
-
|
|
7879
|
+
>${capability2.check ? this.renderCheck(capability2, capability2.check.action) : A}${this.renderHeld(capability2)}<slot
|
|
7349
7880
|
name=${capabilitySlotName(capability2.id)}
|
|
7350
7881
|
slot="extra"
|
|
7351
7882
|
></slot
|
|
@@ -7356,7 +7887,7 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7356
7887
|
</div>
|
|
7357
7888
|
<slot name="auth"></slot>
|
|
7358
7889
|
<slot name="details"></slot>
|
|
7359
|
-
${this.renderGrantDetails(editing)}
|
|
7890
|
+
${this.renderGrantDetails(editing)} ${this.renderInfoNote(agentName)}
|
|
7360
7891
|
<slot name="notice"
|
|
7361
7892
|
>${this.grantDetails ? A : b2`<consent-revocation-notice
|
|
7362
7893
|
revocationPath="${this.revocationPath}"
|
|
@@ -7407,11 +7938,65 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7407
7938
|
>` : A}
|
|
7408
7939
|
</div>`;
|
|
7409
7940
|
}
|
|
7941
|
+
/**
|
|
7942
|
+
* "Requires verification" and the button that starts a row's check. It is
|
|
7943
|
+
* in the row's `extra` slot, whose clicks the row leaves alone.
|
|
7944
|
+
*/
|
|
7945
|
+
renderCheck(capability2, action) {
|
|
7946
|
+
return b2`<div
|
|
7947
|
+
slot="extra"
|
|
7948
|
+
class="row-check tinted"
|
|
7949
|
+
part="capability-verify"
|
|
7950
|
+
data-capability-check=${capability2.id}
|
|
7951
|
+
>
|
|
7952
|
+
<span class="row-check-label" part="capability-verify-label"
|
|
7953
|
+
>${decisionIcon("shield")}${CONSENT_COPY_TOKENS.capabilityRow.checkRequired}</span
|
|
7954
|
+
>
|
|
7955
|
+
<button
|
|
7956
|
+
type="button"
|
|
7957
|
+
class="row-check-action"
|
|
7958
|
+
part="capability-verify-action"
|
|
7959
|
+
?disabled=${this.checkDisabled}
|
|
7960
|
+
@click=${() => this.onCheck(capability2)}
|
|
7961
|
+
>
|
|
7962
|
+
<span>${action}</span>${decisionIcon("arrowRight")}
|
|
7963
|
+
</button>
|
|
7964
|
+
</div>`;
|
|
7965
|
+
}
|
|
7966
|
+
/**
|
|
7967
|
+
* "<scope> stays granted because of your earlier approval." under an
|
|
7968
|
+
* unticked row, for each scope of it that an earlier approval holds. The
|
|
7969
|
+
* live region stays while the row is ticked, so the words are announced as
|
|
7970
|
+
* they appear.
|
|
7971
|
+
*/
|
|
7972
|
+
renderHeld(capability2) {
|
|
7973
|
+
const held = new Set(this.heldScopes);
|
|
7974
|
+
const scopes = [...new Set(capability2.scopes ?? [])].filter(
|
|
7975
|
+
(scope) => held.has(scope)
|
|
7976
|
+
);
|
|
7977
|
+
if (scopes.length === 0) return A;
|
|
7978
|
+
const unticked = !this.selected.has(capability2.id);
|
|
7979
|
+
const words = splitTemplate(CONSENT_COPY_TOKENS.capabilityRow.heldNotice);
|
|
7980
|
+
return b2`<div
|
|
7981
|
+
slot="extra"
|
|
7982
|
+
class="held"
|
|
7983
|
+
part="capability-held"
|
|
7984
|
+
role="status"
|
|
7985
|
+
>
|
|
7986
|
+
${unticked ? scopes.map(
|
|
7987
|
+
(scope) => b2`<p class="held-notice" data-held-scope=${scope}>
|
|
7988
|
+
${words.map(
|
|
7989
|
+
(part) => part.name === "Scope" ? b2`<code class="held-scope">${scope}</code>` : part.text ?? ""
|
|
7990
|
+
)}
|
|
7991
|
+
</p>`
|
|
7992
|
+
) : A}
|
|
7993
|
+
</div>`;
|
|
7994
|
+
}
|
|
7410
7995
|
/** The warning for an agent that registered itself: its name is not checked. */
|
|
7411
7996
|
renderUnverified(agent) {
|
|
7412
7997
|
if (!agent || agentVerification(agent) !== "unverified") return A;
|
|
7413
7998
|
const copy = CONSENT_COPY_TOKENS;
|
|
7414
|
-
return b2`<div class="unverified" part="unverified">
|
|
7999
|
+
return b2`<div class="unverified-note" part="unverified">
|
|
7415
8000
|
<p class="unverified-heading">${copy.unverifiedAgent.heading}</p>
|
|
7416
8001
|
<p class="unverified-body">
|
|
7417
8002
|
${copy.agentDetails.unverifiedExplanation}
|
|
@@ -7419,36 +8004,51 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7419
8004
|
</p>
|
|
7420
8005
|
</div>`;
|
|
7421
8006
|
}
|
|
7422
|
-
/**
|
|
7423
|
-
|
|
8007
|
+
/**
|
|
8008
|
+
* Who is signing in and the checks they passed, over the agent they
|
|
8009
|
+
* authorize; nothing when there is no identifier, name or check.
|
|
8010
|
+
*/
|
|
8011
|
+
renderApprover(agent) {
|
|
8012
|
+
const copy = CONSENT_COPY_TOKENS;
|
|
7424
8013
|
const identifier = this.approver?.identifier?.trim() ?? "";
|
|
8014
|
+
const name = this.approver?.name?.trim() ?? "";
|
|
8015
|
+
const method = this.approver?.method?.trim() ?? "";
|
|
7425
8016
|
const checks = (this.approver?.checks ?? []).filter(
|
|
7426
8017
|
(check) => check.label.trim()
|
|
7427
8018
|
);
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
8019
|
+
const shown = name || identifier;
|
|
8020
|
+
if (!shown && checks.length === 0) return A;
|
|
8021
|
+
const under = name && identifier && identifier !== name ? identifier : "";
|
|
8022
|
+
return approverLockup({
|
|
8023
|
+
person: shown ? {
|
|
8024
|
+
label: copy.approver.label,
|
|
8025
|
+
name: shown,
|
|
8026
|
+
identifier,
|
|
8027
|
+
detail: under || method,
|
|
8028
|
+
mark: method ? formatToken(copy.approver.signedInWith, { Method: method }) : copy.approver.signedInMark
|
|
8029
|
+
} : void 0,
|
|
8030
|
+
checks,
|
|
8031
|
+
agent: agent?.name ? this.lockupAgent(agent) : void 0
|
|
8032
|
+
});
|
|
8033
|
+
}
|
|
8034
|
+
/**
|
|
8035
|
+
* The agent's row: its name and tile, with "Unverified" or the domain it is
|
|
8036
|
+
* identified by. Each status has an info button: the unverified one says
|
|
8037
|
+
* what that means, and the domain one carries the host's `identityNote`
|
|
8038
|
+
* when it gives one.
|
|
8039
|
+
*/
|
|
8040
|
+
lockupAgent(agent) {
|
|
8041
|
+
const copy = CONSENT_COPY_TOKENS;
|
|
8042
|
+
const unverified = agentVerification(agent) === "unverified";
|
|
8043
|
+
const domain = agent.domain?.trim() ?? "";
|
|
8044
|
+
return {
|
|
8045
|
+
name: agent.name,
|
|
8046
|
+
logoUrl: agent.logoUrl,
|
|
8047
|
+
label: copy.approver.party,
|
|
8048
|
+
status: unverified ? copy.agentDetails.unverified : domain ? formatToken(copy.agentDetails.identifiedBy, { Host: domain }) : "",
|
|
8049
|
+
unverified,
|
|
8050
|
+
info: unverified ? `${copy.agentDetails.unverifiedExplanation} ${copy.unverifiedAgent.advice}` : domain && agent.identityNote?.trim() || void 0
|
|
8051
|
+
};
|
|
7452
8052
|
}
|
|
7453
8053
|
/** The "Permission details" box, when the host gives `grantDetails`. */
|
|
7454
8054
|
renderGrantDetails(editing) {
|
|
@@ -7465,6 +8065,20 @@ var ConsentCapabilitiesScreen = class extends i4 {
|
|
|
7465
8065
|
grantDetailRows(details, org || editing ? orgValue : "")
|
|
7466
8066
|
);
|
|
7467
8067
|
}
|
|
8068
|
+
/** The host's note under "Permission details"; nothing without one. */
|
|
8069
|
+
renderInfoNote(agentName) {
|
|
8070
|
+
const words = this.infoNote.trim();
|
|
8071
|
+
if (!words) return A;
|
|
8072
|
+
return b2`<p class="info-note tinted" part="info-note">
|
|
8073
|
+
${decisionIcon("info")}<span
|
|
8074
|
+
>${formatToken(words, {
|
|
8075
|
+
Agent: agentName,
|
|
8076
|
+
Verb: this.headlineVerb.trim(),
|
|
8077
|
+
Merchant: this.orgName.trim()
|
|
8078
|
+
})}</span
|
|
8079
|
+
>
|
|
8080
|
+
</p>`;
|
|
8081
|
+
}
|
|
7468
8082
|
/**
|
|
7469
8083
|
* The host's legal links, or a "How does this work?" link when the host
|
|
7470
8084
|
* gives its address; nothing when there is neither.
|
|
@@ -7484,6 +8098,7 @@ ConsentCapabilitiesScreen.features = CONSENT_CAPABILITIES_FEATURES;
|
|
|
7484
8098
|
ConsentCapabilitiesScreen.styles = i`
|
|
7485
8099
|
${editRegionStyles}
|
|
7486
8100
|
${grantDetailStyles}
|
|
8101
|
+
${approverLockupStyles}
|
|
7487
8102
|
|
|
7488
8103
|
/* The box is on an inner element: a page's reset (such as
|
|
7489
8104
|
Tailwind's "* { padding: 0; margin: 0; border: 0 }") reaches the host,
|
|
@@ -7545,7 +8160,7 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7545
8160
|
flex-shrink: 0;
|
|
7546
8161
|
}
|
|
7547
8162
|
|
|
7548
|
-
.unverified {
|
|
8163
|
+
.unverified-note {
|
|
7549
8164
|
display: flex;
|
|
7550
8165
|
flex-direction: column;
|
|
7551
8166
|
gap: 2px;
|
|
@@ -7554,86 +8169,153 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7554
8169
|
line-height: 1.45;
|
|
7555
8170
|
}
|
|
7556
8171
|
|
|
7557
|
-
.unverified p {
|
|
8172
|
+
.unverified-note p {
|
|
8173
|
+
margin: 0;
|
|
8174
|
+
}
|
|
8175
|
+
|
|
8176
|
+
.unverified-heading {
|
|
8177
|
+
font-weight: 500;
|
|
8178
|
+
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
8179
|
+
}
|
|
8180
|
+
|
|
8181
|
+
.unverified-body {
|
|
8182
|
+
color: var(--cs-text-secondary);
|
|
8183
|
+
}
|
|
8184
|
+
|
|
8185
|
+
.tinted {
|
|
8186
|
+
border-radius: 12px;
|
|
8187
|
+
border: 1px solid var(--cs-tint-line);
|
|
8188
|
+
background: var(--cs-tint);
|
|
8189
|
+
}
|
|
8190
|
+
|
|
8191
|
+
.error {
|
|
8192
|
+
display: flex;
|
|
8193
|
+
align-items: flex-start;
|
|
8194
|
+
gap: 8px;
|
|
8195
|
+
margin: 16px 0 0;
|
|
8196
|
+
font-size: 14px;
|
|
8197
|
+
line-height: 1.45;
|
|
8198
|
+
color: var(--cs-error-text, var(--cs-text-primary));
|
|
8199
|
+
}
|
|
8200
|
+
|
|
8201
|
+
.error svg {
|
|
8202
|
+
flex: none;
|
|
8203
|
+
width: 16px;
|
|
8204
|
+
height: 16px;
|
|
8205
|
+
margin-top: 2px;
|
|
8206
|
+
}
|
|
8207
|
+
|
|
8208
|
+
/* Under "Permission details": the card's gap alone spaces it, as in consent-flow. */
|
|
8209
|
+
.info-note {
|
|
8210
|
+
display: flex;
|
|
8211
|
+
align-items: flex-start;
|
|
8212
|
+
gap: 8px;
|
|
7558
8213
|
margin: 0;
|
|
8214
|
+
padding: 12px 14px;
|
|
8215
|
+
font-size: 13px;
|
|
8216
|
+
line-height: 1.45;
|
|
8217
|
+
color: var(--cs-text-secondary);
|
|
7559
8218
|
}
|
|
7560
8219
|
|
|
7561
|
-
.
|
|
7562
|
-
|
|
7563
|
-
|
|
8220
|
+
.info-note svg {
|
|
8221
|
+
width: 16px;
|
|
8222
|
+
height: 16px;
|
|
8223
|
+
margin-top: 2px;
|
|
8224
|
+
color: var(--cs-text-tertiary);
|
|
7564
8225
|
}
|
|
7565
8226
|
|
|
7566
|
-
.
|
|
8227
|
+
.held-notice {
|
|
8228
|
+
margin: 6px 0 0;
|
|
8229
|
+
font-size: 13px;
|
|
8230
|
+
line-height: 1.45;
|
|
7567
8231
|
color: var(--cs-text-secondary);
|
|
7568
8232
|
}
|
|
7569
8233
|
|
|
7570
|
-
.
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
8234
|
+
.held-scope {
|
|
8235
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
8236
|
+
font-size: 12px;
|
|
8237
|
+
color: var(--cs-text-primary);
|
|
8238
|
+
word-break: break-all;
|
|
7574
8239
|
}
|
|
7575
8240
|
|
|
7576
|
-
.
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
8241
|
+
.row-check {
|
|
8242
|
+
display: flex;
|
|
8243
|
+
flex-wrap: wrap;
|
|
8244
|
+
align-items: center;
|
|
8245
|
+
justify-content: space-between;
|
|
8246
|
+
gap: 6px 12px;
|
|
8247
|
+
margin-top: 4px;
|
|
8248
|
+
padding: 8px 12px;
|
|
8249
|
+
border-radius: 8px;
|
|
7581
8250
|
}
|
|
7582
8251
|
|
|
7583
|
-
.
|
|
7584
|
-
|
|
7585
|
-
display: flex;
|
|
8252
|
+
.row-check-label {
|
|
8253
|
+
display: inline-flex;
|
|
7586
8254
|
align-items: center;
|
|
7587
|
-
gap:
|
|
8255
|
+
gap: 6px;
|
|
8256
|
+
font-size: 14px;
|
|
8257
|
+
font-weight: 500;
|
|
8258
|
+
color: var(--cs-text-primary);
|
|
7588
8259
|
}
|
|
7589
8260
|
|
|
7590
|
-
.check {
|
|
7591
|
-
|
|
8261
|
+
.row-check-label svg {
|
|
8262
|
+
flex: none;
|
|
8263
|
+
width: 16px;
|
|
8264
|
+
height: 16px;
|
|
8265
|
+
color: var(--cs-mark, var(--cs-text-primary));
|
|
7592
8266
|
}
|
|
7593
8267
|
|
|
7594
|
-
.
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
8268
|
+
.row-check-action {
|
|
8269
|
+
display: inline-flex;
|
|
8270
|
+
align-items: center;
|
|
8271
|
+
gap: 4px;
|
|
8272
|
+
margin-left: auto;
|
|
8273
|
+
padding: 0;
|
|
8274
|
+
border: 0;
|
|
8275
|
+
border-radius: 4px;
|
|
8276
|
+
background: transparent;
|
|
8277
|
+
font: inherit;
|
|
8278
|
+
font-size: 14px;
|
|
8279
|
+
font-weight: 600;
|
|
8280
|
+
color: var(--cs-action, var(--cs-text-primary));
|
|
8281
|
+
cursor: pointer;
|
|
7598
8282
|
}
|
|
7599
8283
|
|
|
7600
|
-
.
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
width: 40px;
|
|
7605
|
-
height: 40px;
|
|
7606
|
-
flex-shrink: 0;
|
|
8284
|
+
.row-check-action span {
|
|
8285
|
+
text-decoration: underline;
|
|
8286
|
+
text-decoration-thickness: 0.1em;
|
|
8287
|
+
text-underline-offset: 0.25em;
|
|
7607
8288
|
}
|
|
7608
8289
|
|
|
7609
|
-
.
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
8290
|
+
.row-check-action svg {
|
|
8291
|
+
flex: none;
|
|
8292
|
+
width: 14px;
|
|
8293
|
+
height: 14px;
|
|
8294
|
+
transition: transform 150ms ease-out;
|
|
7614
8295
|
}
|
|
7615
8296
|
|
|
7616
|
-
.check-
|
|
7617
|
-
|
|
8297
|
+
.row-check-action:hover:not(:disabled) svg {
|
|
8298
|
+
transform: translateX(2px);
|
|
7618
8299
|
}
|
|
7619
8300
|
|
|
7620
|
-
.check-
|
|
7621
|
-
|
|
7622
|
-
|
|
8301
|
+
.row-check-action:focus-visible {
|
|
8302
|
+
outline: 2px solid var(--cs-focus-ring);
|
|
8303
|
+
outline-offset: 2px;
|
|
7623
8304
|
}
|
|
7624
8305
|
|
|
7625
|
-
.
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
gap: 2px;
|
|
7629
|
-
min-width: 0;
|
|
8306
|
+
.row-check-action:disabled {
|
|
8307
|
+
cursor: not-allowed;
|
|
8308
|
+
opacity: 0.6;
|
|
7630
8309
|
}
|
|
7631
8310
|
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
8311
|
+
@media (prefers-reduced-motion: reduce) {
|
|
8312
|
+
.row-check-action svg {
|
|
8313
|
+
transition: none;
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
|
|
8317
|
+
.lockup {
|
|
8318
|
+
margin-top: 16px;
|
|
7637
8319
|
}
|
|
7638
8320
|
|
|
7639
8321
|
.small {
|
|
@@ -7641,10 +8323,6 @@ ConsentCapabilitiesScreen.styles = i`
|
|
|
7641
8323
|
color: var(--cs-text-tertiary);
|
|
7642
8324
|
}
|
|
7643
8325
|
|
|
7644
|
-
.strong {
|
|
7645
|
-
font-weight: 500;
|
|
7646
|
-
}
|
|
7647
|
-
|
|
7648
8326
|
.below {
|
|
7649
8327
|
display: flex;
|
|
7650
8328
|
flex-direction: column;
|
|
@@ -7719,12 +8397,24 @@ __decorateClass([
|
|
|
7719
8397
|
__decorateClass([
|
|
7720
8398
|
n4({ type: String, attribute: "how-it-works-url" })
|
|
7721
8399
|
], ConsentCapabilitiesScreen.prototype, "howItWorksUrl", 2);
|
|
8400
|
+
__decorateClass([
|
|
8401
|
+
n4({ type: String })
|
|
8402
|
+
], ConsentCapabilitiesScreen.prototype, "error", 2);
|
|
7722
8403
|
__decorateClass([
|
|
7723
8404
|
n4({ type: Boolean })
|
|
7724
8405
|
], ConsentCapabilitiesScreen.prototype, "loading", 2);
|
|
7725
8406
|
__decorateClass([
|
|
7726
8407
|
n4({ type: Boolean })
|
|
7727
8408
|
], ConsentCapabilitiesScreen.prototype, "disabled", 2);
|
|
8409
|
+
__decorateClass([
|
|
8410
|
+
n4({ type: String })
|
|
8411
|
+
], ConsentCapabilitiesScreen.prototype, "eyebrow", 2);
|
|
8412
|
+
__decorateClass([
|
|
8413
|
+
n4({ type: String })
|
|
8414
|
+
], ConsentCapabilitiesScreen.prototype, "headline", 2);
|
|
8415
|
+
__decorateClass([
|
|
8416
|
+
n4({ type: String, attribute: "info-note" })
|
|
8417
|
+
], ConsentCapabilitiesScreen.prototype, "infoNote", 2);
|
|
7728
8418
|
__decorateClass([
|
|
7729
8419
|
n4({ type: String })
|
|
7730
8420
|
], ConsentCapabilitiesScreen.prototype, "description", 2);
|
|
@@ -7734,6 +8424,9 @@ __decorateClass([
|
|
|
7734
8424
|
__decorateClass([
|
|
7735
8425
|
n4({ attribute: false })
|
|
7736
8426
|
], ConsentCapabilitiesScreen.prototype, "approver", 2);
|
|
8427
|
+
__decorateClass([
|
|
8428
|
+
n4({ attribute: false })
|
|
8429
|
+
], ConsentCapabilitiesScreen.prototype, "heldScopes", 2);
|
|
7737
8430
|
__decorateClass([
|
|
7738
8431
|
n4({ attribute: false })
|
|
7739
8432
|
], ConsentCapabilitiesScreen.prototype, "grantDetails", 2);
|
|
@@ -8927,153 +9620,19 @@ var c4 = e7(class extends i5 {
|
|
|
8927
9620
|
u3(e11, p5[k2]), v4[k2] = e11;
|
|
8928
9621
|
} else v4[k2] = u3(t9, p5[k2]), v2(s6, d4[x3], t9), d4[e10] = null;
|
|
8929
9622
|
k2++;
|
|
8930
|
-
} 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;
|
|
9623
|
+
} else h3(d4[j2]), j2--;
|
|
9624
|
+
else h3(d4[x3]), x3++;
|
|
9625
|
+
for (; k2 <= w3; ) {
|
|
9626
|
+
const e10 = v2(s6, v4[w3 + 1]);
|
|
9627
|
+
u3(e10, p5[k2]), v4[k2++] = e10;
|
|
9628
|
+
}
|
|
9629
|
+
for (; x3 <= j2; ) {
|
|
9630
|
+
const e10 = d4[x3++];
|
|
9631
|
+
null !== e10 && h3(e10);
|
|
9632
|
+
}
|
|
9633
|
+
return this.ut = a4, p3(s6, v4), E;
|
|
9075
9634
|
}
|
|
9076
|
-
}
|
|
9635
|
+
});
|
|
9077
9636
|
|
|
9078
9637
|
// src/flow/model.ts
|
|
9079
9638
|
var FLOW_SCHEMA_VERSION = 1;
|
|
@@ -9616,29 +10175,6 @@ function richText(template, values) {
|
|
|
9616
10175
|
return value;
|
|
9617
10176
|
});
|
|
9618
10177
|
}
|
|
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
10178
|
var approver = ({ data, copy, step, variant, values }) => {
|
|
9643
10179
|
const c6 = filled(group(copy, "approver"), values);
|
|
9644
10180
|
const state = variant ?? step;
|
|
@@ -9647,51 +10183,25 @@ var approver = ({ data, copy, step, variant, values }) => {
|
|
|
9647
10183
|
const person = data.approver;
|
|
9648
10184
|
const agent = data.agent;
|
|
9649
10185
|
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>`;
|
|
10186
|
+
return approverLockup({
|
|
10187
|
+
person: {
|
|
10188
|
+
label: (granted ? c6.labelGranted : declined ? c6.labelDenied : c6.label) ?? "",
|
|
10189
|
+
name: person.name,
|
|
10190
|
+
identifier: person.identifier,
|
|
10191
|
+
avatarUrl: person.avatarUrl,
|
|
10192
|
+
detail: granted ? c6.confirmed : person.identifier,
|
|
10193
|
+
mark: (declined ? c6.declined : c6.signedInWith) ?? "",
|
|
10194
|
+
declined
|
|
10195
|
+
},
|
|
10196
|
+
agent: {
|
|
10197
|
+
name: agent.name,
|
|
10198
|
+
logoUrl: agent.logoUrl,
|
|
10199
|
+
label: (granted ? c6.partyGranted : declined ? c6.partyDenied : c6.party) ?? "",
|
|
10200
|
+
status: unverified ? c6.unverified : agent.domain ? c6.identifiedBy ?? "" : "",
|
|
10201
|
+
unverified,
|
|
10202
|
+
info: unverified ? c6.unverifiedInfo : void 0
|
|
10203
|
+
}
|
|
10204
|
+
});
|
|
9695
10205
|
};
|
|
9696
10206
|
var capability = ({
|
|
9697
10207
|
data,
|
|
@@ -9885,6 +10395,7 @@ var FLOW_BLOCK_RENDERERS = {
|
|
|
9885
10395
|
};
|
|
9886
10396
|
var flowBlockStyles = i`
|
|
9887
10397
|
${grantDetailStyles}
|
|
10398
|
+
${approverLockupStyles}
|
|
9888
10399
|
|
|
9889
10400
|
.small {
|
|
9890
10401
|
font-size: 12px;
|
|
@@ -9975,216 +10486,6 @@ var flowBlockStyles = i`
|
|
|
9975
10486
|
opacity: 0.55;
|
|
9976
10487
|
}
|
|
9977
10488
|
|
|
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
10489
|
/* Sign-in. */
|
|
10189
10490
|
.sign-in {
|
|
10190
10491
|
display: flex;
|