@wix/astro 2.11.0 → 2.12.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 (62) hide show
  1. package/CHANGELOG.md +319 -0
  2. package/build/dependencies/astro-backend-extensions/{index.d.ts → types/index.d.ts} +15 -3
  3. package/build/dependencies/astro-backoffice-extensions/{index.d.ts → types/index.d.ts} +22 -1
  4. package/build/dependencies/astro-core/{index.d.ts → types/index.d.ts} +17 -6
  5. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.d.ts +6 -0
  6. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/{index.js → customElementHmr.js} +3 -32
  7. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.d.ts +1 -0
  8. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.js +26 -0
  9. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.d.ts +5 -0
  10. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.js +23 -0
  11. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.d.ts +6 -0
  12. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.js +30 -0
  13. package/build/dependencies/astro-custom-elements-extensions/types/index.d.ts +27 -0
  14. package/build/dependencies/astro-embedded-scripts-extensions/{index.d.ts → types/index.d.ts} +2 -2
  15. package/build/dependencies/astro-site-component-panels-extensions/types/index.d.ts +21 -0
  16. package/build/dependencies/astro-site-components-extensions/types/index.d.ts +36 -0
  17. package/build/dependencies/astro-site-plugins-extensions/{index.d.ts → types/index.d.ts} +5 -3
  18. package/build/integration/builders.d.ts +322 -8
  19. package/build/integration/builders.js +12 -9
  20. package/build/integration/builders.js.map +1 -1
  21. package/build/integration/{chunk-OJIGUJIG.js → chunk-UBCQK5ZU.js} +1431 -323
  22. package/build/integration/chunk-UBCQK5ZU.js.map +1 -0
  23. package/build/integration/index.d.ts +1 -1
  24. package/build/integration/index.js +16 -28
  25. package/build/integration/index.js.map +1 -1
  26. package/package.json +6 -3
  27. package/build/builders.d.ts +0 -6
  28. package/build/builders.js +0 -42
  29. package/build/builders.js.map +0 -1
  30. package/build/dependencies/astro-auth/index.d.ts +0 -7
  31. package/build/dependencies/astro-auth/index.js +0 -301
  32. package/build/dependencies/astro-auth/index.js.map +0 -1
  33. package/build/dependencies/astro-backend-extensions/index.js +0 -7279
  34. package/build/dependencies/astro-backend-extensions/index.js.map +0 -1
  35. package/build/dependencies/astro-backoffice-extensions/index.js +0 -7159
  36. package/build/dependencies/astro-backoffice-extensions/index.js.map +0 -1
  37. package/build/dependencies/astro-core/index.js +0 -1055
  38. package/build/dependencies/astro-core/index.js.map +0 -1
  39. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/index.d.ts +0 -11
  40. package/build/dependencies/astro-custom-elements-extensions/index.d.ts +0 -24
  41. package/build/dependencies/astro-custom-elements-extensions/index.js +0 -10082
  42. package/build/dependencies/astro-custom-elements-extensions/index.js.map +0 -1
  43. package/build/dependencies/astro-embedded-scripts-extensions/index.js +0 -8453
  44. package/build/dependencies/astro-embedded-scripts-extensions/index.js.map +0 -1
  45. package/build/dependencies/astro-html-embeds/index.d.ts +0 -5
  46. package/build/dependencies/astro-html-embeds/index.js +0 -25
  47. package/build/dependencies/astro-html-embeds/index.js.map +0 -1
  48. package/build/dependencies/astro-payment-links/index.d.ts +0 -5
  49. package/build/dependencies/astro-payment-links/index.js +0 -42
  50. package/build/dependencies/astro-payment-links/index.js.map +0 -1
  51. package/build/dependencies/astro-robots/index.d.ts +0 -5
  52. package/build/dependencies/astro-robots/index.js +0 -23
  53. package/build/dependencies/astro-robots/index.js.map +0 -1
  54. package/build/dependencies/astro-site-plugins-extensions/index.js +0 -49
  55. package/build/dependencies/astro-site-plugins-extensions/index.js.map +0 -1
  56. package/build/dependencies/astro-viewer-api/index.d.ts +0 -5
  57. package/build/dependencies/astro-viewer-api/index.js +0 -22
  58. package/build/dependencies/astro-viewer-api/index.js.map +0 -1
  59. package/build/index.d.ts +0 -16
  60. package/build/index.js +0 -56
  61. package/build/index.js.map +0 -1
  62. package/build/integration/chunk-OJIGUJIG.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,319 @@
