@wistia/vhs 4.0.0-beta.d9e3dd7c.d6acc83 → 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.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/vhs v4.0.0-beta.
|
|
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
|
*
|
|
@@ -8921,7 +8921,7 @@ import { isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
|
8921
8921
|
import { useCallback as useCallback12, useMemo as useMemo7, useEffect as useEffect18 } from "react";
|
|
8922
8922
|
import { styled as styled41 } from "styled-components";
|
|
8923
8923
|
import { Editable, withReact, Slate, ReactEditor } from "slate-react";
|
|
8924
|
-
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";
|
|
8925
8925
|
import { withHistory } from "slate-history";
|
|
8926
8926
|
import isHotkey from "is-hotkey";
|
|
8927
8927
|
import { isNil as isNil14, isNotNil as isNotNil26, isNonEmptyString as isNonEmptyString11 } from "@wistia/type-guards";
|
|
@@ -10074,6 +10074,13 @@ var RichTextEditor = ({
|
|
|
10074
10074
|
}
|
|
10075
10075
|
}
|
|
10076
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]);
|
|
10077
10084
|
return (
|
|
10078
10085
|
// eslint-disable-next-line styled-components-a11y/click-events-have-key-events, styled-components-a11y/no-static-element-interactions
|
|
10079
10086
|
/* @__PURE__ */ jsx184(
|
|
@@ -10082,7 +10089,7 @@ var RichTextEditor = ({
|
|
|
10082
10089
|
"data-testid": dataTestId,
|
|
10083
10090
|
disabled,
|
|
10084
10091
|
height,
|
|
10085
|
-
onClick:
|
|
10092
|
+
onClick: handleEditorClick,
|
|
10086
10093
|
children: /* @__PURE__ */ jsxs30(
|
|
10087
10094
|
Slate,
|
|
10088
10095
|
{
|