feat: 引入 yuxiang-kit 课程组件源码与运行时

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.8 committed 2026-08-18 13:39:36 +08:00
1 parent 77742d5b02
commit 3995656175
41 files changed
+2752

No files matched your search

@@ -0,0 +1,22 @@
import type { Transform } from "@dnd-kit/utilities";
import { createContext, useContext } from "react";
interface DragDropContextValue {
scale: number;
inverseScale: number;
hasOverlay: boolean;
getScaledTransform: (transform: Transform | null) => Transform | null;
}
const DragDropContext = createContext<DragDropContextValue>({
scale: 1,
inverseScale: 1,
hasOverlay: false,
getScaledTransform: (transform) => transform,
});
export const DragDropContextProvider = DragDropContext.Provider;
export function useDragDropContext() {
return useContext(DragDropContext);
}