doc-survival-kit 1.0.0 → 2.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/diagram.html CHANGED
@@ -42,8 +42,29 @@
42
42
  </svg>
43
43
  </button>
44
44
  <button class="diagram-tool" id="toolCloud" onclick="setTool('cloud')" data-i18n-title="diag_tool_cloud">
45
- <svg width="16" height="14" viewBox="0 0 16 14" fill="none" stroke="currentColor" stroke-width="1.5">
46
- <ellipse cx="8" cy="7" rx="7" ry="6"/>
45
+ <svg width="18" height="11" viewBox="0 0 18 11" fill="none" stroke="currentColor" stroke-width="1.5">
46
+ <ellipse cx="9" cy="5.5" rx="8" ry="5"/>
47
+ </svg>
48
+ </button>
49
+ <button class="diagram-tool" id="toolNuage" onclick="setTool('nuage')" data-i18n-title="diag_tool_nuage">
50
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
51
+ <path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383m.653.757c-.757.653-1.153 1.44-1.153 2.056v.448l-.445.049C2.064 6.805 1 7.952 1 9.318 1 10.785 2.23 12 3.781 12h8.906C13.98 12 15 10.988 15 9.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 4.825 10.328 3 8 3a4.53 4.53 0 0 0-2.941 1.1z"/>
52
+ </svg>
53
+ </button>
54
+ <button class="diagram-tool" id="toolActor" onclick="setTool('actor')" data-i18n-title="diag_tool_actor">
55
+ <svg width="14" height="18" viewBox="0 0 14 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
56
+ <circle cx="7" cy="3" r="2.5"/>
57
+ <line x1="7" y1="5.5" x2="7" y2="11"/>
58
+ <line x1="2" y1="8" x2="12" y2="8"/>
59
+ <line x1="7" y1="11" x2="3" y2="16"/>
60
+ <line x1="7" y1="11" x2="11" y2="16"/>
61
+ </svg>
62
+ </button>
63
+ <button class="diagram-tool" id="toolTable" onclick="setTool('table')" data-i18n-title="diag_tool_table">
64
+ <svg width="16" height="14" viewBox="0 0 16 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
65
+ <rect x="1" y="1" width="14" height="12" rx="1"/>
66
+ <line x1="1" y1="7" x2="15" y2="7"/>
67
+ <line x1="8" y1="1" x2="8" y2="13"/>
47
68
  </svg>
48
69
  </button>
49
70
  <button class="diagram-tool" id="toolText" onclick="setTool('text')" data-i18n-title="diag_tool_text">T</button>
@@ -70,6 +91,12 @@
70
91
  <path d="M4 7V4.5a3 3 0 0 1 6 0"/>
71
92
  </svg>
72
93
  </button>
94
+ <!-- Retour au diagramme précédent -->
95
+ <button class="diagram-tool diagram-back-btn" id="btnDiagBack" onclick="goBackDiagram()" title="Retour au diagramme précédent" style="display:none">
96
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
97
+ <path d="M9 2 L3 7 L9 12"/>
98
+ </svg>
99
+ </button>
73
100
  <span class="diagram-sep">|</span>
74
101
 
