@postrun/react 2.25.0 → 3.0.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 +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +120 -118
- package/dist/index.d.ts +120 -118
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2120,7 +2120,7 @@ function LinkedInPostPreviewImpl({
|
|
|
2120
2120
|
...style
|
|
2121
2121
|
};
|
|
2122
2122
|
const hasContent = Boolean(variant.body) || resolved.length > 0 || Boolean(
|
|
2123
|
-
variant.settings?.
|
|
2123
|
+
variant.settings?.article || variant.settings?.poll || variant.settings?.document
|
|
2124
2124
|
);
|
|
2125
2125
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: cardStyle5, children: [
|
|
2126
2126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2152,15 +2152,14 @@ var emptyBodyStyle2 = {
|
|
|
2152
2152
|
};
|
|
2153
2153
|
function renderContent(variant, media, pending) {
|
|
2154
2154
|
const settings = variant.settings;
|
|
2155
|
-
const kind = settings?.content_kind;
|
|
2156
2155
|
const [firstMedia] = media;
|
|
2157
|
-
if (
|
|
2156
|
+
if (settings?.article) {
|
|
2158
2157
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: INSET, children: /* @__PURE__ */ jsxRuntime.jsx(ArticleCard, { article: settings.article, thumbnail: firstMedia }) });
|
|
2159
2158
|
}
|
|
2160
|
-
if (
|
|
2159
|
+
if (settings?.poll) {
|
|
2161
2160
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: INSET, children: /* @__PURE__ */ jsxRuntime.jsx(Poll, { poll: settings.poll }) });
|
|
2162
2161
|
}
|
|
2163
|
-
if (
|
|
2162
|
+
if (settings?.document) {
|
|
2164
2163
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: INSET, children: /* @__PURE__ */ jsxRuntime.jsx(DocumentCard, { document: settings.document, cover: firstMedia }) });
|
|
2165
2164
|
}
|
|
2166
2165
|
if (media.length > 0) {
|
|
@@ -2640,7 +2639,7 @@ function InstagramPostPreviewImpl({
|
|
|
2640
2639
|
[connection, verified]
|
|
2641
2640
|
);
|
|
2642
2641
|
const settings = variant.settings;
|
|
2643
|
-
const isReel =
|
|
2642
|
+
const isReel = resolved.length === 1 && resolved[0]?.kind === "video";
|
|
2644
2643
|
if (isReel) {
|
|
2645
2644
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2646
2645
|
ReelPreview,
|
|
@@ -3437,6 +3436,7 @@ function mediaCountValid(postType, count) {
|
|
|
3437
3436
|
}
|
|
3438
3437
|
function TikTokPublishPanel({
|
|
3439
3438
|
variant,
|
|
3439
|
+
postType,
|
|
3440
3440
|
creatorInfo,
|
|
3441
3441
|
caption,
|
|
3442
3442
|
onCaptionChange,
|
|
@@ -3448,9 +3448,9 @@ function TikTokPublishPanel({
|
|
|
3448
3448
|
className,
|
|
3449
3449
|
style
|
|
3450
3450
|
}) {
|
|
3451
|
-
const isVideo =
|
|
3452
|
-
const captionOver = caption.length > js.captionMaxFor(
|
|
3453
|
-
const mediaOk = mediaCountValid(
|
|
3451
|
+
const isVideo = postType === "video";
|
|
3452
|
+
const captionOver = caption.length > js.captionMaxFor(postType);
|
|
3453
|
+
const mediaOk = mediaCountValid(postType, variant.media?.length ?? 0);
|
|
3454
3454
|
const ready = !captionOver && mediaOk && js.tiktokOptionsReady(options);
|
|
3455
3455
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3456
3456
|
"div",
|
|
@@ -3469,7 +3469,7 @@ function TikTokPublishPanel({
|
|
|
3469
3469
|
{
|
|
3470
3470
|
value: caption,
|
|
3471
3471
|
onChange: onCaptionChange,
|
|
3472
|
-
postType
|
|
3472
|
+
postType
|
|
3473
3473
|
}
|
|
3474
3474
|
),
|
|
3475
3475
|
/* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
|