Update to @vector-im/matrix-wysiwyg (#125)
This commit is contained in:
parent
5fbc5af884
commit
a0cb9470cc
15 changed files with 22 additions and 22 deletions
|
@ -74,7 +74,7 @@
|
||||||
"@babel/runtime": "^7.12.5",
|
"@babel/runtime": "^7.12.5",
|
||||||
"@matrix-org/analytics-events": "^0.26.0",
|
"@matrix-org/analytics-events": "^0.26.0",
|
||||||
"@matrix-org/emojibase-bindings": "^1.1.2",
|
"@matrix-org/emojibase-bindings": "^1.1.2",
|
||||||
"@matrix-org/matrix-wysiwyg": "2.37.9",
|
"@vector-im/matrix-wysiwyg": "2.37.13",
|
||||||
"@matrix-org/react-sdk-module-api": "^2.4.0",
|
"@matrix-org/react-sdk-module-api": "^2.4.0",
|
||||||
"@matrix-org/spec": "^1.7.0",
|
"@matrix-org/spec": "^1.7.0",
|
||||||
"@sentry/browser": "^8.0.0",
|
"@sentry/browser": "^8.0.0",
|
||||||
|
|
|
@ -10,7 +10,7 @@ import React, { ComponentProps, lazy, Suspense } from "react";
|
||||||
import { ISendEventResponse } from "matrix-js-sdk/src/matrix";
|
import { ISendEventResponse } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
// we need to import the types for TS, but do not import the sendMessage
|
// we need to import the types for TS, but do not import the sendMessage
|
||||||
// function to avoid importing from "@matrix-org/matrix-wysiwyg"
|
// function to avoid importing from "@vector-im/matrix-wysiwyg"
|
||||||
import { SendMessageParams } from "./utils/message";
|
import { SendMessageParams } from "./utils/message";
|
||||||
import { retry } from "../../../../utils/promise";
|
import { retry } from "../../../../utils/promise";
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ export const dynamicImportConversionFunctions = async (): Promise<{
|
||||||
*/
|
*/
|
||||||
plainToRich(plain: string, inMessageFormat: boolean): Promise<string>;
|
plainToRich(plain: string, inMessageFormat: boolean): Promise<string>;
|
||||||
}> => {
|
}> => {
|
||||||
const { richToPlain, plainToRich } = await retry(() => import("@matrix-org/matrix-wysiwyg"), RETRY_COUNT);
|
const { richToPlain, plainToRich } = await retry(() => import("@vector-im/matrix-wysiwyg"), RETRY_COUNT);
|
||||||
|
|
||||||
return { richToPlain, plainToRich };
|
return { richToPlain, plainToRich };
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { MouseEventHandler, ReactNode } from "react";
|
import React, { MouseEventHandler, ReactNode } from "react";
|
||||||
import { FormattingFunctions, AllActionStates, ActionState } from "@matrix-org/matrix-wysiwyg";
|
import { FormattingFunctions, AllActionStates, ActionState } from "@vector-im/matrix-wysiwyg";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import BoldIcon from "@vector-im/compound-design-tokens/assets/web/icons/bold";
|
import BoldIcon from "@vector-im/compound-design-tokens/assets/web/icons/bold";
|
||||||
import BulletedListIcon from "@vector-im/compound-design-tokens/assets/web/icons/list-bulleted";
|
import BulletedListIcon from "@vector-im/compound-design-tokens/assets/web/icons/list-bulleted";
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
|
import { FormattingFunctions } from "@vector-im/matrix-wysiwyg";
|
||||||
import React, { ChangeEvent, useState } from "react";
|
import React, { ChangeEvent, useState } from "react";
|
||||||
|
|
||||||
import { _t } from "../../../../../languageHandler";
|
import { _t } from "../../../../../languageHandler";
|
||||||
|
|
|
@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ForwardedRef, forwardRef, FunctionComponent } from "react";
|
import React, { ForwardedRef, forwardRef, FunctionComponent } from "react";
|
||||||
import { FormattingFunctions, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
|
import { FormattingFunctions, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { useRoomContext } from "../../../../../contexts/RoomContext";
|
import { useRoomContext } from "../../../../../contexts/RoomContext";
|
||||||
|
|
|
@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
import React, { memo, MutableRefObject, ReactNode, useEffect, useMemo, useRef } from "react";
|
import React, { memo, MutableRefObject, ReactNode, useEffect, useMemo, useRef } from "react";
|
||||||
import { IEventRelation } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation } from "matrix-js-sdk/src/matrix";
|
||||||
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
|
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
|
||||||
import { useWysiwyg, FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
|
import { useWysiwyg, FormattingFunctions } from "@vector-im/matrix-wysiwyg";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
import Autocomplete from "../../Autocomplete";
|
import Autocomplete from "../../Autocomplete";
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Wysiwyg, WysiwygEvent } from "@matrix-org/matrix-wysiwyg";
|
import { Wysiwyg, WysiwygEvent } from "@vector-im/matrix-wysiwyg";
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { KeyboardEvent, RefObject, SyntheticEvent, useCallback, useRef, useState } from "react";
|
import { KeyboardEvent, RefObject, SyntheticEvent, useCallback, useRef, useState } from "react";
|
||||||
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
|
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
|
||||||
import { IEventRelation } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { useSettingValue } from "../../../../../hooks/useSettings";
|
import { useSettingValue } from "../../../../../hooks/useSettings";
|
||||||
|
|
|
@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
|
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
|
||||||
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
|
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
|
||||||
import { SyntheticEvent, useState, SetStateAction } from "react";
|
import { SyntheticEvent, useState, SetStateAction } from "react";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
import { MutableRefObject, RefObject } from "react";
|
import { MutableRefObject, RefObject } from "react";
|
||||||
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { WysiwygEvent } from "@matrix-org/matrix-wysiwyg";
|
import { WysiwygEvent } from "@vector-im/matrix-wysiwyg";
|
||||||
|
|
||||||
import { TimelineRenderingType } from "../../../../../contexts/RoomContext";
|
import { TimelineRenderingType } from "../../../../../contexts/RoomContext";
|
||||||
import { IRoomState } from "../../../../structures/RoomView";
|
import { IRoomState } from "../../../../structures/RoomView";
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
|
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
|
||||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { ICompletion } from "../../../../../autocomplete/Autocompleter";
|
import { ICompletion } from "../../../../../autocomplete/Autocompleter";
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { richToPlain, plainToRich } from "@matrix-org/matrix-wysiwyg";
|
import { richToPlain, plainToRich } from "@vector-im/matrix-wysiwyg";
|
||||||
import { IContent, IEventRelation, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
|
import { IContent, IEventRelation, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
|
||||||
import { ReplacementEvent, RoomMessageEventContent, RoomMessageTextEventContent } from "matrix-js-sdk/src/types";
|
import { ReplacementEvent, RoomMessageEventContent, RoomMessageTextEventContent } from "matrix-js-sdk/src/types";
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { cleanup, render, screen, waitFor } from "@testing-library/react";
|
import { cleanup, render, screen, waitFor } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import { ActionState, ActionTypes, AllActionStates, FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
|
import { ActionState, ActionTypes, AllActionStates, FormattingFunctions } from "@vector-im/matrix-wysiwyg";
|
||||||
|
|
||||||
import { FormattingButtons } from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/FormattingButtons";
|
import { FormattingButtons } from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/FormattingButtons";
|
||||||
import * as LinkModal from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/LinkModal";
|
import * as LinkModal from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/LinkModal";
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
|
import { FormattingFunctions } from "@vector-im/matrix-wysiwyg";
|
||||||
import { render, screen, waitFor } from "@testing-library/react";
|
import { render, screen, waitFor } from "@testing-library/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -1911,13 +1911,6 @@
|
||||||
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-7.0.0.tgz#8d6abdb9ded8656cc9e2a7909913a34bf3fc9b3a"
|
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-7.0.0.tgz#8d6abdb9ded8656cc9e2a7909913a34bf3fc9b3a"
|
||||||
integrity sha512-MOencXiW/gI5MuTtCNsuojjwT5DXCrjMqv9xOslJC9h2tPdLFFFMGr58dY5Lis4DRd9MRWcgrGowUIHOqieWTA==
|
integrity sha512-MOencXiW/gI5MuTtCNsuojjwT5DXCrjMqv9xOslJC9h2tPdLFFFMGr58dY5Lis4DRd9MRWcgrGowUIHOqieWTA==
|
||||||
|
|
||||||
"@matrix-org/matrix-wysiwyg@2.37.9":
|
|
||||||
version "2.37.9"
|
|
||||||
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-2.37.9.tgz#4d5667df3c74e11fd01c4b5be920caff72bf2f48"
|
|
||||||
integrity sha512-Jn2ug6ySX5es5/SV5BVgSBhVPS7GXggwZ/GGWmnJvhnp/IArit4kgUAsNRhQeKebuVvNphwQykCGwyBOn2PLBA==
|
|
||||||
dependencies:
|
|
||||||
eslint-plugin-unicorn "^54.0.0"
|
|
||||||
|
|
||||||
"@matrix-org/olm@3.2.15":
|
"@matrix-org/olm@3.2.15":
|
||||||
version "3.2.15"
|
version "3.2.15"
|
||||||
resolved "https://registry.yarnpkg.com/@matrix-org/olm/-/olm-3.2.15.tgz#55f3c1b70a21bbee3f9195cecd6846b1083451ec"
|
resolved "https://registry.yarnpkg.com/@matrix-org/olm/-/olm-3.2.15.tgz#55f3c1b70a21bbee3f9195cecd6846b1083451ec"
|
||||||
|
@ -3101,6 +3094,13 @@
|
||||||
ts-xor "^1.3.0"
|
ts-xor "^1.3.0"
|
||||||
vaul "^0.7.0"
|
vaul "^0.7.0"
|
||||||
|
|
||||||
|
"@vector-im/matrix-wysiwyg@2.37.13":
|
||||||
|
version "2.37.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/@vector-im/matrix-wysiwyg/-/matrix-wysiwyg-2.37.13.tgz#7b64e7652a196e811c0470dcbff8d36e2229cd46"
|
||||||
|
integrity sha512-3ilnJBJSzeTfAQXNJJ29EAqa14exrkca3acTPssdoh3WhTKwXyQ0xU8sS50d6gqlAP/Nahw1y2k+PzajXo1SsQ==
|
||||||
|
dependencies:
|
||||||
|
eslint-plugin-unicorn "^54.0.0"
|
||||||
|
|
||||||
"@zxcvbn-ts/core@^3.0.4":
|
"@zxcvbn-ts/core@^3.0.4":
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@zxcvbn-ts/core/-/core-3.0.4.tgz#c5bde72235eb6c273cec78b672bb47c0d7045cad"
|
resolved "https://registry.yarnpkg.com/@zxcvbn-ts/core/-/core-3.0.4.tgz#c5bde72235eb6c273cec78b672bb47c0d7045cad"
|
||||||
|
|
Loading…
Reference in a new issue