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.
- package/build/babel-plugin/css-transformer.js +4 -1
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -7
- package/.idea/steel-frame.iml +0 -13
- package/.idea/vcs.xml +0 -6
- package/.prettierignore +0 -1
- package/.prettierrc +0 -21
- package/coverage/lcov-report/abort.ts.html +0 -580
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/call.ts.html +0 -829
- package/coverage/lcov-report/css-transformer.ts.html +0 -1180
- package/coverage/lcov-report/expression.ts.html +0 -2347
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/field-reference.ts.html +0 -550
- package/coverage/lcov-report/index.html +0 -356
- package/coverage/lcov-report/index.ts.html +0 -286
- package/coverage/lcov-report/internal.ts.html +0 -946
- package/coverage/lcov-report/jsx-detect.ts.html +0 -127
- package/coverage/lcov-report/jsx.ts.html +0 -3550
- package/coverage/lcov-report/lib.ts.html +0 -1381
- package/coverage/lcov-report/mesh.ts.html +0 -5860
- package/coverage/lcov-report/operators.ts.html +0 -322
- package/coverage/lcov-report/order-check.ts.html +0 -805
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/process-types.ts.html +0 -475
- package/coverage/lcov-report/router.ts.html +0 -292
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/transformer.ts.html +0 -1951
- package/coverage/lcov-report/utils.ts.html +0 -139
- package/coverage/lcov.info +0 -5277
- package/jest.config.js +0 -18
- package/src/babel-plugin/abort.ts +0 -165
- package/src/babel-plugin/call.ts +0 -248
- package/src/babel-plugin/communication.ts +0 -13
- package/src/babel-plugin/css-transformer.ts +0 -365
- package/src/babel-plugin/expression.ts +0 -754
- package/src/babel-plugin/field-reference.ts +0 -155
- package/src/babel-plugin/index.ts +0 -67
- package/src/babel-plugin/internal.ts +0 -287
- package/src/babel-plugin/jsx-detect.ts +0 -14
- package/src/babel-plugin/jsx.ts +0 -1155
- package/src/babel-plugin/lib.ts +0 -432
- package/src/babel-plugin/mesh.ts +0 -1925
- package/src/babel-plugin/operators.ts +0 -79
- package/src/babel-plugin/order-check.ts +0 -240
- package/src/babel-plugin/process-types.ts +0 -130
- package/src/babel-plugin/router.ts +0 -69
- package/src/babel-plugin/transformer.ts +0 -622
- package/src/babel-plugin/utils.ts +0 -18
- package/src/cli/app-index/create-index.ts +0 -28
- package/src/cli/app-index/create-ssg-index.ts +0 -23
- package/src/cli/app-index/find-routes.ts +0 -63
- package/src/cli/lib/compile-lib.ts +0 -169
- package/src/cli/lib/fs.ts +0 -17
- package/src/cli/lib/process-args.ts +0 -99
- package/src/cli/lib/resolve.ts +0 -22
- package/src/cli/lib/watch-folder.ts +0 -22
- package/src/cli/lib/working-dirs.ts +0 -10
- package/src/cli/node-hooks/index.doc.vasille.js +0 -6
- package/src/cli/node-hooks/index.md.vasille.js +0 -6
- package/src/cli/node-hooks/index.vasille.js +0 -30
- package/src/cli/node-hooks/jsx.vasille.js +0 -80
- package/src/cli/proxy/dev-proxy.ts +0 -30
- package/src/cli/run.ts +0 -230
- package/src/cli/sf.ts +0 -2
- package/src/cli/vite-plugins/compress.ts +0 -16
- package/src/cli/vite-plugins/index.vasille.ts +0 -54
- package/src/cli/vite-plugins/jsx.ts +0 -33
- package/src/cli/vite-plugins/vasille-web.ts +0 -18
- package/src/export/index.ts +0 -483
- package/src/export/jsx-runtime.ts +0 -1
- package/test/bridge/array-item-set.js +0 -3
- package/test/bridge/array-item-set.ts +0 -4
- package/test/bridge/bind.js +0 -8
- package/test/bridge/bind.ts +0 -9
- package/test/bridge/bridge.test.ts +0 -74
- package/test/bridge/err-before-mount-arg.ts +0 -6
- package/test/bridge/err-bind-in-object.ts +0 -10
- package/test/bridge/err-field-renaming-2.ts +0 -5
- package/test/bridge/err-field-renaming.ts +0 -7
- package/test/bridge/err-non-reactive-module-var.ts +0 -1
- package/test/bridge/err-prop-not-reactive.ts +0 -3
- package/test/bridge/err-raw-no-args.ts +0 -4
- package/test/bridge/err-router-in-store-1.ts +0 -7
- package/test/bridge/err-router-in-store-2.ts +0 -9
- package/test/bridge/err-router-in-store-3.ts +0 -12
- package/test/bridge/err-router.ts +0 -5
- package/test/bridge/global-import.js +0 -13
- package/test/bridge/global-import.ts +0 -16
- package/test/bridge/module-level-reactivity.js +0 -11
- package/test/bridge/module-level-reactivity.ts +0 -18
- package/test/bridge/object-property-match.js +0 -5
- package/test/bridge/object-property-match.ts +0 -6
- package/test/bridge/router.js +0 -13
- package/test/bridge/router.ts +0 -17
- package/test/build/build.test.ts +0 -22
- package/test/build/ssg-no-extra-tags.js +0 -4
- package/test/build/ssg-no-extra-tags.tsx +0 -9
- package/test/build/ssg.js +0 -14
- package/test/build/ssg.tsx +0 -9
- package/test/call/call.test.ts +0 -26
- package/test/call/constant.js +0 -7
- package/test/call/constant.ts +0 -7
- package/test/call/css.js +0 -7
- package/test/call/css.ts +0 -11
- package/test/call/err-awaited-not-arr.ts +0 -5
- package/test/call/require-context.js +0 -9
- package/test/call/require-context.ts +0 -13
- package/test/call/string-literal.js +0 -7
- package/test/call/string-literal.ts +0 -6
- package/test/compose/component.js +0 -19
- package/test/compose/component.ts +0 -22
- package/test/compose/compose.js +0 -18
- package/test/compose/compose.test.ts +0 -38
- package/test/compose/compose.ts +0 -21
- package/test/compose/modal.js +0 -9
- package/test/compose/modal.ts +0 -13
- package/test/compose/model.js +0 -22
- package/test/compose/model.ts +0 -21
- package/test/compose/prompt.js +0 -20
- package/test/compose/prompt.ts +0 -25
- package/test/compose/screen.js +0 -15
- package/test/compose/screen.ts +0 -13
- package/test/compose/store.js +0 -8
- package/test/compose/store.ts +0 -9
- package/test/compose/view.js +0 -34
- package/test/compose/view.ts +0 -39
- package/test/css/autoremove-key.js +0 -11
- package/test/css/autoremove-key.tsx +0 -12
- package/test/css/computed-key.js +0 -9
- package/test/css/computed-key.ts +0 -12
- package/test/css/css.test.ts +0 -82
- package/test/css/err-arg-not-object.ts +0 -4
- package/test/css/err-arg-wrong-key.ts +0 -6
- package/test/css/err-arg-wrong-object.ts +0 -6
- package/test/css/err-arg-wrong-value.ts +0 -10
- package/test/css/err-array-spread-element.ts +0 -11
- package/test/css/err-incompatible-key.ts +0 -13
- package/test/css/err-media-not-object.ts +0 -12
- package/test/css/err-nested-media-queries.ts +0 -13
- package/test/css/err-nested-pseudos.ts +0 -13
- package/test/css/err-no-args.ts +0 -4
- package/test/css/err-object-method.ts +0 -11
- package/test/css/err-object-spread-element.ts +0 -12
- package/test/css/err-pseudo-not-object.ts +0 -12
- package/test/css/err-theme-not-string.ts +0 -11
- package/test/css/err-wrong-array-value.ts +0 -12
- package/test/css/err-wrong-value.ts +0 -12
- package/test/css/style.js +0 -13
- package/test/css/style.ts +0 -61
- package/test/dev/array-model.js +0 -5
- package/test/dev/array-model.ts +0 -5
- package/test/dev/awaited-2.js +0 -7
- package/test/dev/awaited-2.ts +0 -7
- package/test/dev/awaited.js +0 -7
- package/test/dev/awaited.ts +0 -7
- package/test/dev/bind-2.js +0 -6
- package/test/dev/bind-2.ts +0 -6
- package/test/dev/bind.js +0 -6
- package/test/dev/bind.ts +0 -6
- package/test/dev/calculate.js +0 -8
- package/test/dev/calculate.ts +0 -8
- package/test/dev/child.js +0 -16
- package/test/dev/child.tsx +0 -11
- package/test/dev/component.js +0 -5
- package/test/dev/component.ts +0 -5
- package/test/dev/custom-model.js +0 -6
- package/test/dev/custom-model.ts +0 -7
- package/test/dev/dev.test.ts +0 -106
- package/test/dev/ensure.js +0 -9
- package/test/dev/ensure.ts +0 -7
- package/test/dev/function-wrap.js +0 -59
- package/test/dev/function-wrap.ts +0 -43
- package/test/dev/map-model.js +0 -5
- package/test/dev/map-model.ts +0 -5
- package/test/dev/match.js +0 -11
- package/test/dev/module-level-reactivity.js +0 -6
- package/test/dev/module-level-reactivity.ts +0 -7
- package/test/dev/object.js +0 -8
- package/test/dev/object.ts +0 -8
- package/test/dev/page.js +0 -5
- package/test/dev/page.ts +0 -5
- package/test/dev/prompt.js +0 -13
- package/test/dev/prompt.tsx +0 -7
- package/test/dev/ref-no-args.js +0 -5
- package/test/dev/ref-no-args.ts +0 -5
- package/test/dev/ref.js +0 -5
- package/test/dev/ref.ts +0 -5
- package/test/dev/safe.js +0 -36
- package/test/dev/safe.tsx +0 -19
- package/test/dev/set-model.js +0 -5
- package/test/dev/set-model.ts +0 -5
- package/test/dev/set-value.js +0 -8
- package/test/dev/set-value.ts +0 -9
- package/test/dev/tag.js +0 -7
- package/test/dev/tag.tsx +0 -5
- package/test/dev/text-2.js +0 -6
- package/test/dev/text-2.tsx +0 -7
- package/test/dev/text.js +0 -5
- package/test/dev/text.tsx +0 -5
- package/test/dev/value-assignment.js +0 -30
- package/test/dev/value-assignment.ts +0 -24
- package/test/expression/check-expression.js +0 -58
- package/test/expression/check-expression.ts +0 -58
- package/test/expression/check-node.js +0 -12
- package/test/expression/check-node.ts +0 -10
- package/test/expression/check-statement.js +0 -45
- package/test/expression/check-statement.ts +0 -55
- package/test/expression/deep-reactive-object.js +0 -15
- package/test/expression/deep-reactive-object.ts +0 -16
- package/test/expression/dependency.js +0 -7
- package/test/expression/dependency.ts +0 -9
- package/test/expression/err-function-name.ts +0 -11
- package/test/expression/err-jsx-element.tsx +0 -9
- package/test/expression/err-jsx-fragment.tsx +0 -9
- package/test/expression/err-local-observable.ts +0 -12
- package/test/expression/err-nested-observable-in-object.ts +0 -6
- package/test/expression/err-nested-observable.ts +0 -11
- package/test/expression/err-nested-reactivity-2.ts +0 -7
- package/test/expression/err-nested-reactivity.ts +0 -11
- package/test/expression/err-restricted-hint.ts +0 -9
- package/test/expression/expression.test.ts +0 -74
- package/test/expression/mesh-lvalue.js +0 -21
- package/test/expression/mesh-lvalue.ts +0 -22
- package/test/expression/reactive-field-set.js +0 -23
- package/test/expression/reactive-field-set.ts +0 -28
- package/test/expression/stringify.js +0 -15
- package/test/expression/stringify.ts +0 -17
- package/test/extras/SlotTest.js +0 -75
- package/test/extras/SlotTest.tsx +0 -65
- package/test/extras/calculate.js +0 -25
- package/test/extras/calculate.tsx +0 -22
- package/test/extras/err.tsx +0 -23
- package/test/extras/extras.test.ts +0 -68
- package/test/extras/function-assigment-pattern.js +0 -15
- package/test/extras/function-assigment-pattern.ts +0 -11
- package/test/extras/set-model.js +0 -29
- package/test/extras/set-model.tsx +0 -26
- package/test/import/err-override-by-fn-expr.ts +0 -10
- package/test/import/global.js +0 -7
- package/test/import/global.ts +0 -6
- package/test/import/import.test.ts +0 -34
- package/test/import/override-by-function.js +0 -9
- package/test/import/override-by-function.ts +0 -10
- package/test/import/override-by-let.js +0 -6
- package/test/import/override-by-let.ts +0 -8
- package/test/import/override-global.js +0 -9
- package/test/import/override-global.ts +0 -10
- package/test/import/selective.js +0 -7
- package/test/import/selective.ts +0 -6
- package/test/jsx/attr.js +0 -13
- package/test/jsx/attr.tsx +0 -8
- package/test/jsx/bind.js +0 -41
- package/test/jsx/bind.tsx +0 -15
- package/test/jsx/callback.js +0 -9
- package/test/jsx/callback.tsx +0 -11
- package/test/jsx/children.js +0 -11
- package/test/jsx/children.tsx +0 -11
- package/test/jsx/class.js +0 -50
- package/test/jsx/class.tsx +0 -21
- package/test/jsx/conditional-binary.js +0 -16
- package/test/jsx/conditional-binary.tsx +0 -10
- package/test/jsx/conditional-mixed.js +0 -40
- package/test/jsx/conditional-mixed.tsx +0 -19
- package/test/jsx/conditional-ternary.js +0 -18
- package/test/jsx/conditional-ternary.tsx +0 -10
- package/test/jsx/conditions.js +0 -80
- package/test/jsx/conditions.tsx +0 -40
- package/test/jsx/default-prop.js +0 -8
- package/test/jsx/default-prop.tsx +0 -7
- package/test/jsx/err-conditions-else-if.tsx +0 -5
- package/test/jsx/err-conditions-else.tsx +0 -5
- package/test/jsx/err-conditions-spread.tsx +0 -5
- package/test/jsx/err-expected-event-handler.tsx +0 -6
- package/test/jsx/err-method-style-object.tsx +0 -6
- package/test/jsx/err-namespace-props.tsx +0 -10
- package/test/jsx/err-namespaced-name.tsx +0 -6
- package/test/jsx/err-spread-child.tsx +0 -5
- package/test/jsx/err-tag-spread-attr.tsx +0 -5
- package/test/jsx/err-wrong-namespace.tsx +0 -6
- package/test/jsx/events.js +0 -16
- package/test/jsx/events.tsx +0 -17
- package/test/jsx/fragment.js +0 -9
- package/test/jsx/fragment.tsx +0 -15
- package/test/jsx/jsx.test.ts +0 -120
- package/test/jsx/loop.js +0 -19
- package/test/jsx/loop.tsx +0 -21
- package/test/jsx/nested-slots.js +0 -39
- package/test/jsx/nested-slots.tsx +0 -36
- package/test/jsx/nested.js +0 -42
- package/test/jsx/nested.tsx +0 -35
- package/test/jsx/style.js +0 -36
- package/test/jsx/style.tsx +0 -20
- package/test/jsx-detect/has-jsx.js +0 -30
- package/test/jsx-detect/has-jsx.tsx +0 -26
- package/test/jsx-detect/jsx-detect.test.ts +0 -14
- package/test/jsx-detect/release-mode.js +0 -14
- package/test/jsx-detect/release-mode.tsx +0 -18
- package/test/lib/FileStructure.js +0 -7
- package/test/lib/FileStructure.ts +0 -21
- package/test/lib/err-arg-not-func.ts +0 -6
- package/test/lib/err-file-structure-class.ts +0 -11
- package/test/lib/err-file-structure-helper-before-export.ts +0 -5
- package/test/lib/err-file-structure-import-after.ts +0 -5
- package/test/lib/err-file-structure-stylesheet-not-last.ts +0 -7
- package/test/lib/err-incorrect-args-number.ts +0 -6
- package/test/lib/err-incorrect-props-number.ts +0 -8
- package/test/lib/err-malformed-component.ts +0 -7
- package/test/lib/lib.test.ts +0 -42
- package/test/mesh/class.js +0 -48
- package/test/mesh/class.ts +0 -55
- package/test/mesh/compose.js +0 -51
- package/test/mesh/compose.tsx +0 -35
- package/test/mesh/default-class.js +0 -8
- package/test/mesh/default-class.ts +0 -10
- package/test/mesh/default-expr.js +0 -2
- package/test/mesh/default-expr.ts +0 -3
- package/test/mesh/default-fn.js +0 -4
- package/test/mesh/default-fn.ts +0 -5
- package/test/mesh/double-mesh-bug.js +0 -17
- package/test/mesh/double-mesh-bug.tsx +0 -17
- package/test/mesh/err-array-model-const.ts +0 -5
- package/test/mesh/err-calculate-call.ts +0 -6
- package/test/mesh/err-class-name-expression.ts +0 -1
- package/test/mesh/err-class-name.ts +0 -1
- package/test/mesh/err-compose-arg-number.tsx +0 -13
- package/test/mesh/err-compose-nested-destruction.ts +0 -13
- package/test/mesh/err-computed-property-in-destruction.ts +0 -7
- package/test/mesh/err-function-name.ts +0 -3
- package/test/mesh/err-invalid-compose-call.ts +0 -4
- package/test/mesh/err-jsx-element.tsx +0 -5
- package/test/mesh/err-jsx-fragment.tsx +0 -5
- package/test/mesh/err-map-model-const.ts +0 -5
- package/test/mesh/err-param-name-destruction.ts +0 -1
- package/test/mesh/err-param-name-rest.ts +0 -1
- package/test/mesh/err-param-name-with-default-value.ts +0 -1
- package/test/mesh/err-param-name.ts +0 -1
- package/test/mesh/err-prompt.ts +0 -5
- package/test/mesh/err-run-on-destroy.ts +0 -9
- package/test/mesh/err-set-model-const.ts +0 -5
- package/test/mesh/err-store-jsx.tsx +0 -7
- package/test/mesh/err-store-not-reactive-value-2.ts +0 -11
- package/test/mesh/err-store-not-reactive-value.ts +0 -11
- package/test/mesh/err-store-reactive-value.ts +0 -7
- package/test/mesh/err-store-share-dependency.ts +0 -6
- package/test/mesh/err-style-hint.ts +0 -4
- package/test/mesh/mesh-expression.js +0 -56
- package/test/mesh/mesh-expression.ts +0 -57
- package/test/mesh/mesh-statement.js +0 -46
- package/test/mesh/mesh-statement.ts +0 -61
- package/test/mesh/mesh.test.ts +0 -170
- package/test/mesh/object-computed-property.js +0 -11
- package/test/mesh/object-computed-property.ts +0 -10
- package/test/mesh/object-read-property.js +0 -12
- package/test/mesh/object-read-property.ts +0 -15
- package/test/mesh/object-reference.js +0 -11
- package/test/mesh/object-reference.ts +0 -13
- package/test/mesh/reactive-field-copy.js +0 -14
- package/test/mesh/reactive-field-copy.ts +0 -24
- package/test/mesh/reactive-field-set.js +0 -15
- package/test/mesh/reactive-field-set.ts +0 -19
- package/test/mesh/reactive-object.js +0 -39
- package/test/mesh/reactive-object.tsx +0 -38
- package/test/mesh/run-on-destroy.js +0 -6
- package/test/mesh/run-on-destroy.ts +0 -7
- package/test/mesh/store.js +0 -79
- package/test/mesh/store.tsx +0 -83
- package/test/naming/err-component-not-uppercase.ts +0 -3
- package/test/naming/err-components-folder.ts +0 -3
- package/test/naming/err-export.ts +0 -3
- package/test/naming/err-modal-missing-suffix.ts +0 -3
- package/test/naming/err-modal-not-uppercase.ts +0 -3
- package/test/naming/err-modals-folder.ts +0 -3
- package/test/naming/err-model-missing-suffix.ts +0 -3
- package/test/naming/err-model-not-lowercase.ts +0 -3
- package/test/naming/err-models-folder.ts +0 -3
- package/test/naming/err-page.ts +0 -3
- package/test/naming/err-prompt-missing-prefix.ts +0 -3
- package/test/naming/err-prompts-folder.ts +0 -3
- package/test/naming/err-screen-missing-suffix.ts +0 -3
- package/test/naming/err-screens-folder.ts +0 -3
- package/test/naming/err-store-missing-suffix.ts +0 -3
- package/test/naming/err-store-not-lowercase.ts +0 -3
- package/test/naming/err-stores-folder.ts +0 -3
- package/test/naming/err-view-missing-suffix.ts +0 -3
- package/test/naming/err-view-not-uppercase.ts +0 -3
- package/test/naming/err-views-folder.ts +0 -3
- package/test/naming/naming.test.ts +0 -130
- package/test/pages/(dynamical).js +0 -6
- package/test/pages/(dynamical).tsx +0 -5
- package/test/pages/err-static.ts +0 -3
- package/test/pages/page/(number).js +0 -6
- package/test/pages/page/(number).tsx +0 -5
- package/test/pages/page/list.js +0 -4
- package/test/pages/page/list.tsx +0 -5
- package/test/pages/pages.test.ts +0 -26
- package/test/pages/static.js +0 -4
- package/test/pages/static.tsx +0 -5
- package/test/reference/awaited.js +0 -6
- package/test/reference/awaited.ts +0 -8
- package/test/reference/const.js +0 -4
- package/test/reference/const.ts +0 -5
- package/test/reference/expr-const-optional.js +0 -8
- package/test/reference/expr-const-optional.ts +0 -10
- package/test/reference/expr-const.js +0 -7
- package/test/reference/expr-const.ts +0 -9
- package/test/reference/expr-let.js +0 -10
- package/test/reference/expr-let.ts +0 -13
- package/test/reference/expr-meta.js +0 -15
- package/test/reference/expr-meta.ts +0 -17
- package/test/reference/let-update.js +0 -9
- package/test/reference/let-update.ts +0 -11
- package/test/reference/let.js +0 -5
- package/test/reference/let.ts +0 -6
- package/test/reference/local-reactive.js +0 -11
- package/test/reference/local-reactive.ts +0 -6
- package/test/reference/models.js +0 -24
- package/test/reference/models.ts +0 -27
- package/test/reference/reference.test.ts +0 -50
- package/test/reference/watch.js +0 -9
- package/test/reference/watch.ts +0 -11
- package/test/run-test.ts +0 -65
- package/test/shadow/Error.tsx +0 -3
- package/test/shadow/InterfaceTest.js +0 -4
- package/test/shadow/InterfaceTest.ts +0 -7
- package/test/shadow/LocalComponent.js +0 -38
- package/test/shadow/LocalComponent.tsx +0 -27
- package/test/shadow/MissingGlyph.tsx +0 -5
- package/test/shadow/MissingType.tsx +0 -4
- package/test/shadow/NoType.tsx +0 -3
- package/test/shadow/ParameterTest.js +0 -4
- package/test/shadow/ParameterTest.ts +0 -7
- package/test/shadow/PropsTest.js +0 -11
- package/test/shadow/PropsTest.ts +0 -13
- package/test/shadow/SlotTest.js +0 -44
- package/test/shadow/SlotTest.tsx +0 -22
- package/test/shadow/TypeTest.js +0 -4
- package/test/shadow/TypeTest.ts +0 -7
- package/test/shadow/UnionTest.js +0 -11
- package/test/shadow/UnionTest.ts +0 -14
- package/test/shadow/shadow.test.ts +0 -59
- package/test/transformer/no-import.js +0 -3
- package/test/transformer/no-import.ts +0 -3
- package/test/transformer/transformer.test.ts +0 -18
- package/test/transformer/web-global.js +0 -4
- package/test/transformer/web-global.ts +0 -5
- package/test/transformer/web-partial.js +0 -7
- package/test/transformer/web-partial.ts +0 -11
- package/test/tsconfig.json +0 -21
- package/test/tsconfig.tsbuildinfo +0 -1
- package/test/v5/array-index.js +0 -11
- package/test/v5/array-index.ts +0 -12
- package/test/v5/assign-operator.js +0 -11
- package/test/v5/assign-operator.ts +0 -18
- package/test/v5/context.js +0 -16
- package/test/v5/context.ts +0 -14
- package/test/v5/di.js +0 -10
- package/test/v5/di.tsx +0 -5
- package/test/v5/err-di-discover.ts +0 -6
- package/test/v5/err-receive-in-wrapper.ts +0 -5
- package/test/v5/spaces-in-jsx.js +0 -22
- package/test/v5/spaces-in-jsx.tsx +0 -14
- package/test/v5/v5.test.ts +0 -49
- package/test/v6/err-foreach-no-slot.tsx +0 -6
- package/test/v6/err-iterate-params-number.tsx +0 -5
- package/test/v6/err-model-view-no-slot.tsx +0 -6
- package/test/v6/err-reactive-destruction.tsx +0 -6
- package/test/v6/err-too-much-params.tsx +0 -6
- package/test/v6/if-test.js +0 -20
- package/test/v6/if-test.tsx +0 -14
- package/test/v6/iterate-destructure.js +0 -22
- package/test/v6/iterate-destructure.tsx +0 -20
- package/test/v6/iterate-map.js +0 -9
- package/test/v6/iterate-map.tsx +0 -12
- package/test/v6/iterate.js +0 -15
- package/test/v6/iterate.tsx +0 -19
- package/test/v6/model-view.js +0 -40
- package/test/v6/model-view.tsx +0 -46
- package/test/v6/v6.test.ts +0 -51
- package/test/v7/DependencyReexport.js +0 -2
- package/test/v7/DependencyReexport.tsx +0 -2
- package/test/v7/DependencyStart.js +0 -6
- package/test/v7/DependencyStart.tsx +0 -7
- package/test/v7/Hmr.js +0 -16
- package/test/v7/Hmr.ts +0 -8
- package/test/v7/abort-signal.js +0 -15
- package/test/v7/abort-signal.tsx +0 -15
- package/test/v7/array-model-map.js +0 -16
- package/test/v7/array-model-map.tsx +0 -11
- package/test/v7/async-composing.js +0 -8
- package/test/v7/async-composing.tsx +0 -11
- package/test/v7/auto-safe.js +0 -40
- package/test/v7/auto-safe.tsx +0 -24
- package/test/v7/await-with-dependency.js +0 -14
- package/test/v7/await-with-dependency.ts +0 -13
- package/test/v7/bypass-write-restriction.js +0 -8
- package/test/v7/bypass-write-restriction.ts +0 -10
- package/test/v7/callback.js +0 -27
- package/test/v7/callback.tsx +0 -30
- package/test/v7/debounce-dev.js +0 -8
- package/test/v7/debounce-dev.ts +0 -6
- package/test/v7/debounce.js +0 -5
- package/test/v7/debounce.ts +0 -6
- package/test/v7/declared-function.js +0 -11
- package/test/v7/declared-function.ts +0 -11
- package/test/v7/discard-awaited.js +0 -59
- package/test/v7/discard-awaited.ts +0 -60
- package/test/v7/discard-less-awaited.js +0 -45
- package/test/v7/discard-less-awaited.ts +0 -58
- package/test/v7/err-array-model-map.tsx +0 -11
- package/test/v7/err-autounwrap.tsx +0 -7
- package/test/v7/err-bypass-to-readonly.ts +0 -10
- package/test/v7/err-computed-property.ts +0 -6
- package/test/v7/err-debounce-wrong-args.ts +0 -5
- package/test/v7/err-declared-function-calculate.ts +0 -9
- package/test/v7/err-declared-function-call.ts +0 -12
- package/test/v7/err-declared-function-effect.ts +0 -14
- package/test/v7/err-declared-function.ts +0 -9
- package/test/v7/err-dependency-reexport-check.tsx +0 -6
- package/test/v7/err-destruction-extracts-reactive.ts +0 -7
- package/test/v7/err-destruction-missing-renaming.ts +0 -6
- package/test/v7/err-destruction-of-slot-props.tsx +0 -7
- package/test/v7/err-expr-has-double-breakpoint.ts +0 -7
- package/test/v7/err-field-ref-double-breakpoint.ts +0 -7
- package/test/v7/err-field-ref-has-double-breakpoint.ts +0 -7
- package/test/v7/err-field-ref-no-arg.ts +0 -5
- package/test/v7/err-field-ref-no-breakpoint.ts +0 -6
- package/test/v7/err-field-ref-v7-naming.tsx +0 -13
- package/test/v7/err-field-ref-with-private-name.ts +0 -11
- package/test/v7/err-function-expr-in-live-declaration.ts +0 -8
- package/test/v7/err-function-expr-in-state-declaration.ts +0 -8
- package/test/v7/err-function-expr-in-var-declaration.ts +0 -8
- package/test/v7/err-local-dependency-flow.tsx +0 -16
- package/test/v7/err-no-deps-in-effect.ts +0 -7
- package/test/v7/err-page-with-global-dependency.tsx +0 -8
- package/test/v7/err-reactivity-break-2.ts +0 -9
- package/test/v7/err-reactivity-break.ts +0 -10
- package/test/v7/err-rest-in-internal-slot.tsx +0 -7
- package/test/v7/err-rest-in-reactive-destruction.ts +0 -6
- package/test/v7/err-rest-in-ref.ts +0 -6
- package/test/v7/err-restricted-member-access.ts +0 -8
- package/test/v7/err-restricted-ref-in-object-2.ts +0 -6
- package/test/v7/err-restricted-ref-in-object.ts +0 -7
- package/test/v7/err-router-go-to.ts +0 -8
- package/test/v7/err-router-load.ts +0 -8
- package/test/v7/err-safe-init-no-args.ts +0 -6
- package/test/v7/err-static-live-value.ts +0 -5
- package/test/v7/err-wrong-path-in-jsx.tsx +0 -18
- package/test/v7/field-ref-v7-naming.js +0 -35
- package/test/v7/field-ref-v7-naming.tsx +0 -27
- package/test/v7/field-ref.js +0 -31
- package/test/v7/field-ref.tsx +0 -26
- package/test/v7/let-with-function-expression.js +0 -6
- package/test/v7/let-with-function-expression.ts +0 -7
- package/test/v7/object-destruction.js +0 -10
- package/test/v7/object-destruction.tsx +0 -8
- package/test/v7/provide-global-dependency.js +0 -4
- package/test/v7/provide-global-dependency.tsx +0 -5
- package/test/v7/router-path-in-jsx.js +0 -18
- package/test/v7/router-path-in-jsx.tsx +0 -18
- package/test/v7/router.js +0 -22
- package/test/v7/router.ts +0 -25
- package/test/v7/safe.js +0 -32
- package/test/v7/safe.tsx +0 -26
- package/test/v7/string-event.js +0 -9
- package/test/v7/string-event.tsx +0 -6
- package/test/v7/v7.test.ts +0 -326
- package/test/v7-new-naming/err-assign-to-readonly.ts +0 -7
- package/test/v7-new-naming/err-constructor-reactivity-missmatch.ts +0 -14
- package/test/v7-new-naming/err-let-debounced.ts +0 -6
- package/test/v7-new-naming/err-reactive-field-in-obj.ts +0 -12
- package/test/v7-new-naming/err-reactive-writable-in-obj.ts +0 -7
- package/test/v7-new-naming/err-readonly-explicit-ref.ts +0 -5
- package/test/v7-new-naming/err-readonly-field.ts +0 -6
- package/test/v7-new-naming/err-readonly-ref.ts +0 -5
- package/test/v7-new-naming/err-readonly-to-writable-prop.ts +0 -12
- package/test/v7-new-naming/err-readonly-to-writable-prop.tsx +0 -10
- package/test/v7-new-naming/err-writable-debounced.ts +0 -6
- package/test/v7-new-naming/err-writable-explicit-expr.ts +0 -6
- package/test/v7-new-naming/err-writable-expr.ts +0 -6
- package/test/v7-new-naming/naming.js +0 -26
- package/test/v7-new-naming/naming.tsx +0 -27
- package/test/v7-new-naming/v7-new-naming.test.ts +0 -70
- package/tsconfig.json +0 -19
- package/tsconfig.tsbuildinfo +0 -1
package/test/v7/v7.test.ts
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
import { runJsxTest, runTest, throwTest } from "../run-test.js";
|
|
2
|
-
import { AppData } from "../../src/babel-plugin/index.js";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { dirname } from "path";
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = dirname(__filename);
|
|
8
|
-
|
|
9
|
-
it("abort signal", function () {
|
|
10
|
-
runJsxTest(__dirname, "abort-signal");
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("async composes", function () {
|
|
14
|
-
runJsxTest(__dirname, "async-composing", { asyncComposing: true });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("callback", function () {
|
|
18
|
-
runJsxTest(__dirname, "callback");
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it("debounce", function () {
|
|
22
|
-
runTest(__dirname, "debounce");
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it("debounce dev", function () {
|
|
26
|
-
runTest(__dirname, "debounce-dev", { devLayer: true });
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it("field ref v4 naming", function () {
|
|
30
|
-
runJsxTest(__dirname, "field-ref");
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("field ref v7 naming", function () {
|
|
34
|
-
runJsxTest(__dirname, "field-ref-v7-naming");
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it("field ref v7 naming to r_ property error", function () {
|
|
38
|
-
throwTest(
|
|
39
|
-
__dirname,
|
|
40
|
-
"field-ref-v7-naming",
|
|
41
|
-
'"field" hint composes a writable reactive value, but property "r_a" is readonly',
|
|
42
|
-
true,
|
|
43
|
-
);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it("object destruction", function () {
|
|
47
|
-
runJsxTest(__dirname, "object-destruction");
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it("HMR", function () {
|
|
51
|
-
runTest(__dirname, "Hmr", { hmr: true, devLayer: true });
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it("safe", function () {
|
|
55
|
-
runJsxTest(__dirname, "safe");
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it("string event", function () {
|
|
59
|
-
runJsxTest(__dirname, "string-event");
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("router", function () {
|
|
63
|
-
runTest(__dirname, "router", {
|
|
64
|
-
routes: [
|
|
65
|
-
["correct"],
|
|
66
|
-
["correct", "*", "item"],
|
|
67
|
-
["correct", "item", "*"],
|
|
68
|
-
["correct", "*", "item", "edit"],
|
|
69
|
-
["correct", "*", "item", "edit", "*"],
|
|
70
|
-
],
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("auto safe", function () {
|
|
75
|
-
runJsxTest(__dirname, "auto-safe");
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it("array model map", function () {
|
|
79
|
-
runJsxTest(__dirname, "array-model-map");
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("router path in jsx", function () {
|
|
83
|
-
runJsxTest(__dirname, "router-path-in-jsx");
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it("field ref no argument", function () {
|
|
87
|
-
throwTest(__dirname, "field-ref-no-arg", "fieldRef function must have one argument");
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it("field ref no breakpoint", function () {
|
|
91
|
-
throwTest(__dirname, "field-ref-no-breakpoint", "Failed to break value into fields");
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
it("field ref double breakpoint", function () {
|
|
95
|
-
throwTest(__dirname, "field-ref-double-breakpoint", "Nested reactivity is not supported");
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it("field ref has double breakpoint", function () {
|
|
99
|
-
throwTest(__dirname, "field-ref-has-double-breakpoint", "Nested reactivity is not supported");
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it("field ref with private name", function () {
|
|
103
|
-
throwTest(__dirname, "field-ref-with-private-name", "Failed to break value into fields");
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it("expr has double breakpoint", function () {
|
|
107
|
-
throwTest(__dirname, "expr-has-double-breakpoint", "Nested reactivity is not supported");
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it("debounce wrong args", function () {
|
|
111
|
-
throwTest(
|
|
112
|
-
__dirname,
|
|
113
|
-
"debounce-wrong-args",
|
|
114
|
-
"debounceRef() expects 2 arguments: a reactive value and a delay duration",
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it("router goTo", function () {
|
|
119
|
-
throwTest(__dirname, "router-go-to", 'Invalid router path "/wrong".', false, {
|
|
120
|
-
routes: [["correct"]],
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it("router load", function () {
|
|
125
|
-
throwTest(
|
|
126
|
-
__dirname,
|
|
127
|
-
"router-load",
|
|
128
|
-
'Invalid router path "/wrong". Expected a path matching one of the defined routes.',
|
|
129
|
-
false,
|
|
130
|
-
{
|
|
131
|
-
routes: [["correct"]],
|
|
132
|
-
},
|
|
133
|
-
);
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it("wrong path in jsx", function () {
|
|
137
|
-
throwTest(__dirname, "wrong-path-in-jsx", 'Invalid router path "/wrong".', true, {
|
|
138
|
-
routes: [["correct"], ["correct", "*"]],
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
it("array model map gives Array", function () {
|
|
143
|
-
throwTest(__dirname, "array-model-map", "Mapped value must be and identifier initialized with array model", true);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it("provide and receive global dependency", function () {
|
|
147
|
-
const appData = new AppData();
|
|
148
|
-
|
|
149
|
-
runJsxTest(__dirname, "provide-global-dependency", {
|
|
150
|
-
appData,
|
|
151
|
-
filename: `${process.cwd()}/src/router/Wrapper.tsx`,
|
|
152
|
-
});
|
|
153
|
-
throwTest(__dirname, "page-with-global-dependency", 'Missing dependencies: "unexisting"\n', true, { appData });
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it("has local dependency flow", function () {
|
|
157
|
-
throwTest(__dirname, "local-dependency-flow", 'Missing dependencies: "unexisting"\n', true);
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it("dependency reexport check", function () {
|
|
161
|
-
const appData = new AppData();
|
|
162
|
-
const mapping = new Map<string, string>();
|
|
163
|
-
|
|
164
|
-
runJsxTest(__dirname, "DependencyStart", { appData, typeIdentifiersMapping: mapping });
|
|
165
|
-
runJsxTest(__dirname, "DependencyReexport", { appData });
|
|
166
|
-
throwTest(__dirname, "dependency-reexport-check", 'Missing dependencies: "unexisting"\n', true, { appData });
|
|
167
|
-
|
|
168
|
-
expect(mapping.get("Reference")).toBe("vasille/build/index:Reference");
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
it("static live value", function () {
|
|
172
|
-
throwTest(__dirname, "static-live-value", "Unexpected reactivity mark in variable name");
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
it("rest element in reactive destruction", function () {
|
|
176
|
-
throwTest(__dirname, "rest-in-reactive-destruction", "Rest element is not allowed in object destructuring");
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it("destruction missing renaming", function () {
|
|
180
|
-
throwTest(__dirname, "destruction-missing-renaming", "Reactive object destruction required renaming of fields.");
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
it("destruction extracts reactive", function () {
|
|
184
|
-
throwTest(
|
|
185
|
-
__dirname,
|
|
186
|
-
"destruction-extracts-reactive",
|
|
187
|
-
"Reactive field can not be extracted from a reactive object using destruction",
|
|
188
|
-
);
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
it("computed property restriction", function () {
|
|
192
|
-
throwTest(__dirname, "computed-property", "Computed property can not be used in object");
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
it("restricted reference in object", function () {
|
|
196
|
-
throwTest(__dirname, "restricted-ref-in-object", "This object can not contain reactive fields");
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
it("restricted ref() in object", function () {
|
|
200
|
-
throwTest(__dirname, "restricted-ref-in-object-2", "This object can not contain reactive fields");
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
it("rest element in internal slot", function () {
|
|
204
|
-
throwTest(__dirname, "rest-in-internal-slot", "Rest element can not be used in slots of internal components", true);
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
it("destruction of internal slot props", function () {
|
|
208
|
-
throwTest(__dirname, "destruction-of-slot-props", "Move destruction inside the function body", true);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
it("safeInit with no args", function () {
|
|
212
|
-
throwTest(__dirname, "safe-init-no-args", "safeInit takes only one argument");
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
it("throws auto-unwrap error", function () {
|
|
216
|
-
throwTest(
|
|
217
|
-
__dirname,
|
|
218
|
-
"autounwrap",
|
|
219
|
-
"The reactivity breaks here, unwrap intentionally the reactive value, or use non reactive one",
|
|
220
|
-
true,
|
|
221
|
-
);
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
it("rest element in ref call", function () {
|
|
225
|
-
throwTest(__dirname, "rest-in-ref", "Invalid arguments: expected expression");
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
it("restricted member access in expression", function () {
|
|
229
|
-
throwTest(
|
|
230
|
-
__dirname,
|
|
231
|
-
"restricted-member-access",
|
|
232
|
-
"Reactive member access are not allowed in bind/computed expressions.",
|
|
233
|
-
);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
it("breaks reactivity in watch", function () {
|
|
237
|
-
throwTest(__dirname, "reactivity-break", "Assigment are forbidden in live values and effects");
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
it("breaks reactivity in function", function () {
|
|
241
|
-
throwTest(__dirname, "reactivity-break-2", "This assignment breaks the reactivity");
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
it("effect with no dependencies", function () {
|
|
245
|
-
throwTest(__dirname, "no-deps-in-effect", "Effect must have at least one dependency. Move code to beforeMount");
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
it("discards await", function () {
|
|
249
|
-
runTest(__dirname, "discard-awaited");
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
it("catches dependency in await", function () {
|
|
253
|
-
runTest(__dirname, "await-with-dependency");
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it("has no await in awaited", function () {
|
|
257
|
-
runTest(__dirname, "discard-less-awaited");
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
it("let with function expression", function () {
|
|
261
|
-
runTest(__dirname, "let-with-function-expression");
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
it("bypass write restriction", function () {
|
|
265
|
-
runTest(__dirname, "bypass-write-restriction");
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
it("bypass to readonly error", function () {
|
|
269
|
-
throwTest(
|
|
270
|
-
__dirname,
|
|
271
|
-
"bypass-to-readonly",
|
|
272
|
-
"The bypassWriteRestriction hint expected a writable reactive value as first argument and an expression as second argument",
|
|
273
|
-
);
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
it("declared function in bind error", function () {
|
|
277
|
-
throwTest(__dirname, "declared-function", 'Local function "foo" is not allowed to be used in variable declaration');
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
it("declared function in calculate error", function () {
|
|
281
|
-
throwTest(
|
|
282
|
-
__dirname,
|
|
283
|
-
"declared-function-calculate",
|
|
284
|
-
'Local function "foo" is not allowed to be used in variable declaration',
|
|
285
|
-
);
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
it("declared function in effect error", function () {
|
|
289
|
-
throwTest(
|
|
290
|
-
__dirname,
|
|
291
|
-
"declared-function-effect",
|
|
292
|
-
'Local function "foo" is not allowed to be used in variable declaration',
|
|
293
|
-
);
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it("declared function not in varaible declaration", function () {
|
|
297
|
-
runTest(__dirname, "declared-function");
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
it("declared function called in regular variable declaration", function () {
|
|
301
|
-
throwTest(
|
|
302
|
-
__dirname,
|
|
303
|
-
"declared-function-call",
|
|
304
|
-
'Local function "foo" is not allowed to be used in variable declaration',
|
|
305
|
-
);
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
it("function expression in variable declaration", function () {
|
|
309
|
-
throwTest(
|
|
310
|
-
__dirname,
|
|
311
|
-
"function-expr-in-var-declaration",
|
|
312
|
-
"Function expression in reactive variable declaration must not capture outer scope",
|
|
313
|
-
);
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
it("function expression in state declaration", function () {
|
|
317
|
-
throwTest(
|
|
318
|
-
__dirname,
|
|
319
|
-
"function-expr-in-state-declaration",
|
|
320
|
-
"Function expression in reactive variable declaration must not capture outer scope",
|
|
321
|
-
);
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
it("function expression in live declaration", function () {
|
|
325
|
-
throwTest(__dirname, "function-expr-in-live-declaration", "Function expressions can not be used as live values");
|
|
326
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { compose, debounced, live, ref, toFieldRef as VasilleToFieldRef, toDeepFieldRef as VasilleToDeepFieldRef } from "vasille-web";
|
|
2
|
-
const C = compose(Vasille => {
|
|
3
|
-
const wr_1 = ref(1, Vasille);
|
|
4
|
-
const wr_2 = ref(2, Vasille);
|
|
5
|
-
const wr_3 = ref(3, Vasille);
|
|
6
|
-
const r_4 = live(Vasille, Vasille_0 => Vasille_0 + 1, [wr_3]);
|
|
7
|
-
const r_5 = live(Vasille, Vasille_0 => Vasille_0 + 1, [r_4]);
|
|
8
|
-
const wr_obj = ref({
|
|
9
|
-
a: {
|
|
10
|
-
b: 1
|
|
11
|
-
}
|
|
12
|
-
}, Vasille);
|
|
13
|
-
const wr_6 = VasilleToFieldRef(Vasille, wr_obj, "a");
|
|
14
|
-
const wr_7 = VasilleToFieldRef(Vasille, wr_obj.V, "a");
|
|
15
|
-
const wr_8 = VasilleToDeepFieldRef(Vasille, wr_obj.V, ["a", "b"]);
|
|
16
|
-
const r_9 = debounced(Vasille, wr_8, 100);
|
|
17
|
-
});
|
|
18
|
-
const D = compose(Vasille => {
|
|
19
|
-
const wr_ = ref(1, Vasille);
|
|
20
|
-
const r_ = live(Vasille, Vasille_0 => Vasille_0 + 1, [wr_]);
|
|
21
|
-
C({
|
|
22
|
-
wr_1: wr_,
|
|
23
|
-
r_2: wr_,
|
|
24
|
-
r_3: r_
|
|
25
|
-
}, Vasille);
|
|
26
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { compose, debounced, field, live, ref } from "steel-frame";
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
4
|
-
wr_1: number;
|
|
5
|
-
r_2: number;
|
|
6
|
-
r_3: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const C = compose<Props>(() => {
|
|
10
|
-
let wr_1 = 1;
|
|
11
|
-
let wr_2 = ref(2);
|
|
12
|
-
const wr_3 = ref(3);
|
|
13
|
-
const r_4 = wr_3 + 1;
|
|
14
|
-
const r_5 = live(r_4 + 1);
|
|
15
|
-
let wr_obj = { a: { b: 1 } };
|
|
16
|
-
let wr_6 = wr_obj.a;
|
|
17
|
-
let wr_7 = field(wr_obj.a);
|
|
18
|
-
const wr_8 = field(wr_obj.a.b);
|
|
19
|
-
const r_9 = debounced(wr_8, 100);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const D = compose(() => {
|
|
23
|
-
let wr_ = 1;
|
|
24
|
-
const r_ = wr_ + 1;
|
|
25
|
-
|
|
26
|
-
<C wr_1={wr_} r_2={wr_} r_3={r_} />;
|
|
27
|
-
});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
-
import { runJsxTest, throwTest } from "../run-test.js";
|
|
3
|
-
import { dirname } from "node:path";
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = dirname(__filename);
|
|
7
|
-
|
|
8
|
-
it("test naming", function () {
|
|
9
|
-
runJsxTest(__dirname, "naming");
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it("let x = debounced(..)", function () {
|
|
13
|
-
throwTest(__dirname, "let-debounced", 'Expected "readonly" reactivity mark, the "wr_2" has "writable" mark');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("let r_ = ref(..)", function () {
|
|
17
|
-
throwTest(
|
|
18
|
-
__dirname,
|
|
19
|
-
"readonly-explicit-ref",
|
|
20
|
-
'Expected "writable" reactivity mark, the name "r_" has "readonly" mark',
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("let r_ = ..", function () {
|
|
25
|
-
throwTest(__dirname, "readonly-ref", 'Expected "writable" reactivity mark, the name "r_" has "readonly" mark');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("const r_ = field(..)", function () {
|
|
29
|
-
throwTest(__dirname, "readonly-field", 'Expected "writable" reactivity mark, the name "r_2" has "readonly" mark');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("{wr_: r_}", function () {
|
|
33
|
-
throwTest(__dirname, "readonly-to-writable-prop", "Writable field are not allowed in objects");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("<C wr_={r_} ..", function () {
|
|
37
|
-
throwTest(__dirname, "readonly-to-writable-prop", "Reactive writable property requires writable value", true);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("let wr_ = debounced(..)", function () {
|
|
41
|
-
throwTest(__dirname, "writable-debounced", 'Expected "readonly" reactivity mark, the "wr_2" has "writable" mark');
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("let wr_ = live(..)", function () {
|
|
45
|
-
throwTest(
|
|
46
|
-
__dirname,
|
|
47
|
-
"writable-explicit-expr",
|
|
48
|
-
'Expected "readonly" reactivity mark, the "wr_2" has "writable" mark',
|
|
49
|
-
);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("const wr_ = $r + 1", function () {
|
|
53
|
-
throwTest(__dirname, "writable-expr", 'Expected "readonly" reactivity mark, the "wr_2" has "writable" mark');
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("const obj = {r_: ..}", function () {
|
|
57
|
-
throwTest(__dirname, "reactive-field-in-obj", "Writable field are not allowed in objects");
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it("const obj = {wr_: ..}", function () {
|
|
61
|
-
throwTest(__dirname, "reactive-writable-in-obj", "Writable field are not allowed in objects");
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it("this.wr_ = props.r_", function () {
|
|
65
|
-
throwTest(__dirname, "constructor-reactivity-missmatch", "Cannot assign readonly reactive value to writable");
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it("r_ = ..", function () {
|
|
69
|
-
throwTest(__dirname, "assign-to-readonly", "Writing to readonly reactive values is forbidden");
|
|
70
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["src/**/*"],
|
|
3
|
-
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"outDir": "build",
|
|
9
|
-
"declarationDir": "build",
|
|
10
|
-
"target": "ES2020",
|
|
11
|
-
"module": "Node16",
|
|
12
|
-
"moduleResolution": "node16",
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"strictNullChecks": true,
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"types": ["node", "vite/client"]
|
|
18
|
-
}
|
|
19
|
-
}
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/babel-plugin/abort.ts","./src/babel-plugin/call.ts","./src/babel-plugin/communication.ts","./src/babel-plugin/css-transformer.ts","./src/babel-plugin/expression.ts","./src/babel-plugin/field-reference.ts","./src/babel-plugin/index.ts","./src/babel-plugin/internal.ts","./src/babel-plugin/jsx-detect.ts","./src/babel-plugin/jsx.ts","./src/babel-plugin/lib.ts","./src/babel-plugin/mesh.ts","./src/babel-plugin/operators.ts","./src/babel-plugin/order-check.ts","./src/babel-plugin/process-types.ts","./src/babel-plugin/router.ts","./src/babel-plugin/transformer.ts","./src/babel-plugin/utils.ts","./src/cli/run.ts","./src/cli/sf.ts","./src/cli/app-index/create-index.ts","./src/cli/app-index/create-ssg-index.ts","./src/cli/app-index/find-routes.ts","./src/cli/lib/compile-lib.ts","./src/cli/lib/fs.ts","./src/cli/lib/process-args.ts","./src/cli/lib/resolve.ts","./src/cli/lib/watch-folder.ts","./src/cli/lib/working-dirs.ts","./src/cli/node-hooks/index.doc.vasille.js","./src/cli/node-hooks/index.md.vasille.js","./src/cli/node-hooks/index.vasille.js","./src/cli/node-hooks/jsx.vasille.js","./src/cli/proxy/dev-proxy.ts","./src/cli/vite-plugins/compress.ts","./src/cli/vite-plugins/index.vasille.ts","./src/cli/vite-plugins/jsx.ts","./src/cli/vite-plugins/vasille-web.ts","./src/export/index.ts","./src/export/jsx-runtime.ts"],"version":"5.9.3"}
|