@salesforce/ui-design-mode 12.6.3 → 12.7.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 (33) hide show
  1. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
  2. package/dist/authoring/core/editors/BoxDimensionEditor.d.ts.map +1 -1
  3. package/dist/authoring/core/editors/ColorEditor.d.cts +9 -7
  4. package/dist/authoring/core/editors/ColorEditor.d.ts +9 -7
  5. package/dist/authoring/core/editors/ColorEditor.d.ts.map +1 -1
  6. package/dist/authoring/core/utils/colorOcclusion.d.cts +185 -0
  7. package/dist/authoring/core/utils/colorOcclusion.d.ts +185 -0
  8. package/dist/authoring/core/utils/colorOcclusion.d.ts.map +1 -0
  9. package/dist/authoring/core/utils/colorUtils.d.cts +26 -0
  10. package/dist/authoring/core/utils/colorUtils.d.ts +26 -0
  11. package/dist/authoring/core/utils/colorUtils.d.ts.map +1 -1
  12. package/dist/authoring/react/index.js +4 -4
  13. package/dist/authoring/web-component/index.js +22 -22
  14. package/dist/protocol/messageTypes.d.ts.map +1 -1
  15. package/dist/protocol/version.cjs +1 -1
  16. package/dist/protocol/version.js +1 -1
  17. package/dist/runtime/design-mode-interactions.js +451 -94
  18. package/dist/runtime/interactions/eventHandlers.d.cts +17 -32
  19. package/dist/runtime/interactions/eventHandlers.d.ts +17 -32
  20. package/dist/runtime/interactions/eventHandlers.d.ts.map +1 -1
  21. package/dist/runtime/interactions/interactionsController.d.cts +1 -8
  22. package/dist/runtime/interactions/interactionsController.d.ts +1 -8
  23. package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
  24. package/dist/runtime/interactions/interceptOverlay.d.cts +172 -0
  25. package/dist/runtime/interactions/interceptOverlay.d.ts +172 -0
  26. package/dist/runtime/interactions/interceptOverlay.d.ts.map +1 -0
  27. package/dist/runtime/interactions/utils/cssUtils.d.cts +22 -0
  28. package/dist/runtime/interactions/utils/cssUtils.d.ts +22 -0
  29. package/dist/runtime/interactions/utils/cssUtils.d.ts.map +1 -1
  30. package/package.json +2 -2
  31. package/dist/authoring/core/utils/backgroundOcclusion.d.cts +0 -48
  32. package/dist/authoring/core/utils/backgroundOcclusion.d.ts +0 -48
  33. package/dist/authoring/core/utils/backgroundOcclusion.d.ts.map +0 -1
