@hyperfixi/core 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 (378) hide show
  1. package/README.md +57 -179
  2. package/dist/ast-utils/index.cjs +74 -806
  3. package/dist/ast-utils/index.d.ts +1 -1
  4. package/dist/ast-utils/index.mjs +74 -805
  5. package/dist/ast-utils/interchange/engine-positions.d.ts +3 -0
  6. package/dist/ast-utils/interchange/index.d.ts +1 -2
  7. package/dist/hyperfixi.js +19 -2
  8. package/dist/index.d.ts +2 -22
  9. package/dist/index.mjs +3 -29128
  10. package/dist/lsp-metadata.cjs +77 -73
  11. package/dist/lsp-metadata.d.ts +4 -4
  12. package/dist/lsp-metadata.mjs +77 -73
  13. package/dist/metadata.cjs +34 -266
  14. package/dist/metadata.d.ts +31 -26
  15. package/dist/metadata.mjs +34 -266
  16. package/dist/multilingual/index.cjs +16 -382
  17. package/dist/multilingual/index.d.ts +4 -32
  18. package/dist/multilingual/index.mjs +15 -377
  19. package/dist/reference/index.cjs +67 -216
  20. package/dist/reference/index.d.ts +0 -3
  21. package/dist/reference/index.mjs +68 -216
  22. package/dist/version.d.ts +1 -1
  23. package/package.json +13 -179
  24. package/dist/__test-utils__/context-builders.d.ts +0 -42
  25. package/dist/__test-utils__/error-testing.d.ts +0 -18
  26. package/dist/__test-utils__/index.d.ts +0 -6
  27. package/dist/__test-utils__/mock-types.d.ts +0 -57
  28. package/dist/__test-utils__/parser-context-mock.d.ts +0 -7
  29. package/dist/__test-utils__/parser-helpers.d.ts +0 -38
  30. package/dist/api/hyperscript-api.d.ts +0 -90
  31. package/dist/api/lokascript-api.d.ts +0 -9
  32. package/dist/ast/command-slots.d.ts +0 -140
  33. package/dist/ast/guards.d.ts +0 -15
  34. package/dist/ast/legacy.d.ts +0 -15
  35. package/dist/ast/nodes.d.ts +0 -243
  36. package/dist/ast-utils/interchange/from-core.d.ts +0 -12
  37. package/dist/ast-utils/interchange/to-core.d.ts +0 -8
  38. package/dist/behaviors/boosted.d.ts +0 -29
  39. package/dist/behaviors/history-swap.d.ts +0 -24
  40. package/dist/behaviors/index.cjs +0 -1155
  41. package/dist/behaviors/index.d.ts +0 -4
  42. package/dist/behaviors/index.mjs +0 -1145
  43. package/dist/bundle-generator/executor-core.d.ts +0 -4
  44. package/dist/bundle-generator/generator.d.ts +0 -4
  45. package/dist/bundle-generator/index.cjs +0 -2804
  46. package/dist/bundle-generator/index.d.ts +0 -6
  47. package/dist/bundle-generator/index.mjs +0 -2779
  48. package/dist/bundle-generator/parser-templates.d.ts +0 -6
  49. package/dist/bundle-generator/template-capabilities.d.ts +0 -12
  50. package/dist/bundle-generator/templates.d.ts +0 -12
  51. package/dist/bundle-generator/types.d.ts +0 -34
  52. package/dist/chunks/bridge-CI9SOl8u.js +0 -2
  53. package/dist/chunks/browser-modular-7CpI5VF2.js +0 -2
  54. package/dist/chunks/index-BwXDEK0m.js +0 -2
  55. package/dist/chunks/index-DQi2o8Lk.js +0 -2
  56. package/dist/chunks/index-uCOQ8Qn0.js +0 -2
  57. package/dist/commands/advanced/js.d.ts +0 -40
  58. package/dist/commands/animation/measure.d.ts +0 -43
  59. package/dist/commands/animation/settle.d.ts +0 -38
  60. package/dist/commands/animation/start-view-transition.d.ts +0 -38
  61. package/dist/commands/animation/take.d.ts +0 -41
  62. package/dist/commands/animation/transition.d.ts +0 -49
  63. package/dist/commands/async/fetch.d.ts +0 -61
  64. package/dist/commands/async/wait.d.ts +0 -51
  65. package/dist/commands/behaviors/install.d.ts +0 -40
  66. package/dist/commands/content/append.d.ts +0 -26
  67. package/dist/commands/content/insertion-base.d.ts +0 -60
  68. package/dist/commands/content/prepend.d.ts +0 -26
  69. package/dist/commands/control-flow/break.d.ts +0 -29
  70. package/dist/commands/control-flow/continue.d.ts +0 -29
  71. package/dist/commands/control-flow/exit.d.ts +0 -29
  72. package/dist/commands/control-flow/halt.d.ts +0 -39
  73. package/dist/commands/control-flow/if.d.ts +0 -58
  74. package/dist/commands/control-flow/repeat.d.ts +0 -50
  75. package/dist/commands/control-flow/return.d.ts +0 -33
  76. package/dist/commands/control-flow/signal-base.d.ts +0 -18
  77. package/dist/commands/control-flow/throw.d.ts +0 -34
  78. package/dist/commands/control-flow/unless.d.ts +0 -3
  79. package/dist/commands/data/clear.d.ts +0 -37
  80. package/dist/commands/data/decrement.d.ts +0 -3
  81. package/dist/commands/data/default.d.ts +0 -60
  82. package/dist/commands/data/get.d.ts +0 -35
  83. package/dist/commands/data/increment.d.ts +0 -42
  84. package/dist/commands/data/set.d.ts +0 -76
  85. package/dist/commands/decorators/index.d.ts +0 -14
  86. package/dist/commands/dom/add.d.ts +0 -44
  87. package/dist/commands/dom/close.d.ts +0 -32
  88. package/dist/commands/dom/dom-modification-base.d.ts +0 -48
  89. package/dist/commands/dom/empty.d.ts +0 -32
  90. package/dist/commands/dom/hide.d.ts +0 -28
  91. package/dist/commands/dom/make.d.ts +0 -34
  92. package/dist/commands/dom/open.d.ts +0 -34
  93. package/dist/commands/dom/process-partials.d.ts +0 -51
  94. package/dist/commands/dom/put.d.ts +0 -42
  95. package/dist/commands/dom/remove.d.ts +0 -46
  96. package/dist/commands/dom/reset.d.ts +0 -32
  97. package/dist/commands/dom/select.d.ts +0 -32
  98. package/dist/commands/dom/show.d.ts +0 -29
  99. package/dist/commands/dom/swap.d.ts +0 -65
  100. package/dist/commands/dom/toggle.d.ts +0 -69
  101. package/dist/commands/dom/visibility-base.d.ts +0 -22
  102. package/dist/commands/events/send.d.ts +0 -3
  103. package/dist/commands/events/trigger.d.ts +0 -49
  104. package/dist/commands/execution/blur.d.ts +0 -32
  105. package/dist/commands/execution/call.d.ts +0 -35
  106. package/dist/commands/execution/focus.d.ts +0 -32
  107. package/dist/commands/execution/pseudo-command.d.ts +0 -41
  108. package/dist/commands/helpers/attribute-manipulation.d.ts +0 -11
  109. package/dist/commands/helpers/attribute-target.d.ts +0 -9
  110. package/dist/commands/helpers/batch-dom-operations.d.ts +0 -12
  111. package/dist/commands/helpers/body-ops.d.ts +0 -10
  112. package/dist/commands/helpers/class-manipulation.d.ts +0 -11
  113. package/dist/commands/helpers/condition-helpers.d.ts +0 -4
  114. package/dist/commands/helpers/dom-mutation.d.ts +0 -16
  115. package/dist/commands/helpers/duration-parsing.d.ts +0 -8
  116. package/dist/commands/helpers/element-property-access.d.ts +0 -7
  117. package/dist/commands/helpers/element-resolution.d.ts +0 -16
  118. package/dist/commands/helpers/error-helpers.d.ts +0 -17
  119. package/dist/commands/helpers/event-helpers.d.ts +0 -13
  120. package/dist/commands/helpers/event-waiting.d.ts +0 -37
  121. package/dist/commands/helpers/index.d.ts +0 -32
  122. package/dist/commands/helpers/input-validator.d.ts +0 -23
  123. package/dist/commands/helpers/loop-executor.d.ts +0 -56
  124. package/dist/commands/helpers/numeric-target-parser.d.ts +0 -21
  125. package/dist/commands/helpers/property-target.d.ts +0 -20
  126. package/dist/commands/helpers/selector-type-detection.d.ts +0 -24
  127. package/dist/commands/helpers/slots.d.ts +0 -5
  128. package/dist/commands/helpers/smart-element.d.ts +0 -16
  129. package/dist/commands/helpers/style-manipulation.d.ts +0 -16
  130. package/dist/commands/helpers/target-elements.d.ts +0 -5
  131. package/dist/commands/helpers/temporal-modifiers.d.ts +0 -15
  132. package/dist/commands/helpers/url-argument-parser.d.ts +0 -13
  133. package/dist/commands/helpers/url-validation.d.ts +0 -7
  134. package/dist/commands/helpers/variable-access.d.ts +0 -13
  135. package/dist/commands/helpers/visibility-target-parser.d.ts +0 -15
  136. package/dist/commands/helpers/write-target.d.ts +0 -42
  137. package/dist/commands/index.cjs +0 -24168
  138. package/dist/commands/index.d.ts +0 -171
  139. package/dist/commands/index.mjs +0 -23981
  140. package/dist/commands/manifest.d.ts +0 -17
  141. package/dist/commands/navigation/go.d.ts +0 -58
  142. package/dist/commands/navigation/push-url.d.ts +0 -48
  143. package/dist/commands/navigation/replace-url.d.ts +0 -3
  144. package/dist/commands/navigation/scroll-to.d.ts +0 -43
  145. package/dist/commands/templates/render.d.ts +0 -47
  146. package/dist/commands/utility/beep.d.ts +0 -41
  147. package/dist/commands/utility/breakpoint.d.ts +0 -32
  148. package/dist/commands/utility/copy.d.ts +0 -41
  149. package/dist/commands/utility/log.d.ts +0 -36
  150. package/dist/commands/utility/pick.d.ts +0 -47
  151. package/dist/commands/utility/tell.d.ts +0 -39
  152. package/dist/compatibility/browser-bundle-classic.d.ts +0 -17
  153. package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +0 -22
  154. package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +0 -43
  155. package/dist/compatibility/browser-bundle-lite.d.ts +0 -15
  156. package/dist/compatibility/browser-bundle-modular.d.ts +0 -18
  157. package/dist/compatibility/browser-bundle-multilingual.d.ts +0 -19
  158. package/dist/compatibility/browser-bundle-semantic-complete.d.ts +0 -24
  159. package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +0 -16
  160. package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +0 -18
  161. package/dist/compatibility/browser-modular.d.ts +0 -42
  162. package/dist/compatibility/browser-tests/helpers/semantic-page.d.ts +0 -3
  163. package/dist/compatibility/browser-tests/test-utils.d.ts +0 -21
  164. package/dist/compatibility/bundle-shell.d.ts +0 -13
  165. package/dist/compatibility/bundle-sources.d.ts +0 -4
  166. package/dist/compatibility/eval-hyperscript.d.ts +0 -16
  167. package/dist/compatibility/hyperscript-adapter.d.ts +0 -38
  168. package/dist/core/ast-property-utils.d.ts +0 -2
  169. package/dist/core/context.d.ts +0 -19
  170. package/dist/core/dom.d.ts +0 -15
  171. package/dist/core/evaluator-types.d.ts +0 -5
  172. package/dist/core/events.d.ts +0 -48
  173. package/dist/core/executor.d.ts +0 -34
  174. package/dist/core/expression-evaluator.d.ts +0 -6
  175. package/dist/core/expression-registry.d.ts +0 -8
  176. package/dist/core/scope-hooks.d.ts +0 -24
  177. package/dist/debug/debug-controller.d.ts +0 -62
  178. package/dist/debug/index.d.ts +0 -5
  179. package/dist/dom/attribute-processor.d.ts +0 -75
  180. package/dist/dom/detect-language.d.ts +0 -3
  181. package/dist/dom/minimal-attribute-processor.d.ts +0 -20
  182. package/dist/expressions/base-expression.d.ts +0 -27
  183. package/dist/expressions/bundles/common-expressions.d.ts +0 -10
  184. package/dist/expressions/bundles/core-expressions.d.ts +0 -8
  185. package/dist/expressions/bundles/full-expressions.d.ts +0 -11
  186. package/dist/expressions/bundles/index.d.ts +0 -7
  187. package/dist/expressions/collection/index.d.ts +0 -10
  188. package/dist/expressions/conversion/index.d.ts +0 -31
  189. package/dist/expressions/expression-tiers.d.ts +0 -13
  190. package/dist/expressions/index.cjs +0 -4331
  191. package/dist/expressions/index.d.ts +0 -13
  192. package/dist/expressions/index.mjs +0 -4312
  193. package/dist/expressions/logical/index.d.ts +0 -61
  194. package/dist/expressions/mathematical/index.d.ts +0 -80
  195. package/dist/expressions/positional/index.d.ts +0 -31
  196. package/dist/expressions/properties/index.d.ts +0 -27
  197. package/dist/expressions/property-access-utils.d.ts +0 -23
  198. package/dist/expressions/references/index.d.ts +0 -39
  199. package/dist/expressions/shared/comparison-utils.d.ts +0 -10
  200. package/dist/expressions/shared/index.d.ts +0 -10
  201. package/dist/expressions/shared/number-utils.d.ts +0 -8
  202. package/dist/expressions/shared/tracking.d.ts +0 -20
  203. package/dist/expressions/shared/validation-utils.d.ts +0 -13
  204. package/dist/expressions/special/index.d.ts +0 -78
  205. package/dist/expressions/type-helpers.d.ts +0 -11
  206. package/dist/expressions/type-registry.d.ts +0 -57
  207. package/dist/expressions/validation-helpers.d.ts +0 -15
  208. package/dist/htmx/hcon.d.ts +0 -9
  209. package/dist/htmx/htmx-attribute-processor.d.ts +0 -120
  210. package/dist/htmx/htmx-translator.d.ts +0 -22
  211. package/dist/htmx/i18n-hooks.d.ts +0 -18
  212. package/dist/htmx/i18n-orchestrator.d.ts +0 -16
  213. package/dist/htmx/index.d.ts +0 -3
  214. package/dist/htmx/lang-resolver.d.ts +0 -3
  215. package/dist/htmx/sse.d.ts +0 -60
  216. package/dist/htmx/ws.d.ts +0 -59
  217. package/dist/hyperfixi-browser-classic-i18n.js +0 -2
  218. package/dist/hyperfixi-browser.js +0 -2
  219. package/dist/hyperfixi-classic-i18n.js +0 -2
  220. package/dist/hyperfixi-hx-v4.js +0 -1
  221. package/dist/hyperfixi-hx.js +0 -1
  222. package/dist/hyperfixi-hybrid-complete.js +0 -1
  223. package/dist/hyperfixi-hybrid-hx.js +0 -1
  224. package/dist/hyperfixi-multilingual.js +0 -2
  225. package/dist/hyperfixi.mjs +0 -2
  226. package/dist/i18n/error-catalog.d.ts +0 -12
  227. package/dist/index.cjs +0 -29159
  228. package/dist/index.min.js +0 -2
  229. package/dist/lib/dom-globals-shim.d.ts +0 -2
  230. package/dist/lib/index.d.ts +0 -4
  231. package/dist/lib/morph-adapter.d.ts +0 -9
  232. package/dist/lib/swap-executor.d.ts +0 -12
  233. package/dist/lib/view-transitions.d.ts +0 -7
  234. package/dist/lokascript-browser-classic-i18n.js +0 -2
  235. package/dist/lokascript-browser.js +0 -2
  236. package/dist/lokascript-hybrid-complete.js +0 -1
  237. package/dist/lokascript-hybrid-hx.js +0 -1
  238. package/dist/lokascript-multilingual.js +0 -2
  239. package/dist/lse/index.cjs +0 -84
  240. package/dist/lse/index.d.ts +0 -15
  241. package/dist/lse/index.mjs +0 -71
  242. package/dist/multilingual/bridge.d.ts +0 -38
  243. package/dist/multilingual/schema-roles.d.ts +0 -3
  244. package/dist/parser/__types__/test-helpers.d.ts +0 -25
  245. package/dist/parser/command-grammar.d.ts +0 -14
  246. package/dist/parser/command-node-builder.d.ts +0 -46
  247. package/dist/parser/command-parsers/animation-commands.d.ts +0 -6
  248. package/dist/parser/command-parsers/async-commands.d.ts +0 -5
  249. package/dist/parser/command-parsers/control-flow-commands.d.ts +0 -7
  250. package/dist/parser/command-parsers/declared-commands.d.ts +0 -6
  251. package/dist/parser/command-parsers/dom-commands.d.ts +0 -11
  252. package/dist/parser/command-parsers/event-commands.d.ts +0 -4
  253. package/dist/parser/command-parsers/navigation-commands.d.ts +0 -6
  254. package/dist/parser/command-parsers/utility-commands.d.ts +0 -14
  255. package/dist/parser/command-parsers/variable-commands.d.ts +0 -12
  256. package/dist/parser/error-handler.d.ts +0 -34
  257. package/dist/parser/extensions.d.ts +0 -43
  258. package/dist/parser/full-parser.cjs +0 -7943
  259. package/dist/parser/full-parser.d.ts +0 -4
  260. package/dist/parser/full-parser.mjs +0 -7940
  261. package/dist/parser/helpers/ast-helpers.d.ts +0 -24
  262. package/dist/parser/helpers/parsing-helpers.d.ts +0 -19
  263. package/dist/parser/helpers/token-helpers.d.ts +0 -28
  264. package/dist/parser/hybrid/aliases.cjs +0 -44
  265. package/dist/parser/hybrid/aliases.d.ts +0 -7
  266. package/dist/parser/hybrid/aliases.mjs +0 -37
  267. package/dist/parser/hybrid/ast-types.cjs +0 -3
  268. package/dist/parser/hybrid/ast-types.d.ts +0 -97
  269. package/dist/parser/hybrid/ast-types.mjs +0 -2
  270. package/dist/parser/hybrid/index.cjs +0 -1185
  271. package/dist/parser/hybrid/index.d.ts +0 -6
  272. package/dist/parser/hybrid/index.mjs +0 -1175
  273. package/dist/parser/hybrid/parser-core.cjs +0 -1171
  274. package/dist/parser/hybrid/parser-core.d.ts +0 -69
  275. package/dist/parser/hybrid/parser-core.mjs +0 -1169
  276. package/dist/parser/hybrid/tokenizer.cjs +0 -255
  277. package/dist/parser/hybrid/tokenizer.d.ts +0 -9
  278. package/dist/parser/hybrid/tokenizer.mjs +0 -252
  279. package/dist/parser/hybrid-parser.cjs +0 -1249
  280. package/dist/parser/hybrid-parser.d.ts +0 -10
  281. package/dist/parser/hybrid-parser.mjs +0 -1242
  282. package/dist/parser/parser-constants.d.ts +0 -100
  283. package/dist/parser/parser-interface.d.ts +0 -12
  284. package/dist/parser/parser-types.d.ts +0 -164
  285. package/dist/parser/parser.d.ts +0 -165
  286. package/dist/parser/pratt-parser.d.ts +0 -41
  287. package/dist/parser/regex-parser.cjs +0 -422
  288. package/dist/parser/regex-parser.d.ts +0 -4
  289. package/dist/parser/regex-parser.mjs +0 -419
  290. package/dist/parser/runtime.d.ts +0 -14
  291. package/dist/parser/semantic-integration.d.ts +0 -17
  292. package/dist/parser/token-consumer.d.ts +0 -34
  293. package/dist/parser/token-predicates.d.ts +0 -77
  294. package/dist/parser/tokenizer.d.ts +0 -28
  295. package/dist/parser/types.d.ts +0 -105
  296. package/dist/performance/expression-cache.d.ts +0 -78
  297. package/dist/performance/integration.d.ts +0 -40
  298. package/dist/performance/production-monitor.d.ts +0 -67
  299. package/dist/registry/browser-types.cjs +0 -81
  300. package/dist/registry/browser-types.d.ts +0 -20
  301. package/dist/registry/browser-types.mjs +0 -76
  302. package/dist/registry/environment.cjs +0 -36
  303. package/dist/registry/environment.d.ts +0 -19
  304. package/dist/registry/environment.mjs +0 -30
  305. package/dist/registry/event-source-registry.d.ts +0 -54
  306. package/dist/registry/examples/server-commands.d.ts +0 -6
  307. package/dist/registry/examples/server-event-source.d.ts +0 -32
  308. package/dist/registry/index.cjs +0 -14055
  309. package/dist/registry/index.d.ts +0 -39
  310. package/dist/registry/index.mjs +0 -14039
  311. package/dist/registry/runtime-integration.d.ts +0 -23
  312. package/dist/registry/universal-types.cjs +0 -91
  313. package/dist/registry/universal-types.d.ts +0 -35
  314. package/dist/registry/universal-types.mjs +0 -86
  315. package/dist/runtime/cleanup-registry.d.ts +0 -47
  316. package/dist/runtime/command-adapter.d.ts +0 -69
  317. package/dist/runtime/environment.d.ts +0 -75
  318. package/dist/runtime/plugin.d.ts +0 -14
  319. package/dist/runtime/runtime-base.d.ts +0 -100
  320. package/dist/runtime/runtime-factory.d.ts +0 -29
  321. package/dist/runtime/runtime.d.ts +0 -20
  322. package/dist/runtime/temporal-modifiers.d.ts +0 -37
  323. package/dist/test-setup.d.ts +0 -28
  324. package/dist/test-utilities.d.ts +0 -39
  325. package/dist/types/base-types.d.ts +0 -231
  326. package/dist/types/code-fix.d.ts +0 -39
  327. package/dist/types/command-metadata.d.ts +0 -57
  328. package/dist/types/command-types.d.ts +0 -262
  329. package/dist/types/context-types.d.ts +0 -106
  330. package/dist/types/core-context.d.ts +0 -22
  331. package/dist/types/core.d.ts +0 -143
  332. package/dist/types/error-codes.d.ts +0 -207
  333. package/dist/types/expression-types.d.ts +0 -155
  334. package/dist/types/hooks.d.ts +0 -45
  335. package/dist/types/index.d.ts +0 -32
  336. package/dist/types/program.d.ts +0 -8
  337. package/dist/types/result.d.ts +0 -73
  338. package/dist/types/template-types.d.ts +0 -162
  339. package/dist/types/type-guards.d.ts +0 -24
  340. package/dist/types/unified-types.d.ts +0 -91
  341. package/dist/utils/beep.d.ts +0 -8
  342. package/dist/utils/debug-events.d.ts +0 -41
  343. package/dist/utils/debug.d.ts +0 -35
  344. package/dist/utils/dom-utils.d.ts +0 -16
  345. package/dist/utils/element-check.d.ts +0 -8
  346. package/dist/utils/keyboard-shortcuts.d.ts +0 -18
  347. package/dist/utils/performance.d.ts +0 -40
  348. package/dist/validation/command-pattern-validator.d.ts +0 -53
  349. package/dist/validation/common-validators.d.ts +0 -24
  350. package/dist/validation/lightweight-validators.d.ts +0 -113
  351. package/dist/validation/partial-validation-types.d.ts +0 -50
  352. package/dist/validation/partial-validator.d.ts +0 -6
  353. package/dist/validation/partial-warning-formatter.d.ts +0 -6
  354. package/dist/validation/validate-cli.d.ts +0 -41
  355. package/vocab/htmx/ar.js +0 -62
  356. package/vocab/htmx/bn.js +0 -65
  357. package/vocab/htmx/de.js +0 -83
  358. package/vocab/htmx/en.js +0 -24
  359. package/vocab/htmx/es.js +0 -79
  360. package/vocab/htmx/fr.js +0 -79
  361. package/vocab/htmx/he.js +0 -61
  362. package/vocab/htmx/hi.js +0 -81
  363. package/vocab/htmx/id.js +0 -76
  364. package/vocab/htmx/it.js +0 -79
  365. package/vocab/htmx/ja.js +0 -85
  366. package/vocab/htmx/ko.js +0 -81
  367. package/vocab/htmx/ms.js +0 -58
  368. package/vocab/htmx/pl.js +0 -80
  369. package/vocab/htmx/pt.js +0 -81
  370. package/vocab/htmx/qu.js +0 -83
  371. package/vocab/htmx/ru.js +0 -82
  372. package/vocab/htmx/sw.js +0 -79
  373. package/vocab/htmx/th.js +0 -67
  374. package/vocab/htmx/tl.js +0 -56
  375. package/vocab/htmx/tr.js +0 -86
  376. package/vocab/htmx/uk.js +0 -82
  377. package/vocab/htmx/vi.js +0 -59
  378. package/vocab/htmx/zh.js +0 -79
