@hyperfixi/core 3.3.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +57 -179
  2. package/dist/ast-utils/index.cjs +74 -806
  3. package/dist/ast-utils/index.d.ts +1 -1
  4. package/dist/ast-utils/index.mjs +74 -805
  5. package/dist/ast-utils/interchange/engine-positions.d.ts +3 -0
  6. package/dist/ast-utils/interchange/index.d.ts +1 -2
  7. package/dist/hyperfixi.js +19 -2
  8. package/dist/index.d.ts +2 -22
  9. package/dist/index.mjs +3 -29128
  10. package/dist/lsp-metadata.cjs +77 -73
  11. package/dist/lsp-metadata.d.ts +4 -4
  12. package/dist/lsp-metadata.mjs +77 -73
  13. package/dist/metadata.cjs +34 -266
  14. package/dist/metadata.d.ts +31 -26
  15. package/dist/metadata.mjs +34 -266
  16. package/dist/multilingual/index.cjs +16 -382
  17. package/dist/multilingual/index.d.ts +4 -32
  18. package/dist/multilingual/index.mjs +15 -377
  19. package/dist/reference/index.cjs +67 -216
  20. package/dist/reference/index.d.ts +0 -3
  21. package/dist/reference/index.mjs +68 -216
  22. package/dist/version.d.ts +1 -1
  23. package/package.json +13 -179
  24. package/dist/__test-utils__/context-builders.d.ts +0 -42
  25. package/dist/__test-utils__/error-testing.d.ts +0 -18
  26. package/dist/__test-utils__/index.d.ts +0 -6
  27. package/dist/__test-utils__/mock-types.d.ts +0 -57
  28. package/dist/__test-utils__/parser-context-mock.d.ts +0 -7
  29. package/dist/__test-utils__/parser-helpers.d.ts +0 -38
  30. package/dist/api/hyperscript-api.d.ts +0 -90
  31. package/dist/api/lokascript-api.d.ts +0 -9
  32. package/dist/ast/command-slots.d.ts +0 -140
  33. package/dist/ast/guards.d.ts +0 -15
  34. package/dist/ast/legacy.d.ts +0 -15
  35. package/dist/ast/nodes.d.ts +0 -243
  36. package/dist/ast-utils/interchange/from-core.d.ts +0 -12
  37. package/dist/ast-utils/interchange/to-core.d.ts +0 -8
  38. package/dist/behaviors/boosted.d.ts +0 -29
  39. package/dist/behaviors/history-swap.d.ts +0 -24
  40. package/dist/behaviors/index.cjs +0 -1155
  41. package/dist/behaviors/index.d.ts +0 -4
  42. package/dist/behaviors/index.mjs +0 -1145
  43. package/dist/bundle-generator/executor-core.d.ts +0 -4
  44. package/dist/bundle-generator/generator.d.ts +0 -4
  45. package/dist/bundle-generator/index.cjs +0 -2804
  46. package/dist/bundle-generator/index.d.ts +0 -6
  47. package/dist/bundle-generator/index.mjs +0 -2779
  48. package/dist/bundle-generator/parser-templates.d.ts +0 -6
  49. package/dist/bundle-generator/template-capabilities.d.ts +0 -12
  50. package/dist/bundle-generator/templates.d.ts +0 -12
  51. package/dist/bundle-generator/types.d.ts +0 -34
  52. package/dist/chunks/bridge-CI9SOl8u.js +0 -2
  53. package/dist/chunks/browser-modular-7CpI5VF2.js +0 -2
  54. package/dist/chunks/index-BwXDEK0m.js +0 -2
  55. package/dist/chunks/index-DQi2o8Lk.js +0 -2
  56. package/dist/chunks/index-uCOQ8Qn0.js +0 -2
  57. package/dist/commands/advanced/js.d.ts +0 -40
  58. package/dist/commands/animation/measure.d.ts +0 -43
  59. package/dist/commands/animation/settle.d.ts +0 -38
  60. package/dist/commands/animation/start-view-transition.d.ts +0 -38
  61. package/dist/commands/animation/take.d.ts +0 -41
  62. package/dist/commands/animation/transition.d.ts +0 -49
  63. package/dist/commands/async/fetch.d.ts +0 -61
  64. package/dist/commands/async/wait.d.ts +0 -51
  65. package/dist/commands/behaviors/install.d.ts +0 -40
  66. package/dist/commands/content/append.d.ts +0 -26
  67. package/dist/commands/content/insertion-base.d.ts +0 -60
  68. package/dist/commands/content/prepend.d.ts +0 -26
  69. package/dist/commands/control-flow/break.d.ts +0 -29
  70. package/dist/commands/control-flow/continue.d.ts +0 -29
  71. package/dist/commands/control-flow/exit.d.ts +0 -29
  72. package/dist/commands/control-flow/halt.d.ts +0 -39
  73. package/dist/commands/control-flow/if.d.ts +0 -58
  74. package/dist/commands/control-flow/repeat.d.ts +0 -50
  75. package/dist/commands/control-flow/return.d.ts +0 -33
  76. package/dist/commands/control-flow/signal-base.d.ts +0 -18
  77. package/dist/commands/control-flow/throw.d.ts +0 -34
  78. package/dist/commands/control-flow/unless.d.ts +0 -3
  79. package/dist/commands/data/clear.d.ts +0 -37
  80. package/dist/commands/data/decrement.d.ts +0 -3
  81. package/dist/commands/data/default.d.ts +0 -60
  82. package/dist/commands/data/get.d.ts +0 -35
  83. package/dist/commands/data/increment.d.ts +0 -42
  84. package/dist/commands/data/set.d.ts +0 -76
  85. package/dist/commands/decorators/index.d.ts +0 -14
  86. package/dist/commands/dom/add.d.ts +0 -44
  87. package/dist/commands/dom/close.d.ts +0 -32
  88. package/dist/commands/dom/dom-modification-base.d.ts +0 -48
  89. package/dist/commands/dom/empty.d.ts +0 -32
  90. package/dist/commands/dom/hide.d.ts +0 -28
  91. package/dist/commands/dom/make.d.ts +0 -34
  92. package/dist/commands/dom/open.d.ts +0 -34
  93. package/dist/commands/dom/process-partials.d.ts +0 -51
  94. package/dist/commands/dom/put.d.ts +0 -42
  95. package/dist/commands/dom/remove.d.ts +0 -46
  96. package/dist/commands/dom/reset.d.ts +0 -32
  97. package/dist/commands/dom/select.d.ts +0 -32
  98. package/dist/commands/dom/show.d.ts +0 -29
  99. package/dist/commands/dom/swap.d.ts +0 -65
  100. package/dist/commands/dom/toggle.d.ts +0 -69
  101. package/dist/commands/dom/visibility-base.d.ts +0 -22
  102. package/dist/commands/events/send.d.ts +0 -3
  103. package/dist/commands/events/trigger.d.ts +0 -49
  104. package/dist/commands/execution/blur.d.ts +0 -32
  105. package/dist/commands/execution/call.d.ts +0 -35
  106. package/dist/commands/execution/focus.d.ts +0 -32
  107. package/dist/commands/execution/pseudo-command.d.ts +0 -41
  108. package/dist/commands/helpers/attribute-manipulation.d.ts +0 -11
  109. package/dist/commands/helpers/attribute-target.d.ts +0 -9
  110. package/dist/commands/helpers/batch-dom-operations.d.ts +0 -12
  111. package/dist/commands/helpers/body-ops.d.ts +0 -10
  112. package/dist/commands/helpers/class-manipulation.d.ts +0 -11
  113. package/dist/commands/helpers/condition-helpers.d.ts +0 -4
  114. package/dist/commands/helpers/dom-mutation.d.ts +0 -16
  115. package/dist/commands/helpers/duration-parsing.d.ts +0 -8
  116. package/dist/commands/helpers/element-property-access.d.ts +0 -7
  117. package/dist/commands/helpers/element-resolution.d.ts +0 -16
  118. package/dist/commands/helpers/error-helpers.d.ts +0 -17
  119. package/dist/commands/helpers/event-helpers.d.ts +0 -13
  120. package/dist/commands/helpers/event-waiting.d.ts +0 -37
  121. package/dist/commands/helpers/index.d.ts +0 -32
  122. package/dist/commands/helpers/input-validator.d.ts +0 -23
  123. package/dist/commands/helpers/loop-executor.d.ts +0 -56
  124. package/dist/commands/helpers/numeric-target-parser.d.ts +0 -21
  125. package/dist/commands/helpers/property-target.d.ts +0 -20
  126. package/dist/commands/helpers/selector-type-detection.d.ts +0 -24
  127. package/dist/commands/helpers/slots.d.ts +0 -5
  128. package/dist/commands/helpers/smart-element.d.ts +0 -16
  129. package/dist/commands/helpers/style-manipulation.d.ts +0 -16
  130. package/dist/commands/helpers/target-elements.d.ts +0 -5
  131. package/dist/commands/helpers/temporal-modifiers.d.ts +0 -15
  132. package/dist/commands/helpers/url-argument-parser.d.ts +0 -13
  133. package/dist/commands/helpers/url-validation.d.ts +0 -7
  134. package/dist/commands/helpers/variable-access.d.ts +0 -13
  135. package/dist/commands/helpers/visibility-target-parser.d.ts +0 -15
  136. package/dist/commands/helpers/write-target.d.ts +0 -42
  137. package/dist/commands/index.cjs +0 -24168
  138. package/dist/commands/index.d.ts +0 -171
  139. package/dist/commands/index.mjs +0 -23981
  140. package/dist/commands/manifest.d.ts +0 -17
  141. package/dist/commands/navigation/go.d.ts +0 -58
  142. package/dist/commands/navigation/push-url.d.ts +0 -48
  143. package/dist/commands/navigation/replace-url.d.ts +0 -3
  144. package/dist/commands/navigation/scroll-to.d.ts +0 -43
  145. package/dist/commands/templates/render.d.ts +0 -47
  146. package/dist/commands/utility/beep.d.ts +0 -41
  147. package/dist/commands/utility/breakpoint.d.ts +0 -32
  148. package/dist/commands/utility/copy.d.ts +0 -41
  149. package/dist/commands/utility/log.d.ts +0 -36
  150. package/dist/commands/utility/pick.d.ts +0 -47
  151. package/dist/commands/utility/tell.d.ts +0 -39
  152. package/dist/compatibility/browser-bundle-classic.d.ts +0 -17
  153. package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +0 -22
  154. package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +0 -43
  155. package/dist/compatibility/browser-bundle-lite.d.ts +0 -15
  156. package/dist/compatibility/browser-bundle-modular.d.ts +0 -18
  157. package/dist/compatibility/browser-bundle-multilingual.d.ts +0 -19
  158. package/dist/compatibility/browser-bundle-semantic-complete.d.ts +0 -24
  159. package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +0 -16
  160. package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +0 -18
  161. package/dist/compatibility/browser-modular.d.ts +0 -42
  162. package/dist/compatibility/browser-tests/helpers/semantic-page.d.ts +0 -3
  163. package/dist/compatibility/browser-tests/test-utils.d.ts +0 -21
  164. package/dist/compatibility/bundle-shell.d.ts +0 -13
  165. package/dist/compatibility/bundle-sources.d.ts +0 -4
  166. package/dist/compatibility/eval-hyperscript.d.ts +0 -16
  167. package/dist/compatibility/hyperscript-adapter.d.ts +0 -38
  168. package/dist/core/ast-property-utils.d.ts +0 -2
  169. package/dist/core/context.d.ts +0 -19
  170. package/dist/core/dom.d.ts +0 -15
  171. package/dist/core/evaluator-types.d.ts +0 -5
  172. package/dist/core/events.d.ts +0 -48
  173. package/dist/core/executor.d.ts +0 -34
  174. package/dist/core/expression-evaluator.d.ts +0 -6
  175. package/dist/core/expression-registry.d.ts +0 -8
  176. package/dist/core/scope-hooks.d.ts +0 -24
  177. package/dist/debug/debug-controller.d.ts +0 -62
  178. package/dist/debug/index.d.ts +0 -5
  179. package/dist/dom/attribute-processor.d.ts +0 -75
  180. package/dist/dom/detect-language.d.ts +0 -3
  181. package/dist/dom/minimal-attribute-processor.d.ts +0 -20
  182. package/dist/expressions/base-expression.d.ts +0 -27
  183. package/dist/expressions/bundles/common-expressions.d.ts +0 -10
  184. package/dist/expressions/bundles/core-expressions.d.ts +0 -8
  185. package/dist/expressions/bundles/full-expressions.d.ts +0 -11
  186. package/dist/expressions/bundles/index.d.ts +0 -7
  187. package/dist/expressions/collection/index.d.ts +0 -10
  188. package/dist/expressions/conversion/index.d.ts +0 -31
  189. package/dist/expressions/expression-tiers.d.ts +0 -13
  190. package/dist/expressions/index.cjs +0 -4331
  191. package/dist/expressions/index.d.ts +0 -13
  192. package/dist/expressions/index.mjs +0 -4312
  193. package/dist/expressions/logical/index.d.ts +0 -61
  194. package/dist/expressions/mathematical/index.d.ts +0 -80
  195. package/dist/expressions/positional/index.d.ts +0 -31
  196. package/dist/expressions/properties/index.d.ts +0 -27
  197. package/dist/expressions/property-access-utils.d.ts +0 -23
  198. package/dist/expressions/references/index.d.ts +0 -39
  199. package/dist/expressions/shared/comparison-utils.d.ts +0 -10
  200. package/dist/expressions/shared/index.d.ts +0 -10
  201. package/dist/expressions/shared/number-utils.d.ts +0 -8
  202. package/dist/expressions/shared/tracking.d.ts +0 -20
  203. package/dist/expressions/shared/validation-utils.d.ts +0 -13
  204. package/dist/expressions/special/index.d.ts +0 -78
  205. package/dist/expressions/type-helpers.d.ts +0 -11
  206. package/dist/expressions/type-registry.d.ts +0 -57
  207. package/dist/expressions/validation-helpers.d.ts +0 -15
  208. package/dist/htmx/hcon.d.ts +0 -9
  209. package/dist/htmx/htmx-attribute-processor.d.ts +0 -120
  210. package/dist/htmx/htmx-translator.d.ts +0 -22
  211. package/dist/htmx/i18n-hooks.d.ts +0 -18
  212. package/dist/htmx/i18n-orchestrator.d.ts +0 -16
  213. package/dist/htmx/index.d.ts +0 -3
  214. package/dist/htmx/lang-resolver.d.ts +0 -3
  215. package/dist/htmx/sse.d.ts +0 -60
  216. package/dist/htmx/ws.d.ts +0 -59
  217. package/dist/hyperfixi-browser-classic-i18n.js +0 -2
  218. package/dist/hyperfixi-browser.js +0 -2
  219. package/dist/hyperfixi-classic-i18n.js +0 -2
  220. package/dist/hyperfixi-hx-v4.js +0 -1
  221. package/dist/hyperfixi-hx.js +0 -1
  222. package/dist/hyperfixi-hybrid-complete.js +0 -1
  223. package/dist/hyperfixi-hybrid-hx.js +0 -1
  224. package/dist/hyperfixi-multilingual.js +0 -2
  225. package/dist/hyperfixi.mjs +0 -2
  226. package/dist/i18n/error-catalog.d.ts +0 -12
  227. package/dist/index.cjs +0 -29159
  228. package/dist/index.min.js +0 -2
  229. package/dist/lib/dom-globals-shim.d.ts +0 -2
  230. package/dist/lib/index.d.ts +0 -4
  231. package/dist/lib/morph-adapter.d.ts +0 -9
  232. package/dist/lib/swap-executor.d.ts +0 -12
  233. package/dist/lib/view-transitions.d.ts +0 -7
  234. package/dist/lokascript-browser-classic-i18n.js +0 -2
  235. package/dist/lokascript-browser.js +0 -2
  236. package/dist/lokascript-hybrid-complete.js +0 -1
  237. package/dist/lokascript-hybrid-hx.js +0 -1
  238. package/dist/lokascript-multilingual.js +0 -2
  239. package/dist/lse/index.cjs +0 -84
  240. package/dist/lse/index.d.ts +0 -15
  241. package/dist/lse/index.mjs +0 -71
  242. package/dist/multilingual/bridge.d.ts +0 -38
  243. package/dist/multilingual/schema-roles.d.ts +0 -3
  244. package/dist/parser/__types__/test-helpers.d.ts +0 -25
  245. package/dist/parser/command-grammar.d.ts +0 -14
  246. package/dist/parser/command-node-builder.d.ts +0 -46
  247. package/dist/parser/command-parsers/animation-commands.d.ts +0 -6
  248. package/dist/parser/command-parsers/async-commands.d.ts +0 -5
  249. package/dist/parser/command-parsers/control-flow-commands.d.ts +0 -7
  250. package/dist/parser/command-parsers/declared-commands.d.ts +0 -6
  251. package/dist/parser/command-parsers/dom-commands.d.ts +0 -11
  252. package/dist/parser/command-parsers/event-commands.d.ts +0 -4
  253. package/dist/parser/command-parsers/navigation-commands.d.ts +0 -6
  254. package/dist/parser/command-parsers/utility-commands.d.ts +0 -14
  255. package/dist/parser/command-parsers/variable-commands.d.ts +0 -12
  256. package/dist/parser/error-handler.d.ts +0 -34
  257. package/dist/parser/extensions.d.ts +0 -43
  258. package/dist/parser/full-parser.cjs +0 -7943
  259. package/dist/parser/full-parser.d.ts +0 -4
  260. package/dist/parser/full-parser.mjs +0 -7940
  261. package/dist/parser/helpers/ast-helpers.d.ts +0 -24
  262. package/dist/parser/helpers/parsing-helpers.d.ts +0 -19
  263. package/dist/parser/helpers/token-helpers.d.ts +0 -28
  264. package/dist/parser/hybrid/aliases.cjs +0 -44
  265. package/dist/parser/hybrid/aliases.d.ts +0 -7
  266. package/dist/parser/hybrid/aliases.mjs +0 -37
  267. package/dist/parser/hybrid/ast-types.cjs +0 -3
  268. package/dist/parser/hybrid/ast-types.d.ts +0 -97
  269. package/dist/parser/hybrid/ast-types.mjs +0 -2
  270. package/dist/parser/hybrid/index.cjs +0 -1185
  271. package/dist/parser/hybrid/index.d.ts +0 -6
  272. package/dist/parser/hybrid/index.mjs +0 -1175
  273. package/dist/parser/hybrid/parser-core.cjs +0 -1171
  274. package/dist/parser/hybrid/parser-core.d.ts +0 -69
  275. package/dist/parser/hybrid/parser-core.mjs +0 -1169
  276. package/dist/parser/hybrid/tokenizer.cjs +0 -255
  277. package/dist/parser/hybrid/tokenizer.d.ts +0 -9
  278. package/dist/parser/hybrid/tokenizer.mjs +0 -252
  279. package/dist/parser/hybrid-parser.cjs +0 -1249
  280. package/dist/parser/hybrid-parser.d.ts +0 -10
  281. package/dist/parser/hybrid-parser.mjs +0 -1242
  282. package/dist/parser/parser-constants.d.ts +0 -100
  283. package/dist/parser/parser-interface.d.ts +0 -12
  284. package/dist/parser/parser-types.d.ts +0 -164
  285. package/dist/parser/parser.d.ts +0 -165
  286. package/dist/parser/pratt-parser.d.ts +0 -41
  287. package/dist/parser/regex-parser.cjs +0 -422
  288. package/dist/parser/regex-parser.d.ts +0 -4
  289. package/dist/parser/regex-parser.mjs +0 -419
  290. package/dist/parser/runtime.d.ts +0 -14
  291. package/dist/parser/semantic-integration.d.ts +0 -17
  292. package/dist/parser/token-consumer.d.ts +0 -34
  293. package/dist/parser/token-predicates.d.ts +0 -77
  294. package/dist/parser/tokenizer.d.ts +0 -28
  295. package/dist/parser/types.d.ts +0 -105
  296. package/dist/performance/expression-cache.d.ts +0 -78
  297. package/dist/performance/integration.d.ts +0 -40
  298. package/dist/performance/production-monitor.d.ts +0 -67
  299. package/dist/registry/browser-types.cjs +0 -81
  300. package/dist/registry/browser-types.d.ts +0 -20
  301. package/dist/registry/browser-types.mjs +0 -76
  302. package/dist/registry/environment.cjs +0 -36
  303. package/dist/registry/environment.d.ts +0 -19
  304. package/dist/registry/environment.mjs +0 -30
  305. package/dist/registry/event-source-registry.d.ts +0 -54
  306. package/dist/registry/examples/server-commands.d.ts +0 -6
  307. package/dist/registry/examples/server-event-source.d.ts +0 -32
  308. package/dist/registry/index.cjs +0 -14055
  309. package/dist/registry/index.d.ts +0 -39
  310. package/dist/registry/index.mjs +0 -14039
  311. package/dist/registry/runtime-integration.d.ts +0 -23
  312. package/dist/registry/universal-types.cjs +0 -91
  313. package/dist/registry/universal-types.d.ts +0 -35
  314. package/dist/registry/universal-types.mjs +0 -86
  315. package/dist/runtime/cleanup-registry.d.ts +0 -47
  316. package/dist/runtime/command-adapter.d.ts +0 -69
  317. package/dist/runtime/environment.d.ts +0 -75
  318. package/dist/runtime/plugin.d.ts +0 -14
  319. package/dist/runtime/runtime-base.d.ts +0 -100
  320. package/dist/runtime/runtime-factory.d.ts +0 -29
  321. package/dist/runtime/runtime.d.ts +0 -20
  322. package/dist/runtime/temporal-modifiers.d.ts +0 -37
  323. package/dist/test-setup.d.ts +0 -28
  324. package/dist/test-utilities.d.ts +0 -39
  325. package/dist/types/base-types.d.ts +0 -231
  326. package/dist/types/code-fix.d.ts +0 -39
  327. package/dist/types/command-metadata.d.ts +0 -57
  328. package/dist/types/command-types.d.ts +0 -262
  329. package/dist/types/context-types.d.ts +0 -106
  330. package/dist/types/core-context.d.ts +0 -22
  331. package/dist/types/core.d.ts +0 -143
  332. package/dist/types/error-codes.d.ts +0 -207
  333. package/dist/types/expression-types.d.ts +0 -155
  334. package/dist/types/hooks.d.ts +0 -45
  335. package/dist/types/index.d.ts +0 -32
  336. package/dist/types/program.d.ts +0 -8
  337. package/dist/types/result.d.ts +0 -73
  338. package/dist/types/template-types.d.ts +0 -162
  339. package/dist/types/type-guards.d.ts +0 -24
  340. package/dist/types/unified-types.d.ts +0 -91
  341. package/dist/utils/beep.d.ts +0 -8
  342. package/dist/utils/debug-events.d.ts +0 -41
  343. package/dist/utils/debug.d.ts +0 -35
  344. package/dist/utils/dom-utils.d.ts +0 -16
  345. package/dist/utils/element-check.d.ts +0 -8
  346. package/dist/utils/keyboard-shortcuts.d.ts +0 -18
  347. package/dist/utils/performance.d.ts +0 -40
  348. package/dist/validation/command-pattern-validator.d.ts +0 -53
  349. package/dist/validation/common-validators.d.ts +0 -24
  350. package/dist/validation/lightweight-validators.d.ts +0 -113
  351. package/dist/validation/partial-validation-types.d.ts +0 -50
  352. package/dist/validation/partial-validator.d.ts +0 -6
  353. package/dist/validation/partial-warning-formatter.d.ts +0 -6
  354. package/dist/validation/validate-cli.d.ts +0 -41
  355. package/vocab/htmx/ar.js +0 -62
  356. package/vocab/htmx/bn.js +0 -65
  357. package/vocab/htmx/de.js +0 -83
  358. package/vocab/htmx/en.js +0 -24
  359. package/vocab/htmx/es.js +0 -79
  360. package/vocab/htmx/fr.js +0 -79
  361. package/vocab/htmx/he.js +0 -61
  362. package/vocab/htmx/hi.js +0 -81
  363. package/vocab/htmx/id.js +0 -76
  364. package/vocab/htmx/it.js +0 -79
  365. package/vocab/htmx/ja.js +0 -85
  366. package/vocab/htmx/ko.js +0 -81
  367. package/vocab/htmx/ms.js +0 -58
  368. package/vocab/htmx/pl.js +0 -80
  369. package/vocab/htmx/pt.js +0 -81
  370. package/vocab/htmx/qu.js +0 -83
  371. package/vocab/htmx/ru.js +0 -82
  372. package/vocab/htmx/sw.js +0 -79
  373. package/vocab/htmx/th.js +0 -67
  374. package/vocab/htmx/tl.js +0 -56
  375. package/vocab/htmx/tr.js +0 -86
  376. package/vocab/htmx/uk.js +0 -82
  377. package/vocab/htmx/vi.js +0 -59
  378. package/vocab/htmx/zh.js +0 -79
