chore: move ControlId type to the entities/Font layer
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import type { ControlModel } from '$shared/lib';
|
import type { ControlModel } from '$shared/lib';
|
||||||
import type { ControlId } from '..';
|
import type { ControlId } from '../types/typography';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Font size constants
|
* Font size constants
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Applied fonts manager
|
// Applied fonts manager
|
||||||
export { appliedFontsManager } from './appliedFontsStore/appliedFontsStore.svelte';
|
export * from './appliedFontsStore/appliedFontsStore.svelte';
|
||||||
|
|
||||||
// Batch font store
|
// Batch font store
|
||||||
export { BatchFontStore } from './batchFontStore.svelte';
|
export { BatchFontStore } from './batchFontStore.svelte';
|
||||||
|
|||||||
@@ -33,3 +33,4 @@ export type {
|
|||||||
} from './store';
|
} from './store';
|
||||||
|
|
||||||
export * from './store/appliedFonts';
|
export * from './store/appliedFonts';
|
||||||
|
export * from './typography';
|
||||||
|
|||||||
1
src/entities/Font/model/types/typography.ts
Normal file
1
src/entities/Font/model/types/typography.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export type ControlId = 'font_size' | 'font_weight' | 'line_height' | 'letter_spacing';
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
type ControlId,
|
||||||
DEFAULT_FONT_SIZE,
|
DEFAULT_FONT_SIZE,
|
||||||
DEFAULT_FONT_WEIGHT,
|
DEFAULT_FONT_WEIGHT,
|
||||||
DEFAULT_LETTER_SPACING,
|
DEFAULT_LETTER_SPACING,
|
||||||
@@ -25,7 +26,6 @@ import {
|
|||||||
createTypographyControl,
|
createTypographyControl,
|
||||||
} from '$shared/lib';
|
} from '$shared/lib';
|
||||||
import { SvelteMap } from 'svelte/reactivity';
|
import { SvelteMap } from 'svelte/reactivity';
|
||||||
import { type ControlId } from '../../model';
|
|
||||||
|
|
||||||
type ControlOnlyFields<T extends string = string> = Omit<ControlModel<T>, keyof ControlDataModel>;
|
type ControlOnlyFields<T extends string = string> = Omit<ControlModel<T>, keyof ControlDataModel>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1 @@
|
|||||||
export {
|
export { typographySettingsStore } from './state/typographySettingsStore';
|
||||||
type ControlId,
|
|
||||||
typographySettingsStore,
|
|
||||||
} from './state/typographySettingsStore';
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { DEFAULT_TYPOGRAPHY_CONTROLS_DATA } from '$entities/Font';
|
import { DEFAULT_TYPOGRAPHY_CONTROLS_DATA } from '$entities/Font';
|
||||||
import { createTypographySettingsManager } from '../../lib';
|
import { createTypographySettingsManager } from '../../lib';
|
||||||
|
|
||||||
export type ControlId = 'font_size' | 'font_weight' | 'line_height' | 'letter_spacing';
|
|
||||||
export const typographySettingsStore = createTypographySettingsManager(
|
export const typographySettingsStore = createTypographySettingsManager(
|
||||||
DEFAULT_TYPOGRAPHY_CONTROLS_DATA,
|
DEFAULT_TYPOGRAPHY_CONTROLS_DATA,
|
||||||
'glyphdiff:comparison:typography',
|
'glyphdiff:comparison:typography',
|
||||||
|
|||||||
Reference in New Issue
Block a user