Compare commits
2 Commits
3302e4a012
...
c10bbb681a
| Author | SHA1 | Date | |
|---|---|---|---|
| c10bbb681a | |||
|
|
7678ab271d |
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
type Filter,
|
||||
type FilterModel,
|
||||
createFilter,
|
||||
} from '$shared/lib';
|
||||
import { type Filter } from '$shared/lib';
|
||||
import { SvelteMap } from 'svelte/reactivity';
|
||||
import type { FontProvider } from '../types';
|
||||
import type { CheckboxFilter } from '../types/common';
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
vi,
|
||||
} from 'vitest';
|
||||
import {
|
||||
type CacheItemInternalState,
|
||||
type CacheOptions,
|
||||
createCollectionCache,
|
||||
} from './collectionCache';
|
||||
@@ -152,7 +151,7 @@ describe('createCollectionCache', () => {
|
||||
|
||||
it('resets cache statistics', () => {
|
||||
cache.set('key1', 100); // This increments hits
|
||||
const statsBefore = cache.getStats();
|
||||
const _statsBefore = cache.getStats();
|
||||
|
||||
cache.clear();
|
||||
const statsAfter = cache.getStats();
|
||||
|
||||
@@ -130,8 +130,8 @@ export interface CollectionCacheManager<T> {
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function createCollectionCache<T>(options: CacheOptions = {}): CollectionCacheManager<T> {
|
||||
const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
||||
export function createCollectionCache<T>(_options: CacheOptions = {}): CollectionCacheManager<T> {
|
||||
// const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
||||
|
||||
// Stores for reactive data
|
||||
const data: Writable<Record<string, T>> = writable({});
|
||||
@@ -201,7 +201,7 @@ export function createCollectionCache<T>(options: CacheOptions = {}): Collection
|
||||
* Set data in cache
|
||||
* Marks entry as ready and stops fetching state
|
||||
*/
|
||||
set: (key: string, value: T, ttl?: number) => {
|
||||
set: (key: string, value: T, _ttl?: number) => {
|
||||
data.update(d => ({
|
||||
...d,
|
||||
[key]: value,
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
type Filter,
|
||||
type Property,
|
||||
createFilter,
|
||||
} from '$shared/lib';
|
||||
import { createFilter } from '$shared/lib';
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
|
||||
@@ -632,7 +632,7 @@ describe('ComboControl Component', () => {
|
||||
await fireEvent.click(controlBtn);
|
||||
|
||||
// Both should be present
|
||||
const slider = await screen.findByRole('slider');
|
||||
const _slider = await screen.findByRole('slider');
|
||||
const input = await screen.findByTestId('combo-control-input') as HTMLInputElement;
|
||||
|
||||
// Input should show initial value
|
||||
@@ -843,7 +843,7 @@ describe('ComboControl Component', () => {
|
||||
|
||||
it('letter spacing control with decimal precision', async () => {
|
||||
const control = createTestControl(0, { min: -0.1, max: 0.5, step: 0.01 });
|
||||
const { container } = render(ComboControl, {
|
||||
const { container: _container } = render(ComboControl, {
|
||||
control,
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import TypographyMenu from './ui/TypographyMenu.svelte';
|
||||
|
||||
export { TypographyMenu };
|
||||
|
||||
Reference in New Issue
Block a user