Comparing version 0.1.2 to 0.2.0
@@ -27,3 +27,3 @@ import { ReactNode } from 'react'; | ||
declare type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900; | ||
declare type Style = 'normal' | 'italic'; | ||
declare type Style$1 = 'normal' | 'italic'; | ||
interface FontOptions { | ||
@@ -33,6 +33,107 @@ data: Buffer | ArrayBuffer; | ||
weight?: Weight; | ||
style?: Style; | ||
style?: Style$1; | ||
lang?: string; | ||
} | ||
declare type Style = { | ||
[key: string]: string[] | string | number | boolean | Style; | ||
}; | ||
declare type NotImplemented = (...args: any) => unknown; | ||
declare type AddedUtilities = Record<string, Style | string>; | ||
declare type PluginFunction = (obj: { | ||
addUtilities(utilities: AddedUtilities): unknown; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
addComponents: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
addBase: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
addVariant: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
e: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
prefix: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
theme: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
variants: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
config: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
corePlugins: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
matchUtilities: NotImplemented; | ||
/** | ||
* @deprecated not supported in @jaredh159/twrn | ||
*/ | ||
postcss: unknown; | ||
}) => unknown; | ||
declare type TwFontSize = string | [string, string] | [string, { | ||
lineHeight?: string; | ||
letterSpacing?: string; | ||
}]; | ||
declare type TwScreen = string | { | ||
max?: string; | ||
min?: string; | ||
}; | ||
declare type TwColors<K extends keyof any = string, V = string> = { | ||
[key: string]: V | TwColors<K, V>; | ||
}; | ||
interface TwTheme { | ||
fontSize?: Record<string, TwFontSize>; | ||
lineHeight?: Record<string, string>; | ||
spacing?: Record<string, string>; | ||
padding?: Record<string, string>; | ||
margin?: Record<string, string>; | ||
inset?: Record<string, string>; | ||
height?: Record<string, string>; | ||
width?: Record<string, string>; | ||
maxWidth?: Record<string, string>; | ||
maxHeight?: Record<string, string>; | ||
minWidth?: Record<string, string>; | ||
minHeight?: Record<string, string>; | ||
letterSpacing?: Record<string, string>; | ||
borderWidth?: Record<string, string>; | ||
borderRadius?: Record<string, string>; | ||
screens?: Record<string, TwScreen>; | ||
opacity?: Record<string, number | string>; | ||
flex?: Record<string, string>; | ||
flexGrow?: Record<string, number | string>; | ||
flexShrink?: Record<string, number | string>; | ||
fontWeight?: Record<string, number | string>; | ||
fontFamily?: Record<string, string | string[]>; | ||
zIndex?: Record<string, number | string>; | ||
colors?: TwColors; | ||
backgroundColor?: TwColors; | ||
borderColor?: TwColors; | ||
textColor?: TwColors; | ||
extend?: Omit<TwTheme, 'extend'>; | ||
} | ||
interface TwConfig { | ||
theme?: TwTheme; | ||
plugins?: Array<{ | ||
handler: PluginFunction; | ||
}>; | ||
} | ||
declare let Yoga: typeof yoga_layout; | ||
@@ -54,2 +155,3 @@ declare function init(yoga: typeof Yoga): void; | ||
loadAdditionalAsset?: (languageCode: string, segment: string) => Promise<FontOptions | string | undefined>; | ||
tailwindConfig?: TwConfig; | ||
}; | ||
@@ -59,2 +161,2 @@ | ||
export { FontOptions as Font, Style as FontStyle, Weight as FontWeight, Locale, SatoriOptions, satori as default, init }; | ||
export { FontOptions as Font, Style$1 as FontStyle, Weight as FontWeight, Locale, SatoriOptions, satori as default, init }; |
{ | ||
"name": "satori", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Enlightened library to convert HTML and CSS to SVG.", | ||
@@ -77,3 +77,3 @@ "module": "./dist/index.js", | ||
"typescript": "^4.5.5", | ||
"vitest": "0.23.4" | ||
"vitest": "0.28.3" | ||
}, | ||
@@ -80,0 +80,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3666107
2981