@wix/agent-skills 1.16.1 → 1.16.3

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 (73) 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 +14 -6
  7. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +6 -0
  8. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +172 -0
  9. package/skills/wix-app/references/dashboard-page/WDS_LAYOUT.md +187 -0
  10. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +32 -2
  11. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +38 -1
  12. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +27 -4
  13. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +167 -0
  14. package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +19 -0
  15. package/skills/wix-app/references/editor-react-component/PARTS.md +1 -2
  16. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -2
  17. package/skills/wix-base44-connector/SKILL.md +185 -0
  18. package/skills/wix-base44-connector/scripts/utils.js +212 -0
  19. package/skills/wix-design-system/SKILL.md +19 -15
  20. package/skills/wix-docs/SKILL.md +75 -1
  21. package/skills/wix-manage/SKILL.md +16 -18
  22. package/skills/wix-manage/references/bookings/create-class-service.md +1 -1
  23. package/skills/wix-manage/references/domains/domain-search-purchase-and-connect.md +2603 -0
  24. package/skills/wix-manage/references/events/create-wix-event.md +112 -90
  25. package/skills/wix-manage/references/events/manage-wix-events.md +33 -94
  26. package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +182 -5
  27. package/skills/wix-manage/references/sites/create-headless-site.md +1 -0
  28. package/skills/wix-manage/references/sites/manage-oauth-apps.md +154 -0
  29. package/skills/wix-manage/references/sites/read-site-context.md +125 -0
  30. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +273 -0
  31. package/skills/wix-vibe-headless/install/deploy.cjs +1 -2
  32. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +104 -0
  33. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +74 -0
  34. package/skills/wix-vibe-headless/platforms/base44.md +3 -3
  35. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +1 -1
  36. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +1 -1
  37. package/skills/wix-vibe-headless/references/events/seed/SEED.md +1 -1
  38. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +1 -1
  39. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +1 -1
  40. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +1 -1
  41. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +68 -2
  42. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +29 -86
  43. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +3 -8
  44. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +78 -105
  45. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +92 -0
  46. package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +76 -0
  47. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +1 -1
  48. package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +0 -326
  49. package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +0 -115
  50. package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +0 -264
  51. package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +0 -37
  52. package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +0 -86
  53. package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +0 -119
  54. package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +0 -103
  55. package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +0 -76
  56. package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +0 -82
  57. package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +0 -89
  58. package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +0 -124
  59. package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +0 -91
  60. package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +0 -71
  61. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +0 -70
  62. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +0 -73
  63. package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +0 -98
  64. package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +0 -278
  65. package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +0 -94
  66. package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +0 -43
  67. package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +0 -66
  68. package/skills/wix-app/references/auto-patterns-dashboard/views.md +0 -76
  69. package/skills/wix-app/scripts/generate-auto-patterns.js +0 -510
  70. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +0 -437
  71. package/skills/wix-manage/references/stores/create-product-from-image.md +0 -1031
  72. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +0 -623
  73. 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.
@@ -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 a hover design state and a standalone `:focus-visible` keyboard indicator
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,40 @@ 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
+ /* Keyboard indicator only — deliberately unpaired: focus is not an editor
130
+ design state on a non-input control. Do not add a --focus modifier here. */
131
+ .playButton:focus-visible {
132
+ outline: 2px solid currentColor;
133
+ outline-offset: 2px;
134
+ }
135
+ ```
136
+
137
+ ```tsx
138
+ {/* ✅ Named part: play/pause is always a named part — site owners can style it independently */}
139
+ <button
140
+ type="button"
141
+ className={classNames('my-animation-play-button', styles.playButton)}
142
+ onClick={isPlaying ? handlePause : handleResume}
143
+ aria-label={isPlaying ? 'Pause' : 'Play'}
144
+ >
145
+ {isPlaying ? <PauseIcon /> : <PlayIcon />}
146
+ </button>
120
147
  ```
121
148
 
122
149
  ```css
