@hyperfixi/core 2.0.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.
Files changed (381) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +218 -0
  3. package/dist/__test-utils__/context-builders.d.ts +42 -0
  4. package/dist/__test-utils__/error-testing.d.ts +18 -0
  5. package/dist/__test-utils__/index.d.ts +6 -0
  6. package/dist/__test-utils__/mock-types.d.ts +57 -0
  7. package/dist/__test-utils__/parser-context-mock.d.ts +7 -0
  8. package/dist/__test-utils__/parser-helpers.d.ts +38 -0
  9. package/dist/api/dom-processor.d.ts +17 -0
  10. package/dist/api/hyperscript-api.d.ts +68 -0
  11. package/dist/api/lokascript-api.d.ts +9 -0
  12. package/dist/ast-utils/analyzer.d.ts +19 -0
  13. package/dist/ast-utils/documentation.d.ts +8 -0
  14. package/dist/ast-utils/generator.d.ts +9 -0
  15. package/dist/ast-utils/index.d.ts +12 -0
  16. package/dist/ast-utils/index.js +3366 -0
  17. package/dist/ast-utils/index.mjs +3320 -0
  18. package/dist/ast-utils/interchange/from-core.d.ts +8 -0
  19. package/dist/ast-utils/interchange/index.d.ts +6 -0
  20. package/dist/ast-utils/interchange/lsp.d.ts +108 -0
  21. package/dist/ast-utils/interchange/to-core.d.ts +8 -0
  22. package/dist/ast-utils/interchange/types.d.ts +113 -0
  23. package/dist/ast-utils/query.d.ts +25 -0
  24. package/dist/ast-utils/transformer.d.ts +14 -0
  25. package/dist/ast-utils/types.d.ts +162 -0
  26. package/dist/ast-utils/visitor.d.ts +40 -0
  27. package/dist/behaviors/boosted.d.ts +29 -0
  28. package/dist/behaviors/history-swap.d.ts +24 -0
  29. package/dist/behaviors/index.d.ts +4 -0
  30. package/dist/behaviors/index.js +1149 -0
  31. package/dist/behaviors/index.mjs +1139 -0
  32. package/dist/bundle-generator/generator.d.ts +4 -0
  33. package/dist/bundle-generator/index.d.ts +6 -0
  34. package/dist/bundle-generator/index.js +2294 -0
  35. package/dist/bundle-generator/index.mjs +2271 -0
  36. package/dist/bundle-generator/parser-templates.d.ts +6 -0
  37. package/dist/bundle-generator/template-capabilities.d.ts +10 -0
  38. package/dist/bundle-generator/templates.d.ts +11 -0
  39. package/dist/bundle-generator/types.d.ts +34 -0
  40. package/dist/bundles/test-minimal.d.ts +3 -0
  41. package/dist/bundles/test-standard.d.ts +3 -0
  42. package/dist/chunks/bridge-I6ceoWxV.js +2 -0
  43. package/dist/chunks/browser-modular-Dv6PAV3c.js +2 -0
  44. package/dist/chunks/feature-eventsource-DWb514fy.js +2 -0
  45. package/dist/chunks/feature-sockets-3PFuvCVY.js +2 -0
  46. package/dist/chunks/feature-webworker-DTm_eh-E.js +2 -0
  47. package/dist/commands/advanced/async.d.ts +28 -0
  48. package/dist/commands/advanced/js.d.ts +28 -0
  49. package/dist/commands/animation/measure.d.ts +31 -0
  50. package/dist/commands/animation/settle.d.ts +26 -0
  51. package/dist/commands/animation/take.d.ts +28 -0
  52. package/dist/commands/animation/transition.d.ts +31 -0
  53. package/dist/commands/async/fetch.d.ts +44 -0
  54. package/dist/commands/async/wait.d.ts +41 -0
  55. package/dist/commands/behaviors/install.d.ts +41 -0
  56. package/dist/commands/content/append.d.ts +27 -0
  57. package/dist/commands/control-flow/break.d.ts +15 -0
  58. package/dist/commands/control-flow/continue.d.ts +15 -0
  59. package/dist/commands/control-flow/exit.d.ts +15 -0
  60. package/dist/commands/control-flow/halt.d.ts +25 -0
  61. package/dist/commands/control-flow/if.d.ts +45 -0
  62. package/dist/commands/control-flow/repeat.d.ts +35 -0
  63. package/dist/commands/control-flow/return.d.ts +23 -0
  64. package/dist/commands/control-flow/signal-base.d.ts +25 -0
  65. package/dist/commands/control-flow/throw.d.ts +22 -0
  66. package/dist/commands/control-flow/unless.d.ts +3 -0
  67. package/dist/commands/data/decrement.d.ts +3 -0
  68. package/dist/commands/data/default.d.ts +31 -0
  69. package/dist/commands/data/get.d.ts +23 -0
  70. package/dist/commands/data/increment.d.ts +25 -0
  71. package/dist/commands/data/set.d.ts +56 -0
  72. package/dist/commands/decorators/index.d.ts +30 -0
  73. package/dist/commands/dom/__tests__/add-standalone-helpers.d.ts +11 -0
  74. package/dist/commands/dom/add.d.ts +31 -0
  75. package/dist/commands/dom/dom-modification-base.d.ts +48 -0
  76. package/dist/commands/dom/hide.d.ts +12 -0
  77. package/dist/commands/dom/make.d.ts +21 -0
  78. package/dist/commands/dom/process-partials.d.ts +39 -0
  79. package/dist/commands/dom/put.d.ts +31 -0
  80. package/dist/commands/dom/remove.d.ts +33 -0
  81. package/dist/commands/dom/show.d.ts +13 -0
  82. package/dist/commands/dom/swap.d.ts +38 -0
  83. package/dist/commands/dom/toggle.d.ts +55 -0
  84. package/dist/commands/dom/visibility-base.d.ts +20 -0
  85. package/dist/commands/events/send.d.ts +3 -0
  86. package/dist/commands/events/trigger.d.ts +36 -0
  87. package/dist/commands/execution/call.d.ts +24 -0
  88. package/dist/commands/execution/pseudo-command.d.ts +42 -0
  89. package/dist/commands/helpers/attribute-manipulation.d.ts +11 -0
  90. package/dist/commands/helpers/batch-dom-operations.d.ts +12 -0
  91. package/dist/commands/helpers/class-manipulation.d.ts +11 -0
  92. package/dist/commands/helpers/condition-helpers.d.ts +4 -0
  93. package/dist/commands/helpers/dom-mutation.d.ts +15 -0
  94. package/dist/commands/helpers/duration-parsing.d.ts +8 -0
  95. package/dist/commands/helpers/element-property-access.d.ts +7 -0
  96. package/dist/commands/helpers/element-resolution.d.ts +17 -0
  97. package/dist/commands/helpers/error-helpers.d.ts +17 -0
  98. package/dist/commands/helpers/event-helpers.d.ts +13 -0
  99. package/dist/commands/helpers/event-waiting.d.ts +37 -0
  100. package/dist/commands/helpers/index.d.ts +32 -0
  101. package/dist/commands/helpers/input-validator.d.ts +23 -0
  102. package/dist/commands/helpers/loop-executor.d.ts +53 -0
  103. package/dist/commands/helpers/numeric-target-parser.d.ts +14 -0
  104. package/dist/commands/helpers/property-target.d.ts +30 -0
  105. package/dist/commands/helpers/selector-type-detection.d.ts +24 -0
  106. package/dist/commands/helpers/smart-element.d.ts +16 -0
  107. package/dist/commands/helpers/style-manipulation.d.ts +16 -0
  108. package/dist/commands/helpers/temporal-modifiers.d.ts +15 -0
  109. package/dist/commands/helpers/url-argument-parser.d.ts +10 -0
  110. package/dist/commands/helpers/url-validation.d.ts +7 -0
  111. package/dist/commands/helpers/variable-access.d.ts +10 -0
  112. package/dist/commands/helpers/visibility-target-parser.d.ts +11 -0
  113. package/dist/commands/index.d.ts +139 -0
  114. package/dist/commands/index.js +9186 -0
  115. package/dist/commands/index.mjs +9032 -0
  116. package/dist/commands/navigation/go.d.ts +35 -0
  117. package/dist/commands/navigation/push-url.d.ts +35 -0
  118. package/dist/commands/navigation/replace-url.d.ts +3 -0
  119. package/dist/commands/templates/render.d.ts +48 -0
  120. package/dist/commands/utility/beep.d.ts +32 -0
  121. package/dist/commands/utility/copy.d.ts +29 -0
  122. package/dist/commands/utility/log.d.ts +24 -0
  123. package/dist/commands/utility/pick.d.ts +26 -0
  124. package/dist/commands/utility/tell.d.ts +26 -0
  125. package/dist/compatibility/browser-bundle-animation-generated.d.ts +16 -0
  126. package/dist/compatibility/browser-bundle-classic-i18n.d.ts +63 -0
  127. package/dist/compatibility/browser-bundle-classic.d.ts +17 -0
  128. package/dist/compatibility/browser-bundle-forms-generated.d.ts +16 -0
  129. package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +28 -0
  130. package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +43 -0
  131. package/dist/compatibility/browser-bundle-lite-plus.d.ts +25 -0
  132. package/dist/compatibility/browser-bundle-lite.d.ts +23 -0
  133. package/dist/compatibility/browser-bundle-minimal-generated.d.ts +16 -0
  134. package/dist/compatibility/browser-bundle-minimal-v2.d.ts +17 -0
  135. package/dist/compatibility/browser-bundle-minimal.d.ts +8 -0
  136. package/dist/compatibility/browser-bundle-modular.d.ts +18 -0
  137. package/dist/compatibility/browser-bundle-multilingual.d.ts +19 -0
  138. package/dist/compatibility/browser-bundle-semantic-complete.d.ts +24 -0
  139. package/dist/compatibility/browser-bundle-standard-v2.d.ts +17 -0
  140. package/dist/compatibility/browser-bundle-standard.d.ts +8 -0
  141. package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +16 -0
  142. package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +18 -0
  143. package/dist/compatibility/browser-bundle.d.ts +140 -0
  144. package/dist/compatibility/browser-modular.d.ts +53 -0
  145. package/dist/compatibility/browser-tests/test-utils.d.ts +21 -0
  146. package/dist/compatibility/eval-hyperscript.d.ts +15 -0
  147. package/dist/compatibility/feature-loader.d.ts +8 -0
  148. package/dist/compatibility/hyperscript-adapter.d.ts +38 -0
  149. package/dist/compatibility/hyperscript-tests/test-adapter.d.ts +13 -0
  150. package/dist/core/ast-property-utils.d.ts +2 -0
  151. package/dist/core/base-expression-evaluator.d.ts +70 -0
  152. package/dist/core/binary-expression-evaluator.d.ts +7 -0
  153. package/dist/core/call-expression-evaluator.d.ts +7 -0
  154. package/dist/core/configurable-expression-evaluator.d.ts +5 -0
  155. package/dist/core/context.d.ts +15 -0
  156. package/dist/core/dom.d.ts +15 -0
  157. package/dist/core/evaluator-types.d.ts +5 -0
  158. package/dist/core/events.d.ts +48 -0
  159. package/dist/core/executor.d.ts +34 -0
  160. package/dist/core/expression-evaluator.d.ts +6 -0
  161. package/dist/core/lazy-expression-evaluator.d.ts +22 -0
  162. package/dist/core/parser.d.ts +21 -0
  163. package/dist/core/selector-evaluator.d.ts +15 -0
  164. package/dist/core/template-literal-evaluator.d.ts +5 -0
  165. package/dist/dom/attribute-processor.d.ts +40 -0
  166. package/dist/dom/minimal-attribute-processor.d.ts +20 -0
  167. package/dist/experimental/binary-tree/accessor.d.ts +10 -0
  168. package/dist/experimental/binary-tree/ast-serializer.d.ts +26 -0
  169. package/dist/experimental/binary-tree/benchmark.d.ts +24 -0
  170. package/dist/experimental/binary-tree/buffer-context.d.ts +27 -0
  171. package/dist/experimental/binary-tree/deserializer.d.ts +17 -0
  172. package/dist/experimental/binary-tree/index.d.ts +22 -0
  173. package/dist/experimental/binary-tree/serializer.d.ts +4 -0
  174. package/dist/experimental/binary-tree/types.d.ts +54 -0
  175. package/dist/expressions/base-expression.d.ts +27 -0
  176. package/dist/expressions/bundles/common-expressions.d.ts +9 -0
  177. package/dist/expressions/bundles/core-expressions.d.ts +7 -0
  178. package/dist/expressions/bundles/full-expressions.d.ts +10 -0
  179. package/dist/expressions/bundles/index.d.ts +7 -0
  180. package/dist/expressions/comparison/index.d.ts +80 -0
  181. package/dist/expressions/comparison/utils.d.ts +2 -0
  182. package/dist/expressions/conversion/impl/bridge.d.ts +117 -0
  183. package/dist/expressions/conversion/impl/index.d.ts +59 -0
  184. package/dist/expressions/conversion/index.d.ts +23 -0
  185. package/dist/expressions/expression-tiers.d.ts +13 -0
  186. package/dist/expressions/index.d.ts +11 -0
  187. package/dist/expressions/index.js +6930 -0
  188. package/dist/expressions/index.mjs +6912 -0
  189. package/dist/expressions/logical/impl/index.d.ts +54 -0
  190. package/dist/expressions/logical/impl/pattern-matching.d.ts +58 -0
  191. package/dist/expressions/logical/index.d.ts +59 -0
  192. package/dist/expressions/mathematical/index.d.ts +69 -0
  193. package/dist/expressions/positional/impl/bridge.d.ts +95 -0
  194. package/dist/expressions/positional/impl/index.d.ts +73 -0
  195. package/dist/expressions/positional/index.d.ts +26 -0
  196. package/dist/expressions/properties/impl/index.d.ts +105 -0
  197. package/dist/expressions/properties/index.d.ts +26 -0
  198. package/dist/expressions/property/index.d.ts +55 -0
  199. package/dist/expressions/property-access-utils.d.ts +23 -0
  200. package/dist/expressions/references/impl/bridge.d.ts +54 -0
  201. package/dist/expressions/references/impl/index.d.ts +65 -0
  202. package/dist/expressions/references/index.d.ts +40 -0
  203. package/dist/expressions/shared/comparison-utils.d.ts +10 -0
  204. package/dist/expressions/shared/index.d.ts +9 -0
  205. package/dist/expressions/shared/number-utils.d.ts +7 -0
  206. package/dist/expressions/shared/validation-utils.d.ts +13 -0
  207. package/dist/expressions/special/index.d.ts +104 -0
  208. package/dist/expressions/type-helpers.d.ts +11 -0
  209. package/dist/expressions/type-registry.d.ts +57 -0
  210. package/dist/expressions/validation-helpers.d.ts +15 -0
  211. package/dist/extensions/index.d.ts +3 -0
  212. package/dist/extensions/tailwind.d.ts +22 -0
  213. package/dist/features/behaviors.d.ts +153 -0
  214. package/dist/features/def.d.ts +135 -0
  215. package/dist/features/eventsource.d.ts +140 -0
  216. package/dist/features/init.d.ts +135 -0
  217. package/dist/features/on.d.ts +131 -0
  218. package/dist/features/predefined-behaviors/dropdown-behavior.d.ts +20 -0
  219. package/dist/features/predefined-behaviors/index.d.ts +12 -0
  220. package/dist/features/predefined-behaviors/modal-behavior.d.ts +18 -0
  221. package/dist/features/predefined-behaviors/toggle-group-behavior.d.ts +23 -0
  222. package/dist/features/predefined-behaviors/types.d.ts +14 -0
  223. package/dist/features/sockets.d.ts +162 -0
  224. package/dist/features/webworker.d.ts +135 -0
  225. package/dist/htmx/htmx-attribute-processor.d.ts +84 -0
  226. package/dist/htmx/htmx-translator.d.ts +19 -0
  227. package/dist/htmx/index.d.ts +3 -0
  228. package/dist/hyperfixi-classic-i18n.js +2 -0
  229. package/dist/hyperfixi-hx.js +1 -0
  230. package/dist/hyperfixi-hybrid-complete.js +1 -0
  231. package/dist/hyperfixi-lite-plus.js +1 -0
  232. package/dist/hyperfixi-lite.js +1 -0
  233. package/dist/hyperfixi-minimal.js +1 -0
  234. package/dist/hyperfixi-multilingual.js +2 -0
  235. package/dist/hyperfixi-standard.js +2 -0
  236. package/dist/hyperfixi.js +2 -0
  237. package/dist/hyperfixi.mjs +2 -0
  238. package/dist/index.d.ts +25 -0
  239. package/dist/index.js +65387 -0
  240. package/dist/index.min.js +2 -0
  241. package/dist/index.mjs +65343 -0
  242. package/dist/lib/index.d.ts +4 -0
  243. package/dist/lib/morph-adapter.d.ts +22 -0
  244. package/dist/lib/swap-executor.d.ts +22 -0
  245. package/dist/lib/view-transitions.d.ts +33 -0
  246. package/dist/lokascript-browser-classic-i18n.js +2 -0
  247. package/dist/lokascript-browser-minimal.js +1 -0
  248. package/dist/lokascript-browser-standard.js +2 -0
  249. package/dist/lokascript-browser.js +2 -0
  250. package/dist/lokascript-hybrid-complete.js +1 -0
  251. package/dist/lokascript-hybrid-hx.js +1 -0
  252. package/dist/lokascript-lite-plus.js +1 -0
  253. package/dist/lokascript-lite.js +1 -0
  254. package/dist/lokascript-multilingual.js +2 -0
  255. package/dist/lsp-metadata.d.ts +25 -0
  256. package/dist/lsp-metadata.js +680 -0
  257. package/dist/lsp-metadata.mjs +670 -0
  258. package/dist/metadata.d.ts +213 -0
  259. package/dist/metadata.js +378 -0
  260. package/dist/metadata.mjs +368 -0
  261. package/dist/mod.d.ts +63 -0
  262. package/dist/multilingual/bridge.d.ts +36 -0
  263. package/dist/multilingual/index.d.ts +32 -0
  264. package/dist/multilingual/index.js +285 -0
  265. package/dist/multilingual/index.mjs +278 -0
  266. package/dist/parser/__types__/test-helpers.d.ts +25 -0
  267. package/dist/parser/command-node-builder.d.ts +45 -0
  268. package/dist/parser/command-parsers/animation-commands.d.ts +5 -0
  269. package/dist/parser/command-parsers/async-commands.d.ts +5 -0
  270. package/dist/parser/command-parsers/control-flow-commands.d.ts +7 -0
  271. package/dist/parser/command-parsers/dom-commands.d.ts +8 -0
  272. package/dist/parser/command-parsers/event-commands.d.ts +4 -0
  273. package/dist/parser/command-parsers/utility-commands.d.ts +9 -0
  274. package/dist/parser/command-parsers/variable-commands.d.ts +12 -0
  275. package/dist/parser/error-handler.d.ts +34 -0
  276. package/dist/parser/expression-parser.d.ts +6 -0
  277. package/dist/parser/full-parser.d.ts +4 -0
  278. package/dist/parser/full-parser.js +6532 -0
  279. package/dist/parser/full-parser.mjs +6529 -0
  280. package/dist/parser/helpers/ast-helpers.d.ts +22 -0
  281. package/dist/parser/helpers/parsing-helpers.d.ts +19 -0
  282. package/dist/parser/helpers/token-helpers.d.ts +28 -0
  283. package/dist/parser/hybrid/aliases.d.ts +7 -0
  284. package/dist/parser/hybrid/aliases.js +44 -0
  285. package/dist/parser/hybrid/aliases.mjs +37 -0
  286. package/dist/parser/hybrid/ast-types.d.ts +97 -0
  287. package/dist/parser/hybrid/ast-types.js +3 -0
  288. package/dist/parser/hybrid/ast-types.mjs +2 -0
  289. package/dist/parser/hybrid/index.d.ts +6 -0
  290. package/dist/parser/hybrid/index.js +1015 -0
  291. package/dist/parser/hybrid/index.mjs +1005 -0
  292. package/dist/parser/hybrid/parser-core.d.ts +57 -0
  293. package/dist/parser/hybrid/parser-core.js +1001 -0
  294. package/dist/parser/hybrid/parser-core.mjs +999 -0
  295. package/dist/parser/hybrid/tokenizer.d.ts +9 -0
  296. package/dist/parser/hybrid/tokenizer.js +242 -0
  297. package/dist/parser/hybrid/tokenizer.mjs +239 -0
  298. package/dist/parser/hybrid-parser.d.ts +10 -0
  299. package/dist/parser/hybrid-parser.js +1078 -0
  300. package/dist/parser/hybrid-parser.mjs +1071 -0
  301. package/dist/parser/parser-constants.d.ts +102 -0
  302. package/dist/parser/parser-interface.d.ts +11 -0
  303. package/dist/parser/parser-types.d.ts +175 -0
  304. package/dist/parser/parser.d.ts +146 -0
  305. package/dist/parser/regex-parser.d.ts +4 -0
  306. package/dist/parser/regex-parser.js +412 -0
  307. package/dist/parser/regex-parser.mjs +409 -0
  308. package/dist/parser/runtime.d.ts +3 -0
  309. package/dist/parser/semantic-integration.d.ts +61 -0
  310. package/dist/parser/token-consumer.d.ts +35 -0
  311. package/dist/parser/token-predicates.d.ts +77 -0
  312. package/dist/parser/tokenizer.d.ts +57 -0
  313. package/dist/parser/types.d.ts +118 -0
  314. package/dist/performance/expression-cache.d.ts +78 -0
  315. package/dist/performance/integration.d.ts +40 -0
  316. package/dist/performance/production-monitor.d.ts +67 -0
  317. package/dist/reference/index.d.ts +41 -0
  318. package/dist/reference/index.js +586 -0
  319. package/dist/reference/index.mjs +577 -0
  320. package/dist/registry/browser-types.d.ts +20 -0
  321. package/dist/registry/browser-types.js +81 -0
  322. package/dist/registry/browser-types.mjs +76 -0
  323. package/dist/registry/context-provider-registry.d.ts +38 -0
  324. package/dist/registry/environment.d.ts +19 -0
  325. package/dist/registry/environment.js +36 -0
  326. package/dist/registry/environment.mjs +30 -0
  327. package/dist/registry/event-source-registry.d.ts +54 -0
  328. package/dist/registry/examples/server-commands.d.ts +6 -0
  329. package/dist/registry/examples/server-event-source.d.ts +32 -0
  330. package/dist/registry/index.d.ts +54 -0
  331. package/dist/registry/index.js +7636 -0
  332. package/dist/registry/index.mjs +7612 -0
  333. package/dist/registry/multilingual/examples.d.ts +16 -0
  334. package/dist/registry/multilingual/index.d.ts +68 -0
  335. package/dist/registry/runtime-integration.d.ts +30 -0
  336. package/dist/registry/universal-types.d.ts +34 -0
  337. package/dist/registry/universal-types.js +91 -0
  338. package/dist/registry/universal-types.mjs +86 -0
  339. package/dist/runtime/cleanup-registry.d.ts +47 -0
  340. package/dist/runtime/command-adapter.d.ts +63 -0
  341. package/dist/runtime/environment.d.ts +75 -0
  342. package/dist/runtime/runtime-base.d.ts +78 -0
  343. package/dist/runtime/runtime-experimental.d.ts +18 -0
  344. package/dist/runtime/runtime-factory.d.ts +30 -0
  345. package/dist/runtime/runtime.d.ts +19 -0
  346. package/dist/runtime/temporal-modifiers.d.ts +37 -0
  347. package/dist/scripts/code-generator.d.ts +64 -0
  348. package/dist/scripts/generate-missing-commands.d.ts +4 -0
  349. package/dist/test-setup.d.ts +45 -0
  350. package/dist/test-utilities.d.ts +52 -0
  351. package/dist/tokenizer.d.ts +49 -0
  352. package/dist/types/base-types.d.ts +336 -0
  353. package/dist/types/code-fix.d.ts +39 -0
  354. package/dist/types/command-metadata.d.ts +57 -0
  355. package/dist/types/command-types.d.ts +272 -0
  356. package/dist/types/context-types.d.ts +106 -0
  357. package/dist/types/core-context.d.ts +21 -0
  358. package/dist/types/core.d.ts +203 -0
  359. package/dist/types/error-codes.d.ts +207 -0
  360. package/dist/types/expression-types.d.ts +155 -0
  361. package/dist/types/feature-types.d.ts +81 -0
  362. package/dist/types/hooks.d.ts +45 -0
  363. package/dist/types/index.d.ts +32 -0
  364. package/dist/types/result.d.ts +72 -0
  365. package/dist/types/template-types.d.ts +162 -0
  366. package/dist/types/type-guards.d.ts +24 -0
  367. package/dist/types/unified-types.d.ts +99 -0
  368. package/dist/utils/debug-events.d.ts +41 -0
  369. package/dist/utils/debug.d.ts +35 -0
  370. package/dist/utils/dom-utils.d.ts +16 -0
  371. package/dist/utils/element-check.d.ts +7 -0
  372. package/dist/utils/keyboard-shortcuts.d.ts +18 -0
  373. package/dist/utils/performance.d.ts +40 -0
  374. package/dist/validation/command-pattern-validator.d.ts +53 -0
  375. package/dist/validation/common-validators.d.ts +24 -0
  376. package/dist/validation/lightweight-validators.d.ts +113 -0
  377. package/dist/validation/partial-validation-types.d.ts +50 -0
  378. package/dist/validation/partial-validator.d.ts +6 -0
  379. package/dist/validation/partial-warning-formatter.d.ts +6 -0
  380. package/dist/validation/validate-cli.d.ts +41 -0
  381. package/package.json +292 -0
