symfony-expression-editor 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/CHANGELOG.md +7 -0
- package/README.md +21 -0
- package/dist/index.cjs +1886 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +1884 -0
- package/example.html +46 -0
- package/package.json +48 -0
package/example.html
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<body class="bg-body-secondary container">
|
|
3
|
+
<script type="importmap">
|
|
4
|
+
{
|
|
5
|
+
"imports": {
|
|
6
|
+
"codemirror": "https://esm.sh/*codemirror@6.0.1",
|
|
7
|
+
"@codemirror/state": "https://esm.sh/*@codemirror/state@6.5.2",
|
|
8
|
+
"@codemirror/search": "https://esm.sh/*@codemirror/search@6.5.10",
|
|
9
|
+
"@codemirror/autocomplete": "https://esm.sh/*@codemirror/autocomplete@6.18.6",
|
|
10
|
+
"@codemirror/view": "https://esm.sh/*@codemirror/view@6.36.3",
|
|
11
|
+
"@codemirror/commands": "https://esm.sh/*@codemirror/commands@6.8.0",
|
|
12
|
+
"@codemirror/language": "https://esm.sh/*@codemirror/language@6.10.8",
|
|
13
|
+
"@codemirror/lint": "https://esm.sh/*@codemirror/lint@6.8.4",
|
|
14
|
+
"@lezer/lr": "https://esm.sh/*@lezer/lr@1.4.2",
|
|
15
|
+
"@lezer/highlight": "https://esm.sh/*@lezer/highlight@1.2.1",
|
|
16
|
+
"@lezer/common": "https://esm.sh/*@lezer/common@1.2.3",
|
|
17
|
+
"style-mod": "https://esm.sh/*style-mod@4.1.2",
|
|
18
|
+
"w3c-keyname": "https://esm.sh/*w3c-keyname@2.2.8",
|
|
19
|
+
"crelt": "https://esm.sh/*crelt@1.0.6",
|
|
20
|
+
"@marijn/find-cluster-break": "https://esm.sh/*@marijn/find-cluster-break@1.0.2",
|
|
21
|
+
"@valtzu/codemirror-lang-el": "https://esm.sh/*@valtzu/codemirror-lang-el@0.10.0"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<script type="module" src="dist/index.mjs"></script>
|
|
26
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
27
|
+
<div class="p-5 gap-1 hstack bg-body-secondary">
|
|
28
|
+
<div class="flex-grow-1">
|
|
29
|
+
<textarea rows="1" class="form-control" is="expression-editor">'foobar' starts with 'foo' /* it's true */</textarea>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="p-5 gap-1 vstack flex-wrap bg-body-secondary section" data-bs-theme="dark">
|
|
33
|
+
<div class="form-check form-switch text-body py-">
|
|
34
|
+
<input class="form-check-input" type="checkbox" role="switch" id="light-switch" onchange="this.closest('.section').dataset.bsTheme=this.checked ? 'light' : 'dark'">
|
|
35
|
+
<label class="form-check-label" for="light-switch">Lights</label>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<textarea rows="5" class="form-control" is="expression-editor" data-line-numbers="true" data-config="{"identifiers":[{"name":"x"}]}">
|
|
39
|
+
x == x + 1
|
|
40
|
+
&& 'foobar' starts with 'foo'
|
|
41
|
+
&& x == x + 1
|
|
42
|
+
</textarea>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "symfony-expression-editor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "./dist/index.cjs",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"require": {
|
|
9
|
+
"types": "./dist/index.d.cts",
|
|
10
|
+
"default": "./dist/index.cjs"
|
|
11
|
+
},
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"default": "./dist/index.mjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "pkgroll",
|
|
19
|
+
"dev": "pkgroll --watch",
|
|
20
|
+
"pretest": "npm run-script build",
|
|
21
|
+
"test": "exit 0 # some day we have tests here"
|
|
22
|
+
},
|
|
23
|
+
"description": "Advanced editor for Symfony Expression Language",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@codemirror/autocomplete": "^6.18.6",
|
|
26
|
+
"@codemirror/commands": "^6.8.0",
|
|
27
|
+
"@codemirror/language": "^6.10.8",
|
|
28
|
+
"@codemirror/state": "^6.5.2",
|
|
29
|
+
"@codemirror/view": "^6.36.3",
|
|
30
|
+
"@lezer/highlight": "^1.2.1",
|
|
31
|
+
"@valtzu/codemirror-lang-el": "^0.10.0",
|
|
32
|
+
"codemirror": "^6.0.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"pkgroll": "^2.11.2",
|
|
36
|
+
"tsx": "^4.19.3",
|
|
37
|
+
"typescript": "^5.8.2"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/valtzu/symfony-expression-editor"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public",
|
|
46
|
+
"registry": "https://registry.npmjs.org/"
|
|
47
|
+
}
|
|
48
|
+
}
|