@kya-os/consent 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/README.md +182 -22
  2. package/dist/bundle/index.d.ts +4 -0
  3. package/dist/bundle/index.d.ts.map +1 -1
  4. package/dist/bundle/index.js +6 -0
  5. package/dist/bundle/index.js.map +1 -1
  6. package/dist/bundle/inline.d.ts.map +1 -1
  7. package/dist/bundle/inline.js +4 -4
  8. package/dist/bundle/inline.js.map +1 -1
  9. package/dist/cjs/bundle/index.js +15 -1
  10. package/dist/cjs/bundle/index.js.map +1 -1
  11. package/dist/cjs/bundle/inline.js +4 -4
  12. package/dist/cjs/bundle/inline.js.map +1 -1
  13. package/dist/cjs/components/consent-action-bar.js +97 -25
  14. package/dist/cjs/components/consent-action-bar.js.map +1 -1
  15. package/dist/cjs/components/consent-agent-header.js +7 -105
  16. package/dist/cjs/components/consent-agent-header.js.map +1 -1
  17. package/dist/cjs/components/consent-button.js +6 -1
  18. package/dist/cjs/components/consent-button.js.map +1 -1
  19. package/dist/cjs/components/consent-capabilities-screen.js +454 -68
  20. package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
  21. package/dist/cjs/components/consent-capability-card.js +131 -27
  22. package/dist/cjs/components/consent-capability-card.js.map +1 -1
  23. package/dist/cjs/components/consent-checkbox.js +7 -0
  24. package/dist/cjs/components/consent-checkbox.js.map +1 -1
  25. package/dist/cjs/components/consent-connector-header.js +206 -43
  26. package/dist/cjs/components/consent-connector-header.js.map +1 -1
  27. package/dist/cjs/components/consent-duration.js +1 -1
  28. package/dist/cjs/components/consent-footer.js +13 -12
  29. package/dist/cjs/components/consent-footer.js.map +1 -1
  30. package/dist/cjs/components/consent-headline.js +399 -33
  31. package/dist/cjs/components/consent-headline.js.map +1 -1
  32. package/dist/cjs/components/consent-oauth-button.js +71 -62
  33. package/dist/cjs/components/consent-oauth-button.js.map +1 -1
  34. package/dist/cjs/components/consent-otp-input.js +5 -0
  35. package/dist/cjs/components/consent-otp-input.js.map +1 -1
  36. package/dist/cjs/components/consent-phone-handoff.js +3 -3
  37. package/dist/cjs/components/consent-request-expiry.js +1 -1
  38. package/dist/cjs/components/consent-revocation-notice.js +4 -2
  39. package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
  40. package/dist/cjs/components/consent-revoke.js +9 -4
  41. package/dist/cjs/components/consent-revoke.js.map +1 -1
  42. package/dist/cjs/components/consent-secured-by.js +106 -0
  43. package/dist/cjs/components/consent-secured-by.js.map +1 -0
  44. package/dist/cjs/components/consent-shell.js +1 -1
  45. package/dist/cjs/components/consent-terms.js +7 -0
  46. package/dist/cjs/components/consent-terms.js.map +1 -1
  47. package/dist/cjs/components/consent-wallet-check.js +1 -1
  48. package/dist/cjs/components/consent-wallet-notice.js +1 -1
  49. package/dist/cjs/components/consent-wallet-orb.js +1 -1
  50. package/dist/cjs/components/consent-wallet-signature.js +1 -1
  51. package/dist/cjs/components/decision-icons.js +33 -0
  52. package/dist/cjs/components/decision-icons.js.map +1 -0
  53. package/dist/cjs/components/edit-region.js +309 -0
  54. package/dist/cjs/components/edit-region.js.map +1 -0
  55. package/dist/cjs/components/grant-field-styles.js +2 -2
  56. package/dist/cjs/components/index.js +4 -1
  57. package/dist/cjs/components/index.js.map +1 -1
  58. package/dist/cjs/components/mcp-consent.js +81 -36
  59. package/dist/cjs/components/mcp-consent.js.map +1 -1
  60. package/dist/cjs/components/preview.js +67 -0
  61. package/dist/cjs/components/preview.js.map +1 -0
  62. package/dist/cjs/constants/capabilities.js +12 -2
  63. package/dist/cjs/constants/capabilities.js.map +1 -1
  64. package/dist/cjs/copy/tokens.js +60 -21
  65. package/dist/cjs/copy/tokens.js.map +1 -1
  66. package/dist/cjs/identity/agent-identity.js +3 -2
  67. package/dist/cjs/identity/agent-identity.js.map +1 -1
  68. package/dist/cjs/mcp-app/inline.js +2 -2
  69. package/dist/cjs/mcp-app/inline.js.map +1 -1
  70. package/dist/cjs/react/index.js +11 -2
  71. package/dist/cjs/react/index.js.map +1 -1
  72. package/dist/cjs/styles/brand.js +385 -0
  73. package/dist/cjs/styles/brand.js.map +1 -0
  74. package/dist/cjs/styles/index.js +1 -0
  75. package/dist/cjs/styles/index.js.map +1 -1
  76. package/dist/cjs/styles/theme.js +100 -30
  77. package/dist/cjs/styles/theme.js.map +1 -1
  78. package/dist/cjs/types/capabilities.types.js +1 -2
  79. package/dist/cjs/types/capabilities.types.js.map +1 -1
  80. package/dist/cjs/types/decision.types.js +13 -0
  81. package/dist/cjs/types/decision.types.js.map +1 -0
  82. package/dist/cjs/types/edit.types.js +80 -0
  83. package/dist/cjs/types/edit.types.js.map +1 -0
  84. package/dist/cjs/types/index.js +2 -0
  85. package/dist/cjs/types/index.js.map +1 -1
  86. package/dist/components/consent-action-bar.d.ts +20 -1
  87. package/dist/components/consent-action-bar.d.ts.map +1 -1
  88. package/dist/components/consent-action-bar.js +97 -25
  89. package/dist/components/consent-action-bar.js.map +1 -1
  90. package/dist/components/consent-agent-header.d.ts +4 -17
  91. package/dist/components/consent-agent-header.d.ts.map +1 -1
  92. package/dist/components/consent-agent-header.js +7 -105
  93. package/dist/components/consent-agent-header.js.map +1 -1
  94. package/dist/components/consent-button.d.ts +2 -0
  95. package/dist/components/consent-button.d.ts.map +1 -1
  96. package/dist/components/consent-button.js +6 -1
  97. package/dist/components/consent-button.js.map +1 -1
  98. package/dist/components/consent-capabilities-screen.d.ts +85 -17
  99. package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
  100. package/dist/components/consent-capabilities-screen.js +456 -70
  101. package/dist/components/consent-capabilities-screen.js.map +1 -1
  102. package/dist/components/consent-capability-card.d.ts +23 -3
  103. package/dist/components/consent-capability-card.d.ts.map +1 -1
  104. package/dist/components/consent-capability-card.js +131 -27
  105. package/dist/components/consent-capability-card.js.map +1 -1
  106. package/dist/components/consent-checkbox.d.ts +2 -0
  107. package/dist/components/consent-checkbox.d.ts.map +1 -1
  108. package/dist/components/consent-checkbox.js +7 -0
  109. package/dist/components/consent-checkbox.js.map +1 -1
  110. package/dist/components/consent-connector-header.d.ts +39 -7
  111. package/dist/components/consent-connector-header.d.ts.map +1 -1
  112. package/dist/components/consent-connector-header.js +206 -43
  113. package/dist/components/consent-connector-header.js.map +1 -1
  114. package/dist/components/consent-duration.js +1 -1
  115. package/dist/components/consent-footer.d.ts +6 -4
  116. package/dist/components/consent-footer.d.ts.map +1 -1
  117. package/dist/components/consent-footer.js +13 -12
  118. package/dist/components/consent-footer.js.map +1 -1
  119. package/dist/components/consent-headline.d.ts +55 -16
  120. package/dist/components/consent-headline.d.ts.map +1 -1
  121. package/dist/components/consent-headline.js +398 -34
  122. package/dist/components/consent-headline.js.map +1 -1
  123. package/dist/components/consent-oauth-button.d.ts +7 -3
  124. package/dist/components/consent-oauth-button.d.ts.map +1 -1
  125. package/dist/components/consent-oauth-button.js +74 -65
  126. package/dist/components/consent-oauth-button.js.map +1 -1
  127. package/dist/components/consent-otp-input.d.ts.map +1 -1
  128. package/dist/components/consent-otp-input.js +5 -0
  129. package/dist/components/consent-otp-input.js.map +1 -1
  130. package/dist/components/consent-passkey.d.ts +6 -0
  131. package/dist/components/consent-passkey.d.ts.map +1 -1
  132. package/dist/components/consent-passkey.js +67 -9
  133. package/dist/components/consent-passkey.js.map +1 -1
  134. package/dist/components/consent-phone-handoff.js +3 -3
  135. package/dist/components/consent-request-expiry.js +1 -1
  136. package/dist/components/consent-revocation-notice.d.ts.map +1 -1
  137. package/dist/components/consent-revocation-notice.js +4 -2
  138. package/dist/components/consent-revocation-notice.js.map +1 -1
  139. package/dist/components/consent-revoke.d.ts +2 -0
  140. package/dist/components/consent-revoke.d.ts.map +1 -1
  141. package/dist/components/consent-revoke.js +9 -4
  142. package/dist/components/consent-revoke.js.map +1 -1
  143. package/dist/components/consent-secured-by.d.ts +25 -0
  144. package/dist/components/consent-secured-by.d.ts.map +1 -0
  145. package/dist/components/consent-secured-by.js +103 -0
  146. package/dist/components/consent-secured-by.js.map +1 -0
  147. package/dist/components/consent-shell.js +1 -1
  148. package/dist/components/consent-terms.d.ts +2 -0
  149. package/dist/components/consent-terms.d.ts.map +1 -1
  150. package/dist/components/consent-terms.js +7 -0
  151. package/dist/components/consent-terms.js.map +1 -1
  152. package/dist/components/consent-wallet-check.js +1 -1
  153. package/dist/components/consent-wallet-notice.js +1 -1
  154. package/dist/components/consent-wallet-orb.js +1 -1
  155. package/dist/components/consent-wallet-signature.js +1 -1
  156. package/dist/components/decision-icons.d.ts +22 -0
  157. package/dist/components/decision-icons.d.ts.map +1 -0
  158. package/dist/components/decision-icons.js +30 -0
  159. package/dist/components/decision-icons.js.map +1 -0
  160. package/dist/components/edit-region.d.ts +50 -0
  161. package/dist/components/edit-region.d.ts.map +1 -0
  162. package/dist/components/edit-region.js +305 -0
  163. package/dist/components/edit-region.js.map +1 -0
  164. package/dist/components/grant-field-styles.js +2 -2
  165. package/dist/components/index.d.ts +2 -1
  166. package/dist/components/index.d.ts.map +1 -1
  167. package/dist/components/index.js +2 -1
  168. package/dist/components/index.js.map +1 -1
  169. package/dist/components/mcp-consent.d.ts +15 -0
  170. package/dist/components/mcp-consent.d.ts.map +1 -1
  171. package/dist/components/mcp-consent.js +81 -36
  172. package/dist/components/mcp-consent.js.map +1 -1
  173. package/dist/components/preview.d.ts +38 -0
  174. package/dist/components/preview.d.ts.map +1 -0
  175. package/dist/components/preview.js +61 -0
  176. package/dist/components/preview.js.map +1 -0
  177. package/dist/consent.js +2104 -389
  178. package/dist/consent.min.js +1289 -497
  179. package/dist/constants/capabilities.d.ts +12 -3
  180. package/dist/constants/capabilities.d.ts.map +1 -1
  181. package/dist/constants/capabilities.js +12 -2
  182. package/dist/constants/capabilities.js.map +1 -1
  183. package/dist/copy/tokens.d.ts +60 -21
  184. package/dist/copy/tokens.d.ts.map +1 -1
  185. package/dist/copy/tokens.js +60 -21
  186. package/dist/copy/tokens.js.map +1 -1
  187. package/dist/identity/agent-identity.d.ts +3 -2
  188. package/dist/identity/agent-identity.d.ts.map +1 -1
  189. package/dist/identity/agent-identity.js +3 -2
  190. package/dist/identity/agent-identity.js.map +1 -1
  191. package/dist/mcp-app/inline.d.ts.map +1 -1
  192. package/dist/mcp-app/inline.js +2 -2
  193. package/dist/mcp-app/inline.js.map +1 -1
  194. package/dist/react/index.d.ts +6 -1
  195. package/dist/react/index.d.ts.map +1 -1
  196. package/dist/react/index.js +10 -1
  197. package/dist/react/index.js.map +1 -1
  198. package/dist/styles/brand.d.ts +184 -0
  199. package/dist/styles/brand.d.ts.map +1 -0
  200. package/dist/styles/brand.js +372 -0
  201. package/dist/styles/brand.js.map +1 -0
  202. package/dist/styles/index.d.ts +1 -0
  203. package/dist/styles/index.d.ts.map +1 -1
  204. package/dist/styles/index.js +1 -0
  205. package/dist/styles/index.js.map +1 -1
  206. package/dist/styles/theme.d.ts +73 -13
  207. package/dist/styles/theme.d.ts.map +1 -1
  208. package/dist/styles/theme.js +96 -29
  209. package/dist/styles/theme.js.map +1 -1
  210. package/dist/types/capabilities.types.d.ts +12 -14
  211. package/dist/types/capabilities.types.d.ts.map +1 -1
  212. package/dist/types/capabilities.types.js +1 -2
  213. package/dist/types/capabilities.types.js.map +1 -1
  214. package/dist/types/decision.types.d.ts +57 -0
  215. package/dist/types/decision.types.d.ts.map +1 -0
  216. package/dist/types/decision.types.js +12 -0
  217. package/dist/types/decision.types.js.map +1 -0
  218. package/dist/types/edit.types.d.ts +73 -0
  219. package/dist/types/edit.types.d.ts.map +1 -0
  220. package/dist/types/edit.types.js +76 -0
  221. package/dist/types/edit.types.js.map +1 -0
  222. package/dist/types/index.d.ts +2 -0
  223. package/dist/types/index.d.ts.map +1 -1
  224. package/dist/types/index.js +2 -0
  225. package/dist/types/index.js.map +1 -1
  226. package/package.json +2 -2
