Merge branch 'feat/custom_schema_and_layout' of github.com:presenton/presenton into feat/custom_schema_and_layout

This commit is contained in:
sauravniraula 2025-07-26 03:32:01 +05:45
commit c247f10318
No known key found for this signature in database
GPG key ID: 60FCC1B5A5E83326
4 changed files with 8 additions and 6 deletions

View file

@ -11,6 +11,7 @@ interface EditableLayoutWrapperProps {
slideIndex: number;
slideData: any;
isEditMode?: boolean;
properties?: any;
}
interface EditableElement {
@ -26,6 +27,7 @@ const EditableLayoutWrapper: React.FC<EditableLayoutWrapperProps> = ({
children,
slideIndex,
slideData,
properties
}) => {
const dispatch = useDispatch();
const containerRef = useRef<HTMLDivElement>(null);
@ -193,13 +195,14 @@ const EditableLayoutWrapper: React.FC<EditableLayoutWrapperProps> = ({
htmlImg.addEventListener('click', clickHandler);
const itemIndex = parseInt(`${slideIndex}-${type}-${dataPath}-${index}`.split('-').pop() || '0');
const properties = slideData.properties?.[itemIndex];
const propertiesData = properties?.[itemIndex];
console.log('propertiesData', propertiesData);
// Add hover effects without changing layout
htmlImg.style.cursor = 'pointer';
htmlImg.style.transition = 'opacity 0.2s, transform 0.2s';
htmlImg.style.objectFit = properties?.objectFit;
htmlImg.style.objectPosition = `${properties?.focusPoint?.x}% ${properties?.focusPoint?.y}%`;
htmlImg.style.objectFit = propertiesData?.initialObjectFit;
htmlImg.style.objectPosition = `${propertiesData?.initialFocusPoint?.x}% ${propertiesData?.initialFocusPoint?.y}%`;
const mouseEnterHandler = () => {
htmlImg.style.opacity = '0.8';

View file

@ -269,7 +269,7 @@ const ImageEditor = ({
<div className="mt-6">
<Tabs defaultValue="generate" className="w-full">
<TabsList className="grid bg-blue-100 border border-blue-300 w-full grid-cols-3 mx-auto">
<TabsList className="grid bg-blue-100 border border-blue-300 w-full grid-cols-2 mx-auto">
<TabsTrigger className="font-medium" value="generate">
AI Generate
</TabsTrigger>

View file

@ -52,7 +52,7 @@ export const useGroupLayouts = () => {
<EditableLayoutWrapper
slideIndex={slide.index}
slideData={slide.content}
properties={slide.properties}
>
<TiptapTextReplacer
key={slide.id}

View file

@ -9,7 +9,6 @@ import Wrapper from "@/components/Wrapper";
import OutlineContent from "./OutlineContent";
import LayoutSelection from "./LayoutSelection";
import EmptyStateView from "./EmptyStateView";
import PageHeader from "./PageHeader";
import GenerateButton from "./GenerateButton";
import { TABS, LayoutGroup } from "../types/index";