123
- /* pauseButtonVisibility variants — structural CSS, not named-part rules */
150
+ /* pauseButtonVisibility visibility behavior — descendant CSS is allowed here
151
+ because these rules control the button's *visibility*, not its styling surface.
152
+ The button itself is a named part (classNames('...-play-button', styles.playButton))
153
+ and must carry both a global class and design-state selectors (see above). */
124
154
 
125
155
  /* showOnHover (default) */
126
156
  .root[data-pause-button-visibility="showOnHover"] .playButton {
@@ -130,6 +130,38 @@ when arithmetic is needed: `price: number`, not `price: string`).
130
130
 
131
131
  When the parent component defines an array prop (e.g., `items`), child/item components receive a single item directly. They do NOT redeclare the data structure in their own props.
132
132
 
133
+ ### Active-item components (one body visible at a time)
134
+
135
+ Apply when the UI shows **one array item body at a time** (tabs, slideshow,
136
+ steps). Skip for always-visible lists, multi-select, or multi-expand accordion.
137
+
138
+ - Each item needs **`name: string`** — Studio hat labels (not `label` or other keys).
139
+ - Pair the array with **`ActiveItemIndex<'arrayPropName'>`** from
140
+ `@wix/react-component-utils`; the type param must match the array prop name.
141
+ Default the index to `0` in `defaultProps`.
142
+ - Render **all** item bodies (`.map`); toggle visibility with `--active` +
143
+ `display: none` on inactive panels (functional visibility — see
144
+ [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md)), plus `aria-hidden` and `inert` on
145
+ inactive bodies.
146
+ - Keyboard navigation between triggers; ARIA roles per
147
+ [`ACCESSIBILITY.md`](ACCESSIBILITY.md).
148
+
149
+ ```typescript
150
+ import type { ActiveItemIndex } from '@wix/react-component-utils';
151
+
152
+ export type ItemType = { name: string; body: string };
153
+
154
+ export type MyComponentProps = {
155
+ items: Array<ItemType>;
156
+ activeItem: ActiveItemIndex<'items'>;
157
+ };
158
+
159
+ export const defaultProps = {
160
+ items: [{ name: 'Item 1', body: '…' }],
161
+ activeItem: 0,
162
+ } satisfies Omit<MyComponentProps, 'id' | 'className'>;
163
+ ```
164
+
133
165
  ### Array Element Types: Always Objects with Named Keys
134
166
 
135
167
  Array elements MUST be objects with named keys. This enables stable item identity (each item can carry its own `id`/`key`), non-breaking extension (new fields can be added later without changing the prop signature), and semantic naming (each value has meaning instead of being an opaque scalar).
@@ -187,6 +219,12 @@ When creating TypeScript interfaces for component props, use types from `@wix/ed
187
219
  import type { Link } from "@wix/editor-react-types"; // Reference at node_modules/@wix/react-component-schema/dist/editor-react-types.d.ts
188
220
  ```
189
221
 
222
+ For **function event handler props** (`onClick`, `onDblClick`, `onChange`, `onFocus`, `onBlur`, `onMouseIn`, `onMouseOut`) and custom callbacks, follow [`FUNCTION-HANDLERS.md`](FUNCTION-HANDLERS.md). Key rules:
223
+
224
+ - Use the exact SDK prop names from that file — the manifest system recognizes them
225
+ - Wire them to the correct DOM events (note: `onDblClick` → `onDoubleClick`, `onMouseIn` → `onMouseEnter`, `onMouseOut` → `onMouseLeave`)
226
+ - Custom callbacks not tied to DOM events use `() => void` (no React event parameter)
227
+
190
228
  ### External resources are forbidden
191
229
 
