From 84373f40eadf9f09fe96dd0e4274eec80678483e Mon Sep 17 00:00:00 2001
From: Naymur Rahman <66328660+naymurdev@users.noreply.github.com>
Date: Wed, 25 Feb 2026 02:22:40 +0600
Subject: [PATCH 01/24] feat: add unified fullscreen tool playground shell
---
app/(tools)/background-snippets/page.tsx | 20 ++-
app/(tools)/clip-paths/page.tsx | 14 +-
app/(tools)/color-lab/page.tsx | 18 ++-
app/(tools)/layout.tsx | 8 +-
app/(tools)/mesh-gradients/page.tsx | 14 +-
app/(tools)/shadows/page.tsx | 12 +-
app/(tools)/svg-line-draw/page.tsx | 12 +-
components/common/tool-playground-shell.tsx | 164 ++++++++++++++++++++
8 files changed, 235 insertions(+), 27 deletions(-)
create mode 100644 components/common/tool-playground-shell.tsx
diff --git a/app/(tools)/background-snippets/page.tsx b/app/(tools)/background-snippets/page.tsx
index 8acb861..077a53c 100644
--- a/app/(tools)/background-snippets/page.tsx
+++ b/app/(tools)/background-snippets/page.tsx
@@ -2,6 +2,7 @@ import BackgroundSnippetsGenerator from "@/components/view/background-snippets";
import { siteConfig } from "@/lib/utils";
import type { Metadata } from "next";
import React from "react";
+import { ToolPlaygroundShell } from "@/components/common/tool-playground-shell";
export const metadata: Metadata = {
title: "Background Snippets Generator",
description:
@@ -56,11 +57,18 @@ export const metadata: Metadata = {
},
};
function page() {
- return (
- <>
-
{description}
+{exportLabel}
+{exportCode}
+ - {example.name} -
-+ Editors +
+ {[ + { href: "/svg-line-draw", label: "SVG" }, + { href: "/shadows", label: "Shadows" }, + { href: "/clip-paths", label: "Clip" }, + { href: "/mesh-gradients", label: "Mesh" }, + { href: "/background-snippets", label: "BG" }, + { href: "/color-lab", label: "Color" }, + ].map((tool) => ( + + {tool.label} + + ))}- Editors -
- {[ - { href: "/svg-line-draw", label: "SVG" }, - { href: "/shadows", label: "Shadows" }, - { href: "/clip-paths", label: "Clip" }, - { href: "/mesh-gradients", label: "Mesh" }, - { href: "/background-snippets", label: "BG" }, - { href: "/color-lab", label: "Color" }, - ].map((tool) => ( - - {tool.label} - - ))} +Please use a desktop/laptop to view the Editor. @@ -242,9 +259,72 @@ export default function ShadowGenerator() { )}
+ No saved shadows yet. +
+ )} + {mode === "edited" && favouriteShadows.length === 0 && ( ++ No edited/favorited shadows yet. +
+ )} ); } diff --git a/components/view/shadow/shadow-preview.tsx b/components/view/shadow/shadow-preview.tsx index 4b67c8f..3cbd6ad 100644 --- a/components/view/shadow/shadow-preview.tsx +++ b/components/view/shadow/shadow-preview.tsx @@ -38,6 +38,8 @@ interface ShadowPreviewProps { setShadowName: React.Dispatch
@@ -256,7 +262,7 @@ export default function ShadowPreview({
+ Use presets or paste your own `text-shadow` value. +
+{preset.name}
++ Shadow +
+
+ {preset.tailwindV4}
+
+ + Text shadow presets are currently available under the Presets tab. +
+ )} ++ Text Shadow +
+
- {tailwindClass}
+ {twValue}
- box-shadow: {cssValue}
+ {cssProperty}: {cssOutputValue}
- {`Your content here`}
+ {`Your content here`}
- {`Your content here`}
+ {shadowMode === "text"
+ ? `Text Shadow
`
+ : `Your content here`}
- {`// tailwind.config.js
-module.exports = {
- theme: {
- extend: {
- boxShadow: {
- '${activeShadow?.shadowName || activeShadow?.name || "custom"}': '${cssValue}',
- }
- }
- }
-}`}
-
-
- {`// global.css
-@theme {
- --shadow-${activeShadow?.shadowName || activeShadow?.name || "custom"}: ${cssValue};
- }
- `}
+ {`// global.css\n@theme {\n --shadow-${activeShadow?.shadowName || activeShadow?.name || "custom"}: ${cssOutputValue};\n}`}
- Then use it with:{" "}
+ Then use it with{" "}
- shadow-custom
+ {shadowMode === "text"
+ ? "[text-shadow:var(--shadow-custom)]"
+ : "shadow-custom"}
- {preset.tailwindV4}
-
))}
) : (
)} - {shadowMode === "text" && ( -
{shadowMode === "text"
- ? `Text Shadow
`
+ ? `Text Shadow
`
: `Your content here`}
{shadowMode === "text"
- ? `Text Shadow
`
+ ? `Text Shadow
`
: `Your content here`}
Please use a desktop/laptop to view the Editor.
)} -Export clip-path code
+No Edited Shapes Found
- )} - - -+ No Edited Shapes Found +
+ )} ++ No Custom/Saved Shapes Found +
+ )} +- Please use a desktop/laptop to view the Editor. -
- )} - -- No Edited Shapes Found -
- )} -- No Custom/Saved Shapes Found -
- )} -- Click and drag to pan the zoomed view -
- )} -- Use mouse wheel + Ctrl to zoom in/out, or press + and - keys -
-Export clip-path code
-+ Please use a desktop/laptop to view the Editor. +
+ )} + ++ No Edited Shapes Found +
+ )} ++ No Custom/Saved Shapes Found +
+ )} ++ Click and drag to pan the zoomed view +
+ )} ++ Use mouse wheel + Ctrl to zoom in/out, or press + and - keys +
+- Please use a desktop/laptop to view the Editor. -
- )} -+ Please use a desktop/laptop to view the Editor. +
+ )} +- Using the same layer controls as box shadow. For - text-shadow, spread/inset are ignored in output. -
- )} -+ Using the same layer controls as box shadow. For + text-shadow, spread/inset are ignored in output. +
+ )} +- {example.name} -
-+ {example.name} +
+Draw or select a path to preview
-Draw or select a path to preview
+