@akad/form-builder 1.0.0 → 1.0.2

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.
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { ComponentProps } from '../../FormBuilder.config';
3
2
  import { FBForm } from './makeFullFormHookFacade';
4
3
  interface AddressFormLegacyProps extends ComponentProps {
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { ComponentProps } from '../../FormBuilder.config';
3
2
  import { FBForm } from './makeFullFormHookFacade';
4
3
  interface PaymentOptionsLegacyProps extends ComponentProps {
@@ -55,3 +55,17 @@ export declare function coerceType(value: unknown, schemaProps: Record<string, u
55
55
  * ```
56
56
  */
57
57
  export declare function coerceFieldValue(fieldPath: string, value: unknown, schema: Record<string, unknown>): unknown;
58
+ /**
59
+ * Safely converts a value to a string for form inputs
60
+ * @description Prevents '[object Object]' stringification by handling null/undefined/objects properly
61
+ * @param value - The value to convert
62
+ * @returns A string representation, or empty string for null/undefined/objects/arrays
63
+ * @example
64
+ * ```ts
65
+ * safeStringValue(null); // Returns ''
66
+ * safeStringValue('hello'); // Returns 'hello'
67
+ * safeStringValue(42); // Returns '42'
68
+ * safeStringValue({}); // Returns '' (prevents '[object Object]')
69
+ * ```
70
+ */
71
+ export declare function safeStringValue(value: unknown): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akad/form-builder",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "./react-lib.umd.cjs",
5
5
  "module": "./react-lib.js",
6
6
  "exports": {