@process.co/ui 0.0.7 → 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,9 +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 {
61
+ node?: React.ReactNode;
60
62
  value: string;
61
63
  label: string;
62
64
  }
@@ -100,7 +102,7 @@ interface SelectProps {
100
102
  * Render prop for custom select UI.
101
103
  * If not provided, uses a basic HTML select.
102
104
  */
103
- children?: (props: SelectRenderProps) => React$1.ReactNode;
105
+ children?: (props: SelectRenderProps) => React.ReactNode;
104
106
  }
105
107
  interface SelectRenderProps {
106
108
  value: string;
@@ -145,7 +147,47 @@ interface SelectRenderProps {
145
147
  * />
146
148
  * ```
147
149
  */
148
- 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
+ */
149
191
 
150
192
  /**
151
193
  * Mock context value (always returns defaults).
@@ -184,17 +226,17 @@ declare function useFieldPath(fieldName: string): string;
184
226
  * Mock provider - just renders children without context.
185
227
  */
186
228
  declare function TemplateFieldProvider({ children }: {
187
- children: React.ReactNode;
188
- }): React$1.JSX.Element;
229
+ children: React__default.ReactNode;
230
+ }): React__default.JSX.Element;
189
231
  /**
190
232
  * Mock provider - just renders children without nesting context.
191
233
  */
192
234
  declare function NestedFieldProvider({ children }: {
193
- children: React.ReactNode;
235
+ children: React__default.ReactNode;
194
236
  fieldName: string;
195
- }): React$1.JSX.Element;
237
+ }): React__default.JSX.Element;
196
238
  type TemplateFieldProviderProps = {
197
- children: React.ReactNode;
239
+ children: React__default.ReactNode;
198
240
  nodeId?: string;
199
241
  yDoc?: any;
200
242
  collabUser?: any;
@@ -211,7 +253,7 @@ type TemplateFieldProviderProps = {
211
253
  disabled?: boolean;
212
254
  };
213
255
  type NestedFieldProviderProps = {
214
- children: React.ReactNode;
256
+ children: React__default.ReactNode;
215
257
  fieldName: string;
216
258
  };
217
259
  type TemplateFieldValidationError = {
@@ -289,7 +331,7 @@ interface InferredTypesContextValue {
289
331
  * Context for inferred types.
290
332
  * In production, this is provided by PropertiesRender.
291
333
  */
292
- declare const InferredTypesContext: React$1.Context<InferredTypesContextValue | null>;
334
+ declare const InferredTypesContext: React__default.Context<InferredTypesContextValue | null>;
293
335
  /**
294
336
  * Hook to access the inferred types context.
295
337
  * Returns null when not inside an InferredTypesProvider (e.g., in mock/dev mode).
@@ -301,6 +343,35 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
301
343
  * ```
302
344
  */
303
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
+ }
361
+ /**
362
+ * Mock provider for inferred types context.
363
+ * In development mode, this is a no-op - just renders children.
364
+ * In production, the real implementation from @repo/ui provides actual type propagation.
365
+ */
366
+ declare function InferredTypesProvider({ children }: InferredTypesProviderProps): React__default.JSX.Element;
367
+ /**
368
+ * Compute the intersection of multiple types.
369
+ * Used when subscribing to multiple fields to narrow the expected type.
370
+ *
371
+ * @example
372
+ * intersectTypes(['string | number', 'number']) → 'number'
373
+ */
374
+ declare function intersectTypes(types: (string | undefined)[]): string;
304
375
  /**
305
376
  * Configuration parsed from the $infer<...> syntax.
306
377
  */
@@ -352,14 +423,114 @@ declare function getOperatorsForType(type: string): Array<{
352
423
  value: string;
353
424
  label: string;
354
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
+ };
355
521
 
522
+ type index_FieldValidationRule = FieldValidationRule;
356
523
  type index_InferConfig = InferConfig;
357
524
  declare const index_InferredTypesContext: typeof InferredTypesContext;
358
525
  type index_InferredTypesContextValue = InferredTypesContextValue;
526
+ declare const index_InferredTypesProvider: typeof InferredTypesProvider;
527
+ type index_InferredTypesProviderProps = InferredTypesProviderProps;
359
528
  declare const index_Input: typeof Input;
360
529
  type index_InputProps = InputProps;
361
530
  declare const index_NestedFieldProvider: typeof NestedFieldProvider;
362
531
  type index_NestedFieldProviderProps = NestedFieldProviderProps;
532
+ declare const index_NodePropertyProvider: typeof NodePropertyProvider;
533
+ type index_NodePropertyProviderProps = NodePropertyProviderProps;
363
534
  declare const index_OPERATORS_BY_TYPE: typeof OPERATORS_BY_TYPE;
364
535
  declare const index_Select: typeof Select;
365
536
  type index_SelectOption = SelectOption;
@@ -372,13 +543,22 @@ declare const index_TemplateFieldProvider: typeof TemplateFieldProvider;
372
543
  type index_TemplateFieldProviderProps = TemplateFieldProviderProps;
373
544
  type index_TemplateFieldValidationError = TemplateFieldValidationError;
374
545
  declare const index_getOperatorsForType: typeof getOperatorsForType;
546
+ declare const index_intersectTypes: typeof intersectTypes;
375
547
  declare const index_parseInferSyntax: typeof parseInferSyntax;
548
+ declare const index_useAllInferredTypes: typeof useAllInferredTypes;
376
549
  declare const index_useFieldPath: typeof useFieldPath;
550
+ declare const index_useFieldValidation: typeof useFieldValidation;
551
+ declare const index_useInferredType: typeof useInferredType;
377
552
  declare const index_useInferredTypes: typeof useInferredTypes;
553
+ declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
378
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;
379
559
  declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
380
560
  declare namespace index {
381
- export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, 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_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 };
382
562
  }
