Skip to content

feat(angular): expose core 0.2.0 morph options in the wrapper#13

Merged
antuuanyf merged 1 commit into
mainfrom
feat/angular-sync-core-0.2.0-options
Jun 7, 2026
Merged

feat(angular): expose core 0.2.0 morph options in the wrapper#13
antuuanyf merged 1 commit into
mainfrom
feat/angular-sync-core-0.2.0-options

Conversation

@antuuanyf

Copy link
Copy Markdown
Owner

Why

When the core (prettier-modals) was bumped to 0.2.0 with the morph open/close animation, it gained new configurable options that the Angular wrapper (still 0.1.0) never surfaced. This syncs the wrapper with the core API and bumps it to 0.2.0.

What changed

Per-call options (PrettyModalOptions + directive inputs): openDuration, closeDuration, scale, originGap, respectReducedMotion.

  • PrettyModalTriggerDirective: new inputs duration, openDuration, scale, originGap, respectReducedMotion.
  • PrettyModalCloseDirective: new inputs duration, closeDuration.
  • Forwarded only when set, so unset inputs fall back to the core instance defaults instead of overriding them with undefined.

Instance-level config via new providePrettyModal() / PRETTY_MODAL_CONFIG:

  • This is the only way to configure ease / originEase. The core compiles these CustomEase paths once in its constructor (CustomEase.create) — open()/close() never read them per-call — so they're intentionally excluded from PrettyModalOptions and exposed only as instance config.
  • The service now builds new PrettyModal(config) from the injected token.

Other:

  • peerDependency prettier-modals bumped >=0.1.0>=0.2.0.
  • Wrapper version 0.1.00.2.0.
  • README: directive input tables + new "Global defaults (providePrettyModal)" section.
  • Tests: 13 → 18 (new option forwarding + provider config coverage).

Verification

  • npm run build ✅ (ng-packagr)
  • npm test ✅ 18/18

🤖 Generated with Claude Code

The core 0.2.0 morph release added configurable options that the Angular
wrapper never surfaced. Sync them and bump the wrapper to 0.2.0.

- Per-call options (PrettyModalOptions + directive inputs): openDuration,
  closeDuration, scale, originGap, respectReducedMotion. Forwarded only
  when set, so unset inputs fall back to the core instance defaults.
- Instance-level config via providePrettyModal() / PRETTY_MODAL_CONFIG.
  This is the only way to set ease/originEase: the core compiles them once
  in its constructor (CustomEase.create), so they are not read per-call.
- Bump peerDependency prettier-modals to >=0.2.0.
- Docs + tests (13 -> 18).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antuuanyf antuuanyf merged commit cb798d0 into main Jun 7, 2026
1 check passed
@antuuanyf antuuanyf deleted the feat/angular-sync-core-0.2.0-options branch June 7, 2026 12:42
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