mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-29 17:55:45 +01:00
ParamRows and ParamDialog take a PresetSource for their pattern rows (a hosted dialog's build gives one over owned inputs); the export and PDF export dialogs, the swatch list (swatch_source, thumbs from the drawn colours), the gradient palette and Gradient Map picker, the pattern fill editor, the text style picker (style_source) and the Layer Style dialog (patterns, style presets, contour_source) build their presets from sources. Their painters are fns: RampSampler, SwatchPainter, ContourSampler. Key types and the model types they are built from are memo props. A memoized view inside an open popover replays while nothing changes; an open preset picker runs no list row while nothing changes; a Size drag in the Brush Preset picker runs its head and replays the list. The Swatches panel's rows stay public as `swatch_rows(groups, words)`, which the source's rows fn calls.