@cntrl-site/components 1.0.77 → 1.0.79-alpha.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/dist/Components/Burger/Burger.d.ts +131 -0
- package/dist/Components/Burger/BurgerComponent.d.ts +806 -0
- package/dist/Components/Pretext/Pretext.d.ts +2 -0
- package/dist/Components/Pretext/vecContours.d.ts +2 -0
- package/dist/Components/props.d.ts +10 -0
- package/dist/Components/utils/index.d.ts +3 -0
- package/dist/Components/utils/panelAvailability.d.ts +13 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2816 -87
- package/dist/index.mjs +14050 -9447
- package/dist/panelAvailability-CgSic84c.mjs +126 -0
- package/dist/panelAvailability-D8c7cdbu.js +1 -0
- package/dist/types/Component.d.ts +1 -1
- package/dist/types/SchemaV1.d.ts +13 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +12 -8
- package/package.json +1 -1
- package/dist/readTestimonialTextMeasure-B1FI-93F.mjs +0 -60
- package/dist/readTestimonialTextMeasure-CB_Uq-fO.js +0 -1
|
@@ -21,6 +21,7 @@ export declare function mapContours(contours: VecContour[], transform: (point: P
|
|
|
21
21
|
export declare function scaleContours(contours: VecContour[], origin: Pt, scaleX: number, scaleY?: number): VecContour[];
|
|
22
22
|
export declare function parsePathNodes(d: string): VecContour[];
|
|
23
23
|
export declare function nodeHasCurveHandles(node: VecNode): boolean;
|
|
24
|
+
export declare function segmentIsStraight(from: VecNode, to: VecNode): boolean;
|
|
24
25
|
export declare function serializeContours(contours: VecContour[]): string;
|
|
25
26
|
export declare function flattenContours(contours: VecContour[]): Ring[];
|
|
26
27
|
export declare function contoursBBox(contours: VecContour[]): {
|
|
@@ -65,6 +66,7 @@ export declare function nearestSegmentHit(contours: VecContour[], point: Pt): {
|
|
|
65
66
|
segment: number;
|
|
66
67
|
t: number;
|
|
67
68
|
distance: number;
|
|
69
|
+
point: Pt;
|
|
68
70
|
} | null;
|
|
69
71
|
export declare function collectSnapTargets(contours: VecContour[], exclude: {
|
|
70
72
|
contour: number;
|
|
@@ -1,3 +1,13 @@
|
|
|
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[];
|
|
3
13
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { scalingValue } from './scalingValue';
|
|
2
2
|
export { buildColorVars } from './buildColorVars';
|
|
3
|
+
export { getColorAlpha } from './getColorAlpha';
|
|
3
4
|
export { getFormFieldValidationError, isValidEmailFormat, isValidPhoneFormat, } from './formFieldValidation';
|
|
4
5
|
export type { ValidatableFormField } from './formFieldValidation';
|
|
5
6
|
export { useScopedStyles } from './useScopedStyles';
|
|
6
7
|
export type { ScopedStyles } from './useScopedStyles';
|
|
7
8
|
export type { CommonComponentProps } from '../props';
|
|
8
9
|
export { readTestimonialTextMeasure } from './readTestimonialTextMeasure';
|
|
10
|
+
export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './panelAvailability';
|
|
11
|
+
export type { PanelAvailabilityContext } from './panelAvailability';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type PanelAvailabilityContext = Record<string, string | undefined>;
|
|
2
|
+
type AvailabilityPanel = {
|
|
3
|
+
id: string;
|
|
4
|
+
availableWhen?: Record<string, string[]>;
|
|
5
|
+
};
|
|
6
|
+
type AvailabilitySchema = {
|
|
7
|
+
panels?: AvailabilityPanel[];
|
|
8
|
+
statePanels?: string[] | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function isPanelAvailable(panel: AvailabilityPanel | undefined, context: PanelAvailabilityContext): boolean;
|
|
11
|
+
export declare function getAvailableStatePanels(schema: AvailabilitySchema | undefined, context: PanelAvailabilityContext): string[] | null;
|
|
12
|
+
export declare function getUnavailableStates(schema: AvailabilitySchema | undefined, context: PanelAvailabilityContext): string[];
|
|
13
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaPanelAvailability, 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';
|