@guidelytech/react-native 0.4.1 → 0.6.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.
- package/dist/index.cjs +385 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.js +481 -156
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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.
|
|
322
|
+
declare const SDK_VERSION = "0.6.1";
|
|
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,8 +636,17 @@ 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.
|
|
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). A PDF (`div.gd-pdf`: its link and its
|
|
641
|
+
* pages as images) becomes one pdf block, and a lone file link (`a.gd-file`) a file block. Output is
|
|
642
|
+
* plain data so it can be unit-tested without React Native.
|
|
638
643
|
*/
|
|
644
|
+
interface PdfPage {
|
|
645
|
+
src: string;
|
|
646
|
+
alt: string;
|
|
647
|
+
width?: number;
|
|
648
|
+
height?: number;
|
|
649
|
+
}
|
|
639
650
|
interface TextRun {
|
|
640
651
|
text: string;
|
|
641
652
|
bold?: boolean;
|
|
@@ -645,12 +656,23 @@ interface TextRun {
|
|
|
645
656
|
href?: string;
|
|
646
657
|
}
|
|
647
658
|
interface TextBlock {
|
|
648
|
-
kind: "paragraph" | "heading" | "list-item" | "quote";
|
|
659
|
+
kind: "paragraph" | "heading" | "list-item" | "quote" | "image" | "video" | "pdf" | "file";
|
|
649
660
|
/** Heading level 1–3, list nesting depth from 1. */
|
|
650
661
|
level: number;
|
|
651
662
|
/** For list items: the bullet ("•") or number ("1.") to show. */
|
|
652
663
|
marker?: string;
|
|
653
664
|
runs: TextRun[];
|
|
665
|
+
/** Image blocks: http(s) or data:image source. */
|
|
666
|
+
src?: string;
|
|
667
|
+
/** Image alt text, a video's label, or a PDF's file name. */
|
|
668
|
+
alt?: string;
|
|
669
|
+
/** Video, pdf and file blocks: the page or file to open. */
|
|
670
|
+
href?: string;
|
|
671
|
+
/** Pdf blocks: the rendered pages, in order. */
|
|
672
|
+
pages?: PdfPage[];
|
|
673
|
+
/** Image intrinsic size from `width`/`height`, when present. */
|
|
674
|
+
width?: number;
|
|
675
|
+
height?: number;
|
|
654
676
|
}
|
|
655
677
|
declare function parseHtml(html: string): TextBlock[];
|
|
656
678
|
/** 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.
|
|
322
|
+
declare const SDK_VERSION = "0.6.1";
|
|
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,8 +636,17 @@ 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.
|
|
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). A PDF (`div.gd-pdf`: its link and its
|
|
641
|
+
* pages as images) becomes one pdf block, and a lone file link (`a.gd-file`) a file block. Output is
|
|
642
|
+
* plain data so it can be unit-tested without React Native.
|
|
638
643
|
*/
|
|
644
|
+
interface PdfPage {
|
|
645
|
+
src: string;
|
|
646
|
+
alt: string;
|
|
647
|
+
width?: number;
|
|
648
|
+
height?: number;
|
|
649
|
+
}
|
|
639
650
|
interface TextRun {
|
|
640
651
|
text: string;
|
|
641
652
|
bold?: boolean;
|
|
@@ -645,12 +656,23 @@ interface TextRun {
|
|
|
645
656
|
href?: string;
|
|
646
657
|
}
|
|
647
658
|
interface TextBlock {
|
|
648
|
-
kind: "paragraph" | "heading" | "list-item" | "quote";
|
|
659
|
+
kind: "paragraph" | "heading" | "list-item" | "quote" | "image" | "video" | "pdf" | "file";
|
|
649
660
|
/** Heading level 1–3, list nesting depth from 1. */
|
|
650
661
|
level: number;
|
|
651
662
|
/** For list items: the bullet ("•") or number ("1.") to show. */
|
|
652
663
|
marker?: string;
|
|
653
664
|
runs: TextRun[];
|
|
665
|
+
/** Image blocks: http(s) or data:image source. */
|
|
666
|
+
src?: string;
|
|
667
|
+
/** Image alt text, a video's label, or a PDF's file name. */
|
|
668
|
+
alt?: string;
|
|
669
|
+
/** Video, pdf and file blocks: the page or file to open. */
|
|
670
|
+
href?: string;
|
|
671
|
+
/** Pdf blocks: the rendered pages, in order. */
|
|
672
|
+
pages?: PdfPage[];
|
|
673
|
+
/** Image intrinsic size from `width`/`height`, when present. */
|
|
674
|
+
width?: number;
|
|
675
|
+
height?: number;
|
|
654
676
|
}
|
|
655
677
|
declare function parseHtml(html: string): TextBlock[];
|
|
656
678
|
/** Plain-text rendering of an HTML body (accessibility labels, previews). */
|