living-documentation 7.9.0 โ 7.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.
- package/dist/src/frontend/confirm-modal.js +73 -0
- package/dist/src/frontend/documents.js +88 -103
- package/dist/src/frontend/files-modal.js +243 -0
- package/dist/src/frontend/i18n/en.json +51 -16
- package/dist/src/frontend/i18n/fr.json +51 -16
- package/dist/src/frontend/index.html +110 -2
- package/dist/src/frontend/search.js +45 -8
- package/dist/src/frontend/snippets.js +481 -0
- package/dist/src/lib/metadata.d.ts.map +1 -1
- package/dist/src/lib/metadata.js +5 -9
- package/dist/src/lib/metadata.js.map +1 -1
- package/dist/src/routes/documents.d.ts.map +1 -1
- package/dist/src/routes/documents.js +34 -3
- package/dist/src/routes/documents.js.map +1 -1
- package/dist/src/routes/files.d.ts.map +1 -1
- package/dist/src/routes/files.js +100 -0
- package/dist/src/routes/files.js.map +1 -1
- package/dist/starting-doc/1_tutorial/2026_04_11_13_25_[General]_crer_vos_dossiers.md +1 -1
- package/package.json +1 -1
|
@@ -19,9 +19,487 @@ const _SNIPPET_PANELS = [
|
|
|
19
19
|
"diagram",
|
|
20
20
|
"colored-section",
|
|
21
21
|
"colored-text",
|
|
22
|
+
"emojis",
|
|
22
23
|
"attachment",
|
|
23
24
|
];
|
|
24
25
|
|
|
26
|
+
// Each emoji has search tags (bilingual FR/EN, space-separated, lowercase).
|
|
27
|
+
// Filter matches a 2+ char query against any tag prefix or substring.
|
|
28
|
+
const _EMOJI_CATEGORIES = [
|
|
29
|
+
{ label: 'snippet.emoji_cat_smileys', emojis: [
|
|
30
|
+
{ e: '๐', t: 'grin grinning smile sourire happy heureux' },
|
|
31
|
+
{ e: '๐', t: 'smiley joy joie sourire happy' },
|
|
32
|
+
{ e: '๐', t: 'smile sourire happy heureux joie' },
|
|
33
|
+
{ e: '๐', t: 'beaming grin sourire dents' },
|
|
34
|
+
{ e: '๐', t: 'laugh rire lol' },
|
|
35
|
+
{ e: '๐
', t: 'sweat transpire rire nerveux' },
|
|
36
|
+
{ e: '๐คฃ', t: 'rofl lol mdr rire' },
|
|
37
|
+
{ e: '๐', t: 'joy larmes tears rire lol' },
|
|
38
|
+
{ e: '๐', t: 'slight smile sourire' },
|
|
39
|
+
{ e: '๐', t: 'upside renverse inverse' },
|
|
40
|
+
{ e: '๐', t: 'wink clin oeil' },
|
|
41
|
+
{ e: '๐', t: 'blush rougir sourire' },
|
|
42
|
+
{ e: '๐', t: 'angel ange halo innocent' },
|
|
43
|
+
{ e: '๐ฅฐ', t: 'love amour coeur heart smile' },
|
|
44
|
+
{ e: '๐', t: 'heart eyes amoureux love amour' },
|
|
45
|
+
{ e: '๐คฉ', t: 'star stars etoile wow' },
|
|
46
|
+
{ e: '๐', t: 'kiss bisou' },
|
|
47
|
+
{ e: '๐', t: 'yum miam savoureux langue' },
|
|
48
|
+
{ e: '๐', t: 'tongue langue' },
|
|
49
|
+
{ e: '๐', t: 'wink tongue langue clin' },
|
|
50
|
+
{ e: '๐คช', t: 'crazy fou zany' },
|
|
51
|
+
{ e: '๐', t: 'tongue langue squinting' },
|
|
52
|
+
{ e: '๐ค', t: 'hug calin embrasser' },
|
|
53
|
+
{ e: '๐ค', t: 'think reflexion reflechir pense' },
|
|
54
|
+
{ e: '๐คจ', t: 'raised brow sourcil suspicious' },
|
|
55
|
+
{ e: '๐', t: 'neutral neutre' },
|
|
56
|
+
{ e: '๐', t: 'expressionless impassible' },
|
|
57
|
+
{ e: '๐', t: 'unamused decu blase' },
|
|
58
|
+
{ e: '๐', t: 'roll eyes yeux ciel' },
|
|
59
|
+
{ e: '๐ฌ', t: 'grimace' },
|
|
60
|
+
{ e: '๐', t: 'relieved soulage' },
|
|
61
|
+
{ e: '๐', t: 'pensive pensif triste sad' },
|
|
62
|
+
{ e: '๐ช', t: 'sleepy sommeil fatigue' },
|
|
63
|
+
{ e: '๐ด', t: 'sleep dormir zzz' },
|
|
64
|
+
{ e: '๐คค', t: 'drool bave' },
|
|
65
|
+
{ e: '๐ท', t: 'mask masque malade' },
|
|
66
|
+
{ e: '๐ค', t: 'sick malade fever fievre' },
|
|
67
|
+
{ e: '๐ค', t: 'hurt blesse bandage' },
|
|
68
|
+
{ e: '๐คข', t: 'nausea nausee' },
|
|
69
|
+
{ e: '๐คฎ', t: 'vomit vomir malade' },
|
|
70
|
+
{ e: '๐คง', t: 'sneeze eternue rhume' },
|
|
71
|
+
{ e: '๐ฅต', t: 'hot chaud transpire' },
|
|
72
|
+
{ e: '๐ฅถ', t: 'cold froid gele' },
|
|
73
|
+
{ e: '๐ฅด', t: 'woozy ivre' },
|
|
74
|
+
{ e: '๐ต', t: 'dizzy dead mort vertige' },
|
|
75
|
+
{ e: '๐คฏ', t: 'explode tete mind blown' },
|
|
76
|
+
{ e: '๐ค ', t: 'cowboy chapeau' },
|
|
77
|
+
{ e: '๐ฅณ', t: 'party fete anniversaire birthday' },
|
|
78
|
+
{ e: '๐', t: 'cool sunglasses lunettes' },
|
|
79
|
+
{ e: '๐ค', t: 'nerd geek' },
|
|
80
|
+
{ e: '๐ง', t: 'monocle curious' },
|
|
81
|
+
{ e: '๐', t: 'confused confus' },
|
|
82
|
+
{ e: '๐', t: 'worried inquiet' },
|
|
83
|
+
{ e: '๐', t: 'frown triste' },
|
|
84
|
+
{ e: 'โน๏ธ', t: 'sad triste frown' },
|
|
85
|
+
{ e: '๐ฎ', t: 'surprised surpris open mouth' },
|
|
86
|
+
{ e: '๐ฏ', t: 'hushed' },
|
|
87
|
+
{ e: '๐ฒ', t: 'astonished etonne' },
|
|
88
|
+
{ e: '๐ณ', t: 'flushed gene rougeur' },
|
|
89
|
+
{ e: '๐ฅบ', t: 'pleading supplier chien' },
|
|
90
|
+
{ e: '๐ฆ', t: 'frown open mouth' },
|
|
91
|
+
{ e: '๐ง', t: 'anguish angoisse' },
|
|
92
|
+
{ e: '๐จ', t: 'fear peur' },
|
|
93
|
+
{ e: '๐ฐ', t: 'anxious anxieux stress' },
|
|
94
|
+
{ e: '๐ฅ', t: 'sad disappointed decu' },
|
|
95
|
+
{ e: '๐ข', t: 'cry pleurer larme' },
|
|
96
|
+
{ e: '๐ญ', t: 'cry pleurer loud bawling' },
|
|
97
|
+
{ e: '๐ฑ', t: 'scream cri peur horror' },
|
|
98
|
+
{ e: '๐', t: 'confounded' },
|
|
99
|
+
{ e: '๐ฃ', t: 'persevere effort' },
|
|
100
|
+
{ e: '๐', t: 'disappointed decu' },
|
|
101
|
+
{ e: '๐', t: 'sweat transpire fatigue' },
|
|
102
|
+
{ e: '๐ฉ', t: 'weary fatigue las' },
|
|
103
|
+
{ e: '๐ซ', t: 'tired fatigue' },
|
|
104
|
+
{ e: '๐ฅฑ', t: 'yawn baille' },
|
|
105
|
+
{ e: '๐ค', t: 'triumph huff vapeur nez' },
|
|
106
|
+
{ e: '๐ ', t: 'angry colere fache' },
|
|
107
|
+
{ e: '๐ก', t: 'rage colere rouge' },
|
|
108
|
+
{ e: '๐คฌ', t: 'curse insulte jure' },
|
|
109
|
+
{ e: '๐', t: 'devil diable smiling' },
|
|
110
|
+
{ e: '๐ฟ', t: 'imp diable' },
|
|
111
|
+
{ e: '๐', t: 'skull mort death crane' },
|
|
112
|
+
{ e: 'โ ๏ธ', t: 'crossbones pirate mort death' },
|
|
113
|
+
{ e: '๐ฉ', t: 'poop caca merde' },
|
|
114
|
+
{ e: '๐คก', t: 'clown' },
|
|
115
|
+
{ e: '๐ป', t: 'ghost fantome' },
|
|
116
|
+
{ e: '๐ฝ', t: 'alien extraterrestre' },
|
|
117
|
+
{ e: '๐ค', t: 'robot ia ai' },
|
|
118
|
+
{ e: '๐', t: 'pumpkin halloween citrouille' },
|
|
119
|
+
{ e: '๐บ', t: 'cat chat' },
|
|
120
|
+
{ e: '๐ธ', t: 'cat chat grin' },
|
|
121
|
+
{ e: '๐น', t: 'cat chat joy' },
|
|
122
|
+
{ e: '๐ป', t: 'cat chat love amour heart' },
|
|
123
|
+
{ e: '๐ผ', t: 'cat chat wry' },
|
|
124
|
+
{ e: '๐ฝ', t: 'cat chat kiss' },
|
|
125
|
+
{ e: '๐', t: 'cat chat fear peur' },
|
|
126
|
+
{ e: '๐ฟ', t: 'cat chat cry pleurer' },
|
|
127
|
+
{ e: '๐พ', t: 'cat chat angry colere' },
|
|
128
|
+
]},
|
|
129
|
+
{ label: 'snippet.emoji_cat_gestures', emojis: [
|
|
130
|
+
{ e: '๐', t: 'thumbs up pouce ok bien like' },
|
|
131
|
+
{ e: '๐', t: 'thumbs down pouce bas dislike' },
|
|
132
|
+
{ e: '๐', t: 'ok parfait' },
|
|
133
|
+
{ e: 'โ๏ธ', t: 'victory victoire peace paix' },
|
|
134
|
+
{ e: '๐ค', t: 'fingers crossed doigts croises' },
|
|
135
|
+
{ e: '๐ค', t: 'love you' },
|
|
136
|
+
{ e: '๐ค', t: 'rock horns metal cornes' },
|
|
137
|
+
{ e: '๐ค', t: 'call appelle hang loose' },
|
|
138
|
+
{ e: '๐', t: 'left gauche pointing' },
|
|
139
|
+
{ e: '๐', t: 'right droite pointing' },
|
|
140
|
+
{ e: '๐', t: 'up haut pointing' },
|
|
141
|
+
{ e: '๐', t: 'down bas pointing' },
|
|
142
|
+
{ e: 'โ๏ธ', t: 'one index up haut' },
|
|
143
|
+
{ e: 'โ', t: 'stop hand main raised' },
|
|
144
|
+
{ e: '๐ค', t: 'back hand main' },
|
|
145
|
+
{ e: '๐๏ธ', t: 'hand main splayed' },
|
|
146
|
+
{ e: '๐', t: 'vulcan spock star trek' },
|
|
147
|
+
{ e: '๐', t: 'wave bonjour hello salut goodbye' },
|
|
148
|
+
{ e: '๐ค', t: 'handshake accord deal poignee' },
|
|
149
|
+
{ e: '๐', t: 'pray priere merci thanks please' },
|
|
150
|
+
{ e: '๐ช', t: 'muscle fort biceps strong' },
|
|
151
|
+
{ e: '๐ฆพ', t: 'mechanical arm bras prothese' },
|
|
152
|
+
{ e: '๐', t: 'clap applaud bravo applaudir' },
|
|
153
|
+
{ e: '๐', t: 'raise hands hourra celebrate' },
|
|
154
|
+
{ e: '๐', t: 'open hands' },
|
|
155
|
+
{ e: '๐คฒ', t: 'palms up paumes' },
|
|
156
|
+
{ e: '๐ค', t: 'fist poing right' },
|
|
157
|
+
{ e: '๐ค', t: 'fist poing left' },
|
|
158
|
+
{ e: 'โ', t: 'fist poing leve' },
|
|
159
|
+
{ e: '๐', t: 'fist punch poing frapper' },
|
|
160
|
+
{ e: '๐ค', t: 'pinch petit small' },
|
|
161
|
+
{ e: '๐ค', t: 'italian pinched' },
|
|
162
|
+
{ e: '๐', t: 'middle finger doigt honneur' },
|
|
163
|
+
{ e: 'โ๏ธ', t: 'write ecrire hand main' },
|
|
164
|
+
{ e: '๐ฆถ', t: 'foot pied' },
|
|
165
|
+
{ e: '๐ฆต', t: 'leg jambe' },
|
|
166
|
+
{ e: '๐', t: 'ear oreille' },
|
|
167
|
+
{ e: '๐ฆป', t: 'ear hearing appareil auditif' },
|
|
168
|
+
{ e: '๐', t: 'nose nez' },
|
|
169
|
+
{ e: '๐ง ', t: 'brain cerveau mind' },
|
|
170
|
+
{ e: '๐', t: 'eyes yeux regarder' },
|
|
171
|
+
{ e: '๐๏ธ', t: 'eye oeil' },
|
|
172
|
+
{ e: '๐', t: 'mouth bouche' },
|
|
173
|
+
{ e: '๐
', t: 'tongue langue' },
|
|
174
|
+
{ e: '๐ฆท', t: 'tooth dent' },
|
|
175
|
+
{ e: '๐ซ', t: 'heart anatomic coeur organe' },
|
|
176
|
+
{ e: '๐ซ', t: 'lungs poumons' },
|
|
177
|
+
]},
|
|
178
|
+
{ label: 'snippet.emoji_cat_hearts', emojis: [
|
|
179
|
+
{ e: 'โค๏ธ', t: 'heart coeur red rouge love amour' },
|
|
180
|
+
{ e: '๐งก', t: 'orange heart coeur' },
|
|
181
|
+
{ e: '๐', t: 'yellow heart coeur jaune' },
|
|
182
|
+
{ e: '๐', t: 'green heart coeur vert' },
|
|
183
|
+
{ e: '๐', t: 'blue heart coeur bleu' },
|
|
184
|
+
{ e: '๐', t: 'purple heart coeur violet' },
|
|
185
|
+
{ e: '๐ค', t: 'black heart coeur noir' },
|
|
186
|
+
{ e: '๐ค', t: 'white heart coeur blanc' },
|
|
187
|
+
{ e: '๐ค', t: 'brown heart coeur marron' },
|
|
188
|
+
{ e: '๐', t: 'broken heart coeur brise rupture' },
|
|
189
|
+
{ e: 'โค๏ธโ๐ฅ', t: 'heart fire feu passion' },
|
|
190
|
+
{ e: 'โค๏ธโ๐ฉน', t: 'heart mending coeur reparation' },
|
|
191
|
+
{ e: '๐', t: 'sparkling heart coeur brillant' },
|
|
192
|
+
{ e: '๐', t: 'two hearts coeurs' },
|
|
193
|
+
{ e: '๐', t: 'arrow heart cupid cupidon' },
|
|
194
|
+
{ e: '๐', t: 'ribbon heart cadeau' },
|
|
195
|
+
{ e: '๐', t: 'revolving hearts coeurs' },
|
|
196
|
+
{ e: '๐', t: 'heart decoration' },
|
|
197
|
+
{ e: '๐', t: 'love letter lettre enveloppe' },
|
|
198
|
+
{ e: '๐', t: 'kiss mark bisou levres' },
|
|
199
|
+
{ e: 'โฃ๏ธ', t: 'heart exclamation' },
|
|
200
|
+
{ e: '๐ฏ', t: 'hundred 100 cent perfect parfait' },
|
|
201
|
+
{ e: 'โจ', t: 'sparkles etincelles magic magique brillant' },
|
|
202
|
+
{ e: 'โญ', t: 'star etoile' },
|
|
203
|
+
{ e: '๐', t: 'glowing star etoile' },
|
|
204
|
+
{ e: '๐ซ', t: 'dizzy star vertige etoile' },
|
|
205
|
+
{ e: '๐ฅ', t: 'fire feu hot flamme' },
|
|
206
|
+
{ e: '๐ฅ', t: 'boom explosion collision' },
|
|
207
|
+
{ e: 'โก', t: 'lightning eclair thunder tonnerre fast' },
|
|
208
|
+
{ e: '๐ข', t: 'anger colere symbol' },
|
|
209
|
+
{ e: '๐จ', t: 'dash vent wind fast vitesse' },
|
|
210
|
+
{ e: '๐ฆ', t: 'drops gouttes sweat eau' },
|
|
211
|
+
{ e: '๐ค', t: 'zzz sleep dormir sommeil' },
|
|
212
|
+
{ e: '๐ณ๏ธ', t: 'hole trou' },
|
|
213
|
+
{ e: '๐ญ', t: 'thought pensee bulle' },
|
|
214
|
+
{ e: '๐ฏ๏ธ', t: 'right anger bubble' },
|
|
215
|
+
{ e: '๐ฌ', t: 'speech bulle dialogue chat' },
|
|
216
|
+
]},
|
|
217
|
+
{ label: 'snippet.emoji_cat_objects', emojis: [
|
|
218
|
+
{ e: '๐ป', t: 'laptop ordinateur computer portable' },
|
|
219
|
+
{ e: '๐ฅ๏ธ', t: 'desktop computer ordinateur bureau' },
|
|
220
|
+
{ e: 'โจ๏ธ', t: 'keyboard clavier' },
|
|
221
|
+
{ e: '๐ฑ๏ธ', t: 'mouse souris' },
|
|
222
|
+
{ e: '๐พ', t: 'floppy disquette save sauvegarder' },
|
|
223
|
+
{ e: '๐ฟ', t: 'disk cd optical' },
|
|
224
|
+
{ e: '๐', t: 'dvd' },
|
|
225
|
+
{ e: '๐ฑ', t: 'phone mobile telephone smartphone' },
|
|
226
|
+
{ e: '๐ฒ', t: 'phone call mobile incoming' },
|
|
227
|
+
{ e: 'โ๏ธ', t: 'telephone vintage' },
|
|
228
|
+
{ e: '๐', t: 'receiver combine phone' },
|
|
229
|
+
{ e: '๐', t: 'pager' },
|
|
230
|
+
{ e: '๐ ', t: 'fax' },
|
|
231
|
+
{ e: '๐', t: 'battery batterie pile' },
|
|
232
|
+
{ e: '๐', t: 'plug prise electrique' },
|
|
233
|
+
{ e: '๐ก', t: 'bulb idee idea light lumiere ampoule' },
|
|
234
|
+
{ e: '๐ฆ', t: 'flashlight torche lampe' },
|
|
235
|
+
{ e: '๐ฏ๏ธ', t: 'candle bougie' },
|
|
236
|
+
{ e: '๐ท', t: 'camera appareil photo' },
|
|
237
|
+
{ e: '๐ธ', t: 'camera flash photo' },
|
|
238
|
+
{ e: '๐น', t: 'video camera' },
|
|
239
|
+
{ e: '๐ฅ', t: 'movie film cinema camera' },
|
|
240
|
+
{ e: '๐๏ธ', t: 'film reel pellicule' },
|
|
241
|
+
{ e: '๐ฝ๏ธ', t: 'projector projecteur' },
|
|
242
|
+
{ e: 'โฐ', t: 'alarm reveil clock horloge' },
|
|
243
|
+
{ e: 'โฑ๏ธ', t: 'stopwatch chrono chronometre' },
|
|
244
|
+
{ e: 'โฒ๏ธ', t: 'timer minuteur' },
|
|
245
|
+
{ e: '๐ฐ๏ธ', t: 'mantel clock horloge' },
|
|
246
|
+
{ e: 'โ', t: 'hourglass sablier done' },
|
|
247
|
+
{ e: 'โณ', t: 'hourglass sablier flow running' },
|
|
248
|
+
{ e: '๐ก', t: 'satellite antenne' },
|
|
249
|
+
{ e: '๐ญ', t: 'telescope astronomie' },
|
|
250
|
+
{ e: '๐ฌ', t: 'microscope science' },
|
|
251
|
+
{ e: '๐', t: 'pill pilule medicine medicament' },
|
|
252
|
+
{ e: '๐', t: 'syringe seringue injection vaccin' },
|
|
253
|
+
{ e: '๐ฉน', t: 'bandage pansement' },
|
|
254
|
+
{ e: '๐ฉบ', t: 'stethoscope medecin' },
|
|
255
|
+
{ e: '๐งช', t: 'tube eprouvette chimie chemistry' },
|
|
256
|
+
{ e: '๐งฌ', t: 'dna adn gene' },
|
|
257
|
+
{ e: '๐', t: 'search magnify loupe rechercher find left' },
|
|
258
|
+
{ e: '๐', t: 'search magnify loupe rechercher find right' },
|
|
259
|
+
{ e: '๐๏ธ', t: 'key cle old' },
|
|
260
|
+
{ e: '๐', t: 'key cle' },
|
|
261
|
+
{ e: '๐', t: 'lock key cle cadenas' },
|
|
262
|
+
{ e: '๐', t: 'lock cadenas verrouille secure' },
|
|
263
|
+
{ e: '๐', t: 'unlock cadenas ouvert' },
|
|
264
|
+
{ e: '๐ก๏ธ', t: 'shield bouclier protection' },
|
|
265
|
+
{ e: '๐จ', t: 'hammer marteau' },
|
|
266
|
+
{ e: 'โ๏ธ', t: 'tools outils hammer pick' },
|
|
267
|
+
{ e: '๐ ๏ธ', t: 'tools outils hammer wrench' },
|
|
268
|
+
{ e: '๐ง', t: 'wrench cle anglaise' },
|
|
269
|
+
{ e: '๐ฉ', t: 'nut bolt ecrou' },
|
|
270
|
+
{ e: 'โ๏ธ', t: 'gear settings parametres engrenage config' },
|
|
271
|
+
{ e: '๐ช', t: 'screwdriver tournevis' },
|
|
272
|
+
{ e: '๐ช', t: 'hook crochet' },
|
|
273
|
+
{ e: '๐งฐ', t: 'toolbox caisse outils' },
|
|
274
|
+
{ e: '๐งฒ', t: 'magnet aimant' },
|
|
275
|
+
{ e: '๐งฑ', t: 'brick brique' },
|
|
276
|
+
{ e: 'โ๏ธ', t: 'pick pioche' },
|
|
277
|
+
{ e: '๐ช', t: 'axe hache' },
|
|
278
|
+
]},
|
|
279
|
+
{ label: 'snippet.emoji_cat_office', emojis: [
|
|
280
|
+
{ e: '๐', t: 'memo note ecrire write' },
|
|
281
|
+
{ e: 'โ๏ธ', t: 'pencil crayon' },
|
|
282
|
+
{ e: '๐๏ธ', t: 'pen stylo bille' },
|
|
283
|
+
{ e: '๐๏ธ', t: 'fountain pen stylo plume' },
|
|
284
|
+
{ e: '๐๏ธ', t: 'paintbrush pinceau' },
|
|
285
|
+
{ e: '๐๏ธ', t: 'crayon feutre' },
|
|
286
|
+
{ e: '๐', t: 'triangle ruler equerre' },
|
|
287
|
+
{ e: '๐', t: 'ruler regle' },
|
|
288
|
+
{ e: '๐', t: 'paperclip trombone attach' },
|
|
289
|
+
{ e: '๐๏ธ', t: 'linked paperclips trombones' },
|
|
290
|
+
{ e: '๐', t: 'pushpin punaise' },
|
|
291
|
+
{ e: '๐', t: 'pin location lieu' },
|
|
292
|
+
{ e: 'โ๏ธ', t: 'scissors ciseaux cut couper' },
|
|
293
|
+
{ e: '๐๏ธ', t: 'card index dividers onglets' },
|
|
294
|
+
{ e: '๐', t: 'folder dossier' },
|
|
295
|
+
{ e: '๐', t: 'open folder dossier ouvert' },
|
|
296
|
+
{ e: '๐๏ธ', t: 'card box boite fiches' },
|
|
297
|
+
{ e: '๐๏ธ', t: 'file cabinet archive armoire' },
|
|
298
|
+
{ e: '๐', t: 'clipboard presse papier' },
|
|
299
|
+
{ e: '๐', t: 'page curl document' },
|
|
300
|
+
{ e: '๐', t: 'document page' },
|
|
301
|
+
{ e: '๐', t: 'scroll parchemin' },
|
|
302
|
+
{ e: '๐ฐ', t: 'newspaper journal presse' },
|
|
303
|
+
{ e: '๐๏ธ', t: 'rolled newspaper journal' },
|
|
304
|
+
{ e: '๐', t: 'notebook carnet cahier' },
|
|
305
|
+
{ e: '๐', t: 'notebook decorated carnet' },
|
|
306
|
+
{ e: '๐', t: 'ledger registre' },
|
|
307
|
+
{ e: '๐', t: 'book rouge red ferme' },
|
|
308
|
+
{ e: '๐', t: 'book vert green' },
|
|
309
|
+
{ e: '๐', t: 'book bleu blue' },
|
|
310
|
+
{ e: '๐', t: 'book orange' },
|
|
311
|
+
{ e: '๐', t: 'books livres bibliotheque' },
|
|
312
|
+
{ e: '๐', t: 'open book livre ouvert' },
|
|
313
|
+
{ e: '๐', t: 'bookmark marque page signet' },
|
|
314
|
+
{ e: '๐ท๏ธ', t: 'label tag etiquette' },
|
|
315
|
+
{ e: '๐ผ', t: 'briefcase mallette attache case business' },
|
|
316
|
+
{ e: '๐๏ธ', t: 'spiral note notepad' },
|
|
317
|
+
{ e: '๐๏ธ', t: 'spiral calendar calendrier' },
|
|
318
|
+
{ e: '๐
', t: 'calendar calendrier date' },
|
|
319
|
+
{ e: '๐', t: 'tear off calendar calendrier' },
|
|
320
|
+
{ e: '๐๏ธ', t: 'trash poubelle delete supprimer can' },
|
|
321
|
+
{ e: '๐ชฃ', t: 'bucket seau' },
|
|
322
|
+
{ e: '๐ฆ', t: 'package colis box boite' },
|
|
323
|
+
{ e: '๐ซ', t: 'mailbox boite lettres closed flag up' },
|
|
324
|
+
{ e: '๐ช', t: 'mailbox boite lettres closed flag down' },
|
|
325
|
+
{ e: '๐ฌ', t: 'mailbox open boite lettres flag up' },
|
|
326
|
+
{ e: '๐ญ', t: 'mailbox open boite lettres flag down' },
|
|
327
|
+
{ e: '๐ฎ', t: 'postbox boite aux lettres' },
|
|
328
|
+
{ e: 'โ๏ธ', t: 'envelope enveloppe' },
|
|
329
|
+
{ e: '๐ง', t: 'email courriel mail at' },
|
|
330
|
+
{ e: '๐จ', t: 'email incoming recu' },
|
|
331
|
+
{ e: '๐ฉ', t: 'email arrow envoi' },
|
|
332
|
+
{ e: '๐ค', t: 'outbox envoyer sent' },
|
|
333
|
+
{ e: '๐ฅ', t: 'inbox recevoir' },
|
|
334
|
+
{ e: '๐', t: 'bar chart graphique barres histogramme' },
|
|
335
|
+
{ e: '๐', t: 'chart up tendance hausse croissance' },
|
|
336
|
+
{ e: '๐', t: 'chart down baisse decroissance' },
|
|
337
|
+
]},
|
|
338
|
+
{ label: 'snippet.emoji_cat_symbols', emojis: [
|
|
339
|
+
{ e: '๐', t: 'new nouveau nouvelle brand fresh neuf' },
|
|
340
|
+
{ e: 'โป๏ธ', t: 'existing existant existante recycle recycler reuse reutiliser' },
|
|
341
|
+
{ e: 'โ
', t: 'check ok valide coche green' },
|
|
342
|
+
{ e: 'โ๏ธ', t: 'check ballot case' },
|
|
343
|
+
{ e: 'โ๏ธ', t: 'check coche mark' },
|
|
344
|
+
{ e: 'โ', t: 'cross error erreur red rouge croix ko' },
|
|
345
|
+
{ e: 'โ๏ธ', t: 'multiply multiplier cross' },
|
|
346
|
+
{ e: 'โ', t: 'cross square button' },
|
|
347
|
+
{ e: 'โ ๏ธ', t: 'warning attention danger' },
|
|
348
|
+
{ e: 'โน๏ธ', t: 'info information' },
|
|
349
|
+
{ e: 'โ', t: 'question red interrogation' },
|
|
350
|
+
{ e: 'โ', t: 'question white interrogation' },
|
|
351
|
+
{ e: 'โ', t: 'exclamation important red' },
|
|
352
|
+
{ e: 'โ', t: 'exclamation white' },
|
|
353
|
+
{ e: 'โผ๏ธ', t: 'double exclamation' },
|
|
354
|
+
{ e: 'โ๏ธ', t: 'exclamation question' },
|
|
355
|
+
{ e: '๐', t: 'rocket fusee launch lancer' },
|
|
356
|
+
{ e: '๐', t: 'party popper tada fete celebration' },
|
|
357
|
+
{ e: '๐', t: 'confetti ball fete' },
|
|
358
|
+
{ e: '๐', t: 'trophy trophee winner' },
|
|
359
|
+
{ e: '๐ฅ', t: 'gold medal medaille or first' },
|
|
360
|
+
{ e: '๐ฅ', t: 'silver medal medaille argent second' },
|
|
361
|
+
{ e: '๐ฅ', t: 'bronze medal medaille third' },
|
|
362
|
+
{ e: '๐
', t: 'medal medaille sports' },
|
|
363
|
+
{ e: '๐๏ธ', t: 'military medal medaille' },
|
|
364
|
+
{ e: '๐ฏ', t: 'target cible dart' },
|
|
365
|
+
{ e: '๐', t: 'gift cadeau present' },
|
|
366
|
+
{ e: '๐', t: 'bell cloche notify notification' },
|
|
367
|
+
{ e: '๐', t: 'bell off muted silence' },
|
|
368
|
+
{ e: '๐ข', t: 'loudspeaker annonce public' },
|
|
369
|
+
{ e: '๐ฃ', t: 'megaphone porte voix' },
|
|
370
|
+
{ e: '๐ฏ', t: 'postal horn cor' },
|
|
371
|
+
{ e: 'โ', t: 'plus add heavy' },
|
|
372
|
+
{ e: 'โ', t: 'minus moins heavy' },
|
|
373
|
+
{ e: 'โ', t: 'divide division' },
|
|
374
|
+
{ e: 'โพ๏ธ', t: 'infinity infini' },
|
|
375
|
+
{ e: '๐ฒ', t: 'dollar sign dollars money argent' },
|
|
376
|
+
{ e: '๐ฑ', t: 'currency exchange change devise' },
|
|
377
|
+
{ e: 'ยฉ๏ธ', t: 'copyright' },
|
|
378
|
+
{ e: 'ยฎ๏ธ', t: 'registered' },
|
|
379
|
+
{ e: 'โข๏ธ', t: 'trademark marque' },
|
|
380
|
+
{ e: 'โ๏ธ', t: 'left right arrow fleche horizontal' },
|
|
381
|
+
{ e: 'โ๏ธ', t: 'up down arrow fleche vertical' },
|
|
382
|
+
{ e: 'โ๏ธ', t: 'up left arrow fleche' },
|
|
383
|
+
{ e: 'โ๏ธ', t: 'up right arrow fleche' },
|
|
384
|
+
{ e: 'โ๏ธ', t: 'down right arrow fleche' },
|
|
385
|
+
{ e: 'โ๏ธ', t: 'down left arrow fleche' },
|
|
386
|
+
{ e: 'โฌ
๏ธ', t: 'left arrow fleche gauche' },
|
|
387
|
+
{ e: 'โก๏ธ', t: 'right arrow fleche droite' },
|
|
388
|
+
{ e: 'โฌ๏ธ', t: 'up arrow fleche haut' },
|
|
389
|
+
{ e: 'โฌ๏ธ', t: 'down arrow fleche bas' },
|
|
390
|
+
{ e: '๐', t: 'clockwise vertical arrows' },
|
|
391
|
+
{ e: '๐', t: 'counterclockwise arrows reload refresh recharger' },
|
|
392
|
+
{ e: '๐', t: 'repeat loop boucle' },
|
|
393
|
+
{ e: '๐', t: 'repeat single once' },
|
|
394
|
+
{ e: '๐', t: 'shuffle melange random' },
|
|
395
|
+
{ e: '๐ผ', t: 'up button triangle' },
|
|
396
|
+
{ e: '๐ฝ', t: 'down button triangle' },
|
|
397
|
+
{ e: 'โซ', t: 'fast up double triangle' },
|
|
398
|
+
{ e: 'โฌ', t: 'fast down double triangle' },
|
|
399
|
+
{ e: 'โช', t: 'rewind back' },
|
|
400
|
+
{ e: 'โฉ', t: 'fast forward avance' },
|
|
401
|
+
{ e: 'โญ๏ธ', t: 'next track suivant' },
|
|
402
|
+
{ e: 'โฎ๏ธ', t: 'previous track precedent' },
|
|
403
|
+
{ e: 'โฏ๏ธ', t: 'play pause' },
|
|
404
|
+
{ e: 'โถ๏ธ', t: 'play lecture' },
|
|
405
|
+
{ e: 'โธ๏ธ', t: 'pause' },
|
|
406
|
+
{ e: 'โน๏ธ', t: 'stop' },
|
|
407
|
+
{ e: 'โบ๏ธ', t: 'record enregistrer' },
|
|
408
|
+
{ e: 'โ๏ธ', t: 'eject ejecter' },
|
|
409
|
+
{ e: '๐ต', t: 'music note musique' },
|
|
410
|
+
{ e: '๐ถ', t: 'music notes musique' },
|
|
411
|
+
{ e: '๐', t: 'speaker low bas' },
|
|
412
|
+
{ e: '๐', t: 'speaker medium moyen' },
|
|
413
|
+
{ e: '๐', t: 'speaker loud fort haut son sound' },
|
|
414
|
+
{ e: '๐', t: 'muted mute silence' },
|
|
415
|
+
{ e: '๐ถ', t: 'signal antenne bars' },
|
|
416
|
+
{ e: '๐', t: 'wireless wifi' },
|
|
417
|
+
{ e: '๐', t: 'link lien chain' },
|
|
418
|
+
{ e: 'โ๏ธ', t: 'chains chaine' },
|
|
419
|
+
{ e: '๐', t: 'finish flag checkered fin arrivee' },
|
|
420
|
+
{ e: '๐ฉ', t: 'flag drapeau triangular' },
|
|
421
|
+
{ e: '๐ณ๏ธ', t: 'white flag drapeau blanc' },
|
|
422
|
+
{ e: '๐ด', t: 'black flag drapeau noir' },
|
|
423
|
+
{ e: '๐ณ๏ธโ๐', t: 'rainbow lgbt pride drapeau arc en ciel' },
|
|
424
|
+
{ e: '๐ณ๏ธโโง๏ธ', t: 'trans drapeau transgender' },
|
|
425
|
+
{ e: '๐ดโโ ๏ธ', t: 'pirate drapeau jolly roger' },
|
|
426
|
+
]},
|
|
427
|
+
];
|
|
428
|
+
|
|
429
|
+
let _emojiGridWired = false;
|
|
430
|
+
|
|
431
|
+
function _emojiBtnHtml(item) {
|
|
432
|
+
return `<button type="button" data-emoji="${item.e}" title="${item.t.split(' ').slice(0, 3).join(', ')}" class="emoji-btn w-7 h-7 text-lg rounded hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center justify-center">${item.e}</button>`;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function _renderEmojiCategories() {
|
|
436
|
+
return _EMOJI_CATEGORIES.map((cat) => `
|
|
437
|
+
<div>
|
|
438
|
+
<div class="text-xs font-semibold text-gray-500 dark:text-gray-400 mb-1 px-1">${window.t(cat.label)}</div>
|
|
439
|
+
<div class="flex flex-wrap gap-1">
|
|
440
|
+
${cat.emojis.map(_emojiBtnHtml).join('')}
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
`).join('');
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function _renderEmojiSearch(query) {
|
|
447
|
+
const q = query.toLowerCase().trim();
|
|
448
|
+
const matches = [];
|
|
449
|
+
for (const cat of _EMOJI_CATEGORIES) {
|
|
450
|
+
for (const item of cat.emojis) {
|
|
451
|
+
if (item.t.includes(q) || item.e === query) matches.push(item);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
if (matches.length === 0) {
|
|
455
|
+
return `<div class="text-xs text-gray-400 dark:text-gray-600 px-1 py-2">${window.t('snippet.emoji_no_results')}</div>`;
|
|
456
|
+
}
|
|
457
|
+
return `<div class="flex flex-wrap gap-1">${matches.map(_emojiBtnHtml).join('')}</div>`;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function emojiInit() {
|
|
461
|
+
const grid = document.getElementById('snip-emoji-grid');
|
|
462
|
+
if (!grid) return;
|
|
463
|
+
grid.innerHTML = _renderEmojiCategories();
|
|
464
|
+
|
|
465
|
+
if (!_emojiGridWired) {
|
|
466
|
+
grid.addEventListener('click', (e) => {
|
|
467
|
+
const btn = e.target.closest('.emoji-btn');
|
|
468
|
+
if (btn && btn.dataset.emoji) emojiAppend(btn.dataset.emoji);
|
|
469
|
+
});
|
|
470
|
+
const searchInput = document.getElementById('snip-emoji-search');
|
|
471
|
+
if (searchInput) {
|
|
472
|
+
searchInput.addEventListener('input', (e) => emojiFilter(e.target.value));
|
|
473
|
+
}
|
|
474
|
+
_emojiGridWired = true;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const searchInput = document.getElementById('snip-emoji-search');
|
|
478
|
+
if (searchInput) searchInput.value = '';
|
|
479
|
+
snippetUpdatePreview();
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
function emojiFilter(query) {
|
|
483
|
+
const grid = document.getElementById('snip-emoji-grid');
|
|
484
|
+
if (!grid) return;
|
|
485
|
+
const q = (query || '').trim();
|
|
486
|
+
grid.innerHTML = q.length < 2 ? _renderEmojiCategories() : _renderEmojiSearch(q);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function emojiAppend(emoji) {
|
|
490
|
+
const input = document.getElementById('snip-emoji-string');
|
|
491
|
+
if (!input) return;
|
|
492
|
+
input.value += emoji;
|
|
493
|
+
snippetUpdatePreview();
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function emojiClear() {
|
|
497
|
+
const input = document.getElementById('snip-emoji-string');
|
|
498
|
+
if (!input) return;
|
|
499
|
+
input.value = '';
|
|
500
|
+
snippetUpdatePreview();
|
|
501
|
+
}
|
|
502
|
+
|
|
25
503
|
const _COLOR_SWATCHES = {
|
|
26
504
|
info: { bg: "#eff6ff", border: "#3b82f6", text: "#1e3a5f" },
|
|
27
505
|
success: { bg: "#f0fdf4", border: "#22c55e", text: "#14532d" },
|
|
@@ -226,6 +704,7 @@ function snippetTypeChanged() {
|
|
|
226
704
|
if (type === "table") tableInit();
|
|
227
705
|
else if (type === "tree") treeInit();
|
|
228
706
|
else if (type === "diagram") snippetDiagInit();
|
|
707
|
+
else if (type === "emojis") emojiInit();
|
|
229
708
|
else if (type === "attachment") {
|
|
230
709
|
/* no preview โ file picker opens on Insert */
|
|
231
710
|
} else snippetUpdatePreview();
|
|
@@ -410,6 +889,8 @@ function buildSnippetMarkdown() {
|
|
|
410
889
|
const content = document.getElementById("snip-colored-content").value || window.t('snippet.colored_section_content_placeholder');
|
|
411
890
|
return `<div style="background:${c.bg};border-left:4px solid ${c.border};color:${c.text};padding:1rem 1.25rem;border-radius:0.375rem;margin:1rem 0;">\n\n${content}\n\n</div>`;
|
|
412
891
|
}
|
|
892
|
+
case "emojis":
|
|
893
|
+
return document.getElementById("snip-emoji-string").value;
|
|
413
894
|
default:
|
|
414
895
|
return "";
|
|
415
896
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/lib/metadata.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAA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AE,aAAa,EAAE,GACvB,IAAI,CAKN"}
|
package/dist/src/lib/metadata.js
CHANGED
|
@@ -71,27 +71,23 @@ function classifyEntry(entry, sourceRoot) {
|
|
|
71
71
|
status,
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
//
|
|
74
|
+
// accuracy = unchanged / total. Each entry is an assertion that the doc is in
|
|
75
|
+
// sync with a source file; modified or missing both break that assertion.
|
|
75
76
|
function buildReport(entries, sourceRoot) {
|
|
76
77
|
const items = entries.map((e) => classifyEntry(e, sourceRoot));
|
|
77
78
|
const total = items.length;
|
|
78
79
|
let unchanged = 0;
|
|
79
80
|
let modified = 0;
|
|
80
81
|
let missing = 0;
|
|
81
|
-
let weight = 0;
|
|
82
82
|
for (const it of items) {
|
|
83
83
|
if (it.status === "unchanged")
|
|
84
84
|
unchanged++;
|
|
85
|
-
else if (it.status === "modified")
|
|
85
|
+
else if (it.status === "modified")
|
|
86
86
|
modified++;
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
87
|
+
else
|
|
90
88
|
missing++;
|
|
91
|
-
weight += 3;
|
|
92
|
-
}
|
|
93
89
|
}
|
|
94
|
-
const accuracy = total === 0 ? 1 :
|
|
90
|
+
const accuracy = total === 0 ? 1 : unchanged / total;
|
|
95
91
|
return { items, total, unchanged, modified, missing, accuracy };
|
|
96
92
|
}
|
|
97
93
|
function getDocEntries(docsPath, docId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/lib/metadata.ts"],"names":[],"mappings":";;;;;AAgCA,oCAEC;AAED,8CAQC;AAED,gDASC;AAED,8CAOC;AAED,sDAaC;AAED,sCAsBC;
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/lib/metadata.ts"],"names":[],"mappings":";;;;;AAgCA,oCAEC;AAED,8CAQC;AAED,gDASC;AAED,8CAOC;AAED,sDAaC;AAED,sCAsBC;AAID,kCAgBC;AA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AK,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/routes/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,SAAS,CAAC;AAIpD,OAAO,EAAiB,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/routes/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,SAAS,CAAC;AAIpD,OAAO,EAAiB,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ3D,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAcrE;AAED,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,EAChB,UAAU,GAAE,MAAM,EAAO,EACzB,eAAe,CAAC,EAAE,MAAM,GACvB,WAAW,EAAE,CA+Bf;AAwBD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9E;AAeD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKxD;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBtD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA+TxD"}
|
|
@@ -15,6 +15,8 @@ const path_1 = __importDefault(require("path"));
|
|
|
15
15
|
const marked_1 = require("marked");
|
|
16
16
|
const parser_1 = require("../lib/parser");
|
|
17
17
|
const config_1 = require("../lib/config");
|
|
18
|
+
const metadata_1 = require("../lib/metadata");
|
|
19
|
+
const METADATA_SEARCH_PREFIX = "metadata://";
|
|
18
20
|
const RESERVED_DOCS_SUBFOLDERS = new Set(["files", "images"]);
|
|
19
21
|
function collectMdFiles(dir, baseDir) {
|
|
20
22
|
const results = [];
|
|
@@ -135,11 +137,40 @@ function documentsRouter(docsPath) {
|
|
|
135
137
|
res.status(500).json({ error: "Failed to list documents" });
|
|
136
138
|
}
|
|
137
139
|
});
|
|
138
|
-
// GET /api/documents/search?q=query โ full-text search
|
|
140
|
+
// GET /api/documents/search?q=query โ full-text search. When the query
|
|
141
|
+
// starts with `metadata://<basename>`, return docs whose metadata references
|
|
142
|
+
// a source file with that basename (e.g. a file in DOCS_FOLDER/files/).
|
|
139
143
|
router.get("/search", (req, res) => {
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
144
|
+
const rawQuery = (req.query.q ?? "").trim();
|
|
145
|
+
if (!rawQuery)
|
|
142
146
|
return res.json([]);
|
|
147
|
+
if (rawQuery.toLowerCase().startsWith(METADATA_SEARCH_PREFIX)) {
|
|
148
|
+
const needle = rawQuery.slice(METADATA_SEARCH_PREFIX.length).trim();
|
|
149
|
+
if (!needle)
|
|
150
|
+
return res.json([]);
|
|
151
|
+
try {
|
|
152
|
+
const { extraFiles = [], filenamePattern } = (0, config_1.readConfig)(docsPath);
|
|
153
|
+
const docs = listDocs(docsPath, extraFiles, filenamePattern);
|
|
154
|
+
const store = (0, metadata_1.readMetadataStore)(docsPath);
|
|
155
|
+
const matchingIds = new Set();
|
|
156
|
+
for (const [docId, entries] of Object.entries(store)) {
|
|
157
|
+
for (const entry of entries) {
|
|
158
|
+
if (path_1.default.basename(entry.path) === needle) {
|
|
159
|
+
matchingIds.add(docId);
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const results = docs
|
|
165
|
+
.filter((d) => matchingIds.has(decodeURIComponent(d.id)))
|
|
166
|
+
.map((d) => ({ ...d, excerpt: `โณ ${needle}` }));
|
|
167
|
+
return res.json(results);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return res.status(500).json({ error: "Metadata search failed" });
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const query = rawQuery.toLowerCase();
|
|
143
174
|
try {
|
|
144
175
|
const { extraFiles = [], filenamePattern } = (0, config_1.readConfig)(docsPath);
|
|
145
176
|
const docs = listDocs(docsPath, extraFiles, filenamePattern);
|