@wallarm-org/design-system 1.18.1-rc-fix-toast-description-layout.2 → 1.18.1

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.
@@ -1,7 +1,16 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export declare const SIMPLE_TOAST_DURATION_MS = 5000;
3
3
  export declare const EXTENDED_TOAST_DURATION_MS = 10000;
4
- export interface ToastData {
4
+ /**
5
+ * The fields a toast is actually made of.
6
+ *
7
+ * Kept apart from `ToastData` so they survive an `Omit`: an index signature
8
+ * swallows every named field it is declared beside, which left
9
+ * `ToastCreateOptions` — `Omit<ToastData, 'id'>` — checking nothing at all
10
+ * (`toaster.create({ titl: 'x' })` compiled) and widening each field back to
11
+ * `unknown` under the declaration compiler, invisibly to `tsc --noEmit`.
12
+ */
13
+ export interface ToastFields {
5
14
  id: string;
6
15
  title?: string;
7
16
  description?: string;
@@ -12,6 +21,8 @@ export interface ToastData {
12
21
  variant?: 'extended' | 'simple';
13
22
  closable?: boolean;
14
23
  duration?: number;
24
+ }
25
+ export interface ToastData extends ToastFields {
15
26
  [key: string]: unknown;
16
27
  }
17
28
  export interface ToastProps {
@@ -21,4 +32,4 @@ export declare function Toast({ toast }: ToastProps): import("react").JSX.Elemen
21
32
  export declare namespace Toast {
22
33
  var displayName: string;
23
34
  }
24
- export declare const resolveToastVariant: (variant: unknown, description: unknown) => NonNullable<ToastData['variant']>;
35
+ export declare const resolveToastVariant: (variant: ToastFields['variant'], description: ToastFields['description']) => NonNullable<ToastFields['variant']>;
@@ -1,8 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  import { type CreateToasterReturn } from '@ark-ui/react/toast';
3
- import { type ToastData } from './Toast';
4
- export interface ToastCreateOptions extends Omit<ToastData, 'id'> {
5
- duration?: number;
3
+ import { type ToastFields } from './Toast';
4
+ export interface ToastCreateOptions extends Omit<ToastFields, 'id'> {
6
5
  priority?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
7
6
  }
8
7
  export interface TypedToaster extends Omit<CreateToasterReturn, 'create' | 'update'> {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.18.0",
3
- "generatedAt": "2026-09-08T13:41:14.844Z",
3
+ "generatedAt": "2026-09-08T14:43:53.098Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "1.18.1-rc-fix-toast-description-layout.2",
3
+ "version": "1.18.1",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",