@ctonti/ask-golf-veneto 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -36,8 +36,6 @@
36
36
  --text-5xl--line-height: 1;
37
37
  --text-6xl: 3.75rem;
38
38
  --text-6xl--line-height: 1;
39
- --text-7xl: 4.5rem;
40
- --text-7xl--line-height: 1;
41
39
  --font-weight-light: 300;
42
40
  --font-weight-normal: 400;
43
41
  --font-weight-medium: 500;
@@ -50,11 +48,14 @@
50
48
  --leading-snug: 1.375;
51
49
  --leading-relaxed: 1.625;
52
50
  --radius-2xl: 1rem;
51
+ --radius-3xl: 1.5rem;
53
52
  --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15);
54
53
  --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);
55
54
  --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);
55
+ --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
56
56
  --blur-sm: 8px;
57
57
  --blur-md: 12px;
58
+ --blur-3xl: 64px;
58
59
  --aspect-video: 16 / 9;
59
60
  --default-transition-duration: 150ms;
60
61
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -235,8 +236,8 @@
235
236
  .-top-6 {
236
237
  top: calc(var(--spacing) * -6);
237
238
  }
238
- .-top-24 {
239
- top: calc(var(--spacing) * -24);
239
+ .-top-32 {
240
+ top: calc(var(--spacing) * -32);
240
241
  }
241
242
  .top-0 {
242
243
  top: 0px;
@@ -253,8 +254,8 @@
253
254
  .-right-1 {
254
255
  right: calc(var(--spacing) * -1);
255
256
  }
256
- .-right-24 {
257
- right: calc(var(--spacing) * -24);
257
+ .-right-32 {
258
+ right: calc(var(--spacing) * -32);
258
259
  }
259
260
  .right-0 {
260
261
  right: 0px;
@@ -274,8 +275,8 @@
274
275
  .-bottom-2 {
275
276
  bottom: calc(var(--spacing) * -2);
276
277
  }
277
- .-bottom-24 {
278
- bottom: calc(var(--spacing) * -24);
278
+ .-bottom-32 {
279
+ bottom: calc(var(--spacing) * -32);
279
280
  }
280
281
  .bottom-0 {
281
282
  bottom: 0px;
@@ -289,8 +290,8 @@
289
290
  .-left-2 {
290
291
  left: calc(var(--spacing) * -2);
291
292
  }
292
- .-left-24 {
293
- left: calc(var(--spacing) * -24);
293
+ .-left-32 {
294
+ left: calc(var(--spacing) * -32);
294
295
  }
295
296
  .left-0 {
296
297
  left: 0px;
@@ -403,6 +404,9 @@
403
404
  .-ml-6 {
404
405
  margin-left: calc(var(--spacing) * -6);
405
406
  }
407
+ .ml-auto {
408
+ margin-left: auto;
409
+ }
406
410
  .block {
407
411
  display: block;
408
412
  }
@@ -484,9 +488,6 @@
484
488
  .h-48 {
485
489
  height: calc(var(--spacing) * 48);
486
490
  }
487
- .h-96 {
488
- height: calc(var(--spacing) * 96);
489
- }
490
491
  .h-\[1px\] {
491
492
  height: 1px;
492
493
  }
@@ -499,6 +500,9 @@
499
500
  .h-\[40px\] {
500
501
  height: 40px;
501
502
  }
503
+ .h-\[500px\] {
504
+ height: 500px;
505
+ }
502
506
  .h-fit {
503
507
  height: fit-content;
504
508
  }
@@ -592,9 +596,6 @@
592
596
  .w-48 {
593
597
  width: calc(var(--spacing) * 48);
594
598
  }
595
- .w-96 {
596
- width: calc(var(--spacing) * 96);
597
- }
598
599
  .w-\[1px\] {
599
600
  width: 1px;
600
601
  }
@@ -610,6 +611,9 @@
610
611
  .w-\[90\%\] {
611
612
  width: 90%;
612
613
  }
614
+ .w-\[500px\] {
615
+ width: 500px;
616
+ }
613
617
  .w-full {
614
618
  width: 100%;
615
619
  }
@@ -650,6 +654,9 @@
650
654
  --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
651
655
  translate: var(--tw-translate-x) var(--tw-translate-y);
652
656
  }
657
+ .animate-pulse {
658
+ animation: var(--animate-pulse);
659
+ }
653
660
  .cursor-pointer {
654
661
  cursor: pointer;
655
662
  }
@@ -766,6 +773,9 @@
766
773
  .rounded-2xl {
767
774
  border-radius: var(--radius-2xl);
768
775
  }
776
+ .rounded-3xl {
777
+ border-radius: var(--radius-3xl);
778
+ }
769
779
  .rounded-full {
770
780
  border-radius: calc(infinity * 1px);
771
781
  }
@@ -848,6 +858,9 @@
848
858
  .border-\[\#8b3a3a\]\/20 {
849
859
  border-color: color-mix(in oklab, #8b3a3a 20%, transparent);
850
860
  }
861
+ .border-\[\#213f31\] {
862
+ border-color: #213f31;
863
+ }
851
864
  .border-\[\#213f31\]\/15 {
852
865
  border-color: color-mix(in oklab, #213f31 15%, transparent);
853
866
  }
@@ -1156,6 +1169,9 @@
1156
1169
  .px-4 {
1157
1170
  padding-inline: calc(var(--spacing) * 4);
1158
1171
  }
1172
+ .px-5 {
1173
+ padding-inline: calc(var(--spacing) * 5);
1174
+ }
1159
1175
  .px-6 {
1160
1176
  padding-inline: calc(var(--spacing) * 6);
1161
1177
  }
@@ -1174,6 +1190,9 @@
1174
1190
  .py-2 {
1175
1191
  padding-block: calc(var(--spacing) * 2);
1176
1192
  }
1193
+ .py-2\.5 {
1194
+ padding-block: calc(var(--spacing) * 2.5);
1195
+ }
1177
1196
  .py-4 {
1178
1197
  padding-block: calc(var(--spacing) * 4);
1179
1198
  }
@@ -1225,6 +1244,9 @@
1225
1244
  .pb-4 {
1226
1245
  padding-bottom: calc(var(--spacing) * 4);
1227
1246
  }
1247
+ .pb-5 {
1248
+ padding-bottom: calc(var(--spacing) * 5);
1249
+ }
1228
1250
  .pl-0 {
1229
1251
  padding-left: 0px;
1230
1252
  }
@@ -1240,6 +1262,9 @@
1240
1262
  .text-center {
1241
1263
  text-align: center;
1242
1264
  }
1265
+ .text-left {
1266
+ text-align: left;
1267
+ }
1243
1268
  .font-heading {
1244
1269
  font-family: 'Instrument Serif', Georgia, serif;
1245
1270
  }
@@ -1389,6 +1414,9 @@
1389
1414
  .text-\[\#213f31\]\/90 {
1390
1415
  color: color-mix(in oklab, #213f31 90%, transparent);
1391
1416
  }
1417
+ .text-\[\#34674e\] {
1418
+ color: #34674e;
1419
+ }
1392
1420
  .text-\[\#478264\] {
1393
1421
  color: #478264;
1394
1422
  }
@@ -1443,6 +1471,9 @@
1443
1471
  .not-italic {
1444
1472
  font-style: normal;
1445
1473
  }
1474
+ .accent-\[\#213f31\] {
1475
+ accent-color: #213f31;
1476
+ }
1446
1477
  .opacity-0 {
1447
1478
  opacity: 0%;
1448
1479
  }
@@ -1494,6 +1525,10 @@
1494
1525
  outline-style: var(--tw-outline-style);
1495
1526
  outline-width: 1px;
1496
1527
  }
1528
+ .blur-3xl {
1529
+ --tw-blur: blur(var(--blur-3xl));
1530
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
1531
+ }
1497
1532
  .drop-shadow {
1498
1533
  --tw-drop-shadow-size: drop-shadow(0 1px 2px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.1))) drop-shadow(0 1px 1px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.06)));
1499
1534
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow( 0 1px 1px rgb(0 0 0 / 0.06));
@@ -1598,12 +1633,24 @@
1598
1633
  --tw-scale-z: 105%;
1599
1634
  scale: var(--tw-scale-x) var(--tw-scale-y);
1600
1635
  }
1636
+ .hover\:scale-\[1\.01\]:hover {
1637
+ scale: 1.01;
1638
+ }
1639
+ .hover\:border-\[\#213f31\]\/40:hover {
1640
+ border-color: color-mix(in oklab, #213f31 40%, transparent);
1641
+ }
1601
1642
  .hover\:bg-\[\#213f31\]:hover {
1602
1643
  background-color: #213f31;
1603
1644
  }
1645
+ .hover\:bg-\[\#34674e\]:hover {
1646
+ background-color: #34674e;
1647
+ }
1604
1648
  .hover\:bg-white:hover {
1605
1649
  background-color: var(--color-white);
1606
1650
  }
1651
+ .hover\:text-\[\#213f31\]:hover {
1652
+ color: #213f31;
1653
+ }
1607
1654
  .hover\:text-\[\#faf8f3\]:hover {
1608
1655
  color: #faf8f3;
1609
1656
  }
@@ -1616,6 +1663,17 @@
1616
1663
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1617
1664
  }
1618
1665
  }
1666
+ .focus\:ring-2:focus {
1667
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1668
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1669
+ }
1670
+ .focus\:ring-\[\#34674e\]:focus {
1671
+ --tw-ring-color: #34674e;
1672
+ }
1673
+ .focus\:outline-none:focus {
1674
+ --tw-outline-style: none;
1675
+ outline-style: none;
1676
+ }
1619
1677
  @container (width >= 28rem) {
1620
1678
  .\@md\:-ml-8 {
1621
1679
  margin-left: calc(var(--spacing) * -8);
@@ -1662,6 +1720,9 @@
1662
1720
  .\@md\:grid-cols-2 {
1663
1721
  grid-template-columns: repeat(2, minmax(0, 1fr));
1664
1722
  }
1723
+ .\@md\:grid-cols-3 {
1724
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1725
+ }
1665
1726
  .\@md\:flex-row {
1666
1727
  flex-direction: row;
1667
1728
  }
@@ -1768,9 +1829,9 @@
1768
1829
  .\@lg\:grid-cols-3 {
1769
1830
  grid-template-columns: repeat(3, minmax(0, 1fr));
1770
1831
  }
1771
- .\@lg\:text-7xl {
1772
- font-size: var(--text-7xl);
1773
- line-height: var(--tw-leading, var(--text-7xl--line-height));
1832
+ .\@lg\:text-6xl {
1833
+ font-size: var(--text-6xl);
1834
+ line-height: var(--tw-leading, var(--text-6xl--line-height));
1774
1835
  }
1775
1836
  .\@lg\:text-\[80px\] {
1776
1837
  font-size: 80px;
@@ -2807,6 +2868,11 @@ html[dir='rtl'], [data-sonner-toaster][dir='rtl'] {
2807
2868
  inherits: false;
2808
2869
  initial-value: 1;
2809
2870
  }
2871
+ @keyframes pulse {
2872
+ 50% {
2873
+ opacity: 0.5;
2874
+ }
2875
+ }
2810
2876
  @layer properties {
2811
2877
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
2812
2878
  :root, :host {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctonti/ask-golf-veneto",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Ask Golf in Veneto - Consulente di viaggio golf custom plugin",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,185 +0,0 @@
1
- import { r as registry } from "./registry-YcWNxjzA.mjs";
2
- import { TooltipProvider } from "@websolutespa/ask-ui/components/tooltip";
3
- import { useContext, useMemo } from "react";
4
- import { ChatContext, ChatProvider, ComponentsContext, ComponentsProvider, ViewProvider } from "@websolutespa/ask-plugin";
5
- import { Toaster } from "@websolutespa/ask-ui/components/sonner";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- import { cn } from "@websolutespa/ask-ui";
8
- import { ActionProvider, Renderer, StateProvider, VisibilityProvider } from "@json-render/react";
9
- import { toast } from "sonner";
10
- //#region src/components/intro.tsx
11
- function Intro() {
12
- const { PromptIntro } = useContext(ComponentsContext);
13
- const { contents, append } = useContext(ChatContext);
14
- const title = contents.intro?.title || "Progetta la tua <em>vacanza golf</em> in Veneto";
15
- return /* @__PURE__ */ jsxs("section", {
16
- className: "relative flex min-h-[calc(100vh-80px)] w-full flex-col items-center justify-center py-12 px-6 bg-[#faf8f3] text-[#213f31] overflow-hidden",
17
- children: [
18
- /* @__PURE__ */ jsx("div", { className: "absolute -top-24 -right-24 w-96 h-96 rounded-full bg-[#213f31]/5 pointer-events-none" }),
19
- /* @__PURE__ */ jsx("div", { className: "absolute -bottom-24 -left-24 w-96 h-96 rounded-full bg-[#478264]/5 pointer-events-none" }),
20
- /* @__PURE__ */ jsxs("div", {
21
- className: "relative z-10 w-full max-w-4xl mx-auto flex flex-col items-center gap-8 text-center",
22
- children: [
23
- /* @__PURE__ */ jsxs("div", {
24
- className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-[#213f31]/10 border border-[#213f31]/20",
25
- children: [/* @__PURE__ */ jsx("span", { className: "w-2 h-2 rounded-full bg-[#34674e]" }), /* @__PURE__ */ jsx("span", {
26
- className: "text-[#213f31] font-sans text-xs font-semibold uppercase tracking-[0.25em]",
27
- children: "Concierge Ufficiale Golf in Veneto"
28
- })]
29
- }),
30
- title && /* @__PURE__ */ jsx("h1", {
31
- className: "text-4xl @md:text-6xl @lg:text-7xl font-normal leading-[1.15] font-heading italic text-[#213f31] drop-shadow-sm max-w-3xl",
32
- dangerouslySetInnerHTML: { __html: title }
33
- }),
34
- /* @__PURE__ */ jsx("p", {
35
- className: "font-sans text-[#213f31]/80 text-base @md:text-lg max-w-2xl font-light leading-relaxed",
36
- children: "Un consulente dedicato per disegnare il tuo itinerario su misura: campi da golf affiliati, eccellenze enogastronomiche, arte e relax."
37
- }),
38
- /* @__PURE__ */ jsx("div", {
39
- className: "w-full max-w-2xl mt-2 bg-white rounded-2xl p-4 shadow-xl border border-[#e8d9c0]",
40
- children: /* @__PURE__ */ jsx(PromptIntro, {})
41
- }),
42
- /* @__PURE__ */ jsx("div", {
43
- className: "flex flex-wrap items-center justify-center gap-2.5 mt-2 max-w-3xl",
44
- children: [
45
- "5 giorni tra golf d'eccellenza e Prosecco",
46
- "Weekend romantico: Golf al Lido & Venezia",
47
- "Golf, Terme ed Enogastronomia nei Colli Euganei",
48
- "Tour dei migliori 15 Golf Club del Veneto"
49
- ].map((prompt, i) => /* @__PURE__ */ jsx("button", {
50
- type: "button",
51
- onClick: () => append?.({
52
- role: "user",
53
- content: prompt
54
- }),
55
- className: "px-4 py-2 rounded-full bg-[#213f31]/5 hover:bg-[#213f31] text-[#213f31] hover:text-[#faf8f3] text-xs font-medium border border-[#213f31]/15 transition-all duration-200 cursor-pointer shadow-sm",
56
- children: prompt
57
- }, i))
58
- })
59
- ]
60
- })
61
- ]
62
- });
63
- }
64
- //#endregion
65
- //#region src/components/main.tsx
66
- function Main() {
67
- const { Intro, Thread } = useContext(ComponentsContext);
68
- const { shouldShowIntro } = useContext(ChatContext);
69
- return /* @__PURE__ */ jsx("div", {
70
- className: "w-full min-h-svh flex flex-col gap-8 bg-background text-foreground",
71
- children: shouldShowIntro ? /* @__PURE__ */ jsx(Intro, {}) : /* @__PURE__ */ jsx(Thread, {})
72
- });
73
- }
74
- //#endregion
75
- //#region src/components/preview.tsx
76
- function Preview({ spec }) {
77
- return /* @__PURE__ */ jsxs(ComponentsProvider, {
78
- components: COMPONENTS,
79
- children: [/* @__PURE__ */ jsx(PreviewRenderer, { spec }), /* @__PURE__ */ jsx(Toaster, {})]
80
- });
81
- }
82
- function PreviewRenderer({ spec, className }) {
83
- const { Renderer } = useContext(ComponentsContext);
84
- return /* @__PURE__ */ jsx("div", {
85
- className: cn("w-full flex flex-col gap-10 py-5 @md:gap-20 @md:py-10", className),
86
- children: spec ? /* @__PURE__ */ jsx(Renderer, { spec }) : /* @__PURE__ */ jsx("div", { children: "Spec not provided" })
87
- });
88
- }
89
- //#endregion
90
- //#region src/components/renderer.tsx
91
- function Renderer$1({ spec, isStreaming = false, mounted = false }) {
92
- const { Fallback } = useContext(ComponentsContext);
93
- if (!spec) return;
94
- return /* @__PURE__ */ jsx(StateProvider, {
95
- initialState: spec.state ?? {},
96
- children: /* @__PURE__ */ jsx(VisibilityProvider, { children: /* @__PURE__ */ jsx(ActionProvider, {
97
- handlers: { linkClick: async (params) => {
98
- const href = params?.href || "#";
99
- if (mounted) {
100
- const { url } = params;
101
- if (url) window.open(url, "_blank", "noopener,noreferrer");
102
- } else toast.info(`Navigating to: ${href}`);
103
- } },
104
- children: /* @__PURE__ */ jsx(Renderer, {
105
- spec,
106
- registry,
107
- fallback: Fallback,
108
- loading: isStreaming
109
- })
110
- }) })
111
- });
112
- }
113
- //#endregion
114
- //#region src/components.ts
115
- const COMPONENTS = {
116
- App,
117
- Chat,
118
- Intro,
119
- Main,
120
- Preview,
121
- Renderer: Renderer$1
122
- };
123
- //#endregion
124
- //#region src/components/chat.tsx
125
- function Chat({ appKey, apiKey, ...props }) {
126
- if (!appKey) return /* @__PURE__ */ jsx("div", { children: "appKey not defined" });
127
- if (!apiKey) return /* @__PURE__ */ jsx("div", { children: "apiKey not defined" });
128
- return /* @__PURE__ */ jsx(ComponentsProvider, {
129
- components: COMPONENTS,
130
- children: /* @__PURE__ */ jsx(ChatProvider, {
131
- appKey,
132
- apiKey,
133
- ...props,
134
- children: /* @__PURE__ */ jsxs(ViewProvider, { children: [/* @__PURE__ */ jsx(Main, {}), /* @__PURE__ */ jsx(Toaster, {})] })
135
- })
136
- });
137
- }
138
- //#endregion
139
- //#region src/components/app.tsx
140
- const App = (props) => {
141
- useMemo(() => {
142
- if (typeof window !== "undefined") {
143
- const htmlLang = getHtmlLang();
144
- const title = document.querySelector("title");
145
- const description = document.querySelector("meta[name=\"description\"]");
146
- const canonical = document.querySelector("link[rel=\"canonical\"]");
147
- return {
148
- locale: htmlLang?.locale || "it",
149
- market: htmlLang?.market || "ww",
150
- origin: window.origin,
151
- canonical: canonical?.getAttribute("href") || window.location.href,
152
- title: title ? title.innerText : "Untitled",
153
- description: description?.getAttribute("content") || "",
154
- slug: window.location.pathname
155
- };
156
- }
157
- return {
158
- locale: "it",
159
- market: "ww",
160
- origin: "",
161
- canonical: "",
162
- title: "Untitled",
163
- description: "",
164
- slug: ""
165
- };
166
- }, []);
167
- return /* @__PURE__ */ jsx("div", {
168
- className: "@container w-full",
169
- children: /* @__PURE__ */ jsx(TooltipProvider, { children: props.preview ? /* @__PURE__ */ jsx(Preview, { spec: props.initialSpec }) : /* @__PURE__ */ jsx(Chat, { ...props }) })
170
- });
171
- };
172
- function getHtmlLang() {
173
- const htmlLang = document.querySelector("html")?.getAttribute("lang");
174
- if (htmlLang) {
175
- const segments = htmlLang.toLowerCase().split("-");
176
- return {
177
- locale: segments[0],
178
- market: segments[1] || "ww"
179
- };
180
- }
181
- }
182
- //#endregion
183
- export { Preview as a, Renderer$1 as i, Chat as n, PreviewRenderer as o, COMPONENTS as r, Main as s, App as t };
184
-
185
- //# sourceMappingURL=app-Bc1Wuyn1.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-Bc1Wuyn1.mjs","names":["Renderer","JsonRenderer"],"sources":["../src/components/intro.tsx","../src/components/main.tsx","../src/components/preview.tsx","../src/components/renderer.tsx","../src/components.ts","../src/components/chat.tsx","../src/components/app.tsx"],"sourcesContent":["'use client';\n\nimport { ChatContext, ComponentsContext } from '@websolutespa/ask-plugin';\nimport { useContext } from 'react';\n\nexport function Intro() {\n const { PromptIntro } = useContext(ComponentsContext);\n const { contents, append } = useContext(ChatContext);\n const title =\n contents.intro?.title || 'Progetta la tua <em>vacanza golf</em> in Veneto';\n\n const prompts = [\n \"5 giorni tra golf d'eccellenza e Prosecco\",\n \"Weekend romantico: Golf al Lido & Venezia\",\n \"Golf, Terme ed Enogastronomia nei Colli Euganei\",\n \"Tour dei migliori 15 Golf Club del Veneto\"\n ];\n\n return (\n <section className=\"relative flex min-h-[calc(100vh-80px)] w-full flex-col items-center justify-center py-12 px-6 bg-[#faf8f3] text-[#213f31] overflow-hidden\">\n {/* Decorative Brand Circles */}\n <div className=\"absolute -top-24 -right-24 w-96 h-96 rounded-full bg-[#213f31]/5 pointer-events-none\" />\n <div className=\"absolute -bottom-24 -left-24 w-96 h-96 rounded-full bg-[#478264]/5 pointer-events-none\" />\n\n <div className=\"relative z-10 w-full max-w-4xl mx-auto flex flex-col items-center gap-8 text-center\">\n {/* Subtitle Badge */}\n <div className=\"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-[#213f31]/10 border border-[#213f31]/20\">\n <span className=\"w-2 h-2 rounded-full bg-[#34674e]\" />\n <span className=\"text-[#213f31] font-sans text-xs font-semibold uppercase tracking-[0.25em]\">\n Concierge Ufficiale Golf in Veneto\n </span>\n </div>\n\n {/* Main Title */}\n {title && (\n <h1\n className=\"text-4xl @md:text-6xl @lg:text-7xl font-normal leading-[1.15] font-heading italic text-[#213f31] drop-shadow-sm max-w-3xl\"\n dangerouslySetInnerHTML={{ __html: title }}\n />\n )}\n\n <p className=\"font-sans text-[#213f31]/80 text-base @md:text-lg max-w-2xl font-light leading-relaxed\">\n Un consulente dedicato per disegnare il tuo itinerario su misura: campi da golf affiliati, eccellenze enogastronomiche, arte e relax.\n </p>\n\n {/* Prompt Input Container */}\n <div className=\"w-full max-w-2xl mt-2 bg-white rounded-2xl p-4 shadow-xl border border-[#e8d9c0]\">\n <PromptIntro />\n </div>\n\n {/* Suggested Prompt Chips */}\n <div className=\"flex flex-wrap items-center justify-center gap-2.5 mt-2 max-w-3xl\">\n {prompts.map((prompt, i) => (\n <button\n key={i}\n type=\"button\"\n onClick={() => append?.({ role: 'user', content: prompt })}\n className=\"px-4 py-2 rounded-full bg-[#213f31]/5 hover:bg-[#213f31] text-[#213f31] hover:text-[#faf8f3] text-xs font-medium border border-[#213f31]/15 transition-all duration-200 cursor-pointer shadow-sm\"\n >\n {prompt}\n </button>\n ))}\n </div>\n </div>\n </section>\n );\n}\n","'use client';\n\nimport { ChatContext, ComponentsContext } from '@websolutespa/ask-plugin';\nimport { useContext } from 'react';\n\nexport function Main() {\n const { Intro, Thread } = useContext(ComponentsContext);\n const { shouldShowIntro } = useContext(ChatContext);\n return (\n <div className=\"w-full min-h-svh flex flex-col gap-8 bg-background text-foreground\">\n {shouldShowIntro ? <Intro /> : <Thread />}\n </div>\n );\n}\n","'use client';\n\nimport { Spec } from '@json-render/core';\nimport { ComponentsContext, ComponentsProvider } from '@websolutespa/ask-plugin';\nimport { cn } from '@websolutespa/ask-ui';\nimport { Toaster } from '@websolutespa/ask-ui/components/sonner';\nimport { useContext } from 'react';\nimport { COMPONENTS } from '../components';\n\nexport function Preview({ spec }: { spec?: Spec | null }) {\n return (\n <ComponentsProvider components={COMPONENTS}>\n <PreviewRenderer spec={spec} />\n <Toaster />\n </ComponentsProvider>\n );\n}\n\nexport function PreviewRenderer({\n spec,\n className,\n}: {\n spec?: Spec | null;\n className?: string;\n}) {\n const { Renderer } = useContext(ComponentsContext);\n return (\n <div className={cn('w-full flex flex-col gap-10 py-5 @md:gap-20 @md:py-10', className)}>\n {spec ? <Renderer spec={spec} /> : <div>Spec not provided</div>}\n </div>\n );\n}\n","'use client';\n\nimport { Spec } from '@json-render/core';\nimport {\n ActionProvider,\n Renderer as JsonRenderer,\n StateProvider,\n VisibilityProvider,\n} from '@json-render/react';\nimport { ComponentsContext } from '@websolutespa/ask-plugin';\nimport { useContext } from 'react';\nimport { toast } from 'sonner';\n// IMPORTANT: import YOUR OWN registry so your custom blocks are rendered.\nimport { registry } from '../registry';\n\nexport function Renderer({\n spec,\n isStreaming = false,\n mounted = false,\n}: {\n spec?: Spec | null;\n isStreaming?: boolean;\n mounted?: boolean;\n}) {\n const { Fallback } = useContext(ComponentsContext);\n if (!spec) {\n return;\n }\n return (\n <StateProvider initialState={spec.state ?? {}}>\n <VisibilityProvider>\n <ActionProvider\n handlers={{\n linkClick: async (params) => {\n const href = (params?.href as string) || '#';\n if (mounted) {\n const { url } = params as { url?: string };\n if (url) window.open(url, '_blank', 'noopener,noreferrer');\n } else {\n toast.info(`Navigating to: ${href}`);\n }\n },\n }}\n >\n <JsonRenderer\n spec={spec}\n registry={registry}\n fallback={Fallback}\n loading={isStreaming}\n />\n </ActionProvider>\n </VisibilityProvider>\n </StateProvider>\n );\n}\n","import { App } from './components/app';\nimport { Chat } from './components/chat';\nimport { Intro } from './components/intro';\nimport { Main } from './components/main';\nimport { Preview } from './components/preview';\nimport { Renderer } from './components/renderer';\n\n// Components injected into the shared chat engine via ComponentsProvider.\n// Only list what you override; everything else falls back to @websolutespa/ask-plugin.\nexport const COMPONENTS = {\n App,\n Chat,\n Intro,\n Main,\n Preview,\n Renderer,\n};\n\nexport type Components = typeof COMPONENTS;\n\nexport * from './components/app';\nexport * from './components/chat';\nexport * from './components/main';\nexport * from './components/preview';\nexport * from './components/renderer';\n","'use client';\n\nimport {\n ChatProvider,\n ChatProviderProps,\n ComponentsProvider,\n ViewProvider,\n} from '@websolutespa/ask-plugin';\nimport { Toaster } from '@websolutespa/ask-ui/components/sonner';\nimport { COMPONENTS } from '../components';\nimport { Main } from './main';\n\nexport function Chat({ appKey, apiKey, ...props }: Partial<ChatProviderProps>) {\n if (!appKey) {\n return <div>appKey not defined</div>;\n }\n if (!apiKey) {\n return <div>apiKey not defined</div>;\n }\n return (\n <ComponentsProvider components={COMPONENTS}>\n <ChatProvider appKey={appKey} apiKey={apiKey} {...props}>\n <ViewProvider>\n <Main />\n <Toaster />\n </ViewProvider>\n </ChatProvider>\n </ComponentsProvider>\n );\n}\n","'use client';\n\nimport type { PageData, PluginOptions } from '@websolutespa/ask-plugin';\nimport { TooltipProvider } from '@websolutespa/ask-ui/components/tooltip';\nimport { useMemo } from 'react';\nimport { Chat } from './chat';\nimport { Preview } from './preview';\n\nexport type AppProps = PluginOptions;\n\nexport const App = (props: AppProps) => {\n const _data = useMemo<PageData>(() => {\n if (typeof window !== 'undefined') {\n const htmlLang = getHtmlLang();\n const title = document.querySelector('title');\n const description = document.querySelector('meta[name=\"description\"]');\n const canonical = document.querySelector('link[rel=\"canonical\"]');\n return {\n locale: htmlLang?.locale || 'it',\n market: htmlLang?.market || 'ww',\n origin: window.origin,\n canonical: canonical?.getAttribute('href') || window.location.href,\n title: title ? title.innerText : 'Untitled',\n description: description?.getAttribute('content') || '',\n slug: window.location.pathname,\n };\n }\n return {\n locale: 'it',\n market: 'ww',\n origin: '',\n canonical: '',\n title: 'Untitled',\n description: '',\n slug: '',\n };\n }, []);\n\n return (\n <div className=\"@container w-full\">\n <TooltipProvider>\n {props.preview ? (\n <Preview spec={props.initialSpec} />\n ) : (\n <Chat {...props} />\n )}\n </TooltipProvider>\n </div>\n );\n};\n\nfunction getHtmlLang(): { locale: string; market: string } | undefined {\n const html = document.querySelector('html');\n const htmlLang = html?.getAttribute('lang');\n if (htmlLang) {\n const segments = htmlLang.toLowerCase().split('-');\n return { locale: segments[0], market: segments[1] || 'ww' };\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;AAKA,SAAgB,QAAQ;CACtB,MAAM,EAAE,gBAAgB,WAAW,kBAAkB;CACrD,MAAM,EAAE,UAAU,WAAW,WAAW,YAAY;CACpD,MAAM,QACJ,SAAS,OAAO,SAAS;AAS3B,QACE,qBAAC,WAAD;EAAS,WAAU;YAAnB;GAEE,oBAAC,OAAD,EAAK,WAAU,wFAAyF,CAAA;GACxG,oBAAC,OAAD,EAAK,WAAU,0FAA2F,CAAA;GAE1G,qBAAC,OAAD;IAAK,WAAU;cAAf;KAEE,qBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,oBAAC,QAAD,EAAM,WAAU,qCAAsC,CAAA,EACtD,oBAAC,QAAD;OAAM,WAAU;iBAA6E;OAEtF,CAAA,CACH;;KAGL,SACC,oBAAC,MAAD;MACE,WAAU;MACV,yBAAyB,EAAE,QAAQ,OAAO;MAC1C,CAAA;KAGJ,oBAAC,KAAD;MAAG,WAAU;gBAAyF;MAElG,CAAA;KAGJ,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,aAAD,EAAe,CAAA;MACX,CAAA;KAGN,oBAAC,OAAD;MAAK,WAAU;gBACZ;OAxCP;OACA;OACA;OACA;OAqCc,CAAC,KAAK,QAAQ,MACpB,oBAAC,UAAD;OAEE,MAAK;OACL,eAAe,SAAS;QAAE,MAAM;QAAQ,SAAS;QAAQ,CAAC;OAC1D,WAAU;iBAET;OACM,EANF,EAME,CACT;MACE,CAAA;KACF;;GACE;;;;;AC3Dd,SAAgB,OAAO;CACrB,MAAM,EAAE,OAAO,WAAW,WAAW,kB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