@daltonr/pathwrite-svelte 0.6.2 → 0.6.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.
@@ -27,6 +27,13 @@
27
27
  * - "form": Cancel on left, Submit alone on right. Back button never shown.
28
28
  */
29
29
  footerLayout?: "wizard" | "form" | "auto";
30
+ /**
31
+ * Controls whether the shell renders its auto-generated field-error summary box.
32
+ * - `"summary"` (default): Shell renders the labeled error list below the step body.
33
+ * - `"inline"`: Suppress the summary — handle errors inside the step template instead.
34
+ * - `"both"`: Render the shell summary AND whatever the step template renders.
35
+ */
36
+ validationDisplay?: "summary" | "inline" | "both";
30
37
  // Callback props replace event dispatching in Svelte 5
31
38
  oncomplete?: (data: PathData) => void;
32
39
  oncancel?: (data: PathData) => void;
@@ -50,6 +57,7 @@
50
57
  hideCancel = false,
51
58
  hideProgress = false,
52
59
  footerLayout = 'auto',
60
+ validationDisplay = 'inline',
53
61
  oncomplete,
54
62
  oncancel,
55
63
  onevent,
@@ -158,8 +166,8 @@
158
166
  {/if}
159
167
  </div>
160
168
 
161
- <!-- Validation messages — labeled by field name -->
162
- {#if snap.hasAttemptedNext && Object.keys(snap.fieldMessages).length > 0}
169
+ <!-- Validation messages — suppressed when validationDisplay="inline" -->
170
+ {#if validationDisplay !== 'inline' && snap.hasAttemptedNext && Object.keys(snap.fieldMessages).length > 0}
163
171
  <ul class="pw-shell__validation">
164
172
  {#each Object.entries(snap.fieldMessages) as [key, msg]}
165
173
  <li class="pw-shell__validation-item">
@@ -18,6 +18,13 @@ interface Props {
18
18
  * - "form": Cancel on left, Submit alone on right. Back button never shown.
19
19
  */
20
20
  footerLayout?: "wizard" | "form" | "auto";
21
+ /**
22
+ * Controls whether the shell renders its auto-generated field-error summary box.
23
+ * - `"summary"` (default): Shell renders the labeled error list below the step body.
24
+ * - `"inline"`: Suppress the summary — handle errors inside the step template instead.
25
+ * - `"both"`: Render the shell summary AND whatever the step template renders.
26
+ */
27
+ validationDisplay?: "summary" | "inline" | "both";
21
28
  oncomplete?: (data: PathData) => void;
22
29
  oncancel?: (data: PathData) => void;
23
30
  onevent?: (event: any) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"PathShell.svelte.d.ts","sourceRoot":"","sources":["../src/PathShell.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IAE1C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAE/B,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9C,CAAC,GAAG,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,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC;CAC9B;AAwLH,QAAA,MAAM,SAAS;mBAlGQ,OAAO,CAAC,IAAI,CAAC;MAkGmB,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daltonr/pathwrite-svelte",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Svelte 5 adapter for @daltonr/pathwrite-core — runes-based reactive bindings and optional PathShell component.",
@@ -52,7 +52,7 @@
52
52
  "svelte": ">=5.0.0"
53
53
  },
54
54
  "dependencies": {
55
- "@daltonr/pathwrite-core": "^0.6.2"
55
+ "@daltonr/pathwrite-core": "^0.6.3"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@sveltejs/package": "^2.5.7",
@@ -27,6 +27,13 @@
27
27
  * - "form": Cancel on left, Submit alone on right. Back button never shown.
28
28
  */
29
29
  footerLayout?: "wizard" | "form" | "auto";
30
+ /**
31
+ * Controls whether the shell renders its auto-generated field-error summary box.
32
+ * - `"summary"` (default): Shell renders the labeled error list below the step body.
33
+ * - `"inline"`: Suppress the summary — handle errors inside the step template instead.
34
+ * - `"both"`: Render the shell summary AND whatever the step template renders.
35
+ */
36
+ validationDisplay?: "summary" | "inline" | "both";
30
37
  // Callback props replace event dispatching in Svelte 5
31
38
  oncomplete?: (data: PathData) => void;
32
39
  oncancel?: (data: PathData) => void;
@@ -50,6 +57,7 @@
50
57
  hideCancel = false,
51
58
  hideProgress = false,
52
59
  footerLayout = 'auto',
60
+ validationDisplay = 'inline',
53
61
  oncomplete,
54
62
  oncancel,
55
63
  onevent,
@@ -158,8 +166,8 @@
158
166
  {/if}
159
167
  </div>
160
168
 
161
- <!-- Validation messages — labeled by field name -->
162
- {#if snap.hasAttemptedNext && Object.keys(snap.fieldMessages).length > 0}
169
+ <!-- Validation messages — suppressed when validationDisplay="inline" -->
170
+ {#if validationDisplay !== 'inline' && snap.hasAttemptedNext && Object.keys(snap.fieldMessages).length > 0}
163
171
  <ul class="pw-shell__validation">
164
172
  {#each Object.entries(snap.fieldMessages) as [key, msg]}
165
173
  <li class="pw-shell__validation-item">