@pyreon/feature 0.11.4 → 0.11.6

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/src/types.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { FormState, SchemaValidateFn } from "@pyreon/form"
2
- import type { QueryKey, UseMutationResult, UseQueryResult } from "@pyreon/query"
3
- import type { Computed, Signal } from "@pyreon/reactivity"
4
- import type { StoreApi } from "@pyreon/store"
5
- import type { SortingState } from "@pyreon/table"
6
- import type { FieldInfo } from "./schema"
1
+ import type { FormState, SchemaValidateFn } from '@pyreon/form'
2
+ import type { QueryKey, UseMutationResult, UseQueryResult } from '@pyreon/query'
3
+ import type { Computed, Signal } from '@pyreon/reactivity'
4
+ import type { StoreApi } from '@pyreon/store'
5
+ import type { SortingState } from '@pyreon/table'
6
+ import type { FieldInfo } from './schema'
7
7
 
8
8
  /**
9
9
  * Duck-typed schema inference. Matches Zod (`_output`), Valibot, ArkType
@@ -57,13 +57,13 @@ export interface ListOptions {
57
57
  */
58
58
  export interface FeatureFormOptions<TValues extends Record<string, unknown>> {
59
59
  /** 'create' (default) or 'edit'. Edit mode uses PUT instead of POST. */
60
- mode?: "create" | "edit"
60
+ mode?: 'create' | 'edit'
61
61
  /** Item ID — required when mode is 'edit'. Used to PUT to api/:id and auto-fetch data. */
62
62
  id?: string | number
63
63
  /** Override initial values (merged with feature defaults). */
64
64
  initialValues?: Partial<TValues>
65
65
  /** When to validate: 'blur' (default), 'change', or 'submit'. */
66
- validateOn?: "blur" | "change" | "submit"
66
+ validateOn?: 'blur' | 'change' | 'submit'
67
67
  /** Callback after successful create/update. */
68
68
  onSuccess?: (result: unknown) => void
69
69
  /** Callback on submit error. */
@@ -87,7 +87,7 @@ export interface FeatureTableOptions<TValues extends Record<string, unknown>> {
87
87
  */
88
88
  export interface FeatureTableResult<TValues extends Record<string, unknown>> {
89
89
  /** The reactive TanStack Table instance. */
90
- table: Computed<import("@pyreon/table").Table<TValues>>
90
+ table: Computed<import('@pyreon/table').Table<TValues>>
91
91
  /** Sorting state signal — bind to UI controls. */
92
92
  sorting: Signal<SortingState>
93
93
  /** Global filter signal — bind to search input. */