diff --git a/.changeset/calm-buckets-perform.md b/.changeset/calm-buckets-perform.md deleted file mode 100644 index f9d1a8a96..000000000 --- a/.changeset/calm-buckets-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@faustwp/core': patch ---- - -Fixed an issue where persisted queries were not being enabled properly when setting the `usePersistedQueries` flag. diff --git a/.changeset/funny-starfishes-melt.md b/.changeset/funny-starfishes-melt.md deleted file mode 100644 index c3dfaa14c..000000000 --- a/.changeset/funny-starfishes-melt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@faustwp/core": patch ---- - -Fixed bug where the "Edit Post" link was missing in the Faust Toolbar diff --git a/.changeset/poor-dragons-help.md b/.changeset/poor-dragons-help.md deleted file mode 100644 index 03089ff7c..000000000 --- a/.changeset/poor-dragons-help.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@faustwp/core': patch ---- - -Improved keyboard navigation within Toolbar menus, allowing for dropdowns to be toggled open with "enter" - -Note that the `ToolbarItem` component no longer uses the prop `handleClick`, instead relying on pass-through props in order to separate the click event from the the key event. - -```jsx - - Log Out - -``` diff --git a/.changeset/quiet-llamas-play.md b/.changeset/quiet-llamas-play.md deleted file mode 100644 index 5242e89d7..000000000 --- a/.changeset/quiet-llamas-play.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@faustwp/experimental-app-router': patch ---- - -Introduced a new API handler for App router projects called `faustRouteHandler`. It can be used by creating a file `/app/api/faust/[route]/route.js` with the following contents: - -```js -// /app/api/faust/[route]/route.js -import { faustRouteHandler } from '@faustwp/experimental-app-router'; - -const { GET, POST } = faustRouteHandler; - -export { GET, POST }; -``` diff --git a/.changeset/two-onions-live.md b/.changeset/two-onions-live.md deleted file mode 100644 index 862aac4e8..000000000 --- a/.changeset/two-onions-live.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -'@faustwp/experimental-app-router': patch ---- - -Created `getAuthClient` for making authenticated server side requests in the Next.js App Router. It can be used like: - -```js -import { getAuthClient } from '@faustwp/experimental-app-router'; - -// app/my-account/posts/page.js -export default async function Page() { - const client = await getAuthClient(); - - if (!client) { - return <>You must be authenticated to view this page!; - } - - const { data } = await client.query({ - query: gql` - query GetMyPosts { - viewer { - posts { - nodes { - id - title - } - } - } - } - `, - }); - - return( - <> -

My posts

- - - ) -``` - -**Note:** Our login/logout utils are still in the works. diff --git a/examples/next/app-router/package.json b/examples/next/app-router/package.json index c9f3cc273..c426d4043 100644 --- a/examples/next/app-router/package.json +++ b/examples/next/app-router/package.json @@ -12,8 +12,8 @@ "dependencies": { "@apollo/client": "^3.8.0", "@faustwp/cli": "1.1.1", - "@faustwp/core": "1.1.1", - "@faustwp/experimental-app-router": "^0.0.2", + "@faustwp/core": "1.1.2", + "@faustwp/experimental-app-router": "^0.0.3", "@apollo/experimental-nextjs-app-support": "^0.4.1", "graphql": "^16.7.1", "next": "^13.4.13", diff --git a/examples/next/faustwp-getting-started/package.json b/examples/next/faustwp-getting-started/package.json index e50462096..23c7b6b77 100644 --- a/examples/next/faustwp-getting-started/package.json +++ b/examples/next/faustwp-getting-started/package.json @@ -12,7 +12,7 @@ "dependencies": { "@apollo/client": "^3.6.6", "@faustwp/cli": "1.1.1", - "@faustwp/core": "1.1.1", + "@faustwp/core": "1.1.2", "@wordpress/base-styles": "^4.26.0", "@wordpress/block-library": "^7.19.0", "classnames": "^2.3.1", diff --git a/packages/experimental-app-router/CHANGELOG.md b/packages/experimental-app-router/CHANGELOG.md index 7fbcd2357..7c12dc8d9 100644 --- a/packages/experimental-app-router/CHANGELOG.md +++ b/packages/experimental-app-router/CHANGELOG.md @@ -1,5 +1,67 @@ # @faustwp/experimental-app-router +## 0.0.3 + +### Patch Changes + +- a1b6fc0: Introduced a new API handler for App router projects called `faustRouteHandler`. It can be used by creating a file `/app/api/faust/[route]/route.js` with the following contents: + + ```js + // /app/api/faust/[route]/route.js + import { faustRouteHandler } from '@faustwp/experimental-app-router'; + + const { GET, POST } = faustRouteHandler; + + export { GET, POST }; + ``` + +- a1b6fc0: Created `getAuthClient` for making authenticated server side requests in the Next.js App Router. It can be used like: + + ```js + import { getAuthClient } from '@faustwp/experimental-app-router'; + + // app/my-account/posts/page.js + export default async function Page() { + const client = await getAuthClient(); + + if (!client) { + return <>You must be authenticated to view this page!; + } + + const { data } = await client.query({ + query: gql` + query GetMyPosts { + viewer { + posts { + nodes { + id + title + } + } + } + } + `, + }); + + return( + <> +

