@wix/ditto-codegen-public 1.0.286 → 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.
Files changed (2) hide show
  1. package/dist/out.js +18 -8
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -11587,7 +11587,7 @@ var require_constants5 = __commonJS({
11587
11587
  event: "backend event",
11588
11588
  genericExtension: "extension",
11589
11589
  customElement: "custom element",
11590
- siteComponent: "site component",
11590
+ siteComponent: "editor react component",
11591
11591
  sitePlugin: "site plugin",
11592
11592
  ecomShippingRates: "service plugin",
11593
11593
  ecomAdditionalFees: "service plugin",
@@ -17671,39 +17671,49 @@ 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 selectedType = await (0, job_decision_manager_1.askJobChoice)(jobId, `What type of site UI element would you like to create for "${extensionName}"?`, [
17674
+ const options = [
17675
17675
  {
17676
17676
  id: types_1.ExtensionType.SITE_WIDGET,
17677
- label: "Site Widget (Custom Element)",
17677
+ label: "Custom Element Widget",
17678
17678
  description: "A self-contained widget built as a Custom Element, embedded on the site. Best for standalone, reusable components."
17679
17679
  },
17680
17680
  {
17681
17681
  id: types_1.ExtensionType.SITE_COMPONENT,
17682
- label: "Site Component (React)",
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
- ], "Site Widgets are standalone embeddable units with their own styling, while Site Components integrate more deeply with the Wix editor and builder.");
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 = {
17689
17691
  type: "SITE_UI_TYPE",
17690
- question: "Site Widget vs Site Component",
17692
+ question: "Custom Element Widget vs Editor React Component",
17691
17693
  selectedOptionId: selectedType
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.286",
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": "c610d865c00bce2d576755b9b7aa080ac9a24a3d6375f9378086c06c"
30
+ "falconPackageHash": "551a68456ef9b2e4c6447344130a9234b5767cb0b0551c7afb0f2edb"
31
31
  }