glost 0.4.0 → 0.5.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.
Files changed (67) hide show
  1. package/README.md +253 -114
  2. package/dist/index.d.ts +29 -8
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +38 -24
  5. package/dist/index.js.map +1 -1
  6. package/dist/presets.d.ts +7 -0
  7. package/dist/presets.d.ts.map +1 -0
  8. package/dist/presets.js +7 -0
  9. package/dist/presets.js.map +1 -0
  10. package/dist/processor.d.ts +8 -0
  11. package/dist/processor.d.ts.map +1 -0
  12. package/dist/processor.js +7 -0
  13. package/dist/processor.js.map +1 -0
  14. package/dist/registry.d.ts +8 -0
  15. package/dist/registry.d.ts.map +1 -0
  16. package/dist/registry.js +7 -0
  17. package/dist/registry.js.map +1 -0
  18. package/package.json +27 -40
  19. package/src/index.ts +126 -69
  20. package/src/presets.ts +18 -0
  21. package/src/processor.ts +24 -0
  22. package/src/registry.ts +23 -0
  23. package/tsconfig.json +6 -3
  24. package/CHANGELOG.md +0 -296
  25. package/dist/cli/migrate.d.ts +0 -8
  26. package/dist/cli/migrate.d.ts.map +0 -1
  27. package/dist/cli/migrate.js +0 -229
  28. package/dist/cli/migrate.js.map +0 -1
  29. package/dist/errors.d.ts +0 -168
  30. package/dist/errors.d.ts.map +0 -1
  31. package/dist/errors.js +0 -300
  32. package/dist/errors.js.map +0 -1
  33. package/dist/example.d.ts +0 -10
  34. package/dist/example.d.ts.map +0 -1
  35. package/dist/example.js +0 -138
  36. package/dist/example.js.map +0 -1
  37. package/dist/guards.d.ts +0 -103
  38. package/dist/guards.d.ts.map +0 -1
  39. package/dist/guards.js +0 -264
  40. package/dist/guards.js.map +0 -1
  41. package/dist/nodes.d.ts +0 -163
  42. package/dist/nodes.d.ts.map +0 -1
  43. package/dist/nodes.js +0 -185
  44. package/dist/nodes.js.map +0 -1
  45. package/dist/types.d.ts +0 -395
  46. package/dist/types.d.ts.map +0 -1
  47. package/dist/types.js +0 -6
  48. package/dist/types.js.map +0 -1
  49. package/dist/utils.d.ts +0 -203
  50. package/dist/utils.d.ts.map +0 -1
  51. package/dist/utils.js +0 -497
  52. package/dist/utils.js.map +0 -1
  53. package/dist/validators.d.ts +0 -1876
  54. package/dist/validators.d.ts.map +0 -1
  55. package/dist/validators.js +0 -302
  56. package/dist/validators.js.map +0 -1
  57. package/src/__tests__/README.md +0 -20
  58. package/src/__tests__/example.test.ts +0 -43
  59. package/src/__tests__/example.ts +0 -186
  60. package/src/__tests__/mock-data.ts +0 -624
  61. package/src/cli/migrate.ts +0 -294
  62. package/src/errors.ts +0 -394
  63. package/src/guards.ts +0 -341
  64. package/src/nodes.ts +0 -326
  65. package/src/types.ts +0 -581
  66. package/src/utils.ts +0 -652
  67. package/src/validators.ts +0 -336
package/package.json CHANGED
@@ -1,59 +1,44 @@
1
1
  {
2
2
  "name": "glost",
3
- "version": "0.4.0",
4
- "description": "GLOST - Glossed Syntax Tree for augmenting text with language learning metadata",
3
+ "version": "0.5.0",
4
+ "description": "GLOST - Glossed Syntax Tree for language learning and multilingual text processing",
5
5
  "author": "fustilio",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/fustilio/glost.git",
10
- "directory": "packages/core"
10
+ "directory": "packages/glost"
11
11
  },
12
12
  "type": "module",
