@cntrl-site/components 1.0.97-4 → 1.0.97-7
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/dist/Components/Grid/Grid.d.ts +6 -0
- package/dist/Components/Grid/GridComponent.d.ts +3 -1
- package/dist/Components/Mercury/Mercury.d.ts +6 -0
- package/dist/Components/Mercury/MercuryComponent.d.ts +3 -1
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +535 -68
- package/dist/index.mjs +9944 -8973
- package/package.json +1 -1
|
@@ -77,5 +77,11 @@ type GridSettings = {
|
|
|
77
77
|
lightboxCounterLetterSpacing?: number;
|
|
78
78
|
lightboxCounterWordSpacing?: number;
|
|
79
79
|
lightboxCounterTextAppearance?: TextStyles['textAppearance'];
|
|
80
|
+
closeIcon?: string | null;
|
|
81
|
+
closeIconMaxWidth?: number;
|
|
82
|
+
closeIconColor?: string;
|
|
83
|
+
closeIconHoverColor?: string;
|
|
84
|
+
iconMarginRight?: number;
|
|
85
|
+
contentMarginTop?: number;
|
|
80
86
|
};
|
|
81
87
|
export {};
|
|
@@ -78,6 +78,12 @@ export type MercurySettings = {
|
|
|
78
78
|
lightboxCounterLetterSpacing?: number;
|
|
79
79
|
lightboxCounterWordSpacing?: number;
|
|
80
80
|
lightboxCounterTextAppearance?: TextStyles['textAppearance'];
|
|
81
|
+
closeIcon?: string | null;
|
|
82
|
+
closeIconMaxWidth?: number;
|
|
83
|
+
closeIconColor?: string;
|
|
84
|
+
closeIconHoverColor?: string;
|
|
85
|
+
iconMarginRight?: number;
|
|
86
|
+
contentMarginTop?: number;
|
|
81
87
|
};
|
|
82
88
|
type MercuryProps = {
|
|
83
89
|
settings?: MercurySettings;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentContentSchema, ContentKey } from '../types/SchemaV1';
|
|
2
|
+
/** A value of a component's content as the content panel writes it and the component reads it: plain data. */
|
|
3
|
+
export type ContentValue = string | number | boolean | ContentValue[] | {
|
|
4
|
+
[key: string]: ContentValue;
|
|
5
|
+
};
|
|
6
|
+
/** What a collection post offers a field from the entry under the field's key: its text, and its images' files. */
|
|
7
|
+
export type PostFieldEntry = {
|
|
8
|
+
text: string;
|
|
9
|
+
images: string[];
|
|
10
|
+
};
|
|
11
|
+
/** The post page a field bound to the post's link is given. */
|
|
12
|
+
export type PostFieldPage = {
|
|
13
|
+
pageId: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* How one field of a component's content takes its value from a collection post: the post key the
|
|
18
|
+
* schema binds it to, and the value the field's display holds for what the post offers.
|
|
19
|
+
*/
|
|
20
|
+
export type PostFieldBinding = {
|
|
21
|
+
fieldKey: string;
|
|
22
|
+
contentKey?: ContentKey;
|
|
23
|
+
/** The value for the entry under the field's key; a post without one offers no text and no images. */
|
|
24
|
+
fromEntry: (entry: PostFieldEntry) => ContentValue;
|
|
25
|
+
/** The value of a field bound to the post's link. */
|
|
26
|
+
toPage: (page: PostFieldPage) => ContentValue;
|
|
27
|
+
};
|
|
28
|
+
/** How each field of a component's content is filled from a collection post, in the schema's order. */
|
|
29
|
+
export declare function getPostFieldBindings(schema: ComponentContentSchema | undefined): PostFieldBinding[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentDefaultNavigationPosition, type ComponentNavigationPosition, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
2
2
|
export type { ComponentSchemaV1, ComponentContentSchema, ComponentContentSettings, ComponentContentProperty, ContentKey, ContentLink, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaPanelAvailability, SchemaDisplay } from './types/SchemaV1';
|
|
3
3
|
export { components } from './Components/components';
|
|
4
|
+
export { getPostFieldBindings } from './content/postFieldBindings';
|
|
5
|
+
export type { ContentValue, PostFieldBinding, PostFieldEntry, PostFieldPage } from './content/postFieldBindings';
|
|
4
6
|
export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './Components/utils/panelAvailability';
|
|
5
7
|
export type { PanelAvailabilityContext } from './Components/utils/panelAvailability';
|