@hyperfixi/behaviors 3.3.0 → 4.0.1

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.
Files changed (232) hide show
  1. package/CHANGELOG.md +199 -1
  2. package/README.md +29 -9
  3. package/dist/all.browser.global.js +45 -100
  4. package/dist/all.browser.global.js.map +1 -1
  5. package/dist/autodismiss.browser.global.js +5 -11
  6. package/dist/autodismiss.browser.global.js.map +1 -1
  7. package/dist/behaviors/autodismiss.cjs +19 -22
  8. package/dist/behaviors/autodismiss.cjs.map +1 -1
  9. package/dist/behaviors/autodismiss.d.cts +4 -4
  10. package/dist/behaviors/autodismiss.d.ts +4 -4
  11. package/dist/behaviors/autodismiss.js +3 -3
  12. package/dist/behaviors/clickoutside.cjs +19 -18
  13. package/dist/behaviors/clickoutside.cjs.map +1 -1
  14. package/dist/behaviors/clickoutside.d.cts +4 -4
  15. package/dist/behaviors/clickoutside.d.ts +4 -4
  16. package/dist/behaviors/clickoutside.js +3 -3
  17. package/dist/behaviors/clipboard.cjs +18 -19
  18. package/dist/behaviors/clipboard.cjs.map +1 -1
  19. package/dist/behaviors/clipboard.d.cts +4 -4
  20. package/dist/behaviors/clipboard.d.ts +4 -4
  21. package/dist/behaviors/clipboard.js +3 -3
  22. package/dist/behaviors/draggable.cjs +20 -25
  23. package/dist/behaviors/draggable.cjs.map +1 -1
  24. package/dist/behaviors/draggable.d.cts +4 -4
  25. package/dist/behaviors/draggable.d.ts +4 -4
  26. package/dist/behaviors/draggable.js +3 -3
  27. package/dist/behaviors/focustrap.cjs +18 -19
  28. package/dist/behaviors/focustrap.cjs.map +1 -1
  29. package/dist/behaviors/focustrap.d.cts +4 -4
  30. package/dist/behaviors/focustrap.d.ts +4 -4
  31. package/dist/behaviors/focustrap.js +3 -3
  32. package/dist/behaviors/removable.cjs +18 -21
  33. package/dist/behaviors/removable.cjs.map +1 -1
  34. package/dist/behaviors/removable.d.cts +4 -3
  35. package/dist/behaviors/removable.d.ts +4 -3
  36. package/dist/behaviors/removable.js +3 -3
  37. package/dist/behaviors/resizable.cjs +19 -19
  38. package/dist/behaviors/resizable.cjs.map +1 -1
  39. package/dist/behaviors/resizable.d.cts +4 -4
  40. package/dist/behaviors/resizable.d.ts +4 -4
  41. package/dist/behaviors/resizable.js +3 -3
  42. package/dist/behaviors/scrollreveal.cjs +19 -22
  43. package/dist/behaviors/scrollreveal.cjs.map +1 -1
  44. package/dist/behaviors/scrollreveal.d.cts +4 -4
  45. package/dist/behaviors/scrollreveal.d.ts +4 -4
  46. package/dist/behaviors/scrollreveal.js +3 -3
  47. package/dist/behaviors/sortable.cjs +19 -20
  48. package/dist/behaviors/sortable.cjs.map +1 -1
  49. package/dist/behaviors/sortable.d.cts +4 -4
  50. package/dist/behaviors/sortable.d.ts +4 -4
  51. package/dist/behaviors/sortable.js +3 -3
  52. package/dist/behaviors/tabs.cjs +20 -25
  53. package/dist/behaviors/tabs.cjs.map +1 -1
  54. package/dist/behaviors/tabs.d.cts +4 -4
  55. package/dist/behaviors/tabs.d.ts +4 -4
  56. package/dist/behaviors/tabs.js +3 -3
  57. package/dist/behaviors/toggleable.cjs +25 -26
  58. package/dist/behaviors/toggleable.cjs.map +1 -1
  59. package/dist/behaviors/toggleable.d.cts +4 -4
  60. package/dist/behaviors/toggleable.d.ts +4 -4
  61. package/dist/behaviors/toggleable.js +3 -3
  62. package/dist/chunk-2GIS4DCY.js +30 -0
  63. package/dist/chunk-2GIS4DCY.js.map +1 -0
  64. package/dist/chunk-3BCBZR6R.js +30 -0
  65. package/dist/chunk-3BCBZR6R.js.map +1 -0
  66. package/dist/chunk-4YUIDZAO.js +30 -0
  67. package/dist/chunk-4YUIDZAO.js.map +1 -0
  68. package/dist/{chunk-XYZ7FOXJ.js → chunk-AQCOK5J5.js} +10 -14
  69. package/dist/chunk-AQCOK5J5.js.map +1 -0
  70. package/dist/chunk-ATGHQQC7.js +30 -0
  71. package/dist/chunk-ATGHQQC7.js.map +1 -0
  72. package/dist/{chunk-HQDYH45I.js → chunk-CWLAXLWR.js} +5 -13
  73. package/dist/chunk-CWLAXLWR.js.map +1 -0
  74. package/dist/chunk-DMWN52SV.js +30 -0
  75. package/dist/chunk-DMWN52SV.js.map +1 -0
  76. package/dist/{chunk-PDMOOWFW.js → chunk-EIVPVTUI.js} +4 -8
  77. package/dist/{chunk-PDMOOWFW.js.map → chunk-EIVPVTUI.js.map} +1 -1
  78. package/dist/chunk-HHTEMPIT.js +30 -0
  79. package/dist/chunk-HHTEMPIT.js.map +1 -0
  80. package/dist/{chunk-26IX7QU7.js → chunk-HJESSMKB.js} +4 -6
  81. package/dist/{chunk-26IX7QU7.js.map → chunk-HJESSMKB.js.map} +1 -1
  82. package/dist/{chunk-5S7WN3ZQ.js → chunk-IFAH652L.js} +4 -7
  83. package/dist/chunk-IFAH652L.js.map +1 -0
  84. package/dist/chunk-IUGJG4RA.js +30 -0
  85. package/dist/chunk-IUGJG4RA.js.map +1 -0
  86. package/dist/{chunk-ZR66E3T6.js → chunk-JNLVXPHR.js} +13 -13
  87. package/dist/chunk-KEZEGPEX.js +30 -0
  88. package/dist/chunk-KEZEGPEX.js.map +1 -0
  89. package/dist/{chunk-66U2RSYJ.js → chunk-KP4GNXYS.js} +4 -10
  90. package/dist/chunk-KP4GNXYS.js.map +1 -0
  91. package/dist/chunk-KXQMCN4O.js +30 -0
  92. package/dist/chunk-KXQMCN4O.js.map +1 -0
  93. package/dist/{chunk-YXS27XM6.js → chunk-KYBOZ7C4.js} +3 -7
  94. package/dist/chunk-KYBOZ7C4.js.map +1 -0
  95. package/dist/chunk-LBWM6TTU.js +30 -0
  96. package/dist/chunk-LBWM6TTU.js.map +1 -0
  97. package/dist/{chunk-3DVDS7CT.js → chunk-LCDONZBX.js} +5 -5
  98. package/dist/chunk-LCDONZBX.js.map +1 -0
  99. package/dist/{chunk-OJ3YWO3W.js → chunk-NE76IBV2.js} +3 -7
  100. package/dist/chunk-NE76IBV2.js.map +1 -0
  101. package/dist/{chunk-HMU342XE.js → chunk-PVO6TZCZ.js} +3 -9
  102. package/dist/{chunk-HMU342XE.js.map → chunk-PVO6TZCZ.js.map} +1 -1
  103. package/dist/{chunk-URZGNPTQ.js → chunk-RILYRQ72.js} +4 -10
  104. package/dist/chunk-RILYRQ72.js.map +1 -0
  105. package/dist/{chunk-FBQ3X3UY.js → chunk-U4QMFVAM.js} +5 -13
  106. package/dist/chunk-U4QMFVAM.js.map +1 -0
  107. package/dist/chunk-VWDTOSE3.js +26 -0
  108. package/dist/chunk-VWDTOSE3.js.map +1 -0
  109. package/dist/chunk-YRQBU2OW.js +30 -0
  110. package/dist/chunk-YRQBU2OW.js.map +1 -0
  111. package/dist/clickoutside.browser.global.js +5 -7
  112. package/dist/clickoutside.browser.global.js.map +1 -1
  113. package/dist/clipboard.browser.global.js +4 -8
  114. package/dist/clipboard.browser.global.js.map +1 -1
  115. package/dist/core.browser.global.js +13 -25
  116. package/dist/core.browser.global.js.map +1 -1
  117. package/dist/draggable.browser.global.js +5 -13
  118. package/dist/draggable.browser.global.js.map +1 -1
  119. package/dist/focustrap.browser.global.js +4 -8
  120. package/dist/focustrap.browser.global.js.map +1 -1
  121. package/dist/index.cjs +96 -271
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.d.cts +10 -10
  124. package/dist/index.d.ts +10 -10
  125. package/dist/index.js +42 -55
  126. package/dist/index.js.map +1 -1
  127. package/dist/loaders.cjs +75 -237
  128. package/dist/loaders.cjs.map +1 -1
  129. package/dist/loaders.js +13 -13
  130. package/dist/registry.cjs +4 -4
  131. package/dist/registry.cjs.map +1 -1
  132. package/dist/registry.d.cts +5 -6
  133. package/dist/registry.d.ts +5 -6
  134. package/dist/registry.js +1 -1
  135. package/dist/removable.browser.global.js +3 -9
  136. package/dist/removable.browser.global.js.map +1 -1
  137. package/dist/resizable.browser.global.js +4 -7
  138. package/dist/resizable.browser.global.js.map +1 -1
  139. package/dist/resolver.browser.global.js +45 -100
  140. package/dist/resolver.browser.global.js.map +1 -1
  141. package/dist/schemas/index.cjs +38 -93
  142. package/dist/schemas/index.cjs.map +1 -1
  143. package/dist/schemas/index.d.cts +2 -2
  144. package/dist/schemas/index.d.ts +2 -2
  145. package/dist/schemas/index.js +11 -11
  146. package/dist/schemas/index.js.map +1 -1
  147. package/dist/scrollreveal.browser.global.js +5 -11
  148. package/dist/scrollreveal.browser.global.js.map +1 -1
  149. package/dist/sortable.browser.global.js +5 -9
  150. package/dist/sortable.browser.global.js.map +1 -1
  151. package/dist/tabs.browser.global.js +6 -14
  152. package/dist/tabs.browser.global.js.map +1 -1
  153. package/dist/toggleable.browser.global.js +9 -13
  154. package/dist/toggleable.browser.global.js.map +1 -1
  155. package/dist/{types-DCCtVQS5.d.cts → types-CbA4L8XJ.d.cts} +16 -23
  156. package/dist/{types-DCCtVQS5.d.ts → types-CbA4L8XJ.d.ts} +16 -23
  157. package/package.json +5 -5
  158. package/src/behavior-resolver.ts +24 -56
  159. package/src/behaviors/autodismiss.test.ts +12 -20
  160. package/src/behaviors/autodismiss.ts +8 -23
  161. package/src/behaviors/clickoutside.test.ts +13 -21
  162. package/src/behaviors/clickoutside.ts +8 -23
  163. package/src/behaviors/clipboard.test.ts +12 -34
  164. package/src/behaviors/clipboard.ts +8 -23
  165. package/src/behaviors/curated-runtime.test.ts +22 -24
  166. package/src/behaviors/draggable.ts +10 -24
  167. package/src/behaviors/experimental-runtime.test.ts +19 -18
  168. package/src/behaviors/focustrap.test.ts +12 -20
  169. package/src/behaviors/focustrap.ts +8 -23
  170. package/src/behaviors/integration.test.ts +19 -54
  171. package/src/behaviors/optional-runtime.test.ts +17 -22
  172. package/src/behaviors/removable.ts +6 -20
  173. package/src/behaviors/resizable.ts +9 -24
  174. package/src/behaviors/scrollreveal.test.ts +13 -21
  175. package/src/behaviors/scrollreveal.ts +8 -23
  176. package/src/behaviors/sortable.ts +7 -22
  177. package/src/behaviors/tabs.test.ts +12 -34
  178. package/src/behaviors/tabs.ts +8 -23
  179. package/src/behaviors/toggleable.ts +10 -26
  180. package/src/browser-resolver-bundle.ts +20 -30
  181. package/src/core-bundle.ts +11 -11
  182. package/src/index.test.ts +2 -2
  183. package/src/index.ts +30 -47
  184. package/src/registry.test.ts +9 -34
  185. package/src/registry.ts +7 -11
  186. package/src/schemas/autodismiss.schema.ts +3 -9
  187. package/src/schemas/clickoutside.schema.ts +3 -5
  188. package/src/schemas/clipboard.schema.ts +2 -6
  189. package/src/schemas/draggable.schema.ts +4 -12
  190. package/src/schemas/focustrap.schema.ts +2 -6
  191. package/src/schemas/index.ts +2 -1
  192. package/src/schemas/removable.schema.ts +2 -8
  193. package/src/schemas/resizable.schema.ts +3 -6
  194. package/src/schemas/scrollreveal.schema.ts +3 -9
  195. package/src/schemas/sortable.schema.ts +3 -7
  196. package/src/schemas/tabs.schema.ts +4 -12
  197. package/src/schemas/toggleable.schema.ts +10 -13
  198. package/src/schemas/types.ts +37 -30
  199. package/dist/chunk-2HUF6RMI.js +0 -40
  200. package/dist/chunk-2HUF6RMI.js.map +0 -1
  201. package/dist/chunk-3DVDS7CT.js.map +0 -1
  202. package/dist/chunk-5S7WN3ZQ.js.map +0 -1
  203. package/dist/chunk-66U2RSYJ.js.map +0 -1
  204. package/dist/chunk-6TJXDCAQ.js +0 -11
  205. package/dist/chunk-6TJXDCAQ.js.map +0 -1
  206. package/dist/chunk-7TPDLB7W.js +0 -40
  207. package/dist/chunk-7TPDLB7W.js.map +0 -1
  208. package/dist/chunk-CR3J7VV6.js +0 -40
  209. package/dist/chunk-CR3J7VV6.js.map +0 -1
  210. package/dist/chunk-EDBG2F57.js +0 -40
  211. package/dist/chunk-EDBG2F57.js.map +0 -1
  212. package/dist/chunk-FBQ3X3UY.js.map +0 -1
  213. package/dist/chunk-HQDYH45I.js.map +0 -1
  214. package/dist/chunk-HX663BJ4.js +0 -40
  215. package/dist/chunk-HX663BJ4.js.map +0 -1
  216. package/dist/chunk-KROW43CG.js +0 -40
  217. package/dist/chunk-KROW43CG.js.map +0 -1
  218. package/dist/chunk-L52AGCMP.js +0 -40
  219. package/dist/chunk-L52AGCMP.js.map +0 -1
  220. package/dist/chunk-MTI5PSRH.js +0 -40
  221. package/dist/chunk-MTI5PSRH.js.map +0 -1
  222. package/dist/chunk-OJ3YWO3W.js.map +0 -1
  223. package/dist/chunk-ORBJ7MRW.js +0 -40
  224. package/dist/chunk-ORBJ7MRW.js.map +0 -1
  225. package/dist/chunk-SLSCZV4A.js +0 -40
  226. package/dist/chunk-SLSCZV4A.js.map +0 -1
  227. package/dist/chunk-URZGNPTQ.js.map +0 -1
  228. package/dist/chunk-WKBRZGGL.js +0 -40
  229. package/dist/chunk-WKBRZGGL.js.map +0 -1
  230. package/dist/chunk-XYZ7FOXJ.js.map +0 -1
  231. package/dist/chunk-YXS27XM6.js.map +0 -1
  232. /package/dist/{chunk-ZR66E3T6.js.map → chunk-JNLVXPHR.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,202 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.1] - 2026-10-05
