diff --git a/index.ts b/index.ts index 461a290..e5b6c0f 100644 --- a/index.ts +++ b/index.ts @@ -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 = { @@ -26,7 +21,8 @@ export type Link = { unicode?: boolean } -const VOWELS: Array = [] +export const VOWELS: Array = [] + const BASE_VOWEL_GLYPHS = [ 'I', 'E', @@ -129,7 +125,7 @@ BASE_VOWEL_GLYPHS.forEach(g => { }) }) -const CONSONANTS: Array = [ +export const CONSONANTS: Array = [ { i: '=.', name: 'Period literal', o: '.' }, { i: '=?', name: 'Question literal', o: '?' }, { i: '=!', name: 'Exclamation literal', o: '!' }, @@ -392,7 +388,7 @@ const CONSONANTS: Array = [ { 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 }, @@ -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, '>') - -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 diff --git a/package.json b/package.json index b6f2d10..5b0375f 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/readme.md b/readme.md index 4851662..b59cde9 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -292,19 +292,7 @@ pnpm make:keyboard ## License -Copyright 2021-2024 TermSurf - -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 diff --git a/settings/.!85199!.DS_Store b/settings/.!85199!.DS_Store deleted file mode 100644 index e69de29..0000000 diff --git a/settings/.!85265!.DS_Store b/settings/.!85265!.DS_Store deleted file mode 100644 index e69de29..0000000 diff --git a/settings/.!85301!.DS_Store b/settings/.!85301!.DS_Store deleted file mode 100644 index e69de29..0000000 diff --git a/settings/.!85305!.DS_Store b/settings/.!85305!.DS_Store deleted file mode 100644 index e69de29..0000000 diff --git a/settings/.!85394!.DS_Store b/settings/.!85394!.DS_Store deleted file mode 100644 index e69de29..0000000