@process.co/ui 0.0.8 → 0.0.9

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,5 @@
1
- import * as React$1 from 'react';
1
+ import * as React from 'react';
2
+ import React__default from 'react';
2
3
 
3
4
  interface InputProps {
4
5
  /**
@@ -54,10 +55,10 @@ interface InputProps {
54
55
  * />
55
56
  * ```
56
57
  */
57
- declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React$1.JSX.Element;
58
+ declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React.JSX.Element;
58
59
 
59
60
  interface SelectOption {
60
- node?: React$1.ReactNode;
61
+ node?: React.ReactNode;
61
62
  value: string;
62
63
  label: string;
63
64
  }
@@ -101,7 +102,7 @@ interface SelectProps {
101
102
  * Render prop for custom select UI.
102
103
  * If not provided, uses a basic HTML select.
103
104
  */
104
- children?: (props: SelectRenderProps) => React$1.ReactNode;
105
+ children?: (props: SelectRenderProps) => React.ReactNode;
105
106
  }
106
107
  interface SelectRenderProps {
107
108
  value: string;
@@ -146,7 +147,47 @@ interface SelectRenderProps {
146
147
  * />
147
148
  * ```
148
149
  */
149
- declare function Select({ fieldName, label, value, onChange, options: rawOptions, disabled, placeholder, expectedType, required, hasRequiredError, className, children, }: SelectProps): React$1.JSX.Element;
150
+ declare function Select({ fieldName, label, value, onChange, options: rawOptions, disabled, placeholder, expectedType, required, hasRequiredError, className, children, }: SelectProps): React.JSX.Element;
151
+
152
+ /**
153
+ * Simplified Field Components (Mock/Development Version)
154
+ *
155
+ * These are mock implementations of the simplified field components
156
+ * for use during development and design. In production, these are
157
+ * replaced with the real implementations from packages/ui that include
158
+ * collaboration, type inference, and expression support.
159
+ *
160
+ * ## API
161
+ *
162
+ * The API matches the production components exactly, so developers
163
+ * can build and test their UIs without needing the full infrastructure.
164
+ *
165
+ * ## Example
166
+ *
167
+ * ```tsx
168
+ * import { Input, Select } from '@process.co/ui';
169
+ *
170
+ * function CustomUserForm({ value, onChange }) {
171
+ * return (
172
+ * <div>
173
+ * <Input
174
+ * fieldName="firstName"
175
+ * label="First Name"
176
+ * value={value.firstName}
177
+ * onChange={(v) => onChange({ ...value, firstName: v })}
178
+ * />
179
+ * <Select
180
+ * fieldName="role"
181
+ * label="Role"
182
+ * value={value.role}
183
+ * onChange={(v) => onChange({ ...value, role: v })}
184
+ * options={['admin', 'user', 'guest']}
185
+ * />
186
+ * </div>
187
+ * );
188
+ * }
189
+ * ```
190
+ */
150
191
 
151
192
  /**
152
193
  * Mock context value (always returns defaults).
@@ -185,17 +226,17 @@ declare function useFieldPath(fieldName: string): string;
185
226
  * Mock provider - just renders children without context.
186
227
  */
187
228
  declare function TemplateFieldProvider({ children }: {
188
- children: React.ReactNode;
189
- }): React$1.JSX.Element;
229
+ children: React__default.ReactNode;
230
+ }): React__default.JSX.Element;
190
231
  /**
191
232
  * Mock provider - just renders children without nesting context.
192
233
  */
193
234
  declare function NestedFieldProvider({ children }: {
194
- children: React.ReactNode;
235
+ children: React__default.ReactNode;
195
236
  fieldName: string;
196
- }): React$1.JSX.Element;
237
+ }): React__default.JSX.Element;
197
238
  type TemplateFieldProviderProps = {
198
- children: React.ReactNode;
239
+ children: React__default.ReactNode;
199
240
  nodeId?: string;
200
241
  yDoc?: any;
201
242
  collabUser?: any;
@@ -212,7 +253,7 @@ type TemplateFieldProviderProps = {
212
253
  disabled?: boolean;
213
254
  };
214
255
  type NestedFieldProviderProps = {
215
- children: React.ReactNode;
256
+ children: React__default.ReactNode;
216
257
  fieldName: string;
217
258
  };
218
259
  type TemplateFieldValidationError = {
@@ -290,7 +331,7 @@ interface InferredTypesContextValue {
290
331
  * Context for inferred types.
291
332
  * In production, this is provided by PropertiesRender.
292
333
  */
293
- declare const InferredTypesContext: React$1.Context<InferredTypesContextValue | null>;
334
+ declare const InferredTypesContext: React__default.Context<InferredTypesContextValue | null>;
294
335
  /**
295
336
  * Hook to access the inferred types context.
296
337
  * Returns null when not inside an InferredTypesProvider (e.g., in mock/dev mode).
@@ -302,14 +343,27 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
302
343
  * ```
303
344
  */
304
345
  declare function useInferredTypes(): InferredTypesContextValue | null;
346
+ /**
347
+ * Props for InferredTypesProvider
348
+ */
349
+ interface InferredTypesProviderProps {
350
+ children: React__default.ReactNode;
351
+ /**
352
+ * Optional Yjs document for collaborative sync (ignored in mock mode).
353
+ * When provided in production, inferred types are synced via Yjs.
354
+ */
355
+ yDoc?: unknown;
356
+ /**
357
+ * Optional key prefix for the Yjs map (ignored in mock mode).
358
+ */
359
+ mapKey?: string;
360
+ }
305
361
  /**
306
362
  * Mock provider for inferred types context.
307
363
  * In development mode, this is a no-op - just renders children.
308
364
  * In production, the real implementation from @repo/ui provides actual type propagation.
309
365
  */
310
- declare function InferredTypesProvider({ children }: {
311
- children: React.ReactNode;
312
- }): React$1.JSX.Element;
366
+ declare function InferredTypesProvider({ children }: InferredTypesProviderProps): React__default.JSX.Element;
313
367
  /**
314
368
  * Compute the intersection of multiple types.
315
369
  * Used when subscribing to multiple fields to narrow the expected type.
@@ -369,15 +423,114 @@ declare function getOperatorsForType(type: string): Array<{
369
423
  value: string;
370
424
  label: string;
371
425
  }>;
426
+ /**
427
+ * Props for NodePropertyProvider
428
+ */
429
+ interface NodePropertyProviderProps {
430
+ children: React__default.ReactNode;
431
+ /** The node ID this provider manages */
432
+ nodeId: string;
433
+ /** Yjs document for collaborative sync (ignored in mock mode) */
434
+ yDoc?: unknown;
435
+ /** Initial property data from the node */
436
+ initialData?: Record<string, any>;
437
+ /** Callback when a single property changes */
438
+ onPropertyChange?: (key: string, value: any, metadata?: any) => void;
439
+ /** Callback when multiple properties change */
440
+ onPropertiesChange?: (updates: Record<string, any>, metadata?: Record<string, any>) => void;
441
+ /** Client ID for conflict resolution */
442
+ clientId?: string;
443
+ }
444
+ /**
445
+ * Mock provider for node properties.
446
+ * In development mode, this is a no-op - just renders children.
447
+ * In production, the real implementation from @repo/ui provides actual store.
448
+ */
449
+ declare function NodePropertyProvider({ children }: NodePropertyProviderProps): React__default.ReactElement;
450
+ /**
451
+ * Mock hook - always returns false in development mode.
452
+ * In production, returns true when inside a NodePropertyProvider.
453
+ */
454
+ declare function useIsInNodePropertyProvider(): boolean;
455
+ /**
456
+ * Mock hook - returns [undefined, no-op] in development mode.
457
+ * In production, subscribes to a single property from the store.
458
+ *
459
+ * @example
460
+ * ```tsx
461
+ * const [operator, setOperator] = useNodeProperty<string>('operator');
462
+ * // In mock mode: operator is undefined, setOperator is a no-op
463
+ * ```
464
+ */
465
+ declare function useNodeProperty<T = any>(key: string): [T | undefined, (value: T, metadata?: any) => void];
466
+ /**
467
+ * Mock hook - returns [{}, no-op] in development mode.
468
+ * In production, subscribes to all properties from the store.
469
+ */
470
+ declare function useNodeProperties(): [
471
+ Record<string, any>,
472
+ (updates: Record<string, any>, metadata?: Record<string, any>) => void
473
+ ];
474
+ /**
475
+ * Mock hook - returns undefined in development mode.
476
+ * In production, subscribes to an inferred type by field name.
477
+ */
478
+ declare function useInferredType(fieldName: string): string | undefined;
479
+ /**
480
+ * Mock hook - returns no-op in development mode.
481
+ * In production, returns a setter for inferred types.
482
+ */
483
+ declare function useSetInferredType(): (fieldName: string, type: string) => void;
484
+ /**
485
+ * Mock hook - returns {} in development mode.
486
+ * In production, subscribes to all inferred types.
487
+ */
488
+ declare function useAllInferredTypes(): Record<string, string>;
489
+ /**
490
+ * Mock hook - returns no-op in development mode.
491
+ * In production, returns a setter for individual properties.
492
+ */
493
+ declare function useSetProperty(): <T = any>(key: string, value: T, metadata?: any) => void;
494
+ /**
495
+ * Validation rule for a field.
496
+ */
497
+ interface FieldValidationRule {
498
+ required?: boolean;
499
+ requiredIf?: (properties: Record<string, any>) => boolean;
500
+ customValidation?: (value: any, properties: Record<string, any>) => string | null;
501
+ }
502
+ /**
503
+ * Mock hook - returns no-ops in development mode.
504
+ * In production, allows custom controls to set validation rules.
505
+ *
506
+ * @example
507
+ * ```tsx
508
+ * const { setFieldRequired, setFieldRequiredIf } = useFieldValidation();
509
+ * setFieldRequired('expression', true);
510
+ * setFieldRequiredIf('expression', (props) => props.operator?.needsValue);
511
+ * ```
512
+ */
513
+ declare function useFieldValidation(): {
514
+ setFieldRequired: (fieldName: string, required: boolean) => void;
515
+ setFieldRequiredIf: (fieldName: string, requiredIf: (properties: Record<string, any>) => boolean) => void;
516
+ setFieldValidation: (fieldName: string, customValidation: (value: any, properties: Record<string, any>) => string | null) => void;
517
+ clearFieldValidation: (fieldName: string) => void;
518
+ isFieldRequired: (fieldName: string) => boolean;
519
+ validateField: (fieldName: string) => string | null;
520
+ };
372
521
 
522
+ type index_FieldValidationRule = FieldValidationRule;
373
523
  type index_InferConfig = InferConfig;
374
524
  declare const index_InferredTypesContext: typeof InferredTypesContext;
375
525
  type index_InferredTypesContextValue = InferredTypesContextValue;
376
526
  declare const index_InferredTypesProvider: typeof InferredTypesProvider;
527
+ type index_InferredTypesProviderProps = InferredTypesProviderProps;
377
528
  declare const index_Input: typeof Input;
378
529
  type index_InputProps = InputProps;
379
530
  declare const index_NestedFieldProvider: typeof NestedFieldProvider;
380
531
  type index_NestedFieldProviderProps = NestedFieldProviderProps;
532
+ declare const index_NodePropertyProvider: typeof NodePropertyProvider;
533
+ type index_NodePropertyProviderProps = NodePropertyProviderProps;
381
534
  declare const index_OPERATORS_BY_TYPE: typeof OPERATORS_BY_TYPE;
382
535
  declare const index_Select: typeof Select;
383
536
  type index_SelectOption = SelectOption;
@@ -392,12 +545,20 @@ type index_TemplateFieldValidationError = TemplateFieldValidationError;
392
545
  declare const index_getOperatorsForType: typeof getOperatorsForType;
393
546
  declare const index_intersectTypes: typeof intersectTypes;
394
547
  declare const index_parseInferSyntax: typeof parseInferSyntax;
548
+ declare const index_useAllInferredTypes: typeof useAllInferredTypes;
395
549
  declare const index_useFieldPath: typeof useFieldPath;
550
+ declare const index_useFieldValidation: typeof useFieldValidation;
551
+ declare const index_useInferredType: typeof useInferredType;
396
552
  declare const index_useInferredTypes: typeof useInferredTypes;
553
+ declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
397
554
  declare const index_useIsInTemplateFieldProvider: typeof useIsInTemplateFieldProvider;
555
+ declare const index_useNodeProperties: typeof useNodeProperties;
556
+ declare const index_useNodeProperty: typeof useNodeProperty;
557
+ declare const index_useSetInferredType: typeof useSetInferredType;
558
+ declare const index_useSetProperty: typeof useSetProperty;
398
559
  declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
399
560
  declare namespace index {
400
- export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
561
+ export { type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useAllInferredTypes as useAllInferredTypes, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext };
401
562
  }
402
563
 
403
- export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, InferredTypesProvider as l, intersectTypes as m, type InferConfig as n, getOperatorsForType as o, parseInferSyntax as p, Input as q, type InputProps as r, type SelectProps as s, type SelectOption as t, useTemplateFieldContext as u, type SelectRenderProps as v };
564
+ export { useSetProperty as A, useFieldValidation as B, Input as C, type InputProps as D, type SelectProps as E, type FieldValidationRule as F, type SelectOption as G, type SelectRenderProps as H, type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, type InferredTypesProviderProps as l, InferredTypesProvider as m, intersectTypes as n, type InferConfig as o, parseInferSyntax as p, getOperatorsForType as q, type NodePropertyProviderProps as r, NodePropertyProvider as s, useIsInNodePropertyProvider as t, useTemplateFieldContext as u, useNodeProperty as v, useNodeProperties as w, useInferredType as x, useSetInferredType as y, useAllInferredTypes as z };
@@ -1,4 +1,5 @@
1
- import * as React$1 from 'react';
1
+ import * as React from 'react';
2
+ import React__default from 'react';
2
3
 
3
4
  interface InputProps {
4
5
  /**
@@ -54,10 +55,10 @@ interface InputProps {
54
55
  * />
55
56
  * ```
56
57
  */
57
- declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React$1.JSX.Element;
58
+ declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React.JSX.Element;
58
59
 
59
60
  interface SelectOption {
60
- node?: React$1.ReactNode;
61
+ node?: React.ReactNode;
61
62
  value: string;
62
63
  label: string;
63
64
  }
@@ -101,7 +102,7 @@ interface SelectProps {
101
102
  * Render prop for custom select UI.
102
103
  * If not provided, uses a basic HTML select.
103
104
  */
104
- children?: (props: SelectRenderProps) => React$1.ReactNode;
105
+ children?: (props: SelectRenderProps) => React.ReactNode;
105
106
  }
106
107
  interface SelectRenderProps {
107
108
  value: string;
@@ -146,7 +147,47 @@ interface SelectRenderProps {
146
147
  * />
147
148
  * ```
148
149
  */
149
- declare function Select({ fieldName, label, value, onChange, options: rawOptions, disabled, placeholder, expectedType, required, hasRequiredError, className, children, }: SelectProps): React$1.JSX.Element;
150
+ declare function Select({ fieldName, label, value, onChange, options: rawOptions, disabled, placeholder, expectedType, required, hasRequiredError, className, children, }: SelectProps): React.JSX.Element;
151
+
152
+ /**
153
+ * Simplified Field Components (Mock/Development Version)
154
+ *
155
+ * These are mock implementations of the simplified field components
156
+ * for use during development and design. In production, these are
157
+ * replaced with the real implementations from packages/ui that include
158
+ * collaboration, type inference, and expression support.
159
+ *
160
+ * ## API
161
+ *
162
+ * The API matches the production components exactly, so developers
163
+ * can build and test their UIs without needing the full infrastructure.
164
+ *
165
+ * ## Example
166
+ *
167
+ * ```tsx
168
+ * import { Input, Select } from '@process.co/ui';
169
+ *
170
+ * function CustomUserForm({ value, onChange }) {
171
+ * return (
172
+ * <div>
173
+ * <Input
174
+ * fieldName="firstName"
175
+ * label="First Name"
176
+ * value={value.firstName}
177
+ * onChange={(v) => onChange({ ...value, firstName: v })}
178
+ * />
179
+ * <Select
180
+ * fieldName="role"
181
+ * label="Role"
182
+ * value={value.role}
183
+ * onChange={(v) => onChange({ ...value, role: v })}
184
+ * options={['admin', 'user', 'guest']}
185
+ * />
186
+ * </div>
187
+ * );
188
+ * }
189
+ * ```
190
+ */
150
191
 
151
192
  /**
152
193
  * Mock context value (always returns defaults).
@@ -185,17 +226,17 @@ declare function useFieldPath(fieldName: string): string;
185
226
  * Mock provider - just renders children without context.
186
227
  */
187
228
  declare function TemplateFieldProvider({ children }: {
188
- children: React.ReactNode;
189
- }): React$1.JSX.Element;
229
+ children: React__default.ReactNode;
230
+ }): React__default.JSX.Element;
190
231
  /**
191
232
  * Mock provider - just renders children without nesting context.
192
233
  */
193
234
  declare function NestedFieldProvider({ children }: {
194
- children: React.ReactNode;
235
+ children: React__default.ReactNode;
195
236
  fieldName: string;
196
- }): React$1.JSX.Element;
237
+ }): React__default.JSX.Element;
197
238
  type TemplateFieldProviderProps = {
198
- children: React.ReactNode;
239
+ children: React__default.ReactNode;
199
240
  nodeId?: string;
200
241
  yDoc?: any;
201
242
  collabUser?: any;
@@ -212,7 +253,7 @@ type TemplateFieldProviderProps = {
212
253
  disabled?: boolean;
213
254
  };
214
255
  type NestedFieldProviderProps = {
215
- children: React.ReactNode;
256
+ children: React__default.ReactNode;
216
257
  fieldName: string;
217
258
  };
218
259
  type TemplateFieldValidationError = {
@@ -290,7 +331,7 @@ interface InferredTypesContextValue {
290
331
  * Context for inferred types.
291
332
  * In production, this is provided by PropertiesRender.
292
333
  */
293
- declare const InferredTypesContext: React$1.Context<InferredTypesContextValue | null>;
334
+ declare const InferredTypesContext: React__default.Context<InferredTypesContextValue | null>;
294
335
  /**
295
336
  * Hook to access the inferred types context.
296
337
  * Returns null when not inside an InferredTypesProvider (e.g., in mock/dev mode).
@@ -302,14 +343,27 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
302
343
  * ```
303
344
  */
304
345
  declare function useInferredTypes(): InferredTypesContextValue | null;
346
+ /**
347
+ * Props for InferredTypesProvider
348
+ */
349
+ interface InferredTypesProviderProps {
350
+ children: React__default.ReactNode;
351
+ /**
352
+ * Optional Yjs document for collaborative sync (ignored in mock mode).
353
+ * When provided in production, inferred types are synced via Yjs.
354
+ */
355
+ yDoc?: unknown;
356
+ /**
357
+ * Optional key prefix for the Yjs map (ignored in mock mode).
358
+ */
359
+ mapKey?: string;
360
+ }
305
361
  /**
306
362
  * Mock provider for inferred types context.
307
363
  * In development mode, this is a no-op - just renders children.
308
364
  * In production, the real implementation from @repo/ui provides actual type propagation.
309
365
  */
310
- declare function InferredTypesProvider({ children }: {
311
- children: React.ReactNode;
312
- }): React$1.JSX.Element;
366
+ declare function InferredTypesProvider({ children }: InferredTypesProviderProps): React__default.JSX.Element;
313
367
  /**
314
368
  * Compute the intersection of multiple types.
315
369
  * Used when subscribing to multiple fields to narrow the expected type.
@@ -369,15 +423,114 @@ declare function getOperatorsForType(type: string): Array<{
369
423
  value: string;
370
424
  label: string;
371
425
  }>;
426
+ /**
427
+ * Props for NodePropertyProvider
428
+ */
429
+ interface NodePropertyProviderProps {
430
+ children: React__default.ReactNode;
431
+ /** The node ID this provider manages */
432
+ nodeId: string;
433
+ /** Yjs document for collaborative sync (ignored in mock mode) */
434
+ yDoc?: unknown;
435
+ /** Initial property data from the node */
436
+ initialData?: Record<string, any>;
437
+ /** Callback when a single property changes */
438
+ onPropertyChange?: (key: string, value: any, metadata?: any) => void;
439
+ /** Callback when multiple properties change */
440
+ onPropertiesChange?: (updates: Record<string, any>, metadata?: Record<string, any>) => void;
441
+ /** Client ID for conflict resolution */
442
+ clientId?: string;
443
+ }
444
+ /**
445
+ * Mock provider for node properties.
446
+ * In development mode, this is a no-op - just renders children.
447
+ * In production, the real implementation from @repo/ui provides actual store.
448
+ */
449
+ declare function NodePropertyProvider({ children }: NodePropertyProviderProps): React__default.ReactElement;
450
+ /**
451
+ * Mock hook - always returns false in development mode.
452
+ * In production, returns true when inside a NodePropertyProvider.
453
+ */
454
+ declare function useIsInNodePropertyProvider(): boolean;
455
+ /**
456
+ * Mock hook - returns [undefined, no-op] in development mode.
457
+ * In production, subscribes to a single property from the store.
458
+ *
459
+ * @example
460
+ * ```tsx
461
+ * const [operator, setOperator] = useNodeProperty<string>('operator');
462
+ * // In mock mode: operator is undefined, setOperator is a no-op
463
+ * ```
464
+ */
465
+ declare function useNodeProperty<T = any>(key: string): [T | undefined, (value: T, metadata?: any) => void];
466
+ /**
467
+ * Mock hook - returns [{}, no-op] in development mode.
468
+ * In production, subscribes to all properties from the store.
469
+ */
470
+ declare function useNodeProperties(): [
471
+ Record<string, any>,
472
+ (updates: Record<string, any>, metadata?: Record<string, any>) => void
473
+ ];
474
+ /**
475
+ * Mock hook - returns undefined in development mode.
476
+ * In production, subscribes to an inferred type by field name.
477
+ */
478
+ declare function useInferredType(fieldName: string): string | undefined;
479
+ /**
480
+ * Mock hook - returns no-op in development mode.
481
+ * In production, returns a setter for inferred types.
482
+ */
483
+ declare function useSetInferredType(): (fieldName: string, type: string) => void;
484
+ /**
485
+ * Mock hook - returns {} in development mode.
486
+ * In production, subscribes to all inferred types.
487
+ */
488
+ declare function useAllInferredTypes(): Record<string, string>;
489
+ /**
490
+ * Mock hook - returns no-op in development mode.
491
+ * In production, returns a setter for individual properties.
492
+ */
493
+ declare function useSetProperty(): <T = any>(key: string, value: T, metadata?: any) => void;
494
+ /**
495
+ * Validation rule for a field.
496
+ */
497
+ interface FieldValidationRule {
498
+ required?: boolean;
499
+ requiredIf?: (properties: Record<string, any>) => boolean;
500
+ customValidation?: (value: any, properties: Record<string, any>) => string | null;
501
+ }
502
+ /**
503
+ * Mock hook - returns no-ops in development mode.
504
+ * In production, allows custom controls to set validation rules.
505
+ *
506
+ * @example
507
+ * ```tsx
508
+ * const { setFieldRequired, setFieldRequiredIf } = useFieldValidation();
509
+ * setFieldRequired('expression', true);
510
+ * setFieldRequiredIf('expression', (props) => props.operator?.needsValue);
511
+ * ```
512
+ */
513
+ declare function useFieldValidation(): {
514
+ setFieldRequired: (fieldName: string, required: boolean) => void;
515
+ setFieldRequiredIf: (fieldName: string, requiredIf: (properties: Record<string, any>) => boolean) => void;
516
+ setFieldValidation: (fieldName: string, customValidation: (value: any, properties: Record<string, any>) => string | null) => void;
517
+ clearFieldValidation: (fieldName: string) => void;
518
+ isFieldRequired: (fieldName: string) => boolean;
519
+ validateField: (fieldName: string) => string | null;
520
+ };
372
521
 
522
+ type index_FieldValidationRule = FieldValidationRule;
373
523
  type index_InferConfig = InferConfig;
374
524
  declare const index_InferredTypesContext: typeof InferredTypesContext;
375
525
  type index_InferredTypesContextValue = InferredTypesContextValue;
376
526
  declare const index_InferredTypesProvider: typeof InferredTypesProvider;
527
+ type index_InferredTypesProviderProps = InferredTypesProviderProps;
377
528
  declare const index_Input: typeof Input;
378
529
  type index_InputProps = InputProps;
379
530
  declare const index_NestedFieldProvider: typeof NestedFieldProvider;
380
531
  type index_NestedFieldProviderProps = NestedFieldProviderProps;
532
+ declare const index_NodePropertyProvider: typeof NodePropertyProvider;
533
+ type index_NodePropertyProviderProps = NodePropertyProviderProps;
381
534
  declare const index_OPERATORS_BY_TYPE: typeof OPERATORS_BY_TYPE;
382
535
  declare const index_Select: typeof Select;
383
536
  type index_SelectOption = SelectOption;
@@ -392,12 +545,20 @@ type index_TemplateFieldValidationError = TemplateFieldValidationError;
392
545
  declare const index_getOperatorsForType: typeof getOperatorsForType;
393
546
  declare const index_intersectTypes: typeof intersectTypes;
394
547
  declare const index_parseInferSyntax: typeof parseInferSyntax;
548
+ declare const index_useAllInferredTypes: typeof useAllInferredTypes;
395
549
  declare const index_useFieldPath: typeof useFieldPath;
550
+ declare const index_useFieldValidation: typeof useFieldValidation;
551
+ declare const index_useInferredType: typeof useInferredType;
396
552
  declare const index_useInferredTypes: typeof useInferredTypes;
553
+ declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
397
554
  declare const index_useIsInTemplateFieldProvider: typeof useIsInTemplateFieldProvider;
555
+ declare const index_useNodeProperties: typeof useNodeProperties;
556
+ declare const index_useNodeProperty: typeof useNodeProperty;
557
+ declare const index_useSetInferredType: typeof useSetInferredType;
558
+ declare const index_useSetProperty: typeof useSetProperty;
398
559
  declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
399
560
  declare namespace index {
400
- export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
561
+ export { type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useAllInferredTypes as useAllInferredTypes, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext };
401
562
  }
402
563
 
403
- export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, InferredTypesProvider as l, intersectTypes as m, type InferConfig as n, getOperatorsForType as o, parseInferSyntax as p, Input as q, type InputProps as r, type SelectProps as s, type SelectOption as t, useTemplateFieldContext as u, type SelectRenderProps as v };
564
+ export { useSetProperty as A, useFieldValidation as B, Input as C, type InputProps as D, type SelectProps as E, type FieldValidationRule as F, type SelectOption as G, type SelectRenderProps as H, type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, type InferredTypesProviderProps as l, InferredTypesProvider as m, intersectTypes as n, type InferConfig as o, parseInferSyntax as p, getOperatorsForType as q, type NodePropertyProviderProps as r, NodePropertyProvider as s, useIsInNodePropertyProvider as t, useTemplateFieldContext as u, useNodeProperty as v, useNodeProperties as w, useInferredType as x, useSetInferredType as y, useAllInferredTypes as z };