From 72f50845eea7f700b2098bc9432973ca245f7ecb Mon Sep 17 00:00:00 2001 From: odykyi <24225497+odykyi@users.noreply.github.com> Date: Tue, 24 Nov 2026 21:41:57 +0100 Subject: [PATCH] feat: embed mode and chat commands (remove background, crop) Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: odykyi <24225497+odykyi@users.noreply.github.com> --- src/App.jsx | 4 +++- src/Editor.jsx | 35 +++++++++++++++++++++++++++++++---- src/demos.css | 3 +++ tests/embed.spec.js | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 tests/embed.spec.js diff --git a/src/App.jsx b/src/App.jsx index 2e9818e..a845b53 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -21,6 +21,8 @@ const TASKS = [ ['mark', 'Watermark PDFs', 'Put your text across every page'], ]; const unlockedAtLoad = initUnlock(); +// ?embed=1: Studio inside chat.flisk.si, without the side panel (chat opens the right tool and sends it commands). +const EMBED = new URLSearchParams(location.search).get('embed') === '1'; const save = (blob, name) => { const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = name; a.click(); setTimeout(() => URL.revokeObjectURL(a.href), 5000); }; const Choice = ({value, set, options}) => ( {options.map(([id, label]) =>