You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/src/uix/sema/verbs.ts

310 lines
10 KiB

sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
/**
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Canonical action verb vocabulary, grouped by family.
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Cross-component verb names that morfo `events[].semantic.verb` (and the
* `events[].name` head) should preferably align with. Lets sema/sound/haptic
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* engines subscribe by verb instead of by component-specific event name,
* and lets eidos write transversal selectors like
* `[data-event^="dismiss"]`.
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Composite event names follow the convention `{family}-{verb}` or
* `{family}-{verb}-{variant}` (e.g. `commit-save`, `commit-toggle-visibility`,
* `signal-warn-count-overflow`). `validateEventName` extracts the head, checks
* it against the canon, and reports drift.
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* ## Doctrina (libro «Diseñando lo que ocurre», cap. 8 + cap. 22-29)
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Eight families, each answering one perceptual question:
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
*
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* - `contact` (cap. 22) — ¿el sistema ha sentido mi acción? Pre-evaluation
* reception of input. Intent is typically `neutral` or omitted; "el intent
* fuerte no debería vivir en el contacto, sino en la señal o consecuencia
* posterior" (cap. 22 §11).
* - `commit` (cap. 23) — ¿algo quedó fijado o tuvo consecuencia? Where state
* or outcome lands. Accepts intent fully.
* - `signal` (cap. 24) — ¿algo reclama mi atención? System-initiated attention
* orientation. Accepts intent fully.
* - `handle` (cap. 25) — ¿estoy controlando directamente este objeto? Direct
* manipulation. Intent concentrates on `drop`; `carry` stays neutral.
* - `emerge` (cap. 26) — ¿algo entró o salió del campo perceptivo? Presence
* transitions. Normally does NOT accept intent — what appears may carry
* it, the appearance itself doesn't.
* - `shift` (cap. 27) — ¿cambió el contexto? Context/regime change. Normally
* does NOT accept intent.
* - `sustain` (cap. 28) — ¿esto sigue ocurriendo? Operational continuity.
* Normally does NOT accept intent — pair with signal/commit when needed.
* - `delegate` (cap. 29) — ¿quién actúa ahora? Reparto de iniciativa entre
* usuario y sistema (workflows, IA, macros, aprobaciones). No intent by
* default; intent appears in the resulting signal/commit.
*
* ## Six intents (cap. 10): neutral, affirm, fulfill, risk, threat, loss
*
* threat ≠ loss: threat lives ANTES de la consecuencia (convoca acción),
* loss lives DESPUÉS (registra consecuencia consumada).
*
* ## Composition rules (cap. 30)
*
* 1. contact precede al resultado cuando hay acción directa
* 2. sustain precede a commit cuando hay espera
* 3. threat precede a loss (nunca `commit.delete + threat`)
* 4. emerge no absorbe intent del contenido
* 5. shift debe orientar (foco + título + landmark)
* 6. handle concentra evaluación en el drop, no en el carry
* 7. todo proceso abierto necesita salida (commit/cancel/fail)
*
* ## Extending the canon
*
* Adding a verb is justified when at least two components share the action
* with the same semantic family. The book (cap. 8 §1) authorises verbs as a
* level distinct from families: "no todo debe ser familia. Algunas diferencias
* pertenecen al verbo, a la fase, al intent o a la realización."
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*/
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
export const SEMA_VERBS = {
contact: ['press', 'tap', 'activate', 'focus', 'trigger', 'release'],
commit: [
feat(sema/morfo): add commit.unselect to canon + apply to 6 morfos User doctrinal decision (2026-05-25): add `unselect` as canonical verb of the commit family. The pair `select` / `unselect` covers results applied on the selection state of an item — distinct from `toggle` (binary control flip) and `remove` (retirement from a collection). Quoting the author: "Seleccionar y deseleccionar son resultados aplicados sobre el estado de selección de un elemento. Eso es commit, porque el resultado queda aplicado. - No es remove: no estás eliminando el item ni sacándolo de una colección funcional; solo estás cambiando su estado de selección. - No es necesariamente toggle: toggle describe mejor el mecanismo binario o el control, pero no expresa tan bien el resultado semántico concreto." Changes: - src/uix/sema/verbs.ts: add `unselect` to SEMA_VERBS.commit after `select` (natural pair). Header comment documents the doctrinal distinction with toggle and remove. - 6 morfos updated: calendar, combobox, grid-list, listbox, select, tag-group. Each changes `commit-unselect` from `verb: 'remove' + intent: 'neutral'` to `verb: 'unselect' + intent: 'affirm'`. Names preserved (already canonical now). Intent `affirm` because "the action applied correctly" (sobrio, not celebratory). - src/docs/LIBRO_VARIACIONES_Y_EXTENSIONES.md: C.2 marked RESUELTO with the full doctrinal reasoning verbatim. A.3 (remove vs delete) updated to reflect the three-way distinction now formalized (unselect/remove/delete). New A.7 entry for `unselect` itself with "para el libro" note (add to Cap 23 §5). Verification: - morfo:vocabulary: warns 25 → 19 (-6 unselect cluster), EXIT 0 - vitest src/uix/sema src/uix/morfo: 195/195 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Fijación de estado de selección — par natural canónico.
// `select` (libro Cap 23) + `unselect` (extensión del autor 2026-05-25):
// resultados aplicados sobre el estado de selección de un elemento.
// "este item queda seleccionado" / "este item deja de estar seleccionado".
// No es `remove` (no se elimina ni se saca de colección, solo cambia
// estado de selección). No es `toggle` (toggle describe inversión
// binaria genérica, no el resultado semántico de selección).
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'select',
feat(sema/morfo): add commit.unselect to canon + apply to 6 morfos User doctrinal decision (2026-05-25): add `unselect` as canonical verb of the commit family. The pair `select` / `unselect` covers results applied on the selection state of an item — distinct from `toggle` (binary control flip) and `remove` (retirement from a collection). Quoting the author: "Seleccionar y deseleccionar son resultados aplicados sobre el estado de selección de un elemento. Eso es commit, porque el resultado queda aplicado. - No es remove: no estás eliminando el item ni sacándolo de una colección funcional; solo estás cambiando su estado de selección. - No es necesariamente toggle: toggle describe mejor el mecanismo binario o el control, pero no expresa tan bien el resultado semántico concreto." Changes: - src/uix/sema/verbs.ts: add `unselect` to SEMA_VERBS.commit after `select` (natural pair). Header comment documents the doctrinal distinction with toggle and remove. - 6 morfos updated: calendar, combobox, grid-list, listbox, select, tag-group. Each changes `commit-unselect` from `verb: 'remove' + intent: 'neutral'` to `verb: 'unselect' + intent: 'affirm'`. Names preserved (already canonical now). Intent `affirm` because "the action applied correctly" (sobrio, not celebratory). - src/docs/LIBRO_VARIACIONES_Y_EXTENSIONES.md: C.2 marked RESUELTO with the full doctrinal reasoning verbatim. A.3 (remove vs delete) updated to reflect the three-way distinction now formalized (unselect/remove/delete). New A.7 entry for `unselect` itself with "para el libro" note (add to Cap 23 §5). Verification: - morfo:vocabulary: warns 25 → 19 (-6 unselect cluster), EXIT 0 - vitest src/uix/sema src/uix/morfo: 195/195 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'unselect',
// Inversión binaria genérica (switch, checkbox, control on/off).
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'toggle',
feat(sema/morfo): add commit.unselect to canon + apply to 6 morfos User doctrinal decision (2026-05-25): add `unselect` as canonical verb of the commit family. The pair `select` / `unselect` covers results applied on the selection state of an item — distinct from `toggle` (binary control flip) and `remove` (retirement from a collection). Quoting the author: "Seleccionar y deseleccionar son resultados aplicados sobre el estado de selección de un elemento. Eso es commit, porque el resultado queda aplicado. - No es remove: no estás eliminando el item ni sacándolo de una colección funcional; solo estás cambiando su estado de selección. - No es necesariamente toggle: toggle describe mejor el mecanismo binario o el control, pero no expresa tan bien el resultado semántico concreto." Changes: - src/uix/sema/verbs.ts: add `unselect` to SEMA_VERBS.commit after `select` (natural pair). Header comment documents the doctrinal distinction with toggle and remove. - 6 morfos updated: calendar, combobox, grid-list, listbox, select, tag-group. Each changes `commit-unselect` from `verb: 'remove' + intent: 'neutral'` to `verb: 'unselect' + intent: 'affirm'`. Names preserved (already canonical now). Intent `affirm` because "the action applied correctly" (sobrio, not celebratory). - src/docs/LIBRO_VARIACIONES_Y_EXTENSIONES.md: C.2 marked RESUELTO with the full doctrinal reasoning verbatim. A.3 (remove vs delete) updated to reflect the three-way distinction now formalized (unselect/remove/delete). New A.7 entry for `unselect` itself with "para el libro" note (add to Cap 23 §5). Verification: - morfo:vocabulary: warns 25 → 19 (-6 unselect cluster), EXIT 0 - vitest src/uix/sema src/uix/morfo: 195/195 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Otros fijadores de estado.
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'save',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Resolución de proceso
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'submit',
'confirm',
'complete',
'fail',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Cancelación / reversión
'cancel',
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'reset',
'discard',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Consecuencia consumada
'delete',
'restore',
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'expire',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Cierre que cubre una decisión pendiente sin afirmar/rechazar
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'acknowledge',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// Verbos contextuales que el libro usa en casos de estudio
// (cap. 29 + cap. 30 + apéndice C):
'apply',
'partial',
'block',
'move',
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'set',
'remove',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'reorder',
'upload'
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
],
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
signal: [
'announce',
'notify',
'warn',
'alert',
'inform',
'emphasize',
'remind'
],
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
// `zoom` (extensión del autor 2026-06-10): manipulación directa de la escala
// del contenido (rueda / pinch), junto a drag / resize / rotate / scroll.
handle: ['pick', 'carry', 'drop', 'drag', 'resize', 'reorder', 'rotate', 'scroll', 'zoom'],
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
emerge: [
'present',
'dismiss',
'open',
'close',
'expand',
'collapse',
'reveal',
'hide'
],
shift: ['enter-mode', 'exit-mode', 'navigate', 'route', 'step', 'return', 'context'],
sustain: [
'start',
'progress',
'loading',
'waiting',
'syncing',
'processing',
'streaming',
'pending',
'retrying',
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'upload',
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
'end'
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
],
// Familia delegate (libro cap. 29). Eventos donde cambia quién lleva la
// iniciativa o ejecuta parte de la acción. No requiere IA — workflows,
// macros, reglas automáticas y aprobaciones también producen delegate.
delegate: [
'offer', // el sistema ofrece encargarse
'plan', // el sistema propone un curso
'authorize', // el usuario concede permiso
'act', // el sistema actúa por el usuario
'review', // el sistema espera revisión
'escalate', // el sistema pide intervención humana
'return' // el control vuelve al usuario
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
]
} as const;
export type SemaFamilyName = keyof typeof SEMA_VERBS;
export type SemaVerb = (typeof SEMA_VERBS)[SemaFamilyName][number];
const VERB_SET: ReadonlySet<string> = new Set(
Object.values(SEMA_VERBS).flatMap((verbs) => [...verbs])
);
/**
* Find the longest canonical verb that is a prefix of `text` (followed
* by end-of-string or a dash). Required because the canon includes
* multi-word verbs (`enter-mode`, `exit-mode`); a naive "split at first
* dash" would only see `enter` / `exit` and miss the actual verb.
*
* Returns the matched verb plus whatever remains of `text` after it
* (with the separating dash consumed), or `undefined` if no verb
* prefixes `text`. Sorts by length descending so `enter-mode` beats
* `enter` when both could match.
*/
function matchLongestVerb(
text: string,
verbs: Iterable<string>
): { verb: string; tail: string } | undefined {
const sorted = [...verbs].sort((a, b) => b.length - a.length);
for (const verb of sorted) {
if (text === verb) return { verb, tail: '' };
if (text.startsWith(verb + '-')) return { verb, tail: text.slice(verb.length + 1) };
}
return undefined;
}
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/**
* Reverse lookup: which family does a given verb belong to?
*
* Some verbs appear in multiple families (e.g. `reorder` is both a
refactor(sema): align verb canon with «Diseñando lo que ocurre» (Plan B commit 1) Codifies the doctrinal source for the semantic system per the user's book at src/docs/Disenando_lo_que_ocurre_manuscrito_completo_revisado_v2.docx. Canon (book cap. 8 + cap. 22-29 + cap. 10): - 8th family `delegate` added (offer/plan/authorize/act/review/escalate/return) - `signal.inform` added (book cap. 24 listed 7 signal verbs; we had 6) - Commit contextual verbs from case studies: apply, partial, block, move, upload - `sustain.upload` added - SemaFamily union, SEMA_FAMILY_POLICY, sema-map, visual chan, morfo schema all extended to include delegate (intentPolicy: 'optional' — no intent by default per cap. 29 §4) Lint (scripts/morfo-vocabulary-check.ts): - Hard-fails on declared `semantic.verb` not in family canon (the doctrinal contract: subscribers query by family+verb) - Soft-warns on event name shape drift (declared verb is the truth, name is informational) - Allowlists `button.commit-action` with TODO referencing Plan B commit 2 (Button's intent vs contact question per cap. 22 §11 needs design sign-off) 3 mechanical violation fixes: - textarea: `shift-count-overflow` (family shift, verb limit) → `signal-warn-count-overflow` (signal.warn + risk per cap. 24 — corregible warning, not context shift) - password-field: `shift-toggle-visibility` → `commit-toggle-visibility` (commit.toggle + affirm per cap. 23 — state fixation, not context shift) - password-field: `shift-caps-state` → `signal-notify-caps-state` (signal.notify + neutral per cap. 24 — system orients attention without urgency) - month-grid + year-grid: `nav-step` → `shift-navigate-step` (family/verb already canonical, name aligned to {family}-{verb}-{variant}) Verification: - npm run morfo:vocabulary → EXIT 0 (1 allowlisted, 59 pre-existing name-shape warns documenting visible drift for future sprints) - npx vitest src/uix/sema src/uix/morfo → 194/194 pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* commit and a handle verb depending on context; `return` is both a
* shift and a delegate verb; `upload` is both a commit outcome and a
* sustain phase). The map returns the FIRST family in which the verb is
* declared per `SEMA_VERBS` ordering.
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
*/
const VERB_TO_FAMILY: ReadonlyMap<string, SemaFamilyName> = (() => {
const map = new Map<string, SemaFamilyName>();
for (const [family, verbs] of Object.entries(SEMA_VERBS) as [
SemaFamilyName,
readonly string[]
][]) {
for (const verb of verbs) {
if (!map.has(verb)) map.set(verb, family);
}
}
return map;
})();
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
export interface VerbValidation {
/** The morfo event name as authored. */
name: string;
/** The verb head — the part before the first `-`, or the whole name. */
head: string;
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/** Whether the parsed head OR (family + first-tail-segment) is canonical. */
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
matchesCanonical: boolean;
/** Tail after the first `-`, if any. e.g. `'commit-save'` → `'save'`. */
variant: string | undefined;
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/**
* The family resolved from the name. Three sources, in order:
* 1. head is a verb → family from `VERB_TO_FAMILY[head]`
* 2. head is a family name → that family
* 3. neither → `undefined`
*/
family: SemaFamilyName | undefined;
/**
* The canonical verb resolved from the name, when one can be
* determined. For `'commit-toggle'` (family-verb shape) this is
* `'toggle'`; for `'dismiss-outside'` (verb-variant shape) this is
* `'dismiss'`; for bare `'present'` this is `'present'`.
*/
verb: string | undefined;
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
}
/**
* Inspect a morfo `events[].name` against the canonical vocabulary.
*
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
* Recognises two naming shapes:
* - `{verb}` or `{verb}-{variant}` — head is the verb (e.g.
* `present`, `dismiss-outside`, `close-cancel`).
* - `{family}-{verb}` or `{family}-{verb}-{variant}` — head is a
* family name (e.g. `commit-toggle`, `commit-save`).
*
* Returns `matchesCanonical: true` for either shape. Used for auditing
* morfos and for `morfo:vocabulary`-style scripts to surface drift.
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
*/
export function validateEventName(name: string): VerbValidation {
const dashIdx = name.indexOf('-');
const head = dashIdx === -1 ? name : name.slice(0, dashIdx);
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
const tail = dashIdx === -1 ? '' : name.slice(dashIdx + 1);
const variant = dashIdx === -1 ? undefined : tail;
// Case 1: name starts with a canonical verb (bare verb or verb-variant
// shape). Longest-prefix match against ALL canonical verbs so
// multi-word verbs like `enter-mode` win over `enter`.
const verbHeadMatch = matchLongestVerb(name, VERB_SET);
if (verbHeadMatch) {
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
return {
name,
head,
matchesCanonical: true,
variant,
family: VERB_TO_FAMILY.get(verbHeadMatch.verb),
verb: verbHeadMatch.verb
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
};
}
// Case 2: head is a family name → longest-prefix match against the
// family's verbs (covers multi-word verbs like `shift.enter-mode`).
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
if (head in SEMA_VERBS) {
const family = head as SemaFamilyName;
const familyVerbs = SEMA_VERBS[family] as readonly string[];
const verbMatch = matchLongestVerb(tail, familyVerbs);
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
return {
name,
head,
matchesCanonical: verbMatch !== undefined,
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
variant,
family,
verb: verbMatch?.verb
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
};
}
// Case 3: neither verb nor family.
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
return {
name,
head,
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
matchesCanonical: false,
variant,
family: undefined,
verb: undefined
sema: canonical action verb vocabulary (SEMA_VERBS) Cross-component verb names that morfo `events[].name` should preferably align with. Lets sema / sound / vibra engines subscribe by verb instead of by component-specific event name, and lets eidos write transversal selectors like `[data-event^="dismiss"]`. Vocabulary (24 verbs, grouped by family alignment) - emerge: present, dismiss, open, close, expand, collapse - commit: commit, cancel, confirm, submit, reset, fail - alert: announce, alert - contact: activate, select, toggle - handle: acknowledge, edit, drag, resize - sustain: tick, progress Composite event names follow `{verb}-{variant}` (e.g. `commit-save`, `dismiss-outside`). The verb is the head; the rest is component-specific nuance the validator extracts and reports separately. `validateEventName(name)` returns `{ name, head, matchesCanonical, variant }`. Advisory — doesn't reject morfos, just surfaces drift for tooling / review (a future `sema:vocabulary` script can use it to flag composite event names whose head isn't canonical). Existing event names already align well - Toast: `present`, `announce`, `dismiss` — all canonical bare verbs. - Dialog: `open`, `close-save`, `close-cancel`, `close-dismiss`, `close-dismiss-outside`, `close-after-fail` — all canonical heads (`open`, `close`) with variants. Tests: 10 unit tests covering vocabulary integrity, isSemaVerb guard, validateEventName splitting/matching, and a snapshot of current dialog + toast event names against the catalog (all match). This is the second extension justified under the "2-of-3 rule": verbs are consumed by sema (subscription routing) AND eidos (selector generation), with the original morfo authoring as the third producer.
6 months ago
};
}
export function isSemaVerb(value: unknown): value is SemaVerb {
return typeof value === 'string' && VERB_SET.has(value);
}
sema/morfo/eidos: align with GUIA_IMPLEMENTACION_SEMAUIX (canonical guide) The new doctrinal guide at src/docs/GUIA_IMPLEMENTACION_SEMAUIX.md supersedes src/docs/sema-implementation-guide.md and locks the canonical vocabulary, event shape and color tokens. This commit aligns the codebase to that canon in three concrete moves. Phase 1 — sema/verbs.ts vocabulary: - Restructured from flat array to family-keyed Record per the guide. - Moved select / toggle / acknowledge → commit (these fix state, not contact). Removed edit from handle (it's shift.enter-mode now). - Added new verbs per the canon: contact (tap, focus, trigger, release), commit (complete, restore, expire, set, remove, reorder), signal (remind), handle (rotate, scroll, reorder), shift (route, step, return, context), sustain (start, loading, waiting, syncing, processing, streaming, pending, retrying, end). - validateEventName now recognises both naming shapes: {verb}-{variant} (head=verb) and {family}-{verb} (head=family). - New helper familyForVerb. Tests rewritten — 16/16 green. Phase 2 — morfo event shape: - target moved from event-level into event.semantic. Adds optional semantic.verb (advisory, validated against SEMA_VERBS[family]) and optional semantic.sequence ('pre' | 'coincident' | 'post'). - compile.ts and schema.ts updated. The 22 events across toggle, toast, popover, drawer, dialog refactored to the new shape with explicit verb + sequence. - Polymorphic capability (allowedFamilies + defaultSemantic) and a11ySemantic deferred — no current consumer needs them; will land when the first concrete usage appears. Phase 5 — color tokens (doctrinal 8): - themes/base/light.css and dark.css rewritten to expose primary, secondary, neutral, affirm, fulfill, risk, threat, loss. Renames success→fulfill, warning→risk, danger→threat (same hex). New primitives for secondary (slate-blue), affirm (teal-mint, low activation), loss (deep violet-grave, posterior). info palette deleted entirely — per guide, "info no es intent, es signal.announce + neutral". - _static.css legacy compatibility aliases (--color-bg, --color-success, --color-error, --color-accent, ...) deleted. Clean cut, no transition. Consumers reference doctrinal palettes directly. - 29 consumers (token files + recipes) migrated: - All --*-color-info-* declarations dropped. - Component palettes extended with secondary / affirm / loss. - switch + checkbox recipes updated to use [data-color='affirm'| 'risk'|'threat'|'secondary'] (was 'success'|'warning'|'danger'| 'info'). - toast tokens + recipe renamed to affirm/fulfill/risk/threat/loss (was success/error/warning/info). - meter, progress, mark, badge, button tokens renamed. - Contracts (contracts/contract.css + contracts/components/*) updated. - focus-ring-color-error in themes now points to --color-risk-border (validation errors are signal.warn + risk per doctrina, not threat). Phase 4 (partial): - src/docs/sema-implementation-guide.md deleted (superseded by the canonical guide). Tests: 217/217 green across uix. npm run check holds at the 39-error baseline (all pre-existing in unrelated test files; none introduced). Pending in follow-up commits: - Update active_architecture.md, sema/README.md, morfo/README.md, CLAUDE.md to reflect the canon. - Switch component migration to the eidos wrapper pattern. - Persistence field (untilAction / untilFix / stateBound) and holds-by-intent — defer until the first signal.warn / signal.alert consumer appears. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
/**
* Family the canonical verb belongs to, or `undefined` if not canonical.
*/
export function familyForVerb(verb: string): SemaFamilyName | undefined {
return VERB_TO_FAMILY.get(verb);
}

Powered by TurnKey Linux.