glost 0.1.1 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,147 @@
1
1
  # glost
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Externalized language-specific helpers and data-dependent extensions into dedicated packages. Language helpers (`createThaiWord`, `createJapaneseWord`) moved to `glost-th` and `glost-ja`. Extensions (frequency, difficulty, POS, gender, clause-segmenter, transcription, translation) now require explicit data providers instead of fallback data. See `MIGRATION_EXTENSIONS.md` for migration guide.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - glost-common@0.1.3
13
+
14
+ ## 0.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - # Externalize Language-Specific Helpers to Dedicated Packages
19
+
20
+ ## Breaking Changes
21
+
22
+ Language-specific helper functions have been moved from the core `glost` package into dedicated language packages (`glost-th`, `glost-ja`). This keeps the core lightweight, reduces bundle sizes, and allows for independent language support.
23
+
24
+ ### Removed from `glost` (Breaking)
25
+ - `createThaiWord()` → moved to `glost-th` package
26
+ - `createJapaneseWord()` → moved to `glost-ja` package
27
+ - `CreateThaiWordOptions` interface → moved to `glost-th`
28
+ - `CreateJapaneseWordOptions` interface → moved to `glost-ja`
29
+
30
+ ### Migration Required
31
+
32
+ Install language packages separately:
33
+
34
+ ```bash
35
+ npm install glost-th # Thai language support
36
+ npm install glost-ja # Japanese language support
37
+ ```
38
+
39
+ Update imports in your code:
40
+
41
+ ```typescript
42
+ // Before (v0.1.x)
43
+ import { createThaiWord, createJapaneseWord } from "glost";
44
+
45
+ // After (v0.2.0+)
46
+ import { createThaiWord } from "glost-th";
47
+ import { createJapaneseWord } from "glost-ja";
48
+ ```
49
+
50
+ See [MIGRATION.md](../../MIGRATION.md) for complete upgrade guide.
51
+
52
+ ## New Packages
53
+
54
+ ### `glost-th` - Thai Language Support
55
+
56
+ Initial release providing:
57
+ - `createThaiWord()` helper
58
+ - Thai transcription provider interfaces
59
+ - Support for RTGS, Paiboon, Paiboon+, AUA, and IPA schemes
60
+
61
+ ### `glost-ja` - Japanese Language Support
62
+
63
+ Initial release providing:
64
+ - `createJapaneseWord()` helper
65
+ - Japanese transcription provider interfaces
66
+ - Support for Romaji (Hepburn, Kunrei, Nihon), Furigana, and IPA schemes
67
+
68
+ ## Internal Improvements
69
+ - Fixed circular dependencies in core package (changed `glost/src/*` imports to relative imports)
70
+ - Reduced core package size by ~30%
71
+ - Improved build performance
72
+ - Better modularity and maintainability
73
+
74
+ ## What Stays in Core
75
+
76
+ All core functionality remains unchanged:
77
+ - ✅ `createGLOSTWordNode()` - Generic word creation
78
+ - ✅ `createGLOSTSentenceNode()` - Sentence creation
79
+ - ✅ `createGLOSTRootNode()` - Document creation
80
+ - ✅ `createSimpleWord()` - Simple word helper
81
+ - ✅ All tree traversal utilities
82
+ - ✅ Type guards and validators
83
+ - ✅ All core types and interfaces
84
+
85
+ ## Benefits
86
+ - **Smaller bundles** - Import only languages you use
87
+ - **Independent releases** - Update languages without core changes
88
+ - **Better organization** - All Thai code in `glost-th`, all Japanese in `glost-ja`
89
+ - **Easier contributions** - Add new languages without touching core
90
+ - **Scalability** - Can support 50+ languages without bloating core
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies
95
+ - glost-common@0.1.2
96
+
97
+ ## 0.2.0
98
+
99
+ ### Breaking Changes
100
+
101
+ - **BREAKING:** Removed `createThaiWord()` - moved to `glost-th` package
102
+ - **BREAKING:** Removed `createJapaneseWord()` - moved to `glost-ja` package
103
+ - **BREAKING:** Removed `CreateThaiWordOptions` interface - moved to `glost-th`
104
+ - **BREAKING:** Removed `CreateJapaneseWordOptions` interface - moved to `glost-ja`
105
+
106
+ ### Migration
107
+
108
+ Install language packages separately:
109
+
110
+ ```bash
111
+ npm install glost-th # Thai language support
112
+ npm install glost-ja # Japanese language support
113
+ ```
114
+
115
+ Update imports:
116
+
117
+ ```typescript
118
+ // Before (v0.1.x)
119
+ import { createThaiWord, createJapaneseWord } from "glost";
120
+
121
+ // After (v0.2.0+)
122
+ import { createThaiWord } from "glost-th";
123
+ import { createJapaneseWord } from "glost-ja";
124
+ ```
125
+
126
+ See [MIGRATION.md](../../MIGRATION.md) for complete upgrade guide.
127
+
128
+ ### Internal Changes
129
+
130
+ - Fixed circular dependencies (changed `glost/src/*` imports to relative imports)
131
+ - Reduced package size by ~30%
132
+ - Improved build performance
133
+
134
+ ### What Stays in Core
135
+
136
+ All core functionality remains unchanged:
137
+
138
+ - ✅ `createGLOSTWordNode()` - Generic word creation
139
+ - ✅ `createGLOSTSentenceNode()` - Sentence creation
140
+ - ✅ `createGLOSTRootNode()` - Document creation
141
+ - ✅ `createSimpleWord()` - Simple word helper
142
+ - ✅ All tree traversal utilities
143
+ - ✅ Type guards and validators
144
+
3
145
  ## 0.1.1
