@wix/agent-skills 1.16.0 → 1.16.2

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 (94) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +72 -8
  3. package/skills/wix-app/references/CODE_QUALITY.md +0 -1
  4. package/skills/wix-app/references/DASHBOARD_MODAL.md +21 -14
  5. package/skills/wix-app/references/DASHBOARD_PAGE.md +30 -184
  6. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +19 -3
  7. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +172 -0
  8. package/skills/wix-app/references/dashboard-page/WDS_LAYOUT.md +187 -0
  9. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +12 -7
  10. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +31 -2
  11. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +6 -1
  12. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
  13. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +6 -6
  14. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +167 -0
  15. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -2
  16. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
  17. package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
  18. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
  19. package/skills/wix-base44-connector/SKILL.md +185 -0
  20. package/skills/wix-base44-connector/scripts/utils.js +212 -0
  21. package/skills/wix-design-system/SKILL.md +19 -15
  22. package/skills/wix-docs/SKILL.md +75 -1
  23. package/skills/wix-headless/references/CAPABILITIES.md +16 -3
  24. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  25. package/skills/wix-headless/references/SEED.md +1 -1
  26. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
  27. package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
  28. package/skills/wix-manage/SKILL.md +20 -17
  29. package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
  30. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +1 -2
  31. package/skills/wix-manage/references/domains/domain-search-purchase-and-connect.md +2603 -0
  32. package/skills/wix-manage/references/events/create-wix-event.md +112 -90
  33. package/skills/wix-manage/references/events/manage-wix-events.md +33 -94
  34. package/skills/wix-manage/references/sites/create-headless-site.md +1 -0
  35. package/skills/wix-manage/references/sites/manage-oauth-apps.md +154 -0
  36. package/skills/wix-manage/references/sites/read-site-context.md +125 -0
  37. package/skills/wix-manage/references/sites/site-import.md +67 -15
  38. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +273 -0
  39. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +1 -1
  40. package/skills/wix-vibe-headless/SKILL.md +2 -1
  41. package/skills/wix-vibe-headless/install/deploy.cjs +63 -3
  42. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +104 -0
  43. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +74 -0
  44. package/skills/wix-vibe-headless/platforms/base44.md +15 -40
  45. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +7 -11
  46. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +1 -1
  47. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +7 -11
  48. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +1 -1
  49. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -2
  50. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +7 -12
  51. package/skills/wix-vibe-headless/references/events/seed/SEED.md +1 -1
  52. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +7 -11
  53. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +7 -11
  54. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +1 -1
  55. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +7 -11
  56. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +1 -1
  57. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +7 -11
  58. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +1 -1
  59. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +1 -1
  60. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +5 -3
  61. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +75 -13
  62. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +29 -86
  63. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +3 -8
  64. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +78 -105
  65. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +92 -0
  66. package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +76 -0
  67. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +1 -1
  68. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +44 -5
  69. package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +0 -326
  70. package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +0 -115
  71. package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +0 -264
  72. package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +0 -37
  73. package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +0 -86
  74. package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +0 -119
  75. package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +0 -103
  76. package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +0 -76
  77. package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +0 -82
  78. package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +0 -89
  79. package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +0 -124
  80. package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +0 -91
  81. package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +0 -71
  82. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +0 -70
  83. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +0 -73
  84. package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +0 -98
  85. package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +0 -278
  86. package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +0 -94
  87. package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +0 -43
  88. package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +0 -66
  89. package/skills/wix-app/references/auto-patterns-dashboard/views.md +0 -76
  90. package/skills/wix-app/scripts/generate-auto-patterns.js +0 -510
  91. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +0 -437
  92. package/skills/wix-manage/references/stores/create-product-from-image.md +0 -1031
  93. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +0 -623
  94. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +0 -106
