File size: 12,261 Bytes
c0e9d84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
from __future__ import annotations

__all__ = [
    "ICONS",
    "DEFAULT_ICON_UNICODE",
    "ICON_DOCUMENT_IDS",
    "ICON_CATEGORIES",
    "document_id_for",
]


_VS16 = "\ufe0f"
_ICON_ROWS = [
    # ── navigation
    ("back", "navigation", 0x25C0, True),
    ("next", "navigation", 0x27A1, True),
    ("prev", "navigation", 0x2B05, True),
    ("up", "navigation", 0x2B06, True),
    ("down", "navigation", 0x2B07, True),
    ("home", "navigation", 0x1F3E0, False),
    ("top", "navigation", 0x1F51D, False),
    ("reply", "navigation", 0x21A9, True),
    ("forward", "navigation", 0x21AA, True),
    ("refresh", "navigation", 0x1F504, False),
    ("compass", "navigation", 0x1F9ED, False),
    ("up_left", "navigation", 0x2196, True),
    ("up_right", "navigation", 0x2197, True),
    ("down_right", "navigation", 0x2198, True),
    ("down_left", "navigation", 0x2199, True),
    ("left_right", "navigation", 0x2194, True),
    ("up_down", "navigation", 0x2195, True),
    ("undo", "navigation", 0x21B6, True),
    ("redo", "navigation", 0x21B7, True),
    ("target", "navigation", 0x1F3AF, False),
    ("anchor", "navigation", 0x2693, True),
    ("map", "navigation", 0x1F5FA, True),
    ("airplane", "navigation", 0x2708, True),
    # ── media controls
    ("play", "media", 0x25B6, True),
    ("pause", "media", 0x23F8, True),
    ("stop", "media", 0x23F9, True),
    ("play_pause", "media", 0x23EF, True),
    ("next_track", "media", 0x23ED, True),
    ("prev_track", "media", 0x23EE, True),
    ("fast_forward", "media", 0x23E9, True),
    ("fast_rewind", "media", 0x23EA, True),
    ("shuffle", "media", 0x1F500, False),
    ("repeat", "media", 0x1F501, False),
    ("volume_up", "media", 0x1F50A, False),
    ("volume_down", "media", 0x1F509, False),
    ("mute", "media", 0x1F507, False),
    ("microphone", "media", 0x1F3A4, False),
    ("headphones", "media", 0x1F3A7, False),
    ("music", "media", 0x1F3B5, False),
    ("camera", "media", 0x1F4F7, False),
    ("video", "media", 0x1F3A5, False),
    ("joystick", "media", 0x1F579, True),
    ("record", "media", 0x23FA, True),
    ("eject", "media", 0x23CF, True),
    ("clapper", "media", 0x1F3AC, False),
    ("guitar", "media", 0x1F3B8, False),
    ("speaker", "media", 0x1F508, False),
    ("disc", "media", 0x1F4BF, False),
    # ── files & folders
    ("folder", "files", 0x1F4C1, False),
    ("file", "files", 0x1F4C4, False),
    ("page", "files", 0x1F4C3, False),
    ("archive", "files", 0x1F5C4, True),
    ("trash", "files", 0x1F5D1, True),
    ("paperclip", "files", 0x1F4CE, False),
    ("bookmark", "files", 0x1F516, False),
    ("books", "files", 0x1F4DA, False),
    ("calendar", "files", 0x1F4C5, False),
    ("clock", "files", 0x23F0, True),
    ("hourglass", "files", 0x23F3, True),
    ("save", "files", 0x1F4BE, False),
    ("inbox", "files", 0x1F4E5, False),
    ("outbox", "files", 0x1F4E4, False),
    ("image", "files", 0x1F5BC, True),
    ("printer", "files", 0x1F5A8, True),
    ("notepad", "files", 0x1F5D2, True),
    ("briefcase", "files", 0x1F4BC, False),
    ("package", "files", 0x1F4E6, False),
    ("newspaper", "files", 0x1F4F0, False),
    ("scroll", "files", 0x1F4DC, False),
    ("open_book", "files", 0x1F4D6, False),
    ("closed_book", "files", 0x1F4D5, False),
    ("notebook", "files", 0x1F4D3, False),
    ("label", "files", 0x1F3F7, True),
    ("receipt", "files", 0x1F9FE, False),
    # ── tools & edit
    ("settings", "tools", 0x2699, True),
    ("wrench", "tools", 0x1F527, False),
    ("hammer", "tools", 0x1F528, False),
    ("pencil", "tools", 0x270F, True),
    ("memo", "tools", 0x1F4DD, False),
    ("scissors", "tools", 0x2702, True),
    ("search", "tools", 0x1F50D, False),
    ("redirect", "tools", 0x1F517, False),
    ("key", "tools", 0x1F511, False),
    ("lock", "tools", 0x1F512, False),
    ("unlock", "tools", 0x1F513, False),
    ("keylock", "tools", 0x1F510, False),
    ("pin", "tools", 0x1F4CC, False),
    ("copy", "tools", 0x1F4CB, False),
    ("magnet", "tools", 0x1F9F2, False),
    ("flashlight", "tools", 0x1F526, False),
    ("battery", "tools", 0x1F50B, False),
    ("plug", "tools", 0x1F50C, False),
    ("nut", "tools", 0x1F529, False),
    ("keyboard", "tools", 0x2328, True),
    ("mouse", "tools", 0x1F5B1, True),
    ("scales", "tools", 0x2696, True),
    ("abacus", "tools", 0x1F9EE, False),
    ("fire_extinguisher", "tools", 0x1F9EF, False),
    # ── status & indicators
    ("check", "status", 0x2705, False),
    ("close", "status", 0x2716, True),
    ("cross", "status", 0x274C, False),
    ("cancel", "status", 0x1F6AB, False),
    ("noop", "status", 0x25AB, True),
    ("info", "status", 0x2139, True),
    ("warning", "status", 0x26A0, True),
    ("question", "status", 0x2753, False),
    ("exclaim", "status", 0x2757, False),
    ("no_entry", "status", 0x26D4, False),
    ("new", "status", 0x1F195, False),
    ("free", "status", 0x1F193, False),
    ("ok", "status", 0x1F197, False),
    ("up_button", "status", 0x1F53C, False),
    ("down_button", "status", 0x1F53D, False),
    ("radio", "status", 0x1F518, False),
    ("circle", "status", 0x2B55, False),
    ("green_circle", "status", 0x1F7E2, False),
    ("red_circle", "status", 0x1F534, False),
    ("ballot_check", "status", 0x2611, True),
    ("ballot_x", "status", 0x2612, True),
    ("diamond", "status", 0x1F537, False),
    ("small_diamond", "status", 0x1F539, False),
    ("white_circle", "status", 0x26AA, False),
    ("black_circle", "status", 0x26AB, False),
    ("yellow_circle", "status", 0x1F7E1, False),
    ("blue_circle", "status", 0x1F535, False),
    ("purple_circle", "status", 0x1F7E3, False),
    ("orange_circle", "status", 0x1F7E0, False),
    ("brown_circle", "status", 0x1F7E4, False),
    ("red_square", "status", 0x1F7E5, False),
    ("green_square", "status", 0x1F7E9, False),
    ("blue_square", "status", 0x1F7E6, False),
    ("yellow_square", "status", 0x1F7E8, False),
    ("purple_square", "status", 0x1F7EA, False),
    ("orange_square", "status", 0x1F7E7, False),
    ("white_square", "status", 0x2B1C, False),
    ("black_square", "status", 0x2B1B, False),
    # ── communication & people
    ("person", "communication", 0x1F464, False),
    ("people", "communication", 0x1F465, False),
    ("speech", "communication", 0x1F4AC, False),
    ("phone", "communication", 0x1F4DE, False),
    ("mail", "communication", 0x2709, True),
    ("megaphone", "communication", 0x1F4E2, False),
    ("mobile", "communication", 0x1F4F1, False),
    ("thought", "communication", 0x1F4AD, False),
    ("writing", "communication", 0x270D, True),
    ("broken_heart", "communication", 0x1F494, False),
    ("glasses", "communication", 0x1F453, False),
    ("necktie", "communication", 0x1F454, False),
    ("footprints", "communication", 0x1F463, False),
    # ── misc / objects
    ("star", "misc", 0x2B50, False),
    ("heart", "misc", 0x2764, True),
    ("thumbs_up", "misc", 0x1F44D, False),
    ("thumbs_down", "misc", 0x1F44E, False),
    ("fire", "misc", 0x1F525, False),
    ("rocket", "misc", 0x1F680, False),
    ("gift", "misc", 0x1F381, False),
    ("trophy", "misc", 0x1F3C6, False),
    ("eye", "misc", 0x1F441, True),
    ("bulb", "misc", 0x1F4A1, False),
    ("sparkles", "misc", 0x2728, False),
    ("poll", "misc", 0x1F4CA, False),
    ("chart_up", "misc", 0x1F4C8, False),
    ("chart_down", "misc", 0x1F4C9, False),
    ("money", "misc", 0x1F4B0, False),
    ("buy", "misc", 0x1F4B3, False),
    ("cart", "misc", 0x1F6D2, False),
    ("lang", "misc", 0x1F310, False),
    ("location", "misc", 0x1F4CD, False),
    ("game", "misc", 0x1F3AE, False),
    ("bell", "misc", 0x1F514, False),
    ("flag", "misc", 0x1F6A9, False),
    ("moon", "misc", 0x1F319, False),
    ("sun", "misc", 0x2600, True),
    ("cloud", "misc", 0x2601, True),
    ("zap", "misc", 0x26A1, False),
    ("snowflake", "misc", 0x2744, True),
    ("droplet", "misc", 0x1F4A7, False),
    ("crown", "misc", 0x1F451, False),
    ("gem", "misc", 0x1F48E, False),
    ("bell_muted", "misc", 0x1F515, False),
    ("shield", "misc", 0x1F6E1, True),
    ("ribbon", "misc", 0x1F380, False),
    ("medal", "misc", 0x1F3C5, False),
    ("ticket", "misc", 0x1F3AB, False),
    ("dice", "misc", 0x1F3B2, False),
    ("chess", "misc", 0x265F, True),
    ("timer", "misc", 0x23F2, True),
    ("watch", "misc", 0x231A, False),
    ("robot", "misc", 0x1F916, False),
    ("earth", "misc", 0x1F30D, False),
    ("satellite", "misc", 0x1F6F0, True),
    ("car", "misc", 0x1F697, False),
    ("ship", "misc", 0x1F6A2, False),
    ("bike", "misc", 0x1F6B2, False),
    ("umbrella", "misc", 0x2614, False),
    ("rainbow", "misc", 0x1F308, False),
    ("bomb", "misc", 0x1F4A3, False),
    ("syringe", "misc", 0x1F489, False),
    ("pill", "misc", 0x1F48A, False),
    ("lips", "misc", 0x1F444, False),
]