383
563
 
384
- 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, type InferConfig as l, getOperatorsForType as m, Input as n, type InputProps as o, parseInferSyntax as p, type SelectProps as q, type SelectOption as r, type SelectRenderProps as s, useTemplateFieldContext as u };
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,9 +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 {
61
+ node?: React.ReactNode;
60
62
  value: string;
61
63
  label: string;
62
64
  }
@@ -100,7 +102,7 @@ interface SelectProps {
100
102
  * Render prop for custom select UI.
101
103
  * If not provided, uses a basic HTML select.
102
104
  */
103
- children?: (props: SelectRenderProps) => React$1.ReactNode;
105
+ children?: (props: SelectRenderProps) => React.ReactNode;
104
106
  }
105
107
  interface SelectRenderProps {
106
108
  value: string;
@@ -145,7 +147,47 @@ interface SelectRenderProps {
145
147
  * />
146
148
  * ```
147
149
  */
148
- 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
+ */
149
191
 
150
192
  /**
151
193
  * Mock context value (always returns defaults).
@@ -184,17 +226,17 @@ declare function useFieldPath(fieldName: string): string;
184
226
  * Mock provider - just renders children without context.
185
227
  */
186
228
  declare function TemplateFieldProvider({ children }: {
187
- children: React.ReactNode;
188
- }): React$1.JSX.Element;
229
+ children: React__default.ReactNode;
230
+ }): React__default.JSX.Element;
189
231
  /**
190
232
  * Mock provider - just renders children without nesting context.
191
233
  */
192
234
  declare function NestedFieldProvider({ children }: {
193
- children: React.ReactNode;
235
+ children: React__default.ReactNode;
194
236
  fieldName: string;
195
- }): React$1.JSX.Element;
237
+ }): React__default.JSX.Element;
196
238
  type TemplateFieldProviderProps = {
197
- children: React.ReactNode;
239
+ children: React__default.ReactNode;
198
240
  nodeId?: string;
199
241
  yDoc?: any;
200
242
  collabUser?: any;
@@ -211,7 +253,7 @@ type TemplateFieldProviderProps = {
211
253
  disabled?: boolean;
212
254
  };
213
255
  type NestedFieldProviderProps = {
214
- children: React.ReactNode;
256
+ children: React__default.ReactNode;
215
257
  fieldName: string;
216
258
  };
217
259
  type TemplateFieldValidationError = {
@@ -289,7 +331,7 @@ interface InferredTypesContextValue {
289
331
  * Context for inferred types.
290
332
  * In production, this is provided by PropertiesRender.
291
333
  */
292
- declare const InferredTypesContext: React$1.Context<InferredTypesContextValue | null>;
334
+ declare const InferredTypesContext: React__default.Context<InferredTypesContextValue | null>;
293
335
  /**
294
336
  * Hook to access the inferred types context.
295
337
  * Returns null when not inside an InferredTypesProvider (e.g., in mock/dev mode).
@@ -301,6 +343,35 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
301
343
  * ```
302
344
  */
303
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
+ }
361
+ /**
362
+ * Mock provider for inferred types context.
363
+ * In development mode, this is a no-op - just renders children.
364
+ * In production, the real implementation from @repo/ui provides actual type propagation.
365
+ */
366
+ declare function InferredTypesProvider({ children }: InferredTypesProviderProps): React__default.JSX.Element;
367
+ /**
368
+ * Compute the intersection of multiple types.
369
+ * Used when subscribing to multiple fields to narrow the expected type.
370
+ *
371
+ * @example
372
+ * intersectTypes(['string | number', 'number']) → 'number'
373
+ */
374
+ declare function intersectTypes(types: (string | undefined)[]): string;
304
375
  /**
305
376
  * Configuration parsed from the $infer<...> syntax.
306
377
  */
@@ -352,14 +423,114 @@ declare function getOperatorsForType(type: string): Array<{
352
423
  value: string;
353
424
  label: string;
354
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
+ };
355
521
 
522
+ type index_FieldValidationRule = FieldValidationRule;
356
523
  type index_InferConfig = InferConfig;
357
524
  declare const index_InferredTypesContext: typeof InferredTypesContext;
358
525
  type index_InferredTypesContextValue = InferredTypesContextValue;
526
+ declare const index_InferredTypesProvider: typeof InferredTypesProvider;
527
+ type index_InferredTypesProviderProps = InferredTypesProviderProps;
359
528
  declare const index_Input: typeof Input;
360
529
  type index_InputProps = InputProps;
361
530
  declare const index_NestedFieldProvider: typeof NestedFieldProvider;
362
531
  type index_NestedFieldProviderProps = NestedFieldProviderProps;
532
+ declare const index_NodePropertyProvider: typeof NodePropertyProvider;
533
+ type index_NodePropertyProviderProps = NodePropertyProviderProps;
363
534
  declare const index_OPERATORS_BY_TYPE: typeof OPERATORS_BY_TYPE;
364
535
  declare const index_Select: typeof Select;
365
536
  type index_SelectOption = SelectOption;
@@ -372,13 +543,22 @@ declare const index_TemplateFieldProvider: typeof TemplateFieldProvider;
372
543
  type index_TemplateFieldProviderProps = TemplateFieldProviderProps;
373
544
  type index_TemplateFieldValidationError = TemplateFieldValidationError;
374
545
  declare const index_getOperatorsForType: typeof getOperatorsForType;
546
+ declare const index_intersectTypes: typeof intersectTypes;
375
547
  declare const index_parseInferSyntax: typeof parseInferSyntax;
548
+ declare const index_useAllInferredTypes: typeof useAllInferredTypes;
376
549
  declare const index_useFieldPath: typeof useFieldPath;
550
+ declare const index_useFieldValidation: typeof useFieldValidation;
551
+ declare const index_useInferredType: typeof useInferredType;
377
552
  declare const index_useInferredTypes: typeof useInferredTypes;
553
+ declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
378
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;
379
559
  declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
380
560
  declare namespace index {
381
- export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, 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_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 };
382
562
  }
383
563
 
384
- 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, type InferConfig as l, getOperatorsForType as m, Input as n, type InputProps as o, parseInferSyntax as p, type SelectProps as q, type SelectOption as r, type SelectRenderProps as s, useTemplateFieldContext as u };
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 };