@@ -67,7 +67,7 @@ const FeatureTabsLeft = (layout) => {
className={clsx(
'font-display text-lg [&:not(:focus-visible)]:focus:outline-none',
selectedIndex === featureIndex
- ? 'text-white dark:text-slate-200 hover:text-white group-hover:text-white dark:hover:text-slate-300 lg:dark:hover:text-slate-200'
+ ? 'text-white hover:text-white group-hover:text-white dark:text-slate-200 dark:hover:text-slate-300 lg:dark:hover:text-slate-200'
: 'text-slate-800 hover:text-white group-hover:text-white dark:hover:text-slate-200',
)}
>
@@ -77,9 +77,9 @@ const FeatureTabsLeft = (layout) => {
@@ -93,7 +93,7 @@ const FeatureTabsLeft = (layout) => {
{features.map((feature) => (
-
+
{feature.featureDescription}
diff --git a/components/FeatureTabsTop.jsx b/components/FeatureTabsTop.jsx
index 025e645..57faa19 100644
--- a/components/FeatureTabsTop.jsx
+++ b/components/FeatureTabsTop.jsx
@@ -11,9 +11,9 @@ function Feature({ feature, isActive, className, ...props }) {
{feature.featureSubtitle}
-
+
{feature.name}
@@ -75,7 +75,7 @@ function FeaturesDesktop({ features }) {
feature={{
...feature,
name: (
-
+
{feature.name}
@@ -86,7 +86,7 @@ function FeaturesDesktop({ features }) {
/>
))}
-
+
{features.map((feature, featureIndex) => (
))}
-
+
>
)}
diff --git a/components/FieldTypesList.jsx b/components/FieldTypesList.jsx
index 87e6c52..fcad51b 100644
--- a/components/FieldTypesList.jsx
+++ b/components/FieldTypesList.jsx
@@ -26,10 +26,10 @@ export function FieldTypesList({ data }) {
{contentNodes.nodes.map((fieldType) => (
-
-
+
+
{fieldType?.featuredImage?.node && (
{
-
+
@@ -52,11 +52,11 @@ const HomepageLayoutsLayoutsFaqs = ({ title, description, questions }) => {
{column.map((faq, faqIndex) => (
-
-
+
{faq.question}
diff --git a/components/HomepageLayoutsLayoutsHero.jsx b/components/HomepageLayoutsLayoutsHero.jsx
index 303b441..868c4c3 100644
--- a/components/HomepageLayoutsLayoutsHero.jsx
+++ b/components/HomepageLayoutsLayoutsHero.jsx
@@ -18,13 +18,13 @@ function TrafficLightsIcon(props) {
const HomepageLayoutsLayoutsHero = (hero) => {
return (
-
+
{
-
+
@@ -55,7 +55,7 @@ const HomepageLayoutsLayoutsHero = (hero) => {
key={hero?.codeFileName || 'query-acf-fields.gql'}
className="flex h-6 rounded-full bg-gradient-to-r from-orange-400/30 via-orange-400 to-orange-400/30 p-px font-medium text-orange-300"
>
-
+
{hero?.codeFileName || null}
diff --git a/components/HomepageLayoutsLayoutsSupportedFieldTypes.jsx b/components/HomepageLayoutsLayoutsSupportedFieldTypes.jsx
index 1874925..997d79c 100644
--- a/components/HomepageLayoutsLayoutsSupportedFieldTypes.jsx
+++ b/components/HomepageLayoutsLayoutsSupportedFieldTypes.jsx
@@ -151,17 +151,17 @@ const HomepageLayoutsLayoutsSupportedFieldTypes = (data) => {
{data.title}
diff --git a/components/Layout.jsx b/components/Layout.jsx
index bc28e7b..3c2f0c7 100644
--- a/components/Layout.jsx
+++ b/components/Layout.jsx
@@ -126,123 +126,125 @@ export function Layout({ data, children, toc, title }) {
<>
-
-
-
-
-
-
-
+
+
-
-
- {(title || section) && (
-
- {section && (
-
- {section.title}
-
- )}
- {title && (
-
- {title}
-
- )}
-
- )}
- {children}
-
-
- {previousPage && (
-
-
-
- Previous
-
- -
-
- ← {previousPage.title}
-
-
-
- )}
- {nextPage && (
-
-
-
- Next
-
-
-
-
+
+ {(title || section) && (
+
+ {section && (
+
+ {section.title}
+
+ )}
+ {title && (
+
+ {title}
+
+ )}
+
+ )}
+ {children}
+
+
+ {previousPage && (
+
+
-
+ Previous
+
+ -
+
+ ← {previousPage.title}
+
+
+
+ )}
+ {nextPage && (
+
+
-
+ Next
+
+ -
+
+ {nextPage.title} →
+
+
+
+ )}
+
+
+
+
- )}
-
-
-
-
+ On this page
+
+
+ {tableOfContents.map((section) => (
+ -
+
+
+ {section.title}
+
+
+ {section.children.length > 0 && (
+
+ {section.children.map((subSection) => (
+ -
+
+ {subSection.title}
+
+
+ ))}
+
+ )}
+
+ ))}
+
+ >
+ )}
+
+
-
+
>
diff --git a/components/LayoutArchive.jsx b/components/LayoutArchive.jsx
index f42a876..e4d219e 100644
--- a/components/LayoutArchive.jsx
+++ b/components/LayoutArchive.jsx
@@ -54,38 +54,40 @@ export function LayoutArchive({ data, children, title }) {
return (
<>
-
-
-
-
-
-
-
+
+
+
+
+
+ {(title || section) && (
+
+ {section && (
+
+ {section.title}
+
+ )}
+ {title && (
+
+ {title}
+
+ )}
+
+ )}
+ {children}
+
-
-
- {(title || section) && (
-
- {section && (
-
- {section.title}
-
- )}
- {title && (
-
- {title}
-
- )}
-
- )}
- {children}
-
-
-
+
>
)
diff --git a/components/LayoutFrontPage.jsx b/components/LayoutFrontPage.jsx
index 5421b58..0bf1238 100644
--- a/components/LayoutFrontPage.jsx
+++ b/components/LayoutFrontPage.jsx
@@ -37,7 +37,9 @@ export function LayoutFrontPage({ data, children }) {
return (
<>
- {children}
+
+ {children}
+
>
)
diff --git a/components/Search.jsx b/components/Search.jsx
index d23fbc2..dd88c95 100644
--- a/components/Search.jsx
+++ b/components/Search.jsx
@@ -1,296 +1,120 @@
-/* eslint-disable */
-import { useEffect, useId, useState, forwardRef, useRef, Fragment } from 'react'
-import { useRouter } from 'next/router'
-import { createAutocomplete } from '@algolia/autocomplete-core'
-import { Dialog } from '@headlessui/react'
+import { DocSearchModal } from "@docsearch/react";
import clsx from 'clsx'
-import Highlighter from 'react-highlight-words'
+import Head from 'next/head'
+import Link from 'next/link'
+import { useRouter } from "next/router";
+import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
+import { createPortal } from "react-dom";
-function SearchIcon(props) {
- return (
-
- )
-}
+import { SearchIcon } from '@/components/icons/SearchIcon';
+import '@docsearch/css/dist/style.css';
-function useAutocomplete() {
- let id = useId()
- let router = useRouter()
- let [autocompleteState, setAutocompleteState] = useState({})
+const INDEX_NAME = 'wpgraphql';
+const API_KEY = '0c11d662dad18e8a18d20c969b25c65f';
+const APP_ID = 'HB50HVJDY8';
- let [autocomplete] = useState(() =>
- createAutocomplete({
- id,
- placeholder: 'Find something...',
- defaultActiveItemId: 0,
- onStateChange({ state }) {
- setAutocompleteState(state)
- },
- shouldPanelOpen({ state }) {
- return state.query !== ''
- },
- getSources({ query }) {
- return import('@/markdoc/search.mjs').then(({ search }) => {
- return [
- {
- sourceId: 'documentation',
- getItems() {
- return search(query, { limit: 5 })
- },
- getItemUrl({ item }) {
- return item.url
- },
- onSelect({ itemUrl }) {
- router.push(itemUrl)
- },
- },
- ]
- })
- },
- }),
- )
+const SearchContext = createContext();
- return { autocomplete, autocompleteState }
-}
+export function SearchProvider({ children }) {
+ const router = useRouter();
+ const [isOpen, setIsOpen] = useState(false)
+ const [initialQuery, setInitialQuery] = useState(null)
+ const [initialScrollY, setInitialScrollY] = useState(null);
-function LoadingIcon(props) {
- let id = useId()
+ const onOpen = useCallback(() => {
+ setIsOpen(true);
+ }, [setIsOpen]);
- return (
-
- )
-}
+ const onClose = useCallback(() => {
+ setIsOpen(false)
+ }, [setIsOpen])
-function HighlightQuery({ text, query }) {
- return (
-
- )
-}
-
-function SearchResult({ result, autocomplete, collection, query }) {
- // let id = useId()
-
- // let sectionTitle = navigation?.find((section) =>
- // section.links.find((link) => link.href === result.url.split('#')[0]),
- // )?.title
- // let hierarchy = [sectionTitle, result.pageTitle].filter(Boolean)
+ const onInput = useCallback((e) => {
+ setIsOpen(true)
+ setInitialQuery(e.key)
+ }, [setIsOpen, setInitialQuery])
- return <>test>
-}
+ useEffect(() => {
+ if (typeof window !== 'undefined') {
+ setInitialScrollY(window.scrollY);
+ }
+ }, []);
-function SearchResults({ autocomplete, query, collection }) {
- if (collection.items.length === 0) {
- return (
-
- No results for “
-
- {query}
-
- ”
-
- )
- }
+ useDocSearchKeyboardEvents({
+ isOpen,
+ onOpen,
+ onClose
+ })
return (
-
- {collection.items.map((result) => (
-
- ))}
-
+ <>
+
+
+
+
+ {children}
+
+ {isOpen && createPortal(
+
, document.body
+ )}
+ >
)
}
-const SearchInput = forwardRef(function SearchInput(
- { autocomplete, autocompleteState, onClose },
- inputRef,
-) {
- let inputProps = autocomplete.getInputProps({})
-
+function Hit({ hit, children }) {
return (
-
-
-
{
- if (
- event.key === 'Escape' &&
- !autocompleteState.isOpen &&
- autocompleteState.query === ''
- ) {
- // In Safari, closing the dialog with the escape key can sometimes cause the scroll position to jump to the
- // bottom of the page. This is a workaround for that until we can figure out a proper fix in Headless UI.
- document.activeElement?.blur()
-
- onClose()
- } else {
- inputProps.onKeyDown(event)
- }
- }}
- />
- {autocompleteState.status === 'stalled' && (
-
-
-
- )}
-
+
+
+ {children}
+
+
)
-})
-
-function SearchDialog({ open, setOpen, className }) {
- let router = useRouter()
- let formRef = useRef()
- let panelRef = useRef()
- let inputRef = useRef()
- let { autocomplete, autocompleteState } = useAutocomplete()
-
- useEffect(() => {
- if (!open) {
- return
- }
-
- function onRouteChange() {
- setOpen(false)
- }
-
- router.events.on('routeChangeStart', onRouteChange)
- router.events.on('hashChangeStart', onRouteChange)
+}
- return () => {
- router.events.off('routeChangeStart', onRouteChange)
- router.events.off('hashChangeStart', onRouteChange)
- }
- }, [open, setOpen, router])
+export function Search({ ...props }) {
+ let [modifierKey, setModifierKey] = useState()
+ let searchButtonRef = useRef()
+ let { onOpen, onInput } = useContext(SearchContext)
useEffect(() => {
- if (open) {
- return
- }
-
function onKeyDown(event) {
- if (event.key === 'k' && (event.metaKey || event.ctrlKey)) {
- event.preventDefault()
- setOpen(true)
+ if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {
+ if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {
+ onInput(event)
+ }
}
}
-
window.addEventListener('keydown', onKeyDown)
-
return () => {
window.removeEventListener('keydown', onKeyDown)
}
- }, [open, setOpen])
-
- return (
-
- )
-}
-
-function useSearchProps() {
- let buttonRef = useRef()
- let [open, setOpen] = useState(false)
-
- return {
- buttonProps: {
- ref: buttonRef,
- onClick() {
- setOpen(true)
- },
- },
- dialogProps: {
- open,
- setOpen(open) {
- let { width, height } = buttonRef.current.getBoundingClientRect()
- if (!open || (width !== 0 && height !== 0)) {
- setOpen(open)
- }
- },
- },
- }
-}
-
-export function Search() {
- let [modifierKey, setModifierKey] = useState()
- let { buttonProps, dialogProps } = useSearchProps()
+ }, [onInput, searchButtonRef])
useEffect(() => {
setModifierKey(
@@ -299,13 +123,14 @@ export function Search() {
}, [])
return (
- <>
-
+ )
+}
+
+function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose }) {
+ useEffect(() => {
+ function onKeyDown(event) {
+ function open() {
+ // We check that no other DocSearch modal is showing before opening
+ // another one.
+ if (!document.body.classList.contains('DocSearch--active')) {
+ onOpen()
+ }
+ }
+
+ if (
+ (event.keyCode === 27 && isOpen) ||
+ (event.key === 'k' && (event.metaKey || event.ctrlKey)) ||
+ (!isEditingContent(event) && event.key === '/' && !isOpen)
+ ) {
+ event.preventDefault()
+
+ if (isOpen) {
+ onClose()
+ } else if (!document.body.classList.contains('DocSearch--active')) {
+ open()
+ }
+ }
+ }
+
+ window.addEventListener('keydown', onKeyDown)
+ return () => {
+ window.removeEventListener('keydown', onKeyDown)
+ }
+ }, [isOpen, onOpen, onClose])
+}
+
+function isEditingContent(event) {
+ let element = event.target
+ let tagName = element.tagName
+ return (
+ element.isContentEditable ||
+ tagName === 'INPUT' ||
+ tagName === 'SELECT' ||
+ tagName === 'TEXTAREA'
)
}
diff --git a/components/SiteFooter.jsx b/components/SiteFooter.jsx
index 4ceea01..2d8b25c 100644
--- a/components/SiteFooter.jsx
+++ b/components/SiteFooter.jsx
@@ -9,7 +9,7 @@ export function SiteFooter({ navigation }) {
© 2023 WPGraphQL. All rights reserved. | Development sponsored by WP Engine
-
diff --git a/components/SiteHeader.jsx b/components/SiteHeader.jsx
index 82a33f1..a69ac51 100644
--- a/components/SiteHeader.jsx
+++ b/components/SiteHeader.jsx
@@ -36,16 +36,18 @@ export function SiteHeader({ navigation }) {
-
-
-
+
-
+
+
+
+ )
+}
diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx
index 37687c1..0fe3291 100644
--- a/components/ui/badge.tsx
+++ b/components/ui/badge.tsx
@@ -4,16 +4,16 @@ import * as React from 'react'
import { cn } from '@/lib/utils'
const badgeVariants = cva(
- 'inline-flex items-center border rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
+ 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
{
variants: {
variant: {
default:
- 'bg-primary hover:bg-primary/80 border-transparent text-primary-foreground',
+ 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
secondary:
- 'bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground',
+ 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
destructive:
- 'bg-destructive hover:bg-destructive/80 border-transparent text-destructive-foreground',
+ 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
outline: 'text-foreground',
},
},
diff --git a/components/ui/button.tsx b/components/ui/button.tsx
index 7cb6e2d..d69fe22 100644
--- a/components/ui/button.tsx
+++ b/components/ui/button.tsx
@@ -5,7 +5,7 @@ import * as React from 'react'
import { cn } from '@/lib/utils'
const buttonVariants = cva(
- 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background',
+ 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
@@ -17,12 +17,12 @@ const buttonVariants = cva(
secondary:
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
- link: 'underline-offset-4 hover:underline text-primary',
+ link: 'text-primary underline-offset-4 hover:underline',
},
size: {
- default: 'h-10 py-2 px-4',
- sm: 'h-9 px-3 rounded-md',
- lg: 'h-11 px-8 rounded-md',
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
},
},
defaultVariants: {
diff --git a/package-lock.json b/package-lock.json
index 71dbd4d..4174ccc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,8 @@
"dependencies": {
"@algolia/autocomplete-core": "^1.9.2",
"@apollo/client": "^3.7.7",
+ "@docsearch/css": "^3.5.2",
+ "@docsearch/react": "^3.5.2",
"@faustwp/blocks": "^2.0.0",
"@faustwp/cli": "^1.1.4",
"@faustwp/core": "^1.1.2",
@@ -76,6 +78,7 @@
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
+ "eslint-plugin-tailwindcss": "^3.13.0",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.5"
@@ -110,6 +113,27 @@
"search-insights": ">= 1 < 3"
}
},
+ "node_modules/@algolia/autocomplete-preset-algolia": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz",
+ "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==",
+ "dependencies": {
+ "@algolia/autocomplete-shared": "1.9.3"
+ },
+ "peerDependencies": {
+ "@algolia/client-search": ">= 4.9.1 < 6",
+ "algoliasearch": ">= 4.9.1 < 6"
+ }
+ },
+ "node_modules/@algolia/autocomplete-preset-algolia/node_modules/@algolia/autocomplete-shared": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz",
+ "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==",
+ "peerDependencies": {
+ "@algolia/client-search": ">= 4.9.1 < 6",
+ "algoliasearch": ">= 4.9.1 < 6"
+ }
+ },
"node_modules/@algolia/autocomplete-shared": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.11.1.tgz",
@@ -2325,6 +2349,71 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
+ "node_modules/@docsearch/css": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz",
+ "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA=="
+ },
+ "node_modules/@docsearch/react": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz",
+ "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==",
+ "dependencies": {
+ "@algolia/autocomplete-core": "1.9.3",
+ "@algolia/autocomplete-preset-algolia": "1.9.3",
+ "@docsearch/css": "3.5.2",
+ "algoliasearch": "^4.19.1"
+ },
+ "peerDependencies": {
+ "@types/react": ">= 16.8.0 < 19.0.0",
+ "react": ">= 16.8.0 < 19.0.0",
+ "react-dom": ">= 16.8.0 < 19.0.0",
+ "search-insights": ">= 1 < 3"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ },
+ "search-insights": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-core": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz",
+ "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==",
+ "dependencies": {
+ "@algolia/autocomplete-plugin-algolia-insights": "1.9.3",
+ "@algolia/autocomplete-shared": "1.9.3"
+ }
+ },
+ "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-plugin-algolia-insights": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz",
+ "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==",
+ "dependencies": {
+ "@algolia/autocomplete-shared": "1.9.3"
+ },
+ "peerDependencies": {
+ "search-insights": ">= 1 < 3"
+ }
+ },
+ "node_modules/@docsearch/react/node_modules/@algolia/autocomplete-shared": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz",
+ "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==",
+ "peerDependencies": {
+ "@algolia/client-search": ">= 4.9.1 < 6",
+ "algoliasearch": ">= 4.9.1 < 6"
+ }
+ },
"node_modules/@emotion/is-prop-valid": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
@@ -6706,6 +6795,22 @@
"semver": "bin/semver.js"
}
},
+ "node_modules/eslint-plugin-tailwindcss": {
+ "version": "3.13.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.13.0.tgz",
+ "integrity": "sha512-Fcep4KDRLWaK3KmkQbdyKHG0P4GdXFmXdDaweTIPcgOP60OOuWFbh1++dufRT28Q4zpKTKaHwTsXPJ4O/EjU2Q==",
+ "dev": true,
+ "dependencies": {
+ "fast-glob": "^3.2.5",
+ "postcss": "^8.4.4"
+ },
+ "engines": {
+ "node": ">=12.13.0"
+ },
+ "peerDependencies": {
+ "tailwindcss": "^3.3.2"
+ }
+ },
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
diff --git a/package.json b/package.json
index a803c6b..ff4b765 100644
--- a/package.json
+++ b/package.json
@@ -14,6 +14,8 @@
"dependencies": {
"@algolia/autocomplete-core": "^1.9.2",
"@apollo/client": "^3.7.7",
+ "@docsearch/css": "^3.5.2",
+ "@docsearch/react": "^3.5.2",
"@faustwp/blocks": "^2.0.0",
"@faustwp/cli": "^1.1.4",
"@faustwp/core": "^1.1.2",
@@ -82,6 +84,7 @@
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
+ "eslint-plugin-tailwindcss": "^3.13.0",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.5"
diff --git a/pages/_app.js b/pages/_app.js
index ab3b4e8..db9453d 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -8,24 +8,27 @@ import React from 'react'
import 'focus-visible'
import '@/styles/tailwind.css'
// import '../globalStylesheet.css'
+import { SearchProvider } from '@/components/Search'
import blocks from '@/wp-blocks'
export default function MyApp({ Component, pageProps }) {
const router = useRouter()
return (
-
-
-
- {router.pathname === '/' ? (
- WPGraphQL
- ) : (
- {`${pageProps?.title} - WPGraphQL`}
- )}
-
-
-
-
-
+
+
+
+
+ {router.pathname === '/' ? (
+ WPGraphQL
+ ) : (
+ {`${pageProps?.title} - WPGraphQL`}
+ )}
+
+
+
+
+
+
)
}