@@ -14,8 +14,8 @@
14
14
  * primary button can adopt operator brand color while the rest of the
15
15
  * surface stays in the chosen theme.
16
16
  *
17
- * The amber `HIGHER RISK` chip token is fixed across themes so the visual
18
- * stays recognizable regardless of org branding.
17
+ * The `HIGHER RISK` chip is amber in both themes, whatever the org's brand:
18
+ * a soft warning amber on the light card, and a solid amber on the dark one.
19
19
  *
20
20
  * The agent logo tile tokens are fixed across themes too: agent artwork is
21
21
  * drawn on a white tile with a light border in both themes, so a logo never
@@ -27,14 +27,29 @@
27
27
  * @module @kya-os/consent/styles/theme
28
28
  */
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.darkTheme = exports.lightTheme = void 0;
30
+ exports.darkTheme = exports.lightTheme = exports.TINT_LINE_PERCENT = exports.TINT_PERCENT = void 0;
31
31
  exports.getConsentTheme = getConsentTheme;
32
32
  exports.themeToCssVariables = themeToCssVariables;
33
+ exports.resolveThemeTokens = resolveThemeTokens;
34
+ exports.themeScopeStyle = themeScopeStyle;
35
+ exports.themeTokenProperty = themeTokenProperty;
33
36
  const FIXED_RISK_CHIP_BG = "#FCE7B6";
