@tempots/beatui 0.72.0 → 0.74.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.
@@ -4,4 +4,4 @@ export * from './controls';
4
4
  export * from './json-schema-form';
5
5
  export * from './validator';
6
6
  export * from './schema-defaults';
7
- export { type CustomWidgets, type CustomWidgetRegistration, type WidgetFactory, forXUI, forFormat, forTypeAndFormat, } from './widgets/widget-customization';
7
+ export { type CustomWidgets, type CustomWidgetRegistration, type WidgetFactory, forXUI, forFormat, forTypeAndFormat, createDiagnosticWidget, } from './widgets/widget-customization';
@@ -173,3 +173,40 @@ export declare function forFormat<T = unknown>(format: string, factory: WidgetFa
173
173
  * ```
174
174
  */
175
175
  export declare function forTypeAndFormat<T = unknown>(type: string, format: string, factory: WidgetFactory<T>, options?: Partial<Omit<CustomWidgetRegistration<T>, 'factory' | 'matcher'>>): CustomWidgetRegistration<T>;
176
+ /**
177
+ * Create a diagnostic custom widget registration for debugging custom widget matching.
178
+ *
179
+ * This utility helps diagnose issues where custom widgets aren't being matched as expected.
180
+ * It logs detailed information about each property that's being processed, including:
181
+ * - Property name and path
182
+ * - Schema type
183
+ * - Whether the widgetRegistry is available
184
+ * - Custom matcher results
185
+ *
186
+ * @example
187
+ * ```typescript
188
+ * const customWidgets = [
189
+ * // Add the diagnostic widget first to trace all properties
190
+ * createDiagnosticWidget({
191
+ * logPrefix: 'CUSTOM_WIDGET_DEBUG',
192
+ * filterFn: (ctx) => true, // Log all properties
193
+ * }),
194
+ * // Then add your actual custom widgets
195
+ * myCustomWidget,
196
+ * ]
197
+ * ```
198
+ */
199
+ export declare function createDiagnosticWidget<T = unknown>(options?: {
200
+ /** Prefix for log messages (default: 'WIDGET_DIAG') */
201
+ logPrefix?: string;
202
+ /** Filter function to control which properties are logged */
203
+ filterFn?: (ctx: SchemaContext) => boolean;
204
+ /** Callback function called for each processed property */
205
+ onProcess?: (info: {
206
+ name: string | undefined;
207
+ path: string[];
208
+ type: string | undefined;
209
+ hasRegistry: boolean;
210
+ definition: unknown;
211
+ }) => void;
212
+ }): CustomWidgetRegistration<T>;