Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

feat: add editorial visual preset

tt-a1ib744b0b43e05
diff --git a/README.md b/README.md
index d5bd613b..4d82941a 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
Archify is an agent skill for Cursor, Claude Code, Codex CLI, and OpenCode. Give it a system description or repository; get an interactive, shareable technical map.
-- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion
+- **Open it and present** — five technical diagram types, four visual presets, dark/light themes, and optional finite motion
- **Review architecture changes before merge** — compare two validated snapshots as Before / Delta / After, with exact added, removed, changed, moved, and rerouted facts
- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, trace upstream/downstream authored reach and exact routes, compare roles, and play guided stories without inventing topology
- **One file, ready to trust and share** — typed JSON IR and deterministic checks produce self-contained HTML plus PNG, SVG, WebM, and 1200×630 share cards
@@ -220,7 +220,7 @@ Optional motion and presentation styling are explicit:
}
```
-Omit `animation` for a truly static diagram. `classic` remains the default visual preset.
+Omit `animation` for a truly static diagram. `classic` remains default; `editorial` adds a warm publication look.
## Explore and share the output
diff --git a/README_EN.md b/README_EN.md
index d5bd613b..4d82941a 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -14,7 +14,7 @@
Archify is an agent skill for Cursor, Claude Code, Codex CLI, and OpenCode. Give it a system description or repository; get an interactive, shareable technical map.
-- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion
+- **Open it and present** — five technical diagram types, four visual presets, dark/light themes, and optional finite motion
- **Review architecture changes before merge** — compare two validated snapshots as Before / Delta / After, with exact added, removed, changed, moved, and rerouted facts
- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, trace upstream/downstream authored reach and exact routes, compare roles, and play guided stories without inventing topology
- **One file, ready to trust and share** — typed JSON IR and deterministic checks produce self-contained HTML plus PNG, SVG, WebM, and 1200×630 share cards
@@ -220,7 +220,7 @@ Optional motion and presentation styling are explicit:
}
```
-Omit `animation` for a truly static diagram. `classic` remains the default visual preset.
+Omit `animation` for a truly static diagram. `classic` remains default; `editorial` adds a warm publication look.
## Explore and share the output
diff --git a/README_ZH.md b/README_ZH.md
index 38f19d10..90741281 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -10,7 +10,7 @@
Archify 是适用于 Cursor、Claude Code、Codex CLI 和 OpenCode 的 Agent Skill。给它系统描述或代码仓库,就能得到可交互、可分享的专业技术地图。
-- **打开就是成品** —— 五种技术图、三套视觉预设、深浅主题,以及显式启用的有限动态
+- **打开就是成品** —— 五种技术图、四套视觉预设、深浅主题,以及显式启用的有限动态
- **合并前先看清架构变化** —— 把两份已校验快照对比为 Before / Delta / After,准确区分新增、删除、语义变化、移动和重路由
- **每次探索都有依据** —— 搜索节点、按需打开版本校验过的源码、追踪作者定义的上下游可达范围与精确路径、对比角色、播放故事,但不编造拓扑
- **一个文件即可放心交付** —— Typed JSON IR 和确定性校验生成独立 HTML,并支持 PNG、SVG、WebM 与 1200×630 分享卡片
@@ -215,7 +215,7 @@ node bin/archify.mjs deliver workflow examples/agent-tool-call.workflow.json /tm
}
```
-不设置 `animation` 时结果完全静态;`classic` 始终是默认视觉预设。
+不设置 `animation` 时结果完全静态;`classic` 始终是默认视觉预设。设计评审、发布说明和技术文档可以显式选择 `editorial`,获得暖纸张与深墨色的编辑风格,同时保持几何完全不变。
## 探索与分享
diff --git a/ROADMAP.md b/ROADMAP.md
index a78f9109..e2eb944b 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,8 +1,10 @@
# Archify Roadmap
-As of v2.12.0, the coordinate-stability work has shipped as JSON IR plus typed renderers for architecture, workflow, sequence, data-flow, and lifecycle diagrams. Workflow diagrams now also have phase/group/exception-lane structure, happy-path linting, trace animation, and route-crossing guards. The shared viewer adds deterministic semantic node IDs, optional author-controlled relationship IDs with durable `#relation=` links, a pre-click Intent Trace for exact one-hop traffic, a two-endpoint Route Probe with an inspectable Route Journey over deterministic shortest authored paths, searchable Node Finder navigation, read-only one-hop focus with a renderer-owned Semantic Passport and copyable focus link, upstream/downstream Authored Reachability, a runtime-built Semantic Radar for desktop viewport navigation, bounded typed guided views with a visible Named Chapter Rail, pre-commit Chapter Delta Preview, Shared Anchor Handoff, and path-aware Semantic Story Beats, a reader-controlled Live/Still Motion Governor, share-ready one-shot chapters with a title/route/step/state/progress cue, a viewport-filling Presentation Stage, Semantic Camera framing, pan/zoom, three reader-switchable visual presets, a contain-only 1200×630 Share Card, route-focused Route Share Card and authored-reach Reach Share Card variants, and browser-native WebM export. A generated Proof Lab publishes 11 live scenario artifacts with their exact sources, three named reader views, 99 artifact checks, and named composition receipts; its preview grid stays static while deliberate proof links play one named chapter once. The landing-page Live Proof Stage promotes three of those generated artifacts into the first bounded motion proof, and the README motion reel carries the same proof-first story onto GitHub without claiming SVG animation support. A question-first scenario guide maps concrete user needs to those 11 bounded recipes across the five modes, with one shared source for CLI and GitHub Pages and direct proof navigation. A unified CLI (`bin/archify.mjs`) wraps guide, render, preview, deliver, validate, check, and examples, with optional last-good desktop preview and verified post-commit open handoffs. This file records the design decisions that led there, plus the ideas that were explicitly declined. The original v2.4 / v2.5 backlog (export-scale URL param, color-blind palette, gzip+base64 share links) was considered and dropped — see [Not planned](#not-planned) for the rationale on each.
+As of v2.12.0, the coordinate-stability work has shipped as JSON IR plus typed renderers for architecture, workflow, sequence, data-flow, and lifecycle diagrams. Workflow diagrams now also have phase/group/exception-lane structure, happy-path linting, trace animation, and route-crossing guards. The shared viewer adds deterministic semantic node IDs, optional author-controlled relationship IDs with durable `#relation=` links, a pre-click Intent Trace for exact one-hop traffic, a two-endpoint Route Probe with an inspectable Route Journey over deterministic shortest authored paths, searchable Node Finder navigation, read-only one-hop focus with a renderer-owned Semantic Passport and copyable focus link, upstream/downstream Authored Reachability, a runtime-built Semantic Radar for desktop viewport navigation, bounded typed guided views with a visible Named Chapter Rail, pre-commit Chapter Delta Preview, Shared Anchor Handoff, and path-aware Semantic Story Beats, a reader-controlled Live/Still Motion Governor, share-ready one-shot chapters with a title/route/step/state/progress cue, a viewport-filling Presentation Stage, Semantic Camera framing, pan/zoom, four reader-switchable visual presets, a contain-only 1200×630 Share Card, route-focused Route Share Card and authored-reach Reach Share Card variants, and browser-native WebM export. A generated Proof Lab publishes 11 live scenario artifacts with their exact sources, three named reader views, 99 artifact checks, and named composition receipts; its preview grid stays static while deliberate proof links play one named chapter once. The landing-page Live Proof Stage promotes three of those generated artifacts into the first bounded motion proof, and the README motion reel carries the same proof-first story onto GitHub without claiming SVG animation support. A question-first scenario guide maps concrete user needs to those 11 bounded recipes across the five modes, with one shared source for CLI and GitHub Pages and direct proof navigation. A unified CLI (`bin/archify.mjs`) wraps guide, render, preview, deliver, validate, check, and examples, with optional last-good desktop preview and verified post-commit open handoffs. This file records the design decisions that led there, plus the ideas that were explicitly declined. The original v2.4 / v2.5 backlog (export-scale URL param, color-blind palette, gzip+base64 share links) was considered and dropped — see [Not planned](#not-planned) for the rationale on each.
-The latest Architecture Delta review slice adds an Exact-ID Review Navigator without expanding comparator truth. The proof still opens as a static Before / Delta / After overview and complete sidecar receipt; a reader may select any deterministic authored-change row or deliberately run one finite 1400ms-per-change pass. Components, relationships, and boundaries resolve only through exact generated identity, with generation-time and runtime state/classification checks that disable the navigator on missing, duplicate, or conflicting targets while preserving the static proof. Manual navigation, roving keyboard focus, Escape/Overview cleanup, reduced motion, hidden/print lifecycles, dark/light themes, and all three presets share the same bounded contract. No URL, history, storage, inferred impact, risk, mergeability, GitHub/CI integration, schema, dependency, hosted service, or mobile product surface was added.
+The latest visual-identity slice adds the opt-in `editorial` preset: warm paper and charcoal surfaces, deep ink, ruled structure, publication typography, and a restrained vermilion accent. It is available in all five typed renderers, both themes, session-only Style cycling, canonical SVG, raster, Share Card, Route Card, Reach Card, and finite trace motion. The preset changes only CSS variables and viewer styling; exact SVG geometry, semantic IDs, topology, author data, validation, default Classic output, storage, URLs, dependencies, and mobile product scope remain unchanged. This adapts the visible-style breadth that makes Fireworks Tech Graph and D2 easy to understand from their showcases while keeping Archify's stronger truth and interaction boundaries.
+
+The latest Architecture Delta review slice adds an Exact-ID Review Navigator without expanding comparator truth. The proof still opens as a static Before / Delta / After overview and complete sidecar receipt; a reader may select any deterministic authored-change row or deliberately run one finite 1400ms-per-change pass. Components, relationships, and boundaries resolve only through exact generated identity, with generation-time and runtime state/classification checks that disable the navigator on missing, duplicate, or conflicting targets while preserving the static proof. Manual navigation, roving keyboard focus, Escape/Overview cleanup, reduced motion, hidden/print lifecycles, dark/light themes, and every bundled preset share the same bounded contract. No URL, history, storage, inferred impact, risk, mergeability, GitHub/CI integration, schema, dependency, hosted service, or mobile product surface was added.
The latest engineering-truth slice adds the opt-in Architecture `deployment-ownership` profile. When the user deliberately selects a fail-closed deployment review, every non-external component must name an owner and belong to exactly one region, region and security-group boundaries must exist, databases must be private, each private group must stay inside one shared region, and every membership-changing connection must name its real crossing mechanism. The shared zero-dependency loader enforces those authored facts before rendering; structured diagnostics and validate/deliver receipts expose the exact result, while the Production Deployment proof publishes the passing contract in Gallery. The same no-install package smoke now runs on Ubuntu, macOS, and Windows so the release gate verifies all five modes plus the deployment profile from the committed ZIP. Profile-less v1 diagrams retain their previous bytes and behavior. This is not infrastructure discovery or repository/live-environment verification, and it adds no new renderer, diagram type, visual preset, layout algorithm, viewer panel, dependency, hosted service, telemetry, or mobile surface.
diff --git a/archify.zip b/archify.zip
index 859ae5b9..7ed9bd16 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/SKILL.md b/archify/SKILL.md
index 43517520..d80c7f57 100644
--- a/archify/SKILL.md
+++ b/archify/SKILL.md
@@ -148,7 +148,7 @@ Press <kbd>R</kbd> or use `PATH` to open Route Probe. If one node is already foc
After Route Probe resolves, expose Route Journey over the existing ordered `activeNodeIds` and exact `activeEdges`; do not build a second graph. Render every receipt stop as a native button with one roving Tab stop and add Previous, Next, Journey/Pause/Replay, and Overview controls. The full route stays visible. Position zero owns the source and no incoming edge; position `i > 0` owns exactly `activeEdges[i - 1]`, which alone may emit one finite 780ms marker-free signal. Manual activation pauses playback, while arrows/Home/End move focus and Enter/Space selects. Playback must start only from deliberate Play activation, run one finite pass, preserve the remaining dwell when paused, and reject stale timers with a generation token. Manual pan/zoom, path focus, Diagram Guide, Motion Still, dynamic reduced motion, page hiding, and print pause it without auto-resume. Use Semantic Camera to frame previous/current/next; manual inspection remains available without motion. Escape layers as pause → Overview → clear. Keep `#route=<source>~<target>` endpoint-only and restore to Overview without autoplay. Mobile controls need 44px targets; embed, print, canonical export, schema, IR, layout, dependencies, storage, and authored SVG geometry remain unchanged.
-Choose the authored `meta.visual_preset` with the user by audience, without changing diagram geometry: use `"signal-flow"` for a striking demo, launch graphic, or motion-forward presentation; use `"blueprint"` for deployment maps, design reviews, infrastructure handoffs, and drafting-style technical documentation; omit it (or use `"classic"`) for the stable default visual language. If the user has no preference, keep Classic rather than guessing. In the generated artifact, the reader may press <kbd>S</kbd> or use `Style` to try Classic, Flow, and Blueprint over the exact same topology; this session-only choice updates the canonical SVG and therefore deliberate exports, but never rewrites source JSON, persists a preference, changes the URL, or runs in a passive embed. Every preset supports both themes. WebM export appears only for trace-enabled diagrams and records six seconds directly in a supporting browser.
+Choose the authored `meta.visual_preset` with the user by audience, without changing diagram geometry: use `"signal-flow"` for a striking demo or motion-forward presentation; use `"blueprint"` for deployment maps, infrastructure handoffs, and drafting-style technical documentation; use `"editorial"` for warm publication-style design reviews, launch notes, and narrative documentation; omit it (or use `"classic"`) for the stable default visual language. If the user has no preference, keep Classic rather than guessing. In the generated artifact, the reader may press <kbd>S</kbd> or use `Style` to try Classic, Flow, Blueprint, and Editorial over the exact same topology; this session-only choice updates the canonical SVG and therefore deliberate exports, but never rewrites source JSON, persists a preference, changes the URL, or runs in a passive embed. Every preset supports both themes. WebM export appears only for trace-enabled diagrams and records six seconds directly in a supporting browser.
For Architecture deployment reviews, choose `meta.engineering_profile: "deployment-ownership"` only after the user explicitly asks for a fail-closed deployment contract. Ordinary Architecture diagrams omit it. The profile requires every non-external component to name its owner in `tag` and belong to exactly one `region`; at least one `region` and one `security-group`; every `database` inside a security group; every security group contained within one shared region; and every connection that changes region/security-group membership to name its real boundary-crossing mechanism in `label`. It validates authored facts only. Never infer owners, regions, private placement, or crossing mechanisms, and never describe a passing profile as live-infrastructure or repository verification. `quality_profile` governs visual composition; `engineering_profile` governs this optional deployment contract.
diff --git a/archify/assets/template.html b/archify/assets/template.html
index 27320fe2..4aea7b37 100644
--- a/archify/assets/template.html
+++ b/archify/assets/template.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4520,14 +4761,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/archify/examples/dataflow-product-analytics.html b/archify/examples/dataflow-product-analytics.html
index 4bffcc2c..00aae82f 100644
--- a/archify/examples/dataflow-product-analytics.html
+++ b/archify/examples/dataflow-product-analytics.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -1354,10 +1511,25 @@
.relationship-lens-actions {
display: flex;
flex-direction: column;
- align-items: stretch;
+ align-items: flex-end;
gap: 0.18rem;
}
.relationship-lens-actions button { white-space: nowrap; }
+ .relationship-lens-actions #btn-focus-clear {
+ display: grid;
+ width: 1.75rem;
+ height: 1.75rem;
+ padding: 0;
+ place-items: center;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
+ }
+ .relationship-lens-actions #btn-focus-clear:hover,
+ .relationship-lens-actions #btn-focus-clear:focus-visible {
+ background: var(--toolbar-hover);
+ color: var(--text);
+ }
.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }
.relationship-lens-actions #btn-focus-relations { display: none; }
.relationship-lens-eyebrow {
@@ -1420,12 +1592,163 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
+ .semantic-passport-reach {
+ display: grid;
+ gap: 0.28rem;
+ margin-top: 0.52rem;
+ padding-top: 0.48rem;
+ border-top: 1px solid color-mix(in srgb, var(--toolbar-border) 76%, transparent);
+ }
+ .semantic-passport-reach[hidden] { display: none; }
+ .semantic-passport-reach-label {
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-reach-actions {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.25rem;
+ }
+ .semantic-passport-reach-actions button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.5rem;
+ min-width: 0;
+ min-height: 2rem;
+ padding: 0.32rem 0.42rem;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 86%, transparent);
+ background: color-mix(in srgb, var(--panel) 70%, transparent);
+ color: var(--text-muted);
+ text-align: left;
+ }
+ .semantic-passport-reach-actions button:hover:not(:disabled),
+ .semantic-passport-reach-actions button:focus-visible {
+ border-color: color-mix(in srgb, var(--frontend-stroke) 62%, var(--toolbar-border));
+ color: var(--text);
+ }
+ .semantic-passport-reach-actions button:focus-visible {
+ outline: 2px solid var(--frontend-stroke);
+ outline-offset: 1px;
+ }
+ .semantic-passport-reach-actions button:disabled {
+ cursor: default;
+ opacity: 0.5;
+ }
+ .semantic-passport-reach-actions button[aria-pressed="true"] {
+ border-color: color-mix(in srgb, var(--reach-color, var(--frontend-stroke)) 72%, var(--toolbar-border));
+ background: color-mix(in srgb, var(--reach-fill, var(--frontend-fill)) 48%, transparent);
+ color: var(--text);
+ }
+ #btn-reach-upstream {
+ --reach-color: var(--database-stroke);
+ --reach-fill: var(--database-fill);
+ }
+ #btn-reach-downstream {
+ --reach-color: var(--backend-stroke);
+ --reach-fill: var(--backend-fill);
+ }
+ .semantic-passport-reach-actions strong {
+ color: var(--reach-color, var(--frontend-stroke));
+ font-size: 0.625rem;
+ }
+ .semantic-passport-reach-status {
+ color: var(--text-faint);
+ font-size: 0.525rem;
+ line-height: 1.4;
+ }
+ .semantic-passport-reach-status[hidden] { display: none; }
.relationship-lens-list {
max-height: min(18rem, 46vh);
overflow: auto;
@@ -1698,13 +2021,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +2070,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +2085,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +2104,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +2116,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +2168,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +2195,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2364,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2491,6 +2855,8 @@
.story-carrier-overlay { display: none !important; }
.diagram-container svg[data-focus-active] [data-node-id],
.diagram-container svg[data-focus-active] [data-edge-from],
+ .diagram-container svg[data-reach-active] [data-node-id],
+ .diagram-container svg[data-reach-active] [data-edge-from],
.diagram-container svg[data-story-beat] [data-story-step],
.diagram-container svg[data-story-beat] [data-edge-from][data-story-beat-step],
.diagram-container svg[data-route-active] [data-node-id],
@@ -2561,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2597,6 +2982,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2644,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2659,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3035,6 +3427,8 @@
the global zoom level. Reveal only their exact semantic matches. */
svg[data-focus-active] [data-focus-match][data-detail],
svg[data-focus-active] [data-focus-match] [data-detail],
+ svg[data-reach-active] [data-reach-match][data-detail],
+ svg[data-reach-active] [data-reach-match] [data-detail],
svg[data-lens-active] [data-lens-match][data-detail],
svg[data-lens-active] [data-lens-match] [data-detail],
svg[data-legend-preview-active] [data-legend-preview-match][data-detail],
@@ -3053,6 +3447,7 @@
pointer-events: auto;
}
svg[data-focus-active] [data-focus-match] [data-detail-anchor],
+ svg[data-reach-active] [data-reach-match] [data-detail-anchor],
svg[data-lens-active] [data-lens-match] [data-detail-anchor],
svg[data-legend-preview-active] [data-legend-preview-match] [data-detail-anchor],
svg[data-intent-trace-active] [data-intent-trace-match] [data-detail-anchor],
@@ -3084,6 +3479,41 @@
filter: drop-shadow(0 0 7px var(--frontend-stroke));
outline: none;
}
+ /* Verified Source Beacons are installed at runtime only for nodes whose
+ repository evidence passed the local revision/blob/line checks. They
+ live inside the owning node so every focus, route, story, and guided
+ view keeps one coherent opacity state. Export serialization removes
+ them before producing the canonical SVG or any derived visual. */
+ .source-evidence-beacon {
+ pointer-events: none;
+ opacity: 0.76;
+ transition: opacity 160ms ease, filter 160ms ease;
+ }
+ .source-evidence-beacon rect {
+ fill: color-mix(in srgb, var(--mask) 92%, var(--backend-stroke));
+ stroke: color-mix(in srgb, var(--backend-stroke) 82%, var(--panel-border));
+ stroke-width: 1;
+ vector-effect: non-scaling-stroke;
+ }
+ .source-evidence-beacon text {
+ fill: var(--backend-stroke);
+ font-size: 5.5px;
+ font-weight: 800;
+ letter-spacing: 0.06em;
+ text-anchor: middle;
+ text-transform: uppercase;
+ }
+ svg [data-node-id]:hover .source-evidence-beacon,
+ svg [data-node-id]:focus-visible .source-evidence-beacon,
+ svg [data-node-id][data-focus-selected] .source-evidence-beacon {
+ opacity: 1;
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="signal-flow"] .source-evidence-beacon { opacity: 0.9; }
+ svg[data-preset="blueprint"] .source-evidence-beacon rect {
+ rx: 0.8px;
+ filter: none;
+ }
svg [data-legend-kind][role="button"] { cursor: pointer; }
svg [data-legend-kind]:focus { outline: none; }
svg [data-legend-hit] {
@@ -3199,6 +3629,30 @@
filter: drop-shadow(0 0 10px var(--frontend-stroke));
}
+ /* Authored Reachability is a bounded graph query over the relationships
+ already present in the artifact. Upstream walks incoming edges;
+ downstream walks outgoing edges. It never claims runtime causality and
+ changes only viewer emphasis, not canonical geometry or export bytes. */
+ svg[data-reach-active] [data-node-id],
+ svg[data-reach-active] [data-edge-from] { opacity: 0.09; }
+ svg[data-reach-active] [data-reach-match] { opacity: 1; }
+ svg[data-reach-active="upstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--database-stroke));
+ }
+ svg[data-reach-active="downstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--backend-stroke));
+ }
+ svg[data-reach-active="upstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--database-stroke) 72%, transparent));
+ }
+ svg[data-reach-active="downstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="blueprint"][data-reach-active] [data-reach-origin],
+ svg[data-preset="blueprint"][data-reach-active] [data-edge-from][data-reach-match] {
+ filter: none;
+ }
+
/* Direct Relationship Explorer makes authored paths a real input surface
without changing their visible stroke or canonical SVG. A transparent
runtime rail supplies forgiving pointer geometry; the exact authored
@@ -3294,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3336,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3376,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3459,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3477,6 +3958,9 @@
svg[data-preset="blueprint"][data-focus-active] [data-focus-selected] {
filter: drop-shadow(0 0 3px var(--frontend-stroke));
}
+ svg[data-preset="blueprint"][data-focus-active][data-reach-active] [data-focus-selected][data-reach-origin] {
+ filter: none;
+ }
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-source],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-target] {
@@ -3541,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3602,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3627,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -3742,6 +4242,7 @@
}
.relationship-pulse-overlay { display: none !important; }
.guided-view-chapter { transition: none !important; }
+ .source-evidence-beacon,
svg [data-node-id], svg [data-edge-from], svg [data-detail], svg [data-detail-anchor], svg [data-legend-hit], svg { transition: none !important; }
}
</style>
@@ -3789,6 +4290,8 @@
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
<button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="reach-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Reach Share Card <span class="hint">1200&times;630 PNG</span></button>
<button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
<hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
@@ -3814,6 +4317,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"collection-path","label":"Collection path","focus":["web","mobile","edge","stream"],"note":"Follow product events from clients into the ordered event stream."},{"id":"consent-boundary","label":"Consent and PII","focus":["edge","consent","pii"],"note":"Isolate the policy gate and restricted identity store."},{"id":"analytics-consumers","label":"Curated consumers","focus":["stream","warehouse","dashboard","features","model"],"note":"See curated facts, dashboards, and the derived feature path."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4171,7 +4675,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4190,12 +4694,31 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
+ <div class="semantic-passport-reach" id="focus-reach" hidden>
+ <span class="semantic-passport-reach-label">Authored reach</span>
+ <div class="semantic-passport-reach-actions" role="group" aria-label="Trace authored reachability">
+ <button id="btn-reach-upstream" type="button" aria-label="Trace upstream authored reachability" aria-pressed="false">
+ <span>Upstream</span><strong id="focus-reach-upstream-count">0</strong>
+ </button>
+ <button id="btn-reach-downstream" type="button" aria-label="Trace downstream authored reachability" aria-pressed="false">
+ <span>Downstream</span><strong id="focus-reach-downstream-count">0</strong>
+ </button>
+ </div>
+ <small class="semantic-passport-reach-status" id="focus-reach-status" hidden aria-live="polite"></small>
+ </div>
</div>
<div class="relationship-lens-actions">
+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">&#215;</button>
<button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button>
<button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>
- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button>
</div>
</div>
<div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>
@@ -4314,15 +4837,36 @@
<script>
var Archify = {};
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
@@ -4473,6 +5017,168 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
+ function applyReachSnapshot(clone, snapshot) {
+ if (!snapshot || (snapshot.direction !== 'upstream' && snapshot.direction !== 'downstream') ||
+ !snapshot.origin || typeof snapshot.origin.id !== 'string' || !snapshot.origin.id ||
+ typeof snapshot.origin.label !== 'string' || !snapshot.origin.label.trim() ||
+ !Array.isArray(snapshot.nodeIds) || snapshot.nodeIds.length < 2 ||
+ !Array.isArray(snapshot.edges) || !snapshot.edges.length ||
+ !snapshot.depths || typeof snapshot.depths !== 'object' ||
+ !Number.isInteger(snapshot.maxDepth) || snapshot.maxDepth < 1 ||
+ snapshot.nodeIds[0] !== snapshot.origin.id) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+ var measuredMaxDepth = 0;
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ var depth = snapshot.depths[nodeId];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId] ||
+ !Number.isInteger(depth) || depth < 0 || depth > snapshot.maxDepth ||
+ (nodeId === snapshot.origin.id ? depth !== 0 : depth < 1)) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ nodeMatches.push({ elements: matchedNodes, id: nodeId, depth: depth });
+ }
+ if (measuredMaxDepth !== snapshot.maxDepth) return false;
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ !nodeIds[edge.from] || !nodeIds[edge.to] ||
+ !Number.isInteger(edge.depth) || edge.depth < 1 || edge.depth > snapshot.maxDepth ||
+ edge.depth !== Math.max(snapshot.depths[edge.from], snapshot.depths[edge.to])) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push({ elements: matchedEdges, depth: edge.depth });
+ }
+
+ clone.setAttribute('data-share-reach', snapshot.direction);
+ nodeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ if (match.id === snapshot.origin.id) element.setAttribute('data-share-reach-origin', '');
+ });
+ });
+ edgeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ });
+ });
+
+ return clone.getAttribute('data-share-reach') === snapshot.direction &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-reach-active') &&
+ clone.querySelectorAll('[data-animate], [data-reach-match], [data-reach-origin], [data-reach-depth]').length === 0 &&
+ clone.querySelectorAll('[data-share-reach-origin]').length === 1 &&
+ clone.querySelectorAll('[data-share-reach-match]').length ===
+ nodeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0) +
+ edgeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4487,6 +5193,7 @@
clone.style.removeProperty('transform');
clone.removeAttribute('data-view-scale');
clone.removeAttribute('data-focus-active');
+ clone.removeAttribute('data-reach-active');
clone.removeAttribute('data-lens-active');
clone.removeAttribute('data-lens-flow-count');
clone.removeAttribute('data-lens-flow-density');
@@ -4498,6 +5205,8 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
+ clone.removeAttribute('data-share-reach');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4557,6 +5266,16 @@
Array.prototype.forEach.call(clone.querySelectorAll('[data-relationship-hit-overlay]'), function (el) {
el.remove();
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-beacon]'), function (el) {
+ el.remove();
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-count]'), function (el) {
+ var originalLabel = el.getAttribute('data-source-evidence-original-label');
+ if (originalLabel == null || originalLabel === '') el.removeAttribute('aria-label');
+ else el.setAttribute('aria-label', originalLabel);
+ el.removeAttribute('data-source-evidence-count');
+ el.removeAttribute('data-source-evidence-original-label');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-story-step], [data-story-beat-state], [data-story-beat-step]'), function (el) {
el.removeAttribute('data-story-step');
el.removeAttribute('data-story-beat-state');
@@ -4567,6 +5286,11 @@
el.removeAttribute('data-focus-match');
el.removeAttribute('data-focus-selected');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-reach-match], [data-reach-origin], [data-reach-depth]'), function (el) {
+ el.removeAttribute('data-reach-match');
+ el.removeAttribute('data-reach-origin');
+ el.removeAttribute('data-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-lens-match], [data-lens-selected], [data-lens-peer]'), function (el) {
el.removeAttribute('data-lens-match');
el.removeAttribute('data-lens-selected');
@@ -4597,6 +5321,18 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth]'), function (el) {
+ el.removeAttribute('data-share-reach-match');
+ el.removeAttribute('data-share-reach-origin');
+ el.removeAttribute('data-share-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4606,6 +5342,7 @@
});
var canonicalStateClean = !clone.hasAttribute('data-view-scale') &&
!clone.hasAttribute('data-focus-active') &&
+ !clone.hasAttribute('data-reach-active') &&
!clone.hasAttribute('data-lens-active') &&
!clone.hasAttribute('data-lens-flow-count') &&
!clone.hasAttribute('data-lens-flow-density') &&
@@ -4616,6 +5353,8 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-share-reach') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4625,9 +5364,17 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-reach-match], [data-reach-origin], [data-reach-depth], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth], [data-source-evidence-beacon], [data-source-evidence-count], [data-source-evidence-original-label], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
+ var reachStateClean = opts.reachSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && !opts.routeSnapshot && applyReachSnapshot(clone, opts.reachSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4751,6 +5498,22 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+ if (opts.reachSnapshot) {
+ style.textContent += "\nsvg[data-share-reach] [data-node-id], svg[data-share-reach] [data-edge-from] { opacity: 0.14; }\n" +
+ "svg[data-share-reach] [data-share-reach-match] { opacity: 1; }\n" +
+ "svg[data-share-reach] [data-edge-from][data-share-reach-match] { stroke-width: 1.55; }\n" +
+ "svg[data-share-reach=\"upstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--database-stroke); stroke-width: 3.4; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-reach=\"downstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--backend-stroke); stroke-width: 3.4; stroke-dasharray: 1 0; }\n" +
+ "svg[data-preset=\"blueprint\"][data-share-reach] [data-share-reach-origin], svg[data-preset=\"blueprint\"][data-share-reach] [data-edge-from][data-share-reach-match] { filter: none; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4758,7 +5521,9 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean,
+ reachStateClean: reachStateClean
};
}
@@ -4802,24 +5567,29 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
- URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4847,75 +5617,110 @@
return value + suffix;
}
- function rasterizeShareCard() {
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var reachSnapshot = options.reachSnapshot || null;
+ if (routeSnapshot && reachSnapshot) return Promise.reject(new Error('Share Card variants cannot be combined'));
var svg = document.querySelector('.diagram-container svg');
var vb = svg.viewBox.baseVal;
var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
- var data = serializeSvg(sourceScale);
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot, reachSnapshot: reachSnapshot });
if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ if (reachSnapshot && !data.reachStateClean) return Promise.reject(new Error('Reach Card export could not preserve authored reach safely'));
var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
var svgUrl = URL.createObjectURL(svgBlob);
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = SHARE_CARD_WIDTH;
- canvas.height = SHARE_CARD_HEIGHT;
- var ctx = canvas.getContext('2d');
- var computed = getComputedStyle(document.documentElement);
- var bg = computed.getPropertyValue('--bg').trim() || currentBg();
- var text = computed.getPropertyValue('--text').trim() || '#ffffff';
- var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
- var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
- var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
- var titleNode = document.querySelector('.header h1');
- var subtitleNode = document.querySelector('.header .subtitle');
- var title = titleNode ? titleNode.textContent : document.title;
- var subtitle = subtitleNode ? subtitleNode.textContent : '';
- var preset = document.documentElement.getAttribute('data-preset') || 'classic';
- var theme = document.documentElement.getAttribute('data-theme') || 'dark';
- var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
-
- ctx.fillStyle = bg;
- ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
-
- ctx.fillStyle = accent;
- ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
-
- ctx.textBaseline = 'alphabetic';
- ctx.fillStyle = text;
- var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
- ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
-
- ctx.fillStyle = muted;
- var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
- ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
-
- ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
- ctx.textAlign = 'right';
- ctx.fillStyle = accent;
- ctx.fillText('ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase(), SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
- ctx.textAlign = 'left';
-
- var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
- var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
- var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
- var drawWidth = data.width * fit;
- var drawHeight = data.height * fit;
- var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
- var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
-
- ctx.strokeStyle = border;
- ctx.lineWidth = 1;
- ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
- ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
- URL.revokeObjectURL(svgUrl);
-
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for Share Card'));
- else resolve(blob);
- }, 'image/png');
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accentProperty = reachSnapshot
+ ? (reachSnapshot.direction === 'upstream' ? '--database-stroke' : '--backend-stroke')
+ : '--frontend-stroke';
+ var accent = computed.getPropertyValue(accentProperty).trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : reachSnapshot
+ ? 'Authored ' + reachSnapshot.direction + ' from ' + reachSnapshot.origin.label + ' · ' +
+ (reachSnapshot.nodeIds.length - 1) + ' nodes · ' + reachSnapshot.edges.length +
+ ' links · max ' + reachSnapshot.maxDepth + ' hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : reachSnapshot
+ ? 'ARCHIFY · ' + reachSnapshot.direction.toUpperCase() + ' REACH'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4925,6 +5730,24 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route' && options.variant !== 'reach') {
+ return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ }
+ if (options.variant === 'route') {
+ var routeSnapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!routeSnapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: routeSnapshot });
+ }
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ if (!snapshot) return Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return renderShareCard({ reachSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5187,10 +6010,30 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
+ var reachShareItem = menu.querySelector('button[data-action="reach-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
+ function syncReachShareItem() {
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ reachShareItem.hidden = !snapshot;
+ reachShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5249,9 +6092,11 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
+ syncReachShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5285,7 +6130,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5310,8 +6155,7 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
return (format === 'share-card'
? rasterizeShareCard().then(function (blob) {
@@ -5355,13 +6199,72 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
+ function runReachShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ var blobPromise = snapshot
+ ? renderShareCard({ reachSnapshot: snapshot })
+ : Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'reach', false, true);
+ download(blob, diagramFilename() + '-' + snapshot.direction + '-reach-share-card.png');
+ toast('Downloaded Reach Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Reach Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical, dimensions) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean, reachStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (reachStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-reach-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
+ }
if (dimensions) {
document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
@@ -5377,6 +6280,9 @@
document.documentElement.removeAttribute('data-last-export-canonical');
document.documentElement.removeAttribute('data-last-export-width');
document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
document.documentElement.removeAttribute('data-last-export-error-format');
document.documentElement.removeAttribute('data-last-export-error');
}
@@ -5418,6 +6324,7 @@
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
@@ -5432,6 +6339,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var reachShareCardBtn = e.target.closest('button[data-action="reach-share-card"]');
+ if (reachShareCardBtn && !reachShareCardBtn.disabled && !reachShareCardBtn.hidden) { runReachShareCard(); return; }
+
var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
@@ -5443,7 +6356,18 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport, shareCard: rasterizeShareCard, copyShareCard: runCopyShareCard };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ downloadReachShareCard: runReachShareCard,
+ syncRouteShare: syncRouteShareItem,
+ syncReachShare: syncReachShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5728,6 +6652,76 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ var svgNamespace = 'http://www.w3.org/2000/svg';
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ function installBeacons() {
+ if (!payload) return 0;
+ var svg = document.querySelector('.diagram-container svg');
+ if (!svg) return 0;
+ var installed = 0;
+ Array.prototype.forEach.call(svg.querySelectorAll('[data-node-id]'), function (node) {
+ var id = node.getAttribute('data-node-id');
+ var sources = payload.nodes[id];
+ if (!Array.isArray(sources) || !sources.length || node.querySelector('[data-source-evidence-beacon]')) return;
+ var shape = node.querySelector('[data-animate="node"]') || node.querySelector('[class*="c-"]');
+ var box;
+ try { box = (shape || node).getBBox(); } catch (_) { return; }
+ if (!box || !Number.isFinite(box.x) || !Number.isFinite(box.y) || !Number.isFinite(box.width) || box.width < 36) return;
+
+ var count = sources.length;
+ var label = count + ' verified source' + (count === 1 ? '' : 's') + '; focus this node to inspect';
+ var beacon = document.createElementNS(svgNamespace, 'g');
+ beacon.classList.add('source-evidence-beacon');
+ beacon.setAttribute('data-source-evidence-beacon', '');
+ beacon.setAttribute('aria-hidden', 'true');
+ beacon.setAttribute('transform', 'translate(' + (box.x + box.width - 35) + ' ' + (box.y + 5) + ')');
+ var title = document.createElementNS(svgNamespace, 'title');
+ title.textContent = label;
+ var plate = document.createElementNS(svgNamespace, 'rect');
+ plate.setAttribute('width', '30');
+ plate.setAttribute('height', '12');
+ plate.setAttribute('rx', '6');
+ var text = document.createElementNS(svgNamespace, 'text');
+ text.setAttribute('x', '15');
+ text.setAttribute('y', '8.25');
+ text.textContent = 'SRC ' + count;
+ beacon.appendChild(title);
+ beacon.appendChild(plate);
+ beacon.appendChild(text);
+ node.appendChild(beacon);
+
+ var originalLabel = node.getAttribute('aria-label') || '';
+ node.setAttribute('data-source-evidence-count', String(count));
+ node.setAttribute('data-source-evidence-original-label', originalLabel);
+ node.setAttribute('aria-label', (originalLabel ? originalLabel + ', ' : '') + count + ' verified source reference' + (count === 1 ? '' : 's'));
+ installed += 1;
+ });
+ return installed;
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ },
+ installBeacons: installBeacons
+ };
+ })();
+ Archify.sourceEvidence.installBeacons();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5744,7 +6738,16 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
+ var reachSection = document.getElementById('focus-reach');
+ var reachStatus = document.getElementById('focus-reach-status');
+ var upstreamBtn = document.getElementById('btn-reach-upstream');
+ var downstreamBtn = document.getElementById('btn-reach-downstream');
+ var upstreamCount = document.getElementById('focus-reach-upstream-count');
+ var downstreamCount = document.getElementById('focus-reach-downstream-count');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
var relationsBtn = document.getElementById('btn-focus-relations');
@@ -5758,6 +6761,8 @@
var relationshipHitOverlay = null;
var relationshipHitTargets = [];
var directPreviewTimer = null;
+ var reachabilityMode = null;
+ var activeReachability = null;
var svgNamespace = 'http://www.w3.org/2000/svg';
var reducedMotionQuery = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
var finePointerQuery = window.matchMedia ? window.matchMedia('(hover: hover) and (pointer: fine)') : null;
@@ -5771,11 +6776,318 @@
function nodeLabel(node, fallback) {
return node.getAttribute('data-node-label') || (node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '');
}
+ function reachabilityRelationships() {
+ var seen = Object.create(null);
+ var relationships = [];
+ edges().forEach(function (edge) {
+ var from = edge.getAttribute('data-edge-from');
+ var to = edge.getAttribute('data-edge-to');
+ var key = edge.getAttribute('data-edge-key') || (from + '\u0000' + to + '\u0000' + (edge.getAttribute('data-edge-label') || ''));
+ if (!from || !to || seen[key]) return;
+ seen[key] = true;
+ relationships.push({ key: key, from: from, to: to });
+ });
+ return relationships;
+ }
+ function computeReachability(originId, direction, relationships) {
+ if (typeof originId !== 'string' || !originId ||
+ (direction !== 'upstream' && direction !== 'downstream') ||
+ !Array.isArray(relationships)) return null;
+ var records = [];
+ var seenKeys = Object.create(null);
+ relationships.forEach(function (relationship, index) {
+ if (!relationship || typeof relationship.from !== 'string' || !relationship.from ||
+ typeof relationship.to !== 'string' || !relationship.to) return;
+ var key = typeof relationship.key === 'string' && relationship.key
+ ? relationship.key : String(index);
+ if (seenKeys[key]) return;
+ seenKeys[key] = true;
+ records.push({ key: key, from: relationship.from, to: relationship.to });
+ });
+
+ var depths = Object.create(null);
+ var order = [];
+ var queue = [originId];
+ depths[originId] = 0;
+ for (var cursor = 0; cursor < queue.length; cursor += 1) {
+ var current = queue[cursor];
+ records.forEach(function (relationship) {
+ var next = null;
+ if (direction === 'downstream' && relationship.from === current) next = relationship.to;
+ else if (direction === 'upstream' && relationship.to === current) next = relationship.from;
+ if (next == null || Object.prototype.hasOwnProperty.call(depths, next)) return;
+ depths[next] = depths[current] + 1;
+ queue.push(next);
+ });
+ }
+ queue.forEach(function (id) { order.push(id); });
+
+ var edgeKeys = [];
+ records.forEach(function (relationship) {
+ if (Object.prototype.hasOwnProperty.call(depths, relationship.from) &&
+ Object.prototype.hasOwnProperty.call(depths, relationship.to)) edgeKeys.push(relationship.key);
+ });
+ var maxDepth = order.reduce(function (maximum, id) {
+ return Math.max(maximum, depths[id]);
+ }, 0);
+ return {
+ direction: direction,
+ originId: originId,
+ nodeIds: order,
+ edgeKeys: edgeKeys,
+ depths: depths,
+ maxDepth: maxDepth
+ };
+ }
+ function reachabilityFor(id, direction) {
+ return computeReachability(id, direction, reachabilityRelationships());
+ }
+ function resetReachabilityButtons() {
+ upstreamBtn.setAttribute('aria-pressed', 'false');
+ downstreamBtn.setAttribute('aria-pressed', 'false');
+ }
+ function clearReachability(options) {
+ options = options || {};
+ reachabilityMode = null;
+ activeReachability = null;
+ svg.removeAttribute('data-reach-active');
+ chip.removeAttribute('data-reach-mode');
+ nodes().forEach(function (node) {
+ node.removeAttribute('data-reach-match');
+ node.removeAttribute('data-reach-origin');
+ node.removeAttribute('data-reach-depth');
+ });
+ edges().forEach(function (edge) {
+ edge.removeAttribute('data-reach-match');
+ edge.removeAttribute('data-reach-depth');
+ });
+ resetReachabilityButtons();
+ reachStatus.textContent = '';
+ reachStatus.hidden = true;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl === true && activeIds.length === 1) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' + encodeURIComponent(activeIds[0]));
+ } catch (_) {}
+ }
+ }
+ function renderReachabilityControls(id) {
+ var upstream = reachabilityFor(id, 'upstream');
+ var downstream = reachabilityFor(id, 'downstream');
+ var upstreamReach = upstream ? Math.max(0, upstream.nodeIds.length - 1) : 0;
+ var downstreamReach = downstream ? Math.max(0, downstream.nodeIds.length - 1) : 0;
+ upstreamCount.textContent = String(upstreamReach);
+ downstreamCount.textContent = String(downstreamReach);
+ upstreamBtn.disabled = upstreamReach === 0;
+ downstreamBtn.disabled = downstreamReach === 0;
+ upstreamBtn.setAttribute('aria-label', upstreamReach
+ ? 'Trace ' + upstreamReach + ' upstream authored node' + (upstreamReach === 1 ? '' : 's')
+ : 'No upstream authored nodes');
+ downstreamBtn.setAttribute('aria-label', downstreamReach
+ ? 'Trace ' + downstreamReach + ' downstream authored node' + (downstreamReach === 1 ? '' : 's')
+ : 'No downstream authored nodes');
+ reachSection.hidden = false;
+ }
+ function applyReachability(direction, options) {
+ options = options || {};
+ if (activeIds.length !== 1 || (direction !== 'upstream' && direction !== 'downstream')) return false;
+ if (reachabilityMode === direction && options.toggle !== false) {
+ clearReachability({ updateUrl: options.updateUrl !== false });
+ return true;
+ }
+ var result = reachabilityFor(activeIds[0], direction);
+ if (!result || result.nodeIds.length <= 1) return false;
+ if (Archify.guidedViews && typeof Archify.guidedViews.showAll === 'function') {
+ Archify.guidedViews.showAll({ clearFocus: false, updateUrl: false, resetView: false });
+ }
+ clearRelationshipPreview({ clearPin: true });
+ clearReachability({ updateUrl: false });
+ reachabilityMode = direction;
+ activeReachability = result;
+ var edgeKeySet = Object.create(null);
+ result.edgeKeys.forEach(function (key) { edgeKeySet[key] = true; });
+ svg.setAttribute('data-reach-active', direction);
+ chip.setAttribute('data-reach-mode', direction);
+ nodes().forEach(function (node) {
+ var id = node.getAttribute('data-node-id');
+ if (!Object.prototype.hasOwnProperty.call(result.depths, id)) return;
+ node.setAttribute('data-reach-match', '');
+ node.setAttribute('data-reach-depth', String(result.depths[id]));
+ if (id === result.originId) node.setAttribute('data-reach-origin', '');
+ });
+ edges().forEach(function (edge) {
+ var key = edge.getAttribute('data-edge-key') || (
+ edge.getAttribute('data-edge-from') + '\u0000' +
+ edge.getAttribute('data-edge-to') + '\u0000' +
+ (edge.getAttribute('data-edge-label') || '')
+ );
+ if (!edgeKeySet[key]) return;
+ edge.setAttribute('data-reach-match', '');
+ var fromDepth = result.depths[edge.getAttribute('data-edge-from')];
+ var toDepth = result.depths[edge.getAttribute('data-edge-to')];
+ edge.setAttribute('data-reach-depth', String(Math.max(fromDepth || 0, toDepth || 0)));
+ });
+ resetReachabilityButtons();
+ var activeButton = direction === 'upstream' ? upstreamBtn : downstreamBtn;
+ activeButton.setAttribute('aria-pressed', 'true');
+ var reachableCount = result.nodeIds.length - 1;
+ var directionLabel = direction === 'upstream' ? 'Upstream' : 'Downstream';
+ reachStatus.textContent = directionLabel + ' · ' + reachableCount + ' node' +
+ (reachableCount === 1 ? '' : 's') + ' · ' + result.edgeKeys.length + ' link' +
+ (result.edgeKeys.length === 1 ? '' : 's') + ' · max ' + result.maxDepth + ' hop' +
+ (result.maxDepth === 1 ? '' : 's');
+ reachStatus.hidden = false;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl !== false) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' +
+ encodeURIComponent(activeIds[0]) + '&reach=' + direction);
+ } catch (_) {}
+ }
+ if (options.reveal !== false && Archify.view && typeof Archify.view.reveal === 'function') {
+ Archify.view.reveal(result.nodeIds, { includeNeighbors: false, reason: 'reachability' });
+ }
+ requestLensPlacement();
+ return true;
+ }
+ function reachabilitySnapshot() {
+ if (!activeReachability || activeIds.length !== 1 ||
+ (reachabilityMode !== 'upstream' && reachabilityMode !== 'downstream') ||
+ activeReachability.direction !== reachabilityMode ||
+ activeReachability.originId !== activeIds[0] ||
+ svg.getAttribute('data-reach-active') !== reachabilityMode) return null;
+
+ var originId = activeReachability.originId;
+ var nodeIds = activeReachability.nodeIds.slice();
+ var edgeKeys = activeReachability.edgeKeys.slice();
+ if (nodeIds.length < 2 || nodeIds[0] !== originId || !edgeKeys.length ||
+ !activeReachability.depths || !Number.isInteger(activeReachability.maxDepth) ||
+ activeReachability.maxDepth < 1) return null;
+
+ var allNodes = nodes();
+ var allEdges = edges();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ var nodeIdSet = Object.create(null);
+ var depths = Object.create(null);
+ var originNode = null;
+ var measuredMaxDepth = 0;
+
+ if (nodeIds.some(function (id) {
+ var depth = activeReachability.depths[id];
+ var matches = allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ });
+ if (typeof id !== 'string' || !id || seenNodeIds[id] || matches.length !== 1 ||
+ !matches[0].hasAttribute('data-reach-match') ||
+ !Number.isInteger(depth) || depth < 0 || depth > activeReachability.maxDepth ||
+ (id === originId
+ ? (!matches[0].hasAttribute('data-reach-origin') || depth !== 0)
+ : depth < 1)) return true;
+ seenNodeIds[id] = true;
+ nodeIdSet[id] = true;
+ depths[id] = depth;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ if (id === originId) originNode = matches[0];
+ return false;
+ }) || !originNode || measuredMaxDepth !== activeReachability.maxDepth ||
+ allNodes.filter(function (node) { return node.hasAttribute('data-reach-match'); }).length !== nodeIds.length) return null;
+
+ var edgeRecords = [];
+ if (edgeKeys.some(function (key) {
+ if (typeof key !== 'string' || !key || seenEdgeKeys[key]) return true;
+ var fragments = allEdges.filter(function (edge) {
+ return edge.getAttribute('data-edge-key') === key;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ if (!fragments.length || drawableFragments.length !== 1 ||
+ !fragments.every(function (fragment) { return fragment.hasAttribute('data-reach-match'); })) return true;
+ var first = fragments[0];
+ var from = first.getAttribute('data-edge-from');
+ var to = first.getAttribute('data-edge-to');
+ var id = first.getAttribute('data-edge-id') || '';
+ var labelValue = first.getAttribute('data-edge-label') || '';
+ if (!nodeIdSet[from] || !nodeIdSet[to] || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === from &&
+ fragment.getAttribute('data-edge-to') === to &&
+ (fragment.getAttribute('data-edge-id') || '') === id;
+ })) return true;
+ seenEdgeKeys[key] = true;
+ edgeRecords.push({
+ key: key,
+ id: id,
+ from: from,
+ to: to,
+ label: labelValue,
+ depth: Math.max(depths[from], depths[to])
+ });
+ return false;
+ })) return null;
+
+ var liveEdgeKeys = Object.create(null);
+ if (allEdges.some(function (edge) {
+ if (!edge.hasAttribute('data-reach-match')) return false;
+ var key = edge.getAttribute('data-edge-key');
+ if (!key || !seenEdgeKeys[key]) return true;
+ liveEdgeKeys[key] = true;
+ return false;
+ }) || Object.keys(liveEdgeKeys).length !== edgeKeys.length) return null;
+
+ return {
+ direction: reachabilityMode,
+ origin: { id: originId, label: nodeLabel(originNode, originId) },
+ nodeIds: nodeIds,
+ depths: depths,
+ maxDepth: activeReachability.maxDepth,
+ edges: edgeRecords
+ };
+ }
function setPassportValue(element, value) {
var normalized = value == null ? '' : String(value).trim();
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5783,6 +7095,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6340,6 +7653,7 @@
var counts = { out: 0, in: 0, loop: 0 };
relationships.forEach(function (relationship) { counts[relationship.direction] += 1; });
summary.textContent = counts.out + ' outgoing · ' + counts.in + ' incoming' + (counts.loop ? ' · ' + counts.loop + ' loop' : '');
+ renderReachabilityControls(id);
relationshipList.textContent = '';
if (!relationships.length) {
var empty = document.createElement('p');
@@ -6436,6 +7750,10 @@
}
function clear(options) {
options = options || {};
+ var restoreNode = options.restoreFocus === true && activeIds.length === 1
+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')
+ : null;
+ clearReachability({ updateUrl: false });
if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {
Archify.intentTrace.clear({ announce: false });
}
@@ -6462,7 +7780,16 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
+ reachSection.hidden = true;
+ upstreamCount.textContent = '0';
+ downstreamCount.textContent = '0';
+ upstreamBtn.disabled = true;
+ downstreamBtn.disabled = true;
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
copyBtn.setAttribute('aria-label', 'Copy link to focused node');
@@ -6477,6 +7804,10 @@
if (options.updateUrl !== false) {
try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}
}
+ if (restoreNode) {
+ try { restoreNode.focus({ preventScroll: true }); }
+ catch (_) { try { restoreNode.focus(); } catch (_) {} }
+ }
}
function setMany(ids, options) {
@@ -6572,7 +7903,7 @@
var relationId = record && record.id;
var value = location.href.replace(/#.*$/, '') + (relationId
? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]));
+ : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
: Promise.resolve(fallbackCopy(value));
@@ -6610,8 +7941,10 @@
Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });
}
});
- clearBtn.addEventListener('click', function () { clear(); });
+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });
copyBtn.addEventListener('click', copyFocusLink);
+ upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });
+ downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });
relationsBtn.addEventListener('click', function () {
var expanded = chip.getAttribute('data-relations-expanded') === 'true';
if (expanded) chip.removeAttribute('data-relations-expanded');
@@ -6675,6 +8008,13 @@
event.preventDefault();
buttons[index].focus();
});
+ document.addEventListener('click', function (event) {
+ var target = event.target;
+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;
+ if (container.getAttribute('data-just-panned') === 'true') return;
+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;
+ clear();
+ }, true);
window.addEventListener('scroll', requestLensPlacement, { passive: true });
window.addEventListener('resize', requestLensPlacement);
container.addEventListener('scroll', requestLensPlacement, { passive: true });
@@ -6699,11 +8039,17 @@
var params = new URLSearchParams(location.hash.replace(/^#/, ''));
var relation = params.get('relation');
var initial = params.get('focus');
+ var reach = params.get('reach');
if (relation) {
if (html.getAttribute('data-embed') === 'true' ||
!inspectRelationshipById(relation, { updateUrl: false, toggle: false })) clear({ updateUrl: false });
}
- else if (initial) set(initial, { updateUrl: false, toggle: false });
+ else if (initial) {
+ if (set(initial, { updateUrl: false, toggle: false }) &&
+ (reach === 'upstream' || reach === 'downstream')) {
+ applyReachability(reach, { updateUrl: false, toggle: false, reveal: false });
+ }
+ }
else if (!params.get('view')) clear({ updateUrl: false });
} catch (_) {}
}
@@ -6716,6 +8062,9 @@
setMany: setMany,
clear: clear,
copyLink: copyFocusLink,
+ reach: applyReachability,
+ clearReach: clearReachability,
+ reachabilitySnapshot: reachabilitySnapshot,
inspectRelationship: inspectRelationship,
inspectRelationshipById: inspectRelationshipById,
reposition: requestLensPlacement,
@@ -6723,6 +8072,15 @@
var record = pinnedRelationshipRecord();
return record ? { id: record.id || null, key: record.key, from: record.from, to: record.to, label: record.label } : null;
},
+ reachability: function () {
+ return activeReachability ? {
+ direction: activeReachability.direction,
+ originId: activeReachability.originId,
+ nodeIds: activeReachability.nodeIds.slice(),
+ edgeKeys: activeReachability.edgeKeys.slice(),
+ maxDepth: activeReachability.maxDepth
+ } : null;
+ },
active: function () { return activeIds.length === 0 ? null : (activeIds.length === 1 ? activeIds[0] : activeIds.slice()); }
};
})();
@@ -9483,6 +10841,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9490,8 +10852,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9560,7 +10923,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9572,11 +10939,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9584,7 +10950,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9717,7 +11085,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9725,6 +11093,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9873,6 +11289,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10352,6 +11769,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10622,6 +12040,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11557,7 +12976,7 @@
Archify.intentTrace.clear();
} else if (e.key === 'Escape' && Archify.focus.active()) {
e.preventDefault();
- Archify.focus.clear();
+ Archify.focus.clear({ restoreFocus: true });
} else if (e.key === 'Escape' && Archify.presentation.active()) {
e.preventDefault();
Archify.presentation.exit();
diff --git a/archify/examples/lifecycle-agent-run.html b/archify/examples/lifecycle-agent-run.html
index 2fea9d3f..d98084b3 100644
--- a/archify/examples/lifecycle-agent-run.html
+++ b/archify/examples/lifecycle-agent-run.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -1354,10 +1511,25 @@
.relationship-lens-actions {
display: flex;
flex-direction: column;
- align-items: stretch;
+ align-items: flex-end;
gap: 0.18rem;
}
.relationship-lens-actions button { white-space: nowrap; }
+ .relationship-lens-actions #btn-focus-clear {
+ display: grid;
+ width: 1.75rem;
+ height: 1.75rem;
+ padding: 0;
+ place-items: center;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
+ }
+ .relationship-lens-actions #btn-focus-clear:hover,
+ .relationship-lens-actions #btn-focus-clear:focus-visible {
+ background: var(--toolbar-hover);
+ color: var(--text);
+ }
.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }
.relationship-lens-actions #btn-focus-relations { display: none; }
.relationship-lens-eyebrow {
@@ -1420,12 +1592,163 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
+ .semantic-passport-reach {
+ display: grid;
+ gap: 0.28rem;
+ margin-top: 0.52rem;
+ padding-top: 0.48rem;
+ border-top: 1px solid color-mix(in srgb, var(--toolbar-border) 76%, transparent);
+ }
+ .semantic-passport-reach[hidden] { display: none; }
+ .semantic-passport-reach-label {
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-reach-actions {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.25rem;
+ }
+ .semantic-passport-reach-actions button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.5rem;
+ min-width: 0;
+ min-height: 2rem;
+ padding: 0.32rem 0.42rem;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 86%, transparent);
+ background: color-mix(in srgb, var(--panel) 70%, transparent);
+ color: var(--text-muted);
+ text-align: left;
+ }
+ .semantic-passport-reach-actions button:hover:not(:disabled),
+ .semantic-passport-reach-actions button:focus-visible {
+ border-color: color-mix(in srgb, var(--frontend-stroke) 62%, var(--toolbar-border));
+ color: var(--text);
+ }
+ .semantic-passport-reach-actions button:focus-visible {
+ outline: 2px solid var(--frontend-stroke);
+ outline-offset: 1px;
+ }
+ .semantic-passport-reach-actions button:disabled {
+ cursor: default;
+ opacity: 0.5;
+ }
+ .semantic-passport-reach-actions button[aria-pressed="true"] {
+ border-color: color-mix(in srgb, var(--reach-color, var(--frontend-stroke)) 72%, var(--toolbar-border));
+ background: color-mix(in srgb, var(--reach-fill, var(--frontend-fill)) 48%, transparent);
+ color: var(--text);
+ }
+ #btn-reach-upstream {
+ --reach-color: var(--database-stroke);
+ --reach-fill: var(--database-fill);
+ }
+ #btn-reach-downstream {
+ --reach-color: var(--backend-stroke);
+ --reach-fill: var(--backend-fill);
+ }
+ .semantic-passport-reach-actions strong {
+ color: var(--reach-color, var(--frontend-stroke));
+ font-size: 0.625rem;
+ }
+ .semantic-passport-reach-status {
+ color: var(--text-faint);
+ font-size: 0.525rem;
+ line-height: 1.4;
+ }
+ .semantic-passport-reach-status[hidden] { display: none; }
.relationship-lens-list {
max-height: min(18rem, 46vh);
overflow: auto;
@@ -1698,13 +2021,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +2070,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +2085,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +2104,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +2116,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +2168,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +2195,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2364,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2491,6 +2855,8 @@
.story-carrier-overlay { display: none !important; }
.diagram-container svg[data-focus-active] [data-node-id],
.diagram-container svg[data-focus-active] [data-edge-from],
+ .diagram-container svg[data-reach-active] [data-node-id],
+ .diagram-container svg[data-reach-active] [data-edge-from],
.diagram-container svg[data-story-beat] [data-story-step],
.diagram-container svg[data-story-beat] [data-edge-from][data-story-beat-step],
.diagram-container svg[data-route-active] [data-node-id],
@@ -2561,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2597,6 +2982,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2644,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2659,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3035,6 +3427,8 @@
the global zoom level. Reveal only their exact semantic matches. */
svg[data-focus-active] [data-focus-match][data-detail],
svg[data-focus-active] [data-focus-match] [data-detail],
+ svg[data-reach-active] [data-reach-match][data-detail],
+ svg[data-reach-active] [data-reach-match] [data-detail],
svg[data-lens-active] [data-lens-match][data-detail],
svg[data-lens-active] [data-lens-match] [data-detail],
svg[data-legend-preview-active] [data-legend-preview-match][data-detail],
@@ -3053,6 +3447,7 @@
pointer-events: auto;
}
svg[data-focus-active] [data-focus-match] [data-detail-anchor],
+ svg[data-reach-active] [data-reach-match] [data-detail-anchor],
svg[data-lens-active] [data-lens-match] [data-detail-anchor],
svg[data-legend-preview-active] [data-legend-preview-match] [data-detail-anchor],
svg[data-intent-trace-active] [data-intent-trace-match] [data-detail-anchor],
@@ -3084,6 +3479,41 @@
filter: drop-shadow(0 0 7px var(--frontend-stroke));
outline: none;
}
+ /* Verified Source Beacons are installed at runtime only for nodes whose
+ repository evidence passed the local revision/blob/line checks. They
+ live inside the owning node so every focus, route, story, and guided
+ view keeps one coherent opacity state. Export serialization removes
+ them before producing the canonical SVG or any derived visual. */
+ .source-evidence-beacon {
+ pointer-events: none;
+ opacity: 0.76;
+ transition: opacity 160ms ease, filter 160ms ease;
+ }
+ .source-evidence-beacon rect {
+ fill: color-mix(in srgb, var(--mask) 92%, var(--backend-stroke));
+ stroke: color-mix(in srgb, var(--backend-stroke) 82%, var(--panel-border));
+ stroke-width: 1;
+ vector-effect: non-scaling-stroke;
+ }
+ .source-evidence-beacon text {
+ fill: var(--backend-stroke);
+ font-size: 5.5px;
+ font-weight: 800;
+ letter-spacing: 0.06em;
+ text-anchor: middle;
+ text-transform: uppercase;
+ }
+ svg [data-node-id]:hover .source-evidence-beacon,
+ svg [data-node-id]:focus-visible .source-evidence-beacon,
+ svg [data-node-id][data-focus-selected] .source-evidence-beacon {
+ opacity: 1;
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="signal-flow"] .source-evidence-beacon { opacity: 0.9; }
+ svg[data-preset="blueprint"] .source-evidence-beacon rect {
+ rx: 0.8px;
+ filter: none;
+ }
svg [data-legend-kind][role="button"] { cursor: pointer; }
svg [data-legend-kind]:focus { outline: none; }
svg [data-legend-hit] {
@@ -3199,6 +3629,30 @@
filter: drop-shadow(0 0 10px var(--frontend-stroke));
}
+ /* Authored Reachability is a bounded graph query over the relationships
+ already present in the artifact. Upstream walks incoming edges;
+ downstream walks outgoing edges. It never claims runtime causality and
+ changes only viewer emphasis, not canonical geometry or export bytes. */
+ svg[data-reach-active] [data-node-id],
+ svg[data-reach-active] [data-edge-from] { opacity: 0.09; }
+ svg[data-reach-active] [data-reach-match] { opacity: 1; }
+ svg[data-reach-active="upstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--database-stroke));
+ }
+ svg[data-reach-active="downstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--backend-stroke));
+ }
+ svg[data-reach-active="upstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--database-stroke) 72%, transparent));
+ }
+ svg[data-reach-active="downstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="blueprint"][data-reach-active] [data-reach-origin],
+ svg[data-preset="blueprint"][data-reach-active] [data-edge-from][data-reach-match] {
+ filter: none;
+ }
+
/* Direct Relationship Explorer makes authored paths a real input surface
without changing their visible stroke or canonical SVG. A transparent
runtime rail supplies forgiving pointer geometry; the exact authored
@@ -3294,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3336,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3376,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3459,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3477,6 +3958,9 @@
svg[data-preset="blueprint"][data-focus-active] [data-focus-selected] {
filter: drop-shadow(0 0 3px var(--frontend-stroke));
}
+ svg[data-preset="blueprint"][data-focus-active][data-reach-active] [data-focus-selected][data-reach-origin] {
+ filter: none;
+ }
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-source],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-target] {
@@ -3541,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3602,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3627,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -3742,6 +4242,7 @@
}
.relationship-pulse-overlay { display: none !important; }
.guided-view-chapter { transition: none !important; }
+ .source-evidence-beacon,
svg [data-node-id], svg [data-edge-from], svg [data-detail], svg [data-detail-anchor], svg [data-legend-hit], svg { transition: none !important; }
}
</style>
@@ -3789,6 +4290,8 @@
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
<button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="reach-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Reach Share Card <span class="hint">1200&times;630 PNG</span></button>
<button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
<hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
@@ -3814,6 +4317,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"main-lifecycle","label":"Main lifecycle","focus":["queued","planning","executing","reviewing","completed"],"note":"Follow the ordered phases from accepted request to completed response."},{"id":"human-waits","label":"Human and input waits","focus":["executing","approval","reviewing","blocked"],"note":"See where the run pauses without becoming terminal."},{"id":"recovery-and-exits","label":"Recovery and terminal exits","focus":["executing","failed","blocked","cancelled","expired"],"note":"Separate retryable failure from cancellation and expiry."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4124,7 +4628,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4143,12 +4647,31 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
+ <div class="semantic-passport-reach" id="focus-reach" hidden>
+ <span class="semantic-passport-reach-label">Authored reach</span>
+ <div class="semantic-passport-reach-actions" role="group" aria-label="Trace authored reachability">
+ <button id="btn-reach-upstream" type="button" aria-label="Trace upstream authored reachability" aria-pressed="false">
+ <span>Upstream</span><strong id="focus-reach-upstream-count">0</strong>
+ </button>
+ <button id="btn-reach-downstream" type="button" aria-label="Trace downstream authored reachability" aria-pressed="false">
+ <span>Downstream</span><strong id="focus-reach-downstream-count">0</strong>
+ </button>
+ </div>
+ <small class="semantic-passport-reach-status" id="focus-reach-status" hidden aria-live="polite"></small>
+ </div>
</div>
<div class="relationship-lens-actions">
+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">&#215;</button>
<button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button>
<button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>
- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button>
</div>
</div>
<div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>
@@ -4267,15 +4790,36 @@
<script>
var Archify = {};
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
@@ -4426,6 +4970,168 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
+ function applyReachSnapshot(clone, snapshot) {
+ if (!snapshot || (snapshot.direction !== 'upstream' && snapshot.direction !== 'downstream') ||
+ !snapshot.origin || typeof snapshot.origin.id !== 'string' || !snapshot.origin.id ||
+ typeof snapshot.origin.label !== 'string' || !snapshot.origin.label.trim() ||
+ !Array.isArray(snapshot.nodeIds) || snapshot.nodeIds.length < 2 ||
+ !Array.isArray(snapshot.edges) || !snapshot.edges.length ||
+ !snapshot.depths || typeof snapshot.depths !== 'object' ||
+ !Number.isInteger(snapshot.maxDepth) || snapshot.maxDepth < 1 ||
+ snapshot.nodeIds[0] !== snapshot.origin.id) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+ var measuredMaxDepth = 0;
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ var depth = snapshot.depths[nodeId];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId] ||
+ !Number.isInteger(depth) || depth < 0 || depth > snapshot.maxDepth ||
+ (nodeId === snapshot.origin.id ? depth !== 0 : depth < 1)) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ nodeMatches.push({ elements: matchedNodes, id: nodeId, depth: depth });
+ }
+ if (measuredMaxDepth !== snapshot.maxDepth) return false;
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ !nodeIds[edge.from] || !nodeIds[edge.to] ||
+ !Number.isInteger(edge.depth) || edge.depth < 1 || edge.depth > snapshot.maxDepth ||
+ edge.depth !== Math.max(snapshot.depths[edge.from], snapshot.depths[edge.to])) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push({ elements: matchedEdges, depth: edge.depth });
+ }
+
+ clone.setAttribute('data-share-reach', snapshot.direction);
+ nodeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ if (match.id === snapshot.origin.id) element.setAttribute('data-share-reach-origin', '');
+ });
+ });
+ edgeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ });
+ });
+
+ return clone.getAttribute('data-share-reach') === snapshot.direction &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-reach-active') &&
+ clone.querySelectorAll('[data-animate], [data-reach-match], [data-reach-origin], [data-reach-depth]').length === 0 &&
+ clone.querySelectorAll('[data-share-reach-origin]').length === 1 &&
+ clone.querySelectorAll('[data-share-reach-match]').length ===
+ nodeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0) +
+ edgeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4440,6 +5146,7 @@
clone.style.removeProperty('transform');
clone.removeAttribute('data-view-scale');
clone.removeAttribute('data-focus-active');
+ clone.removeAttribute('data-reach-active');
clone.removeAttribute('data-lens-active');
clone.removeAttribute('data-lens-flow-count');
clone.removeAttribute('data-lens-flow-density');
@@ -4451,6 +5158,8 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
+ clone.removeAttribute('data-share-reach');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4510,6 +5219,16 @@
Array.prototype.forEach.call(clone.querySelectorAll('[data-relationship-hit-overlay]'), function (el) {
el.remove();
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-beacon]'), function (el) {
+ el.remove();
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-count]'), function (el) {
+ var originalLabel = el.getAttribute('data-source-evidence-original-label');
+ if (originalLabel == null || originalLabel === '') el.removeAttribute('aria-label');
+ else el.setAttribute('aria-label', originalLabel);
+ el.removeAttribute('data-source-evidence-count');
+ el.removeAttribute('data-source-evidence-original-label');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-story-step], [data-story-beat-state], [data-story-beat-step]'), function (el) {
el.removeAttribute('data-story-step');
el.removeAttribute('data-story-beat-state');
@@ -4520,6 +5239,11 @@
el.removeAttribute('data-focus-match');
el.removeAttribute('data-focus-selected');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-reach-match], [data-reach-origin], [data-reach-depth]'), function (el) {
+ el.removeAttribute('data-reach-match');
+ el.removeAttribute('data-reach-origin');
+ el.removeAttribute('data-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-lens-match], [data-lens-selected], [data-lens-peer]'), function (el) {
el.removeAttribute('data-lens-match');
el.removeAttribute('data-lens-selected');
@@ -4550,6 +5274,18 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth]'), function (el) {
+ el.removeAttribute('data-share-reach-match');
+ el.removeAttribute('data-share-reach-origin');
+ el.removeAttribute('data-share-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4559,6 +5295,7 @@
});
var canonicalStateClean = !clone.hasAttribute('data-view-scale') &&
!clone.hasAttribute('data-focus-active') &&
+ !clone.hasAttribute('data-reach-active') &&
!clone.hasAttribute('data-lens-active') &&
!clone.hasAttribute('data-lens-flow-count') &&
!clone.hasAttribute('data-lens-flow-density') &&
@@ -4569,6 +5306,8 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-share-reach') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4578,9 +5317,17 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-reach-match], [data-reach-origin], [data-reach-depth], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth], [data-source-evidence-beacon], [data-source-evidence-count], [data-source-evidence-original-label], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
+ var reachStateClean = opts.reachSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && !opts.routeSnapshot && applyReachSnapshot(clone, opts.reachSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4704,6 +5451,22 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+ if (opts.reachSnapshot) {
+ style.textContent += "\nsvg[data-share-reach] [data-node-id], svg[data-share-reach] [data-edge-from] { opacity: 0.14; }\n" +
+ "svg[data-share-reach] [data-share-reach-match] { opacity: 1; }\n" +
+ "svg[data-share-reach] [data-edge-from][data-share-reach-match] { stroke-width: 1.55; }\n" +
+ "svg[data-share-reach=\"upstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--database-stroke); stroke-width: 3.4; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-reach=\"downstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--backend-stroke); stroke-width: 3.4; stroke-dasharray: 1 0; }\n" +
+ "svg[data-preset=\"blueprint\"][data-share-reach] [data-share-reach-origin], svg[data-preset=\"blueprint\"][data-share-reach] [data-edge-from][data-share-reach-match] { filter: none; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4711,7 +5474,9 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean,
+ reachStateClean: reachStateClean
};
}
@@ -4755,24 +5520,29 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
- URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4800,75 +5570,110 @@
return value + suffix;
}
- function rasterizeShareCard() {
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var reachSnapshot = options.reachSnapshot || null;
+ if (routeSnapshot && reachSnapshot) return Promise.reject(new Error('Share Card variants cannot be combined'));
var svg = document.querySelector('.diagram-container svg');
var vb = svg.viewBox.baseVal;
var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
- var data = serializeSvg(sourceScale);
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot, reachSnapshot: reachSnapshot });
if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ if (reachSnapshot && !data.reachStateClean) return Promise.reject(new Error('Reach Card export could not preserve authored reach safely'));
var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
var svgUrl = URL.createObjectURL(svgBlob);
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = SHARE_CARD_WIDTH;
- canvas.height = SHARE_CARD_HEIGHT;
- var ctx = canvas.getContext('2d');
- var computed = getComputedStyle(document.documentElement);
- var bg = computed.getPropertyValue('--bg').trim() || currentBg();
- var text = computed.getPropertyValue('--text').trim() || '#ffffff';
- var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
- var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
- var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
- var titleNode = document.querySelector('.header h1');
- var subtitleNode = document.querySelector('.header .subtitle');
- var title = titleNode ? titleNode.textContent : document.title;
- var subtitle = subtitleNode ? subtitleNode.textContent : '';
- var preset = document.documentElement.getAttribute('data-preset') || 'classic';
- var theme = document.documentElement.getAttribute('data-theme') || 'dark';
- var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
-
- ctx.fillStyle = bg;
- ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
-
- ctx.fillStyle = accent;
- ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
-
- ctx.textBaseline = 'alphabetic';
- ctx.fillStyle = text;
- var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
- ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
-
- ctx.fillStyle = muted;
- var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
- ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
-
- ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
- ctx.textAlign = 'right';
- ctx.fillStyle = accent;
- ctx.fillText('ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase(), SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
- ctx.textAlign = 'left';
-
- var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
- var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
- var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
- var drawWidth = data.width * fit;
- var drawHeight = data.height * fit;
- var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
- var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
-
- ctx.strokeStyle = border;
- ctx.lineWidth = 1;
- ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
- ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
- URL.revokeObjectURL(svgUrl);
-
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for Share Card'));
- else resolve(blob);
- }, 'image/png');
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accentProperty = reachSnapshot
+ ? (reachSnapshot.direction === 'upstream' ? '--database-stroke' : '--backend-stroke')
+ : '--frontend-stroke';
+ var accent = computed.getPropertyValue(accentProperty).trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : reachSnapshot
+ ? 'Authored ' + reachSnapshot.direction + ' from ' + reachSnapshot.origin.label + ' · ' +
+ (reachSnapshot.nodeIds.length - 1) + ' nodes · ' + reachSnapshot.edges.length +
+ ' links · max ' + reachSnapshot.maxDepth + ' hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : reachSnapshot
+ ? 'ARCHIFY · ' + reachSnapshot.direction.toUpperCase() + ' REACH'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4878,6 +5683,24 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route' && options.variant !== 'reach') {
+ return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ }
+ if (options.variant === 'route') {
+ var routeSnapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!routeSnapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: routeSnapshot });
+ }
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ if (!snapshot) return Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return renderShareCard({ reachSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5140,10 +5963,30 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
+ var reachShareItem = menu.querySelector('button[data-action="reach-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
+ function syncReachShareItem() {
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ reachShareItem.hidden = !snapshot;
+ reachShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5202,9 +6045,11 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
+ syncReachShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5238,7 +6083,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5263,8 +6108,7 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
return (format === 'share-card'
? rasterizeShareCard().then(function (blob) {
@@ -5308,13 +6152,72 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
+ function runReachShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ var blobPromise = snapshot
+ ? renderShareCard({ reachSnapshot: snapshot })
+ : Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'reach', false, true);
+ download(blob, diagramFilename() + '-' + snapshot.direction + '-reach-share-card.png');
+ toast('Downloaded Reach Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Reach Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical, dimensions) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean, reachStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (reachStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-reach-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
+ }
if (dimensions) {
document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
@@ -5330,6 +6233,9 @@
document.documentElement.removeAttribute('data-last-export-canonical');
document.documentElement.removeAttribute('data-last-export-width');
document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
document.documentElement.removeAttribute('data-last-export-error-format');
document.documentElement.removeAttribute('data-last-export-error');
}
@@ -5371,6 +6277,7 @@
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
@@ -5385,6 +6292,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var reachShareCardBtn = e.target.closest('button[data-action="reach-share-card"]');
+ if (reachShareCardBtn && !reachShareCardBtn.disabled && !reachShareCardBtn.hidden) { runReachShareCard(); return; }
+
var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
@@ -5396,7 +6309,18 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport, shareCard: rasterizeShareCard, copyShareCard: runCopyShareCard };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ downloadReachShareCard: runReachShareCard,
+ syncRouteShare: syncRouteShareItem,
+ syncReachShare: syncReachShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5681,6 +6605,76 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ var svgNamespace = 'http://www.w3.org/2000/svg';
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ function installBeacons() {
+ if (!payload) return 0;
+ var svg = document.querySelector('.diagram-container svg');
+ if (!svg) return 0;
+ var installed = 0;
+ Array.prototype.forEach.call(svg.querySelectorAll('[data-node-id]'), function (node) {
+ var id = node.getAttribute('data-node-id');
+ var sources = payload.nodes[id];
+ if (!Array.isArray(sources) || !sources.length || node.querySelector('[data-source-evidence-beacon]')) return;
+ var shape = node.querySelector('[data-animate="node"]') || node.querySelector('[class*="c-"]');
+ var box;
+ try { box = (shape || node).getBBox(); } catch (_) { return; }
+ if (!box || !Number.isFinite(box.x) || !Number.isFinite(box.y) || !Number.isFinite(box.width) || box.width < 36) return;
+
+ var count = sources.length;
+ var label = count + ' verified source' + (count === 1 ? '' : 's') + '; focus this node to inspect';
+ var beacon = document.createElementNS(svgNamespace, 'g');
+ beacon.classList.add('source-evidence-beacon');
+ beacon.setAttribute('data-source-evidence-beacon', '');
+ beacon.setAttribute('aria-hidden', 'true');
+ beacon.setAttribute('transform', 'translate(' + (box.x + box.width - 35) + ' ' + (box.y + 5) + ')');
+ var title = document.createElementNS(svgNamespace, 'title');
+ title.textContent = label;
+ var plate = document.createElementNS(svgNamespace, 'rect');
+ plate.setAttribute('width', '30');
+ plate.setAttribute('height', '12');
+ plate.setAttribute('rx', '6');
+ var text = document.createElementNS(svgNamespace, 'text');
+ text.setAttribute('x', '15');
+ text.setAttribute('y', '8.25');
+ text.textContent = 'SRC ' + count;
+ beacon.appendChild(title);
+ beacon.appendChild(plate);
+ beacon.appendChild(text);
+ node.appendChild(beacon);
+
+ var originalLabel = node.getAttribute('aria-label') || '';
+ node.setAttribute('data-source-evidence-count', String(count));
+ node.setAttribute('data-source-evidence-original-label', originalLabel);
+ node.setAttribute('aria-label', (originalLabel ? originalLabel + ', ' : '') + count + ' verified source reference' + (count === 1 ? '' : 's'));
+ installed += 1;
+ });
+ return installed;
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ },
+ installBeacons: installBeacons
+ };
+ })();
+ Archify.sourceEvidence.installBeacons();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5697,7 +6691,16 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
+ var reachSection = document.getElementById('focus-reach');
+ var reachStatus = document.getElementById('focus-reach-status');
+ var upstreamBtn = document.getElementById('btn-reach-upstream');
+ var downstreamBtn = document.getElementById('btn-reach-downstream');
+ var upstreamCount = document.getElementById('focus-reach-upstream-count');
+ var downstreamCount = document.getElementById('focus-reach-downstream-count');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
var relationsBtn = document.getElementById('btn-focus-relations');
@@ -5711,6 +6714,8 @@
var relationshipHitOverlay = null;
var relationshipHitTargets = [];
var directPreviewTimer = null;
+ var reachabilityMode = null;
+ var activeReachability = null;
var svgNamespace = 'http://www.w3.org/2000/svg';
var reducedMotionQuery = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
var finePointerQuery = window.matchMedia ? window.matchMedia('(hover: hover) and (pointer: fine)') : null;
@@ -5724,11 +6729,318 @@
function nodeLabel(node, fallback) {
return node.getAttribute('data-node-label') || (node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '');
}
+ function reachabilityRelationships() {
+ var seen = Object.create(null);
+ var relationships = [];
+ edges().forEach(function (edge) {
+ var from = edge.getAttribute('data-edge-from');
+ var to = edge.getAttribute('data-edge-to');
+ var key = edge.getAttribute('data-edge-key') || (from + '\u0000' + to + '\u0000' + (edge.getAttribute('data-edge-label') || ''));
+ if (!from || !to || seen[key]) return;
+ seen[key] = true;
+ relationships.push({ key: key, from: from, to: to });
+ });
+ return relationships;
+ }
+ function computeReachability(originId, direction, relationships) {
+ if (typeof originId !== 'string' || !originId ||
+ (direction !== 'upstream' && direction !== 'downstream') ||
+ !Array.isArray(relationships)) return null;
+ var records = [];
+ var seenKeys = Object.create(null);
+ relationships.forEach(function (relationship, index) {
+ if (!relationship || typeof relationship.from !== 'string' || !relationship.from ||
+ typeof relationship.to !== 'string' || !relationship.to) return;
+ var key = typeof relationship.key === 'string' && relationship.key
+ ? relationship.key : String(index);
+ if (seenKeys[key]) return;
+ seenKeys[key] = true;
+ records.push({ key: key, from: relationship.from, to: relationship.to });
+ });
+
+ var depths = Object.create(null);
+ var order = [];
+ var queue = [originId];
+ depths[originId] = 0;
+ for (var cursor = 0; cursor < queue.length; cursor += 1) {
+ var current = queue[cursor];
+ records.forEach(function (relationship) {
+ var next = null;
+ if (direction === 'downstream' && relationship.from === current) next = relationship.to;
+ else if (direction === 'upstream' && relationship.to === current) next = relationship.from;
+ if (next == null || Object.prototype.hasOwnProperty.call(depths, next)) return;
+ depths[next] = depths[current] + 1;
+ queue.push(next);
+ });
+ }
+ queue.forEach(function (id) { order.push(id); });
+
+ var edgeKeys = [];
+ records.forEach(function (relationship) {
+ if (Object.prototype.hasOwnProperty.call(depths, relationship.from) &&
+ Object.prototype.hasOwnProperty.call(depths, relationship.to)) edgeKeys.push(relationship.key);
+ });
+ var maxDepth = order.reduce(function (maximum, id) {
+ return Math.max(maximum, depths[id]);
+ }, 0);
+ return {
+ direction: direction,
+ originId: originId,
+ nodeIds: order,
+ edgeKeys: edgeKeys,
+ depths: depths,
+ maxDepth: maxDepth
+ };
+ }
+ function reachabilityFor(id, direction) {
+ return computeReachability(id, direction, reachabilityRelationships());
+ }
+ function resetReachabilityButtons() {
+ upstreamBtn.setAttribute('aria-pressed', 'false');
+ downstreamBtn.setAttribute('aria-pressed', 'false');
+ }
+ function clearReachability(options) {
+ options = options || {};
+ reachabilityMode = null;
+ activeReachability = null;
+ svg.removeAttribute('data-reach-active');
+ chip.removeAttribute('data-reach-mode');
+ nodes().forEach(function (node) {
+ node.removeAttribute('data-reach-match');
+ node.removeAttribute('data-reach-origin');
+ node.removeAttribute('data-reach-depth');
+ });
+ edges().forEach(function (edge) {
+ edge.removeAttribute('data-reach-match');
+ edge.removeAttribute('data-reach-depth');
+ });
+ resetReachabilityButtons();
+ reachStatus.textContent = '';
+ reachStatus.hidden = true;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl === true && activeIds.length === 1) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' + encodeURIComponent(activeIds[0]));
+ } catch (_) {}
+ }
+ }
+ function renderReachabilityControls(id) {
+ var upstream = reachabilityFor(id, 'upstream');
+ var downstream = reachabilityFor(id, 'downstream');
+ var upstreamReach = upstream ? Math.max(0, upstream.nodeIds.length - 1) : 0;
+ var downstreamReach = downstream ? Math.max(0, downstream.nodeIds.length - 1) : 0;
+ upstreamCount.textContent = String(upstreamReach);
+ downstreamCount.textContent = String(downstreamReach);
+ upstreamBtn.disabled = upstreamReach === 0;
+ downstreamBtn.disabled = downstreamReach === 0;
+ upstreamBtn.setAttribute('aria-label', upstreamReach
+ ? 'Trace ' + upstreamReach + ' upstream authored node' + (upstreamReach === 1 ? '' : 's')
+ : 'No upstream authored nodes');
+ downstreamBtn.setAttribute('aria-label', downstreamReach
+ ? 'Trace ' + downstreamReach + ' downstream authored node' + (downstreamReach === 1 ? '' : 's')
+ : 'No downstream authored nodes');
+ reachSection.hidden = false;
+ }
+ function applyReachability(direction, options) {
+ options = options || {};
+ if (activeIds.length !== 1 || (direction !== 'upstream' && direction !== 'downstream')) return false;
+ if (reachabilityMode === direction && options.toggle !== false) {
+ clearReachability({ updateUrl: options.updateUrl !== false });
+ return true;
+ }
+ var result = reachabilityFor(activeIds[0], direction);
+ if (!result || result.nodeIds.length <= 1) return false;
+ if (Archify.guidedViews && typeof Archify.guidedViews.showAll === 'function') {
+ Archify.guidedViews.showAll({ clearFocus: false, updateUrl: false, resetView: false });
+ }
+ clearRelationshipPreview({ clearPin: true });
+ clearReachability({ updateUrl: false });
+ reachabilityMode = direction;
+ activeReachability = result;
+ var edgeKeySet = Object.create(null);
+ result.edgeKeys.forEach(function (key) { edgeKeySet[key] = true; });
+ svg.setAttribute('data-reach-active', direction);
+ chip.setAttribute('data-reach-mode', direction);
+ nodes().forEach(function (node) {
+ var id = node.getAttribute('data-node-id');
+ if (!Object.prototype.hasOwnProperty.call(result.depths, id)) return;
+ node.setAttribute('data-reach-match', '');
+ node.setAttribute('data-reach-depth', String(result.depths[id]));
+ if (id === result.originId) node.setAttribute('data-reach-origin', '');
+ });
+ edges().forEach(function (edge) {
+ var key = edge.getAttribute('data-edge-key') || (
+ edge.getAttribute('data-edge-from') + '\u0000' +
+ edge.getAttribute('data-edge-to') + '\u0000' +
+ (edge.getAttribute('data-edge-label') || '')
+ );
+ if (!edgeKeySet[key]) return;
+ edge.setAttribute('data-reach-match', '');
+ var fromDepth = result.depths[edge.getAttribute('data-edge-from')];
+ var toDepth = result.depths[edge.getAttribute('data-edge-to')];
+ edge.setAttribute('data-reach-depth', String(Math.max(fromDepth || 0, toDepth || 0)));
+ });
+ resetReachabilityButtons();
+ var activeButton = direction === 'upstream' ? upstreamBtn : downstreamBtn;
+ activeButton.setAttribute('aria-pressed', 'true');
+ var reachableCount = result.nodeIds.length - 1;
+ var directionLabel = direction === 'upstream' ? 'Upstream' : 'Downstream';
+ reachStatus.textContent = directionLabel + ' · ' + reachableCount + ' node' +
+ (reachableCount === 1 ? '' : 's') + ' · ' + result.edgeKeys.length + ' link' +
+ (result.edgeKeys.length === 1 ? '' : 's') + ' · max ' + result.maxDepth + ' hop' +
+ (result.maxDepth === 1 ? '' : 's');
+ reachStatus.hidden = false;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl !== false) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' +
+ encodeURIComponent(activeIds[0]) + '&reach=' + direction);
+ } catch (_) {}
+ }
+ if (options.reveal !== false && Archify.view && typeof Archify.view.reveal === 'function') {
+ Archify.view.reveal(result.nodeIds, { includeNeighbors: false, reason: 'reachability' });
+ }
+ requestLensPlacement();
+ return true;
+ }
+ function reachabilitySnapshot() {
+ if (!activeReachability || activeIds.length !== 1 ||
+ (reachabilityMode !== 'upstream' && reachabilityMode !== 'downstream') ||
+ activeReachability.direction !== reachabilityMode ||
+ activeReachability.originId !== activeIds[0] ||
+ svg.getAttribute('data-reach-active') !== reachabilityMode) return null;
+
+ var originId = activeReachability.originId;
+ var nodeIds = activeReachability.nodeIds.slice();
+ var edgeKeys = activeReachability.edgeKeys.slice();
+ if (nodeIds.length < 2 || nodeIds[0] !== originId || !edgeKeys.length ||
+ !activeReachability.depths || !Number.isInteger(activeReachability.maxDepth) ||
+ activeReachability.maxDepth < 1) return null;
+
+ var allNodes = nodes();
+ var allEdges = edges();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ var nodeIdSet = Object.create(null);
+ var depths = Object.create(null);
+ var originNode = null;
+ var measuredMaxDepth = 0;
+
+ if (nodeIds.some(function (id) {
+ var depth = activeReachability.depths[id];
+ var matches = allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ });
+ if (typeof id !== 'string' || !id || seenNodeIds[id] || matches.length !== 1 ||
+ !matches[0].hasAttribute('data-reach-match') ||
+ !Number.isInteger(depth) || depth < 0 || depth > activeReachability.maxDepth ||
+ (id === originId
+ ? (!matches[0].hasAttribute('data-reach-origin') || depth !== 0)
+ : depth < 1)) return true;
+ seenNodeIds[id] = true;
+ nodeIdSet[id] = true;
+ depths[id] = depth;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ if (id === originId) originNode = matches[0];
+ return false;
+ }) || !originNode || measuredMaxDepth !== activeReachability.maxDepth ||
+ allNodes.filter(function (node) { return node.hasAttribute('data-reach-match'); }).length !== nodeIds.length) return null;
+
+ var edgeRecords = [];
+ if (edgeKeys.some(function (key) {
+ if (typeof key !== 'string' || !key || seenEdgeKeys[key]) return true;
+ var fragments = allEdges.filter(function (edge) {
+ return edge.getAttribute('data-edge-key') === key;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ if (!fragments.length || drawableFragments.length !== 1 ||
+ !fragments.every(function (fragment) { return fragment.hasAttribute('data-reach-match'); })) return true;
+ var first = fragments[0];
+ var from = first.getAttribute('data-edge-from');
+ var to = first.getAttribute('data-edge-to');
+ var id = first.getAttribute('data-edge-id') || '';
+ var labelValue = first.getAttribute('data-edge-label') || '';
+ if (!nodeIdSet[from] || !nodeIdSet[to] || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === from &&
+ fragment.getAttribute('data-edge-to') === to &&
+ (fragment.getAttribute('data-edge-id') || '') === id;
+ })) return true;
+ seenEdgeKeys[key] = true;
+ edgeRecords.push({
+ key: key,
+ id: id,
+ from: from,
+ to: to,
+ label: labelValue,
+ depth: Math.max(depths[from], depths[to])
+ });
+ return false;
+ })) return null;
+
+ var liveEdgeKeys = Object.create(null);
+ if (allEdges.some(function (edge) {
+ if (!edge.hasAttribute('data-reach-match')) return false;
+ var key = edge.getAttribute('data-edge-key');
+ if (!key || !seenEdgeKeys[key]) return true;
+ liveEdgeKeys[key] = true;
+ return false;
+ }) || Object.keys(liveEdgeKeys).length !== edgeKeys.length) return null;
+
+ return {
+ direction: reachabilityMode,
+ origin: { id: originId, label: nodeLabel(originNode, originId) },
+ nodeIds: nodeIds,
+ depths: depths,
+ maxDepth: activeReachability.maxDepth,
+ edges: edgeRecords
+ };
+ }
function setPassportValue(element, value) {
var normalized = value == null ? '' : String(value).trim();
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5736,6 +7048,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6293,6 +7606,7 @@
var counts = { out: 0, in: 0, loop: 0 };
relationships.forEach(function (relationship) { counts[relationship.direction] += 1; });
summary.textContent = counts.out + ' outgoing · ' + counts.in + ' incoming' + (counts.loop ? ' · ' + counts.loop + ' loop' : '');
+ renderReachabilityControls(id);
relationshipList.textContent = '';
if (!relationships.length) {
var empty = document.createElement('p');
@@ -6389,6 +7703,10 @@
}
function clear(options) {
options = options || {};
+ var restoreNode = options.restoreFocus === true && activeIds.length === 1
+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')
+ : null;
+ clearReachability({ updateUrl: false });
if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {
Archify.intentTrace.clear({ announce: false });
}
@@ -6415,7 +7733,16 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
+ reachSection.hidden = true;
+ upstreamCount.textContent = '0';
+ downstreamCount.textContent = '0';
+ upstreamBtn.disabled = true;
+ downstreamBtn.disabled = true;
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
copyBtn.setAttribute('aria-label', 'Copy link to focused node');
@@ -6430,6 +7757,10 @@
if (options.updateUrl !== false) {
try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}
}
+ if (restoreNode) {
+ try { restoreNode.focus({ preventScroll: true }); }
+ catch (_) { try { restoreNode.focus(); } catch (_) {} }
+ }
}
function setMany(ids, options) {
@@ -6525,7 +7856,7 @@
var relationId = record && record.id;
var value = location.href.replace(/#.*$/, '') + (relationId
? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]));
+ : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
: Promise.resolve(fallbackCopy(value));
@@ -6563,8 +7894,10 @@
Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });
}
});
- clearBtn.addEventListener('click', function () { clear(); });
+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });
copyBtn.addEventListener('click', copyFocusLink);
+ upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });
+ downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });
relationsBtn.addEventListener('click', function () {
var expanded = chip.getAttribute('data-relations-expanded') === 'true';
if (expanded) chip.removeAttribute('data-relations-expanded');
@@ -6628,6 +7961,13 @@
event.preventDefault();
buttons[index].focus();
});
+ document.addEventListener('click', function (event) {
+ var target = event.target;
+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;
+ if (container.getAttribute('data-just-panned') === 'true') return;
+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;
+ clear();
+ }, true);
window.addEventListener('scroll', requestLensPlacement, { passive: true });
window.addEventListener('resize', requestLensPlacement);
container.addEventListener('scroll', requestLensPlacement, { passive: true });
@@ -6652,11 +7992,17 @@
var params = new URLSearchParams(location.hash.replace(/^#/, ''));
var relation = params.get('relation');
var initial = params.get('focus');
+ var reach = params.get('reach');
if (relation) {
if (html.getAttribute('data-embed') === 'true' ||
!inspectRelationshipById(relation, { updateUrl: false, toggle: false })) clear({ updateUrl: false });
}
- else if (initial) set(initial, { updateUrl: false, toggle: false });
+ else if (initial) {
+ if (set(initial, { updateUrl: false, toggle: false }) &&
+ (reach === 'upstream' || reach === 'downstream')) {
+ applyReachability(reach, { updateUrl: false, toggle: false, reveal: false });
+ }
+ }
else if (!params.get('view')) clear({ updateUrl: false });
} catch (_) {}
}
@@ -6669,6 +8015,9 @@
setMany: setMany,
clear: clear,
copyLink: copyFocusLink,
+ reach: applyReachability,
+ clearReach: clearReachability,
+ reachabilitySnapshot: reachabilitySnapshot,
inspectRelationship: inspectRelationship,
inspectRelationshipById: inspectRelationshipById,
reposition: requestLensPlacement,
@@ -6676,6 +8025,15 @@
var record = pinnedRelationshipRecord();
return record ? { id: record.id || null, key: record.key, from: record.from, to: record.to, label: record.label } : null;
},
+ reachability: function () {
+ return activeReachability ? {
+ direction: activeReachability.direction,
+ originId: activeReachability.originId,
+ nodeIds: activeReachability.nodeIds.slice(),
+ edgeKeys: activeReachability.edgeKeys.slice(),
+ maxDepth: activeReachability.maxDepth
+ } : null;
+ },
active: function () { return activeIds.length === 0 ? null : (activeIds.length === 1 ? activeIds[0] : activeIds.slice()); }
};
})();
@@ -9436,6 +10794,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9443,8 +10805,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9513,7 +10876,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9525,11 +10892,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9537,7 +10903,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9670,7 +11038,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9678,6 +11046,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9826,6 +11242,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10305,6 +11722,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10575,6 +11993,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11510,7 +12929,7 @@
Archify.intentTrace.clear();
} else if (e.key === 'Escape' && Archify.focus.active()) {
e.preventDefault();
- Archify.focus.clear();
+ Archify.focus.clear({ restoreFocus: true });
} else if (e.key === 'Escape' && Archify.presentation.active()) {
e.preventDefault();
Archify.presentation.exit();
diff --git a/archify/examples/sequence-cache-miss-request.html b/archify/examples/sequence-cache-miss-request.html
index 7e2f382b..3f727132 100644
--- a/archify/examples/sequence-cache-miss-request.html
+++ b/archify/examples/sequence-cache-miss-request.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -1354,10 +1511,25 @@
.relationship-lens-actions {
display: flex;
flex-direction: column;
- align-items: stretch;
+ align-items: flex-end;
gap: 0.18rem;
}
.relationship-lens-actions button { white-space: nowrap; }
+ .relationship-lens-actions #btn-focus-clear {
+ display: grid;
+ width: 1.75rem;
+ height: 1.75rem;
+ padding: 0;
+ place-items: center;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
+ }
+ .relationship-lens-actions #btn-focus-clear:hover,
+ .relationship-lens-actions #btn-focus-clear:focus-visible {
+ background: var(--toolbar-hover);
+ color: var(--text);
+ }
.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }
.relationship-lens-actions #btn-focus-relations { display: none; }
.relationship-lens-eyebrow {
@@ -1420,12 +1592,163 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
+ .semantic-passport-reach {
+ display: grid;
+ gap: 0.28rem;
+ margin-top: 0.52rem;
+ padding-top: 0.48rem;
+ border-top: 1px solid color-mix(in srgb, var(--toolbar-border) 76%, transparent);
+ }
+ .semantic-passport-reach[hidden] { display: none; }
+ .semantic-passport-reach-label {
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-reach-actions {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.25rem;
+ }
+ .semantic-passport-reach-actions button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.5rem;
+ min-width: 0;
+ min-height: 2rem;
+ padding: 0.32rem 0.42rem;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 86%, transparent);
+ background: color-mix(in srgb, var(--panel) 70%, transparent);
+ color: var(--text-muted);
+ text-align: left;
+ }
+ .semantic-passport-reach-actions button:hover:not(:disabled),
+ .semantic-passport-reach-actions button:focus-visible {
+ border-color: color-mix(in srgb, var(--frontend-stroke) 62%, var(--toolbar-border));
+ color: var(--text);
+ }
+ .semantic-passport-reach-actions button:focus-visible {
+ outline: 2px solid var(--frontend-stroke);
+ outline-offset: 1px;
+ }
+ .semantic-passport-reach-actions button:disabled {
+ cursor: default;
+ opacity: 0.5;
+ }
+ .semantic-passport-reach-actions button[aria-pressed="true"] {
+ border-color: color-mix(in srgb, var(--reach-color, var(--frontend-stroke)) 72%, var(--toolbar-border));
+ background: color-mix(in srgb, var(--reach-fill, var(--frontend-fill)) 48%, transparent);
+ color: var(--text);
+ }
+ #btn-reach-upstream {
+ --reach-color: var(--database-stroke);
+ --reach-fill: var(--database-fill);
+ }
+ #btn-reach-downstream {
+ --reach-color: var(--backend-stroke);
+ --reach-fill: var(--backend-fill);
+ }
+ .semantic-passport-reach-actions strong {
+ color: var(--reach-color, var(--frontend-stroke));
+ font-size: 0.625rem;
+ }
+ .semantic-passport-reach-status {
+ color: var(--text-faint);
+ font-size: 0.525rem;
+ line-height: 1.4;
+ }
+ .semantic-passport-reach-status[hidden] { display: none; }
.relationship-lens-list {
max-height: min(18rem, 46vh);
overflow: auto;
@@ -1698,13 +2021,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +2070,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +2085,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +2104,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +2116,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +2168,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +2195,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2364,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2491,6 +2855,8 @@
.story-carrier-overlay { display: none !important; }
.diagram-container svg[data-focus-active] [data-node-id],
.diagram-container svg[data-focus-active] [data-edge-from],
+ .diagram-container svg[data-reach-active] [data-node-id],
+ .diagram-container svg[data-reach-active] [data-edge-from],
.diagram-container svg[data-story-beat] [data-story-step],
.diagram-container svg[data-story-beat] [data-edge-from][data-story-beat-step],
.diagram-container svg[data-route-active] [data-node-id],
@@ -2561,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2597,6 +2982,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2644,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2659,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3035,6 +3427,8 @@
the global zoom level. Reveal only their exact semantic matches. */
svg[data-focus-active] [data-focus-match][data-detail],
svg[data-focus-active] [data-focus-match] [data-detail],
+ svg[data-reach-active] [data-reach-match][data-detail],
+ svg[data-reach-active] [data-reach-match] [data-detail],
svg[data-lens-active] [data-lens-match][data-detail],
svg[data-lens-active] [data-lens-match] [data-detail],
svg[data-legend-preview-active] [data-legend-preview-match][data-detail],
@@ -3053,6 +3447,7 @@
pointer-events: auto;
}
svg[data-focus-active] [data-focus-match] [data-detail-anchor],
+ svg[data-reach-active] [data-reach-match] [data-detail-anchor],
svg[data-lens-active] [data-lens-match] [data-detail-anchor],
svg[data-legend-preview-active] [data-legend-preview-match] [data-detail-anchor],
svg[data-intent-trace-active] [data-intent-trace-match] [data-detail-anchor],
@@ -3084,6 +3479,41 @@
filter: drop-shadow(0 0 7px var(--frontend-stroke));
outline: none;
}
+ /* Verified Source Beacons are installed at runtime only for nodes whose
+ repository evidence passed the local revision/blob/line checks. They
+ live inside the owning node so every focus, route, story, and guided
+ view keeps one coherent opacity state. Export serialization removes
+ them before producing the canonical SVG or any derived visual. */
+ .source-evidence-beacon {
+ pointer-events: none;
+ opacity: 0.76;
+ transition: opacity 160ms ease, filter 160ms ease;
+ }
+ .source-evidence-beacon rect {
+ fill: color-mix(in srgb, var(--mask) 92%, var(--backend-stroke));
+ stroke: color-mix(in srgb, var(--backend-stroke) 82%, var(--panel-border));
+ stroke-width: 1;
+ vector-effect: non-scaling-stroke;
+ }
+ .source-evidence-beacon text {
+ fill: var(--backend-stroke);
+ font-size: 5.5px;
+ font-weight: 800;
+ letter-spacing: 0.06em;
+ text-anchor: middle;
+ text-transform: uppercase;
+ }
+ svg [data-node-id]:hover .source-evidence-beacon,
+ svg [data-node-id]:focus-visible .source-evidence-beacon,
+ svg [data-node-id][data-focus-selected] .source-evidence-beacon {
+ opacity: 1;
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="signal-flow"] .source-evidence-beacon { opacity: 0.9; }
+ svg[data-preset="blueprint"] .source-evidence-beacon rect {
+ rx: 0.8px;
+ filter: none;
+ }
svg [data-legend-kind][role="button"] { cursor: pointer; }
svg [data-legend-kind]:focus { outline: none; }
svg [data-legend-hit] {
@@ -3199,6 +3629,30 @@
filter: drop-shadow(0 0 10px var(--frontend-stroke));
}
+ /* Authored Reachability is a bounded graph query over the relationships
+ already present in the artifact. Upstream walks incoming edges;
+ downstream walks outgoing edges. It never claims runtime causality and
+ changes only viewer emphasis, not canonical geometry or export bytes. */
+ svg[data-reach-active] [data-node-id],
+ svg[data-reach-active] [data-edge-from] { opacity: 0.09; }
+ svg[data-reach-active] [data-reach-match] { opacity: 1; }
+ svg[data-reach-active="upstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--database-stroke));
+ }
+ svg[data-reach-active="downstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--backend-stroke));
+ }
+ svg[data-reach-active="upstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--database-stroke) 72%, transparent));
+ }
+ svg[data-reach-active="downstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="blueprint"][data-reach-active] [data-reach-origin],
+ svg[data-preset="blueprint"][data-reach-active] [data-edge-from][data-reach-match] {
+ filter: none;
+ }
+
/* Direct Relationship Explorer makes authored paths a real input surface
without changing their visible stroke or canonical SVG. A transparent
runtime rail supplies forgiving pointer geometry; the exact authored
@@ -3294,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3336,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3376,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3459,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3477,6 +3958,9 @@
svg[data-preset="blueprint"][data-focus-active] [data-focus-selected] {
filter: drop-shadow(0 0 3px var(--frontend-stroke));
}
+ svg[data-preset="blueprint"][data-focus-active][data-reach-active] [data-focus-selected][data-reach-origin] {
+ filter: none;
+ }
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-source],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-target] {
@@ -3541,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3602,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3627,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -3742,6 +4242,7 @@
}
.relationship-pulse-overlay { display: none !important; }
.guided-view-chapter { transition: none !important; }
+ .source-evidence-beacon,
svg [data-node-id], svg [data-edge-from], svg [data-detail], svg [data-detail-anchor], svg [data-legend-hit], svg { transition: none !important; }
}
</style>
@@ -3789,6 +4290,8 @@
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
<button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="reach-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Reach Share Card <span class="hint">1200&times;630 PNG</span></button>
<button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
<hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
@@ -3814,6 +4317,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-and-auth","label":"Request and identity","focus":["user","web","api","auth"],"note":"Follow the user request through the authentication check."},{"id":"cache-fallback","label":"Cache fallback","focus":["api","redis","db"],"note":"See the cache miss and the source-of-truth query it triggers."},{"id":"return-and-trace","label":"Return and trace","focus":["db","api","redis","trace","web","user"],"note":"Separate response latency from the non-blocking observability write."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4175,7 +4679,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4194,12 +4698,31 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
+ <div class="semantic-passport-reach" id="focus-reach" hidden>
+ <span class="semantic-passport-reach-label">Authored reach</span>
+ <div class="semantic-passport-reach-actions" role="group" aria-label="Trace authored reachability">
+ <button id="btn-reach-upstream" type="button" aria-label="Trace upstream authored reachability" aria-pressed="false">
+ <span>Upstream</span><strong id="focus-reach-upstream-count">0</strong>
+ </button>
+ <button id="btn-reach-downstream" type="button" aria-label="Trace downstream authored reachability" aria-pressed="false">
+ <span>Downstream</span><strong id="focus-reach-downstream-count">0</strong>
+ </button>
+ </div>
+ <small class="semantic-passport-reach-status" id="focus-reach-status" hidden aria-live="polite"></small>
+ </div>
</div>
<div class="relationship-lens-actions">
+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">&#215;</button>
<button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button>
<button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>
- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button>
</div>
</div>
<div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>
@@ -4318,15 +4841,36 @@
<script>
var Archify = {};
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
@@ -4477,6 +5021,168 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
+ function applyReachSnapshot(clone, snapshot) {
+ if (!snapshot || (snapshot.direction !== 'upstream' && snapshot.direction !== 'downstream') ||
+ !snapshot.origin || typeof snapshot.origin.id !== 'string' || !snapshot.origin.id ||
+ typeof snapshot.origin.label !== 'string' || !snapshot.origin.label.trim() ||
+ !Array.isArray(snapshot.nodeIds) || snapshot.nodeIds.length < 2 ||
+ !Array.isArray(snapshot.edges) || !snapshot.edges.length ||
+ !snapshot.depths || typeof snapshot.depths !== 'object' ||
+ !Number.isInteger(snapshot.maxDepth) || snapshot.maxDepth < 1 ||
+ snapshot.nodeIds[0] !== snapshot.origin.id) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+ var measuredMaxDepth = 0;
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ var depth = snapshot.depths[nodeId];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId] ||
+ !Number.isInteger(depth) || depth < 0 || depth > snapshot.maxDepth ||
+ (nodeId === snapshot.origin.id ? depth !== 0 : depth < 1)) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ nodeMatches.push({ elements: matchedNodes, id: nodeId, depth: depth });
+ }
+ if (measuredMaxDepth !== snapshot.maxDepth) return false;
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ !nodeIds[edge.from] || !nodeIds[edge.to] ||
+ !Number.isInteger(edge.depth) || edge.depth < 1 || edge.depth > snapshot.maxDepth ||
+ edge.depth !== Math.max(snapshot.depths[edge.from], snapshot.depths[edge.to])) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push({ elements: matchedEdges, depth: edge.depth });
+ }
+
+ clone.setAttribute('data-share-reach', snapshot.direction);
+ nodeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ if (match.id === snapshot.origin.id) element.setAttribute('data-share-reach-origin', '');
+ });
+ });
+ edgeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ });
+ });
+
+ return clone.getAttribute('data-share-reach') === snapshot.direction &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-reach-active') &&
+ clone.querySelectorAll('[data-animate], [data-reach-match], [data-reach-origin], [data-reach-depth]').length === 0 &&
+ clone.querySelectorAll('[data-share-reach-origin]').length === 1 &&
+ clone.querySelectorAll('[data-share-reach-match]').length ===
+ nodeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0) +
+ edgeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4491,6 +5197,7 @@
clone.style.removeProperty('transform');
clone.removeAttribute('data-view-scale');
clone.removeAttribute('data-focus-active');
+ clone.removeAttribute('data-reach-active');
clone.removeAttribute('data-lens-active');
clone.removeAttribute('data-lens-flow-count');
clone.removeAttribute('data-lens-flow-density');
@@ -4502,6 +5209,8 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
+ clone.removeAttribute('data-share-reach');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4561,6 +5270,16 @@
Array.prototype.forEach.call(clone.querySelectorAll('[data-relationship-hit-overlay]'), function (el) {
el.remove();
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-beacon]'), function (el) {
+ el.remove();
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-count]'), function (el) {
+ var originalLabel = el.getAttribute('data-source-evidence-original-label');
+ if (originalLabel == null || originalLabel === '') el.removeAttribute('aria-label');
+ else el.setAttribute('aria-label', originalLabel);
+ el.removeAttribute('data-source-evidence-count');
+ el.removeAttribute('data-source-evidence-original-label');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-story-step], [data-story-beat-state], [data-story-beat-step]'), function (el) {
el.removeAttribute('data-story-step');
el.removeAttribute('data-story-beat-state');
@@ -4571,6 +5290,11 @@
el.removeAttribute('data-focus-match');
el.removeAttribute('data-focus-selected');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-reach-match], [data-reach-origin], [data-reach-depth]'), function (el) {
+ el.removeAttribute('data-reach-match');
+ el.removeAttribute('data-reach-origin');
+ el.removeAttribute('data-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-lens-match], [data-lens-selected], [data-lens-peer]'), function (el) {
el.removeAttribute('data-lens-match');
el.removeAttribute('data-lens-selected');
@@ -4601,6 +5325,18 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth]'), function (el) {
+ el.removeAttribute('data-share-reach-match');
+ el.removeAttribute('data-share-reach-origin');
+ el.removeAttribute('data-share-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4610,6 +5346,7 @@
});
var canonicalStateClean = !clone.hasAttribute('data-view-scale') &&
!clone.hasAttribute('data-focus-active') &&
+ !clone.hasAttribute('data-reach-active') &&
!clone.hasAttribute('data-lens-active') &&
!clone.hasAttribute('data-lens-flow-count') &&
!clone.hasAttribute('data-lens-flow-density') &&
@@ -4620,6 +5357,8 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-share-reach') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4629,9 +5368,17 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-reach-match], [data-reach-origin], [data-reach-depth], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth], [data-source-evidence-beacon], [data-source-evidence-count], [data-source-evidence-original-label], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
+ var reachStateClean = opts.reachSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && !opts.routeSnapshot && applyReachSnapshot(clone, opts.reachSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4755,6 +5502,22 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+ if (opts.reachSnapshot) {
+ style.textContent += "\nsvg[data-share-reach] [data-node-id], svg[data-share-reach] [data-edge-from] { opacity: 0.14; }\n" +
+ "svg[data-share-reach] [data-share-reach-match] { opacity: 1; }\n" +
+ "svg[data-share-reach] [data-edge-from][data-share-reach-match] { stroke-width: 1.55; }\n" +
+ "svg[data-share-reach=\"upstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--database-stroke); stroke-width: 3.4; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-reach=\"downstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--backend-stroke); stroke-width: 3.4; stroke-dasharray: 1 0; }\n" +
+ "svg[data-preset=\"blueprint\"][data-share-reach] [data-share-reach-origin], svg[data-preset=\"blueprint\"][data-share-reach] [data-edge-from][data-share-reach-match] { filter: none; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4762,7 +5525,9 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean,
+ reachStateClean: reachStateClean
};
}
@@ -4806,24 +5571,29 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
- URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4851,75 +5621,110 @@
return value + suffix;
}
- function rasterizeShareCard() {
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var reachSnapshot = options.reachSnapshot || null;
+ if (routeSnapshot && reachSnapshot) return Promise.reject(new Error('Share Card variants cannot be combined'));
var svg = document.querySelector('.diagram-container svg');
var vb = svg.viewBox.baseVal;
var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
- var data = serializeSvg(sourceScale);
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot, reachSnapshot: reachSnapshot });
if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ if (reachSnapshot && !data.reachStateClean) return Promise.reject(new Error('Reach Card export could not preserve authored reach safely'));
var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
var svgUrl = URL.createObjectURL(svgBlob);
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = SHARE_CARD_WIDTH;
- canvas.height = SHARE_CARD_HEIGHT;
- var ctx = canvas.getContext('2d');
- var computed = getComputedStyle(document.documentElement);
- var bg = computed.getPropertyValue('--bg').trim() || currentBg();
- var text = computed.getPropertyValue('--text').trim() || '#ffffff';
- var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
- var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
- var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
- var titleNode = document.querySelector('.header h1');
- var subtitleNode = document.querySelector('.header .subtitle');
- var title = titleNode ? titleNode.textContent : document.title;
- var subtitle = subtitleNode ? subtitleNode.textContent : '';
- var preset = document.documentElement.getAttribute('data-preset') || 'classic';
- var theme = document.documentElement.getAttribute('data-theme') || 'dark';
- var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
-
- ctx.fillStyle = bg;
- ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
-
- ctx.fillStyle = accent;
- ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
-
- ctx.textBaseline = 'alphabetic';
- ctx.fillStyle = text;
- var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
- ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
-
- ctx.fillStyle = muted;
- var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
- ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
-
- ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
- ctx.textAlign = 'right';
- ctx.fillStyle = accent;
- ctx.fillText('ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase(), SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
- ctx.textAlign = 'left';
-
- var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
- var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
- var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
- var drawWidth = data.width * fit;
- var drawHeight = data.height * fit;
- var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
- var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
-
- ctx.strokeStyle = border;
- ctx.lineWidth = 1;
- ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
- ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
- URL.revokeObjectURL(svgUrl);
-
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for Share Card'));
- else resolve(blob);
- }, 'image/png');
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accentProperty = reachSnapshot
+ ? (reachSnapshot.direction === 'upstream' ? '--database-stroke' : '--backend-stroke')
+ : '--frontend-stroke';
+ var accent = computed.getPropertyValue(accentProperty).trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : reachSnapshot
+ ? 'Authored ' + reachSnapshot.direction + ' from ' + reachSnapshot.origin.label + ' · ' +
+ (reachSnapshot.nodeIds.length - 1) + ' nodes · ' + reachSnapshot.edges.length +
+ ' links · max ' + reachSnapshot.maxDepth + ' hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : reachSnapshot
+ ? 'ARCHIFY · ' + reachSnapshot.direction.toUpperCase() + ' REACH'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4929,6 +5734,24 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route' && options.variant !== 'reach') {
+ return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ }
+ if (options.variant === 'route') {
+ var routeSnapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!routeSnapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: routeSnapshot });
+ }
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ if (!snapshot) return Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return renderShareCard({ reachSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5191,10 +6014,30 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
+ var reachShareItem = menu.querySelector('button[data-action="reach-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
+ function syncReachShareItem() {
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ reachShareItem.hidden = !snapshot;
+ reachShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5253,9 +6096,11 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
+ syncReachShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5289,7 +6134,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5314,8 +6159,7 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
return (format === 'share-card'
? rasterizeShareCard().then(function (blob) {
@@ -5359,13 +6203,72 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
+ function runReachShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ var blobPromise = snapshot
+ ? renderShareCard({ reachSnapshot: snapshot })
+ : Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'reach', false, true);
+ download(blob, diagramFilename() + '-' + snapshot.direction + '-reach-share-card.png');
+ toast('Downloaded Reach Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Reach Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical, dimensions) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean, reachStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (reachStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-reach-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
+ }
if (dimensions) {
document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
@@ -5381,6 +6284,9 @@
document.documentElement.removeAttribute('data-last-export-canonical');
document.documentElement.removeAttribute('data-last-export-width');
document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
document.documentElement.removeAttribute('data-last-export-error-format');
document.documentElement.removeAttribute('data-last-export-error');
}
@@ -5422,6 +6328,7 @@
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
@@ -5436,6 +6343,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var reachShareCardBtn = e.target.closest('button[data-action="reach-share-card"]');
+ if (reachShareCardBtn && !reachShareCardBtn.disabled && !reachShareCardBtn.hidden) { runReachShareCard(); return; }
+
var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
@@ -5447,7 +6360,18 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport, shareCard: rasterizeShareCard, copyShareCard: runCopyShareCard };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ downloadReachShareCard: runReachShareCard,
+ syncRouteShare: syncRouteShareItem,
+ syncReachShare: syncReachShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5732,6 +6656,76 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ var svgNamespace = 'http://www.w3.org/2000/svg';
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ function installBeacons() {
+ if (!payload) return 0;
+ var svg = document.querySelector('.diagram-container svg');
+ if (!svg) return 0;
+ var installed = 0;
+ Array.prototype.forEach.call(svg.querySelectorAll('[data-node-id]'), function (node) {
+ var id = node.getAttribute('data-node-id');
+ var sources = payload.nodes[id];
+ if (!Array.isArray(sources) || !sources.length || node.querySelector('[data-source-evidence-beacon]')) return;
+ var shape = node.querySelector('[data-animate="node"]') || node.querySelector('[class*="c-"]');
+ var box;
+ try { box = (shape || node).getBBox(); } catch (_) { return; }
+ if (!box || !Number.isFinite(box.x) || !Number.isFinite(box.y) || !Number.isFinite(box.width) || box.width < 36) return;
+
+ var count = sources.length;
+ var label = count + ' verified source' + (count === 1 ? '' : 's') + '; focus this node to inspect';
+ var beacon = document.createElementNS(svgNamespace, 'g');
+ beacon.classList.add('source-evidence-beacon');
+ beacon.setAttribute('data-source-evidence-beacon', '');
+ beacon.setAttribute('aria-hidden', 'true');
+ beacon.setAttribute('transform', 'translate(' + (box.x + box.width - 35) + ' ' + (box.y + 5) + ')');
+ var title = document.createElementNS(svgNamespace, 'title');
+ title.textContent = label;
+ var plate = document.createElementNS(svgNamespace, 'rect');
+ plate.setAttribute('width', '30');
+ plate.setAttribute('height', '12');
+ plate.setAttribute('rx', '6');
+ var text = document.createElementNS(svgNamespace, 'text');
+ text.setAttribute('x', '15');
+ text.setAttribute('y', '8.25');
+ text.textContent = 'SRC ' + count;
+ beacon.appendChild(title);
+ beacon.appendChild(plate);
+ beacon.appendChild(text);
+ node.appendChild(beacon);
+
+ var originalLabel = node.getAttribute('aria-label') || '';
+ node.setAttribute('data-source-evidence-count', String(count));
+ node.setAttribute('data-source-evidence-original-label', originalLabel);
+ node.setAttribute('aria-label', (originalLabel ? originalLabel + ', ' : '') + count + ' verified source reference' + (count === 1 ? '' : 's'));
+ installed += 1;
+ });
+ return installed;
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ },
+ installBeacons: installBeacons
+ };
+ })();
+ Archify.sourceEvidence.installBeacons();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5748,7 +6742,16 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
+ var reachSection = document.getElementById('focus-reach');
+ var reachStatus = document.getElementById('focus-reach-status');
+ var upstreamBtn = document.getElementById('btn-reach-upstream');
+ var downstreamBtn = document.getElementById('btn-reach-downstream');
+ var upstreamCount = document.getElementById('focus-reach-upstream-count');
+ var downstreamCount = document.getElementById('focus-reach-downstream-count');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
var relationsBtn = document.getElementById('btn-focus-relations');
@@ -5762,6 +6765,8 @@
var relationshipHitOverlay = null;
var relationshipHitTargets = [];
var directPreviewTimer = null;
+ var reachabilityMode = null;
+ var activeReachability = null;
var svgNamespace = 'http://www.w3.org/2000/svg';
var reducedMotionQuery = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
var finePointerQuery = window.matchMedia ? window.matchMedia('(hover: hover) and (pointer: fine)') : null;
@@ -5775,11 +6780,318 @@
function nodeLabel(node, fallback) {
return node.getAttribute('data-node-label') || (node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '');
}
+ function reachabilityRelationships() {
+ var seen = Object.create(null);
+ var relationships = [];
+ edges().forEach(function (edge) {
+ var from = edge.getAttribute('data-edge-from');
+ var to = edge.getAttribute('data-edge-to');
+ var key = edge.getAttribute('data-edge-key') || (from + '\u0000' + to + '\u0000' + (edge.getAttribute('data-edge-label') || ''));
+ if (!from || !to || seen[key]) return;
+ seen[key] = true;
+ relationships.push({ key: key, from: from, to: to });
+ });
+ return relationships;
+ }
+ function computeReachability(originId, direction, relationships) {
+ if (typeof originId !== 'string' || !originId ||
+ (direction !== 'upstream' && direction !== 'downstream') ||
+ !Array.isArray(relationships)) return null;
+ var records = [];
+ var seenKeys = Object.create(null);
+ relationships.forEach(function (relationship, index) {
+ if (!relationship || typeof relationship.from !== 'string' || !relationship.from ||
+ typeof relationship.to !== 'string' || !relationship.to) return;
+ var key = typeof relationship.key === 'string' && relationship.key
+ ? relationship.key : String(index);
+ if (seenKeys[key]) return;
+ seenKeys[key] = true;
+ records.push({ key: key, from: relationship.from, to: relationship.to });
+ });
+
+ var depths = Object.create(null);
+ var order = [];
+ var queue = [originId];
+ depths[originId] = 0;
+ for (var cursor = 0; cursor < queue.length; cursor += 1) {
+ var current = queue[cursor];
+ records.forEach(function (relationship) {
+ var next = null;
+ if (direction === 'downstream' && relationship.from === current) next = relationship.to;
+ else if (direction === 'upstream' && relationship.to === current) next = relationship.from;
+ if (next == null || Object.prototype.hasOwnProperty.call(depths, next)) return;
+ depths[next] = depths[current] + 1;
+ queue.push(next);
+ });
+ }
+ queue.forEach(function (id) { order.push(id); });
+
+ var edgeKeys = [];
+ records.forEach(function (relationship) {
+ if (Object.prototype.hasOwnProperty.call(depths, relationship.from) &&
+ Object.prototype.hasOwnProperty.call(depths, relationship.to)) edgeKeys.push(relationship.key);
+ });
+ var maxDepth = order.reduce(function (maximum, id) {
+ return Math.max(maximum, depths[id]);
+ }, 0);
+ return {
+ direction: direction,
+ originId: originId,
+ nodeIds: order,
+ edgeKeys: edgeKeys,
+ depths: depths,
+ maxDepth: maxDepth
+ };
+ }
+ function reachabilityFor(id, direction) {
+ return computeReachability(id, direction, reachabilityRelationships());
+ }
+ function resetReachabilityButtons() {
+ upstreamBtn.setAttribute('aria-pressed', 'false');
+ downstreamBtn.setAttribute('aria-pressed', 'false');
+ }
+ function clearReachability(options) {
+ options = options || {};
+ reachabilityMode = null;
+ activeReachability = null;
+ svg.removeAttribute('data-reach-active');
+ chip.removeAttribute('data-reach-mode');
+ nodes().forEach(function (node) {
+ node.removeAttribute('data-reach-match');
+ node.removeAttribute('data-reach-origin');
+ node.removeAttribute('data-reach-depth');
+ });
+ edges().forEach(function (edge) {
+ edge.removeAttribute('data-reach-match');
+ edge.removeAttribute('data-reach-depth');
+ });
+ resetReachabilityButtons();
+ reachStatus.textContent = '';
+ reachStatus.hidden = true;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl === true && activeIds.length === 1) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' + encodeURIComponent(activeIds[0]));
+ } catch (_) {}
+ }
+ }
+ function renderReachabilityControls(id) {
+ var upstream = reachabilityFor(id, 'upstream');
+ var downstream = reachabilityFor(id, 'downstream');
+ var upstreamReach = upstream ? Math.max(0, upstream.nodeIds.length - 1) : 0;
+ var downstreamReach = downstream ? Math.max(0, downstream.nodeIds.length - 1) : 0;
+ upstreamCount.textContent = String(upstreamReach);
+ downstreamCount.textContent = String(downstreamReach);
+ upstreamBtn.disabled = upstreamReach === 0;
+ downstreamBtn.disabled = downstreamReach === 0;
+ upstreamBtn.setAttribute('aria-label', upstreamReach
+ ? 'Trace ' + upstreamReach + ' upstream authored node' + (upstreamReach === 1 ? '' : 's')
+ : 'No upstream authored nodes');
+ downstreamBtn.setAttribute('aria-label', downstreamReach
+ ? 'Trace ' + downstreamReach + ' downstream authored node' + (downstreamReach === 1 ? '' : 's')
+ : 'No downstream authored nodes');
+ reachSection.hidden = false;
+ }
+ function applyReachability(direction, options) {
+ options = options || {};
+ if (activeIds.length !== 1 || (direction !== 'upstream' && direction !== 'downstream')) return false;
+ if (reachabilityMode === direction && options.toggle !== false) {
+ clearReachability({ updateUrl: options.updateUrl !== false });
+ return true;
+ }
+ var result = reachabilityFor(activeIds[0], direction);
+ if (!result || result.nodeIds.length <= 1) return false;
+ if (Archify.guidedViews && typeof Archify.guidedViews.showAll === 'function') {
+ Archify.guidedViews.showAll({ clearFocus: false, updateUrl: false, resetView: false });
+ }
+ clearRelationshipPreview({ clearPin: true });
+ clearReachability({ updateUrl: false });
+ reachabilityMode = direction;
+ activeReachability = result;
+ var edgeKeySet = Object.create(null);
+ result.edgeKeys.forEach(function (key) { edgeKeySet[key] = true; });
+ svg.setAttribute('data-reach-active', direction);
+ chip.setAttribute('data-reach-mode', direction);
+ nodes().forEach(function (node) {
+ var id = node.getAttribute('data-node-id');
+ if (!Object.prototype.hasOwnProperty.call(result.depths, id)) return;
+ node.setAttribute('data-reach-match', '');
+ node.setAttribute('data-reach-depth', String(result.depths[id]));
+ if (id === result.originId) node.setAttribute('data-reach-origin', '');
+ });
+ edges().forEach(function (edge) {
+ var key = edge.getAttribute('data-edge-key') || (
+ edge.getAttribute('data-edge-from') + '\u0000' +
+ edge.getAttribute('data-edge-to') + '\u0000' +
+ (edge.getAttribute('data-edge-label') || '')
+ );
+ if (!edgeKeySet[key]) return;
+ edge.setAttribute('data-reach-match', '');
+ var fromDepth = result.depths[edge.getAttribute('data-edge-from')];
+ var toDepth = result.depths[edge.getAttribute('data-edge-to')];
+ edge.setAttribute('data-reach-depth', String(Math.max(fromDepth || 0, toDepth || 0)));
+ });
+ resetReachabilityButtons();
+ var activeButton = direction === 'upstream' ? upstreamBtn : downstreamBtn;
+ activeButton.setAttribute('aria-pressed', 'true');
+ var reachableCount = result.nodeIds.length - 1;
+ var directionLabel = direction === 'upstream' ? 'Upstream' : 'Downstream';
+ reachStatus.textContent = directionLabel + ' · ' + reachableCount + ' node' +
+ (reachableCount === 1 ? '' : 's') + ' · ' + result.edgeKeys.length + ' link' +
+ (result.edgeKeys.length === 1 ? '' : 's') + ' · max ' + result.maxDepth + ' hop' +
+ (result.maxDepth === 1 ? '' : 's');
+ reachStatus.hidden = false;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl !== false) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' +
+ encodeURIComponent(activeIds[0]) + '&reach=' + direction);
+ } catch (_) {}
+ }
+ if (options.reveal !== false && Archify.view && typeof Archify.view.reveal === 'function') {
+ Archify.view.reveal(result.nodeIds, { includeNeighbors: false, reason: 'reachability' });
+ }
+ requestLensPlacement();
+ return true;
+ }
+ function reachabilitySnapshot() {
+ if (!activeReachability || activeIds.length !== 1 ||
+ (reachabilityMode !== 'upstream' && reachabilityMode !== 'downstream') ||
+ activeReachability.direction !== reachabilityMode ||
+ activeReachability.originId !== activeIds[0] ||
+ svg.getAttribute('data-reach-active') !== reachabilityMode) return null;
+
+ var originId = activeReachability.originId;
+ var nodeIds = activeReachability.nodeIds.slice();
+ var edgeKeys = activeReachability.edgeKeys.slice();
+ if (nodeIds.length < 2 || nodeIds[0] !== originId || !edgeKeys.length ||
+ !activeReachability.depths || !Number.isInteger(activeReachability.maxDepth) ||
+ activeReachability.maxDepth < 1) return null;
+
+ var allNodes = nodes();
+ var allEdges = edges();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ var nodeIdSet = Object.create(null);
+ var depths = Object.create(null);
+ var originNode = null;
+ var measuredMaxDepth = 0;
+
+ if (nodeIds.some(function (id) {
+ var depth = activeReachability.depths[id];
+ var matches = allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ });
+ if (typeof id !== 'string' || !id || seenNodeIds[id] || matches.length !== 1 ||
+ !matches[0].hasAttribute('data-reach-match') ||
+ !Number.isInteger(depth) || depth < 0 || depth > activeReachability.maxDepth ||
+ (id === originId
+ ? (!matches[0].hasAttribute('data-reach-origin') || depth !== 0)
+ : depth < 1)) return true;
+ seenNodeIds[id] = true;
+ nodeIdSet[id] = true;
+ depths[id] = depth;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ if (id === originId) originNode = matches[0];
+ return false;
+ }) || !originNode || measuredMaxDepth !== activeReachability.maxDepth ||
+ allNodes.filter(function (node) { return node.hasAttribute('data-reach-match'); }).length !== nodeIds.length) return null;
+
+ var edgeRecords = [];
+ if (edgeKeys.some(function (key) {
+ if (typeof key !== 'string' || !key || seenEdgeKeys[key]) return true;
+ var fragments = allEdges.filter(function (edge) {
+ return edge.getAttribute('data-edge-key') === key;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ if (!fragments.length || drawableFragments.length !== 1 ||
+ !fragments.every(function (fragment) { return fragment.hasAttribute('data-reach-match'); })) return true;
+ var first = fragments[0];
+ var from = first.getAttribute('data-edge-from');
+ var to = first.getAttribute('data-edge-to');
+ var id = first.getAttribute('data-edge-id') || '';
+ var labelValue = first.getAttribute('data-edge-label') || '';
+ if (!nodeIdSet[from] || !nodeIdSet[to] || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === from &&
+ fragment.getAttribute('data-edge-to') === to &&
+ (fragment.getAttribute('data-edge-id') || '') === id;
+ })) return true;
+ seenEdgeKeys[key] = true;
+ edgeRecords.push({
+ key: key,
+ id: id,
+ from: from,
+ to: to,
+ label: labelValue,
+ depth: Math.max(depths[from], depths[to])
+ });
+ return false;
+ })) return null;
+
+ var liveEdgeKeys = Object.create(null);
+ if (allEdges.some(function (edge) {
+ if (!edge.hasAttribute('data-reach-match')) return false;
+ var key = edge.getAttribute('data-edge-key');
+ if (!key || !seenEdgeKeys[key]) return true;
+ liveEdgeKeys[key] = true;
+ return false;
+ }) || Object.keys(liveEdgeKeys).length !== edgeKeys.length) return null;
+
+ return {
+ direction: reachabilityMode,
+ origin: { id: originId, label: nodeLabel(originNode, originId) },
+ nodeIds: nodeIds,
+ depths: depths,
+ maxDepth: activeReachability.maxDepth,
+ edges: edgeRecords
+ };
+ }
function setPassportValue(element, value) {
var normalized = value == null ? '' : String(value).trim();
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5787,6 +7099,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6344,6 +7657,7 @@
var counts = { out: 0, in: 0, loop: 0 };
relationships.forEach(function (relationship) { counts[relationship.direction] += 1; });
summary.textContent = counts.out + ' outgoing · ' + counts.in + ' incoming' + (counts.loop ? ' · ' + counts.loop + ' loop' : '');
+ renderReachabilityControls(id);
relationshipList.textContent = '';
if (!relationships.length) {
var empty = document.createElement('p');
@@ -6440,6 +7754,10 @@
}
function clear(options) {
options = options || {};
+ var restoreNode = options.restoreFocus === true && activeIds.length === 1
+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')
+ : null;
+ clearReachability({ updateUrl: false });
if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {
Archify.intentTrace.clear({ announce: false });
}
@@ -6466,7 +7784,16 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
+ reachSection.hidden = true;
+ upstreamCount.textContent = '0';
+ downstreamCount.textContent = '0';
+ upstreamBtn.disabled = true;
+ downstreamBtn.disabled = true;
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
copyBtn.setAttribute('aria-label', 'Copy link to focused node');
@@ -6481,6 +7808,10 @@
if (options.updateUrl !== false) {
try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}
}
+ if (restoreNode) {
+ try { restoreNode.focus({ preventScroll: true }); }
+ catch (_) { try { restoreNode.focus(); } catch (_) {} }
+ }
}
function setMany(ids, options) {
@@ -6576,7 +7907,7 @@
var relationId = record && record.id;
var value = location.href.replace(/#.*$/, '') + (relationId
? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]));
+ : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
: Promise.resolve(fallbackCopy(value));
@@ -6614,8 +7945,10 @@
Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });
}
});
- clearBtn.addEventListener('click', function () { clear(); });
+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });
copyBtn.addEventListener('click', copyFocusLink);
+ upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });
+ downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });
relationsBtn.addEventListener('click', function () {
var expanded = chip.getAttribute('data-relations-expanded') === 'true';
if (expanded) chip.removeAttribute('data-relations-expanded');
@@ -6679,6 +8012,13 @@
event.preventDefault();
buttons[index].focus();
});
+ document.addEventListener('click', function (event) {
+ var target = event.target;
+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;
+ if (container.getAttribute('data-just-panned') === 'true') return;
+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;
+ clear();
+ }, true);
window.addEventListener('scroll', requestLensPlacement, { passive: true });
window.addEventListener('resize', requestLensPlacement);
container.addEventListener('scroll', requestLensPlacement, { passive: true });
@@ -6703,11 +8043,17 @@
var params = new URLSearchParams(location.hash.replace(/^#/, ''));
var relation = params.get('relation');
var initial = params.get('focus');
+ var reach = params.get('reach');
if (relation) {
if (html.getAttribute('data-embed') === 'true' ||
!inspectRelationshipById(relation, { updateUrl: false, toggle: false })) clear({ updateUrl: false });
}
- else if (initial) set(initial, { updateUrl: false, toggle: false });
+ else if (initial) {
+ if (set(initial, { updateUrl: false, toggle: false }) &&
+ (reach === 'upstream' || reach === 'downstream')) {
+ applyReachability(reach, { updateUrl: false, toggle: false, reveal: false });
+ }
+ }
else if (!params.get('view')) clear({ updateUrl: false });
} catch (_) {}
}
@@ -6720,6 +8066,9 @@
setMany: setMany,
clear: clear,
copyLink: copyFocusLink,
+ reach: applyReachability,
+ clearReach: clearReachability,
+ reachabilitySnapshot: reachabilitySnapshot,
inspectRelationship: inspectRelationship,
inspectRelationshipById: inspectRelationshipById,
reposition: requestLensPlacement,
@@ -6727,6 +8076,15 @@
var record = pinnedRelationshipRecord();
return record ? { id: record.id || null, key: record.key, from: record.from, to: record.to, label: record.label } : null;
},
+ reachability: function () {
+ return activeReachability ? {
+ direction: activeReachability.direction,
+ originId: activeReachability.originId,
+ nodeIds: activeReachability.nodeIds.slice(),
+ edgeKeys: activeReachability.edgeKeys.slice(),
+ maxDepth: activeReachability.maxDepth
+ } : null;
+ },
active: function () { return activeIds.length === 0 ? null : (activeIds.length === 1 ? activeIds[0] : activeIds.slice()); }
};
})();
@@ -9487,6 +10845,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9494,8 +10856,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9564,7 +10927,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9576,11 +10943,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9588,7 +10954,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9721,7 +11089,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9729,6 +11097,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9877,6 +11293,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10356,6 +11773,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10626,6 +12044,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11561,7 +12980,7 @@
Archify.intentTrace.clear();
} else if (e.key === 'Escape' && Archify.focus.active()) {
e.preventDefault();
- Archify.focus.clear();
+ Archify.focus.clear({ restoreFocus: true });
} else if (e.key === 'Escape' && Archify.presentation.active()) {
e.preventDefault();
Archify.presentation.exit();
diff --git a/archify/examples/web-app-rendered.html b/archify/examples/web-app-rendered.html
index e6a33a70..c4c94f73 100644
--- a/archify/examples/web-app-rendered.html
+++ b/archify/examples/web-app-rendered.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -1354,10 +1511,25 @@
.relationship-lens-actions {
display: flex;
flex-direction: column;
- align-items: stretch;
+ align-items: flex-end;
gap: 0.18rem;
}
.relationship-lens-actions button { white-space: nowrap; }
+ .relationship-lens-actions #btn-focus-clear {
+ display: grid;
+ width: 1.75rem;
+ height: 1.75rem;
+ padding: 0;
+ place-items: center;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
+ }
+ .relationship-lens-actions #btn-focus-clear:hover,
+ .relationship-lens-actions #btn-focus-clear:focus-visible {
+ background: var(--toolbar-hover);
+ color: var(--text);
+ }
.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }
.relationship-lens-actions #btn-focus-relations { display: none; }
.relationship-lens-eyebrow {
@@ -1420,12 +1592,163 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
+ .semantic-passport-reach {
+ display: grid;
+ gap: 0.28rem;
+ margin-top: 0.52rem;
+ padding-top: 0.48rem;
+ border-top: 1px solid color-mix(in srgb, var(--toolbar-border) 76%, transparent);
+ }
+ .semantic-passport-reach[hidden] { display: none; }
+ .semantic-passport-reach-label {
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-reach-actions {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.25rem;
+ }
+ .semantic-passport-reach-actions button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.5rem;
+ min-width: 0;
+ min-height: 2rem;
+ padding: 0.32rem 0.42rem;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 86%, transparent);
+ background: color-mix(in srgb, var(--panel) 70%, transparent);
+ color: var(--text-muted);
+ text-align: left;
+ }
+ .semantic-passport-reach-actions button:hover:not(:disabled),
+ .semantic-passport-reach-actions button:focus-visible {
+ border-color: color-mix(in srgb, var(--frontend-stroke) 62%, var(--toolbar-border));
+ color: var(--text);
+ }
+ .semantic-passport-reach-actions button:focus-visible {
+ outline: 2px solid var(--frontend-stroke);
+ outline-offset: 1px;
+ }
+ .semantic-passport-reach-actions button:disabled {
+ cursor: default;
+ opacity: 0.5;
+ }
+ .semantic-passport-reach-actions button[aria-pressed="true"] {
+ border-color: color-mix(in srgb, var(--reach-color, var(--frontend-stroke)) 72%, var(--toolbar-border));
+ background: color-mix(in srgb, var(--reach-fill, var(--frontend-fill)) 48%, transparent);
+ color: var(--text);
+ }
+ #btn-reach-upstream {
+ --reach-color: var(--database-stroke);
+ --reach-fill: var(--database-fill);
+ }
+ #btn-reach-downstream {
+ --reach-color: var(--backend-stroke);
+ --reach-fill: var(--backend-fill);
+ }
+ .semantic-passport-reach-actions strong {
+ color: var(--reach-color, var(--frontend-stroke));
+ font-size: 0.625rem;
+ }
+ .semantic-passport-reach-status {
+ color: var(--text-faint);
+ font-size: 0.525rem;
+ line-height: 1.4;
+ }
+ .semantic-passport-reach-status[hidden] { display: none; }
.relationship-lens-list {
max-height: min(18rem, 46vh);
overflow: auto;
@@ -1698,13 +2021,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +2070,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +2085,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +2104,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +2116,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +2168,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +2195,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2364,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2491,6 +2855,8 @@
.story-carrier-overlay { display: none !important; }
.diagram-container svg[data-focus-active] [data-node-id],
.diagram-container svg[data-focus-active] [data-edge-from],
+ .diagram-container svg[data-reach-active] [data-node-id],
+ .diagram-container svg[data-reach-active] [data-edge-from],
.diagram-container svg[data-story-beat] [data-story-step],
.diagram-container svg[data-story-beat] [data-edge-from][data-story-beat-step],
.diagram-container svg[data-route-active] [data-node-id],
@@ -2561,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2597,6 +2982,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2644,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2659,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3035,6 +3427,8 @@
the global zoom level. Reveal only their exact semantic matches. */
svg[data-focus-active] [data-focus-match][data-detail],
svg[data-focus-active] [data-focus-match] [data-detail],
+ svg[data-reach-active] [data-reach-match][data-detail],
+ svg[data-reach-active] [data-reach-match] [data-detail],
svg[data-lens-active] [data-lens-match][data-detail],
svg[data-lens-active] [data-lens-match] [data-detail],
svg[data-legend-preview-active] [data-legend-preview-match][data-detail],
@@ -3053,6 +3447,7 @@
pointer-events: auto;
}
svg[data-focus-active] [data-focus-match] [data-detail-anchor],
+ svg[data-reach-active] [data-reach-match] [data-detail-anchor],
svg[data-lens-active] [data-lens-match] [data-detail-anchor],
svg[data-legend-preview-active] [data-legend-preview-match] [data-detail-anchor],
svg[data-intent-trace-active] [data-intent-trace-match] [data-detail-anchor],
@@ -3084,6 +3479,41 @@
filter: drop-shadow(0 0 7px var(--frontend-stroke));
outline: none;
}
+ /* Verified Source Beacons are installed at runtime only for nodes whose
+ repository evidence passed the local revision/blob/line checks. They
+ live inside the owning node so every focus, route, story, and guided
+ view keeps one coherent opacity state. Export serialization removes
+ them before producing the canonical SVG or any derived visual. */
+ .source-evidence-beacon {
+ pointer-events: none;
+ opacity: 0.76;
+ transition: opacity 160ms ease, filter 160ms ease;
+ }
+ .source-evidence-beacon rect {
+ fill: color-mix(in srgb, var(--mask) 92%, var(--backend-stroke));
+ stroke: color-mix(in srgb, var(--backend-stroke) 82%, var(--panel-border));
+ stroke-width: 1;
+ vector-effect: non-scaling-stroke;
+ }
+ .source-evidence-beacon text {
+ fill: var(--backend-stroke);
+ font-size: 5.5px;
+ font-weight: 800;
+ letter-spacing: 0.06em;
+ text-anchor: middle;
+ text-transform: uppercase;
+ }
+ svg [data-node-id]:hover .source-evidence-beacon,
+ svg [data-node-id]:focus-visible .source-evidence-beacon,
+ svg [data-node-id][data-focus-selected] .source-evidence-beacon {
+ opacity: 1;
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="signal-flow"] .source-evidence-beacon { opacity: 0.9; }
+ svg[data-preset="blueprint"] .source-evidence-beacon rect {
+ rx: 0.8px;
+ filter: none;
+ }
svg [data-legend-kind][role="button"] { cursor: pointer; }
svg [data-legend-kind]:focus { outline: none; }
svg [data-legend-hit] {
@@ -3199,6 +3629,30 @@
filter: drop-shadow(0 0 10px var(--frontend-stroke));
}
+ /* Authored Reachability is a bounded graph query over the relationships
+ already present in the artifact. Upstream walks incoming edges;
+ downstream walks outgoing edges. It never claims runtime causality and
+ changes only viewer emphasis, not canonical geometry or export bytes. */
+ svg[data-reach-active] [data-node-id],
+ svg[data-reach-active] [data-edge-from] { opacity: 0.09; }
+ svg[data-reach-active] [data-reach-match] { opacity: 1; }
+ svg[data-reach-active="upstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--database-stroke));
+ }
+ svg[data-reach-active="downstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--backend-stroke));
+ }
+ svg[data-reach-active="upstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--database-stroke) 72%, transparent));
+ }
+ svg[data-reach-active="downstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="blueprint"][data-reach-active] [data-reach-origin],
+ svg[data-preset="blueprint"][data-reach-active] [data-edge-from][data-reach-match] {
+ filter: none;
+ }
+
/* Direct Relationship Explorer makes authored paths a real input surface
without changing their visible stroke or canonical SVG. A transparent
runtime rail supplies forgiving pointer geometry; the exact authored
@@ -3294,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3336,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3376,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3459,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3477,6 +3958,9 @@
svg[data-preset="blueprint"][data-focus-active] [data-focus-selected] {
filter: drop-shadow(0 0 3px var(--frontend-stroke));
}
+ svg[data-preset="blueprint"][data-focus-active][data-reach-active] [data-focus-selected][data-reach-origin] {
+ filter: none;
+ }
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-source],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-target] {
@@ -3541,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3602,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3627,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -3742,6 +4242,7 @@
}
.relationship-pulse-overlay { display: none !important; }
.guided-view-chapter { transition: none !important; }
+ .source-evidence-beacon,
svg [data-node-id], svg [data-edge-from], svg [data-detail], svg [data-detail-anchor], svg [data-legend-hit], svg { transition: none !important; }
}
</style>
@@ -3789,6 +4290,8 @@
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
<button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="reach-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Reach Share Card <span class="hint">1200&times;630 PNG</span></button>
<button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
<hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
@@ -3814,6 +4317,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-path","label":"Primary request path","focus":["users","cdn","lb","api","db"],"note":"Follow the primary customer request from the edge to durable state."},{"id":"identity-and-cache","label":"Identity and cache","focus":["auth","api","cache"],"note":"Isolate authentication and the read-through cache beside the request path."},{"id":"async-work","label":"Static and async work","focus":["cdn","s3","api","queue","worker"],"note":"See the two secondary paths without adding noise to the main request."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4142,7 +4646,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4161,12 +4665,31 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
+ <div class="semantic-passport-reach" id="focus-reach" hidden>
+ <span class="semantic-passport-reach-label">Authored reach</span>
+ <div class="semantic-passport-reach-actions" role="group" aria-label="Trace authored reachability">
+ <button id="btn-reach-upstream" type="button" aria-label="Trace upstream authored reachability" aria-pressed="false">
+ <span>Upstream</span><strong id="focus-reach-upstream-count">0</strong>
+ </button>
+ <button id="btn-reach-downstream" type="button" aria-label="Trace downstream authored reachability" aria-pressed="false">
+ <span>Downstream</span><strong id="focus-reach-downstream-count">0</strong>
+ </button>
+ </div>
+ <small class="semantic-passport-reach-status" id="focus-reach-status" hidden aria-live="polite"></small>
+ </div>
</div>
<div class="relationship-lens-actions">
+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">&#215;</button>
<button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button>
<button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>
- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button>
</div>
</div>
<div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>
@@ -4283,15 +4806,36 @@
<script>
var Archify = {};
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
@@ -4442,6 +4986,168 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
+ function applyReachSnapshot(clone, snapshot) {
+ if (!snapshot || (snapshot.direction !== 'upstream' && snapshot.direction !== 'downstream') ||
+ !snapshot.origin || typeof snapshot.origin.id !== 'string' || !snapshot.origin.id ||
+ typeof snapshot.origin.label !== 'string' || !snapshot.origin.label.trim() ||
+ !Array.isArray(snapshot.nodeIds) || snapshot.nodeIds.length < 2 ||
+ !Array.isArray(snapshot.edges) || !snapshot.edges.length ||
+ !snapshot.depths || typeof snapshot.depths !== 'object' ||
+ !Number.isInteger(snapshot.maxDepth) || snapshot.maxDepth < 1 ||
+ snapshot.nodeIds[0] !== snapshot.origin.id) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+ var measuredMaxDepth = 0;
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ var depth = snapshot.depths[nodeId];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId] ||
+ !Number.isInteger(depth) || depth < 0 || depth > snapshot.maxDepth ||
+ (nodeId === snapshot.origin.id ? depth !== 0 : depth < 1)) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ nodeMatches.push({ elements: matchedNodes, id: nodeId, depth: depth });
+ }
+ if (measuredMaxDepth !== snapshot.maxDepth) return false;
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ !nodeIds[edge.from] || !nodeIds[edge.to] ||
+ !Number.isInteger(edge.depth) || edge.depth < 1 || edge.depth > snapshot.maxDepth ||
+ edge.depth !== Math.max(snapshot.depths[edge.from], snapshot.depths[edge.to])) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push({ elements: matchedEdges, depth: edge.depth });
+ }
+
+ clone.setAttribute('data-share-reach', snapshot.direction);
+ nodeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ if (match.id === snapshot.origin.id) element.setAttribute('data-share-reach-origin', '');
+ });
+ });
+ edgeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ });
+ });
+
+ return clone.getAttribute('data-share-reach') === snapshot.direction &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-reach-active') &&
+ clone.querySelectorAll('[data-animate], [data-reach-match], [data-reach-origin], [data-reach-depth]').length === 0 &&
+ clone.querySelectorAll('[data-share-reach-origin]').length === 1 &&
+ clone.querySelectorAll('[data-share-reach-match]').length ===
+ nodeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0) +
+ edgeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4456,6 +5162,7 @@
clone.style.removeProperty('transform');
clone.removeAttribute('data-view-scale');
clone.removeAttribute('data-focus-active');
+ clone.removeAttribute('data-reach-active');
clone.removeAttribute('data-lens-active');
clone.removeAttribute('data-lens-flow-count');
clone.removeAttribute('data-lens-flow-density');
@@ -4467,6 +5174,8 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
+ clone.removeAttribute('data-share-reach');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4526,6 +5235,16 @@
Array.prototype.forEach.call(clone.querySelectorAll('[data-relationship-hit-overlay]'), function (el) {
el.remove();
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-beacon]'), function (el) {
+ el.remove();
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-count]'), function (el) {
+ var originalLabel = el.getAttribute('data-source-evidence-original-label');
+ if (originalLabel == null || originalLabel === '') el.removeAttribute('aria-label');
+ else el.setAttribute('aria-label', originalLabel);
+ el.removeAttribute('data-source-evidence-count');
+ el.removeAttribute('data-source-evidence-original-label');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-story-step], [data-story-beat-state], [data-story-beat-step]'), function (el) {
el.removeAttribute('data-story-step');
el.removeAttribute('data-story-beat-state');
@@ -4536,6 +5255,11 @@
el.removeAttribute('data-focus-match');
el.removeAttribute('data-focus-selected');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-reach-match], [data-reach-origin], [data-reach-depth]'), function (el) {
+ el.removeAttribute('data-reach-match');
+ el.removeAttribute('data-reach-origin');
+ el.removeAttribute('data-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-lens-match], [data-lens-selected], [data-lens-peer]'), function (el) {
el.removeAttribute('data-lens-match');
el.removeAttribute('data-lens-selected');
@@ -4566,6 +5290,18 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth]'), function (el) {
+ el.removeAttribute('data-share-reach-match');
+ el.removeAttribute('data-share-reach-origin');
+ el.removeAttribute('data-share-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4575,6 +5311,7 @@
});
var canonicalStateClean = !clone.hasAttribute('data-view-scale') &&
!clone.hasAttribute('data-focus-active') &&
+ !clone.hasAttribute('data-reach-active') &&
!clone.hasAttribute('data-lens-active') &&
!clone.hasAttribute('data-lens-flow-count') &&
!clone.hasAttribute('data-lens-flow-density') &&
@@ -4585,6 +5322,8 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-share-reach') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4594,9 +5333,17 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-reach-match], [data-reach-origin], [data-reach-depth], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth], [data-source-evidence-beacon], [data-source-evidence-count], [data-source-evidence-original-label], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
+ var reachStateClean = opts.reachSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && !opts.routeSnapshot && applyReachSnapshot(clone, opts.reachSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4720,6 +5467,22 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+ if (opts.reachSnapshot) {
+ style.textContent += "\nsvg[data-share-reach] [data-node-id], svg[data-share-reach] [data-edge-from] { opacity: 0.14; }\n" +
+ "svg[data-share-reach] [data-share-reach-match] { opacity: 1; }\n" +
+ "svg[data-share-reach] [data-edge-from][data-share-reach-match] { stroke-width: 1.55; }\n" +
+ "svg[data-share-reach=\"upstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--database-stroke); stroke-width: 3.4; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-reach=\"downstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--backend-stroke); stroke-width: 3.4; stroke-dasharray: 1 0; }\n" +
+ "svg[data-preset=\"blueprint\"][data-share-reach] [data-share-reach-origin], svg[data-preset=\"blueprint\"][data-share-reach] [data-edge-from][data-share-reach-match] { filter: none; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4727,7 +5490,9 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean,
+ reachStateClean: reachStateClean
};
}
@@ -4771,24 +5536,29 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
- URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4816,75 +5586,110 @@
return value + suffix;
}
- function rasterizeShareCard() {
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var reachSnapshot = options.reachSnapshot || null;
+ if (routeSnapshot && reachSnapshot) return Promise.reject(new Error('Share Card variants cannot be combined'));
var svg = document.querySelector('.diagram-container svg');
var vb = svg.viewBox.baseVal;
var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
- var data = serializeSvg(sourceScale);
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot, reachSnapshot: reachSnapshot });
if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ if (reachSnapshot && !data.reachStateClean) return Promise.reject(new Error('Reach Card export could not preserve authored reach safely'));
var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
var svgUrl = URL.createObjectURL(svgBlob);
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = SHARE_CARD_WIDTH;
- canvas.height = SHARE_CARD_HEIGHT;
- var ctx = canvas.getContext('2d');
- var computed = getComputedStyle(document.documentElement);
- var bg = computed.getPropertyValue('--bg').trim() || currentBg();
- var text = computed.getPropertyValue('--text').trim() || '#ffffff';
- var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
- var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
- var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
- var titleNode = document.querySelector('.header h1');
- var subtitleNode = document.querySelector('.header .subtitle');
- var title = titleNode ? titleNode.textContent : document.title;
- var subtitle = subtitleNode ? subtitleNode.textContent : '';
- var preset = document.documentElement.getAttribute('data-preset') || 'classic';
- var theme = document.documentElement.getAttribute('data-theme') || 'dark';
- var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
-
- ctx.fillStyle = bg;
- ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
-
- ctx.fillStyle = accent;
- ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
-
- ctx.textBaseline = 'alphabetic';
- ctx.fillStyle = text;
- var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
- ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
-
- ctx.fillStyle = muted;
- var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
- ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
-
- ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
- ctx.textAlign = 'right';
- ctx.fillStyle = accent;
- ctx.fillText('ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase(), SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
- ctx.textAlign = 'left';
-
- var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
- var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
- var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
- var drawWidth = data.width * fit;
- var drawHeight = data.height * fit;
- var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
- var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
-
- ctx.strokeStyle = border;
- ctx.lineWidth = 1;
- ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
- ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
- URL.revokeObjectURL(svgUrl);
-
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for Share Card'));
- else resolve(blob);
- }, 'image/png');
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accentProperty = reachSnapshot
+ ? (reachSnapshot.direction === 'upstream' ? '--database-stroke' : '--backend-stroke')
+ : '--frontend-stroke';
+ var accent = computed.getPropertyValue(accentProperty).trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : reachSnapshot
+ ? 'Authored ' + reachSnapshot.direction + ' from ' + reachSnapshot.origin.label + ' · ' +
+ (reachSnapshot.nodeIds.length - 1) + ' nodes · ' + reachSnapshot.edges.length +
+ ' links · max ' + reachSnapshot.maxDepth + ' hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : reachSnapshot
+ ? 'ARCHIFY · ' + reachSnapshot.direction.toUpperCase() + ' REACH'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4894,6 +5699,24 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route' && options.variant !== 'reach') {
+ return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ }
+ if (options.variant === 'route') {
+ var routeSnapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!routeSnapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: routeSnapshot });
+ }
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ if (!snapshot) return Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return renderShareCard({ reachSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5156,10 +5979,30 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
+ var reachShareItem = menu.querySelector('button[data-action="reach-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
+ function syncReachShareItem() {
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ reachShareItem.hidden = !snapshot;
+ reachShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5218,9 +6061,11 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
+ syncReachShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5254,7 +6099,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5279,8 +6124,7 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
return (format === 'share-card'
? rasterizeShareCard().then(function (blob) {
@@ -5324,13 +6168,72 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
+ function runReachShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ var blobPromise = snapshot
+ ? renderShareCard({ reachSnapshot: snapshot })
+ : Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'reach', false, true);
+ download(blob, diagramFilename() + '-' + snapshot.direction + '-reach-share-card.png');
+ toast('Downloaded Reach Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Reach Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical, dimensions) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean, reachStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (reachStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-reach-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
+ }
if (dimensions) {
document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
@@ -5346,6 +6249,9 @@
document.documentElement.removeAttribute('data-last-export-canonical');
document.documentElement.removeAttribute('data-last-export-width');
document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
document.documentElement.removeAttribute('data-last-export-error-format');
document.documentElement.removeAttribute('data-last-export-error');
}
@@ -5387,6 +6293,7 @@
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
@@ -5401,6 +6308,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var reachShareCardBtn = e.target.closest('button[data-action="reach-share-card"]');
+ if (reachShareCardBtn && !reachShareCardBtn.disabled && !reachShareCardBtn.hidden) { runReachShareCard(); return; }
+
var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
@@ -5412,7 +6325,18 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport, shareCard: rasterizeShareCard, copyShareCard: runCopyShareCard };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ downloadReachShareCard: runReachShareCard,
+ syncRouteShare: syncRouteShareItem,
+ syncReachShare: syncReachShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5697,6 +6621,76 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ var svgNamespace = 'http://www.w3.org/2000/svg';
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ function installBeacons() {
+ if (!payload) return 0;
+ var svg = document.querySelector('.diagram-container svg');
+ if (!svg) return 0;
+ var installed = 0;
+ Array.prototype.forEach.call(svg.querySelectorAll('[data-node-id]'), function (node) {
+ var id = node.getAttribute('data-node-id');
+ var sources = payload.nodes[id];
+ if (!Array.isArray(sources) || !sources.length || node.querySelector('[data-source-evidence-beacon]')) return;
+ var shape = node.querySelector('[data-animate="node"]') || node.querySelector('[class*="c-"]');
+ var box;
+ try { box = (shape || node).getBBox(); } catch (_) { return; }
+ if (!box || !Number.isFinite(box.x) || !Number.isFinite(box.y) || !Number.isFinite(box.width) || box.width < 36) return;
+
+ var count = sources.length;
+ var label = count + ' verified source' + (count === 1 ? '' : 's') + '; focus this node to inspect';
+ var beacon = document.createElementNS(svgNamespace, 'g');
+ beacon.classList.add('source-evidence-beacon');
+ beacon.setAttribute('data-source-evidence-beacon', '');
+ beacon.setAttribute('aria-hidden', 'true');
+ beacon.setAttribute('transform', 'translate(' + (box.x + box.width - 35) + ' ' + (box.y + 5) + ')');
+ var title = document.createElementNS(svgNamespace, 'title');
+ title.textContent = label;
+ var plate = document.createElementNS(svgNamespace, 'rect');
+ plate.setAttribute('width', '30');
+ plate.setAttribute('height', '12');
+ plate.setAttribute('rx', '6');
+ var text = document.createElementNS(svgNamespace, 'text');
+ text.setAttribute('x', '15');
+ text.setAttribute('y', '8.25');
+ text.textContent = 'SRC ' + count;
+ beacon.appendChild(title);
+ beacon.appendChild(plate);
+ beacon.appendChild(text);
+ node.appendChild(beacon);
+
+ var originalLabel = node.getAttribute('aria-label') || '';
+ node.setAttribute('data-source-evidence-count', String(count));
+ node.setAttribute('data-source-evidence-original-label', originalLabel);
+ node.setAttribute('aria-label', (originalLabel ? originalLabel + ', ' : '') + count + ' verified source reference' + (count === 1 ? '' : 's'));
+ installed += 1;
+ });
+ return installed;
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ },
+ installBeacons: installBeacons
+ };
+ })();
+ Archify.sourceEvidence.installBeacons();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5713,7 +6707,16 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
+ var reachSection = document.getElementById('focus-reach');
+ var reachStatus = document.getElementById('focus-reach-status');
+ var upstreamBtn = document.getElementById('btn-reach-upstream');
+ var downstreamBtn = document.getElementById('btn-reach-downstream');
+ var upstreamCount = document.getElementById('focus-reach-upstream-count');
+ var downstreamCount = document.getElementById('focus-reach-downstream-count');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
var relationsBtn = document.getElementById('btn-focus-relations');
@@ -5727,6 +6730,8 @@
var relationshipHitOverlay = null;
var relationshipHitTargets = [];
var directPreviewTimer = null;
+ var reachabilityMode = null;
+ var activeReachability = null;
var svgNamespace = 'http://www.w3.org/2000/svg';
var reducedMotionQuery = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
var finePointerQuery = window.matchMedia ? window.matchMedia('(hover: hover) and (pointer: fine)') : null;
@@ -5740,11 +6745,318 @@
function nodeLabel(node, fallback) {
return node.getAttribute('data-node-label') || (node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '');
}
+ function reachabilityRelationships() {
+ var seen = Object.create(null);
+ var relationships = [];
+ edges().forEach(function (edge) {
+ var from = edge.getAttribute('data-edge-from');
+ var to = edge.getAttribute('data-edge-to');
+ var key = edge.getAttribute('data-edge-key') || (from + '\u0000' + to + '\u0000' + (edge.getAttribute('data-edge-label') || ''));
+ if (!from || !to || seen[key]) return;
+ seen[key] = true;
+ relationships.push({ key: key, from: from, to: to });
+ });
+ return relationships;
+ }
+ function computeReachability(originId, direction, relationships) {
+ if (typeof originId !== 'string' || !originId ||
+ (direction !== 'upstream' && direction !== 'downstream') ||
+ !Array.isArray(relationships)) return null;
+ var records = [];
+ var seenKeys = Object.create(null);
+ relationships.forEach(function (relationship, index) {
+ if (!relationship || typeof relationship.from !== 'string' || !relationship.from ||
+ typeof relationship.to !== 'string' || !relationship.to) return;
+ var key = typeof relationship.key === 'string' && relationship.key
+ ? relationship.key : String(index);
+ if (seenKeys[key]) return;
+ seenKeys[key] = true;
+ records.push({ key: key, from: relationship.from, to: relationship.to });
+ });
+
+ var depths = Object.create(null);
+ var order = [];
+ var queue = [originId];
+ depths[originId] = 0;
+ for (var cursor = 0; cursor < queue.length; cursor += 1) {
+ var current = queue[cursor];
+ records.forEach(function (relationship) {
+ var next = null;
+ if (direction === 'downstream' && relationship.from === current) next = relationship.to;
+ else if (direction === 'upstream' && relationship.to === current) next = relationship.from;
+ if (next == null || Object.prototype.hasOwnProperty.call(depths, next)) return;
+ depths[next] = depths[current] + 1;
+ queue.push(next);
+ });
+ }
+ queue.forEach(function (id) { order.push(id); });
+
+ var edgeKeys = [];
+ records.forEach(function (relationship) {
+ if (Object.prototype.hasOwnProperty.call(depths, relationship.from) &&
+ Object.prototype.hasOwnProperty.call(depths, relationship.to)) edgeKeys.push(relationship.key);
+ });
+ var maxDepth = order.reduce(function (maximum, id) {
+ return Math.max(maximum, depths[id]);
+ }, 0);
+ return {
+ direction: direction,
+ originId: originId,
+ nodeIds: order,
+ edgeKeys: edgeKeys,
+ depths: depths,
+ maxDepth: maxDepth
+ };
+ }
+ function reachabilityFor(id, direction) {
+ return computeReachability(id, direction, reachabilityRelationships());
+ }
+ function resetReachabilityButtons() {
+ upstreamBtn.setAttribute('aria-pressed', 'false');
+ downstreamBtn.setAttribute('aria-pressed', 'false');
+ }
+ function clearReachability(options) {
+ options = options || {};
+ reachabilityMode = null;
+ activeReachability = null;
+ svg.removeAttribute('data-reach-active');
+ chip.removeAttribute('data-reach-mode');
+ nodes().forEach(function (node) {
+ node.removeAttribute('data-reach-match');
+ node.removeAttribute('data-reach-origin');
+ node.removeAttribute('data-reach-depth');
+ });
+ edges().forEach(function (edge) {
+ edge.removeAttribute('data-reach-match');
+ edge.removeAttribute('data-reach-depth');
+ });
+ resetReachabilityButtons();
+ reachStatus.textContent = '';
+ reachStatus.hidden = true;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl === true && activeIds.length === 1) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' + encodeURIComponent(activeIds[0]));
+ } catch (_) {}
+ }
+ }
+ function renderReachabilityControls(id) {
+ var upstream = reachabilityFor(id, 'upstream');
+ var downstream = reachabilityFor(id, 'downstream');
+ var upstreamReach = upstream ? Math.max(0, upstream.nodeIds.length - 1) : 0;
+ var downstreamReach = downstream ? Math.max(0, downstream.nodeIds.length - 1) : 0;
+ upstreamCount.textContent = String(upstreamReach);
+ downstreamCount.textContent = String(downstreamReach);
+ upstreamBtn.disabled = upstreamReach === 0;
+ downstreamBtn.disabled = downstreamReach === 0;
+ upstreamBtn.setAttribute('aria-label', upstreamReach
+ ? 'Trace ' + upstreamReach + ' upstream authored node' + (upstreamReach === 1 ? '' : 's')
+ : 'No upstream authored nodes');
+ downstreamBtn.setAttribute('aria-label', downstreamReach
+ ? 'Trace ' + downstreamReach + ' downstream authored node' + (downstreamReach === 1 ? '' : 's')
+ : 'No downstream authored nodes');
+ reachSection.hidden = false;
+ }
+ function applyReachability(direction, options) {
+ options = options || {};
+ if (activeIds.length !== 1 || (direction !== 'upstream' && direction !== 'downstream')) return false;
+ if (reachabilityMode === direction && options.toggle !== false) {
+ clearReachability({ updateUrl: options.updateUrl !== false });
+ return true;
+ }
+ var result = reachabilityFor(activeIds[0], direction);
+ if (!result || result.nodeIds.length <= 1) return false;
+ if (Archify.guidedViews && typeof Archify.guidedViews.showAll === 'function') {
+ Archify.guidedViews.showAll({ clearFocus: false, updateUrl: false, resetView: false });
+ }
+ clearRelationshipPreview({ clearPin: true });
+ clearReachability({ updateUrl: false });
+ reachabilityMode = direction;
+ activeReachability = result;
+ var edgeKeySet = Object.create(null);
+ result.edgeKeys.forEach(function (key) { edgeKeySet[key] = true; });
+ svg.setAttribute('data-reach-active', direction);
+ chip.setAttribute('data-reach-mode', direction);
+ nodes().forEach(function (node) {
+ var id = node.getAttribute('data-node-id');
+ if (!Object.prototype.hasOwnProperty.call(result.depths, id)) return;
+ node.setAttribute('data-reach-match', '');
+ node.setAttribute('data-reach-depth', String(result.depths[id]));
+ if (id === result.originId) node.setAttribute('data-reach-origin', '');
+ });
+ edges().forEach(function (edge) {
+ var key = edge.getAttribute('data-edge-key') || (
+ edge.getAttribute('data-edge-from') + '\u0000' +
+ edge.getAttribute('data-edge-to') + '\u0000' +
+ (edge.getAttribute('data-edge-label') || '')
+ );
+ if (!edgeKeySet[key]) return;
+ edge.setAttribute('data-reach-match', '');
+ var fromDepth = result.depths[edge.getAttribute('data-edge-from')];
+ var toDepth = result.depths[edge.getAttribute('data-edge-to')];
+ edge.setAttribute('data-reach-depth', String(Math.max(fromDepth || 0, toDepth || 0)));
+ });
+ resetReachabilityButtons();
+ var activeButton = direction === 'upstream' ? upstreamBtn : downstreamBtn;
+ activeButton.setAttribute('aria-pressed', 'true');
+ var reachableCount = result.nodeIds.length - 1;
+ var directionLabel = direction === 'upstream' ? 'Upstream' : 'Downstream';
+ reachStatus.textContent = directionLabel + ' · ' + reachableCount + ' node' +
+ (reachableCount === 1 ? '' : 's') + ' · ' + result.edgeKeys.length + ' link' +
+ (result.edgeKeys.length === 1 ? '' : 's') + ' · max ' + result.maxDepth + ' hop' +
+ (result.maxDepth === 1 ? '' : 's');
+ reachStatus.hidden = false;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl !== false) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' +
+ encodeURIComponent(activeIds[0]) + '&reach=' + direction);
+ } catch (_) {}
+ }
+ if (options.reveal !== false && Archify.view && typeof Archify.view.reveal === 'function') {
+ Archify.view.reveal(result.nodeIds, { includeNeighbors: false, reason: 'reachability' });
+ }
+ requestLensPlacement();
+ return true;
+ }
+ function reachabilitySnapshot() {
+ if (!activeReachability || activeIds.length !== 1 ||
+ (reachabilityMode !== 'upstream' && reachabilityMode !== 'downstream') ||
+ activeReachability.direction !== reachabilityMode ||
+ activeReachability.originId !== activeIds[0] ||
+ svg.getAttribute('data-reach-active') !== reachabilityMode) return null;
+
+ var originId = activeReachability.originId;
+ var nodeIds = activeReachability.nodeIds.slice();
+ var edgeKeys = activeReachability.edgeKeys.slice();
+ if (nodeIds.length < 2 || nodeIds[0] !== originId || !edgeKeys.length ||
+ !activeReachability.depths || !Number.isInteger(activeReachability.maxDepth) ||
+ activeReachability.maxDepth < 1) return null;
+
+ var allNodes = nodes();
+ var allEdges = edges();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ var nodeIdSet = Object.create(null);
+ var depths = Object.create(null);
+ var originNode = null;
+ var measuredMaxDepth = 0;
+
+ if (nodeIds.some(function (id) {
+ var depth = activeReachability.depths[id];
+ var matches = allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ });
+ if (typeof id !== 'string' || !id || seenNodeIds[id] || matches.length !== 1 ||
+ !matches[0].hasAttribute('data-reach-match') ||
+ !Number.isInteger(depth) || depth < 0 || depth > activeReachability.maxDepth ||
+ (id === originId
+ ? (!matches[0].hasAttribute('data-reach-origin') || depth !== 0)
+ : depth < 1)) return true;
+ seenNodeIds[id] = true;
+ nodeIdSet[id] = true;
+ depths[id] = depth;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ if (id === originId) originNode = matches[0];
+ return false;
+ }) || !originNode || measuredMaxDepth !== activeReachability.maxDepth ||
+ allNodes.filter(function (node) { return node.hasAttribute('data-reach-match'); }).length !== nodeIds.length) return null;
+
+ var edgeRecords = [];
+ if (edgeKeys.some(function (key) {
+ if (typeof key !== 'string' || !key || seenEdgeKeys[key]) return true;
+ var fragments = allEdges.filter(function (edge) {
+ return edge.getAttribute('data-edge-key') === key;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ if (!fragments.length || drawableFragments.length !== 1 ||
+ !fragments.every(function (fragment) { return fragment.hasAttribute('data-reach-match'); })) return true;
+ var first = fragments[0];
+ var from = first.getAttribute('data-edge-from');
+ var to = first.getAttribute('data-edge-to');
+ var id = first.getAttribute('data-edge-id') || '';
+ var labelValue = first.getAttribute('data-edge-label') || '';
+ if (!nodeIdSet[from] || !nodeIdSet[to] || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === from &&
+ fragment.getAttribute('data-edge-to') === to &&
+ (fragment.getAttribute('data-edge-id') || '') === id;
+ })) return true;
+ seenEdgeKeys[key] = true;
+ edgeRecords.push({
+ key: key,
+ id: id,
+ from: from,
+ to: to,
+ label: labelValue,
+ depth: Math.max(depths[from], depths[to])
+ });
+ return false;
+ })) return null;
+
+ var liveEdgeKeys = Object.create(null);
+ if (allEdges.some(function (edge) {
+ if (!edge.hasAttribute('data-reach-match')) return false;
+ var key = edge.getAttribute('data-edge-key');
+ if (!key || !seenEdgeKeys[key]) return true;
+ liveEdgeKeys[key] = true;
+ return false;
+ }) || Object.keys(liveEdgeKeys).length !== edgeKeys.length) return null;
+
+ return {
+ direction: reachabilityMode,
+ origin: { id: originId, label: nodeLabel(originNode, originId) },
+ nodeIds: nodeIds,
+ depths: depths,
+ maxDepth: activeReachability.maxDepth,
+ edges: edgeRecords
+ };
+ }
function setPassportValue(element, value) {
var normalized = value == null ? '' : String(value).trim();
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5752,6 +7064,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6309,6 +7622,7 @@
var counts = { out: 0, in: 0, loop: 0 };
relationships.forEach(function (relationship) { counts[relationship.direction] += 1; });
summary.textContent = counts.out + ' outgoing · ' + counts.in + ' incoming' + (counts.loop ? ' · ' + counts.loop + ' loop' : '');
+ renderReachabilityControls(id);
relationshipList.textContent = '';
if (!relationships.length) {
var empty = document.createElement('p');
@@ -6405,6 +7719,10 @@
}
function clear(options) {
options = options || {};
+ var restoreNode = options.restoreFocus === true && activeIds.length === 1
+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')
+ : null;
+ clearReachability({ updateUrl: false });
if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {
Archify.intentTrace.clear({ announce: false });
}
@@ -6431,7 +7749,16 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
+ reachSection.hidden = true;
+ upstreamCount.textContent = '0';
+ downstreamCount.textContent = '0';
+ upstreamBtn.disabled = true;
+ downstreamBtn.disabled = true;
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
copyBtn.setAttribute('aria-label', 'Copy link to focused node');
@@ -6446,6 +7773,10 @@
if (options.updateUrl !== false) {
try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}
}
+ if (restoreNode) {
+ try { restoreNode.focus({ preventScroll: true }); }
+ catch (_) { try { restoreNode.focus(); } catch (_) {} }
+ }
}
function setMany(ids, options) {
@@ -6541,7 +7872,7 @@
var relationId = record && record.id;
var value = location.href.replace(/#.*$/, '') + (relationId
? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]));
+ : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
: Promise.resolve(fallbackCopy(value));
@@ -6579,8 +7910,10 @@
Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });
}
});
- clearBtn.addEventListener('click', function () { clear(); });
+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });
copyBtn.addEventListener('click', copyFocusLink);
+ upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });
+ downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });
relationsBtn.addEventListener('click', function () {
var expanded = chip.getAttribute('data-relations-expanded') === 'true';
if (expanded) chip.removeAttribute('data-relations-expanded');
@@ -6644,6 +7977,13 @@
event.preventDefault();
buttons[index].focus();
});
+ document.addEventListener('click', function (event) {
+ var target = event.target;
+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;
+ if (container.getAttribute('data-just-panned') === 'true') return;
+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;
+ clear();
+ }, true);
window.addEventListener('scroll', requestLensPlacement, { passive: true });
window.addEventListener('resize', requestLensPlacement);
container.addEventListener('scroll', requestLensPlacement, { passive: true });
@@ -6668,11 +8008,17 @@
var params = new URLSearchParams(location.hash.replace(/^#/, ''));
var relation = params.get('relation');
var initial = params.get('focus');
+ var reach = params.get('reach');
if (relation) {
if (html.getAttribute('data-embed') === 'true' ||
!inspectRelationshipById(relation, { updateUrl: false, toggle: false })) clear({ updateUrl: false });
}
- else if (initial) set(initial, { updateUrl: false, toggle: false });
+ else if (initial) {
+ if (set(initial, { updateUrl: false, toggle: false }) &&
+ (reach === 'upstream' || reach === 'downstream')) {
+ applyReachability(reach, { updateUrl: false, toggle: false, reveal: false });
+ }
+ }
else if (!params.get('view')) clear({ updateUrl: false });
} catch (_) {}
}
@@ -6685,6 +8031,9 @@
setMany: setMany,
clear: clear,
copyLink: copyFocusLink,
+ reach: applyReachability,
+ clearReach: clearReachability,
+ reachabilitySnapshot: reachabilitySnapshot,
inspectRelationship: inspectRelationship,
inspectRelationshipById: inspectRelationshipById,
reposition: requestLensPlacement,
@@ -6692,6 +8041,15 @@
var record = pinnedRelationshipRecord();
return record ? { id: record.id || null, key: record.key, from: record.from, to: record.to, label: record.label } : null;
},
+ reachability: function () {
+ return activeReachability ? {
+ direction: activeReachability.direction,
+ originId: activeReachability.originId,
+ nodeIds: activeReachability.nodeIds.slice(),
+ edgeKeys: activeReachability.edgeKeys.slice(),
+ maxDepth: activeReachability.maxDepth
+ } : null;
+ },
active: function () { return activeIds.length === 0 ? null : (activeIds.length === 1 ? activeIds[0] : activeIds.slice()); }
};
})();
@@ -9452,6 +10810,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9459,8 +10821,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9529,7 +10892,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9541,11 +10908,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9553,7 +10919,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9686,7 +11054,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9694,6 +11062,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9842,6 +11258,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10321,6 +11738,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10591,6 +12009,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11526,7 +12945,7 @@
Archify.intentTrace.clear();
} else if (e.key === 'Escape' && Archify.focus.active()) {
e.preventDefault();
- Archify.focus.clear();
+ Archify.focus.clear({ restoreFocus: true });
} else if (e.key === 'Escape' && Archify.presentation.active()) {
e.preventDefault();
Archify.presentation.exit();
diff --git a/archify/examples/workflow-agent-tool-call-rendered.html b/archify/examples/workflow-agent-tool-call-rendered.html
index 2e28f3ef..ec2ff0ce 100644
--- a/archify/examples/workflow-agent-tool-call-rendered.html
+++ b/archify/examples/workflow-agent-tool-call-rendered.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -1354,10 +1511,25 @@
.relationship-lens-actions {
display: flex;
flex-direction: column;
- align-items: stretch;
+ align-items: flex-end;
gap: 0.18rem;
}
.relationship-lens-actions button { white-space: nowrap; }
+ .relationship-lens-actions #btn-focus-clear {
+ display: grid;
+ width: 1.75rem;
+ height: 1.75rem;
+ padding: 0;
+ place-items: center;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
+ }
+ .relationship-lens-actions #btn-focus-clear:hover,
+ .relationship-lens-actions #btn-focus-clear:focus-visible {
+ background: var(--toolbar-hover);
+ color: var(--text);
+ }
.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }
.relationship-lens-actions #btn-focus-relations { display: none; }
.relationship-lens-eyebrow {
@@ -1420,12 +1592,163 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
+ .semantic-passport-reach {
+ display: grid;
+ gap: 0.28rem;
+ margin-top: 0.52rem;
+ padding-top: 0.48rem;
+ border-top: 1px solid color-mix(in srgb, var(--toolbar-border) 76%, transparent);
+ }
+ .semantic-passport-reach[hidden] { display: none; }
+ .semantic-passport-reach-label {
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-reach-actions {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.25rem;
+ }
+ .semantic-passport-reach-actions button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.5rem;
+ min-width: 0;
+ min-height: 2rem;
+ padding: 0.32rem 0.42rem;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 86%, transparent);
+ background: color-mix(in srgb, var(--panel) 70%, transparent);
+ color: var(--text-muted);
+ text-align: left;
+ }
+ .semantic-passport-reach-actions button:hover:not(:disabled),
+ .semantic-passport-reach-actions button:focus-visible {
+ border-color: color-mix(in srgb, var(--frontend-stroke) 62%, var(--toolbar-border));
+ color: var(--text);
+ }
+ .semantic-passport-reach-actions button:focus-visible {
+ outline: 2px solid var(--frontend-stroke);
+ outline-offset: 1px;
+ }
+ .semantic-passport-reach-actions button:disabled {
+ cursor: default;
+ opacity: 0.5;
+ }
+ .semantic-passport-reach-actions button[aria-pressed="true"] {
+ border-color: color-mix(in srgb, var(--reach-color, var(--frontend-stroke)) 72%, var(--toolbar-border));
+ background: color-mix(in srgb, var(--reach-fill, var(--frontend-fill)) 48%, transparent);
+ color: var(--text);
+ }
+ #btn-reach-upstream {
+ --reach-color: var(--database-stroke);
+ --reach-fill: var(--database-fill);
+ }
+ #btn-reach-downstream {
+ --reach-color: var(--backend-stroke);
+ --reach-fill: var(--backend-fill);
+ }
+ .semantic-passport-reach-actions strong {
+ color: var(--reach-color, var(--frontend-stroke));
+ font-size: 0.625rem;
+ }
+ .semantic-passport-reach-status {
+ color: var(--text-faint);
+ font-size: 0.525rem;
+ line-height: 1.4;
+ }
+ .semantic-passport-reach-status[hidden] { display: none; }
.relationship-lens-list {
max-height: min(18rem, 46vh);
overflow: auto;
@@ -1698,13 +2021,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +2070,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +2085,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +2104,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +2116,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +2168,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +2195,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2364,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2491,6 +2855,8 @@
.story-carrier-overlay { display: none !important; }
.diagram-container svg[data-focus-active] [data-node-id],
.diagram-container svg[data-focus-active] [data-edge-from],
+ .diagram-container svg[data-reach-active] [data-node-id],
+ .diagram-container svg[data-reach-active] [data-edge-from],
.diagram-container svg[data-story-beat] [data-story-step],
.diagram-container svg[data-story-beat] [data-edge-from][data-story-beat-step],
.diagram-container svg[data-route-active] [data-node-id],
@@ -2561,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2597,6 +2982,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2644,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2659,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3035,6 +3427,8 @@
the global zoom level. Reveal only their exact semantic matches. */
svg[data-focus-active] [data-focus-match][data-detail],
svg[data-focus-active] [data-focus-match] [data-detail],
+ svg[data-reach-active] [data-reach-match][data-detail],
+ svg[data-reach-active] [data-reach-match] [data-detail],
svg[data-lens-active] [data-lens-match][data-detail],
svg[data-lens-active] [data-lens-match] [data-detail],
svg[data-legend-preview-active] [data-legend-preview-match][data-detail],
@@ -3053,6 +3447,7 @@
pointer-events: auto;
}
svg[data-focus-active] [data-focus-match] [data-detail-anchor],
+ svg[data-reach-active] [data-reach-match] [data-detail-anchor],
svg[data-lens-active] [data-lens-match] [data-detail-anchor],
svg[data-legend-preview-active] [data-legend-preview-match] [data-detail-anchor],
svg[data-intent-trace-active] [data-intent-trace-match] [data-detail-anchor],
@@ -3084,6 +3479,41 @@
filter: drop-shadow(0 0 7px var(--frontend-stroke));
outline: none;
}
+ /* Verified Source Beacons are installed at runtime only for nodes whose
+ repository evidence passed the local revision/blob/line checks. They
+ live inside the owning node so every focus, route, story, and guided
+ view keeps one coherent opacity state. Export serialization removes
+ them before producing the canonical SVG or any derived visual. */
+ .source-evidence-beacon {
+ pointer-events: none;
+ opacity: 0.76;
+ transition: opacity 160ms ease, filter 160ms ease;
+ }
+ .source-evidence-beacon rect {
+ fill: color-mix(in srgb, var(--mask) 92%, var(--backend-stroke));
+ stroke: color-mix(in srgb, var(--backend-stroke) 82%, var(--panel-border));
+ stroke-width: 1;
+ vector-effect: non-scaling-stroke;
+ }
+ .source-evidence-beacon text {
+ fill: var(--backend-stroke);
+ font-size: 5.5px;
+ font-weight: 800;
+ letter-spacing: 0.06em;
+ text-anchor: middle;
+ text-transform: uppercase;
+ }
+ svg [data-node-id]:hover .source-evidence-beacon,
+ svg [data-node-id]:focus-visible .source-evidence-beacon,
+ svg [data-node-id][data-focus-selected] .source-evidence-beacon {
+ opacity: 1;
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="signal-flow"] .source-evidence-beacon { opacity: 0.9; }
+ svg[data-preset="blueprint"] .source-evidence-beacon rect {
+ rx: 0.8px;
+ filter: none;
+ }
svg [data-legend-kind][role="button"] { cursor: pointer; }
svg [data-legend-kind]:focus { outline: none; }
svg [data-legend-hit] {
@@ -3199,6 +3629,30 @@
filter: drop-shadow(0 0 10px var(--frontend-stroke));
}
+ /* Authored Reachability is a bounded graph query over the relationships
+ already present in the artifact. Upstream walks incoming edges;
+ downstream walks outgoing edges. It never claims runtime causality and
+ changes only viewer emphasis, not canonical geometry or export bytes. */
+ svg[data-reach-active] [data-node-id],
+ svg[data-reach-active] [data-edge-from] { opacity: 0.09; }
+ svg[data-reach-active] [data-reach-match] { opacity: 1; }
+ svg[data-reach-active="upstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--database-stroke));
+ }
+ svg[data-reach-active="downstream"] [data-reach-origin] {
+ filter: drop-shadow(0 0 11px var(--backend-stroke));
+ }
+ svg[data-reach-active="upstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--database-stroke) 72%, transparent));
+ }
+ svg[data-reach-active="downstream"] [data-edge-from][data-reach-match] {
+ filter: drop-shadow(0 0 4px color-mix(in srgb, var(--backend-stroke) 72%, transparent));
+ }
+ svg[data-preset="blueprint"][data-reach-active] [data-reach-origin],
+ svg[data-preset="blueprint"][data-reach-active] [data-edge-from][data-reach-match] {
+ filter: none;
+ }
+
/* Direct Relationship Explorer makes authored paths a real input surface
without changing their visible stroke or canonical SVG. A transparent
runtime rail supplies forgiving pointer geometry; the exact authored
@@ -3294,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3336,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3376,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3459,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3477,6 +3958,9 @@
svg[data-preset="blueprint"][data-focus-active] [data-focus-selected] {
filter: drop-shadow(0 0 3px var(--frontend-stroke));
}
+ svg[data-preset="blueprint"][data-focus-active][data-reach-active] [data-focus-selected][data-reach-origin] {
+ filter: none;
+ }
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-source],
svg[data-preset="blueprint"][data-relationship-preview-active] [data-relationship-preview-target] {
@@ -3541,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3602,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3627,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -3742,6 +4242,7 @@
}
.relationship-pulse-overlay { display: none !important; }
.guided-view-chapter { transition: none !important; }
+ .source-evidence-beacon,
svg [data-node-id], svg [data-edge-from], svg [data-detail], svg [data-detail-anchor], svg [data-legend-hit], svg { transition: none !important; }
}
</style>
@@ -3789,6 +4290,8 @@
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
<button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="reach-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Reach Share Card <span class="hint">1200&times;630 PNG</span></button>
<button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
<hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
@@ -3814,6 +4317,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"happy-path","label":"Request to result","focus":["user","chat","planner","router","approval","tool","external","final"],"note":"Follow the successful request from user intent to the final reply."},{"id":"safety-gate","label":"Policy and recovery","focus":["router","approval","blocked","retry"],"note":"See where risky work stops, waits for consent, or returns for revision."},{"id":"evidence-loop","label":"Evidence and memory","focus":["external","store","trace"],"note":"Isolate the durable trace and context path behind the visible answer."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4201,7 +4705,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4220,12 +4724,31 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
+ <div class="semantic-passport-reach" id="focus-reach" hidden>
+ <span class="semantic-passport-reach-label">Authored reach</span>
+ <div class="semantic-passport-reach-actions" role="group" aria-label="Trace authored reachability">
+ <button id="btn-reach-upstream" type="button" aria-label="Trace upstream authored reachability" aria-pressed="false">
+ <span>Upstream</span><strong id="focus-reach-upstream-count">0</strong>
+ </button>
+ <button id="btn-reach-downstream" type="button" aria-label="Trace downstream authored reachability" aria-pressed="false">
+ <span>Downstream</span><strong id="focus-reach-downstream-count">0</strong>
+ </button>
+ </div>
+ <small class="semantic-passport-reach-status" id="focus-reach-status" hidden aria-live="polite"></small>
+ </div>
</div>
<div class="relationship-lens-actions">
+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">&#215;</button>
<button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button>
<button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>
- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button>
</div>
</div>
<div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>
@@ -4347,15 +4870,36 @@
<script>
var Archify = {};
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
@@ -4506,6 +5050,168 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
+ function applyReachSnapshot(clone, snapshot) {
+ if (!snapshot || (snapshot.direction !== 'upstream' && snapshot.direction !== 'downstream') ||
+ !snapshot.origin || typeof snapshot.origin.id !== 'string' || !snapshot.origin.id ||
+ typeof snapshot.origin.label !== 'string' || !snapshot.origin.label.trim() ||
+ !Array.isArray(snapshot.nodeIds) || snapshot.nodeIds.length < 2 ||
+ !Array.isArray(snapshot.edges) || !snapshot.edges.length ||
+ !snapshot.depths || typeof snapshot.depths !== 'object' ||
+ !Number.isInteger(snapshot.maxDepth) || snapshot.maxDepth < 1 ||
+ snapshot.nodeIds[0] !== snapshot.origin.id) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+ var measuredMaxDepth = 0;
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ var depth = snapshot.depths[nodeId];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId] ||
+ !Number.isInteger(depth) || depth < 0 || depth > snapshot.maxDepth ||
+ (nodeId === snapshot.origin.id ? depth !== 0 : depth < 1)) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ nodeMatches.push({ elements: matchedNodes, id: nodeId, depth: depth });
+ }
+ if (measuredMaxDepth !== snapshot.maxDepth) return false;
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ !nodeIds[edge.from] || !nodeIds[edge.to] ||
+ !Number.isInteger(edge.depth) || edge.depth < 1 || edge.depth > snapshot.maxDepth ||
+ edge.depth !== Math.max(snapshot.depths[edge.from], snapshot.depths[edge.to])) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push({ elements: matchedEdges, depth: edge.depth });
+ }
+
+ clone.setAttribute('data-share-reach', snapshot.direction);
+ nodeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ if (match.id === snapshot.origin.id) element.setAttribute('data-share-reach-origin', '');
+ });
+ });
+ edgeMatches.forEach(function (match) {
+ match.elements.forEach(function (element) {
+ element.setAttribute('data-share-reach-match', '');
+ element.setAttribute('data-share-reach-depth', String(match.depth));
+ });
+ });
+
+ return clone.getAttribute('data-share-reach') === snapshot.direction &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-reach-active') &&
+ clone.querySelectorAll('[data-animate], [data-reach-match], [data-reach-origin], [data-reach-depth]').length === 0 &&
+ clone.querySelectorAll('[data-share-reach-origin]').length === 1 &&
+ clone.querySelectorAll('[data-share-reach-match]').length ===
+ nodeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0) +
+ edgeMatches.reduce(function (count, match) { return count + match.elements.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4520,6 +5226,7 @@
clone.style.removeProperty('transform');
clone.removeAttribute('data-view-scale');
clone.removeAttribute('data-focus-active');
+ clone.removeAttribute('data-reach-active');
clone.removeAttribute('data-lens-active');
clone.removeAttribute('data-lens-flow-count');
clone.removeAttribute('data-lens-flow-density');
@@ -4531,6 +5238,8 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
+ clone.removeAttribute('data-share-reach');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4590,6 +5299,16 @@
Array.prototype.forEach.call(clone.querySelectorAll('[data-relationship-hit-overlay]'), function (el) {
el.remove();
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-beacon]'), function (el) {
+ el.remove();
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-source-evidence-count]'), function (el) {
+ var originalLabel = el.getAttribute('data-source-evidence-original-label');
+ if (originalLabel == null || originalLabel === '') el.removeAttribute('aria-label');
+ else el.setAttribute('aria-label', originalLabel);
+ el.removeAttribute('data-source-evidence-count');
+ el.removeAttribute('data-source-evidence-original-label');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-story-step], [data-story-beat-state], [data-story-beat-step]'), function (el) {
el.removeAttribute('data-story-step');
el.removeAttribute('data-story-beat-state');
@@ -4600,6 +5319,11 @@
el.removeAttribute('data-focus-match');
el.removeAttribute('data-focus-selected');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-reach-match], [data-reach-origin], [data-reach-depth]'), function (el) {
+ el.removeAttribute('data-reach-match');
+ el.removeAttribute('data-reach-origin');
+ el.removeAttribute('data-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-lens-match], [data-lens-selected], [data-lens-peer]'), function (el) {
el.removeAttribute('data-lens-match');
el.removeAttribute('data-lens-selected');
@@ -4630,6 +5354,18 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth]'), function (el) {
+ el.removeAttribute('data-share-reach-match');
+ el.removeAttribute('data-share-reach-origin');
+ el.removeAttribute('data-share-reach-depth');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4639,6 +5375,7 @@
});
var canonicalStateClean = !clone.hasAttribute('data-view-scale') &&
!clone.hasAttribute('data-focus-active') &&
+ !clone.hasAttribute('data-reach-active') &&
!clone.hasAttribute('data-lens-active') &&
!clone.hasAttribute('data-lens-flow-count') &&
!clone.hasAttribute('data-lens-flow-density') &&
@@ -4649,6 +5386,8 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-share-reach') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4658,9 +5397,17 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-reach-match], [data-reach-origin], [data-reach-depth], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-share-reach-match], [data-share-reach-origin], [data-share-reach-depth], [data-source-evidence-beacon], [data-source-evidence-count], [data-source-evidence-original-label], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
+ var reachStateClean = opts.reachSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && !opts.routeSnapshot && applyReachSnapshot(clone, opts.reachSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4784,6 +5531,22 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+ if (opts.reachSnapshot) {
+ style.textContent += "\nsvg[data-share-reach] [data-node-id], svg[data-share-reach] [data-edge-from] { opacity: 0.14; }\n" +
+ "svg[data-share-reach] [data-share-reach-match] { opacity: 1; }\n" +
+ "svg[data-share-reach] [data-edge-from][data-share-reach-match] { stroke-width: 1.55; }\n" +
+ "svg[data-share-reach=\"upstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--database-stroke); stroke-width: 3.4; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-reach=\"downstream\"] [data-share-reach-origin] > :is(rect, circle, polygon):not(.c-mask) { stroke: var(--backend-stroke); stroke-width: 3.4; stroke-dasharray: 1 0; }\n" +
+ "svg[data-preset=\"blueprint\"][data-share-reach] [data-share-reach-origin], svg[data-preset=\"blueprint\"][data-share-reach] [data-edge-from][data-share-reach-match] { filter: none; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4791,7 +5554,9 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean,
+ reachStateClean: reachStateClean
};
}
@@ -4835,24 +5600,29 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
- URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4880,75 +5650,110 @@
return value + suffix;
}
- function rasterizeShareCard() {
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var reachSnapshot = options.reachSnapshot || null;
+ if (routeSnapshot && reachSnapshot) return Promise.reject(new Error('Share Card variants cannot be combined'));
var svg = document.querySelector('.diagram-container svg');
var vb = svg.viewBox.baseVal;
var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
- var data = serializeSvg(sourceScale);
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot, reachSnapshot: reachSnapshot });
if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ if (reachSnapshot && !data.reachStateClean) return Promise.reject(new Error('Reach Card export could not preserve authored reach safely'));
var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
var svgUrl = URL.createObjectURL(svgBlob);
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = SHARE_CARD_WIDTH;
- canvas.height = SHARE_CARD_HEIGHT;
- var ctx = canvas.getContext('2d');
- var computed = getComputedStyle(document.documentElement);
- var bg = computed.getPropertyValue('--bg').trim() || currentBg();
- var text = computed.getPropertyValue('--text').trim() || '#ffffff';
- var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
- var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
- var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
- var titleNode = document.querySelector('.header h1');
- var subtitleNode = document.querySelector('.header .subtitle');
- var title = titleNode ? titleNode.textContent : document.title;
- var subtitle = subtitleNode ? subtitleNode.textContent : '';
- var preset = document.documentElement.getAttribute('data-preset') || 'classic';
- var theme = document.documentElement.getAttribute('data-theme') || 'dark';
- var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
-
- ctx.fillStyle = bg;
- ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
-
- ctx.fillStyle = accent;
- ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
-
- ctx.textBaseline = 'alphabetic';
- ctx.fillStyle = text;
- var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
- ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
-
- ctx.fillStyle = muted;
- var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
- ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
-
- ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
- ctx.textAlign = 'right';
- ctx.fillStyle = accent;
- ctx.fillText('ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase(), SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
- ctx.textAlign = 'left';
-
- var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
- var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
- var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
- var drawWidth = data.width * fit;
- var drawHeight = data.height * fit;
- var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
- var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
-
- ctx.strokeStyle = border;
- ctx.lineWidth = 1;
- ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
- ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
- URL.revokeObjectURL(svgUrl);
-
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for Share Card'));
- else resolve(blob);
- }, 'image/png');
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accentProperty = reachSnapshot
+ ? (reachSnapshot.direction === 'upstream' ? '--database-stroke' : '--backend-stroke')
+ : '--frontend-stroke';
+ var accent = computed.getPropertyValue(accentProperty).trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : reachSnapshot
+ ? 'Authored ' + reachSnapshot.direction + ' from ' + reachSnapshot.origin.label + ' · ' +
+ (reachSnapshot.nodeIds.length - 1) + ' nodes · ' + reachSnapshot.edges.length +
+ ' links · max ' + reachSnapshot.maxDepth + ' hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : reachSnapshot
+ ? 'ARCHIFY · ' + reachSnapshot.direction.toUpperCase() + ' REACH'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4958,6 +5763,24 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route' && options.variant !== 'reach') {
+ return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ }
+ if (options.variant === 'route') {
+ var routeSnapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!routeSnapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: routeSnapshot });
+ }
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ if (!snapshot) return Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return renderShareCard({ reachSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5220,10 +6043,30 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
+ var reachShareItem = menu.querySelector('button[data-action="reach-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
+ function syncReachShareItem() {
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ reachShareItem.hidden = !snapshot;
+ reachShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5282,9 +6125,11 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
+ syncReachShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5318,7 +6163,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5343,8 +6188,7 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
return (format === 'share-card'
? rasterizeShareCard().then(function (blob) {
@@ -5388,13 +6232,72 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
+ function runReachShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.focus && typeof Archify.focus.reachabilitySnapshot === 'function'
+ ? Archify.focus.reachabilitySnapshot()
+ : null;
+ var blobPromise = snapshot
+ ? renderShareCard({ reachSnapshot: snapshot })
+ : Promise.reject(new Error('Trace authored reach before exporting a Reach Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'reach', false, true);
+ download(blob, diagramFilename() + '-' + snapshot.direction + '-reach-share-card.png');
+ toast('Downloaded Reach Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Reach Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical, dimensions) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean, reachStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (reachStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-reach-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
+ }
if (dimensions) {
document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
@@ -5410,6 +6313,9 @@
document.documentElement.removeAttribute('data-last-export-canonical');
document.documentElement.removeAttribute('data-last-export-width');
document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-reach-state-clean');
document.documentElement.removeAttribute('data-last-export-error-format');
document.documentElement.removeAttribute('data-last-export-error');
}
@@ -5451,6 +6357,7 @@
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
@@ -5465,6 +6372,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var reachShareCardBtn = e.target.closest('button[data-action="reach-share-card"]');
+ if (reachShareCardBtn && !reachShareCardBtn.disabled && !reachShareCardBtn.hidden) { runReachShareCard(); return; }
+
var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
@@ -5476,7 +6389,18 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport, shareCard: rasterizeShareCard, copyShareCard: runCopyShareCard };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ downloadReachShareCard: runReachShareCard,
+ syncRouteShare: syncRouteShareItem,
+ syncReachShare: syncReachShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5761,6 +6685,76 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ var svgNamespace = 'http://www.w3.org/2000/svg';
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ function installBeacons() {
+ if (!payload) return 0;
+ var svg = document.querySelector('.diagram-container svg');
+ if (!svg) return 0;
+ var installed = 0;
+ Array.prototype.forEach.call(svg.querySelectorAll('[data-node-id]'), function (node) {
+ var id = node.getAttribute('data-node-id');
+ var sources = payload.nodes[id];
+ if (!Array.isArray(sources) || !sources.length || node.querySelector('[data-source-evidence-beacon]')) return;
+ var shape = node.querySelector('[data-animate="node"]') || node.querySelector('[class*="c-"]');
+ var box;
+ try { box = (shape || node).getBBox(); } catch (_) { return; }
+ if (!box || !Number.isFinite(box.x) || !Number.isFinite(box.y) || !Number.isFinite(box.width) || box.width < 36) return;
+
+ var count = sources.length;
+ var label = count + ' verified source' + (count === 1 ? '' : 's') + '; focus this node to inspect';
+ var beacon = document.createElementNS(svgNamespace, 'g');
+ beacon.classList.add('source-evidence-beacon');
+ beacon.setAttribute('data-source-evidence-beacon', '');
+ beacon.setAttribute('aria-hidden', 'true');
+ beacon.setAttribute('transform', 'translate(' + (box.x + box.width - 35) + ' ' + (box.y + 5) + ')');
+ var title = document.createElementNS(svgNamespace, 'title');
+ title.textContent = label;
+ var plate = document.createElementNS(svgNamespace, 'rect');
+ plate.setAttribute('width', '30');
+ plate.setAttribute('height', '12');
+ plate.setAttribute('rx', '6');
+ var text = document.createElementNS(svgNamespace, 'text');
+ text.setAttribute('x', '15');
+ text.setAttribute('y', '8.25');
+ text.textContent = 'SRC ' + count;
+ beacon.appendChild(title);
+ beacon.appendChild(plate);
+ beacon.appendChild(text);
+ node.appendChild(beacon);
+
+ var originalLabel = node.getAttribute('aria-label') || '';
+ node.setAttribute('data-source-evidence-count', String(count));
+ node.setAttribute('data-source-evidence-original-label', originalLabel);
+ node.setAttribute('aria-label', (originalLabel ? originalLabel + ', ' : '') + count + ' verified source reference' + (count === 1 ? '' : 's'));
+ installed += 1;
+ });
+ return installed;
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ },
+ installBeacons: installBeacons
+ };
+ })();
+ Archify.sourceEvidence.installBeacons();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5777,7 +6771,16 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
+ var reachSection = document.getElementById('focus-reach');
+ var reachStatus = document.getElementById('focus-reach-status');
+ var upstreamBtn = document.getElementById('btn-reach-upstream');
+ var downstreamBtn = document.getElementById('btn-reach-downstream');
+ var upstreamCount = document.getElementById('focus-reach-upstream-count');
+ var downstreamCount = document.getElementById('focus-reach-downstream-count');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
var relationsBtn = document.getElementById('btn-focus-relations');
@@ -5791,6 +6794,8 @@
var relationshipHitOverlay = null;
var relationshipHitTargets = [];
var directPreviewTimer = null;
+ var reachabilityMode = null;
+ var activeReachability = null;
var svgNamespace = 'http://www.w3.org/2000/svg';
var reducedMotionQuery = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
var finePointerQuery = window.matchMedia ? window.matchMedia('(hover: hover) and (pointer: fine)') : null;
@@ -5804,11 +6809,318 @@
function nodeLabel(node, fallback) {
return node.getAttribute('data-node-label') || (node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '');
}
+ function reachabilityRelationships() {
+ var seen = Object.create(null);
+ var relationships = [];
+ edges().forEach(function (edge) {
+ var from = edge.getAttribute('data-edge-from');
+ var to = edge.getAttribute('data-edge-to');
+ var key = edge.getAttribute('data-edge-key') || (from + '\u0000' + to + '\u0000' + (edge.getAttribute('data-edge-label') || ''));
+ if (!from || !to || seen[key]) return;
+ seen[key] = true;
+ relationships.push({ key: key, from: from, to: to });
+ });
+ return relationships;
+ }
+ function computeReachability(originId, direction, relationships) {
+ if (typeof originId !== 'string' || !originId ||
+ (direction !== 'upstream' && direction !== 'downstream') ||
+ !Array.isArray(relationships)) return null;
+ var records = [];
+ var seenKeys = Object.create(null);
+ relationships.forEach(function (relationship, index) {
+ if (!relationship || typeof relationship.from !== 'string' || !relationship.from ||
+ typeof relationship.to !== 'string' || !relationship.to) return;
+ var key = typeof relationship.key === 'string' && relationship.key
+ ? relationship.key : String(index);
+ if (seenKeys[key]) return;
+ seenKeys[key] = true;
+ records.push({ key: key, from: relationship.from, to: relationship.to });
+ });
+
+ var depths = Object.create(null);
+ var order = [];
+ var queue = [originId];
+ depths[originId] = 0;
+ for (var cursor = 0; cursor < queue.length; cursor += 1) {
+ var current = queue[cursor];
+ records.forEach(function (relationship) {
+ var next = null;
+ if (direction === 'downstream' && relationship.from === current) next = relationship.to;
+ else if (direction === 'upstream' && relationship.to === current) next = relationship.from;
+ if (next == null || Object.prototype.hasOwnProperty.call(depths, next)) return;
+ depths[next] = depths[current] + 1;
+ queue.push(next);
+ });
+ }
+ queue.forEach(function (id) { order.push(id); });
+
+ var edgeKeys = [];
+ records.forEach(function (relationship) {
+ if (Object.prototype.hasOwnProperty.call(depths, relationship.from) &&
+ Object.prototype.hasOwnProperty.call(depths, relationship.to)) edgeKeys.push(relationship.key);
+ });
+ var maxDepth = order.reduce(function (maximum, id) {
+ return Math.max(maximum, depths[id]);
+ }, 0);
+ return {
+ direction: direction,
+ originId: originId,
+ nodeIds: order,
+ edgeKeys: edgeKeys,
+ depths: depths,
+ maxDepth: maxDepth
+ };
+ }
+ function reachabilityFor(id, direction) {
+ return computeReachability(id, direction, reachabilityRelationships());
+ }
+ function resetReachabilityButtons() {
+ upstreamBtn.setAttribute('aria-pressed', 'false');
+ downstreamBtn.setAttribute('aria-pressed', 'false');
+ }
+ function clearReachability(options) {
+ options = options || {};
+ reachabilityMode = null;
+ activeReachability = null;
+ svg.removeAttribute('data-reach-active');
+ chip.removeAttribute('data-reach-mode');
+ nodes().forEach(function (node) {
+ node.removeAttribute('data-reach-match');
+ node.removeAttribute('data-reach-origin');
+ node.removeAttribute('data-reach-depth');
+ });
+ edges().forEach(function (edge) {
+ edge.removeAttribute('data-reach-match');
+ edge.removeAttribute('data-reach-depth');
+ });
+ resetReachabilityButtons();
+ reachStatus.textContent = '';
+ reachStatus.hidden = true;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl === true && activeIds.length === 1) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' + encodeURIComponent(activeIds[0]));
+ } catch (_) {}
+ }
+ }
+ function renderReachabilityControls(id) {
+ var upstream = reachabilityFor(id, 'upstream');
+ var downstream = reachabilityFor(id, 'downstream');
+ var upstreamReach = upstream ? Math.max(0, upstream.nodeIds.length - 1) : 0;
+ var downstreamReach = downstream ? Math.max(0, downstream.nodeIds.length - 1) : 0;
+ upstreamCount.textContent = String(upstreamReach);
+ downstreamCount.textContent = String(downstreamReach);
+ upstreamBtn.disabled = upstreamReach === 0;
+ downstreamBtn.disabled = downstreamReach === 0;
+ upstreamBtn.setAttribute('aria-label', upstreamReach
+ ? 'Trace ' + upstreamReach + ' upstream authored node' + (upstreamReach === 1 ? '' : 's')
+ : 'No upstream authored nodes');
+ downstreamBtn.setAttribute('aria-label', downstreamReach
+ ? 'Trace ' + downstreamReach + ' downstream authored node' + (downstreamReach === 1 ? '' : 's')
+ : 'No downstream authored nodes');
+ reachSection.hidden = false;
+ }
+ function applyReachability(direction, options) {
+ options = options || {};
+ if (activeIds.length !== 1 || (direction !== 'upstream' && direction !== 'downstream')) return false;
+ if (reachabilityMode === direction && options.toggle !== false) {
+ clearReachability({ updateUrl: options.updateUrl !== false });
+ return true;
+ }
+ var result = reachabilityFor(activeIds[0], direction);
+ if (!result || result.nodeIds.length <= 1) return false;
+ if (Archify.guidedViews && typeof Archify.guidedViews.showAll === 'function') {
+ Archify.guidedViews.showAll({ clearFocus: false, updateUrl: false, resetView: false });
+ }
+ clearRelationshipPreview({ clearPin: true });
+ clearReachability({ updateUrl: false });
+ reachabilityMode = direction;
+ activeReachability = result;
+ var edgeKeySet = Object.create(null);
+ result.edgeKeys.forEach(function (key) { edgeKeySet[key] = true; });
+ svg.setAttribute('data-reach-active', direction);
+ chip.setAttribute('data-reach-mode', direction);
+ nodes().forEach(function (node) {
+ var id = node.getAttribute('data-node-id');
+ if (!Object.prototype.hasOwnProperty.call(result.depths, id)) return;
+ node.setAttribute('data-reach-match', '');
+ node.setAttribute('data-reach-depth', String(result.depths[id]));
+ if (id === result.originId) node.setAttribute('data-reach-origin', '');
+ });
+ edges().forEach(function (edge) {
+ var key = edge.getAttribute('data-edge-key') || (
+ edge.getAttribute('data-edge-from') + '\u0000' +
+ edge.getAttribute('data-edge-to') + '\u0000' +
+ (edge.getAttribute('data-edge-label') || '')
+ );
+ if (!edgeKeySet[key]) return;
+ edge.setAttribute('data-reach-match', '');
+ var fromDepth = result.depths[edge.getAttribute('data-edge-from')];
+ var toDepth = result.depths[edge.getAttribute('data-edge-to')];
+ edge.setAttribute('data-reach-depth', String(Math.max(fromDepth || 0, toDepth || 0)));
+ });
+ resetReachabilityButtons();
+ var activeButton = direction === 'upstream' ? upstreamBtn : downstreamBtn;
+ activeButton.setAttribute('aria-pressed', 'true');
+ var reachableCount = result.nodeIds.length - 1;
+ var directionLabel = direction === 'upstream' ? 'Upstream' : 'Downstream';
+ reachStatus.textContent = directionLabel + ' · ' + reachableCount + ' node' +
+ (reachableCount === 1 ? '' : 's') + ' · ' + result.edgeKeys.length + ' link' +
+ (result.edgeKeys.length === 1 ? '' : 's') + ' · max ' + result.maxDepth + ' hop' +
+ (result.maxDepth === 1 ? '' : 's');
+ reachStatus.hidden = false;
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncReachShare === 'function') {
+ Archify.exportMenu.syncReachShare();
+ }
+ if (options.updateUrl !== false) {
+ try {
+ history.replaceState(null, '', location.pathname + location.search + '#focus=' +
+ encodeURIComponent(activeIds[0]) + '&reach=' + direction);
+ } catch (_) {}
+ }
+ if (options.reveal !== false && Archify.view && typeof Archify.view.reveal === 'function') {
+ Archify.view.reveal(result.nodeIds, { includeNeighbors: false, reason: 'reachability' });
+ }
+ requestLensPlacement();
+ return true;
+ }
+ function reachabilitySnapshot() {
+ if (!activeReachability || activeIds.length !== 1 ||
+ (reachabilityMode !== 'upstream' && reachabilityMode !== 'downstream') ||
+ activeReachability.direction !== reachabilityMode ||
+ activeReachability.originId !== activeIds[0] ||
+ svg.getAttribute('data-reach-active') !== reachabilityMode) return null;
+
+ var originId = activeReachability.originId;
+ var nodeIds = activeReachability.nodeIds.slice();
+ var edgeKeys = activeReachability.edgeKeys.slice();
+ if (nodeIds.length < 2 || nodeIds[0] !== originId || !edgeKeys.length ||
+ !activeReachability.depths || !Number.isInteger(activeReachability.maxDepth) ||
+ activeReachability.maxDepth < 1) return null;
+
+ var allNodes = nodes();
+ var allEdges = edges();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ var nodeIdSet = Object.create(null);
+ var depths = Object.create(null);
+ var originNode = null;
+ var measuredMaxDepth = 0;
+
+ if (nodeIds.some(function (id) {
+ var depth = activeReachability.depths[id];
+ var matches = allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ });
+ if (typeof id !== 'string' || !id || seenNodeIds[id] || matches.length !== 1 ||
+ !matches[0].hasAttribute('data-reach-match') ||
+ !Number.isInteger(depth) || depth < 0 || depth > activeReachability.maxDepth ||
+ (id === originId
+ ? (!matches[0].hasAttribute('data-reach-origin') || depth !== 0)
+ : depth < 1)) return true;
+ seenNodeIds[id] = true;
+ nodeIdSet[id] = true;
+ depths[id] = depth;
+ measuredMaxDepth = Math.max(measuredMaxDepth, depth);
+ if (id === originId) originNode = matches[0];
+ return false;
+ }) || !originNode || measuredMaxDepth !== activeReachability.maxDepth ||
+ allNodes.filter(function (node) { return node.hasAttribute('data-reach-match'); }).length !== nodeIds.length) return null;
+
+ var edgeRecords = [];
+ if (edgeKeys.some(function (key) {
+ if (typeof key !== 'string' || !key || seenEdgeKeys[key]) return true;
+ var fragments = allEdges.filter(function (edge) {
+ return edge.getAttribute('data-edge-key') === key;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ if (!fragments.length || drawableFragments.length !== 1 ||
+ !fragments.every(function (fragment) { return fragment.hasAttribute('data-reach-match'); })) return true;
+ var first = fragments[0];
+ var from = first.getAttribute('data-edge-from');
+ var to = first.getAttribute('data-edge-to');
+ var id = first.getAttribute('data-edge-id') || '';
+ var labelValue = first.getAttribute('data-edge-label') || '';
+ if (!nodeIdSet[from] || !nodeIdSet[to] || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === from &&
+ fragment.getAttribute('data-edge-to') === to &&
+ (fragment.getAttribute('data-edge-id') || '') === id;
+ })) return true;
+ seenEdgeKeys[key] = true;
+ edgeRecords.push({
+ key: key,
+ id: id,
+ from: from,
+ to: to,
+ label: labelValue,
+ depth: Math.max(depths[from], depths[to])
+ });
+ return false;
+ })) return null;
+
+ var liveEdgeKeys = Object.create(null);
+ if (allEdges.some(function (edge) {
+ if (!edge.hasAttribute('data-reach-match')) return false;
+ var key = edge.getAttribute('data-edge-key');
+ if (!key || !seenEdgeKeys[key]) return true;
+ liveEdgeKeys[key] = true;
+ return false;
+ }) || Object.keys(liveEdgeKeys).length !== edgeKeys.length) return null;
+
+ return {
+ direction: reachabilityMode,
+ origin: { id: originId, label: nodeLabel(originNode, originId) },
+ nodeIds: nodeIds,
+ depths: depths,
+ maxDepth: activeReachability.maxDepth,
+ edges: edgeRecords
+ };
+ }
function setPassportValue(element, value) {
var normalized = value == null ? '' : String(value).trim();
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5816,6 +7128,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6373,6 +7686,7 @@
var counts = { out: 0, in: 0, loop: 0 };
relationships.forEach(function (relationship) { counts[relationship.direction] += 1; });
summary.textContent = counts.out + ' outgoing · ' + counts.in + ' incoming' + (counts.loop ? ' · ' + counts.loop + ' loop' : '');
+ renderReachabilityControls(id);
relationshipList.textContent = '';
if (!relationships.length) {
var empty = document.createElement('p');
@@ -6469,6 +7783,10 @@
}
function clear(options) {
options = options || {};
+ var restoreNode = options.restoreFocus === true && activeIds.length === 1
+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')
+ : null;
+ clearReachability({ updateUrl: false });
if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {
Archify.intentTrace.clear({ announce: false });
}
@@ -6495,7 +7813,16 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
+ reachSection.hidden = true;
+ upstreamCount.textContent = '0';
+ downstreamCount.textContent = '0';
+ upstreamBtn.disabled = true;
+ downstreamBtn.disabled = true;
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
copyBtn.setAttribute('aria-label', 'Copy link to focused node');
@@ -6510,6 +7837,10 @@
if (options.updateUrl !== false) {
try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}
}
+ if (restoreNode) {
+ try { restoreNode.focus({ preventScroll: true }); }
+ catch (_) { try { restoreNode.focus(); } catch (_) {} }
+ }
}
function setMany(ids, options) {
@@ -6605,7 +7936,7 @@
var relationId = record && record.id;
var value = location.href.replace(/#.*$/, '') + (relationId
? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]));
+ : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
: Promise.resolve(fallbackCopy(value));
@@ -6643,8 +7974,10 @@
Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });
}
});
- clearBtn.addEventListener('click', function () { clear(); });
+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });
copyBtn.addEventListener('click', copyFocusLink);
+ upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });
+ downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });
relationsBtn.addEventListener('click', function () {
var expanded = chip.getAttribute('data-relations-expanded') === 'true';
if (expanded) chip.removeAttribute('data-relations-expanded');
@@ -6708,6 +8041,13 @@
event.preventDefault();
buttons[index].focus();
});
+ document.addEventListener('click', function (event) {
+ var target = event.target;
+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;
+ if (container.getAttribute('data-just-panned') === 'true') return;
+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;
+ clear();
+ }, true);
window.addEventListener('scroll', requestLensPlacement, { passive: true });
window.addEventListener('resize', requestLensPlacement);
container.addEventListener('scroll', requestLensPlacement, { passive: true });
@@ -6732,11 +8072,17 @@
var params = new URLSearchParams(location.hash.replace(/^#/, ''));
var relation = params.get('relation');
var initial = params.get('focus');
+ var reach = params.get('reach');
if (relation) {
if (html.getAttribute('data-embed') === 'true' ||
!inspectRelationshipById(relation, { updateUrl: false, toggle: false })) clear({ updateUrl: false });
}
- else if (initial) set(initial, { updateUrl: false, toggle: false });
+ else if (initial) {
+ if (set(initial, { updateUrl: false, toggle: false }) &&
+ (reach === 'upstream' || reach === 'downstream')) {
+ applyReachability(reach, { updateUrl: false, toggle: false, reveal: false });
+ }
+ }
else if (!params.get('view')) clear({ updateUrl: false });
} catch (_) {}
}
@@ -6749,6 +8095,9 @@
setMany: setMany,
clear: clear,
copyLink: copyFocusLink,
+ reach: applyReachability,
+ clearReach: clearReachability,
+ reachabilitySnapshot: reachabilitySnapshot,
inspectRelationship: inspectRelationship,
inspectRelationshipById: inspectRelationshipById,
reposition: requestLensPlacement,
@@ -6756,6 +8105,15 @@
var record = pinnedRelationshipRecord();
return record ? { id: record.id || null, key: record.key, from: record.from, to: record.to, label: record.label } : null;
},
+ reachability: function () {
+ return activeReachability ? {
+ direction: activeReachability.direction,
+ originId: activeReachability.originId,
+ nodeIds: activeReachability.nodeIds.slice(),
+ edgeKeys: activeReachability.edgeKeys.slice(),
+ maxDepth: activeReachability.maxDepth
+ } : null;
+ },
active: function () { return activeIds.length === 0 ? null : (activeIds.length === 1 ? activeIds[0] : activeIds.slice()); }
};
})();
@@ -9516,6 +10874,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9523,8 +10885,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9593,7 +10956,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9605,11 +10972,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9617,7 +10983,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9750,7 +11118,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9758,6 +11126,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9906,6 +11322,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10385,6 +11802,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10655,6 +12073,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11590,7 +13009,7 @@
Archify.intentTrace.clear();
} else if (e.key === 'Escape' && Archify.focus.active()) {
e.preventDefault();
- Archify.focus.clear();
+ Archify.focus.clear({ restoreFocus: true });
} else if (e.key === 'Escape' && Archify.presentation.active()) {
e.preventDefault();
Archify.presentation.exit();
diff --git a/archify/renderers/shared/generated-validators.mjs b/archify/renderers/shared/generated-validators.mjs
index 6d042925..2a6021a2 100644
--- a/archify/renderers/shared/generated-validators.mjs
+++ b/archify/renderers/shared/generated-validators.mjs
@@ -1,5 +1,5 @@
// Generated by scripts/generate-validators.mjs. Do not edit by hand.
-"use strict";export const workflow = validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/workflow.schema.json","title":"Archify Workflow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","nodes","edges"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"workflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":700},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"variant":{"enum":["normal","exception"]}}}},"phases":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","label","fromCol","toCol"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"fromCol":{"type":"integer","minimum":0,"maximum":5},"toCol":{"type":"integer","minimum":0,"maximum":5},"variant":{"enum":["default","emphasis","security","dashed"]}}}},"groups":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","label","lane","fromCol","toCol"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"lane":{"$ref":"common.schema.json#/$defs/id"},"fromCol":{"type":"integer","minimum":0,"maximum":5},"toCol":{"type":"integer","minimum":0,"maximum":5},"variant":{"enum":["default","emphasis","security","dashed"]}}}},"mainPath":{"type":"array","minItems":2,"items":{"$ref":"common.schema.json#/$defs/id"}},"nodes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","lane","col","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":5},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"width":{"type":"number","minimum":32},"height":{"type":"number","minimum":32},"yOffset":{"type":"number"}}}},"edges":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"role":{"enum":["main","branch","async","return","error"]},"fromSide":{"$ref":"#/$defs/side"},"toSide":{"$ref":"#/$defs/side"},"route":{"enum":["auto","straight","drop","outside-right","return-left","bottom-channel","up-channel"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"channelX":{"type":"number"},"channelY":{"type":"number"},"bias":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}},"$defs":{"side":{"enum":["left","right","top","bottom"]}}};const schema34 = {"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]*$"};const schema43 = {"enum":["frontend","backend","database","cloud","security","messagebus","external"]};const schema47 = {"enum":["default","emphasis","security","dashed"]};const schema48 = {"enum":["left","right","top","bottom"]};const schema50 = {"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2};const schema52 = {"type":"array","items":{"type":"object","additionalProperties":false,"required":["dot","title","items"],"properties":{"dot":{"enum":["cyan","emerald","violet","amber","rose","orange","slate"]},"title":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"string"}}}}};const func1 = Object.prototype.hasOwnProperty;const func2 = function ucs2length(str) {
+"use strict";export const workflow = validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/workflow.schema.json","title":"Archify Workflow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","nodes","edges"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"workflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint","editorial"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":700},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"variant":{"enum":["normal","exception"]}}}},"phases":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","label","fromCol","toCol"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"fromCol":{"type":"integer","minimum":0,"maximum":5},"toCol":{"type":"integer","minimum":0,"maximum":5},"variant":{"enum":["default","emphasis","security","dashed"]}}}},"groups":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","label","lane","fromCol","toCol"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"lane":{"$ref":"common.schema.json#/$defs/id"},"fromCol":{"type":"integer","minimum":0,"maximum":5},"toCol":{"type":"integer","minimum":0,"maximum":5},"variant":{"enum":["default","emphasis","security","dashed"]}}}},"mainPath":{"type":"array","minItems":2,"items":{"$ref":"common.schema.json#/$defs/id"}},"nodes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","lane","col","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":5},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"width":{"type":"number","minimum":32},"height":{"type":"number","minimum":32},"yOffset":{"type":"number"}}}},"edges":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"role":{"enum":["main","branch","async","return","error"]},"fromSide":{"$ref":"#/$defs/side"},"toSide":{"$ref":"#/$defs/side"},"route":{"enum":["auto","straight","drop","outside-right","return-left","bottom-channel","up-channel"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"channelX":{"type":"number"},"channelY":{"type":"number"},"bias":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}},"$defs":{"side":{"enum":["left","right","top","bottom"]}}};const schema34 = {"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_-]*$"};const schema43 = {"enum":["frontend","backend","database","cloud","security","messagebus","external"]};const schema47 = {"enum":["default","emphasis","security","dashed"]};const schema48 = {"enum":["left","right","top","bottom"]};const schema50 = {"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2};const schema52 = {"type":"array","items":{"type":"object","additionalProperties":false,"required":["dot","title","items"],"properties":{"dot":{"enum":["cyan","emerald","violet","amber","rose","orange","slate"]},"title":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"string"}}}}};const func1 = Object.prototype.hasOwnProperty;const func2 = function ucs2length(str) {
const len = str.length;
let length = 0;
let pos = 0;
@@ -10,4 +10,4 @@
&& (str.charCodeAt(pos) & 0xfc00) === 0xdc00) pos += 1;
}
return length;
-};const schema33 = {"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["id","label","focus"],"properties":{"id":{"$ref":"#/$defs/id"},"label":{"type":"string","minLength":1,"maxLength":48},"focus":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/id"}},"note":{"type":"string","maxLength":140}}}};const pattern4 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/workflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.edges === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "edges"},message:"must have required property '"+"edges"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(func1.call(schema31.properties, key0))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("workflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "workflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate22(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 700 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 700},message:"must be >= 700"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 240 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length < 1){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err28 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(((key2 === "id") || (key2 === "label")) || (key2 === "variant"))){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err33 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data14.variant !== undefined){let data17 = data14.variant;if(!((data17 === "normal") || (data17 === "exception"))){const err35 = {instancePath:instancePath+"/lanes/" + i0+"/variant",schemaPath:"#/properties/lanes/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.lanes.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.phases !== undefined){let data18 = data.phases;if(Array.isArray(data18)){const len3 = data18.length;for(let i1=0; i1<len3; i1++){let data19 = data18[i1];if(data19 && typeof data19 == "object" && !Array.isArray(data19)){if(data19.id === undefined){const err38 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data19.label === undefined){const err39 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data19.fromCol === undefined){const err40 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data19.toCol === undefined){const err41 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data19){if(!(((((key3 === "id") || (key3 === "label")) || (key3 === "fromCol")) || (key3 === "toCol")) || (key3 === "variant"))){const err42 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data19.id !== undefined){let data20 = data19.id;if(typeof data20 === "string"){if(!pattern4.test(data20)){const err43 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data19.label !== undefined){let data21 = data19.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err45 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data19.fromCol !== undefined){let data22 = data19.fromCol;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err47 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 5 || isNaN(data22)){const err48 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data22 < 0 || isNaN(data22)){const err49 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}if(data19.toCol !== undefined){let data23 = data19.toCol;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err50 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 > 5 || isNaN(data23)){const err51 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data23 < 0 || isNaN(data23)){const err52 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data19.variant !== undefined){let data24 = data19.variant;if(!((((data24 === "default") || (data24 === "emphasis")) || (data24 === "security")) || (data24 === "dashed"))){const err53 = {instancePath:instancePath+"/phases/" + i1+"/variant",schemaPath:"#/properties/phases/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.phases.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath:instancePath+"/phases",schemaPath:"#/properties/phases/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data.groups !== undefined){let data25 = data.groups;if(Array.isArray(data25)){const len4 = data25.length;for(let i2=0; i2<len4; i2++){let data26 = data25[i2];if(data26 && typeof data26 == "object" && !Array.isArray(data26)){if(data26.id === undefined){const err56 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26.label === undefined){const err57 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data26.lane === undefined){const err58 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data26.fromCol === undefined){const err59 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data26.toCol === undefined){const err60 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}for(const key4 in data26){if(!((((((key4 === "id") || (key4 === "label")) || (key4 === "lane")) || (key4 === "fromCol")) || (key4 === "toCol")) || (key4 === "variant"))){const err61 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data26.id !== undefined){let data27 = data26.id;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err62 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data26.label !== undefined){let data28 = data26.label;if(typeof data28 === "string"){if(func2(data28) < 1){const err64 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data26.lane !== undefined){let data29 = data26.lane;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err66 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data26.fromCol !== undefined){let data30 = data26.fromCol;if(!(((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err68 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data30 == "number") && (isFinite(data30))){if(data30 > 5 || isNaN(data30)){const err69 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data30 < 0 || isNaN(data30)){const err70 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}if(data26.toCol !== undefined){let data31 = data26.toCol;if(!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))){const err71 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if((typeof data31 == "number") && (isFinite(data31))){if(data31 > 5 || isNaN(data31)){const err72 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data31 < 0 || isNaN(data31)){const err73 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}if(data26.variant !== undefined){let data32 = data26.variant;if(!((((data32 === "default") || (data32 === "emphasis")) || (data32 === "security")) || (data32 === "dashed"))){const err74 = {instancePath:instancePath+"/groups/" + i2+"/variant",schemaPath:"#/properties/groups/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.groups.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}}else {const err75 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}else {const err76 = {instancePath:instancePath+"/groups",schemaPath:"#/properties/groups/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.mainPath !== undefined){let data33 = data.mainPath;if(Array.isArray(data33)){if(data33.length < 2){const err77 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(typeof data34 === "string"){if(!pattern4.test(data34)){const err78 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}else {const err79 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}}else {const err80 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data.nodes !== undefined){let data35 = data.nodes;if(Array.isArray(data35)){if(data35.length < 1){const err81 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}const len6 = data35.length;for(let i4=0; i4<len6; i4++){let data36 = data35[i4];if(data36 && typeof data36 == "object" && !Array.isArray(data36)){if(data36.id === undefined){const err82 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data36.lane === undefined){const err83 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data36.col === undefined){const err84 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data36.type === undefined){const err85 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data36.label === undefined){const err86 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}for(const key5 in data36){if(!(func1.call(schema31.properties.nodes.items.properties, key5))){const err87 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}if(data36.id !== undefined){let data37 = data36.id;if(typeof data37 === "string"){if(!pattern4.test(data37)){const err88 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data36.lane !== undefined){let data38 = data36.lane;if(typeof data38 === "string"){if(!pattern4.test(data38)){const err90 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}else {const err91 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data36.col !== undefined){let data39 = data36.col;if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err92 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data39 == "number") && (isFinite(data39))){if(data39 > 5 || isNaN(data39)){const err93 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data39 < 0 || isNaN(data39)){const err94 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}if(data36.type !== undefined){let data40 = data36.type;if(!(((((((data40 === "frontend") || (data40 === "backend")) || (data40 === "database")) || (data40 === "cloud")) || (data40 === "security")) || (data40 === "messagebus")) || (data40 === "external"))){const err95 = {instancePath:instancePath+"/nodes/" + i4+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data36.label !== undefined){let data41 = data36.label;if(typeof data41 === "string"){if(func2(data41) < 1){const err96 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data36.sublabel !== undefined){if(typeof data36.sublabel !== "string"){const err98 = {instancePath:instancePath+"/nodes/" + i4+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}if(data36.tag !== undefined){if(typeof data36.tag !== "string"){const err99 = {instancePath:instancePath+"/nodes/" + i4+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data36.width !== undefined){let data44 = data36.width;if((typeof data44 == "number") && (isFinite(data44))){if(data44 < 32 || isNaN(data44)){const err100 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}else {const err101 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data36.height !== undefined){let data45 = data36.height;if((typeof data45 == "number") && (isFinite(data45))){if(data45 < 32 || isNaN(data45)){const err102 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}else {const err103 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data36.yOffset !== undefined){let data46 = data36.yOffset;if(!((typeof data46 == "number") && (isFinite(data46)))){const err104 = {instancePath:instancePath+"/nodes/" + i4+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}}else {const err105 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}}else {const err106 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.edges !== undefined){let data47 = data.edges;if(Array.isArray(data47)){const len7 = data47.length;for(let i5=0; i5<len7; i5++){let data48 = data47[i5];if(data48 && typeof data48 == "object" && !Array.isArray(data48)){if(data48.from === undefined){const err107 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data48.to === undefined){const err108 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key6 in data48){if(!(func1.call(schema31.properties.edges.items.properties, key6))){const err109 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data48.id !== undefined){let data49 = data48.id;if(typeof data49 === "string"){if(!pattern4.test(data49)){const err110 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data48.from !== undefined){let data50 = data48.from;if(typeof data50 === "string"){if(!pattern4.test(data50)){const err112 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}else {const err113 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data48.to !== undefined){let data51 = data48.to;if(typeof data51 === "string"){if(!pattern4.test(data51)){const err114 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}if(data48.label !== undefined){if(typeof data48.label !== "string"){const err116 = {instancePath:instancePath+"/edges/" + i5+"/label",schemaPath:"#/properties/edges/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(data48.variant !== undefined){let data53 = data48.variant;if(!((((data53 === "default") || (data53 === "emphasis")) || (data53 === "security")) || (data53 === "dashed"))){const err117 = {instancePath:instancePath+"/edges/" + i5+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data48.role !== undefined){let data54 = data48.role;if(!(((((data54 === "main") || (data54 === "branch")) || (data54 === "async")) || (data54 === "return")) || (data54 === "error"))){const err118 = {instancePath:instancePath+"/edges/" + i5+"/role",schemaPath:"#/properties/edges/items/properties/role/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.role.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}if(data48.fromSide !== undefined){let data55 = data48.fromSide;if(!((((data55 === "left") || (data55 === "right")) || (data55 === "top")) || (data55 === "bottom"))){const err119 = {instancePath:instancePath+"/edges/" + i5+"/fromSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data48.toSide !== undefined){let data56 = data48.toSide;if(!((((data56 === "left") || (data56 === "right")) || (data56 === "top")) || (data56 === "bottom"))){const err120 = {instancePath:instancePath+"/edges/" + i5+"/toSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data48.route !== undefined){let data57 = data48.route;if(!(((((((data57 === "auto") || (data57 === "straight")) || (data57 === "drop")) || (data57 === "outside-right")) || (data57 === "return-left")) || (data57 === "bottom-channel")) || (data57 === "up-channel"))){const err121 = {instancePath:instancePath+"/edges/" + i5+"/route",schemaPath:"#/properties/edges/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data48.via !== undefined){let data58 = data48.via;if(Array.isArray(data58)){const len8 = data58.length;for(let i6=0; i6<len8; i6++){let data59 = data58[i6];if(Array.isArray(data59)){if(data59.length > 2){const err122 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data59.length < 2){const err123 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}const len9 = data59.length;if(len9 > 0){let data60 = data59[0];if(!((typeof data60 == "number") && (isFinite(data60)))){const err124 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(len9 > 1){let data61 = data59[1];if(!((typeof data61 == "number") && (isFinite(data61)))){const err125 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}const len10 = data59.length;if(!(len10 <= 2)){const err126 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}else {const err127 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}}else {const err128 = {instancePath:instancePath+"/edges/" + i5+"/via",schemaPath:"#/properties/edges/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data48.labelAt !== undefined){let data62 = data48.labelAt;if(Array.isArray(data62)){if(data62.length > 2){const err129 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data62.length < 2){const err130 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}const len11 = data62.length;if(len11 > 0){let data63 = data62[0];if(!((typeof data63 == "number") && (isFinite(data63)))){const err131 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(len11 > 1){let data64 = data62[1];if(!((typeof data64 == "number") && (isFinite(data64)))){const err132 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}const len12 = data62.length;if(!(len12 <= 2)){const err133 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data48.labelDx !== undefined){let data65 = data48.labelDx;if(!((typeof data65 == "number") && (isFinite(data65)))){const err135 = {instancePath:instancePath+"/edges/" + i5+"/labelDx",schemaPath:"#/properties/edges/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data48.labelDy !== undefined){let data66 = data48.labelDy;if(!((typeof data66 == "number") && (isFinite(data66)))){const err136 = {instancePath:instancePath+"/edges/" + i5+"/labelDy",schemaPath:"#/properties/edges/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}if(data48.labelSegment !== undefined){let data67 = data48.labelSegment;if(!(((typeof data67 == "number") && (!(data67 % 1) && !isNaN(data67))) && (isFinite(data67)))){const err137 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}if((typeof data67 == "number") && (isFinite(data67))){if(data67 < 0 || isNaN(data67)){const err138 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}}if(data48.channelX !== undefined){let data68 = data48.channelX;if(!((typeof data68 == "number") && (isFinite(data68)))){const err139 = {instancePath:instancePath+"/edges/" + i5+"/channelX",schemaPath:"#/properties/edges/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}if(data48.channelY !== undefined){let data69 = data48.channelY;if(!((typeof data69 == "number") && (isFinite(data69)))){const err140 = {instancePath:instancePath+"/edges/" + i5+"/channelY",schemaPath:"#/properties/edges/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data48.bias !== undefined){let data70 = data48.bias;if((typeof data70 == "number") && (isFinite(data70))){if(data70 > 1 || isNaN(data70)){const err141 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}if(data70 < 0 || isNaN(data70)){const err142 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}else {const err143 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}if(data48.width !== undefined){let data71 = data48.width;if((typeof data71 == "number") && (isFinite(data71))){if(data71 < 0.5 || isNaN(data71)){const err144 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}else {const err145 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}}else {const err146 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+"/edges",schemaPath:"#/properties/edges/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.cards !== undefined){let data72 = data.cards;if(Array.isArray(data72)){const len13 = data72.length;for(let i7=0; i7<len13; i7++){let data73 = data72[i7];if(data73 && typeof data73 == "object" && !Array.isArray(data73)){if(data73.dot === undefined){const err148 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}if(data73.title === undefined){const err149 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}if(data73.items === undefined){const err150 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}for(const key7 in data73){if(!(((key7 === "dot") || (key7 === "title")) || (key7 === "items"))){const err151 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}if(data73.dot !== undefined){let data74 = data73.dot;if(!(((((((data74 === "cyan") || (data74 === "emerald")) || (data74 === "violet")) || (data74 === "amber")) || (data74 === "rose")) || (data74 === "orange")) || (data74 === "slate"))){const err152 = {instancePath:instancePath+"/cards/" + i7+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data73.title !== undefined){let data75 = data73.title;if(typeof data75 === "string"){if(func2(data75) < 1){const err153 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}else {const err154 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}if(data73.items !== undefined){let data76 = data73.items;if(Array.isArray(data76)){const len14 = data76.length;for(let i8=0; i8<len14; i8++){if(typeof data76[i8] !== "string"){const err155 = {instancePath:instancePath+"/cards/" + i7+"/items/" + i8,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}}else {const err156 = {instancePath:instancePath+"/cards/" + i7+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}}else {const err157 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}}else {const err158 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}}else {const err159 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const sequence = validate24;const schema53 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/sequence.schema.json","title":"Archify Sequence Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","participants","messages"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"sequence"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":480},{"type":"number","minimum":480}],"items":false,"minItems":2,"maxItems":2}}},"participants":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"}}}},"segments":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"from":{"type":"number"},"to":{"type":"number"},"label":{"type":"string","minLength":1}}}},"messages":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["from","to","y","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"y":{"type":"number","minimum":160},"label":{"type":"string","minLength":1},"variant":{"enum":["default","emphasis","security","dashed","return"]},"note":{"type":"string"}}}},"activations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["participant","from","to"],"properties":{"participant":{"$ref":"common.schema.json#/$defs/id"},"from":{"type":"number"},"to":{"type":"number"},"type":{"$ref":"common.schema.json#/$defs/componentType"}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/sequence.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.participants === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "participants"},message:"must have required property '"+"participants"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.messages === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "messages"},message:"must have required property '"+"messages"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "participants")) || (key0 === "segments")) || (key0 === "messages")) || (key0 === "activations")) || (key0 === "cards"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err6 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.diagram_type !== undefined){if("sequence" !== data.diagram_type){const err7 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "sequence"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err12 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err13 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err14 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err15 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err16 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.views !== undefined){if(!(validate25(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err17 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.length < 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 480 || isNaN(data11)){const err19 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 480 || isNaN(data12)){const err21 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err23 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.participants !== undefined){let data13 = data.participants;if(Array.isArray(data13)){if(data13.length < 2){const err26 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err27 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data14.type === undefined){const err28 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!((((key2 === "id") || (key2 === "type")) || (key2 === "label")) || (key2 === "sublabel"))){const err30 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.type !== undefined){let data16 = data14.type;if(!(((((((data16 === "frontend") || (data16 === "backend")) || (data16 === "database")) || (data16 === "cloud")) || (data16 === "security")) || (data16 === "messagebus")) || (data16 === "external"))){const err33 = {instancePath:instancePath+"/participants/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data17 = data14.label;if(typeof data17 === "string"){if(func2(data17) < 1){const err34 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data14.sublabel !== undefined){if(typeof data14.sublabel !== "string"){const err36 = {instancePath:instancePath+"/participants/" + i0+"/sublabel",schemaPath:"#/properties/participants/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.segments !== undefined){let data19 = data.segments;if(Array.isArray(data19)){const len3 = data19.length;for(let i1=0; i1<len3; i1++){let data20 = data19[i1];if(data20 && typeof data20 == "object" && !Array.isArray(data20)){if(data20.from === undefined){const err39 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data20.to === undefined){const err40 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data20.label === undefined){const err41 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data20){if(!(((key3 === "from") || (key3 === "to")) || (key3 === "label"))){const err42 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data20.from !== undefined){let data21 = data20.from;if(!((typeof data21 == "number") && (isFinite(data21)))){const err43 = {instancePath:instancePath+"/segments/" + i1+"/from",schemaPath:"#/properties/segments/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data20.to !== undefined){let data22 = data20.to;if(!((typeof data22 == "number") && (isFinite(data22)))){const err44 = {instancePath:instancePath+"/segments/" + i1+"/to",schemaPath:"#/properties/segments/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data20.label !== undefined){let data23 = data20.label;if(typeof data23 === "string"){if(func2(data23) < 1){const err45 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}else {const err47 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/segments",schemaPath:"#/properties/segments/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data.messages !== undefined){let data24 = data.messages;if(Array.isArray(data24)){if(data24.length < 1){const err49 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}const len4 = data24.length;for(let i2=0; i2<len4; i2++){let data25 = data24[i2];if(data25 && typeof data25 == "object" && !Array.isArray(data25)){if(data25.from === undefined){const err50 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data25.to === undefined){const err51 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data25.y === undefined){const err52 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data25.label === undefined){const err53 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key4 in data25){if(!(((((((key4 === "id") || (key4 === "from")) || (key4 === "to")) || (key4 === "y")) || (key4 === "label")) || (key4 === "variant")) || (key4 === "note"))){const err54 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data25.id !== undefined){let data26 = data25.id;if(typeof data26 === "string"){if(!pattern4.test(data26)){const err55 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data25.from !== undefined){let data27 = data25.from;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err57 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data25.to !== undefined){let data28 = data25.to;if(typeof data28 === "string"){if(!pattern4.test(data28)){const err59 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data25.y !== undefined){let data29 = data25.y;if((typeof data29 == "number") && (isFinite(data29))){if(data29 < 160 || isNaN(data29)){const err61 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 160},message:"must be >= 160"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}else {const err62 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data25.label !== undefined){let data30 = data25.label;if(typeof data30 === "string"){if(func2(data30) < 1){const err63 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data25.variant !== undefined){let data31 = data25.variant;if(!(((((data31 === "default") || (data31 === "emphasis")) || (data31 === "security")) || (data31 === "dashed")) || (data31 === "return"))){const err65 = {instancePath:instancePath+"/messages/" + i2+"/variant",schemaPath:"#/properties/messages/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema53.properties.messages.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data25.note !== undefined){if(typeof data25.note !== "string"){const err66 = {instancePath:instancePath+"/messages/" + i2+"/note",schemaPath:"#/properties/messages/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}}else {const err67 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}}else {const err68 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.activations !== undefined){let data33 = data.activations;if(Array.isArray(data33)){const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(data34.participant === undefined){const err69 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "participant"},message:"must have required property '"+"participant"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data34.from === undefined){const err70 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if(data34.to === undefined){const err71 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}for(const key5 in data34){if(!((((key5 === "participant") || (key5 === "from")) || (key5 === "to")) || (key5 === "type"))){const err72 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data34.participant !== undefined){let data35 = data34.participant;if(typeof data35 === "string"){if(!pattern4.test(data35)){const err73 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data34.from !== undefined){let data36 = data34.from;if(!((typeof data36 == "number") && (isFinite(data36)))){const err75 = {instancePath:instancePath+"/activations/" + i3+"/from",schemaPath:"#/properties/activations/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data34.to !== undefined){let data37 = data34.to;if(!((typeof data37 == "number") && (isFinite(data37)))){const err76 = {instancePath:instancePath+"/activations/" + i3+"/to",schemaPath:"#/properties/activations/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data34.type !== undefined){let data38 = data34.type;if(!(((((((data38 === "frontend") || (data38 === "backend")) || (data38 === "database")) || (data38 === "cloud")) || (data38 === "security")) || (data38 === "messagebus")) || (data38 === "external"))){const err77 = {instancePath:instancePath+"/activations/" + i3+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}else {const err78 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}else {const err79 = {instancePath:instancePath+"/activations",schemaPath:"#/properties/activations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data.cards !== undefined){let data39 = data.cards;if(Array.isArray(data39)){const len6 = data39.length;for(let i4=0; i4<len6; i4++){let data40 = data39[i4];if(data40 && typeof data40 == "object" && !Array.isArray(data40)){if(data40.dot === undefined){const err80 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data40.title === undefined){const err81 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data40.items === undefined){const err82 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}for(const key6 in data40){if(!(((key6 === "dot") || (key6 === "title")) || (key6 === "items"))){const err83 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data40.dot !== undefined){let data41 = data40.dot;if(!(((((((data41 === "cyan") || (data41 === "emerald")) || (data41 === "violet")) || (data41 === "amber")) || (data41 === "rose")) || (data41 === "orange")) || (data41 === "slate"))){const err84 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data40.title !== undefined){let data42 = data40.title;if(typeof data42 === "string"){if(func2(data42) < 1){const err85 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}else {const err86 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data40.items !== undefined){let data43 = data40.items;if(Array.isArray(data43)){const len7 = data43.length;for(let i5=0; i5<len7; i5++){if(typeof data43[i5] !== "string"){const err87 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}else {const err88 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}else {const err89 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}}else {const err90 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const dataflow = validate27;const schema65 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/dataflow.schema.json","title":"Archify Data Flow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","stages","nodes","flows"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"dataflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":360},{"type":"number","minimum":360}],"items":false,"minItems":2,"maxItems":2}}},"stages":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1}}}},"nodes":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","stage","row"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"stage":{"type":"integer","minimum":0},"row":{"type":"integer","minimum":0},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"flows":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"classification":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","vertical-channel","bottom-channel","top-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/dataflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.stages === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "stages"},message:"must have required property '"+"stages"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.flows === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "flows"},message:"must have required property '"+"flows"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "stages")) || (key0 === "nodes")) || (key0 === "flows")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("dataflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "dataflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate28(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 360 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 360 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.stages !== undefined){let data13 = data.stages;if(Array.isArray(data13)){if(data13.length > 5){const err27 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 2){const err28 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.label === undefined){const err29 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(key2 === "label")){const err30 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.label !== undefined){let data15 = data14.label;if(typeof data15 === "string"){if(func2(data15) < 1){const err31 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.nodes !== undefined){let data16 = data.nodes;if(Array.isArray(data16)){if(data16.length < 2){const err35 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}const len3 = data16.length;for(let i1=0; i1<len3; i1++){let data17 = data16[i1];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.id === undefined){const err36 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data17.type === undefined){const err37 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data17.label === undefined){const err38 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data17.stage === undefined){const err39 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "stage"},message:"must have required property '"+"stage"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data17.row === undefined){const err40 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "row"},message:"must have required property '"+"row"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}for(const key3 in data17){if(!(func1.call(schema65.properties.nodes.items.properties, key3))){const err41 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data17.id !== undefined){let data18 = data17.id;if(typeof data18 === "string"){if(!pattern4.test(data18)){const err42 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else {const err43 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data17.type !== undefined){let data19 = data17.type;if(!(((((((data19 === "frontend") || (data19 === "backend")) || (data19 === "database")) || (data19 === "cloud")) || (data19 === "security")) || (data19 === "messagebus")) || (data19 === "external"))){const err44 = {instancePath:instancePath+"/nodes/" + i1+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data17.label !== undefined){let data20 = data17.label;if(typeof data20 === "string"){if(func2(data20) < 1){const err45 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data17.sublabel !== undefined){if(typeof data17.sublabel !== "string"){const err47 = {instancePath:instancePath+"/nodes/" + i1+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.tag !== undefined){if(typeof data17.tag !== "string"){const err48 = {instancePath:instancePath+"/nodes/" + i1+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data17.stage !== undefined){let data23 = data17.stage;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err49 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err50 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}}if(data17.row !== undefined){let data24 = data17.row;if(!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))){const err51 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err52 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data17.width !== undefined){let data25 = data17.width;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 48 || isNaN(data25)){const err53 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data17.height !== undefined){let data26 = data17.height;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 36 || isNaN(data26)){const err55 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data17.yOffset !== undefined){let data27 = data17.yOffset;if(!((typeof data27 == "number") && (isFinite(data27)))){const err57 = {instancePath:instancePath+"/nodes/" + i1+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}else {const err58 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}else {const err59 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.flows !== undefined){let data28 = data.flows;if(Array.isArray(data28)){const len4 = data28.length;for(let i2=0; i2<len4; i2++){let data29 = data28[i2];if(data29 && typeof data29 == "object" && !Array.isArray(data29)){if(data29.from === undefined){const err60 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data29.to === undefined){const err61 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data29.label === undefined){const err62 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key4 in data29){if(!(func1.call(schema65.properties.flows.items.properties, key4))){const err63 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data29.id !== undefined){let data30 = data29.id;if(typeof data30 === "string"){if(!pattern4.test(data30)){const err64 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data29.from !== undefined){let data31 = data29.from;if(typeof data31 === "string"){if(!pattern4.test(data31)){const err66 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data29.to !== undefined){let data32 = data29.to;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data29.label !== undefined){let data33 = data29.label;if(typeof data33 === "string"){if(func2(data33) < 1){const err70 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data29.classification !== undefined){if(typeof data29.classification !== "string"){const err72 = {instancePath:instancePath+"/flows/" + i2+"/classification",schemaPath:"#/properties/flows/items/properties/classification/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data29.variant !== undefined){let data35 = data29.variant;if(!((((data35 === "default") || (data35 === "emphasis")) || (data35 === "security")) || (data35 === "dashed"))){const err73 = {instancePath:instancePath+"/flows/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data29.route !== undefined){let data36 = data29.route;if(!(((((data36 === "auto") || (data36 === "straight")) || (data36 === "vertical-channel")) || (data36 === "bottom-channel")) || (data36 === "top-channel"))){const err74 = {instancePath:instancePath+"/flows/" + i2+"/route",schemaPath:"#/properties/flows/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data29.fromSide !== undefined){let data37 = data29.fromSide;if(!((((data37 === "left") || (data37 === "right")) || (data37 === "top")) || (data37 === "bottom"))){const err75 = {instancePath:instancePath+"/flows/" + i2+"/fromSide",schemaPath:"#/properties/flows/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data29.toSide !== undefined){let data38 = data29.toSide;if(!((((data38 === "left") || (data38 === "right")) || (data38 === "top")) || (data38 === "bottom"))){const err76 = {instancePath:instancePath+"/flows/" + i2+"/toSide",schemaPath:"#/properties/flows/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data29.channelX !== undefined){let data39 = data29.channelX;if(!((typeof data39 == "number") && (isFinite(data39)))){const err77 = {instancePath:instancePath+"/flows/" + i2+"/channelX",schemaPath:"#/properties/flows/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data29.channelY !== undefined){let data40 = data29.channelY;if(!((typeof data40 == "number") && (isFinite(data40)))){const err78 = {instancePath:instancePath+"/flows/" + i2+"/channelY",schemaPath:"#/properties/flows/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data29.labelAt !== undefined){let data41 = data29.labelAt;if(Array.isArray(data41)){if(data41.length > 2){const err79 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data41.length < 2){const err80 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}const len5 = data41.length;if(len5 > 0){let data42 = data41[0];if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(len5 > 1){let data43 = data41[1];if(!((typeof data43 == "number") && (isFinite(data43)))){const err82 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}const len6 = data41.length;if(!(len6 <= 2)){const err83 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}else {const err84 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data29.labelDx !== undefined){let data44 = data29.labelDx;if(!((typeof data44 == "number") && (isFinite(data44)))){const err85 = {instancePath:instancePath+"/flows/" + i2+"/labelDx",schemaPath:"#/properties/flows/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data29.labelDy !== undefined){let data45 = data29.labelDy;if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/flows/" + i2+"/labelDy",schemaPath:"#/properties/flows/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data29.labelSegment !== undefined){let data46 = data29.labelSegment;if(!(((typeof data46 == "number") && (!(data46 % 1) && !isNaN(data46))) && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if((typeof data46 == "number") && (isFinite(data46))){if(data46 < 0 || isNaN(data46)){const err88 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}if(data29.via !== undefined){let data47 = data29.via;if(Array.isArray(data47)){const len7 = data47.length;for(let i3=0; i3<len7; i3++){let data48 = data47[i3];if(Array.isArray(data48)){if(data48.length > 2){const err89 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data48.length < 2){const err90 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}const len8 = data48.length;if(len8 > 0){let data49 = data48[0];if(!((typeof data49 == "number") && (isFinite(data49)))){const err91 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(len8 > 1){let data50 = data48[1];if(!((typeof data50 == "number") && (isFinite(data50)))){const err92 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}const len9 = data48.length;if(!(len9 <= 2)){const err93 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}else {const err94 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}else {const err95 = {instancePath:instancePath+"/flows/" + i2+"/via",schemaPath:"#/properties/flows/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data29.width !== undefined){let data51 = data29.width;if((typeof data51 == "number") && (isFinite(data51))){if(data51 < 0.5 || isNaN(data51)){const err96 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}}else {const err98 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}else {const err99 = {instancePath:instancePath+"/flows",schemaPath:"#/properties/flows/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data.cards !== undefined){let data52 = data.cards;if(Array.isArray(data52)){const len10 = data52.length;for(let i4=0; i4<len10; i4++){let data53 = data52[i4];if(data53 && typeof data53 == "object" && !Array.isArray(data53)){if(data53.dot === undefined){const err100 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data53.title === undefined){const err101 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}if(data53.items === undefined){const err102 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}for(const key5 in data53){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err103 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data53.dot !== undefined){let data54 = data53.dot;if(!(((((((data54 === "cyan") || (data54 === "emerald")) || (data54 === "violet")) || (data54 === "amber")) || (data54 === "rose")) || (data54 === "orange")) || (data54 === "slate"))){const err104 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data53.title !== undefined){let data55 = data53.title;if(typeof data55 === "string"){if(func2(data55) < 1){const err105 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}else {const err106 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data53.items !== undefined){let data56 = data53.items;if(Array.isArray(data56)){const len11 = data56.length;for(let i5=0; i5<len11; i5++){if(typeof data56[i5] !== "string"){const err107 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}}else {const err108 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}}else {const err109 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}}else {const err110 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const lifecycle = validate30;const schema78 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json","title":"Archify Lifecycle Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","states","transitions"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"lifecycle"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":420},{"type":"number","minimum":566}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1}}}},"states":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","lane","col"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"enum":["start","active","waiting","decision","success","failure","neutral","external"]},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"step":{"type":"string"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":4},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"transitions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"note":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","drop","bottom-channel","top-channel","right-channel","left-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"cornerRadius":{"type":"number","minimum":0},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate31.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate31.errors = vErrors;return errors === 0;}validate31.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.states === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "states"},message:"must have required property '"+"states"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.transitions === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transitions"},message:"must have required property '"+"transitions"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "lanes")) || (key0 === "states")) || (key0 === "transitions")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("lifecycle" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "lifecycle"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate31(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 420 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 420},message:"must be >= 420"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 566 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 566},message:"must be >= 566"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length > 4){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 1){const err28 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data14.label === undefined){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}for(const key2 in data14){if(!((key2 === "id") || (key2 === "label"))){const err31 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.states !== undefined){let data17 = data.states;if(Array.isArray(data17)){if(data17.length < 2){const err38 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len3 = data17.length;for(let i1=0; i1<len3; i1++){let data18 = data17[i1];if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.id === undefined){const err39 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data18.type === undefined){const err40 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data18.label === undefined){const err41 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data18.lane === undefined){const err42 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data18.col === undefined){const err43 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key3 in data18){if(!(func1.call(schema78.properties.states.items.properties, key3))){const err44 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data18.id !== undefined){let data19 = data18.id;if(typeof data19 === "string"){if(!pattern4.test(data19)){const err45 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data18.type !== undefined){let data20 = data18.type;if(!((((((((data20 === "start") || (data20 === "active")) || (data20 === "waiting")) || (data20 === "decision")) || (data20 === "success")) || (data20 === "failure")) || (data20 === "neutral")) || (data20 === "external"))){const err47 = {instancePath:instancePath+"/states/" + i1+"/type",schemaPath:"#/properties/states/items/properties/type/enum",keyword:"enum",params:{allowedValues: schema78.properties.states.items.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data18.label !== undefined){let data21 = data18.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err48 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data18.sublabel !== undefined){if(typeof data18.sublabel !== "string"){const err50 = {instancePath:instancePath+"/states/" + i1+"/sublabel",schemaPath:"#/properties/states/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data18.tag !== undefined){if(typeof data18.tag !== "string"){const err51 = {instancePath:instancePath+"/states/" + i1+"/tag",schemaPath:"#/properties/states/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data18.step !== undefined){if(typeof data18.step !== "string"){const err52 = {instancePath:instancePath+"/states/" + i1+"/step",schemaPath:"#/properties/states/items/properties/step/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data18.lane !== undefined){let data25 = data18.lane;if(typeof data25 === "string"){if(!pattern4.test(data25)){const err53 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data18.col !== undefined){let data26 = data18.col;if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){const err55 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if((typeof data26 == "number") && (isFinite(data26))){if(data26 > 4 || isNaN(data26)){const err56 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4},message:"must be <= 4"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26 < 0 || isNaN(data26)){const err57 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}if(data18.width !== undefined){let data27 = data18.width;if((typeof data27 == "number") && (isFinite(data27))){if(data27 < 48 || isNaN(data27)){const err58 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data18.height !== undefined){let data28 = data18.height;if((typeof data28 == "number") && (isFinite(data28))){if(data28 < 36 || isNaN(data28)){const err60 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data18.yOffset !== undefined){let data29 = data18.yOffset;if(!((typeof data29 == "number") && (isFinite(data29)))){const err62 = {instancePath:instancePath+"/states/" + i1+"/yOffset",schemaPath:"#/properties/states/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}else {const err64 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data.transitions !== undefined){let data30 = data.transitions;if(Array.isArray(data30)){const len4 = data30.length;for(let i2=0; i2<len4; i2++){let data31 = data30[i2];if(data31 && typeof data31 == "object" && !Array.isArray(data31)){if(data31.from === undefined){const err65 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data31.to === undefined){const err66 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data31){if(!(func1.call(schema78.properties.transitions.items.properties, key4))){const err67 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data31.id !== undefined){let data32 = data31.id;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data31.from !== undefined){let data33 = data31.from;if(typeof data33 === "string"){if(!pattern4.test(data33)){const err70 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data31.to !== undefined){let data34 = data31.to;if(typeof data34 === "string"){if(!pattern4.test(data34)){const err72 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data31.label !== undefined){if(typeof data31.label !== "string"){const err74 = {instancePath:instancePath+"/transitions/" + i2+"/label",schemaPath:"#/properties/transitions/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data31.note !== undefined){if(typeof data31.note !== "string"){const err75 = {instancePath:instancePath+"/transitions/" + i2+"/note",schemaPath:"#/properties/transitions/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data31.variant !== undefined){let data37 = data31.variant;if(!((((data37 === "default") || (data37 === "emphasis")) || (data37 === "security")) || (data37 === "dashed"))){const err76 = {instancePath:instancePath+"/transitions/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data31.route !== undefined){let data38 = data31.route;if(!(((((((data38 === "auto") || (data38 === "straight")) || (data38 === "drop")) || (data38 === "bottom-channel")) || (data38 === "top-channel")) || (data38 === "right-channel")) || (data38 === "left-channel"))){const err77 = {instancePath:instancePath+"/transitions/" + i2+"/route",schemaPath:"#/properties/transitions/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data31.fromSide !== undefined){let data39 = data31.fromSide;if(!((((data39 === "left") || (data39 === "right")) || (data39 === "top")) || (data39 === "bottom"))){const err78 = {instancePath:instancePath+"/transitions/" + i2+"/fromSide",schemaPath:"#/properties/transitions/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data31.toSide !== undefined){let data40 = data31.toSide;if(!((((data40 === "left") || (data40 === "right")) || (data40 === "top")) || (data40 === "bottom"))){const err79 = {instancePath:instancePath+"/transitions/" + i2+"/toSide",schemaPath:"#/properties/transitions/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data31.channelX !== undefined){let data41 = data31.channelX;if(!((typeof data41 == "number") && (isFinite(data41)))){const err80 = {instancePath:instancePath+"/transitions/" + i2+"/channelX",schemaPath:"#/properties/transitions/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data31.channelY !== undefined){let data42 = data31.channelY;if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/transitions/" + i2+"/channelY",schemaPath:"#/properties/transitions/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data31.cornerRadius !== undefined){let data43 = data31.cornerRadius;if((typeof data43 == "number") && (isFinite(data43))){if(data43 < 0 || isNaN(data43)){const err82 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}else {const err83 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data31.labelAt !== undefined){let data44 = data31.labelAt;if(Array.isArray(data44)){if(data44.length > 2){const err84 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data44.length < 2){const err85 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len5 = data44.length;if(len5 > 0){let data45 = data44[0];if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(len5 > 1){let data46 = data44[1];if(!((typeof data46 == "number") && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}const len6 = data44.length;if(!(len6 <= 2)){const err88 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data31.labelDx !== undefined){let data47 = data31.labelDx;if(!((typeof data47 == "number") && (isFinite(data47)))){const err90 = {instancePath:instancePath+"/transitions/" + i2+"/labelDx",schemaPath:"#/properties/transitions/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data31.labelDy !== undefined){let data48 = data31.labelDy;if(!((typeof data48 == "number") && (isFinite(data48)))){const err91 = {instancePath:instancePath+"/transitions/" + i2+"/labelDy",schemaPath:"#/properties/transitions/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data31.labelSegment !== undefined){let data49 = data31.labelSegment;if(!(((typeof data49 == "number") && (!(data49 % 1) && !isNaN(data49))) && (isFinite(data49)))){const err92 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data49 == "number") && (isFinite(data49))){if(data49 < 0 || isNaN(data49)){const err93 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}if(data31.via !== undefined){let data50 = data31.via;if(Array.isArray(data50)){const len7 = data50.length;for(let i3=0; i3<len7; i3++){let data51 = data50[i3];if(Array.isArray(data51)){if(data51.length > 2){const err94 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data51.length < 2){const err95 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}const len8 = data51.length;if(len8 > 0){let data52 = data51[0];if(!((typeof data52 == "number") && (isFinite(data52)))){const err96 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data53 = data51[1];if(!((typeof data53 == "number") && (isFinite(data53)))){const err97 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}const len9 = data51.length;if(!(len9 <= 2)){const err98 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/transitions/" + i2+"/via",schemaPath:"#/properties/transitions/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data31.width !== undefined){let data54 = data31.width;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0.5 || isNaN(data54)){const err101 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}else {const err102 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}}else {const err104 = {instancePath:instancePath+"/transitions",schemaPath:"#/properties/transitions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data.cards !== undefined){let data55 = data.cards;if(Array.isArray(data55)){const len10 = data55.length;for(let i4=0; i4<len10; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.dot === undefined){const err105 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data56.title === undefined){const err106 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data56.items === undefined){const err107 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}for(const key5 in data56){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err108 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data56.dot !== undefined){let data57 = data56.dot;if(!(((((((data57 === "cyan") || (data57 === "emerald")) || (data57 === "violet")) || (data57 === "amber")) || (data57 === "rose")) || (data57 === "orange")) || (data57 === "slate"))){const err109 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data56.title !== undefined){let data58 = data56.title;if(typeof data58 === "string"){if(func2(data58) < 1){const err110 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data56.items !== undefined){let data59 = data56.items;if(Array.isArray(data59)){const len11 = data59.length;for(let i5=0; i5<len11; i5++){if(typeof data59[i5] !== "string"){const err112 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}}else {const err114 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}else {const err115 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const architecture = validate33;const schema92 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/architecture.schema.json","title":"Archify Architecture Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","components"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"architecture"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"engineering_profile":{"enum":["deployment-ownership"]},"repository":{"type":"object","additionalProperties":false,"required":["url","revision"],"properties":{"url":{"type":"string","pattern":"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},"revision":{"type":"string","pattern":"^[a-fA-F0-9]{40}$"}}},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":320},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"layout":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"enum":["grid"]},"origin":{"$ref":"common.schema.json#/$defs/point"},"cols":{"type":"integer","minimum":1,"maximum":12},"gapX":{"type":"number","minimum":0},"gapY":{"type":"number","minimum":0},"cellW":{"type":"number","minimum":40},"cellH":{"type":"number","minimum":24}}},"components":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"sources":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":240},"line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1},"label":{"type":"string","minLength":1,"maxLength":48}}}},"row":{"type":"integer","minimum":0},"col":{"type":"integer","minimum":0},"pos":{"$ref":"common.schema.json#/$defs/point"},"size":{"type":"array","prefixItems":[{"type":"number","exclusiveMinimum":0},{"type":"number","exclusiveMinimum":0}],"items":false,"minItems":2,"maxItems":2}}}},"boundaries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","label","wraps"],"properties":{"kind":{"enum":["region","security-group"]},"label":{"type":"string","minLength":1},"wraps":{"type":"array","minItems":1,"items":{"$ref":"common.schema.json#/$defs/id"}},"pad":{"type":"number","minimum":0}}}},"connections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"route":{"enum":["auto","straight","orthogonal-h","orthogonal-v"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};const pattern37 = new RegExp("^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$", "u");const pattern38 = new RegExp("^[a-fA-F0-9]{40}$", "u");function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate34.errors = vErrors;return errors === 0;}validate34.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/architecture.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate33.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.components === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "components"},message:"must have required property '"+"components"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "layout")) || (key0 === "components")) || (key0 === "boundaries")) || (key0 === "connections")) || (key0 === "cards"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err5 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.diagram_type !== undefined){if("architecture" !== data.diagram_type){const err6 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "architecture"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err7 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data2){if(!(func1.call(schema92.properties.meta.properties, key1))){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err9 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err11 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err12 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err13 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err14 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err15 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.engineering_profile !== undefined){if(!(data2.engineering_profile === "deployment-ownership")){const err16 = {instancePath:instancePath+"/meta/engineering_profile",schemaPath:"#/properties/meta/properties/engineering_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.engineering_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.repository !== undefined){let data10 = data2.repository;if(data10 && typeof data10 == "object" && !Array.isArray(data10)){if(data10.url === undefined){const err17 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.revision === undefined){const err18 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}for(const key2 in data10){if(!((key2 === "url") || (key2 === "revision"))){const err19 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data10.url !== undefined){let data11 = data10.url;if(typeof data11 === "string"){if(!pattern37.test(data11)){const err20 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/pattern",keyword:"pattern",params:{pattern: "^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},message:"must match pattern \""+"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"+"\""};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data10.revision !== undefined){let data12 = data10.revision;if(typeof data12 === "string"){if(!pattern38.test(data12)){const err22 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{40}$"},message:"must match pattern \""+"^[a-fA-F0-9]{40}$"+"\""};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data2.views !== undefined){if(!(validate34(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data14 = data2.viewBox;if(Array.isArray(data14)){if(data14.length > 2){const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data14.length < 2){const err26 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len0 = data14.length;if(len0 > 0){let data15 = data14[0];if((typeof data15 == "number") && (isFinite(data15))){if(data15 < 320 || isNaN(data15)){const err27 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 320},message:"must be >= 320"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}else {const err28 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(len0 > 1){let data16 = data14[1];if((typeof data16 == "number") && (isFinite(data16))){if(data16 < 240 || isNaN(data16)){const err29 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else {const err30 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}const len1 = data14.length;if(!(len1 <= 2)){const err31 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.layout !== undefined){let data17 = data.layout;if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.mode === undefined){const err34 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}for(const key3 in data17){if(!(((((((key3 === "mode") || (key3 === "origin")) || (key3 === "cols")) || (key3 === "gapX")) || (key3 === "gapY")) || (key3 === "cellW")) || (key3 === "cellH"))){const err35 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data17.mode !== undefined){if(!(data17.mode === "grid")){const err36 = {instancePath:instancePath+"/layout/mode",schemaPath:"#/properties/layout/properties/mode/enum",keyword:"enum",params:{allowedValues: schema92.properties.layout.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data17.origin !== undefined){let data19 = data17.origin;if(Array.isArray(data19)){if(data19.length > 2){const err37 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data19.length < 2){const err38 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len2 = data19.length;if(len2 > 0){let data20 = data19[0];if(!((typeof data20 == "number") && (isFinite(data20)))){const err39 = {instancePath:instancePath+"/layout/origin/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(len2 > 1){let data21 = data19[1];if(!((typeof data21 == "number") && (isFinite(data21)))){const err40 = {instancePath:instancePath+"/layout/origin/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}const len3 = data19.length;if(!(len3 <= 2)){const err41 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}else {const err42 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data17.cols !== undefined){let data22 = data17.cols;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err43 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 12 || isNaN(data22)){const err44 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data22 < 1 || isNaN(data22)){const err45 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}}if(data17.gapX !== undefined){let data23 = data17.gapX;if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err46 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}else {const err47 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.gapY !== undefined){let data24 = data17.gapY;if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err48 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data17.cellW !== undefined){let data25 = data17.cellW;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 40 || isNaN(data25)){const err50 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/minimum",keyword:"minimum",params:{comparison: ">=", limit: 40},message:"must be >= 40"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data17.cellH !== undefined){let data26 = data17.cellH;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 24 || isNaN(data26)){const err52 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/minimum",keyword:"minimum",params:{comparison: ">=", limit: 24},message:"must be >= 24"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else {const err53 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data.components !== undefined){let data27 = data.components;if(Array.isArray(data27)){if(data27.length < 1){const err55 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}const len4 = data27.length;for(let i0=0; i0<len4; i0++){let data28 = data27[i0];if(data28 && typeof data28 == "object" && !Array.isArray(data28)){if(data28.id === undefined){const err56 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data28.type === undefined){const err57 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data28.label === undefined){const err58 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}for(const key4 in data28){if(!(func1.call(schema92.properties.components.items.properties, key4))){const err59 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data28.id !== undefined){let data29 = data28.id;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err60 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data28.type !== undefined){let data30 = data28.type;if(!(((((((data30 === "frontend") || (data30 === "backend")) || (data30 === "database")) || (data30 === "cloud")) || (data30 === "security")) || (data30 === "messagebus")) || (data30 === "external"))){const err62 = {instancePath:instancePath+"/components/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data28.label !== undefined){let data31 = data28.label;if(typeof data31 === "string"){if(func2(data31) < 1){const err63 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data28.sublabel !== undefined){if(typeof data28.sublabel !== "string"){const err65 = {instancePath:instancePath+"/components/" + i0+"/sublabel",schemaPath:"#/properties/components/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data28.tag !== undefined){if(typeof data28.tag !== "string"){const err66 = {instancePath:instancePath+"/components/" + i0+"/tag",schemaPath:"#/properties/components/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}if(data28.sources !== undefined){let data34 = data28.sources;if(Array.isArray(data34)){if(data34.length > 3){const err67 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/maxItems",keyword:"maxItems",params:{limit: 3},message:"must NOT have more than 3 items"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data34.length < 1){const err68 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}const len5 = data34.length;for(let i1=0; i1<len5; i1++){let data35 = data34[i1];if(data35 && typeof data35 == "object" && !Array.isArray(data35)){if(data35.path === undefined){const err69 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}for(const key5 in data35){if(!((((key5 === "path") || (key5 === "line")) || (key5 === "end_line")) || (key5 === "label"))){const err70 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}if(data35.path !== undefined){let data36 = data35.path;if(typeof data36 === "string"){if(func2(data36) > 240){const err71 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/maxLength",keyword:"maxLength",params:{limit: 240},message:"must NOT have more than 240 characters"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(func2(data36) < 1){const err72 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data35.line !== undefined){let data37 = data35.line;if(!(((typeof data37 == "number") && (!(data37 % 1) && !isNaN(data37))) && (isFinite(data37)))){const err74 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}if((typeof data37 == "number") && (isFinite(data37))){if(data37 < 1 || isNaN(data37)){const err75 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}if(data35.end_line !== undefined){let data38 = data35.end_line;if(!(((typeof data38 == "number") && (!(data38 % 1) && !isNaN(data38))) && (isFinite(data38)))){const err76 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}if((typeof data38 == "number") && (isFinite(data38))){if(data38 < 1 || isNaN(data38)){const err77 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}if(data35.label !== undefined){let data39 = data35.label;if(typeof data39 === "string"){if(func2(data39) > 48){const err78 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(func2(data39) < 1){const err79 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}else {const err80 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}else {const err81 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}}else {const err82 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}if(data28.row !== undefined){let data40 = data28.row;if(!(((typeof data40 == "number") && (!(data40 % 1) && !isNaN(data40))) && (isFinite(data40)))){const err83 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if((typeof data40 == "number") && (isFinite(data40))){if(data40 < 0 || isNaN(data40)){const err84 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}}if(data28.col !== undefined){let data41 = data28.col;if(!(((typeof data41 == "number") && (!(data41 % 1) && !isNaN(data41))) && (isFinite(data41)))){const err85 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if((typeof data41 == "number") && (isFinite(data41))){if(data41 < 0 || isNaN(data41)){const err86 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}}if(data28.pos !== undefined){let data42 = data28.pos;if(Array.isArray(data42)){if(data42.length > 2){const err87 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if(data42.length < 2){const err88 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}const len6 = data42.length;if(len6 > 0){let data43 = data42[0];if(!((typeof data43 == "number") && (isFinite(data43)))){const err89 = {instancePath:instancePath+"/components/" + i0+"/pos/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(len6 > 1){let data44 = data42[1];if(!((typeof data44 == "number") && (isFinite(data44)))){const err90 = {instancePath:instancePath+"/components/" + i0+"/pos/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}const len7 = data42.length;if(!(len7 <= 2)){const err91 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}else {const err92 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}if(data28.size !== undefined){let data45 = data28.size;if(Array.isArray(data45)){if(data45.length > 2){const err93 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data45.length < 2){const err94 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}const len8 = data45.length;if(len8 > 0){let data46 = data45[0];if((typeof data46 == "number") && (isFinite(data46))){if(data46 <= 0 || isNaN(data46)){const err95 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}else {const err96 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data47 = data45[1];if((typeof data47 == "number") && (isFinite(data47))){if(data47 <= 0 || isNaN(data47)){const err97 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}else {const err98 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}const len9 = data45.length;if(!(len9 <= 2)){const err99 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}else {const err100 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}}else {const err101 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}else {const err102 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}if(data.boundaries !== undefined){let data48 = data.boundaries;if(Array.isArray(data48)){const len10 = data48.length;for(let i2=0; i2<len10; i2++){let data49 = data48[i2];if(data49 && typeof data49 == "object" && !Array.isArray(data49)){if(data49.kind === undefined){const err103 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data49.label === undefined){const err104 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data49.wraps === undefined){const err105 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "wraps"},message:"must have required property '"+"wraps"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}for(const key6 in data49){if(!((((key6 === "kind") || (key6 === "label")) || (key6 === "wraps")) || (key6 === "pad"))){const err106 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data49.kind !== undefined){let data50 = data49.kind;if(!((data50 === "region") || (data50 === "security-group"))){const err107 = {instancePath:instancePath+"/boundaries/" + i2+"/kind",schemaPath:"#/properties/boundaries/items/properties/kind/enum",keyword:"enum",params:{allowedValues: schema92.properties.boundaries.items.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}if(data49.label !== undefined){let data51 = data49.label;if(typeof data51 === "string"){if(func2(data51) < 1){const err108 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}else {const err109 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data49.wraps !== undefined){let data52 = data49.wraps;if(Array.isArray(data52)){if(data52.length < 1){const err110 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}const len11 = data52.length;for(let i3=0; i3<len11; i3++){let data53 = data52[i3];if(typeof data53 === "string"){if(!pattern4.test(data53)){const err111 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}else {const err112 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data49.pad !== undefined){let data54 = data49.pad;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0 || isNaN(data54)){const err114 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}}else {const err117 = {instancePath:instancePath+"/boundaries",schemaPath:"#/properties/boundaries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data.connections !== undefined){let data55 = data.connections;if(Array.isArray(data55)){const len12 = data55.length;for(let i4=0; i4<len12; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.from === undefined){const err118 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}if(data56.to === undefined){const err119 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}for(const key7 in data56){if(!(func1.call(schema92.properties.connections.items.properties, key7))){const err120 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data56.id !== undefined){let data57 = data56.id;if(typeof data57 === "string"){if(!pattern4.test(data57)){const err121 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}else {const err122 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}}if(data56.from !== undefined){let data58 = data56.from;if(typeof data58 === "string"){if(!pattern4.test(data58)){const err123 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}else {const err124 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data56.to !== undefined){let data59 = data56.to;if(typeof data59 === "string"){if(!pattern4.test(data59)){const err125 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}else {const err126 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}if(data56.label !== undefined){if(typeof data56.label !== "string"){const err127 = {instancePath:instancePath+"/connections/" + i4+"/label",schemaPath:"#/properties/connections/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data56.variant !== undefined){let data61 = data56.variant;if(!((((data61 === "default") || (data61 === "emphasis")) || (data61 === "security")) || (data61 === "dashed"))){const err128 = {instancePath:instancePath+"/connections/" + i4+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data56.fromSide !== undefined){let data62 = data56.fromSide;if(!((((data62 === "left") || (data62 === "right")) || (data62 === "top")) || (data62 === "bottom"))){const err129 = {instancePath:instancePath+"/connections/" + i4+"/fromSide",schemaPath:"#/properties/connections/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}if(data56.toSide !== undefined){let data63 = data56.toSide;if(!((((data63 === "left") || (data63 === "right")) || (data63 === "top")) || (data63 === "bottom"))){const err130 = {instancePath:instancePath+"/connections/" + i4+"/toSide",schemaPath:"#/properties/connections/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}}if(data56.route !== undefined){let data64 = data56.route;if(!((((data64 === "auto") || (data64 === "straight")) || (data64 === "orthogonal-h")) || (data64 === "orthogonal-v"))){const err131 = {instancePath:instancePath+"/connections/" + i4+"/route",schemaPath:"#/properties/connections/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data56.via !== undefined){let data65 = data56.via;if(Array.isArray(data65)){const len13 = data65.length;for(let i5=0; i5<len13; i5++){let data66 = data65[i5];if(Array.isArray(data66)){if(data66.length > 2){const err132 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}if(data66.length < 2){const err133 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}const len14 = data66.length;if(len14 > 0){let data67 = data66[0];if(!((typeof data67 == "number") && (isFinite(data67)))){const err134 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(len14 > 1){let data68 = data66[1];if(!((typeof data68 == "number") && (isFinite(data68)))){const err135 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}const len15 = data66.length;if(!(len15 <= 2)){const err136 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}else {const err137 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}}else {const err138 = {instancePath:instancePath+"/connections/" + i4+"/via",schemaPath:"#/properties/connections/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data56.labelAt !== undefined){let data69 = data56.labelAt;if(Array.isArray(data69)){if(data69.length > 2){const err139 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}if(data69.length < 2){const err140 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}const len16 = data69.length;if(len16 > 0){let data70 = data69[0];if(!((typeof data70 == "number") && (isFinite(data70)))){const err141 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}}if(len16 > 1){let data71 = data69[1];if(!((typeof data71 == "number") && (isFinite(data71)))){const err142 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}const len17 = data69.length;if(!(len17 <= 2)){const err143 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}else {const err144 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data56.labelDx !== undefined){let data72 = data56.labelDx;if(!((typeof data72 == "number") && (isFinite(data72)))){const err145 = {instancePath:instancePath+"/connections/" + i4+"/labelDx",schemaPath:"#/properties/connections/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}if(data56.labelDy !== undefined){let data73 = data56.labelDy;if(!((typeof data73 == "number") && (isFinite(data73)))){const err146 = {instancePath:instancePath+"/connections/" + i4+"/labelDy",schemaPath:"#/properties/connections/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}if(data56.labelSegment !== undefined){let data74 = data56.labelSegment;if(!(((typeof data74 == "number") && (!(data74 % 1) && !isNaN(data74))) && (isFinite(data74)))){const err147 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}if((typeof data74 == "number") && (isFinite(data74))){if(data74 < 0 || isNaN(data74)){const err148 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}}if(data56.width !== undefined){let data75 = data56.width;if((typeof data75 == "number") && (isFinite(data75))){if(data75 < 0.5 || isNaN(data75)){const err149 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}else {const err150 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}}}else {const err151 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}}else {const err152 = {instancePath:instancePath+"/connections",schemaPath:"#/properties/connections/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data.cards !== undefined){let data76 = data.cards;if(Array.isArray(data76)){const len18 = data76.length;for(let i6=0; i6<len18; i6++){let data77 = data76[i6];if(data77 && typeof data77 == "object" && !Array.isArray(data77)){if(data77.dot === undefined){const err153 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}if(data77.title === undefined){const err154 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}if(data77.items === undefined){const err155 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}for(const key8 in data77){if(!(((key8 === "dot") || (key8 === "title")) || (key8 === "items"))){const err156 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}if(data77.dot !== undefined){let data78 = data77.dot;if(!(((((((data78 === "cyan") || (data78 === "emerald")) || (data78 === "violet")) || (data78 === "amber")) || (data78 === "rose")) || (data78 === "orange")) || (data78 === "slate"))){const err157 = {instancePath:instancePath+"/cards/" + i6+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}if(data77.title !== undefined){let data79 = data77.title;if(typeof data79 === "string"){if(func2(data79) < 1){const err158 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}else {const err159 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}}if(data77.items !== undefined){let data80 = data77.items;if(Array.isArray(data80)){const len19 = data80.length;for(let i7=0; i7<len19; i7++){if(typeof data80[i7] !== "string"){const err160 = {instancePath:instancePath+"/cards/" + i6+"/items/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}}else {const err161 = {instancePath:instancePath+"/cards/" + i6+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}}else {const err162 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}}}else {const err163 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}}}else {const err164 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err164];}else {vErrors.push(err164);}errors++;}validate33.errors = vErrors;return errors === 0;}validate33.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
+};const schema33 = {"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["id","label","focus"],"properties":{"id":{"$ref":"#/$defs/id"},"label":{"type":"string","minLength":1,"maxLength":48},"focus":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/id"}},"note":{"type":"string","maxLength":140}}}};const pattern4 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/workflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.edges === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "edges"},message:"must have required property '"+"edges"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(func1.call(schema31.properties, key0))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("workflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "workflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!((((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint")) || (data7 === "editorial"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate22(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 700 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 700},message:"must be >= 700"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 240 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length < 1){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err28 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(((key2 === "id") || (key2 === "label")) || (key2 === "variant"))){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err33 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data14.variant !== undefined){let data17 = data14.variant;if(!((data17 === "normal") || (data17 === "exception"))){const err35 = {instancePath:instancePath+"/lanes/" + i0+"/variant",schemaPath:"#/properties/lanes/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.lanes.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.phases !== undefined){let data18 = data.phases;if(Array.isArray(data18)){const len3 = data18.length;for(let i1=0; i1<len3; i1++){let data19 = data18[i1];if(data19 && typeof data19 == "object" && !Array.isArray(data19)){if(data19.id === undefined){const err38 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data19.label === undefined){const err39 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data19.fromCol === undefined){const err40 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data19.toCol === undefined){const err41 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data19){if(!(((((key3 === "id") || (key3 === "label")) || (key3 === "fromCol")) || (key3 === "toCol")) || (key3 === "variant"))){const err42 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data19.id !== undefined){let data20 = data19.id;if(typeof data20 === "string"){if(!pattern4.test(data20)){const err43 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data19.label !== undefined){let data21 = data19.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err45 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data19.fromCol !== undefined){let data22 = data19.fromCol;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err47 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 5 || isNaN(data22)){const err48 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data22 < 0 || isNaN(data22)){const err49 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}if(data19.toCol !== undefined){let data23 = data19.toCol;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err50 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 > 5 || isNaN(data23)){const err51 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data23 < 0 || isNaN(data23)){const err52 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data19.variant !== undefined){let data24 = data19.variant;if(!((((data24 === "default") || (data24 === "emphasis")) || (data24 === "security")) || (data24 === "dashed"))){const err53 = {instancePath:instancePath+"/phases/" + i1+"/variant",schemaPath:"#/properties/phases/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.phases.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath:instancePath+"/phases",schemaPath:"#/properties/phases/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data.groups !== undefined){let data25 = data.groups;if(Array.isArray(data25)){const len4 = data25.length;for(let i2=0; i2<len4; i2++){let data26 = data25[i2];if(data26 && typeof data26 == "object" && !Array.isArray(data26)){if(data26.id === undefined){const err56 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26.label === undefined){const err57 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data26.lane === undefined){const err58 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data26.fromCol === undefined){const err59 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data26.toCol === undefined){const err60 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}for(const key4 in data26){if(!((((((key4 === "id") || (key4 === "label")) || (key4 === "lane")) || (key4 === "fromCol")) || (key4 === "toCol")) || (key4 === "variant"))){const err61 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data26.id !== undefined){let data27 = data26.id;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err62 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data26.label !== undefined){let data28 = data26.label;if(typeof data28 === "string"){if(func2(data28) < 1){const err64 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data26.lane !== undefined){let data29 = data26.lane;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err66 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data26.fromCol !== undefined){let data30 = data26.fromCol;if(!(((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err68 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data30 == "number") && (isFinite(data30))){if(data30 > 5 || isNaN(data30)){const err69 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data30 < 0 || isNaN(data30)){const err70 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}if(data26.toCol !== undefined){let data31 = data26.toCol;if(!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))){const err71 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if((typeof data31 == "number") && (isFinite(data31))){if(data31 > 5 || isNaN(data31)){const err72 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data31 < 0 || isNaN(data31)){const err73 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}if(data26.variant !== undefined){let data32 = data26.variant;if(!((((data32 === "default") || (data32 === "emphasis")) || (data32 === "security")) || (data32 === "dashed"))){const err74 = {instancePath:instancePath+"/groups/" + i2+"/variant",schemaPath:"#/properties/groups/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.groups.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}}else {const err75 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}else {const err76 = {instancePath:instancePath+"/groups",schemaPath:"#/properties/groups/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.mainPath !== undefined){let data33 = data.mainPath;if(Array.isArray(data33)){if(data33.length < 2){const err77 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(typeof data34 === "string"){if(!pattern4.test(data34)){const err78 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}else {const err79 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}}else {const err80 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data.nodes !== undefined){let data35 = data.nodes;if(Array.isArray(data35)){if(data35.length < 1){const err81 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}const len6 = data35.length;for(let i4=0; i4<len6; i4++){let data36 = data35[i4];if(data36 && typeof data36 == "object" && !Array.isArray(data36)){if(data36.id === undefined){const err82 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data36.lane === undefined){const err83 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data36.col === undefined){const err84 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data36.type === undefined){const err85 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data36.label === undefined){const err86 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}for(const key5 in data36){if(!(func1.call(schema31.properties.nodes.items.properties, key5))){const err87 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}if(data36.id !== undefined){let data37 = data36.id;if(typeof data37 === "string"){if(!pattern4.test(data37)){const err88 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data36.lane !== undefined){let data38 = data36.lane;if(typeof data38 === "string"){if(!pattern4.test(data38)){const err90 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}else {const err91 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data36.col !== undefined){let data39 = data36.col;if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err92 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data39 == "number") && (isFinite(data39))){if(data39 > 5 || isNaN(data39)){const err93 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data39 < 0 || isNaN(data39)){const err94 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}if(data36.type !== undefined){let data40 = data36.type;if(!(((((((data40 === "frontend") || (data40 === "backend")) || (data40 === "database")) || (data40 === "cloud")) || (data40 === "security")) || (data40 === "messagebus")) || (data40 === "external"))){const err95 = {instancePath:instancePath+"/nodes/" + i4+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data36.label !== undefined){let data41 = data36.label;if(typeof data41 === "string"){if(func2(data41) < 1){const err96 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data36.sublabel !== undefined){if(typeof data36.sublabel !== "string"){const err98 = {instancePath:instancePath+"/nodes/" + i4+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}if(data36.tag !== undefined){if(typeof data36.tag !== "string"){const err99 = {instancePath:instancePath+"/nodes/" + i4+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data36.width !== undefined){let data44 = data36.width;if((typeof data44 == "number") && (isFinite(data44))){if(data44 < 32 || isNaN(data44)){const err100 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}else {const err101 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data36.height !== undefined){let data45 = data36.height;if((typeof data45 == "number") && (isFinite(data45))){if(data45 < 32 || isNaN(data45)){const err102 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}else {const err103 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data36.yOffset !== undefined){let data46 = data36.yOffset;if(!((typeof data46 == "number") && (isFinite(data46)))){const err104 = {instancePath:instancePath+"/nodes/" + i4+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}}else {const err105 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}}else {const err106 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.edges !== undefined){let data47 = data.edges;if(Array.isArray(data47)){const len7 = data47.length;for(let i5=0; i5<len7; i5++){let data48 = data47[i5];if(data48 && typeof data48 == "object" && !Array.isArray(data48)){if(data48.from === undefined){const err107 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data48.to === undefined){const err108 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key6 in data48){if(!(func1.call(schema31.properties.edges.items.properties, key6))){const err109 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data48.id !== undefined){let data49 = data48.id;if(typeof data49 === "string"){if(!pattern4.test(data49)){const err110 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data48.from !== undefined){let data50 = data48.from;if(typeof data50 === "string"){if(!pattern4.test(data50)){const err112 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}else {const err113 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data48.to !== undefined){let data51 = data48.to;if(typeof data51 === "string"){if(!pattern4.test(data51)){const err114 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}if(data48.label !== undefined){if(typeof data48.label !== "string"){const err116 = {instancePath:instancePath+"/edges/" + i5+"/label",schemaPath:"#/properties/edges/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(data48.variant !== undefined){let data53 = data48.variant;if(!((((data53 === "default") || (data53 === "emphasis")) || (data53 === "security")) || (data53 === "dashed"))){const err117 = {instancePath:instancePath+"/edges/" + i5+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data48.role !== undefined){let data54 = data48.role;if(!(((((data54 === "main") || (data54 === "branch")) || (data54 === "async")) || (data54 === "return")) || (data54 === "error"))){const err118 = {instancePath:instancePath+"/edges/" + i5+"/role",schemaPath:"#/properties/edges/items/properties/role/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.role.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}if(data48.fromSide !== undefined){let data55 = data48.fromSide;if(!((((data55 === "left") || (data55 === "right")) || (data55 === "top")) || (data55 === "bottom"))){const err119 = {instancePath:instancePath+"/edges/" + i5+"/fromSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data48.toSide !== undefined){let data56 = data48.toSide;if(!((((data56 === "left") || (data56 === "right")) || (data56 === "top")) || (data56 === "bottom"))){const err120 = {instancePath:instancePath+"/edges/" + i5+"/toSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data48.route !== undefined){let data57 = data48.route;if(!(((((((data57 === "auto") || (data57 === "straight")) || (data57 === "drop")) || (data57 === "outside-right")) || (data57 === "return-left")) || (data57 === "bottom-channel")) || (data57 === "up-channel"))){const err121 = {instancePath:instancePath+"/edges/" + i5+"/route",schemaPath:"#/properties/edges/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data48.via !== undefined){let data58 = data48.via;if(Array.isArray(data58)){const len8 = data58.length;for(let i6=0; i6<len8; i6++){let data59 = data58[i6];if(Array.isArray(data59)){if(data59.length > 2){const err122 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data59.length < 2){const err123 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}const len9 = data59.length;if(len9 > 0){let data60 = data59[0];if(!((typeof data60 == "number") && (isFinite(data60)))){const err124 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(len9 > 1){let data61 = data59[1];if(!((typeof data61 == "number") && (isFinite(data61)))){const err125 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}const len10 = data59.length;if(!(len10 <= 2)){const err126 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}else {const err127 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}}else {const err128 = {instancePath:instancePath+"/edges/" + i5+"/via",schemaPath:"#/properties/edges/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data48.labelAt !== undefined){let data62 = data48.labelAt;if(Array.isArray(data62)){if(data62.length > 2){const err129 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data62.length < 2){const err130 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}const len11 = data62.length;if(len11 > 0){let data63 = data62[0];if(!((typeof data63 == "number") && (isFinite(data63)))){const err131 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(len11 > 1){let data64 = data62[1];if(!((typeof data64 == "number") && (isFinite(data64)))){const err132 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}const len12 = data62.length;if(!(len12 <= 2)){const err133 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data48.labelDx !== undefined){let data65 = data48.labelDx;if(!((typeof data65 == "number") && (isFinite(data65)))){const err135 = {instancePath:instancePath+"/edges/" + i5+"/labelDx",schemaPath:"#/properties/edges/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data48.labelDy !== undefined){let data66 = data48.labelDy;if(!((typeof data66 == "number") && (isFinite(data66)))){const err136 = {instancePath:instancePath+"/edges/" + i5+"/labelDy",schemaPath:"#/properties/edges/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}if(data48.labelSegment !== undefined){let data67 = data48.labelSegment;if(!(((typeof data67 == "number") && (!(data67 % 1) && !isNaN(data67))) && (isFinite(data67)))){const err137 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}if((typeof data67 == "number") && (isFinite(data67))){if(data67 < 0 || isNaN(data67)){const err138 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}}if(data48.channelX !== undefined){let data68 = data48.channelX;if(!((typeof data68 == "number") && (isFinite(data68)))){const err139 = {instancePath:instancePath+"/edges/" + i5+"/channelX",schemaPath:"#/properties/edges/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}if(data48.channelY !== undefined){let data69 = data48.channelY;if(!((typeof data69 == "number") && (isFinite(data69)))){const err140 = {instancePath:instancePath+"/edges/" + i5+"/channelY",schemaPath:"#/properties/edges/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data48.bias !== undefined){let data70 = data48.bias;if((typeof data70 == "number") && (isFinite(data70))){if(data70 > 1 || isNaN(data70)){const err141 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}if(data70 < 0 || isNaN(data70)){const err142 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}else {const err143 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}if(data48.width !== undefined){let data71 = data48.width;if((typeof data71 == "number") && (isFinite(data71))){if(data71 < 0.5 || isNaN(data71)){const err144 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}else {const err145 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}}else {const err146 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+"/edges",schemaPath:"#/properties/edges/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.cards !== undefined){let data72 = data.cards;if(Array.isArray(data72)){const len13 = data72.length;for(let i7=0; i7<len13; i7++){let data73 = data72[i7];if(data73 && typeof data73 == "object" && !Array.isArray(data73)){if(data73.dot === undefined){const err148 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}if(data73.title === undefined){const err149 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}if(data73.items === undefined){const err150 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}for(const key7 in data73){if(!(((key7 === "dot") || (key7 === "title")) || (key7 === "items"))){const err151 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}if(data73.dot !== undefined){let data74 = data73.dot;if(!(((((((data74 === "cyan") || (data74 === "emerald")) || (data74 === "violet")) || (data74 === "amber")) || (data74 === "rose")) || (data74 === "orange")) || (data74 === "slate"))){const err152 = {instancePath:instancePath+"/cards/" + i7+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data73.title !== undefined){let data75 = data73.title;if(typeof data75 === "string"){if(func2(data75) < 1){const err153 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}else {const err154 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}if(data73.items !== undefined){let data76 = data73.items;if(Array.isArray(data76)){const len14 = data76.length;for(let i8=0; i8<len14; i8++){if(typeof data76[i8] !== "string"){const err155 = {instancePath:instancePath+"/cards/" + i7+"/items/" + i8,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}}else {const err156 = {instancePath:instancePath+"/cards/" + i7+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}}else {const err157 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}}else {const err158 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}}else {const err159 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const sequence = validate24;const schema53 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/sequence.schema.json","title":"Archify Sequence Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","participants","messages"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"sequence"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint","editorial"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":480},{"type":"number","minimum":480}],"items":false,"minItems":2,"maxItems":2}}},"participants":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"}}}},"segments":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"from":{"type":"number"},"to":{"type":"number"},"label":{"type":"string","minLength":1}}}},"messages":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["from","to","y","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"y":{"type":"number","minimum":160},"label":{"type":"string","minLength":1},"variant":{"enum":["default","emphasis","security","dashed","return"]},"note":{"type":"string"}}}},"activations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["participant","from","to"],"properties":{"participant":{"$ref":"common.schema.json#/$defs/id"},"from":{"type":"number"},"to":{"type":"number"},"type":{"$ref":"common.schema.json#/$defs/componentType"}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/sequence.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.participants === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "participants"},message:"must have required property '"+"participants"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.messages === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "messages"},message:"must have required property '"+"messages"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "participants")) || (key0 === "segments")) || (key0 === "messages")) || (key0 === "activations")) || (key0 === "cards"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err6 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.diagram_type !== undefined){if("sequence" !== data.diagram_type){const err7 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "sequence"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err12 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err13 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err14 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!((((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint")) || (data7 === "editorial"))){const err15 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err16 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.views !== undefined){if(!(validate25(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err17 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.length < 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 480 || isNaN(data11)){const err19 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 480 || isNaN(data12)){const err21 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err23 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.participants !== undefined){let data13 = data.participants;if(Array.isArray(data13)){if(data13.length < 2){const err26 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err27 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data14.type === undefined){const err28 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!((((key2 === "id") || (key2 === "type")) || (key2 === "label")) || (key2 === "sublabel"))){const err30 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.type !== undefined){let data16 = data14.type;if(!(((((((data16 === "frontend") || (data16 === "backend")) || (data16 === "database")) || (data16 === "cloud")) || (data16 === "security")) || (data16 === "messagebus")) || (data16 === "external"))){const err33 = {instancePath:instancePath+"/participants/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data17 = data14.label;if(typeof data17 === "string"){if(func2(data17) < 1){const err34 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data14.sublabel !== undefined){if(typeof data14.sublabel !== "string"){const err36 = {instancePath:instancePath+"/participants/" + i0+"/sublabel",schemaPath:"#/properties/participants/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.segments !== undefined){let data19 = data.segments;if(Array.isArray(data19)){const len3 = data19.length;for(let i1=0; i1<len3; i1++){let data20 = data19[i1];if(data20 && typeof data20 == "object" && !Array.isArray(data20)){if(data20.from === undefined){const err39 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data20.to === undefined){const err40 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data20.label === undefined){const err41 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data20){if(!(((key3 === "from") || (key3 === "to")) || (key3 === "label"))){const err42 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data20.from !== undefined){let data21 = data20.from;if(!((typeof data21 == "number") && (isFinite(data21)))){const err43 = {instancePath:instancePath+"/segments/" + i1+"/from",schemaPath:"#/properties/segments/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data20.to !== undefined){let data22 = data20.to;if(!((typeof data22 == "number") && (isFinite(data22)))){const err44 = {instancePath:instancePath+"/segments/" + i1+"/to",schemaPath:"#/properties/segments/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data20.label !== undefined){let data23 = data20.label;if(typeof data23 === "string"){if(func2(data23) < 1){const err45 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}else {const err47 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/segments",schemaPath:"#/properties/segments/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data.messages !== undefined){let data24 = data.messages;if(Array.isArray(data24)){if(data24.length < 1){const err49 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}const len4 = data24.length;for(let i2=0; i2<len4; i2++){let data25 = data24[i2];if(data25 && typeof data25 == "object" && !Array.isArray(data25)){if(data25.from === undefined){const err50 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data25.to === undefined){const err51 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data25.y === undefined){const err52 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data25.label === undefined){const err53 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key4 in data25){if(!(((((((key4 === "id") || (key4 === "from")) || (key4 === "to")) || (key4 === "y")) || (key4 === "label")) || (key4 === "variant")) || (key4 === "note"))){const err54 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data25.id !== undefined){let data26 = data25.id;if(typeof data26 === "string"){if(!pattern4.test(data26)){const err55 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data25.from !== undefined){let data27 = data25.from;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err57 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data25.to !== undefined){let data28 = data25.to;if(typeof data28 === "string"){if(!pattern4.test(data28)){const err59 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data25.y !== undefined){let data29 = data25.y;if((typeof data29 == "number") && (isFinite(data29))){if(data29 < 160 || isNaN(data29)){const err61 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 160},message:"must be >= 160"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}else {const err62 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data25.label !== undefined){let data30 = data25.label;if(typeof data30 === "string"){if(func2(data30) < 1){const err63 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data25.variant !== undefined){let data31 = data25.variant;if(!(((((data31 === "default") || (data31 === "emphasis")) || (data31 === "security")) || (data31 === "dashed")) || (data31 === "return"))){const err65 = {instancePath:instancePath+"/messages/" + i2+"/variant",schemaPath:"#/properties/messages/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema53.properties.messages.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data25.note !== undefined){if(typeof data25.note !== "string"){const err66 = {instancePath:instancePath+"/messages/" + i2+"/note",schemaPath:"#/properties/messages/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}}else {const err67 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}}else {const err68 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.activations !== undefined){let data33 = data.activations;if(Array.isArray(data33)){const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(data34.participant === undefined){const err69 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "participant"},message:"must have required property '"+"participant"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data34.from === undefined){const err70 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if(data34.to === undefined){const err71 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}for(const key5 in data34){if(!((((key5 === "participant") || (key5 === "from")) || (key5 === "to")) || (key5 === "type"))){const err72 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data34.participant !== undefined){let data35 = data34.participant;if(typeof data35 === "string"){if(!pattern4.test(data35)){const err73 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data34.from !== undefined){let data36 = data34.from;if(!((typeof data36 == "number") && (isFinite(data36)))){const err75 = {instancePath:instancePath+"/activations/" + i3+"/from",schemaPath:"#/properties/activations/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data34.to !== undefined){let data37 = data34.to;if(!((typeof data37 == "number") && (isFinite(data37)))){const err76 = {instancePath:instancePath+"/activations/" + i3+"/to",schemaPath:"#/properties/activations/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data34.type !== undefined){let data38 = data34.type;if(!(((((((data38 === "frontend") || (data38 === "backend")) || (data38 === "database")) || (data38 === "cloud")) || (data38 === "security")) || (data38 === "messagebus")) || (data38 === "external"))){const err77 = {instancePath:instancePath+"/activations/" + i3+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}else {const err78 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}else {const err79 = {instancePath:instancePath+"/activations",schemaPath:"#/properties/activations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data.cards !== undefined){let data39 = data.cards;if(Array.isArray(data39)){const len6 = data39.length;for(let i4=0; i4<len6; i4++){let data40 = data39[i4];if(data40 && typeof data40 == "object" && !Array.isArray(data40)){if(data40.dot === undefined){const err80 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data40.title === undefined){const err81 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data40.items === undefined){const err82 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}for(const key6 in data40){if(!(((key6 === "dot") || (key6 === "title")) || (key6 === "items"))){const err83 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data40.dot !== undefined){let data41 = data40.dot;if(!(((((((data41 === "cyan") || (data41 === "emerald")) || (data41 === "violet")) || (data41 === "amber")) || (data41 === "rose")) || (data41 === "orange")) || (data41 === "slate"))){const err84 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data40.title !== undefined){let data42 = data40.title;if(typeof data42 === "string"){if(func2(data42) < 1){const err85 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}else {const err86 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data40.items !== undefined){let data43 = data40.items;if(Array.isArray(data43)){const len7 = data43.length;for(let i5=0; i5<len7; i5++){if(typeof data43[i5] !== "string"){const err87 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}else {const err88 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}else {const err89 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}}else {const err90 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const dataflow = validate27;const schema65 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/dataflow.schema.json","title":"Archify Data Flow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","stages","nodes","flows"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"dataflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint","editorial"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":360},{"type":"number","minimum":360}],"items":false,"minItems":2,"maxItems":2}}},"stages":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1}}}},"nodes":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","stage","row"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"stage":{"type":"integer","minimum":0},"row":{"type":"integer","minimum":0},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"flows":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"classification":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","vertical-channel","bottom-channel","top-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/dataflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.stages === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "stages"},message:"must have required property '"+"stages"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.flows === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "flows"},message:"must have required property '"+"flows"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "stages")) || (key0 === "nodes")) || (key0 === "flows")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("dataflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "dataflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!((((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint")) || (data7 === "editorial"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate28(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 360 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 360 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.stages !== undefined){let data13 = data.stages;if(Array.isArray(data13)){if(data13.length > 5){const err27 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 2){const err28 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.label === undefined){const err29 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(key2 === "label")){const err30 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.label !== undefined){let data15 = data14.label;if(typeof data15 === "string"){if(func2(data15) < 1){const err31 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.nodes !== undefined){let data16 = data.nodes;if(Array.isArray(data16)){if(data16.length < 2){const err35 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}const len3 = data16.length;for(let i1=0; i1<len3; i1++){let data17 = data16[i1];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.id === undefined){const err36 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data17.type === undefined){const err37 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data17.label === undefined){const err38 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data17.stage === undefined){const err39 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "stage"},message:"must have required property '"+"stage"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data17.row === undefined){const err40 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "row"},message:"must have required property '"+"row"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}for(const key3 in data17){if(!(func1.call(schema65.properties.nodes.items.properties, key3))){const err41 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data17.id !== undefined){let data18 = data17.id;if(typeof data18 === "string"){if(!pattern4.test(data18)){const err42 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else {const err43 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data17.type !== undefined){let data19 = data17.type;if(!(((((((data19 === "frontend") || (data19 === "backend")) || (data19 === "database")) || (data19 === "cloud")) || (data19 === "security")) || (data19 === "messagebus")) || (data19 === "external"))){const err44 = {instancePath:instancePath+"/nodes/" + i1+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data17.label !== undefined){let data20 = data17.label;if(typeof data20 === "string"){if(func2(data20) < 1){const err45 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data17.sublabel !== undefined){if(typeof data17.sublabel !== "string"){const err47 = {instancePath:instancePath+"/nodes/" + i1+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.tag !== undefined){if(typeof data17.tag !== "string"){const err48 = {instancePath:instancePath+"/nodes/" + i1+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data17.stage !== undefined){let data23 = data17.stage;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err49 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err50 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}}if(data17.row !== undefined){let data24 = data17.row;if(!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))){const err51 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err52 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data17.width !== undefined){let data25 = data17.width;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 48 || isNaN(data25)){const err53 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data17.height !== undefined){let data26 = data17.height;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 36 || isNaN(data26)){const err55 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data17.yOffset !== undefined){let data27 = data17.yOffset;if(!((typeof data27 == "number") && (isFinite(data27)))){const err57 = {instancePath:instancePath+"/nodes/" + i1+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}else {const err58 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}else {const err59 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.flows !== undefined){let data28 = data.flows;if(Array.isArray(data28)){const len4 = data28.length;for(let i2=0; i2<len4; i2++){let data29 = data28[i2];if(data29 && typeof data29 == "object" && !Array.isArray(data29)){if(data29.from === undefined){const err60 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data29.to === undefined){const err61 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data29.label === undefined){const err62 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key4 in data29){if(!(func1.call(schema65.properties.flows.items.properties, key4))){const err63 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data29.id !== undefined){let data30 = data29.id;if(typeof data30 === "string"){if(!pattern4.test(data30)){const err64 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data29.from !== undefined){let data31 = data29.from;if(typeof data31 === "string"){if(!pattern4.test(data31)){const err66 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data29.to !== undefined){let data32 = data29.to;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data29.label !== undefined){let data33 = data29.label;if(typeof data33 === "string"){if(func2(data33) < 1){const err70 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data29.classification !== undefined){if(typeof data29.classification !== "string"){const err72 = {instancePath:instancePath+"/flows/" + i2+"/classification",schemaPath:"#/properties/flows/items/properties/classification/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data29.variant !== undefined){let data35 = data29.variant;if(!((((data35 === "default") || (data35 === "emphasis")) || (data35 === "security")) || (data35 === "dashed"))){const err73 = {instancePath:instancePath+"/flows/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data29.route !== undefined){let data36 = data29.route;if(!(((((data36 === "auto") || (data36 === "straight")) || (data36 === "vertical-channel")) || (data36 === "bottom-channel")) || (data36 === "top-channel"))){const err74 = {instancePath:instancePath+"/flows/" + i2+"/route",schemaPath:"#/properties/flows/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data29.fromSide !== undefined){let data37 = data29.fromSide;if(!((((data37 === "left") || (data37 === "right")) || (data37 === "top")) || (data37 === "bottom"))){const err75 = {instancePath:instancePath+"/flows/" + i2+"/fromSide",schemaPath:"#/properties/flows/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data29.toSide !== undefined){let data38 = data29.toSide;if(!((((data38 === "left") || (data38 === "right")) || (data38 === "top")) || (data38 === "bottom"))){const err76 = {instancePath:instancePath+"/flows/" + i2+"/toSide",schemaPath:"#/properties/flows/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data29.channelX !== undefined){let data39 = data29.channelX;if(!((typeof data39 == "number") && (isFinite(data39)))){const err77 = {instancePath:instancePath+"/flows/" + i2+"/channelX",schemaPath:"#/properties/flows/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data29.channelY !== undefined){let data40 = data29.channelY;if(!((typeof data40 == "number") && (isFinite(data40)))){const err78 = {instancePath:instancePath+"/flows/" + i2+"/channelY",schemaPath:"#/properties/flows/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data29.labelAt !== undefined){let data41 = data29.labelAt;if(Array.isArray(data41)){if(data41.length > 2){const err79 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data41.length < 2){const err80 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}const len5 = data41.length;if(len5 > 0){let data42 = data41[0];if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(len5 > 1){let data43 = data41[1];if(!((typeof data43 == "number") && (isFinite(data43)))){const err82 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}const len6 = data41.length;if(!(len6 <= 2)){const err83 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}else {const err84 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data29.labelDx !== undefined){let data44 = data29.labelDx;if(!((typeof data44 == "number") && (isFinite(data44)))){const err85 = {instancePath:instancePath+"/flows/" + i2+"/labelDx",schemaPath:"#/properties/flows/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data29.labelDy !== undefined){let data45 = data29.labelDy;if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/flows/" + i2+"/labelDy",schemaPath:"#/properties/flows/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data29.labelSegment !== undefined){let data46 = data29.labelSegment;if(!(((typeof data46 == "number") && (!(data46 % 1) && !isNaN(data46))) && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if((typeof data46 == "number") && (isFinite(data46))){if(data46 < 0 || isNaN(data46)){const err88 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}if(data29.via !== undefined){let data47 = data29.via;if(Array.isArray(data47)){const len7 = data47.length;for(let i3=0; i3<len7; i3++){let data48 = data47[i3];if(Array.isArray(data48)){if(data48.length > 2){const err89 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data48.length < 2){const err90 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}const len8 = data48.length;if(len8 > 0){let data49 = data48[0];if(!((typeof data49 == "number") && (isFinite(data49)))){const err91 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(len8 > 1){let data50 = data48[1];if(!((typeof data50 == "number") && (isFinite(data50)))){const err92 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}const len9 = data48.length;if(!(len9 <= 2)){const err93 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}else {const err94 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}else {const err95 = {instancePath:instancePath+"/flows/" + i2+"/via",schemaPath:"#/properties/flows/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data29.width !== undefined){let data51 = data29.width;if((typeof data51 == "number") && (isFinite(data51))){if(data51 < 0.5 || isNaN(data51)){const err96 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}}else {const err98 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}else {const err99 = {instancePath:instancePath+"/flows",schemaPath:"#/properties/flows/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data.cards !== undefined){let data52 = data.cards;if(Array.isArray(data52)){const len10 = data52.length;for(let i4=0; i4<len10; i4++){let data53 = data52[i4];if(data53 && typeof data53 == "object" && !Array.isArray(data53)){if(data53.dot === undefined){const err100 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data53.title === undefined){const err101 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}if(data53.items === undefined){const err102 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}for(const key5 in data53){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err103 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data53.dot !== undefined){let data54 = data53.dot;if(!(((((((data54 === "cyan") || (data54 === "emerald")) || (data54 === "violet")) || (data54 === "amber")) || (data54 === "rose")) || (data54 === "orange")) || (data54 === "slate"))){const err104 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data53.title !== undefined){let data55 = data53.title;if(typeof data55 === "string"){if(func2(data55) < 1){const err105 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}else {const err106 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data53.items !== undefined){let data56 = data53.items;if(Array.isArray(data56)){const len11 = data56.length;for(let i5=0; i5<len11; i5++){if(typeof data56[i5] !== "string"){const err107 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}}else {const err108 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}}else {const err109 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}}else {const err110 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const lifecycle = validate30;const schema78 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json","title":"Archify Lifecycle Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","states","transitions"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"lifecycle"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint","editorial"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":420},{"type":"number","minimum":566}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1}}}},"states":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","lane","col"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"enum":["start","active","waiting","decision","success","failure","neutral","external"]},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"step":{"type":"string"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":4},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"transitions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"note":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","drop","bottom-channel","top-channel","right-channel","left-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"cornerRadius":{"type":"number","minimum":0},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate31.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate31.errors = vErrors;return errors === 0;}validate31.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.states === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "states"},message:"must have required property '"+"states"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.transitions === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transitions"},message:"must have required property '"+"transitions"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "lanes")) || (key0 === "states")) || (key0 === "transitions")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("lifecycle" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "lifecycle"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!((((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint")) || (data7 === "editorial"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate31(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 420 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 420},message:"must be >= 420"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 566 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 566},message:"must be >= 566"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length > 4){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 1){const err28 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data14.label === undefined){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}for(const key2 in data14){if(!((key2 === "id") || (key2 === "label"))){const err31 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.states !== undefined){let data17 = data.states;if(Array.isArray(data17)){if(data17.length < 2){const err38 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len3 = data17.length;for(let i1=0; i1<len3; i1++){let data18 = data17[i1];if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.id === undefined){const err39 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data18.type === undefined){const err40 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data18.label === undefined){const err41 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data18.lane === undefined){const err42 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data18.col === undefined){const err43 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key3 in data18){if(!(func1.call(schema78.properties.states.items.properties, key3))){const err44 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data18.id !== undefined){let data19 = data18.id;if(typeof data19 === "string"){if(!pattern4.test(data19)){const err45 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data18.type !== undefined){let data20 = data18.type;if(!((((((((data20 === "start") || (data20 === "active")) || (data20 === "waiting")) || (data20 === "decision")) || (data20 === "success")) || (data20 === "failure")) || (data20 === "neutral")) || (data20 === "external"))){const err47 = {instancePath:instancePath+"/states/" + i1+"/type",schemaPath:"#/properties/states/items/properties/type/enum",keyword:"enum",params:{allowedValues: schema78.properties.states.items.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data18.label !== undefined){let data21 = data18.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err48 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data18.sublabel !== undefined){if(typeof data18.sublabel !== "string"){const err50 = {instancePath:instancePath+"/states/" + i1+"/sublabel",schemaPath:"#/properties/states/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data18.tag !== undefined){if(typeof data18.tag !== "string"){const err51 = {instancePath:instancePath+"/states/" + i1+"/tag",schemaPath:"#/properties/states/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data18.step !== undefined){if(typeof data18.step !== "string"){const err52 = {instancePath:instancePath+"/states/" + i1+"/step",schemaPath:"#/properties/states/items/properties/step/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data18.lane !== undefined){let data25 = data18.lane;if(typeof data25 === "string"){if(!pattern4.test(data25)){const err53 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data18.col !== undefined){let data26 = data18.col;if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){const err55 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if((typeof data26 == "number") && (isFinite(data26))){if(data26 > 4 || isNaN(data26)){const err56 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4},message:"must be <= 4"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26 < 0 || isNaN(data26)){const err57 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}if(data18.width !== undefined){let data27 = data18.width;if((typeof data27 == "number") && (isFinite(data27))){if(data27 < 48 || isNaN(data27)){const err58 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data18.height !== undefined){let data28 = data18.height;if((typeof data28 == "number") && (isFinite(data28))){if(data28 < 36 || isNaN(data28)){const err60 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data18.yOffset !== undefined){let data29 = data18.yOffset;if(!((typeof data29 == "number") && (isFinite(data29)))){const err62 = {instancePath:instancePath+"/states/" + i1+"/yOffset",schemaPath:"#/properties/states/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}else {const err64 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data.transitions !== undefined){let data30 = data.transitions;if(Array.isArray(data30)){const len4 = data30.length;for(let i2=0; i2<len4; i2++){let data31 = data30[i2];if(data31 && typeof data31 == "object" && !Array.isArray(data31)){if(data31.from === undefined){const err65 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data31.to === undefined){const err66 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data31){if(!(func1.call(schema78.properties.transitions.items.properties, key4))){const err67 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data31.id !== undefined){let data32 = data31.id;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data31.from !== undefined){let data33 = data31.from;if(typeof data33 === "string"){if(!pattern4.test(data33)){const err70 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data31.to !== undefined){let data34 = data31.to;if(typeof data34 === "string"){if(!pattern4.test(data34)){const err72 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data31.label !== undefined){if(typeof data31.label !== "string"){const err74 = {instancePath:instancePath+"/transitions/" + i2+"/label",schemaPath:"#/properties/transitions/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data31.note !== undefined){if(typeof data31.note !== "string"){const err75 = {instancePath:instancePath+"/transitions/" + i2+"/note",schemaPath:"#/properties/transitions/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data31.variant !== undefined){let data37 = data31.variant;if(!((((data37 === "default") || (data37 === "emphasis")) || (data37 === "security")) || (data37 === "dashed"))){const err76 = {instancePath:instancePath+"/transitions/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data31.route !== undefined){let data38 = data31.route;if(!(((((((data38 === "auto") || (data38 === "straight")) || (data38 === "drop")) || (data38 === "bottom-channel")) || (data38 === "top-channel")) || (data38 === "right-channel")) || (data38 === "left-channel"))){const err77 = {instancePath:instancePath+"/transitions/" + i2+"/route",schemaPath:"#/properties/transitions/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data31.fromSide !== undefined){let data39 = data31.fromSide;if(!((((data39 === "left") || (data39 === "right")) || (data39 === "top")) || (data39 === "bottom"))){const err78 = {instancePath:instancePath+"/transitions/" + i2+"/fromSide",schemaPath:"#/properties/transitions/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data31.toSide !== undefined){let data40 = data31.toSide;if(!((((data40 === "left") || (data40 === "right")) || (data40 === "top")) || (data40 === "bottom"))){const err79 = {instancePath:instancePath+"/transitions/" + i2+"/toSide",schemaPath:"#/properties/transitions/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data31.channelX !== undefined){let data41 = data31.channelX;if(!((typeof data41 == "number") && (isFinite(data41)))){const err80 = {instancePath:instancePath+"/transitions/" + i2+"/channelX",schemaPath:"#/properties/transitions/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data31.channelY !== undefined){let data42 = data31.channelY;if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/transitions/" + i2+"/channelY",schemaPath:"#/properties/transitions/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data31.cornerRadius !== undefined){let data43 = data31.cornerRadius;if((typeof data43 == "number") && (isFinite(data43))){if(data43 < 0 || isNaN(data43)){const err82 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}else {const err83 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data31.labelAt !== undefined){let data44 = data31.labelAt;if(Array.isArray(data44)){if(data44.length > 2){const err84 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data44.length < 2){const err85 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len5 = data44.length;if(len5 > 0){let data45 = data44[0];if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(len5 > 1){let data46 = data44[1];if(!((typeof data46 == "number") && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}const len6 = data44.length;if(!(len6 <= 2)){const err88 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data31.labelDx !== undefined){let data47 = data31.labelDx;if(!((typeof data47 == "number") && (isFinite(data47)))){const err90 = {instancePath:instancePath+"/transitions/" + i2+"/labelDx",schemaPath:"#/properties/transitions/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data31.labelDy !== undefined){let data48 = data31.labelDy;if(!((typeof data48 == "number") && (isFinite(data48)))){const err91 = {instancePath:instancePath+"/transitions/" + i2+"/labelDy",schemaPath:"#/properties/transitions/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data31.labelSegment !== undefined){let data49 = data31.labelSegment;if(!(((typeof data49 == "number") && (!(data49 % 1) && !isNaN(data49))) && (isFinite(data49)))){const err92 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data49 == "number") && (isFinite(data49))){if(data49 < 0 || isNaN(data49)){const err93 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}if(data31.via !== undefined){let data50 = data31.via;if(Array.isArray(data50)){const len7 = data50.length;for(let i3=0; i3<len7; i3++){let data51 = data50[i3];if(Array.isArray(data51)){if(data51.length > 2){const err94 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data51.length < 2){const err95 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}const len8 = data51.length;if(len8 > 0){let data52 = data51[0];if(!((typeof data52 == "number") && (isFinite(data52)))){const err96 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data53 = data51[1];if(!((typeof data53 == "number") && (isFinite(data53)))){const err97 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}const len9 = data51.length;if(!(len9 <= 2)){const err98 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/transitions/" + i2+"/via",schemaPath:"#/properties/transitions/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data31.width !== undefined){let data54 = data31.width;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0.5 || isNaN(data54)){const err101 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}else {const err102 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}}else {const err104 = {instancePath:instancePath+"/transitions",schemaPath:"#/properties/transitions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data.cards !== undefined){let data55 = data.cards;if(Array.isArray(data55)){const len10 = data55.length;for(let i4=0; i4<len10; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.dot === undefined){const err105 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data56.title === undefined){const err106 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data56.items === undefined){const err107 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}for(const key5 in data56){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err108 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data56.dot !== undefined){let data57 = data56.dot;if(!(((((((data57 === "cyan") || (data57 === "emerald")) || (data57 === "violet")) || (data57 === "amber")) || (data57 === "rose")) || (data57 === "orange")) || (data57 === "slate"))){const err109 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data56.title !== undefined){let data58 = data56.title;if(typeof data58 === "string"){if(func2(data58) < 1){const err110 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data56.items !== undefined){let data59 = data56.items;if(Array.isArray(data59)){const len11 = data59.length;for(let i5=0; i5<len11; i5++){if(typeof data59[i5] !== "string"){const err112 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}}else {const err114 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}else {const err115 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const architecture = validate33;const schema92 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/architecture.schema.json","title":"Archify Architecture Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","components"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"architecture"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint","editorial"]},"quality_profile":{"enum":["standard","showcase"]},"engineering_profile":{"enum":["deployment-ownership"]},"repository":{"type":"object","additionalProperties":false,"required":["url","revision"],"properties":{"url":{"type":"string","pattern":"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},"revision":{"type":"string","pattern":"^[a-fA-F0-9]{40}$"}}},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":320},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"layout":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"enum":["grid"]},"origin":{"$ref":"common.schema.json#/$defs/point"},"cols":{"type":"integer","minimum":1,"maximum":12},"gapX":{"type":"number","minimum":0},"gapY":{"type":"number","minimum":0},"cellW":{"type":"number","minimum":40},"cellH":{"type":"number","minimum":24}}},"components":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"sources":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":240},"line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1},"label":{"type":"string","minLength":1,"maxLength":48}}}},"row":{"type":"integer","minimum":0},"col":{"type":"integer","minimum":0},"pos":{"$ref":"common.schema.json#/$defs/point"},"size":{"type":"array","prefixItems":[{"type":"number","exclusiveMinimum":0},{"type":"number","exclusiveMinimum":0}],"items":false,"minItems":2,"maxItems":2}}}},"boundaries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","label","wraps"],"properties":{"kind":{"enum":["region","security-group"]},"label":{"type":"string","minLength":1},"wraps":{"type":"array","minItems":1,"items":{"$ref":"common.schema.json#/$defs/id"}},"pad":{"type":"number","minimum":0}}}},"connections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"route":{"enum":["auto","straight","orthogonal-h","orthogonal-v"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};const pattern37 = new RegExp("^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$", "u");const pattern38 = new RegExp("^[a-fA-F0-9]{40}$", "u");function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate34.errors = vErrors;return errors === 0;}validate34.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/architecture.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate33.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.components === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "components"},message:"must have required property '"+"components"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "layout")) || (key0 === "components")) || (key0 === "boundaries")) || (key0 === "connections")) || (key0 === "cards"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err5 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.diagram_type !== undefined){if("architecture" !== data.diagram_type){const err6 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "architecture"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err7 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data2){if(!(func1.call(schema92.properties.meta.properties, key1))){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err9 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err11 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err12 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err13 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!((((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint")) || (data7 === "editorial"))){const err14 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err15 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.engineering_profile !== undefined){if(!(data2.engineering_profile === "deployment-ownership")){const err16 = {instancePath:instancePath+"/meta/engineering_profile",schemaPath:"#/properties/meta/properties/engineering_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.engineering_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.repository !== undefined){let data10 = data2.repository;if(data10 && typeof data10 == "object" && !Array.isArray(data10)){if(data10.url === undefined){const err17 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.revision === undefined){const err18 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}for(const key2 in data10){if(!((key2 === "url") || (key2 === "revision"))){const err19 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data10.url !== undefined){let data11 = data10.url;if(typeof data11 === "string"){if(!pattern37.test(data11)){const err20 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/pattern",keyword:"pattern",params:{pattern: "^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},message:"must match pattern \""+"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"+"\""};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data10.revision !== undefined){let data12 = data10.revision;if(typeof data12 === "string"){if(!pattern38.test(data12)){const err22 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{40}$"},message:"must match pattern \""+"^[a-fA-F0-9]{40}$"+"\""};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data2.views !== undefined){if(!(validate34(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data14 = data2.viewBox;if(Array.isArray(data14)){if(data14.length > 2){const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data14.length < 2){const err26 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len0 = data14.length;if(len0 > 0){let data15 = data14[0];if((typeof data15 == "number") && (isFinite(data15))){if(data15 < 320 || isNaN(data15)){const err27 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 320},message:"must be >= 320"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}else {const err28 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(len0 > 1){let data16 = data14[1];if((typeof data16 == "number") && (isFinite(data16))){if(data16 < 240 || isNaN(data16)){const err29 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else {const err30 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}const len1 = data14.length;if(!(len1 <= 2)){const err31 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.layout !== undefined){let data17 = data.layout;if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.mode === undefined){const err34 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}for(const key3 in data17){if(!(((((((key3 === "mode") || (key3 === "origin")) || (key3 === "cols")) || (key3 === "gapX")) || (key3 === "gapY")) || (key3 === "cellW")) || (key3 === "cellH"))){const err35 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data17.mode !== undefined){if(!(data17.mode === "grid")){const err36 = {instancePath:instancePath+"/layout/mode",schemaPath:"#/properties/layout/properties/mode/enum",keyword:"enum",params:{allowedValues: schema92.properties.layout.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data17.origin !== undefined){let data19 = data17.origin;if(Array.isArray(data19)){if(data19.length > 2){const err37 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data19.length < 2){const err38 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len2 = data19.length;if(len2 > 0){let data20 = data19[0];if(!((typeof data20 == "number") && (isFinite(data20)))){const err39 = {instancePath:instancePath+"/layout/origin/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(len2 > 1){let data21 = data19[1];if(!((typeof data21 == "number") && (isFinite(data21)))){const err40 = {instancePath:instancePath+"/layout/origin/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}const len3 = data19.length;if(!(len3 <= 2)){const err41 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}else {const err42 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data17.cols !== undefined){let data22 = data17.cols;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err43 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 12 || isNaN(data22)){const err44 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data22 < 1 || isNaN(data22)){const err45 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}}if(data17.gapX !== undefined){let data23 = data17.gapX;if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err46 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}else {const err47 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.gapY !== undefined){let data24 = data17.gapY;if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err48 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data17.cellW !== undefined){let data25 = data17.cellW;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 40 || isNaN(data25)){const err50 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/minimum",keyword:"minimum",params:{comparison: ">=", limit: 40},message:"must be >= 40"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}else {const err51 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data17.cellH !== undefined){let data26 = data17.cellH;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 24 || isNaN(data26)){const err52 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/minimum",keyword:"minimum",params:{comparison: ">=", limit: 24},message:"must be >= 24"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}else {const err53 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data.components !== undefined){let data27 = data.components;if(Array.isArray(data27)){if(data27.length < 1){const err55 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}const len4 = data27.length;for(let i0=0; i0<len4; i0++){let data28 = data27[i0];if(data28 && typeof data28 == "object" && !Array.isArray(data28)){if(data28.id === undefined){const err56 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data28.type === undefined){const err57 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data28.label === undefined){const err58 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}for(const key4 in data28){if(!(func1.call(schema92.properties.components.items.properties, key4))){const err59 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data28.id !== undefined){let data29 = data28.id;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err60 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data28.type !== undefined){let data30 = data28.type;if(!(((((((data30 === "frontend") || (data30 === "backend")) || (data30 === "database")) || (data30 === "cloud")) || (data30 === "security")) || (data30 === "messagebus")) || (data30 === "external"))){const err62 = {instancePath:instancePath+"/components/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data28.label !== undefined){let data31 = data28.label;if(typeof data31 === "string"){if(func2(data31) < 1){const err63 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data28.sublabel !== undefined){if(typeof data28.sublabel !== "string"){const err65 = {instancePath:instancePath+"/components/" + i0+"/sublabel",schemaPath:"#/properties/components/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data28.tag !== undefined){if(typeof data28.tag !== "string"){const err66 = {instancePath:instancePath+"/components/" + i0+"/tag",schemaPath:"#/properties/components/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}if(data28.sources !== undefined){let data34 = data28.sources;if(Array.isArray(data34)){if(data34.length > 3){const err67 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/maxItems",keyword:"maxItems",params:{limit: 3},message:"must NOT have more than 3 items"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data34.length < 1){const err68 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}const len5 = data34.length;for(let i1=0; i1<len5; i1++){let data35 = data34[i1];if(data35 && typeof data35 == "object" && !Array.isArray(data35)){if(data35.path === undefined){const err69 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}for(const key5 in data35){if(!((((key5 === "path") || (key5 === "line")) || (key5 === "end_line")) || (key5 === "label"))){const err70 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}if(data35.path !== undefined){let data36 = data35.path;if(typeof data36 === "string"){if(func2(data36) > 240){const err71 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/maxLength",keyword:"maxLength",params:{limit: 240},message:"must NOT have more than 240 characters"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(func2(data36) < 1){const err72 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data35.line !== undefined){let data37 = data35.line;if(!(((typeof data37 == "number") && (!(data37 % 1) && !isNaN(data37))) && (isFinite(data37)))){const err74 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}if((typeof data37 == "number") && (isFinite(data37))){if(data37 < 1 || isNaN(data37)){const err75 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}if(data35.end_line !== undefined){let data38 = data35.end_line;if(!(((typeof data38 == "number") && (!(data38 % 1) && !isNaN(data38))) && (isFinite(data38)))){const err76 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}if((typeof data38 == "number") && (isFinite(data38))){if(data38 < 1 || isNaN(data38)){const err77 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}if(data35.label !== undefined){let data39 = data35.label;if(typeof data39 === "string"){if(func2(data39) > 48){const err78 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(func2(data39) < 1){const err79 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}else {const err80 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}else {const err81 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}}else {const err82 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}if(data28.row !== undefined){let data40 = data28.row;if(!(((typeof data40 == "number") && (!(data40 % 1) && !isNaN(data40))) && (isFinite(data40)))){const err83 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if((typeof data40 == "number") && (isFinite(data40))){if(data40 < 0 || isNaN(data40)){const err84 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}}if(data28.col !== undefined){let data41 = data28.col;if(!(((typeof data41 == "number") && (!(data41 % 1) && !isNaN(data41))) && (isFinite(data41)))){const err85 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if((typeof data41 == "number") && (isFinite(data41))){if(data41 < 0 || isNaN(data41)){const err86 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}}if(data28.pos !== undefined){let data42 = data28.pos;if(Array.isArray(data42)){if(data42.length > 2){const err87 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if(data42.length < 2){const err88 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}const len6 = data42.length;if(len6 > 0){let data43 = data42[0];if(!((typeof data43 == "number") && (isFinite(data43)))){const err89 = {instancePath:instancePath+"/components/" + i0+"/pos/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(len6 > 1){let data44 = data42[1];if(!((typeof data44 == "number") && (isFinite(data44)))){const err90 = {instancePath:instancePath+"/components/" + i0+"/pos/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}const len7 = data42.length;if(!(len7 <= 2)){const err91 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}else {const err92 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}if(data28.size !== undefined){let data45 = data28.size;if(Array.isArray(data45)){if(data45.length > 2){const err93 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data45.length < 2){const err94 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}const len8 = data45.length;if(len8 > 0){let data46 = data45[0];if((typeof data46 == "number") && (isFinite(data46))){if(data46 <= 0 || isNaN(data46)){const err95 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}else {const err96 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data47 = data45[1];if((typeof data47 == "number") && (isFinite(data47))){if(data47 <= 0 || isNaN(data47)){const err97 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}else {const err98 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}const len9 = data45.length;if(!(len9 <= 2)){const err99 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}else {const err100 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}}else {const err101 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}else {const err102 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}if(data.boundaries !== undefined){let data48 = data.boundaries;if(Array.isArray(data48)){const len10 = data48.length;for(let i2=0; i2<len10; i2++){let data49 = data48[i2];if(data49 && typeof data49 == "object" && !Array.isArray(data49)){if(data49.kind === undefined){const err103 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data49.label === undefined){const err104 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data49.wraps === undefined){const err105 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "wraps"},message:"must have required property '"+"wraps"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}for(const key6 in data49){if(!((((key6 === "kind") || (key6 === "label")) || (key6 === "wraps")) || (key6 === "pad"))){const err106 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data49.kind !== undefined){let data50 = data49.kind;if(!((data50 === "region") || (data50 === "security-group"))){const err107 = {instancePath:instancePath+"/boundaries/" + i2+"/kind",schemaPath:"#/properties/boundaries/items/properties/kind/enum",keyword:"enum",params:{allowedValues: schema92.properties.boundaries.items.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}if(data49.label !== undefined){let data51 = data49.label;if(typeof data51 === "string"){if(func2(data51) < 1){const err108 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}else {const err109 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data49.wraps !== undefined){let data52 = data49.wraps;if(Array.isArray(data52)){if(data52.length < 1){const err110 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}const len11 = data52.length;for(let i3=0; i3<len11; i3++){let data53 = data52[i3];if(typeof data53 === "string"){if(!pattern4.test(data53)){const err111 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}else {const err112 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data49.pad !== undefined){let data54 = data49.pad;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0 || isNaN(data54)){const err114 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}}else {const err117 = {instancePath:instancePath+"/boundaries",schemaPath:"#/properties/boundaries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data.connections !== undefined){let data55 = data.connections;if(Array.isArray(data55)){const len12 = data55.length;for(let i4=0; i4<len12; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.from === undefined){const err118 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}if(data56.to === undefined){const err119 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}for(const key7 in data56){if(!(func1.call(schema92.properties.connections.items.properties, key7))){const err120 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data56.id !== undefined){let data57 = data56.id;if(typeof data57 === "string"){if(!pattern4.test(data57)){const err121 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}else {const err122 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}}if(data56.from !== undefined){let data58 = data56.from;if(typeof data58 === "string"){if(!pattern4.test(data58)){const err123 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}else {const err124 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(data56.to !== undefined){let data59 = data56.to;if(typeof data59 === "string"){if(!pattern4.test(data59)){const err125 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}else {const err126 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}if(data56.label !== undefined){if(typeof data56.label !== "string"){const err127 = {instancePath:instancePath+"/connections/" + i4+"/label",schemaPath:"#/properties/connections/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data56.variant !== undefined){let data61 = data56.variant;if(!((((data61 === "default") || (data61 === "emphasis")) || (data61 === "security")) || (data61 === "dashed"))){const err128 = {instancePath:instancePath+"/connections/" + i4+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data56.fromSide !== undefined){let data62 = data56.fromSide;if(!((((data62 === "left") || (data62 === "right")) || (data62 === "top")) || (data62 === "bottom"))){const err129 = {instancePath:instancePath+"/connections/" + i4+"/fromSide",schemaPath:"#/properties/connections/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}if(data56.toSide !== undefined){let data63 = data56.toSide;if(!((((data63 === "left") || (data63 === "right")) || (data63 === "top")) || (data63 === "bottom"))){const err130 = {instancePath:instancePath+"/connections/" + i4+"/toSide",schemaPath:"#/properties/connections/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}}if(data56.route !== undefined){let data64 = data56.route;if(!((((data64 === "auto") || (data64 === "straight")) || (data64 === "orthogonal-h")) || (data64 === "orthogonal-v"))){const err131 = {instancePath:instancePath+"/connections/" + i4+"/route",schemaPath:"#/properties/connections/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data56.via !== undefined){let data65 = data56.via;if(Array.isArray(data65)){const len13 = data65.length;for(let i5=0; i5<len13; i5++){let data66 = data65[i5];if(Array.isArray(data66)){if(data66.length > 2){const err132 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}if(data66.length < 2){const err133 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}const len14 = data66.length;if(len14 > 0){let data67 = data66[0];if(!((typeof data67 == "number") && (isFinite(data67)))){const err134 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(len14 > 1){let data68 = data66[1];if(!((typeof data68 == "number") && (isFinite(data68)))){const err135 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}const len15 = data66.length;if(!(len15 <= 2)){const err136 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}else {const err137 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}}else {const err138 = {instancePath:instancePath+"/connections/" + i4+"/via",schemaPath:"#/properties/connections/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}if(data56.labelAt !== undefined){let data69 = data56.labelAt;if(Array.isArray(data69)){if(data69.length > 2){const err139 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}if(data69.length < 2){const err140 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}const len16 = data69.length;if(len16 > 0){let data70 = data69[0];if(!((typeof data70 == "number") && (isFinite(data70)))){const err141 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}}if(len16 > 1){let data71 = data69[1];if(!((typeof data71 == "number") && (isFinite(data71)))){const err142 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}const len17 = data69.length;if(!(len17 <= 2)){const err143 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}else {const err144 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data56.labelDx !== undefined){let data72 = data56.labelDx;if(!((typeof data72 == "number") && (isFinite(data72)))){const err145 = {instancePath:instancePath+"/connections/" + i4+"/labelDx",schemaPath:"#/properties/connections/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}if(data56.labelDy !== undefined){let data73 = data56.labelDy;if(!((typeof data73 == "number") && (isFinite(data73)))){const err146 = {instancePath:instancePath+"/connections/" + i4+"/labelDy",schemaPath:"#/properties/connections/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}if(data56.labelSegment !== undefined){let data74 = data56.labelSegment;if(!(((typeof data74 == "number") && (!(data74 % 1) && !isNaN(data74))) && (isFinite(data74)))){const err147 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}if((typeof data74 == "number") && (isFinite(data74))){if(data74 < 0 || isNaN(data74)){const err148 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}}if(data56.width !== undefined){let data75 = data56.width;if((typeof data75 == "number") && (isFinite(data75))){if(data75 < 0.5 || isNaN(data75)){const err149 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}else {const err150 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}}}else {const err151 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}}else {const err152 = {instancePath:instancePath+"/connections",schemaPath:"#/properties/connections/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data.cards !== undefined){let data76 = data.cards;if(Array.isArray(data76)){const len18 = data76.length;for(let i6=0; i6<len18; i6++){let data77 = data76[i6];if(data77 && typeof data77 == "object" && !Array.isArray(data77)){if(data77.dot === undefined){const err153 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}if(data77.title === undefined){const err154 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}if(data77.items === undefined){const err155 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}for(const key8 in data77){if(!(((key8 === "dot") || (key8 === "title")) || (key8 === "items"))){const err156 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}if(data77.dot !== undefined){let data78 = data77.dot;if(!(((((((data78 === "cyan") || (data78 === "emerald")) || (data78 === "violet")) || (data78 === "amber")) || (data78 === "rose")) || (data78 === "orange")) || (data78 === "slate"))){const err157 = {instancePath:instancePath+"/cards/" + i6+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}if(data77.title !== undefined){let data79 = data77.title;if(typeof data79 === "string"){if(func2(data79) < 1){const err158 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}else {const err159 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}}if(data77.items !== undefined){let data80 = data77.items;if(Array.isArray(data80)){const len19 = data80.length;for(let i7=0; i7<len19; i7++){if(typeof data80[i7] !== "string"){const err160 = {instancePath:instancePath+"/cards/" + i6+"/items/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}}else {const err161 = {instancePath:instancePath+"/cards/" + i6+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}}else {const err162 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}}}else {const err163 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}}}else {const err164 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err164];}else {vErrors.push(err164);}errors++;}validate33.errors = vErrors;return errors === 0;}validate33.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
diff --git a/archify/schemas/README.md b/archify/schemas/README.md
index 57373dbe..e07e7bf7 100644
--- a/archify/schemas/README.md
+++ b/archify/schemas/README.md
@@ -22,7 +22,8 @@ level, so unknown fields are rejected rather than silently ignored.
Every `meta` object also accepts `animation: "trace"` for opt-in SVG/CSS motion
in generated HTML. Omit it, or set `"none"`, for the default static output.
`visual_preset` accepts `classic` (the stable default), `signal-flow` (luminous
-motion-forward presentation), or `blueprint` (high-contrast engineering review).
+motion-forward presentation), `blueprint` (high-contrast engineering review),
+or `editorial` (warm publication-style design review and documentation).
Presets change only viewer styling; they do not alter semantic IDs or geometry.
It may also include up to five guided `views`. Each view has a unique `id`, a
reader-facing `label`, a non-empty `focus` list of existing semantic node IDs,
diff --git a/archify/schemas/architecture.schema.json b/archify/schemas/architecture.schema.json
index a99b40ed..03c10309 100644
--- a/archify/schemas/architecture.schema.json
+++ b/archify/schemas/architecture.schema.json
@@ -17,7 +17,7 @@
"subtitle": { "type": "string" },
"output": { "type": "string" },
"animation": { "enum": ["trace", "none"] },
- "visual_preset": { "enum": ["classic", "signal-flow", "blueprint"] },
+ "visual_preset": { "enum": ["classic", "signal-flow", "blueprint", "editorial"] },
"quality_profile": { "enum": ["standard", "showcase"] },
"engineering_profile": { "enum": ["deployment-ownership"] },
"repository": {
diff --git a/archify/schemas/dataflow.schema.json b/archify/schemas/dataflow.schema.json
index 491bd7be..0b43e0be 100644
--- a/archify/schemas/dataflow.schema.json
+++ b/archify/schemas/dataflow.schema.json
@@ -46,7 +46,8 @@
"enum": [
"classic",
"signal-flow",
- "blueprint"
+ "blueprint",
+ "editorial"
]
},
"quality_profile": {
diff --git a/archify/schemas/lifecycle.schema.json b/archify/schemas/lifecycle.schema.json
index bb8b60d4..82704618 100644
--- a/archify/schemas/lifecycle.schema.json
+++ b/archify/schemas/lifecycle.schema.json
@@ -46,7 +46,8 @@
"enum": [
"classic",
"signal-flow",
- "blueprint"
+ "blueprint",
+ "editorial"
]
},
"quality_profile": {
diff --git a/archify/schemas/sequence.schema.json b/archify/schemas/sequence.schema.json
index cade34d3..4cf114c5 100644
--- a/archify/schemas/sequence.schema.json
+++ b/archify/schemas/sequence.schema.json
@@ -45,7 +45,8 @@
"enum": [
"classic",
"signal-flow",
- "blueprint"
+ "blueprint",
+ "editorial"
]
},
"quality_profile": {
diff --git a/archify/schemas/workflow.schema.json b/archify/schemas/workflow.schema.json
index 08dfed1a..98df53a9 100644
--- a/archify/schemas/workflow.schema.json
+++ b/archify/schemas/workflow.schema.json
@@ -46,7 +46,8 @@
"enum": [
"classic",
"signal-flow",
- "blueprint"
+ "blueprint",
+ "editorial"
]
},
"quality_profile": {
diff --git a/archify/test/animation.test.mjs b/archify/test/animation.test.mjs
index 92be982e..dffb9955 100644
--- a/archify/test/animation.test.mjs
+++ b/archify/test/animation.test.mjs
@@ -114,6 +114,18 @@ test('blueprint preset is accepted by all five typed renderers', () => {
}
});
+test('editorial preset reaches every visual surface and all five typed renderers', () => {
+ for (const [mode, example] of Object.entries(CASES)) {
+ const html = render(mode, example, null, 'editorial');
+ assert.match(html, /<html lang="en" data-theme="dark" data-preset="editorial">/, mode);
+ assert.match(svgBlock(html), /data-preset="editorial"/, mode);
+ assert.match(html, /content: "EDITORIAL \/ FIELD NOTE"/, mode);
+ assert.match(html, /\[data-preset="editorial"\]\[data-theme="dark"\]/, mode);
+ assert.match(html, /html\[data-preset="editorial"\] \.diagram-container/, mode);
+ assert.match(html, /svg\[data-preset="editorial"\] \.story-trail-flow/, mode);
+ }
+});
+
test('all five renderers add one geometry-neutral semantic sigil per primary node', () => {
for (const [mode, example] of Object.entries(CASES)) {
const source = JSON.parse(fs.readFileSync(path.join(skillRoot, 'examples', example), 'utf8'));
diff --git a/archify/test/golden.mjs b/archify/test/golden.mjs
index 026c7430..28245f48 100644
--- a/archify/test/golden.mjs
+++ b/archify/test/golden.mjs
@@ -1,6 +1,6 @@
// Golden-file harness for the archify renderers. No test framework needed:
-// renderers are deterministic, so fresh renders must match the checked-in
-// example HTML aside from platform checkout line endings. Also covers schema enforcement (negative cases),
+// renderers are deterministic, so fresh renders must match both checked-in
+// development and packaged example HTML aside from platform checkout line endings. Also covers schema enforcement (negative cases),
// template freshness of the architecture-mode example, and version sync.
//
// Run from the skill folder: npm test
@@ -56,8 +56,11 @@ for (const [mode, input, golden] of GOLDEN) {
render(mode, path.join(skillRoot, 'examples', input), out);
const fresh = fs.readFileSync(out, 'utf8');
const checked = fs.readFileSync(path.join(repoRoot, 'examples', golden), 'utf8');
+ const packaged = fs.readFileSync(path.join(skillRoot, 'examples', golden), 'utf8');
check(`${mode}: ${golden}`, normalizeNewlines(fresh) === normalizeNewlines(checked),
`fresh render differs from examples/${golden}; if the change is intentional, re-render the examples and commit them`);
+ check(`${mode}: packaged ${golden}`, normalizeNewlines(fresh) === normalizeNewlines(packaged),
+ `fresh render differs from archify/examples/${golden}; re-render the packaged examples and rebuild archify.zip`);
} catch (err) {
check(`${mode}: ${golden}`, false, String(err.stderr || err.message).slice(0, 300));
}
diff --git a/archify/test/guide.test.mjs b/archify/test/guide.test.mjs
index e10806a8..939cba0f 100644
--- a/archify/test/guide.test.mjs
+++ b/archify/test/guide.test.mjs
@@ -24,7 +24,7 @@ test('guide: every recipe has complete English and Chinese decision copy', () =>
for (const recipe of SCENARIO_RECIPES) {
assert.match(recipe.id, /^[a-z0-9]+(?:-[a-z0-9]+)*$/);
assert.ok(recipe.signals.length >= 8, recipe.id);
- assert.ok(['classic', 'signal-flow', 'blueprint'].includes(recipe.presentation.preset), recipe.id);
+ assert.ok(['classic', 'signal-flow', 'blueprint', 'editorial'].includes(recipe.presentation.preset), recipe.id);
for (const lang of ['en', 'zh']) {
const copy = recipe[lang];
assert.ok(copy.title.length >= 4, `${recipe.id}.${lang}.title`);
diff --git a/archify/test/preset-tryon.test.mjs b/archify/test/preset-tryon.test.mjs
index ecc2868f..2e5a90eb 100644
--- a/archify/test/preset-tryon.test.mjs
+++ b/archify/test/preset-tryon.test.mjs
@@ -51,7 +51,7 @@ test('all five renderers expose one reader-controlled visual style cycle', () =>
test('style cycle synchronizes page and canonical SVG without touching geometry', () => {
const html = render('architecture');
const runtime = presetRuntime(html);
- assert.match(runtime, /\['classic', 'signal-flow', 'blueprint'\]/);
+ assert.match(runtime, /\['classic', 'signal-flow', 'blueprint', 'editorial'\]/);
assert.match(runtime, /html\.setAttribute\('data-preset', preset\)/);
assert.match(runtime, /svg\.setAttribute\('data-preset', preset\)/);
assert.match(runtime, /data-preset-option/);
@@ -67,11 +67,12 @@ test('style try-on is session-only and unavailable to passive embeds', () => {
assert.match(html, /@media print/);
});
-test('same topology keeps identical canonical SVG geometry across all three styles', () => {
- const normalize = (svg) => svg.replace(/ data-preset="(?:classic|signal-flow|blueprint)"/, '');
- const variants = ['classic', 'signal-flow', 'blueprint'].map((preset) => normalize(svgBlock(render('architecture', preset))));
+test('same topology keeps identical canonical SVG geometry across all four styles', () => {
+ const normalize = (svg) => svg.replace(/ data-preset="(?:classic|signal-flow|blueprint|editorial)"/, '');
+ const variants = ['classic', 'signal-flow', 'blueprint', 'editorial'].map((preset) => normalize(svgBlock(render('architecture', preset))));
assert.equal(variants[1], variants[0]);
assert.equal(variants[2], variants[0]);
+ assert.equal(variants[3], variants[0]);
});
process.on('exit', () => fs.rmSync(tmp, { recursive: true, force: true }));
diff --git a/archify/test/webm-artifact.smoke.mjs b/archify/test/webm-artifact.smoke.mjs
index c4904037..4b4e55bf 100644
--- a/archify/test/webm-artifact.smoke.mjs
+++ b/archify/test/webm-artifact.smoke.mjs
@@ -1180,7 +1180,7 @@ try {
}
var identity = JSON.stringify(Archify.routeProbe.exportSnapshot());
var results = [];
- for (var preset of ['classic', 'signal-flow', 'blueprint']) {
+ for (var preset of ['classic', 'signal-flow', 'blueprint', 'editorial']) {
if (!Archify.preset.apply(preset)) throw new Error('could not apply preset ' + preset);
for (var theme of ['dark', 'light']) {
document.documentElement.setAttribute('data-theme', theme);
@@ -1207,7 +1207,7 @@ try {
return { identity: identity, results: results };
})()`, true), 20_000, `${label} Route visual matrix`);
- assert.equal(matrix.results.length, 6);
+ assert.equal(matrix.results.length, 8);
for (const result of matrix.results) {
assert.equal(result.type, 'image/png', `${label} ${result.preset}/${result.theme} MIME`);
assert.equal(result.width, 1200, `${label} ${result.preset}/${result.theme} width`);
@@ -1215,8 +1215,8 @@ try {
assert.ok(result.size > 20_000, `${label} ${result.preset}/${result.theme} is unexpectedly small`);
assert.equal(result.identity, matrix.identity, `${label} ${result.preset}/${result.theme} changed route identity`);
}
- assert.equal(new Set(matrix.results.map((result) => result.hash)).size, 6, `${label} presets/themes should produce six distinct PNGs`);
- console.log(`ok ${label} Route visual matrix: Classic/Flow/Blueprint x dark/light`);
+ assert.equal(new Set(matrix.results.map((result) => result.hash)).size, 8, `${label} presets/themes should produce eight distinct PNGs`);
+ console.log(`ok ${label} Route visual matrix: Classic/Flow/Blueprint/Editorial x dark/light`);
}
async function captureReachShareCard(file, label, originId, direction, options = {}) {
@@ -1330,7 +1330,7 @@ try {
var matrix = [];
if (${JSON.stringify(options.matrix === true)}) {
var identity = JSON.stringify(snapshot);
- for (var preset of ['classic', 'signal-flow', 'blueprint']) {
+ for (var preset of ['classic', 'signal-flow', 'blueprint', 'editorial']) {
if (!Archify.preset.apply(preset)) throw new Error('could not apply preset ' + preset);
for (var theme of ['dark', 'light']) {
document.documentElement.setAttribute('data-theme', theme);
@@ -1471,8 +1471,8 @@ try {
assert.ok(reachPayload.canonicalSize > 20_000);
assert.equal(reachPayload.canonicalReachResidue, false);
if (options.matrix) {
- assert.equal(reachPayload.matrix.length, 6);
- assert.equal(new Set(reachPayload.matrix.map((entry) => entry.hash)).size, 6, `${label} Reach presets/themes should produce six distinct PNGs`);
+ assert.equal(reachPayload.matrix.length, 8);
+ assert.equal(new Set(reachPayload.matrix.map((entry) => entry.hash)).size, 8, `${label} Reach presets/themes should produce eight distinct PNGs`);
for (const entry of reachPayload.matrix) {
assert.equal(entry.type, 'image/png');
assert.equal(entry.width, 1200);
diff --git a/docs/assets/archify-live-proof.gif b/docs/assets/archify-live-proof.gif
index 781e1352..d8568a50 100644
Binary files a/docs/assets/archify-live-proof.gif and b/docs/assets/archify-live-proof.gif differ
diff --git a/docs/assets/archify-live-proof.json b/docs/assets/archify-live-proof.json
index 8a239d25..7b83f14b 100644
--- a/docs/assets/archify-live-proof.json
+++ b/docs/assets/archify-live-proof.json
@@ -7,13 +7,13 @@
"fps": 10,
"frameCount": 54,
"durationSeconds": 5.4,
- "bytes": 1685865,
- "sha256": "f66cfd197f9a7a609d861bcb0a168424469692766a129551db47bec452c80290",
+ "bytes": 1673416,
+ "sha256": "082b0fce9c008410ddff37c8d633a0c98ccd443ce639257849c6ced417ffe86a",
"scenes": [
{
"id": "signal-flow",
"artifact": "docs/gallery/artifacts/agent-tool-call.workflow.html",
- "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b",
+ "artifactSha256": "271ad748e5af753f1508f8006bbfc5506f59ce7f563a8cda426a28743cefab8c",
"view": "happy-path",
"eyebrow": "WORKFLOW · SIGNAL FLOW",
"title": "Agent Tool Call",
@@ -22,7 +22,7 @@
{
"id": "blueprint",
"artifact": "docs/gallery/artifacts/production-deployment.architecture.html",
- "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65",
+ "artifactSha256": "e8912695211d8342149355315c02c0f9019404385d14a1a215941a0c3f3ce53a",
"view": "request-boundary",
"eyebrow": "ARCHITECTURE · BLUEPRINT",
"title": "Production Deployment",
@@ -31,7 +31,7 @@
{
"id": "classic",
"artifact": "docs/gallery/artifacts/cache-miss.sequence.html",
- "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6",
+ "artifactSha256": "b03c06ce4052274ed6ab8269e20f376c1dc092435cbbc925af066c839b1f4b51",
"view": "cache-fallback",
"eyebrow": "SEQUENCE · CLASSIC",
"title": "Cache Miss Request",
diff --git a/docs/cases/mco-runtime.architecture.html b/docs/cases/mco-runtime.architecture.html
index e5fdda18..16636eb9 100644
--- a/docs/cases/mco-runtime.architecture.html
+++ b/docs/cases/mco-runtime.architecture.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4639,14 +4880,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery.html b/docs/gallery.html
index 3504eb0d..dd9f36f0 100644
--- a/docs/gallery.html
+++ b/docs/gallery.html
@@ -327,7 +327,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 11E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b">1d2c610f94a2</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="271ad748e5af753f1508f8006bbfc5506f59ce7f563a8cda426a28743cefab8c">271ad748e5af</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-tool-call.workflow.html?present=1&amp;play=1#view=happy-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -356,7 +356,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65">f8a5330cdbcd</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="e8912695211d8342149355315c02c0f9019404385d14a1a215941a0c3f3ce53a">e8912695211d</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/production-deployment.architecture.html?present=1&amp;play=1#view=request-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -384,7 +384,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6">f962d3fade85</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="b03c06ce4052274ed6ab8269e20f376c1dc092435cbbc925af066c839b1f4b51">b03c06ce4052</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/cache-miss.sequence.html?present=1&amp;play=1#view=cache-fallback" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -412,7 +412,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a">c1a2452bf972</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="29e8a9ea86175e1bb9b4147c63b5f54868727c2d902c039c2eff6cc528ce57af">29e8a9ea8617</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/release-delivery.workflow.html?present=1&amp;play=1#view=approval-to-production" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -440,7 +440,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b">8acce7ad866f</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="fb42a4dcc8f6bc7063c59187f41cfb16b319105932f4ef626c4cd0383c25a559">fb42a4dcc8f6</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/incident-response.workflow.html?present=1&amp;play=1#view=mitigate-and-verify" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -468,7 +468,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d">4e264398550c</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="cdd52f1f9412ed5e6ef728811a358bc60f27e9fd58a525184dcfeb94416fddf5">cdd52f1f9412</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/product-analytics.dataflow.html?present=1&amp;play=1#view=consent-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -496,7 +496,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 14E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939">bdf196bc9c1e</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="ec2fd4181f42bff695e83129b29835fc5c001aa0713950a756cbc17ab0321255">ec2fd4181f42</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/async-job-roundtrip.sequence.html?present=1&amp;play=1#view=work-and-retry" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -524,7 +524,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61">6e1d488d514c</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="c7083f49978c1d8e12065828eb8b482c933f3310450f7887bd7f8c9e024fe54d">c7083f49978c</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/event-stream.dataflow.html?present=1&amp;play=1#view=order-transit" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -552,7 +552,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 5E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568">fdacc3ca6015</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="7e33e8c6c598a13b0ed701b2e4c5f5c84e6dfd14445010aa9891264d4c8a6f85">7e33e8c6c598</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-run.lifecycle.html?present=1&amp;play=1#view=main-lifecycle" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -580,7 +580,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 6E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26">a361eb22a826</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f46c7e38b4ae9f6c0c09c97370f80be9011b6a7ab4a138be2145882e4c9e6ffe">f46c7e38b4ae</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/deployment-release.lifecycle.html?present=1&amp;play=1#view=rollback-outcomes" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -608,7 +608,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 9E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349">8330120204a4</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="3dc7e09c598fb1aaefa1664e06800782efadbbfbf92878ac76602c0a9194f3f5">3dc7e09c598f</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/web-app.architecture.html?present=1&amp;play=1#view=request-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -686,8 +686,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 599563,
- "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b",
+ "artifactBytes": 609259,
+ "artifactSha256": "271ad748e5af753f1508f8006bbfc5506f59ce7f563a8cda426a28743cefab8c",
"sourceBytes": 6470,
"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f",
"checks": [
@@ -784,8 +784,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": "deployment-ownership",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 599887,
- "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65",
+ "artifactBytes": 609583,
+ "artifactSha256": "e8912695211d8342149355315c02c0f9019404385d14a1a215941a0c3f3ce53a",
"sourceBytes": 5546,
"sourceSha256": "03e647d057eb20d99f7fb4ba4ddfdd5d58a7a813865338680e968038e6a90e0f",
"checks": [
@@ -882,8 +882,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 593210,
- "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6",
+ "artifactBytes": 602906,
+ "artifactSha256": "b03c06ce4052274ed6ab8269e20f376c1dc092435cbbc925af066c839b1f4b51",
"sourceBytes": 4442,
"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef",
"checks": [
@@ -980,8 +980,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 595829,
- "artifactSha256": "c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a",
+ "artifactBytes": 605525,
+ "artifactSha256": "29e8a9ea86175e1bb9b4147c63b5f54868727c2d902c039c2eff6cc528ce57af",
"sourceBytes": 5256,
"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671",
"checks": [
@@ -1078,8 +1078,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 595687,
- "artifactSha256": "8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b",
+ "artifactBytes": 605383,
+ "artifactSha256": "fb42a4dcc8f6bc7063c59187f41cfb16b319105932f4ef626c4cd0383c25a559",
"sourceBytes": 5471,
"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72",
"checks": [
@@ -1176,8 +1176,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 597220,
- "artifactSha256": "4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d",
+ "artifactBytes": 606916,
+ "artifactSha256": "cdd52f1f9412ed5e6ef728811a358bc60f27e9fd58a525184dcfeb94416fddf5",
"sourceBytes": 5719,
"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974",
"checks": [
@@ -1274,8 +1274,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 593995,
- "artifactSha256": "bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939",
+ "artifactBytes": 603691,
+ "artifactSha256": "ec2fd4181f42bff695e83129b29835fc5c001aa0713950a756cbc17ab0321255",
"sourceBytes": 4483,
"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52",
"checks": [
@@ -1372,8 +1372,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 601175,
- "artifactSha256": "6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61",
+ "artifactBytes": 610871,
+ "artifactSha256": "c7083f49978c1d8e12065828eb8b482c933f3310450f7887bd7f8c9e024fe54d",
"sourceBytes": 5543,
"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c",
"checks": [
@@ -1470,8 +1470,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 5,
- "artifactBytes": 590165,
- "artifactSha256": "fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568",
+ "artifactBytes": 599861,
+ "artifactSha256": "7e33e8c6c598a13b0ed701b2e4c5f5c84e6dfd14445010aa9891264d4c8a6f85",
"sourceBytes": 4353,
"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6",
"checks": [
@@ -1568,8 +1568,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 6,
- "artifactBytes": 591542,
- "artifactSha256": "a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26",
+ "artifactBytes": 601238,
+ "artifactSha256": "f46c7e38b4ae9f6c0c09c97370f80be9011b6a7ab4a138be2145882e4c9e6ffe",
"sourceBytes": 4394,
"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4",
"checks": [
@@ -1666,8 +1666,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 591174,
- "artifactSha256": "8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349",
+ "artifactBytes": 600870,
+ "artifactSha256": "3dc7e09c598fb1aaefa1664e06800782efadbbfbf92878ac76602c0a9194f3f5",
"sourceBytes": 3863,
"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db",
"checks": [
diff --git a/docs/gallery/artifacts/agent-run.lifecycle.html b/docs/gallery/artifacts/agent-run.lifecycle.html
index f64b98f2..d98084b3 100644
--- a/docs/gallery/artifacts/agent-run.lifecycle.html
+++ b/docs/gallery/artifacts/agent-run.lifecycle.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4571,14 +4812,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/agent-tool-call.workflow.html b/docs/gallery/artifacts/agent-tool-call.workflow.html
index 6c2cfaa5..ec2ff0ce 100644
--- a/docs/gallery/artifacts/agent-tool-call.workflow.html
+++ b/docs/gallery/artifacts/agent-tool-call.workflow.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4651,14 +4892,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/async-job-roundtrip.sequence.html b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
index e0ea387d..818c81b4 100644
--- a/docs/gallery/artifacts/async-job-roundtrip.sequence.html
+++ b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4638,14 +4879,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/cache-miss.sequence.html b/docs/gallery/artifacts/cache-miss.sequence.html
index 8870991e..3f727132 100644
--- a/docs/gallery/artifacts/cache-miss.sequence.html
+++ b/docs/gallery/artifacts/cache-miss.sequence.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4622,14 +4863,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/deployment-release.lifecycle.html b/docs/gallery/artifacts/deployment-release.lifecycle.html
index 347a7b46..c192aa96 100644
--- a/docs/gallery/artifacts/deployment-release.lifecycle.html
+++ b/docs/gallery/artifacts/deployment-release.lifecycle.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4585,14 +4826,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/event-stream.dataflow.html b/docs/gallery/artifacts/event-stream.dataflow.html
index cdc01fc0..eb4a0e60 100644
--- a/docs/gallery/artifacts/event-stream.dataflow.html
+++ b/docs/gallery/artifacts/event-stream.dataflow.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4657,14 +4898,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/incident-response.workflow.html b/docs/gallery/artifacts/incident-response.workflow.html
index d6225c64..0028d9b1 100644
--- a/docs/gallery/artifacts/incident-response.workflow.html
+++ b/docs/gallery/artifacts/incident-response.workflow.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4620,14 +4861,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/product-analytics.dataflow.html b/docs/gallery/artifacts/product-analytics.dataflow.html
index c56e196d..00aae82f 100644
--- a/docs/gallery/artifacts/product-analytics.dataflow.html
+++ b/docs/gallery/artifacts/product-analytics.dataflow.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4618,14 +4859,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/production-deployment.architecture.html b/docs/gallery/artifacts/production-deployment.architecture.html
index 320c6510..e0c0081e 100644
--- a/docs/gallery/artifacts/production-deployment.architecture.html
+++ b/docs/gallery/artifacts/production-deployment.architecture.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4646,14 +4887,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/release-delivery.workflow.html b/docs/gallery/artifacts/release-delivery.workflow.html
index 6024d5d2..5cf82d35 100644
--- a/docs/gallery/artifacts/release-delivery.workflow.html
+++ b/docs/gallery/artifacts/release-delivery.workflow.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4620,14 +4861,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/artifacts/web-app.architecture.html b/docs/gallery/artifacts/web-app.architecture.html
index 249dcf76..c4c94f73 100644
--- a/docs/gallery/artifacts/web-app.architecture.html
+++ b/docs/gallery/artifacts/web-app.architecture.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4587,14 +4828,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/docs/gallery/manifest.json b/docs/gallery/manifest.json
index 081e477c..7a94bcb3 100644
--- a/docs/gallery/manifest.json
+++ b/docs/gallery/manifest.json
@@ -27,8 +27,8 @@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 599563,
- "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b",
+ "artifactBytes": 609259,
+ "artifactSha256": "271ad748e5af753f1508f8006bbfc5506f59ce7f563a8cda426a28743cefab8c",
"sourceBytes": 6470,
"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f",
"checks": [
@@ -125,8 +125,8 @@
"engineeringProfile": "deployment-ownership",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 599887,
- "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65",
+ "artifactBytes": 609583,
+ "artifactSha256": "e8912695211d8342149355315c02c0f9019404385d14a1a215941a0c3f3ce53a",
"sourceBytes": 5546,
"sourceSha256": "03e647d057eb20d99f7fb4ba4ddfdd5d58a7a813865338680e968038e6a90e0f",
"checks": [
@@ -223,8 +223,8 @@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 593210,
- "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6",
+ "artifactBytes": 602906,
+ "artifactSha256": "b03c06ce4052274ed6ab8269e20f376c1dc092435cbbc925af066c839b1f4b51",
"sourceBytes": 4442,
"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef",
"checks": [
@@ -321,8 +321,8 @@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 595829,
- "artifactSha256": "c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a",
+ "artifactBytes": 605525,
+ "artifactSha256": "29e8a9ea86175e1bb9b4147c63b5f54868727c2d902c039c2eff6cc528ce57af",
"sourceBytes": 5256,
"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671",
"checks": [
@@ -419,8 +419,8 @@
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 595687,
- "artifactSha256": "8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b",
+ "artifactBytes": 605383,
+ "artifactSha256": "fb42a4dcc8f6bc7063c59187f41cfb16b319105932f4ef626c4cd0383c25a559",
"sourceBytes": 5471,
"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72",
"checks": [
@@ -517,8 +517,8 @@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 597220,
- "artifactSha256": "4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d",
+ "artifactBytes": 606916,
+ "artifactSha256": "cdd52f1f9412ed5e6ef728811a358bc60f27e9fd58a525184dcfeb94416fddf5",
"sourceBytes": 5719,
"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974",
"checks": [
@@ -615,8 +615,8 @@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 593995,
- "artifactSha256": "bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939",
+ "artifactBytes": 603691,
+ "artifactSha256": "ec2fd4181f42bff695e83129b29835fc5c001aa0713950a756cbc17ab0321255",
"sourceBytes": 4483,
"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52",
"checks": [
@@ -713,8 +713,8 @@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 601175,
- "artifactSha256": "6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61",
+ "artifactBytes": 610871,
+ "artifactSha256": "c7083f49978c1d8e12065828eb8b482c933f3310450f7887bd7f8c9e024fe54d",
"sourceBytes": 5543,
"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c",
"checks": [
@@ -811,8 +811,8 @@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 5,
- "artifactBytes": 590165,
- "artifactSha256": "fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568",
+ "artifactBytes": 599861,
+ "artifactSha256": "7e33e8c6c598a13b0ed701b2e4c5f5c84e6dfd14445010aa9891264d4c8a6f85",
"sourceBytes": 4353,
"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6",
"checks": [
@@ -909,8 +909,8 @@
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 6,
- "artifactBytes": 591542,
- "artifactSha256": "a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26",
+ "artifactBytes": 601238,
+ "artifactSha256": "f46c7e38b4ae9f6c0c09c97370f80be9011b6a7ab4a138be2145882e4c9e6ffe",
"sourceBytes": 4394,
"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4",
"checks": [
@@ -1007,8 +1007,8 @@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 591174,
- "artifactSha256": "8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349",
+ "artifactBytes": 600870,
+ "artifactSha256": "3dc7e09c598fb1aaefa1664e06800782efadbbfbf92878ac76602c0a9194f3f5",
"sourceBytes": 3863,
"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db",
"checks": [
diff --git a/docs/index.html b/docs/index.html
index 02ae08e4..62c3aafa 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -481,9 +481,9 @@
<div class="feature-icon" style="background:rgba(34,211,238,0.1)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" stroke="#22d3ee" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
- <h3 data-i18n="f1-h">Three visual identities</h3>
- <p data-i18n="f1-p">Classic, Signal Flow, and Blueprint share one geometry contract. Every preset includes coordinated dark/light themes and exports cleanly.</p>
- <span class="feature-tag" style="background:rgba(34,211,238,0.1);color:var(--cyan)" data-i18n="f1-tag">3 PRESETS · 2 THEMES</span>
+ <h3 data-i18n="f1-h">Four visual identities</h3>
+ <p data-i18n="f1-p">Classic, Signal Flow, Blueprint, and Editorial share one geometry contract. Every preset includes coordinated dark/light themes and exports cleanly.</p>
+ <span class="feature-tag" style="background:rgba(34,211,238,0.1);color:var(--cyan)" data-i18n="f1-tag">4 PRESETS · 2 THEMES</span>
</div>
<div class="feature-card fade-up d1">
<div class="feature-icon" style="background:rgba(52,211,153,0.1)">
@@ -734,7 +734,7 @@
'life-li1':'Agent run lifecycle','life-li2':'Order status machine','life-li3':'Deployment pipeline','life-li4':'Approval & retry paths',
'label-features':'Features',
'features-h2':'Production-ready output,<br>zero configuration.',
- 'f1-h':'Three visual identities','f1-p':'Classic, Signal Flow, and Blueprint share one geometry contract. Every preset includes coordinated dark/light themes and exports cleanly.','f1-tag':'3 PRESETS · 2 THEMES',
+ 'f1-h':'Four visual identities','f1-p':'Classic, Signal Flow, Blueprint, and Editorial share one geometry contract. Every preset includes coordinated dark/light themes and exports cleanly.','f1-tag':'4 PRESETS · 2 THEMES',
'f2-h':'Ultra-crisp 4× export','f2-p':'PNG, JPEG, WebP — all rasterized natively at up to 4× source resolution by the browser. No upsampling blur. Sharp on retina displays, slides, and print.','f2-tag':'PNG · JPEG · WEBP',
'f3-h':'Dual-theme SVG','f3-p':"The SVG export ships with both variable sets plus a @media prefers-color-scheme rule. Drop one file into a GitHub README — it follows the reader's theme.",'f3-tag':'VECTOR · SELF-THEMED',
'f4-h':'Copy to clipboard','f4-p':'One button puts a PNG straight on your clipboard. Paste directly into Slack, Notion, GitHub, or Figma — no intermediate save step.','f4-tag':'INSTANT SHARE',
@@ -793,7 +793,7 @@
'life-li1':'Agent 运行生命周期','life-li2':'订单状态机','life-li3':'部署流水线','life-li4':'审批与重试路径',
'label-features':'功能特性',
'features-h2':'生产级输出,<br>零配置。',
- 'f1-h':'三套视觉身份','f1-p':'Classic、Signal Flow 和 Blueprint 共用同一套几何契约;每套都提供协调的深浅主题并保持干净导出。','f1-tag':'3 套预设 · 2 套主题',
+ 'f1-h':'四套视觉身份','f1-p':'Classic、Signal Flow、Blueprint 和 Editorial 共用同一套几何契约;每套都提供协调的深浅主题并保持干净导出。','f1-tag':'4 套预设 · 2 套主题',
'f2-h':'超清 4× 导出','f2-p':'PNG、JPEG、WebP——由浏览器以最高 4 倍分辨率原生栅格化,无上采样模糊。视网膜屏、幻灯片、印刷均清晰。','f2-tag':'PNG · JPEG · WEBP',
'f3-h':'双主题 SVG','f3-p':'SVG 导出同时内置深色和浅色变量集,并附 @media prefers-color-scheme 规则。放入 GitHub README,自动跟随读者主题。','f3-tag':'矢量 · 自适应主题',
'f4-h':'复制到剪贴板','f4-p':'一键将 PNG 写入剪贴板,直接粘贴到 Slack、Notion、GitHub 或 Figma,无需手动保存。','f4-tag':'即时分享',
diff --git a/docs/research-editorial-preset-2026-07-23.md b/docs/research-editorial-preset-2026-07-23.md
new file mode 100644
index 00000000..c0dbbf47
--- /dev/null
+++ b/docs/research-editorial-preset-2026-07-23.md
@@ -0,0 +1,101 @@
+# Editorial Preset Research
+
+Date: 2026-07-23
+Status: implementation decision for `codex/visual-proof-evolution`
+
+## Why this slice
+
+Archify already has the deeper reading product: exact semantic identity, search,
+route and reach inspection, guided stories, source evidence, stable export, and
+five validated diagram modes. The remaining first-impression gap is visual
+choice. A new reader can recognize only three visual identities before learning
+the richer interaction model.
+
+The goal is therefore not another panel or motion owner. It is one immediately
+recognizable, optional visual identity that preserves every existing truth and
+stability boundary.
+
+## Primary-source comparison
+
+### Fireworks Tech Graph
+
+[Fireworks Tech Graph](https://github.com/yizhiyanhua-ai/fireworks-tech-graph)
+puts visual breadth directly in its showcase: twelve named styles, each attached
+to a distinct engineering scenario, while its shared composition contract keeps
+routing and spacing comparable. The useful product lesson is that a style must
+be visible, named, and executable rather than described as a loose palette.
+
+- **Borrow:** one named, memorable visual identity with an explicit audience.
+- **Adapt:** keep Archify's exact existing SVG geometry and semantic palette;
+ express the identity through CSS variables, publication typography, material,
+ and chrome.
+- **Skip:** a large style matrix, vendor icon catalogue, renderer-specific
+ scenes, GIF-only motion contracts, or copied style names and assets.
+
+### D2
+
+[D2](https://github.com/terrastruct/d2) treats themes as a first-class output
+choice while keeping the diagram language and layout engine separate. It also
+keeps the stable default intact and lets authors deliberately choose another
+theme.
+
+- **Borrow:** presentation is optional and orthogonal to topology.
+- **Adapt:** one `meta.visual_preset` enum value shared by all five renderers,
+ the viewer Style cycle, both themes, and every export path.
+- **Skip:** pluggable layout engines, a user-authored theme DSL, font packaging,
+ or a breaking change to existing files.
+
+### AntV G6
+
+[AntV G6](https://github.com/antvis/G6) exposes themes and palettes alongside
+interaction and rendering, reinforcing that visual identity must remain
+coherent during selection, focus, and animation—not only in a static screenshot.
+
+- **Borrow:** verify the style across interaction and export states.
+- **Adapt:** exercise Route and Reach cards, Story, trace motion, dark/light,
+ and canonical SVG through Archify's existing gates.
+- **Skip:** a graph runtime, editable nodes, WebGL, new dependencies, or a
+ second state owner.
+
+## Chosen direction: Editorial
+
+`editorial` is a warm publication-minded identity for architecture reviews,
+launch notes, and narrative technical documentation:
+
+- warm paper / charcoal surfaces;
+- deep ink and restrained vermilion emphasis;
+- ruled structure and field-note marks;
+- Georgia only for publication headings, while SVG labels remain the existing
+ technical monospace for fit stability;
+- muted, accessible semantic colors rather than neon or decorative gradients;
+- low-radius panels and quiet shadows instead of generic glass cards.
+
+It is intentionally not “Notion style” or a Fireworks clone. It aligns with
+Archify's own landing-page paper identity and remains recognizable in both dark
+and light themes.
+
+## Stability contract
+
+1. `classic` remains the schema and renderer default.
+2. Editorial changes no SVG element, coordinate, route, label, stable ID,
+ authored fact, or validation threshold.
+3. The same topology must produce byte-identical canonical SVG markup after
+ normalizing only `data-preset` across all four presets.
+4. All five schemas accept exactly the new `editorial` value; unknown presets
+ still fail closed.
+5. Reader Style cycling is session-only and disabled in passive embeds.
+6. Both themes, canonical SVG, raster, Share Card, Route Card, Reach Card,
+ finite motion, print cleanup, reduced motion, and narrow containment remain
+ covered by existing or extended tests.
+7. No dependency, schema version, URL, storage, layout algorithm, hosted
+ service, or dedicated mobile surface is added.
+
+## Acceptance evidence
+
+- all five renderers accept and emit Editorial through HTML and canonical SVG;
+- four-preset topology identity test passes;
+- Route and Reach visual matrices produce eight distinct 1200x630 PNGs;
+- Proof Lab regenerates with 99/99 checks;
+- validator freshness, package/golden tests, and full `npm test` pass;
+- desktop and narrow built-in-browser inspection covers Style cycling,
+ dark/light, Story/focus controls, export menu, and zero console errors.
diff --git a/examples/dataflow-product-analytics.html b/examples/dataflow-product-analytics.html
index c56e196d..00aae82f 100644
--- a/examples/dataflow-product-analytics.html
+++ b/examples/dataflow-product-analytics.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4618,14 +4859,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/examples/lifecycle-agent-run.html b/examples/lifecycle-agent-run.html
index f64b98f2..d98084b3 100644
--- a/examples/lifecycle-agent-run.html
+++ b/examples/lifecycle-agent-run.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4571,14 +4812,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/examples/sequence-cache-miss-request.html b/examples/sequence-cache-miss-request.html
index 8870991e..3f727132 100644
--- a/examples/sequence-cache-miss-request.html
+++ b/examples/sequence-cache-miss-request.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4622,14 +4863,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/examples/web-app-rendered.html b/examples/web-app-rendered.html
index 249dcf76..c4c94f73 100644
--- a/examples/web-app-rendered.html
+++ b/examples/web-app-rendered.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4587,14 +4828,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/examples/web-app.html b/examples/web-app.html
index 249dcf76..c4c94f73 100644
--- a/examples/web-app.html
+++ b/examples/web-app.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4587,14 +4828,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');
diff --git a/examples/workflow-agent-tool-call-rendered.html b/examples/workflow-agent-tool-call-rendered.html
index 6c2cfaa5..ec2ff0ce 100644
--- a/examples/workflow-agent-tool-call-rendered.html
+++ b/examples/workflow-agent-tool-call-rendered.html
@@ -271,6 +271,83 @@
--toolbar-menu-bg: #f9fdff;
}
+ /* ==========================================================
+ EDITORIAL — a warm, publication-minded preset for design
+ reviews, launch notes, and documentation. The diagram keeps
+ the same semantic palette and exact geometry, but trades
+ software chrome for paper, ink, ruled structure, and one
+ restrained vermilion accent.
+ ========================================================== */
+ [data-preset="editorial"][data-theme="dark"] {
+ --bg: #181611;
+ --grid: #39342a;
+ --panel: rgba(35, 31, 24, 0.96);
+ --panel-border: #625a4a;
+ --lane-fill: rgba(52, 46, 35, 0.46);
+ --lane-stroke: #726957;
+ --text: #f4eddf;
+ --text-muted: #b9ae9b;
+ --text-dim: #776e60;
+ --text-faint: #9d917e;
+ --mask: #231f18;
+ --frontend-fill: rgba(43, 133, 142, 0.16);
+ --frontend-stroke: #7fc6c7;
+ --backend-fill: rgba(63, 132, 92, 0.16);
+ --backend-stroke: #8fc29e;
+ --database-fill: rgba(117, 91, 141, 0.17);
+ --database-stroke: #c0a4d0;
+ --cloud-fill: rgba(170, 119, 49, 0.16);
+ --cloud-stroke: #d8ad68;
+ --security-fill: rgba(157, 69, 65, 0.17);
+ --security-stroke: #df9085;
+ --messagebus-fill: rgba(174, 79, 42, 0.16);
+ --messagebus-stroke: #df946f;
+ --external-fill: rgba(126, 115, 96, 0.18);
+ --external-stroke: #b8ad99;
+ --arrow: #948978;
+ --arrow-emphasis: #dd6b3d;
+ --toolbar-bg: rgba(35, 31, 24, 0.92);
+ --toolbar-border: #625a4a;
+ --toolbar-text: #eee5d5;
+ --toolbar-hover: #302a20;
+ --toolbar-menu-bg: #231f18;
+ }
+
+ [data-preset="editorial"][data-theme="light"] {
+ --bg: #f2eee5;
+ --grid: #d8d0c2;
+ --panel: rgba(251, 248, 241, 0.97);
+ --panel-border: #c4b9a6;
+ --lane-fill: rgba(229, 221, 207, 0.42);
+ --lane-stroke: #b8aa94;
+ --text: #242018;
+ --text-muted: #6f6658;
+ --text-dim: #a09788;
+ --text-faint: #817767;
+ --mask: #fbf8f1;
+ --frontend-fill: rgba(31, 117, 126, 0.09);
+ --frontend-stroke: #287e84;
+ --backend-fill: rgba(42, 119, 75, 0.09);
+ --backend-stroke: #397b53;
+ --database-fill: rgba(105, 75, 130, 0.09);
+ --database-stroke: #765d86;
+ --cloud-fill: rgba(157, 103, 31, 0.1);
+ --cloud-stroke: #9a671f;
+ --security-fill: rgba(153, 58, 52, 0.09);
+ --security-stroke: #9e463f;
+ --messagebus-fill: rgba(182, 70, 27, 0.09);
+ --messagebus-stroke: #ad4b25;
+ --external-fill: rgba(101, 91, 75, 0.09);
+ --external-stroke: #746b5e;
+ --arrow: #8a806f;
+ --arrow-emphasis: #bb4c23;
+ --toolbar-bg: rgba(251, 248, 241, 0.94);
+ --toolbar-border: #c4b9a6;
+ --toolbar-text: #40392f;
+ --toolbar-hover: #fffdf8;
+ --toolbar-menu-bg: #fbf8f1;
+ }
+
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@@ -301,6 +378,12 @@
background-position: -1px -1px;
background-attachment: fixed;
}
+ html[data-preset="editorial"] body {
+ background-image:
+ linear-gradient(90deg, transparent 0, transparent 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) 5.4rem, color-mix(in srgb, var(--security-stroke) 18%, transparent) calc(5.4rem + 1px), transparent calc(5.4rem + 1px)),
+ repeating-linear-gradient(0deg, transparent 0, transparent 31px, color-mix(in srgb, var(--grid) 36%, transparent) 31px, color-mix(in srgb, var(--grid) 36%, transparent) 32px);
+ background-attachment: fixed;
+ }
/* Gallery/embed mode keeps the generated artifact as the source of truth
while presenting only its diagram surface inside a proof card. */
@@ -369,6 +452,20 @@
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
backdrop-filter: none;
}
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-color: var(--panel-border);
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 42%),
+ var(--toolbar-menu-bg);
+ box-shadow: 0 10px 30px color-mix(in srgb, #000 18%, transparent);
+ backdrop-filter: none;
+ }
+ html[data-preset="editorial"] .share-chapter-state { color: var(--arrow-emphasis); }
+ html[data-preset="editorial"] .share-chapter-state::before {
+ border-radius: 0;
+ box-shadow: none;
+ transform: rotate(45deg) scale(0.8);
+ }
.share-chapter-index {
display: grid;
gap: 0.12rem;
@@ -508,7 +605,8 @@
.header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -581,6 +679,36 @@
white-space: nowrap;
}
+ html[data-preset="editorial"] h1,
+ html[data-preset="editorial"] .card h3 {
+ font-family: Georgia, 'Times New Roman', 'Songti SC', STSong, serif;
+ letter-spacing: -0.02em;
+ }
+ html[data-preset="editorial"] h1 { font-size: 1.72rem; font-weight: 600; }
+ html[data-preset="editorial"] .pulse-dot {
+ width: 9px;
+ height: 9px;
+ border: 1px solid var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg);
+ animation: none;
+ }
+ html[data-preset="editorial"] .header-row::after {
+ content: "EDITORIAL / FIELD NOTE";
+ margin-left: auto;
+ padding: 0.32rem 0 0.24rem;
+ border-bottom: 2px solid var(--arrow-emphasis);
+ color: var(--arrow-emphasis);
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.625rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ white-space: nowrap;
+ }
+
.diagram-container {
background: var(--panel);
border-radius: 1rem;
@@ -625,6 +753,35 @@
linear-gradient(var(--frontend-stroke), var(--frontend-stroke)) right bottom / 1px 1.35rem no-repeat;
opacity: 0.58;
}
+ html[data-preset="editorial"] .diagram-container {
+ overflow: hidden;
+ border-color: var(--panel-border);
+ border-radius: 0.38rem;
+ background:
+ linear-gradient(90deg, color-mix(in srgb, var(--security-fill) 58%, transparent), transparent 12%),
+ var(--panel);
+ box-shadow:
+ 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent),
+ 0 18px 48px color-mix(in srgb, #000 19%, transparent);
+ }
+ html[data-preset="editorial"] .diagram-container::after {
+ position: absolute;
+ z-index: 10;
+ top: 0.72rem;
+ right: 1.25rem;
+ padding: 0.2rem 0.52rem;
+ border: 1px solid var(--panel-border);
+ background: var(--panel);
+ color: var(--arrow-emphasis);
+ content: "ARCHIFY / PLATE 04";
+ font-family: Georgia, 'Times New Roman', serif;
+ font-size: 0.52rem;
+ font-style: italic;
+ font-weight: 600;
+ letter-spacing: 0.09em;
+ pointer-events: none;
+ }
+ html[data-embed="true"][data-preset="editorial"] .diagram-container::after { display: none; }
html[data-motion-capable="true"][data-preset="signal-flow"][data-ambient-motion="running"] .diagram-container::before {
content: "";
position: absolute;
@@ -2555,6 +2712,22 @@
border-top: 2px solid var(--frontend-stroke);
}
+ html[data-preset="editorial"] .card {
+ position: relative;
+ border-radius: 0.28rem;
+ background: var(--panel);
+ box-shadow: 0 10px 28px color-mix(in srgb, #000 10%, transparent);
+ }
+ html[data-preset="editorial"] .card::before {
+ position: absolute;
+ top: -1px;
+ left: 1.25rem;
+ width: 3.25rem;
+ border-top: 3px solid var(--arrow-emphasis);
+ content: "";
+ }
+ html[data-preset="editorial"] .card-dot { border-radius: 0; transform: rotate(45deg) scale(0.78); }
+
.card-header {
display: flex;
align-items: center;
@@ -2754,6 +2927,25 @@
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
transform: rotate(45deg) scale(0.84);
}
+ #btn-preset[data-preset-option="editorial"] .preset-control-mark {
+ border-color: var(--arrow-emphasis);
+ border-radius: 0;
+ background: var(--arrow-emphasis);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrow-emphasis) 14%, transparent);
+ transform: rotate(45deg) scale(0.72);
+ }
+ html[data-preset="editorial"] .toolbar button,
+ html[data-preset="editorial"] .export-menu,
+ html[data-preset="editorial"] .overview-map,
+ html[data-preset="editorial"] .semantic-lens,
+ html[data-preset="editorial"] .route-probe,
+ html[data-preset="editorial"] .focus-chip,
+ html[data-preset="editorial"] .diagram-guide,
+ html[data-preset="editorial"] .node-finder,
+ html[data-preset="editorial"] .guided-views,
+ html[data-preset="editorial"] .share-chapter-cue {
+ border-radius: 0.3rem;
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2838,13 +3030,15 @@
}
.header { margin-bottom: 1.25rem; padding-right: 0; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 0; }
+ html[data-preset="blueprint"] .header,
+ html[data-preset="editorial"] .header { padding-right: 0; }
.header-row {
gap: 0.75rem;
align-items: flex-start;
}
html[data-preset="signal-flow"] .header-row,
- html[data-preset="blueprint"] .header-row { flex-wrap: wrap; }
+ html[data-preset="blueprint"] .header-row,
+ html[data-preset="editorial"] .header-row { flex-wrap: wrap; }
html[data-preset="signal-flow"] .header-row::after {
margin-left: 0;
order: 3;
@@ -2853,6 +3047,10 @@
margin-left: 0;
order: 3;
}
+ html[data-preset="editorial"] .header-row::after {
+ margin-left: 0;
+ order: 3;
+ }
h1 {
font-size: 1.25rem;
line-height: 1.25;
@@ -3550,6 +3748,11 @@
stroke-linecap: square;
filter: none;
}
+ svg[data-preset="editorial"] .relationship-flow-pulse {
+ stroke: var(--arrow-emphasis);
+ stroke-width: 2.75;
+ filter: none;
+ }
.semantic-flow-token {
color: var(--frontend-stroke);
opacity: 0;
@@ -3592,6 +3795,7 @@
filter: drop-shadow(0 0 5px currentColor);
}
svg[data-preset="blueprint"] .semantic-flow-token { filter: none; }
+ svg[data-preset="editorial"] .semantic-flow-token { filter: none; }
html[data-embed="true"] .relationship-pulse-overlay { display: none; }
/* Intent Trace is a temporary, pre-click exploration layer. Related
@@ -3632,6 +3836,8 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-intent-trace-selected],
+ svg[data-preset="editorial"] .intent-trace-flow { filter: none; }
.intent-trace-status {
position: absolute;
width: 1px;
@@ -3715,6 +3921,25 @@
filter: none;
stroke-linecap: square;
}
+ svg[data-preset="editorial"] [data-route-start],
+ svg[data-preset="editorial"] [data-route-end],
+ svg[data-preset="editorial"] [data-route-step],
+ svg[data-preset="editorial"] .route-probe-flow,
+ svg[data-preset="editorial"] .route-journey-flow { filter: none; }
+
+ svg[data-preset="editorial"] .c-grid {
+ stroke-dasharray: 1 4;
+ opacity: 0.48;
+ }
+ svg[data-preset="editorial"] .c-region {
+ fill: color-mix(in srgb, var(--cloud-fill) 48%, transparent);
+ stroke-dasharray: 9 4;
+ }
+ svg[data-preset="editorial"] [data-node-id]:hover,
+ svg[data-preset="editorial"] [data-node-id]:focus-visible,
+ svg[data-preset="editorial"][data-focus-active] [data-focus-selected] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent));
+ }
svg[data-preset="blueprint"] .c-grid {
stroke-dasharray: 1 3;
@@ -3800,6 +4025,10 @@
filter: none;
animation: none;
}
+ svg[data-preset="editorial"] .story-trail-flow { filter: none; }
+ svg[data-preset="editorial"][data-story-beat] [data-story-step][data-story-beat-state="active"] {
+ filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 16%, transparent));
+ }
/* Chapter Delta Preview is a static, pre-commit comparison between two
chapter focus sets. Symbols in the rail carry the meaning without color;
@@ -3861,6 +4090,14 @@
animation-name: archify-blueprint-node-pulse;
animation-duration: 3.8s;
}
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="edge"] {
+ filter: none;
+ animation-duration: 2.2s;
+ }
+ svg[data-preset="editorial"][data-animation="trace"] [data-animate="node"] {
+ animation-name: archify-editorial-node-pulse;
+ animation-duration: 3.5s;
+ }
/* Embedded proofs are static until a named Story Trail chapter is played.
This keeps proof grids calm and ensures ?play=1 stops all viewer motion
after one 3.2 second chapter instead of leaving ambient trace loops on. */
@@ -3886,6 +4123,10 @@
0%, 72%, 100% { opacity: 1; filter: none; }
18%, 36% { opacity: 0.72; filter: drop-shadow(0 0 2px var(--frontend-stroke)); }
}
+ @keyframes archify-editorial-node-pulse {
+ 0%, 72%, 100% { opacity: 1; filter: none; }
+ 18%, 36% { opacity: 0.78; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--text) 18%, transparent)); }
+ }
@keyframes archify-signal-scan {
0%, 18% { opacity: 1; transform: translateX(-70%); }
70% { opacity: 1; transform: translateX(70%); }
@@ -4651,14 +4892,14 @@
}
/* ============================================================
- Visual style try-on — one topology, three bundled presets.
+ Visual style try-on — one topology, four bundled presets.
The reader's choice is intentionally session-only: it updates the
live page and canonical SVG together, but never rewrites the source,
URL, or a later diagram's authored default.
============================================================ */
Archify.preset = (function () {
- var PRESETS = ['classic', 'signal-flow', 'blueprint'];
- var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var PRESETS = ['classic', 'signal-flow', 'blueprint', 'editorial'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint', editorial: 'Editorial' };
var html = document.documentElement;
var svg = document.querySelector('.diagram-container svg');
var btn = document.getElementById('btn-preset');