@postrun/react 2.16.0 → 2.18.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.cjs +125 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +106 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var js = require('@postrun/js');
|
|
|
7
7
|
var Nango = require('@nangohq/frontend');
|
|
8
8
|
var pWaitFor = require('p-wait-for');
|
|
9
9
|
var pLimit = require('p-limit');
|
|
10
|
+
var query_star = require('@postrun/js/query');
|
|
10
11
|
var reactTweet = require('react-tweet');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
13
|
var fi = require('react-icons/fi');
|
|
@@ -18,13 +19,111 @@ var io5 = require('react-icons/io5');
|
|
|
18
19
|
|
|
19
20
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
21
|
|
|
22
|
+
function _interopNamespace(e) {
|
|
23
|
+
if (e && e.__esModule) return e;
|
|
24
|
+
var n = Object.create(null);
|
|
25
|
+
if (e) {
|
|
26
|
+
Object.keys(e).forEach(function (k) {
|
|
27
|
+
if (k !== 'default') {
|
|
28
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
29
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return e[k]; }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
n.default = e;
|
|
37
|
+
return Object.freeze(n);
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
var Nango__default = /*#__PURE__*/_interopDefault(Nango);
|
|
22
41
|
var pWaitFor__default = /*#__PURE__*/_interopDefault(pWaitFor);
|
|
23
42
|
var pLimit__default = /*#__PURE__*/_interopDefault(pLimit);
|
|
43
|
+
var query_star__namespace = /*#__PURE__*/_interopNamespace(query_star);
|
|
24
44
|
var twitterText__default = /*#__PURE__*/_interopDefault(twitterText);
|
|
25
45
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
26
46
|
|
|
27
|
-
|
|
47
|
+
var __defProp = Object.defineProperty;
|
|
48
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
49
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
50
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
51
|
+
var __export = (target, all) => {
|
|
52
|
+
for (var name in all)
|
|
53
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
54
|
+
};
|
|
55
|
+
var __copyProps = (to, from, except, desc) => {
|
|
56
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
57
|
+
for (let key of __getOwnPropNames(from))
|
|
58
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
59
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
60
|
+
}
|
|
61
|
+
return to;
|
|
62
|
+
};
|
|
63
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
|
|
64
|
+
|
|
65
|
+
// src/index.ts
|
|
66
|
+
var index_exports = {};
|
|
67
|
+
__export(index_exports, {
|
|
68
|
+
ArticleCard: () => ArticleCard,
|
|
69
|
+
AudienceSelect: () => AudienceSelect,
|
|
70
|
+
CommercialDisclosure: () => CommercialDisclosure,
|
|
71
|
+
Connect: () => Connect,
|
|
72
|
+
Declaration: () => Declaration,
|
|
73
|
+
DocumentCard: () => DocumentCard,
|
|
74
|
+
InstagramPostPreview: () => InstagramPostPreview,
|
|
75
|
+
InteractionToggles: () => InteractionToggles,
|
|
76
|
+
LinkedInPostPreview: () => LinkedInPostPreview,
|
|
77
|
+
Poll: () => Poll,
|
|
78
|
+
PostrunProvider: () => PostrunProvider,
|
|
79
|
+
ReelPreview: () => ReelPreview,
|
|
80
|
+
TIKTOK_CAPTION_MAX: () => js.TIKTOK_CAPTION_MAX,
|
|
81
|
+
TikTokCaptionField: () => TikTokCaptionField,
|
|
82
|
+
TikTokPostPreview: () => TikTokPostPreview,
|
|
83
|
+
TikTokPublishPanel: () => TikTokPublishPanel,
|
|
84
|
+
UploadError: () => js.UploadError,
|
|
85
|
+
XPoll: () => XPoll,
|
|
86
|
+
XPostPreview: () => XPostPreview,
|
|
87
|
+
captionMaxFor: () => js.captionMaxFor,
|
|
88
|
+
connectionKeys: () => connectionKeys,
|
|
89
|
+
isReadyMedia: () => isReadyMedia,
|
|
90
|
+
mediaKeys: () => mediaKeys,
|
|
91
|
+
postKeys: () => postKeys,
|
|
92
|
+
profileKeys: () => profileKeys,
|
|
93
|
+
resolveVariantMedia: () => resolveVariantMedia,
|
|
94
|
+
tiktokKeys: () => tiktokKeys,
|
|
95
|
+
useCalendar: () => useCalendar,
|
|
96
|
+
useConnect: () => useConnect,
|
|
97
|
+
useConnection: () => useConnection,
|
|
98
|
+
useConnections: () => useConnections,
|
|
99
|
+
useCreatePost: () => useCreatePost,
|
|
100
|
+
useCreateProfile: () => useCreateProfile,
|
|
101
|
+
useDeleteMedia: () => useDeleteMedia,
|
|
102
|
+
useDeletePost: () => useDeletePost,
|
|
103
|
+
useDeleteProfile: () => useDeleteProfile,
|
|
104
|
+
useDisconnect: () => useDisconnect,
|
|
105
|
+
useDiscoverableAccounts: () => useDiscoverableAccounts,
|
|
106
|
+
useInfiniteList: () => useInfiniteList,
|
|
107
|
+
useMedia: () => useMedia,
|
|
108
|
+
useMediaInfinite: () => useMediaInfinite,
|
|
109
|
+
useMediaList: () => useMediaList,
|
|
110
|
+
useMediaUpload: () => useMediaUpload,
|
|
111
|
+
usePost: () => usePost,
|
|
112
|
+
usePostrun: () => usePostrun,
|
|
113
|
+
usePostrunMutation: () => usePostrunMutation,
|
|
114
|
+
usePostrunQuery: () => usePostrunQuery,
|
|
115
|
+
usePosts: () => usePosts,
|
|
116
|
+
usePostsInfinite: () => usePostsInfinite,
|
|
117
|
+
useProfile: () => useProfile,
|
|
118
|
+
useProfiles: () => useProfiles,
|
|
119
|
+
useProfilesInfinite: () => useProfilesInfinite,
|
|
120
|
+
useSelectAccount: () => useSelectAccount,
|
|
121
|
+
useTikTokCreatorInfo: () => useTikTokCreatorInfo,
|
|
122
|
+
useUpdateMedia: () => useUpdateMedia,
|
|
123
|
+
useUpdatePost: () => useUpdatePost,
|
|
124
|
+
useUpdateProfile: () => useUpdateProfile,
|
|
125
|
+
useValidatePost: () => useValidatePost
|
|
126
|
+
});
|
|
28
127
|
function createDefaultQueryClient() {
|
|
29
128
|
return new reactQuery.QueryClient({
|
|
30
129
|
defaultOptions: {
|
|
@@ -612,7 +711,10 @@ async function runUpload(client, file, options, signal, callbacks) {
|
|
|
612
711
|
}
|
|
613
712
|
})).data;
|
|
614
713
|
if (created.upload) {
|
|
615
|
-
await js.
|
|
714
|
+
await js.uploadFile(file, {
|
|
715
|
+
mediaId: created.id,
|
|
716
|
+
session: created.upload,
|
|
717
|
+
client,
|
|
616
718
|
onProgress: callbacks.onProgress,
|
|
617
719
|
signal
|
|
618
720
|
});
|
|
@@ -929,6 +1031,25 @@ function useTikTokCreatorInfo(connectionId) {
|
|
|
929
1031
|
);
|
|
930
1032
|
}
|
|
931
1033
|
|
|
1034
|
+
// src/query.ts
|
|
1035
|
+
var query_exports = {};
|
|
1036
|
+
__export(query_exports, {
|
|
1037
|
+
usePostrunMutation: () => usePostrunMutation,
|
|
1038
|
+
usePostrunQuery: () => usePostrunQuery
|
|
1039
|
+
});
|
|
1040
|
+
__reExport(query_exports, query_star__namespace);
|
|
1041
|
+
function usePostrunQuery(optionsFactory) {
|
|
1042
|
+
const { client, queryClient } = usePostrun();
|
|
1043
|
+
return reactQuery.useQuery(optionsFactory(client), queryClient);
|
|
1044
|
+
}
|
|
1045
|
+
function usePostrunMutation(optionsFactory) {
|
|
1046
|
+
const { client, queryClient } = usePostrun();
|
|
1047
|
+
return reactQuery.useMutation(optionsFactory(client), queryClient);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
// src/index.ts
|
|
1051
|
+
__reExport(index_exports, query_exports);
|
|
1052
|
+
|
|
932
1053
|
// src/preview/media-resolver.ts
|
|
933
1054
|
function previewKind(kind) {
|
|
934
1055
|
return kind === "image" || kind === "video" || kind === "gif" ? kind : null;
|
|
@@ -3413,6 +3534,8 @@ exports.useMediaList = useMediaList;
|
|
|
3413
3534
|
exports.useMediaUpload = useMediaUpload;
|
|
3414
3535
|
exports.usePost = usePost;
|
|
3415
3536
|
exports.usePostrun = usePostrun;
|
|
3537
|
+
exports.usePostrunMutation = usePostrunMutation;
|
|
3538
|
+
exports.usePostrunQuery = usePostrunQuery;
|
|
3416
3539
|
exports.usePosts = usePosts;
|
|
3417
3540
|
exports.usePostsInfinite = usePostsInfinite;
|
|
3418
3541
|
exports.useProfile = useProfile;
|