@hyperscript-tools/multilingual 2.7.2 → 2.9.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 +393 -0
- package/dist/hyperscript-i18n-ar.global.js +5 -5
- package/dist/hyperscript-i18n-bn.global.js +5 -5
- package/dist/hyperscript-i18n-de.global.js +5 -5
- package/dist/hyperscript-i18n-east-asian.global.js +5 -5
- package/dist/hyperscript-i18n-en.global.js +7 -7
- package/dist/hyperscript-i18n-es.global.js +5 -5
- package/dist/hyperscript-i18n-fr.global.js +5 -5
- package/dist/hyperscript-i18n-he.global.js +5 -5
- package/dist/hyperscript-i18n-hi.global.js +5 -5
- package/dist/hyperscript-i18n-id.global.js +5 -5
- package/dist/hyperscript-i18n-it.global.js +5 -5
- package/dist/hyperscript-i18n-ja.global.js +5 -5
- package/dist/hyperscript-i18n-ko.global.js +5 -5
- package/dist/hyperscript-i18n-ms.global.js +5 -5
- package/dist/hyperscript-i18n-pl.global.js +5 -5
- package/dist/hyperscript-i18n-pt.global.js +5 -5
- package/dist/hyperscript-i18n-qu.global.js +5 -5
- package/dist/hyperscript-i18n-ru.global.js +5 -5
- package/dist/hyperscript-i18n-slavic.global.js +5 -5
- package/dist/hyperscript-i18n-south-asian.global.js +5 -5
- package/dist/hyperscript-i18n-southeast-asian.global.js +5 -5
- package/dist/hyperscript-i18n-sw.global.js +5 -5
- package/dist/hyperscript-i18n-th.global.js +5 -5
- package/dist/hyperscript-i18n-tl.global.js +5 -5
- package/dist/hyperscript-i18n-tr.global.js +5 -5
- package/dist/hyperscript-i18n-uk.global.js +5 -5
- package/dist/hyperscript-i18n-vi.global.js +5 -5
- package/dist/hyperscript-i18n-western.global.js +5 -5
- package/dist/hyperscript-i18n-zh.global.js +5 -5
- package/dist/hyperscript-i18n.global.js +28 -27
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING (types)
|
|
11
|
+
|
|
12
|
+
- **Domain renderers return `string | null`.** `renderSQL`, `renderJSX`, `renderTodo`,
|
|
13
|
+
`renderLLM`, `renderFlow`, `renderBDD`, `renderVoice` and `renderBehaviorSpec`
|
|
14
|
+
previously signalled "I don't know this action" with a successful-looking
|
|
15
|
+
sentinel string — `` `-- Unknown: ${node.action}` `` (or `// Unknown:` in three
|
|
16
|
+
domains). Consumers were forced into string matching, and any legitimately
|
|
17
|
+
rendered sentence starting with `--` was silently dropped. They now return
|
|
18
|
+
`null`.
|
|
19
|
+
|
|
20
|
+
**Rendered output for every previously-known action is byte-identical** — all
|
|
21
|
+
1,939 existing domain tests pass unchanged.
|
|
22
|
+
|
|
23
|
+
_Migration:_ replace sentinel sniffing with a null check. A guard of the shape
|
|
24
|
+
`if (!sentence || sentence.startsWith('--')) return null;` already handles it.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **Domains are open for extension** (`@lokascript/framework` + all 8 domain packages).
|
|
29
|
+
A consumer can add a command to a domain **without editing that package**, by
|
|
30
|
+
passing a `DomainExtension` to `createXDSL({ extensions })`. A schema plus one
|
|
31
|
+
vocabulary entry per language is enough to parse, render and compile it in all
|
|
32
|
+
of them — word order, marker placement and keyword position derive from the
|
|
33
|
+
schema and the language profiles. Vocabulary may cover a subset of the DSL's
|
|
34
|
+
languages, so it can be filled in over time. See
|
|
35
|
+
[Extending an Existing Domain](packages/framework/docs/DOMAIN_AUTHOR_GUIDE.md#extending-an-existing-domain).
|
|
36
|
+
- **`createDomainRenderer`** (`@lokascript/framework`) composes a domain's
|
|
37
|
+
hand-written per-action renderers with a schema-driven fallback, returning
|
|
38
|
+
`null` for actions it has neither for. It is what each domain's `renderX` now
|
|
39
|
+
runs, and what makes an extension command render without the domain knowing it
|
|
40
|
+
exists.
|
|
41
|
+
- **`MultilingualDSL.render(node, language)`** — render a parsed node back to
|
|
42
|
+
natural language. Chains extension renderer → domain renderer → schema
|
|
43
|
+
fallback → `null`. `parse()` + `render()` is the language-to-language path that
|
|
44
|
+
does not need a `grammarProfile`.
|
|
45
|
+
- **`getAllTranslationsWithStatus()`** (`@lokascript/semantic`) — the same result
|
|
46
|
+
as `getAllTranslations()`, plus a `failed` map naming each language that could
|
|
47
|
+
not render and why.
|
|
48
|
+
- **`createMultilingualDSL` is now a named export** of `@lokascript/framework`
|
|
49
|
+
rather than reaching consumers only through a wildcard re-export. Domains also
|
|
50
|
+
export `allProfiles`, which extension authors need.
|
|
51
|
+
- **A CHANGELOG now ships in every published package.** Determining what changed
|
|
52
|
+
between two releases previously meant probing the installed code.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- **Directional markers for `add` / `put` / `go` in es, ar, zh, fr, de, pt**
|
|
57
|
+
(`@lokascript/semantic`). Every language profile's `destination` marker is
|
|
58
|
+
locative (`on` / `على` / `在` / `sur` / `auf`) because it also serves
|
|
59
|
+
`toggle`/`show`; only English overrode it for the directional commands, so the
|
|
60
|
+
rest rendered "add .active ON #box". Now: add → es `a`, ar `إلى`, zh `到`,
|
|
61
|
+
fr `à`, de `zu`, pt `a`; put → ar `في`, zh `到`, fr `dans`, de `in`; go → es `a`,
|
|
62
|
+
ar `إلى`, fr `à`, de `zu`, pt `para`. ja `に` / ko `에` / tr `e` were already
|
|
63
|
+
directional and are unchanged.
|
|
64
|
+
|
|
65
|
+
**Parsing accepts a strict superset**: a new `RoleSpec.markerLegacy` keeps every
|
|
66
|
+
previously-rendered marker parsing, so source written against ≤2.8 keeps working.
|
|
67
|
+
Downstream consumers maintaining correction tables for these markers (as
|
|
68
|
+
`lokascript-learn` does) can now delete those entries.
|
|
69
|
+
|
|
70
|
+
- **`createSchemaRenderer` honors `svoPosition` / `sovPosition`.** It previously
|
|
71
|
+
iterated roles in declaration order and never read the positions, so a schema
|
|
72
|
+
whose declared order differed from its declaration order rendered a surface its
|
|
73
|
+
own generated pattern could not re-parse. It now sorts with the same comparator
|
|
74
|
+
pattern generation uses (**descending — higher values render earlier**). Affects
|
|
75
|
+
only custom schemas; no in-repo consumer relied on the old behavior.
|
|
76
|
+
- **Absent roles no longer leave a dangling marker.** `createSchemaRenderer` emitted
|
|
77
|
+
a role's marker even with no value, producing `analyze #content as` /
|
|
78
|
+
`#content として 分析`.
|
|
79
|
+
- **`getAllTranslations()` covers every registered language** (24) instead of a
|
|
80
|
+
frozen 13-language list, and a language that fails to render is skipped rather
|
|
81
|
+
than throwing. The full browser bundle now registers Hebrew, which was
|
|
82
|
+
registered everywhere except there.
|
|
83
|
+
- **Schema-validation diagnostics are opt-in.** `import '@lokascript/domain-llm'`
|
|
84
|
+
printed ~44 lines of `[SCHEMA VALIDATION]` stderr into every downstream test run
|
|
85
|
+
and CI log. Set `LOKASCRIPT_SCHEMA_VALIDATION=1` to see them; a standing test in
|
|
86
|
+
`@lokascript/semantic` keeps them honest.
|
|
87
|
+
- **`dsl.translate()` names the missing config field** when a language has no
|
|
88
|
+
`grammarProfile`, instead of failing deep in the transformer with
|
|
89
|
+
"No profile found for language: en". Anyone matching that exact message must update.
|
|
90
|
+
- **`defineCommand` / `getRoleSpec` validate their input.** A malformed schema now
|
|
91
|
+
fails with a message naming the field, instead of
|
|
92
|
+
`TypeError: undefined is not an object (evaluating 'schema.roles[0]')` from
|
|
93
|
+
inside the package.
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- **A corrected marker stopped parsing in nested contexts.** Three separate
|
|
98
|
+
override branches — the SOV and VSO event-handler generators and the shared
|
|
99
|
+
marker resolver — each dropped marker alternatives, so Arabic
|
|
100
|
+
`ضع هو إلى #chat` parsed standalone but not inside a `socket` block. They now
|
|
101
|
+
share one definition of what an override still accepts.
|
|
102
|
+
|
|
103
|
+
## [2.8.0] - 2026-07-25
|
|
104
|
+
|
|
105
|
+
> **Gap note:** 2.6.0 through 2.7.2 shipped without entries in this file; their
|
|
106
|
+
> details live in [GitHub Releases](https://github.com/codetalcott/hyperfixi/releases).
|
|
107
|
+
> Full notes for this release: `docs-internal/RELEASE_NOTES_v2.8.0-draft.md` (swapped
|
|
108
|
+
> into the GitHub release on publish day).
|
|
109
|
+
|
|
110
|
+
A size and correctness release: the full bundles shed a duplicated core+semantic copy (~534 → ~299 KB gz), the semantic parser closes out several multilingual correctness arcs, and the publish pipeline's gates are now honest end-to-end.
|
|
111
|
+
|
|
112
|
+
### Highlights
|
|
113
|
+
|
|
114
|
+
- **Full bundles nearly halved** (`@hyperfixi/core`): since 2.7.0 the full bundles shipped two copies of the core runtime and multilingual parser (the bundled reactivity/realtime plugins resolved `@hyperfixi/core` to its prebuilt dist alongside the bundle's own source graph). A rollup alias folds everything onto one graph: `hyperfixi.js` ~534 → **~299 KB gz**, `hyperfixi-hx-v4.js` ~540 → **~311 KB gz**. Same features and pre-installed plugins; CI size ceilings ratcheted down to catch re-duplication.
|
|
115
|
+
- **`fetch … with { … }` options in all 24 languages** (#662): request options (braced bodies, `method:` / `headers:` / `body:` named args) are captured by the semantic parser in every supported language — previously most non-English languages silently dropped the clause and issued a bare GET.
|
|
116
|
+
- **Event modifiers in all 24 languages** (#673): `once`, `debounce(N)`, `throttle(N)` and their translated forms flow from every language's event-handler head to the runtime.
|
|
117
|
+
- **Foreign→English canonical validity: 3059/3059** (#724–#732, pick text-range #733/#734/#736): every authored foreign translation now renders English that the canonical hyperscript.org parser accepts — both canonical-validity allowlists are empty — and a new R4 canonical-validity ratchet (#727) plus a ninth `--regression` signal keep it that way.
|
|
118
|
+
- **New package: `@lokascript/htmx-adapter`** (#735): multilingual adapter for upstream htmx v4 (canonicalizing extension).
|
|
119
|
+
|
|
120
|
+
### Fixed
|
|
121
|
+
|
|
122
|
+
- **`go to url "/page"` no longer drops the URL** (#680) — the destination was silently lost in every language (the English reference itself was affected, which masked it).
|
|
123
|
+
- **Broken event listeners in six languages** (#681) — de/fr/id/it/pl/zh dictionaries rendered `mousedown`/`mouseup` as words the parser could not resolve; a V3c vocabulary check now verifies every dictionary event word round-trips on the parse side.
|
|
124
|
+
- **"Unknown command: compound" on semantic-path bundles** (#675) — multi-command handler bodies could throw at runtime on the full bundles; the per-segment semantic adapter now defers non-command parses to the traditional parser.
|
|
125
|
+
|
|
126
|
+
### Infrastructure
|
|
127
|
+
|
|
128
|
+
- Publish pipeline hardening (#672, #674): reproducible `npm ci` installs, `pre-publish-check` with real exit codes end-to-end, export validation after bundle builds, complete BUILD_ORDER, and a final verdict step that always runs.
|
|
129
|
+
- Vocab consistency gate and total input-coverage instrumentation in CI; the multilingual fidelity ratchet holds the 2026-07-11 high-water marks (fidelity 1.000 on all 3,696 corpus rows across 24 languages).
|
|
130
|
+
|
|
131
|
+
## [2.5.1] - 2026-05-24
|
|
132
|
+
|
|
133
|
+
A single-bug patch for a v2.5.0 publishing regression that broke every localized htmx attribute.
|
|
134
|
+
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- **`hyperfixi-hx.js` / `hyperfixi-hx-v4.js`: `window.__hyperfixi_i18n` lost to terser** (`@hyperfixi/core`). The Phase 8 orchestrator's public-API singleton (`window.__hyperfixi_i18n = { register }`) was being eliminated by terser in the published v2.5.0 hybrid-hx and hybrid-hx-v4 bundles, silently breaking every `vocab/htmx/{lang}.js` module on load with `"loaded before the htmx-compat orchestrator"`. Two layers fixed: (1) the module-level `installPublicAPI()` invocation is now exported and called explicitly from each bundle entry that includes htmx-compat, so terser's `unused: true, toplevel: true` pass can't drop it; (2) the API is exposed via bracket-access (`window['__hyperfixi_i18n']`) to bypass terser's `properties.regex: /^_/` mangling. Localized htmx attribute names (`hx-obtener`, `hx-取得`, `hx-احصل`, …) now resolve correctly in the published bundles, matching their already-working behavior under the source-aliased vitest suite.
|
|
138
|
+
|
|
139
|
+
### Tests
|
|
140
|
+
|
|
141
|
+
- **Orchestrator public-API gate** in pre-publish-check + release-smoke. New 2-test Playwright spec (`packages/core/src/compatibility/browser-tests/i18n-orchestrator-api.spec.ts`, ~600 ms) asserts `typeof window.__hyperfixi_i18n.register === 'function'` in both shipped htmx bundles. Wired into `.github/workflows/pre-publish-check.yml` (fails the workflow on regression) and the `--matrix` stage of `examples/release-smoke/run.mjs` (so the gate fires against the registry-installed tarball, not only the locally-built dist). Surgical — no swap-pipeline dependency. The broader `i18n-htmx.spec.ts` remains un-wired pending two pre-existing bugs unrelated to this release: a reactivity / notify-hook bug breaking localized `hx-live` re-renders, and a swap-pipeline bug stringifying `DocumentFragment`s in `fetch ... as html` → `put it into target`.
|
|
142
|
+
|
|
143
|
+
## [2.5.0] - 2026-05-22
|
|
144
|
+
|
|
145
|
+
A focused release: a new LLM-domain introspection API, plus correctness fixes for the parser, the multilingual renderers, and how published packages declare their internal dependencies.
|
|
146
|
+
|
|
147
|
+
### Added
|
|
148
|
+
|
|
149
|
+
- **`describeCommands()` / `describeCommand()`** in `@lokascript/domain-llm` — a JSON-serializable description of every LLM command: its roles, per-language marker keywords, and a verified runnable example in each of the 8 supported languages. Adds the `LLM_LANGUAGE_CODES` export. One source of truth for docs, MCP tool schemas, and LLM-agent discovery. `@lokascript/domain-llm` also gains a package README.
|
|
150
|
+
|
|
151
|
+
### Fixed
|
|
152
|
+
|
|
153
|
+
- **`toggle @attribute`** (`@hyperfixi/core`): `toggle @disabled`, `toggle @required`, and similar threw `toggle command: no valid class names found` in the browser. `toggle` now skips semantic parsing (like its sibling DOM commands `add` / `remove`), so the `@attr` / `.class` / `*property` argument forms all work.
|
|
154
|
+
- **SOV word order in the multilingual renderers** (`@lokascript/domain-bdd`, `@lokascript/domain-llm`): Japanese / Korean / Turkish output from `renderBDD` and `renderLLM` was not parseable — particle placement and word order were wrong, so `translate_bdd` / `translate_llm` produced broken SOV text. Fixed, with render→compile round-trip guardrail tests.
|
|
155
|
+
- **Internal dependency versions**: published packages declared their internal workspace dependencies as `"*"`, which shipped literally to npm and could let a consumer resolve a mismatched (older) internal package. Internal deps now carry exact caret ranges.
|
|
156
|
+
|
|
157
|
+
## [2.4.0] - 2026-05-20
|
|
158
|
+
|
|
159
|
+
Two parallel arcs landed since v2.3.1: **upstream `_hyperscript` 0.9.90 parity** (9 phases — commands, comparators, collection ops, event modifiers, plugin system, 3 new public plugin packages, i18n) and **htmx v4 compatibility** (reactive `hx-live`, SSE/WebSocket streaming, per-element localized attribute names, the size-busting `hyperfixi-hx-v4.js` bundle).
|
|
160
|
+
|
|
161
|
+
### Added
|
|
162
|
+
|
|
163
|
+
#### Core language (upstream \_hyperscript 0.9.90 compat)
|
|
164
|
+
|
|
165
|
+
- **9 new commands**: `focus`, `blur`, `empty`, `open`, `close`, `select`, `clear`, `reset`, `breakpoint` — covers DOM focus management, form state, window control, and debugger integration.
|
|
166
|
+
- **4 comparator expressions**: `X starts with Y`, `X ends with Y`, `X is between A and B`, and the postfix `... ignoring case` modifier for case-insensitive string comparison. `between` is inclusive and auto-orders bounds.
|
|
167
|
+
- **5 collection infix operators**: `collection where <pred>`, `collection sorted by <key>`, `collection mapped to <expr>`, `string split by <sep>`, `array joined by <sep>`. `where`/`sorted by`/`mapped to` bind `it` per element for inline predicates/keys.
|
|
168
|
+
- **Event modifiers**: `on first <event>` alias for `.once`, plus synthetic `on resize` for HTMLElements backed by `ResizeObserver` (browser standard `resize` is window-only).
|
|
169
|
+
|
|
170
|
+
#### Plugin system
|
|
171
|
+
|
|
172
|
+
- **`HyperfixiPlugin` public API**: `installPlugin(plugin)` on Runtime, `ParserExtensionRegistry` singleton with snapshot/restore for test isolation. Five plugin seams: `registerFeature`, `registerNodeEvaluator`, `registerGlobalWriteHook`, `registerGlobalReadHook`, and `HyperfixiPluginContext.runtime`. `$name` globals canonicalized to bare-key storage across `setVariableValue` and both identifier evaluators.
|
|
173
|
+
|
|
174
|
+
#### New plugin packages
|
|
175
|
+
|
|
176
|
+
- **`@hyperfixi/speech`**: Voice I/O via Web Speech API — `speak "text"` (with optional `rate`/`pitch`/`voice`/`volume`), `ask "question"`, `answer with "value"`. Idempotent installation; no-ops cleanly when the Web Speech API or `window.prompt()` is unavailable.
|
|
177
|
+
- **`@hyperfixi/reactivity`**: Reactive signals — `live { ... }` blocks, `bind` expressions (now also accepts explicit property via `'s` or `.` syntax), `when X changes`, `^name` reactive reads. Microtask-flushed scheduler with cycle guard and auto-stop on element disconnect.
|
|
178
|
+
- **`@hyperfixi/components`**: Custom Element registration from `<template component="tag">` / `<script type="text/hyperscript-template" component="tag">`. **v2 shipped this release** — reactive `^var` rendering (via `@hyperfixi/reactivity`), `#if` / `#for` directives, slot substitution, `${expr}` interpolation. Init scripts (`_=` on the `<template>`) run on each stamp.
|
|
179
|
+
|
|
180
|
+
#### Internationalization (i18n)
|
|
181
|
+
|
|
182
|
+
- Phase 1 commands translated across all 23 COMPLETE_LANGUAGES (7 new schemas in `@lokascript/semantic`: `empty`, `open`, `close`, `select`, `clear`, `reset`, `breakpoint`).
|
|
183
|
+
- Phase 2 comparators (`starts with`, `ends with`, `between`, `ignoring case`) translated across all 23 languages (with `starts with`/`ends with`/`between` backfills in bn, th, vi).
|
|
184
|
+
- Phase 3 collection ops (`sorted by`, `mapped to`, `split by`, `joined by`) translated across all 23 languages (`where` predated this release).
|
|
185
|
+
- New `packages/i18n/src/schema-alignment.test.ts` — guards drift: every `CommandSchema` must have an `en.ts` entry, Phase 1/2/3 operators must exist across all complete dictionaries.
|
|
186
|
+
|
|
187
|
+
#### htmx v4 integration
|
|
188
|
+
|
|
189
|
+
- **`hx-live` reactive expressions**: When `@hyperfixi/reactivity` is installed, the htmx-compat layer recognizes htmx v4's `hx-live` attribute and translates it to a `live ... end` block. The expression body is hyperscript (not JavaScript like upstream htmx v4), so it gets fine-grained dependency tracking + inherits multilingual support. If reactivity isn't installed, the element is skipped with a clear console error.
|
|
190
|
+
- **`sse-connect` / `sse-swap`**: Long-lived `EventSource` per element. Bounded exponential reconnect backoff (1s → 2s → 4s … capped at 30s, 5 retries). Auto-close on DOM removal via `MutationObserver`. Lifecycle events: `htmx:sseOpen`, `htmx:sseMessage`, `htmx:sseError`, `htmx:sseClose`. Multiple named events per connection. Swap targets resolve `closest`/`find`/`next`/`previous`.
|
|
191
|
+
- **`ws-connect` / `ws-send`**: Bidirectional WebSocket per element. JSON envelope routing (`{ target, swap?, data }`) drives surgical updates through the existing `hx-target`/`hx-swap` machinery; raw messages dispatch as `htmx:wsMessage`. Outbound sends queue while connecting, flush on `htmx:wsOpen`. Same reconnect backoff as SSE.
|
|
192
|
+
- **Localized htmx attribute names (Phases 8–10)**: Per-element `lang=` resolution. Authors can write `hx-obtener` / `hx-objetivo` / `sse-conectar` (Spanish), `hx-取得` / `hx-ターゲット` (Japanese), `hx-احصل` / `hx-هدف` (Arabic), etc. — the orchestrator translates them to canonical English before they hit the existing processor. 8 priority vocab modules ship with the bundle (en, es, fr, ja, zh, ar, ko, de). Missing-vocab languages log a one-time warning per language and fall back to English. `eventNameOf` / `selectorFor` / `nameOf` hooks are namespaced (`hx`, `sse`, `ws`) so `hx-on:*` localizes correctly.
|
|
193
|
+
- **htmx event lifecycle**: New CustomEvents `htmx:configuring` (cancelable, mutate `e.detail.config`), `htmx:beforeRequest` (cancelable), `htmx:afterSettle`, `htmx:error`, plus the SSE/WS lifecycle events listed above.
|
|
194
|
+
|
|
195
|
+
#### Bundles & build tooling
|
|
196
|
+
|
|
197
|
+
- **`hyperfixi-hx-v4.js`** (~257 KB gz): Full runtime + `@hyperfixi/reactivity` (auto-installed) + htmx-compat + SSE/WS support, all in a single script tag. The "batteries-included" choice for projects using htmx v4 reactive/streaming features. The slim `hyperfixi-hx.js` (~13 KB gz) does NOT ship reactivity/SSE/WS — choose hx-v4 when you reach for `hx-live` / `sse-connect` / `ws-connect`, hx otherwise.
|
|
198
|
+
- **Vite plugin: htmx v4 surface detection** — scans HTML for `hx-live` / `sse-*` / `ws-*` attributes and auto-routes to `hyperfixi-hx-v4.js`; otherwise emits a minimal handcrafted bundle as before.
|
|
199
|
+
- **`getDefaultRuntime()`** exposed for forcing lazy runtime construction (useful for bundles that defer wiring until first DOM event).
|
|
200
|
+
|
|
201
|
+
### Fixed
|
|
202
|
+
|
|
203
|
+
- **Runtime**: `it`/`its`/`result` identifier cache no longer returns stale values across loop iterations — required for Phase 3 collection operators that rebind `it` per element (16 ms TTL cache had masked all Phase 3 tests before fix).
|
|
204
|
+
- **Runtime**: method-call `this` binding preserved on member callees — `items mapped to it.toUpperCase()` no longer throws "called on null or undefined". Uses `.apply(thisArg, args)` for member expressions.
|
|
205
|
+
- **Parser**: `is not` binary operator now routes to `notEquals.evaluate` — pre-existing gap where tokens parsed but runtime dispatch threw `Unknown binary operator: is not`.
|
|
206
|
+
- **Runtime**: `execute()` now mutates the caller's `ExecutionContext` in place when injecting the `ExpressionRegistry`, rather than shallow-cloning. Commands writing to `context.result` / `context.it` (e.g. the new `answer` command) now propagate those writes back to the caller — matching the long-standing `context.locals.set(...)` / `context.globals.set(...)` mutation pattern in the same function. `ExecutionContext.registry` is now mutable in the type signature (the runtime is the only legitimate writer; the `readonly` modifier was a defensive holdover from an earlier consolidation arc).
|
|
207
|
+
- **Runtime**: `or` / `and` short-circuit now returns the operand value (truthy/falsy), not a coerced boolean — matches upstream `_hyperscript` semantics.
|
|
208
|
+
- **Runtime**: `put` / `set` / `toggle` accept plain property names as write targets (not just `the X.Y` chains).
|
|
209
|
+
- **Runtime**: `evalHyperScript()` defaults to shared globals when none provided.
|
|
210
|
+
- **Runtime**: scoped `notifyLocalRead()` now fires when reading scoped locals (was missing — broke reactive `bind` to local vars).
|
|
211
|
+
- **Math**: binary-arithmetic operands accept DOM elements (coerced through the consolidated "is this convertible" path).
|
|
212
|
+
- **Parser**: `set the X.Y to Z` dotted property chains (e.g. `set the event.detail.result to ...`) now use the full expression parser rather than a fixed 2-token lookahead — handles arbitrary-depth chains and `of` expressions uniformly.
|
|
213
|
+
- **Parser**: `pick first 3 of arr` and other keyword-led command syntaxes (commands whose argument grammar starts with a keyword) now route through dedicated parsers and preserve trailing args. Added to `COMPOUND_COMMANDS` with a dedicated `parseXxxCommand` per case.
|
|
214
|
+
- **Browser bundle**: `ExpressionRegistry` threaded through the command-execution path (`processCommand` → `adapter.execute` → `parseInput`). Without this, commands like `tell`/`send`/`toggle` whose `parseInput()` evaluates AST nodes failed in the example gallery with "Expression X not in ExecutionContext.registry".
|
|
215
|
+
- **htmx-compat**: `hx-on:*` registers real event listeners directly from the processor (the translator never sees them, so it can stay declarative-only). Refresh observer wired correctly; localized `hx-on:*` prefix resolved via the namespaced i18n hooks.
|
|
216
|
+
- **i18n**: Reactive blocks (`live`, `when X changes`) route around `parseStatement` to fix `when`/`unless` + SOV-language `live` block parsing. Suppressed spurious "then" injection inside live blocks.
|
|
217
|
+
- **patterns-reference**: HTML patterns marked non-translatable (they're DOM markup, not source code); cleaned orphan languages from the database seed.
|
|
218
|
+
- **Semantic**: registry singleton shared across tsup entries (multi-entry split was forking the registry, breaking cross-entry pattern lookups).
|
|
219
|
+
|
|
220
|
+
### Changed (internal)
|
|
221
|
+
|
|
222
|
+
- **Evaluator consolidation**: Retired the `BaseExpressionEvaluator` class hierarchy and 4 helper modules (~2,700 LOC removed) in favor of the single canonical evaluator at `parser/runtime.ts:evaluateAST` with the `ExpressionRegistry` on `ExecutionContext`. Both consolidation arcs (α + β) closed.
|
|
223
|
+
- **Domain DSLs**: Extracted a shared config package (`@hyperfixi/domain-config`) consumed by all 8 domain DSLs.
|
|
224
|
+
- **Published infrastructure packages**: `@lokascript/intent`, `@hyperfixi/domain-config`, `@hyperfixi/planner`, and `@hyperfixi/intent-element` are published to npm as transitive dependencies (required for `@hyperfixi/core` and the domain DSLs to install cleanly from the registry). They are infra deps — users do not install them directly. (These were published from post-tag fix-forward commits; the `v2.4.0` git tag predates them.)
|
|
225
|
+
|
|
226
|
+
## [2.3.1] - 2026-04-23
|
|
227
|
+
|
|
228
|
+
### Fixed
|
|
229
|
+
|
|
230
|
+
- **CI**: Added `planner` package to the build step (before `mcp-server`, which depends on it) across `ci.yml`, `publish.yml`, and `pre-publish-check.yml`; added `planner/dist` to the build-artifacts upload.
|
|
231
|
+
- **hybrid-complete bundle**: `toggle @attribute` and positional selectors (`first .x`, `last .y` in selector position) now work — closed a parser gap surfaced by the README "try it live" examples.
|
|
232
|
+
|
|
233
|
+
### Added
|
|
234
|
+
|
|
235
|
+
- **README**: "Try it live" link to the gallery, broken-up counter example, tier links.
|
|
236
|
+
|
|
237
|
+
### Changed
|
|
238
|
+
|
|
239
|
+
- **`planner` package**: Marked private (workspace-only — published packages should not list private deps).
|
|
240
|
+
|
|
241
|
+
## [2.3.0] - 2026-03-17
|
|
242
|
+
|
|
243
|
+
### Added
|
|
244
|
+
|
|
245
|
+
- **Lazy behavior resolver**: `install X` just works — behaviors resolve on demand without manual registration
|
|
246
|
+
- **Hyperscript-native behaviors**: Behaviors defined as hyperscript source strings via patterns-reference schemas
|
|
247
|
+
- **Dynamic class selectors**: `.{varName}` syntax in `toggle`, `add`, and `remove` resolves variables as CSS class names
|
|
248
|
+
- **Variable/expression durations**: `wait` command now accepts variable and expression durations (e.g., `wait feedbackDuration ms`)
|
|
249
|
+
- **Behavior schema sources**: Single source of truth for behavior schemas in patterns-reference
|
|
250
|
+
|
|
251
|
+
### Fixed
|
|
252
|
+
|
|
253
|
+
- **Parser**: `js()` single-quote parsing, `set the X.Y` dotted property chains (e.g., `event.detail.result`), improved `set` error messages
|
|
254
|
+
- **Parser**: Namespaced events (`custom:activate`) and `trigger`/`on` inside `repeat` blocks in behaviors
|
|
255
|
+
- **Parser**: Adjacent dot after keywords treated as property access, not CSS selector
|
|
256
|
+
- **Behaviors**: Clipboard `wait feedbackDuration`, AutoDismiss wait timing, Removable confirm dialog
|
|
257
|
+
- **Browser**: Resolver bundle timing and Playwright test stability
|
|
258
|
+
- **CI**: Behaviors package added to build pipeline, artifact upload, and pre-publish-check build order
|
|
259
|
+
|
|
260
|
+
## [2.2.1] - 2026-03-16
|
|
261
|
+
|
|
262
|
+
### Fixed
|
|
263
|
+
|
|
264
|
+
- Parser: adjacent dot after keywords treated as property access, not CSS selector
|
|
265
|
+
- Dependency updates (build-tools group)
|
|
266
|
+
|
|
267
|
+
## [2.2.0] - 2026-03-15
|
|
268
|
+
|
|
269
|
+
### Fixed
|
|
270
|
+
|
|
271
|
+
- Dependency security: resolved 27 of 33 Dependabot vulnerabilities
|
|
272
|
+
- CI: copy examples gallery into repo, remove external clone dependency
|
|
273
|
+
- CI: suppress already-published errors in publish dry run
|
|
274
|
+
|
|
275
|
+
## [2.1.0] - 2026-02-20
|
|
276
|
+
|
|
277
|
+
### Added
|
|
278
|
+
|
|
279
|
+
- **domain-llm**: Expanded from 4 to 8 languages (added Korean, Chinese, Turkish, French) — 68 tests
|
|
280
|
+
- **domain-flow**: Expanded from 4 to 8 languages (added Korean, Chinese, Turkish, French) — 108 tests
|
|
281
|
+
- **domain-flow**: First npm publication as `@lokascript/domain-flow`
|
|
282
|
+
|
|
283
|
+
### Changed
|
|
284
|
+
|
|
285
|
+
- All 7 domain DSLs now consistently support 8 languages (en, es, ja, ar, ko, zh, tr, fr)
|
|
286
|
+
- MCP server registry updated for new domain languages
|
|
287
|
+
|
|
288
|
+
### Fixed
|
|
289
|
+
|
|
290
|
+
- Resolved test failures in 4 packages (19 tests)
|
|
291
|
+
- Scoped `first .X in me` to context element instead of document
|
|
292
|
+
- Property target bugs: disabled on button, tabIndex as number
|
|
293
|
+
|
|
294
|
+
## [2.0.0] - 2026-02-15
|
|
295
|
+
|
|
296
|
+
### Changed
|
|
297
|
+
|
|
298
|
+
- **Rebrand**: Renamed from LokaScript to HyperFixi for engine packages (`@lokascript/core` → `@hyperfixi/core`)
|
|
299
|
+
- Multilingual packages remain under `@lokascript/*` scope
|
|
300
|
+
- Synchronized all package versions to 2.0.0
|
|
301
|
+
|
|
302
|
+
## [1.4.0] - 2026-02-10
|
|
303
|
+
|
|
304
|
+
### Added
|
|
305
|
+
|
|
306
|
+
- **Language Server & VSCode Extension**: Full LSP with Go to Definition, Find References, multilingual hover, syntax highlighting, and HTML region extraction
|
|
307
|
+
- **AOT Compiler** (internal): Ahead-of-time compiler with 45 command codegens, expression transforms, 4 optimization passes, and 533 tests
|
|
308
|
+
- **Compilation Service** (internal): HTTP service for multilingual compilation with React renderer, test generation, and semantic diffing
|
|
309
|
+
- **Hyperscript Adapter** (@lokascript/hyperscript-adapter): Multilingual preprocessor plugin for original \_hyperscript with 24 per-language bundles
|
|
310
|
+
- **Semantic**: Russian/Ukrainian normalizers, improved SOV pass rates (JA 99%, KO 96%, TR 96%)
|
|
311
|
+
- **Vite Plugin**: htmx/fixi attribute scanning for zero-config support, hybrid-plus bundle commands
|
|
312
|
+
|
|
313
|
+
### Changed
|
|
314
|
+
|
|
315
|
+
- **Monorepo cleanup**: Moved experimental packages (analytics, server-integration, multi-tenant, ssr-support, siren) to `experiments/`
|
|
316
|
+
- **Code audits**: Comprehensive audits across core (+58 tests), runtime (+34 tests), behaviors (+66 tests), expressions (9 security fixes), validation (+20 tests), features (+19 tests), i18n (+33 tests)
|
|
317
|
+
- **Semantic refactoring**: Modularized tokenizer, split pattern generator by word order, eliminated all `as any` casts
|
|
318
|
+
- **CI**: Consolidated workflows, switched to OIDC trusted publishing, upgraded to Node 24 LTS
|
|
319
|
+
- **Test count**: 4046 → 8100+ tests
|
|
320
|
+
|
|
321
|
+
### Fixed
|
|
322
|
+
|
|
323
|
+
- Runtime correctness: GC fix, timeout handling, expression security hardening
|
|
324
|
+
- Browser test timeouts and false CI failures
|
|
325
|
+
- TypeScript errors across 6 packages for clean workspace typecheck
|
|
326
|
+
- Debug console.log leak in set command
|
|
327
|
+
|
|
328
|
+
## [1.3.0] - 2026-01-23
|
|
329
|
+
|
|
330
|
+
_Synchronized version release. See git history for details._
|
|
331
|
+
|
|
332
|
+
## [1.2.0] - 2026-01-21
|
|
333
|
+
|
|
334
|
+
_Synchronized version release. See git history for details._
|
|
335
|
+
|
|
336
|
+
## [1.0.0] - 2026-01-19
|
|
337
|
+
|
|
338
|
+
### Added
|
|
339
|
+
|
|
340
|
+
- **Initial Release**: First public release of LokaScript
|
|
341
|
+
- **Core Package** (@lokascript/core): Full hyperscript runtime with 43 commands
|
|
342
|
+
- **Semantic Package** (@lokascript/semantic): Multilingual parsing for 23 languages
|
|
343
|
+
- **I18n Package** (@lokascript/i18n): Grammar transformation for SOV/VSO/SVO word orders
|
|
344
|
+
- **Vite Plugin** (@lokascript/vite-plugin): Zero-config Vite integration
|
|
345
|
+
- **MCP Server** (@lokascript/mcp-server): Model Context Protocol server for LLM integration
|
|
346
|
+
- **Browser Bundles**: 7 size-optimized bundles (lite, lite-plus, hybrid-complete, hybrid-hx, minimal, standard, full)
|
|
347
|
+
- **23 Language Support**: English, Spanish, Japanese, Korean, Arabic, Chinese, French, German, Portuguese, Indonesian, Turkish, Swahili, Quechua, and more
|
|
348
|
+
- **4046 Tests**: Comprehensive test suite with >95% coverage
|
|
349
|
+
- **Etymology**: "LokaScript" from Sanskrit "loka" (world/realm/universe) reflecting multilingual scope
|
|
350
|
+
|
|
351
|
+
### Changed
|
|
352
|
+
|
|
353
|
+
- **Rebrand**: Project renamed from HyperFixi to LokaScript
|
|
354
|
+
- **NPM Organization**: Published under @lokascript/\* scope
|
|
355
|
+
- **Browser API**: Primary global changed to window.lokascript (with window.hyperfixi backward compatibility)
|
|
356
|
+
- **Lifecycle Events**: Renamed to lokascript:_ prefix (dual dispatch with hyperfixi:_ for compatibility)
|
|
357
|
+
|
|
358
|
+
### Fixed
|
|
359
|
+
|
|
360
|
+
- Workspace dependency resolution using wildcard versions (\*)
|
|
361
|
+
- TypeScript compilation across all 20+ packages
|
|
362
|
+
- Build system for browser bundles
|
|
363
|
+
|
|
364
|
+
### Backward Compatibility
|
|
365
|
+
|
|
366
|
+
- window.hyperfixi available as deprecated alias to window.lokascript
|
|
367
|
+
- hyperfixi:_ events still dispatched alongside lokascript:_ events
|
|
368
|
+
- File names kept for compatibility (e.g., hyperfixi-browser.js)
|
|
369
|
+
|
|
370
|
+
### Documentation
|
|
371
|
+
|
|
372
|
+
- Complete rebrand of all README files
|
|
373
|
+
- Updated CLAUDE.md with project context
|
|
374
|
+
- NPM organization setup guide
|
|
375
|
+
- Version management documentation
|
|
376
|
+
|
|
377
|
+
### Security
|
|
378
|
+
|
|
379
|
+
- npm access token stored in GitHub Secrets
|
|
380
|
+
- 2FA recommended for npm organization
|
|
381
|
+
|
|
382
|
+
[Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v2.4.0...HEAD
|
|
383
|
+
[2.4.0]: https://github.com/codetalcott/hyperfixi/compare/v2.3.1...v2.4.0
|
|
384
|
+
[2.3.1]: https://github.com/codetalcott/hyperfixi/compare/v2.3.0...v2.3.1
|
|
385
|
+
[2.3.0]: https://github.com/codetalcott/hyperfixi/compare/v2.2.1...v2.3.0
|
|
386
|
+
[2.2.1]: https://github.com/codetalcott/hyperfixi/compare/v2.2.0...v2.2.1
|
|
387
|
+
[2.2.0]: https://github.com/codetalcott/hyperfixi/compare/v2.1.0...v2.2.0
|
|
388
|
+
[2.1.0]: https://github.com/codetalcott/hyperfixi/compare/v2.0.0...v2.1.0
|
|
389
|
+
[2.0.0]: https://github.com/codetalcott/hyperfixi/compare/v1.4.0...v2.0.0
|
|
390
|
+
[1.4.0]: https://github.com/codetalcott/hyperfixi/compare/v1.3.0...v1.4.0
|
|
391
|
+
[1.3.0]: https://github.com/codetalcott/hyperfixi/compare/v1.2.0...v1.3.0
|
|
392
|
+
[1.2.0]: https://github.com/codetalcott/hyperfixi/compare/v1.0.0...v1.2.0
|
|
393
|
+
[1.0.0]: https://github.com/codetalcott/hyperfixi/releases/tag/v1.0.0
|