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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Stéphane Denis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
package/README.md.backup
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# 🌊 OntoWave - Interactive Documentation Framework
|
|
2
|
+
|
|
3
|
+
**OntoWave** is a powerful, zero-config framework that transforms your static documentation into an interactive website with just one script include!
|
|
4
|
+
|
|
5
|
+
🌐 **Visit**: [ontowave.org](https://ontowave.org) for complete documentation and live examples.
|
|
6
|
+
|
|
7
|
+
## ⚡ Quick Start
|
|
8
|
+
|
|
9
|
+
### CDN Integration (Recommended)
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<!DOCTYPE html>
|
|
13
|
+
<html>
|
|
14
|
+
<head>
|
|
15
|
+
<meta charset="UTF-8">
|
|
16
|
+
<title>My Documentation</title>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<!-- Single include - that's it! -->
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/ontowave@latest/dist/ontowave.min.js"></script>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### NPM Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install ontowave
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import 'ontowave';
|
|
33
|
+
// OntoWave automatically initializes
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## ✨ Key Features
|
|
37
|
+
|
|
38
|
+
- 🚀 **Zero Configuration** - Works out of the box
|
|
39
|
+
- 🌍 **Multilingual Support** - Built-in French/English interface
|
|
40
|
+
- 🎨 **Syntax Highlighting** - Prism.js integration
|
|
41
|
+
- 📊 **Mermaid Diagrams** - Automatic diagram rendering
|
|
42
|
+
- 📱 **Responsive Design** - Mobile-optimized interface
|
|
43
|
+
- 🔍 **Smart Navigation** - Hash-based routing
|
|
44
|
+
- ⚙️ **Configurable** - Optional JSON configuration
|
|
45
|
+
- 📦 **Self-contained** - No external dependencies
|
|
46
|
+
|
|
47
|
+
## � Configuration (Optional)
|
|
48
|
+
|
|
49
|
+
OntoWave works without configuration, but you can customize it:
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<script>
|
|
53
|
+
window.OntoWaveConfig = {
|
|
54
|
+
locales: ['en', 'fr'],
|
|
55
|
+
theme: 'auto',
|
|
56
|
+
prism: { theme: 'tomorrow' },
|
|
57
|
+
mermaid: { theme: 'default' }
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
60
|
+
<script src="https://cdn.jsdelivr.net/npm/ontowave@latest/dist/ontowave.min.js"></script>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 🎨 Support Diagrammes
|
|
64
|
+
|
|
65
|
+
## 📊 Diagram Support
|
|
66
|
+
|
|
67
|
+
### Mermaid Diagrams
|
|
68
|
+
````mermaid
|
|
69
|
+
graph TD
|
|
70
|
+
A[Start] --> B[Process]
|
|
71
|
+
B --> C[End]
|
|
72
|
+
````
|
|
73
|
+
|
|
74
|
+
### Code Highlighting
|
|
75
|
+
```javascript
|
|
76
|
+
// Automatic syntax highlighting with Prism.js
|
|
77
|
+
const config = {
|
|
78
|
+
locales: ['en', 'fr'],
|
|
79
|
+
theme: 'auto'
|
|
80
|
+
};
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 📦 Package Size
|
|
84
|
+
|
|
85
|
+
- **66KB minified** - Complete framework
|
|
86
|
+
- **18KB gzipped** - Optimized delivery
|
|
87
|
+
- **Zero dependencies** - Self-contained
|
|
88
|
+
|
|
89
|
+
## 🔗 Learn More
|
|
90
|
+
|
|
91
|
+
- 📖 **Complete Documentation**: [ontowave.org](https://ontowave.org)
|
|
92
|
+
- 🚀 **Live Examples**: Visit the website for interactive demos
|
|
93
|
+
- 🐛 **Issues & Support**: [GitHub Issues](https://github.com/stephanedenis/OntoWave/issues)
|
|
94
|
+
- 📦 **NPM Package**: [npmjs.com/package/ontowave](https://www.npmjs.com/package/ontowave)
|
|
95
|
+
|
|
96
|
+
## 🌍 Multilingual Support
|
|
97
|
+
|
|
98
|
+
OntoWave includes built-in support for multilingual documentation:
|
|
99
|
+
|
|
100
|
+
- **English/French interface** out of the box
|
|
101
|
+
- **Language switching** with preserved state
|
|
102
|
+
- **Configurable locales** via `OntoWaveConfig`
|
|
103
|
+
|
|
104
|
+
## 🤝 Contributing
|
|
105
|
+
|
|
106
|
+
We welcome contributions! Please visit [ontowave.org](https://ontowave.org) for development guidelines and contribution instructions.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 📄 License
|
|
111
|
+
|
|
112
|
+
Released under CC BY-NC-SA License - see [ontowave.org](https://ontowave.org) for details.
|
|
113
|
+
|
|
114
|
+
**Created by Stéphane Denis** - Making documentation interactive and beautiful! 🌊
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 📦 Taille
|
|
118
|
+
|
|
119
|
+
- **12KB minifié**
|
|
120
|
+
- **4KB gzippé**
|
|
121
|
+
- **Zéro dépendance**
|
|
122
|
+
|
|
123
|
+
## 🔗 Liens Utiles
|
|
124
|
+
|
|
125
|
+
- [Documentation détaillée](README-PACKAGE.md)
|
|
126
|
+
- [GitHub Repository](https://github.com/stephanedenis/OntoWave)
|
|
127
|
+
- [Package NPM](https://www.npmjs.com/package/ontowave)
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🛠️ Développement Local (version complète)
|
|
132
|
+
|
|
133
|
+
Pour contribuer au développement d'OntoWave:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm install
|
|
137
|
+
npm run dev
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Déploiement:**
|
|
141
|
+
```bash
|
|
142
|
+
npm run build
|
|
143
|
+
npm run preview
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Architecture
|
|
147
|
+
|
|
148
|
+
- `dist/ontowave.js`: Package distributable principal
|
|
149
|
+
- `dist/ontowave.min.js`: Version minifiée pour production
|
|
150
|
+
## 📄 License
|
|
151
|
+
|
|
152
|
+
Released under CC BY-NC-SA License - see [ontowave.org](https://ontowave.org) for details.
|
|
153
|
+
|
|
154
|
+
**Created by Stéphane Denis** - Making documentation interactive and beautiful! 🌊
|
|
155
|
+
|
|
156
|
+
### Intégration submodules
|
|
157
|
+
|
|
158
|
+
Publiez/recopiez vos sous-modules vers des répertoires montés comme racines de `config.json` (ex: `RESEARCH/`). L'app les servira tels quels et gérera les liens `.md` → routes `#/…`.
|
|
159
|
+
|
|
160
|
+
### GitHub Pages et DNS
|
|
161
|
+
|
|
162
|
+
1) **Configuration Pages**
|
|
163
|
+
- Repo ➜ Settings ➜ Pages ➜ Build and deployment: Deploy from a branch
|
|
164
|
+
- Branch: `main`, Folder: `/docs`
|
|
165
|
+
- Custom domain: `ontowave.dev` (ou votre domaine)
|
|
166
|
+
|
|
167
|
+
2) **DNS requis côté registrar**
|
|
168
|
+
- Créez des enregistrements A pour l'apex/root:
|
|
169
|
+
- `@` ➜ 185.199.108.153
|
|
170
|
+
- `@` ➜ 185.199.109.153
|
|
171
|
+
- `@` ➜ 185.199.110.153
|
|
172
|
+
- `@` ➜ 185.199.111.153
|
|
173
|
+
- Et/ou un CNAME pour sous-domaine:
|
|
174
|
+
- `www` ➜ `<username>.github.io`
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
**Créé pour simplifier la documentation !** 🌊
|
|
179
|
+
|
|
180
|
+
## Structure
|
|
181
|
+
- `public/config.json`: configuration des racines de contenu (par défaut `content/`).
|
|
182
|
+
- `content/`: vos fichiers Markdown (exemples fournis).
|
|
183
|
+
- `src/`: app Vite (TypeScript), router et rendu Markdown.
|
|
184
|
+
- `tools/build-sitemap.mjs`: génère `public/sitemap.json` en scannant les racines.
|
|
185
|
+
|
|
186
|
+
## Intégration submodules
|
|
187
|
+
Publiez/recopiez vos sous-modules vers des répertoires montés comme racines de `config.json` (ex: `RESEARCH/`). L’app les servira tels quels et gérera les liens `.md` → routes `#/…`.
|
|
188
|
+
|
|
189
|
+
## GitHub Pages et DNS (custom domain)
|
|
190
|
+
|
|
191
|
+
1) Config Pages
|
|
192
|
+
- Repo ➜ Settings ➜ Pages ➜ Build and deployment: Deploy from a branch
|
|
193
|
+
- Branch: `main`, Folder: `/docs`
|
|
194
|
+
- Custom domain: `ontowave.dev` (ou votre domaine). Le fichier `docs/CNAME` est pris en compte.
|
|
195
|
+
|
|
196
|
+
2) DNS requis côté registrar
|
|
197
|
+
- Créez un enregistrement A (si apex/root):
|
|
198
|
+
- `@` ➜ 185.199.108.153
|
|
199
|
+
- `@` ➜ 185.199.109.153
|
|
200
|
+
- `@` ➜ 185.199.110.153
|
|
201
|
+
- `@` ➜ 185.199.111.153
|
|
202
|
+
- Et/ou un CNAME (pour un sous-domaine, ex: `www`):
|
|
203
|
+
- `www` ➜ `<username>.github.io` (ex: `stephanedenis.github.io`)
|
|
204
|
+
|
|
205
|
+
3) HTTPS
|
|
206
|
+
- Dans Settings ➜ Pages, cochez "Enforce HTTPS" après propagation DNS.
|
|
207
|
+
|
|
208
|
+
4) Domaines alternatifs (.net/.com, www)
|
|
209
|
+
- Vous avez indiqué que `ontowawe.net`, `www.ontowave.net`, `ontowave.com` et `www.ontowave.com` pointent en CNAME vers `stephanedenis.github.io`.
|
|
210
|
+
- Pour un domaine canonique unique, ce projet utilise `ontowave.com` (voir `docs/CNAME`).
|
|
211
|
+
- Recommandation: laissez GitHub Pages gérer les redirections HTTPS (une seule entrée CNAME côté Pages). Si besoin, une redirection côté client existe dans `index.html` pour les hôtes alternatifs vers `https://ontowave.com`.
|
|
212
|
+
|
|
213
|
+
5) Validation / état actuel
|
|
214
|
+
- Projet configuré pour produire `docs/` (Vite outDir) et inclut `docs/CNAME` et `docs/.nojekyll`.
|
|
215
|
+
- Reste à faire côté compte GitHub: activer Pages sur `main/docs` et saisir le domaine custom `ontowave.com`.
|
|
216
|
+
- Reste à faire côté registrar: créer les enregistrements A/CNAME ci-dessus vers GitHub Pages.
|
|
217
|
+
|
|
218
|
+
6) Déploiement
|
|
219
|
+
- Chaque push sur `main` met à jour `docs/`; Pages sert la dernière version.
|
|
220
|
+
- Option: ajouter un workflow d’upload artefact si vous souhaitez conserver un build de référence.
|
|
221
|
+
***
|
|
222
|
+
|
|
223
|
+
## Mode sans serveur (file://) — Standalone
|
|
224
|
+
|
|
225
|
+
Ouvrez directement le site depuis un fichier HTML local (sans serveur HTTP):
|
|
226
|
+
|
|
227
|
+
1) Générez la version autonome qui embarque config et contenus:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
npm run build:standalone
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
2) Ouvrez `docs/standalone/index.html` dans le navigateur (schéma `file://`).
|
|
234
|
+
|
|
235
|
+
Notes:
|
|
236
|
+
- Le bundle embarqué (`window.__ONTOWAVE_BUNDLE__`) inclut `public/config.json`, `public/{sitemap.json,nav.yml,pages.txt,search-index.json}` si présents, ainsi que tout `content/`.
|
|
237
|
+
- Le runtime tente d’abord l’accès embarqué, puis retombe sur `fetch` réseau. Ainsi, file:// fonctionne même sans serveur.
|
|
238
|
+
- La recherche avancée nécessite un `search-index.json` préconstruit; sinon, mode minimal (titres).
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
Limitations MVP:
|
|
242
|
+
- Pas d’indexation de recherche (prévue via `sitemap.json` + Web Worker elasticlunr).
|
|
243
|
+
- Sécurité XSS: le contenu est supposé de confiance. Ajoutez DOMPurify si nécessaire.
|
|
244
|
+
|
|
245
|
+
## Recherche (SPA, opt-in)
|
|
246
|
+
|
|
247
|
+
- L’index est inactif par défaut si aucun `search-index.json` n’est présent (à côté d’`index.html`).
|
|
248
|
+
- Activez-le via le panneau « Options » (mini-menu flottant), importez un `pages.txt` (liste de chemins `.md` relatifs aux racines), laissez l’index se construire, puis exportez `search-index.json`.
|
|
249
|
+
- En build, `npm run pageslist` génère automatiquement `public/pages.txt`; vous pouvez ensuite ouvrir le site, activer l’index, puis exporter.
|
|
250
|
+
- La recherche privilégie la langue courante (préfixe `#/fr/` ou `#/en/`), avec repli inter-langue si aucun résultat.
|
|
251
|
+
|
|
252
|
+
### Déploiement « copie statique »
|
|
253
|
+
|
|
254
|
+
Pour un usage sans pipeline (copie d’`index.html` + `assets` + `config.json` + contenus):
|
|
255
|
+
|
|
256
|
+
- Placez `config.json`, `nav.yml` (optionnel) et `sitemap.json`/`pages.txt` à côté d’`index.html`.
|
|
257
|
+
- Si vous ne voulez pas d’indexation en ligne, exportez `search-index.json` depuis le panneau Options et copiez-le avec le site.
|
|
258
|
+
- Optionnel: réduisez l’habillage via `ui` dans `public/config.json`:
|
|
259
|
+
- `"ui": { "minimal": true }` pour masquer header/sidebar/toc/footer.
|
|
260
|
+
- Ou au détail: `header:false`, `sidebar:false`, `toc:false`, `footer:false`, `menu:false`.
|