@actualwave/codemirror-lang-embed-sksl 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.
Files changed (2) hide show
  1. package/index.js +18 -0
  2. package/package.json +22 -0
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ const { skslLanguage, sksl } = require('@actualwave/codemirror-lang-sksl');
2
+ const { matchTagName } = require('@actualwave/codemirror-lang-embed-core');
3
+
4
+ // @actualwave/codemirror-lang-sksl exports a ready-to-use LRLanguage
5
+ // (skslLanguage) directly, same shape as cm6-graphql's graphqlLanguage — no
6
+ // factory call needed for the grammar itself. This is the same grammar the
7
+ // `.sksl` file mode uses; see SINGLE_FILE_PROTOTYPES.md's "Relationship to
8
+ // .sksl files" section. The sksl() factory's `.support` carries the
9
+ // completion source, so it's still called for that.
10
+ function createEmbedding() {
11
+ return {
12
+ matcher: matchTagName('sksl'),
13
+ language: skslLanguage,
14
+ extension: sksl().support,
15
+ };
16
+ }
17
+
18
+ module.exports = { createEmbedding };
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@actualwave/codemirror-lang-embed-sksl",
3
+ "version": "0.1.0",
4
+ "description": "Registers the `sksl` tagged-template tag for embedded SKSL shader highlighting inside JS/TSX",
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-sksl"
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-sksl",
16
+ "dependencies": {
17
+ "@actualwave/codemirror-lang-embed-core": "*"
18
+ },
19
+ "peerDependencies": {
20
+ "@actualwave/codemirror-lang-sksl": "^0.1.0"
21
+ }
22
+ }