@hyperfixi/patterns-reference 3.1.1 → 3.2.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 +145 -0
- package/README.md +47 -36
- package/data/engine-verification.json +40 -38
- package/data/patterns.db +0 -0
- package/data/patterns.db.stamp +1 -0
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +198 -98
- package/dist/api/index.mjs +197 -100
- package/dist/{index-6GkHj5yJ.d.mts → index-CoDUfq2P.d.mts} +39 -3
- package/dist/{index-6GkHj5yJ.d.ts → index-CoDUfq2P.d.ts} +39 -3
- package/dist/index.d.mts +87 -13
- package/dist/index.d.ts +87 -13
- package/dist/index.js +261 -144
- package/dist/index.mjs +258 -146
- package/dist/{llm-B5nGz8V1.d.mts → llm-CCCSw-yp.d.ts} +21 -10
- package/dist/{llm-rEdJQScF.d.ts → llm-PxnriEZ_.d.mts} +21 -10
- package/dist/sync/index.d.mts +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.js +4 -1
- package/dist/sync/index.mjs +4 -1
- package/package.json +16 -16
- package/src/adapters/llm-adapter.ts +64 -42
- package/src/api/engine-filter.ts +37 -0
- package/src/api/llm.ts +54 -64
- package/src/api/patterns.ts +92 -30
- package/src/api/roles.ts +6 -4
- package/src/api/translations.ts +34 -27
- package/src/database/connection.ts +16 -4
- package/src/html-snippets.ts +39 -10
- package/src/index.ts +12 -2
- package/src/registry/patterns-provider.ts +3 -1
- package/src/sync/db-stamp.ts +7 -4
- package/src/sync/markup-attributes.ts +15 -0
- package/src/sync/verify-parses.ts +42 -0
- package/src/types/better-sqlite3.d.ts +2 -0
- package/src/types/index.ts +44 -2
- package/src/sync/span-mask.ts +0 -166
- package/src/sync/translation-checks.ts +0 -282
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,151 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.2.0] - 2026-09-30
|
|
11
|
+
|
|
12
|
+
A correctness release for multilingual hyperscript. The semantic parser behind
|
|
13
|
+
`translate()`, `@lokascript/hyperscript-adapter`, MCP `translate_code` and hyperfixi's
|
|
14
|
+
non-English path now keeps whole programs that it used to shorten or drop: values,
|
|
15
|
+
conditions, loops and handler heads. Every value shape in a generated matrix of 4,205
|
|
16
|
+
(executed in 24 languages, directly and through the adapter, against upstream
|
|
17
|
+
\_hyperscript) now matches upstream, apart from two documented differences. Core
|
|
18
|
+
matches upstream \_hyperscript on more forms.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **Counted loops are written in each language's own words**: es `repetir 3 veces`,
|
|
23
|
+
fr `répéter 3 fois`, ja `3 回 を 繰り返し`, hi `3 बार को दोहराएं`, where translations
|
|
24
|
+
wrote English `times` in 18 languages and English `repeat` in the SOV six. English
|
|
25
|
+
`times`/`repeat` and each language's other count words (es `vez`, ru `раза`, …) still
|
|
26
|
+
read. 18 i18n dictionaries gain a `temporal.times` word.
|
|
27
|
+
- **Variable names that are words of the target language.** A variable spelled like a
|
|
28
|
+
structure word (es `si`, pl `w`, tr `al`) is written in parentheses, `(si)`, where the
|
|
29
|
+
plain translation would be misread, and read back as the variable. The language server
|
|
30
|
+
warns (`name-collision`, with a rename quick fix), MCP `validate_hyperscript` reports
|
|
31
|
+
`NAME_COLLISION`, and `translate_code` warns when a variable reads as a value word in
|
|
32
|
+
the target (tl `ako` is `me`). `@lokascript/semantic` exports `nameCollision`,
|
|
33
|
+
`findNameCollisions` and `findTranslationCollisions`.
|
|
34
|
+
- Event-handler modifiers (`once`, `debounced at`, `throttled at`, `from`) render in every
|
|
35
|
+
language and are scored by the fidelity signals.
|
|
36
|
+
- `of`-paths and pseudo-commands (`reset() the closest <form/>`) survive translation.
|
|
37
|
+
- `@lokascript/hyperscript-adapter`'s host gate also rejects a translation that reads a
|
|
38
|
+
reference as a handler's event (`on click on me toggle .active`, an empty click handler
|
|
39
|
+
plus a handler for an event named `me`), falling back to the author's text with a
|
|
40
|
+
warning; such a translation used to parse cleanly and do nothing.
|
|
41
|
+
- **Localized htmx attributes: all 23 non-English languages now cover
|
|
42
|
+
every attribute the _Hypermedia Systems_ book's code listings use** —
|
|
43
|
+
`hx-vals`, `hx-select`, `hx-swap-oob` and `hx-sync` join the Contact.app
|
|
44
|
+
twelve (`hx-値`, `hx-valores`, `hx-값`, `hx-werte`, `hx-選択`, `hx-selección`,
|
|
45
|
+
`hx-seçim`, `hx-auswahl`, `hx-sélection`, `hx-选择`, …). tr/de/fr/zh are new
|
|
46
|
+
in the table: the Contact.app seven they lacked (`hx-sil`, `hx-löschen`,
|
|
47
|
+
`hx-supprimer`, `hx-删除`, …) plus audited trigger/swap primaries following
|
|
48
|
+
loka-js (`hx-tetikleyici`, `hx-auslöser`, `hx-déclencheur`, `hx-替换`; the
|
|
49
|
+
profile words `hx-tetikle`, `hx-auslösen`, `hx-déclencher`, `hx-交换` still
|
|
50
|
+
resolve). de gains a lowercase `hx-ziel`: the profile's `hx-Ziel` could never
|
|
51
|
+
match a parsed attribute, since HTML lowercases attribute names. The other
|
|
52
|
+
15 languages (ar, bn, he, hi, id, it, ms, pl, qu, ru, sw, th, tl, uk, vi)
|
|
53
|
+
are unreviewed drafts, every entry flagged `lowConfidence`; they also gain
|
|
54
|
+
the trigger heads their dictionaries left in English (ms and tl all six,
|
|
55
|
+
vi/he/ar some). id gains `hx-sasaran` for a target that was the English
|
|
56
|
+
identity; tl keeps `hx-target` on purpose. `hx-ext` is left in English on
|
|
57
|
+
purpose: htmx 4 removed it. The vocab table gains an `events` block for
|
|
58
|
+
trigger heads the i18n dictionaries do not name; ja, es, pt and ko author
|
|
59
|
+
the DOM `search` event (`検索`, `buscar`, `검색`), which the book's and
|
|
60
|
+
Contact.app's search box fires. htmx's own trigger words (`revealed`,
|
|
61
|
+
`every`) stay English, like the `delay:` / `from:` modifiers.
|
|
62
|
+
- Adapter-only vocab keys now resolve from the authored table alone, never
|
|
63
|
+
from a semantic profile: 22 profiles carry a `select` keyword that means
|
|
64
|
+
mark/highlight text (de `markieren`, tr `vurgula`), and it would otherwise
|
|
65
|
+
have shipped as `hx-select` in 22 unreviewed languages.
|
|
66
|
+
|
|
67
|
+
- **Localized htmx attributes: ja, es, pt and ko now cover every attribute the
|
|
68
|
+
_Hypermedia Systems_ Contact.app uses** — `hx-post`, `hx-delete`,
|
|
69
|
+
`hx-confirm`, `hx-push-url`, `hx-boost`, `hx-indicator` and `hx-include` join
|
|
70
|
+
the existing five (e.g. `hx-削除`, `hx-eliminar`, `hx-excluir`, `hx-삭제`).
|
|
71
|
+
`hx-indicator` / `hx-include` localize under `@hyperfixi/htmx-adapter` (stock
|
|
72
|
+
htmx implements them; the embedded layer does not).
|
|
73
|
+
- **Vocab aliases.** Several localized names may map to one attribute or event;
|
|
74
|
+
the first is the form to teach, later ones keep already-authored pages
|
|
75
|
+
working. Core's embedded orchestrator now reads whichever form an element
|
|
76
|
+
carries (it previously kept a single name per attribute).
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- **Rendered vocabulary** (owner decisions): `null` is written `null` in ar, hi, id, qu,
|
|
81
|
+
sw, th and tr, where it shared the word for `empty`; hi writes `no` as `कोई नहीं`; qu
|
|
82
|
+
writes `and` as `hinallataq`; tl and tr write `includes` with `contains`' word (both
|
|
83
|
+
engines read the two as one operator).
|
|
84
|
+
- `@lokascript/semantic` exports its real `VERSION` (it was `0.1.0` since the first
|
|
85
|
+
release); browser bundles report `<version>-<bundle>`.
|
|
86
|
+
- MCP `translate_hyperscript` is described accurately: it uses the same semantic engine as
|
|
87
|
+
`translate_code`, without the verification.
|
|
88
|
+
- **Audited primaries for `hx-trigger` / `hx-swap`** in ja (`hx-トリガー`,
|
|
89
|
+
`hx-置換`), es (`hx-disparador`, `hx-intercambio`), pt (`hx-gatilho`,
|
|
90
|
+
`hx-troca`) and ko (`hx-교체`), following loka-js's terminology reviews. The
|
|
91
|
+
names that shipped before (`hx-引き金`, `hx-disparar`, …) still resolve.
|
|
92
|
+
- The vocab modules are regenerated against the current i18n dictionaries.
|
|
93
|
+
**No working name was removed** — 141 retired event names and three attribute
|
|
94
|
+
names are kept as aliases. One name changed meaning with its dictionary: sw
|
|
95
|
+
`panya_juu` is now `mouseup` (was `mouseover`).
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- **Translations that lost code** (semantic parse and render, in every language):
|
|
100
|
+
- `get` of a literal (`get "hello"`, `get 3`, `get true`) dropped the whole command; an
|
|
101
|
+
object literal after `get` was cut to `get {`.
|
|
102
|
+
- Loops keep their extent and body; `repeat until` stops; a loop keeps its index
|
|
103
|
+
variable, the tail after an `if` inside it, and the command after an empty loop its own
|
|
104
|
+
`end` closes; a count may be any value (a variable, `$n`, `it`, a possessive), where
|
|
105
|
+
some translations read `forever`, a silent infinite loop.
|
|
106
|
+
- Handler heads keep `or` events, filters and event parameters; a translated
|
|
107
|
+
`wait for <event>` waits instead of throwing; behaviors keep their handlers and init
|
|
108
|
+
blocks; an else-if chain shares one `end`.
|
|
109
|
+
- Values keep their comparison phrases (`is equal to`, `includes`, `is an Element`, …),
|
|
110
|
+
`and`/`or`/`not`, `mod`, possessive and `of` chains, object and array literals, every
|
|
111
|
+
conversion core supports (`as Int`, `as Fixed:2`, piped conversions), unary minus and
|
|
112
|
+
property paths; `true`/`false`/`null` keep their meaning.
|
|
113
|
+
- Commands keep `put … into <variable>`, `tell … to show`, fetch's `do not throw` and
|
|
114
|
+
response type, event-source/socket URLs, show/hide `with` strategies, `go`/`scroll`
|
|
115
|
+
positions, `${…}` URLs, core's `has`, and a class query's `in` scope.
|
|
116
|
+
- **`@hyperfixi/core` follows upstream \_hyperscript**:
|
|
117
|
+
- `X of Y` binds as property access, and the X of a null target is null.
|
|
118
|
+
- `increment` reads its amount and counter as upstream does, and writing an object's
|
|
119
|
+
property through `'s`/`of` works.
|
|
120
|
+
- A loop's count reads as upstream's `index < times` does: `"6.5"` loops 7 times and
|
|
121
|
+
`"6abc"` none, in the full runtime and in the hybrid bundles (`hyperfixi-hx.js`,
|
|
122
|
+
plugin bundles), which read `parseInt`.
|
|
123
|
+
- Blocks close at the end of input; `morph … to`; `render … with name: value`; `beep!`
|
|
124
|
+
as an expression; `transition`'s owners, several properties, `from` and `using`; three
|
|
125
|
+
handler forms from _Hypermedia Systems_; four upstream-valid forms that compiled and
|
|
126
|
+
then failed at run time; `.item in #list` keeps its scope; `on click once` fires on
|
|
127
|
+
the first click.
|
|
128
|
+
- htmx: camelCase event names survive an attribute name.
|
|
129
|
+
- MCP: the validators report what the parsers actually did.
|
|
130
|
+
- The AOT compiler (experimental): loops were compiled to `while (true)`; targets,
|
|
131
|
+
property access, scoped queries, `empty` and variable scope now compile to what they
|
|
132
|
+
mean.
|
|
133
|
+
- `@lokascript/hyperscript-adapter` and `@hyperscript-tools/multilingual` READMEs: the
|
|
134
|
+
Japanese quickstart example was a dead button, and the multi-language example loaded
|
|
135
|
+
only the Spanish bundle; the examples are now native and run in a test. Bundle sizes are
|
|
136
|
+
measured.
|
|
137
|
+
- Bare CDN URLs now serve a browser bundle: `unpkg.com/@lokascript/hyperscript-adapter@3` (and
|
|
138
|
+
jsDelivr) served `dist/index.cjs`, which throws in a `<script>` tag. The adapter,
|
|
139
|
+
`@hyperscript-tools/multilingual`, `@lokascript/semantic`, `@hyperfixi/core` and
|
|
140
|
+
`@lokascript/htmx-adapter` declare `unpkg`/`jsdelivr` entries.
|
|
141
|
+
- `hyperfixi-multilingual.js`'s error names the semantic bundle that exists (the full
|
|
142
|
+
`browser.global.js`, the only one that defines `LokaScriptSemantic`).
|
|
143
|
+
- READMEs: `@lokascript/i18n` no longer claims to translate (and its `/lsp` export and CLI,
|
|
144
|
+
which do not exist, are gone); `@lokascript/semantic`, `@hyperfixi/vite-plugin` and
|
|
145
|
+
`@hyperfixi/core` have correct package names, API calls, language lists (24) and measured
|
|
146
|
+
bundle sizes.
|
|
147
|
+
- Dependencies: the js-yaml and smol-toml advisories; Vite 8, vitest 5 and happy-dom 20.14.
|
|
148
|
+
- **Vietnamese `hx-get` / `hx-target` / `hx-swap` / `hx-trigger` / `sse-swap`
|
|
149
|
+
never worked**: the names were emitted with spaces (`hx-lấy giá trị`), which
|
|
150
|
+
HTML reads as three attributes. They are now hyphen-joined
|
|
151
|
+
(`hx-lấy-giá-trị`), like vi's existing `hx-trực-tiếp`.
|
|
152
|
+
- 29 multi-word event names (ar, vi) were removed from the vocab modules: an
|
|
153
|
+
event is a single token of an `hx-trigger` value, so they could never match.
|
|
154
|
+
|
|
10
155
|
## [3.1.1] - 2026-09-04
|
|
11
156
|
|
|
12
157
|
### Fixed
|
package/README.md
CHANGED
|
@@ -10,11 +10,16 @@ npm install @hyperfixi/patterns-reference
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
The package ships with a **pre-populated SQLite database**
|
|
13
|
+
The package ships with a **pre-populated SQLite database** — built at publish
|
|
14
|
+
time from the released source, the same database CI's gates judge — containing
|
|
15
|
+
(counts as of 2026-09-25):
|
|
14
16
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
- 168 code examples covering hyperscript commands and real-world UI patterns,
|
|
18
|
+
each with the engine(s) mechanically verified to run it (`engine`: `both`,
|
|
19
|
+
`lokascript` = hyperfixi, `hyperscript` = upstream _hyperscript)
|
|
20
|
+
- 4,032 translations (168 patterns × 24 languages)
|
|
21
|
+
- ~660 LLM few-shot examples for code generation (an example no engine runs is
|
|
22
|
+
never served)
|
|
18
23
|
|
|
19
24
|
No setup required - just install and use:
|
|
20
25
|
|
|
@@ -61,12 +66,20 @@ getPatternsByCategory(category: string): Promise<Pattern[]>
|
|
|
61
66
|
// Get patterns containing a specific command
|
|
62
67
|
getPatternsByCommand(command: string): Promise<Pattern[]>
|
|
63
68
|
|
|
64
|
-
// Full-text search across title, code, and description
|
|
69
|
+
// Full-text search across title, code, and description (and, with
|
|
70
|
+
// `language`, that language's translation)
|
|
65
71
|
searchPatterns(query: string, options?: SearchOptions): Promise<Pattern[]>
|
|
66
72
|
|
|
67
73
|
// Get all patterns (paginated)
|
|
68
74
|
getAllPatterns(options?: SearchOptions): Promise<Pattern[]>
|
|
69
75
|
|
|
76
|
+
// SearchOptions — every filter applies, then the page (limit/offset):
|
|
77
|
+
// category the pattern's category
|
|
78
|
+
// difficulty 'beginner' | 'intermediate' | 'advanced', inferred from the code
|
|
79
|
+
// language patterns usable in that language: a translation that parses
|
|
80
|
+
// there, or markup with no hyperscript to translate
|
|
81
|
+
// engine 'hyperscript' | 'lokascript' | 'both', or null for unverified
|
|
82
|
+
|
|
70
83
|
// Get pattern statistics
|
|
71
84
|
getPatternStats(): Promise<PatternStats>
|
|
72
85
|
```
|
|
@@ -134,8 +147,8 @@ These scripts are for contributors regenerating the database. **End users don't
|
|
|
134
147
|
| `npm run db:init:force` | Reinitialize database (overwrites existing) |
|
|
135
148
|
| `npm run sync:translations` | Generate translations for all 24 languages |
|
|
136
149
|
| `npm run seed:llm` | Generate LLM few-shot examples |
|
|
137
|
-
| `npm run
|
|
138
|
-
| `npm run
|
|
150
|
+
| `npm run verify` | Re-measure `verified_parses` (populate already does) |
|
|
151
|
+
| `npm run verify:engines` | Re-verify `engine` on both engines; commit the JSON |
|
|
139
152
|
| `npm run build` | Build the package |
|
|
140
153
|
| `npm test` | Run tests in watch mode |
|
|
141
154
|
| `npm run test:run` | Run tests once |
|
|
@@ -146,42 +159,43 @@ These scripts are for contributors regenerating the database. **End users don't
|
|
|
146
159
|
|
|
147
160
|
Pattern source code from the hyperscript cookbook.
|
|
148
161
|
|
|
149
|
-
| Column | Type | Description
|
|
150
|
-
| ----------- | ---- |
|
|
151
|
-
| id | TEXT | Unique identifier
|
|
152
|
-
| title | TEXT | Human-readable title
|
|
153
|
-
| raw_code | TEXT | Hyperscript code
|
|
154
|
-
| description | TEXT | Pattern description
|
|
155
|
-
| feature | TEXT | Category (e.g., 'class-manipulation')
|
|
156
|
-
|
|
|
162
|
+
| Column | Type | Description |
|
|
163
|
+
| ----------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
164
|
+
| id | TEXT | Unique identifier |
|
|
165
|
+
| title | TEXT | Human-readable title |
|
|
166
|
+
| raw_code | TEXT | Hyperscript code |
|
|
167
|
+
| description | TEXT | Pattern description |
|
|
168
|
+
| feature | TEXT | Category (e.g., 'class-manipulation') |
|
|
169
|
+
| engine | TEXT | Engines verified to run it: `both`, `lokascript` (hyperfixi), `hyperscript` (upstream), or NULL (neither) — mechanical, CI-checked |
|
|
170
|
+
| created_at | TEXT | Creation timestamp |
|
|
157
171
|
|
|
158
172
|
### pattern_translations
|
|
159
173
|
|
|
160
174
|
Multilingual translations of patterns.
|
|
161
175
|
|
|
162
|
-
| Column | Type | Description
|
|
163
|
-
| --------------- | ------- |
|
|
164
|
-
| id | INTEGER | Auto-increment ID
|
|
165
|
-
| code_example_id | TEXT | Foreign key to code_examples
|
|
166
|
-
| language | TEXT | Language code (en, ja, es, etc.)
|
|
167
|
-
| hyperscript | TEXT | Translated code
|
|
168
|
-
| word_order | TEXT | SVO, SOV, VSO, or V2
|
|
169
|
-
| confidence | REAL | Translation confidence (0-1)
|
|
170
|
-
| verified_parses | INTEGER |
|
|
176
|
+
| Column | Type | Description |
|
|
177
|
+
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
178
|
+
| id | INTEGER | Auto-increment ID |
|
|
179
|
+
| code_example_id | TEXT | Foreign key to code_examples |
|
|
180
|
+
| language | TEXT | Language code (en, ja, es, etc.) |
|
|
181
|
+
| hyperscript | TEXT | Translated code |
|
|
182
|
+
| word_order | TEXT | SVO, SOV, VSO, or V2 |
|
|
183
|
+
| confidence | REAL | Translation confidence (0-1) |
|
|
184
|
+
| verified_parses | INTEGER | 1 when the semantic parser accepts every hyperscript body of the row in its language (measured at sync; says nothing about fidelity) |
|
|
171
185
|
|
|
172
186
|
### llm_examples
|
|
173
187
|
|
|
174
188
|
Prompt/completion pairs for few-shot learning.
|
|
175
189
|
|
|
176
|
-
| Column | Type | Description
|
|
177
|
-
| --------------- | ------- |
|
|
178
|
-
| id | INTEGER | Auto-increment ID
|
|
179
|
-
| code_example_id | TEXT | Foreign key to code_examples
|
|
180
|
-
| language | TEXT | Language code
|
|
181
|
-
| prompt | TEXT | Natural language prompt
|
|
182
|
-
| completion | TEXT | Hyperscript code
|
|
183
|
-
| quality_score | REAL | Quality rating (0-1)
|
|
184
|
-
| usage_count | INTEGER |
|
|
190
|
+
| Column | Type | Description |
|
|
191
|
+
| --------------- | ------- | ----------------------------- |
|
|
192
|
+
| id | INTEGER | Auto-increment ID |
|
|
193
|
+
| code_example_id | TEXT | Foreign key to code_examples |
|
|
194
|
+
| language | TEXT | Language code |
|
|
195
|
+
| prompt | TEXT | Natural language prompt |
|
|
196
|
+
| completion | TEXT | Hyperscript code |
|
|
197
|
+
| quality_score | REAL | Quality rating (0-1) |
|
|
198
|
+
| usage_count | INTEGER | Deprecated: reads never count |
|
|
185
199
|
|
|
186
200
|
## Supported Languages
|
|
187
201
|
|
|
@@ -249,9 +263,6 @@ npm run populate
|
|
|
249
263
|
# Run tests
|
|
250
264
|
npm test
|
|
251
265
|
|
|
252
|
-
# Validate translations
|
|
253
|
-
npm run validate
|
|
254
|
-
|
|
255
266
|
# Build
|
|
256
267
|
npm run build
|
|
257
268
|
```
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"bar": {
|
|
4
|
-
"lokascript": "compileSync(code).ok with zero recovered errors via @hyperfixi/core (same call as the browser _= path)
|
|
5
|
-
"hyperscript": "upstream _hyperscript parse with zero recovered errors (extensions loaded: socket, worker, eventsource); parse-level
|
|
6
|
-
"html": "HTML-markup patterns:
|
|
4
|
+
"lokascript": "compileSync(code).ok with zero recovered errors via @hyperfixi/core (same call as the browser _= path) with its first-party plugins installed (@hyperfixi/reactivity and @hyperfixi/realtime, both pre-installed in hyperfixi.js, and @hyperfixi/components), plus a jsdom top-level install smoke (no error within a 500ms settle window; registrations cleaned up afterwards)",
|
|
5
|
+
"hyperscript": "upstream _hyperscript parse with zero recovered errors (extensions loaded: socket, worker, eventsource, component); parse-level for plain sources",
|
|
6
|
+
"html": "HTML-markup patterns: every _= / hx-live / script-tag source, including those inside component template bodies, verified on both legs; template components rendered on both legs (non-empty, nothing logged or thrown); hx-live/sse-*/ws-* markup is hyperfixi-only (blocks the upstream claim) and earns its lokascript credit only by running in dist/hyperfixi-hx-v4.js (sse events swap into hx-target, ws-send reaches the socket, hx-live re-renders); a row with no source earns no credit"
|
|
7
7
|
},
|
|
8
|
-
"lokascriptVersion": "
|
|
8
|
+
"lokascriptVersion": "3.1.1",
|
|
9
9
|
"hyperscriptVersion": "0.9.93"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"add-class-to-other": "both",
|
|
16
16
|
"announce-screen-reader": "lokascript",
|
|
17
17
|
"append-content": "both",
|
|
18
|
-
"async-block":
|
|
18
|
+
"async-block": null,
|
|
19
19
|
"beep-debug-expression": "both",
|
|
20
20
|
"behavior-draggable": "both",
|
|
21
21
|
"behavior-removable": "both",
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"bind-non-form-display": "both",
|
|
27
27
|
"bind-two-way": "both",
|
|
28
28
|
"blur-element": "both",
|
|
29
|
+
"book-archive-download-click": "both",
|
|
30
|
+
"book-counter-increment": "both",
|
|
29
31
|
"breakpoint-command": "both",
|
|
30
32
|
"call-function": "both",
|
|
31
33
|
"caret-var-increment": "both",
|
|
@@ -33,11 +35,11 @@
|
|
|
33
35
|
"caret-var-write": "both",
|
|
34
36
|
"chained-access-possessive-dot": "both",
|
|
35
37
|
"closest-ancestor": "both",
|
|
36
|
-
"component-click-counter": "
|
|
37
|
-
"component-hello-world": "
|
|
38
|
+
"component-click-counter": "both",
|
|
39
|
+
"component-hello-world": "both",
|
|
38
40
|
"component-with-attrs": "lokascript",
|
|
39
|
-
"component-with-conditional": "
|
|
40
|
-
"component-with-slots": "
|
|
41
|
+
"component-with-conditional": "both",
|
|
42
|
+
"component-with-slots": "both",
|
|
41
43
|
"computed-value": "both",
|
|
42
44
|
"copy-to-clipboard": "both",
|
|
43
45
|
"decrement-counter": "both",
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"event-debounce": "lokascript",
|
|
49
51
|
"event-from-elsewhere": "both",
|
|
50
52
|
"event-key-combo": "both",
|
|
51
|
-
"event-once":
|
|
53
|
+
"event-once": "both",
|
|
52
54
|
"event-throttle": "both",
|
|
53
55
|
"eventsource-basic": "both",
|
|
54
56
|
"fade-out-remove": "both",
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
"fetch-json": "both",
|
|
60
62
|
"fetch-loading-state": "both",
|
|
61
63
|
"fetch-with-headers": "both",
|
|
62
|
-
"fetch-with-method": "
|
|
64
|
+
"fetch-with-method": "both",
|
|
63
65
|
"fetch-with-method-body": "both",
|
|
64
66
|
"first-in-parent": "both",
|
|
65
67
|
"focus-element": "both",
|
|
@@ -104,7 +106,7 @@
|
|
|
104
106
|
"modal-close-escape": "both",
|
|
105
107
|
"modal-open": "both",
|
|
106
108
|
"morph-fetch-result": "both",
|
|
107
|
-
"morph-form-update": "
|
|
109
|
+
"morph-form-update": "both",
|
|
108
110
|
"morph-with-template": "both",
|
|
109
111
|
"multiple-events": "both",
|
|
110
112
|
"next-element": "both",
|
|
@@ -139,7 +141,7 @@
|
|
|
139
141
|
"settle-animations": "both",
|
|
140
142
|
"show-element": "both",
|
|
141
143
|
"show-with-transition": "both",
|
|
142
|
-
"slide-toggle": "
|
|
144
|
+
"slide-toggle": "both",
|
|
143
145
|
"socket-basic": "both",
|
|
144
146
|
"socket-send": "both",
|
|
145
147
|
"sse-connect-swap": "lokascript",
|
|
@@ -203,8 +205,9 @@
|
|
|
203
205
|
"hyperscript": true
|
|
204
206
|
},
|
|
205
207
|
"async-block": {
|
|
206
|
-
"lokascript":
|
|
208
|
+
"lokascript": false,
|
|
207
209
|
"hyperscript": false,
|
|
210
|
+
"lokascriptError": "Unexpected token: fetch",
|
|
208
211
|
"hyperscriptError": "Unexpected Token : async"
|
|
209
212
|
},
|
|
210
213
|
"beep-debug-expression": {
|
|
@@ -248,6 +251,14 @@
|
|
|
248
251
|
"lokascript": true,
|
|
249
252
|
"hyperscript": true
|
|
250
253
|
},
|
|
254
|
+
"book-archive-download-click": {
|
|
255
|
+
"lokascript": true,
|
|
256
|
+
"hyperscript": true
|
|
257
|
+
},
|
|
258
|
+
"book-counter-increment": {
|
|
259
|
+
"lokascript": true,
|
|
260
|
+
"hyperscript": true
|
|
261
|
+
},
|
|
251
262
|
"breakpoint-command": {
|
|
252
263
|
"lokascript": true,
|
|
253
264
|
"hyperscript": true
|
|
@@ -278,28 +289,24 @@
|
|
|
278
289
|
},
|
|
279
290
|
"component-click-counter": {
|
|
280
291
|
"lokascript": true,
|
|
281
|
-
"hyperscript":
|
|
282
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
292
|
+
"hyperscript": true
|
|
283
293
|
},
|
|
284
294
|
"component-hello-world": {
|
|
285
295
|
"lokascript": true,
|
|
286
|
-
"hyperscript":
|
|
287
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
296
|
+
"hyperscript": true
|
|
288
297
|
},
|
|
289
298
|
"component-with-attrs": {
|
|
290
299
|
"lokascript": true,
|
|
291
300
|
"hyperscript": false,
|
|
292
|
-
"hyperscriptError": "
|
|
301
|
+
"hyperscriptError": "uncaught: \"[object Object]\" is not valid JSON"
|
|
293
302
|
},
|
|
294
303
|
"component-with-conditional": {
|
|
295
304
|
"lokascript": true,
|
|
296
|
-
"hyperscript":
|
|
297
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
305
|
+
"hyperscript": true
|
|
298
306
|
},
|
|
299
307
|
"component-with-slots": {
|
|
300
308
|
"lokascript": true,
|
|
301
|
-
"hyperscript":
|
|
302
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
309
|
+
"hyperscript": true
|
|
303
310
|
},
|
|
304
311
|
"computed-value": {
|
|
305
312
|
"lokascript": true,
|
|
@@ -343,10 +350,8 @@
|
|
|
343
350
|
"hyperscript": true
|
|
344
351
|
},
|
|
345
352
|
"event-once": {
|
|
346
|
-
"lokascript":
|
|
347
|
-
"hyperscript":
|
|
348
|
-
"lokascriptError": "Unexpected token: add",
|
|
349
|
-
"hyperscriptError": "Unexpected Token : once"
|
|
353
|
+
"lokascript": true,
|
|
354
|
+
"hyperscript": true
|
|
350
355
|
},
|
|
351
356
|
"event-throttle": {
|
|
352
357
|
"lokascript": true,
|
|
@@ -391,8 +396,7 @@
|
|
|
391
396
|
},
|
|
392
397
|
"fetch-with-method": {
|
|
393
398
|
"lokascript": true,
|
|
394
|
-
"hyperscript":
|
|
395
|
-
"hyperscriptError": "Unexpected Token : body"
|
|
399
|
+
"hyperscript": true
|
|
396
400
|
},
|
|
397
401
|
"fetch-with-method-body": {
|
|
398
402
|
"lokascript": true,
|
|
@@ -453,12 +457,12 @@
|
|
|
453
457
|
"hx-live-attribute": {
|
|
454
458
|
"lokascript": true,
|
|
455
459
|
"hyperscript": false,
|
|
456
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
460
|
+
"hyperscriptError": "uses hyperfixi-only attributes (hx-live / sse-* / ws-*)"
|
|
457
461
|
},
|
|
458
462
|
"hx-live-with-mutator": {
|
|
459
463
|
"lokascript": true,
|
|
460
464
|
"hyperscript": false,
|
|
461
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
465
|
+
"hyperscriptError": "uses hyperfixi-only attributes (hx-live / sse-* / ws-*)"
|
|
462
466
|
},
|
|
463
467
|
"if-condition": {
|
|
464
468
|
"lokascript": true,
|
|
@@ -577,8 +581,7 @@
|
|
|
577
581
|
},
|
|
578
582
|
"morph-form-update": {
|
|
579
583
|
"lokascript": true,
|
|
580
|
-
"hyperscript":
|
|
581
|
-
"hyperscriptError": "Expected 'to' but found '<<<EOF>>>'"
|
|
584
|
+
"hyperscript": true
|
|
582
585
|
},
|
|
583
586
|
"morph-with-template": {
|
|
584
587
|
"lokascript": true,
|
|
@@ -719,8 +722,7 @@
|
|
|
719
722
|
},
|
|
720
723
|
"slide-toggle": {
|
|
721
724
|
"lokascript": true,
|
|
722
|
-
"hyperscript":
|
|
723
|
-
"hyperscriptError": "Expected 'to' but found 'over'"
|
|
725
|
+
"hyperscript": true
|
|
724
726
|
},
|
|
725
727
|
"socket-basic": {
|
|
726
728
|
"lokascript": true,
|
|
@@ -733,12 +735,12 @@
|
|
|
733
735
|
"sse-connect-swap": {
|
|
734
736
|
"lokascript": true,
|
|
735
737
|
"hyperscript": false,
|
|
736
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
738
|
+
"hyperscriptError": "uses hyperfixi-only attributes (hx-live / sse-* / ws-*)"
|
|
737
739
|
},
|
|
738
740
|
"sse-multi-event": {
|
|
739
741
|
"lokascript": true,
|
|
740
742
|
"hyperscript": false,
|
|
741
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
743
|
+
"hyperscriptError": "uses hyperfixi-only attributes (hx-live / sse-* / ws-*)"
|
|
742
744
|
},
|
|
743
745
|
"stagger-animation": {
|
|
744
746
|
"lokascript": true,
|
|
@@ -868,7 +870,7 @@
|
|
|
868
870
|
"ws-connect-send": {
|
|
869
871
|
"lokascript": true,
|
|
870
872
|
"hyperscript": false,
|
|
871
|
-
"hyperscriptError": "uses hyperfixi-only attributes"
|
|
873
|
+
"hyperscriptError": "uses hyperfixi-only attributes (hx-live / sse-* / ws-*)"
|
|
872
874
|
}
|
|
873
875
|
}
|
|
874
876
|
}
|
package/data/patterns.db
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
58560c1acbd7a107e3eb6c51f5f389097ca61685698f50752dd880c8ff79851e
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as addLLMExample, b as buildFewShotContext, g as getAllPatterns, c as getAllTranslations, d as getExamplesByCommand, e as getHighConfidenceTranslations, f as getHighQualityExamples, h as getLLMExamples, i as getLLMStats, j as getMostUsedExamples, k as getPatternById, l as getPatternStats, m as getPatternsByCategory, n as getPatternsByCommand, o as getTranslation, p as getTranslationStats, q as getTranslationsByLanguage, r as getVerifiedTranslations, s as getWordOrder, t as searchPatterns, u as updateQualityScore, v as verifyTranslation } from '../llm-
|
|
2
|
-
import { C as ConnectionOptions, P as PatternRole, a as Pattern, R as RoleType } from '../index-
|
|
1
|
+
export { a as addLLMExample, b as buildFewShotContext, g as getAllPatterns, c as getAllTranslations, d as getExamplesByCommand, e as getHighConfidenceTranslations, f as getHighQualityExamples, h as getLLMExamples, i as getLLMStats, j as getMostUsedExamples, k as getPatternById, l as getPatternStats, m as getPatternsByCategory, n as getPatternsByCommand, o as getTranslation, p as getTranslationStats, q as getTranslationsByLanguage, r as getVerifiedTranslations, s as getWordOrder, t as searchPatterns, u as updateQualityScore, v as verifyTranslation } from '../llm-PxnriEZ_.mjs';
|
|
2
|
+
import { C as ConnectionOptions, P as PatternRole, a as Pattern, R as RoleType } from '../index-CoDUfq2P.mjs';
|
|
3
3
|
import { SemanticRole } from '@lokascript/semantic';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as addLLMExample, b as buildFewShotContext, g as getAllPatterns, c as getAllTranslations, d as getExamplesByCommand, e as getHighConfidenceTranslations, f as getHighQualityExamples, h as getLLMExamples, i as getLLMStats, j as getMostUsedExamples, k as getPatternById, l as getPatternStats, m as getPatternsByCategory, n as getPatternsByCommand, o as getTranslation, p as getTranslationStats, q as getTranslationsByLanguage, r as getVerifiedTranslations, s as getWordOrder, t as searchPatterns, u as updateQualityScore, v as verifyTranslation } from '../llm-
|
|
2
|
-
import { C as ConnectionOptions, P as PatternRole, a as Pattern, R as RoleType } from '../index-
|
|
1
|
+
export { a as addLLMExample, b as buildFewShotContext, g as getAllPatterns, c as getAllTranslations, d as getExamplesByCommand, e as getHighConfidenceTranslations, f as getHighQualityExamples, h as getLLMExamples, i as getLLMStats, j as getMostUsedExamples, k as getPatternById, l as getPatternStats, m as getPatternsByCategory, n as getPatternsByCommand, o as getTranslation, p as getTranslationStats, q as getTranslationsByLanguage, r as getVerifiedTranslations, s as getWordOrder, t as searchPatterns, u as updateQualityScore, v as verifyTranslation } from '../llm-CCCSw-yp.js';
|
|
2
|
+
import { C as ConnectionOptions, P as PatternRole, a as Pattern, R as RoleType } from '../index-CoDUfq2P.js';
|
|
3
3
|
import { SemanticRole } from '@lokascript/semantic';
|
|
4
4
|
|
|
5
5
|
/**
|