@editora/toast 2.0.8 → 2.0.10
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 +16 -0
- package/README.md +274 -858
- package/dist/core/ToastManager.d.ts +1 -0
- package/dist/core/ToastRenderer.d.ts +1 -1
- package/dist/core/safeHtml.d.ts +4 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +422 -318
- package/dist/index.umd.js +1 -1
- package/dist/toast.css +8 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 16ae8ee: Rewrite the READMEs of `@editora/light-code-editor`, `@editora/themes`, `@editora/ui-core`, `@editora/ui-react`, `@editora/ui-sortable` and `@editora/toast`, which are the npm pages of these packages, with screenshots and examples.
|
|
8
|
+
|
|
9
|
+
Their images and links were relative paths that npm cannot show, and several examples did not run. Every example is now a file that is type-checked in strict mode and run in Chromium (React ones under `StrictMode`, drag and drop with the pointer and the keyboard), and the README quotes it word for word (`npm run check:readme-examples`). The screenshots are taken from the same examples (`npm run readme:screenshots`).
|
|
10
|
+
|
|
11
|
+
Things the READMEs now get right that they did not: the `@editora/themes` tokens only set text, border and shadow colours (backgrounds are set by rules), the helpers it exports are documented; `@editora/ui-core` and `@editora/ui-react` list measured bundle sizes (a Button imported from the `@editora/ui-react` root is 1 MB gzipped up front, from its own entry 54 KB up front plus the rest of `ui-core` loaded later); `@editora/toast` documents its defaults (bottom right, four seconds, three visible, theme `system`) and that it is safe to import on the server.
|
|
12
|
+
|
|
13
|
+
## 2.0.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- f53ca3a: Fix several toast bugs. `closable: true` was ignored (only its alias `closeButton` worked), because the config's `closeButton: false` was merged in first and then read ahead of it; an explicit `closable: false` also failed to override a configured `closeButton: true`, and `update()` now adds or removes the close button. `configure({ maxVisible })` never changed the limit (the previously stored `visibleToasts` alias always won). `html: true` rendered the literal markup instead of HTML, because its "sanitizer" escaped everything; it now renders a safe subset (inline formatting, lists and http(s)/mailto/tel/relative links) built from an allowlist, and removes everything else. A toast could stay on "loading" forever when its promise settled before the toast had been registered, and `update()`/`dismiss()` called in the same tick as `show()` were silently dropped; they now wait for the toast. The close button was invisible on touch devices (it only appeared on hover); it is now always visible there. A timer that removed the screen-reader announcement threw if the page body had already been replaced. On touch screens the action and close buttons did nothing (and on desktop a clicked button never took focus and the toast text could not be selected): the swipe-to-dismiss handler cancelled every touchstart/mousedown, which also cancels the click the browser derives from the touch. Presses on controls are now left alone and a drag only takes over once the pointer moves; a gesture the browser cancels (`touchcancel`) no longer leaves the toast stuck mid-drag. Documents `html: true` and persistent toasts in the README, and adds the package's first test suite.
|
|
18
|
+
|
|
3
19
|
All notable changes to this project will be documented in this file.
|
|
4
20
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
21
|
|