@salesforce/ui-theme-manager 11.66.4 → 11.67.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.
- package/dist/authoring/core/ThemeManagerPanelRoot.d.cts +20 -3
- package/dist/authoring/core/ThemeManagerPanelRoot.d.ts +20 -3
- package/dist/authoring/core/ThemeManagerPanelRoot.d.ts.map +1 -1
- package/dist/authoring/core/components/SaveBar.d.cts +4 -1
- package/dist/authoring/core/components/SaveBar.d.ts +4 -1
- package/dist/authoring/core/components/SaveBar.d.ts.map +1 -1
- package/dist/authoring/core/labels.d.cts +3 -2
- package/dist/authoring/core/labels.d.ts +3 -2
- package/dist/authoring/core/labels.d.ts.map +1 -1
- package/dist/authoring/react/index.js +1 -1
- package/dist/authoring/react/styles.css +1 -1
- package/dist/authoring/web-component/index.d.cts +15 -0
- package/dist/authoring/web-component/index.d.ts +15 -0
- package/dist/authoring/web-component/index.d.ts.map +1 -1
- package/dist/authoring/web-component/index.js +34 -33
- package/dist/protocol/messageTypes.d.cts +6 -0
- package/dist/protocol/messageTypes.d.ts +6 -0
- package/dist/protocol/messageTypes.d.ts.map +1 -1
- package/dist/runtime/previewRuntime.d.cts +4 -7
- package/dist/runtime/previewRuntime.d.ts +4 -7
- package/dist/runtime/previewRuntime.d.ts.map +1 -1
- package/dist/runtime/theme-preview-runtime.js +0 -36
- package/package.json +1 -1
|
@@ -24,6 +24,12 @@ export interface OpenPreviewMessage {
|
|
|
24
24
|
}
|
|
25
25
|
export interface SaveThemeMessage {
|
|
26
26
|
type: "save-theme";
|
|
27
|
+
/**
|
|
28
|
+
* How to save: `"workspace"` overwrites the brand's existing local file;
|
|
29
|
+
* `"new"` writes it as a new local file instead of overwriting. Optional for
|
|
30
|
+
* back-compat — a host that omits it should treat the save as `"workspace"`.
|
|
31
|
+
*/
|
|
32
|
+
mode?: "workspace" | "new";
|
|
27
33
|
}
|
|
28
34
|
export interface NewThemeMessage {
|
|
29
35
|
type: "new-theme";
|
|
@@ -24,6 +24,12 @@ export interface OpenPreviewMessage {
|
|
|
24
24
|
}
|
|
25
25
|
export interface SaveThemeMessage {
|
|
26
26
|
type: "save-theme";
|
|
27
|
+
/**
|
|
28
|
+
* How to save: `"workspace"` overwrites the brand's existing local file;
|
|
29
|
+
* `"new"` writes it as a new local file instead of overwriting. Optional for
|
|
30
|
+
* back-compat — a host that omits it should treat the save as `"workspace"`.
|
|
31
|
+
*/
|
|
32
|
+
mode?: "workspace" | "new";
|
|
27
33
|
}
|
|
28
34
|
export interface NewThemeMessage {
|
|
29
35
|
type: "new-theme";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;GAQG;AAIH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../src/protocol/messageTypes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CA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AwB,CAAC;AAC1D,eAAO,MAAM,eAAe,EAAG,aAAsB,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { Brand } from '../protocol/brandTypes.cjs';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param brand - The resolved brand object
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
8
5
|
*/
|
|
9
|
-
export
|
|
6
|
+
export {};
|
|
10
7
|
//# sourceMappingURL=previewRuntime.d.ts.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { Brand } from '../protocol/brandTypes.js';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param brand - The resolved brand object
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
8
5
|
*/
|
|
9
|
-
export
|
|
6
|
+
export {};
|
|
10
7
|
//# sourceMappingURL=previewRuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/previewRuntime.ts"],"names":[],"mappings":"AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"previewRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/previewRuntime.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -2870,19 +2870,6 @@
|
|
|
2870
2870
|
return vars;
|
|
2871
2871
|
}
|
|
2872
2872
|
|
|
2873
|
-
// src/protocol/brandTypes.ts
|
|
2874
|
-
function getBrandTitle(brand) {
|
|
2875
|
-
return brand["sfdc_cms:title"] ?? "Untitled Brand";
|
|
2876
|
-
}
|
|
2877
|
-
function getBrandLogoUrl(brand) {
|
|
2878
|
-
const url = brand.logo?.url;
|
|
2879
|
-
return typeof url === "string" && url.length > 0 ? url : void 0;
|
|
2880
|
-
}
|
|
2881
|
-
function getBrandLogoAltText(brand) {
|
|
2882
|
-
const alt = brand.logo?.altText;
|
|
2883
|
-
return typeof alt === "string" && alt.length > 0 ? alt : getBrandTitle(brand);
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
2873
|
// src/protocol/messageTypes.ts
|
|
2887
2874
|
var MSG_UPDATE_THEME = "update-theme";
|
|
2888
2875
|
var MSG_UPDATE_COMPONENT_OVERRIDE = "update-component-override";
|
|
@@ -2909,28 +2896,6 @@
|
|
|
2909
2896
|
}
|
|
2910
2897
|
styleEl.textContent = css;
|
|
2911
2898
|
}
|
|
2912
|
-
function applyBrandLogo(brand) {
|
|
2913
|
-
const section = document.querySelector("[data-brand-hero-section]");
|
|
2914
|
-
if (!section) return;
|
|
2915
|
-
const hero = section.querySelector("[data-brand-hero]");
|
|
2916
|
-
const logoUrl = getBrandLogoUrl(brand);
|
|
2917
|
-
let logo = section.querySelector("[data-brand-logo]");
|
|
2918
|
-
if (logoUrl) {
|
|
2919
|
-
if (!logo) {
|
|
2920
|
-
logo = document.createElement("img");
|
|
2921
|
-
logo.className = "brand-logo";
|
|
2922
|
-
logo.setAttribute("data-brand-logo", "");
|
|
2923
|
-
section.appendChild(logo);
|
|
2924
|
-
}
|
|
2925
|
-
logo.src = logoUrl;
|
|
2926
|
-
logo.alt = getBrandLogoAltText(brand);
|
|
2927
|
-
logo.hidden = false;
|
|
2928
|
-
if (hero) hero.hidden = true;
|
|
2929
|
-
} else {
|
|
2930
|
-
if (logo) logo.hidden = true;
|
|
2931
|
-
if (hero) hero.hidden = false;
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
2899
|
function applyComponentOverride(component, overrides) {
|
|
2935
2900
|
requestAnimationFrame(() => {
|
|
2936
2901
|
const elements = document.querySelectorAll(
|
|
@@ -2966,7 +2931,6 @@
|
|
|
2966
2931
|
const resolved = msg.brand ? resolveBrandTokens(msg.brand) : void 0;
|
|
2967
2932
|
if (resolved) {
|
|
2968
2933
|
injectFontFaces(resolved);
|
|
2969
|
-
applyBrandLogo(resolved);
|
|
2970
2934
|
}
|
|
2971
2935
|
const variables = msg.variables ?? (resolved ? brandToVariables(resolved) : void 0);
|
|
2972
2936
|
if (variables) {
|
package/package.json
CHANGED