@wix/ditto-codegen-public 1.0.287 → 1.0.288
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/dist/out.js +14 -4
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -17671,7 +17671,7 @@ var require_pre_run_decision = __commonJS({
|
|
|
17671
17671
|
const extensionName = siteUIExtension.name;
|
|
17672
17672
|
const currentType = siteUIExtension.type;
|
|
17673
17673
|
logger_12.logger.info(`[PreDecision] Found site UI extension: "${extensionName}" (current type: ${currentType})`);
|
|
17674
|
-
const
|
|
17674
|
+
const options = [
|
|
17675
17675
|
{
|
|
17676
17676
|
id: types_1.ExtensionType.SITE_WIDGET,
|
|
17677
17677
|
label: "Custom Element Widget",
|
|
@@ -17682,7 +17682,9 @@ var require_pre_run_decision = __commonJS({
|
|
|
17682
17682
|
label: "Editor React Component",
|
|
17683
17683
|
description: "A React component that integrates with the site builder. Best for components that need to work with Wix editor features."
|
|
17684
17684
|
}
|
|
17685
|
-
]
|
|
17685
|
+
];
|
|
17686
|
+
const selectedType = await (0, job_decision_manager_1.askJobChoice)(jobId, `What type of site UI element would you like to create for "${extensionName}"?`, options, "Custom Element Widgets are standalone embeddable units with their own styling, while Editor React Components integrate more deeply with the Wix editor and builder.");
|
|
17687
|
+
const selectedLabel = options.find((o) => o.id === selectedType)?.label ?? selectedType;
|
|
17686
17688
|
const isTypeChanged = selectedType !== currentType;
|
|
17687
17689
|
logger_12.logger.info(`[PreDecision] User selected ${selectedType} for "${extensionName}"${isTypeChanged ? ` (changed from ${currentType})` : " (unchanged)"}`);
|
|
17688
17690
|
const appliedDecision = {
|
|
@@ -17692,18 +17694,26 @@ var require_pre_run_decision = __commonJS({
|
|
|
17692
17694
|
};
|
|
17693
17695
|
return {
|
|
17694
17696
|
decisionsApplied: [appliedDecision],
|
|
17695
|
-
modifiedBlueprint: context.blueprint ? applyTypeToBlueprint(context.blueprint, extensionName, selectedType) : void 0
|
|
17697
|
+
modifiedBlueprint: context.blueprint ? applyTypeToBlueprint(context.blueprint, extensionName, selectedType, selectedLabel) : void 0
|
|
17696
17698
|
};
|
|
17697
17699
|
}
|
|
17698
17700
|
function isSiteUIExtension(extension) {
|
|
17699
17701
|
return extension.type === types_1.ExtensionType.SITE_WIDGET || extension.type === types_1.ExtensionType.SITE_COMPONENT;
|
|
17700
17702
|
}
|
|
17701
|
-
function applyTypeToBlueprint(blueprint, extensionName, type) {
|
|
17703
|
+
function applyTypeToBlueprint(blueprint, extensionName, type, label) {
|
|
17704
|
+
const summaryNotice = `[USER DECISION] The user explicitly chose "${label}" for the "${extensionName}" extension. You MUST generate it as type ${type}. Do NOT use any other type.`;
|
|
17705
|
+
const descriptionNotice = `[USER DECISION] This extension MUST be a ${label} (type: ${type}). The user explicitly chose this. Do NOT change it.`;
|
|
17702
17706
|
return {
|
|
17703
17707
|
...blueprint,
|
|
17708
|
+
summary: `${summaryNotice}
|
|
17709
|
+
|
|
17710
|
+
${blueprint.summary ?? ""}`.trim(),
|
|
17704
17711
|
extensions: blueprint.extensions?.map((ext) => ext.name === extensionName ? {
|
|
17705
17712
|
...ext,
|
|
17706
17713
|
type,
|
|
17714
|
+
description: `${descriptionNotice}
|
|
17715
|
+
|
|
17716
|
+
${ext.description ?? ""}`.trim(),
|
|
17707
17717
|
_userDecision: "IMPORTANT: The user explicitly chose this extension type. You MUST use this exact type."
|
|
17708
17718
|
} : ext)
|
|
17709
17719
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.288",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"@wix/ditto-codegen": "1.0.0",
|
|
28
28
|
"esbuild": "^0.27.2"
|
|
29
29
|
},
|
|
30
|
-
"falconPackageHash": "
|
|
30
|
+
"falconPackageHash": "551a68456ef9b2e4c6447344130a9234b5767cb0b0551c7afb0f2edb"
|
|
31
31
|
}
|