@@ -0,0 +1,172 @@
1
+ # @wix/patterns Component Documentation
2
+
3
+ ## Prerequisites
4
+
5
+ The docs are pre-built at `node_modules/@wix/patterns/dist/docs/` (160+ markdown files + `index.json`). This requires `@wix/patterns` version **1.367.0** or later. Verify they exist:
6
+
7
+ ```bash
8
+ ls node_modules/@wix/patterns/dist/docs/ # expect ~165 .md files + index.json
9
+ ```
10
+
11
+ If the directory is missing, install the package at the minimum version:
12
+
13
+ ```bash
14
+ npm install @wix/patterns@^1.367.0
15
+ ```
16
+
17
+ ## Library Architecture
18
+
19
+ ### Composition Hierarchy
20
+
21
+ ```
22
+ Provider <- WixPatternsProvider or WixPatternsBMProvider
23
+ +-- Page <- CollectionPage, EntityPage, or SettingsPage
24
+ +-- Collection <- Table, Grid, TableGridSwitch, etc.
25
+ +-- Features <- filters, actions, sorting, drag-and-drop, etc.
26
+ ```
27
+
28
+ ### The Collection Triad
29
+
30
+ Each collection type follows the same Component + State + Hook pattern:
31
+
32
+ | Collection | Component | State Type | Hook |
33
+ |------------------|--------------------|-------------------------|---------------------------------|
34
+ | Table | `Table` | `TableState` | `useTableCollection()` |
35
+ | Grid | `Grid` | `GridState` | `useGridCollection()` |
36
+ | TableGridSwitch | `TableGridSwitch` | `TableGridSwitchState` | `useTableGridSwitchCollection()`|
37
+ | TableFolders | `TableFolders` | `TableFoldersState` | `useTableFolders()` |
38
+ | GridFolders | `GridFolders` | `GridFoldersState` | `useGridFolders()` |
39
+
40
+ This table covers the common collection types — the full, authoritative list is in `node_modules/@wix/patterns/dist/docs/index.json`.
41
+
42
+ Create state with the hook -> pass it to the component's `state` prop -> wrap in a page component.
43
+
44
+ ### Choosing the Right Provider
45
+
46
+ | Provider | When to Use |
47
+ |---------------------------------|--------------------------------------------------------------------------------------|
48
+ | `WixPatternsProvider` | **Default — start here.** Auto-detects the environment (BM, Essentials, Giza) and supplies the right context. |
49
+ | `WixPatternsBMProvider` | Optional alternative for Yoshi BM Flow over Business Manager. |
50
+ | `WixPatternsGizaProvider` | Optional alternative for Yoshi BM Flow over Giza. |
51
+ | `WixPatternsEssentialsProvider` | Yoshi Fullstack. |
52
+ | `WixPatternsBaseProvider` | App does **not** run under a Giza/WixEssentials environment and you inject services (i18n, sentry) yourself. |
53
+
54
+ Prefer `WixPatternsProvider` unless the project is on one of the specific Yoshi flows above — it is the documented recommendation for most apps, and it resolves the environment for you rather than making you pick.
55
+
56
+ **Confirm the import path in the provider's own doc file** — these do not all come from the same subpath (`WixPatternsEssentialsProvider` and `WixPatternsBaseProvider` are under `@wix/patterns/essentials`, for instance). Check the project's `package.json` to identify the flow.
57
+
58
+ ### Keep Provider and Page Separate
59
+
60
+ The provider **must** be in a separate parent component from the page content. Hooks like `useTableCollection` require the provider's context to already exist above them in the React tree.
61
+
62
+ **Wrong — provider and page in the same component:**
63
+ ```tsx
64
+ function BadApp() {
65
+ const state = useTableCollection({
66
+ queryName: 'my-items',
67
+ itemKey: (item) => item.id,
68
+ itemName: (item) => item.name,
69
+ fetchData: async () => ({ items: [], total: 0 }),
70
+ filters: {},
71
+ }); // fails at runtime — no provider context above this component
72
+ return (
73
+ <WixPatternsProvider>
74
+ <CollectionPage>
75
+ <Table state={state} columns={[{ title: 'Name', render: (item) => item.name }]} />
76
+ </CollectionPage>
77
+ </WixPatternsProvider>
78
+ );
79
+ }
80
+ ```
81
+
82
+ **Correct — provider in root, page in a separate file:**
83
+ ```tsx
84
+ // App.tsx
85
+ import { WixPatternsProvider } from '@wix/patterns/provider';
86
+
87
+ function App() {
88
+ return (
89
+ <WixPatternsProvider>
90
+ <MyCollectionPage />
91
+ </WixPatternsProvider>
92
+ );
93
+ }
94
+
95
+ // MyCollectionPage.tsx
96
+ import { Table, useTableCollection } from '@wix/patterns';
97
+ import { CollectionPage } from '@wix/patterns/page';
98
+
99
+ function MyCollectionPage() {
100
+ const state = useTableCollection({
101
+ queryName: 'my-items',
102
+ itemKey: (item) => item.id,
103
+ itemName: (item) => item.name,
104
+ fetchData: async () => ({ items: [], total: 0 }),
105
+ filters: {},
106
+ }); // works — the provider context exists above this component
107
+ return (
108
+ <CollectionPage>
109
+ <Table state={state} columns={[{ title: 'Name', render: (item) => item.name }]} />
110
+ </CollectionPage>
111
+ );
112
+ }
113
+ ```
114
+
115
+ Always keep the provider (and router if needed) in the app's root component, and each page in its own file.
116
+
117
+ When the user needs **multiple pages**, use the `@wix/patterns` routing solution (`PatternsReactRouter`, `PatternsReactRoute`, `usePatternsNavigate`) instead of a separate router. Look up the relevant doc files for setup details.
118
+
119
+ ## How to Look Things Up
120
+
121
+ **Don't guess which components or props exist — read the doc files first.**
122
+
123
+ ### Finding the right file
124
+
125
+ - **By name:** Read `node_modules/@wix/patterns/dist/docs/index.json` — it maps every component name to its doc file and category.
126
+ - **By browsing:** List the `dist/docs/` folder. Filenames match component names directly (e.g., `Table.md`, `useTableCollection.md`). Note some names contain spaces (`AI Assistant.md`) or dots (`CollectionPage.Header.md`) — quote paths when searching.
127
+ - **By concept:** Search filenames for keywords (e.g., "filter"). Check `index.json` categories — related components share a category prefix.
128
+
129
+ ### Reading doc files
130
+
131
+ Each doc contains the component's category, import path, description, code examples, and API props table. **Always check the import statement** — not everything comes from `@wix/patterns` (some use subpaths like `@wix/patterns/provider`).
132
+
133
+ ### Following cross-references
134
+
135
+ Docs contain relative Storybook URLs like `[TableState](./?path=/story/...--tablestate)`. To resolve these, **use the link text as the filename**: `[TableState](...)` -> read `TableState.md`.
136
+
137
+ Links to `https://www.docs.wixdesignsystem.com/` are external (Wix Design System) — not part of `@wix/patterns` docs.
138
+
139
+ ## The Collection → Entity Flow
140
+
141
+ A collection page and its item form are **two patterns pages**, not a page plus a modal. Getting the table right and then hand-building the "add item" form in a dashboard modal is the most common way this goes wrong.
142
+
143
+ | Step | What owns it |
144
+ | --- | --- |
145
+ | Navigate from a row / primary action to the item | `usePatternsNavigate()` → `navigateToEntityPage({ path, entity })` |
146
+ | Register the route | `PatternsReactRoute` inside `PatternsReactRouter` |
147
+ | Fetch, save, validation, dirty state, skeletons, errors | `useEntityPage({ fetch, onSave })` |
148
+ | Form state and field binding | `useForm` / `useController` from `@wix/patterns/form` |
149
+ | Body layout | `EntityPage.Header`, `.MainContent`, `.AdditionalContent`, `.Card` |
150
+ | The individual fields inside those cards | `@wix/design-system` (`FormField`, `Input`, `Text`) |
151
+
152
+ `navigateToEntityPage` is preferred over a plain route change because the entity header (title, subtitle, breadcrumbs) renders immediately, without waiting for the fetch.
153
+
154
+ Read `EntityPage.md`, `useEntityPage.md`, and `usePatternsNavigate.md` before implementing — and note that `useCreateCollection` is **not** about creating items; it returns a function that initializes collection state.
155
+
156
+ Reserve dashboard modals for genuine dialogs — delete confirmations, short prompts — not entity editing.
157
+
158
+ ## When Patterns Has No Equivalent
159
+
160
+ A concept is only "missing" from patterns after you've checked `index.json` **and** searched the docs folder by keyword. Then, and only then:
161
+
162
+ 1. Look the component up in `@wix/design-system` via the `wix-design-system` skill.
163
+ 2. Render it *inside* the patterns page shell / collection, not as a replacement for it.
164
+ 3. If WDS lacks it too, compose from WDS primitives (`Box`, `Card`, `Text`) — never restyle patterns internals or add another UI library.
165
+
166
+ Anything page- or collection-shaped (page shell, header, table, grid, filters, sorting, paging, row actions, bulk actions) is patterns' territory. If you're about to build one of those from WDS parts, you skipped a lookup.
167
+
168
+ ## Tips
169
+
170
+ - **Compound components** have separate docs per sub-part: `CollectionPage.md`, `CollectionPage.Header.md`, `CollectionPage.Content.md`.
171
+ - **Hook docs** list configuration options as props in the API table.
172
+ - **Type docs** (e.g., `TableState.md`) describe the shape of state objects.
@@ -0,0 +1,187 @@
1
+ # Dashboard Page Layout Guidelines
2
+
3
+ Layout and spacing guidance for dashboard page content. Wix Design System design language — the 6px base unit, the 12-column grid, spacing tokens, and the common content layouts.
4
+
5
+ > **Scope — read this in the right order.** On a dashboard page, `@wix/patterns` owns the page shell (`CollectionPage` / `EntityPage` / `SettingsPage`) and everything collection-shaped: tables, grids, filters, sorting, paging, row and bulk actions, empty states. This file describes how to lay out content **inside** that shell. It is not a licence to build the shell, a table, or a filter bar out of raw WDS — see [Component Selection Order](../../SKILL.md#component-selection-order) and [WIX_PATTERNS_DOCS.md](../WIX_PATTERNS_DOCS.md) first.
6
+ >
7
+ > Where a patterns page component already establishes structure (page header, content area, sticky footer, table/grid layout), follow the patterns component's own API rather than reproducing the grid by hand. Use the guidance below for the parts patterns leaves to you: cards, forms, statistics rows, marketing sections, and spacing between them.
8
+
9
+
10
+ Layout determines how users interact with your dashboard content. It establishes the structure, hierarchy, and rhythm of your dashboard page, contributing to the overall coherence and user experience. By making mindful and calculated choices in how you organize your content, users can move around more smoothly, saving time and frustration when completing tasks.
11
+
12
+ ### Design Principles
13
+
14
+ To create dashboard pages optimized for user experience, follow these design principles:
15
+
16
+ 1. **Consistent:** Maintain repetitive layouts and content patterns for intuitive and easy-to-read pages.
17
+ 2. **Inclusive:** Create layouts and content that adapt well to various screen sizes.
18
+ 3. **Balanced:** Emphasize the priority of regions and content elements through deliberate management of size and white space.
19
+ 4. **Connected:** Minimize the distance between related regions or content elements to enhance cohesion and navigation.
20
+
21
+
22
+ ### Screen Size
23
+
24
+ Dashboard pages are designed to accommodate various screen sizes rather than being tailored to one specific resolution. The primary content should be at the top of the page to ensure users immediately understand the purpose of the page.
25
+
26
+ > **Note:** Content displayed in the top 600 pixels of the page will be visible for the majority of users.
27
+
28
+
29
+ ### Base Unit
30
+
31
+ The base unit establishes the increment by which all elements and measurements are multiplied. This practice ensures consistency in the spacing and sizing of design elements.
32
+
33
+ > **Note:** The design system is based on a 6px unit.
34
+
35
+ The layout grid, spacing tokens, and nearly all visual elements and sizes adhere to multiples of six (6, 12, 18, 24, etc.), with only occasional exceptions.
36
+
37
+ | TOKEN | SIZE | USE FOR |
38
+ |-------|------|---------|
39
+ | SP1 | 6px | Spacing between components |
40
+ | SP2 | 12px | Spacing between components |
41
+ | SP3 | 18px | Spacing between components |
42
+ | SP4 | 24px | Spacing between components, layout spacing |
43
+ | SP5 | 30px | Layout spacing |
44
+ | SP6 | 36px | Layout spacing |
45
+ | SP7 | 42px | Layout spacing |
46
+ | SP8 | 48px | Layout spacing |
47
+ | SP10 | 54px | Layout spacing |
48
+ | SP11 | 60px | Layout spacing |
49
+
50
+
51
+ ### Layout Structure
52
+
53
+ To best design the layout for your app, understand:
54
+
55
+ 1. The core frame of the app (Application frame)
56
+ 2. The placement and alignment of each segment within the grid layout (Grid layout)
57
+ 3. The content to appear in the grid (Common layouts)
58
+
59
+ #### Application Frame
60
+
61
+ The dashboard app frame is used by the majority of Wix applications settings. Dashboard pages consist of 4 areas:
62
+
63
+ | AREA | USAGE |
64
+ |------|-------|
65
+ | 1. Global navigation (top bar) | General navigation at the top of a page which allows users to navigate between different environments. Full width container with a fixed height of 48px. |
66
+ | 2. Sidebar navigation | Local navigation of an environment. Container with a fixed width of 228px. |
67
+ | 3. Content area | Page content area with a width that's adaptive to screen size. |
68
+ | 4. Side panel (optional) | An optional panel that shows additional actions or content associated with the content of a page. Fixed width of 420px. Can either overlay the main content area or push it from the right side. |
69
+
70
+ **Side Panel Guidelines:**
71
+ - Let the side panel overlay main content when it contains supplementary actions or settings, such as data filters
72
+ - Push main content with the side panel when users must see the full context to continue
73
+
74
+
75
+ #### Grid Layout
76
+
77
+ The system uses a fluid grid layout with a fixed maximum width. It uses columns that scale and resize the content accordingly.
78
+
79
+ The grid is constructed from 3 elements:
80
+ - **Columns** - The design system uses a 12-column grid. Column width is fluid and changes according to the page width.
81
+ - **Gutters** - The gaps between the columns. Gutter width has a fixed value of 24px.
82
+ - **Margins** - By default, a page's content area has 48px side margins and a 48px bottom margin.
83
+
84
+ **Grid Specifications:**
85
+ - Minimum content area width: 864 pixels (each grid column is 50px wide)
86
+ - Maximum content area width: 1248px (each column is 82px wide)
87
+ - Wider screens maintain 1248px content width with side margins stretching to center content
88
+ - Use 24px gap between cards both vertically and horizontally
89
+
90
+
91
+ ### Common Layouts
92
+
93
+ Page layouts can be divided by intention into the following types:
94
+
95
+ #### 1. Form Layouts
96
+
97
+ Forms are pages that allow users to fill in data or edit existing data. Two variations:
98
+
99
+ - **2/3 layout with optional sidebar (8/4 column split)** - Provides flexibility to expose primary and secondary content at the same time
100
+ - **Full width (12 columns)** - Supports advanced product needs with complex structures
101
+
102
+ Both form page layouts include mandatory **Save** and **Cancel** actions in the header and footer areas.
103
+
104
+ **2/3 Layout Best Practices:**
105
+ - Use to expose primary and secondary content at the same time
106
+ - Keep the form easy to scan and comprehend
107
+ - Display a live content preview on the side (widget can be sticky)
108
+ - Use 8 columns for forms to keep text lines and input fields narrow for quicker reading
109
+ - Bring actions closer to related titles (e.g., toggle switches near settings)
110
+
111
+ **Full Width Layout Best Practices:**
112
+ - Use when a form includes complex structures such as tables
113
+ - Use for list items that contain many data columns
114
+
115
+ **Combining Layouts:**
116
+ - Avoid coast-to-coast inputs; keep inputs to 2/3 width of a card, or lay them out in two columns
117
+ - Use white space on the right side for content preview
118
+ - Use full width for tables with many columns and dividers that separate sections
119
+
120
+ > **Note:** A column is easy to read if it is wide enough to accommodate an average of 10 words per line.
121
+
122
+ #### 2. Display Layouts
123
+
124
+ Display pages showcase data or content without accepting input from users. They can contain minor actions such as data filtering.
125
+
126
+ **List (Table):**
127
+ - Tables display large data sets and provide users with a quick overview
128
+ - Use a 12-column layout for tables
129
+ - Enables users to manipulate and act on a data set
130
+
131
+ **List (Grid) Options:**
132
+ - 2 columns (6/6 split) - For items with lengthy descriptions
133
+ - 3 columns (4/4/4 split) - For visual items with multiple data types
134
+ - 4 columns (3/3/3/3 split) - For user-generated galleries and collections, reveals up to 50% more content above the fold than 4/4/4
135
+ - Custom - For mixed content needs
136
+
137
+ **Grid Selection Considerations:**
138
+ - Total amount of items to show
139
+ - Content to display in each list item
140
+ - What objects the list items reflect (match physical shapes when applicable)
141
+
142
+ **Dashboards:**
143
+ Display different types of data on a specific topic using a combination grid.
144
+
145
+ Column span recommendations:
146
+ - **3 or 4 columns** - For list items, previews, marketing, statistics, and charts
147
+ - **12 columns (full width)** - For tables and marketing content
148
+ - **8 columns** - For lists, tables with few data columns, setup wizards, and charts
149
+ - **6 columns** - For lists, tables with few data columns, and statistics
150
+
151
+ **Empty States:**
152
+ - Use full width layout for empty state of a page
153
+ - Indicates feature/product has no data yet, all data cleared, or not set up yet
154
+ - Include clear CTA indicating what to do to fill the page
155
+ - Can combine with other layout elements such as tabs, statistics widgets, or marketing cards
156
+
157
+ #### 3. Marketing Layouts
158
+
159
+ Marketing pages promote new products that site owners are not aware of yet. Built using the `<MarketingPageLayout/>` component split into 2 columns:
160
+
161
+ 1. Promo messaging
162
+ 2. Visual representation of product and features
163
+
164
+ Optional footer area can display features or testimonials list.
165
+
166
+ #### 4. Wizard Layouts
167
+
168
+ Wizard pages guide users through setting up a product or feature. They split complex forms into steps for easier completion.
169
+
170
+ **Entry Points:**
171
+ - A marketing page
172
+ - A marketing card
173
+ - The primary action of a page
174
+ - An empty state
175
+
176
+ > **Note:** Wizards must have a final destination. After completing all steps, users should end up on a relevant page: a dashboard, a details page, or any other relevant location.
177
+
178
+
179
+ ### Related WDS Components (content inside the shell)
180
+
181
+ These are content-level building blocks. They do **not** replace the `@wix/patterns` page shell.
182
+
183
+ - `<Layout />` / `<Cell />` - Grid layout container for content within a page's content area
184
+ - `<Card />` - Content container with 24px gaps between cards
185
+ - `<MarketingPageLayout />` - Marketing page wrapper (marketing pages only — these have no collection, so no patterns shell applies)
186
+
187
+ > **On WDS `<Page />`:** do not use it as the wrapper for a `@wix/patterns` dashboard page. The patterns page component (`CollectionPage` / `EntityPage` / `SettingsPage`) is the shell and already provides the header, content area, and scroll behavior. Reach for WDS `<Page />` only on a page that uses no patterns shell at all.
@@ -2,18 +2,23 @@
2
2
 
3
3
  Use this reference to audit and fix accessibility issues in an Editor React Component. This complements [`ACCESSIBILITY.md`](ACCESSIBILITY.md), which covers ARIA prop conventions and patterns, with an automated scan and triage workflow over the component's runtime, manifest extension, and shared code.
4
4
 
5
- This is not a separate skill. It runs as part of the Editor React Component workflow described in [`../SKILL.md`](../SKILL.md). Run it after editing the React/CSS sources and before `npx wix build && npx wix generate manifest`.
5
+ This is not a separate skill. It runs as part of the Editor React Component workflow described in [`../EDITOR_REACT_COMPONENT.md`](../EDITOR_REACT_COMPONENT.md). Run it after editing the React/CSS sources and before `npx wix build && npx wix generate manifest`.
6
6
 
7
7
  ## Scanner Invocation
8
8
 
9
- Two scanners live at the Editor React Component skill root:
9
+ Two scanners are bundled under `<SKILL_ROOT>/scripts`, where `<SKILL_ROOT>` is
10
+ the absolute path to the directory containing the active skill's `SKILL.md`:
10
11
 
11
12
  ```bash
12
- node scripts/scan-a11y-eslint.cjs <file1> [file2] ...
13
- node scripts/scan-a11y-code.cjs <file1> [file2] ...
13
+ node <SKILL_ROOT>/scripts/scan-a11y-eslint.cjs <file1> [file2] ...
14
+ node <SKILL_ROOT>/scripts/scan-a11y-code.cjs <file1> [file2] ...
14
15
  ```
15
16
 
16
- Run them from the consumer project root (the Wix CLI app's working directory) so dependencies resolve from the project's `package.json`. Pass paths relative to that cwd. The dependency preflight is part of the workflow in [`../SKILL.md`](../SKILL.md).
17
+ Replace `<SKILL_ROOT>` with that absolute path, but run the commands from the
18
+ consumer project root (the Wix CLI app's working directory) so dependencies
19
+ resolve from the project's `package.json`. Pass target paths relative to that
20
+ cwd. The dependency preflight is part of the workflow in
21
+ [`../EDITOR_REACT_COMPONENT.md`](../EDITOR_REACT_COMPONENT.md).
17
22
 
18
23
  The ESLint scanner uses the explicitly declared `eslint-plugin-jsx-a11y` dev dependency. The semantic scanner follows imports up to four levels deep and adds resolution evidence and confidence to its findings.
19
24
 
@@ -52,7 +57,7 @@ Execute every phase inline while editing. Do not pause for approval or add a sep
52
57
  ### Phase 2a: ESLint JSX A11y Scan (Tier 0)
53
58
 
54
59
  ```bash
55
- node scripts/scan-a11y-eslint.cjs <file1> [file2] ...
60
+ node <SKILL_ROOT>/scripts/scan-a11y-eslint.cjs <file1> [file2] ...
56
61
  ```
57
62
 
58
63
  Use each finding's rule ID, message, and location as the rule-specific context. Validate the finding against the component implementation before editing.
@@ -60,7 +65,7 @@ Use each finding's rule ID, message, and location as the rule-specific context.
60
65
  ### Phase 2b: Semantic Scan (Tier 1)
61
66
 
62
67
  ```bash
63
- node scripts/scan-a11y-code.cjs <file1> [file2] ...
68
+ node <SKILL_ROOT>/scripts/scan-a11y-code.cjs <file1> [file2] ...
64
69
  ```
65
70
 
66
71
  Use the emitted resolution path, evidence, and confidence to trace each finding. The scanner output is the source of rule-specific details; the reference only defines how to evaluate and act on those details.
@@ -32,7 +32,7 @@ implementation detail.
32
32
 
33
33
  1. **Props** — `autoPlay`, `loop`, `pauseButtonVisibility`
34
34
  2. **Playback state** — `isPlaying` + `handlePause` / `handleResume`
35
- 3. **Play/pause button** — overlay `<button>` with inline SVG icon + CSS positioning and optional hover-only visibility
35
+ 3. **Play/pause button** — overlay `<button>` with inline SVG icon + CSS positioning and optional hover-only visibility; **must be a named part** (`classNames('component-name-play-button', styles.playButton)`) with hover/focus design-state selectors
36
36
  4. **Modify `component.preview.tsx`** — suppress autoplay in editor design mode
37
37
  5. **Respect `prefers-reduced-motion`** — suppress autoplay when the OS requests reduced motion
38
38
 
@@ -117,10 +117,39 @@ Position the button absolutely so it overlays the content without pushing other
117
117
  inset-inline-end: 5px;
118
118
  inset-block-start: 5px;
119
119
  }
120
+
121
+ /* Design-state selectors: pair native pseudo-class with editor-injected modifier class.
122
+ The editor applies the modifier class (e.g. my-animation-play-button--hover) when
123
+ the site owner previews that state in the design panel, so both selectors must exist. */
124
+ .playButton:global(.my-animation-play-button--hover),
125
+ .playButton:hover {
126
+ /* e.g. background: rgba(255, 255, 255, 1); */
127
+ }
128
+
129
+ .playButton:global(.my-animation-play-button--focus),
130
+ .playButton:focus-visible {
131
+ outline: 2px solid currentColor;
132
+ outline-offset: 2px;
133
+ }
134
+ ```
135
+
136
+ ```tsx
137
+ {/* ✅ Named part: play/pause is always a named part — site owners can style it independently */}
138
+ <button
139
+ type="button"
140
+ className={classNames('my-animation-play-button', styles.playButton)}
141
+ onClick={isPlaying ? handlePause : handleResume}
142
+ aria-label={isPlaying ? 'Pause' : 'Play'}
143
+ >
144
+ {isPlaying ? <PauseIcon /> : <PlayIcon />}
145
+ </button>
120
146
  ```
121
147
 
122
148
  ```css
123
- /* pauseButtonVisibility variants — structural CSS, not named-part rules */
149
+ /* pauseButtonVisibility visibility behavior — descendant CSS is allowed here
150
+ because these rules control the button's *visibility*, not its styling surface.
151
+ The button itself is a named part (classNames('...-play-button', styles.playButton))
152
+ and must carry both a global class and design-state selectors (see above). */
124
153
 
125
154
  /* showOnHover (default) */
126
155
  .root[data-pause-button-visibility="showOnHover"] .playButton {
@@ -187,6 +187,12 @@ When creating TypeScript interfaces for component props, use types from `@wix/ed
187
187
  import type { Link } from "@wix/editor-react-types"; // Reference at node_modules/@wix/react-component-schema/dist/editor-react-types.d.ts
188
188
  ```
189
189
 
190
+ For **function event handler props** (`onClick`, `onDblClick`, `onChange`, `onFocus`, `onBlur`, `onMouseIn`, `onMouseOut`) and custom callbacks, follow [`FUNCTION-HANDLERS.md`](FUNCTION-HANDLERS.md). Key rules:
191
+
192
+ - Use the exact SDK prop names from that file — the manifest system recognizes them
193
+ - Wire them to the correct DOM events (note: `onDblClick` → `onDoubleClick`, `onMouseIn` → `onMouseEnter`, `onMouseOut` → `onMouseLeave`)
194
+ - Custom callbacks not tied to DOM events use `() => void` (no React event parameter)
195
+
190
196
  ### External resources are forbidden
191
197
 
192
198
  All resources rendered or fetched by the component (images, icons, fonts,
@@ -476,4 +482,3 @@ interface ComponentProps {
476
482
  ```
477
483
 
478
484
  See also: [Array Element Types: Always Objects with Named Keys](#array-element-types-always-objects-with-named-keys) — items must be objects with named keys.
479
-
@@ -163,3 +163,63 @@ const componentExtension = extensions.editorReactComponent({
163
163
  },
164
164
  });
165
165
  ```
166
+
167
+ ---
168
+
169
+ ## 5. Adding range constraints for numeric props
170
+
171
+ The zero-config pipeline reads `@min` and `@max` JSDoc tags on numeric props and
172
+ emits them as `number: { min, max }` in the generated manifest. Add these tags
173
+ directly on the prop in the component's props interface — no extension file
174
+ override is needed.
175
+
176
+ ### Heuristic — does this number have a fixed domain?
177
+
178
+ | Scenario | Action |
179
+ |----------|--------|
180
+ | Rating 0–5, column count 1–6, items per row 1–4 | Add `@min` / `@max` |
181
+ | Volume 0–100, playback speed 0.5–5, autoplay delay 0.5–30 | Add `@min` / `@max` |
182
+ | Geo coordinates, zoom level | Add `@min` / `@max` |
183
+ | Arbitrary count, free-form price, unconstrained input | Omit — leave as `number` |
184
+ | Semantic index (active tab, active slide, active item) | Omit — upper bound is driven by the component's own item count, not a fixed domain |
185
+
186
+ ### How to write the tags
187
+
188
+ Add `@min` and `@max` inline in the JSDoc comment for the prop in `<componentName>.props.ts`:
189
+
190
+ ```ts
191
+ export interface RatingWidgetProps {
192
+ /** @min 0 @max 5 */
193
+ rating: number;
194
+ }
195
+ ```
196
+
197
+ Zero-config picks these up during `npx wix build && npx wix generate manifest`
198
+ and emits:
199
+
200
+ ```ts
201
+ rating: {
202
+ dataType: 'number',
203
+ number: { min: '0', max: '5' },
204
+ }
205
+ ```
206
+
207
+ ### Examples
208
+
209
+ ```ts
210
+ // Star rating 0–5
211
+ /** @min 0 @max 5 */
212
+ rating: number;
213
+
214
+ // Volume 0–100
215
+ /** @min 0 @max 100 */
216
+ volume: number;
217
+
218
+ // Playback speed 0.5–5
219
+ /** @min 0.5 @max 5 */
220
+ speed: number;
221
+
222
+ // Column count 1–6
223
+ /** @min 1 @max 6 */
224
+ columns: number;
225
+ ```
@@ -98,19 +98,19 @@ const labelDirection = elementProps?.label?.direction;
98
98
 
99
99
  ### Runtime Direction Checking
100
100
 
101
- **Environment Service (for site direction):**
101
+ **Site direction hook:**
102
102
 
103
- Use service when direction drives JavaScript behavior (keyboard navigation, animation logic, conditional rendering).
103
+ Use the hook **only** when direction drives JavaScript behavior (keyboard navigation, animation logic, conditional rendering). For purely visual RTL, use logical CSS properties instead — see below.
104
104
 
105
105
  ```typescript
106
- import { useService } from '@wix/services-manager-react';
107
- import { EnvironmentDefinition } from '@wix/environment-service/definition';
106
+ import { useLanguageDirection } from '@wix/react-component-utils';
108
107
 
109
- const environmentService = useService(EnvironmentDefinition);
110
- const siteDirection = environmentService.getLanguageDirection();
108
+ const siteDirection = useLanguageDirection();
111
109
  const isRTL = siteDirection === 'rtl';
112
110
  ```
113
111
 
112
+ See [`SITE-CONTEXT-HOOKS.md`](SITE-CONTEXT-HOOKS.md) for the full set of site context hooks.
113
+
114
114
  **Fallback chain (for child components):**
115
115
 
116
116
  ```typescript