@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,255 +0,0 @@
1
- 'use strict';
2
-
3
- const KEYWORDS = new Set([
4
- 'on',
5
- 'from',
6
- 'to',
7
- 'into',
8
- 'before',
9
- 'after',
10
- 'in',
11
- 'of',
12
- 'at',
13
- 'with',
14
- 'if',
15
- 'else',
16
- 'unless',
17
- 'end',
18
- 'then',
19
- 'and',
20
- 'or',
21
- 'not',
22
- 'repeat',
23
- 'times',
24
- 'for',
25
- 'each',
26
- 'while',
27
- 'until',
28
- 'toggle',
29
- 'add',
30
- 'remove',
31
- 'put',
32
- 'set',
33
- 'get',
34
- 'call',
35
- 'return',
36
- 'append',
37
- 'prepend',
38
- 'log',
39
- 'send',
40
- 'trigger',
41
- 'wait',
42
- 'settle',
43
- 'fetch',
44
- 'as',
45
- 'show',
46
- 'hide',
47
- 'take',
48
- 'increment',
49
- 'decrement',
50
- 'focus',
51
- 'blur',
52
- 'go',
53
- 'transition',
54
- 'over',
55
- 'the',
56
- 'a',
57
- 'an',
58
- 'my',
59
- 'its',
60
- 'me',
61
- 'it',
62
- 'you',
63
- 'first',
64
- 'last',
65
- 'next',
66
- 'previous',
67
- 'closest',
68
- 'parent',
69
- 'true',
70
- 'false',
71
- 'null',
72
- 'undefined',
73
- 'is',
74
- 'matches',
75
- 'contains',
76
- 'includes',
77
- 'exists',
78
- 'has',
79
- 'init',
80
- 'every',
81
- 'by',
82
- 'halt',
83
- 'via',
84
- 'values',
85
- 'default',
86
- 'event',
87
- ]);
88
- function tokenize(code) {
89
- const tokens = [];
90
- let pos = 0;
91
- while (pos < code.length) {
92
- if (/\s/.test(code[pos])) {
93
- pos++;
94
- continue;
95
- }
96
- if (code.slice(pos, pos + 2) === '--') {
97
- while (pos < code.length && code[pos] !== '\n')
98
- pos++;
99
- continue;
100
- }
101
- const start = pos;
102
- if (code[pos] === '<' && /[a-zA-Z]/.test(code[pos + 1] || '')) {
103
- pos++;
104
- while (pos < code.length && code[pos] !== '>')
105
- pos++;
106
- if (code[pos] === '>')
107
- pos++;
108
- const val = code.slice(start, pos);
109
- if (val.endsWith('/>') || val.endsWith('>')) {
110
- const normalized = val.slice(1).replace(/\/?>$/, '');
111
- tokens.push({ type: 'selector', value: normalized, pos: start });
112
- continue;
113
- }
114
- }
115
- if (code.slice(pos, pos + 2) === "'s" && !/[a-zA-Z]/.test(code[pos + 2] || '')) {
116
- tokens.push({ type: 'operator', value: "'s", pos: start });
117
- pos += 2;
118
- continue;
119
- }
120
- if (code[pos] === '"' || code[pos] === "'") {
121
- const quote = code[pos++];
122
- while (pos < code.length && code[pos] !== quote) {
123
- if (code[pos] === '\\')
124
- pos++;
125
- pos++;
126
- }
127
- pos++;
128
- tokens.push({ type: 'string', value: code.slice(start, pos), pos: start });
129
- continue;
130
- }
131
- if (/\d/.test(code[pos]) || (code[pos] === '-' && /\d/.test(code[pos + 1] || ''))) {
132
- if (code[pos] === '-')
133
- pos++;
134
- while (pos < code.length && /[\d.]/.test(code[pos]))
135
- pos++;
136
- if (code.slice(pos, pos + 2) === 'ms')
137
- pos += 2;
138
- else if (code[pos] === 's' && !/[a-zA-Z]/.test(code[pos + 1] || ''))
139
- pos++;
140
- else if (code.slice(pos, pos + 2) === 'px')
141
- pos += 2;
142
- tokens.push({ type: 'number', value: code.slice(start, pos), pos: start });
143
- continue;
144
- }
145
- if (code[pos] === ':') {
146
- pos++;
147
- while (pos < code.length && /[\w]/.test(code[pos]))
148
- pos++;
149
- tokens.push({ type: 'localVar', value: code.slice(start, pos), pos: start });
150
- continue;
151
- }
152
- if (code[pos] === '$') {
153
- pos++;
154
- while (pos < code.length && /[\w]/.test(code[pos]))
155
- pos++;
156
- tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
157
- continue;
158
- }
159
- if (code[pos] === '@') {
160
- pos++;
161
- while (pos < code.length && /[\w-]/.test(code[pos]))
162
- pos++;
163
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
164
- continue;
165
- }
166
- if (code[pos] === '#' || code[pos] === '.') {
167
- if (code[pos] === '.') {
168
- const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
169
- if (afterDot) {
170
- tokens.push({ type: 'symbol', value: '.', pos: start });
171
- pos++;
172
- continue;
173
- }
174
- }
175
- pos++;
176
- while (pos < code.length && /[\w-]/.test(code[pos]))
177
- pos++;
178
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
179
- continue;
180
- }
181
- if (code[pos] === '[') {
182
- let lookahead = pos + 1;
183
- while (lookahead < code.length && /\s/.test(code[lookahead]))
184
- lookahead++;
185
- const nextChar = code[lookahead] || '';
186
- const isArrayLiteral = /['"\d\[\]:\$\-]/.test(nextChar) || nextChar === '';
187
- if (isArrayLiteral) {
188
- tokens.push({ type: 'symbol', value: '[', pos: start });
189
- pos++;
190
- continue;
191
- }
192
- else {
193
- pos++;
194
- let depth = 1;
195
- while (pos < code.length && depth > 0) {
196
- if (code[pos] === '[')
197
- depth++;
198
- if (code[pos] === ']')
199
- depth--;
200
- pos++;
201
- }
202
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
203
- continue;
204
- }
205
- }
206
- if (code[pos] === ']') {
207
- tokens.push({ type: 'symbol', value: ']', pos: start });
208
- pos++;
209
- continue;
210
- }
211
- if (code.slice(pos, pos + 2) === "'s") {
212
- tokens.push({ type: 'operator', value: "'s", pos: start });
213
- pos += 2;
214
- continue;
215
- }
216
- const twoChar = code.slice(pos, pos + 2);
217
- if (['==', '!=', '<=', '>=', '&&', '||'].includes(twoChar)) {
218
- tokens.push({ type: 'operator', value: twoChar, pos: start });
219
- pos += 2;
220
- continue;
221
- }
222
- if (code[pos] === '*' && /[a-zA-Z]/.test(code[pos + 1] || '')) {
223
- pos++;
224
- while (pos < code.length && /[\w-]/.test(code[pos]))
225
- pos++;
226
- tokens.push({ type: 'styleProperty', value: code.slice(start, pos), pos: start });
227
- continue;
228
- }
229
- if ('+-*/%<>!'.includes(code[pos])) {
230
- tokens.push({ type: 'operator', value: code[pos], pos: start });
231
- pos++;
232
- continue;
233
- }
234
- if ('()[]{},.'.includes(code[pos])) {
235
- tokens.push({ type: 'symbol', value: code[pos], pos: start });
236
- pos++;
237
- continue;
238
- }
239
- if (/[a-zA-Z_]/.test(code[pos])) {
240
- while (pos < code.length && /[\w-]/.test(code[pos]))
241
- pos++;
242
- const value = code.slice(start, pos);
243
- const type = KEYWORDS.has(value.toLowerCase()) ? 'keyword' : 'identifier';
244
- tokens.push({ type, value, pos: start });
245
- continue;
246
- }
247
- pos++;
248
- }
249
- tokens.push({ type: 'eof', value: '', pos: code.length });
250
- return tokens;
251
- }
252
-
253
- exports.KEYWORDS = KEYWORDS;
254
- exports.tokenize = tokenize;
255
- //# sourceMappingURL=tokenizer.cjs.map
@@ -1,9 +0,0 @@
1
- export type TokenType = 'identifier' | 'number' | 'string' | 'operator' | 'styleProperty' | 'selector' | 'localVar' | 'globalVar' | 'symbol' | 'keyword' | 'eof';
2
- export interface Token {
3
- type: TokenType;
4
- value: string;
5
- pos: number;
6
- }
7
- export declare const KEYWORDS: Set<string>;
8
- export declare function tokenize(code: string): Token[];
9
- //# sourceMappingURL=tokenizer.d.ts.map
@@ -1,252 +0,0 @@
1
- const KEYWORDS = new Set([
2
- 'on',
3
- 'from',
4
- 'to',
5
- 'into',
6
- 'before',
7
- 'after',
8
- 'in',
9
- 'of',
10
- 'at',
11
- 'with',
12
- 'if',
13
- 'else',
14
- 'unless',
15
- 'end',
16
- 'then',
17
- 'and',
18
- 'or',
19
- 'not',
20
- 'repeat',
21
- 'times',
22
- 'for',
23
- 'each',
24
- 'while',
25
- 'until',
26
- 'toggle',
27
- 'add',
28
- 'remove',
29
- 'put',
30
- 'set',
31
- 'get',
32
- 'call',
33
- 'return',
34
- 'append',
35
- 'prepend',
36
- 'log',
37
- 'send',
38
- 'trigger',
39
- 'wait',
40
- 'settle',
41
- 'fetch',
42
- 'as',
43
- 'show',
44
- 'hide',
45
- 'take',
46
- 'increment',
47
- 'decrement',
48
- 'focus',
49
- 'blur',
50
- 'go',
51
- 'transition',
52
- 'over',
53
- 'the',
54
- 'a',
55
- 'an',
56
- 'my',
57
- 'its',
58
- 'me',
59
- 'it',
60
- 'you',
61
- 'first',
62
- 'last',
63
- 'next',
64
- 'previous',
65
- 'closest',
66
- 'parent',
67
- 'true',
68
- 'false',
69
- 'null',
70
- 'undefined',
71
- 'is',
72
- 'matches',
73
- 'contains',
74
- 'includes',
75
- 'exists',
76
- 'has',
77
- 'init',
78
- 'every',
79
- 'by',
80
- 'halt',
81
- 'via',
82
- 'values',
83
- 'default',
84
- 'event',
85
- ]);
86
- function tokenize(code) {
87
- const tokens = [];
88
- let pos = 0;
89
- while (pos < code.length) {
90
- if (/\s/.test(code[pos])) {
91
- pos++;
92
- continue;
93
- }
94
- if (code.slice(pos, pos + 2) === '--') {
95
- while (pos < code.length && code[pos] !== '\n')
96
- pos++;
97
- continue;
98
- }
99
- const start = pos;
100
- if (code[pos] === '<' && /[a-zA-Z]/.test(code[pos + 1] || '')) {
101
- pos++;
102
- while (pos < code.length && code[pos] !== '>')
103
- pos++;
104
- if (code[pos] === '>')
105
- pos++;
106
- const val = code.slice(start, pos);
107
- if (val.endsWith('/>') || val.endsWith('>')) {
108
- const normalized = val.slice(1).replace(/\/?>$/, '');
109
- tokens.push({ type: 'selector', value: normalized, pos: start });
110
- continue;
111
- }
112
- }
113
- if (code.slice(pos, pos + 2) === "'s" && !/[a-zA-Z]/.test(code[pos + 2] || '')) {
114
- tokens.push({ type: 'operator', value: "'s", pos: start });
115
- pos += 2;
116
- continue;
117
- }
118
- if (code[pos] === '"' || code[pos] === "'") {
119
- const quote = code[pos++];
120
- while (pos < code.length && code[pos] !== quote) {
121
- if (code[pos] === '\\')
122
- pos++;
123
- pos++;
124
- }
125
- pos++;
126
- tokens.push({ type: 'string', value: code.slice(start, pos), pos: start });
127
- continue;
128
- }
129
- if (/\d/.test(code[pos]) || (code[pos] === '-' && /\d/.test(code[pos + 1] || ''))) {
130
- if (code[pos] === '-')
131
- pos++;
132
- while (pos < code.length && /[\d.]/.test(code[pos]))
133
- pos++;
134
- if (code.slice(pos, pos + 2) === 'ms')
135
- pos += 2;
136
- else if (code[pos] === 's' && !/[a-zA-Z]/.test(code[pos + 1] || ''))
137
- pos++;
138
- else if (code.slice(pos, pos + 2) === 'px')
139
- pos += 2;
140
- tokens.push({ type: 'number', value: code.slice(start, pos), pos: start });
141
- continue;
142
- }
143
- if (code[pos] === ':') {
144
- pos++;
145
- while (pos < code.length && /[\w]/.test(code[pos]))
146
- pos++;
147
- tokens.push({ type: 'localVar', value: code.slice(start, pos), pos: start });
148
- continue;
149
- }
150
- if (code[pos] === '$') {
151
- pos++;
152
- while (pos < code.length && /[\w]/.test(code[pos]))
153
- pos++;
154
- tokens.push({ type: 'globalVar', value: code.slice(start, pos), pos: start });
155
- continue;
156
- }
157
- if (code[pos] === '@') {
158
- pos++;
159
- while (pos < code.length && /[\w-]/.test(code[pos]))
160
- pos++;
161
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
162
- continue;
163
- }
164
- if (code[pos] === '#' || code[pos] === '.') {
165
- if (code[pos] === '.') {
166
- const afterDot = code.slice(pos + 1).match(/^(once|prevent|stop|debounce|throttle)\b/i);
167
- if (afterDot) {
168
- tokens.push({ type: 'symbol', value: '.', pos: start });
169
- pos++;
170
- continue;
171
- }
172
- }
173
- pos++;
174
- while (pos < code.length && /[\w-]/.test(code[pos]))
175
- pos++;
176
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
177
- continue;
178
- }
179
- if (code[pos] === '[') {
180
- let lookahead = pos + 1;
181
- while (lookahead < code.length && /\s/.test(code[lookahead]))
182
- lookahead++;
183
- const nextChar = code[lookahead] || '';
184
- const isArrayLiteral = /['"\d\[\]:\$\-]/.test(nextChar) || nextChar === '';
185
- if (isArrayLiteral) {
186
- tokens.push({ type: 'symbol', value: '[', pos: start });
187
- pos++;
188
- continue;
189
- }
190
- else {
191
- pos++;
192
- let depth = 1;
193
- while (pos < code.length && depth > 0) {
194
- if (code[pos] === '[')
195
- depth++;
196
- if (code[pos] === ']')
197
- depth--;
198
- pos++;
199
- }
200
- tokens.push({ type: 'selector', value: code.slice(start, pos), pos: start });
201
- continue;
202
- }
203
- }
204
- if (code[pos] === ']') {
205
- tokens.push({ type: 'symbol', value: ']', pos: start });
206
- pos++;
207
- continue;
208
- }
209
- if (code.slice(pos, pos + 2) === "'s") {
210
- tokens.push({ type: 'operator', value: "'s", pos: start });
211
- pos += 2;
212
- continue;
213
- }
214
- const twoChar = code.slice(pos, pos + 2);
215
- if (['==', '!=', '<=', '>=', '&&', '||'].includes(twoChar)) {
216
- tokens.push({ type: 'operator', value: twoChar, pos: start });
217
- pos += 2;
218
- continue;
219
- }
220
- if (code[pos] === '*' && /[a-zA-Z]/.test(code[pos + 1] || '')) {
221
- pos++;
222
- while (pos < code.length && /[\w-]/.test(code[pos]))
223
- pos++;
224
- tokens.push({ type: 'styleProperty', value: code.slice(start, pos), pos: start });
225
- continue;
226
- }
227
- if ('+-*/%<>!'.includes(code[pos])) {
228
- tokens.push({ type: 'operator', value: code[pos], pos: start });
229
- pos++;
230
- continue;
231
- }
232
- if ('()[]{},.'.includes(code[pos])) {
233
- tokens.push({ type: 'symbol', value: code[pos], pos: start });
234
- pos++;
235
- continue;
236
- }
237
- if (/[a-zA-Z_]/.test(code[pos])) {
238
- while (pos < code.length && /[\w-]/.test(code[pos]))
239
- pos++;
240
- const value = code.slice(start, pos);
241
- const type = KEYWORDS.has(value.toLowerCase()) ? 'keyword' : 'identifier';
242
- tokens.push({ type, value, pos: start });
243
- continue;
244
- }
245
- pos++;
246
- }
247
- tokens.push({ type: 'eof', value: '', pos: code.length });
248
- return tokens;
249
- }
250
-
251
- export { KEYWORDS, tokenize };
252
- //# sourceMappingURL=tokenizer.mjs.map