@wix/astro 2.24.0 → 2.25.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.
@@ -6,12 +6,23 @@ interface TrustedBackofficePage {
6
6
  type: 'TrustedBackofficePage';
7
7
  options: Options$1;
8
8
  }
9
+ interface MetaDataKeyword {
10
+ id: string;
11
+ value: string;
12
+ }
9
13
  interface Options$1 {
10
14
  id: string;
11
15
  activeSidebarPageId?: string;
16
+ additionalRoutes?: string[];
12
17
  component: string;
13
18
  fullPage?: boolean;
14
19
  hideInSidebar?: boolean;
20
+ metaData?: {
21
+ description?: string;
22
+ keywords?: MetaDataKeyword[];
23
+ searchable?: boolean;
24
+ title?: string;
25
+ };
15
26
  pageCategoryId?: string;
16
27
  previousRoutePaths?: string[];
17
28
  priority?: number;
@@ -6,12 +6,23 @@ interface TrustedBackofficePage {
6
6
  type: 'TrustedBackofficePage';
7
7
  options: Options$1;
8
8
  }
9
+ interface MetaDataKeyword {
10
+ id: string;
11
+ value: string;
12
+ }
9
13
  interface Options$1 {
10
14
  id: string;
11
15
  activeSidebarPageId?: string;
16
+ additionalRoutes?: string[];
12
17
  component: string;
13
18
  fullPage?: boolean;
14
19
  hideInSidebar?: boolean;
20
+ metaData?: {
21
+ description?: string;
22
+ keywords?: MetaDataKeyword[];
23
+ searchable?: boolean;
24
+ title?: string;
25
+ };
15
26
  pageCategoryId?: string;
16
27
  previousRoutePaths?: string[];
17
28
  priority?: number;
@@ -3,7 +3,7 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  trustedBackofficePage,
5
5
  trustedBackofficeWidget
6
- } from "./chunk-5BEUYVXR.js";
6
+ } from "./chunk-LQFJQHEX.js";
7
7
  import {
8
8
  app,
9
9
  bookingsStaffSortingProvider,
@@ -318,39 +318,30 @@ var createIntegration = () => {
318
318
  };
319
319
  switch (extension.type) {
320
320
  case "TrustedBackofficePage": {
321
+ const { id, ...pageOptions } = extension.options;
321
322
  components.push({
322
- compId: extension.options.id,
323
+ compId: id,
323
324
  compType: "BACK_OFFICE_PAGE",
324
325
  compData: {
325
326
  backOfficePage: {
326
- activeSidebarPageId: extension.options.activeSidebarPageId,
327
- fullPage: extension.options.fullPage,
328
- hideInSidebar: extension.options.hideInSidebar,
329
327
  hostingPlatform: "BUSINESS_MANAGER",
330
- pageCategoryId: extension.options.pageCategoryId,
331
- previousRoutePaths: extension.options.previousRoutePaths,
332
- priority: extension.options.priority,
333
- requiredPermission: extension.options.requiredPermission,
334
- routePath: extension.options.routePath,
335
328
  scriptAsset,
336
- title: extension.options.title
329
+ ...pageOptions
337
330
  }
338
331
  }
339
332
  });
340
333
  break;
341
334
  }
342
335
  case "TrustedBackofficeWidget": {
336
+ const { id, ...widgetOptions } = extension.options;
343
337
  components.push({
344
- compId: extension.options.id,
338
+ compId: id,
345
339
  compType: "BACK_OFFICE_WIDGET",
346
340
  compData: {
347
341
  backOfficeWidget: {
348
- height: extension.options.height,
349
342
  hostingPlatform: "BUSINESS_MANAGER",
350
- requiredPermission: extension.options.requiredPermission,
351
343
  scriptAsset,
352
- slotIds: extension.options.slotIds,
353
- title: extension.options.title
344
+ ...widgetOptions
354
345
  }
355
346
  }
356
347
  });
@@ -392,4 +383,4 @@ export {
392
383
  trustedBackofficePage,
393
384
  trustedBackofficeWidget
394
385
  };
395
- //# sourceMappingURL=chunk-5BEUYVXR.js.map
386
+ //# sourceMappingURL=chunk-LQFJQHEX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../astro-trusted-backoffice-extensions/src/integration.ts","../../../astro-trusted-backoffice-extensions/src/utils/getAssetUrl.ts","../../../astro-trusted-backoffice-extensions/src/utils/getSupportedExtensions.ts","../../../astro-trusted-backoffice-extensions/src/vite/getViteConfig.ts","../../../astro-trusted-backoffice-extensions/src/vite/registerComponentEntryVirtualRoute.ts","../../../astro-trusted-backoffice-extensions/src/utils/getTrustedBackofficeComponent.ts","../../../astro-trusted-backoffice-extensions/src/vite/registerComponentWrapperVirtualRoute.ts","../../../astro-trusted-backoffice-extensions/src/vite/virtualModulesPlugin.ts","../../../astro-trusted-backoffice-extensions/src/builders/trustedBackofficePage.ts","../../../astro-trusted-backoffice-extensions/src/builders/trustedBackofficeWidget.ts","../../../astro-trusted-backoffice-extensions/src/index.ts"],"sourcesContent":["import { ok } from 'node:assert';\nimport type { Model, WixIntegration } from '@wix/astro-core';\nimport type {\n DevCenterBackofficePage,\n DevCenterBackofficeScriptAsset,\n DevCenterBackofficeWidget,\n} from '@wix/dev-center-schemas';\nimport type { RollupBuildOutput } from '@wix/vite-utils';\nimport type { ViteDevServer } from 'vite';\nimport { build } from '@wix/vite-utils';\nimport { createServer } from 'vite';\nimport { getAssetUrl } from './utils/getAssetUrl.js';\nimport { getSupportedExtensions } from './utils/getSupportedExtensions.js';\nimport { getViteConfig } from './vite/getViteConfig.js';\nimport { getVirtualModuleIdForComponentEntry } from './vite/registerComponentEntryVirtualRoute.js';\n\nexport const createIntegration = (): WixIntegration => {\n let model: Model | null = null;\n let customBuildOutput: null | RollupBuildOutput = null;\n let customDevServer: null | ViteDevServer = null;\n\n return {\n name: '@wix/astro/trusted-backoffice-extensions',\n hooks: {\n 'wix:model:setup'({ model: newModel }) {\n model = newModel;\n },\n async 'wix:server:start'({\n createExtensionViteConfig,\n setupExtensionProxy,\n }) {\n ok(model);\n customDevServer = await createServer(\n getViteConfig({ createExtensionViteConfig, model })\n );\n\n await customDevServer.listen();\n\n setupExtensionProxy(customDevServer);\n },\n async 'astro:server:done'() {\n ok(customDevServer);\n await customDevServer.close();\n },\n async 'wix:build:setup'({ createExtensionViteConfig, target }) {\n if (target === 'server') {\n return;\n }\n\n ok(model);\n const extensions = getSupportedExtensions(model);\n\n if (extensions.length === 0) {\n return;\n }\n\n customBuildOutput = await build(\n getViteConfig({\n createExtensionViteConfig,\n model,\n })\n );\n },\n async 'wix:app-manifest:setup'({\n staticsUrlPlaceholder,\n updateAppManifest,\n }) {\n ok(model);\n\n const components: Array<\n DevCenterBackofficePage | DevCenterBackofficeWidget\n > = [];\n\n for (const extension of getSupportedExtensions(model)) {\n const virtualModuleId = getVirtualModuleIdForComponentEntry(\n extension.options.id\n );\n\n const scriptAsset = {\n containerId: model.appId,\n exportedName: extension.options.id,\n scriptType: 'MODULE',\n url: getAssetUrl({\n baseUrl: staticsUrlPlaceholder,\n buildOutput: customBuildOutput,\n fileName: virtualModuleId,\n viteDevServer: customDevServer,\n }),\n } satisfies DevCenterBackofficeScriptAsset;\n\n switch (extension.type) {\n case 'TrustedBackofficePage': {\n const { id, ...pageOptions } = extension.options;\n components.push({\n compId: id,\n compType: 'BACK_OFFICE_PAGE',\n compData: {\n backOfficePage: {\n hostingPlatform: 'BUSINESS_MANAGER',\n scriptAsset,\n ...pageOptions,\n },\n },\n });\n break;\n }\n case 'TrustedBackofficeWidget': {\n const { id, ...widgetOptions } = extension.options;\n components.push({\n compId: id,\n compType: 'BACK_OFFICE_WIDGET',\n compData: {\n backOfficeWidget: {\n hostingPlatform: 'BUSINESS_MANAGER',\n scriptAsset,\n ...widgetOptions,\n },\n },\n });\n break;\n }\n }\n }\n\n updateAppManifest({\n components,\n });\n },\n },\n };\n};\n","import type { RollupBuildOutput } from '@wix/vite-utils';\nimport type { ViteDevServer } from 'vite';\nimport {\n appendToDevServerUrl,\n getAssetUrlForModuleId,\n getChunkForModuleId,\n} from '@wix/vite-utils';\n\nexport function getAssetUrl({\n baseUrl,\n buildOutput,\n fileName,\n viteDevServer,\n}: {\n baseUrl: string;\n buildOutput: null | RollupBuildOutput;\n fileName: string;\n viteDevServer: null | ViteDevServer;\n}) {\n if (buildOutput) {\n const chunk = getChunkForModuleId({\n buildOutput,\n moduleId: `\\0${fileName}`,\n });\n\n return appendToDevServerUrl(baseUrl, chunk.fileName);\n }\n\n if (viteDevServer) {\n return getAssetUrlForModuleId({\n baseUrl,\n devServer: viteDevServer,\n moduleId: fileName,\n });\n }\n\n throw new Error('Unknown error: no build output or vite dev server');\n}\n","import type { BaseExtension, Model } from '@wix/astro-core';\nimport type { SupportedExtension } from '../types.js';\n\nexport function getSupportedExtensions(model: Model) {\n return model.extensions.filter(isSupportedExtensions);\n}\n\nfunction isSupportedExtensions(\n extension: BaseExtension\n): extension is SupportedExtension {\n return (\n extension.type === 'TrustedBackofficePage' ||\n extension.type === 'TrustedBackofficeWidget'\n );\n}\n","import type { CreateExtensionViteConfig, Model } from '@wix/astro-core';\nimport { viteExternalsPlugin } from 'vite-plugin-externals';\nimport { getSupportedExtensions } from '../utils/getSupportedExtensions.js';\nimport {\n getVirtualModuleIdForComponentEntry,\n wrapComponentRuntimePath,\n} from './registerComponentEntryVirtualRoute.js';\nimport { hmrRuntimePath } from './registerComponentWrapperVirtualRoute.js';\nimport { virtualModulesPlugin } from './virtualModulesPlugin.js';\n\nexport function getViteConfig({\n createExtensionViteConfig,\n model,\n}: {\n createExtensionViteConfig: CreateExtensionViteConfig;\n model: Model;\n}) {\n const componentEntries = getSupportedExtensions(model).map((x) =>\n getVirtualModuleIdForComponentEntry(x.options.id)\n );\n\n return createExtensionViteConfig({\n name: 'trusted-backoffice',\n config: {\n build: {\n rollupOptions: {\n input: componentEntries,\n },\n },\n experimental: {\n renderBuiltUrl(filename, { hostId, hostType }) {\n if (hostType !== 'js') {\n return { relative: true };\n }\n\n return {\n runtime: `import.meta.url.replace(\"${hostId}\", \"${filename}\")`,\n };\n },\n },\n optimizeDeps: {\n entries: [\n wrapComponentRuntimePath,\n hmrRuntimePath,\n ...componentEntries,\n ],\n },\n plugins: [\n virtualModulesPlugin({ model }),\n viteExternalsPlugin({\n react: 'React',\n 'react-dom': 'ReactDOM',\n }),\n ],\n },\n });\n}\n","import type { Model } from '@wix/astro-core';\nimport type { ParamData, VirtualRouter } from '@wix/vite-virtual-router-plugin';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { getTrustedBackofficeComponent } from '../utils/getTrustedBackofficeComponent.js';\nimport { getVirtualModuleIdForComponentWrapper } from './registerComponentWrapperVirtualRoute.js';\n\ninterface Params extends ParamData {\n id: string;\n}\n\nexport const wrapComponentRuntimePath = normalizePath(\n new URL(\n '../dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.js',\n import.meta.url\n )\n);\n\nexport function getVirtualModuleIdForComponentEntry(componentId: string) {\n return `wix/component/backoffice/entries/${componentId}`;\n}\n\nexport function registerComponentEntryVirtualRoute({\n model,\n router,\n}: {\n model: Model;\n router: VirtualRouter;\n}) {\n router.route<Params>(\n getVirtualModuleIdForComponentEntry(':id'),\n ({ id }, { command }) => {\n const extension = getTrustedBackofficeComponent(model, id);\n\n if (extension) {\n const componentPath = getVirtualModuleIdForComponentWrapper(\n extension.options.id\n );\n\n if (command === 'build') {\n return getComponentBuildTemplate({\n componentId: extension.options.id,\n componentPath,\n });\n }\n\n return getComponentServeTemplate({\n componentId: extension.options.id,\n componentPath,\n });\n }\n\n return null;\n }\n );\n}\n\nfunction getComponentBuildTemplate({\n componentId,\n componentPath,\n}: {\n componentId: string;\n componentPath: string;\n}) {\n return outdent`\n import { wrapComponent } from '${wrapComponentRuntimePath}'\n\n wrapComponent({\n componentId: '${componentId}',\n loadComponent: () => import('${componentPath}'),\n });\n `;\n}\n\nfunction getComponentServeTemplate({\n componentId,\n componentPath,\n}: {\n componentId: string;\n componentPath: string;\n}) {\n return outdent`\n import { wrapComponent } from '${wrapComponentRuntimePath}'\n\n wrapComponent({\n componentId: '${componentId}',\n loadComponent: () => import('${componentPath}'),\n });\n `;\n}\n","import type { Model } from '@wix/astro-core';\nimport { getSupportedExtensions } from './getSupportedExtensions.js';\n\nexport function getTrustedBackofficeComponent(model: Model, id: string) {\n return getSupportedExtensions(model).find((ext) => ext.options.id === id);\n}\n","import { join } from 'node:path';\nimport type { Model } from '@wix/astro-core';\nimport type { ParamData, VirtualRouter } from '@wix/vite-virtual-router-plugin';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { getTrustedBackofficeComponent } from '../utils/getTrustedBackofficeComponent.js';\n\ninterface Params extends ParamData {\n id: string;\n}\n\nexport const hmrRuntimePath = normalizePath(\n new URL(\n '../dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.js',\n import.meta.url\n )\n);\n\nexport function getVirtualModuleIdForComponentWrapper(componentId: string) {\n return `wix/component/backoffice/wrappers/${componentId}`;\n}\n\nexport function registerComponentWrapperVirtualRoute({\n model,\n router,\n}: {\n model: Model;\n router: VirtualRouter;\n}) {\n router.route<Params>(\n getVirtualModuleIdForComponentWrapper(':id'),\n ({ id }, { command }) => {\n const extension = getTrustedBackofficeComponent(model, id);\n\n if (extension) {\n const componentPath = normalizePath(\n join(model.srcDir, extension.options.component)\n );\n\n if (command === 'build') {\n return getComponentBuildTemplate({\n componentPath,\n });\n }\n\n return getComponentServeTemplate({\n componentPath,\n });\n }\n\n return null;\n }\n );\n}\n\nfunction getComponentBuildTemplate({\n componentPath,\n}: {\n componentPath: string;\n}) {\n return outdent`\n export { default } from '${componentPath}';\n `;\n}\n\nfunction getComponentServeTemplate({\n componentPath,\n}: {\n componentPath: string;\n}) {\n return outdent`\n import { createComponentHmrWrapper } from '${hmrRuntimePath}';\n import OriginalComponent from '${componentPath}';\n\n let WrappedComponent = OriginalComponent;\n\n if (import.meta.hot) {\n import.meta.hot.accept('${componentPath}', (newModule) => {\n if (newModule?.default) {\n import.meta.hot.data.setComponent?.(newModule?.default);\n }\n });\n\n WrappedComponent = createComponentHmrWrapper(OriginalComponent, import.meta.hot.data);\n }\n\n export default WrappedComponent;\n `;\n}\n","import type { Model } from '@wix/astro-core';\nimport {\n createVirtualRouter,\n viteVirtualRouterPlugin,\n} from '@wix/vite-virtual-router-plugin';\nimport { registerComponentEntryVirtualRoute } from './registerComponentEntryVirtualRoute.js';\nimport { registerComponentWrapperVirtualRoute } from './registerComponentWrapperVirtualRoute.js';\n\nexport function virtualModulesPlugin({ model }: { model: Model }) {\n const router = createVirtualRouter();\n\n registerComponentEntryVirtualRoute({ model, router });\n registerComponentWrapperVirtualRoute({ model, router });\n\n return viteVirtualRouterPlugin({\n name: 'wix:trusted-backoffice-virtual-modules-plugin',\n router,\n });\n}\n","export interface TrustedBackofficePage {\n type: 'TrustedBackofficePage';\n options: Options;\n}\n\ninterface MetaDataKeyword {\n id: string;\n value: string;\n}\n\ninterface Options {\n id: string;\n activeSidebarPageId?: string;\n additionalRoutes?: string[];\n component: string;\n fullPage?: boolean;\n hideInSidebar?: boolean;\n metaData?: {\n description?: string;\n keywords?: MetaDataKeyword[];\n searchable?: boolean;\n title?: string;\n };\n pageCategoryId?: string;\n previousRoutePaths?: string[];\n priority?: number;\n requiredPermission?: string;\n routePath: string;\n title: string;\n}\n\nexport function trustedBackofficePage(options: Options): TrustedBackofficePage {\n return {\n type: 'TrustedBackofficePage',\n options,\n };\n}\n","export interface TrustedBackofficeWidget {\n type: 'TrustedBackofficeWidget';\n options: Options;\n}\n\ninterface Options {\n id: string;\n component: string;\n height?: number;\n requiredPermission?: string;\n slotIds?: string[];\n title: string;\n width?: number;\n}\n\nexport function trustedBackofficeWidget(\n options: Options\n): TrustedBackofficeWidget {\n return {\n type: 'TrustedBackofficeWidget',\n options,\n };\n}\n","export { createIntegration as default } from './integration.js';\n\n// builders\nexport { trustedBackofficePage } from './builders/trustedBackofficePage.js';\nexport { trustedBackofficeWidget } from './builders/trustedBackofficeWidget.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,UAAU;AAUnB,SAAS,oBAAoB;;;ACV7B;AAQO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,MAAI,aAAa;AACf,UAAM,QAAQ,oBAAoB;AAAA,MAChC;AAAA,MACA,UAAU,KAAK,QAAQ;AAAA,IACzB,CAAC;AAED,WAAO,qBAAqB,SAAS,MAAM,QAAQ;AAAA,EACrD;AAEA,MAAI,eAAe;AACjB,WAAO,uBAAuB;AAAA,MAC5B;AAAA,MACA,WAAW;AAA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BACd,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,UAAU;AAAA,kBACR,kBAAkB;AAAA,oBAChB,iBAAiB;AAAA,oBACjB;AAAA,oBACA,GAAG;AAAA,kBACL;AAAA,gBACF;AAAA,cACF,CAAC;AACD;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAEA,0BAAkB;AAAA,UAChB;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;;;AQlIA;AA+BO,SAAS,sBAAsB,SAAyC;AAC7E,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;;;ACpCA;AAeO,SAAS,wBACd,SACyB;AACzB,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,EACF;AACF;;;ACtBA;","names":["getComponentBuildTemplate","getComponentServeTemplate"]}
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-XF55M5AE.js";
7
7
  import {
8
8
  createIntegration as createIntegration9
9
- } from "./chunk-5BEUYVXR.js";
9
+ } from "./chunk-LQFJQHEX.js";
10
10
  import {
11
11
  createIntegration as createIntegration10,
12
12
  extensions
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@wix/astro",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "dependencies": {
5
5
  "@wix/auth-management": "^1.0.71",
6
6
  "@wix/dashboard": "^1.3.40",
7
7
  "@wix/editor": "^1.403.0",
8
- "@wix/essentials": "^1.0.1",
8
+ "@wix/essentials": "^1.0.4",
9
9
  "@wix/headless-localization-utils": "^1.0.13",
10
10
  "@wix/headless-node": "^1.28.0",
11
11
  "@wix/headless-site": "^1.28.0",
@@ -13,7 +13,7 @@
13
13
  "@wix/sdk": "^1.21.2",
14
14
  "@wix/sdk-runtime": "^1.0.0",
15
15
  "@wix/sdk-types": "^1.17.1",
16
- "@wix/site": "^1.39.0"
16
+ "@wix/site": "^1.40.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@wix/astro-auth": "0.0.0",
@@ -74,5 +74,5 @@
74
74
  ]
75
75
  }
76
76
  },
