Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit a0cb947

Browse files
authored
Update to @vector-im/matrix-wysiwyg (#125)
1 parent 5fbc5af commit a0cb947

15 files changed

+22
-22
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@babel/runtime": "^7.12.5",
7575
"@matrix-org/analytics-events": "^0.26.0",
7676
"@matrix-org/emojibase-bindings": "^1.1.2",
77-
"@matrix-org/matrix-wysiwyg": "2.37.9",
77+
"@vector-im/matrix-wysiwyg": "2.37.13",
7878
"@matrix-org/react-sdk-module-api": "^2.4.0",
7979
"@matrix-org/spec": "^1.7.0",
8080
"@sentry/browser": "^8.0.0",

src/components/views/rooms/wysiwyg_composer/DynamicImportWysiwygComposer.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React, { ComponentProps, lazy, Suspense } from "react";
1010
import { ISendEventResponse } from "matrix-js-sdk/src/matrix";
1111

1212
// we need to import the types for TS, but do not import the sendMessage
13-
// function to avoid importing from "@matrix-org/matrix-wysiwyg"
13+
// function to avoid importing from "@vector-im/matrix-wysiwyg"
1414
import { SendMessageParams } from "./utils/message";
1515
import { retry } from "../../../../utils/promise";
1616

@@ -55,7 +55,7 @@ export const dynamicImportConversionFunctions = async (): Promise<{
5555
*/
5656
plainToRich(plain: string, inMessageFormat: boolean): Promise<string>;
5757
}> => {
58-
const { richToPlain, plainToRich } = await retry(() => import("@matrix-org/matrix-wysiwyg"), RETRY_COUNT);
58+
const { richToPlain, plainToRich } = await retry(() => import("@vector-im/matrix-wysiwyg"), RETRY_COUNT);
5959

6060
return { richToPlain, plainToRich };
6161
};

src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
77
*/
88

99
import React, { MouseEventHandler, ReactNode } from "react";
10-
import { FormattingFunctions, AllActionStates, ActionState } from "@matrix-org/matrix-wysiwyg";
10+
import { FormattingFunctions, AllActionStates, ActionState } from "@vector-im/matrix-wysiwyg";
1111
import classNames from "classnames";
1212
import BoldIcon from "@vector-im/compound-design-tokens/assets/web/icons/bold";
1313
import BulletedListIcon from "@vector-im/compound-design-tokens/assets/web/icons/list-bulleted";

src/components/views/rooms/wysiwyg_composer/components/LinkModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import { FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
9+
import { FormattingFunctions } from "@vector-im/matrix-wysiwyg";
1010
import React, { ChangeEvent, useState } from "react";
1111

1212
import { _t } from "../../../../../languageHandler";

src/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
77
*/
88

99
import React, { ForwardedRef, forwardRef, FunctionComponent } from "react";
10-
import { FormattingFunctions, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
10+
import { FormattingFunctions, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
1111
import { logger } from "matrix-js-sdk/src/logger";
1212

1313
import { useRoomContext } from "../../../../../contexts/RoomContext";

src/components/views/rooms/wysiwyg_composer/components/WysiwygComposer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
99
import React, { memo, MutableRefObject, ReactNode, useEffect, useMemo, useRef } from "react";
1010
import { IEventRelation } from "matrix-js-sdk/src/matrix";
1111
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
12-
import { useWysiwyg, FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
12+
import { useWysiwyg, FormattingFunctions } from "@vector-im/matrix-wysiwyg";
1313
import classNames from "classnames";
1414

1515
import Autocomplete from "../../Autocomplete";

src/components/views/rooms/wysiwyg_composer/hooks/useInputEventProcessor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import { Wysiwyg, WysiwygEvent } from "@matrix-org/matrix-wysiwyg";
9+
import { Wysiwyg, WysiwygEvent } from "@vector-im/matrix-wysiwyg";
1010
import { useCallback } from "react";
1111
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
1212

src/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
77
*/
88

99
import { KeyboardEvent, RefObject, SyntheticEvent, useCallback, useRef, useState } from "react";
10-
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
10+
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
1111
import { IEventRelation } from "matrix-js-sdk/src/matrix";
1212

1313
import { useSettingValue } from "../../../../../hooks/useSettings";

src/components/views/rooms/wysiwyg_composer/hooks/useSuggestion.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
77
*/
88

99
import { EMOTICON_TO_EMOJI } from "@matrix-org/emojibase-bindings";
10-
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
10+
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
1111
import { SyntheticEvent, useState, SetStateAction } from "react";
1212
import { logger } from "matrix-js-sdk/src/logger";
1313

src/components/views/rooms/wysiwyg_composer/hooks/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
88

99
import { MutableRefObject, RefObject } from "react";
1010
import { IEventRelation, MatrixClient } from "matrix-js-sdk/src/matrix";
11-
import { WysiwygEvent } from "@matrix-org/matrix-wysiwyg";
11+
import { WysiwygEvent } from "@vector-im/matrix-wysiwyg";
1212

1313
import { TimelineRenderingType } from "../../../../../contexts/RoomContext";
1414
import { IRoomState } from "../../../../structures/RoomView";

src/components/views/rooms/wysiwyg_composer/utils/autocomplete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import { AllowedMentionAttributes, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
9+
import { AllowedMentionAttributes, MappedSuggestion } from "@vector-im/matrix-wysiwyg";
1010
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
1111

1212
import { ICompletion } from "../../../../../autocomplete/Autocompleter";

src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import { richToPlain, plainToRich } from "@matrix-org/matrix-wysiwyg";
9+
import { richToPlain, plainToRich } from "@vector-im/matrix-wysiwyg";
1010
import { IContent, IEventRelation, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
1111
import { ReplacementEvent, RoomMessageEventContent, RoomMessageTextEventContent } from "matrix-js-sdk/src/types";
1212

test/components/views/rooms/wysiwyg_composer/components/FormattingButtons-test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
99
import React from "react";
1010
import { cleanup, render, screen, waitFor } from "@testing-library/react";
1111
import userEvent from "@testing-library/user-event";
12-
import { ActionState, ActionTypes, AllActionStates, FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
12+
import { ActionState, ActionTypes, AllActionStates, FormattingFunctions } from "@vector-im/matrix-wysiwyg";
1313

1414
import { FormattingButtons } from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/FormattingButtons";
1515
import * as LinkModal from "../../../../../../src/components/views/rooms/wysiwyg_composer/components/LinkModal";

test/components/views/rooms/wysiwyg_composer/components/LinkModal-test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import { FormattingFunctions } from "@matrix-org/matrix-wysiwyg";
9+
import { FormattingFunctions } from "@vector-im/matrix-wysiwyg";
1010
import { render, screen, waitFor } from "@testing-library/react";
1111
import React from "react";
1212
import userEvent from "@testing-library/user-event";

yarn.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -1911,13 +1911,6 @@
19111911
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-7.0.0.tgz#8d6abdb9ded8656cc9e2a7909913a34bf3fc9b3a"
19121912
integrity sha512-MOencXiW/gI5MuTtCNsuojjwT5DXCrjMqv9xOslJC9h2tPdLFFFMGr58dY5Lis4DRd9MRWcgrGowUIHOqieWTA==
19131913

1914-
"@matrix-org/[email protected]":
1915-
version "2.37.9"
1916-
resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-2.37.9.tgz#4d5667df3c74e11fd01c4b5be920caff72bf2f48"
1917-
integrity sha512-Jn2ug6ySX5es5/SV5BVgSBhVPS7GXggwZ/GGWmnJvhnp/IArit4kgUAsNRhQeKebuVvNphwQykCGwyBOn2PLBA==
1918-
dependencies:
1919-
eslint-plugin-unicorn "^54.0.0"
1920-
19211914
"@matrix-org/[email protected]":
19221915
version "3.2.15"
19231916
resolved "https://registry.yarnpkg.com/@matrix-org/olm/-/olm-3.2.15.tgz#55f3c1b70a21bbee3f9195cecd6846b1083451ec"
@@ -3101,6 +3094,13 @@
31013094
ts-xor "^1.3.0"
31023095
vaul "^0.7.0"
31033096

3097+
"@vector-im/[email protected]":
3098+
version "2.37.13"
3099+
resolved "https://registry.yarnpkg.com/@vector-im/matrix-wysiwyg/-/matrix-wysiwyg-2.37.13.tgz#7b64e7652a196e811c0470dcbff8d36e2229cd46"
3100+
integrity sha512-3ilnJBJSzeTfAQXNJJ29EAqa14exrkca3acTPssdoh3WhTKwXyQ0xU8sS50d6gqlAP/Nahw1y2k+PzajXo1SsQ==
3101+
dependencies:
3102+
eslint-plugin-unicorn "^54.0.0"
3103+
31043104
"@zxcvbn-ts/core@^3.0.4":
31053105
version "3.0.4"
31063106
resolved "https://registry.yarnpkg.com/@zxcvbn-ts/core/-/core-3.0.4.tgz#c5bde72235eb6c273cec78b672bb47c0d7045cad"

0 commit comments

Comments
 (0)