@ikas/component-cli 1.4.0-beta.20 → 1.4.0-beta.200

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 (172) hide show
  1. package/dist/build-tools.d.ts +37 -0
  2. package/dist/build-tools.d.ts.map +1 -0
  3. package/dist/build-tools.js +36 -0
  4. package/dist/build-tools.js.map +1 -0
  5. package/dist/commands/add-sections-to-page.d.ts +3 -0
  6. package/dist/commands/add-sections-to-page.d.ts.map +1 -0
  7. package/dist/commands/add-sections-to-page.js +39 -0
  8. package/dist/commands/add-sections-to-page.js.map +1 -0
  9. package/dist/commands/add.d.ts.map +1 -1
  10. package/dist/commands/add.js +11 -2
  11. package/dist/commands/add.js.map +1 -1
  12. package/dist/commands/build.d.ts.map +1 -1
  13. package/dist/commands/build.js +5 -165
  14. package/dist/commands/build.js.map +1 -1
  15. package/dist/commands/config.d.ts +35 -0
  16. package/dist/commands/config.d.ts.map +1 -1
  17. package/dist/commands/config.js +1068 -126
  18. package/dist/commands/config.js.map +1 -1
  19. package/dist/commands/create-design-tokens.d.ts +24 -0
  20. package/dist/commands/create-design-tokens.d.ts.map +1 -0
  21. package/dist/commands/create-design-tokens.js +327 -0
  22. package/dist/commands/create-design-tokens.js.map +1 -0
  23. package/dist/commands/create-global-variable.d.ts +3 -0
  24. package/dist/commands/create-global-variable.d.ts.map +1 -0
  25. package/dist/commands/create-global-variable.js +73 -0
  26. package/dist/commands/create-global-variable.js.map +1 -0
  27. package/dist/commands/create-page.d.ts +3 -0
  28. package/dist/commands/create-page.d.ts.map +1 -0
  29. package/dist/commands/create-page.js +31 -0
  30. package/dist/commands/create-page.js.map +1 -0
  31. package/dist/commands/delete-page.d.ts +3 -0
  32. package/dist/commands/delete-page.d.ts.map +1 -0
  33. package/dist/commands/delete-page.js +28 -0
  34. package/dist/commands/delete-page.js.map +1 -0
  35. package/dist/commands/delete-theme-globals.d.ts +4 -0
  36. package/dist/commands/delete-theme-globals.d.ts.map +1 -0
  37. package/dist/commands/delete-theme-globals.js +48 -0
  38. package/dist/commands/delete-theme-globals.js.map +1 -0
  39. package/dist/commands/dev.d.ts.map +1 -1
  40. package/dist/commands/dev.js +170 -31
  41. package/dist/commands/dev.js.map +1 -1
  42. package/dist/commands/enable-builtin-pages.d.ts +3 -0
  43. package/dist/commands/enable-builtin-pages.d.ts.map +1 -0
  44. package/dist/commands/enable-builtin-pages.js +27 -0
  45. package/dist/commands/enable-builtin-pages.js.map +1 -0
  46. package/dist/commands/get-component-props.d.ts +3 -0
  47. package/dist/commands/get-component-props.d.ts.map +1 -0
  48. package/dist/commands/get-component-props.js +32 -0
  49. package/dist/commands/get-component-props.js.map +1 -0
  50. package/dist/commands/get-page-by-type.d.ts +3 -0
  51. package/dist/commands/get-page-by-type.d.ts.map +1 -0
  52. package/dist/commands/get-page-by-type.js +25 -0
  53. package/dist/commands/get-page-by-type.js.map +1 -0
  54. package/dist/commands/get-section-values.d.ts +3 -0
  55. package/dist/commands/get-section-values.d.ts.map +1 -0
  56. package/dist/commands/get-section-values.js +39 -0
  57. package/dist/commands/get-section-values.js.map +1 -0
  58. package/dist/commands/list-builtin-pages.d.ts +3 -0
  59. package/dist/commands/list-builtin-pages.d.ts.map +1 -0
  60. package/dist/commands/list-builtin-pages.js +28 -0
  61. package/dist/commands/list-builtin-pages.js.map +1 -0
  62. package/dist/commands/list-entities.d.ts +3 -0
  63. package/dist/commands/list-entities.d.ts.map +1 -0
  64. package/dist/commands/list-entities.js +32 -0
  65. package/dist/commands/list-entities.js.map +1 -0
  66. package/dist/commands/list-page-sections.d.ts.map +1 -1
  67. package/dist/commands/list-page-sections.js +8 -2
  68. package/dist/commands/list-page-sections.js.map +1 -1
  69. package/dist/commands/list-theme-globals.d.ts +3 -0
  70. package/dist/commands/list-theme-globals.d.ts.map +1 -0
  71. package/dist/commands/list-theme-globals.js +22 -0
  72. package/dist/commands/list-theme-globals.js.map +1 -0
  73. package/dist/commands/move-page-section.d.ts +3 -0
  74. package/dist/commands/move-page-section.d.ts.map +1 -0
  75. package/dist/commands/move-page-section.js +62 -0
  76. package/dist/commands/move-page-section.js.map +1 -0
  77. package/dist/commands/publish-theme.d.ts +3 -0
  78. package/dist/commands/publish-theme.d.ts.map +1 -0
  79. package/dist/commands/publish-theme.js +29 -0
  80. package/dist/commands/publish-theme.js.map +1 -0
  81. package/dist/commands/publish.d.ts.map +1 -1
  82. package/dist/commands/publish.js +54 -3
  83. package/dist/commands/publish.js.map +1 -1
  84. package/dist/commands/remove-page-section.d.ts +3 -0
  85. package/dist/commands/remove-page-section.d.ts.map +1 -0
  86. package/dist/commands/remove-page-section.js +40 -0
  87. package/dist/commands/remove-page-section.js.map +1 -0
  88. package/dist/commands/search-products.d.ts +3 -0
  89. package/dist/commands/search-products.d.ts.map +1 -0
  90. package/dist/commands/search-products.js +40 -0
  91. package/dist/commands/search-products.js.map +1 -0
  92. package/dist/commands/update-builtin-page-prop.d.ts +3 -0
  93. package/dist/commands/update-builtin-page-prop.d.ts.map +1 -0
  94. package/dist/commands/update-builtin-page-prop.js +49 -0
  95. package/dist/commands/update-builtin-page-prop.js.map +1 -0
  96. package/dist/commands/update-global-variable.d.ts +3 -0
  97. package/dist/commands/update-global-variable.d.ts.map +1 -0
  98. package/dist/commands/update-global-variable.js +70 -0
  99. package/dist/commands/update-global-variable.js.map +1 -0
  100. package/dist/commands/update-page-sections.d.ts +3 -0
  101. package/dist/commands/update-page-sections.d.ts.map +1 -0
  102. package/dist/commands/update-page-sections.js +39 -0
  103. package/dist/commands/update-page-sections.js.map +1 -0
  104. package/dist/commands/update-section-prop.d.ts.map +1 -1
  105. package/dist/commands/update-section-prop.js +25 -8
  106. package/dist/commands/update-section-prop.js.map +1 -1
  107. package/dist/commands/upload-image.d.ts.map +1 -1
  108. package/dist/commands/upload-image.js +5 -46
  109. package/dist/commands/upload-image.js.map +1 -1
  110. package/dist/commands/upload-images.d.ts +3 -0
  111. package/dist/commands/upload-images.d.ts.map +1 -0
  112. package/dist/commands/upload-images.js +48 -0
  113. package/dist/commands/upload-images.js.map +1 -0
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +54 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/types.d.ts +51 -0
  118. package/dist/types.d.ts.map +1 -1
  119. package/dist/utils/compile.d.ts +17 -2
  120. package/dist/utils/compile.d.ts.map +1 -1
  121. package/dist/utils/compile.js +750 -117
  122. package/dist/utils/compile.js.map +1 -1
  123. package/dist/utils/component-helpers.d.ts +134 -2
  124. package/dist/utils/component-helpers.d.ts.map +1 -1
  125. package/dist/utils/component-helpers.js +360 -29
  126. package/dist/utils/component-helpers.js.map +1 -1
  127. package/dist/utils/css-import-resolver.d.ts +4 -1
  128. package/dist/utils/css-import-resolver.d.ts.map +1 -1
  129. package/dist/utils/css-import-resolver.js +9 -1
  130. package/dist/utils/css-import-resolver.js.map +1 -1
  131. package/dist/utils/editor-action-client.d.ts +4 -3
  132. package/dist/utils/editor-action-client.d.ts.map +1 -1
  133. package/dist/utils/editor-action-client.js +55 -19
  134. package/dist/utils/editor-action-client.js.map +1 -1
  135. package/dist/utils/esm-transform.d.ts +30 -0
  136. package/dist/utils/esm-transform.d.ts.map +1 -1
  137. package/dist/utils/esm-transform.js +169 -2
  138. package/dist/utils/esm-transform.js.map +1 -1
  139. package/dist/utils/find-component-for-file.d.ts +12 -0
  140. package/dist/utils/find-component-for-file.d.ts.map +1 -0
  141. package/dist/utils/find-component-for-file.js +24 -0
  142. package/dist/utils/find-component-for-file.js.map +1 -0
  143. package/dist/utils/forbid-deep-imports.d.ts +3 -0
  144. package/dist/utils/forbid-deep-imports.d.ts.map +1 -0
  145. package/dist/utils/forbid-deep-imports.js +54 -0
  146. package/dist/utils/forbid-deep-imports.js.map +1 -0
  147. package/dist/utils/forbid-external-packages.d.ts +26 -0
  148. package/dist/utils/forbid-external-packages.d.ts.map +1 -0
  149. package/dist/utils/forbid-external-packages.js +99 -0
  150. package/dist/utils/forbid-external-packages.js.map +1 -0
  151. package/dist/utils/load-image.d.ts +16 -0
  152. package/dist/utils/load-image.d.ts.map +1 -0
  153. package/dist/utils/load-image.js +50 -0
  154. package/dist/utils/load-image.js.map +1 -0
  155. package/dist/utils/vendor-storefront.d.ts +13 -0
  156. package/dist/utils/vendor-storefront.d.ts.map +1 -0
  157. package/dist/utils/vendor-storefront.js +91 -0
  158. package/dist/utils/vendor-storefront.js.map +1 -0
  159. package/dist/utils/websocket-server.d.ts +88 -5
  160. package/dist/utils/websocket-server.d.ts.map +1 -1
  161. package/dist/utils/websocket-server.js +241 -44
  162. package/dist/utils/websocket-server.js.map +1 -1
  163. package/package.json +17 -2
  164. package/templates/add/section.css +11 -0
  165. package/dist/commands/create.d.ts +0 -4
  166. package/dist/commands/create.d.ts.map +0 -1
  167. package/dist/commands/create.js +0 -228
  168. package/dist/commands/create.js.map +0 -1
  169. package/dist/commands/proxy.d.ts +0 -39
  170. package/dist/commands/proxy.d.ts.map +0 -1
  171. package/dist/commands/proxy.js +0 -210
  172. package/dist/commands/proxy.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbid-deep-imports.js","sourceRoot":"","sources":["../../src/utils/forbid-deep-imports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,6FAA6F;AAC7F,8FAA8F;AAC9F,EAAE;AACF,+FAA+F;AAC/F,2FAA2F;AAC3F,6FAA6F;AAC7F,6FAA6F;AAC7F,MAAM,cAAc,GAAG,4DAA4D,CAAC;AAEpF,MAAM,UAAU,iCAAiC;IAC/C,OAAO;QACL,IAAI,EAAE,qCAAqC;QAC3C,KAAK,CAAC,KAAK;YACT,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;gBACnD,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAE,CAAC;gBAC3D,sFAAsF;gBACtF,qFAAqF;gBACrF,sBAAsB;gBACtB,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;oBAChC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACxC,CAAC;gBACD,OAAO;oBACL,MAAM,EAAE;wBACN;4BACE,IAAI,EACF,gBAAgB,IAAI,CAAC,IAAI,sDAAsD;gCAC/E,IAAI,IAAI,qDAAqD,IAAI,KAAK;gCACtE,iFAAiF;gCACjF,oFAAoF;gCACpF,oFAAoF;gCACpF,mFAAmF;gCACnF,wBAAwB;yBAC3B;qBACF;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { Plugin } from "esbuild";
