svelte-json-schema-form 0.0.4-alpha2 → 0.0.4

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.
@@ -68,25 +68,6 @@
68
68
 
69
69
  setContext(context, formController); // make form controller available to all children
70
70
 
71
- /*
72
- // schema, fragments, value
73
- // TODO subscribe to store as well to set value
74
- // TODO can this be simpler?
75
- $: { // values changed
76
- console.log("SETTING VALUE");
77
- store.set(['value'], value);
78
- }
79
-
80
- $: { // schema changed
81
- console.log("SETTING SCHEMA");
82
- store.set(['schema'], schema ?? {});
83
- }
84
-
85
- $: { // fragments changed
86
- store.set(['fragments'], fragments ?? {});
87
- }
88
- */
89
-
90
71
  onMount(() => {
91
72
  const unsubscribeValue = formController.subscribeValue((storeValue) => {
92
73
  value = storeValue;
@@ -7,9 +7,9 @@ declare namespace _default {
7
7
  export { FormActionButton as actionButton };
8
8
  }
9
9
  export default _default;
10
- import FormInputWrapper from "./components/inputs/FormInputWrapper.svelte";
11
- import FormArrayInput from "./components/inputs/FormArrayInput.svelte";
12
- import FormObjectInput from "./components/inputs/FormObjectInput.svelte";
13
- import FormTextInput from "./components/inputs/FormTextInput.svelte";
14
- import FormCheckboxInput from "./components/inputs/FormCheckboxInput.svelte";
15
- import FormActionButton from "./components/inputs/FormActionButton.svelte";
10
+ import FormInputWrapper from "./inputs/FormInputWrapper.svelte";
11
+ import FormArrayInput from "./inputs/FormArrayInput.svelte";
12
+ import FormObjectInput from "./inputs/FormObjectInput.svelte";
13
+ import FormTextInput from "./inputs/FormTextInput.svelte";
14
+ import FormCheckboxInput from "./inputs/FormCheckboxInput.svelte";
15
+ import FormActionButton from "./inputs/FormActionButton.svelte";
@@ -1,9 +1,9 @@
1
- import FormInputWrapper from "./components/inputs/FormInputWrapper.svelte";
2
- import FormArrayInput from "./components/inputs/FormArrayInput.svelte";
3
- import FormObjectInput from "./components/inputs/FormObjectInput.svelte";
4
- import FormTextInput from "./components/inputs/FormTextInput.svelte";
5
- import FormCheckboxInput from "./components/inputs/FormCheckboxInput.svelte";
6
- import FormActionButton from "./components/inputs/FormActionButton.svelte";
1
+ import FormInputWrapper from "./inputs/FormInputWrapper.svelte";
2
+ import FormArrayInput from "./inputs/FormArrayInput.svelte";
3
+ import FormObjectInput from "./inputs/FormObjectInput.svelte";
4
+ import FormTextInput from "./inputs/FormTextInput.svelte";
5
+ import FormCheckboxInput from "./inputs/FormCheckboxInput.svelte";
6
+ import FormActionButton from "./inputs/FormActionButton.svelte";
7
7
 
8
8
  export default {
9
9
  wrapper: FormInputWrapper,
@@ -20,4 +20,4 @@
20
20
  }
21
21
  </script>
22
22
 
23
- <button on:click={handleButtonClick}>{schema?.label ?? ""}</button>
23
+ <button onclick={handleButtonClick}>{schema?.label ?? ""}</button>
@@ -81,15 +81,15 @@
81
81
  valuePathParts={[...valuePathParts, itemIndex]}
82
82
  />
83
83
  {#if itemIndex > 0}
84
- <input type="button" on:click={() => moveItem(itemIndex, itemIndex-1)} value="Move Up" />
84
+ <input type="button" onclick={() => moveItem(itemIndex, itemIndex-1)} value="Move Up" />
85
85
  {/if}
86
86
  {#if itemIndex < value.length - 1}
87
- <input type="button" on:click={() => moveItem(itemIndex, itemIndex+1)} value="Move Down" />
87
+ <input type="button" onclick={() => moveItem(itemIndex, itemIndex+1)} value="Move Down" />
88
88
  {/if}
89
- <input type="button" on:click={() => deleteItem(itemIndex)} value="Remove Item" />
89
+ <input type="button" onclick={() => deleteItem(itemIndex)} value="Remove Item" />
90
90
  {/each}
91
91
 
92
92
  <hr />
93
- <input type="button" on:click={addItem} value="Add Item" />
93
+ <input type="button" onclick={addItem} value="Add Item" />
94
94
  {/if}
95
95
 
@@ -8,6 +8,6 @@
8
8
  {#if extras}
9
9
  Extras {JSON.stringify(extras)}
10
10
 
11
- <button on:click={() => { extras = {key: "value2"}; }}>Set</button>
11
+ <button onclick={() => { extras = {key: "value2"}; }}>Set</button>
12
12
  {/if}
13
13
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-json-schema-form",
3
- "version": "0.0.4-alpha2",
3
+ "version": "0.0.4",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -35,14 +35,14 @@
35
35
  "svelte": "^5.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "json-form-core": "^0.0.8",
39
- "svelte-utility-stores": "^1.0.1"
38
+ "json-form-core": "^0.0.9",
39
+ "svelte-utility-stores": "^1.0.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/compat": "^2.0.3",
43
43
  "@eslint/js": "^10.0.1",
44
44
  "@sveltejs/adapter-auto": "^7.0.0",
45
- "@sveltejs/kit": "^2.50.2",
45
+ "@sveltejs/kit": "^2.70.3",
46
46
  "@sveltejs/package": "^2.5.7",
47
47
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
48
48
  "@types/node": "^22",