Skip to content

Commit dc87833

Browse files
smastromcursoragent
andcommitted
Apply oxfmt and oxlint formatting
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b82ce86 commit dc87833

62 files changed

Lines changed: 208 additions & 160 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Notivue
22

3-
## Zero-dependency, powerful, and truly customizable toast notification system for Vue.
4-
5-
Fully typed. Works with Vite, Nuxt, and Astro.
3+
**Zero-dependency, powerful, and truly customizable toast notification system for Vue**
64

75
[Live Demo](https://notivue.smastrom.io) - [Documentation](https://docs.notivue.smastrom.io)
86

@@ -231,8 +229,6 @@ export default defineNuxtConfig({
231229
232230
> **Note:** Astro **6** is not supported yet.
233231
234-
[Installation → Astro](https://docs.notivue.smastrom.io/installation/astro.html)`createNotivue` in the Vue app entry, Notivue island, `client:only`, view transitions.
235-
236232
## Thanks
237233

238234
- [Ionic Team](https://ionic.io/) for the icons

packages/notivue/Notifications/Notification.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
2+
import type { NotificationsProps } from 'notivue'
3+
24
import { unref, watch, shallowRef } from 'vue'
35
46
import { Classes as Cx, DEFAULT_NOTIFICATIONS_PROPS } from './constants'
57
6-
import type { NotificationsProps } from 'notivue'
7-
88
const props = withDefaults(defineProps<NotificationsProps>(), DEFAULT_NOTIFICATIONS_PROPS)
99
1010
const Icon = shallowRef(props.icons[props.item.type])

packages/notivue/Notifications/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CLASS_PREFIX as CX } from '@/core/constants'
2+
23
import { filledIcons } from './icons'
34
import { lightTheme } from './themes'
45

packages/notivue/Notifications/icons/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { markRaw as raw, type SVGAttributes } from 'vue'
2-
3-
import { NotificationTypeKeys as NType } from '@/core/constants'
4-
5-
import SuccessIcon from './SuccessIcon.vue'
1+
import CloseIcon from './CloseIcon.vue'
62
import ErrorIcon from './ErrorIcon.vue'
7-
import InfoIcon from './InfoIcon.vue'
8-
import SuccessOutlineIcon from './SuccessOutlineIcon.vue'
93
import ErrorOutlineIcon from './ErrorOutlineIcon.vue'
4+
import InfoIcon from './InfoIcon.vue'
105
import InfoOutlineIcon from './InfoOutlineIcon.vue'
116
import PromiseIcon from './PromiseIcon.vue'
12-
import CloseIcon from './CloseIcon.vue'
7+
import SuccessIcon from './SuccessIcon.vue'
8+
import SuccessOutlineIcon from './SuccessOutlineIcon.vue'
139

1410
import type { NotivueIcons } from 'notivue'
1511

12+
import { markRaw as raw, type SVGAttributes } from 'vue'
13+
14+
import { NotificationTypeKeys as NType } from '@/core/constants'
15+
1616
export const svgProps: SVGAttributes = {
1717
xmlns: 'http://www.w3.org/2000/svg',
1818
viewBox: '0 0 24 24',

packages/notivue/Notifications/themes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import type { NotivueTheme } from 'notivue'
33
/** Duplicate `--nv-promise-*` as `--nv-loading-*` when missing (deprecated alias support). */
44
function withLoadingColorAliases<T extends NotivueTheme>(theme: T): T {
55
const out = { ...theme } as Record<string, string>
6+
67
for (const [k, v] of Object.entries(theme)) {
78
if (k.startsWith('--nv-promise')) {
89
const lk = k.replace('--nv-promise', '--nv-loading')
10+
911
if (out[lk] === undefined) out[lk] = v
1012
}
1113
}
14+
1215
return out as T
1316
}
1417

packages/notivue/Notifications/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import type { Component } from 'vue'
2-
31
import type { NotificationType, NotivueItem } from 'notivue'
2+
import type { Component } from 'vue'
43

54
export interface NotificationsProps {
65
item: NotivueItem

packages/notivue/Notivue/AriaLive.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
2-
import { getAriaLabel as getAriaLiveContent } from './utils'
3-
42
import type { NotivueItem } from 'notivue'
53
import type { CSSProperties } from 'vue'
64
5+
import { getAriaLabel as getAriaLiveContent } from './utils'
6+
77
const props = defineProps<{
88
item: NotivueItem
99
}>()

packages/notivue/Notivue/Notivue.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<script setup lang="ts">
2-
import { useNotivueInstance } from '@/core/useStore'
3-
import { DEFAULT_PROPS } from './constants'
4-
5-
import { NotivueClientOnly } from '@/shared/ClientOnly'
6-
72
import NotivueImpl from './NotivueImpl.vue'
83
94
import type { NotivueComponentSlot, NotivueProps } from 'notivue'
105
6+
import { useNotivueInstance } from '@/core/useStore'
7+
import { NotivueClientOnly } from '@/shared/ClientOnly'
8+
9+
import { DEFAULT_PROPS } from './constants'
10+
1111
const props = withDefaults(defineProps<NotivueProps>(), DEFAULT_PROPS)
1212
1313
const { isRunning } = useNotivueInstance()

packages/notivue/Notivue/NotivueImpl.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<script setup lang="ts">
2-
import { Teleport } from 'vue'
3-
42
import AriaLive from './AriaLive.vue'
53
4+
import type { NotivueProps, NotivueComponentSlot } from 'notivue'
5+
6+
import { Teleport } from 'vue'
7+
68
import { useStore } from '@/core/useStore'
79
import { getSlotItem } from '@/core/utils'
810
11+
import { DEFAULT_PROPS } from './constants'
12+
913
import { useFocusEvents } from './composables/useFocusEvents'
1014
import { useMouseEvents } from './composables/useMouseEvents'
11-
import { useTouchEvents } from './composables/useTouchEvents'
1215
import { useNotivueStyles } from './composables/useNotivueStyles'
16+
import { useReducedMotion } from './composables/useReducedMotion'
1317
import { useSizes } from './composables/useSizes'
18+
import { useTouchEvents } from './composables/useTouchEvents'
1419
import { useWindowFocus } from './composables/useWindowFocus'
15-
import { useReducedMotion } from './composables/useReducedMotion'
16-
1720
import { getAriaLabel } from './utils'
18-
import { DEFAULT_PROPS } from './constants'
19-
20-
import type { NotivueProps, NotivueComponentSlot } from 'notivue'
2121
2222
// Props
2323

packages/notivue/Notivue/composables/useMouseEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { computed } from 'vue'
22

3-
import { isMouse } from '@/Notivue/utils'
43
import { useStore } from '@/core/useStore'
4+
import { isMouse } from '@/Notivue/utils'
55

66
export function useMouseEvents() {
77
const { timeouts, config } = useStore()

0 commit comments

Comments
 (0)