payload-canvas 0.6.5 → 0.6.6

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.
@@ -1,6 +1,7 @@
1
1
  // The theme global: colors, fonts, radius and spacing, with the plugin's color, font and slider
2
2
  // fields. Server-only (the revalidation hook imports next/cache).
3
3
  import { revalidatePath, revalidateTag } from 'next/cache';
4
+ import { clearAgainAfterResponse } from '../core/clearAgain.js';
4
5
  import { deriveColors } from './colors.js';
5
6
  import { DEFAULT_THEME_SLUG } from './config.js';
6
7
  import { forgetThemeVariables } from './server.js';
@@ -177,8 +178,12 @@ function revalidateTheme(cacheTag) {
177
178
  if (context?.disableRevalidate)
178
179
  return doc;
179
180
  try {
180
- revalidateTag(cacheTag, { expire: 0 });
181
- revalidatePath('/', 'layout');
181
+ const clear = () => {
182
+ revalidateTag(cacheTag, { expire: 0 });
183
+ revalidatePath('/', 'layout');
184
+ };
185
+ clear();
186
+ clearAgainAfterResponse(clear);
182
187
  }
183
188
  catch (error) {
184
189
  payload.logger.debug(`[websiteBuilder] Theme revalidation skipped: ${error instanceof Error ? error.message : String(error)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-canvas",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Payload Canvas: a visual drag-and-drop website builder for Payload CMS 3. Nested layout blocks, Tailwind styling, sections, templates, live AI editing over MCP, and the React renderer for your site.",
5
5
  "keywords": [
6
6
  "payload",