@polyglot-bundles/th-syllabi 1.3.1 → 1.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"shared-Cpn5kpPR.js","names":[],"sources":["../src/shared.ts"],"sourcesContent":["/**\n * Shared types and utilities for SYLLST content.\n * `CEFRLevel` is the canonical type from `@polyglot-bundles/syllabi-base`\n * (was previously inlined locally; see #13).\n */\n\nimport type { CEFRLevel } from \"@polyglot-bundles/syllabi-base\";\nexport type { CEFRLevel };\n\n/**\n * Difficulty levels\n */\nexport type Difficulty = 'beginner' | 'intermediate' | 'advanced';\n\n/**\n * Icon types for syllabi\n */\nexport type SyllabusIcon =\n | 'alphabet'\n | 'dialogue'\n | 'vocabulary'\n | 'grammar'\n | 'reading'\n | 'numbers'\n | 'food'\n | 'travel';\n\n/**\n * Configuration for a syllabus content package\n */\nexport interface SyllabusConfig {\n /** Unique syllabus ID (e.g., \"th-alphabet\") */\n id: string;\n /** Display title */\n title: string;\n /** Description */\n description: string;\n /** Language code (ISO 639-1) */\n language: string;\n /** Locale code (e.g., \"th-TH\") */\n locale: string;\n /** Number of lessons */\n lessonCount: number;\n /** Difficulty level */\n difficulty: Difficulty;\n /** CEFR level */\n cefrLevel: CEFRLevel;\n /** Icon for display */\n icon?: SyllabusIcon;\n /** Package version */\n version: string;\n}\n\n/**\n * Result of loading a lesson\n */\nexport interface LoadedLesson {\n /** Lesson number (1-indexed) */\n number: number;\n /** Raw MDX content */\n rawContent: string;\n}\n\n/**\n * Content loader interface\n */\nexport interface ContentLoader {\n /** Syllabus configuration */\n config: SyllabusConfig;\n /** Load a single lesson by number */\n loadLesson(lessonNumber: number): Promise<LoadedLesson>;\n /** Load all lessons */\n loadAllLessons(): Promise<LoadedLesson[]>;\n /** Get list of available lesson numbers */\n getAvailableLessons(): number[];\n}\n\n/**\n * Create a content loader from config and lesson loader function\n */\nexport function createContentLoader(\n config: SyllabusConfig,\n loadLessonMDX: (lessonNumber: number) => Promise<{ default: string }>\n): ContentLoader {\n return {\n config,\n\n async loadLesson(lessonNumber: number): Promise<LoadedLesson> {\n if (lessonNumber < 1 || lessonNumber > config.lessonCount) {\n throw new Error(`Lesson ${lessonNumber} not found. Valid range: 1-${config.lessonCount}`);\n }\n const module = await loadLessonMDX(lessonNumber);\n return {\n number: lessonNumber,\n rawContent: module.default,\n };\n },\n\n async loadAllLessons(): Promise<LoadedLesson[]> {\n const lessons: LoadedLesson[] = [];\n for (let i = 1; i <= config.lessonCount; i++) {\n lessons.push(await this.loadLesson(i));\n }\n return lessons;\n },\n\n getAvailableLessons(): number[] {\n return Array.from({ length: config.lessonCount }, (_, i) => i + 1);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAgFA,SAAgB,EACd,GACA,GACe;AACf,QAAO;EACL;EAEA,MAAM,WAAW,GAA6C;AAC5D,OAAI,IAAe,KAAK,IAAe,EAAO,YAC5C,OAAU,MAAM,UAAU,EAAa,6BAA6B,EAAO,cAAc;AAG3F,UAAO;IACL,QAAQ;IACR,aAHa,MAAM,EAAc,EAAa,EAG3B;IACpB;;EAGH,MAAM,iBAA0C;GAC9C,IAAM,IAA0B,EAAE;AAClC,QAAK,IAAI,IAAI,GAAG,KAAK,EAAO,aAAa,IACvC,GAAQ,KAAK,MAAM,KAAK,WAAW,EAAE,CAAC;AAExC,UAAO;;EAGT,sBAAgC;AAC9B,UAAO,MAAM,KAAK,EAAE,QAAQ,EAAO,aAAa,GAAG,GAAG,MAAM,IAAI,EAAE;;EAErE"}
1
+ {"version":3,"file":"shared-Cpn5kpPR.js","names":[],"sources":["../src/shared.ts"],"sourcesContent":["/**\r\n * Shared types and utilities for SYLLST content.\r\n * `CEFRLevel` is the canonical type from `@polyglot-bundles/syllabi-base`\r\n * (was previously inlined locally; see #13).\r\n */\r\n\r\nimport type { CEFRLevel } from \"@polyglot-bundles/syllabi-base\";\r\nexport type { CEFRLevel };\r\n\r\n/**\r\n * Difficulty levels\r\n */\r\nexport type Difficulty = 'beginner' | 'intermediate' | 'advanced';\r\n\r\n/**\r\n * Icon types for syllabi\r\n */\r\nexport type SyllabusIcon =\r\n | 'alphabet'\r\n | 'dialogue'\r\n | 'vocabulary'\r\n | 'grammar'\r\n | 'reading'\r\n | 'numbers'\r\n | 'food'\r\n | 'travel';\r\n\r\n/**\r\n * Configuration for a syllabus content package\r\n */\r\nexport interface SyllabusConfig {\r\n /** Unique syllabus ID (e.g., \"th-alphabet\") */\r\n id: string;\r\n /** Display title */\r\n title: string;\r\n /** Description */\r\n description: string;\r\n /** Language code (ISO 639-1) */\r\n language: string;\r\n /** Locale code (e.g., \"th-TH\") */\r\n locale: string;\r\n /** Number of lessons */\r\n lessonCount: number;\r\n /** Difficulty level */\r\n difficulty: Difficulty;\r\n /** CEFR level */\r\n cefrLevel: CEFRLevel;\r\n /** Icon for display */\r\n icon?: SyllabusIcon;\r\n /** Package version */\r\n version: string;\r\n}\r\n\r\n/**\r\n * Result of loading a lesson\r\n */\r\nexport interface LoadedLesson {\r\n /** Lesson number (1-indexed) */\r\n number: number;\r\n /** Raw MDX content */\r\n rawContent: string;\r\n}\r\n\r\n/**\r\n * Content loader interface\r\n */\r\nexport interface ContentLoader {\r\n /** Syllabus configuration */\r\n config: SyllabusConfig;\r\n /** Load a single lesson by number */\r\n loadLesson(lessonNumber: number): Promise<LoadedLesson>;\r\n /** Load all lessons */\r\n loadAllLessons(): Promise<LoadedLesson[]>;\r\n /** Get list of available lesson numbers */\r\n getAvailableLessons(): number[];\r\n}\r\n\r\n/**\r\n * Create a content loader from config and lesson loader function\r\n */\r\nexport function createContentLoader(\r\n config: SyllabusConfig,\r\n loadLessonMDX: (lessonNumber: number) => Promise<{ default: string }>\r\n): ContentLoader {\r\n return {\r\n config,\r\n\r\n async loadLesson(lessonNumber: number): Promise<LoadedLesson> {\r\n if (lessonNumber < 1 || lessonNumber > config.lessonCount) {\r\n throw new Error(`Lesson ${lessonNumber} not found. Valid range: 1-${config.lessonCount}`);\r\n }\r\n const module = await loadLessonMDX(lessonNumber);\r\n return {\r\n number: lessonNumber,\r\n rawContent: module.default,\r\n };\r\n },\r\n\r\n async loadAllLessons(): Promise<LoadedLesson[]> {\r\n const lessons: LoadedLesson[] = [];\r\n for (let i = 1; i <= config.lessonCount; i++) {\r\n lessons.push(await this.loadLesson(i));\r\n }\r\n return lessons;\r\n },\r\n\r\n getAvailableLessons(): number[] {\r\n return Array.from({ length: config.lessonCount }, (_, i) => i + 1);\r\n },\r\n };\r\n}\r\n"],"mappings":";;;;;;;;;;;AAgFA,SAAgB,EACd,GACA,GACe;AACf,QAAO;EACL;EAEA,MAAM,WAAW,GAA6C;AAC5D,OAAI,IAAe,KAAK,IAAe,EAAO,YAC5C,OAAU,MAAM,UAAU,EAAa,6BAA6B,EAAO,cAAc;AAG3F,UAAO;IACL,QAAQ;IACR,aAHa,MAAM,EAAc,EAAa,EAG3B;IACpB;;EAGH,MAAM,iBAA0C;GAC9C,IAAM,IAA0B,EAAE;AAClC,QAAK,IAAI,IAAI,GAAG,KAAK,EAAO,aAAa,IACvC,GAAQ,KAAK,MAAM,KAAK,WAAW,EAAE,CAAC;AAExC,UAAO;;EAGT,sBAAgC;AAC9B,UAAO,MAAM,KAAK,EAAE,QAAQ,EAAO,aAAa,GAAG,GAAG,MAAM,IAAI,EAAE;;EAErE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-bundles/th-syllabi",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Thai syllabi - all Thai language syllabi in one package",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,10 +55,10 @@
55
55
  "tsx": "^4.7.0",
56
56
  "vite": "^8.0.8",
57
57
  "vite-plugin-dts": "^4.5.4",
58
- "@polyglot-bundles/content-shared": "0.7.1",
59
- "@polyglot-bundles/syllabi-base": "0.7.1",
58
+ "@polyglot-bundles/content-shared": "0.8.0",
59
+ "@polyglot-bundles/syllabi-base": "0.8.0",
60
60
  "@polyglot-bundles/lang-tooling": "0.0.0",
61
- "@polyglot-bundles/th-lang": "1.3.1"
61
+ "@polyglot-bundles/th-lang": "1.3.3"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@syllst/core": "^0.7.0",