From 1b67aaa2171e6af392b35ad5a6e425133b1afc08 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Feb 2026 07:53:38 +0000 Subject: [PATCH 1/5] Update src/app/blog/page.tsx --- src/app/blog/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index 8867d02..27e6e20 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -73,4 +73,4 @@ export default function BlogPage() { ); -} \ No newline at end of file +} -- 2.49.1 From 69202d639bbcb8abf60aa41cc5de1a9e10b65ef5 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Feb 2026 07:53:39 +0000 Subject: [PATCH 2/5] Update src/app/layout.tsx --- src/app/layout.tsx | 167 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 158 insertions(+), 9 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 39db9cd..c962013 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -87,7 +87,9 @@ export default function RootLayout({ ' background-color: #4d96ff05 !important;' + '}' + 'img.webild-hover,' + - 'img.webild-selected {' + + 'img.webild-selected,' + + 'video.webild-hover,' + + 'video.webild-selected {' + ' outline-offset: 2px !important;' + '}' + '.webild-element-type-label {' + @@ -159,6 +161,10 @@ export default function RootLayout({ return 'Image'; } + if (tagName === 'video') { + return 'Video'; + } + const backgroundImage = computedStyle.backgroundImage; if (backgroundImage && backgroundImage !== 'none') { const urlMatch = backgroundImage.match(/url(['"]?([^'")]+)['"]?)/); @@ -241,6 +247,38 @@ export default function RootLayout({ return url; }; + const getMediaTypeFromUrl = (url) => { + const videoExts = ['.mp4', '.webm', '.ogg', '.mov', '.avi', '.mkv', '.m4v', '.wmv']; + const imageExts = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.svg', '.bmp', '.ico', '.tiff', '.avif']; + try { + const pathname = new URL(url).pathname.toLowerCase(); + if (videoExts.some(function(ext) { return pathname.endsWith(ext); })) return 'video'; + if (imageExts.some(function(ext) { return pathname.endsWith(ext); })) return 'image'; + } catch(e) {} + return 'unknown'; + }; + + const swapMediaElement = (oldEl, newTag, newSrc) => { + const newEl = document.createElement(newTag); + Array.from(oldEl.attributes).forEach(function(attr) { + if (attr.name !== 'src' && attr.name !== 'alt' && attr.name !== 'srcset' && attr.name !== 'autoplay' && attr.name !== 'loop' && attr.name !== 'muted' && attr.name !== 'playsinline') { + try { newEl.setAttribute(attr.name, attr.value); } catch(e) {} + } + }); + newEl.style.cssText = oldEl.style.cssText; + if (newTag === 'video') { + newEl.setAttribute('autoplay', ''); + newEl.setAttribute('loop', ''); + newEl.setAttribute('muted', ''); + newEl.setAttribute('playsinline', ''); + } + newEl.src = newSrc; + if (oldEl.parentNode) { + oldEl.parentNode.replaceChild(newEl, oldEl); + } + return newEl; + }; + const getElementInfo = (element, assignId = false) => { const rect = element.getBoundingClientRect(); const tagName = element.tagName.toLowerCase(); @@ -283,7 +321,18 @@ export default function RootLayout({ isBackground: false }; } - + + if (tagName === 'video') { + const rawSrc = element.src || element.currentSrc || (element.querySelector('source') && element.querySelector('source').src) || ''; + const resolvedSrc = extractOriginalUrl(rawSrc); + info.imageData = { + src: resolvedSrc, + alt: element.getAttribute('aria-label') || undefined, + isBackground: false, + isVideo: true + }; + } + const computedStyle = window.getComputedStyle(element); const backgroundImage = computedStyle.backgroundImage; if (backgroundImage && backgroundImage !== 'none') { @@ -331,7 +380,8 @@ export default function RootLayout({ const tagName = element.tagName?.toLowerCase(); if (invalidElements.includes(tagName)) return false; const isImage = tagName === 'img'; - if (isImage) return true; + const isVideo = tagName === 'video'; + if (isImage || isVideo) return true; const hasInnerHTML = element.innerHTML && element.innerHTML.trim().length > 0; const hasTextContent = element.textContent && element.textContent.trim().length > 0; const hasChildren = element.children && element.children.length > 0; @@ -371,7 +421,7 @@ export default function RootLayout({ node.nodeType === Node.TEXT_NODE && node.textContent && node.textContent.trim().length > 0 ); - const hasImages = element.tagName === 'IMG' || computedStyle.backgroundImage !== 'none' || element.querySelector('img'); + const hasImages = element.tagName === 'IMG' || element.tagName === 'VIDEO' || computedStyle.backgroundImage !== 'none' || element.querySelector('img') || element.querySelector('video'); const isInteractive = ['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(element.tagName); const hasFewChildren = element.children.length <= 3; const area = rect.width * rect.height; @@ -434,6 +484,20 @@ export default function RootLayout({ originalContent = element.textContent; element.contentEditable = 'true'; + + if (!element.dataset.webildOriginalWhiteSpace) { + const computedStyle = window.getComputedStyle(element); + element.dataset.webildOriginalWhiteSpace = computedStyle.whiteSpace; + element.dataset.webildOriginalWordWrap = computedStyle.wordWrap; + element.dataset.webildOriginalOverflowWrap = computedStyle.overflowWrap; + element.dataset.webildOriginalOverflow = computedStyle.overflow; + } + + element.style.whiteSpace = 'pre-wrap'; + element.style.wordWrap = 'break-word'; + element.style.overflowWrap = 'break-word'; + element.style.overflow = 'visible'; + element.focus(); isEditing = true; @@ -543,6 +607,23 @@ export default function RootLayout({ element.contentEditable = 'false'; isEditing = false; + if (element.dataset.webildOriginalWhiteSpace) { + element.style.whiteSpace = element.dataset.webildOriginalWhiteSpace === 'normal' ? '' : element.dataset.webildOriginalWhiteSpace; + delete element.dataset.webildOriginalWhiteSpace; + } + if (element.dataset.webildOriginalWordWrap) { + element.style.wordWrap = element.dataset.webildOriginalWordWrap === 'normal' ? '' : element.dataset.webildOriginalWordWrap; + delete element.dataset.webildOriginalWordWrap; + } + if (element.dataset.webildOriginalOverflowWrap) { + element.style.overflowWrap = element.dataset.webildOriginalOverflowWrap === 'normal' ? '' : element.dataset.webildOriginalOverflowWrap; + delete element.dataset.webildOriginalOverflowWrap; + } + if (element.dataset.webildOriginalOverflow) { + element.style.overflow = element.dataset.webildOriginalOverflow === 'visible' ? '' : element.dataset.webildOriginalOverflow; + delete element.dataset.webildOriginalOverflow; + } + if (element.dataset.beforeInputHandler === 'true') { element.removeEventListener('beforeinput', () => {}); delete element.dataset.beforeInputHandler; @@ -848,6 +929,9 @@ export default function RootLayout({ const handleScroll = () => { if (!isActive) return; + + if (isEditing) return; + if (selectedElement) { makeUneditable(selectedElement, false); selectedElement.classList.remove(selectedClass); @@ -1018,11 +1102,22 @@ export default function RootLayout({ updateButtonText(element, change.oldValue); } } else if (change.type === 'replaceImage') { - const isBackground = element.tagName.toLowerCase() !== 'img'; + const revertTag = element.tagName.toLowerCase(); + const isBackground = revertTag !== 'img' && revertTag !== 'video'; if (isBackground) { element.style.backgroundImage = change.oldValue ? 'url(' + change.oldValue + ')' : ''; } else { - element.src = change.oldValue; + const oldMediaType = getMediaTypeFromUrl(change.oldValue); + if (revertTag === 'video' && oldMediaType === 'image') { + swapMediaElement(element, 'img', change.oldValue); + } else if (revertTag === 'img' && oldMediaType === 'video') { + swapMediaElement(element, 'video', change.oldValue); + } else if (revertTag === 'video') { + element.src = change.oldValue; + element.load(); + } else { + element.src = change.oldValue; + } } } } catch (err) { @@ -1122,7 +1217,7 @@ export default function RootLayout({ if (!isActive) return; if (e.data.type === 'webild-replace-image') { - const { selector, newSrc, isBackground } = e.data.data; + const { selector, newSrc, isBackground, allowMediaTypeSwap } = e.data.data; let element = null; try { @@ -1153,7 +1248,32 @@ export default function RootLayout({ replaced = true; } else if (element.tagName.toLowerCase() === 'img') { oldValue = element.src; - element.src = newSrc; + const newMediaType = getMediaTypeFromUrl(newSrc); + if (newMediaType === 'video' && allowMediaTypeSwap) { + const swapped = swapMediaElement(element, 'video', newSrc); + if (selectedElement === element) selectedElement = swapped; + element = swapped; + } else { + element.src = newSrc; + } + replaced = true; + } else if (element.tagName.toLowerCase() === 'video') { + oldValue = element.src || element.currentSrc || ''; + const newMediaType = getMediaTypeFromUrl(newSrc); + const sources = element.querySelectorAll('source'); + if (newMediaType === 'image' && allowMediaTypeSwap) { + const swapped = swapMediaElement(element, 'img', newSrc); + if (selectedElement === element) selectedElement = swapped; + element = swapped; + } else { + if (sources.length > 0) { + sources.forEach(function(source) { source.src = newSrc; }); + element.load(); + } else { + element.src = newSrc; + element.load(); + } + } replaced = true; } else { const hasBackgroundImage = window.getComputedStyle(element).backgroundImage !== 'none'; @@ -1221,6 +1341,31 @@ export default function RootLayout({ window.addEventListener('scroll', handleScroll, true); window.addEventListener('message', handleMessage, true); + let lastPathname = window.location.pathname; + + const notifyPageChange = () => { + window.parent.postMessage({ + type: 'webild-page-changed', + data: { pathname: window.location.pathname } + }, '*'); + }; + + window.addEventListener('popstate', () => { + if (lastPathname !== window.location.pathname) { + lastPathname = window.location.pathname; + notifyPageChange(); + } + }, true); + + const urlCheckInterval = setInterval(() => { + if (lastPathname !== window.location.pathname) { + lastPathname = window.location.pathname; + notifyPageChange(); + } + }, 500); + + notifyPageChange(); + window.webildCleanup = () => { isActive = false; @@ -1231,6 +1376,10 @@ export default function RootLayout({ removeHoverOverlay(); removeElementTypeLabel(); + if (urlCheckInterval) { + clearInterval(urlCheckInterval); + } + document.removeEventListener('mouseover', handleMouseOver, true); document.removeEventListener('mouseout', handleMouseOut, true); document.removeEventListener('click', handleClick, true); @@ -1262,4 +1411,4 @@ export default function RootLayout({ ); -} \ No newline at end of file +} -- 2.49.1 From 0682a40fd7231cf0fcff027a105f7718cad31b7a Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Feb 2026 07:53:40 +0000 Subject: [PATCH 3/5] Update src/app/page.tsx --- src/app/page.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 488f657..3ba717b 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,6 +10,7 @@ import FeatureBento from "@/components/sections/feature/FeatureBento"; import TestimonialCardFifteen from "@/components/sections/testimonial/TestimonialCardFifteen"; import ContactSplit from "@/components/sections/contact/ContactSplit"; import FooterCard from "@/components/sections/footer/FooterCard"; +import SocialProofOne from "@/components/sections/socialProof/SocialProofOne"; import { Award, BarChart3, CheckCircle, Clock, Cloud, Code, Cpu, Database, Eye, GitBranch, Github, Linkedin, Mail, Monitor, Package, Server, Settings, Shield, Smartphone, Sparkles, TrendingUp, Twitter, Users, Zap } from "lucide-react"; export default function LandingPage() { @@ -103,6 +104,21 @@ export default function LandingPage() { /> +
+ +
+
); -} \ No newline at end of file +} -- 2.49.1 From 49f3b63f00ca9068e604486407a3342b5bf91184 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Feb 2026 07:53:40 +0000 Subject: [PATCH 4/5] Update src/app/shop/[id]/page.tsx --- src/app/shop/[id]/page.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/app/shop/[id]/page.tsx b/src/app/shop/[id]/page.tsx index ac2136a..8539f2d 100644 --- a/src/app/shop/[id]/page.tsx +++ b/src/app/shop/[id]/page.tsx @@ -90,8 +90,7 @@ export default function ProductPage({ params }: ProductPageProps) { { name: "About", id: "about" }, { name: "Work", id: "features" }, { name: "Skills", id: "metrics" }, - { name: "Contact", id: "contact" }, - { name: "Shop", id: "/shop" } + { name: "Contact", id: "contact" } ]} bottomLeftText="Developer & Creator" bottomRightText="hello@hofcoral.dev" @@ -141,8 +140,7 @@ export default function ProductPage({ params }: ProductPageProps) { { name: "About", id: "about" }, { name: "Work", id: "features" }, { name: "Skills", id: "metrics" }, - { name: "Contact", id: "contact" }, - { name: "Shop", id: "/shop" } + { name: "Contact", id: "contact" } ]} bottomLeftText="Developer & Creator" bottomRightText="hello@hofcoral.dev" @@ -199,8 +197,7 @@ export default function ProductPage({ params }: ProductPageProps) { { name: "About", id: "about" }, { name: "Work", id: "features" }, { name: "Skills", id: "metrics" }, - { name: "Contact", id: "contact" }, - { name: "Shop", id: "/shop" } + { name: "Contact", id: "contact" } ]} bottomLeftText="Developer & Creator" bottomRightText="hello@hofcoral.dev" @@ -258,4 +255,4 @@ export default function ProductPage({ params }: ProductPageProps) { ); -} \ No newline at end of file +} -- 2.49.1 From 3a86a1c59491833d8867241c706d170bc769313c Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Feb 2026 07:53:41 +0000 Subject: [PATCH 5/5] Update src/app/shop/page.tsx --- src/app/shop/page.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/shop/page.tsx b/src/app/shop/page.tsx index a20e508..153a8fd 100644 --- a/src/app/shop/page.tsx +++ b/src/app/shop/page.tsx @@ -42,8 +42,7 @@ export default function ShopPage() { { name: "About", id: "about" }, { name: "Work", id: "features" }, { name: "Skills", id: "metrics" }, - { name: "Contact", id: "contact" }, - { name: "Shop", id: "/shop" } + { name: "Contact", id: "contact" } ]} bottomLeftText="Developer & Creator" bottomRightText="hello@hofcoral.dev" @@ -92,8 +91,7 @@ export default function ShopPage() { { name: "About", id: "about" }, { name: "Work", id: "features" }, { name: "Skills", id: "metrics" }, - { name: "Contact", id: "contact" }, - { name: "Shop", id: "/shop" } + { name: "Contact", id: "contact" } ]} bottomLeftText="Developer & Creator" bottomRightText="hello@hofcoral.dev" @@ -126,4 +124,4 @@ export default function ShopPage() { ); -} \ No newline at end of file +} -- 2.49.1