synthos 0.6.0 → 0.7.0
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/README.md +33 -1
- package/default-pages/app_builder.html +40 -0
- package/default-pages/app_builder.json +1 -0
- package/default-pages/json_tools.html +89 -159
- package/default-pages/json_tools.json +1 -0
- package/default-pages/my_notes.html +33 -0
- package/default-pages/my_notes.json +12 -0
- package/default-pages/neon_asteroids.html +77 -0
- package/default-pages/neon_asteroids.json +12 -0
- package/default-pages/sidebar_builder.html +49 -0
- package/default-pages/sidebar_builder.json +1 -0
- package/default-pages/solar_explorer.html +1956 -0
- package/default-pages/solar_explorer.json +12 -0
- package/default-pages/solar_tutorial.html +476 -0
- package/default-pages/solar_tutorial.json +1 -0
- package/default-pages/two-panel_builder.html +66 -0
- package/default-pages/two-panel_builder.json +1 -0
- package/dist/connectors/index.d.ts +3 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +6 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/registry.d.ts +3 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +100 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/types.d.ts +61 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +3 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/files.d.ts +2 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +12 -1
- package/dist/files.js.map +1 -1
- package/dist/init.d.ts +8 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +155 -3
- package/dist/init.js.map +1 -1
- package/dist/migrations.d.ts +11 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +281 -0
- package/dist/migrations.js.map +1 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +10 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/providers.d.ts +7 -0
- package/dist/models/providers.d.ts.map +1 -0
- package/dist/models/providers.js +33 -0
- package/dist/models/providers.js.map +1 -0
- package/dist/models/types.d.ts +21 -0
- package/dist/models/types.d.ts.map +1 -0
- package/dist/models/types.js +3 -0
- package/dist/models/types.js.map +1 -0
- package/dist/pages.d.ts +21 -2
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +202 -23
- package/dist/pages.js.map +1 -1
- package/dist/scripts.js +2 -2
- package/dist/scripts.js.map +1 -1
- package/dist/service/createCompletePrompt.d.ts +3 -2
- package/dist/service/createCompletePrompt.d.ts.map +1 -1
- package/dist/service/createCompletePrompt.js +11 -16
- package/dist/service/createCompletePrompt.js.map +1 -1
- package/dist/service/debugLog.d.ts +11 -0
- package/dist/service/debugLog.d.ts.map +1 -0
- package/dist/service/debugLog.js +26 -0
- package/dist/service/debugLog.js.map +1 -0
- package/dist/service/modelInstructions.d.ts +7 -0
- package/dist/service/modelInstructions.d.ts.map +1 -0
- package/dist/service/modelInstructions.js +16 -0
- package/dist/service/modelInstructions.js.map +1 -0
- package/dist/service/requiresSettings.d.ts +2 -2
- package/dist/service/requiresSettings.d.ts.map +1 -1
- package/dist/service/requiresSettings.js.map +1 -1
- package/dist/service/server.d.ts.map +1 -1
- package/dist/service/server.js +15 -0
- package/dist/service/server.js.map +1 -1
- package/dist/service/transformPage.d.ts +81 -2
- package/dist/service/transformPage.d.ts.map +1 -1
- package/dist/service/transformPage.js +672 -82
- package/dist/service/transformPage.js.map +1 -1
- package/dist/service/useApiRoutes.d.ts.map +1 -1
- package/dist/service/useApiRoutes.js +579 -13
- package/dist/service/useApiRoutes.js.map +1 -1
- package/dist/service/useConnectorRoutes.d.ts +4 -0
- package/dist/service/useConnectorRoutes.d.ts.map +1 -0
- package/dist/service/useConnectorRoutes.js +389 -0
- package/dist/service/useConnectorRoutes.js.map +1 -0
- package/dist/service/useDataRoutes.d.ts.map +1 -1
- package/dist/service/useDataRoutes.js +83 -70
- package/dist/service/useDataRoutes.js.map +1 -1
- package/dist/service/usePageRoutes.d.ts.map +1 -1
- package/dist/service/usePageRoutes.js +243 -38
- package/dist/service/usePageRoutes.js.map +1 -1
- package/dist/settings.d.ts +33 -4
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +108 -15
- package/dist/settings.js.map +1 -1
- package/dist/synthos-cli.d.ts.map +1 -1
- package/dist/synthos-cli.js +11 -1
- package/dist/synthos-cli.js.map +1 -1
- package/dist/themes.d.ts +9 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +64 -0
- package/dist/themes.js.map +1 -0
- package/package.json +5 -3
- package/required-pages/builder.html +74 -0
- package/required-pages/builder.json +1 -0
- package/required-pages/pages.html +169 -126
- package/required-pages/pages.json +1 -0
- package/required-pages/settings.html +812 -156
- package/required-pages/settings.json +1 -0
- package/required-pages/synthos_apis.html +272 -0
- package/required-pages/synthos_apis.json +1 -0
- package/required-pages/synthos_scripts.html +87 -0
- package/required-pages/synthos_scripts.json +1 -0
- package/src/connectors/index.ts +12 -0
- package/src/connectors/registry.ts +98 -0
- package/src/connectors/types.ts +68 -0
- package/src/files.ts +11 -0
- package/src/init.ts +151 -5
- package/src/migrations.ts +266 -0
- package/src/models/index.ts +2 -0
- package/src/models/providers.ts +33 -0
- package/src/models/types.ts +23 -0
- package/src/pages.ts +234 -26
- package/src/scripts.ts +2 -2
- package/src/service/createCompletePrompt.ts +14 -18
- package/src/service/debugLog.ts +17 -0
- package/src/service/modelInstructions.ts +14 -0
- package/src/service/requiresSettings.ts +3 -3
- package/src/service/server.ts +19 -2
- package/src/service/transformPage.ts +709 -88
- package/src/service/useApiRoutes.ts +632 -16
- package/src/service/useConnectorRoutes.ts +427 -0
- package/src/service/useDataRoutes.ts +87 -71
- package/src/service/usePageRoutes.ts +237 -44
- package/src/settings.ts +143 -20
- package/src/synthos-cli.ts +11 -1
- package/src/themes.ts +71 -0
- package/default-pages/[application].html +0 -95
- package/default-pages/[markdown].html +0 -271
- package/default-pages/[sidebar].html +0 -114
- package/default-pages/[split-application].html +0 -118
- package/default-pages/solar_system.html +0 -432
- package/default-pages/space_invaders.html +0 -617
- package/required-pages/apis.html +0 -362
- package/required-pages/home.html +0 -126
- package/required-pages/scripts.html +0 -350
package/required-pages/apis.html
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>SynthOS - APIs</title>
|
|
7
|
-
<style>
|
|
8
|
-
/* Nebula Dusk Theme */
|
|
9
|
-
:root { --bg-primary:#1a1a2e; --bg-secondary:#16213e; --bg-tertiary:#0f0f23; --accent-primary:#667eea; --accent-secondary:#764ba2; --accent-tertiary:#f093fb; --accent-glow:rgba(138,43,226,0.3); --text-primary:#e0e0e0; --text-secondary:#b794f6; --border-color:rgba(138,43,226,0.3); }
|
|
10
|
-
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
11
|
-
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%); color: var(--text-primary); height: 100vh; display: flex; }
|
|
12
|
-
.chat-panel { width: 30%; background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%); box-shadow: 0 0 30px var(--accent-glow), inset 0 0 60px rgba(75, 0, 130, 0.1); padding: 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border-color); }
|
|
13
|
-
.chat-header { font-size: 24px; padding: 15px; background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%); color: white; text-align: center; border-radius: 15px; box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); letter-spacing: 2px; }
|
|
14
|
-
.chat-messages { flex-grow: 1; overflow-y: auto; padding: 15px; margin-top: 15px; background: rgba(15, 15, 35, 0.6); border-radius: 15px; border: 1px solid var(--border-color); box-shadow: inset 0 0 30px rgba(75, 0, 130, 0.2); }
|
|
15
|
-
.chat-message { margin-bottom: 15px; padding: 12px 15px; background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%); border-radius: 15px; box-shadow: 0 2px 10px var(--accent-glow); border: 1px solid rgba(138, 43, 226, 0.1); backdrop-filter: blur(5px); }
|
|
16
|
-
.chat-message p { margin-bottom: 5px; line-height: 1.5; }
|
|
17
|
-
.chat-message p strong { font-weight: 600; background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
|
|
18
|
-
.chat-message p code { background: rgba(138, 43, 226, 0.3); padding: 2px 6px; border-radius: 5px; font-family: 'Courier New', Courier, monospace; color: var(--accent-tertiary); border: 1px solid rgba(240, 147, 251, 0.3); }
|
|
19
|
-
.link-group { display: flex; justify-content: space-between; margin: 15px 0; padding: 10px; background: rgba(15, 15, 35, 0.4); border-radius: 10px; border: 1px solid var(--border-color); }
|
|
20
|
-
.link-group a { font-size: 14px; color: var(--text-secondary); text-decoration: none; padding: 8px 15px; border-radius: 8px; transition: all 0.3s ease; border: 1px solid transparent; }
|
|
21
|
-
.link-group a:hover { background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%); border-color: rgba(183, 148, 246, 0.5); box-shadow: 0 0 15px var(--accent-glow); color: var(--accent-tertiary); }
|
|
22
|
-
form { display: flex; flex-direction: row; width: 100%; gap: 10px; align-items: center; }
|
|
23
|
-
.chat-input { padding: 14px 18px; border: 1px solid var(--border-color); border-radius: 25px; flex-grow: 1; font-size: 14px; background: rgba(15, 15, 35, 0.8); color: var(--text-primary); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 20px rgba(138, 43, 226, 0.1); transition: all 0.3s ease; }
|
|
24
|
-
.chat-input:focus { outline: none; border-color: rgba(183, 148, 246, 0.6); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 25px var(--accent-glow); }
|
|
25
|
-
.chat-input::placeholder { color: rgba(183, 148, 246, 0.5); }
|
|
26
|
-
.chat-submit { padding: 14px 20px; border: none; border-radius: 25px; font-size: 14px; background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%); color: white; cursor: pointer; transition: all 0.3s ease; font-weight: 600; letter-spacing: 1px; box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4); white-space: nowrap; }
|
|
27
|
-
.chat-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6); }
|
|
28
|
-
.chat-submit:active { transform: translateY(0); }
|
|
29
|
-
.viewer-panel { width: 70%; padding: 25px; background: linear-gradient(135deg, rgba(22, 33, 62, 0.9) 0%, rgba(15, 15, 35, 0.95) 100%); display: flex; flex-direction: column; justify-content: flex-start; align-items: center; box-shadow: inset 0 0 60px rgba(75, 0, 130, 0.15); position: relative; overflow: hidden; }
|
|
30
|
-
.viewer-panel::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(ellipse at center, rgba(138, 43, 226, 0.05) 0%, transparent 70%); animation: nebula-pulse 8s ease-in-out infinite; pointer-events: none; }
|
|
31
|
-
@keyframes nebula-pulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }
|
|
32
|
-
.loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 15, 35, 0.9); justify-content: center; align-items: center; z-index: 1000; }
|
|
33
|
-
.spinner { width: 50px; height: 50px; border: 4px solid var(--border-color); border-top-color: var(--accent-tertiary); border-radius: 50%; animation: spin 1s linear infinite; }
|
|
34
|
-
@keyframes spin { to { transform: rotate(360deg); } }
|
|
35
|
-
|
|
36
|
-
/* Page Style */
|
|
37
|
-
.dialog-title { font-size: 22px; font-weight: 700; padding: 14px 30px; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: white; text-align: center; border-radius: 12px; width: 100%; max-width: 800px; box-shadow: 0 6px 25px var(--accent-glow); position: relative; z-index: 1; }
|
|
38
|
-
.dialog-content { font-size: 14px; color: rgba(224, 224, 224, 0.8); padding: 15px 0; flex-grow: 1; width: 100%; max-width: 800px; position: relative; z-index: 1; overflow-y: auto; }
|
|
39
|
-
.api-section { margin: 8px 0; border-radius: 10px; width: 100%; background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%); border: 1px solid var(--border-color); overflow: hidden; }
|
|
40
|
-
.api-header { font-size: 14px; cursor: pointer; background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%); padding: 12px 15px; text-align: left; transition: all 0.3s; color: var(--text-secondary); font-weight: 500; }
|
|
41
|
-
.api-header:hover { background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%); color: var(--accent-tertiary); }
|
|
42
|
-
.api-content { display: none; padding: 12px 15px; background: rgba(15, 15, 35, 0.5); border-top: 1px solid var(--border-color); font-size: 13px; line-height: 1.5; }
|
|
43
|
-
.api-input { margin-top: 10px; }
|
|
44
|
-
.api-input input, .api-input textarea, .api-input select { width: 100%; padding: 10px 12px; margin-bottom: 8px; border-radius: 8px; border: 1px solid var(--border-color); background: rgba(15, 15, 35, 0.8); color: var(--text-primary); font-size: 13px; transition: all 0.3s; }
|
|
45
|
-
.api-input input:focus, .api-input textarea:focus, .api-input select:focus { outline: none; border-color: var(--text-secondary); box-shadow: 0 0 15px var(--accent-glow); }
|
|
46
|
-
.api-input textarea { min-height: 80px; resize: vertical; }
|
|
47
|
-
.api-input select { cursor: pointer; }
|
|
48
|
-
.api-input select option { background: var(--bg-tertiary); color: var(--text-primary); }
|
|
49
|
-
.api-input button { padding: 10px 18px; border: none; border-radius: 20px; background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%); color: white; cursor: pointer; transition: all 0.3s; font-weight: 500; font-size: 13px; box-shadow: 0 3px 15px var(--accent-glow); }
|
|
50
|
-
.api-input button:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5); }
|
|
51
|
-
.api-input button:disabled { background: rgba(102, 126, 234, 0.3); cursor: not-allowed; transform: none; box-shadow: none; }
|
|
52
|
-
.api-output { margin-top: 10px; min-height: 100px; max-height: 200px; background: rgba(15, 15, 35, 0.8); color: var(--accent-tertiary); padding: 12px; border-radius: 8px; overflow-y: auto; white-space: pre-wrap; font-family: 'Courier New', Courier, monospace; font-size: 12px; border: 1px solid var(--border-color); }
|
|
53
|
-
.generated-image { max-width: 100%; height: auto; margin-top: 10px; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 4px 20px var(--accent-glow); }
|
|
54
|
-
|
|
55
|
-
/* Scrollbar Styles */
|
|
56
|
-
::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
57
|
-
::-webkit-scrollbar-track { background: rgba(15, 15, 35, 0.6); border-radius: 10px; border: 1px solid var(--border-color); }
|
|
58
|
-
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%); border-radius: 10px; border: 2px solid rgba(15, 15, 35, 0.6); box-shadow: 0 0 10px var(--accent-glow); }
|
|
59
|
-
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent-tertiary) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%); box-shadow: 0 0 15px rgba(240, 147, 251, 0.5); }
|
|
60
|
-
::-webkit-scrollbar-corner { background: rgba(15, 15, 35, 0.6); }
|
|
61
|
-
* { scrollbar-width: thin; scrollbar-color: var(--accent-secondary) rgba(15, 15, 35, 0.6); }
|
|
62
|
-
</style>
|
|
63
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.9.0/d3.min.js"></script>
|
|
64
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/14.1.1/marked.min.js"></script>
|
|
65
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.1.0/mermaid.min.js"></script>
|
|
66
|
-
</head>
|
|
67
|
-
<body>
|
|
68
|
-
<div class="chat-panel">
|
|
69
|
-
<div class="chat-header">SynthOS</div>
|
|
70
|
-
<div class="chat-messages" id="chatMessages">
|
|
71
|
-
<div class="chat-message"><p><strong>SynthOS:</strong> Expand the individual API operations to test calls.</p></div>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="link-group">
|
|
74
|
-
<a href="#" id="saveLink">Save</a>
|
|
75
|
-
<a href="/pages" id="pagesLink">Pages</a>
|
|
76
|
-
<a href="#" id="resetLink">Reset</a>
|
|
77
|
-
</div>
|
|
78
|
-
<form action="/" method="POST" id="chatForm">
|
|
79
|
-
<input type="text" class="chat-input" id="chatInput" name="message" placeholder="Type a message...">
|
|
80
|
-
<button type="submit" class="chat-submit">Send</button>
|
|
81
|
-
</form>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="viewer-panel" id="viewerPanel">
|
|
84
|
-
<div class="dialog-title">API Explorer</div>
|
|
85
|
-
<div class="dialog-content">
|
|
86
|
-
<div class="api-section">
|
|
87
|
-
<div class="api-header" onclick="toggleSection(this)">GET /api/data/:table</div>
|
|
88
|
-
<div class="api-content">
|
|
89
|
-
This operation retrieves all rows from the specified table. The response is an array of JSON objects, each representing a row in the table.
|
|
90
|
-
<div class="api-input">
|
|
91
|
-
<input type="text" placeholder="Table Name" />
|
|
92
|
-
<button onclick="callApi(event, 'GET', '/api/data/')">Submit</button>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="api-output"></div>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="api-section">
|
|
98
|
-
<div class="api-header" onclick="toggleSection(this)">GET /api/data/:table/:id</div>
|
|
99
|
-
<div class="api-content">
|
|
100
|
-
This operation retrieves a single row from the specified table using the provided ID. The response is a JSON object representing the row.
|
|
101
|
-
<div class="api-input">
|
|
102
|
-
<input type="text" placeholder="Table Name" />
|
|
103
|
-
<input type="text" placeholder="ID" />
|
|
104
|
-
<button onclick="callApi(event, 'GET', '/api/data/')">Submit</button>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="api-output"></div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
<div class="api-section">
|
|
110
|
-
<div class="api-header" onclick="toggleSection(this)">POST /api/data/:table/:id</div>
|
|
111
|
-
<div class="api-content">
|
|
112
|
-
This operation saves a single row to the specified table. The request should include a JSON object representing the row. The response indicates success.
|
|
113
|
-
<div class="api-input">
|
|
114
|
-
<input type="text" placeholder="Table Name" />
|
|
115
|
-
<input type="text" placeholder="ID" />
|
|
116
|
-
<textarea placeholder="JSON Data"></textarea>
|
|
117
|
-
<button onclick="callApi(event, 'POST', '/api/data/')">Submit</button>
|
|
118
|
-
</div>
|
|
119
|
-
<div class="api-output"></div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div class="api-section">
|
|
123
|
-
<div class="api-header" onclick="toggleSection(this)">DELETE /api/data/:table/:id</div>
|
|
124
|
-
<div class="api-content">
|
|
125
|
-
This operation deletes a single row from the specified table using the provided ID. The response indicates success.
|
|
126
|
-
<div class="api-input">
|
|
127
|
-
<input type="text" placeholder="Table Name" />
|
|
128
|
-
<input type="text" placeholder="ID" />
|
|
129
|
-
<button onclick="callApi(event, 'DELETE', '/api/data/')">Submit</button>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="api-output"></div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
<div class="api-section">
|
|
135
|
-
<div class="api-header" onclick="toggleSection(this)">GET /api/pages</div>
|
|
136
|
-
<div class="api-content">
|
|
137
|
-
This operation retrieves a list of all available pages. The response is an array of page names.
|
|
138
|
-
<div class="api-input">
|
|
139
|
-
<button onclick="callApi(event, 'GET', '/api/pages')">Submit</button>
|
|
140
|
-
</div>
|
|
141
|
-
<div class="api-output"></div>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
<div class="api-section">
|
|
145
|
-
<div class="api-header" onclick="toggleSection(this)">POST /api/generate/image</div>
|
|
146
|
-
<div class="api-content">
|
|
147
|
-
This operation generates an image based on a prompt. You can specify the shape and style of the image.
|
|
148
|
-
<div class="api-input">
|
|
149
|
-
<input type="text" placeholder="Prompt" id="imagePrompt" />
|
|
150
|
-
<select id="imageShape">
|
|
151
|
-
<option value="square">Square</option>
|
|
152
|
-
<option value="portrait">Portrait</option>
|
|
153
|
-
<option value="landscape">Landscape</option>
|
|
154
|
-
</select>
|
|
155
|
-
<select id="imageStyle">
|
|
156
|
-
<option value="vivid">Vivid</option>
|
|
157
|
-
<option value="natural">Natural</option>
|
|
158
|
-
</select>
|
|
159
|
-
<button onclick="generateImage(event)">Generate Image</button>
|
|
160
|
-
</div>
|
|
161
|
-
<div class="api-output"></div>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
<div class="api-section">
|
|
165
|
-
<div class="api-header" onclick="toggleSection(this)">POST /api/generate/completion</div>
|
|
166
|
-
<div class="api-content">
|
|
167
|
-
This operation generates a text completion based on a prompt. You can optionally specify the temperature for controlling randomness.
|
|
168
|
-
<div class="api-input">
|
|
169
|
-
<textarea placeholder="Prompt" id="completionPrompt"></textarea>
|
|
170
|
-
<input type="number" placeholder="Temperature (optional)" id="completionTemperature" step="0.1" min="0" max="1" />
|
|
171
|
-
<button onclick="generateCompletion(event)">Generate Completion</button>
|
|
172
|
-
</div>
|
|
173
|
-
<div class="api-output"></div>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
<div class="api-section">
|
|
177
|
-
<div class="api-header" onclick="toggleSection(this)">POST /api/scripts/:id</div>
|
|
178
|
-
<div class="api-content">
|
|
179
|
-
This operation executes a script with the specified ID and passes in the provided variables. The response contains the output of the script execution.
|
|
180
|
-
<div class="api-input">
|
|
181
|
-
<input type="text" placeholder="Script ID" id="scriptId" />
|
|
182
|
-
<textarea placeholder="Variables (JSON format)" id="scriptVariables"></textarea>
|
|
183
|
-
<button onclick="executeScript(event)">Execute Script</button>
|
|
184
|
-
</div>
|
|
185
|
-
<div class="api-output"></div>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div id="thoughts" style="display: none;">I've shown the user a list of available API's.</div>
|
|
191
|
-
<div id="loadingOverlay" class="loading-overlay"><div class="spinner"></div></div>
|
|
192
|
-
<script>
|
|
193
|
-
// Basic chat functionality
|
|
194
|
-
document.getElementById("chatInput").focus();
|
|
195
|
-
document.getElementById("chatForm").addEventListener('submit', () => {
|
|
196
|
-
document.getElementById("loadingOverlay").style.display = 'flex';
|
|
197
|
-
document.getElementById("chatForm").action = window.location.pathname;
|
|
198
|
-
});
|
|
199
|
-
document.getElementById("saveLink").addEventListener("click", function() {
|
|
200
|
-
const pageName = prompt("Enter the name of the page to save as:");
|
|
201
|
-
if (pageName) {
|
|
202
|
-
window.location.href = `${window.location.pathname}/save?name=${encodeURIComponent(pageName)}`;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
document.getElementById("resetLink").addEventListener("click", function() {
|
|
206
|
-
window.location.href = `${window.location.pathname}/reset`;
|
|
207
|
-
});
|
|
208
|
-
window.onload = function() {
|
|
209
|
-
const chatMessages = document.getElementById('chatMessages');
|
|
210
|
-
chatMessages.scrollTo({
|
|
211
|
-
top: chatMessages.scrollHeight,
|
|
212
|
-
behavior: 'smooth'
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// Toggle functionality for API sections
|
|
217
|
-
function toggleSection(header) {
|
|
218
|
-
const content = header.nextElementSibling;
|
|
219
|
-
content.style.display = content.style.display === 'block' ? 'none' : 'block';
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Function to call the server API
|
|
223
|
-
function callApi(event, method, endpoint) {
|
|
224
|
-
event.preventDefault();
|
|
225
|
-
const button = event.target;
|
|
226
|
-
button.disabled = true;
|
|
227
|
-
const inputs = event.target.parentElement.querySelectorAll('input, textarea');
|
|
228
|
-
let url = endpoint;
|
|
229
|
-
let data = {};
|
|
230
|
-
|
|
231
|
-
inputs.forEach(input => {
|
|
232
|
-
if (input.placeholder === 'Table Name') {
|
|
233
|
-
url += input.value;
|
|
234
|
-
} else if (input.placeholder === 'ID') {
|
|
235
|
-
url += '/' + input.value;
|
|
236
|
-
} else if (input.placeholder === 'JSON Data') {
|
|
237
|
-
data = JSON.parse(input.value);
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
fetch(url, {
|
|
242
|
-
method: method,
|
|
243
|
-
headers: {
|
|
244
|
-
'Content-Type': 'application/json'
|
|
245
|
-
},
|
|
246
|
-
body: method === 'POST' ? JSON.stringify(data) : null
|
|
247
|
-
})
|
|
248
|
-
.then(response => response.json())
|
|
249
|
-
.then(data => {
|
|
250
|
-
console.log('Success:', data);
|
|
251
|
-
const outputBox = event.target.parentElement.nextElementSibling;
|
|
252
|
-
outputBox.textContent = JSON.stringify(data, null, 2);
|
|
253
|
-
})
|
|
254
|
-
.catch((error) => {
|
|
255
|
-
console.error('Error:', error);
|
|
256
|
-
alert('API call failed! Check console for details.');
|
|
257
|
-
})
|
|
258
|
-
.finally(() => {
|
|
259
|
-
button.disabled = false;
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Function to generate image
|
|
264
|
-
function generateImage(event) {
|
|
265
|
-
event.preventDefault();
|
|
266
|
-
const button = event.target;
|
|
267
|
-
button.disabled = true;
|
|
268
|
-
const prompt = document.getElementById('imagePrompt').value;
|
|
269
|
-
const shape = document.getElementById('imageShape').value;
|
|
270
|
-
const style = document.getElementById('imageStyle').value;
|
|
271
|
-
const outputBox = event.target.parentElement.nextElementSibling;
|
|
272
|
-
|
|
273
|
-
fetch('/api/generate/image', {
|
|
274
|
-
method: 'POST',
|
|
275
|
-
headers: {
|
|
276
|
-
'Content-Type': 'application/json'
|
|
277
|
-
},
|
|
278
|
-
body: JSON.stringify({ prompt, shape, style })
|
|
279
|
-
})
|
|
280
|
-
.then(response => response.json())
|
|
281
|
-
.then(data => {
|
|
282
|
-
console.log('Success:', data);
|
|
283
|
-
outputBox.textContent = JSON.stringify(data, null, 2);
|
|
284
|
-
if (data.url) {
|
|
285
|
-
const img = document.createElement('img');
|
|
286
|
-
img.src = data.url;
|
|
287
|
-
img.alt = 'Generated Image';
|
|
288
|
-
img.className = 'generated-image';
|
|
289
|
-
outputBox.appendChild(img);
|
|
290
|
-
}
|
|
291
|
-
})
|
|
292
|
-
.catch((error) => {
|
|
293
|
-
console.error('Error:', error);
|
|
294
|
-
alert('Image generation failed! Check console for details.');
|
|
295
|
-
})
|
|
296
|
-
.finally(() => {
|
|
297
|
-
button.disabled = false;
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// Function to generate completion
|
|
302
|
-
function generateCompletion(event) {
|
|
303
|
-
event.preventDefault();
|
|
304
|
-
const button = event.target;
|
|
305
|
-
button.disabled = true;
|
|
306
|
-
const prompt = document.getElementById('completionPrompt').value;
|
|
307
|
-
const temperature = document.getElementById('completionTemperature').value;
|
|
308
|
-
const outputBox = event.target.parentElement.nextElementSibling;
|
|
309
|
-
|
|
310
|
-
fetch('/api/generate/completion', {
|
|
311
|
-
method: 'POST',
|
|
312
|
-
headers: {
|
|
313
|
-
'Content-Type': 'application/json'
|
|
314
|
-
},
|
|
315
|
-
body: JSON.stringify({ prompt, temperature: parseFloat(temperature) || undefined })
|
|
316
|
-
})
|
|
317
|
-
.then(response => response.json())
|
|
318
|
-
.then(data => {
|
|
319
|
-
console.log('Success:', data);
|
|
320
|
-
outputBox.textContent = JSON.stringify(data, null, 2);
|
|
321
|
-
})
|
|
322
|
-
.catch((error) => {
|
|
323
|
-
console.error('Error:', error);
|
|
324
|
-
alert('Completion generation failed! Check console for details.');
|
|
325
|
-
})
|
|
326
|
-
.finally(() => {
|
|
327
|
-
button.disabled = false;
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// Function to execute script
|
|
332
|
-
function executeScript(event) {
|
|
333
|
-
event.preventDefault();
|
|
334
|
-
const button = event.target;
|
|
335
|
-
button.disabled = true;
|
|
336
|
-
const scriptId = document.getElementById('scriptId').value;
|
|
337
|
-
const variables = JSON.parse(document.getElementById('scriptVariables').value);
|
|
338
|
-
const outputBox = event.target.parentElement.nextElementSibling;
|
|
339
|
-
|
|
340
|
-
fetch(`/api/scripts/${scriptId}`, {
|
|
341
|
-
method: 'POST',
|
|
342
|
-
headers: {
|
|
343
|
-
'Content-Type': 'application/json'
|
|
344
|
-
},
|
|
345
|
-
body: JSON.stringify(variables)
|
|
346
|
-
})
|
|
347
|
-
.then(response => response.json())
|
|
348
|
-
.then(data => {
|
|
349
|
-
console.log('Success:', data);
|
|
350
|
-
outputBox.textContent = JSON.stringify(data, null, 2);
|
|
351
|
-
})
|
|
352
|
-
.catch((error) => {
|
|
353
|
-
console.error('Error:', error);
|
|
354
|
-
alert('Script execution failed! Check console for details.');
|
|
355
|
-
})
|
|
356
|
-
.finally(() => {
|
|
357
|
-
button.disabled = false;
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
</script>
|
|
361
|
-
</body>
|
|
362
|
-
</html>
|
package/required-pages/home.html
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>SynthOS</title>
|
|
7
|
-
<style>
|
|
8
|
-
/* Nebula Dusk Theme */
|
|
9
|
-
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
10
|
-
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%); color: #e0e0e0; height: 100vh; display: flex; }
|
|
11
|
-
.chat-panel { width: 30%; background: linear-gradient(180deg, rgba(26,26,46,0.95) 0%, rgba(22,33,62,0.95) 100%); box-shadow: 0 0 30px rgba(138,43,226,0.2), inset 0 0 60px rgba(75,0,130,0.1); padding: 20px; display: flex; flex-direction: column; border-right: 1px solid rgba(138,43,226,0.3); }
|
|
12
|
-
.chat-header { font-size: 24px; padding: 15px; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); color: #fff; text-align: center; border-radius: 15px; box-shadow: 0 4px 20px rgba(102,126,234,0.4); text-shadow: 0 2px 10px rgba(0,0,0,0.3); letter-spacing: 2px; }
|
|
13
|
-
.chat-messages { flex-grow: 1; overflow-y: auto; padding: 15px; margin-top: 15px; background: rgba(15,15,35,0.6); border-radius: 15px; border: 1px solid rgba(138,43,226,0.2); box-shadow: inset 0 0 30px rgba(75,0,130,0.2); }
|
|
14
|
-
.chat-message { margin-bottom: 15px; padding: 12px 15px; background: linear-gradient(135deg, rgba(102,126,234,0.15) 0%, rgba(118,75,162,0.15) 100%); border-radius: 15px; box-shadow: 0 2px 10px rgba(138,43,226,0.2); border: 1px solid rgba(138,43,226,0.1); backdrop-filter: blur(5px); }
|
|
15
|
-
.chat-message p { margin-bottom: 5px; line-height: 1.5; }
|
|
16
|
-
.chat-message p strong { font-weight: 600; background: linear-gradient(90deg, #667eea, #f093fb); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
|
|
17
|
-
.chat-message p code { background: rgba(138,43,226,0.3); padding: 2px 6px; border-radius: 5px; font-family: 'Courier New', Courier, monospace; color: #f093fb; border: 1px solid rgba(240,147,251,0.3); }
|
|
18
|
-
.link-group { display: flex; justify-content: space-between; margin: 15px 0; padding: 10px; background: rgba(15,15,35,0.4); border-radius: 10px; border: 1px solid rgba(138,43,226,0.2); }
|
|
19
|
-
.link-group a { font-size: 14px; color: #b794f6; text-decoration: none; padding: 8px 15px; border-radius: 8px; transition: all 0.3s ease; border: 1px solid transparent; }
|
|
20
|
-
.link-group a:hover { background: linear-gradient(135deg, rgba(102,126,234,0.3) 0%, rgba(118,75,162,0.3) 100%); border-color: rgba(183,148,246,0.5); box-shadow: 0 0 15px rgba(138,43,226,0.3); color: #f093fb; }
|
|
21
|
-
form { display: flex; flex-direction: row; width: 100%; gap: 10px; align-items: center; }
|
|
22
|
-
.chat-input { padding: 14px 18px; border: 1px solid rgba(138,43,226,0.3); border-radius: 25px; flex-grow: 1; font-size: 14px; background: rgba(15,15,35,0.8); color: #e0e0e0; box-shadow: inset 0 2px 10px rgba(0,0,0,0.3), 0 0 20px rgba(138,43,226,0.1); transition: all 0.3s ease; }
|
|
23
|
-
.chat-input:focus { outline: none; border-color: rgba(183,148,246,0.6); box-shadow: inset 0 2px 10px rgba(0,0,0,0.3), 0 0 25px rgba(138,43,226,0.3); }
|
|
24
|
-
.chat-input::placeholder { color: rgba(183,148,246,0.5); }
|
|
25
|
-
.chat-submit { padding: 14px 20px; border: none; border-radius: 25px; font-size: 14px; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); color: #fff; cursor: pointer; transition: all 0.3s ease; font-weight: 600; letter-spacing: 1px; box-shadow: 0 4px 20px rgba(102,126,234,0.4); white-space: nowrap; }
|
|
26
|
-
.chat-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(102,126,234,0.6); }
|
|
27
|
-
.chat-submit:active { transform: translateY(0); }
|
|
28
|
-
.viewer-panel { width: 70%; padding: 25px; background: linear-gradient(135deg, rgba(22,33,62,0.9) 0%, rgba(15,15,35,0.95) 100%); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: inset 0 0 60px rgba(75,0,130,0.15); position: relative; overflow: hidden; }
|
|
29
|
-
.loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,15,35,0.9); justify-content: center; align-items: center; z-index: 1000; }
|
|
30
|
-
.spinner { width: 50px; height: 50px; border: 4px solid rgba(138,43,226,0.3); border-top-color: #f093fb; border-radius: 50%; animation: spin 1s linear infinite; }
|
|
31
|
-
@keyframes spin { to { transform: rotate(360deg); } }
|
|
32
|
-
|
|
33
|
-
/* Elegant minimal idle animation */
|
|
34
|
-
.idle-container { position: absolute; width: 100%; height: 100%; pointer-events: none; opacity: 1; transition: opacity 1s ease-out; }
|
|
35
|
-
.idle-container.hidden { opacity: 0; }
|
|
36
|
-
.breathing-orb { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(102,126,234,0.15) 0%, transparent 70%); animation: breathe 4s ease-in-out infinite; }
|
|
37
|
-
.breathing-orb::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 8px; height: 8px; border-radius: 50%; background: rgba(183,148,246,0.6); box-shadow: 0 0 20px rgba(183,148,246,0.4); animation: core-pulse 4s ease-in-out infinite; }
|
|
38
|
-
@keyframes breathe { 0%,100% { width: 80px; height: 80px; opacity: 0.3; } 50% { width: 120px; height: 120px; opacity: 0.6; } }
|
|
39
|
-
@keyframes core-pulse { 0%,100% { opacity: 0.4; box-shadow: 0 0 20px rgba(183,148,246,0.3); } 50% { opacity: 0.8; box-shadow: 0 0 30px rgba(183,148,246,0.5); } }
|
|
40
|
-
.orbit-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 200px; height: 200px; border: 1px solid rgba(102,126,234,0.1); border-radius: 50%; animation: orbit-rotate 20s linear infinite; }
|
|
41
|
-
.orbit-ring::after { content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; background: rgba(240,147,251,0.5); border-radius: 50%; box-shadow: 0 0 10px rgba(240,147,251,0.3); }
|
|
42
|
-
@keyframes orbit-rotate { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
|
|
43
|
-
|
|
44
|
-
/* Scrollbar Styles */
|
|
45
|
-
::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
46
|
-
::-webkit-scrollbar-track { background: rgba(15,15,35,0.6); border-radius: 10px; }
|
|
47
|
-
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%); border-radius: 10px; border: 2px solid rgba(15,15,35,0.6); box-shadow: 0 0 10px rgba(138,43,226,0.4); }
|
|
48
|
-
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f093fb 0%, #764ba2 50%, #667eea 100%); box-shadow: 0 0 15px rgba(240,147,251,0.5); }
|
|
49
|
-
::-webkit-scrollbar-corner { background: rgba(15,15,35,0.6); }
|
|
50
|
-
* { scrollbar-width: thin; scrollbar-color: #764ba2 rgba(15,15,35,0.6); }
|
|
51
|
-
</style>
|
|
52
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.9.0/d3.min.js"></script>
|
|
53
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/14.1.1/marked.min.js"></script>
|
|
54
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.1.0/mermaid.min.js"></script>
|
|
55
|
-
</head>
|
|
56
|
-
<body>
|
|
57
|
-
<div class="chat-panel">
|
|
58
|
-
<div class="chat-header">SynthOS</div>
|
|
59
|
-
<div class="chat-messages" id="chatMessages">
|
|
60
|
-
<div class="chat-message"><p><strong>SynthOS:</strong> What can I create for you?</p></div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="link-group">
|
|
63
|
-
<a href="#" id="saveLink">Save</a>
|
|
64
|
-
<a href="/pages" id="pagesLink">Pages</a>
|
|
65
|
-
<a href="#" id="resetLink">Reset</a>
|
|
66
|
-
</div>
|
|
67
|
-
<form action="/" method="POST" id="chatForm">
|
|
68
|
-
<input type="text" class="chat-input" id="chatInput" name="message" placeholder="Type a message...">
|
|
69
|
-
<button type="submit" class="chat-submit">Send</button>
|
|
70
|
-
</form>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="viewer-panel" id="viewerPanel">
|
|
73
|
-
<div class="idle-container" id="idleAnimation">
|
|
74
|
-
<div class="orbit-ring"></div>
|
|
75
|
-
<div class="breathing-orb"></div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
<div id="thoughts" style="display: none;">Simplified the idle animation dramatically. Removed all the busy elements (scanning lines, particles, data streams, corner brackets, multiple pulse rings, status text). Now it's just two elements: 1) A breathing orb in the center that gently expands and contracts with a soft glow, and 2) A single thin orbital ring that rotates very slowly (20 seconds per rotation) with a small accent dot. This creates an elegant, minimal presence that suggests the system is alive without being distracting. The animation is much more refined and Star Trek computer-appropriate - subtle ambient awareness rather than flashy effects.</div>
|
|
79
|
-
<div id="loadingOverlay" class="loading-overlay"><div class="spinner"></div></div>
|
|
80
|
-
<script>
|
|
81
|
-
document.getElementById("chatInput").focus();
|
|
82
|
-
document.getElementById("chatForm").addEventListener('submit', () => {
|
|
83
|
-
document.getElementById("loadingOverlay").style.display = 'flex';
|
|
84
|
-
document.getElementById("chatForm").action = window.location.pathname;
|
|
85
|
-
});
|
|
86
|
-
document.getElementById("saveLink").addEventListener("click", function() {
|
|
87
|
-
const pageName = prompt("Enter the name of the page to save as:");
|
|
88
|
-
if (pageName) {
|
|
89
|
-
window.location.href = `${window.location.pathname}/save?name=${encodeURIComponent(pageName)}`;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
document.getElementById("resetLink").addEventListener("click", function() {
|
|
93
|
-
window.location.href = `${window.location.pathname}/reset`;
|
|
94
|
-
});
|
|
95
|
-
window.onload = function() {
|
|
96
|
-
const chatMessages = document.getElementById('chatMessages');
|
|
97
|
-
chatMessages.scrollTo({
|
|
98
|
-
top: chatMessages.scrollHeight,
|
|
99
|
-
behavior: 'smooth'
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
// Function to hide the idle animation when content is rendered
|
|
104
|
-
function hideIdleAnimation() {
|
|
105
|
-
const idleContainer = document.getElementById('idleAnimation');
|
|
106
|
-
if (idleContainer) {
|
|
107
|
-
idleContainer.classList.add('hidden');
|
|
108
|
-
setTimeout(() => {
|
|
109
|
-
idleContainer.style.display = 'none';
|
|
110
|
-
}, 1000);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Function to show the idle animation
|
|
115
|
-
function showIdleAnimation() {
|
|
116
|
-
const idleContainer = document.getElementById('idleAnimation');
|
|
117
|
-
if (idleContainer) {
|
|
118
|
-
idleContainer.style.display = 'block';
|
|
119
|
-
setTimeout(() => {
|
|
120
|
-
idleContainer.classList.remove('hidden');
|
|
121
|
-
}, 10);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
</script>
|
|
125
|
-
</body>
|
|
126
|
-
</html>
|