@@ -0,0 +1,670 @@
1
+ const COMMAND_KEYWORDS = [
2
+ 'toggle',
3
+ 'add',
4
+ 'remove',
5
+ 'show',
6
+ 'hide',
7
+ 'put',
8
+ 'set',
9
+ 'get',
10
+ 'make',
11
+ 'swap',
12
+ 'morph',
13
+ 'append',
14
+ 'take',
15
+ 'render',
16
+ 'wait',
17
+ 'fetch',
18
+ 'settle',
19
+ 'send',
20
+ 'trigger',
21
+ 'go',
22
+ 'pushUrl',
23
+ 'replaceUrl',
24
+ 'if',
25
+ 'else',
26
+ 'unless',
27
+ 'repeat',
28
+ 'for',
29
+ 'while',
30
+ 'break',
31
+ 'continue',
32
+ 'call',
33
+ 'return',
34
+ 'throw',
35
+ 'halt',
36
+ 'exit',
37
+ 'log',
38
+ 'tell',
39
+ 'copy',
40
+ 'pick',
41
+ 'beep',
42
+ 'js',
43
+ 'async',
44
+ 'transition',
45
+ 'measure',
46
+ 'increment',
47
+ 'decrement',
48
+ 'default',
49
+ 'install',
50
+ ];
51
+ const REFERENCE_KEYWORDS = [
52
+ 'me',
53
+ 'you',
54
+ 'it',
55
+ 'result',
56
+ 'event',
57
+ 'target',
58
+ 'detail',
59
+ 'body',
60
+ 'window',
61
+ 'document',
62
+ ];
63
+ const FEATURE_KEYWORDS = [
64
+ 'on',
65
+ 'behavior',
66
+ 'def',
67
+ 'init',
68
+ 'worker',
69
+ 'socket',
70
+ 'eventsource',
71
+ ];
72
+ const BLOCK_KEYWORDS = ['then', 'end', 'from', 'to', 'into', 'with', 'as', 'in'];
73
+ const POSITIONAL_KEYWORDS = [
74
+ 'first',
75
+ 'last',
76
+ 'next',
77
+ 'previous',
78
+ 'closest',
79
+ 'parent',
80
+ 'children',
81
+ 'random',
82
+ ];
83
+ const LOGICAL_KEYWORDS = [
84
+ 'and',
85
+ 'or',
86
+ 'not',
87
+ 'is',
88
+ 'are',
89
+ 'exists',
90
+ 'empty',
91
+ 'matches',
92
+ 'contains',
93
+ 'includes',
94
+ 'has',
95
+ 'no',
96
+ 'true',
97
+ 'false',
98
+ 'null',
99
+ ];
100
+ const ALL_KEYWORDS = [
101
+ ...COMMAND_KEYWORDS,
102
+ ...REFERENCE_KEYWORDS,
103
+ ...FEATURE_KEYWORDS,
104
+ ...BLOCK_KEYWORDS,
105
+ ...POSITIONAL_KEYWORDS,
106
+ ...LOGICAL_KEYWORDS,
107
+ ];
108
+ const HOVER_DOCS = {
109
+ toggle: {
110
+ title: 'toggle',
111
+ description: 'Toggles a class, attribute, or visibility state.',
112
+ example: 'toggle .active on me\ntoggle @disabled on #btn',
113
+ category: 'command',
114
+ },
115
+ add: {
116
+ title: 'add',
117
+ description: 'Adds a class or attribute to an element.',
118
+ example: 'add .highlight to me\nadd @disabled to #btn',
119
+ category: 'command',
120
+ },
121
+ remove: {
122
+ title: 'remove',
123
+ description: 'Removes a class, attribute, or element.',
124
+ example: 'remove .highlight from me\nremove #temp',
125
+ category: 'command',
126
+ },
127
+ show: {
128
+ title: 'show',
129
+ description: 'Makes an element visible.',
130
+ example: 'show #modal\nshow me with *opacity',
131
+ category: 'command',
132
+ },
133
+ hide: {
134
+ title: 'hide',
135
+ description: 'Hides an element.',
136
+ example: 'hide #modal\nhide me with *opacity',
137
+ category: 'command',
138
+ },
139
+ put: {
140
+ title: 'put',
141
+ description: 'Sets the content of an element.',
142
+ example: 'put "Hello" into #message\nput response into #results',
143
+ category: 'command',
144
+ },
145
+ set: {
146
+ title: 'set',
147
+ description: 'Sets a variable or property.',
148
+ example: 'set :count to 0\nset $globalVar to "value"',
149
+ category: 'command',
150
+ },
151
+ get: {
152
+ title: 'get',
153
+ description: 'Gets a value from an element or variable.',
154
+ example: 'get the value of #input\nget #myElement',
155
+ category: 'command',
156
+ },
157
+ make: {
158
+ title: 'make',
159
+ description: 'Creates a new element.',
160
+ example: 'make a <div/> then put it after me',
161
+ category: 'command',
162
+ },
163
+ swap: {
164
+ title: 'swap',
165
+ description: 'Swaps content between elements.',
166
+ example: 'swap #a with #b\nswap innerHTML of #target with response',
167
+ category: 'command',
168
+ },
169
+ morph: {
170
+ title: 'morph',
171
+ description: 'Morphs element content with smooth transitions.',
172
+ example: 'morph #content to response',
173
+ category: 'command',
174
+ },
175
+ append: {
176
+ title: 'append',
177
+ description: 'Appends content to an element.',
178
+ example: 'append "<li>Item</li>" to #list',
179
+ category: 'command',
180
+ },
181
+ take: {
182
+ title: 'take',
183
+ description: 'Takes/claims a class from sibling elements.',
184
+ example: 'take .active from .tabs',
185
+ category: 'command',
186
+ },
187
+ render: {
188
+ title: 'render',
189
+ description: 'Renders a template with data.',
190
+ example: 'render #template with {name: "World"}',
191
+ category: 'command',
192
+ },
193
+ wait: {
194
+ title: 'wait',
195
+ description: 'Pauses execution for a duration or until an event.',
196
+ example: 'wait 1s\nwait 500ms then remove .loading\nwait for htmx:afterSwap',
197
+ category: 'command',
198
+ },
199
+ fetch: {
200
+ title: 'fetch',
201
+ description: 'Makes an HTTP request.',
202
+ example: 'fetch /api/data as json\nfetch /api/users then put it into #list',
203
+ category: 'command',
204
+ },
205
+ settle: {
206
+ title: 'settle',
207
+ description: 'Waits for CSS transitions to complete.',
208
+ example: 'add .fade-out then settle then remove me',
209
+ category: 'command',
210
+ },
211
+ send: {
212
+ title: 'send',
213
+ description: 'Dispatches a custom event.',
214
+ example: 'send myEvent to #target\nsend refresh to <body/>',
215
+ category: 'command',
216
+ },
217
+ trigger: {
218
+ title: 'trigger',
219
+ description: 'Triggers an event on an element.',
220
+ example: 'trigger click on #btn\ntrigger submit on closest <form/>',
221
+ category: 'command',
222
+ },
223
+ go: {
224
+ title: 'go',
225
+ description: 'Navigates to a URL or scrolls to an element.',
226
+ example: 'go to url /home\ngo to #section\ngo back',
227
+ category: 'command',
228
+ },
229
+ if: {
230
+ title: 'if',
231
+ description: 'Conditional execution.',
232
+ example: 'if .active toggle .active\nif :count > 10 log "high"',
233
+ category: 'command',
234
+ },
235
+ else: {
236
+ title: 'else',
237
+ description: 'Alternative branch in conditional.',
238
+ example: 'if .active remove .active else add .active',
239
+ category: 'block',
240
+ },
241
+ unless: {
242
+ title: 'unless',
243
+ description: 'Inverse conditional (if not).',
244
+ example: 'unless .disabled add .clicked',
245
+ category: 'command',
246
+ },
247
+ repeat: {
248
+ title: 'repeat',
249
+ description: 'Loops a specified number of times or over items.',
250
+ example: 'repeat 5 times log "hello"\nrepeat for item in items',
251
+ category: 'command',
252
+ },
253
+ for: {
254
+ title: 'for',
255
+ description: 'Iterates over a collection.',
256
+ example: 'for item in items\n log item\nend',
257
+ category: 'command',
258
+ },
259
+ while: {
260
+ title: 'while',
261
+ description: 'Loops while condition is true.',
262
+ example: 'while :count < 10\n increment :count\nend',
263
+ category: 'command',
264
+ },
265
+ break: {
266
+ title: 'break',
267
+ description: 'Exits the current loop.',
268
+ example: 'repeat for x in items\n if x is empty break\nend',
269
+ category: 'command',
270
+ },
271
+ continue: {
272
+ title: 'continue',
273
+ description: 'Skips to the next iteration.',
274
+ example: 'repeat for x in items\n if x < 0 continue\n log x\nend',
275
+ category: 'command',
276
+ },
277
+ call: {
278
+ title: 'call',
279
+ description: 'Calls a function or method.',
280
+ example: 'call myFunction()\ncall element.focus()',
281
+ category: 'command',
282
+ },
283
+ return: {
284
+ title: 'return',
285
+ description: 'Returns a value from a function.',
286
+ example: 'return :result\nreturn x + y',
287
+ category: 'command',
288
+ },
289
+ throw: {
290
+ title: 'throw',
291
+ description: 'Throws an error.',
292
+ example: 'throw "Invalid input"',
293
+ category: 'command',
294
+ },
295
+ halt: {
296
+ title: 'halt',
297
+ description: 'Stops all execution and event bubbling.',
298
+ example: 'halt\nhalt the event',
299
+ category: 'command',
300
+ },
301
+ exit: {
302
+ title: 'exit',
303
+ description: 'Exits the current handler.',
304
+ example: 'if not valid exit',
305
+ category: 'command',
306
+ },
307
+ log: {
308
+ title: 'log',
309
+ description: 'Logs a value to the console.',
310
+ example: 'log "Hello"\nlog the value of #input',
311
+ category: 'command',
312
+ },
313
+ tell: {
314
+ title: 'tell',
315
+ description: 'Sets context for subsequent commands.',
316
+ example: 'tell #modal to show',
317
+ category: 'command',
318
+ },
319
+ copy: {
320
+ title: 'copy',
321
+ description: 'Copies text to clipboard.',
322
+ example: 'copy "Hello" to clipboard\ncopy the value of #input',
323
+ category: 'command',
324
+ },
325
+ pick: {
326
+ title: 'pick',
327
+ description: 'Opens a file picker dialog.',
328
+ example: 'pick file then log it',
329
+ category: 'command',
330
+ },
331
+ beep: {
332
+ title: 'beep',
333
+ description: 'Highlights element for debugging.',
334
+ example: 'beep! me\nbeep! #target',
335
+ category: 'command',
336
+ },
337
+ js: {
338
+ title: 'js',
339
+ description: 'Executes inline JavaScript.',
340
+ example: 'js(event) return event.clientX end',
341
+ category: 'command',
342
+ },
343
+ async: {
344
+ title: 'async',
345
+ description: 'Runs commands asynchronously (non-blocking).',
346
+ example: 'async do fetch /api/data end',
347
+ category: 'command',
348
+ },
349
+ transition: {
350
+ title: 'transition',
351
+ description: 'Applies CSS transition.',
352
+ example: "transition #box's opacity to 0 over 500ms",
353
+ category: 'command',
354
+ },
355
+ measure: {
356
+ title: 'measure',
357
+ description: 'Measures element dimensions.',
358
+ example: 'measure #box then log result.width',
359
+ category: 'command',
360
+ },
361
+ increment: {
362
+ title: 'increment',
363
+ description: 'Increments a numeric value.',
364
+ example: 'increment :count\nincrement #counter.value by 5',
365
+ category: 'command',
366
+ },
367
+ decrement: {
368
+ title: 'decrement',
369
+ description: 'Decrements a numeric value.',
370
+ example: 'decrement :count\ndecrement #counter.value by 2',
371
+ category: 'command',
372
+ },
373
+ default: {
374
+ title: 'default',
375
+ description: 'Sets a default value if undefined.',
376
+ example: 'default :count to 0',
377
+ category: 'command',
378
+ },
379
+ install: {
380
+ title: 'install',
381
+ description: 'Installs a behavior on an element.',
382
+ example: 'install Draggable',
383
+ category: 'command',
384
+ },
385
+ me: {
386
+ title: 'me',
387
+ description: 'References the current element (the element with this hyperscript).',
388
+ example: 'toggle .active on me',
389
+ category: 'reference',
390
+ },
391
+ you: {
392
+ title: 'you',
393
+ description: 'References the element that triggered the event.',
394
+ example: 'add .clicked to you',
395
+ category: 'reference',
396
+ },
397
+ it: {
398
+ title: 'it',
399
+ description: 'References the result of the last expression.',
400
+ example: 'fetch /api/data then put it into #result',
401
+ category: 'reference',
402
+ },
403
+ result: {
404
+ title: 'result',
405
+ description: 'Alias for `it` - the result of the last expression.',
406
+ example: 'call myFunction() then log result',
407
+ category: 'reference',
408
+ },
409
+ event: {
410
+ title: 'event',
411
+ description: 'References the current event object.',
412
+ example: 'log event.target\nif event.key is "Enter"',
413
+ category: 'reference',
414
+ },
415
+ target: {
416
+ title: 'target',
417
+ description: 'References the event target element.',
418
+ example: 'add .clicked to target',
419
+ category: 'reference',
420
+ },
421
+ detail: {
422
+ title: 'detail',
423
+ description: 'References the detail property of custom events.',
424
+ example: 'log detail.message',
425
+ category: 'reference',
426
+ },
427
+ body: {
428
+ title: 'body',
429
+ description: 'References document.body.',
430
+ example: 'add .dark-mode to body',
431
+ category: 'reference',
432
+ },
433
+ on: {
434
+ title: 'on',
435
+ description: 'Defines an event handler.',
436
+ example: 'on click toggle .active\non keydown[key=="Enter"] submit()',
437
+ category: 'feature',
438
+ },
439
+ behavior: {
440
+ title: 'behavior',
441
+ description: 'Defines a reusable behavior.',
442
+ example: 'behavior Clickable\n on click toggle .active\nend',
443
+ category: 'feature',
444
+ },
445
+ def: {
446
+ title: 'def',
447
+ description: 'Defines a function.',
448
+ example: 'def greet(name)\n log "Hello " + name\nend',
449
+ category: 'feature',
450
+ },
451
+ init: {
452
+ title: 'init',
453
+ description: 'Runs code when element initializes.',
454
+ example: 'init\n set :count to 0\nend',
455
+ category: 'feature',
456
+ },
457
+ then: {
458
+ title: 'then',
459
+ description: 'Chains commands sequentially.',
460
+ example: 'add .loading then fetch /api then remove .loading',
461
+ category: 'block',
462
+ },
463
+ end: {
464
+ title: 'end',
465
+ description: 'Ends a block (behavior, def, if, repeat, etc.).',
466
+ example: 'behavior Modal\n on open show me\nend',
467
+ category: 'block',
468
+ },
469
+ from: {
470
+ title: 'from',
471
+ description: 'Specifies source element.',
472
+ example: 'remove .active from .tabs',
473
+ category: 'block',
474
+ },
475
+ to: {
476
+ title: 'to',
477
+ description: 'Specifies destination or target.',
478
+ example: 'add .active to me\ngo to url /home',
479
+ category: 'block',
480
+ },
481
+ into: {
482
+ title: 'into',
483
+ description: 'Specifies insertion destination.',
484
+ example: 'put "Hello" into #message',
485
+ category: 'block',
486
+ },
487
+ with: {
488
+ title: 'with',
489
+ description: 'Specifies accompanying options or data.',
490
+ example: 'show me with *opacity\nrender #template with {name: "World"}',
491
+ category: 'block',
492
+ },
493
+ as: {
494
+ title: 'as',
495
+ description: 'Type conversion or format specification.',
496
+ example: 'fetch /api as json\nget #input as Int',
497
+ category: 'block',
498
+ },
499
+ in: {
500
+ title: 'in',
501
+ description: 'Specifies iteration target.',
502
+ example: 'for item in items',
503
+ category: 'block',
504
+ },
505
+ first: {
506
+ title: 'first',
507
+ description: 'Selects the first element from a collection.',
508
+ example: 'first <li/> in #list',
509
+ category: 'positional',
510
+ },
511
+ last: {
512
+ title: 'last',
513
+ description: 'Selects the last element from a collection.',
514
+ example: 'last <li/> in #list',
515
+ category: 'positional',
516
+ },
517
+ next: {
518
+ title: 'next',
519
+ description: 'Selects the next sibling element.',
520
+ example: 'next <input/>',
521
+ category: 'positional',
522
+ },
523
+ previous: {
524
+ title: 'previous',
525
+ description: 'Selects the previous sibling element.',
526
+ example: 'previous <div/>',
527
+ category: 'positional',
528
+ },
529
+ closest: {
530
+ title: 'closest',
531
+ description: 'Selects the nearest ancestor matching selector.',
532
+ example: 'closest <form/>\nclosest .container',
533
+ category: 'positional',
534
+ },
535
+ parent: {
536
+ title: 'parent',
537
+ description: 'Selects the parent element.',
538
+ example: 'parent of me',
539
+ category: 'positional',
540
+ },
541
+ random: {
542
+ title: 'random',
543
+ description: 'Selects a random element from a collection.',
544
+ example: 'random <li/> in #list',
545
+ category: 'positional',
546
+ },
547
+ and: {
548
+ title: 'and',
549
+ description: 'Logical AND operator.',
550
+ example: 'if .active and .visible',
551
+ category: 'logical',
552
+ },
553
+ or: {
554
+ title: 'or',
555
+ description: 'Logical OR operator.',
556
+ example: 'if .error or .warning',
557
+ category: 'logical',
558
+ },
559
+ not: {
560
+ title: 'not',
561
+ description: 'Logical NOT operator.',
562
+ example: 'if not .disabled',
563
+ category: 'logical',
564
+ },
565
+ is: {
566
+ title: 'is',
567
+ description: 'Equality or type check.',
568
+ example: 'if :count is 0\nif me is .active',
569
+ category: 'logical',
570
+ },
571
+ exists: {
572
+ title: 'exists',
573
+ description: 'Checks if element/value exists.',
574
+ example: 'if #modal exists',
575
+ category: 'logical',
576
+ },
577
+ empty: {
578
+ title: 'empty',
579
+ description: 'Checks if value is empty.',
580
+ example: 'if #input.value is empty',
581
+ category: 'logical',
582
+ },
583
+ matches: {
584
+ title: 'matches',
585
+ description: 'Tests against a selector or pattern.',
586
+ example: 'if me matches .active',
587
+ category: 'logical',
588
+ },
589
+ contains: {
590
+ title: 'contains',
591
+ description: 'Checks if element contains another.',
592
+ example: 'if #list contains #item',
593
+ category: 'logical',
594
+ },
595
+ has: {
596
+ title: 'has',
597
+ description: 'Checks if element has a class/attribute.',
598
+ example: 'if me has .active',
599
+ category: 'logical',
600
+ },
601
+ };
602
+ const EVENT_NAMES = [
603
+ 'click',
604
+ 'dblclick',
605
+ 'mousedown',
606
+ 'mouseup',
607
+ 'mouseenter',
608
+ 'mouseleave',
609
+ 'mouseover',
610
+ 'mouseout',
611
+ 'mousemove',
612
+ 'contextmenu',
613
+ 'keydown',
614
+ 'keyup',
615
+ 'keypress',
616
+ 'input',
617
+ 'change',
618
+ 'submit',
619
+ 'reset',
620
+ 'focus',
621
+ 'blur',
622
+ 'focusin',
623
+ 'focusout',
624
+ 'load',
625
+ 'DOMContentLoaded',
626
+ 'unload',
627
+ 'beforeunload',
628
+ 'resize',
629
+ 'scroll',
630
+ 'drag',
631
+ 'dragstart',
632
+ 'dragend',
633
+ 'dragenter',
634
+ 'dragleave',
635
+ 'dragover',
636
+ 'drop',
637
+ 'touchstart',
638
+ 'touchend',
639
+ 'touchmove',
640
+ 'touchcancel',
641
+ 'pointerdown',
642
+ 'pointerup',
643
+ 'pointermove',
644
+ 'pointerenter',
645
+ 'pointerleave',
646
+ 'pointerover',
647
+ 'pointerout',
648
+ 'pointercancel',
649
+ 'animationstart',
650
+ 'animationend',
651
+ 'animationiteration',
652
+ 'transitionstart',
653
+ 'transitionend',
654
+ 'transitionrun',
655
+ 'transitioncancel',
656
+ 'htmx:load',
657
+ 'htmx:beforeRequest',
658
+ 'htmx:afterRequest',
659
+ 'htmx:beforeSwap',
660
+ 'htmx:afterSwap',
661
+ 'htmx:afterSettle',
662
+ 'htmx:configRequest',
663
+ 'htmx:responseError',
664
+ 'htmx:sendError',
665
+ 'intersect',
666
+ 'appear',
667
+ ];
668
+
669
+ export { ALL_KEYWORDS, BLOCK_KEYWORDS, COMMAND_KEYWORDS, EVENT_NAMES, FEATURE_KEYWORDS, HOVER_DOCS, LOGICAL_KEYWORDS, POSITIONAL_KEYWORDS, REFERENCE_KEYWORDS };
670
+ //# sourceMappingURL=lsp-metadata.mjs.map