@openworkbook/react 0.0.0-stage → 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.
@@ -0,0 +1,30 @@
1
+ import { WordListSpellerOptions, WordListSpeller } from '@openworkbook/core';
2
+
3
+ /*! @license English word list of @openworkbook/react/dictionaries/en.
4
+ * Base list: the word list of Webster's Second New International Dictionary (1934) ("web2", as distributed with
5
+ * BSD systems in /usr/share/dict/web2; FreeBSD-maintained). Its 1934 copyright has lapsed: public domain.
6
+ * Supplementary modern words, irregular forms and the common-word ranking list were written for OpenWorkbook and
7
+ * are released under the MIT licence of OpenWorkbook. See LICENSE-en.md next to the source of this module.
8
+ */
9
+ /** Number of distinct words in `EN_WORDS`. */
10
+ declare const EN_WORD_COUNT = 236487;
11
+
12
+ /** Where the English word list comes from (shown in About boxes and licence pages). */
13
+ declare const EN_DICTIONARY_INFO: {
14
+ readonly language: "en-US";
15
+ readonly words: 236487;
16
+ readonly source: "Webster's Second New International Dictionary (1934) word list (web2, as distributed with BSD systems), plus a supplementary list of modern words written for OpenWorkbook";
17
+ readonly license: "Base list: public domain (the 1934 copyright has lapsed). Supplement and ranking list: MIT (OpenWorkbook).";
18
+ };
19
+ /** The common English words that rank suggestions, most frequent first (also used by `./en-GB`). */
20
+ declare function englishCommonWords(): readonly string[];
21
+ /** The decoded English word list (decoded once, then shared). */
22
+ declare function englishWords(): readonly string[];
23
+ /**
24
+ * A spelling provider for American English: the word list above with the English inflection rules
25
+ * (`inflections: 'en'`) and the common-word ranking of suggestions. Each call builds a new provider (its own custom
26
+ * words); building one takes a few hundred milliseconds, so create it once and reuse it.
27
+ */
28
+ declare function createEnglishSpeller(options?: Omit<WordListSpellerOptions, 'inflections' | 'common'>): WordListSpeller;
29
+
30
+ export { EN_DICTIONARY_INFO, EN_WORD_COUNT, createEnglishSpeller, englishCommonWords, englishWords };
@@ -0,0 +1,30 @@
1
+ import { WordListSpellerOptions, WordListSpeller } from '@openworkbook/core';
2
+
3
+ /*! @license English word list of @openworkbook/react/dictionaries/en.
4
+ * Base list: the word list of Webster's Second New International Dictionary (1934) ("web2", as distributed with
5
+ * BSD systems in /usr/share/dict/web2; FreeBSD-maintained). Its 1934 copyright has lapsed: public domain.
6
+ * Supplementary modern words, irregular forms and the common-word ranking list were written for OpenWorkbook and
7
+ * are released under the MIT licence of OpenWorkbook. See LICENSE-en.md next to the source of this module.
8
+ */
9
+ /** Number of distinct words in `EN_WORDS`. */
10
+ declare const EN_WORD_COUNT = 236487;
11
+
12
+ /** Where the English word list comes from (shown in About boxes and licence pages). */
13
+ declare const EN_DICTIONARY_INFO: {
14
+ readonly language: "en-US";
15
+ readonly words: 236487;
16
+ readonly source: "Webster's Second New International Dictionary (1934) word list (web2, as distributed with BSD systems), plus a supplementary list of modern words written for OpenWorkbook";
17
+ readonly license: "Base list: public domain (the 1934 copyright has lapsed). Supplement and ranking list: MIT (OpenWorkbook).";
18
+ };
19
+ /** The common English words that rank suggestions, most frequent first (also used by `./en-GB`). */
20
+ declare function englishCommonWords(): readonly string[];
21
+ /** The decoded English word list (decoded once, then shared). */
22
+ declare function englishWords(): readonly string[];
23
+ /**
24
+ * A spelling provider for American English: the word list above with the English inflection rules
25
+ * (`inflections: 'en'`) and the common-word ranking of suggestions. Each call builds a new provider (its own custom
26
+ * words); building one takes a few hundred milliseconds, so create it once and reuse it.
27
+ */
28
+ declare function createEnglishSpeller(options?: Omit<WordListSpellerOptions, 'inflections' | 'common'>): WordListSpeller;
29
+
30
+ export { EN_DICTIONARY_INFO, EN_WORD_COUNT, createEnglishSpeller, englishCommonWords, englishWords };