@hyperfixi/patterns-reference 2.5.1 → 2.7.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/README.md +16 -21
- package/data/engine-verification.json +865 -0
- package/data/patterns.db +0 -0
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/{index-BhzKat9K.d.mts → index-1ENU9L4F.d.mts} +1 -1
- package/dist/{index-BhzKat9K.d.ts → index-1ENU9L4F.d.ts} +1 -1
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +73 -1
- package/dist/index.mjs +70 -3
- package/dist/{llm-B7pwZ472.d.ts → llm-BfjUr-al.d.mts} +6 -5
- package/dist/{llm-4zwmAvZ8.d.mts → llm-FVj71n77.d.ts} +6 -5
- package/dist/sync/index.d.mts +41 -2
- package/dist/sync/index.d.ts +41 -2
- package/dist/sync/index.js +71 -0
- package/dist/sync/index.mjs +68 -1
- package/package.json +10 -7
- package/src/api/patterns.ts +6 -4
- package/src/database/connection.ts +9 -0
- package/src/index.ts +6 -0
- package/src/sync/db-stamp.ts +111 -0
- package/src/sync/index.ts +9 -0
- package/src/sync/span-mask.ts +166 -0
- package/src/sync/translation-checks.ts +282 -0
package/README.md
CHANGED
|
@@ -12,9 +12,9 @@ npm install @hyperfixi/patterns-reference
|
|
|
12
12
|
|
|
13
13
|
The package ships with a **pre-populated SQLite database** containing:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
- 164 code examples covering hyperscript commands and real-world UI patterns
|
|
16
|
+
- 3,936 translations (164 patterns × 24 languages)
|
|
17
|
+
- 648 LLM few-shot examples for code generation
|
|
18
18
|
|
|
19
19
|
No setup required - just install and use:
|
|
20
20
|
|
|
@@ -132,7 +132,7 @@ These scripts are for contributors regenerating the database. **End users don't
|
|
|
132
132
|
| `npm run populate` | Full database setup (init + translations + LLM examples) |
|
|
133
133
|
| `npm run db:init` | Initialize database with seed patterns |
|
|
134
134
|
| `npm run db:init:force` | Reinitialize database (overwrites existing) |
|
|
135
|
-
| `npm run sync:translations` | Generate translations for all
|
|
135
|
+
| `npm run sync:translations` | Generate translations for all 24 languages |
|
|
136
136
|
| `npm run seed:llm` | Generate LLM few-shot examples |
|
|
137
137
|
| `npm run validate` | Validate all patterns parse correctly |
|
|
138
138
|
| `npm run validate:fix` | Validate and update verified_parses flag |
|
|
@@ -185,23 +185,18 @@ Prompt/completion pairs for few-shot learning.
|
|
|
185
185
|
|
|
186
186
|
## Supported Languages
|
|
187
187
|
|
|
188
|
-
The database supports
|
|
189
|
-
|
|
190
|
-
|
|
|
191
|
-
| ---------- |
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
| Korean | ko | SOV |
|
|
201
|
-
| Turkish | tr | SOV |
|
|
202
|
-
| Quechua | qu | SOV |
|
|
203
|
-
| Arabic | ar | VSO |
|
|
204
|
-
| German | de | V2 |
|
|
188
|
+
The database supports 24 languages with different word orders:
|
|
189
|
+
|
|
190
|
+
| Word Order | Languages |
|
|
191
|
+
| ---------- | ------------------------------------------ |
|
|
192
|
+
| SVO | en, es, fr, pt, it, id, ms, sw, zh, vi, tl |
|
|
193
|
+
| SOV | ja, ko, tr, qu, hi, bn |
|
|
194
|
+
| VSO | ar |
|
|
195
|
+
| V2 | de |
|
|
196
|
+
| Other | ru, uk, pl, th, he |
|
|
197
|
+
|
|
198
|
+
Languages are derived dynamically from `KNOWN_PROFILES` in `@lokascript/semantic`;
|
|
199
|
+
adding a profile there automatically picks up in the next `npm run sync:translations`.
|
|
205
200
|
|
|
206
201
|
## Integration with @lokascript/semantic
|
|
207
202
|
|