@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
@@ -1 +1 @@
1
- {"version":3,"file":"inline.js","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAW,u+h1BAAu+h1B,CAAC;AAEphi1B,4CAA4C;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAW,MAAM,CAAC"}
1
+ {"version":3,"file":"inline.js","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAW,02x3BAA02x3B,CAAC;AAEv5x3B,4CAA4C;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAW,MAAM,CAAC"}
@@ -33,6 +33,7 @@ import { ConsentConnectorHeader } from "../components/consent-connector-header.j
33
33
  import { ConsentActionBar } from "../components/consent-action-bar.js";
34
34
  import { ConsentRevocationNotice } from "../components/consent-revocation-notice.js";
35
35
  import { ConsentFooter } from "../components/consent-footer.js";
36
+ import { ConsentSecuredBy } from "../components/consent-secured-by.js";
36
37
  import { ConsentDuration, type DurationChangeDetail } from "../components/consent-duration.js";
37
38
  import { ConsentFolderScope, type FolderScopeChangeDetail } from "../components/consent-folder-scope.js";
38
39
  import { ConsentGrantTerms, type GrantTermsChangeDetail } from "../components/consent-grant-terms.js";
@@ -181,7 +182,7 @@ export declare const ConsentCapabilityCardReact: import("@lit/react").ReactWebCo
181
182
  onToggle: EventName<CustomEvent<CapabilityToggleDetail>>;
182
183
  }>;
183
184
  /**
184
- * React wrapper for consent-agent-header, the agent's name, pill and meta line.
185
+ * React wrapper for consent-agent-header, the agent's name, logo and meta line.
185
186
  */
186
187
  export declare const ConsentAgentHeaderReact: import("@lit/react").ReactWebComponent<ConsentAgentHeader, {}>;
187
188
  /**
@@ -209,6 +210,10 @@ export declare const ConsentRevocationNoticeReact: import("@lit/react").ReactWeb
209
210
  * React wrapper for consent-footer.
210
211
  */
211
212
  export declare const ConsentFooterReact: import("@lit/react").ReactWebComponent<ConsentFooter, {}>;
213
+ /**
214
+ * React wrapper for consent-secured-by, "Secured by" and the Vouched lockup.
215
+ */
216
+ export declare const ConsentSecuredByReact: import("@lit/react").ReactWebComponent<ConsentSecuredBy, {}>;
212
217
  /**
213
218
  * React wrapper for consent-duration, how long a grant lasts.
214
219
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAI7D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,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,CAAC;AAChE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
@@ -38,6 +38,7 @@ import { ConsentConnectorHeader } from "../components/consent-connector-header.j
38
38
  import { ConsentActionBar } from "../components/consent-action-bar.js";
39
39
  import { ConsentRevocationNotice } from "../components/consent-revocation-notice.js";
40
40
  import { ConsentFooter } from "../components/consent-footer.js";
41
+ import { ConsentSecuredBy } from "../components/consent-secured-by.js";
41
42
  // Grant terms and taking a grant back
42
43
  import { ConsentDuration, } from "../components/consent-duration.js";
43
44
  import { ConsentFolderScope, } from "../components/consent-folder-scope.js";
@@ -226,7 +227,7 @@ export const ConsentCapabilityCardReact = createComponent({
226
227
  },
227
228
  });
228
229
  /**
229
- * React wrapper for consent-agent-header, the agent's name, pill and meta line.
230
+ * React wrapper for consent-agent-header, the agent's name, logo and meta line.
230
231
  */