ICONS: dict = {}
DEFAULT_ICON_UNICODE: dict = {}
ICON_CATEGORIES: dict = {}

for _name, _category, _cp, _variant in _ICON_ROWS:
    _glyph = chr(_cp) + (_VS16 if _variant else "")
    ICONS[_name] = {
        "name": _name,
        "category": _category,
        "glyph": _glyph,
        "codepoint": f"U+{_cp:04X}",
        "vector": None,
        "document_id": None,
    }
    DEFAULT_ICON_UNICODE[_name] = _glyph
    ICON_CATEGORIES.setdefault(_category, []).append(_name)

del _name, _category, _cp, _variant, _glyph


def document_id_for(name: str):
    real = ICON_DOCUMENT_IDS.get(name)
    if real:
        return real
    entry = ICONS.get(name)
    return entry["document_id"] if entry else None


class IconKit:
    """The icon catalog lookup.

    One instance (``icon_kit``); the module-level function below is a
    backward-compatible alias.
    """

    document_id_for = staticmethod(document_id_for)


icon_kit = IconKit()


# .....
ICON_DOCUMENT_IDS: dict = {
    "back": 5877629862306385808,
    "bell": 5909201569898827582,
    "bookmark": 5843862283964390528,
    "buy": 5927169041595634481,
    "calendar": 5967412305338568701,
    "camera": 5846024087033353251,
    "cancel": 5872829476143894491,
    "chart_up": 5776219138917668486,
    "check": 5776375003280838798,
    "clock": 5985616167740379273,
    "cross": 5778527486270770928,
    "down": 5886451926995833684,
    "down_button": 5875008416132370818,
    "exclaim": 5879813604068298387,
    "eye": 5960714428394507968,
    "fast_forward": 6028482475385164542,
    "file": 5877301185639091664,
    "fire": 6008118472066732010,
    "folder": 5875206779196935950,
    "gift": 6032937473162614352,
    "hammer": 5875450995332353523,
    "headphones": 6007938409857815902,
    "heart": 5899833370052923106,
    "home": 5967822972931542886,
    "image": 5888799736508454231,
    "inbox": 5877307202888273539,
    "info": 5879785854284599288,
    "key": 6005570495603282482,
    "lang": 5879585266426973039,
    "location": 5944940516754853337,
    "lock": 5879895758202735862,
    "mail": 5951665980273858529,
    "megaphone": 5771695636411847302,
    "memo": 5886330010054168711,
    "microphone": 5897554554894946515,
    "mobile": 5985833664884250583,
    "money": 5778318458802409852,
    "music": 5891249688933305846,
    "mute": 5890838600433536921,
    "new": 5886306834410640699,
    "next": 5877468380125990242,
    "outbox": 5877540355187937244,
    "paperclip": 5877495434124988415,
    "pencil": 5879841310902324730,
    "people": 5942877472163892475,
    "person": 5771887475421090729,
    "phone": 5897567714674741148,
    "pin": 5908961403917570106,
    "poll": 5877485980901971030,
    "prev": 5875082500023258804,
    "question": 5873121512445187130,
    "red_circle": 5967333011652350314,
    "redirect": 5877465816030515018,
    "refresh": 5877410604225924969,
    "repeat": 6005843436479975944,
    "save": 5884448719889240368,
    "scissors": 6007895992760799065,
    "settings": 5877260593903177342,
    "speech": 5886666250158870040,
    "star": 5958376256788502078,
    "thumbs_down": 5994368422031397063,
    "thumbs_up": 5992199545151295755,
    "trash": 5879896690210639947,
    "unlock": 5886505193180239900,
    "up": 6005807101056651268,
    "up_button": 5875078273775439450,
    "video": 5882002216323125435,
    "volume_up": 5890997763331591703,
    "warning": 5881702736843511327,
}
# <<< EMOJI_ICON_DOC_IDS <<<