steel-frame 7.0.2 → 7.0.3

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 (590) hide show
  1. package/build/babel-plugin/css-transformer.js +4 -1
  2. package/package.json +1 -1
  3. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  4. package/.idea/modules.xml +0 -8
  5. package/.idea/prettier.xml +0 -7
  6. package/.idea/steel-frame.iml +0 -13
  7. package/.idea/vcs.xml +0 -6
  8. package/.prettierignore +0 -1
  9. package/.prettierrc +0 -21
  10. package/coverage/lcov-report/abort.ts.html +0 -580
  11. package/coverage/lcov-report/base.css +0 -224
  12. package/coverage/lcov-report/block-navigation.js +0 -87
  13. package/coverage/lcov-report/call.ts.html +0 -829
  14. package/coverage/lcov-report/css-transformer.ts.html +0 -1180
  15. package/coverage/lcov-report/expression.ts.html +0 -2347
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/field-reference.ts.html +0 -550
  18. package/coverage/lcov-report/index.html +0 -356
  19. package/coverage/lcov-report/index.ts.html +0 -286
  20. package/coverage/lcov-report/internal.ts.html +0 -946
  21. package/coverage/lcov-report/jsx-detect.ts.html +0 -127
  22. package/coverage/lcov-report/jsx.ts.html +0 -3550
  23. package/coverage/lcov-report/lib.ts.html +0 -1381
  24. package/coverage/lcov-report/mesh.ts.html +0 -5860
  25. package/coverage/lcov-report/operators.ts.html +0 -322
  26. package/coverage/lcov-report/order-check.ts.html +0 -805
  27. package/coverage/lcov-report/prettify.css +0 -1
  28. package/coverage/lcov-report/prettify.js +0 -2
  29. package/coverage/lcov-report/process-types.ts.html +0 -475
  30. package/coverage/lcov-report/router.ts.html +0 -292
  31. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  32. package/coverage/lcov-report/sorter.js +0 -210
  33. package/coverage/lcov-report/transformer.ts.html +0 -1951
  34. package/coverage/lcov-report/utils.ts.html +0 -139
  35. package/coverage/lcov.info +0 -5277
  36. package/jest.config.js +0 -18
  37. package/src/babel-plugin/abort.ts +0 -165
  38. package/src/babel-plugin/call.ts +0 -248
  39. package/src/babel-plugin/communication.ts +0 -13
  40. package/src/babel-plugin/css-transformer.ts +0 -365
  41. package/src/babel-plugin/expression.ts +0 -754
  42. package/src/babel-plugin/field-reference.ts +0 -155
  43. package/src/babel-plugin/index.ts +0 -67
  44. package/src/babel-plugin/internal.ts +0 -287
  45. package/src/babel-plugin/jsx-detect.ts +0 -14
  46. package/src/babel-plugin/jsx.ts +0 -1155
  47. package/src/babel-plugin/lib.ts +0 -432
  48. package/src/babel-plugin/mesh.ts +0 -1925
  49. package/src/babel-plugin/operators.ts +0 -79
  50. package/src/babel-plugin/order-check.ts +0 -240
  51. package/src/babel-plugin/process-types.ts +0 -130
  52. package/src/babel-plugin/router.ts +0 -69
  53. package/src/babel-plugin/transformer.ts +0 -622
  54. package/src/babel-plugin/utils.ts +0 -18
  55. package/src/cli/app-index/create-index.ts +0 -28
  56. package/src/cli/app-index/create-ssg-index.ts +0 -23
  57. package/src/cli/app-index/find-routes.ts +0 -63
  58. package/src/cli/lib/compile-lib.ts +0 -169
  59. package/src/cli/lib/fs.ts +0 -17
  60. package/src/cli/lib/process-args.ts +0 -99
  61. package/src/cli/lib/resolve.ts +0 -22
  62. package/src/cli/lib/watch-folder.ts +0 -22
  63. package/src/cli/lib/working-dirs.ts +0 -10
  64. package/src/cli/node-hooks/index.doc.vasille.js +0 -6
  65. package/src/cli/node-hooks/index.md.vasille.js +0 -6
  66. package/src/cli/node-hooks/index.vasille.js +0 -30
  67. package/src/cli/node-hooks/jsx.vasille.js +0 -80
  68. package/src/cli/proxy/dev-proxy.ts +0 -30
  69. package/src/cli/run.ts +0 -230
  70. package/src/cli/sf.ts +0 -2
  71. package/src/cli/vite-plugins/compress.ts +0 -16
  72. package/src/cli/vite-plugins/index.vasille.ts +0 -54
  73. package/src/cli/vite-plugins/jsx.ts +0 -33
  74. package/src/cli/vite-plugins/vasille-web.ts +0 -18
  75. package/src/export/index.ts +0 -483
  76. package/src/export/jsx-runtime.ts +0 -1
  77. package/test/bridge/array-item-set.js +0 -3
  78. package/test/bridge/array-item-set.ts +0 -4
  79. package/test/bridge/bind.js +0 -8
  80. package/test/bridge/bind.ts +0 -9
  81. package/test/bridge/bridge.test.ts +0 -74
  82. package/test/bridge/err-before-mount-arg.ts +0 -6
  83. package/test/bridge/err-bind-in-object.ts +0 -10
  84. package/test/bridge/err-field-renaming-2.ts +0 -5
  85. package/test/bridge/err-field-renaming.ts +0 -7
  86. package/test/bridge/err-non-reactive-module-var.ts +0 -1
  87. package/test/bridge/err-prop-not-reactive.ts +0 -3
  88. package/test/bridge/err-raw-no-args.ts +0 -4
  89. package/test/bridge/err-router-in-store-1.ts +0 -7
  90. package/test/bridge/err-router-in-store-2.ts +0 -9
  91. package/test/bridge/err-router-in-store-3.ts +0 -12
  92. package/test/bridge/err-router.ts +0 -5
  93. package/test/bridge/global-import.js +0 -13
  94. package/test/bridge/global-import.ts +0 -16
  95. package/test/bridge/module-level-reactivity.js +0 -11
  96. package/test/bridge/module-level-reactivity.ts +0 -18
  97. package/test/bridge/object-property-match.js +0 -5
  98. package/test/bridge/object-property-match.ts +0 -6
  99. package/test/bridge/router.js +0 -13
  100. package/test/bridge/router.ts +0 -17
  101. package/test/build/build.test.ts +0 -22
  102. package/test/build/ssg-no-extra-tags.js +0 -4
  103. package/test/build/ssg-no-extra-tags.tsx +0 -9
  104. package/test/build/ssg.js +0 -14
  105. package/test/build/ssg.tsx +0 -9
  106. package/test/call/call.test.ts +0 -26
  107. package/test/call/constant.js +0 -7
  108. package/test/call/constant.ts +0 -7
  109. package/test/call/css.js +0 -7
  110. package/test/call/css.ts +0 -11
  111. package/test/call/err-awaited-not-arr.ts +0 -5
  112. package/test/call/require-context.js +0 -9
  113. package/test/call/require-context.ts +0 -13
  114. package/test/call/string-literal.js +0 -7
  115. package/test/call/string-literal.ts +0 -6
  116. package/test/compose/component.js +0 -19
  117. package/test/compose/component.ts +0 -22
  118. package/test/compose/compose.js +0 -18
  119. package/test/compose/compose.test.ts +0 -38
  120. package/test/compose/compose.ts +0 -21
  121. package/test/compose/modal.js +0 -9
  122. package/test/compose/modal.ts +0 -13
  123. package/test/compose/model.js +0 -22
  124. package/test/compose/model.ts +0 -21
  125. package/test/compose/prompt.js +0 -20
  126. package/test/compose/prompt.ts +0 -25
  127. package/test/compose/screen.js +0 -15
  128. package/test/compose/screen.ts +0 -13
  129. package/test/compose/store.js +0 -8
  130. package/test/compose/store.ts +0 -9
  131. package/test/compose/view.js +0 -34
  132. package/test/compose/view.ts +0 -39
  133. package/test/css/autoremove-key.js +0 -11
  134. package/test/css/autoremove-key.tsx +0 -12
  135. package/test/css/computed-key.js +0 -9
  136. package/test/css/computed-key.ts +0 -12
  137. package/test/css/css.test.ts +0 -82
  138. package/test/css/err-arg-not-object.ts +0 -4
  139. package/test/css/err-arg-wrong-key.ts +0 -6
  140. package/test/css/err-arg-wrong-object.ts +0 -6
  141. package/test/css/err-arg-wrong-value.ts +0 -10
  142. package/test/css/err-array-spread-element.ts +0 -11
  143. package/test/css/err-incompatible-key.ts +0 -13
  144. package/test/css/err-media-not-object.ts +0 -12
  145. package/test/css/err-nested-media-queries.ts +0 -13
  146. package/test/css/err-nested-pseudos.ts +0 -13
  147. package/test/css/err-no-args.ts +0 -4
  148. package/test/css/err-object-method.ts +0 -11
  149. package/test/css/err-object-spread-element.ts +0 -12
  150. package/test/css/err-pseudo-not-object.ts +0 -12
  151. package/test/css/err-theme-not-string.ts +0 -11
  152. package/test/css/err-wrong-array-value.ts +0 -12
  153. package/test/css/err-wrong-value.ts +0 -12
  154. package/test/css/style.js +0 -13
  155. package/test/css/style.ts +0 -61
  156. package/test/dev/array-model.js +0 -5
  157. package/test/dev/array-model.ts +0 -5
  158. package/test/dev/awaited-2.js +0 -7
  159. package/test/dev/awaited-2.ts +0 -7
  160. package/test/dev/awaited.js +0 -7
  161. package/test/dev/awaited.ts +0 -7
  162. package/test/dev/bind-2.js +0 -6
  163. package/test/dev/bind-2.ts +0 -6
  164. package/test/dev/bind.js +0 -6
  165. package/test/dev/bind.ts +0 -6
  166. package/test/dev/calculate.js +0 -8
  167. package/test/dev/calculate.ts +0 -8
  168. package/test/dev/child.js +0 -16
  169. package/test/dev/child.tsx +0 -11
  170. package/test/dev/component.js +0 -5
  171. package/test/dev/component.ts +0 -5
  172. package/test/dev/custom-model.js +0 -6
  173. package/test/dev/custom-model.ts +0 -7
  174. package/test/dev/dev.test.ts +0 -106
  175. package/test/dev/ensure.js +0 -9
  176. package/test/dev/ensure.ts +0 -7
  177. package/test/dev/function-wrap.js +0 -59
  178. package/test/dev/function-wrap.ts +0 -43
  179. package/test/dev/map-model.js +0 -5
  180. package/test/dev/map-model.ts +0 -5
  181. package/test/dev/match.js +0 -11
  182. package/test/dev/module-level-reactivity.js +0 -6
  183. package/test/dev/module-level-reactivity.ts +0 -7
  184. package/test/dev/object.js +0 -8
  185. package/test/dev/object.ts +0 -8
  186. package/test/dev/page.js +0 -5
  187. package/test/dev/page.ts +0 -5
  188. package/test/dev/prompt.js +0 -13
  189. package/test/dev/prompt.tsx +0 -7
  190. package/test/dev/ref-no-args.js +0 -5
  191. package/test/dev/ref-no-args.ts +0 -5
  192. package/test/dev/ref.js +0 -5
  193. package/test/dev/ref.ts +0 -5
  194. package/test/dev/safe.js +0 -36
  195. package/test/dev/safe.tsx +0 -19
  196. package/test/dev/set-model.js +0 -5
  197. package/test/dev/set-model.ts +0 -5
  198. package/test/dev/set-value.js +0 -8
  199. package/test/dev/set-value.ts +0 -9
  200. package/test/dev/tag.js +0 -7
  201. package/test/dev/tag.tsx +0 -5
  202. package/test/dev/text-2.js +0 -6
  203. package/test/dev/text-2.tsx +0 -7
  204. package/test/dev/text.js +0 -5
  205. package/test/dev/text.tsx +0 -5
  206. package/test/dev/value-assignment.js +0 -30
  207. package/test/dev/value-assignment.ts +0 -24
  208. package/test/expression/check-expression.js +0 -58
  209. package/test/expression/check-expression.ts +0 -58
  210. package/test/expression/check-node.js +0 -12
  211. package/test/expression/check-node.ts +0 -10
  212. package/test/expression/check-statement.js +0 -45
  213. package/test/expression/check-statement.ts +0 -55
  214. package/test/expression/deep-reactive-object.js +0 -15
  215. package/test/expression/deep-reactive-object.ts +0 -16
  216. package/test/expression/dependency.js +0 -7
  217. package/test/expression/dependency.ts +0 -9
  218. package/test/expression/err-function-name.ts +0 -11
  219. package/test/expression/err-jsx-element.tsx +0 -9
  220. package/test/expression/err-jsx-fragment.tsx +0 -9
  221. package/test/expression/err-local-observable.ts +0 -12
  222. package/test/expression/err-nested-observable-in-object.ts +0 -6
  223. package/test/expression/err-nested-observable.ts +0 -11
  224. package/test/expression/err-nested-reactivity-2.ts +0 -7
  225. package/test/expression/err-nested-reactivity.ts +0 -11
  226. package/test/expression/err-restricted-hint.ts +0 -9
  227. package/test/expression/expression.test.ts +0 -74
  228. package/test/expression/mesh-lvalue.js +0 -21
  229. package/test/expression/mesh-lvalue.ts +0 -22
  230. package/test/expression/reactive-field-set.js +0 -23
  231. package/test/expression/reactive-field-set.ts +0 -28
  232. package/test/expression/stringify.js +0 -15
  233. package/test/expression/stringify.ts +0 -17
  234. package/test/extras/SlotTest.js +0 -75
  235. package/test/extras/SlotTest.tsx +0 -65
  236. package/test/extras/calculate.js +0 -25
  237. package/test/extras/calculate.tsx +0 -22
  238. package/test/extras/err.tsx +0 -23
  239. package/test/extras/extras.test.ts +0 -68
  240. package/test/extras/function-assigment-pattern.js +0 -15
  241. package/test/extras/function-assigment-pattern.ts +0 -11
  242. package/test/extras/set-model.js +0 -29
  243. package/test/extras/set-model.tsx +0 -26
  244. package/test/import/err-override-by-fn-expr.ts +0 -10
  245. package/test/import/global.js +0 -7
  246. package/test/import/global.ts +0 -6
  247. package/test/import/import.test.ts +0 -34
  248. package/test/import/override-by-function.js +0 -9
  249. package/test/import/override-by-function.ts +0 -10
  250. package/test/import/override-by-let.js +0 -6
  251. package/test/import/override-by-let.ts +0 -8
  252. package/test/import/override-global.js +0 -9
  253. package/test/import/override-global.ts +0 -10
  254. package/test/import/selective.js +0 -7
  255. package/test/import/selective.ts +0 -6
  256. package/test/jsx/attr.js +0 -13
  257. package/test/jsx/attr.tsx +0 -8
  258. package/test/jsx/bind.js +0 -41
  259. package/test/jsx/bind.tsx +0 -15
  260. package/test/jsx/callback.js +0 -9
  261. package/test/jsx/callback.tsx +0 -11
  262. package/test/jsx/children.js +0 -11
  263. package/test/jsx/children.tsx +0 -11
  264. package/test/jsx/class.js +0 -50
  265. package/test/jsx/class.tsx +0 -21
  266. package/test/jsx/conditional-binary.js +0 -16
  267. package/test/jsx/conditional-binary.tsx +0 -10
  268. package/test/jsx/conditional-mixed.js +0 -40
  269. package/test/jsx/conditional-mixed.tsx +0 -19
  270. package/test/jsx/conditional-ternary.js +0 -18
  271. package/test/jsx/conditional-ternary.tsx +0 -10
  272. package/test/jsx/conditions.js +0 -80
  273. package/test/jsx/conditions.tsx +0 -40
  274. package/test/jsx/default-prop.js +0 -8
  275. package/test/jsx/default-prop.tsx +0 -7
  276. package/test/jsx/err-conditions-else-if.tsx +0 -5
  277. package/test/jsx/err-conditions-else.tsx +0 -5
  278. package/test/jsx/err-conditions-spread.tsx +0 -5
  279. package/test/jsx/err-expected-event-handler.tsx +0 -6
  280. package/test/jsx/err-method-style-object.tsx +0 -6
  281. package/test/jsx/err-namespace-props.tsx +0 -10
  282. package/test/jsx/err-namespaced-name.tsx +0 -6
  283. package/test/jsx/err-spread-child.tsx +0 -5
  284. package/test/jsx/err-tag-spread-attr.tsx +0 -5
  285. package/test/jsx/err-wrong-namespace.tsx +0 -6
  286. package/test/jsx/events.js +0 -16
  287. package/test/jsx/events.tsx +0 -17
  288. package/test/jsx/fragment.js +0 -9
  289. package/test/jsx/fragment.tsx +0 -15
  290. package/test/jsx/jsx.test.ts +0 -120
  291. package/test/jsx/loop.js +0 -19
  292. package/test/jsx/loop.tsx +0 -21
  293. package/test/jsx/nested-slots.js +0 -39
  294. package/test/jsx/nested-slots.tsx +0 -36
  295. package/test/jsx/nested.js +0 -42
  296. package/test/jsx/nested.tsx +0 -35
  297. package/test/jsx/style.js +0 -36
  298. package/test/jsx/style.tsx +0 -20
  299. package/test/jsx-detect/has-jsx.js +0 -30
  300. package/test/jsx-detect/has-jsx.tsx +0 -26
  301. package/test/jsx-detect/jsx-detect.test.ts +0 -14
  302. package/test/jsx-detect/release-mode.js +0 -14
  303. package/test/jsx-detect/release-mode.tsx +0 -18
  304. package/test/lib/FileStructure.js +0 -7
  305. package/test/lib/FileStructure.ts +0 -21
  306. package/test/lib/err-arg-not-func.ts +0 -6
  307. package/test/lib/err-file-structure-class.ts +0 -11
  308. package/test/lib/err-file-structure-helper-before-export.ts +0 -5
  309. package/test/lib/err-file-structure-import-after.ts +0 -5
  310. package/test/lib/err-file-structure-stylesheet-not-last.ts +0 -7
  311. package/test/lib/err-incorrect-args-number.ts +0 -6
  312. package/test/lib/err-incorrect-props-number.ts +0 -8
  313. package/test/lib/err-malformed-component.ts +0 -7
  314. package/test/lib/lib.test.ts +0 -42
  315. package/test/mesh/class.js +0 -48
  316. package/test/mesh/class.ts +0 -55
  317. package/test/mesh/compose.js +0 -51
  318. package/test/mesh/compose.tsx +0 -35
  319. package/test/mesh/default-class.js +0 -8
  320. package/test/mesh/default-class.ts +0 -10
  321. package/test/mesh/default-expr.js +0 -2
  322. package/test/mesh/default-expr.ts +0 -3
  323. package/test/mesh/default-fn.js +0 -4
  324. package/test/mesh/default-fn.ts +0 -5
  325. package/test/mesh/double-mesh-bug.js +0 -17
  326. package/test/mesh/double-mesh-bug.tsx +0 -17
  327. package/test/mesh/err-array-model-const.ts +0 -5
  328. package/test/mesh/err-calculate-call.ts +0 -6
  329. package/test/mesh/err-class-name-expression.ts +0 -1
  330. package/test/mesh/err-class-name.ts +0 -1
  331. package/test/mesh/err-compose-arg-number.tsx +0 -13
  332. package/test/mesh/err-compose-nested-destruction.ts +0 -13
  333. package/test/mesh/err-computed-property-in-destruction.ts +0 -7
  334. package/test/mesh/err-function-name.ts +0 -3
  335. package/test/mesh/err-invalid-compose-call.ts +0 -4
  336. package/test/mesh/err-jsx-element.tsx +0 -5
  337. package/test/mesh/err-jsx-fragment.tsx +0 -5
  338. package/test/mesh/err-map-model-const.ts +0 -5
  339. package/test/mesh/err-param-name-destruction.ts +0 -1
  340. package/test/mesh/err-param-name-rest.ts +0 -1
  341. package/test/mesh/err-param-name-with-default-value.ts +0 -1
  342. package/test/mesh/err-param-name.ts +0 -1
  343. package/test/mesh/err-prompt.ts +0 -5
  344. package/test/mesh/err-run-on-destroy.ts +0 -9
  345. package/test/mesh/err-set-model-const.ts +0 -5
  346. package/test/mesh/err-store-jsx.tsx +0 -7
  347. package/test/mesh/err-store-not-reactive-value-2.ts +0 -11
  348. package/test/mesh/err-store-not-reactive-value.ts +0 -11
  349. package/test/mesh/err-store-reactive-value.ts +0 -7
  350. package/test/mesh/err-store-share-dependency.ts +0 -6
  351. package/test/mesh/err-style-hint.ts +0 -4
  352. package/test/mesh/mesh-expression.js +0 -56
  353. package/test/mesh/mesh-expression.ts +0 -57
  354. package/test/mesh/mesh-statement.js +0 -46
  355. package/test/mesh/mesh-statement.ts +0 -61
  356. package/test/mesh/mesh.test.ts +0 -170
  357. package/test/mesh/object-computed-property.js +0 -11
  358. package/test/mesh/object-computed-property.ts +0 -10
  359. package/test/mesh/object-read-property.js +0 -12
  360. package/test/mesh/object-read-property.ts +0 -15
  361. package/test/mesh/object-reference.js +0 -11
  362. package/test/mesh/object-reference.ts +0 -13
  363. package/test/mesh/reactive-field-copy.js +0 -14
  364. package/test/mesh/reactive-field-copy.ts +0 -24
  365. package/test/mesh/reactive-field-set.js +0 -15
  366. package/test/mesh/reactive-field-set.ts +0 -19
  367. package/test/mesh/reactive-object.js +0 -39
  368. package/test/mesh/reactive-object.tsx +0 -38
  369. package/test/mesh/run-on-destroy.js +0 -6
  370. package/test/mesh/run-on-destroy.ts +0 -7
  371. package/test/mesh/store.js +0 -79
  372. package/test/mesh/store.tsx +0 -83
  373. package/test/naming/err-component-not-uppercase.ts +0 -3
  374. package/test/naming/err-components-folder.ts +0 -3
  375. package/test/naming/err-export.ts +0 -3
  376. package/test/naming/err-modal-missing-suffix.ts +0 -3
  377. package/test/naming/err-modal-not-uppercase.ts +0 -3
  378. package/test/naming/err-modals-folder.ts +0 -3
  379. package/test/naming/err-model-missing-suffix.ts +0 -3
  380. package/test/naming/err-model-not-lowercase.ts +0 -3
  381. package/test/naming/err-models-folder.ts +0 -3
  382. package/test/naming/err-page.ts +0 -3
  383. package/test/naming/err-prompt-missing-prefix.ts +0 -3
  384. package/test/naming/err-prompts-folder.ts +0 -3
  385. package/test/naming/err-screen-missing-suffix.ts +0 -3
  386. package/test/naming/err-screens-folder.ts +0 -3
  387. package/test/naming/err-store-missing-suffix.ts +0 -3
  388. package/test/naming/err-store-not-lowercase.ts +0 -3
  389. package/test/naming/err-stores-folder.ts +0 -3
  390. package/test/naming/err-view-missing-suffix.ts +0 -3
  391. package/test/naming/err-view-not-uppercase.ts +0 -3
  392. package/test/naming/err-views-folder.ts +0 -3
  393. package/test/naming/naming.test.ts +0 -130
  394. package/test/pages/(dynamical).js +0 -6
  395. package/test/pages/(dynamical).tsx +0 -5
  396. package/test/pages/err-static.ts +0 -3
  397. package/test/pages/page/(number).js +0 -6
  398. package/test/pages/page/(number).tsx +0 -5
  399. package/test/pages/page/list.js +0 -4
  400. package/test/pages/page/list.tsx +0 -5
  401. package/test/pages/pages.test.ts +0 -26
  402. package/test/pages/static.js +0 -4
  403. package/test/pages/static.tsx +0 -5
  404. package/test/reference/awaited.js +0 -6
  405. package/test/reference/awaited.ts +0 -8
  406. package/test/reference/const.js +0 -4
  407. package/test/reference/const.ts +0 -5
  408. package/test/reference/expr-const-optional.js +0 -8
  409. package/test/reference/expr-const-optional.ts +0 -10
  410. package/test/reference/expr-const.js +0 -7
  411. package/test/reference/expr-const.ts +0 -9
  412. package/test/reference/expr-let.js +0 -10
  413. package/test/reference/expr-let.ts +0 -13
  414. package/test/reference/expr-meta.js +0 -15
  415. package/test/reference/expr-meta.ts +0 -17
  416. package/test/reference/let-update.js +0 -9
  417. package/test/reference/let-update.ts +0 -11
  418. package/test/reference/let.js +0 -5
  419. package/test/reference/let.ts +0 -6
  420. package/test/reference/local-reactive.js +0 -11
  421. package/test/reference/local-reactive.ts +0 -6
  422. package/test/reference/models.js +0 -24
  423. package/test/reference/models.ts +0 -27
  424. package/test/reference/reference.test.ts +0 -50
  425. package/test/reference/watch.js +0 -9
  426. package/test/reference/watch.ts +0 -11
  427. package/test/run-test.ts +0 -65
  428. package/test/shadow/Error.tsx +0 -3
  429. package/test/shadow/InterfaceTest.js +0 -4
  430. package/test/shadow/InterfaceTest.ts +0 -7
  431. package/test/shadow/LocalComponent.js +0 -38
  432. package/test/shadow/LocalComponent.tsx +0 -27
  433. package/test/shadow/MissingGlyph.tsx +0 -5
  434. package/test/shadow/MissingType.tsx +0 -4
  435. package/test/shadow/NoType.tsx +0 -3
  436. package/test/shadow/ParameterTest.js +0 -4
  437. package/test/shadow/ParameterTest.ts +0 -7
  438. package/test/shadow/PropsTest.js +0 -11
  439. package/test/shadow/PropsTest.ts +0 -13
  440. package/test/shadow/SlotTest.js +0 -44
  441. package/test/shadow/SlotTest.tsx +0 -22
  442. package/test/shadow/TypeTest.js +0 -4
  443. package/test/shadow/TypeTest.ts +0 -7
  444. package/test/shadow/UnionTest.js +0 -11
  445. package/test/shadow/UnionTest.ts +0 -14
  446. package/test/shadow/shadow.test.ts +0 -59
  447. package/test/transformer/no-import.js +0 -3
  448. package/test/transformer/no-import.ts +0 -3
  449. package/test/transformer/transformer.test.ts +0 -18
  450. package/test/transformer/web-global.js +0 -4
  451. package/test/transformer/web-global.ts +0 -5
  452. package/test/transformer/web-partial.js +0 -7
  453. package/test/transformer/web-partial.ts +0 -11
  454. package/test/tsconfig.json +0 -21
  455. package/test/tsconfig.tsbuildinfo +0 -1
  456. package/test/v5/array-index.js +0 -11
  457. package/test/v5/array-index.ts +0 -12
  458. package/test/v5/assign-operator.js +0 -11
  459. package/test/v5/assign-operator.ts +0 -18
  460. package/test/v5/context.js +0 -16
  461. package/test/v5/context.ts +0 -14
  462. package/test/v5/di.js +0 -10
  463. package/test/v5/di.tsx +0 -5
  464. package/test/v5/err-di-discover.ts +0 -6
  465. package/test/v5/err-receive-in-wrapper.ts +0 -5
  466. package/test/v5/spaces-in-jsx.js +0 -22
  467. package/test/v5/spaces-in-jsx.tsx +0 -14
  468. package/test/v5/v5.test.ts +0 -49
  469. package/test/v6/err-foreach-no-slot.tsx +0 -6
  470. package/test/v6/err-iterate-params-number.tsx +0 -5
  471. package/test/v6/err-model-view-no-slot.tsx +0 -6
  472. package/test/v6/err-reactive-destruction.tsx +0 -6
  473. package/test/v6/err-too-much-params.tsx +0 -6
  474. package/test/v6/if-test.js +0 -20
  475. package/test/v6/if-test.tsx +0 -14
  476. package/test/v6/iterate-destructure.js +0 -22
  477. package/test/v6/iterate-destructure.tsx +0 -20
  478. package/test/v6/iterate-map.js +0 -9
  479. package/test/v6/iterate-map.tsx +0 -12
  480. package/test/v6/iterate.js +0 -15
  481. package/test/v6/iterate.tsx +0 -19
  482. package/test/v6/model-view.js +0 -40
  483. package/test/v6/model-view.tsx +0 -46
  484. package/test/v6/v6.test.ts +0 -51
  485. package/test/v7/DependencyReexport.js +0 -2
  486. package/test/v7/DependencyReexport.tsx +0 -2
  487. package/test/v7/DependencyStart.js +0 -6
  488. package/test/v7/DependencyStart.tsx +0 -7
  489. package/test/v7/Hmr.js +0 -16
  490. package/test/v7/Hmr.ts +0 -8
  491. package/test/v7/abort-signal.js +0 -15
  492. package/test/v7/abort-signal.tsx +0 -15
  493. package/test/v7/array-model-map.js +0 -16
  494. package/test/v7/array-model-map.tsx +0 -11
  495. package/test/v7/async-composing.js +0 -8
  496. package/test/v7/async-composing.tsx +0 -11
  497. package/test/v7/auto-safe.js +0 -40
  498. package/test/v7/auto-safe.tsx +0 -24
  499. package/test/v7/await-with-dependency.js +0 -14
  500. package/test/v7/await-with-dependency.ts +0 -13
  501. package/test/v7/bypass-write-restriction.js +0 -8
  502. package/test/v7/bypass-write-restriction.ts +0 -10
  503. package/test/v7/callback.js +0 -27
  504. package/test/v7/callback.tsx +0 -30
  505. package/test/v7/debounce-dev.js +0 -8
  506. package/test/v7/debounce-dev.ts +0 -6
  507. package/test/v7/debounce.js +0 -5
  508. package/test/v7/debounce.ts +0 -6
  509. package/test/v7/declared-function.js +0 -11
  510. package/test/v7/declared-function.ts +0 -11
  511. package/test/v7/discard-awaited.js +0 -59
  512. package/test/v7/discard-awaited.ts +0 -60
  513. package/test/v7/discard-less-awaited.js +0 -45
  514. package/test/v7/discard-less-awaited.ts +0 -58
  515. package/test/v7/err-array-model-map.tsx +0 -11
  516. package/test/v7/err-autounwrap.tsx +0 -7
  517. package/test/v7/err-bypass-to-readonly.ts +0 -10
  518. package/test/v7/err-computed-property.ts +0 -6
  519. package/test/v7/err-debounce-wrong-args.ts +0 -5
  520. package/test/v7/err-declared-function-calculate.ts +0 -9
  521. package/test/v7/err-declared-function-call.ts +0 -12
  522. package/test/v7/err-declared-function-effect.ts +0 -14
  523. package/test/v7/err-declared-function.ts +0 -9
  524. package/test/v7/err-dependency-reexport-check.tsx +0 -6
  525. package/test/v7/err-destruction-extracts-reactive.ts +0 -7
  526. package/test/v7/err-destruction-missing-renaming.ts +0 -6
  527. package/test/v7/err-destruction-of-slot-props.tsx +0 -7
  528. package/test/v7/err-expr-has-double-breakpoint.ts +0 -7
  529. package/test/v7/err-field-ref-double-breakpoint.ts +0 -7
  530. package/test/v7/err-field-ref-has-double-breakpoint.ts +0 -7
  531. package/test/v7/err-field-ref-no-arg.ts +0 -5
  532. package/test/v7/err-field-ref-no-breakpoint.ts +0 -6
  533. package/test/v7/err-field-ref-v7-naming.tsx +0 -13
  534. package/test/v7/err-field-ref-with-private-name.ts +0 -11
  535. package/test/v7/err-function-expr-in-live-declaration.ts +0 -8
  536. package/test/v7/err-function-expr-in-state-declaration.ts +0 -8
  537. package/test/v7/err-function-expr-in-var-declaration.ts +0 -8
  538. package/test/v7/err-local-dependency-flow.tsx +0 -16
  539. package/test/v7/err-no-deps-in-effect.ts +0 -7
  540. package/test/v7/err-page-with-global-dependency.tsx +0 -8
  541. package/test/v7/err-reactivity-break-2.ts +0 -9
  542. package/test/v7/err-reactivity-break.ts +0 -10
  543. package/test/v7/err-rest-in-internal-slot.tsx +0 -7
  544. package/test/v7/err-rest-in-reactive-destruction.ts +0 -6
  545. package/test/v7/err-rest-in-ref.ts +0 -6
  546. package/test/v7/err-restricted-member-access.ts +0 -8
  547. package/test/v7/err-restricted-ref-in-object-2.ts +0 -6
  548. package/test/v7/err-restricted-ref-in-object.ts +0 -7
  549. package/test/v7/err-router-go-to.ts +0 -8
  550. package/test/v7/err-router-load.ts +0 -8
  551. package/test/v7/err-safe-init-no-args.ts +0 -6
  552. package/test/v7/err-static-live-value.ts +0 -5
  553. package/test/v7/err-wrong-path-in-jsx.tsx +0 -18
  554. package/test/v7/field-ref-v7-naming.js +0 -35
  555. package/test/v7/field-ref-v7-naming.tsx +0 -27
  556. package/test/v7/field-ref.js +0 -31
  557. package/test/v7/field-ref.tsx +0 -26
  558. package/test/v7/let-with-function-expression.js +0 -6
  559. package/test/v7/let-with-function-expression.ts +0 -7
  560. package/test/v7/object-destruction.js +0 -10
  561. package/test/v7/object-destruction.tsx +0 -8
  562. package/test/v7/provide-global-dependency.js +0 -4
  563. package/test/v7/provide-global-dependency.tsx +0 -5
  564. package/test/v7/router-path-in-jsx.js +0 -18
  565. package/test/v7/router-path-in-jsx.tsx +0 -18
  566. package/test/v7/router.js +0 -22
  567. package/test/v7/router.ts +0 -25
  568. package/test/v7/safe.js +0 -32
  569. package/test/v7/safe.tsx +0 -26
  570. package/test/v7/string-event.js +0 -9
  571. package/test/v7/string-event.tsx +0 -6
  572. package/test/v7/v7.test.ts +0 -326
  573. package/test/v7-new-naming/err-assign-to-readonly.ts +0 -7
  574. package/test/v7-new-naming/err-constructor-reactivity-missmatch.ts +0 -14
  575. package/test/v7-new-naming/err-let-debounced.ts +0 -6
  576. package/test/v7-new-naming/err-reactive-field-in-obj.ts +0 -12
  577. package/test/v7-new-naming/err-reactive-writable-in-obj.ts +0 -7
  578. package/test/v7-new-naming/err-readonly-explicit-ref.ts +0 -5
  579. package/test/v7-new-naming/err-readonly-field.ts +0 -6
  580. package/test/v7-new-naming/err-readonly-ref.ts +0 -5
  581. package/test/v7-new-naming/err-readonly-to-writable-prop.ts +0 -12
  582. package/test/v7-new-naming/err-readonly-to-writable-prop.tsx +0 -10
  583. package/test/v7-new-naming/err-writable-debounced.ts +0 -6
  584. package/test/v7-new-naming/err-writable-explicit-expr.ts +0 -6
  585. package/test/v7-new-naming/err-writable-expr.ts +0 -6
  586. package/test/v7-new-naming/naming.js +0 -26
  587. package/test/v7-new-naming/naming.tsx +0 -27
  588. package/test/v7-new-naming/v7-new-naming.test.ts +0 -70
  589. package/tsconfig.json +0 -19
  590. package/tsconfig.tsbuildinfo +0 -1
