Skip to content

πŸ¦‹ New version release#18

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
Jun 29, 2026
Merged

πŸ¦‹ New version release#18
brentrager merged 1 commit into
mainfrom
changeset-release/main

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@smooai/[email protected]

Minor Changes

  • 6b8a36e: Pre-chat phone field now formats and validates as you type (libphonenumber-js, US default region).

    • As-you-type formatting via AsYouType('US') β€” appended digits are formatted live (e.g. (213) 373-4253). The formatter only rewrites when the caret is at the end and never while deleting, so backspacing the formatting characters works naturally.
    • Inline validity hint driven by isValidPhoneNumber(value, 'US') β€” a subtle, themed valid/invalid state on the field plus a small hint span. An empty field stays neutral (the field is optional unless requirePhone).
    • On submit: when requirePhone is set and the number is invalid, submission is blocked and the hint is shown; when optional, submission proceeds. A valid number is sent as canonical E.164 (parsePhoneNumber(value, 'US').number), falling back to the raw value when it does not parse (the backend re-parses and normalizes/nulls authoritatively β€” SMOODEV-2153).
    • Autofill is preserved: type="tel", autocomplete="tel", and the implicit <label> are unchanged, and the value is also reformatted/validated on change so a browser-autofilled number gets handled too.

    The standalone IIFE bundle now inlines libphonenumber-js/min (added to deps.alwaysBundle) so a plain <script> embed has no undefined-global reference at load.

@brentrager brentrager force-pushed the changeset-release/main branch from 31fcca1 to 95a0d0b Compare June 29, 2026 12:51
@brentrager brentrager merged commit a11e67e into main Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant