create-nextblock 0.2.33 → 0.2.34

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.
Files changed (32) hide show
  1. package/package.json +1 -1
  2. package/templates/nextblock-template/app/[slug]/PageClientContent.tsx +67 -67
  3. package/templates/nextblock-template/app/[slug]/page.tsx +4 -4
  4. package/templates/nextblock-template/app/cms/blocks/actions.ts +5 -5
  5. package/templates/nextblock-template/app/cms/blocks/components/BackgroundSelector.tsx +348 -350
  6. package/templates/nextblock-template/app/cms/blocks/components/BlockEditorArea.tsx +13 -16
  7. package/templates/nextblock-template/app/cms/blocks/components/BlockEditorModal.tsx +1 -1
  8. package/templates/nextblock-template/app/cms/blocks/components/ColumnEditor.tsx +24 -42
  9. package/templates/nextblock-template/app/cms/blocks/components/EditableBlock.tsx +6 -6
  10. package/templates/nextblock-template/app/cms/blocks/editors/SectionBlockEditor.tsx +35 -56
  11. package/templates/nextblock-template/app/cms/blocks/editors/TextBlockEditor.tsx +81 -81
  12. package/templates/nextblock-template/app/cms/media/actions.ts +12 -12
  13. package/templates/nextblock-template/app/cms/media/components/MediaGridClient.tsx +3 -3
  14. package/templates/nextblock-template/app/cms/media/components/MediaUploadForm.tsx +1 -1
  15. package/templates/nextblock-template/app/cms/media/page.tsx +120 -120
  16. package/templates/nextblock-template/app/cms/revisions/JsonDiffView.tsx +86 -87
  17. package/templates/nextblock-template/app/cms/revisions/RevisionHistoryButton.tsx +10 -16
  18. package/templates/nextblock-template/app/cms/revisions/service.ts +344 -344
  19. package/templates/nextblock-template/app/cms/settings/extra-translations/actions.ts +1 -1
  20. package/templates/nextblock-template/app/cms/settings/logos/[id]/edit/page.tsx +0 -1
  21. package/templates/nextblock-template/app/providers.tsx +2 -2
  22. package/templates/nextblock-template/components/BlockRenderer.tsx +9 -9
  23. package/templates/nextblock-template/components/ResponsiveNav.tsx +22 -22
  24. package/templates/nextblock-template/components/blocks/PostsGridBlock.tsx +12 -12
  25. package/templates/nextblock-template/components/blocks/renderers/ClientTextBlockRenderer.tsx +26 -26
  26. package/templates/nextblock-template/components/blocks/renderers/HeroBlockRenderer.tsx +41 -41
  27. package/templates/nextblock-template/components/blocks/renderers/ImageBlockRenderer.tsx +7 -7
  28. package/templates/nextblock-template/components/theme-switcher.tsx +78 -78
  29. package/templates/nextblock-template/eslint.config.mjs +35 -37
  30. package/templates/nextblock-template/lib/blocks/blockRegistry.ts +10 -10
  31. package/templates/nextblock-template/next-env.d.ts +6 -6
  32. package/templates/nextblock-template/package.json +1 -1
@@ -149,7 +149,7 @@ export interface SectionBlockContent {
149
149
  /** Array of blocks within columns - 2D array where each index represents a column */
150
150
  column_blocks: Array<Array<{
151
151
  block_type: BlockType;
152
- content: Record<string, unknown>;
152
+ content: Record<string, any>;
153
153
  temp_id?: string; // For client-side management before save
154
154
  }>>;
155
155
  }
@@ -211,7 +211,7 @@ export interface ContentPropertyDefinition {
211
211
  /** Human-readable description of the property */
212
212
  description?: string;
213
213
  /** Default value for the property */
214
- default?: unknown;
214
+ default?: any;
215
215
  /** For union types, the possible values */
216
216
  unionValues?: readonly string[];
217
217
  /** For array types, the type of array elements */
@@ -221,7 +221,7 @@ export interface ContentPropertyDefinition {
221
221
  min?: number;
222
222
  max?: number;
223
223
  pattern?: string;
224
- enum?: readonly unknown[];
224
+ enum?: readonly any[];
225
225
  };
226
226
  }
227
227
 
@@ -229,7 +229,7 @@ export interface ContentPropertyDefinition {
229
229
  * Enhanced block definition interface with generic type parameter
230
230
  * Links the TypeScript interface to the block definition for better type safety
231
231
  */
232
- export interface BlockDefinition<T = unknown> {
232
+ export interface BlockDefinition<T = any> {
233
233
  /** The unique identifier for the block type */
234
234
  type: BlockType;
235
235
  /** User-friendly display name for the block */
@@ -799,7 +799,7 @@ export function getBlockDefinition(blockType: BlockType): BlockDefinition | unde
799
799
  * @param blockType - The type of block to get initial content for
800
800
  * @returns The initial content object or undefined if block type not found
801
801
  */
802
- export function getInitialContent(blockType: BlockType): unknown {
802
+ export function getInitialContent(blockType: BlockType): object | undefined {
803
803
  return blockRegistry[blockType]?.initialContent;
804
804
  }
805
805
 
@@ -870,7 +870,7 @@ export type AllBlockContent =
870
870
  */
871
871
  export function validateBlockContent(
872
872
  blockType: BlockType,
873
- content: Record<string, unknown>
873
+ content: Record<string, any>
874
874
  ): {
875
875
  isValid: boolean;
876
876
  errors: string[];
@@ -984,13 +984,13 @@ export function getRequiredProperties(blockType: BlockType): string[] {
984
984
  * @param blockType - The type of block
985
985
  * @returns Complete default content object
986
986
  */
987
- export function generateDefaultContent(blockType: BlockType): Record<string, unknown> {
987
+ export function generateDefaultContent(blockType: BlockType): Record<string, any> {
988
988
  const schema = getContentSchema(blockType);
989
- const initialContent = getInitialContent(blockType) || ({} as Record<string, unknown>);
989
+ const initialContent = getInitialContent(blockType) || {};
990
990
 
991
- if (!schema) return initialContent as Record<string, unknown>;
991
+ if (!schema) return initialContent;
992
992
 
993
- const defaultContent: Record<string, unknown> = { ...(initialContent as Record<string, unknown>) };
993
+ const defaultContent: Record<string, any> = { ...initialContent };
994
994
 
995
995
  for (const [propertyName, propertyDef] of Object.entries(schema)) {
996
996
  if (defaultContent[propertyName] === undefined && propertyDef.default !== undefined) {
@@ -1,6 +1,6 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
- import "./.next/dev/types/routes.d.ts";
4
-
5
- // NOTE: This file should not be edited
6
- // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+ import "./.next/dev/types/routes.d.ts";
4
+
5
+ // NOTE: This file should not be edited
6
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextblock-cms/template",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",