@salesforce/ui-theme-manager 11.63.0 → 11.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/authoring/core/ThemeManagerPanelRoot.d.cts +7 -0
  2. package/dist/authoring/core/ThemeManagerPanelRoot.d.ts +7 -0
  3. package/dist/authoring/core/ThemeManagerPanelRoot.d.ts.map +1 -1
  4. package/dist/authoring/core/components/BordersSection.d.ts.map +1 -1
  5. package/dist/authoring/core/components/ButtonSection.d.cts +7 -0
  6. package/dist/authoring/core/components/ButtonSection.d.ts +7 -0
  7. package/dist/authoring/core/components/ButtonSection.d.ts.map +1 -1
  8. package/dist/authoring/core/components/ScaleValueRow.d.cts +43 -0
  9. package/dist/authoring/core/components/ScaleValueRow.d.ts +43 -0
  10. package/dist/authoring/core/components/ScaleValueRow.d.ts.map +1 -0
  11. package/dist/authoring/core/components/SectionTabs.d.cts +23 -0
  12. package/dist/authoring/core/components/SectionTabs.d.ts +23 -0
  13. package/dist/authoring/core/components/SectionTabs.d.ts.map +1 -0
  14. package/dist/authoring/core/components/TypographySection.d.ts.map +1 -1
  15. package/dist/authoring/core/labels.d.cts +22 -5
  16. package/dist/authoring/core/labels.d.ts +22 -5
  17. package/dist/authoring/core/labels.d.ts.map +1 -1
  18. package/dist/authoring/react/index.js +1 -1
  19. package/dist/authoring/react/styles.css +1 -1
  20. package/dist/authoring/web-component/index.d.cts +8 -0
  21. package/dist/authoring/web-component/index.d.ts +8 -0
  22. package/dist/authoring/web-component/index.d.ts.map +1 -1
  23. package/dist/authoring/web-component/index.js +180 -19
  24. package/dist/protocol/brandCss.cjs +38 -1
  25. package/dist/protocol/brandCss.d.cts +19 -0
  26. package/dist/protocol/brandCss.d.ts +19 -0
  27. package/dist/protocol/brandCss.d.ts.map +1 -1
  28. package/dist/protocol/brandCss.js +39 -2
  29. package/dist/protocol/brandSearch.cjs +24 -10
  30. package/dist/protocol/brandSearch.d.cts +24 -0
  31. package/dist/protocol/brandSearch.d.ts +24 -0
  32. package/dist/protocol/brandSearch.d.ts.map +1 -1
  33. package/dist/protocol/brandSearch.js +24 -10
  34. package/dist/protocol/index.cjs +6 -0
  35. package/dist/protocol/index.js +8 -2
  36. package/dist/runtime/previewContent.cjs +496 -217
  37. package/dist/runtime/previewContent.d.cts +31 -12
  38. package/dist/runtime/previewContent.d.ts +31 -12
  39. package/dist/runtime/previewContent.d.ts.map +1 -1
  40. package/dist/runtime/previewContent.js +498 -219
  41. package/dist/runtime/theme-preview-runtime.js +2526 -0
  42. package/package.json +1 -1
  43. package/dist/authoring/core/components/AssetsSection.d.cts +0 -12
  44. package/dist/authoring/core/components/AssetsSection.d.ts +0 -12
  45. package/dist/authoring/core/components/AssetsSection.d.ts.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { Brand } from '../protocol/brandTypes.cjs';
2
2
  import { Theme } from '../protocol/types.cjs';
3
3
  /**
4
- * Generates a complete HTML preview page showcasing a theme applied to a
5
- * luxury hotel landing page. All styling uses --tm-* CSS custom properties
6
- * that map to the theme protocol.
4
+ * Generates a complete HTML preview page showcasing a theme as a compact,
5
+ * self-contained "live snapshot" brand card. All styling uses --tm-* CSS
6
+ * custom properties that map to the theme protocol.
7
7
  *
8
8
  * The page is host-agnostic and communicates only via window.postMessage
9
9
  * using the typed protocol message constants.
@@ -20,17 +20,24 @@ export interface PreviewOptions {
20
20
  nonce?: string;
21
21
  /** CSP source for webview (e.g., webview.cspSource) */
22
22
  cspSource?: string;
23
- /** Image URIs for brand preview sections (optional) */
24
- imageUris?: {
25
- hero?: string;
26
- section3Left?: string;
27
- section4Right?: string;
28
- };
23
+ /**
24
+ * Omit the in-document runtime `<script>` tag entirely.
25
+ *
26
+ * Set this when the document is embedded as a nested `<iframe srcdoc>` whose
27
+ * live updates are driven from the parent frame (e.g. the VS Code extension
28
+ * writes `--tm-*` variables into the same-origin `contentDocument` via CSSOM).
29
+ * In that setup the runtime script isn't just unused — a `vscode-resource`
30
+ * script URL referenced from inside a `srcdoc` iframe can't be resolved by the
31
+ * webview's service worker, so it 404s and logs "Could not resolve webview id".
32
+ * Top-level webview panels (e.g. the full-preview page) leave this off so their
33
+ * runtime script executes normally.
34
+ */
35
+ omitRuntimeScript?: boolean;
29
36
  }