192
230
  All resources rendered or fetched by the component (images, icons, fonts,
@@ -476,4 +514,3 @@ interface ComponentProps {
476
514
  ```
477
515
 
478
516
  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
-
@@ -9,14 +9,31 @@ and `.module.css`.
9
9
 
10
10
  | Element | Author these states |
11
11
  |---|---|
12
- | Interactive — `button`/`a`/`input`/`select`/`textarea`/`summary`, an interactive `role` (`button`/`link`/`tab`/`switch`/`checkbox`/`radio`/`menuitem`/`option`), or an interactive handler (`onClick`/`onMouseEnter`/`onFocus`/…) | `hover`, `focus` |
12
+ | Interactive — `button`/`a`/`input`/`select`/`textarea`/`summary`, an interactive `role`, or an interactive handler (`onClick`/`onMouseEnter`/`onFocus`/…) | `hover` |
13
+ | Input field — `select`/`textarea`; `input` except `hidden`/`button`/`submit`/`reset`/`image`; or an input-widget `role` (`checkbox`/`radio`/`switch`/`slider`/`spinbutton`/`textbox`/`searchbox`/`combobox`/`listbox`) | `focus` |
14
+ | Other interactive element whose editable focus appearance the user explicitly requests | `focus` |
13
15
  | Disableable — `button`/`input`/`select`/`textarea`/`fieldset` or a disableable role | `disabled` (+ `invalid` for `input`/`select`/`textarea`) |
14
16
  | Has a selectable/variant value in its data — `selected`/`active`/`current`/`open`/`expanded`/`checked`/`featured` | that custom state |
15
17
  | None of the above | no states — resting style only |
16
18
 
19
+ An explicit `role` overrides the tag's implicit semantics: `<input role="button">`
20
+ is a non-input control, and `<div role="checkbox">` is an input field.
21
+
22
+ A `focus` design state is an editor styling control, not the keyboard focus
23
+ indicator itself. Do not add a global `--focus` modifier to a non-input control
24
+ unless the user explicitly asks for an editable focus state. A control that
25
+ restyles its own `outline`, `background`, or `border` MUST still carry a
26
+ standalone `:focus-visible` rule — that rule is its only keyboard affordance.
27
+
17
28
  A custom state may also be driven by a root-level boolean prop (e.g.
18
29
  `isFeatured`) instead of by markup or item data — see §5.
19
30
 
31
+ For **active-item components** (tabs, slideshow, steps), the `--active` state on
32
+ each item is driven by comparing the item's index to the active-index prop
33
+ (`index === activeItem`), not by a per-item boolean flag — see
34
+ [Active-item components](COMPONENT-API.md#active-item-components-one-body-visible-at-a-time)
35
+ in [`COMPONENT-API.md`](COMPONENT-API.md).
36
+
20
37
  ## 2. Name the state class
21
38
 
22
39
  Flat: the element's own global class + `--<state>`. Because inner-part
@@ -31,9 +48,12 @@ nested (`card__row--selected`).
31
48
  Put the resting value in the bare class; put only the state override in the
32
49
  state selector.
33
50
 
34
- - **Native** — pair the pseudo-class with the `:global` modifier. Every native
35
- state needs both selectors in the same rule; do not split the pair across
36
- states (for example, pseudo-only `hover` plus global-only `disabled`).
51
+ - **Native design state** — pair the pseudo-class with the `:global` modifier.
52
+ Every exposed native state needs both selectors in the same rule; do not
53
+ split the pair across states (for example, pseudo-only `hover` plus
54
+ global-only `disabled`). A standalone `:focus-visible` accessibility rule on
55
+ a non-input control is intentionally not an editor design state and therefore
56
+ has no `:global` modifier.
37
57
  - **Custom** — the `:global` modifier alone.
38
58
 
39
59
  The bare selector is the short **module** class (`.cta`); the `:global(...)`
@@ -51,6 +71,9 @@ state class is the **prefixed** global one.
51
71
  .cta:disabled {
52
72
  opacity: 0.5;
53
73
  }
74
+ .cta:focus-visible {
75
+ outline: 2px solid currentColor;
76
+ } /* keyboard indicator only; not an editor design state */
54
77
  .plan-row:global(.pricing-card-plan-row--selected) {
55
78
  border-color: #6366f1;
56
79
  }