From 59016755dadee6a1fb215968af3cd318dc86f691 Mon Sep 17 00:00:00 2001 From: Tofandel Date: Mon, 9 Dec 2024 16:56:52 +0100 Subject: [PATCH] fix: symbol exported differs from internal --- src/components/ARIA/ARIA.ts | 2 +- src/components/Carousel/Carousel.ts | 2 +- src/components/Icon/Icon.ts | 2 +- src/components/Navigation/Navigation.ts | 2 +- src/components/Pagination/Pagination.ts | 2 +- src/components/Slide/Slide.ts | 2 +- src/injectSymbols.ts | 9 --------- 7 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 src/injectSymbols.ts diff --git a/src/components/ARIA/ARIA.ts b/src/components/ARIA/ARIA.ts index e35ab269..840570a7 100644 --- a/src/components/ARIA/ARIA.ts +++ b/src/components/ARIA/ARIA.ts @@ -1,6 +1,6 @@ import { defineComponent, inject, h } from 'vue' -import { injectCarousel } from '@/injectSymbols' +import { injectCarousel } from '@/shared/injectSymbols' import { i18nFormatter } from '@/utils' export const ARIA = defineComponent({ diff --git a/src/components/Carousel/Carousel.ts b/src/components/Carousel/Carousel.ts index 2e3034af..1c7b5118 100644 --- a/src/components/Carousel/Carousel.ts +++ b/src/components/Carousel/Carousel.ts @@ -20,7 +20,6 @@ import { } from 'vue' import { ARIA as ARIAComponent } from '@/components/ARIA' -import { injectCarousel } from '@/injectSymbols' import { CarouselConfig, DEFAULT_CONFIG, @@ -28,6 +27,7 @@ import { NonNormalizedDir, NormalizedDir, } from '@/shared' +import { injectCarousel } from '@/shared/injectSymbols' import { throttle, getNumberInRange, diff --git a/src/components/Icon/Icon.ts b/src/components/Icon/Icon.ts index b1b9d152..e83c198e 100644 --- a/src/components/Icon/Icon.ts +++ b/src/components/Icon/Icon.ts @@ -1,7 +1,7 @@ import { defineComponent, h, inject, PropType } from 'vue' -import { injectCarousel } from '@/injectSymbols' import { DEFAULT_CONFIG } from '@/shared/constants' +import { injectCarousel } from '@/shared/injectSymbols' import { IconName, IconNameValue, IconProps } from './Icon.types' diff --git a/src/components/Navigation/Navigation.ts b/src/components/Navigation/Navigation.ts index 1bb25c6b..62497368 100644 --- a/src/components/Navigation/Navigation.ts +++ b/src/components/Navigation/Navigation.ts @@ -1,7 +1,7 @@ import { inject, h, defineComponent } from 'vue' -import { injectCarousel } from '@/injectSymbols' import { NormalizedDir } from '@/shared' +import { injectCarousel } from '@/shared/injectSymbols' import { Icon, IconNameValue } from '../Icon' diff --git a/src/components/Pagination/Pagination.ts b/src/components/Pagination/Pagination.ts index acc87780..c5ee1241 100644 --- a/src/components/Pagination/Pagination.ts +++ b/src/components/Pagination/Pagination.ts @@ -1,6 +1,6 @@ import { inject, h, VNode, defineComponent } from 'vue' -import { injectCarousel } from '@/injectSymbols' +import { injectCarousel } from '@/shared/injectSymbols' import { mapNumberToRange, i18nFormatter } from '@/utils' import { PaginationProps } from './Pagination.types' diff --git a/src/components/Slide/Slide.ts b/src/components/Slide/Slide.ts index 7112d650..5da538a2 100644 --- a/src/components/Slide/Slide.ts +++ b/src/components/Slide/Slide.ts @@ -16,7 +16,7 @@ import { watch, } from 'vue' -import { injectCarousel } from '@/injectSymbols' +import { injectCarousel } from '@/shared/injectSymbols' import { SlideProps } from './Slide.types' diff --git a/src/injectSymbols.ts b/src/injectSymbols.ts deleted file mode 100644 index e0a31439..00000000 --- a/src/injectSymbols.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InjectionKey } from 'vue' - -import { InjectedCarousel } from '@/components/Carousel' - -// Use a symbol for inject provide to avoid any kind of collision with another lib -// https://vuejs.org/guide/components/provide-inject#working-with-symbol-keys -export const injectCarousel = Symbol('carousel') as InjectionKey< - InjectedCarousel | undefined ->