34
37
  const FIXED_RISK_CHIP_TEXT = "#7A4F00";
38
+ /** The light theme's risk chip: warning amber at 10% over the card, 5.8:1. */
39
+ const LIGHT_RISK_CHIP_BG = "rgba(140, 74, 0, 0.10)";
40
+ const LIGHT_RISK_CHIP_TEXT = "#8C4A00";
35
41
  const FIXED_AGENT_TILE_BG = "#FFFFFF";
36
42
  const FIXED_AGENT_TILE_BORDER = "rgba(15, 23, 42, 0.08)";
37
43
  const FIXED_AGENT_TILE_TEXT = "#0F172A";
44
+ /** The share of the brand (or the text, with no brand) in a tinted box. */
45
+ exports.TINT_PERCENT = 7;
46
+ /** The share of the brand (or the text) in a tinted box's edge. */
47
+ exports.TINT_LINE_PERCENT = 18;
48
+ /**
49
+ * The light theme. Its quietest text reaches 4.5:1 on the cream inset panel
50
+ * (4.54:1) as well as on the card, and its focus ring 3:1 on both, the
51
+ * ratios WCAG 1.4.3 and 1.4.11 ask for.
52
+ */
38
53
  exports.lightTheme = {
39
54
  surfaceBg: "#F4F1EA",
40
55
  surfaceCard: "#FFFFFF",
@@ -42,20 +57,17 @@ exports.lightTheme = {
42
57
  surfaceInset: "#F1ECE2",
43
58
  textPrimary: "#0F172A",
44
59
  textSecondary: "#334155",
45
- textTertiary: "#64748B",
60
+ textTertiary: "#5D6C82",
46
61
  surfaceAccent: "#0F172A",
47
62
  surfaceAccentText: "#FFFFFF",
48
- pillVerifiedBg: "#DCFCE7",
49
- pillVerifiedText: "#166534",
50
- pillUnverifiedBg: "#F1F5F9",
51
- pillUnverifiedText: "#475569",
52
- chipRiskBg: FIXED_RISK_CHIP_BG,
53
- chipRiskText: FIXED_RISK_CHIP_TEXT,
54
- focusRing: "rgba(15, 23, 42, 0.35)",
55
- cardShadow: "0 30px 80px -40px rgba(15, 23, 42, 0.40)",
63
+ chipRiskBg: LIGHT_RISK_CHIP_BG,
64
+ chipRiskText: LIGHT_RISK_CHIP_TEXT,
65
+ focusRing: "#0F172A",
66
+ cardShadow: "0 6px 20px -6px rgba(15, 23, 42, 0.10)",
56
67
  agentTileBg: FIXED_AGENT_TILE_BG,
57
68
  agentTileBorder: FIXED_AGENT_TILE_BORDER,
58
69
  agentTileText: FIXED_AGENT_TILE_TEXT,
70
+ lockup: "#0810FE",
59
71
  };
60
72
  exports.darkTheme = {
61
73
  surfaceBg: "#0B0808",
@@ -67,10 +79,6 @@ exports.darkTheme = {
67
79
  textTertiary: "#94A3B8",
68
80
  surfaceAccent: "#F8FAFC",
69
81
  surfaceAccentText: "#0F172A",
70
- pillVerifiedBg: "rgba(34, 197, 94, 0.16)",
71
- pillVerifiedText: "#86EFAC",
72
- pillUnverifiedBg: "rgba(148, 163, 184, 0.18)",
73
- pillUnverifiedText: "#CBD5E1",
74
82
  chipRiskBg: FIXED_RISK_CHIP_BG,
75
83
  chipRiskText: FIXED_RISK_CHIP_TEXT,
76
84
  focusRing: "rgba(248, 250, 252, 0.55)",
@@ -78,6 +86,7 @@ exports.darkTheme = {
78
86
  agentTileBg: FIXED_AGENT_TILE_BG,
79
87
  agentTileBorder: FIXED_AGENT_TILE_BORDER,
80
88
  agentTileText: FIXED_AGENT_TILE_TEXT,
89
+ warningText: "#FCD34D",
81
90
  };
82
91
  /**
83
92
  * Resolve a theme by name. Defaults to `light` for any unknown value.
@@ -88,27 +97,88 @@ function getConsentTheme(theme) {
88
97
  /**
89
98
  * Render a theme as a CSS string suitable for injecting into a `<style>` block
90
99
  * or `:host { ... }` rule. Each token becomes a `--cs-{kebab}` custom property.
91
- * Agent tile tokens a theme omits (or sets to undefined) are emitted with the
92
- * fixed white tile values, so the output never contains "undefined".
100
+ * Tokens a theme omits (or sets to undefined) are emitted with their fixed or
101
+ * derived values ({@link resolveThemeTokens}), so the output never contains
102
+ * "undefined".
93
103
  *
94
104
  * @example
95
105
  * themeToCssVariables(lightTheme);
96
106
  * // " --cs-surface-bg: #F4F1EA;\n ... \n --cs-agent-tile-bg: #FFFFFF;\n ..."
97
107
  */
98
108
  function themeToCssVariables(tokens) {
99
- const resolved = {
100
- ...tokens,
101
- agentTileBg: tokens.agentTileBg ?? FIXED_AGENT_TILE_BG,
102
- agentTileBorder: tokens.agentTileBorder ?? FIXED_AGENT_TILE_BORDER,
103
- agentTileText: tokens.agentTileText ?? FIXED_AGENT_TILE_TEXT,
104
- };
105
- const declarations = [];
106
- for (const [key, value] of Object.entries(resolved)) {
107
- declarations.push(` --cs-${camelToKebab(key)}: ${value};`);
109
+ return Object.entries(resolveThemeTokens(tokens))
110
+ .map(([key, value]) => ` ${themeTokenProperty(key)}: ${value};`)
111
+ .join("\n");
112
+ }
113
+ /**
114
+ * Every token of `tokens`, with the optional ones a theme omits filled in:
115
+ * the fixed agent tile, and a tint, mark and action color made from the
116
+ * theme's own text and card.
117
+ */
118
+ function resolveThemeTokens(tokens) {
119
+ const resolved = { ...tokens };
120
+ for (const key of FIXED_KEYS) {
121
+ resolved[key] = tokens[key] ?? FIXED_TOKENS[key];
122
+ }
123
+ for (const key of DERIVED_KEYS) {
124
+ resolved[key] = tokens[key] ?? DERIVED_TOKENS[key]((base) => tokens[base]);
108
125
  }
109
- return declarations.join("\n");
126
+ return resolved;
127
+ }
128
+ /**
129
+ * The CSS that themes an element's shadow tree while letting the page win: a
130
+ * `--cs-*` property the page sets, on the element or on any ancestor, is used
131
+ * as it is, and every other one comes from `tokens`.
132
+ *
133
+ * The element resolves each token once on `:host`, under a private name
134
+ * (`--_cs-*`), then publishes it under its public name on `scope`, the top
135
+ * elements of its shadow tree, so everything inside reads the public name as
136
+ * before. (The private step is what lets the public name take the page's
137
+ * value: a property cannot refer to itself.) A derived token the page does
138
+ * not set, such as the tint, is made from the resolved tokens, so a page that
139
+ * sets only its text and card colors gets a tint of those.
140
+ *
141
+ * @param tokens - The theme the element draws where the page sets nothing.
142
+ * @param scope - A selector list for the top elements of the shadow tree.
143
+ *
144
+ * @example
145
+ * themeScopeStyle(lightTheme, ".card");
146
+ * // ":host {\n --_cs-surface-bg: var(--cs-surface-bg, #F4F1EA);\n ... }
147
+ * // .card {\n --cs-surface-bg: var(--_cs-surface-bg);\n ... }"
148
+ */
149
+ function themeScopeStyle(tokens, scope) {
150
+ const resolved = resolveThemeTokens(tokens);
151
+ const keys = Object.keys(resolved);
152
+ const resolvedName = (key) => `--_${themeTokenProperty(key).slice(2)}`;
153
+ const isDerived = (key) => DERIVED_KEYS.includes(key);
154
+ const fallback = (key) => isDerived(key) && tokens[key] === undefined
155
+ ? DERIVED_TOKENS[key]((base) => `var(${resolvedName(base)})`)
156
+ : resolved[key];
157
+ const resolve = keys.map((key) => ` ${resolvedName(key)}: var(${themeTokenProperty(key)}, ${fallback(key)});`);
158
+ const publish = keys.map((key) => ` ${themeTokenProperty(key)}: var(${resolvedName(key)});`);
159
+ return `:host {\n${resolve.join("\n")}\n}\n${scope} {\n${publish.join("\n")}\n}`;
110
160
  }
111
- function camelToKebab(value) {
112
- return value.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
161
+ const FIXED_TOKENS = {
162
+ agentTileBg: FIXED_AGENT_TILE_BG,
163
+ agentTileBorder: FIXED_AGENT_TILE_BORDER,
164
+ agentTileText: FIXED_AGENT_TILE_TEXT,
165
+ };
166
+ const FIXED_KEYS = Object.keys(FIXED_TOKENS);
167
+ /**
168
+ * How each derived token is made, given how to name a base token: its value
169
+ * in a theme object, or the property it resolves to in a shadow tree.
170
+ */
171
+ const DERIVED_TOKENS = {
172
+ tint: (token) => `color-mix(in srgb, ${token("textPrimary")} ${exports.TINT_PERCENT}%, ${token("surfaceCard")})`,
173
+ tintLine: (token) => `color-mix(in srgb, ${token("textPrimary")} ${exports.TINT_LINE_PERCENT}%, ${token("surfaceCard")})`,
174
+ mark: (token) => token("textPrimary"),
175
+ action: (token) => token("textPrimary"),
176
+ lockup: (token) => token("textPrimary"),
177
+ warningText: (token) => token("chipRiskText"),
178
+ };
179
+ const DERIVED_KEYS = Object.keys(DERIVED_TOKENS);
180
+ /** The custom property a theme key is published as: `tintLine` is `--cs-tint-line`. */
181
+ function themeTokenProperty(key) {
182
+ return `--cs-${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;
113
183
  }
114
184
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/styles/theme.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAwIH,0CAEC;AAYD,kDAYC;AAjFD,MAAM,kBAAkB,GAAG,SAAS,CAAC;AACrC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AACvC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AACzD,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAE3B,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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vC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;CAC9C,CAAC;AACF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAsB,CAAC;AAEtE,uFAAuF;AACvF,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,OAAO,QAAQ,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC;AACvE,CAAC"}
@@ -46,8 +46,7 @@ const AGENT_VERIFICATIONS = [
46
46
  *
47
47
  * `verification` wins when it is one of the three states; otherwise the
48
48
  * deprecated `verified` boolean reads as `verified` or `unverified`. A
49
- * `domain` state with no domain to name reads as `unverified`, so the header
50
- * never shows an empty pill.
49
+ * `domain` state with no domain to name reads as `unverified`.
51
50
  */
52
51
  function agentVerification(agent) {
53
52
  const stated = agent.verification;
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.types.js","sourceRoot":"","sources":["../../../src/types/capabilities.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAiDH,0CAEC;AA2BD,8CAQC;AA6BD,0CAUC;AAjGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,eAAe,CAAC,SAAoB;IAClD,OAAO,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,QAAQ,CAAC;AACvD,CAAC;AAaD,MAAM,mBAAmB,GAAiC;IACxD,UAAU;IACV,QAAQ;IACR,YAAY;CACb,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,KAAkE;IAElE,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAA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AAI,MAAM,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9E,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,oBAAoB,CAAC,KAAa;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,eAAe,CAC7B,KAAsC;IAEtC,OAAO,CACL,CAAC,KAAK;QACN,iBAAiB,CAAC,KAAK,CAAC,KAAK,UAAU;QACvC,KAAK,CAAC,QAAQ,KAAK,KAAK;QACxB,CAAC,KAAK,CAAC,WAAW;QAClB,CAAC,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,CACzC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * What the capabilities screen shows beside the permissions: who is signing
4
+ * in, and what the grant connects to and how it is bounded.
5
+ *
6
+ * The host words every value. The screen lays them out and never formats a
7
+ * time, an amount or a duration itself, so the host keeps its own locale,
8
+ * time zone and rules (such as leaving out a budget beside a per-call limit).
9
+ *
10
+ * @module types/decision
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=decision.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision.types.js","sourceRoot":"","sources":["../../../src/types/decision.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * Edit Mode Types
4
+ *
5
+ * The words a person can edit in place on a screen in edit mode (`preview`
6
+ * and `editable` together), each named by a key. A region sends
7
+ * `consent-edit` with `{ key, value }` on every keystroke and
8
+ * `consent-edit-end` when it is left; the host writes the value to its own
9
+ * data and passes the result back, as it would for any other change.
10
+ *
11
+ * @module types/edit
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.CONSENT_EDIT_EVENTS = exports.CONSENT_EDIT_KEYS = void 0;
15
+ exports.parseConsentEditKey = parseConsentEditKey;
16
+ /** The fixed keys, and builders for the keys that name a row. */
17
+ exports.CONSENT_EDIT_KEYS = {
18
+ /** The subhead under the headline. */
19
+ description: "description",
20
+ /** The organization's name in the headline. */
21
+ orgName: "org-name",
22
+ /** The Allow button's label. */
23
+ submitLabel: "submit-label",
24
+ /** The Deny button's label. */
25
+ cancelLabel: "cancel-label",
26
+ /** A headline a host words itself, in the `headline` slot. */
27
+ headline: "headline",
28
+ /** The title of a page a host draws after the decision. */
29
+ terminalTitle: "terminal:title",
30
+ /** The body of a page a host draws after the decision. */
31
+ terminalBody: "terminal:body",
32
+ /** A capability row's label, by the capability's id. */
33
+ capabilityLabel: (id) => `capability:${id}:label`,
34
+ /** A capability row's description, by the capability's id. */
35
+ capabilityDescription: (id) => `capability:${id}:description`,
36
+ };
37
+ /** The events a region sends. Both bubble and cross shadow roots. */
38
+ exports.CONSENT_EDIT_EVENTS = {
39
+ /** On every change to a region's text. */
40
+ edit: "consent-edit",
41
+ /** When a person leaves a region they changed, for hosts that group undo. */
42
+ end: "consent-edit-end",
43
+ };
44
+ const FIXED_KEYS = new Set([
45
+ exports.CONSENT_EDIT_KEYS.description,
46
+ exports.CONSENT_EDIT_KEYS.orgName,
47
+ exports.CONSENT_EDIT_KEYS.submitLabel,
48
+ exports.CONSENT_EDIT_KEYS.cancelLabel,
49
+ exports.CONSENT_EDIT_KEYS.headline,
50
+ exports.CONSENT_EDIT_KEYS.terminalTitle,
51
+ exports.CONSENT_EDIT_KEYS.terminalBody,
52
+ ]);
53
+ const CAPABILITY_PREFIX = "capability:";
54
+ const CAPABILITY_SUFFIXES = [
55
+ [":label", "capability-label"],
56
+ [":description", "capability-description"],
57
+ ];
58
+ /**
59
+ * What a key names, or null for a string that is not a key. A capability id
60
+ * may itself hold colons: everything between the prefix and the last part
61
+ * (`:label` or `:description`) is the id.
62
+ */
63
+ function parseConsentEditKey(key) {
64
+ if (FIXED_KEYS.has(key)) {
65
+ return { kind: key };
66
+ }
67
+ if (!key.startsWith(CAPABILITY_PREFIX))
68
+ return null;
69
+ for (const [suffix, kind] of CAPABILITY_SUFFIXES) {
70
+ if (key.endsWith(suffix) &&
71
+ key.length > CAPABILITY_PREFIX.length + suffix.length) {
72
+ return {
73
+ kind,
74
+ capabilityId: key.slice(CAPABILITY_PREFIX.length, -suffix.length),
75
+ };
76
+ }
77
+ }
78
+ return null;
79
+ }
80
+ //# sourceMappingURL=edit.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.types.js","sourceRoot":"","sources":["../../../src/types/edit.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAqGH,kDAiBC;AApHD,iEAAiE;AACpD,QAAA,iBAAiB,GAAG;IAC/B,sCAAsC;IACtC,WAAW,EAAE,aAAa;IAC1B,+CAA+C;IAC/C,OAAO,EAAE,UAAU;IACnB,gCAAgC;IAChC,WAAW,EAAE,cAAc;IAC3B,+BAA+B;IAC/B,WAAW,EAAE,cAAc;IAC3B,8DAA8D;IAC9D,QAAQ,EAAE,UAAU;IACpB,2DAA2D;IAC3D,aAAa,EAAE,gBAAgB;IAC/B,0DAA0D;IAC1D,YAAY,EAAE,eAAe;IAC7B,wDAAwD;IACxD,eAAe,EAAE,CAAC,EAAU,EAA0B,EAAE,CACtD,cAAc,EAAE,QAAQ;IAC1B,8DAA8D;IAC9D,qBAAqB,EAAE,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OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -29,4 +29,6 @@ __exportStar(require("./modes.types.js"), exports);
29
29
  __exportStar(require("./page.types.js"), exports);
30
30
  __exportStar(require("./api.types.js"), exports);
31
31
  __exportStar(require("./capabilities.types.js"), exports);
32
+ __exportStar(require("./edit.types.js"), exports);
33
+ __exportStar(require("./decision.types.js"), exports);
32
34
  //# 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;AAC/B,0DAAwC"}
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;AACxC,kDAAgC;AAChC,sDAAoC"}
@@ -14,16 +14,22 @@
14
14
  *
15
15
  * Parts: `submit`, `submit-icon`, `cancel`.
16
16
  *
17
+ * With `preview` the buttons send no event. In edit mode (`preview` and
18
+ * `editable`) they draw as boxes of the same size with the same parts, and
19
+ * each label is a region a person types into, keyed `submit-label` and
20
+ * `cancel-label`: a region never sits inside a button.
21
+ *
17
22
  * @module components/consent-action-bar
18
23
  */
19
24
  import { LitElement } from "lit";
20
25
  import type { ConsentTheme } from "../types/capabilities.types.js";
26
+ import { type ConsentEditSource } from "../types/edit.types.js";
21
27
  /** A mark before the submit label. */
22
28
  export type ActionBarSubmitIcon = "" | "passkey";
23
29
  /**
24
30
  * @fires consent-allow - The person allowed.
25
31
  * @fires consent-deny - The person denied.
26
- * @cssprop --cs-action-radius - The buttons' corners (default: 999px).
32
+ * @cssprop --cs-action-radius - The buttons' corners (default: 6px).
27
33
  */
28
34
  export declare class ConsentActionBar extends LitElement {
29
35
  agentName: string;
@@ -36,10 +42,23 @@ export declare class ConsentActionBar extends LitElement {
36
42
  submitIcon: ActionBarSubmitIcon;
37
43
  /** The submit label while `loading`, e.g. "Signing…". */
38
44
  loadingLabel: string;
45
+ /** Draws as it would live, and sends no `consent-allow` or `consent-deny`. */
46
+ preview: boolean;
47
+ /** With `preview`: the labels can be edited in place. */
48
+ editable: boolean;
49
+ /** The raw text each region edits, by key. See `ConsentEditSource`. */
50
+ editSource: ConsentEditSource | undefined;
39
51
  static styles: import("lit").CSSResult;
52
+ willUpdate(): void;
40
53
  private emitAllow;
41
54
  private emitDeny;
42
55
  render(): import("lit").TemplateResult<1>;
56
+ /**
57
+ * Edit mode: the buttons as boxes with the same classes and parts, each
58
+ * label a region. A disabled Allow looks disabled, as it would live.
59
+ */
60
+ private renderBoxes;
61
+ private renderSubmitIcon;
43
62
  }
44
63
  declare global {
45
64
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"consent-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAGnE,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG,EAAE,GAAG,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAClB,SAAS,SAAM;IACf,KAAK,EAAE,YAAY,CAAW;IAC7B,QAAQ,UAAS;IACjB,OAAO,UAAS;IACU,WAAW,SAAM;IACjB,WAAW,SAAM;IACxE,wDAAwD;IAExD,UAAU,EAAE,mBAAmB,CAAM;IACrC,yDAAyD;IACD,YAAY,SAAM;IAE1E,OAAgB,MAAM,0BA8DpB;IAEF,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,QAAQ;IAOP,MAAM;CAmDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
1
+ {"version":3,"file":"consent-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAKhC,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG,EAAE,GAAG,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAClB,SAAS,SAAM;IACf,KAAK,EAAE,YAAY,CAAW;IAC7B,QAAQ,UAAS;IACjB,OAAO,UAAS;IACU,WAAW,SAAM;IACjB,WAAW,SAAM;IACxE,wDAAwD;IAExD,UAAU,EAAE,mBAAmB,CAAM;IACrC,yDAAyD;IACD,YAAY,SAAM;IAC1E,8EAA8E;IAClC,OAAO,UAAS;IAC5D,yDAAyD;IACb,QAAQ,UAAS;IAC7D,uEAAuE;IACvC,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE1E,OAAgB,MAAM,0BAkFpB;IAEO,UAAU,IAAI,IAAI;IAI3B,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,QAAQ;IAOP,MAAM;IAwCf;;;OAGG;IACH,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,gBAAgB;CAgBzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
@@ -14,6 +14,11 @@
14
14
  *
15
15
  * Parts: `submit`, `submit-icon`, `cancel`.
16
16
  *
17
+ * With `preview` the buttons send no event. In edit mode (`preview` and
18
+ * `editable`) they draw as boxes of the same size with the same parts, and
19
+ * each label is a region a person types into, keyed `submit-label` and
20
+ * `cancel-label`: a region never sits inside a button.
21
+ *
17
22
  * @module components/consent-action-bar
18
23
  */
19
24
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -25,11 +30,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
25
30
  import { LitElement, html, css, nothing } from "lit";
26
31
  import { customElement, property } from "lit/decorators.js";
27
32
  import { CONSENT_COPY_TOKENS, formatToken } from "../copy/tokens.js";
33
+ import { CONSENT_EDIT_KEYS, } from "../types/edit.types.js";
34
+ import { editRegion, editRegionStyles } from "./edit-region.js";
35
+ import { isEditing, warnIfEditableWithoutPreview } from "./preview.js";
28
36
  import { fingerprintIcon } from "./wallet-icons.js";
29
37
  /**
30
38
  * @fires consent-allow - The person allowed.
31
39
  * @fires consent-deny - The person denied.
32
- * @cssprop --cs-action-radius - The buttons' corners (default: 999px).
40
+ * @cssprop --cs-action-radius - The buttons' corners (default: 6px).
33
41
  */
34
42
  let ConsentActionBar = class ConsentActionBar extends LitElement {
35
43
  constructor() {
@@ -44,14 +52,21 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
44
52
  this.submitIcon = "";
45
53
  /** The submit label while `loading`, e.g. "Signing…". */
46
54
  this.loadingLabel = "";
55
+ /** Draws as it would live, and sends no `consent-allow` or `consent-deny`. */
56
+ this.preview = false;
57
+ /** With `preview`: the labels can be edited in place. */
58
+ this.editable = false;
59
+ }
60
+ willUpdate() {
61
+ warnIfEditableWithoutPreview(this);
47
62
  }
48
63
  emitAllow() {
49
- if (this.disabled || this.loading)
64
+ if (this.disabled || this.loading || this.preview)
50
65
  return;
51
66
  this.dispatchEvent(new CustomEvent("consent-allow", { bubbles: true, composed: true }));
52
67
  }
53
68
  emitDeny() {
54
- if (this.loading)
69
+ if (this.loading || this.preview)
55
70
  return;
56
71
  this.dispatchEvent(new CustomEvent("consent-deny", { bubbles: true, composed: true }));
57
72
  }
@@ -67,32 +82,20 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
67
82
  (this.theme === "dark"
68
83
  ? CONSENT_COPY_TOKENS.actions.deny
69
84
  : CONSENT_COPY_TOKENS.actions.notNow);
85
+ if (isEditing(this))
86
+ return this.renderBoxes(allowLabel, denyLabel);
70
87
  return html `
71
88
  <button
72
- class="primary"
89
+ class="action primary"
73
90
  part="submit"
74
91
  type="button"
75
92
  ?disabled=${this.disabled || this.loading}
76
93
  @click=${this.emitAllow}
77
94
  >
78
- ${this.submitIcon === "passkey"
79
- ? html `<svg
80
- part="submit-icon"
81
- class="submit-icon"
82
- viewBox="0 0 24 24"
83
- fill="none"
84
- stroke="currentColor"
85
- stroke-width="2"
86
- stroke-linecap="round"
87
- stroke-linejoin="round"
88
- aria-hidden="true"
89
- >
90
- ${fingerprintIcon}
91
- </svg>`
92
- : nothing}${submitLabel}
95
+ ${this.renderSubmitIcon()}${submitLabel}
93
96
  </button>
94
97
  <button
95
- class="secondary"
98
+ class="action secondary"
96
99
  part="cancel"
97
100
  type="button"
98
101
  ?disabled=${this.loading}
@@ -102,8 +105,50 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
102
105
  </button>
103
106
  `;
104
107
  }
108
+ /**
109
+ * Edit mode: the buttons as boxes with the same classes and parts, each
110
+ * label a region. A disabled Allow looks disabled, as it would live.
111
+ */
112
+ renderBoxes(allowLabel, denyLabel) {
113
+ const tokens = CONSENT_COPY_TOKENS.editRegions;
114
+ return html `
115
+ <div
116
+ class="action primary${this.disabled || this.loading
117
+ ? " disabled"
118
+ : ""}"
119
+ part="submit"
120
+ >
121
+ ${this.renderSubmitIcon()}${editRegion(CONSENT_EDIT_KEYS.submitLabel, tokens.submitLabel, allowLabel, this.editSource)}
122
+ </div>
123
+ <div
124
+ class="action secondary${this.loading ? " disabled" : ""}"
125
+ part="cancel"
126
+ >
127
+ ${editRegion(CONSENT_EDIT_KEYS.cancelLabel, tokens.cancelLabel, denyLabel, this.editSource)}
128
+ </div>
129
+ `;
130
+ }
131
+ renderSubmitIcon() {
132
+ if (this.submitIcon !== "passkey")
133
+ return nothing;
134
+ return html `<svg
135
+ part="submit-icon"
136
+ class="submit-icon"
137
+ viewBox="0 0 24 24"
138
+ fill="none"
139
+ stroke="currentColor"
140
+ stroke-width="2"
141
+ stroke-linecap="round"
142
+ stroke-linejoin="round"
143
+ aria-hidden="true"
144
+ >
145
+ ${fingerprintIcon}
146
+ </svg>`;
147
+ }
105
148
  };
106
149
  ConsentActionBar.styles = css `
150
+ ${editRegionStyles}
151
+
107
152
  :host {
108
153
  display: flex;
109
154
  flex-direction: column;
@@ -111,13 +156,25 @@ ConsentActionBar.styles = css `
111
156
  width: 100%;
112
157
  }
113
158
 
114
- button {
159
+ /* A button, or in edit mode a box, set out in full so both draw alike. */
160
+ .action {
161
+ box-sizing: border-box;
162
+ display: block;
115
163
  width: 100%;
164
+ margin: 0;
116
165
  padding: 14px 18px;
117
- border-radius: var(--cs-action-radius, 999px);
166
+ border-radius: var(--cs-action-radius, 6px);
118
167
  font-size: var(--cs-action-font-size, 15px);
119
168
  font-weight: 500;
120
169
  font-family: inherit;
170
+ font-style: normal;
171
+ line-height: normal;
172
+ letter-spacing: normal;
173
+ word-spacing: normal;
174
+ text-align: center;
175
+ text-indent: 0;
176
+ text-transform: none;
177
+ text-shadow: none;
121
178
  cursor: pointer;
122
179
  transition:
123
180
  opacity 0.15s ease,
@@ -125,11 +182,17 @@ ConsentActionBar.styles = css `
125
182
  border: none;
126
183
  }
127
184
 
128
- button:disabled {
185
+ .action:disabled,
186
+ .action.disabled {
129
187
  opacity: 0.5;
130
188
  cursor: not-allowed;
131
189
  }
132
190
 
191
+ div.action,
192
+ div.action.disabled {
193
+ cursor: default;
194
+ }
195
+
133
196
  button:focus-visible {
134
197
  outline: 2px solid var(--cs-focus-ring, #0f172a);
135
198
  outline-offset: 3px;
@@ -145,7 +208,7 @@ ConsentActionBar.styles = css `
145
208
  color: var(--cs-surface-accent-text, #ffffff);
146
209
  }
147
210
 
148
- .primary:hover:not(:disabled) {
211
+ button.primary:hover:not(:disabled) {
149
212
  opacity: 0.92;
150
213
  }
151
214
 
@@ -162,7 +225,7 @@ ConsentActionBar.styles = css `
162
225
  font-weight: 500;
163
226
  }
164
227
 
165
- .secondary:hover:not(:disabled) {
228
+ button.secondary:hover:not(:disabled) {
166
229
  color: var(--cs-text-primary, #0f172a);
167
230
  }
168
231
  `;
@@ -190,6 +253,15 @@ __decorate([
190
253
  __decorate([
191
254
  property({ type: String, attribute: "loading-label" })
192
255
  ], ConsentActionBar.prototype, "loadingLabel", void 0);
256
+ __decorate([
257
+ property({ type: Boolean, reflect: true })
258
+ ], ConsentActionBar.prototype, "preview", void 0);
259
+ __decorate([
260
+ property({ type: Boolean, reflect: true })
261
+ ], ConsentActionBar.prototype, "editable", void 0);
262
+ __decorate([
263
+ property({ attribute: false })
264
+ ], ConsentActionBar.prototype, "editSource", void 0);
193
265
  ConsentActionBar = __decorate([
194
266
  customElement("consent-action-bar")
195
267
  ], ConsentActionBar);
@@ -1 +1 @@
1
- {"version":3,"file":"consent-action-bar.js","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpD;;;;GAIG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QACuB,cAAS,GAAG,EAAE,CAAC;QACf,UAAK,GAA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