Skip to content

Commit

Permalink
Numerals web/0.5.0 (#15)
Browse files Browse the repository at this point in the history
* add aegean numerals to web
  • Loading branch information
amerharb authored May 2, 2024
1 parent 7c40627 commit b6eb0df
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 10 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ This is a monorepo for the Numerals project.
### roman I V X L C D M
[README](https://github.com/amerharb/numerals/blob/main/packages/roman/README.md)

### aegean 𐄇 𐄈 𐄐 𐄢
[README](https://github.com/amerharb/numerals/blob/main/packages/aegean/README.md)

### numerals-client
Example of a client for npm package

Expand Down
3 changes: 2 additions & 1 deletion packages/numerals-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"lint:fix": "npx eslint . --fix"
},
"dependencies": {
"@numerals/aegean": "0.0.1",
"@numerals/eastern-arabic": "0.0.2",
"@numerals/hieroglyphic": "0.0.2",
"@numerals/mayan": "0.0.1",
"@numerals/roman": "0.0.1"
"@numerals/roman": "0.0.2"
}
}
7 changes: 7 additions & 0 deletions packages/numerals-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { convert as ar } from '@numerals/eastern-arabic'
import { convert as ma } from '@numerals/mayan'
import { convert as hi } from '@numerals/hieroglyphic'
import { convert as ro } from '@numerals/roman'
import { convert as ag } from '@numerals/aegean'

log('@numerals/eastern-arabic')
log(calmConvert(ar, 123))
Expand All @@ -27,6 +28,12 @@ log(calmConvert(ro, 123.456))
log(calmConvert(ro, -1))
log(calmConvert(ro, NaN))

log('@numerals/aegean')
log(calmConvert(ag, 123))
log(calmConvert(ag, 123.456))
log(calmConvert(ag, -1))
log(calmConvert(ag, NaN))

log('Done')

function calmConvert(convert:(n:number) => string, source: number): string {
Expand Down
4 changes: 4 additions & 0 deletions packages/numerals-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<!-- https://keepachangelog.com/en/1.0.0/ -->

## [0.5.0] 2024-5-02
### Added
- Add Aegean numeral conversion

## [0.4.1] 2024-5-01
### Changed
- Use roman v0.0.2
Expand Down
3 changes: 2 additions & 1 deletion packages/numerals-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numerals-web",
"private": true,
"version": "0.4.1",
"version": "0.5.0",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -14,6 +14,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/joy": "^5.0.0-beta.11",
"@numerals/aegean": "0.0.1",
"@numerals/eastern-arabic": "0.0.2",
"@numerals/hieroglyphic": "0.0.2",
"@numerals/mayan": "0.0.1",
Expand Down
9 changes: 9 additions & 0 deletions packages/numerals-web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import { convert as convertAr } from '@numerals/eastern-arabic'
import { convert as convertMa } from '@numerals/mayan'
import { convert as convertHi } from '@numerals/hieroglyphic'
import { convert as convertRo } from '@numerals/roman'
import { convert as convertAg } from '@numerals/aegean'
import Image from 'next/image'

enum Numerals {
EasternArabic = 'easternArabic',
Mayan = 'mayan',
Hieroglyphic = 'hieroglyphic',
Roman = 'roman',
Aegean = 'aegean',
}

export default function Home() {
Expand All @@ -25,6 +27,7 @@ export default function Home() {
{ value: Numerals.Mayan, label: 'Mayan 𝋠 𝋡 𝋢 𝋣' },
{ value: Numerals.Hieroglyphic, label: 'Hieroglyphic 𓁨 𓆐 𓂭 𓆼' },
{ value: Numerals.Roman, label: 'Roman Ⅰ Ⅱ Ⅲ Ⅳ' },
{ value: Numerals.Aegean, label: 'Aegean 𐄇 𐄈 𐄐 𐄙' },
]
const ToSelect = () => <div style={{ marginBottom: '10px' }}>
<label htmlFor="toDropdown" style={{ marginRight: '10px' }}>
Expand Down Expand Up @@ -117,6 +120,10 @@ export default function Home() {
{' '}@numerals/roman
</a>
<br/>
<a href="https://www.npmjs.com/package/@numerals/aegean" style={{ textDecoration: 'none' }}>
{' '}@numerals/aegean
</a>
<br/>
You can find the source code on{' '}
<a href="https://www.github.com/amerharb/numerals" style={{ textDecoration: 'none' }}>
<Image src="/images/Github-logo.svg" alt="GitHub" width={32}
Expand Down Expand Up @@ -144,5 +151,7 @@ function convert(source: number, to: Numerals): string {
return convertHi(source)
case Numerals.Roman:
return convertRo(source)
case Numerals.Aegean:
return convertAg(source)
}
}
8 changes: 8 additions & 0 deletions packages/numerals-web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,13 @@ __metadata:
languageName: node
linkType: hard

"@numerals/aegean@npm:0.0.1":
version: 0.0.1
resolution: "@numerals/aegean@npm:0.0.1"
checksum: 10c0/cccd9f15aed7b1f112087fb95ee0e84137852b6fa3fac9900703e2603b444622a9710b66457feb4476a948277ad3e9cadbf5c400560367c69accd0a16a3201cb
languageName: node
linkType: hard

"@numerals/eastern-arabic@npm:0.0.2":
version: 0.0.2
resolution: "@numerals/eastern-arabic@npm:0.0.2"
Expand Down Expand Up @@ -2817,6 +2824,7 @@ __metadata:
"@emotion/react": "npm:^11.11.1"
"@emotion/styled": "npm:^11.11.0"
"@mui/joy": "npm:^5.0.0-beta.11"
"@numerals/aegean": "npm:0.0.1"
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hieroglyphic": "npm:0.0.2"
"@numerals/mayan": "npm:0.0.1"
Expand Down
18 changes: 10 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,13 @@ __metadata:
languageName: node
linkType: hard

"@numerals/aegean@npm:0.0.1":
version: 0.0.1
resolution: "@numerals/aegean@npm:0.0.1"
checksum: 10c0/cccd9f15aed7b1f112087fb95ee0e84137852b6fa3fac9900703e2603b444622a9710b66457feb4476a948277ad3e9cadbf5c400560367c69accd0a16a3201cb
languageName: node
linkType: hard

"@numerals/aegean@workspace:packages/aegean":
version: 0.0.0-use.local
resolution: "@numerals/aegean@workspace:packages/aegean"
Expand Down Expand Up @@ -1345,13 +1352,6 @@ __metadata:
languageName: unknown
linkType: soft

"@numerals/roman@npm:0.0.1":
version: 0.0.1
resolution: "@numerals/roman@npm:0.0.1"
checksum: 10c0/70b0a9b1c9689107b3a1b0519c1cc477bb94ba7d3690d1f4f4b05ccbea398ffadff58dbf571ab55a76c43c0cfbd20b2c03a15361bcc5c54affc6ef398bc14058
languageName: node
linkType: hard

"@numerals/roman@npm:0.0.2":
version: 0.0.2
resolution: "@numerals/roman@npm:0.0.2"
Expand Down Expand Up @@ -5349,10 +5349,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "numerals-client@workspace:packages/numerals-client"
dependencies:
"@numerals/aegean": "npm:0.0.1"
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hieroglyphic": "npm:0.0.2"
"@numerals/mayan": "npm:0.0.1"
"@numerals/roman": "npm:0.0.1"
"@numerals/roman": "npm:0.0.2"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -5380,6 +5381,7 @@ __metadata:
"@emotion/react": "npm:^11.11.1"
"@emotion/styled": "npm:^11.11.0"
"@mui/joy": "npm:^5.0.0-beta.11"
"@numerals/aegean": "npm:0.0.1"
"@numerals/eastern-arabic": "npm:0.0.2"
"@numerals/hieroglyphic": "npm:0.0.2"
"@numerals/mayan": "npm:0.0.1"
Expand Down

0 comments on commit b6eb0df

Please sign in to comment.