@wix/agent-skills 1.16.2 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +134 -120
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +6 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +2 -2
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +92 -47
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +15 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +29 -42
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +153 -449
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +66 -19
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
- package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +27 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +45 -24
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
- package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
- package/skills/wix-base44-connector/SKILL.md +34 -17
- package/skills/wix-base44-connector/scripts/utils.js +33 -25
- package/skills/wix-headless/entry/bootstrap.mjs +9 -2
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +42 -23
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
- package/skills/wix-manage/SKILL.md +14 -2
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
- package/skills/wix-manage/references/bookings/create-class-service.md +1 -1
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
- package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +182 -5
- package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
- package/skills/wix-manage/references/sites/query-sites.md +72 -161
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -9
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +10 -7
- package/skills/wix-vibe-headless/platforms/base44.md +13 -10
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +2 -0
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +15 -8
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -484
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
package/package.json
CHANGED
|
@@ -1,131 +1,145 @@
|
|
|
1
1
|
# Wix Editor React Component Builder
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
6
|
+
## Before You Start
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Determine whether the request creates a component or edits an existing one.
|
|
9
|
+
Inspect the existing component before changing it.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## File Contract
|
|
10
12
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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. **
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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 {
|
|
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
|
|
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 {
|
|
25
|
-
| Cart updated | `import {
|
|
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
|
|