2
+ /**
3
+ * Fail the build when a code component imports an npm package that is not on the allowlist.
4
+ *
5
+ * Themes are untrusted source. Only the reference-theme baseline packages plus `three` and
6
+ * `animejs` may be bundled into a component. Anything else (lodash, axios, a random UI kit, ...)
7
+ * becomes a hard compile error instead of a silently-bundled dependency — so installing an extra
8
+ * package and importing it blows the build up immediately with an actionable message.
9
+ *
10
+ * NOTE: esbuild applies the `external: [...]` array BEFORE plugin onResolve, so the externalized
11
+ * runtime packages (preact, preact/hooks, mobx, preact-render-to-string) are short-circuited and
12
+ * never reach this plugin — they are allowed implicitly. Non-external subpaths (e.g.
13
+ * `preact/compat`) DO reach here and resolve to an allowed root.
14
+ */
15
+ export declare function forbidExternalPackagesPlugin(options?: {
16
+ /**
17
+ * Importers whose bare imports bypass the allowlist entirely.
18
+ *
19
+ * Set only when a package is vendored into the artifact (see `vendorStorefrontPlugin`). The
20
+ * allowlist governs what a component *author* may reach for; once we choose to bundle the
21
+ * storefront SDK, its own dependencies (`lodash`, `uuid`, ...) come along as a consequence of
22
+ * that choice, and rejecting them would just be the build arguing with itself.
23
+ */
24
+ allowFrom?: (importer: string) => boolean;
25
+ }): Plugin;
26
+ //# sourceMappingURL=forbid-external-packages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbid-external-packages.d.ts","sourceRoot":"","sources":["../../src/utils/forbid-external-packages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAqDtC;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE;IACrD;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,GAAG,MAAM,CAoCT"}
@@ -0,0 +1,99 @@
1
+ import path from "path";
2
+ import { builtinModules } from "module";
3
+ /**
4
+ * Allowlist of npm packages a theme's code components are permitted to import.
5
+ *
6
+ * Intentionally STATIC — it is NOT derived from the theme's own package.json. The whole point
7
+ * is to stop themes from pulling in arbitrary third-party packages, so trusting their manifest
8
+ * would defeat the purpose: a theme could just add the dependency there. Instead we pin the set
9
+ * here, mirroring apps/reference-theme/package.json's runtime dependencies plus the two
10
+ * explicitly-permitted libraries.
11
+ *
12
+ * The list holds package ROOTS. Subpaths resolve to their root (e.g. `preact/hooks` → `preact`,
13
+ * `three/examples/jsm/...` → `three`), so every subpath of an allowed package is allowed too.
14
+ * Deep imports into the storefront SDK are separately restricted by
15
+ * `forbidDeepStorefrontImportsPlugin` (which runs first).
16
+ */
17
+ const ALLOWED_PACKAGE_ROOTS = new Set([
18
+ // Preact runtime (root + any subpath: preact/hooks, preact/compat, preact/jsx-runtime, ...).
19
+ // The bare `preact` / `preact/hooks` specifiers are externalized (short-circuited before this
20
+ // plugin runs), but non-external subpaths like `preact/compat` still resolve through here.
21
+ "preact",
22
+ // MobX reactivity — pulled in by the injected observer runtime. Externalized in both builds,
23
+ // so this is a guard in case the externals list ever changes rather than a reachable import.
24
+ "mobx",
25
+ // ikas storefront SDK (deep-import rules enforced by forbidDeepStorefrontImportsPlugin)
26
+ "@ikas/bp-storefront",
27
+ "@ikas/bp-storefront-models",
28
+ "@ikas/bp-storefront-config",
29
+ "@ikas/bp-storefront-api",
30
+ // Virtual module injected by ikasComponentUtilsPlugin
31
+ "@ikas/component-utils",
32
+ // Explicitly permitted third-party libraries for themes
33
+ "three",
34
+ "animejs",
35
+ ]);
36
+ // Node built-ins (with and without the `node:` prefix). Only an already-allowed package would
37
+ // reach for these, and platform:node externalizes them anyway — never flag them.
38
+ const NODE_BUILTINS = new Set([
39
+ ...builtinModules,
40
+ ...builtinModules.map((m) => `node:${m}`),
41
+ ]);
42
+ /** Extract the package root from a bare import specifier (handles `@scope/name`). */
43
+ function packageRootOf(specifier) {
44
+ if (specifier.startsWith("@")) {
45
+ const parts = specifier.split("/");
46
+ return parts.slice(0, 2).join("/");
47
+ }
48
+ return specifier.split("/")[0];
49
+ }
50
+ /**
51
+ * Fail the build when a code component imports an npm package that is not on the allowlist.
52
+ *
53
+ * Themes are untrusted source. Only the reference-theme baseline packages plus `three` and
54
+ * `animejs` may be bundled into a component. Anything else (lodash, axios, a random UI kit, ...)
55
+ * becomes a hard compile error instead of a silently-bundled dependency — so installing an extra
56
+ * package and importing it blows the build up immediately with an actionable message.
57
+ *
58
+ * NOTE: esbuild applies the `external: [...]` array BEFORE plugin onResolve, so the externalized
59
+ * runtime packages (preact, preact/hooks, mobx, preact-render-to-string) are short-circuited and
60
+ * never reach this plugin — they are allowed implicitly. Non-external subpaths (e.g.
61
+ * `preact/compat`) DO reach here and resolve to an allowed root.
62
+ */
63
+ export function forbidExternalPackagesPlugin(options) {
64
+ return {
65
+ name: "ikas-forbid-external-packages",
66
+ setup(build) {
67
+ // Bare specifiers only — skip relative ("./", "../") and absolute ("/") imports.
68
+ build.onResolve({ filter: /^[^./]/ }, (args) => {
69
+ const specifier = args.path;
70
+ // Windows absolute paths (C:\..., C:/..., \\server\...) start with neither "." nor "/",
71
+ // so they slip past the bare-specifier filter above (esbuild's Go regex has no lookahead
72
+ // to exclude drive letters). Entry points and the injected JSX shim arrive here as
73
+ // absolute paths on Windows. win32.isAbsolute also accepts POSIX "/" paths, so this one
74
+ // check is safe on every platform — and bare npm specifiers can never contain ":".
75
+ if (path.win32.isAbsolute(specifier))
76
+ return undefined;
77
+ if (NODE_BUILTINS.has(specifier))
78
+ return undefined;
79
+ if (options?.allowFrom?.(args.importer))
80
+ return undefined;
81
+ const root = packageRootOf(specifier);
82
+ if (ALLOWED_PACKAGE_ROOTS.has(root))
83
+ return undefined;
84
+ return {
85
+ errors: [
86
+ {
87
+ text: `Package "${root}" is not allowed in ikas themes. ` +
88
+ `Code components may only import the default theme packages plus "three" and "animejs", ` +
89
+ `so installing and importing "${specifier}" fails the build by design. ` +
90
+ `Remove the dependency (inline the code you need, or switch to an allowed package). ` +
91
+ `Allowed packages: ${Array.from(ALLOWED_PACKAGE_ROOTS).sort().join(", ")}.`,
92
+ },
93
+ ],
94
+ };
95
+ });
96
+ },
97
+ };
98
+ }
99
+ //# sourceMappingURL=forbid-external-packages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forbid-external-packages.js","sourceRoot":"","sources":["../../src/utils/forbid-external-packages.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAS;IAC5C,6FAA6F;IAC7F,8FAA8F;IAC9F,2FAA2F;IAC3F,QAAQ;IACR,6FAA6F;IAC7F,6FAA6F;IAC7F,MAAM;IACN,wFAAwF;IACxF,qBAAqB;IACrB,4BAA4B;IAC5B,4BAA4B;IAC5B,yBAAyB;IACzB,sDAAsD;IACtD,uBAAuB;IACvB,wDAAwD;IACxD,OAAO;IACP,SAAS;CACV,CAAC,CAAC;AAEH,8FAA8F;AAC9F,iFAAiF;AACjF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAS;IACpC,GAAG,cAAc;IACjB,GA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L,MAAM,EAAE;wBACN;4BACE,IAAI,EACF,YAAY,IAAI,mCAAmC;gCACnD,yFAAyF;gCACzF,gCAAgC,SAAS,+BAA+B;gCACxE,qFAAqF;gCACrF,qBAAqB,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;yBAC9E;qBACF;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const VALID_IMAGE_TYPES: string[];
2
+ export interface ImageSource {
3
+ file?: string;
4
+ url?: string;
5
+ }
6
+ export interface LoadedImage {
7
+ base64: string;
8
+ mimeType: string;
9
+ fileName: string;
10
+ }
11
+ /**
12
+ * Read an image from a local file path or URL and return its base64 (raw, no
13
+ * data: prefix), mime type, and a file name. Validates type and the 10MB limit.
14
+ */
15
+ export declare function loadImageSource(src: ImageSource): Promise<LoadedImage>;
16
+ //# sourceMappingURL=load-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-image.d.ts","sourceRoot":"","sources":["../../src/utils/load-image.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB,UAA6B,CAAC;AAG5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAsC5E"}
@@ -0,0 +1,50 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { basename, extname } from "node:path";
3
+ const MIME_BY_EXT = {
4
+ ".png": "image/png",
5
+ ".jpg": "image/jpeg",
6
+ ".jpeg": "image/jpeg",
7
+ ".webp": "image/webp",
8
+ ".gif": "image/gif",
9
+ };
10
+ export const VALID_IMAGE_TYPES = Object.values(MIME_BY_EXT);
11
+ const MAX_SIZE_BYTES = 10 * 1024 * 1024; // 10MB, mirrors the editor's IMAGE_UPLOAD_LIMIT_SIZE
12
+ /**
13
+ * Read an image from a local file path or URL and return its base64 (raw, no
14
+ * data: prefix), mime type, and a file name. Validates type and the 10MB limit.
15
+ */
16
+ export async function loadImageSource(src) {
17
+ if (src.file && src.url) {
18
+ throw new Error("Provide only one of file or url, not both");
19
+ }
20
+ if (src.file) {
21
+ const buffer = await readFile(src.file);
22
+ const ext = extname(src.file).toLowerCase();
23
+ const mimeType = MIME_BY_EXT[ext];
24
+ if (!mimeType) {
25
+ throw new Error(`Unsupported image extension "${ext || "(none)"}" for ${src.file}. Supported: ${Object.keys(MIME_BY_EXT).join(", ")}`);
26
+ }
27
+ if (buffer.byteLength > MAX_SIZE_BYTES) {
28
+ throw new Error(`${src.file} is ${(buffer.byteLength / 1024 / 1024).toFixed(1)}MB; the limit is 10MB`);
29
+ }
30
+ return { base64: buffer.toString("base64"), mimeType, fileName: basename(src.file) };
31
+ }
32
+ if (src.url) {
33
+ const res = await fetch(src.url);
34
+ if (!res.ok) {
35
+ throw new Error(`Failed to fetch ${src.url}: ${res.status} ${res.statusText}`);
36
+ }
37
+ const mimeType = (res.headers.get("content-type") || "").split(";")[0].trim();
38
+ if (!VALID_IMAGE_TYPES.includes(mimeType)) {
39
+ throw new Error(`${src.url} returned content-type "${mimeType || "(none)"}". Supported: ${VALID_IMAGE_TYPES.join(", ")}`);
40
+ }
41
+ const buffer = Buffer.from(await res.arrayBuffer());
42
+ if (buffer.byteLength > MAX_SIZE_BYTES) {
43
+ throw new Error(`${src.url} is ${(buffer.byteLength / 1024 / 1024).toFixed(1)}MB; the limit is 10MB`);
44
+ }
45
+ const urlName = basename(new URL(src.url).pathname) || "image";
46
+ return { base64: buffer.toString("base64"), mimeType, fileName: urlName };
47
+ }
48
+ throw new Error("Provide a file path or url");
49
+ }
50
+ //# sourceMappingURL=load-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-image.js","sourceRoot":"","sources":["../../src/utils/load-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,GAA2B;IAC1C,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC5D,MAAM,cAAc,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,qDAAqD;AAa9F;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAgB;IACpD,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CACb,gCAAgC,GAAG,IAAI,QAAQ,SAAS,GAAG,CAAC,IAAI,gBAAgB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,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,UAAU,GAAG,cAAc,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC;QACxG,CAAC;QACD,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC;QAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAC5E,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Plugin } from "esbuild";
2
+ export declare function isVendoredDependencyFile(file: string): boolean;
3
+ /**
4
+ * Bundle the storefront SDK into the component artifact.
5
+ *
6
+ * Deep imports stay forbidden for *component* source — the public contract is still "import only
7
+ * from the package root", and a component reaching into `/src/...` is still a bug worth failing
8
+ * on. But the SDK's own modules deep-import each other constantly (97 lazy `import()` calls into
9
+ * `@ikas/bp-storefront-api/src/__api/...` alone), and those are internal business. So the rule is
10
+ * keyed on who is importing, not on what is imported.
11
+ */
12
+ export declare function vendorStorefrontPlugin(): Plugin;
13
+ //# sourceMappingURL=vendor-storefront.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor-storefront.d.ts","sourceRoot":"","sources":["../../src/utils/vendor-storefront.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAqCtC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAK9D;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA+B/C"}
@@ -0,0 +1,91 @@
1
+ import * as fs from "fs";
2
+ import * as os from "os";
3
+ import * as path from "path";
4
+ /**
5
+ * Compile the storefront SDK *into* the artifact instead of resolving it against the host.
6
+ *
7
+ * The default path (`forbidDeepStorefrontImportsPlugin`) leaves `@ikas/bp-storefront*` external,
8
+ * so a theme has to hand the component every named export it uses at runtime. That makes the set
9
+ * of names a contract between two independently-released things: publish a component that reaches
10
+ * for a name older themes lack and the page renders an error box for every visitor, with nothing
11
+ * to fall back to.
12
+ *
13
+ * Vendoring removes the contract rather than versioning it. The artifact carries the SDK code it
14
+ * was built against, so what a host must still provide shrinks to the handful of packages that
15
+ * genuinely have to be shared (`preact`, `preact/hooks`, `mobx` — see the externals in compile.ts)
16
+ * and cannot grow when we add a feature.
17
+ *
18
+ * The trade is duplication: a page rendering a vendored component ships this code even though the
19
+ * theme already has its own copy. That is the point — the two copies are free to be different
20
+ * versions.
21
+ */
22
+ /** `@ikas/bp-storefront` and its siblings, with an optional subpath. */
23
+ const VENDORED_PKG = /^(@ikas\/bp-storefront(?:-(?:models|config|api|api-client))?)(\/.*)?$/;
24
+ /**
25
+ * True for files that belong to a vendored dependency rather than to component source.
26
+ *
27
+ * Two shapes, because the SDK resolves differently depending on where the build runs: an npm
28
+ * install puts it under `node_modules/@ikas/bp-storefront*`, while inside this monorepo npm
29
+ * workspaces symlink it and esbuild reports the real path under `packages/storefront*`.
30
+ */
31
+ const VENDORED_FILE = /[\\/](?:node_modules[\\/]@ikas[\\/]bp-storefront[^\\/]*|packages[\\/]storefront(?:-(?:api|api-client|config|models))?)[\\/]/;
32
+ export function isVendoredDependencyFile(file) {
33
+ if (!file)
34
+ return false;
35
+ // Anything already inside node_modules is a transitive dependency of a package we chose to
36
+ // vendor, not something a component author wrote — the allowlist has no say over it.
37
+ return file.includes(`${path.sep}node_modules${path.sep}`) || VENDORED_FILE.test(file);
38
+ }
39
+ /**
40
+ * Stand-in for `isomorphic-fetch`, which the SDK imports in three places.
41
+ *
42
+ * That package pulls `node-fetch` in, which references `global` and dies in a browser with
43
+ * "global is not defined" — a failure the monorepo never sees while the SDK is merely *external*,
44
+ * because nothing bundles it there. Vendoring is exactly what makes it reachable, so it has to be
45
+ * aliased away here rather than left to be discovered at runtime.
46
+ *
47
+ * Both build targets already have a native `fetch` (browsers, and Node 18+ for the SSR build), so
48
+ * the shim is a forwarder. It calls through `globalThis` on every invocation instead of capturing
49
+ * the function, which keeps `this` correct (a bare reference throws "Illegal invocation") and lets
50
+ * a host install a polyfill after this module is evaluated.
51
+ */
52
+ const FETCH_SHIM = path.join(os.tmpdir(), "ikas-vendored-fetch-shim.mjs");
53
+ fs.writeFileSync(FETCH_SHIM, "const f = (...args) => globalThis.fetch(...args);\nexport default f;\nexport { f as fetch };\n");
54
+ /**
55
+ * Bundle the storefront SDK into the component artifact.
56
+ *
57
+ * Deep imports stay forbidden for *component* source — the public contract is still "import only
58
+ * from the package root", and a component reaching into `/src/...` is still a bug worth failing
59
+ * on. But the SDK's own modules deep-import each other constantly (97 lazy `import()` calls into
60
+ * `@ikas/bp-storefront-api/src/__api/...` alone), and those are internal business. So the rule is
61
+ * keyed on who is importing, not on what is imported.
62
+ */
63
+ export function vendorStorefrontPlugin() {
64
+ return {
65
+ name: "ikas-vendor-storefront",
66
+ setup(build) {
67
+ build.onResolve({ filter: /^isomorphic-fetch$/ }, () => ({ path: FETCH_SHIM }));
68
+ build.onResolve({ filter: VENDORED_PKG }, (args) => {
69
+ const [, root, subpath] = args.path.match(VENDORED_PKG);
70
+ if (subpath && subpath !== "/" && !isVendoredDependencyFile(args.importer)) {
71
+ return {
72
+ errors: [
73
+ {
74
+ text: `Deep import "${args.path}" is not allowed. Import only from the package root ` +
75
+ `"${root}" — e.g. import { saveCouponCode, getCart } from "${root}". ` +
76
+ `Subpaths like "/dist/..." or "/src/..." are private and may be renamed without ` +
77
+ `notice. If a helper seems missing from the root, it almost always has a public ` +
78
+ `name there (coupon code, for instance, is getCouponCodeForm / ` +
79
+ `setCouponCodeFormCouponCode / submitCouponCodeForm).`,
80
+ },
81
+ ],
82
+ };
83
+ }
84
+ // Returning nothing hands the specifier back to esbuild's normal resolution, which is
85
+ // what pulls the source into the bundle. The default path returns `external: true` here.
86
+ return undefined;
87
+ });
88
+ },
89
+ };
90
+ }
91
+ //# sourceMappingURL=vendor-storefront.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor-storefront.js","sourceRoot":"","sources":["../../src/utils/vendor-storefront.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;;;;;;;;;;;;;;GAiBG;AAEH,wEAAwE;AACxE,MAAM,YAAY,GAAG,uEAAuE,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,aAAa,GACjB,6HAA6H,CAAC;AAEhI,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,2FAA2F;IAC3F,qFAAqF;IACrF,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzF,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,8BAA8B,CAAC,CAAC;AAC1E,EAAE,CAAC,aAAa,CACd,UAAU,EACV,gGAAgG,CACjG,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;QACL,IAAI,EAAE,wBAAwB;QAC9B,KAAK,CAAC,KAAK;YACT,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;YAEhF,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjD,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAE,CAAC;gBAEzD,IAAI,OAAO,IAAI,OAAO,KAAK,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC3E,OAAO;wBACL,MAAM,EAAE;4BACN;gCACE,IAAI,EACF,gBAAgB,IAAI,CAAC,IAAI,sDAAsD;oCAC/E,IAAI,IAAI,qDAAqD,IAAI,KAAK;oCACtE,iFAAiF;oCACjF,iFAAiF;oCACjF,gEAAgE;oCAChE,sDAAsD;6BACzD;yBACF;qBACF,CAAC;gBACJ,CAAC;gBAED,sFAAsF;gBACtF,yFAAyF;gBACzF,OAAO,SAAS,CAAC;YACnB,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ComponentProp } from "../types.js";
1
+ import type { ComponentProp, ThemeSettingMeta } from "../types.js";
2
2
  import type { IThemePropGroupData } from "./component-helpers.js";