77
- "falconPackageHash": "fa8fdf74d8eb5169dc6ac5c60418edd6e7b74ec8210a52787c34fb25"
77
+ "falconPackageHash": "09d707270689f13434c9d117058a2469345db9ab99fd791e09dfe3b6"
78
78
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../astro-trusted-backoffice-extensions/src/integration.ts","../../../astro-trusted-backoffice-extensions/src/utils/getAssetUrl.ts","../../../astro-trusted-backoffice-extensions/src/utils/getSupportedExtensions.ts","../../../astro-trusted-backoffice-extensions/src/vite/getViteConfig.ts","../../../astro-trusted-backoffice-extensions/src/vite/registerComponentEntryVirtualRoute.ts","../../../astro-trusted-backoffice-extensions/src/utils/getTrustedBackofficeComponent.ts","../../../astro-trusted-backoffice-extensions/src/vite/registerComponentWrapperVirtualRoute.ts","../../../astro-trusted-backoffice-extensions/src/vite/virtualModulesPlugin.ts","../../../astro-trusted-backoffice-extensions/src/builders/trustedBackofficePage.ts","../../../astro-trusted-backoffice-extensions/src/builders/trustedBackofficeWidget.ts","../../../astro-trusted-backoffice-extensions/src/index.ts"],"sourcesContent":["import { ok } from 'node:assert';\nimport type { Model, WixIntegration } from '@wix/astro-core';\nimport type {\n DevCenterBackofficePage,\n DevCenterBackofficeScriptAsset,\n DevCenterBackofficeWidget,\n} from '@wix/dev-center-schemas';\nimport type { RollupBuildOutput } from '@wix/vite-utils';\nimport type { ViteDevServer } from 'vite';\nimport { build } from '@wix/vite-utils';\nimport { createServer } from 'vite';\nimport { getAssetUrl } from './utils/getAssetUrl.js';\nimport { getSupportedExtensions } from './utils/getSupportedExtensions.js';\nimport { getViteConfig } from './vite/getViteConfig.js';\nimport { getVirtualModuleIdForComponentEntry } from './vite/registerComponentEntryVirtualRoute.js';\n\nexport const createIntegration = (): WixIntegration => {\n let model: Model | null = null;\n let customBuildOutput: null | RollupBuildOutput = null;\n let customDevServer: null | ViteDevServer = null;\n\n return {\n name: '@wix/astro/trusted-backoffice-extensions',\n hooks: {\n 'wix:model:setup'({ model: newModel }) {\n model = newModel;\n },\n async 'wix:server:start'({\n createExtensionViteConfig,\n setupExtensionProxy,\n }) {\n ok(model);\n customDevServer = await createServer(\n getViteConfig({ createExtensionViteConfig, model })\n );\n\n await customDevServer.listen();\n\n setupExtensionProxy(customDevServer);\n },\n async 'astro:server:done'() {\n ok(customDevServer);\n await customDevServer.close();\n },\n async 'wix:build:setup'({ createExtensionViteConfig, target }) {\n if (target === 'server') {\n return;\n }\n\n ok(model);\n const extensions = getSupportedExtensions(model);\n\n if (extensions.length === 0) {\n return;\n }\n\n customBuildOutput = await build(\n getViteConfig({\n createExtensionViteConfig,\n model,\n })\n );\n },\n async 'wix:app-manifest:setup'({\n staticsUrlPlaceholder,\n updateAppManifest,\n }) {\n ok(model);\n\n const components: Array<\n DevCenterBackofficePage | DevCenterBackofficeWidget\n > = [];\n\n for (const extension of getSupportedExtensions(model)) {\n const virtualModuleId = getVirtualModuleIdForComponentEntry(\n extension.options.id\n );\n\n const scriptAsset = {\n containerId: model.appId,\n exportedName: extension.options.id,\n scriptType: 'MODULE',\n url: getAssetUrl({\n baseUrl: staticsUrlPlaceholder,\n buildOutput: customBuildOutput,\n fileName: virtualModuleId,\n viteDevServer: customDevServer,\n }),\n } satisfies DevCenterBackofficeScriptAsset;\n\n switch (extension.type) {\n case 'TrustedBackofficePage': {\n components.push({\n compId: extension.options.id,\n compType: 'BACK_OFFICE_PAGE',\n compData: {\n backOfficePage: {\n activeSidebarPageId: extension.options.activeSidebarPageId,\n fullPage: extension.options.fullPage,\n hideInSidebar: extension.options.hideInSidebar,\n hostingPlatform: 'BUSINESS_MANAGER',\n pageCategoryId: extension.options.pageCategoryId,\n previousRoutePaths: extension.options.previousRoutePaths,\n priority: extension.options.priority,\n requiredPermission: extension.options.requiredPermission,\n routePath: extension.options.routePath,\n scriptAsset,\n title: extension.options.title,\n },\n },\n });\n break;\n }\n case 'TrustedBackofficeWidget': {\n components.push({\n compId: extension.options.id,\n compType: 'BACK_OFFICE_WIDGET',\n compData: {\n backOfficeWidget: {\n height: extension.options.height,\n hostingPlatform: 'BUSINESS_MANAGER',\n requiredPermission: extension.options.requiredPermission,\n scriptAsset,\n slotIds: extension.options.slotIds,\n title: extension.options.title,\n },\n },\n });\n break;\n }\n }\n }\n\n updateAppManifest({\n components,\n });\n },\n },\n };\n};\n","import type { RollupBuildOutput } from '@wix/vite-utils';\nimport type { ViteDevServer } from 'vite';\nimport {\n appendToDevServerUrl,\n getAssetUrlForModuleId,\n getChunkForModuleId,\n} from '@wix/vite-utils';\n\nexport function getAssetUrl({\n baseUrl,\n buildOutput,\n fileName,\n viteDevServer,\n}: {\n baseUrl: string;\n buildOutput: null | RollupBuildOutput;\n fileName: string;\n viteDevServer: null | ViteDevServer;\n}) {\n if (buildOutput) {\n const chunk = getChunkForModuleId({\n buildOutput,\n moduleId: `\\0${fileName}`,\n });\n\n return appendToDevServerUrl(baseUrl, chunk.fileName);\n }\n\n if (viteDevServer) {\n return getAssetUrlForModuleId({\n baseUrl,\n devServer: viteDevServer,\n moduleId: fileName,\n });\n }\n\n throw new Error('Unknown error: no build output or vite dev server');\n}\n","import type { BaseExtension, Model } from '@wix/astro-core';\nimport type { SupportedExtension } from '../types.js';\n\nexport function getSupportedExtensions(model: Model) {\n return model.extensions.filter(isSupportedExtensions);\n}\n\nfunction isSupportedExtensions(\n extension: BaseExtension\n): extension is SupportedExtension {\n return (\n extension.type === 'TrustedBackofficePage' ||\n extension.type === 'TrustedBackofficeWidget'\n );\n}\n","import type { CreateExtensionViteConfig, Model } from '@wix/astro-core';\nimport { viteExternalsPlugin } from 'vite-plugin-externals';\nimport { getSupportedExtensions } from '../utils/getSupportedExtensions.js';\nimport {\n getVirtualModuleIdForComponentEntry,\n wrapComponentRuntimePath,\n} from './registerComponentEntryVirtualRoute.js';\nimport { hmrRuntimePath } from './registerComponentWrapperVirtualRoute.js';\nimport { virtualModulesPlugin } from './virtualModulesPlugin.js';\n\nexport function getViteConfig({\n createExtensionViteConfig,\n model,\n}: {\n createExtensionViteConfig: CreateExtensionViteConfig;\n model: Model;\n}) {\n const componentEntries = getSupportedExtensions(model).map((x) =>\n getVirtualModuleIdForComponentEntry(x.options.id)\n );\n\n return createExtensionViteConfig({\n name: 'trusted-backoffice',\n config: {\n build: {\n rollupOptions: {\n input: componentEntries,\n },\n },\n experimental: {\n renderBuiltUrl(filename, { hostId, hostType }) {\n if (hostType !== 'js') {\n return { relative: true };\n }\n\n return {\n runtime: `import.meta.url.replace(\"${hostId}\", \"${filename}\")`,\n };\n },\n },\n optimizeDeps: {\n entries: [\n wrapComponentRuntimePath,\n hmrRuntimePath,\n ...componentEntries,\n ],\n },\n plugins: [\n virtualModulesPlugin({ model }),\n viteExternalsPlugin({\n react: 'React',\n 'react-dom': 'ReactDOM',\n }),\n ],\n },\n });\n}\n","import type { Model } from '@wix/astro-core';\nimport type { ParamData, VirtualRouter } from '@wix/vite-virtual-router-plugin';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { getTrustedBackofficeComponent } from '../utils/getTrustedBackofficeComponent.js';\nimport { getVirtualModuleIdForComponentWrapper } from './registerComponentWrapperVirtualRoute.js';\n\ninterface Params extends ParamData {\n id: string;\n}\n\nexport const wrapComponentRuntimePath = normalizePath(\n new URL(\n '../dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.js',\n import.meta.url\n )\n);\n\nexport function getVirtualModuleIdForComponentEntry(componentId: string) {\n return `wix/component/backoffice/entries/${componentId}`;\n}\n\nexport function registerComponentEntryVirtualRoute({\n model,\n router,\n}: {\n model: Model;\n router: VirtualRouter;\n}) {\n router.route<Params>(\n getVirtualModuleIdForComponentEntry(':id'),\n ({ id }, { command }) => {\n const extension = getTrustedBackofficeComponent(model, id);\n\n if (extension) {\n const componentPath = getVirtualModuleIdForComponentWrapper(\n extension.options.id\n );\n\n if (command === 'build') {\n return getComponentBuildTemplate({\n componentId: extension.options.id,\n componentPath,\n });\n }\n\n return getComponentServeTemplate({\n componentId: extension.options.id,\n componentPath,\n });\n }\n\n return null;\n }\n );\n}\n\nfunction getComponentBuildTemplate({\n componentId,\n componentPath,\n}: {\n componentId: string;\n componentPath: string;\n}) {\n return outdent`\n import { wrapComponent } from '${wrapComponentRuntimePath}'\n\n wrapComponent({\n componentId: '${componentId}',\n loadComponent: () => import('${componentPath}'),\n });\n `;\n}\n\nfunction getComponentServeTemplate({\n componentId,\n componentPath,\n}: {\n componentId: string;\n componentPath: string;\n}) {\n return outdent`\n import { wrapComponent } from '${wrapComponentRuntimePath}'\n\n wrapComponent({\n componentId: '${componentId}',\n loadComponent: () => import('${componentPath}'),\n });\n `;\n}\n","import type { Model } from '@wix/astro-core';\nimport { getSupportedExtensions } from './getSupportedExtensions.js';\n\nexport function getTrustedBackofficeComponent(model: Model, id: string) {\n return getSupportedExtensions(model).find((ext) => ext.options.id === id);\n}\n","import { join } from 'node:path';\nimport type { Model } from '@wix/astro-core';\nimport type { ParamData, VirtualRouter } from '@wix/vite-virtual-router-plugin';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { getTrustedBackofficeComponent } from '../utils/getTrustedBackofficeComponent.js';\n\ninterface Params extends ParamData {\n id: string;\n}\n\nexport const hmrRuntimePath = normalizePath(\n new URL(\n '../dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.js',\n import.meta.url\n )\n);\n\nexport function getVirtualModuleIdForComponentWrapper(componentId: string) {\n return `wix/component/backoffice/wrappers/${componentId}`;\n}\n\nexport function registerComponentWrapperVirtualRoute({\n model,\n router,\n}: {\n model: Model;\n router: VirtualRouter;\n}) {\n router.route<Params>(\n getVirtualModuleIdForComponentWrapper(':id'),\n ({ id }, { command }) => {\n const extension = getTrustedBackofficeComponent(model, id);\n\n if (extension) {\n const componentPath = normalizePath(\n join(model.srcDir, extension.options.component)\n );\n\n if (command === 'build') {\n return getComponentBuildTemplate({\n componentPath,\n });\n }\n\n return getComponentServeTemplate({\n componentPath,\n });\n }\n\n return null;\n }\n );\n}\n\nfunction getComponentBuildTemplate({\n componentPath,\n}: {\n componentPath: string;\n}) {\n return outdent`\n export { default } from '${componentPath}';\n `;\n}\n\nfunction getComponentServeTemplate({\n componentPath,\n}: {\n componentPath: string;\n}) {\n return outdent`\n import { createComponentHmrWrapper } from '${hmrRuntimePath}';\n import OriginalComponent from '${componentPath}';\n\n let WrappedComponent = OriginalComponent;\n\n if (import.meta.hot) {\n import.meta.hot.accept('${componentPath}', (newModule) => {\n if (newModule?.default) {\n import.meta.hot.data.setComponent?.(newModule?.default);\n }\n });\n\n WrappedComponent = createComponentHmrWrapper(OriginalComponent, import.meta.hot.data);\n }\n\n export default WrappedComponent;\n `;\n}\n","import type { Model } from '@wix/astro-core';\nimport {\n createVirtualRouter,\n viteVirtualRouterPlugin,\n} from '@wix/vite-virtual-router-plugin';\nimport { registerComponentEntryVirtualRoute } from './registerComponentEntryVirtualRoute.js';\nimport { registerComponentWrapperVirtualRoute } from './registerComponentWrapperVirtualRoute.js';\n\nexport function virtualModulesPlugin({ model }: { model: Model }) {\n const router = createVirtualRouter();\n\n registerComponentEntryVirtualRoute({ model, router });\n registerComponentWrapperVirtualRoute({ model, router });\n\n return viteVirtualRouterPlugin({\n name: 'wix:trusted-backoffice-virtual-modules-plugin',\n router,\n });\n}\n","export interface TrustedBackofficePage {\n type: 'TrustedBackofficePage';\n options: Options;\n}\n\ninterface Options {\n id: string;\n activeSidebarPageId?: string;\n component: string;\n fullPage?: boolean;\n hideInSidebar?: boolean;\n pageCategoryId?: string;\n previousRoutePaths?: string[];\n priority?: number;\n requiredPermission?: string;\n routePath: string;\n title: string;\n}\n\nexport function trustedBackofficePage(options: Options): TrustedBackofficePage {\n return {\n type: 'TrustedBackofficePage',\n options,\n };\n}\n","export interface TrustedBackofficeWidget {\n type: 'TrustedBackofficeWidget';\n options: Options;\n}\n\ninterface Options {\n id: string;\n component: string;\n height?: number;\n requiredPermission?: string;\n slotIds?: string[];\n title: string;\n width?: number;\n}\n\nexport function trustedBackofficeWidget(\n options: Options\n): TrustedBackofficeWidget {\n return {\n type: 'TrustedBackofficeWidget',\n options,\n };\n}\n","export { createIntegration as default } from './integration.js';\n\n// builders\nexport { trustedBackofficePage } from './builders/trustedBackofficePage.js';\nexport { trustedBackofficeWidget } from './builders/trustedBackofficeWidget.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,UAAU;AAUnB,SAAS,oBAAoB;;;ACV7B;AAQO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,MAAI,aAAa;AACf,UAAM,QAAQ,oBAAoB;AAAA,MAChC;AAAA,MACA,UAAU,KAAK,QAAQ;AAAA,IACzB,CAAC;AAED,WAAO,qBAAqB,SAAS,MAAM,QAAQ;AAAA,EACrD;AAEA,MAAI,eAAe;AACjB,WAAO,uBAAuB;AAAA,MAC5B;AAAA,MACA,WAAW;AAAA,MACX,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAEA,QAAM,IAAI,MAAM,mDAAmD;AACrE;;;ACrCA;AAGO,SAAS,uBAAuB,OAAc;AACnD,SAAO,MAAM,WAAW,OAAO,qBAAqB;AACtD;AAEA,SAAS,sBACP,WACiC;AACjC,SACE,UAAU,SAAS,2BACnB,UAAU,SAAS;AAEvB;;;ACdA;;;ACAA;;;ACAA;AAGO,SAAS,8BAA8B,OAAc,IAAY;AACtE,SAAO,uBAAuB,KAAK,EAAE,KAAK,CAAC,QAAQ,IAAI,QAAQ,OAAO,EAAE;AAC1E;;;ACLA;AAAA,SAAS,YAAY;AAWd,IAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,IACF;AAAA,IACA,YAAY;AAAA,EACd;AACF;AAEO,SAAS,sCAAsC,aAAqB;AACzE,SAAO,qCAAqC,WAAW;AACzD;AAEO,SAAS,qCAAqC;AAAA,EACnD;AAAA,EACA;AACF,GAGG;AACD,SAAO;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