@kya-os/consent 0.1.37 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/index.d.ts +12 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +12 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +2 -2
- package/dist/bundle/inline.js.map +1 -1
- package/dist/bundle/shell.d.ts +23 -0
- package/dist/bundle/shell.d.ts.map +1 -1
- package/dist/bundle/shell.js +25 -1
- package/dist/bundle/shell.js.map +1 -1
- package/dist/capabilities/index.d.ts +7 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +7 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/registry.d.ts +29 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +178 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/cedar/compile.d.ts +30 -0
- package/dist/cedar/compile.d.ts.map +1 -0
- package/dist/cedar/compile.js +55 -0
- package/dist/cedar/compile.js.map +1 -0
- package/dist/cedar/explain.d.ts +22 -0
- package/dist/cedar/explain.d.ts.map +1 -0
- package/dist/cedar/explain.js +72 -0
- package/dist/cedar/explain.js.map +1 -0
- package/dist/cedar/index.d.ts +8 -0
- package/dist/cedar/index.d.ts.map +1 -0
- package/dist/cedar/index.js +8 -0
- package/dist/cedar/index.js.map +1 -0
- package/dist/cjs/bundle/index.js +19 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +2 -2
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/shell.js +25 -1
- package/dist/cjs/bundle/shell.js.map +1 -1
- package/dist/cjs/capabilities/index.js +12 -0
- package/dist/cjs/capabilities/index.js.map +1 -0
- package/dist/cjs/capabilities/registry.js +182 -0
- package/dist/cjs/capabilities/registry.js.map +1 -0
- package/dist/cjs/cedar/compile.js +59 -0
- package/dist/cjs/cedar/compile.js.map +1 -0
- package/dist/cjs/cedar/explain.js +75 -0
- package/dist/cjs/cedar/explain.js.map +1 -0
- package/dist/cjs/cedar/index.js +14 -0
- package/dist/cjs/cedar/index.js.map +1 -0
- package/dist/cjs/components/consent-action-bar.js +138 -0
- package/dist/cjs/components/consent-action-bar.js.map +1 -0
- package/dist/cjs/components/consent-agent-header.js +205 -0
- package/dist/cjs/components/consent-agent-header.js.map +1 -0
- package/dist/cjs/components/consent-capabilities-screen.js +309 -0
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -0
- package/dist/cjs/components/consent-capability-card.js +340 -0
- package/dist/cjs/components/consent-capability-card.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +99 -0
- package/dist/cjs/components/consent-footer.js.map +1 -0
- package/dist/cjs/components/consent-revocation-notice.js +101 -0
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -0
- package/dist/cjs/components/index.js +14 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +176 -7
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/copy/index.js +12 -0
- package/dist/cjs/copy/index.js.map +1 -0
- package/dist/cjs/copy/tokens.js +101 -0
- package/dist/cjs/copy/tokens.js.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mcp-app/index.js +15 -0
- package/dist/cjs/mcp-app/index.js.map +1 -0
- package/dist/cjs/mcp-app/inline.js +20 -0
- package/dist/cjs/mcp-app/inline.js.map +1 -0
- package/dist/cjs/mcp-app/types.js +10 -0
- package/dist/cjs/mcp-app/types.js.map +1 -0
- package/dist/cjs/popup/index.js +15 -0
- package/dist/cjs/popup/index.js.map +1 -0
- package/dist/cjs/popup/launcher.js +77 -0
- package/dist/cjs/popup/launcher.js.map +1 -0
- package/dist/cjs/schemas/capabilities.schemas.js +129 -0
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -0
- package/dist/cjs/schemas/config.schemas.js +18 -0
- package/dist/cjs/schemas/config.schemas.js.map +1 -1
- package/dist/cjs/schemas/index.js +1 -0
- package/dist/cjs/schemas/index.js.map +1 -1
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +86 -0
- package/dist/cjs/styles/theme.js.map +1 -0
- package/dist/cjs/types/capabilities.types.js +12 -0
- package/dist/cjs/types/capabilities.types.js.map +1 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +30 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -0
- package/dist/components/consent-action-bar.js +135 -0
- package/dist/components/consent-action-bar.js.map +1 -0
- package/dist/components/consent-agent-header.d.ts +31 -0
- package/dist/components/consent-agent-header.d.ts.map +1 -0
- package/dist/components/consent-agent-header.js +202 -0
- package/dist/components/consent-agent-header.js.map +1 -0
- package/dist/components/consent-capabilities-screen.d.ts +62 -0
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -0
- package/dist/components/consent-capabilities-screen.js +306 -0
- package/dist/components/consent-capabilities-screen.js.map +1 -0
- package/dist/components/consent-capability-card.d.ts +44 -0
- package/dist/components/consent-capability-card.d.ts.map +1 -0
- package/dist/components/consent-capability-card.js +337 -0
- package/dist/components/consent-capability-card.js.map +1 -0
- package/dist/components/consent-footer.d.ts +22 -0
- package/dist/components/consent-footer.d.ts.map +1 -0
- package/dist/components/consent-footer.js +96 -0
- package/dist/components/consent-footer.js.map +1 -0
- package/dist/components/consent-revocation-notice.d.ts +22 -0
- package/dist/components/consent-revocation-notice.d.ts.map +1 -0
- package/dist/components/consent-revocation-notice.js +98 -0
- package/dist/components/consent-revocation-notice.js.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +41 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +176 -7
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +1578 -210
- package/dist/consent.min.js +727 -96
- package/dist/copy/index.d.ts +8 -0
- package/dist/copy/index.d.ts.map +1 -0
- package/dist/copy/index.js +7 -0
- package/dist/copy/index.js.map +1 -0
- package/dist/copy/tokens.d.ts +93 -0
- package/dist/copy/tokens.d.ts.map +1 -0
- package/dist/copy/tokens.js +97 -0
- package/dist/copy/tokens.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-app/index.d.ts +10 -0
- package/dist/mcp-app/index.d.ts.map +1 -0
- package/dist/mcp-app/index.js +9 -0
- package/dist/mcp-app/index.js.map +1 -0
- package/dist/mcp-app/inline.d.ts +16 -0
- package/dist/mcp-app/inline.d.ts.map +1 -0
- package/dist/mcp-app/inline.js +16 -0
- package/dist/mcp-app/inline.js.map +1 -0
- package/dist/mcp-app/types.d.ts +33 -0
- package/dist/mcp-app/types.d.ts.map +1 -0
- package/dist/mcp-app/types.js +8 -0
- package/dist/mcp-app/types.js.map +1 -0
- package/dist/popup/index.d.ts +8 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/popup/index.js +7 -0
- package/dist/popup/index.js.map +1 -0
- package/dist/popup/launcher.d.ts +81 -0
- package/dist/popup/launcher.d.ts.map +1 -0
- package/dist/popup/launcher.js +71 -0
- package/dist/popup/launcher.js.map +1 -0
- package/dist/schemas/api.schemas.d.ts +234 -30
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.d.ts +186 -0
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -0
- package/dist/schemas/capabilities.schemas.js +123 -0
- package/dist/schemas/capabilities.schemas.js.map +1 -0
- package/dist/schemas/config.schemas.d.ts +332 -36
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/schemas/config.schemas.js +18 -0
- package/dist/schemas/config.schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/theme.d.ts +72 -0
- package/dist/styles/theme.d.ts.map +1 -0
- package/dist/styles/theme.js +81 -0
- package/dist/styles/theme.js.map +1 -0
- package/dist/types/capabilities.types.d.ts +126 -0
- package/dist/types/capabilities.types.d.ts.map +1 -0
- package/dist/types/capabilities.types.js +11 -0
- package/dist/types/capabilities.types.js.map +1 -0
- package/dist/types/config.types.d.ts +33 -0
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +15 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline.js","sourceRoot":"","sources":["../../../src/mcp-app/inline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,sEAAsE;AACzD,QAAA,oBAAoB,GAAW,mizuBAAmizuB,CAAC;AAEhlzuB,4CAA4C;AAC/B,QAAA,yBAAyB,GAAW,MAAM,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Apps Consent Types
|
|
4
|
+
*
|
|
5
|
+
* Type definitions for the inline consent UI rendered via MCP Apps.
|
|
6
|
+
* These match the structuredContent shape produced by
|
|
7
|
+
* MCPIRuntimeBase.buildConsentUIResult().
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/mcp-app/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent popup launcher exports.
|
|
4
|
+
*
|
|
5
|
+
* @module @kya-os/consent/popup
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.buildConsentMarkdownLink = exports.buildPopupResource = exports.shouldUsePopup = exports.POPUP_WINDOW_FEATURES = exports.POPUP_CAPABLE_CLIENT_IDS = void 0;
|
|
9
|
+
var launcher_js_1 = require("./launcher.js");
|
|
10
|
+
Object.defineProperty(exports, "POPUP_CAPABLE_CLIENT_IDS", { enumerable: true, get: function () { return launcher_js_1.POPUP_CAPABLE_CLIENT_IDS; } });
|
|
11
|
+
Object.defineProperty(exports, "POPUP_WINDOW_FEATURES", { enumerable: true, get: function () { return launcher_js_1.POPUP_WINDOW_FEATURES; } });
|
|
12
|
+
Object.defineProperty(exports, "shouldUsePopup", { enumerable: true, get: function () { return launcher_js_1.shouldUsePopup; } });
|
|
13
|
+
Object.defineProperty(exports, "buildPopupResource", { enumerable: true, get: function () { return launcher_js_1.buildPopupResource; } });
|
|
14
|
+
Object.defineProperty(exports, "buildConsentMarkdownLink", { enumerable: true, get: function () { return launcher_js_1.buildConsentMarkdownLink; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/popup/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,6CAMuB;AALrB,uHAAA,wBAAwB,OAAA;AACxB,oHAAA,qBAAqB,OAAA;AACrB,6GAAA,cAAc,OAAA;AACd,iHAAA,kBAAkB,OAAA;AAClB,uHAAA,wBAAwB,OAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent Popup Launcher
|
|
4
|
+
*
|
|
5
|
+
* The framework returns a *markdown link* by default when a tool requires
|
|
6
|
+
* delegation: the agent surfaces the link to the user, who clicks through to
|
|
7
|
+
* the consent page in a normal browser tab.
|
|
8
|
+
*
|
|
9
|
+
* For clients that ship an embedded browser (today: `.mcpb`-installed Claude
|
|
10
|
+
* Desktop), we can do better — return a structured-content UI resource that
|
|
11
|
+
* opens a stripped-chrome popup window with the consent URL preloaded. The
|
|
12
|
+
* popup closes itself on success. The user never leaves the chat.
|
|
13
|
+
*
|
|
14
|
+
* This module is runtime-agnostic. It returns plain data; the runtime adapter
|
|
15
|
+
* (e.g. `@kya-os/mcp-i-cloudflare`) is responsible for delivering the chosen
|
|
16
|
+
* representation back to the MCP client.
|
|
17
|
+
*
|
|
18
|
+
* @module @kya-os/consent/popup/launcher
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.POPUP_WINDOW_FEATURES = exports.POPUP_CAPABLE_CLIENT_IDS = void 0;
|
|
22
|
+
exports.shouldUsePopup = shouldUsePopup;
|
|
23
|
+
exports.buildPopupResource = buildPopupResource;
|
|
24
|
+
exports.buildConsentMarkdownLink = buildConsentMarkdownLink;
|
|
25
|
+
/**
|
|
26
|
+
* Stable identifiers for clients that support the embedded popup launcher.
|
|
27
|
+
*
|
|
28
|
+
* These IDs match the canonical IDs in `@kya-os/mcp-i-cloudflare`'s
|
|
29
|
+
* `findKnownClient` registry. Adding a new client here requires that the
|
|
30
|
+
* client also surface a usable embedded browser.
|
|
31
|
+
*/
|
|
32
|
+
exports.POPUP_CAPABLE_CLIENT_IDS = ["claude"];
|
|
33
|
+
/**
|
|
34
|
+
* Decide whether the consent flow should be presented as a popup for this
|
|
35
|
+
* client + config combination. Falls back to `false` when either input
|
|
36
|
+
* disqualifies the popup path.
|
|
37
|
+
*
|
|
38
|
+
* @param clientId - Canonical client id from `findKnownClient`. Pass the
|
|
39
|
+
* `id` field, not the raw `clientInfo.name` string.
|
|
40
|
+
* @param popupEnabled - The resolved `popupEnabled` flag from `ResolvedUI`.
|
|
41
|
+
*/
|
|
42
|
+
function shouldUsePopup(clientId, popupEnabled) {
|
|
43
|
+
if (!popupEnabled)
|
|
44
|
+
return false;
|
|
45
|
+
if (!clientId)
|
|
46
|
+
return false;
|
|
47
|
+
return exports.POPUP_CAPABLE_CLIENT_IDS.includes(clientId);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Default popup window size. Matches the consent screen's max width
|
|
51
|
+
* (`max-w-[512px]`) plus enough vertical room for the capability list and
|
|
52
|
+
* the action bar.
|
|
53
|
+
*/
|
|
54
|
+
exports.POPUP_WINDOW_FEATURES = {
|
|
55
|
+
width: 520,
|
|
56
|
+
height: 760,
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Build the popup resource payload for a given consent URL.
|
|
60
|
+
*/
|
|
61
|
+
function buildPopupResource(consentUrl) {
|
|
62
|
+
return {
|
|
63
|
+
type: "kya-os/consent-popup",
|
|
64
|
+
consentUrl,
|
|
65
|
+
features: { ...exports.POPUP_WINDOW_FEATURES },
|
|
66
|
+
fallbackMarkdown: buildConsentMarkdownLink(consentUrl),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Markdown text the framework returns when the client doesn't support the
|
|
71
|
+
* popup path. Identical to the historical `Authorize the action here →`
|
|
72
|
+
* line so existing flows are unchanged.
|
|
73
|
+
*/
|
|
74
|
+
function buildConsentMarkdownLink(consentUrl) {
|
|
75
|
+
return `[Authorize the action here →](${consentUrl})`;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=launcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../../src/popup/launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAsBH,wCAOC;AAwCD,gDAOC;AAOD,4DAEC;AAnFD;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAG,CAAC,QAAQ,CAAU,CAAC;AAI5D;;;;;;;;GAQG;AACH,SAAgB,cAAc,CAC5B,QAA4B,EAC5B,YAAiC;IAEjC,IAAI,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IAChC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAQ,gCAA8C,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED;;;;GAIG;AACU,QAAA,qBAAqB,GAAG;IACnC,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACH,CAAC;AA2BX;;GAEG;AACH,SAAgB,kBAAkB,CAAC,UAAkB;IACnD,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,UAAU;QACV,QAAQ,EAAE,EAAE,GAAG,6BAAqB,EAAE;QACtC,gBAAgB,EAAE,wBAAwB,CAAC,UAAU,CAAC;KACvD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,UAAkB;IACzD,OAAO,iCAAiC,UAAU,GAAG,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Capability + Agent Metadata + Cedar Schemas
|
|
4
|
+
*
|
|
5
|
+
* Runtime validation for capability metadata, the agent identity tile, and
|
|
6
|
+
* Cedar policy fragments. Cedar fragments are validated only for shape here;
|
|
7
|
+
* full grammar validation is performed by the dashboard's existing
|
|
8
|
+
* `compile-policy.ts` before persistence.
|
|
9
|
+
*
|
|
10
|
+
* @module @kya-os/consent/schemas/capabilities
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.CedarTemplateContextSchema = exports.ConsentThemeSchema = exports.AgentMetadataSchema = exports.CapabilityGroupSchema = exports.CapabilitySchema = exports.CedarPolicySchema = exports.CapabilityIconSchema = exports.RiskLevelSchema = void 0;
|
|
14
|
+
exports.validateCapability = validateCapability;
|
|
15
|
+
exports.validateCapabilityGroup = validateCapabilityGroup;
|
|
16
|
+
exports.validateAgentMetadata = validateAgentMetadata;
|
|
17
|
+
const zod_1 = require("zod");
|
|
18
|
+
/**
|
|
19
|
+
* Risk classification.
|
|
20
|
+
*/
|
|
21
|
+
exports.RiskLevelSchema = zod_1.z.enum(["low", "medium", "high", "critical"]);
|
|
22
|
+
/**
|
|
23
|
+
* Allowlist of icon tokens recognized by `<consent-capability-card>`.
|
|
24
|
+
*/
|
|
25
|
+
exports.CapabilityIconSchema = zod_1.z.enum([
|
|
26
|
+
"search",
|
|
27
|
+
"cart",
|
|
28
|
+
"card",
|
|
29
|
+
"pin",
|
|
30
|
+
"pin-new",
|
|
31
|
+
"shield",
|
|
32
|
+
"key",
|
|
33
|
+
"tools",
|
|
34
|
+
"user",
|
|
35
|
+
"calendar",
|
|
36
|
+
"lock",
|
|
37
|
+
"eye",
|
|
38
|
+
"send",
|
|
39
|
+
"package",
|
|
40
|
+
"neutral",
|
|
41
|
+
]);
|
|
42
|
+
/**
|
|
43
|
+
* Cedar policy fragment shape check. Full grammar validation runs in the
|
|
44
|
+
* dashboard's compile-policy.ts; here we only enforce a length cap and confirm
|
|
45
|
+
* the fragment opens with the `permit` or `forbid` keyword (the only two valid
|
|
46
|
+
* Cedar effects).
|
|
47
|
+
*/
|
|
48
|
+
exports.CedarPolicySchema = zod_1.z
|
|
49
|
+
.string()
|
|
50
|
+
.min(1, "Cedar fragment cannot be empty")
|
|
51
|
+
.max(8000, "Cedar fragment must be 8000 characters or less")
|
|
52
|
+
.refine((value) => /^\s*(permit|forbid)\s*\(/.test(value), "Cedar fragment must begin with `permit (` or `forbid (`");
|
|
53
|
+
/**
|
|
54
|
+
* A single capability row.
|
|
55
|
+
*/
|
|
56
|
+
exports.CapabilitySchema = zod_1.z.object({
|
|
57
|
+
id: zod_1.z
|
|
58
|
+
.string()
|
|
59
|
+
.min(1, "Capability id is required")
|
|
60
|
+
.max(64, "Capability id must be 64 characters or less")
|
|
61
|
+
.regex(/^[a-z][a-z0-9._-]*$/, "Capability id must be lowercase alphanumeric with `.`, `_`, or `-`"),
|
|
62
|
+
label: zod_1.z
|
|
63
|
+
.string()
|
|
64
|
+
.min(1, "Capability label is required")
|
|
65
|
+
.max(80, "Capability label must be 80 characters or less"),
|
|
66
|
+
description: zod_1.z
|
|
67
|
+
.string()
|
|
68
|
+
.min(1, "Capability description is required")
|
|
69
|
+
.max(280, "Capability description must be 280 characters or less"),
|
|
70
|
+
icon: exports.CapabilityIconSchema,
|
|
71
|
+
riskLevel: exports.RiskLevelSchema,
|
|
72
|
+
defaultOn: zod_1.z.boolean(),
|
|
73
|
+
cedar: exports.CedarPolicySchema,
|
|
74
|
+
scopes: zod_1.z
|
|
75
|
+
.array(zod_1.z.string().min(1).max(120))
|
|
76
|
+
.min(1, "At least one scope is required")
|
|
77
|
+
.max(20, "At most 20 scopes per capability"),
|
|
78
|
+
category: zod_1.z.string().max(80).optional(),
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* Capability group (optional clustering).
|
|
82
|
+
*/
|
|
83
|
+
exports.CapabilityGroupSchema = zod_1.z.object({
|
|
84
|
+
id: zod_1.z
|
|
85
|
+
.string()
|
|
86
|
+
.min(1)
|
|
87
|
+
.max(64)
|
|
88
|
+
.regex(/^[a-z][a-z0-9._-]*$/, "Group id must be lowercase alphanumeric"),
|
|
89
|
+
label: zod_1.z.string().min(1).max(80),
|
|
90
|
+
capabilities: zod_1.z
|
|
91
|
+
.array(exports.CapabilitySchema)
|
|
92
|
+
.min(1, "Group must contain at least one capability")
|
|
93
|
+
.max(20, "At most 20 capabilities per group"),
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* Agent identity tile data.
|
|
97
|
+
*/
|
|
98
|
+
exports.AgentMetadataSchema = zod_1.z.object({
|
|
99
|
+
name: zod_1.z.string().min(1).max(80),
|
|
100
|
+
did: zod_1.z.string().min(1).max(500),
|
|
101
|
+
vendor: zod_1.z.string().max(80).optional(),
|
|
102
|
+
surfaceLabel: zod_1.z.string().max(40).optional(),
|
|
103
|
+
verified: zod_1.z.boolean(),
|
|
104
|
+
logoUrl: zod_1.z.string().url().optional(),
|
|
105
|
+
connectedAt: zod_1.z.string().datetime().optional(),
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* Theme selection.
|
|
109
|
+
*/
|
|
110
|
+
exports.ConsentThemeSchema = zod_1.z.enum(["light", "dark"]);
|
|
111
|
+
/**
|
|
112
|
+
* Cedar template context bound at compile time.
|
|
113
|
+
*/
|
|
114
|
+
exports.CedarTemplateContextSchema = zod_1.z.object({
|
|
115
|
+
agent_did: zod_1.z.string().min(1).max(500),
|
|
116
|
+
user_did: zod_1.z.string().min(1).max(500),
|
|
117
|
+
org: zod_1.z.string().min(1).max(120),
|
|
118
|
+
deployment: zod_1.z.string().min(1).max(120),
|
|
119
|
+
});
|
|
120
|
+
function validateCapability(value) {
|
|
121
|
+
return exports.CapabilitySchema.safeParse(value);
|
|
122
|
+
}
|
|
123
|
+
function validateCapabilityGroup(value) {
|
|
124
|
+
return exports.CapabilityGroupSchema.safeParse(value);
|
|
125
|
+
}
|
|
126
|
+
function validateAgentMetadata(value) {
|
|
127
|
+
return exports.AgentMetadataSchema.safeParse(value);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=capabilities.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.schemas.js","sourceRoot":"","sources":["../../../src/schemas/capabilities.schemas.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAoIH,gDAIC;AAED,0DAIC;AAED,sDAIC;AAlJD,6BAAwB;AAExB;;GAEG;AACU,QAAA,eAAe,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAA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.schemas.js");
|
|
16
16
|
const modes_schemas_js_1 = require("./modes.schemas.js");
|
|
17
|
+
const capabilities_schemas_js_1 = require("./capabilities.schemas.js");
|
|
17
18
|
/**
|
|
18
19
|
* Consent UI Schema
|
|
19
20
|
*/
|
|
@@ -124,6 +125,23 @@ exports.ConsentConfigSchema = zod_1.z.object({
|
|
|
124
125
|
passkey: modes_schemas_js_1.PasskeyConfigSchema.optional(),
|
|
125
126
|
idv: modes_schemas_js_1.IDVConfigSchema.optional(),
|
|
126
127
|
expirationDays: zod_1.z.number().int().min(1).max(365).optional(),
|
|
128
|
+
capabilities: zod_1.z
|
|
129
|
+
.array(capabilities_schemas_js_1.CapabilityGroupSchema)
|
|
130
|
+
.max(20, "At most 20 capability groups allowed")
|
|
131
|
+
.optional(),
|
|
132
|
+
agentMetadata: capabilities_schemas_js_1.AgentMetadataSchema.optional(),
|
|
133
|
+
theme: capabilities_schemas_js_1.ConsentThemeSchema.optional(),
|
|
134
|
+
headlineVerb: zod_1.z
|
|
135
|
+
.string()
|
|
136
|
+
.min(1)
|
|
137
|
+
.max(40, "Headline verb must be 40 characters or less")
|
|
138
|
+
.optional(),
|
|
139
|
+
revocationPath: zod_1.z
|
|
140
|
+
.string()
|
|
141
|
+
.min(1)
|
|
142
|
+
.max(120, "Revocation path must be 120 characters or less")
|
|
143
|
+
.optional(),
|
|
144
|
+
inactivityDays: zod_1.z.number().int().min(1).max(3650).optional(),
|
|
127
145
|
metadata: exports.ConsentMetadataSchema.optional(),
|
|
128
146
|
});
|
|
129
147
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schemas.js","sourceRoot":"","sources":["../../../src/schemas/config.schemas.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;
|
|
1
|
+
{"version":3,"file":"config.schemas.js","sourceRoot":"","sources":["../../../src/schemas/config.schemas.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA+LH,sDAIC;AAED,0DAIC;AAED,kDAIC;A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AAE,4CAAkB,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,OAAC;SACZ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,EAAE,6CAA6C,CAAC;SACtD,QAAQ,EAAE;IACb,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,EAAE,gDAAgD,CAAC;SAC1D,QAAQ,EAAE;IACb,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5D,QAAQ,EAAE,6BAAqB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAIH;;GAEG;AACU,QAAA,2BAA2B,GAAG,2BAAmB,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,6BAAqB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAMH;;GAEG;AAEH,SAAgB,qBAAqB,CACnC,MAAe;IAEf,OAAO,2BAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,uBAAuB,CACrC,QAAiB;IAEjB,OAAO,2CAAqB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,mBAAmB,CACjC,KAAc;IAEd,OAAO,gCAAwB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -26,4 +26,5 @@ __exportStar(require("./config.schemas.js"), exports);
|
|
|
26
26
|
__exportStar(require("./branding.schemas.js"), exports);
|
|
27
27
|
__exportStar(require("./modes.schemas.js"), exports);
|
|
28
28
|
__exportStar(require("./api.schemas.js"), exports);
|
|
29
|
+
__exportStar(require("./capabilities.schemas.js"), exports);
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,mDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,mDAAiC;AACjC,4DAA0C"}
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -25,4 +25,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
__exportStar(require("./tokens.js"), exports);
|
|
26
26
|
__exportStar(require("./css-variables.js"), exports);
|
|
27
27
|
__exportStar(require("./stylesheet.js"), exports);
|
|
28
|
+
__exportStar(require("./theme.js"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,qDAAmC;AACnC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,qDAAmC;AACnC,kDAAgC;AAChC,6CAA2B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Consent + Gateway Design-Language Themes
|
|
4
|
+
*
|
|
5
|
+
* Two CSS-custom-property token sets shared by the new consent screen and
|
|
6
|
+
* the (future) migrated OAuth Gateway consent. The themes match the screens
|
|
7
|
+
* Peter approved for Hardware World:
|
|
8
|
+
*
|
|
9
|
+
* - `light` → paper background, dark on light, serif headline (Peter's mockup).
|
|
10
|
+
* - `dark` → glassy dark modal, soft halo backdrop (OAuth Gateway aesthetic).
|
|
11
|
+
*
|
|
12
|
+
* Components consume these tokens through Shadow DOM CSS (`var(--cs-*)`).
|
|
13
|
+
* Org branding flows through `surfaceAccent` / `surfaceAccentText` so the
|
|
14
|
+
* primary button can adopt operator brand color while the rest of the
|
|
15
|
+
* surface stays in the chosen theme.
|
|
16
|
+
*
|
|
17
|
+
* The amber `HIGHER RISK` chip token is fixed across themes so the visual
|
|
18
|
+
* stays recognizable regardless of org branding.
|
|
19
|
+
*
|
|
20
|
+
* @module @kya-os/consent/styles/theme
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.darkTheme = exports.lightTheme = void 0;
|
|
24
|
+
exports.getConsentTheme = getConsentTheme;
|
|
25
|
+
exports.themeToCssVariables = themeToCssVariables;
|
|
26
|
+
const FIXED_RISK_CHIP_BG = "#FCE7B6";
|
|
27
|
+
const FIXED_RISK_CHIP_TEXT = "#7A4F00";
|
|
28
|
+
exports.lightTheme = {
|
|
29
|
+
surfaceBg: "#F4F1EA",
|
|
30
|
+
surfaceCard: "#FFFFFF",
|
|
31
|
+
surfaceBorder: "rgba(15, 23, 42, 0.10)",
|
|
32
|
+
surfaceInset: "#F1ECE2",
|
|
33
|
+
textPrimary: "#0F172A",
|
|
34
|
+
textSecondary: "#334155",
|
|
35
|
+
textTertiary: "#64748B",
|
|
36
|
+
surfaceAccent: "#0F172A",
|
|
37
|
+
surfaceAccentText: "#FFFFFF",
|
|
38
|
+
pillVerifiedBg: "#DCFCE7",
|
|
39
|
+
pillVerifiedText: "#166534",
|
|
40
|
+
pillUnverifiedBg: "#F1F5F9",
|
|
41
|
+
pillUnverifiedText: "#475569",
|
|
42
|
+
chipRiskBg: FIXED_RISK_CHIP_BG,
|
|
43
|
+
chipRiskText: FIXED_RISK_CHIP_TEXT,
|
|
44
|
+
focusRing: "rgba(15, 23, 42, 0.35)",
|
|
45
|
+
cardShadow: "0 30px 80px -40px rgba(15, 23, 42, 0.40)",
|
|
46
|
+
};
|
|
47
|
+
exports.darkTheme = {
|
|
48
|
+
surfaceBg: "#0B0808",
|
|
49
|
+
surfaceCard: "rgba(20, 20, 22, 0.92)",
|
|
50
|
+
surfaceBorder: "rgba(255, 255, 255, 0.08)",
|
|
51
|
+
surfaceInset: "rgba(255, 255, 255, 0.04)",
|
|
52
|
+
textPrimary: "#F8FAFC",
|
|
53
|
+
textSecondary: "#CBD5E1",
|
|
54
|
+
textTertiary: "#94A3B8",
|
|
55
|
+
surfaceAccent: "#F8FAFC",
|
|
56
|
+
surfaceAccentText: "#0F172A",
|
|
57
|
+
pillVerifiedBg: "rgba(34, 197, 94, 0.16)",
|
|
58
|
+
pillVerifiedText: "#86EFAC",
|
|
59
|
+
pillUnverifiedBg: "rgba(148, 163, 184, 0.18)",
|
|
60
|
+
pillUnverifiedText: "#CBD5E1",
|
|
61
|
+
chipRiskBg: FIXED_RISK_CHIP_BG,
|
|
62
|
+
chipRiskText: FIXED_RISK_CHIP_TEXT,
|
|
63
|
+
focusRing: "rgba(248, 250, 252, 0.55)",
|
|
64
|
+
cardShadow: "0 40px 90px -40px rgba(0, 0, 0, 0.85)",
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Resolve a theme by name. Defaults to `light` for any unknown value.
|
|
68
|
+
*/
|
|
69
|
+
function getConsentTheme(theme) {
|
|
70
|
+
return theme === "dark" ? exports.darkTheme : exports.lightTheme;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Render a theme as a CSS string suitable for injecting into a `<style>` block
|
|
74
|
+
* or `:host { ... }` rule. Each token becomes a `--cs-{kebab}` custom property.
|
|
75
|
+
*/
|
|
76
|
+
function themeToCssVariables(tokens) {
|
|
77
|
+
const declarations = [];
|
|
78
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
79
|
+
declarations.push(` --cs-${camelToKebab(key)}: ${value};`);
|
|
80
|
+
}
|
|
81
|
+
return declarations.join("\n");
|
|
82
|
+
}
|
|
83
|
+
function camelToKebab(value) {
|
|
84
|
+
return value.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/styles/theme.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AA0GH,0CAEC;AAMD,kDAMC;AA5DD,MAAM,kBAAkB,GAAG,SAAS,CAAC;AACrC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE1B,QAAA,UAAU,GAAuB;IAC5C,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,wBAAwB;IACvC,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;IACvB,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,kBAAkB,EAAE,SAAS;IAC7B,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,oBAAoB;IAClC,SAAS,EAAE,wBAAwB;IACnC,UAAU,EAAE,0CAA0C;CACvD,CAAC;AAEW,QAAA,SAAS,GAAuB;IAC3C,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,2BAA2B;IAC1C,YAAY,EAAE,2BAA2B;IACzC,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;IACvB,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,yBAAyB;IACzC,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,2BAA2B;IAC7C,kBAAkB,EAAE,SAAS;IAC7B,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,oBAAoB;IAClC,SAAS,EAAE,2BAA2B;IACtC,UAAU,EAAE,uCAAuC;CACpD,CAAC;AAEF;;GAEG;AACH,SAAgB,eAAe,CAAC,KAA+B;IAC7D,OAAO,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,iBAAS,CAAC,CAAC,CAAC,kBAAU,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,MAA0B;IAC5D,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,YAAY,CAAC,IAAI,CAAC,UAAU,YAAY,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Capability + Agent Metadata + Cedar Types
|
|
4
|
+
*
|
|
5
|
+
* The new consent screen renders operator-authored capabilities, each backed by
|
|
6
|
+
* a Cedar policy fragment. The label, description, icon, and risk level shown
|
|
7
|
+
* to the user are the human rendering of the same record.
|
|
8
|
+
*
|
|
9
|
+
* @module @kya-os/consent/types/capabilities
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
//# sourceMappingURL=capabilities.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.types.js","sourceRoot":"","sources":["../../../src/types/capabilities.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -28,4 +28,5 @@ __exportStar(require("./copy.types.js"), exports);
|
|
|
28
28
|
__exportStar(require("./modes.types.js"), exports);
|
|
29
29
|
__exportStar(require("./page.types.js"), exports);
|
|
30
30
|
__exportStar(require("./api.types.js"), exports);
|
|
31
|
+
__exportStar(require("./capabilities.types.js"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Action Bar
|
|
3
|
+
*
|
|
4
|
+
* Primary `Allow {Agent} →` (light theme) / `Allow access` (dark theme) +
|
|
5
|
+
* secondary `Not now` (light) / `Deny` (dark). Shared between the consent
|
|
6
|
+
* screen and the (future-migrated) gateway consent.
|
|
7
|
+
*
|
|
8
|
+
* Emits `consent-allow` and `consent-deny` events; the parent decides what to
|
|
9
|
+
* do (typically: submit the form on allow, close window on deny).
|
|
10
|
+
*
|
|
11
|
+
* @module components/consent-action-bar
|
|
12
|
+
*/
|
|
13
|
+
import { LitElement } from "lit";
|
|
14
|
+
import type { ConsentTheme } from "../types/capabilities.types.js";
|
|
15
|
+
export declare class ConsentActionBar extends LitElement {
|
|
16
|
+
agentName: string;
|
|
17
|
+
theme: ConsentTheme;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
static styles: import("lit").CSSResult;
|
|
21
|
+
private emitAllow;
|
|
22
|
+
private emitDeny;
|
|
23
|
+
render(): import("lit").TemplateResult<1>;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
"consent-action-bar": ConsentActionBar;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=consent-action-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,qBACa,gBAAiB,SAAQ,UAAU;IAClB,SAAS,SAAM;IACf,KAAK,EAAE,YAAY,CAAW;IAC7B,QAAQ,UAAS;IACjB,OAAO,UAAS;IAE7C,OAAgB,MAAM,0BAiDpB;IAEF,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,QAAQ;IAOP,MAAM;CA+BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Action Bar
|
|
3
|
+
*
|
|
4
|
+
* Primary `Allow {Agent} →` (light theme) / `Allow access` (dark theme) +
|
|
5
|
+
* secondary `Not now` (light) / `Deny` (dark). Shared between the consent
|
|
6
|
+
* screen and the (future-migrated) gateway consent.
|
|
7
|
+
*
|
|
8
|
+
* Emits `consent-allow` and `consent-deny` events; the parent decides what to
|
|
9
|
+
* do (typically: submit the form on allow, close window on deny).
|
|
10
|
+
*
|
|
11
|
+
* @module components/consent-action-bar
|
|
12
|
+
*/
|
|
13
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
17
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18
|
+
};
|
|
19
|
+
import { LitElement, html, css } from "lit";
|
|
20
|
+
import { customElement, property } from "lit/decorators.js";
|
|
21
|
+
import { CONSENT_COPY_TOKENS, formatToken } from "../copy/tokens.js";
|
|
22
|
+
let ConsentActionBar = class ConsentActionBar extends LitElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.agentName = "";
|
|
26
|
+
this.theme = "light";
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
this.loading = false;
|
|
29
|
+
}
|
|
30
|
+
emitAllow() {
|
|
31
|
+
if (this.disabled || this.loading)
|
|
32
|
+
return;
|
|
33
|
+
this.dispatchEvent(new CustomEvent("consent-allow", { bubbles: true, composed: true }));
|
|
34
|
+
}
|
|
35
|
+
emitDeny() {
|
|
36
|
+
if (this.loading)
|
|
37
|
+
return;
|
|
38
|
+
this.dispatchEvent(new CustomEvent("consent-deny", { bubbles: true, composed: true }));
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const allowLabel = this.theme === "dark"
|
|
42
|
+
? CONSENT_COPY_TOKENS.actions.allowAccess
|
|
43
|
+
: `${formatToken(CONSENT_COPY_TOKENS.actions.allowAgentTemplate, {
|
|
44
|
+
Agent: this.agentName || "this agent",
|
|
45
|
+
})} →`;
|
|
46
|
+
const denyLabel = this.theme === "dark"
|
|
47
|
+
? CONSENT_COPY_TOKENS.actions.deny
|
|
48
|
+
: CONSENT_COPY_TOKENS.actions.notNow;
|
|
49
|
+
return html `
|
|
50
|
+
<button
|
|
51
|
+
class="primary"
|
|
52
|
+
type="button"
|
|
53
|
+
?disabled=${this.disabled || this.loading}
|
|
54
|
+
@click=${this.emitAllow}
|
|
55
|
+
>
|
|
56
|
+
${allowLabel}
|
|
57
|
+
</button>
|
|
58
|
+
<button
|
|
59
|
+
class="secondary"
|
|
60
|
+
type="button"
|
|
61
|
+
?disabled=${this.loading}
|
|
62
|
+
@click=${this.emitDeny}
|
|
63
|
+
>
|
|
64
|
+
${denyLabel}
|
|
65
|
+
</button>
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
ConsentActionBar.styles = css `
|
|
70
|
+
:host {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 4px;
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
button {
|
|
78
|
+
width: 100%;
|
|
79
|
+
padding: 14px 18px;
|
|
80
|
+
border-radius: 999px;
|
|
81
|
+
font-size: 15px;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
font-family: inherit;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
transition: opacity 0.15s ease, transform 0.05s ease;
|
|
86
|
+
border: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
button:disabled {
|
|
90
|
+
opacity: 0.5;
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
button:focus-visible {
|
|
95
|
+
outline: 2px solid var(--cs-focus-ring, #0F172A);
|
|
96
|
+
outline-offset: 3px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.primary {
|
|
100
|
+
background: var(--cs-surface-accent, #0F172A);
|
|
101
|
+
color: var(--cs-surface-accent-text, #FFFFFF);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.primary:hover:not(:disabled) {
|
|
105
|
+
opacity: 0.92;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.secondary {
|
|
109
|
+
background: transparent;
|
|
110
|
+
color: var(--cs-text-secondary, #334155);
|
|
111
|
+
padding: 10px 18px;
|
|
112
|
+
font-weight: 500;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.secondary:hover:not(:disabled) {
|
|
116
|
+
color: var(--cs-text-primary, #0F172A);
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
__decorate([
|
|
120
|
+
property({ type: String })
|
|
121
|
+
], ConsentActionBar.prototype, "agentName", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: String })
|
|
124
|
+
], ConsentActionBar.prototype, "theme", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: Boolean })
|
|
127
|
+
], ConsentActionBar.prototype, "disabled", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property({ type: Boolean })
|
|
130
|
+
], ConsentActionBar.prototype, "loading", void 0);
|
|
131
|
+
ConsentActionBar = __decorate([
|
|
132
|
+
customElement("consent-action-bar")
|
|
133
|
+
], ConsentActionBar);
|
|
134
|
+
export { ConsentActionBar };
|
|
135
|
+
//# sourceMappingURL=consent-action-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-action-bar.js","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MA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