@formisch/svelte 0.4.0 → 0.4.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.
@@ -125,10 +125,10 @@ function move(form, config) {
125
125
  internalArrayStore.items.value = newItems;
126
126
  const tempInternalFieldStore = {};
127
127
  initializeFieldStore(tempInternalFieldStore, internalArrayStore.schema.item, void 0, []);
128
- copyItemState(internalArrayStore.children[config.from < config.to ? config.from : config.to], tempInternalFieldStore);
128
+ copyItemState(internalArrayStore.children[config.from], tempInternalFieldStore);
129
129
  if (config.from < config.to) for (let index = config.from; index < config.to; index++) copyItemState(internalArrayStore.children[index + 1], internalArrayStore.children[index]);
130
130
  else for (let index = config.from; index > config.to; index--) copyItemState(internalArrayStore.children[index - 1], internalArrayStore.children[index]);
131
- copyItemState(tempInternalFieldStore, internalArrayStore.children[config.from < config.to ? config.to : config.from]);
131
+ copyItemState(tempInternalFieldStore, internalArrayStore.children[config.to]);
132
132
  internalArrayStore.isTouched.value = true;
133
133
  internalArrayStore.isDirty.value = internalArrayStore.startItems.value.join() !== newItems.join();
134
134
  validateIfRequired(internalFormStore, internalArrayStore, "input");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formisch/svelte",
3
3
  "description": "The modular and type-safe form library for Svelte",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
@@ -51,8 +51,8 @@
51
51
  "typescript": "^5.9.2",
52
52
  "typescript-eslint": "^8.43.0",
53
53
  "vite": "^7.1.5",
54
- "@formisch/methods": "0.4.0",
55
- "@formisch/core": "0.4.1"
54
+ "@formisch/core": "0.4.1",
55
+ "@formisch/methods": "0.4.1"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "svelte": "^5.29.0",