@kya-os/consent 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +39 -3
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +75 -24
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +50 -1
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/index.js +2 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/constants/capabilities.js +11 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +14 -3
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +37 -2
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +19 -2
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +74 -23
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-headline.d.ts +25 -0
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +52 -3
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/consent.js +121 -25
- package/dist/consent.min.js +114 -94
- package/dist/constants/capabilities.d.ts +5 -2
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +11 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -259,10 +259,14 @@ Named slots place host content in the existing screen layout:
|
|
|
259
259
|
- `details`: after the authentication slot.
|
|
260
260
|
- `notice`: replaces the default revocation and inactivity notice.
|
|
261
261
|
- `footer`: replaces the default Checkpoint footer.
|
|
262
|
+
- `headline`: the headline's words in place of the standard line, such as the agent's name as a button that opens its details. Your content is your own markup, so render an agent-chosen name as text.
|
|
263
|
+
- `capability-<capability id>`: content shown inside that capability's row, under its scopes, such as a check the row needs. A click anywhere in it does not toggle the row, nor does a `capability-toggle` event sent from it, and it is not part of the row's accessible name. `capabilitySlotName(id)` from `@kya-os/consent/components` returns the slot's name.
|
|
262
264
|
|
|
263
265
|
Use the `notice` slot whenever the host has different expiry or revocation behavior.
|
|
264
266
|
An omitted slot preserves the existing Cedar screen's default content.
|
|
265
|
-
The public parts are `connector`, `card`, `eyebrow`, `headline`, `subhead`, `agent`, `permissions`, `actions`, `submit`, and `cancel`.
|
|
267
|
+
The public parts are `connector`, `card`, `eyebrow`, `headline`, `subhead`, `agent`, `permissions`, `section-header` (the line above the rows), `actions`, `submit`, and `cancel`.
|
|
268
|
+
Each row's parts are forwarded with a `capability-` prefix: `capability-row`, `capability-checkbox`, `capability-check` (the mark in a ticked box), `capability-icon`, `capability-body`, `capability-label-row` (the label, description and risk chip), `capability-label-text` (the label and description), `capability-label`, `capability-description`, `capability-risk`, `capability-scopes`, `capability-scope`, and `capability-policy`.
|
|
269
|
+
Without host CSS the rows look as before.
|
|
266
270
|
Public CSS variables include `--cs-screen-max-width`, `--cs-card-padding`, `--cs-card-padding-mobile`, `--cs-card-gap`, `--cs-headline-font-size`, `--cs-subhead-font-size`, `--cs-scope-font-size`, `--cs-action-font-size`, and `--cs-action-min-height`.
|
|
267
271
|
Set the mobile padding variable separately when overriding padding below 480px.
|
|
268
272
|
`--cs-agent-tile-bg` sets the agent logo tile background (default `#FFFFFF` in both themes).
|
|
@@ -358,6 +362,7 @@ A host that sets `--consent-primary` itself should set them too; `generateCSSVar
|
|
|
358
362
|
`CONSENT_CAPABILITIES_FEATURES` is exported from the package root, constants entry point, and browser bundle.
|
|
359
363
|
`ConsentCapabilitiesScreen.features` exposes the same versioned object for hosts loading a script dynamically.
|
|
360
364
|
Version 1 supports scope-only rows and the `identity`, `details`, `notice`, and `footer` slots.
|
|
365
|
+
Version 2 adds the `headline` slot, a slot per row (`capabilitySlotPrefix` plus the capability's id), and the row parts.
|
|
361
366
|
|
|
362
367
|
## Main consent component selection
|
|
363
368
|
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/bundle/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAsgqW,CAAC;AAEpiqW;;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"}
|