ontowave 1.0.1-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 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
@@ -0,0 +1,209 @@
1
+ # 🚀 OntoWave - Package de Documentation Interactive
2
+
3
+ **OntoWave** transforme votre documentation en site interactif avec un seul include !
4
+
5
+ ## ⚡ Installation Ultra-Simple
6
+
7
+ ### Via CDN (Recommandé)
8
+
9
+ ```html
10
+ <!DOCTYPE html>
11
+ <html>
12
+ <head><title>Ma Docs</title></head>
13
+ <body>
14
+ <!-- Un seul include suffit ! -->
15
+ <script src="https://cdn.jsdelivr.net/npm/ontowave@latest/dist/ontowave.min.js"></script>
16
+ </body>
17
+ </html>
18
+ ```
19
+
20
+ ### Via NPM
21
+
22
+ ```bash
23
+ npm install ontowave
24
+ ```
25
+
26
+ ## 🎯 Fonctionnalités
27
+
28
+ - ✅ **Zero Config** - Fonctionne immédiatement
29
+ - ✅ **Un seul include** - Pas de dépendances externes
30
+ - ✅ **Mermaid intégré** - Diagrammes automatiques
31
+ - âś… **PlantUML support** - Via serveur public
32
+ - âś… **Navigation hash** - URLs partageables
33
+ - âś… **Responsive design** - Mobile-friendly
34
+ - âś… **Configuration JSON** - Optionnelle et flexible
35
+
36
+ ## 📝 Configuration Optionnelle
37
+
38
+ ```html
39
+ <script type="application/json" id="ontowave-config">
40
+ {
41
+ "title": "Ma Documentation",
42
+ "defaultPage": "index.md",
43
+ "mermaid": { "theme": "default" }
44
+ }
45
+ </script>
46
+ <script src="https://cdn.jsdelivr.net/npm/ontowave@latest/dist/ontowave.min.js"></script>
47
+ ```
48
+
49
+ ## 🎨 Support Diagrammes
50
+
51
+ ### Mermaid
52
+ ```markdown
53
+ ```mermaid
54
+ graph TD
55
+ A --> B
56
+ ```
57
+ ```
58
+
59
+ ### PlantUML
60
+ ```markdown
61
+ ```plantuml
62
+ @startuml
63
+ Alice -> Bob
64
+ @enduml
65
+ ```
66
+ ```
67
+
68
+ ## 📦 Taille
69
+
70
+ - **12KB minifié**
71
+ - **4KB gzippé**
72
+ - **Zéro dépendance**
73
+
74
+ ## đź”— Liens Utiles
75
+
76
+ - [Documentation détaillée](README-PACKAGE.md)
77
+ - [GitHub Repository](https://github.com/stephanedenis/OntoWave)
78
+ - [Package NPM](https://www.npmjs.com/package/ontowave)
79
+
80
+ ---
81
+
82
+ ## 🛠️ Développement Local (version complète)
83
+
84
+ Pour contribuer au développement d'OntoWave:
85
+
86
+ ```bash
87
+ npm install
88
+ npm run dev
89
+ ```
90
+
91
+ **Déploiement:**
92
+ ```bash
93
+ npm run build
94
+ npm run preview
95
+ ```
96
+
97
+ ### Architecture
98
+
99
+ - `dist/ontowave.js`: Package distributable principal
100
+ - `dist/ontowave.min.js`: Version minifiée pour production
101
+ - `example-*.html`: Exemples d'utilisation du package
102
+ - `src/`: Code source de l'application Vite complète
103
+ - `content/`: Fichiers Markdown d'exemple
104
+
105
+ ### Intégration submodules
106
+
107
+ 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 `#/…`.
108
+
109
+ ### GitHub Pages et DNS
110
+
111
+ 1) **Configuration Pages**
112
+ - Repo âžś Settings âžś Pages âžś Build and deployment: Deploy from a branch
113
+ - Branch: `main`, Folder: `/docs`
114
+ - Custom domain: `ontowave.dev` (ou votre domaine)
115
+
116
+ 2) **DNS requis côté registrar**
117
+ - Créez des enregistrements A pour l'apex/root:
118
+ - `@` âžś 185.199.108.153
119
+ - `@` âžś 185.199.109.153
120
+ - `@` âžś 185.199.110.153
121
+ - `@` âžś 185.199.111.153
122
+ - Et/ou un CNAME pour sous-domaine:
123
+ - `www` âžś `<username>.github.io`
124
+
125
+ ---
126
+
127
+ **Créé pour simplifier la documentation !** 🌊
128
+
129
+ ## Structure
130
+ - `public/config.json`: configuration des racines de contenu (par défaut `content/`).
131
+ - `content/`: vos fichiers Markdown (exemples fournis).
132
+ - `src/`: app Vite (TypeScript), router et rendu Markdown.
133
+ - `tools/build-sitemap.mjs`: génère `public/sitemap.json` en scannant les racines.
134
+
135
+ ## Intégration submodules
136
+ 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 `#/…`.
137
+
138
+ ## GitHub Pages et DNS (custom domain)
139
+
140
+ 1) Config Pages
141
+ - Repo âžś Settings âžś Pages âžś Build and deployment: Deploy from a branch
142
+ - Branch: `main`, Folder: `/docs`
143
+ - Custom domain: `ontowave.dev` (ou votre domaine). Le fichier `docs/CNAME` est pris en compte.
144
+
145
+ 2) DNS requis côté registrar
146
+ - Créez un enregistrement A (si apex/root):
147
+ - `@` âžś 185.199.108.153
148
+ - `@` âžś 185.199.109.153
149
+ - `@` âžś 185.199.110.153
150
+ - `@` âžś 185.199.111.153
151
+ - Et/ou un CNAME (pour un sous-domaine, ex: `www`):
152
+ - `www` âžś `<username>.github.io` (ex: `stephanedenis.github.io`)
153
+
154
+ 3) HTTPS
155
+ - Dans Settings ➜ Pages, cochez "Enforce HTTPS" après propagation DNS.
156
+
157
+ 4) Domaines alternatifs (.net/.com, www)
158
+ - Vous avez indiqué que `ontowawe.net`, `www.ontowave.net`, `ontowave.com` et `www.ontowave.com` pointent en CNAME vers `stephanedenis.github.io`.
159
+ - Pour un domaine canonique unique, ce projet utilise `ontowave.com` (voir `docs/CNAME`).
160
+ - 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`.
161
+
162
+ 5) Validation / état actuel
163
+ - Projet configuré pour produire `docs/` (Vite outDir) et inclut `docs/CNAME` et `docs/.nojekyll`.
164
+ - Reste à faire côté compte GitHub: activer Pages sur `main/docs` et saisir le domaine custom `ontowave.com`.
165
+ - Reste à faire côté registrar: créer les enregistrements A/CNAME ci-dessus vers GitHub Pages.
166
+
167
+ 6) Déploiement
168
+ - Chaque push sur `main` met à jour `docs/`; Pages sert la dernière version.
169
+ - Option: ajouter un workflow d’upload artefact si vous souhaitez conserver un build de référence.
170
+ ***
171
+
172
+ ## Mode sans serveur (file://) — Standalone
173
+
174
+ Ouvrez directement le site depuis un fichier HTML local (sans serveur HTTP):
175
+
176
+ 1) Générez la version autonome qui embarque config et contenus:
177
+
178
+ ```bash
179
+ npm run build:standalone
180
+ ```
181
+
182
+ 2) Ouvrez `docs/standalone/index.html` dans le navigateur (schéma `file://`).
183
+
184
+ Notes:
185
+ - 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/`.
186
+ - Le runtime tente d’abord l’accès embarqué, puis retombe sur `fetch` réseau. Ainsi, file:// fonctionne même sans serveur.
187
+ - La recherche avancée nécessite un `search-index.json` préconstruit; sinon, mode minimal (titres).
188
+
189
+
190
+ Limitations MVP:
191
+ - Pas d’indexation de recherche (prévue via `sitemap.json` + Web Worker elasticlunr).
192
+ - Sécurité XSS: le contenu est supposé de confiance. Ajoutez DOMPurify si nécessaire.
193
+
194
+ ## Recherche (SPA, opt-in)
195
+
196
+ - L’index est inactif par défaut si aucun `search-index.json` n’est présent (à côté d’`index.html`).
197
+ - 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`.
198
+ - En build, `npm run pageslist` génère automatiquement `public/pages.txt`; vous pouvez ensuite ouvrir le site, activer l’index, puis exporter.
199
+ - La recherche privilégie la langue courante (préfixe `#/fr/` ou `#/en/`), avec repli inter-langue si aucun résultat.
200
+
201
+ ### Déploiement « copie statique »
202
+
203
+ Pour un usage sans pipeline (copie d’`index.html` + `assets` + `config.json` + contenus):
204
+
205
+ - Placez `config.json`, `nav.yml` (optionnel) et `sitemap.json`/`pages.txt` à côté d’`index.html`.
206
+ - Si vous ne voulez pas d’indexation en ligne, exportez `search-index.json` depuis le panneau Options et copiez-le avec le site.
207
+ - Optionnel: réduisez l’habillage via `ui` dans `public/config.json`:
208
+ - `"ui": { "minimal": true }` pour masquer header/sidebar/toc/footer.
209
+ - Ou au détail: `header:false`, `sidebar:false`, `toc:false`, `footer:false`, `menu:false`.