@wistia/vhs 4.0.0-beta.d8f9ac3a.4f6efd8 → 4.0.0-beta.f802874f.b96ce51

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/vhs v4.0.0-beta.d8f9ac3a.4f6efd8
3
+ * @license @wistia/vhs v4.0.0-beta.f802874f.b96ce51
4
4
  *
5
5
  * Copyright (c) 2021-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -6622,7 +6622,9 @@ var disabledStyle3 = css13`
6622
6622
  var errorHoverStyle = css13`
6623
6623
  border-color: transparent;
6624
6624
  `;
6625
- var errorFocusedStyle = css13``;
6625
+ var errorFocusedStyle = css13`
6626
+ outline: none;
6627
+ `;
6626
6628
  var errorStyle = css13`
6627
6629
  background-color: ${({ theme: theme2 }) => theme2.color.error100};
6628
6630
  border: 1px solid ${({ theme: theme2 }) => theme2.color.error500};
@@ -8919,7 +8921,7 @@ import { isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
8919
8921
  import { useCallback as useCallback12, useMemo as useMemo7, useEffect as useEffect18 } from "react";
8920
8922
  import { styled as styled41 } from "styled-components";
8921
8923
  import { Editable, withReact, Slate, ReactEditor } from "slate-react";
8922
- import { createEditor, Transforms as Transforms5, Element as Element6, Text as Text4 } from "slate";
8924
+ import { createEditor, Transforms as Transforms5, Element as Element6, Text as Text4, Editor as Editor4 } from "slate";
8923
8925
  import { withHistory } from "slate-history";
8924
8926
  import isHotkey from "is-hotkey";
8925
8927
  import { isNil as isNil14, isNotNil as isNotNil26, isNonEmptyString as isNonEmptyString11 } from "@wistia/type-guards";
@@ -9231,7 +9233,7 @@ import { useSelected, useFocused } from "slate-react";
9231
9233
  import { styled as styled39, css as css21 } from "styled-components";
9232
9234
  import { jsx as jsx170, jsxs as jsxs28 } from "react/jsx-runtime";
9233
9235
  var Wrapper = styled39.span`
9234
- display: 'inline-block';
9236
+ display: inline-block;
9235
9237
  user-select: none;
9236
9238
  `;
9237
9239
  var Image = styled39.img`
@@ -10072,6 +10074,13 @@ var RichTextEditor = ({
10072
10074
  }
10073
10075
  }
10074
10076
  }, [editor]);
10077
+ const handleEditorClick = useCallback12(() => {
10078
+ const isEditorFocused = ReactEditor.isFocused(editor);
10079
+ if (!isEditorFocused) {
10080
+ ReactEditor.focus(editor);
10081
+ Transforms5.select(editor, Editor4.end(editor, []));
10082
+ }
10083
+ }, [editor]);
10075
10084
  return (
10076
10085
  // eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions
10077
10086
  /* @__PURE__ */ jsx184(
@@ -10080,7 +10089,7 @@ var RichTextEditor = ({
10080
10089
  "data-testid": dataTestId,
10081
10090
  disabled,
10082
10091
  height,
10083
- onClick: () => ReactEditor.focus(editor),
10092
+ onClick: handleEditorClick,
10084
10093
  children: /* @__PURE__ */ jsxs30(
10085
10094
  Slate,
10086
10095
  {