Skip to content

Commit 02cbf43

Browse files
authored
Merge pull request #1635 from privy-open-source/refactor/remove-vue-demi
refactor: remove 'vue-demi'
2 parents b15db5b + a2e79cb commit 02cbf43

File tree

377 files changed

+590
-592
lines changed

Some content is hidden

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

377 files changed

+590
-592
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/public/js/** linguist-vendored

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
"vue": "3.5.13",
134134
"vue-collapsed": "^1.2.5",
135135
"vue-content-loader": "^2.0.1",
136-
"vue-demi": "0.14.10",
137136
"vue-router": "4.5.1",
138137
"vuedraggable": "next",
139138
"webfontloader": "1.6.28",

packages/eslint-config-persona/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Optional, add this to `package.json` script's:
4343
"scripts": {
4444
// ...
4545
"lint": "eslint . --ext .js,.vue,.ts --format pretty",
46-
"fix": "yarn lint:js --fix",
46+
"fix": "yarn lint --fix",
4747
// ...
4848
}
4949
// ...

packages/eslint-config-persona/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ module.exports = {
101101
'align-assignments/align-assignments' : [2, { requiresOnly: false }],
102102
'vue/multi-word-component-names' : 'off',
103103
'vue/no-reserved-component-names' : 'off',
104+
'vue/return-in-computed-property' : 'off',
104105
'vue/html-closing-bracket-newline' : [
105106
'error',
106107
{

packages/persona/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
"tiptap-extension-font-size": "^1.2.0",
103103
"ufo": "^1.5.4",
104104
"vue-collapsed": "1.3.4",
105-
"vue-demi": "0.14.10",
106105
"vuedraggable": "next",
107106
"webfontloader": "1.6.28",
108107
"zxcvbn": "4.4.2"

src/assets/icon/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import pFormGroup from '../../components/form-group/FormGroup.vue'
1717
import pLabel from '../../components/label/Label.vue'
1818
import PiDownload16 from '@privyid/persona-icon/vue/download/16.vue'
1919
import { createSpinner } from '../../components/avatar/utils/create-image'
20-
import { computed, ref } from 'vue-demi'
20+
import { computed, ref } from 'vue'
2121
import {
2222
groupBy,
2323
sortBy,

src/assets/ilustration/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import pFormGroup from '../../components/form-group/FormGroup.vue'
1919
import pLabel from '../../components/label/Label.vue'
2020
import PiDownload16 from '@privyid/persona-icon/vue/download/16.vue'
2121
import { createSpinner } from '../../components/avatar/utils/create-image'
22-
import { computed, ref } from 'vue-demi'
22+
import { computed, ref } from 'vue'
2323
import {
2424
groupBy,
2525
sortBy,

src/components/accordion/Accordion.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render, fireEvent } from '@testing-library/vue'
2-
import { ref } from 'vue-demi'
2+
import { ref } from 'vue'
33
import pAccordion from './Accordion.vue'
44
import pAccordionItem from './AccordionItem.vue'
55
import { defineAccordion } from '.'

src/components/accordion/Accordion.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<script lang="ts" setup>
2525
import { useVModel } from '../input'
2626
import { type AccordionItem } from '.'
27-
import type { PropType } from 'vue-demi'
28-
import { computed } from 'vue-demi'
27+
import type { PropType } from 'vue'
28+
import { computed } from 'vue'
2929
import Item from './AccordionItem.vue'
3030
import AccordionItems from './AccordionItems.vue'
3131

src/components/accordion/AccordionItem.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { render, fireEvent } from '@testing-library/vue'
22
import { vi } from 'vitest'
33
import pAccordionItem from './AccordionItem.vue'
44
import iconPrivy from '@privyid/persona-icon/vue/privy-alt/24.vue'
5-
import { markRaw } from 'vue-demi'
5+
import { markRaw } from 'vue'
66

77
it('should render properly without any props', () => {
88
const screen = render({
@@ -125,8 +125,8 @@ it('Should be able to add custom title class from `titleClass` props', () => {
125125
const screen = render({
126126
components: { pAccordionItem },
127127
template : `
128-
<p-accordion-item
129-
title="custom title class"
128+
<p-accordion-item
129+
title="custom title class"
130130
titleClass="custom-title-class">
131131
content
132132
</p-accordion-item>
@@ -143,7 +143,7 @@ it('Should be able to add custom content class from `contentClass` props', () =>
143143
const screen = render({
144144
components: { pAccordionItem },
145145
template : `
146-
<p-accordion-item
146+
<p-accordion-item
147147
title="custom content class"
148148
contentClass="custom-content-class">
149149
content
@@ -182,7 +182,7 @@ it('Should be able to custom icon via `icon` props', () => {
182182
const screen = render({
183183
components: { pAccordionItem },
184184
template : `
185-
<p-accordion-item
185+
<p-accordion-item
186186
title="custom icon class"
187187
icon="http://lorem-picsum.com">
188188
content
@@ -208,7 +208,7 @@ it('should be able to custom icon with Component and add custom icon class via `
208208
iconPrivy,
209209
},
210210
template: `
211-
<p-accordion-item
211+
<p-accordion-item
212212
title="custom icon"
213213
:icon="icon"
214214
iconClass="custom-icon-class">

src/components/accordion/AccordionItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ import type {
6161
VNode,
6262
PropType,
6363
Component,
64-
} from 'vue-demi'
64+
} from 'vue'
6565
import {
6666
computed,
6767
watch,
6868
h,
69-
} from 'vue-demi'
69+
} from 'vue'
7070
import Subheading from '../subheading/Subheading.vue'
7171
import pCollapse from '../collapse/Collapse.vue'
7272
import ChevronUp from '@privyid/persona-icon/vue/chevron-up/16.vue'

src/components/accordion/AccordionItems.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* TODO: Migrate this component to script setup after defineRender has been release
44
* https://github.com/vuejs/rfcs/discussions/585
55
*/
6-
import type { PropType } from 'vue-demi'
7-
import { defineComponent, h } from 'vue-demi'
6+
import type { PropType } from 'vue'
7+
import { defineComponent, h } from 'vue'
88
import { findAllChildren } from '../utils/vnode'
99
1010
export default defineComponent({

src/components/accordion/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: Display content with collapse behavior
1010
import CaretUp from '@privyid/persona-icon/vue/caret-up/16.vue'
1111
import CaretDown from '@privyid/persona-icon/vue/caret-down/16.vue'
1212
import iconPrivy from '@privyid/persona-icon/vue/privy-alt/24.vue'
13-
import { ref, markRaw } from 'vue-demi'
13+
import { ref, markRaw } from 'vue'
1414
import { withBase } from 'vitepress'
1515

1616
const items = defineAccordion([
@@ -441,7 +441,7 @@ Add props `no-caret` to hide caret icon. Add on `p-accordion` to hide globally,
441441
442442
<script setup lang="ts">
443443
import iconPrivy from '@privyid/persona-icon/vue/privy-alt/24.vue'
444-
import { markRaw } from 'vue-demi'
444+
import { markRaw } from 'vue'
445445
446446
const icon = markRaw(iconPrivy)
447447
</script>

src/components/aspect-ratio/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Directive } from 'vue-demi'
1+
import type { Directive } from 'vue'
22
import { calculateRatio } from './utils/calculate-ratio'
33
import { getObserver } from './utils/resize-observer'
44

src/components/avatar/Avatar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
</template>
1616

1717
<script lang="ts" setup>
18-
import type { PropType } from 'vue-demi'
18+
import type { PropType } from 'vue'
1919
import {
2020
computed,
2121
onMounted,
2222
ref,
2323
watch,
24-
} from 'vue-demi'
24+
} from 'vue'
2525
import {
2626
createAlias,
2727
createSpinner,

src/components/avatar/AvatarGroup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</template>
1212

1313
<script lang="ts" setup>
14-
import type { PropType } from 'vue-demi'
14+
import type { PropType } from 'vue'
1515
import type { SizeVariant } from '.'
1616
import pAvatarTruncate from './AvatarTruncate.vue'
1717

src/components/avatar/AvatarTruncate.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* TODO: Migrate this component to script setup after defineRender has been release
44
* https://github.com/vuejs/rfcs/discussions/585
55
*/
6-
import type { PropType } from 'vue-demi'
6+
import type { PropType } from 'vue'
77
import {
88
h,
99
defineComponent,
10-
} from 'vue-demi'
10+
} from 'vue'
1111
import { findAllChildren } from '../utils/vnode'
1212
import type { SizeVariant } from '.'
1313
import pAvatar from './Avatar.vue'

src/components/badge/Badge.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</template>
88

99
<script lang="ts" setup>
10-
import type { PropType } from 'vue-demi'
11-
import { computed } from 'vue-demi'
10+
import type { PropType } from 'vue'
11+
import { computed } from 'vue'
1212
import type { StyleVariant } from '.'
1313
import type { ColorVariant } from '../button'
1414

src/components/banner/Banner.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import type {
3737
PropType,
3838
StyleValue,
3939
VNode,
40-
} from 'vue-demi'
41-
import { ref, computed } from 'vue-demi'
40+
} from 'vue'
41+
import { ref, computed } from 'vue'
4242
import type { StyleVariant } from '.'
4343
4444
const BannerIcons = {

src/components/breadcrumbs/Breadcrumb.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
</template>
3434

3535
<script lang="ts" setup>
36-
import type { VNode } from 'vue-demi'
37-
import { provide } from 'vue-demi'
36+
import type { VNode } from 'vue'
37+
import { provide } from 'vue'
3838
import type { BreadcrumbItems } from '.'
3939
import BreadcrumbItem from './BreadcrumbItem.vue'
4040
import BreadcrumbItemDropdown from './BreadcrumbItemDropdown.vue'

src/components/breadcrumbs/BreadcrumbItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
</template>
2020

2121
<script lang="ts" setup>
22-
import type { PropType } from 'vue-demi'
22+
import type { PropType } from 'vue'
2323
import {
2424
computed,
2525
inject,
2626
h,
2727
resolveComponent,
28-
} from 'vue-demi'
28+
} from 'vue'
2929
import IconChevron from '@privyid/persona-icon/vue/chevron-right/20.vue'
3030
import type { RouteLocationRaw } from 'vue-router'
3131

src/components/breadcrumbs/BreadcrumbItemDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
computed,
2424
inject,
2525
h,
26-
} from 'vue-demi'
26+
} from 'vue'
2727
import Dropdown from '../dropdown/Dropdown.vue'
2828
import IconChevron from '@privyid/persona-icon/vue/chevron-right/20.vue'
2929

