@wix/cli-app 1.1.101 → 1.1.102

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 (80) hide show
  1. package/build/{AddPermissionCommand-AQD2ALKK.js → AddPermissionCommand-JWFWU33A.js} +2 -2
  2. package/build/{DevCommand-QWQNRPMT.js → DevCommand-6OGRGURU.js} +10 -10
  3. package/build/{DevCommand-QWQNRPMT.js.map → DevCommand-6OGRGURU.js.map} +1 -1
  4. package/build/{GenerateCommand-OQAZ7AQP.js → GenerateCommand-XVAC4XSX.js} +7 -7
  5. package/build/{LogsCommand-RQIJ3U7F.js → LogsCommand-LWIHQA42.js} +3 -3
  6. package/build/PreviewCommand-B6ZKKE76.js +19 -0
  7. package/build/ReleaseCommand-74EIKSEC.js +23 -0
  8. package/build/{ServeCommand-WOUZHV2Y.js → ServeCommand-3ZP2YZ5Z.js} +3 -3
  9. package/build/{build-C6DB6Y6E.js → build-HYWIEVFV.js} +6 -6
  10. package/build/{chunk-OMC2SHRJ.js → chunk-3CBDXOAT.js} +7 -7
  11. package/build/{chunk-R66WIGA4.js → chunk-675XBLUK.js} +2 -2
  12. package/build/{chunk-KJN5NVSU.js → chunk-7KYOZVDT.js} +6 -6
  13. package/build/{chunk-NPPPO5AD.js → chunk-7OFAQ3I5.js} +2 -2
  14. package/build/{chunk-CRTLCQQ3.js → chunk-ARET4KWX.js} +4 -4
  15. package/build/{chunk-YK5OGTF3.js → chunk-ESHNTWNK.js} +2 -2
  16. package/build/{chunk-5PFWNTTF.js → chunk-FD7SWKJQ.js} +2 -2
  17. package/build/{chunk-JYS6G4NW.js → chunk-IQYQOEW3.js} +144 -34
  18. package/build/{chunk-JYS6G4NW.js.map → chunk-IQYQOEW3.js.map} +1 -1
  19. package/build/{chunk-DAOCDBEQ.js → chunk-IUORUH2M.js} +47 -2
  20. package/build/{chunk-DAOCDBEQ.js.map → chunk-IUORUH2M.js.map} +1 -1
  21. package/build/{chunk-MRQDCRFF.js → chunk-JGOWLR4V.js} +2 -2
  22. package/build/{chunk-ZQWKIC6F.js → chunk-JHSKAYS4.js} +2 -2
  23. package/build/{chunk-4JT7QYEF.js → chunk-KQNNXJG2.js} +2 -2
  24. package/build/{chunk-FG7W5UDB.js → chunk-N3ILQXOU.js} +341 -173
  25. package/build/{chunk-FG7W5UDB.js.map → chunk-N3ILQXOU.js.map} +1 -1
  26. package/build/{chunk-VXAXSIUQ.js → chunk-OMZRNT5C.js} +6 -6
  27. package/build/{chunk-P5CHCVB6.js → chunk-R4PKDJ5K.js} +7 -7
  28. package/build/chunk-R4PKDJ5K.js.map +1 -0
  29. package/build/{chunk-6XUQYB5M.js → chunk-UJID64BQ.js} +3 -3
  30. package/build/{chunk-HSSABJL6.js → chunk-Z74G4VXQ.js} +2 -2
  31. package/build/cloudflare-runtime/entry.js +5 -2
  32. package/build/cloudflare-runtime/getRegisteredExtensions.js +5 -2
  33. package/build/index.js +23 -23
  34. package/build/platform-sdk/chunk-BBFFXVJD.js +2 -0
  35. package/build/platform-sdk/chunk-BBFFXVJD.js.map +1 -0
  36. package/build/platform-sdk/{chunk-ZBGVDXLX.js → chunk-MAZR75DI.js} +2 -2
  37. package/build/platform-sdk/chunk-MAZR75DI.js.map +1 -0
  38. package/build/platform-sdk/chunk-NHYZDMR5.js +2 -0
  39. package/build/platform-sdk/chunk-NHYZDMR5.js.map +1 -0
  40. package/build/platform-sdk/dashboard.js +1 -1
  41. package/build/platform-sdk/editor.js +2 -2
  42. package/build/platform-sdk/editor.js.map +1 -1
  43. package/build/platform-sdk/sdk-context.js +1 -1
  44. package/build/platform-sdk/sdk-context.js.map +1 -1
  45. package/build/platform-sdk/site.js +1 -1
  46. package/build/{preview-I3VBWU7J.js → preview-FVP3X6OT.js} +12 -12
  47. package/build/{release-IXG7HZBL.js → release-M6JMQJPF.js} +14 -14
  48. package/build/{render-command-6MZYM2OA.js → render-command-4XSRQ32M.js} +5 -5
  49. package/package.json +4 -4
  50. package/build/PreviewCommand-SSA3LRRR.js +0 -19
  51. package/build/ReleaseCommand-BBWVLP2S.js +0 -23
  52. package/build/chunk-P5CHCVB6.js.map +0 -1
  53. package/build/platform-sdk/chunk-J3SVE4GM.js +0 -2
  54. package/build/platform-sdk/chunk-J3SVE4GM.js.map +0 -1
  55. package/build/platform-sdk/chunk-J7RIIVO6.js +0 -2
  56. package/build/platform-sdk/chunk-J7RIIVO6.js.map +0 -1
  57. package/build/platform-sdk/chunk-ZBGVDXLX.js.map +0 -1
  58. /package/build/{AddPermissionCommand-AQD2ALKK.js.map → AddPermissionCommand-JWFWU33A.js.map} +0 -0
  59. /package/build/{GenerateCommand-OQAZ7AQP.js.map → GenerateCommand-XVAC4XSX.js.map} +0 -0
  60. /package/build/{LogsCommand-RQIJ3U7F.js.map → LogsCommand-LWIHQA42.js.map} +0 -0
  61. /package/build/{PreviewCommand-SSA3LRRR.js.map → PreviewCommand-B6ZKKE76.js.map} +0 -0
  62. /package/build/{ReleaseCommand-BBWVLP2S.js.map → ReleaseCommand-74EIKSEC.js.map} +0 -0
  63. /package/build/{ServeCommand-WOUZHV2Y.js.map → ServeCommand-3ZP2YZ5Z.js.map} +0 -0
  64. /package/build/{build-C6DB6Y6E.js.map → build-HYWIEVFV.js.map} +0 -0
  65. /package/build/{chunk-OMC2SHRJ.js.map → chunk-3CBDXOAT.js.map} +0 -0
  66. /package/build/{chunk-R66WIGA4.js.map → chunk-675XBLUK.js.map} +0 -0
  67. /package/build/{chunk-KJN5NVSU.js.map → chunk-7KYOZVDT.js.map} +0 -0
  68. /package/build/{chunk-NPPPO5AD.js.map → chunk-7OFAQ3I5.js.map} +0 -0
  69. /package/build/{chunk-CRTLCQQ3.js.map → chunk-ARET4KWX.js.map} +0 -0
  70. /package/build/{chunk-YK5OGTF3.js.map → chunk-ESHNTWNK.js.map} +0 -0
  71. /package/build/{chunk-5PFWNTTF.js.map → chunk-FD7SWKJQ.js.map} +0 -0
  72. /package/build/{chunk-MRQDCRFF.js.map → chunk-JGOWLR4V.js.map} +0 -0
  73. /package/build/{chunk-ZQWKIC6F.js.map → chunk-JHSKAYS4.js.map} +0 -0
  74. /package/build/{chunk-4JT7QYEF.js.map → chunk-KQNNXJG2.js.map} +0 -0
  75. /package/build/{chunk-VXAXSIUQ.js.map → chunk-OMZRNT5C.js.map} +0 -0
  76. /package/build/{chunk-6XUQYB5M.js.map → chunk-UJID64BQ.js.map} +0 -0
  77. /package/build/{chunk-HSSABJL6.js.map → chunk-Z74G4VXQ.js.map} +0 -0
  78. /package/build/{preview-I3VBWU7J.js.map → preview-FVP3X6OT.js.map} +0 -0
  79. /package/build/{release-IXG7HZBL.js.map → release-M6JMQJPF.js.map} +0 -0
  80. /package/build/{render-command-6MZYM2OA.js.map → render-command-4XSRQ32M.js.map} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  useTunnel
