@orangelogic/design-system 2.123.0 → 2.125.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 (29) hide show
  1. package/library/chunks/{asset.CPPr2-ir.js → asset.D_VITxRH.js} +6 -6
  2. package/library/chunks/{header.BrmqvtqC.js → header.WRWyUU36.js} +64 -68
  3. package/library/chunks/{list-editor.CSZvS-Fm.js → list-editor.CyHNKjuZ.js} +130 -123
  4. package/library/components/asset-link-format.js +1 -1
  5. package/library/components/atoms.js +1 -1
  6. package/library/components/header.js +1 -1
  7. package/library/components/list-editor.js +1 -1
  8. package/library/components/molecules.js +1 -1
  9. package/library/components/types.js +23971 -23718
  10. package/library/package.json +1 -1
  11. package/library/packages/atoms/src/components/header/header.d.ts +4 -0
  12. package/library/packages/events/src/events.d.ts +0 -1
  13. package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +9 -3
  14. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +7 -1
  15. package/library/packages/organisms/src/_v1/comment/comment.d.ts +67 -0
  16. package/library/packages/organisms/src/_v1/comment/components/comment-menu/comment-menu.d.ts +32 -0
  17. package/library/packages/organisms/src/_v1/comment/extensions/time.d.ts +63 -0
  18. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +1 -1
  19. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +0 -1
  20. package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -0
  21. package/library/packages/organisms/src/content-builder/configs/video.d.ts +0 -1
  22. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +1 -4
  23. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
  24. package/library/packages/organisms/src/index.d.ts +1 -0
  25. package/library/packages/types/src/asset-format-picker.d.ts +0 -1
  26. package/library/packages/types/src/content-builder.d.ts +2 -2
  27. package/library/react-web-component.d.ts +13 -1
  28. package/package.json +1 -1
  29. package/library/packages/events/src/cx-asset-format-picker-delete.d.ts +0 -6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.123.0",
4
+ "version": "2.125.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -36,6 +36,10 @@ export default class CxHeader extends CortexElement {
36
36
  * Whether to disable copy button or not
37
37
  */
38
38
  disabledCopyButton: boolean;
39
+ /**
40
+ * When true, removes the default line-height applied by the heading variant.
41
+ */
42
+ customLineHeight: boolean;
39
43
  private cms5PageReadyTimeout;
40
44
  /**
41
45
  * Get the owner window
@@ -63,7 +63,6 @@ export * from './cx-dot-status-click';
63
63
  export * from './cx-download-format-picker-delete';
64
64
  export * from './cx-download-format-picker-select';
65
65
  export * from './cx-download-format-request-status';
66
- export * from './cx-asset-format-picker-delete';
67
66
  export * from './cx-asset-format-picker-select';
68
67
  export * from './cx-drag-end';
69
68
  export * from './cx-drag-start';
@@ -11,11 +11,11 @@ import { CSSResultGroup } from 'lit';
11
11
  * @summary The `cx-asset-format-picker` component lets users choose and clear an asset display format.
12
12
  * Works for any asset type (video, audio, etc.) based on the callback provided.
13
13
  *
14
- * @event cx-asset-format-select - Emitted when a format is selected. Detail is an `AssetFormatValue`.
15
- * @event cx-asset-format-delete - Emitted when the selected format is cleared.
14
+ * @event cx-asset-format-select - Emitted when a format is selected or reset to its default. Detail is an `AssetFormatValue`.
16
15
  * @event cx-asset-request-status - Emitted when the format request status changes.
17
16
  */
