@wix/astro 2.11.0 → 2.13.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 (68) hide show
  1. package/CHANGELOG.md +329 -0
  2. package/build/dependencies/astro-auth/backend-runtime/{chunk-RTCWF7UX.js → chunk-IUZYED2S.js} +2 -2
  3. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.js +1 -1
  4. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.js +1 -1
  5. package/build/dependencies/astro-backend-extensions/backend-runtime/{chunk-RHCMPH4V.js → chunk-F7JXR3EK.js} +4 -3
  6. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.js +1 -1
  7. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.js +1 -1
  8. package/build/dependencies/astro-backend-extensions/{index.d.ts → types/index.d.ts} +15 -4
  9. package/build/dependencies/astro-backoffice-extensions/{index.d.ts → types/index.d.ts} +22 -1
  10. package/build/dependencies/astro-core/{index.d.ts → types/index.d.ts} +17 -6
  11. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.d.ts +6 -0
  12. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/{index.js → customElementHmr.js} +3 -32
  13. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.d.ts +1 -0
  14. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.js +26 -0
  15. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.d.ts +5 -0
  16. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.js +23 -0
  17. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.d.ts +6 -0
  18. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.js +30 -0
  19. package/build/dependencies/astro-custom-elements-extensions/types/index.d.ts +27 -0
  20. package/build/dependencies/astro-embedded-scripts-extensions/{index.d.ts → types/index.d.ts} +2 -2
  21. package/build/dependencies/astro-site-component-panels-extensions/types/index.d.ts +21 -0
  22. package/build/dependencies/astro-site-components-extensions/types/index.d.ts +36 -0
  23. package/build/dependencies/astro-site-plugins-extensions/{index.d.ts → types/index.d.ts} +5 -3
  24. package/build/integration/builders.d.ts +321 -8
  25. package/build/integration/builders.js +12 -9
  26. package/build/integration/builders.js.map +1 -1
  27. package/build/integration/{chunk-OJIGUJIG.js → chunk-AT5HXBVK.js} +1709 -407
  28. package/build/integration/chunk-AT5HXBVK.js.map +1 -0
  29. package/build/integration/index.d.ts +1 -1
  30. package/build/integration/index.js +16 -28
  31. package/build/integration/index.js.map +1 -1
  32. package/package.json +9 -6
  33. package/build/builders.d.ts +0 -6
  34. package/build/builders.js +0 -42
  35. package/build/builders.js.map +0 -1
  36. package/build/dependencies/astro-auth/index.d.ts +0 -7
  37. package/build/dependencies/astro-auth/index.js +0 -301
  38. package/build/dependencies/astro-auth/index.js.map +0 -1
  39. package/build/dependencies/astro-backend-extensions/index.js +0 -7279
  40. package/build/dependencies/astro-backend-extensions/index.js.map +0 -1
  41. package/build/dependencies/astro-backoffice-extensions/index.js +0 -7159
  42. package/build/dependencies/astro-backoffice-extensions/index.js.map +0 -1
  43. package/build/dependencies/astro-core/index.js +0 -1055
  44. package/build/dependencies/astro-core/index.js.map +0 -1
  45. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/index.d.ts +0 -11
  46. package/build/dependencies/astro-custom-elements-extensions/index.d.ts +0 -24
  47. package/build/dependencies/astro-custom-elements-extensions/index.js +0 -10082
  48. package/build/dependencies/astro-custom-elements-extensions/index.js.map +0 -1
  49. package/build/dependencies/astro-embedded-scripts-extensions/index.js +0 -8453
  50. package/build/dependencies/astro-embedded-scripts-extensions/index.js.map +0 -1
  51. package/build/dependencies/astro-html-embeds/index.d.ts +0 -5
  52. package/build/dependencies/astro-html-embeds/index.js +0 -25
  53. package/build/dependencies/astro-html-embeds/index.js.map +0 -1
  54. package/build/dependencies/astro-payment-links/index.d.ts +0 -5
  55. package/build/dependencies/astro-payment-links/index.js +0 -42
  56. package/build/dependencies/astro-payment-links/index.js.map +0 -1
  57. package/build/dependencies/astro-robots/index.d.ts +0 -5
  58. package/build/dependencies/astro-robots/index.js +0 -23
  59. package/build/dependencies/astro-robots/index.js.map +0 -1
  60. package/build/dependencies/astro-site-plugins-extensions/index.js +0 -49
  61. package/build/dependencies/astro-site-plugins-extensions/index.js.map +0 -1
  62. package/build/dependencies/astro-viewer-api/index.d.ts +0 -5
  63. package/build/dependencies/astro-viewer-api/index.js +0 -22
  64. package/build/dependencies/astro-viewer-api/index.js.map +0 -1
  65. package/build/index.d.ts +0 -16
  66. package/build/index.js +0 -56
  67. package/build/index.js.map +0 -1
  68. package/build/integration/chunk-OJIGUJIG.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,329 @@
