Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
lancejpollard committed Sep 17, 2024
1 parent 27604d2 commit 9cdd2c8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 38 deletions.
27 changes: 6 additions & 21 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/* eslint-disable sort-keys/sort-keys-fix */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-explicit-any */
import st from '@lancejpollard/script-tree'

const D: Record<string, string> = {
Expand All @@ -26,7 +21,8 @@ export type Link = {
unicode?: boolean
}

const VOWELS: Array<Link> = []
export const VOWELS: Array<Link> = []

const BASE_VOWEL_GLYPHS = [
'I',
'E',
Expand Down Expand Up @@ -129,7 +125,7 @@ BASE_VOWEL_GLYPHS.forEach(g => {
})
})

const CONSONANTS: Array<Link> = [
export const CONSONANTS: Array<Link> = [
{ i: '=.', name: 'Period literal', o: '.' },
{ i: '=?', name: 'Question literal', o: '?' },
{ i: '=!', name: 'Exclamation literal', o: '!' },
Expand Down Expand Up @@ -392,7 +388,7 @@ const CONSONANTS: Array<Link> = [
{ i: ':', name: 'Colon', o: ':' },
]

const NUMERALS = [
export const NUMERALS = [
{ i: '0', o: '\u00a1', unicode: true },
{ i: '1', o: '\u00a6', unicode: true },
{ i: '2', o: '\u00a2', unicode: true },
Expand All @@ -406,19 +402,8 @@ const NUMERALS = [
]

export const SYMBOLS = [...VOWELS, ...CONSONANTS, ...NUMERALS]

const tree = st.fork(SYMBOLS) as any
const make = (text: string) => st.form(text, tree) as string
const view = (text: string) =>
make(text).replace(/</g, '&lt;').replace(/>/g, '&gt;')

const form = {
SYMBOLS: SYMBOLS,
VOWELS: VOWELS,
CONSONANTS: CONSONANTS,
NUMERALS: NUMERALS,
// list: (text: string) => st.list(text, tree),
make,
view,
}

export default form
export default make
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@termsurf/tone",
"version": "3.0.10",
"version": "3.1.0",
"main": "./host/index.js",
"license": "Apache 2.0",
"license": "MIT",
"dependencies": {
"@lancejpollard/script-tree": "^1.1.0"
},
Expand Down
18 changes: 3 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ read and write any language pretty well.
```ts
import tone from '@termsurf/tone'

// Makes it ready for the font from ASCII.
tone.make('aa+xa+a-ita-') // => aa3xa3a4ita4
// Makes TalkText ASCII format into Tone-compatible font format.
tone('aa+xa+a-ita-') // => aa3xa3a4ita4
```

## The Alphabet
Expand Down Expand Up @@ -292,19 +292,7 @@ pnpm make:keyboard

## License

Copyright 2021-2024 <a href='https://term.surf'>TermSurf</a>

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MIT

## TermSurf

Expand Down
Empty file removed settings/.!85199!.DS_Store
Empty file.
Empty file removed settings/.!85265!.DS_Store
Empty file.
Empty file removed settings/.!85301!.DS_Store
Empty file.
Empty file removed settings/.!85305!.DS_Store
Empty file.
Empty file removed settings/.!85394!.DS_Store
Empty file.

0 comments on commit 9cdd2c8

Please sign in to comment.