231
232
  export const ConsentAgentHeaderReact = createComponent({
232
233
  tagName: "consent-agent-header",
@@ -279,6 +280,14 @@ export const ConsentFooterReact = createComponent({
279
280
  elementClass: ConsentFooter,
280
281
  react: React,
281
282
  });
283
+ /**
284
+ * React wrapper for consent-secured-by, "Secured by" and the Vouched lockup.
285
+ */
286
+ export const ConsentSecuredByReact = createComponent({
287
+ tagName: "consent-secured-by",
288
+ elementClass: ConsentSecuredBy,
289
+ react: React,
290
+ });
282
291
  // ============================================================================
283
292
  // Grant Terms and Revoke Wrappers
284
293
  // ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAkB,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,kBAAkB;A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M,qBAAqB,GAAG,eAAe,CAAC;IACnD,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,KAAK;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,sBAAsB;IAC/B,YAAY,EAAE,kBAAkB;IAChC,KAAK,EAAE,KAAK;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACtD,OAAO,EAAE,uBAAuB;IAChC,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE,KAAK;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC;IACzD,OAAO,EAAE,0BAA0B;IACnC,YAAY,EAAE,sBAAsB;IACpC,KAAK,EAAE,KAAK;CACb,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC;IACvD,OAAO,EAAE,wBAAwB;IACjC,YAAY,EAAE,oBAAoB;IAClC,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,SAAS,EAAE,yBAEV;KACF;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACtD,OAAO,EAAE,uBAAuB;IAChC,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE,KAAK;CACb,CAAC,CAAC"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Brand Colors on the Consent Screens
3
+ *
4
+ * A host's brand is operator data: a primary color, maybe a secondary, and
5
+ * maybe the page's own colors (card, panel, border, text, quieter text, focus
6
+ * ring). These turn it into the `--cs-*` properties the screens read, each
7
+ * one checked so it reads:
8
+ *
9
+ * - a word in the brand (an action) reaches 4.5:1 (WCAG 1.4.3) on the card
10
+ * and on the brand's tint, else it is drawn in the text color;
11
+ * - a mark or focus ring in the brand reaches 3:1 (WCAG 1.4.11), else the
12
+ * text color;
13
+ * - an icon in the secondary keeps its hue and moves darker or lighter,
14
+ * whichever is nearer, until it reaches 3:1 on every surface an icon sits on;
15
+ * - a page color that would not read is dropped, and the theme's is drawn.
16
+ *
17
+ * `brandTokens(brand)` returns the properties; set them on any element above
18
+ * the screens (a style attribute is enough) and the screens take them.
19
+ * Everything here is pure: importing it defines no element.
20
+ *
21
+ * Unless a brand chooses its own page colors, these judge against the light
22
+ * theme's surfaces.
23
+ *
24
+ * @module @kya-os/consent/styles/brand
25
+ */
26
+ /** WCAG 1.4.11's ratio for a graphic or a focus indicator. */
27
+ export declare const AA_GRAPHIC_CONTRAST = 3;
28
+ /** The share of the primary in an icon's tile. */
29
+ export declare const ICON_TILE_PERCENT = 8;
30
+ /** The share of the primary in a hovered row under that tile. */
31
+ export declare const HOVERED_ROW_PERCENT = 4;
32
+ /** The share of the text in the quieter text the page draws from it. */
33
+ export declare const MUTED_TEXT_PERCENT = 64;
34
+ /** The share of the text in a panel made for a chosen card with no panel chosen. */
35
+ export declare const PANEL_TINT_PERCENT = 4;
36
+ /** What the page draws where a brand chooses nothing: the light theme. */
37
+ export interface DrawnColors {
38
+ /** The card. */
39
+ surface: string;
40
+ /** The panel inside the card, such as the revocation notice. */
41
+ panel: string;
42
+ /** The text. */
43
+ text: string;
44
+ /** The quieter text, drawn when the brand chooses no text of its own. */
45
+ mutedText: string;
46
+ }
47
+ /** The light theme's own colors, all `#rrggbb`. */
48
+ export declare const LIGHT_DRAWN_COLORS: Readonly<DrawnColors>;
49
+ /** The page colors a brand may choose, one color per field. */
50
+ export declare const PALETTE_FIELDS: readonly ["surfaceColor", "panelColor", "borderColor", "textColor", "mutedTextColor", "focusColor"];
51
+ export type PaletteField = (typeof PALETTE_FIELDS)[number];
52
+ /** The page colors a brand chose, each `#rrggbb`. A field it did not choose is absent. */
53
+ export type ConsentPalette = Partial<Record<PaletteField, string>>;
54
+ /** One pair of the page's colors that does not reach the contrast it needs. */
55
+ export interface PaletteFailure {
56
+ /** What is drawn: the brand's color, or the page's own when the brand chose none. */
57
+ foreground: "textColor" | "mutedTextColor" | "focusColor";
58
+ /** What it is drawn on, the same way. */
59
+ background: "surfaceColor" | "panelColor";
60
+ /** The pair's contrast, rounded down to two places so it never reads as its need. */
61
+ ratio: number;
62
+ /** What the pair must reach: 4.5 for text, 3 for the focus ring. */
63
+ needs: number;
64
+ }
65
+ /** A brand as `brandTokens` takes it: every color `#rrggbb`. */
66
+ export interface ConsentBrandColors extends ConsentPalette {
67
+ /** The brand color: the primary action, the tint, and marks that read in it. */
68
+ primaryColor: string;
69
+ /** A color the brand chose for icons. Absent: icons keep the theme's colors. */
70
+ secondaryColor?: string;
71
+ }
72
+ /**
73
+ * `top` at `percent` over the opaque `under`, as a browser composites it
74
+ * (both `#rrggbb`).
75
+ *
76
+ * @example
77
+ * mixOver("#000000", 50, "#ffffff"); // "#808080"
78
+ */
79
+ export declare function mixOver(top: string, percent: number, under: string): string;
80
+ /**
81
+ * What an icon is drawn in, for a chosen secondary (`hex`) under a primary:
82
+ * the secondary itself when it shows at 3:1 on everything an icon sits on
83
+ * (the card, the panel, and the primary's icon tile at rest and on a hovered
84
+ * row), else the same hue and saturation at the nearest lightness that does,
85
+ * darker or lighter. Light surfaces push it darker and dark ones lighter, so a
86
+ * dark palette gets a light icon. When no lightness shows on all of them, the
87
+ * icon is black or white, whichever reads better on the worst of them.
88
+ *
89
+ * @example
90
+ * iconColorFor("#1e3a5f", "#111111"); // "#1e3a5f", it already shows
91
+ * iconColorFor("#b08d57", "#111111"); // a darker gold
92
+ * iconColorFor("#333344", "#2563eb", { surface: "#1b1d24", panel: "#25272e" });
93
+ * // a lighter slate
94
+ */
95
+ export declare function iconColorFor(hex: string, primary: string, drawn?: Pick<DrawnColors, "surface" | "panel">): string;
96
+ /**
97
+ * What a focus ring on the card is drawn in: the brand when it shows on the
98
+ * card at 3:1, else the text color. A light brand (#ffd23f is 1.44:1 on
99
+ * white) gets the text color.
100
+ *
101
+ * @example
102
+ * focusRingFor("#1e3a5f"); // "brand"
103
+ * focusRingFor("#ffd23f"); // "ink"
104
+ */
105
+ export declare function focusRingFor(hex: string, surface?: string): "brand" | "ink";
106
+ /**
107
+ * What words in the brand are drawn in (a link, the agent's name): the brand
108
+ * when it reads at 4.5:1 on the card and on its tint, else the text color.
109
+ *
110
+ * @example
111
+ * actionColorFor("#1e3a5f"); // "brand"
112
+ * actionColorFor("#2b9348"); // "ink", 3.91:1 on white
113
+ */
114
+ export declare function actionColorFor(hex: string, surface?: string): "brand" | "ink";
115
+ /**
116
+ * What marks in the brand are drawn in (a shield, the icons in the details):
117
+ * the brand when it shows at 3:1 on the card and on its tint, else the text
118
+ * color.
119
+ *
120
+ * @example
121
+ * markColorFor("#2b9348"); // "brand", 3.91:1 on white
122
+ * markColorFor("#ffd23f"); // "ink"
123
+ */
124
+ export declare function markColorFor(hex: string, surface?: string): "brand" | "ink";
125
+ /** Black or white, whichever reads better on `hex`; a tie gives black. */
126
+ export declare function onPrimaryFor(hex: string): "black" | "white";
127
+ /**
128
+ * Every pair of the page's colors that would not read: the text and the
129
+ * quieter text at 4.5:1 and the focus ring at 3:1, each on the card and on
130
+ * the panel. A color the brand did not choose is judged as the page draws it
131
+ * (`drawn`, the light theme unless given). The border is decorative and has
132
+ * no ratio to meet.
133
+ *
134
+ * An editor can use the list to refuse a pair before it is saved;
135
+ * `drawablePalette` drops what fails.
136
+ *
137
+ * @example
138
+ * paletteFailures({ surfaceColor: "#f8f5f0", textColor: "#2f3440", mutedTextColor: "#5a5f6a" });
139
+ * // []
140
+ * paletteFailures({ surfaceColor: "#1b1d24" });
141
+ * // [{ foreground: "textColor", background: "surfaceColor", ratio: 1.11, needs: 4.5 }, ...]
142
+ */
143
+ export declare function paletteFailures(palette: ConsentPalette, drawn?: Partial<DrawnColors>): PaletteFailure[];
144
+ /**
145
+ * The part of a chosen palette the page can draw. The card, the panel and the
146
+ * text on them stand or fall together: dropping one alone could leave the
147
+ * rest unreadable (light text kept on a dark card that was dropped), so a
148
+ * failing pair among them leaves the theme's look for all four. The focus
149
+ * ring is then judged on what is kept, and dropped alone. The border needs no
150
+ * ratio.
151
+ */
152
+ export declare function drawablePalette(chosen: ConsentPalette, drawn?: Partial<DrawnColors>): ConsentPalette;
153
+ /** The custom properties `brandTokens` returns. */
154
+ export type BrandTokens = Record<`--cs-${string}` | `--consent-${string}`, string>;
155
+ /**
156
+ * The custom properties that draw a brand on the consent screens. Set them on
157
+ * any element above the screens: the screens take a property the page sets
158
+ * over their theme's own.
159
+ *
160
+ * - The brand fills the primary action and the selected checkboxes, with
161
+ * black or white on it, whichever reads.
162
+ * - The tint (`--cs-tint`, `--cs-tint-line`) is the brand over the card.
163
+ * - Marks, actions (and `--consent-link`, the older primitives' links) and
164
+ * the focus ring are the brand where it reads, else the text color.
165
+ * - Icons are the secondary, made darker or lighter to read, when the brand
166
+ * has one.
167
+ * - The page colors are drawn where they read ({@link drawablePalette}).
168
+ *
169
+ * @throws RangeError when a color is not `#rrggbb`.
170
+ *
171
+ * @example
172
+ * brandTokens({ primaryColor: "#1e3a5f" });
173
+ * // { "--consent-primary": "#1e3a5f", "--cs-surface-accent": "#1e3a5f",
174
+ * // "--cs-tint": "#eef0f3", "--cs-mark": "#1e3a5f", ... }
175
+ */
176
+ export declare function brandTokens(brand: ConsentBrandColors): BrandTokens;
177
+ /**
178
+ * `brandTokens(brand)` as a declaration list for a style attribute.
179
+ *
180
+ * @example
181
+ * `<main style="${brandStyle({ primaryColor: "#1e3a5f" })}">`
182
+ */
183
+ export declare function brandStyle(brand: ConsentBrandColors): string;
184
+ //# sourceMappingURL=brand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/styles/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH,8DAA8D;AAC9D,eAAO,MAAM,mBAA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