@netlify/spark-ui 1.6.0 → 1.8.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.
- package/dist/assets/AskNetlify.css +1 -0
- package/dist/assets/SearchHeading.css +1 -1
- package/dist/assets/SearchLink.css +1 -1
- package/dist/assets/SearchModal.css +1 -1
- package/dist/components/preact/AskNetlify/AskNetlify.d.ts +7 -0
- package/dist/components/preact/AskNetlify/AskNetlify.js +20 -0
- package/dist/components/preact/AskNetlify/components/BackButton.d.ts +5 -0
- package/dist/components/preact/AskNetlify/components/BackButton.js +20 -0
- package/dist/components/preact/AskNetlify/components/ChatInterface.d.ts +7 -0
- package/dist/components/preact/AskNetlify/components/ChatInterface.js +53 -0
- package/dist/components/preact/AskNetlify/components/ChatMessages.d.ts +3 -0
- package/dist/components/preact/AskNetlify/components/ChatMessages.js +19 -0
- package/dist/components/preact/AskNetlify/components/QuestionList/QuestionList.d.ts +4 -0
- package/dist/components/preact/AskNetlify/components/QuestionList/QuestionList.js +23 -0
- package/dist/components/preact/AskNetlify/components/QuestionList/questions.d.ts +1 -0
- package/dist/components/preact/AskNetlify/components/QuestionList/questions.js +10 -0
- package/dist/components/preact/Icon/index.d.ts +2 -2
- package/dist/components/preact/Icon/index.js +108 -72
- package/dist/components/preact/SearchModal/components/SearchInput.d.ts +2 -0
- package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.d.ts +1 -1
- package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +34 -16
- package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +76 -53
- package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
- package/dist/components/preact/SearchModal/components/SearchWindow.js +49 -29
- package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
- package/dist/components/preact/SearchModal/hooks/useSearchToggles.d.ts +3 -1
- package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +13 -10
- package/dist/components/preact/SearchModal/types/search.types.d.ts +6 -1
- package/dist/components/preact/SpriteIcon/index.d.ts +7 -0
- package/dist/components/preact/SpriteIcon/index.js +7 -0
- package/dist/components/preact/index.d.ts +1 -0
- package/dist/components/preact/index.js +6 -4
- package/dist/utils/theme.d.ts +3 -0
- package/package.json +4 -1
- package/packages/components/Ticker.astro +29 -18
- package/packages/components/TrustBarTicker.astro +26 -0
- package/packages/components/TrustBarTickerItem.astro +54 -0
- package/packages/components/preact/AskNetlify/AskNetlify.css +282 -0
- package/packages/components/preact/AskNetlify/AskNetlify.tsx +22 -0
- package/packages/components/preact/AskNetlify/components/BackButton.tsx +19 -0
- package/packages/components/preact/AskNetlify/components/ChatInterface.tsx +79 -0
- package/packages/components/preact/AskNetlify/components/ChatMessages.tsx +33 -0
- package/packages/components/preact/AskNetlify/components/QuestionList/QuestionList.tsx +27 -0
- package/packages/components/preact/AskNetlify/components/QuestionList/questions.ts +10 -0
- package/packages/components/preact/Icon/index.tsx +72 -53
- package/packages/components/preact/SearchModal/components/SearchHeading/SearchHeading.css +4 -3
- package/packages/components/preact/SearchModal/components/SearchInput.tsx +9 -7
- package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +20 -10
- package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.tsx +27 -7
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +68 -29
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +59 -30
- package/packages/components/preact/SearchModal/components/SearchWindow.tsx +34 -18
- package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
- package/packages/components/preact/SearchModal/hooks/useSearchToggles.ts +11 -3
- package/packages/components/preact/SearchModal/types/search.types.tsx +5 -2
- package/packages/components/preact/SpriteIcon/index.tsx +13 -0
- package/packages/components/preact/index.ts +1 -0
- package/packages/styles/tokens.css +72 -24
- package/packages/utils/theme.ts +16 -0
|
@@ -1,188 +1,224 @@
|
|
|
1
1
|
import { u as C } from "../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { Fragment as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
2
|
+
import { Fragment as e } from "preact";
|
|
3
|
+
function I(r) {
|
|
4
|
+
const t = V[r.name];
|
|
5
|
+
if (t)
|
|
6
|
+
return /* @__PURE__ */ C(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
id: `icon-${r.name}`,
|
|
10
|
+
"data-icon": r.name,
|
|
11
|
+
viewBox: "0 0 16 16",
|
|
12
|
+
fill: "none",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
...r,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ C(t, {}),
|
|
17
|
+
";"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
6
21
|
}
|
|
7
|
-
const
|
|
8
|
-
"path",
|
|
9
|
-
{
|
|
10
|
-
d: "M8.5328 26.6769C8.5328 16.6562 16.6562 8.5328 26.6769 8.5328C36.6977 8.5328 44.8211 16.6562 44.8211 26.6769C44.8211 36.6977 36.6977 44.8211 26.6769 44.8211C16.6562 44.8211 8.5328 36.6977 8.5328 26.6769ZM26.6769 0C11.9437 0 0 11.9437 0 26.6769C0 41.4102 11.9437 53.3539 26.6769 53.3539C32.5038 53.3539 37.8943 51.4858 42.2822 48.3158L56.7168 62.7504C58.3829 64.4165 61.0843 64.4165 62.7504 62.7504C64.4165 61.0843 64.4165 58.3829 62.7504 56.7168L48.3158 42.2822C51.4858 37.8943 53.3539 32.5038 53.3539 26.6769C53.3539 11.9437 41.4102 0 26.6769 0Z",
|
|
11
|
-
fill: "currentColor"
|
|
12
|
-
}
|
|
13
|
-
), o = () => /* @__PURE__ */ C(
|
|
14
|
-
"path",
|
|
15
|
-
{
|
|
16
|
-
d: "M45.264 17.719L37.08 15.439C35.64 14.987 35.64 13.011 37.08 12.631L45.264 10.275C45.4922 10.1958 45.6994 10.0656 45.8699 9.89446C46.0404 9.72329 46.1697 9.51555 46.248 9.287L48.6 1.083C49.052 -0.361 51.024 -0.361 51.4 1.083L53.676 9.287C53.7543 9.51555 53.8836 9.72329 54.0541 9.89446C54.2246 10.0656 54.4318 10.1958 54.66 10.275L62.92 12.635C64.36 13.087 64.36 15.063 62.92 15.443L54.736 17.723C54.5078 17.8022 54.3006 17.9324 54.1301 18.1035C53.9596 18.2747 53.8303 18.4824 53.752 18.711L51.4 26.915C50.948 28.359 48.976 28.359 48.6 26.915L46.248 18.711C46.1694 18.4826 46.0401 18.275 45.8696 18.1039C45.6992 17.9327 45.4921 17.8025 45.264 17.723V17.719ZM29.36 33.663L42.348 37.615C44.536 38.271 44.536 41.643 42.424 42.383L29.436 46.335C29.0506 46.4707 28.7043 46.6988 28.4274 46.9994C28.1506 47.2999 27.9516 47.6637 27.848 48.059L24.224 62.211C24.1201 62.7151 23.8456 63.1679 23.4466 63.4931C23.0476 63.8182 22.5487 63.9958 22.034 63.9958C21.5193 63.9958 21.0204 63.8182 20.6214 63.4931C20.2224 63.1679 19.9479 62.7151 19.844 62.211L16.22 48.059C16.1164 47.6637 15.9174 47.2999 15.6406 46.9994C15.3637 46.6988 15.0174 46.4707 14.632 46.335L1.644 42.383C-0.548 41.727 -0.548 38.271 1.644 37.615L14.556 33.663C14.9414 33.5273 15.2877 33.2992 15.5646 32.9986C15.8414 32.6981 16.0404 32.3343 16.144 31.939L19.768 17.787C19.8719 17.2829 20.1464 16.8301 20.5454 16.5049C20.9444 16.1798 21.4433 16.0022 21.958 16.0022C22.4727 16.0022 22.9716 16.1798 23.3706 16.5049C23.7696 16.8301 24.0441 17.2829 24.148 17.787L27.772 31.939C28 32.759 28.604 33.419 29.36 33.663Z",
|
|
17
|
-
fill: "currentColor"
|
|
18
|
-
}
|
|
19
|
-
), l = () => /* @__PURE__ */ C(t, { children: [
|
|
22
|
+
const l = () => /* @__PURE__ */ C(e, { children: [
|
|
20
23
|
/* @__PURE__ */ C(
|
|
21
24
|
"path",
|
|
22
25
|
{
|
|
23
|
-
|
|
26
|
+
id: "ask-netlify-tick-3",
|
|
27
|
+
d: "M9.26465 1.02094L9.31322 0.921348L10.0528 0.666687L10.1524 0.715259L10.5563 1.9638L10.2999 2.4895L10.195 2.52628L9.6685 2.26948L9.26465 1.02094Z",
|
|
24
28
|
fill: "currentColor"
|
|
25
29
|
}
|
|
26
30
|
),
|
|
27
31
|
/* @__PURE__ */ C(
|
|
28
32
|
"path",
|
|
29
33
|
{
|
|
30
|
-
|
|
34
|
+
id: "ask-netlify-tick-1",
|
|
35
|
+
d: "M15.5915 3.11667L15.6942 3.15818L15.9999 3.8782L15.9584 3.98093L14.741 4.4709L14.1987 4.25179L14.1547 4.14977L14.3742 3.60663L15.5915 3.11667Z",
|
|
31
36
|
fill: "currentColor"
|
|
32
37
|
}
|
|
33
38
|
),
|
|
34
39
|
/* @__PURE__ */ C(
|
|
35
40
|
"path",
|
|
36
41
|
{
|
|
37
|
-
|
|
42
|
+
id: "ask-netlify-tick-2",
|
|
43
|
+
d: "M12.8306 0.944052L12.9353 0.907978L13.6384 1.25087L13.6744 1.35564L12.9408 2.91375L12.3877 3.10417L12.2876 3.05604L12.0969 2.50216L12.8306 0.944052Z",
|
|
38
44
|
fill: "currentColor"
|
|
39
45
|
}
|
|
40
46
|
),
|
|
41
47
|
/* @__PURE__ */ C(
|
|
42
48
|
"path",
|
|
43
49
|
{
|
|
44
|
-
|
|
50
|
+
id: "ask-netlify-eye-left",
|
|
51
|
+
d: "M5.60625 10.7823C5.60625 11.421 5.09138 11.9387 4.45625 11.9387C3.82112 11.9387 3.30625 11.421 3.30625 10.7823C3.30625 10.1436 3.82112 9.62585 4.45625 9.62585C5.09138 9.62585 5.60625 10.1436 5.60625 10.7823Z",
|
|
45
52
|
fill: "currentColor"
|
|
46
53
|
}
|
|
47
54
|
),
|
|
48
55
|
/* @__PURE__ */ C(
|
|
49
56
|
"path",
|
|
50
57
|
{
|
|
51
|
-
|
|
58
|
+
id: "ask-netlify-eye-right",
|
|
59
|
+
d: "M10.8777 11.9387C11.5129 11.9387 12.0277 11.421 12.0277 10.7823C12.0277 10.1436 11.5129 9.62585 10.8777 9.62585C10.2426 9.62585 9.72774 10.1436 9.72774 10.7823C9.72774 11.421 10.2426 11.9387 10.8777 11.9387Z",
|
|
52
60
|
fill: "currentColor"
|
|
53
61
|
}
|
|
54
62
|
),
|
|
55
63
|
/* @__PURE__ */ C(
|
|
56
64
|
"path",
|
|
57
65
|
{
|
|
58
|
-
d: "
|
|
66
|
+
d: "M8.41582 10.9491L8.43331 10.994L8.43337 11.2417L8.41589 11.2866L7.86046 12.4215L7.78018 12.4806H7.5763L7.49602 12.4215L6.91751 11.2866L6.90003 11.2417L6.89997 11.2114V10.994L6.91745 10.9491L7.55316 10.526H7.75704L8.41582 10.9491Z",
|
|
59
67
|
fill: "currentColor"
|
|
60
68
|
}
|
|
61
69
|
),
|
|
62
70
|
/* @__PURE__ */ C(
|
|
63
71
|
"path",
|
|
64
72
|
{
|
|
65
|
-
|
|
73
|
+
"fill-rule": "evenodd",
|
|
74
|
+
"clip-rule": "evenodd",
|
|
75
|
+
d: "M7.86997 4.00002C11.9918 4.00002 15.3333 6.70814 15.3333 10.853C15.3333 13.3274 13.3386 15.3334 10.878 15.3334H0V10.853C0 6.70814 3.34157 4.00002 7.46336 4.00002H7.86997ZM0.990302 10.5245C0.990302 8.69571 2.51537 7.15558 4.33747 7.15558C5.71877 7.15558 6.90206 7.9938 7.41504 9.19232C7.41751 9.1981 7.42291 9.20918 7.42291 9.20918H7.91072C7.91072 9.20918 7.91612 9.1981 7.91859 9.19232C8.43157 7.9938 9.61486 7.15558 10.9962 7.15558C12.8183 7.15558 14.3433 8.69571 14.3433 10.5245C14.3433 12.2311 12.9812 13.8499 11.447 13.8845H4.15184C2.38987 13.7867 0.990302 12.323 0.990302 10.5245Z",
|
|
66
76
|
fill: "currentColor"
|
|
67
77
|
}
|
|
68
78
|
),
|
|
69
79
|
/* @__PURE__ */ C(
|
|
70
|
-
"
|
|
80
|
+
"rect",
|
|
71
81
|
{
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
id: "ask-netlify-eyelid-left",
|
|
83
|
+
x: "3",
|
|
84
|
+
y: "7.3",
|
|
85
|
+
width: "3",
|
|
86
|
+
height: "2",
|
|
87
|
+
fill: "var(--search-bg-color, currentColor)"
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ C(
|
|
91
|
+
"rect",
|
|
92
|
+
{
|
|
93
|
+
id: "ask-netlify-eyelid-right",
|
|
94
|
+
x: "9.7",
|
|
95
|
+
y: "7.3",
|
|
96
|
+
width: "3",
|
|
97
|
+
height: "2",
|
|
98
|
+
fill: "var(--search-bg-color, currentColor)"
|
|
74
99
|
}
|
|
75
100
|
)
|
|
76
|
-
] }),
|
|
77
|
-
"path",
|
|
78
|
-
{
|
|
79
|
-
d: "M0 11C0 4.925 4.925 0 11 0H49C52.8625 0 56 3.1375 56 7V43C56 45.7875 54.3625 48.2 52 49.325V58H53C54.6625 58 56 59.3375 56 61C56 62.6625 54.6625 64 53 64H10C4.475 64 0 59.525 0 54C0 53.6625 0.0125 53.325 0.05 53H0V11ZM10 50C7.7875 50 6 51.7875 6 54C6 56.2125 7.7875 58 10 58H46V50H10ZM6 44.8375C7.225 44.3 8.575 44 10 44H49C49.55 44 50 43.55 50 43V7C50 6.45 49.55 6 49 6H11C8.2375 6 6 8.2375 6 11V44.8375ZM19 14H41C42.6625 14 44 15.3375 44 17C44 18.6625 42.6625 20 41 20H19C17.3375 20 16 18.6625 16 17C16 15.3375 17.3375 14 19 14ZM19 24H41C42.6625 24 44 25.3375 44 27C44 28.6625 42.6625 30 41 30H19C17.3375 30 16 28.6625 16 27C16 25.3375 17.3375 24 19 24Z",
|
|
80
|
-
fill: "currentColor"
|
|
81
|
-
}
|
|
82
|
-
), H = () => /* @__PURE__ */ C(
|
|
101
|
+
] }), n = () => /* @__PURE__ */ C(
|
|
83
102
|
"path",
|
|
84
103
|
{
|
|
85
|
-
d: "
|
|
104
|
+
d: "M12.3756 6.68667C12.3756 7.94156 11.9681 9.10077 11.2818 10.0413L14.7436 13.5052C15.0855 13.8469 15.0855 14.4019 14.7436 14.7437C14.4018 15.0854 13.8467 15.0854 13.5049 14.7437L10.043 11.2797C9.10235 11.9687 7.94292 12.3733 6.68778 12.3733C3.54583 12.3733 1 9.828 1 6.68667C1 3.54533 3.54583 1 6.68778 1C9.82973 1 12.3756 3.54533 12.3756 6.68667ZM6.68778 10.6236C7.20488 10.6236 7.71692 10.5218 8.19467 10.3239C8.67241 10.1261 9.1065 9.83607 9.47215 9.47049C9.83779 9.10491 10.1278 8.67091 10.3257 8.19326C10.5236 7.71561 10.6255 7.20367 10.6255 6.68667C10.6255 6.16966 10.5236 5.65772 10.3257 5.18007C10.1278 4.70242 9.83779 4.26842 9.47215 3.90284C9.1065 3.53726 8.67241 3.24727 8.19467 3.04942C7.71692 2.85158 7.20488 2.74974 6.68778 2.74974C6.17067 2.74974 5.65863 2.85158 5.18089 3.04942C4.70315 3.24727 4.26906 3.53726 3.90341 3.90284C3.53776 4.26842 3.24771 4.70242 3.04982 5.18007C2.85194 5.65772 2.75009 6.16966 2.75009 6.68667C2.75009 7.20367 2.85194 7.71561 3.04982 8.19326C3.24771 8.67091 3.53776 9.10491 3.90341 9.47049C4.26906 9.83607 4.70315 10.1261 5.18089 10.3239C5.65863 10.5218 6.17067 10.6236 6.68778 10.6236Z",
|
|
86
105
|
fill: "currentColor"
|
|
87
106
|
}
|
|
88
|
-
),
|
|
107
|
+
), o = () => /* @__PURE__ */ C(
|
|
89
108
|
"path",
|
|
90
109
|
{
|
|
91
|
-
d: "
|
|
110
|
+
d: "M4.57143 1C3.15179 1 2 2.17578 2 3.625V12.375C2 13.8242 3.15179 15 4.57143 15H12.2857H13.1429C13.617 15 14 14.609 14 14.125C14 13.641 13.617 13.25 13.1429 13.25V11.5C13.617 11.5 14 11.109 14 10.625V1.875C14 1.39102 13.617 1 13.1429 1H12.2857H4.57143ZM4.57143 11.5H11.4286V13.25H4.57143C4.09732 13.25 3.71429 12.859 3.71429 12.375C3.71429 11.891 4.09732 11.5 4.57143 11.5ZM5.42857 4.9375C5.42857 4.69687 5.62143 4.5 5.85714 4.5H11C11.2357 4.5 11.4286 4.69687 11.4286 4.9375C11.4286 5.17813 11.2357 5.375 11 5.375H5.85714C5.62143 5.375 5.42857 5.17813 5.42857 4.9375ZM5.85714 6.25H11C11.2357 6.25 11.4286 6.44687 11.4286 6.6875C11.4286 6.92813 11.2357 7.125 11 7.125H5.85714C5.62143 7.125 5.42857 6.92813 5.42857 6.6875C5.42857 6.44687 5.62143 6.25 5.85714 6.25Z",
|
|
92
111
|
fill: "currentColor"
|
|
93
112
|
}
|
|
94
|
-
),
|
|
113
|
+
), L = () => /* @__PURE__ */ C(
|
|
95
114
|
"path",
|
|
96
115
|
{
|
|
97
|
-
d: "
|
|
116
|
+
d: "M11.7071 7.29399C12.0976 7.68448 12.0976 8.31864 11.7071 8.70914L5.70826 14.7071C5.31771 15.0976 4.68346 15.0976 4.29291 14.7071C3.90236 14.3166 3.90236 13.6825 4.29291 13.292L9.58563 8L4.29604 2.70802C3.90549 2.31753 3.90549 1.68336 4.29604 1.29287C4.68658 0.902376 5.32084 0.902376 5.71138 1.29287L11.7102 7.29086L11.7071 7.29399Z",
|
|
98
117
|
fill: "currentColor"
|
|
99
118
|
}
|
|
100
|
-
),
|
|
119
|
+
), i = () => /* @__PURE__ */ C(
|
|
101
120
|
"path",
|
|
102
121
|
{
|
|
103
122
|
d: "M0 4.57143C0 2.04286 2.04286 0 4.57143 0C37.4 0 64 26.6 64 59.4286C64 61.9571 61.9571 64 59.4286 64C56.9 64 54.8571 61.9571 54.8571 59.4286C54.8571 31.6571 32.3429 9.14286 4.57143 9.14286C2.04286 9.14286 0 7.1 0 4.57143ZM0 54.8571C0 52.4323 0.963263 50.1068 2.67788 48.3922C4.3925 46.6776 6.71802 45.7143 9.14286 45.7143C11.5677 45.7143 13.8932 46.6776 15.6078 48.3922C17.3225 50.1068 18.2857 52.4323 18.2857 54.8571C18.2857 57.282 17.3225 59.6075 15.6078 61.3221C13.8932 63.0367 11.5677 64 9.14286 64C6.71802 64 4.3925 63.0367 2.67788 61.3221C0.963263 59.6075 0 57.282 0 54.8571ZM4.57143 18.2857C27.3 18.2857 45.7143 36.7 45.7143 59.4286C45.7143 61.9571 43.6714 64 41.1429 64C38.6143 64 36.5714 61.9571 36.5714 59.4286C36.5714 41.7571 22.2429 27.4286 4.57143 27.4286C2.04286 27.4286 0 25.3857 0 22.8571C0 20.3286 2.04286 18.2857 4.57143 18.2857Z",
|
|
104
123
|
fill: "currentColor"
|
|
105
124
|
}
|
|
106
|
-
),
|
|
125
|
+
), c = () => /* @__PURE__ */ C(
|
|
107
126
|
"path",
|
|
108
127
|
{
|
|
109
|
-
d: "M15
|
|
128
|
+
d: "M15 7.57143C15 10.6491 11.8666 13.1429 8.00041 13.1429C6.98601 13.1429 6.02357 12.9714 5.15409 12.6634C4.82871 12.8964 4.29828 13.2152 3.66941 13.483C3.01319 13.7616 2.22301 14 1.43829 14C1.26056 14 1.10198 13.8955 1.03362 13.7348C0.965266 13.5741 1.00355 13.392 1.12658 13.2688L1.13479 13.2607C1.14299 13.2527 1.15393 13.242 1.17033 13.2232C1.20041 13.1911 1.24689 13.1402 1.30431 13.0705C1.41641 12.9366 1.56679 12.7384 1.71991 12.492C1.99333 12.0473 2.25308 11.4634 2.30503 10.8071C1.48477 9.89643 1.00081 8.77946 1.00081 7.57143C1.00081 4.49375 4.13422 2 8.00041 2C11.8666 2 15 4.49375 15 7.57143Z",
|
|
110
129
|
fill: "currentColor"
|
|
111
130
|
}
|
|
112
|
-
), u = () => /* @__PURE__ */ C(
|
|
131
|
+
), u = () => /* @__PURE__ */ C(e, { children: [
|
|
132
|
+
/* @__PURE__ */ C(
|
|
133
|
+
"path",
|
|
134
|
+
{
|
|
135
|
+
"fill-rule": "evenodd",
|
|
136
|
+
"clip-rule": "evenodd",
|
|
137
|
+
d: "M4.04938 8.73798C3.2407 7.81172 2.75 6.59946 2.75 5.27071C2.75 2.48473 4.94068 0.00930912 7.98359 2.55322e-05C10.8908 -0.00895859 13.25 2.35416 13.25 5.27071C13.25 6.59946 12.7593 7.81172 11.9506 8.73798C11.4578 9.30248 10.687 10.9818 10.3932 11.9766L10.3899 12H5.61006L5.60678 11.9766C5.31295 10.9818 4.54216 9.30248 4.04938 8.73798ZM8.34274 2.03953C8.42611 2.41703 8.18767 2.79064 7.81017 2.87402C6.80315 3.09642 6.06073 3.89938 5.85994 4.87157C5.78174 5.25018 5.41143 5.49371 5.03282 5.41552C4.65421 5.33732 4.41068 4.96701 4.48888 4.5884C4.79524 3.10505 5.93379 1.85468 7.50825 1.50696C7.88575 1.42359 8.25936 1.66203 8.34274 2.03953Z",
|
|
138
|
+
fill: "currentColor"
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ C(
|
|
142
|
+
"path",
|
|
143
|
+
{
|
|
144
|
+
d: "M5.76932 14.9479C5.67636 14.81 5.62681 14.6478 5.62655 14.4823L5.62521 13.5L10.3752 13.5L10.3741 14.4823C10.374 14.648 10.3243 14.81 10.2314 14.9479L9.77614 15.6241C9.69838 15.7397 9.5929 15.8345 9.46909 15.9001C9.34529 15.9657 9.207 16 9.06653 16L6.93417 16C6.7937 16 6.65541 15.9657 6.5316 15.9001C6.4078 15.8345 6.30232 15.7397 6.22455 15.6241L5.76932 14.9479Z",
|
|
145
|
+
fill: "currentColor"
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
] }), d = () => /* @__PURE__ */ C(
|
|
113
149
|
"path",
|
|
114
150
|
{
|
|
115
151
|
d: "M58.0309 26.6159C63.6509 21.0179 63.6509 11.9435 58.0309 6.34543C52.6809 1.01633 44.0909 0.72746 38.3909 5.69797L37.7809 6.23586C36.7809 7.10246 36.6809 8.61652 37.5509 9.61262C38.4209 10.6087 39.9409 10.7083 40.9409 9.84172L41.5509 9.30383C45.3509 5.9968 51.0709 6.18605 54.6409 9.74211C58.3809 13.4675 58.3809 19.5138 54.6409 23.2491L43.3109 34.5249C39.5709 38.2503 33.4909 38.2503 29.7509 34.5249C26.1809 30.9689 25.9909 25.2712 29.3109 21.4861L29.7809 20.9482C30.6509 19.9521 30.5509 18.448 29.5509 17.5714C28.5509 16.6948 27.0409 16.8044 26.1609 17.8005L25.6909 18.3384C20.7109 24.0161 21.0009 32.5726 26.3509 37.9017C31.9709 43.4997 41.0809 43.4997 46.7009 37.9017L58.0309 26.6159ZM5.97086 24.3847C0.350859 29.9827 0.350859 39.0571 5.97086 44.6452C11.3309 49.9843 19.9209 50.2632 25.6209 45.2927L26.2309 44.7548C27.2309 43.8882 27.3309 42.3741 26.4609 41.378C25.5909 40.382 24.0709 40.2823 23.0709 41.1489L22.4609 41.6868C18.6609 44.9939 12.9409 44.8046 9.37086 41.2486C5.63086 37.5232 5.63086 31.4769 9.37086 27.7415L20.7009 16.4757C24.4409 12.7503 30.5109 12.7503 34.2609 16.4757C37.8309 20.0318 38.0209 25.7294 34.7009 29.5146L34.1609 30.1222C33.2909 31.1183 33.3909 32.6224 34.3909 33.4989C35.3909 34.3755 36.9009 34.2659 37.7809 33.2698L38.3209 32.6622C43.3109 26.9845 43.0209 18.428 37.6709 13.089C32.0509 7.49094 22.9409 7.49094 17.3209 13.089L5.97086 24.3847Z",
|
|
116
152
|
fill: "currentColor"
|
|
117
153
|
}
|
|
118
|
-
),
|
|
154
|
+
), a = () => /* @__PURE__ */ C(
|
|
119
155
|
"path",
|
|
120
156
|
{
|
|
121
157
|
d: "M49.8875 0.137732C48.3 -0.349768 46.625 0.525232 46.1375 2.11273L28.1375 60.1127C27.65 61.7002 28.525 63.3752 30.1125 63.8627C31.7 64.3502 33.375 63.4752 33.8625 61.8877L51.8625 3.88773C52.35 2.30023 51.475 0.625232 49.8875 0.137732ZM58.8125 14.9502C57.675 16.1627 57.7375 18.0627 58.95 19.1877L72.6125 32.0002L58.95 44.8127C57.7375 45.9502 57.675 47.8502 58.8125 49.0502C59.95 50.2502 61.85 50.3252 63.05 49.1877L79.05 34.1877C79.65 33.6252 80 32.8252 80 32.0002C80 31.1752 79.6625 30.3752 79.05 29.8127L63.05 14.8127C61.8375 13.6752 59.9375 13.7377 58.8125 14.9502ZM21.1875 14.9502C20.05 13.7377 18.15 13.6752 16.95 14.8127L0.95 29.8127C0.3375 30.3752 0 31.1752 0 32.0002C0 32.8252 0.3375 33.6252 0.95 34.1877L16.95 49.1877C18.1625 50.3252 20.0625 50.2627 21.1875 49.0502C22.3125 47.8377 22.2625 45.9377 21.05 44.8127L7.3875 32.0002L21.05 19.1877C22.2625 18.0502 22.325 16.1502 21.1875 14.9502Z",
|
|
122
158
|
fill: "currentColor"
|
|
123
159
|
}
|
|
124
|
-
),
|
|
160
|
+
), h = () => /* @__PURE__ */ C(
|
|
125
161
|
"path",
|
|
126
162
|
{
|
|
127
|
-
d: "
|
|
163
|
+
d: "M4.83333 1C3.82214 1 3 1.78477 3 2.75V13.25C3 14.2152 3.82214 15 4.83333 15H12.1667C13.1779 15 14 14.2152 14 13.25V5.375H10.3333C9.8263 5.375 9.41667 4.98398 9.41667 4.5V1H4.83333ZM10.3333 1V4.5H14L10.3333 1ZM6.20833 8H10.7917C11.0438 8 11.25 8.19687 11.25 8.4375C11.25 8.67813 11.0438 8.875 10.7917 8.875H6.20833C5.95625 8.875 5.75 8.67813 5.75 8.4375C5.75 8.19687 5.95625 8 6.20833 8ZM6.20833 9.75H10.7917C11.0438 9.75 11.25 9.94687 11.25 10.1875C11.25 10.4281 11.0438 10.625 10.7917 10.625H6.20833C5.95625 10.625 5.75 10.4281 5.75 10.1875C5.75 9.94687 5.95625 9.75 6.20833 9.75ZM6.20833 11.5H10.7917C11.0438 11.5 11.25 11.6969 11.25 11.9375C11.25 12.1781 11.0438 12.375 10.7917 12.375H6.20833C5.95625 12.375 5.75 12.1781 5.75 11.9375C5.75 11.6969 5.95625 11.5 6.20833 11.5Z",
|
|
128
164
|
fill: "currentColor"
|
|
129
165
|
}
|
|
130
|
-
),
|
|
166
|
+
), M = () => /* @__PURE__ */ C(
|
|
131
167
|
"path",
|
|
132
168
|
{
|
|
133
169
|
d: "M0.787918 9.02542C-0.337082 7.80042 -0.249582 5.91292 0.962918 4.78792C2.17542 3.66292 4.07542 3.75042 5.20042 4.96292L28.2004 29.9629C29.2629 31.1129 29.2629 32.8754 28.2004 34.0254L5.20042 59.0254C4.07542 60.2504 2.17542 60.3254 0.962918 59.2004C-0.249582 58.0754 -0.337082 56.1754 0.787918 54.9629L21.9254 32.0004L0.787918 9.02542ZM31.0004 54.0004H69.0004C70.6629 54.0004 72.0004 55.3379 72.0004 57.0004C72.0004 58.6629 70.6629 60.0004 69.0004 60.0004H31.0004C29.3379 60.0004 28.0004 58.6629 28.0004 57.0004C28.0004 55.3379 29.3379 54.0004 31.0004 54.0004Z",
|
|
134
170
|
fill: "currentColor"
|
|
135
171
|
}
|
|
136
|
-
),
|
|
172
|
+
), Z = () => /* @__PURE__ */ C(
|
|
137
173
|
"path",
|
|
138
174
|
{
|
|
139
|
-
|
|
175
|
+
"fill-rule": "evenodd",
|
|
176
|
+
"clip-rule": "evenodd",
|
|
177
|
+
d: "M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM7.48998 7.58293C7.24532 7.9418 7.1073 8.36489 7.09243 8.80158L7.09232 9.00062C7.09232 9.21263 7.17498 9.41595 7.32211 9.56587C7.46924 9.71578 7.6688 9.8 7.87688 9.8C8.08495 9.8 8.28451 9.71578 8.43164 9.56587C8.57878 9.41595 8.66143 9.21263 8.66143 9.00062V8.8172C8.67459 8.68789 8.72283 8.56481 8.80083 8.46179C8.82284 8.43271 8.87624 8.39281 8.96482 8.34893C9.04677 8.30834 9.13665 8.27475 9.21483 8.24583L9.2194 8.24414L9.22961 8.24053L9.23662 8.2376C9.7635 8.01739 10.1981 7.61624 10.4651 7.10372C10.7321 6.5912 10.8149 5.99957 10.6987 5.43153L10.6962 5.42197C10.5641 4.91215 10.2876 4.45323 9.90133 4.10235C9.51593 3.7523 9.03819 3.52522 8.52737 3.44924C8.1077 3.37054 7.67619 3.38633 7.26312 3.49553C6.849 3.605 6.46349 3.80568 6.13376 4.08342C5.58181 4.54443 5.25866 5.23048 5.25 5.95706V5.95934C5.25 6.17135 5.33266 6.37468 5.47979 6.52459C5.62692 6.6745 5.82648 6.75872 6.03456 6.75872C6.24264 6.75872 6.44219 6.6745 6.58933 6.52459C6.73595 6.37519 6.81855 6.17275 6.81911 5.96153C6.82486 5.70702 6.94287 5.46722 7.13988 5.30865C7.29566 5.18188 7.47721 5.09021 7.67067 5.04112C7.86413 4.99203 8.06566 4.98632 8.26159 5.02383L8.2716 5.02518C8.47683 5.05273 8.67003 5.13962 8.82831 5.27556C8.98372 5.40903 9.09909 5.5843 9.16133 5.78128C9.23237 6.20988 8.99652 6.63061 8.59639 6.78484L8.59136 6.78696C8.22065 6.94277 7.74615 7.20718 7.48998 7.58293ZM7.87406 12.6C8.42636 12.6 8.8741 12.1523 8.8741 11.6C8.8741 11.0477 8.42636 10.6 7.87406 10.6C7.32175 10.6 6.87402 11.0477 6.87402 11.6C6.87402 12.1523 7.32175 12.6 7.87406 12.6Z",
|
|
140
178
|
fill: "currentColor"
|
|
141
179
|
}
|
|
142
|
-
),
|
|
180
|
+
), f = () => /* @__PURE__ */ C(
|
|
143
181
|
"path",
|
|
144
182
|
{
|
|
145
183
|
d: "M59.4286 0H4.55714C2.04286 0 0 2.07143 0 4.61429V59.3857C0 61.9286 2.04286 64 4.55714 64H59.4286C61.9429 64 64 61.9286 64 59.3857V4.61429C64 2.07143 61.9429 0 59.4286 0ZM19.3429 54.8571H9.85714V24.3143H19.3571V54.8571H19.3429ZM14.6 20.1429C11.5571 20.1429 9.1 17.6714 9.1 14.6429C9.1 11.6143 11.5571 9.14286 14.6 9.14286C17.6286 9.14286 20.1 11.6143 20.1 14.6429C20.1 17.6857 17.6429 20.1429 14.6 20.1429ZM54.9 54.8571H45.4143V40C45.4143 36.4571 45.3429 31.9 40.4857 31.9C35.5429 31.9 34.7857 35.7571 34.7857 39.7429V54.8571H25.3V24.3143H34.4V28.4857H34.5286C35.8 26.0857 38.9 23.5571 43.5143 23.5571C53.1143 23.5571 54.9 29.8857 54.9 38.1143V54.8571Z",
|
|
146
184
|
fill: "currentColor"
|
|
147
185
|
}
|
|
148
|
-
),
|
|
186
|
+
), H = () => /* @__PURE__ */ C(
|
|
149
187
|
"path",
|
|
150
188
|
{
|
|
151
189
|
d: "M48.6496 6H57.4746L38.1996 28.025L60.8746 58H43.1246L29.2121 39.825L13.3121 58H4.47461L25.0871 34.4375L3.34961 6H21.5496L34.1121 22.6125L48.6496 6ZM45.5496 52.725H50.4371L18.8871 11H13.6371L45.5496 52.725Z",
|
|
152
190
|
fill: "currentColor"
|
|
153
191
|
}
|
|
154
|
-
),
|
|
192
|
+
), s = () => /* @__PURE__ */ C(
|
|
155
193
|
"path",
|
|
156
194
|
{
|
|
157
195
|
d: "M13.975 7.77494C21.275 13.2374 29.125 24.3374 32 30.2999C34.875 24.3499 42.725 13.2499 50.025 7.77494C55.2875 3.82494 63.8125 0.77494 63.8125 10.4999C63.8125 12.4374 62.7 26.8124 62.05 29.1499C59.775 37.2499 51.5 39.3249 44.1375 38.0624C57 40.2499 60.275 47.4999 53.2 54.7499C39.775 68.5249 33.9125 51.2999 32.4125 46.8874C32.2 46.2749 32.0875 45.9124 32 45.9124C31.9125 45.9124 31.8 46.2874 31.5875 46.8874C30.0875 51.2999 24.2125 68.5249 10.8 54.7499C3.7375 47.4999 7 40.2499 19.8625 38.0624C12.5 39.3249 4.225 37.2499 1.9625 29.1374C1.3 26.7999 0.1875 12.4249 0.1875 10.4874C0.1875 0.76244 8.7125 3.81244 13.975 7.76244V7.77494Z",
|
|
158
196
|
fill: "currentColor"
|
|
159
197
|
}
|
|
160
|
-
),
|
|
198
|
+
), p = () => /* @__PURE__ */ C(
|
|
161
199
|
"path",
|
|
162
200
|
{
|
|
163
201
|
d: "M61.0785 13.8158C60.3785 11.1773 58.3229 9.10664 55.7118 8.40527C50.9785 7.125 32.0007 7.125 32.0007 7.125C32.0007 7.125 13.0229 7.125 8.28958 8.40527C5.67847 9.10664 3.62292 11.1773 2.92292 13.8158C1.65625 18.5918 1.65625 28.5445 1.65625 28.5445C1.65625 28.5445 1.65625 38.4973 2.92292 43.2732C3.62292 45.9117 5.67847 47.8934 8.28958 48.5947C13.0229 49.875 32.0007 49.875 32.0007 49.875C32.0007 49.875 50.9785 49.875 55.7118 48.5947C58.3229 47.8934 60.3785 45.9006 61.0785 43.2732C62.3451 38.4973 62.3451 28.5445 62.3451 28.5445C62.3451 28.5445 62.3451 18.5918 61.0785 13.8158ZM25.8007 37.5844V19.5047L41.6563 28.5445L25.8007 37.5844Z",
|
|
164
202
|
fill: "currentColor"
|
|
165
203
|
}
|
|
166
|
-
),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
link:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
rss:
|
|
204
|
+
), V = {
|
|
205
|
+
askNetlify: l,
|
|
206
|
+
book: o,
|
|
207
|
+
caretRight: L,
|
|
208
|
+
code: a,
|
|
209
|
+
comment: c,
|
|
210
|
+
link: d,
|
|
211
|
+
lightbulb: u,
|
|
212
|
+
pageWithLines: h,
|
|
213
|
+
rss: i,
|
|
176
214
|
search: n,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
twitter: f,
|
|
184
|
-
youtube: I
|
|
215
|
+
terminal: M,
|
|
216
|
+
question: Z,
|
|
217
|
+
bluesky: s,
|
|
218
|
+
linkedin: f,
|
|
219
|
+
twitter: H,
|
|
220
|
+
youtube: p
|
|
185
221
|
};
|
|
186
222
|
export {
|
|
187
|
-
|
|
223
|
+
I as default
|
|
188
224
|
};
|
|
@@ -2,6 +2,8 @@ interface Props {
|
|
|
2
2
|
setSearchTerm: (term: string) => void;
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
initialValue?: string;
|
|
5
|
+
isGeneratingAnswer?: boolean;
|
|
6
|
+
isPreparingAnswer?: boolean;
|
|
5
7
|
}
|
|
6
8
|
declare const SearchInput: (props: Props) => import("preact").JSX.Element;
|
|
7
9
|
export default SearchInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchLinkProps } from '../../types/search.types';
|
|
2
|
-
declare const SearchLink: ({ icon, label, url, excerpt, resource }: SearchLinkProps) => import("preact").JSX.Element;
|
|
2
|
+
declare const SearchLink: ({ as: Component, icon, label, url, excerpt, resource, onClick, }: SearchLinkProps) => import("preact").JSX.Element;
|
|
3
3
|
export default SearchLink;
|
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
import { u as a } from "../../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
2
|
import "../../../../../chunks/hooks.module.D9IrxdEh.js";
|
|
3
|
-
import { useSearchLogger as
|
|
3
|
+
import { useSearchLogger as d } from "../../hooks/useSearchLogger.js";
|
|
4
4
|
import c from "../../../Icon/index.js";
|
|
5
|
-
import '../../../../../assets/SearchLink.css';const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
import '../../../../../assets/SearchLink.css';const g = ({
|
|
6
|
+
as: r = "a",
|
|
7
|
+
icon: n,
|
|
8
|
+
label: i,
|
|
9
|
+
url: h,
|
|
10
|
+
excerpt: l,
|
|
11
|
+
resource: e,
|
|
12
|
+
onClick: s
|
|
13
|
+
}) => {
|
|
14
|
+
const { handleClick: m } = d();
|
|
15
|
+
return /* @__PURE__ */ a(
|
|
16
|
+
r,
|
|
17
|
+
{
|
|
18
|
+
className: "n-search-link",
|
|
19
|
+
href: h,
|
|
20
|
+
onClick: (t) => {
|
|
21
|
+
s && s(), m(t);
|
|
22
|
+
},
|
|
23
|
+
children: [
|
|
24
|
+
n && /* @__PURE__ */ a("span", { className: "n-search-link-icon", children: /* @__PURE__ */ a(c, { name: n }) }),
|
|
25
|
+
/* @__PURE__ */ a("div", { className: "n-search-link-body", children: [
|
|
26
|
+
/* @__PURE__ */ a("p", { className: "n-search-link-title", children: [
|
|
27
|
+
/* @__PURE__ */ a("span", { className: "n-search-link-label", children: i }),
|
|
28
|
+
" ",
|
|
29
|
+
e && /* @__PURE__ */ a("span", { className: "n-search-link-badge", "data-resource": e, children: e })
|
|
30
|
+
] }),
|
|
31
|
+
l && /* @__PURE__ */ a("p", { className: "n-search-link-excerpt", dangerouslySetInnerHTML: { __html: l } })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "n-search-link-icon", children: /* @__PURE__ */ a(c, { name: "caretRight" }) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
19
37
|
};
|
|
20
38
|
export {
|
|
21
|
-
|
|
39
|
+
g as default
|
|
22
40
|
};
|
|
@@ -1,63 +1,86 @@
|
|
|
1
1
|
import { u as e } from "../../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useSearch as
|
|
8
|
-
import { useSearchLogger as
|
|
9
|
-
import { useKeyboardNav as
|
|
10
|
-
import { useSearchHotkeys as
|
|
11
|
-
import { useSearchParams as
|
|
12
|
-
import { useSearchToggles as
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { A as N, y as l, d as h } from "../../../../../chunks/hooks.module.D9IrxdEh.js";
|
|
3
|
+
import w from "../../../Modal/Modal.js";
|
|
4
|
+
import p from "../../../KeyboardKey/KeyboardKey.js";
|
|
5
|
+
import I from "../SearchWindow.js";
|
|
6
|
+
import b from "../SearchInput.js";
|
|
7
|
+
import { useSearch as M } from "../../hooks/useSearch.js";
|
|
8
|
+
import { useSearchLogger as O } from "../../hooks/useSearchLogger.js";
|
|
9
|
+
import { useKeyboardNav as P } from "../../hooks/useKeyboardNav.js";
|
|
10
|
+
import { useSearchHotkeys as E } from "../../hooks/useSearchHotkeys.js";
|
|
11
|
+
import { useSearchParams as K } from "../../hooks/useSearchParams.js";
|
|
12
|
+
import { useSearchToggles as A } from "../../hooks/useSearchToggles.js";
|
|
13
|
+
import C from "../../../AskNetlify/AskNetlify.js";
|
|
14
|
+
import { Fragment as F } from "preact";
|
|
15
|
+
import '../../../../../assets/SearchModal.css';function R(c) {
|
|
16
|
+
const r = N(null);
|
|
17
|
+
return l(() => {
|
|
18
|
+
function i(t) {
|
|
19
|
+
r.current && !r.current.contains(t.target) && c();
|
|
18
20
|
}
|
|
19
|
-
return document.addEventListener("mousedown",
|
|
20
|
-
document.removeEventListener("mousedown",
|
|
21
|
+
return document.addEventListener("mousedown", i), () => {
|
|
22
|
+
document.removeEventListener("mousedown", i);
|
|
21
23
|
};
|
|
22
|
-
}, [
|
|
24
|
+
}, [c]), r;
|
|
23
25
|
}
|
|
24
|
-
function
|
|
25
|
-
const [r,
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
const
|
|
29
|
-
window.pagefind && (
|
|
26
|
+
function X(c = { className: "", children: null, debug: !1 }) {
|
|
27
|
+
const [r, i] = h(!1), [t, u] = h({ current: "search" });
|
|
28
|
+
l(() => {
|
|
29
|
+
let s;
|
|
30
|
+
const o = () => {
|
|
31
|
+
window.pagefind && (i(!0), s && clearInterval(s));
|
|
30
32
|
};
|
|
31
|
-
return
|
|
33
|
+
return o(), s = setInterval(o, 100), () => clearInterval(s);
|
|
32
34
|
}, []);
|
|
33
|
-
const { children:
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
const { children: k, className: S, debug: y, ...T } = c, { state: n, actions: g } = M(), [m, v] = h(!1), d = () => v(!0), f = () => v(!1), a = N(null), L = R(f);
|
|
36
|
+
return O(n, y), A(r, d, u), K(r, g.setSearchTerm, d), E(r, m, d, f), P(r, a, m, f), l(() => {
|
|
37
|
+
a.current && (m ? a.current.showModal() : a.current.close());
|
|
38
|
+
}, [m]), l(() => {
|
|
39
|
+
var o;
|
|
40
|
+
const s = (o = a.current) == null ? void 0 : o.querySelector("input");
|
|
41
|
+
s && s.focus(), t.current === "ask" ? setTimeout(() => {
|
|
42
|
+
a.current.classList.add("n-search-modal-ask");
|
|
43
|
+
}, 150) : t.current === "search" && setTimeout(() => {
|
|
44
|
+
a.current.classList.remove("n-search-modal-ask");
|
|
45
|
+
}, 150);
|
|
46
|
+
}, [t.current]), /* @__PURE__ */ e(
|
|
47
|
+
w,
|
|
48
|
+
{
|
|
49
|
+
ref: a,
|
|
50
|
+
className: `n-search-modal ${S || ""}`,
|
|
51
|
+
"data-state": t.current,
|
|
52
|
+
...T,
|
|
53
|
+
children: /* @__PURE__ */ e("div", { ref: L, className: "n-search-container", children: [
|
|
54
|
+
t.current === "ask" && /* @__PURE__ */ e(C, { setModalState: u }),
|
|
55
|
+
t.current === "search" && /* @__PURE__ */ e(F, { children: [
|
|
56
|
+
/* @__PURE__ */ e(b, { setSearchTerm: g.setSearchTerm, initialValue: n.searchTerm }),
|
|
57
|
+
/* @__PURE__ */ e(
|
|
58
|
+
I,
|
|
59
|
+
{
|
|
60
|
+
setModalState: u,
|
|
61
|
+
searchLoading: n.isLoading,
|
|
62
|
+
searchTerm: n.searchTerm,
|
|
63
|
+
results: n.results,
|
|
64
|
+
children: k
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ e("div", { className: "n-search-footer", children: [
|
|
68
|
+
/* @__PURE__ */ e("p", { className: "n-search-footer-tip", children: [
|
|
69
|
+
/* @__PURE__ */ e(p, { keyNames: ["Esc"] }),
|
|
70
|
+
"to close"
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ e("p", { className: "n-search-footer-tip", children: [
|
|
73
|
+
/* @__PURE__ */ e(p, { keyNames: ["Tab"] }),
|
|
74
|
+
/* @__PURE__ */ e("span", { children: "or" }),
|
|
75
|
+
/* @__PURE__ */ e(p, { keyNames: ["↑", "↓"] }),
|
|
76
|
+
"to navigate"
|
|
77
|
+
] })
|
|
78
|
+
] })
|
|
79
|
+
] })
|
|
57
80
|
] })
|
|
58
|
-
|
|
59
|
-
|
|
81
|
+
}
|
|
82
|
+
);
|
|
60
83
|
}
|
|
61
84
|
export {
|
|
62
|
-
|
|
85
|
+
X as default
|
|
63
86
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SearchWindowProps } from '../types/search.types';
|
|
2
|
-
export default function SearchWindow({ searchLoading, searchTerm, results, children: DefaultWindow, }: SearchWindowProps): import("preact").JSX.Element;
|
|
2
|
+
export default function SearchWindow({ setModalState, searchLoading, searchTerm, results, children: DefaultWindow, }: SearchWindowProps): import("preact").JSX.Element;
|