rias/statamic-color-swatches
Statamic Color Swatches adds a configurable color picker fieldtype for the Statamic control panel, letting editors choose from predefined swatches and palettes instead of typing hex values. Keep brand colors consistent across entries and simplify content editing.
Architecture fit
AddonServiceProvider subclass, fieldtype registered via the $fieldtypes property, assets declared through the $vite property. No bespoke bootstrapping or Laravel service-provider gymnastics to audit.{ label, value[] }. Nothing more.@statamic/components/fieldtypes mixins, and the Statamic Vite plugin all assume the v6 CP runtime. This is not usable in a plain Laravel app or an older Statamic install.dist/ is committed, so consumers need no Node toolchain. That is a genuine operational convenience for locked-down CI pipelines, at the cost of possible source/build drift.Integration feasibility
composer require, addon registration per Statamic v6 conventions, then reference color_swatches in a blueprint. No migrations, no publishable config, no queue/cache/event wiring.bootAddon() via GraphQL::addType(). Verify whether that is inert when GraphQL is unused, and whether Rebing\GraphQL must be resolvable at boot.process() splits comma strings into arrays, augment() is a passthrough. A reviewer can fully understand the package in under an hour.Technical risk
process() normalizes comma-separated strings into arrays; augment() passes through untouched. Content written via API, import scripts, or legacy fields can surface as a bare string in templates. Any template contract must defend against both.value via Arr::first(), so multi-color swatches are lossy at the API boundary.dist/ can silently diverge from resources/ if the source is patched without a rebuild.Key questions
Stack fit
Migration path
{ label, value: [...] }. Do this as an explicit backfill script over revisions, not an in-place overwrite, so rollback stays possible.Compatibility
Rebing\GraphQL availability before enabling GraphQL anywhere in the schema.dist/ as the shipped artifact and do not run the Vite build in the consuming app.Sequencing
{{ value }} leak raw shapes into templates.ColorSwatchType shape and decide whether first-color-only is acceptable or needs a custom resolver.Rollback
Maintenance
^. A solo-maintainer patch release should not reach production unreviewed.Support
Scaling
Failure modes
dist/ drift means source fixes never reach consumers.Ramp-up
TPM recommendation
How can I help you explore Laravel packages today?