@@ -1,483 +0,0 @@
1
- import { AppNode, ArrayModel, MapModel, SetModel, ScreenProps } from "vasille";
2
- import type { VasilleSlot } from "vasille-web/jsx-runtime";
3
- import { WebRouter, WebTagOptions, CssStyleInjector, StyleSheetProps } from "vasille-web/types";
4
-
5
- export { safe } from "vasille";
6
- /** Set a handler for component errors */
7
- export declare function setErrorHandler(handler: (e: unknown) => void): void;
8
-
9
- declare interface Params {
10
- slot(...args: unknown[]): unknown;
11
- }
12
-
13
- export declare type Composed<In extends object, Out> = (
14
- props: (Required<In> extends Params ? In & { "vasille:slot"?: VasilleSlot } : In) & {
15
- callback?(data: Out): void;
16
- },
17
- ) => void;
18
- declare type ComposedNoCallback<In extends object, Out> = (
19
- props: Required<In> extends Params ? In & { "vasille:slot"?: VasilleSlot } : In,
20
- ) => void;
21
-
22
- /**
23
- * Composes a component (v3), which can receive external reactive values via props
24
- * @deprecated use `component` instead
25
- * */
26
- export declare function compose<In extends object, Out extends NonNullable<unknown>>(
27
- renderer: (input: In) => Out,
28
- ): Composed<In, Out>;
29
- /**
30
- * Composes a component (v3), which can receive external reactive values via props
31
- * @deprecated use `component` instead
32
- * */
33
- export declare function compose<In extends object>(renderer: (input: In) => void): ComposedNoCallback<In, void>;
34
-
35
- /** Composes a component (v4), which can receive external reactive values via props */
36
- export declare function component<In extends object, Out extends NonNullable<unknown>>(
37
- renderer: (input: In) => Out,
38
- ): Composed<In, Out>;
39
- /** Composes a component (v4), which can receive external reactive values via props */
40
- export declare function component<In extends object>(renderer: (input: In) => void): ComposedNoCallback<In, void>;
41
-
42
- /** Composes a view, which can receive external reactive values via props */
43
- export declare function view<Out extends NonNullable<unknown>>(
44
- renderer: () => Out,
45
- ): Composed<NonNullable<unknown>, Out>;
46
- /** Composes a view, which can receive external reactive values via props */
47
- export declare function view<In extends object, Out extends NonNullable<unknown>>(
48
- renderer: (input: In) => Out,
49
- ): Composed<In, Out>;
50
- /** Composes a view, which can receive external reactive values via props */
51
- export declare function view(renderer: () => void): ComposedNoCallback<NonNullable<unknown>, void>;
52
- /** Composes a view, which can receive external reactive values via props */
53
- export declare function view<In extends object>(renderer: (input: In) => void): ComposedNoCallback<In, void>;
54
-
55
- /** A Vasille.JS App screen */
56
- type Screen<Route extends string> = (input: ScreenProps<Route>) => Promise<void>;
57
-
58
- /**
59
- * Composes a screen, the router navigates between screens
60
- * @deprecated use `page` instead
61
- * */
62
- export declare function screen<Route extends string>(renderer: Screen<Route>): Screen<Route>;
63
-
64
- /** Composes a page, the file-based router navigates between pages (used for tests only) */
65
- export declare function page<Route extends string>(renderer: Screen<Route>): Screen<Route>;
66
-
67
- /**
68
- * Returns the raw value of the expression
69
- * @deprecated use `unwrap` instead
70
- * */
71
- export declare function raw<T>(v: T): T;
72
-
73
- /** Unwrap the expression */
74
- export declare function unwrap<T>(v: T): T;
75
-
76
- /**
77
- * Pack value into a reactive reference
78
- * @deprecated use `state` instead
79
- * */
80
- export declare function ref<T>(v: T): T;
81
- /**
82
- * Pack value into a reactive reference
83
- * @deprecated use `state` instead
84
- * */
85
- export declare function ref<T>(): T | undefined;
86
-
87
- /** Reactive value constructor */
88
- export declare function state<T>(v: T): T;
89
- /** Reactive value constructor */
90
- export declare function state<T>(): T | undefined;
91
-
92
- /** Pack value into a reactive reference, returns undefined when initialization fails */
93
- export declare function safeState<T>(v: T): T | undefined;
94
-
95
- /** Debounce updates signals of a reactive reference/expression */
96
- export declare function debounced<T>(v: T, delay: number): T;
97
-
98
- /** Returns a reactive reference to the object field */
99
- export declare function field<T>(v: T): T;
100
-
101
- /**
102
- * Returns a reactive-computed form of expression value
103
- * @deprecated use `live` instead
104
- * */
105
- export declare function bind<T>(v: T): T;
106
-
107
- /** Returns a reactive-computed form of expression value */
108
- export declare function live<T>(v: T): T;
109
-
110
- /** Returns a reactive-computed form of expression value, returns undefined when initialization fails */
111
- export declare function safeLive<T>(v: T): T | undefined;
112
-
113
- /**
114
- * Returns a reactive-computed form of returned value
115
- * @deprecated use `live` instead
116
- * */
117
- export declare function calculate<T>(fn: () => T): T;
118
-
119
- /**
120
- * Runs the function each time when a dependency is changed
121
- * @deprecated use `effect` instead
122
- * */
123
- export declare function watch(f: () => void): void;
124
-
125
- /** Runs the function each time when a dependency is changed */
126
- export declare function effect(f: () => void): void;
127
-
128
- /**
129
- * Bypass write restriction, update a reactive state in effects
130
- * @deprecated report cases when you need it, we will fix
131
- * */
132
- export declare function bypassWriteRestriction<T>(reactive: T, value: T): T;
133
-
134
- /** Returns an array model of the array */
135
- export declare function arrayModel<T>(v?: T[]): ArrayModel<T>;
136
-
137
- /** Returns a set model of array values */
138
- export declare function setModel<T>(v?: T[]): SetModel<T>;
139
-
140
- /** Returns a map model of map data */
141
- export declare function mapModel<K, T>(v?: [K, T][]): MapModel<K, T>;
142
-
143
- /** Awaits async data in a sync component */
144
- export declare function awaited<T>(target: (signal?: AbortSignal) => Promise<T>): [unknown, T | undefined];
145
-
146
- /** Returns an abort signal to cancel requests/timers when context is destroyed */
147
- export declare function abortSignal(): AbortSignal | undefined;
148
-
149
- /** Initialize a value, return undefined when fails */
150
- export declare function safeInit<T>(value: T): T | undefined;
151
-
152
- /** Mounts a slot parameter of the component */
153
- export declare function Slot(options: { model?: () => void; slot?: () => void }): void;
154
- /** Mounts a slot parameter of the component */
155
- export declare function Slot<Props extends object>(
156
- options: {
157
- model?: (props: Props) => void;
158
- slot?: () => void;
159
- "vasille:slot"?: VasilleSlot;
160
- } & Props,
161
- ): void;
162
-
163
- /** Renders content conditionally */
164
- export declare function If<T>(props: {
165
- r_condition: T;
166
- slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
167
- "vasille:slot"?: VasilleSlot;
168
- }): void;
169
- /** Renders content conditionally */
170
- export declare function If(props: { r_condition: unknown; "vasille:slot"?: VasilleSlot }): void;
171
-
172
- /** @deprecated use `If` with `r_condition` instead */
173
- export declare function If<T>(props: {
174
- $condition: T;
175
- slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
176
- "vasille:slot"?: VasilleSlot;
177
- }): void;
178
- /** @deprecated use `If` with `r_condition` instead */
179
- export declare function If(props: { $condition: unknown; "vasille:slot"?: VasilleSlot }): void;
180
-
181
- /** Renders content conditionally, use strict after `<If/>` */
182
- export declare function ElseIf<T>(props: {
183
- r_condition: T;
184
- slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
185
- "vasille:slot"?: VasilleSlot;
186
- }): void;
187
- /** Renders content conditionally, use strict after `<If/>` */
188
- export declare function ElseIf(props: { r_condition: unknown; "vasille:slot"?: VasilleSlot }): void;
189
-
190
- /** @deprecated use `ElseIf` with `r_condition` instead */
191
- export declare function ElseIf<T>(props: {
192
- $condition: T;
193
- slot?: (value: Exclude<T, false | 0 | "" | null | undefined>) => void;
194
- "vasille:slot"?: VasilleSlot;
195
- }): void;
196
- /** @deprecated use `ElseIf` with `r_condition` instead */
197
- export declare function ElseIf(props: { $condition: unknown; "vasille:slot"?: VasilleSlot }): void;
198
-
199
- /** Renders content conditionally, use strict after `<If/>` or `<ElseIf/>` */
200
- export declare function Else(props: { slot?: () => void; "vasille:slot"?: VasilleSlot }): void;
201
-
202
- /** Renders content several times using a model (array, map or set) */
203
- export declare function For<T>(props: {
204
- of: ReadonlyArray<T>;
205
- slot?: (value: T) => void;
206
- "vasille:slot"?: VasilleSlot;
207
- }): void;
208
- export declare function For<T>(props: {
209
- of: ReadonlySet<T>;
210
- slot?: (value: T) => void;
211
- "vasille:slot"?: VasilleSlot;
212
- }): void;
213
- export declare function For<K, T>(props: {
214
- of: ReadonlyMap<K, T>;
215
- slot?: (value: T, index: K) => void;
216
- "vasille:slot"?: VasilleSlot;
217
- }): void;
218
-
219
- /** Renders content of an `array`, updates are tracked via a diff algorithm */
220
- export declare function ArrayView<T>(props: {
221
- r_of: ReadonlyArray<T>;
222
- key: (v: T) => string | number;
223
- slot: (r_value: T, r_index: number) => void;
224
- }): void;
225
-
226
- /** @deprecated use `ArrayView` instead */
227
- export declare function ArrayView<T>(props: {
228
- $of: ReadonlyArray<T>;
229
- key: (v: T) => string | number;
230
- slot: (r_value: T, r_index: number) => void;
231
- }): void;
232
-
233
- /** Renders content of an `array model`, which can be updated via `push`, `pull`, ... */
234
- export declare function ArrayModelView<T>(props: {
235
- of: ReadonlyArray<T>;
236
- slot: (value: T, r_index: number) => void;
237
- }): void;
238
-
239
- /** Renders content of a `map model`, which can be updated via `set`, `delete`, ... */
240
- export declare function MapModelView<K, T>(props: { of: ReadonlyMap<K, T>; slot: (r_value: T, key: K) => void }): void;
241
-
242
- /** Renders content of a `set model`, which can be updated via `add`, `delete`, ... */
243
- export declare function SetModelView<T>(props: { of: ReadonlySet<T>; slot: (value: T) => void }): void;
244
-
245
- /** Will be translated to for (let value of value) { slot(item) } */
246
- export declare function Iterate<
247
- T extends { [Symbol.iterator](): IteratorObject<unknown, unknown, unknown> },
248
- K = T extends { [Symbol.iterator](): IteratorObject<infer R, unknown, unknown> } ? R : never,
249
- >(props: { value: T; slot: (item: K) => void }): void;
250
-
251
- /** Will be translated to value.forEach(slot) */
252
- export declare function ForEach<T>(props: {
253
- value: ReadonlyArray<T>;
254
- slot: (item: T, index: number, value: T[]) => void;
255
- }): void;
256
- export declare function ForEach<T>(props: {
257
- value: ReadonlySet<T>;
258
- slot: (item: T, key: T, set: ReadonlySet<T>) => void;
259
- }): void;
260
- export declare function ForEach<K, T>(props: {
261
- value: ReadonlyMap<K, T>;
262
- slot: (item: T, key: K, map: ReadonlyMap<K, T>) => void;
263
- }): void;
264
-
265
- /** Renders content in a non-blocking way via queue */
266
- export declare function QueuedRender(props: {
267
- priority?: "high" | "low";
268
- callback?(): void;
269
- "vasille:slot": VasilleSlot;
270
- }): void;
271
-
272
- /** Refresh the content each time, when the reactive model is updated */
273
- export declare function Watch<T>(props: { r_model: T; slot?: (value: T) => void; "vasille:slot"?: VasilleSlot }): void;
274
- /** @deprecated use `Watch` with `r_model` instead */
275
- export declare function Watch<T>(props: { $model: T; slot?: (value: T) => void; "vasille:slot"?: VasilleSlot }): void;
276
-
277
- /** Render content after a while */
278
- export declare function Delay(props: { time?: number; slot?: () => void; "vasille:slot"?: VasilleSlot }): void;
279
-
280
- /** Keep DOM alive for `r_time` ms after destruction, use `trigger` to run some code when timer starts */
281
- export declare function Zombie(props: { trigger?: () => void; r_time: number; "vasille:slot"?: VasilleSlot }): void;
282
-
283
- type ReadonlyState<T> =
284
- T extends Map<infer K, infer V>
285
- ? ReadonlyMap<K, V>
286
- : T extends Set<infer V>
287
- ? ReadonlySet<V>
288
- : T extends Array<infer V>
289
- ? ReadonlyArray<V>
290
- : T extends object
291
- ? { readonly [K in keyof T]: T[K] }
292
- : T;
293
-
294
- /** Stores a singleton state to memory */
295
- export declare function store<Return extends object>(fn: () => Return): ReadonlyState<Return>;
296
-
297
- /** Represent an data model constructor */
298
- export declare class Model<In, Out> {}
299
-
300
- /** Creates a model (state) constructor */
301
- export declare function model<Input extends object, Return extends object>(
302
- fn: (input: Input) => Return,
303
- ): Model<Input, Return>;
304
-
305
- /** Creates a model (state) instance */
306
- export declare function createModel<Input extends object, Return extends object>(
307
- model: Model<Input, Return>,
308
- data: Input,
309
- ): Return;
310
-
311
- /** Applies the value to the theme `name` */
312
- export declare function theme<T>(name: string, value: T): T;
313
- /** Applies the value to the dark theme */
314
- export declare function dark<T>(value: T): T;
315
- /** Applies the value to the light theme */
316
- export declare function light<T>(value: T): T;
317
- /** Applies the value to mobile devices */
318
- export declare function mobile<T>(value: T): T;
319
- /** Applies the value to tablet devices */
320
- export declare function tablet<T>(value: T): T;
321
- /** Applies the value to laptop devices */
322
- export declare function laptop<T>(value: T): T;
323
- /** Applies the value when the user prefers the dark theme */
324
- export declare function prefersDark<T>(value: T): T;
325
- /** Applies the value when the user prefers the light theme */
326
- export declare function prefersLight<T>(value: T): T;
327
- /** `dark` + `prefersDark` */
328
- export declare function allDark<T>(value: T): T;
329
- /** `light` + `prefersLight` */
330
- export declare function allLight<T>(value: T): T;
331
-
332
- export { setMobileMaxWidth, setTabletMaxWidth, setLaptopMaxWidth } from "vasille-web";
333
-
334
- /** Creates a local style sheet */
335
- export declare const styleSheet: <
336
- T extends {
337
- [className: string]: {
338
- [media: `@${string}`]: {
339
- [state: `:${string}`]: StyleSheetProps;
340
- } & StyleSheetProps;
341
- [state: `:${string}`]: StyleSheetProps;
342
- } & StyleSheetProps;
343
- },
344
- >(
345
- input: T,
346
- ) => { [K in keyof T]: CssStyleInjector };
347
-
348
- /** Mounts a Vasille.JS component to a page */
349
- export declare function mount<T>(
350
- element: Element,
351
- component: (props: T) => void,
352
- props: T,
353
- ): AppNode<Node, Element, WebTagOptions>;
354
-
355
- interface RouterInitialization<Routes extends string> {
356
- routes: {
357
- [K in Routes]: {
358
- screen: Screen<K>;
359
- minAccessLevel?: number;
360
- };
361
- };
362
- getAccessLevel?(): Promise<number>;
363
- fallbackScreen?(arg: { cause: "not-found" | "no-access" }): void;
364
- errorScreen?(data: { error: unknown }): void;
365
- loadingScreen?(props: object): void;
366
- loadingOverlay?(props: object): void;
367
- }
368
-
369
- /**
370
- * Starts a route app
371
- * @deprecated user `src/pages` folder instead
372
- * */
373
- export declare function routerApp<Routes extends string>(
374
- init: RouterInitialization<Routes>,
375
- element?: Element,
376
- ): AppNode<Node, Element, WebTagOptions>;
377
-
378
- /** Run a function before the component mount */
379
- export declare function beforeMount(fn: () => void): void;
380
- export declare function beforeMount(fn: () => Promise<void>): void;
381
-
382
- /** Run a function after the component mount */
383
- export declare function afterMount(fn: () => void): void;
384
- export declare function afterMount(fn: () => Promise<void>): void;
385
-
386
- /** Run a function before the component destruction */
387
- export declare function beforeDestroy(fn: () => void): void;
388
-
389
- /** Returns the current used router */
390
- export declare function router(): WebRouter<string> | undefined;
391
-
392
- /** Composes a modal window (v4+) */
393
- export declare function modal<T extends object>(modal: (input: T) => void): (input: T) => void;
394
-
395
- /** Describes properties of a prompt window */
396
- export interface PromptProps<T> {
397
- resolve(data: T): void;
398
- reject(err: unknown): void;
399
- }
400
-
401
- /** Represent an prompt constructor */
402
- export declare class Prompt<T, Input> {}
403
-
404
- /** Creates a prompt constructor */
405
- export declare function prompt<T, Input extends PromptProps<T> = PromptProps<T>>(
406
- modal: (input: Input) => void,
407
- ): Prompt<T, Input>;
408
-
409
- /** Shows a prompt on screen */
410
- export declare function showPrompt<T, Input extends PromptProps<T>>(
411
- prompt: Prompt<T, Input>,
412
- data: Omit<Input, keyof PromptProps<unknown>>,
413
- ): Promise<T>;
414
-
415
- /** Describes an injectable context value */
416
- export declare class SteelContext<Args extends unknown[], Value> {
417
- private fn: (...args: Args) => Value;
418
- }
419
-
420
- /** Create an injectable context */
421
- export declare function context<Value, Args extends unknown[] = never[]>(
422
- fn: (...args: Args) => Value,
423
- ): SteelContext<Args, Value>;
424
-
425
- /** Share a context to children components */
426
- export declare function share<Args extends unknown[], Value>(ctx: SteelContext<Args, Value>, ...args: Args): Value;
427
-
428
- /** Share a dependency */
429
- export declare function share<Class>(className: abstract new (...args: unknown[]) => Class, value: Class): Class;
430
-
431
- /** Share a setting */
432
- export declare function share(key: string, value: string): string;
433
-
434
- /** Receive a shared context */
435
- export declare function receive<Args extends unknown[], Value>(ctx: SteelContext<Args, Value>): Value;
436
-
437
- /** Receive a dependency */
438
- export declare function receive<Class>(className: abstract new (...args: unknown[]) => Class): Class;
439
-
440
- /** Receive a setting */
441
- export declare function receive(key: string): string;
442
-
443
- /** Receive an optional shared context */
444
- export declare function receiveOptional<Args extends unknown[], Value>(
445
- ctx: SteelContext<Args, Value>,
446
- ): Value | undefined;
447
-
448
- /** Receive an optional dependency */
449
- export declare function receiveOptional<Class>(
450
- className: abstract new (...args: unknown[]) => Class,
451
- ): Class | undefined;
452
-
453
- /** Receive an optional setting */
454
- export declare function receiveOptional(key: string): string | undefined;
455
-
456
- /** Create and share a context when it is missing */
457
- export declare function impute<Args extends unknown[], Value>(ctx: SteelContext<Args, Value>, ...args: Args): Value;
458
-
459
- /** Ensure a dependency presence in context */
460
- export declare function impute<Class>(className: abstract new (...args: unknown[]) => Class, value: () => Class): Class;
461
-
462
- /** Share a setting value when it is missing */
463
- export declare function impute(key: string, value: string): string;
464
-
465
- export type {
466
- WebComponent,
467
- WebComponentAdapter,
468
- WebComponentAttributes,
469
- WebComponentEventHandler,
470
- WebComponentProps,
471
- WebComponentEvents,
472
- WebTagOptions,
473
- AttrType,
474
- StyleType,
475
- WebRouter,
476
- ElementStyleProps,
477
- IdeSide,
478
- AppSide,
479
- SsgRouterMode,
480
- NavigationMode,
481
- ClassItem,
482
- WebRouterInitialization,
483
- } from "vasille-web/types";
@@ -1 +0,0 @@
1
- export { type JSX } from "vasille-web/jsx-runtime";
@@ -1,3 +0,0 @@
1
- const arr = [1, 2, 3];
2
- const index = 1;
3
- arr[index] = 3;
@@ -1,4 +0,0 @@
1
- const arr = [1, 2, 3];
2
- const index = 1;
3
-
4
- arr[index] = 3;
@@ -1,8 +0,0 @@
1
- import { compose, ref, bind } from "vasille-web";
2
- const C = compose(Vasille => {
3
- const $a = ref(1, Vasille);
4
- const $b = ref(2, Vasille);
5
- const $c = bind(Vasille, (Vasille_0, Vasille_1) => Vasille_0 + Vasille_1, [$a, $b]);
6
- const $d = $c;
7
- const $e = ref(3, Vasille);
8
- });
@@ -1,9 +0,0 @@
1
- import { compose, ref, bind } from "steel-frame";
2
-
3
- const C = compose(() => {
4
- let $a = ref(1);
5
- let $b = ref(2);
6
- const $c = bind($a + $b);
7
- const $d = bind($c);
8
- const $e = bind(3);
9
- });
@@ -1,74 +0,0 @@
1
- import { runTest, throwTest } from "../run-test.js";
2
- import { fileURLToPath } from "url";
3
- import { dirname } from "path";
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = dirname(__filename);
7
-
8
- it("router test", function () {
9
- runTest(__dirname, "router");
10
- });
11
-
12
- it("bridge/router global import", function () {
13
- runTest(__dirname, "global-import");
14
- });
15
-
16
- it("bind test", function () {
17
- runTest(__dirname, "bind");
18
- });
19
-
20
- it("module level reactivity test", function () {
21
- runTest(__dirname, "module-level-reactivity");
22
- });
23
-
24
- it("object property key-value match test", function () {
25
- runTest(__dirname, "object-property-match");
26
- });
27
-
28
- it("array item set test", function () {
29
- runTest(__dirname, "array-item-set");
30
- });
31
-
32
- it("router outside of compose error", function () {
33
- throwTest(__dirname, "router", 'Usage of hint "router" is restricted here');
34
- });
35
-
36
- it("router in store error 1", function () {
37
- throwTest(__dirname, "router-in-store-1", "The router is not available in stores");
38
- });
39
-
40
- it("router in store error 2", function () {
41
- throwTest(__dirname, "router-in-store-2", "The router is not available in stores");
42
- });
43
-
44
- it("router in store error 3", function () {
45
- throwTest(__dirname, "router-in-store-3", "The router is not available in stores");
46
- });
47
-
48
- it("bind in object error", function () {
49
- throwTest(__dirname, "bind-in-object", 'Usage of hint "bind" is restricted here');
50
- });
51
-
52
- it("field renaming error", function () {
53
- throwTest(__dirname, "field-renaming", 'Property "$a" can not be renamed to "a": rename it to "$a"');
54
- });
55
-
56
- it("field renaming error 2", function () {
57
- throwTest(__dirname, "field-renaming-2", 'Property "a" can not be renamed to "$a": rename it to "a"');
58
- });
59
-
60
- it("property is not reactive error", function () {
61
- throwTest(__dirname, "prop-not-reactive", "Reactivity mismatch between field name and value");
62
- });
63
-
64
- it("raw without args error", function () {
65
- throwTest(__dirname, "raw-no-args", "Failed to unwrap value");
66
- });
67
-
68
- it("beforeMount arg error", function () {
69
- throwTest(__dirname, "before-mount-arg", "Incorrect hint argument");
70
- });
71
-
72
- it("non reactive module var name check error", function () {
73
- throwTest(__dirname, "non-reactive-module-var", "Unexpected reactivity mark in variable name");
74
- });
@@ -1,6 +0,0 @@
1
- import { beforeMount, compose } from "steel-frame";
2
-
3
- const C = compose(() => {
4
- // @ts-expect-error
5
- beforeMount();
6
- });
@@ -1,10 +0,0 @@
1
- import { bind, compose } from "steel-frame";
2
-
3
- const C = compose(() => {
4
- let $a = 1,
5
- $b = 2;
6
-
7
- const o = {
8
- $sum: bind($a + $b),
9
- };
10
- });
@@ -1,5 +0,0 @@
1
- const o6 = {
2
- a: 1,
3
- };
4
-
5
- const { a: $a } = o6;
@@ -1,7 +0,0 @@
1
- import { ref } from "steel-frame";
2
-
3
- const o = {
4
- $a: ref(1),
5
- };
6
-
7
- const { $a: a } = o;
@@ -1 +0,0 @@
1
- let $state = "test";
@@ -1,3 +0,0 @@
1
- const o7 = {
2
- $a: 1,
3
- };
@@ -1,4 +0,0 @@
1
- import { raw } from "steel-frame";
2
-
3
- // @ts-expect-error
4
- const a = raw();
@@ -1,7 +0,0 @@
1
- import { beforeMount, router, store } from "steel-frame";
2
-
3
- const sStore = store(() => {
4
- beforeMount(() => router());
5
-
6
- return {};
7
- });
@@ -1,9 +0,0 @@
1
- import { router, store } from "steel-frame";
2
-
3
- const sStore = store(() => {
4
- function goNext() {
5
- router()?.goTo("/x");
6
- }
7
-
8
- return {};
9
- });
@@ -1,12 +0,0 @@
1
- import { calculate, router, store } from "steel-frame";
2
-
3
- const sStore = store(() => {
4
- let $a = 2;
5
- const b = calculate(() => {
6
- router()?.goTo("/1");
7
-
8
- return $a + 1;
9
- });
10
-
11
- return {};
12
- });
@@ -1,5 +0,0 @@
1
- import { router } from "steel-frame";
2
-
3
- function x() {
4
- router()?.goTo("/x");
5
- }