@kya-os/consent 0.5.0 → 0.5.2

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 (100) hide show
  1. package/README.md +5 -1
  2. package/dist/bundle/inline.d.ts.map +1 -1
  3. package/dist/bundle/inline.js +4 -4
  4. package/dist/bundle/inline.js.map +1 -1
  5. package/dist/cjs/bundle/inline.js +4 -4
  6. package/dist/cjs/bundle/inline.js.map +1 -1
  7. package/dist/cjs/components/consent-action-bar.js +4 -0
  8. package/dist/cjs/components/consent-action-bar.js.map +1 -1
  9. package/dist/cjs/components/consent-capabilities-screen.js +1 -1
  10. package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
  11. package/dist/cjs/components/consent-connector-header.js +1 -0
  12. package/dist/cjs/components/consent-connector-header.js.map +1 -1
  13. package/dist/cjs/components/consent-flow.js +403 -13
  14. package/dist/cjs/components/consent-flow.js.map +1 -1
  15. package/dist/cjs/components/consent-wallet-orb.js +6 -1
  16. package/dist/cjs/components/consent-wallet-orb.js.map +1 -1
  17. package/dist/cjs/components/flow-blocks.js +162 -35
  18. package/dist/cjs/components/flow-blocks.js.map +1 -1
  19. package/dist/cjs/flow/copy.js +15 -0
  20. package/dist/cjs/flow/copy.js.map +1 -1
  21. package/dist/cjs/flow/index.js +5 -2
  22. package/dist/cjs/flow/index.js.map +1 -1
  23. package/dist/cjs/flow/model.js +46 -1
  24. package/dist/cjs/flow/model.js.map +1 -1
  25. package/dist/cjs/flow/page.js +282 -0
  26. package/dist/cjs/flow/page.js.map +1 -0
  27. package/dist/cjs/flow/presets.js +4 -0
  28. package/dist/cjs/flow/presets.js.map +1 -1
  29. package/dist/cjs/flow/schema.js +1 -0
  30. package/dist/cjs/flow/schema.js.map +1 -1
  31. package/dist/cjs/mcp-app/inline.js +2 -2
  32. package/dist/cjs/mcp-app/inline.js.map +1 -1
  33. package/dist/cjs/react/index.js +1 -0
  34. package/dist/cjs/react/index.js.map +1 -1
  35. package/dist/cjs/styles/brand.js +135 -38
  36. package/dist/cjs/styles/brand.js.map +1 -1
  37. package/dist/cjs/styles/theme.js +29 -3
  38. package/dist/cjs/styles/theme.js.map +1 -1
  39. package/dist/components/consent-action-bar.d.ts.map +1 -1
  40. package/dist/components/consent-action-bar.js +4 -0
  41. package/dist/components/consent-action-bar.js.map +1 -1
  42. package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
  43. package/dist/components/consent-capabilities-screen.js +1 -1
  44. package/dist/components/consent-capabilities-screen.js.map +1 -1
  45. package/dist/components/consent-connector-header.d.ts.map +1 -1
  46. package/dist/components/consent-connector-header.js +1 -0
  47. package/dist/components/consent-connector-header.js.map +1 -1
  48. package/dist/components/consent-flow.d.ts +61 -3
  49. package/dist/components/consent-flow.d.ts.map +1 -1
  50. package/dist/components/consent-flow.js +405 -15
  51. package/dist/components/consent-flow.js.map +1 -1
  52. package/dist/components/consent-wallet-orb.d.ts +4 -0
  53. package/dist/components/consent-wallet-orb.d.ts.map +1 -1
  54. package/dist/components/consent-wallet-orb.js +6 -1
  55. package/dist/components/consent-wallet-orb.js.map +1 -1
  56. package/dist/components/flow-blocks.d.ts +10 -1
  57. package/dist/components/flow-blocks.d.ts.map +1 -1
  58. package/dist/components/flow-blocks.js +162 -36
  59. package/dist/components/flow-blocks.js.map +1 -1
  60. package/dist/consent.js +856 -272
  61. package/dist/consent.min.js +634 -397
  62. package/dist/flow/copy.d.ts +2 -0
  63. package/dist/flow/copy.d.ts.map +1 -1
  64. package/dist/flow/copy.js +14 -0
  65. package/dist/flow/copy.js.map +1 -1
  66. package/dist/flow/index.d.ts +5 -2
  67. package/dist/flow/index.d.ts.map +1 -1
  68. package/dist/flow/index.js +5 -2
  69. package/dist/flow/index.js.map +1 -1
  70. package/dist/flow/model.d.ts +53 -2
  71. package/dist/flow/model.d.ts.map +1 -1
  72. package/dist/flow/model.js +45 -0
  73. package/dist/flow/model.js.map +1 -1
  74. package/dist/flow/page.d.ts +110 -0
  75. package/dist/flow/page.d.ts.map +1 -0
  76. package/dist/flow/page.js +276 -0
  77. package/dist/flow/page.js.map +1 -0
  78. package/dist/flow/presets.d.ts.map +1 -1
  79. package/dist/flow/presets.js +4 -0
  80. package/dist/flow/presets.js.map +1 -1
  81. package/dist/flow/schema.d.ts +19 -14
  82. package/dist/flow/schema.d.ts.map +1 -1
  83. package/dist/flow/schema.js +1 -0
  84. package/dist/flow/schema.js.map +1 -1
  85. package/dist/mcp-app/inline.d.ts.map +1 -1
  86. package/dist/mcp-app/inline.js +2 -2
  87. package/dist/mcp-app/inline.js.map +1 -1
  88. package/dist/react/index.d.ts +2 -1
  89. package/dist/react/index.d.ts.map +1 -1
  90. package/dist/react/index.js +1 -0
  91. package/dist/react/index.js.map +1 -1
  92. package/dist/styles/brand.d.ts +53 -18
  93. package/dist/styles/brand.d.ts.map +1 -1
  94. package/dist/styles/brand.js +136 -39
  95. package/dist/styles/brand.js.map +1 -1
  96. package/dist/styles/theme.d.ts +10 -1
  97. package/dist/styles/theme.d.ts.map +1 -1
  98. package/dist/styles/theme.js +28 -2
  99. package/dist/styles/theme.js.map +1 -1
  100. package/package.json +2 -2
