797132647f
Add hemx-lsp for stdio LSP diagnostics, completion, and hover while preserving HTML editor tooling for .heml files. Teach hemx-build to expose generated target and derive-known template context facts, including simple h-for locals, so editor help comes from build-owned facts instead of editor-only parsers. Wire VS Code/Cursor and Neovim documentation and extend the Workout exemplar with a real h-for plan loop for end-to-end proof. req: diag/004 req: diag/005 req: diag/006
79 lines
3.9 KiB
Plaintext
79 lines
3.9 KiB
Plaintext
<main data-hemx-root="workout" class="workout-app">
|
||
<section class="command-slate" aria-labelledby="next-action-heading">
|
||
<p class="eyebrow">Now-first Workout Copilot</p>
|
||
<p class="progress-pill" data-hemx-slot="progress">{+ self.progress +}</p>
|
||
<h1 id="next-action-heading" data-hemx-slot="next_action">{+ self.next_action +}</h1>
|
||
<p class="session-status" data-hemx-slot="status">{+ self.status +}</p>
|
||
</section>
|
||
|
||
<section class="plan-card" aria-labelledby="plan-heading">
|
||
<h2 id="plan-heading">Today's plan</h2>
|
||
<ul>
|
||
<li h-for="exercise in &self.plan" h-key="exercise.name">
|
||
<span>{+ exercise.name +}</span>
|
||
<span>{+ exercise.target_sets +} × {+ exercise.reps +} @ {+ exercise.kg +}kg</span>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<section class="action-rail" aria-label="Current workout action">
|
||
<button class="primary-action" type="button" data-hemx-handle="complete_set">
|
||
<span data-hemx-slot="primary_action">{+ self.primary_action +}</span>
|
||
</button>
|
||
<p class="recovery-status" data-hemx-slot="recovery_status">{+ self.recovery_status +}</p>
|
||
<div class="secondary-actions">
|
||
<button class="quiet-action" type="button" data-hemx-handle="undo_last_action">Undo last action</button>
|
||
<button class="quiet-action" type="button" data-hemx-handle="skip_exercise">Skip exercise</button>
|
||
</div>
|
||
<form class="micro-form" data-hemx-handle="change_weight" method="post">
|
||
<label>Adjust next weight <input name="kg" value="52.5" inputmode="decimal" aria-label="Weight in kilograms"></label>
|
||
<button type="submit">Save</button>
|
||
</form>
|
||
<details class="recovery-tools">
|
||
<summary>Fix last set</summary>
|
||
<form class="micro-form" data-hemx-handle="correct_last_set" method="post">
|
||
<label>Correct last set <input name="kg" value="24" inputmode="decimal" aria-label="Corrected last set weight in kilograms"></label>
|
||
<button type="submit">Correct</button>
|
||
</form>
|
||
</details>
|
||
<form class="voice-strip" data-hemx-handle="record_note" method="post">
|
||
<label>Session note <input name="text" value="left shoulder felt tight"></label>
|
||
<button type="submit">Record</button>
|
||
</form>
|
||
</section>
|
||
|
||
<section class="finish-card" aria-labelledby="finish-heading">
|
||
<div>
|
||
<p class="eyebrow">Finish & recover</p>
|
||
<h2 id="finish-heading" data-hemx-slot="finish_title">{+ self.finish_title +}</h2>
|
||
</div>
|
||
<p data-hemx-slot="finish_copy">{+ self.finish_copy +}</p>
|
||
<p data-hemx-slot="host_status">{+ self.host_status +}</p>
|
||
<button class="share-action" type="button" data-hemx-handle="export_log">
|
||
<span data-hemx-slot="share_action">{+ self.share_action +}</span>
|
||
</button>
|
||
<details class="host-proof">
|
||
<summary>Host proof panel</summary>
|
||
<p>Development-only host results return through app code before UI effects.</p>
|
||
<div class="host-actions">
|
||
<button type="button" data-hemx-handle="record_share_result">Mark share completed</button>
|
||
<button type="button" data-hemx-handle="record_share_denied">Simulate share denied</button>
|
||
<button type="button" data-hemx-handle="record_host_timeout">Simulate host timeout</button>
|
||
<button type="button" data-hemx-handle="replay_broken_export">Simulate replay failure</button>
|
||
<button type="button" data-hemx-handle="request_native_haptic">Request native haptic</button>
|
||
<button type="button" data-hemx-handle="record_native_haptic_ack">Mark haptic acknowledged</button>
|
||
</div>
|
||
</details>
|
||
</section>
|
||
|
||
<section class="ledger" aria-labelledby="event-log-heading">
|
||
<div class="section-heading">
|
||
<h2 id="event-log-heading">Private event log</h2>
|
||
<button type="button" data-hemx-handle="replay_export">Replay export</button>
|
||
</div>
|
||
<pre data-hemx-slot="event_log">{+ self.event_log +}</pre>
|
||
<h3>Export payload</h3>
|
||
<pre data-hemx-slot="export_payload">{+ self.export_payload +}</pre>
|
||
</section>
|
||
</main>
|