5
- } from "./chunk-HSSABJL6.js";
5
+ } from "./chunk-Z74G4VXQ.js";
6
6
  import "./chunk-GWE3BRHX.js";
7
7
  import {
8
8
  Box_default,
@@ -23,7 +23,7 @@ import {
23
23
  useProjectModel,
24
24
  useTranslation,
25
25
  z
26
- } from "./chunk-FG7W5UDB.js";
26
+ } from "./chunk-N3ILQXOU.js";
27
27
  import {
28
28
  __toESM,
29
29
  init_esm_shims
@@ -279,4 +279,4 @@ var LogsCommand = ({ version }) => {
279
279
  export {
280
280
  LogsCommand
281
281
  };
282
- //# sourceMappingURL=LogsCommand-RQIJ3U7F.js.map
282
+ //# sourceMappingURL=LogsCommand-LWIHQA42.js.map
@@ -0,0 +1,19 @@
1
+ import { createRequire as _createRequire } from 'node:module';
2
+ const require = _createRequire(import.meta.url);
3
+ import {
4
+ PreviewCommand
5
+ } from "./chunk-7KYOZVDT.js";
6
+ import "./chunk-UJID64BQ.js";
7
+ import "./chunk-3CBDXOAT.js";
8
+ import "./chunk-7OFAQ3I5.js";
9
+ import "./chunk-Z74G4VXQ.js";
10
+ import "./chunk-GWE3BRHX.js";
11
+ import "./chunk-KQNNXJG2.js";
12
+ import "./chunk-IQYQOEW3.js";
13
+ import "./chunk-IUORUH2M.js";
14
+ import "./chunk-N3ILQXOU.js";
15
+ import "./chunk-4EFJZ3GQ.js";
16
+ export {
17
+ PreviewCommand
18
+ };
19
+ //# sourceMappingURL=PreviewCommand-B6ZKKE76.js.map
@@ -0,0 +1,23 @@
1
+ import { createRequire as _createRequire } from 'node:module';
2
+ const require = _createRequire(import.meta.url);
3
+ import {
4
+ ReleaseCommand,
5
+ ReleaseVersionType
6
+ } from "./chunk-OMZRNT5C.js";
7
+ import "./chunk-7KYOZVDT.js";
8
+ import "./chunk-UJID64BQ.js";
9
+ import "./chunk-3CBDXOAT.js";
10
+ import "./chunk-JGOWLR4V.js";
11
+ import "./chunk-7OFAQ3I5.js";
12
+ import "./chunk-Z74G4VXQ.js";
13
+ import "./chunk-GWE3BRHX.js";
14
+ import "./chunk-KQNNXJG2.js";
15
+ import "./chunk-IQYQOEW3.js";
16
+ import "./chunk-IUORUH2M.js";
17
+ import "./chunk-N3ILQXOU.js";
18
+ import "./chunk-4EFJZ3GQ.js";
19
+ export {
20
+ ReleaseCommand,
21
+ ReleaseVersionType
22
+ };
23
+ //# sourceMappingURL=ReleaseCommand-74EIKSEC.js.map
@@ -3,14 +3,14 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  createPackageManager,
5
5
  getRepoType
6
- } from "./chunk-YK5OGTF3.js";
6
+ } from "./chunk-ESHNTWNK.js";
7
7
  import "./chunk-GWE3BRHX.js";
