emoji-styles-data 0.1.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/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ UNICODE LICENSE V3
2
+
3
+ COPYRIGHT AND PERMISSION NOTICE
4
+
5
+ Copyright © 1991-2026 Unicode, Inc.
6
+
7
+ NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of data files and any associated documentation (the "Data Files") or software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either (a) this copyright and permission notice appear with all copies of the Data Files or Software, or (b) this copyright and permission notice appear in associated Documentation.
10
+
11
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
12
+
13
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
14
+
15
+ Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # emoji-styles-data
2
+
3
+ Versioned Unicode 17.0 and CLDR 48 RGI emoji metadata used by Emoji Styles.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install emoji-styles-data
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import {
15
+ emojiData,
16
+ emojiDatasetInfo,
17
+ getEmojiData,
18
+ normalizeEmoji,
19
+ } from "emoji-styles-data";
20
+
21
+ console.log(emojiDatasetInfo);
22
+ console.log(getEmojiData(normalizeEmoji("🚀")));
23
+ console.log(emojiData.length);
24
+ ```
25
+
26
+ The generated dataset records its upstream source, checksum, Unicode version,
27
+ Emoji version, CLDR version, and generator version for reproducible builds.
28
+
29
+ ## License
30
+
31
+ The Unicode-derived data is distributed under the Unicode License v3. See
32
+ [`LICENSE`](./LICENSE). Package source and documentation are maintained in
33
+ [Blancochuy/emoji-styles](https://github.com/Blancochuy/emoji-styles).
@@ -0,0 +1,50 @@
1
+ type EmojiQualification = "fully-qualified" | "component";
2
+ interface EmojiMetadata {
3
+ /** Stable CLDR-derived identifier retained for provider compatibility. */
4
+ name: string;
5
+ /** English CLDR short name suitable as an accessible fallback label. */
6
+ alt: string;
7
+ /** Canonical lowercase, hyphen-separated Unicode sequence. */
8
+ codepoint: string;
9
+ /** Individual lowercase Unicode scalar values in canonical order. */
10
+ codepoints: readonly string[];
11
+ /** Alias for codepoint that makes sequence semantics explicit. */
12
+ sequence: string;
13
+ unicodeVersion: string;
14
+ emojiVersion: string;
15
+ group: string;
16
+ subgroup: string;
17
+ qualification: EmojiQualification;
18
+ }
19
+ interface EmojiDatasetInfo {
20
+ unicodeVersion: string;
21
+ emojiVersion: string;
22
+ cldrVersion: string;
23
+ source: string;
24
+ sourceUrl: string;
25
+ sourceSha256: string;
26
+ sourceDate: string;
27
+ generatedAt: string;
28
+ generatorVersion: string;
29
+ rgiCount: number;
30
+ aliasCount: number;
31
+ }
32
+
33
+ /**
34
+ * Generated from the official Unicode emoji-test.txt RGI dataset.
35
+ * Do not edit by hand. Run `pnpm generate` from the repository root.
36
+ * Unicode 17.0; Emoji 17.0; CLDR 48.
37
+ * Source SHA-256: 1d8a944f88d7952f7ef7c5167fef3c67995bcae24543949710231b03a201acda
38
+ */
39
+ declare const emojiDatasetInfo: EmojiDatasetInfo;
40
+ declare const emojiData: Record<string, EmojiMetadata>;
41
+ declare const emojiAliases: Record<string, string>;
42
+
43
+ /** Return the canonical fully-qualified RGI form for a supported emoji input. */
44
+ declare function normalizeEmoji(input: string): string | null;
45
+ /** True only when the input itself is an RGI sequence or standalone RGI component. */
46
+ declare function isRGIEmoji(input: string): boolean;
47
+ /** Convert arbitrary Unicode input to a lowercase, hyphen-separated scalar sequence. */
48
+ declare function toEmojiCodepointSequence(input: string): string;
49
+
50
+ export { type EmojiDatasetInfo, type EmojiMetadata, type EmojiQualification, emojiAliases, emojiData, emojiDatasetInfo, isRGIEmoji, normalizeEmoji, toEmojiCodepointSequence };