@levo-so/studio 0.3.7 → 0.3.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.
package/index.d.ts CHANGED
@@ -733,6 +733,20 @@ initialValues?: Record<string, any>;
733
733
  theme?: ILevoFormContext["theme"];
734
734
  }>;
735
735
 
736
+ /**
737
+ * Replaces variable tokens in a string with values from a flat context map.
738
+ *
739
+ * Supports both legacy `{path}` syntax and pipe-syntax transforms
740
+ * (`{path | default:"X" | upper | …}`). See `variableExpression.ts`.
741
+ *
742
+ * Backward-compat: a token with no transforms whose value is missing/null
743
+ * is left as a literal `{path}` — matches the prior behavior.
744
+ *
745
+ * @example format("Hello {name}", { name: "World" }) => "Hello World"
746
+ * @example format("Hi {name | upper | default:\"there\"}", { name: null }) => "Hi there"
747
+ */
748
+ export declare const format: (template: string, values: Record<string, unknown>) => string;
749
+
736
750
  export declare const FormInput: React_2.ForwardRefExoticComponent<IInputProps & React_2.RefAttributes<HTMLInputElement>>;
737
751
 
738
752
  export declare const FormTextarea: React_2.ForwardRefExoticComponent<ITextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;