@orangelogic/design-system 2.159.0 → 2.161.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/library/chunks/{document-viewer.DXtjdvqe.js → document-viewer.CGyOG1yw.js} +1 -1
- package/library/chunks/drag.DenOh3AE.js +39 -0
- package/library/chunks/{image.BO6NWyIo.js → image.5mhGPvMN.js} +1 -1
- package/library/chunks/url.Bd5rq4G0.js +48 -0
- package/library/components/atoms.js +2 -2
- package/library/components/color-picker.js +1 -1
- package/library/components/document-viewer.js +2 -2
- package/library/components/file-on-demand.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/masonry.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/types.js +19857 -19741
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/molecules/src/annotator/annotator.d.ts +14 -1
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +25 -0
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +41 -0
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -0
- package/library/packages/types/src/content-builder.d.ts +7 -0
- package/library/packages/utils/src/url/url.d.ts +7 -0
- package/library/react-web-component.d.ts +21 -1
- package/library/utils.js +215 -213
- package/package.json +1 -1
- package/library/chunks/drag.DXEXVXPv.js +0 -18
- package/library/chunks/url.-WDYqplj.js +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as kd, a as Sa, b as Be, c as Je } from "../chunks/inheritsLoose.BuSn_CvZ.js";
|
|
2
2
|
import { c as ps, a as Bn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
|
|
3
3
|
import { r as Sb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
|
|
4
|
-
import { C as Cb } from "../chunks/image.
|
|
4
|
+
import { C as Cb } from "../chunks/image.5mhGPvMN.js";
|
|
5
5
|
import Mb from "./resize-observer.js";
|
|
6
6
|
import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.CAfXABBc.js";
|
|
7
7
|
import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
|
package/library/package.json
CHANGED
|
@@ -40,7 +40,11 @@ export default class CxAnnotator extends CortexElement {
|
|
|
40
40
|
markerArea: MarkerArea | null;
|
|
41
41
|
color: string;
|
|
42
42
|
lineWeight: number;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Last known good annotation state. Synced from the marker area only when
|
|
45
|
+
* its state has non-zero dimensions, so hidden (0×0) captures never
|
|
46
|
+
* replace a valid recovery source.
|
|
47
|
+
*/
|
|
44
48
|
private annotationStateValue;
|
|
45
49
|
private resizeObserver;
|
|
46
50
|
get currentMarker(): import('@markerjs/markerjs3').MarkerBase | undefined;
|
|
@@ -58,6 +62,15 @@ export default class CxAnnotator extends CortexElement {
|
|
|
58
62
|
private destroyMarkerArea;
|
|
59
63
|
private initMarkerArea;
|
|
60
64
|
private restoreAnnotationState;
|
|
65
|
+
/**
|
|
66
|
+
* Builds the state to pass to markerjs3's restoreState. A state that
|
|
67
|
+
* carries markers keeps its own width/height (the canvas size the markers
|
|
68
|
+
* were drawn at) so markerjs3 rescales them to the current target size;
|
|
69
|
+
* overriding those dimensions here would skip that scaling and render the
|
|
70
|
+
* markers at their original pixel coordinates on a different-sized canvas.
|
|
71
|
+
* Empty or dimensionless states adopt the target size instead.
|
|
72
|
+
*/
|
|
73
|
+
private toRestorableState;
|
|
61
74
|
private handleAreaStateChange;
|
|
62
75
|
private handleMarkerAreaShow;
|
|
63
76
|
/**
|
package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts
CHANGED
|
@@ -66,6 +66,31 @@ export default class CxConfigManager extends CortexElement {
|
|
|
66
66
|
* @default false
|
|
67
67
|
*/
|
|
68
68
|
enableFontFamilyControls: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Default asset format applied to image blocks.
|
|
71
|
+
* @default 'TRX'
|
|
72
|
+
*/
|
|
73
|
+
defaultImageFormat: string;
|
|
74
|
+
/**
|
|
75
|
+
* Default asset format applied to video poster (thumbnail) blocks.
|
|
76
|
+
* @default 'TRX'
|
|
77
|
+
*/
|
|
78
|
+
defaultVideoPosterFormat: string;
|
|
79
|
+
/**
|
|
80
|
+
* Default asset format applied to gallery blocks.
|
|
81
|
+
* @default 'TRX'
|
|
82
|
+
*/
|
|
83
|
+
defaultGalleryFormat: string;
|
|
84
|
+
/**
|
|
85
|
+
* Default asset format applied to carousel blocks.
|
|
86
|
+
* @default 'TRX'
|
|
87
|
+
*/
|
|
88
|
+
defaultCarouselFormat: string;
|
|
89
|
+
/**
|
|
90
|
+
* Default asset format applied to timeline blocks.
|
|
91
|
+
* @default 'TRX'
|
|
92
|
+
*/
|
|
93
|
+
defaultTimelineFormat: string;
|
|
69
94
|
/**
|
|
70
95
|
* Root folder ids the folder-picker controls are restricted to (forwarded to
|
|
71
96
|
* cx-config-form). Sourced from the space's configured root folders.
|
|
@@ -32,3 +32,4 @@ export declare const BLOCK_CAROUSEL_LIMITED_BLOCKS: BlockType[];
|
|
|
32
32
|
export declare const NEWLY_ADDED_COMPONENT_DELAY = 500;
|
|
33
33
|
export declare const OPEN_ON_NEWLY_ADDED_COMPONENT: Set<BlockType>;
|
|
34
34
|
export declare const MULTI_LANGUAGE_BLOCKS: Set<BlockType>;
|
|
35
|
+
export declare const DEFAULT_IMAGE_FORMAT = "TR1";
|
|
@@ -18,6 +18,12 @@ import { CxRTEBubbleMenu, CxRTETableGenerator } from './plugins';
|
|
|
18
18
|
* download-format, and asset-format-picker controls on image, video, gallery,
|
|
19
19
|
* carousel, and timeline blocks. Off by default.
|
|
20
20
|
*
|
|
21
|
+
* `default-image-format`, `default-video-poster-format`,
|
|
22
|
+
* `default-gallery-format`, `default-carousel-format`, and
|
|
23
|
+
* `default-timeline-format` set the initial format for their respective block
|
|
24
|
+
* type. All apply regardless of `enable-asset-format-controls`, and act as the
|
|
25
|
+
* fallback when a block has not had its format explicitly configured.
|
|
26
|
+
*
|
|
21
27
|
* @event cx-change - Emitted when the content builder changes.
|
|
22
28
|
*/
|
|
23
29
|
export default class CxContentBuilder extends CortexElement {
|
|
@@ -105,6 +111,41 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
105
111
|
* @default false
|
|
106
112
|
*/
|
|
107
113
|
enableAssetFormatControls: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Default asset format applied to image blocks.
|
|
116
|
+
* Used as the initial format when a block is added, whether or not
|
|
117
|
+
* `enable-asset-format-controls` is on.
|
|
118
|
+
* @default 'TR1'
|
|
119
|
+
*/
|
|
120
|
+
defaultImageFormat: string;
|
|
121
|
+
/**
|
|
122
|
+
* Default asset format applied to video poster (thumbnail) blocks.
|
|
123
|
+
* Used as the initial format when a block is added, whether or not
|
|
124
|
+
* `enable-asset-format-controls` is on.
|
|
125
|
+
* @default 'TR1'
|
|
126
|
+
*/
|
|
127
|
+
defaultVideoPosterFormat: string;
|
|
128
|
+
/**
|
|
129
|
+
* Default asset format applied to gallery blocks.
|
|
130
|
+
* Used as the initial format when a block is added, whether or not
|
|
131
|
+
* `enable-asset-format-controls` is on.
|
|
132
|
+
* @default 'TR1'
|
|
133
|
+
*/
|
|
134
|
+
defaultGalleryFormat: string;
|
|
135
|
+
/**
|
|
136
|
+
* Default asset format applied to carousel blocks.
|
|
137
|
+
* Used as the initial format when a block is added, whether or not
|
|
138
|
+
* `enable-asset-format-controls` is on.
|
|
139
|
+
* @default 'TR1'
|
|
140
|
+
*/
|
|
141
|
+
defaultCarouselFormat: string;
|
|
142
|
+
/**
|
|
143
|
+
* Default asset format applied to timeline blocks.
|
|
144
|
+
* Used as the initial format when a block is added, whether or not
|
|
145
|
+
* `enable-asset-format-controls` is on.
|
|
146
|
+
* @default 'TR1'
|
|
147
|
+
*/
|
|
148
|
+
defaultTimelineFormat: string;
|
|
108
149
|
/**
|
|
109
150
|
* Set `enable-font-family-controls` to expose the font family / style / weight
|
|
110
151
|
* pickers (and their font-size controls) in the block config sidebar.
|
|
@@ -4,6 +4,11 @@ import { LocalizeController } from '../../../../utils/src/custom-element/i18n';
|
|
|
4
4
|
import { Component, ComponentDefinition, ComponentView, ComponentViewDefinition, Editor } from 'grapesjs';
|
|
5
5
|
|
|
6
6
|
export type EditorPluginOptions = {
|
|
7
|
+
defaultCarouselFormat?: string;
|
|
8
|
+
defaultGalleryFormat?: string;
|
|
9
|
+
defaultImageFormat?: string;
|
|
10
|
+
defaultTimelineFormat?: string;
|
|
11
|
+
defaultVideoPosterFormat?: string;
|
|
7
12
|
enableAssetFormatControls?: boolean;
|
|
8
13
|
localize: LocalizeController;
|
|
9
14
|
multiLanguage?: boolean;
|
|
@@ -157,6 +157,8 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
157
157
|
options?: Option[];
|
|
158
158
|
pickerConfigs?: {
|
|
159
159
|
accepts?: string[];
|
|
160
|
+
/** The format code used to resolve a preview src immediately after picking an image (before the user configures a format). */
|
|
161
|
+
defaultFormat?: string;
|
|
160
162
|
multiple?: boolean;
|
|
161
163
|
/** The block-attribute key that stores the asset name. Defaults to 'name'. */
|
|
162
164
|
nameKey?: string;
|
|
@@ -355,6 +357,11 @@ export declare enum DataSourceId {
|
|
|
355
357
|
TranslatableTexts = "TRANSLATABLE_TEXTS"
|
|
356
358
|
}
|
|
357
359
|
export type ConfigsOptions = {
|
|
360
|
+
defaultCarouselFormat?: string;
|
|
361
|
+
defaultGalleryFormat?: string;
|
|
362
|
+
defaultImageFormat?: string;
|
|
363
|
+
defaultTimelineFormat?: string;
|
|
364
|
+
defaultVideoPosterFormat?: string;
|
|
358
365
|
enableAssetFormatControls?: boolean;
|
|
359
366
|
enableFontFamilyControls?: boolean;
|
|
360
367
|
};
|
|
@@ -22,4 +22,11 @@ export declare function isValidUrl(urlString: string): boolean;
|
|
|
22
22
|
export declare const RELATIVE_URL_REGEX: string;
|
|
23
23
|
export declare const URL_VALIDATION_REGEX: string;
|
|
24
24
|
export declare const URL_DOMAIN_VALIDATION_REGEX: string;
|
|
25
|
+
export declare const URL_INTRANET_DOMAIN_VALIDATION_REGEX: string;
|
|
26
|
+
/**
|
|
27
|
+
* Validates a URL against the public-domain pattern first, falling back to the
|
|
28
|
+
* 1-dot intranet hostname pattern so internal links without a public TLD
|
|
29
|
+
* (e.g. https://echonet.bnooaribas/fr) are also accepted.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isValidDomainOrIntranetUrl(urlString: string): boolean;
|
|
25
32
|
export declare const URL_PROTOCOL_VALIDATION_REGEX: string;
|
|
@@ -9647,7 +9647,7 @@
|
|
|
9647
9647
|
preRender?: boolean;
|
|
9648
9648
|
}
|
|
9649
9649
|
/**
|
|
9650
|
-
* The `cx-content-builder` component is used to create and manage content blocks in a CMS.<br/> Set `enable-asset-format-controls` to expose the asset format, transformation, download-format, and asset-format-picker controls on image, video, gallery, carousel, and timeline blocks. Off by default.
|
|
9650
|
+
* The `cx-content-builder` component is used to create and manage content blocks in a CMS.<br/> Set `enable-asset-format-controls` to expose the asset format, transformation, download-format, and asset-format-picker controls on image, video, gallery, carousel, and timeline blocks. Off by default.<br/> `default-image-format`, `default-video-poster-format`, `default-gallery-format`, `default-carousel-format`, and `default-timeline-format` set the initial format for their respective block type. All apply regardless of `enable-asset-format-controls`, and act as the fallback when a block has not had its format explicitly configured.
|
|
9651
9651
|
*/
|
|
9652
9652
|
interface CxContentBuilderAttributes extends HTMLAttributes<CxContentBuilder> {
|
|
9653
9653
|
|
|
@@ -9687,6 +9687,26 @@
|
|
|
9687
9687
|
* Whether to expose the asset format / transformation / download-format / asset-format-picker controls in the per-block config sidebar for image, video, gallery, carousel, and timeline blocks. <br/>@default false
|
|
9688
9688
|
*/
|
|
9689
9689
|
enableAssetFormatControls?: boolean;
|
|
9690
|
+
/**
|
|
9691
|
+
* Default asset format applied to image blocks. Used as the initial format when a block is added, whether or not `enable-asset-format-controls` is on. <br/>@default 'TR1'
|
|
9692
|
+
*/
|
|
9693
|
+
defaultImageFormat?: string;
|
|
9694
|
+
/**
|
|
9695
|
+
* Default asset format applied to video poster (thumbnail) blocks. Used as the initial format when a block is added, whether or not `enable-asset-format-controls` is on. <br/>@default 'TR1'
|
|
9696
|
+
*/
|
|
9697
|
+
defaultVideoPosterFormat?: string;
|
|
9698
|
+
/**
|
|
9699
|
+
* Default asset format applied to gallery blocks. Used as the initial format when a block is added, whether or not `enable-asset-format-controls` is on. <br/>@default 'TR1'
|
|
9700
|
+
*/
|
|
9701
|
+
defaultGalleryFormat?: string;
|
|
9702
|
+
/**
|
|
9703
|
+
* Default asset format applied to carousel blocks. Used as the initial format when a block is added, whether or not `enable-asset-format-controls` is on. <br/>@default 'TR1'
|
|
9704
|
+
*/
|
|
9705
|
+
defaultCarouselFormat?: string;
|
|
9706
|
+
/**
|
|
9707
|
+
* Default asset format applied to timeline blocks. Used as the initial format when a block is added, whether or not `enable-asset-format-controls` is on. <br/>@default 'TR1'
|
|
9708
|
+
*/
|
|
9709
|
+
defaultTimelineFormat?: string;
|
|
9690
9710
|
/**
|
|
9691
9711
|
* Set `enable-font-family-controls` to expose the font family / style / weight pickers (and their font-size controls) in the block config sidebar. <br/>@default false
|
|
9692
9712
|
*/
|