@cntrl-site/components 1.0.71 → 1.0.73-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.
@@ -0,0 +1,262 @@
1
+ import { default as React } from 'react';
2
+ import { CommonComponentProps } from '../props';
3
+ import { TextStyles } from '../utils/textStylesToCss';
4
+ export declare const SHAPE_IDS: readonly ["diamond", "parallelogram", "vase", "circle", "shield", "bobbin", "custom"];
5
+ export type ShapeId = typeof SHAPE_IDS[number];
6
+ export type Align = 'left' | 'center' | 'right' | 'justify';
7
+ export type PathFit = 'stretch' | 'viewbox';
8
+ export type RichLeaf = {
9
+ text?: string;
10
+ fontFamily?: string;
11
+ fontWeight?: number;
12
+ fontStyle?: string;
13
+ textDecoration?: string;
14
+ textTransform?: string;
15
+ fontVariant?: string;
16
+ verticalAlign?: string;
17
+ };
18
+ export type RichLink = {
19
+ type: 'link';
20
+ value?: string;
21
+ target?: string;
22
+ children?: RichNode[];
23
+ };
24
+ export type RichNode = RichLeaf | RichLink;
25
+ export type RichBlock = {
26
+ type?: string;
27
+ children?: RichNode[];
28
+ };
29
+ export type PretextContentItem = {
30
+ text?: RichBlock[];
31
+ };
32
+ export type PretextSettings = {
33
+ shape?: ShapeId;
34
+ customPath?: string;
35
+ pathFit?: PathFit;
36
+ pathViewBox?: string;
37
+ pathSnap?: number;
38
+ shapeMode?: 'A' | 'B';
39
+ overflowMode?: 'clip' | 'visible';
40
+ fitText?: 'on' | 'off';
41
+ dropCapLines?: number;
42
+ dropCapSize?: number;
43
+ image?: string | null;
44
+ imageFocalX?: number;
45
+ imageFocalY?: number;
46
+ imageScale?: number;
47
+ backgroundColor?: string;
48
+ textColor?: string;
49
+ linkColor?: string;
50
+ textFontFamily?: string;
51
+ textFontSettings?: {
52
+ fontWeight: number;
53
+ fontStyle: string;
54
+ };
55
+ textFontSize?: number;
56
+ textLineHeight?: number;
57
+ textLetterSpacing?: number;
58
+ textWordSpacing?: number;
59
+ textAlign?: Align;
60
+ textTextAppearance?: TextStyles['textAppearance'];
61
+ };
62
+ export type PretextProps = {
63
+ settings?: PretextSettings;
64
+ content?: PretextContentItem[];
65
+ isEditor?: boolean;
66
+ isPreviewMode?: boolean;
67
+ isEditMode?: boolean;
68
+ isSelected?: boolean;
69
+ onUpdateSettings?: (settings: PretextSettings) => void;
70
+ } & CommonComponentProps;
71
+ export type Pt = {
72
+ x: number;
73
+ y: number;
74
+ };
75
+ export type Ring = Pt[];
76
+ export type Span = {
77
+ x0: number;
78
+ x1: number;
79
+ };
80
+ export type ViewBox = {
81
+ x: number;
82
+ y: number;
83
+ width: number;
84
+ height: number;
85
+ };
86
+ export type VecNode = {
87
+ p: Pt;
88
+ in?: Pt | null;
89
+ out?: Pt | null;
90
+ };
91
+ export type VecContour = {
92
+ nodes: VecNode[];
93
+ closed: boolean;
94
+ };
95
+ export type EditStage = 'none' | 'shape' | 'image';
96
+ export type ImageTransform = {
97
+ focalX: number;
98
+ focalY: number;
99
+ scale: number;
100
+ };
101
+ export type PathChangeOptions = {
102
+ carryImage?: boolean;
103
+ };
104
+ export type PathCommitOptions = {
105
+ preserveShape?: boolean;
106
+ };
107
+ export type ScaleCorner = 'nw' | 'ne' | 'se' | 'sw';
108
+ export type PathSelection = {
109
+ contour: number;
110
+ node: number;
111
+ };
112
+ export type PathDrag = {
113
+ kind: 'anchor' | 'in' | 'out';
114
+ contour: number;
115
+ node: number;
116
+ pointerId: number;
117
+ origin: Pt;
118
+ clientOrigin: Pt;
119
+ anchor: Pt;
120
+ center: Pt | null;
121
+ mirror: boolean;
122
+ toggleOnRelease: boolean;
123
+ moved: boolean;
124
+ };
125
+ export type ShapeDrag = {
126
+ pointerId: number;
127
+ origin: Pt;
128
+ startContours: VecContour[];
129
+ bbox: {
130
+ minX: number;
131
+ minY: number;
132
+ maxX: number;
133
+ maxY: number;
134
+ };
135
+ moved: boolean;
136
+ };
137
+ export type GroupDrag = {
138
+ pointerId: number;
139
+ origin: Pt;
140
+ startContours: VecContour[];
141
+ selection: PathSelection[];
142
+ moved: boolean;
143
+ };
144
+ export type ShapeScale = {
145
+ pointerId: number;
146
+ corner: ScaleCorner;
147
+ origin: Pt;
148
+ startDistance: number;
149
+ startContours: VecContour[];
150
+ moved: boolean;
151
+ };
152
+ export type SnapGuide = {
153
+ kind: 'align' | 'angle' | 'center';
154
+ a: Pt;
155
+ b: Pt;
156
+ };
157
+ export type ColumnMetrics = {
158
+ widths: number[];
159
+ spaceWidth: number;
160
+ lineHeight: number;
161
+ capWidth: number;
162
+ };
163
+ export type ColumnProps = {
164
+ P: string;
165
+ item: PretextContentItem;
166
+ shape: ShapeId;
167
+ customPath: string;
168
+ pathFit: PathFit;
169
+ viewBox: ViewBox;
170
+ mode: 'contain' | 'avoid';
171
+ align: Align;
172
+ allowOverflow: boolean;
173
+ fitEnabled: boolean;
174
+ scale: number;
175
+ onFitScale: (scale: number) => void;
176
+ dropCapLines: number;
177
+ dropCapSize: number;
178
+ showGuides: boolean;
179
+ typography: React.CSSProperties;
180
+ imageUrl?: string | null;
181
+ imageFocalX: number;
182
+ imageFocalY: number;
183
+ imageScale: number;
184
+ imageCustomPath: string;
185
+ pathDragActive: boolean;
186
+ pathCarryImage: boolean;
187
+ onCarryImageConsumed?: () => void;
188
+ pathEditor?: PathEditorBinding | null;
189
+ imageEditor?: ImageEditorBinding | null;
190
+ };
191
+ export type PathEditorBinding = {
192
+ contours: VecContour[] | null;
193
+ snap: number;
194
+ needsConversion: boolean;
195
+ onConvert: (contours: VecContour[]) => void;
196
+ onChange: (contours: VecContour[], options?: PathChangeOptions) => void;
197
+ onCommit: (contours: VecContour[], options?: PathCommitOptions) => void;
198
+ };
199
+ export type ImageEditorBinding = {
200
+ onChange: (next: ImageTransform) => void;
201
+ onCommit: (next: ImageTransform) => void;
202
+ };
203
+ export type FrozenShapeImage = {
204
+ rings: Ring[];
205
+ bounds: {
206
+ x: number;
207
+ y: number;
208
+ width: number;
209
+ height: number;
210
+ };
211
+ focalX: number;
212
+ focalY: number;
213
+ scale: number;
214
+ customPath: string;
215
+ shape: string;
216
+ };
217
+ export type PathEditorProps = {
218
+ P: string;
219
+ box: {
220
+ width: number;
221
+ height: number;
222
+ };
223
+ viewBox: ViewBox;
224
+ contours: VecContour[];
225
+ snap: number;
226
+ stretchToBox: boolean;
227
+ uniformStretch?: boolean;
228
+ stage: EditStage;
229
+ onStageChange: (stage: EditStage) => void;
230
+ onSelectionChange?: (hasSelection: boolean) => void;
231
+ onChange: (contours: VecContour[], options?: PathChangeOptions) => void;
232
+ onCommit: (contours: VecContour[], options?: PathCommitOptions) => void;
233
+ };
234
+ export type ImageEditorProps = {
235
+ P: string;
236
+ box: {
237
+ width: number;
238
+ height: number;
239
+ };
240
+ bounds: {
241
+ x: number;
242
+ y: number;
243
+ width: number;
244
+ height: number;
245
+ };
246
+ natural: {
247
+ width: number;
248
+ height: number;
249
+ } | null;
250
+ imageUrl?: string | null;
251
+ maskPath: string;
252
+ stage: EditStage;
253
+ onStageChange: (stage: EditStage) => void;
254
+ focalX: number;
255
+ focalY: number;
256
+ scale: number;
257
+ onChange: (next: ImageTransform) => void;
258
+ onCommit: (next: ImageTransform) => void;
259
+ };
260
+ export { EDIT_VIEW_BOX } from './vecContours';
261
+ export { mapContours, scaleContours, parsePathNodes, serializeContours, flattenContours, ringsToContours, settingsForEditablePreset, moveNodeTo, moveSelectedNodesBy, removeContourNodes, setNodeHandle, clearNodeHandle, insertNodeOnSegment, removeContourNode, toggleNodeSmooth, nearestSegmentHit, } from './vecContours';
262
+ export declare function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode, isSelected, onUpdateSettings }: PretextProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
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;
@@ -0,0 +1,46 @@
1
+ import { Pretext } from './Pretext';
2
+ import { ComponentSchemaV1 } from '../../types/SchemaV1';
3
+ export declare const PretextComponent: {
4
+ element: typeof Pretext;
5
+ id: string;
6
+ name: string;
7
+ category: string;
8
+ version: number;
9
+ normalizeLayoutSettingsUpdate: (nextSettings: Record<string, any>, prevSettings: Record<string, any>) => Record<string, any>;
10
+ defaultSize: {
11
+ d: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ t: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ m: {
20
+ width: number;
21
+ height: number;
22
+ };
23
+ };
24
+ preview: {
25
+ type: "image";
26
+ url: string;
27
+ };
28
+ schema: ComponentSchemaV1;
29
+ sourceCode: string;
30
+ assetsPaths: {
31
+ content: never[];
32
+ parameters: {
33
+ path: string;
34
+ placeholderEnabled: boolean;
35
+ }[];
36
+ };
37
+ fontSettingsPaths: {
38
+ content: never[];
39
+ parameters: {
40
+ path: string;
41
+ }[];
42
+ };
43
+ fontRelations: {
44
+ textFontSettings: string;
45
+ };
46
+ };
@@ -0,0 +1,2 @@
1
+ import { ImageEditorProps } from './Pretext';
2
+ export declare function PretextImageEditor({ P, box, bounds, natural, imageUrl, maskPath, stage, onStageChange, focalX, focalY, scale, onChange, onCommit }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { PathEditorProps } from './Pretext';
2
+ export declare function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, uniformStretch, stage, onStageChange, onSelectionChange, onChange, onCommit }: PathEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { ImageTransform, Pt, ScaleCorner } from './Pretext';
2
+ declare const MIN_IMAGE_SCALE = 0.1;
3
+ declare const MAX_IMAGE_SCALE = 8;
4
+ export { MIN_IMAGE_SCALE, MAX_IMAGE_SCALE };
5
+ export declare const bboxCorner: (bbox: {
6
+ minX: number;
7
+ minY: number;
8
+ maxX: number;
9
+ maxY: number;
10
+ }, corner: ScaleCorner) => Pt;
11
+ export declare const oppositeScaleCorner: (corner: ScaleCorner) => ScaleCorner;
12
+ export declare const scaleHandlePoint: (bbox: {
13
+ minX: number;
14
+ minY: number;
15
+ maxX: number;
16
+ maxY: number;
17
+ }, corner: ScaleCorner) => Pt;
18
+ export declare const coveredImageSize: (bounds: {
19
+ width: number;
20
+ height: number;
21
+ }, natural: {
22
+ width: number;
23
+ height: number;
24
+ }, scale: number) => {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ export declare const imageOffsetFromFocal: (boundsSize: number, renderedSize: number, focal: number) => number;
29
+ export declare const focalFromImageOffset: (boundsSize: number, renderedSize: number, offset: number) => number;
30
+ export declare const preserveImageTransformAcrossBoundsChange: (prevBounds: {
31
+ x: number;
32
+ y: number;
33
+ width: number;
34
+ height: number;
35
+ }, nextBounds: {
36
+ x: number;
37
+ y: number;
38
+ width: number;
39
+ height: number;
40
+ }, natural: {
41
+ width: number;
42
+ height: number;
43
+ }, focalX: number, focalY: number, scale: number) => ImageTransform;
@@ -0,0 +1,24 @@
1
+ import { PathFit, Ring, Span, ViewBox } from './Pretext';
2
+ export declare const BAND_SLACK = 0.12;
3
+ export declare const DEFAULT_VIEW_BOX: ViewBox;
4
+ export declare function mapToViewBox(rings: Ring[], viewBox: ViewBox): Ring[];
5
+ export declare function clamp01(value: number): number;
6
+ export declare function ringsToPathPx(rings: Ring[], box: {
7
+ width: number;
8
+ height: number;
9
+ }): string;
10
+ export declare function ringsBBoxPx(rings: Ring[], box: {
11
+ width: number;
12
+ height: number;
13
+ }): {
14
+ x: number;
15
+ y: number;
16
+ width: number;
17
+ height: number;
18
+ } | null;
19
+ export declare function ringOf(pairs: [number, number][]): Ring;
20
+ export declare function normalizeRings(rings: Ring[]): Ring[];
21
+ export declare function spansAtY(rings: Ring[], y: number): Span[];
22
+ export declare function subtractSpan(spans: Span[], hole: Span): Span[];
23
+ export declare function spansForBand(rings: Ring[], yTop: number, yBottom: number, mode: 'contain' | 'avoid'): Span[];
24
+ export declare function parsePathSpec(spec: string, fit?: PathFit, viewBox?: ViewBox): Ring[] | null;
@@ -0,0 +1,45 @@
1
+ import { default as React } from 'react';
2
+ import { Align, Ring, RichBlock, RichLeaf, RichLink, RichNode } from './Pretext';
3
+ export type Token = {
4
+ text: string;
5
+ leaf: RichLeaf;
6
+ href?: string;
7
+ target?: string;
8
+ para: number;
9
+ };
10
+ export declare function isLinkNode(node: RichNode): node is RichLink;
11
+ export declare function sanitizeHref(href?: string): string | undefined;
12
+ export declare function tokenize(blocks: RichBlock[]): Token[];
13
+ export declare function getLeafCss(leaf: RichLeaf): React.CSSProperties;
14
+ export declare function getPlainText(blocks: RichBlock[]): string[];
15
+ export type Segment = {
16
+ top: number;
17
+ left: number;
18
+ width: number;
19
+ from: number;
20
+ to: number;
21
+ justify: boolean;
22
+ };
23
+ export type LayoutResult = {
24
+ segments: Segment[];
25
+ placed: number;
26
+ height: number;
27
+ capLeft: number;
28
+ capTop: number;
29
+ };
30
+ export type LayoutParams = {
31
+ tokens: Token[];
32
+ widths: number[];
33
+ spaceWidth: number;
34
+ lineHeight: number;
35
+ width: number;
36
+ height: number;
37
+ rings: Ring[];
38
+ mode: 'contain' | 'avoid';
39
+ align: Align;
40
+ scale: number;
41
+ allowOverflow: boolean;
42
+ capInset: number;
43
+ capLines: number;
44
+ };
45
+ export declare function layoutText(params: LayoutParams): LayoutResult;
@@ -0,0 +1,96 @@
1
+ import { PathFit, Pt, Ring, ShapeId, SnapGuide, VecContour, VecNode, ViewBox } from './Pretext';
2
+ export declare const EDIT_VIEW_BOX = "0 0 100 100";
3
+ export declare const EDIT_SPAN = 100;
4
+ type AxisSnap = {
5
+ value: number;
6
+ axis: number | null;
7
+ from: Pt | null;
8
+ };
9
+ export declare const NO_GUIDES: SnapGuide[];
10
+ export declare function resolveUnitContours(spec: string, draft: VecContour[] | null | undefined, pathFit: PathFit, viewBox: ViewBox, shape: ShapeId, box: {
11
+ width: number;
12
+ height: number;
13
+ }): VecContour[];
14
+ export declare function unitContoursToPathPx(contours: VecContour[], box: {
15
+ width: number;
16
+ height: number;
17
+ }): string;
18
+ export declare function getPresetRings(shape: ShapeId | 'rectangle'): Ring[];
19
+ export declare function cloneContours(contours: VecContour[]): VecContour[];
20
+ export declare function mapContours(contours: VecContour[], transform: (point: Pt) => Pt): VecContour[];
21
+ export declare function scaleContours(contours: VecContour[], origin: Pt, scaleX: number, scaleY?: number): VecContour[];
22
+ export declare function parsePathNodes(d: string): VecContour[];
23
+ export declare function nodeHasCurveHandles(node: VecNode): boolean;
24
+ export declare function serializeContours(contours: VecContour[]): string;
25
+ export declare function flattenContours(contours: VecContour[]): Ring[];
26
+ export declare function contoursBBox(contours: VecContour[]): {
27
+ minX: number;
28
+ minY: number;
29
+ maxX: number;
30
+ maxY: number;
31
+ };
32
+ export declare function contoursCenter(contours: VecContour[]): Pt | null;
33
+ export declare function ringsToContours(rings: Ring[]): VecContour[];
34
+ export declare function pathExceedsEditViewBox(contours: VecContour[], viewBox: ViewBox, pad?: number): boolean;
35
+ export declare function bakeUniformStretchToBoxStretch(contours: VecContour[], viewBox: ViewBox, box: {
36
+ width: number;
37
+ height: number;
38
+ }, stretchOffsetX: number, stretchOffsetY: number, stretchScaleX: number, stretchScaleY: number): VecContour[];
39
+ export declare function settingsForEditablePreset(shape: ShapeId): {
40
+ shape: ShapeId;
41
+ customPath: string;
42
+ pathFit: 'viewbox';
43
+ pathViewBox: string;
44
+ };
45
+ export declare function snapValue(value: number, step: number): number;
46
+ export declare function moveNodeTo(contours: VecContour[], contourIndex: number, nodeIndex: number, point: Pt): VecContour[];
47
+ export declare function moveSelectedNodesBy(contours: VecContour[], selection: {
48
+ contour: number;
49
+ node: number;
50
+ }[], dx: number, dy: number): VecContour[];
51
+ export declare function removeContourNodes(contours: VecContour[], selection: {
52
+ contour: number;
53
+ node: number;
54
+ }[]): VecContour[];
55
+ export declare function setNodeHandle(contours: VecContour[], contourIndex: number, nodeIndex: number, which: 'in' | 'out', point: Pt, mirror: boolean): VecContour[];
56
+ export declare function clearNodeHandle(contours: VecContour[], contourIndex: number, nodeIndex: number, which: 'in' | 'out'): VecContour[];
57
+ export declare function insertNodeOnSegment(contours: VecContour[], contourIndex: number, segmentIndex: number, t: number): {
58
+ contours: VecContour[];
59
+ nodeIndex: number;
60
+ };
61
+ export declare function removeContourNode(contours: VecContour[], contourIndex: number, nodeIndex: number): VecContour[];
62
+ export declare function toggleNodeSmooth(contours: VecContour[], contourIndex: number, nodeIndex: number): VecContour[];
63
+ export declare function nearestSegmentHit(contours: VecContour[], point: Pt): {
64
+ contour: number;
65
+ segment: number;
66
+ t: number;
67
+ distance: number;
68
+ } | null;
69
+ export declare function collectSnapTargets(contours: VecContour[], exclude: {
70
+ contour: number;
71
+ node: number;
72
+ }): Pt[];
73
+ export declare function axisCandidates(points: Pt[], centers: number[], axis: 'x' | 'y'): AxisSnap[];
74
+ export declare function nearestAxisSnap(candidates: AxisSnap[], target: Pt, axis: 'x' | 'y', toPx: (point: Pt) => Pt, reach: number): AxisSnap | null;
75
+ export declare function sameGuides(a: SnapGuide[], b: SnapGuide[]): boolean;
76
+ export declare function normalizeAngle(angle: number): number;
77
+ export declare function unitVector(from: Pt, to: Pt): Pt | null;
78
+ export declare function alignmentGuide(from: Pt, to: Pt): SnapGuide;
79
+ export declare function centreGuide(at: number, axis: 'x' | 'y', frame: {
80
+ width: number;
81
+ height: number;
82
+ }): SnapGuide;
83
+ export declare function axisGuide(snap: AxisSnap, axis: 'x' | 'y', landingPx: Pt, frame: {
84
+ width: number;
85
+ height: number;
86
+ }, toPx: (point: Pt) => Pt): SnapGuide;
87
+ export declare function axisGuides(landing: Pt, snapX: AxisSnap | null, snapY: AxisSnap | null, frame: {
88
+ width: number;
89
+ height: number;
90
+ }, toPx: (point: Pt) => Pt): SnapGuide[];
91
+ export declare function smoothTangent(contour: VecContour | undefined, nodeIndex: number, which: 'in' | 'out', toPx: (point: Pt) => Pt): Pt | null;
92
+ export declare function snapHandlePoint(point: Pt, anchor: Pt, tangent: Pt | null, oppositeLength: number | null, lock: boolean, toPx: (point: Pt) => Pt, fromPx: (point: Pt) => Pt): {
93
+ point: Pt;
94
+ guides: SnapGuide[];
95
+ };
96
+ export {};
@@ -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';