From a2d7b89709084a253f7dee856f653d1d2e93a9c9 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Fri, 6 Mar 2026 08:50:38 +0300 Subject: [PATCH] Adopt motion-v for mobile drawer and toolbar animations - MobileDrawer: spring-animated height via motion.div :animate + @pan, replaces useSwipe + manual rAF. Tab state always set (never null), content stays rendered when drawer is closed. - Toolbar: AnimatePresence with directional slide variants and layout-animated width via motion.div layout, replaces manual scrollWidth measuring + inline CSS transitions. - Add SWIPE_VELOCITY_THRESHOLD constant. - activeRibbonTab type narrowed from union | null to union. --- ARCHITECTURE-NEXT.md | 647 ++++++++++++++++++++++++++ CHANGELOG.md | 3 + bun.lock | 59 ++- package.json | 1 + packages/core/src/renderer.ts | 17 +- packages/core/src/tools/ai-adapter.ts | 46 +- packages/core/src/tools/create.ts | 7 + packages/core/src/tools/modify.ts | 20 + packages/core/src/tools/read.ts | 2 + packages/core/src/tools/schema.ts | 2 + packages/core/src/tools/structure.ts | 12 + packages/core/src/tools/variables.ts | 6 + packages/core/src/tools/vector.ts | 10 + src/components/MobileDrawer.vue | 239 +++++----- src/components/Toolbar.vue | 303 ++++++------ src/constants.ts | 1 + src/stores/editor.ts | 2 +- 17 files changed, 1051 insertions(+), 326 deletions(-) create mode 100644 ARCHITECTURE-NEXT.md diff --git a/ARCHITECTURE-NEXT.md b/ARCHITECTURE-NEXT.md new file mode 100644 index 000000000..362f68f9c --- /dev/null +++ b/ARCHITECTURE-NEXT.md @@ -0,0 +1,647 @@ +# OpenPencil Next: Browser-Native Design Tool + +## Vision + +A design tool where every element is real HTML/CSS rendered by a real browser engine. +Not a Figma clone. Not a browser wrapper. A new kind of application built from +WebKit's rendering primitives. + +## Core Concept: Islands + +An **island** is an independent rendering context — its own DOM, styles, layout, +and paint output. Components within an island share CSS context, compose via +Shadow DOM, and have real parent-child relationships. Components on the infinite +canvas that aren't composed together live in separate islands. + +``` +Infinite canvas +│ +├── Island A ─ one Document, one render surface +│ └── +│ ├── +│ └── +│ +├── Island B ─ separate Document, separate surface +│ └── +│ ├── +│ └── +│ +├── Island C ─ standalone component +│ └── (same component class, isolated context) +│ +├── Island D ─ full page composition +│ └── +│ ├── (shares CSS with siblings here) +│ ├── +│ └──