Files
Unified_Dashboard_Suite_Go/web/json-suite/docs.html
T

768 lines
52 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<title>JSON Infinity Studio — Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0a0e1a; --bg2: #111827; --bg3: #1a2236; --bg-card: #151d2e;
--bg-hover: #1c2740; --bg-input: #0d1220; --accent: #6366f1; --accent2: #8b5cf6;
--accent-glow: rgba(99,102,241,0.25); --success: #10b981; --warning: #f59e0b;
--danger: #ef4444; --info: #06b6d4; --pink: #ec4899;
--text: #f1f5f9; --text2: #94a3b8; --text3: #64748b; --text4: #475569;
--border: #1e293b; --border2: #334155; --radius: 12px; --radius-sm: 8px;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); line-height:1.7; -webkit-font-smoothing:antialiased; }
::-webkit-scrollbar { width:6px; } ::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border2); border-radius:3px; }
::selection { background:var(--accent); color:#fff; }
/* Layout */
.docs-layout { display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
/* Sidebar Nav */
.docs-nav { background:var(--bg2); border-right:1px solid var(--border); position:sticky; top:0; height:100vh; overflow-y:auto; padding:0; }
.nav-header { padding:20px 18px; border-bottom:1px solid var(--border); }
.nav-header h1 { font-size:14px; font-weight:800; background:linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.nav-header .subtitle { font-size:10px; color:var(--text3); text-transform:uppercase; letter-spacing:1.5px; margin-top:2px; }
.nav-back { display:flex; align-items:center; gap:6px; padding:10px 18px; font-size:11px; color:var(--text3); text-decoration:none; border-bottom:1px solid var(--border); transition:all .15s; }
.nav-back:hover { color:var(--accent); background:var(--bg-hover); }
.nav-section { padding:14px 0 6px; }
.nav-section-title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; color:var(--text4); padding:0 18px; margin-bottom:4px; }
.nav-link { display:flex; align-items:center; gap:8px; padding:6px 18px; font-size:12px; color:var(--text2); text-decoration:none; transition:all .15s; cursor:pointer; border-left:2px solid transparent; }
.nav-link:hover { color:var(--text); background:var(--bg-hover); }
.nav-link.active { color:var(--accent); border-left-color:var(--accent); background:rgba(99,102,241,0.06); font-weight:600; }
.nav-link i { width:16px; text-align:center; font-size:10px; opacity:.7; }
/* Main Content */
.docs-main { padding:40px 60px 80px; max-width:900px; }
/* Hero */
.hero { margin-bottom:48px; padding:32px 36px; background:linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.06)); border:1px solid rgba(99,102,241,0.15); border-radius:16px; }
.hero h1 { font-size:32px; font-weight:800; background:linear-gradient(135deg,var(--accent),var(--accent2),var(--pink)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; margin-bottom:8px; }
.hero p { font-size:14px; color:var(--text2); max-width:600px; }
.hero .run-cmd { margin-top:14px; display:inline-flex; align-items:center; gap:8px; padding:8px 16px; background:var(--bg-input); border:1px solid var(--border2); border-radius:var(--radius-sm); font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--info); }
/* Section */
.doc-section { margin-bottom:48px; scroll-margin-top:24px; }
.doc-section > h2 { font-size:22px; font-weight:800; color:var(--text); margin-bottom:16px; display:flex; align-items:center; gap:10px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.doc-section > h2 .sec-num { font-size:13px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; }
.doc-section > h3 { font-size:16px; font-weight:700; color:var(--text); margin:24px 0 10px; display:flex; align-items:center; gap:8px; }
.doc-section > h3 i { color:var(--accent); font-size:13px; }
.doc-section p { color:var(--text2); font-size:13px; margin-bottom:12px; }
/* Cards */
.info-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:16px 20px; margin:14px 0; }
.info-card.tip { border-left:3px solid var(--success); }
.info-card.warn { border-left:3px solid var(--warning); }
.info-card.note { border-left:3px solid var(--info); }
.info-card .card-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.info-card.tip .card-label { color:var(--success); }
.info-card.warn .card-label { color:var(--warning); }
.info-card.note .card-label { color:var(--info); }
/* Tables */
.doc-table { width:100%; border-collapse:collapse; margin:14px 0; font-size:12px; }
.doc-table th { background:var(--bg3); padding:10px 14px; text-align:left; font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.5px; font-size:10px; border-bottom:1px solid var(--border); }
.doc-table td { padding:8px 14px; border-bottom:1px solid var(--border); color:var(--text2); }
.doc-table tr:hover td { background:var(--bg-hover); }
.doc-table code { font-family:'JetBrains Mono',monospace; font-size:11px; background:rgba(99,102,241,0.1); color:var(--accent); padding:2px 6px; border-radius:4px; }
/* Code */
code { font-family:'JetBrains Mono',monospace; font-size:11px; background:rgba(99,102,241,0.1); color:var(--accent); padding:2px 6px; border-radius:4px; }
pre { background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px; margin:14px 0; overflow-x:auto; }
pre code { background:none; padding:0; font-size:12px; color:var(--info); line-height:1.6; }
/* Step list */
.steps { counter-reset:step; list-style:none; margin:14px 0; }
.steps li { counter-increment:step; position:relative; padding:10px 14px 10px 48px; margin-bottom:6px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:12px; color:var(--text2); transition:all .15s; }
.steps li:hover { border-color:var(--accent); background:var(--bg-hover); }
.steps li::before { content:counter(step); position:absolute; left:14px; top:10px; width:22px; height:22px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; border-radius:6px; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; }
/* Feature grid */
.feat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.feat-item { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px 16px; transition:all .15s; }
.feat-item:hover { border-color:var(--accent); transform:translateY(-1px); }
.feat-item .fi-icon { font-size:16px; margin-bottom:6px; }
.feat-item .fi-title { font-size:12px; font-weight:700; color:var(--text); margin-bottom:3px; }
.feat-item .fi-desc { font-size:11px; color:var(--text3); }
/* Badge */
.badge { display:inline-flex; align-items:center; gap:4px; font-size:10px; padding:3px 10px; border-radius:100px; font-weight:600; }
.badge-accent { background:rgba(99,102,241,0.12); color:var(--accent); }
.badge-success { background:rgba(16,185,129,0.12); color:var(--success); }
.badge-warning { background:rgba(245,158,11,0.12); color:var(--warning); }
.badge-info { background:rgba(6,182,212,0.12); color:var(--info); }
.badge-pink { background:rgba(236,72,153,0.12); color:var(--pink); }
/* Kbd */
kbd { display:inline-flex; padding:2px 7px; background:var(--bg3); border:1px solid var(--border2); border-radius:4px; font-family:'JetBrains Mono',monospace; font-size:10px; color:var(--text2); box-shadow:0 1px 0 var(--border2); }
/* Diagram */
.diagram { background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px; font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--text3); line-height:1.5; white-space:pre; overflow-x:auto; margin:14px 0; }
/* Quick ref */
.qr-item { display:flex; gap:12px; padding:10px 14px; border-bottom:1px solid var(--border); font-size:12px; }
.qr-item:last-child { border-bottom:none; }
.qr-q { color:var(--text3); min-width:280px; font-weight:500; }
.qr-a { color:var(--accent); font-weight:600; }
@media(max-width:768px) {
.docs-layout { grid-template-columns:1fr; }
.docs-nav { display:none; }
.docs-main { padding:20px; }
.feat-grid { grid-template-columns:1fr; }
}
</style>
</head>
<body>
<div class="docs-layout">
<!-- Sidebar Navigation -->
<nav class="docs-nav">
<div class="nav-header">
<h1><i class="fa-solid fa-infinity"></i> JSON Infinity Studio</h1>
<div class="subtitle">Complete Documentation</div>
</div>
<a href="/" class="nav-back"><i class="fa-solid fa-arrow-left"></i> Back to Editor</a>
<div class="nav-section"><div class="nav-section-title">Getting Started</div>
<a class="nav-link" href="#overview"><i class="fa-solid fa-cube"></i> Overview</a>
<a class="nav-link" href="#getting-started"><i class="fa-solid fa-rocket"></i> Getting Started</a>
<a class="nav-link" href="#interface"><i class="fa-solid fa-desktop"></i> Interface Layout</a>
</div>
<div class="nav-section"><div class="nav-section-title">Core Features</div>
<a class="nav-link" href="#file-ops"><i class="fa-solid fa-file"></i> File Operations</a>
<a class="nav-link" href="#tree-nav"><i class="fa-solid fa-sitemap"></i> Tree Navigation</a>
<a class="nav-link" href="#context-menu"><i class="fa-solid fa-bars"></i> Context Menu</a>
<a class="nav-link" href="#editors"><i class="fa-solid fa-pen-to-square"></i> Editor Views</a>
<a class="nav-link" href="#inline-edit"><i class="fa-solid fa-i-cursor"></i> Inline Editing</a>
</div>
<div class="nav-section"><div class="nav-section-title">Power Features</div>
<a class="nav-link" href="#bulk-edit"><i class="fa-solid fa-bolt"></i> Bulk Edit</a>
<a class="nav-link" href="#bulk-append"><i class="fa-solid fa-layer-group"></i> Bulk Append</a>
<a class="nav-link" href="#multi-cat"><i class="fa-solid fa-wand-magic-sparkles"></i> Multi-Category</a>
<a class="nav-link" href="#distribution"><i class="fa-solid fa-shuffle"></i> Distribution Logic</a>
</div>
<div class="nav-section"><div class="nav-section-title">Utilities</div>
<a class="nav-link" href="#schema"><i class="fa-solid fa-magnifying-glass-chart"></i> Schema Analysis</a>
<a class="nav-link" href="#diff"><i class="fa-solid fa-code-compare"></i> Diff / Revert</a>
<a class="nav-link" href="#undo"><i class="fa-solid fa-rotate-left"></i> Undo / Redo</a>
<a class="nav-link" href="#raw"><i class="fa-solid fa-code"></i> Raw Editor</a>
<a class="nav-link" href="#search"><i class="fa-solid fa-search"></i> Search</a>
</div>
<div class="nav-section"><div class="nav-section-title">Reference</div>
<a class="nav-link" href="#shortcuts"><i class="fa-solid fa-keyboard"></i> Shortcuts</a>
<a class="nav-link" href="#placeholders"><i class="fa-solid fa-hashtag"></i> Placeholders</a>
<a class="nav-link" href="#api"><i class="fa-solid fa-plug"></i> API Reference</a>
<a class="nav-link" href="#quick-ref"><i class="fa-solid fa-zap"></i> Quick Reference</a>
</div>
</nav>
<!-- Main Content -->
<main class="docs-main">
<!-- Hero -->
<div class="hero">
<h1>JSON Infinity Studio</h1>
<p>A powerful, browser-based JSON editor with bulk operations, multi-category support, pattern generation, and random/cyclic distribution logic.</p>
<div class="run-cmd"><i class="fa-solid fa-terminal"></i> python app.py → http://localhost:5000</div>
</div>
<!-- 1. Overview -->
<section class="doc-section" id="overview">
<h2><span class="sec-num">1</span> Overview</h2>
<p>JSON Infinity Studio excels at working with complex, deeply nested JSON files. It auto-detects the structure and renders the optimal editor for every node.</p>
<div class="feat-grid">
<div class="feat-item"><div class="fi-icon">🌲</div><div class="fi-title">Visual Tree Navigation</div><div class="fi-desc">Browse any JSON structure with an interactive sidebar tree</div></div>
<div class="feat-item"><div class="fi-icon">📊</div><div class="fi-title">Table Editing</div><div class="fi-desc">Spreadsheet-like editor for arrays of objects</div></div>
<div class="feat-item"><div class="fi-icon">⚡</div><div class="fi-title">Bulk Operations</div><div class="fi-desc">Add/remove/edit fields across hundreds of items at once</div></div>
<div class="feat-item"><div class="fi-icon">🎯</div><div class="fi-title">Multi-Category</div><div class="fi-desc">Apply changes to many arrays simultaneously</div></div>
<div class="feat-item"><div class="fi-icon">🔄</div><div class="fi-title">Pattern Generation</div><div class="fi-desc">Auto-generate values using {i}, {line}, and other placeholders</div></div>
<div class="feat-item"><div class="fi-icon">🎲</div><div class="fi-title">Distribution Logic</div><div class="fi-desc">Random % or cyclic pattern assignment (free/paid, etc.)</div></div>
</div>
<h3><i class="fa-solid fa-puzzle-piece"></i> Supported JSON Structures</h3>
<table class="doc-table">
<tr><th>Schema</th><th>Example</th><th>Description</th></tr>
<tr><td><span class="badge badge-success">flat_object</span></td><td><code>{"name":"App","v":"1.0"}</code></td><td>Simple key-value object</td></tr>
<tr><td><span class="badge badge-info">category_container</span></td><td><code>{"Love":[…],"Birthday":[…]}</code></td><td>Object with all array values</td></tr>
<tr><td><span class="badge badge-accent">nested_categories</span></td><td><code>{"9:16":{"Love":[…]}}</code></td><td>Two-level nesting, arrays at leaves</td></tr>
<tr><td><span class="badge badge-pink">array_of_objects</span></td><td><code>[{"id":1},{"id":2}]</code></td><td>Flat list of objects</td></tr>
<tr><td><span class="badge badge-warning">config_with_data</span></td><td><code>{"name":"App","items":[…]}</code></td><td>Primitives + arrays mixed</td></tr>
</table>
<h3><i class="fa-solid fa-code"></i> Example: Nested Categories JSON</h3>
<p>This is the type of JSON this tool was built for — deeply nested, with arrays of uniform objects:</p>
<pre><code>{
"9:16": {
"Love": [
{ "id": 1, "thumbnail": "love_1.webp", "inapp": "free", "coordinates": "100:200:300:400" },
{ "id": 2, "thumbnail": "love_2.webp", "inapp": "paid", "coordinates": "150:250:350:450" },
{ "id": 3, "thumbnail": "love_3.webp", "inapp": "free", "coordinates": "200:300:400:500" }
],
"Birthday": [
{ "id": 1, "thumbnail": "bday_1.webp", "inapp": "free", "coordinates": "80:160:320:480" }
]
},
"1:1": {
"Abstract": [
{ "id": 1, "thumbnail": "abs_1.webp", "inapp": "paid", "coordinates": "0:0:500:500" }
]
}
}</code></pre>
<div class="info-card note"><div class="card-label">What This Opens As</div>The tree sidebar shows: 📁 9:16 → 📦 Love [3], 📦 Birthday [1] | 📁 1:1 → 📦 Abstract [1]. Clicking Love shows a 3-row table with columns: id, thumbnail, inapp, coordinates.</div>
</section>
<!-- 2. Getting Started -->
<section class="doc-section" id="getting-started">
<h2><span class="sec-num">2</span> Getting Started</h2>
<h3><i class="fa-solid fa-play"></i> Starting the Application</h3>
<pre><code>cd /path/to/appender
python app.py
# → Server at http://0.0.0.0:5000</code></pre>
<h3><i class="fa-solid fa-plus"></i> Creating a New JSON</h3>
<ol class="steps">
<li>Click <strong>"+ New"</strong> in the sidebar</li>
<li>Choose a template: Empty Object, Array of Objects, Nested Categories, Config, or Paste JSON</li>
<li>Name the file → Click <strong>Confirm</strong></li>
</ol>
<h3><i class="fa-solid fa-upload"></i> Loading an Existing JSON</h3>
<ol class="steps">
<li>Click <strong>"↑ Load"</strong> in the sidebar</li>
<li>Select any <code>.json</code> file</li>
<li>The tree structure appears — click any node to start editing</li>
</ol>
<div class="info-card tip"><div class="card-label">💡 Important</div>All edits are made on a working copy. The original file is <strong>never</strong> modified. Use <strong>Revert</strong> to restore the original at any time.</div>
</section>
<!-- 3. Interface Layout -->
<section class="doc-section" id="interface">
<h2><span class="sec-num">3</span> Interface Layout</h2>
<div class="diagram">┌──────────────────────────────────────────────────────────────┐
│ SIDEBAR (272px) │ TOP BAR │
│ ┌────────────────────┐ │ [Multi-Cat] [Diff] [Revert] │
│ │ JSON Infinity ∞ │ │ [Undo] [Redo] [Raw] [Save] [DL] │
│ ├────────────────────┤ ├──────────────────────────────────│
│ │ [+ New] [↑ Load] │ │ CONTENT AREA │
│ ├────────────────────┤ │ Renders based on selected node: │
│ │ 🔍 Search JSON │ │ • Object Editor │
│ ├────────────────────┤ │ • Table Editor (arrays) │
│ │ DETECTED SCHEMA │ │ • List Editor (primitives) │
│ │ 🏗️ Nested Categories│ │ • Primitive Editor │
│ ├────────────────────┤ │ │
│ │ 📁 category1 │ │ │
│ │ 📦 subcategory [5] │ │ │
│ └────────────────────┘ ├──────────────────────────────────│
│ │ STATUS BAR filename · modified │
└──────────────────────────────────────────────────────────────┘</div>
</section>
<!-- 4. File Operations -->
<section class="doc-section" id="file-ops">
<h2><span class="sec-num">4</span> File Operations</h2>
<table class="doc-table">
<tr><th>Action</th><th>How</th><th>Details</th></tr>
<tr><td><strong>Create New</strong></td><td>Sidebar → "New"</td><td>Choose template, name file</td></tr>
<tr><td><strong>Upload File</strong></td><td>Sidebar → "Load"</td><td>Select any .json file</td></tr>
<tr><td><strong>Save Session</strong></td><td>Top bar → Save or <kbd>Ctrl</kbd>+<kbd>S</kbd></td><td>Saves to <code>saved_json/</code> dir + refreshes view</td></tr>
<tr><td><strong>Download</strong></td><td>Top bar → Download</td><td>Downloads <code>updated_&lt;name&gt;.json</code></td></tr>
</table>
</section>
<!-- 5. Tree Navigation -->
<section class="doc-section" id="tree-nav">
<h2><span class="sec-num">5</span> Tree Navigation</h2>
<p>The sidebar tree shows every node with color-coded icons and item count badges.</p>
<table class="doc-table">
<tr><th>Icon</th><th>Type</th><th>Interaction</th></tr>
<tr><td>📁</td><td>Object</td><td>Click to open, right-click for menu</td></tr>
<tr><td>📦</td><td>Array</td><td>Click to view table/list, shows item count</td></tr>
<tr><td>🔤</td><td>String</td><td>Click to edit value</td></tr>
<tr><td>#️⃣</td><td>Number</td><td>Click to edit with +/- stepper</td></tr>
<tr><td>🔘</td><td>Boolean</td><td>Click to toggle</td></tr>
<tr><td>🔗</td><td>URL</td><td>Click to edit, external link icon</td></tr>
<tr><td>🎯</td><td>Coordinate</td><td>x:y:w:h pattern detected</td></tr>
</table>
</section>
<!-- 6. Context Menu -->
<section class="doc-section" id="context-menu">
<h2><span class="sec-num">6</span> Context Menu (Right-Click)</h2>
<p>Right-click any node in the tree for these operations:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--accent)">For Objects</div>Add Child (Object/Array/String/Number/Boolean)</div>
<div class="info-card"><div class="card-label" style="color:var(--info)">For Arrays</div>Add Item (Object/String/Number), <strong>Bulk Append</strong></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">For All Nodes</div>Rename, Duplicate, Move Up/Down, Analyze Schema</div>
<div class="info-card"><div class="card-label" style="color:var(--danger)">Destructive</div>Delete (with confirmation prompt)</div>
</div>
</section>
<!-- 7. Editor Views -->
<section class="doc-section" id="editors">
<h2><span class="sec-num">7</span> Editor Views</h2>
<p>The editor auto-detects the node type and renders the optimal view.</p>
<h3><i class="fa-solid fa-folder-open"></i> Object Editor</h3>
<p>Shows all key-value pairs with type badges, inline editables, toggle switches for booleans, +/- steppers for numbers, and navigation buttons for nested structures.</p>
<pre><code>// Clicking node "9:16" shows the Object Editor:
// ┌──────────────┬──────────────────┬────────┐
// │ KEY │ VALUE │ TYPE │
// ├──────────────┼──────────────────┼────────┤
// │ Love │ → array (3) │ array │
// │ Birthday │ → array (1) │ array │
// └──────────────┴──────────────────┴────────┘</code></pre>
<h3><i class="fa-solid fa-table"></i> Table Editor (Arrays of Objects)</h3>
<p>Spreadsheet-like table with sticky header, double-click editing, checkbox booleans, and URL links.</p>
<pre><code>// Clicking "Love" (an array) shows the Table Editor:
// ┌────┬───────────────┬────────┬─────────────────────┐
// │ id │ thumbnail │ inapp │ coordinates │
// ├────┼───────────────┼────────┼─────────────────────┤
// │ 1 │ love_1.webp │ free │ 100:200:300:400 │
// │ 2 │ love_2.webp │ paid │ 150:250:350:450 │
// │ 3 │ love_3.webp │ free │ 200:300:400:500 │
// └────┴───────────────┴────────┴─────────────────────┘</code></pre>
<table class="doc-table">
<tr><th>Button</th><th>Action</th></tr>
<tr><td><span class="badge badge-accent">Add Col</span></td><td>Add a new column to all items</td></tr>
<tr><td><span class="badge badge-accent">Remove Col</span></td><td>Remove a column from all items</td></tr>
<tr><td><span class="badge badge-accent">Rename Col</span></td><td>Rename a column across all items</td></tr>
<tr><td><span class="badge badge-accent">Bulk Edit</span></td><td>Per-field bulk edit modal</td></tr>
<tr><td><span class="badge badge-pink">Bulk Append</span></td><td>Generate and append new items</td></tr>
</table>
<h3><i class="fa-solid fa-list"></i> List Editor</h3>
<p>For arrays of primitives. Example — a tags array:</p>
<pre><code>// Clicking a node like "tags": ["sunset", "beach", "nature"]
// ┌────┬─────────┬────────┐
// │ # │ Value │ Type │
// ├────┼─────────┼────────┤
// │ 0 │ sunset │ string │
// │ 1 │ beach │ string │
// │ 2 │ nature │ string │
// └────┴─────────┴────────┘</code></pre>
<h3><i class="fa-solid fa-pen"></i> Primitive Editor</h3>
<p>For individual values — type selector + input. Example: clicking <code>"name": "My App"</code> shows a text input with value "My App" and a type dropdown set to "string".</p>
</section>
<!-- 8. Inline Editing -->
<section class="doc-section" id="inline-edit">
<h2><span class="sec-num">8</span> Inline Editing</h2>
<table class="doc-table">
<tr><th>Action</th><th>Gesture</th><th>Save/Cancel</th></tr>
<tr><td>Edit table cell</td><td><strong>Double-click</strong> any cell</td><td><kbd>Enter</kbd> save · <kbd>Esc</kbd> cancel</td></tr>
<tr><td>Rename field key</td><td><strong>Double-click</strong> key name in Object Editor</td><td><kbd>Enter</kbd> save · <kbd>Esc</kbd> cancel</td></tr>
<tr><td>Toggle boolean</td><td><strong>Click</strong> checkbox/toggle</td><td>Saves immediately</td></tr>
</table>
</section>
<!-- 9. Bulk Edit -->
<section class="doc-section" id="bulk-edit">
<h2><span class="sec-num">9</span> Bulk Edit (Per-Field Toggle)</h2>
<p>Table Editor toolbar → <strong>"Bulk Edit"</strong>. Edit multiple fields simultaneously, each with its own mode.</p>
<ol class="steps">
<li>Navigate to an array of objects → Table view appears</li>
<li>Click <strong>"Bulk Edit"</strong> → modal opens with toggleable field cards</li>
<li><strong>Toggle ON</strong> the fields to edit (switch turns green → "editing")</li>
<li>Choose a <strong>Mode</strong> for each enabled field + configure settings</li>
<li>Click <strong>"Apply Changes"</strong></li>
</ol>
<h3><i class="fa-solid fa-sliders"></i> Available Modes</h3>
<table class="doc-table">
<tr><th>Mode</th><th>Description</th><th>Example</th></tr>
<tr><td><span class="badge badge-accent">Set Value</span></td><td>Set all items to the same value</td><td><code>"free"</code></td></tr>
<tr><td><span class="badge badge-accent">Pattern {i}</span></td><td>Use counter in a pattern</td><td><code>thumb_{i}.webp</code> → thumb_1, thumb_2…</td></tr>
<tr><td><span class="badge badge-accent">Sequence</span></td><td>Sequential numbers</td><td>1, 2, 3, 4…</td></tr>
<tr><td><span class="badge badge-accent">Find & Replace</span></td><td>Text find-and-replace</td><td>http: → https:</td></tr>
<tr><td><span class="badge badge-accent">Regex</span></td><td>Regex find-and-replace</td><td><code>(\d+)</code> → <code>item_{i}</code></td></tr>
<tr><td><span class="badge badge-accent">Increment</span></td><td>Add fixed amount to numbers</td><td>+10 to all</td></tr>
<tr><td><span class="badge badge-accent">Prefix/Suffix</span></td><td>Add text before/after</td><td>Prefix: <code>new_</code></td></tr>
<tr><td><span class="badge badge-warning">Conditional</span></td><td>Set IF condition matches</td><td>IF inapp=free THEN premium_{i}</td></tr>
</table>
<h3><i class="fa-solid fa-code"></i> Full Example: Before → After</h3>
<p>Given this array at <code>9:16/Love</code>, apply Bulk Edit with thumbnail=Pattern and inapp=Set:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--warning)">Before</div><pre><code>[
{ "id": 1, "thumbnail": "old_1.jpg", "inapp": "free" },
{ "id": 2, "thumbnail": "old_2.jpg", "inapp": "free" },
{ "id": 3, "thumbnail": "old_3.jpg", "inapp": "paid" }
]</code></pre></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">After (thumbnail=Pattern, inapp=Set "premium")</div><pre><code>[
{ "id": 1, "thumbnail": "https://cdn.com/v2/thumb_1.webp", "inapp": "premium" },
{ "id": 2, "thumbnail": "https://cdn.com/v2/thumb_2.webp", "inapp": "premium" },
{ "id": 3, "thumbnail": "https://cdn.com/v2/thumb_3.webp", "inapp": "premium" }
]</code></pre></div>
</div>
<h3><i class="fa-solid fa-code"></i> Example: Conditional Mode</h3>
<p>IF <code>inapp</code> equals <code>"free"</code> THEN set <code>thumbnail</code> to <code>"free_thumb_{i}.webp"</code>:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--warning)">Before</div><pre><code>[
{ "id": 1, "thumbnail": "t1.webp", "inapp": "free" },
{ "id": 2, "thumbnail": "t2.webp", "inapp": "paid" },
{ "id": 3, "thumbnail": "t3.webp", "inapp": "free" }
]</code></pre></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">After</div><pre><code>[
{ "id": 1, "thumbnail": "free_thumb_1.webp", "inapp": "free" },
{ "id": 2, "thumbnail": "t2.webp", "inapp": "paid" },
{ "id": 3, "thumbnail": "free_thumb_2.webp", "inapp": "free" }
]</code></pre></div>
</div>
</section>
<!-- 10. Bulk Append -->
<section class="doc-section" id="bulk-append">
<h2><span class="sec-num">10</span> Bulk Append Panel</h2>
<p>Table toolbar → <strong>"Bulk Append"</strong> or right-click → <strong>Bulk Append</strong>. Generates and appends new items.</p>
<h3><i class="fa-solid fa-play"></i> Basic Append</h3>
<ol class="steps">
<li>Navigate to an array (e.g., <code>9:16/Love</code>) and click <strong>Bulk Append</strong></li>
<li>Existing columns appear with sample patterns</li>
<li>Set <strong>Manual Count</strong> (e.g., 20)</li>
<li>Edit patterns: <code>thumbnail</code> → <code>https://cdn.com/love_{i}.webp</code></li>
<li>Click <strong>Preview</strong> → verify generated items</li>
<li>Click <strong>Append 20 items</strong></li>
</ol>
<h3><i class="fa-solid fa-file-lines"></i> With Data File</h3>
<ol class="steps">
<li>Prepare a text file with one value per line (e.g., coordinates: <code>100:200:300:400</code>)</li>
<li>Click <strong>Choose File</strong> → count auto-adjusts to line count</li>
<li>Set the coordinates field to <code>{line}</code> — each item gets one line</li>
<li>Preview → Append</li>
</ol>
<h3><i class="fa-solid fa-plus"></i> Adding & Removing Columns</h3>
<p>Click <strong>"+ Add Column"</strong> to create new fields. Each row has a <strong>✕</strong> button to remove it.</p>
<h3><i class="fa-solid fa-sitemap"></i> Multi-Target Append</h3>
<p>When your JSON has multiple arrays, a <strong>TARGET ARRAYS</strong> tree appears with checkboxes.</p>
<h3><i class="fa-solid fa-code"></i> Full Example: Append with Pattern + Random</h3>
<p>Starting array <code>Love</code> has 2 items. Append 3 more with: <code>thumbnail</code>=Pattern <code>love_{i}.webp</code> (start 3), <code>inapp</code>=Random 70% free / 30% paid:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--warning)">Before (2 items)</div><pre><code>[
{ "id": 1, "thumbnail": "love_1.webp", "inapp": "free" },
{ "id": 2, "thumbnail": "love_2.webp", "inapp": "paid" }
]</code></pre></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">After (2 + 3 = 5 items)</div><pre><code>[
{ "id": 1, "thumbnail": "love_1.webp", "inapp": "free" },
{ "id": 2, "thumbnail": "love_2.webp", "inapp": "paid" },
{ "id": 3, "thumbnail": "love_3.webp", "inapp": "free" },
{ "id": 4, "thumbnail": "love_4.webp", "inapp": "free" },
{ "id": 5, "thumbnail": "love_5.webp", "inapp": "paid" }
]</code></pre></div>
</div>
<h3><i class="fa-solid fa-code"></i> Example: Append with Data File</h3>
<p>Upload a file with coordinates (one per line), pattern <code>{line}</code> on <code>coordinates</code> field:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--info)">Input File (coords.txt)</div><pre><code>100:200:300:400
150:250:350:450
200:300:400:500</code></pre></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">Generated Items</div><pre><code>[
{ "id": 1, "thumbnail": "t_1.webp", "coordinates": "100:200:300:400" },
{ "id": 2, "thumbnail": "t_2.webp", "coordinates": "150:250:350:450" },
{ "id": 3, "thumbnail": "t_3.webp", "coordinates": "200:300:400:500" }
]</code></pre></div>
</div>
</section>
<!-- 11. Multi-Category -->
<section class="doc-section" id="multi-cat">
<h2><span class="sec-num">11</span> Multi-Category Add Field + Append</h2>
<p>Top bar → <strong>"Multi-Cat"</strong> button. Add fields and apply distributions across multiple arrays simultaneously.</p>
<h3><i class="fa-solid fa-check-double"></i> Add a Field to All Arrays</h3>
<ol class="steps">
<li>Click <strong>Multi-Cat</strong> → modal shows category tree + field list</li>
<li>Click <strong>Select All</strong> to target all arrays</li>
<li>Click <strong>Add Field</strong> → Name: <code>premium</code>, Value: <code>false</code>, Dist: Static</li>
<li>Click <strong>Apply to Selected Targets</strong></li>
</ol>
<h3><i class="fa-solid fa-shuffle"></i> Add Field with Random Distribution</h3>
<ol class="steps">
<li>Add Field → Name: <code>inapp</code></li>
<li>Set Dist to <strong>Random %</strong></li>
<li>Primary: <code>free</code>, %: <code>70</code>, Secondary: <code>paid</code></li>
<li>Apply → each item gets random "free" or "paid"</li>
</ol>
<h3><i class="fa-solid fa-arrows-spin"></i> Add Field with Cyclic Pattern</h3>
<ol class="steps">
<li>Add Field → Name: <code>tier</code>, Dist: <strong>Cyclic</strong></li>
<li>Pattern: <code>basic, basic, premium</code></li>
<li>Apply → items cycle: basic, basic, premium, basic, basic, premium…</li>
</ol>
<div class="info-card tip"><div class="card-label">💡 Optional: Append New Items</div>Toggle ON "Append new items" and set count to also add new items to each target array.</div>
<h3><i class="fa-solid fa-code"></i> Full Example: Multi-Cat Random on All Arrays</h3>
<p>Add <code>inapp</code> with Random 70% free / 30% paid across <strong>all</strong> arrays in the JSON:</p>
<div class="feat-grid">
<div class="info-card"><div class="card-label" style="color:var(--warning)">Before (no inapp field)</div><pre><code>{
"9:16": {
"Love": [{ "id": 1, "thumbnail": "l1.webp" }],
"Birthday": [{ "id": 1, "thumbnail": "b1.webp" }]
},
"1:1": {
"Abstract": [{ "id": 1, "thumbnail": "a1.webp" }]
}
}</code></pre></div>
<div class="info-card"><div class="card-label" style="color:var(--success)">After (inapp added everywhere)</div><pre><code>{
"9:16": {
"Love": [{ "id": 1, "thumbnail": "l1.webp", "inapp": "free" }],
"Birthday": [{ "id": 1, "thumbnail": "b1.webp", "inapp": "paid" }]
},
"1:1": {
"Abstract": [{ "id": 1, "thumbnail": "a1.webp", "inapp": "free" }]
}
}</code></pre></div>
</div>
</section>
<!-- 12. Distribution Logic -->
<section class="doc-section" id="distribution">
<h2><span class="sec-num">12</span> Distribution Logic</h2>
<p>Available on <strong>every field row</strong> in Bulk Append and Multi-Cat. Each field independently uses:</p>
<table class="doc-table">
<tr><th>Mode</th><th>How It Works</th><th>Example Result</th></tr>
<tr><td><span class="badge badge-accent">Static</span></td><td>Pattern with <code>{i}</code> replacement</td><td><code>img_1.webp</code>, <code>img_2.webp</code>, <code>img_3.webp</code>…</td></tr>
<tr><td><span class="badge badge-success">Random %</span></td><td>Primary value (N% chance) or Secondary</td><td>70% <code>free</code> / 30% <code>paid</code> randomly</td></tr>
<tr><td><span class="badge badge-warning">Cyclic</span></td><td>Repeats comma-separated values in order</td><td><code>free, free, paid</code> → free, free, paid, free, free, paid…</td></tr>
</table>
<h3><i class="fa-solid fa-dice"></i> Random % Use Cases</h3>
<div class="feat-grid">
<div class="feat-item"><div class="fi-title">inapp: 70% free / 30% paid</div><div class="fi-desc">Monetization distribution</div></div>
<div class="feat-item"><div class="fi-title">tier: 80% basic / 20% premium</div><div class="fi-desc">Access tier assignment</div></div>
<div class="feat-item"><div class="fi-title">featured: 10% true / 90% false</div><div class="fi-desc">Highlight selection</div></div>
<div class="feat-item"><div class="fi-title">visible: 50% public / 50% private</div><div class="fi-desc">Visibility control</div></div>
</div>
<h3><i class="fa-solid fa-code"></i> Example: Random % Output (6 items, 70% free)</h3>
<pre><code>// Random %: Primary = "free", % = 70, Secondary = "paid"
// Possible output for 6 items:
[
{ "id": 1, "thumbnail": "t_1.webp", "inapp": "free" }, // ← 70% chance
{ "id": 2, "thumbnail": "t_2.webp", "inapp": "free" }, // ← 70% chance
{ "id": 3, "thumbnail": "t_3.webp", "inapp": "paid" }, // ← 30% chance
{ "id": 4, "thumbnail": "t_4.webp", "inapp": "free" }, // ← 70% chance
{ "id": 5, "thumbnail": "t_5.webp", "inapp": "paid" }, // ← 30% chance
{ "id": 6, "thumbnail": "t_6.webp", "inapp": "free" } // ← 70% chance
]</code></pre>
<h3><i class="fa-solid fa-code"></i> Example: Cyclic Pattern Output</h3>
<pre><code>// Cyclic Pattern: "free, free, paid" — repeats endlessly
[
{ "id": 1, "inapp": "free" }, // cycle pos 0
{ "id": 2, "inapp": "free" }, // cycle pos 1
{ "id": 3, "inapp": "paid" }, // cycle pos 2
{ "id": 4, "inapp": "free" }, // cycle pos 0 (restart)
{ "id": 5, "inapp": "free" }, // cycle pos 1
{ "id": 6, "inapp": "paid" } // cycle pos 2
]</code></pre>
<h3><i class="fa-solid fa-code"></i> Example: Mixed Distribution Across Fields</h3>
<p>Append 4 items where <code>id</code>=Static pattern, <code>thumbnail</code>=Static pattern, <code>inapp</code>=Random 70/30, <code>tier</code>=Cyclic:</p>
<pre><code>// id: Static "{i}" | thumbnail: Static "img_{i}.webp"
// inapp: Random 70% free / 30% paid | tier: Cyclic "basic, basic, premium"
[
{ "id": "1", "thumbnail": "img_1.webp", "inapp": "free", "tier": "basic" },
{ "id": "2", "thumbnail": "img_2.webp", "inapp": "free", "tier": "basic" },
{ "id": "3", "thumbnail": "img_3.webp", "inapp": "paid", "tier": "premium" },
{ "id": "4", "thumbnail": "img_4.webp", "inapp": "free", "tier": "basic" }
]</code></pre>
</section>
<!-- 13. Schema Analysis -->
<section class="doc-section" id="schema">
<h2><span class="sec-num">13</span> Schema Analysis</h2>
<p>Right-click → <strong>Analyze Schema</strong> or the 🔍 button. Shows everything about a node's structure:</p>
<pre><code>// Schema analysis of "9:16/Love" array:
// ┌────────────────────────────────────────────────┐
// │ Schema: array_of_objects | 3 items │
// ├──────────────┬──────────┬───────────────────────┤
// │ Field │ Type │ Sample │
// ├──────────────┼──────────┼───────────────────────┤
// │ id │ number │ 1 │
// │ thumbnail │ string │ love_1.webp │
// │ inapp │ string │ free (2), paid (1) │
// │ coordinates │ string │ 100:200:300:400 │
// └──────────────┴──────────┴───────────────────────┘</code></pre>
<div class="info-card note"><div class="card-label">Use Case</div>Before bulk operations, analyze the schema to understand field types, find nullable fields, and check type consistency. The <code>inapp</code> sample shows "free (2), paid (1)" — confirming the distribution before you modify it.</div>
</section>
<!-- 14. Diff / Revert -->
<section class="doc-section" id="diff">
<h2><span class="sec-num">14</span> Diff / Compare / Revert</h2>
<table class="doc-table">
<tr><th>Action</th><th>Button</th><th>Shows</th></tr>
<tr><td><strong>Compare</strong></td><td>Top bar → "Diff"</td><td>Added keys, removed keys, value changes, array size changes, type changes</td></tr>
<tr><td><strong>Revert</strong></td><td>Top bar → "Revert"</td><td>Restores original data (pushes current to undo stack first)</td></tr>
</table>
<h3><i class="fa-solid fa-code"></i> Example: Diff Output</h3>
<pre><code>// After adding 3 items to Love and adding an "inapp" field to Abstract:
//
// CHANGES DETECTED:
// ────────────────────────────────────────
// 9:16/Love array size: 3 → 6 (+3 items)
// 9:16/Love/0 value changed: thumbnail "old.jpg" → "love_1.webp"
// 1:1/Abstract/0 field added: "inapp" = "free"
// ────────────────────────────────────────</code></pre>
</section>
<!-- 15. Undo / Redo -->
<section class="doc-section" id="undo">
<h2><span class="sec-num">15</span> Undo / Redo</h2>
<p>Every operation is recorded (max 50 steps). Works with ALL operations: edits, deletes, bulk ops, appends, renames, moves.</p>
<table class="doc-table">
<tr><th>Action</th><th>Shortcut</th></tr>
<tr><td>Undo</td><td><kbd>Ctrl</kbd>+<kbd>Z</kbd></td></tr>
<tr><td>Redo</td><td><kbd>Ctrl</kbd>+<kbd>Y</kbd></td></tr>
</table>
</section>
<!-- 16. Raw Editor -->
<section class="doc-section" id="raw">
<h2><span class="sec-num">16</span> Raw JSON Editor</h2>
<p>Click the <strong>&lt;/&gt;</strong> code icon in the top bar. Edit the full JSON as formatted text. Click again to parse and apply. Invalid JSON shows an error.</p>
</section>
<!-- 17. Search -->
<section class="doc-section" id="search">
<h2><span class="sec-num">17</span> Search</h2>
<p>Sidebar search bar or <kbd>Ctrl</kbd>+<kbd>F</kbd>. Searches both keys and values. Results show match type, path, and preview. Click a result to navigate.</p>
</section>
<!-- 18. Keyboard Shortcuts -->
<section class="doc-section" id="shortcuts">
<h2><span class="sec-num">18</span> Keyboard Shortcuts</h2>
<table class="doc-table">
<tr><th>Shortcut</th><th>Action</th></tr>
<tr><td><kbd>Ctrl</kbd>+<kbd>Z</kbd></td><td>Undo</td></tr>
<tr><td><kbd>Ctrl</kbd>+<kbd>Y</kbd></td><td>Redo</td></tr>
<tr><td><kbd>Ctrl</kbd>+<kbd>S</kbd></td><td>Save session + refresh view</td></tr>
<tr><td><kbd>Ctrl</kbd>+<kbd>F</kbd></td><td>Focus search input</td></tr>
</table>
</section>
<!-- 19. Placeholders -->
<section class="doc-section" id="placeholders">
<h2><span class="sec-num">19</span> Pattern Placeholders Reference</h2>
<table class="doc-table">
<tr><th>Placeholder</th><th>Description</th><th>Example</th><th>Output (3rd item)</th></tr>
<tr><td><code>{i}</code></td><td>Counter (configurable start)</td><td><code>img_{i}.webp</code></td><td>img_3.webp</td></tr>
<tr><td><code>{idx}</code></td><td>Zero-based index</td><td><code>item_{idx}</code></td><td>item_2</td></tr>
<tr><td><code>{total}</code></td><td>Total item count</td><td><code>{idx}/{total}</code></td><td>2/50</td></tr>
<tr><td><code>{line}</code></td><td>Line from uploaded file</td><td><code>{line}</code></td><td>100:200:300:400</td></tr>
<tr><td><code>{coord}</code></td><td>Alias for {line}</td><td><code>{coord}</code></td><td>100:200:300:400</td></tr>
<tr><td><code>{value}</code></td><td>Current field value (Bulk Edit)</td><td><code>v2_{value}</code></td><td>v2_old_val</td></tr>
<tr><td><code>{field}</code></td><td>Another field by name</td><td><code>{id}_thumb</code></td><td>3_thumb</td></tr>
</table>
</section>
<!-- 20. API Reference -->
<section class="doc-section" id="api">
<h2><span class="sec-num">20</span> API Endpoints Reference</h2>
<h3><i class="fa-solid fa-file"></i> File Operations</h3>
<table class="doc-table">
<tr><th>Method</th><th>Endpoint</th><th>Description</th></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/upload</code></td><td>Upload JSON file (multipart)</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/create_new</code></td><td>Create from template/paste</td></tr>
<tr><td><span class="badge badge-info">GET</span></td><td><code>/get_tree</code></td><td>Get sidebar tree</td></tr>
<tr><td><span class="badge badge-info">GET</span></td><td><code>/get_data</code></td><td>Get full data + metadata</td></tr>
<tr><td><span class="badge badge-info">GET</span></td><td><code>/download</code></td><td>Download current data</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/save</code></td><td>Save to disk</td></tr>
</table>
<h3><i class="fa-solid fa-cube"></i> Node Operations</h3>
<table class="doc-table">
<tr><th>Method</th><th>Endpoint</th><th>Description</th></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/get</code></td><td>Get node content</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/add</code></td><td>Add child</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/rename</code></td><td>Rename key</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/delete</code></td><td>Delete node</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/duplicate</code></td><td>Clone node</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/edit_value</code></td><td>Edit primitive value</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/edit_item</code></td><td>Edit array item</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/node/move</code></td><td>Reorder within parent</td></tr>
</table>
<h3><i class="fa-solid fa-bolt"></i> Bulk Operations</h3>
<table class="doc-table">
<tr><th>Method</th><th>Endpoint</th><th>Description</th></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/add_field</code></td><td>Add field to all items</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/remove_field</code></td><td>Remove field from all</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/edit_field</code></td><td>Edit field (many modes)</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/edit_multi_field</code></td><td>Edit multiple fields at once</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/rename_field</code></td><td>Rename field across all</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/bulk/add_field_multi</code></td><td>Multi-Cat add fields</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/preview_append</code></td><td>Generate preview items</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/commit_append</code></td><td>Append items to arrays</td></tr>
</table>
<h3><i class="fa-solid fa-wrench"></i> Utilities</h3>
<table class="doc-table">
<tr><th>Method</th><th>Endpoint</th><th>Description</th></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/schema/analyze</code></td><td>Analyze schema at path</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/compare_original</code></td><td>Diff current vs original</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/revert_original</code></td><td>Revert to original</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/undo</code></td><td>Undo last operation</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/redo</code></td><td>Redo</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/search</code></td><td>Search keys + values</td></tr>
<tr><td><span class="badge badge-info">GET</span></td><td><code>/raw/get</code></td><td>Get raw JSON string</td></tr>
<tr><td><span class="badge badge-success">POST</span></td><td><code>/raw/set</code></td><td>Set from raw JSON</td></tr>
</table>
</section>
<!-- Quick Reference -->
<section class="doc-section" id="quick-ref">
<h2><span class="sec-num">⚡</span> Quick Reference</h2>
<div class="info-card" style="padding:0">
<div class="qr-item"><div class="qr-q">"Add a field to every item in one array"</div><div class="qr-a">Table → Add Col</div></div>
<div class="qr-item"><div class="qr-q">"Add a field to ALL arrays in my JSON"</div><div class="qr-a">Multi-Cat → Select All → Add Field</div></div>
<div class="qr-item"><div class="qr-q">"Randomize inapp across all categories"</div><div class="qr-a">Multi-Cat → Random % → free/70%/paid</div></div>
<div class="qr-item"><div class="qr-q">"Append 50 items with auto-gen URLs"</div><div class="qr-a">Bulk Append → pattern {i} → count 50</div></div>
<div class="qr-item"><div class="qr-q">"Append from a coordinate file"</div><div class="qr-a">Bulk Append → upload file → {line}</div></div>
<div class="qr-item"><div class="qr-q">"Edit multiple fields with different rules"</div><div class="qr-a">Bulk Edit → toggle each → set modes</div></div>
<div class="qr-item"><div class="qr-q">"See what changed since loading"</div><div class="qr-a">Top bar → Diff</div></div>
<div class="qr-item"><div class="qr-q">"I messed up, start over"</div><div class="qr-a">Top bar → Revert (undoable)</div></div>
</div>
</section>
</main>
</div>
<script>
// Highlight active nav link on scroll
const sections = document.querySelectorAll('.doc-section');
const navLinks = document.querySelectorAll('.nav-link');
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
navLinks.forEach(l => l.classList.remove('active'));
const id = entry.target.id;
const link = document.querySelector(`.nav-link[href="#${id}"]`);
if (link) link.classList.add('active');
}
});
}, { rootMargin: '-20% 0px -70% 0px' });
sections.forEach(s => observer.observe(s));
</script>
</body>
</html>