Search by

uams-web / aether-fieldtypes

joshdaughertybpmore

The shared fieldtype add-on for UAMS Statamic sites: the traits, Control Panel JavaScript, public Alpine helper and owner check that every fieldtype family builds on.

Package info

github.com/UAMS-Web/aether-fieldtypes

Type:statamic-addon

pkg:composer/uams-web/aether-fieldtypes

Statistics

Installs: 702

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 2

v0.1.0 2026-11-18 22:02 UTC

This package is auto-updated.

Last update: 2026-11-19 16:05:00 UTC


README

The shared fieldtype add-on for UAMS Statamic sites. It holds the traits, the Control Panel JavaScript and the public Alpine helper that every fieldtype family shares, and the owner check that keeps each fieldtype handle and Control Panel component name with exactly one package. The fieldtype families move in behind this foundation, one slice at a time, so the add-on registers no fieldtype yet.

What is in it

  • Shared traits under UAMSWeb\Aether\Fieldtypes\Traits: the input, validation, subfield, config-section, mask and default-value helpers the fieldtypes build on.
  • Shared Control Panel JavaScript in resources/js/components/fieldtypes: CustomTextInputFieldtypeMixin, GroupFieldtypeShell, subfieldId, and the "Other" option mixin, utility and partial.
  • The public Alpine helper, registerAlpineEngine, from resources/js/alpine.js. A host application imports it before it calls Alpine.start() (see Usage), so each engine registers while Alpine is booting.
  • The owner check, UAMSWeb\Aether\Fieldtypes\Ownership\OwnerMap, which reads the fieldtype handles and Control Panel component names that each installed add-on registers and fails when two packages register one.
  • The add-on's own lang namespace, aether-fieldtypes::messages.

Requirements

PHP 8.4 or later and Statamic 6.35 or later.

Installation

composer require uams-web/aether-fieldtypes

Statamic discovers the add-on through extra.statamic in composer.json, and Laravel boots its service provider through extra.laravel.providers.

Usage

Import the Alpine helper

In the host's JavaScript entry, import the helper before Alpine.start():

import { registerAlpineEngine } from '../../vendor/uams-web/aether-fieldtypes/resources/js/alpine.js'

The helper is a source module and is not built into the add-on's committed Control Panel bundle: the host's own build includes it.

Assert that every name has one owner

A host runs the owner check from its test suite:

use UAMSWeb\Aether\Fieldtypes\Ownership\OwnerMap;

OwnerMap::fromInstalledAddons()->assertSingleOwners();

It throws OwnershipConflict, naming each handle or component name and its owners, when two packages register the same one. Statamic itself cannot report this, because its registry keeps one class per handle and the last registration wins.

Development

Developing against a host application is covered in the development guide, and the Packagist and Marketplace steps in the submission checklist. composer ci runs the gate; npm run test:scripts runs the JavaScript tests.

License

MIT. See LICENSE.