diff --git a/src/renderer/src/components/MockupWireframe.tsx b/src/renderer/src/components/MockupWireframe.tsx new file mode 100644 index 0000000..684ea92 --- /dev/null +++ b/src/renderer/src/components/MockupWireframe.tsx @@ -0,0 +1,110 @@ +// ─── Mockup wireframe section ─────────────────────────────────────────────── +// Preview of a Mockup node's AI-generated low-fi wireframe plus its actions +// (generate / regenerate, remove, open the external design link). Shared by +// the properties panel and the Wiki element page. + +import React, { useEffect, useRef, useState } from 'react' +import { useDiagramStore } from '../store/diagramStore' +import { loadAISettings } from '../ai/settings' +import { generateWireframe, wireframeDataUri } from '../ai/mockupWireframe' + +export function isHttpUrl(value: string): boolean { + try { + const u = new URL(value) + return u.protocol === 'http:' || u.protocol === 'https:' + } catch { + return false + } +} + +export function MockupWireframe({ + nodeId, + readOnly, + heading =