@pushwoosh/dumb-components 2.8.1 → 2.8.2

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.
@@ -7,6 +7,8 @@ import type { InboxPreviewProps } from './types';
7
7
  * a carousel shows at most five valid slides. Content without a single filled
8
8
  * field renders the dashed placeholder of the requested layout.
9
9
  *
10
+ * @deprecated Use `InboxCellPreview` from `@pushwoosh/websdk-common/inbox`, the renderer the WebSDK widget shares.
11
+ *
10
12
  * @example
11
13
  * <InboxPreview platform="ios" localizedContent={preset.localizedContent} language="en" />
12
14
  */
@@ -21,6 +21,8 @@ const CELL_BY_PLATFORM = {
21
21
  * a carousel shows at most five valid slides. Content without a single filled
22
22
  * field renders the dashed placeholder of the requested layout.
23
23
  *
24
+ * @deprecated Use `InboxCellPreview` from `@pushwoosh/websdk-common/inbox`, the renderer the WebSDK widget shares.
25
+ *
24
26
  * @example
25
27
  * <InboxPreview platform="ios" localizedContent={preset.localizedContent} language="en" />
26
28
  */
@@ -1,5 +1,8 @@
1
1
  import type { InboxAvatarShape, InboxLayoutType, InboxPreviewPlatform } from './types';
2
- /** The SDK renders at most this many carousel slides and silently drops the rest. */
2
+ /**
3
+ * The SDK renders at most this many carousel slides and silently drops the rest.
4
+ * @deprecated Use `INBOX_MAX_CAROUSEL_SLIDES` from `@pushwoosh/websdk-common/inbox`.
5
+ */
3
6
  export declare const MAX_CAROUSEL_SLIDES = 5;
4
7
  /** Layouts the SDK knows; anything else falls back to the heuristic. */
5
8
  export declare const KNOWN_LAYOUTS: readonly InboxLayoutType[];
@@ -1,5 +1,8 @@
1
1
  import { ShapeRadius } from '@pushwoosh/kit-constants';
2
- /** The SDK renders at most this many carousel slides and silently drops the rest. */
2
+ /**
3
+ * The SDK renders at most this many carousel slides and silently drops the rest.
4
+ * @deprecated Use `INBOX_MAX_CAROUSEL_SLIDES` from `@pushwoosh/websdk-common/inbox`.
5
+ */
3
6
  export const MAX_CAROUSEL_SLIDES = 5;
4
7
  /** Layouts the SDK knows; anything else falls back to the heuristic. */
5
8
  export const KNOWN_LAYOUTS = ['classic', 'captioned', 'banner', 'carousel'];
@@ -11,6 +11,7 @@ export declare const getHeroUrl: (content: InboxPreviewContent) => string;
11
11
  /**
12
12
  * Resolves the layout the SDK would actually draw: the requested one when it can render,
13
13
  * the SDK heuristic for unknown/absent layouts, and the classic degradation otherwise.
14
+ * @deprecated Use `resolveInboxLayout` from `@pushwoosh/websdk-common/inbox`.
14
15
  */
15
16
  export declare const resolveInboxLayout: (content: InboxPreviewContent) => InboxLayoutType;
16
17
  /** True when the content has nothing to render yet, so the preview shows the layout placeholder. */
@@ -22,6 +22,7 @@ export const getHeroUrl = content => content.bannerUrl || content.iconUrl || '';
22
22
  /**
23
23
  * Resolves the layout the SDK would actually draw: the requested one when it can render,
24
24
  * the SDK heuristic for unknown/absent layouts, and the classic degradation otherwise.
25
+ * @deprecated Use `resolveInboxLayout` from `@pushwoosh/websdk-common/inbox`.
25
26
  */
26
27
  export const resolveInboxLayout = content => {
27
28
  const hasTitle = !!content.title;
@@ -1,15 +1,24 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { TypographyVariant } from '@pushwoosh/kit-typography';
3
- /** Cell layout of an Inbox message. */
3
+ /**
4
+ * Cell layout of an Inbox message.
5
+ * @deprecated Use `InboxLayout` from `@pushwoosh/websdk-common/inbox`.
6
+ */
4
7
  export type InboxLayoutType = 'classic' | 'captioned' | 'banner' | 'carousel';
5
- /** One carousel slide of an Inbox message. */
8
+ /**
9
+ * One carousel slide of an Inbox message.
10
+ * @deprecated Use `InboxSlide` from `@pushwoosh/websdk-common/inbox`.
11
+ */
6
12
  export interface InboxPreviewSlide {
7
13
  /** Slide image URL; a slide without it is dropped, like in the SDK. */
8
14
  imageUrl?: string;
9
15
  /** Caption overlaid at the bottom of the slide. */
10
16
  caption?: string;
11
17
  }
12
- /** One localized Inbox content (mirrors the rpc-v2 `AppInboxPresetLocale` shape). */
18
+ /**
19
+ * One localized Inbox content (mirrors the rpc-v2 `AppInboxPresetLocale` shape).
20
+ * @deprecated Use `InboxCellContent` from `@pushwoosh/websdk-common/inbox`.
21
+ */
13
22
  export interface InboxPreviewContent {
14
23
  /** Cell title. */
15
24
  title?: string;
@@ -24,7 +33,10 @@ export interface InboxPreviewContent {
24
33
  /** Carousel slides; only the first five valid ones are rendered. */
25
34
  carousel?: InboxPreviewSlide[];
26
35
  }
27
- /** Platform skin of {@link InboxPreview}: each OS draws the inbox cell differently. */
36
+ /**
37
+ * Platform skin of {@link InboxPreview}: each OS draws the inbox cell differently.
38
+ * @deprecated Use `InboxCellPlatform` from `@pushwoosh/websdk-common/inbox`.
39
+ */
28
40
  export type InboxPreviewPlatform = 'ios' | 'android' | 'web';
29
41
  /** Inbox icon geometry of one platform. */
30
42
  export interface InboxAvatarShape {
@@ -49,7 +61,10 @@ export interface InboxCellProps {
49
61
  /** Draw the unread dot. */
50
62
  unread: boolean;
51
63
  }
52
- /** Props of {@link InboxPreview}. */
64
+ /**
65
+ * Props of {@link InboxPreview}.
66
+ * @deprecated Use `InboxCellPreviewProps` from `@pushwoosh/websdk-common/inbox`.
67
+ */
53
68
  export interface InboxPreviewProps {
54
69
  /** Platform skin to render (default `ios`); the editor switches it with platform chips. */
55
70
  platform?: InboxPreviewPlatform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",