Remove stale Soma service types

active-uix
dev 5 months ago
parent a093963b04
commit 201a4efb26

@ -22,26 +22,6 @@ export type {
export { isFunction, isNull, isNotNull, isNumberString } from './guards';
export type {
SomaTranslator,
SomaTranslationModule,
SomaTranslationValue,
SomaTranslationFallback,
SomaTranslationDescriptor,
SomaTranslationParams,
SomaLogger,
SomaFormatter,
SomaNumberFormatter,
SomaCurrencyFormatter,
SomaUnitFormatter,
SomaDateTimeFormatter,
SomaPrefsConfig,
SomaProps,
SomaPropsWithoutChildren,
DateOrder,
HourCycle
} from './services';
export type { Side, Align, Boundary } from '$soma/layers/floating';
export type {

@ -1,71 +0,0 @@
import type { Direction } from './component';
// ── Translator ───────────────────────────────────────────────────────────────
export type SomaTranslationModule = unknown;
export type SomaTranslationParams = Record<string, unknown>;
export type SomaTranslationFallback = string | Record<string, string>;
export type SomaTranslationDescriptor = {
path: string;
fallback?: SomaTranslationFallback;
params?: SomaTranslationParams;
};
export type SomaTranslationValue = SomaTranslationFallback | SomaTranslationDescriptor;
export interface SomaTranslator {
getLocale(): string;
translate(value: SomaTranslationValue): string;
translatePath(path: string, ...args: unknown[]): string;
extend?: (...args: any[]) => void;
}
// ── Logger ───────────────────────────────────────────────────────────────────
export interface SomaLogger {
debug(message: string, context?: Record<string, unknown>): void;
info(message: string, context?: Record<string, unknown>): void;
warn(message: string, context?: Record<string, unknown>): void;
error(message: string, context?: Record<string, unknown>): void;
}
// ── Formatter ────────────────────────────────────────────────────────────────
export type SomaFormatter = {
format: (...args: unknown[]) => string;
};
export type SomaNumberFormatter = SomaFormatter;
export type SomaCurrencyFormatter = SomaFormatter;
export type SomaUnitFormatter = SomaFormatter;
// ── DateTimeFormatter ────────────────────────────────────────────────────────
export type { DateOrder, HourCycle } from '$soma/external/dates';
export interface SomaDateTimeFormatter {
getDateOrder(): import('$soma/external/dates').DateOrder | undefined;
getHourCycle(): import('$soma/external/dates').HourCycle | undefined;
}
// ── Prefs ────────────────────────────────────────────────────────────────────
export interface SomaPrefsConfig {
dir?: Direction;
dateTimeFormatter?: SomaDateTimeFormatter;
numberFormatter?: SomaNumberFormatter;
currencyFormatter?: SomaCurrencyFormatter;
unitFormatter?: SomaUnitFormatter;
}
// ── Soma props ───────────────────────────────────────────────────────────────
export interface SomaPropsWithoutChildren {
portalTo?: string | HTMLElement;
translator?: SomaTranslator;
prefs?: SomaPrefsConfig;
logger?: SomaLogger;
}
export interface SomaProps extends SomaPropsWithoutChildren {
children?: import('svelte').Snippet;
}
Loading…
Cancel
Save

Powered by TurnKey Linux.