8
8
  import {
9
9
  CliError,
10
10
  CliErrorCode,
11
11
  useAsync,
12
12
  useProjectModel
13
- } from "./chunk-FG7W5UDB.js";
13
+ } from "./chunk-N3ILQXOU.js";
14
14
  import {
15
15
  init_esm_shims
16
16
  } from "./chunk-4EFJZ3GQ.js";
@@ -40,4 +40,4 @@ var ServeCommandDeprecated = () => {
40
40
  export {
41
41
  ServeCommandDeprecated
42
42
  };
43
- //# sourceMappingURL=ServeCommand-WOUZHV2Y.js.map
43
+ //# sourceMappingURL=ServeCommand-3ZP2YZ5Z.js.map
@@ -2,10 +2,10 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  writeAppManifestFile
5
- } from "./chunk-6XUQYB5M.js";
5
+ } from "./chunk-UJID64BQ.js";
6
6
  import {
7
7
  createLogger
8
- } from "./chunk-R66WIGA4.js";
8
+ } from "./chunk-675XBLUK.js";
9
9
  import {
10
10
  createAppManifest,
11
11
  getComponentBuildSourceBuilder,
@@ -14,15 +14,15 @@ import {
14
14
  getViteConfig4 as getViteConfig3,
15
15
  getViteConfig5 as getViteConfig4,
16
16
  validateComponents
17
- } from "./chunk-JYS6G4NW.js";
18
- import "./chunk-DAOCDBEQ.js";
17
+ } from "./chunk-IQYQOEW3.js";
18
+ import "./chunk-IUORUH2M.js";
19
19
  import {
20
20
  CliError,
21
21
  CliErrorCode,
22
22
  DevCenterComponent,
23
23
  getDistFolder,
24
24
  require_lib
25
- } from "./chunk-FG7W5UDB.js";
25
+ } from "./chunk-N3ILQXOU.js";
26
26
  import {
27
27
  __toESM,
28
28
  init_esm_shims
@@ -133,4 +133,4 @@ async function build(projectModel) {
133
133
  export {
134
134
  build
135
135
  };
136
- //# sourceMappingURL=build-C6DB6Y6E.js.map
136
+ //# sourceMappingURL=build-HYWIEVFV.js.map
@@ -4,13 +4,13 @@ import {
4
4
  componentGenerator,
5
5
  require_lodash,
6
6
  useBackendComponents
7
- } from "./chunk-NPPPO5AD.js";
7
+ } from "./chunk-7OFAQ3I5.js";
8
8
  import {
9
9
  useTunnel
10
- } from "./chunk-HSSABJL6.js";
10
+ } from "./chunk-Z74G4VXQ.js";
11
11
  import {
12
12
  useDebugLog
13
- } from "./chunk-4JT7QYEF.js";
13
+ } from "./chunk-KQNNXJG2.js";
14
14
  import {
15
15
  createAppManifest,
16
16
  getComponentDevSourceBuilder,
@@ -18,10 +18,10 @@ import {
18
18
  getViteConfig2,
19
19
  getViteServerUrl,
20
20
  updateAppManifestComponents
21
- } from "./chunk-JYS6G4NW.js";
21
+ } from "./chunk-IQYQOEW3.js";
22
22
  import {
23
23
  useExtensionDataClient
24
- } from "./chunk-DAOCDBEQ.js";
24
+ } from "./chunk-IUORUH2M.js";
25
25
  import {
26
26
  APP_CONFIG_PATH,
27
27
  Alert,
@@ -82,7 +82,7 @@ import {
82
82
  wixCliAction,
83
83
  wixCliAppFlowStepsAnswers,
84
84
  z
85
- } from "./chunk-FG7W5UDB.js";
85
+ } from "./chunk-N3ILQXOU.js";
86
86
  import {
87
87
  __commonJS,
88
88
  __dirname,
@@ -28992,4 +28992,4 @@ xmlhttprequest-ssl/lib/XMLHttpRequest.js:
28992
28992
  * @license MIT
28993
28993
  *)
