Skip to content

Commit f09eaf3

Browse files
committed
refactor: normalization pass
1 parent 7993ca8 commit f09eaf3

File tree

44 files changed

+261
-174
lines changed

Some content is hidden

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

44 files changed

+261
-174
lines changed

packages/0/src/components/Breakpoints/BreakpointsRoot.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
// Composables
3-
import { createBreakpoints, provideBreakpointsContext } from '#v0/composables/useBreakpoints'
3+
import { createBreakpoints } from '#v0/composables/useBreakpoints'
44
55
// Types
66
import type { BreakpointsContext, BreakpointsOptions } from '#v0/composables/useBreakpoints'
@@ -19,11 +19,11 @@
1919
2020
const props = defineProps<BreakpointsRootProps>()
2121
22-
const breakpointsContext = createBreakpoints(props)
22+
const [, provideBreakpointsContext, context] = createBreakpoints('v0:breakpoints', props)
2323
24-
provideBreakpointsContext(breakpointsContext)
24+
provideBreakpointsContext(context)
2525
</script>
2626

2727
<template>
28-
<slot v-bind="breakpointsContext" />
28+
<slot v-bind="context" />
2929
</template>

packages/0/src/components/Context/ContextItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
// Composables
3-
import { createContext } from '#v0/factories/createContext'
3+
import { createContext } from '#v0/composables/createContext'
44
55
// Utilities
66
import { toRef } from 'vue'

packages/0/src/components/Context/ContextRoot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
// Composables
3-
import { createContext } from '#v0/factories/createContext'
3+
import { createContext } from '#v0/composables/createContext'
44
55
// Types
66
import type { InjectionKey } from 'vue'

packages/0/src/components/Popover/PopoverRoot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Atom } from '#v0/components/Atom'
44
55
// Composables
6-
import { createContext } from '#v0/factories/createContext'
6+
import { createContext } from '#v0/composables/createContext'
77
88
// Utilities
99
import { toRef, useId, type ShallowRef } from 'vue'
File renamed without changes.

packages/0/src/factories/createContext/index.ts renamed to packages/0/src/composables/createContext/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type ContextKey<Z> = InjectionKey<Z> | string
88

99
/**
1010
* A simple wrapper for tapping into a v0 namespace
11+
*
1112
* @param key The provided string or InjectionKey
1213
* @template Z The type values for the context.
1314
* @returns The injected context
File renamed without changes.

packages/0/src/factories/createPlugin/index.ts renamed to packages/0/src/composables/createPlugin/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface Plugin {
1313

1414
/**
1515
* A universal plugin factory to reduce boilerplate code for Vue plugin creation
16+
*
1617
* @param options Configurable object with namespace and provide/setup methods
1718
* @returns A Vue plugin object with install method that runs app w/ context
1819
*
File renamed without changes.

packages/0/src/factories/createTrinity/index.ts renamed to packages/0/src/composables/createTrinity/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type ContextTrinity<Z = unknown> = readonly [
99

1010
/**
1111
* A tuple containing Vue's provide/inject and a context object
12+
*
1213
* @param createContext The function that creates the context
1314
* @param provideContext The function that provides context
1415
* @param context The underlying context object singleton

0 commit comments

Comments
 (0)