src/components/button-group/ButtonGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
</template>
88

99
<script lang="ts" setup>
10-
import type { PropType } from 'vue-demi'
10+
import type { PropType } from 'vue'
1111
import {
1212
computed,
1313
provide,
1414
toRef,
15-
} from 'vue-demi'
15+
} from 'vue'
1616
import { BUTTONGROUP_SETTING } from '.'
1717
import type { SizeVariant } from '../button'
1818

src/components/button-group/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Collection of buttons consisting of at least 2 buttons in single li
44
---
55

66
<script setup>
7-
import { ref } from "vue-demi"
7+
import { ref } from 'vue'
88
import pButtonGroup from './ButtonGroup.vue'
99
import pButton from '../button/Button.vue'
1010
import pDropdown from '../dropdown/Dropdown.vue'

src/components/button-group/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { InjectionKey, Ref } from 'vue-demi'
1+
import type { InjectionKey, Ref } from 'vue'
22
import type { SizeVariant } from '../button'
33

44
export interface ButtonGroupSetting {

src/components/button/Button.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import type {
2020
PropType,
2121
VNode,
22-
} from 'vue-demi'
22+
} from 'vue'
2323
import {
2424
computed,
2525
inject,
2626
resolveComponent,
27-
} from 'vue-demi'
27+
} from 'vue'
2828
import type { RouteLocationRaw } from 'vue-router'
2929
import type {
3030
ColorVariant,

src/components/calendar/Calendar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render, fireEvent } from '@testing-library/vue'
2-
import { ref } from 'vue-demi'
2+
import { ref } from 'vue'
33
import Calendar from './Calendar.vue'
44

