@lokascript/htmx-adapter 6.0.0 → 6.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 +133 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,136 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.2.0] - 2026-10-18
|
|
11
|
+
|
|
12
|
+
The `@lokascript/semantic/core` path weighs about a third less, and its lexicons now register with
|
|
13
|
+
it. MCP `get_diagnostics` gives the engine's verdict for English, and a multi-line BehaviorSpec with
|
|
14
|
+
a line it cannot read is refused instead of compiled without it.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`@hyperfixi/mcp-server`: `get_diagnostics` gives the engine's verdict for English, where it
|
|
19
|
+
stopped** (#1575). Measured on 672 inputs (the agent bench and the docs patterns, in en/ja/es/ar), it
|
|
20
|
+
flagged 6 of the 27 English inputs the engine rejects, none with a position; gave 9 false errors
|
|
21
|
+
on English the engine reads (8 of them a possessive `'s` read as an open quote); and warned 467
|
|
22
|
+
`possible-typo`s, 391 on ja/es/ar words checked against an English command list. Now: 27 of 27,
|
|
23
|
+
each at the token where the engine stopped; 0 false errors (semantic's doubts about English the
|
|
24
|
+
engine reads are warnings); and a "did you mean" only for the word the engine stopped on
|
|
25
|
+
(`toggel`, not `and`), never off English. Style advice (`wait` over `setTimeout`, `then` between
|
|
26
|
+
commands) stays.
|
|
27
|
+
|
|
28
|
+
- **`@lokascript/semantic`: `lexicons/<code>` registers its vocabulary with `./core`.** Each
|
|
29
|
+
lexicon file bundled a private copy of the lexicon registry, so a page that imported
|
|
30
|
+
`@lokascript/semantic/core`, `languages/ja` and `lexicons/ja` registered the Japanese words in a
|
|
31
|
+
Map `render` never read, and value words stayed English (`私の valueに` for `私の 値 に`). The root
|
|
32
|
+
entry and the browser bundles were not affected. `test/core-subpaths.test.ts` holds it on the
|
|
33
|
+
built files (#1577).
|
|
34
|
+
|
|
35
|
+
- **`@hyperfixi/mcp-server`: a multi-line BehaviorSpec with a line it cannot read is refused,
|
|
36
|
+
not compiled without it** (lokascript-domains #54). On `@lokascript/domains` 5.0.1,
|
|
37
|
+
`compile_behaviorspec` answered `ok: true` for `test "Login"` / `given page /login` /
|
|
38
|
+
`when I click #submit` / `then #result is visible` with only the `goto`: the two lines it
|
|
39
|
+
could not read were gone. mcp-server is on domains 5.0.2, whose `compileBehaviorSpec` throws a
|
|
40
|
+
`BehaviorSpecError`; the multi-line handler answers `ok: false` with `errors` (one per line)
|
|
41
|
+
and the rest under `partial`, never `code`. `validate_behaviorspec` reports what compile would
|
|
42
|
+
refuse (a `given page /login when …` URL that takes the rest of its line), and
|
|
43
|
+
`translate_behaviorspec` refuses such a spec whole (`translated` and `playwright` are `null`)
|
|
44
|
+
instead of translating what remained (#1576).
|
|
45
|
+
|
|
46
|
+
- **`@lokascript/compilation-service`: `/health` reports the package's version**, not the `1.4.0`
|
|
47
|
+
literal it reported through 6.1.0 (`src/version.ts`, rewritten by `set-version.cjs`; #1576).
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **`@lokascript/semantic`: the `./core` + `./languages/<code>` path weighs about a third less.**
|
|
52
|
+
Measured with esbuild (minified, gzip -9) on learn's ten languages with their lexicons:
|
|
53
|
+
275 KB → 180 KB; `./core` alone 155 KB → 120 KB; core with one language and its lexicon
|
|
54
|
+
168 KB → 133 KB. Two packaging changes: `KNOWN_PROFILES` is marked pure, so a bundle that does
|
|
55
|
+
not use it drops the profiles of languages it never imports (35 KB); and the language and
|
|
56
|
+
lexicon modules share their common code in chunks instead of a copy each (60 KB over ten).
|
|
57
|
+
Through the packed tarball, the bundled path renders exactly what the root entry does (1,476 of
|
|
58
|
+
1,476 pairs: 164 docs patterns × 9 languages, there and back), and the root entry is unchanged
|
|
59
|
+
(3,772 of 3,772 pairs against 6.1.0). `@hyperfixi/vite-plugin`'s debug size table is
|
|
60
|
+
re-measured (one language ~130–135 KB, `all` ~222 KB) (#1577).
|
|
61
|
+
|
|
62
|
+
- **`@lokascript/language-server` on `vscode-languageserver` 10** (protocol 3.18; replaces
|
|
63
|
+
Dependabot #1278), and the LokaScript VS Code extension on `vscode-languageclient` 10 (#1279),
|
|
64
|
+
which needs VS Code 1.91 (`engines.vscode` was `^1.85.0`). 10.x adds an exports map without
|
|
65
|
+
`./node.js`, so the server imports `vscode-languageserver/node`; a diagnostic's `message` may be
|
|
66
|
+
`MarkupContent` in 3.18, so the code actions read its text either way. Over stdio the server
|
|
67
|
+
answers as 6.1.0 does: the same capabilities, the engine's parse error at the same position,
|
|
68
|
+
hover and completion (#1579).
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
|
|
72
|
+
- **`@lokascript/semantic/core` exports `getAllTranslations` and `getAllTranslationsWithStatus`**,
|
|
73
|
+
over the languages a page registered. lokascript-learn's playground imported the root entry, and
|
|
74
|
+
with it all 24 languages, for this one function (#1577).
|
|
75
|
+
|
|
76
|
+
### Deprecated
|
|
77
|
+
|
|
78
|
+
- **`@hyperfixi/mcp-server`: `parse_multilingual`, removed in 7.0.** It returns only the top node
|
|
79
|
+
(every handler as `on` and its event) and reported success on 21 of the 27 English inputs the
|
|
80
|
+
engine rejects; `validate_and_compile` returns the whole IR and the engine's verdict. Its
|
|
81
|
+
description starts "Deprecated", and each result carries a second text block naming the
|
|
82
|
+
replacement (#1575).
|
|
83
|
+
|
|
84
|
+
## [6.1.0] - 2026-10-18
|
|
85
|
+
|
|
86
|
+
One validator and one translator: MCP `validate_and_compile` accepts the English the engine reads
|
|
87
|
+
and warns `NAME_COLLISION`, and `validate_hyperscript` and `translate_hyperscript` are deprecated for
|
|
88
|
+
7.0. `@hyperfixi/vite-plugin`'s `slavic` and `south-asian` regions load their languages.
|
|
89
|
+
|
|
90
|
+
### Added
|
|
91
|
+
|
|
92
|
+
- **`@lokascript/compilation-service`: `validate` warns `NAME_COLLISION`** on foreign input whose
|
|
93
|
+
variable is spelled like a word of its own language (es `si` is also `if`), with the rename
|
|
94
|
+
semantic's finder suggests: the one check MCP `validate_hyperscript` made that `validate_and_compile`
|
|
95
|
+
did not, with its wording and its confidence floor (#1568).
|
|
96
|
+
- **`@lokascript/compilation-service`: a README** (#1570). `files` listed one, but the package had
|
|
97
|
+
none.
|
|
98
|
+
|
|
99
|
+
### Deprecated
|
|
100
|
+
|
|
101
|
+
- **`@hyperfixi/mcp-server`: `validate_hyperscript` and `translate_hyperscript`, removed in 7.0**
|
|
102
|
+
(#1569).
|
|
103
|
+
Measured 2026-10-18 on 6.0.0, through the server:
|
|
104
|
+
- `translate_hyperscript` returns `translate_code`'s text on 471 of 471 pairs, with the same 21
|
|
105
|
+
refusals; `translate_code` adds a fidelity `verification` and `NAME_COLLISION` warnings.
|
|
106
|
+
- On 672 inputs `validate_hyperscript` caught nothing `validate_and_compile` missed, and every
|
|
107
|
+
warning only it gave was a false alarm (a fixed list of 34 event names; an if/end count). Its one
|
|
108
|
+
useful check, `NAME_COLLISION`, is in `validate_and_compile` now.
|
|
109
|
+
|
|
110
|
+
Both still work. Their descriptions start "Deprecated", and each result carries a second text block
|
|
111
|
+
naming the replacement. The skills, the mcp-server README, MIGRATION.md and the LLM-tool checklist
|
|
112
|
+
name only `validate_and_compile` and `translate_code`. The lokascript-multilingual skill had called
|
|
113
|
+
`translate_hyperscript` keyword substitution that does not reorder words, which was not true.
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
|
|
117
|
+
- **`@lokascript/compilation-service`: `validate` (MCP `validate_and_compile`) no longer rejects
|
|
118
|
+
English the engine reads.** Of the 1,128 command-shape cases `@hyperfixi/engine` reads, it
|
|
119
|
+
rejected 90:
|
|
120
|
+
- every behavior definition (a `BehaviorNode` keeps its name as a field, and the schema check read
|
|
121
|
+
it as a missing role; this also failed behaviors in every other language);
|
|
122
|
+
- 73 parses under semantic's default confidence bar (`init`, `when`, `def`, `live`, bare `hide`, …);
|
|
123
|
+
- a quoted event name semantic does not read, and `wait for <event>`.
|
|
124
|
+
|
|
125
|
+
For natural-language English the engine's parse now decides `ok`, and semantic's doubts come back
|
|
126
|
+
as warnings that say the IR may leave part of the code out. A request that sets `confidence`
|
|
127
|
+
keeps them as errors, as does foreign input, which runs as semantic's translation. On the agent
|
|
128
|
+
bench every correct rejection was already the engine's (16 of 16), so none moved.
|
|
129
|
+
testing-framework's `validate-agrees-with-engine.test.ts` holds the 1,128 at 0 rejected (#1566).
|
|
130
|
+
|
|
131
|
+
- **`@hyperfixi/vite-plugin`: `region: 'slavic'` and `region: 'south-asian'` load their languages**
|
|
132
|
+
(#1567).
|
|
133
|
+
Both were in the option's type and the README's language list, but the expansion had a
|
|
134
|
+
hand-written case per region and none for these two, so they loaded English alone. Regions now
|
|
135
|
+
expand from `REGIONS` itself, and the README's region table lists both. The debug size table
|
|
136
|
+
(`SEMANTIC_BUNDLE_SIZES`, January 2025) is re-measured by a new
|
|
137
|
+
`scripts/measure-semantic-sizes.ts`: semantic's core plus one language is ~163–175 KB gzipped,
|
|
138
|
+
not the ~14–20 KB it claimed (`all` ~383 KB, not ~61 KB).
|
|
139
|
+
|
|
10
140
|
## [6.0.0] - 2026-10-18
|
|
11
141
|
|
|
12
142
|
Removes `@lokascript/compilation-service`'s test and component generation, deprecated in 5.1.0. For
|
|
@@ -1943,7 +2073,9 @@ _Synchronized version release. See git history for details._
|
|
|
1943
2073
|
- npm access token stored in GitHub Secrets
|
|
1944
2074
|
- 2FA recommended for npm organization
|
|
1945
2075
|
|
|
1946
|
-
[Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.
|
|
2076
|
+
[Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.2.0...HEAD
|
|
2077
|
+
[6.2.0]: https://github.com/codetalcott/hyperfixi/compare/v6.1.0...v6.2.0
|
|
2078
|
+
[6.1.0]: https://github.com/codetalcott/hyperfixi/compare/v6.0.0...v6.1.0
|
|
1947
2079
|
[6.0.0]: https://github.com/codetalcott/hyperfixi/compare/v5.1.0...v6.0.0
|
|
1948
2080
|
[5.1.0]: https://github.com/codetalcott/hyperfixi/compare/v5.0.0...v5.1.0
|
|
1949
2081
|
[5.0.0]: https://github.com/codetalcott/hyperfixi/compare/v4.8.0...v5.0.0
|
package/dist/index.d.cts
CHANGED
|
@@ -410,4 +410,5 @@ declare function autoDetectBodyHooks(win: object): void;
|
|
|
410
410
|
/** Reset all body-hook state. Mainly for tests. */
|
|
411
411
|
declare function resetBodyHooks(): void;
|
|
412
412
|
|
|
413
|
-
export {
|
|
413
|
+
export { EXTENSION_NAME, TOP_LEVEL_COMMA_RE, additionalAttributeSelectors, attributeResolver, autoDetectBodyHooks, canonicalizeElement, canonicalizeTree, claimHxOnAttribute, claimedAttrNames, createExtension, hasAnyVocab, hasBodyExecutor, hasBodyTranslator, installAutoSweep, installResolverMode, isClaimed, isLangRegistered, isResolverMode, langOf, neutralizesOnClaim, normLang, onBodyHooksChanged, onVocabUpdate, register, registerWith, removeClaimedCanonicalAttrs, resetBodyHooks, resetRegistry, setBodyExecutor, setBodyTranslator, setNeutralizeOnClaim, setResolverMode, setTriggerSpecSplitter, translateTriggerValue, vocabFor, wasCreatedByAdapter };
|
|
414
|
+
export type { BodyExecutor, BodyTranslator, ClaimOptions, HtmxLike, HtmxVocab, TriggerSpecSplitter, VocabPayload };
|
package/dist/index.d.ts
CHANGED
|
@@ -410,4 +410,5 @@ declare function autoDetectBodyHooks(win: object): void;
|
|
|
410
410
|
/** Reset all body-hook state. Mainly for tests. */
|
|
411
411
|
declare function resetBodyHooks(): void;
|
|
412
412
|
|
|
413
|
-
export {
|
|
413
|
+
export { EXTENSION_NAME, TOP_LEVEL_COMMA_RE, additionalAttributeSelectors, attributeResolver, autoDetectBodyHooks, canonicalizeElement, canonicalizeTree, claimHxOnAttribute, claimedAttrNames, createExtension, hasAnyVocab, hasBodyExecutor, hasBodyTranslator, installAutoSweep, installResolverMode, isClaimed, isLangRegistered, isResolverMode, langOf, neutralizesOnClaim, normLang, onBodyHooksChanged, onVocabUpdate, register, registerWith, removeClaimedCanonicalAttrs, resetBodyHooks, resetRegistry, setBodyExecutor, setBodyTranslator, setNeutralizeOnClaim, setResolverMode, setTriggerSpecSplitter, translateTriggerValue, vocabFor, wasCreatedByAdapter };
|
|
414
|
+
export type { BodyExecutor, BodyTranslator, ClaimOptions, HtmxLike, HtmxVocab, TriggerSpecSplitter, VocabPayload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokascript/htmx-adapter",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Multilingual adapter for upstream htmx v4 — author hx-* attributes in 24 languages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@playwright/test": "^1.63.0",
|
|
46
46
|
"@types/node": "^26.6.3",
|
|
47
47
|
"jsdom": "^30.1.1",
|
|
48
|
-
"tsup": "^
|
|
48
|
+
"tsup": "^9.0.0",
|
|
49
49
|
"typescript": "^5.0.0",
|
|
50
50
|
"vitest": "^5.0.2"
|
|
51
51
|
},
|