kreftjs 0.0.20-beta → 0.0.22-beta
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/README.md +10 -1
- package/bin/artisan.js +4 -2
- package/bin/backend/cache.js +31 -5
- package/bin/backend/gc.js +193 -43
- package/bin/backend/http.js +6 -2
- package/bin/backend/index.js +6 -0
- package/bin/backend/mcp-client.js +133 -0
- package/bin/backend/mcp.js +17 -0
- package/bin/backend/model.js +15 -1
- package/bin/backend/shield.js +266 -0
- package/bin/backend/stream.js +74 -0
- package/bin/build.js +12 -5
- package/bin/db-api.js +9 -1
- package/bin/kreftjs.js +50 -12
- package/book/ar/16-virtual-list.md +131 -0
- package/book/ar/17-combobox.md +169 -0
- package/book/ar/18-tabs-offline.md +168 -0
- package/book/ar/19-wizard.md +196 -0
- package/book/ar/20-pipes-match-props.md +75 -0
- package/book/ar/README.md +12 -1
- package/book/kreft-book-ar.docx +0 -0
- package/docs/README.md +209 -13
- package/editors/sublime/Comments.tmPreferences +26 -0
- package/editors/sublime/Component.sublime-snippet +20 -0
- package/editors/sublime/Kreft.sublime-syntax +39 -0
- package/editors/sublime/LICENSE +95 -0
- package/editors/sublime/README.md +7 -0
- package/editors/sublime/action.sublime-snippet +10 -0
- package/editors/sublime/derive.sublime-snippet +8 -0
- package/editors/sublime/for.sublime-snippet +12 -0
- package/editors/sublime/k-case.sublime-snippet +8 -0
- package/editors/sublime/k-if.sublime-snippet +8 -0
- package/editors/sublime/k-match.sublime-snippet +12 -0
- package/editors/sublime/kreft-wait.sublime-snippet +12 -0
- package/editors/sublime/layout.sublime-snippet +8 -0
- package/editors/sublime/load.sublime-snippet +8 -0
- package/editors/sublime/on.sublime-snippet +10 -0
- package/editors/sublime/pipe.sublime-snippet +8 -0
- package/editors/sublime/prop-typed.sublime-snippet +8 -0
- package/editors/sublime/saved.sublime-snippet +8 -0
- package/editors/sublime/section.sublime-snippet +10 -0
- package/editors/sublime/state.sublime-snippet +8 -0
- package/editors/sublime/watch.sublime-snippet +10 -0
- package/editors/sublime/when.sublime-snippet +10 -0
- package/editors/sublime/yield.sublime-snippet +8 -0
- package/editors/vscode/snippets/kreftjs.json +143 -15
- package/editors/zed/LICENSE +95 -0
- package/editors/zed/README.md +17 -0
- package/editors/zed/extension.toml +11 -0
- package/editors/zed/languages/kreft/brackets.scm +4 -0
- package/editors/zed/languages/kreft/config.toml +17 -0
- package/editors/zed/languages/kreft/highlights.scm +18 -0
- package/editors/zed/languages/kreft/indents.scm +5 -0
- package/editors/zed/languages/kreft/injections.scm +14 -0
- package/editors/zed/languages/kreft/outline.scm +3 -0
- package/kreftjs.d.ts +1 -1
- package/kreftjs.js +219 -14
- package/package.json +3 -2
- package/server.d.ts +44 -0
- package/templates/app/backend/app/Auth/Session.js +8 -4
- package/templates/app/backend/app/Http/Middleware/Authenticate.js +7 -4
- package/templates/app/backend/database/seeders/DatabaseSeeder.js +4 -0
- package/templates/app/frontend/kreftjs.d.ts +1 -1
- package/templates/app/frontend/kreftjs.js +219 -14
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
{for ${1:item} in ${2:items} key ${1:item}.id}
|
|
4
|
+
$0
|
|
5
|
+
{empty}
|
|
6
|
+
<p>Nothing yet.</p>
|
|
7
|
+
{/for}
|
|
8
|
+
]]></content>
|
|
9
|
+
<tabTrigger>for</tabTrigger>
|
|
10
|
+
<scope>text.html.kreft</scope>
|
|
11
|
+
<description>Loop over a list</description>
|
|
12
|
+
</snippet>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
<div k-match="${1:value}">
|
|
4
|
+
<${2:b} k-case="${3:'a'}">${4:A}</${2:b}>
|
|
5
|
+
<${5:i} k-case="${6:'b', 'c'}">${7:B or C}</${5:i}>
|
|
6
|
+
<${8:u} k-default>${9:other}</${8:u}>
|
|
7
|
+
</div>
|
|
8
|
+
]]></content>
|
|
9
|
+
<tabTrigger>k-match</tabTrigger>
|
|
10
|
+
<scope>text.html.kreft</scope>
|
|
11
|
+
<description>Show the child whose k-case equals the value (k-default: none matched)</description>
|
|
12
|
+
</snippet>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
<kreft-wait>
|
|
4
|
+
$0
|
|
5
|
+
<p k-waiting>Loading…</p>
|
|
6
|
+
<p k-failed="error">Could not load: {error.message}</p>
|
|
7
|
+
</kreft-wait>
|
|
8
|
+
]]></content>
|
|
9
|
+
<tabTrigger>kreft-wait</tabTrigger>
|
|
10
|
+
<scope>text.html.kreft</scope>
|
|
11
|
+
<description>Show something until everything inside has loaded</description>
|
|
12
|
+
</snippet>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
{ ${1:value} | ${2:upper} }
|
|
4
|
+
]]></content>
|
|
5
|
+
<tabTrigger>pipe</tabTrigger>
|
|
6
|
+
<scope>text.html.kreft</scope>
|
|
7
|
+
<description>Pipe: upper, lower, capitalize, truncate:n, currency:'USD', number:2, percent, date, time, ago, bytes, join, fallback, json</description>
|
|
8
|
+
</snippet>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
<kreft-section name="${1:actions}">
|
|
4
|
+
$0
|
|
5
|
+
</kreft-section>
|
|
6
|
+
]]></content>
|
|
7
|
+
<tabTrigger>kreft-section</tabTrigger>
|
|
8
|
+
<scope>text.html.kreft</scope>
|
|
9
|
+
<description>Content for the layout's <kreft-yield name></description>
|
|
10
|
+
</snippet>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<snippet>
|
|
2
|
+
<content><![CDATA[
|
|
3
|
+
<kreft-yield name="${1:actions}">${0}</kreft-yield>
|
|
4
|
+
]]></content>
|
|
5
|
+
<tabTrigger>kreft-yield</tabTrigger>
|
|
6
|
+
<scope>text.html.kreft</scope>
|
|
7
|
+
<description>In a layout: where a page's <kreft-section> goes</description>
|
|
8
|
+
</snippet>
|
|
@@ -1,21 +1,149 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Component": {
|
|
3
3
|
"prefix": "kreftjs",
|
|
4
|
-
"body": [
|
|
4
|
+
"body": [
|
|
5
|
+
"state ${1:count} = ${2:0}",
|
|
6
|
+
"",
|
|
7
|
+
"action ${3:add}() {",
|
|
8
|
+
" ${1:count}++",
|
|
9
|
+
"}",
|
|
10
|
+
"",
|
|
11
|
+
"<view>",
|
|
12
|
+
" <button @click={${3:add}}>{${1:count}}</button>",
|
|
13
|
+
"</view>",
|
|
14
|
+
"",
|
|
15
|
+
"<style scoped>",
|
|
16
|
+
" $0",
|
|
17
|
+
"</style>"
|
|
18
|
+
],
|
|
5
19
|
"description": "A new .kreft component"
|
|
6
20
|
},
|
|
7
|
-
"state": {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
"state": {
|
|
22
|
+
"prefix": "state",
|
|
23
|
+
"body": "state ${1:name} = ${2:0}",
|
|
24
|
+
"description": "A value the view follows"
|
|
25
|
+
},
|
|
26
|
+
"saved": {
|
|
27
|
+
"prefix": "saved",
|
|
28
|
+
"body": "saved ${1:name} = ${2:[]}",
|
|
29
|
+
"description": "A value kept after a reload (localStorage)"
|
|
30
|
+
},
|
|
31
|
+
"derive": {
|
|
32
|
+
"prefix": "derive",
|
|
33
|
+
"body": "derive ${1:name} = ${2:expression}",
|
|
34
|
+
"description": "A value worked out from others"
|
|
35
|
+
},
|
|
36
|
+
"load": {
|
|
37
|
+
"prefix": "load",
|
|
38
|
+
"body": "load ${1:posts} = api.get('${2:/api/posts}')",
|
|
39
|
+
"description": "Load data: .data, .loading, .error"
|
|
40
|
+
},
|
|
41
|
+
"action": {
|
|
42
|
+
"prefix": "action",
|
|
43
|
+
"body": [
|
|
44
|
+
"action ${1:name}(${2}) {",
|
|
45
|
+
" $0",
|
|
46
|
+
"}"
|
|
47
|
+
],
|
|
48
|
+
"description": "A function the view can call"
|
|
49
|
+
},
|
|
50
|
+
"when": {
|
|
51
|
+
"prefix": "when",
|
|
52
|
+
"body": [
|
|
53
|
+
"when ${1:condition} {",
|
|
54
|
+
" $0",
|
|
55
|
+
"}"
|
|
56
|
+
],
|
|
57
|
+
"description": "Run when a condition becomes true"
|
|
58
|
+
},
|
|
59
|
+
"watch": {
|
|
60
|
+
"prefix": "watch",
|
|
61
|
+
"body": [
|
|
62
|
+
"watch ${1:value} {",
|
|
63
|
+
" $0",
|
|
64
|
+
"}"
|
|
65
|
+
],
|
|
66
|
+
"description": "Run when a value changes (value, old)"
|
|
67
|
+
},
|
|
68
|
+
"on": {
|
|
69
|
+
"prefix": "on",
|
|
70
|
+
"body": [
|
|
71
|
+
"on ${1|start,ready,update,show,hide,destroy|} {",
|
|
72
|
+
" $0",
|
|
73
|
+
"}"
|
|
74
|
+
],
|
|
75
|
+
"description": "Lifecycle"
|
|
76
|
+
},
|
|
77
|
+
"layout": {
|
|
78
|
+
"prefix": "layout",
|
|
79
|
+
"body": "layout ${1:app}",
|
|
80
|
+
"description": "This page goes inside layouts/<name>.kreft (layout none: no layout)"
|
|
81
|
+
},
|
|
82
|
+
"section": {
|
|
83
|
+
"prefix": "kreft-section",
|
|
84
|
+
"body": [
|
|
85
|
+
"<kreft-section name=\"${1:actions}\">",
|
|
86
|
+
" $0",
|
|
87
|
+
"</kreft-section>"
|
|
88
|
+
],
|
|
89
|
+
"description": "Content for the layout's <kreft-yield name>"
|
|
90
|
+
},
|
|
91
|
+
"yield": {
|
|
92
|
+
"prefix": "kreft-yield",
|
|
93
|
+
"body": "<kreft-yield name=\"${1:actions}\">${0}</kreft-yield>",
|
|
94
|
+
"description": "In a layout: where a page's <kreft-section> goes"
|
|
95
|
+
},
|
|
96
|
+
"for": {
|
|
97
|
+
"prefix": "for",
|
|
98
|
+
"body": [
|
|
99
|
+
"{for ${1:item} in ${2:items} key ${1:item}.id}",
|
|
100
|
+
" $0",
|
|
101
|
+
"{empty}",
|
|
102
|
+
" <p>Nothing yet.</p>",
|
|
103
|
+
"{/for}"
|
|
104
|
+
],
|
|
105
|
+
"description": "Loop over a list"
|
|
106
|
+
},
|
|
107
|
+
"k-if": {
|
|
108
|
+
"prefix": "k-if",
|
|
109
|
+
"body": "k-if={${1:condition}}",
|
|
110
|
+
"description": "Show only when true"
|
|
111
|
+
},
|
|
112
|
+
"kreft-wait": {
|
|
113
|
+
"prefix": "kreft-wait",
|
|
114
|
+
"body": [
|
|
115
|
+
"<kreft-wait>",
|
|
116
|
+
" $0",
|
|
117
|
+
" <p k-waiting>Loading…</p>",
|
|
118
|
+
" <p k-failed=\"error\">Could not load: {error.message}</p>",
|
|
119
|
+
"</kreft-wait>"
|
|
120
|
+
],
|
|
121
|
+
"description": "Show something until everything inside has loaded"
|
|
122
|
+
},
|
|
123
|
+
"k-match": {
|
|
124
|
+
"prefix": "k-match",
|
|
125
|
+
"body": [
|
|
126
|
+
"<div k-match=\"${1:value}\">",
|
|
127
|
+
" <${2:b} k-case=\"${3:'a'}\">${4:A}</${2:b}>",
|
|
128
|
+
" <${5:i} k-case=\"${6:'b', 'c'}\">${7:B or C}</${5:i}>",
|
|
129
|
+
" <${8:u} k-default>${9:other}</${8:u}>",
|
|
130
|
+
"</div>"
|
|
131
|
+
],
|
|
132
|
+
"description": "Show the child whose k-case equals the value (k-default: none matched)"
|
|
133
|
+
},
|
|
134
|
+
"k-case": {
|
|
135
|
+
"prefix": "k-case",
|
|
136
|
+
"body": "k-case=\"${1:'value'}\"",
|
|
137
|
+
"description": "A branch of k-match; several values: k-case=\"'a', 'b'\""
|
|
138
|
+
},
|
|
139
|
+
"pipe": {
|
|
140
|
+
"prefix": "pipe",
|
|
141
|
+
"body": "{ ${1:value} | ${2:upper} }",
|
|
142
|
+
"description": "Pipe: upper, lower, capitalize, truncate:n, currency:'USD', number:2, percent, date, time, ago, bytes, join, fallback, json"
|
|
143
|
+
},
|
|
144
|
+
"prop-typed": {
|
|
145
|
+
"prefix": "proptyped",
|
|
146
|
+
"body": "prop ${1:size}: ${2:'sm' | 'lg'} = ${3:'sm'}",
|
|
147
|
+
"description": "A prop with a type; a wrong value warns while you develop"
|
|
148
|
+
}
|
|
21
149
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Copyright 2026 Maxamuud Xuseen
|
|
2
|
+
|
|
3
|
+
Elastic License 2.0
|
|
4
|
+
|
|
5
|
+
URL: https://www.elastic.co/licensing/elastic-license
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
14
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
15
|
+
available, and prepare derivative works of the software, in each case subject to
|
|
16
|
+
the limitations and conditions below.
|
|
17
|
+
|
|
18
|
+
## Limitations
|
|
19
|
+
|
|
20
|
+
You may not provide the software to third parties as a hosted or managed
|
|
21
|
+
service, where the service provides users with access to any substantial set of
|
|
22
|
+
the features or functionality of the software.
|
|
23
|
+
|
|
24
|
+
You may not move, change, disable, or circumvent the license key functionality
|
|
25
|
+
in the software, and you may not remove or obscure any functionality in the
|
|
26
|
+
software that is protected by the license key.
|
|
27
|
+
|
|
28
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
29
|
+
of the licensor in the software. Any use of the licensor’s trademarks is subject
|
|
30
|
+
to applicable law.
|
|
31
|
+
|
|
32
|
+
## Patents
|
|
33
|
+
|
|
34
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
35
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
36
|
+
sale, import and have imported the software, in each case subject to the
|
|
37
|
+
limitations and conditions in this license. This license does not cover any
|
|
38
|
+
patent claims that you cause to be infringed by modifications or additions to
|
|
39
|
+
the software. If you or your company make any written claim that the software
|
|
40
|
+
infringes or contributes to infringement of any patent, your patent license for
|
|
41
|
+
the software granted under these terms ends immediately. If your company makes
|
|
42
|
+
such a claim, your patent license ends immediately for work on behalf of your
|
|
43
|
+
company.
|
|
44
|
+
|
|
45
|
+
## Notices
|
|
46
|
+
|
|
47
|
+
You must ensure that anyone who gets a copy of any part of the software from you
|
|
48
|
+
also gets a copy of these terms.
|
|
49
|
+
|
|
50
|
+
If you modify the software, you must include in any modified copies of the
|
|
51
|
+
software prominent notices stating that you have modified the software.
|
|
52
|
+
|
|
53
|
+
## No Other Rights
|
|
54
|
+
|
|
55
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
56
|
+
these terms.
|
|
57
|
+
|
|
58
|
+
## Termination
|
|
59
|
+
|
|
60
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
61
|
+
and your licenses will automatically terminate. If the licensor provides you
|
|
62
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
63
|
+
later than 30 days after you receive that notice, your licenses will be
|
|
64
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
65
|
+
reinstatement, any additional violation of these terms will cause your licenses
|
|
66
|
+
to terminate automatically and permanently.
|
|
67
|
+
|
|
68
|
+
## No Liability
|
|
69
|
+
|
|
70
|
+
*As far as the law allows, the software comes as is, without any warranty or
|
|
71
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
72
|
+
out of these terms or the use or nature of the software, under any kind of
|
|
73
|
+
legal claim.*
|
|
74
|
+
|
|
75
|
+
## Definitions
|
|
76
|
+
|
|
77
|
+
The **licensor** is the entity offering these terms, and the **software** is the
|
|
78
|
+
software the licensor makes available under these terms, including any portion
|
|
79
|
+
of it.
|
|
80
|
+
|
|
81
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
82
|
+
|
|
83
|
+
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
84
|
+
organization that you work for, plus all organizations that have control over,
|
|
85
|
+
are under the control of, or are under common control with that
|
|
86
|
+
organization. **control** means ownership of substantially all the assets of an
|
|
87
|
+
entity, or the power to direct its management and policies by vote, contract, or
|
|
88
|
+
otherwise. Control can be direct or indirect.
|
|
89
|
+
|
|
90
|
+
**your licenses** are all the licenses granted to you for the software under
|
|
91
|
+
these terms.
|
|
92
|
+
|
|
93
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
94
|
+
|
|
95
|
+
**trademark** means trademarks, service marks, and similar rights.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Kreft for Zed
|
|
2
|
+
|
|
3
|
+
Highlighting for `.kreft` (and legacy `.kreftjs`) component files: markup, `k-*` / `@event` / `:bind`
|
|
4
|
+
attributes, and the embedded `<script>` (JavaScript) and `<style>` (CSS) blocks.
|
|
5
|
+
|
|
6
|
+
## Install (dev extension)
|
|
7
|
+
|
|
8
|
+
1. Open Zed, run **zed: install dev extension** from the command palette.
|
|
9
|
+
2. Select this folder (`editors/zed`).
|
|
10
|
+
|
|
11
|
+
Zed downloads the tree-sitter HTML grammar and compiles it, so Rust (via `rustup`) must be installed.
|
|
12
|
+
|
|
13
|
+
## Limits
|
|
14
|
+
|
|
15
|
+
This reuses the HTML grammar. Kreft-only syntax (`state x = 0`, `action f() {}`, `{expr}` text
|
|
16
|
+
interpolation) is highlighted as far as JavaScript/HTML allow; a dedicated tree-sitter-kreft
|
|
17
|
+
grammar would be needed for full coverage.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
id = "kreft"
|
|
2
|
+
name = "Kreft"
|
|
3
|
+
description = "Syntax highlighting for Kreft .kreft component files."
|
|
4
|
+
version = "0.1.0"
|
|
5
|
+
schema_version = 1
|
|
6
|
+
authors = ["Maxamuud Xuseen"]
|
|
7
|
+
repository = "https://github.com/gadhyare/somjs"
|
|
8
|
+
|
|
9
|
+
[grammars.html]
|
|
10
|
+
repository = "https://github.com/tree-sitter/tree-sitter-html"
|
|
11
|
+
commit = "73a3947324f6efddf9e17c0ea58d454843590cc0"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name = "Kreft"
|
|
2
|
+
grammar = "html"
|
|
3
|
+
path_suffixes = ["kreft", "kreftjs"]
|
|
4
|
+
block_comment = ["<!-- ", " -->"]
|
|
5
|
+
autoclose_before = ">})]"
|
|
6
|
+
brackets = [
|
|
7
|
+
{ start = "<", end = ">", close = true, newline = true },
|
|
8
|
+
{ start = "{", end = "}", close = true, newline = true },
|
|
9
|
+
{ start = "(", end = ")", close = true, newline = false },
|
|
10
|
+
{ start = "[", end = "]", close = true, newline = false },
|
|
11
|
+
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["comment", "string"] },
|
|
12
|
+
{ start = "'", end = "'", close = true, newline = false, not_in = ["comment", "string"] },
|
|
13
|
+
{ start = "<!--", end = " -->", close = true, newline = false, not_in = ["comment", "string"] },
|
|
14
|
+
]
|
|
15
|
+
word_characters = ["-", "$"]
|
|
16
|
+
tab_size = 2
|
|
17
|
+
prettier_parser_name = "html"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(tag_name) @tag
|
|
2
|
+
(erroneous_end_tag_name) @tag.error
|
|
3
|
+
(doctype) @constant
|
|
4
|
+
(attribute_name) @attribute
|
|
5
|
+
(attribute_value) @string
|
|
6
|
+
(quoted_attribute_value) @string
|
|
7
|
+
(comment) @comment
|
|
8
|
+
|
|
9
|
+
; Kreft directives and bindings: k-if, k-for, @click, :value ...
|
|
10
|
+
((attribute_name) @keyword
|
|
11
|
+
(#match? @keyword "^(k-|@|:)"))
|
|
12
|
+
|
|
13
|
+
; <view>, <script>, <style> blocks
|
|
14
|
+
((tag_name) @keyword
|
|
15
|
+
(#match? @keyword "^(view|layout)$"))
|
|
16
|
+
|
|
17
|
+
"=" @punctuation.delimiter
|
|
18
|
+
[ "<" ">" "</" "/>" ] @punctuation.bracket
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
((script_element
|
|
2
|
+
(raw_text) @injection.content)
|
|
3
|
+
(#set! injection.language "javascript"))
|
|
4
|
+
|
|
5
|
+
((style_element
|
|
6
|
+
(raw_text) @injection.content)
|
|
7
|
+
(#set! injection.language "css"))
|
|
8
|
+
|
|
9
|
+
; Inline handlers and bindings are JavaScript expressions
|
|
10
|
+
((attribute
|
|
11
|
+
(attribute_name) @_name
|
|
12
|
+
(quoted_attribute_value (attribute_value) @injection.content))
|
|
13
|
+
(#match? @_name "^(k-|@|:)")
|
|
14
|
+
(#set! injection.language "javascript"))
|
package/kreftjs.d.ts
CHANGED