三咲智子 Kevin Deng
76595deefb
refactor(compiler-vapor): simplify ast check
2024-05-12 17:58:11 +08:00
Rizumu Ayaka
0c33ace61c
feat(compiler-vapor): implement basic usage of `v-slot` ( #203 )
...
Co-authored-by: Doctorwu <doctorwu@moego.pet>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-05-12 17:57:00 +08:00
Lulu
133d494a01
test(compiler-vapor): slot outlets with props & fallbacks ( #199 )
2024-05-09 01:04:06 +08:00
三咲智子 Kevin Deng
b58d6a9ea1
fix(compiler-vapor): empty block
2024-05-04 02:40:04 +09:00
Rizumu Ayaka
2b0def3ba5
feat(compiler-vapor): slot outlet ( #182 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-05-02 23:26:52 +09:00
三咲智子 Kevin Deng
bfb52502f8
feat(runtime-shared): init
2024-05-01 20:19:25 +09:00
Doctor Wu
69580515d9
feat: implement setRef update ( #191 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-05-01 03:17:16 +09:00
Rizumu Ayaka
8dea04bd7f
feat(compiler-vapor): component with dynamic arguments ( #192 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-05-01 03:11:32 +09:00
Doctor Wu
098b6fcf65
fix(compiler-vapor): create dynamic text node ( #193 )
2024-04-30 22:28:55 +09:00
三咲智子 Kevin Deng
e42fecb992
refactor(compiler-vapor): extract new block
2024-04-28 23:05:20 +09:00
三咲智子 Kevin Deng
aa5d87b394
refactor(compiler-vapor): extract segments of `genMulti`
2024-04-28 03:34:25 +09:00
三咲智子 Kevin Deng
17d598f743
refactor(compiler-vapor): cleanup
2024-04-28 03:14:10 +09:00
三咲智子 Kevin Deng
d535c647be
refactor(compiler-vapor): new dynamic info
2024-04-28 03:10:05 +09:00
三咲智子 Kevin Deng
784310d4dc
refactor(compiler-vapor): use class for transform context
2024-04-28 03:10:05 +09:00
三咲智子 Kevin Deng
9b5d23c3e2
refactor(compiler-vapor): register effect argument
2024-04-28 02:12:59 +09:00
Jevon
464b498f13
fix(compiler-vapor): check global allowed for identifier ( #189 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-04-26 23:25:00 +08:00
三咲智子 Kevin Deng
6b03b47462
fix(compiler-vapor): call withDirectives after created
2024-04-26 23:12:06 +08:00
三咲智子 Kevin Deng
e67e6432f0
refactor: merge createTextNode & setText
2024-04-20 21:48:44 +08:00
三咲智子 Kevin Deng
b9b3e021de
feat(compiler-vapor): extract `resolveComponent`
...
Avoid call `resolveComponent` repeatly for the same component
2024-04-19 20:09:03 +08:00
Jevon
1f28ae15cd
feat(compiler-vapor): v-model for component ( #180 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-04-19 19:43:30 +08:00
三咲智子 Kevin Deng
af1581be28
fix(compiler-vapor): v-model argument on native element
2024-04-19 01:15:43 +08:00
三咲智子 Kevin Deng
75488653d3
refactor(compiler-vapor): inline `validate-html-nesting`
2024-04-18 23:01:48 +08:00
三咲智子 Kevin Deng
1af1f40247
fix(compiler-vapor): TS error
2024-04-18 14:54:33 +08:00
三咲智子 Kevin Deng
761f785b30
feat(compiler-vapor): invalid html nesting
2024-04-18 02:42:59 +08:00
三咲智子 Kevin Deng
a68445bdac
test: add template abbreviation
2024-04-18 01:30:56 +08:00
Jevon
e640ec6088
fix(compiler-vapor): v-on for component support `$event` argument ( #177 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-04-16 16:46:22 +08:00
三咲智子 Kevin Deng
9e0cd20da0
feat(compiler-vapor): support v-on for component
2024-04-15 04:43:37 +08:00
三咲智子 Kevin Deng
3787a430f6
test(compiler-vapor): add props & emits for component
2024-04-15 04:43:26 +08:00
三咲智子 Kevin Deng
e95811887a
fix(compiler-vapor): resolve component & unit tests
2024-04-15 04:43:23 +08:00
Doctor Wu
a49b6f91ca
feat(compiler-vapor): support v-on for component ( #175 )
...
Co-authored-by: Kevin Deng 三咲智子 <sxzz@sxzz.moe>
2024-04-15 02:40:59 +08:00
Jevon
a0bd0e9c5f
feat(compiler-vapor): ref for `v-for` ( #167 )
...
Co-authored-by: Rizumu Ayaka <rizumu@ayaka.moe>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-04-13 02:54:34 +08:00
三咲智子 Kevin Deng
98bae0c4a9
refactor(compiler-vapor): group directive
2024-04-07 14:00:36 +08:00
Jevon
9f8bf4fc82
fix(compiler-core): generate `updateEffect` for nested v-for ( #171 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-03-29 21:36:19 +08:00
ubugeeei
78f74ce241
feat(runtime-vapor): component slot ( #143 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-03-24 20:29:00 +08:00
Jevon
ed6b1718d2
fix(compiler-vapor): SET_REF operation should be registered last ( #159 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-03-22 23:33:55 +08:00
Doctor Wu
38e167ceb8
feat: implement inheritAttrs ( #153 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-03-19 00:24:58 +08:00
Kevin Deng 三咲智子
463b47e83d
feat: create component & component lifecycle/props/attrs ( #151 )
2024-03-16 18:54:36 +08:00
三咲智子 Kevin Deng
d282af9430
refactor(compiler-vapor): check reserved prop on compiler only
2024-03-15 22:26:03 +08:00
Jevon
9412c20531
feat: support v-on="obj" ( #149 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-03-14 14:15:45 +08:00
三咲智子 Kevin Deng
421eba3e01
refactor(compiler-vapor): simplify genExpression
2024-03-12 15:50:23 +08:00
Rizumu Ayaka
c79629f0ef
fix(compiler-vapor): member expression with assignment ( #146 )
2024-03-12 15:46:30 +08:00
三咲智子 Kevin Deng
280b8cbdab
refactor: remove getCurrentEffect, add effect flag for on
...
Use the effect flag to distinguish whether it is in the effect of a v-for block.
2024-03-07 17:41:07 +08:00
三咲智子 Kevin Deng
03d1d0a956
refactor: delegate set modelValue event
2024-03-06 00:48:34 +08:00
三咲智子 Kevin Deng
4af8e87953
feat: support more source types for v-for
...
closes #139
Co-authored-by: wangjie36 <826036140@qq.com>
2024-03-01 06:37:53 +08:00
三咲智子 Kevin Deng
2c15171dcf
feat: add next helper for sibilings
2024-02-26 22:37:08 +08:00
三咲智子 Kevin Deng
2075042956
refactor: remove append helper
...
replace `append` with `insertBefore`
2024-02-26 21:38:04 +08:00
三咲智子 Kevin Deng
e5c1f8d1a2
refactor: split delegate & register event
2024-02-26 15:18:16 +08:00
三咲智子 Kevin Deng
c1d9b64b7b
refactor: re-organize exports
2024-02-25 15:23:29 +08:00
三咲智子 Kevin Deng
fb3e8ee8c0
refactor: merge delegate & modifier options of event
2024-02-25 15:11:25 +08:00
三咲智子 Kevin Deng
669fec8dad
feat: delegate event for vapor
...
closes #136
2024-02-25 02:07:20 +08:00
三咲智子 Kevin Deng
e91dde5d22
refactor(compiler-vapor): don't reference root element
2024-02-23 14:03:21 +08:00
三咲智子 Kevin Deng
88123e56d0
fix(compiler-vapor): register event for v-model
2024-02-23 13:31:32 +08:00
三咲智子 Kevin Deng
26f29b2529
refactor(runtime-vapor): move metadata from instance to node
2024-02-23 01:21:00 +08:00
三咲智子 Kevin Deng
d7bd6c99da
refactor(compiler-vapor): generate fragment for only one element
...
closes #133
2024-02-23 00:52:02 +08:00
三咲智子 Kevin Deng
004edd3bac
refactor(compiler-vapor): move `templateIndex` to dynamic
2024-02-22 11:46:40 +08:00
三咲智子 Kevin Deng
0e0ee5b85e
refactor(compiler-vapor): split block & root ir node
2024-02-22 11:30:29 +08:00
三咲智子 Kevin Deng
fa0ca8a5af
refactor(compiler-vapor): required returns
2024-02-22 00:18:19 +08:00
三咲智子 Kevin Deng
66c0e82d4b
refactor(compiler-vapor): remove template ir node
2024-02-21 17:43:52 +08:00
FireBushtree
ba29b4c89a
test(compiler-vapor): v-model ( #132 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-02-21 17:08:20 +08:00
FireBushtree
1710bfdd21
test(compiler-vapor): v-show directive ( #130 )
...
* test(compiler-vapor): v-show
* fix(compiler-vapor): use DOMErrorCodes in vShow test
2024-02-19 16:52:21 +08:00
三咲智子 Kevin Deng
66cea4b325
revert: "refactor: remove update function from compiler"
...
Bad for performance, so revert it temporarily
This reverts commit be65b98a33
.
2024-02-12 22:01:42 +08:00
三咲智子 Kevin Deng
bf5f7c389b
refactor(compiler): move `expressionPlugins` to shared options
2024-02-10 21:50:00 +08:00
三咲智子 Kevin Deng
0c8153eca8
fix(compiler): add `vaporRuntimeModuleName` option
2024-02-10 21:43:09 +08:00
三咲智子 Kevin Deng
f7080efa5d
feat(compiler-vapor): support <style scoped>
2024-02-10 16:04:09 +08:00
三咲智子 Kevin Deng
3550765147
refactor: add isVaporReservedProp
2024-02-10 14:41:51 +08:00
三咲智子 Kevin Deng
5019aac6ca
fix: vapor major version
2024-02-10 01:23:48 +08:00
三咲智子 Kevin Deng
edaa3a0649
refactor(compiler-vapor): re-organize
2024-02-09 02:40:01 +08:00
三咲智子 Kevin Deng
e050646079
fix(compiler-vapor): generate assignment for v-model
2024-02-09 00:09:05 +08:00
三咲智子 Kevin Deng
985d4c7422
refactor: return only one node from children helper
2024-02-08 23:03:42 +08:00
三咲智子 Kevin Deng
c70661c8a3
refactor(compiler-vapor): don't convert event name
2024-02-08 21:56:57 +08:00
三咲智子 Kevin Deng
126796edb9
fix(compiler-vapor): add newline after effect body
2024-02-08 21:56:30 +08:00
三咲智子 Kevin Deng
697102f796
feat(compiler-vapor): resolve dynamic expression
2024-02-08 21:56:30 +08:00
三咲智子 Kevin Deng
6e80e34e6b
perf(compiler-vapor): register as operations if no dynamic expressions
2024-02-08 20:50:34 +08:00
三咲智子 Kevin Deng
0cdc9f20c6
refactor(compiler): export isLiteralWhitelisted
2024-02-08 20:35:11 +08:00
三咲智子 Kevin Deng
35b78920c4
feat(compiler-vapor): add getKey function for v-for
2024-02-08 20:31:56 +08:00
三咲智子 Kevin Deng
8fb01504da
refactor(compiler-vapor): remove ir expression
2024-02-08 20:30:51 +08:00
三咲智子 Kevin Deng
6001fe8976
refactor(compiler-vapor): simplify generate prop modifier
2024-02-08 03:49:52 +08:00
三咲智子 Kevin Deng
ce570751c6
refactor(compiler-vapor): remove vnode-related, adjust key override
2024-02-08 03:49:06 +08:00
三咲智子 Kevin Deng
3957dabb8c
fix(compiler-vapor): handle same-name shorthand edge case for in-DOM templates
...
fix https://github.com/vuejs/core/issues/10280
2024-02-08 03:24:50 +08:00
三咲智子 Kevin Deng
b7e6e1eceb
fix(compiler-vapor): hoist template with inline option
2024-02-07 17:56:32 +08:00
三咲智子 Kevin Deng
99da2e5abe
refactor(compiler-vapor): remove runtime fragment
...
returns array directly
2024-02-07 17:29:04 +08:00
三咲智子 Kevin Deng
823e47ca62
refactor(compiler-vapor): simplify register template
2024-02-07 16:45:06 +08:00
三咲智子 Kevin Deng
68b0caf495
fix(compiler-vapor): convert to display string for each text
2024-02-07 04:40:49 +08:00
三咲智子 Kevin Deng
14813cec1e
refactor(compiler-vapor): combine interpolation & text
2024-02-07 04:29:53 +08:00
三咲智子 Kevin Deng
38865c7ca1
refactor: simplify event handler
2024-02-07 01:37:07 +08:00
三咲智子 Kevin Deng
ef12b99d0c
refactor(compiler-vapor): code fragment with falsy value
2024-02-06 20:56:22 +08:00
三咲智子 Kevin Deng
9ffd4b6c75
refactor(compiler-vapor): simplify renderEffect with a single statement
2024-02-06 20:46:12 +08:00
三咲智子 Kevin Deng
d10a1a3c08
refactor(compiler-vapor): hoist template generator
2024-02-06 20:34:06 +08:00
ygj6
c4a567b93d
test(compiler-vapor): v-bind="obj" ( #119 )
2024-02-06 20:26:55 +08:00
Rizumu Ayaka
ba3ca6a304
feat(compiler-vapor): props merging ( #118 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-02-06 02:35:52 +08:00
Rizumu Ayaka
75b0937d31
feat(compiler-vapor): complex identifier rewriting with vOn ( #113 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-02-05 22:37:09 +08:00
三咲智子 Kevin Deng
2229d3ce20
fix(compiler-vapor): treat attribute as dynamic if has dynamic key prop
2024-02-05 03:28:32 +08:00
三咲智子 Kevin Deng
6d098b6871
feat(compiler-vapor): add source mapping for object key
2024-02-05 03:03:23 +08:00
ygj6
d573a3d2f2
feat: support v-bind="{}" ( #106 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-02-05 02:44:30 +08:00
三咲智子 Kevin Deng
be65b98a33
refactor: remove update function from compiler
2024-02-03 05:02:07 +08:00
三咲智子 Kevin Deng
e7e3b1c73e
revert: "refactor: id rewrite of vapor v-for"
...
This reverts commit 31f497b1d1
.
2024-02-01 19:12:29 +08:00
三咲智子 Kevin Deng
31f497b1d1
refactor: id rewrite of vapor v-for
2024-02-01 17:42:46 +08:00
三咲智子 Kevin Deng
21bec835f0
refactor(compiler-vapor): extract imports & unify context name
2024-01-31 18:00:16 +08:00
三咲智子 Kevin Deng
4062c6805a
refactor(compiler-vapor): remove loc in IR
2024-01-31 17:37:54 +08:00
三咲智子 Kevin Deng
2bc107a7a7
refactor(compiler-vapor): missing check in genOperation
2024-01-31 17:32:01 +08:00
三咲智子 Kevin Deng
3817bbf134
refactor(compiler-vapor): remove source in codegen context
2024-01-31 17:28:19 +08:00
三咲智子 Kevin Deng
46e83e9681
refactor(compiler-vapor): symbol for newline ( #104 )
2024-01-31 17:26:07 +08:00
三咲智子 Kevin Deng
681dc5d954
feat(compiler-vapor): v-for ( #101 )
2024-01-31 17:00:19 +08:00
三咲智子 Kevin Deng
7b036fd4c0
fix(compiler-vapor): source map position
2024-01-31 15:43:37 +08:00
三咲智子 Kevin Deng
f7642ab77c
refactor(compiler-vapor): remove createTextNode argument
2024-01-31 13:16:03 +08:00
三咲智子 Kevin Deng
ccfadc1fb4
refactor(compiler-vapor): re-organize
2024-01-30 23:02:16 +08:00
三咲智子 Kevin Deng
38a06394f7
refactor(compiler-vapor): rename dynamicFlags to flags
2024-01-30 22:52:42 +08:00
三咲智子 Kevin Deng
b8806f0954
refactor(compiler-vapor): class-based CodegenContext
2024-01-30 22:46:56 +08:00
三咲智子 Kevin Deng
e02725665d
fix(compiler-vapor): import helper with type check
2024-01-30 22:21:59 +08:00
三咲智子 Kevin Deng
7f8a94b48e
refactor(compiler-vapor): fast path for string
2024-01-30 22:17:34 +08:00
三咲智子 Kevin Deng
c0b7515369
refactor(compiler-vapor): CodeFragment for codegen
2024-01-30 22:08:28 +08:00
三咲智子 Kevin Deng
d942be14f2
refactor(compiler-vapor): simplify codegen context
2024-01-30 19:35:29 +08:00
三咲智子 Kevin Deng
d7ab873f1e
refactor(compiler-vapor): remove unnecessary DynamicFlag.INSERT
2024-01-30 06:12:01 +08:00
三咲智子 Kevin Deng
48d2aa3bcb
fix(compiler-vapor): handle no template
2024-01-29 23:06:21 +08:00
三咲智子 Kevin Deng
ed9368c06c
refactor(compiler-vapor): make dynamic.children an array
2024-01-29 22:28:40 +08:00
三咲智子 Kevin Deng
22436ea341
refactor(compiler-vapor): decoupe insert and non-template
2024-01-29 22:15:34 +08:00
三咲智子 Kevin Deng
79636ddc5b
refactor(compiler-vapor): dynamicFlag
2024-01-29 22:08:57 +08:00
Rizumu Ayaka
63a127b612
feat(compiler-vapor): `v-else` / `v-else-if` ( #98 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-01-29 03:42:56 +08:00
三咲智子 Kevin Deng
63aacf6194
style: respect root prettier config
2024-01-29 03:11:30 +08:00
三咲智子 Kevin Deng
86ed0eddae
perf(compiler-vapor): use array instead of regex
2024-01-28 03:35:04 +08:00
三咲智子 Kevin Deng
d3baff92b1
fix(compiler-vapor): don't mutate ast
2024-01-28 03:32:27 +08:00
三咲智子 Kevin Deng
7e47ae17f9
feat(compiler-vapor): add error check and simplify for v-if
2024-01-28 02:14:42 +08:00
三咲智子 Kevin Deng
9c9e9b2862
refactor(compiler-vapor): dedpue fragment
2024-01-28 01:39:21 +08:00
Rizumu Ayaka
ede6c29434
feat(compiler-vapor): `v-if` ( #96 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-01-28 01:31:20 +08:00
三咲智子 Kevin Deng
2b5e8e4df6
test(compiler-vapor): refactor compile
2024-01-27 22:13:37 +08:00
三咲智子 Kevin Deng
164fd90df4
refactor(compiler-vapor): codegen result
2024-01-27 22:00:34 +08:00
三咲智子 Kevin Deng
c2c8070207
refactor(compiler-vapor): group directives by same element
2024-01-27 20:49:43 +08:00
三咲智子 Kevin Deng
359a5dab19
refactor: get oldVal from metadata
2024-01-25 17:00:19 +08:00
三咲智子 Kevin Deng
8848d10522
fix(compiler-vapor): omit prop key for set class&style
2024-01-25 16:24:50 +08:00
ygj6
5028880e5b
feat: generate specific function when the prop key is static ( #97 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-01-22 23:03:39 +08:00
三咲智子 Kevin Deng
1d11ed72fb
refactor(compiler-vapor): extract gen operation
2024-01-21 13:43:23 +08:00
三咲智子 Kevin Deng
31e8fa35c0
feat: v-model for input & textarea
2024-01-21 02:16:53 +08:00
三咲智子 Kevin Deng
782d60475d
feat: basic template ref
2024-01-20 23:48:10 +08:00
ygj6
775491e46d
feat: prop and attr modifiers for v-bind ( #79 )
2024-01-20 13:31:16 +08:00
三咲智子 Kevin Deng
199b19f076
test: update snapshot
2024-01-20 13:29:55 +08:00
三咲智子 Kevin Deng
10f8cb4351
fix(compiler-vapor): don't setText for root element
2024-01-19 22:50:12 +08:00
zhiyuanzmj
0494323795
feat(compiler-vapor): support `expressionPlugins` for generate ( #91 )
2024-01-13 18:30:03 +08:00
zhiyuanzmj
8d7d672bc5
fix(compiler-vapor): should not prefix member expression ( #92 )
2024-01-13 03:26:50 +08:00
Rizumu Ayaka
26fee414ff
feat: compound expression for `v-on` ( #60 )
2024-01-08 14:07:49 +08:00
Rizumu Ayaka
fb4d9a1443
feat: renderWatch / renderEffect ( #86 )
...
* refactor: use baseWatch to drive watchAPI
* feat: basic implementation of renderWatch and effectId
* chore: remove effect id
* chore: export and simplify types
* test: render watch
* chore: add todo comment
* fix: sync code changes according to the review in PR #82
* fix: enum values conflict
* chore: rename
* feat: change watchEffect to renderEffect in compiler-vapor
* chore: update
---------
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-01-07 01:31:01 +08:00
Rizumu Ayaka
dce55475a5
style: fix lint errors in vapor
2023-12-29 22:05:33 +08:00
Rizumu Ayaka
5b3027f0a9
feat(runtime-vapor): `watchEffect`/`watch` and `onEffectCleanup` ( #69 )
2023-12-23 15:17:18 +08:00
Rizumu Ayaka
42b913283b
test: add all tests for `v-on` ( #52 )
2023-12-12 15:58:07 +08:00
Rizumu Ayaka
c87512f592
test: add transform tests to `v-html` / `v-text` tests ( #49 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-11 03:05:11 +08:00
Rizumu Ayaka
28b11f5cf7
test: add transform tests to `v-once` tests ( #44 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-11 01:41:29 +08:00
三咲智子 Kevin Deng
d1dd1e110a
fix(compiler-vapor): add modifier for empty v-on
2023-12-10 01:36:34 +08:00
Rizumu Ayaka
b421aa91a2
test: combine with transform and codegen tests for `v-bind` ( #45 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-10 01:33:29 +08:00
三咲智子 Kevin Deng
ecf7da98d7
feat: pushFnCall
2023-12-10 01:26:19 +08:00
三咲智子 Kevin Deng
0c26b0d4ed
feat: withIndent
2023-12-10 01:05:26 +08:00
三咲智子 Kevin Deng
4b4cb055a4
refactor: pushMulti
2023-12-10 01:01:57 +08:00