My posts

+ + + ) + ``` + + **Note:** Our login/logout utils are still in the works. + +- Updated dependencies [a419252] +- Updated dependencies [cf887d3] +- Updated dependencies [795d956] + - @faustwp/core@1.1.2 + ## 0.0.2 ### Patch Changes diff --git a/packages/experimental-app-router/package.json b/packages/experimental-app-router/package.json index bb1b28554..ffb7d6171 100644 --- a/packages/experimental-app-router/package.json +++ b/packages/experimental-app-router/package.json @@ -1,6 +1,6 @@ { "name": "@faustwp/experimental-app-router", - "version": "0.0.2", + "version": "0.0.3", "description": "Experimental: A Faust package to support Next.js' App Router", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", @@ -40,7 +40,7 @@ "@apollo/client": ">=3.8.0", "@apollo/experimental-nextjs-app-support": ">=0.3.2", "@faustwp/cli": ">=1.1.1", - "@faustwp/core": ">=1.1.1", + "@faustwp/core": ">=1.1.2", "next": ">=12.1.6", "react": ">=17.0.2", "react-dom": ">=17.0.2" @@ -49,7 +49,7 @@ "@apollo/client": "^3.8.0", "@apollo/experimental-nextjs-app-support": "^0.4.1", "@faustwp/cli": "^1.1.1", - "@faustwp/core": "^1.1.1", + "@faustwp/core": "^1.1.2", "@testing-library/jest-dom": "^5.17.0", "@types/node": "^20.4.6", "concurrently": "^8.2.0", diff --git a/packages/faustwp-core/CHANGELOG.md b/packages/faustwp-core/CHANGELOG.md index c06604047..25fe80124 100644 --- a/packages/faustwp-core/CHANGELOG.md +++ b/packages/faustwp-core/CHANGELOG.md @@ -1,5 +1,21 @@ # @faustwp/core +## 1.1.2 + +### Patch Changes + +- a419252: Fixed an issue where persisted queries were not being enabled properly when setting the `usePersistedQueries` flag. +- cf887d3: Fixed bug where the "Edit Post" link was missing in the Faust Toolbar +- 795d956: Improved keyboard navigation within Toolbar menus, allowing for dropdowns to be toggled open with "enter" + + Note that the `ToolbarItem` component no longer uses the prop `handleClick`, instead relying on pass-through props in order to separate the click event from the the key event. + + ```jsx + + Log Out + + ``` + ## 1.1.1 ### Patch Changes diff --git a/packages/faustwp-core/package.json b/packages/faustwp-core/package.json index a44e82b80..c1c610c7e 100644 --- a/packages/faustwp-core/package.json +++ b/packages/faustwp-core/package.json @@ -1,6 +1,6 @@ { "name": "@faustwp/core", - "version": "1.1.1", + "version": "1.1.2", "description": "Faust is a framework that aims to make headless WordPress as streamlined as classic WordPress for both developers and publishers", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js",