@alfadocs/ui-kit-debug 0.11.0 → 0.12.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 (56) hide show
  1. package/dist/_chunks/_commonjsHelpers-C6fGbg64.js +7 -0
  2. package/dist/_chunks/_commonjsHelpers-C6fGbg64.js.map +1 -0
  3. package/dist/_chunks/{ai-prompt-input-bAJwYu84.js → ai-prompt-input-noh-N3cf.js} +2 -2
  4. package/dist/_chunks/{ai-prompt-input-bAJwYu84.js.map → ai-prompt-input-noh-N3cf.js.map} +1 -1
  5. package/dist/_chunks/{contact-card-VJIUqKB2.js → contact-card-DTQUMetD.js} +22 -38
  6. package/dist/_chunks/contact-card-DTQUMetD.js.map +1 -0
  7. package/dist/_chunks/external-link-C6F25E6k.js +16 -0
  8. package/dist/_chunks/external-link-C6F25E6k.js.map +1 -0
  9. package/dist/_chunks/{file-upload-DIecAfC-.js → file-upload-nMh-1jDD.js} +2 -2
  10. package/dist/_chunks/{file-upload-DIecAfC-.js.map → file-upload-nMh-1jDD.js.map} +1 -1
  11. package/dist/_chunks/{index-CeY1nNvd.js → index-CFoBa86t.js} +61 -63
  12. package/dist/_chunks/{index-CeY1nNvd.js.map → index-CFoBa86t.js.map} +1 -1
  13. package/dist/_chunks/{link-BGpwaFik.js → link-DmM5IevO.js} +16 -26
  14. package/dist/_chunks/link-DmM5IevO.js.map +1 -0
  15. package/dist/_chunks/map-pin-B8STOPMJ.js +21 -0
  16. package/dist/_chunks/map-pin-B8STOPMJ.js.map +1 -0
  17. package/dist/_chunks/map-view-Dd48BxVB.js +1941 -0
  18. package/dist/_chunks/map-view-Dd48BxVB.js.map +1 -0
  19. package/dist/_chunks/whatsapp-button-Bj5FIhpC.js +175 -0
  20. package/dist/_chunks/whatsapp-button-Bj5FIhpC.js.map +1 -0
  21. package/dist/agent-catalog.json +53 -1
  22. package/dist/components/ai-prompt-input/index.js +1 -1
  23. package/dist/components/contact-card/index.js +1 -1
  24. package/dist/components/file-upload/index.js +1 -1
  25. package/dist/components/index.d.ts +2 -0
  26. package/dist/components/index.d.ts.map +1 -1
  27. package/dist/components/link/index.js +1 -1
  28. package/dist/components/map-view/index.d.ts +3 -0
  29. package/dist/components/map-view/index.d.ts.map +1 -0
  30. package/dist/components/map-view/index.js +5 -0
  31. package/dist/components/map-view/index.js.map +1 -0
  32. package/dist/components/map-view/map-view.agent.d.ts +4 -0
  33. package/dist/components/map-view/map-view.agent.d.ts.map +1 -0
  34. package/dist/components/map-view/map-view.d.ts +78 -0
  35. package/dist/components/map-view/map-view.d.ts.map +1 -0
  36. package/dist/components/whatsapp-button/index.d.ts +3 -0
  37. package/dist/components/whatsapp-button/index.d.ts.map +1 -0
  38. package/dist/components/whatsapp-button/index.js +5 -0
  39. package/dist/components/whatsapp-button/index.js.map +1 -0
  40. package/dist/components/whatsapp-button/whatsapp-button.d.ts +32 -0
  41. package/dist/components/whatsapp-button/whatsapp-button.d.ts.map +1 -0
  42. package/dist/i18n/config.js +45 -6
  43. package/dist/i18n/config.js.map +1 -1
  44. package/dist/i18n/resources.d.ts +39 -0
  45. package/dist/i18n/resources.d.ts.map +1 -1
  46. package/dist/index.js +348 -344
  47. package/dist/index.js.map +1 -1
  48. package/dist/locales/de.json +13 -0
  49. package/dist/locales/en.json +13 -0
  50. package/dist/locales/it.json +13 -0
  51. package/dist/tokens/google-maps-theme.d.ts +15 -0
  52. package/dist/tokens/google-maps-theme.d.ts.map +1 -0
  53. package/dist/tokens.css +1 -1
  54. package/package.json +15 -1
  55. package/dist/_chunks/contact-card-VJIUqKB2.js.map +0 -1
  56. package/dist/_chunks/link-BGpwaFik.js.map +0 -1
