From 3be6fb463f6c6a9319bbe55f91ca4bd079e11dc9 Mon Sep 17 00:00:00 2001 From: Simone Mastromattei Date: Sat, 6 Apr 2024 19:16:19 +0200 Subject: [PATCH] 2.3.0 (#47) * Core - Remove lightningcss bug workaround * Core - Implement `avoidDuplicates` * Notifications - Add duplicate animation, add aria-atomic everywhere * Core - Refactor `useVisibilityChange` * Core - Expose `isStreamPaused` * Notifications - Implement `NotificationProgress` * Core, NotivueKeyboard - Cleanup * Notifications - Fix `--nv-accent` fallback value computation * Demo - Add new controls, cleanup * Pkg - Edit verify script, bump v2.3.0 * Tests - Add NotivueProgress to Notifications test file * Core - Add singular named import aliases to any exported CSS file * Demo - Add duplicate effect to custom notifications * Tests, Notifications - Add duplicate class test * Tests - Add `avoidDuplicates` tests * Tests - Up tests deps * Demo - Up deps --- demo/app.vue | 8 ++- demo/assets/style.css | 2 +- .../FriendRequestNotification.vue | 33 +++++++++- .../SimpleNotification.vue | 31 ++++++++- demo/components/nav/Nav.vue | 2 +- .../nav/NavNotificationsCustomization.vue | 35 +++++----- demo/components/nav/NavNotivueConfig.vue | 65 +++++++------------ demo/components/nav/NavNotivuePosition.vue | 15 ++--- demo/nuxt.config.ts | 7 +- demo/package.json | 8 +-- demo/utils/store.ts | 5 ++ .../{Notifications.vue => Notification.vue} | 6 +- .../Notifications/NotificationProgress.vue | 23 +++++++ packages/notivue/Notifications/constants.ts | 2 + .../Notifications/notifications-progress.css | 46 +++++++++++++ .../notivue/Notifications/notifications.css | 39 +++++++++-- packages/notivue/Notivue/AriaLive.vue | 1 + packages/notivue/Notivue/NotivueImpl.vue | 4 +- .../composables/useVisibilityChange.ts | 30 --------- .../Notivue/composables/useWindowFocus.ts | 35 ++++++++++ .../NotivueKeyboard/NotivueKeyboardImpl.vue | 1 - packages/notivue/core/animations.css | 10 +-- packages/notivue/core/constants.ts | 1 + packages/notivue/core/createNotivue.ts | 2 +- packages/notivue/core/createStore.ts | 57 ++++++++++++++-- packages/notivue/core/types.ts | 5 +- packages/notivue/core/useStore.ts | 5 +- packages/notivue/core/utils.ts | 12 +++- packages/notivue/index.ts | 5 +- packages/notivue/nuxt/module.json | 2 +- packages/notivue/nuxt/module.mjs | 1 + packages/notivue/package.json | 10 ++- packages/notivue/scripts/verify-tarball.sh | 2 +- packages/notivue/vite.config.ts | 1 + tests/Notifications/components/Notivue.vue | 16 ++++- tests/Notifications/elements.cy.ts | 21 +++++- tests/Notivue/components/Notivue.vue | 4 +- tests/Notivue/config-duplicates.cy.ts | 51 +++++++++++++++ .../cypress/support/commands-notifications.ts | 8 +-- tests/package.json | 22 +++---- 40 files changed, 462 insertions(+), 171 deletions(-) rename packages/notivue/Notifications/{Notifications.vue => Notification.vue} (91%) create mode 100644 packages/notivue/Notifications/NotificationProgress.vue create mode 100644 packages/notivue/Notifications/notifications-progress.css delete mode 100644 packages/notivue/Notivue/composables/useVisibilityChange.ts create mode 100644 packages/notivue/Notivue/composables/useWindowFocus.ts create mode 100644 tests/Notivue/config-duplicates.cy.ts diff --git a/demo/app.vue b/demo/app.vue index 07d331ab..233e3845 100644 --- a/demo/app.vue +++ b/demo/app.vue @@ -39,7 +39,7 @@ watch( :item="item as NotivueItem" /> - + + > + + diff --git a/demo/assets/style.css b/demo/assets/style.css index 5d82c279..8d3c45e6 100644 --- a/demo/assets/style.css +++ b/demo/assets/style.css @@ -40,7 +40,7 @@ -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; --app-font-family: 'PT Sans Narrow', Avenir, Helvetica, Arial, sans-serif; - --nav-height: 260px; + --nav-height: 280px; --royal-blue: #438bff; --focus-ring: 0px 0px 0px 2px #fff, 0px 0px 0px 4px var(--royal-blue); --focus-ring-xl: 0px 0px 0px 2px #fff, 0px 0px 0px 5px var(--royal-blue); diff --git a/demo/components/custom-notifications/FriendRequestNotification.vue b/demo/components/custom-notifications/FriendRequestNotification.vue index 82882bee..ebc8bc61 100644 --- a/demo/components/custom-notifications/FriendRequestNotification.vue +++ b/demo/components/custom-notifications/FriendRequestNotification.vue @@ -15,7 +15,15 @@ const { elementsTabIndex } = useNotivueKeyboard()