Skip to content

v0.9.0

Choose a tag to compare

@adnaan adnaan released this 13 May 06:36
· 73 commits to main since this release

Changes

  • feat: emit explicit submitter on the wire (livetemplate#237 Phase 2) (1385a5e)

This release implements the client-side half of the explicit-submitter contract documented in livetemplate/livetemplate's docs/proposals/explicit-submitter.md. The server-side acceptance shipped in livetemplate/livetemplate v0.9.0; this release lets the client populate it.

Wire-format changes

  • WebSocket action message now carries submitter: <name> when SubmitEvent.submitter.name is non-empty. Additive to the existing inline action resolution; the field is omitted when there's no named submitter.
  • HTTP Tier 1 multipart submissions include an lvt-submitter form key alongside lvt-action.
  • New lvt-form:emit-submitter directive (opt-in, paired with lvt-form:no-intercept): for forms that submit natively rather than via fetch, injects a hidden <input type="hidden" name="lvt-submitter"> populated from SubmitEvent.submitter.name before the browser serializes the form. Wrapper-delegated so DOM swaps preserve the behavior. Emits a one-shot console.warn per form when used on a GET form (URL-pollution caveat — the field gets serialized into the query string). On follow-up submits with no named submitter, the directive clears the stale hidden input so the server doesn't see leaked state from an earlier named submit.

Reserved field name

lvt-submitter is now a reserved form field name (same shape as the existing lvt-action reservation). Apps that previously used a field named lvt-submitter for user data will see that value routed as the action; rename the field to avoid the collision.

Installation

npm

npm install @livetemplate/client@0.9.0

CDN

<script src="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.9.0/dist/livetemplate-client.browser.js"></script>

Related Releases

This release aligns to the LiveTemplate core library version v0.9.0.