@wix/ditto-codegen-public 1.0.234 → 1.0.236
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.
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"installation": {
|
|
3
|
+
"staticContainer": "HOMEPAGE",
|
|
4
|
+
"initialSize": {
|
|
5
|
+
"width": {
|
|
6
|
+
"sizingType": "pixels",
|
|
7
|
+
"pixels": 400
|
|
8
|
+
},
|
|
9
|
+
"height": {
|
|
10
|
+
"sizingType": "stretched"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
2
14
|
"editorElement": {
|
|
3
15
|
"selector": ".perfect-example",
|
|
4
16
|
"displayName": "Perfect Example",
|
package/dist/out.js
CHANGED
|
@@ -92401,8 +92401,46 @@ All animations: pure CSS, smooth, purposeful.
|
|
|
92401
92401
|
- Emojis or decorative shapes \u2192 Avoid unless core to request
|
|
92402
92402
|
- Looping animations \u2192 Only for loading states
|
|
92403
92403
|
- Center-aligned multi-line body text \u2192 Hard to read`;
|
|
92404
|
+
var installationDocumentation = `The installation property defines how the component is initially placed and sized when added to a page.
|
|
92405
|
+
|
|
92406
|
+
### Installation Fields
|
|
92407
|
+
- **staticContainer**: Specifies automatic installation location. Use "HOMEPAGE" to auto-install on homepage
|
|
92408
|
+
- **initialSize**: Defines the initial dimensions when the component is added
|
|
92409
|
+
- **width**: Width configuration (InitialSizeSetting)
|
|
92410
|
+
- sizingType: "content" | "stretched" | "pixels"
|
|
92411
|
+
- pixels: number (only usable when sizingType is "pixels")
|
|
92412
|
+
- **height**: Height configuration (InitialSizeSetting)
|
|
92413
|
+
- sizingType: "content" | "stretched" | "pixels"
|
|
92414
|
+
- pixels: number (only usable when sizingType is "pixels")
|
|
92415
|
+
|
|
92416
|
+
### SizingType Values
|
|
92417
|
+
- **content**: Component auto-sizes based on its content
|
|
92418
|
+
- **stretched**: Component stretches to fill available space
|
|
92419
|
+
- **pixels**: Component has a fixed pixel dimension (requires pixels property)
|
|
92420
|
+
|
|
92421
|
+
### Examples:
|
|
92422
|
+
\`\`\`json
|
|
92423
|
+
// Fixed width, content-based height
|
|
92424
|
+
{
|
|
92425
|
+
"installation": {
|
|
92426
|
+
"staticContainer": "HOMEPAGE",
|
|
92427
|
+
"initialSize": {
|
|
92428
|
+
"width": { "sizingType": "pixels", "pixels": 400 },
|
|
92429
|
+
"height": { "sizingType": "pixels", "pixels": 300 }
|
|
92430
|
+
}
|
|
92431
|
+
}
|
|
92432
|
+
}
|
|
92433
|
+
\`\`\`
|
|
92434
|
+
|
|
92435
|
+
**Guidelines**:
|
|
92436
|
+
- Always include "staticContainer": "HOMEPAGE" for automatic installation on Harmony editor
|
|
92437
|
+
- Default initial size is 400px width, 300px height (matches Wix Harmony defaults)
|
|
92438
|
+
- Use "content" for height when the component should auto-size based on its content
|
|
92439
|
+
- Use "stretched" when the component should fill available space
|
|
92440
|
+
- Use "pixels" for fixed dimensions (buttons: 120-200px, cards: 300-400px)`;
|
|
92404
92441
|
var responseFormat = `Output as JSON with files array containing:
|
|
92405
92442
|
1. **manifest.json** - Component manifest (JSON) containing:
|
|
92443
|
+
- installation: initial size and placement configuration
|
|
92406
92444
|
- editorElement: full editor element configuration (selector, displayName, archetype, layout, cssProperties, data, elements, behaviors)
|
|
92407
92445
|
2. **component.tsx** - React component implementation
|
|
92408
92446
|
3. **style.css** - CSS styles
|
|
@@ -92413,6 +92451,13 @@ Each file: { path: string, content: string, operation: "insert" }
|
|
|
92413
92451
|
### manifest.json Structure Example:
|
|
92414
92452
|
\`\`\`json
|
|
92415
92453
|
{
|
|
92454
|
+
"installation": {
|
|
92455
|
+
"staticContainer": "HOMEPAGE",
|
|
92456
|
+
"initialSize": {
|
|
92457
|
+
"width": { "sizingType": "pixels", "pixels": 400 },
|
|
92458
|
+
"height": { "sizingType": "pixels", "pixels": 300 }
|
|
92459
|
+
}
|
|
92460
|
+
},
|
|
92416
92461
|
"editorElement": {
|
|
92417
92462
|
"selector": ".component-name",
|
|
92418
92463
|
"displayName": "Component Name",
|
|
@@ -92466,6 +92511,7 @@ import { heroImage } from './assets/defaultImages'
|
|
|
92466
92511
|
props: propsDocumentation,
|
|
92467
92512
|
componentElementsGuidelines,
|
|
92468
92513
|
manifestGuidelines: componentManifestGuidelines,
|
|
92514
|
+
installation: installationDocumentation,
|
|
92469
92515
|
reactGuidelines: componentReactGuidelines,
|
|
92470
92516
|
cssGuidelines: componentCssGuidelines,
|
|
92471
92517
|
designGuidelines,
|
|
@@ -92492,7 +92538,7 @@ var require_site_component_prompt = __commonJS({
|
|
|
92492
92538
|
apiDocumentation,
|
|
92493
92539
|
useData,
|
|
92494
92540
|
useIteration
|
|
92495
|
-
}).withRole(site_component_instructions_1.siteComponentInstructions.role).withSection("core_documentation", site_component_instructions_1.siteComponentInstructions.coreDocumentation).withSection("data_types", site_component_instructions_1.siteComponentInstructions.dataTypes).withSection("css_properties", site_component_instructions_1.siteComponentInstructions.cssProperties).withSection("editor_element", site_component_instructions_1.siteComponentInstructions.editorElement).withSection("layout", site_component_instructions_1.siteComponentInstructions.layout).withSection("elements", site_component_instructions_1.siteComponentInstructions.elements).withSection("props", site_component_instructions_1.siteComponentInstructions.props).withSection("component_elements_guidelines", site_component_instructions_1.siteComponentInstructions.componentElementsGuidelines).withSection("manifest_guidelines", site_component_instructions_1.siteComponentInstructions.manifestGuidelines).withSection("react_guidelines", site_component_instructions_1.siteComponentInstructions.reactGuidelines).withSection("css_guidelines", site_component_instructions_1.siteComponentInstructions.cssGuidelines).withSection("design_guidelines", site_component_instructions_1.siteComponentInstructions.designGuidelines).withSection("asset_guidelines", site_component_instructions_1.siteComponentInstructions.assetGuidelines).withSection("response_format", site_component_instructions_1.siteComponentInstructions.responseFormat).withSection("hard_constraints", site_component_instructions_1.siteComponentInstructions.hardConstraints).withImplementationGuidelines(site_component_instructions_1.siteComponentInstructions.typescriptQualityGuidelines);
|
|
92541
|
+
}).withRole(site_component_instructions_1.siteComponentInstructions.role).withSection("core_documentation", site_component_instructions_1.siteComponentInstructions.coreDocumentation).withSection("data_types", site_component_instructions_1.siteComponentInstructions.dataTypes).withSection("css_properties", site_component_instructions_1.siteComponentInstructions.cssProperties).withSection("editor_element", site_component_instructions_1.siteComponentInstructions.editorElement).withSection("layout", site_component_instructions_1.siteComponentInstructions.layout).withSection("elements", site_component_instructions_1.siteComponentInstructions.elements).withSection("props", site_component_instructions_1.siteComponentInstructions.props).withSection("component_elements_guidelines", site_component_instructions_1.siteComponentInstructions.componentElementsGuidelines).withSection("manifest_guidelines", site_component_instructions_1.siteComponentInstructions.manifestGuidelines).withSection("installation", site_component_instructions_1.siteComponentInstructions.installation).withSection("react_guidelines", site_component_instructions_1.siteComponentInstructions.reactGuidelines).withSection("css_guidelines", site_component_instructions_1.siteComponentInstructions.cssGuidelines).withSection("design_guidelines", site_component_instructions_1.siteComponentInstructions.designGuidelines).withSection("asset_guidelines", site_component_instructions_1.siteComponentInstructions.assetGuidelines).withSection("response_format", site_component_instructions_1.siteComponentInstructions.responseFormat).withSection("hard_constraints", site_component_instructions_1.siteComponentInstructions.hardConstraints).withImplementationGuidelines(site_component_instructions_1.siteComponentInstructions.typescriptQualityGuidelines);
|
|
92496
92542
|
};
|
|
92497
92543
|
var siteComponentCorePrompt = () => {
|
|
92498
92544
|
return createCoreBuilder({
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
+
"installation": {
|
|
3
|
+
"staticContainer": "HOMEPAGE",
|
|
4
|
+
"initialSize": {
|
|
5
|
+
"width": {
|
|
6
|
+
"sizingType": "pixels",
|
|
7
|
+
"pixels": 400
|
|
8
|
+
},
|
|
9
|
+
"height": {
|
|
10
|
+
"sizingType": "pixels",
|
|
11
|
+
"pixels": 300
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
2
15
|
"editorElement": {
|
|
3
16
|
"data": {
|
|
4
17
|
"text": {
|
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.236",
|
|
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": "
|
|
31
|
+
"falconPackageHash": "4695f084eebd5cfaa3357467ab672d18b687395276473b526c91c5db"
|
|
32
32
|
}
|