@@ -1,106 +0,0 @@
1
- import type { RuntimeValidator } from '../validation/lightweight-validators';
2
- import type { TypedExpressionContext, EvaluationType, ExpressionMetadata, ValidationResult } from './expression-types';
3
- import type { LLMDocumentation } from './command-types';
4
- import type { EvaluationResult } from './base-types';
5
- export type { EvaluationResult } from './base-types';
6
- export type ContextCategory = 'Frontend' | 'Backend' | 'Universal' | 'SSR' | 'Testing';
7
- export interface ContextMetadata extends Omit<ExpressionMetadata, 'category'> {
8
- category: ContextCategory;
9
- relatedContexts?: string[];
10
- frameworkDependencies?: string[];
11
- environmentRequirements?: {
12
- browser?: boolean;
13
- server?: boolean;
14
- nodejs?: boolean;
15
- python?: boolean;
16
- };
17
- }
18
- export interface TypedContextImplementation<TInput, TOutput> {
19
- readonly name: string;
20
- readonly category: ContextCategory;
21
- readonly description: string;
22
- readonly inputSchema: RuntimeValidator<TInput>;
23
- readonly outputType: EvaluationType;
24
- readonly metadata: ContextMetadata;
25
- readonly documentation?: LLMDocumentation;
26
- initialize(input: TInput): Promise<EvaluationResult<TOutput>>;
27
- validate(input: unknown): ValidationResult;
28
- trackPerformance?(startTime: number, success: boolean, output?: any): void;
29
- }
30
- export declare abstract class ContextBase<TInput, TOutput> implements TypedContextImplementation<TInput, TOutput> {
31
- abstract readonly name: string;
32
- abstract readonly category: ContextCategory;
33
- abstract readonly description: string;
34
- abstract readonly inputSchema: RuntimeValidator<TInput>;
35
- abstract readonly outputType: EvaluationType;
36
- abstract readonly metadata: ContextMetadata;
37
- abstract readonly documentation?: LLMDocumentation;
38
- protected evaluationHistory: Array<{
39
- contextName: string;
40
- category: ContextCategory;
41
- input: string;
42
- output: any;
43
- timestamp: number;
44
- duration: number;
45
- success: boolean;
46
- }>;
47
- abstract initialize(input: TInput): Promise<EvaluationResult<TOutput>>;
48
- validate(input: unknown): ValidationResult;
49
- protected validateContextSpecific(_data: TInput): ValidationResult;
50
- protected generateValidationSuggestions(error: any): string[];
51
- trackPerformance(startTime: number, success: boolean, output?: any): void;
52
- getPerformanceMetrics(): {
53
- totalInitializations: number;
54
- successRate: number;
55
- averageDuration: number;
56
- recentPerformance: {
57
- contextName: string;
58
- category: ContextCategory;
59
- input: string;
60
- output: any;
61
- timestamp: number;
62
- duration: number;
63
- success: boolean;
64
- }[];
65
- };
66
- }
67
- export declare const BaseContextInputSchema: RuntimeValidator<{
68
- [x: string]: unknown;
69
- }>;
70
- export declare const BaseContextOutputSchema: RuntimeValidator<{
71
- [x: string]: unknown;
72
- }>;
73
- export type BaseContextInput = any;
74
- export type BaseContextOutput = any;
75
- export interface ExtendedTypedExpressionContext extends TypedExpressionContext {
76
- contextCategory?: ContextCategory;
77
- framework?: {
78
- name: 'django' | 'flask' | 'express' | 'fastapi' | 'vanilla';
79
- version?: string;
80
- capabilities?: string[];
81
- };
82
- performanceTracking?: {
83
- enabled: boolean;
84
- includeMemoryUsage: boolean;
85
- includeNetworkMetrics: boolean;
86
- };
87
- services?: {
88
- logger?: any;
89
- cache?: any;
90
- database?: any;
91
- queue?: any;
92
- };
93
- }
94
- export interface ContextRegistry {
95
- register<T extends TypedContextImplementation<any, any>>(context: T): void;
96
- get<_T>(name: string): TypedContextImplementation<any, any> | null;
97
- listByCategory(category: ContextCategory): TypedContextImplementation<any, any>[];
98
- validate<T extends TypedContextImplementation<any, any>>(context: T): ValidationResult;
99
- }
100
- export interface ContextFilter {
101
- category?: ContextCategory;
102
- environment?: 'frontend' | 'backend' | 'universal';
103
- framework?: string;
104
- capabilities?: string[];
105
- }
106
- //# sourceMappingURL=context-types.d.ts.map
@@ -1,22 +0,0 @@
1
- export interface CoreExecutionContext {
2
- me: Element | null;
3
- owner?: Element | null;
4
- you: Element | null;
5
- it: unknown;
6
- readonly event?: Event | null;
7
- readonly locals: Map<string, unknown>;
8
- readonly globals: Map<string, unknown>;
9
- }
10
- export interface CoreContextOptions {
11
- me?: Element | null;
12
- you?: Element | null;
13
- it?: unknown;
14
- event?: Event | null;
15
- locals?: Map<string, unknown>;
16
- globals?: Map<string, unknown>;
17
- }
18
- export declare function createCoreContext(options?: CoreContextOptions): CoreExecutionContext;
19
- export declare function isCoreExecutionContext(value: unknown): value is CoreExecutionContext;
20
- export declare function assertHTMLElement(element: Element | null, name?: string): HTMLElement;
21
- export declare function asHTMLElement(element: Element | null): HTMLElement | null;
22
- //# sourceMappingURL=core-context.d.ts.map
@@ -1,143 +0,0 @@
1
- export type { ExecutionContext, Scope, TypedExecutionContext, EvaluationType, HyperScriptValueType, ValidationResult, ValidationError, TypedResult, EnhancedError, PerformanceCharacteristics, ASTNode, ParseError, ExpressionNode, } from './base-types';
2
- import type { ExecutionContext, ASTNode, ExpressionNode, EvaluationType, ParseError } from './base-types';
3
- export type ElementType = 'command' | 'expression' | 'feature' | 'keyword' | 'special_symbol';
4
- export type ElementStatus = 'Draft' | 'Review' | 'Approved' | 'Deprecated';
5
- export type ExpressionCategory = 'Arithmetic' | 'Logical' | 'Comparison' | 'Reference' | 'Conversion' | 'Special';
6
- export type Associativity = 'Left' | 'Right' | 'None';
7
- export interface ExtendedExecutionContext extends ExecutionContext {
8
- variables?: Map<string, unknown>;
9
- events?: Map<string, {
10
- target: HTMLElement;
11
- event: string;
12
- handler: Function;
13
- }>;
14
- parent?: ExtendedExecutionContext;
15
- meta?: Record<string, unknown>;
16
- flags?: {
17
- halted: boolean;
18
- breaking: boolean;
19
- continuing: boolean;
20
- returning: boolean;
21
- async: boolean;
22
- };
23
- }
24
- export interface CommandNode extends ASTNode {
25
- type: 'command';
26
- name: string;
27
- args: ExpressionNode[];
28
- body?: StatementNode[];
29
- implicitTarget?: ExpressionNode;
30
- isBlocking: boolean;
31
- modifiers?: Record<string, ExpressionNode>;
32
- originalCommand?: string;
33
- }
34
- export interface FeatureNode extends ASTNode {
35
- type: 'feature';
36
- name: string;
37
- trigger?: string;
38
- body: StatementNode[];
39
- scope: 'global' | 'local' | 'behavior';
40
- }
41
- export interface StatementNode extends ASTNode {
42
- type: 'statement';
43
- command: CommandNode;
44
- conditions?: ExpressionNode[];
45
- }
46
- export interface ExpressionImplementation {
47
- name: string;
48
- category: ExpressionCategory;
49
- evaluatesTo: EvaluationType;
50
- evaluate: (context: ExecutionContext, ...args: unknown[]) => Promise<unknown>;
51
- precedence?: number;
52
- associativity?: Associativity;
53
- operators?: string[];
54
- validate?: (args: unknown[]) => string | null;
55
- }
56
- export interface Token {
57
- kind: string;
58
- value: string;
59
- start: number;
60
- end: number;
61
- line: number;
62
- column: number;
63
- }
64
- export interface ParseWarning {
65
- type: string;
66
- message: string;
67
- suggestions: string[];
68
- severity: 'info' | 'warning' | 'error';
69
- code?: string;
70
- line?: number;
71
- column?: number;
72
- }
73
- export interface ParseResult<T = ASTNode> {
74
- success: boolean;
75
- node?: T;
76
- ast?: T;
77
- error?: ParseError;
78
- errors?: ParseError[];
79
- recovered?: boolean;
80
- warnings?: ParseWarning[];
81
- tokens: Token[];
82
- }
83
- export interface Parser {
84
- parse(input: string): ParseResult<FeatureNode[]>;
85
- parseExpression(input: string): ParseResult<ExpressionNode>;
86
- parseCommand(input: string): ParseResult<CommandNode>;
87
- tokenize(input: string): Token[];
88
- }
89
- export interface LSPElement {
90
- id: number;
91
- name: string;
92
- description: string;
93
- syntax_canonical: string;
94
- status: ElementStatus;
95
- tags: string[];
96
- examples: LSPExample[];
97
- }
98
- export interface LSPCommand extends LSPElement {
99
- purpose: string;
100
- has_body: boolean;
101
- is_blocking: boolean;
102
- implicit_target?: string;
103
- implicit_result_target?: string;
104
- arguments?: LSPArgument[];
105
- }
106
- export interface LSPExpression extends LSPElement {
107
- category: ExpressionCategory;
108
- evaluates_to_type: EvaluationType;
109
- precedence?: number;
110
- associativity?: Associativity;
111
- operators?: string[];
112
- }
113
- export interface LSPFeature extends LSPElement {
114
- trigger?: string;
115
- structure_description?: string;
116
- scope_impact?: string;
117
- }
118
- export interface LSPExample {
119
- id: number;
120
- element_id: number;
121
- element_type: ElementType;
122
- example: string;
123
- description?: string;
124
- difficulty?: 'Beginner' | 'Intermediate' | 'Advanced';
125
- html_context?: string;
126
- }
127
- export interface LSPArgument {
128
- name: string;
129
- type: string;
130
- description: string;
131
- optional: boolean;
132
- default_value?: unknown;
133
- }
134
- export interface HyperscriptEvent extends CustomEvent {
135
- detail: {
136
- element: HTMLElement;
137
- context: ExecutionContext;
138
- command?: string;
139
- result?: unknown;
140
- error?: Error;
141
- };
142
- }
143
- //# sourceMappingURL=core.d.ts.map
@@ -1,207 +0,0 @@
1
- import type { ValidationError } from './unified-types';
2
- import type { ExecutionError, ExecutionErrorContext } from './result';
3
- export declare const ErrorCodes: {
4
- readonly EXECUTION: {
5
- readonly ADD_FAILED: "ADD_EXECUTION_FAILED";
6
- readonly GO_FAILED: "GO_EXECUTION_FAILED";
7
- readonly HIDE_FAILED: "HIDE_EXECUTION_FAILED";
8
- readonly PUT_FAILED: "PUT_EXECUTION_FAILED";
9
- readonly REMOVE_FAILED: "REMOVE_EXECUTION_FAILED";
10
- readonly SEND_FAILED: "SEND_EXECUTION_FAILED";
11
- readonly SHOW_FAILED: "SHOW_EXECUTION_FAILED";
12
- readonly TAKE_FAILED: "TAKE_EXECUTION_FAILED";
13
- readonly TOGGLE_FAILED: "TOGGLE_EXECUTION_FAILED";
14
- readonly TRIGGER_FAILED: "TRIGGER_EXECUTION_FAILED";
15
- readonly WAIT_FAILED: "WAIT_FAILED";
16
- readonly FETCH_FAILED: "FETCH_FAILED";
17
- readonly IF_FAILED: "IF_EXECUTION_FAILED";
18
- readonly ELSE_FAILED: "ELSE_EXECUTION_FAILED";
19
- readonly REPEAT_FAILED: "REPEAT_EXECUTION_FAILED";
20
- readonly SCROLL_FAILED: "SCROLL_EXECUTION_FAILED";
21
- };
22
- readonly VALIDATION: {
23
- readonly ADD_FAILED: "ADD_VALIDATION_FAILED";
24
- readonly GO_FAILED: "GO_VALIDATION_FAILED";
25
- readonly PUT_FAILED: "PUT_VALIDATION_FAILED";
26
- readonly REMOVE_FAILED: "REMOVE_VALIDATION_FAILED";
27
- readonly SEND_FAILED: "SEND_VALIDATION_FAILED";
28
- readonly TAKE_FAILED: "TAKE_VALIDATION_FAILED";
29
- readonly TOGGLE_FAILED: "TOGGLE_VALIDATION_FAILED";
30
- readonly TRIGGER_FAILED: "TRIGGER_VALIDATION_FAILED";
31
- readonly IF_FAILED: "IF_VALIDATION_FAILED";
32
- readonly ELSE_FAILED: "ELSE_VALIDATION_FAILED";
33
- readonly REPEAT_FAILED: "REPEAT_VALIDATION_FAILED";
34
- readonly GENERIC: "VALIDATION_ERROR";
35
- readonly PARTIAL_LAYOUT_ELEMENT: "PARTIAL_LAYOUT_ELEMENT";
36
- readonly PARTIAL_DUPLICATE_SEMANTIC: "PARTIAL_DUPLICATE_SEMANTIC";
37
- readonly PARTIAL_METADATA_ELEMENT: "PARTIAL_METADATA_ELEMENT";
38
- };
39
- readonly OPERATION: {
40
- readonly CLASS_ADD_FAILED: "CLASS_ADD_FAILED";
41
- readonly CLASS_REMOVE_FAILED: "CLASS_REMOVE_FAILED";
42
- readonly CLASS_TOGGLE_FAILED: "CLASS_TOGGLE_FAILED";
43
- readonly ATTRIBUTE_ADD_FAILED: "ATTRIBUTE_ADD_FAILED";
44
- readonly ATTRIBUTE_TOGGLE_FAILED: "ATTRIBUTE_TOGGLE_FAILED";
45
- readonly CSS_PROPERTY_TOGGLE_FAILED: "CSS_PROPERTY_TOGGLE_FAILED";
46
- readonly ELEMENT_HIDE_FAILED: "ELEMENT_HIDE_FAILED";
47
- readonly ELEMENT_SHOW_FAILED: "ELEMENT_SHOW_FAILED";
48
- readonly EVENT_DISPATCH_FAILED: "EVENT_DISPATCH_FAILED";
49
- readonly EVENT_TRIGGER_FAILED: "EVENT_TRIGGER_FAILED";
50
- readonly NAVIGATION_FAILED: "NAVIGATION_FAILED";
51
- readonly HISTORY_NAVIGATION_FAILED: "HISTORY_NAVIGATION_FAILED";
52
- readonly URL_NAVIGATION_FAILED: "URL_NAVIGATION_FAILED";
53
- readonly SCROLL_FAILED: "SCROLL_FAILED";
54
- readonly SCROLL_OFFSET_FAILED: "SCROLL_OFFSET_FAILED";
55
- readonly PROPERTY_TAKE_FAILED: "PROPERTY_TAKE_FAILED";
56
- readonly PROPERTY_PUT_FAILED: "PROPERTY_PUT_FAILED";
57
- readonly STYLE_ADD_FAILED: "STYLE_ADD_FAILED";
58
- readonly OPERATION_FAILED: "OPERATION_FAILED";
59
- readonly PARSE_FAILED: "PARSE_FAILED";
60
- readonly ARGUMENT_PARSE_FAILED: "ARGUMENT_PARSE_FAILED";
61
- };
62
- readonly RESOLUTION: {
63
- readonly TARGET_RESOLUTION_FAILED: "TARGET_RESOLUTION_FAILED";
64
- readonly SOURCE_RESOLUTION_FAILED: "SOURCE_RESOLUTION_FAILED";
65
- readonly RESOLUTION_FAILED: "RESOLUTION_FAILED";
66
- };
67
- readonly INVALID: {
68
- readonly CONTEXT_ELEMENT: "INVALID_CONTEXT_ELEMENT";
69
- readonly CLASS_NAME: "INVALID_CLASS_NAME";
70
- readonly ATTRIBUTE_NAME: "INVALID_ATTRIBUTE_NAME";
71
- readonly ELEMENT_REFERENCE: "INVALID_ELEMENT_REFERENCE";
72
- readonly POSITION: "INVALID_POSITION";
73
- readonly PROPERTY: "INVALID_PROPERTY";
74
- readonly PROPERTY_POSITION: "INVALID_PROPERTY_POSITION";
75
- readonly SELECTOR: "INVALID_SELECTOR";
76
- readonly TARGET_TYPE: "INVALID_TARGET_TYPE";
77
- readonly URL: "INVALID_URL";
78
- };
79
- readonly MISSING: {
80
- readonly URL: "MISSING_URL";
81
- readonly ARGUMENTS: "NO_ARGUMENTS";
82
- };
83
- readonly NOT_FOUND: {
84
- readonly ELEMENT: "ELEMENT_NOT_FOUND";
85
- readonly TARGET_ELEMENT: "NO_TARGET_ELEMENT";
86
- readonly TARGET_ELEMENTS: "NO_TARGET_ELEMENTS";
87
- readonly TARGET: "TARGET_NOT_FOUND";
88
- };
89
- readonly NO_VALID: {
90
- readonly ATTRIBUTES: "NO_VALID_ATTRIBUTES";
91
- readonly CLASSES: "NO_VALID_CLASSES";
92
- readonly CSS_PROPERTY: "NO_VALID_CSS_PROPERTY";
93
- };
94
- readonly CONTEXT: {
95
- readonly IF_INVALID: "IF_CONTEXT_INVALID";
96
- readonly ELSE_INVALID: "ELSE_CONTEXT_INVALID";
97
- readonly REPEAT_INVALID: "REPEAT_CONTEXT_INVALID";
98
- readonly REPEAT_COLLECTION_INVALID: "REPEAT_COLLECTION_INVALID";
99
- };
100
- readonly UNSUPPORTED: {
101
- readonly CSS_PROPERTY: "UNSUPPORTED_CSS_PROPERTY";
102
- readonly HISTORY_API: "HISTORY_API_UNAVAILABLE";
103
- };
104
- };
105
- export declare const ErrorMessages: {
106
- readonly ADD_EXECUTION_FAILED: "Failed to execute add command";
107
- readonly GO_EXECUTION_FAILED: "Failed to execute go command";
108
- readonly HIDE_EXECUTION_FAILED: "Failed to execute hide command";
109
- readonly PUT_EXECUTION_FAILED: "Failed to execute put command";
110
- readonly REMOVE_EXECUTION_FAILED: "Failed to execute remove command";
111
- readonly SEND_EXECUTION_FAILED: "Failed to execute send command";
112
- readonly SHOW_EXECUTION_FAILED: "Failed to execute show command";
113
- readonly TAKE_EXECUTION_FAILED: "Failed to execute take command";
114
- readonly TOGGLE_EXECUTION_FAILED: "Failed to execute toggle command";
115
- readonly TRIGGER_EXECUTION_FAILED: "Failed to execute trigger command";
116
- readonly WAIT_FAILED: "Wait command failed";
117
- readonly FETCH_FAILED: "Fetch command failed";
118
- readonly IF_EXECUTION_FAILED: "Failed to execute if directive";
119
- readonly ELSE_EXECUTION_FAILED: "Failed to execute else directive";
120
- readonly REPEAT_EXECUTION_FAILED: "Failed to execute repeat directive";
121
- readonly SCROLL_EXECUTION_FAILED: "Failed to execute scroll operation";
122
- readonly ADD_VALIDATION_FAILED: "Add command validation failed";
123
- readonly GO_VALIDATION_FAILED: "Go command validation failed";
124
- readonly PUT_VALIDATION_FAILED: "Put command validation failed";
125
- readonly REMOVE_VALIDATION_FAILED: "Remove command validation failed";
126
- readonly SEND_VALIDATION_FAILED: "Send command validation failed";
127
- readonly TAKE_VALIDATION_FAILED: "Take command validation failed";
128
- readonly TOGGLE_VALIDATION_FAILED: "Toggle command validation failed";
129
- readonly TRIGGER_VALIDATION_FAILED: "Trigger command validation failed";
130
- readonly IF_VALIDATION_FAILED: "If directive validation failed";
131
- readonly ELSE_VALIDATION_FAILED: "Else directive validation failed";
132
- readonly REPEAT_VALIDATION_FAILED: "Repeat directive validation failed";
133
- readonly VALIDATION_ERROR: "Validation error";
134
- readonly PARTIAL_LAYOUT_ELEMENT: "Partial contains layout element: {0}";
135
- readonly PARTIAL_DUPLICATE_SEMANTIC: "Partial may create duplicate semantic landmark: {0}";
136
- readonly PARTIAL_METADATA_ELEMENT: "Partial contains metadata element: {0}";
137
- readonly CLASS_ADD_FAILED: "Failed to add class to element";
138
- readonly CLASS_REMOVE_FAILED: "Failed to remove class from element";
139
- readonly CLASS_TOGGLE_FAILED: "Failed to toggle class on element";
140
- readonly ATTRIBUTE_ADD_FAILED: "Failed to add attribute to element";
141
- readonly ATTRIBUTE_TOGGLE_FAILED: "Failed to toggle attribute on element";
142
- readonly CSS_PROPERTY_TOGGLE_FAILED: "Failed to toggle CSS property";
143
- readonly ELEMENT_HIDE_FAILED: "Failed to hide element";
144
- readonly ELEMENT_SHOW_FAILED: "Failed to show element";
145
- readonly EVENT_DISPATCH_FAILED: "Failed to dispatch event";
146
- readonly EVENT_TRIGGER_FAILED: "Failed to trigger event on element";
147
- readonly NAVIGATION_FAILED: "Navigation failed";
148
- readonly HISTORY_NAVIGATION_FAILED: "History navigation failed";
149
- readonly URL_NAVIGATION_FAILED: "URL navigation failed";
150
- readonly SCROLL_FAILED: "Scroll operation failed";
151
- readonly SCROLL_OFFSET_FAILED: "Failed to scroll with offset";
152
- readonly PROPERTY_TAKE_FAILED: "Failed to take property from element";
153
- readonly PROPERTY_PUT_FAILED: "Failed to put property on element";
154
- readonly STYLE_ADD_FAILED: "Failed to add style to element";
155
- readonly OPERATION_FAILED: "Operation failed";
156
- readonly PARSE_FAILED: "Failed to parse input";
157
- readonly ARGUMENT_PARSE_FAILED: "Failed to parse arguments";
158
- readonly TARGET_RESOLUTION_FAILED: "Failed to resolve target element";
159
- readonly SOURCE_RESOLUTION_FAILED: "Failed to resolve source element";
160
- readonly RESOLUTION_FAILED: "Element resolution failed";
161
- readonly INVALID_CONTEXT_ELEMENT: "Invalid context element";
162
- readonly INVALID_CLASS_NAME: "Invalid class name: \"{0}\"";
163
- readonly INVALID_ATTRIBUTE_NAME: "Invalid attribute name: \"{0}\"";
164
- readonly INVALID_ELEMENT_REFERENCE: "Invalid element reference";
165
- readonly INVALID_POSITION: "Invalid position: \"{0}\"";
166
- readonly INVALID_PROPERTY: "Invalid property: \"{0}\"";
167
- readonly INVALID_PROPERTY_POSITION: "Invalid property position";
168
- readonly INVALID_SELECTOR: "Invalid selector: \"{0}\"";
169
- readonly INVALID_TARGET_TYPE: "Invalid target type";
170
- readonly INVALID_URL: "Invalid URL: \"{0}\"";
171
- readonly MISSING_URL: "Missing URL";
172
- readonly NO_ARGUMENTS: "No arguments provided";
173
- readonly ELEMENT_NOT_FOUND: "Element not found";
174
- readonly NO_TARGET_ELEMENT: "No target element found";
175
- readonly NO_TARGET_ELEMENTS: "No target elements found";
176
- readonly TARGET_NOT_FOUND: "Target not found: \"{0}\"";
177
- readonly NO_VALID_ATTRIBUTES: "No valid attributes provided";
178
- readonly NO_VALID_CLASSES: "No valid classes provided to {0}";
179
- readonly NO_VALID_CSS_PROPERTY: "No valid CSS property provided";
180
- readonly IF_CONTEXT_INVALID: "Invalid context for if directive";
181
- readonly ELSE_CONTEXT_INVALID: "Invalid context for else directive";
182
- readonly REPEAT_CONTEXT_INVALID: "Invalid context for repeat directive";
183
- readonly REPEAT_COLLECTION_INVALID: "Invalid collection for repeat directive";
184
- readonly UNSUPPORTED_CSS_PROPERTY: "Unsupported CSS property: \"{0}\"";
185
- readonly HISTORY_API_UNAVAILABLE: "History API is not available";
186
- };
187
- export declare const ErrorSuggestions: {
188
- readonly ELEMENT_NOT_FOUND: readonly ["Check if target selector is valid", "Ensure elements exist in DOM", "Verify element has correct ID or class"];
189
- readonly INVALID_SELECTOR: readonly ["Use valid CSS selector syntax like \"#id\", \".class\", or \"element\"", "Check CSS selector syntax", "Use document.querySelector() test"];
190
- readonly NO_TARGET: readonly ["Provide a valid target element", "Check if element exists", "Verify selector matches an element"];
191
- readonly INVALID_CLASS: readonly ["Use valid CSS class names", "Check for special characters", "Class names must start with letter, underscore, or hyphen"];
192
- readonly INVALID_ATTRIBUTE: readonly ["Use valid HTML attribute names", "Check for special characters", "Attribute names must not contain spaces"];
193
- readonly NO_VALID_VALUES: readonly ["Provide valid class names or attributes", "Check input syntax", "Ensure values are not empty"];
194
- readonly CONTEXT_INVALID: readonly ["Check if context element exists", "Verify context is properly initialized", "Ensure \"me\" reference is valid"];
195
- readonly NAVIGATION_ERROR: readonly ["Check if URL is valid and accessible", "Verify browser supports requested navigation", "Ensure History API is available"];
196
- readonly EXECUTION_FAILED: readonly ["Check if element exists", "Verify element is not null", "Ensure element is still in DOM"];
197
- readonly VALIDATION_FAILED: readonly ["Check argument types and syntax", "Ensure arguments match expected types", "Verify required arguments are provided"];
198
- readonly PARTIAL_LAYOUT: readonly ["Remove layout elements (html, body, head) from partial response", "Return only content fragments, not full page HTML", "Check server endpoint is returning partial content"];
199
- readonly PARTIAL_SEMANTIC: readonly ["Check if page already has this semantic landmark", "Consider if landmark is needed in partial or should be static", "Review partial content for duplicate header/footer/main/nav/aside"];
200
- };
201
- export declare function createError(errorCode: string, customMessage?: string, placeholders?: (string | number)[], suggestions?: string[]): ValidationError;
202
- export declare function getSuggestions(errorCode: string): readonly string[];
203
- export declare function wrapError(code: string, message: string, cause: Error | ExecutionError, context?: ExecutionErrorContext): ExecutionError;
204
- export declare function isExecutionError(error: unknown): error is ExecutionError;
205
- export declare function getErrorChain(error: ExecutionError | Error, maxDepth?: number): Array<ExecutionError | Error>;
206
- export declare function formatErrorChain(error: ExecutionError | Error): string;
207
- //# sourceMappingURL=error-codes.d.ts.map
@@ -1,155 +0,0 @@
1
- import type { RuntimeValidator } from '../validation/lightweight-validators';
2
- import type { ValidationResult, EvaluationResult, LLMDocumentation, ExecutionContext, TypedExpressionContext, EvaluationType } from './base-types';
3
- export type { ValidationResult, EvaluationResult, LLMDocumentation, ExecutionContext, TypedExecutionContext, TypedExpressionContext, EvaluationType, HyperScriptValueType, } from './base-types';
4
- export type ExpressionCategory = 'Reference' | 'Logical' | 'Conversion' | 'Positional' | 'Property' | 'Special' | 'Template';
5
- export interface TypedError {
6
- name: string;
7
- message: string;
8
- code: string;
9
- suggestions: string[];
10
- }
11
- export interface BaseTypedExpression<T> {
12
- readonly name: string;
13
- readonly category: string;
14
- readonly syntax: string;
15
- readonly outputType: string;
16
- readonly inputSchema: RuntimeValidator<unknown>;
17
- readonly metadata: ExpressionMetadata;
18
- readonly documentation?: LLMDocumentation;
19
- evaluate(context: TypedExpressionContext, input: unknown): Promise<EvaluationResult<T>>;
20
- validate(input: unknown): ValidationResult;
21
- }
22
- export interface ExpressionEvaluation {
23
- expressionName: string;
24
- category: ExpressionCategory;
25
- input: unknown;
26
- output: unknown;
27
- timestamp: number;
28
- duration: number;
29
- success: boolean;
30
- error?: Error;
31
- }
32
- export interface ExpressionMetadata {
33
- category: ExpressionCategory;
34
- complexity: 'simple' | 'medium' | 'complex';
35
- sideEffects?: string[];
36
- dependencies?: string[];
37
- returnTypes?: EvaluationType[];
38
- examples?: {
39
- input: string;
40
- description: string;
41
- expectedOutput: unknown;
42
- context?: Partial<ExecutionContext>;
43
- }[];
44
- relatedExpressions?: string[];
45
- performance?: {
46
- averageTime: number;
47
- complexity: 'O(1)' | 'O(n)' | 'O(log n)' | 'O(n²)';
48
- };
49
- }
50
- export interface TypedExpressionImplementation<TInput = unknown, TOutput = unknown, TContext extends TypedExpressionContext = TypedExpressionContext> {
51
- readonly name: string;
52
- readonly category: ExpressionCategory;
53
- readonly syntax: string;
54
- readonly description: string;
55
- readonly inputSchema: RuntimeValidator<TInput>;
56
- readonly outputType: EvaluationType;
57
- readonly metadata: ExpressionMetadata;
58
- readonly documentation?: LLMDocumentation;
59
- evaluate(context: TContext, input: TInput): Promise<EvaluationResult<TOutput>>;
60
- validate(input: unknown): ValidationResult;
61
- parse?(expressionString: string): Promise<EvaluationResult<TInput>>;
62
- canHandle?(input: unknown): boolean;
63
- }
64
- export interface ExpressionValidationError {
65
- type: 'type-mismatch' | 'missing-argument' | 'invalid-syntax' | 'runtime-error' | 'syntax-error' | 'security-warning';
66
- message: string;
67
- position?: {
68
- line: number;
69
- column: number;
70
- source: string;
71
- start?: number;
72
- end?: number;
73
- suggestions: [];
74
- };
75
- suggestions: string[];
76
- code?: string;
77
- severity: 'error' | 'warning' | 'info';
78
- }
79
- export interface ExpressionValidationResult extends ValidationResult<unknown> {
80
- errors: ExpressionValidationError[];
81
- warnings?: ExpressionValidationError[];
82
- suggestions: string[];
83
- }
84
- export interface EnhancedExpressionRegistry {
85
- register<TInput, TOutput, TContext extends TypedExpressionContext>(expression: TypedExpressionImplementation<TInput, TOutput, TContext>): void;
86
- get(name: string): TypedExpressionImplementation | undefined;
87
- has(name: string): boolean;
88
- getExpressionNames(): string[];
89
- getByCategory(category: ExpressionCategory): TypedExpressionImplementation[];
90
- validateExpression(name: string, input: unknown): ExpressionValidationResult;
91
- getMetadata(name: string): ExpressionMetadata | undefined;
92
- findByReturnType(returnType: EvaluationType): TypedExpressionImplementation[];
93
- }
94
- export interface ExpressionEvaluationOptions {
95
- validationMode?: 'strict' | 'permissive';
96
- maxDepth?: number;
97
- timeout?: number;
98
- caching?: boolean;
99
- debugging?: boolean;
100
- }
101
- export interface ExpressionContextBridge {
102
- toTyped(context: ExecutionContext, options?: ExpressionEvaluationOptions): TypedExpressionContext;
103
- fromTyped(typedContext: TypedExpressionContext, originalContext: ExecutionContext): ExecutionContext;
104
- }
105
- export interface ExpressionFactory {
106
- createReferenceExpression<T = HTMLElement>(name: string, evaluator: (context: TypedExpressionContext, input: unknown) => Promise<T>): TypedExpressionImplementation;
107
- createLogicalExpression(name: string, evaluator: (context: TypedExpressionContext, left: unknown, right: unknown) => Promise<boolean>): TypedExpressionImplementation;
108
- createConversionExpression<TFrom, TTo>(name: string, fromType: EvaluationType, toType: EvaluationType, converter: (context: TypedExpressionContext, input: TFrom) => Promise<TTo>): TypedExpressionImplementation;
109
- }
110
- export interface ExpressionProfiler {
111
- startProfiling(expressionName: string, input: unknown): string;
112
- endProfiling(profilingId: string, result: EvaluationResult<unknown>): void;
113
- getStats(expressionName?: string): {
114
- totalEvaluations: number;
115
- averageTime: number;
116
- slowestEvaluation: number;
117
- fastestEvaluation: number;
118
- errorRate: number;
119
- };
120
- clearStats(): void;
121
- }
122
- export type ExpressionImplementationMap<T = TypedExpressionImplementation> = {
123
- [key: string]: T;
124
- };
125
- export type ExpressionCategoryMap = {
126
- [K in ExpressionCategory]: TypedExpressionImplementation[];
127
- };
128
- export interface ExpressionCache {
129
- get(key: string): EvaluationResult<unknown> | undefined;
130
- set(key: string, result: EvaluationResult<unknown>, ttl?: number): void;
131
- clear(): void;
132
- size(): number;
133
- }
134
- export interface ExpressionDebugger {
135
- enable(expressionNames: string[]): void;
136
- disable(): void;
137
- getLastEvaluation(): ExpressionEvaluation | undefined;
138
- getHistory(limit?: number): ExpressionEvaluation[];
139
- setBreakpoint(expressionName: string, condition?: (context: TypedExpressionContext) => boolean): void;
140
- }
141
- export declare const CommonInputSchemas: {
142
- readonly NoInput: RuntimeValidator<unknown>;
143
- readonly StringInput: RuntimeValidator<string>;
144
- readonly NumberInput: RuntimeValidator<number>;
145
- readonly BooleanInput: RuntimeValidator<boolean>;
146
- readonly ElementInput: RuntimeValidator<unknown>;
147
- readonly SelectorInput: RuntimeValidator<string>;
148
- readonly ComparisonInput: RuntimeValidator<{
149
- [x: string]: unknown;
150
- }>;
151
- readonly LogicalInput: RuntimeValidator<{
152
- [x: string]: unknown;
153
- }>;
154
- };
155
- //# sourceMappingURL=expression-types.d.ts.map