@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,11 @@
1
+ export declare function isAttributeSyntax(expression: string): boolean;
2
+ export declare function parseAttribute(expression: string): {
3
+ name: string;
4
+ value?: string;
5
+ };
6
+ export declare function parseAttributeName(expression: string): string;
7
+ export declare function parseAttributeWithValue(expression: string): {
8
+ name: string;
9
+ value: string;
10
+ };
11
+ //# sourceMappingURL=attribute-manipulation.d.ts.map
@@ -0,0 +1,12 @@
1
+ export declare function batchApply<T extends HTMLElement>(targets: T[], operation: (element: T) => void): T[];
2
+ export declare function batchApplyItems<T extends HTMLElement, U>(targets: T[], items: U[], operation: (element: T, item: U) => void): T[];
3
+ export declare function batchAddClasses(targets: HTMLElement[], classes: string[]): HTMLElement[];
4
+ export declare function batchRemoveClasses(targets: HTMLElement[], classes: string[]): HTMLElement[];
5
+ export declare function batchToggleClasses(targets: HTMLElement[], classes: string[]): HTMLElement[];
6
+ export declare function batchSetAttribute(targets: HTMLElement[], name: string, value: string): HTMLElement[];
7
+ export declare function batchRemoveAttribute(targets: HTMLElement[], name: string): HTMLElement[];
8
+ export declare function batchToggleAttribute(targets: HTMLElement[], name: string, value?: string): HTMLElement[];
9
+ export declare function toggleAttribute(element: HTMLElement, name: string, value?: string): void;
10
+ export declare function batchSetStyles(targets: HTMLElement[], styles: Record<string, string>): HTMLElement[];
11
+ export declare function batchRemoveStyles(targets: HTMLElement[], properties: string[]): HTMLElement[];
12
+ //# sourceMappingURL=batch-dom-operations.d.ts.map
@@ -0,0 +1,11 @@
1
+ export declare function parseClasses(classValue: unknown): string[];
2
+ export declare function isDynamicClass(className: string): boolean;
3
+ export declare function extractDynamicExpression(className: string): string;
4
+ export declare function isValidClassName(className: string): boolean;
5
+ export declare function normalizeClassName(cls: string): string;
6
+ export interface ClassResolutionContext {
7
+ readonly locals: Map<string, unknown>;
8
+ readonly globals: Map<string, unknown>;
9
+ }
10
+ export declare function resolveDynamicClasses(classes: string[], context: ClassResolutionContext): string[];
11
+ //# sourceMappingURL=class-manipulation.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { ExecutionContext } from '../../types/core';
2
+ export declare function evaluateCondition(condition: unknown, context: ExecutionContext): boolean;
3
+ export declare function isTruthy(value: unknown): boolean;
4
+ //# sourceMappingURL=condition-helpers.d.ts.map
@@ -0,0 +1,15 @@
1
+ export type ContentInsertPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend' | 'replace';
2
+ export type SemanticPosition = 'before' | 'prepend' | 'append' | 'after' | 'into';
3
+ export declare function toInsertPosition(position: SemanticPosition): ContentInsertPosition;
4
+ export declare function looksLikeHTML(str: string): boolean;
5
+ export declare function insertContent(target: HTMLElement, content: string | HTMLElement, position: ContentInsertPosition): void;
6
+ export declare function insertContentSemantic(target: HTMLElement, content: string | HTMLElement, position: SemanticPosition): void;
7
+ export declare function removeElement(element: HTMLElement): boolean;
8
+ export declare function removeElements(elements: HTMLElement[]): number;
9
+ export declare function swapElements(element1: HTMLElement, element2: HTMLElement): boolean;
10
+ export declare function cloneElement<T extends HTMLElement>(element: T, deep?: boolean): T;
11
+ export declare function createElementFromHTML(html: string): HTMLElement | null;
12
+ export declare function setInnerHTML(element: HTMLElement, html: string): void;
13
+ export declare function setTextContent(element: HTMLElement, text: string): void;
14
+ export declare function clearElement(element: HTMLElement): void;
15
+ //# sourceMappingURL=dom-mutation.d.ts.map
@@ -0,0 +1,8 @@
1
+ export declare function parseDuration(value: unknown, defaultMs?: number): number;
2
+ export declare function parseDurationStrict(value: unknown): number;
3
+ export declare function parseCSSDurations(durationString: string): number[];
4
+ export declare function calculateMaxAnimationTime(durations: number[], delays: number[]): number;
5
+ export declare function camelToKebab(str: string): string;
6
+ export declare function kebabToCamel(str: string): string;
7
+ export declare function formatDuration(ms: number): string;
8
+ //# sourceMappingURL=duration-parsing.d.ts.map
@@ -0,0 +1,7 @@
1
+ export declare function getElementProperty(element: HTMLElement, property: string): unknown;
2
+ export declare function setElementProperty(element: HTMLElement, property: string, value: unknown): void;
3
+ export declare function getElementValue(element: HTMLElement): unknown;
4
+ export declare function setElementValue(element: HTMLElement, value: unknown): void;
5
+ export declare function isEmpty(value: unknown): boolean;
6
+ export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
7
+ //# sourceMappingURL=element-property-access.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { ExecutionContext, TypedExecutionContext } from '../../types/base-types';
2
+ export declare function resolveElement(target: string | HTMLElement | undefined, context: ExecutionContext | TypedExecutionContext): HTMLElement;
3
+ export declare function resolveElements(target: string | HTMLElement | HTMLElement[] | NodeList | undefined, context: ExecutionContext | TypedExecutionContext): HTMLElement[];
4
+ export declare function asHTMLElement(value: unknown): HTMLElement;
5
+ export declare function isContextRef(target: string): boolean;
6
+ export declare function isCSSSelector(target: string): boolean;
7
+ export declare function findClosest(element: HTMLElement, selector: string): HTMLElement | null;
8
+ export declare function findAll(element: HTMLElement, selector: string): HTMLElement[];
9
+ export declare function resolvePossessive(possessive: string, context: ExecutionContext | TypedExecutionContext): HTMLElement;
10
+ export interface ResolveTargetsOptions {
11
+ filterPrepositions?: boolean;
12
+ fallbackModifierKey?: string;
13
+ }
14
+ export declare function resolveTargetsFromArgs(args: unknown[], evaluator: {
15
+ evaluate: (arg: any, context: any) => Promise<any>;
16
+ }, context: ExecutionContext | TypedExecutionContext, commandName: string, options?: ResolveTargetsOptions, modifiers?: Record<string, unknown>): Promise<HTMLElement[]>;
17
+ //# sourceMappingURL=element-resolution.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { ValidationError } from '../../types/unified-types';
2
+ import type { ExecutionError } from '../../types/result';
3
+ export declare function missingArgument(commandName: string, argName: string): ValidationError;
4
+ export declare function invalidTarget(commandName: string, selector: string): ValidationError;
5
+ export declare function noTargetElements(commandName: string): ValidationError;
6
+ export declare function invalidClassName(commandName: string, className: string): ValidationError;
7
+ export declare function invalidAttributeName(commandName: string, attrName: string): ValidationError;
8
+ export declare function invalidSelector(commandName: string, selector: string): ValidationError;
9
+ export declare function invalidUrl(commandName: string, url: string): ValidationError;
10
+ export declare function invalidContext(commandName: string): ValidationError;
11
+ export declare function operationFailed(commandName: string, operation: string, reason?: string): ValidationError;
12
+ export declare function parseError(commandName: string, details: string): ValidationError;
13
+ export declare function executionError(commandName: string, message: string, cause?: Error): ExecutionError;
14
+ export declare function unsupportedFeature(commandName: string, feature: string): ValidationError;
15
+ export declare function toError(thrown: unknown): Error;
16
+ export declare function throwValidation(error: ValidationError): never;
17
+ //# sourceMappingURL=error-helpers.d.ts.map
@@ -0,0 +1,13 @@
1
+ export interface EventOptions {
2
+ bubbles?: boolean;
3
+ cancelable?: boolean;
4
+ composed?: boolean;
5
+ }
6
+ export declare function createCustomEvent(eventName: string, detail: unknown, options?: EventOptions): CustomEvent;
7
+ export declare function parseEventValue(value: string): unknown;
8
+ export declare function dispatchCustomEvent(target: EventTarget, eventName: string, detail?: unknown, options?: EventOptions): CustomEvent;
9
+ export declare function dispatchLokaScriptEvent(target: EventTarget, eventName: string, detail?: unknown, options?: EventOptions): {
10
+ lokascript: CustomEvent;
11
+ hyperfixi: CustomEvent;
12
+ };
13
+ //# sourceMappingURL=event-helpers.d.ts.map
@@ -0,0 +1,37 @@
1
+ export interface EventWaitResult<T = Event> {
2
+ event: T | null;
3
+ timedOut: boolean;
4
+ cancelled: boolean;
5
+ }
6
+ export interface TransitionWaitResult {
7
+ completed: boolean;
8
+ cancelled: boolean;
9
+ }
10
+ export interface AnimationWaitResult {
11
+ completed: boolean;
12
+ type: 'transition' | 'animation' | 'timeout';
13
+ }
14
+ export declare function waitForEvent<T extends Event = Event>(target: EventTarget, eventName: string, timeout?: number): Promise<EventWaitResult<T>>;
15
+ export declare function waitForTime(ms: number): Promise<void>;
16
+ export declare function waitForTransitionEnd(element: HTMLElement, property: string, duration: number): Promise<TransitionWaitResult>;
17
+ export declare function waitForAnimationComplete(element: HTMLElement, computedAnimationTime: number, userTimeout: number): Promise<AnimationWaitResult>;
18
+ export type WaitCondition = {
19
+ type: 'time';
20
+ ms: number;
21
+ } | {
22
+ type: 'event';
23
+ target: EventTarget;
24
+ eventName: string;
25
+ };
26
+ export interface RaceResult {
27
+ winner: WaitCondition;
28
+ result: number | Event;
29
+ }
30
+ export declare function waitForFirst(conditions: WaitCondition[]): Promise<RaceResult>;
31
+ export declare function createGuardedFinisher<T>(cleanup: () => void, resolve: (value: T) => void): (result: T) => void;
32
+ export declare function createOnceGuard<T extends (...args: any[]) => void>(callback: T): (...args: Parameters<T>) => void;
33
+ export declare function createCleanupManager(): {
34
+ add: (fn: () => void) => void;
35
+ cleanup: () => void;
36
+ };
37
+ //# sourceMappingURL=event-waiting.d.ts.map
@@ -0,0 +1,32 @@
1
+ export { convertToNumber, getVariableValue, setVariableValue, resolveElementRef, getElementPropertyValue, setElementPropertyValue, getCurrentNumericValue, setTargetValue, } from './variable-access';
2
+ export { getElementProperty, setElementProperty, getElementValue, setElementValue, isEmpty, isPlainObject, } from './element-property-access';
3
+ export { isPropertyOfExpressionNode, isPropertyAccessNode, isPropertyTargetString, resolvePropertyTargetFromNode, resolvePropertyTargetFromAccessNode, resolvePropertyTargetFromString, resolveAnyPropertyTarget, readPropertyTarget, writePropertyTarget, togglePropertyTarget, } from './property-target';
4
+ export type { PropertyTarget, PropertyOfExpressionNode, PropertyAccessNode, } from './property-target';
5
+ export { resolveElement, resolveElements, resolveTargetsFromArgs, asHTMLElement, isContextRef, isCSSSelector, findClosest, findAll, resolvePossessive, } from './element-resolution';
6
+ export type { ResolveTargetsOptions } from './element-resolution';
7
+ export { parseDuration, parseDurationStrict, parseCSSDurations, calculateMaxAnimationTime, camelToKebab, kebabToCamel, formatDuration, } from './duration-parsing';
8
+ export { parseClasses, isValidClassName, normalizeClassName } from './class-manipulation';
9
+ export { isAttributeSyntax, parseAttribute, parseAttributeName, parseAttributeWithValue, } from './attribute-manipulation';
10
+ export { createCustomEvent, parseEventValue, dispatchCustomEvent } from './event-helpers';
11
+ export type { EventOptions } from './event-helpers';
12
+ export { evaluateCondition, isTruthy } from './condition-helpers';
13
+ export { validateUrl, isExternalUrl, isSafeUrl, normalizeUrl, extractSearchParams, buildUrlWithParams, } from './url-validation';
14
+ export { parseCSSProperty, isCSSPropertySyntax, parseToggleableCSSProperty, getComputedStyleValue, setStyleValue, removeStyleProperty, toggleCSSProperty, isDisplayNone, isVisibilityHidden, isOpacityZero, } from './style-manipulation';
15
+ export type { ToggleableCSSProperty, ParsedCSSProperty } from './style-manipulation';
16
+ export { detectSelectorType, isSmartElementTag, isSmartElementSelector, extractSelectorValue, isClassSelectorNode, isIdSelectorNode, isBareSmartElementNode, SMART_ELEMENT_TAGS, evaluateFirstArg, detectInputType, } from './selector-type-detection';
17
+ export type { SelectorType, SmartElementTag, CommandInputType, ParsedFirstArg, } from './selector-type-detection';
18
+ export { validateTargetArray, isValidTargetArray, validateStringArray, isValidStringArray, validateTypeDiscriminator, isValidType, validateDefined, isDefined, validateNonEmptyString, isNonEmptyString, combineValidations, createValidator, } from './input-validator';
19
+ export type { ValidationResult as InputValidationResult } from './input-validator';
20
+ export { detectSmartElementType, resolveSmartElementTargets, toggleDialog, toggleDetails, toggleSelect, toggleSmartElement, isSmartElement, isDialogElement, isDetailsElement, isSelectElement, isSummaryElement, } from './smart-element';
21
+ export type { SmartElementType, DialogMode } from './smart-element';
22
+ export { toInsertPosition, looksLikeHTML, insertContent, insertContentSemantic, removeElement, removeElements, swapElements, cloneElement, createElementFromHTML, setInnerHTML, setTextContent, clearElement, } from './dom-mutation';
23
+ export type { ContentInsertPosition, SemanticPosition } from './dom-mutation';
24
+ export { batchApply, batchApplyItems, batchAddClasses, batchRemoveClasses, batchToggleClasses, batchSetAttribute, batchRemoveAttribute, batchToggleAttribute, toggleAttribute, batchSetStyles, batchRemoveStyles, } from './batch-dom-operations';
25
+ export { waitForEvent, waitForTime, waitForTransitionEnd, waitForAnimationComplete, waitForFirst, createGuardedFinisher, createOnceGuard, createCleanupManager, } from './event-waiting';
26
+ export type { EventWaitResult, TransitionWaitResult, AnimationWaitResult, WaitCondition, RaceResult, } from './event-waiting';
27
+ export { createReversionFn, setupDurationReversion, setupEventReversion, setupTemporalModifiers, setupTemporalModifiersForElements, } from './temporal-modifiers';
28
+ export type { ToggleType, CleanupFn, TemporalModifierOptions } from './temporal-modifiers';
29
+ export { executeLoop, createForLoopConfig, createTimesLoopConfig, createWhileLoopConfig, createUntilLoopConfig, createUntilEventLoopConfig, createForeverLoopConfig, } from './loop-executor';
30
+ export type { LoopConfig, LoopIterationContext, LoopResult } from './loop-executor';
31
+ export { missingArgument, invalidTarget, noTargetElements, invalidClassName, invalidAttributeName, invalidSelector, invalidUrl, invalidContext, operationFailed, parseError, executionError, unsupportedFeature, toError, throwValidation, } from './error-helpers';
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,23 @@
1
+ export interface ValidationResult {
2
+ valid: boolean;
3
+ error?: string;
4
+ }
5
+ export declare function validateTargetArray(targets: unknown[], commandName?: string): ValidationResult;
6
+ export declare function isValidTargetArray(targets: unknown[]): targets is HTMLElement[];
7
+ export declare function validateStringArray(arr: unknown[], fieldName?: string, minLength?: number): ValidationResult;
8
+ export declare function isValidStringArray(arr: unknown[], minLength?: number): arr is string[];
9
+ export declare function validateTypeDiscriminator<T extends string>(type: unknown, allowed: readonly T[], commandName?: string): ValidationResult;
10
+ export declare function isValidType<T extends string>(type: unknown, allowed: readonly T[]): type is T;
11
+ export declare function validateDefined(value: unknown, fieldName: string): ValidationResult;
12
+ export declare function isDefined<T>(value: T | null | undefined): value is T;
13
+ export declare function validateNonEmptyString(value: unknown, fieldName: string): ValidationResult;
14
+ export declare function isNonEmptyString(value: unknown): value is string;
15
+ export declare function combineValidations(...results: ValidationResult[]): ValidationResult;
16
+ export declare function createValidator(commandName: string): {
17
+ targets: (targets: unknown[]) => ValidationResult;
18
+ strings: (arr: unknown[], fieldName: string, minLength?: number) => ValidationResult;
19
+ type: <T extends string>(type: unknown, allowed: readonly T[]) => ValidationResult;
20
+ defined: (value: unknown, fieldName: string) => ValidationResult;
21
+ nonEmptyString: (value: unknown, fieldName: string) => ValidationResult;
22
+ };
23
+ //# sourceMappingURL=input-validator.d.ts.map
@@ -0,0 +1,53 @@
1
+ import type { TypedExecutionContext } from '../../types/core';
2
+ export interface LoopConfig {
3
+ type: 'for' | 'times' | 'while' | 'until' | 'until-event' | 'forever';
4
+ maxIterations?: number;
5
+ shouldContinue: (ctx: LoopIterationContext) => boolean | Promise<boolean>;
6
+ beforeIteration?: (ctx: LoopIterationContext, context: TypedExecutionContext) => void | Promise<void>;
7
+ eventSetup?: {
8
+ eventName: string;
9
+ target: EventTarget;
10
+ onEvent: () => void;
11
+ };
12
+ }
13
+ export interface LoopIterationContext {
14
+ index: number;
15
+ item?: unknown;
16
+ collection?: unknown[];
17
+ count?: number;
18
+ conditionExpr?: unknown;
19
+ indexVariable?: string;
20
+ itemVariable?: string;
21
+ eventFired?: boolean;
22
+ }
23
+ export interface LoopResult {
24
+ iterations: number;
25
+ lastResult: unknown;
26
+ interrupted: boolean;
27
+ }
28
+ export declare function executeLoop(config: LoopConfig, commands: unknown, context: TypedExecutionContext, iterCtx: LoopIterationContext, executeCommands: (cmds: unknown, ctx: TypedExecutionContext) => Promise<unknown>): Promise<LoopResult>;
29
+ export declare function createForLoopConfig(collection: unknown[], itemVariable: string, indexVariable?: string): {
30
+ config: LoopConfig;
31
+ iterCtx: LoopIterationContext;
32
+ };
33
+ export declare function createTimesLoopConfig(count: number, indexVariable?: string): {
34
+ config: LoopConfig;
35
+ iterCtx: LoopIterationContext;
36
+ };
37
+ export declare function createWhileLoopConfig(conditionExpr: unknown, evaluateCondition: (expr: unknown, ctx: TypedExecutionContext) => boolean, context: TypedExecutionContext, indexVariable?: string): {
38
+ config: LoopConfig;
39
+ iterCtx: LoopIterationContext;
40
+ };
41
+ export declare function createUntilLoopConfig(conditionExpr: unknown, evaluateCondition: (expr: unknown, ctx: TypedExecutionContext) => boolean, context: TypedExecutionContext, indexVariable?: string): {
42
+ config: LoopConfig;
43
+ iterCtx: LoopIterationContext;
44
+ };
45
+ export declare function createUntilEventLoopConfig(eventName: string, eventTarget: EventTarget, indexVariable?: string): {
46
+ config: LoopConfig;
47
+ iterCtx: LoopIterationContext;
48
+ };
49
+ export declare function createForeverLoopConfig(indexVariable?: string, maxIterations?: number): {
50
+ config: LoopConfig;
51
+ iterCtx: LoopIterationContext;
52
+ };
53
+ //# sourceMappingURL=loop-executor.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { ASTNode, ExecutionContext } from '../../types/base-types';
2
+ import type { ExpressionEvaluator } from '../../core/expression-evaluator';
3
+ export interface NumericTargetRawInput {
4
+ args: ASTNode[];
5
+ modifiers: Record<string, ASTNode>;
6
+ }
7
+ export interface NumericTargetInput {
8
+ target: string | HTMLElement | number;
9
+ property?: string;
10
+ scope?: 'global' | 'local';
11
+ amount: number;
12
+ }
13
+ export declare function parseNumericTargetInput(raw: NumericTargetRawInput, evaluator: ExpressionEvaluator, context: ExecutionContext, commandName: string): Promise<NumericTargetInput>;
14
+ //# sourceMappingURL=numeric-target-parser.d.ts.map
@@ -0,0 +1,30 @@
1
+ import type { ASTNode, ExecutionContext } from '../../types/base-types';
2
+ import type { ExpressionEvaluator } from '../../core/expression-evaluator';
3
+ export interface PropertyTarget {
4
+ element: HTMLElement;
5
+ property: string;
6
+ }
7
+ export interface PropertyOfExpressionNode {
8
+ type: 'propertyOfExpression';
9
+ property: {
10
+ type: 'identifier';
11
+ name: string;
12
+ };
13
+ target: ASTNode;
14
+ }
15
+ export interface PropertyAccessNode {
16
+ type: 'propertyAccess';
17
+ object: ASTNode;
18
+ property: string;
19
+ }
20
+ export declare function isPropertyOfExpressionNode(node: unknown): node is PropertyOfExpressionNode;
21
+ export declare function isPropertyAccessNode(node: unknown): node is PropertyAccessNode;
22
+ export declare function isPropertyTargetString(value: unknown): value is string;
23
+ export declare function resolvePropertyTargetFromNode(node: PropertyOfExpressionNode, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<PropertyTarget | null>;
24
+ export declare function resolvePropertyTargetFromAccessNode(node: PropertyAccessNode, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<PropertyTarget | null>;
25
+ export declare function resolvePropertyTargetFromString(value: string, context: ExecutionContext): PropertyTarget | null;
26
+ export declare function resolveAnyPropertyTarget(node: ASTNode, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<PropertyTarget | null>;
27
+ export declare function readPropertyTarget(target: PropertyTarget): unknown;
28
+ export declare function writePropertyTarget(target: PropertyTarget, value: unknown): void;
29
+ export declare function togglePropertyTarget(target: PropertyTarget): unknown;
30
+ //# sourceMappingURL=property-target.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { ASTNode, ExecutionContext } from '../../types/base-types';
2
+ export type SelectorType = 'class' | 'attribute' | 'css-property' | 'element' | 'identifier' | 'unknown';
3
+ export type SmartElementTag = 'dialog' | 'details' | 'summary' | 'select';
4
+ export declare const SMART_ELEMENT_TAGS: readonly SmartElementTag[];
5
+ export declare function detectSelectorType(value: string): SelectorType;
6
+ export declare function isSmartElementTag(tag: string): tag is SmartElementTag;
7
+ export declare function isSmartElementSelector(selector: string): boolean;
8
+ export declare function extractSelectorValue(node: ASTNode): string | null;
9
+ export declare function isClassSelectorNode(node: ASTNode): boolean;
10
+ export declare function isIdSelectorNode(node: ASTNode): boolean;
11
+ export declare function isCSSPropertySelectorNode(node: ASTNode): boolean;
12
+ export declare function isAttributeSelectorNode(node: ASTNode): boolean;
13
+ export declare function extractAttributeValue(node: ASTNode): string | null;
14
+ export declare function isBareSmartElementNode(node: ASTNode): boolean;
15
+ export type CommandInputType = 'classes' | 'attribute' | 'css-property' | 'element' | 'styles' | 'unknown';
16
+ export interface ParsedFirstArg {
17
+ value: unknown;
18
+ extractedFromNode: boolean;
19
+ }
20
+ export declare function evaluateFirstArg(firstArg: ASTNode, evaluator: {
21
+ evaluate: (node: ASTNode, context: ExecutionContext) => Promise<unknown>;
22
+ }, context: ExecutionContext): Promise<ParsedFirstArg>;
23
+ export declare function detectInputType(value: string): CommandInputType;
24
+ //# sourceMappingURL=selector-type-detection.d.ts.map
@@ -0,0 +1,16 @@
1
+ export type SmartElementType = 'dialog' | 'details' | 'select' | null;
2
+ export type DialogMode = 'modal' | 'non-modal';
3
+ export declare function detectSmartElementType(elements: HTMLElement[]): SmartElementType;
4
+ export declare function resolveSmartElementTargets(elements: HTMLElement[]): HTMLElement[];
5
+ export declare function toggleDialog(dialog: HTMLDialogElement, mode: DialogMode): void;
6
+ export declare function toggleDetails(details: HTMLDetailsElement): void;
7
+ export declare function toggleSelect(select: HTMLSelectElement): void;
8
+ export declare function toggleSmartElement(element: HTMLElement, type: SmartElementType, options?: {
9
+ dialogMode?: DialogMode;
10
+ }): boolean;
11
+ export declare function isSmartElement(element: HTMLElement): boolean;
12
+ export declare function isDialogElement(element: HTMLElement): element is HTMLDialogElement;
13
+ export declare function isDetailsElement(element: HTMLElement): element is HTMLDetailsElement;
14
+ export declare function isSelectElement(element: HTMLElement): element is HTMLSelectElement;
15
+ export declare function isSummaryElement(element: HTMLElement): boolean;
16
+ //# sourceMappingURL=smart-element.d.ts.map
@@ -0,0 +1,16 @@
1
+ export type ToggleableCSSProperty = 'display' | 'visibility' | 'opacity';
2
+ export interface ParsedCSSProperty {
3
+ property: string;
4
+ value?: string;
5
+ }
6
+ export declare function parseCSSProperty(expression: string): ParsedCSSProperty | null;
7
+ export declare function isCSSPropertySyntax(value: string): boolean;
8
+ export declare function parseToggleableCSSProperty(expression: string): ToggleableCSSProperty | null;
9
+ export declare function getComputedStyleValue(element: HTMLElement, property: string): string;
10
+ export declare function setStyleValue(element: HTMLElement, property: string, value: string): void;
11
+ export declare function removeStyleProperty(element: HTMLElement, property: string): void;
12
+ export declare function toggleCSSProperty(element: HTMLElement, property: ToggleableCSSProperty): void;
13
+ export declare function isDisplayNone(element: HTMLElement): boolean;
14
+ export declare function isVisibilityHidden(element: HTMLElement): boolean;
15
+ export declare function isOpacityZero(element: HTMLElement): boolean;
16
+ //# sourceMappingURL=style-manipulation.d.ts.map
@@ -0,0 +1,15 @@
1
+ export type ToggleType = 'class' | 'attribute';
2
+ export type CleanupFn = () => void;
3
+ export declare function createReversionFn(element: HTMLElement, toggleType: ToggleType, identifier: string): () => void;
4
+ export declare function setupDurationReversion(element: HTMLElement, toggleType: ToggleType, identifier: string, duration: number): CleanupFn;
5
+ export declare function setupEventReversion(element: HTMLElement, toggleType: ToggleType, identifier: string, eventName: string): CleanupFn;
6
+ export interface TemporalModifierOptions {
7
+ element: HTMLElement;
8
+ toggleType: ToggleType;
9
+ identifier: string;
10
+ duration?: number;
11
+ untilEvent?: string;
12
+ }
13
+ export declare function setupTemporalModifiers(options: TemporalModifierOptions): CleanupFn[];
14
+ export declare function setupTemporalModifiersForElements(elements: HTMLElement[], toggleType: ToggleType, identifier: string, duration?: number, untilEvent?: string): CleanupFn;
15
+ //# sourceMappingURL=temporal-modifiers.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { ExecutionContext } from '../../types/core';
2
+ import type { ASTNode } from '../../types/base-types';
3
+ import type { ExpressionEvaluator } from '../../core/expression-evaluator';
4
+ export interface UrlCommandInput {
5
+ url: string;
6
+ title?: string;
7
+ state?: Record<string, unknown>;
8
+ }
9
+ export declare function parseUrlArguments(args: ASTNode[], evaluator: ExpressionEvaluator, context: ExecutionContext, commandName: string): Promise<UrlCommandInput>;
10
+ //# sourceMappingURL=url-argument-parser.d.ts.map
@@ -0,0 +1,7 @@
1
+ export declare function validateUrl(url: unknown, commandName: string, debugInfo?: string): string;
2
+ export declare function isExternalUrl(url: string): boolean;
3
+ export declare function isSafeUrl(url: string): boolean;
4
+ export declare function normalizeUrl(url: string): string;
5
+ export declare function extractSearchParams(url: string): URLSearchParams;
6
+ export declare function buildUrlWithParams(basePath: string, params: Record<string, string> | URLSearchParams | FormData): string;
7
+ //# sourceMappingURL=url-validation.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { ExecutionContext } from '../../types/base-types';
2
+ export declare function convertToNumber(value: unknown): number;
3
+ export declare function getVariableValue(name: string, context: ExecutionContext, preferredScope?: string): unknown;
4
+ export declare function setVariableValue(name: string, value: unknown, context: ExecutionContext, preferredScope?: string): void;
5
+ export declare function resolveElementRef(elementRef: string, context: ExecutionContext): unknown;
6
+ export declare function getElementPropertyValue(propertyPath: string, context: ExecutionContext): number;
7
+ export declare function setElementPropertyValue(propertyPath: string, value: unknown, context: ExecutionContext): void;
8
+ export declare function getCurrentNumericValue(target: string | HTMLElement | number, property: string | undefined, scope: string | undefined, context: ExecutionContext): number;
9
+ export declare function setTargetValue(target: string | HTMLElement | number, property: string | undefined, scope: string | undefined, newValue: unknown, context: ExecutionContext): void;
10
+ //# sourceMappingURL=variable-access.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { ASTNode, ExecutionContext, ExpressionNode } from '../../types/base-types';
2
+ import type { ExpressionEvaluator } from '../../core/expression-evaluator';
3
+ export interface VisibilityRawInput {
4
+ args: ASTNode[];
5
+ modifiers: Record<string, ExpressionNode>;
6
+ }
7
+ export interface VisibilityInput {
8
+ targets: HTMLElement[];
9
+ }
10
+ export declare function parseVisibilityInput(raw: VisibilityRawInput, evaluator: ExpressionEvaluator, context: ExecutionContext, commandName: string): Promise<VisibilityInput>;
11
+ //# sourceMappingURL=visibility-target-parser.d.ts.map
@@ -0,0 +1,139 @@
1
+ export { createHideCommand as hide } from './dom/hide';
2
+ export { createShowCommand as show } from './dom/show';
3
+ export { createAddCommand as add } from './dom/add';
4
+ export { createRemoveCommand as remove } from './dom/remove';
5
+ export { createToggleCommand as toggle } from './dom/toggle';
6
+ export { createPutCommand as put } from './dom/put';
7
+ export { createMakeCommand as make } from './dom/make';
8
+ export { createSwapCommand as swap, createMorphCommand as morph } from './dom/swap';
9
+ export { createProcessPartialsCommand as processPartialsCmd } from './dom/process-partials';
10
+ export { createWaitCommand as wait } from './async/wait';
11
+ export { createFetchCommand as fetch } from './async/fetch';
12
+ export { createSetCommand as set } from './data/set';
13
+ export { createGetCommand as get } from './data/get';
14
+ export { createIncrementCommand as increment } from './data/increment';
15
+ export { createDecrementCommand as decrement } from './data/decrement';
16
+ export { createDefaultCommand as defaultCmd } from './data/default';
17
+ export { createLogCommand as log } from './utility/log';
18
+ export { createTellCommand as tell } from './utility/tell';
19
+ export { createCopyCommand as copy } from './utility/copy';
20
+ export { createPickCommand as pick } from './utility/pick';
21
+ export { createBeepCommand as beep } from './utility/beep';
22
+ export { createTriggerCommand as trigger } from './events/trigger';
23
+ export { createSendCommand as send } from './events/send';
24
+ export { createGoCommand as go } from './navigation/go';
25
+ export { createPushUrlCommand as pushUrl } from './navigation/push-url';
26
+ export { createReplaceUrlCommand as replaceUrl } from './navigation/replace-url';
27
+ export { createIfCommand as if_ } from './control-flow/if';
28
+ export { createUnlessCommand as unless } from './control-flow/unless';
29
+ export { createRepeatCommand as repeat } from './control-flow/repeat';
30
+ export { createBreakCommand as break_ } from './control-flow/break';
31
+ export { createContinueCommand as continue_ } from './control-flow/continue';
32
+ export { createHaltCommand as halt } from './control-flow/halt';
33
+ export { createReturnCommand as return_ } from './control-flow/return';
34
+ export { createExitCommand as exit } from './control-flow/exit';
35
+ export { createThrowCommand as throw_ } from './control-flow/throw';
36
+ export { createCallCommand as call } from './execution/call';
37
+ export { createPseudoCommand as pseudo } from './execution/pseudo-command';
38
+ export { createAppendCommand as append } from './content/append';
39
+ export { createTransitionCommand as transition } from './animation/transition';
40
+ export { createMeasureCommand as measure } from './animation/measure';
41
+ export { createSettleCommand as settle } from './animation/settle';
42
+ export { createTakeCommand as take } from './animation/take';
43
+ export { createJsCommand as js } from './advanced/js';
44
+ export { createAsyncCommand as async_ } from './advanced/async';
45
+ export { createInstallCommand as install } from './behaviors/install';
46
+ export { createRenderCommand as render } from './templates/render';
47
+ export { HideCommand, createHideCommand } from './dom/hide';
48
+ export { ShowCommand, createShowCommand } from './dom/show';
49
+ export { AddCommand, createAddCommand } from './dom/add';
50
+ export { RemoveCommand, createRemoveCommand } from './dom/remove';
51
+ export { ToggleCommand, createToggleCommand } from './dom/toggle';
52
+ export { PutCommand, createPutCommand } from './dom/put';
53
+ export { MakeCommand, createMakeCommand } from './dom/make';
54
+ export { swapCommand, morphCommand, createSwapCommand, createMorphCommand } from './dom/swap';
55
+ export { processPartialsCommand, createProcessPartialsCommand, extractPartials, processPartials, } from './dom/process-partials';
56
+ export { WaitCommand, createWaitCommand } from './async/wait';
57
+ export { FetchCommand, createFetchCommand, registerFetchResponseType, getCustomResponseType, } from './async/fetch';
58
+ export { SetCommand, createSetCommand } from './data/set';
59
+ export { GetCommand, createGetCommand } from './data/get';
60
+ export { NumericModifyCommand, createNumericModifyCommand, IncrementCommand, createIncrementCommand, } from './data/increment';
61
+ export { DecrementCommand, createDecrementCommand } from './data/decrement';
62
+ export { LogCommand, createLogCommand } from './utility/log';
63
+ export { EventDispatchCommand, createEventDispatchCommand, TriggerCommand, createTriggerCommand, } from './events/trigger';
64
+ export { SendCommand, createSendCommand } from './events/send';
65
+ export { GoCommand, createGoCommand } from './navigation/go';
66
+ export { HistoryCommand, createHistoryCommand, PushUrlCommand, createPushUrlCommand, } from './navigation/push-url';
67
+ export { ReplaceUrlCommand, createReplaceUrlCommand } from './navigation/replace-url';
68
+ export { ConditionalCommand, createConditionalCommand, IfCommand, createIfCommand, } from './control-flow/if';
69
+ export { RepeatCommand, createRepeatCommand } from './control-flow/repeat';
70
+ export { BreakCommand, createBreakCommand } from './control-flow/break';
71
+ export { ContinueCommand, createContinueCommand } from './control-flow/continue';
72
+ export { HaltCommand, createHaltCommand } from './control-flow/halt';
73
+ export { ReturnCommand, createReturnCommand } from './control-flow/return';
74
+ export { ExitCommand, createExitCommand } from './control-flow/exit';
75
+ export { CallCommand, createCallCommand } from './execution/call';
76
+ export { AppendCommand, createAppendCommand } from './content/append';
77
+ export { TransitionCommand, createTransitionCommand } from './animation/transition';
78
+ export { MeasureCommand, createMeasureCommand } from './animation/measure';
79
+ export { SettleCommand, createSettleCommand } from './animation/settle';
80
+ export { JsCommand, createJsCommand } from './advanced/js';
81
+ export { AsyncCommand, createAsyncCommand } from './advanced/async';
82
+ export { UnlessCommand, createUnlessCommand } from './control-flow/unless';
83
+ export { DefaultCommand, createDefaultCommand } from './data/default';
84
+ export { PseudoCommand, createPseudoCommand } from './execution/pseudo-command';
85
+ export { TellCommand, createTellCommand } from './utility/tell';
86
+ export { CopyCommand, createCopyCommand } from './utility/copy';
87
+ export { PickCommand, createPickCommand } from './utility/pick';
88
+ export { ThrowCommand, createThrowCommand } from './control-flow/throw';
89
+ export { BeepCommand, createBeepCommand } from './utility/beep';
90
+ export { InstallCommand, createInstallCommand } from './behaviors/install';
91
+ export { TakeCommand, createTakeCommand } from './animation/take';
92
+ export { RenderCommand, createRenderCommand } from './templates/render';
93
+ export type { HideCommandInput } from './dom/hide';
94
+ export type { ShowCommandInput } from './dom/show';
95
+ export type { AddCommandInput } from './dom/add';
96
+ export type { RemoveCommandInput } from './dom/remove';
97
+ export type { ToggleCommandInput } from './dom/toggle';
98
+ export type { PutCommandInput } from './dom/put';
99
+ export type { MakeCommandInput } from './dom/make';
100
+ export type { SwapCommandInput, SwapStrategy } from './dom/swap';
101
+ export type { ProcessPartialsCommandInput, ParsedPartial, ProcessPartialsResult, } from './dom/process-partials';
102
+ export type { WaitCommandInput } from './async/wait';
103
+ export type { FetchCommandInput, FetchResponseTypeConfig } from './async/fetch';
104
+ export type { SetCommandInput } from './data/set';
105
+ export type { GetCommandInput } from './data/get';
106
+ export type { NumericModifyInput, NumericOperation, IncrementCommandInput } from './data/increment';
107
+ export type { DecrementCommandInput } from './data/decrement';
108
+ export type { LogCommandInput } from './utility/log';
109
+ export type { EventDispatchInput, EventDispatchMode, TriggerCommandInput } from './events/trigger';
110
+ export type { SendCommandInput } from './events/send';
111
+ export type { GoCommandInput } from './navigation/go';
112
+ export type { HistoryCommandInput, HistoryMode, PushUrlCommandInput } from './navigation/push-url';
113
+ export type { ReplaceUrlCommandInput } from './navigation/replace-url';
114
+ export type { ConditionalCommandInput, ConditionalCommandOutput, ConditionalMode, IfCommandInput, IfCommandOutput, } from './control-flow/if';
115
+ export type { RepeatCommandInput } from './control-flow/repeat';
116
+ export type { BreakCommandInput } from './control-flow/break';
117
+ export type { ContinueCommandInput } from './control-flow/continue';
118
+ export type { HaltCommandInput } from './control-flow/halt';
119
+ export type { ReturnCommandInput } from './control-flow/return';
120
+ export type { ExitCommandInput } from './control-flow/exit';
121
+ export type { CallCommandInput } from './execution/call';
122
+ export type { AppendCommandInput } from './content/append';
123
+ export type { TransitionCommandInput } from './animation/transition';
124
+ export type { MeasureCommandInput } from './animation/measure';
125
+ export type { SettleCommandInput } from './animation/settle';
126
+ export type { JsCommandInput } from './advanced/js';
127
+ export type { AsyncCommandInput } from './advanced/async';
128
+ export type { UnlessCommandInput } from './control-flow/unless';
129
+ export type { DefaultCommandInput } from './data/default';
130
+ export type { PseudoCommandInput } from './execution/pseudo-command';
131
+ export type { TellCommandInput } from './utility/tell';
132
+ export type { CopyCommandInput } from './utility/copy';
133
+ export type { PickCommandInput } from './utility/pick';
134
+ export type { ThrowCommandInput } from './control-flow/throw';
135
+ export type { BeepCommandInput } from './utility/beep';
136
+ export type { InstallCommandInput } from './behaviors/install';
137
+ export type { TakeCommandInput } from './animation/take';
138
+ export type { RenderCommandInput } from './templates/render';
139
+ //# sourceMappingURL=index.d.ts.map