@kya-os/consent 0.4.0 → 0.4.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.
- package/README.md +186 -22
- package/dist/bundle/index.d.ts +9 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +13 -0
- package/dist/bundle/index.js.map +1 -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/index.js +36 -1
- package/dist/cjs/bundle/index.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-action-bar.js +97 -25
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +7 -105
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-button.js +6 -1
- package/dist/cjs/components/consent-button.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +456 -117
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +159 -32
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +7 -0
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-connector-header.js +262 -45
- package/dist/cjs/components/consent-connector-header.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +1 -1
- package/dist/cjs/components/consent-flow-timeline.js +177 -0
- package/dist/cjs/components/consent-flow-timeline.js.map +1 -0
- package/dist/cjs/components/consent-flow.js +540 -0
- package/dist/cjs/components/consent-flow.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +22 -14
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +353 -33
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-oauth-button.js +68 -138
- package/dist/cjs/components/consent-oauth-button.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +5 -0
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +3 -3
- package/dist/cjs/components/consent-request-expiry.js +1 -1
- package/dist/cjs/components/consent-revocation-notice.js +29 -18
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
- package/dist/cjs/components/consent-revoke.js +9 -4
- package/dist/cjs/components/consent-revoke.js.map +1 -1
- package/dist/cjs/components/consent-secured-by.js +106 -0
- package/dist/cjs/components/consent-secured-by.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +1 -1
- package/dist/cjs/components/consent-terms.js +7 -0
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +26 -2
- package/dist/cjs/components/consent-wallet-check.js.map +1 -1
- package/dist/cjs/components/consent-wallet-notice.js +1 -1
- package/dist/cjs/components/consent-wallet-orb.js +1 -1
- package/dist/cjs/components/consent-wallet-signature.js +1 -1
- package/dist/cjs/components/decision-icons.js +37 -0
- package/dist/cjs/components/decision-icons.js.map +1 -0
- package/dist/cjs/components/edit-region.js +309 -0
- package/dist/cjs/components/edit-region.js.map +1 -0
- package/dist/cjs/components/flow-blocks.js +762 -0
- package/dist/cjs/components/flow-blocks.js.map +1 -0
- package/dist/cjs/components/flow-motion.js +177 -0
- package/dist/cjs/components/flow-motion.js.map +1 -0
- package/dist/cjs/components/grant-details.js +143 -0
- package/dist/cjs/components/grant-details.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +2 -2
- package/dist/cjs/components/index.js +13 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +93 -36
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/preview.js +67 -0
- package/dist/cjs/components/preview.js.map +1 -0
- package/dist/cjs/components/provider-icons.js +92 -0
- package/dist/cjs/components/provider-icons.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +17 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +67 -24
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/flow/copy.js +146 -0
- package/dist/cjs/flow/copy.js.map +1 -0
- package/dist/cjs/flow/index.js +31 -0
- package/dist/cjs/flow/index.js.map +1 -0
- package/dist/cjs/flow/model.js +107 -0
- package/dist/cjs/flow/model.js.map +1 -0
- package/dist/cjs/flow/presets.js +157 -0
- package/dist/cjs/flow/presets.js.map +1 -0
- package/dist/cjs/flow/schema.js +76 -0
- package/dist/cjs/flow/schema.js.map +1 -0
- package/dist/cjs/identity/agent-identity.js +3 -2
- package/dist/cjs/identity/agent-identity.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/cjs/react/index.js +40 -2
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/styles/brand.js +385 -0
- package/dist/cjs/styles/brand.js.map +1 -0
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +102 -30
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +1 -2
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/cjs/types/decision.types.js +13 -0
- package/dist/cjs/types/decision.types.js.map +1 -0
- package/dist/cjs/types/edit.types.js +80 -0
- package/dist/cjs/types/edit.types.js.map +1 -0
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +20 -1
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +97 -25
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts +4 -17
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +7 -105
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-button.d.ts +2 -0
- package/dist/components/consent-button.d.ts.map +1 -1
- package/dist/components/consent-button.js +6 -1
- package/dist/components/consent-button.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +101 -17
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +457 -118
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +32 -3
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +159 -32
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +2 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -1
- package/dist/components/consent-checkbox.js +7 -0
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-connector-header.d.ts +52 -7
- package/dist/components/consent-connector-header.d.ts.map +1 -1
- package/dist/components/consent-connector-header.js +262 -45
- package/dist/components/consent-connector-header.js.map +1 -1
- package/dist/components/consent-duration.js +1 -1
- package/dist/components/consent-flow-timeline.d.ts +49 -0
- package/dist/components/consent-flow-timeline.d.ts.map +1 -0
- package/dist/components/consent-flow-timeline.js +174 -0
- package/dist/components/consent-flow-timeline.js.map +1 -0
- package/dist/components/consent-flow.d.ts +101 -0
- package/dist/components/consent-flow.d.ts.map +1 -0
- package/dist/components/consent-flow.js +504 -0
- package/dist/components/consent-flow.js.map +1 -0
- package/dist/components/consent-footer.d.ts +6 -4
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +22 -14
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-headline.d.ts +62 -16
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +352 -34
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-oauth-button.d.ts +9 -6
- package/dist/components/consent-oauth-button.d.ts.map +1 -1
- package/dist/components/consent-oauth-button.js +71 -141
- package/dist/components/consent-oauth-button.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +5 -0
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-passkey.d.ts +6 -0
- package/dist/components/consent-passkey.d.ts.map +1 -1
- package/dist/components/consent-passkey.js +67 -9
- package/dist/components/consent-passkey.js.map +1 -1
- package/dist/components/consent-phone-handoff.js +3 -3
- package/dist/components/consent-request-expiry.js +1 -1
- package/dist/components/consent-revocation-notice.d.ts.map +1 -1
- package/dist/components/consent-revocation-notice.js +29 -18
- package/dist/components/consent-revocation-notice.js.map +1 -1
- package/dist/components/consent-revoke.d.ts +2 -0
- package/dist/components/consent-revoke.d.ts.map +1 -1
- package/dist/components/consent-revoke.js +9 -4
- package/dist/components/consent-revoke.js.map +1 -1
- package/dist/components/consent-secured-by.d.ts +25 -0
- package/dist/components/consent-secured-by.d.ts.map +1 -0
- package/dist/components/consent-secured-by.js +103 -0
- package/dist/components/consent-secured-by.js.map +1 -0
- package/dist/components/consent-shell.js +1 -1
- package/dist/components/consent-terms.d.ts +2 -0
- package/dist/components/consent-terms.d.ts.map +1 -1
- package/dist/components/consent-terms.js +7 -0
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.d.ts +8 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -1
- package/dist/components/consent-wallet-check.js +27 -3
- package/dist/components/consent-wallet-check.js.map +1 -1
- package/dist/components/consent-wallet-notice.js +1 -1
- package/dist/components/consent-wallet-orb.js +1 -1
- package/dist/components/consent-wallet-signature.js +1 -1
- package/dist/components/decision-icons.d.ts +26 -0
- package/dist/components/decision-icons.d.ts.map +1 -0
- package/dist/components/decision-icons.js +34 -0
- package/dist/components/decision-icons.js.map +1 -0
- package/dist/components/edit-region.d.ts +50 -0
- package/dist/components/edit-region.d.ts.map +1 -0
- package/dist/components/edit-region.js +305 -0
- package/dist/components/edit-region.js.map +1 -0
- package/dist/components/flow-blocks.d.ts +45 -0
- package/dist/components/flow-blocks.d.ts.map +1 -0
- package/dist/components/flow-blocks.js +755 -0
- package/dist/components/flow-blocks.js.map +1 -0
- package/dist/components/flow-motion.d.ts +41 -0
- package/dist/components/flow-motion.d.ts.map +1 -0
- package/dist/components/flow-motion.js +164 -0
- package/dist/components/flow-motion.js.map +1 -0
- package/dist/components/grant-details.d.ts +28 -0
- package/dist/components/grant-details.d.ts.map +1 -0
- package/dist/components/grant-details.js +138 -0
- package/dist/components/grant-details.js.map +1 -0
- package/dist/components/grant-field-styles.js +2 -2
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +19 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +93 -36
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/preview.d.ts +38 -0
- package/dist/components/preview.d.ts.map +1 -0
- package/dist/components/preview.js +61 -0
- package/dist/components/preview.js.map +1 -0
- package/dist/components/provider-icons.d.ts +16 -0
- package/dist/components/provider-icons.d.ts.map +1 -0
- package/dist/components/provider-icons.js +88 -0
- package/dist/components/provider-icons.js.map +1 -0
- package/dist/consent.js +4875 -1178
- package/dist/consent.min.js +2367 -814
- package/dist/constants/capabilities.d.ts +16 -3
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +17 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +67 -24
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +67 -24
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/copy.d.ts +31 -0
- package/dist/flow/copy.d.ts.map +1 -0
- package/dist/flow/copy.js +137 -0
- package/dist/flow/copy.js.map +1 -0
- package/dist/flow/index.d.ts +15 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +15 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/flow/model.d.ts +209 -0
- package/dist/flow/model.d.ts.map +1 -0
- package/dist/flow/model.js +103 -0
- package/dist/flow/model.js.map +1 -0
- package/dist/flow/presets.d.ts +29 -0
- package/dist/flow/presets.d.ts.map +1 -0
- package/dist/flow/presets.js +153 -0
- package/dist/flow/presets.js.map +1 -0
- package/dist/flow/schema.d.ts +127 -0
- package/dist/flow/schema.d.ts.map +1 -0
- package/dist/flow/schema.js +72 -0
- package/dist/flow/schema.js.map +1 -0
- package/dist/identity/agent-identity.d.ts +3 -2
- package/dist/identity/agent-identity.d.ts.map +1 -1
- package/dist/identity/agent-identity.js +3 -2
- package/dist/identity/agent-identity.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/dist/react/index.d.ts +27 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +39 -1
- package/dist/react/index.js.map +1 -1
- package/dist/styles/brand.d.ts +184 -0
- package/dist/styles/brand.d.ts.map +1 -0
- package/dist/styles/brand.js +372 -0
- package/dist/styles/brand.js.map +1 -0
- 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 +76 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +98 -29
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +12 -14
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +1 -2
- package/dist/types/capabilities.types.js.map +1 -1
- package/dist/types/decision.types.d.ts +57 -0
- package/dist/types/decision.types.d.ts.map +1 -0
- package/dist/types/decision.types.js +12 -0
- package/dist/types/decision.types.js.map +1 -0
- package/dist/types/edit.types.d.ts +73 -0
- package/dist/types/edit.types.d.ts.map +1 -0
- package/dist/types/edit.types.js +76 -0
- package/dist/types/edit.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -17,8 +17,7 @@ It also works with KYA-OS, an open protocol, and Vouched KYA runs both for you a
|
|
|
17
17
|
- [Vouched KYA](https://kya.vouched.id/docs/govern/consent) is the hosted, commercial service.
|
|
18
18
|
It serves a consent page built on this package, stores the delegations it creates, verifies agent requests against them, and keeps the audit trail.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
Checkpoint is Vouched KYA's former name, and its hosted page relies on that default.
|
|
20
|
+
Under its card the screen draws "Secured by" and the Vouched lockup, and the hosted page relies on that default.
|
|
22
21
|
When you host the screen yourself, put your own footer in the `footer` slot.
|
|
23
22
|
|
|
24
23
|
## Install
|
|
@@ -165,6 +164,7 @@ Each shows state your page already has, and none of them calls a server.
|
|
|
165
164
|
The orb is a globe inside a dial of 48 ticks.
|
|
166
165
|
While the check runs, the globe turns and a light runs round the dial.
|
|
167
166
|
Once the wallet is ready, the dial closes and a check is drawn; when this browser can't sign, the dial stays open at the top.
|
|
167
|
+
On the capabilities screen, give it `slot="connector-mark"` and `placement="connector"` and it takes the shield's place above the card, between the agent's and your logos: the orb is 60px (`--cs-connector-mark-size`), its line hangs under it, and the connector leaves room before the card.
|
|
168
168
|
- `<consent-wallet-orb>` is that orb on its own, for a screen whose own words already say what is happening.
|
|
169
169
|
It takes the same `status`, and one more: `idle`, for before anything has started, when the globe turns and the dial rests.
|
|
170
170
|
`--cs-wallet-orb-size`, `--cs-wallet-accent`, `--cs-wallet-success` and `--cs-wallet-muted` theme it.
|
|
@@ -250,48 +250,185 @@ No other entry point imports either one.
|
|
|
250
250
|
`<consent-passkey>` has its own component, `ConsentPasskeyReact`, in `@kya-os/consent/passkey/react` (see [Passkey mode](#passkey-mode)).
|
|
251
251
|
Slotted parts are children, as in `<ConsentGrantTermsReact slot="details" chained />` inside the screen.
|
|
252
252
|
|
|
253
|
+
## The decision page
|
|
254
|
+
|
|
255
|
+
The capabilities screen draws the consent page Checkpoint serves.
|
|
256
|
+
Top to bottom: the connector, then a card with the eyebrow, the headline, the subhead (only when you set `description`), a warning for an agent that registered itself, who is signing in, the permission rows, the "Permission details" box, and Allow and Deny; under the card, "Secured by" and the Vouched lockup, then your legal links.
|
|
257
|
+
|
|
258
|
+
```js
|
|
259
|
+
screen.agentMetadata = {
|
|
260
|
+
name: "Claude",
|
|
261
|
+
did: "did:web:claude.ai",
|
|
262
|
+
verification: "unverified",
|
|
263
|
+
};
|
|
264
|
+
screen.approver = { identifier: "alice@example.com" };
|
|
265
|
+
screen.grantDetails = {
|
|
266
|
+
resource: "https://shop.example.com/mcp",
|
|
267
|
+
duration: {
|
|
268
|
+
values: ["1 hour, until 2:38 AM"],
|
|
269
|
+
note: "Permissions expire 1 hour after approval.",
|
|
270
|
+
},
|
|
271
|
+
amountLimits: { values: ["Up to €50.00 per call for orders:place"] },
|
|
272
|
+
};
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
- **The headline** reads "{Agent} is requesting permission on your behalf", or "{Agent} would like to {verb} on your behalf" with `headlineVerb`.
|
|
276
|
+
The agent's name is a button that opens what is known about it: its logo or initial, how its name was checked (for a domain-bound agent, the host that vouches for it), and its ID.
|
|
277
|
+
Nothing follows the name: no badge and no host chip.
|
|
278
|
+
- **An unverified agent** gets "Unverified agent: it registered itself, so the name it gives is not checked. Allow only if you asked it to." under the headline.
|
|
279
|
+
A `domain` or `verified` agent gets no warning, and nothing on the screen says "Verified".
|
|
280
|
+
- **`approver`** draws who is signing in, with their initial, and each check they passed (`checks: [{ label, summary, source }]`).
|
|
281
|
+
With neither an identifier nor a check, as for a confirmation without sign-in, no box is drawn.
|
|
282
|
+
- **`grantDetails`** draws the "Permission details" box: "Connects to" (`orgName` over `resource`), "Duration", "Budget", "Amount limits" and "Already granted", in that order, leaving out a row with nothing in it.
|
|
283
|
+
You word every value, so times, amounts and your own rules (such as leaving out a budget beside a per-call limit) stay yours.
|
|
284
|
+
Without `grantDetails` the screen draws its revocation notice instead.
|
|
285
|
+
- **Rows** are the label over its description, the "HIGHER RISK" chip at the label's right, and each scope as a code badge.
|
|
286
|
+
They draw no icon; set `show-icons` to draw each row's icon tile.
|
|
287
|
+
Set `hide-risk` (on the screen, `<mcp-consent>` or one `<consent-capability-card>`) to leave out the "HIGHER RISK" chip, and `hide-scopes` to leave out the scope badges; each row's `riskLevel` and `scopes` stay as they are. Each is a plain on/off, for an editor to offer as a switch.
|
|
288
|
+
In "Permission details", every row is the host's to give or leave out: without `grantDetails.resource`, "Connects to" names the organization alone.
|
|
289
|
+
|
|
253
290
|
## Host content and styling
|
|
254
291
|
|
|
255
292
|
Named slots place host content in the existing screen layout:
|
|
256
293
|
|
|
257
|
-
- `
|
|
294
|
+
- `recovery`: after the headline, such as an error.
|
|
295
|
+
- `identity`: after the unverified-agent warning, before who is signing in.
|
|
258
296
|
- `auth`: after the capability rows, preserving the existing credential form integration.
|
|
259
297
|
- `details`: after the authentication slot.
|
|
260
|
-
- `notice`: replaces the
|
|
261
|
-
- `footer`:
|
|
298
|
+
- `notice`: replaces the revocation and inactivity notice, which the screen draws when you give no `grantDetails`.
|
|
299
|
+
- `footer`: under the card, in place of "Secured by" and the Vouched lockup.
|
|
300
|
+
- `legal`: under the footer, such as Terms and Privacy links. With none, a "How does this work?" link shows there when `how-it-works-url` is set.
|
|
262
301
|
- `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
302
|
- `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.
|
|
264
303
|
|
|
265
304
|
Use the `notice` slot whenever the host has different expiry or revocation behavior.
|
|
266
305
|
An omitted slot preserves the existing Cedar screen's default content.
|
|
267
|
-
The public parts are `connector`, `card`, `eyebrow`, `headline`, `subhead`, `agent`, `permissions`, `section-header` (the
|
|
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
|
|
269
|
-
|
|
270
|
-
|
|
306
|
+
The public parts are `connector`, `card`, `eyebrow`, `headline`, `agent-name`, `subhead`, `agent-details` (what the name opens), `unverified`, `approver`, `permissions`, `section-header` (the eyebrow over the rows), `section-hint` ("Tap to toggle"), `grant-details`, `actions`, `submit`, `cancel`, and `below` (under the card).
|
|
307
|
+
Each row's parts are forwarded with a `capability-` prefix: `capability-row`, `capability-checkbox`, `capability-check` (the mark in a ticked box), `capability-icon` (with `show-icons`), `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`.
|
|
308
|
+
|
|
309
|
+
### Theming from the page
|
|
310
|
+
|
|
311
|
+
Set any `--cs-*` property on the screen or on any element above it, and the screen draws it instead of its theme's own.
|
|
312
|
+
It reaches every part inside: the card, the rows, the notice, the connector and the buttons.
|
|
313
|
+
A property the page does not set keeps the theme's value.
|
|
314
|
+
|
|
315
|
+
```css
|
|
316
|
+
main {
|
|
317
|
+
--cs-surface-card: #faf8f0;
|
|
318
|
+
--cs-text-primary: #141e28;
|
|
319
|
+
--cs-card-radius: 12px;
|
|
320
|
+
--cs-action-radius: 8px;
|
|
321
|
+
--cs-headline-font: "Instrument Serif", Georgia, serif;
|
|
322
|
+
--cs-headline-weight: 600;
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
The theme's colors are `--cs-surface-bg`, `--cs-surface-card`, `--cs-surface-border`, `--cs-surface-inset` (the panel inside the card), `--cs-text-primary`, `--cs-text-secondary`, `--cs-text-tertiary`, `--cs-surface-accent` and `--cs-surface-accent-text` (the primary action and ticked boxes), `--cs-focus-ring`, the risk chip colors, and `--cs-card-shadow`.
|
|
327
|
+
Six more are made from those unless the page sets them: `--cs-tint` and `--cs-tint-line` (a wash of the text over the card, for tinted boxes such as who is signing in and "Permission details"), `--cs-mark` (marks such as a shield and the details' icons), `--cs-action` (words in the brand, such as the agent's name), `--cs-warning-text` (the unverified-agent warning; the text color) and `--cs-lockup` (the Vouched lockup; Vouched blue in the light theme, the text color in the dark one).
|
|
328
|
+
`--cs-icon` colors the row and notice icons; unset, they keep the text colors.
|
|
329
|
+
`--cs-card-radius` (default `12px`) rounds the card, `--cs-action-radius` (default `6px`) rounds Allow, Deny, the passkey button and the revoke buttons, and `--cs-headline-font`, `--cs-headline-weight` and `--cs-headline-font-size` (default `"Instrument Serif", Georgia, serif` at 600 and 32px) set the headline's face; the page loads Instrument Serif if it wants it.
|
|
330
|
+
`--cs-scope-border` and `--cs-scope-bg` draw each scope's badge.
|
|
331
|
+
|
|
332
|
+
### The connector
|
|
333
|
+
|
|
334
|
+
The connector above the card shows the agent's mark, a bridge with a shield, and the org's logo.
|
|
335
|
+
The bridge, the default, draws dashed lines through a shield in `--cs-tint`, edged in `--cs-tint-line` and drawn in `--cs-mark`, so it follows a brand; set `connector-variant="dots"` on the screen or on `<mcp-consent>` (or `variant="dots"` on `<consent-connector-header>`) for the dotted lines and green shield.
|
|
336
|
+
Logos are contained, never cropped: a square logo sits at the mark's height in a square tile, and a wordmark widens its tile up to 126px and is contained past that.
|
|
337
|
+
Where a row is short of room, the bridge gives way first, then the logo's tile, down to square.
|
|
338
|
+
A broken logo shows the name's first letter, and a new logo URL is tried again.
|
|
339
|
+
`--cs-tile-radius` (default `14px`) rounds both tiles.
|
|
340
|
+
The connector names no one but the agent and the org: set `via` (on the screen or `<mcp-consent>`) to say who carries the connection (read out as "Atlas is connecting to Northwind via Your product", and shown on the shield).
|
|
341
|
+
|
|
342
|
+
The light theme's quietest text (`#5D6C82`) reads at 4.5:1 on the cream panel as well as the card, and its focus ring (`#0F172A`) at 3:1 on both.
|
|
343
|
+
|
|
344
|
+
Public CSS variables also 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`.
|
|
271
345
|
Set the mobile padding variable separately when overriding padding below 480px.
|
|
272
346
|
`--cs-agent-tile-bg` sets the agent logo tile background (default `#FFFFFF` in both themes).
|
|
273
347
|
`--cs-agent-tile-border` sets the agent logo tile border color (default `rgba(15, 23, 42, 0.08)` in both themes).
|
|
274
348
|
`--cs-agent-tile-text` sets the agent monogram color shown when there is no logo (default `#0F172A` in both themes).
|
|
275
349
|
These hooks style the actual components without reaching into their shadow roots.
|
|
276
350
|
|
|
277
|
-
##
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
351
|
+
## Preview and edit mode
|
|
352
|
+
|
|
353
|
+
A dashboard that shows a customer their consent screen sets `preview`.
|
|
354
|
+
The screen draws exactly as it would live and acts on nothing: Allow and Deny send no decision, no link goes anywhere, no form is submitted, and no request is made.
|
|
355
|
+
Rows still tick, so a person can try it.
|
|
356
|
+
Set it on the outermost element (`<consent-capabilities-screen>` or `<mcp-consent>`); every part inside gets it, and each element that acts takes it on its own too.
|
|
357
|
+
|
|
358
|
+
Add `editable` and the screen's words become regions a person types into: the subhead (starting from the standard line when you set no `description`), the organization's name under "Connects to" (when you give `grantDetails`), each permission's name and description, and the Allow and Deny labels.
|
|
359
|
+
In edit mode the rows stop toggling, and Allow and Deny draw as boxes of the same size with the same parts, so no region sits inside a button.
|
|
360
|
+
Each change sends `consent-edit` with `{ key, value }`.
|
|
361
|
+
Write the value back to your own data and pass the result to the screen, as you would for any change: the region a person is typing in is never redrawn under them, so the caret stays put, and everywhere else the words appear follows at once.
|
|
362
|
+
`editable` without `preview` is ignored, with a console warning, so a live page is never edited.
|
|
363
|
+
|
|
364
|
+
```js
|
|
365
|
+
import { parseConsentEditKey } from "@kya-os/consent/types";
|
|
366
|
+
|
|
367
|
+
screen.preview = true;
|
|
368
|
+
screen.editable = true;
|
|
369
|
+
// What a person edits where it differs from what the screen draws.
|
|
370
|
+
screen.editSource = { description: "Pick what {Agent} is allowed to do." };
|
|
371
|
+
|
|
372
|
+
screen.addEventListener("consent-edit", (event) => {
|
|
373
|
+
const { key, value } = event.detail;
|
|
374
|
+
const target = parseConsentEditKey(key);
|
|
375
|
+
if (target?.kind === "org-name") screen.orgName = value;
|
|
376
|
+
if (target?.kind === "description") {
|
|
377
|
+
screen.editSource = { ...screen.editSource, description: value };
|
|
378
|
+
screen.description = value.replaceAll("{Agent}", "Atlas");
|
|
379
|
+
}
|
|
380
|
+
if (target?.kind === "capability-label") {
|
|
381
|
+
screen.capabilities = screen.capabilities.map((capability) =>
|
|
382
|
+
capability.id === target.capabilityId
|
|
383
|
+
? { ...capability, label: value }
|
|
384
|
+
: capability
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
if (target?.kind === "capability-description") {
|
|
388
|
+
screen.capabilities = screen.capabilities.map((capability) =>
|
|
389
|
+
capability.id === target.capabilityId
|
|
390
|
+
? { ...capability, description: value }
|
|
391
|
+
: capability
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
```
|
|
284
396
|
|
|
397
|
+
| Key (`CONSENT_EDIT_KEYS`) | Region |
|
|
398
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
399
|
+
| `description` | The subhead |
|
|
400
|
+
| `org-name` | The organization's name under "Connects to" |
|
|
401
|
+
| `capability:<id>:label` | A permission's name |
|
|
402
|
+
| `capability:<id>:description` | A permission's description |
|
|
403
|
+
| `submit-label`, `cancel-label` | The Allow and Deny labels |
|
|
404
|
+
| `headline`, `terminal:title`, `terminal:body` | For a host that draws these itself: a headline in the `headline` slot, and the page after the decision |
|
|
405
|
+
|
|
406
|
+
While a region has focus it shows its raw text from `editSource`, such as a template with placeholders, and the drawn text again when it is left.
|
|
407
|
+
A click on text that is its own raw text keeps the caret where it landed; anywhere else focus puts the caret at the end.
|
|
408
|
+
Enter and Escape leave a region, and every key typed in one stays there, so no shortcut on your page and no row toggle sees it.
|
|
409
|
+
Paste inserts plain text on one line, and a drop into a region is ignored.
|
|
410
|
+
Leaving a region you changed sends `consent-edit-end` with the same detail, for grouping undo; visiting one without a change sends nothing.
|
|
411
|
+
Replace objects and arrays to change them (`capabilities`, `editSource`): a change made inside the same object is not seen.
|
|
412
|
+
`--cs-edit-hover-ring`, `--cs-edit-focus-ring` and `--cs-edit-wash` style the regions, and default to the text's own color, so they read on the card and on the Allow button alike.
|
|
413
|
+
|
|
414
|
+
## Agent verification
|
|
415
|
+
|
|
416
|
+
`agentMetadata.verification` says how the agent's identity is established:
|
|
417
|
+
|
|
418
|
+
- `verified`: proven by a verified Entity Card.
|
|
419
|
+
- `domain`: bound to the https host that served the client's metadata (a CIMD client). Set `domain` to that host, such as `chatgpt.com`.
|
|
420
|
+
- `unverified`: self-asserted, such as a dynamically registered client.
|
|
421
|
+
|
|
422
|
+
The screen draws no "Verified" badge for any of them. An `unverified` agent gets a warning under the headline, a `domain` agent's name is followed by the host that vouches for it, and the name opens what is known about the agent (see [The decision page](#the-decision-page)).
|
|
423
|
+
The verification decides what a grant may reach instead: `isCappedAtProbe` caps any agent that isn't `verified`, or has no `connectedAt`, at probe, and `compileCapabilitiesToCedar` holds to that cap.
|
|
285
424
|
The deprecated `verified` boolean is read only when `verification` is absent.
|
|
286
|
-
The domain pill is tinted from `--consent-primary` and takes the theme's text color; `--cs-pill-domain-bg`, `--cs-pill-domain-border`, and `--cs-pill-domain-text` override it.
|
|
287
425
|
|
|
288
426
|
## Agent identity: Entity Cards
|
|
289
427
|
|
|
290
428
|
Instead of `agentMetadata`, a host can hand the screen the agent as a KYA-OS Entity Card plus what its verifier established: `agentIdentity` on `<consent-capabilities-screen>` and `<mcp-consent>`, the `agent-identity` attribute, or `agentIdentity` in `generateConsentShell`.
|
|
291
|
-
The
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
On `<mcp-consent>`, the card must name the `agent-did` the grant is for, or no tile shows.
|
|
429
|
+
The verification is bound to the card: a `verified` result counts only when it names the card's own DID, and a `domain` result only when it names the card's own domain; anything else reads as `unverified`.
|
|
430
|
+
When `agentIdentity` is set it is the only source for the agent the screen names: one that doesn't validate names no agent, and never falls back to `agentMetadata`.
|
|
431
|
+
On `<mcp-consent>`, the card must name the `agent-did` the grant is for, or no agent is named.
|
|
295
432
|
|
|
296
433
|
The screen never verifies anything; the host does, before it renders the page.
|
|
297
434
|
`@kya-os/consent/identity` reads what agents already publish into the card shape:
|
|
@@ -303,7 +440,7 @@ The screen never verifies anything; the host does, before it renders the page.
|
|
|
303
440
|
|
|
304
441
|
`resolveAgentIdentity(document, { verifier, context })` reads the document, runs the verifier, binds its result to the card, and returns the `AgentIdentity` to render.
|
|
305
442
|
A verifier that throws or returns something malformed leaves the identity unverified.
|
|
306
|
-
A `verified` result must come with the verifier's own card for the document's DID, and the identity shows that card, so
|
|
443
|
+
A `verified` result must come with the verifier's own card for the document's DID, and the identity shows that card, so a verified agent's tile shows a name the verifier checked.
|
|
307
444
|
Without a valid one, the identity is unverified.
|
|
308
445
|
Three verifiers fit:
|
|
309
446
|
|
|
@@ -359,10 +496,36 @@ Text drawn on or in a brand color reads its own variable, so it reaches WCAG AA
|
|
|
359
496
|
`<mcp-consent>` and `<consent-shell>` set them along with the brand colors they apply.
|
|
360
497
|
A host that sets `--consent-primary` itself should set them too; `generateCSSVariables(branding)` returns all of them.
|
|
361
498
|
|
|
499
|
+
`brandTokens(brand)` from `@kya-os/consent/styles` turns a brand into the `--cs-*` properties the screens read, each checked so it reads; `brandStyle(brand)` returns the same as a style attribute.
|
|
500
|
+
Set them on any element above the screens.
|
|
501
|
+
|
|
502
|
+
```ts
|
|
503
|
+
import { brandStyle } from "@kya-os/consent/styles";
|
|
504
|
+
|
|
505
|
+
const style = brandStyle({
|
|
506
|
+
primaryColor: "#1e3a5f",
|
|
507
|
+
secondaryColor: "#b08d57",
|
|
508
|
+
});
|
|
509
|
+
// <main style="${style}"> ... <consent-capabilities-screen> ... </main>
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
- The brand fills the primary action and ticked boxes, with black or white on it, whichever reads (`onPrimaryFor`).
|
|
513
|
+
- `--cs-tint` and `--cs-tint-line` are the brand at 7% and 18% over the card.
|
|
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
|
+
- 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.
|
|
517
|
+
|
|
518
|
+
Every color is `#rrggbb`; anything else throws, so nothing unchecked reaches a style attribute.
|
|
519
|
+
Unless a brand chooses its own page colors, the helpers judge against the light theme's surfaces.
|
|
520
|
+
Importing `@kya-os/consent/styles` defines no element, so a server can use it.
|
|
521
|
+
|
|
362
522
|
`CONSENT_CAPABILITIES_FEATURES` is exported from the package root, constants entry point, and browser bundle.
|
|
363
523
|
`ConsentCapabilitiesScreen.features` exposes the same versioned object for hosts loading a script dynamically.
|
|
364
524
|
Version 1 supports scope-only rows and the `identity`, `details`, `notice`, and `footer` slots.
|
|
365
525
|
Version 2 adds the `headline` slot, a slot per row (`capabilitySlotPrefix` plus the capability's id), and the row parts.
|
|
526
|
+
Version 3 lets the page theme the screen from any ancestor, and adds the card, action and headline tokens and the tint, mark and action colors.
|
|
527
|
+
Version 4 draws the decision page by default (`approver`, `grantDetails`, `show-icons`, the unverified-agent warning and the agent's details), moves the `footer` slot under the card, and adds the `legal` slot.
|
|
528
|
+
Version 5 adds the `connector-mark` slot, `hide-risk` and `hide-scopes`, and drops the host chip after a domain-bound agent's name.
|
|
366
529
|
|
|
367
530
|
## Main consent component selection
|
|
368
531
|
|
|
@@ -496,6 +659,7 @@ Run `pnpm test` and `pnpm build` for the package suite and all bundle formats.
|
|
|
496
659
|
The build also verifies that the browser, ESM, CJS, and MCP App inline bundles contain the same UI.
|
|
497
660
|
Run `pnpm test:browser` in a Python environment with Playwright installed for real Chromium tests of the public component contract.
|
|
498
661
|
Set `CHROMIUM` to use an existing Chromium executable; otherwise Playwright's installed Chromium is used.
|
|
662
|
+
The edit-mode test also runs in Firefox and WebKit, where caret placement and contenteditable differ: `BROWSERS` picks the engines (default `chromium,firefox,webkit`), and `FIREFOX` and `WEBKIT` select executables the way `CHROMIUM` does.
|
|
499
663
|
The browser suite covers scope-only and Cedar rendering, custom content, mobile layout, empty and disabled approval, frozen scope selection while loading, actual main-component form submission, scope mismatch refusal, fixed-grant authentication gates, and the grant terms and revoke panel: form association, keyboard order, Allow carrying the terms, and the fit at 320px.
|
|
500
664
|
It also runs `<consent-passkey>` against a CDP virtual authenticator: passkey registration and a user-verified assertion, a failed user verification, and a browser without WebAuthn.
|
|
501
665
|
|
package/dist/bundle/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import "../components/consent-headline.js";
|
|
|
34
34
|
import "../components/consent-capability-card.js";
|
|
35
35
|
import "../components/consent-action-bar.js";
|
|
36
36
|
import "../components/consent-footer.js";
|
|
37
|
+
import "../components/consent-secured-by.js";
|
|
37
38
|
import "../components/consent-revocation-notice.js";
|
|
38
39
|
import "../components/consent-connector-header.js";
|
|
39
40
|
import "../components/consent-capabilities-screen.js";
|
|
@@ -46,6 +47,8 @@ import "../components/consent-wallet-check.js";
|
|
|
46
47
|
import "../components/consent-wallet-notice.js";
|
|
47
48
|
import "../components/consent-wallet-signature.js";
|
|
48
49
|
import "../components/consent-request-expiry.js";
|
|
50
|
+
import "../components/consent-flow.js";
|
|
51
|
+
import "../components/consent-flow-timeline.js";
|
|
49
52
|
import "../components/consent-phone-handoff.js";
|
|
50
53
|
import "../components/mcp-consent.js";
|
|
51
54
|
export { McpConsent } from "../components/mcp-consent.js";
|
|
@@ -66,7 +69,13 @@ export { ConsentRevocationNotice } from "../components/consent-revocation-notice
|
|
|
66
69
|
export { ConsentConnectorHeader } from "../components/consent-connector-header.js";
|
|
67
70
|
export { ConsentCapabilitiesScreen } from "../components/consent-capabilities-screen.js";
|
|
68
71
|
export { CONSENT_CAPABILITIES_FEATURES } from "../constants/capabilities.js";
|
|
72
|
+
export { brandStyle, brandTokens, drawablePalette, paletteFailures, PALETTE_FIELDS, } from "../styles/brand.js";
|
|
73
|
+
export * from "../flow/model.js";
|
|
74
|
+
export * from "../flow/presets.js";
|
|
75
|
+
export * from "../flow/copy.js";
|
|
76
|
+
export { CONSENT_EDIT_EVENTS, CONSENT_EDIT_KEYS, parseConsentEditKey, } from "../types/edit.types.js";
|
|
69
77
|
export type { ConsentConfig, ResolvedConsentConfig, } from "../types/config.types.js";
|
|
70
78
|
export type { OAuthIdentity } from "../types/api.types.js";
|
|
71
79
|
export type { ConsentScopeCapability } from "../types/capabilities.types.js";
|
|
80
|
+
export type { ConsentEditDetail, ConsentEditKey, ConsentEditSource, } from "../types/edit.types.js";
|
|
72
81
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AACxC,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,gCAAgC,CAAC;AACxC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,mCAAmC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C;AAC7E,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,wBAAwB,CAAC"}
|
package/dist/bundle/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import "../components/consent-headline.js";
|
|
|
35
35
|
import "../components/consent-capability-card.js";
|
|
36
36
|
import "../components/consent-action-bar.js";
|
|
37
37
|
import "../components/consent-footer.js";
|
|
38
|
+
import "../components/consent-secured-by.js";
|
|
38
39
|
import "../components/consent-revocation-notice.js";
|
|
39
40
|
import "../components/consent-connector-header.js";
|
|
40
41
|
import "../components/consent-capabilities-screen.js";
|
|
@@ -47,6 +48,8 @@ import "../components/consent-wallet-check.js";
|
|
|
47
48
|
import "../components/consent-wallet-notice.js";
|
|
48
49
|
import "../components/consent-wallet-signature.js";
|
|
49
50
|
import "../components/consent-request-expiry.js";
|
|
51
|
+
import "../components/consent-flow.js";
|
|
52
|
+
import "../components/consent-flow-timeline.js";
|
|
50
53
|
import "../components/consent-phone-handoff.js";
|
|
51
54
|
import "../components/mcp-consent.js";
|
|
52
55
|
// Re-export the main composite component for programmatic use
|
|
@@ -69,4 +72,14 @@ export { ConsentRevocationNotice } from "../components/consent-revocation-notice
|
|
|
69
72
|
export { ConsentConnectorHeader } from "../components/consent-connector-header.js";
|
|
70
73
|
export { ConsentCapabilitiesScreen } from "../components/consent-capabilities-screen.js";
|
|
71
74
|
export { CONSENT_CAPABILITIES_FEATURES } from "../constants/capabilities.js";
|
|
75
|
+
// The brand helpers, for a page with no build step: pure functions that turn
|
|
76
|
+
// a brand into the --cs-* properties to set above the screens.
|
|
77
|
+
export { brandStyle, brandTokens, drawablePalette, paletteFailures, PALETTE_FIELDS, } from "../styles/brand.js";
|
|
78
|
+
// Consent flows as data: the model and the presets, for a page with no build
|
|
79
|
+
// step. The schema (zod) stays in @kya-os/consent/flow, for the server.
|
|
80
|
+
export * from "../flow/model.js";
|
|
81
|
+
export * from "../flow/presets.js";
|
|
82
|
+
export * from "../flow/copy.js";
|
|
83
|
+
// Edit mode, for a host that writes edits back with no build step.
|
|
84
|
+
export { CONSENT_EDIT_EVENTS, CONSENT_EDIT_KEYS, parseConsentEditKey, } from "../types/edit.types.js";
|
|
72
85
|
//# sourceMappingURL=index.js.map
|
package/dist/bundle/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bundle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,iEAAiE;AACjE,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AACxC,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,gCAAgC,CAAC;AACxC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,0CAA0C,CAAC;AAClD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO,4CAA4C,CAAC;AACpD,OAAO,2CAA2C,CAAC;AACnD,OAAO,8CAA8C,CAAC;AACtD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AACzC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,wCAAwC,CAAC;AAChD,OAAO,2CAA2C,CAAC;AACnD,OAAO,yCAAyC,CAAC;AACjD,OAAO,wCAAwC,CAAC;AAChD,OAAO,8BAA8B,CAAC;AAEtC,8DAA8D;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CA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AAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,6EAA6E;AAC7E,+DAA+D;AAC/D,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,6EAA6E;AAC7E,wEAAwE;AACxE,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,mEAAmE;AACnE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC"}
|
|
@@ -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,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"}
|