@san-siva/blogkit 1.1.29 → 1.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/MermaidDynamic.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAuBD,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,4CAkMnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"MermaidDynamic.d.ts","sourceRoot":"","sources":["../../../src/dynamicComponents/MermaidDynamic.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAuBD,QAAA,MAAM,OAAO,GAAI,2CAKd,iBAAiB,4CAqKnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@san-siva/blogkit",
3
- "version": "1.1.29",
3
+ "version": "1.1.30",
4
4
  "description": "A reusable blog component library for React/Next.js applications with code highlighting, diagrams, and rich content features",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -96,36 +96,7 @@ const Mermaid = ({
96
96
  return () => clearTimeout(timer);
97
97
  }, [code, initializeMermaid, applyTransform]);
98
98
 
99
- const handleWheel = useCallback(
100
- (e: WheelEvent) => {
101
- e.preventDefault();
102
- const factor = e.deltaY < 0 ? 1 + ZOOM_STEP : 1 - ZOOM_STEP;
103
- applyTransform(prev => {
104
- const newScale = Math.min(
105
- Math.max(prev.scale * factor, MIN_SCALE),
106
- MAX_SCALE
107
- );
108
- if (!viewportRef.current) return { ...prev, scale: newScale };
109
- const rect = viewportRef.current.getBoundingClientRect();
110
- const cursorX = e.clientX - rect.left;
111
- const cursorY = e.clientY - rect.top;
112
- const ratio = newScale / prev.scale;
113
- return {
114
- scale: newScale,
115
- x: cursorX - (cursorX - prev.x) * ratio,
116
- y: cursorY - (cursorY - prev.y) * ratio,
117
- };
118
- });
119
- },
120
- [applyTransform]
121
- );
122
99
 
123
- useEffect(() => {
124
- const viewport = viewportRef.current;
125
- if (!viewport || !enabled) return;
126
- viewport.addEventListener('wheel', handleWheel, { passive: false });
127
- return () => viewport.removeEventListener('wheel', handleWheel);
128
- }, [handleWheel, enabled]);
129
100
 
130
101
  const handleMouseDown = useCallback((e: React.MouseEvent) => {
131
102
  e.preventDefault();