@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.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { createContext, memo, useMemo, useState, Fragment as Fragment$1, useRef, useLayoutEffect, useCallback, useEffect, createElement, useContext, useId } from 'react';
3
3
  import { useInfiniteQuery, useQuery, useMutation, QueryClient } from '@tanstack/react-query';
4
- import { xPollDurationLabel, linkedinPollDurationLabel, captionMaxFor, UploadError, TIKTOK_CAPTION_MAX, createPostrunClient, profilesList, profilesGet, profilesCreate, profilesUpdate, profilesDelete, connectionsConnect, connectionsListByProfile, connectionsGet, connectionsListAccounts, connectionsSelect, connectionsDelete, mediaGet, mediaList, mediaUpdate, mediaDelete, postsList, postsGet, postsCreate, buildCreatePost, isPostPlatform, failedVariants, isPublished, postsValidate, postsUpdate, postsDelete, tiktokCreatorInfo, audiencePrivacyOptions, audienceUnselected, parsePrivacyLevel, TIKTOK_AUDIENCE_REQUIRED_HINT, commercialLabelNotice, commercialDisclosureIncomplete, brandedContentDisabledReason, setCommercialDisclosure, setBrandKind, TIKTOK_DISCLOSURE_REQUIRED_HINT, TIKTOK_BRANDED_CONTENT_POLICY_URL, TIKTOK_MUSIC_CONFIRMATION_URL, interactionRows, interactionValueKey, toggleInteraction, tiktokOptionsReady, TIKTOK_PROCESSING_NOTICE, brandedContentDeclared, mediaCreate, uploadFile, waitForMedia, PostrunError } from '@postrun/js';
4
+ import { xPollDurationLabel, linkedinPollDurationLabel, createPostrunClient, profilesList, profilesGet, profilesCreate, profilesUpdate, profilesDelete, connectionsConnect, connectionsListByProfile, connectionsGet, connectionsListAccounts, connectionsSelect, connectionsDelete, mediaGet, mediaList, mediaUpdate, mediaDelete, postsList, postsGet, postsCreate, buildCreatePost, isPostPlatform, failedVariants, isPublished, postsValidate, postsUpdate, postsDelete, tiktokCreatorInfo, audiencePrivacyOptions, audienceUnselected, parsePrivacyLevel, TIKTOK_AUDIENCE_REQUIRED_HINT, captionMaxFor, commercialLabelNotice, commercialDisclosureIncomplete, brandedContentDisabledReason, setCommercialDisclosure, setBrandKind, TIKTOK_DISCLOSURE_REQUIRED_HINT, TIKTOK_BRANDED_CONTENT_POLICY_URL, TIKTOK_MUSIC_CONFIRMATION_URL, interactionRows, interactionValueKey, toggleInteraction, tiktokOptionsReady, TIKTOK_PROCESSING_NOTICE, brandedContentDeclared, mediaCreate, uploadFile, waitForMedia, PostrunError } from '@postrun/js';
5
5
  export { TIKTOK_CAPTION_MAX, UploadError, captionMaxFor } from '@postrun/js';
6
6
  import Nango, { AuthError } from '@nangohq/frontend';
7
7
  import pWaitFor, { TimeoutError } from 'p-wait-for';
8
8
  import pLimit from 'p-limit';
9
- import * as query_star from '@postrun/js/query';
9
+ export * from '@postrun/js/query';
10
10
  import { enrichTweet, TweetContainer, TweetHeader, TweetInReplyTo, TweetBody, TweetMedia, QuotedTweet } from 'react-tweet';
11
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
12
  import { FiMessageCircle, FiRepeat, FiHeart, FiBarChart2, FiShare, FiGlobe, FiUsers, FiThumbsUp, FiMessageSquare, FiSend, FiBookmark, FiMoreHorizontal, FiFileText } from 'react-icons/fi';
@@ -16,86 +16,7 @@ import useEmblaCarousel from 'embla-carousel-react';
16
16
  import { MdVerified, MdMusicNote } from 'react-icons/md';
17
17
  import { IoMusicalNotes } from 'react-icons/io5';
18
18
 
