fix(knob): drop redundant emit on enum data-intent + add sema to scope

Two behavior-preserving fixes that unblocked the repo-wide morfo tooling
(morfo:check / morfo:vocabulary / perm:check all threw at loadMorfos):

- data-intent is enum-valued, so the compiler writes it in `enum` mode and
  `emit` is ignored; its presence on an enum is rejected by the schema
  invariant (schema.ts, tested). Removed it — matches timeline / toast.
- Knob declares 5 events and ships a sema pack (knobSema) but scope was
  [soma, eidos]; added 'sema' so declaration matches reality.

Verified: morfo:vocabulary exit 0, schema.test 14/14, morfo:check knob PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
menubar-v4-safe
dev 3 months ago
parent 153d1ced98
commit 4c5fcbbb79

@ -18,7 +18,7 @@ import { v } from '../types';
export const knobMorfo = {
name: 'Knob',
kebab: 'knob',
scope: ['soma', 'eidos'],
scope: ['soma', 'sema', 'eidos'],
apg: 'https://www.w3.org/WAI/ARIA/apg/patterns/slider/',
texts: {
@ -41,11 +41,14 @@ export const knobMorfo = {
{ attr: 'data-readonly', value: v.propRef('readonly'), severity: 'optional' },
{ attr: 'data-invalid', value: v.propRef('invalid'), severity: 'optional' },
// Persistent evaluative state — sema's transient twin is data-event-intent.
// Enum-valued (values[]) → the compiler writes the intent directly in
// `enum` mode; `emit` is a non-enum-only knob and is ignored here (its
// presence on an enum is rejected by the schema invariant), so it's
// omitted — matching timeline / toast which declare data-intent the same way.
{
attr: 'data-intent',
values: ['neutral', 'affirm', 'risk', 'threat'],
value: v.propRef('intent'),
emit: 'value',
severity: 'optional'
}
],

Loading…
Cancel
Save

Powered by TurnKey Linux.