@php-script/editor-svelte 0.1.0 → 0.1.1
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 +29 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @php-script/editor-svelte
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@php-script/editor-svelte)
|
|
4
|
+
[](https://www.npmjs.com/package/@php-script/editor-svelte)
|
|
5
|
+
|
|
6
|
+
Documentation: https://php-script.github.io/php-script-editor/packages/svelte.html
|
|
7
|
+
|
|
8
|
+
Svelte 5 wrapper for the `<php-script-editor>` web component, with `bind:value`. Loads the element in `onMount`, so it is safe with SvelteKit SSR.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm i @php-script/editor-svelte monaco-editor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```svelte
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { PhpScriptEditor } from '@php-script/editor-svelte';
|
|
21
|
+
|
|
22
|
+
let code = $state('echo "Hello";');
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<PhpScriptEditor bind:value={code} configUrl="/php-script/config" />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
See the [documentation](https://php-script.github.io/php-script-editor/packages/svelte.html) for all props, events and methods, and
|
|
29
|
+
[Server and language config](https://php-script.github.io/php-script-editor/server.html) for the endpoints.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-script/editor-svelte",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Svelte 5 wrapper for the <php-script-editor> web component (bind:value support).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@php-script/editor": "^0.1.
|
|
22
|
+
"@php-script/editor": "^0.1.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"monaco-editor": ">=0.55.0 <1.0.0",
|