@wix/ditto-codegen-public 1.0.299 → 1.0.301

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 -4
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -11416,7 +11416,7 @@ Use this namespace when creating data collections (for idSuffix scoping).`);
11416
11416
  }
11417
11417
  if (codeIdentifier) {
11418
11418
  parts.push(`CODE_IDENTIFIER: ${codeIdentifier}
11419
- If generating site component extensions, use this identifier as the type prefix (e.g. type: '${codeIdentifier}.ComponentName').`);
11419
+ If generating Editor React component extensions, use this identifier as the type prefix (e.g. type: '${codeIdentifier}.ComponentName').`);
11420
11420
  }
11421
11421
  return parts.join("\n\n");
11422
11422
  }
@@ -11602,6 +11602,7 @@ var require_constants5 = __commonJS({
11602
11602
  genericExtension: "extension",
11603
11603
  customElement: "custom element",
11604
11604
  siteComponent: "editor react component",
11605
+ editorReactComponent: "editor react component",
11605
11606
  sitePlugin: "site plugin",
11606
11607
  ecomShippingRates: "service plugin",
11607
11608
  ecomAdditionalFees: "service plugin",
@@ -11985,14 +11986,15 @@ var require_pre_run_decision = __commonJS({
11985
11986
  const extensionName = siteUIExtension.name;
11986
11987
  const currentType = siteUIExtension.type;
11987
11988
  logger_12.logger.info(`[PreDecision] Found site UI extension: "${extensionName}" (current type: ${currentType})`);
11989
+ const { widget: widgetType, component: componentType } = getSiteUITypePair(currentType);
11988
11990
  const options = [
11989
11991
  {
11990
- id: types_1.ExtensionType.SITE_WIDGET,
11992
+ id: widgetType,
11991
11993
  label: "Custom Element Widget",
11992
11994
  description: "A self-contained widget built as a Custom Element, embedded on the site. Best for standalone, reusable components."
11993
11995
  },
11994
11996
  {
11995
- id: types_1.ExtensionType.SITE_COMPONENT,
11997
+ id: componentType,
11996
11998
  label: "Editor React Component",
11997
11999
  description: "A React component that integrates with the site builder. Best for components that need to work with Wix editor features."
11998
12000
  }
@@ -12013,7 +12015,19 @@ var require_pre_run_decision = __commonJS({
12013
12015
  };
12014
12016
  exports2.checkSiteUIDecision = checkSiteUIDecision;
12015
12017
  function isSiteUIExtension(extension) {
12016
- return extension.type === types_1.ExtensionType.SITE_WIDGET || extension.type === types_1.ExtensionType.SITE_COMPONENT;
12018
+ return extension.type === types_1.ExtensionType.SITE_WIDGET || extension.type === types_1.ExtensionType.SITE_COMPONENT || extension.type === types_1.ExtensionType.CUSTOM_ELEMENT_WIDGET || extension.type === types_1.ExtensionType.EDITOR_REACT_COMPONENT;
12019
+ }
12020
+ function isLegacySiteUIType(type) {
12021
+ return type === types_1.ExtensionType.SITE_WIDGET || type === types_1.ExtensionType.SITE_COMPONENT;
12022
+ }
12023
+ function getSiteUITypePair(type) {
12024
+ return isLegacySiteUIType(type) ? {
12025
+ widget: types_1.ExtensionType.SITE_WIDGET,
12026
+ component: types_1.ExtensionType.SITE_COMPONENT
12027
+ } : {
12028
+ widget: types_1.ExtensionType.CUSTOM_ELEMENT_WIDGET,
12029
+ component: types_1.ExtensionType.EDITOR_REACT_COMPONENT
12030
+ };
12017
12031
  }
12018
12032
  function applyTypeToBlueprint(blueprint, extensionName, type, label) {
12019
12033
  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.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.299",
3
+ "version": "1.0.301",
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": "a01dca5cf215678ea67a1d956dd4f31273b544e5b2fd4bf54bc84ca0"
30
+ "falconPackageHash": "3f683b633bc0b16375fd7e13177687e204ebe2cd2c8cb4f1add95c7d"
31
31
  }