Add MindSpace visual page editor and Plaza local Tunnel deployment.
In-preview HTML editing with undo/redo sync replaces Agent patch auto-save; Plaza runs on local Mac via Cloudflare Tunnel with embed height and CSP fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,28 +67,28 @@ export function usePageDraftHistory(initial: PageDraftSnapshot) {
|
||||
[flushDebounced, snapshot],
|
||||
);
|
||||
|
||||
const undo = useCallback(() => {
|
||||
const undo = useCallback((): PageDraftSnapshot | null => {
|
||||
flushDebounced();
|
||||
const previous = pastRef.current[pastRef.current.length - 1];
|
||||
if (!previous) return false;
|
||||
if (!previous) return null;
|
||||
pastRef.current = pastRef.current.slice(0, -1);
|
||||
futureRef.current = [snapshot, ...futureRef.current];
|
||||
stableRef.current = previous;
|
||||
setSnapshot(previous);
|
||||
bump();
|
||||
return true;
|
||||
return previous;
|
||||
}, [flushDebounced, snapshot]);
|
||||
|
||||
const redo = useCallback(() => {
|
||||
const redo = useCallback((): PageDraftSnapshot | null => {
|
||||
flushDebounced();
|
||||
const next = futureRef.current[0];
|
||||
if (!next) return false;
|
||||
if (!next) return null;
|
||||
futureRef.current = futureRef.current.slice(1);
|
||||
pastRef.current = [...pastRef.current, snapshot];
|
||||
stableRef.current = next;
|
||||
setSnapshot(next);
|
||||
bump();
|
||||
return true;
|
||||
return next;
|
||||
}, [flushDebounced, snapshot]);
|
||||
|
||||
const reset = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user