@@ -0,0 +1,175 @@
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as y, useMemo as A } from "react";
3
+ import { c as m } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as C } from "react-i18next";
5
+ function u({ className: a }) {
6
+ return /* @__PURE__ */ i(
7
+ "svg",
8
+ {
9
+ "aria-hidden": "true",
10
+ viewBox: "0 0 24 24",
11
+ fill: "currentColor",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ className: a,
14
+ children: /* @__PURE__ */ i("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.149-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.71.306 1.263.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z" })
15
+ }
16
+ );
17
+ }
18
+ const _ = m(
19
+ [
20
+ "ds:relative ds:inline-flex ds:items-center ds:justify-center",
21
+ "ds:font-medium ds:whitespace-nowrap",
22
+ "ds:bg-[var(--brand-whatsapp)] ds:text-[var(--brand-whatsapp-foreground)]",
23
+ "ds:hover:bg-[var(--brand-whatsapp-hover)]",
24
+ "ds:active:opacity-90",
25
+ "ds:transition-[background-color,box-shadow,opacity]",
26
+ "ds:duration-[var(--animation-duration)]",
27
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
28
+ // Focus ring colour is `var(--ring)` (= `--primary` in light, ditto
29
+ // through theme cascade) — NOT `--brand-whatsapp`. Painting the
30
+ // ring brand-green on a brand-green surface makes it invisible.
31
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
32
+ // Under Windows High Contrast Mode the bg + shadow are stripped;
33
+ // repaint a solid border + swap the focus ring to CanvasText so
34
+ // the affordance stays identifiable.
35
+ "ds:forced-colors:border ds:forced-colors:border-[ButtonBorder]",
36
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
37
+ "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed",
38
+ "ds:motion-reduce:transition-none"
39
+ ].join(" "),
40
+ {
41
+ variants: {
42
+ variant: {
43
+ // Pill — inline rounded button. Visible label is the brand
44
+ // affordance text; glyph sits leading.
45
+ pill: "ds:rounded-[var(--radius-full)] ds:gap-[var(--spacing-xs)]",
46
+ // FAB — circular floating action button. Glyph only; the
47
+ // label resolves into `aria-label`.
48
+ fab: [
49
+ "ds:rounded-full ds:shadow-[var(--shadow-lg)]",
50
+ "ds:hover:shadow-[var(--shadow-xl)] ds:active:shadow-[var(--shadow-md)]"
51
+ ].join(" ")
52
+ },
53
+ size: {
54
+ sm: "",
55
+ md: "",
56
+ lg: ""
57
+ }
58
+ },
59
+ compoundVariants: [
60
+ {
61
+ variant: "pill",
62
+ size: "sm",
63
+ class: 'ds:h-9 ds:ps-3 ds:pe-3.5 ds:text-[length:var(--font-size-sm)] ds:[&_svg]:size-4 ds:min-h-[var(--min-target-size)] ds:sm:min-h-0 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden'
64
+ },
65
+ {
66
+ variant: "pill",
67
+ size: "md",
68
+ class: "ds:h-10 ds:ps-4 ds:pe-5 ds:text-[length:var(--font-size-base)] ds:[&_svg]:size-5"
69
+ },
70
+ {
71
+ variant: "pill",
72
+ size: "lg",
73
+ class: "ds:h-12 ds:ps-5 ds:pe-6 ds:text-[length:var(--font-size-lg)] ds:[&_svg]:size-6"
74
+ },
75
+ // FAB — fixed square dimensions; the `sm` case mirrors the
76
+ // FloatingActionButton's pseudo-target expansion below the
77
+ // `sm:` breakpoint so a 40px circle still hits 44/48 px on
78
+ // mobile.
79
+ {
80
+ variant: "fab",
81
+ size: "sm",
82
+ class: 'ds:h-10 ds:w-10 ds:[&_svg]:size-5 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden'
83
+ },
84
+ {
85
+ variant: "fab",
86
+ size: "md",
87
+ class: "ds:h-14 ds:w-14 ds:[&_svg]:size-7"
88
+ },
89
+ {
90
+ variant: "fab",
91
+ size: "lg",
92
+ class: "ds:h-16 ds:w-16 ds:[&_svg]:size-8"
93
+ }
94
+ ],
95
+ defaultVariants: {
96
+ variant: "pill",
97
+ size: "md"
98
+ }
99
+ }
100
+ ), j = m("", {
101
+ variants: {
102
+ position: {
103
+ static: "",
104
+ "bottom-end": "ds:fixed ds:z-[var(--z-fixed)] ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))] ds:end-[var(--spacing-lg)]",
105
+ "bottom-start": "ds:fixed ds:z-[var(--z-fixed)] ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))] ds:start-[var(--spacing-lg)]"
106
+ }
107
+ },
108
+ defaultVariants: { position: "static" }
109
+ });
110
+ function B(a, o) {
111
+ const s = a.replace(/\D/g, "");
112
+ if (s.length === 0)
113
+ return null;
114
+ const r = `https://wa.me/${s}`;
115
+ return o ? `${r}?text=${encodeURIComponent(o)}` : r;
116
+ }
117
+ const N = y(
118
+ ({
119
+ phoneNumber: a,
120
+ message: o,
121
+ variant: s = "pill",
122
+ size: r = "md",
123
+ position: h,
124
+ label: g,
125
+ className: w,
126
+ ...n
127
+ }, z) => {
128
+ const { t: p } = C(), f = A(
129
+ () => B(a, o),
130
+ [a, o]
131
+ ), e = g ?? p(s === "fab" ? "whatsApp.fabLabel" : "whatsApp.label"), x = [
132
+ _({ variant: s, size: r }),
133
+ j({ position: h }),
134
+ w
135
+ ].filter(Boolean).join(" "), d = f === null, v = {
136
+ ref: z,
137
+ ...d ? {} : {
138
+ href: f,
139
+ target: "_blank",
140
+ rel: "noopener noreferrer"
141
+ },
142
+ "aria-disabled": d ? !0 : void 0,
143
+ "data-component": "whatsapp-button",
144
+ "data-variant": s,
145
+ onClick: (l) => {
146
+ var b;
147
+ d && l.preventDefault(), (b = n.onClick) == null || b.call(n, l);
148
+ },
149
+ className: x
150
+ }, t = d ? null : p("link.opensInNewTab", "Opens in a new tab");
151
+ if (s === "fab") {
152
+ const l = typeof e == "string" ? t ? `${e} — ${t}` : e : void 0;
153
+ return /* @__PURE__ */ c("a", { ...n, ...v, "aria-label": l, children: [
154
+ /* @__PURE__ */ i(u, {}),
155
+ typeof e != "string" ? /* @__PURE__ */ c("span", { className: "ds:sr-only", children: [
156
+ e,
157
+ t ? ` — ${t}` : null
158
+ ] }) : null
159
+ ] });
160
+ }
161
+ return /* @__PURE__ */ c("a", { ...n, ...v, children: [
162
+ /* @__PURE__ */ i(u, {}),
163
+ /* @__PURE__ */ i("span", { children: e }),
164
+ t ? /* @__PURE__ */ c("span", { className: "ds:sr-only", children: [
165
+ " — ",
166
+ t
167
+ ] }) : null
168
+ ] });
169
+ }
170
+ );
171
+ N.displayName = "WhatsAppButton";
172
+ export {
173
+ N as W
174
+ };
175
+ //# sourceMappingURL=whatsapp-button-Bj5FIhpC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatsapp-button-Bj5FIhpC.js","sources":["../../src/components/whatsapp-button/whatsapp-button.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* WhatsAppButton — kit-tokened Click-to-Chat affordance. */\n/* */\n/* Replaces the booking website's loose green-circle-with-caption */\n/* combo (see HTP screenshot in the rebrand discussion) with a single */\n/* well-anchored affordance. Two variants: */\n/* */\n/* - `pill` — inline rounded button, brand green + white glyph + */\n/* label. Drops anywhere in card / header chrome. */\n/* - `fab` — circular floating action button, glyph only, */\n/* persistently anchored in the page corner. Carries an */\n/* `aria-label` so the SR announcement is \"Open WhatsApp */\n/* chat\" without rendering a loose visible caption. */\n/* */\n/* WhatsApp brand guidance requires the canonical #25D366 surface and */\n/* the official phone-bubble glyph — those live in `--brand-whatsapp` */\n/* tokens (added under `src/tokens/index.css`) so all four themes can */\n/* shift the green for accessible contrast without bleeding the brand */\n/* requirement into component code. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useMemo,\n type AnchorHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\n\n/* ------------------------------------------------------------------ */\n/* WhatsApp glyph */\n/* */\n/* Inlined SVG — no external icon dep. The path matches WhatsApp's */\n/* official brand mark (speech bubble + phone). `currentColor` lets */\n/* the kit's `--brand-whatsapp-foreground` paint the glyph from a */\n/* single CVA class, so accessible-theme shifts apply without code. */\n/* ------------------------------------------------------------------ */\n\nfunction WhatsAppGlyph({ className }: { className?: string }): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.149-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.71.306 1.263.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z\" />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rootVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:items-center ds:justify-center',\n 'ds:font-medium ds:whitespace-nowrap',\n 'ds:bg-[var(--brand-whatsapp)] ds:text-[var(--brand-whatsapp-foreground)]',\n 'ds:hover:bg-[var(--brand-whatsapp-hover)]',\n 'ds:active:opacity-90',\n 'ds:transition-[background-color,box-shadow,opacity]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n // Focus ring colour is `var(--ring)` (= `--primary` in light, ditto\n // through theme cascade) — NOT `--brand-whatsapp`. Painting the\n // ring brand-green on a brand-green surface makes it invisible.\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n // Under Windows High Contrast Mode the bg + shadow are stripped;\n // repaint a solid border + swap the focus ring to CanvasText so\n // the affordance stays identifiable.\n 'ds:forced-colors:border ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n variant: {\n // Pill — inline rounded button. Visible label is the brand\n // affordance text; glyph sits leading.\n pill: 'ds:rounded-[var(--radius-full)] ds:gap-[var(--spacing-xs)]',\n // FAB — circular floating action button. Glyph only; the\n // label resolves into `aria-label`.\n fab: [\n 'ds:rounded-full ds:shadow-[var(--shadow-lg)]',\n 'ds:hover:shadow-[var(--shadow-xl)] ds:active:shadow-[var(--shadow-md)]',\n ].join(' '),\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n },\n },\n compoundVariants: [\n {\n variant: 'pill',\n size: 'sm',\n class:\n 'ds:h-9 ds:ps-3 ds:pe-3.5 ds:text-[length:var(--font-size-sm)] ds:[&_svg]:size-4 ds:min-h-[var(--min-target-size)] ds:sm:min-h-0 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n },\n {\n variant: 'pill',\n size: 'md',\n class:\n 'ds:h-10 ds:ps-4 ds:pe-5 ds:text-[length:var(--font-size-base)] ds:[&_svg]:size-5',\n },\n {\n variant: 'pill',\n size: 'lg',\n class:\n 'ds:h-12 ds:ps-5 ds:pe-6 ds:text-[length:var(--font-size-lg)] ds:[&_svg]:size-6',\n },\n // FAB — fixed square dimensions; the `sm` case mirrors the\n // FloatingActionButton's pseudo-target expansion below the\n // `sm:` breakpoint so a 40px circle still hits 44/48 px on\n // mobile.\n {\n variant: 'fab',\n size: 'sm',\n class:\n 'ds:h-10 ds:w-10 ds:[&_svg]:size-5 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n },\n {\n variant: 'fab',\n size: 'md',\n class: 'ds:h-14 ds:w-14 ds:[&_svg]:size-7',\n },\n {\n variant: 'fab',\n size: 'lg',\n class: 'ds:h-16 ds:w-16 ds:[&_svg]:size-8',\n },\n ],\n defaultVariants: {\n variant: 'pill',\n size: 'md',\n },\n },\n);\n\nconst positionVariants = cva('', {\n variants: {\n position: {\n static: '',\n 'bottom-end':\n 'ds:fixed ds:z-[var(--z-fixed)] ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))] ds:end-[var(--spacing-lg)]',\n 'bottom-start':\n 'ds:fixed ds:z-[var(--z-fixed)] ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))] ds:start-[var(--spacing-lg)]',\n },\n },\n defaultVariants: { position: 'static' },\n});\n\n/* ------------------------------------------------------------------ */\n/* URL builder */\n/* ------------------------------------------------------------------ */\n\n/**\n * Build a `wa.me` deep-link from an E.164 phone number and an\n * optional prefilled message. The number is stripped to digits — the\n * `wa.me` host requires digits only (no `+`, no separators).\n *\n * Returns `null` (not an empty `wa.me/` URL) when the input contains\n * no digits — the caller is then responsible for rendering a disabled\n * affordance rather than shipping a broken link. In dev a `console.warn`\n * fires so the typo is visible during development.\n */\nfunction buildWaMeUrl(phoneNumber: string, message?: string): string | null {\n const digits = phoneNumber.replace(/\\D/g, '');\n if (digits.length === 0) {\n if (\n typeof import.meta !== 'undefined' &&\n typeof import.meta.env !== 'undefined' &&\n import.meta.env.DEV === true\n ) {\n console.warn(\n `[WhatsAppButton] phoneNumber \"${phoneNumber}\" contains no digits — ` +\n `the affordance will render disabled. Pass an E.164 number ` +\n `(e.g. \"+393331234567\") to fix.`,\n );\n }\n return null;\n }\n const base = `https://wa.me/${digits}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface WhatsAppButtonProps\n extends\n Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'children'>,\n VariantProps<typeof rootVariants>,\n VariantProps<typeof positionVariants> {\n /**\n * Phone number to chat to. E.164 format is recommended\n * (e.g. `+393331234567`). Any non-digit characters are stripped\n * before the URL is built — `wa.me` requires digits only.\n */\n phoneNumber: string;\n /**\n * Optional prefilled message. The receiver sees this in their\n * compose box. Keep it short and human — long pasted text is the\n * single most common reason consumers drop the affordance.\n */\n message?: string;\n /**\n * Override the visible / accessible label. Defaults to\n * `t('whatsApp.label')` for the pill variant and\n * `t('whatsApp.fabLabel')` for the FAB.\n */\n label?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* WhatsAppButton */\n/* ------------------------------------------------------------------ */\n\nexport const WhatsAppButton = forwardRef<\n HTMLAnchorElement,\n WhatsAppButtonProps\n>(\n (\n {\n phoneNumber,\n message,\n variant = 'pill',\n size = 'md',\n position,\n label,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const href = useMemo(\n () => buildWaMeUrl(phoneNumber, message),\n [phoneNumber, message],\n );\n const resolvedLabel =\n label ??\n (variant === 'fab' ? t('whatsApp.fabLabel') : t('whatsApp.label'));\n\n const composedClassName = [\n rootVariants({ variant, size }),\n positionVariants({ position }),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // When the input has no digits, render an `aria-disabled` anchor\n // with the same chrome but no `href` — assistive tech announces the\n // disabled state and click does nothing. `buildWaMeUrl` already\n // emitted a dev-mode warning above. `target` / `rel` are stripped\n // too because they're meaningless without `href`.\n const isDisabled = href === null;\n const commonAnchorProps = {\n ref,\n ...(isDisabled\n ? {}\n : {\n href: href as string,\n target: '_blank' as const,\n rel: 'noopener noreferrer' as const,\n }),\n 'aria-disabled': isDisabled ? true : undefined,\n 'data-component': 'whatsapp-button' as const,\n 'data-variant': variant,\n onClick: (event: React.MouseEvent<HTMLAnchorElement>) => {\n if (isDisabled) event.preventDefault();\n rest.onClick?.(event);\n },\n className: composedClassName,\n };\n\n // Screen-reader cue for the new-tab behaviour. WCAG 3.2.5 / G201:\n // user-initiated link openings to a new context should be\n // announced. Reused `link.opensInNewTab` from the kit's `ui` ns —\n // single source of truth across every external-link affordance.\n const opensInNewTabSrText = isDisabled\n ? null\n : t('link.opensInNewTab', 'Opens in a new tab');\n\n if (variant === 'fab') {\n // FAB — circular, glyph-only. The accessible name lives on the\n // anchor's `aria-label` (resolved label). No visible caption,\n // which is exactly what the redesign fixes vs. the legacy\n // green-circle-with-loose-text affordance.\n const fabAriaLabel =\n typeof resolvedLabel === 'string'\n ? opensInNewTabSrText\n ? `${resolvedLabel} — ${opensInNewTabSrText}`\n : resolvedLabel\n : undefined;\n return (\n <a {...rest} {...commonAnchorProps} aria-label={fabAriaLabel}>\n <WhatsAppGlyph />\n {typeof resolvedLabel !== 'string' ? (\n <span className=\"ds:sr-only\">\n {resolvedLabel}\n {opensInNewTabSrText ? ` — ${opensInNewTabSrText}` : null}\n </span>\n ) : null}\n </a>\n );\n }\n\n return (\n <a {...rest} {...commonAnchorProps}>\n <WhatsAppGlyph />\n <span>{resolvedLabel}</span>\n {opensInNewTabSrText ? (\n <span className=\"ds:sr-only\"> — {opensInNewTabSrText}</span>\n ) : null}\n </a>\n );\n },\n);\nWhatsAppButton.displayName = 'WhatsAppButton';\n"],"names":["WhatsAppGlyph","className","jsx","rootVariants","cva","positionVariants","buildWaMeUrl","phoneNumber","message","digits","base","WhatsAppButton","forwardRef","variant","size","position","label","rest","ref","t","useTranslation","href","useMemo","resolvedLabel","composedClassName","isDisabled","commonAnchorProps","event","_a","opensInNewTabSrText","fabAriaLabel","jsxs"],"mappings":";;;;AAuCA,SAASA,EAAc,EAAE,WAAAC,KAAgD;AACvE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,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AkB;AAAA,MAClB,gBAAgBZ;AAAA,MAChB,SAAS,CAACc,MAA+C;;AACvD,QAAIF,OAAkB,eAAA,IACtBG,IAAAX,EAAK,YAAL,QAAAW,EAAA,KAAAX,GAAeU;AAAA,MACjB;AAAA,MACA,WAAWH;AAAA,IAAA,GAOPK,IAAsBJ,IACxB,OACAN,EAAE,sBAAsB,oBAAoB;AAEhD,QAAIN,MAAY,OAAO;AAKrB,YAAMiB,IACJ,OAAOP,KAAkB,WACrBM,IACE,GAAGN,CAAa,MAAMM,CAAmB,KACzCN,IACF;AACN,+BACG,KAAA,EAAG,GAAGN,GAAO,GAAGS,GAAmB,cAAYI,GAC9C,UAAA;AAAA,QAAA,gBAAA5B,EAACF,GAAA,EAAc;AAAA,QACd,OAAOuB,KAAkB,WACxB,gBAAAQ,EAAC,QAAA,EAAK,WAAU,cACb,UAAA;AAAA,UAAAR;AAAA,UACAM,IAAsB,MAAMA,CAAmB,KAAK;AAAA,QAAA,EAAA,CACvD,IACE;AAAA,MAAA,GACN;AAAA,IAEJ;AAEA,6BACG,KAAA,EAAG,GAAGZ,GAAO,GAAGS,GACf,UAAA;AAAA,MAAA,gBAAAxB,EAACF,GAAA,EAAc;AAAA,MACf,gBAAAE,EAAC,UAAM,UAAAqB,GAAc;AAAA,MACpBM,IACC,gBAAAE,EAAC,QAAA,EAAK,WAAU,cAAa,UAAA;AAAA,QAAA;AAAA,QAAIF;AAAA,MAAA,EAAA,CAAoB,IACnD;AAAA,IAAA,GACN;AAAA,EAEJ;AACF;AACAlB,EAAe,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.11.0",
3
+ "packageVersion": "0.12.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1628,6 +1628,44 @@
1628
1628
  }
