@postrun/react 4.0.0 → 4.2.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 +8 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +209 -65
- package/dist/index.d.ts +209 -65
- package/dist/index.js +3 -93
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -7,7 +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
|
|
10
|
+
var query = require('@postrun/js/query');
|
|
11
11
|
var reactTweet = require('react-tweet');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
13
|
var fi = require('react-icons/fi');
|
|
@@ -19,111 +19,13 @@ var io5 = require('react-icons/io5');
|
|
|
19
19
|
|
|
20
20
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
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
|
-
|
|
40
22
|
var Nango__default = /*#__PURE__*/_interopDefault(Nango);
|
|
41
23
|
var pWaitFor__default = /*#__PURE__*/_interopDefault(pWaitFor);
|
|
42
24
|
var pLimit__default = /*#__PURE__*/_interopDefault(pLimit);
|
|
43
|
-
var query_star__namespace = /*#__PURE__*/_interopNamespace(query_star);
|
|
44
25
|
var twitterText__default = /*#__PURE__*/_interopDefault(twitterText);
|
|
45
26
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
46
27
|
|
|
47
|
-
|
|
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
|
+
// src/context.tsx
|
|
127
29
|
function createDefaultQueryClient() {
|
|
128
30
|
return new reactQuery.QueryClient({
|
|
129
31
|
defaultOptions: {
|
|
@@ -1010,14 +912,6 @@ function useTikTokCreatorInfo(connectionId) {
|
|
|
1010
912
|
queryClient
|
|
1011
913
|
);
|
|
1012
914
|
}
|
|
1013
|
-
|
|
1014
|
-
// src/query.ts
|
|
1015
|
-
var query_exports = {};
|
|
1016
|
-
__export(query_exports, {
|
|
1017
|
-
usePostrunMutation: () => usePostrunMutation,
|
|
1018
|
-
usePostrunQuery: () => usePostrunQuery
|
|
1019
|
-
});
|
|
1020
|
-
__reExport(query_exports, query_star__namespace);
|
|
1021
915
|
function usePostrunQuery(optionsFactory) {
|
|
1022
916
|
const { client, queryClient } = usePostrun();
|
|
1023
917
|
return reactQuery.useQuery(optionsFactory(client), queryClient);
|
|
@@ -1027,9 +921,6 @@ function usePostrunMutation(optionsFactory) {
|
|
|
1027
921
|
return reactQuery.useMutation(optionsFactory(client), queryClient);
|
|
1028
922
|
}
|
|
1029
923
|
|
|
1030
|
-
// src/index.ts
|
|
1031
|
-
__reExport(index_exports, query_exports);
|
|
1032
|
-
|
|
1033
924
|
// src/preview/media-resolver.ts
|
|
1034
925
|
function previewKind(kind) {
|
|
1035
926
|
return kind === "image" || kind === "video" || kind === "gif" ? kind : null;
|
|
@@ -3561,5 +3452,11 @@ exports.useUpdateMedia = useUpdateMedia;
|
|
|
3561
3452
|
exports.useUpdatePost = useUpdatePost;
|
|
3562
3453
|
exports.useUpdateProfile = useUpdateProfile;
|
|
3563
3454
|
exports.useValidatePost = useValidatePost;
|
|
3455
|
+
Object.keys(query).forEach(function (k) {
|
|
3456
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
3457
|
+
enumerable: true,
|
|
3458
|
+
get: function () { return query[k]; }
|
|
3459
|
+
});
|
|
3460
|
+
});
|
|
3564
3461
|
//# sourceMappingURL=index.cjs.map
|
|
3565
3462
|
//# sourceMappingURL=index.cjs.map
|