75
102
  <!-- Titre (prend l'espace restant) -->
@@ -105,8 +132,9 @@
105
132
  <button class="color-dot t-sky" onclick="setShapeColor('t-sky')"></button>
106
133
  <button class="color-dot t-rose" onclick="setShapeColor('t-rose')"></button>
107
134
  <button class="color-dot t-teal" onclick="setShapeColor('t-teal')"></button>
135
+ <button class="color-dot t-white" onclick="setShapeColor('t-white')"></button>
108
136
  <span style="width:1px;background:#e7e5e4;margin:0 4px;align-self:stretch;"></span>
109
- <button class="diagram-color-edit" onclick="startTextEdit(selectedId)" data-i18n-title="diag_edit_text">✎</button>
137
+ <button id="btnEditText" class="diagram-color-edit" onclick="startTextEdit(selectedId)" data-i18n-title="diag_edit_text">✎</button>
110
138
  <span style="width:1px;background:#e7e5e4;margin:0 4px;align-self:stretch;"></span>
111
139
  <button class="diagram-color-edit diagram-color-font" onclick="changeShapeFontSize(1)" title="Agrandir la police">Aa+</button>
112
140
  <button class="diagram-color-edit diagram-color-font" onclick="changeShapeFontSize(-1)" title="Réduire la police">Aa−</button>
@@ -165,6 +193,40 @@
165
193
  <path d="M7 2 Q11 6 11 9 A4 4 0 0 1 3 9 Q3 6 7 2 Z"/>
166
194
  </svg>
167
195
  </button>
196
+ <span style="width:1px;background:#e7e5e4;margin:0 4px;align-self:stretch;"></span>
197
+ <button class="diagram-color-edit" id="btnRotateLeft" onclick="rotateShape(-15)" title="Rotation antihoraire (−15°)">
198
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
199
+ <path d="M4 7A4 4 0 1 0 10 3 L5 3"/>
200
+ <polyline points="7,1.5 5,3 7,4.5"/>
201
+ </svg>
202
+ </button>
203
+ <button class="diagram-color-edit" id="btnRotateRight" onclick="rotateShape(15)" title="Rotation horaire (+15°)">
204
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
205
+ <path d="M10 7A4 4 0 1 1 4 3 L9 3"/>
206
+ <polyline points="7,1.5 9,3 7,4.5"/>
207
+ </svg>
208
+ </button>
209
+ <span style="width:1px;background:#e7e5e4;margin:0 4px;align-self:stretch;"></span>
210
+ <button class="diagram-color-edit" id="btnOrderBack" onclick="changeShapeOrder(-1)" title="Reculer d'un niveau">
211
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
212
+ <rect x="1" y="5" width="8" height="8" rx="1"/>
213
+ <rect x="5" y="1" width="8" height="8" rx="1" stroke-opacity="0.35"/>
214
+ </svg>
215
+ </button>
216
+ <button class="diagram-color-edit" id="btnOrderFront" onclick="changeShapeOrder(1)" title="Avancer d'un niveau">
217
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
218
+ <rect x="1" y="5" width="8" height="8" rx="1" stroke-opacity="0.35"/>
219
+ <rect x="5" y="1" width="8" height="8" rx="1"/>
220
+ </svg>
221
+ </button>
222
+ <span style="width:1px;background:#e7e5e4;margin:0 4px;align-self:stretch;"></span>
223
+ <button class="diagram-color-edit" id="btnShapeLink" onclick="toggleShapeLink()" title="Lier à un diagramme enfant" style="display:none">
224
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
225
+ <path d="M5.5 9.5H4a3 3 0 0 1 0-6h1.5"/>
226
+ <path d="M8.5 4.5H10a3 3 0 0 1 0 6H8.5"/>
227
+ <line x1="4.5" y1="7" x2="9.5" y2="7"/>
228
+ </svg>
229
+ </button>
168
230
  </div>
169
231
 
170
232
  <!-- Canvas SVG -->
@@ -225,6 +287,33 @@
225
287
  </div>
226
288
  </div>
227
289
 
290
+ <!-- Boutons overlay tableau (positionnés par JS sur le canvas) -->
291
+ <button id="tcBtnAddCol" onclick="addTableCol()" title="Ajouter une colonne"
292
+ style="display:none;position:fixed;z-index:150;width:22px;height:22px;cursor:pointer;
293
+ border:1px solid #d6d3d1;border-radius:4px;background:rgba(255,255,255,0.95);
294
+ box-shadow:0 1px 3px rgba(0,0,0,0.12);font-size:.85rem;color:#57534e;padding:0;
295
+ align-items:center;justify-content:center;">+</button>
296
+ <button id="tcBtnRemoveCol" onclick="removeTableCol()" title="Supprimer la dernière colonne"
297
+ style="display:none;position:fixed;z-index:150;width:22px;height:22px;cursor:pointer;
298
+ border:1px solid #d6d3d1;border-radius:4px;background:rgba(255,255,255,0.95);
299
+ box-shadow:0 1px 3px rgba(0,0,0,0.12);font-size:.85rem;color:#57534e;padding:0;
300
+ align-items:center;justify-content:center;">−</button>
301
+ <button id="tcBtnAddRow" onclick="addTableRow()" title="Ajouter une ligne"
302
+ style="display:none;position:fixed;z-index:150;width:22px;height:22px;cursor:pointer;
303
+ border:1px solid #d6d3d1;border-radius:4px;background:rgba(255,255,255,0.95);
304
+ box-shadow:0 1px 3px rgba(0,0,0,0.12);font-size:.85rem;color:#57534e;padding:0;
305
+ align-items:center;justify-content:center;">+</button>
306
+ <button id="tcBtnRemoveRow" onclick="removeTableRow()" title="Supprimer la dernière ligne"
307
+ style="display:none;position:fixed;z-index:150;width:22px;height:22px;cursor:pointer;
308
+ border:1px solid #d6d3d1;border-radius:4px;background:rgba(255,255,255,0.95);
309
+ box-shadow:0 1px 3px rgba(0,0,0,0.12);font-size:.85rem;color:#57534e;padding:0;
310
+ align-items:center;justify-content:center;">−</button>
311
+
312
+ <!-- Panneau de sélection de lien -->
313
+ <div id="linkPickerPanel" style="display:none;position:fixed;z-index:300;background:#fff;border:1px solid #e7e5e4;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,0.12);min-width:180px;max-width:260px;overflow:hidden;">
314
+ <div id="linkPickerList" style="max-height:200px;overflow-y:auto;"></div>
315
+ </div>
316
+
228
317
  <script src="i18n/fr.js"></script>
229
318
  <script src="i18n/en.js"></script>
230
319
  <script src="i18n/i18n.js"></script>