@@ -4,7 +4,6 @@ const commands = {
4
4
  description: 'Toggle CSS classes, attributes, or properties on elements',
5
5
  syntax: 'toggle .class [on target]',
6
6
  category: 'dom',
7
- availability: 'lite',
8
7
  examples: ['toggle .active', 'toggle .hidden on #modal', 'toggle @disabled on <button/>'],
9
8
  },
10
9
  add: {
@@ -12,7 +11,6 @@ const commands = {
12
11
  description: 'Add CSS classes, attributes, or styles to elements',
13
12
  syntax: 'add .class [to target]',
14
13
  category: 'dom',
15
- availability: 'lite',
16
14
  examples: ['add .highlight', 'add .active to #nav', 'add @required to <input/>'],
17
15
  },
18
16
  remove: {
@@ -20,7 +18,6 @@ const commands = {
20
18
  description: 'Remove CSS classes, attributes, styles, or elements',
21
19
  syntax: 'remove .class [from target]',
22
20
  category: 'dom',
23
- availability: 'lite',
24
21
  examples: ['remove .loading', 'remove #temp-element', 'remove @disabled from me'],
25
22
  },
26
23
  hide: {
@@ -28,7 +25,6 @@ const commands = {
28
25
  description: 'Hide elements by setting display:none',
29
26
  syntax: 'hide [target]',
30
27
  category: 'dom',
31
- availability: 'lite',
32
28
  examples: ['hide', 'hide #modal', 'hide .dropdown'],
33
29
  },
34
30
  show: {
@@ -36,7 +32,6 @@ const commands = {
36
32
  description: 'Show hidden elements',
37
33
  syntax: 'show [target]',
38
34
  category: 'dom',
39
- availability: 'lite',
40
35
  examples: ['show', 'show #modal', 'show .dropdown'],
41
36
  },
42
37
  put: {
@@ -44,28 +39,25 @@ const commands = {
44
39
  description: 'Set content or values',
45
40
  syntax: 'put value into|before|after|at start of|at end of target',
46
41
  category: 'dom',
47
- availability: 'lite',
48
42
  examples: [
49
43
  'put "Hello" into #output',
50
44
  'put it into me',
51
45
  "put '<p>New</p>' into #container",
52
- 'put <tr/> in me sorted by its @data-price as Number at end of me',
46
+ 'put "x" at end of me',
53
47
  ],
54
48
  },
55
49
  make: {
56
50
  name: 'make',
57
51
  description: 'Create new DOM elements',
58
- syntax: 'make <tag/> [put into target]',
52
+ syntax: 'make a <tag/> [called name]',
59
53
  category: 'dom',
60
- availability: 'hybrid',
61
- examples: ['make <div.card/>', 'make <button/> put into #toolbar'],
54
+ examples: ['make a <div.card/>', 'make a <button/> then put it into #toolbar'],
62
55
  },
63
56
  empty: {
64
57
  name: 'empty',
65
58
  description: 'Remove all children from an element (sets innerHTML to empty)',
66
59
  syntax: 'empty [target]',
67
60
  category: 'dom',
68
- availability: 'lite-plus',
69
61
  examples: ['empty me', 'empty #list', 'empty .results'],
70
62
  },
71
63
  open: {
@@ -73,7 +65,6 @@ const commands = {
73
65
  description: 'Open a dialog (showModal/show), details element, or popover',
74
66
  syntax: 'open [target] [as modal|non-modal]',
75
67
  category: 'dom',
76
- availability: 'full',
77
68
  examples: ['open #myDialog', 'open #myDialog as non-modal', 'open #details', 'open #popup'],
78
69
  },
79
70
  close: {
@@ -81,7 +72,6 @@ const commands = {
81
72
  description: 'Close a dialog, details element, or popover',
82
73
  syntax: 'close [target]',
83
74
  category: 'dom',
84
- availability: 'full',
85
75
  examples: ['close', 'close #myDialog', 'close #details'],
86
76
  },
87
77
  select: {
@@ -89,7 +79,6 @@ const commands = {
89
79
  description: 'Select the text in an <input>/<textarea>, or select the contents of a DOM element',
90
80
  syntax: 'select [target]',
91
81
  category: 'dom',
92
- availability: 'full',
93
82
  examples: ['select #search', 'select <textarea/>', 'select me'],
94
83
  },
95
84
  reset: {
@@ -97,7 +86,6 @@ const commands = {
97
86
  description: 'Reset a <form> to its default values (HTMLFormElement.reset())',
98
87
  syntax: 'reset [target]',
99
88
  category: 'dom',
100
- availability: 'full',
101
89
  examples: ['reset', 'reset #myForm', 'reset <form/>'],
102
90
  },
103
91
  clear: {
@@ -105,7 +93,6 @@ const commands = {
105
93
  description: 'Reset a variable to null, or clear the value of a form field (<input>, <textarea>, <select>)',
106
94
  syntax: 'clear <var|target>',
107
95
  category: 'data',
108
- availability: 'full',
109
96
  examples: ['clear :count', 'clear myVar', 'clear #search', 'clear <textarea/>'],
110
97
  },
111
98
  breakpoint: {
@@ -113,7 +100,6 @@ const commands = {
113
100
  description: 'Drop into the debugger (emits a debugger; statement)',
114
101
  syntax: 'breakpoint',
115
102
  category: 'utility',
116
- availability: 'full',
117
103
  examples: ['breakpoint', 'on click breakpoint'],
118
104
  },
119
105
  focus: {
@@ -121,55 +107,34 @@ const commands = {
121
107
  description: 'Focus an element (calls HTMLElement.focus())',
122
108
  syntax: 'focus [target]',
123
109
  category: 'execution',
124
- availability: 'lite-plus',
125
- examples: ['focus #search', 'focus on <input/>', 'focus me'],
110
+ examples: ['focus #search', 'focus the first <input/>', 'focus me'],
126
111
  },
127
112
  blur: {
128
113
  name: 'blur',
129
114
  description: 'Remove focus from an element (calls HTMLElement.blur())',
130
115
  syntax: 'blur [target]',
131
116
  category: 'execution',
132
- availability: 'lite-plus',
133
- examples: ['blur #search', 'blur on <input/>', 'blur me'],
117
+ examples: ['blur #search', 'blur me'],
134
118
  },
135
119
  swap: {
136
120
  name: 'swap',
137
- description: 'Replace element content using various strategies',
138
- syntax: 'swap content into target [strategy]',
121
+ description: 'Exchange two elements, or a writable value with another value',
122
+ syntax: 'swap target with value',
139
123
  category: 'dom',
140
- availability: 'hybrid',
141
- examples: [
142
- 'swap "<p>New</p>" into #container',
143
- 'swap result into #list innerHTML',
144
- 'swap content into #panel outerHTML',
145
- ],
124
+ examples: ['swap #a with #b', 'swap innerHTML of #target with result'],
146
125
  },
147
126
  morph: {
148
127
  name: 'morph',
149
128
  description: 'Intelligently morph element content preserving state',
150
- syntax: 'morph content into target',
151
- category: 'dom',
152
- availability: 'full',
153
- examples: ['morph result into #content', 'morph "<div>New</div>" into me'],
154
- },
155
- processPartials: {
156
- name: 'process partials',
157
- description: 'Process <hx-partial> elements for multi-target swaps',
158
- syntax: 'process partials in <content> [using view transition]',
129
+ syntax: 'morph target to content',
159
130
  category: 'dom',
160
- availability: 'full',
161
- examples: [
162
- 'process partials in it',
163
- 'process partials in fetchedHtml',
164
- 'process partials in it using view transition',
165
- ],
131
+ examples: ['morph #content to result', 'morph me to "<div>New</div>"'],
166
132
  },
167
133
  wait: {
168
134
  name: 'wait',
169
135
  description: 'Pause execution for duration or until event',
170
136
  syntax: 'wait duration | wait for event',
171
137
  category: 'async',
172
- availability: 'lite-plus',
173
138
  examples: ['wait 1s', 'wait 500ms', 'wait for transitionend'],
174
139
  },
175
140
  fetch: {
@@ -177,7 +142,6 @@ const commands = {
177
142
  description: 'Make HTTP requests',
178
143
  syntax: 'fetch url [as type] [with options]',
179
144
  category: 'async',
180
- availability: 'hybrid',
181
145
  examples: [
182
146
  'fetch /api/data as json',
183
147
  'fetch https://example.com/api as json',
@@ -191,23 +155,20 @@ const commands = {
191
155
  description: 'Set variables or properties',
192
156
  syntax: 'set target to value',
193
157
  category: 'data',
194
- availability: 'lite',
195
158
  examples: ['set :count to 0', "set #input's value to ''", 'set x to 10'],
196
159
  },
197
160
  get: {
198
161
  name: 'get',
199
162
  description: 'Get property values',
200
- syntax: 'get property [from target]',
163
+ syntax: 'get expression',
201
164
  category: 'data',
202
- availability: 'lite-plus',
203
- examples: ['get value from #input', "get #element's textContent"],
165
+ examples: ["get #input's value", "get #element's textContent"],
204
166
  },
205
167
  increment: {
206
168
  name: 'increment',
207
169
  description: 'Increase numeric value',
208
170
  syntax: 'increment target [by amount]',
209
171
  category: 'data',
210
- availability: 'lite-plus',
211
172
  examples: ['increment :count', 'increment :score by 10'],
212
173
  },
213
174
  decrement: {
@@ -215,7 +176,6 @@ const commands = {
215
176
  description: 'Decrease numeric value',
216
177
  syntax: 'decrement target [by amount]',
217
178
  category: 'data',
218
- availability: 'lite-plus',
219
179
  examples: ['decrement :count', 'decrement :lives by 1'],
220
180
  },
221
181
  default: {
@@ -223,7 +183,6 @@ const commands = {
223
183
  description: 'Set default value if not already set',
224
184
  syntax: 'default target to value',
225
185
  category: 'data',
226
- availability: 'full',
227
186
  examples: ['default :count to 0', 'default :theme to "light"'],
228
187
  },
229
188
  log: {
@@ -231,87 +190,69 @@ const commands = {
231
190
  description: 'Log values to console',
232
191
  syntax: 'log value',
233
192
  category: 'utility',
234
- availability: 'lite-plus',
235
193
  examples: ['log "Debug info"', 'log :count', 'log event'],
236
194
  },
237
195
  tell: {
238
196
  name: 'tell',
239
197
  description: 'Execute commands on another element',
240
- syntax: 'tell target to command',
198
+ syntax: 'tell target <commands> end',
241
199
  category: 'utility',
242
- availability: 'full',
243
- examples: ['tell #other to add .active', 'tell <form/> to reset()'],
244
- },
245
- copy: {
246
- name: 'copy',
247
- description: 'Copy text to clipboard',
248
- syntax: 'copy value',
249
- category: 'utility',
250
- availability: 'full',
251
- examples: ['copy "Text"', "copy #input's value"],
200
+ examples: ['tell #other add .active end', 'tell <form/> call it.reset() end'],
252
201
  },
253
202
  pick: {
254
203
  name: 'pick',
255
- description: 'Pick random item from collection',
256
- syntax: 'pick from collection',
204
+ description: 'Pick a range of items or characters, or a regex match, out of a value',
205
+ syntax: 'pick items|characters start to end from value | pick match of regex from text',
257
206
  category: 'utility',
258
- availability: 'full',
259
- examples: ['pick from <li/>', 'pick from ["a", "b", "c"]'],
207
+ examples: ['pick items 0 to 2 from :list', 'pick characters 0 to 3 from "hello"'],
260
208
  },
261
- beep: {
262
- name: 'beep',
263
- description: 'Play a beep sound',
264
- syntax: 'beep',
209
+ 'beep!': {
210
+ name: 'beep!',
211
+ description: 'Log values to the console with their types (debugging)',
212
+ syntax: 'beep! value[, value]',
265
213
  category: 'utility',
266
- availability: 'full',
267
- examples: ['beep'],
214
+ examples: ['beep! me', 'beep! :count, result'],
215
+ },
216
+ ask: {
217
+ name: 'ask',
218
+ description: 'Ask the user for text (window.prompt); the answer is in it',
219
+ syntax: 'ask message',
220
+ category: 'utility',
221
+ examples: ['ask "Your name?" then put it into #name'],
222
+ },
223
+ answer: {
224
+ name: 'answer',
225
+ description: 'Show a message (window.alert), or ask to confirm (window.confirm) and put the chosen value in it',
226
+ syntax: 'answer message [with yesValue or noValue]',
227
+ category: 'utility',
228
+ examples: ['answer "Saved"', 'answer "Delete it?" with "yes" or "no"'],
268
229
  },
269
230
  trigger: {
270
231
  name: 'trigger',
271
232
  description: 'Dispatch custom events',
272
233
  syntax: 'trigger eventName [on target]',
273
234
  category: 'events',
274
- availability: 'lite-plus',
275
235
  examples: ['trigger customEvent', 'trigger submit on <form/>', 'trigger click on #btn'],
276
236
  },
277
237
  send: {
278
238
  name: 'send',
279
239
  description: 'Send event with data to element',
280
- syntax: 'send eventName [to target] [with data]',
240
+ syntax: 'send eventName[(detail)] [to target]',
281
241
  category: 'events',
282
- availability: 'hybrid',
283
- examples: ['send update to #dashboard', 'send notify with {message: "Done"}'],
242
+ examples: ['send update to #dashboard', 'send notify(message: "Done") to #out'],
284
243
  },
285
244
  go: {
286
245
  name: 'go',
287
246
  description: 'Navigate to URL',
288
247
  syntax: 'go to url',
289
248
  category: 'navigation',
290
- availability: 'lite-plus',
291
- examples: ['go to /dashboard', 'go to url in new window'],
292
- },
293
- pushUrl: {
294
- name: 'push url',
295
- description: 'Update URL without page reload',
296
- syntax: 'push url path',
297
- category: 'navigation',
298
- availability: 'hybrid',
299
- examples: ['push url /page/2', 'push url /users/:id'],
300
- },
301
- replaceUrl: {
302
- name: 'replace url',
303
- description: 'Replace current URL in history',
304
- syntax: 'replace url path',
305
- category: 'navigation',
306
- availability: 'hybrid',
307
- examples: ['replace url /new-path'],
249
+ examples: ['go to /dashboard', 'go to url /help in new window'],
308
250
  },
309
251
  scroll: {
310
252
  name: 'scroll',
311
253
  description: 'Scroll an element into view (upstream _hyperscript 0.9.90 replacement for `go to top of`)',
312
254
  syntax: 'scroll to [top|middle|bottom|nearest] [left|center|right] [of] target [smoothly|instantly] | scroll [target] [up|down|left|right] by n [px]',
313
255
  category: 'navigation',
314
- availability: 'full',
315
256
  examples: [
316
257
  'scroll to #top',
317
258
  'scroll to bottom of #chat',
@@ -324,31 +265,27 @@ const commands = {
324
265
  description: 'Conditional execution',
325
266
  syntax: 'if condition ... [else ...] end',
326
267
  category: 'control-flow',
327
- availability: 'hybrid',
328
- examples: ['if :count > 0 add .active end', 'if me has .open hide else show end'],
329
- },
330
- unless: {
331
- name: 'unless',
332
- description: 'Negative conditional',
333
- syntax: 'unless condition ... end',
334
- category: 'control-flow',
335
- availability: 'full',
336
- examples: ['unless :loading show #content end'],
268
+ examples: ['if :count > 0 add .active end', 'if me matches .open hide me else show me end'],
337
269
  },
338
270
  repeat: {
339
271
  name: 'repeat',
340
272
  description: 'Loop execution',
341
- syntax: 'repeat N times ... end | for each item in collection ... end',
273
+ syntax: 'repeat N times ... end | repeat while condition ... end | repeat for item in collection ... end',
342
274
  category: 'control-flow',
343
- availability: 'hybrid',
344
- examples: ['repeat 3 times add .pulse end', 'for each item in <li/> add .done to item end'],
275
+ examples: ['repeat 3 times add .pulse end', 'repeat while :count < 10 increment :count end'],
276
+ },
277
+ for: {
278
+ name: 'for',
279
+ description: 'Loop over a collection',
280
+ syntax: 'for item in collection ... end',
281
+ category: 'control-flow',
282
+ examples: ['for item in <li/> add .done to item end'],
345
283
  },
346
284
  break: {
347
285
  name: 'break',
348
286
  description: 'Exit current loop',
349
287
  syntax: 'break',
350
288
  category: 'control-flow',
351
- availability: 'hybrid',
352
289
  examples: ['if :found break end'],
353
290
  },
354
291
  continue: {
@@ -356,15 +293,13 @@ const commands = {
356
293
  description: 'Skip to next loop iteration',
357
294
  syntax: 'continue',
358
295
  category: 'control-flow',
359
- availability: 'hybrid',
360
- examples: ['if item has .skip continue end'],
296
+ examples: ['if item matches .skip continue end'],
361
297
  },
362
298
  halt: {
363
299
  name: 'halt',
364
300
  description: 'Stop all execution',
365
301
  syntax: 'halt',
366
302
  category: 'control-flow',
367
- availability: 'full',
368
303
  examples: ['if :error halt end'],
369
304
  },
370
305
  return: {
@@ -372,7 +307,6 @@ const commands = {
372
307
  description: 'Return value from function',
373
308
  syntax: 'return [value]',
374
309
  category: 'control-flow',
375
- availability: 'full',
376
310
  examples: ['return :result', 'return'],
377
311
  },
378
312
  exit: {
@@ -380,7 +314,6 @@ const commands = {
380
314
  description: 'Exit current handler',
381
315
  syntax: 'exit',
382
316
  category: 'control-flow',
383
- availability: 'full',
384
317
  examples: ['if :done exit end'],
385
318
  },
386
319
  throw: {
@@ -388,50 +321,30 @@ const commands = {
388
321
  description: 'Throw an error',
389
322
  syntax: 'throw message',
390
323
  category: 'control-flow',
391
- availability: 'full',
392
324
  examples: ['throw "Invalid input"'],
393
325
  },
394
326
  call: {
395
327
  name: 'call',
396
328
  description: 'Call a function or method',
397
- syntax: 'call function() | call method on target',
329
+ syntax: 'call expression',
398
330
  category: 'execution',
399
- availability: 'hybrid',
400
- examples: ['call validate()', 'call reset() on <form/>'],
401
- },
402
- pseudo: {
403
- name: 'pseudo',
404
- description: 'Execute pseudo-command',
405
- syntax: 'pseudo command',
406
- category: 'execution',
407
- availability: 'full',
408
- examples: ['pseudo init'],
331
+ examples: ['call validate()', 'call #myForm.reset()'],
409
332
  },
410
333
  append: {
411
334
  name: 'append',
412
335
  description: 'Append content to element',
413
336
  syntax: 'append content to target',
414
337
  category: 'content',
415
- availability: 'hybrid',
416
338
  examples: ['append "<li>New</li>" to #list', 'append result to #container'],
417
339
  },
418
- prepend: {
419
- name: 'prepend',
420
- description: 'Prepend content to element (hyperfixi extension)',
421
- syntax: 'prepend content to target',
422
- category: 'content',
423
- availability: 'hybrid',
424
- examples: ['prepend "<li>First</li>" to #list', 'prepend result to #container'],
425
- },
426
340
  start: {
427
341
  name: 'start',
428
342
  description: 'Animate DOM mutations via document.startViewTransition (View Transitions API)',
429
- syntax: 'start view transition [using type] <body> end',
343
+ syntax: 'start view transition [using name] <body> end',
430
344
  category: 'animation',
431
- availability: 'full',
432
345
  examples: [
433
346
  'start view transition put result into #out end',
434
- 'start view transition using slide remove .open from #panel end',
347
+ 'start view transition using "slide" remove .open from #panel end',
435
348
  ],
436
349
  },
437
350
  transition: {
@@ -439,7 +352,6 @@ const commands = {
439
352
  description: 'Apply CSS transitions',
440
353
  syntax: 'transition [target] property to value [over duration]',
441
354
  category: 'animation',
442
- availability: 'full',
443
355
  examples: [
444
356
  'transition opacity to 0 over 300ms',
445
357
  "transition #box's *opacity to 0 over 300ms",
@@ -451,7 +363,6 @@ const commands = {
451
363
  description: 'Measure element dimensions',
452
364
  syntax: 'measure target',
453
365
  category: 'animation',
454
- availability: 'full',
455
366
  examples: ['measure #element', 'measure me'],
456
367
  },
457
368
  settle: {
@@ -459,7 +370,6 @@ const commands = {
459
370
  description: 'Wait for animations to complete',
460
371
  syntax: 'settle',
461
372
  category: 'animation',
462
- availability: 'full',
463
373
  examples: ['add .animate then settle then remove .animate'],
464
374
  },
465
375
  take: {
@@ -467,42 +377,26 @@ const commands = {
467
377
  description: 'Take class from siblings (radio-button pattern)',
468
378
  syntax: 'take .class [from <source>] [for <recipient>]',
469
379
  category: 'animation',
470
- availability: 'full',
471
380
  examples: ['take .active from .tab for me', 'take .selected'],
472
381
  },
473
382
  js: {
474
383
  name: 'js',
475
384
  description: 'Execute inline JavaScript',
476
- syntax: 'js(code)',
385
+ syntax: 'js[(params)] <javascript> end',
477
386
  category: 'advanced',
478
- availability: 'full',
479
- examples: ['js(console.log("hi"))', 'js(return Date.now())'],
480
- },
481
- install: {
482
- name: 'install',
483
- description: 'Install a behavior on element',
484
- syntax: 'install BehaviorName',
485
- category: 'behaviors',
486
- availability: 'full',
487
- examples: ['install Draggable', 'install Sortable'],
387
+ examples: ['js console.log("hi") end', 'js(x) return x * 2 end'],
488
388
  },
489
389
  render: {
490
390
  name: 'render',
491
391
  description: 'Render template with data',
492
- syntax: 'render template with data',
392
+ syntax: 'render template [with name: value, ...]',
493
393
  category: 'templates',
494
- availability: 'full',
495
- examples: ['render #userTemplate with :user'],
394
+ examples: ['render #userTemplate with user: :user'],
496
395
  },
497
396
  };
498
397
  function getCommandsByCategory(category) {
499
398
  return Object.values(commands).filter(cmd => cmd.category === category);
500
399
  }
501
- function getCommandsByAvailability(availability) {
502
- const order = ['lite', 'lite-plus', 'hybrid', 'full'];
503
- const availabilityIndex = order.indexOf(availability);
504
- return Object.values(commands).filter(cmd => order.indexOf(cmd.availability) <= availabilityIndex);
505
- }
506
400
  function searchCommands(query) {
507
401
  const q = query.toLowerCase();
508
402
  return Object.values(commands).filter(cmd => cmd.name.toLowerCase().includes(q) ||
@@ -510,50 +404,17 @@ function searchCommands(query) {
510
404
  cmd.syntax.toLowerCase().includes(q));
511
405
  }
512
406
  const bundles = [
513
- {
514
- name: 'hybrid-complete',
515
- file: 'lokascript-hybrid-complete.js',
516
- size: '7.3 KB',
517
- commandCount: 21,
518
- hasBlocks: true,
519
- hasEventModifiers: true,
520
- hasPositional: true,
521
- useCase: 'Most apps (~85% hyperscript coverage)',
522
- importPath: '@hyperfixi/core/browser/hybrid-complete',
523
- },
524
- {
525
- name: 'hybrid-hx',
526
- file: 'lokascript-hybrid-hx.js',
527
- size: '9.7 KB',
528
- commandCount: 21,
529
- hasBlocks: true,
530
- hasEventModifiers: true,
531
- hasPositional: true,
532
- useCase: 'htmx/fixi compatibility with hx-* attributes',
533
- importPath: '@hyperfixi/core/browser/hybrid-hx',
534
- },
535
407
  {
536
408
  name: 'browser',
537
- file: 'lokascript-browser.js',
538
- size: '203 KB',
539
- commandCount: 43,
409
+ file: 'hyperfixi.js',
410
+ size: '33.3 KB',
411
+ commandCount: 53,
540
412
  hasBlocks: true,
541
413
  hasEventModifiers: true,
542
414
  hasPositional: true,
543
- useCase: 'Full bundle with all features',
415
+ useCase: "Hyperscript, upstream's grammar, every module; the same file as hyperfixi-hs.js",
544
416
  importPath: '@hyperfixi/core/browser',
545
417
  },
546
- {
547
- name: 'multilingual',
548
- file: 'lokascript-multilingual.js',
549
- size: '64 KB',
550
- commandCount: 43,
551
- hasBlocks: true,
552
- hasEventModifiers: true,
553
- hasPositional: true,
554
- useCase: 'Full features + multilingual API (no parser)',
555
- importPath: '@hyperfixi/core/browser/multilingual',
556
- },
557
418
  ];
558
419
  function findBundleForFeatures(options) {
559
420
  const { commands: requiredCommands = [], blocks, eventModifiers, positional } = options;
@@ -565,16 +426,7 @@ function findBundleForFeatures(options) {
565
426
  continue;
566
427
  if (positional && !bundle.hasPositional)
567
428
  continue;
568
- const available = getCommandsByAvailability(bundle.name === 'lite'
569
- ? 'lite'
570
- : bundle.name === 'lite-plus'
571
- ? 'lite-plus'
572
- : bundle.name.includes('hybrid')
573
- ? 'hybrid'
574
- : 'full');
575
- const availableNames = available.map(c => c.name);
576
- const hasAllCommands = requiredCommands.every(cmd => availableNames.includes(cmd));
577
- if (hasAllCommands) {
429
+ if (requiredCommands.every(cmd => cmd in commands)) {
578
430
  return bundle;
579
431
  }
580
432
  }
@@ -596,7 +448,7 @@ const patterns = [
596
448
  {
597
449
  name: 'Form Submit',
598
450
  description: 'Submit form via fetch, show result',
599
- code: 'on submit halt the event then fetch /api/submit with method:"POST" body:me then put result into #response',
451
+ code: 'on submit halt the event then fetch /api/submit with {method:"POST", body: me as FormData} then put result into #response',
600
452
  commands: ['fetch', 'put'],
601
453
  },
602
454
  {
@@ -608,7 +460,7 @@ const patterns = [
608
460
  {
609
461
  name: 'Debounced Input',
610
462
  description: 'Search with debounce',
611
- code: 'on input.debounce(300) fetch /search?q=${me.value} as html then put result into #results',
463
+ code: 'on input debounced at 300ms fetch `/search?q=${my value}` as html then put result into #results',
612
464
  commands: ['fetch', 'put'],
613
465
  },
614
466
  {
@@ -626,8 +478,8 @@ const patterns = [
626
478
  {
627
479
  name: 'Copy to Clipboard',
628
480
  description: 'Copy text with feedback',
629
- code: "on click copy #input's value then add .copied wait 1s remove .copied",
630
- commands: ['copy', 'add', 'wait', 'remove'],
481
+ code: "on click call navigator.clipboard.writeText(#input's value) then add .copied then wait 1s then remove .copied",
482
+ commands: ['call', 'add', 'wait', 'remove'],
631
483
  },
632
484
  ];
633
485
  function searchPatterns(query) {
@@ -637,5 +489,5 @@ function searchPatterns(query) {
637
489
  p.code.toLowerCase().includes(q));
638
490
  }
639
491
 
640
- export { bundles, commands, findBundleForFeatures, getCommandsByAvailability, getCommandsByCategory, patterns, searchCommands, searchPatterns };
492
+ export { bundles, commands, findBundleForFeatures, getCommandsByCategory, patterns, searchCommands, searchPatterns };
641
493
  //# sourceMappingURL=index.mjs.map
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.3.0";
1
+ export declare const VERSION = "4.0.1";
2
2
  //# sourceMappingURL=version.d.ts.map