[{"data":1,"prerenderedAt":1314},["ShallowReactive",2],{"content-\u002Fdocs\u002Fapi\u002Fzod-v4":3},{"id":4,"title":5,"body":6,"description":1307,"extension":1308,"meta":1309,"navigation":632,"path":1310,"seo":1311,"stem":1312,"__hash__":1313},"docs\u002Fdocs\u002Fapi\u002Fzod-v4.md","attaform\u002Fzod-v4 — explicit Zod 4 subpath",{"type":7,"value":8,"toc":1294},"minimark",[9,17,29,46,56,100,107,115,169,172,480,484,501,511,514,529,535,538,545,564,571,579,583,599,782,792,803,882,897,911,1026,1032,1038,1188,1195,1201,1212,1218,1237,1243,1250,1256,1266,1270,1290],[10,11,13],"h1",{"id":12},"attaformzod-v4",[14,15,16],"code",{},"attaform\u002Fzod-v4",[18,19,20,21,28],"p",{},"Explicit Zod v4 adapter subpath. Use this when you want to pin v4 regardless of what your bundler resolves — handy for non-Vite bundlers (webpack, esbuild standalone, Rollup) where you'd otherwise pay for both adapters via the unified ",[22,23,25],"a",{"href":24},"\u002Fdocs\u002Fapi\u002Fzod",[14,26,27],{},"attaform\u002Fzod"," entry's runtime fallback.",[18,30,31,32,34,35,41,42,45],{},"Most Vite consumers should import from ",[14,33,27],{}," instead — the ",[22,36,38],{"href":37},"\u002Fdocs\u002Fapi\u002Fvite",[14,39,40],{},"attaform\u002Fvite"," plugin rewrites that import to this subpath at build time when ",[14,43,44],{},"zod@^4"," is detected, so the same lean bundle ships with less ceremony.",[18,47,48,49,51,52,55],{},"Requires ",[14,50,44],{},". Importing this subpath against ",[14,53,54],{},"zod@3"," throws a clear version-mismatch error from the adapter at the first schema parse.",[57,58,63],"pre",{"className":59,"code":60,"language":61,"meta":62,"style":62},"language-ts shiki shiki-themes github-light github-dark","import { useForm, zodAdapter, fieldMeta, withMeta, kindOf, assertZodVersion } from 'attaform\u002Fzod-v4'\nimport type { FieldMetaPayload, ZodKind } from 'attaform\u002Fzod-v4'\n","ts","",[14,64,65,85],{"__ignoreMap":62},[66,67,70,74,78,81],"span",{"class":68,"line":69},"line",1,[66,71,73],{"class":72},"szBVR","import",[66,75,77],{"class":76},"sVt8B"," { useForm, zodAdapter, fieldMeta, withMeta, kindOf, assertZodVersion } ",[66,79,80],{"class":72},"from",[66,82,84],{"class":83},"sZZnC"," 'attaform\u002Fzod-v4'\n",[66,86,88,90,93,96,98],{"class":68,"line":87},2,[66,89,73],{"class":72},[66,91,92],{"class":72}," type",[66,94,95],{"class":76}," { FieldMetaPayload, ZodKind } ",[66,97,80],{"class":72},[66,99,84],{"class":83},[101,102,104],"h2",{"id":103},"useformschemaoptions",[14,105,106],{},"useForm\u003CSchema>(options)",[18,108,109,110,114],{},"The primary entry point. Returns a typed reactive surface; see\n",[22,111,113],{"href":112},"\u002Fdocs\u002Fapi\u002Fuse-form-return","The useForm return value",".",[57,116,118],{"className":59,"code":117,"language":61,"meta":62,"style":62},"const schema = z.object({ email: z.email() })\nconst form = useForm({ schema, key: 'signup' })\n",[14,119,120,148],{"__ignoreMap":62},[66,121,122,125,129,132,135,139,142,145],{"class":68,"line":69},[66,123,124],{"class":72},"const",[66,126,128],{"class":127},"sj4cs"," schema",[66,130,131],{"class":72}," =",[66,133,134],{"class":76}," z.",[66,136,138],{"class":137},"sScJk","object",[66,140,141],{"class":76},"({ email: z.",[66,143,144],{"class":137},"email",[66,146,147],{"class":76},"() })\n",[66,149,150,152,155,157,160,163,166],{"class":68,"line":87},[66,151,124],{"class":72},[66,153,154],{"class":127}," form",[66,156,131],{"class":72},[66,158,159],{"class":137}," useForm",[66,161,162],{"class":76},"({ schema, key: ",[66,164,165],{"class":83},"'signup'",[66,167,168],{"class":76}," })\n",[18,170,171],{},"Options:",[173,174,175,194],"table",{},[176,177,178],"thead",{},[179,180,181,185,188,191],"tr",{},[182,183,184],"th",{},"Field",[182,186,187],{},"Type",[182,189,190],{},"Required",[182,192,193],{},"Description",[195,196,197,216,242,267,296,327,356,380,413,434,458],"tbody",{},[179,198,199,205,210,213],{},[200,201,202],"td",{},[14,203,204],{},"schema",[200,206,207],{},[14,208,209],{},"z.ZodType",[200,211,212],{},"yes",[200,214,215],{},"The Zod schema describing the form shape.",[179,217,218,223,228,231],{},[200,219,220],{},[14,221,222],{},"key",[200,224,225],{},[14,226,227],{},"string",[200,229,230],{},"no",[200,232,233,234,237,238,114],{},"Form identity for ",[14,235,236],{},"injectForm(key)",", shared state, persistence keys, or DevTools labels. See ",[22,239,241],{"href":240},"#keys","Keys",[179,243,244,249,254,256],{},[200,245,246],{},[14,247,248],{},"defaultValues",[200,250,251],{},[14,252,253],{},"DeepPartial\u003CDefaultValuesShape\u003CForm>>",[200,255,230],{},[200,257,258,259,262,263,114],{},"Constraints applied over schema defaults. Each leaf may be the ",[14,260,261],{},"unset"," sentinel. See ",[22,264,266],{"href":265},"#default-values","Default values",[179,268,269,274,279,281],{},[200,270,271],{},[14,272,273],{},"strict",[200,275,276],{},[14,277,278],{},"boolean",[200,280,230],{},[200,282,283,284,287,288,291,292,295],{},"Default ",[14,285,286],{},"true"," — defaults that fail the schema seed ",[14,289,290],{},"schemaErrors"," at construction. ",[14,293,294],{},"false"," opts out (multi-step wizards, placeholder rows).",[179,297,298,303,318,320],{},[200,299,300],{},[14,301,302],{},"onInvalidSubmit",[200,304,305,308,309,308,312,308,315],{},[14,306,307],{},"'none'"," | ",[14,310,311],{},"'focus-first-error'",[14,313,314],{},"'scroll-to-first-error'",[14,316,317],{},"'both'",[200,319,230],{},[200,321,322,323,114],{},"Behaviour on failed submit. See ",[22,324,326],{"href":325},"\u002Fdocs\u002Frecipes\u002Ffocus-on-error","recipe",[179,328,329,334,345,347],{},[200,330,331],{},[14,332,333],{},"validateOn",[200,335,336,308,339,308,342],{},[14,337,338],{},"'change'",[14,340,341],{},"'blur'",[14,343,344],{},"'submit'",[200,346,230],{},[200,348,349,350,352,353,114],{},"When per-field validation runs. Default ",[14,351,338],{},". See ",[22,354,326],{"href":355},"\u002Fdocs\u002Frecipes\u002Ffield-level-validation",[179,357,358,363,368,370],{},[200,359,360],{},[14,361,362],{},"debounceMs",[200,364,365],{},[14,366,367],{},"number",[200,369,230],{},[200,371,372,373,376,377,114],{},"Wait after the last write before re-validating. Default ",[14,374,375],{},"0",". Only valid with ",[14,378,379],{},"validateOn: 'change'",[179,381,382,387,394,396],{},[200,383,384],{},[14,385,386],{},"coerce",[200,388,389,308,391],{},[14,390,278],{},[14,392,393],{},"CoercionRegistry",[200,395,230],{},[200,397,398,399,401,402,405,406,409,410,114],{},"DOM-input coercion. Default ",[14,400,286],{}," (",[14,403,404],{},"string→number",", ",[14,407,408],{},"string→boolean","). See ",[22,411,326],{"href":412},"\u002Fdocs\u002Frecipes\u002Fcoerce",[179,414,415,420,424,426],{},[200,416,417],{},[14,418,419],{},"rememberVariants",[200,421,422],{},[14,423,278],{},[200,425,230],{},[200,427,283,428,430,431,114],{},[14,429,286],{}," — switching back to a discriminated-union variant restores its prior subtree. See ",[22,432,326],{"href":433},"\u002Fdocs\u002Frecipes\u002Fdiscriminated-unions",[179,435,436,441,446,448],{},[200,437,438],{},[14,439,440],{},"persist",[200,442,443],{},[14,444,445],{},"FormStorageKind | FormStorage | { storage, key?, debounceMs?, include?, clearOnSubmitSuccess? }",[200,447,230],{},[200,449,450,451,352,454,114],{},"Persistence config. Per-field opt-in lives at ",[14,452,453],{},"register()",[22,455,457],{"href":456},"#persistence-config","Persistence config",[179,459,460,465,472,474],{},[200,461,462],{},[14,463,464],{},"history",[200,466,467,308,469],{},[14,468,286],{},[14,470,471],{},"{ max?: number }",[200,473,230],{},[200,475,476,477,114],{},"Enable undo\u002Fredo. See ",[22,478,326],{"href":479},"\u002Fdocs\u002Frecipes\u002Fundo-redo",[481,482,241],"h3",{"id":483},"keys",[18,485,486,487,490,491,494,495,497,498,500],{},"Omit for one-off forms — the runtime allocates a synthetic\n",[14,488,489],{},"__atta:anon:\u003Cid>"," via ",[14,492,493],{},"useId()",". Pass a string when you need\ncross-component lookup via ",[14,496,236],{},", shared state across\ncall-sites, a stable ",[14,499,440],{}," storage-key default, or a\nrecognisable DevTools label.",[18,502,503,504,507,508,114],{},"Keys starting with ",[14,505,506],{},"__atta:"," are reserved for the library's\ninternal synthetic-key namespace; passing one throws\n",[14,509,510],{},"ReservedFormKeyError",[481,512,266],{"id":513},"default-values",[18,515,516,517,520,521,524,525,528],{},"Refinement-invalid leaves that satisfy the slim primitive type at\ntheir path (e.g. ",[14,518,519],{},"'teal'"," against ",[14,522,523],{},"z.enum(['red','green','blue'])",",\na 4-character string against ",[14,526,527],{},"z.string().min(8)",") pass through\nunchanged so SSR \u002F autosave rehydration can land partial-but-saved\nstate as-is. Wrong-primitive leaves (a number where a string is\nexpected) are still replaced by the schema default.",[18,530,531,532,534],{},"Each primitive leaf may be the ",[14,533,261],{}," sentinel to mark the path\ndisplayed-empty at construction.",[481,536,457],{"id":537},"persistence-config",[18,539,540,541,544],{},"The form-level option is operational only — backend, key,\ndebounce, error inclusion. Per-field opt-in lives at every\n",[14,542,543],{},"register('foo', { persist: true })"," call site; this config alone\nnever causes any field to persist.",[18,546,547,548,551,552,555,556,559,560,563],{},"Three input forms: a string shorthand (",[14,549,550],{},"'local'"," \u002F ",[14,553,554],{},"'session'"," \u002F\n",[14,557,558],{},"'indexeddb'","), a custom ",[14,561,562],{},"FormStorage"," adapter passed directly, or\nthe full options bag.",[18,565,566,567,570],{},"Storage keys carry the schema's fingerprint\n(",[14,568,569],{},"${base}:${fingerprint}",") so schema changes auto-invalidate old\ndrafts. The orphan-cleanup pass on mount sweeps stale-fingerprint\nentries on the configured backend AND wipes any matching keys on\nthe non-configured standard backends. Malformed payloads are wiped\non read.",[18,572,573,574,578],{},"See ",[22,575,577],{"href":576},"\u002Fdocs\u002Frecipes\u002Fpersistence","persistence recipe"," for the full pattern.",[101,580,582],{"id":581},"schema-attached-metadata","Schema-attached metadata",[18,584,585,586,551,589,555,592,551,595,598],{},"Attach labels, descriptions, and placeholders directly to schema\nfields. Read them off ",[14,587,588],{},"form.fields(path).label",[14,590,591],{},".description",[14,593,594],{},".placeholder",[14,596,597],{},".meta"," — same surface for leaves and containers.",[57,600,602],{"className":59,"code":601,"language":61,"meta":62,"style":62},"import { z } from 'zod'\nimport { fieldMeta, withMeta } from 'attaform\u002Fzod-v4'\n\n\u002F\u002F Native Zod 4 chain\nconst A = z.object({\n  email: z.email().register(fieldMeta, {\n    label: 'Email',\n    placeholder: 'you@example.com',\n  }),\n})\n\n\u002F\u002F Helper (works on v3 and v4)\nconst B = z.object({\n  email: withMeta(z.email(), {\n    label: 'Email',\n    placeholder: 'you@example.com',\n  }),\n})\n",[14,603,604,616,627,634,641,658,675,687,698,704,710,715,721,737,754,763,772,777],{"__ignoreMap":62},[66,605,606,608,611,613],{"class":68,"line":69},[66,607,73],{"class":72},[66,609,610],{"class":76}," { z } ",[66,612,80],{"class":72},[66,614,615],{"class":83}," 'zod'\n",[66,617,618,620,623,625],{"class":68,"line":87},[66,619,73],{"class":72},[66,621,622],{"class":76}," { fieldMeta, withMeta } ",[66,624,80],{"class":72},[66,626,84],{"class":83},[66,628,630],{"class":68,"line":629},3,[66,631,633],{"emptyLinePlaceholder":632},true,"\n",[66,635,637],{"class":68,"line":636},4,[66,638,640],{"class":639},"sJ8bj","\u002F\u002F Native Zod 4 chain\n",[66,642,644,646,649,651,653,655],{"class":68,"line":643},5,[66,645,124],{"class":72},[66,647,648],{"class":127}," A",[66,650,131],{"class":72},[66,652,134],{"class":76},[66,654,138],{"class":137},[66,656,657],{"class":76},"({\n",[66,659,661,664,666,669,672],{"class":68,"line":660},6,[66,662,663],{"class":76},"  email: z.",[66,665,144],{"class":137},[66,667,668],{"class":76},"().",[66,670,671],{"class":137},"register",[66,673,674],{"class":76},"(fieldMeta, {\n",[66,676,678,681,684],{"class":68,"line":677},7,[66,679,680],{"class":76},"    label: ",[66,682,683],{"class":83},"'Email'",[66,685,686],{"class":76},",\n",[66,688,690,693,696],{"class":68,"line":689},8,[66,691,692],{"class":76},"    placeholder: ",[66,694,695],{"class":83},"'you@example.com'",[66,697,686],{"class":76},[66,699,701],{"class":68,"line":700},9,[66,702,703],{"class":76},"  }),\n",[66,705,707],{"class":68,"line":706},10,[66,708,709],{"class":76},"})\n",[66,711,713],{"class":68,"line":712},11,[66,714,633],{"emptyLinePlaceholder":632},[66,716,718],{"class":68,"line":717},12,[66,719,720],{"class":639},"\u002F\u002F Helper (works on v3 and v4)\n",[66,722,724,726,729,731,733,735],{"class":68,"line":723},13,[66,725,124],{"class":72},[66,727,728],{"class":127}," B",[66,730,131],{"class":72},[66,732,134],{"class":76},[66,734,138],{"class":137},[66,736,657],{"class":76},[66,738,740,743,746,749,751],{"class":68,"line":739},14,[66,741,742],{"class":76},"  email: ",[66,744,745],{"class":137},"withMeta",[66,747,748],{"class":76},"(z.",[66,750,144],{"class":137},[66,752,753],{"class":76},"(), {\n",[66,755,757,759,761],{"class":68,"line":756},15,[66,758,680],{"class":76},[66,760,683],{"class":83},[66,762,686],{"class":76},[66,764,766,768,770],{"class":68,"line":765},16,[66,767,692],{"class":76},[66,769,695],{"class":83},[66,771,686],{"class":76},[66,773,775],{"class":68,"line":774},17,[66,776,703],{"class":76},[66,778,780],{"class":68,"line":779},18,[66,781,709],{"class":76},[18,783,784,785,788,789,114],{},"Both forms write to the same ",[14,786,787],{},"fieldMeta"," registry; pick whichever\nreads naturally. Container schemas register the same way:\n",[14,790,791],{},"z.object({...}).register(fieldMeta, { label: 'Pickup address' })",[18,793,794,798,799,802],{},[795,796,797],"strong",{},"Resolution order"," for each field on ",[14,800,801],{},"form.fields(path)",":",[173,804,805,814],{},[176,806,807],{},[179,808,809,811],{},[182,810,184],{},[182,812,813],{},"Sources",[195,815,816,837,859,872],{},[179,817,818,823],{},[200,819,820],{},[14,821,822],{},"label",[200,824,825,826,828,829,832,833,836],{},"registered ",[14,827,822],{}," → ",[14,830,831],{},"humanize(lastSegment)"," (camelCase \u002F snake_case \u002F kebab-case → Title Case; numeric segments collapse to ",[14,834,835],{},"''",")",[179,838,839,844],{},[200,840,841],{},[14,842,843],{},"description",[200,845,825,846,828,848,851,852,855,856],{},[14,847,843],{},[14,849,850],{},"schema.description"," (Zod's ",[14,853,854],{},".describe(...)",") → ",[14,857,858],{},"undefined",[179,860,861,866],{},[200,862,863],{},[14,864,865],{},"placeholder",[200,867,825,868,828,870],{},[14,869,865],{},[14,871,858],{},[179,873,874,879],{},[200,875,876],{},[14,877,878],{},"meta",[200,880,881],{},"the full registered payload, frozen — empty object when nothing has been registered",[18,883,884,885,888,889,892,893,896],{},"Setting both ",[14,886,887],{},".describe('...')"," and ",[14,890,891],{},".register(fieldMeta, { description: '...' })"," is fine — the registered description wins,\nand ",[14,894,895],{},".describe()"," stays readable for unrelated tooling (JSON-Schema\nexport, etc.).",[18,898,899,902,903,906,907,910],{},[795,900,901],{},"Custom payload keys."," ",[14,904,905],{},"FieldMetaPayload"," is an ",[14,908,909],{},"interface"," — extend\nit via TypeScript module augmentation:",[57,912,914],{"className":59,"code":913,"language":61,"meta":62,"style":62},"declare module 'attaform\u002Fzod-v4' {\n  interface FieldMetaPayload {\n    tooltip?: string\n    icon?: string\n  }\n}\n\nconst schema = z.object({\n  email: z.email().register(fieldMeta, { label: 'Email', tooltip: 'For login' }),\n})\n\n\u002F\u002F template: {{ form.fields.email.meta.tooltip }} → 'For login'\n",[14,915,916,930,940,952,961,966,971,975,989,1013,1017,1021],{"__ignoreMap":62},[66,917,918,921,924,927],{"class":68,"line":69},[66,919,920],{"class":72},"declare",[66,922,923],{"class":72}," module",[66,925,926],{"class":83}," 'attaform\u002Fzod-v4'",[66,928,929],{"class":76}," {\n",[66,931,932,935,938],{"class":68,"line":87},[66,933,934],{"class":72},"  interface",[66,936,937],{"class":137}," FieldMetaPayload",[66,939,929],{"class":76},[66,941,942,946,949],{"class":68,"line":629},[66,943,945],{"class":944},"s4XuR","    tooltip",[66,947,948],{"class":72},"?:",[66,950,951],{"class":127}," string\n",[66,953,954,957,959],{"class":68,"line":636},[66,955,956],{"class":944},"    icon",[66,958,948],{"class":72},[66,960,951],{"class":127},[66,962,963],{"class":68,"line":643},[66,964,965],{"class":76},"  }\n",[66,967,968],{"class":68,"line":660},[66,969,970],{"class":76},"}\n",[66,972,973],{"class":68,"line":677},[66,974,633],{"emptyLinePlaceholder":632},[66,976,977,979,981,983,985,987],{"class":68,"line":689},[66,978,124],{"class":72},[66,980,128],{"class":127},[66,982,131],{"class":72},[66,984,134],{"class":76},[66,986,138],{"class":137},[66,988,657],{"class":76},[66,990,991,993,995,997,999,1002,1004,1007,1010],{"class":68,"line":700},[66,992,663],{"class":76},[66,994,144],{"class":137},[66,996,668],{"class":76},[66,998,671],{"class":137},[66,1000,1001],{"class":76},"(fieldMeta, { label: ",[66,1003,683],{"class":83},[66,1005,1006],{"class":76},", tooltip: ",[66,1008,1009],{"class":83},"'For login'",[66,1011,1012],{"class":76}," }),\n",[66,1014,1015],{"class":68,"line":706},[66,1016,709],{"class":76},[66,1018,1019],{"class":68,"line":712},[66,1020,633],{"emptyLinePlaceholder":632},[66,1022,1023],{"class":68,"line":717},[66,1024,1025],{"class":639},"\u002F\u002F template: {{ form.fields.email.meta.tooltip }} → 'For login'\n",[18,1027,1028,1029,1031],{},"The single ",[14,1030,787],{}," registry holds the augmented shape — no\nfragmentation across consumers.",[18,1033,1034,1037],{},[795,1035,1036],{},"Reusing a sub-schema at multiple paths."," Both registration styles\nare safe. Zod's registry keys on the schema reference, but the\nadapter walks the form's schema tree at first lookup and pairs each\npath with its intended payload — registration order (object literal\nleft-to-right) matches walk order, so the two patterns below both\nresolve as you'd expect:",[57,1039,1041],{"className":59,"code":1040,"language":61,"meta":62,"style":62},"const addressSchema = z.object({ line1: z.string(), city: z.string() })\n\n\u002F\u002F Native chain — adapter disambiguates by tree-walk order\nconst form = z.object({\n  pickup: addressSchema.register(fieldMeta, { label: 'Pickup address' }),\n  delivery: addressSchema.register(fieldMeta, { label: 'Delivery address' }),\n})\n\u002F\u002F form.fields('pickup').label   → 'Pickup address'\n\u002F\u002F form.fields('delivery').label → 'Delivery address'\n\n\u002F\u002F Helper — clones the schema first so each call gets distinct identity\nconst form2 = z.object({\n  pickup: withMeta(addressSchema, { label: 'Pickup address' }),\n  delivery: withMeta(addressSchema, { label: 'Delivery address' }),\n})\n",[14,1042,1043,1068,1072,1077,1091,1105,1119,1123,1128,1133,1137,1142,1157,1171,1184],{"__ignoreMap":62},[66,1044,1045,1047,1050,1052,1054,1056,1059,1061,1064,1066],{"class":68,"line":69},[66,1046,124],{"class":72},[66,1048,1049],{"class":127}," addressSchema",[66,1051,131],{"class":72},[66,1053,134],{"class":76},[66,1055,138],{"class":137},[66,1057,1058],{"class":76},"({ line1: z.",[66,1060,227],{"class":137},[66,1062,1063],{"class":76},"(), city: z.",[66,1065,227],{"class":137},[66,1067,147],{"class":76},[66,1069,1070],{"class":68,"line":87},[66,1071,633],{"emptyLinePlaceholder":632},[66,1073,1074],{"class":68,"line":629},[66,1075,1076],{"class":639},"\u002F\u002F Native chain — adapter disambiguates by tree-walk order\n",[66,1078,1079,1081,1083,1085,1087,1089],{"class":68,"line":636},[66,1080,124],{"class":72},[66,1082,154],{"class":127},[66,1084,131],{"class":72},[66,1086,134],{"class":76},[66,1088,138],{"class":137},[66,1090,657],{"class":76},[66,1092,1093,1096,1098,1100,1103],{"class":68,"line":643},[66,1094,1095],{"class":76},"  pickup: addressSchema.",[66,1097,671],{"class":137},[66,1099,1001],{"class":76},[66,1101,1102],{"class":83},"'Pickup address'",[66,1104,1012],{"class":76},[66,1106,1107,1110,1112,1114,1117],{"class":68,"line":660},[66,1108,1109],{"class":76},"  delivery: addressSchema.",[66,1111,671],{"class":137},[66,1113,1001],{"class":76},[66,1115,1116],{"class":83},"'Delivery address'",[66,1118,1012],{"class":76},[66,1120,1121],{"class":68,"line":677},[66,1122,709],{"class":76},[66,1124,1125],{"class":68,"line":689},[66,1126,1127],{"class":639},"\u002F\u002F form.fields('pickup').label   → 'Pickup address'\n",[66,1129,1130],{"class":68,"line":700},[66,1131,1132],{"class":639},"\u002F\u002F form.fields('delivery').label → 'Delivery address'\n",[66,1134,1135],{"class":68,"line":706},[66,1136,633],{"emptyLinePlaceholder":632},[66,1138,1139],{"class":68,"line":712},[66,1140,1141],{"class":639},"\u002F\u002F Helper — clones the schema first so each call gets distinct identity\n",[66,1143,1144,1146,1149,1151,1153,1155],{"class":68,"line":717},[66,1145,124],{"class":72},[66,1147,1148],{"class":127}," form2",[66,1150,131],{"class":72},[66,1152,134],{"class":76},[66,1154,138],{"class":137},[66,1156,657],{"class":76},[66,1158,1159,1162,1164,1167,1169],{"class":68,"line":723},[66,1160,1161],{"class":76},"  pickup: ",[66,1163,745],{"class":137},[66,1165,1166],{"class":76},"(addressSchema, { label: ",[66,1168,1102],{"class":83},[66,1170,1012],{"class":76},[66,1172,1173,1176,1178,1180,1182],{"class":68,"line":739},[66,1174,1175],{"class":76},"  delivery: ",[66,1177,745],{"class":137},[66,1179,1166],{"class":76},[66,1181,1116],{"class":83},[66,1183,1012],{"class":76},[66,1185,1186],{"class":68,"line":756},[66,1187,709],{"class":76},[18,1189,1190,1191,1194],{},"Sharing a schema with IDENTICAL metadata is also fine — common for\narray elements (every line item shares one ",[14,1192,1193],{},"lineItemSchema"," instance\nand inherits the same per-leaf labels).",[101,1196,1198],{"id":1197},"zodadapterschema",[14,1199,1200],{},"zodAdapter(schema)",[18,1202,1203,1204,1207,1208,1211],{},"Lower-level. Returns an ",[14,1205,1206],{},"AbstractSchema\u003CForm, Form>"," that wraps a\nZod schema. Reach for it only when composing your own ",[14,1209,1210],{},"useForm","-like\nhook.",[101,1213,1215],{"id":1214},"kindofschema",[14,1216,1217],{},"kindOf(schema)",[18,1219,1220,1221,405,1224,405,1227,686,1230,1233,1234,1236],{},"Returns the zod kind (",[14,1222,1223],{},"'string'",[14,1225,1226],{},"'number'",[14,1228,1229],{},"'object'",[14,1231,1232],{},"'discriminated-union'",", etc.) for a Zod 4 schema. For advanced\nadapter work — wrapping ",[14,1235,671],{},", building per-kind UI, branching\non schema shape.",[101,1238,1240],{"id":1239},"assertzodversionschema",[14,1241,1242],{},"assertZodVersion(schema)",[18,1244,1245,1246,1249],{},"Throws if the installed ",[14,1247,1248],{},"zod"," major doesn't match the adapter. Use\nwhen wiring custom adapter code that introspects schema internals\nand would silently misbehave under the wrong version.",[101,1251,1253],{"id":1252},"type-zodkind",[14,1254,1255],{},"type ZodKind",[18,1257,1258,1259,1262,1263,114],{},"Union of the strings returned by ",[14,1260,1261],{},"kindOf"," — ",[14,1264,1265],{},"'string' | 'number' | 'boolean' | 'object' | 'array' | 'tuple' | 'discriminated-union' | 'union' | …",[101,1267,1269],{"id":1268},"see-also","See also",[1271,1272,1273,1281],"ul",{},[1274,1275,1276,1280],"li",{},[22,1277,1278],{"href":24},[14,1279,27],{}," — unified entry that auto-detects the consumer's Zod major.",[1274,1282,1283,1289],{},[22,1284,1286],{"href":1285},"\u002Fdocs\u002Fapi\u002Fzod-v3",[14,1287,1288],{},"attaform\u002Fzod-v3"," — explicit Zod 3 subpath.",[1291,1292,1293],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":62,"searchDepth":87,"depth":87,"links":1295},[1296,1301,1302,1303,1304,1305,1306],{"id":103,"depth":87,"text":106,"children":1297},[1298,1299,1300],{"id":483,"depth":629,"text":241},{"id":513,"depth":629,"text":266},{"id":537,"depth":629,"text":457},{"id":581,"depth":87,"text":582},{"id":1197,"depth":87,"text":1200},{"id":1214,"depth":87,"text":1217},{"id":1239,"depth":87,"text":1242},{"id":1252,"depth":87,"text":1255},{"id":1268,"depth":87,"text":1269},"The explicit Zod 4 subpath for Attaform — pin the v4 adapter regardless of bundler-side resolution. Same surface as the unified attaform\u002Fzod entry, with a guaranteed lean bundle.","md",{},"\u002Fdocs\u002Fapi\u002Fzod-v4",{"title":5,"description":1307},"docs\u002Fapi\u002Fzod-v4","cVb0wIU4kNj2O3E0f1PBK_3CB20DJUDJENjmYfdOt1g",1778284958565]