@orangelogic/design-system 3.42.0 → 3.44.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 (44) hide show
  1. package/library/chunks/{bicolor-picker.BFLMj79r.js → bicolor-picker.pEuB5d7x.js} +1 -1
  2. package/library/chunks/{config-manager.utils.BvTZWpSg.js → block-width.C1BPe6lP.js} +433 -404
  3. package/library/chunks/{border-input-group.DvjGBsxF.js → border-input-group.D0_n4dvI.js} +1 -1
  4. package/library/chunks/{color-picker.CJL_5JjX.js → color-picker.DwYmn7LF.js} +2 -2
  5. package/library/chunks/{color-swatch-group.CWPweLjs.js → color-swatch-group.Pm-mqCgt.js} +13 -13
  6. package/library/chunks/{config-manager.LNBg46oc.js → config-manager.B3oU6rhe.js} +135 -129
  7. package/library/chunks/{configs-controller.CCJxfSjT.js → configs-controller.D3ER8OhT.js} +7 -3
  8. package/library/chunks/{confirm-popover.Difhn86O.js → confirm-popover.DENzK8Zo.js} +1 -1
  9. package/library/chunks/{document-viewer.c03KTUv2.js → document-viewer.C5yuaeGH.js} +3 -3
  10. package/library/chunks/{dropdown.jv7u3Wm8.js → dropdown.Bap8f8gT.js} +1 -1
  11. package/library/chunks/{file-on-demand.7OPAGIG4.js → file-on-demand.DZEBSyi3.js} +2 -2
  12. package/library/chunks/{menu-item.BpILLN4i.js → menu-item.FZopoctH.js} +1 -1
  13. package/library/chunks/{menu.BPTg0Ebu.js → menu.C7zSpVh7.js} +1 -1
  14. package/library/chunks/{shadow-input-group.ByN6pEvN.js → shadow-input-group.Dp6ME7lP.js} +1 -1
  15. package/library/chunks/{src.3xfb7ora.js → src.E-9k1EYO.js} +7 -7
  16. package/library/chunks/{tab-group.n9Wud7bJ.js → tab-group.BgkjcwaU.js} +3 -3
  17. package/library/components/asset-link-format.js +1 -1
  18. package/library/components/atoms.js +11 -11
  19. package/library/components/bicolor-picker.js +1 -1
  20. package/library/components/border-input-group.js +1 -1
  21. package/library/components/color-picker.js +1 -1
  22. package/library/components/color-swatch-group.js +1 -1
  23. package/library/components/confirm-popover.js +1 -1
  24. package/library/components/document-viewer.js +1 -1
  25. package/library/components/dropdown.js +1 -1
  26. package/library/components/file-on-demand.js +1 -1
  27. package/library/components/menu-item.js +1 -1
  28. package/library/components/menu.js +1 -1
  29. package/library/components/molecules.js +4 -4
  30. package/library/components/organisms.js +3 -3
  31. package/library/components/shadow-input-group.js +1 -1
  32. package/library/components/tab-group.js +1 -1
  33. package/library/components/types.js +12120 -12137
  34. package/library/package.json +1 -1
  35. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +5 -1
  36. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +5 -3
  37. package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +3 -0
  38. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +2 -0
  39. package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +3 -0
  40. package/library/packages/types/src/asset-picker.d.ts +5 -0
  41. package/library/packages/types/src/content-builder.d.ts +4 -0
  42. package/library/packages/types/src/font-kit.d.ts +2 -0
  43. package/package.json +1 -1
  44. package/library/chunks/{asset-link-format.1oRTjzY2.js → asset-link-format.BenfACwj.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.42.0",
4
+ "version": "3.44.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -77,7 +77,8 @@ export default class CxAssetPicker extends CortexElement {
77
77
  /** When true, uses the Site Builder search endpoint for asset fetching. */
78
78
  isSiteBuilder: boolean;
79
79
  private previewSrc;
80
- private assetTitle;
80
+ /** Titles of the selected assets, one per record. */
81
+ private assetTitles;
81
82
  /** Kept as an instance field so tests can stub this API call. */
82
83
  private apiGetAssets;
83
84
  private handleRequestAssetClick;
@@ -98,6 +99,9 @@ export default class CxAssetPicker extends CortexElement {
98
99
  * type prefers its representative.
99
100
  */
100
101
  resolvePreviewSrc(asset: Pick<Asset, 'representative' | 'src'> & Partial<Pick<Asset, 'type'>>): string;
102
+ private get previewMode();
103
+ private renderImagePreview;
104
+ private renderTitleLabel;
101
105
  private renderAssetPreview;
102
106
  render(): import('lit-html').TemplateResult<1>;
103
107
  }
@@ -61,10 +61,12 @@ export default class CxViewAndSort extends CortexElement {
61
61
  private handleItemTooltipMouseEnter;
62
62
  private handleItemTooltipMouseLeave;
63
63
  private handleActionClick;
64
- /** Whether an item is one choice in a picker (e.g. items-per-page), rendered as `type="selectable"`. */
64
+ /**
65
+ * Whether an item is one choice in a picker (e.g. items-per-page). Rendered as a `checkbox`
66
+ * item exposed as `menuitemradio`, with `no-uncheck` so activating the current choice again
67
+ * keeps it checked.
68
+ */
65
69
  private isSelectableOption;
66
- /** Maps a data item to the `cx-menu-item` type that should render it. */
67
- private resolveMenuItemType;
68
70
  render(): TemplateResult<1>;
69
71
  renderMenuSection(section: MenuSection): TemplateResult;
70
72
  renderMenuItem(item: MenuItem, isHorizontal?: boolean, tooltip?: string): TemplateResult;
@@ -43,6 +43,9 @@ export declare function getFontStyleName(fontStyle: string): string;
43
43
  * falling back to the raw value for non-standard weights.
44
44
  */
45
45
  export declare function getFontWeightName(fontWeight: string): string;
46
+ export declare function getNearestFontWeightName(fontWeight: string): string;
47
+ /** Reads name ID 17, not name ID 2: many families put `Regular` in ID 2 for every face. */
48
+ export declare function toFontWeightName(names: object | undefined): string | undefined;
46
49
  /**
47
50
  * The kit's variants as font-picker options, for the "font kit default" entry.
48
51
  * Deduped by weight and style: a kit built from several families holds the
@@ -215,6 +215,8 @@ export default class CxConfigManager extends CortexElement {
215
215
  private getFlattenTraits;
216
216
  handleTraitsChange(): Promise<void>;
217
217
  handleComponentChange(): Promise<void>;
218
+ /** Resolves unsaved Gallery/Carousel width defaults against the current column. */
219
+ private resolveWidthUnitDefault;
218
220
  /**
219
221
  * The variants of the font kit the block sits in, if any — the config
220
222
  * manager is the only layer holding the GrapesJS component, so it is the
@@ -10,6 +10,9 @@ import { default as CxColumn } from '../../blocks/column/column';
10
10
  * handle and the width field agree with the page.
11
11
  *
12
12
  * Full-bleed blocks span the whole viewer, so they keep measuring the column.
13
+ * Columns inside a `cx-column-group` also measure their own content box: a nested
14
+ * band can inherit the root page tracks, but those tracks are not the containing
15
+ * block the width control should use.
13
16
  *
14
17
  * @param el - The block being measured.
15
18
  * @param column - The `cx-column` the block belongs to.
@@ -0,0 +1,5 @@
1
+ export declare enum AssetPickerPreviewMode {
2
+ Image = "image",
3
+ Label = "label",
4
+ None = "none"
5
+ }
@@ -41,6 +41,8 @@ export type Option = {
41
41
  label?: string;
42
42
  maskBlocks?: Record<string, unknown>;
43
43
  name?: string;
44
+ /** Resolves a default only when this option has no remembered value. */
45
+ resolveDefaultValue?: () => string | undefined;
44
46
  style?: StyleInfo;
45
47
  value: string;
46
48
  };
@@ -414,6 +416,8 @@ export type ConfigsOptions = {
414
416
  containerFontVariants?: FontFamily[];
415
417
  enableAssetFormatControls?: boolean;
416
418
  enableFontFamilyControls?: boolean;
419
+ /** Resolves an unsaved width default when the author selects a unit. */
420
+ resolveWidthUnitDefault?: (unit: 'px' | '%') => string | undefined;
417
421
  };
418
422
  /**
419
423
  * Well-known editable sections of a content-builder canvas. The page content is the implicit
@@ -16,6 +16,8 @@ export type Typeface = {
16
16
  fontOutlinesFormat?: FontOutlinesFormat;
17
17
  fontStyle: string;
18
18
  fontWeight: string;
19
+ /** Weight name declared by the source file (e.g. `Thin`), used for off-scale weights. */
20
+ fontWeightName?: string;
19
21
  /**
20
22
  * The source file's OS/2 `usWidthClass` (1-9, 5 = normal). Absent for
21
23
  * variants resolved without a file.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "3.42.0",
4
+ "version": "3.44.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -23,8 +23,8 @@ import { t as oe } from "./input.HC75Gdv_.js";
23
23
  import { t as S } from "./option.CxsY_LQ-.js";
24
24
  import { t as C } from "./space.Dd8jezXK.js";
25
25
  import { t as w } from "./select.DLMCyAHm.js";
26
- import { t as T } from "./details.DRv08ocO.js";
27
26
  import { t as se } from "./divider.CqSNZCU8.js";
27
+ import { t as T } from "./details.DRv08ocO.js";
28
28
  import { i as E, n as D, r as O } from "./asset-link-format.DhdgEsA0.js";
29
29
  import { applyTransformationsToUrl as k, buildAssetSrcset as ce, buildTransformationString as A, resolveAutoFormat as le, resolveAutoMaxWidth as ue } from "../utils.js";
30
30
  import { t as de } from "./v4.JyXW8GUB.js";