Merge commit '963a54664804e60ea8e30795090a0f20de7a48dc' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-06-12 19:18:55 +02:00
commit cfd038a808
25 files changed
+973 -239

No files matched your search

+4 -1
View File
@@ -5,6 +5,7 @@ import { Provider as ReduxProvider } from 'react-redux';
import { importFetchedStatuses } from '@/mastodon/actions/importer';
import { hydrateStore } from '@/mastodon/actions/store';
import type { ApiAnnualReportResponse } from '@/mastodon/api/annual_report';
import { FocusTargetProvider } from '@/mastodon/components/navigation_focus_target';
import { Router } from '@/mastodon/components/router';
import { WrapstodonSharedPage } from '@/mastodon/features/annual_report/shared_page';
import { IntlProvider, loadLocale } from '@/mastodon/locales';
@@ -52,7 +53,9 @@ function loaded() {
<IntlProvider>
<ReduxProvider store={store}>
<Router>
<WrapstodonSharedPage />
<FocusTargetProvider>
<WrapstodonSharedPage />
</FocusTargetProvider>
</Router>
</ReduxProvider>
</IntlProvider>,
@@ -22,10 +22,6 @@ export async function importCustomEmoji(emojis: ApiCustomEmojiJSON[]) {
await clearCache('custom');
await loadCustomEmoji();
const { reloadCustomEmojis } =
await import('@/mastodon/features/emoji/picker');
await reloadCustomEmojis();
log('Custom emojis updated, reloaded cache and picker data.');
}
}
@@ -0,0 +1,187 @@
import escapeTextContentForBrowser from 'escape-html';
import type { ApiMediaAttachmentJSON } from '@/mastodon/api_types/media_attachments';
import type {
ApiFilterResultJSON,
ApiStatusJSON,
} from '@/mastodon/api_types/statuses';
import type {
FilterResult,
MediaAttachmentShape,
StatusShape,
} from '@/mastodon/models/status';
const domParser = new DOMParser();
export function normalizeStatus(
status: ApiStatusJSON,
normalOldStatus?: StatusShape,
{ bogusQuotePolicy = false, expandSpoilers = false } = {},
) {
const normalStatus: StatusShape = {
hidden: normalOldStatus?.hidden ?? false,
collapsed: normalOldStatus?.collapsed ?? false,
content: '',
contentHtml: '',
muted: false,
pinned: false,
bookmarked: false,
favourited: false,
quote_approval: null,
reblogged: false,
...status,
account: status.account.id,
media_attachments: [],
poll: status.poll?.id,
reblog: status.reblog?.id,
quote: undefined,
filtered: [],
application: {
name: 'Web',
...status.application,
},
};
if (bogusQuotePolicy) {
normalStatus.quote_approval = null;
}
if (status.quote?.quoted_status) {
normalStatus.quote = {
...status.quote,
quoted_status: status.quote.quoted_status.id,
};
}
if (status.card) {
normalStatus.card = {
...status.card,
authors: status.card.authors.map((author) => ({
name: author.name,
url: author.url,
accountId: author.account?.id,
})),
};
}
if (status.filtered) {
normalStatus.filtered = status.filtered.map(normalizeFilterResult);
}
// Only calculate these values when status first encountered and
// when the underlying values change. Otherwise keep the ones
// already in the reducer
if (
normalOldStatus?.content === normalStatus.content &&
normalOldStatus.spoiler_text === normalStatus.spoiler_text
) {
normalStatus.search_index = normalOldStatus.search_index;
normalStatus.contentHtml = normalOldStatus.contentHtml;
normalStatus.spoilerHtml = normalOldStatus.spoilerHtml;
normalStatus.spoiler_text = normalOldStatus.spoiler_text;
normalStatus.hidden = normalOldStatus.hidden;
if (normalOldStatus.translation) {
normalStatus.translation = normalOldStatus.translation;
}
} else {
// If the status has a CW but no contents, treat the CW as if it were the
// status' contents, to avoid having a CW toggle with seemingly no effect.
if (
normalStatus.spoiler_text &&
!normalStatus.content &&
!normalStatus.quote
) {
normalStatus.content = normalStatus.spoiler_text;
normalStatus.spoiler_text = '';
}
const spoilerText = normalStatus.spoiler_text ?? '';
const searchContent = [spoilerText, status.content]
.concat(
status.poll?.options
? status.poll.options.map((option) => option.title)
: [],
)
.concat(status.media_attachments.map((att) => att.description))
.join('\n\n')
.replace(/<br\s*\/?>/g, '\n')
.replace(/<\/p><p>/g, '\n\n');
normalStatus.search_index = domParser.parseFromString(
searchContent,
'text/html',
).documentElement.textContent;
normalStatus.contentHtml = normalStatus.content;
normalStatus.spoilerHtml = escapeTextContentForBrowser(spoilerText);
normalStatus.hidden = expandSpoilers
? false
: spoilerText.length > 0 || normalStatus.sensitive;
// Remove quote fallback link from the DOM so it doesn't mess with paragraph margins
if (normalStatus.quote && normalStatus.contentHtml) {
normalStatus.contentHtml = stripQuoteFallback(normalStatus.contentHtml);
}
if (
normalStatus.url &&
!(
normalStatus.url.startsWith('http://') ||
normalStatus.url.startsWith('https://')
)
) {
normalStatus.url = null;
}
normalStatus.url ??= normalStatus.uri;
normalStatus.media_attachments = status.media_attachments.map(
(attachment) =>
normalizeMediaAttachment(
attachment,
normalOldStatus?.media_attachments,
),
);
}
if (normalOldStatus) {
normalStatus.quote_approval ??= normalOldStatus.quote_approval;
}
return normalStatus;
}
function normalizeMediaAttachment(
attachment: ApiMediaAttachmentJSON,
oldAttachments?: MediaAttachmentShape[],
): MediaAttachmentShape {
const { remote_url } = attachment;
return {
...attachment,
remote_url:
remote_url && /^https?:\/\//.test(remote_url) ? remote_url : null,
translation: oldAttachments?.find(
(oldAttachment) =>
oldAttachment.id === attachment.id &&
oldAttachment.description === attachment.description,
)?.translation,
};
}
function normalizeFilterResult(input: ApiFilterResultJSON): FilterResult {
return {
...input,
filter: input.filter.id,
};
}
function stripQuoteFallback(text: string) {
const wrapper = document.createElement('div');
wrapper.innerHTML = text;
wrapper.querySelector('.quote-inline')?.remove();
return wrapper.innerHTML;
}
@@ -7,16 +7,85 @@ export type MediaAttachmentType =
| 'unknown'
| 'audio';
export interface ApiMediaAttachmentJSON {
interface BaseApiMediaAttachmentJSON {
id: string;
type: MediaAttachmentType;
url: string;
preview_url: string;
remoteUrl: string;
preview_remote_url: string;
text_url: string;
// TODO: how to define this?
meta: unknown;
remote_url?: string;
preview_remote_url?: string;
text_url?: string;
description?: string;
blurhash: string;
}
interface ApiImageAttachmentJSON extends BaseApiMediaAttachmentJSON {
type: 'image';
meta: {
original: ApiImageAttachmentMetaJSON;
small: ApiImageAttachmentMetaJSON;
};
}
interface ApiAudioAttachmentJSON extends BaseApiMediaAttachmentJSON {
type: 'audio';
meta: {
colors: ApiColorsAttachmentMetaJSON;
original: ApiVideoAttachmentMetaJSON;
small: ApiImageAttachmentMetaJSON;
};
}
interface ApiVideoAttachmentJSON extends BaseApiMediaAttachmentJSON {
type: 'video';
meta: {
colors: ApiColorsAttachmentMetaJSON;
original: ApiVideoAttachmentMetaJSON;
small: ApiImageAttachmentMetaJSON;
focus: {
x: number;
y: number;
};
};
}
interface ApiGifvAttachmentJSON extends BaseApiMediaAttachmentJSON {
type: 'gifv';
meta: {
original: ApiVideoAttachmentMetaJSON;
small: ApiImageAttachmentMetaJSON;
};
}
interface ApiUnknownAttachmentJSON extends BaseApiMediaAttachmentJSON {
type: 'unknown';
meta: unknown;
}
export type ApiMediaAttachmentJSON =
| ApiImageAttachmentJSON
| ApiAudioAttachmentJSON
| ApiVideoAttachmentJSON
| ApiGifvAttachmentJSON
| ApiUnknownAttachmentJSON;
export interface ApiImageAttachmentMetaJSON {
width: number;
height: number;
size: string;
aspect: number;
}
export interface ApiVideoAttachmentMetaJSON {
width: number;
height: number;
frame_rate: string;
duration: number;
bitrate: number;
}
export interface ApiColorsAttachmentMetaJSON {
background: string;
foreground: string;
accent: string;
}
+17 -2
View File
@@ -1,6 +1,7 @@
// See app/serializers/rest/status_serializer.rb
import type { ApiAccountJSON } from './accounts';
import type { ApiCollectionJSON } from './collections';
import type { ApiCustomEmojiJSON } from './custom_emoji';
import type { ApiMediaAttachmentJSON } from './media_attachments';
import type { ApiPollJSON } from './polls';
@@ -94,11 +95,11 @@ export interface ApiStatusJSON {
url: string;
replies_count: number;
reblogs_count: number;
favorites_count: number;
favourites_count: number;
quotes_count: number;
edited_at?: string;
favorited?: boolean;
favourited?: boolean;
reblogged?: boolean;
muted?: boolean;
bookmarked?: boolean;
@@ -116,6 +117,7 @@ export interface ApiStatusJSON {
tags: ApiTagJSON[];
emojis: ApiCustomEmojiJSON[];
tagged_collections: ApiCollectionJSON[];
card?: ApiPreviewCardJSON;
poll?: ApiPollJSON;
@@ -134,6 +136,19 @@ export interface ApiStatusSourceJSON {
spoiler_text: string;
}
export interface ApiStatusTranslationJSON {
detected_source_language: string;
language: string;
provider: string;
contentHtml: string;
spoilerHtml: string;
spoiler_text: string;
poll?: {
id: string;
options: { title: string }[];
};
}
export function isStatusVisibility(
visibility: string,
): visibility is StatusVisibility {
@@ -102,15 +102,9 @@ export const FocusTargetProvider: React.FC<{
export function useFocusOnNavigation(targetName?: string) {
const focusTargetRef = useContext(FocusTargetContext);
if (focusTargetRef === null) {
throw Error(
'useFocusTargetContext must be used inside of a FocusTargetProvider',
);
}
return useCallback(
(element: HTMLElement | null) => {
const focusTarget = focusTargetRef.current;
const focusTarget = focusTargetRef?.current;
// Bail out if focusTarget was set to `false`
if (!element || !focusTarget) {
@@ -140,7 +140,7 @@ export const EditFieldModal = forwardRef<
const customEmojis = useCustomEmojis();
const customEmojiCodes = useMemo(
() => Object.keys(customEmojis ?? {}),
() => Object.keys(customEmojis),
[customEmojis],
);
const checkField = useCallback(
@@ -323,10 +323,7 @@ class EmojiPickerDropdown extends PureComponent {
EmojiPickerAsync().then(EmojiMart => {
EmojiPicker = EmojiMart.Picker;
Emoji = EmojiMart.Emoji;
void EmojiMart.loadCustomEmojiData().then(() => {
this.setState({ loading: false });
});
this.setState({ loading: false });
}).catch(() => {
this.setState({ loading: false, active: false });
});
@@ -13,8 +13,6 @@ import { usePickerEmojis } from './picker';
const backgroundImageFnDefault = () => `${assetHost}/emoji/sheet_16_0.png`;
export { fetchCustomEmojiData as loadCustomEmojiData } from './picker';
export const Picker: FC<PickerProps> = ({
set = 'twitter',
sheetSize = 32,
@@ -24,17 +22,13 @@ export const Picker: FC<PickerProps> = ({
...props
}) => {
const { mode } = useEmojiAppState();
const { customCategories, customEmojis } = usePickerEmojis();
if (!customEmojis) {
return null;
}
const { categories, emojis } = usePickerEmojis();
return (
<PickerRaw
data={EmojiData}
custom={customEmojis}
include={customCategories}
custom={emojis}
include={categories}
set={set}
sheetSize={sheetSize}
sheetColumns={sheetColumns}
+41 -20
View File
@@ -1,7 +1,6 @@
import { initialState } from '@/mastodon/initial_state';
import { toSupportedLocale } from './locale';
import { reloadCustomEmojis } from './picker';
import type { EmojiWorkerMessage } from './types';
import { emojiLogger } from './utils';
@@ -39,27 +38,37 @@ export async function initializeEmoji() {
void fallbackLoad();
}, WORKER_TIMEOUT);
tempWorker.addEventListener('message', (event: MessageEvent<string>) => {
const { data: message } = event;
tempWorker.addEventListener(
'message',
(event: MessageEvent<EmojiWorkerMessage>) => {
const { data: message } = event;
worker ??= tempWorker;
clearTimeout(timeoutId);
worker ??= tempWorker;
clearTimeout(timeoutId);
if (message !== 'ready') {
workerLog(message);
return;
}
const { type } = message;
if (type === 'log') {
workerLog(message.message);
} else if (type === 'done' && message.storeName === 'custom') {
void loadEmojisToStore();
}
const debugValue = localStorage.getItem('debug');
if (debugValue) {
messageWorker({ type: 'debug', debugValue });
}
if (type !== 'ready') {
return; // Exit for other messages.
}
workerLog('loading data');
messageWorker(userLocale);
messageWorker('custom');
messageWorker('shortcodes');
});
const debugValue = localStorage.getItem('debug');
if (debugValue) {
messageWorker({ type: 'debug', debugValue });
}
workerLog('loading data');
messageWorker(userLocale);
messageWorker('custom');
messageWorker('shortcodes');
void loadEmojisToStore();
},
);
}
async function fallbackLoad() {
@@ -71,8 +80,8 @@ async function fallbackLoad() {
const customEmojis = await importCustomEmojiData();
if (customEmojis && customEmojis.length > 0) {
log('loaded %d custom emojis', customEmojis.length);
await reloadCustomEmojis();
}
const shortcodes = await importLegacyShortcodes();
if (shortcodes?.length) {
log('loaded %d legacy shortcodes', shortcodes.length);
@@ -82,6 +91,7 @@ async function fallbackLoad() {
if (emojis) {
log('loaded %d emojis to locale %s', emojis.length, userLocale);
}
await loadEmojisToStore();
}
export async function loadCustomEmoji() {
@@ -92,9 +102,9 @@ export async function loadCustomEmoji() {
const emojis = await importCustomEmojiData();
if (emojis && emojis.length > 0) {
log('loaded %d custom emojis', emojis.length);
await reloadCustomEmojis();
}
}
await loadEmojisToStore();
}
function messageWorker(data: EmojiWorkerMessage | string) {
@@ -110,3 +120,14 @@ function messageWorker(data: EmojiWorkerMessage | string) {
worker.postMessage(data);
}
}
async function loadEmojisToStore() {
const { store } = await import('@/mastodon/store');
const { loadCustomEmojis, loadLocale } =
await import('@/mastodon/reducers/slices/emojis');
loadLocale(userLocale);
await store.dispatch(loadCustomEmojis());
log('loaded emoji data into store');
}
@@ -27,7 +27,6 @@ export function useEmojiAppState(): EmojiAppState {
return {
currentLocale: locale,
locales: [locale],
mode,
darkTheme: isDarkMode(),
assetHost,
@@ -64,7 +63,6 @@ export function getEmojiAppState(): EmojiAppState {
return {
currentLocale,
locales: [currentLocale],
mode: determineEmojiMode(emojiStyle),
darkTheme: isDarkMode(),
assetHost,
@@ -1,83 +1,18 @@
import { useEffect, useState } from 'react';
import type { CategoryName, CustomEmoji } from 'emoji-mart';
import { autoPlayGif } from '@/mastodon/initial_state';
import {
createAppSelector,
useAppSelector,
} from '@/mastodon/store/typed_functions';
import { createLimitedCache } from '@/mastodon/utils/cache';
import { emojiLogger } from './utils';
const log = emojiLogger('picker');
let customEmojis: CustomEmoji[] | null = null;
let customCategories = [
'recent',
'people',
'nature',
'foods',
'activity',
'places',
'objects',
'symbols',
'flags',
] as CategoryName[];
const searchCache = createLimitedCache<LegacyEmoji[]>({ maxSize: 10, log });
export async function fetchCustomEmojiData() {
if (customEmojis !== null) {
return customEmojis;
}
const { loadAllCustomEmoji } = await import('./database');
const emojisRaw = await loadAllCustomEmoji();
// If it returns null then custom emojis aren't even loaded yet.
if (emojisRaw === null) {
return [];
}
// If it's empty, then they are loaded but there aren't any.
if (emojisRaw.length === 0) {
customEmojis = [];
return customEmojis;
}
const categories = new Set(['custom']);
const emojis = [];
for (const emoji of emojisRaw) {
const name = emoji.shortcode.replaceAll(':', '');
emojis.push({
name,
id: name,
custom: true,
short_names: [name],
imageUrl: autoPlayGif ? emoji.url : emoji.static_url,
customCategory: emoji.category,
});
if (emoji.category) {
categories.add(`custom-${emoji.category}`);
}
}
customEmojis = emojis.toSorted((a, b) => {
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
});
customCategories = customCategories.toSpliced(
1,
0,
...(Array.from(categories).toSorted() as CategoryName[]),
);
log(
'loaded %d custom emojis in %d categories',
customEmojis.length,
categories.size,
);
return customEmojis;
}
type LegacyEmoji =
| { id: string; custom?: false; native: string }
| {
@@ -85,16 +20,6 @@ type LegacyEmoji =
custom: true;
};
export async function reloadCustomEmojis() {
customEmojis = null;
const { loadEmojisIntoCache } =
await import('@/mastodon/hooks/useCustomEmojis');
await Promise.all([fetchCustomEmojiData(), loadEmojisIntoCache()]);
searchCache.clear();
}
// Replicates the old legacy search function.
export async function emojiMartSearch(
token: string,
@@ -127,19 +52,64 @@ export async function emojiMartSearch(
return legacyResults;
}
export function usePickerEmojis() {
const [, setLoaded] = useState(customEmojis !== null);
const defaultCategories = [
'people',
'nature',
'foods',
'activity',
'places',
'objects',
'symbols',
'flags',
] as CategoryName[];
useEffect(() => {
if (customEmojis === null) {
void fetchCustomEmojiData().then(() => {
setLoaded(true);
});
const selectPickerData = createAppSelector(
[(state) => state.emojis.custom, (state) => state.emojis.customCategories],
(emojis, categories) => {
// Create a map of shortcode to category name.
const categoryMap = new Map<string, string>();
for (const category in categories) {
const catEmojis = categories[category];
if (!catEmojis?.length) {
continue;
}
for (const shortcode of catEmojis) {
categoryMap.set(shortcode, category);
}
}
}, []);
return {
customEmojis,
customCategories,
};
const customEmojis: CustomEmoji[] = [];
for (const shortcode in emojis) {
const emoji = emojis[shortcode];
if (!emoji) {
continue;
}
customEmojis.push({
name: shortcode,
id: shortcode,
custom: true,
short_names: [shortcode],
imageUrl: autoPlayGif ? emoji.url : emoji.static_url,
customCategory: categoryMap.get(shortcode),
} as CustomEmoji);
}
searchCache.clear();
log('regenerated the picker data');
return {
emojis: customEmojis,
categories: [
'recent',
'custom',
...Object.keys(categories).toSorted(),
...defaultCategories,
] as CategoryName[],
};
},
);
export function usePickerEmojis() {
return useAppSelector(selectPickerData);
}
@@ -109,7 +109,7 @@ export async function updateHtmlWithEmoji({
}: {
element: Element;
locale: string;
} & Omit<EmojiAppState, 'currentLocale' | 'locales'>) {
} & Omit<EmojiAppState, 'currentLocale'>) {
if (mode === EMOJI_MODE_NATIVE) {
return;
}
@@ -28,7 +28,6 @@ export type CacheKey =
| LocaleWithShortcodes;
export interface EmojiAppState {
locales: Locale[];
currentLocale: Locale;
mode: EmojiMode;
darkTheme: boolean;
@@ -82,10 +81,20 @@ export type ExtraCustomEmojiMap = Record<
>;
export type EmojiWorkerMessage =
| { type: 'ready' }
| {
type: 'load';
storeName: string;
}
| {
type: 'done';
storeName: string;
importCount: number;
}
| {
type: 'log';
message: string;
}
| {
type: 'debug';
debugValue: string;
@@ -9,13 +9,13 @@ import {
import type { EmojiWorkerMessage } from './types';
addEventListener('message', handleMessage);
self.postMessage('ready'); // After the worker is ready, notify the main thread
self.postMessage({ type: 'ready' } satisfies EmojiWorkerMessage); // After the worker is ready, notify the main thread
function handleMessage(event: MessageEvent<EmojiWorkerMessage>) {
const { data } = event;
if (data.type === 'debug') {
debug.enable(data.debugValue);
} else {
} else if (data.type === 'load') {
void loadData(data.storeName);
}
}
@@ -31,6 +31,10 @@ async function loadData(storeName: string) {
}
if (importCount) {
self.postMessage(`loaded ${importCount} emojis into ${storeName}`);
self.postMessage({
type: 'done',
storeName,
importCount,
} satisfies EmojiWorkerMessage);
}
}
@@ -8,6 +8,7 @@ import { Provider } from 'react-redux';
import { fetchStatus, toggleStatusSpoilers } from 'mastodon/actions/statuses';
import { hydrateStore } from 'mastodon/actions/store';
import { FocusTargetProvider } from 'mastodon/components/navigation_focus_target';
import { Router } from 'mastodon/components/router';
import { DetailedStatus } from 'mastodon/features/status/components/detailed_status';
import { useRenderSignal } from 'mastodon/hooks/useRenderSignal';
@@ -79,7 +80,9 @@ export const Status: React.FC<{ id: string }> = ({ id }) => {
<IntlProvider>
<Provider store={store}>
<Router>
<Embed id={id} />
<FocusTargetProvider>
<Embed id={id} />
</FocusTargetProvider>
</Router>
</Provider>
</IntlProvider>
@@ -18,7 +18,7 @@ export const useAudioContext = ({ audioElementRef }: AudioContextOptions) => {
const gainNodeRef = useRef<GainNode>();
useEffect(() => {
if (!audioElementRef.current) {
if (!audioElementRef.current || typeof AudioContext === 'undefined') {
return;
}
@@ -43,13 +43,17 @@ export const useAudioContext = ({ audioElementRef }: AudioContextOptions) => {
}, [audioElementRef]);
const playAudio = useCallback(() => {
void audioElementRef.current?.play();
void audioContextRef.current?.resume();
if (audioContextRef.current && audioElementRef.current) {
void audioElementRef.current.play();
void audioContextRef.current.resume();
}
}, [audioElementRef]);
const pauseAudio = useCallback(() => {
audioElementRef.current?.pause();
void audioContextRef.current?.suspend();
if (audioContextRef.current && audioElementRef.current) {
audioElementRef.current.pause();
void audioContextRef.current.suspend();
}
}, [audioElementRef]);
return {
@@ -1,40 +1,25 @@
import { useEffect, useState } from 'react';
import { createAppSelector, useAppSelector } from '@/mastodon/store';
import type { ExtraCustomEmojiMap } from '../features/emoji/types';
import { emojiLogger } from '../features/emoji/utils';
let emojis: ExtraCustomEmojiMap | null = null;
const log = emojiLogger('useCustomEmojis');
const selectCustomEmojis = createAppSelector(
[(state) => state.emojis.custom],
(custom) => {
const emojis: ExtraCustomEmojiMap = {};
for (const shortcode in custom) {
const emoji = custom[shortcode];
if (!emoji) {
continue;
}
emojis[shortcode] = {
shortcode,
...emoji,
};
}
return emojis;
},
);
export function useCustomEmojis() {
const [, setLoaded] = useState(emojis !== null);
useEffect(() => {
if (!emojis) {
void loadEmojisIntoCache().then(() => {
setLoaded(true);
});
}
}, []);
return emojis;
}
export async function loadEmojisIntoCache() {
const { loadAllCustomEmoji } = await import('../features/emoji/database');
const emojisRaw = await loadAllCustomEmoji();
if (emojisRaw === null) {
log('Custom emojis not loaded yet');
return;
}
emojis = {};
for (const emoji of emojisRaw) {
emojis[emoji.shortcode] = {
url: emoji.url,
shortcode: emoji.shortcode,
static_url: emoji.static_url,
};
}
log('Loaded %d custom emojis into cache', Object.keys(emojis).length);
return useAppSelector(selectCustomEmojis);
}
+92 -4
View File
@@ -1,15 +1,103 @@
import type { RecordOf } from 'immutable';
import type { ApiCollectionJSON } from 'mastodon/api_types/collections';
import type { ApiPreviewCardJSON } from 'mastodon/api_types/statuses';
import type { ApiCollectionJSON } from '@/mastodon/api_types/collections';
import type { ApiCustomEmojiJSON } from '@/mastodon/api_types/custom_emoji';
import type { ApiMediaAttachmentJSON } from '@/mastodon/api_types/media_attachments';
import type {
ApiQuoteJSON,
ApiQuotePolicyJSON,
} from '@/mastodon/api_types/quotes';
import type {
ApiFilterResultJSON,
ApiMentionJSON,
ApiPreviewCardAuthorJSON,
ApiPreviewCardJSON,
ApiStatusTranslationJSON,
ApiTagJSON,
StatusVisibility,
} from '@/mastodon/api_types/statuses';
export type { StatusVisibility } from 'mastodon/api_types/statuses';
export type { StatusVisibility } from '@/mastodon/api_types/statuses';
// Temporary until we type it correctly
export type Status = Immutable.Map<string, unknown>;
export type Card = RecordOf<ApiPreviewCardJSON>;
export interface StatusShape {
id: string;
account: string;
created_at: string;
edited_at?: string;
application: {
name: string;
website?: string;
};
hidden: boolean;
language: string;
muted: boolean;
pinned: boolean;
filtered: FilterResult[];
sensitive: boolean;
collapsed: boolean;
uri: string;
url: string | null;
// Content
content: string;
contentHtml: string;
in_reply_to_account_id?: string;
in_reply_to_id?: string;
search_index?: string;
spoilerHtml?: string;
spoiler_text?: string;
// Embeds
card?: CardShape;
emojis: Pick<ApiCustomEmojiJSON, 'shortcode' | 'static_url' | 'url'>[];
media_attachments: MediaAttachmentShape[];
mentions: ApiMentionJSON[];
poll?: string;
quote?: Omit<ApiQuoteJSON, 'quoted_status'> & {
quoted_status?: string;
};
reblog?: string;
tagged_collections: ApiCollectionJSON[];
tags: ApiTagJSON[];
translation?: StatusTranslation;
// Interactions
bookmarked: boolean;
favourited: boolean;
favourites_count: number;
quote_approval: ApiQuotePolicyJSON | null;
quotes_count: number;
reblogged: boolean;
reblogs_count: number;
replies_count: number;
visibility: StatusVisibility;
}
export type CardShape = Omit<ApiPreviewCardJSON, 'authors'> & {
authors: (Omit<ApiPreviewCardAuthorJSON, 'author'> & {
accountId?: string;
})[];
};
export type Card = RecordOf<CardShape>;
export type MediaAttachment = Immutable.Map<string, unknown>;
export type MediaAttachmentShape = Omit<
ApiMediaAttachmentJSON,
'remote_url'
> & {
remote_url: string | null;
translation?: string;
};
export type CollectionAttachment = RecordOf<ApiCollectionJSON>;
export type FilterResult = Omit<ApiFilterResultJSON, 'filter'> & {
filter: string;
};
export type StatusTranslation = Omit<ApiStatusTranslationJSON, 'poll'>;
@@ -0,0 +1,71 @@
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { Locale } from 'emojibase';
import type { ApiCustomEmojiJSON } from '@/mastodon/api_types/custom_emoji';
import { toSupportedLocale } from '@/mastodon/features/emoji/locale';
import { createAsyncThunk } from '@/mastodon/store/typed_functions';
interface EmojisState {
custom: Record<string, Pick<ApiCustomEmojiJSON, 'url' | 'static_url'>>;
customCategories: Record<string, string[]>; // { name: shortcodes[] }
customLoaded: boolean;
localesLoaded: Locale[];
}
const emojisSlice = createSlice({
name: 'emojis',
initialState: {
custom: {},
customCategories: {},
customLoaded: false,
localesLoaded: [],
} as EmojisState,
reducers: {
loadLocale(state, action: PayloadAction<string>) {
const locale = toSupportedLocale(action.payload);
if (!state.localesLoaded.includes(locale)) {
state.localesLoaded.push(locale);
}
},
},
extraReducers(builder) {
builder.addAsyncThunk(loadCustomEmojis, {
fulfilled(state, action) {
if (!action.payload?.length) {
return;
}
for (const emoji of action.payload) {
const { shortcode, category, url, static_url } = emoji;
state.custom[shortcode] = {
url,
static_url,
};
if (category) {
state.customCategories[category] ??= [];
if (!state.customCategories[category].includes(shortcode)) {
state.customCategories[category].push(shortcode);
}
}
state.customLoaded = true;
}
},
});
},
});
export const emojis = emojisSlice.reducer;
export const { loadLocale } = emojisSlice.actions;
export const loadCustomEmojis = createAsyncThunk(
`${emojisSlice.name}/loadCustomEmojis`,
async () => {
const { loadAllCustomEmoji } =
await import('@/mastodon/features/emoji/database');
return loadAllCustomEmoji();
},
);
@@ -1,9 +1,11 @@
import { annualReport } from './annual_report';
import { collections } from './collections';
import { emojis } from './emojis';
import { profileEdit } from './profile_edit';
export const sliceReducers = {
annualReport,
collections,
emojis,
profileEdit,
};
+15 -7
View File
@@ -1,15 +1,23 @@
import { createSelector } from '@reduxjs/toolkit';
import type { OrderedSet as ImmutableOrderedSet } from 'immutable';
import type { RootState } from 'mastodon/store';
import { createAppSelector } from 'mastodon/store';
export const getStatusList = createSelector(
import type { StatusShape } from '../models/status';
export const getStatusList = createAppSelector(
[
(
state: RootState,
type: 'favourites' | 'bookmarks' | 'pins' | 'trending',
) =>
(state, type: 'favourites' | 'bookmarks' | 'pins' | 'trending') =>
state.status_lists.getIn([type, 'items']) as ImmutableOrderedSet<string>,
],
(items) => items.toList(),
);
export const selectPlainStatus = createAppSelector(
[(state, statusId: string) => state.statuses.get(statusId)],
(status) => {
if (!status) {
return null;
}
return status.toJS() as unknown as StatusShape;
},
);
+2 -1
View File
@@ -80,12 +80,13 @@ export const statusFactory: FactoryFunction<ApiStatusJSON> = ({
replies_count: 0,
reblogs_count: 0,
quotes_count: 0,
favorites_count: 0,
favourites_count: 0,
account: accountFactory(),
media_attachments: [],
mentions: [],
tags: [],
emojis: [],
tagged_collections: [],
contentHtml: data.text ?? '<p>This is a test status.</p>',
...data,
});
+78
View File
@@ -0,0 +1,78 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe UnmergeWorker do
let(:worker) { described_class.new }
describe '#perform' do
subject { worker.perform(account_id, into_id, type) }
let(:account_id) { account.id }
let(:account) { Fabricate :account }
let(:into_id) { nil }
let(:type) { nil }
context 'when account is invalid' do
let(:account_id) { 123_123_123 }
it { is_expected.to be(true) }
end
context 'when type is invalid' do
it { is_expected.to be_nil }
end
context 'when type is list' do
let(:type) { 'list' }
context 'when target is invalid' do
let(:into_id) { 123_123_123 }
it { is_expected.to be(true) }
end
context 'when target is valid' do
let(:into_id) { list.id }
let(:list) { Fabricate :list }
let(:manager_service) { instance_double(FeedManager, unmerge_from_list: nil) }
before { allow(FeedManager).to receive(:instance).and_return manager_service }
it 'unmerges from list feed' do
subject
expect(manager_service)
.to have_received(:unmerge_from_list).with(account, list)
end
end
end
context 'when type is home' do
let(:type) { 'home' }
context 'when target is invalid' do
let(:into_id) { 123_123_123 }
it { is_expected.to be(true) }
end
context 'when target is valid' do
let(:into_id) { target_account.id }
let(:target_account) { Fabricate :account }
let(:manager_service) { instance_double(FeedManager, unmerge_from_home: nil) }
before { allow(FeedManager).to receive(:instance).and_return manager_service }
it 'unmerges from list feed' do
subject
expect(manager_service)
.to have_received(:unmerge_from_home).with(account, target_account)
end
end
end
end
end
+272 -35
View File
@@ -1897,6 +1897,21 @@ __metadata:
languageName: node
linkType: hard
"@devframes/hub@npm:^0.5.2":
version: 0.5.4
resolution: "@devframes/hub@npm:0.5.4"
dependencies:
birpc: "npm:^4.0.0"
nostics: "npm:^0.2.0"
pathe: "npm:^2.0.3"
perfect-debounce: "npm:^2.1.0"
tinyexec: "npm:^1.2.2"
peerDependencies:
devframe: 0.5.4
checksum: 10c0/335f3f8510e11b564cc6af3e0b7783c311ab3682fa4e1c0aea4fad4ca151de0c8cd7fe0d3e058aa4b3f235fa6630816d279669ad9ef7b139bbb866f8c70bfd7e
languageName: node
linkType: hard
"@dnd-kit/accessibility@npm:^3.1.1":
version: 3.1.1
resolution: "@dnd-kit/accessibility@npm:3.1.1"
@@ -3226,6 +3241,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-android-arm-eabi@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-android-arm-eabi@npm:0.134.0"
conditions: os=android & cpu=arm
languageName: node
linkType: hard
"@oxc-parser/binding-android-arm64@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-android-arm64@npm:0.132.0"
@@ -3233,6 +3255,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-android-arm64@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-android-arm64@npm:0.134.0"
conditions: os=android & cpu=arm64
languageName: node
linkType: hard
"@oxc-parser/binding-darwin-arm64@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-darwin-arm64@npm:0.132.0"
@@ -3240,6 +3269,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-darwin-arm64@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-darwin-arm64@npm:0.134.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@oxc-parser/binding-darwin-x64@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-darwin-x64@npm:0.132.0"
@@ -3247,6 +3283,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-darwin-x64@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-darwin-x64@npm:0.134.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@oxc-parser/binding-freebsd-x64@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-freebsd-x64@npm:0.132.0"
@@ -3254,6 +3297,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-freebsd-x64@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-freebsd-x64@npm:0.134.0"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm-gnueabihf@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-arm-gnueabihf@npm:0.132.0"
@@ -3261,6 +3311,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm-gnueabihf@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-arm-gnueabihf@npm:0.134.0"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm-musleabihf@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-arm-musleabihf@npm:0.132.0"
@@ -3268,6 +3325,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm-musleabihf@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-arm-musleabihf@npm:0.134.0"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm64-gnu@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-arm64-gnu@npm:0.132.0"
@@ -3275,6 +3339,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm64-gnu@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-arm64-gnu@npm:0.134.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm64-musl@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-arm64-musl@npm:0.132.0"
@@ -3282,6 +3353,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-arm64-musl@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-arm64-musl@npm:0.134.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@oxc-parser/binding-linux-ppc64-gnu@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-ppc64-gnu@npm:0.132.0"
@@ -3289,6 +3367,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-ppc64-gnu@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-ppc64-gnu@npm:0.134.0"
conditions: os=linux & cpu=ppc64 & libc=glibc
languageName: node
linkType: hard
"@oxc-parser/binding-linux-riscv64-gnu@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-riscv64-gnu@npm:0.132.0"
@@ -3296,6 +3381,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-riscv64-gnu@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-riscv64-gnu@npm:0.134.0"
conditions: os=linux & cpu=riscv64 & libc=glibc
languageName: node
linkType: hard
"@oxc-parser/binding-linux-riscv64-musl@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-riscv64-musl@npm:0.132.0"
@@ -3303,6 +3395,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-riscv64-musl@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-riscv64-musl@npm:0.134.0"
conditions: os=linux & cpu=riscv64 & libc=musl
languageName: node
linkType: hard
"@oxc-parser/binding-linux-s390x-gnu@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-s390x-gnu@npm:0.132.0"
@@ -3310,6 +3409,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-s390x-gnu@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-s390x-gnu@npm:0.134.0"
conditions: os=linux & cpu=s390x & libc=glibc
languageName: node
linkType: hard
"@oxc-parser/binding-linux-x64-gnu@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-x64-gnu@npm:0.132.0"
@@ -3317,6 +3423,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-x64-gnu@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-x64-gnu@npm:0.134.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@oxc-parser/binding-linux-x64-musl@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-linux-x64-musl@npm:0.132.0"
@@ -3324,6 +3437,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-linux-x64-musl@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-linux-x64-musl@npm:0.134.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@oxc-parser/binding-openharmony-arm64@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-openharmony-arm64@npm:0.132.0"
@@ -3331,6 +3451,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-openharmony-arm64@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-openharmony-arm64@npm:0.134.0"
conditions: os=openharmony & cpu=arm64
languageName: node
linkType: hard
"@oxc-parser/binding-wasm32-wasi@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-wasm32-wasi@npm:0.132.0"
@@ -3342,6 +3469,17 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-wasm32-wasi@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-wasm32-wasi@npm:0.134.0"
dependencies:
"@emnapi/core": "npm:1.10.0"
"@emnapi/runtime": "npm:1.10.0"
"@napi-rs/wasm-runtime": "npm:^1.1.4"
conditions: cpu=wasm32
languageName: node
linkType: hard
"@oxc-parser/binding-win32-arm64-msvc@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-win32-arm64-msvc@npm:0.132.0"
@@ -3349,6 +3487,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-win32-arm64-msvc@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-win32-arm64-msvc@npm:0.134.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@oxc-parser/binding-win32-ia32-msvc@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-win32-ia32-msvc@npm:0.132.0"
@@ -3356,6 +3501,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-win32-ia32-msvc@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-win32-ia32-msvc@npm:0.134.0"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@oxc-parser/binding-win32-x64-msvc@npm:0.132.0":
version: 0.132.0
resolution: "@oxc-parser/binding-win32-x64-msvc@npm:0.132.0"
@@ -3363,6 +3515,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-parser/binding-win32-x64-msvc@npm:0.134.0":
version: 0.134.0
resolution: "@oxc-parser/binding-win32-x64-msvc@npm:0.134.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@oxc-project/types@npm:=0.133.0":
version: 0.133.0
resolution: "@oxc-project/types@npm:0.133.0"
@@ -3377,6 +3536,13 @@ __metadata:
languageName: node
linkType: hard
"@oxc-project/types@npm:^0.134.0":
version: 0.134.0
resolution: "@oxc-project/types@npm:0.134.0"
checksum: 10c0/d90ee664206091d539a24de6ec703bdb2124e1181680609ac3c27326273a3189c5bb6e0177f3171c85a78e8c01eb43a9903cbbe13257053c7df141c030579c16
languageName: node
linkType: hard
"@oxfmt/binding-android-arm-eabi@npm:0.47.0":
version: 0.47.0
resolution: "@oxfmt/binding-android-arm-eabi@npm:0.47.0"
@@ -4950,22 +5116,22 @@ __metadata:
languageName: node
linkType: hard
"@unhead/bundler@npm:3.1.1":
version: 3.1.1
resolution: "@unhead/bundler@npm:3.1.1"
"@unhead/bundler@npm:3.1.3":
version: 3.1.3
resolution: "@unhead/bundler@npm:3.1.3"
dependencies:
"@vitejs/devtools-kit": "npm:^0.2.0"
"@vitejs/devtools-kit": "npm:^0.3.1"
magic-string: "npm:^0.30.21"
oxc-parser: "npm:^0.132.0"
oxc-parser: "npm:^0.134.0"
oxc-walker: "npm:^1.0.0"
ufo: "npm:^1.6.4"
unplugin: "npm:^3.0.0"
peerDependencies:
"@unhead/cli": ^3.1.1
"@unhead/cli": ^3.1.3
esbuild: ">=0.17.0"
lightningcss: ">=1.20.0"
rolldown: ">=1.0.0-beta.0"
unhead: ^3.1.1
unhead: ^3.1.3
vite: ">=6.4.2"
webpack: ">=5.0.0"
peerDependenciesMeta:
@@ -4981,18 +5147,18 @@ __metadata:
optional: true
webpack:
optional: true
checksum: 10c0/9fa29f8da2335356c8cbf6ec8ee92d00481d06873b980cf96c863c1f05920022902fed771a97db96c8eed89b220a26bdc75d02496aa6754832d4da75fe5c48a9
checksum: 10c0/bd1600a324bcd5a7b4d14a02185a77c5d89cd7693126b725dc2a2a1394081b2987a44bed82f7061725da056c1d69bea57121cb5ac3c59c92488c4fcfe852adf3
languageName: node
linkType: hard
"@unhead/react@npm:^3.1.0":
version: 3.1.1
resolution: "@unhead/react@npm:3.1.1"
version: 3.1.3
resolution: "@unhead/react@npm:3.1.3"
dependencies:
"@unhead/bundler": "npm:3.1.1"
"@unhead/bundler": "npm:3.1.3"
magic-string: "npm:^0.30.21"
oxc-walker: "npm:^1.0.0"
unhead: "npm:3.1.1"
unhead: "npm:3.1.3"
unplugin: "npm:^3.0.0"
peerDependencies:
react: ">=19.2.4"
@@ -5003,7 +5169,7 @@ __metadata:
optional: true
webpack:
optional: true
checksum: 10c0/74d95b9fd6d6e0ef65eeb5dd8b3729bba290c365f2575f47ac0ee5be5a507bf6a7545817cc89326818495460dad8b8d7025a5c820c94a7c7d10f812500b7daef
checksum: 10c0/8c65fbefd81e28ed578eee0d91d38d3bd4545f2ba486ecaa8fbc16b46768c25abd7b3f655a4bc18dab06a79c00ca4d4d61d1ed5f93eb5cea73a46e88a9c89e17
languageName: node
linkType: hard
@@ -5176,20 +5342,21 @@ __metadata:
languageName: node
linkType: hard
"@vitejs/devtools-kit@npm:^0.2.0":
version: 0.2.0
resolution: "@vitejs/devtools-kit@npm:0.2.0"
"@vitejs/devtools-kit@npm:^0.3.1":
version: 0.3.1
resolution: "@vitejs/devtools-kit@npm:0.3.1"
dependencies:
"@devframes/hub": "npm:^0.5.2"
birpc: "npm:^4.0.0"
devframe: "npm:^0.4.1"
devframe: "npm:^0.5.2"
mlly: "npm:^1.8.2"
nostics: "npm:^0.2.0"
pathe: "npm:^2.0.3"
perfect-debounce: "npm:^2.1.0"
tinyexec: "npm:^1.1.2"
tinyexec: "npm:^1.2.2"
peerDependencies:
vite: "*"
checksum: 10c0/19cbc4981a8d0c1be0fa551746702aff67d105e5b4b4611fdd596c21e1e0a8a6a0de4718cfad804f196597cf2ef81e816aa76ebfaa540cab8d7611abcf94d77d
checksum: 10c0/b405393ef7653c31f3363d972ecd7dd51c818e33375b21aa890769f483db22692590cf4d5dfe98d449445cc809177263a4e43ed342e5994694b8d092e0e52634
languageName: node
linkType: hard
@@ -6874,9 +7041,9 @@ __metadata:
languageName: node
linkType: hard
"devframe@npm:^0.4.1":
version: 0.4.1
resolution: "devframe@npm:0.4.1"
"devframe@npm:^0.5.2":
version: 0.5.4
resolution: "devframe@npm:0.5.4"
dependencies:
"@valibot/to-json-schema": "npm:^1.7.0"
birpc: "npm:^4.0.0"
@@ -6885,14 +7052,14 @@ __metadata:
mrmime: "npm:^2.0.1"
nostics: "npm:^0.2.0"
pathe: "npm:^2.0.3"
valibot: "npm:^1.4.0"
ws: "npm:^8.20.0"
valibot: "npm:^1.4.1"
ws: "npm:^8.21.0"
peerDependencies:
"@modelcontextprotocol/sdk": ^1.0.0
peerDependenciesMeta:
"@modelcontextprotocol/sdk":
optional: true
checksum: 10c0/aa7be58332c43788fdfa46213d66bfd73799ab98ceb3f84bb6f5e7676f246e21b8aecb728a60ad5ea964dcb8cfc4bc7a6a18c75667939f290554d93170e0728f
checksum: 10c0/c5651a1e1501a0f4da80c07bdad96bc8cd8d3cef05ecd2ac33fdaf42fa7a481e17d59bf1922b31e46cbc8d82c4837eefeabbc907fdadab9e9d417aeb42b6af62
languageName: node
linkType: hard
@@ -10676,6 +10843,76 @@ __metadata:
languageName: node
linkType: hard
"oxc-parser@npm:^0.134.0":
version: 0.134.0
resolution: "oxc-parser@npm:0.134.0"
dependencies:
"@oxc-parser/binding-android-arm-eabi": "npm:0.134.0"
"@oxc-parser/binding-android-arm64": "npm:0.134.0"
"@oxc-parser/binding-darwin-arm64": "npm:0.134.0"
"@oxc-parser/binding-darwin-x64": "npm:0.134.0"
"@oxc-parser/binding-freebsd-x64": "npm:0.134.0"
"@oxc-parser/binding-linux-arm-gnueabihf": "npm:0.134.0"
"@oxc-parser/binding-linux-arm-musleabihf": "npm:0.134.0"
"@oxc-parser/binding-linux-arm64-gnu": "npm:0.134.0"
"@oxc-parser/binding-linux-arm64-musl": "npm:0.134.0"
"@oxc-parser/binding-linux-ppc64-gnu": "npm:0.134.0"
"@oxc-parser/binding-linux-riscv64-gnu": "npm:0.134.0"
"@oxc-parser/binding-linux-riscv64-musl": "npm:0.134.0"
"@oxc-parser/binding-linux-s390x-gnu": "npm:0.134.0"
"@oxc-parser/binding-linux-x64-gnu": "npm:0.134.0"
"@oxc-parser/binding-linux-x64-musl": "npm:0.134.0"
"@oxc-parser/binding-openharmony-arm64": "npm:0.134.0"
"@oxc-parser/binding-wasm32-wasi": "npm:0.134.0"
"@oxc-parser/binding-win32-arm64-msvc": "npm:0.134.0"
"@oxc-parser/binding-win32-ia32-msvc": "npm:0.134.0"
"@oxc-parser/binding-win32-x64-msvc": "npm:0.134.0"
"@oxc-project/types": "npm:^0.134.0"
dependenciesMeta:
"@oxc-parser/binding-android-arm-eabi":
optional: true
"@oxc-parser/binding-android-arm64":
optional: true
"@oxc-parser/binding-darwin-arm64":
optional: true
"@oxc-parser/binding-darwin-x64":
optional: true
"@oxc-parser/binding-freebsd-x64":
optional: true
"@oxc-parser/binding-linux-arm-gnueabihf":
optional: true
"@oxc-parser/binding-linux-arm-musleabihf":
optional: true
"@oxc-parser/binding-linux-arm64-gnu":
optional: true
"@oxc-parser/binding-linux-arm64-musl":
optional: true
"@oxc-parser/binding-linux-ppc64-gnu":
optional: true
"@oxc-parser/binding-linux-riscv64-gnu":
optional: true
"@oxc-parser/binding-linux-riscv64-musl":
optional: true
"@oxc-parser/binding-linux-s390x-gnu":
optional: true
"@oxc-parser/binding-linux-x64-gnu":
optional: true
"@oxc-parser/binding-linux-x64-musl":
optional: true
"@oxc-parser/binding-openharmony-arm64":
optional: true
"@oxc-parser/binding-wasm32-wasi":
optional: true
"@oxc-parser/binding-win32-arm64-msvc":
optional: true
"@oxc-parser/binding-win32-ia32-msvc":
optional: true
"@oxc-parser/binding-win32-x64-msvc":
optional: true
checksum: 10c0/e61a7429869a0abd1adc162999c3413b96fff77b4b77460436f8fd87d74d254731aea66cdc6a5c996185e8e227f0a2f61f165de74a52b8163646dd1464c561b9
languageName: node
linkType: hard
"oxc-walker@npm:^1.0.0":
version: 1.0.0
resolution: "oxc-walker@npm:1.0.0"
@@ -13811,10 +14048,10 @@ __metadata:
languageName: node
linkType: hard
"tinyexec@npm:^1.0.2, tinyexec@npm:^1.1.2":
version: 1.1.2
resolution: "tinyexec@npm:1.1.2"
checksum: 10c0/9e0ef6c001ce54688cf16833a02f70a339276219ca947b88930b124267de2cffc764ff44e87e7369384b1d75ab63491465412cbbdf06f2437956b9ab66ab4491
"tinyexec@npm:^1.0.2, tinyexec@npm:^1.1.2, tinyexec@npm:^1.2.2":
version: 1.2.4
resolution: "tinyexec@npm:1.2.4"
checksum: 10c0/153b8db6b080194b558ff145b9cffc36b80a6e07babd644dcfbe49c807eee668c876049d28bdee90b96304476f883352f2dad91b3f86bc23832532f4363e66ff
languageName: node
linkType: hard
@@ -14231,9 +14468,9 @@ __metadata:
languageName: node
linkType: hard
"unhead@npm:3.1.1":
version: 3.1.1
resolution: "unhead@npm:3.1.1"
"unhead@npm:3.1.3":
version: 3.1.3
resolution: "unhead@npm:3.1.3"
dependencies:
hookable: "npm:^6.1.1"
unplugin: "npm:^3.0.0"
@@ -14242,7 +14479,7 @@ __metadata:
peerDependenciesMeta:
vite:
optional: true
checksum: 10c0/8a2bb6801d66cd272bbf36450e0f81bc69fd19f2f576e95a6a0d0a9fa2d2a0a6e02da39eed4ab32de78d3f1b22de339554dc5790585682a7a3cb5c22193d3ef0
checksum: 10c0/410dbb58aa7048e5b51d94513b08da54884275cff391542dd3a9be9e8692fca4a7c1183eb92f4144ed081f73becc86ad6e6434183b5f090417da269ccac60466
languageName: node
linkType: hard
@@ -14508,7 +14745,7 @@ __metadata:
languageName: node
linkType: hard
"valibot@npm:^1.4.0":
"valibot@npm:^1.4.1":
version: 1.4.1
resolution: "valibot@npm:1.4.1"
peerDependencies:
@@ -14937,7 +15174,7 @@ __metadata:
languageName: node
linkType: hard
"ws@npm:^8.12.1, ws@npm:^8.18.0, ws@npm:^8.19.0, ws@npm:^8.20.0":
"ws@npm:^8.12.1, ws@npm:^8.18.0, ws@npm:^8.19.0, ws@npm:^8.21.0":
version: 8.21.0
resolution: "ws@npm:8.21.0"
peerDependencies: