@wix/agent-skills 1.16.2 → 1.17.0
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/package.json +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +134 -120
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +6 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +2 -2
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +92 -47
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +15 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +29 -42
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +153 -449
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +66 -19
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
- package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +27 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +45 -24
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
- package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
- package/skills/wix-base44-connector/SKILL.md +34 -17
- package/skills/wix-base44-connector/scripts/utils.js +33 -25
- package/skills/wix-headless/entry/bootstrap.mjs +9 -2
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +42 -23
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
- package/skills/wix-manage/SKILL.md +14 -2
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
- package/skills/wix-manage/references/bookings/create-class-service.md +1 -1
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
- package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +182 -5
- package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
- package/skills/wix-manage/references/sites/query-sites.md +72 -161
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -9
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +10 -7
- package/skills/wix-vibe-headless/platforms/base44.md +13 -10
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +2 -0
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +15 -8
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -484
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# React Component Patterns
|
|
2
|
-
|
|
3
|
-
Code patterns and common mistakes for Editor React components.
|
|
4
|
-
|
|
5
|
-
# Part 1: Implementation Patterns
|
|
6
|
-
|
|
7
|
-
## 1.1 SSR-Safe Implementation
|
|
8
|
-
|
|
9
|
-
Avoid browser-only APIs at module scope or during render; use them inside `useEffect` with `typeof window !== 'undefined'`.
|
|
10
|
-
|
|
11
|
-
**❌ Wrong:**
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
const userAgent = window.navigator.userAgent;
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**✅ Correct:**
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (typeof window !== "undefined") {
|
|
22
|
-
const userAgent = window.navigator.userAgent;
|
|
23
|
-
}
|
|
24
|
-
}, []);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## 1.2 Element Visibility (Platform-Managed)
|
|
28
|
-
|
|
29
|
-
See [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) — element visibility is platform-managed; always render all elements, no conditional rendering.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
# Part 2: CSS/SCSS Rules
|
|
34
|
-
|
|
35
|
-
Authoritative SCSS rules: `REACT-GUIDELINES.md` Part 2. For RTL/logical CSS patterns, see [`DIRECTIONALITY.md`](DIRECTIONALITY.md).
|
|
36
|
-
|
|
37
|
-
## 2.1 What NOT to Include
|
|
38
|
-
|
|
39
|
-
```scss
|
|
40
|
-
// ❌ NEVER include:
|
|
41
|
-
|
|
42
|
-
// Transitions/Animations
|
|
43
|
-
transition: all 0.3s; // ❌
|
|
44
|
-
animation: fadeIn 0.5s; // ❌
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
> Design states (`hover`, `focus`, `selected`, …) are authored per
|
|
48
|
-
> [`DESIGN-STATES.md`](DESIGN-STATES.md).
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
# Part 3: Common Mistakes
|
|
53
|
-
|
|
54
|
-
## 3.1 Custom-state classes
|
|
55
|
-
|
|
56
|
-
For a custom design state, toggle the element's **global** state class from
|
|
57
|
-
its data in JSX (e.g. `isSelected && 'pricing-card-row--selected'`, using the
|
|
58
|
-
component-name-prefixed class) — don't express it as a module-scoped class. State styling lives in [`DESIGN-STATES.md`](DESIGN-STATES.md).
|
|
59
|
-
|
|
60
|
-
## 3.2 Browser APIs at module scope
|
|
61
|
-
|
|
62
|
-
**❌ Wrong:**
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
const isMobile = window.innerWidth < 768; // ❌ SSR breaks
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**✅ Correct:**
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (typeof window !== "undefined") {
|
|
73
|
-
setIsMobile(window.innerWidth < 768);
|
|
74
|
-
}
|
|
75
|
-
}, []);
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 3.3 Use semantic HTML for collection-style UI
|
|
79
|
-
|
|
80
|
-
For lists, breadcrumbs, tabs, menus, and similar collection-style UI, render the underlying semantic HTML directly (`<ol>`/`<ul>` + `<li>`, `<nav>`, `<button role="tab">`, etc.) and own the keyboard / ARIA wiring in your own React code.
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
<ol className="breadcrumbs">
|
|
84
|
-
<li>
|
|
85
|
-
<a href="/">Home</a>
|
|
86
|
-
</li>
|
|
87
|
-
<li>
|
|
88
|
-
<span aria-hidden="true">/</span>
|
|
89
|
-
<a href="/products">Products</a>
|
|
90
|
-
</li>
|
|
91
|
-
</ol>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Handle separators with CSS pseudo-elements or inside each item.
|
|
95
|
-
|