3
3
  /**
4
4
  * Shared module data sent to editors (chunk extracted by code splitting)
@@ -51,6 +51,13 @@ export interface ICodeComponentData {
51
51
  typeId?: string;
52
52
  /** For ENUM props — the enum type ID from TypeStore */
53
53
  enumTypeId?: string;
54
+ /** For NUMBER_RANGE props — slider config (min/max/interval/unit) */
55
+ numberRangeData?: {
56
+ min?: number;
57
+ max?: number;
58
+ interval?: number;
59
+ unit?: string;
60
+ };
54
61
  /** For COMPONENT/COMPONENT_LIST props — map of variable keys to { id, typeId } */
55
62
  privateVarMap?: Record<string, {
56
63
  id: string;
@@ -58,6 +65,17 @@ export interface ICodeComponentData {
58
65
  }>;
59
66
  /** For COMPONENT/COMPONENT_LIST props — restrict which components can be selected */
60
67
  filteredComponentIds?: string[];
68
+ /**
69
+ * Conditional visibility. Resolved from the config's `requiredProp` (a NAME) at broadcast time
70
+ * into the id the editor addresses props by.
71
+ */
72
+ requiredPropId?: string;
73
+ /** For a BOOLEAN gate — which state of `requiredPropId` shows this prop. Defaults to `true`. */
74
+ requiredPropValue?: boolean;
75
+ /** For an ENUM gate — the option's id. */
76
+ requiredEnumOptionId?: string;
77
+ /** For an ENUM gate — the option value `requiredPropId` must hold. */
78
+ requiredEnumOptionValue?: string;
61
79
  }>;
