@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.
@@ -1,10 +1,10 @@
1
1
  $ vite build
2
- 8:42:00 PM [vite-plugin-svelte] no Svelte config found at /home/runner/work/nsis-javascript-tools/nsis-javascript-tools/packages/dent-ui - using default configuration.
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
  vite v8.1.3 building client environment for production...
4
4
  
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-COUmeiB0.js 404.01 kB │ gzip: 132.90 kB
8
+ dist/assets/index-RxzOIm4G.js 404.08 kB │ gzip: 132.91 kB
9
9
 
10
- ✓ built in 218ms
10
+ ✓ built in 320ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @nsis/dent-ui
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 952f39c: fix: expose `strict` prop on exported component
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -12,27 +12,14 @@
12
12
 
13
13
  ```svelte
14
14
  <script>
15
- import Editor from '@nsis/dent-ui/Editor.svelte';
15
+ import DentUI from '@nsis/dent-ui/DentUI.svelte';
16
16
  </script>
17
17
 
18
- <Editor
19
- dark={true}
20
- label="NSIS editor"
21
- oncreate={(view) => view.focus()}
22
- />
18
+ <DentUI strict={true} />
23
19
  ```
24
20
 
25
- ### Props
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsis/dent-ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Web UI for the Dent NSIS code formatter",
5
5
  "license": "MIT",
6
6
  "type": "module",
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) => { inputView = v; v.focus(); }}
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)}