forked from swiftwasm/JavaScriptKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
112 lines (103 loc) · 4.59 KB
/
index.html
File metadata and controls
112 lines (103 loc) · 4.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BridgeJS Playground</title>
<!-- Import Map for TypeScript and processor -->
<script type="importmap">
{
"imports": {
"typescript": "https://esm.sh/typescript@5.8.2",
"@typescript/vfs": "https://esm.sh/@typescript/vfs@1.6.1"
}
}
</script>
<!-- Monaco Editor CDN -->
<script src="https://unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script>
<!-- Custom Styles -->
<link rel="stylesheet" href="./Sources/JavaScript/styles.css">
</head>
<body>
<div class="container">
<!-- Header -->
<header class="header">
<h1>BridgeJS Playground</h1>
<p>Interactive playground to preview bridged code generated by BridgeJS</p>
<div class="share-controls">
<button id="shareButton" class="share-button">Share Code</button>
<div id="shareDialog" class="share-dialog hidden">
<div class="share-dialog-content">
<h3>Share Your Code</h3>
<div class="share-url-container">
<input type="text" id="shareUrl" class="share-url-input" readonly />
<button id="copyButton" class="copy-button">Copy</button>
</div>
<div class="share-dialog-actions">
<button id="closeShareDialog" class="close-button">Close</button>
</div>
</div>
</div>
</div>
<div id="progressBar" class="progress hidden" aria-live="polite">
<div class="progress-track">
<div id="progressFill" class="progress-fill" style="width:0%"></div>
</div>
<div id="progressLabel" class="progress-label">Initializing…</div>
</div>
</header>
<!-- Error Display -->
<div id="errorDisplay" class="error-display">
<h3>Error</h3>
<pre id="errorMessage"></pre>
</div>
<!-- Main Layout -->
<div class="main-content">
<!-- Input Section -->
<div class="section">
<div class="section-header">
<h2 class="input-title">Input</h2>
</div>
<div class="tab-group">
<button class="tab-button active" data-tab="swift">Playground.swift</button>
<button class="tab-button" data-tab="dts">bridge-js.d.ts</button>
</div>
<div id="swiftEditorTab" class="tab-content active">
<div id="swiftEditor" class="editor-container"></div>
</div>
<div id="dtsEditorTab" class="tab-content">
<div id="dtsEditor" class="editor-container"></div>
</div>
</div>
<!-- Output Section -->
<div class="section">
<div class="section-header">
<h2 class="output-title">Output</h2>
</div>
<div class="tab-group">
<button class="tab-button active" data-tab="dts-generated">Playground.d.ts</button>
<button class="tab-button" data-tab="swift-import-macros">BridgeJS.Macros.swift</button>
<button class="tab-button" data-tab="js-generated">Playground.js</button>
<button class="tab-button" data-tab="swift-glue">BridgeJS.swift</button>
</div>
<div id="swiftImportMacrosOutputTab" class="tab-content active">
<div id="swiftImportMacrosOutput" class="editor-container"></div>
</div>
<div id="swiftGlueOutputTab" class="tab-content">
<div id="swiftGlueOutput" class="editor-container"></div>
</div>
<div id="jsOutputTab" class="tab-content">
<div id="jsOutput" class="editor-container"></div>
</div>
<div id="dtsOutputTab" class="tab-content">
<div id="dtsOutput" class="editor-container"></div>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script type="module" src="./Sources/JavaScript/index.js"></script>
<script type="module" src="./Sources/JavaScript/editor.js"></script>
<script type="module" src="./Sources/JavaScript/app.js"></script>
</body>
</html>