Skip to content

v0.14.0

Choose a tag to compare

@foo-ogawa foo-ogawa released this 29 Apr 03:42
21a3ef7

Inline x-event & x-interactions support for Screen Spec

New Features

  • x-event (singular): New inline event extension replacing x-events (deprecated). Supports 3 forms:
    • Stringx-event: page_view (name only, type auto-inferred from placement)
    • Objectx-event: { name: checkout, type: action, params: { item_id: string } }
    • $refx-event: { $ref: "#/components/x-event-defs/purchase" }
  • x-interactions: New extension for declaring in-page interaction bindings (swipe, selection, etc.), each with optional nested x-event
  • components.x-event-defs: Reusable event definition registry in OpenAPI components
  • Auto-derivation: params are automatically derived from route path parameters and link target routes
  • New Handlebars helpers: hasEvent, eventParamsSignature
  • New template context fields: screenEvent, actions, interactions, pathParams, link.event

Lint Rules

  • SCREEN_DEPRECATED_X_EVENTS — warns on legacy x-events usage
  • SCREEN_CONFLICTING_EVENT_DEFS — errors if x-events and x-event coexist
  • SCREEN_INVALID_INTERACTIONS — validates x-interactions structure

Breaking Changes

  • None. x-events (plural) is deprecated but still supported.