28994
28994
  */
28995
- //# sourceMappingURL=chunk-OMC2SHRJ.js.map
28995
+ //# sourceMappingURL=chunk-3CBDXOAT.js.map
@@ -5,7 +5,7 @@ import {
5
5
  createRendererToString,
6
6
  isCliError,
7
7
  require_react
8
- } from "./chunk-FG7W5UDB.js";
8
+ } from "./chunk-N3ILQXOU.js";
9
9
  import {
10
10
  __toESM,
11
11
  init_esm_shims
@@ -58,4 +58,4 @@ function createLogger({
58
58
  export {
59
59
  createLogger
60
60
  };
61
- //# sourceMappingURL=chunk-R66WIGA4.js.map
61
+ //# sourceMappingURL=chunk-675XBLUK.js.map
@@ -2,7 +2,7 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  readAppManifestFile
5
- } from "./chunk-6XUQYB5M.js";
5
+ } from "./chunk-UJID64BQ.js";
6
6
  import {
7
7
  ArmTagProvider,
8
8
  ExtensionDataProvider,
@@ -16,16 +16,16 @@ import {
16
16
  useResolvePlatformUrl,
17
17
  useSite,
18
18
  useSiteOverrideClient
19
- } from "./chunk-OMC2SHRJ.js";
19
+ } from "./chunk-3CBDXOAT.js";
20
20
  import {
21
21
  useBackendComponents
22
- } from "./chunk-NPPPO5AD.js";
22
+ } from "./chunk-7OFAQ3I5.js";
23
23
  import {
24
24
  getMonitoringProvider,
25
25
  updateAppManifestComponents,
26
26
  updateMonitoring,
27
27
  updateTopology
28
- } from "./chunk-JYS6G4NW.js";
28
+ } from "./chunk-IQYQOEW3.js";
29
29
  import {
30
30
  Alert,
31
31
  BROWSER_STATICS_FOLDER,
@@ -57,7 +57,7 @@ import {
57
57
  useHttpClient,
58
58
  useProjectModel,
59
59
  useTranslation
60
- } from "./chunk-FG7W5UDB.js";
60
+ } from "./chunk-N3ILQXOU.js";
61
61
  import {
62
62
  __toESM,
63
63
  init_esm_shims
@@ -294,4 +294,4 @@ export {
294
294
  assertBuildOutputExists,
295
295
  PreviewCommand
296
296
  };
297
- //# sourceMappingURL=chunk-KJN5NVSU.js.map
297
+ //# sourceMappingURL=chunk-7KYOZVDT.js.map
@@ -15,7 +15,7 @@ import {
15
15
  useProjectModel,
16
16
  writePackageJson,
17
17
  z
18
- } from "./chunk-FG7W5UDB.js";
18
+ } from "./chunk-N3ILQXOU.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __require,
@@ -9385,4 +9385,4 @@ ejs/lib/ejs.js:
9385
9385
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
9386
9386
  *)
9387
9387
  */
9388
- //# sourceMappingURL=chunk-NPPPO5AD.js.map
9388
+ //# sourceMappingURL=chunk-7OFAQ3I5.js.map
@@ -2,13 +2,13 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  addUserFields
5
- } from "./chunk-5PFWNTTF.js";
5
+ } from "./chunk-FD7SWKJQ.js";
6
6
  import {
7
7
  messages_default
8
8
  } from "./chunk-T5HHDBBR.js";