30
37
  /**
31
- * Generates a complete HTML preview page showcasing a Brand applied to a
32
- * luxury hotel landing page. All styling uses --tm-* CSS custom properties
33
- * that map to the Brand protocol.
38
+ * Generates a complete HTML preview page showcasing a Brand as a compact,
39
+ * self-contained "live snapshot" brand card. All styling uses --tm-* CSS
40
+ * custom properties that map to the Brand protocol.
34
41
  *
35
42
  * The page is host-agnostic and communicates only via window.postMessage
36
43
  * using the typed protocol message constants.
@@ -40,4 +47,16 @@ export interface PreviewOptions {
40
47
  * @returns Complete HTML document string
41
48
  */
42
49
  export declare function getBrandPreviewHtml(brand: Brand, options?: PreviewOptions): string;
50
+ /**
51
+ * Generates the full-page "See full preview" document for a brand: a marketing
52
+ * landing page styled entirely by the brand's --tm-* tokens. Unlike the compact
53
+ * card (which the extension embeds in a nested srcdoc iframe), this is meant to
54
+ * open as its own top-level webview panel, so its runtime script executes and it
55
+ * receives live MSG_UPDATE_BRAND updates directly.
56
+ *
57
+ * @param brand - The brand to preview (will be resolved automatically)
58
+ * @param options - Optional host integration options (script URI, CSP nonce)
59
+ * @returns Complete HTML document string
60
+ */
61
+ export declare function getBrandFullPreviewHtml(brand: Brand, options?: PreviewOptions): string;
43
62
  //# sourceMappingURL=previewContent.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { Brand } from '../protocol/brandTypes.js';
2
2
  import { Theme } from '../protocol/types.js';
3
3
  /**
4
- * Generates a complete HTML preview page showcasing a theme applied to a
5
- * luxury hotel landing page. All styling uses --tm-* CSS custom properties
6
- * that map to the theme protocol.
4
+ * Generates a complete HTML preview page showcasing a theme as a compact,
5
+ * self-contained "live snapshot" brand card. All styling uses --tm-* CSS
6
+ * custom properties that map to the theme protocol.
7
7
  *
8
8
  * The page is host-agnostic and communicates only via window.postMessage
9
9
  * using the typed protocol message constants.
@@ -20,17 +20,24 @@ export interface PreviewOptions {
20
20
  nonce?: string;
21
21
  /** CSP source for webview (e.g., webview.cspSource) */
22
22
  cspSource?: string;
23
- /** Image URIs for brand preview sections (optional) */
24
- imageUris?: {
25
- hero?: string;
26
- section3Left?: string;
27
- section4Right?: string;
28
- };
23
+ /**
24
+ * Omit the in-document runtime `<script>` tag entirely.
25
+ *
26
+ * Set this when the document is embedded as a nested `<iframe srcdoc>` whose
27
+ * live updates are driven from the parent frame (e.g. the VS Code extension
28
+ * writes `--tm-*` variables into the same-origin `contentDocument` via CSSOM).
29
+ * In that setup the runtime script isn't just unused — a `vscode-resource`
30
+ * script URL referenced from inside a `srcdoc` iframe can't be resolved by the
31
+ * webview's service worker, so it 404s and logs "Could not resolve webview id".
32
+ * Top-level webview panels (e.g. the full-preview page) leave this off so their
33
+ * runtime script executes normally.
34
+ */
35
+ omitRuntimeScript?: boolean;
29
36
  }
30
37
  /**
31
- * Generates a complete HTML preview page showcasing a Brand applied to a
32
- * luxury hotel landing page. All styling uses --tm-* CSS custom properties
33
- * that map to the Brand protocol.
38
+ * Generates a complete HTML preview page showcasing a Brand as a compact,
39
+ * self-contained "live snapshot" brand card. All styling uses --tm-* CSS
40
+ * custom properties that map to the Brand protocol.
34
41
  *
35
42
  * The page is host-agnostic and communicates only via window.postMessage
36
43
  * using the typed protocol message constants.
@@ -40,4 +47,16 @@ export interface PreviewOptions {
40
47
  * @returns Complete HTML document string
41
48
  */
42
49
  export declare function getBrandPreviewHtml(brand: Brand, options?: PreviewOptions): string;
50
+ /**
51
+ * Generates the full-page "See full preview" document for a brand: a marketing
52
+ * landing page styled entirely by the brand's --tm-* tokens. Unlike the compact
53
+ * card (which the extension embeds in a nested srcdoc iframe), this is meant to
54
+ * open as its own top-level webview panel, so its runtime script executes and it
55
+ * receives live MSG_UPDATE_BRAND updates directly.
56
+ *
57
+ * @param brand - The brand to preview (will be resolved automatically)
58
+ * @param options - Optional host integration options (script URI, CSP nonce)
59
+ * @returns Complete HTML document string
60
+ */
61
+ export declare function getBrandFullPreviewHtml(brand: Brand, options?: PreviewOptions): string;
43
62
  //# sourceMappingURL=previewContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"previewContent.d.ts","sourceRoot":"","sources":["../../src/runtime/previewContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAY/C;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAG7E;AAED,MAAM,WAAW,cAAc;IAC9B,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAIlF"}
1
+ {"version":3,"file":"previewContent.d.ts","sourceRoot":"","sources":["../../src/runtime/previewContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAY/C;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAG7E;AAED,MAAM,WAAW,cAAc;IAC9B,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAIlF;AA+WD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAItF"}