@blocklet/pages-kit-block-studio 0.4.129 → 0.4.131
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.
|
@@ -93,8 +93,7 @@ async function generateWrapperCode({ project, state, version }) {
|
|
|
93
93
|
'./data.json': './data.json',
|
|
94
94
|
},
|
|
95
95
|
}, null, 2);
|
|
96
|
-
|
|
97
|
-
const exportPageIds = state.pageIds.filter((pageId) => state.pages[pageId]?.isTemplate);
|
|
96
|
+
const exportPageIds = [...state.pageIds];
|
|
98
97
|
const exportComponentIds = (0, property_1.getComponentDependencies)({
|
|
99
98
|
state,
|
|
100
99
|
pageIds: exportPageIds,
|
|
@@ -340,8 +339,6 @@ function generatePropertiesJsonSchemaWithZod({ properties, llmConfig, }) {
|
|
|
340
339
|
function generatePageDataJsonSchemasWithZod(state) {
|
|
341
340
|
const pageSchemaDefinitions = Object.values(state.pages)
|
|
342
341
|
.map((page) => {
|
|
343
|
-
if (!page.isTemplate)
|
|
344
|
-
return null;
|
|
345
342
|
const typeName = `Page${page.slug
|
|
346
343
|
.replace(/^\//, '')
|
|
347
344
|
.split('/')
|
|
@@ -352,7 +349,7 @@ function generatePageDataJsonSchemasWithZod(state) {
|
|
|
352
349
|
const sectionProperties = {};
|
|
353
350
|
page.sectionIds.forEach((sectionId) => {
|
|
354
351
|
const section = page.sections[sectionId];
|
|
355
|
-
if (!section
|
|
352
|
+
if (!section)
|
|
356
353
|
return;
|
|
357
354
|
const sectionName = section.name || section.id;
|
|
358
355
|
if (section.component === 'custom-component') {
|
|
@@ -429,8 +426,6 @@ ${schemaExports}`;
|
|
|
429
426
|
function generatePageDataTypesWithZod(state) {
|
|
430
427
|
const pageTypeDefinitions = Object.values(state.pages)
|
|
431
428
|
.map((page) => {
|
|
432
|
-
if (!page.isTemplate)
|
|
433
|
-
return null;
|
|
434
429
|
const typeName = `Page${page.slug
|
|
435
430
|
.replace(/^\//, '')
|
|
436
431
|
.split('/')
|
|
@@ -443,9 +438,6 @@ function generatePageDataTypesWithZod(state) {
|
|
|
443
438
|
const section = page.sections[sectionId];
|
|
444
439
|
if (!section)
|
|
445
440
|
return null;
|
|
446
|
-
// check if the section is a template section
|
|
447
|
-
if (!section.isTemplateSection)
|
|
448
|
-
return null;
|
|
449
441
|
// 嵌套组件
|
|
450
442
|
if (section.component === 'custom-component') {
|
|
451
443
|
const componentId = section.config?.componentId;
|
|
@@ -520,7 +512,7 @@ function generatePageDataZodToAgent(state, pageId) {
|
|
|
520
512
|
// 收集页面所有section的配置信息
|
|
521
513
|
page.sectionIds.forEach((sectionId) => {
|
|
522
514
|
const section = page.sections[sectionId];
|
|
523
|
-
if (!section
|
|
515
|
+
if (!section)
|
|
524
516
|
return;
|
|
525
517
|
const sectionName = section.name || section.id;
|
|
526
518
|
if (section.component === 'custom-component') {
|