-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
170 lines (169 loc) · 9.36 KB
/
Copy pathindex.html
File metadata and controls
170 lines (169 loc) · 9.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ArchLang Playground — code to floor plans</title>
<meta
name="description"
content="Live playground for ArchLang — a small language that compiles to professional SVG floor plans. CodeMirror 6 editor with syntax highlighting and inline lint."
/>
<!-- ArchLang brand: A-frame-floor-plan favicon (SVG), apple-touch icon, the source-world
theme colour, and the OG/Twitter social card. Assets in public/brand/ (see brand/README.md). -->
<link rel="icon" type="image/svg+xml" href="/brand/archlang-icon-plum.svg" />
<link rel="apple-touch-icon" href="/brand/archlang-apple-touch.png" />
<meta name="theme-color" content="#eceef2" />
<!-- Light-only (ADR 0014). The real Chromium Auto-Dark opt-out is the CSS
`color-scheme: only light` in styles/tokens.css; this states the same intent. -->
<meta name="color-scheme" content="light" />
<meta property="og:type" content="website" />
<meta property="og:title" content="ArchLang Playground — code to floor plans" />
<meta
property="og:description"
content="Write ArchLang in the browser and watch it compile to a professional SVG floor plan — live, client-side."
/>
<meta property="og:image" content="https://playground.archlang.uk/brand/archlang-og.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://playground.archlang.uk/brand/archlang-og.png" />
</head>
<body>
<!-- Header = source-world chrome (cool grey): one row of title-block cells,
hairline-separated groups each with a caps micro-label above its controls. -->
<header>
<div class="tb-cell tb-brand">
<!-- The plum mark, not the white one: the header is a light surface. -->
<img class="brand-mark" src="/brand/archlang-icon-plum.svg" alt="" width="20" height="20" />
<span class="wordmark"><b>Arch</b>Lang</span>
<span class="badge">Playground</span>
</div>
<div class="tb-cell">
<span class="tb-label">Drawing</span>
<div class="tb-controls">
<select id="examples" aria-label="Load example"></select>
<button id="formatSrc" title="Reformat the source to canonical style">Format</button>
<button id="saved" aria-haspopup="true">Saved ▾</button>
</div>
</div>
<div class="tb-cell">
<span class="tb-label">View</span>
<div class="tb-controls">
<!-- The COMPILER's render themes — these style the produced SVG plan, not the
app chrome. "Dark" is a language feature (src/theme.ts), not a dark mode
for this page: the app itself is light-only (ADR 0014). Leave it be. -->
<select id="theme" aria-label="Render theme">
<option value="">Default</option>
<option value="blueprint">Blueprint</option>
<option value="dark">Dark</option>
<option value="mono">Mono</option>
<option value="presentation">Presentation</option>
</select>
</div>
</div>
<div class="tb-cell">
<span class="tb-label">Issue</span>
<div class="tb-controls">
<select id="format" aria-label="Download format">
<option value="svg">SVG</option>
<option value="png">PNG</option>
<option value="dxf">DXF</option>
<option value="txt">TXT</option>
<option value="pdf">PDF</option>
</select>
<label class="tb-check" title="Emit SVG <title>/<desc>/role accessibility metadata (accTitle/accDescr, else the describe() caption)">
<input type="checkbox" id="accessible" />
a11y
</label>
<button id="download" class="tb-primary">Download</button>
</div>
</div>
<div class="tb-cell">
<span class="tb-label">Share</span>
<div class="tb-controls">
<button id="copyLink">Copy link</button>
<button id="copyLlm" title="Copy a paste-ready prompt (source + facts + diagnostics) for an AI assistant">Copy for LLM</button>
<button id="embed" title="Copy an iframe snippet to embed this plan">Embed</button>
</div>
</div>
<div class="spacer"></div>
<!-- brand-family navigation: quiet text links (no boxes), right-aligned.
Collapses into the "⋯" disclosure below <1600px (CSS-only). -->
<nav class="tb-nav" aria-label="Related sites">
<a href="https://archlang.uk" target="_blank" rel="noopener">Docs ↗</a>
<a href="https://archlang.uk/spec" target="_blank" rel="noopener">Spec</a>
<a href="https://github.com/chanmeng666/archlang" target="_blank" rel="noopener">GitHub</a>
<a href="https://archcanvas.chanmeng.org" target="_blank" rel="noopener">ArchCanvas ↗</a>
</nav>
<details class="tb-nav-more">
<summary aria-label="More links" title="More links">⋯</summary>
<div class="tb-nav-panel">
<a href="https://archlang.uk" target="_blank" rel="noopener">Docs ↗</a>
<a href="https://archlang.uk/spec" target="_blank" rel="noopener">Spec</a>
<a href="https://github.com/chanmeng666/archlang" target="_blank" rel="noopener">GitHub</a>
<a href="https://archcanvas.chanmeng.org" target="_blank" rel="noopener">ArchCanvas ↗</a>
</div>
</details>
</header>
<main>
<section class="pane">
<h2 class="src-tab">SOURCE.ARCH</h2>
<div id="editor"></div>
<div id="errors"></div>
</section>
<section class="pane">
<h2>
<span class="dot" id="status"></span><span id="statusText">ready</span>
<span class="grow"></span>
<span class="tabs" role="tablist" aria-label="Output view">
<button class="tab active" id="tab-preview" data-tab="preview" type="button" role="tab" aria-selected="true" aria-controls="preview">Preview</button>
<button class="tab" id="tab-describe" data-tab="describe" type="button" role="tab" aria-selected="false" aria-controls="describe">Describe</button>
<button class="tab" id="tab-lint" data-tab="lint" type="button" role="tab" aria-selected="false" aria-controls="lint">Lint</button>
<button class="tab" id="tab-intent" data-tab="intent" type="button" role="tab" aria-selected="false" aria-controls="intent">Intent</button>
</span>
</h2>
<div id="preview" class="tabview active" role="tabpanel" aria-labelledby="tab-preview">
<div class="pz-viewport">
<div class="pz-stage"></div>
<div class="pz-toolbar">
<button data-pz="out" type="button" title="Zoom out" aria-label="Zoom out">−</button>
<button data-pz="in" type="button" title="Zoom in" aria-label="Zoom in">+</button>
<button data-pz="fit" type="button" title="Fit to view" aria-label="Fit to view">⤢</button>
<button data-pz="full" type="button" title="Fullscreen" aria-label="Fullscreen">⛶</button>
<span class="pz-sep"></span>
<button data-pz="paths" type="button" aria-pressed="false" title="Toggle circulation paths overlay" aria-label="Toggle circulation paths">Paths</button>
<span class="pz-sep"></span>
<button data-pz="copysvg" type="button" title="Copy SVG markup" aria-label="Copy SVG">SVG</button>
<button data-pz="copypng" type="button" title="Copy PNG image" aria-label="Copy PNG">PNG</button>
</div>
</div>
<div id="facts" class="facts" aria-label="Plan facts"></div>
</div>
<div id="describe" class="tabview" role="tabpanel" aria-labelledby="tab-describe"></div>
<div id="lint" class="tabview" role="tabpanel" aria-labelledby="tab-lint">
<div class="lint-controls">
<label for="lintProfile">Profile</label>
<select id="lintProfile" aria-label="Lint profile"></select>
<button id="repair" class="repair-btn" hidden title="Deterministically fix furniture placement (ADR 0006)">Repair furniture ▸</button>
<button id="suggest" class="repair-btn" hidden title="Suggest door/window statements that resolve reachability and window faults">Suggest topology ▸</button>
<p id="lintCaption" class="lint-caption"></p>
</div>
<div id="repairPanel" class="repair-panel" hidden></div>
<div id="suggestPanel" class="repair-panel" hidden></div>
<div id="lintOutput"></div>
</div>
<div id="intent" class="tabview" role="tabpanel" aria-labelledby="tab-intent">
<div class="lint-controls">
<label for="intentSrc">Brief (intent JSON)</label>
<button id="intentRun" class="repair-btn">Check ▸</button>
<p class="lint-caption">
Write the brief down as data, then gate the plan on it — the same contract
<code>arch validate --intent</code> and <code>arch score --brief</code> use.
</p>
</div>
<textarea id="intentSrc" class="intent-src" spellcheck="false" aria-label="Intent JSON"></textarea>
<div id="intentOutput"></div>
</div>
</section>
</main>
<script type="module" src="/src/main.ts"></script>
</body>
</html>