19
- var __defProp = Object.defineProperty;
20
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
21
- var __getOwnPropNames = Object.getOwnPropertyNames;
22
- var __hasOwnProp = Object.prototype.hasOwnProperty;
23
- var __export = (target, all) => {
24
- for (var name in all)
25
- __defProp(target, name, { get: all[name], enumerable: true });
26
- };
27
- var __copyProps = (to, from, except, desc) => {
28
- if (from && typeof from === "object" || typeof from === "function") {
29
- for (let key of __getOwnPropNames(from))
30
- if (!__hasOwnProp.call(to, key) && key !== except)
31
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32
- }
33
- return to;
34
- };
35
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
36
-
37
- // src/index.ts
38
- var index_exports = {};
39
- __export(index_exports, {
40
- ArticleCard: () => ArticleCard,
41
- AudienceSelect: () => AudienceSelect,
42
- CommercialDisclosure: () => CommercialDisclosure,
43
- Connect: () => Connect,
44
- Declaration: () => Declaration,
45
- DocumentCard: () => DocumentCard,
46
- InstagramPostPreview: () => InstagramPostPreview,
47
- InteractionToggles: () => InteractionToggles,
48
- LinkedInPostPreview: () => LinkedInPostPreview,
49
- Poll: () => Poll,
50
- PostrunProvider: () => PostrunProvider,
51
- ReelPreview: () => ReelPreview,
52
- TIKTOK_CAPTION_MAX: () => TIKTOK_CAPTION_MAX,
53
- TikTokCaptionField: () => TikTokCaptionField,
54
- TikTokPostPreview: () => TikTokPostPreview,
55
- TikTokPublishPanel: () => TikTokPublishPanel,
56
- UploadError: () => UploadError,
57
- XPoll: () => XPoll,
58
- XPostPreview: () => XPostPreview,
59
- captionMaxFor: () => captionMaxFor,
60
- connectionKeys: () => connectionKeys,
61
- isReadyMedia: () => isReadyMedia,
62
- mediaKeys: () => mediaKeys,
63
- postKeys: () => postKeys,
64
- profileKeys: () => profileKeys,
65
- resolveVariantMedia: () => resolveVariantMedia,
66
- tiktokKeys: () => tiktokKeys,
67
- useCalendar: () => useCalendar,
68
- useConnect: () => useConnect,
69
- useConnection: () => useConnection,
70
- useConnections: () => useConnections,
71
- useCreatePost: () => useCreatePost,
72
- useCreateProfile: () => useCreateProfile,
73
- useDeleteMedia: () => useDeleteMedia,
74
- useDeletePost: () => useDeletePost,
75
- useDeleteProfile: () => useDeleteProfile,
76
- useDisconnect: () => useDisconnect,
77
- useDiscoverableAccounts: () => useDiscoverableAccounts,
78
- useInfiniteList: () => useInfiniteList,
79
- useMedia: () => useMedia,
80
- useMediaInfinite: () => useMediaInfinite,
81
- useMediaList: () => useMediaList,
82
- useMediaUpload: () => useMediaUpload,
83
- usePost: () => usePost,
84
- usePostrun: () => usePostrun,
85
- usePostrunMutation: () => usePostrunMutation,
86
- usePostrunQuery: () => usePostrunQuery,
87
- usePosts: () => usePosts,
88
- usePostsInfinite: () => usePostsInfinite,
89
- useProfile: () => useProfile,
90
- useProfiles: () => useProfiles,
91
- useProfilesInfinite: () => useProfilesInfinite,
92
- useSelectAccount: () => useSelectAccount,
93
- useTikTokCreatorInfo: () => useTikTokCreatorInfo,
94
- useUpdateMedia: () => useUpdateMedia,
95
- useUpdatePost: () => useUpdatePost,
96
- useUpdateProfile: () => useUpdateProfile,
97
- useValidatePost: () => useValidatePost
98
- });
19
+ // src/context.tsx
99
20
  function createDefaultQueryClient() {
100
21
  return new QueryClient({
101
22
  defaultOptions: {
@@ -982,14 +903,6 @@ function useTikTokCreatorInfo(connectionId) {
982
903
  queryClient
983
904
  );
984
905
  }
985
-
986
- // src/query.ts
987
- var query_exports = {};
988
- __export(query_exports, {
989
- usePostrunMutation: () => usePostrunMutation,
990
- usePostrunQuery: () => usePostrunQuery
991
- });
992
- __reExport(query_exports, query_star);
993
906
  function usePostrunQuery(optionsFactory) {
994
907
  const { client, queryClient } = usePostrun();
995
908
  return useQuery(optionsFactory(client), queryClient);
@@ -999,9 +912,6 @@ function usePostrunMutation(optionsFactory) {
999
912
  return useMutation(optionsFactory(client), queryClient);
1000
913
  }
1001
914
 
1002
- // src/index.ts
1003
- __reExport(index_exports, query_exports);
1004
-
1005
915
  // src/preview/media-resolver.ts
1006
916
  function previewKind(kind) {
1007
917
  return kind === "image" || kind === "video" || kind === "gif" ? kind : null;