4
146
 
5
147
  ### Patch Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@ Core types and node creation for GLOST (Glossed Syntax Tree).
4
4
 
5
5
  ## What is GLOST?
6
6
 
7
- GLOST (Glossed Syntax Tree) is a Concrete Syntax Tree format that extends nlcst to support rich language learning annotations:
7
+ GLOST (Glossed Syntax Tree) is a Concrete Syntax Tree format that extends nlcst to support language learning annotations:
8
8
 
9
9
  - **Translations and glosses** in multiple languages
10
10
  - **Difficulty levels** and word frequency data
@@ -27,35 +27,149 @@ import type { GLOSTWord, GLOSTRoot } from "glost";
27
27
 
28
28
  // Create a word node with annotations
29
29
  // Language codes: ISO-639-1, ISO-639-3, or BCP-47 all work
30
- const word = createGLOSTWordNode(
31
- "สวัสดี", // Thai: hello
32
- {
30
+ const word = createGLOSTWordNode({
31
+ value: "สวัสดี", // Thai: hello
32
+ transcription: {
33
33
  rtgs: { text: "sà-wàt-dii", system: "rtgs" },
34
34
  ipa: { text: "sa.wàt.diː", system: "ipa" }
35
35
  },
36
- {
36
+ metadata: {
37
37
  partOfSpeech: "interjection",
38
38
  usage: "greeting"
39
39
  },
40
- "word",
41
- "th", // Can also use "tha" (ISO-639-3) or "th-TH" (BCP-47)
42
- "thai"
43
- );
40
+ lang: "th", // Can also use "tha" (ISO-639-3) or "th-TH" (BCP-47)
41
+ script: "thai"
42
+ });
44
43
  ```
45
44
 
45
+ ## API
46
+
47
+ ### Node Factory Functions
48
+
49
+ All factory functions accept a single options object for better readability and extensibility.
50
+
51
+ #### `createGLOSTWordNode(options)`
52
+
53
+ Create a word node with transcription and metadata.
54
+
55
+ ```typescript
56
+ const word = createGLOSTWordNode({
57
+ value: "hello",
58
+ transcription: { ipa: { text: "həˈloʊ", system: "ipa" } },
59
+ metadata: { partOfSpeech: "interjection" },
60
+ lang: "en", // optional
61
+ script: "latin", // optional
62
+ extras: {} // optional extension data
63
+ });
64
+ ```
65
+
66
+ #### `createGLOSTSentenceNode(options)`
67
+
68
+ Create a sentence node containing word nodes.
69
+
70
+ ```typescript
71
+ const sentence = createGLOSTSentenceNode({
72
+ originalText: "Hello world",
73
+ lang: "en",
74
+ script: "latin",
75
+ children: [wordNode1, wordNode2], // optional
76
+ transcription: {}, // optional
77
+ extras: {} // optional
78
+ });
79
+ ```
80
+
81
+ #### `createGLOSTRootNode(options)`
82
+
83
+ Create a root document node.
84
+
85
+ ```typescript
86
+ const root = createGLOSTRootNode({
87
+ lang: "en",
88
+ script: "latin",
89
+ children: [paragraphNode], // optional
90
+ metadata: { title: "My Document" }, // optional
91
+ extras: {} // optional
92
+ });
93
+ ```
94
+
95
+ ### Helper Functions
96
+
97
+ Convenience functions for common language patterns:
98
+
99
+ #### `createSimpleWord(options)`
100
+
101
+ ```typescript
102
+ const word = createSimpleWord({
103
+ text: "hello",
104
+ transliteration: "həˈloʊ",
105
+ system: "ipa", // default: "ipa"
106
+ partOfSpeech: "noun" // default: "unknown"
107
+ });
108
+ ```
109
+
110
+ ### Language-Specific Helpers
111
+
112
+ **Note:** As of v0.2.0, language-specific helpers have been moved to separate packages.
113
+
114
+ #### Thai Language Support
115
+
116
+ ```bash
117
+ npm install glost-th
118
+ ```
119
+
120
+ ```typescript
121
+ import { createThaiWord } from 'glost-th';
122
+
123
+ const word = createThaiWord({
124
+ text: "สวัสดี",
125
+ rtgs: "sawatdi",
126
+ partOfSpeech: "interjection",
127
+ tone: 2,
128
+ syllables: ["sa", "wat", "di"]
129
+ });
130
+ ```
131
+
132
+ See [glost-th documentation](../languages/th/README.md).
133
+
134
+ #### Japanese Language Support
135
+
136
+ ```bash
137
+ npm install glost-ja
138
+ ```
139
+
140
+ ```typescript
141
+ import { createJapaneseWord } from 'glost-ja';
142
+
143
+ const word = createJapaneseWord({
144
+ text: "こんにちは",
145
+ romaji: "konnichiwa",
146
+ partOfSpeech: "interjection",
147
+ furigana: "こんにちは"
148
+ });
149
+ ```
150
+
151
+ See [glost-ja documentation](../languages/ja/README.md).
152
+
153
+ **Migration:** See [MIGRATION.md](../../MIGRATION.md) for upgrading from v0.1.x.
154
+
46
155
  ## Features
47
156
 
48
- - Full TypeScript support
157
+ - TypeScript support
49
158
  - Extends nlcst (Natural Language Concrete Syntax Tree)
50
- - Compatible with unist ecosystem
159
+ - Aims for compatibility with unist ecosystem
51
160
  - Framework-agnostic
52
- - Zod validation schemas included
161
+ - Includes Zod validation schemas
53
162
 
54
163
  ## Related Packages
55
164
 
165
+ ### Core Packages
166
+ - `glost-common` - Shared utilities and language configs
56
167
  - `glost-extensions` - Extension system for transforming GLOST trees
57
168
  - `glost-utils` - Utilities for working with GLOST documents
58
- - `glost-common` - Shared utilities and language configs
169
+
170
+ ### Language Packages
171
+ - `glost-th` - Thai language support
172
+ - `glost-ja` - Japanese language support
59
173
 
60
174
  ## Documentation
61
175
 
package/dist/example.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- declare const thaiWords: import("./types").GLOSTWord[];
2
- declare const thaiSentence: import("./types").GLOSTSentence;
3
- declare const japaneseWords: import("./types").GLOSTWord[];
4
- declare const japaneseSentence: import("./types").GLOSTSentence;
5
- declare const thaiParagraph: import("./types").GLOSTParagraph;
6
- declare const japaneseParagraph: import("./types").GLOSTParagraph;
7
- declare const document: import("./types").GLOSTRoot;
1
+ declare const thaiWords: import("../types").GLOSTWord[];
2
+ declare const thaiSentence: import("../types").GLOSTSentence;
3
+ declare const japaneseWords: import("../types").GLOSTWord[];
4
+ declare const japaneseSentence: import("../types").GLOSTSentence;
5
+ declare const thaiParagraph: import("../types").GLOSTParagraph;
6
+ declare const japaneseParagraph: import("../types").GLOSTParagraph;
7
+ declare const document: import("../types").GLOSTRoot;
8
8
  export declare function demonstrateUtilities(): void;
9
9
  export { thaiWords, japaneseWords, thaiSentence, japaneseSentence, thaiParagraph, japaneseParagraph, document };
10
10
  //# sourceMappingURL=example.d.ts.map
package/dist/example.js CHANGED
@@ -4,24 +4,80 @@ import { createThaiWord, createJapaneseWord, createSentenceFromWords, createPara
4
4
  // Thai Example: "สวัสดีครับ ผมชื่อสมชาย" (Hello, my name is Somchai)
5
5
  // ============================================================================
6
6
  const thaiWords = [
7
- createThaiWord('สวัสดี', 'sà-wàt-dii', 'interjection', 2, // tone
8
- ['sa', 'wat', 'dii']),
9
- createThaiWord('ครับ', 'khráp', 'particle', 2, ['khrap']),
10
- createThaiWord('ผม', 'phǒm', 'pronoun', 3, ['phom']),
11
- createThaiWord('ชื่อ', 'chûue', 'noun', 3, ['chue']),
12
- createThaiWord('สมชาย', 'sǒm-chaai', 'proper noun', 3, ['som', 'chaai'])
7
+ createThaiWord({
8
+ text: 'สวัสดี',
9
+ rtgs: 'sà-wàt-dii',
10
+ partOfSpeech: 'interjection',
11
+ tone: 2,
12
+ syllables: ['sa', 'wat', 'dii']
13
+ }),
14
+ createThaiWord({
15
+ text: 'ครับ',
16
+ rtgs: 'khráp',
17
+ partOfSpeech: 'particle',
18
+ tone: 2,
19
+ syllables: ['khrap']
20
+ }),
21
+ createThaiWord({
22
+ text: 'ผม',
23
+ rtgs: 'phǒm',
24
+ partOfSpeech: 'pronoun',
25
+ tone: 3,
26
+ syllables: ['phom']
27
+ }),
28
+ createThaiWord({
29
+ text: 'ชื่อ',
30
+ rtgs: 'chûue',
31
+ partOfSpeech: 'noun',
32
+ tone: 3,
33
+ syllables: ['chue']
34
+ }),
35
+ createThaiWord({
36
+ text: 'สมชาย',
37
+ rtgs: 'sǒm-chaai',
38
+ partOfSpeech: 'proper noun',
39
+ tone: 3,
40
+ syllables: ['som', 'chaai']
41
+ })
13
42
  ];
14
43
  const thaiSentence = createSentenceFromWords(thaiWords, 'th', 'thai', 'สวัสดีครับ ผมชื่อสมชาย');
15
44
  // ============================================================================
16
45
  // Japanese Example: "私の名前は田中です。" (My name is Tanaka)
17
46
  // ============================================================================
18
47
  const japaneseWords = [
19
- createJapaneseWord('私', 'watashi', 'pronoun', 'わたし'),
20
- createJapaneseWord('の', 'no', 'particle'),
21
- createJapaneseWord('名前', 'namae', 'noun', 'なまえ'),
22
- createJapaneseWord('は', 'wa', 'particle'),
23
- createJapaneseWord('田中', 'tanaka', 'proper noun', 'たなか'),
24
- createJapaneseWord('です', 'desu', 'copula')
48
+ createJapaneseWord({
49
+ text: '',
50
+ romaji: 'watashi',
51
+ partOfSpeech: 'pronoun',
52
+ furigana: 'わたし'
53
+ }),
54
+ createJapaneseWord({
55
+ text: 'の',
56
+ romaji: 'no',
57
+ partOfSpeech: 'particle'
58
+ }),
59
+ createJapaneseWord({
60
+ text: '名前',
61
+ romaji: 'namae',
62
+ partOfSpeech: 'noun',
63
+ furigana: 'なまえ'
64
+ }),
65
+ createJapaneseWord({
66
+ text: 'は',
67
+ romaji: 'wa',
68
+ partOfSpeech: 'particle'
69
+ }),
70
+ createJapaneseWord({
71
+ text: '田中',
72
+ romaji: 'tanaka',
73
+ partOfSpeech: 'proper noun',
74
+ furigana: 'たなか'
75
+ }),
76
+ createJapaneseWord({
77
+ text: 'です',
78
+ romaji: 'desu',
79
+ partOfSpeech: 'copula'
80
+ })
25
81
  ];
26
82
  const japaneseSentence = createSentenceFromWords(japaneseWords, 'ja', 'mixed', '私の名前は田中です。');
27
83
  // ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,+EAA+E;AAC/E,qEAAqE;AACrE,+EAA+E;AAE/E,MAAM,SAAS,GAAG;IAChB,cAAc,CACZ,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,CAAC,EAAE,OAAO;IACV,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CACrB;IACD,cAAc,CACZ,MAAM,EACN,OAAO,EACP,UAAU,EACV,CAAC,EACD,CAAC,OAAO,CAAC,CACV;IACD,cAAc,CACZ,IAAI,EACJ,MAAM,EACN,SAAS,EACT,CAAC,EACD,CAAC,MAAM,CAAC,CACT;IACD,cAAc,CACZ,MAAM,EACN,OAAO,EACP,MAAM,EACN,CAAC,EACD,CAAC,MAAM,CAAC,CACT;IACD,cAAc,CACZ,OAAO,EACP,WAAW,EACX,aAAa,EACb,CAAC,EACD,CAAC,KAAK,EAAE,OAAO,CAAC,CACjB;CACF,CAAC;AAEF,MAAM,YAAY,GAAG,uBAAuB,CAC1C,SAAS,EACT,IAAI,EACJ,MAAM,EACN,wBAAwB,CACzB,CAAC;AAEF,+EAA+E;AAC/E,qDAAqD;AACrD,+EAA+E;AAE/E,MAAM,aAAa,GAAG;IACpB,kBAAkB,CAChB,GAAG,EACH,SAAS,EACT,SAAS,EACT,KAAK,CACN;IACD,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,UAAU,CACX;IACD,kBAAkB,CAChB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,KAAK,CACN;IACD,kBAAkB,CAChB,GAAG,EACH,IAAI,EACJ,UAAU,CACX;IACD,kBAAkB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,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5D,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YAC/B,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,GAAG,CAAC,UAAU,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,gCAAgC;AAChC,OAAO,EACL,SAAS,EACT,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACT,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ export * from "./nodes";
3
3
  export * from "./utils";
4
4
  export * from "./validators";
5
5
  export * from "./guards";
6
- export * from "./mock-data";
7
6
  export type { ParagraphLike } from "./utils";
8
7
  export { getAllWords, getAllSentences, getAllParagraphs, getAllClauses, getAllPhrases, getAllSyllables, getAllCharacters, getWordsFromDocument, getFirstSentence, getWordsFromSentence, getWordsFromParagraph, findNodesByType, findWordsByLanguage, findWordsByTranscriptionSystem, isGLOSTWord, isGLOSTSentence, isGLOSTParagraph, isGLOSTRoot, isGLOSTClause, isGLOSTPhrase, isGLOSTSyllable, isGLOSTCharacter, getWordText, getWordTranscription, hasWordTranscription, getWordTranslation, getWordMeaning, getWordPartOfSpeech, getWordDifficulty, getSentenceTranslation, getGLOSTWordCount, adaptParagraphLikeToGLOST, parseLanguageTag, getBaseLanguage, areLanguagesCompatible, findBestLanguageMatch, getLanguageFallback, normalizeLanguageTag, isValidLanguageTag, } from "./utils";
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB,cAAc,aAAa,CAAC;AAG5B,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EAGrB,eAAe,EACf,mBAAmB,EACnB,8BAA8B,EAG9B,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAGhB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAGjB,sBAAsB,EAGtB,iBAAiB,EACjB,yBAAyB,EAGzB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAIzB,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,OAAO,EAEL,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EAGrB,eAAe,EACf,mBAAmB,EACnB,8BAA8B,EAG9B,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAGhB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAGjB,sBAAsB,EAGtB,iBAAiB,EACjB,yBAAyB,EAGzB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -5,8 +5,6 @@ export * from "./nodes";
5
5
  export * from "./utils";
6
6
  export * from "./validators";
7
7
  export * from "./guards";
8
- // export * from './example';
9
- export * from "./mock-data";
10
8
  // Re-export key utilities for transcription components
11
9
  export {
12
10
  // Tree traversal
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,uDAAuD;AAEvD,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,6BAA6B;AAC7B,cAAc,aAAa,CAAC;AAK5B,uDAAuD;AACvD,OAAO;AACL,iBAAiB;AACjB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB;AAErB,eAAe;AACf,eAAe,EACf,mBAAmB,EACnB,8BAA8B;AAE9B,oDAAoD;AACpD,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB;AAEhB,iBAAiB;AACjB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB;AAEjB,qBAAqB;AACrB,sBAAsB;AAEtB,+BAA+B;AAC/B,iBAAiB,EACjB,yBAAyB;AAEzB,4BAA4B;AAC5B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,uDAAuD;AAEvD,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAMzB,uDAAuD;AACvD,OAAO;AACL,iBAAiB;AACjB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB;AAErB,eAAe;AACf,eAAe,EACf,mBAAmB,EACnB,8BAA8B;AAE9B,oDAAoD;AACpD,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB;AAEhB,iBAAiB;AACjB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,iBAAiB;AAEjB,qBAAqB;AACrB,sBAAsB;AAEtB,+BAA+B;AAC/B,iBAAiB,EACjB,yBAAyB;AAEzB,4BAA4B;AAC5B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
package/dist/nodes.d.ts CHANGED
@@ -1,37 +1,132 @@
1
- import type { LanguageCode, LinguisticLevel, LinguisticMetadata, GLOSTExtras, GLOSTParagraph, GLOSTPunctuation, GLOSTRoot, GLOSTSentence, GLOSTSymbol, GLOSTText, GLOSTWhiteSpace, GLOSTWord, ScriptSystem, TransliterationData } from "./types";
1
+ import type { LanguageCode, LinguisticMetadata, GLOSTExtras, GLOSTParagraph, GLOSTPunctuation, GLOSTRoot, GLOSTSentence, GLOSTSymbol, GLOSTText, GLOSTWhiteSpace, GLOSTWord, ScriptSystem, TransliterationData } from "./types";
2
2
  /**
3
- * Create an GLOST word node
3
+ * Options for creating a GLOST word node
4
4
  */
5
- export declare function createGLOSTWordNode(value: string, transcription: TransliterationData, metadata: LinguisticMetadata, level?: LinguisticLevel, lang?: LanguageCode, script?: ScriptSystem, extras?: GLOSTExtras): GLOSTWord;
5
+ export interface CreateWordNodeOptions {
6
+ /** The text value of the word */
7
+ value: string;
8
+ /** Transcription data (IPA, romanization, etc.) */
9
+ transcription: TransliterationData;
10
+ /** Linguistic metadata (part of speech, etc.) */
11
+ metadata: LinguisticMetadata;
12
+ /** Language code (ISO-639-1, ISO-639-3, or BCP-47) */
13
+ lang?: LanguageCode;
14
+ /** Script system used */
15
+ script?: ScriptSystem;
16
+ /** Additional extension data */
17
+ extras?: GLOSTExtras;
18
+ }
6
19
  /**
7
- * Create an GLOST sentence node
20
+ * Options for creating a GLOST sentence node
8
21
  */
9
- export declare function createGLOSTSentenceNode(originalText: string, lang: LanguageCode, script: ScriptSystem, children?: GLOSTWord[], transcription?: TransliterationData, extras?: GLOSTExtras): GLOSTSentence;
22
+ export interface CreateSentenceNodeOptions {
23
+ /** The original text of the sentence */
24
+ originalText: string;
25
+ /** Language code */
26
+ lang: LanguageCode;
27
+ /** Script system used */
28
+ script: ScriptSystem;
29
+ /** Word nodes in the sentence */
30
+ children?: GLOSTWord[];
31
+ /** Optional transcription data */
32
+ transcription?: TransliterationData;
33
+ /** Additional extension data */
34
+ extras?: GLOSTExtras;
35
+ }
10
36
  /**
11
- * Create an GLOST paragraph node
37
+ * Options for creating a GLOST root node
12
38
  */
13
- export declare function createGLOSTParagraphNode(children?: GLOSTSentence[], extras?: GLOSTExtras): GLOSTParagraph;
39
+ export interface CreateRootNodeOptions {
40
+ /** Language code */
41
+ lang: LanguageCode;
42
+ /** Script system used */
43
+ script: ScriptSystem;
44
+ /** Paragraph nodes */
45
+ children?: GLOSTParagraph[];
46
+ /** Document metadata */
47
+ metadata?: {
48
+ title?: string;
49
+ author?: string;
50
+ date?: string;
51
+ description?: string;
52
+ };
53
+ /** Additional extension data */
54
+ extras?: GLOSTExtras;
55
+ }
14
56
  /**
15
- * Create an GLOST root node
57
+ * Options for creating a simple word node
16
58
  */
17
- export declare function createGLOSTRootNode(lang: LanguageCode, script: ScriptSystem, children?: GLOSTParagraph[], metadata?: {
18
- title?: string;
19
- author?: string;
20
- date?: string;
21
- description?: string;
22
- }, extras?: GLOSTExtras): GLOSTRoot;
59
+ export interface CreateSimpleWordOptions {
60
+ /** The text value of the word */
61
+ text: string;
62
+ /** Transliteration text */
63
+ transliteration: string;
64
+ /** Transcription system (default: "ipa") */
65
+ system?: string;
66
+ /** Part of speech (default: "unknown") */
67
+ partOfSpeech?: string;
68
+ }
23
69
  /**
24
- * Create a simple word node with basic transcription
70
+ * Create a GLOST word node
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const word = createGLOSTWordNode({
75
+ * value: "hello",
76
+ * transcription: { ipa: { text: "həˈloʊ", system: "ipa" } },
77
+ * metadata: { partOfSpeech: "interjection" },
78
+ * lang: "en",
79
+ * script: "latin"
80
+ * });
81
+ * ```
25
82
  */
26
- export declare function createSimpleWord(text: string, transliteration: string, system?: string, partOfSpeech?: string, level?: LinguisticLevel): GLOSTWord;
83
+ export declare function createGLOSTWordNode(options: CreateWordNodeOptions): GLOSTWord;
27
84
  /**
28
- * Create a Thai word node with RTGS transcription
85
+ * Create a GLOST sentence node
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * const sentence = createGLOSTSentenceNode({
90
+ * originalText: "Hello world",
91
+ * lang: "en",
92
+ * script: "latin",
93
+ * children: [wordNode1, wordNode2]
94
+ * });
95
+ * ```
29
96
  */
30
- export declare function createThaiWord(text: string, rtgs: string, partOfSpeech?: string, tone?: number, syllables?: string[]): GLOSTWord;
97
+ export declare function createGLOSTSentenceNode(options: CreateSentenceNodeOptions): GLOSTSentence;
31
98
  /**
32
- * Create a Japanese word node with romaji transcription
99
+ * Create a GLOST paragraph node
100
+ */
101
+ export declare function createGLOSTParagraphNode(children?: GLOSTSentence[], extras?: GLOSTExtras): GLOSTParagraph;
102
+ /**
103
+ * Create a GLOST root node
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * const root = createGLOSTRootNode({
108
+ * lang: "en",
109
+ * script: "latin",
110
+ * children: [paragraphNode],
111
+ * metadata: { title: "My Document" }
112
+ * });
113
+ * ```
114
+ */
115
+ export declare function createGLOSTRootNode(options: CreateRootNodeOptions): GLOSTRoot;
116
+ /**
117
+ * Create a simple word node with basic transcription
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * const word = createSimpleWord({
122
+ * text: "hello",
123
+ * transliteration: "həˈloʊ",
124
+ * system: "ipa",
125
+ * partOfSpeech: "interjection"
126
+ * });
127
+ * ```
33
128
  */
34
- export declare function createJapaneseWord(text: string, romaji: string, partOfSpeech?: string, furigana?: string): GLOSTWord;
129
+ export declare function createSimpleWord(options: CreateSimpleWordOptions): GLOSTWord;
35
130
  /**
36
131
  * Create a sentence from an array of words
37
132
  */
@@ -50,19 +145,19 @@ export declare function createDocumentFromParagraphs(paragraphs: GLOSTParagraph[
50
145
  description?: string;
51
146
  }): GLOSTRoot;
52
147
  /**
53
- * Create an GLOST punctuation node
148
+ * Create a GLOST punctuation node
54
149
  */
55
150
  export declare function createGLOSTPunctuationNode(value: string): GLOSTPunctuation;
56
151
  /**
57
- * Create an GLOST whitespace node
152
+ * Create a GLOST whitespace node
58
153
  */
59
154
  export declare function createGLOSTWhiteSpaceNode(value: string): GLOSTWhiteSpace;
60
155
  /**
61
- * Create an GLOST symbol node
156
+ * Create a GLOST symbol node
62
157
  */
63
158
  export declare function createGLOSTSymbolNode(value: string): GLOSTSymbol;
64
159
  /**
65
- * Create an GLOST text node
160
+ * Create a GLOST text node
66
161
  */
67
162
  export declare function createGLOSTTextNode(value: string): GLOSTText;
68
163
  //# sourceMappingURL=nodes.d.ts.map