55
it('should render properly without any props', () => {

src/components/calendar/Calendar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ import pButton from '../button/Button.vue'
7878
import pCard from '../card/Card.vue'
7979
import IconNext from '@privyid/persona-icon/vue/chevron-right/20.vue'
8080
import IconBack from '@privyid/persona-icon/vue/chevron-left/20.vue'
81-
import type { PropType } from 'vue-demi'
81+
import type { PropType } from 'vue'
8282
import {
8383
ref,
8484
computed,
8585
watch,
86-
} from 'vue-demi'
86+
} from 'vue'
8787
import type {
8888
CalendarAdapter,
8989
CalendarContext,

src/components/calendar/adapter/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Ref } from 'vue-demi'
1+
import type { Ref } from 'vue'
22
import { type Duration } from 'date-fns'
33
import { chunk } from 'lodash-es'
44

src/components/calendar/adapter/date.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Adapter from './date'
2-
import { ref } from 'vue-demi'
2+
import { ref } from 'vue'
33
import type { CalendarContext, CalendarItem } from './adapter'
44
import { initStore, setLang } from '../../global/store'
55
import {

src/components/calendar/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Sub-component for Datepicker
66
<script setup>
77
import pCalendar from "./Calendar.vue"
88
import Banner from "../banner/Banner.vue"
9-
import { ref } from "vue-demi"
9+
import { ref } from 'vue'
1010
import { format, startOfYear, endOfYear, endOfMonth } from 'date-fns'
1111

1212
const value = ref()

src/components/camera/Camera.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type * as VueUse from '@vueuse/core'
1313
import { defineAdapter } from './adapter/adapter'
1414
import { delay } from 'nanodelay'
1515
import { until } from '@vueuse/core'
16-
import { nextTick, ref } from 'vue-demi'
16+
import { nextTick, ref } from 'vue'
1717
import Camera from './Camera.vue'
1818

1919
vi.mock('./utils/take-picture.ts', () => {

src/components/camera/Camera.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ import type {
121121
ComputedRef,
122122
PropType,
123123
VNode,
124-
} from 'vue-demi'
124+
} from 'vue'
125125
import {
126126
computed,
127127
onBeforeUnmount,
128128
onMounted,
129129
ref,
130130
toRef,
131-
} from 'vue-demi'
131+
} from 'vue'
132132
import pButton from '../button/Button.vue'
133133
import IconRotate from '@privyid/persona-icon/vue/refresh/16.vue'
134134
import IconCamera from '@privyid/persona-icon/vue/camera/24.vue'

src/components/camera/__mocks__/run-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import defu from 'defu'
22
import { vi } from 'vitest'
33
import type { Adapter, AdapterMeta } from '../adapter/adapter'
4-
import type { ComputedRef } from 'vue-demi'
4+
import type { ComputedRef } from 'vue'
55
import {
66
computed,
77
ref,
8-
} from 'vue-demi'
8+
} from 'vue'
99

1010
export const video = document.createElement('video')
1111

0 commit comments

Comments
 (0)