11
+
12
+ Fixes for 4.0.0: the per-language adapter bundles read every language again, and the MCP server's
13
+ documentation and core's metadata describe the 4.0 engine.
14
+
15
+ ### Fixed
16
+
17
+ - **`@lokascript/hyperscript-adapter`: the self-contained per-language and regional bundles read
18
+ German, French, Quechua and Chinese again.** `hyperscript-i18n-<lang>.global.js` and the regional
19
+ bundles installed a generate-only pattern generator over the one `@lokascript/semantic/core`
20
+ provides, discarding its hand-crafted patterns: in de, fr, qu and zh even
21
+ `on click toggle .active` stayed untranslated (the host then rejected it), and other languages
22
+ lost shapes such as `toggle … on #target`; 1106 of the corpus's 3772 translations read
23
+ differently from the full package. Published 3.x and 4.0.0 bundles alike; the all-languages
24
+ `hyperscript-i18n.global.js` was unaffected. The bundles now keep `/core`'s generator (sizes
25
+ unchanged: the ~23 KB 4.0.0 added was this generator, unused until now). Their English renderer
26
+ also drops only an implicit `me` now, so `put "x" into me` no longer renders as the
27
+ engine-invalid `put "x"` in every language. New gate: every built bundle runs translated
28
+ handlers on the engine (`test/adapter-iife.test.ts`).
29
+ - **`@hyperfixi/mcp-server`'s documentation resources teach upstream's spelling.**
30
+ `hyperscript://docs/commands`, `/expressions`, `/events` and `hyperscript://examples/common` still
31
+ taught core 3.x: `on submit.prevent`, `on input.debounce(300ms)`, `on keydown.enter`,
32
+ `swap #t innerHTML`, `while …`, a bare `[attr]` selector, a `parent` keyword, `you` as the event
33
+ target. The engine rejects those, or reads them as something else (`on click.prevent` listens for
34
+ an event named `click.prevent`). A test now parses every example on the engine. The repo's
35
+ `hyperfixi-developer` skill, generated from them, follows (`generate:skills` had been writing to
36
+ the wrong directory).
37
+ - **`@hyperfixi/core/metadata` describes 4.0.** `packageInfo.description` still said "Modern
38
+ hyperscript engine with fixi/htmx integration" and `compatibility` "~85% official _hyperscript",
39
+ both 3.x claims. `packageInfo.upstreamSuite` (`{ version, passed, total }`) now publishes the
40
+ engine's result on upstream _hyperscript's own test suite (1401 of 1467 in 0.9.93), and
41
+ `compatibility` is derived from it; `verify:reference` fails when it disagrees with
42
+ `packages/engine/upstream-suite/known-failures.json`. `ecosystem` drops "212 LLM examples".
43
+
44
+ ## [4.0.0] - 2026-10-04
45
+
46
+ `@hyperfixi/core`'s own hyperscript engine is gone: its root re-exports `@hyperfixi/engine`, and
47
+ its `hyperfixi.js` is the engine's 34 KB script-tag bundle where core's ~352 KB bundle used to be.
48
+ The engine follows upstream `_hyperscript`'s grammar and is gated by upstream's own test suite, so
49
+ scripts in core-only syntax need upstream's spelling (two additions stay: `new X()` and
50
+ `toggle <element>`). Core's other bundles, its htmx layer, the core-era plugin packages and the
51
+ AOT compiler retire: htmx 4 or fixi supply hypermedia attributes beside the engine, and
52
+ `@lokascript/hyperscript-adapter` runs hyperscript written in other languages. Every package moves
53
+ to 4.0.0 together. Everything under **Removed** is breaking, as is each **Changed** item marked ⚠;
54
+ [MIGRATION.md](MIGRATION.md) names each replacement.
55
+
56
+ ### Removed
57
+
58
+ - **Core's engine and its API** (#1368). These root exports had no engine counterpart:
59
+ `hyperscript` (`compile`, `compileSync`, `compileAsync`, `eval`, `validate`), `lokascript`,
60
+ `Runtime`, `RuntimeBase`, `createContext` and the element-scope helpers, `installPlugin`,
61
+ `getParserExtensionRegistry`, `setGlobal`, `DebugController`, `validatePartialContent` and its
62
+ helpers, `fromCoreAST` / `toCoreAST`. `parse` is now the engine's. The root is ESM-only, like the
63
+ engine: `dist/index.cjs` and the UMD `dist/index.min.js` (`LokaScriptCore`) are gone, though the
64
+ kept subpaths still ship CommonJS.
65
+ - **21 of core's 29 entry points**: `/commands`, `/expressions`, `/parser/*`, `/behaviors`,
66
+ `/bundle-generator`, `/registry/*`, `/lse`, and `/browser/` `hybrid-complete`, `hybrid-hx`,
67
+ `hybrid-hx-v4`, `multilingual`, `modular` (#1343–#1368). Instead of `/commands`, import the
68
+ grammar modules from the root: `import { toggle } from '@hyperfixi/core'`.
69
+ - **Core's browser bundles** (#1348, #1350, #1352, #1368): `hyperfixi-hx.js`,
70
+ `hyperfixi-hx-v4.js`, `hyperfixi-hybrid-complete.js`, `hyperfixi-multilingual.js`,
71
+ `hyperfixi-classic-i18n.js` and the code-split `hyperfixi.mjs`, plus every alias
72
+ (`hyperfixi-browser.js`, `hyperfixi-hybrid-hx.js`, each `lokascript-*.js`). Only
73
+ `hyperfixi.js` remains. CDN URLs pinned to 3.x keep working.
74
+ - **Core's embedded htmx layer** (#1342, #1348, #1350): `hx-*` and fixi `fx-*` on core's runtime,
75
+ `hx-live`, `sse-connect` / `sse-swap`, `ws-connect` / `ws-send`. Load htmx 4 or fixi beside the
76
+ engine. `hx-live` becomes the engine's `live` block, and SSE and WebSockets are htmx 4's
77
+ `hx-sse` / `hx-ws`.
78
+ - **Core-only members of `window.hyperfixi`**: `compile`, `compileSync`, `execute`, `setLocale`,
79
+ `evalLSENode`, `debugControl`, `semanticDebug`, the `hyperfixi:semantic-parse` event,
80
+ `hyperfixi:debug` logging, `_hyperscript.behaviors.resolve`, and the deprecated
81
+ `window.lokascript` (#1352, #1355).
82
+ - **Core-only hyperscript syntax** (#1346, #1363, #1365). The engine rejects `has` / `have`,
83
+ `prepend`, `copy`, `push url` / `replace url`, `process partials`, the `pseudo` keyword, prefix
84
+ `unless`, bare `beep`, `a ? b : c`, core's `swap <strategy> of X with Y`, `set @a to v on X`,
85
+ `.debounce(n)` / `.throttle(n)`, `my?.x` and `tell X to …`. A few forms still parse but no longer
86
+ do what they did, such as `toggle .a on this` and `go forward`. MIGRATION.md gives each form's
87
+ upstream spelling. The multilingual reader still accepts them all.
88
+ - **`@hyperfixi/core/multilingual`'s class API** (#1345, #1368): `MultilingualHyperscript` (with
89
+ `parseToAST`, `getAllTranslations`, …), `getMultilingual`, `multilingual`, `LanguageInfo`,
90
+ `schemaRoleInferrer`. The entry is three async functions: `parse`, `render`, `translate`.
91
+ - **The AOT compiler** (#1364). Its output ran only on a runtime that was never published.
92
+ `@lokascript/compilation-service` loses `compile()`, `POST /compile`, `CompileResponse`, the
93
+ compile cache (`SemanticCache`, `getCacheStats`, `clearCache`, `/cache`), `generateTests`'
94
+ `executionMode` and `generate()`'s `'js'` target. `generate()` now requires `target`
95
+ (`react` | `vue` | `svelte` | `intent-element`). `@hyperfixi/mcp-server` loses
96
+ `compile_hyperscript`, `execute_lse`, `lse_to_hyperscript`'s `compile` option and
97
+ `generate_tests`' `executionMode`, leaving 106 tools. The loop is now `validate_and_compile`
98
+ (name kept), then repair, then the hyperscript as is in `_="…"`.
99
+ - **`@hyperfixi/vite-plugin`'s compile mode** (#1360). `mode: 'compile'` warns and builds the
100
+ engine bundle. The exports `CompiledHandler`, `CompileOptions` and
101
+ `set/clear/hasSemanticParser` are removed.
102
+ - **Smaller removals.** `@hyperfixi/core/reference` loses `availability`, `BundleAvailability`
103
+ and `getCommandsByAvailability` (#1363). `@hyperfixi/speech` loses `speechPlugin`,
104
+ `speakCommand`, `askCommand` and `answerCommand`; the engine has `ask` / `answer` (#1358).
105
+ `@hyperfixi/intent-element` loses its `evalLSENode` fallback (#1356).
106
+ `@hyperfixi/patterns-reference` loses four rows that held only retired htmx attributes, and
107
+ `hx-live-with-mutator` is renamed `live-with-handler` (#1348). Of the never-published VS Code
108
+ extensions, the LokaScript one loses its debugger and the standalone `_hyperscript` one is
109
+ retired (#1361).
110
+
111
+ ### Deprecated
112
+
113
+ - **`@hyperfixi/reactivity`, `@hyperfixi/realtime`, `@hyperfixi/components`**: deprecated on npm,
114
+ last version 3.3.0 (#1358). Use the engine's built-in `live` / `when` / `bind`, htmx 4's
115
+ `hx-sse` / `hx-ws`, and upstream's component extension.
116
+ - **`@hyperfixi/types-browser`'s `LokaScriptCoreAPI`**: a deprecated alias of `HyperfixiAPI`
117
+ (#1356).
118
+
119
+ ### Changed
120
+
121
+ - ⚠ **`@hyperfixi/core` is the engine plus tooling** (#1368). The root is
122
+ `export * from '@hyperfixi/engine'` and `VERSION`: `register`, `everything` and each grammar
123
+ module, `api`, `parse`, `evaluate`, `processNode`, `boot`, and the AST types. The engine stays
124
+ external, so both packages share one grammar. Kept: `/multilingual`, `/ast-utils`,
125
+ `/reference`, `/metadata`, `/lsp-metadata`, `/browser`.
126
+ - ⚠ **`hyperfixi.js` (`@hyperfixi/core/browser`) is the engine's `hyperfixi-hs.js`**, byte for
127
+ byte: 34 KB gzipped instead of ~352 KB (#1355). `window.hyperfixi` is `window._hyperscript`,
128
+ upstream-shaped (`evaluate`, `parse`, `process`, `use`, `config`, `addSourceTransform`). Parse
129
+ errors are a `hyperscript:parse-error` event on the element plus a `console.error` (#1354).
130
+ - ⚠ **Runtime semantics follow upstream** wherever core's differed. `swap #a with #b` exchanges
131
+ the elements; `show` / `hide … with *opacity` honour the strategy; `tell` binds `you`, not `me`;
132
+ `set` on a selector sets every match; and `no ""` is true. MIGRATION.md has the full list.
133
+ - ⚠ **`@hyperfixi/vite-plugin` emits a bundle on `@hyperfixi/engine`** (#1343). There is one
134
+ tier: the grammar modules the scan finds. It weighs 17.9 KB gzipped for three commands (3.x lite:
135
+ 3.9 KB) and 34.4 KB for everything; 3.x fell back to 352 KB on `fetch`. htmx is not bundled.
136
+ Non-English scripts are translated as the engine reads them. `devFallback: 'everything'` is new,
137
+ and `'full'` / `'hybrid-complete'` mean the same. The plugin no longer depends on core.
138
+ - ⚠ **`@hyperfixi/behaviors` runs on the engine** (peer `@hyperfixi/engine`; upstream works too).
139
+ Each behavior is defined with `host.evaluate(source)` and written in upstream's idioms.
140
+ Toggleable's `target` parameter is now `targetEl`. `LokaScriptInstance` / `LokaScriptWindow`
141
+ are now `HyperscriptHost` / `HyperscriptWindow` (#1338).
142
+ - ⚠ **`@hyperfixi/speech` is an engine module** (#1358). Install it with
143
+ `register(...everything, speak)`. It is ESM-only and peers on the engine. `speak` takes
144
+ upstream's syntax (`speak <text> [with voice|rate|pitch|volume <x>]…`) and waits for the
145
+ utterance to end.
146
+ - ⚠ **The localized htmx vocabulary moved** from `@hyperfixi/core/vocab/htmx/{lang}.js` to
147
+ `@lokascript/htmx-adapter/vocab/{lang}.js`; the data is unchanged (#1349).
148
+ - **`@hyperfixi/intent-element`** renders an intent to English with the page's semantic bundle
149
+ and runs it through the host's `evaluate` (`NO_RENDERER` without one). It peers on
150
+ `@hyperfixi/engine` and `@lokascript/semantic` (#1339, #1356).
151
+ - **`@lokascript/semantic` writes upstream's spelling in English** for core-only forms (#1346).
152
+ For example, `has` becomes `matches`, `prepend` becomes `put … at start of`, and swap strategies
153
+ become `put … into` / `before` / `after`. This reaches `translate(…, 'en')`,
154
+ `render(node, 'en')`, both adapters and MCP `translate_to_english`. In `fromSemanticAST`, a
155
+ handler's `then` chain is now its body (#1359).
156
+ - **The language tools read the engine's parse** (#1356, #1359, #1365).
157
+ `@lokascript/language-server` and MCP `validate_hyperscript` report the engine's errors
158
+ (`source: 'engine'`). Hover and symbols come from `@lokascript/semantic`, and some long handlers
159
+ show fewer commands than in 3.x. Hyperscript mode flags exactly `new X()` and `toggle <element>`.
160
+ `@lokascript/compilation-service` rejects natural-language input the engine cannot read
161
+ (`ENGINE_PARSE_ERROR`), and its generated Playwright tests load `hyperfixi-hs.js`. The language
162
+ server, the MCP server and the compilation service now peer on `@hyperfixi/engine`.
163
+ - **MCP**: `get_bundle_config` recommends `hyperfixi-hs.js`, plus an `adapter` field for
164
+ non-English. `analyze_complexity` / `analyze_metrics` no longer count every comparison as a
165
+ decision. The `debug_*` tools point to `log` and `breakpoint`. `UNSUPPORTED_QUERY_LITERAL` is
166
+ gone (#1350, #1352, #1359, #1361, #1364).
167
+ - **`@hyperfixi/core/reference`, `/lsp-metadata`, `/metadata` describe the engine** (#1355,
168
+ #1363). They cover its 53 commands, adding `for`, `ask`, `answer` and `beep!`. Examples are in
169
+ upstream spelling and each is checked to parse; descriptions of core-only semantics (`pick`,
170
+ `beep`, `swap`) are fixed. `FEATURE_KEYWORDS` gains `install`, `when`, `live` and `bind`, and
171
+ `bundleInfo` holds one row.
172
+ - **Dependencies.** `@lokascript/i18n`, `@hyperfixi/testing-framework`, `@hyperfixi/vite-plugin`,
173
+ `@hyperfixi/behaviors`, `@hyperfixi/speech` and `@hyperfixi/intent-element` no longer depend
174
+ on core. Core drops `@lokascript/intent`, morphlex, tslib and its optional peers. Versions are
175
+ lockstep, so upgrade `@hyperfixi/*` and `@lokascript/*` together. `@hyperfixi/mcp-server`,
176
+ `@lokascript/framework` (tests) and `@hyperfixi/server-bridge` (tests) range on
177
+ `@lokascript/domains ^3.0.1`, the first domains release whose peers accept framework,
178
+ semantic and intent 4.x (`^3.1.0 || ^4.0.0`).
179
+
180
+ ### Added
181
+
182
+ - **`@hyperfixi/engine` exports `expr`**, so a grammar module can live in another package
183
+ (#1358).
184
+ - **`@hyperfixi/core/ast-utils`'s `withEnginePositions`** gives interchange nodes the source
185
+ spans of the engine's parse (#1359).
186
+
187
+ ### Fixed
188
+
189
+ - **`@hyperfixi/engine`** accepts upstream's `beep!` command (`beep! a, b`); 3.3.0 rejected it
190
+ (#1362).
191
+ - **`@hyperfixi/types-browser`** types `window.hyperfixi` / `window._hyperscript` as the engine's
192
+ `HyperfixiAPI`. 3.3.0 re-exported a `./globals` it never emitted, so `window.hyperfixi` was
193
+ untyped (#1356).
194
+ - **Semantic browser bundles** (#1351). Single-language and regional bundles (es, ja,
195
+ east-asian, …) registered no English, so the hyperscript adapter left scripts untranslated. They
196
+ now register it (+~2.2 KB gzipped) and export `translate`. The lite adapter finds any
197
+ `LokaScriptSemantic*` global.
198
+ - **`@lokascript/semantic`** (#1338, #1343, #1347). `/core` plus a language module no longer
199
+ throws "No patterns registered". `on click from (x or me)` parses in th and zh. A `js … end`
200
+ block no longer ends its handler in ja / ko / hi / tr / qu / bn. An options object's `}` is no
201
+ longer read as an SOV event name.
202
+ - **Language server and MCP** (#1359, #1363, #1365). `beep!` has hover docs. `set X to`
203
+ completions offer values. Hyperscript-mode errors land on the form, not line 0. Hover no longer
204
+ shows a second `on click`.
205
+
10
206
  ## [3.3.0] - 2026-10-02
11
207
 
12
208
  The first publication of `@hyperfixi/engine`, the hyperscript engine meant to replace the one
@@ -899,7 +1095,9 @@ _Synchronized version release. See git history for details._
899
1095
  - npm access token stored in GitHub Secrets
900
1096
  - 2FA recommended for npm organization
901
1097
 
902
- [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v3.3.0...HEAD
1098
+ [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.0.1...HEAD
1099
+ [4.0.1]: https://github.com/codetalcott/hyperfixi/compare/v4.0.0...v4.0.1
1100
+ [4.0.0]: https://github.com/codetalcott/hyperfixi/compare/v3.3.0...v4.0.0
903
1101
  [3.3.0]: https://github.com/codetalcott/hyperfixi/compare/v3.2.0...v3.3.0
904
1102
  [3.2.0]: https://github.com/codetalcott/hyperfixi/compare/v3.1.0...v3.2.0
905
1103
  [3.1.0]: https://github.com/codetalcott/hyperfixi/compare/v3.0.0...v3.1.0
package/README.md CHANGED
@@ -1,16 +1,36 @@
1
1
  # @hyperfixi/behaviors
2
2
 
3
- Reusable hyperscript behaviors for HyperFixi / LokaScript. A behavior is installed
4
- on any element with `_="install BehaviorName(params)"` and is defined in **pure
5
- hyperscript** (its `source`), compiled on demand.
3
+ Reusable hyperscript behaviors. A behavior is installed on any element with
4
+ `_="install BehaviorName(params)"` and is defined in **pure hyperscript** (its `source`),
5
+ in upstream `_hyperscript`'s own idioms. The host is `@hyperfixi/engine` (the
6
+ `hyperfixi-hs.js` script-tag bundle); every source also runs, unchanged, on upstream
7
+ `_hyperscript` 0.9.93.
6
8
 
7
9
  ```html
8
- <script src="hyperfixi.js"></script>
10
+ <script src="hyperfixi-hs.js"></script>
9
11
  <script src="resolver.browser.global.js"></script>
10
- <!-- install X just works — behaviors compile on first use -->
12
+ <!-- install X just works — the bundle defines every behavior on the host -->
11
13
  <button _="install Toggleable(cls: 'active')">Toggle</button>
12
14
  ```
13
15
 
16
+ ## Hosts
17
+
18
+ The bundle (and the npm `register*()` functions) define each behavior with the host's
19
+ `evaluate(source)`, exactly as a page's `<script type="text/hyperscript">` would. Anything
20
+ shaped like upstream's `_hyperscript` object is a host; `window.hyperfixi` is tried first,
21
+ then `window._hyperscript`.
22
+
23
+ - **`@hyperfixi/engine`** (`hyperfixi-hs.js`): the peer dependency, and what the tests run
24
+ on. `install Toggleable` with no arguments works.
25
+ - **upstream `_hyperscript`** (0.9.93): every source runs the same, measured in a browser
26
+ (2026-10-03). One difference, upstream's: `install Toggleable` _without parentheses_ throws
27
+ there, so write `install Toggleable()` (or give an argument) on upstream.
28
+
29
+ Two things the sources never do, because no hyperscript engine reads them that way: default a
30
+ parameter with a bare `set cls to "active"` (it makes a local the handlers never see — the
31
+ sources write `set element's cls to …`), and name a parameter `target` (that is hyperscript's
32
+ own name for the event target, so Toggleable's is `targetEl`).
33
+
14
34
  ## The boundary rule — what a behavior _is_
15
35
 
16
36
  > **A behavior is a named, parameterized, _reusable inline script_ — `on event →
@@ -22,10 +42,10 @@ This rule is why the set is small and tiered. Most "behaviors" people reach for
22
42
  really just short inline scripts — see [Recipes](#recipes--most-things-are-inline-scripts).
23
43
 
24
44
  A single source of truth drives every consumer: the hyperscript `source` string in
25
- each `src/schemas/*.schema.ts`. The npm `register*()` functions, the CDN
26
- `resolver.browser.global.js` bundle, and `@hyperfixi/patterns-reference` all compile
45
+ each `src/schemas/*.schema.ts`. The npm `register*()` functions, the browser
46
+ `resolver.browser.global.js` bundle, and `@hyperfixi/patterns-reference` all define
27
47
  that **same source** — one runtime path, identical in the browser and Node. **Every
28
- behavior compiles from `source`; there is no imperative-JS installer.** (An earlier
48
+ behavior is defined from `source`; there is no imperative-JS installer.** (An earlier
29
49
  imperative-installer experiment forked a second, diverging path; it has been removed
30
50
  for all tiers — including the three experimental components, which now run their
31
51
  pointer loops from `source` like everything else.)
@@ -87,7 +107,7 @@ recipe to an installed behavior only when it is genuinely reusable and parameter
87
107
 
88
108
  ```javascript
89
109
  import { registerAll } from '@hyperfixi/behaviors';
90
- await registerAll(); // registers every behavior with window.hyperfixi
110
+ await registerAll(); // defines every behavior on window.hyperfixi (or window._hyperscript)
91
111
 
92
112
  import { registerToggleable } from '@hyperfixi/behaviors/toggleable';
93
113
  await registerToggleable(); // tree-shakeable single behavior