mind-elixir 5.11.1-beta.2 → 5.11.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme/fr.md DELETED
@@ -1,437 +0,0 @@
1
- <p align="center">
2
- <a href="https://docs.mind-elixir.com" target="_blank" rel="noopener noreferrer">
3
- <img width="150" src="https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png" alt="mindelixir logo2">
4
- </a>
5
- <h1 align="center">Mind Elixir</h1>
6
- </p>
7
-
8
- <p align="center">
9
- <a href="https://trendshift.io/repositories/13049" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13049" alt="SSShooter%2Fmind-elixir-core | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
10
- </p>
11
-
12
- <p align="center">
13
- <a href="https://www.npmjs.com/package/mind-elixir">
14
- <img src="https://img.shields.io/npm/v/mind-elixir" alt="version">
15
- </a>
16
- <a href="https://github.com/ssshooter/mind-elixir-core/blob/master/LICENSE">
17
- <img src="https://img.shields.io/npm/l/mind-elixir" alt="license">
18
- </a>
19
- <a href="https://app.codacy.com/gh/ssshooter/mind-elixir-core?utm_source=github.com&utm_medium=referral&utm_content=ssshooter/mind-elixir-core&utm_campaign=Badge_Grade_Settings">
20
- <img src="https://api.codacy.com/project/badge/Grade/09fadec5bf094886b30cea6aabf3a88b" alt="code quality">
21
- </a>
22
- <a href="https://bundlephobia.com/result?p=mind-elixir">
23
- <img src="https://badgen.net/bundlephobia/dependency-count/mind-elixir" alt="dependency-count">
24
- </a>
25
- <a href="https://packagephobia.com/result?p=mind-elixir">
26
- <img src="https://packagephobia.com/badge?p=mind-elixir" alt="package size">
27
- </a>
28
- </p>
29
-
30
- [English](/readme.md) |
31
- [中文](/readme/zh.md) |
32
- [Español](/readme/es.md) |
33
- [Français](/readme/fr.md) |
34
- [Português](/readme/pt.md) |
35
- [Русский](/readme/ru.md) |
36
- [日本語](/readme/ja.md) |
37
- [한국어](/readme/ko.md)
38
-
39
- Mind Elixir est un noyau JavaScript open source pour créer des cartes mentales. Vous pouvez l'utiliser avec n'importe quel framework frontend de votre choix.
40
-
41
- Caractéristiques :
42
-
43
- - Léger
44
- - Haute performance
45
- - Indépendant du framework
46
- - Extensible via plugins
47
- - Plugin intégré pour le glisser-déposer / édition de nœuds
48
- - Export en SVG / PNG / Html
49
- - Résumé des nœuds
50
- - Opérations en masse supportées
51
- - Annuler / Refaire
52
- - Raccourcis efficaces
53
- - Stylisation facile des nœuds avec les variables CSS
54
-
55
- <details>
56
- <summary>Table des matières</summary>
57
-
58
- - [Essayer maintenant](#essayer-maintenant)
59
- - [Playground](#playground)
60
- - [Documentation](#documentation)
61
- - [Utilisation](#utilisation)
62
- - [Installation](#installation)
63
- - [NPM](#npm)
64
- - [Balise script](#balise-script)
65
- - [Initialisation](#initialisation)
66
- - [Structure des données](#structure-des-données)
67
- - [Gestion des événements](#gestion-des-événements)
68
- - [Export et import des données](#export-et-import-des-données)
69
- - [Gardes d'opération](#gardes-dopération)
70
- - [Exporter en image](#exporter-en-image)
71
- - [Solution 1](#solution-1)
72
- - [Solution 2](#solution-2)
73
- - [Thème](#thème)
74
- - [Raccourcis](#raccourcis)
75
- - [Écosystème](#écosystème)
76
- - [Développement](#développement)
77
- - [Remerciements](#remerciements)
78
- - [Contributeurs](#contributeurs)
79
-
80
- </details>
81
-
82
- ## Essayer maintenant
83
-
84
- ![mindelixir](https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/screenshot5_2.jpg)
85
-
86
- https://mind-elixir.com/
87
-
88
- ### Playground
89
-
90
- - Vanilla JS - https://codepen.io/ssshooter/pen/vEOqWjE
91
- - React - https://codesandbox.io/p/devbox/mind-elixir-3-x-react-18-x-forked-f3mtcd
92
- - Vue3 - https://codesandbox.io/p/sandbox/mind-elixir-3-x-vue3-lth484
93
-
94
- ## Documentation
95
-
96
- https://docs.mind-elixir.com/
97
-
98
- ## Utilisation
99
-
100
- ### Installation
101
-
102
- #### NPM
103
-
104
- ```bash
105
- npm i mind-elixir -S
106
- ```
107
-
108
- ```javascript
109
- import MindElixir from 'mind-elixir'
110
- ```
111
-
112
- #### Balise script
113
-
114
- ```html
115
- <script type="module" src="https://cdn.jsdelivr.net/npm/mind-elixir/dist/MindElixir.js"></script>
116
- ```
117
-
118
- Et dans votre fichier CSS :
119
-
120
- ```css
121
- @import 'https://cdn.jsdelivr.net/npm/mind-elixir/dist/style.css';
122
- ```
123
-
124
- ### Initialisation
125
-
126
- ```html
127
- <div id="map"></div>
128
- <style>
129
- #map {
130
- height: 500px;
131
- width: 100%;
132
- }
133
- </style>
134
- ```
135
-
136
- **Changement majeur** depuis la version 1.0.0, `data` doit être passé à `init()`, et non `options`.
137
-
138
- ```javascript
139
- import MindElixir from 'mind-elixir'
140
- import { fr } from 'mind-elixir/i18n'
141
- import example from 'mind-elixir/dist/example1'
142
-
143
- let options = {
144
- el: '#map', // ou HTMLDivElement
145
- direction: MindElixir.LEFT,
146
- draggable: true, // par défaut true
147
- contextMenu: true, // par défaut true
148
- toolBar: true, // par défaut true
149
- keypress: true, // par défaut true
150
- overflowHidden: false, // par défaut false
151
- mouseSelectionButton: 0, // 0 pour le bouton gauche, 2 pour le bouton droit, par défaut 0
152
- contextMenu: {
153
- locale: fr,
154
- focus: true,
155
- link: true,
156
- extend: [
157
- {
158
- name: 'Édition de nœud',
159
- onclick: () => {
160
- alert('menu étendu')
161
- },
162
- },
163
- ],
164
- },
165
- before: {
166
- insertSibling(el, obj) {
167
- return true
168
- },
169
- async addChild(el, obj) {
170
- await sleep()
171
- return true
172
- },
173
- },
174
- }
175
-
176
- let mind = new MindElixir(options)
177
-
178
- mind.install(plugin) // installer votre plugin
179
-
180
- // créer de nouvelles données de carte
181
- const data = MindElixir.new('nouveau sujet')
182
- // ou `example`
183
- // ou les données retournées par `.getData()`
184
- mind.init(data)
185
-
186
- // obtenir un nœud
187
- MindElixir.E('node-id')
188
- ```
189
-
190
- ### Structure des données
191
-
192
- ```javascript
193
- // structure complète des données de nœud jusqu'à présent
194
- const nodeData = {
195
- topic: 'sujet du nœud',
196
- id: 'bd1c24420cd2c2f5',
197
- style: { fontSize: '32', color: '#3298db', background: '#ecf0f1' },
198
- expanded: true,
199
- parent: null,
200
- tags: ['Tag'],
201
- icons: ['😀'],
202
- hyperLink: 'https://github.com/ssshooter/mind-elixir-core',
203
- image: {
204
- url: 'https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png', // requis
205
- // vous devez interroger la hauteur et la largeur de l'image et calculer la valeur appropriée pour afficher l'image
206
- height: 90, // requis
207
- width: 90, // requis
208
- },
209
- children: [
210
- {
211
- topic: 'enfant',
212
- id: 'xxxx',
213
- // ...
214
- },
215
- ],
216
- }
217
- ```
218
-
219
- ### Gestion des événements
220
-
221
- ```javascript
222
- mind.bus.addListener('operation', operation => {
223
- console.log(operation)
224
- // return {
225
- // name: nom de l'action,
226
- // obj: objet cible
227
- // }
228
-
229
- // name: [insertSibling|addChild|removeNode|beginEdit|finishEdit]
230
- // obj: cible
231
-
232
- // name: moveNode
233
- // obj: {from:cible1,to:cible2}
234
- })
235
-
236
- mind.bus.addListener('selectNodes', nodes => {
237
- console.log(nodes)
238
- })
239
-
240
- mind.bus.addListener('expandNode', node => {
241
- console.log('expandNode: ', node)
242
- })
243
- ```
244
-
245
- ### Export et import des données
246
-
247
- ```javascript
248
- // export des données
249
- const data = mind.getData() // objet javascript, voir src/example.js
250
- mind.getDataString() // objet en chaîne
251
-
252
- // import des données
253
- // initialisation
254
- let mind = new MindElixir(options)
255
- mind.init(data)
256
- // mise à jour des données
257
- mind.refresh(data)
258
- ```
259
-
260
- ### Gardes d'opération
261
-
262
- ```javascript
263
- let mind = new MindElixir({
264
- // ...
265
- before: {
266
- insertSibling(el, obj) {
267
- console.log(el, obj)
268
- if (this.currentNode.nodeObj.parent.root) {
269
- return false
270
- }
271
- return true
272
- },
273
- async addChild(el, obj) {
274
- await sleep()
275
- if (this.currentNode.nodeObj.parent.root) {
276
- return false
277
- }
278
- return true
279
- },
280
- },
281
- })
282
- ```
283
-
284
- ## Exporter en image
285
-
286
- ### Solution 1
287
-
288
- ```typescript
289
- const mind = {
290
- /** instance mind elixir */
291
- }
292
- const downloadPng = async () => {
293
- const blob = await mind.exportPng() // Obtenez un Blob !
294
- if (!blob) return
295
- const url = URL.createObjectURL(blob)
296
- const a = document.createElement('a')
297
- a.href = url
298
- a.download = 'filename.png'
299
- a.click()
300
- URL.revokeObjectURL(url)
301
- }
302
- ```
303
-
304
- ### Solution 2
305
-
306
- Installer `@ssshooter/modern-screenshot`, puis :
307
-
308
- ```typescript
309
- import { domToPng } from '@ssshooter/modern-screenshot'
310
-
311
- const download = async () => {
312
- const dataUrl = await domToPng(mind.nodes, {
313
- onCloneNode: node => {
314
- const n = node as HTMLDivElement
315
- n.style.position = ''
316
- n.style.top = ''
317
- n.style.left = ''
318
- n.style.bottom = ''
319
- n.style.right = ''
320
- },
321
- padding: 300,
322
- quality: 1,
323
- })
324
- const link = document.createElement('a')
325
- link.download = 'screenshot.png'
326
- link.href = dataUrl
327
- link.click()
328
- }
329
- ```
330
-
331
- ## Thème
332
-
333
- ```javascript
334
- const options = {
335
- // ...
336
- theme: {
337
- name: 'Dark',
338
- // palette de couleurs des lignes principales
339
- palette: ['#848FA0', '#748BE9', '#D2F9FE', '#4145A5', '#789AFA', '#706CF4', '#EF987F', '#775DD5', '#FCEECF', '#DA7FBC'],
340
- // remplacer les variables css
341
- cssVar: {
342
- '--main-color': '#ffffff',
343
- '--main-bgcolor': '#4c4f69',
344
- '--color': '#cccccc',
345
- '--bgcolor': '#252526',
346
- '--panel-color': '255, 255, 255',
347
- '--panel-bgcolor': '45, 55, 72',
348
- },
349
- // toutes les variables voir /src/index.less
350
- },
351
- // ...
352
- }
353
-
354
- // ...
355
-
356
- mind.changeTheme({
357
- name: 'Latte',
358
- palette: ['#dd7878', '#ea76cb', '#8839ef', '#e64553', '#fe640b', '#df8e1d', '#40a02b', '#209fb5', '#1e66f5', '#7287fd'],
359
- cssVar: {
360
- '--main-color': '#444446',
361
- '--main-bgcolor': '#ffffff',
362
- '--color': '#777777',
363
- '--bgcolor': '#f6f6f6',
364
- },
365
- })
366
- ```
367
-
368
- Soyez conscient que Mind Elixir n'observera pas le changement de `prefers-color-scheme`. Veuillez changer le thème **manuellement** lorsque le schéma change.
369
-
370
- ## Raccourcis
371
-
372
- | Raccourci | Fonction |
373
- | ------------------ | ------------------------------------------- |
374
- | Entrée | Insérer un nœud frère |
375
- | Tab | Insérer un nœud enfant |
376
- | F1 | Centrer la carte |
377
- | F2 | Commencer l'édition du nœud actuel |
378
- | ↑ | Sélectionner le nœud frère précédent |
379
- | ↓ | Sélectionner le nœud frère suivant |
380
- | ← / → | Sélectionner le parent ou le premier enfant |
381
- | PageUp / Alt + ↑ | Déplacer le nœud vers le haut |
382
- | PageDown / Alt + ↓ | Déplacer le nœud vers le bas |
383
- | Ctrl + ↑ | Changer la disposition en mode latéral |
384
- | Ctrl + ← | Changer la disposition vers la gauche |
385
- | Ctrl + → | Changer la disposition vers la droite |
386
- | Ctrl + C | Copier le nœud actuel |
387
- | Ctrl + V | Coller le nœud copié |
388
- | Ctrl + "+" | Zoomer la carte mentale |
389
- | Ctrl + "-" | Dézoomer la carte mentale |
390
- | Ctrl + 0 | Réinitialiser le niveau de zoom |
391
-
392
- ## Écosystème
393
-
394
- - [@mind-elixir/node-menu](https://github.com/ssshooter/node-menu)
395
- - [@mind-elixir/node-menu-neo](https://github.com/ssshooter/node-menu-neo)
396
- - [@mind-elixir/export-xmind](https://github.com/ssshooter/export-xmind)
397
- - [@mind-elixir/export-html](https://github.com/ssshooter/export-html)
398
- - [mind-elixir-react](https://github.com/ssshooter/mind-elixir-react)
399
-
400
- Les PRs sont les bienvenues !
401
-
402
- ## Développement
403
-
404
- ```
405
- pnpm i
406
- pnpm dev
407
- ```
408
-
409
- Tester les fichiers générés avec `dev.dist.ts` :
410
-
411
- ```
412
- pnpm build
413
- pnpm link ./
414
- ```
415
-
416
- Mettre à jour la documentation :
417
-
418
- ```
419
- # Installer api-extractor
420
- pnpm install -g @microsoft/api-extractor
421
- # Maintenir /src/docs.ts
422
- # Générer la documentation
423
- pnpm doc
424
- pnpm doc:md
425
- ```
426
-
427
- ## Remerciements
428
-
429
- - [@viselect/vanilla](https://github.com/simonwep/selection/tree/master/packages/vanilla)
430
-
431
- ## Contributeurs
432
-
433
- Merci pour vos contributions à Mind Elixir ! Votre soutien et votre dévouement rendent ce projet meilleur.
434
-
435
- <a href="https://github.com/SSShooter/mind-elixir-core/graphs/contributors">
436
- <img src="https://contrib.rocks/image?repo=SSShooter/mind-elixir-core" />
437
- </a>