@screenbook/ui 0.0.1
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.
- package/.astro/content-assets.mjs +1 -0
- package/.astro/content-modules.mjs +1 -0
- package/.astro/content.d.ts +199 -0
- package/.astro/data-store.json +1 -0
- package/.astro/settings.json +5 -0
- package/.astro/types.d.ts +2 -0
- package/.prettierrc +15 -0
- package/.screenbook/coverage.json +37 -0
- package/.screenbook/screens.json +90 -0
- package/LICENSE +21 -0
- package/astro.config.mjs +18 -0
- package/dist/client/_astro/_baseUniq.BGai4mcc.js +1 -0
- package/dist/client/_astro/arc.DUp0dfXj.js +1 -0
- package/dist/client/_astro/architectureDiagram-VXUJARFQ.De_Gt-YC.js +36 -0
- package/dist/client/_astro/blockDiagram-VD42YOAC.BBt_VNhR.js +122 -0
- package/dist/client/_astro/c4Diagram-YG6GDRKO.DfgUlHvt.js +10 -0
- package/dist/client/_astro/channel.CNyr52v1.js +1 -0
- package/dist/client/_astro/chunk-4BX2VUAB.BL0ar6du.js +1 -0
- package/dist/client/_astro/chunk-55IACEB6.CI6SkZkY.js +1 -0
- package/dist/client/_astro/chunk-B4BG7PRW.Z25N80K6.js +165 -0
- package/dist/client/_astro/chunk-DI55MBZ5.BqjPVmi1.js +220 -0
- package/dist/client/_astro/chunk-FMBD7UC4.bZ9DWnFm.js +15 -0
- package/dist/client/_astro/chunk-QN33PNHL.BkzuUgWB.js +1 -0
- package/dist/client/_astro/chunk-QZHKN3VN.C__d68N_.js +1 -0
- package/dist/client/_astro/chunk-TZMSLE5B.BIpu8bMn.js +1 -0
- package/dist/client/_astro/classDiagram-2ON5EDUG.CxT3aW-h.js +1 -0
- package/dist/client/_astro/classDiagram-v2-WZHVMYZB.CxT3aW-h.js +1 -0
- package/dist/client/_astro/clone.U_lSZ6fe.js +1 -0
- package/dist/client/_astro/cose-bilkent-S5V4N54A.D48yfMll.js +1 -0
- package/dist/client/_astro/coverage.CKIVg4LY.css +1 -0
- package/dist/client/_astro/coverage.DDJMzKCq.css +1 -0
- package/dist/client/_astro/cytoscape.esm.DtBltrT8.js +331 -0
- package/dist/client/_astro/dagre-6UL2VRFP.LKVH7b30.js +4 -0
- package/dist/client/_astro/defaultLocale.C4B-KCzX.js +1 -0
- package/dist/client/_astro/diagram-PSM6KHXK.AHgUjH56.js +24 -0
- package/dist/client/_astro/diagram-QEK2KX5R.DvS33xWZ.js +43 -0
- package/dist/client/_astro/diagram-S2PKOQOG.BWisaYrQ.js +24 -0
- package/dist/client/_astro/erDiagram-Q2GNP2WA.B7oID6oT.js +60 -0
- package/dist/client/_astro/flowDiagram-NV44I4VS.Bb1qJLxr.js +162 -0
- package/dist/client/_astro/ganttDiagram-JELNMOA3.3vGHETyo.js +267 -0
- package/dist/client/_astro/gitGraphDiagram-NY62KEGX.Co2SKcif.js +65 -0
- package/dist/client/_astro/graph.B5fevUwB.js +1 -0
- package/dist/client/_astro/graph.astro_astro_type_script_index_0_lang.1HlATQ1g.js +1 -0
- package/dist/client/_astro/impact.Cvhl64u1.css +1 -0
- package/dist/client/_astro/impact.astro_astro_type_script_index_0_lang.D4cAR9AL.js +6 -0
- package/dist/client/_astro/infoDiagram-WHAUD3N6.B6ULtps1.js +2 -0
- package/dist/client/_astro/init.Gi6I4Gst.js +1 -0
- package/dist/client/_astro/journeyDiagram-XKPGCS4Q.BSOCzWmw.js +139 -0
- package/dist/client/_astro/kanban-definition-3W4ZIXB7.D8KKGc1o.js +89 -0
- package/dist/client/_astro/katex.XbL3y5x-.js +261 -0
- package/dist/client/_astro/layout.8vv24qEg.js +1 -0
- package/dist/client/_astro/linear.B6O9ymuK.js +1 -0
- package/dist/client/_astro/mermaid.core.CReXU7YN.js +256 -0
- package/dist/client/_astro/min.CdGMGVU0.js +1 -0
- package/dist/client/_astro/mindmap-definition-VGOIOE7T.G14HgtDw.js +68 -0
- package/dist/client/_astro/ordinal.BYWQX77i.js +1 -0
- package/dist/client/_astro/pieDiagram-ADFJNKIX.bC2VkyoW.js +30 -0
- package/dist/client/_astro/quadrantDiagram-AYHSOK5B.BlLaQQxO.js +7 -0
- package/dist/client/_astro/requirementDiagram-UZGBJVZJ.DHRnMofO.js +64 -0
- package/dist/client/_astro/sankeyDiagram-TZEHDZUN.BMuaJBmt.js +10 -0
- package/dist/client/_astro/sequenceDiagram-WL72ISMW.CnU62wqy.js +145 -0
- package/dist/client/_astro/stateDiagram-FKZM4ZOC.CewI55YO.js +1 -0
- package/dist/client/_astro/stateDiagram-v2-4FDKWEC3.7xUQqoNr.js +1 -0
- package/dist/client/_astro/timeline-definition-IT6M3QCI.D1PLRwss.js +61 -0
- package/dist/client/_astro/treemap-KMMF4GRG.D3VNVvXF.js +128 -0
- package/dist/client/_astro/xychartDiagram-PRI3JC2R.CQex0-ul.js +7 -0
- package/dist/client/logo.svg +5 -0
- package/dist/server/_@astrojs-ssr-adapter.mjs +1 -0
- package/dist/server/_noop-middleware.mjs +3 -0
- package/dist/server/chunks/_@astrojs-ssr-adapter_DgsYudHz.mjs +4385 -0
- package/dist/server/chunks/astro/server_m7yT4wCr.mjs +2787 -0
- package/dist/server/chunks/astro-designed-error-pages_BvPhMmw0.mjs +364 -0
- package/dist/server/chunks/fs-lite_COtHaKzy.mjs +157 -0
- package/dist/server/chunks/impactAnalysis_Bz5lMdmy.mjs +188 -0
- package/dist/server/chunks/loadScreens_DJf-tycc.mjs +39 -0
- package/dist/server/chunks/node_DoTkMCOi.mjs +1673 -0
- package/dist/server/chunks/remote_B3W5fv4r.mjs +188 -0
- package/dist/server/chunks/sharp_DHNfMLYY.mjs +99 -0
- package/dist/server/entry.mjs +47 -0
- package/dist/server/manifest_-V1HEnR8.mjs +101 -0
- package/dist/server/noop-entrypoint.mjs +3 -0
- package/dist/server/pages/_image.astro.mjs +2 -0
- package/dist/server/pages/coverage.astro.mjs +65 -0
- package/dist/server/pages/graph.astro.mjs +107 -0
- package/dist/server/pages/impact.astro.mjs +52 -0
- package/dist/server/pages/index.astro.mjs +28 -0
- package/dist/server/pages/screen/_id_.astro.mjs +52 -0
- package/dist/server/renderers.mjs +3 -0
- package/package.json +42 -0
- package/public/logo.svg +5 -0
- package/src/layouts/Layout.astro +60 -0
- package/src/pages/coverage.astro +399 -0
- package/src/pages/graph.astro +330 -0
- package/src/pages/impact.astro +459 -0
- package/src/pages/index.astro +167 -0
- package/src/pages/screen/[id].astro +186 -0
- package/src/styles/global.css +862 -0
- package/src/utils/impactAnalysis.ts +297 -0
- package/src/utils/loadCoverage.ts +30 -0
- package/src/utils/loadScreens.ts +18 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { e as createComponent, k as renderComponent, r as renderTemplate, m as maybeRenderHead, n as renderScript, l as Fragment } from '../chunks/astro/server_m7yT4wCr.mjs';
|
|
2
|
+
import 'piccolore';
|
|
3
|
+
import { l as loadScreens, $ as $$Layout } from '../chunks/loadScreens_DJf-tycc.mjs';
|
|
4
|
+
/* empty css */
|
|
5
|
+
export { renderers } from '../renderers.mjs';
|
|
6
|
+
|
|
7
|
+
const $$Graph = createComponent(async ($$result, $$props, $$slots) => {
|
|
8
|
+
const screens = loadScreens();
|
|
9
|
+
let navigationGraph = "";
|
|
10
|
+
if (screens.length > 0) {
|
|
11
|
+
const lines = ["flowchart TD"];
|
|
12
|
+
for (const screen of screens) {
|
|
13
|
+
const label = screen.title.replace(/"/g, "'");
|
|
14
|
+
const id = screen.id.replace(/\./g, "_");
|
|
15
|
+
lines.push(` ${id}["${label}"]`);
|
|
16
|
+
}
|
|
17
|
+
lines.push("");
|
|
18
|
+
for (const screen of screens) {
|
|
19
|
+
if (screen.next) {
|
|
20
|
+
const fromId = screen.id.replace(/\./g, "_");
|
|
21
|
+
for (const nextId of screen.next) {
|
|
22
|
+
const toId = nextId.replace(/\./g, "_");
|
|
23
|
+
lines.push(` ${fromId} --> ${toId}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
navigationGraph = lines.join("\n");
|
|
28
|
+
}
|
|
29
|
+
let apiGraph = "";
|
|
30
|
+
if (screens.length > 0) {
|
|
31
|
+
const lines = ["flowchart LR"];
|
|
32
|
+
const apis = /* @__PURE__ */ new Set();
|
|
33
|
+
for (const screen of screens) {
|
|
34
|
+
if (screen.dependsOn) {
|
|
35
|
+
for (const api of screen.dependsOn) {
|
|
36
|
+
const baseName = api.split(".")[0];
|
|
37
|
+
apis.add(baseName);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
lines.push(" %% API nodes");
|
|
42
|
+
for (const api of apis) {
|
|
43
|
+
const id = api.replace(/\./g, "_");
|
|
44
|
+
lines.push(` ${id}[/"${api}"/]`);
|
|
45
|
+
}
|
|
46
|
+
lines.push("");
|
|
47
|
+
lines.push(" %% Screen nodes");
|
|
48
|
+
for (const screen of screens) {
|
|
49
|
+
if (screen.dependsOn && screen.dependsOn.length > 0) {
|
|
50
|
+
const label = screen.title.replace(/"/g, "'");
|
|
51
|
+
const id = screen.id.replace(/\./g, "_");
|
|
52
|
+
lines.push(` ${id}["${label}"]`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
lines.push("");
|
|
56
|
+
lines.push(" %% Dependencies");
|
|
57
|
+
for (const screen of screens) {
|
|
58
|
+
if (screen.dependsOn) {
|
|
59
|
+
const screenId = screen.id.replace(/\./g, "_");
|
|
60
|
+
const connectedApis = /* @__PURE__ */ new Set();
|
|
61
|
+
for (const api of screen.dependsOn) {
|
|
62
|
+
const baseName = api.split(".")[0];
|
|
63
|
+
if (!connectedApis.has(baseName)) {
|
|
64
|
+
connectedApis.add(baseName);
|
|
65
|
+
const apiId = baseName.replace(/\./g, "_");
|
|
66
|
+
lines.push(` ${apiId} --> ${screenId}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
lines.push("");
|
|
72
|
+
lines.push(" %% Styling");
|
|
73
|
+
lines.push(` classDef apiNode fill:#14b8a6,stroke:#5eead4,stroke-width:2px,color:#042f2e`);
|
|
74
|
+
for (const api of apis) {
|
|
75
|
+
const id = api.replace(/\./g, "_");
|
|
76
|
+
lines.push(` class ${id} apiNode`);
|
|
77
|
+
}
|
|
78
|
+
apiGraph = lines.join("\n");
|
|
79
|
+
}
|
|
80
|
+
const apiCount = new Set(
|
|
81
|
+
screens.flatMap((s) => (s.dependsOn || []).map((d) => d.split(".")[0]))
|
|
82
|
+
).size;
|
|
83
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Graph", "currentPage": "graph", "data-astro-cid-oy34yelw": true }, { "default": async ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="container" data-astro-cid-oy34yelw> <div class="page-header" data-astro-cid-oy34yelw> <h1 class="page-title" data-astro-cid-oy34yelw>Dependency Graph</h1> <p class="page-description" data-astro-cid-oy34yelw>
|
|
84
|
+
Visualize relationships between screens and APIs.
|
|
85
|
+
</p> </div> ${screens.length === 0 ? renderTemplate`<div class="empty-state" data-astro-cid-oy34yelw> <svg class="empty-state-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" data-astro-cid-oy34yelw> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" data-astro-cid-oy34yelw></path> </svg> <h2 class="empty-state-title" data-astro-cid-oy34yelw>No graph data</h2> <p class="empty-state-description" data-astro-cid-oy34yelw>
|
|
86
|
+
Run the build command to generate screen metadata.
|
|
87
|
+
</p> <code class="empty-state-code" data-astro-cid-oy34yelw> <span class="prompt" data-astro-cid-oy34yelw>$</span> screenbook build
|
|
88
|
+
</code> </div>` : renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "data-astro-cid-oy34yelw": true }, { "default": async ($$result3) => renderTemplate` <div class="graph-controls" data-astro-cid-oy34yelw> <div class="view-toggle" data-astro-cid-oy34yelw> <button class="toggle-btn active" data-view="navigation" data-astro-cid-oy34yelw> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-oy34yelw> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" data-astro-cid-oy34yelw></path> </svg>
|
|
89
|
+
Navigation
|
|
90
|
+
</button> <button class="toggle-btn" data-view="api" data-astro-cid-oy34yelw> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-oy34yelw> <path stroke-linecap="round" stroke-linejoin="round" d="M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z" data-astro-cid-oy34yelw></path> </svg>
|
|
91
|
+
API Dependencies
|
|
92
|
+
</button> </div> <div class="graph-stats" data-astro-cid-oy34yelw> <span class="stat" data-astro-cid-oy34yelw>${screens.length} screens</span> <span class="stat" data-astro-cid-oy34yelw>${apiCount} APIs</span> </div> </div> <div class="graph-container" id="navigation-graph" data-astro-cid-oy34yelw> <pre class="mermaid" data-graph="navigation" data-astro-cid-oy34yelw>${navigationGraph}</pre> </div> <div class="graph-container hidden" id="api-graph" data-astro-cid-oy34yelw> <pre class="mermaid" data-graph="api" data-astro-cid-oy34yelw>${apiGraph}</pre> </div> <div class="graph-legend" id="navigation-legend" data-astro-cid-oy34yelw> <div class="graph-legend-item" data-astro-cid-oy34yelw> <div class="legend-node" data-astro-cid-oy34yelw></div> <span data-astro-cid-oy34yelw>Screen</span> </div> <div class="graph-legend-item" data-astro-cid-oy34yelw> <div class="legend-edge" data-astro-cid-oy34yelw></div> <span data-astro-cid-oy34yelw>Navigation flow</span> </div> </div> <div class="graph-legend hidden" id="api-legend" data-astro-cid-oy34yelw> <div class="graph-legend-item" data-astro-cid-oy34yelw> <div class="legend-node legend-api" data-astro-cid-oy34yelw></div> <span data-astro-cid-oy34yelw>API</span> </div> <div class="graph-legend-item" data-astro-cid-oy34yelw> <div class="legend-node" data-astro-cid-oy34yelw></div> <span data-astro-cid-oy34yelw>Screen</span> </div> <div class="graph-legend-item" data-astro-cid-oy34yelw> <div class="legend-edge" data-astro-cid-oy34yelw></div> <span data-astro-cid-oy34yelw>Depends on</span> </div> </div> ` })}`} </div> ${renderScript($$result2, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/graph.astro?astro&type=script&index=0&lang.ts")} ` })} `;
|
|
93
|
+
}, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/graph.astro", void 0);
|
|
94
|
+
|
|
95
|
+
const $$file = "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/graph.astro";
|
|
96
|
+
const $$url = "/graph";
|
|
97
|
+
|
|
98
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
99
|
+
__proto__: null,
|
|
100
|
+
default: $$Graph,
|
|
101
|
+
file: $$file,
|
|
102
|
+
url: $$url
|
|
103
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
104
|
+
|
|
105
|
+
const page = () => _page;
|
|
106
|
+
|
|
107
|
+
export { page };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { e as createComponent, f as createAstro, k as renderComponent, r as renderTemplate, m as maybeRenderHead, n as renderScript, l as Fragment, h as addAttribute } from '../chunks/astro/server_m7yT4wCr.mjs';
|
|
2
|
+
import 'piccolore';
|
|
3
|
+
import { l as loadScreens, $ as $$Layout } from '../chunks/loadScreens_DJf-tycc.mjs';
|
|
4
|
+
import { g as getAllApis, a as analyzeImpact, b as generateImpactMermaid, f as formatImpactMarkdown } from '../chunks/impactAnalysis_Bz5lMdmy.mjs';
|
|
5
|
+
/* empty css */
|
|
6
|
+
export { renderers } from '../renderers.mjs';
|
|
7
|
+
|
|
8
|
+
const $$Astro = createAstro();
|
|
9
|
+
const $$Impact = createComponent(async ($$result, $$props, $$slots) => {
|
|
10
|
+
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
11
|
+
Astro2.self = $$Impact;
|
|
12
|
+
const screens = loadScreens();
|
|
13
|
+
const allApis = getAllApis(screens);
|
|
14
|
+
const url = Astro2.url;
|
|
15
|
+
const apiQuery = url.searchParams.get("api") || "";
|
|
16
|
+
let result = null;
|
|
17
|
+
let mermaidGraph = "";
|
|
18
|
+
let markdown = "";
|
|
19
|
+
if (apiQuery && screens.length > 0) {
|
|
20
|
+
result = analyzeImpact(screens, apiQuery, 3);
|
|
21
|
+
mermaidGraph = generateImpactMermaid(screens, result);
|
|
22
|
+
markdown = formatImpactMarkdown(result);
|
|
23
|
+
}
|
|
24
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Impact Analysis", "currentPage": "impact", "data-astro-cid-kf663cba": true }, { "default": async ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="container" data-astro-cid-kf663cba> <div class="page-header" data-astro-cid-kf663cba> <h1 class="page-title" data-astro-cid-kf663cba>Impact Analysis</h1> <p class="page-description" data-astro-cid-kf663cba>
|
|
25
|
+
Analyze which screens are affected when an API changes.
|
|
26
|
+
</p> </div> ${screens.length === 0 ? renderTemplate`<div class="empty-state" data-astro-cid-kf663cba> <svg class="empty-state-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" data-astro-cid-kf663cba></path> </svg> <h2 class="empty-state-title" data-astro-cid-kf663cba>No screen data</h2> <p class="empty-state-description" data-astro-cid-kf663cba>
|
|
27
|
+
Run the build command to generate screen metadata.
|
|
28
|
+
</p> <code class="empty-state-code" data-astro-cid-kf663cba> <span class="prompt" data-astro-cid-kf663cba>$</span> screenbook build
|
|
29
|
+
</code> </div>` : renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "data-astro-cid-kf663cba": true }, { "default": async ($$result3) => renderTemplate` <div class="impact-search" data-astro-cid-kf663cba> <form method="get" class="search-form" data-astro-cid-kf663cba> <div class="search-wrapper impact-search-wrapper" data-astro-cid-kf663cba> <svg class="search-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" data-astro-cid-kf663cba></path> </svg> <input type="text" name="api" class="search-input" placeholder="Enter API name (e.g., InvoiceAPI.getDetail)"${addAttribute(apiQuery, "value")} list="api-suggestions" data-astro-cid-kf663cba> <datalist id="api-suggestions" data-astro-cid-kf663cba> ${allApis.map((api) => renderTemplate`<option${addAttribute(api, "value")} data-astro-cid-kf663cba></option>`)} </datalist> <button type="submit" class="search-button" data-astro-cid-kf663cba>
|
|
30
|
+
Analyze
|
|
31
|
+
</button> </div> </form> ${allApis.length > 0 && !apiQuery && renderTemplate`<div class="api-suggestions" data-astro-cid-kf663cba> <p class="suggestions-label" data-astro-cid-kf663cba>Available APIs:</p> <div class="tags" data-astro-cid-kf663cba> ${allApis.slice(0, 10).map((api) => renderTemplate`<a${addAttribute(`/impact?api=${encodeURIComponent(api)}`, "href")} class="tag" data-astro-cid-kf663cba> ${api} </a>`)} ${allApis.length > 10 && renderTemplate`<span class="tag tag-more" data-astro-cid-kf663cba>+${allApis.length - 10} more</span>`} </div> </div>`} </div> ${result && renderTemplate`<div class="impact-results" data-astro-cid-kf663cba> <div class="impact-summary" data-astro-cid-kf663cba> <div class="stats" data-astro-cid-kf663cba> <div class="stat" data-astro-cid-kf663cba> <div class="stat-value stat-total" data-astro-cid-kf663cba>${result.totalCount}</div> <div class="stat-label" data-astro-cid-kf663cba>Total Affected</div> </div> <div class="stat" data-astro-cid-kf663cba> <div class="stat-value stat-direct" data-astro-cid-kf663cba>${result.direct.length}</div> <div class="stat-label" data-astro-cid-kf663cba>Direct</div> </div> <div class="stat" data-astro-cid-kf663cba> <div class="stat-value stat-transitive" data-astro-cid-kf663cba>${result.transitive.length}</div> <div class="stat-label" data-astro-cid-kf663cba>Transitive</div> </div> </div> <button id="copy-markdown" class="copy-button"${addAttribute(markdown, "data-markdown")} data-astro-cid-kf663cba> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184" data-astro-cid-kf663cba></path> </svg>
|
|
32
|
+
Copy as Markdown
|
|
33
|
+
</button> </div> ${result.totalCount === 0 ? renderTemplate`<div class="no-impact" data-astro-cid-kf663cba> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" data-astro-cid-kf663cba></path> </svg> <p data-astro-cid-kf663cba>No screens depend on <code data-astro-cid-kf663cba>${apiQuery}</code></p> </div>` : renderTemplate`${renderComponent($$result3, "Fragment", Fragment, { "data-astro-cid-kf663cba": true }, { "default": async ($$result4) => renderTemplate` <div class="impact-graph" data-astro-cid-kf663cba> <div class="graph-container" data-astro-cid-kf663cba> <pre class="mermaid" data-astro-cid-kf663cba>${mermaidGraph}</pre> </div> <div class="graph-legend" data-astro-cid-kf663cba> <div class="graph-legend-item" data-astro-cid-kf663cba> <div class="legend-node legend-direct" data-astro-cid-kf663cba></div> <span data-astro-cid-kf663cba>Direct dependency</span> </div> <div class="graph-legend-item" data-astro-cid-kf663cba> <div class="legend-node legend-transitive" data-astro-cid-kf663cba></div> <span data-astro-cid-kf663cba>Transitive</span> </div> <div class="graph-legend-item" data-astro-cid-kf663cba> <div class="legend-node" data-astro-cid-kf663cba></div> <span data-astro-cid-kf663cba>Not affected</span> </div> </div> </div> <div class="impact-details" data-astro-cid-kf663cba> ${result.direct.length > 0 && renderTemplate`<div class="section" data-astro-cid-kf663cba> <h3 class="section-title" data-astro-cid-kf663cba> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" data-astro-cid-kf663cba></path> </svg>
|
|
34
|
+
Direct Dependencies (${result.direct.length})
|
|
35
|
+
</h3> <div class="screen-link-list" data-astro-cid-kf663cba> ${result.direct.map((screen) => renderTemplate`<a${addAttribute(`/screen/${screen.id}`, "href")} class="screen-link impact-screen direct" data-astro-cid-kf663cba> <div class="screen-link-info" data-astro-cid-kf663cba> <div class="screen-link-title" data-astro-cid-kf663cba>${screen.title}</div> <div class="screen-link-id" data-astro-cid-kf663cba>${screen.route}</div> </div> ${screen.owner && screen.owner.length > 0 && renderTemplate`<div class="screen-link-owner" data-astro-cid-kf663cba> ${screen.owner.join(", ")} </div>`} </a>`)} </div> </div>`} ${result.transitive.length > 0 && renderTemplate`<div class="section" data-astro-cid-kf663cba> <h3 class="section-title" data-astro-cid-kf663cba> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" data-astro-cid-kf663cba> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" data-astro-cid-kf663cba></path> </svg>
|
|
36
|
+
Transitive Dependencies (${result.transitive.length})
|
|
37
|
+
</h3> <div class="screen-link-list" data-astro-cid-kf663cba> ${result.transitive.map(({ screen, path }) => renderTemplate`<a${addAttribute(`/screen/${screen.id}`, "href")} class="screen-link impact-screen transitive" data-astro-cid-kf663cba> <div class="screen-link-info" data-astro-cid-kf663cba> <div class="screen-link-title" data-astro-cid-kf663cba>${screen.title}</div> <div class="screen-link-path" data-astro-cid-kf663cba> ${path.join(" \u2192 ")} </div> </div> </a>`)} </div> </div>`} </div> ` })}`} </div>`}` })}`} </div> ${renderScript($$result2, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/impact.astro?astro&type=script&index=0&lang.ts")} ` })} `;
|
|
38
|
+
}, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/impact.astro", void 0);
|
|
39
|
+
|
|
40
|
+
const $$file = "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/impact.astro";
|
|
41
|
+
const $$url = "/impact";
|
|
42
|
+
|
|
43
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
44
|
+
__proto__: null,
|
|
45
|
+
default: $$Impact,
|
|
46
|
+
file: $$file,
|
|
47
|
+
url: $$url
|
|
48
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
49
|
+
|
|
50
|
+
const page = () => _page;
|
|
51
|
+
|
|
52
|
+
export { page };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { e as createComponent, k as renderComponent, r as renderTemplate, m as maybeRenderHead, n as renderScript, l as Fragment, h as addAttribute } from '../chunks/astro/server_m7yT4wCr.mjs';
|
|
2
|
+
import 'piccolore';
|
|
3
|
+
import { l as loadScreens, $ as $$Layout } from '../chunks/loadScreens_DJf-tycc.mjs';
|
|
4
|
+
export { renderers } from '../renderers.mjs';
|
|
5
|
+
|
|
6
|
+
const $$Index = createComponent(($$result, $$props, $$slots) => {
|
|
7
|
+
const screens = loadScreens();
|
|
8
|
+
const allTags = [...new Set(screens.flatMap((s) => s.tags ?? []))];
|
|
9
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Screens", "currentPage": "screens" }, { "default": ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="container"> <div class="page-header"> <h1 class="page-title">Screens</h1> <p class="page-description">
|
|
10
|
+
Browse all screens in your application. Click on a screen to see details and navigation flows.
|
|
11
|
+
</p> </div> ${screens.length === 0 ? renderTemplate`<div class="empty-state"> <svg class="empty-state-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"></path> </svg> <h2 class="empty-state-title">No screens found</h2> <p class="empty-state-description">
|
|
12
|
+
Get started by generating screen metadata from your routes.
|
|
13
|
+
</p> <div class="empty-state-steps"> <div class="empty-state-step"> <span class="step-number">1</span> <div class="step-content"> <div class="step-title">Generate screen.meta.ts files</div> <code class="step-code">screenbook generate</code> </div> </div> <div class="empty-state-step"> <span class="step-number">2</span> <div class="step-content"> <div class="step-title">Build the screen catalog</div> <code class="step-code">screenbook build</code> </div> </div> <div class="empty-state-step"> <span class="step-number">3</span> <div class="step-content"> <div class="step-title">Restart the dev server</div> <code class="step-code">screenbook dev</code> </div> </div> </div> <div class="empty-state-features"> <p class="features-title">What you'll get:</p> <ul class="features-list"> <li>Screen catalog with search & filter</li> <li>Navigation graph visualization</li> <li>Impact analysis for API changes</li> <li>CI lint for documentation coverage</li> </ul> </div> </div>` : renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate` <div class="search-wrapper"> <svg class="search-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path> </svg> <input type="text" id="search" placeholder="Search screens..." class="search-input"> </div> ${allTags.length > 0 && renderTemplate`<div class="tags"> ${allTags.map((tag) => renderTemplate`<button class="tag"${addAttribute(tag, "data-tag")}>${tag}</button>`)} </div>`}<div class="screen-grid" id="screen-list"> ${screens.map((screen) => renderTemplate`<a${addAttribute(`/screen/${screen.id}`, "href")} class="card-link"${addAttribute(screen.tags?.join(",") ?? "", "data-tags")}${addAttribute(screen.title.toLowerCase(), "data-title")}${addAttribute(screen.id.toLowerCase(), "data-id")}> <div class="card"> <h3 class="card-title">${screen.title}</h3> <div class="card-route">${screen.route}</div> <div class="card-meta"> <span class="card-meta-item"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5l-3.9 19.5m-2.1-19.5l-3.9 19.5"></path> </svg> ${screen.id} </span> ${screen.owner && screen.owner.length > 0 && renderTemplate`<span class="card-meta-item"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"></path> </svg> ${screen.owner.join(", ")} </span>`} </div> ${screen.tags && screen.tags.length > 0 && renderTemplate`<div class="card-tags"> ${screen.tags.map((tag) => renderTemplate`<span class="card-tag">${tag}</span>`)} </div>`} </div> </a>`)} </div> ` })}`} </div> ${renderScript($$result2, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/index.astro?astro&type=script&index=0&lang.ts")} ` })}`;
|
|
14
|
+
}, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/index.astro", void 0);
|
|
15
|
+
|
|
16
|
+
const $$file = "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/index.astro";
|
|
17
|
+
const $$url = "";
|
|
18
|
+
|
|
19
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
20
|
+
__proto__: null,
|
|
21
|
+
default: $$Index,
|
|
22
|
+
file: $$file,
|
|
23
|
+
url: $$url
|
|
24
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
25
|
+
|
|
26
|
+
const page = () => _page;
|
|
27
|
+
|
|
28
|
+
export { page };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { e as createComponent, f as createAstro, k as renderComponent, r as renderTemplate, m as maybeRenderHead, h as addAttribute } from '../../chunks/astro/server_m7yT4wCr.mjs';
|
|
2
|
+
import 'piccolore';
|
|
3
|
+
import { l as loadScreens, $ as $$Layout } from '../../chunks/loadScreens_DJf-tycc.mjs';
|
|
4
|
+
import { c as getApiDependencyCount } from '../../chunks/impactAnalysis_Bz5lMdmy.mjs';
|
|
5
|
+
export { renderers } from '../../renderers.mjs';
|
|
6
|
+
|
|
7
|
+
const $$Astro = createAstro();
|
|
8
|
+
function getStaticPaths() {
|
|
9
|
+
const screens = loadScreens();
|
|
10
|
+
return screens.map((screen) => ({
|
|
11
|
+
params: { id: screen.id }
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
const $$id = createComponent(($$result, $$props, $$slots) => {
|
|
15
|
+
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
16
|
+
Astro2.self = $$id;
|
|
17
|
+
const screens = loadScreens();
|
|
18
|
+
const apiCounts = getApiDependencyCount(screens);
|
|
19
|
+
const { id } = Astro2.params;
|
|
20
|
+
const screen = screens.find((s) => s.id === id);
|
|
21
|
+
if (!screen) {
|
|
22
|
+
return Astro2.redirect("/");
|
|
23
|
+
}
|
|
24
|
+
const entryScreens = screens.filter((s) => screen.entryPoints?.includes(s.id));
|
|
25
|
+
const nextScreens = screens.filter((s) => screen.next?.includes(s.id));
|
|
26
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": screen.title }, { "default": ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="container"> <a href="/" class="back-link"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"></path> </svg>
|
|
27
|
+
Back to screens
|
|
28
|
+
</a> <div class="detail-header"> <h1 class="detail-title">${screen.title}</h1> <div class="detail-route"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"></path> </svg> ${screen.route} </div> </div> <div class="detail-content"> <div> <!-- Information --> <div class="section"> <h2 class="section-title">Information</h2> <div class="info-list"> <div class="info-item"> <span class="info-label">ID</span> <span class="info-value"><code>${screen.id}</code></span> </div> ${screen.owner && screen.owner.length > 0 && renderTemplate`<div class="info-item"> <span class="info-label">Owner</span> <span class="info-value">${screen.owner.join(", ")}</span> </div>`} ${screen.tags && screen.tags.length > 0 && renderTemplate`<div class="info-item"> <span class="info-label">Tags</span> <span class="info-value"> <div class="card-tags"> ${screen.tags.map((tag) => renderTemplate`<span class="card-tag">${tag}</span>`)} </div> </span> </div>`} ${screen.description && renderTemplate`<div class="info-item"> <span class="info-label">Description</span> <span class="info-value">${screen.description}</span> </div>`} </div> </div> <!-- Dependencies --> ${screen.dependsOn && screen.dependsOn.length > 0 && renderTemplate`<div class="section"> <h2 class="section-title">Dependencies</h2> <div class="dep-list"> ${screen.dependsOn.map((dep) => {
|
|
29
|
+
const count = apiCounts.get(dep) || 1;
|
|
30
|
+
const otherCount = count - 1;
|
|
31
|
+
return renderTemplate`<a${addAttribute(`/impact?api=${encodeURIComponent(dep)}`, "href")} class="dep-item dep-item-link"> <div class="dep-item-main"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"></path> </svg> <span>${dep}</span> </div> <div class="dep-item-meta"> ${otherCount > 0 && renderTemplate`<span class="dep-count">+${otherCount} other${otherCount > 1 ? "s" : ""}</span>`} <svg class="dep-arrow" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"></path> </svg> </div> </a>`;
|
|
32
|
+
})} </div> </div>`} <!-- External Links --> ${screen.links && screen.links.length > 0 && renderTemplate`<div class="section"> <h2 class="section-title">Links</h2> <div class="dep-list"> ${screen.links.map((link) => renderTemplate`<a${addAttribute(link.url, "href")} target="_blank" rel="noopener noreferrer" class="dep-item"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"></path> </svg> ${link.label} </a>`)} </div> </div>`} </div> <div> <!-- Entry Points --> ${entryScreens.length > 0 && renderTemplate`<div class="sidebar-card"> <h3 class="sidebar-card-title"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3"></path> </svg>
|
|
33
|
+
Entry Points
|
|
34
|
+
</h3> <div class="screen-link-list"> ${entryScreens.map((s) => renderTemplate`<a${addAttribute(`/screen/${s.id}`, "href")} class="screen-link"> <div class="screen-link-info"> <span class="screen-link-title">${s.title}</span> <span class="screen-link-id">${s.id}</span> </div> <svg class="screen-link-arrow" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"></path> </svg> </a>`)} </div> </div>`} <!-- Next Screens --> ${nextScreens.length > 0 && renderTemplate`<div class="sidebar-card"> <h3 class="sidebar-card-title"> <svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"></path> </svg>
|
|
35
|
+
Next Screens
|
|
36
|
+
</h3> <div class="screen-link-list"> ${nextScreens.map((s) => renderTemplate`<a${addAttribute(`/screen/${s.id}`, "href")} class="screen-link"> <div class="screen-link-info"> <span class="screen-link-title">${s.title}</span> <span class="screen-link-id">${s.id}</span> </div> <svg class="screen-link-arrow" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"></path> </svg> </a>`)} </div> </div>`} </div> </div> </div> ` })}`;
|
|
37
|
+
}, "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/screen/[id].astro", void 0);
|
|
38
|
+
|
|
39
|
+
const $$file = "/Users/wadakatu/www/experiments/screenbook/packages/ui/src/pages/screen/[id].astro";
|
|
40
|
+
const $$url = "/screen/[id]";
|
|
41
|
+
|
|
42
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
43
|
+
__proto__: null,
|
|
44
|
+
default: $$id,
|
|
45
|
+
file: $$file,
|
|
46
|
+
getStaticPaths,
|
|
47
|
+
url: $$url
|
|
48
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
49
|
+
|
|
50
|
+
const page = () => _page;
|
|
51
|
+
|
|
52
|
+
export { page };
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@screenbook/ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "UI for Screenbook - screen catalog and navigation graph viewer",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@astrojs/node": "^9.5.1",
|
|
8
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
9
|
+
"astro": "^5.16.0",
|
|
10
|
+
"mermaid": "^11.4.0",
|
|
11
|
+
"tailwindcss": "^4.0.0",
|
|
12
|
+
"@screenbook/core": "0.0.1"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"screenbook",
|
|
16
|
+
"ui",
|
|
17
|
+
"screen",
|
|
18
|
+
"catalog",
|
|
19
|
+
"navigation"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/wadakatu/screenbook.git",
|
|
25
|
+
"directory": "packages/ui"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/wadakatu/screenbook#readme",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/wadakatu/screenbook/issues"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"prettier": "^3.7.4",
|
|
33
|
+
"prettier-plugin-astro": "^0.14.1"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"dev": "astro dev",
|
|
37
|
+
"build": "astro build",
|
|
38
|
+
"preview": "astro preview",
|
|
39
|
+
"format": "prettier --write \"**/*.astro\"",
|
|
40
|
+
"format:check": "prettier --check \"**/*.astro\""
|
|
41
|
+
}
|
|
42
|
+
}
|
package/public/logo.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="45" y="12" width="40" height="20" rx="3" fill="#14b8a6"/>
|
|
3
|
+
<rect x="15" y="40" width="40" height="20" rx="3" fill="#14b8a6"/>
|
|
4
|
+
<rect x="45" y="68" width="40" height="20" rx="3" fill="#14b8a6"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
import "@/styles/global.css"
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string
|
|
6
|
+
currentPage?: "screens" | "graph" | "impact" | "coverage"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { title, currentPage } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!doctype html>
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<head>
|
|
15
|
+
<meta charset="UTF-8" />
|
|
16
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
|
+
<title>{title} | Screenbook</title>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<header class="header">
|
|
21
|
+
<div class="container">
|
|
22
|
+
<div class="header-content">
|
|
23
|
+
<a href="/" class="logo">
|
|
24
|
+
<img src="/logo.svg" alt="" class="logo-icon" width="24" height="24" />
|
|
25
|
+
Screenbook
|
|
26
|
+
</a>
|
|
27
|
+
<nav class="nav">
|
|
28
|
+
<a href="/" class:list={["nav-link", { active: currentPage === "screens" }]}>
|
|
29
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
30
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" />
|
|
31
|
+
</svg>
|
|
32
|
+
Screens
|
|
33
|
+
</a>
|
|
34
|
+
<a href="/graph" class:list={["nav-link", { active: currentPage === "graph" }]}>
|
|
35
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
36
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
|
|
37
|
+
</svg>
|
|
38
|
+
Graph
|
|
39
|
+
</a>
|
|
40
|
+
<a href="/impact" class:list={["nav-link", { active: currentPage === "impact" }]}>
|
|
41
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
42
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" />
|
|
43
|
+
</svg>
|
|
44
|
+
Impact
|
|
45
|
+
</a>
|
|
46
|
+
<a href="/coverage" class:list={["nav-link", { active: currentPage === "coverage" }]}>
|
|
47
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
48
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z" />
|
|
49
|
+
</svg>
|
|
50
|
+
Coverage
|
|
51
|
+
</a>
|
|
52
|
+
</nav>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</header>
|
|
56
|
+
<main>
|
|
57
|
+
<slot />
|
|
58
|
+
</main>
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|