@process.co/ui 0.0.11 → 0.0.12
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/components/fields/index.cjs +14 -1
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +13 -1
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-B-kAG1RW.d.cts → index-ep9HbrZE.d.cts} +26 -2
- package/dist/{index-B-kAG1RW.d.ts → index-ep9HbrZE.d.ts} +26 -2
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -667,6 +667,29 @@ declare function useAllInferredTypes(): Record<string, string>;
|
|
|
667
667
|
* Returns a no-op when not inside any provider.
|
|
668
668
|
*/
|
|
669
669
|
declare function useSetProperty(): <T = any>(key: string, value: T, metadata?: any) => void;
|
|
670
|
+
/**
|
|
671
|
+
* Hook to trigger a layout update from within a custom control.
|
|
672
|
+
*
|
|
673
|
+
* Call this after structural changes that affect the node's visual layout,
|
|
674
|
+
* such as reordering items or toggling features that change the node's height.
|
|
675
|
+
*
|
|
676
|
+
* In development mode (DevProvider), this is a no-op.
|
|
677
|
+
* In production, this triggers regenerateRfState() to recalculate the flow layout.
|
|
678
|
+
*
|
|
679
|
+
* @example
|
|
680
|
+
* ```tsx
|
|
681
|
+
* function CaseEditor() {
|
|
682
|
+
* const triggerLayoutUpdate = useTriggerLayoutUpdate();
|
|
683
|
+
*
|
|
684
|
+
* const handleReorderCases = (newCases) => {
|
|
685
|
+
* setValue({ ...value, cases: newCases });
|
|
686
|
+
* // Trigger layout recalculation after reordering
|
|
687
|
+
* triggerLayoutUpdate();
|
|
688
|
+
* };
|
|
689
|
+
* }
|
|
690
|
+
* ```
|
|
691
|
+
*/
|
|
692
|
+
declare function useTriggerLayoutUpdate(): () => void;
|
|
670
693
|
/**
|
|
671
694
|
* Validation rule for a field.
|
|
672
695
|
*/
|
|
@@ -743,8 +766,9 @@ declare const index_useNodeProperty: typeof useNodeProperty;
|
|
|
743
766
|
declare const index_useSetInferredType: typeof useSetInferredType;
|
|
744
767
|
declare const index_useSetProperty: typeof useSetProperty;
|
|
745
768
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
769
|
+
declare const index_useTriggerLayoutUpdate: typeof useTriggerLayoutUpdate;
|
|
746
770
|
declare namespace index {
|
|
747
|
-
export { type index_BaseOperatorType as BaseOperatorType, 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, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, 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_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, 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 };
|
|
771
|
+
export { type index_BaseOperatorType as BaseOperatorType, 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, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, 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_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, 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, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
748
772
|
}
|
|
749
773
|
|
|
750
|
-
export { useClearAllInferredTypes as A, useAllInferredTypes as B, useSetProperty as C,
|
|
774
|
+
export { useClearAllInferredTypes as A, useAllInferredTypes as B, useSetProperty as C, useTriggerLayoutUpdate as D, useFieldValidation as E, type FieldValidationRule as F, Input as G, type InputProps as H, type InferredTypesContextValue as I, type SelectProps as J, type SelectOption as K, type SelectRenderProps as L, parseInferredTypes as M, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, computeExtendedType as P, filterOperatorsByType as Q, getStringConstants as R, Select as S, type TemplateFieldContextValue as T, getNumberConstants as U, type BaseOperatorType as V, type OperatorDef as W, type ParsedTypes as X, 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, useClearInferredType as z };
|
|
@@ -667,6 +667,29 @@ declare function useAllInferredTypes(): Record<string, string>;
|
|
|
667
667
|
* Returns a no-op when not inside any provider.
|
|
668
668
|
*/
|
|
669
669
|
declare function useSetProperty(): <T = any>(key: string, value: T, metadata?: any) => void;
|
|
670
|
+
/**
|
|
671
|
+
* Hook to trigger a layout update from within a custom control.
|
|
672
|
+
*
|
|
673
|
+
* Call this after structural changes that affect the node's visual layout,
|
|
674
|
+
* such as reordering items or toggling features that change the node's height.
|
|
675
|
+
*
|
|
676
|
+
* In development mode (DevProvider), this is a no-op.
|
|
677
|
+
* In production, this triggers regenerateRfState() to recalculate the flow layout.
|
|
678
|
+
*
|
|
679
|
+
* @example
|
|
680
|
+
* ```tsx
|
|
681
|
+
* function CaseEditor() {
|
|
682
|
+
* const triggerLayoutUpdate = useTriggerLayoutUpdate();
|
|
683
|
+
*
|
|
684
|
+
* const handleReorderCases = (newCases) => {
|
|
685
|
+
* setValue({ ...value, cases: newCases });
|
|
686
|
+
* // Trigger layout recalculation after reordering
|
|
687
|
+
* triggerLayoutUpdate();
|
|
688
|
+
* };
|
|
689
|
+
* }
|
|
690
|
+
* ```
|
|
691
|
+
*/
|
|
692
|
+
declare function useTriggerLayoutUpdate(): () => void;
|
|
670
693
|
/**
|
|
671
694
|
* Validation rule for a field.
|
|
672
695
|
*/
|
|
@@ -743,8 +766,9 @@ declare const index_useNodeProperty: typeof useNodeProperty;
|
|
|
743
766
|
declare const index_useSetInferredType: typeof useSetInferredType;
|
|
744
767
|
declare const index_useSetProperty: typeof useSetProperty;
|
|
745
768
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
769
|
+
declare const index_useTriggerLayoutUpdate: typeof useTriggerLayoutUpdate;
|
|
746
770
|
declare namespace index {
|
|
747
|
-
export { type index_BaseOperatorType as BaseOperatorType, 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, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, 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_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, 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 };
|
|
771
|
+
export { type index_BaseOperatorType as BaseOperatorType, 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, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, 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_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, 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, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
748
772
|
}
|
|
749
773
|
|
|
750
|
-
export { useClearAllInferredTypes as A, useAllInferredTypes as B, useSetProperty as C,
|
|
774
|
+
export { useClearAllInferredTypes as A, useAllInferredTypes as B, useSetProperty as C, useTriggerLayoutUpdate as D, useFieldValidation as E, type FieldValidationRule as F, Input as G, type InputProps as H, type InferredTypesContextValue as I, type SelectProps as J, type SelectOption as K, type SelectRenderProps as L, parseInferredTypes as M, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, computeExtendedType as P, filterOperatorsByType as Q, getStringConstants as R, Select as S, type TemplateFieldContextValue as T, getNumberConstants as U, type BaseOperatorType as V, type OperatorDef as W, type ParsedTypes as X, 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, useClearInferredType as z };
|
package/dist/index.cjs
CHANGED
|
@@ -5189,6 +5189,9 @@ __export(fields_exports, {
|
|
|
5189
5189
|
},
|
|
5190
5190
|
useTemplateFieldContext: function() {
|
|
5191
5191
|
return useTemplateFieldContext;
|
|
5192
|
+
},
|
|
5193
|
+
useTriggerLayoutUpdate: function() {
|
|
5194
|
+
return useTriggerLayoutUpdate;
|
|
5192
5195
|
}
|
|
5193
5196
|
});
|
|
5194
5197
|
var DevContext = React2.createContext(null);
|
|
@@ -6065,6 +6068,18 @@ function useSetProperty() {
|
|
|
6065
6068
|
devContext
|
|
6066
6069
|
]);
|
|
6067
6070
|
}
|
|
6071
|
+
function useTriggerLayoutUpdate() {
|
|
6072
|
+
var devContext = React2.useContext(DevContext);
|
|
6073
|
+
return React2.useCallback(function() {
|
|
6074
|
+
if (devContext) {
|
|
6075
|
+
console.log("[useTriggerLayoutUpdate] Dev mode - layout update is a no-op");
|
|
6076
|
+
} else {
|
|
6077
|
+
console.warn("[useTriggerLayoutUpdate] No provider - layout update ignored");
|
|
6078
|
+
}
|
|
6079
|
+
}, [
|
|
6080
|
+
devContext
|
|
6081
|
+
]);
|
|
6082
|
+
}
|
|
6068
6083
|
function useFieldValidation() {
|
|
6069
6084
|
var setFieldRequired = React2.useCallback(function(fieldName, required) {
|
|
6070
6085
|
console.warn('[useFieldValidation] Mock mode - cannot set required for "'.concat(fieldName, '"'));
|