62
80
  compiledServerJs: string;
63
81
  compiledClientJs: string;
@@ -78,10 +96,18 @@ export interface ICodeComponentData {
78
96
  id: string;
79
97
  name: string;
80
98
  description?: string;
99
+ requiredProp?: string;
100
+ requiredPropValue?: boolean;
101
+ requiredEnumOptionId?: string;
102
+ requiredEnumOptionValue?: string;
81
103
  children?: Array<{
82
104
  id: string;
83
105
  name: string;
84
106
  description?: string;
107
+ requiredProp?: string;
108
+ requiredPropValue?: boolean;
109
+ requiredEnumOptionId?: string;
110
+ requiredEnumOptionValue?: string;
85
111
  }>;
86
112
  }>;
87
113
  /** Custom IType definitions referenced by this component's props (for portability across projects) */
@@ -151,7 +177,7 @@ export type DevServerMessage = {
151
177
  } | {
152
178
  type: "editor-action";
153
179
  requestId: string;
154
- action: "list-pages" | "list-imported-components" | "import-component" | "add-section-to-page" | "list-page-sections" | "update-section-prop" | "upload-image";
180
+ action: "list-pages" | "list-imported-components" | "import-component" | "add-section-to-page" | "add-sections-to-page" | "list-page-sections" | "get-section-values" | "get-component-props" | "update-section-prop" | "upload-image" | "search-products" | "list-entities" | "get-page-by-type" | "update-page-sections" | "upload-images";
155
181
  payload?: any;
156
182
  } | {
157
183
  type: "editor-action-result";
@@ -159,6 +185,12 @@ export type DevServerMessage = {
159
185
  success: boolean;
160
186
  payload?: any;
161
187
  error?: string;
188
+ /**
189
+ * Server-generated transient failure: the editor handling the action is
190
+ * gone or not back yet. Safe to resend the SAME requestId — the editor
191
+ * deduplicates by it, so a retry can never run the action twice.
192
+ */
193
+ retryable?: boolean;
162
194
  };
163
195
  /**
164
196
  * Messages from editor to dev server
@@ -169,6 +201,24 @@ export type EditorMessage = {
169
201
  type: "request-state";
170
202
  } | {
171
203
  type: "ping";
204
+ } | {
205
+ type: "editor-hello";
206
+ payload?: {
207
+ /** Human-readable identity shown when several tabs are connected. */
208
+ label?: string;
209
+ /** True when the tab is visible at the time of sending. */
210
+ visible?: boolean;
211
+ /**
212
+ * Theme the tab is editing. When connected tabs disagree, an
213
+ * `editor-action` is refused instead of mutating an arbitrary theme.
214
+ */
215
+ themeId?: string;
216
+ /**
217
+ * Stable per-tab id (survives reconnects, dies with the tab). Lets a
218
+ * retried `editor-action` be pinned back to the tab that first got it.
219
+ */
220
+ tabId?: string;
221
+ };
172
222
  } | {
173
223
  type: "create-component";
174
224
  requestId: string;
@@ -208,6 +258,10 @@ export type EditorMessage = {
208
258
  name: string;
209
259
  description?: string;
210
260
  parentGroupId?: string;
261
+ requiredProp?: string;
262
+ requiredPropValue?: boolean;
263
+ requiredEnumOptionId?: string;
264
+ requiredEnumOptionValue?: string;
211
265
  };
212
266
  };
