@ai-matrx/sharing 0.1.10 → 0.1.12
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/CHANGELOG.md +8 -0
- package/dist/react.cjs +274 -293
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +17 -1
- package/dist/react.d.ts +17 -1
- package/dist/react.js +175 -194
- package/dist/react.js.map +1 -1
- package/package.json +6 -6
package/dist/react.d.cts
CHANGED
|
@@ -32,6 +32,10 @@ interface ShareSheetToastOptions {
|
|
|
32
32
|
description?: ReactNode | undefined;
|
|
33
33
|
variant?: "default" | "destructive" | "success" | string | undefined;
|
|
34
34
|
}
|
|
35
|
+
interface ShareSheetManualCopyOptions {
|
|
36
|
+
title?: string | undefined;
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
}
|
|
35
39
|
interface ShareSheetUi {
|
|
36
40
|
/** Messages. Default: `console` + `window.alert` for errors (never swallowed). */
|
|
37
41
|
toast: (options: ShareSheetToastOptions) => void;
|
|
@@ -44,6 +48,13 @@ interface ShareSheetUi {
|
|
|
44
48
|
organizationId?: string;
|
|
45
49
|
}) => ShareSheetConnections;
|
|
46
50
|
confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* The browser refused the clipboard: put `text` in front of the person for a manual copy. Resolves when
|
|
53
|
+
* the dialog closes. Default: kit's `openClipboardFallback`, i.e. the host's ONE manual-copy dialog (the
|
|
54
|
+
* web app's summon overlay through its kit bridge, `<ClipboardFallbackHost />` anywhere else). The sheet
|
|
55
|
+
* never mounts a dialog of its own.
|
|
56
|
+
*/
|
|
57
|
+
manualCopy: (text: string, options: ShareSheetManualCopyOptions) => Promise<void>;
|
|
47
58
|
CopyButtons: ComponentType<LooseProps>;
|
|
48
59
|
csvExportItem: (...args: any[]) => any;
|
|
49
60
|
jsonExportItem: (...args: any[]) => any;
|
|
@@ -591,9 +602,14 @@ interface UseShareResult {
|
|
|
591
602
|
description?: string | undefined;
|
|
592
603
|
}) => Promise<"copied" | "manual">;
|
|
593
604
|
copied: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* @deprecated Always `null`. The manual copy goes through the host's one manual-copy dialog
|
|
607
|
+
* (`configureShareSheetUi({ manualCopy })`, default kit `openClipboardFallback`); nothing to mount.
|
|
608
|
+
* Kept so `{fallbackDialog}` in existing callers still compiles; remove it from your JSX.
|
|
609
|
+
*/
|
|
594
610
|
fallbackDialog: ReactNode;
|
|
595
611
|
}
|
|
596
|
-
/** Native share-sheet first, clipboard second,
|
|
612
|
+
/** Native share-sheet first, clipboard second, the host's manual-copy dialog last. */
|
|
597
613
|
declare function useShare(): UseShareResult;
|
|
598
614
|
|
|
599
615
|
/**
|
package/dist/react.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ interface ShareSheetToastOptions {
|
|
|
32
32
|
description?: ReactNode | undefined;
|
|
33
33
|
variant?: "default" | "destructive" | "success" | string | undefined;
|
|
34
34
|
}
|
|
35
|
+
interface ShareSheetManualCopyOptions {
|
|
36
|
+
title?: string | undefined;
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
}
|
|
35
39
|
interface ShareSheetUi {
|
|
36
40
|
/** Messages. Default: `console` + `window.alert` for errors (never swallowed). */
|
|
37
41
|
toast: (options: ShareSheetToastOptions) => void;
|
|
@@ -44,6 +48,13 @@ interface ShareSheetUi {
|
|
|
44
48
|
organizationId?: string;
|
|
45
49
|
}) => ShareSheetConnections;
|
|
46
50
|
confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* The browser refused the clipboard: put `text` in front of the person for a manual copy. Resolves when
|
|
53
|
+
* the dialog closes. Default: kit's `openClipboardFallback`, i.e. the host's ONE manual-copy dialog (the
|
|
54
|
+
* web app's summon overlay through its kit bridge, `<ClipboardFallbackHost />` anywhere else). The sheet
|
|
55
|
+
* never mounts a dialog of its own.
|
|
56
|
+
*/
|
|
57
|
+
manualCopy: (text: string, options: ShareSheetManualCopyOptions) => Promise<void>;
|
|
47
58
|
CopyButtons: ComponentType<LooseProps>;
|
|
48
59
|
csvExportItem: (...args: any[]) => any;
|
|
49
60
|
jsonExportItem: (...args: any[]) => any;
|
|
@@ -591,9 +602,14 @@ interface UseShareResult {
|
|
|
591
602
|
description?: string | undefined;
|
|
592
603
|
}) => Promise<"copied" | "manual">;
|
|
593
604
|
copied: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* @deprecated Always `null`. The manual copy goes through the host's one manual-copy dialog
|
|
607
|
+
* (`configureShareSheetUi({ manualCopy })`, default kit `openClipboardFallback`); nothing to mount.
|
|
608
|
+
* Kept so `{fallbackDialog}` in existing callers still compiles; remove it from your JSX.
|
|
609
|
+
*/
|
|
594
610
|
fallbackDialog: ReactNode;
|
|
595
611
|
}
|
|
596
|
-
/** Native share-sheet first, clipboard second,
|
|
612
|
+
/** Native share-sheet first, clipboard second, the host's manual-copy dialog last. */
|
|
597
613
|
declare function useShare(): UseShareResult;
|
|
598
614
|
|
|
599
615
|
/**
|