@bchconnect/ui 0.0.0-stage → 0.1.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 (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +269 -2
  3. package/custom-elements.json +1771 -0
  4. package/dist/assets.generated.js +28 -0
  5. package/dist/assets.generated.js.map +1 -0
  6. package/dist/bchconnect-modal.d.ts +69 -0
  7. package/dist/bchconnect-modal.js +96 -0
  8. package/dist/bchconnect-modal.js.map +1 -0
  9. package/dist/code.js +130 -0
  10. package/dist/code.js.map +1 -0
  11. package/dist/defaults.d.ts +50 -0
  12. package/dist/defaults.js +139 -0
  13. package/dist/defaults.js.map +1 -0
  14. package/dist/define.d.ts +17 -0
  15. package/dist/define.js +23 -0
  16. package/dist/define.js.map +1 -0
  17. package/dist/directory.js +37 -0
  18. package/dist/directory.js.map +1 -0
  19. package/dist/faces.js +80 -0
  20. package/dist/faces.js.map +1 -0
  21. package/dist/gesture.js +78 -0
  22. package/dist/gesture.js.map +1 -0
  23. package/dist/headless.d.ts +99 -0
  24. package/dist/headless.js +190 -0
  25. package/dist/headless.js.map +1 -0
  26. package/dist/html.js +17 -0
  27. package/dist/html.js.map +1 -0
  28. package/dist/icons.js +21 -0
  29. package/dist/icons.js.map +1 -0
  30. package/dist/index.d.ts +32 -0
  31. package/dist/index.js +8 -0
  32. package/dist/locales/es.d.ts +12 -0
  33. package/dist/locales/es.js +50 -0
  34. package/dist/locales/es.js.map +1 -0
  35. package/dist/messages.d.ts +95 -0
  36. package/dist/messages.js +63 -0
  37. package/dist/messages.js.map +1 -0
  38. package/dist/modal.d.ts +112 -0
  39. package/dist/modal.js +694 -0
  40. package/dist/modal.js.map +1 -0
  41. package/dist/motion.js +160 -0
  42. package/dist/motion.js.map +1 -0
  43. package/dist/page-scroll.js +28 -0
  44. package/dist/page-scroll.js.map +1 -0
  45. package/dist/register.js +14 -0
  46. package/dist/register.js.map +1 -0
  47. package/dist/sheet-query.js +8 -0
  48. package/dist/sheet-query.js.map +1 -0
  49. package/dist/sheet.js +329 -0
  50. package/dist/sheet.js.map +1 -0
  51. package/dist/state.d.ts +175 -0
  52. package/dist/state.js +11 -0
  53. package/dist/state.js.map +1 -0
  54. package/dist/styles/modal.css.sheet.js +13 -0
  55. package/dist/styles/modal.css.sheet.js.map +1 -0
  56. package/dist/styles/theme.generated.css.sheet.js +13 -0
  57. package/dist/styles/theme.generated.css.sheet.js.map +1 -0
  58. package/dist/styles/toast.css.sheet.js +13 -0
  59. package/dist/styles/toast.css.sheet.js.map +1 -0
  60. package/dist/styles/tokens.css.sheet.js +13 -0
  61. package/dist/styles/tokens.css.sheet.js.map +1 -0
  62. package/dist/theme.generated.d.ts +105 -0
  63. package/dist/theme.generated.js +96 -0
  64. package/dist/theme.generated.js.map +1 -0
  65. package/dist/toast.d.ts +96 -0
  66. package/dist/toast.js +180 -0
  67. package/dist/toast.js.map +1 -0
  68. package/package.json +87 -3
package/dist/sheet.js ADDED
@@ -0,0 +1,329 @@
1
+
2
+ import { tempoOf } from "./motion.js";
3
+ import { decideRelease, intent, recordVelocitySample, releaseDuration, rubberBand, scrimOpacity, velocityAt } from "./gesture.js";
4
+ //#region src/sheet.ts
5
+ /** After a settle or dismiss, how long a resulting click stays swallowed. */
6
+ const CLICK_GUARD_MS = 100;
7
+ function readOffset(element) {
8
+ return new DOMMatrixReadOnly(getComputedStyle(element).transform).m42;
9
+ }
10
+ function readOpacity(element) {
11
+ const value = Number.parseFloat(getComputedStyle(element).opacity);
12
+ return Number.isNaN(value) ? 1 : value;
13
+ }
14
+ function transformFor(offsetPx) {
15
+ return offsetPx === 0 ? "" : `translate3d(0, ${offsetPx}px, 0)`;
16
+ }
17
+ function animationsAffecting(element, property) {
18
+ return element.getAnimations().filter((animation) => animation.effect instanceof KeyframeEffect && animation.effect.getKeyframes().some((frame) => property in frame));
19
+ }
20
+ function draggableSheet(card, scrim, handlers) {
21
+ let phase = "idle";
22
+ let pointerId = null;
23
+ let touchId = null;
24
+ let pressTarget = null;
25
+ let startX = 0;
26
+ let startY = 0;
27
+ let dragOriginY = 0;
28
+ let dragBaseOffset = 0;
29
+ let dragHeight = 0;
30
+ let offset = 0;
31
+ let samples = [];
32
+ let justDragged = false;
33
+ let clickGuardTimeout = null;
34
+ let rafId = null;
35
+ let cardAnimation = null;
36
+ let scrimAnimation = null;
37
+ let releaseToken = 0;
38
+ const setWillChange = (active) => {
39
+ card.style.willChange = active ? "transform" : "";
40
+ scrim.style.willChange = active ? "opacity" : "";
41
+ };
42
+ const cancelScheduledWrite = () => {
43
+ if (rafId !== null) {
44
+ cancelAnimationFrame(rafId);
45
+ rafId = null;
46
+ }
47
+ };
48
+ const scheduleWrite = () => {
49
+ if (rafId !== null) return;
50
+ rafId = requestAnimationFrame(() => {
51
+ rafId = null;
52
+ card.style.transform = `translate3d(0, ${offset}px, 0)`;
53
+ scrim.style.opacity = String(scrimOpacity(offset, dragHeight));
54
+ });
55
+ };
56
+ const freeze = () => {
57
+ releaseToken += 1;
58
+ const currentOffset = readOffset(card);
59
+ const currentOpacity = readOpacity(scrim);
60
+ for (const animation of animationsAffecting(card, "transform")) animation.cancel();
61
+ for (const animation of animationsAffecting(scrim, "opacity")) animation.cancel();
62
+ cardAnimation = null;
63
+ scrimAnimation = null;
64
+ offset = currentOffset;
65
+ card.style.transform = transformFor(currentOffset);
66
+ scrim.style.opacity = String(currentOpacity);
67
+ return currentOffset;
68
+ };
69
+ const startRelease = (target, velocity, dismissing) => {
70
+ const fromOffset = offset;
71
+ const fromOpacity = scrimOpacity(offset, dragHeight);
72
+ const remaining = target - fromOffset;
73
+ const speed = remaining === 0 ? 0 : velocity * Math.sign(remaining);
74
+ const tempo = tempoOf(card);
75
+ const longest = dismissing ? tempo.sheetOut : tempo.sheetIn;
76
+ const duration = releaseDuration(Math.abs(remaining), speed, longest);
77
+ const easing = tempo.sheet;
78
+ const toOpacity = dismissing ? 0 : 1;
79
+ setWillChange(true);
80
+ releaseToken += 1;
81
+ const token = releaseToken;
82
+ cardAnimation = card.animate([{ transform: `translate3d(0, ${fromOffset}px, 0)` }, { transform: `translate3d(0, ${target}px, 0)` }], {
83
+ duration,
84
+ easing,
85
+ fill: "forwards"
86
+ });
87
+ scrimAnimation = scrim.animate([{ opacity: fromOpacity }, { opacity: toOpacity }], {
88
+ duration,
89
+ easing,
90
+ fill: "forwards"
91
+ });
92
+ offset = target;
93
+ const bothFinished = Promise.allSettled([cardAnimation.finished, scrimAnimation.finished]);
94
+ if (dismissing) handlers.onDismiss(bothFinished.then(() => void 0));
95
+ bothFinished.then(() => {
96
+ if (token !== releaseToken) return;
97
+ cardAnimation?.cancel();
98
+ scrimAnimation?.cancel();
99
+ cardAnimation = null;
100
+ scrimAnimation = null;
101
+ setWillChange(false);
102
+ if (dismissing) {
103
+ card.style.transform = `translate3d(0, ${target}px, 0)`;
104
+ scrim.style.opacity = "0";
105
+ } else {
106
+ card.style.transform = "";
107
+ scrim.style.opacity = "";
108
+ offset = 0;
109
+ }
110
+ });
111
+ };
112
+ const armClickGuard = () => {
113
+ justDragged = true;
114
+ if (clickGuardTimeout !== null) clearTimeout(clickGuardTimeout);
115
+ clickGuardTimeout = setTimeout(() => {
116
+ justDragged = false;
117
+ clickGuardTimeout = null;
118
+ }, CLICK_GUARD_MS);
119
+ };
120
+ const scrollersAbove = (target) => {
121
+ const found = [];
122
+ let node = target instanceof Element ? target : null;
123
+ while (node !== null && node !== card) {
124
+ const overflowY = getComputedStyle(node).overflowY;
125
+ if (overflowY === "auto" || overflowY === "scroll") found.push(node);
126
+ node = node.parentElement;
127
+ }
128
+ return found;
129
+ };
130
+ const scrollState = (target) => {
131
+ let scrolled = false;
132
+ let scrollable = false;
133
+ for (const node of scrollersAbove(target)) {
134
+ if (node.scrollTop > 0) scrolled = true;
135
+ if (node.scrollHeight - node.clientHeight - node.scrollTop > 1) scrollable = true;
136
+ }
137
+ return {
138
+ scrolled,
139
+ scrollable
140
+ };
141
+ };
142
+ const press = (x, y, target) => {
143
+ if (!handlers.isActive() || phase !== "idle") return false;
144
+ if (target instanceof Element && target.closest("input, textarea, select") !== null) return false;
145
+ phase = "pressed";
146
+ pressTarget = target;
147
+ startX = x;
148
+ startY = y;
149
+ samples = [];
150
+ justDragged = false;
151
+ if (clickGuardTimeout !== null) {
152
+ clearTimeout(clickGuardTimeout);
153
+ clickGuardTimeout = null;
154
+ }
155
+ return true;
156
+ };
157
+ const move = (x, y, time, cancelable) => {
158
+ if (phase === "pressed") {
159
+ const dx = x - startX;
160
+ const dy = y - startY;
161
+ const { scrolled, scrollable } = scrollState(pressTarget);
162
+ let decision = intent(dx, dy, scrolled, scrollable);
163
+ if (decision === "drag" && !cancelable) decision = "pass";
164
+ if (decision === null) return "continue";
165
+ if (decision === "pass") {
166
+ phase = "passed";
167
+ return "decided-pass";
168
+ }
169
+ phase = "dragging";
170
+ dragOriginY = y;
171
+ dragBaseOffset = freeze();
172
+ dragHeight = card.getBoundingClientRect().height;
173
+ card.classList.add("is-dragging");
174
+ setWillChange(true);
175
+ samples = recordVelocitySample(samples, time, y);
176
+ return "decided-drag";
177
+ }
178
+ if (phase === "dragging") {
179
+ const raw = dragBaseOffset + (y - dragOriginY);
180
+ samples = recordVelocitySample(samples, time, y);
181
+ offset = raw >= 0 ? raw : -rubberBand(-raw);
182
+ scheduleWrite();
183
+ return "continue";
184
+ }
185
+ return "ignore";
186
+ };
187
+ const finishRelease = (time) => {
188
+ const wasDragging = phase === "dragging";
189
+ phase = "idle";
190
+ pressTarget = null;
191
+ if (!wasDragging) return;
192
+ cancelScheduledWrite();
193
+ card.classList.remove("is-dragging");
194
+ const velocity = velocityAt(samples, time);
195
+ if (decideRelease(offset, dragHeight, velocity)) startRelease(dragHeight, velocity, true);
196
+ else startRelease(0, velocity, false);
197
+ armClickGuard();
198
+ };
199
+ const finishCancel = (time) => {
200
+ const wasDragging = phase === "dragging";
201
+ phase = "idle";
202
+ pressTarget = null;
203
+ if (!wasDragging) return;
204
+ cancelScheduledWrite();
205
+ card.classList.remove("is-dragging");
206
+ startRelease(0, velocityAt(samples, time), false);
207
+ armClickGuard();
208
+ };
209
+ const abandon = () => {
210
+ pointerId = null;
211
+ touchId = null;
212
+ finishCancel(performance.now());
213
+ };
214
+ const onPointerDown = (event) => {
215
+ if (event.pointerType === "touch" || phase === "dragging") return;
216
+ abandon();
217
+ if (press(event.clientX, event.clientY, event.target)) pointerId = event.pointerId;
218
+ };
219
+ const onPointerMove = (event) => {
220
+ if (event.pointerType === "touch" || pointerId !== event.pointerId) return;
221
+ if (event.buttons === 0) {
222
+ abandon();
223
+ return;
224
+ }
225
+ if (move(event.clientX, event.clientY, event.timeStamp, event.cancelable) === "decided-drag") card.setPointerCapture(event.pointerId);
226
+ if (phase === "dragging" && event.cancelable) event.preventDefault();
227
+ };
228
+ const onPointerUp = (event) => {
229
+ if (event.pointerType === "touch" || pointerId !== event.pointerId) return;
230
+ if (card.hasPointerCapture(event.pointerId)) card.releasePointerCapture(event.pointerId);
231
+ pointerId = null;
232
+ finishRelease(event.timeStamp);
233
+ };
234
+ const onPointerCancel = (event) => {
235
+ if (event.pointerType === "touch" || pointerId !== event.pointerId) return;
236
+ if (card.hasPointerCapture(event.pointerId)) card.releasePointerCapture(event.pointerId);
237
+ pointerId = null;
238
+ finishCancel(event.timeStamp);
239
+ };
240
+ const touchById = (list, id) => {
241
+ for (let index = 0; index < list.length; index += 1) {
242
+ const touch = list.item(index);
243
+ if (touch !== null && touch.identifier === id) return touch;
244
+ }
245
+ return null;
246
+ };
247
+ const onTouchStart = (event) => {
248
+ const touch = event.changedTouches.item(0);
249
+ if (touch === null) return;
250
+ if (touchId !== null && touchById(event.touches, touchId) !== null) return;
251
+ if (phase === "dragging" && pointerId !== null) return;
252
+ abandon();
253
+ if (press(touch.clientX, touch.clientY, touch.target)) touchId = touch.identifier;
254
+ };
255
+ const onTouchMove = (event) => {
256
+ if (touchId === null) return;
257
+ const touch = touchById(event.changedTouches, touchId);
258
+ if (touch === null) return;
259
+ move(touch.clientX, touch.clientY, event.timeStamp, event.cancelable);
260
+ if (phase === "dragging" && event.cancelable) event.preventDefault();
261
+ };
262
+ const onTouchEnd = (event) => {
263
+ if (touchId === null) return;
264
+ if (touchById(event.changedTouches, touchId) === null) return;
265
+ touchId = null;
266
+ finishRelease(event.timeStamp);
267
+ };
268
+ const onTouchCancel = (event) => {
269
+ if (touchId === null) return;
270
+ if (touchById(event.changedTouches, touchId) === null) return;
271
+ touchId = null;
272
+ finishCancel(event.timeStamp);
273
+ };
274
+ const onDragStart = (event) => {
275
+ if (handlers.isActive()) event.preventDefault();
276
+ };
277
+ const onClickCapture = (event) => {
278
+ if (!justDragged) return;
279
+ justDragged = false;
280
+ if (clickGuardTimeout !== null) {
281
+ clearTimeout(clickGuardTimeout);
282
+ clickGuardTimeout = null;
283
+ }
284
+ event.preventDefault();
285
+ event.stopPropagation();
286
+ };
287
+ card.addEventListener("pointerdown", onPointerDown);
288
+ card.addEventListener("pointermove", onPointerMove);
289
+ card.addEventListener("pointerup", onPointerUp);
290
+ card.addEventListener("pointercancel", onPointerCancel);
291
+ card.addEventListener("touchstart", onTouchStart, { passive: true });
292
+ card.addEventListener("touchmove", onTouchMove, { passive: false });
293
+ card.addEventListener("touchend", onTouchEnd);
294
+ card.addEventListener("touchcancel", onTouchCancel);
295
+ card.addEventListener("dragstart", onDragStart);
296
+ card.addEventListener("click", onClickCapture, { capture: true });
297
+ const commit = () => {
298
+ cancelScheduledWrite();
299
+ if (handlers.isActive()) freeze();
300
+ pointerId = null;
301
+ touchId = null;
302
+ phase = "idle";
303
+ pressTarget = null;
304
+ card.classList.remove("is-dragging");
305
+ setWillChange(false);
306
+ };
307
+ const release = () => {
308
+ commit();
309
+ card.removeEventListener("pointerdown", onPointerDown);
310
+ card.removeEventListener("pointermove", onPointerMove);
311
+ card.removeEventListener("pointerup", onPointerUp);
312
+ card.removeEventListener("pointercancel", onPointerCancel);
313
+ card.removeEventListener("touchstart", onTouchStart);
314
+ card.removeEventListener("touchmove", onTouchMove);
315
+ card.removeEventListener("touchend", onTouchEnd);
316
+ card.removeEventListener("touchcancel", onTouchCancel);
317
+ card.removeEventListener("dragstart", onDragStart);
318
+ card.removeEventListener("click", onClickCapture, { capture: true });
319
+ if (clickGuardTimeout !== null) clearTimeout(clickGuardTimeout);
320
+ };
321
+ return {
322
+ commit,
323
+ release
324
+ };
325
+ }
326
+ //#endregion
327
+ export { draggableSheet };
328
+
329
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","names":[],"sources":["../src/sheet.ts"],"sourcesContent":["import {\n\tdecideRelease,\n\tintent,\n\trecordVelocitySample,\n\treleaseDuration,\n\trubberBand,\n\tscrimOpacity,\n\ttype VelocitySample,\n\tvelocityAt,\n} from \"./gesture.ts\";\nimport { tempoOf } from \"./motion.ts\";\n\nexport interface SheetHandlers {\n\t/** Called once dismissal is decided. `settled` resolves once the release animation ends, however it ends. */\n\treadonly onDismiss: (settled: Promise<void>) => void;\n\t/** Whether dragging applies at all right now; false on a wide viewport. */\n\treadonly isActive: () => boolean;\n}\n\nexport interface DraggableSheet {\n\t/**\n\t * Freezes the current position and opacity inline and cancels any\n\t * running drag/release animation, so a caller-driven exit (a CSS\n\t * animation, typically) can safely take over from exactly here.\n\t */\n\treadonly commit: () => void;\n\t/** `commit`, plus removes the event listeners. Call once, when the sheet is torn down. */\n\treadonly release: () => void;\n}\n\ntype Phase = \"idle\" | \"pressed\" | \"dragging\" | \"passed\";\n\n/** After a settle or dismiss, how long a resulting click stays swallowed. */\nconst CLICK_GUARD_MS = 100;\n\nfunction readOffset(element: HTMLElement): number {\n\treturn new DOMMatrixReadOnly(getComputedStyle(element).transform).m42;\n}\n\nfunction readOpacity(element: HTMLElement): number {\n\tconst value = Number.parseFloat(getComputedStyle(element).opacity);\n\treturn Number.isNaN(value) ? 1 : value;\n}\n\nfunction transformFor(offsetPx: number): string {\n\treturn offsetPx === 0 ? \"\" : `translate3d(0, ${offsetPx}px, 0)`;\n}\n\n// Only the transform/opacity animations, so an unrelated one (e.g. `morphHeight`'s on the same card) is left alone.\nfunction animationsAffecting(element: Element, property: string): Animation[] {\n\treturn element\n\t\t.getAnimations()\n\t\t.filter(\n\t\t\t(animation) =>\n\t\t\t\tanimation.effect instanceof KeyframeEffect &&\n\t\t\t\tanimation.effect.getKeyframes().some((frame) => property in frame),\n\t\t);\n}\n\n// Moves the card and scrim via transform/opacity only, so dragging stays on\n// the compositor. `card` and `scrim` must share one animated clock: every\n// hand-off between a CSS animation, an inline style and a WAAPI animation\n// happens synchronously, in the same task, from whatever is on screen.\nexport function draggableSheet(\n\tcard: HTMLElement,\n\tscrim: HTMLElement,\n\thandlers: SheetHandlers,\n): DraggableSheet {\n\tlet phase: Phase = \"idle\";\n\tlet pointerId: number | null = null;\n\tlet touchId: number | null = null;\n\tlet pressTarget: EventTarget | null = null;\n\tlet startX = 0;\n\tlet startY = 0;\n\tlet dragOriginY = 0;\n\tlet dragBaseOffset = 0;\n\tlet dragHeight = 0;\n\tlet offset = 0;\n\tlet samples: readonly VelocitySample[] = [];\n\tlet justDragged = false;\n\tlet clickGuardTimeout: ReturnType<typeof setTimeout> | null = null;\n\n\tlet rafId: number | null = null;\n\tlet cardAnimation: Animation | null = null;\n\tlet scrimAnimation: Animation | null = null;\n\t// Bumped on every freeze/new release, so a superseded release's finish\n\t// handler (its `finished` promise still settles after a cancel) can tell\n\t// it no longer owns the sheet and must not touch its styles.\n\tlet releaseToken = 0;\n\n\tconst setWillChange = (active: boolean): void => {\n\t\tcard.style.willChange = active ? \"transform\" : \"\";\n\t\tscrim.style.willChange = active ? \"opacity\" : \"\";\n\t};\n\n\tconst cancelScheduledWrite = (): void => {\n\t\tif (rafId !== null) {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t};\n\n\tconst scheduleWrite = (): void => {\n\t\tif (rafId !== null) return;\n\t\trafId = requestAnimationFrame(() => {\n\t\t\trafId = null;\n\t\t\tcard.style.transform = `translate3d(0, ${offset}px, 0)`;\n\t\t\tscrim.style.opacity = String(scrimOpacity(offset, dragHeight));\n\t\t});\n\t};\n\n\t// Reads whatever is currently on screen (drag, CSS entrance, or a settle\n\t// in flight), commits it as a plain inline style, then cancels every\n\t// animation on both elements — in that order, so nothing jumps.\n\tconst freeze = (): number => {\n\t\treleaseToken += 1;\n\t\tconst currentOffset = readOffset(card);\n\t\tconst currentOpacity = readOpacity(scrim);\n\t\tfor (const animation of animationsAffecting(card, \"transform\")) {\n\t\t\tanimation.cancel();\n\t\t}\n\t\tfor (const animation of animationsAffecting(scrim, \"opacity\")) {\n\t\t\tanimation.cancel();\n\t\t}\n\t\tcardAnimation = null;\n\t\tscrimAnimation = null;\n\t\toffset = currentOffset;\n\t\tcard.style.transform = transformFor(currentOffset);\n\t\tscrim.style.opacity = String(currentOpacity);\n\t\treturn currentOffset;\n\t};\n\n\tconst startRelease = (\n\t\ttarget: number,\n\t\tvelocity: number,\n\t\tdismissing: boolean,\n\t): void => {\n\t\tconst fromOffset = offset;\n\t\tconst fromOpacity = scrimOpacity(offset, dragHeight);\n\t\tconst remaining = target - fromOffset;\n\t\t// Speed toward `target`; zero or negative when the finger was still or moving away.\n\t\tconst speed = remaining === 0 ? 0 : velocity * Math.sign(remaining);\n\t\tconst tempo = tempoOf(card);\n\t\tconst longest = dismissing ? tempo.sheetOut : tempo.sheetIn;\n\t\tconst duration = releaseDuration(Math.abs(remaining), speed, longest);\n\t\tconst easing = tempo.sheet;\n\t\tconst toOpacity = dismissing ? 0 : 1;\n\n\t\tsetWillChange(true);\n\t\treleaseToken += 1;\n\t\tconst token = releaseToken;\n\t\tcardAnimation = card.animate(\n\t\t\t[\n\t\t\t\t{ transform: `translate3d(0, ${fromOffset}px, 0)` },\n\t\t\t\t{ transform: `translate3d(0, ${target}px, 0)` },\n\t\t\t],\n\t\t\t{ duration, easing, fill: \"forwards\" },\n\t\t);\n\t\tscrimAnimation = scrim.animate(\n\t\t\t[{ opacity: fromOpacity }, { opacity: toOpacity }],\n\t\t\t{ duration, easing, fill: \"forwards\" },\n\t\t);\n\t\toffset = target;\n\n\t\tconst bothFinished = Promise.allSettled([\n\t\t\tcardAnimation.finished,\n\t\t\tscrimAnimation.finished,\n\t\t]);\n\t\tif (dismissing) handlers.onDismiss(bothFinished.then(() => undefined));\n\t\tvoid bothFinished.then(() => {\n\t\t\tif (token !== releaseToken) return;\n\t\t\tcardAnimation?.cancel();\n\t\t\tscrimAnimation?.cancel();\n\t\t\tcardAnimation = null;\n\t\t\tscrimAnimation = null;\n\t\t\tsetWillChange(false);\n\t\t\tif (dismissing) {\n\t\t\t\t// Stays off-screen: the caller removes the overlay once it sees `settled`.\n\t\t\t\tcard.style.transform = `translate3d(0, ${target}px, 0)`;\n\t\t\t\tscrim.style.opacity = \"0\";\n\t\t\t} else {\n\t\t\t\tcard.style.transform = \"\";\n\t\t\t\tscrim.style.opacity = \"\";\n\t\t\t\toffset = 0;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst armClickGuard = (): void => {\n\t\tjustDragged = true;\n\t\tif (clickGuardTimeout !== null) clearTimeout(clickGuardTimeout);\n\t\tclickGuardTimeout = setTimeout(() => {\n\t\t\tjustDragged = false;\n\t\t\tclickGuardTimeout = null;\n\t\t}, CLICK_GUARD_MS);\n\t};\n\n\t// Elements between the press and the sheet that own their own vertical scroll.\n\tconst scrollersAbove = (target: EventTarget | null): Element[] => {\n\t\tconst found: Element[] = [];\n\t\tlet node = target instanceof Element ? target : null;\n\t\twhile (node !== null && node !== card) {\n\t\t\tconst overflowY = getComputedStyle(node).overflowY;\n\t\t\tif (overflowY === \"auto\" || overflowY === \"scroll\") found.push(node);\n\t\t\tnode = node.parentElement;\n\t\t}\n\t\treturn found;\n\t};\n\n\tconst scrollState = (\n\t\ttarget: EventTarget | null,\n\t): { scrolled: boolean; scrollable: boolean } => {\n\t\tlet scrolled = false;\n\t\tlet scrollable = false;\n\t\tfor (const node of scrollersAbove(target)) {\n\t\t\tif (node.scrollTop > 0) scrolled = true;\n\t\t\tif (node.scrollHeight - node.clientHeight - node.scrollTop > 1) {\n\t\t\t\tscrollable = true;\n\t\t\t}\n\t\t}\n\t\treturn { scrolled, scrollable };\n\t};\n\n\tconst press = (x: number, y: number, target: EventTarget | null): boolean => {\n\t\tif (!handlers.isActive() || phase !== \"idle\") return false;\n\t\t// Text inputs and native pickers own their own gestures.\n\t\tif (\n\t\t\ttarget instanceof Element &&\n\t\t\ttarget.closest(\"input, textarea, select\") !== null\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\tphase = \"pressed\";\n\t\tpressTarget = target;\n\t\tstartX = x;\n\t\tstartY = y;\n\t\tsamples = [];\n\t\tjustDragged = false;\n\t\tif (clickGuardTimeout !== null) {\n\t\t\tclearTimeout(clickGuardTimeout);\n\t\t\tclickGuardTimeout = null;\n\t\t}\n\t\treturn true;\n\t};\n\n\ttype MoveResult = \"continue\" | \"decided-drag\" | \"decided-pass\" | \"ignore\";\n\n\tconst move = (\n\t\tx: number,\n\t\ty: number,\n\t\ttime: number,\n\t\tcancelable: boolean,\n\t): MoveResult => {\n\t\tif (phase === \"pressed\") {\n\t\t\tconst dx = x - startX;\n\t\t\tconst dy = y - startY;\n\t\t\tconst { scrolled, scrollable } = scrollState(pressTarget);\n\t\t\tlet decision = intent(dx, dy, scrolled, scrollable);\n\t\t\t// The browser already owns this gesture; it will not let us prevent it.\n\t\t\tif (decision === \"drag\" && !cancelable) decision = \"pass\";\n\t\t\tif (decision === null) return \"continue\";\n\t\t\tif (decision === \"pass\") {\n\t\t\t\tphase = \"passed\";\n\t\t\t\treturn \"decided-pass\";\n\t\t\t}\n\t\t\tphase = \"dragging\";\n\t\t\tdragOriginY = y;\n\t\t\tdragBaseOffset = freeze();\n\t\t\tdragHeight = card.getBoundingClientRect().height;\n\t\t\tcard.classList.add(\"is-dragging\");\n\t\t\tsetWillChange(true);\n\t\t\tsamples = recordVelocitySample(samples, time, y);\n\t\t\treturn \"decided-drag\";\n\t\t}\n\t\tif (phase === \"dragging\") {\n\t\t\tconst raw = dragBaseOffset + (y - dragOriginY);\n\t\t\tsamples = recordVelocitySample(samples, time, y);\n\t\t\toffset = raw >= 0 ? raw : -rubberBand(-raw);\n\t\t\tscheduleWrite();\n\t\t\treturn \"continue\";\n\t\t}\n\t\treturn \"ignore\";\n\t};\n\n\tconst finishRelease = (time: number): void => {\n\t\tconst wasDragging = phase === \"dragging\";\n\t\tphase = \"idle\";\n\t\tpressTarget = null;\n\t\tif (!wasDragging) return;\n\t\tcancelScheduledWrite();\n\t\tcard.classList.remove(\"is-dragging\");\n\t\tconst velocity = velocityAt(samples, time);\n\t\tif (decideRelease(offset, dragHeight, velocity)) {\n\t\t\tstartRelease(dragHeight, velocity, true);\n\t\t} else {\n\t\t\tstartRelease(0, velocity, false);\n\t\t}\n\t\tarmClickGuard();\n\t};\n\n\tconst finishCancel = (time: number): void => {\n\t\tconst wasDragging = phase === \"dragging\";\n\t\tphase = \"idle\";\n\t\tpressTarget = null;\n\t\tif (!wasDragging) return;\n\t\tcancelScheduledWrite();\n\t\tcard.classList.remove(\"is-dragging\");\n\t\t// A cancelled gesture never dismisses, only settles.\n\t\tstartRelease(0, velocityAt(samples, time), false);\n\t\tarmClickGuard();\n\t};\n\n\t// A press that ended where no listener could see it would otherwise block every later one.\n\tconst abandon = (): void => {\n\t\tpointerId = null;\n\t\ttouchId = null;\n\t\tfinishCancel(performance.now());\n\t};\n\n\tconst onPointerDown = (event: PointerEvent): void => {\n\t\tif (event.pointerType === \"touch\" || phase === \"dragging\") return;\n\t\tabandon();\n\t\tif (press(event.clientX, event.clientY, event.target)) {\n\t\t\tpointerId = event.pointerId;\n\t\t}\n\t};\n\n\tconst onPointerMove = (event: PointerEvent): void => {\n\t\tif (event.pointerType === \"touch\" || pointerId !== event.pointerId) return;\n\t\t// No button held means the release happened where no listener saw it.\n\t\tif (event.buttons === 0) {\n\t\t\tabandon();\n\t\t\treturn;\n\t\t}\n\t\tconst result = move(\n\t\t\tevent.clientX,\n\t\t\tevent.clientY,\n\t\t\tevent.timeStamp,\n\t\t\tevent.cancelable,\n\t\t);\n\t\tif (result === \"decided-drag\") card.setPointerCapture(event.pointerId);\n\t\tif (phase === \"dragging\" && event.cancelable) event.preventDefault();\n\t};\n\n\tconst onPointerUp = (event: PointerEvent): void => {\n\t\tif (event.pointerType === \"touch\" || pointerId !== event.pointerId) return;\n\t\tif (card.hasPointerCapture(event.pointerId)) {\n\t\t\tcard.releasePointerCapture(event.pointerId);\n\t\t}\n\t\tpointerId = null;\n\t\tfinishRelease(event.timeStamp);\n\t};\n\n\tconst onPointerCancel = (event: PointerEvent): void => {\n\t\tif (event.pointerType === \"touch\" || pointerId !== event.pointerId) return;\n\t\tif (card.hasPointerCapture(event.pointerId)) {\n\t\t\tcard.releasePointerCapture(event.pointerId);\n\t\t}\n\t\tpointerId = null;\n\t\tfinishCancel(event.timeStamp);\n\t};\n\n\tconst touchById = (list: TouchList, id: number): Touch | null => {\n\t\tfor (let index = 0; index < list.length; index += 1) {\n\t\t\tconst touch = list.item(index);\n\t\t\tif (touch !== null && touch.identifier === id) return touch;\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst onTouchStart = (event: TouchEvent): void => {\n\t\tconst touch = event.changedTouches.item(0);\n\t\tif (touch === null) return;\n\t\t// A second finger never takes over while the first is still down.\n\t\tif (touchId !== null && touchById(event.touches, touchId) !== null) return;\n\t\tif (phase === \"dragging\" && pointerId !== null) return;\n\t\tabandon();\n\t\tif (press(touch.clientX, touch.clientY, touch.target)) {\n\t\t\ttouchId = touch.identifier;\n\t\t}\n\t};\n\n\tconst onTouchMove = (event: TouchEvent): void => {\n\t\tif (touchId === null) return;\n\t\tconst touch = touchById(event.changedTouches, touchId);\n\t\tif (touch === null) return;\n\t\tmove(touch.clientX, touch.clientY, event.timeStamp, event.cancelable);\n\t\tif (phase === \"dragging\" && event.cancelable) event.preventDefault();\n\t};\n\n\tconst onTouchEnd = (event: TouchEvent): void => {\n\t\tif (touchId === null) return;\n\t\tconst touch = touchById(event.changedTouches, touchId);\n\t\tif (touch === null) return;\n\t\ttouchId = null;\n\t\tfinishRelease(event.timeStamp);\n\t};\n\n\tconst onTouchCancel = (event: TouchEvent): void => {\n\t\tif (touchId === null) return;\n\t\tconst touch = touchById(event.changedTouches, touchId);\n\t\tif (touch === null) return;\n\t\ttouchId = null;\n\t\tfinishCancel(event.timeStamp);\n\t};\n\n\tconst onDragStart = (event: DragEvent): void => {\n\t\t// A mouse drag starting on a link or image is otherwise taken by native drag-and-drop.\n\t\tif (handlers.isActive()) event.preventDefault();\n\t};\n\n\tconst onClickCapture = (event: MouseEvent): void => {\n\t\tif (!justDragged) return;\n\t\tjustDragged = false;\n\t\tif (clickGuardTimeout !== null) {\n\t\t\tclearTimeout(clickGuardTimeout);\n\t\t\tclickGuardTimeout = null;\n\t\t}\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t};\n\n\tcard.addEventListener(\"pointerdown\", onPointerDown);\n\tcard.addEventListener(\"pointermove\", onPointerMove);\n\tcard.addEventListener(\"pointerup\", onPointerUp);\n\tcard.addEventListener(\"pointercancel\", onPointerCancel);\n\tcard.addEventListener(\"touchstart\", onTouchStart, { passive: true });\n\tcard.addEventListener(\"touchmove\", onTouchMove, { passive: false });\n\tcard.addEventListener(\"touchend\", onTouchEnd);\n\tcard.addEventListener(\"touchcancel\", onTouchCancel);\n\tcard.addEventListener(\"dragstart\", onDragStart);\n\tcard.addEventListener(\"click\", onClickCapture, { capture: true });\n\n\tconst commit = (): void => {\n\t\tcancelScheduledWrite();\n\t\t// Outside drawer mode the card's motion is not this module's to touch.\n\t\tif (handlers.isActive()) freeze();\n\t\tpointerId = null;\n\t\ttouchId = null;\n\t\tphase = \"idle\";\n\t\tpressTarget = null;\n\t\tcard.classList.remove(\"is-dragging\");\n\t\tsetWillChange(false);\n\t};\n\n\tconst release = (): void => {\n\t\tcommit();\n\t\tcard.removeEventListener(\"pointerdown\", onPointerDown);\n\t\tcard.removeEventListener(\"pointermove\", onPointerMove);\n\t\tcard.removeEventListener(\"pointerup\", onPointerUp);\n\t\tcard.removeEventListener(\"pointercancel\", onPointerCancel);\n\t\tcard.removeEventListener(\"touchstart\", onTouchStart);\n\t\tcard.removeEventListener(\"touchmove\", onTouchMove);\n\t\tcard.removeEventListener(\"touchend\", onTouchEnd);\n\t\tcard.removeEventListener(\"touchcancel\", onTouchCancel);\n\t\tcard.removeEventListener(\"dragstart\", onDragStart);\n\t\tcard.removeEventListener(\"click\", onClickCapture, { capture: true });\n\t\tif (clickGuardTimeout !== null) clearTimeout(clickGuardTimeout);\n\t};\n\n\treturn { commit, release };\n}\n"],"mappings":";;;;;AAiCA,MAAM,iBAAiB;AAEvB,SAAS,WAAW,SAA8B;CACjD,OAAO,IAAI,kBAAkB,iBAAiB,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;AACnE;AAEA,SAAS,YAAY,SAA8B;CAClD,MAAM,QAAQ,OAAO,WAAW,iBAAiB,OAAO,CAAC,CAAC,OAAO;CACjE,OAAO,OAAO,MAAM,KAAK,IAAI,IAAI;AAClC;AAEA,SAAS,aAAa,UAA0B;CAC/C,OAAO,aAAa,IAAI,KAAK,kBAAkB,SAAS;AACzD;AAGA,SAAS,oBAAoB,SAAkB,UAA+B;CAC7E,OAAO,QACL,cAAc,CAAC,CACf,QACC,cACA,UAAU,kBAAkB,kBAC5B,UAAU,OAAO,aAAa,CAAC,CAAC,MAAM,UAAU,YAAY,KAAK,CACnE;AACF;AAMA,SAAgB,eACf,MACA,OACA,UACiB;CACjB,IAAI,QAAe;CACnB,IAAI,YAA2B;CAC/B,IAAI,UAAyB;CAC7B,IAAI,cAAkC;CACtC,IAAI,SAAS;CACb,IAAI,SAAS;CACb,IAAI,cAAc;CAClB,IAAI,iBAAiB;CACrB,IAAI,aAAa;CACjB,IAAI,SAAS;CACb,IAAI,UAAqC,CAAC;CAC1C,IAAI,cAAc;CAClB,IAAI,o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@@ -0,0 +1,175 @@
1
+
2
+ //#region src/state.d.ts
3
+ /**
4
+ * Off-mainnet networks get a badge; mainnet does not. Mirrors
5
+ * `@bchconnect/core`'s `Network`.
6
+ *
7
+ * @beta
8
+ */
9
+ export type Network = "mainnet" | "chipnet" | "regtest";
10
+ /**
11
+ * Which connect protocol a session uses.
12
+ *
13
+ * @beta
14
+ */
15
+ export type ProtocolId = "wizardconnect" | "bch-wc2" | "cashconnect";
16
+ /**
17
+ * How a protocol's mark fills its bounds: `tile` is already a plate;
18
+ * `glyph` needs one composed around it (see `code.ts`).
19
+ *
20
+ * @beta
21
+ */
22
+ export type MarkShape = "tile" | "glyph";
23
+ /**
24
+ * A protocol's mark, as drawn into the connection code.
25
+ *
26
+ * @beta
27
+ */
28
+ export interface ProtocolMark {
29
+ /** Where the mark's image is served from. */
30
+ readonly src: string;
31
+ /** Whether the mark is a solid tile or a glyph that needs a plate. */
32
+ readonly shape: MarkShape;
33
+ }
34
+ /**
35
+ * One session type a visitor can choose.
36
+ *
37
+ * @beta
38
+ */
39
+ export interface ProtocolOption {
40
+ /** The protocol's identifier. */
41
+ readonly id: ProtocolId;
42
+ /** The protocol's name, as shown in the session-type control. */
43
+ readonly name: string;
44
+ /** The protocol's mark, embedded in the code rather than laid on top. */
45
+ readonly mark: ProtocolMark | null;
46
+ }
47
+ /**
48
+ * Which face of the modal is showing.
49
+ *
50
+ * @beta
51
+ */
52
+ export type ModalScreen = "connect" | "wallets";
53
+ /**
54
+ * A wallet in the directory, with somewhere to get it. Separate from
55
+ * {@link WalletOption}: one you can open now, versus one you could install.
56
+ *
57
+ * @beta
58
+ */
59
+ export interface WalletDirectoryEntry {
60
+ /** A stable identifier for the wallet. */
61
+ readonly id: string;
62
+ /** The wallet's display name. */
63
+ readonly name: string;
64
+ /** The wallet's logo, as a URL or data URI, or `null` to show a generic wallet mark. */
65
+ readonly logo: string | null;
66
+ /**
67
+ * Where to get the wallet, or `null` when there is nowhere to send
68
+ * visitors yet. The row is then shown with no link. `label` is optional;
69
+ * without it the modal falls back to `messages.getWallet(name)`.
70
+ */
71
+ readonly link: {
72
+ readonly label?: string;
73
+ readonly href: string;
74
+ } | null;
75
+ }
76
+ /**
77
+ * A wallet listed in the modal. Selecting it narrows the session-type tabs to
78
+ * its `protocols`; its `href`, when present, opens it on the desktop.
79
+ *
80
+ * @beta
81
+ */
82
+ export interface WalletOption {
83
+ /** A stable identifier for the wallet. */
84
+ readonly id: string;
85
+ /** The wallet's display name. */
86
+ readonly name: string;
87
+ /** The wallet's logo, as a URL or data URI, or `null` to show a generic wallet mark. */
88
+ readonly logo: string | null;
89
+ /** Every session type this wallet can open a connection with. */
90
+ readonly protocols: readonly ProtocolId[];
91
+ /**
92
+ * The wallet's desktop link, or `null` when it has none; the wallet is
93
+ * then connected by scanning. A `{link}` in it is replaced with the live
94
+ * connection link, URI-encoded.
95
+ */
96
+ readonly href: string | null;
97
+ }
98
+ /**
99
+ * A wallet, the session types it speaks and its desktop link; the caller
100
+ * keeps those that speak an enabled protocol and builds a
101
+ * {@link WalletOption} from each.
102
+ *
103
+ * @beta
104
+ */
105
+ export interface WalletSupport {
106
+ /** A stable identifier for the wallet. */
107
+ readonly id: string;
108
+ /** The wallet's display name. */
109
+ readonly name: string;
110
+ /** The wallet's logo, as a URL or data URI. */
111
+ readonly logo: string;
112
+ /** Every session type this wallet can open a connection with. */
113
+ readonly protocols: readonly ProtocolId[];
114
+ /** The wallet's desktop link, as in {@link WalletOption.href}, or `null` when it has none. */
115
+ readonly href: string | null;
116
+ }
117
+ /**
118
+ * Why a connection did not happen; mirrors the client's failure modes
119
+ * (`aborted` = user-side, `rejected` = wallet-side).
120
+ *
121
+ * @beta
122
+ */
123
+ export type FailureReason = "rejected" | "timeout" | "aborted" | "transport" | "network-mismatch" | "unsupported";
124
+ /**
125
+ * Where the attempt is. `initiating` exists only for protocols whose link
126
+ * comes from a relay; WizardConnect skips it.
127
+ *
128
+ * @beta
129
+ */
130
+ export type ConnectPhase = {
131
+ readonly kind: "initiating";
132
+ } | {
133
+ readonly kind: "awaiting-approval";
134
+ readonly link: string;
135
+ } | {
136
+ readonly kind: "connected";
137
+ /** `null` when the wallet didn't identify itself. */
138
+ readonly walletName: string | null;
139
+ /** The wallet's logo, so the success moment shows who answered. */
140
+ readonly walletLogo: string | null;
141
+ } | {
142
+ readonly kind: "failed";
143
+ readonly reason: FailureReason;
144
+ };
145
+ /**
146
+ * The whole of what the modal renders, for one state of one attempt.
147
+ *
148
+ * @beta
149
+ */
150
+ export interface ModalView {
151
+ /** The screen to show. */
152
+ readonly screen: ModalScreen;
153
+ /** The session type currently selected. Must be one of `protocols[].id`. */
154
+ readonly protocol: ProtocolId;
155
+ /** Every session type the visitor may choose between. */
156
+ readonly protocols: readonly ProtocolOption[];
157
+ /**
158
+ * Every wallet that speaks at least one of `protocols`, never filtered by
159
+ * `protocol`. Shown on a wide viewport only.
160
+ */
161
+ readonly wallets: readonly WalletOption[];
162
+ /**
163
+ * The selected wallet's id. `null`, or an id not in `wallets`, selects the
164
+ * first of `wallets` that speaks `protocol`, else the first listed.
165
+ */
166
+ readonly wallet: string | null;
167
+ /** Every wallet worth installing, for the "Get a wallet" screen. */
168
+ readonly directory: readonly WalletDirectoryEntry[];
169
+ /** The network the connection would be made on. */
170
+ readonly network: Network;
171
+ /** Where the attempt currently is. */
172
+ readonly phase: ConnectPhase;
173
+ }
174
+ //#endregion
175
+ //# sourceMappingURL=state.d.ts.map
package/dist/state.js ADDED
@@ -0,0 +1,11 @@
1
+
2
+ //#region src/state.ts
3
+ const NETWORK_LABEL = {
4
+ mainnet: "Mainnet",
5
+ chipnet: "Chipnet",
6
+ regtest: "Regtest"
7
+ };
8
+ //#endregion
9
+ export { NETWORK_LABEL };
10
+
11
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","names":[],"sources":["../src/state.ts"],"sourcesContent":["// What the modal renders. Types only; the modal has no connection logic of its own.\n\n/**\n * Off-mainnet networks get a badge; mainnet does not. Mirrors\n * `@bchconnect/core`'s `Network`.\n *\n * @beta\n */\nexport type Network = \"mainnet\" | \"chipnet\" | \"regtest\";\n\nexport const NETWORK_LABEL: Readonly<Record<Network, string>> = {\n\tmainnet: \"Mainnet\",\n\tchipnet: \"Chipnet\",\n\tregtest: \"Regtest\",\n};\n\n/**\n * Which connect protocol a session uses.\n *\n * @beta\n */\nexport type ProtocolId = \"wizardconnect\" | \"bch-wc2\" | \"cashconnect\";\n\n/**\n * How a protocol's mark fills its bounds: `tile` is already a plate;\n * `glyph` needs one composed around it (see `code.ts`).\n *\n * @beta\n */\nexport type MarkShape = \"tile\" | \"glyph\";\n\n/**\n * A protocol's mark, as drawn into the connection code.\n *\n * @beta\n */\nexport interface ProtocolMark {\n\t/** Where the mark's image is served from. */\n\treadonly src: string;\n\t/** Whether the mark is a solid tile or a glyph that needs a plate. */\n\treadonly shape: MarkShape;\n}\n\n/**\n * One session type a visitor can choose.\n *\n * @beta\n */\nexport interface ProtocolOption {\n\t/** The protocol's identifier. */\n\treadonly id: ProtocolId;\n\t/** The protocol's name, as shown in the session-type control. */\n\treadonly name: string;\n\t/** The protocol's mark, embedded in the code rather than laid on top. */\n\treadonly mark: ProtocolMark | null;\n}\n\n/**\n * Which face of the modal is showing.\n *\n * @beta\n */\nexport type ModalScreen = \"connect\" | \"wallets\";\n\n/**\n * A wallet in the directory, with somewhere to get it. Separate from\n * {@link WalletOption}: one you can open now, versus one you could install.\n *\n * @beta\n */\nexport interface WalletDirectoryEntry {\n\t/** A stable identifier for the wallet. */\n\treadonly id: string;\n\t/** The wallet's display name. */\n\treadonly name: string;\n\t/** The wallet's logo, as a URL or data URI, or `null` to show a generic wallet mark. */\n\treadonly logo: string | null;\n\t/**\n\t * Where to get the wallet, or `null` when there is nowhere to send\n\t * visitors yet. The row is then shown with no link. `label` is optional;\n\t * without it the modal falls back to `messages.getWallet(name)`.\n\t */\n\treadonly link: { readonly label?: string; readonly href: string } | null;\n}\n\n/**\n * A wallet listed in the modal. Selecting it narrows the session-type tabs to\n * its `protocols`; its `href`, when present, opens it on the desktop.\n *\n * @beta\n */\nexport interface WalletOption {\n\t/** A stable identifier for the wallet. */\n\treadonly id: string;\n\t/** The wallet's display name. */\n\treadonly name: string;\n\t/** The wallet's logo, as a URL or data URI, or `null` to show a generic wallet mark. */\n\treadonly logo: string | null;\n\t/** Every session type this wallet can open a connection with. */\n\treadonly protocols: readonly ProtocolId[];\n\t/**\n\t * The wallet's desktop link, or `null` when it has none; the wallet is\n\t * then connected by scanning. A `{link}` in it is replaced with the live\n\t * connection link, URI-encoded.\n\t */\n\treadonly href: string | null;\n}\n\n/**\n * A wallet, the session types it speaks and its desktop link; the caller\n * keeps those that speak an enabled protocol and builds a\n * {@link WalletOption} from each.\n *\n * @beta\n */\nexport interface WalletSupport {\n\t/** A stable identifier for the wallet. */\n\treadonly id: string;\n\t/** The wallet's display name. */\n\treadonly name: string;\n\t/** The wallet's logo, as a URL or data URI. */\n\treadonly logo: string;\n\t/** Every session type this wallet can open a connection with. */\n\treadonly protocols: readonly ProtocolId[];\n\t/** The wallet's desktop link, as in {@link WalletOption.href}, or `null` when it has none. */\n\treadonly href: string | null;\n}\n\n/**\n * Why a connection did not happen; mirrors the client's failure modes\n * (`aborted` = user-side, `rejected` = wallet-side).\n *\n * @beta\n */\nexport type FailureReason =\n\t| \"rejected\"\n\t| \"timeout\"\n\t| \"aborted\"\n\t| \"transport\"\n\t| \"network-mismatch\"\n\t| \"unsupported\";\n\n/**\n * Where the attempt is. `initiating` exists only for protocols whose link\n * comes from a relay; WizardConnect skips it.\n *\n * @beta\n */\nexport type ConnectPhase =\n\t| { readonly kind: \"initiating\" }\n\t| {\n\t\t\treadonly kind: \"awaiting-approval\";\n\t\t\treadonly link: string;\n\t }\n\t/**\n\t * Success is not a screen: the modal closes itself on this, and the\n\t * caller shows what it likes in its place. `bchc-toast` is the one\n\t * shipped here.\n\t */\n\t| {\n\t\t\treadonly kind: \"connected\";\n\t\t\t/** `null` when the wallet didn't identify itself. */\n\t\t\treadonly walletName: string | null;\n\t\t\t/** The wallet's logo, so the success moment shows who answered. */\n\t\t\treadonly walletLogo: string | null;\n\t }\n\t| { readonly kind: \"failed\"; readonly reason: FailureReason };\n\n/**\n * The whole of what the modal renders, for one state of one attempt.\n *\n * @beta\n */\nexport interface ModalView {\n\t/** The screen to show. */\n\treadonly screen: ModalScreen;\n\t/** The session type currently selected. Must be one of `protocols[].id`. */\n\treadonly protocol: ProtocolId;\n\t/** Every session type the visitor may choose between. */\n\treadonly protocols: readonly ProtocolOption[];\n\t/**\n\t * Every wallet that speaks at least one of `protocols`, never filtered by\n\t * `protocol`. Shown on a wide viewport only.\n\t */\n\treadonly wallets: readonly WalletOption[];\n\t/**\n\t * The selected wallet's id. `null`, or an id not in `wallets`, selects the\n\t * first of `wallets` that speaks `protocol`, else the first listed.\n\t */\n\treadonly wallet: string | null;\n\t/** Every wallet worth installing, for the \"Get a wallet\" screen. */\n\treadonly directory: readonly WalletDirectoryEntry[];\n\t/** The network the connection would be made on. */\n\treadonly network: Network;\n\t/** Where the attempt currently is. */\n\treadonly phase: ConnectPhase;\n}\n"],"mappings":";;AAUA,MAAa,gBAAmD;CAC/D,SAAS;CACT,SAAS;CACT,SAAS;AACV"}
@@ -0,0 +1,13 @@
1
+
2
+ //#region src/styles/modal.css.sheet.js
3
+ const text = ":host{-webkit-tap-highlight-color:transparent;display:contents}*,:before,:after{box-sizing:border-box}::selection{background:var(--bchc-accent-subtle-active);color:var(--bchc-text)}.overlay{width:100%;max-width:none;height:100%;max-height:none;padding:var(--bchc-space-4);background:var(--bchc-overlay);-webkit-backdrop-filter:blur(var(--bchc-overlay-blur));backdrop-filter:blur(var(--bchc-overlay-blur));perspective:1400px;perspective-origin:50% 65%;animation:fade var(--bchc-duration-fast) var(--bchc-ease-out) both;border:0;place-items:center;margin:0;display:grid;position:fixed;inset:0;overflow:visible}.overlay::backdrop{background:0 0}.overlay:not([open]){display:none}@keyframes fade{0%{opacity:0}}.scrim{pointer-events:none;display:none}.card{--code-size:368px;--footer-size:36px;width:760px;max-width:100%;max-height:calc(100dvh - var(--bchc-space-8));padding:var(--bchc-space-6);gap:var(--bchc-space-5);background:var(--bchc-surface);color:var(--bchc-text);font-family:var(--bchc-font-family);font-size:var(--bchc-text-md);line-height:var(--bchc-leading-normal);border-radius:var(--bchc-radius-modal);box-shadow:0 1px 2px var(--bchc-shadow-tight), 0 24px 64px var(--bchc-shadow-soft), inset 0 0 0 1px var(--bchc-border-subtle);-webkit-user-select:none;user-select:none;transform-origin:50% 100%;animation:rise calc(var(--bchc-duration-base) * 1.3) var(--bchc-ease-enter) both;flex-direction:column;display:flex;position:relative}@keyframes rise{0%{opacity:0;transform:translate3d(0,56px,-140px)rotateX(3deg)}15%{opacity:1}}.overlay.is-closing{pointer-events:none;animation:lift calc(var(--bchc-duration-base) * .7) var(--bchc-ease-out) both}@keyframes lift{to{opacity:0}}.overlay.is-closing .card{animation:sink calc(var(--bchc-duration-base) * .7) var(--bchc-ease-out) both}@keyframes sink{to{opacity:0;transform:scale(.97)translateY(8px)}}.card:focus{outline:none}.head{align-items:center;gap:var(--bchc-space-2);min-height:var(--bchc-hit-pointer);flex:none;display:flex}.title{font-size:var(--bchc-text-xl);font-weight:var(--bchc-weight-bold);line-height:var(--bchc-leading-tight);letter-spacing:var(--bchc-tracking-tight);flex:1;margin:0}.badge{height:26px;padding:0 var(--bchc-space-3);border-radius:var(--bchc-radius-pill);background:var(--bchc-accent-subtle);color:var(--bchc-accent-text);font-size:var(--bchc-text-xs);font-weight:var(--bchc-weight-semibold);letter-spacing:var(--bchc-tracking-snug);white-space:nowrap;align-items:center;margin-inline-end:var(--bchc-space-1);display:inline-flex}.close,.back{width:var(--bchc-hit-pointer);height:var(--bchc-hit-pointer);border-radius:var(--bchc-radius-pill);color:var(--bchc-text-muted);cursor:pointer;transition:background var(--bchc-duration-fast) var(--bchc-ease-out), color var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out);background:0 0;border:0;flex:none;place-items:center;display:grid}.close:hover,.back:hover{background:var(--bchc-surface-hover);color:var(--bchc-text)}.close:active,.back:active{transition-duration:var(--bchc-duration-press);transform:scale(.92)}.close svg{transition:transform var(--bchc-duration-base) var(--bchc-ease-spring)}.back svg{transition:transform var(--bchc-duration-fast) var(--bchc-ease-out)}.body{min-height:0;margin:calc(var(--bchc-space-1) * -1) calc(var(--bchc-space-4) * -1);padding:var(--bchc-space-1) var(--bchc-space-4);overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--bchc-border) transparent;flex-direction:column;display:flex;overflow-y:auto}.overlay.is-entering .body{overflow:clip}.outgoing{pointer-events:none;position:absolute}.split{grid-template-columns:1fr var(--code-size);grid-template-rows:var(--footer-size) auto var(--footer-size);column-gap:var(--bchc-space-10);row-gap:var(--bchc-space-4);min-height:0;display:grid}.single{gap:var(--bchc-space-4);flex-direction:column;min-width:0;display:flex}.overlay:not(.is-sheet) .single{max-height:calc(var(--code-size) + var(--bchc-space-4) + var(--footer-size))}.grabber{display:none}.label{font-size:var(--bchc-text-sm);font-weight:var(--bchc-weight-medium);color:var(--bchc-text-muted)}.wallets{gap:var(--bchc-space-1);margin:calc(var(--bchc-space-1) * -1) calc((var(--bchc-space-3) + var(--bchc-space-1)) * -1);padding:var(--bchc-space-1);overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--bchc-border) transparent;flex-direction:column;min-height:0;display:flex;position:relative;overflow-y:auto}.cell-control{align-items:center;min-width:0;display:flex}.cell-list{contain:size;flex-direction:column;min-width:0;min-height:0;display:flex}.visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;position:absolute;overflow:hidden}.wallet-row{display:flex;position:relative}.wallet,.tab{--tint:var(--lightningcss-light,color-mix(in oklab, var(--bchc-accent) 12%, transparent))var(--lightningcss-dark,color-mix(in oklab, var(--bchc-accent) 16%, transparent))}.wallet:before,.tab:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--tint);opacity:0;clip-path:circle(0 at var(--spread-x) 50%);transition:opacity var(--bchc-duration-fast) var(--bchc-ease-out), clip-path 0s linear var(--bchc-duration-fast);position:absolute;inset:0}.wallet[aria-checked=true]:before,.tab[aria-selected=true]:before{opacity:1;clip-path:circle(150% at var(--spread-x) 50%);transition:opacity 0s, clip-path calc(var(--bchc-duration-base) * 1.1) var(--bchc-ease-out)}.wallet{--spread-x:28px;isolation:isolate;align-items:center;gap:var(--bchc-space-3);min-width:0;min-height:calc(var(--bchc-hit-touch) + var(--bchc-space-3));padding:var(--bchc-space-2) var(--bchc-space-3);border-radius:var(--bchc-radius-row);color:var(--bchc-text);font-family:inherit;font-size:var(--bchc-text-md);font-weight:var(--bchc-weight-semibold);text-align:start;cursor:pointer;transition:background var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out);background:0 0;border:0;flex:1;display:flex;position:relative}.wallet:hover{background:var(--bchc-surface-raised)}.wallet[aria-checked=true]:hover{background:0 0}.wallet-row.has-open .wallet{padding-inline-end:96px}.wallet:active{transition-duration:var(--bchc-duration-press);transform:scale(.985)}.wallet img,.wallet .logo-fallback{border-radius:var(--bchc-radius-media);width:32px;height:32px;transition:transform var(--bchc-duration-base) var(--bchc-ease-spring);flex:none}.wallet img{object-fit:cover}.wallet:not([aria-checked=true]):hover img,.wallet:not([aria-checked=true]):hover .logo-fallback{transform:scale(1.06)translate(1px)}:where(.logo-fallback){background:var(--bchc-surface-sunken);border:1px solid var(--bchc-border-subtle);color:var(--bchc-text-muted);place-items:center;display:grid}.logo-fallback svg{width:55%;height:55%}.section-label{margin:var(--bchc-space-2) 0 0;font-size:var(--bchc-text-sm);font-weight:var(--bchc-weight-medium);color:var(--bchc-text-muted)}.cell-label{align-self:center;margin:0}.wallet-name{min-width:0;line-height:var(--bchc-leading-snug);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.get-one{margin:var(--bchc-space-2) 0 0}.get-one button{cursor:pointer;color:var(--bchc-accent-text);font-family:inherit;font-size:var(--bchc-text-md);font-weight:var(--bchc-weight-bold);transition:color var(--bchc-duration-fast) var(--bchc-ease-out), background-size var(--bchc-duration-base) var(--bchc-ease-out);unicode-bidi:plaintext;background:linear-gradient(currentColor,currentColor) 0 100%/0% 1.5px no-repeat;border:0;padding:0;text-decoration:none}.get-one button:hover{color:var(--bchc-accent);background-size:100% 1.5px}.get-one button:active{opacity:.7}.cell-prompt{align-self:center}.cell-prompt .get-one{margin:0}.open{--open-fill:var(--lightningcss-light,color-mix(in oklab, var(--bchc-accent) 16%, transparent))var(--lightningcss-dark,color-mix(in oklab, var(--bchc-accent) 20%, transparent));z-index:1;border-radius:var(--bchc-radius-pill);background:var(--open-fill);height:32px;color:var(--bchc-text);font-size:var(--bchc-text-sm);font-weight:var(--bchc-weight-bold);letter-spacing:.01em;white-space:nowrap;visibility:hidden;opacity:0;transition:opacity var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out), background var(--bchc-duration-fast) var(--bchc-ease-out), visibility 0s linear var(--bchc-duration-fast);align-items:center;gap:6px;margin-block:auto;padding-inline:14px 12px;text-decoration:none;display:inline-flex;position:absolute;inset-block:0;inset-inline-end:var(--bchc-space-3);transform:scale(.92)}.open.is-shown{visibility:visible;opacity:1;transition:opacity var(--bchc-duration-base) var(--bchc-ease-out) .12s, transform var(--bchc-duration-base) var(--bchc-ease-spring) .12s, background var(--bchc-duration-fast) var(--bchc-ease-out), visibility 0s;transform:none}.open:hover{--open-fill:var(--lightningcss-light,color-mix(in oklab, var(--bchc-accent) 24%, transparent))var(--lightningcss-dark,color-mix(in oklab, var(--bchc-accent) 28%, transparent))}.open.is-shown:active{transition-delay:0s;transform:scale(.95)}.open.is-shown[aria-disabled=true]{opacity:.45;pointer-events:none}.open-text{unicode-bidi:plaintext}.open-arrow{color:var(--bchc-accent-text);transition:transform var(--bchc-duration-base) var(--bchc-ease-spring);flex:none;margin-block-start:1px}.open:hover .open-arrow{transform:translate(1.5px,-1.5px)}.session.is-tabs{flex:1;min-width:0}.tabs{grid-template-columns:repeat(var(--count), minmax(0, 1fr));height:var(--footer-size);gap:2px;display:grid}.tabs.is-dense{gap:var(--bchc-space-1);display:flex}.tab{--spread-x:18px;isolation:isolate;min-width:0;padding:0 var(--bchc-space-2);border-radius:var(--bchc-radius-pill);color:var(--bchc-text-muted);font-family:inherit;font-size:var(--bchc-text-xs);font-weight:var(--bchc-weight-semibold);white-space:nowrap;cursor:pointer;transition:background var(--bchc-duration-fast) var(--bchc-ease-out), color var(--bchc-duration-base) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out);background:0 0;border:0;justify-content:center;align-items:center;gap:5px;line-height:1;display:inline-flex;position:relative}.tabs.is-dense .tab{flex:none;gap:0;padding:0 10px}.tab:not([aria-selected=true]):hover{color:var(--bchc-text);background:color-mix(in oklab, var(--bchc-text) 5%, transparent)}.tab:active{transform:scale(.97)}.tab[aria-selected=true]{color:var(--bchc-text);cursor:default}.tab:focus-visible{outline-offset:-2px}.tab-mark{object-fit:contain;opacity:.78;width:16px;height:16px;transition:opacity var(--bchc-duration-base) var(--bchc-ease-out);border-radius:4px;flex:none}.session-value .tab-mark,.tab:hover .tab-mark,.tab[aria-selected=true] .tab-mark{opacity:1}.tab-name{min-width:0;transition:grid-template-columns var(--bchc-duration-base) var(--bchc-ease-settle), margin var(--bchc-duration-base) var(--bchc-ease-settle);grid-template-columns:1fr;display:grid}.tabs.is-dense .tab-name{margin-inline-start:6px}.tab-name-inner{text-overflow:clip;white-space:nowrap;min-width:0;transition:opacity var(--bchc-duration-fast) var(--bchc-ease-out);unicode-bidi:plaintext;overflow:hidden}.tabs.is-dense .tab:not([aria-selected=true]) .tab-name{grid-template-columns:0fr;margin-inline-start:0}.tabs.is-dense .tab:not([aria-selected=true]) .tab-name-inner{opacity:0;transition-duration:calc(var(--bchc-duration-fast) * .6)}.tabs.is-dense .tab.no-mark .tab-name{margin-inline-start:0}.tabs.is-dense .tab.no-mark:not([aria-selected=true]) .tab-name{grid-template-columns:1fr}.tabs.is-dense .tab.no-mark:not([aria-selected=true]) .tab-name-inner{opacity:1}.session.is-info{align-items:center;gap:var(--bchc-space-3);min-width:0;min-height:var(--footer-size);display:flex}.session-value{min-width:0;color:var(--bchc-text);font-size:var(--bchc-text-xs);font-weight:var(--bchc-weight-semibold);white-space:nowrap;align-items:center;gap:6px;display:inline-flex}.tile{aspect-ratio:1;width:100%;min-height:0;padding:var(--bchc-space-4);border-radius:var(--bchc-radius-tile);background:var(--bchc-code-background);color:var(--bchc-code-foreground);box-shadow:inset 0 0 0 1px var(--lightningcss-light,var(--bchc-border-subtle))var(--lightningcss-dark,transparent), 0 1px 2px var(--bchc-shadow-tight), 0 12px 32px var(--bchc-shadow-soft);transition:background var(--bchc-duration-base) var(--bchc-ease-out), box-shadow var(--bchc-duration-base) var(--bchc-ease-out);border:0;place-items:center;display:grid;position:relative;overflow:clip;container-type:inline-size}.tile:hover{box-shadow:inset 0 0 0 1px var(--lightningcss-light,var(--bchc-border-subtle))var(--lightningcss-dark,transparent), 0 2px 4px var(--bchc-shadow-tight), 0 18px 40px var(--bchc-shadow-soft)}.probe{visibility:hidden;pointer-events:none;background:var(--bchc-code-background);width:0;height:0;color:var(--bchc-code-foreground);accent-color:var(--bchc-accent);position:absolute}.code{width:100%;height:100%;color:inherit;cursor:pointer;transition:opacity var(--bchc-duration-slow) var(--bchc-ease-out), filter var(--bchc-duration-slow) var(--bchc-ease-out), transform var(--bchc-duration-base) var(--bchc-ease-spring);background:0 0;border:0;padding:0;position:relative}.code:active{transition-duration:var(--bchc-duration-press);transform:scale(.985)}.code:disabled{cursor:default}.code svg{shape-rendering:geometricprecision;width:100%;height:100%;display:block}.code svg.is-writing{animation:write var(--bchc-duration-slow) var(--bchc-ease-out) both;-webkit-mask-image:linear-gradient(115deg,#000 42%,#0000 58%);mask-image:linear-gradient(115deg,#000 42%,#0000 58%);-webkit-mask-position:0 0;mask-position:0 0;-webkit-mask-size:300% 100%;mask-size:300% 100%}@keyframes write{0%{-webkit-mask-position:100% 0;mask-position:100% 0}}.code .code-outgoing{animation:dissolve var(--bchc-duration-slow) var(--bchc-ease-out) both;position:absolute;inset:0;-webkit-mask:none;mask:none}@keyframes dissolve{to{opacity:0;filter:blur(6px)}}.code svg.is-placeholder{opacity:.09}.skeleton{z-index:1;opacity:0;visibility:hidden;transition:opacity var(--bchc-duration-base) var(--bchc-ease-out), visibility 0s var(--bchc-duration-base);pointer-events:none;position:absolute;inset:0;overflow:clip}.skeleton:after{content:\"\";background:linear-gradient(105deg, transparent 35%, var(--bchc-code-background) 50%, transparent 65%);opacity:.85;animation:sweep 1.8s var(--bchc-ease-in-out) infinite;position:absolute;inset:-20%}@keyframes sweep{0%{transform:translate(-60%)}to{transform:translate(60%)}}.tile.is-initiating .skeleton{opacity:1;visibility:visible;transition-delay:0s}.tile.is-initiating{cursor:default}.tile.is-failed{background:radial-gradient(circle at 50% 38%, color-mix(in oklab, var(--bchc-danger) 9%, transparent), transparent 58%), var(--bchc-surface-raised);box-shadow:none}.tile.is-failed:hover{box-shadow:none}.tile.is-failed .code{opacity:0;filter:blur(10px);pointer-events:none;transform:scale(.92)}.tile.is-failed .skeleton{opacity:0;visibility:hidden}.status{justify-content:center;align-items:center;gap:var(--bchc-space-2);padding:var(--bchc-space-5);color:var(--bchc-text);text-align:center;visibility:hidden;transition:visibility 0s var(--bchc-duration-base);flex-direction:column;display:flex;position:absolute;inset:0}.status>*{opacity:0;transition:opacity var(--bchc-duration-base) var(--bchc-ease-out), transform var(--bchc-duration-base) var(--bchc-ease-settle);transform:translateY(10px)}.tile.is-failed .status{visibility:visible;transition-delay:0s}.tile.is-failed .status>*{opacity:1;transform:none}.tile.is-failed .status>:first-child{transition-delay:calc(var(--bchc-duration-fast) * .75)}.tile.is-failed .status>:nth-child(2){transition-delay:calc(var(--bchc-duration-fast) * 1.25)}.tile.is-failed .status>:nth-child(3){transition-delay:calc(var(--bchc-duration-fast) * 1.6)}.tile.is-failed .status>:nth-child(4){transition-delay:calc(var(--bchc-duration-fast) * 2)}.status-mark{width:96px;height:96px;margin-bottom:var(--bchc-space-3);color:var(--bchc-danger-text);place-items:center;display:grid;position:relative}.status-mark .ring{position:absolute;inset:0}.status-mark .ring circle{transform-origin:48px 48px;opacity:0;transform:scale(.3)}.tile.is-failed .status-mark .ring circle{animation:ring-in var(--bchc-duration-base) var(--bchc-ease-spring) both, ring-wave 2.8s var(--bchc-ease-in-out) infinite;animation-delay:calc(var(--bchc-duration-fast) + var(--i) * 28ms), calc(var(--bchc-duration-fast) + var(--bchc-duration-base) + var(--i) * .2s)}@keyframes ring-wave{0%,to{opacity:1}50%{opacity:.35}}@keyframes ring-in{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:none}}.status-mark>svg:not(.ring) path{stroke-dasharray:18;stroke-dashoffset:18px}.tile.is-failed .status-mark>svg:not(.ring) path{animation:draw var(--bchc-duration-base) var(--bchc-ease-out) forwards;animation-delay:calc(var(--bchc-duration-fast) * 3)}.tile.is-failed .status-mark>svg:not(.ring) path:nth-child(2){animation-delay:calc(var(--bchc-duration-fast) * 3.5)}@keyframes draw{to{stroke-dashoffset:0}}.status-title{font-size:var(--bchc-text-lg);font-weight:var(--bchc-weight-bold);line-height:var(--bchc-leading-tight);letter-spacing:var(--bchc-tracking-tight);text-wrap:balance}.status-detail{max-width:32ch;font-size:var(--bchc-text-sm);line-height:var(--bchc-leading-snug);color:var(--bchc-text-muted);text-wrap:pretty;unicode-bidi:plaintext;margin:0}.status .retry{margin-top:var(--bchc-space-4);min-height:44px;padding-inline:var(--bchc-space-4) var(--bchc-space-5);font-size:var(--bchc-text-md);font-weight:var(--bchc-weight-bold);letter-spacing:var(--bchc-tracking-snug);transition:background var(--bchc-duration-fast) var(--bchc-ease-out), box-shadow var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-spring)}.status .retry:hover{box-shadow:0 6px 20px color-mix(in oklab, var(--bchc-accent) 40%, transparent)}.status .retry:active{box-shadow:0 2px 8px color-mix(in oklab, var(--bchc-accent) 25%, transparent);transition-duration:var(--bchc-duration-press);transform:scale(.96)}.retry svg{transition:transform var(--bchc-duration-slow) var(--bchc-ease-spring)}.footer.is-void{visibility:hidden;opacity:0;pointer-events:none}.footer{justify-content:space-between;align-items:center;gap:var(--bchc-space-3);width:100%;transition:opacity var(--bchc-duration-fast) var(--bchc-ease-out), visibility 0s;display:flex}.caption{align-items:center;gap:var(--bchc-space-2);min-width:0;font-size:var(--bchc-text-sm);font-weight:var(--bchc-weight-medium);line-height:var(--bchc-leading-snug);color:var(--bchc-text-muted);margin:0;display:inline-flex}.caption svg{flex:none}.caption-wallet{vertical-align:bottom;color:var(--bchc-text);font-weight:var(--bchc-weight-semibold);align-items:center;gap:5px;margin-inline-start:2px;display:inline-flex}.caption-mark{object-fit:contain;border-radius:4px;flex:none;width:16px;height:16px}.caption-name{unicode-bidi:plaintext}.caption-text{unicode-bidi:plaintext;min-width:0}.button{min-height:40px;padding:0 var(--bchc-space-4);justify-content:center;align-items:center;gap:var(--bchc-space-2);border-radius:var(--bchc-radius-control);font-family:inherit;font-size:var(--bchc-text-sm);font-weight:var(--bchc-weight-semibold);white-space:nowrap;cursor:pointer;transition:background var(--bchc-duration-fast) var(--bchc-ease-out), color var(--bchc-duration-fast) var(--bchc-ease-out), box-shadow var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out), opacity var(--bchc-duration-fast) var(--bchc-ease-out);border:0;flex:none;text-decoration:none;display:inline-flex}.button:active{transition-duration:var(--bchc-duration-press);transform:scale(.97)}.button:disabled{opacity:.45;cursor:default;pointer-events:none}.button.pill{min-height:var(--footer-size);padding:0 var(--bchc-space-4);border-radius:var(--bchc-radius-pill);background:var(--bchc-surface-raised);color:var(--bchc-text);box-shadow:inset 0 0 0 1px var(--bchc-border-subtle)}.button.pill:hover{background:var(--bchc-surface-hover)}.button.primary{background:var(--bchc-accent);color:var(--bchc-accent-foreground)}.button.primary:hover{background:var(--bchc-accent-hover)}.button.primary.pill{box-shadow:none}.button.is-copied{background:var(--bchc-accent-subtle);color:var(--bchc-accent-text);box-shadow:inset 0 0 0 1px var(--bchc-accent-border)}@keyframes pop{0%{opacity:0;transform:scale(.4)}}.button.secondary{background:var(--bchc-surface-raised);color:var(--bchc-text);box-shadow:inset 0 0 0 1px var(--bchc-border)}.button.secondary:hover{background:var(--bchc-surface-hover)}.dots{flex:none;justify-content:space-between;width:16px;display:inline-flex}.dots i{width:4px;height:4px;animation:pulse 1.4s var(--bchc-ease-in-out) infinite;background:currentColor;border-radius:50%}.dots i:nth-child(2){animation-delay:.16s}.dots i:nth-child(3){animation-delay:.32s}@keyframes pulse{0%,60%,to{opacity:.25}30%{opacity:1}}:where(a,button,[tabindex]):focus-visible{outline:2px solid var(--bchc-focus);outline-offset:2px}@media (forced-colors:active){.wallet[aria-checked=true],.tab[aria-selected=true]{outline-offset:-2px;outline:2px solid highlight}.wallet:hover,.wallet:focus-visible{outline-offset:-1px;outline:1px solid highlight}.button:hover,.button:focus-visible{outline-offset:-1px;outline:1px solid buttontext}.button.primary{outline-offset:-1px;outline:1px solid highlight}}@media (prefers-reduced-transparency:reduce){.overlay{-webkit-backdrop-filter:none;backdrop-filter:none}}@media (prefers-reduced-motion:reduce){.skeleton:after{display:none}.tile.is-failed .status-mark .ring circle{opacity:1;animation:none;transform:none}.dots i{animation:none}}.overlay.is-sheet{-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0;place-items:end stretch;padding:0;animation:none}.overlay.is-sheet.is-closing{animation:none}.overlay.is-sheet .scrim{background:var(--bchc-overlay);-webkit-backdrop-filter:blur(var(--bchc-overlay-blur));backdrop-filter:blur(var(--bchc-overlay-blur));animation:scrim-in calc(var(--bchc-duration-slow) * .9) var(--bchc-ease-sheet) both;display:block;position:absolute;inset:0}@keyframes scrim-in{0%{opacity:0}}@media (prefers-reduced-transparency:reduce){.overlay.is-sheet .scrim{-webkit-backdrop-filter:none;backdrop-filter:none}}.overlay.is-sheet .card{width:100%;max-height:calc(100dvh - var(--bchc-space-10));padding:var(--bchc-space-2) var(--bchc-space-5) calc(var(--bchc-space-6) + env(safe-area-inset-bottom,0px));border-radius:var(--bchc-radius-modal) var(--bchc-radius-modal) 0 0;touch-action:pan-x;isolation:isolate;--bchc-sheet-rest:333px;--bchc-sheet-travel:0px;animation:sheet calc(var(--bchc-duration-slow) * .9) var(--bchc-ease-sheet) both}@keyframes sheet{0%{transform:translateY(100%)}}.overlay.is-sheet .card:after{content:\"\";height:max(64px, var(--bchc-sheet-travel));background:var(--bchc-surface);pointer-events:none;z-index:-1;position:absolute;top:100%;left:0;right:0}.overlay.is-sheet.is-closing .card{animation:sheet-out calc(var(--bchc-duration-base) * 1.1) var(--bchc-ease-sheet) both}@keyframes sheet-out{to{transform:translateY(100%)}}.overlay.is-sheet.is-closing .scrim{animation:scrim-out calc(var(--bchc-duration-base) * 1.1) var(--bchc-ease-sheet) both}@keyframes scrim-out{to{opacity:0}}.overlay.is-sheet.is-closing.is-dragged .card{animation:none;transform:translateY(100%)}.overlay.is-sheet.is-closing.is-dragged .scrim{opacity:0;animation:none}.overlay.is-sheet .grabber{width:36px;height:4px;margin:0 auto var(--bchc-space-1);border-radius:var(--bchc-radius-pill);background:var(--bchc-border);transition:transform var(--bchc-duration-fast) var(--bchc-ease-out), background var(--bchc-duration-fast) var(--bchc-ease-out);flex:none;display:block}.overlay.is-sheet .card.is-dragging .grabber{background:var(--bchc-border-hover);transform:scaleX(1.22)}.overlay.is-sheet .close{opacity:0;pointer-events:none}.overlay.is-sheet .close:focus-visible{opacity:1;pointer-events:auto}.overlay.is-sheet .tile{width:min(100%, clamp(232px, 100dvh - var(--bchc-space-10) - var(--bchc-sheet-rest), 320px));margin:var(--bchc-space-1) auto;padding:var(--bchc-space-3)}.overlay.is-sheet .status .retry{display:none}.button.block{width:100%;min-height:52px;font-size:var(--bchc-text-md);border-radius:var(--bchc-radius-pill)}.overlay.is-sheet .primary-slot{z-index:1;background:var(--bchc-surface);display:grid;position:sticky;bottom:0}.overlay.is-sheet .primary-slot>*{grid-area:1/1}.overlay.is-sheet .primary-slot:before{content:\"\";background:linear-gradient(to bottom, transparent, var(--bchc-surface));pointer-events:none;height:16px;position:absolute;bottom:100%;left:0;right:0}.overlay.is-sheet .primary-slot:not(.is-failed) [data-act=retry],.overlay.is-sheet .primary-slot.is-failed [data-act=open]{opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--bchc-duration-fast) var(--bchc-ease-out), visibility 0s var(--bchc-duration-fast)}.close:hover svg{transform:rotate(90deg)}.back:hover svg{transform:translate(-1px)}.retry:hover svg{transform:rotate(-360deg)}.button.is-copied svg{animation:pop var(--bchc-duration-base) var(--bchc-ease-spring) both}.directory{gap:var(--bchc-space-1);margin:0 calc(var(--bchc-space-3) * -1);overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--bchc-border) transparent;flex-direction:column;flex:1;min-height:0;display:flex;overflow-y:auto}.directory-row{align-items:center;gap:var(--bchc-space-3);min-height:calc(var(--bchc-hit-touch) + var(--bchc-space-4));padding:var(--bchc-space-2) var(--bchc-space-3);border-radius:var(--bchc-radius-row);color:var(--bchc-text);font-weight:var(--bchc-weight-semibold);transition:background var(--bchc-duration-fast) var(--bchc-ease-out), transform var(--bchc-duration-fast) var(--bchc-ease-out);flex-wrap:wrap;text-decoration:none;display:flex}.directory-row:where(a){cursor:pointer}.directory-row:where(a):active{transition-duration:var(--bchc-duration-press);transform:scale(.985)}.directory-logo{border-radius:var(--bchc-radius-media);object-fit:cover;flex:none;width:36px;height:36px}.directory-row:where(a):hover{background:var(--bchc-surface-raised)}.directory-links{gap:var(--bchc-space-2);flex-wrap:wrap;margin-inline-start:auto;display:flex}.directory-links .button{min-height:var(--bchc-hit-pointer);gap:var(--bchc-space-1);font-size:var(--bchc-text-xs);font-weight:var(--bchc-weight-medium)}.directory-links .button svg{transition:transform var(--bchc-duration-fast) var(--bchc-ease-out)}.directory-row:where(a):hover .button.pill{background:var(--bchc-surface-hover)}.directory-row:where(a):hover .button svg{transform:translate(1px,-1px)}.overlay.is-rtl .wallet{--spread-x:calc(100% - 28px)}.overlay.is-rtl .tab{--spread-x:calc(100% - 18px)}.overlay.is-rtl .back svg{transform:scaleX(-1)}.overlay.is-rtl .back:hover svg{transform:scaleX(-1)translate(-1px)}.overlay.is-rtl .wallet:not([aria-checked=true]):hover img,.overlay.is-rtl .wallet:not([aria-checked=true]):hover .logo-fallback{transform:scale(1.06)translate(-1px)}[hidden]{display:none}";
4
+ var modal_css_sheet_default = /* @__PURE__ */ (() => {
5
+ if (typeof CSSStyleSheet !== "function") return null;
6
+ const sheet = new CSSStyleSheet();
7
+ sheet.replaceSync(text);
8
+ return sheet;
9
+ })();
10
+ //#endregion
11
+ export { modal_css_sheet_default as default };
12
+
13
+ //# sourceMappingURL=modal.css.sheet.js.map