svelte-tweakpane-ui 1.3.1 → 1.3.3
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/dist/control/Text.svelte +2 -1
- package/dist/extra/Element.svelte +1 -1
- package/dist/utils.js +6 -1
- package/package.json +6 -6
- package/readme.md +0 -2
package/dist/control/Text.svelte
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { onDestroy } from 'svelte';
|
|
6
6
|
export let value;
|
|
7
7
|
export let live = true;
|
|
8
|
+
const options = { view: 'text' };
|
|
8
9
|
let ref;
|
|
9
10
|
onDestroy(() => {
|
|
10
11
|
updateListeners(live ?? true, true);
|
|
@@ -20,4 +21,4 @@
|
|
|
20
21
|
$: ref && live !== void 0 && updateListeners(live);
|
|
21
22
|
</script>
|
|
22
23
|
|
|
23
|
-
<GenericInput bind:value bind:ref on:change {...$$restProps} />
|
|
24
|
+
<GenericInput bind:value bind:ref on:change {options} {...$$restProps} />
|
package/dist/utils.js
CHANGED
|
@@ -84,7 +84,12 @@ export function getElementIndex(element) {
|
|
|
84
84
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
85
85
|
let sibling = element;
|
|
86
86
|
while ((sibling = sibling.previousElementSibling) !== null) {
|
|
87
|
-
|
|
87
|
+
// The Element component can add extra stuff to the DOM which will mess up counting...
|
|
88
|
+
// So we add an extra class to its wrapper and don't let it increment the index.
|
|
89
|
+
// This was the cause of https://github.com/kitschpatrol/svelte-tweakpane-ui/issues/18
|
|
90
|
+
if (!sibling.classList.contains('skip-element-index')) {
|
|
91
|
+
index++;
|
|
92
|
+
}
|
|
88
93
|
}
|
|
89
94
|
return index;
|
|
90
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-tweakpane-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.",
|
|
6
6
|
"repository": {
|
|
@@ -205,20 +205,20 @@
|
|
|
205
205
|
"@phenomnomnominal/tsquery": "^6.1.3",
|
|
206
206
|
"@playwright/test": "^1.47.1",
|
|
207
207
|
"@stkb/rewrap": "^0.1.0",
|
|
208
|
-
"@sveltejs/adapter-static": "^3.0.
|
|
209
|
-
"@sveltejs/kit": "^2.5.
|
|
208
|
+
"@sveltejs/adapter-static": "^3.0.5",
|
|
209
|
+
"@sveltejs/kit": "^2.5.28",
|
|
210
210
|
"@sveltejs/package": "^2.3.5",
|
|
211
211
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
212
212
|
"@types/eslint": "^8.56.12",
|
|
213
213
|
"@types/fs-extra": "^11.0.4",
|
|
214
214
|
"@types/node": "18.0.0",
|
|
215
215
|
"bumpp": "^9.5.2",
|
|
216
|
-
"eslint": "^8.57.
|
|
216
|
+
"eslint": "^8.57.1",
|
|
217
217
|
"fs-extra": "^11.2.0",
|
|
218
218
|
"glob": "^11.0.0",
|
|
219
219
|
"npm-run-all": "^4.1.5",
|
|
220
220
|
"postcss-html": "^1.7.0",
|
|
221
|
-
"publint": "^0.2.
|
|
221
|
+
"publint": "^0.2.11",
|
|
222
222
|
"read-package-up": "^11.0.0",
|
|
223
223
|
"remark-mdat": "^0.7.3",
|
|
224
224
|
"svelte": "^4.2.19",
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"tslib": "^2.7.0",
|
|
230
230
|
"tsx": "^4.19.1",
|
|
231
231
|
"typescript": "^5.6.2",
|
|
232
|
-
"vite": "^5.4.
|
|
232
|
+
"vite": "^5.4.6",
|
|
233
233
|
"yaml": "^2.5.1"
|
|
234
234
|
},
|
|
235
235
|
"publishConfig": {
|
package/readme.md
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
</picture>
|
|
13
13
|
|
|
14
14
|
<!-- badges {
|
|
15
|
-
npm: ["svelte-tweakpane-ui"],
|
|
16
15
|
custom: {
|
|
17
16
|
MadeWithSvelte: {
|
|
18
17
|
image: "https://madewithsvelte.com/storage/repo-shields/4860-shield.svg",
|
|
@@ -26,7 +25,6 @@
|
|
|
26
25
|
}
|
|
27
26
|
} -->
|
|
28
27
|
|
|
29
|
-
[](https://npmjs.com/package/svelte-tweakpane-ui)
|
|
30
28
|
[](https://npmjs.com/package/svelte-tweakpane-ui)
|
|
31
29
|
[](https://opensource.org/licenses/MIT)
|
|
32
30
|
[](https://madewithsvelte.com/p/svelte-tweakpane-ui/shield-link)
|