@actualwave/codemirror-lang-embed-react-native 0.0.0-stage → 0.1.0
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/index.js +14 -0
- package/package.json +22 -4
- package/README.md +0 -3
package/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { reactNativeCompletionSource } = require('@actualwave/codemirror-lang-react-native');
|
|
2
|
+
|
|
3
|
+
// Like embed-tailwind, this DSL has no grammar to parse — React/React Native
|
|
4
|
+
// contextual completion is layered entirely on the existing JS/JSX parser via
|
|
5
|
+
// a CompletionSource, so this package exports `createSupportExtension`
|
|
6
|
+
// (plain CM extensions to merge into the JS/TSX language's `support` array)
|
|
7
|
+
// rather than `createEmbedding()` (matcher + nested Language).
|
|
8
|
+
function createSupportExtension(jsLanguageSupport, config) {
|
|
9
|
+
return jsLanguageSupport.language.data.of({
|
|
10
|
+
autocomplete: reactNativeCompletionSource(config),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = { createSupportExtension };
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actualwave/codemirror-lang-embed-react-native",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React / React Native contextual completion (imports, JSX tags/attributes, style properties) wired into the JS/TSX language",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/burdiuz/codemorror-lang-modules.git",
|
|
10
|
+
"directory": "packages/embed-react-native"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/burdiuz/codemorror-lang-modules/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/burdiuz/codemorror-lang-modules/tree/main/packages/embed-react-native",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@actualwave/codemirror-lang-react-native": "*"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"@codemirror/autocomplete": "^6.0.0",
|
|
21
|
+
"@codemirror/language": "^6.0.0",
|
|
22
|
+
"@codemirror/state": "^6.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/README.md
DELETED