@wix/ditto-codegen-public 1.0.139 → 1.0.140
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 +12 -0
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -97637,6 +97637,16 @@ var require_customElementPrompt = __commonJS({
|
|
|
97637
97637
|
supportsEmbeddedScriptParameters: false
|
|
97638
97638
|
});
|
|
97639
97639
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames, useData, useIteration);
|
|
97640
|
+
const implementationRequirements = useData ? `
|
|
97641
|
+
<implementation_requirements>
|
|
97642
|
+
- If you are using Wix Data API e.g. import { items } from '@wix/data', you MUST handle the Wix Editor environment gracefully.
|
|
97643
|
+
- You MUST handle the Wix Editor environment gracefully.
|
|
97644
|
+
- Import { window as wixWindow } from "@wix/site-window".
|
|
97645
|
+
- In your data loading logic, check the view mode: 'const currentViewMode = await wixWindow.viewMode();'
|
|
97646
|
+
- If currentViewMode === 'Editor', DO NOT fetch data. Instead, render a placeholder/fallback UI that explains the widget will appear on the live site.
|
|
97647
|
+
- Only fetch real data and render the full widget if NOT in 'Editor' mode.
|
|
97648
|
+
</implementation_requirements>
|
|
97649
|
+
` : "";
|
|
97640
97650
|
return `
|
|
97641
97651
|
<WIXCLI_CUSTOM_ELEMENT_SYSTEM_PROMPT>
|
|
97642
97652
|
<role>
|
|
@@ -97654,6 +97664,8 @@ var require_customElementPrompt = __commonJS({
|
|
|
97654
97664
|
- Do NOT invent types/modules/props; use only what exists in the scaffold and standard libs
|
|
97655
97665
|
</rules>
|
|
97656
97666
|
|
|
97667
|
+
${implementationRequirements}
|
|
97668
|
+
|
|
97657
97669
|
<style_guidelines>
|
|
97658
97670
|
- Prefer simple, elegant UI using inline styles (no CSS imports)
|
|
97659
97671
|
- Use semantic HTML and accessible patterns (aria-*, roles, focus styles)
|
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.140",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@wix/ditto-codegen": "1.0.0",
|
|
25
25
|
"esbuild": "^0.25.9"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "165730256df9cb47c4921e3910884a128786d38135e1437cd1f2cc4a"
|
|
28
28
|
}
|