@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.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +134 -120
  3. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +6 -0
  4. package/skills/wix-app/references/SITE_PLUGIN.md +2 -2
  5. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
  6. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
  7. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +92 -47
  8. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +15 -6
  9. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
  10. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +29 -42
  11. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +153 -449
  12. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +66 -19
  13. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
  14. package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
  15. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
  16. package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +27 -0
  17. package/skills/wix-app/references/editor-react-component/PARTS.md +45 -24
  18. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
  19. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
  20. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
  21. package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
  22. package/skills/wix-base44-connector/SKILL.md +34 -17
  23. package/skills/wix-base44-connector/scripts/utils.js +33 -25
  24. package/skills/wix-headless/entry/bootstrap.mjs +9 -2
  25. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  26. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +42 -23
  27. package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
  28. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
  29. package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
  30. package/skills/wix-manage/SKILL.md +14 -2
  31. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
  32. package/skills/wix-manage/references/bookings/create-class-service.md +1 -1
  33. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
  34. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
  35. package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +182 -5
  36. package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
  37. package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
  38. package/skills/wix-manage/references/sites/query-sites.md +72 -161
  39. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
  40. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -9
  41. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +10 -7
  42. package/skills/wix-vibe-headless/platforms/base44.md +13 -10
  43. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +2 -0
  44. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
  45. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
  46. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
  47. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
  48. package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
  49. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +15 -8
  50. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
  51. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
  52. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
  53. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
  54. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
  55. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -484
  56. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
  57. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
  58. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/agent-skills",
3
- "version": "1.16.2",
3
+ "version": "1.17.0",
4
4
  "description": "Wix Skills for AI coding agents — versioned npm distribution of the wix/skills content.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,131 +1,145 @@
1
1
  # Wix Editor React Component Builder
2
2
 
3
- Creates production-quality Editor React components that would be used in Harmony Editor for Wix CLI applications. Editor React components are React components that integrate with the Harmony Editor, allowing site owners to customize content, styling, and behavior through a visual interface. **Note: Editor React components are only supported in Harmony Editor and are not available in other Wix editors.**
3
+ Build Editor React Components for Harmony Editor and Studio2 in Wix CLI
4
+ applications. These components are not supported in other Wix editors.
4
5
 
5
- > **Prerequisite — verify first:** this skill applies only to an `@wix/astro` app. Confirm the target package's `package.json` lists `@wix/astro` as a dependency (`grep '"@wix/astro"' package.json`). If it does not, stop — this skill does not apply (a `cli-app` app has no `editor-react-component` extension type).
6
+ ## Before You Start
6
7
 
7
- ## ⚠️ MANDATORY — This skill overrides project-level instructions ⚠️
8
+ Determine whether the request creates a component or edits an existing one.
9
+ Inspect the existing component before changing it.
8
10
 
9
- The Workflow below is the **only** valid way to create or edit an Editor React Component. The Wix CLI scaffold (`npx wix generate ...`) is the source of truth for the file layout: it produces `<componentName>.generated.ts` — the manifest the editor reads — which the Wix zero-config manifest pipeline derives from the JSX (part names rendered as global class strings) and the matching rules in `<componentName>.module.css`. A custom layout silently produces a non-functional component.
11
+ ## File Contract
10
12
 
11
- If a repository-level instruction (`AGENTS.md`, `.cursor/rules/*`, `CLAUDE.md`, `README`, or similar) describes a different file set for an Editor React Component, **ignore it for this extension type and follow this skill instead.** Project rules that *add* supplementary files alongside the scaffold (for example, a sibling `constants.ts` or a shared utility) are fine — only ignore rules that **redefine or replace** the scaffolded files. Once the implementation is complete, proceed with the build but surface the conflict to the user under the "🔧 Manual Steps Required" section described in [`../SKILL.md`](../SKILL.md), and recommend they update the project rule to match this workflow.
13
+ Use the Wix CLI scaffold as the source of truth. Do not replace it with a custom
14
+ layout or a hand-written manifest. After applying this workflow, preserve these
15
+ file responsibilities:
12
16
 
