@kerebron/wasm 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/assets/tree-sitter-css/highlights.scm +76 -0
  3. package/assets/tree-sitter-css/release.json +15 -0
  4. package/assets/tree-sitter-css/tree-sitter-css.wasm +0 -0
  5. package/assets/tree-sitter-diff/highlights.scm +49 -0
  6. package/assets/tree-sitter-diff/release.json +15 -0
  7. package/assets/tree-sitter-diff/tree-sitter-diff.wasm +0 -0
  8. package/assets/tree-sitter-html/highlights.scm +13 -0
  9. package/assets/tree-sitter-html/injections.scm +7 -0
  10. package/assets/tree-sitter-html/release.json +15 -0
  11. package/assets/tree-sitter-html/tree-sitter-html.wasm +0 -0
  12. package/assets/tree-sitter-java/highlights.scm +149 -0
  13. package/assets/tree-sitter-java/release.json +15 -0
  14. package/assets/tree-sitter-java/tags.scm +20 -0
  15. package/assets/tree-sitter-java/tree-sitter-java.wasm +0 -0
  16. package/assets/tree-sitter-javascript/highlights-jsx.scm +8 -0
  17. package/assets/tree-sitter-javascript/highlights-params.scm +12 -0
  18. package/assets/tree-sitter-javascript/highlights.scm +204 -0
  19. package/assets/tree-sitter-javascript/injections.scm +31 -0
  20. package/assets/tree-sitter-javascript/locals.scm +23 -0
  21. package/assets/tree-sitter-javascript/release.json +15 -0
  22. package/assets/tree-sitter-javascript/tags.scm +99 -0
  23. package/assets/tree-sitter-javascript/tree-sitter-javascript.wasm +0 -0
  24. package/assets/tree-sitter-json/highlights.scm +16 -0
  25. package/assets/tree-sitter-json/release.json +15 -0
  26. package/assets/tree-sitter-json/tree-sitter-json.wasm +0 -0
  27. package/assets/tree-sitter-markdown/highlights-inline.scm +37 -0
  28. package/assets/tree-sitter-markdown/highlights.scm +52 -0
  29. package/assets/tree-sitter-markdown/injections-inline.scm +2 -0
  30. package/assets/tree-sitter-markdown/injections.scm +14 -0
  31. package/assets/tree-sitter-markdown/release.json +15 -0
  32. package/assets/tree-sitter-markdown/tree-sitter-markdown.wasm +0 -0
  33. package/assets/tree-sitter-markdown/tree-sitter-markdown_inline.wasm +0 -0
  34. package/assets/tree-sitter-regex/highlights.scm +63 -0
  35. package/assets/tree-sitter-regex/release.json +15 -0
  36. package/assets/tree-sitter-regex/tree-sitter-regex.wasm +0 -0
  37. package/assets/tree-sitter-rust/highlights.scm +161 -0
  38. package/assets/tree-sitter-rust/injections.scm +9 -0
  39. package/assets/tree-sitter-rust/release.json +15 -0
  40. package/assets/tree-sitter-rust/tags.scm +60 -0
  41. package/assets/tree-sitter-rust/tree-sitter-rust.wasm +0 -0
  42. package/assets/tree-sitter-toml/highlights.scm +53 -0
  43. package/assets/tree-sitter-toml/release.json +15 -0
  44. package/assets/tree-sitter-toml/tree-sitter-toml.wasm +0 -0
  45. package/assets/tree-sitter-typescript/highlights.scm +35 -0
  46. package/assets/tree-sitter-typescript/locals.scm +2 -0
  47. package/assets/tree-sitter-typescript/release.json +20 -0
  48. package/assets/tree-sitter-typescript/tags.scm +23 -0
  49. package/assets/tree-sitter-typescript/tree-sitter-tsx.wasm +0 -0
  50. package/assets/tree-sitter-typescript/tree-sitter-typescript.wasm +0 -0
  51. package/assets/tree-sitter-xml/highlights-dtd.scm +129 -0
  52. package/assets/tree-sitter-xml/highlights.scm +168 -0
  53. package/assets/tree-sitter-xml/release.json +20 -0
  54. package/assets/tree-sitter-xml/tree-sitter-dtd.wasm +0 -0
  55. package/assets/tree-sitter-xml/tree-sitter-xml.wasm +0 -0
  56. package/assets/tree-sitter-yaml/highlights.scm +79 -0
  57. package/assets/tree-sitter-yaml/release.json +15 -0
  58. package/assets/tree-sitter-yaml/tree-sitter-yaml.wasm +0 -0
  59. package/esm/src/deno.js +1 -1
  60. package/package.json +4 -1