1629
1629
  }
1630
1630
  },
1631
+ {
1632
+ "kind": "component",
1633
+ "id": "map-view",
1634
+ "capabilities": [],
1635
+ "state": [],
1636
+ "actions": [
1637
+ {
1638
+ "name": "pan_to",
1639
+ "safety": "read",
1640
+ "argsType": "{ position: { lat: number; lng: number } }",
1641
+ "description": "Pan the map to a new centre without changing zoom."
1642
+ },
1643
+ {
1644
+ "name": "set_zoom",
1645
+ "safety": "read",
1646
+ "argsType": "{ zoom: number }",
1647
+ "description": "Set the map zoom level (typical range 1–20)."
1648
+ },
1649
+ {
1650
+ "name": "select_marker",
1651
+ "safety": "read",
1652
+ "argsType": "{ id: string | null }",
1653
+ "description": "Select a marker by id, or pass null to clear the selection."
1654
+ }
1655
+ ],
1656
+ "domHooks": {
1657
+ "root": {
1658
+ "attr": "data-component",
1659
+ "value": "map-view",
1660
+ "description": "Marks the element as a kit MapView."
1661
+ },
1662
+ "instanceId": {
1663
+ "attr": "data-component-id",
1664
+ "sourceProp": "id",
1665
+ "description": "Sourced from the id prop."
1666
+ }
1667
+ }
1668
+ },
1631
1669
  {
1632
1670
  "kind": "component",
1633
1671
  "id": "matrix-rain",
@@ -3904,6 +3942,20 @@
3904
3942
  }
