@wix/ditto-codegen-public 1.0.246 → 1.0.248

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 +148 -20
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -44859,7 +44859,7 @@ var require_parser = __commonJS({
44859
44859
  const parsed = (0, types_1.tryParseJson)(match[1]);
44860
44860
  if (!Array.isArray(parsed))
44861
44861
  continue;
44862
- const permissions = parsed.filter((p) => typeof p === "string" && p.startsWith("SCOPE."));
44862
+ const permissions = parsed.filter((p) => typeof p === "string");
44863
44863
  if (permissions.length > 0) {
44864
44864
  return permissions;
44865
44865
  }
@@ -70075,6 +70075,41 @@ var require_SPIAgent = __commonJS({
70075
70075
  }
70076
70076
  });
70077
70077
 
70078
+ // ../codegen-common-logic/dist/extensions/DataCollectionAgent.js
70079
+ var require_DataCollectionAgent = __commonJS({
70080
+ "../codegen-common-logic/dist/extensions/DataCollectionAgent.js"(exports2) {
70081
+ "use strict";
70082
+ Object.defineProperty(exports2, "__esModule", { value: true });
70083
+ exports2.getDataCollectionDecisionGuide = exports2.getDataCollectionAgentDocumentation = void 0;
70084
+ var getDataCollectionAgentDocumentation = () => {
70085
+ return `<data_collection>
70086
+ #### Data Collections (CMS)
70087
+
70088
+ - **Description**: CMS data collection schemas that define structured data storage for the app. Collections are automatically created when the app is installed on a site. Enables the site's code editor automatically, which is required for Wix Data APIs to work.
70089
+ - **Use Cases**:
70090
+ - Storing business data (products, orders, inventory, fees)
70091
+ - User-generated content (reviews, comments, submissions)
70092
+ - Custom app data that needs to persist across sessions
70093
+ - Relational data with references between collections
70094
+ - Content management for blog posts, articles, or catalog items
70095
+ - **When to Choose**: When the app needs to store and manage structured data that can be accessed from dashboard pages, site pages, backend code, or external applications. Essential when other extensions (Dashboard Pages, Site Widgets) need to read or write persistent data.
70096
+ </data_collection>`;
70097
+ };
70098
+ exports2.getDataCollectionAgentDocumentation = getDataCollectionAgentDocumentation;
70099
+ var getDataCollectionDecisionGuide = () => {
70100
+ return `### Choose Data Collections when:
70101
+
70102
+ - \u2705 The app needs to store and manage structured business data
70103
+ - \u2705 Dashboard Pages need to manage data displayed on the site
70104
+ - \u2705 Site Widgets need to query persistent data
70105
+ - \u2705 You need relational data with references between collections
70106
+ - \u2705 User-generated content needs to be stored (reviews, submissions, comments)
70107
+ - \u2705 Multiple records of the same type need CRUD operations`;
70108
+ };
70109
+ exports2.getDataCollectionDecisionGuide = getDataCollectionDecisionGuide;
70110
+ }
70111
+ });
70112
+
70078
70113
  // ../codegen-common-logic/dist/extensions/BackendExtensions.js
70079
70114
  var require_BackendExtensions = __commonJS({
70080
70115
  "../codegen-common-logic/dist/extensions/BackendExtensions.js"(exports2) {
@@ -70084,7 +70119,8 @@ var require_BackendExtensions = __commonJS({
70084
70119
  var BackendApiAgent_1 = require_BackendApiAgent();
70085
70120
  var BackendEventAgent_1 = require_BackendEventAgent();
70086
70121
  var SPIAgent_1 = require_SPIAgent();
70087
- var getBackendExtensionsDocumentation = () => {
70122
+ var DataCollectionAgent_1 = require_DataCollectionAgent();
70123
+ var getBackendExtensionsDocumentation = (options) => {
70088
70124
  return `### Backend Extensions
70089
70125
 
70090
70126
  Backend extensions provide server-side functionality.
@@ -70093,7 +70129,9 @@ var require_BackendExtensions = __commonJS({
70093
70129
 
70094
70130
  ${(0, BackendEventAgent_1.getBackendEventAgentDocumentation)()}
70095
70131
 
70096
- ${(0, SPIAgent_1.getSPIAgentDocumentation)()}`;
70132
+ ${(0, SPIAgent_1.getSPIAgentDocumentation)()}${options?.enableNewExtensions ? `
70133
+
70134
+ ${(0, DataCollectionAgent_1.getDataCollectionAgentDocumentation)()}` : ""}`;
70097
70135
  };
70098
70136
  exports2.getBackendExtensionsDocumentation = getBackendExtensionsDocumentation;
70099
70137
  }
@@ -70105,7 +70143,8 @@ var require_CustomElementAgent = __commonJS({
70105
70143
  "use strict";
70106
70144
  Object.defineProperty(exports2, "__esModule", { value: true });
70107
70145
  exports2.getSiteWidgetDecisionGuide = exports2.getCustomElementAgentDocumentation = void 0;
70108
- var getCustomElementAgentDocumentation = () => {
70146
+ var getCustomElementAgentDocumentation = (options) => {
70147
+ const whenToChoose = options?.enableNewExtensions ? `- **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for site functionality **that is NOT tied to a Wix business solution page**. If the functionality belongs on a product page, booking page, checkout, event page, or blog post \u2192 use Site Plugin instead.` : `- **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for all site functionality.`;
70109
70148
  return `<site_widget>
70110
70149
  #### Site Widgets
70111
70150
 
@@ -70127,12 +70166,13 @@ var require_CustomElementAgent = __commonJS({
70127
70166
  - Number inputs
70128
70167
  - **When Panel is Sufficient**: For widgets where configuration is per-instance and managed by the site owner in the Editor (e.g., countdown target date, display text, colors, styles). NO Dashboard Page is needed.
70129
70168
  - **When Dashboard Page is Needed**: Only when the app requires storing shared configurations in a database, managing multiple configurations across widgets, or providing admin-level analytics/reporting.
70130
- - **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for all site functionality.
70169
+ ${whenToChoose}
70131
70170
  - **IMPORTANT**: Do NOT pair Site Widgets with a Dashboard Page unless the user explicitly requests shared/centralized configuration management. The widget panel handles per-instance configuration.
70132
70171
  </site_widget>`;
70133
70172
  };
70134
70173
  exports2.getCustomElementAgentDocumentation = getCustomElementAgentDocumentation;
70135
- var getSiteWidgetDecisionGuide = () => {
70174
+ var getSiteWidgetDecisionGuide = (options) => {
70175
+ const defaultChoice = options?.enableNewExtensions ? `- \u2705 **DEFAULT choice for site functionality not tied to a Wix business solution page**` : `- \u2705 **DEFAULT choice for all site functionality**`;
70136
70176
  return `### Choose Site Widgets when:
70137
70177
 
70138
70178
  - \u2705 Creating reusable page components
@@ -70140,7 +70180,7 @@ var require_CustomElementAgent = __commonJS({
70140
70180
  - \u2705 Need configurable widgets for site builders
70141
70181
  - \u2705 Want to provide drag-and-drop functionality
70142
70182
  - \u2705 Need to add functionality to Wix sites for site visitors
70143
- - \u2705 **DEFAULT choice for all site functionality**
70183
+ ${defaultChoice}
70144
70184
 
70145
70185
  ### Site Widget Panel vs Dashboard Page:
70146
70186
  - \u2705 Use the **built-in widget panel** for per-instance configuration (text, dates, styles, toggles) - NO Dashboard Page needed
@@ -70297,6 +70337,53 @@ var require_SiteComponentAgent = __commonJS({
70297
70337
  }
70298
70338
  });
70299
70339
 
70340
+ // ../codegen-common-logic/dist/extensions/SitePluginAgent.js
70341
+ var require_SitePluginAgent = __commonJS({
70342
+ "../codegen-common-logic/dist/extensions/SitePluginAgent.js"(exports2) {
70343
+ "use strict";
70344
+ Object.defineProperty(exports2, "__esModule", { value: true });
70345
+ exports2.getSitePluginDecisionGuide = exports2.getSitePluginAgentDocumentation = void 0;
70346
+ var getSitePluginAgentDocumentation = () => {
70347
+ return `<site_plugin>
70348
+ #### Site Plugins
70349
+
70350
+ - **Description**: Custom elements rendered in predefined slots within Wix business solution pages (e.g., Wix Stores product pages, Wix Bookings service pages, Wix eCommerce checkout). Site plugins use native HTMLElement custom elements (not React).
70351
+ - **Use Cases**:
70352
+ - Product page enhancements (e.g., best seller badges, product reviews summary)
70353
+ - Booking page extensions (e.g., custom confirmation messages, appointment insights)
70354
+ - eCommerce slot integrations (e.g., checkout upsells, side cart additions)
70355
+ - Event page custom content
70356
+ - Blog post page enhancements
70357
+ - **Slot System**: Site plugins are placed in predefined slots within existing Wix business solution pages. Each slot is identified by an appDefinitionId, widgetId, and slotId. Site owners can add plugins to slots using the plugin explorer in Wix editors.
70358
+ - **Settings Panel**: Site plugins have a built-in settings panel in the Wix Editor for per-instance configuration using widget.getProp/setProp. Similar to Site Widgets, the panel handles configuration without needing a separate Dashboard Page.
70359
+ - **When to Choose**: When you need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog) with custom UI in predefined slot positions. Unlike Site Widgets (which can be placed anywhere), Site Plugins are designed for specific integration points within Wix business apps.
70360
+
70361
+ **Common Placement Areas:**
70362
+ - Product pages (Wix Stores)
70363
+ - Checkout and side cart (Wix eCommerce)
70364
+ - Booking and service pages (Wix Bookings)
70365
+ - Event pages (Wix Events)
70366
+ - Blog post pages (Wix Blog)
70367
+
70368
+ **Key Differences from Site Widgets:**
70369
+ - Site Plugins go into predefined slots in business solution pages; Site Widgets can be placed anywhere on a site
70370
+ - Site Plugins integrate contextually with existing business app pages; Site Widgets are standalone components
70371
+ </site_plugin>`;
70372
+ };
70373
+ exports2.getSitePluginAgentDocumentation = getSitePluginAgentDocumentation;
70374
+ var getSitePluginDecisionGuide = () => {
70375
+ return `### Choose Site Plugins when:
70376
+
70377
+ - \u2705 Need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog)
70378
+ - \u2705 Want to add contextual UI to predefined slots within business app pages
70379
+ - \u2705 Building product page enhancements, booking page extensions, or checkout integrations
70380
+ - \u2705 Need to integrate with the specific page context (e.g., current product, current booking)
70381
+ - \u2705 Want to leverage the slot-based plugin explorer for site owners`;
70382
+ };
70383
+ exports2.getSitePluginDecisionGuide = getSitePluginDecisionGuide;
70384
+ }
70385
+ });
70386
+
70300
70387
  // ../codegen-common-logic/dist/extensions/SiteExtensions.js
70301
70388
  var require_SiteExtensions = __commonJS({
70302
70389
  "../codegen-common-logic/dist/extensions/SiteExtensions.js"(exports2) {
@@ -70306,7 +70393,8 @@ var require_SiteExtensions = __commonJS({
70306
70393
  var EmbeddedScriptAgent_1 = require_EmbeddedScriptAgent();
70307
70394
  var SiteComponentAgent_1 = require_SiteComponentAgent();
70308
70395
  var CustomElementAgent_1 = require_CustomElementAgent();
70309
- var getSiteExtensionsDocumentation = () => {
70396
+ var SitePluginAgent_1 = require_SitePluginAgent();
70397
+ var getSiteExtensionsDocumentation = (options) => {
70310
70398
  return `### Site Extensions
70311
70399
 
70312
70400
  Site extensions add functionality directly to user websites.
@@ -70315,7 +70403,9 @@ ${(0, EmbeddedScriptAgent_1.getEmbeddedScriptAgentDocumentation)()}
70315
70403
 
70316
70404
  ${(0, SiteComponentAgent_1.getSiteComponentAgentDocumentation)()}
70317
70405
 
70318
- ${(0, CustomElementAgent_1.getCustomElementAgentDocumentation)()}`;
70406
+ ${(0, CustomElementAgent_1.getCustomElementAgentDocumentation)(options)}${options?.enableNewExtensions ? `
70407
+
70408
+ ${(0, SitePluginAgent_1.getSitePluginAgentDocumentation)()}` : ""}`;
70319
70409
  };
70320
70410
  exports2.getSiteExtensionsDocumentation = getSiteExtensionsDocumentation;
70321
70411
  }
@@ -70397,7 +70487,7 @@ var require_DashboardMenuPlugins = __commonJS({
70397
70487
  "../codegen-common-logic/dist/extensions/DashboardMenuPlugins.js"(exports2) {
70398
70488
  "use strict";
70399
70489
  Object.defineProperty(exports2, "__esModule", { value: true });
70400
- exports2.getDashboardMenuPluginsAgentDocumentation = void 0;
70490
+ exports2.getDashboardMenuPluginsDecisionGuide = exports2.getDashboardMenuPluginsAgentDocumentation = void 0;
70401
70491
  var getDashboardMenuPluginsAgentDocumentation = () => {
70402
70492
  return `<dashboard_menu_plugins>
70403
70493
  #### Dashboard Menu Plugins
@@ -70411,6 +70501,15 @@ var require_DashboardMenuPlugins = __commonJS({
70411
70501
  </dashboard_menu_plugins>`;
70412
70502
  };
70413
70503
  exports2.getDashboardMenuPluginsAgentDocumentation = getDashboardMenuPluginsAgentDocumentation;
70504
+ var getDashboardMenuPluginsDecisionGuide = () => {
70505
+ return `### Choose Dashboard Menu Plugins when:
70506
+
70507
+ - \u2705 Need to add custom navigation items to the dashboard sidebar
70508
+ - \u2705 Want quick-access shortcuts to app features from the dashboard menu
70509
+ - \u2705 Need context-specific actions accessible from dashboard navigation
70510
+ - \u2705 Want to link dashboard menu items to Dashboard Pages`;
70511
+ };
70512
+ exports2.getDashboardMenuPluginsDecisionGuide = getDashboardMenuPluginsDecisionGuide;
70414
70513
  }
70415
70514
  });
70416
70515
 
@@ -70459,21 +70558,27 @@ var require_extensionsDecisionGuide = __commonJS({
70459
70558
  var BackendApiAgent_1 = require_BackendApiAgent();
70460
70559
  var BackendEventAgent_1 = require_BackendEventAgent();
70461
70560
  var SPIAgent_1 = require_SPIAgent();
70462
- var getExtensionDecisionMatrix = () => {
70561
+ var SitePluginAgent_1 = require_SitePluginAgent();
70562
+ var DataCollectionAgent_1 = require_DataCollectionAgent();
70563
+ var getExtensionDecisionMatrix = (options) => {
70463
70564
  return `## Decision Matrix
70464
70565
  ${(0, DashboardPageAgent_1.getDashboardPageDecisionGuide)()}
70465
70566
 
70466
70567
  ${(0, EmbeddedScriptAgent_1.getEmbeddedScriptDecisionGuide)()}
70467
70568
 
70468
- ${(0, CustomElementAgent_1.getSiteWidgetDecisionGuide)()}
70569
+ ${(0, CustomElementAgent_1.getSiteWidgetDecisionGuide)(options)}
70469
70570
 
70470
- ${(0, SiteComponentAgent_1.getSiteComponentDecisionGuide)()}
70571
+ ${(0, SiteComponentAgent_1.getSiteComponentDecisionGuide)()}${options?.enableNewExtensions ? `
70572
+
70573
+ ${(0, SitePluginAgent_1.getSitePluginDecisionGuide)()}` : ""}
70471
70574
 
70472
70575
  ${(0, BackendApiAgent_1.getBackendApiDecisionGuide)()}
70473
70576
 
70474
70577
  ${(0, BackendEventAgent_1.getBackendEventDecisionGuide)()}
70475
70578
 
70476
- ${(0, SPIAgent_1.getSPIDecisionGuide)()}`;
70579
+ ${(0, SPIAgent_1.getSPIDecisionGuide)()}${options?.enableNewExtensions ? `
70580
+
70581
+ ${(0, DataCollectionAgent_1.getDataCollectionDecisionGuide)()}` : ""}`;
70477
70582
  };
70478
70583
  exports2.getExtensionDecisionMatrix = getExtensionDecisionMatrix;
70479
70584
  }
@@ -70485,12 +70590,8 @@ var require_commonUseCasesGuide = __commonJS({
70485
70590
  "use strict";
70486
70591
  Object.defineProperty(exports2, "__esModule", { value: true });
70487
70592
  exports2.getCommonUseCasesGuide = void 0;
70488
- var getCommonUseCasesGuide = () => {
70489
- return `## Quick Reference for Common Use Cases
70490
-
70491
- | **Need** | **Recommended Extension** | **Specific Slot/Location** | **Reason** |
70492
- | ----------------------------- | ---------------------------- | -------------------------------------- | -------------------------------------- |
70493
- | Analytics tracking | Embedded Scripts | Site-wide injection | Perfect for third-party code injection |
70593
+ var getCommonUseCasesGuide = (options) => {
70594
+ const baseRows = `| Analytics tracking | Embedded Scripts | Site-wide injection | Perfect for third-party code injection |
70494
70595
  | Site-wide popups | Embedded Scripts | Site-wide injection | Configurable overlays with dashboard control |
70495
70596
  | Countdown timers | Embedded Scripts | Site-wide injection | Event countdowns with dashboard management |
70496
70597
  | Cookie consent banners | Embedded Scripts | Site-wide injection | GDPR compliance with customization |
@@ -70506,6 +70607,31 @@ var require_commonUseCasesGuide = __commonJS({
70506
70607
  | Custom shipping rates | Service Plugins (SPIs) | Checkout flow integration | Modify existing business flows |
70507
70608
  | Tax calculations | Service Plugins (SPIs) | Checkout flow integration | Custom tax logic integration |
70508
70609
  | Custom pricing logic | Service Plugins (SPIs) | Platform-level integration | Platform-level business customization |`;
70610
+ const newExtensionRows = `| Product reviews on product page | Site Plugins | Predefined slots in product pages | Reviews are contextually tied to each product \u2192 Site Plugin, not Site Widget |
70611
+ | Product page enhancements | Site Plugins | Predefined slots in business pages | Contextual integration with Stores, Bookings, etc. |
70612
+ | Booking page extensions | Site Plugins | Predefined slots in business pages | Extend existing Wix business solution pages |
70613
+ | Checkout upsells | Site Plugins | Predefined slots in eCommerce pages | Fixed slot integration in checkout flow |
70614
+ | App-specific data storage | Data Collections | CMS data layer | Structured data for app extensions to read/write |
70615
+ | Per-product fees/rules | Dashboard Page + Service Plugin + Data Collection | Admin + checkout + data | Dashboard manages rules, Data Collection stores them, Service Plugin reads at checkout |`;
70616
+ const comparisonGuide = `
70617
+ ## Extension Comparison Guide
70618
+
70619
+ | **Site Widget vs Site Plugin** | **Service Plugin vs Backend Event** |
70620
+ | ------------------------------ | ----------------------------------- |
70621
+ | Widget: user places anywhere on site | Service Plugin: runs DURING a business flow (checkout, shipping, tax) |
70622
+ | Plugin: fixed slot in a Wix business solution page (Stores, Bookings, etc.) | Backend Event: runs AFTER a platform event occurs (order created, contact added) |
70623
+
70624
+ | **Dashboard Page vs Embedded Script** | **Site Widget vs Embedded Script** |
70625
+ | ------------------------------------- | ---------------------------------- |
70626
+ | Dashboard Page: admin-only interface for managing settings/data | Site Widget: standalone component placed on page by site owner |
70627
+ | Embedded Script: code injected into every site page for visitors | Embedded Script: code injected site-wide (analytics, popups, effects) |`;
70628
+ return `## Quick Reference for Common Use Cases
70629
+
70630
+ | **Need** | **Recommended Extension** | **Specific Slot/Location** | **Reason** |
70631
+ | ----------------------------- | ---------------------------- | -------------------------------------- | -------------------------------------- |
70632
+ ${baseRows}${options?.enableNewExtensions ? `
70633
+ ${newExtensionRows}
70634
+ ${comparisonGuide}` : ""}`;
70509
70635
  };
70510
70636
  exports2.getCommonUseCasesGuide = getCommonUseCasesGuide;
70511
70637
  }
@@ -71348,6 +71474,8 @@ var require_dist12 = __commonJS({
71348
71474
  __exportStar2(require_DashboardPlugins(), exports2);
71349
71475
  __exportStar2(require_DashboardMenuPlugins(), exports2);
71350
71476
  __exportStar2(require_DashboardModals(), exports2);
71477
+ __exportStar2(require_SitePluginAgent(), exports2);
71478
+ __exportStar2(require_DataCollectionAgent(), exports2);
71351
71479
  __exportStar2(require_extensionsDecisionGuide(), exports2);
71352
71480
  __exportStar2(require_commonUseCasesGuide(), exports2);
71353
71481
  __exportStar2(require_system_prompts(), exports2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.246",
3
+ "version": "1.0.248",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -28,5 +28,5 @@
28
28
  "@wix/ditto-codegen": "1.0.0",
29
29
  "esbuild": "^0.27.2"
30
30
  },
31
- "falconPackageHash": "54aee6086f8c14810a73a32f78183ca7213e34d07eb7301d1aa17b45"
31
+ "falconPackageHash": "8a347c11d5681c52b562b125aee9779fb5c88bf196cc92bd813a9dce"
32
32
  }