merge: upstream cinny v4.12.7 into lotus
Brings the 4.12.7 fixes: "%" sign wrapping below the composer input and
emoji autocompletion overwriting the preceding element. The release's
security half (sanitize-html, react-router-dom) was already applied in
91def3ad (we are on newer versions than upstream ships).
Resolved: kept our package.json/lockfile (the fork is ahead on every
dependency — React 19, router 7, i18next 26…), version 4.12.7-lotus, our
README/CONTRIBUTING, our "Lotus Chat vN" branding via pkg.version, and
the deleted GitHub-only workflows stay deleted. Note upstream announces
it is replacing matrix-js-sdk with its own SDK and pausing PRs; future
syncs will get harder.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
@@ -268,15 +268,15 @@ export const getPointUntilChar = (
|
||||
return targetPoint;
|
||||
};
|
||||
|
||||
export const getPrevWorldRange = (editor: Editor): BaseRange | undefined => {
|
||||
export const getPrevWordRange = (editor: Editor): BaseRange | undefined => {
|
||||
const { selection } = editor;
|
||||
if (!selection || !Range.isCollapsed(selection)) return undefined;
|
||||
const [cursorPoint] = Range.edges(selection);
|
||||
const worldStartPoint = getPointUntilChar(editor, cursorPoint, {
|
||||
const wordStartPoint = getPointUntilChar(editor, cursorPoint, {
|
||||
reverse: true,
|
||||
match: (char) => char === ' ',
|
||||
match: (char) => char === ' ' || char === '',
|
||||
});
|
||||
return worldStartPoint && Editor.range(editor, worldStartPoint, cursorPoint);
|
||||
return wordStartPoint && Editor.range(editor, wordStartPoint, cursorPoint);
|
||||
};
|
||||
|
||||
export const isEmptyEditor = (editor: Editor): boolean => {
|
||||
|
||||
@@ -44,7 +44,7 @@ import {
|
||||
AutocompletePrefix,
|
||||
AutocompleteQuery,
|
||||
getAutocompleteQuery,
|
||||
getPrevWorldRange,
|
||||
getPrevWordRange,
|
||||
resetEditor,
|
||||
RoomMentionAutocomplete,
|
||||
UserMentionAutocomplete,
|
||||
@@ -806,7 +806,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
sendTypingStatus(!isEmptyEditor(editor));
|
||||
}
|
||||
|
||||
const prevWordRange = getPrevWorldRange(editor);
|
||||
const prevWordRange = getPrevWordRange(editor);
|
||||
const query = prevWordRange
|
||||
? getAutocompleteQuery<AutocompletePrefix>(editor, prevWordRange, AUTOCOMPLETE_PREFIXES)
|
||||
: undefined;
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
createEmoticonElement,
|
||||
customHtmlEqualsPlainText,
|
||||
getAutocompleteQuery,
|
||||
getPrevWorldRange,
|
||||
getPrevWordRange,
|
||||
htmlToEditorInput,
|
||||
moveCursor,
|
||||
plainToEditorInput,
|
||||
@@ -281,7 +281,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
return;
|
||||
}
|
||||
|
||||
const prevWordRange = getPrevWorldRange(editor);
|
||||
const prevWordRange = getPrevWordRange(editor);
|
||||
const query = prevWordRange
|
||||
? getAutocompleteQuery<AutocompletePrefix>(editor, prevWordRange, AUTOCOMPLETE_PREFIXES)
|
||||
: undefined;
|
||||
|
||||
@@ -4,9 +4,9 @@ export const useAccountManagementActions = () => {
|
||||
const actions = useMemo(
|
||||
() => ({
|
||||
profile: 'org.matrix.profile',
|
||||
sessionsList: 'org.matrix.sessions_list',
|
||||
sessionView: 'org.matrix.session_view',
|
||||
sessionEnd: 'org.matrix.session_end',
|
||||
sessionsList: 'org.matrix.devices_list',
|
||||
sessionView: 'org.matrix.device_view',
|
||||
sessionEnd: 'org.matrix.device_delete',
|
||||
accountDeactivate: 'org.matrix.account_deactivate',
|
||||
crossSigningReset: 'org.matrix.cross_signing_reset',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user