@agentiffai/design 1.5.1 → 1.5.2
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 +13 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9954,7 +9954,7 @@ var PostPreviewCard = ({
|
|
|
9954
9954
|
const [newHashtag, setNewHashtag] = React4.useState("");
|
|
9955
9955
|
const showSkeleton = isLoading && !post.content;
|
|
9956
9956
|
const displayContent = isEditing && editContent !== void 0 ? editContent : post.editedContent || post.content;
|
|
9957
|
-
const displayHashtags =
|
|
9957
|
+
const displayHashtags = editHashtags !== void 0 ? editHashtags : post.hashtags;
|
|
9958
9958
|
const currentCharCount = displayContent.length;
|
|
9959
9959
|
const charPercentage = React4.useMemo(
|
|
9960
9960
|
() => getCharacterLimitPercentage(post.platform, currentCharCount),
|
|
@@ -10023,11 +10023,11 @@ var PostPreviewCard = ({
|
|
|
10023
10023
|
autoFocus: true
|
|
10024
10024
|
}
|
|
10025
10025
|
) : /* @__PURE__ */ jsxRuntime.jsx(PostContent, { children: displayContent }),
|
|
10026
|
-
!showSkeleton && (displayHashtags.length > 0 ||
|
|
10026
|
+
!showSkeleton && (displayHashtags.length > 0 || onHashtagsChange) && /* @__PURE__ */ jsxRuntime.jsxs(HashtagsContainer, { children: [
|
|
10027
10027
|
displayHashtags.map((hashtag) => /* @__PURE__ */ jsxRuntime.jsxs(HashtagPill, { $platformColor: platformConfig.color, children: [
|
|
10028
10028
|
"#",
|
|
10029
10029
|
hashtag.replace(/^#/, ""),
|
|
10030
|
-
|
|
10030
|
+
onHashtagsChange && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10031
10031
|
RemoveHashtagButton,
|
|
10032
10032
|
{
|
|
10033
10033
|
type: "button",
|
|
@@ -10037,7 +10037,7 @@ var PostPreviewCard = ({
|
|
|
10037
10037
|
}
|
|
10038
10038
|
)
|
|
10039
10039
|
] }, hashtag)),
|
|
10040
|
-
|
|
10040
|
+
onHashtagsChange && /* @__PURE__ */ jsxRuntime.jsxs(HashtagEditor, { children: [
|
|
10041
10041
|
/* @__PURE__ */ jsxRuntime.jsxs(HashtagInputWrapper, { children: [
|
|
10042
10042
|
/* @__PURE__ */ jsxRuntime.jsx(HashPrefix, { children: "#" }),
|
|
10043
10043
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10587,16 +10587,18 @@ var PlatformCarousel = ({
|
|
|
10587
10587
|
}) }),
|
|
10588
10588
|
/* @__PURE__ */ jsxRuntime.jsx(ContentContainer2, { children: posts.map((post, index) => {
|
|
10589
10589
|
const isEditing = editingIndex === index;
|
|
10590
|
-
|
|
10590
|
+
const isActive = index === activeIndex;
|
|
10591
|
+
const canEditHashtags = isActive && !!onEditHashtagsChange;
|
|
10592
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Slide, { $isActive: isActive, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10591
10593
|
PostPreviewCard,
|
|
10592
10594
|
{
|
|
10593
10595
|
post,
|
|
10594
|
-
isActive
|
|
10596
|
+
isActive,
|
|
10595
10597
|
isEditing,
|
|
10596
10598
|
editContent: isEditing ? editContent : void 0,
|
|
10597
10599
|
onContentChange: isEditing ? onEditContentChange : void 0,
|
|
10598
|
-
editHashtags:
|
|
10599
|
-
onHashtagsChange:
|
|
10600
|
+
editHashtags: canEditHashtags ? editHashtags : void 0,
|
|
10601
|
+
onHashtagsChange: canEditHashtags ? onEditHashtagsChange : void 0,
|
|
10600
10602
|
isLoading,
|
|
10601
10603
|
onImageChange: onImageChangeRequest ? () => onImageChangeRequest(index) : void 0
|
|
10602
10604
|
}
|
|
@@ -10744,6 +10746,7 @@ var PlatformGrid = ({
|
|
|
10744
10746
|
return /* @__PURE__ */ jsxRuntime.jsx(Grid, { "data-testid": "platform-grid", children: posts.map((post, index) => {
|
|
10745
10747
|
const isEditing = editingIndex === index;
|
|
10746
10748
|
const isActive = activeIndex === index;
|
|
10749
|
+
const canEditHashtags = isActive && !!onEditHashtagsChange;
|
|
10747
10750
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10748
10751
|
GridCell,
|
|
10749
10752
|
{
|
|
@@ -10769,8 +10772,8 @@ var PlatformGrid = ({
|
|
|
10769
10772
|
isEditing,
|
|
10770
10773
|
editContent: isEditing ? editContent : void 0,
|
|
10771
10774
|
onContentChange: isEditing ? onEditContentChange : void 0,
|
|
10772
|
-
editHashtags:
|
|
10773
|
-
onHashtagsChange:
|
|
10775
|
+
editHashtags: canEditHashtags ? editHashtags : void 0,
|
|
10776
|
+
onHashtagsChange: canEditHashtags ? onEditHashtagsChange : void 0,
|
|
10774
10777
|
isLoading,
|
|
10775
10778
|
onImageChange: onImageChangeRequest ? () => onImageChangeRequest(index) : void 0
|
|
10776
10779
|
}
|