Skip to content

Commit 6e6f1f6

Browse files
committed
chore: fix remaining lint issues, remove paper from typecheck
1 parent 46ed5c3 commit 6e6f1f6

File tree

15 files changed

+143
-253
lines changed

15 files changed

+143
-253
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,23 @@ Core foundational components and composables:
1919
- `Atom` - Base element wrapper with renderless capabilities
2020
- `Breakpoints` - Responsive breakpoint utilities
2121
- `Context` - Context injection/provision system
22-
- `Group` - Selection grouping with multiple/single modes
2322
- `Hydration` - Client-side hydration utilities
2423
- `Popover` - CSS anchor-positioned popup components
25-
- `Step` - Step-based navigation system
2624
- `Theme` - Theme management and CSS variable injection
2725

2826
**Composables:**
29-
- `useBreakpoints` - Responsive breakpoint detection
3027
- `createContext` - Type-safe context management
28+
- `createTrinity` - Context trio creation utility
29+
- `createPlugin` - Plugin creation helper
30+
- `useBreakpoints` - Responsive breakpoint detection
3131
- `useFilter` - Collection filtering utilities
3232
- `useGroup` - Selection group management
3333
- `useHydration` - SSR hydration helpers
3434
- `useKeydown` - Keyboard event handling
3535
- `useLocale` - Internationalization support
3636
- `useRegistry` - Component registration system
37+
- `useSelection` - Baseline selection logic
38+
- `useSingle` - Single-selection logic
3739
- `useStep` - Step navigation logic
3840
- `useTheme` - Theme switching and CSS variable management
3941
- `useTokens` - Design token system

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "pnpm --filter=playground dev",
88
"build": "pnpm --filter=\"./packages/*\" build",
99
"preview": "vite preview",
10-
"typecheck": "pnpm --filter=\"./packages/*\" typecheck",
10+
"typecheck": "pnpm --filter=\"./packages/0\" typecheck",
1111
"lint": "eslint",
1212
"lint:fix": "eslint --fix",
1313
"storybook": "pnpm --filter=storybook dev",

packages/0/src/components/Group/GroupItem.vue

Lines changed: 0 additions & 60 deletions
This file was deleted.

packages/0/src/components/Group/GroupRoot.vue

Lines changed: 0 additions & 43 deletions
This file was deleted.

packages/0/src/components/Group/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/0/src/components/Step/StepItem.vue

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/0/src/components/Step/StepRoot.vue

Lines changed: 0 additions & 59 deletions
This file was deleted.

packages/0/src/components/Step/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/0/src/components/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ export * from './Atom'
22
// export * from './Avatar'
33
export * from './Breakpoints'
44
export * from './Context'
5-
export * from './Group'
65
export * from './Hydration'
76
export * from './Popover'
8-
export * from './Step'
97
export * from './Theme'

packages/0/src/composables/useGroup/index.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1+
// Factories
2+
import { createContext } from '#v0/factories/createContext'
3+
import { createTrinity } from '#v0/factories/createTrinity'
4+
15
// Composables
26
import { useSelection } from '#v0/composables/useSelection'
37

48
// Utilities
59
import { computed } from 'vue'
610

711
// Transformers
8-
import { toArray } from '#v0/transformers'
12+
import { toArray } from '#v0/transformers/toArray'
913

1014
// Types
1115
import type { ComputedRef } from 'vue'
1216
import type { ID } from '#v0/types'
1317
import type { SelectionContext, SelectionOptions, SelectionTicket } from '#v0/composables/useSelection'
18+
import type { ContextTrinity } from '#v0/factories/createTrinity'
1419

1520
export interface GroupTicket extends SelectionTicket {}
1621

@@ -73,3 +78,30 @@ export function useGroup<
7378
selectedIndexes,
7479
} as E
7580
}
81+
82+
/**
83+
* Creates a group selection registry context with full injection/provision control.
84+
* Returns the complete trinity for advanced usage scenarios.
85+
*
86+
* @param namespace The namespace for the group selection registry context
87+
* @param options Optional configuration for group selection behavior.
88+
* @template Z The structure of the registry group selection items.
89+
* @template E The available methods for the group's context.
90+
* @returns A tuple containing the inject function, provide function, and the group selection context.
91+
*/
92+
export function createGroupContext<
93+
Z extends GroupTicket = GroupTicket,
94+
E extends GroupContext<Z> = GroupContext<Z>,
95+
> (
96+
namespace: string,
97+
options?: GroupOptions,
98+
): ContextTrinity<E> {
99+
const [useGroupContext, _provideGroupContext] = createContext<E>(namespace)
100+
const context = useGroup<Z, E>(options)
101+
102+
function provideGroupContext (_context: E = context, app?: any): E {
103+
return _provideGroupContext(_context, app)
104+
}
105+
106+
return createTrinity<E>(useGroupContext, provideGroupContext, context)
107+
}

0 commit comments

Comments
 (0)