@guidelytech/react-native 0.4.1 → 0.5.0

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
@@ -319,7 +319,7 @@ interface UiState {
319
319
  }
320
320
 
321
321
  declare const SDK_NAME = "@guidelytech/react-native";
322
- declare const SDK_VERSION = "0.4.1";
322
+ declare const SDK_VERSION = "0.5.0";
323
323
  declare const DEFAULT_API_URL = "https://guidelytech.com";
324
324
  /** Host-platform services the engine needs; the provider supplies React Native implementations. */
325
325
  interface PlatformBridge {
@@ -474,6 +474,8 @@ declare class GuidelyClient {
474
474
  dismissChecklist(guideId: string): void;
475
475
  submitSurvey(guideId: string, answers: Record<string, unknown>): void;
476
476
  closeSurvey(guideId: string): void;
477
+ /** The visitor's audiences (from the last identify), for audience-targeted help articles. */
478
+ getAudienceIds(): readonly string[];
477
479
  getResourceCenter(): ResourceCenterConfig | null;
478
480
  searchResourceCenter(q: string): Promise<ResourceCenterArticle[]>;
479
481
  articleViewed(article: ResourceCenterArticle): void;
@@ -634,7 +636,9 @@ declare function GuidelyOverlay({ client, insets: insetsProp, launcherOffset }:
634
636
  /**
635
637
  * Tiny, tolerant HTML → rich-text converter for guide bodies (already sanitized server-side).
636
638
  * Supports p, div, br, strong/b, em/i, u, a, code, ul/ol/li, h1–h6 and blockquote; every other tag
637
- * is reduced to its text. Output is plain data so it can be unit-tested without React Native.
639
+ * is reduced to its text. `img` becomes an image block, and `video` / canonical embed `iframe`s
640
+ * become video blocks (shown as a link that opens the video). Output is plain data so it can be
641
+ * unit-tested without React Native.
638
642
  */
639
643
  interface TextRun {
640
644
  text: string;
@@ -645,12 +649,21 @@ interface TextRun {
645
649
  href?: string;
646
650
  }
647
651
  interface TextBlock {
648
- kind: "paragraph" | "heading" | "list-item" | "quote";
652
+ kind: "paragraph" | "heading" | "list-item" | "quote" | "image" | "video";
649
653
  /** Heading level 1–3, list nesting depth from 1. */
650
654
  level: number;
651
655
  /** For list items: the bullet ("•") or number ("1.") to show. */
652
656
  marker?: string;
653
657
  runs: TextRun[];
658
+ /** Image blocks: http(s) or data:image source. */
659
+ src?: string;
660
+ /** Image alt text, or a video's label. */
661
+ alt?: string;
662
+ /** Video blocks: the page or file to open. */
663
+ href?: string;
664
+ /** Image intrinsic size from `width`/`height`, when present. */
665
+ width?: number;
666
+ height?: number;
654
667
  }
655
668
  declare function parseHtml(html: string): TextBlock[];
656
669
  /** Plain-text rendering of an HTML body (accessibility labels, previews). */
package/dist/index.d.ts CHANGED
@@ -319,7 +319,7 @@ interface UiState {
319
319
  }
320
320
 
321
321
  declare const SDK_NAME = "@guidelytech/react-native";
322
- declare const SDK_VERSION = "0.4.1";
322
+ declare const SDK_VERSION = "0.5.0";
323
323
  declare const DEFAULT_API_URL = "https://guidelytech.com";
324
324
  /** Host-platform services the engine needs; the provider supplies React Native implementations. */
325
325
  interface PlatformBridge {
@@ -474,6 +474,8 @@ declare class GuidelyClient {
474
474
  dismissChecklist(guideId: string): void;
475
475
  submitSurvey(guideId: string, answers: Record<string, unknown>): void;
476
476
  closeSurvey(guideId: string): void;
477
+ /** The visitor's audiences (from the last identify), for audience-targeted help articles. */
478
+ getAudienceIds(): readonly string[];
477
479
  getResourceCenter(): ResourceCenterConfig | null;
478
480
  searchResourceCenter(q: string): Promise<ResourceCenterArticle[]>;
479
481
  articleViewed(article: ResourceCenterArticle): void;
@@ -634,7 +636,9 @@ declare function GuidelyOverlay({ client, insets: insetsProp, launcherOffset }:
634
636
  /**
635
637
  * Tiny, tolerant HTML → rich-text converter for guide bodies (already sanitized server-side).
636
638
  * Supports p, div, br, strong/b, em/i, u, a, code, ul/ol/li, h1–h6 and blockquote; every other tag
637
- * is reduced to its text. Output is plain data so it can be unit-tested without React Native.
639
+ * is reduced to its text. `img` becomes an image block, and `video` / canonical embed `iframe`s
640
+ * become video blocks (shown as a link that opens the video). Output is plain data so it can be
641
+ * unit-tested without React Native.
638
642
  */
639
643
  interface TextRun {
640
644
  text: string;
@@ -645,12 +649,21 @@ interface TextRun {
645
649
  href?: string;
646
650
  }
647
651
  interface TextBlock {
648
- kind: "paragraph" | "heading" | "list-item" | "quote";
652
+ kind: "paragraph" | "heading" | "list-item" | "quote" | "image" | "video";
649
653
  /** Heading level 1–3, list nesting depth from 1. */
650
654
  level: number;
651
655
  /** For list items: the bullet ("•") or number ("1.") to show. */
652
656
  marker?: string;
653
657
  runs: TextRun[];
658
+ /** Image blocks: http(s) or data:image source. */
659
+ src?: string;
660
+ /** Image alt text, or a video's label. */
661
+ alt?: string;
662
+ /** Video blocks: the page or file to open. */
663
+ href?: string;
664
+ /** Image intrinsic size from `width`/`height`, when present. */
665
+ width?: number;
666
+ height?: number;
654
667
  }
655
668
  declare function parseHtml(html: string): TextBlock[];
656
669
  /** Plain-text rendering of an HTML body (accessibility labels, previews). */