@wix/astro 2.27.0 → 2.29.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 (177) hide show
  1. package/build/dependencies/astro-auth/backend-runtime/constants-Dbkf3D5f.mjs +6 -0
  2. package/build/dependencies/astro-auth/backend-runtime/elevatedContextualClient-tJx9dIn_.mjs +41 -0
  3. package/build/dependencies/astro-auth/backend-runtime/host-utils-B2Fs_Z4S.mjs +17 -0
  4. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.d.mts +6 -0
  5. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.mjs +3645 -0
  6. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.d.mts +6 -0
  7. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.mjs +193 -0
  8. package/build/dependencies/astro-auth/backend-runtime/routes/callback.d.mts +6 -0
  9. package/build/dependencies/astro-auth/backend-runtime/routes/callback.mjs +34 -0
  10. package/build/dependencies/astro-auth/backend-runtime/routes/login.d.mts +6 -0
  11. package/build/dependencies/astro-auth/backend-runtime/routes/login.mjs +32 -0
  12. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.d.mts +6 -0
  13. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.mjs +14 -0
  14. package/build/dependencies/astro-auth/backend-runtime/routes/logout.d.mts +6 -0
  15. package/build/dependencies/astro-auth/backend-runtime/routes/logout.mjs +19 -0
  16. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.d.mts +1 -0
  17. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.mjs +8 -0
  18. package/build/dependencies/astro-auth/backend-runtime/saveSessionTokensToCookie-DK3xvtzk.mjs +24 -0
  19. package/build/dependencies/astro-auth/backend-runtime/schemas-XrMhpOYn.mjs +2771 -0
  20. package/build/dependencies/astro-auth/browser-runtime/setup.d.ts +4 -3
  21. package/build/dependencies/astro-auth/browser-runtime/setup.js +55 -81
  22. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.d.mts +6 -0
  23. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.mjs +37 -0
  24. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.d.mts +10 -0
  25. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.mjs +22 -0
  26. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.d.mts +9 -0
  27. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.mjs +22 -0
  28. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-DDHGZHjR.mjs +56 -0
  29. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-mYlwmIjd.d.mts +6 -0
  30. package/build/dependencies/astro-backoffice-extensions/browser-runtime/wrapComponent.d.ts +4 -3
  31. package/build/dependencies/astro-backoffice-extensions/browser-runtime/wrapComponent.js +6 -5
  32. package/build/dependencies/astro-context-providers-extensions/browser-runtime/hmr.d.ts +10 -0
  33. package/build/dependencies/astro-context-providers-extensions/browser-runtime/hmr.js +20 -23
  34. package/build/dependencies/astro-context-providers-extensions/browser-runtime/sdk.d.ts +9 -0
  35. package/build/dependencies/astro-context-providers-extensions/browser-runtime/sdk.js +16 -15
  36. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.d.ts +9 -5
  37. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.js +23 -40
  38. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.d.ts +10 -1
  39. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.js +20 -23
  40. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.d.ts +4 -3
  41. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.js +14 -18
  42. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.d.ts +9 -5
  43. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.js +23 -25
  44. package/build/dependencies/astro-embedded-scripts-extensions/browser-runtime/setupContext.d.ts +8 -4
  45. package/build/dependencies/astro-embedded-scripts-extensions/browser-runtime/setupContext.js +18 -17
  46. package/build/dependencies/astro-function-libraries-extensions/browser-runtime/sdk.d.ts +9 -0
  47. package/build/dependencies/astro-function-libraries-extensions/browser-runtime/sdk.js +16 -15
  48. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.d.mts +6 -0
  49. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.mjs +53 -0
  50. package/build/dependencies/astro-monitor/backend-runtime/monitor.d.mts +6 -0
  51. package/build/dependencies/astro-monitor/backend-runtime/monitor.mjs +43 -0
  52. package/build/dependencies/astro-payment-links/backend-runtime/elevate-CDDLuCIf.mjs +9 -0
  53. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.d.mts +6 -0
  54. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.mjs +20 -0
  55. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.d.mts +6 -0
  56. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.mjs +15 -0
  57. package/build/dependencies/astro-payment-links/backend-runtime/proposal.d.mts +6 -0
  58. package/build/dependencies/astro-payment-links/backend-runtime/proposal.mjs +20 -0
  59. package/build/dependencies/astro-robots/backend-runtime/robots.d.mts +6 -0
  60. package/build/dependencies/astro-robots/backend-runtime/robots.mjs +26 -0
  61. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/hmr.d.ts +10 -0
  62. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/hmr.js +20 -23
  63. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/sdk.d.ts +12 -0
  64. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/sdk.js +10 -10
  65. package/build/dependencies/astro-site-components-extensions/browser-runtime/hmr.d.ts +10 -0
  66. package/build/dependencies/astro-site-components-extensions/browser-runtime/hmr.js +20 -23
  67. package/build/dependencies/astro-site-components-extensions/browser-runtime/sdk.d.ts +9 -0
  68. package/build/dependencies/astro-site-components-extensions/browser-runtime/sdk.js +16 -15
  69. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.d.mts +6 -0
  70. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.mjs +177 -0
  71. package/build/dependencies/astro-translations/backend-runtime/runtime/{i18n.d.ts → i18n.d.mts} +3 -2
  72. package/build/dependencies/astro-translations/backend-runtime/runtime/i18n.mjs +38 -0
  73. package/build/dependencies/astro-translations/integration/index.d.mts +105 -0
  74. package/build/dependencies/astro-translations/integration/index.mjs +264 -0
  75. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.d.ts +10 -1
  76. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.js +20 -23
  77. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.d.ts +12 -8
  78. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.js +25 -35
  79. package/build/dependencies/astro-viewer-api/backend-runtime/api.d.mts +6 -0
  80. package/build/dependencies/astro-viewer-api/backend-runtime/api.mjs +27 -0
  81. package/build/dependencies/astro-viewer-services-extensions/browser-runtime/sdk.d.ts +9 -0
  82. package/build/dependencies/astro-viewer-services-extensions/browser-runtime/sdk.js +16 -15
  83. package/build/integration/builders-B9yQdgSz.mjs +76 -0
  84. package/build/integration/builders-DP0350YQ.d.mts +121 -0
  85. package/build/integration/builders-DVfxT6EC.mjs +225 -0
  86. package/build/integration/builders-experimental.d.mts +56 -0
  87. package/build/integration/builders-experimental.mjs +26 -0
  88. package/build/integration/builders-trusted.d.mts +75 -0
  89. package/build/integration/builders-trusted.mjs +46 -0
  90. package/build/integration/builders.d.mts +4 -0
  91. package/build/integration/builders.mjs +4 -0
  92. package/build/integration/index-B3B_5bgh.d.mts +248 -0
  93. package/build/integration/index-D5k6Bmue.d.mts +32 -0
  94. package/build/integration/index.d.mts +35 -0
  95. package/build/integration/index.mjs +29236 -0
  96. package/package.json +12 -12
  97. package/build/dependencies/astro-auth/backend-runtime/chunk-24J7STEA.js +0 -8
  98. package/build/dependencies/astro-auth/backend-runtime/chunk-352W54SQ.js +0 -70
  99. package/build/dependencies/astro-auth/backend-runtime/chunk-BIARYLOZ.js +0 -3267
  100. package/build/dependencies/astro-auth/backend-runtime/chunk-DZHZMKUF.js +0 -26
  101. package/build/dependencies/astro-auth/backend-runtime/chunk-MLKGABMK.js +0 -9
  102. package/build/dependencies/astro-auth/backend-runtime/chunk-USQSPPTM.js +0 -14
  103. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.d.ts +0 -5
  104. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.js +0 -136
  105. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.d.ts +0 -5
  106. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.js +0 -219
  107. package/build/dependencies/astro-auth/backend-runtime/routes/callback.d.ts +0 -5
  108. package/build/dependencies/astro-auth/backend-runtime/routes/callback.js +0 -53
  109. package/build/dependencies/astro-auth/backend-runtime/routes/login.d.ts +0 -5
  110. package/build/dependencies/astro-auth/backend-runtime/routes/login.js +0 -46
  111. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.d.ts +0 -5
  112. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.js +0 -24
  113. package/build/dependencies/astro-auth/backend-runtime/routes/logout.d.ts +0 -5
  114. package/build/dependencies/astro-auth/backend-runtime/routes/logout.js +0 -33
  115. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.d.ts +0 -2
  116. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.js +0 -10
  117. package/build/dependencies/astro-backend-extensions/backend-runtime/chunk-CPGTXQVH.js +0 -75
  118. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.d.ts +0 -5
  119. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.js +0 -41
  120. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.d.ts +0 -10
  121. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.js +0 -35
  122. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.d.ts +0 -9
  123. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.js +0 -34
  124. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-B7jr2PES.d.ts +0 -5
  125. package/build/dependencies/astro-backend-extensions/types/index.d.ts +0 -102
  126. package/build/dependencies/astro-backoffice-extensions/types/index.d.ts +0 -68
  127. package/build/dependencies/astro-context-providers-extensions/types/index.d.ts +0 -32
  128. package/build/dependencies/astro-core/types/index.d.ts +0 -109
  129. package/build/dependencies/astro-custom-elements-extensions/types/index.d.ts +0 -45
  130. package/build/dependencies/astro-embedded-scripts-extensions/types/index.d.ts +0 -18
  131. package/build/dependencies/astro-function-libraries-extensions/types/index.d.ts +0 -23
  132. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.d.ts +0 -5
  133. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.js +0 -66
  134. package/build/dependencies/astro-payment-links/backend-runtime/chunk-656BVIJ3.js +0 -9
  135. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.d.ts +0 -5
  136. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.js +0 -24
  137. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.d.ts +0 -5
  138. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.js +0 -20
  139. package/build/dependencies/astro-payment-links/backend-runtime/proposal.d.ts +0 -5
  140. package/build/dependencies/astro-payment-links/backend-runtime/proposal.js +0 -24
  141. package/build/dependencies/astro-robots/backend-runtime/robots.d.ts +0 -5
  142. package/build/dependencies/astro-robots/backend-runtime/robots.js +0 -38
  143. package/build/dependencies/astro-site-component-panels-extensions/types/index.d.ts +0 -21
  144. package/build/dependencies/astro-site-components-extensions/types/index.d.ts +0 -48
  145. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.d.ts +0 -5
  146. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.js +0 -189
  147. package/build/dependencies/astro-translations/backend-runtime/runtime/i18n.js +0 -42
  148. package/build/dependencies/astro-translations/integration/index.d.ts +0 -5
  149. package/build/dependencies/astro-translations/integration/index.js +0 -296
  150. package/build/dependencies/astro-trusted-backoffice-extensions/types/index.d.ts +0 -50
  151. package/build/dependencies/astro-viewer-api/backend-runtime/api.d.ts +0 -5
  152. package/build/dependencies/astro-viewer-api/backend-runtime/api.js +0 -34
  153. package/build/dependencies/astro-viewer-services-extensions/types/index.d.ts +0 -27
  154. package/build/integration/builders-experimental.d.ts +0 -53
  155. package/build/integration/builders-experimental.js +0 -20
  156. package/build/integration/builders-experimental.js.map +0 -1
  157. package/build/integration/builders-trusted.d.ts +0 -69
  158. package/build/integration/builders-trusted.js +0 -52
  159. package/build/integration/builders-trusted.js.map +0 -1
  160. package/build/integration/builders.d.ts +0 -112
  161. package/build/integration/builders.js +0 -14
  162. package/build/integration/builders.js.map +0 -1
  163. package/build/integration/chunk-23MOLCVI.js +0 -1087
  164. package/build/integration/chunk-23MOLCVI.js.map +0 -1
  165. package/build/integration/chunk-6UOFHB2M.js +0 -386
  166. package/build/integration/chunk-6UOFHB2M.js.map +0 -1
  167. package/build/integration/chunk-L6JEDTVM.js +0 -7458
  168. package/build/integration/chunk-L6JEDTVM.js.map +0 -1
  169. package/build/integration/chunk-MNQWQ2MC.js +0 -809
  170. package/build/integration/chunk-MNQWQ2MC.js.map +0 -1
  171. package/build/integration/chunk-XN6SBNMI.js +0 -23758
  172. package/build/integration/chunk-XN6SBNMI.js.map +0 -1
  173. package/build/integration/index.d-BUVlSCHa.d.ts +0 -211
  174. package/build/integration/index.d-D4c48TR0.d.ts +0 -58
  175. package/build/integration/index.d.ts +0 -34
  176. package/build/integration/index.js +0 -498
  177. package/build/integration/index.js.map +0 -1
