@netlify/spark-ui 1.4.5 → 1.5.0-alpha.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/Orb.css +1 -0
- package/dist/assets/SearchLink.css +1 -1
- package/dist/assets/SearchModal.css +1 -1
- package/dist/chunks/compat.module.BNbXPLVY.js +298 -0
- package/dist/chunks/hooks.module.DGkdD5n9.js +177 -0
- package/dist/chunks/{useTimeout.YR4eKwj7.js → useTimeout.Cq4aqnDe.js} +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/preact/AskNetlify/AskNetlify.d.ts +2 -0
- package/dist/components/preact/AskNetlify/AskNetlify.js +5653 -0
- package/dist/components/preact/Modal/Modal.js +1 -1
- package/dist/components/preact/Orb/Orb.d.ts +2 -0
- package/dist/components/preact/Orb/Orb.js +5 -0
- package/dist/components/preact/SearchModal/components/SearchInput.d.ts +2 -0
- package/dist/components/preact/SearchModal/components/SearchInput.js +2 -2
- package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.d.ts +1 -1
- package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +35 -17
- package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +81 -51
- package/dist/components/preact/SearchModal/components/SearchToggle/SearchToggle.js +1 -1
- package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
- package/dist/components/preact/SearchModal/components/SearchWindow.js +46 -30
- package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
- package/dist/components/preact/SearchModal/hooks/useSearch.js +2 -2
- package/dist/components/preact/SearchModal/hooks/useSearchHotkeys.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchLogger.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchParams.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +1 -1
- package/dist/components/preact/SearchModal/types/search.types.d.ts +6 -1
- package/dist/components/preact/index.d.ts +1 -0
- package/dist/components/preact/index.js +7 -5
- package/dist/utils/handleThemeChange.d.ts +1 -0
- package/package.json +4 -2
- package/packages/components/CodeBlock.astro +1 -1
- package/packages/components/index.ts +1 -0
- package/packages/components/preact/AskNetlify/AskNetlify.css +168 -0
- package/packages/components/preact/AskNetlify/AskNetlify.tsx +126 -0
- package/packages/components/preact/Orb/Orb.css +94 -0
- package/packages/components/preact/Orb/Orb.tsx +7 -0
- package/packages/components/preact/SearchModal/components/SearchInput.tsx +9 -7
- package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +7 -2
- package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.tsx +27 -7
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +81 -18
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +67 -30
- package/packages/components/preact/SearchModal/components/SearchWindow.tsx +31 -16
- package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
- package/packages/components/preact/SearchModal/types/search.types.tsx +5 -2
- package/packages/components/preact/index.ts +1 -0
- package/packages/styles/tokens.css +28 -0
- package/packages/utils/handleThemeChange.ts +11 -0
- package/dist/chunks/compat.module.DJD78v1z.js +0 -175
- package/dist/chunks/hooks.module.D9IrxdEh.js +0 -138
- package/packages/themes/poimandres.json +0 -311
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as l } from "../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { D as d } from "../../../chunks/compat.module.
|
|
2
|
+
import { D as d } from "../../../chunks/compat.module.BNbXPLVY.js";
|
|
3
3
|
const u = d(function({ children: o, className: r, ...a }, t) {
|
|
4
4
|
return /* @__PURE__ */ l("dialog", { ref: t, className: r, role: "dialog", "aria-modal": "true", ...a, children: o });
|
|
5
5
|
});
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { u as e } from "../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { d as u, y as h } from "../../../../chunks/hooks.module.
|
|
3
|
-
import { u as o } from "../../../../chunks/useTimeout.
|
|
2
|
+
import { d as u, y as h } from "../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
3
|
+
import { u as o } from "../../../../chunks/useTimeout.Cq4aqnDe.js";
|
|
4
4
|
import d from "../../Icon/index.js";
|
|
5
5
|
const I = (a) => {
|
|
6
6
|
const [r, t] = u(""), { reset: c, run: i } = o((l) => {
|
|
@@ -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
|
-
import "../../../../../chunks/hooks.module.
|
|
3
|
-
import { useSearchLogger as
|
|
2
|
+
import "../../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
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,93 @@
|
|
|
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
|
-
|
|
2
|
+
import { A as N, y as u, d as m } from "../../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
3
|
+
import b from "../../../Modal/Modal.js";
|
|
4
|
+
import h from "../../../KeyboardKey/KeyboardKey.js";
|
|
5
|
+
import M from "../SearchWindow.js";
|
|
6
|
+
import O from "../SearchInput.js";
|
|
7
|
+
import { useSearch as P } from "../../hooks/useSearch.js";
|
|
8
|
+
import { useSearchLogger as A } from "../../hooks/useSearchLogger.js";
|
|
9
|
+
import { useKeyboardNav as E } from "../../hooks/useKeyboardNav.js";
|
|
10
|
+
import { useSearchHotkeys as K } from "../../hooks/useSearchHotkeys.js";
|
|
11
|
+
import { useSearchParams as q } from "../../hooks/useSearchParams.js";
|
|
12
|
+
import { useSearchToggles as C } from "../../hooks/useSearchToggles.js";
|
|
13
|
+
import F from "../../../AskNetlify/AskNetlify.js";
|
|
14
|
+
import { Fragment as Q } from "preact";
|
|
15
|
+
import '../../../../../assets/SearchModal.css';function R(c) {
|
|
16
|
+
const r = N(null);
|
|
15
17
|
return u(() => {
|
|
16
|
-
function t
|
|
17
|
-
r.current && !r.current.contains(
|
|
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
|
+
function Z(c = { className: "", children: null, debug: !1 }) {
|
|
27
|
+
const [r, i] = m(!1), [t, p] = m({ current: "search" }), [k, v] = m("");
|
|
26
28
|
u(() => {
|
|
27
|
-
let
|
|
28
|
-
const
|
|
29
|
-
window.pagefind && (
|
|
29
|
+
let a;
|
|
30
|
+
const o = () => {
|
|
31
|
+
window.pagefind && (i(!0), a && clearInterval(a));
|
|
30
32
|
};
|
|
31
|
-
return
|
|
33
|
+
return o(), a = setInterval(o, 100), () => clearInterval(a);
|
|
32
34
|
}, []);
|
|
33
|
-
const { children:
|
|
34
|
-
return
|
|
35
|
-
s.current && (
|
|
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: T, className: S, debug: L, ...w } = c, { state: n, actions: g } = P(), [l, y] = m(!1), d = () => y(!0), f = () => y(!1), s = N(null), I = R(f);
|
|
36
|
+
return A(n, L), C(r, d), q(r, g.setSearchTerm, d), K(r, l, d, f), E(r, s, l, f), u(() => {
|
|
37
|
+
s.current && (l ? s.current.showModal() : s.current.close());
|
|
38
|
+
}, [l]), u(() => {
|
|
39
|
+
var o;
|
|
40
|
+
const a = (o = s.current) == null ? void 0 : o.querySelector("input");
|
|
41
|
+
a && a.focus(), t.current === "ask" ? setTimeout(() => {
|
|
42
|
+
s.current.classList.add("n-search-modal-ask");
|
|
43
|
+
}, 150) : t.current === "search" && setTimeout(() => {
|
|
44
|
+
s.current.classList.remove("n-search-modal-ask");
|
|
45
|
+
}, 150);
|
|
46
|
+
}, [t.current]), /* @__PURE__ */ e(
|
|
47
|
+
b,
|
|
48
|
+
{
|
|
49
|
+
ref: s,
|
|
50
|
+
className: `n-search-modal ${S || ""}`,
|
|
51
|
+
"data-state": t.current,
|
|
52
|
+
...w,
|
|
53
|
+
children: /* @__PURE__ */ e("div", { ref: I, className: "n-search-container", children: [
|
|
54
|
+
t.current === "ask" && /* @__PURE__ */ e(F, { query: k, setModalState: p }),
|
|
55
|
+
t.current === "search" && /* @__PURE__ */ e(Q, { children: [
|
|
56
|
+
/* @__PURE__ */ e(
|
|
57
|
+
O,
|
|
58
|
+
{
|
|
59
|
+
setSearchTerm: g.setSearchTerm,
|
|
60
|
+
setAskNetlifyQuery: v,
|
|
61
|
+
initialValue: n.searchTerm
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e(
|
|
65
|
+
M,
|
|
66
|
+
{
|
|
67
|
+
setModalState: p,
|
|
68
|
+
searchLoading: n.isLoading,
|
|
69
|
+
searchTerm: n.searchTerm,
|
|
70
|
+
results: n.results,
|
|
71
|
+
children: T
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ e("div", { className: "n-search-footer", children: [
|
|
75
|
+
/* @__PURE__ */ e("p", { className: "n-search-footer-tip", children: [
|
|
76
|
+
/* @__PURE__ */ e(h, { keyNames: ["Esc"] }),
|
|
77
|
+
"to closed"
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ e("p", { className: "n-search-footer-tip", children: [
|
|
80
|
+
/* @__PURE__ */ e(h, { keyNames: ["Tab"] }),
|
|
81
|
+
/* @__PURE__ */ e("span", { children: "or" }),
|
|
82
|
+
/* @__PURE__ */ e(h, { keyNames: ["↑", "↓"] }),
|
|
83
|
+
"to navigate"
|
|
84
|
+
] })
|
|
85
|
+
] })
|
|
86
|
+
] })
|
|
57
87
|
] })
|
|
58
|
-
|
|
59
|
-
|
|
88
|
+
}
|
|
89
|
+
);
|
|
60
90
|
}
|
|
61
91
|
export {
|
|
62
|
-
|
|
92
|
+
Z as default
|
|
63
93
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as e } from "../../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { D as a } from "../../../../../chunks/compat.module.
|
|
2
|
+
import { D as a } from "../../../../../chunks/compat.module.BNbXPLVY.js";
|
|
3
3
|
import o from "../../../Icon/index.js";
|
|
4
4
|
import '../../../../../assets/SearchToggle.css';const s = a(function(r, t) {
|
|
5
5
|
return /* @__PURE__ */ e("button", { id: r.id, ref: t, class: "n-search-toggle button", disabled: !0, "data-ntl-search-toggle": !0, children: [
|
|
@@ -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;
|
|
@@ -1,48 +1,64 @@
|
|
|
1
1
|
import { u as e } from "../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
-
import { T as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { T as m } from "../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
3
|
+
import o from "./SearchHeading/SearchHeading.js";
|
|
4
|
+
import c from "./SearchLink/SearchLink.js";
|
|
5
|
+
import { Fragment as s } from "preact";
|
|
6
|
+
const h = (n) => {
|
|
7
|
+
const r = document.documentElement;
|
|
8
|
+
n === "" ? (r.removeAttribute("data-theme"), localStorage.removeItem("theme")) : (r.setAttribute("data-theme", n), localStorage.setItem("theme", n));
|
|
9
|
+
}, d = ({
|
|
10
|
+
searchLoading: n,
|
|
7
11
|
searchTerm: r,
|
|
8
|
-
results:
|
|
12
|
+
results: t
|
|
9
13
|
}) => {
|
|
10
|
-
if (
|
|
11
|
-
return /* @__PURE__ */ e(
|
|
14
|
+
if (n)
|
|
15
|
+
return /* @__PURE__ */ e(o, { children: [
|
|
12
16
|
"Searching for ",
|
|
13
17
|
/* @__PURE__ */ e("span", { className: "n-search-term", children: r }),
|
|
14
18
|
" ..."
|
|
15
19
|
] });
|
|
16
|
-
if (!
|
|
17
|
-
return /* @__PURE__ */ e(
|
|
20
|
+
if (!t || t.length === 0)
|
|
21
|
+
return /* @__PURE__ */ e(o, { children: [
|
|
18
22
|
"0 results for ",
|
|
19
23
|
/* @__PURE__ */ e("span", { className: "n-search-term", children: r })
|
|
20
24
|
] });
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ e("ul", { className: "n-results-list", role: "list", children:
|
|
25
|
+
const i = m(() => t.map((l, a) => /* @__PURE__ */ e("li", { className: "n-results-list-item", children: /* @__PURE__ */ e(c, { ...l }) }, a)), [t]);
|
|
26
|
+
return /* @__PURE__ */ e("ul", { className: "n-results-list", role: "list", children: i });
|
|
23
27
|
};
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
function b({
|
|
29
|
+
setModalState: n,
|
|
30
|
+
searchLoading: r,
|
|
31
|
+
searchTerm: t,
|
|
32
|
+
results: i,
|
|
28
33
|
children: l
|
|
29
34
|
}) {
|
|
30
|
-
return /* @__PURE__ */ e("div", { className: "n-search-window", children: /* @__PURE__ */ e("div", { className: "search-links", children: [
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
return /* @__PURE__ */ e("div", { className: "n-search-window", children: /* @__PURE__ */ e("div", { className: "search-links", children: t && t.length > 1 ? /* @__PURE__ */ e(d, { searchLoading: r, searchTerm: t, results: i }) : l ? /* @__PURE__ */ e(s, { children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
c,
|
|
38
|
+
{
|
|
39
|
+
as: "button",
|
|
40
|
+
icon: "netlify",
|
|
41
|
+
label: "Ask Netlify AI",
|
|
42
|
+
onClick: () => {
|
|
43
|
+
n({ current: "ask" });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
l,
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
c,
|
|
38
50
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
as: "button",
|
|
52
|
+
icon: "netlify",
|
|
53
|
+
label: "Toggle theme",
|
|
54
|
+
onClick: () => {
|
|
55
|
+
const a = document.documentElement.getAttribute("data-theme");
|
|
56
|
+
h(a === "dark" ? "light" : "dark");
|
|
57
|
+
}
|
|
42
58
|
}
|
|
43
|
-
)
|
|
44
|
-
] }) });
|
|
59
|
+
)
|
|
60
|
+
] }) : null }) });
|
|
45
61
|
}
|
|
46
62
|
export {
|
|
47
|
-
|
|
63
|
+
b as default
|
|
48
64
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
import { y as f } from "../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
2
|
+
function k(r, t, o, c) {
|
|
3
|
+
f(() => {
|
|
4
4
|
if (!r) return;
|
|
5
5
|
const u = (e) => {
|
|
6
6
|
if (o) {
|
|
@@ -12,8 +12,8 @@ function s(r, t, o, c) {
|
|
|
12
12
|
e.preventDefault();
|
|
13
13
|
const d = t.current;
|
|
14
14
|
if (!d) return;
|
|
15
|
-
const n = Array.from(d.querySelectorAll("
|
|
16
|
-
n[
|
|
15
|
+
const n = Array.from(d.querySelectorAll(".n-search-link")), y = n.findIndex((l) => l === document.activeElement), i = e.key === "ArrowDown" ? (y + 1) % n.length : (y - 1 + n.length) % n.length;
|
|
16
|
+
n[i].focus();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
};
|
|
@@ -21,5 +21,5 @@ function s(r, t, o, c) {
|
|
|
21
21
|
}, [r, t, o, c]);
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
k as useKeyboardNav
|
|
25
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as g, A as w } from "../../../../chunks/hooks.module.
|
|
2
|
-
import { u as S } from "../../../../chunks/useTimeout.
|
|
1
|
+
import { d as g, A as w } from "../../../../chunks/hooks.module.DGkdD5n9.js";
|
|
2
|
+
import { u as S } from "../../../../chunks/useTimeout.Cq4aqnDe.js";
|
|
3
3
|
function x() {
|
|
4
4
|
const [l, r] = g({
|
|
5
5
|
searchTerm: "",
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { ComponentChildren } from 'preact';
|
|
2
2
|
import { IconName } from '../../Icon';
|
|
3
3
|
export interface SearchLinkProps {
|
|
4
|
+
as?: any;
|
|
4
5
|
icon: IconName;
|
|
5
6
|
label: string;
|
|
6
7
|
resource?: 'blog' | 'changelog' | 'docs' | 'guide';
|
|
7
|
-
url
|
|
8
|
+
url?: string;
|
|
8
9
|
excerpt?: string;
|
|
10
|
+
onClick?: () => void;
|
|
9
11
|
}
|
|
10
12
|
export interface SearchWindowProps {
|
|
13
|
+
setModalState: (e: {
|
|
14
|
+
current: string;
|
|
15
|
+
}) => void;
|
|
11
16
|
searchLoading: boolean;
|
|
12
17
|
searchTerm?: string;
|
|
13
18
|
results?: SearchLinkProps[];
|
|
@@ -4,5 +4,6 @@ export { default as Icon } from './Icon';
|
|
|
4
4
|
export { default as SearchLink } from './SearchModal/components/SearchLink/SearchLink';
|
|
5
5
|
export { default as SearchHeading } from './SearchModal/components/SearchHeading/SearchHeading';
|
|
6
6
|
export { default as SearchToggle } from './SearchModal/components/SearchToggle/SearchToggle';
|
|
7
|
+
export { default as AskNetlify } from './AskNetlify/AskNetlify';
|
|
7
8
|
export { SearchModal } from './SearchModal';
|
|
8
9
|
export { type IconName } from './Icon';
|
|
@@ -3,16 +3,18 @@ import { default as d } from "./Modal/Modal.js";
|
|
|
3
3
|
import { default as m } from "./Icon/index.js";
|
|
4
4
|
import { default as s } from "./SearchModal/components/SearchLink/SearchLink.js";
|
|
5
5
|
import { default as x } from "./SearchModal/components/SearchHeading/SearchHeading.js";
|
|
6
|
-
import { default as
|
|
6
|
+
import { default as i } from "./SearchModal/components/SearchToggle/SearchToggle.js";
|
|
7
|
+
import { default as S } from "./AskNetlify/AskNetlify.js";
|
|
7
8
|
import "preact";
|
|
8
|
-
import "../../chunks/hooks.module.
|
|
9
|
-
import { default as
|
|
9
|
+
import "../../chunks/hooks.module.DGkdD5n9.js";
|
|
10
|
+
import { default as n } from "./SearchModal/components/SearchModal/SearchModal.js";
|
|
10
11
|
export {
|
|
12
|
+
S as AskNetlify,
|
|
11
13
|
m as Icon,
|
|
12
14
|
t as KeyboardKey,
|
|
13
15
|
d as Modal,
|
|
14
16
|
x as SearchHeading,
|
|
15
17
|
s as SearchLink,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
n as SearchModal,
|
|
19
|
+
i as SearchToggle
|
|
18
20
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleThemeChange: (value: "dark" | "light" | "") => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/spark-ui",
|
|
3
3
|
"description": "Assets, design tokens, components, and utilities",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/components/preact/index.js",
|
|
7
7
|
"types": "dist/components/preact/index.d.ts",
|
|
@@ -33,9 +33,11 @@
|
|
|
33
33
|
"./analytics": "./packages/analytics/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@kapaai/react-sdk": "^0.1.2",
|
|
36
37
|
"@preact/preset-vite": "^2.10.1",
|
|
37
38
|
"@shikijs/transformers": "^3.3.0",
|
|
38
39
|
"glob": "^11.0.1",
|
|
40
|
+
"marked": "^15.0.11",
|
|
39
41
|
"preact": "^10.26.4",
|
|
40
42
|
"vite": "^6.2.5",
|
|
41
43
|
"vite-plugin-dts": "^4.5.3",
|
|
@@ -64,4 +66,4 @@
|
|
|
64
66
|
"prettier": "^3.5.3",
|
|
65
67
|
"prettier-plugin-astro": "^0.14.1"
|
|
66
68
|
}
|
|
67
|
-
}
|
|
69
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Code } from 'astro:components';
|
|
3
3
|
import '../styles/code-block.css';
|
|
4
|
-
import poimandresTheme from '
|
|
4
|
+
import poimandresTheme from '../../themes/poimandres.json';
|
|
5
5
|
import {
|
|
6
6
|
transformerMetaHighlight,
|
|
7
7
|
transformerNotationDiff,
|
|
@@ -6,4 +6,5 @@ export { default as SearchLink } from './preact/SearchModal/components/SearchLin
|
|
|
6
6
|
export { default as SearchHeading } from './preact/SearchModal/components/SearchHeading/SearchHeading';
|
|
7
7
|
export { default as SearchToggle } from './preact/SearchModal/components/SearchToggle/SearchToggle';
|
|
8
8
|
export { default as SearchModal } from './preact/SearchModal/components/SearchModal/SearchModal';
|
|
9
|
+
export { default as ChatApp } from './preact/ChatApp/ChatApp';
|
|
9
10
|
export { type IconName } from './preact/Icon';
|