@cntrl-site/components 1.0.79-alpha.6 → 1.0.79
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/Pretext/Pretext.d.ts +7 -0
- package/dist/Components/Pretext/PretextColumn.d.ts +1 -1
- package/dist/Components/Pretext/imageUtils.d.ts +10 -0
- package/dist/Components/Pretext/textLayout.d.ts +5 -0
- package/dist/Components/props.d.ts +0 -10
- package/dist/Components/utils/index.d.ts +0 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.js +109 -2890
- package/dist/index.mjs +10277 -14744
- package/dist/readTestimonialTextMeasure-B1FI-93F.mjs +60 -0
- package/dist/readTestimonialTextMeasure-CB_Uq-fO.js +1 -0
- package/dist/types/Component.d.ts +1 -4
- package/dist/types/SchemaV1.d.ts +0 -13
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +8 -12
- package/package.json +1 -1
- package/dist/Components/Burger/Burger.d.ts +0 -139
- package/dist/Components/Burger/BurgerComponent.d.ts +0 -828
- package/dist/Components/utils/panelAvailability.d.ts +0 -13
- package/dist/panelAvailability-CgSic84c.mjs +0 -126
- package/dist/panelAvailability-D8c7cdbu.js +0 -1
|
@@ -38,6 +38,8 @@ export type PretextSettings = {
|
|
|
38
38
|
shapeMode?: 'A' | 'B';
|
|
39
39
|
overflowMode?: 'clip' | 'visible';
|
|
40
40
|
fitText?: 'on' | 'off';
|
|
41
|
+
hyphenate?: 'on' | 'off';
|
|
42
|
+
padding?: number;
|
|
41
43
|
dropCapLines?: number;
|
|
42
44
|
dropCapSize?: number;
|
|
43
45
|
image?: string | null;
|
|
@@ -157,6 +159,8 @@ export type SnapGuide = {
|
|
|
157
159
|
export type ColumnMetrics = {
|
|
158
160
|
widths: number[];
|
|
159
161
|
spaceWidth: number;
|
|
162
|
+
dashWidth: number;
|
|
163
|
+
charWidths: (number[] | undefined)[];
|
|
160
164
|
lineHeight: number;
|
|
161
165
|
capWidth: number;
|
|
162
166
|
dropCapFontSize: number;
|
|
@@ -175,6 +179,9 @@ export type ColumnProps = {
|
|
|
175
179
|
fitEnabled: boolean;
|
|
176
180
|
scale: number;
|
|
177
181
|
onFitScale: (scale: number) => void;
|
|
182
|
+
padding: string;
|
|
183
|
+
hyphenate: boolean;
|
|
184
|
+
showOverflowIndicator: boolean;
|
|
178
185
|
dropCapLines: number;
|
|
179
186
|
dropCapSize: number;
|
|
180
187
|
showGuides: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ColumnProps } from './Pretext';
|
|
2
|
-
export declare function PretextColumn({ P, item, shape, customPath, pathFit, viewBox, mode, align, allowOverflow, fitEnabled, scale, onFitScale, dropCapLines, dropCapSize, showGuides, typography, imageUrl, imageFocalX, imageFocalY, imageScale, imageCustomPath, pathDragActive, pathCarryImage, onCarryImageConsumed, pathEditor, imageEditor, }: ColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function PretextColumn({ P, item, shape, customPath, pathFit, viewBox, mode, align, allowOverflow, fitEnabled, scale, onFitScale, padding, hyphenate, showOverflowIndicator, dropCapLines, dropCapSize, showGuides, typography, imageUrl, imageFocalX, imageFocalY, imageScale, imageCustomPath, pathDragActive, pathCarryImage, onCarryImageConsumed, pathEditor, imageEditor, }: ColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,6 +29,16 @@ export declare const imageOffsetFromFocal: (boundsSize: number, renderedSize: nu
|
|
|
29
29
|
export declare const focalFromImageOffset: (boundsSize: number, renderedSize: number, offset: number, options?: {
|
|
30
30
|
clamp?: boolean;
|
|
31
31
|
}) => number;
|
|
32
|
+
export declare const capScaleToMaxSize: (bounds: {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}, natural: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}, scale: number, maxSize: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
}) => number;
|
|
32
42
|
export declare const preserveImageTransformAcrossBoundsChange: (prevBounds: {
|
|
33
43
|
x: number;
|
|
34
44
|
y: number;
|
|
@@ -26,6 +26,7 @@ export type LayoutResult = {
|
|
|
26
26
|
height: number;
|
|
27
27
|
capLeft: number;
|
|
28
28
|
capTop: number;
|
|
29
|
+
renderTokens: Token[];
|
|
29
30
|
};
|
|
30
31
|
export type LayoutParams = {
|
|
31
32
|
tokens: Token[];
|
|
@@ -41,5 +42,9 @@ export type LayoutParams = {
|
|
|
41
42
|
allowOverflow: boolean;
|
|
42
43
|
capInset: number;
|
|
43
44
|
capLines: number;
|
|
45
|
+
hyphenate?: boolean;
|
|
46
|
+
charWidths?: (number[] | undefined)[];
|
|
47
|
+
hyphenWidth?: number;
|
|
48
|
+
shapeMargin?: number;
|
|
44
49
|
};
|
|
45
50
|
export declare function layoutText(params: LayoutParams): LayoutResult;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
export type CommonComponentProps = {
|
|
2
2
|
metadata?: Record<string, any>;
|
|
3
|
-
/**
|
|
4
|
-
* Editor-controlled visual state, matching a `statePanels` id when set.
|
|
5
|
-
* Omitted on the published site unless a wrapper needs to pin a state.
|
|
6
|
-
*/
|
|
7
|
-
currentState?: string | null;
|
|
8
|
-
/**
|
|
9
|
-
* State panel ids that must not become the visual state.
|
|
10
|
-
* Derived from schema `availableWhen` and the current host context.
|
|
11
|
-
*/
|
|
12
|
-
unavailableStates?: string[];
|
|
13
3
|
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export { scalingValue } from './scalingValue';
|
|
2
2
|
export { buildColorVars } from './buildColorVars';
|
|
3
|
-
export { getColorAlpha } from './getColorAlpha';
|
|
4
3
|
export { getFormFieldValidationError, isValidEmailFormat, isValidPhoneFormat, } from './formFieldValidation';
|
|
5
4
|
export type { ValidatableFormField } from './formFieldValidation';
|
|
6
5
|
export { useScopedStyles } from './useScopedStyles';
|
|
7
6
|
export type { ScopedStyles } from './useScopedStyles';
|
|
8
7
|
export type { CommonComponentProps } from '../props';
|
|
9
8
|
export { readTestimonialTextMeasure } from './readTestimonialTextMeasure';
|
|
10
|
-
export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './panelAvailability';
|
|
11
|
-
export type { PanelAvailabilityContext } from './panelAvailability';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { type Breakpoint, type Component, type ComponentDefaultSize, type
|
|
2
|
-
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel,
|
|
1
|
+
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
2
|
+
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaDisplay } from './types/SchemaV1';
|
|
3
3
|
export { components } from './Components/components';
|
|
4
|
-
export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './Components/utils/panelAvailability';
|
|
5
|
-
export type { PanelAvailabilityContext } from './Components/utils/panelAvailability';
|