โ๏ธ Email
diff --git a/packages/numerals-web/src/app/types.ts b/packages/numerals-web/src/app/types.ts
new file mode 100644
index 0000000..b31add3
--- /dev/null
+++ b/packages/numerals-web/src/app/types.ts
@@ -0,0 +1,18 @@
+export enum Numerals {
+ EasternArabic = 'easternArabic',
+ Mayan = 'mayan',
+ Hieroglyphic = 'hieroglyphic',
+ Roman = 'roman',
+ Aegean = 'aegean',
+ Thai = 'thai',
+ HanifiRohingya = 'hanifi-rohingya',
+ Kaktovik = 'kaktovik',
+}
+
+export function getNumerals(value: string|null|undefined, def: Numerals): Numerals {
+ if (!value) {
+ return def
+ }
+ const v = value.toLowerCase()
+ return Object.values(Numerals).includes(v as Numerals) ? v as Numerals : def
+}
diff --git a/packages/numerals-web/yarn.lock b/packages/numerals-web/yarn.lock
index ba09706..4e24ec4 100644
--- a/packages/numerals-web/yarn.lock
+++ b/packages/numerals-web/yarn.lock
@@ -515,10 +515,10 @@ __metadata:
languageName: node
linkType: hard
-"@next/env@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/env@npm:14.1.0"
- checksum: 10c0/f45ce1e3dad87cdbddc58b06bd411f44a6d21dfc2c344d02a5e1b07f56fbc9a39e192c0b0917df9f2e9e4e2156306a8c78f173ca4b53932c2793e67797462a23
+"@next/env@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/env@npm:14.2.15"
+ checksum: 10c0/b1af95941bd7e080276af0901512c8c56b4e157402d2d913feca435c6a6f01130c9f322cca67e5c2b1ca160f54f6c0c4913fb8a3201812a5bb62dbdccae6f8fa
languageName: node
linkType: hard
@@ -531,65 +531,65 @@ __metadata:
languageName: node
linkType: hard
-"@next/swc-darwin-arm64@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-darwin-arm64@npm:14.1.0"
+"@next/swc-darwin-arm64@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-darwin-arm64@npm:14.2.15"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
-"@next/swc-darwin-x64@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-darwin-x64@npm:14.1.0"
+"@next/swc-darwin-x64@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-darwin-x64@npm:14.2.15"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
-"@next/swc-linux-arm64-gnu@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-linux-arm64-gnu@npm:14.1.0"
+"@next/swc-linux-arm64-gnu@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-arm64-gnu@npm:14.2.15"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
-"@next/swc-linux-arm64-musl@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-linux-arm64-musl@npm:14.1.0"
+"@next/swc-linux-arm64-musl@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-arm64-musl@npm:14.2.15"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
-"@next/swc-linux-x64-gnu@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-linux-x64-gnu@npm:14.1.0"
+"@next/swc-linux-x64-gnu@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-x64-gnu@npm:14.2.15"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
-"@next/swc-linux-x64-musl@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-linux-x64-musl@npm:14.1.0"
+"@next/swc-linux-x64-musl@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-x64-musl@npm:14.2.15"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
-"@next/swc-win32-arm64-msvc@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-win32-arm64-msvc@npm:14.1.0"
+"@next/swc-win32-arm64-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-arm64-msvc@npm:14.2.15"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
-"@next/swc-win32-ia32-msvc@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-win32-ia32-msvc@npm:14.1.0"
+"@next/swc-win32-ia32-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-ia32-msvc@npm:14.2.15"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
-"@next/swc-win32-x64-msvc@npm:14.1.0":
- version: 14.1.0
- resolution: "@next/swc-win32-x64-msvc@npm:14.1.0"
+"@next/swc-win32-x64-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-x64-msvc@npm:14.2.15"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@@ -649,10 +649,10 @@ __metadata:
languageName: node
linkType: hard
-"@numerals/kaktovik@npm:0.0.1-next.0":
- version: 0.0.1-next.0
- resolution: "@numerals/kaktovik@npm:0.0.1-next.0"
- checksum: 10c0/2a4589e5e10aebf2faa7048f8f382e194297bec3afdd055caffc9b10053244399f4a7dae4c57782d5e52abebd76ea91c5808c2196106a188248adfd8867da3e4
+"@numerals/kaktovik@npm:0.0.1":
+ version: 0.0.1
+ resolution: "@numerals/kaktovik@npm:0.0.1"
+ checksum: 10c0/b2c70aec98543cdefa12e75c3d5a6e773882f1419ce1784b18834b44461a081b5bb829aabcf328d0ef664a9468fb196da6cf9e3ad6cafd65c462e3f5741c9393
languageName: node
linkType: hard
@@ -698,12 +698,20 @@ __metadata:
languageName: node
linkType: hard
-"@swc/helpers@npm:0.5.2":
- version: 0.5.2
- resolution: "@swc/helpers@npm:0.5.2"
+"@swc/counter@npm:^0.1.3":
+ version: 0.1.3
+ resolution: "@swc/counter@npm:0.1.3"
+ checksum: 10c0/8424f60f6bf8694cfd2a9bca45845bce29f26105cda8cf19cdb9fd3e78dc6338699e4db77a89ae449260bafa1cc6bec307e81e7fb96dbf7dcfce0eea55151356
+ languageName: node
+ linkType: hard
+
+"@swc/helpers@npm:0.5.5":
+ version: 0.5.5
+ resolution: "@swc/helpers@npm:0.5.5"
dependencies:
+ "@swc/counter": "npm:^0.1.3"
tslib: "npm:^2.4.0"
- checksum: 10c0/b6fa49bcf6c00571d0eb7837b163f8609960d4d77538160585e27ed167361e9776bd6e5eb9646ffac2fb4d43c58df9ca50dab9d96ab097e6591bc82a75fd1164
+ checksum: 10c0/21a9b9cfe7e00865f9c9f3eb4c1cc5b397143464f7abee76a2c5366e591e06b0155b5aac93fe8269ef8d548df253f6fd931e9ddfc0fd12efd405f90f45506e7d
languageName: node
linkType: hard
@@ -2783,21 +2791,21 @@ __metadata:
languageName: node
linkType: hard
-"next@npm:^14.1.0":
- version: 14.1.0
- resolution: "next@npm:14.1.0"
- dependencies:
- "@next/env": "npm:14.1.0"
- "@next/swc-darwin-arm64": "npm:14.1.0"
- "@next/swc-darwin-x64": "npm:14.1.0"
- "@next/swc-linux-arm64-gnu": "npm:14.1.0"
- "@next/swc-linux-arm64-musl": "npm:14.1.0"
- "@next/swc-linux-x64-gnu": "npm:14.1.0"
- "@next/swc-linux-x64-musl": "npm:14.1.0"
- "@next/swc-win32-arm64-msvc": "npm:14.1.0"
- "@next/swc-win32-ia32-msvc": "npm:14.1.0"
- "@next/swc-win32-x64-msvc": "npm:14.1.0"
- "@swc/helpers": "npm:0.5.2"
+"next@npm:14.2.15":
+ version: 14.2.15
+ resolution: "next@npm:14.2.15"
+ dependencies:
+ "@next/env": "npm:14.2.15"
+ "@next/swc-darwin-arm64": "npm:14.2.15"
+ "@next/swc-darwin-x64": "npm:14.2.15"
+ "@next/swc-linux-arm64-gnu": "npm:14.2.15"
+ "@next/swc-linux-arm64-musl": "npm:14.2.15"
+ "@next/swc-linux-x64-gnu": "npm:14.2.15"
+ "@next/swc-linux-x64-musl": "npm:14.2.15"
+ "@next/swc-win32-arm64-msvc": "npm:14.2.15"
+ "@next/swc-win32-ia32-msvc": "npm:14.2.15"
+ "@next/swc-win32-x64-msvc": "npm:14.2.15"
+ "@swc/helpers": "npm:0.5.5"
busboy: "npm:1.6.0"
caniuse-lite: "npm:^1.0.30001579"
graceful-fs: "npm:^4.2.11"
@@ -2805,6 +2813,7 @@ __metadata:
styled-jsx: "npm:5.1.1"
peerDependencies:
"@opentelemetry/api": ^1.1.0
+ "@playwright/test": ^1.41.2
react: ^18.2.0
react-dom: ^18.2.0
sass: ^1.3.0
@@ -2830,11 +2839,13 @@ __metadata:
peerDependenciesMeta:
"@opentelemetry/api":
optional: true
+ "@playwright/test":
+ optional: true
sass:
optional: true
bin:
next: dist/bin/next
- checksum: 10c0/dbb1ef8d22eec29a9127d28ed46eb34f14e3f7f7b4e4b91dc96027feb4d9ead554a804275484d9a54026e6e55d632d3997561e598c1fb8e8956e77614f39765f
+ checksum: 10c0/45d02c5a42f70cdbb8fba7a91f602d1852119f85cf5886d01d17e839ef096d42986ac17fe6356ed6e481548035e4eabff13b12818bf3ee38c11f488df579a8b0
languageName: node
linkType: hard
@@ -2849,7 +2860,7 @@ __metadata:
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hanifi-rohingya": "npm:0.0.1"
"@numerals/hieroglyphic": "npm:0.0.2"
- "@numerals/kaktovik": "npm:0.0.1-next.0"
+ "@numerals/kaktovik": "npm:0.0.1"
"@numerals/mayan": "npm:0.0.1"
"@numerals/roman": "npm:0.0.2"
"@numerals/thai": "npm:0.0.2"
@@ -2860,7 +2871,7 @@ __metadata:
"@vercel/speed-insights": "npm:^1.0.9"
eslint: "npm:^8.54.0"
eslint-config-next: "npm:^14.1.0"
- next: "npm:^14.1.0"
+ next: "npm:14.2.15"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-select: "npm:^5.8.0"
diff --git a/tsconfig.json b/tsconfig.json
index 33565a6..6f745c3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,10 +3,10 @@
"compilerOptions": {
"declaration": true,
"noEmit": false,
- "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
- "module": "commonjs", /* Specify what module code is generated. */
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
- "strict": true, /* Enable all strict type-checking options. */
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ "module": "commonjs", /* Specify what module code is generated. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+ "strict": true, /* Enable all strict type-checking options. */
}
}
diff --git a/yarn.lock b/yarn.lock
index b02f9ba..90b205c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1163,10 +1163,10 @@ __metadata:
languageName: node
linkType: hard
-"@next/env@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/env@npm:14.2.2"
- checksum: 10c0/45f5fe2e47b20b10e71400ae0a201a6f36644ff77681b4f4342106d69dead85a968940f1bb55e6ed9293089a7f2f51ab41ac90bad970fde7722afa840491b61f
+"@next/env@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/env@npm:14.2.15"
+ checksum: 10c0/b1af95941bd7e080276af0901512c8c56b4e157402d2d913feca435c6a6f01130c9f322cca67e5c2b1ca160f54f6c0c4913fb8a3201812a5bb62dbdccae6f8fa
languageName: node
linkType: hard
@@ -1188,65 +1188,65 @@ __metadata:
languageName: node
linkType: hard
-"@next/swc-darwin-arm64@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-darwin-arm64@npm:14.2.2"
+"@next/swc-darwin-arm64@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-darwin-arm64@npm:14.2.15"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
-"@next/swc-darwin-x64@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-darwin-x64@npm:14.2.2"
+"@next/swc-darwin-x64@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-darwin-x64@npm:14.2.15"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
-"@next/swc-linux-arm64-gnu@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-linux-arm64-gnu@npm:14.2.2"
+"@next/swc-linux-arm64-gnu@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-arm64-gnu@npm:14.2.15"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
-"@next/swc-linux-arm64-musl@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-linux-arm64-musl@npm:14.2.2"
+"@next/swc-linux-arm64-musl@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-arm64-musl@npm:14.2.15"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
-"@next/swc-linux-x64-gnu@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-linux-x64-gnu@npm:14.2.2"
+"@next/swc-linux-x64-gnu@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-x64-gnu@npm:14.2.15"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
-"@next/swc-linux-x64-musl@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-linux-x64-musl@npm:14.2.2"
+"@next/swc-linux-x64-musl@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-linux-x64-musl@npm:14.2.15"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
-"@next/swc-win32-arm64-msvc@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-win32-arm64-msvc@npm:14.2.2"
+"@next/swc-win32-arm64-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-arm64-msvc@npm:14.2.15"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
-"@next/swc-win32-ia32-msvc@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-win32-ia32-msvc@npm:14.2.2"
+"@next/swc-win32-ia32-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-ia32-msvc@npm:14.2.15"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
-"@next/swc-win32-x64-msvc@npm:14.2.2":
- version: 14.2.2
- resolution: "@next/swc-win32-x64-msvc@npm:14.2.2"
+"@next/swc-win32-x64-msvc@npm:14.2.15":
+ version: 14.2.15
+ resolution: "@next/swc-win32-x64-msvc@npm:14.2.15"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@@ -1352,10 +1352,10 @@ __metadata:
languageName: unknown
linkType: soft
-"@numerals/kaktovik@npm:0.0.1-next.0":
- version: 0.0.1-next.0
- resolution: "@numerals/kaktovik@npm:0.0.1-next.0"
- checksum: 10c0/2a4589e5e10aebf2faa7048f8f382e194297bec3afdd055caffc9b10053244399f4a7dae4c57782d5e52abebd76ea91c5808c2196106a188248adfd8867da3e4
+"@numerals/kaktovik@npm:0.0.1":
+ version: 0.0.1
+ resolution: "@numerals/kaktovik@npm:0.0.1"
+ checksum: 10c0/b2c70aec98543cdefa12e75c3d5a6e773882f1419ce1784b18834b44461a081b5bb829aabcf328d0ef664a9468fb196da6cf9e3ad6cafd65c462e3f5741c9393
languageName: node
linkType: hard
@@ -5265,20 +5265,20 @@ __metadata:
languageName: node
linkType: hard
-"next@npm:^14.1.0":
- version: 14.2.2
- resolution: "next@npm:14.2.2"
- dependencies:
- "@next/env": "npm:14.2.2"
- "@next/swc-darwin-arm64": "npm:14.2.2"
- "@next/swc-darwin-x64": "npm:14.2.2"
- "@next/swc-linux-arm64-gnu": "npm:14.2.2"
- "@next/swc-linux-arm64-musl": "npm:14.2.2"
- "@next/swc-linux-x64-gnu": "npm:14.2.2"
- "@next/swc-linux-x64-musl": "npm:14.2.2"
- "@next/swc-win32-arm64-msvc": "npm:14.2.2"
- "@next/swc-win32-ia32-msvc": "npm:14.2.2"
- "@next/swc-win32-x64-msvc": "npm:14.2.2"
+"next@npm:14.2.15":
+ version: 14.2.15
+ resolution: "next@npm:14.2.15"
+ dependencies:
+ "@next/env": "npm:14.2.15"
+ "@next/swc-darwin-arm64": "npm:14.2.15"
+ "@next/swc-darwin-x64": "npm:14.2.15"
+ "@next/swc-linux-arm64-gnu": "npm:14.2.15"
+ "@next/swc-linux-arm64-musl": "npm:14.2.15"
+ "@next/swc-linux-x64-gnu": "npm:14.2.15"
+ "@next/swc-linux-x64-musl": "npm:14.2.15"
+ "@next/swc-win32-arm64-msvc": "npm:14.2.15"
+ "@next/swc-win32-ia32-msvc": "npm:14.2.15"
+ "@next/swc-win32-x64-msvc": "npm:14.2.15"
"@swc/helpers": "npm:0.5.5"
busboy: "npm:1.6.0"
caniuse-lite: "npm:^1.0.30001579"
@@ -5319,7 +5319,7 @@ __metadata:
optional: true
bin:
next: dist/bin/next
- checksum: 10c0/775fe33021051def673946dbd2dea0b3f66c3f550ffc0544e55a6e0411b400b64229fe375730f009588cf7263d69b2b828ca7bb984fd3e3883cdddeaba82c31d
+ checksum: 10c0/45d02c5a42f70cdbb8fba7a91f602d1852119f85cf5886d01d17e839ef096d42986ac17fe6356ed6e481548035e4eabff13b12818bf3ee38c11f488df579a8b0
languageName: node
linkType: hard
@@ -5392,7 +5392,7 @@ __metadata:
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hanifi-rohingya": "npm:0.0.1"
"@numerals/hieroglyphic": "npm:0.0.2"
- "@numerals/kaktovik": "npm:0.0.1-next.0"
+ "@numerals/kaktovik": "npm:0.0.1"
"@numerals/mayan": "npm:0.0.1"
"@numerals/roman": "npm:0.0.2"
"@numerals/thai": "npm:0.0.2"
@@ -5427,7 +5427,7 @@ __metadata:
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hanifi-rohingya": "npm:0.0.1"
"@numerals/hieroglyphic": "npm:0.0.2"
- "@numerals/kaktovik": "npm:0.0.1-next.0"
+ "@numerals/kaktovik": "npm:0.0.1"
"@numerals/mayan": "npm:0.0.1"
"@numerals/roman": "npm:0.0.2"
"@numerals/thai": "npm:0.0.2"
@@ -5438,7 +5438,7 @@ __metadata:
"@vercel/speed-insights": "npm:^1.0.9"
eslint: "npm:^8.54.0"
eslint-config-next: "npm:^14.1.0"
- next: "npm:^14.1.0"
+ next: "npm:14.2.15"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-select: "npm:^5.8.0"