From 9babafd66fe0040d31ca4de065dfc7ae9ec36788 Mon Sep 17 00:00:00 2001 From: Simone Mastromattei Date: Sun, 14 Apr 2024 14:43:56 +0200 Subject: [PATCH] 2.4.0 (#50) * Core - Rename NKeys to NType, move Notivue utils to core * Notivue - Fine-tine `pauseOnTabChange: false` behavior * Notivue - Remove unnecessary ResizeObsever repositioning call * Core - Move `isTopAlign` out of `createConfig` * Core - Rename `createWatchers`, remove repositioning watcher, get unwatchers * Core - Add counters, fine-tune repositioning watcher * Core - Add `useNotivueInstance` * Demo - Add NavActions, instance controls * Core, Notifications - Add new type aliases * Dev - Disable minification, nuxt devtools * Notivue - Rename attributes * Core - Sort imports in main entry file * Pkg - Add exports.js, verify-exports.js * Demo - Edit duplicate control behavior * Core - Cleanup useless code in `createStore` * Pkg - Edit README * Core - Update config tests * Tests - Fix import tests * Pkg - Edit README, nuxt/README * Core - Restore triggerRef on queue add/edit methods * Core - Use interfaces, edit some comments * Core - Add Intellisense description to `useNotivueInstance` * Notivue, NotivueKeyboard - Force unmount when not running * Tests - Add instance tests * Tests - Imrpove instance tests nomenclatures * Demo - Move limit select above enqueue control * Notivue - Rename window focus events * Pkg - Bump 2.4.0 * Astro - Make push more readable * Astro - Prefer createdAt istead of counter for event id * Core, Notivue - Fix some typos --- .gitignore | 2 + README.md | 3 - demo/components/nav/Nav.vue | 57 +++++- demo/components/nav/NavActions.vue | 31 ++++ demo/components/nav/NavNotivueConfig.vue | 30 ++-- demo/components/nav/NavPushBuiltIn.vue | 3 +- demo/components/shared/Button.vue | 3 +- demo/nuxt.config.ts | 9 + packages/notivue/Notifications/icons/index.ts | 30 ++-- packages/notivue/Notifications/types.ts | 4 + packages/notivue/Notivue/Notivue.vue | 6 +- packages/notivue/Notivue/NotivueImpl.vue | 15 +- .../composables/useResizeListObserver.ts | 22 ++- .../Notivue/composables/useWindowFocus.ts | 26 +-- packages/notivue/Notivue/utils.ts | 18 +- .../NotivueKeyboard/NotivueKeyboard.vue | 14 +- packages/notivue/astro/Notivue.vue | 2 +- packages/notivue/astro/push.ts | 23 ++- packages/notivue/core/createNotivue.ts | 94 ++++++++-- packages/notivue/core/createPush.ts | 20 +-- packages/notivue/core/createStore.ts | 166 +++++++++++------- ...eateWatchers.ts => createStoreWatchers.ts} | 31 ++-- packages/notivue/core/types.ts | 24 ++- packages/notivue/core/useStore.ts | 58 ++++-- packages/notivue/core/utils.ts | 55 +++++- packages/notivue/index.ts | 30 ++-- packages/notivue/nuxt/README.md | 13 +- packages/notivue/nuxt/module.d.ts | 1 + packages/notivue/nuxt/module.json | 2 +- packages/notivue/nuxt/module.mjs | 31 +--- packages/notivue/package.json | 11 +- packages/notivue/scripts/verify-exports.js | 40 +++++ packages/notivue/scripts/verify-tarball.sh | 1 + packages/notivue/shared/exports.js | 44 +++++ packages/notivue/vite.config.ts | 38 ++-- tests/Notivue/components/Notivue.vue | 52 +++++- tests/Notivue/instance.cy.ts | 93 ++++++++++ tests/Notivue/slot-internal-properties.cy.ts | 4 +- tests/config/update-config.test.ts | 14 +- tests/cypress/support/commands-notivue.ts | 7 +- tests/package.json | 10 +- tests/tsconfig.json | 1 + 42 files changed, 810 insertions(+), 328 deletions(-) create mode 100644 demo/components/nav/NavActions.vue rename packages/notivue/core/{createWatchers.ts => createStoreWatchers.ts} (55%) create mode 100644 packages/notivue/scripts/verify-exports.js create mode 100644 packages/notivue/shared/exports.js create mode 100644 tests/Notivue/instance.cy.ts diff --git a/.gitignore b/.gitignore index f5e24b8f..82fe8e7e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ cypress/screenshots .nuxt pnpm-lock.yaml + +astro-dev diff --git a/README.md b/README.md index 7085bd8e..35fe309e 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,6 @@ _Built-in announcements, reduced-motion and keyboard support_ **💫 Nuxt and Astro modules** _Built-in Nuxt and Astro ad-hoc modules_ -**📜 Complete yet friendly documentation** -_You're covered with a plain-language [documentation](https://notivuedocs.netlify.app/)_ -
## Installation diff --git a/demo/components/nav/Nav.vue b/demo/components/nav/Nav.vue index bee1df2e..fed4acb4 100644 --- a/demo/components/nav/Nav.vue +++ b/demo/components/nav/Nav.vue @@ -1,4 +1,42 @@ + + diff --git a/demo/components/nav/NavPushBuiltIn.vue b/demo/components/nav/NavPushBuiltIn.vue index 192dda66..6f2d6a06 100644 --- a/demo/components/nav/NavPushBuiltIn.vue +++ b/demo/components/nav/NavPushBuiltIn.vue @@ -1,6 +1,5 @@