package/README.md CHANGED
@@ -513,7 +513,11 @@ const style = brandStyle({
513
513
  - `--cs-tint` and `--cs-tint-line` are the brand at 7% and 18% over the card.
514
514
  - Marks (`markColorFor`, 3:1), words (`actionColorFor`, 4.5:1) and the focus ring (`focusRingFor`, 3:1) are in the brand where it reads on the card and its tint, else in the text color.
515
515
  - Icons are in the secondary, made darker or lighter, whichever is nearer, only as far as they must be to show at 3:1 (`iconColorFor`), so a dark palette gets light icons.
516
- - A brand may also choose the page's colors (`PALETTE_FIELDS`: `surfaceColor`, `panelColor`, `borderColor`, `textColor`, `mutedTextColor`, `focusColor`). `paletteFailures(palette)` lists each pair that would not read, for an editor to refuse; `brandTokens` draws only what `drawablePalette` keeps.
516
+ - A brand may also choose the page's colors (`PALETTE_FIELDS`: `surfaceColor`, `panelColor`, `borderColor`, `textColor`, `mutedTextColor`, `focusColor`, `backgroundColor`). `paletteFailures(palette)` lists each pair that would not read, for an editor to refuse; `brandTokens` draws only what `drawablePalette` keeps.
517
+ - A brand may be page colors alone (`primaryColor` is optional): the theme's own action, tint and marks stay, drawn in the brand's text color when it chose one.
518
+ - `backgroundColor` is the page behind the card (`--cs-surface-bg`). `brandStyle` paints it on the element it is set on, so set it on the page's `<body>`; a `<consent-flow>` preview paints its own host with it.
519
+ - Text on that page (the connector's caption, "Secured by", the legal links) takes `--cs-page-text`: the card's quieter text where it reads there at 4.5:1, else black or white made quieter until it does, so every page background draws, whatever the card. The Vouched lockup keeps its blue where it shows at 3:1, else it takes that color too. The wallet orb in the connector takes `--cs-page-accent` (the accent where it shows on the page at 3:1, else that quieter text) and `--cs-page-success` (its green, made lighter or darker as far as it must to show at 3:1).
520
+ - With no page background, `brandTokens(brand, theme)` judges the brand's accent on the theme's own page (`theme` defaults to `light`). An accent that does not show there at 3:1 leaves the connector's orb in the theme's own accent, so a light brand's orb stays crisp.
517
521
 
518
522
  Every color is `#rrggbb`; anything else throws, so nothing unchecked reaches a style attribute.
519
523
  Unless a brand chooses its own page colors, the helpers judge against the light theme's surfaces.
@@ -1 +1 @@
1
- {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/bundle/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAA4psb,CAAC;AAE1rsb;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAA2B,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAuC,CAAC"}
1
+ {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/bundle/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAA23mc,CAAC;AAEz5mc;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAA2B,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAuC,CAAC"}