@@ -1,26 +1,23 @@
1
- // ../astro-browser-runtime/src/hmr/react-component.tsx
2
1
  import React, { useEffect, useRef, useState } from "react";
2
+
3
+ //#region ../astro-browser-runtime/src/hmr/react-component.tsx
3
4
  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
- };
5
+ return (props) => {
6
+ const [WrappedComponent, setComponent] = useState(() => hotData.Component ?? OriginalComponent);
7
+ const isMountedRef = useRef(false);
8
+ useEffect(() => {
9
+ isMountedRef.current = true;
10
+ hotData.setComponent = (NewComponent) => {
11
+ hotData.Component = NewComponent;
12
+ if (isMountedRef.current) setComponent(() => NewComponent);
13
+ };
14
+ return () => {
15
+ isMountedRef.current = false;
16
+ };
17
+ }, []);
18
+ return /* @__PURE__ */ React.createElement(WrappedComponent, props);
19
+ };
23
20
  }
24
- export {
25
- createComponentHmrWrapper
26
- };
21
+
22
+ //#endregion
23
+ export { createComponentHmrWrapper };
@@ -1,10 +1,14 @@
1
- import { ComponentType } from 'react';
1
+ import { ComponentType } from "react";
2
2
 
3
- declare function wrapComponent({ componentId, loadComponent, }: {
4
- componentId: string;
5
- loadComponent: () => Promise<{
6
- default: ComponentType;
7
- }>;
3
+ //#region src/runtime/wrapComponent.d.ts
4
+ declare function wrapComponent({
5
+ componentId,
6
+ loadComponent
7
+ }: {
8
+ componentId: string;
9
+ loadComponent: () => Promise<{
10
+ default: ComponentType;
11
+ }>;
8
12
  }): void;
9
-
10
- export { wrapComponent };
13
+ //#endregion
14
+ export { wrapComponent };
@@ -1,37 +1,27 @@
1
- // src/runtime/wrapComponent.ts
2
1
  import { withContextualWixClient } from "@wix/dashboard/internal";
3
- var WIX_CLIENT_ID = import.meta.env.WIX_CLIENT_ID;
4
- var components = /* @__PURE__ */ new Map();
5
- function wrapComponent({
6
- componentId,
7
- loadComponent
8
- }) {
9
- components.set(componentId, async () => {
10
- return loadComponent().then(
11
- ({ default: Component }) => withContextualWixClient(Component)
12
- );
13
- });
14
- globalThis.__module_federation__containers ??= {};
15
- globalThis.__module_federation__containers[WIX_CLIENT_ID] ??= {
16
- get: async (id) => {
17
- const loadModule = components.get(id);
18
- if (loadModule == null) {
19
- throw new Error(`Cannot find component for \`${id}\``);
20
- }
21
- const component = await loadModule();
22
- return () => {
23
- return {
24
- default: component
25
- };
26
- };
27
- },
28
- init: async () => {
29
- if (import.meta.env.DEV) {
30
- await import("/@vite/client");
31
- }
32
- }
33
- };
2
+
3
+ //#region src/runtime/wrapComponent.ts
4
+ const WIX_CLIENT_ID = import.meta.env.WIX_CLIENT_ID;
5
+ const components = /* @__PURE__ */ new Map();
6
+ function wrapComponent({ componentId, loadComponent }) {
7
+ components.set(componentId, async () => {
8
+ return loadComponent().then(({ default: Component }) => withContextualWixClient(Component));
9
+ });
10
+ globalThis.__module_federation__containers ??= {};
11
+ globalThis.__module_federation__containers[WIX_CLIENT_ID] ??= {
12
+ get: async (id) => {
13
+ const loadModule = components.get(id);
14
+ if (loadModule == null) throw new Error(`Cannot find component for \`${id}\``);
15
+ const component = await loadModule();
16
+ return () => {
17
+ return { default: component };
18
+ };
19
+ },
20
+ init: async () => {
21
+ if (import.meta.env.DEV) await import("/@vite/client");
22
+ }
23
+ };
34
24
  }
35
- export {
36
- wrapComponent
37
- };
25
+
26
+ //#endregion
27
+ export { wrapComponent };
@@ -0,0 +1,6 @@
1
+ import { APIRoute } from "astro";
2
+
3
+ //#region src/routes/api.d.ts
4
+ declare const GET: APIRoute;
5
+ //#endregion
6
+ export { GET };
@@ -0,0 +1,27 @@
1
+ import { ok } from "node:assert";
2
+ import { oAuthApps } from "@wix/auth-management";
3
+ import { WIX_CLIENT_ID } from "astro:env/client";
4
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
5
+
6
+ //#region src/elevate.ts
7
+ function elevate(restModule) {
8
+ return createRESTModule(restModule, true);
9
+ }
10
+
11
+ //#endregion
12
+ //#region src/routes/api.ts
13
+ const GET = async ({ url }) => {
14
+ const { redirectUrlWixPages } = await elevate(oAuthApps.getOAuthApp)(WIX_CLIENT_ID);
15
+ ok(redirectUrlWixPages != null);
16
+ const baseWixUrl = new URL(redirectUrlWixPages);
17
+ const mergedPath = baseWixUrl.pathname.replace(/\/$/, "") + url.pathname.replace(/\/$/, "");
18
+ const redirectUrl = new URL(mergedPath, baseWixUrl.origin);
19
+ for (const [key, value] of [...baseWixUrl.searchParams.entries(), ...url.searchParams.entries()]) redirectUrl.searchParams.append(key, value);
20
+ return new Response(null, {
21
+ headers: { Location: redirectUrl.toString() },
22
+ status: 302
23
+ });
24
+ };
25
+
26
+ //#endregion
27
+ export { GET };
@@ -0,0 +1,9 @@
1
+ import { AccessTokenFn } from "@wix/site";
2
+
3
+ //#region ../astro-browser-runtime/src/sdk/site.d.ts
4
+ type AccessTokenInjector = (getAccessTokenFn: AccessTokenFn) => void;
5
+ //#endregion
6
+ //#region src/runtime/sdk.d.ts
7
+ declare function createContext(): AccessTokenInjector;
8
+ //#endregion
9
+ export { createContext };
@@ -1,21 +1,22 @@
1
- // ../astro-browser-runtime/src/sdk/site.ts
2
1
  import { createClient } from "@wix/sdk";
3
2
  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();
3
+
4
+ //#region ../astro-browser-runtime/src/sdk/site.ts
5
+ const enableClient = (applicationId) => {
6
+ const host = site.host({ applicationId });
7
+ const auth = site.auth();
8
+ createClient({
9
+ auth,
10
+ host
11
+ }).enableContext("module");
12
+ return auth.getAccessTokenInjector();
13
13
  };
14
14
 
15
- // src/runtime/sdk.ts
15
+ //#endregion
16
+ //#region src/runtime/sdk.ts
16
17
  function createContext() {
17
- return enableClient(import.meta.env.WIX_CLIENT_ID);
18
+ return enableClient(import.meta.env.WIX_CLIENT_ID);
18
19
  }
19
- export {
20
- createContext
21
- };
20
+
21
+ //#endregion
22
+ export { createContext };
@@ -0,0 +1,76 @@
1
+ import { _ as webhookBundler, a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, p as ecomDiscountTriggers, r as embeddedScript, s as genericExtension, t as siteComponent, u as ecomShippingRates, y as servicePluginBundler } from "./builders-DVfxT6EC.mjs";
2
+
3
+ //#region ../astro-backoffice-extensions/src/builders/backofficeExtensionMenuPlugin.ts
4
+ function backofficeExtensionMenuPlugin(options) {
5
+ return {
6
+ type: "BackofficeExtensionMenuPlugin",
7
+ options
8
+ };
9
+ }
10
+
11
+ //#endregion
12
+ //#region ../astro-backoffice-extensions/src/builders/backofficeExtensionWidget.ts
13
+ function backofficeExtensionWidget(options) {
14
+ return {
15
+ type: "BackofficeExtensionWidget",
16
+ options
17
+ };
18
+ }
19
+
20
+ //#endregion
21
+ //#region ../astro-backoffice-extensions/src/builders/backofficeModal.ts
22
+ function backofficeModal(options) {
23
+ return {
24
+ type: "BackofficeModal",
25
+ options
26
+ };
27
+ }
28
+
29
+ //#endregion
30
+ //#region ../astro-backoffice-extensions/src/builders/backofficePage.ts
31
+ function backofficePage(options) {
32
+ return {
33
+ type: "BackofficePage",
34
+ options
35
+ };
36
+ }
37
+
38
+ //#endregion
39
+ //#region ../astro-viewer-services-extensions/src/builders.ts
40
+ function viewerService(options) {
41
+ return {
42
+ type: "ViewerService",
43
+ options
44
+ };
45
+ }
46
+
47
+ //#endregion
48
+ //#region src/builders.ts
49
+ const extensions = {
50
+ bookingsStaffSortingProvider,
51
+ customElement,
52
+ dashboardMenuPlugin: backofficeExtensionMenuPlugin,
53
+ dashboardModal: backofficeModal,
54
+ dashboardPage: backofficePage,
55
+ dashboardPlugin: backofficeExtensionWidget,
56
+ ecomAdditionalFees,
57
+ ecomDiscountTriggers,
58
+ ecomGiftCards,
59
+ ecomPaymentSettings,
60
+ ecomShippingRates,
61
+ ecomValidations,
62
+ embeddedScript,
63
+ event: webhook,
64
+ genericExtension,
65
+ siteComponent,
66
+ siteComponentPanel,
67
+ sitePlugin,
68
+ viewerService
69
+ };
70
+ const bundlers = {
71
+ event: webhookBundler,
72
+ servicePlugin: servicePluginBundler
73
+ };
74
+
75
+ //#endregion
76
+ export { extensions as n, bundlers as t };
@@ -0,0 +1,121 @@
1
+ import { i as BaseExtension, n as genericExtension } from "./index-D5k6Bmue.mjs";
2
+ import { a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as webhookBundler, p as ecomDiscountTriggers, r as embeddedScript, s as servicePluginBundler, t as siteComponent, u as ecomShippingRates } from "./index-B3B_5bgh.mjs";
3
+
4
+ //#region ../astro-backoffice-extensions/src/builders/backofficeExtensionMenuPlugin.d.ts
5
+ interface BackofficeExtensionMenuPlugin {
6
+ type: "BackofficeExtensionMenuPlugin";
7
+ options: Options$4;
8
+ }
9
+ interface Options$4 {
10
+ id: 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;
25
+ }
26
+ declare function backofficeExtensionMenuPlugin(options: Options$4): BackofficeExtensionMenuPlugin;
27
+ //#endregion
28
+ //#region ../astro-backoffice-extensions/src/builders/backofficeExtensionWidget.d.ts
29
+ interface BackofficeExtensionWidget {
30
+ type: "BackofficeExtensionWidget";
31
+ options: Options$3;
32
+ }
33
+ interface Options$3 {
34
+ id: string;
35
+ component: string;
36
+ description?: string;
37
+ extends: string;
38
+ height?: number;
39
+ title: string;
40
+ }
41
+ declare function backofficeExtensionWidget(options: Options$3): BackofficeExtensionWidget;
42
+ //#endregion
43
+ //#region ../astro-backoffice-extensions/src/builders/backofficeModal.d.ts
44
+ interface BackofficeModal {
45
+ type: "BackofficeModal";
46
+ options: Options$2;
47
+ }
48
+ interface Options$2 {
49
+ id: string;
50
+ component: string;
51
+ height?: number;
52
+ iconKey?: string;
53
+ title: string;
54
+ width?: number;
55
+ }
56
+ declare function backofficeModal(options: Options$2): BackofficeModal;
57
+ //#endregion
58
+ //#region ../astro-backoffice-extensions/src/builders/backofficePage.d.ts
59
+ interface BackofficePage {
60
+ type: "BackofficePage";
61
+ options: Options$1;
62
+ }
63
+ interface Options$1 {
64
+ id: string;
65
+ component: string;
66
+ routePath: string;
67
+ title: string;
68
+ }
69
+ declare function backofficePage(options: Options$1): BackofficePage;
70
+ //#endregion
71
+ //#region ../astro-viewer-services-extensions/src/builders.d.ts
72
+ interface ViewerService extends BaseExtension {
73
+ type: "ViewerService";
74
+ options: Options;
75
+ }
76
+ interface Options {
77
+ id: string;
78
+ description?: string;
79
+ docLink?: string;
80
+ editor?: {
81
+ [key: string]: unknown;
82
+ bundle: string;
83
+ dependencies?: string[];
84
+ };
85
+ packageName: string;
86
+ viewer: {
87
+ [key: string]: unknown;
88
+ bundle: string;
89
+ dependencies?: string[];
90
+ };
91
+ }
92
+ declare function viewerService(options: Options): ViewerService;
93
+ //#endregion
94
+ //#region src/builders.d.ts
95
+ declare const extensions: {
96
+ bookingsStaffSortingProvider: typeof bookingsStaffSortingProvider;
97
+ customElement: typeof customElement;
98
+ dashboardMenuPlugin: typeof backofficeExtensionMenuPlugin;
99
+ dashboardModal: typeof backofficeModal;
100
+ dashboardPage: typeof backofficePage;
101
+ dashboardPlugin: typeof backofficeExtensionWidget;
102
+ ecomAdditionalFees: typeof ecomAdditionalFees;
103
+ ecomDiscountTriggers: typeof ecomDiscountTriggers;
104
+ ecomGiftCards: typeof ecomGiftCards;
105
+ ecomPaymentSettings: typeof ecomPaymentSettings;
106
+ ecomShippingRates: typeof ecomShippingRates;
107
+ ecomValidations: typeof ecomValidations;
108
+ embeddedScript: typeof embeddedScript;
109
+ event: typeof webhook;
110
+ genericExtension: typeof genericExtension;
111
+ siteComponent: typeof siteComponent;
112
+ siteComponentPanel: typeof siteComponentPanel;
113
+ sitePlugin: typeof sitePlugin;
114
+ viewerService: typeof viewerService;
115
+ };
116
+ declare const bundlers: {
117
+ event: typeof webhookBundler;
118
+ servicePlugin: typeof servicePluginBundler;
119
+ };
120
+ //#endregion
121
+ export { extensions as n, bundlers as t };
@@ -0,0 +1,225 @@
1
+ import { createHash } from "node:crypto";
2
+
3
+ //#region ../astro-backend-extensions/src/bundlers/service-plugin.ts
4
+ const ServicePluginBundlerType = Symbol.for("@wix/astro-backend-extensions:ServicePluginBundler");
5
+ function servicePluginBundler(options) {
6
+ return {
7
+ id: createHash("sha256").update(JSON.stringify({
8
+ type: "ServicePluginBundler",
9
+ options
10
+ })).digest("hex"),
11
+ type: ServicePluginBundlerType,
12
+ options
13
+ };
14
+ }
15
+
16
+ //#endregion
17
+ //#region ../astro-backend-extensions/src/bundlers/webhook.ts
18
+ const WebhookBundlerType = Symbol.for("@wix/astro-backend-extensions:WebhookBundler");
19
+ function webhookBundler(options) {
20
+ return {
21
+ id: createHash("sha256").update(JSON.stringify({
22
+ type: "WebhookBundler",
23
+ options
24
+ })).digest("hex"),
25
+ type: WebhookBundlerType,
26
+ options
27
+ };
28
+ }
29
+
30
+ //#endregion
31
+ //#region ../astro-backend-extensions/src/builders/bookingsStaffSorting.ts
32
+ function bookingsStaffSortingProvider(options) {
33
+ return {
34
+ type: "GenericExtension",
35
+ options: {
36
+ compId: options.id,
37
+ compType: "STAFF_SORTING_PROVIDER",
38
+ compData: { staffSortingProvider: {
39
+ dashboardPluginId: options.dashboardPluginId,
40
+ deploymentUri: servicePluginBundler(options),
41
+ methodDescription: options.methodDescription,
42
+ methodName: options.methodName
43
+ } }
44
+ }
45
+ };
46
+ }
47
+
48
+ //#endregion
49
+ //#region ../astro-backend-extensions/src/builders/ecomAdditionalFees.ts
50
+ function ecomAdditionalFees(options) {
51
+ return {
52
+ type: "GenericExtension",
53
+ options: {
54
+ compId: options.id,
55
+ compType: "ECOM_ADDITIONAL_FEES",
56
+ compData: { ecomAdditionalFees: { deploymentUri: servicePluginBundler(options) } }
57
+ }
58
+ };
59
+ }
60
+
61
+ //#endregion
62
+ //#region ../astro-backend-extensions/src/builders/ecomDiscountTriggers.ts
63
+ function ecomDiscountTriggers(options) {
64
+ return {
65
+ type: "GenericExtension",
66
+ options: {
67
+ compId: options.id,
68
+ compType: "ECOM_DISCOUNTS_TRIGGER",
69
+ compData: { ecomDiscountsTrigger: { deploymentUri: servicePluginBundler(options) } }
70
+ }
71
+ };
72
+ }
73
+
74
+ //#endregion
75
+ //#region ../astro-backend-extensions/src/builders/ecomGiftCards.ts
76
+ function ecomGiftCards(options) {
77
+ return {
78
+ type: "GenericExtension",
79
+ options: {
80
+ compId: options.id,
81
+ compType: "GIFT_CARDS_PROVIDER",
82
+ compData: { giftCardsProvider: { deploymentUri: servicePluginBundler(options) } }
83
+ }
84
+ };
85
+ }
86
+
87
+ //#endregion
88
+ //#region ../astro-backend-extensions/src/builders/ecomPaymentSettings.ts
89
+ function ecomPaymentSettings(options) {
90
+ return {
91
+ type: "GenericExtension",
92
+ options: {
93
+ compId: options.id,
94
+ compType: "ECOM_PAYMENT_SETTINGS",
95
+ compData: { ecomPaymentSettings: {
96
+ deploymentUri: servicePluginBundler(options),
97
+ fallbackValueForRequires3dSecure: options.fallbackValueForRequires3dSecure
98
+ } }
99
+ }
100
+ };
101
+ }
102
+
103
+ //#endregion
104
+ //#region ../astro-backend-extensions/src/builders/ecomShippingRates.ts
105
+ function ecomShippingRates(options) {
106
+ return {
107
+ type: "GenericExtension",
108
+ options: {
109
+ compId: options.id,
110
+ compType: "ECOM_SHIPPING_RATES",
111
+ compData: { ecomShippingRates: {
112
+ name: options.name,
113
+ dashboardUrl: options.dashboardUrl,
114
+ deploymentUri: servicePluginBundler(options),
115
+ description: options.description,
116
+ fallbackDefinitionMandatory: options.fallbackDefinitionMandatory,
117
+ learnMoreUrl: options.learnMoreUrl,
118
+ thumbnailUrl: options.thumbnailUrl
119
+ } }
120
+ }
121
+ };
122
+ }
123
+
124
+ //#endregion
125
+ //#region ../astro-backend-extensions/src/builders/ecomValidations.ts
126
+ function ecomValidations(options) {
127
+ return {
128
+ type: "GenericExtension",
129
+ options: {
130
+ compId: options.id,
131
+ compType: "ECOM_VALIDATIONS",
132
+ compData: { ecomValidations: {
133
+ deploymentUri: servicePluginBundler(options),
134
+ validateInCart: options.validateInCart
135
+ } }
136
+ }
137
+ };
138
+ }
139
+
140
+ //#endregion
141
+ //#region ../astro-backend-extensions/src/builders/webhook.ts
142
+ function webhook(options) {
143
+ return {
144
+ type: "GenericExtension",
145
+ options: {
146
+ compId: options.id,
147
+ compType: "WEBHOOK",
148
+ compData: { webhook: webhookBundler(options) }
149
+ }
150
+ };
151
+ }
152
+
153
+ //#endregion
154
+ //#region ../astro-core/src/builders/generic-extension.ts
155
+ function genericExtension(options) {
156
+ return {
157
+ type: "GenericExtension",
158
+ options
159
+ };
160
+ }
161
+
162
+ //#endregion
163
+ //#region ../astro-core/src/builders/app.ts
164
+ var App = class {
165
+ extensions = [];
166
+ use(extension) {
167
+ const normalized = isBaseExtension(extension) ? extension : genericExtension(extension);
168
+ this.extensions.push(normalized);
169
+ return this;
170
+ }
171
+ };
172
+ function app() {
173
+ return new App();
174
+ }
175
+ function isBaseExtension(extension) {
176
+ return "type" in extension && typeof extension.type === "string";
177
+ }
178
+
179
+ //#endregion
180
+ //#region ../astro-custom-elements-extensions/src/builders/customElement.ts
181
+ function customElement(options) {
182
+ return {
183
+ type: "CustomElement",
184
+ options
185
+ };
186
+ }
187
+
188
+ //#endregion
189
+ //#region ../astro-custom-elements-extensions/src/builders/sitePlugin.ts
190
+ function sitePlugin(options) {
191
+ return {
192
+ type: "SitePlugin",
193
+ options
194
+ };
195
+ }
196
+
197
+ //#endregion
198
+ //#region ../astro-embedded-scripts-extensions/src/builders.ts
199
+ function embeddedScript(options) {
200
+ return {
201
+ type: "EmbeddedScript",
202
+ options
203
+ };
204
+ }
205
+
206
+ //#endregion
207
+ //#region ../astro-site-component-panels-extensions/src/builders.ts
208
+ function siteComponentPanel(options) {
209
+ return {
210
+ type: "SiteComponentPanel",
211
+ options
212
+ };
213
+ }
214
+
215
+ //#endregion
216
+ //#region ../astro-site-components-extensions/src/builders.ts
217
+ function siteComponent(options) {
218
+ return {
219
+ type: "SiteComponent",
220
+ options
221
+ };
222
+ }
223
+
224
+ //#endregion
225
+ export { webhookBundler as _, customElement as a, webhook as c, ecomPaymentSettings as d, ecomGiftCards as f, WebhookBundlerType as g, bookingsStaffSortingProvider as h, sitePlugin as i, ecomValidations as l, ecomAdditionalFees as m, siteComponentPanel as n, app as o, ecomDiscountTriggers as p, embeddedScript as r, genericExtension as s, siteComponent as t, ecomShippingRates as u, ServicePluginBundlerType as v, servicePluginBundler as y };