ontowave 1.0.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/LICENSE +21 -0
- package/README.md +0 -0
- package/README.md.backup +260 -0
- package/dist/ontowave.js +3057 -0
- package/dist/ontowave.min.js +1278 -0
- package/package.json +98 -0
|
@@ -0,0 +1,1278 @@
|
|
|
1
|
+
(d=>{let o={fr:{menuHome:"Accueil",menuGallery:"Galerie",menuConfiguration:"Configuration",configTitle:"OntoWave - Configuration Complète",configGeneral:"Général",configSiteTitle:"Titre du site :",configDefaultPage:"Page par défaut :",configBaseUrl:"URL de base :",configLanguages:"Langues et Localisation",configSupportedLanguages:"Langues supportées (séparées par des virgules) :",configFallbackLanguage:"Langue de fallback :",configNavigation:"Navigation et Interface",configShowGallery:"Afficher la galerie d'exemples",configHomeButton:"Bouton Accueil",configBreadcrumb:"Fil d'Ariane (breadcrumb)",configToc:"Table des matières",configMermaid:"Diagrammes Mermaid",configMermaidTheme:"Thème Mermaid :",configMermaidAuto:"Démarrage automatique",configMermaidMaxWidth:"Utiliser la largeur maximale",configPlantuml:"Diagrammes PlantUML",configPlantumlServer:"Serveur PlantUML :",configPlantumlFormat:"Format de sortie :",configPrism:"Coloration Syntaxique (Prism.js)",configPrismTheme:"Thème Prism :",configPrismAutoload:"Chargement automatique",configUI:"Interface Utilisateur",configUITheme:"Thème de l'interface :",configUIResponsive:"Design responsive",configUIAnimations:"Animations et transitions",configApply:"Appliquer Configuration",configDownloadHTML:"Télécharger HTML",configDownloadJS:"Télécharger ontowave.min.js",configReset:"Réinitialiser",configLanguageNote:"Laissez vide pour un site monolingue"},en:{menuHome:"Home",menuGallery:"Gallery",menuConfiguration:"Configuration",configTitle:"OntoWave - Complete Configuration",configGeneral:"General",configSiteTitle:"Site title:",configDefaultPage:"Default page:",configBaseUrl:"Base URL:",configLanguages:"Languages and Localization",configSupportedLanguages:"Supported languages (comma separated):",configFallbackLanguage:"Fallback language:",configNavigation:"Navigation and Interface",configShowGallery:"Show examples gallery",configHomeButton:"Home button",configBreadcrumb:"Breadcrumb navigation",configToc:"Table of contents",configMermaid:"Mermaid Diagrams",configMermaidTheme:"Mermaid theme:",configMermaidAuto:"Auto start",configMermaidMaxWidth:"Use maximum width",configPlantuml:"PlantUML Diagrams",configPlantumlServer:"PlantUML server:",configPlantumlFormat:"Output format:",configPrism:"Syntax Highlighting (Prism.js)",configPrismTheme:"Prism theme:",configPrismAutoload:"Auto loading",configUI:"User Interface",configUITheme:"Interface theme:",configUIResponsive:"Responsive design",configUIAnimations:"Animations and transitions",configApply:"Apply Configuration",configDownloadHTML:"Download HTML",configDownloadJS:"Download ontowave.min.js",configReset:"Reset",configLanguageNote:"Leave empty for monolingual site"}},t={title:"OntoWave Documentation",baseUrl:"/",defaultPage:"index.md",containerId:"ontowave-container",locales:["fr","en"],fallbackLocale:"en",showGallery:!1,mermaid:{theme:"default",startOnLoad:!0,flowchart:{useMaxWidth:!0},sequence:{useMaxWidth:!0},gantt:{useMaxWidth:!0},journey:{useMaxWidth:!0}},plantuml:{server:"https://www.plantuml.com/plantuml",format:"svg"},prism:{theme:"default",autoload:!0},navigation:{showHome:!0,showBreadcrumb:!0,showToc:!0},ui:{theme:"default",responsive:!0,animations:!0,languageButtons:"menu"}};class n{constructor(e={}){this.config={...t,...e},e.i18n&&(e.i18n.supported&&(this.config.locales=e.i18n.supported),e.i18n.default)&&(this.config.fallbackLocale=e.i18n.default),this.container=null,this.mermaidLoaded=!1,this.prismLoaded=!1,this.currentPage=null,this.currentLanguage=null}getCurrentLanguage(){if(this.currentLanguage)return this.currentLanguage;var e=document.getElementById("lang-fr"),t=document.getElementById("lang-en");if(e&&t){if(e.classList.contains("visible")||!e.classList.contains("hidden")&&"none"!==e.style.display)return"fr";if(t.classList.contains("visible")||!t.classList.contains("hidden")&&"none"!==t.style.display)return"en"}e=document.getElementById("btn-fr"),t=document.getElementById("btn-en");if(e&&t){if(e.classList.contains("active"))return"fr";if(t.classList.contains("active"))return"en"}return this.resolveLocale()||"en"}t(e,t=null){t=t||this.getCurrentLanguage();return(o[t]||o.en)[e]||e}updateInterfaceTexts(e=null){let t=e||this.getCurrentLanguage();console.log("🌐 Interface texts updating for language:",t);e=document.querySelector('.ontowave-menu-option[onclick*="goHome"]'),e&&(e.innerHTML="🏠 "+this.t("menuHome",t)),e=document.querySelector('.ontowave-menu-option[onclick*="gallery.html"]'),e&&(e.innerHTML="🎨 "+this.t("menuGallery",t)),e=document.querySelector('.ontowave-menu-option[onclick*="toggleConfigurationPanel"]'),e&&(e.innerHTML="⚙️ "+this.t("menuConfiguration",t)),e=document.getElementById("ontowave-config-panel");if(e){let n=document.getElementById("config-title-full")?.value||this.config.title,i=document.getElementById("config-defaultPage-full")?.value||this.config.defaultPage,a=document.getElementById("config-baseUrl-full")?.value||this.config.baseUrl;e.remove();e=document.querySelector('.ontowave-menu-option[onclick*="toggleConfigurationPanel"]');e&&e.classList.remove("selected"),setTimeout(()=>{this.toggleConfigurationPanel(null,t),setTimeout(()=>{var e=document.getElementById("config-title-full"),t=document.getElementById("config-defaultPage-full"),o=document.getElementById("config-baseUrl-full");e&&(e.value=n),t&&(t.value=i),o&&(o.value=a)},100)},50)}console.log("🌐 Interface texts updated for language:",t)}switchLanguage(e){this.currentLanguage=e,this.updateLanguageButtonsState(e),this.updateInterfaceTexts(e);e=(this.config.sources||{})[e]||this.config.defaultPage;e&&this.loadPage(e)}updateLanguageButtonsState(e=null){let t=e||this.getCurrentLanguage();document.querySelectorAll(".ontowave-lang-btn").forEach(e=>{e.classList.remove("active"),e.textContent.includes(t.toUpperCase())&&e.classList.add("active")}),document.querySelectorAll(".ontowave-fixed-lang-btn").forEach(e=>{e.classList.remove("active"),e.textContent.includes(t.toUpperCase())&&e.classList.add("active")}),console.log("🌐 État des boutons de langue mis à jour pour:",t)}goHome(){var e=this.getCurrentLanguage(),e=(this.config.sources||{})[e]||this.config.defaultPage;this.loadPage(e)}getBrowserLocales(){var e=[];return navigator.languages&&e.push(...navigator.languages),navigator.language&&e.push(navigator.language),navigator.userLanguage&&e.push(navigator.userLanguage),[...new Set(e)]}resolveLocale(){var e=this.getBrowserLocales(),o=this.config.locales||[],t=this.config.defaultLocale||this.config.fallbackLocale;if(console.log("🌐 Browser locales:",e),console.log("🌐 Supported locales:",o),console.log("🌐 Default locale:",t),0===o.length)return null;var n,i,a,l=d.location.hash||d.location.pathname;console.log("🔍 Current URL:",l);for(n of o)if(new RegExp(`\\.${n}\\.(md|html)`).test(l))return console.log("🎯 Page language detected from URL:",n,"in",l),n;for(i of e)if(o.includes(i))return console.log("🎯 Exact browser match found:",i),i;for(a of e){var r;a.split("-")[0];for(r of e){let t=r.split("-")[0];var s=o.find(e=>e.startsWith(t));if(s)return console.log("🎯 Prefix match found:",r,"->",s),s}if(t&&o.includes(t))return console.log("🎯 Using configured default locale:",t),t}var c=o[0];return console.log("🎯 Using fallback locale:",c),c}isMultilingualMode(){return this.config.locales&&0<this.config.locales.length&&this.config.sources}generatePageCandidates(e){var t,o=this.resolveLocale(),n=[];return o?(t=e.replace(/\.md$/,""),n.push(t+`.${o}.md`),o.includes("-")&&(o=o.split("-")[0],n.push(t+`.${o}.md`)),n.push(e),console.log("📄 Page candidates for",e,":",n)):n.push(e),n}async init(){try{await this.loadConfigFromScript(),this.injectStyles(),await this.loadMermaid(),await this.loadPrism(),this.createInterface(),this.currentLanguage=this.resolveLocale(),this.initializeNavigation(),this.updateLanguageButtonsState(),await this.loadInitialPage(),console.log("✅ OntoWave successfully initialized")}catch(e){console.error("❌ OntoWave initialization failed:",e),this.showError("Erreur d'initialisation OntoWave: "+e.message)}}async loadConfigFromScript(){if(d.ontoWaveConfig)this.config={...this.config,...d.ontoWaveConfig},console.log("📄 Configuration loaded from window.ontoWaveConfig"),console.log("📄 Final config:",this.config);else{var e=document.getElementById("ontowave-config");if(e&&"application/json"===e.type)try{var t=JSON.parse(e.textContent);this.config={...this.config,...t},console.log("📄 Configuration loaded from script tag"),console.log("📄 Final config:",this.config)}catch(e){console.warn("⚠️ Invalid JSON in ontowave-config script tag:",e)}}}injectStyles(){var e=document.createElement("style");e.textContent=`
|
|
2
|
+
.ontowave-container {
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
4
|
+
line-height: 1.6;
|
|
5
|
+
color: #24292e;
|
|
6
|
+
background: #fff;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 20px;
|
|
9
|
+
min-height: 100vh;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Menu flottant minimal déplaçable */
|
|
13
|
+
.ontowave-floating-menu {
|
|
14
|
+
position: fixed;
|
|
15
|
+
top: 20px;
|
|
16
|
+
left: 20px;
|
|
17
|
+
z-index: 1000;
|
|
18
|
+
background: rgba(255, 255, 255, 0.95);
|
|
19
|
+
backdrop-filter: blur(10px);
|
|
20
|
+
border: 1px solid #e1e4e8;
|
|
21
|
+
border-radius: 44px;
|
|
22
|
+
padding: 10px;
|
|
23
|
+
box-shadow: 0 4px 12px rgba(27,31,35,0.15);
|
|
24
|
+
cursor: move;
|
|
25
|
+
transition: all 0.3s ease;
|
|
26
|
+
font-size: 1.2em;
|
|
27
|
+
user-select: none;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 0;
|
|
31
|
+
width: 44px;
|
|
32
|
+
height: 44px;
|
|
33
|
+
overflow: visible;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ontowave-floating-menu.no-drag {
|
|
38
|
+
cursor: default;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ontowave-floating-menu.expanded {
|
|
42
|
+
width: auto;
|
|
43
|
+
height: auto;
|
|
44
|
+
min-height: 44px;
|
|
45
|
+
border-radius: 22px;
|
|
46
|
+
padding: 10px 18px;
|
|
47
|
+
gap: 10px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ontowave-floating-menu:hover {
|
|
51
|
+
transform: scale(1.05);
|
|
52
|
+
box-shadow: 0 6px 20px rgba(27,31,35,0.25);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Désactiver le zoom quand le panneau de configuration est ouvert */
|
|
56
|
+
.ontowave-floating-menu.has-config-panel:hover {
|
|
57
|
+
transform: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ontowave-menu-icon {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: transform 0.3s ease;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
width: 30px;
|
|
65
|
+
height: 30px;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
font-size: 1.4em;
|
|
70
|
+
text-align: center;
|
|
71
|
+
line-height: 1;
|
|
72
|
+
margin: 0 auto;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ontowave-menu-icon:hover {
|
|
76
|
+
transform: scale(1.2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ontowave-menu-content {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 15px;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
width: 0;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
transition: all 0.3s ease;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ontowave-floating-menu.expanded .ontowave-menu-content {
|
|
91
|
+
opacity: 1;
|
|
92
|
+
width: auto;
|
|
93
|
+
overflow: visible;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ontowave-menu-brand {
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
color: #0969da;
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
font-size: 0.9em;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ontowave-menu-brand:hover {
|
|
105
|
+
color: #0550ae;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.org-suffix {
|
|
109
|
+
font-size: 0.7em;
|
|
110
|
+
opacity: 0.7;
|
|
111
|
+
font-weight: normal;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ontowave-menu-options {
|
|
115
|
+
display: flex;
|
|
116
|
+
gap: 8px;
|
|
117
|
+
flex-wrap: nowrap;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ontowave-menu-option {
|
|
121
|
+
padding: 6px 10px;
|
|
122
|
+
background: #f8f9fa;
|
|
123
|
+
border: 1px solid #d0d7de;
|
|
124
|
+
border-radius: 15px;
|
|
125
|
+
font-size: 0.75em;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
transition: all 0.2s ease;
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
pointer-events: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ontowave-menu-option:hover {
|
|
133
|
+
background: #e2e8f0;
|
|
134
|
+
transform: translateY(-1px);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ontowave-menu-option.selected {
|
|
138
|
+
background: #0969da;
|
|
139
|
+
color: white;
|
|
140
|
+
border-color: #0969da;
|
|
141
|
+
box-shadow: 0 2px 8px rgba(9, 105, 218, 0.3);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ontowave-menu-option.selected:hover {
|
|
145
|
+
background: #0550ae;
|
|
146
|
+
border-color: #0550ae;
|
|
147
|
+
transform: translateY(-1px);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Styles pour les boutons de langue */
|
|
151
|
+
.ontowave-lang-btn {
|
|
152
|
+
font-weight: bold;
|
|
153
|
+
font-size: 11px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.ontowave-lang-btn.active {
|
|
157
|
+
background: #28a745;
|
|
158
|
+
color: white;
|
|
159
|
+
border-color: #28a745;
|
|
160
|
+
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ontowave-lang-btn.active:hover {
|
|
164
|
+
background: #1e7e34;
|
|
165
|
+
border-color: #1e7e34;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Boutons de langue fixés - nouveaux styles */
|
|
169
|
+
.ontowave-fixed-lang-buttons {
|
|
170
|
+
position: fixed;
|
|
171
|
+
top: 20px;
|
|
172
|
+
right: 20px;
|
|
173
|
+
z-index: 999;
|
|
174
|
+
display: flex;
|
|
175
|
+
gap: 8px;
|
|
176
|
+
background: rgba(255, 255, 255, 0.95);
|
|
177
|
+
padding: 8px 12px;
|
|
178
|
+
border-radius: 25px;
|
|
179
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
180
|
+
backdrop-filter: blur(10px);
|
|
181
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Responsive : adaptation mobile */
|
|
185
|
+
@media (max-width: 768px) {
|
|
186
|
+
.ontowave-fixed-lang-buttons {
|
|
187
|
+
top: 10px;
|
|
188
|
+
right: 10px;
|
|
189
|
+
padding: 6px 8px;
|
|
190
|
+
gap: 4px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ontowave-fixed-lang-btn {
|
|
195
|
+
background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
|
|
196
|
+
color: white;
|
|
197
|
+
border: none;
|
|
198
|
+
padding: 6px 12px;
|
|
199
|
+
border-radius: 15px;
|
|
200
|
+
font-size: 12px;
|
|
201
|
+
font-weight: bold;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
transition: all 0.3s ease;
|
|
204
|
+
text-decoration: none;
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 4px;
|
|
208
|
+
min-width: 40px;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Responsive : boutons plus petits sur mobile */
|
|
213
|
+
@media (max-width: 768px) {
|
|
214
|
+
.ontowave-fixed-lang-btn {
|
|
215
|
+
padding: 4px 8px;
|
|
216
|
+
font-size: 11px;
|
|
217
|
+
min-width: 35px;
|
|
218
|
+
gap: 2px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.ontowave-fixed-lang-btn:hover {
|
|
223
|
+
background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
|
|
224
|
+
transform: translateY(-2px);
|
|
225
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.ontowave-fixed-lang-btn.active {
|
|
229
|
+
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
|
|
230
|
+
box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.ontowave-fixed-lang-btn.active:hover {
|
|
234
|
+
background: linear-gradient(135deg, #1e7e34 0%, #198754 100%);
|
|
235
|
+
transform: translateY(-2px);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Pas d'en-tête - supprimé */
|
|
239
|
+
.ontowave-header {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ontowave-nav {
|
|
244
|
+
background: #f8f9fa;
|
|
245
|
+
border: 1px solid #e1e4e8;
|
|
246
|
+
border-radius: 8px;
|
|
247
|
+
padding: 1.5rem;
|
|
248
|
+
margin-bottom: 2rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ontowave-nav h3 {
|
|
252
|
+
margin: 0 0 1rem 0;
|
|
253
|
+
color: #24292e;
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
gap: 0.5rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ontowave-nav-grid {
|
|
260
|
+
display: grid;
|
|
261
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
262
|
+
gap: 1rem;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ontowave-nav-item {
|
|
266
|
+
padding: 1rem;
|
|
267
|
+
background: white;
|
|
268
|
+
border: 1px solid #d0d7de;
|
|
269
|
+
border-radius: 6px;
|
|
270
|
+
text-decoration: none;
|
|
271
|
+
color: #24292e;
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
gap: 0.5rem;
|
|
275
|
+
transition: all 0.2s ease;
|
|
276
|
+
font-weight: 500;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ontowave-nav-item:hover {
|
|
281
|
+
background: #f3f4f6;
|
|
282
|
+
border-color: #0969da;
|
|
283
|
+
transform: translateY(-2px);
|
|
284
|
+
box-shadow: 0 4px 12px rgba(27,31,35,0.15);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ontowave-content {
|
|
288
|
+
background: white;
|
|
289
|
+
padding: 2rem;
|
|
290
|
+
border-radius: 8px;
|
|
291
|
+
box-shadow: 0 2px 8px rgba(27,31,35,0.15);
|
|
292
|
+
border: 1px solid #e1e4e8;
|
|
293
|
+
margin-bottom: 2rem;
|
|
294
|
+
min-height: 300px;
|
|
295
|
+
max-width: 1200px;
|
|
296
|
+
margin-left: auto;
|
|
297
|
+
margin-right: auto;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Headers corrigés */
|
|
301
|
+
.ontowave-content h1 {
|
|
302
|
+
color: #24292e;
|
|
303
|
+
border-bottom: 2px solid #e1e4e8;
|
|
304
|
+
padding-bottom: 8px;
|
|
305
|
+
margin-bottom: 16px;
|
|
306
|
+
font-size: 2em;
|
|
307
|
+
font-weight: 600;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ontowave-content h2 {
|
|
311
|
+
color: #24292e;
|
|
312
|
+
margin-top: 24px;
|
|
313
|
+
margin-bottom: 16px;
|
|
314
|
+
font-size: 1.5em;
|
|
315
|
+
font-weight: 600;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ontowave-content h3 {
|
|
319
|
+
color: #24292e;
|
|
320
|
+
margin-top: 20px;
|
|
321
|
+
margin-bottom: 12px;
|
|
322
|
+
font-size: 1.25em;
|
|
323
|
+
font-weight: 600;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ontowave-content h4 {
|
|
327
|
+
color: #24292e;
|
|
328
|
+
margin-top: 16px;
|
|
329
|
+
margin-bottom: 10px;
|
|
330
|
+
font-size: 1.1em;
|
|
331
|
+
font-weight: 600;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ontowave-content h5 {
|
|
335
|
+
color: #24292e;
|
|
336
|
+
margin-top: 14px;
|
|
337
|
+
margin-bottom: 8px;
|
|
338
|
+
font-size: 1em;
|
|
339
|
+
font-weight: 600;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.ontowave-content h6 {
|
|
343
|
+
color: #24292e;
|
|
344
|
+
margin-top: 12px;
|
|
345
|
+
margin-bottom: 6px;
|
|
346
|
+
font-size: 0.9em;
|
|
347
|
+
font-weight: 600;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* Séparateurs hr */
|
|
351
|
+
.ontowave-content hr {
|
|
352
|
+
border: none;
|
|
353
|
+
border-top: 1px solid #e1e4e8;
|
|
354
|
+
margin: 24px 0;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* Mermaid diagrams */
|
|
358
|
+
.ontowave-mermaid {
|
|
359
|
+
margin: 20px 0;
|
|
360
|
+
padding: 20px;
|
|
361
|
+
background: #f8f9fa;
|
|
362
|
+
border: 1px solid #e1e4e8;
|
|
363
|
+
border-radius: 8px;
|
|
364
|
+
text-align: center;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.ontowave-loading {
|
|
368
|
+
text-align: center;
|
|
369
|
+
color: #666;
|
|
370
|
+
padding: 2rem;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.ontowave-error {
|
|
374
|
+
color: #d73a49;
|
|
375
|
+
text-align: center;
|
|
376
|
+
padding: 2rem;
|
|
377
|
+
background: #ffeef0;
|
|
378
|
+
border: 1px solid #fdaeb7;
|
|
379
|
+
border-radius: 6px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ontowave-mermaid {
|
|
383
|
+
background: #f6f8fa;
|
|
384
|
+
border: 1px solid #d0d7de;
|
|
385
|
+
border-radius: 6px;
|
|
386
|
+
padding: 1rem;
|
|
387
|
+
margin: 1rem 0;
|
|
388
|
+
text-align: center;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.ontowave-plantuml {
|
|
392
|
+
background: #f6f8fa;
|
|
393
|
+
border: 1px solid #d0d7de;
|
|
394
|
+
border-radius: 6px;
|
|
395
|
+
padding: 1rem;
|
|
396
|
+
margin: 1rem 0;
|
|
397
|
+
text-align: center;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.ontowave-plantuml img {
|
|
401
|
+
max-width: 100%;
|
|
402
|
+
height: auto;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.ontowave-code {
|
|
406
|
+
background: #f6f8fa;
|
|
407
|
+
border: 1px solid #d0d7de;
|
|
408
|
+
border-radius: 6px;
|
|
409
|
+
padding: 1rem;
|
|
410
|
+
margin: 1rem 0;
|
|
411
|
+
overflow-x: auto;
|
|
412
|
+
font-family: ui-monospace, SFMono-Regular, monospace;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.ontowave-breadcrumb {
|
|
416
|
+
padding: 0.5rem 0;
|
|
417
|
+
margin-bottom: 1rem;
|
|
418
|
+
border-bottom: 1px solid #e1e4e8;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.ontowave-breadcrumb a {
|
|
422
|
+
color: #0969da;
|
|
423
|
+
text-decoration: none;
|
|
424
|
+
margin-right: 0.5rem;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.ontowave-breadcrumb a:hover {
|
|
428
|
+
text-decoration: underline;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.ontowave-breadcrumb span {
|
|
432
|
+
color: #656d76;
|
|
433
|
+
margin-right: 0.5rem;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.ontowave-status {
|
|
437
|
+
background: #d4edda;
|
|
438
|
+
border: 1px solid #c3e6cb;
|
|
439
|
+
border-radius: 8px;
|
|
440
|
+
padding: 1rem;
|
|
441
|
+
margin-top: 2rem;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.ontowave-status h4 {
|
|
445
|
+
margin: 0 0 0.5rem 0;
|
|
446
|
+
color: #155724;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.ontowave-status ul {
|
|
450
|
+
margin: 0;
|
|
451
|
+
padding-left: 1.5rem;
|
|
452
|
+
color: #155724;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@media (max-width: 768px) {
|
|
456
|
+
.ontowave-header {
|
|
457
|
+
padding: 1rem;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ontowave-header h1 {
|
|
461
|
+
font-size: 2em;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ontowave-nav-grid {
|
|
465
|
+
grid-template-columns: 1fr;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.ontowave-content {
|
|
469
|
+
padding: 1rem;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
`,document.head.appendChild(e)}async loadMermaid(){return new Promise(e=>{var t;d.mermaid?(this.mermaidLoaded=!0,this.initializeMermaid(),e()):((t=document.createElement("script")).src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js",t.onload=()=>{this.mermaidLoaded=!0,this.initializeMermaid(),e()},t.onerror=()=>{console.warn("⚠️ Failed to load Mermaid library"),e()},document.head.appendChild(t))})}initializeMermaid(){d.mermaid&&(d.mermaid.initialize(this.config.mermaid),console.log("🎨 Mermaid initialized"))}async loadPrism(){return new Promise(n=>{if(d.Prism)return this.prismLoaded=!0,console.log("🎨 Prism already loaded"),n();var e=document.createElement("link"),e=(e.rel="stylesheet",e.href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism.min.css",document.head.appendChild(e),document.createElement("script"));e.src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js",e.onload=()=>{console.log("🎨 Prism core loaded");let e=["markup","css","javascript"],t=0,o=()=>{t++,console.log(`🔤 Essential language loaded: ${t}/`+e.length),t>=e.length&&(d.Prism.languages.markup&&(d.Prism.languages.html=d.Prism.languages.markup,console.log("🔤 HTML alias created from markup")),this.prismLoaded=!0,console.log("✅ Prism ready with essential languages"),n(),["python","java","bash","json","yaml","typescript"].forEach(e=>{var t=document.createElement("script");t.src=`https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-${e}.min.js`,t.onload=()=>{console.log("🔤 Additional Prism language loaded: "+e)},t.onerror=()=>{console.warn("⚠️ Failed to load Prism language: "+e)},document.head.appendChild(t)}))};e.forEach(e=>{var t=document.createElement("script");t.src=`https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-${e}.min.js`,t.onload=o,t.onerror=()=>{console.warn("⚠️ Failed to load essential Prism language: "+e),o()},document.head.appendChild(t)})},e.onerror=()=>{console.warn("⚠️ Failed to load Prism library"),n()},document.head.appendChild(e)})}createInterface(t=null){this.container=document.getElementById(this.config.containerId),this.container||(this.container=document.createElement("div"),this.container.id=this.config.containerId,document.body.appendChild(this.container)),this.container.className="ontowave-container";var e=this.config.showGallery?`<span class="ontowave-menu-option" onclick="window.location.href='gallery.html'">🎨 ${this.t("menuGallery",t)}</span>`:"",o=this.config.ui?.languageButtons||"menu",o=this.config.locales&&1<this.config.locales.length&&("menu"===o||"both"===o)?this.config.locales.map(e=>`<span class="ontowave-menu-option ontowave-lang-btn${(t||this.getCurrentLanguage())===e?" active":""}" onclick="event.stopPropagation(); window.OntoWave.instance.switchLanguage('${e}');">🌐 ${e.toUpperCase()}</span>`).join(""):"";this.container.innerHTML=`
|
|
473
|
+
<div class="ontowave-floating-menu" id="ontowave-floating-menu" title="OntoWave Menu">
|
|
474
|
+
<span class="ontowave-menu-icon" id="ontowave-menu-icon">🌊</span>
|
|
475
|
+
<div class="ontowave-menu-content" id="ontowave-menu-content">
|
|
476
|
+
<a href="https://ontowave.org/" target="_blank" class="ontowave-menu-brand">OntoWave<span class="org-suffix">.org</span></a>
|
|
477
|
+
<div class="ontowave-menu-options">
|
|
478
|
+
<span class="ontowave-menu-option" onclick="window.OntoWave.instance.goHome()">🏠 ${this.t("menuHome",t)}</span>
|
|
479
|
+
${e}
|
|
480
|
+
${o}
|
|
481
|
+
<span class="ontowave-menu-option" onclick="event.stopPropagation(); window.OntoWave.instance.toggleConfigurationPanel(event, '${t||this.getCurrentLanguage()}');">⚙️ ${this.t("menuConfiguration",t)}</span>
|
|
482
|
+
</div>
|
|
483
|
+
</div>
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
<div class="ontowave-content" id="ontowave-content">
|
|
487
|
+
<div class="ontowave-loading">⏳ Chargement du contenu...</div>
|
|
488
|
+
</div>
|
|
489
|
+
|
|
490
|
+
<div class="ontowave-status" style="display: none;">
|
|
491
|
+
<h4>✅ OntoWave Package Actif</h4>
|
|
492
|
+
<ul>
|
|
493
|
+
<li><strong>Chargement rapide:</strong> Système intégré</li>
|
|
494
|
+
<li><strong>Mermaid:</strong> ${this.mermaidLoaded?"Chargé":"Non disponible"}</li>
|
|
495
|
+
<li><strong>Prism:</strong> ${this.prismLoaded?"Chargé":"Non disponible"}</li>
|
|
496
|
+
<li><strong>PlantUML:</strong> Support intégré</li>
|
|
497
|
+
<li><strong>Navigation:</strong> Hash préservé</li>
|
|
498
|
+
</ul>
|
|
499
|
+
</div>
|
|
500
|
+
`,this.createFixedLanguageButtons(t)}createFixedLanguageButtons(e=null){var t=document.getElementById("ontowave-fixed-lang-buttons"),t=(t&&t.remove(),this.config.ui?.languageButtons||"menu");if(this.config.locales&&1<this.config.locales.length&&("fixed"===t||"both"===t)){let n=e||this.getCurrentLanguage();var e=document.createElement("div"),o=(e.id="ontowave-fixed-lang-buttons",e.className="ontowave-fixed-lang-buttons",this.config.locales.map(e=>{var t=n===e?" active":"",o=this.getLanguageFlag(e);return`<button class="ontowave-fixed-lang-btn${t}" onclick="window.OntoWave.instance.switchLanguage('${e}')" title="Changer en ${e.toUpperCase()}">${o} ${e.toUpperCase()}</button>`}).join(""));e.innerHTML=o,document.body.appendChild(e),console.log("🌐 Boutons de langue fixés créés:",this.config.locales,"Mode:",t)}}getLanguageFlag(e){return{fr:"🇫🇷",en:"🇬🇧",es:"🇪🇸",de:"🇩🇪",it:"🇮🇹",pt:"🇵🇹",zh:"🇨🇳",ja:"🇯🇵",ko:"🇰🇷",ru:"🇷🇺"}[e]||"🌐"}initializeNavigation(){d.addEventListener("hashchange",()=>{var e=location.hash.replace("#","")||this.config.defaultPage;this.loadPage(e)}),this.createDefaultNavigation(),this.initializeFloatingMenu()}initializeFloatingMenu(){let l=document.getElementById("ontowave-floating-menu");var e=document.getElementById("ontowave-menu-icon");if(l&&e){let o=!1,i=!1,a={x:0,y:0};function t(){!o&&!document.querySelector(".ontowave-config-panel")?l.classList.remove("no-drag"):(l.classList.add("no-drag"),i=!1,document.body.style.userSelect="",document.body.style.cursor="")}function n(){i=!1,l.style.cursor="move",document.body.style.userSelect="",document.body.style.cursor=""}d.ontowaveUpdateDragState=t,e.addEventListener("click",e=>{e.stopPropagation(),(o=!o)?l.classList.add("expanded"):l.classList.remove("expanded"),t()}),document.addEventListener("click",e=>{!l.contains(e.target)&&o&&(o=!1,l.classList.remove("expanded"),t())}),l.addEventListener("mousedown",e=>{var t;o||document.querySelector(".ontowave-config-panel")||e.target.closest("a, .ontowave-menu-option")||(i=!0,t=l.getBoundingClientRect(),a.x=e.clientX-t.left,a.y=e.clientY-t.top,l.style.cursor="grabbing",document.body.style.userSelect="none",e.preventDefault(),e.stopPropagation())}),document.addEventListener("mousemove",e=>{var t,o,n;i&&(t=e.clientX-a.x,e=e.clientY-a.y,o=d.innerWidth-l.offsetWidth,n=d.innerHeight-l.offsetHeight,l.style.left=Math.max(0,Math.min(o,t))+"px",l.style.top=Math.max(0,Math.min(n,e))+"px")}),document.addEventListener("mouseup",()=>{i&&(i=!1,l.style.cursor="move",document.body.style.userSelect="")}),document.addEventListener("visibilitychange",n),d.addEventListener("blur",n),d.addEventListener("focus",n),d.resetOntoWaveDragState=n,l.addEventListener("touchstart",e=>{var t;e.target.closest("a, .ontowave-menu-option")||(e=e.touches[0],t=l.getBoundingClientRect(),a.x=e.clientX-t.left,a.y=e.clientY-t.top,i=!0)}),document.addEventListener("touchmove",e=>{var t,o,n;i&&(e.preventDefault(),t=(e=e.touches[0]).clientX-a.x,e=e.clientY-a.y,o=d.innerWidth-l.offsetWidth,n=d.innerHeight-l.offsetHeight,l.style.left=Math.max(0,Math.min(o,t))+"px",l.style.top=Math.max(0,Math.min(n,e))+"px")}),document.addEventListener("touchend",()=>{i=!1}),t(),this.enhanceMenuOptionClicks()}}enhanceMenuOptionClicks(){var e=document.querySelector('.ontowave-menu-option[onclick*="toggleConfigurationPanel"]');e&&e.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),console.log("Configuration button clicked via event listener"),this.toggleConfigurationPanel(e)},{capture:!0})}createDefaultNavigation(){var e=document.getElementById("ontowave-nav-grid");e&&(e.innerHTML=[{href:"index.md",icon:"🏠",label:"Accueil"},{href:"en/index.md",icon:"🇬🇧",label:"English"},{href:"fr/index.md",icon:"🇫🇷",label:"Français"},{href:"demo/mermaid.md",icon:"🧜♀️",label:"Démo Mermaid"},{href:"demo/plantuml.md",icon:"🏭",label:"PlantUML"},{href:"demo/advanced-shapes.md",icon:"🎯",label:"Formes Avancées"}].map(e=>`
|
|
501
|
+
<a href="#${e.href}" class="ontowave-nav-item" onclick="window.OntoWave.loadPage('${e.href}')">
|
|
502
|
+
${e.icon} ${e.label}
|
|
503
|
+
</a>
|
|
504
|
+
`).join(""))}async loadInitialPage(){var e=location.hash.replace("#","");if(this.isMultilingualMode()&&!e){var t=this.config.sources[this.config.defaultLocale];if(console.log("🌐 Multilingual mode detected"),console.log("🌐 Default locale:",this.config.defaultLocale),console.log("🌐 Default source:",t),console.log("🌐 Sources config:",this.config.sources),t)return console.log("🌐 Multilingual mode: redirecting to",t),void(location.hash="#"+t)}var o,t=e||this.config.defaultPage;if("index.md"===t){let e=!1;for(o of this.generatePageCandidates(t))try{if((await fetch(this.config.baseUrl+o,{method:"HEAD"})).ok){await this.loadPage(o),e=!0;break}}catch(e){continue}e||(console.log("📄 No index file found, showing configuration"),this.showConfigurationInterface())}else await this.loadPage(t)}async loadPage(t){var e=document.getElementById("ontowave-content");if(e){console.log("📄 Loading page:",t),this.currentPage=t,d.resetOntoWaveDragState&&d.resetOntoWaveDragState(),location.hash!=="#"+t&&(location.hash="#"+t),this.updateBreadcrumb(t),e.innerHTML='<div class="ontowave-loading">⏳ Chargement de '+t+"...</div>";try{var o=await fetch(this.config.baseUrl+t);if(!o.ok)throw new Error(`HTTP ${o.status}: `+o.statusText);var n=await o.text(),i=(console.log("✅ Content loaded:",n.length,"characters"),await this.renderMarkdown(n));e.innerHTML=i,await this.processDiagrams(e),await this.processPrism(e)}catch(e){console.error("❌ Failed to load page:",e),this.showError(`Impossible de charger ${t}: `+e.message)}}}updateBreadcrumb(e){var t=document.getElementById("ontowave-breadcrumb");if(t&&this.config.navigation.showBreadcrumb){let o=e.split("/"),n=['<a href="#'+this.config.defaultPage+'">🏠 Accueil</a>'],i="";o.forEach((e,t)=>{t===o.length-1?n.push("<span>"+e.replace(".md","")+"</span>"):(i+=(i?"/":"")+e,n.push('<a href="#'+i+'/index.md">'+e+"</a>"))}),t.innerHTML=n.join(" <span>›</span> "),t.style.display="block"}}async renderMarkdown(e){let o=e,l=[];return o=(o=o.replace(/```(\w+)([\s\S]*?)```/g,(e,t,o)=>{var n,i,o=o.trim(),a=`__CODE_BLOCK_${l.length}__`;return"mermaid"===t?(n="mermaid-"+Math.random().toString(36).substr(2,9),l.push(`<div class="ontowave-mermaid">
|
|
505
|
+
<div style="margin-bottom: 8px; font-weight: bold; color: #586069;">🧜♀️ Diagramme Mermaid</div>
|
|
506
|
+
<div class="mermaid" id="${n}">${o}</div>
|
|
507
|
+
</div>`)):"plantuml"===t?(n="plantuml-"+Math.random().toString(36).substr(2,9),i=(e=>{var t=(new TextEncoder).encode(e);let o="";for(let e=0;e<t.length;e++)o+=t[e].toString(16).padStart(2,"0");return"h"+o})(o),i=`${this.config.plantuml.server}/${this.config.plantuml.format}/~`+i,l.push(`<div class="ontowave-plantuml" id="${n}">
|
|
508
|
+
<div style="margin-bottom: 8px; font-weight: bold; color: #586069;">🏭 Diagramme PlantUML</div>
|
|
509
|
+
<img src="${i}" alt="Diagramme PlantUML" style="max-width: 100%; height: auto;"
|
|
510
|
+
onerror="this.parentElement.innerHTML='<div style=\\'color: #d73a49; padding: 20px;\\'>❌ Erreur de rendu PlantUML</div>'" />
|
|
511
|
+
</div>`)):(n=this.prismLoaded?"language-"+t:"",console.log(`📝 Processing code block: language="${t}", prismLoaded=${this.prismLoaded}, class="${n}"`),i=o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),l.push(`<pre class="ontowave-code"><code class="${n}">${i}</code></pre>`)),a})).replace(/^###### (.+)$/gm,"<h6>$1</h6>").replace(/^##### (.+)$/gm,"<h5>$1</h5>").replace(/^#### (.+)$/gm,"<h4>$1</h4>").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/^# (.+)$/gm,"<h1>$1</h1>").replace(/^---+$/gm,"<hr>").replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1">').replace(/\[([^\]]+)\]\(([^)]+\.html[^)]*)\)/g,'<a href="$2">$1</a>').replace(/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g,'<a href="$2" target="_blank">$1</a>').replace(/\[([^\]]+)\]\(([^)]+\.(tar\.gz|zip|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|csv|json|xml|js|css|png|jpg|jpeg|gif|svg|webp)[^)]*)\)/g,'<a href="$2" download>$1</a>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="#$2" onclick="window.OntoWave.loadPage(\'$2\')">$1</a>').replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,"<code>$1</code>").split("\n\n").map(e=>e.trim()).filter(e=>0<e.length).map(e=>e.match(/^<(h[1-6]|hr|div|pre)/)?e:`<p>${e.replace(/\n/g,"<br>")}</p>`).join("\n"),l.forEach((e,t)=>{o=o.replace(`__CODE_BLOCK_${t}__`,e)}),o}async processDiagrams(t){if(this.mermaidLoaded&&d.mermaid){let o=t.querySelectorAll(".mermaid");if(0!==o.length){console.log("🎨 Processing",o.length,"Mermaid diagrams");try{o.forEach(e=>{e.removeAttribute("data-processed")}),await d.mermaid.run(),console.log("✅ Mermaid diagrams rendered successfully"),setTimeout(()=>{var e=t.querySelectorAll(".mermaid svg");console.log("🎨 SVG elements found:",e.length),0===e.length&&0<o.length&&(console.log("⚠️ Retrying Mermaid rendering..."),o.forEach(e=>{e.removeAttribute("data-processed")}),d.mermaid.init(void 0,o))},1e3)}catch(t){console.error("❌ Mermaid rendering error:",t),o.forEach(e=>{e.querySelector("svg")||(e.innerHTML=`<div style="color: #d73a49; padding: 10px;">❌ Erreur de rendu Mermaid: ${t.message}</div><pre style="background: #f8f8f8; padding: 10px; margin-top: 10px; border-radius: 4px;"><code>${e.textContent}</code></pre>`)})}}}}async processPrism(e){if(console.log("🔍 processPrism called - prismLoaded:",this.prismLoaded,"window.Prism:",!!d.Prism),d.Prism)try{console.log("🔤 Available Prism languages:",d.Prism.languages?Object.keys(d.Prism.languages):"none");var t=e.querySelectorAll('code[class*="language-"]'),o=(console.log("🎨 Found",t.length,"code blocks with language classes"),t.forEach((e,t)=>{console.log(`🔍 Code block ${t}:`),console.log(` - class: "${e.className}"`),console.log(" - content length: "+e.textContent?.length),console.log(` - content preview: "${e.textContent?.substring(0,50)}..."`),console.log(" - parent visible: "+("none"!==d.getComputedStyle(e.parentElement).display)),console.log(" - element visible: "+("none"!==d.getComputedStyle(e).display))}),e.querySelectorAll("code"));if(console.log("📝 Total code blocks found:",o.length),0<t.length){var n=t[0];console.log("🧪 Testing manual highlighting on first element...");var i=n.className.split(" ").find(e=>e.startsWith("language-")),a=i?i.replace("language-",""):"unknown";if(console.log(`🔤 Language detected: "${a}"`),console.log("🔤 Language available in Prism: "+!(!d.Prism.languages||!d.Prism.languages[a])),d.Prism.languages&&d.Prism.languages[a]){console.log("🧪 Attempting manual highlight...");var l=n.textContent;try{var r=d.Prism.highlight(l,d.Prism.languages[a],a);console.log("🎨 Manual highlight result length: "+r.length),console.log(`🎨 Manual highlight preview: "${r.substring(0,100)}..."`),n.innerHTML=r,console.log("✅ Manual highlight applied")}catch(e){console.error("❌ Manual highlight failed:",e)}}d.Prism.highlightAllUnder(e),console.log("✅ Prism syntax highlighting applied to",t.length,"blocks");var s=e.querySelectorAll(".token");console.log("🎨 Tokens created after highlighting:",s.length),0<s.length&&s.forEach((e,t)=>{console.log(`Token ${t}: "${e.textContent}" (class: ${e.className})`)})}else console.log("⚠️ No code blocks with language classes found for Prism")}catch(e){console.error("❌ Prism highlighting error:",e)}else console.log("🎨 Prism not available, skipping syntax highlighting")}showConfigurationInterface(){var e,t=document.getElementById("ontowave-content");t&&(e=JSON.stringify(this.config,null,2).replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),t.innerHTML=`
|
|
512
|
+
<div class="ontowave-config-interface">
|
|
513
|
+
<div class="config-header">
|
|
514
|
+
<h1>🌊 OntoWave Configuration</h1>
|
|
515
|
+
<p>Aucun fichier index trouvé. Configurez OntoWave pour votre projet :</p>
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
<div class="config-content">
|
|
519
|
+
<div class="config-form">
|
|
520
|
+
<h2>📝 Configuration</h2>
|
|
521
|
+
|
|
522
|
+
<div class="form-group">
|
|
523
|
+
<label for="config-title">Titre du site :</label>
|
|
524
|
+
<input type="text" id="config-title" />
|
|
525
|
+
</div>
|
|
526
|
+
|
|
527
|
+
<div class="form-group">
|
|
528
|
+
<label for="config-defaultPage">Page par défaut :</label>
|
|
529
|
+
<input type="text" id="config-defaultPage" />
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
<div class="form-group">
|
|
533
|
+
<label for="config-locales">Langues supportées (séparées par des virgules) :</label>
|
|
534
|
+
<input type="text" id="config-locales" placeholder="fr-CA, fr, en" />
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
<div class="form-group">
|
|
538
|
+
<label>
|
|
539
|
+
<input type="checkbox" id="config-showGallery" />
|
|
540
|
+
Afficher la galerie d'exemples
|
|
541
|
+
</label>
|
|
542
|
+
</div>
|
|
543
|
+
|
|
544
|
+
<div class="form-group">
|
|
545
|
+
<label for="config-mermaidTheme">Thème Mermaid :</label>
|
|
546
|
+
<select id="config-mermaidTheme">
|
|
547
|
+
<option value="default">Default</option>
|
|
548
|
+
<option value="dark">Dark</option>
|
|
549
|
+
<option value="forest">Forest</option>
|
|
550
|
+
<option value="neutral">Neutral</option>
|
|
551
|
+
</select>
|
|
552
|
+
</div>
|
|
553
|
+
|
|
554
|
+
<div class="form-actions">
|
|
555
|
+
<button onclick="window.OntoWave.instance.updateConfigFromForm()">✅ Appliquer</button>
|
|
556
|
+
<button onclick="window.OntoWave.instance.downloadConfig()">💾 Télécharger HTML</button>
|
|
557
|
+
<button onclick="window.OntoWave.instance.resetConfig()">🔄 Reset</button>
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
<div class="config-code">
|
|
562
|
+
<h2>💻 Code HTML généré</h2>
|
|
563
|
+
<div class="code-preview">
|
|
564
|
+
<pre><code id="generated-html"><!DOCTYPE html>
|
|
565
|
+
<html>
|
|
566
|
+
<head>
|
|
567
|
+
<meta charset="UTF-8">
|
|
568
|
+
<title>${this.config.title}</title>
|
|
569
|
+
</head>
|
|
570
|
+
<body>
|
|
571
|
+
<script src="ontowave.min.js"></script>
|
|
572
|
+
<script type="application/json" id="ontowave-config">
|
|
573
|
+
${e}
|
|
574
|
+
</script>
|
|
575
|
+
</body>
|
|
576
|
+
</html></code></pre>
|
|
577
|
+
</div>
|
|
578
|
+
|
|
579
|
+
<div class="usage-info">
|
|
580
|
+
<h3>📋 Instructions d'utilisation</h3>
|
|
581
|
+
<ol>
|
|
582
|
+
<li>Configurez les options dans le formulaire</li>
|
|
583
|
+
<li>Cliquez sur "Télécharger HTML" pour obtenir votre fichier</li>
|
|
584
|
+
<li>Placez vos fichiers .md dans le même dossier</li>
|
|
585
|
+
<li>Ouvrez le fichier HTML dans votre navigateur</li>
|
|
586
|
+
</ol>
|
|
587
|
+
|
|
588
|
+
<h3>🌐 Gestion des langues</h3>
|
|
589
|
+
<ul>
|
|
590
|
+
<li><strong>Monolingue :</strong> Laissez "Langues supportées" vide</li>
|
|
591
|
+
<li><strong>Multilingue :</strong> Ajoutez les codes de langue (ex: fr, en, fr-CA)</li>
|
|
592
|
+
<li><strong>Fichiers :</strong> index.fr.md, index.en.md, etc.</li>
|
|
593
|
+
<li><strong>Fallback :</strong> index.md si aucune langue trouvée</li>
|
|
594
|
+
</ul>
|
|
595
|
+
</div>
|
|
596
|
+
</div>
|
|
597
|
+
</div>
|
|
598
|
+
</div>
|
|
599
|
+
`,this.addConfigStyles(),this.populateConfigForm(),this.updateGeneratedCode())}populateConfigForm(){var e=document.getElementById("config-title"),t=document.getElementById("config-defaultPage"),o=document.getElementById("config-locales"),n=document.getElementById("config-showGallery"),i=document.getElementById("config-mermaidTheme");e&&(e.value=this.config.title),t&&(t.value=this.config.defaultPage),o&&(o.value=this.config.locales.join(", ")),n&&(n.checked=this.config.showGallery),i&&(i.value=this.config.mermaid.theme)}addConfigStyles(){var e;document.getElementById("ontowave-config-styles")||((e=document.createElement("style")).id="ontowave-config-styles",e.textContent=`
|
|
600
|
+
.ontowave-config-interface {
|
|
601
|
+
max-width: 1200px;
|
|
602
|
+
margin: 0 auto;
|
|
603
|
+
padding: 20px;
|
|
604
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.config-header {
|
|
608
|
+
text-align: center;
|
|
609
|
+
margin-bottom: 40px;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.config-header h1 {
|
|
613
|
+
color: #0969da;
|
|
614
|
+
margin-bottom: 10px;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.config-content {
|
|
618
|
+
display: grid;
|
|
619
|
+
grid-template-columns: 1fr 1fr;
|
|
620
|
+
gap: 40px;
|
|
621
|
+
align-items: start;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.config-form {
|
|
625
|
+
background: #f8f9fa;
|
|
626
|
+
padding: 30px;
|
|
627
|
+
border-radius: 12px;
|
|
628
|
+
border: 1px solid #e1e4e8;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.config-code {
|
|
632
|
+
background: #ffffff;
|
|
633
|
+
padding: 30px;
|
|
634
|
+
border-radius: 12px;
|
|
635
|
+
border: 1px solid #e1e4e8;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.form-group {
|
|
639
|
+
margin-bottom: 20px;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.form-group label {
|
|
643
|
+
display: block;
|
|
644
|
+
font-weight: 600;
|
|
645
|
+
margin-bottom: 8px;
|
|
646
|
+
color: #24292e;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.form-group input, .form-group select {
|
|
650
|
+
width: 100%;
|
|
651
|
+
padding: 10px;
|
|
652
|
+
border: 1px solid #d0d7de;
|
|
653
|
+
border-radius: 6px;
|
|
654
|
+
font-size: 14px;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.form-group input[type="checkbox"] {
|
|
658
|
+
width: auto;
|
|
659
|
+
margin-right: 8px;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.form-actions {
|
|
663
|
+
display: flex;
|
|
664
|
+
gap: 10px;
|
|
665
|
+
margin-top: 30px;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.form-actions button {
|
|
669
|
+
flex: 1;
|
|
670
|
+
padding: 12px 20px;
|
|
671
|
+
border: none;
|
|
672
|
+
border-radius: 6px;
|
|
673
|
+
font-weight: 600;
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
transition: all 0.2s ease;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.form-actions button:first-child {
|
|
679
|
+
background: #28a745;
|
|
680
|
+
color: white;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.form-actions button:nth-child(2) {
|
|
684
|
+
background: #0969da;
|
|
685
|
+
color: white;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.form-actions button:last-child {
|
|
689
|
+
background: #6c757d;
|
|
690
|
+
color: white;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.form-actions button:hover {
|
|
694
|
+
transform: translateY(-1px);
|
|
695
|
+
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.code-preview {
|
|
699
|
+
background: #f6f8fa;
|
|
700
|
+
border: 1px solid #e1e4e8;
|
|
701
|
+
border-radius: 6px;
|
|
702
|
+
padding: 16px;
|
|
703
|
+
overflow-x: auto;
|
|
704
|
+
margin-bottom: 20px;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.code-preview pre {
|
|
708
|
+
margin: 0;
|
|
709
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
710
|
+
font-size: 13px;
|
|
711
|
+
line-height: 1.4;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.usage-info h3 {
|
|
715
|
+
color: #0969da;
|
|
716
|
+
margin-top: 25px;
|
|
717
|
+
margin-bottom: 10px;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.usage-info ul, .usage-info ol {
|
|
721
|
+
padding-left: 20px;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.usage-info li {
|
|
725
|
+
margin-bottom: 5px;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
@media (max-width: 768px) {
|
|
729
|
+
.config-content {
|
|
730
|
+
grid-template-columns: 1fr;
|
|
731
|
+
gap: 20px;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
`,document.head.appendChild(e))}updateConfigFromForm(){var e=document.getElementById("config-title").value,t=document.getElementById("config-defaultPage").value,o=document.getElementById("config-locales").value.split(",").map(e=>e.trim()).filter(e=>0<e.length),n=document.getElementById("config-showGallery").checked,i=document.getElementById("config-mermaidTheme").value;this.config.title=e,this.config.defaultPage=t,this.config.locales=o,this.config.showGallery=n,this.config.mermaid.theme=i,console.log("📝 Configuration updated:",this.config),document.title=this.config.title,this.updateGeneratedCode(),this.showNotification("✅ Configuration mise à jour")}updateGeneratedCode(){var e={title:this.config.title,baseUrl:this.config.baseUrl,defaultPage:this.config.defaultPage,locales:this.config.locales,fallbackLocale:this.config.fallbackLocale,showGallery:this.config.showGallery,mermaid:{theme:this.config.mermaid.theme}},e=JSON.stringify(e,null,2).replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),e=`<!DOCTYPE html>
|
|
735
|
+
<html>
|
|
736
|
+
<head>
|
|
737
|
+
<meta charset="UTF-8">
|
|
738
|
+
<title>${this.config.title}</title>
|
|
739
|
+
</head>
|
|
740
|
+
<body>
|
|
741
|
+
<script src="ontowave.min.js"></script>
|
|
742
|
+
<script type="application/json" id="ontowave-config">
|
|
743
|
+
${e}
|
|
744
|
+
</script>
|
|
745
|
+
</body>
|
|
746
|
+
</html>`,t=document.getElementById("generated-html");t&&(t.innerHTML=e)}downloadConfig(){var e={title:this.config.title,baseUrl:this.config.baseUrl,defaultPage:this.config.defaultPage,locales:this.config.locales,fallbackLocale:this.config.fallbackLocale,showGallery:this.config.showGallery,mermaid:{theme:this.config.mermaid.theme}},e=JSON.stringify(e,null,2),e=`<!DOCTYPE html>
|
|
747
|
+
<html>
|
|
748
|
+
<head>
|
|
749
|
+
<meta charset="UTF-8">
|
|
750
|
+
<title>${this.config.title}</title>
|
|
751
|
+
</head>
|
|
752
|
+
<body>
|
|
753
|
+
<script src="ontowave.min.js"></script>
|
|
754
|
+
<script type="application/json" id="ontowave-config">
|
|
755
|
+
${e}
|
|
756
|
+
</script>
|
|
757
|
+
</body>
|
|
758
|
+
</html>`,e=new Blob([e],{type:"text/html"}),e=URL.createObjectURL(e),t=document.createElement("a");t.href=e,t.download="index.html",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(e),this.showNotification("💾 Fichier HTML téléchargé")}resetConfig(){this.config={...t},this.showConfigurationInterface(),this.showNotification("🔄 Configuration réinitialisée")}showNotification(e){let t=document.createElement("div");t.style.cssText=`
|
|
759
|
+
position: fixed;
|
|
760
|
+
top: 20px;
|
|
761
|
+
right: 20px;
|
|
762
|
+
background: #28a745;
|
|
763
|
+
color: white;
|
|
764
|
+
padding: 12px 20px;
|
|
765
|
+
border-radius: 6px;
|
|
766
|
+
z-index: 10000;
|
|
767
|
+
font-weight: 600;
|
|
768
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
769
|
+
animation: slideIn 0.3s ease;
|
|
770
|
+
`,t.textContent=e,document.getElementById("notification-styles")||((e=document.createElement("style")).id="notification-styles",e.textContent=`
|
|
771
|
+
@keyframes slideIn {
|
|
772
|
+
from { transform: translateX(100%); opacity: 0; }
|
|
773
|
+
to { transform: translateX(0); opacity: 1; }
|
|
774
|
+
}
|
|
775
|
+
`,document.head.appendChild(e)),document.body.appendChild(t),setTimeout(()=>{t.style.animation="slideIn 0.3s ease reverse",setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},300)},3e3)}showError(e){var t=document.getElementById("ontowave-content");t&&(t.innerHTML=`<div class="ontowave-error">❌ ${e}</div>`)}toggleConfigurationPanel(o,n=null){o&&(o.preventDefault(),o.stopPropagation());o=n||this.getCurrentLanguage(),console.log("⚙️ Opening config panel with locale:",o),n=document.querySelector(".ontowave-menu-content");if(n){var i=document.querySelector('.ontowave-menu-option[onclick*="toggleConfigurationPanel"]');let t=document.getElementById("ontowave-config-panel");if(t){t.remove(),i&&i.classList.remove("selected");let e=document.getElementById("ontowave-floating-menu");e&&e.classList.remove("has-config-panel"),"function"==typeof d.ontowaveUpdateDragState&&d.ontowaveUpdateDragState(),void console.log("Config panel closed")}else{i&&i.classList.add("selected"),(t=document.createElement("div")).id="ontowave-config-panel",t.className="ontowave-config-panel",t.innerHTML=`
|
|
776
|
+
<div class="config-panel-content">
|
|
777
|
+
<div class="config-full-panel">
|
|
778
|
+
<h3>🌊 ${this.t("configTitle",o)}</h3>
|
|
779
|
+
|
|
780
|
+
<!-- Section Général -->
|
|
781
|
+
<div class="config-section">
|
|
782
|
+
<h4>📖 ${this.t("configGeneral",o)}</h4>
|
|
783
|
+
<div class="config-row">
|
|
784
|
+
<div class="form-group-full">
|
|
785
|
+
<label for="config-title-full">${this.t("configSiteTitle",o)}</label>
|
|
786
|
+
<input type="text" id="config-title-full" value="${this.config.title}" />
|
|
787
|
+
</div>
|
|
788
|
+
<div class="form-group-full">
|
|
789
|
+
<label for="config-defaultPage-full">${this.t("configDefaultPage",o)}</label>
|
|
790
|
+
<input type="text" id="config-defaultPage-full" value="${this.config.defaultPage}" placeholder="index.md" />
|
|
791
|
+
</div>
|
|
792
|
+
</div>
|
|
793
|
+
<div class="form-group-full">
|
|
794
|
+
<label for="config-baseUrl-full">${this.t("configBaseUrl",o)}</label>
|
|
795
|
+
<input type="text" id="config-baseUrl-full" value="${this.config.baseUrl}" placeholder="/" />
|
|
796
|
+
</div>
|
|
797
|
+
</div>
|
|
798
|
+
|
|
799
|
+
<!-- Section Langues et Localisation -->
|
|
800
|
+
<div class="config-section">
|
|
801
|
+
<h4>🌍 ${this.t("configLanguages",o)}</h4>
|
|
802
|
+
<div class="config-row">
|
|
803
|
+
<div class="form-group-full">
|
|
804
|
+
<label for="config-locales-full">${this.t("configSupportedLanguages",o)}</label>
|
|
805
|
+
<input type="text" id="config-locales-full" value="${this.config.locales.join(", ")}" placeholder="fr-CA, fr, en" />
|
|
806
|
+
<small>${this.t("configLanguageNote",o)}</small>
|
|
807
|
+
</div>
|
|
808
|
+
<div class="form-group-full">
|
|
809
|
+
<label for="config-fallbackLocale-full">${this.t("configFallbackLanguage",o)}</label>
|
|
810
|
+
<select id="config-fallbackLocale-full">
|
|
811
|
+
<option value="en" ${"en"===this.config.fallbackLocale?"selected":""}>English (en)</option>
|
|
812
|
+
<option value="fr" ${"fr"===this.config.fallbackLocale?"selected":""}>Français (fr)</option>
|
|
813
|
+
<option value="es" ${"es"===this.config.fallbackLocale?"selected":""}>Español (es)</option>
|
|
814
|
+
<option value="de" ${"de"===this.config.fallbackLocale?"selected":""}>Deutsch (de)</option>
|
|
815
|
+
</select>
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
</div>
|
|
819
|
+
|
|
820
|
+
<!-- Section Navigation et Interface -->
|
|
821
|
+
<div class="config-section">
|
|
822
|
+
<h4>🧭 ${this.t("configNavigation",o)}</h4>
|
|
823
|
+
<div class="config-row">
|
|
824
|
+
<div class="form-group-checkbox">
|
|
825
|
+
<label>
|
|
826
|
+
<input type="checkbox" id="config-showGallery-full" ${this.config.showGallery?"checked":""} />
|
|
827
|
+
🎨 ${this.t("configShowGallery",o)}
|
|
828
|
+
</label>
|
|
829
|
+
</div>
|
|
830
|
+
<div class="form-group-checkbox">
|
|
831
|
+
<label>
|
|
832
|
+
<input type="checkbox" id="config-navHome-full" ${!1!==this.config.navigation?.showHome?"checked":""} />
|
|
833
|
+
🏠 ${this.t("configHomeButton",o)}
|
|
834
|
+
</label>
|
|
835
|
+
</div>
|
|
836
|
+
</div>
|
|
837
|
+
<div class="config-row">
|
|
838
|
+
<div class="form-group-checkbox">
|
|
839
|
+
<label>
|
|
840
|
+
<input type="checkbox" id="config-navBreadcrumb-full" ${!1!==this.config.navigation?.showBreadcrumb?"checked":""} />
|
|
841
|
+
📍 ${this.t("configBreadcrumb",o)}
|
|
842
|
+
</label>
|
|
843
|
+
</div>
|
|
844
|
+
<div class="form-group-checkbox">
|
|
845
|
+
<label>
|
|
846
|
+
<input type="checkbox" id="config-navToc-full" ${!1!==this.config.navigation?.showToc?"checked":""} />
|
|
847
|
+
📑 ${this.t("configToc",o)}
|
|
848
|
+
</label>
|
|
849
|
+
</div>
|
|
850
|
+
</div>
|
|
851
|
+
</div>
|
|
852
|
+
|
|
853
|
+
<!-- Section Diagrammes Mermaid -->
|
|
854
|
+
<div class="config-section">
|
|
855
|
+
<h4>📊 ${this.t("configMermaid",o)}</h4>
|
|
856
|
+
<div class="config-row">
|
|
857
|
+
<div class="form-group-full">
|
|
858
|
+
<label for="config-mermaidTheme-full">${this.t("configMermaidTheme",o)}</label>
|
|
859
|
+
<select id="config-mermaidTheme-full">
|
|
860
|
+
<option value="default" ${"default"===this.config.mermaid?.theme?"selected":""}>Default (clair)</option>
|
|
861
|
+
<option value="dark" ${"dark"===this.config.mermaid?.theme?"selected":""}>Dark (sombre)</option>
|
|
862
|
+
<option value="forest" ${"forest"===this.config.mermaid?.theme?"selected":""}>Forest (vert)</option>
|
|
863
|
+
<option value="neutral" ${"neutral"===this.config.mermaid?.theme?"selected":""}>Neutral (neutre)</option>
|
|
864
|
+
</select>
|
|
865
|
+
</div>
|
|
866
|
+
<div class="form-group-checkbox">
|
|
867
|
+
<label>
|
|
868
|
+
<input type="checkbox" id="config-mermaidStart-full" ${!1!==this.config.mermaid?.startOnLoad?"checked":""} />
|
|
869
|
+
🚀 ${this.t("configMermaidAuto",o)}
|
|
870
|
+
</label>
|
|
871
|
+
</div>
|
|
872
|
+
</div>
|
|
873
|
+
<div class="config-row">
|
|
874
|
+
<div class="form-group-checkbox">
|
|
875
|
+
<label>
|
|
876
|
+
<input type="checkbox" id="config-mermaidMaxWidth-full" ${!1!==this.config.mermaid?.flowchart?.useMaxWidth?"checked":""} />
|
|
877
|
+
📐 ${this.t("configMermaidMaxWidth",o)}
|
|
878
|
+
</label>
|
|
879
|
+
</div>
|
|
880
|
+
</div>
|
|
881
|
+
</div>
|
|
882
|
+
|
|
883
|
+
<!-- Section PlantUML -->
|
|
884
|
+
<div class="config-section">
|
|
885
|
+
<h4>🌿 ${this.t("configPlantuml",o)}</h4>
|
|
886
|
+
<div class="config-row">
|
|
887
|
+
<div class="form-group-full">
|
|
888
|
+
<label for="config-plantumlServer-full">${this.t("configPlantumlServer",o)}</label>
|
|
889
|
+
<input type="text" id="config-plantumlServer-full" value="${this.config.plantuml?.server||"https://www.plantuml.com/plantuml"}" />
|
|
890
|
+
</div>
|
|
891
|
+
<div class="form-group-full">
|
|
892
|
+
<label for="config-plantumlFormat-full">${this.t("configPlantumlFormat",o)}</label>
|
|
893
|
+
<select id="config-plantumlFormat-full">
|
|
894
|
+
<option value="svg" ${"svg"===this.config.plantuml?.format?"selected":""}>SVG (vectoriel)</option>
|
|
895
|
+
<option value="png" ${"png"===this.config.plantuml?.format?"selected":""}>PNG (bitmap)</option>
|
|
896
|
+
</select>
|
|
897
|
+
</div>
|
|
898
|
+
</div>
|
|
899
|
+
</div>
|
|
900
|
+
|
|
901
|
+
<!-- Section Coloration Syntaxique -->
|
|
902
|
+
<div class="config-section">
|
|
903
|
+
<h4>🎨 ${this.t("configPrism",o)}</h4>
|
|
904
|
+
<div class="config-row">
|
|
905
|
+
<div class="form-group-full">
|
|
906
|
+
<label for="config-prismTheme-full">${this.t("configPrismTheme",o)}</label>
|
|
907
|
+
<select id="config-prismTheme-full">
|
|
908
|
+
<option value="default" ${"default"===this.config.prism?.theme?"selected":""}>Default (clair)</option>
|
|
909
|
+
<option value="dark" ${"dark"===this.config.prism?.theme?"selected":""}>Dark (sombre)</option>
|
|
910
|
+
<option value="twilight" ${"twilight"===this.config.prism?.theme?"selected":""}>Twilight</option>
|
|
911
|
+
</select>
|
|
912
|
+
</div>
|
|
913
|
+
<div class="form-group-checkbox">
|
|
914
|
+
<label>
|
|
915
|
+
<input type="checkbox" id="config-prismAutoload-full" ${!1!==this.config.prism?.autoload?"checked":""} />
|
|
916
|
+
🔄 ${this.t("configPrismAutoload",o)}
|
|
917
|
+
</label>
|
|
918
|
+
</div>
|
|
919
|
+
</div>
|
|
920
|
+
</div>
|
|
921
|
+
|
|
922
|
+
<!-- Section Interface Utilisateur -->
|
|
923
|
+
<div class="config-section">
|
|
924
|
+
<h4>💻 ${this.t("configUI",o)}</h4>
|
|
925
|
+
<div class="config-row">
|
|
926
|
+
<div class="form-group-full">
|
|
927
|
+
<label for="config-uiTheme-full">${this.t("configUITheme",o)}</label>
|
|
928
|
+
<select id="config-uiTheme-full">
|
|
929
|
+
<option value="default" ${"default"===this.config.ui?.theme?"selected":""}>Default (clair)</option>
|
|
930
|
+
<option value="dark" ${"dark"===this.config.ui?.theme?"selected":""}>Dark (sombre)</option>
|
|
931
|
+
<option value="auto" ${"auto"===this.config.ui?.theme?"selected":""}>Auto (système)</option>
|
|
932
|
+
</select>
|
|
933
|
+
</div>
|
|
934
|
+
<div class="form-group-checkbox">
|
|
935
|
+
<label>
|
|
936
|
+
<input type="checkbox" id="config-uiResponsive-full" ${!1!==this.config.ui?.responsive?"checked":""} />
|
|
937
|
+
📱 ${this.t("configUIResponsive",o)}
|
|
938
|
+
</label>
|
|
939
|
+
</div>
|
|
940
|
+
</div>
|
|
941
|
+
<div class="config-row">
|
|
942
|
+
<div class="form-group-checkbox">
|
|
943
|
+
<label>
|
|
944
|
+
<input type="checkbox" id="config-uiAnimations-full" ${!1!==this.config.ui?.animations?"checked":""} />
|
|
945
|
+
✨ ${this.t("configUIAnimations",o)}
|
|
946
|
+
</label>
|
|
947
|
+
</div>
|
|
948
|
+
</div>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
<!-- Actions -->
|
|
952
|
+
<div class="form-actions-full">
|
|
953
|
+
<button onclick="window.OntoWave.instance.updateConfigFromFullPanel()" class="btn-primary">✅ ${this.t("configApply",o)}</button>
|
|
954
|
+
<button onclick="window.OntoWave.instance.downloadConfigFromPanel()" class="btn-secondary">💾 ${this.t("configDownloadHTML",o)}</button>
|
|
955
|
+
<button onclick="window.OntoWave.instance.downloadOntoWaveScript()" class="btn-secondary">📥 ${this.t("configDownloadJS",o)}</button>
|
|
956
|
+
<button onclick="window.OntoWave.instance.resetConfigToDefaults()" class="btn-warning">🔄 ${this.t("configReset",o)}</button>
|
|
957
|
+
</div>
|
|
958
|
+
</div>
|
|
959
|
+
</div>
|
|
960
|
+
`,this.addConfigPanelStyles(),n.appendChild(t);let e=document.getElementById("ontowave-floating-menu");e&&e.classList.add("has-config-panel"),"function"==typeof d.ontowaveUpdateDragState&&d.ontowaveUpdateDragState(),this.updateGeneratedCodeMini(),console.log("Config panel opened")}}else console.error("Menu content not found")}updateConfigFromFullPanel(){var e=document.getElementById("config-title-full")?.value||this.config.title,t=document.getElementById("config-defaultPage-full")?.value||this.config.defaultPage,o=document.getElementById("config-baseUrl-full")?.value||this.config.baseUrl,n=document.getElementById("config-locales-full")?.value.split(",").map(e=>e.trim()).filter(e=>0<e.length)||this.config.locales,i=document.getElementById("config-fallbackLocale-full")?.value||this.config.fallbackLocale,a=document.getElementById("config-showGallery-full")?.checked||!1,l=!1!==document.getElementById("config-navHome-full")?.checked,r=!1!==document.getElementById("config-navBreadcrumb-full")?.checked,s=!1!==document.getElementById("config-navToc-full")?.checked,c=document.getElementById("config-mermaidTheme-full")?.value||"default",d=!1!==document.getElementById("config-mermaidStart-full")?.checked,g=!1!==document.getElementById("config-mermaidMaxWidth-full")?.checked,u=document.getElementById("config-plantumlServer-full")?.value||"https://www.plantuml.com/plantuml",m=document.getElementById("config-plantumlFormat-full")?.value||"svg",f=document.getElementById("config-prismTheme-full")?.value||"default",p=!1!==document.getElementById("config-prismAutoload-full")?.checked,h=document.getElementById("config-uiTheme-full")?.value||"default",v=!1!==document.getElementById("config-uiResponsive-full")?.checked,b=!1!==document.getElementById("config-uiAnimations-full")?.checked;this.config.title=e,this.config.defaultPage=t,this.config.baseUrl=o,this.config.locales=n,this.config.fallbackLocale=i,this.config.showGallery=a,this.config.navigation={showHome:l,showBreadcrumb:r,showToc:s},this.config.mermaid={theme:c,startOnLoad:d,flowchart:{useMaxWidth:g},sequence:{useMaxWidth:g},gantt:{useMaxWidth:g},journey:{useMaxWidth:g}},this.config.plantuml={server:u,format:m},this.config.prism={theme:f,autoload:p},this.config.ui={theme:h,responsive:v,animations:b},document.title=this.config.title,this.showNotification("Configuration appliquée avec succès ! 🎉"),console.log("Configuration mise à jour:",this.config)}resetConfigToDefaults(){var e;confirm("Voulez-vous vraiment réinitialiser toute la configuration aux valeurs par défaut ?")&&(Object.assign(this.config,{title:"OntoWave Documentation",baseUrl:"/",defaultPage:"index.md",locales:[],fallbackLocale:"en",showGallery:!1,mermaid:{theme:"default",startOnLoad:!0,flowchart:{useMaxWidth:!0},sequence:{useMaxWidth:!0},gantt:{useMaxWidth:!0},journey:{useMaxWidth:!0}},plantuml:{server:"https://www.plantuml.com/plantuml",format:"svg"},prism:{theme:"default",autoload:!0},navigation:{showHome:!0,showBreadcrumb:!0,showToc:!0},ui:{theme:"default",responsive:!0,animations:!0}}),(e=document.getElementById("ontowave-config-panel"))&&(e.remove(),"function"==typeof d.ontowaveUpdateDragState&&d.ontowaveUpdateDragState(),setTimeout(()=>this.toggleConfigurationPanel(),100)),this.showNotification("Configuration réinitialisée ! 🔄"))}updateConfigFromPanel(){var e=document.getElementById("config-title-mini")?.value||this.config.title,t=document.getElementById("config-locales-mini")?.value.split(",").map(e=>e.trim()).filter(e=>0<e.length)||this.config.locales,o=document.getElementById("config-showGallery-mini")?.checked||this.config.showGallery;this.config.title=e,this.config.locales=t,this.config.showGallery=o,document.title=this.config.title,this.updateGeneratedCodeMini(),this.showNotification("✅ Configuration mise à jour")}downloadConfigFromPanel(){var e={title:this.config.title,baseUrl:this.config.baseUrl,defaultPage:this.config.defaultPage,locales:this.config.locales,fallbackLocale:this.config.fallbackLocale,showGallery:this.config.showGallery,mermaid:{theme:this.config.mermaid.theme}},e=JSON.stringify(e,null,2),e=`<!DOCTYPE html>
|
|
961
|
+
<html>
|
|
962
|
+
<head>
|
|
963
|
+
<meta charset="UTF-8">
|
|
964
|
+
<title>${this.config.title}</title>
|
|
965
|
+
</head>
|
|
966
|
+
<body>
|
|
967
|
+
<script src="ontowave.min.js"></script>
|
|
968
|
+
<script type="application/json" id="ontowave-config">
|
|
969
|
+
${e}
|
|
970
|
+
</script>
|
|
971
|
+
</body>
|
|
972
|
+
</html>`,e=new Blob([e],{type:"text/html"}),e=URL.createObjectURL(e),t=document.createElement("a");t.href=e,t.download="index.html",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(e),this.showNotification("💾 Fichier HTML téléchargé")}downloadOntoWaveScript(){var e=document.createElement("a");e.href="ontowave.min.js",e.download="ontowave.min.js",document.body.appendChild(e),e.click(),document.body.removeChild(e),this.showNotification("📥 Fichier ontowave.min.js téléchargé")}updateGeneratedCodeMini(){var e={title:this.config.title,baseUrl:this.config.baseUrl,defaultPage:this.config.defaultPage,locales:this.config.locales,fallbackLocale:this.config.fallbackLocale,showGallery:this.config.showGallery,mermaid:{theme:this.config.mermaid.theme}},e=JSON.stringify(e,null,2).replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),e=`<!DOCTYPE html>
|
|
973
|
+
<html>
|
|
974
|
+
<head>
|
|
975
|
+
<meta charset="UTF-8">
|
|
976
|
+
<title>${this.config.title}</title>
|
|
977
|
+
</head>
|
|
978
|
+
<body>
|
|
979
|
+
<script src="ontowave.min.js"></script>
|
|
980
|
+
<script type="application/json" id="ontowave-config">
|
|
981
|
+
${e}
|
|
982
|
+
</script>
|
|
983
|
+
</body>
|
|
984
|
+
</html>`,t=document.getElementById("generated-html-mini");t&&(t.innerHTML=e)}addConfigPanelStyles(){var e;document.getElementById("ontowave-config-panel-styles")||((e=document.createElement("style")).id="ontowave-config-panel-styles",e.textContent=`
|
|
985
|
+
/* Panneau de configuration étendu */
|
|
986
|
+
.ontowave-config-panel {
|
|
987
|
+
position: absolute;
|
|
988
|
+
top: 100%;
|
|
989
|
+
left: 0;
|
|
990
|
+
right: 0;
|
|
991
|
+
background: white;
|
|
992
|
+
border: 1px solid #e1e4e8;
|
|
993
|
+
border-radius: 12px;
|
|
994
|
+
box-shadow: 0 16px 48px rgba(0,0,0,0.15);
|
|
995
|
+
z-index: 1001;
|
|
996
|
+
margin-top: 12px;
|
|
997
|
+
max-height: 90vh;
|
|
998
|
+
overflow-y: auto;
|
|
999
|
+
min-width: 90vw;
|
|
1000
|
+
max-width: 95vw;
|
|
1001
|
+
width: auto;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.config-panel-content {
|
|
1005
|
+
padding: 0;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.config-full-panel {
|
|
1009
|
+
padding: 32px;
|
|
1010
|
+
max-width: none;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.config-full-panel h3 {
|
|
1014
|
+
margin: 0 0 32px 0;
|
|
1015
|
+
color: #0969da;
|
|
1016
|
+
font-size: 24px;
|
|
1017
|
+
font-weight: 700;
|
|
1018
|
+
text-align: center;
|
|
1019
|
+
padding-bottom: 16px;
|
|
1020
|
+
border-bottom: 2px solid #f6f8fa;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/* Sections de configuration */
|
|
1024
|
+
.config-section {
|
|
1025
|
+
margin-bottom: 32px;
|
|
1026
|
+
padding: 24px;
|
|
1027
|
+
background: #f6f8fa;
|
|
1028
|
+
border-radius: 8px;
|
|
1029
|
+
border-left: 4px solid #0969da;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.config-section h4 {
|
|
1033
|
+
margin: 0 0 20px 0;
|
|
1034
|
+
color: #24292e;
|
|
1035
|
+
font-size: 18px;
|
|
1036
|
+
font-weight: 600;
|
|
1037
|
+
display: flex;
|
|
1038
|
+
align-items: center;
|
|
1039
|
+
gap: 8px;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/* Disposition en lignes */
|
|
1043
|
+
.config-row {
|
|
1044
|
+
display: grid;
|
|
1045
|
+
grid-template-columns: 1fr 1fr;
|
|
1046
|
+
gap: 20px;
|
|
1047
|
+
margin-bottom: 16px;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.config-row:last-child {
|
|
1051
|
+
margin-bottom: 0;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
/* Groupes de formulaire */
|
|
1055
|
+
.form-group-full {
|
|
1056
|
+
margin-bottom: 0;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.form-group-full label {
|
|
1060
|
+
display: block;
|
|
1061
|
+
font-weight: 600;
|
|
1062
|
+
margin-bottom: 8px;
|
|
1063
|
+
color: #24292e;
|
|
1064
|
+
font-size: 14px;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.form-group-full input,
|
|
1068
|
+
.form-group-full select {
|
|
1069
|
+
width: 100%;
|
|
1070
|
+
padding: 12px;
|
|
1071
|
+
border: 2px solid #d0d7de;
|
|
1072
|
+
border-radius: 6px;
|
|
1073
|
+
font-size: 14px;
|
|
1074
|
+
transition: border-color 0.2s ease;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.form-group-full input:focus,
|
|
1078
|
+
.form-group-full select:focus {
|
|
1079
|
+
outline: none;
|
|
1080
|
+
border-color: #0969da;
|
|
1081
|
+
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.form-group-full small {
|
|
1085
|
+
display: block;
|
|
1086
|
+
margin-top: 4px;
|
|
1087
|
+
font-size: 12px;
|
|
1088
|
+
color: #656d76;
|
|
1089
|
+
font-style: italic;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/* Checkboxes */
|
|
1093
|
+
.form-group-checkbox {
|
|
1094
|
+
display: flex;
|
|
1095
|
+
align-items: center;
|
|
1096
|
+
margin-bottom: 0;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.form-group-checkbox label {
|
|
1100
|
+
display: flex;
|
|
1101
|
+
align-items: center;
|
|
1102
|
+
font-weight: 500;
|
|
1103
|
+
color: #24292e;
|
|
1104
|
+
font-size: 14px;
|
|
1105
|
+
cursor: pointer;
|
|
1106
|
+
margin: 0;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
.form-group-checkbox input[type="checkbox"] {
|
|
1110
|
+
width: auto;
|
|
1111
|
+
margin: 0 8px 0 0;
|
|
1112
|
+
transform: scale(1.2);
|
|
1113
|
+
accent-color: #0969da;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/* Actions du formulaire */
|
|
1117
|
+
.form-actions-full {
|
|
1118
|
+
display: flex;
|
|
1119
|
+
gap: 16px;
|
|
1120
|
+
justify-content: center;
|
|
1121
|
+
margin-top: 40px;
|
|
1122
|
+
padding-top: 24px;
|
|
1123
|
+
border-top: 2px solid #f6f8fa;
|
|
1124
|
+
flex-wrap: wrap;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.form-actions-full button {
|
|
1128
|
+
padding: 12px 24px;
|
|
1129
|
+
border: none;
|
|
1130
|
+
border-radius: 8px;
|
|
1131
|
+
font-size: 14px;
|
|
1132
|
+
font-weight: 600;
|
|
1133
|
+
cursor: pointer;
|
|
1134
|
+
transition: all 0.2s ease;
|
|
1135
|
+
min-width: 180px;
|
|
1136
|
+
display: flex;
|
|
1137
|
+
align-items: center;
|
|
1138
|
+
justify-content: center;
|
|
1139
|
+
gap: 8px;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.btn-primary {
|
|
1143
|
+
background: #0969da;
|
|
1144
|
+
color: white;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.btn-primary:hover {
|
|
1148
|
+
background: #0550ae;
|
|
1149
|
+
transform: translateY(-1px);
|
|
1150
|
+
box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.btn-secondary {
|
|
1154
|
+
background: #6f7782;
|
|
1155
|
+
color: white;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.btn-secondary:hover {
|
|
1159
|
+
background: #57606a;
|
|
1160
|
+
transform: translateY(-1px);
|
|
1161
|
+
box-shadow: 0 4px 12px rgba(111, 119, 130, 0.3);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.btn-warning {
|
|
1165
|
+
background: #d73a49;
|
|
1166
|
+
color: white;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
.btn-warning:hover {
|
|
1170
|
+
background: #b31d28;
|
|
1171
|
+
transform: translateY(-1px);
|
|
1172
|
+
box-shadow: 0 4px 12px rgba(215, 58, 73, 0.3);
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/* Responsive pour petits écrans */
|
|
1176
|
+
@media (max-width: 768px) {
|
|
1177
|
+
.ontowave-config-panel {
|
|
1178
|
+
min-width: 95vw;
|
|
1179
|
+
margin-top: 8px;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.config-full-panel {
|
|
1183
|
+
padding: 20px;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.config-row {
|
|
1187
|
+
grid-template-columns: 1fr;
|
|
1188
|
+
gap: 16px;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
.form-actions-full {
|
|
1192
|
+
flex-direction: column;
|
|
1193
|
+
align-items: stretch;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.form-actions-full button {
|
|
1197
|
+
min-width: auto;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
/* Styles pour compatibilité avec l'ancien panneau compact */
|
|
1202
|
+
.config-form-compact h3,
|
|
1203
|
+
.config-preview-compact h3 {
|
|
1204
|
+
margin: 0 0 16px 0;
|
|
1205
|
+
color: #0969da;
|
|
1206
|
+
font-size: 16px;
|
|
1207
|
+
font-weight: 600;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.form-group-compact {
|
|
1211
|
+
margin-bottom: 16px;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.form-group-compact label {
|
|
1215
|
+
display: block;
|
|
1216
|
+
font-weight: 600;
|
|
1217
|
+
margin-bottom: 6px;
|
|
1218
|
+
color: #24292e;
|
|
1219
|
+
font-size: 13px;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.form-group-compact input {
|
|
1223
|
+
width: 100%;
|
|
1224
|
+
padding: 8px;
|
|
1225
|
+
border: 1px solid #d0d7de;
|
|
1226
|
+
border-radius: 4px;
|
|
1227
|
+
font-size: 13px;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
.form-group-compact input[type="checkbox"] {
|
|
1231
|
+
width: auto;
|
|
1232
|
+
margin-right: 6px;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.form-actions-compact {
|
|
1236
|
+
display: flex;
|
|
1237
|
+
gap: 10px;
|
|
1238
|
+
margin-top: 20px;
|
|
1239
|
+
flex-wrap: wrap;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.form-actions-compact button {
|
|
1243
|
+
flex: 1;
|
|
1244
|
+
padding: 10px 16px;
|
|
1245
|
+
border: none;
|
|
1246
|
+
border-radius: 6px;
|
|
1247
|
+
background: #0969da;
|
|
1248
|
+
color: white;
|
|
1249
|
+
font-size: 13px;
|
|
1250
|
+
font-weight: 600;
|
|
1251
|
+
cursor: pointer;
|
|
1252
|
+
transition: background 0.2s ease;
|
|
1253
|
+
min-width: 120px;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.form-actions-compact button:hover {
|
|
1257
|
+
background: #0550ae;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.config-preview-compact {
|
|
1261
|
+
background: #f6f8fa;
|
|
1262
|
+
border-radius: 6px;
|
|
1263
|
+
padding: 16px;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.code-preview-mini {
|
|
1267
|
+
background: #24292e;
|
|
1268
|
+
color: #f6f8fa;
|
|
1269
|
+
padding: 12px;
|
|
1270
|
+
border-radius: 4px;
|
|
1271
|
+
font-family: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
1272
|
+
font-size: 11px;
|
|
1273
|
+
line-height: 1.4;
|
|
1274
|
+
overflow-x: auto;
|
|
1275
|
+
max-height: 300px;
|
|
1276
|
+
overflow-y: auto;
|
|
1277
|
+
}
|
|
1278
|
+
`,document.head.appendChild(e))}navigate(e){this.loadPage(e)}getConfig(){return{...this.config}}updateConfig(e){this.config={...this.config,...e},console.log("📝 Configuration updated")}}async function i(){try{var e,t=await fetch("./config.json");if(t.ok)return e=await t.json(),console.log("📁 Configuration chargée depuis config.json:",e),e}catch(e){console.log("📁 Pas de config.json trouvé, utilisation de la configuration par défaut")}return{}}document.addEventListener("DOMContentLoaded",async()=>{let e=d.OntoWaveConfig||{};e=d.OntoWaveConfig?{...await i(),...d.OntoWaveConfig}:await i(),d.OntoWave={instance:new n(e)},await d.OntoWave.instance.init(),console.log("🌊 OntoWave initialisé automatiquement")}),d.OntoWaveClass=n})(window);
|