3905
3943
  }
3906
3944
  },
3945
+ {
3946
+ "kind": "component",
3947
+ "id": "whatsapp-button",
3948
+ "capabilities": [],
3949
+ "state": [],
3950
+ "actions": [],
3951
+ "domHooks": {
3952
+ "root": {
3953
+ "attr": "data-component",
3954
+ "value": "whatsapp-button",
3955
+ "description": "Marks the element as a kit WhatsAppButton."
3956
+ }
3957
+ }
3958
+ },
3907
3959
  {
3908
3960
  "kind": "component",
3909
3961
  "id": "workflow-card",
@@ -1,4 +1,4 @@
1
- import { A as a, a as o } from "../../_chunks/ai-prompt-input-bAJwYu84.js";
1
+ import { A as a, a as o } from "../../_chunks/ai-prompt-input-noh-N3cf.js";
2
2
  export {
3
3
  a as AIPromptInput,
4
4
  o as aiPromptInputAgent
@@ -1,4 +1,4 @@
1
- import { C as r } from "../../_chunks/contact-card-VJIUqKB2.js";
1
+ import { C as r } from "../../_chunks/contact-card-DTQUMetD.js";
2
2
  export {
3
3
  r as ContactCard
4
4
  };
@@ -1,4 +1,4 @@
1
- import { F as l, f as o } from "../../_chunks/file-upload-DIecAfC-.js";
1
+ import { F as l, f as o } from "../../_chunks/file-upload-nMh-1jDD.js";
2
2
  export {
3
3
  l as FileUpload,
4
4
  o as fileUploadAgent
@@ -47,6 +47,7 @@ export * from './kbd';
47
47
  export * from './key-value-pair';
48
48
  export * from './list';
49
49
  export * from './logo';
50
+ export * from './map-view';
50
51
  export * from './rating';
51
52
  export * from './skeleton';
52
53
  export * from './sparkline';
@@ -117,6 +118,7 @@ export * from './signature-capture';
117
118
  export * from './slot-grid';
118
119
  export * from './tooth-scheme';
119
120
  export * from './transaction-chip';
121
+ export * from './whatsapp-button';
120
122
  export * from './workflow';
121
123
  export * from '../patterns/leo-assistant';
122
124
  export * from '../patterns/patient-shell';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,SAAS,EACT,eAAe,EACf,4BAA4B,EAC5B,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,cAAc,GACf,MAAM,UAAU,CAAC;AAGlB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAO/C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM1E,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,cAAc,gBAAgB,CAAC;AAC/B,cA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AgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAO3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { L } from "../../_chunks/link-BGpwaFik.js";
1
+ import { L } from "../../_chunks/link-DmM5IevO.js";
2
2
  export {
3
3
  L as Link
4
4
  };
@@ -0,0 +1,3 @@
1
+ export { MapView } from './map-view';
2
+ export type { MapViewProps, MapViewHandle, MapMarker, MapLatLng, } from './map-view';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/map-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { M as o } from "../../_chunks/map-view-Dd48BxVB.js";
2
+ export {
3
+ o as MapView
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,4 @@
1
+ import type { AgentAdapter } from '../../agent/types';
2
+ import type { MapViewHandle } from './map-view';
3
+ export declare const mapViewAgent: AgentAdapter<MapViewHandle>;
4
+ //# sourceMappingURL=map-view.agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-view.agent.d.ts","sourceRoot":"","sources":["../../../src/components/map-view/map-view.agent.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,YAAY,CAAC;AAE3D,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,aAAa,CA2CpD,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ export interface MapLatLng {
4
+ lat: number;
5
+ lng: number;
6
+ }
7
+ export interface MapMarker {
8
+ /** Stable id — used for keyed re-rendering and `onMarkerClick`. */
9
+ id: string;
10
+ /** Position in lat/lng. */
11
+ position: MapLatLng;
12
+ /** Optional accessible label — falls back to the id. */
13
+ label?: string;
14
+ }
15
+ export interface MapViewHandle {
16
+ /** Pan the map to a new centre without changing zoom. */
17
+ panTo: (position: MapLatLng) => void;
18
+ /** Set zoom (typical range 1–20). */
19
+ setZoom: (zoom: number) => void;
20
+ /** Programmatically select a marker (fires `onMarkerClick`). */
21
+ selectMarker: (id: string | null) => void;
22
+ }
23
+ export interface MapViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>, VariantProps<typeof mapViewVariants> {
24
+ /** Opaque instance id — emitted as `data-component-id`. */
25
+ id?: string;
26
+ /** Google Maps JS API key. Consumer-owned; never cached by the kit. */
27
+ apiKey: string;
28
+ /** Map centre (lat/lng). Required so the consent placeholder can also use it. */
29
+ center: MapLatLng;
30
+ /** Initial zoom. Default 15 (city-block detail, matches booking site). */
31
+ zoom?: number;
32
+ /**
33
+ * Markers to render. The first marker auto-selects when no
34
+ * `selectedMarkerId` is given.
35
+ */
36
+ markers?: MapMarker[];
37
+ /** Controlled selection — fires `onMarkerClick` with the new id (or null on map click). */
38
+ selectedMarkerId?: string | null;
39
+ /** Fires when a marker is clicked, or `null` when the map background is clicked. */
40
+ onMarkerClick?: (id: string | null) => void;
41
+ /**
42
+ * GDPR consent gate. When `false` (default) the component renders a
43
+ * placeholder with a translated CTA — the Maps JS API is **not**
44
+ * loaded. Flip to `true` once the consumer has captured opt-in.
45
+ */
46
+ consentGranted?: boolean;
47
+ /** Fires when the consumer clicks the "Load map" CTA in the placeholder. */
48
+ onConsentRequest?: () => void;
49
+ /**
50
+ * Optional address string shown in the consent placeholder so the
51
+ * surface is useful before the map loads. Also used to build the
52
+ * fallback "Open in Google Maps" link target.
53
+ */
54
+ address?: string;
55
+ /**
56
+ * Cloud-styled-map id. When set, takes precedence over the JSON
57
+ * `styles` array and disables the theme-bridge re-fire. Use when
58
+ * you've provisioned a styled map in Google Cloud Console.
59
+ */
60
+ mapId?: string;
61
+ /**
62
+ * Override the consent-placeholder description text. The default
63
+ * (`t('mapView.consentDescription')`) is a generic IP-disclosure
64
+ * line. Consumers operating under specific GDPR / ePrivacy
65
+ * disclosures (jurisdiction, named controller, policy link) should
66
+ * supply their own text via this prop. Pass any `ReactNode` — a
67
+ * paragraph, a localised `<Trans>` instance, etc.
68
+ */
69
+ consentDescription?: ReactNode;
70
+ /** Accessible label for the map region. Falls back to `t('mapView.label')`. */
71
+ ariaLabel?: string;
72
+ }
73
+ declare const mapViewVariants: (props?: ({
74
+ size?: "sm" | "md" | "lg" | null | undefined;
75
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
76
+ export declare const MapView: import("react").ForwardRefExoticComponent<MapViewProps & import("react").RefAttributes<MapViewHandle>>;
77
+ export {};
78
+ //# sourceMappingURL=map-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-view.d.ts","sourceRoot":"","sources":["../../../src/components/map-view/map-view.tsx"],"names":[],"mappings":"AAgBA,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAsBlE,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX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AM,eAAe;;8EAiBpB,CAAC;AAuHF,eAAO,MAAM,OAAO,wGA2NnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { WhatsAppButton } from './whatsapp-button';
2
+ export type { WhatsAppButtonProps } from './whatsapp-button';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/whatsapp-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { W as p } from "../../_chunks/whatsapp-button-Bj5FIhpC.js";
2
+ export {
3
+ p as WhatsAppButton
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,32 @@
1
+ import { type AnchorHTMLAttributes, type ReactNode } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const rootVariants: (props?: ({
4
+ variant?: "pill" | "fab" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare const positionVariants: (props?: ({
8
+ position?: "bottom-end" | "bottom-start" | "static" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ export interface WhatsAppButtonProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'children'>, VariantProps<typeof rootVariants>, VariantProps<typeof positionVariants> {
11
+ /**
12
+ * Phone number to chat to. E.164 format is recommended
13
+ * (e.g. `+393331234567`). Any non-digit characters are stripped
14
+ * before the URL is built — `wa.me` requires digits only.
15
+ */
16
+ phoneNumber: string;
17
+ /**
18
+ * Optional prefilled message. The receiver sees this in their
19
+ * compose box. Keep it short and human — long pasted text is the
20
+ * single most common reason consumers drop the affordance.
21
+ */
22
+ message?: string;
23
+ /**
24
+ * Override the visible / accessible label. Defaults to
25
+ * `t('whatsApp.label')` for the pill variant and
26
+ * `t('whatsApp.fabLabel')` for the FAB.
27
+ */
28
+ label?: ReactNode;
29
+ }
30
+ export declare const WhatsAppButton: import("react").ForwardRefExoticComponent<WhatsAppButtonProps & import("react").RefAttributes<HTMLAnchorElement>>;
31
+ export {};
32
+ //# sourceMappingURL=whatsapp-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatsapp-button.d.ts","sourceRoot":"","sources":["../../../src/components/whatsapp-button/whatsapp-button.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA8BlE,QAAA,MAAM,YAAY;;;8EAsFjB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;8EAWpB,CAAC;AAyCH,MAAM,WAAW,mBACf,SACE,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,EAClE,YAAY,CAAC,OAAO,YAAY,CAAC,EACjC,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAMD,eAAO,MAAM,cAAc,mHAqG1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import t from "i18next";
2
- import { default as b } from "i18next";
2
+ import { default as f } from "i18next";
3
3
  import { initReactI18next as l } from "react-i18next";
4
4
  const a = {
5
5
  common: {
@@ -830,6 +830,19 @@ const a = {
830
830
  error: "Failed to load PDF",
831
831
  pageOverlay: "Page {{page}} overlay"
832
832
  },
833
+ mapView: {
834
+ label: "Map",
835
+ markerLabel: "Marker for {{label}}",
836
+ consentTitle: "Show interactive map",
837
+ consentDescription: "Loading the map shares your IP address with Google so it can serve map tiles. Continue?",
838
+ consentCta: "Load map",
839
+ openInGoogleMaps: "Open in Google Maps"
840
+ },
841
+ whatsApp: {
842
+ label: "Chat on WhatsApp",
843
+ fabLabel: "Open WhatsApp chat",
844
+ questionPrompt: "Have questions? Chat on WhatsApp"
845
+ },
833
846
  paywall: {
834
847
  title: "Upgrade to keep going",
835
848
  description: "You've reached your free-tier limit. Choose a plan to continue.",
@@ -1781,6 +1794,19 @@ const a = {
1781
1794
  error: "Impossibile caricare il PDF",
1782
1795
  pageOverlay: "Overlay pagina {{page}}"
1783
1796
  },
1797
+ mapView: {
1798
+ label: "Mappa",
1799
+ markerLabel: "Indicatore per {{label}}",
1800
+ consentTitle: "Mostra mappa interattiva",
1801
+ consentDescription: "Caricando la mappa il tuo indirizzo IP verrà condiviso con Google per ricevere le tile della mappa. Vuoi continuare?",
1802
+ consentCta: "Carica mappa",
1803
+ openInGoogleMaps: "Apri in Google Maps"
1804
+ },
1805
+ whatsApp: {
1806
+ label: "Scrivici su WhatsApp",
1807
+ fabLabel: "Apri chat WhatsApp",
1808
+ questionPrompt: "Hai domande? Scrivici su WhatsApp"
1809
+ },
1784
1810
  paywall: {
1785
1811
  title: "Esegui l'upgrade per continuare",
1786
1812
  description: "Hai raggiunto il limite del piano gratuito. Scegli un piano per continuare.",
@@ -2732,6 +2758,19 @@ const a = {
2732
2758
  error: "PDF konnte nicht geladen werden",
2733
2759
  pageOverlay: "Seitenoverlay {{page}}"
2734
2760
  },
2761
+ mapView: {
2762
+ label: "Karte",
2763
+ markerLabel: "Markierung für {{label}}",
2764
+ consentTitle: "Interaktive Karte anzeigen",
2765
+ consentDescription: "Beim Laden der Karte wird Ihre IP-Adresse an Google übermittelt, um die Kartenkacheln zu laden. Fortfahren?",
2766
+ consentCta: "Karte laden",
2767
+ openInGoogleMaps: "In Google Maps öffnen"
2768
+ },
2769
+ whatsApp: {
2770
+ label: "Auf WhatsApp schreiben",
2771
+ fabLabel: "WhatsApp-Chat öffnen",
2772
+ questionPrompt: "Fragen? Auf WhatsApp schreiben"
2773
+ },
2735
2774
  paywall: {
2736
2775
  title: "Upgraden, um fortzufahren",
2737
2776
  description: "Sie haben das Limit des kostenlosen Tarifs erreicht. Wählen Sie einen Tarif, um fortzufahren.",
@@ -2891,13 +2930,13 @@ const a = {
2891
2930
  label: "{{state}} {{amount}}"
2892
2931
  }
2893
2932
  }
2894
- }, o = {}, p = ["en", "it", "de", "ar"], g = {
2933
+ }, o = {}, p = ["en", "it", "de", "ar"], m = {
2895
2934
  en: a,
2896
2935
  it: n,
2897
2936
  de: i,
2898
2937
  ar: o
2899
2938
  };
2900
- function m(r, s) {
2939
+ function g(r, s) {
2901
2940
  t.addResourceBundle(
2902
2941
  r,
2903
2942
  "ui",
@@ -2941,10 +2980,10 @@ export {
2941
2980
  p as LOCALES_WITH_BUNDLES,
2942
2981
  o as arUi,
2943
2982
  i as deUi,
2944
- b as default,
2983
+ f as default,
2945
2984
  a as enUi,
2946
2985
  n as itUi,
2947
- m as registerUiBundle,
2948
- g as uiResources
2986
+ g as registerUiBundle,
2987
+ m as uiResources
2949
2988
  };
2950
2989
  //# sourceMappingURL=config.js.map