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.
@@ -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,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAQjE;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,aAAa,GACnB,IAAI,CAMN;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAA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AAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAQjE;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,aAAa,GACnB,IAAI,CAMN;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO1D;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAUR;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,MAAM,GACjB,YAAY,CAmBd;AAID,wBAAgB,WAAW,CACzB,OAAO,EAAE,aAAa,EAAE,EACxB,UAAU,EAAE,MAAM,GACjB,cAAc,CAahB;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,aAAa,EAAE,CAGjB;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,aAAa,EAAE,GACvB,IAAI,CAKN"}
@@ -71,27 +71,23 @@ function classifyEntry(entry, sourceRoot) {
71
71
  status,
72
72
  };
73
73
  }
74
- // Weighted ratio: missing = 3, modified = 1, unchanged = 0. accuracy = 1 - sum/(3*total)
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
- weight += 1;
88
- }
89
- else {
87
+ else
90
88
  missing++;
91
- weight += 3;
92
- }
93
89
  }
94
- const accuracy = total === 0 ? 1 : 1 - weight / (total * 3);
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;AAGD,kCAsBC;AAED,sCAMC;AAED,sCASC;AAnJD,4CAAoB;AACpB,gDAAwB;AACxB,qCAAsC;AACtC,iCAAoC;AA2BpC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAE3C,SAAgB,YAAY,CAAC,QAAgB;IAC3C,OAAO,cAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,MAAM,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAgB,EAChB,KAAoB;IAEpB,YAAE,CAAC,aAAa,CACd,YAAY,CAAC,QAAQ,CAAC,EACtB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAC9B,OAAO,CACR,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,mBAAU,E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G,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,CAkSxD"}
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 query = (req.query.q ?? "").toLowerCase().trim();
141
- if (!query)
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);