@@ -1,48 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- /**
7
- * Background-occlusion policy.
8
- *
9
- * `background-color` and `background-image` are separate paint layers: the image
10
- * layer paints *on top of* the color layer. So when an element's class sets an
11
- * opaque `background-image` (a gradient or `url()`), a user's inline
12
- * `background-color` edit wins the cascade for the color longhand yet is never
13
- * visible — the image covers it. See the panel's Background Color editor, which
14
- * edits only `backgroundColor`.
15
- *
16
- * This module decides, for a single style edit, whether an accompanying
17
- * `background-image: none` write is needed so the color the user picked actually
18
- * shows. It is pure (no DOM, no history) so it can be unit-tested in isolation
19
- * and reused by any surface; the caller is responsible for applying + recording
20
- * the returned clears (as one atomic change — see `recordStyleBatch`).
21
- */
22
- /** A property write the caller should apply + record alongside the user's edit. */
23
- export interface OcclusionClear {
24
- property: string;
25
- /** The occluding value being replaced (for undo). */
26
- oldValue: string;
27
- /** Always `"none"` today — clears the image layer. */
28
- newValue: string;
29
- }
30
- /**
31
- * Given the style edit the user just made and the selected element's current
32
- * background layers, return the extra property writes needed to keep the edit
33
- * visible.
34
- *
35
- * Fires only for a non-empty `backgroundColor` edit whose element has a
36
- * *computed* `background-image` that paints something. Returns `[]` in every
37
- * other case — including when the image was already cleared inline (so we never
38
- * re-emit a redundant clear on a second color tweak). We do not inspect the
39
- * gradient's opacity: a partially-transparent image still visually competes with
40
- * the color, and "set this solid color" reads as intent to replace the layer.
41
- *
42
- * @param property - The CSS property the user edited (camelCase, e.g. `backgroundColor`).
43
- * @param newValue - The value the user set for `property`.
44
- * @param computedBackgroundImage - The element's computed `background-image` (from `getElementStyles`).
45
- * @param inlineBackgroundImage - The element's inline `background-image`, if any (already-applied edits).
46
- */
47
- export declare function computeBackgroundOcclusionClears(property: string, newValue: string, computedBackgroundImage: string | undefined, inlineBackgroundImage: string | undefined): OcclusionClear[];
48
- //# sourceMappingURL=backgroundOcclusion.d.ts.map
@@ -1,48 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- /**
7
- * Background-occlusion policy.
8
- *
9
- * `background-color` and `background-image` are separate paint layers: the image
10
- * layer paints *on top of* the color layer. So when an element's class sets an
11
- * opaque `background-image` (a gradient or `url()`), a user's inline
12
- * `background-color` edit wins the cascade for the color longhand yet is never
13
- * visible — the image covers it. See the panel's Background Color editor, which
14
- * edits only `backgroundColor`.
15
- *
16
- * This module decides, for a single style edit, whether an accompanying
17
- * `background-image: none` write is needed so the color the user picked actually
18
- * shows. It is pure (no DOM, no history) so it can be unit-tested in isolation
19
- * and reused by any surface; the caller is responsible for applying + recording
20
- * the returned clears (as one atomic change — see `recordStyleBatch`).
21
- */
22
- /** A property write the caller should apply + record alongside the user's edit. */
23
- export interface OcclusionClear {
24
- property: string;
25
- /** The occluding value being replaced (for undo). */
26
- oldValue: string;
27
- /** Always `"none"` today — clears the image layer. */
28
- newValue: string;
29
- }
30
- /**
31
- * Given the style edit the user just made and the selected element's current
32
- * background layers, return the extra property writes needed to keep the edit
33
- * visible.
34
- *
35
- * Fires only for a non-empty `backgroundColor` edit whose element has a
36
- * *computed* `background-image` that paints something. Returns `[]` in every
37
- * other case — including when the image was already cleared inline (so we never
38
- * re-emit a redundant clear on a second color tweak). We do not inspect the
39
- * gradient's opacity: a partially-transparent image still visually competes with
40
- * the color, and "set this solid color" reads as intent to replace the layer.
41
- *
42
- * @param property - The CSS property the user edited (camelCase, e.g. `backgroundColor`).
43
- * @param newValue - The value the user set for `property`.
44
- * @param computedBackgroundImage - The element's computed `background-image` (from `getElementStyles`).
45
- * @param inlineBackgroundImage - The element's inline `background-image`, if any (already-applied edits).
46
- */
47
- export declare function computeBackgroundOcclusionClears(property: string, newValue: string, computedBackgroundImage: string | undefined, inlineBackgroundImage: string | undefined): OcclusionClear[];
48
- //# sourceMappingURL=backgroundOcclusion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backgroundOcclusion.d.ts","sourceRoot":"","sources":["../../../../src/authoring/core/utils/backgroundOcclusion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,mFAAmF;AACnF,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;CACjB;AAQD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gCAAgC,CAC/C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,GAAG,SAAS,EAC3C,qBAAqB,EAAE,MAAM,GAAG,SAAS,GACvC,cAAc,EAAE,CAelB"}