@stonecrop/aform 0.11.9 → 0.11.10

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/aform.d.ts CHANGED
@@ -83,6 +83,12 @@ export declare type BaseSchema = {
83
83
  * @public
84
84
  */
85
85
  mode?: FormMode;
86
+ /**
87
+ * Hide the field from the form UI while keeping it in the data model.
88
+ * Consumed by AForm — not passed down to field components.
89
+ * @public
90
+ */
91
+ hidden?: boolean;
86
92
  };
87
93
 
88
94
  /**
@@ -137,6 +143,22 @@ export declare type ComponentProps = {
137
143
  };
138
144
  };
139
145
 
146
+ /**
147
+ * Deserializes a stringified function expression into a typed callable.
148
+ *
149
+ * Throws if the string cannot be parsed as a function (SyntaxError) or if the
150
+ * resulting expression is not callable (TypeError), or if the expression references
151
+ * an undefined variable (ReferenceError). Callers are responsible for try/catch.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const fn = deserializeFunction<(x: number) => number>('(x) => x * 2')
156
+ * fn(5) // 10
157
+ * ```
158
+ * @public
159
+ */
160
+ export declare function deserializeFunction<T extends (...args: any[]) => any>(source: string): T;
161
+
140
162
  /**
141
163
  * Schema structure for defining fieldsets inside AForm
142
164
  * @public