9
9
  import {
10
10
  DebugLogProvider
11
- } from "./chunk-4JT7QYEF.js";
11
+ } from "./chunk-KQNNXJG2.js";
12
12
  import {
13
13
  AccountAuthProvider,
14
14
  BiProvider,
@@ -21,7 +21,7 @@ import {
21
21
  getDebugLogFilePath,
22
22
  isLoggedInToAccount,
23
23
  require_react
24
- } from "./chunk-FG7W5UDB.js";
24
+ } from "./chunk-N3ILQXOU.js";
25
25
  import {
26
26
  __toESM,
27
27
  init_esm_shims
@@ -63,4 +63,4 @@ export {
63
63
  log,
64
64
  executeCommand
65
65
  };
66
- //# sourceMappingURL=chunk-CRTLCQQ3.js.map
66
+ //# sourceMappingURL=chunk-ARET4KWX.js.map
@@ -11,7 +11,7 @@ import {
11
11
  require_lib,
12
12
  writeJson,
13
13
  z
14
- } from "./chunk-FG7W5UDB.js";
14
+ } from "./chunk-N3ILQXOU.js";
15
15
  import {
16
16
  __toESM,
17
17
  init_esm_shims
@@ -351,4 +351,4 @@ export {
351
351
  getRepoType,
352
352
  createPackageManager
353
353
  };
354
- //# sourceMappingURL=chunk-YK5OGTF3.js.map
354
+ //# sourceMappingURL=chunk-ESHNTWNK.js.map
@@ -5,7 +5,7 @@ import {
5
5
  isCliSystemError,
6
6
  wixCliCliCommand,
7
7
  wixCliCliCommandStatus
8
- } from "./chunk-FG7W5UDB.js";
8
+ } from "./chunk-N3ILQXOU.js";
9
9
  import {
10
10
  __commonJS,
11
11
  __toESM,
@@ -594,4 +594,4 @@ export {
594
594
  addUserFields,
595
595
  reportCommandStartEvent
596
596
  };
597
- //# sourceMappingURL=chunk-5PFWNTTF.js.map
597
+ //# sourceMappingURL=chunk-FD7SWKJQ.js.map
@@ -3,7 +3,7 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  getBackendEventSlug,
5
5
  require_baseUniq
6
- } from "./chunk-DAOCDBEQ.js";
6
+ } from "./chunk-IUORUH2M.js";
7
7
  import {
8
8
  API_BASEURL_PLACEHOLDER,
9
9
  BACKEND_OPTIMIZED_DIR,
@@ -27,12 +27,14 @@ import {
27
27
  ExtendingComponentType,
28
28
  HeightMode,
29
29
  MonitoringType,
30
+ PRESETS_DIR,
30
31
  PanelContentType,
31
32
  RELATIVE_ASSET_PATH_REGEX,
32
33
  RegionType,
33
34
  SERVICE_PLUGINS_PATTERN,
34
35
  SITE_COMPONENTS_PANEL_PATTERN,
35
36
  SITE_COMPONENTS_PATTERN,
37
+ SITE_COMPONENTS_PRESETS_PATTERN,
36
38
  SITE_COMPONENTS_SDK_PATTERN,
37
39
  SITE_PLUGINS_PANEL_PATTERN,
38
40
  SITE_PLUGINS_PLUGIN_PATTERN,
@@ -73,11 +75,13 @@ import {
73
75
  virtualModuleIdForSiteComponentSdkScriptAsset,
74
76
  virtualPathForCustomElementPanelHTMLAsset,
75
77
  virtualPathForHTMLAsset,
78
+ virtualPresetIdForSiteComponent,
76
79
  virtualSiteComponentPanelScriptAssets,
80
+ virtualSiteComponentPresetAssets,
77
81
  virtualSiteComponentScriptAssets,
78
82
  virtualSiteComponentSdkScriptAssets,
79
83
  z
80
- } from "./chunk-FG7W5UDB.js";
84
+ } from "./chunk-N3ILQXOU.js";
81
85
  import {
82
86
  __commonJS,
83
87
  __esm,
@@ -39089,7 +39093,7 @@ function fbjsHotfixPlugin() {
39089
39093
 
39090
39094
  // src/vite/plugins/config-extensions-file-emitter.ts
39091
39095
  init_esm_shims();
39092
- import path5 from "node:path";
39096
+ import path5, { dirname as dirname2 } from "node:path";
39093
39097
  function configExtensionsFileEmitter(model) {
39094
39098
  return {
39095
39099
  name: "config-extensions-file-emitter",
@@ -39127,6 +39131,16 @@ function configExtensionsFileEmitter(model) {
39127
39131
  }
39128
39132
  }
39129
39133
  }
39134
+ if (component.type === "SiteComponent" && component.editorElement?.presets) {
39135
+ for (const preset of Object.values(component.editorElement.presets)) {
39136
+ if (preset.thumbnailUrl && RELATIVE_ASSET_PATH_REGEX.test(preset.thumbnailUrl)) {
39137
+ preset.thumbnailUrl = await emitAssetFile(
39138
+ preset.thumbnailUrl,
39139
+ dirname2(component.relativePath)
39140
+ );
39141
+ }
39142
+ }
39143
+ }
39130
39144
  }
39131
39145
  }
39132
39146
  };
@@ -39266,6 +39280,9 @@ function getViteConfig2(model, options) {
39266
39280
  const virtualSiteComponentPanelScriptEntries = [
39267
39281
  ...virtualSiteComponentPanelScriptAssets(model)
39268
39282
  ].map(([assetId, component]) => [`script-asset-${component.id}`, assetId]);
39283
+ const virtualSiteComponentPresetEntries = [
39284
+ ...virtualSiteComponentPresetAssets(model)
39285
+ ].map(([assetId, assetPath]) => [assetId, assetPath]);
39269
39286
  return {
39270
39287
  configFile: false,
39271
39288
  root: model.projectFolder,
@@ -39287,7 +39304,8 @@ function getViteConfig2(model, options) {
39287
39304
  ...virtualCustomElementHTMLEntries,
39288
39305
  ...virtualCustomElementScriptEntries,
39289
39306
  ...virtualSiteComponentScriptEntries,
39290
- ...virtualSiteComponentPanelScriptEntries
39307
+ ...virtualSiteComponentPanelScriptEntries,
39308
+ ...virtualSiteComponentPresetEntries
39291
39309
  ]),
39292
39310
  ...virtualSiteComponentScriptEntries.length ? { [EXPORTS_CUSTODIAN_ENTRY]: EXPORTS_CUSTODIAN_ENTRY } : {}
39293
39311
  },
