@vojtaholik/create-static-kit 2.0.0 → 2.1.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/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@vojtaholik/create-static-kit",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-static-kit": "./src/index.ts"
7
7
  },
8
- "files": ["src", "template"],
8
+ "files": [
9
+ "src",
10
+ "template"
11
+ ],
9
12
  "repository": {
10
13
  "type": "git",
11
14
  "url": "https://github.com/vojtaholik/module-kit",
@@ -16,6 +16,21 @@ export {
16
16
  type TextSectionProps,
17
17
  } from "./text-section.block.ts";
18
18
 
19
+ // Type-safe block props — augment BlockPropsMap so page configs get autocomplete
20
+ import type { HeroProps } from "./hero.block.ts";
21
+ import type { FeatureGridProps } from "./feature-grid.block.ts";
22
+ import type { LatestPostsProps } from "./latest-posts.block.ts";
23
+ import type { TextSectionProps } from "./text-section.block.ts";
24
+
25
+ declare module "@vojtaholik/static-kit-core" {
26
+ interface BlockPropsMap {
27
+ hero: HeroProps;
28
+ featureGrid: FeatureGridProps;
29
+ latestPosts: LatestPostsProps;
30
+ textSection: TextSectionProps;
31
+ }
32
+ }
33
+
19
34
  // Register all blocks
20
35
  import { blockRegistry } from "@vojtaholik/static-kit-core";
21
36
  import { heroBlock } from "./hero.block.ts";
@@ -10,12 +10,12 @@
10
10
  "typecheck": "tsc --noEmit"
11
11
  },
12
12
  "dependencies": {
13
- "@vojtaholik/static-kit-core": "^2.0.0"
13
+ "@vojtaholik/static-kit-core": "^2.1.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/bun": "latest",
17
17
  "bun-types": "^1.3.4",
18
- "@vojtaholik/static-kit-cli": "^2.0.0",
18
+ "@vojtaholik/static-kit-cli": "^2.1.0",
19
19
  "typescript": "^5"
20
20
  }
21
21
  }
@@ -1,197 +0,0 @@
1
- import type { CmsBlockSchemaMap } from "@vojtaholik/static-kit-core";
2
-
3
- /**
4
- * CMS Block Schema Definitions
5
- *
6
- * These define the CMS editing interface for each block type.
7
- * They're transformed into Zod schemas at runtime via createSchemaFromCmsBlocks()
8
- */
9
- export const cmsBlocks: CmsBlockSchemaMap = {
10
- hero: {
11
- type: "hero",
12
- label: "Hero Section",
13
- fields: {
14
- eyebrow: {
15
- type: "text",
16
- label: "Eyebrow Text",
17
- required: false,
18
- },
19
- headline: {
20
- type: "text",
21
- label: "Headline",
22
- required: true,
23
- },
24
- subheadline: {
25
- type: "text",
26
- label: "Subheadline",
27
- required: false,
28
- },
29
- primaryCta: {
30
- type: "link",
31
- label: "Primary CTA",
32
- required: false,
33
- },
34
- secondaryCta: {
35
- type: "link",
36
- label: "Secondary CTA",
37
- required: false,
38
- },
39
- backgroundImage: {
40
- type: "image",
41
- label: "Background Image",
42
- required: false,
43
- },
44
- },
45
- },
46
-
47
- featureGrid: {
48
- type: "featureGrid",
49
- label: "Feature Grid",
50
- fields: {
51
- headline: {
52
- type: "text",
53
- label: "Section Headline",
54
- required: false,
55
- },
56
- subheadline: {
57
- type: "text",
58
- label: "Section Subheadline",
59
- required: false,
60
- },
61
- columns: {
62
- type: "select",
63
- label: "Columns",
64
- required: false,
65
- options: [
66
- { label: "2 Columns", value: "2" },
67
- { label: "3 Columns", value: "3" },
68
- { label: "4 Columns", value: "4" },
69
- ],
70
- defaultValue: "3",
71
- },
72
- features: {
73
- type: "array",
74
- label: "Features",
75
- required: true,
76
- itemSchema: {
77
- type: "object",
78
- label: "Feature",
79
- fields: {
80
- icon: {
81
- type: "text",
82
- label: "Icon (emoji or icon name)",
83
- required: false,
84
- },
85
- title: {
86
- type: "text",
87
- label: "Title",
88
- required: true,
89
- },
90
- description: {
91
- type: "text",
92
- label: "Description",
93
- required: true,
94
- },
95
- link: {
96
- type: "link",
97
- label: "Link",
98
- required: false,
99
- },
100
- },
101
- },
102
- },
103
- },
104
- },
105
-
106
- latestPosts: {
107
- type: "latestPosts",
108
- label: "Latest Posts",
109
- fields: {
110
- headline: {
111
- type: "text",
112
- label: "Section Headline",
113
- required: false,
114
- defaultValue: "Latest Posts",
115
- },
116
- subheadline: {
117
- type: "text",
118
- label: "Section Subheadline",
119
- required: false,
120
- },
121
- count: {
122
- type: "number",
123
- label: "Number of Posts",
124
- required: false,
125
- defaultValue: 3,
126
- },
127
- posts: {
128
- type: "array",
129
- label: "Posts",
130
- required: true,
131
- itemSchema: {
132
- type: "object",
133
- label: "Post",
134
- fields: {
135
- title: {
136
- type: "text",
137
- label: "Title",
138
- required: true,
139
- },
140
- excerpt: {
141
- type: "text",
142
- label: "Excerpt",
143
- required: false,
144
- },
145
- date: {
146
- type: "text",
147
- label: "Date",
148
- required: false,
149
- },
150
- image: {
151
- type: "image",
152
- label: "Featured Image",
153
- required: false,
154
- },
155
- link: {
156
- type: "link",
157
- label: "Read More Link",
158
- required: true,
159
- },
160
- },
161
- },
162
- },
163
- viewAllLink: {
164
- type: "link",
165
- label: "View All Link",
166
- required: false,
167
- },
168
- },
169
- },
170
-
171
- textSection: {
172
- type: "textSection",
173
- label: "Text Section",
174
- fields: {
175
- eyebrow: {
176
- type: "text",
177
- label: "Eyebrow Text",
178
- required: false,
179
- },
180
- headline: {
181
- type: "text",
182
- label: "Headline",
183
- required: false,
184
- },
185
- body: {
186
- type: "richText",
187
- label: "Body Content",
188
- required: true,
189
- },
190
- cta: {
191
- type: "link",
192
- label: "Call to Action",
193
- required: false,
194
- },
195
- },
196
- },
197
- };