三咲智子 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
三咲智子 Kevin Deng
da8e196ca5
refactor(compiler-vapor): v-on
2023-12-10 00:06:20 +08:00
三咲智子 Kevin Deng
45e86e36d7
fix(compiler-vapor): generate static expression
2023-12-09 23:29:30 +08:00
三咲智子 Kevin Deng
341ddf0190
feat(compiler-vapor/v-bind): globally allowed
2023-12-09 23:29:22 +08:00
Rizumu Ayaka
26308c51eb
feat: camel modifier for `v-bind` ( #39 )
2023-12-09 18:41:59 +08:00
三咲智子 Kevin Deng
5f769745fa
test: add transform test
2023-12-09 04:11:02 +08:00
Rizumu Ayaka
e3b21b25b1
test: split test files ( #38 )
2023-12-09 03:29:38 +08:00
三咲智子 Kevin Deng
5f90f8bef0
feat: v-show
2023-12-08 17:37:21 +08:00
白雾三语
0cca23f574
feat(compiler-vapor): support custom directives argument & modifiers ( #34 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-07 01:41:17 +08:00
三咲智子 Kevin Deng
910545f524
test: remove fixtures
2023-12-07 01:12:27 +08:00
三咲智子 Kevin Deng
8786c076d9
perf(compiler-vapor): combine effect
2023-12-07 01:11:25 +08:00
三咲智子 Kevin Deng
082b6c40b5
refactor(compiler-vapor): extract v-on
2023-12-07 00:39:31 +08:00
三咲智子 Kevin Deng
3d9f0ac614
feat(compiler-vapor): shorthand & no expression
2023-12-07 00:36:42 +08:00
Rizumu Ayaka
8482bad7af
test: compound expression for `v-bind` ( #36 )
2023-12-07 00:22:36 +08:00
三咲智子 Kevin Deng
a10c8a4128
test: update snapshot
2023-12-06 18:52:14 +08:00
三咲智子 Kevin Deng
f907a2a708
fix(compiler-vapor): event handler
2023-12-06 18:49:41 +08:00
三咲智子 Kevin Deng
a9f2bfcdba
fix: resolve options for parser
...
ref: https://github.com/vuejs/core/pull/9760
2023-12-06 18:48:45 +08:00
三咲智子 Kevin Deng
505c5a8c07
fix: genExpression
2023-12-06 14:25:15 +08:00
三咲智子 Kevin Deng
f644ed4081
feat: compound expression for v-bind
2023-12-06 00:17:16 +08:00
三咲智子 Kevin Deng
3474e06542
fix: exclude compund expression type
2023-12-06 00:17:16 +08:00
Rizumu Ayaka
b866cf0cc3
test: `v-cloak` ( #32 )
2023-12-05 22:36:46 +08:00
三咲智子 Kevin Deng
f3e80d7706
feat: support more directive hook
2023-12-04 16:08:15 +08:00
三咲智子 Kevin Deng
db151e1b43
feat: custom directlve
...
closes #19
2023-12-03 18:36:54 +08:00
三咲智子 Kevin Deng
21e7a37865
refactor: extract transformInterpolation
2023-12-03 14:52:11 +08:00
三咲智子 Kevin Deng
3dfe3854ee
refactor: DirectiveTransform for v-on
2023-12-03 03:56:54 +08:00
白雾三语
28caf8f566
feat: v-on modifiers support native options and keyboards ( #28 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-03 03:49:44 +08:00
Jeff Yang
c7cd2e4764
fix: do not wrap registering event listeners under effect ( #27 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-12-03 01:46:07 +08:00
三咲智子 Kevin Deng
5a424218f1
feat: DirectiveTransform
2023-12-03 01:43:31 +08:00
三咲智子 Kevin Deng
03344eea7e
refactor: transformElement
2023-12-02 16:59:43 +08:00
Rizumu Ayaka
886d16f458
feat: implement error handling for v-html ( #30 )
2023-12-02 15:59:09 +08:00
三咲智子 Kevin Deng
89cefda3ad
fix: identifier source map
2023-12-02 00:49:17 +08:00
三咲智子 Kevin Deng
2180706cad
fix: preamble in inline mode
2023-12-02 00:35:30 +08:00
三咲智子 Kevin Deng
f2512b5319
refactor: error
2023-12-02 00:18:27 +08:00
三咲智子 Kevin Deng
13d0993cd3
feat: source map for expressions
2023-12-02 00:07:24 +08:00
三咲智子 Kevin Deng
2f029b659c
refactor: process expression
2023-12-01 23:30:21 +08:00
三咲智子 Kevin Deng
919644faaf
refactor: codegen indent
2023-12-01 22:45:08 +08:00
三咲智子 Kevin Deng
9843175c2c
feat: push codegen
2023-12-01 22:12:19 +08:00
三咲智子 Kevin Deng
fe1780d9ff
refactor(compiler-vapor): import alias
2023-12-01 08:26:01 +08:00
三咲智子 Kevin Deng
0d9f0867d7
refactor(compiler-vapor): errors
2023-12-01 08:05:43 +08:00
三咲智子 Kevin Deng
cfd6d40d72
feat(compiler-vapor): node transform
2023-12-01 07:42:43 +08:00
三咲智子 Kevin Deng
0b765bcea3
feat: codegen context
2023-12-01 06:01:25 +08:00
三咲智子 Kevin Deng
5957c18a0b
fix(compiler-vapor): prefix identifiers
2023-12-01 06:01:25 +08:00
Rizumu Ayaka
184feee3ba
test: v-pre ( #14 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-11-30 05:31:26 +08:00
ubugeeei
503615a31e
feat(compiler): v-on event modifier ( #8 )
2023-11-30 05:11:59 +08:00
三咲智子 Kevin Deng
da931ea942
refactor: use enum
2023-11-29 22:09:46 +08:00
Jeff Yang
0ff307988a
chore: fix typo in compiler-vapor ( #10 )
2023-11-29 20:54:45 +08:00
三咲智子 Kevin Deng
4549e28665
fix: playground
2023-11-29 02:38:01 +08:00
三咲智子 Kevin Deng
ab9a2d28d7
feat: build vapor & add @vue/vapor package
2023-11-29 01:26:01 +08:00
Rizumu Ayaka
4200d4e2d0
feat: add vapor errors of `v-bind` / `v-on` ( #3 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-11-28 18:17:41 +08:00
白雾三语
c1ddb700a8
test: add dynamic root nodes and interpolation ( #1 )
...
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-11-28 13:06:44 +08:00
三咲智子 Kevin Deng
8b075796d7
feat: scheduler
2023-11-27 23:48:36 +08:00
三咲智子 Kevin Deng
c53af4d57d
refactor: extract dynamicChildren
2023-11-27 14:16:11 +08:00
三咲智子 Kevin Deng
339a658cef
fix: use parser from runtime-dom
2023-11-27 14:13:09 +08:00
三咲智子 Kevin Deng
0867ca0139
feat: add size report for compiler vapor
2023-11-27 07:16:24 +08:00
三咲智子 Kevin Deng
71cf732d6d
feat: append & prepend multiple elements
2023-11-27 06:22:10 +08:00
三咲智子 Kevin Deng
07373d41fd
feat: append multiple node
2023-11-27 05:16:21 +08:00
三咲智子 Kevin Deng
12187fbc85
feat: dynamic root nodes
2023-11-26 03:53:47 +08:00
三咲智子 Kevin Deng
f1e5bee7d5
fix: root
2023-11-26 03:24:12 +08:00
三咲智子 Kevin Deng
9602cd2011
feat: add api for document.createTextNode
2023-11-26 03:12:02 +08:00
三咲智子 Kevin Deng
45858c085d
fix: static + dynamic root nodes
2023-11-26 03:08:35 +08:00
三咲智子 Kevin Deng
ac686033aa
feat: fragment
2023-11-26 02:13:59 +08:00
Rizumu Ayaka
9b2a6ffe70
test: v-once as root node ( #2 )
2023-11-25 17:05:00 +08:00
三咲智子 Kevin Deng
a2ba499186
chore: update todo
2023-11-25 16:25:43 +08:00
三咲智子 Kevin Deng
7e85be836a
refactor: root id
2023-11-24 20:41:46 +08:00
三咲智子 Kevin Deng
91e7f9bb83
feat: dynamic root node
2023-11-24 20:29:05 +08:00
三咲智子 Kevin Deng
acec2409c7
test: add unit tests for directives
2023-11-24 20:03:28 +08:00
三咲智子 Kevin Deng
74031bac34
fix: remove get children when no dynamic node
2023-11-24 19:57:20 +08:00
三咲智子 Kevin Deng
b70aa0a9a0
feat: v-cloak
2023-11-24 15:40:38 +08:00
三咲智子 Kevin Deng
c9beaf6916
feat: v-pre
2023-11-24 15:37:49 +08:00
三咲智子 Kevin Deng
7ddf69e6e9
feat: once
2023-11-24 15:25:34 +08:00
三咲智子 Kevin Deng
0b07affe0b
fix: typo
2023-11-24 15:02:47 +08:00
三咲智子 Kevin Deng
30ba8daeb2
fix: self closing tag
2023-11-24 14:59:10 +08:00
三咲智子 Kevin Deng
dc3bc7016e
feat: v-text
2023-11-24 14:48:51 +08:00
三咲智子 Kevin Deng
74b4328337
feat: v-html
2023-11-24 14:44:57 +08:00
三咲智子 Kevin Deng
567feccb39
chore: add todo comment
2023-11-24 11:42:16 +08:00
三咲智子 Kevin Deng
e44d616c80
chore: codegen
2023-11-24 11:15:33 +08:00
三咲智子 Kevin Deng
d02629efa2
refactor: helpers, import type, cleanup
2023-11-24 11:07:31 +08:00
三咲智子 Kevin Deng
c347c02062
test: counter
2023-11-23 23:46:21 +08:00
三咲智子 Kevin Deng
1d2f66e111
feat: binding
2023-11-23 23:42:16 +08:00
三咲智子 Kevin Deng
b5eb4e78b8
fix: import
2023-11-20 14:20:21 +08:00
三咲智子 Kevin Deng
2f5f76779c
test: update snapshot
2023-11-17 18:00:39 +08:00
三咲智子 Kevin Deng
a117dbf3f7
feat: build
2023-11-17 17:35:49 +08:00
三咲智子 Kevin Deng
2a0a3dd059
feat: basic render
2023-11-17 03:03:50 +08:00