1
+ # @wix/astro
2
+
3
+ ## 2.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#439](https://github.com/wix-incubator/headless-integrations/pull/439) [`4daf766`](https://github.com/wix-incubator/headless-integrations/commit/4daf766b905c006ba67236b63f9bea30d8553bc8) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Rename dashboardWidget builder to dashboardPlugin.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#411](https://github.com/wix-incubator/headless-integrations/pull/411) [`5ef5acf`](https://github.com/wix-incubator/headless-integrations/commit/5ef5acfa01f42888d00db586cbb2ad3d92255869) Thanks [@fantua](https://github.com/fantua)! - Added server bundles support for Site Components extensions
12
+
13
+ ## 2.12.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#413](https://github.com/wix-incubator/headless-integrations/pull/413) [`c7d33d0`](https://github.com/wix-incubator/headless-integrations/commit/c7d33d0d84269be5d210d491315943c6242992ba) Thanks [@ronami](https://github.com/ronami)! - Add support for using a settings panel:
18
+
19
+ ```ts
20
+ import { app } from '@wix/astro/builders';
21
+ import * as extensions from '@wix/astro/builders';
22
+
23
+ export default app().use(
24
+ extensions.customElement({
25
+ id: '7e89117e-1e36-4e87-bf0e-fd4ba8570c91',
26
+ name: 'custom-element',
27
+ base: { name: 'custom-element' },
28
+ behaviors: {},
29
+ dependencies: [],
30
+ element: './extensions/custom-element/element.ts',
31
+ installation: { base: { autoAdd: true } },
32
+ settings: './extensions/custom-element/settings.tsx',
33
+ size: { height: { defaultHeight: 500 }, width: { defaultWidth: 500 } },
34
+ tagName: 'custom-element',
35
+ })
36
+ );
37
+ ```
38
+
39
+ ## 2.11.1
40
+
41
+ ### Patch Changes
42
+
43
+ - [#397](https://github.com/wix-incubator/headless-integrations/pull/397) [`305c73b`](https://github.com/wix-incubator/headless-integrations/commit/305c73bddf3634fe63b4399765c857011fb81dcd) Thanks [@BrooklynKing](https://github.com/BrooklynKing)! - Adding support for presets in Site Components
44
+
45
+ - [#412](https://github.com/wix-incubator/headless-integrations/pull/412) [`e892255`](https://github.com/wix-incubator/headless-integrations/commit/e8922555c5af076ce7c9e984fec2dbf3810cf584) Thanks [@BrooklynKing](https://github.com/BrooklynKing)! - Adding support for Editor Preview in Site Components
46
+
47
+ - [#399](https://github.com/wix-incubator/headless-integrations/pull/399) [`aad4bc4`](https://github.com/wix-incubator/headless-integrations/commit/aad4bc4ce45375e5a856274ff91ec188b53af5d2) Thanks [@BrooklynKing](https://github.com/BrooklynKing)! - Adding support for sdk in Site Components
48
+
49
+ ## 2.11.0
50
+
51
+ ### Minor Changes
52
+
53
+ - [#400](https://github.com/wix-incubator/headless-integrations/pull/400) [`30d11e8`](https://github.com/wix-incubator/headless-integrations/commit/30d11e879d9e8a7c3d637c4b683b0a01e6a2d8b6) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Rename backofficeExtensionMenuPlugin > dashboardMenuPlugin, backofficeModal > dashboardModal, backofficePage > dashboardPage, backofficeExtensionWidget > dashboardWidget.
54
+
55
+ ### Patch Changes
56
+
57
+ - [#386](https://github.com/wix-incubator/headless-integrations/pull/386) [`3f55571`](https://github.com/wix-incubator/headless-integrations/commit/3f55571d741afcbcd05c7545b00cc1386f62785e) Thanks [@BrooklynKing](https://github.com/BrooklynKing)! - Added support for Site Components Panels
58
+
59
+ - [#373](https://github.com/wix-incubator/headless-integrations/pull/373) [`af3fd17`](https://github.com/wix-incubator/headless-integrations/commit/af3fd1749be57dbdea7102eecb6ca3cc640d06e2) Thanks [@tomsa9](https://github.com/tomsa9)! - Update headless SDK
60
+
61
+ - [#398](https://github.com/wix-incubator/headless-integrations/pull/398) [`33510ca`](https://github.com/wix-incubator/headless-integrations/commit/33510ca7864fe0768f4f7cf2115f3dd39f023b55) Thanks [@kfirstri](https://github.com/kfirstri)! - Add custom component runtime and entries to the vite optimization list
62
+
63
+ - [#193](https://github.com/wix-incubator/headless-integrations/pull/193) [`44baa6c`](https://github.com/wix-incubator/headless-integrations/commit/44baa6cdaa2141f650d2e7c8a8cc371c8ebf50c7) Thanks [@fantua](https://github.com/fantua)! - Added SDK support for Site Components extensions
64
+
65
+ - [#393](https://github.com/wix-incubator/headless-integrations/pull/393) [`5384a4a`](https://github.com/wix-incubator/headless-integrations/commit/5384a4ac591e3a982d05e3526b7c9e903be050a7) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Renamed builders ecomDiscountsTrigger and ecomGiftCardsProvider to ecomDiscountTriggers and ecomGiftCards.
66
+
67
+ ## 2.10.1
68
+
69
+ ### Patch Changes
70
+
71
+ - [#363](https://github.com/wix-incubator/headless-integrations/pull/363) [`d1ccad9`](https://github.com/wix-incubator/headless-integrations/commit/d1ccad960c7b7d530d330e0856e845a697145269) Thanks [@dor-chaouat](https://github.com/dor-chaouat)! - bypass auth middleware for app extensions
72
+
73
+ ## 2.10.0
74
+
75
+ ### Minor Changes
76
+
77
+ - [#345](https://github.com/wix-incubator/headless-integrations/pull/345) [`e6044ee`](https://github.com/wix-incubator/headless-integrations/commit/e6044ee4b99d2ad39e0e06c117ad4c7d5c7d6b9d) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Refactored the codebase to consolidate everything into a single publishable package, removing all nested dependent packages.
78
+
79
+ ## 2.9.0
80
+
81
+ ### Minor Changes
82
+
83
+ - [#263](https://github.com/wix-incubator/headless-integrations/pull/263) [`76be268`](https://github.com/wix-incubator/headless-integrations/commit/76be268fdc1853ecda132a93c87fda8db6eb74b9) Thanks [@dor-chaouat](https://github.com/dor-chaouat)! - Add Viewer API route support for Wix services integration
84
+
85
+ This release introduces a new Viewer API route handler that enables Wix services such as Invoices, Price Quotes, and other viewer-based APIs that are served from `_api` under the user's domain. The route automatically proxies requests from the user's Astro domain to their corresponding Wix domain.
86
+
87
+ **Example Usage:**
88
+ When a user visits:
89
+
90
+ ```
91
+ https://www.user-astro-domain.com/_api/invoice/33ad59bb-fb18-4515-80b9-2f630ad035e4/view?token=123
92
+ ```
93
+
94
+ The request is automatically redirected to:
95
+
96
+ ```
97
+ https://www.user-wix-domain.com/_api/invoice/33ad59bb-fb18-4515-80b9-2f630ad035e4/view?token=123
98
+ ```
99
+
100
+ ### Patch Changes
101
+
102
+ - [#145](https://github.com/wix-incubator/headless-integrations/pull/145) [`3ef6e99`](https://github.com/wix-incubator/headless-integrations/commit/3ef6e994a25c45adc3672926fbfe2f836acb58fd) Thanks [@fantua](https://github.com/fantua)! - Added Site Component extensions support
103
+
104
+ - [#320](https://github.com/wix-incubator/headless-integrations/pull/320) [`54a7fbf`](https://github.com/wix-incubator/headless-integrations/commit/54a7fbfce9062b301d005bb11489300b0e7905d4) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Implement placeholders in the app manifest and introduce a development metadata endpoint to provide runtime metadata during dev.
105
+
106
+ - Updated dependencies [[`3ef6e99`](https://github.com/wix-incubator/headless-integrations/commit/3ef6e994a25c45adc3672926fbfe2f836acb58fd), [`54a7fbf`](https://github.com/wix-incubator/headless-integrations/commit/54a7fbfce9062b301d005bb11489300b0e7905d4), [`59add11`](https://github.com/wix-incubator/headless-integrations/commit/59add11c442ca649990c6594123132c3434c88d4), [`41c8148`](https://github.com/wix-incubator/headless-integrations/commit/41c8148bb2de5ef24c201409e0b40066434679b1), [`76be268`](https://github.com/wix-incubator/headless-integrations/commit/76be268fdc1853ecda132a93c87fda8db6eb74b9), [`0641ef9`](https://github.com/wix-incubator/headless-integrations/commit/0641ef94744b26f7c82a433d420805cfe476615a), [`d60d10a`](https://github.com/wix-incubator/headless-integrations/commit/d60d10a63a984732bd20b593ab648a776ca360c1)]:
107
+ - @wix/astro-site-components-extensions@2.3.1
108
+ - @wix/astro-auth@2.3.1
109
+ - @wix/astro-backend-extensions@2.3.1
110
+ - @wix/astro-backoffice-extensions@2.4.1
111
+ - @wix/astro-core@2.4.0
112
+ - @wix/astro-custom-elements-extensions@2.4.0
113
+ - @wix/astro-embedded-scripts-extensions@2.4.0
114
+ - @wix/astro-html-embeds@2.3.1
115
+ - @wix/astro-payment-links@2.3.1
116
+ - @wix/astro-robots@2.3.1
117
+ - @wix/astro-site-plugins-extensions@2.3.1
118
+ - @wix/astro-viewer-api@3.0.0
119
+
120
+ ## 2.6.0
121
+
122
+ ### Minor Changes
123
+
124
+ - [#269](https://github.com/wix-incubator/headless-integrations/pull/269) [`5420b6d`](https://github.com/wix-incubator/headless-integrations/commit/5420b6db5663933b7f44d3407f38393fff79605a) Thanks [@dor-chaouat](https://github.com/dor-chaouat)! - adjust app manifest to write required extension data
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [[`5420b6d`](https://github.com/wix-incubator/headless-integrations/commit/5420b6db5663933b7f44d3407f38393fff79605a)]:
129
+ - @wix/astro-custom-elements-extensions@2.2.0
130
+
131
+ ## 2.5.0
132
+
133
+ ### Minor Changes
134
+
135
+ - [#264](https://github.com/wix-incubator/headless-integrations/pull/264) [`d0e99bc`](https://github.com/wix-incubator/headless-integrations/commit/d0e99bc187193896f207a194e8753fc70bcbc897) Thanks [@dor-chaouat](https://github.com/dor-chaouat)! - add missing files property for `@wix/astro-site-plugins-extensions`
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies [[`d0e99bc`](https://github.com/wix-incubator/headless-integrations/commit/d0e99bc187193896f207a194e8753fc70bcbc897)]:
140
+ - @wix/astro-site-plugins-extensions@2.2.0
141
+
142
+ ## 2.4.0
143
+
144
+ ### Minor Changes
145
+
146
+ - [#194](https://github.com/wix-incubator/headless-integrations/pull/194) [`bf6dc8a`](https://github.com/wix-incubator/headless-integrations/commit/bf6dc8aa6faef7c99549a9a782076eef23e5a4dc) Thanks [@ronami](https://github.com/ronami)! - add initial support for using site plugin extension:
147
+
148
+ #### `src/extensions.ts`
149
+
150
+ ```ts
151
+ import { app } from '@wix/astro/builders';
152
+ import * as extensions from '@wix/astro/builders';
153
+
154
+ export default app().use(
155
+ extensions.sitePlugin({
156
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
157
+ marketData: { name: '' },
158
+ placements: [],
159
+ referenceComponentId: '',
160
+ })
161
+ );
162
+ ```
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [[`bf6dc8a`](https://github.com/wix-incubator/headless-integrations/commit/bf6dc8aa6faef7c99549a9a782076eef23e5a4dc)]:
167
+ - @wix/astro-site-plugins-extensions@2.1.0
168
+
169
+ ## 2.3.0
170
+
171
+ ### Minor Changes
172
+
173
+ - [#139](https://github.com/wix-incubator/headless-integrations/pull/139) [`e86ec26`](https://github.com/wix-incubator/headless-integrations/commit/e86ec26db343d92c2bb9c436942ca3cedd429da1) Thanks [@ronami](https://github.com/ronami)! - add initial support for custom element extension:
174
+
175
+ #### `src/extensions.ts`
176
+
177
+ ```ts
178
+ import { app } from '@wix/astro/builders';
179
+ import * as extensions from '@wix/astro/builders';
180
+
181
+ export default app().use(
182
+ extensions.customElement({
183
+ element: './extensions/custom-element/element.ts',
184
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
185
+ name: 'custom-element',
186
+ tagName: 'custom-element',
187
+ })
188
+ );
189
+ ```
190
+
191
+ #### `src/extensions/custom-element/element.ts`
192
+
193
+ ```ts
194
+ export default class extends HTMLElement {
195
+ public connectedCallback() {
196
+ this.innerHTML = `<div data-testid="custom-element">Hello from custom element!</div>`;
197
+ }
198
+ }
199
+ ```
200
+
201
+ - [#168](https://github.com/wix-incubator/headless-integrations/pull/168) [`0c92d0a`](https://github.com/wix-incubator/headless-integrations/commit/0c92d0af2d8398716d530185246546dacaaa3851) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Introduces built-in support for `robots.txt`. Here’s an example:
202
+
203
+ ```ts
204
+ import wix from '@wix/astro';
205
+ import { defineConfig } from 'astro/config';
206
+
207
+ export default defineConfig({
208
+ integrations: [wix({ enableRobots: false })],
209
+ });
210
+ ```
211
+
212
+ - [#132](https://github.com/wix-incubator/headless-integrations/pull/132) [`f81e2fe`](https://github.com/wix-incubator/headless-integrations/commit/f81e2fe637867afb9f09c150229098a0f9bb4bb9) Thanks [@ronami](https://github.com/ronami)! - add initial support for embedded scripts
213
+
214
+ - [#196](https://github.com/wix-incubator/headless-integrations/pull/196) [`b2509de`](https://github.com/wix-incubator/headless-integrations/commit/b2509de8e9f30ab569a12f03c76cdb0e0e12daf5) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - The configuration for the Astro Wix extension has been changed.
215
+
216
+ Previous API:
217
+
218
+ ```ts
219
+ import wix from '@wix/astro';
220
+
221
+ wix({
222
+ enableAuthRoutes: true,
223
+ enableHtmlEmbeds: true,
224
+ enableRobots: true,
225
+ });
226
+ ```
227
+
228
+ Current API:
229
+
230
+ ```ts
231
+ import wix from '@wix/astro';
232
+
233
+ wix({
234
+ auth: true, // or auth: { enable: true }
235
+ htmlEmbeds: true, // or htmlEmbeds: { enable: true }
236
+ robots: true, // or robots: { enable: true }
237
+ });
238
+ ```
239
+
240
+ ### Patch Changes
241
+
242
+ - Updated dependencies [[`e86ec26`](https://github.com/wix-incubator/headless-integrations/commit/e86ec26db343d92c2bb9c436942ca3cedd429da1), [`0c92d0a`](https://github.com/wix-incubator/headless-integrations/commit/0c92d0af2d8398716d530185246546dacaaa3851), [`8431423`](https://github.com/wix-incubator/headless-integrations/commit/84314238bba6ecb5278a39abce2c2d7c0245b2fe), [`f81e2fe`](https://github.com/wix-incubator/headless-integrations/commit/f81e2fe637867afb9f09c150229098a0f9bb4bb9), [`73c4c7f`](https://github.com/wix-incubator/headless-integrations/commit/73c4c7f548e7269eb509abb86443c79718e52143)]:
243
+ - @wix/astro-custom-elements-extensions@2.1.0
244
+ - @wix/astro-core@2.2.0
245
+ - @wix/astro-robots@2.1.0
246
+ - @wix/astro-payment-links@2.2.0
247
+ - @wix/astro-embedded-scripts-extensions@2.1.0
248
+ - @wix/astro-auth@2.2.0
249
+
250
+ ## 2.2.0
251
+
252
+ ### Minor Changes
253
+
254
+ - [#121](https://github.com/wix-incubator/headless-integrations/pull/121) [`903244c`](https://github.com/wix-incubator/headless-integrations/commit/903244ce7aae605eedd187ceecedc2c65796817e) Thanks [@ronami](https://github.com/ronami)! - Release minor version of packages after recently failed releases
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [[`903244c`](https://github.com/wix-incubator/headless-integrations/commit/903244ce7aae605eedd187ceecedc2c65796817e), [`d5f3624`](https://github.com/wix-incubator/headless-integrations/commit/d5f36244bc5b424702825631df8e1a91b6cf3359)]:
259
+ - @wix/astro-auth@2.1.0
260
+ - @wix/astro-backend-extensions@2.1.0
261
+ - @wix/astro-backoffice-extensions@2.1.0
262
+ - @wix/astro-core@2.1.0
263
+ - @wix/astro-html-embeds@2.1.0
264
+ - @wix/astro-payment-links@2.1.0
265
+
266
+ ## 2.1.0
267
+
268
+ ### Minor Changes
269
+
270
+ - [#25](https://github.com/wix-incubator/headless-integrations/pull/25) [`4e0b6c2`](https://github.com/wix-incubator/headless-integrations/commit/4e0b6c23054bd2fb7230f437d59d45bb54b3bed0) Thanks [@ronami](https://github.com/ronami)! - Adjusts the way to define the Wix app manifest. Instead of the current convention of using a filesystem convention (e.g. `src/extensions/*/extension.json`), a single file is expected: `src/extensions.ts` (and it's optional).
271
+
272
+ The file let's developers define their app manifest programmatically:
273
+
274
+ ```ts
275
+ import { app, backofficePage, extension } from '@wix/astro/builders';
276
+
277
+ export default app()
278
+ .use(
279
+ backofficePage({
280
+ component: './extensions/my-page/page.tsx',
281
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
282
+ routePath: 'hello',
283
+ title: 'Trusted Index Page',
284
+ })
285
+ )
286
+ .use(
287
+ extension({
288
+ compData: {
289
+ webhook: {
290
+ callbackUrl: 'https://www.wix.com',
291
+ },
292
+ },
293
+ compId: 'f988e3bc-acaa-4aca-9cf8-2cd81cc39ee8',
294
+ compType: 'WEBHOOK',
295
+ })
296
+ );
297
+ ```
298
+
299
+ Some of the data is used to build each component correctly (and has a specific helper method to create it), along with a generic `extension()` method for purely-configuration extensions (or ones the developer built separately).
300
+
301
+ Note that this is a breaking change.
302
+
303
+ ### Patch Changes
304
+
305
+ - [#113](https://github.com/wix-incubator/headless-integrations/pull/113) [`920410e`](https://github.com/wix-incubator/headless-integrations/commit/920410eec124488a35601b8e7e99895c385e3e94) Thanks [@ronami](https://github.com/ronami)! - Stop bundling SDK related packages to avoid multiple copies of these dependencies.
306
+
307
+ - [#92](https://github.com/wix-incubator/headless-integrations/pull/92) [`2652759`](https://github.com/wix-incubator/headless-integrations/commit/2652759d29f0911d02b0f5b8be9a7d97a0208c65) Thanks [@ronami](https://github.com/ronami)! - Patch version bump to try and fix the release workflow
308
+
309
+ - [#26](https://github.com/wix-incubator/headless-integrations/pull/26) [`948a404`](https://github.com/wix-incubator/headless-integrations/commit/948a4041161ae35876e507d70efb03ae40f9a6cd) Thanks [@kfirstri](https://github.com/kfirstri)! - Added wix paylink support
310
+
311
+ - Updated dependencies [[`920410e`](https://github.com/wix-incubator/headless-integrations/commit/920410eec124488a35601b8e7e99895c385e3e94), [`2652759`](https://github.com/wix-incubator/headless-integrations/commit/2652759d29f0911d02b0f5b8be9a7d97a0208c65), [`4e0b6c2`](https://github.com/wix-incubator/headless-integrations/commit/4e0b6c23054bd2fb7230f437d59d45bb54b3bed0), [`83e191d`](https://github.com/wix-incubator/headless-integrations/commit/83e191d1d5e09dcf08ad82c2f8d973d2461add53)]:
312
+ - @wix/astro-payment-links@2.0.1
313
+ - @wix/astro-html-embeds@2.0.1
314
+ - @wix/astro-extensions@2.1.0
315
+ - @wix/astro-auth@2.0.1
316
+
317
+ ## 2.0.0
318
+
319
+ ### Major Changes
320
+
321
+ - [#23](https://github.com/wix-incubator/headless-integrations/pull/23) [`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed) Thanks [@ronami](https://github.com/ronami)! - add initial support for releasing via `changesets`
322
+
323
+ ### Patch Changes
324
+
325
+ - Updated dependencies [[`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed), [`4a957b4`](https://github.com/wix-incubator/headless-integrations/commit/4a957b452e595727aae622af478528581dda8a5c)]:
326
+ - @wix/astro-app-manifest@2.0.0
327
+ - @wix/astro-auth@2.0.0
328
+ - @wix/astro-extensions@2.0.0
329
+ - @wix/astro-html-embeds@2.0.0
@@ -82,8 +82,8 @@ var elevatedContextualClient = createClient2({
82
82
  });
83
83
 
84
84
  // src/runtime/backend/setupContextualClient.ts
85
- contextualClient.enableContext("global");
86
- elevatedContextualClient.enableContext("global", { elevated: true });
85
+ contextualClient.enableContext("module");
86
+ elevatedContextualClient.enableContext("module", { elevated: true });
87
87
 
88
88
  export {
89
89
  authAsyncLocalStorage
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-HPW4ZAEJ.js";
4
4
  import {
5
5
  authAsyncLocalStorage
6
- } from "../chunk-RTCWF7UX.js";
6
+ } from "../chunk-IUZYED2S.js";
7
7
  import "../chunk-MLKGABMK.js";
8
8
 
9
9
  // src/middleware/auth.ts
@@ -1,2 +1,2 @@
1
- import "../../chunk-RTCWF7UX.js";
1
+ import "../../chunk-IUZYED2S.js";
2
2
  import "../../chunk-MLKGABMK.js";
@@ -1,5 +1,6 @@
1
1
  // src/runtime/utils.ts
2
2
  import { AppStrategy, createClient } from "@wix/sdk";
3
+ import { wixContext } from "@wix/sdk-context";
3
4
  import { WIX_CLIENT_ID } from "astro:env/client";
4
5
  import { WIX_CLIENT_PUBLIC_KEY, WIX_CLIENT_SECRET } from "astro:env/server";
5
6
  async function setupClient(fn) {
@@ -10,11 +11,11 @@ async function setupClient(fn) {
10
11
  publicKey: WIX_CLIENT_PUBLIC_KEY
11
12
  })
12
13
  });
13
- const olderClient = globalThis.__wix_context__?.client;
14
- client.enableContext("global");
14
+ const olderClient = wixContext.client;
15
+ client.enableContext("module");
15
16
  await fn();
16
17
  if (olderClient) {
17
- olderClient.enableContext("global");
18
+ olderClient.enableContext("module");
18
19
  }
19
20
  return client;
20
21
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setupClient
3
- } from "../chunk-RHCMPH4V.js";
3
+ } from "../chunk-F7JXR3EK.js";
4
4
 
5
5
  // src/runtime/setupServicePlugin.ts
6
6
  async function setupServicePlugin(fn) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setupClient
3
- } from "../chunk-RHCMPH4V.js";
3
+ } from "../chunk-F7JXR3EK.js";
4
4
 
5
5
  // src/runtime/setupWebhook.ts
6
6
  async function setupWebhook(fn) {
@@ -8,6 +8,7 @@ interface EcomAdditionalFees {
8
8
  }
9
9
  interface Options$6 {
10
10
  id: string;
11
+ name: string;
11
12
  source: string;
12
13
  }
13
14
  declare function ecomAdditionalFees(options: Options$6): EcomAdditionalFees;
@@ -18,9 +19,10 @@ interface EcomDiscountsTrigger {
18
19
  }
19
20
  interface Options$5 {
20
21
  id: string;
22
+ name: string;
21
23
  source: string;
22
24
  }
23
- declare function ecomDiscountsTrigger(options: Options$5): EcomDiscountsTrigger;
25
+ declare function ecomDiscountTriggers(options: Options$5): EcomDiscountsTrigger;
24
26
 
25
27
  interface EcomGiftCardsProvider {
26
28
  type: 'EcomGiftCardsProvider';
@@ -28,9 +30,10 @@ interface EcomGiftCardsProvider {
28
30
  }
29
31
  interface Options$4 {
30
32
  id: string;
33
+ name: string;
31
34
  source: string;
32
35
  }
33
- declare function ecomGiftCardsProvider(options: Options$4): EcomGiftCardsProvider;
36
+ declare function ecomGiftCards(options: Options$4): EcomGiftCardsProvider;
34
37
 
35
38
  interface EcomPaymentSettings {
36
39
  type: 'EcomPaymentSettings';
@@ -38,6 +41,8 @@ interface EcomPaymentSettings {
38
41
  }
39
42
  interface Options$3 {
40
43
  id: string;
44
+ name: string;
45
+ fallbackValueForRequires3dSecure?: boolean;
41
46
  source: string;
42
47
  }
43
48
  declare function ecomPaymentSettings(options: Options$3): EcomPaymentSettings;
@@ -49,7 +54,12 @@ interface EcomShippingRates {
49
54
  interface Options$2 {
50
55
  id: string;
51
56
  name: string;
57
+ dashboardUrl?: string;
58
+ description?: string;
59
+ fallbackDefinitionMandatory?: boolean;
60
+ learnMoreUrl?: string;
52
61
  source: string;
62
+ thumbnailUrl?: string;
53
63
  }
54
64
  declare function ecomShippingRates(options: Options$2): EcomShippingRates;
55
65
 
@@ -59,7 +69,9 @@ interface EcomValidations {
59
69
  }
60
70
  interface Options$1 {
61
71
  id: string;
72
+ name: string;
62
73
  source: string;
74
+ validateInCart?: boolean;
63
75
  }
64
76
  declare function ecomValidations(options: Options$1): EcomValidations;
65
77
 
@@ -69,9 +81,8 @@ interface Webhook {
69
81
  }
70
82
  interface Options {
71
83
  id: string;
72
- slug: string;
73
84
  source: string;
74
85
  }
75
86
  declare function webhook(options: Options): Webhook;
76
87
 
77
- export { createIntegration as default, ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
88
+ export { createIntegration as default, ecomAdditionalFees, ecomDiscountTriggers, ecomGiftCards, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
@@ -8,7 +8,20 @@ interface BackofficeExtensionMenuPlugin {
8
8
  }
9
9
  interface Options$3 {
10
10
  id: string;
11
- component: string;
11
+ action: {
12
+ navigateToPage: {
13
+ pageId: string;
14
+ };
15
+ } | {
16
+ openModal: {
17
+ componentId: string;
18
+ };
19
+ };
20
+ description?: string;
21
+ extends: string;
22
+ iconKey: string;
23
+ subtitle?: string;
24
+ title: string;
12
25
  }
13
26
  declare function backofficeExtensionMenuPlugin(options: Options$3): BackofficeExtensionMenuPlugin;
14
27
 
@@ -19,6 +32,10 @@ interface BackofficeExtensionWidget {
19
32
  interface Options$2 {
20
33
  id: string;
21
34
  component: string;
35
+ description?: string;
36
+ extends: string;
37
+ height?: number;
38
+ title: string;
22
39
  }
23
40
  declare function backofficeExtensionWidget(options: Options$2): BackofficeExtensionWidget;
24
41
 
@@ -29,6 +46,10 @@ interface BackofficeModal {
29
46
  interface Options$1 {
30
47
  id: string;
31
48
  component: string;
49
+ height?: number;
50
+ iconKey?: string;
51
+ title: string;
52
+ width?: number;
32
53
  }
33
54
  declare function backofficeModal(options: Options$1): BackofficeModal;
34
55
 
@@ -10,12 +10,14 @@ declare class Model extends EventEmitter<EventMap> {
10
10
  appId: string;
11
11
  env: Record<string, string>;
12
12
  extensions: BaseExtension[];
13
+ srcDir: string;
13
14
  private server;
14
- constructor({ appId, env, extensions, server, }: {
15
+ constructor({ appId, env, extensions, server, srcDir, }: {
15
16
  appId: string;
16
17
  env: Record<string, string>;
17
18
  extensions: BaseExtension[];
18
19
  server: ViteDevServer;
20
+ srcDir: string;
19
21
  });
20
22
  }
21
23
 
@@ -27,11 +29,17 @@ interface BuildMetadata {
27
29
  clientDir: string;
28
30
  outDir: string;
29
31
  serverDir?: string;
32
+ serverUrlPlaceholder: string;
33
+ staticsUrlPlaceholder: string;
30
34
  }
31
35
  type CreateExtensionViteConfig = (opts: {
32
36
  name: string;
33
37
  config: InlineConfig;
34
38
  }) => InlineConfig;
39
+ interface DevMetadata {
40
+ serverUrlPlaceholder: string;
41
+ staticsUrlPlaceholder: string;
42
+ }
35
43
  interface IntegrationHooks {
36
44
  /**
37
45
  * Called before the app manifest is created.
@@ -40,6 +48,8 @@ interface IntegrationHooks {
40
48
  */
41
49
  'wix:app-manifest:setup': (options: {
42
50
  model: Model;
51
+ serverUrlPlaceholder: string;
52
+ staticsUrlPlaceholder: string;
43
53
  updateAppManifest: (newAppManifest: Partial<DevCenterAppManifest>) => void;
44
54
  }) => Promise<void> | void;
45
55
  /**
@@ -56,17 +66,18 @@ interface IntegrationHooks {
56
66
  model: Model;
57
67
  }) => Promise<void> | void;
58
68
  /**
59
- * Wrapper around `astro:build:setup`, called during `astro build`.
69
+ * Called after main astro dev server has been started.
60
70
  */
61
- 'wix:build:setup': (options: {
71
+ 'wix:server:start': (options: {
62
72
  createExtensionViteConfig: CreateExtensionViteConfig;
73
+ setupExtensionProxy: (server: ViteDevServer) => void;
63
74
  }) => Promise<void> | void;
64
75
  /**
65
- * Wrapper around `astro:server:setup`, called during `astro dev`.
76
+ * Wrapper around `astro:build:setup`, called during `astro build`.
66
77
  *
67
78
  * Note: Applied only for `target: 'client'`.
68
79
  */
69
- 'wix:server:setup': (options: {
80
+ 'wix:build:setup': (options: {
70
81
  createExtensionViteConfig: CreateExtensionViteConfig;
71
82
  }) => Promise<void> | void;
72
83
  }
@@ -92,4 +103,4 @@ interface GenericExtension {
92
103
  }
93
104
  declare function genericExtension(options: BaseDevCenterComponent): GenericExtension;
94
105
 
95
- export { type BaseExtension, type BuildMetadata, type CreateExtensionViteConfig, type IntegrationHooks, Model, type WixIntegration, app, createIntegration as default, genericExtension };
106
+ export { type BaseExtension, type BuildMetadata, type CreateExtensionViteConfig, type DevMetadata, type IntegrationHooks, Model, type WixIntegration, app, createIntegration as default, genericExtension };
@@ -0,0 +1,6 @@
1
+ declare function customElementHmr({ customElement, tagName, }: {
2
+ customElement: CustomElementConstructor;
3
+ tagName: string;
4
+ }): void;
5
+
6
+ export { customElementHmr };
@@ -1,5 +1,5 @@
1
- // src/runtime/handleHmr.ts
2
- function handleHmr({
1
+ // src/runtime/customElementHmr.ts
2
+ function customElementHmr({
3
3
  customElement,
4
4
  tagName
5
5
  }) {
@@ -41,35 +41,6 @@ function visitPrototypeChain(rootClass, visitFn) {
41
41
  visitFn(classForVisiting);
42
42
  }
43
43
  }
44
-
45
- // ../astro-browser-runtime/src/sdk/site.ts
46
- import { createClient } from "@wix/sdk";
47
- import { site } from "@wix/site";
48
- var enableClient = (applicationId) => {
49
- const host = site.host({ applicationId });
50
- const auth = site.auth();
51
- const wixClient = createClient({
52
- auth,
53
- host
54
- });
55
- wixClient.enableContext("module");
56
- return auth.getAccessTokenInjector();
57
- };
58
-
59
- // src/runtime/wrapCustomElement.ts
60
- function wrapCustomElement({
61
- customElement,
62
- tagName
63
- }) {
64
- const injectAccessTokenFunction = enableClient(import.meta.env.WIX_CLIENT_ID);
65
- Object.defineProperty(customElement.prototype, "accessTokenListener", {
66
- configurable: false,
67
- value: injectAccessTokenFunction,
68
- writable: false
69
- });
70
- customElements.define(tagName, customElement);
71
- }
72
44
  export {
73
- handleHmr,
74
- wrapCustomElement
45
+ customElementHmr
75
46
  };
@@ -0,0 +1 @@
1
+ export * from '@wix/astro-browser-runtime/hmr/react-component';
@@ -0,0 +1,26 @@
1
+ // ../astro-browser-runtime/src/hmr/react-component.tsx
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ function createComponentHmrWrapper(OriginalComponent, hotData) {
4
+ return (props) => {
5
+ const [WrappedComponent, setComponent] = useState(
6
+ () => hotData.Component ?? OriginalComponent
7
+ );
8
+ const isMountedRef = useRef(false);
9
+ useEffect(() => {
10
+ isMountedRef.current = true;
11
+ hotData.setComponent = (NewComponent) => {
12
+ hotData.Component = NewComponent;
13
+ if (isMountedRef.current) {
14
+ setComponent(() => NewComponent);
15
+ }
16
+ };
17
+ return () => {
18
+ isMountedRef.current = false;
19
+ };
20
+ }, []);
21
+ return /* @__PURE__ */ React.createElement(WrappedComponent, { ...props });
22
+ };
23
+ }
24
+ export {
25
+ createComponentHmrWrapper
26
+ };