@nsis/dent-ui 0.2.0 → 0.2.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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/README.md +4 -17
- package/package.json +1 -1
- package/src/App.svelte +8 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
$ vite build
|
|
2
|
-
|
|
2
|
+
9:28:12 PM [vite-plugin-svelte] no Svelte config found at /home/runner/work/nsis-javascript-tools/nsis-javascript-tools/packages/dent-ui - using default configuration.
|
|
3
3
|
[36mvite v8.1.3 [32mbuilding client environment for production...[36m[39m
|
|
4
4
|
[2K
|
|
5
5
|
rendering chunks...
|
|
6
6
|
computing gzip size...
|
|
7
7
|
dist/index.html 0.30 kB │ gzip: 0.22 kB
|
|
8
|
-
dist/assets/index-
|
|
8
|
+
dist/assets/index-RxzOIm4G.js 404.08 kB │ gzip: 132.91 kB
|
|
9
9
|
|
|
10
|
-
[32m✓ built in
|
|
10
|
+
[32m✓ built in 320ms[39m
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -12,27 +12,14 @@
|
|
|
12
12
|
|
|
13
13
|
```svelte
|
|
14
14
|
<script>
|
|
15
|
-
import
|
|
15
|
+
import DentUI from '@nsis/dent-ui/DentUI.svelte';
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<
|
|
19
|
-
dark={true}
|
|
20
|
-
label="NSIS editor"
|
|
21
|
-
oncreate={(view) => view.focus()}
|
|
22
|
-
/>
|
|
18
|
+
<DentUI strict={true} />
|
|
23
19
|
```
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ------------ | --------------------------- | ------- | -------------------------------------- |
|
|
29
|
-
| `dark` | `boolean` | `true` | Use dark theme |
|
|
30
|
-
| `extensions` | `Extension[]` | `[]` | Additional CodeMirror extensions |
|
|
31
|
-
| `label` | `string` | `''` | Accessible label for the editor |
|
|
32
|
-
| `strict` | `boolean` | `false` | Case-sensitive NSIS keyword matching |
|
|
33
|
-
| `oncreate` | `(view: EditorView) => void`| — | Callback when the editor view is ready |
|
|
34
|
-
|
|
35
|
-
By default, NSIS keywords are matched case-insensitively (e.g. `messagebox` and `MessageBox` are both highlighted). Set `strict` to `true` to require canonical casing.
|
|
21
|
+
> [!NOTE]
|
|
22
|
+
> By default, NSIS keywords are matched case-insensitively (e.g. `messagebox` and `MessageBox` are both highlighted). Set `strict` to `true` to require canonical casing.
|
|
36
23
|
|
|
37
24
|
## License
|
|
38
25
|
|
package/package.json
CHANGED
package/src/App.svelte
CHANGED
|
@@ -6,6 +6,8 @@ import { createFormatter } from '@nsis/dent';
|
|
|
6
6
|
import { onDestroy, onMount } from 'svelte';
|
|
7
7
|
import Editor from './Editor.svelte';
|
|
8
8
|
|
|
9
|
+
let { strict = false }: { strict?: boolean } = $props();
|
|
10
|
+
|
|
9
11
|
let dark = $state(document.documentElement.dataset.theme !== 'light');
|
|
10
12
|
let themePreference = $state(localStorage.getItem('theme') || 'system');
|
|
11
13
|
|
|
@@ -199,15 +201,20 @@ const outputExtensions = [EditorState.readOnly.of(true), EditorView.editable.of(
|
|
|
199
201
|
<div class="pane-header">Input</div>
|
|
200
202
|
<Editor
|
|
201
203
|
{dark}
|
|
204
|
+
{strict}
|
|
202
205
|
extensions={inputExtensions}
|
|
203
206
|
label="NSIS input editor"
|
|
204
|
-
oncreate={(v) => {
|
|
207
|
+
oncreate={(v) => {
|
|
208
|
+
inputView = v;
|
|
209
|
+
v.focus();
|
|
210
|
+
}}
|
|
205
211
|
/>
|
|
206
212
|
</div>
|
|
207
213
|
<div class="editor-pane">
|
|
208
214
|
<div class="pane-header">Output</div>
|
|
209
215
|
<Editor
|
|
210
216
|
{dark}
|
|
217
|
+
{strict}
|
|
211
218
|
extensions={outputExtensions}
|
|
212
219
|
label="Formatted output editor"
|
|
213
220
|
oncreate={(v) => (outputView = v)}
|