@fougere/svelte 0.17.3-alpha.0 → 0.18.0-alpha.0

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/index.d.ts CHANGED
@@ -5,5 +5,5 @@ export { facade, facadeOf } from '@fougere/app/client';
5
5
  export { useFormFor, type FormOptions } from './useFormFor.js';
6
6
  export { useCurrentUser } from './useCurrentUser.js';
7
7
  export { fetcher, CALL_ENDPOINT } from '@fougere/app/client';
8
- export type { CallInput, EntityClass, FormEntity, FormField, SessionView, } from '@fougere/app/client';
8
+ export type { CallInput, EntityClass, SchemaView, FormField, SessionView, } from '@fougere/app/client';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
1
  /** The form contract — state, validation, submission, error mapping. */
2
2
  import { type Readable, type Writable } from 'svelte/store';
3
- import { type Choice, type FormEntity, type FormField, type FormFieldName, type FormRow, type FormOptions } from '@fougere/app/client';
3
+ import { type Choice, type SchemaView, type FormField, type FormFieldName, type FormRow, type FormOptions } from '@fougere/app/client';
4
4
  export type { FormOptions };
5
- export declare function useFormFor<E extends FormEntity>(entity: E, options?: FormOptions): {
5
+ export declare function useFormFor<E extends SchemaView>(entity: E, options?: FormOptions): {
6
6
  fields: FormField<FormFieldName<E>>[];
7
7
  /** The same fields, keyed by name — spread `fieldsByName.email.attrs` on an input
8
8
  * and the page states no rule of its own. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/svelte",
3
- "version": "0.17.3-alpha.0",
3
+ "version": "0.18.0-alpha.0",
4
4
  "description": "Fougere's four primitives as Svelte stores — host-independent.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -31,13 +31,13 @@
31
31
  "template"
32
32
  ],
33
33
  "dependencies": {
34
- "@fougere/app": "0.17.3-alpha.0",
35
- "@fougere/core": "0.17.3-alpha.0"
34
+ "@fougere/app": "0.18.0-alpha.0",
35
+ "@fougere/core": "0.18.0-alpha.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "svelte": "^5.53.4",
39
39
  "vitest": "^4.1.0",
40
- "@fougere/schema": "0.17.3-alpha.0"
40
+ "@fougere/schema": "0.18.0-alpha.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "svelte": "^5.0.0"
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@ export { fetcher, CALL_ENDPOINT } from '@fougere/app/client';
10
10
  export type {
11
11
  CallInput,
12
12
  EntityClass,
13
- FormEntity,
13
+ SchemaView,
14
14
  FormField,
15
15
  SessionView,
16
16
  } from '@fougere/app/client';
package/src/useFormFor.ts CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  formFieldsOf,
11
11
  payloadOf,
12
12
  type Choice,
13
- type FormEntity,
13
+ type SchemaView,
14
14
  type FormErrors,
15
15
  type FormField,
16
16
  type FormFieldName,
@@ -22,7 +22,7 @@ import { useCommand } from './useFougereData/CommandStore.js';
22
22
 
23
23
  export type { FormOptions };
24
24
 
25
- export function useFormFor<E extends FormEntity>(entity: E, options: FormOptions = {}) {
25
+ export function useFormFor<E extends SchemaView>(entity: E, options: FormOptions = {}) {
26
26
  const entityKey = entityKeyOf(entity);
27
27
  const fields = formFieldsOf(entity, entityKey);
28
28