@orangelogic/design-system 4.2.0 → 4.3.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/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
- package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.C5Ue4EGP.js} +37 -36
- package/library/chunks/{button.D1YIxtv-.js → button.DbAUlIXG.js} +3 -3
- package/library/chunks/button.styles.D3GdfF7I.js +5 -0
- package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.B10yWbVM.js} +3279 -2903
- package/library/chunks/color.CIHdfM_a.js +187 -0
- package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Cd4HM5-B.js} +4 -4
- package/library/chunks/content-builder.CBBdfVOl.js +55 -0
- package/library/chunks/{dialog.BbQ4Du0M.js → dialog.CXphbq8N.js} +2 -2
- package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.B_ESlazf.js} +10 -9
- package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
- package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CzT-MZmt.js} +1 -1
- package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.BWeanVkA.js} +5 -5
- package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
- package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
- package/library/chunks/{header.BioJzPlg.js → header.Dy57RuQW.js} +132 -90
- package/library/chunks/{i18n.rtxrs1c1.js → i18n.Q5_2aVLU.js} +93 -12
- package/library/chunks/{icon-button.CbUddcgI.js → icon-button.BjAbCuH8.js} +1 -1
- package/library/chunks/{iframe.y7iCAVZP.js → iframe.CdktjPCB.js} +1 -1
- package/library/chunks/{image.A2hE1WoV.js → image.CCo__54F.js} +322 -222
- package/library/chunks/index.DiZGZkHv.js +1126 -0
- package/library/chunks/{input.D1FFprPl.js → input.ftEf4GS6.js} +3 -3
- package/library/chunks/{markdown.Dd_GFJK8.js → markdown.RljldBNb.js} +3 -3
- package/library/chunks/{menu-item.CbqZ66to.js → menu-item.BNs1Ji48.js} +1 -1
- package/library/chunks/{option.CkhHTlpl.js → option.C8IEnv5Q.js} +1 -1
- package/library/chunks/{pagination.BlQRt932.js → pagination.Bke9vgl4.js} +6 -6
- package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
- package/library/chunks/responsive.BmBJSzC4.js +17 -0
- package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
- package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DZ32f41G.js} +312 -310
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Dm-pK2ft.js +352 -0
- package/library/chunks/{tree.B7IKBX3n.js → tree.Umn7TAkc.js} +1 -1
- package/library/chunks/{types.MwUT4xFk.js → types.BW36Gr9c.js} +77051 -54471
- package/library/chunks/typography.BLYdTF0n.js +102 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +161 -159
- package/library/components/audio.js +3 -3
- package/library/components/bicolor-picker.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/box.d.ts +3 -0
- package/library/components/box.js +22 -0
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/card.js +7 -7
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +36 -32
- package/library/components/color-swatch-group.js +8 -7
- package/library/components/color-swatch.js +246 -22
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +19 -19
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +95 -92
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +12 -12
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +6 -3
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +4 -3
- package/library/components/input-group.js +1 -1
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +4 -4
- package/library/components/masonry.js +70 -56
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +4 -4
- package/library/components/mutation-observer.js +25 -23
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +2 -2
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/range.js +3 -3
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +6 -6
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +16 -16
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +3 -3
- package/library/components/types.js +496 -487
- package/library/components/typography.js +3 -2
- package/library/components/video.js +4231 -4210
- package/library/css/ol-base.css +1 -0
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/box/box.d.ts +26 -0
- package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
- package/library/packages/atoms/src/components/button/button.d.ts +4 -0
- package/library/packages/atoms/src/components/card/card.d.ts +1 -0
- package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
- package/library/packages/atoms/src/components/details/details.d.ts +6 -1
- package/library/packages/atoms/src/components/header/header.d.ts +38 -2
- package/library/packages/atoms/src/components/image/image.d.ts +14 -0
- package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
- package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
- package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
- package/library/packages/atoms/src/components/video/video.d.ts +18 -0
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
- package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
- package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
- package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/index.d.ts +0 -1
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
- package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +22 -6
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
- package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +155 -13
- package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
- package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
- package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
- package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
- package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +9 -5
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +170 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
- package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
- package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/asset-link-format.d.ts +0 -1
- package/library/packages/types/src/button.d.ts +1 -1
- package/library/packages/types/src/color-swatch-group.d.ts +56 -0
- package/library/packages/types/src/color-swatch.d.ts +22 -0
- package/library/packages/types/src/column.d.ts +13 -0
- package/library/packages/types/src/content-builder.d.ts +69 -4
- package/library/packages/types/src/details-group.d.ts +80 -0
- package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
- package/library/packages/types/src/font-kit.d.ts +19 -0
- package/library/packages/types/src/font-picker.d.ts +2 -0
- package/library/packages/types/src/gallery-item.d.ts +3 -1
- package/library/packages/types/src/gallery.d.ts +2 -1
- package/library/packages/types/src/index.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/types/src/position-picker.d.ts +6 -0
- package/library/packages/types/src/sb-button.d.ts +7 -0
- package/library/packages/types/src/search-box.d.ts +4 -0
- package/library/packages/utils/src/color/color.d.ts +27 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +85 -0
- package/library/packages/utils/src/font/font.d.ts +12 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
- package/library/react-web-component.d.ts +510 -156
- package/library/utils.js +415 -395
- package/package.json +1 -1
- package/library/chunks/button.styles.BWgHrfLD.js +0 -5
- package/library/chunks/color-swatch.DdsUysbF.js +0 -223
- package/library/chunks/color.LzSGBy7o.js +0 -164
- package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
- package/library/chunks/index.BO_sT6SH.js +0 -20123
- package/library/chunks/toast.BOkYwUIj.js +0 -109
- package/library/chunks/transformation.B8m0Nbao.js +0 -384
- package/library/chunks/typography.T72DuoCa.js +0 -52
- package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
- /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
|
@@ -3,11 +3,16 @@ import { TemplateResult } from 'lit';
|
|
|
3
3
|
import { StyleInfo } from 'lit/directives/style-map';
|
|
4
4
|
import { DownloadDocType } from './download-format-picker';
|
|
5
5
|
import { FolderSelectApi, FolderSelectVariant } from './folder-select';
|
|
6
|
-
import { FontTypeface } from './font-picker';
|
|
6
|
+
import { FontFamily, FontTypeface } from './font-picker';
|
|
7
7
|
import { TableSelectColumn } from './table-select';
|
|
8
8
|
import { TypeSubtypeOption } from './type-subtype-select';
|
|
9
9
|
|
|
10
10
|
export declare const SPACE_DEFAULT_FONT_FAMILY = "space-default";
|
|
11
|
+
/**
|
|
12
|
+
* Font-picker option that clears the block's font so it inherits the one its
|
|
13
|
+
* container resolved — the typeface of the row a font kit cloned it into.
|
|
14
|
+
*/
|
|
15
|
+
export declare const INHERITED_FONT_FAMILY = "inherited-font";
|
|
11
16
|
export declare enum DeviceType {
|
|
12
17
|
Desktop = "desktop",
|
|
13
18
|
Mobile = "mobile",
|
|
@@ -111,6 +116,18 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
111
116
|
api: () => Promise<FontTypeface[]>;
|
|
112
117
|
/** Block-attribute key that stores the selected font family value. */
|
|
113
118
|
familyKey: string;
|
|
119
|
+
/**
|
|
120
|
+
* Style options the inherit option offers: the variants its container
|
|
121
|
+
* resolves, so the picker can never name a face the container never
|
|
122
|
+
* renders.
|
|
123
|
+
*/
|
|
124
|
+
inheritedFamilies?: FontFamily[];
|
|
125
|
+
/**
|
|
126
|
+
* Label of an extra first option that clears the font so the block
|
|
127
|
+
* inherits its container's. Absent hides the option, and with it the
|
|
128
|
+
* container-aware writing of the space-default option.
|
|
129
|
+
*/
|
|
130
|
+
inheritedOptionLabel?: string;
|
|
114
131
|
/** Block-attribute key that stores the selected font style value. */
|
|
115
132
|
styleKey: string;
|
|
116
133
|
/** Block-attribute key that stores the selected font weight value. */
|
|
@@ -146,8 +163,11 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
146
163
|
};
|
|
147
164
|
/**
|
|
148
165
|
* Return validation message if invalid, otherwise return empty string.
|
|
166
|
+
*
|
|
167
|
+
* `siblings` holds the list's other rows inside a list editor's dialog, so
|
|
168
|
+
* a value can be rejected as a duplicate. Empty everywhere else.
|
|
149
169
|
*/
|
|
150
|
-
validation?: (record: Record<string, unknown
|
|
170
|
+
validation?: (record: Record<string, unknown>, siblings?: Array<Record<string, unknown>>) => string;
|
|
151
171
|
};
|
|
152
172
|
itemsPerRow?: number;
|
|
153
173
|
listEditorConfigs?: {
|
|
@@ -157,7 +177,7 @@ export type PropertyConfig<T = Record<string, any>> = Omit<TraitProperties, 'opt
|
|
|
157
177
|
displayField?: string;
|
|
158
178
|
editDialogLabel: string;
|
|
159
179
|
noHeader?: boolean;
|
|
160
|
-
sampleItem: Record<string,
|
|
180
|
+
sampleItem: Record<string, unknown>;
|
|
161
181
|
};
|
|
162
182
|
mask?: string;
|
|
163
183
|
maskBlocks?: Record<string, unknown>;
|
|
@@ -288,7 +308,13 @@ export type TeamSpaceFontFamily = {
|
|
|
288
308
|
fontFamily: string;
|
|
289
309
|
fontFilesURLs: string[];
|
|
290
310
|
};
|
|
311
|
+
export type RteMetafieldOption = {
|
|
312
|
+
helpText?: string;
|
|
313
|
+
label: string;
|
|
314
|
+
token: string;
|
|
315
|
+
};
|
|
291
316
|
export type RTE_CONFIG = {
|
|
317
|
+
alwaysShowBubbleMenu?: boolean;
|
|
292
318
|
basicFormat?: boolean;
|
|
293
319
|
blockFormatting?: boolean;
|
|
294
320
|
enableAll?: boolean;
|
|
@@ -298,6 +324,7 @@ export type RTE_CONFIG = {
|
|
|
298
324
|
highlight?: boolean;
|
|
299
325
|
lineHeight?: boolean;
|
|
300
326
|
link?: boolean;
|
|
327
|
+
metafield?: RteMetafieldOption[];
|
|
301
328
|
styles?: {
|
|
302
329
|
singleRow?: boolean;
|
|
303
330
|
};
|
|
@@ -334,6 +361,7 @@ export declare enum BlockType {
|
|
|
334
361
|
Divider = "BlockDivider",
|
|
335
362
|
DocumentViewer = "BlockDocumentViewer",
|
|
336
363
|
FontKit = "BlockFontKit",
|
|
364
|
+
FontKitAdvanced = "BlockFontKitAdvanced",
|
|
337
365
|
Gallery = "BlockGallery",
|
|
338
366
|
Header = "BlockHeader",
|
|
339
367
|
Image = "BlockImage",
|
|
@@ -344,7 +372,7 @@ export declare enum BlockType {
|
|
|
344
372
|
Timeline = "BlockTimeline",
|
|
345
373
|
Video = "BlockVideo"
|
|
346
374
|
}
|
|
347
|
-
export declare const BLOCK_DROPPABLE_BLOCKS: (BlockType.Accordion | BlockType.Analytics | BlockType.Audio | BlockType.Button | BlockType.Carousel | BlockType.ColorSwatches | BlockType.ColumnGroup | BlockType.DamView | BlockType.Divider | BlockType.DocumentViewer | BlockType.FontKit | BlockType.Gallery | BlockType.Header | BlockType.Image | BlockType.RichText | BlockType.SearchBox | BlockType.TabGroup | BlockType.Text | BlockType.Timeline | BlockType.Video)[];
|
|
375
|
+
export declare const BLOCK_DROPPABLE_BLOCKS: (BlockType.Accordion | BlockType.Analytics | BlockType.Audio | BlockType.Button | BlockType.Carousel | BlockType.ColorSwatches | BlockType.ColumnGroup | BlockType.DamView | BlockType.Divider | BlockType.DocumentViewer | BlockType.FontKit | BlockType.FontKitAdvanced | BlockType.Gallery | BlockType.Header | BlockType.Image | BlockType.RichText | BlockType.SearchBox | BlockType.TabGroup | BlockType.Text | BlockType.Timeline | BlockType.Video)[];
|
|
348
376
|
export declare enum DialogType {
|
|
349
377
|
Carousel = "carousel",
|
|
350
378
|
Gallery = "gallery"
|
|
@@ -374,4 +402,41 @@ export declare enum DataSourceId {
|
|
|
374
402
|
export type ConfigsOptions = {
|
|
375
403
|
enableAssetFormatControls?: boolean;
|
|
376
404
|
enableFontFamilyControls?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Variants of the font the block's container resolves for it — a font kit's
|
|
407
|
+
* rows. Present means the block sits inside such a container, so its font
|
|
408
|
+
* picker offers an option to inherit that font, offering these as its
|
|
409
|
+
* styles, and writes every other option explicitly.
|
|
410
|
+
*/
|
|
411
|
+
containerFontVariants?: FontFamily[];
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* Well-known editable sections of a content-builder canvas. The page content is the implicit
|
|
415
|
+
* section every builder has (`container-selector` / `initial-data`); the hero is the CMS5 masthead
|
|
416
|
+
* (L-429UPF) rendered above it in the same canvas document.
|
|
417
|
+
*/
|
|
418
|
+
export declare enum ContentBuilderSectionId {
|
|
419
|
+
Hero = "hero",
|
|
420
|
+
PageContent = "page-content"
|
|
421
|
+
}
|
|
422
|
+
/** grapesjs component type of the node the builder owns inside each section's host container. */
|
|
423
|
+
export declare const CONTENT_BUILDER_SECTION_FRAGMENT_TYPE = "SectionFragment";
|
|
424
|
+
/** Attribute stamped on a section fragment element so the host page and the CSS can address it. */
|
|
425
|
+
export declare const CONTENT_BUILDER_SECTION_ATTRIBUTE = "data-content-builder-section";
|
|
426
|
+
/**
|
|
427
|
+
* One editable region of the canvas document. `containerSelector` locates the host container in
|
|
428
|
+
* the canvas page; the builder mounts its own fragment node inside it and edits that node's tree.
|
|
429
|
+
*/
|
|
430
|
+
export type ContentBuilderSection = {
|
|
431
|
+
/** CSS selector of the host container inside the canvas document. */
|
|
432
|
+
containerSelector: string;
|
|
433
|
+
/** Stable identifier used to read the section back through `getSectionContent(id)`. */
|
|
434
|
+
id: string;
|
|
435
|
+
/** Serialized grapesjs project data the section is initialised from. Empty = start blank. */
|
|
436
|
+
initialData?: string;
|
|
437
|
+
};
|
|
438
|
+
/** Persisted shape of one section: the same `{ html, json }` pair the page content has always used. */
|
|
439
|
+
export type ContentBuilderSectionContent = {
|
|
440
|
+
html: string;
|
|
441
|
+
json: string;
|
|
377
442
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IconPickerValue } from './icon-picker';
|
|
2
|
+
import { ObjectFit } from './index';
|
|
3
|
+
import { PositionPickerValue } from './position-picker';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Default accordion icons. Right when closed, down when open — the direction `cx-details`
|
|
7
|
+
* used to get by rotating one chevron. Naming both states lets the editor show what renders.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_EXPAND_ICON: IconPickerValue;
|
|
10
|
+
/** @see DEFAULT_EXPAND_ICON */
|
|
11
|
+
export declare const DEFAULT_COLLAPSE_ICON: IconPickerValue;
|
|
12
|
+
/**
|
|
13
|
+
* One accordion section.
|
|
14
|
+
*
|
|
15
|
+
* Beyond the label, a section may carry its own look. Those overrides are stored under the
|
|
16
|
+
* same CSS custom property names `cx-details` exposes, so `cx-details-group` can pass them
|
|
17
|
+
* straight through as a style map. They apply only while `customStyle` is on.
|
|
18
|
+
*
|
|
19
|
+
* Keys are alphabetical to satisfy the workspace sort rule, so the state groups
|
|
20
|
+
* (default / hover / open) read interleaved rather than grouped.
|
|
21
|
+
*/
|
|
22
|
+
export type DetailsItem = {
|
|
23
|
+
[key: `label-${string}`]: string;
|
|
24
|
+
/** Width of the icon shown while the section is open. The height scales with it. */
|
|
25
|
+
'--collapse-icon-width'?: string;
|
|
26
|
+
/** Width of the icon shown while the section is closed. The height scales with it. */
|
|
27
|
+
'--expand-icon-width'?: string;
|
|
28
|
+
/** Header background color while the section is open. */
|
|
29
|
+
'--header-active-background-color'?: string;
|
|
30
|
+
/** Header border while the section is open, as a `<color> <width>` pair. */
|
|
31
|
+
'--header-active-border'?: string;
|
|
32
|
+
/** Header text and icon color while the section is open. */
|
|
33
|
+
'--header-active-color'?: string;
|
|
34
|
+
/** Header background color in the default, closed state. */
|
|
35
|
+
'--header-background-color'?: string;
|
|
36
|
+
/** Header border in the default, closed state, as a `<color> <width>` pair. */
|
|
37
|
+
'--header-border'?: string;
|
|
38
|
+
/** Header text and icon color in the default, closed state. */
|
|
39
|
+
'--header-color'?: string;
|
|
40
|
+
/** Header background color while hovering a closed section. */
|
|
41
|
+
'--header-hover-background-color'?: string;
|
|
42
|
+
/** Header border while hovering a closed section. */
|
|
43
|
+
'--header-hover-border'?: string;
|
|
44
|
+
/** Header text and icon color while hovering a closed section. */
|
|
45
|
+
'--header-hover-color'?: string;
|
|
46
|
+
/** Width of the icon shown while hovering a closed section. The height scales with it. */
|
|
47
|
+
'--hover-icon-width'?: string;
|
|
48
|
+
/** Header background image source: the delivery URL the picker resolved for `backgroundFormat`. */
|
|
49
|
+
background?: string;
|
|
50
|
+
/** Which part of the background image to keep in view. */
|
|
51
|
+
backgroundCropFocus?: PositionPickerValue;
|
|
52
|
+
/** The proxy the background image is served under. Holds a resolved proxy even under `Auto`. */
|
|
53
|
+
backgroundFormat?: string;
|
|
54
|
+
/** Whether `backgroundFormat` was picked by hand. `false` (the default) means `Auto`. */
|
|
55
|
+
backgroundManualFormat?: boolean;
|
|
56
|
+
/** How the background image fills the header. */
|
|
57
|
+
backgroundObjectFit?: ObjectFit;
|
|
58
|
+
/** Asset id of the background image, kept off the shared `recordId` key. */
|
|
59
|
+
backgroundRecordId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Backend transformations for the background image, as the JSON string the control
|
|
62
|
+
* writes — not an array. Unlike a block attribute, a section field has no converter to
|
|
63
|
+
* parse it, so it keeps the shape it was saved in.
|
|
64
|
+
*
|
|
65
|
+
* The section's control hides crop, resize and rotate, but quality and metadata have no
|
|
66
|
+
* such flag and are always offered — so this does carry entries, and the string `'[]'`
|
|
67
|
+
* has a length of two, which is not the same as an empty list.
|
|
68
|
+
*/
|
|
69
|
+
backgroundTransformations?: string;
|
|
70
|
+
/** Icon shown while the section is open. Falls back to the group's icon. */
|
|
71
|
+
'collapse-icon'?: IconPickerValue | null;
|
|
72
|
+
/** Turns the overrides above on. Without it the group's own look is used. */
|
|
73
|
+
customStyle?: boolean;
|
|
74
|
+
/** Icon shown while the section is closed. Falls back to the group's icon. */
|
|
75
|
+
'expand-icon'?: IconPickerValue | null;
|
|
76
|
+
/** Icon shown while hovering a closed section. Falls back to the group's icon. */
|
|
77
|
+
'hover-icon'?: IconPickerValue | null;
|
|
78
|
+
id: string;
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The origin of the font kit's typefaces.
|
|
3
|
+
* Default loads the font family from the teamspace; Custom loads it from
|
|
4
|
+
* uploaded font files. Values match the `origin` attribute strings used by
|
|
5
|
+
* `cx-font-kit` so both blocks share the same config semantics.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum FontKitOrigin {
|
|
8
|
+
Custom = "custom",
|
|
9
|
+
Default = "default"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Tokens that can be written inside the editable row of `cx-font-kit-advanced`
|
|
13
|
+
* (as `${token}`) and are resolved per font variant in the cloned rows.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum FontKitAdvancedToken {
|
|
16
|
+
/** The variant's source file format (e.g. `OTF`, `TTF`). */
|
|
17
|
+
FileFormat = "format",
|
|
18
|
+
/** The variant's font family name. */
|
|
19
|
+
FontFamily = "family",
|
|
20
|
+
/** The variant's font style (e.g. `normal`, `italic`, `Bold Italic`). */
|
|
21
|
+
Style = "style",
|
|
22
|
+
/** The variant's weight as a readable name (e.g. `Light`, `Regular`, `Bold`). */
|
|
23
|
+
Weight = "weight",
|
|
24
|
+
/** The variant's numeric weight (e.g. `300`, `400`, `700`). */
|
|
25
|
+
WeightNumber = "weight_n",
|
|
26
|
+
/** The variant's width (e.g. `Condensed`, `Normal`, `Expanded`). */
|
|
27
|
+
Width = "width"
|
|
28
|
+
}
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The outline format a font file carries, read from its sfnt signature: an
|
|
3
|
+
* `OTTO` file carries CFF outlines and ships as OTF, the TrueType signatures
|
|
4
|
+
* carry glyf outlines and ship as TTF.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum FontOutlinesFormat {
|
|
7
|
+
Cff = "cff",
|
|
8
|
+
TrueType = "truetype"
|
|
9
|
+
}
|
|
1
10
|
export type Typeface = {
|
|
2
11
|
fontFamily: string;
|
|
12
|
+
/**
|
|
13
|
+
* Outline format of the variant's source file. Absent for variants resolved
|
|
14
|
+
* without a file (system fonts, Google fonts).
|
|
15
|
+
*/
|
|
16
|
+
fontOutlinesFormat?: FontOutlinesFormat;
|
|
3
17
|
fontStyle: string;
|
|
4
18
|
fontWeight: string;
|
|
19
|
+
/**
|
|
20
|
+
* The source file's OS/2 `usWidthClass` (1-9, 5 = normal). Absent for
|
|
21
|
+
* variants resolved without a file.
|
|
22
|
+
*/
|
|
23
|
+
fontWidthClass?: number;
|
|
5
24
|
src: string;
|
|
6
25
|
};
|
|
7
26
|
export declare enum DownloadMode {
|
|
@@ -10,6 +10,8 @@ export interface FontFamily {
|
|
|
10
10
|
value?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface FontTypeface {
|
|
13
|
+
/** Replaces the "Default" label in the style select for this typeface. */
|
|
14
|
+
defaultStyleLabel?: string;
|
|
13
15
|
families: FontFamily[];
|
|
14
16
|
typeface: string;
|
|
15
17
|
/** CSS-safe identifier with no spaces. Derived from typeface if omitted. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectFit } from './index.ts';
|
|
1
|
+
import { ObjectFit, PositionPickerValue } from './index.ts';
|
|
2
2
|
import { MediaType } from './asset-link-format';
|
|
3
3
|
|
|
4
4
|
export { HighlightableElementEffect as GalleryItemEffect, HighlightableElementTextRevealStyle as GalleryItemTextRevealStyle, HighlightableElementZoomStyle as GalleryItemZoomStyle, HighlightableElementContentPosition as GalleryItemContentPosition, } from './highlightable-element';
|
|
@@ -21,8 +21,10 @@ export declare enum GalleryItemShowContentType {
|
|
|
21
21
|
export type GalleryItem = {
|
|
22
22
|
additions?: string[];
|
|
23
23
|
alt?: string;
|
|
24
|
+
backgroundColor?: string;
|
|
24
25
|
cardType?: GalleryItemCardType;
|
|
25
26
|
className?: string;
|
|
27
|
+
cropFocus?: PositionPickerValue;
|
|
26
28
|
details?: string;
|
|
27
29
|
docType?: MediaType | '';
|
|
28
30
|
extension?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectFit } from '.';
|
|
1
|
+
import { ObjectFit, PositionPickerValue } from '.';
|
|
2
2
|
|
|
3
3
|
export declare enum GalleryLayout {
|
|
4
4
|
Automatic = "automatic",
|
|
@@ -27,6 +27,7 @@ export declare enum ContentType {
|
|
|
27
27
|
Custom = "custom"
|
|
28
28
|
}
|
|
29
29
|
export type GalleryRecord = {
|
|
30
|
+
cropFocus?: PositionPickerValue;
|
|
30
31
|
id: string;
|
|
31
32
|
objectFit: ObjectFit;
|
|
32
33
|
rawId?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type FakeString = string & Record<string, never>;
|
|
2
2
|
export type EnumOrString<T> = T | FakeString;
|
|
3
3
|
export * from './icon-picker';
|
|
4
|
+
export * from './position-picker';
|
|
4
5
|
export type BaseVariant = 'primary' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
5
6
|
export declare enum ObjectFit {
|
|
6
7
|
Contain = "contain",
|
|
@@ -9,3 +9,9 @@ export declare enum PositionPickerValue {
|
|
|
9
9
|
TopLeft = "top-left",
|
|
10
10
|
TopRight = "top-right"
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Maps each `PositionPickerValue` to the equivalent CSS `object-position`/
|
|
14
|
+
* `background-position` keyword pair, for components that position an
|
|
15
|
+
* image/video within its container based on a crop-focus value.
|
|
16
|
+
*/
|
|
17
|
+
export declare const OBJECT_POSITION_BY_CROP_FOCUS: Record<PositionPickerValue, string>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CxColorSwatchCodeSeparator, CxColorSwatchHexFormat } from '../../../types/src/color-swatch';
|
|
2
|
+
|
|
1
3
|
type ColorExtract = {
|
|
2
4
|
blue?: number;
|
|
3
5
|
c?: number;
|
|
@@ -47,9 +49,15 @@ export declare function luminanceTextColor(backgroundColor: string, textColor?:
|
|
|
47
49
|
/**
|
|
48
50
|
* Extracts light and dark color values from a CSS light-dark() function.
|
|
49
51
|
* Handles nested parentheses for color formats like rgb(), hsl(), etc.
|
|
50
|
-
*
|
|
52
|
+
*
|
|
53
|
+
* A bare color is read as that color for both schemes, since that is what it means. This
|
|
54
|
+
* also matters in practice: the CSS minifier rewrites `light-dark(a, a)` to just `a`
|
|
55
|
+
* (matching on computed color, so no notation avoids it), so a default authored as a
|
|
56
|
+
* matched pair reaches a color control as a single value.
|
|
57
|
+
* @param value - String containing light-dark(), e.g. "light-dark(#000, #fff)" or "light-dark(rgb(0,0,0), rgb(255,255,255))", or a bare color
|
|
51
58
|
* @returns Space-separated light and dark colors, or empty string if invalid
|
|
52
59
|
* @example parseLightDark("light-dark(#000, #fff)") => "#000 #fff"
|
|
60
|
+
* @example parseLightDark("#000") => "#000 #000"
|
|
53
61
|
*/
|
|
54
62
|
export declare function parseLightDark(value: string): string;
|
|
55
63
|
/**
|
|
@@ -61,10 +69,14 @@ export declare function parseLightDark(value: string): string;
|
|
|
61
69
|
*/
|
|
62
70
|
export declare function getLightDarkCssString(light: string, dark: string): string;
|
|
63
71
|
/**
|
|
64
|
-
* Parses a border value
|
|
65
|
-
*
|
|
72
|
+
* Parses a border value into space-separated color and size parts.
|
|
73
|
+
*
|
|
74
|
+
* Accepts both `light-dark(<light>, <dark>) <rest>` and `<color> <rest>`; the latter turns up
|
|
75
|
+
* because the CSS minifier collapses `light-dark(a, a)` to `a`. See `parseLightDark`.
|
|
76
|
+
* @param value - Border value, e.g. "light-dark(#000, #fff) 0px" or "#000 0px"
|
|
66
77
|
* @returns Space-separated string of light color, dark color, and size, or null if invalid
|
|
67
78
|
* @example parseBorder("light-dark(#000, #fff) 0px") => "#000 #fff 0px"
|
|
79
|
+
* @example parseBorder("#000 0px") => "#000 #000 0px"
|
|
68
80
|
*/
|
|
69
81
|
export declare function parseBorder(value: string): string | null;
|
|
70
82
|
/**
|
|
@@ -74,4 +86,16 @@ export declare function parseBorder(value: string): string | null;
|
|
|
74
86
|
* @example parseShadow("0px 0px 0px 0px light-dark(#000, #fff)") => "0px 0px 0px 0px #000 #fff"
|
|
75
87
|
*/
|
|
76
88
|
export declare function parseShadow(value: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Re-joins the parts of a comma-separated numeric code (RGB, CMYK) with the
|
|
91
|
+
* requested separator. Values that are not a multi-part list are returned
|
|
92
|
+
* untouched, so a free-text code is never mangled.
|
|
93
|
+
*/
|
|
94
|
+
export declare function formatColorCodeSeparator(value: string, separator: CxColorSwatchCodeSeparator): string;
|
|
95
|
+
/**
|
|
96
|
+
* Rewrites the prefix on a hex code — `#`, `0x`, or none — leaving an empty
|
|
97
|
+
* value alone. Any existing prefix is stripped first, so a code that already
|
|
98
|
+
* carries one can be re-formatted without stacking prefixes.
|
|
99
|
+
*/
|
|
100
|
+
export declare function formatHexCode(value: string, format: CxColorSwatchHexFormat): string;
|
|
77
101
|
export {};
|