@kya-os/consent 0.4.1 → 0.5.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.
Files changed (174) hide show
  1. package/README.md +8 -4
  2. package/dist/bundle/index.d.ts +5 -0
  3. package/dist/bundle/index.d.ts.map +1 -1
  4. package/dist/bundle/index.js +7 -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 +21 -0
  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-capabilities-screen.js +168 -215
  14. package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
  15. package/dist/cjs/components/consent-capability-card.js +30 -7
  16. package/dist/cjs/components/consent-capability-card.js.map +1 -1
  17. package/dist/cjs/components/consent-connector-header.js +69 -15
  18. package/dist/cjs/components/consent-connector-header.js.map +1 -1
  19. package/dist/cjs/components/consent-flow-timeline.js +177 -0
  20. package/dist/cjs/components/consent-flow-timeline.js.map +1 -0
  21. package/dist/cjs/components/consent-flow.js +540 -0
  22. package/dist/cjs/components/consent-flow.js.map +1 -0
  23. package/dist/cjs/components/consent-footer.js +9 -2
  24. package/dist/cjs/components/consent-footer.js.map +1 -1
  25. package/dist/cjs/components/consent-headline.js +30 -76
  26. package/dist/cjs/components/consent-headline.js.map +1 -1
  27. package/dist/cjs/components/consent-oauth-button.js +10 -89
  28. package/dist/cjs/components/consent-oauth-button.js.map +1 -1
  29. package/dist/cjs/components/consent-revocation-notice.js +25 -16
  30. package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
  31. package/dist/cjs/components/consent-wallet-check.js +25 -1
  32. package/dist/cjs/components/consent-wallet-check.js.map +1 -1
  33. package/dist/cjs/components/decision-icons.js +6 -2
  34. package/dist/cjs/components/decision-icons.js.map +1 -1
  35. package/dist/cjs/components/flow-blocks.js +762 -0
  36. package/dist/cjs/components/flow-blocks.js.map +1 -0
  37. package/dist/cjs/components/flow-motion.js +177 -0
  38. package/dist/cjs/components/flow-motion.js.map +1 -0
  39. package/dist/cjs/components/grant-details.js +143 -0
  40. package/dist/cjs/components/grant-details.js.map +1 -0
  41. package/dist/cjs/components/index.js +10 -1
  42. package/dist/cjs/components/index.js.map +1 -1
  43. package/dist/cjs/components/mcp-consent.js +12 -0
  44. package/dist/cjs/components/mcp-consent.js.map +1 -1
  45. package/dist/cjs/components/provider-icons.js +92 -0
  46. package/dist/cjs/components/provider-icons.js.map +1 -0
  47. package/dist/cjs/constants/capabilities.js +6 -1
  48. package/dist/cjs/constants/capabilities.js.map +1 -1
  49. package/dist/cjs/copy/tokens.js +9 -5
  50. package/dist/cjs/copy/tokens.js.map +1 -1
  51. package/dist/cjs/flow/copy.js +146 -0
  52. package/dist/cjs/flow/copy.js.map +1 -0
  53. package/dist/cjs/flow/index.js +31 -0
  54. package/dist/cjs/flow/index.js.map +1 -0
  55. package/dist/cjs/flow/model.js +107 -0
  56. package/dist/cjs/flow/model.js.map +1 -0
  57. package/dist/cjs/flow/presets.js +157 -0
  58. package/dist/cjs/flow/presets.js.map +1 -0
  59. package/dist/cjs/flow/schema.js +76 -0
  60. package/dist/cjs/flow/schema.js.map +1 -0
  61. package/dist/cjs/mcp-app/inline.js +2 -2
  62. package/dist/cjs/mcp-app/inline.js.map +1 -1
  63. package/dist/cjs/react/index.js +30 -1
  64. package/dist/cjs/react/index.js.map +1 -1
  65. package/dist/cjs/styles/theme.js +8 -6
  66. package/dist/cjs/styles/theme.js.map +1 -1
  67. package/dist/components/consent-capabilities-screen.d.ts +22 -6
  68. package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
  69. package/dist/components/consent-capabilities-screen.js +169 -216
  70. package/dist/components/consent-capabilities-screen.js.map +1 -1
  71. package/dist/components/consent-capability-card.d.ts +10 -1
  72. package/dist/components/consent-capability-card.d.ts.map +1 -1
  73. package/dist/components/consent-capability-card.js +30 -7
  74. package/dist/components/consent-capability-card.js.map +1 -1
  75. package/dist/components/consent-connector-header.d.ts +14 -1
  76. package/dist/components/consent-connector-header.d.ts.map +1 -1
  77. package/dist/components/consent-connector-header.js +69 -15
  78. package/dist/components/consent-connector-header.js.map +1 -1
  79. package/dist/components/consent-flow-timeline.d.ts +49 -0
  80. package/dist/components/consent-flow-timeline.d.ts.map +1 -0
  81. package/dist/components/consent-flow-timeline.js +174 -0
  82. package/dist/components/consent-flow-timeline.js.map +1 -0
  83. package/dist/components/consent-flow.d.ts +101 -0
  84. package/dist/components/consent-flow.d.ts.map +1 -0
  85. package/dist/components/consent-flow.js +504 -0
  86. package/dist/components/consent-flow.js.map +1 -0
  87. package/dist/components/consent-footer.d.ts.map +1 -1
  88. package/dist/components/consent-footer.js +9 -2
  89. package/dist/components/consent-footer.js.map +1 -1
  90. package/dist/components/consent-headline.d.ts +12 -5
  91. package/dist/components/consent-headline.d.ts.map +1 -1
  92. package/dist/components/consent-headline.js +30 -76
  93. package/dist/components/consent-headline.js.map +1 -1
  94. package/dist/components/consent-oauth-button.d.ts +3 -4
  95. package/dist/components/consent-oauth-button.d.ts.map +1 -1
  96. package/dist/components/consent-oauth-button.js +10 -89
  97. package/dist/components/consent-oauth-button.js.map +1 -1
  98. package/dist/components/consent-revocation-notice.d.ts.map +1 -1
  99. package/dist/components/consent-revocation-notice.js +25 -16
  100. package/dist/components/consent-revocation-notice.js.map +1 -1
  101. package/dist/components/consent-wallet-check.d.ts +8 -0
  102. package/dist/components/consent-wallet-check.d.ts.map +1 -1
  103. package/dist/components/consent-wallet-check.js +26 -2
  104. package/dist/components/consent-wallet-check.js.map +1 -1
  105. package/dist/components/decision-icons.d.ts +6 -2
  106. package/dist/components/decision-icons.d.ts.map +1 -1
  107. package/dist/components/decision-icons.js +6 -2
  108. package/dist/components/decision-icons.js.map +1 -1
  109. package/dist/components/flow-blocks.d.ts +45 -0
  110. package/dist/components/flow-blocks.d.ts.map +1 -0
  111. package/dist/components/flow-blocks.js +755 -0
  112. package/dist/components/flow-blocks.js.map +1 -0
  113. package/dist/components/flow-motion.d.ts +41 -0
  114. package/dist/components/flow-motion.d.ts.map +1 -0
  115. package/dist/components/flow-motion.js +164 -0
  116. package/dist/components/flow-motion.js.map +1 -0
  117. package/dist/components/grant-details.d.ts +28 -0
  118. package/dist/components/grant-details.d.ts.map +1 -0
  119. package/dist/components/grant-details.js +138 -0
  120. package/dist/components/grant-details.js.map +1 -0
  121. package/dist/components/index.d.ts +3 -0
  122. package/dist/components/index.d.ts.map +1 -1
  123. package/dist/components/index.js +3 -0
  124. package/dist/components/index.js.map +1 -1
  125. package/dist/components/mcp-consent.d.ts +4 -0
  126. package/dist/components/mcp-consent.d.ts.map +1 -1
  127. package/dist/components/mcp-consent.js +12 -0
  128. package/dist/components/mcp-consent.js.map +1 -1
  129. package/dist/components/provider-icons.d.ts +16 -0
  130. package/dist/components/provider-icons.d.ts.map +1 -0
  131. package/dist/components/provider-icons.js +88 -0
  132. package/dist/components/provider-icons.js.map +1 -0
  133. package/dist/consent.js +3066 -1084
  134. package/dist/consent.min.js +1419 -658
  135. package/dist/constants/capabilities.d.ts +6 -2
  136. package/dist/constants/capabilities.d.ts.map +1 -1
  137. package/dist/constants/capabilities.js +6 -1
  138. package/dist/constants/capabilities.js.map +1 -1
  139. package/dist/copy/tokens.d.ts +9 -5
  140. package/dist/copy/tokens.d.ts.map +1 -1
  141. package/dist/copy/tokens.js +9 -5
  142. package/dist/copy/tokens.js.map +1 -1
  143. package/dist/flow/copy.d.ts +31 -0
  144. package/dist/flow/copy.d.ts.map +1 -0
  145. package/dist/flow/copy.js +137 -0
  146. package/dist/flow/copy.js.map +1 -0
  147. package/dist/flow/index.d.ts +15 -0
  148. package/dist/flow/index.d.ts.map +1 -0
  149. package/dist/flow/index.js +15 -0
  150. package/dist/flow/index.js.map +1 -0
  151. package/dist/flow/model.d.ts +209 -0
  152. package/dist/flow/model.d.ts.map +1 -0
  153. package/dist/flow/model.js +103 -0
  154. package/dist/flow/model.js.map +1 -0
  155. package/dist/flow/presets.d.ts +29 -0
  156. package/dist/flow/presets.d.ts.map +1 -0
  157. package/dist/flow/presets.js +153 -0
  158. package/dist/flow/presets.js.map +1 -0
  159. package/dist/flow/schema.d.ts +127 -0
  160. package/dist/flow/schema.d.ts.map +1 -0
  161. package/dist/flow/schema.js +72 -0
  162. package/dist/flow/schema.js.map +1 -0
  163. package/dist/mcp-app/inline.d.ts.map +1 -1
  164. package/dist/mcp-app/inline.js +2 -2
  165. package/dist/mcp-app/inline.js.map +1 -1
  166. package/dist/react/index.d.ts +21 -0
  167. package/dist/react/index.d.ts.map +1 -1
  168. package/dist/react/index.js +29 -0
  169. package/dist/react/index.js.map +1 -1
  170. package/dist/styles/theme.d.ts +11 -8
  171. package/dist/styles/theme.d.ts.map +1 -1
  172. package/dist/styles/theme.js +8 -6
  173. package/dist/styles/theme.js.map +1 -1
  174. package/package.json +9 -4
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Consent flow
3
+ *
4
+ * A whole consent flow as one element: the package's connector, a card of
5
+ * blocks, "Secured by" under it, and the motion between steps. The flow is
6
+ * data (`@kya-os/consent/flow`): which blocks each step draws, the
7
+ * connector's state, focus, the approval method, motion, copy. The host owns
8
+ * the transport: it sets `step`, and hears what the person did as
9
+ * `consent-flow-*` events. The element makes no network calls.
10
+ *
11
+ * <consent-flow></consent-flow>
12
+ * flowEl.flow = flowPreset("passkey", { signIn: true });
13
+ * flowEl.data = { agent, merchant, verb: "order", approver, capabilities };
14
+ * flowEl.addEventListener("consent-flow-approve", (e) => ...);
15
+ * flowEl.step = "passkey";
16
+ *
17
+ * The DOM is final, the step announced and focus moved before any motion
18
+ * runs. Focus moves to the step's `focus` block only when focus (or the last
19
+ * pointer press) was inside the flow, so a timeline scrubbing it never takes
20
+ * focus. Reduced motion, or the `none` preset, cross-fades only.
21
+ *
22
+ * @module components/consent-flow
23
+ */
24
+ import { LitElement, type PropertyValues } from "lit";
25
+ import { type ConsentFlowData, type ConsentFlowDefinition, type ConsentFlowEventMap, type FlowConnectorState, type FlowCopy, type FlowStep } from "../flow/model.js";
26
+ import type { ConsentTheme } from "../types/capabilities.types.js";
27
+ import "./consent-action-bar.js";
28
+ import "./consent-capability-card.js";
29
+ import "./consent-connector-header.js";
30
+ import "./consent-request-expiry.js";
31
+ import "./consent-secured-by.js";
32
+ import "./consent-wallet-check.js";
33
+ /**
34
+ * The wallet check's status in each connector state: at rest (not lit) until
35
+ * the person acts, turning while the passkey is open, open at the top when
36
+ * the passkey was dismissed, on its green check once granted, and its error
37
+ * once nothing was granted.
38
+ */
39
+ export declare const CONNECTOR_WALLET_STATUS: Readonly<Record<FlowConnectorState, string>>;
40
+ export declare class ConsentFlow extends LitElement {
41
+ /** The flow: a preset from `@kya-os/consent/flow`, or a saved one (`parseConsentFlow`). */
42
+ flow: ConsentFlowDefinition;
43
+ /** The request it draws. Nothing is drawn without it. */
44
+ data: ConsentFlowData | undefined;
45
+ /** The project's copy, over the flow's own (and over a first-time shopper's). */
46
+ copy: FlowCopy;
47
+ /**
48
+ * The step on screen. Unset, or a step this flow lacks, lands on the flow's
49
+ * `initial` (or `consent`, when swapping flows mid-way). Reflected.
50
+ */
51
+ step: FlowStep | "";
52
+ /** `light` or `dark`. Brand colours come in as `--cs-*` properties, as on the screen. */
53
+ theme: ConsentTheme;
54
+ /** An editor's preview: links don't navigate, and every event says `preview: true`. */
55
+ preview: boolean;
56
+ private selected;
57
+ private resolved;
58
+ private drawn;
59
+ private signatures;
60
+ private atRest;
61
+ private pointerInside;
62
+ private generation;
63
+ constructor();
64
+ /** The step on screen, once drawn. */
65
+ get currentStep(): FlowStep | null;
66
+ connectedCallback(): void;
67
+ disconnectedCallback(): void;
68
+ private onDocumentPointer;
69
+ private get card();
70
+ private get fx();
71
+ protected willUpdate(changed: PropertyValues<this>): void;
72
+ /** The starting ticks: `defaultOn`. A new request keeps what is still asked for and ticks what is new by its default. */
73
+ private reselect;
74
+ /** The words: the defaults, the flow's, a first-time shopper's, then the project's. */
75
+ private words;
76
+ /** A flow event's init: the step and preview mode, then its own detail; bubbling and composed. */
77
+ private init;
78
+ /** An event from a block's snapshot, as it leaves, is not the person's. */
79
+ private fromLeaving;
80
+ private onAllow;
81
+ private onDeny;
82
+ private onExpired;
83
+ private onToggle;
84
+ private onClick;
85
+ private specs;
86
+ protected render(): unknown;
87
+ protected updated(changed: PropertyValues<this>): void;
88
+ /** The step's `focus` block takes focus: its own target (`tabindex="-1"`), else its first control. */
89
+ private focusStep;
90
+ /** From the boxes before to the boxes now: leave, resize, move, cross-fade, arrive. */
91
+ private animateStep;
92
+ static styles: import("lit").CSSResult;
93
+ }
94
+ declare global {
95
+ interface HTMLElementTagNameMap {
96
+ "consent-flow": ConsentFlow;
97
+ }
98
+ interface HTMLElementEventMap extends ConsentFlowEventMap {
99
+ }
100
+ }
101
+ //# sourceMappingURL=consent-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent-flow.d.ts","sourceRoot":"","sources":["../../src/components/consent-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,UAAU,EAIV,KAAK,cAAc,EAEpB,MAAM,KAAK,CAAC;AAIb,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAQxB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAUnE,OAAO,yBAAyB,CAAC;AACjC,OAAO,8BAA8B,CAAC;AACtC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AACrC,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AAEnC;;;;;GAKG;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,OAAO,CAqBb;IAEF,OAAO,CAAC,KAAK;cAyBM,MAAM,IAAI,OAAO;cAmEjB,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAwB/D,sGAAsG;IACtG,OAAO,CAAC,SAAS;IAWjB,uFAAuF;IACvF,OAAO,CAAC,WAAW;IAoEnB,OAAgB,MAAM,0BAoEpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;IACD,UAAU,mBAAoB,SAAQ,mBAAmB;KAAG;CAC7D"}
@@ -0,0 +1,504 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /**
8
+ * Consent flow
9
+ *
10
+ * A whole consent flow as one element: the package's connector, a card of
11
+ * blocks, "Secured by" under it, and the motion between steps. The flow is
12
+ * data (`@kya-os/consent/flow`): which blocks each step draws, the
13
+ * connector's state, focus, the approval method, motion, copy. The host owns
14
+ * the transport: it sets `step`, and hears what the person did as
15
+ * `consent-flow-*` events. The element makes no network calls.
16
+ *
17
+ * <consent-flow></consent-flow>
18
+ * flowEl.flow = flowPreset("passkey", { signIn: true });
19
+ * flowEl.data = { agent, merchant, verb: "order", approver, capabilities };
20
+ * flowEl.addEventListener("consent-flow-approve", (e) => ...);
21
+ * flowEl.step = "passkey";
22
+ *
23
+ * The DOM is final, the step announced and focus moved before any motion
24
+ * runs. Focus moves to the step's `focus` block only when focus (or the last
25
+ * pointer press) was inside the flow, so a timeline scrubbing it never takes
26
+ * focus. Reduced motion, or the `none` preset, cross-fades only.
27
+ *
28
+ * @module components/consent-flow
29
+ */
30
+ import { LitElement, css, html, nothing, } from "lit";
31
+ import { customElement, property } from "lit/decorators.js";
32
+ import { repeat } from "lit/directives/repeat.js";
33
+ import { fillTemplate, flowCopy, group } from "../flow/copy.js";
34
+ import { FLOW_HOST_ATTRIBUTES, } from "../flow/model.js";
35
+ import { DECISION_FLOW } from "../flow/presets.js";
36
+ import { getConsentTheme, themeScopeStyle } from "../styles/theme.js";
37
+ import { BLOCK_MORPH_FROM, FLOW_BLOCK_RENDERERS, flowBlockStyles, flowValues, } from "./flow-blocks.js";
38
+ import * as motion from "./flow-motion.js";
39
+ import { guardPreviewNavigation } from "./preview.js";
40
+ import "./consent-action-bar.js";
41
+ import "./consent-capability-card.js";
42
+ import "./consent-connector-header.js";
43
+ import "./consent-request-expiry.js";
44
+ import "./consent-secured-by.js";
45
+ import "./consent-wallet-check.js";
46
+ /**
47
+ * The wallet check's status in each connector state: at rest (not lit) until
48
+ * the person acts, turning while the passkey is open, open at the top when
49
+ * the passkey was dismissed, on its green check once granted, and its error
50
+ * once nothing was granted.
51
+ */
52
+ export const CONNECTOR_WALLET_STATUS = {
53
+ "sign-in": "idle",
54
+ consent: "idle",
55
+ passkey: "syncing",
56
+ cancelled: "conflict",
57
+ granted: "ready",
58
+ denied: "error",
59
+ expired: "error",
60
+ error: "error",
61
+ };
62
+ /** A rendered template's inputs, as text: equal when the block would draw the same. */
63
+ function signatureOf(value) {
64
+ if (value === nothing)
65
+ return "∅";
66
+ if (Array.isArray(value))
67
+ return `[${value.map(signatureOf).join(",")}]`;
68
+ if (typeof value === "function")
69
+ return "ƒ";
70
+ if (value && typeof value === "object") {
71
+ if ("strings" in value && "values" in value) {
72
+ const result = value;
73
+ return `${result.strings.join("¦")}(${result.values.map(signatureOf).join("|")})`;
74
+ }
75
+ try {
76
+ return JSON.stringify(value);
77
+ }
78
+ catch {
79
+ return "{}";
80
+ }
81
+ }
82
+ return String(value);
83
+ }
84
+ const blockName = (key) => key.split("#")[0];
85
+ /** The properties that redraw the card, and so may move it. */
86
+ const DRAWN = ["flow", "data", "copy", "step", "preview"];
87
+ let ConsentFlow = class ConsentFlow extends LitElement {
88
+ constructor() {
89
+ super();
90
+ /** The flow: a preset from `@kya-os/consent/flow`, or a saved one (`parseConsentFlow`). */
91
+ this.flow = DECISION_FLOW;
92
+ /** The project's copy, over the flow's own (and over a first-time shopper's). */
93
+ this.copy = {};
94
+ /**
95
+ * The step on screen. Unset, or a step this flow lacks, lands on the flow's
96
+ * `initial` (or `consent`, when swapping flows mid-way). Reflected.
97
+ */
98
+ this.step = "";
99
+ /** `light` or `dark`. Brand colours come in as `--cs-*` properties, as on the screen. */
100
+ this.theme = "light";
101
+ /** An editor's preview: links don't navigate, and every event says `preview: true`. */
102
+ this.preview = false;
103
+ this.selected = new Set();
104
+ this.resolved = null;
105
+ this.drawn = null;
106
+ this.signatures = new Map();
107
+ this.atRest = null;
108
+ this.pointerInside = false;
109
+ this.generation = 0;
110
+ this.onDocumentPointer = (event) => {
111
+ this.pointerInside = event.composedPath().includes(this);
112
+ };
113
+ this.onAllow = (event) => {
114
+ event.stopPropagation();
115
+ if (this.fromLeaving(event))
116
+ return;
117
+ const ticked = (this.data?.capabilities ?? []).filter((cap) => this.selected.has(cap.id));
118
+ this.dispatchEvent(new CustomEvent("consent-flow-approve", this.init({
119
+ capabilities: ticked.map((cap) => cap.id),
120
+ scopes: [...new Set(ticked.flatMap((cap) => cap.scopes))],
121
+ approvalMethod: this.flow.approvalMethod,
122
+ })));
123
+ };
124
+ this.onDeny = (event) => {
125
+ event.stopPropagation();
126
+ if (!this.fromLeaving(event))
127
+ this.dispatchEvent(new CustomEvent("consent-flow-deny", this.init({})));
128
+ };
129
+ this.onExpired = (event) => {
130
+ event.stopPropagation();
131
+ if (this.fromLeaving(event) || this.resolved === "expired")
132
+ return;
133
+ const detail = event.detail;
134
+ this.dispatchEvent(new CustomEvent("consent-flow-expire", this.init({
135
+ expiresAt: Number(detail?.expiresAt ?? Date.now()),
136
+ })));
137
+ };
138
+ this.onToggle = (event) => {
139
+ event.stopPropagation();
140
+ if (this.fromLeaving(event))
141
+ return;
142
+ const detail = event
143
+ .detail;
144
+ if (typeof detail?.id !== "string" || typeof detail.checked !== "boolean")
145
+ return;
146
+ if (detail.checked)
147
+ this.selected.add(detail.id);
148
+ else
149
+ this.selected.delete(detail.id);
150
+ };
151
+ this.onClick = (event) => {
152
+ const target = event.target?.closest?.("[data-action]");
153
+ if (!target || this.fromLeaving(event))
154
+ return;
155
+ if (target.dataset.action === "sign-in") {
156
+ this.dispatchEvent(new CustomEvent("consent-flow-sign-in", this.init({
157
+ provider: target.dataset.provider ?? "custom",
158
+ account: target.dataset.account === "other" ? "other" : "remembered",
159
+ })));
160
+ }
161
+ else if (target.dataset.action === "retry") {
162
+ this.dispatchEvent(new CustomEvent("consent-flow-retry", this.init({})));
163
+ }
164
+ };
165
+ guardPreviewNavigation(this);
166
+ }
167
+ /** The step on screen, once drawn. */
168
+ get currentStep() {
169
+ return this.resolved;
170
+ }
171
+ connectedCallback() {
172
+ super.connectedCallback();
173
+ document.addEventListener("pointerdown", this.onDocumentPointer, true);
174
+ }
175
+ disconnectedCallback() {
176
+ super.disconnectedCallback();
177
+ document.removeEventListener("pointerdown", this.onDocumentPointer, true);
178
+ }
179
+ get card() {
180
+ return this.renderRoot.querySelector(".card");
181
+ }
182
+ get fx() {
183
+ return this.renderRoot.querySelector(".fx");
184
+ }
185
+ willUpdate(changed) {
186
+ if (changed.has("data"))
187
+ this.reselect(changed.get("data"));
188
+ const steps = this.flow.steps;
189
+ const wanted = this.step;
190
+ const resolved = wanted && steps[wanted]
191
+ ? wanted
192
+ : wanted && steps.consent
193
+ ? "consent"
194
+ : this.flow.initial;
195
+ if (this.step !== resolved)
196
+ this.step = resolved;
197
+ this.resolved = resolved;
198
+ this.atRest = null;
199
+ const card = this.card;
200
+ const fx = this.fx;
201
+ if (!this.hasUpdated ||
202
+ !card ||
203
+ !fx ||
204
+ !DRAWN.some((key) => changed.has(key)))
205
+ return;
206
+ // Land the last transition, so every box is measured at rest.
207
+ motion.settle(card);
208
+ fx.replaceChildren();
209
+ const blocks = new Map();
210
+ for (const el of card.querySelectorAll(":scope > .block")) {
211
+ const key = el.dataset.flowKey ?? "";
212
+ blocks.set(key, {
213
+ box: motion.boxIn(el, fx),
214
+ copy: motion.snapshot(el),
215
+ signature: this.signatures.get(key) ?? "",
216
+ });
217
+ }
218
+ this.atRest = {
219
+ blocks,
220
+ height: card.getBoundingClientRect().height,
221
+ focusInside: Boolean(this.shadowRoot?.activeElement) || this.pointerInside,
222
+ };
223
+ this.pointerInside = false;
224
+ }
225
+ /** The starting ticks: `defaultOn`. A new request keeps what is still asked for and ticks what is new by its default. */
226
+ reselect(previous) {
227
+ const capabilities = this.data?.capabilities ?? [];
228
+ const before = new Set((previous?.capabilities ?? []).map((cap) => cap.id));
229
+ this.selected = new Set(capabilities
230
+ .filter((cap) => before.has(cap.id) ? this.selected.has(cap.id) : cap.defaultOn)
231
+ .map((cap) => cap.id));
232
+ }
233
+ /** The words: the defaults, the flow's, a first-time shopper's, then the project's. */
234
+ words(data) {
235
+ return flowCopy(this.flow.copy, data.passkey === "create" ? this.flow.copyWhenCreatingPasskey : undefined, this.copy);
236
+ }
237
+ /** A flow event's init: the step and preview mode, then its own detail; bubbling and composed. */
238
+ init(detail, step = this.resolved) {
239
+ return {
240
+ detail: { step: step, preview: this.preview, ...detail },
241
+ bubbles: true,
242
+ composed: true,
243
+ };
244
+ }
245
+ /** An event from a block's snapshot, as it leaves, is not the person's. */
246
+ fromLeaving(event) {
247
+ const fx = this.fx;
248
+ return Boolean(fx && event.composedPath().includes(fx));
249
+ }
250
+ specs(data, step, copy) {
251
+ const ctx = {
252
+ data,
253
+ copy,
254
+ step,
255
+ selected: this.selected,
256
+ method: this.flow.approvalMethod,
257
+ preview: this.preview,
258
+ values: flowValues(data),
259
+ };
260
+ const seen = new Map();
261
+ const specs = [];
262
+ for (const ref of this.flow.steps[step]?.blocks ?? []) {
263
+ const [name, variant] = ref.split(":");
264
+ const draw = FLOW_BLOCK_RENDERERS[name];
265
+ if (!draw)
266
+ continue;
267
+ const result = draw(variant ? { ...ctx, variant } : ctx);
268
+ if (result === nothing)
269
+ continue;
270
+ const n = (seen.get(name) ?? 0) + 1;
271
+ seen.set(name, n);
272
+ specs.push({ key: n === 1 ? name : `${name}#${n}`, name, result });
273
+ }
274
+ return specs;
275
+ }
276
+ render() {
277
+ const data = this.data;
278
+ const step = this.resolved;
279
+ const def = step ? this.flow.steps[step] : undefined;
280
+ if (!data || !step || !def)
281
+ return nothing;
282
+ const copy = this.words(data);
283
+ const values = flowValues(data);
284
+ const specs = this.specs(data, step, copy);
285
+ this.signatures = new Map(specs.map((spec) => [spec.key, signatureOf(spec.result)]));
286
+ const seal = fillTemplate(group(copy, "seal")[def.connector] ?? "", values);
287
+ const announce = fillTemplate(group(copy, "announce")[step] ?? "", values);
288
+ return html `<style>
289
+ ${themeScopeStyle(getConsentTheme(this.theme), ".card, consent-connector-header, .below")}
290
+ </style>
291
+ <div class="flow" data-step=${step}>
292
+ <consent-connector-header
293
+ part="connector"
294
+ variant="bridge"
295
+ .clientName=${data.agent.name}
296
+ .clientLogoUrl=${data.agent.logoUrl ?? ""}
297
+ .serverName=${data.merchant.name}
298
+ .serverDomain=${data.merchant.domain ?? ""}
299
+ .serverLogoUrl=${data.merchant.logoUrl ?? ""}
300
+ >${this.flow.connectorMark === "wallet-check"
301
+ ? html `<consent-wallet-check
302
+ slot="mark"
303
+ placement="connector"
304
+ .status=${CONNECTOR_WALLET_STATUS[def.connector]}
305
+ .caption=${seal}
306
+ ></consent-wallet-check>`
307
+ : nothing}</consent-connector-header
308
+ >
309
+ <div
310
+ class="card"
311
+ part="card"
312
+ @click=${this.onClick}
313
+ @consent-allow=${this.onAllow}
314
+ @consent-deny=${this.onDeny}
315
+ @consent-request-expired=${this.onExpired}
316
+ @capability-toggle=${this.onToggle}
317
+ >
318
+ ${repeat(specs, (spec) => spec.key, (spec) => html `<div
319
+ class="block"
320
+ data-flow-key=${spec.key}
321
+ data-block=${spec.name}
322
+ >
323
+ ${spec.result}
324
+ </div>`)}
325
+ <div class="fx" aria-hidden="true"></div>
326
+ </div>
327
+ <div class="below" part="below">
328
+ <consent-secured-by></consent-secured-by>
329
+ </div>
330
+ <p class="sr" role="status">${announce}</p>
331
+ </div>`;
332
+ }
333
+ updated(changed) {
334
+ this.setAttribute(FLOW_HOST_ATTRIBUTES.version, String(this.flow.version));
335
+ this.setAttribute(FLOW_HOST_ATTRIBUTES.approvalMethod, this.flow.approvalMethod);
336
+ const step = this.resolved;
337
+ const before = this.atRest;
338
+ this.atRest = null;
339
+ if (!step || !this.data)
340
+ return;
341
+ const from = this.drawn;
342
+ this.drawn = step;
343
+ if (from !== step && before?.focusInside)
344
+ this.focusStep(step);
345
+ if (from !== step || changed.has("flow")) {
346
+ this.dispatchEvent(new CustomEvent("consent-flow-step", this.init({ from }, step)));
347
+ }
348
+ if (before)
349
+ this.animateStep(before);
350
+ }
351
+ /** The step's `focus` block takes focus: its own target (`tabindex="-1"`), else its first control. */
352
+ focusStep(step) {
353
+ const key = this.flow.steps[step]?.focus;
354
+ const block = key
355
+ ? this.card?.querySelector(`:scope > [data-flow-key="${key}"]`)
356
+ : null;
357
+ const target = block?.querySelector('[tabindex="-1"]') ??
358
+ block?.querySelector("button, [href], input");
359
+ target?.focus({ preventScroll: true });
360
+ }
361
+ /** From the boxes before to the boxes now: leave, resize, move, cross-fade, arrive. */
362
+ animateStep(before) {
363
+ const card = this.card;
364
+ const fx = this.fx;
365
+ if (!card || !fx)
366
+ return;
367
+ const t = motion.tuning(this.flow.motion);
368
+ const blocks = [...card.querySelectorAll(":scope > .block")];
369
+ const now = new Map(blocks.map((el) => [el.dataset.flowKey ?? "", el]));
370
+ const started = [];
371
+ const play = (primitive, block, animation) => {
372
+ if (!animation)
373
+ return;
374
+ started.push(animation);
375
+ this.dispatchEvent(new CustomEvent("consent-flow-motion", this.init({ primitive, block })));
376
+ };
377
+ for (const [key, old] of before.blocks) {
378
+ if (now.has(key) && this.signatures.get(key) === old.signature)
379
+ continue;
380
+ motion.place(old.copy, old.box, fx);
381
+ play("leave", blockName(key), motion.leave(old.copy, t));
382
+ }
383
+ card.classList.add("moving");
384
+ play("resize", "card", motion.resize(card, before.height, card.getBoundingClientRect().height, t));
385
+ let arrivals = 0;
386
+ for (const el of blocks) {
387
+ const key = el.dataset.flowKey ?? "";
388
+ const name = blockName(key);
389
+ const old = before.blocks.get(key);
390
+ const to = motion.boxIn(el, fx);
391
+ if (old) {
392
+ if (!t.reduced)
393
+ play("move", name, motion.move(el, old.box, to, t));
394
+ if (this.signatures.get(key) !== old.signature)
395
+ play("cross-fade", name, motion.swap(el, t));
396
+ continue;
397
+ }
398
+ const source = BLOCK_MORPH_FROM[name];
399
+ const from = source && !now.has(source) ? before.blocks.get(source)?.box : undefined;
400
+ if (!t.reduced && from)
401
+ play("move", name, motion.move(el, from, to, t, { grow: true, fade: true }));
402
+ else
403
+ play("arrive", name, motion.arrive(el, arrivals++, t));
404
+ }
405
+ // The card clips what moves only while it moves, so a tooltip can overhang it at rest.
406
+ const generation = ++this.generation;
407
+ void Promise.allSettled(started.map((animation) => animation.finished)).then(() => {
408
+ if (generation === this.generation)
409
+ card.classList.remove("moving");
410
+ });
411
+ }
412
+ };
413
+ ConsentFlow.styles = css `
414
+ :host {
415
+ display: block;
416
+ width: 100%;
417
+ text-wrap: pretty;
418
+ }
419
+
420
+ .flow {
421
+ box-sizing: border-box;
422
+ max-width: var(--cs-screen-max-width, 576px);
423
+ margin: 0 auto;
424
+ }
425
+
426
+ .card {
427
+ position: relative;
428
+ display: flex;
429
+ flex-direction: column;
430
+ gap: var(--cs-card-gap, 22px);
431
+ min-width: 0;
432
+ background: var(--cs-surface-card);
433
+ border: 1px solid var(--cs-surface-border);
434
+ border-radius: var(--cs-card-radius, 12px);
435
+ box-shadow: var(--cs-card-shadow);
436
+ padding: var(--cs-card-padding, 28px 28px 24px);
437
+ color: var(--cs-text-primary);
438
+ overflow-wrap: break-word;
439
+ }
440
+
441
+ .card.moving {
442
+ overflow: clip;
443
+ }
444
+
445
+ .block {
446
+ position: relative;
447
+ min-width: 0;
448
+ }
449
+
450
+ /* The eyebrow sits close over the headline, as on the screen. */
451
+ .block[data-block="eyebrow"] {
452
+ margin-bottom: -12px;
453
+ }
454
+
455
+ .fx {
456
+ position: absolute;
457
+ inset: 0;
458
+ pointer-events: none;
459
+ z-index: 5;
460
+ }
461
+
462
+ .below {
463
+ display: flex;
464
+ flex-direction: column;
465
+ align-items: center;
466
+ margin-top: 16px;
467
+ color: var(--cs-text-tertiary);
468
+ }
469
+
470
+ .sr {
471
+ position: absolute;
472
+ width: 1px;
473
+ height: 1px;
474
+ margin: 0;
475
+ overflow: hidden;
476
+ clip-path: inset(50%);
477
+ white-space: nowrap;
478
+ }
479
+
480
+ ${flowBlockStyles}
481
+ `;
482
+ __decorate([
483
+ property({ attribute: false })
484
+ ], ConsentFlow.prototype, "flow", void 0);
485
+ __decorate([
486
+ property({ attribute: false })
487
+ ], ConsentFlow.prototype, "data", void 0);
488
+ __decorate([
489
+ property({ attribute: false })
490
+ ], ConsentFlow.prototype, "copy", void 0);
491
+ __decorate([
492
+ property({ type: String, reflect: true })
493
+ ], ConsentFlow.prototype, "step", void 0);
494
+ __decorate([
495
+ property({ type: String })
496
+ ], ConsentFlow.prototype, "theme", void 0);
497
+ __decorate([
498
+ property({ type: Boolean, reflect: true })
499
+ ], ConsentFlow.prototype, "preview", void 0);
500
+ ConsentFlow = __decorate([
501
+ customElement("consent-flow")
502
+ ], ConsentFlow);
503
+ export { ConsentFlow };
504
+ //# sourceMappingURL=consent-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent-flow.js","sourceRoot":"","sources":["../../src/components/consent-flow.ts"],"names":[],"mappings":";;;;;;AA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CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;IACL,CAAC;;AAEe,kBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmExB,eAAe;GAClB,AApEqB,CAoEpB;AApe8B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;yCAA6C;AAG5C;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;yCAAmC;AAGlC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;yCAAqB;AAMT;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAA0B;AAGxC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA+B;AAGd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAiB;AApBjD,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAuevB"}
@@ -1 +1 @@
1
- {"version":3,"file":"consent-footer.d.ts","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C,qBACa,aAAc,SAAQ,UAAU;IACf,aAAa,SAAM;IAC/C,qDAAqD;IACT,OAAO,UAAS;;IAM5D,OAAgB,MAAM,0BAyCpB;IAEO,MAAM;CA+BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
1
+ {"version":3,"file":"consent-footer.d.ts","sourceRoot":"","sources":["../../src/components/consent-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C,qBACa,aAAc,SAAQ,UAAU;IACf,aAAa,SAAM;IAC/C,qDAAqD;IACT,OAAO,UAAS;;IAM5D,OAAgB,MAAM,0BAgDpB;IAEO,MAAM;CA+BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
@@ -27,7 +27,7 @@ let ConsentFooter = class ConsentFooter extends LitElement {
27
27
  guardPreviewNavigation(this);
28
28
  }
29
29
  render() {
30
- return html `
30
+ return html `<div class="footer" part="footer">
31
31
  <span class="left">
32
32
  <svg
33
33
  class="check"
@@ -55,13 +55,20 @@ let ConsentFooter = class ConsentFooter extends LitElement {
55
55
  : html `<span class="how"
56
56
  >${CONSENT_COPY_TOKENS.attribution.howThisWorks}</span
57
57
  >`}
58
- `;
58
+ </div>`;
59
59
  }
60
60
  };
61
61
  ConsentFooter.styles = css `
62
62
  /* Each half stays on one line; in a narrow card the second moves under
63
63
  the first. */
64
+ /* The box is on an inner element: a page's reset (such as
65
+ Tailwind's "* { padding: 0; margin: 0; border: 0 }") reaches the host,
66
+ never inside. */
64
67
  :host {
68
+ display: block;
69
+ }
70
+
71
+ .footer {
65
72
  display: flex;
66
73
  flex-wrap: wrap;
67
74
  align-items: center;