emoji-styles 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/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "emoji-styles",
3
+ "version": "0.1.0",
4
+ "description": "Typed emoji resolution, semantic asset mappings, and licensed multi-provider fallbacks",
5
+ "sideEffects": false,
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./schema/provider": "./schemas/emoji-provider.schema.json",
16
+ "./schema/theme": "./schemas/emoji-theme.schema.json"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "schemas"
21
+ ],
22
+ "engines": {
23
+ "node": ">=18.17"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "provenance": true
28
+ },
29
+ "dependencies": {
30
+ "emoji-styles-data": "0.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "tsup": "^8.0.0",
34
+ "typescript": "^5.5.0",
35
+ "vitest": "^2.1.9",
36
+ "emoji-styles-test-fixtures": "0.1.0"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/Blancochuy/emoji-styles.git",
41
+ "directory": "packages/core"
42
+ },
43
+ "bugs": {
44
+ "url": "https://github.com/Blancochuy/emoji-styles/issues"
45
+ },
46
+ "homepage": "https://emoji-styles.space",
47
+ "keywords": [
48
+ "emoji",
49
+ "icons",
50
+ "design-system",
51
+ "semantic-ui",
52
+ "fluent-emoji",
53
+ "noto-emoji",
54
+ "twemoji"
55
+ ],
56
+ "license": "MIT",
57
+ "scripts": {
58
+ "build": "tsup src/index.ts --format esm --dts --clean",
59
+ "test": "vitest run",
60
+ "typecheck": "tsc --noEmit",
61
+ "dev": "tsup src/index.ts --format esm --dts --watch"
62
+ }
63
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://emoji.style/schemas/emoji-provider.schema.json",
4
+ "title": "Emoji Styles provider manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["id", "label", "version", "format", "basePath", "assets"],
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "id": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" },
11
+ "label": { "type": "string", "minLength": 1 },
12
+ "version": { "type": "string", "minLength": 1 },
13
+ "format": { "enum": ["png", "svg", "webp", "avif"] },
14
+ "basePath": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "not": { "pattern": "^(?!(?:https?):)[a-zA-Z][a-zA-Z0-9+.-]*:" }
18
+ },
19
+ "generated": { "type": "boolean" },
20
+ "source": { "type": "string" },
21
+ "generator": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["type", "model", "createdAt"],
25
+ "properties": {
26
+ "type": { "type": "string", "minLength": 1 },
27
+ "model": { "type": "string", "minLength": 1 },
28
+ "createdAt": { "type": "string", "format": "date-time" }
29
+ }
30
+ },
31
+ "license": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["name"],
35
+ "properties": {
36
+ "name": { "type": "string", "minLength": 1 },
37
+ "url": { "type": "string" },
38
+ "attribution": { "type": "string" },
39
+ "ownership": { "type": "string" }
40
+ }
41
+ },
42
+ "assets": {
43
+ "type": "object",
44
+ "additionalProperties": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["file"],
48
+ "properties": {
49
+ "file": { "type": "string", "minLength": 1 },
50
+ "sha256": { "type": "string", "pattern": "^[a-fA-F0-9]{64}$" },
51
+ "width": { "type": "integer", "minimum": 1 },
52
+ "height": { "type": "integer", "minimum": 1 }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "allOf": [
58
+ {
59
+ "if": { "properties": { "generated": { "const": true } }, "required": ["generated"] },
60
+ "then": { "required": ["generator"] }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://emoji.style/schemas/emoji-theme.schema.json",
4
+ "title": "Emoji Styles semantic theme",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "version", "tokens"],
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "schemaVersion": { "const": 1 },
11
+ "id": { "type": "string", "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" },
12
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$" },
13
+ "defaultProvider": { "$ref": "#/$defs/providerRef" },
14
+ "fallbacks": {
15
+ "type": "array",
16
+ "items": { "$ref": "#/$defs/providerRef" }
17
+ },
18
+ "nativeFallback": { "type": "boolean" },
19
+ "inherits": {
20
+ "type": "array",
21
+ "uniqueItems": true,
22
+ "items": { "type": "string", "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" }
23
+ },
24
+ "tokens": {
25
+ "type": "object",
26
+ "propertyNames": { "pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*)+$" },
27
+ "additionalProperties": { "$ref": "#/$defs/token" }
28
+ }
29
+ },
30
+ "$defs": {
31
+ "providerRef": {
32
+ "type": "string",
33
+ "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
34
+ },
35
+ "license": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["name"],
39
+ "properties": {
40
+ "name": { "type": "string", "minLength": 1 },
41
+ "url": { "type": "string" },
42
+ "attribution": { "type": "string" },
43
+ "ownership": { "type": "string" }
44
+ }
45
+ },
46
+ "asset": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["url", "format"],
50
+ "properties": {
51
+ "url": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "allOf": [
55
+ { "not": { "pattern": "^(?!(?:https?):)[a-zA-Z][a-zA-Z0-9+.-]*:" } },
56
+ { "not": { "pattern": "^//" } },
57
+ { "not": { "pattern": "\\\\" } },
58
+ { "not": { "pattern": "(?:^|/)\\.\\.(?:/|[?#]|$)" } }
59
+ ]
60
+ },
61
+ "format": { "enum": ["png", "svg", "webp", "avif"] },
62
+ "local": { "type": "boolean" },
63
+ "providerId": { "type": "string" },
64
+ "providerVersion": { "type": "string" },
65
+ "width": { "type": "integer", "minimum": 1 },
66
+ "height": { "type": "integer", "minimum": 1 },
67
+ "checksum": { "type": "string", "pattern": "^[a-fA-F0-9]{64}$" },
68
+ "license": { "$ref": "#/$defs/license" }
69
+ }
70
+ },
71
+ "token": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["emoji", "label", "decorative"],
75
+ "properties": {
76
+ "emoji": { "type": "string", "minLength": 1 },
77
+ "label": { "type": "string", "minLength": 1 },
78
+ "decorative": { "type": "boolean" },
79
+ "labels": {
80
+ "type": "object",
81
+ "propertyNames": { "pattern": "^[a-zA-Z]{2,3}(?:-[a-zA-Z0-9]{2,8})*$" },
82
+ "additionalProperties": { "type": "string", "minLength": 1 }
83
+ },
84
+ "provider": { "$ref": "#/$defs/providerRef" },
85
+ "asset": {
86
+ "oneOf": [
87
+ { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*)+$" },
88
+ { "$ref": "#/$defs/asset" }
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }