From 5477377788c3ba88edebc2d18d621fe97f835b27 Mon Sep 17 00:00:00 2001 From: Adeel Raza Date: Sun, 4 Oct 2026 08:06:46 +0400 Subject: [PATCH] docs: add Context7 parsing config and agent rules to context7.json Keeps the existing claim fields and adds a description, exclusions (tests, demo, build output, changelog) and rules for coding agents: root import and 'use client', calling methods via the ref after onReady, storing design JSON, passing config through options, and generating design JSON from code with renderToJson() from @unlayer/react-elements. --- context7.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/context7.json b/context7.json index cf79538e..8098531b 100644 --- a/context7.json +++ b/context7.json @@ -1,4 +1,16 @@ { + "$schema": "https://context7.com/schema/context7.json", "url": "https://context7.com/unlayer/react-email-editor", - "public_key": "pk_GRHFX0dq2BRyO29TL79nG" -} \ No newline at end of file + "public_key": "pk_GRHFX0dq2BRyO29TL79nG", + "projectTitle": "React Email Editor (Unlayer)", + "description": "Official React component for embedding Unlayer's drag-and-drop email editor. Load and save design JSON, listen to editor events, and export responsive HTML.", + "excludeFolders": [".github", "test", "demo", "coverage", "dist"], + "excludeFiles": ["CHANGELOG.md", "CONTRIBUTING.md"], + "rules": [ + "Import EmailEditor from 'react-email-editor' (package root only). It is client-only; the bundle includes 'use client', so it works in Next.js App Router Client Components without next/dynamic.", + "Call editor methods through the ref (emailEditorRef.current?.editor), e.g. loadDesign, saveDesign and exportHtml, and only after onReady has fired.", + "Store the design JSON from saveDesign() or exportHtml() to reopen a design later with loadDesign(); send the exported html.", + "Pass Unlayer configuration through the options prop (for example projectId, displayMode, appearance, mergeTags).", + "For templates written in code (by developers, coding agents, or an LLM), generate design JSON with renderToJson() from @unlayer/react-elements and pass it to loadDesign()." + ] +}