18
17
  export default class CxAssetFormatPicker extends CortexElement {
18
+ #private;
19
19
  static readonly styles: CSSResultGroup;
20
20
  static readonly dependencies: {
21
21
  'cx-button': typeof CxButton;
@@ -25,6 +25,7 @@ export default class CxAssetFormatPicker extends CortexElement {
25
25
  'cx-typography': typeof CxTypography;
26
26
  };
27
27
  private readonly localize;
28
+ private apiGetAvailableProxies;
28
29
  inputEl?: CxInput;
29
30
  /** The currently selected asset format value. */
30
31
  value: AssetFormatValue | undefined;
@@ -36,6 +37,8 @@ export default class CxAssetFormatPicker extends CortexElement {
36
37
  required: boolean;
37
38
  /** Disables the picker. */
38
39
  disabled: boolean;
40
+ /** The format code to reset to when the user clicks the reset button (e.g. 'Web', 'WebHigh'). */
41
+ defaultFormat: string;
39
42
  /**
40
43
  * A callback invoked when the user requests to select an asset format.
41
44
  * It receives the asset ID and the current value, and should return a
@@ -43,8 +46,11 @@ export default class CxAssetFormatPicker extends CortexElement {
43
46
  */
44
47
  onRequestAssetFormat: ((assetId: string, value?: AssetFormatValue) => Promise<AssetFormatValue | null | undefined>) | undefined;
45
48
  private get hasValue();
49
+ private get resolvedLabel();
50
+ private get canReset();
46
51
  private handleRequestFormatClick;
47
- private handleDeleteClick;
52
+ private handleResetClick;
53
+ handleAssetIdChange(): Promise<void>;
48
54
  handleValueChange(): Promise<void>;
49
55
  private renderFormatDisplay;
50
56
  render(): import('lit').TemplateResult<1>;
@@ -52,11 +52,16 @@ export default class CxAssetPicker extends CortexElement {
52
52
  * Whether the asset picker is disabled.
53
53
  */
54
54
  disabled: boolean;
55
+ /**
56
+ * When true, restricts selection to the picker's declared `type`(s): assets of any
57
+ * other type are rejected on confirmation. When false, `type` only pre-fills the filter.
58
+ */
59
+ restrict: boolean;
55
60
  /**
56
61
  * A callback function that is called when the user requests to select an asset.
57
62
  * It should return a promise that resolves to an Asset object.
58
63
  */
59
- onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
64
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[], restrictType?: AssetTypeString) => Promise<Asset | Record<string, Asset>>) | undefined;
60
65
  /**
61
66
  * An optional record ID used to fetch a clean preview image, bypassing any
62
67
  * stored URL that may have transformations applied.
@@ -65,6 +70,7 @@ export default class CxAssetPicker extends CortexElement {
65
70
  /** When true, uses the Site Builder search endpoint for asset fetching. */
66
71
  isSiteBuilder: boolean;
67
72
  private previewSrc;
73
+ private assetTitle;
68
74
  /** Kept as an instance field so tests can stub this API call. */
69
75
  private apiGetAssets;
70
76
  private handleRequestAssetClick;
@@ -0,0 +1,67 @@
1
+ import { CxTimeBasedChangeEvent } from '../../../../events/src/cx-time-based-change';
2
+ import { default as CxComment } from '../../comment/comment.ts';
3
+ import { TimecodeMode } from '../../../../types/src/video-editor';
4
+ import { default as CxCommentMenuV1 } from './components/comment-menu/comment-menu';
5
+
6
+ /**
7
+ * @summary CxCommentV1 - Temporary fork of `cx-comment` that restores the time-based/timecode
8
+ * feature removed from `cx-comment` by the cx-annotator refactor. Kept for Cortex core
9
+ * compatibility until core migrates off the old timecode API; remove once no longer needed.
10
+ */
11
+ export default class CxCommentV1 extends CxComment {
12
+ static readonly dependencies: {
13
+ 'cx-comment-menu-v1': typeof CxCommentMenuV1;
14
+ 'cx-comment-menu': typeof import('../../comment/components/comment-menu/comment-menu').default;
15
+ 'cx-dialog': typeof import('../../../../atoms/src/index.ts').CxDialog;
16
+ 'cx-mentions': typeof import('../../../../molecules/src/index.ts').CxMentions;
17
+ 'cx-popup': typeof import('../../../../atoms/src/index.ts').CxPopup;
18
+ 'cx-space': typeof import('../../../../atoms/src/index.ts').CxSpace;
19
+ 'cx-timecode': typeof import('../../../../atoms/src/index.ts').CxTimecode;
20
+ };
21
+ readonly commentMenu: CxCommentMenuV1;
22
+ /**
23
+ * Whether the time based button should be shown in the comment menu.
24
+ */
25
+ canUseTimeBased: boolean;
26
+ /**
27
+ * When true, hides the time based icon button in the comment menu while
28
+ * still allowing the time based feature to function (e.g. `timeBased`
29
+ * state is still respected). Useful when the parent wants to enable the
30
+ * feature without exposing the toggle button to end users.
31
+ */
32
+ hideTimeBasedIcon: boolean;
33
+ /**
34
+ * Whether the time based feature is enabled.
35
+ */
36
+ timeBased: boolean;
37
+ /**
38
+ * The time values for the time based feature.
39
+ */
40
+ time: number[];
41
+ /**
42
+ * The timecode mode for the time based feature.
43
+ */
44
+ timecodeMode: TimecodeMode;
45
+ /**
46
+ * The frame rate for the time based feature.
47
+ */
48
+ frameRate: number;
49
+ /**
50
+ * Legacy alias for `disabledFullscreen` using the pre-rename attribute name
51
+ * (`disable-fullscreen`) that Cortex core still sets. Setting this also sets
52
+ * `disabledFullscreen`, which is what `cx-comment` actually acts on.
53
+ */
54
+ disableFullscreen: boolean;
55
+ handleDisableFullscreenChange(): void;
56
+ runFirstUpdated(): void;
57
+ handleTimeChange(): void;
58
+ handleTimeBasedChange(event: CxTimeBasedChangeEvent): void;
59
+ /** Shared timecode config for both the initial extension and `setTime` updates. */
60
+ private get timecodeOptions();
61
+ protected renderMenu(): import('lit').TemplateResult<1>;
62
+ }
63
+ declare global {
64
+ interface HTMLElementTagNameMap {
65
+ 'cx-comment-v1': CxCommentV1;
66
+ }
67
+ }
@@ -0,0 +1,32 @@
1
+ import { default as CxCommentMenu } from '../../../../comment/components/comment-menu/comment-menu';
2
+
3
+ /**
4
+ * @summary CxCommentMenuV1 - Temporary fork of `cx-comment-menu` that restores the time-based/timecode
5
+ * toggle button removed by the cx-annotator refactor. Used only by `cx-comment-v1`.
6
+ */
7
+ export default class CxCommentMenuV1 extends CxCommentMenu {
8
+ static readonly dependencies: {
9
+ 'cx-button': typeof import('../../../../../../atoms/src/index.ts').CxButton;
10
+ 'cx-card': typeof import('../../../../../../atoms/src/index.ts').CxCard;
11
+ 'cx-icon-button': typeof import('../../../../../../atoms/src/index.ts').CxIconButton;
12
+ 'cx-input': typeof import('../../../../../../atoms/src/index.ts').CxInput;
13
+ 'cx-popup': typeof import('../../../../../../atoms/src/index.ts').CxPopup;
14
+ 'cx-space': typeof import('../../../../../../atoms/src/index.ts').CxSpace;
15
+ 'cx-tooltip': typeof import('../../../../../../atoms/src/index.ts').CxTooltip;
16
+ };
17
+ /**
18
+ * Whether the time based button should be shown in the comment menu.
19
+ */
20
+ canUseTimeBased: boolean;
21
+ /**
22
+ * Whether the time based feature is enabled.
23
+ */
24
+ timeBased: boolean;
25
+ protected handleTimeBasedClick(): void;
26
+ protected renderRightActions(): import('lit').TemplateResult<1>;
27
+ }
28
+ declare global {
29
+ interface HTMLElementTagNameMap {
30
+ 'cx-comment-menu-v1': CxCommentMenuV1;
31
+ }
32
+ }
@@ -0,0 +1,63 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { PluginKey } from '@tiptap/pm/state';
3
+ import { TimecodeMode } from '../../../../../types/src/video-editor';
4
+
5
+ export interface TimeOptions {
6
+ /**
7
+ * The HTML attributes for the time widget.
8
+ * @default {}
9
+ */
10
+ HTMLAttributes: Record<string, string>;
11
+ /**
12
+ * The frame rate for the time based feature.
13
+ * @default 24
14
+ */
15
+ frameRate: number;
16
+ /**
17
+ * The placeholder text for the time based feature.
18
+ * @default 'Enter a message...'
19
+ */
20
+ placeholder: string;
21
+ /**
22
+ * The time values (in seconds) for the time based feature.
23
+ * Can be a single value or a range [start, end].
24
+ * @default []
25
+ */
26
+ time: number[];
27
+ /**
28
+ * The timecode mode for the time based feature.
29
+ * @default TimecodeMode.Standard
30
+ */
31
+ timecodeMode: TimecodeMode;
32
+ }
33
+ export interface TimeStorage {
34
+ frameRate: number;
35
+ placeholder: string;
36
+ time: number[];
37
+ timecodeMode: TimecodeMode;
38
+ }
39
+ declare module '@tiptap/core' {
40
+ interface Commands<ReturnType> {
41
+ time: {
42
+ /**
43
+ * Update the time decoration with new values.
44
+ */
45
+ setTime: (options: {
46
+ frameRate?: number;
47
+ placeholder?: string;
48
+ time?: number[];
49
+ timecodeMode?: TimecodeMode;
50
+ }) => ReturnType;
51
+ };
52
+ }
53
+ }
54
+ /**
55
+ * The plugin key for the time decoration plugin.
56
+ */
57
+ export declare const TimePluginKey: PluginKey<any>;
58
+ /**
59
+ * This extension adds a node decoration widget at the start of the document
60
+ * displaying the time using cx-timecode component.
61
+ */
62
+ export declare const Time: Extension<TimeOptions, TimeStorage>;
63
+ export default Time;
@@ -205,7 +205,7 @@ export default class CxConfigForm extends CortexElement {
205
205
  baseUrl: string;
206
206
  /** Auth token passed through to cx-asset-transformation-dialog for asset fetching. */
207
207
  token: string;
208
- onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[]) => Promise<Asset | Record<string, Asset>>) | undefined;
208
+ onRequestAsset: ((type: AssetTypeString, multiple?: boolean, accepts?: string[], restrictType?: AssetTypeString) => Promise<Asset | Record<string, Asset>>) | undefined;
209
209
  /**
210
210
  * Function to request a download format.
211
211
  * This is used to download an asset in a different format.
@@ -8,7 +8,6 @@ type Attribute = {
8
8
  'data-width-percent': string;
9
9
  'data-width-pixel': string;
10
10
  'format'?: string;
11
- 'format-label'?: string;
12
11
  'format-src'?: string;
13
12
  name: CxSbAudio['name'];
14
13
  'parent-record-id'?: string;
@@ -4,6 +4,7 @@ import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
4
4
 
5
5
  type Attribute = {
6
6
  alignment: Alignment;
7
+ 'custom-line-height': boolean;
7
8
  'data-constraints': boolean;
8
9
  'disabled-copy-button': boolean;
9
10
  'font-size'?: string;
@@ -25,7 +25,6 @@ type Attribute = {
25
25
  'download-names'?: CxVideo['downloadNames'];
26
26
  'download-src'?: CxVideo['downloadSrc'];
27
27
  'format': string;
28
- 'format-label'?: string;
29
28
  'format-src': string;
30
29
  'header-source-field': CxVideo['headerSourceField'];
31
30
  height: CxVideo['height'];
@@ -14,7 +14,6 @@ export default class ConfigsController {
14
14
  'data-width-percent': string;
15
15
  'data-width-pixel': string;
16
16
  format?: string;
17
- 'format-label'?: string;
18
17
  'format-src'?: string;
19
18
  name: import('./blocks/audio/audio').default["name"];
20
19
  'parent-record-id'?: string;
@@ -229,6 +228,7 @@ export default class ConfigsController {
229
228
  'zoom-style': import('../../../types/src/highlightable-element').HighlightableElementZoomStyle;
230
229
  }>[] | import('../../../types/src/content-builder').PropertyConfig<{
231
230
  alignment: import('../../../types/src/header').Alignment;
231
+ 'custom-line-height': boolean;
232
232
  'data-constraints': boolean;
233
233
  'disabled-copy-button': boolean;
234
234
  'font-size'?: string;
@@ -330,7 +330,6 @@ export default class ConfigsController {
330
330
  'download-names'?: import('./blocks/video/video').default["downloadNames"];
331
331
  'download-src'?: import('./blocks/video/video').default["downloadSrc"];
332
332
  format: string;
333
- 'format-label'?: string;
334
333
  'format-src': string;
335
334
  'header-source-field': import('./blocks/video/video').default["headerSourceField"];
336
335
  height: import('./blocks/video/video').default["height"];
@@ -360,7 +359,6 @@ export default class ConfigsController {
360
359
  'data-width-percent': string;
361
360
  'data-width-pixel': string;
362
361
  format?: string;
363
- 'format-label'?: string;
364
362
  'format-src'?: string;
365
363
  name: import('./blocks/audio/audio').default["name"];
366
364
  'parent-record-id'?: string;
@@ -612,7 +610,6 @@ export default class ConfigsController {
612
610
  'download-names'?: import('./blocks/video/video').default["downloadNames"];
613
611
  'download-src'?: import('./blocks/video/video').default["downloadSrc"];
614
612
  format: string;
615
- 'format-label'?: string;
616
613
  'format-src': string;
617
614
  'header-source-field': import('./blocks/video/video').default["headerSourceField"];
618
615
  height: import('./blocks/video/video').default["height"];
@@ -48,7 +48,7 @@ export default class StyleController {
48
48
  assetFormatPickerConfigs?: {
49
49
  assetIdKey?: string;
50
50
  assetVersionKey?: string;
51
- formatLabelKey?: string;
51
+ defaultFormat?: string;
52
52
  formatSrcKey?: string;
53
53
  versionLabelKey?: string;
54
54
  };
@@ -10,6 +10,7 @@ export { default as CxChartPlanBuilder } from './content-builder/components/char
10
10
  export { default as CxClusterManagement } from './cluster-management/cluster-management';
11
11
  export { default as CxColorSwatchGroup } from './color-swatch-group/color-swatch-group';
12
12
  export { default as CxComment } from './comment/comment';
13
+ export { default as CxCommentV1 } from './_v1/comment/comment';
13
14
  export { default as CxDamCustomToolbarButtonsEditor } from './dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor';
14
15
  export { default as CxContentBuilder } from './content-builder/content-builder';
15
16
  export { default as CxDownloader } from './downloader/downloader';
@@ -6,6 +6,5 @@ export interface AssetFormatValue {
6
6
  assetSrc?: string;
7
7
  assetVersion: AssetVersion | string;
8
8
  format: string;
9
- formatLabel?: string;
10
9
  versionLabel?: string;
11
10
  }
@@ -49,8 +49,8 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
49
49
  assetIdKey?: string;
50
50
  /** The block-attribute key that stores the selected asset version. Defaults to 'asset-version'. */
51
51
  assetVersionKey?: string;
52
- /** The block-attribute key that stores the human-readable format label. Defaults to 'format-label'. */
53
- formatLabelKey?: string;
52
+ /** The format code to use when the user resets the picker (e.g. 'Web' for audio, 'WebHigh' for video). */
53
+ defaultFormat?: string;
54
54
  /** The block-attribute key that stores the resolved asset source URL. Defaults to 'format-src'. */
55
55
  formatSrcKey?: string;
56
56
  /** The block-attribute key that stores the human-readable version label. Defaults to 'version-label'. */
@@ -3269,6 +3269,10 @@
3269
3269
  * Whether to disable copy button or not
3270
3270
  */
3271
3271
  disabledCopyButton?: boolean;
3272
+ /**
3273
+ * When true, removes the default line-height applied by the heading variant.
3274
+ */
3275
+ customLineHeight?: boolean;
3272
3276
  /**
3273
3277
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
3274
3278
  */
@@ -5817,6 +5821,10 @@
5817
5821
  * Whether the asset picker is disabled.
5818
5822
  */
5819
5823
  disabled?: boolean;
5824
+ /**
5825
+ * When true, restricts selection to the picker's declared `type`(s): assets of any other type are rejected on confirmation. When false, `type` only pre-fills the filter.
5826
+ */
5827
+ restrict?: boolean;
5820
5828
  /**
5821
5829
  * An optional record ID used to fetch a clean preview image, bypassing any stored URL that may have transformations applied.
5822
5830
  */
@@ -7696,7 +7704,7 @@
7696
7704
  /**
7697
7705
  * The currently selected asset format value.
7698
7706
  */
7699
- value?: { assetSrc: string; assetVersion: string; format: string; formatLabel: string; versionLabel: string; };
7707
+ value?: { assetSrc: string; assetVersion: string; format: string; versionLabel: string; };
7700
7708
  /**
7701
7709
  * Form field name.
7702
7710
  */
@@ -7713,6 +7721,10 @@
7713
7721
  * Disables the picker.
7714
7722
  */
7715
7723
  disabled?: boolean;
7724
+ /**
7725
+ * The format code to reset to when the user clicks the reset button (e.g. 'Web', 'WebHigh').
7726
+ */
7727
+ defaultFormat?: string;
7716
7728
  /**
7717
7729
  * Make localization attributes reactive eslint-disable-next-line lit/no-native-attributes
7718
7730
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.123.0",
4
+ "version": "2.125.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,6 +0,0 @@
1
- export type CxAssetFormatPickerDeleteEvent = CustomEvent<Record<PropertyKey, unknown>>;
2
- declare global {
3
- interface GlobalEventHandlersEventMap {
4
- 'cx-asset-format-delete': CxAssetFormatPickerDeleteEvent;
5
- }
6
- }