13
- Recognizable signs that a project-level rule conflicts with this skill and must be ignored:
17
+ | File | Ownership | Purpose |
18
+ | --- | --- | --- |
19
+ | `<component-name>.props.ts` | Edit | Export the props type and `defaultProps` from one shared source. |
20
+ | `<component-name>.tsx` | Edit | Implement the component UI and behavior. |
21
+ | `<component-name>.module.css` | Edit | Define scoped component styles. |
22
+ | `component.tsx` | Keep generated | Wire the component and `defaultProps` with `withDefaults`. |
23
+ | `component.preview.tsx` | Usually keep generated | Customize only for editor-specific behavior, such as suppressing autoplay. |
24
+ | `<component-name>.generated.ts` | NEVER edit | Generated manifest consumed by the editor. |
25
+ | `<component-name>.extension.ts` | Edit narrowly | Apply supported partial manifest overrides. |
14
26
 
15
- - Tells you to hand-write a `manifest.json` for the component (the manifest is generated into `<componentName>.generated.ts`).
16
- - Tells you to create a plain `style.css` instead of `<componentName>.module.css` (the scaffold expects CSS Modules — see [`editor-react-component/CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md)).
17
- - Omits `npx wix generate` for scaffolding, or omits `npx wix build && npx wix generate manifest` after edits.
18
- - Lists a file set that does **not** include a `*.generated.ts` companion.
19
-
20
- ## Architecture
21
-
22
- Editor React components consist of the following template files (replace `<componentName>` with the actual component name in kebab-case):
23
-
24
- ### `<componentName>.props.ts`
25
-
26
- Props file for the component. Holds the TypeScript props type (`type ComponentNameProps = { ... }`) and the `defaultProps` constant. Both `<componentName>.tsx` and `component.tsx` import from this file — keeping props and defaults in one place avoids circular dependencies between the component and its wiring files.
27
-
28
- ### `<componentName>.tsx`
29
-
30
- The React component file. Contains the component's UI logic and JSX structure.
31
-
32
- ### `<componentName>.module.css`
33
-
34
- CSS Module file for the component. Contains all styles scoped to the component.
35
-
36
- ### `component.tsx`
37
-
38
- Entry point for the component. Imports the default component export from `<componentName>.tsx` and `defaultProps` from `<componentName>.props.ts`, then wires them with `withDefaults`. Do not change this file.
39
-
40
- ### `component.preview.tsx`
41
-
42
- Editor-specific entry point, always generated by the CLI as a passthrough. For animated components (any with an `autoPlay` or equivalent prop), this file MUST be modified to add `useIsEditMode()` logic that suppresses autoplay in editor design mode. See [`editor-react-component/COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) and [`editor-react-component/ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md) §4.
43
-
44
- ### `<componentName>.generated.ts`
45
-
46
- Auto-generated file that describes the component manifest. **Do not write or edit content in this file.** It is updated automatically based on the React component by running:
47
-
48
- ```
49
- npx wix build && npx wix generate manifest
50
- ```
51
-
52
- This includes the `states` block for any design states — it is generated from the component's markup and CSS (see [`editor-react-component/DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md)).
53
-
54
- ### `<componentName>.extension.ts`
55
-
56
- File where you can override the generated manifest from `<componentName>.generated.ts`. Only include overrides that appear in the boilerplate component — do not add extra overrides beyond what the boilerplate provides.
27
+ Supplementary files such as `constants.ts`, hooks, or internal sub-components
28
+ are allowed when the implementation needs them. Keep the scaffolded files and
29
+ their responsibilities intact.
57
30
 
58
31
  ## Workflow
59
32
 
