@mccustomapps/helaui 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -138,11 +138,16 @@ declare class TextField {
138
138
  destroy(): void;
139
139
  }
140
140
 
141
- /** Built-in rain sprite URLs shipped with HelaUI. */
142
- declare const BUILTIN_RAIN_IMAGES: readonly [string, string, string, string];
141
+ /** Built-in rain sprite ids. Sprites are loaded from `rain-background.css`, not JS. */
142
+ declare const BUILTIN_RAIN_IMAGES: readonly ["fritter", "swirl", "kokis", "leaf"];
143
+ type BuiltinRainImage = (typeof BUILTIN_RAIN_IMAGES)[number];
143
144
 
144
145
  interface RainBackgroundOptions {
145
- /** Image URLs used as falling particles. Defaults to {@link BUILTIN_RAIN_IMAGES}. */
146
+ /**
147
+ * Falling particle sources. Defaults to {@link BUILTIN_RAIN_IMAGES}.
148
+ * Built-in ids (`fritter`, `swirl`, `kokis`, `leaf`) use CSS sprites from
149
+ * `rain-background.css`. Any other string is treated as an image URL.
150
+ */
146
151
  images?: string[];
147
152
  /** Number of particles visible at once. Defaults to 28. */
148
153
  density?: number;
@@ -164,6 +169,8 @@ declare class RainBackground {
164
169
  readonly element: HTMLDivElement;
165
170
  constructor(options?: RainBackgroundOptions);
166
171
  private createDrop;
172
+ private createBuiltinDrop;
173
+ private createImageDrop;
167
174
  /** Removes the background from the DOM. */
168
175
  destroy(): void;
169
176
  }
@@ -338,4 +345,4 @@ declare const defaultTheme: HelaTheme;
338
345
  /** Maps theme keys to CSS custom property names. */
339
346
  declare const THEME_VAR_MAP: Record<HelaThemeKey, string>;
340
347
 
341
- export { type ApplyTranslationsOptions, BUILTIN_RAIN_IMAGES, BUILTIN_SUN_MANDALA_IMAGE, Calendar, type CalendarOptions, type CalendarStrings, DEFAULT_RAIN_IMAGES, type DeepPartial, type HelaLocale, type HelaTextFieldTranslations, type HelaTheme, type HelaThemeKey, type HelaTranslationOverrides, type HelaTranslations, type LocaleTranslationOverrides, RainBackground, type RainBackgroundOptions, SINHALA_FONT_CLASS, SINHALA_FONT_FAMILY, SINHALA_MONTH_NAMES, SunMandala, type SunMandalaOptions, THEME_VAR_MAP, TextField, type TextFieldOptions, type TextFieldStrings, type TextFieldVariant, applySinhalaFont, applyTheme, applyTranslations, createThemeStyle, defaultTheme, defaultTranslations, formatSinhalaNumeral, getCalendarTranslation, getDefaultRainImageUrls, getLocale, getTextFieldTranslation, resetTheme, resetTranslations, setLocale, sinhalaFontStyles, subscribeLocaleChange, t };
348
+ export { type ApplyTranslationsOptions, BUILTIN_RAIN_IMAGES, BUILTIN_SUN_MANDALA_IMAGE, type BuiltinRainImage, Calendar, type CalendarOptions, type CalendarStrings, DEFAULT_RAIN_IMAGES, type DeepPartial, type HelaLocale, type HelaTextFieldTranslations, type HelaTheme, type HelaThemeKey, type HelaTranslationOverrides, type HelaTranslations, type LocaleTranslationOverrides, RainBackground, type RainBackgroundOptions, SINHALA_FONT_CLASS, SINHALA_FONT_FAMILY, SINHALA_MONTH_NAMES, SunMandala, type SunMandalaOptions, THEME_VAR_MAP, TextField, type TextFieldOptions, type TextFieldStrings, type TextFieldVariant, applySinhalaFont, applyTheme, applyTranslations, createThemeStyle, defaultTheme, defaultTranslations, formatSinhalaNumeral, getCalendarTranslation, getDefaultRainImageUrls, getLocale, getTextFieldTranslation, resetTheme, resetTranslations, setLocale, sinhalaFontStyles, subscribeLocaleChange, t };
package/dist/index.d.ts CHANGED
@@ -138,11 +138,16 @@ declare class TextField {
138
138
  destroy(): void;
139
139
  }
140
140
 
141
- /** Built-in rain sprite URLs shipped with HelaUI. */
142
- declare const BUILTIN_RAIN_IMAGES: readonly [string, string, string, string];
141
+ /** Built-in rain sprite ids. Sprites are loaded from `rain-background.css`, not JS. */
142
+ declare const BUILTIN_RAIN_IMAGES: readonly ["fritter", "swirl", "kokis", "leaf"];
143
+ type BuiltinRainImage = (typeof BUILTIN_RAIN_IMAGES)[number];
143
144
 
144
145
  interface RainBackgroundOptions {
145
- /** Image URLs used as falling particles. Defaults to {@link BUILTIN_RAIN_IMAGES}. */
146
+ /**
147
+ * Falling particle sources. Defaults to {@link BUILTIN_RAIN_IMAGES}.
148
+ * Built-in ids (`fritter`, `swirl`, `kokis`, `leaf`) use CSS sprites from
149
+ * `rain-background.css`. Any other string is treated as an image URL.
150
+ */
146
151
  images?: string[];
147
152
  /** Number of particles visible at once. Defaults to 28. */
148
153
  density?: number;
@@ -164,6 +169,8 @@ declare class RainBackground {
164
169
  readonly element: HTMLDivElement;
165
170
  constructor(options?: RainBackgroundOptions);
166
171
  private createDrop;
172
+ private createBuiltinDrop;
173
+ private createImageDrop;
167
174
  /** Removes the background from the DOM. */
168
175
  destroy(): void;
169
176
  }
@@ -338,4 +345,4 @@ declare const defaultTheme: HelaTheme;
338
345
  /** Maps theme keys to CSS custom property names. */
339
346
  declare const THEME_VAR_MAP: Record<HelaThemeKey, string>;
340
347
 
341
- export { type ApplyTranslationsOptions, BUILTIN_RAIN_IMAGES, BUILTIN_SUN_MANDALA_IMAGE, Calendar, type CalendarOptions, type CalendarStrings, DEFAULT_RAIN_IMAGES, type DeepPartial, type HelaLocale, type HelaTextFieldTranslations, type HelaTheme, type HelaThemeKey, type HelaTranslationOverrides, type HelaTranslations, type LocaleTranslationOverrides, RainBackground, type RainBackgroundOptions, SINHALA_FONT_CLASS, SINHALA_FONT_FAMILY, SINHALA_MONTH_NAMES, SunMandala, type SunMandalaOptions, THEME_VAR_MAP, TextField, type TextFieldOptions, type TextFieldStrings, type TextFieldVariant, applySinhalaFont, applyTheme, applyTranslations, createThemeStyle, defaultTheme, defaultTranslations, formatSinhalaNumeral, getCalendarTranslation, getDefaultRainImageUrls, getLocale, getTextFieldTranslation, resetTheme, resetTranslations, setLocale, sinhalaFontStyles, subscribeLocaleChange, t };
348
+ export { type ApplyTranslationsOptions, BUILTIN_RAIN_IMAGES, BUILTIN_SUN_MANDALA_IMAGE, type BuiltinRainImage, Calendar, type CalendarOptions, type CalendarStrings, DEFAULT_RAIN_IMAGES, type DeepPartial, type HelaLocale, type HelaTextFieldTranslations, type HelaTheme, type HelaThemeKey, type HelaTranslationOverrides, type HelaTranslations, type LocaleTranslationOverrides, RainBackground, type RainBackgroundOptions, SINHALA_FONT_CLASS, SINHALA_FONT_FAMILY, SINHALA_MONTH_NAMES, SunMandala, type SunMandalaOptions, THEME_VAR_MAP, TextField, type TextFieldOptions, type TextFieldStrings, type TextFieldVariant, applySinhalaFont, applyTheme, applyTranslations, createThemeStyle, defaultTheme, defaultTranslations, formatSinhalaNumeral, getCalendarTranslation, getDefaultRainImageUrls, getLocale, getTextFieldTranslation, resetTheme, resetTranslations, setLocale, sinhalaFontStyles, subscribeLocaleChange, t };