1
+ # @wix/astro
2
+
3
+ ## 2.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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:
8
+
9
+ ```ts
10
+ import { app } from '@wix/astro/builders';
11
+ import * as extensions from '@wix/astro/builders';
12
+
13
+ export default app().use(
14
+ extensions.customElement({
15
+ id: '7e89117e-1e36-4e87-bf0e-fd4ba8570c91',
16
+ name: 'custom-element',
17
+ base: { name: 'custom-element' },
18
+ behaviors: {},
19
+ dependencies: [],
20
+ element: './extensions/custom-element/element.ts',
21
+ installation: { base: { autoAdd: true } },
22
+ settings: './extensions/custom-element/settings.tsx',
23
+ size: { height: { defaultHeight: 500 }, width: { defaultWidth: 500 } },
24
+ tagName: 'custom-element',
25
+ })
26
+ );
27
+ ```
28
+
29
+ ## 2.11.1
30
+
31
+ ### Patch Changes
32
+
33
+ - [#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
34
+
35
+ - [#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
36
+
37
+ - [#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
38
+
39
+ ## 2.11.0
40
+
41
+ ### Minor Changes
42
+
43
+ - [#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.
44
+
45
+ ### Patch Changes
46
+
47
+ - [#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
48
+
49
+ - [#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
50
+
51
+ - [#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
52
+
53
+ - [#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
54
+
55
+ - [#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.
56
+
57
+ ## 2.10.1
58
+
59
+ ### Patch Changes
60
+
61
+ - [#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
62
+
63
+ ## 2.10.0
64
+
65
+ ### Minor Changes
66
+
67
+ - [#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.
68
+
69
+ ## 2.9.0
70
+
71
+ ### Minor Changes
72
+
73
+ - [#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
74
+
75
+ 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.
76
+
77
+ **Example Usage:**
78
+ When a user visits:
79
+
80
+ ```
81
+ https://www.user-astro-domain.com/_api/invoice/33ad59bb-fb18-4515-80b9-2f630ad035e4/view?token=123
82
+ ```
83
+
84
+ The request is automatically redirected to:
85
+
86
+ ```
87
+ https://www.user-wix-domain.com/_api/invoice/33ad59bb-fb18-4515-80b9-2f630ad035e4/view?token=123
88
+ ```
89
+
90
+ ### Patch Changes
91
+
92
+ - [#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
93
+
94
+ - [#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.
95
+
96
+ - 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)]:
97
+ - @wix/astro-site-components-extensions@2.3.1
98
+ - @wix/astro-auth@2.3.1
99
+ - @wix/astro-backend-extensions@2.3.1
100
+ - @wix/astro-backoffice-extensions@2.4.1
101
+ - @wix/astro-core@2.4.0
102
+ - @wix/astro-custom-elements-extensions@2.4.0
103
+ - @wix/astro-embedded-scripts-extensions@2.4.0
104
+ - @wix/astro-html-embeds@2.3.1
105
+ - @wix/astro-payment-links@2.3.1
106
+ - @wix/astro-robots@2.3.1
107
+ - @wix/astro-site-plugins-extensions@2.3.1
108
+ - @wix/astro-viewer-api@3.0.0
109
+
110
+ ## 2.6.0
111
+
112
+ ### Minor Changes
113
+
114
+ - [#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
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [[`5420b6d`](https://github.com/wix-incubator/headless-integrations/commit/5420b6db5663933b7f44d3407f38393fff79605a)]:
119
+ - @wix/astro-custom-elements-extensions@2.2.0
120
+
121
+ ## 2.5.0
122
+
123
+ ### Minor Changes
124
+
125
+ - [#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`
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [[`d0e99bc`](https://github.com/wix-incubator/headless-integrations/commit/d0e99bc187193896f207a194e8753fc70bcbc897)]:
130
+ - @wix/astro-site-plugins-extensions@2.2.0
131
+
132
+ ## 2.4.0
133
+
134
+ ### Minor Changes
135
+
136
+ - [#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:
137
+
138
+ #### `src/extensions.ts`
139
+
140
+ ```ts
141
+ import { app } from '@wix/astro/builders';
142
+ import * as extensions from '@wix/astro/builders';
143
+
144
+ export default app().use(
145
+ extensions.sitePlugin({
146
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
147
+ marketData: { name: '' },
148
+ placements: [],
149
+ referenceComponentId: '',
150
+ })
151
+ );
152
+ ```
153
+
154
+ ### Patch Changes
155
+
156
+ - Updated dependencies [[`bf6dc8a`](https://github.com/wix-incubator/headless-integrations/commit/bf6dc8aa6faef7c99549a9a782076eef23e5a4dc)]:
157
+ - @wix/astro-site-plugins-extensions@2.1.0
158
+
159
+ ## 2.3.0
160
+
161
+ ### Minor Changes
162
+
163
+ - [#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:
164
+
165
+ #### `src/extensions.ts`
166
+
167
+ ```ts
168
+ import { app } from '@wix/astro/builders';
169
+ import * as extensions from '@wix/astro/builders';
170
+
171
+ export default app().use(
172
+ extensions.customElement({
173
+ element: './extensions/custom-element/element.ts',
174
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
175
+ name: 'custom-element',
176
+ tagName: 'custom-element',
177
+ })
178
+ );
179
+ ```
180
+
181
+ #### `src/extensions/custom-element/element.ts`
182
+
183
+ ```ts
184
+ export default class extends HTMLElement {
185
+ public connectedCallback() {
186
+ this.innerHTML = `<div data-testid="custom-element">Hello from custom element!</div>`;
187
+ }
188
+ }
189
+ ```
190
+
191
+ - [#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:
192
+
193
+ ```ts
194
+ import wix from '@wix/astro';
195
+ import { defineConfig } from 'astro/config';
196
+
197
+ export default defineConfig({
198
+ integrations: [wix({ enableRobots: false })],
199
+ });
200
+ ```
201
+
202
+ - [#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
203
+
204
+ - [#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.
205
+
206
+ Previous API:
207
+
208
+ ```ts
209
+ import wix from '@wix/astro';
210
+
211
+ wix({
212
+ enableAuthRoutes: true,
213
+ enableHtmlEmbeds: true,
214
+ enableRobots: true,
215
+ });
216
+ ```
217
+
218
+ Current API:
219
+
220
+ ```ts
221
+ import wix from '@wix/astro';
222
+
223
+ wix({
224
+ auth: true, // or auth: { enable: true }
225
+ htmlEmbeds: true, // or htmlEmbeds: { enable: true }
226
+ robots: true, // or robots: { enable: true }
227
+ });
228
+ ```
229
+
230
+ ### Patch Changes
231
+
232
+ - 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)]:
233
+ - @wix/astro-custom-elements-extensions@2.1.0
234
+ - @wix/astro-core@2.2.0
235
+ - @wix/astro-robots@2.1.0
236
+ - @wix/astro-payment-links@2.2.0
237
+ - @wix/astro-embedded-scripts-extensions@2.1.0
238
+ - @wix/astro-auth@2.2.0
239
+
240
+ ## 2.2.0
241
+
242
+ ### Minor Changes
243
+
244
+ - [#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
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies [[`903244c`](https://github.com/wix-incubator/headless-integrations/commit/903244ce7aae605eedd187ceecedc2c65796817e), [`d5f3624`](https://github.com/wix-incubator/headless-integrations/commit/d5f36244bc5b424702825631df8e1a91b6cf3359)]:
249
+ - @wix/astro-auth@2.1.0
250
+ - @wix/astro-backend-extensions@2.1.0
251
+ - @wix/astro-backoffice-extensions@2.1.0
252
+ - @wix/astro-core@2.1.0
253
+ - @wix/astro-html-embeds@2.1.0
254
+ - @wix/astro-payment-links@2.1.0
255
+
256
+ ## 2.1.0
257
+
258
+ ### Minor Changes
259
+
260
+ - [#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).
261
+
262
+ The file let's developers define their app manifest programmatically:
263
+
264
+ ```ts
265
+ import { app, backofficePage, extension } from '@wix/astro/builders';
266
+
267
+ export default app()
268
+ .use(
269
+ backofficePage({
270
+ component: './extensions/my-page/page.tsx',
271
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
272
+ routePath: 'hello',
273
+ title: 'Trusted Index Page',
274
+ })
275
+ )
276
+ .use(
277
+ extension({
278
+ compData: {
279
+ webhook: {
280
+ callbackUrl: 'https://www.wix.com',
281
+ },
282
+ },
283
+ compId: 'f988e3bc-acaa-4aca-9cf8-2cd81cc39ee8',
284
+ compType: 'WEBHOOK',
285
+ })
286
+ );
287
+ ```
288
+
289
+ 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).
290
+
291
+ Note that this is a breaking change.
292
+
293
+ ### Patch Changes
294
+
295
+ - [#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.
296
+
297
+ - [#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
298
+
299
+ - [#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
300
+
301
+ - 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)]:
302
+ - @wix/astro-payment-links@2.0.1
303
+ - @wix/astro-html-embeds@2.0.1
304
+ - @wix/astro-extensions@2.1.0
305
+ - @wix/astro-auth@2.0.1
306
+
307
+ ## 2.0.0
308
+
309
+ ### Major Changes
310
+
311
+ - [#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`
312
+
313
+ ### Patch Changes
314
+
315
+ - Updated dependencies [[`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed), [`4a957b4`](https://github.com/wix-incubator/headless-integrations/commit/4a957b452e595727aae622af478528581dda8a5c)]:
316
+ - @wix/astro-app-manifest@2.0.0
317
+ - @wix/astro-auth@2.0.0
318
+ - @wix/astro-extensions@2.0.0
319
+ - @wix/astro-html-embeds@2.0.0
@@ -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
 
@@ -74,4 +86,4 @@ interface Options {
74
86
  }
75
87
  declare function webhook(options: Options): Webhook;
76
88
 
77
- export { createIntegration as default, ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
89
+ 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
+ };
@@ -0,0 +1,5 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ declare function renderSettingsPanel(SettingsPanel: ComponentType): void;
4
+
5
+ export { renderSettingsPanel };
@@ -0,0 +1,23 @@
1
+ // src/runtime/renderSettingsPanel.tsx
2
+ import React from "react";
3
+ import { createRoot } from "react-dom/client";
4
+ import { editor } from "@wix/editor";
5
+ import { createClient } from "@wix/sdk";
6
+ function renderSettingsPanel(SettingsPanel) {
7
+ const host = editor.host();
8
+ const auth = editor.auth();
9
+ const wixClient = createClient({
10
+ auth,
11
+ host
12
+ });
13
+ wixClient.enableContext("module");
14
+ const container = document.getElementById("root");
15
+ if (container == null) {
16
+ throw new Error("Cannot find root element");
17
+ }
18
+ const root = createRoot(container);
19
+ root.render(/* @__PURE__ */ React.createElement(SettingsPanel, null));
20
+ }
21
+ export {
22
+ renderSettingsPanel
23
+ };
@@ -0,0 +1,6 @@
1
+ declare function wrapCustomElement({ customElement, tagName, }: {
2
+ customElement: CustomElementConstructor;
3
+ tagName: string;
4
+ }): void;
5
+
6
+ export { wrapCustomElement };
@@ -0,0 +1,30 @@
1
+ // ../astro-browser-runtime/src/sdk/site.ts
2
+ import { createClient } from "@wix/sdk";
3
+ import { site } from "@wix/site";
4
+ var enableClient = (applicationId) => {
5
+ const host = site.host({ applicationId });
6
+ const auth = site.auth();
7
+ const wixClient = createClient({
8
+ auth,
9
+ host
10
+ });
11
+ wixClient.enableContext("module");
12
+ return auth.getAccessTokenInjector();
13
+ };
14
+
15
+ // src/runtime/wrapCustomElement.ts
16
+ function wrapCustomElement({
17
+ customElement,
18
+ tagName
19
+ }) {
20
+ const injectAccessTokenFunction = enableClient(import.meta.env.WIX_CLIENT_ID);
21
+ Object.defineProperty(customElement.prototype, "accessTokenListener", {
22
+ configurable: false,
23
+ value: injectAccessTokenFunction,
24
+ writable: false
25
+ });
26
+ customElements.define(tagName, customElement);
27
+ }
28
+ export {
29
+ wrapCustomElement
30
+ };