13
- "main": "./src/index.ts",
14
- "types": "./src/index.ts",
15
- "bin": {
16
- "glost": "./dist/cli/migrate.js"
17
- },
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
18
15
  "exports": {
19
16
  ".": {
20
- "types": "./src/index.ts",
21
- "default": "./src/index.ts"
22
- },
23
- "./nodes": {
24
- "types": "./src/nodes.ts",
25
- "default": "./src/nodes.ts"
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
26
19
  },
27
- "./utils": {
28
- "types": "./src/utils.ts",
29
- "default": "./src/utils.ts"
20
+ "./processor": {
21
+ "types": "./dist/processor.d.ts",
22
+ "default": "./dist/processor.js"
30
23
  },
31
- "./validators": {
32
- "types": "./src/validators.ts",
33
- "default": "./src/validators.ts"
24
+ "./registry": {
25
+ "types": "./dist/registry.d.ts",
26
+ "default": "./dist/registry.js"
34
27
  },
35
- "./guards": {
36
- "types": "./src/guards.ts",
37
- "default": "./src/guards.ts"
28
+ "./presets": {
29
+ "types": "./dist/presets.d.ts",
30
+ "default": "./dist/presets.js"
38
31
  }
39
32
  },
40
33
  "dependencies": {
41
- "unist-util-filter": "^5.0.1",
42
- "unist-util-find": "^3.0.0",
43
- "unist-util-flatmap": "^1.0.0",
44
- "unist-util-is": "^6.0.0",
45
- "unist-util-map": "^4.0.0",
46
- "unist-util-modify-children": "^4.0.0",
47
- "unist-util-remove": "^4.0.0",
48
- "unist-util-select": "^5.1.0",
49
- "unist-util-visit": "^5.0.0",
50
- "zod": "^3.23.8",
51
- "glost-common": "0.2.0"
34
+ "glost-core": "0.5.0",
35
+ "glost-processor": "0.5.0",
36
+ "glost-presets": "0.5.0",
37
+ "glost-registry": "0.5.0"
52
38
  },
53
39
  "devDependencies": {
54
- "@types/nlcst": "^2.0.3",
55
- "typescript": "^5.8.3",
56
- "vitest": "^3.0.5"
40
+ "@types/node": "^20.0.0",
41
+ "typescript": "^5.3.3"
57
42
  },
58
43
  "keywords": [
59
44
  "glost",
@@ -63,11 +48,13 @@
63
48
  "language-learning",
64
49
  "linguistics",
65
50
  "syntax-tree",
66
- "unist"
51
+ "unist",
52
+ "processor",
53
+ "pipeline",
54
+ "unified"
67
55
  ],
68
56
  "scripts": {
69
57
  "build": "tsc",
70
- "typecheck": "tsc --noEmit",
71
- "test": "vitest --passWithNoTests"
58
+ "typecheck": "tsc --noEmit"
72
59
  }
73
60
  }
package/src/index.ts CHANGED
@@ -1,69 +1,126 @@
1
- // GLOST - Glossed Syntax Tree
2
- // Extends nlcst for language learning with annotations
3
-
4
- export * from "./types.js";
5
- export * from "./nodes.js";
6
- export * from "./utils.js";
7
- export * from "./validators.js";
8
- export * from "./guards.js";
9
- export * from "./errors.js";
10
- // export * from './example.js';
11
-
12
- // Re-export utility types
13
- export type { ParagraphLike } from "./utils.js";
14
-
15
- // Re-export key utilities for transcription components
16
- export {
17
- // Tree traversal
18
- getAllWords,
19
- getAllSentences,
20
- getAllParagraphs,
21
- getAllClauses,
22
- getAllPhrases,
23
- getAllSyllables,
24
- getAllCharacters,
25
- getWordsFromDocument,
26
- getFirstSentence,
27
- getWordsFromSentence,
28
- getWordsFromParagraph,
29
-
30
- // Node finding
31
- findNodesByType,
32
- findWordsByLanguage,
33
- findWordsByTranscriptionSystem,
34
-
35
- // Type guards (most are now exported via guards.ts)
36
- isGLOSTWord,
37
- isGLOSTSentence,
38
- isGLOSTParagraph,
39
- isGLOSTRoot,
40
- isGLOSTClause,
41
- isGLOSTPhrase,
42
- isGLOSTSyllable,
43
- isGLOSTCharacter,
44
-
45
- // Word utilities
46
- getWordText,
47
- getWordTranscription,
48
- hasWordTranscription,
49
- getWordTranslation,
50
- getWordMeaning,
51
- getWordPartOfSpeech,
52
- getWordDifficulty,
53
-
54
- // Sentence utilities
55
- getSentenceTranslation,
56
-
57
- // Content statistics utilities
58
- getGLOSTWordCount,
59
- adaptParagraphLikeToGLOST,
60
-
61
- // BCP-47 Language utilities
62
- parseLanguageTag,
63
- getBaseLanguage,
64
- areLanguagesCompatible,
65
- findBestLanguageMatch,
66
- getLanguageFallback,
67
- normalizeLanguageTag,
68
- isValidLanguageTag,
69
- } from "./utils.js";
1
+ /**
2
+ * GLOST - Glossed Syntax Tree
3
+ *
4
+ * Main package that re-exports all GLOST functionality.
5
+ *
6
+ * @packageDocumentation
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Import everything from one place
11
+ * import { glost, createSimpleDocument, getAllWords } from "glost";
12
+ * import { languageLearningPreset } from "glost/presets";
13
+ *
14
+ * // Create a document
15
+ * const document = createSimpleDocument(words, "th", "thai");
16
+ *
17
+ * // Process with plugins
18
+ * const result = await glost()
19
+ * .use(languageLearningPreset)
20
+ * .process(document);
21
+ * ```
22
+ */
23
+
24
+ // ============================================================================
25
+ // Core Types
26
+ // ============================================================================
27
+ export type {
28
+ GLOSTNode,
29
+ GLOSTRoot,
30
+ GLOSTParagraph,
31
+ GLOSTSentence,
32
+ GLOSTWord,
33
+ GLOSTText,
34
+ GLOSTWhiteSpace,
35
+ GLOSTPunctuation,
36
+ GLOSTSymbol,
37
+ GLOSTSource,
38
+ GLOSTClause,
39
+ GLOSTPhrase,
40
+ GLOSTSyllable,
41
+ GLOSTCharacter,
42
+ GLOSTExtras,
43
+ TransliterationData,
44
+ LinguisticMetadata,
45
+ LanguageCode,
46
+ ScriptSystem,
47
+ } from "glost-core";
48
+
49
+ // ============================================================================
50
+ // Node Factories
51
+ // ============================================================================
52
+ export {
53
+ createGLOSTRootNode,
54
+ createGLOSTParagraphNode,
55
+ createGLOSTSentenceNode,
56
+ createGLOSTWordNode,
57
+ createGLOSTTextNode,
58
+ createGLOSTWhiteSpaceNode,
59
+ createGLOSTPunctuationNode,
60
+ createGLOSTSymbolNode,
61
+ createSimpleDocument,
62
+ createDocumentFromSentences,
63
+ createDocumentFromParagraphs,
64
+ createSentenceFromWords,
65
+ createParagraphFromSentences,
66
+ createSimpleWord,
67
+ NODE_TYPES,
68
+ } from "glost-core";
69
+
70
+ // ============================================================================
71
+ // Tree Utilities
72
+ // ============================================================================
73
+ export {
74
+ getAllWords,
75
+ getAllSentences,
76
+ getAllParagraphs,
77
+ getAllClauses,
78
+ getFirstSentence,
79
+ getWordsFromSentence,
80
+ getWordsFromParagraph,
81
+ findWordsByLanguage,
82
+ isGLOSTWord,
83
+ isGLOSTSentence,
84
+ isGLOSTParagraph,
85
+ isGLOSTRoot,
86
+ getWordText,
87
+ getWordTranscription,
88
+ getWordTranslation,
89
+ getSentenceTranslation,
90
+ getGLOSTWordCount,
91
+ } from "glost-core";
92
+
93
+ // ============================================================================
94
+ // Processor API
95
+ // ============================================================================
96
+ export { glost, GLOSTProcessor } from "glost-processor";
97
+ export type {
98
+ FrozenProcessor,
99
+ Plugin,
100
+ PluginSpec,
101
+ Preset,
102
+ ProcessorOptions,
103
+ ProcessingResult,
104
+ ProcessingError,
105
+ ProcessingWarning,
106
+ ProcessingStats,
107
+ BeforeHook,
108
+ AfterHook,
109
+ ErrorHook,
110
+ SkipHook,
111
+ ProgressHook,
112
+ ProgressStats,
113
+ } from "glost-processor";
114
+
115
+ // ============================================================================
116
+ // Plugin Registry
117
+ // ============================================================================
118
+ export { pluginRegistry, PluginRegistry } from "glost-registry";
119
+ export type {
120
+ PluginMetadata,
121
+ PluginCategory,
122
+ PluginCapabilities,
123
+ PluginQuery,
124
+ ConflictReport,
125
+ ValidationResult,
126
+ } from "glost-registry";
package/src/presets.ts ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Presets exports
3
+ *
4
+ * Re-exports preset configurations for convenient access via glost/presets.
5
+ */
6
+
7
+ export {
8
+ languageLearningPreset,
9
+ createLanguageLearningPreset,
10
+ readingAppPreset,
11
+ createReadingAppPreset,
12
+ vocabularyBuilderPreset,
13
+ createVocabularyBuilderPreset,
14
+ grammarAnalyzerPreset,
15
+ createGrammarAnalyzerPreset,
16
+ minimalPreset,
17
+ createMinimalPreset,
18
+ } from "glost-presets";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Processor exports
3
+ *
4
+ * Re-exports the processor API for convenient access via glost/processor.
5
+ */
6
+
7
+ export { glost, GLOSTProcessor } from "glost-processor";
8
+ export type {
9
+ FrozenProcessor,
10
+ Plugin,
11
+ PluginSpec,
12
+ Preset,
13
+ ProcessorOptions,
14
+ ProcessingResult,
15
+ ProcessingError,
16
+ ProcessingWarning,
17
+ ProcessingStats,
18
+ BeforeHook,
19
+ AfterHook,
20
+ ErrorHook,
21
+ SkipHook,
22
+ ProgressHook,
23
+ ProgressStats,
24
+ } from "glost-processor";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Registry exports
3
+ *
4
+ * Re-exports the registry API for convenient access via glost/registry.
5
+ */
6
+
7
+ export { pluginRegistry, PluginRegistry, PluginFilter, PluginSorter, PluginDiscovery, PluginValidator } from "glost-registry";
8
+ export type {
9
+ PluginMetadata,
10
+ PluginCategory,
11
+ PluginCapabilities,
12
+ PluginRequirements,
13
+ PluginOptionsSchema,
14
+ PropertySchema,
15
+ PluginExample,
16
+ PluginQuery,
17
+ ConflictReport,
18
+ PluginConflict,
19
+ ValidationResult,
20
+ ValidationError,
21
+ ValidationWarning,
22
+ RegistryStatistics,
23
+ } from "glost-registry";
package/tsconfig.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "../../tsconfig.base.json",
3
3
  "compilerOptions": {
4
+ "outDir": "./dist",
4
5
  "rootDir": "./src",
5
- "outDir": "./dist"
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true
6
9
  },
7
10
  "include": ["src/**/*"],
8
- "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts", "src/__tests__"]
11
+ "exclude": ["node_modules", "dist"]
9
12
  }
