react-native-toast-message-library 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,51 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [1.0.0] - 2026-10-24
8
+
9
+ First stable release. The public API (`ToastProvider`, `useToast`, `Toast`, `createTheme`,
10
+ toast options and provider props) follows semantic versioning from now on.
11
+
12
+ ### Added
13
+
14
+ - `description` option: an alias of `message` (use one of them, not both).
15
+ - `titles` provider prop: change or hide the default title per toast type, e.g.
16
+ `titles={{ success: 'Done', error: '' }}`.
17
+ - Validation of `<ToastProvider>` props (`position`, `animation`, `duration`, `maxVisible`, `offset`, `titles`, ...).
18
+ - Unit and render tests for the manager, option handling, offsets, insets and titles.
19
+ - Demo app sections for title/description and offsets.
20
+ - Rewritten README: title and description, top/bottom positions, safe-area insets and offsets, full option tables and copy-paste recipes.
21
+
22
+ ### Fixed
23
+
24
+ - Per-toast `offsetX` / `offsetY` were documented and validated but never applied.
25
+ - An invalid provider `position` / `animation` made toasts "visible" but never drawn; it now throws a clear `TypeError`.
26
+ - `insets={{ top: undefined }}` produced `NaN` positions; undefined / non-numeric insets are now ignored.
27
+ - The progress bar did not restart when a toast was updated in place by re-using its `id`.
28
+ - A toast that had been swiped away and was then shown again with the same `id` stayed off screen.
29
+ - A toast with an empty title and an empty message rendered as an empty box; it now throws a `TypeError`.
30
+ - `ToastApi.success/error/warning/info` types now accept numbers and the full options object.
31
+ - Toast width can no longer become negative with very large offsets.
32
+
33
+ ### Changed
34
+
35
+ - Removed the `engines.node` field. It described the demo app's toolchain and produced warnings for library users on older Node versions.
36
+
37
+ ## [0.1.0] - 2026-10-24
38
+
39
+ ### Added
40
+
41
+ - `ToastProvider`, `useToast()` and an opt-in global `Toast` API.
42
+ - Toast types: success, error, warning, info, custom.
43
+ - Seven positions, safe-area aware, with provider and per-toast offsets.
44
+ - `fade`, `slide`, `zoom` and `none` animations (native driver) with reduced-motion fallback.
45
+ - Auto-dismiss, persistent toasts (`duration: 0`), pause/resume while interacting.
46
+ - FIFO queue with `maxVisible`, unique ids, update-in-place for repeated ids.
47
+ - Close button, leading icon, action button, progress bar, swipe-to-dismiss (built-in `PanResponder`).
48
+ - `onShow`, `onPress`, `onAction`, `onDismiss(reason)` callbacks.
49
+ - Light, dark and system themes, `createTheme()`, per-toast style overrides.
50
+ - Accessibility roles/labels, live regions, throttled iOS announcements.
51
+ - TypeScript declarations in `types/index.d.ts`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Denish Dabhi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.