import { PropConfig, BoundingBoxOrigin } from '../types'; import { transformColor, transformPosition } from './transformations'; /** The four edge modes, in the order every shader's select lists them. */ export type EdgeMode = 'stretch' | 'transparent' | 'mirror' | 'wrap'; /** * The standard `edges` prop: a compile-time 4-option select handling samples that fall outside the * source. 22 shaders inline this identically apart from three fields. * * `defaultMode` is required because the fleet genuinely disagrees: `mirror` (Kaleidoscope, * DisplacementMap, FlowField, Surface3D, BarShift, ConcentricSpin, FlutedGlass, Shatter, Mirror), * `stretch` (PixelThrow, Stretch, CursorRipples, Liquify, WaveDistortion, Twirl, DiffuseBlur, * LinearGradient, GridDistortion, ReflectivePlane, Bulge) and `transparent` (Bend, * RectangularCoordinates, PolarCoordinates, CornerPin, Perspective) are all in use. Pass the * shader's current value verbatim. * * `description` is required for the same reason — seven distinct wordings exist, and the * description is user-visible tooltip text in the Design Editor. * * NOT a consumer: `Form3D.uvMode`, which reuses `transformEdges` but is a different prop (three * options, no `transparent`, no `compileTime`, label 'UV Edges'). */ export declare function edgesPropConfig(defaultMode: EdgeMode, description: string, overrides?: { label?: string; group?: string; }): PropConfig; /** * The standard `center` position prop. `description` is required (every consumer names its own * subject — "the center point of the twirl effect", "Center position of the crescent", …). * * Defaults across the fleet: `{x: 0.5, y: 0.5}` everywhere except Aurora (`{x: 0.5, y: 0}`), hence * the override. `label` is 'Center' in the majority and 'Center Position' in Circle/ConcentricSpin. * `units: ['%', 'px']` is present on the shape/material family and absent on the distortions, so it * is opt-in and the key is omitted when not requested. */ export declare function centerPropConfig(description: string, overrides?: { default?: { x: number; y: number; }; label?: string; group?: string; units?: string[]; }): PropConfig[0]>; /** * The `origin` prop — which reference edge a shape's center position is measured from. Byte-identical * in all 36 files that declare it (no transform: the string is read by the bounds layer, not the * GPU), so this factory takes no arguments. */ export declare function originProp(): PropConfig; /** * The softness + stroke block shared by the 2D shape fleet: `softness`, `strokeThickness`, * `strokeColor`, `strokePosition`. * * The baseline is the FLEET standard — the block that is byte-identical across Heart, Ellipse, * RoundedRect, Star, Cross, Crescent, Vesica, Teardrop, Flower, Parallelogram, Arc, Polygon and * Trapezoid (13 files): plain `range` inputs, softness max 0.1 / step 0.001, stroke thickness max * 0.2 / step 0.005. * * Circle is NOT that block and must not be migrated to it wholesale: its `softness` and * `strokeThickness` are `['range', 'map']` typed, with max 1 / 0.5 and a * `dimensional: 'canvas-height'` marker on softness. Circle keeps those two props inline (spread * over the factory result: `{...shapeStrokeProps({...}), softness: {…}, strokeThickness: {…}}`) so * its widened, map-driveable ranges survive. * * Ring differs in two small ways covered by the options below. */ export declare function shapeStrokeProps(overrides?: { /** Ring: "Edge softness for antialiasing (applied to both inner and outer ring edges)". */ softnessDescription?: string; /** Ring: 0.1 rather than the fleet's 0.2. */ strokeThicknessMax?: number; /** Circle: "The color of the stroke outline" (definite article), vs the fleet's "Color of…". */ strokeColorDescription?: string; /** Ring: "…relative to the ring edge"; Circle: "…relative to the circle edge". */ strokePositionDescription?: string; }): { softness: PropConfig; strokeThickness: PropConfig; strokeColor: PropConfig[0]>; strokePosition: PropConfig; }; /** * The `colorSpace` prop for shapes: which space the fill → stroke blend interpolates in. * Compile-time (it selects a `mixColors` variant at composition, so a change recompiles). * Circle's description adds "in soft edges"; everything else uses the baseline. */ export declare function shapeColorSpaceProp(overrides?: { description?: string; }): PropConfig; /** * The `objectFit` prop for texture shaders. * * PRESERVED DIVERGENCE: Image and Video retired `none` (Figma-style — the bounding box defines the * extent), so their table coalesces `none` to fill (2) and their fallback is 2; the select does not * offer a "None" option at all. Webcam keeps `none` as its own mode 4 (natural pixel size), offers * it in the select, and falls back to cover (0). Both tables are reproduced verbatim below and * chosen by `allowNone`; do NOT unify them, the mode numbers are baked into shipped presets. * * `description` is required — "How the image / video / webcam feed should be sized within the * viewport". */ export declare function objectFitProp(defaultValue: string, description: string, options: { allowNone: boolean; }): PropConfig; /** The canonical glass-shell optics props (see {@link glassShellProps}). */ export type GlassShellPropName = 'refraction' | 'dispersion' | 'thickness' | 'environment' | 'envRotation' | 'lightAngle' | 'highlight' | 'highlightColor' | 'highlightSoftness' | 'fresnel' | 'fresnelSoftness' | 'fresnelColor' | 'edgeSoftness'; type AnyGlassPropConfig = PropConfig; /** Per-prop override: any PropConfig field; `ui` deep-merges over the canon's. */ export interface GlassShellOverride { default?: number | string; transform?: (value: any) => any; compileTime?: boolean; description?: string; ui?: Record; } /** * The shared glass-shell optics prop block — one canonical name, label, and shape per * control, so every shelled material (Glass, Nebula, future shells) presents the same * panel vocabulary. Opt-in menu: pass `true` for the canonical config or a partial * override (merged over the canon, `ui` deep-merged) for a shader's own default/range/ * group/wording. Output keys follow the SPEC's declaration order (prop order is * load-bearing), and multiple spreads may interleave shader-specific props between them. * * Naming canon notes: spectral splitting is `dispersion` (Glass's `aberration` predates * the canon and keeps its name for preset compatibility); `thickness` is the optics band * depth, not a geometry bevel. */ export declare function glassShellProps>>(spec: S): { [K in keyof S]: AnyGlassPropConfig; }; export {}; //# sourceMappingURL=propConfigs.d.ts.map