living-ai-documentation 1.10.0 → 1.11.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.
@@ -37,10 +37,35 @@ const _SNIPPET_TYPE_TO_PANEL = {
37
37
  "heading-4": "heading",
38
38
  };
39
39
 
40
+ const _SNIPPET_ORDERED_LIST_DEFAULT = [
41
+ "Élément 1",
42
+ "Élément 2",
43
+ " Sous-élément 2.1",
44
+ " Sous-élément 2.2",
45
+ "Élément 3",
46
+ " Sous-élément 3.1",
47
+ " Sous-sous-élément 3.1.1",
48
+ ].join("\n");
49
+
50
+ const _SNIPPET_UNORDERED_LIST_DEFAULT = [
51
+ "Élément 1",
52
+ "Élément 2",
53
+ " Sous-élément 2.1",
54
+ " Sous-élément 2.2",
55
+ "Élément 3",
56
+ " Sous-élément 3.1",
57
+ " Sous-sous-élément 3.1.1",
58
+ ].join("\n");
59
+
40
60
  function _snippetPanelForType(type) {
41
61
  return _SNIPPET_TYPE_TO_PANEL[type] || type;
42
62
  }
43
63
 
64
+ function _snippetFillTextareaDefault(id, value) {
65
+ const textarea = document.getElementById(id);
66
+ if (textarea && textarea.value.trim() === "") textarea.value = value;
67
+ }
68
+
44
69
  const _SNIPPET_PICKER_ICONS = {
45
70
  "heading-1": "fa-solid fa-heading",
46
71
  "heading-2": "fa-solid fa-heading",
@@ -1117,7 +1142,20 @@ function snippetTypeChanged() {
1117
1142
  else if (type === "emojis") emojiInit();
1118
1143
  else if (type === "attachment") {
1119
1144
  /* no preview — file picker opens on Insert */
1120
- } else snippetUpdatePreview();
1145
+ } else {
1146
+ if (type === "ordered-list") {
1147
+ _snippetFillTextareaDefault(
1148
+ "snip-ordered-list-content",
1149
+ _SNIPPET_ORDERED_LIST_DEFAULT,
1150
+ );
1151
+ } else if (type === "unordered-list") {
1152
+ _snippetFillTextareaDefault(
1153
+ "snip-unordered-list-content",
1154
+ _SNIPPET_UNORDERED_LIST_DEFAULT,
1155
+ );
1156
+ }
1157
+ snippetUpdatePreview();
1158
+ }
1121
1159
  }
1122
1160
 
1123
1161
  async function snippetDiagInit() {
@@ -1238,15 +1276,7 @@ function buildSnippetMarkdown() {
1238
1276
  case "ordered-list": {
1239
1277
  const content =
1240
1278
  document.getElementById("snip-ordered-list-content").value ||
1241
- [
1242
- "Élément 1",
1243
- "Élément 2",
1244
- " Sous-élément 2.1",
1245
- " Sous-élément 2.2",
1246
- "Élément 3",
1247
- " Sous-élément 3.1",
1248
- " Sous-sous-élément 3.1.1",
1249
- ].join("\n");
1279
+ _SNIPPET_ORDERED_LIST_DEFAULT;
1250
1280
  const countersByIndent = new Map();
1251
1281
  return content
1252
1282
  .split("\n")
@@ -1266,15 +1296,7 @@ function buildSnippetMarkdown() {
1266
1296
  case "unordered-list": {
1267
1297
  const content =
1268
1298
  document.getElementById("snip-unordered-list-content").value ||
1269
- [
1270
- "Élément 1",
1271
- "Élément 2",
1272
- " Sous-élément 2.1",
1273
- " Sous-élément 2.2",
1274
- "Élément 3",
1275
- " Sous-élément 3.1",
1276
- " Sous-sous-élément 3.1.1",
1277
- ].join("\n");
1299
+ _SNIPPET_UNORDERED_LIST_DEFAULT;
1278
1300
  return content
1279
1301
  .split("\n")
1280
1302
  .filter((line) => line.trim())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "living-ai-documentation",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Local Markdown documentation hub with a built-in MCP server — coding agents create ADRs, draw diagrams and detect drift while you code.",
5
5
  "main": "dist/src/server.js",
6
6
  "bin": {