@superinterface/react 2.17.2 → 2.17.3

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/index.d.cts CHANGED
@@ -329,6 +329,7 @@ declare const useCreateMessage: ({ onError, }?: {
329
329
  };
330
330
 
331
331
  declare const useMessageFormContext: () => {
332
+ content: string;
332
333
  isDisabled: boolean;
333
334
  isLoading: boolean;
334
335
  files: openai_resources.FileObject[];
package/dist/index.d.ts CHANGED
@@ -329,6 +329,7 @@ declare const useCreateMessage: ({ onError, }?: {
329
329
  };
330
330
 
331
331
  declare const useMessageFormContext: () => {
332
+ content: string;
332
333
  isDisabled: boolean;
333
334
  isLoading: boolean;
334
335
  files: openai_resources.FileObject[];
package/dist/index.js CHANGED
@@ -1856,6 +1856,7 @@ import { useContext as useContext10 } from "react";
1856
1856
  // src/contexts/messages/MessageFormContext/index.ts
1857
1857
  import { createContext as createContext10 } from "react";
1858
1858
  var MessageFormContext = createContext10({
1859
+ content: "",
1859
1860
  isDisabled: false,
1860
1861
  isLoading: false,
1861
1862
  files: [],
@@ -2534,7 +2535,7 @@ var Root4 = function(param) {
2534
2535
  var children = param.children, onSubmitArg = param.onSubmit;
2535
2536
  var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
2536
2537
  var formProps = useForm(formOptions);
2537
- var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset;
2538
+ var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset, watch = formProps.watch;
2538
2539
  var addToast = useToasts().addToast;
2539
2540
  var queryClient = useQueryClient4();
2540
2541
  var threadContext = useSuperinterfaceContext();
@@ -2638,13 +2639,15 @@ var Root4 = function(param) {
2638
2639
  return _ref.apply(this, arguments);
2639
2640
  };
2640
2641
  }();
2642
+ var content = watch("content");
2641
2643
  return /* @__PURE__ */ jsx48(MessageFormContext.Provider, {
2642
2644
  value: {
2643
2645
  isDisabled: isDisabled,
2644
2646
  isLoading: isLoading,
2645
2647
  files: files,
2646
2648
  setFiles: setFiles,
2647
- isFileLoading: isFileLoading
2649
+ isFileLoading: isFileLoading,
2650
+ content: content
2648
2651
  },
2649
2652
  children: /* @__PURE__ */ jsx48(FormProvider, _object_spread_props(_object_spread({}, formProps), {
2650
2653
  children: /* @__PURE__ */ jsx48(Box12, {