@@ -39647,7 +39665,7 @@ function autoOrigin() {
39647
39665
 
39648
39666
  // src/vite/plugins/absolute-html-url.ts
39649
39667
  init_esm_shims();
39650
- import { dirname as dirname2, isAbsolute as isAbsolute2, join as join5 } from "node:path";
39668
+ import { dirname as dirname3, isAbsolute as isAbsolute2, join as join5 } from "node:path";
39651
39669
  import { URL as URL2 } from "node:url";
39652
39670
  function getAbsoluteAssetUrl(originalUrl, assetUrl, viteAddress) {
39653
39671
  let url = new URL2(assetUrl, viteAddress).href;
@@ -39655,7 +39673,7 @@ function getAbsoluteAssetUrl(originalUrl, assetUrl, viteAddress) {
39655
39673
  return url;
39656
39674
  }
39657
39675
  if (!isAbsolute2(assetUrl)) {
39658
- const assetPath = join5(dirname2(originalUrl), assetUrl);
39676
+ const assetPath = join5(dirname3(originalUrl), assetUrl);
39659
39677
  url = new URL2(assetPath, viteAddress).href;
39660
39678
  }
39661
39679
  return url;
@@ -39715,7 +39733,8 @@ function getViteConfig5(model, options) {
39715
39733
  BLOCKS_WIDGETS_PANELS_PATTERN,
39716
39734
  SITE_COMPONENTS_PATTERN,
39717
39735
  SITE_COMPONENTS_PANEL_PATTERN,
39718
- SITE_COMPONENTS_SDK_PATTERN
39736
+ SITE_COMPONENTS_SDK_PATTERN,
39737
+ SITE_COMPONENTS_PRESETS_PATTERN
39719
39738
  ]
39720
39739
  },
39721
39740
  server: { cors: { origin: true } },
@@ -39754,7 +39773,6 @@ function getViteConfig5(model, options) {
39754
39773
  initialModel: model,
39755
39774
  ...options
39756
39775
  }),
39757
- configExtensionsFileEmitter(model),
39758
39776
  monitoring({ initialModel: model }),
