Refactor/reacrhitecture to fsd+ #49
+5
-5
@@ -1,14 +1,14 @@
|
|||||||
|
import { fontKeys } from '$shared/api/queryKeys';
|
||||||
|
import { BaseQueryStore } from '$shared/lib';
|
||||||
import {
|
import {
|
||||||
fetchFontsByIds,
|
fetchFontsByIds,
|
||||||
seedFontCache,
|
seedFontCache,
|
||||||
} from '$entities/Font/api/proxy/proxyFonts';
|
} from '../../../api/proxy/proxyFonts';
|
||||||
import {
|
import {
|
||||||
FontNetworkError,
|
FontNetworkError,
|
||||||
FontResponseError,
|
FontResponseError,
|
||||||
} from '$entities/Font/lib/errors/errors';
|
} from '../../../lib/errors/errors';
|
||||||
import type { UnifiedFont } from '$entities/Font/model/types';
|
import type { UnifiedFont } from '../../types';
|
||||||
import { fontKeys } from '$shared/api/queryKeys';
|
|
||||||
import { BaseQueryStore } from '$shared/lib';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal fetcher that seeds the cache and handles error wrapping.
|
* Internal fetcher that seeds the cache and handles error wrapping.
|
||||||
+5
-5
@@ -1,8 +1,3 @@
|
|||||||
import * as api from '$entities/Font/api/proxy/proxyFonts';
|
|
||||||
import {
|
|
||||||
FontNetworkError,
|
|
||||||
FontResponseError,
|
|
||||||
} from '$entities/Font/lib/errors/errors';
|
|
||||||
import { queryClient } from '$shared/api/queryClient';
|
import { queryClient } from '$shared/api/queryClient';
|
||||||
import { fontKeys } from '$shared/api/queryKeys';
|
import { fontKeys } from '$shared/api/queryKeys';
|
||||||
import {
|
import {
|
||||||
@@ -12,6 +7,11 @@ import {
|
|||||||
it,
|
it,
|
||||||
vi,
|
vi,
|
||||||
} from 'vitest';
|
} from 'vitest';
|
||||||
|
import * as api from '../../../api/proxy/proxyFonts';
|
||||||
|
import {
|
||||||
|
FontNetworkError,
|
||||||
|
FontResponseError,
|
||||||
|
} from '../../../lib/errors/errors';
|
||||||
import { FontsByIdsStore } from './fontsByIdsStore.svelte';
|
import { FontsByIdsStore } from './fontsByIdsStore.svelte';
|
||||||
|
|
||||||
describe('FontsByIdsStore', () => {
|
describe('FontsByIdsStore', () => {
|
||||||
@@ -7,3 +7,6 @@ export {
|
|||||||
FontCatalogStore,
|
FontCatalogStore,
|
||||||
fontCatalogStore,
|
fontCatalogStore,
|
||||||
} from './fontCatalogStore/fontCatalogStore.svelte';
|
} from './fontCatalogStore/fontCatalogStore.svelte';
|
||||||
|
|
||||||
|
// Batch fetch by IDs (detail-cache seeding)
|
||||||
|
export { FontsByIdsStore } from './fontsByIdsStore/fontsByIdsStore.svelte';
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export { FontsByIdsStore } from './model';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { FontsByIdsStore } from './store/fontsByIdsStore/fontsByIdsStore.svelte';
|
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
type FontLoadRequestConfig,
|
type FontLoadRequestConfig,
|
||||||
|
FontsByIdsStore,
|
||||||
type UnifiedFont,
|
type UnifiedFont,
|
||||||
fontCatalogStore,
|
fontCatalogStore,
|
||||||
fontLifecycleManager,
|
fontLifecycleManager,
|
||||||
getFontUrl,
|
getFontUrl,
|
||||||
} from '$entities/Font';
|
} from '$entities/Font';
|
||||||
import { typographySettingsStore } from '$features/AdjustTypography/model';
|
import { typographySettingsStore } from '$features/AdjustTypography/model';
|
||||||
import { FontsByIdsStore } from '$features/FetchFontsByIds';
|
|
||||||
import { createPersistentStore } from '$shared/lib';
|
import { createPersistentStore } from '$shared/lib';
|
||||||
import { untrack } from 'svelte';
|
import { untrack } from 'svelte';
|
||||||
import { getPretextFontString } from '../../lib';
|
import { getPretextFontString } from '../../lib';
|
||||||
|
|||||||
Reference in New Issue
Block a user