60
- 1. **MANDATORY** — always use the scaffold; never substitute with manual file creation.
61
- If `src/extensions/site/components/component-name/` does not yet exist, run
62
- `npx wix generate --params '{"extensionType":"EDITOR_REACT_COMPONENT","name":"ComponentName","folder":"component-name","description":"A brief description of what the component does"}'` to scaffold it. The scaffold creates the files under `src/extensions/site/components/<folder>/` and registers the component in `src/extensions.ts`; edit them there (not under `src/site/components/`). Skip this
63
- step when iterating on an existing component — re-running it would
64
- return "an extension already exist" error.
65
- 2. Run the following script to verify that all component creation and review dependencies are installed properly:
66
- `node -e "const fs=require('fs'),path=require('path'),ps=['@wix/react-component-schema','@wix/react-component-utils','@wix/editor-react-types','@babel/parser','@babel/traverse','@babel/types','eslint','eslint-plugin-jsx-a11y','@typescript-eslint/parser','typescript','@types/eslint-plugin-jsx-a11y'];const missing=ps.filter(p=>!(require.resolve.paths(p)||[]).some(d=>fs.existsSync(path.join(d,p,'package.json'))));if(missing.length){console.error('Missing dependencies: '+missing.join(', '));process.exit(1)}" || { d="$PWD"; while [ "$d" != "/" ] && [ ! -f "$d/yarn.lock" ]; do d="${d%/*}"; done; if [ -f "$d/yarn.lock" ]; then yarn add @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && yarn add -D @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser typescript @types/eslint-plugin-jsx-a11y; else npm install @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && npm install --save-dev @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser typescript @types/eslint-plugin-jsx-a11y; fi; }`
67
- 3. Edit the generated React and CSS files in
68
- `src/extensions/site/components/component-name/`. Apply
69
- [`editor-react-component/DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) while
70
- authoring: every interactive named part must use interactive markup and
71
- pair each native state selector with its prefixed global modifier (for
72
- example, `.cta:global(.component-name-cta--hover), .cta:hover`). A
73
- pseudo-class without the matching global modifier is incomplete.
74
- 4. **MANDATORY** — execute the full A11y Review on the edited component per [`editor-react-component/A11Y-REVIEW.md`](editor-react-component/A11Y-REVIEW.md). Run both scanners over the component's `.tsx`/`.jsx` files, complete the Phase 3 manual semantic review, fix confirmed findings, and re-run the scanners after fixes. Reading the reference without executing these steps is not a review. Do not proceed to the build or report completion until the review is complete.
75
- 5. Run `npx wix build && npx wix generate manifest` so the editor picks up
76
- the new/updated prop schema. This command regenerates manifest
77
- parts for all components. Design-states emission requires
78
- `@wix/cli` ≥ 1.1.215 (native and class-triggered states work from
79
- ≥ 1.1.210, but prop-triggered `ElementState` states need ≥ 1.1.215). If a
80
- design state is missing from `<componentName>.generated.ts`, the installed
81
- CLI is older than required — tell the user, and let them decide whether to
82
- upgrade.
83
- 6. Update `Component.extensions.ts` file according to [`editor-react-component/COMPONENT-CONFIGURATION.md`](editor-react-component/COMPONENT-CONFIGURATION.md)
84
-
85
- If the component's primary content is a **playable animation** (Lottie/JSON,
86
- animated GIF/SVG, canvas/WebGL loop, video-like surface), or has an `autoPlay`
87
- (or equivalent) prop, it MUST include an on-stage play/pause control **and** the
88
- generated `component.preview.tsx` MUST be modified to suppress autoplay in the
89
- editor — follow [`editor-react-component/ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md).
90
-
91
- If the component needs **runtime site context** — something no prop can carry —
92
- read [`editor-react-component/SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md)
93
- before writing the code. Triggers, and the only cases that warrant it:
94
-
95
- - The component reflects **where the visitor is** in the site (breadcrumbs, "you
96
- are here" indicators) — not navigation menus, whose items the site owner
97
- authors and which take a `MenuItems` prop.
98
- - The component needs the page's **own URL** (share, copy-link, canonical).
99
- - The site's language direction drives **JavaScript** (keyboard navigation,
100
- transform math, conditional rendering) — not just CSS.
101
- - Behavior must differ while rendering inside the editor.
102
-
103
- Otherwise, do not reach for a hook at all — data the site owner can type or pick
104
- belongs in props.
105
-
106
- Reference: when modifying an _existing_ component, follow
107
- [`editor-react-component/EDIT-FLOW.md`](editor-react-component/EDIT-FLOW.md).
108
-
109
- ## React guidelines
110
-
111
- Core rules and workflow: [`editor-react-component/REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md).
112
-
113
- Topic-focused references (rules + patterns + common mistakes in one place):
114
-
115
- - [`editor-react-component/ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md) — ARIA/a11y rules and patterns
116
- - [`editor-react-component/A11Y-REVIEW.md`](editor-react-component/A11Y-REVIEW.md) — Automated a11y scan + triage workflow to run after editing
117
- - [`editor-react-component/DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) — Which design states a part supports (heuristic) and how to author them
118
- - [`editor-react-component/DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md) — RTL/LTR rules and patterns
119
- - [`editor-react-component/PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md) — What should be a React prop vs CSS
120
- - [`editor-react-component/COMPONENT-API.md`](editor-react-component/COMPONENT-API.md) — Props structure, elementProps, data types, file splitting, containers, array props
121
- - [`editor-react-component/FUNCTION-HANDLERS.md`](editor-react-component/FUNCTION-HANDLERS.md) — Standard SDK event handler props, DOM wiring, custom callbacks
122
- - [`editor-react-component/ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md) — Play/pause control and autoplay for animated/playable components
123
- - [`editor-react-component/COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) — Editor-specific entry point (`component.preview.tsx`), `useIsEditMode()`, when to modify
124
- - [`editor-react-component/SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) — Hooks for runtime site context (site pages, current URL, language direction, editor mode) — read only when a trigger above applies
125
- - [`editor-react-component/REACT-PATTERNS.md`](editor-react-component/REACT-PATTERNS.md) — SSR-safe patterns, CSS rules, remaining common mistakes
126
-
127
- ## CSS guidelines
128
-
129
- Reference: [`editor-react-component/CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md).
130
-
131
- For branded or themed components, also apply: [`editor-react-component/BRANDED-COMPONENTS.md`](editor-react-component/BRANDED-COMPONENTS.md).
33
+ 1. **Scaffold only when creating.** If the component folder does not exist, run:
34
+
35
+ ```bash
36
+ npx wix generate --params '{"extensionType":"EDITOR_REACT_COMPONENT","name":"ComponentName","folder":"component-name","description":"A brief description"}'
37
+ ```
38
+
39
+ The command creates `src/extensions/site/components/<component-name>/` and
40
+ registers the extension in `src/extensions.ts`. Do not rerun it for an
41
+ existing component.
42
+
43
+ 2. **Run the dependency preflight.** Verify that all component creation and
44
+ accessibility-review dependencies are installed:
45
+
46
+ ```bash
47
+ node -e "const fs=require('fs'),path=require('path'),ps=['@wix/react-component-schema','@wix/react-component-utils','@wix/editor-react-types','@babel/parser','@babel/traverse','@babel/types','eslint','eslint-plugin-jsx-a11y','@typescript-eslint/parser','typescript','@types/eslint-plugin-jsx-a11y'];const missing=ps.filter(p=>!(require.resolve.paths(p)||[]).some(d=>fs.existsSync(path.join(d,p,'package.json'))));if(missing.length){console.error('Missing dependencies: '+missing.join(', '));process.exit(1)}" || { d="$PWD"; while [ "$d" != "/" ] && [ ! -f "$d/yarn.lock" ]; do d="${d%/*}"; done; if [ -f "$d/yarn.lock" ]; then yarn add @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && yarn add -D @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser 'typescript@<7' @types/eslint-plugin-jsx-a11y; else npm install @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && npm install --save-dev @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser 'typescript@<7' @types/eslint-plugin-jsx-a11y; fi; }
48
+ ```
49
+
50
+ 3. **Plan the contract and structure.** Identify content and behavior props,
51
+ elect the semantic root, identify named inner parts, and decide which design
52
+ states each part supports. Read the relevant references from the routing
53
+ table below before writing code.
54
+
55
+ 4. **Implement the editable sources.** Preserve the scaffold contract. Keep
56
+ props/defaults in the props file, component logic in the main TSX file, and
57
+ static styling in the CSS Module. Do not edit `*.generated.ts`.
58
+
59
+ 5. **Run the accessibility review.** Follow
60
+ [`editor-react-component/ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md): run both bundled
61
+ scanners, triage their output, complete the manual semantic checklist, fix
62
+ confirmed issues, and rerun the scanners on changed JSX files.
63
+
64
+ 6. **Configure the editor extension when required.** For a new component or a
65
+ requested sizing, installation, or manifest change, apply
66
+ [`editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md)
67
+ to `<component-name>.extension.ts`. Otherwise preserve the existing file.
68
+
69
+ 7. **Generate and validate.** Run:
70
+
71
+ ```bash
72
+ npx wix build && npx wix generate manifest
73
+ npx tsc --noEmit
74
+ ```
75
+
76
+ Run relevant project tests and lint commands when available. Inspect the
77
+ regenerated manifest; never repair it by hand. Design-state generation needs
78
+ `@wix/cli` 1.1.210 or newer, and prop-triggered `ElementState` generation
79
+ needs 1.1.215 or newer. If expected states are absent on an older CLI, report
80
+ the version constraint and let the user decide whether to upgrade. If the
81
+ build or manifest command exits with an error, diagnose it with
82
+ [`editor-react-component/MANIFEST-ERRORS.md`](editor-react-component/MANIFEST-ERRORS.md), apply the
83
+ matching fix, and rerun both commands.
84
+
85
+ 8. **Report the result.** Summarize edited files and checks. Call out any
86
+ unresolved instruction conflict, missing dependency, unsupported CLI
87
+ version, or check that could not run.
88
+
89
+ ## Reference Policy
90
+
91
+ Read every reference required for the current scope. Read an optional reference
92
+ only when its trigger applies; when it does, that reference becomes required.
93
+ Apply every matching row; do not load the entire reference set by default.
94
+
95
+ References refine the active workflow step; they do not restart the workflow or
96
+ expand the user's requested scope. `SKILL.md` is the only reference router;
97
+ reference files are self-contained leaves and do not route to other references.
98
+ For an existing component, preserve out-of-scope public props, styling,
99
+ extension configuration, and supporting files. Never re-scaffold an existing
100
+ component or edit `*.generated.ts` as a reference-driven fix.
101
+
102
+ ### Required References
103
+
104
+ | Scope | Required references |
105
+ | --- | --- |
106
+ | Creating a component | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md), [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md), [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), and [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
107
+ | Editing React or JSX | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md) and [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md) |
108
+ | Changing the public contract, semantic root, or named parts | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), and [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md) |
109
+ | Creating or changing an item array where only one body is visible | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), and [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
110
+ | Creating or changing CSS | [`CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md) |
111
+ | Changing the root direction contract, direction-sensitive behavior, or a `ReactNode` slot | [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md) |
112
+ | Changing sizing, installation, or manifest overrides | [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
113
+
114
+ ### Optional References
115
+
116
+ | Trigger | Read |
117
+ | --- | --- |
118
+ | An interactive or selectable part is created or changed—for example a button, link, input, tab, accordion trigger, or carousel control—or a custom state is added | [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
119
+ | Public event callbacks are added or changed | [`FUNCTION-HANDLERS.md`](editor-react-component/FUNCTION-HANDLERS.md) |
120
+ | Browser APIs, effects, or time-dependent output are introduced | [`SSR.md`](editor-react-component/SSR.md) |
121
+ | `npx wix build` or manifest generation exits with an error | [`MANIFEST-ERRORS.md`](editor-react-component/MANIFEST-ERRORS.md) |
122
+ | Primary content is playable, looped, or autoplaying | [`ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md) and [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
123
+ | Runtime site pages, URLs, JavaScript direction, or reduced-motion context is needed | [`SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) |
124
+ | Non-animation behavior must differ in editor design mode | [`SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) and [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
125
+ | The prompt explicitly requests a branded, themed, or brand-aware component | [`BRANDED-COMPONENTS.md`](editor-react-component/BRANDED-COMPONENTS.md) |
126
+
127
+ ## Core Invariants
128
+
129
+ - Use React 18-compatible APIs; do not assume React 19 runtime features.
130
+ - Include typed `id`, `className`, `direction`, and `a11y` support.
131
+ - Apply `dir={direction}` and the unconditional fallback-direction class to the
132
+ elected root. Use logical CSS properties for direction-sensitive layout.
133
+ - Keep render output deterministic and avoid browser globals during render.
134
+ - Route ARIA through the typed `a11y` contract; do not add one-off ARIA props.
135
+ - Give every named inner part a global class, a CSS Module class, and a matching
136
+ `elementProps` entry. The elected root uses top-level props instead.
137
+ - Pair each eligible native editor design-state selector with its
138
+ editor-injected global modifier. Keep a non-input control's keyboard-only
139
+ `:focus-visible` indicator standalone unless editable focus styling is
140
+ explicitly requested. Toggle custom global state classes from data.
141
+ - For an item array where only one body is visible, give every item a `name`,
142
+ use `ActiveItemIndex<'arrayPropName'>`, render every body, and hide inactive
143
+ bodies accessibly.
144
+ - If primary content autoplays or loops, provide an accessible play/pause
145
+ control, honor reduced motion, and suppress autoplay in editor design mode.
@@ -230,6 +230,12 @@ await embeddedScripts.embedScript({
230
230
  });
231
231
  ```
232
232
 
233
+ ## Releasing Updates
234
+
235
+ `embedScript()` is not only a one-time setup step. A site only ever renders whatever content was active the last time `embedScript()` was called for it — releasing a new app version (even a minor one, e.g. via `wix release`, that only changes the script's HTML/JS with no dynamic-parameter changes) does **not** re-embed the script on sites that already called it. Always prompt the site owner to re-run the dashboard-page action (or call `embedScript()` yourself) after any release that changes an embedded script's content, or production sites will silently keep serving the old version.
236
+
237
+ Adding, removing, or renaming a dynamic parameter is additionally a **major** version change — those sites only pick up the new version after the user clicks Update on the Manage Apps page (or you drive them through the app-installer update flow). See [About App Versioning](https://dev.wix.com/docs/build-apps/manage-your-app/versioning/about-app-versioning).
238
+
233
239
  ## Enable Embedded Script Permission
234
240
 
235
241
  After implementation, the app developer must manually enable the embedded script permission:
@@ -324,14 +324,14 @@ Site plugins can import and use Wix SDK modules directly — you do NOT need `cr
324
324
  ```typescript
325
325
  // ✅ CORRECT — Import SDK modules directly
326
326
  import { items } from "@wix/data";
327
- import { currentCart } from "@wix/ecom";
327
+ import { currentCartV2 } from "@wix/ecom";
328
328
  import { products } from "@wix/stores";
329
329
 
330
330
  class MyPlugin extends HTMLElement {
331
331
  async loadData() {
332
332
  // Call SDK methods directly — no createClient needed
333
333
  const result = await items.query("MyCollection").find();
334
- const cart = await currentCart.getCurrentCart();
334
+ const { cart } = await currentCartV2.getCurrentCart();
335
335
  const productList = await products.queryProducts().limit(10).find();
336
336
  }
337
337
  }
@@ -21,8 +21,8 @@ Order events use **`@wix/ecom`** (namespace `orders`). Order **refund** events a
21
21
  | Order canceled | `import { orders } from "@wix/ecom"` | `orders.onOrderCanceled(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onOrderCanceled](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-canceled?apiView=SDK) |
22
22
  | Refund created | `import { refunds } from "@wix/payments"` | `refunds.onRefundCreated(handler)` | `SCOPE.DC-PAYMENTS.READ-REFUNDS` | [onRefundCreated](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-created?apiView=SDK) |
23
23
  | Refund updated | `import { refunds } from "@wix/payments"` | `refunds.onRefundUpdated(handler)` | `SCOPE.DC-PAYMENTS.READ-REFUNDS` | [onRefundUpdated](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-updated?apiView=SDK) |
24
- | Cart created | `import { cart } from "@wix/ecom"` | `cart.onCartCreated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartCreated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart/cart-created?apiView=SDK) |
25
- | Cart updated | `import { cart } from "@wix/ecom"` | `cart.onCartUpdated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartUpdated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart/cart-updated?apiView=SDK) |
24
+ | Cart created | `import { cartV2 } from "@wix/ecom"` | `cartV2.onCartCreated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartCreated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/cart-created?apiView=SDK) |
25
+ | Cart updated | `import { cartV2 } from "@wix/ecom"` | `cartV2.onCartUpdated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartUpdated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/cart-updated?apiView=SDK) |
26
26
 
27
27
  ## Bookings Events
28
28