39759
39777
  src_default({
39760
39778
  ignoreConfigErrors: true,
@@ -39874,13 +39892,13 @@ init_esm_shims();
39874
39892
  var import_variant4 = __toESM(require_lib(), 1);
39875
39893
  var import_uniqWith = __toESM(require_uniqWith(), 1);
39876
39894
  import { randomUUID as randomUUID2 } from "node:crypto";
39877
- import { dirname as dirname3, join as join6 } from "node:path";
39895
+ import { dirname as dirname4, join as join6 } from "node:path";
39878
39896
  function isTruthy(x) {
39879
39897
  return x != null && x !== false;
39880
39898
  }
39881
39899
  function parseImageField(asset, relativePath) {
39882
39900
  if (RELATIVE_ASSET_PATH_REGEX.test(asset)) {
39883
- return join6(dirname3(`/${relativePath}`), asset);
39901
+ return join6(dirname4(`/${relativePath}`), asset);
39884
39902
  }
39885
39903
  return asset;
39886
39904
  }
@@ -40290,6 +40308,7 @@ async function createAppManifest({
40290
40308
  };
40291
40309
  },
40292
40310
  SiteComponent: async (component) => {
40311
+ const siteComponentSource = await componentSourceBuilder(component);
40293
40312
  return {
40294
40313
  compId: component.id,
40295
40314
  compType: ComponentType.EDITOR_REACT_COMPONENT,
@@ -40297,9 +40316,12 @@ async function createAppManifest({
40297
40316
  editorReactComponent: {
40298
40317
  type: `platform.builder.${appId}_${component.id}`,
40299
40318
  description: component.description,
40300
- editorElement: component.editorElement,
40319
+ editorElement: component.editorElement && {
40320
+ ...component.editorElement,
40321
+ presets: siteComponentSource.presets
40322
+ },
40301
40323
  installation: component.installation,
40302
- resources: { ...await componentSourceBuilder(component) }
40324
+ resources: { ...siteComponentSource.resources }
40303
40325
  }
40304
40326
  }
40305
40327
  };
@@ -40339,7 +40361,7 @@ async function createAppManifest({
40339
40361
  // src/app-manifest/component-source.ts
40340
40362
  init_esm_shims();
40341
40363
  var import_variant5 = __toESM(require_lib(), 1);
40342
- import path8, { join as join7 } from "node:path";
40364
+ import path8, { dirname as dirname5, join as join7 } from "node:path";
40343
40365
  import { pathToFileURL as pathToFileURL2 } from "node:url";
40344
40366
 
40345
40367
  // src/app-manifest/build-output-data-extractor.ts
@@ -40356,6 +40378,21 @@ function extractBuildOutputs(buildOutput) {
40356
40378
  const outputs = Array.isArray(buildOutput) ? buildOutput.flatMap((output) => output.output) : buildOutput.output;
40357
40379
  return outputs;
40358
40380
  }
40381
+ function extractPresetAssetOutput(buildOutput, presetAssetFileName) {
40382
+ const outputs = extractBuildOutputs(buildOutput);
40383
+ const presetFile = outputs.find((output) => {
40384
+ return output.type === "asset" && output.names.includes(presetAssetFileName);
40385
+ });
40386
+ if (!presetFile) {
40387
+ throw new CliError({
40388
+ code: CliErrorCode.ViteFileNotFoundInOutput({
40389
+ fileName: presetAssetFileName
40390
+ }),
40391
+ cause: null
40392
+ });
40393
+ }
40394
+ return presetFile;
40395
+ }
40359
40396
  function extractAssetOutput(buildOutput, fileName) {
40360
40397
  const outputs = extractBuildOutputs(buildOutput);
40361
40398
  return outputs.find((output) => {
@@ -40394,6 +40431,10 @@ function extractModuleBundleCss(buildOutput, moduleId) {
40394
40431
  const importedCss = output.viteMetadata?.importedCss;
40395
40432
  return importedCss?.values().next().value;
40396
40433
  }
40434
+ function extractPresetCss(buildOutput, presetAssetFileName) {
40435
+ const output = extractPresetAssetOutput(buildOutput, presetAssetFileName);
40436
+ return output.fileName;
40437
+ }
40397
40438
  function extractModuleBundleContent(buildOutput, fileName) {
40398
40439
  const output = extractAssetOutput(buildOutput, fileName);
40399
40440
  if (!output || !("source" in output)) {
@@ -40567,11 +40608,31 @@ var blocksPanelBuilder = (component, source) => {
40567
40608
  var siteComponentDevBuilder = (component) => {
40568
40609
  const moduleId = virtualModuleIdForSiteComponentScriptAsset(component.id);
40569
40610
  const sdkModuleId = component.relativeSdkPath ? virtualModuleIdForSiteComponentSdkScriptAsset(component.id) : null;
40611
+ const presets = component.editorElement?.presets ? Object.entries(
40612
+ component.editorElement.presets
40613
+ ).reduce((acc, [presetName, presetConfig]) => {
40614
+ acc[presetName] = {
40615
+ displayName: presetConfig.displayName,
40616
+ thumbnailUrl: presetConfig.thumbnailUrl && parseImageField(
40617
+ presetConfig.thumbnailUrl,
40618
+ dirname5(component.relativePath)
40619
+ ),
40620
+ cssUrl: join7(
40621
+ dirname5(component.relativePath),
40622
+ PRESETS_DIR,
40623
+ `${presetName}.css`
40624
+ )
40625
+ };
40626
+ return acc;
40627
+ }, {}) : {};
40570
40628
  return {
40571
- client: {
40572
- componentUrl: `/@id/${moduleId}?import`
40573
- },
40574
- ...sdkModuleId ? { sdk: { url: `/@id/${sdkModuleId}?import` } } : {}
40629
+ presets,
40630
+ resources: {
40631
+ client: {
40632
+ componentUrl: `/@id/${moduleId}?import`
40633
+ },
40634
+ ...sdkModuleId ? { sdk: { url: `/@id/${sdkModuleId}?import` } } : {}
40635
+ }
40575
40636
  };
40576
40637
  };
40577
40638
  var siteComponentBuildBuilder = (component, { browserBuildOutput }, { ssrBuildOutput }) => {
@@ -40580,19 +40641,37 @@ var siteComponentBuildBuilder = (component, { browserBuildOutput }, { ssrBuildOu
40580
40641
  if (!ssrBuildOutput) {
40581
40642
  throw new Error("Missing build output for site component");
40582
40643
  }
40644
+ const presets = {};
40645
+ if (component.editorElement?.presets) {
40646
+ for (const [presetName, presetConfig] of Object.entries(
40647
+ component.editorElement.presets
40648
+ )) {
40649
+ const modulePresetId = virtualPresetIdForSiteComponent(
40650
+ component.id,
40651
+ presetName
40652
+ );
40653
+ presets[presetName] = {
40654
+ ...presetConfig,
40655
+ cssUrl: extractPresetCss(browserBuildOutput, modulePresetId)
40656
+ };
40657
+ }
40658
+ }
40583
40659
  return {
40584
- client: {
40585
- componentUrl: extractModuleBundleName(browserBuildOutput, moduleId),
40586
- cssUrl: extractModuleBundleCss(browserBuildOutput, moduleId)
40587
- },
40588
- server: {
40589
- url: extractModuleBundleName(ssrBuildOutput, moduleId)
40590
- },
40591
- ...sdkModuleId ? {
40592
- sdk: {
40593
- url: extractModuleBundleName(ssrBuildOutput, sdkModuleId)
40594
- }
40595
- } : {}
40660
+ presets,
40661
+ resources: {
40662
+ client: {
40663
+ componentUrl: extractModuleBundleName(browserBuildOutput, moduleId),
40664
+ cssUrl: extractModuleBundleCss(browserBuildOutput, moduleId)
40665
+ },
40666
+ server: {
40667
+ url: extractModuleBundleName(ssrBuildOutput, moduleId)
40668
+ },
40669
+ ...sdkModuleId ? {
40670
+ sdk: {
40671
+ url: extractModuleBundleName(ssrBuildOutput, sdkModuleId)
40672
+ }
40673
+ } : {}
40674
+ }
40596
40675
  };
40597
40676
  };
40598
40677
  var siteComponentPanelBuilder = (component, source) => {
@@ -41174,7 +41253,7 @@ var monitoringSchema = z.object({
41174
41253
  monitoring: z.unknown()
41175
41254
  })
41176
41255
  });
41177
- var siteComponentSourceSchema = z.object({
41256
+ var siteComponentResourcesSchema = z.object({
41178
41257
  client: z.object({
41179
41258
  componentUrl: z.string(),
41180
41259
  cssUrl: z.string().optional()
@@ -41186,6 +41265,14 @@ var siteComponentSourceSchema = z.object({
41186
41265
  url: z.string()
41187
41266
  }).optional()
41188
41267
  });
41268
+ var siteComponentPresetsSchema = z.record(
41269
+ z.string(),
41270
+ z.object({
41271
+ cssUrl: z.string(),
41272
+ displayName: z.string(),
41273
+ thumbnailUrl: z.string().optional()
41274
+ })
41275
+ );
41189
41276
  var siteComponentSchema = z.object({
41190
41277
  compType: z.literal(ComponentType.EDITOR_REACT_COMPONENT),
41191
41278
  compId: z.string(),
@@ -41194,9 +41281,13 @@ var siteComponentSchema = z.object({
41194
41281
  editorReactComponent: z.object({
41195
41282
  type: z.string().min(5),
41196
41283
  description: z.string().min(5),
41197
- resources: siteComponentSourceSchema,
41198
- editorElement: z.unknown(),
41199
- installation: z.unknown()
41284
+ resources: siteComponentResourcesSchema,
41285
+ installation: z.unknown(),
41286
+ editorElement: z.object({
41287
+ displayName: z.string(),
41288
+ selector: z.string(),
41289
+ presets: siteComponentPresetsSchema
41290
+ }).passthrough().optional()
41200
41291
  })
41201
41292
  })
41202
41293
  });
@@ -41435,6 +41526,19 @@ var overrideCustomElementPresetsWithNormalizedAssets = (presets, normalizedBaseU
41435
41526
  }
41436
41527
  return {};
41437
41528
  };
41529
+ var overrideSiteComponentPresetsWithNormalizedAssets = (presets, normalizedBaseUrl) => {
41530
+ return Object.entries(presets).reduce(
41531
+ (siteComponentPresets, [presetName, presetConfig]) => {
41532
+ siteComponentPresets[presetName] = {
41533
+ ...presetConfig,
41534
+ thumbnailUrl: presetConfig.thumbnailUrl && normalizeUrl(presetConfig.thumbnailUrl, normalizedBaseUrl),
41535
+ cssUrl: normalizeUrl(presetConfig.cssUrl, normalizedBaseUrl)
41536
+ };
41537
+ return siteComponentPresets;
41538
+ },
41539
+ {}
41540
+ );
41541
+ };
41438
41542
  var overrideSitePluginMarketDataWithNormalizedLogoUrl = (marketData, normalizedBaseUrl) => {
41439
41543
  const logoUrl = marketData.logoUrl;
41440
41544
  if (logoUrl) {
@@ -41535,6 +41639,12 @@ var updateBrowserComponentsWithBaseUrl = (appManifest, baseUrl) => {
41535
41639
  compData.editorReactComponent.resources.client.componentUrl,
41536
41640
  normalizedBaseUrl
41537
41641
  );
41642
+ if (compData.editorReactComponent.editorElement?.presets) {
41643
+ compData.editorReactComponent.editorElement.presets = overrideSiteComponentPresetsWithNormalizedAssets(
41644
+ compData.editorReactComponent.editorElement.presets,
41645
+ normalizedBaseUrl
41646
+ );
41647
+ }
41538
41648
  if (compData.editorReactComponent.resources.client.cssUrl) {
41539
41649
  compData.editorReactComponent.resources.client.cssUrl = normalizeUrl(
41540
41650
  compData.editorReactComponent.resources.client.cssUrl,
@@ -41824,4 +41934,4 @@ export {
41824
41934
  he/he.js:
41825
41935
  (*! https://mths.be/he v1.2.0 by @mathias | MIT license *)
41826
41936
  */
41827
- //# sourceMappingURL=chunk-JYS6G4NW.js.map
41937
+ //# sourceMappingURL=chunk-IQYQOEW3.js.map