Files
Sharang Parnerkar 786bb409e4 refactor(admin): split lib/sdk/context.tsx (1280 LOC) into focused modules
Extract the monolithic SDK context provider into seven focused modules:
- context-types.ts (203 LOC): SDKContextValue interface, initialState, ExtendedSDKAction
- context-reducer.ts (353 LOC): sdkReducer with all action handlers
- context-provider.tsx (495 LOC): SDKProvider component + SDKContext
- context-hooks.ts (17 LOC): useSDK hook
- context-validators.ts (94 LOC): local checkpoint validation logic
- context-projects.ts (67 LOC): project management API helpers
- context-sync-helpers.ts (145 LOC): sync infrastructure init/cleanup/callbacks
- context.tsx (23 LOC): barrel re-export preserving existing import paths

All files under the 500-line hard cap. Build verified with `npx next build`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:55:42 +02:00

24 lines
796 B
TypeScript

'use client'
/**
* AI Compliance SDK Context — barrel re-export.
*
* The implementation has been split into:
* - context-types.ts — SDKContextValue interface, initialState, ExtendedSDKAction
* - context-reducer.ts — sdkReducer
* - context-provider.tsx — SDKProvider component + SDKContext
* - context-hooks.ts — useSDK hook
*
* All public symbols are re-exported here so that existing imports
* (e.g. `import { useSDK } from '@/lib/sdk/context'`) continue to work.
*/
export { initialState, SDK_STORAGE_KEY } from './context-types'
export type { SDKContextValue, ExtendedSDKAction } from './context-types'
export { sdkReducer } from './context-reducer'
export { SDKContext, SDKProvider } from './context-provider'
export { useSDK } from './context-hooks'