@@ -0,0 +1,35 @@
1
+ ; Types
2
+
3
+ (type_identifier) @type
4
+ (predefined_type) @type.builtin
5
+
6
+ ((identifier) @type
7
+ (#match? @type "^[A-Z]"))
8
+
9
+ (type_arguments
10
+ "<" @punctuation.bracket
11
+ ">" @punctuation.bracket)
12
+
13
+ ; Variables
14
+
15
+ (required_parameter (identifier) @variable.parameter)
16
+ (optional_parameter (identifier) @variable.parameter)
17
+
18
+ ; Keywords
19
+
20
+ [ "abstract"
21
+ "declare"
22
+ "enum"
23
+ "export"
24
+ "implements"
25
+ "interface"
26
+ "keyof"
27
+ "namespace"
28
+ "private"
29
+ "protected"
30
+ "public"
31
+ "type"
32
+ "readonly"
33
+ "override"
34
+ "satisfies"
35
+ ] @keyword
@@ -0,0 +1,2 @@
1
+ (required_parameter (identifier) @local.definition)
2
+ (optional_parameter (identifier) @local.definition)
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "v0.23.2",
3
+ "assets": [
4
+ {
5
+ "name": "tree-sitter-tsx.wasm",
6
+ "url": "https://github.com/tree-sitter/tree-sitter-typescript/releases/download/v0.23.2/tree-sitter-tsx.wasm",
7
+ "size": 1445638
8
+ },
9
+ {
10
+ "name": "tree-sitter-typescript.tar.xz",
11
+ "url": "https://github.com/tree-sitter/tree-sitter-typescript/releases/download/v0.23.2/tree-sitter-typescript.tar.xz",
12
+ "size": 1031994
13
+ },
14
+ {
15
+ "name": "tree-sitter-typescript.wasm",
16
+ "url": "https://github.com/tree-sitter/tree-sitter-typescript/releases/download/v0.23.2/tree-sitter-typescript.wasm",
17
+ "size": 1413849
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,23 @@
1
+ (function_signature
2
+ name: (identifier) @name) @definition.function
3
+
4
+ (method_signature
5
+ name: (property_identifier) @name) @definition.method
6
+
7
+ (abstract_method_signature
8
+ name: (property_identifier) @name) @definition.method
9
+
10
+ (abstract_class_declaration
11
+ name: (type_identifier) @name) @definition.class
12
+
13
+ (module
14
+ name: (identifier) @name) @definition.module
15
+
16
+ (interface_declaration
17
+ name: (type_identifier) @name) @definition.interface
18
+
19
+ (type_annotation
20
+ (type_identifier) @name) @reference.type
21
+
22
+ (new_expression
23
+ constructor: (identifier) @name) @reference.class
@@ -0,0 +1,129 @@
1
+ ;; XML declaration
2
+
3
+ "xml" @keyword
4
+
5
+ [ "version" "encoding" ] @property
6
+
7
+ (EncName) @string.special
8
+
9
+ (VersionNum) @number
10
+
11
+ ;; Processing instructions
12
+
13
+ (PI) @embedded
14
+
15
+ (PI (PITarget) @keyword)
16
+
17
+ ;; Element declaration
18
+
19
+ (elementdecl
20
+ "ELEMENT" @keyword
21
+ (Name) @tag)
22
+
23
+ (contentspec
24
+ (_ (Name) @property))
25
+
26
+ "#PCDATA" @type.builtin
27
+
28
+ [ "EMPTY" "ANY" ] @string.special.symbol
29
+
30
+ [ "*" "?" "+" ] @operator
31
+
32
+ ;; Entity declaration
33
+
34
+ (GEDecl
35
+ "ENTITY" @keyword
36
+ (Name) @constant)
37
+
38
+ (GEDecl (EntityValue) @string)
39
+
40
+ (NDataDecl
41
+ "NDATA" @keyword
42
+ (Name) @label)
43
+
44
+ ;; Parsed entity declaration
45
+
46
+ (PEDecl
47
+ "ENTITY" @keyword
48
+ "%" @operator
49
+ (Name) @constant)
50
+
51
+ (PEDecl (EntityValue) @string)
52
+
53
+ ;; Notation declaration
54
+
55
+ (NotationDecl
56
+ "NOTATION" @keyword
57
+ (Name) @constant)
58
+
59
+ (NotationDecl
60
+ (ExternalID
61
+ (SystemLiteral (URI) @string.special)))
62
+
63
+ ;; Attlist declaration
64
+
65
+ (AttlistDecl
66
+ "ATTLIST" @keyword
67
+ (Name) @tag)
68
+
69
+ (AttDef (Name) @property)
70
+
71
+ (AttDef (Enumeration (Nmtoken) @string))
72
+
73
+ (DefaultDecl (AttValue) @string)
74
+
75
+ [
76
+ (StringType)
77
+ (TokenizedType)
78
+ ] @type.builtin
79
+
80
+ (NotationType "NOTATION" @type.builtin)
81
+
82
+ [
83
+ "#REQUIRED"
84
+ "#IMPLIED"
85
+ "#FIXED"
86
+ ] @attribute
87
+
88
+ ;; Entities
89
+
90
+ (EntityRef) @constant
91
+
92
+ ((EntityRef) @constant.builtin
93
+ (#any-of? @constant.builtin
94
+ "&amp;" "&lt;" "&gt;" "&quot;" "&apos;"))
95
+
96
+ (CharRef) @constant
97
+
98
+ (PEReference) @constant
99
+
100
+ ;; External references
101
+
102
+ [ "PUBLIC" "SYSTEM" ] @keyword
103
+
104
+ (PubidLiteral) @string.special
105
+
106
+ (SystemLiteral (URI) @markup.link)
107
+
108
+ ;; Delimiters & punctuation
109
+
110
+ [
111
+ "<?" "?>"
112
+ "<!" ">"
113
+ "<![" "]]>"
114
+ ] @punctuation.delimiter
115
+
116
+ [ "(" ")" "[" ] @punctuation.bracket
117
+
118
+ [ "\"" "'" ] @punctuation.delimiter
119
+
120
+ [ "," "|" "=" ] @operator
121
+
122
+ ;; Misc
123
+
124
+ ; FIXME: enable when ts test is fixed
125
+ ; [ "INCLUDE" "IGNORE" ] @keyword
126
+
127
+ (Comment) @comment
128
+
129
+ (ERROR) @error
@@ -0,0 +1,168 @@
1
+ ;; XML declaration
2
+
3
+ "xml" @keyword
4
+
5
+ [ "version" "encoding" "standalone" ] @property
6
+
7
+ (EncName) @string.special
8
+
9
+ (VersionNum) @number
10
+
11
+ [ "yes" "no" ] @boolean
12
+
13
+ ;; Processing instructions
14
+
15
+ (PI) @embedded
16
+
17
+ (PI (PITarget) @keyword)
18
+
19
+ ;; Element declaration
20
+
21
+ (elementdecl
22
+ "ELEMENT" @keyword
23
+ (Name) @tag)
24
+
25
+ (contentspec
26
+ (_ (Name) @property))
27
+
28
+ "#PCDATA" @type.builtin
29
+
30
+ [ "EMPTY" "ANY" ] @string.special.symbol
31
+
32
+ [ "*" "?" "+" ] @operator
33
+
34
+ ;; Entity declaration
35
+
36
+ (GEDecl
37
+ "ENTITY" @keyword
38
+ (Name) @constant)
39
+
40
+ (GEDecl (EntityValue) @string)
41
+
42
+ (NDataDecl
43
+ "NDATA" @keyword
44
+ (Name) @label)
45
+
46
+ ;; Parsed entity declaration
47
+
48
+ (PEDecl
49
+ "ENTITY" @keyword
50
+ "%" @operator
51
+ (Name) @constant)
52
+
53
+ (PEDecl (EntityValue) @string)
54
+
55
+ ;; Notation declaration
56
+
57
+ (NotationDecl
58
+ "NOTATION" @keyword
59
+ (Name) @constant)
60
+
61
+ (NotationDecl
62
+ (ExternalID
63
+ (SystemLiteral (URI) @string.special)))
64
+
65
+ ;; Attlist declaration
66
+
67
+ (AttlistDecl
68
+ "ATTLIST" @keyword
69
+ (Name) @tag)
70
+
71
+ (AttDef (Name) @property)
72
+
73
+ (AttDef (Enumeration (Nmtoken) @string))
74
+
75
+ (DefaultDecl (AttValue) @string)
76
+
77
+ [
78
+ (StringType)
79
+ (TokenizedType)
80
+ ] @type.builtin
81
+
82
+ (NotationType "NOTATION" @type.builtin)
83
+
84
+ [
85
+ "#REQUIRED"
86
+ "#IMPLIED"
87
+ "#FIXED"
88
+ ] @attribute
89
+
90
+ ;; Entities
91
+
92
+ (EntityRef) @constant
93
+
94
+ ((EntityRef) @constant.builtin
95
+ (#any-of? @constant.builtin
96
+ "&amp;" "&lt;" "&gt;" "&quot;" "&apos;"))
97
+
98
+ (CharRef) @constant
99
+
100
+ (PEReference) @constant
101
+
102
+ ;; External references
103
+
104
+ [ "PUBLIC" "SYSTEM" ] @keyword
105
+
106
+ (PubidLiteral) @string.special
107
+
108
+ (SystemLiteral (URI) @markup.link)
109
+
110
+ ;; Processing instructions
111
+
112
+ (XmlModelPI "xml-model" @keyword)
113
+
114
+ (StyleSheetPI "xml-stylesheet" @keyword)
115
+
116
+ (PseudoAtt (Name) @property)
117
+
118
+ (PseudoAtt (PseudoAttValue) @string)
119
+
120
+ ;; Doctype declaration
121
+
122
+ (doctypedecl "DOCTYPE" @keyword)
123
+
124
+ (doctypedecl (Name) @type)
125
+
126
+ ;; Tags
127
+
128
+ (STag (Name) @tag)
129
+
130
+ (ETag (Name) @tag)
131
+
132
+ (EmptyElemTag (Name) @tag)
133
+
134
+ ;; Attributes
135
+
136
+ (Attribute (Name) @property)
137
+
138
+ (Attribute (AttValue) @string)
139
+
140
+ ;; Delimiters & punctuation
141
+
142
+ [
143
+ "<?" "?>"
144
+ "<!" "]]>"
145
+ "<" ">"
146
+ "</" "/>"
147
+ ] @punctuation.delimiter
148
+
149
+ [ "(" ")" "[" "]" ] @punctuation.bracket
150
+
151
+ [ "\"" "'" ] @punctuation.delimiter
152
+
153
+ [ "," "|" "=" ] @operator
154
+
155
+ ;; Text
156
+
157
+ (CharData) @markup
158
+
159
+ (CDSect
160
+ (CDStart) @markup.heading
161
+ (CData) @markup.raw
162
+ "]]>" @markup.heading)
163
+
164
+ ;; Misc
165
+
166
+ (Comment) @comment
167
+
168
+ (ERROR) @error
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "v0.7.0",
3
+ "assets": [
4
+ {
5
+ "name": "tree-sitter-dtd.wasm",
6
+ "url": "https://github.com/tree-sitter-grammars/tree-sitter-xml/releases/download/v0.7.0/tree-sitter-dtd.wasm",
7
+ "size": 33883
8
+ },
9
+ {
10
+ "name": "tree-sitter-xml.tar.xz",
11
+ "url": "https://github.com/tree-sitter-grammars/tree-sitter-xml/releases/download/v0.7.0/tree-sitter-xml.tar.xz",
12
+ "size": 59992
13
+ },
14
+ {
15
+ "name": "tree-sitter-xml.wasm",
16
+ "url": "https://github.com/tree-sitter-grammars/tree-sitter-xml/releases/download/v0.7.0/tree-sitter-xml.wasm",
17
+ "size": 47032
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,79 @@
1
+ (boolean_scalar) @boolean
2
+
3
+ (null_scalar) @constant.builtin
4
+
5
+ [
6
+ (double_quote_scalar)
7
+ (single_quote_scalar)
8
+ (block_scalar)
9
+ (string_scalar)
10
+ ] @string
11
+
12
+ [
13
+ (integer_scalar)
14
+ (float_scalar)
15
+ ] @number
16
+
17
+ (comment) @comment
18
+
19
+ [
20
+ (anchor_name)
21
+ (alias_name)
22
+ ] @label
23
+
24
+ (tag) @type
25
+
26
+ [
27
+ (yaml_directive)
28
+ (tag_directive)
29
+ (reserved_directive)
30
+ ] @attribute
31
+
32
+ (block_mapping_pair
33
+ key: (flow_node
34
+ [
35
+ (double_quote_scalar)
36
+ (single_quote_scalar)
37
+ ] @property))
38
+
39
+ (block_mapping_pair
40
+ key: (flow_node
41
+ (plain_scalar
42
+ (string_scalar) @property)))
43
+
44
+ (flow_mapping
45
+ (_
46
+ key: (flow_node
47
+ [
48
+ (double_quote_scalar)
49
+ (single_quote_scalar)
50
+ ] @property)))
51
+
52
+ (flow_mapping
53
+ (_
54
+ key: (flow_node
55
+ (plain_scalar
56
+ (string_scalar) @property))))
57
+
58
+ [
59
+ ","
60
+ "-"
61
+ ":"
62
+ ">"
63
+ "?"
64
+ "|"
65
+ ] @punctuation.delimiter
66
+
67
+ [
68
+ "["
69
+ "]"
70
+ "{"
71
+ "}"
72
+ ] @punctuation.bracket
73
+
74
+ [
75
+ "*"
76
+ "&"
77
+ "---"
78
+ "..."
79
+ ] @punctuation.special
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "v0.7.2",
3
+ "assets": [
4
+ {
5
+ "name": "tree-sitter-yaml.tar.gz",
6
+ "url": "https://github.com/tree-sitter-grammars/tree-sitter-yaml/releases/download/v0.7.2/tree-sitter-yaml.tar.gz",
7
+ "size": 174405
8
+ },
9
+ {
10
+ "name": "tree-sitter-yaml.wasm",
11
+ "url": "https://github.com/tree-sitter-grammars/tree-sitter-yaml/releases/download/v0.7.2/tree-sitter-yaml.wasm",
12
+ "size": 189197
13
+ }
14
+ ]
15
+ }
package/esm/src/deno.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export function denoCdn() {
2
- return globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).resolve('../files');
2
+ return globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).resolve('../assets');
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerebron/wasm",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Mirror of https://github.com/tree-sitter-grammars and other wasm files",
5
5
  "license": "MIT",
6
6
  "module": "./esm/src/mod.js",
@@ -10,6 +10,9 @@
10
10
  },
11
11
  "./deno": {
12
12
  "import": "./esm/src/deno.js"
13
+ },
14
+ "./assets/*.css": {
15
+ "import": "./assets/*.css"
13
16
  }
14
17
  },
15
18
  "scripts": {},