213
267
  } | {
@@ -219,6 +273,10 @@ export type EditorMessage = {
219
273
  propGroup: {
220
274
  name?: string;
221
275
  description?: string;
276
+ requiredProp?: string;
277
+ requiredPropValue?: boolean;
278
+ requiredEnumOptionId?: string;
279
+ requiredEnumOptionValue?: string;
222
280
  };
223
281
  };
224
282
  } | {
@@ -259,6 +317,8 @@ export type EditorMessage = {
259
317
  enumOptions?: Record<string, string>;
260
318
  }>;
261
319
  customTypes?: Array<Record<string, any>>;
320
+ /** Theme global variables (Styles panel) — drives the typed key union in global-types.ts. */
321
+ themeSettings?: Array<ThemeSettingMeta>;
262
322
  };
263
323
  } | {
264
324
  type: "request-types";
@@ -286,7 +346,7 @@ export type EditorMessage = {
286
346
  } | {
287
347
  type: "editor-action";
288
348
  requestId: string;
289
- action: "list-pages" | "list-imported-components" | "import-component" | "add-section-to-page" | "list-page-sections" | "update-section-prop" | "upload-image";
349
+ action: "list-pages" | "list-imported-components" | "import-component" | "add-section-to-page" | "add-sections-to-page" | "list-page-sections" | "get-section-values" | "get-component-props" | "update-section-prop" | "upload-image" | "search-products" | "list-entities" | "get-page-by-type" | "update-page-sections" | "upload-images";
290
350
  payload?: any;
291
351
  } | {
292
352
  type: "editor-action-result";
@@ -315,10 +375,18 @@ export interface EditorMessageHandlers {
315
375
  name: string;
316
376
  description?: string;
317
377
  parentGroupId?: string;
378
+ requiredProp?: string;
379
+ requiredPropValue?: boolean;
380
+ requiredEnumOptionId?: string;
381
+ requiredEnumOptionValue?: string;
318
382
  }) => Promise<void>;
319
383
  onUpdatePropGroup?: (componentId: string, propGroupId: string, propGroup: {
320
384
  name?: string;
321
385
  description?: string;
386
+ requiredProp?: string;
387
+ requiredPropValue?: boolean;
388
+ requiredEnumOptionId?: string;
389
+ requiredEnumOptionValue?: string;
322
390
  }) => Promise<void>;
323
391
  onDeletePropGroup?: (componentId: string, propGroupId: string) => Promise<void>;
324
392
  onMovePropToGroup?: (componentId: string, propName: string, groupId: string | null) => Promise<void>;
@@ -330,7 +398,7 @@ export interface EditorMessageHandlers {
330
398
  category: "type" | "enum";
331
399
  sectionAllowed: boolean;
332
400
  enumOptions?: Record<string, string>;
333
- }>, customTypes?: Array<Record<string, any>>) => void;
401
+ }>, customTypes?: Array<Record<string, any>>, themeSettings?: Array<ThemeSettingMeta>) => void;
334
402
  onRequestTypes?: () => Array<{
335
403
  id: string;
336
404
  name: string;
@@ -351,9 +419,10 @@ export interface EditorMessageHandlers {
351
419
  export declare class DevServerWebSocket {
352
420
  private wss;
353
421
  private httpServer;
354
- private clients;
355
422
  private port;
356
423
  private pendingEditorActions;
424
+ private clientInfo;
425
+ private forwardedEditorActions;
357
426
  constructor(port?: number);
358
427
  /**
359
428
  * Start the WebSocket server
@@ -369,6 +438,20 @@ export declare class DevServerWebSocket {
369
438
  * dead socket.
370
439
  */
371
440
  private dropPendingEditorActionsForClient;
441
+ /**
442
+ * Pick the single editor that should run an `editor-action`, preferring the
443
+ * tab the user is looking at: most recently visible, then most recently
444
+ * active. Control clients are never targets.
445
+ *
446
+ * The server has no theme identity of its own, so ambiguity is refused, not
447
+ * guessed at: tabs reporting DIFFERENT themes → `conflictingThemes`; a tab
448
+ * with NO theme identity (old build or still loading) next to identified
449
+ * ones → `hasUnidentified` — that tab could be on any theme, and routing
450
+ * either way risks silently mutating the wrong one. Only an unambiguous
451
+ * pool (all identified with one theme, or all unidentified legacy tabs) is
452
+ * ranked.
453
+ */
454
+ private pickEditorActionTarget;
372
455
  /**
373
456
  * Send message to a specific client
374
457
  */
@@ -1 +1 @@
1
- {"version":3,"file":"websocket-server.d.ts","sourceRoot":"","sources":["../../src/utils/websocket-server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAwC,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,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OAEG;IACH,OAAO,CAAC,MAAM;IAMd;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,gBAAgB;IASnC;;OAEG;IACH,wBAAwB,CAAC,SAAS,EAAE,kBAAkB,EAAE,aAAa,CAAC,EAAE,iBAAiB,EAAE,EAAE,YAAY,CAAC,EAAE,gBAAgB;IAY5H;;OAEG;IACH,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAW1D;;OAEG;IACH,yBAAyB,CAAC,WAAW,EAAE,MAAM;IAU7C;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiCtB"}
1
+ {"version":3,"file":"websocket-server.d.ts","sourceRoot":"","sources":["../../src/utils/websocket-server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAA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