@bvdm/delano 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"$(git rev-parse --show-toplevel)/.agents/hooks/codex-session-status.js\"",
10
+ "timeout": 5,
11
+ "statusMessage": "Loading Delano open projects"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -3,8 +3,9 @@
3
3
  Minimal local frontend for browsing `.project` markdown contracts.
4
4
 
5
5
  - Read-only: serves files from `.project` and does not write delivery state.
6
- - Default URL: `http://127.0.0.1:3977`
7
- - Override port: `DELANO_VIEWER_PORT=3987 npm run viewer`
6
+ - Default starting URL: `http://127.0.0.1:3977`
7
+ - Override starting port: `DELANO_VIEWER_PORT=3987 npm run viewer`
8
+ - Multiple viewers can run at once. If the starting port is already in use, the viewer tries the next available port and prints the actual URL.
8
9
 
9
10
  Run from the repository root:
10
11
 
@@ -771,7 +771,19 @@ function render() {
771
771
  });
772
772
  document.querySelectorAll('[data-doc]').forEach((el) => el.onclick = () => loadDoc(el.dataset.doc));
773
773
  document.querySelectorAll('[data-status]').forEach((el) => el.onclick = () => { state.status = el.dataset.status; render(); });
774
- document.querySelectorAll('[data-role]').forEach((el) => el.onclick = () => { state.role = el.dataset.role; state.workstream = null; render(); });
774
+ document.querySelectorAll('[data-role]').forEach((el) => el.onclick = () => {
775
+ state.role = el.dataset.role;
776
+ state.workstream = null;
777
+ if (state.role !== 'all') {
778
+ const firstInRole = currentDocs().find((doc) => doc.role === state.role);
779
+ if (firstInRole) {
780
+ if (state.role === 'workstream') state.workstream = firstInRole.path;
781
+ loadDoc(firstInRole.path);
782
+ return;
783
+ }
784
+ }
785
+ render();
786
+ });
775
787
  document.querySelectorAll('[data-workstream]').forEach((el) => el.onclick = () => { state.workstream = el.dataset.workstream; state.role = 'all'; loadDoc(el.dataset.doc); });
776
788
  document.querySelectorAll('[data-clear-workstream]').forEach((el) => el.onclick = () => { state.workstream = null; render(); });
777
789
  document.querySelectorAll('[data-outline-toggle]').forEach((el) => el.onclick = () => { state.outlineOpen = !state.outlineOpen; render(); });
@@ -1,21 +1,19 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>Delano Viewer</title>
7
- <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />
8
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
- <link
10
- rel="stylesheet"
11
- href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Instrument+Serif:ital@0;1&display=swap"
12
- />
13
- <link rel="stylesheet" href="/styles.css" />
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Delano Viewer</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="/styles.css" />
14
11
  </head>
15
12
  <body>
16
- <div class="ambient" aria-hidden="true"></div>
17
- <div id="app">Loading Delano viewer...</div>
18
- <div id="copy-live" class="visually-hidden" aria-live="polite" aria-atomic="true"></div>
19
- <script src="/app.js"></script>
13
+ <div id="root"></div>
14
+ <script src="https://unpkg.com/react@18.3.1/umd/react.development.js" crossorigin="anonymous"></script>
15
+ <script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" crossorigin="anonymous"></script>
16
+ <script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" crossorigin="anonymous"></script>
17
+ <script type="text/babel" src="/app.jsx"></script>
20
18
  </body>
21
19
  </html>