package/CHANGELOG.md DELETED
@@ -1,296 +0,0 @@
1
- # glost
2
-
3
- ## 0.4.0
4
-
5
- ### Minor Changes
6
-
7
- - Fixed critical production issues (ESM imports, BCP-47 language standardization, removed redundant transcription schema fields, renamed translation API sourceLanguage/targetLanguage → from/to) and added major DX improvements (typed extras via declaration merging, comprehensive error classes with suggestions, standard GLOSTDataProvider interface, built-in migration CLI tool npx glost migrate).
8
-
9
- ### Patch Changes
10
-
11
- - Updated dependencies
12
- - glost-common@0.2.0
13
- - glost-utils@0.2.0
14
-
15
- ## 0.4.0
16
-
17
- ### Major Changes
18
-
19
- GLOST v0.4.0 brings critical production fixes and developer experience improvements based on 6+ months of real-world usage feedback from the lalia-prism team processing 50+ language learning stories across Thai and French.
20
-
21
- #### Breaking Changes
22
-
23
- **1. ESM Imports Fixed** 🔧
24
-
25
- - Added `.js` extensions to all barrel exports for proper Node.js ESM support
26
- - Updated TypeScript config to `moduleResolution: "node16"`
27
- - **Impact**: Fixes `Cannot find module` errors in Node.js ESM
28
- - **Migration**: Automatic when upgrading packages
29
-
30
- **2. BCP-47 Language Code Standard** 🌍
31
-
32
- - All language codes now standardized on BCP-47 format (e.g., `en-US`, `th-TH`)
33
- - Added comprehensive language utilities: `normalizeLanguageCode()`, `matchLanguage()`, `parseLanguageCode()`, `findBestMatch()`, `getLanguageFallbacks()`
34
- - **Impact**: Language codes like `"th"` become `"th-TH"`
35
- - **Migration**: Use `npx glost-migrate v0.3-to-v0.4 ./src` or `migrateAllLanguageCodes()` utility
36
-
37
- **3. Transcription Schema Cleanup** ✨
38
-
39
- - Removed redundant `system` field from `TranscriptionInfo` type
40
- - System name is already the key in the transcription object
41
- - **Before**: `{ ipa: { text: "hello", system: "ipa" } }`
42
- - **After**: `{ ipa: { text: "hello" } }`
43
- - **Migration**: Use `migrateTranscriptionSchema()` utility
44
-
45
- **4. Translation API Clarity** 📝
46
-
47
- - Renamed confusing `sourceLanguage`/`targetLanguage` to clear `from`/`to`
48
- - **Before**: `createTranslationExtension({ sourceLanguage: "th", targetLanguage: "en", ... })`
49
- - **After**: `createTranslationExtension({ from: "th", to: "en", ... })`
50
- - **Migration**: Manual update of extension calls
51
-
52
- #### New Features
53
-
54
- **Typed Extras via Declaration Merging** 🎯
55
-
56
- - Extensions can now augment `GLOSTExtras` interface for full type safety
57
- - Automatic TypeScript autocomplete for extension fields
58
- - No runtime overhead, pure type-level enhancement
59
-
60
- ```typescript
61
- // In extension package
62
- declare module "glost" {
63
- interface GLOSTExtras {
64
- frequency?: {
65
- rank: number;
66
- category: "very-common" | "common" | "uncommon" | "rare";
67
- };
68
- }
69
- }
70
-
71
- // In user code - full autocomplete!
72
- word.extras.frequency?.rank; // number | undefined
73
- ```
74
-
75
- **Standard Provider Interface** 🔌
76
-
77
- - New `GLOSTDataProvider<TInput, TOutput>` interface for consistency
78
- - Built-in support for batch processing, caching, and cleanup
79
- - Helper utilities: `createSimpleProvider()`, `createCachedProvider()`, `createFallbackProvider()`
80
-
81
- **Better Error Messages** 💬
82
-
83
- - New error classes with context, suggestions, and documentation links
84
- - Helpful error formatting with file paths and node locations
85
- - Error types: `GLOSTValidationError`, `GLOSTExtensionError`, `GLOSTProviderError`, etc.
86
-
87
- ```typescript
88
- GLOSTValidationError: Missing required field 'text' on WordNode
89
-
90
- Location: document.children[0]
91
- Node type: WordNode
92
- File: stories/test.glost.json:42
93
-
94
- Suggestion: Add a 'text' field containing the word's text content.
95
- Documentation: https://glost.dev/docs/node-types#wordnode
96
- ```
97
-
98
- **Language Code Utilities** 🛠️
99
-
100
- - `normalizeLanguageCode()` - Convert to BCP-47
101
- - `matchLanguage()` - Flexible matching with options
102
- - `parseLanguageCode()` - Parse into components
103
- - `findBestMatch()` - Find closest match from available codes
104
- - `getLanguageFallbacks()` - Get fallback chain
105
- - `isValidBCP47()` - Validation
106
- - `asBCP47()` - Type-safe casting
107
-
108
- **Migration CLI** 🚀
109
-
110
- - Built-in migration CLI: `npx glost migrate`
111
- - Automated migration from v0.3.x to v0.4.0
112
- - Commands: `v0.3-to-v0.4`, `analyze`, `help`
113
- - Dry-run support for safe testing
114
- - Programmatic migration utilities in `glost-utils`
115
-
116
- ### Improvements
117
-
118
- - **Bundle Size**: Foundation laid for future optimizations
119
- - **Type Safety**: Changed `GLOSTExtras` from type to interface for declaration merging
120
- - **Documentation**: Comprehensive migration guide and updated language docs
121
- - **Developer Experience**: Better error messages save significant debugging time
122
-
123
- ### Fixes
124
-
125
- - Fixed ESM imports in all language packages
126
- - Fixed TypeScript moduleResolution for proper ESM output
127
- - Removed redundant schema fields reducing JSON size
128
-
129
- ### Migration Guide
130
-
131
- See [MIGRATION_v0.3_to_v0.4.md](../../MIGRATION_v0.3_to_v0.4.md) for complete upgrade instructions.
132
-
133
- Quick migration:
134
-
135
- ```bash
136
- npx glost migrate v0.3-to-v0.4 ./src
137
- ```
138
-
139
- ### Acknowledgments
140
-
141
- Special thanks to the lalia-prism team for their comprehensive RFC and 6+ months of production feedback that made this release possible. Their real-world experience with Thai and French language learning content identified critical issues and guided these improvements.
142
-
143
- ### Dependencies
144
-
145
- - glost-common@0.4.0
146
- - glost-utils@0.4.0
147
-
148
- ## 0.3.0
149
-
150
- ### Minor Changes
151
-
152
- - 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.
153
-
154
- ### Patch Changes
155
-
156
- - Updated dependencies
157
- - glost-common@0.1.3
158
-
159
- ## 0.2.0
160
-
161
- ### Minor Changes
162
-
163
- - # Externalize Language-Specific Helpers to Dedicated Packages
164
-
165
- ## Breaking Changes
166
-
167
- 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.
168
-
169
- ### Removed from `glost` (Breaking)
170
- - `createThaiWord()` → moved to `glost-th` package
171
- - `createJapaneseWord()` → moved to `glost-ja` package
172
- - `CreateThaiWordOptions` interface → moved to `glost-th`
173
- - `CreateJapaneseWordOptions` interface → moved to `glost-ja`
174
-
175
- ### Migration Required
176
-
177
- Install language packages separately:
178
-
179
- ```bash
180
- npm install glost-th # Thai language support
181
- npm install glost-ja # Japanese language support
182
- ```
183
-
184
- Update imports in your code:
185
-
186
- ```typescript
187
- // Before (v0.1.x)
188
- import { createThaiWord, createJapaneseWord } from "glost";
189
-
190
- // After (v0.2.0+)
191
- import { createThaiWord } from "glost-th";
192
- import { createJapaneseWord } from "glost-ja";
193
- ```
194
-
195
- See [MIGRATION.md](../../MIGRATION.md) for complete upgrade guide.
196
-
197
- ## New Packages
198
-
199
- ### `glost-th` - Thai Language Support
200
-
201
- Initial release providing:
202
- - `createThaiWord()` helper
203
- - Thai transcription provider interfaces
204
- - Support for RTGS, Paiboon, Paiboon+, AUA, and IPA schemes
205
-
206
- ### `glost-ja` - Japanese Language Support
207
-
208
- Initial release providing:
209
- - `createJapaneseWord()` helper
210
- - Japanese transcription provider interfaces
211
- - Support for Romaji (Hepburn, Kunrei, Nihon), Furigana, and IPA schemes
212
-
213
- ## Internal Improvements
214
- - Fixed circular dependencies in core package (changed `glost/src/*` imports to relative imports)
215
- - Reduced core package size by ~30%
216
- - Improved build performance
217
- - Better modularity and maintainability
218
-
219
- ## What Stays in Core
220
-
221
- All core functionality remains unchanged:
222
- - ✅ `createGLOSTWordNode()` - Generic word creation
223
- - ✅ `createGLOSTSentenceNode()` - Sentence creation
224
- - ✅ `createGLOSTRootNode()` - Document creation
225
- - ✅ `createSimpleWord()` - Simple word helper
226
- - ✅ All tree traversal utilities
227
- - ✅ Type guards and validators
228
- - ✅ All core types and interfaces
229
-
230
- ## Benefits
231
- - **Smaller bundles** - Import only languages you use
232
- - **Independent releases** - Update languages without core changes
233
- - **Better organization** - All Thai code in `glost-th`, all Japanese in `glost-ja`
234
- - **Easier contributions** - Add new languages without touching core
235
- - **Scalability** - Can support 50+ languages without bloating core
236
-
237
- ### Patch Changes
238
-
239
- - Updated dependencies
240
- - glost-common@0.1.2
241
-
242
- ## 0.2.0
243
-
244
- ### Breaking Changes
245
-
246
- - **BREAKING:** Removed `createThaiWord()` - moved to `glost-th` package
247
- - **BREAKING:** Removed `createJapaneseWord()` - moved to `glost-ja` package
248
- - **BREAKING:** Removed `CreateThaiWordOptions` interface - moved to `glost-th`
249
- - **BREAKING:** Removed `CreateJapaneseWordOptions` interface - moved to `glost-ja`
250
-
251
- ### Migration
252
-
253
- Install language packages separately:
254
-
255
- ```bash
256
- npm install glost-th # Thai language support
257
- npm install glost-ja # Japanese language support
258
- ```
259
-
260
- Update imports:
261
-
262
- ```typescript
263
- // Before (v0.1.x)
264
- import { createThaiWord, createJapaneseWord } from "glost";
265
-
266
- // After (v0.2.0+)
267
- import { createThaiWord } from "glost-th";
268
- import { createJapaneseWord } from "glost-ja";
269
- ```
270
-
271
- See [MIGRATION.md](../../MIGRATION.md) for complete upgrade guide.
272
-
273
- ### Internal Changes
274
-
275
- - Fixed circular dependencies (changed `glost/src/*` imports to relative imports)
276
- - Reduced package size by ~30%
277
- - Improved build performance
278
-
279
- ### What Stays in Core
280
-
281
- All core functionality remains unchanged:
282
-
283
- - ✅ `createGLOSTWordNode()` - Generic word creation
284
- - ✅ `createGLOSTSentenceNode()` - Sentence creation
285
- - ✅ `createGLOSTRootNode()` - Document creation
286
- - ✅ `createSimpleWord()` - Simple word helper
287
- - ✅ All tree traversal utilities
288
- - ✅ Type guards and validators
289
-
290
- ## 0.1.1
291
-
292
- ### Patch Changes
293
-
294
- - fix names
295
- - Updated dependencies
296
- - glost-common@0.1.1
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * GLOST Migration CLI
4
- *
5
- * Command-line interface for migrating GLOST documents
6
- */
7
- export {};
8
- //# sourceMappingURL=migrate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/cli/migrate.ts"],"names":[],"mappings":";AACA;;;;GAIG"}