blob: 9199b23301080942cece10ef4afe0582ef991b78 [file] [log] [blame]
Autoformatter8c463622025-05-16 21:54:17 +00001<!doctype html>
Philip Zeyliger272a90e2025-05-16 14:49:51 -07002<html lang="en">
Autoformatter8c463622025-05-16 21:54:17 +00003 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>Sketch Monaco Diff View Demo</title>
7 <script type="module">
8 // Set up the demo environment with mock data service
9 import { MockGitDataService } from "./mock-git-data-service.ts";
10 import "../sketch-diff2-view.ts";
11
12 // Wait for DOM content to be loaded before initializing components
13 document.addEventListener("DOMContentLoaded", () => {
14 // Create a mock service instance
15 const mockService = new MockGitDataService();
16 console.log("Demo initialized with MockGitDataService");
17
18 // Get the diff2 view component and set its gitService property
19 const diff2View = document.querySelector("sketch-diff2-view");
20 if (diff2View) {
21 diff2View.gitService = mockService;
22 }
23 });
24 </script>
25 <style>
26 body {
27 font-family:
28 system-ui,
29 -apple-system,
30 BlinkMacSystemFont,
31 "Segoe UI",
32 Roboto,
33 Helvetica,
34 Arial,
35 sans-serif;
36 max-width: 1200px;
37 margin: 0 auto;
38 padding: 2rem;
Philip Zeyliger272a90e2025-05-16 14:49:51 -070039 }
Philip Zeyliger272a90e2025-05-16 14:49:51 -070040
Autoformatter8c463622025-05-16 21:54:17 +000041 h1 {
42 color: #333;
43 margin-bottom: 2rem;
44 }
Philip Zeyliger272a90e2025-05-16 14:49:51 -070045
Autoformatter8c463622025-05-16 21:54:17 +000046 .control-panel {
47 margin-bottom: 2rem;
48 padding: 1rem;
49 background-color: #f0f0f0;
50 border-radius: 4px;
51 }
Philip Zeyliger272a90e2025-05-16 14:49:51 -070052
Autoformatter8c463622025-05-16 21:54:17 +000053 .demo-container {
54 display: flex;
55 height: 80vh; /* Use viewport height to ensure good sizing */
56 min-height: 600px; /* Minimum height */
57 border: 1px solid #ddd;
58 margin-top: 20px;
59 margin-bottom: 30px;
60 }
Philip Zeyliger272a90e2025-05-16 14:49:51 -070061
Autoformatter8c463622025-05-16 21:54:17 +000062 sketch-diff2-view {
63 width: 100%;
64 height: 100%;
65 }
66 </style>
67 </head>
68 <body>
69 <h1>Sketch Monaco Diff View Demo</h1>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070070
Autoformatter8c463622025-05-16 21:54:17 +000071 <div class="control-panel">
72 <p>
73 This demonstrates the Monaco-based diff view with range and file
74 pickers.
75 </p>
76 <p>Using mock data to simulate the real API responses.</p>
77 </div>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070078
Autoformatter8c463622025-05-16 21:54:17 +000079 <div class="demo-container">
80 <sketch-diff2-view></sketch-diff2-view>
81 </div>
82 </body>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070083</html>